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

Function entryCanStream

packages/opencode/src/cli/cmd/run/entry.body.ts:149–163  ·  view source on GitHub ↗
(commit: StreamCommit, body: RunEntryBody)

Source from the content-addressed store, hash-verified

147}
148
149export function entryCanStream(commit: StreamCommit, body: RunEntryBody): boolean {
150 if (commit.phase !== "progress") {
151 return false
152 }
153
154 if (body.type === "none") {
155 return false
156 }
157
158 if (commit.kind === "tool") {
159 return commit.toolState !== "completed"
160 }
161
162 return commit.kind === "assistant" || commit.kind === "reasoning"
163}
164
165export function entryBody(commit: StreamCommit): RunEntryBody {
166 if (commit.summary) {

Callers 2

entry.body.test.tsFile · 0.90
appendMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected