diff --git a/extensions/git/src/actionButton.ts b/extensions/git/src/actionButton.ts index 31006d614c3..d801fbba05f 100644 --- a/extensions/git/src/actionButton.ts +++ b/extensions/git/src/actionButton.ts @@ -49,10 +49,10 @@ export class ActionButton { return; } + this.logger.trace(`[ActionButton][setState] ${JSON.stringify(state)}`); + this._state = state; this._onDidChange.fire(); - - this.logger.trace(`[ActionButton][setState] ${JSON.stringify(state)}`); } private disposables: Disposable[] = []; diff --git a/src/vs/workbench/api/browser/mainThreadSCM.ts b/src/vs/workbench/api/browser/mainThreadSCM.ts index a916634b8ce..5b22d1f069f 100644 --- a/src/vs/workbench/api/browser/mainThreadSCM.ts +++ b/src/vs/workbench/api/browser/mainThreadSCM.ts @@ -323,7 +323,7 @@ class MainThreadSCMProvider implements ISCMProvider, QuickDiffProvider { } if (typeof features.actionButton !== 'undefined') { - this._actionButton.set(features.actionButton, undefined); + this._actionButton.set(features.actionButton ?? undefined, undefined); } if (typeof features.count !== 'undefined') { diff --git a/src/vs/workbench/api/common/extHost.protocol.ts b/src/vs/workbench/api/common/extHost.protocol.ts index ae5441d23a7..36e385c3e6e 100644 --- a/src/vs/workbench/api/common/extHost.protocol.ts +++ b/src/vs/workbench/api/common/extHost.protocol.ts @@ -1546,7 +1546,7 @@ export interface SCMProviderFeatures { count?: number; commitTemplate?: string; acceptInputCommand?: languages.Command; - actionButton?: SCMActionButtonDto; + actionButton?: SCMActionButtonDto | null; statusBarCommands?: ICommandDto[]; } diff --git a/src/vs/workbench/api/common/extHostSCM.ts b/src/vs/workbench/api/common/extHostSCM.ts index 85e5cba5394..ae2930c763f 100644 --- a/src/vs/workbench/api/common/extHostSCM.ts +++ b/src/vs/workbench/api/common/extHostSCM.ts @@ -681,7 +681,7 @@ class ExtHostSourceControl implements vscode.SourceControl { enabled: actionButton.enabled } satisfies SCMActionButtonDto : undefined; - this.#proxy.$updateSourceControl(this.handle, { actionButton: actionButtonDto }); + this.#proxy.$updateSourceControl(this.handle, { actionButton: actionButtonDto ?? null }); }