( host: SlashCommandHost, alias: string, effort: ThinkingEffort, )
| 466 | } |
| 467 | |
| 468 | async function persistModelSelection( |
| 469 | host: SlashCommandHost, |
| 470 | alias: string, |
| 471 | effort: ThinkingEffort, |
| 472 | ): Promise<boolean> { |
| 473 | const config = await host.harness.getConfig({ reload: true }); |
| 474 | const patch = thinkingEffortToConfig(effort); |
| 475 | if ( |
| 476 | config.defaultModel === alias && |
| 477 | config.thinking?.enabled === patch.enabled && |
| 478 | config.thinking?.effort === patch.effort |
| 479 | ) { |
| 480 | return false; |
| 481 | } |
| 482 | await host.harness.setConfig({ |
| 483 | defaultModel: alias, |
| 484 | thinking: patch, |
| 485 | }); |
| 486 | return true; |
| 487 | } |
| 488 | |
| 489 | function showThemePicker(host: SlashCommandHost): void { |
| 490 | host.mountEditorReplacement( |
no test coverage detected