Skip to content

Commit 4166553

Browse files
authored
Merge pull request microsoft#208781 from microsoft/merogge/list-focus
fix focus response/input terminal inline chat actions
2 parents 1591ace + c0c2a8a commit 4166553

File tree

2 files changed

+1
-11
lines changed

2 files changed

+1
-11
lines changed

src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatActions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ registerActiveXtermAction({
9191
return;
9292
}
9393
const contr = TerminalChatController.activeChatWidget || TerminalChatController.get(activeInstance);
94-
contr?.chatWidget?.focusResponse();
94+
contr?.chatWidget?.inlineChatWidget.chatWidget.focusLastMessage();
9595
}
9696
});
9797

src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatWidget.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -158,12 +158,6 @@ export class TerminalChatWidget extends Disposable {
158158
focus(): void {
159159
this._inlineChatWidget.focus();
160160
}
161-
focusResponse(): void {
162-
const responseElement = this._inlineChatWidget.domNode.querySelector(ChatElementSelectors.ResponseEditor) || this._inlineChatWidget.domNode.querySelector(ChatElementSelectors.ResponseMessage);
163-
if (responseElement instanceof HTMLElement) {
164-
responseElement.focus();
165-
}
166-
}
167161
hasFocus(): boolean {
168162
return this._inlineChatWidget.hasFocus();
169163
}
@@ -190,7 +184,3 @@ export class TerminalChatWidget extends Disposable {
190184
}
191185
}
192186

193-
const enum ChatElementSelectors {
194-
ResponseEditor = '.chatMessageContent textarea',
195-
ResponseMessage = '.chatMessageContent',
196-
}

0 commit comments

Comments
 (0)