feat: integrate Pi backend and Pi Web

This commit is contained in:
luckyyzh
2026-07-30 19:37:53 +08:00
commit 7392ab9dd7
1390 changed files with 337197 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
import assert from "node:assert/strict";
import test from "node:test";
async function loadSubject() {
return import("./session-path.ts");
}
test("normalizes Windows separators and casing for session identity", async () => {
const { sessionPathKey } = await loadSubject();
assert.equal(
sessionPathKey("C:\\Users\\Alex\\.pi\\sessions\\Parent.jsonl", "win32"),
sessionPathKey("c:/Users/Alex/.pi/sessions/parent.jsonl", "win32"),
);
});
test("preserves case when session paths are case-sensitive", async () => {
const { sessionPathKey } = await loadSubject();
assert.notEqual(
sessionPathKey("/var/lib/pi/Parent.jsonl", "linux"),
sessionPathKey("/var/lib/pi/parent.jsonl", "linux"),
);
});