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

Method outputMessage

apps/cli/src/agent/output-manager.ts:125–141  ·  view source on GitHub ↗

* Output a ClineMessage based on its type. * This is the main entry point for message output. * * @param msg - The message to output * @param skipFirstUserMessage - If true, skip the first "text" message (user prompt echo)

(msg: ClineMessage, skipFirstUserMessage = true)

Source from the content-addressed store, hash-verified

123 * @param skipFirstUserMessage - If true, skip the first "text" message (user prompt echo)
124 */
125 outputMessage(msg: ClineMessage, skipFirstUserMessage = true): void {
126 const ts = msg.ts
127 const text = msg.text || ""
128 const isPartial = msg.partial === true
129 const previousDisplay = this.displayedMessages.get(ts)
130 const alreadyDisplayedComplete = previousDisplay && !previousDisplay.partial
131
132 if (msg.type === "say" && msg.say) {
133 this.outputSayMessage(ts, msg.say, text, isPartial, alreadyDisplayedComplete, skipFirstUserMessage)
134 } else if (msg.type === "ask" && msg.ask) {
135 // For ask messages, we only output command_output here
136 // Other asks are handled by AskDispatcher
137 if (msg.ask === "command_output") {
138 this.outputCommandOutput(ts, text, isPartial, alreadyDisplayedComplete)
139 }
140 }
141 }
142
143 /**
144 * Output a simple text line with a label.

Callers 1

Calls 3

outputSayMessageMethod · 0.95
outputCommandOutputMethod · 0.95
getMethod · 0.65

Tested by

no test coverage detected