Skip to content

Commit b84fb5b

Browse files
authored
only allow model/mode setting when not in input mode (microsoft#254927)
1 parent 7693191 commit b84fb5b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/vs/workbench/contrib/chat/browser/chatWidget.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1130,15 +1130,15 @@ export class ChatWidget extends Disposable implements IChatWidget {
11301130
ChatContextKeys.currentlyEditing.bindTo(editedRequest.contextKeyService).set(false);
11311131
}
11321132

1133-
this.inputPart.setChatMode(this.inlineInputPart.currentModeKind);
1134-
const currentModel = this.inlineInputPart.selectedLanguageModel;
1135-
if (currentModel) {
1136-
this.inputPart.switchModel(currentModel.metadata);
1137-
}
1138-
11391133
const isInput = this.configurationService.getValue<string>('chat.editRequests') === 'input';
11401134

11411135
if (!isInput) {
1136+
this.inputPart.setChatMode(this.input.currentModeKind);
1137+
const currentModel = this.input.selectedLanguageModel;
1138+
if (currentModel) {
1139+
this.inputPart.switchModel(currentModel.metadata);
1140+
}
1141+
11421142
this.inputPart?.toggleChatInputOverlay(false);
11431143
try {
11441144
if (editedRequest?.rowContainer && editedRequest.rowContainer.contains(this.inputContainer)) {

0 commit comments

Comments
 (0)