diff --git a/packages/cli/src/ui/components/SessionBrowser.tsx b/packages/cli/src/ui/components/SessionBrowser.tsx index ac9b2c2b00..6ae205bc77 100644 --- a/packages/cli/src/ui/components/SessionBrowser.tsx +++ b/packages/cli/src/ui/components/SessionBrowser.tsx @@ -562,6 +562,13 @@ export const useSessionBrowserInput = ( state.setActiveIndex(0); state.setScrollOffset(0); return true; + } else if (key.name === 'return') { + const selectedSession = + state.filteredAndSortedSessions[state.activeIndex]; + if (selectedSession && !selectedSession.isCurrentSession) { + onResumeSession(selectedSession); + } + return true; } else if ( key.sequence && key.sequence.length === 1 && diff --git a/packages/cli/src/ui/components/__snapshots__/SessionBrowser.test.tsx.snap b/packages/cli/src/ui/components/__snapshots__/SessionBrowser.test.tsx.snap index 15cd8748ae..583d75d281 100644 --- a/packages/cli/src/ui/components/__snapshots__/SessionBrowser.test.tsx.snap +++ b/packages/cli/src/ui/components/__snapshots__/SessionBrowser.test.tsx.snap @@ -6,7 +6,7 @@ exports[`SessionBrowser component > enters search mode, filters sessions, and re Search: query (Esc to cancel) Index │ Msgs │ Age │ Match - ❯ #1 │ 1 │ 10mo │ You: Query is here a… (+1 more) + ❯ #1 │ 1 │ 10mo │ You: Query is here a… (+1 more) ▼ " `; @@ -17,7 +17,7 @@ exports[`SessionBrowser component > renders a list of sessions and marks current Sort: s Reverse: r First/Last: g/G Index │ Msgs │ Age │ Name - ❯ #1 │ 5 │ 10mo │ Second conversation about dogs (current) + ❯ #1 │ 5 │ 10mo │ Second conversation about dogs (current) #2 │ 2 │ 10mo │ First conversation about cats ▼ "