Skip to content

Commit

Permalink
Add a "both" option to chat.experimental.defaultMode (#188525)
Browse files Browse the repository at this point in the history
This will show the chat in the Activity Bar and the Title Bar.

cc @isidorn
  • Loading branch information
TylerLeonhardt authored Jul 21, 2023
1 parent e736efb commit 8716df3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export class AskQuickQuestionAction extends Action2 {
menu: {
id: MenuId.LayoutControlMenu,
group: '0_workbench_toggles',
when: ContextKeyExpr.equals('config.chat.experimental.defaultMode', 'quickQuestion'),
when: ContextKeyExpr.notEquals('config.chat.experimental.defaultMode', 'chatView'),
order: 0
}
});
Expand Down
7 changes: 6 additions & 1 deletion src/vs/workbench/contrib/chat/browser/chat.contribution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,12 @@ configurationRegistry.registerConfiguration({
'chat.experimental.defaultMode': {
type: 'string',
tags: ['experimental'],
enum: ['chatView', 'quickQuestion'],
enum: ['chatView', 'quickQuestion', 'both'],
enumDescriptions: [
nls.localize('interactiveSession.defaultMode.chatView', "Use the chat view as the default mode. Displays the chat icon in the Activity Bar."),
nls.localize('interactiveSession.defaultMode.quickQuestion', "Use the quick question as the default mode. Displays the chat icon in the Title Bar."),
nls.localize('interactiveSession.defaultMode.both', "Displays the chat icon in the Activity Bar and the Title Bar which open their respective chat modes.")
],
description: nls.localize('interactiveSession.defaultMode', "Controls the default mode of the chat experience."),
default: 'chatView'
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ export class ChatContributionService implements IChatContributionService {
ctorDescriptor: new SyncDescriptor(ChatViewPane, [<IChatViewOptions>{ providerId: providerDescriptor.id }]),
when: ContextKeyExpr.and(
ContextKeyExpr.deserialize(providerDescriptor.when),
ContextKeyExpr.equals('config.chat.experimental.defaultMode', 'chatView')
ContextKeyExpr.notEquals('config.chat.experimental.defaultMode', 'quickQuestion')
)
}];
Registry.as<IViewsRegistry>(ViewExtensions.ViewsRegistry).registerViews(viewDescriptor, viewContainer);
Expand Down

0 comments on commit 8716df3

Please sign in to comment.