* 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, )
| 455 | * This ensures the model sees messages in the same format as tmux teammates. |
| 456 | */ |
| 457 | function 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. |
no outgoing calls
no test coverage detected