( logs: BlockLog[], streamedContentMap: Map<string, string> )
| 127 | * Processes multiple block logs for streaming tokenization |
| 128 | */ |
| 129 | export function processStreamingBlockLogs( |
| 130 | logs: BlockLog[], |
| 131 | streamedContentMap: Map<string, string> |
| 132 | ): number { |
| 133 | let processedCount = 0 |
| 134 | |
| 135 | for (const log of logs) { |
| 136 | const content = streamedContentMap.get(log.blockId) |
| 137 | if (content && processStreamingBlockLog(log, content)) { |
| 138 | processedCount++ |
| 139 | } |
| 140 | } |
| 141 | |
| 142 | logger.info(`Streaming tokenization summary`, { |
| 143 | totalLogs: logs.length, |
| 144 | processedBlocks: processedCount, |
| 145 | streamedBlocks: streamedContentMap.size, |
| 146 | }) |
| 147 | |
| 148 | return processedCount |
| 149 | } |
no test coverage detected