mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-16 20:01:24 +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
|
|
@ -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