(
messages: Array<{
from: string
text: string
timestamp: string
color?: string
summary?: string
}>,
)
| 371 | * Format teammate messages as XML for attachment display |
| 372 | */ |
| 373 | export function formatTeammateMessages( |
| 374 | messages: Array<{ |
| 375 | from: string |
| 376 | text: string |
| 377 | timestamp: string |
| 378 | color?: string |
| 379 | summary?: string |
| 380 | }>, |
| 381 | ): string { |
| 382 | return messages |
| 383 | .map(m => { |
| 384 | const colorAttr = m.color ? ` color="${m.color}"` : '' |
| 385 | const summaryAttr = m.summary ? ` summary="${m.summary}"` : '' |
| 386 | return `<${TEAMMATE_MESSAGE_TAG} teammate_id="${m.from}"${colorAttr}${summaryAttr}>\n${m.text}\n</${TEAMMATE_MESSAGE_TAG}>` |
| 387 | }) |
| 388 | .join('\n\n') |
| 389 | } |
| 390 | |
| 391 | /** |
| 392 | * Structured message sent when a teammate becomes idle (via Stop hook) |
nothing calls this directly
no outgoing calls
no test coverage detected