Parse a transcript file and return formatted log
( groupFolder: string, filename: string, )
| 302 | |
| 303 | /** Parse a transcript file and return formatted log */ |
| 304 | function 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 */ |
| 325 | function getTranscriptEntries( |
no test coverage detected