Conversation
Implements RFD 047. Two new capabilities for direct filesystem access to
conversation data, replacing the manual path-hunting workflow.
`jp conversation path` is a new subcommand that prints the filesystem
path to a conversation's storage directory. With `--events`,
`--metadata`, or `--base-config` flags it prints the path to that
specific file instead. Multiple flags can be combined, with paths
printed one per line for shell composition:
vim $(jp conversation path --events)
cat $(jp conversation path --metadata) | jq .
cp $(jp conversation path --events) /tmp/backup.json
`jp conversation edit` now opens the conversation directory in `$EDITOR`
when invoked without property flags, replacing the previous behavior of
showing help text. The same `--events`, `--metadata`, and
`--base-config` flags are supported to open a specific file directly.
The existing property flags (`--local`, `--title`, `--tmp`, etc.)
continue to work as before and conflict with the new file flags.
To support path resolution, `jp_storage` gains `build_conversation_dir`,
`find_conversation_dir`, and per-file path methods (`events`,
`metadata`, `base_config`). These are surfaced on `jp_workspace` as
well. The previously public `CONVERSATIONS_DIR` and `METADATA_FILE`
constants are narrowed to `pub(crate)` now that callers use the new path
API instead.
Signed-off-by: Jean Mertz <git@jeanmertz.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements RFD 047. Two new capabilities for direct filesystem access to conversation data, replacing the manual path-hunting workflow.
jp conversation pathis a new subcommand that prints the filesystem path to a conversation's storage directory. With--events,--metadata, or--base-configflags it prints the path to that specific file instead. Multiple flags can be combined, with paths printed one per line for shell composition:jp conversation editnow opens the conversation directory in$EDITORwhen invoked without property flags, replacing the previous behavior of showing help text. The same--events,--metadata, and--base-configflags are supported to open a specific file directly. The existing property flags (--local,--title,--tmp, etc.) continue to work as before and conflict with the new file flags.To support path resolution,
jp_storagegainsbuild_conversation_dir,find_conversation_dir, and per-file path methods (events,metadata,base_config). These are surfaced onjp_workspaceas well. The previously publicCONVERSATIONS_DIRandMETADATA_FILEconstants are narrowed topub(crate)now that callers use the new path API instead.