(m: Message)
| 35 | // NormalizedMessages — 1:1 with block count. String content = 1 block. |
| 36 | // AttachmentMessage etc. have no .message and normalize to ≤1. |
| 37 | function normalizedUpperBound(m: Message): number { |
| 38 | if (!('message' in m)) return 1; |
| 39 | const c = m.message.content; |
| 40 | return Array.isArray(c) ? c.length : 1; |
| 41 | } |
| 42 | |
| 43 | /** |
| 44 | * Streams rendered messages in chunks, ANSI codes preserved. Each chunk is a |
no outgoing calls
no test coverage detected