Skip to content

Commit 60544f4

Browse files
authored
chat - ensure to hide actions when Copilot is hidden (microsoft#253195)
1 parent eac78df commit 60544f4

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/vs/workbench/contrib/chat/browser/actions/chatContextActions.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ class AttachFileToChatAction extends AttachResourceAction {
114114
id: AttachFileToChatAction.ID,
115115
title: localize2('workbench.action.chat.attachFile.label', "Add File to Chat"),
116116
category: CHAT_CATEGORY,
117+
precondition: ChatContextKeys.enabled,
117118
f1: true,
118119
menu: [{
119120
id: MenuId.SearchContext,
@@ -224,6 +225,7 @@ class AttachSelectionToChatAction extends Action2 {
224225
title: localize2('workbench.action.chat.attachSelection.label', "Add Selection to Chat"),
225226
category: CHAT_CATEGORY,
226227
f1: true,
228+
precondition: ChatContextKeys.enabled,
227229
menu: {
228230
id: MenuId.ChatTextEditorMenu,
229231
group: 'zContext',

src/vs/workbench/contrib/chat/browser/actions/chatLanguageModelActions.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import { IExtensionsWorkbenchService } from '../../../extensions/common/extensio
1717
import { IProductService } from '../../../../../platform/product/common/productService.js';
1818
import { Codicon } from '../../../../../base/common/codicons.js';
1919
import { ThemeIcon } from '../../../../../base/common/themables.js';
20+
import { ChatContextKeys } from '../../common/chatContextKeys.js';
2021

2122
class ManageLanguageModelAuthenticationAction extends Action2 {
2223
static readonly ID = 'workbench.action.chat.manageLanguageModelAuthentication';
@@ -26,6 +27,7 @@ class ManageLanguageModelAuthenticationAction extends Action2 {
2627
id: ManageLanguageModelAuthenticationAction.ID,
2728
title: localize2('manageLanguageModelAuthentication', 'Manage Language Model Access...'),
2829
category: CHAT_CATEGORY,
30+
precondition: ChatContextKeys.enabled,
2931
menu: [{
3032
id: MenuId.AccountsContext,
3133
order: 100,

0 commit comments

Comments
 (0)