MCPcopy Index your code
hub / github.com/codeaashu/claude-code / formatAsTeammateMessage

Function formatAsTeammateMessage

src/utils/swarm/inProcessRunner.ts:457–466  ·  view source on GitHub ↗

* Formats a message as XML for injection into the conversation. * This ensures the model sees messages in the same format as tmux teammates.

(
  from: string,
  content: string,
  color?: string,
  summary?: string,
)

Source from the content-addressed store, hash-verified

455 * This ensures the model sees messages in the same format as tmux teammates.
456 */
457function formatAsTeammateMessage(
458 from: string,
459 content: string,
460 color?: string,
461 summary?: string,
462): string {
463 const colorAttr = color ? ` color="${color}"` : ''
464 const summaryAttr = summary ? ` summary="${summary}"` : ''
465 return `<${TEAMMATE_MESSAGE_TAG} teammate_id="${from}"${colorAttr}${summaryAttr}>\n${content}\n</${TEAMMATE_MESSAGE_TAG}>`
466}
467
468/**
469 * Configuration for running an in-process teammate.

Callers 1

runInProcessTeammateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected