MCPcopy Index your code
hub / github.com/coder/mux / getDisplayText

Method getDisplayText

src/node/services/messageQueue.ts:315–328  ·  view source on GitHub ↗

* Get display text for queued messages. * - Single compaction request shows rawCommand (/compact) * - Single agent-skill invocation shows rawCommand (/{skill}) * - Multiple messages show all actual message texts

()

Source from the content-addressed store, hash-verified

313 * - Multiple messages show all actual message texts
314 */
315 getDisplayText(): string {
316 // Only show rawCommand for single compaction request
317 if (this.messages.length === 1 && isCompactionMetadata(this.firstMuxMetadata)) {
318 return this.firstMuxMetadata.rawCommand;
319 }
320
321 // Only show rawCommand for a single agent-skill invocation.
322 // (Batching agent-skill with other messages is disallowed.)
323 if (this.messages.length <= 1 && isAgentSkillMetadata(this.firstMuxMetadata)) {
324 return this.firstMuxMetadata.rawCommand;
325 }
326
327 return this.messages.join("\n");
328 }
329
330 /**
331 * Get accumulated file parts for display.

Callers 4

emitHistoricalEventsMethod · 0.80
restoreQueueToInputMethod · 0.80

Calls 2

isCompactionMetadataFunction · 0.85
isAgentSkillMetadataFunction · 0.85

Tested by

no test coverage detected