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

Method serializeHistoryEntries

src/node/services/historyService.ts:1486–1488  ·  view source on GitHub ↗

Serialize messages as JSONL rows tagged with workspace context.

(messages: readonly MuxMessage[], workspaceId: string)

Source from the content-addressed store, hash-verified

1484
1485 /** Serialize messages as JSONL rows tagged with workspace context. */
1486 private serializeHistoryEntries(messages: readonly MuxMessage[], workspaceId: string): string {
1487 return messages.map((msg) => JSON.stringify({ ...msg, workspaceId }) + "\n").join("");
1488 }
1489
1490 /**
1491 * Best-effort rotation after a durable boundary lands via append/update.

Callers 6

updateHistoryMethod · 0.95
deleteMessageMethod · 0.95
truncateAfterMessageMethod · 0.95
truncateHistoryMethod · 0.95
migrateWorkspaceIdMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected