pull/16907/merge
Koduri Mahesh Bhushan Chowdary 2026-04-08 06:34:20 +00:00 committed by GitHub
commit 77789a04e8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 1 deletions

View File

@ -134,7 +134,11 @@ export function Session() {
const disabled = createMemo(() => permissions().length > 0 || questions().length > 0)
const pending = createMemo(() => {
return messages().findLast((x) => x.role === "assistant" && !x.time.completed)?.id
const lastMessage = messages().at(-1)
if (!lastMessage || lastMessage.role !== "assistant") return
if (lastMessage.time.completed) return
if (lastMessage.error) return
return lastMessage.id
})
const lastAssistant = createMemo(() => {