feat(cli, term): Support removing a single compaction event - #930
Merged
Conversation
`jp conversation compact --reset` previously removed every compaction event in one go. It now also accepts an index, `--reset=2`, which removes only that compaction event, numbered the same way `jp conversation show` lists them. Indices are 1-based; `0` or a value past the last compaction event is an error rather than a silent no-op, matching how `--turn` behaves. `--dry-run` still previews the removal without mutating the conversation. `ConversationStream` gains `remove_compaction`, which removes the compaction event at a given 0-based position among the stream's compaction events and returns it, leaving the stream unchanged if the position is out of range. The pretty `details` table view now renders list values as a numbered list (`1.`, `2.`, ...) instead of bullets, with numbers right-aligned so item text lines up past the tenth entry. This affects any CLI output built from `DetailValue::List`, such as attachment listings. 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.
jp conversation compact --resetpreviously removed every compaction event in one go. It now also accepts an index,--reset=2, which removes only that compaction event, numbered the same wayjp conversation showlists them. Indices are 1-based;0or a value past the last compaction event is an error rather than a silent no-op, matching how--turnbehaves.--dry-runstill previews the removal without mutating the conversation.ConversationStreamgainsremove_compaction, which removes the compaction event at a given 0-based position among the stream's compaction events and returns it, leaving the stream unchanged if the position is out of range.The pretty
detailstable view now renders list values as a numbered list (1.,2., ...) instead of bullets, with numbers right-aligned so item text lines up past the tenth entry. This affects any CLI output built fromDetailValue::List, such as attachment listings.