diff --git a/src/vs/vscode.proposed.d.ts b/src/vs/vscode.proposed.d.ts index 28465f58328..0eae941dfad 100644 --- a/src/vs/vscode.proposed.d.ts +++ b/src/vs/vscode.proposed.d.ts @@ -727,11 +727,6 @@ declare module 'vscode' { */ export interface SourceControlInputBox { - /** - * Sets focus to the input. - */ - focus(): void; - /** * Shows a transient contextual message on the input. */ @@ -2921,4 +2916,16 @@ declare module 'vscode' { export function registerPortAttributesProvider(portSelector: { pid?: number, portRange?: [number, number], commandMatcher?: RegExp }, provider: PortAttributesProvider): Disposable; } //#endregion + + // region https://github.com/microsoft/vscode/issues/119904 @eamodio + + export interface SourceControlInputBox { + + /** + * Sets focus to the input. + */ + focus(): void; + } + + //#endregion } diff --git a/src/vs/workbench/api/common/extHostSCM.ts b/src/vs/workbench/api/common/extHostSCM.ts index 2faa67c51f8..41aa464d8d7 100644 --- a/src/vs/workbench/api/common/extHostSCM.ts +++ b/src/vs/workbench/api/common/extHostSCM.ts @@ -260,6 +260,8 @@ export class ExtHostSCMInputBox implements vscode.SourceControlInputBox { } focus(): void { + checkProposedApiEnabled(this._extension); + if (!this._visible) { this.visible = true; } @@ -268,6 +270,8 @@ export class ExtHostSCMInputBox implements vscode.SourceControlInputBox { } showValidationMessage(message: string, type: vscode.SourceControlInputBoxValidationType) { + checkProposedApiEnabled(this._extension); + this._proxy.$showValidationMessage(this._sourceControlHandle, message, type as any); }