Browse Source

tui: auto-scroll to bottom when switching between sessions

Dax Raad 3 months ago
parent
commit
3ace8543b2
1 changed files with 3 additions and 0 deletions
  1. 3 0
      packages/opencode/src/cli/cmd/tui/routes/session/index.tsx

+ 3 - 0
packages/opencode/src/cli/cmd/tui/routes/session/index.tsx

@@ -626,6 +626,9 @@ export function Session() {
   const dialog = useDialog()
   const renderer = useRenderer()
 
+  // snap to bottom when session changes
+  createEffect(on(() => route.sessionID, toBottom))
+
   return (
     <context.Provider
       value={{