Something went wrong. Try again.
fork of prime agent with changes i want but are not upstreamable probqbly (and some fixes)
Something went wrong. Try again.
900 B · 29 lines
TypeScript
123456789101112131415161718192021222324252627282930import { describe, expect, it } from "vitest";import type { SessionInfo } from "../src/core/session-manager.js";import { resolveCatalogSessionMatch } from "../src/modes/daemon/daemon-catalog-process.js";
function session(id: string, name: string | undefined, path: string): SessionInfo { return { id, name, path, cwd: "/tmp/project", rlmDepth: 0, created: new Date(0), modified: new Date(0), messageCount: 0, firstMessage: "", allMessagesText: "", };}
describe("daemon catalog selector resolution", () => { it("treats an exact name colliding with another session id prefix as ambiguous", () => { const sessions = [ session("named-session-id", "target", "/tmp/by-name.jsonl"), session("target-prefix-id", "other", "/tmp/by-prefix.jsonl"), ];
expect(() => resolveCatalogSessionMatch(sessions, "target")).toThrow('Ambiguous session selector "target"'); });});