Skip to content

The open source coding agent.

TypeScript

fix(desktop): don't show summary when already complete

Adam66afc034d17b
diff --git a/packages/ui/src/components/session-turn.tsx b/packages/ui/src/components/session-turn.tsx
index 4a6b8b6124e..cedf8cef3d0 100644
--- a/packages/ui/src/components/session-turn.tsx
+++ b/packages/ui/src/components/session-turn.tsx
@@ -393,6 +393,14 @@ export function SessionTurn(
if (summary()) return
if (store.summaryWaitTimedOut) return
+ // If session was already completed before we started viewing it,
+ // show the response immediately without waiting for summary
+ const completed = lastAssistantMessage()?.time.completed
+ if (completed && Date.now() - completed > 2000) {
+ setStore("summaryWaitTimedOut", true)
+ return
+ }
+
const timer = setTimeout(() => {
setStore("summaryWaitTimedOut", true)
}, 6000)