diff --git a/packages/ai/test/github-copilot-anthropic-auth.test.ts b/packages/ai/test/github-copilot-anthropic-auth.test.ts index 880436951..ecbd2ea44 100644 --- a/packages/ai/test/github-copilot-anthropic-auth.test.ts +++ b/packages/ai/test/github-copilot-anthropic-auth.test.ts @@ -1,6 +1,6 @@ import { afterEach, describe, expect, it, vi } from "bun:test"; import { buildAnthropicClientOptions, streamAnthropic } from "../src/providers/anthropic"; -import type { Model } from "../src/types"; +import type { Context, Model } from "../src/types"; const originalFetch = global.fetch; @@ -32,9 +32,9 @@ function makeCopilotClaudeModel(): Model<"anthropic-messages"> { }; } -const testContext = { +const testContext: Context = { messages: [{ role: "user", content: "hello", timestamp: Date.now() }], -} as const; +}; function getRequestHeader( input: string | URL | Request, diff --git a/packages/coding-agent/test/agent-session-auto-compaction-x-initiator.test.ts b/packages/coding-agent/test/agent-session-auto-compaction-x-initiator.test.ts index fbb8bd4dc..61fbb28a4 100644 --- a/packages/coding-agent/test/agent-session-auto-compaction-x-initiator.test.ts +++ b/packages/coding-agent/test/agent-session-auto-compaction-x-initiator.test.ts @@ -1,6 +1,7 @@ import { afterEach, beforeEach, describe, expect, it, mock, vi } from "bun:test"; import * as path from "node:path"; import { TempDir } from "@oh-my-pi/pi-utils"; +import type { AgentSession } from "../src/session/agent-session"; const compactMock = vi.fn(); @@ -133,10 +134,7 @@ describe("AgentSession compaction Copilot initiator attribution", async () => { } async function triggerAutoCompaction( - session: { - agent: { emitExternalEvent: (event: unknown) => void }; - subscribe: (listener: (event: { type: string }) => void) => () => void; - }, + session: Pick, model: { api: string; provider: string; id: string; contextWindow: number }, ) { const { promise, resolve } = Promise.withResolvers();