MCPcopy
hub / github.com/coder/mux / readJsonlFile

Function readJsonlFile

src/node/services/historyService.test.ts:1716–1722  ·  view source on GitHub ↗
(filePath: string)

Source from the content-addressed store, hash-verified

1714 }
1715
1716 async function readJsonlFile(filePath: string): Promise<MuxMessage[]> {
1717 const data = await fs.readFile(filePath, "utf-8");
1718 return data
1719 .split("\n")
1720 .filter((line) => line.trim())
1721 .map((line) => JSON.parse(line) as MuxMessage);
1722 }
1723
1724 function chatPath(workspaceId: string): string {
1725 return path.join(config.getSessionDir(workspaceId), "chat.jsonl");

Callers 1

Calls 2

readFileMethod · 0.65
parseMethod · 0.45

Tested by

no test coverage detected