-
Notifications
You must be signed in to change notification settings - Fork 308
feat(coding-agent): add named-only filter toggle to /resume picker #868
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| } | ||
|
|
||
| // Ctrl+N: toggle name filter | ||
| if (matchesKey(keyData, "ctrl+n")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please make this configurable :-) I rebind ctrl+n in session picker for "select down". Here's part of my keybindings:
"selectUp": ["up", "ctrl+p"],
"selectDown": ["down", "ctrl+n"],
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are just standard Emacs/readline keybindings btw
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call. The named-only toggle is now configurable via ~/.pi/agent/keybindings.json:
{
"toggleSessionNamedFilter": "whatever"
}
@badlogic Do you want a follow-up that makes the other /resume picker shortcuts configurable too (ctrl+r sort, ctrl+p path toggle, ctrl+d delete), or should we those hardcoded?
|
Eeks, I merged the rename in /resume PR first. Could you please rebase and fix up the conflicts? Cheers! |
Yeah can do tomorrow. Are you good with Ctrl+N here and that being reconfigurable via keybindings.json? |
592e17c to
867f391
Compare
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)