MCPcopy
hub / github.com/coder/mux / collectFullHistory

Function collectFullHistory

src/node/services/historyService.test.ts:12–19  ·  view source on GitHub ↗

Collect all messages via iterateFullHistory (replaces removed getFullHistory).

(service: HistoryService, workspaceId: string)

Source from the content-addressed store, hash-verified

10
11/** Collect all messages via iterateFullHistory (replaces removed getFullHistory). */
12async function collectFullHistory(service: HistoryService, workspaceId: string) {
13 const messages: MuxMessage[] = [];
14 const result = await service.iterateFullHistory(workspaceId, "forward", (chunk) => {
15 messages.push(...chunk);
16 });
17 assert(result.success, `collectFullHistory failed: ${result.success ? "" : result.error}`);
18 return messages;
19}
20
21async function writeHistoryLines(
22 config: Config,

Callers 1

Calls 3

iterateFullHistoryMethod · 0.80
pushMethod · 0.65
assertFunction · 0.50

Tested by

no test coverage detected