MCPcopy Create free account
hub / github.com/YunYouJun/advjs / parseChatLog

Function parseChatLog

apps/studio/src/utils/sourceParser.ts:179–213  ·  view source on GitHub ↗

* Accepts either: * - JSON: `[{ speaker, content, timestamp? }, ...]` * - Plain transcript: `Alice: Hello\nBob: Hi` (one message per line) * - WeChat-export style: `[2024-01-01 12:00:00] Alice\nHello`

(
  raw: string,
  chunkOpts: { targetTokens: number, overlapTokens: number },
  filename?: string,
)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

parseSourceFunction · 0.85

Calls 4

chunkByHeadingsFunction · 0.90
tryParseJsonChatFunction · 0.85
parsePlainChatFunction · 0.85
deriveTitleFromFilenameFunction · 0.85

Tested by

no test coverage detected