MCPcopy Create free account
hub / github.com/Zoo-Code-Org/Zoo-Code / outputSayMessage

Method outputSayMessage

apps/cli/src/agent/output-manager.ts:236–281  ·  view source on GitHub ↗
(
		ts: number,
		say: ClineSay,
		text: string,
		isPartial: boolean,
		alreadyDisplayedComplete: boolean | undefined,
		skipFirstUserMessage: boolean,
	)

Source from the content-addressed store, hash-verified

234 // ===========================================================================
235
236 private outputSayMessage(
237 ts: number,
238 say: ClineSay,
239 text: string,
240 isPartial: boolean,
241 alreadyDisplayedComplete: boolean | undefined,
242 skipFirstUserMessage: boolean,
243 ): void {
244 switch (say) {
245 case "text":
246 this.outputTextMessage(ts, text, isPartial, alreadyDisplayedComplete, skipFirstUserMessage)
247 break
248
249 // case "thinking": - not a valid ClineSay type
250 case "reasoning":
251 this.outputReasoningMessage(ts, text, isPartial, alreadyDisplayedComplete)
252 break
253
254 case "command_output":
255 this.outputCommandOutput(ts, text, isPartial, alreadyDisplayedComplete)
256 break
257
258 case "completion_result":
259 // completion_result can arrive as both a "say" (with streamed text)
260 // and an "ask" (handled via TaskCompleted in extension-host.ts).
261 // Stream the say variant here; the ask variant is handled by
262 // outputCompletionResult which will skip if already displayed.
263 this.outputCompletionSayMessage(ts, text, isPartial, alreadyDisplayedComplete)
264 break
265
266 case "error":
267 if (!alreadyDisplayedComplete) {
268 this.outputError("\n[error]", text || "Unknown error")
269 this.displayedMessages.set(ts, { ts, text: text || "", partial: false })
270 }
271 break
272
273 case "api_req_started":
274 // Silent - no output needed
275 break
276
277 default:
278 // NO-OP for unknown say types
279 break
280 }
281 }
282
283 private outputTextMessage(
284 ts: number,

Callers 1

outputMessageMethod · 0.95

Calls 6

outputTextMessageMethod · 0.95
outputCommandOutputMethod · 0.95
outputErrorMethod · 0.95
setMethod · 0.65

Tested by

no test coverage detected