Skip to content

Commit a3a5f7c

Browse files
authored
fix input edits errors (#254904)
1 parent 53a4431 commit a3a5f7c

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

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

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1130,15 +1130,17 @@ 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-
}
1133+
11381134

11391135
const isInput = this.configurationService.getValue<string>('chat.editRequests') === 'input';
11401136

11411137
if (!isInput) {
1138+
this.inputPart.setChatMode(this.inlineInputPart.currentModeKind);
1139+
const currentModel = this.inlineInputPart.selectedLanguageModel;
1140+
if (currentModel) {
1141+
this.inputPart.switchModel(currentModel.metadata);
1142+
}
1143+
11421144
this.inputPart?.toggleChatInputOverlay(false);
11431145
try {
11441146
if (editedRequest?.rowContainer && editedRequest.rowContainer.contains(this.inputContainer)) {

0 commit comments

Comments
 (0)