MCPcopy Create free account
hub / github.com/ChatLab/ChatLab / streamMessages

Function streamMessages

packages/node-runtime/src/merger/temp-db.ts:274–287  ·  view source on GitHub ↗
(batchSize: number, callback: (messages: MergerMessage[]) => void)

Source from the content-addressed store, hash-verified

272 return reader.getMessageCount()
273 },
274 streamMessages(batchSize: number, callback: (messages: MergerMessage[]) => void): void {
275 reader.streamMessages(batchSize, (messages) => {
276 callback(
277 messages.map((msg) => ({
278 senderPlatformId: msg.senderPlatformId,
279 senderAccountName: msg.senderAccountName,
280 senderGroupNickname: msg.senderGroupNickname,
281 timestamp: msg.timestamp,
282 type: msg.type,
283 content: msg.content,
284 }))
285 )
286 })
287 },
288 }
289}
290

Callers

nothing calls this directly

Calls 1

streamMessagesMethod · 0.65

Tested by

no test coverage detected