Skip to content

Commit 6859a0d

Browse files
f-pieriscidomino
authored andcommitted
Allow Enter to select session while in search mode in /resume (#21523)
Co-authored-by: Tommaso Sciortino <sciortino@gmail.com>
1 parent 95a0d1e commit 6859a0d

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

packages/cli/src/ui/components/SessionBrowser.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -562,6 +562,13 @@ export const useSessionBrowserInput = (
562562
state.setActiveIndex(0);
563563
state.setScrollOffset(0);
564564
return true;
565+
} else if (key.name === 'enter') {
566+
const selectedSession =
567+
state.filteredAndSortedSessions[state.activeIndex];
568+
if (selectedSession && !selectedSession.isCurrentSession) {
569+
onResumeSession(selectedSession);
570+
}
571+
return true;
565572
} else if (
566573
key.sequence &&
567574
key.sequence.length === 1 &&

0 commit comments

Comments
 (0)