MCPcopy Create free account
hub / github.com/getagentseal/codeburn / parseClaudeEntries

Function parseClaudeEntries

src/parser.ts:1883–1899  ·  view source on GitHub ↗
(
  filePath: string,
  tracker: { lastCompleteLineOffset: number },
)

Source from the content-addressed store, hash-verified

1881// ── Cache-Aware Parsing Helpers ────────────────────────────────────────
1882
1883async function parseClaudeEntries(
1884 filePath: string,
1885 tracker: { lastCompleteLineOffset: number },
1886): Promise<JournalEntry[] | null> {
1887 const entries: JournalEntry[] = []
1888 let hasLines = false
1889 for await (const line of readSessionLines(filePath, undefined, {
1890 largeLineAsBuffer: true,
1891 byteOffsetTracker: tracker,
1892 })) {
1893 hasLines = true
1894 const entry = parseJsonlLine(line)
1895 if (entry) entries.push(compactEntry(entry))
1896 }
1897 if (!hasLines || entries.length === 0) return null
1898 return entries
1899}
1900
1901function getOrCreateProviderSection(cache: SessionCache, provider: string): ProviderSection {
1902 const envFp = computeEnvFingerprint(provider)

Callers 1

scanProjectDirsFunction · 0.85

Calls 3

readSessionLinesFunction · 0.85
parseJsonlLineFunction · 0.85
compactEntryFunction · 0.85

Tested by

no test coverage detected