( overrides: Partial<SlashCommandContext> & Pick<SlashCommandContext, "api"> )
| 111 | } |
| 112 | |
| 113 | function createSlashCommandContext( |
| 114 | overrides: Partial<SlashCommandContext> & Pick<SlashCommandContext, "api"> |
| 115 | ): SlashCommandContext { |
| 116 | return { |
| 117 | workspaceId: "test-ws", |
| 118 | variant: "workspace", |
| 119 | projectPath: "/tmp/project", |
| 120 | setPreferredModel: mock(() => undefined), |
| 121 | setVimEnabled: mock((cb: (prev: boolean) => boolean) => cb(false)), |
| 122 | resetInputHeight: mock(() => undefined), |
| 123 | onTruncateHistory: mock(() => Promise.resolve(undefined)), |
| 124 | sendMessageOptions: { |
| 125 | model: "anthropic:claude-sonnet-4-6", |
| 126 | thinkingLevel: "off", |
| 127 | toolPolicy: [], |
| 128 | agentId: "exec", |
| 129 | }, |
| 130 | setInput: mock(() => undefined), |
| 131 | setToast: mock(() => undefined), |
| 132 | setAttachments: mock(() => undefined), |
| 133 | setSendingState: mock(() => undefined), |
| 134 | ...overrides, |
| 135 | }; |
| 136 | } |
| 137 | |
| 138 | function createGoalCommandContext(api: SlashCommandContext["api"]): SlashCommandContext { |
| 139 | return createSlashCommandContext({ |
no test coverage detected