fix(desktop): don't show summary when already complete
This commit is contained in:
parent
11ab8de59f
commit
66afc034d1
1 changed files with 8 additions and 0 deletions
|
|
@ -393,6 +393,14 @@ export function SessionTurn(
|
||||||
if (summary()) return
|
if (summary()) return
|
||||||
if (store.summaryWaitTimedOut) 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(() => {
|
const timer = setTimeout(() => {
|
||||||
setStore("summaryWaitTimedOut", true)
|
setStore("summaryWaitTimedOut", true)
|
||||||
}, 6000)
|
}, 6000)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue