Explorar o código

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

Adam hai 1 mes
pai
achega
66afc034d1
Modificáronse 1 ficheiros con 8 adicións e 0 borrados
  1. 8 0
      packages/ui/src/components/session-turn.tsx

+ 8 - 0
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)