(parent: Element, text: string)
| 2 | |
| 3 | /** Append streamed plain text in its own animated reveal wrapper. */ |
| 4 | export function appendStreamingTextChunk(parent: Element, text: string): void { |
| 5 | if (!text) { |
| 6 | return; |
| 7 | } |
| 8 | |
| 9 | const span = document.createElement("span"); |
| 10 | span.className = STREAM_CHUNK_CLASS; |
| 11 | span.textContent = text; |
| 12 | parent.appendChild(span); |
| 13 | } |
| 14 | |
| 15 | /** Flatten reveal wrappers when streaming finishes. */ |
| 16 | export function settleStreamChunks(root: ParentNode): void { |
no outgoing calls
no test coverage detected