Conversation
…TimeThreshold` Extend `jp c archive` with `--from`, `--until`, and `--yes` flags to match the ergonomics already offered by `jp c rm`. All three filter flags (`--from`, `--until`, `--inactive-since`) AND-compose when combined, letting users target a precise slice of conversations by creation date and inactivity in a single command. The default no-target behaviour of `jp c archive` has also been corrected: instead of opening the picker, it now mirrors `jp c show` and resolves to the session's active conversation (falling back through `conversation.default_id` to the picker only when no session context is available). On the `jp c rm` side, `--from`/`--until` previously accepted raw `ConversationId` values. They now accept the full `TimeThreshold` syntax (relative durations, absolute dates, and conversation IDs), making both commands consistent. `TimeThreshold` itself gained a new parsing branch: passing a conversation ID resolves to that conversation's embedded creation timestamp. This means `--from jp-c-…` is a convenient shorthand for "start from the moment that conversation was created", without having to know or copy the exact date. Unit tests were added for `archive` and `rm` covering the filter matching logic, load-request routing, and the new `TimeThreshold` conversation-ID parsing path. Signed-off-by: Jean Mertz <git@jeanmertz.com>
…unify `TimeThreshold` Signed-off-by: Jean Mertz <git@jeanmertz.com>
…unify `TimeThreshold` Signed-off-by: Jean Mertz <git@jeanmertz.com>
…hive`, unify `TimeThreshold` 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.
Extend
jp c archivewith--from,--until, and--yesflags tomatch the ergonomics already offered by
jp c rm. All three filterflags (
--from,--until,--inactive-since) AND-compose whencombined, letting users target a precise slice of conversations by
creation date and inactivity in a single command.
The default no-target behaviour of
jp c archivehas also beencorrected: instead of opening the picker, it now mirrors
jp c showandresolves to the session's active conversation (falling back through
conversation.default_idto the picker only when no session context isavailable).
On the
jp c rmside,--from/--untilpreviously accepted rawConversationIdvalues. They now accept the fullTimeThresholdsyntax(relative durations, absolute dates, and conversation IDs), making both
commands consistent.
TimeThresholditself gained a new parsing branch: passing aconversation ID resolves to that conversation's embedded creation
timestamp. This means
--from jp-c-…is a convenient shorthand for"start from the moment that conversation was created", without having to
know or copy the exact date.
Unit tests were added for
archiveandrmcovering the filtermatching logic, load-request routing, and the new
TimeThresholdconversation-ID parsing path.
Signed-off-by: Jean Mertz git@jeanmertz.com