We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents fb757ca + abc27ef commit 3bd8776Copy full SHA for 3bd8776
src/vs/workbench/contrib/terminalContrib/chat/browser/terminalChatController.ts
@@ -115,11 +115,7 @@ export class TerminalChatController extends Disposable implements ITerminalContr
115
}
116
this._register(this._chatCodeBlockContextProviderService.registerProvider({
117
getCodeBlockContext: (editor) => {
118
- const chatWidget = this.chatWidget;
119
- if (!chatWidget) {
120
- return;
121
- }
122
- if (!editor) {
+ if (!editor || !this._chatWidget?.hasValue || !this.hasFocus()) {
123
return;
124
125
return {
0 commit comments