feat(coding-agent): add page-up/down navigation to session selector (#662)

* feat(tui): add pageUp/pageDown key support and selectPageUp/selectPageDown actions

* feat(coding-agent): add page-up/down navigation to session selector
This commit is contained in:
Aliou Diallo 2026-01-12 17:01:46 +01:00 committed by GitHub
parent 8f95a13e07
commit 638fbc459b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 37 additions and 0 deletions

View file

@ -7,6 +7,7 @@
- Session naming: `/name <name>` command sets a display name shown in the session selector instead of the first message. Useful for distinguishing forked sessions. Extensions can use `pi.setSessionName()` and `pi.getSessionName()`. ([#650](https://github.com/badlogic/pi-mono/pull/650) by [@scutifer](https://github.com/scutifer))
- Extension example: `notify.ts` for desktop notifications via OSC 777 escape sequence ([#658](https://github.com/badlogic/pi-mono/pull/658) by [@ferologics](https://github.com/ferologics))
- Inline hint for queued messages showing the `Alt+Up` restore shortcut ([#657](https://github.com/badlogic/pi-mono/pull/657) by [@tmustier](https://github.com/tmustier))
- Page-up/down navigation in `/resume` session selector to jump by 5 items ([#662](https://github.com/badlogic/pi-mono/pull/662) by [@aliou](https://github.com/aliou))
### Fixed

View file

@ -227,6 +227,14 @@ class SessionList implements Component {
else if (kb.matches(keyData, "selectDown")) {
this.selectedIndex = Math.min(this.filteredSessions.length - 1, this.selectedIndex + 1);
}
// Page up - jump up by maxVisible items
else if (kb.matches(keyData, "selectPageUp")) {
this.selectedIndex = Math.max(0, this.selectedIndex - this.maxVisible);
}
// Page down - jump down by maxVisible items
else if (kb.matches(keyData, "selectPageDown")) {
this.selectedIndex = Math.min(this.filteredSessions.length - 1, this.selectedIndex + this.maxVisible);
}
// Enter
else if (kb.matches(keyData, "selectConfirm")) {
const selected = this.filteredSessions[this.selectedIndex];