fix: add copilot tests and lint fixes

This commit is contained in:
Peter Steinberger
2026-01-12 17:48:08 +00:00
parent 14801b46fc
commit e91aa0657e
9 changed files with 214 additions and 36 deletions

View File

@@ -1,7 +1,7 @@
import { describe, expect, it } from "vitest";
import type { AgentMessage } from "@mariozechner/pi-agent-core";
import { SessionManager } from "@mariozechner/pi-coding-agent";
import type { AgentMessage } from "@mariozechner/pi-agent-core";
import { describe, expect, it } from "vitest";
import { installSessionToolResultGuard } from "./session-tool-result-guard.js";
@@ -110,9 +110,7 @@ describe("installSessionToolResultGuard", () => {
"toolResult", // synthetic for call_b
"assistant", // text
]);
expect(
(messages[2] as { toolCallId?: string }).toolCallId,
).toBe("call_b");
expect((messages[2] as { toolCallId?: string }).toolCallId).toBe("call_b");
expect(guard.getPendingIds()).toEqual([]);
});