mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 17:19:48 +01:00
Make it easier to understand that workbench.secondarySideBar.defaultVisibility shows chat (in most cases) (fix #253706) (#253820)
This commit is contained in:
@@ -1113,3 +1113,30 @@ MenuRegistry.appendMenuItem(MenuId.TerminalInstanceContext, {
|
||||
title,
|
||||
when: menuContext
|
||||
});
|
||||
|
||||
// --- Chat Default Visibility
|
||||
|
||||
registerAction2(class ToggleDefaultVisibilityAction extends Action2 {
|
||||
constructor() {
|
||||
super({
|
||||
id: 'workbench.action.chat.toggleDefaultVisibility',
|
||||
title: localize2('chat.toggleDefaultVisibility.label', "Show View by Default"),
|
||||
precondition: ChatContextKeys.panelLocation.isEqualTo(ViewContainerLocation.AuxiliaryBar),
|
||||
toggled: ContextKeyExpr.equals('config.workbench.secondarySideBar.defaultVisibility', 'hidden').negate(),
|
||||
f1: false,
|
||||
menu: {
|
||||
id: MenuId.ViewTitle,
|
||||
when: ContextKeyExpr.equals('view', ChatViewId),
|
||||
order: 0,
|
||||
group: '5_configure'
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
async run(accessor: ServicesAccessor) {
|
||||
const configurationService = accessor.get(IConfigurationService);
|
||||
|
||||
const currentValue = configurationService.getValue<'hidden' | 'visibleInWorkspace' | 'visible'>('workbench.secondarySideBar.defaultVisibility');
|
||||
configurationService.updateValue('workbench.secondarySideBar.defaultVisibility', currentValue !== 'hidden' ? 'hidden' : 'visible');
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user