mirror of
https://github.com/Microsoft/vscode
synced 2024-09-13 21:55:38 +00:00
Merge pull request #208781 from microsoft/merogge/list-focus
fix focus response/input terminal inline chat actions
This commit is contained in:
commit
4166553e05
|
@ -91,7 +91,7 @@ registerActiveXtermAction({
|
|||
return;
|
||||
}
|
||||
const contr = TerminalChatController.activeChatWidget || TerminalChatController.get(activeInstance);
|
||||
contr?.chatWidget?.focusResponse();
|
||||
contr?.chatWidget?.inlineChatWidget.chatWidget.focusLastMessage();
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -158,12 +158,6 @@ export class TerminalChatWidget extends Disposable {
|
|||
focus(): void {
|
||||
this._inlineChatWidget.focus();
|
||||
}
|
||||
focusResponse(): void {
|
||||
const responseElement = this._inlineChatWidget.domNode.querySelector(ChatElementSelectors.ResponseEditor) || this._inlineChatWidget.domNode.querySelector(ChatElementSelectors.ResponseMessage);
|
||||
if (responseElement instanceof HTMLElement) {
|
||||
responseElement.focus();
|
||||
}
|
||||
}
|
||||
hasFocus(): boolean {
|
||||
return this._inlineChatWidget.hasFocus();
|
||||
}
|
||||
|
@ -190,7 +184,3 @@ export class TerminalChatWidget extends Disposable {
|
|||
}
|
||||
}
|
||||
|
||||
const enum ChatElementSelectors {
|
||||
ResponseEditor = '.chatMessageContent textarea',
|
||||
ResponseMessage = '.chatMessageContent',
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue