MCPcopy Index your code
hub / github.com/simstudioai/sim / processStreamingBlockLogs

Function processStreamingBlockLogs

apps/sim/lib/tokenization/streaming.ts:129–149  ·  view source on GitHub ↗
(
  logs: BlockLog[],
  streamedContentMap: Map<string, string>
)

Source from the content-addressed store, hash-verified

127 * Processes multiple block logs for streaming tokenization
128 */
129export 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}

Callers 2

startFunction · 0.90
startFunction · 0.90

Calls 3

processStreamingBlockLogFunction · 0.85
infoMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected