diff --git a/src/vs/vscode.d.ts b/src/vs/vscode.d.ts index d0135a102a180..567eb92bbf982 100644 --- a/src/vs/vscode.d.ts +++ b/src/vs/vscode.d.ts @@ -7622,6 +7622,13 @@ declare module 'vscode' { */ export function createTerminal(options: ExtensionTerminalOptions): Terminal; + /** + * Register a [TerminalLinkHandler](#TerminalLinkHandler) that can be used to intercept and + * handle links that are activated within terminals. + * @param handler The link handler being registered. + */ + export function registerTerminalLinkHandler(handler: TerminalLinkHandler): Disposable; + /** * Register a [TreeDataProvider](#TreeDataProvider) for the view contributed using the extension point `views`. * This will allow you to contribute data to the [TreeView](#TreeView) and update if the data changes. @@ -8182,6 +8189,16 @@ declare module 'vscode' { readonly code: number | undefined; } + export interface TerminalLinkHandler { + /** + * Handles a link that is activated within the terminal. + * + * @return Whether the link was handled, if the link was handled this link will not be + * considered by any other extension or by the default built-in link handler. + */ + handleLink(terminal: Terminal, link: string): ProviderResult; + } + /** * A location in the editor at which progress information can be shown. It depends on the * location how progress is visually represented. diff --git a/src/vs/vscode.proposed.d.ts b/src/vs/vscode.proposed.d.ts index d8e523cb3672f..b0322517e6f95 100644 --- a/src/vs/vscode.proposed.d.ts +++ b/src/vs/vscode.proposed.d.ts @@ -895,28 +895,6 @@ declare module 'vscode' { //#endregion - //#region Terminal link handlers https://github.com/microsoft/vscode/issues/91606 - - export namespace window { - /** - * Register a [TerminalLinkHandler](#TerminalLinkHandler) that can be used to intercept and - * handle links that are activated within terminals. - */ - export function registerTerminalLinkHandler(handler: TerminalLinkHandler): Disposable; - } - - export interface TerminalLinkHandler { - /** - * Handles a link that is activated within the terminal. - * - * @return Whether the link was handled, if the link was handled this link will not be - * considered by any other extension or by the default built-in link handler. - */ - handleLink(terminal: Terminal, link: string): ProviderResult; - } - - //#endregion - //#region Contribute to terminal environment https://github.com/microsoft/vscode/issues/46696 export enum EnvironmentVariableMutatorType { diff --git a/src/vs/workbench/api/common/extHost.api.impl.ts b/src/vs/workbench/api/common/extHost.api.impl.ts index 636ca6d485a4e..aa07e04925f9e 100644 --- a/src/vs/workbench/api/common/extHost.api.impl.ts +++ b/src/vs/workbench/api/common/extHost.api.impl.ts @@ -570,7 +570,6 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I return extHostTerminalService.createTerminal(nameOrOptions, shellPath, shellArgs); }, registerTerminalLinkHandler(handler: vscode.TerminalLinkHandler): vscode.Disposable { - checkProposedApiEnabled(extension); return extHostTerminalService.registerLinkHandler(handler); }, registerTreeDataProvider(viewId: string, treeDataProvider: vscode.TreeDataProvider): vscode.Disposable {