(host: SlashCommandHost, args: string)
| 228 | } |
| 229 | |
| 230 | export async function handleEffortCommand(host: SlashCommandHost, args: string): Promise<void> { |
| 231 | const alias = host.state.appState.model; |
| 232 | const model = host.state.appState.availableModels[alias]; |
| 233 | if (model === undefined) { |
| 234 | host.showError('No model selected. Run /model to select one first.'); |
| 235 | return; |
| 236 | } |
| 237 | const effective = effectiveModelAlias(model); |
| 238 | const segments = segmentsFor(effective); |
| 239 | const arg = args.trim().toLowerCase(); |
| 240 | if (arg.length === 0) { |
| 241 | showEffortPicker(host, effective, segments); |
| 242 | return; |
| 243 | } |
| 244 | if (!segments.includes(arg)) { |
| 245 | host.showError( |
| 246 | `Unsupported thinking effort "${arg}" for ${alias}. Available: ${segments.join(', ')}`, |
| 247 | ); |
| 248 | return; |
| 249 | } |
| 250 | await performModelSwitch(host, alias, arg, true); |
| 251 | } |
| 252 | |
| 253 | function showEffortPicker( |
| 254 | host: SlashCommandHost, |
no test coverage detected