mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-16 12:03:23 +00:00
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:
parent
8f95a13e07
commit
638fbc459b
5 changed files with 37 additions and 0 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue