MCPcopy Create free account
hub / github.com/DingyangLyu/MatClaw / getTranscriptLog

Function getTranscriptLog

src/web/server.ts:304–322  ·  view source on GitHub ↗

Parse a transcript file and return formatted log

(
  groupFolder: string,
  filename: string,
)

Source from the content-addressed store, hash-verified

302
303/** Parse a transcript file and return formatted log */
304function getTranscriptLog(
305 groupFolder: string,
306 filename: string,
307): string | null {
308 if (filename.includes('..') || groupFolder.includes('..')) return null;
309 const filePath = path.join(
310 DATA_DIR,
311 'sessions',
312 groupFolder,
313 '.claude',
314 'projects',
315 '-workspace-group',
316 filename,
317 );
318 if (!fs.existsSync(filePath)) return null;
319 const content = fs.readFileSync(filePath, 'utf-8');
320 const entries = parseTranscript(content);
321 return formatLogEntries(entries);
322}
323
324/** Parse a transcript file and return structured JSON entries */
325function getTranscriptEntries(

Callers 1

startDashboardFunction · 0.85

Calls 2

formatLogEntriesFunction · 0.85
parseTranscriptFunction · 0.70

Tested by

no test coverage detected