Add global `edit` command to quickly edit JP state
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16
- Forks
- 3
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 121
Description
We have unique identifiers for all state in JP:
jp-c17466185493-otvo8wherejpis a fixed prefix,cis the identifier for aconversationtype,17466185493is the unique identifier for that specific conversation, andotvo8is the identifier of the workspace.
We should leverage this to allow using jp edit <ID> to open the state file associated with the given ID.
Currently, all commands except for init require the command to be ran from within a workspace context (e.g. in the root or one of the subdirectories of a workspace). I propose we also add a new jp edit <ID> command which you can run globally (e.g. from anywhere), and the provided ID ensures we open the correct state file in the correct workspace (this is done through local mapping of the workspace ID to a local workspace path, which we already have).
We'll support the following:
jp edit <ID> [--local]- open
$EDITORto open the file associated with the given ID - If
--localis passed, we open the relevant local counterpart to the workspace file. This will have hard-coded logic to reject certain state files that we don't support locally. - Based on the type (e.g.
conversationorpersona, etc.) we try to parse the modified content- If successful, we store the new content and are done.
- If failure, we print the error, then ask the user:
- open original file
- edit modified file
- cancel
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 at the CLI command dispatch and the existing local mapping from workspace IDs to workspace paths. Trace how state files are selected, how $EDITOR is invoked, and how conversation or persona content is parsed, including the unsupported local cases. Done means global jp edit <ID> works from outside a workspace, supports --local, and handles parse failures with the specified choices.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100