Skip to content

Commit 3bd8776

Browse files
authored
Merge pull request microsoft#208467 from microsoft/tyriar/208413
Fix copy action being stolen by terminal chat
2 parents fb757ca + abc27ef commit 3bd8776

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

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

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -115,11 +115,7 @@ export class TerminalChatController extends Disposable implements ITerminalContr
115115
}
116116
this._register(this._chatCodeBlockContextProviderService.registerProvider({
117117
getCodeBlockContext: (editor) => {
118-
const chatWidget = this.chatWidget;
119-
if (!chatWidget) {
120-
return;
121-
}
122-
if (!editor) {
118+
if (!editor || !this._chatWidget?.hasValue || !this.hasFocus()) {
123119
return;
124120
}
125121
return {

0 commit comments

Comments
 (0)