Skip to content

Commit 8716df3

Browse files
Add a "both" option to chat.experimental.defaultMode (microsoft#188525)
This will show the chat in the Activity Bar and the Title Bar. cc @isidorn
1 parent e736efb commit 8716df3

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

src/vs/workbench/contrib/chat/browser/actions/quickQuestionActions/quickQuestionAction.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export class AskQuickQuestionAction extends Action2 {
5353
menu: {
5454
id: MenuId.LayoutControlMenu,
5555
group: '0_workbench_toggles',
56-
when: ContextKeyExpr.equals('config.chat.experimental.defaultMode', 'quickQuestion'),
56+
when: ContextKeyExpr.notEquals('config.chat.experimental.defaultMode', 'chatView'),
5757
order: 0
5858
}
5959
});

src/vs/workbench/contrib/chat/browser/chat.contribution.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,12 @@ configurationRegistry.registerConfiguration({
8181
'chat.experimental.defaultMode': {
8282
type: 'string',
8383
tags: ['experimental'],
84-
enum: ['chatView', 'quickQuestion'],
84+
enum: ['chatView', 'quickQuestion', 'both'],
85+
enumDescriptions: [
86+
nls.localize('interactiveSession.defaultMode.chatView', "Use the chat view as the default mode. Displays the chat icon in the Activity Bar."),
87+
nls.localize('interactiveSession.defaultMode.quickQuestion', "Use the quick question as the default mode. Displays the chat icon in the Title Bar."),
88+
nls.localize('interactiveSession.defaultMode.both', "Displays the chat icon in the Activity Bar and the Title Bar which open their respective chat modes.")
89+
],
8590
description: nls.localize('interactiveSession.defaultMode', "Controls the default mode of the chat experience."),
8691
default: 'chatView'
8792
},

src/vs/workbench/contrib/chat/browser/chatContributionServiceImpl.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ export class ChatContributionService implements IChatContributionService {
127127
ctorDescriptor: new SyncDescriptor(ChatViewPane, [<IChatViewOptions>{ providerId: providerDescriptor.id }]),
128128
when: ContextKeyExpr.and(
129129
ContextKeyExpr.deserialize(providerDescriptor.when),
130-
ContextKeyExpr.equals('config.chat.experimental.defaultMode', 'chatView')
130+
ContextKeyExpr.notEquals('config.chat.experimental.defaultMode', 'quickQuestion')
131131
)
132132
}];
133133
Registry.as<IViewsRegistry>(ViewExtensions.ViewsRegistry).registerViews(viewDescriptor, viewContainer);

0 commit comments

Comments
 (0)