Skip to content

Commit e6d7c3f

Browse files
committed
Fix E2E mock: add model field for spawn ctx.model check
1 parent 2d4d8d0 commit e6d7c3f

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

tests/e2e/test-host.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,16 @@ const mockCtx = {
7070
getContextUsage: () => null,
7171
sessionManager: null,
7272
modelRegistry: null,
73+
// Required by spawn tool which checks ctx.model existence before using it
74+
model: undefined,
7375
isIdle: () => true,
7476
signal: new AbortController().signal,
7577
abort: () => {},
7678
hasPendingMessages: () => false,
7779
shutdown: () => process.exit(0),
7880
compact: () => {},
7981
getSystemPrompt: () => "",
80-
};
82+
} as any; // Type assertion needed: mock intentionally omits some interface fields
8183

8284
// ── REPL loop ────────────────────────────────────────────────────
8385

0 commit comments

Comments
 (0)