Add conversation attachment handler for referencing existing conversation content
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16
- Forks
- 3
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 121
Description
Add a new attachment handler that allows attaching the full content of existing conversations as context for new conversations.
Context
When working with LLMs, it is often valuable to get second opinions or continue discussions with different models while preserving the full context of previous conversations. Currently, the attachment system supports various external content types but lacks the ability to attach conversation content from existing conversations.
While it is possible to continue an existing conversation using a different model using jp query --model, that would use the existing conversation as if it was communicated with the new model, instead of attaching it as an "external conversation" that the new model can read, but won't interpret as its own conversation.
Alternatives
Alternative approaches include conversation forking, manual copy-paste, or summarization, but these do not provide the same flexibility.
Proposed Implementation
Implement a new ConversationHandler struct in a jp_attachment_conversation crate following the existing attachment handler pattern.
For now, two URIs are accepted:
conversation://<local id>which would be the directory name (without the free-form title) in.jp/conversationconversation://<global-id>which would be the global JP ID for conversations (seen usingjp conversation ls, such asjp-c17534214039-otvo8)
We could optionally add a summary=true parameter to use an llm to summarize an existing conversation and attach that, to limit the number of used tokens.
Tasks
- Create new jp_attachment_conversation crate
- Implement ConversationHandler struct
- Add support for local and global ID formats
- Add conversation content retrieval logic
- Register handler in distributed slice system
- Add comprehensive tests
- Update documentation
Resources
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with crates/jp_attachment/src/lib.rs to understand the existing attachment-handler pattern, then read crates/jp_conversation/src/conversation.rs for conversation retrieval and identifiers. Implement the jp_attachment_conversation crate for local and global conversation URIs, register it through the distributed slice system, and add tests covering retrieval and both ID formats. Done includes documentation updates and comprehensive tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100