GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test(server): reproduce Pi project discovery after an incomplete line · pingdotgg/t3code@fd39a2f

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • apps/server/src/project
    • AgentSessionScanner.test.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎apps/server/src/project/AgentSessionScanner.test.ts‎

Copy file name to clipboardExpand all lines: apps/server/src/project/AgentSessionScanner.test.ts
+38Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1419,6 +1419,44 @@ it.layer(NodeServices.layer)("AgentSessionScanner", (it) => {
14191419
}),
14201420
);
14211421

1422+
it.effect("discovers a Pi project from the valid header after an incomplete line", () =>
1423+
Effect.gen(function* () {
1424+
const fileSystem = yield* FileSystem.FileSystem;
1425+
const path = yield* Path.Path;
1426+
const claudeHomePath = yield* makeTempDir("t3code-claude-home-");
1427+
const codexHomePath = yield* makeTempDir("t3code-codex-home-");
1428+
const piAgentDir = yield* makeTempDir("t3code-pi-agent-");
1429+
const projects = yield* makeTempDir("t3code-projects-");
1430+
const workspace = path.join(projects, "session-workspace");
1431+
const otherWorkspace = path.join(projects, "other-workspace");
1432+
yield* fileSystem.makeDirectory(workspace);
1433+
yield* fileSystem.makeDirectory(otherWorkspace);
1434+
const header = { type: "session", version: 3, id: "pi-session" };
1435+
1436+
yield* writeTranscript({
1437+
filePath: path.join(piAgentDir, "sessions", "--workspace--", "pi-session.jsonl"),
1438+
contents: [
1439+
encodeTranscriptRecord({ ...header, cwd: otherWorkspace }).slice(0, -1),
1440+
encodeTranscriptRecord({ ...header, cwd: workspace }),
1441+
encodeTranscriptRecord({
1442+
type: "message",
1443+
id: "prompt",
1444+
parentId: null,
1445+
timestamp: "2026-01-01T00:00:00.000Z",
1446+
message: { role: "user", content: "Review this project" },
1447+
}),
1448+
].join("\n"),
1449+
mtimeMs: Date.parse("2026-01-01T00:00:00.000Z"),
1450+
});
1451+
1452+
const result = yield* runScan({ claudeHomePath, codexHomePath, piAgentDir });
1453+
1454+
expect(
1455+
result.candidates.map((candidate) => path.relative(projects, candidate.path)),
1456+
).toEqual(["session-workspace"]);
1457+
}),
1458+
);
1459+
14221460
it.effect("reads a complete transcript record at the exact chunk boundary", () =>
14231461
Effect.gen(function* () {
14241462
const path = yield* Path.Path;

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.