diff --git a/src/vs/workbench/api/common/extHost.api.impl.ts b/src/vs/workbench/api/common/extHost.api.impl.ts index 3510871cbac..ac65b841b50 100644 --- a/src/vs/workbench/api/common/extHost.api.impl.ts +++ b/src/vs/workbench/api/common/extHost.api.impl.ts @@ -649,7 +649,7 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I return extHostWebviewPanels.createWebviewPanel(extension, viewType, title, showOptions, options); }, createWebviewTextEditorInset(editor: vscode.TextEditor, line: number, height: number, options?: vscode.WebviewOptions): vscode.WebviewEditorInset { - checkProposedApiEnabled(extension); + checkProposedApiEnabled(extension, 'editorInsets'); return extHostEditorInsets.createWebviewEditorInset(editor, line, height, options, extension); }, createTerminal(nameOrOptions?: vscode.TerminalOptions | vscode.ExtensionTerminalOptions | string, shellPath?: string, shellArgs?: string[] | string): vscode.Terminal { diff --git a/src/vs/workbench/services/extensions/common/extensionsApiProposals.ts b/src/vs/workbench/services/extensions/common/extensionsApiProposals.ts index f30e65fd186..7e4703820a1 100644 --- a/src/vs/workbench/services/extensions/common/extensionsApiProposals.ts +++ b/src/vs/workbench/services/extensions/common/extensionsApiProposals.ts @@ -6,6 +6,7 @@ // THIS IS A GENERATED FILE. DO NOT EDIT DIRECTLY. export const allApiProposals = Object.freeze({ + editorInsets: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.editorInsets.d.ts', languageStatus: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.languageStatus.d.ts' }); export type ApiProposalName = keyof typeof allApiProposals; diff --git a/src/vscode-dts/vscode.proposed.d.ts b/src/vscode-dts/vscode.proposed.d.ts index 2ce685c1464..6e5bb2824d0 100644 --- a/src/vscode-dts/vscode.proposed.d.ts +++ b/src/vscode-dts/vscode.proposed.d.ts @@ -267,22 +267,7 @@ declare module 'vscode' { //#endregion - //#region editorInsets: https://github.com/microsoft/vscode/issues/85682 - export interface WebviewEditorInset { - readonly editor: TextEditor; - readonly line: number; - readonly height: number; - readonly webview: Webview; - readonly onDidDispose: Event; - dispose(): void; - } - - export namespace window { - export function createWebviewTextEditorInset(editor: TextEditor, line: number, height: number, options?: WebviewOptions): WebviewEditorInset; - } - - //#endregion //#region fsChunks: https://github.com/microsoft/vscode/issues/84515 diff --git a/src/vscode-dts/vscode.proposed.editorInsets.d.ts b/src/vscode-dts/vscode.proposed.editorInsets.d.ts new file mode 100644 index 00000000000..c13b4208d42 --- /dev/null +++ b/src/vscode-dts/vscode.proposed.editorInsets.d.ts @@ -0,0 +1,22 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +// https://github.com/microsoft/vscode/issues/85682 + +declare module 'vscode' { + + export interface WebviewEditorInset { + readonly editor: TextEditor; + readonly line: number; + readonly height: number; + readonly webview: Webview; + readonly onDidDispose: Event; + dispose(): void; + } + + export namespace window { + export function createWebviewTextEditorInset(editor: TextEditor, line: number, height: number, options?: WebviewOptions): WebviewEditorInset; + } +}