mirror of
https://github.com/sst/opencode.git
synced 2025-12-23 10:11:41 +00:00
core: add debug logging for assistant message loop exit conditions
This commit is contained in:
parent
5f770024cc
commit
9026705fdb
1 changed files with 4 additions and 1 deletions
|
|
@ -315,7 +315,10 @@ export namespace SessionPrompt {
|
|||
}
|
||||
|
||||
if (!lastUser) throw new Error("No user message found in stream. This should never happen.")
|
||||
if (lastAssistant?.finish && lastAssistant.finish !== "tool-calls" && lastUser.id < lastAssistant.id) break
|
||||
if (lastAssistant?.finish && lastAssistant.finish !== "tool-calls" && lastUser.id < lastAssistant.id) {
|
||||
log.info("exiting loop", { id: lastAssistant?.id })
|
||||
break
|
||||
}
|
||||
log.info("last assistant", { id: lastAssistant?.id })
|
||||
|
||||
step++
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue