fix (vscode): focus chat input after opening the chat view
Opens the chat view before focusing the input Routes a new webview command to focus the composer Refocuses the input after adding a VS Code selection attachment
This commit is contained in:
@@ -200,6 +200,18 @@ export class ChatViewProvider implements vscode.WebviewViewProvider {
|
||||
}
|
||||
}
|
||||
|
||||
public focusChatInput(): void {
|
||||
if (!this._view) {
|
||||
return;
|
||||
}
|
||||
|
||||
this._view.show(true);
|
||||
void this._view.webview.postMessage({
|
||||
type: 'command',
|
||||
command: 'focusChatInput',
|
||||
});
|
||||
}
|
||||
|
||||
public addContextSelection(selection: { filePath: string; filename: string; text: string }) {
|
||||
if (!this._view) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user