mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 19:21:50 +00:00
focus cody chat on startup when launching debug task from vscode (#50685)
Just applies in dev mode. This means you can hit F5 and then wait a few seconds and the Cody panel will be focused in the extension host VS Code instance.
This commit is contained in:
parent
476ca9e63d
commit
4af7dcd384
3
.vscode/launch.json
vendored
3
.vscode/launch.json
vendored
@ -21,7 +21,8 @@
|
||||
"sourceMaps": true,
|
||||
"outFiles": ["${workspaceRoot}/client/cody/dist/*.js"],
|
||||
"env": {
|
||||
"NODE_ENV": "development"
|
||||
"NODE_ENV": "development",
|
||||
"CODY_FOCUS_ON_STARTUP": "1"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@ -10,6 +10,12 @@ export function activate(context: vscode.ExtensionContext): Promise<ExtensionApi
|
||||
|
||||
PromptMixin.add(languagePromptMixin(vscode.env.language))
|
||||
|
||||
if (process.env.CODY_FOCUS_ON_STARTUP) {
|
||||
setTimeout(() => {
|
||||
void vscode.commands.executeCommand('cody.chat.focus')
|
||||
}, 250)
|
||||
}
|
||||
|
||||
// Register commands and webview
|
||||
return CommandsProvider(context)
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user