Skip to content

Commit 129eabd

Browse files
authored
make sure to handle edit input when changing modes (microsoft#252266)
1 parent 0975639 commit 129eabd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,9 @@ class ToggleChatModeAction extends Action2 {
224224
context.chatWidget.input.setChatMode2(switchToMode);
225225

226226
if (chatModeCheck.needToClearSession) {
227+
if (context.chatWidget.viewModel?.editing) {
228+
context.chatWidget.input.dispose();
229+
}
227230
await commandService.executeCommand(ACTION_ID_NEW_CHAT);
228231
}
229232
}

0 commit comments

Comments
 (0)