Skip to content

Commit ae556e5

Browse files
committed
fix(test): type overflow resolver mock
1 parent 6bfd47a commit ae556e5

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

src/agents/embedded-agent-runner/run.overflow-compaction.harness.ts

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,20 @@ type MockCompactionResult =
5050
result?: undefined;
5151
};
5252

53+
type MockResolvedModel = {
54+
model: {
55+
id: string;
56+
provider: string;
57+
contextWindow: number;
58+
api: string;
59+
reasoning?: boolean;
60+
};
61+
error: null;
62+
authStorage: Record<string, unknown>;
63+
modelRegistry: Record<string, unknown>;
64+
};
65+
type MockResolveModelAsync = (..._args: unknown[]) => Promise<MockResolvedModel>;
66+
5367
export const mockedGlobalHookRunner = {
5468
hasHooks: vi.fn((_hookName: string) => false),
5569
runBeforeAgentReply: vi.fn(
@@ -102,7 +116,7 @@ export const mockedResolveContextEngineOwnerPluginId = vi.fn(() => undefined);
102116
export const mockedBuildAgentRuntimePlan = vi.fn(() => ({}));
103117
export const mockedRunPostCompactionSideEffects = vi.fn(async () => {});
104118
export const mockedEnsureRuntimePluginsLoaded = vi.fn<(params?: unknown) => void>();
105-
export const mockedResolveModelAsync = vi.fn(async () => ({
119+
export const mockedResolveModelAsync = vi.fn<MockResolveModelAsync>(async () => ({
106120
model: {
107121
id: "test-model",
108122
provider: "anthropic",

0 commit comments

Comments
 (0)