feat: add multi-session desktop workspace

This commit is contained in:
2026-08-13 21:34:04 +02:00
parent 12b9b83d51
commit 475f95ba70
56 changed files with 8998 additions and 3805 deletions
+34
View File
@@ -115,6 +115,40 @@ test("requests Pi session statistics for context and token status", async () =>
await adapter.stop();
});
test("forwards native session naming and compaction commands", async () => {
const fixture = createFixture();
const adapter = startPiRpcAdapter({
cwd: "/workspace/home",
sessionDir: "/workspace/sessions",
spawnProcess: fixture.spawn,
});
const named = adapter.send({ type: "set_session_name", name: "Release UI" });
const [nameCommand] = fixture.sent();
assert.equal(nameCommand.type, "set_session_name");
assert.equal(nameCommand.name, "Release UI");
fixture.child.stdout.write(
`${JSON.stringify({ type: "response", id: nameCommand.id, command: "set_session_name", success: true })}\n`,
);
await named;
const compacted = adapter.send({
type: "compact",
customInstructions: "Preserve implementation details",
});
const [, compactCommand] = fixture.sent();
assert.equal(compactCommand.type, "compact");
assert.equal(
compactCommand.customInstructions,
"Preserve implementation details",
);
fixture.child.stdout.write(
`${JSON.stringify({ type: "response", id: compactCommand.id, command: "compact", success: true })}\n`,
);
await compacted;
await adapter.stop();
});
test("forwards extension responses without replacing Pi's request ID", async () => {
const fixture = createFixture();
const events = [];