MCPcopy Create free account
hub / github.com/anomalyco/opencode / closeOpenBlocks

Function closeOpenBlocks

packages/llm/src/protocols/utils/lifecycle.ts:74–78  ·  view source on GitHub ↗
(state: State, events: LLMEvent[])

Source from the content-addressed store, hash-verified

72}
73
74const closeOpenBlocks = (state: State, events: LLMEvent[]): State => {
75 for (const id of state.reasoning) events.push(LLMEvent.reasoningEnd({ id }))
76 for (const id of state.text) events.push(LLMEvent.textEnd({ id }))
77 return { ...state, text: new Set(), reasoning: new Set() }
78}
79
80export const finish = (
81 state: State,

Callers 1

finishFunction · 0.85

Calls 1

pushMethod · 0.80

Tested by

no test coverage detected