feat(cli): add /tag for multi-label session filtering#180
Merged
emal-avala merged 1 commit intomainfrom Apr 23, 2026
Merged
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
02c5f30 to
20e3579
Compare
Complements /rename (single human label) with a set of tags for filtering. Tags are normalized (lowercase, alphanumeric + -/_, max 32 chars) so they're stable across case and punctuation variants. - /tag list tags on current session - /tag <tag> add a tag - /tag --remove <tag> remove one - /tag --clear remove all - /sessions --tag <tag> filter the list New SessionData.tags field (serde-default for backward compat), normalize_tag / add_session_tag / remove_session_tag helpers on services::session with load-modify-save semantics like set_session_label.
0e913cf to
b9cdf60
Compare
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.
Summary
Adds
/tag— multi-label session categorization that complements/rename(which is a single human-readable label). Tags let users filter/sessionsby project / feature / mood / whatever.Commands:
Tag normalization (
services::session::normalize_tag):-/_onlyRejected tags get a clear error — no path-escape or shell-metachar leakage.
Implementation
SessionData.tags: Vec<String>with#[serde(default)]— existing session files load without tags and default to emptyadd_session_tag/remove_session_taguse the same load-modify-save path asset_session_label, so the per-turn save hot path is untouchedSessionSummary.tagssurfaces in/sessionsas#tag1 #tag2inline/sessions --tag <t>retains only matching entries; invalid tag arg aborts with a clear errorTest plan
cargo fmt --allcleancargo checkpassescargo clippy --no-depscleancargo test -p agent-code-lib --lib session— 21 pass, 3 new (normalize_tag accept/reject + old-JSON defaults-to-empty)/tag wipthen/sessions --tag wipshows only the current session