fix: handle non-thinking models correctly in /thinking command (#129)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
bb10aacb23
commit
135390542a
1 changed files with 6 additions and 5 deletions
|
|
@ -2752,19 +2752,20 @@ export class InteractiveMode {
|
|||
}
|
||||
|
||||
private handleThinkingCommand(arg?: string): void {
|
||||
const availableLevels = this.session.getAvailableThinkingLevels();
|
||||
if (availableLevels.length === 0) {
|
||||
if (!this.session.supportsThinking()) {
|
||||
this.showStatus("Current model does not support thinking");
|
||||
return;
|
||||
}
|
||||
|
||||
const availableLevels = this.session.getAvailableThinkingLevels();
|
||||
|
||||
if (arg) {
|
||||
const level = arg.toLowerCase() as ThinkingLevel;
|
||||
if (!availableLevels.includes(level)) {
|
||||
const level = arg.toLowerCase();
|
||||
if (!availableLevels.includes(level as ThinkingLevel)) {
|
||||
this.showStatus(`Invalid thinking level "${arg}". Available: ${availableLevels.join(", ")}`);
|
||||
return;
|
||||
}
|
||||
this.session.setThinkingLevel(level);
|
||||
this.session.setThinkingLevel(level as ThinkingLevel);
|
||||
this.footer.invalidate();
|
||||
this.updateEditorBorderColor();
|
||||
this.showStatus(`Thinking level: ${level}`);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue