MCPcopy Create free account
hub / github.com/garrytan/gstack / readLog

Function readLog

test/gstack-question-log.test.ts:37–47  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

35}
36
37function readLog(): string[] {
38 const projects = fs.readdirSync(path.join(tmpHome, 'projects'));
39 if (projects.length === 0) return [];
40 const logPath = path.join(tmpHome, 'projects', projects[0], 'question-log.jsonl');
41 if (!fs.existsSync(logPath)) return [];
42 return fs
43 .readFileSync(logPath, 'utf-8')
44 .trim()
45 .split('\n')
46 .filter((l) => l.length > 0);
47}
48
49describe('gstack-question-log — valid payloads', () => {
50 test('minimal payload writes log entry with auto ts', () => {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected