From 2d131d25d1837292156853ebb1de4b8979e7a3e7 Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Wed, 31 May 2023 11:28:42 +0200 Subject: [PATCH] fix https://github.com/microsoft/vscode/issues/183770 (#183914) --- src/vs/workbench/api/browser/mainThreadStatusBar.ts | 2 +- src/vs/workbench/api/browser/statusBarExtensionPoint.ts | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/api/browser/mainThreadStatusBar.ts b/src/vs/workbench/api/browser/mainThreadStatusBar.ts index faf4ca55bf8..99dc94c8f14 100644 --- a/src/vs/workbench/api/browser/mainThreadStatusBar.ts +++ b/src/vs/workbench/api/browser/mainThreadStatusBar.ts @@ -43,7 +43,7 @@ export class MainThreadStatusBar implements MainThreadStatusBarShape { entryId, name: item.entry.name, text: item.entry.text, - command: typeof item.entry.command === 'string' ? item.entry.command : undefined, + command: typeof item.entry.command === 'string' ? item.entry.command : typeof item.entry.command === 'object' ? item.entry.command.id : undefined, priority: item.priority, alignLeft: item.alignment === StatusbarAlignment.LEFT }; diff --git a/src/vs/workbench/api/browser/statusBarExtensionPoint.ts b/src/vs/workbench/api/browser/statusBarExtensionPoint.ts index 48f91f7ffbe..55e5013c812 100644 --- a/src/vs/workbench/api/browser/statusBarExtensionPoint.ts +++ b/src/vs/workbench/api/browser/statusBarExtensionPoint.ts @@ -242,7 +242,9 @@ export class StatusBarItemsExtensionPoint { ExtensionIdentifier.toKey(entry.description.identifier), candidate.name ?? entry.description.displayName ?? entry.description.name, candidate.text, - undefined, undefined, undefined, undefined, + undefined, + candidate.command ? { id: candidate.command, title: candidate.name } : undefined, + undefined, undefined, candidate.alignment === 'left', candidate.priority, undefined