MCPcopy
hub / github.com/OpenCoworkAI/open-codesign / listSessionChatMessages

Function listSessionChatMessages

apps/desktop/src/main/session-chat.ts:308–317  ·  view source on GitHub ↗
(
  opts: SessionChatStoreOptions,
  designId: string,
)

Source from the content-addressed store, hash-verified

306}
307
308export function listSessionChatMessages(
309 opts: SessionChatStoreOptions,
310 designId: string,
311): ChatMessageRow[] {
312 const cwd = resolveSessionCwd(opts, designId);
313 const file = sessionFileForDesign(opts.sessionDir, designId);
314 if (!existsSync(file)) return [];
315 const manager = SessionManager.open(file, opts.sessionDir, cwd);
316 return replayEntries(designId, manager.getEntries());
317}
318
319function replayCommentEvents(designId: string, entries: unknown[]): CommentRow[] {
320 const rows = new Map<string, CommentRow>();

Callers 6

registerSnapshotsIpcFunction · 0.90
chatRowsForDesignFunction · 0.90
appendSessionChatMessageFunction · 0.85
appendSessionToolStatusFunction · 0.85

Calls 3

resolveSessionCwdFunction · 0.85
sessionFileForDesignFunction · 0.85
replayEntriesFunction · 0.85

Tested by

no test coverage detected