mirror of
https://github.com/anomalyco/opencode.git
synced 2026-06-01 19:05:38 +00:00
Emit LLM stream lifecycle events (#26971)
This commit is contained in:
@@ -154,8 +154,8 @@ const accumulate = (state: StepState, event: LLMEvent) => {
|
||||
)
|
||||
return
|
||||
}
|
||||
if (event.type === "request-finish") {
|
||||
state.finishReason = event.reason
|
||||
if (event.type === "step-finish" || event.type === "request-finish") {
|
||||
state.finishReason = event.reason === "stop" && state.toolCalls.length > 0 ? "tool-calls" : event.reason
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user