feat(coding-agent): add named-only filter toggle to /resume picker #868
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.
Originating issue: #862
The
/resumepicker already supports search, scope toggling, and sort modes, but named sessions can get lost easily sometimes. This adds aCtrl+Ntoggle to filter the list down to sessions named via/name, while keeping the existing search/sort behavior intact (name filtering applies even when the query is empty).Summary of changes:
NameFilter(all | named) tofilterAndSortSessions()and apply it before query parsing/matchingCtrl+Nin the session selector to toggleName: All↔Name: Named, and show current state in the headername filtercoverage (incl. whitespace-only names excluded viatrim())toggleSessionNamedFilter(default:ctrl+n) via~/.pi/agent/keybindings.jsonKeybindingsManagerfor the named-filter toggle and UI hints/empty-state messaging, so users can remap it (e.g. for Emacs/readlinectrl+n= down)Files:
packages/coding-agent/README.mdpackages/coding-agent/src/cli/session-picker.tspackages/coding-agent/src/core/keybindings.tspackages/coding-agent/src/modes/interactive/components/session-selector-search.tspackages/coding-agent/src/modes/interactive/components/session-selector.tspackages/coding-agent/src/modes/interactive/interactive-mode.tspackages/coding-agent/test/session-selector-path-delete.test.tspackages/coding-agent/test/session-selector-search.test.tsManual testing:
/resume: Ctrl+N toggles All/Named; header updates; hint showsctrl+n: named/resume: named filter works with empty search query and with an active query/resume: empty state mentions Ctrl+N when no named sessions are available in the current scope/resume: named filter toggle works; header updates; hint shows the configured keybindingkeybindings.json: remappingtoggleSessionNamedFilterworks (e.g. free upctrl+nforselectDown)