core: fix assistant message completion time and finish state handling

This commit is contained in:
Dax Raad 2025-11-16 19:16:41 -05:00
parent 0b35b1b144
commit 9790277a59

View file

@ -394,15 +394,9 @@ export namespace SessionPrompt {
},
)
.catch(() => {})
await Session.updateMessage({
...assistantMessage,
role: "assistant",
time: {
...assistantMessage.time,
completed: Date.now(),
},
finish: "tool-calls",
})
assistantMessage.finish = "tool-calls"
assistantMessage.time.completed = Date.now()
await Session.updateMessage(assistantMessage)
if (result) {
await Session.updatePart({
...part,