(data: ChatLabOutput)
| 198 | * Serialize ChatLabOutput to JSONL lines (generator for streaming writes). |
| 199 | */ |
| 200 | export function* serializeChatLabToJsonl(data: ChatLabOutput): Generator<string> { |
| 201 | yield JSON.stringify({ |
| 202 | _type: 'header', |
| 203 | chatlab: data.chatlab, |
| 204 | meta: data.meta, |
| 205 | }) |
| 206 | |
| 207 | for (const member of data.members) { |
| 208 | yield JSON.stringify({ _type: 'member', ...member }) |
| 209 | } |
| 210 | |
| 211 | for (const msg of data.messages) { |
| 212 | yield JSON.stringify({ _type: 'message', ...msg }) |
| 213 | } |
| 214 | } |
no outgoing calls
no test coverage detected