MCPcopy Create free account
hub / github.com/Noumena-Network/code / formatAsTeammateMessage

Function formatAsTeammateMessage

src/utils/swarm/inProcessRunner.ts:458–467  ·  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

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

Callers 1

runInProcessTeammateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected