浏览代码

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

Adam 1 月之前
父节点
当前提交
66afc034d1
共有 1 个文件被更改,包括 8 次插入0 次删除
  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)