import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle"; import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri"; import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service"; import { IDialogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service"; import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation"; import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service"; import { IURLHandler } from "@codingame/monaco-vscode-api/vscode/vs/platform/url/common/url"; import { IURLService } from "@codingame/monaco-vscode-api/vscode/vs/platform/url/common/url.service"; import { IEditorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service"; import { IHostService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/host/browser/host.service"; import { IWorkbenchContribution } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/contributions"; import { IExtensionsWorkbenchService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/extensions/common/extensions.service"; import { IPluginInstallService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/plugins/pluginInstallService.service"; /** * Handles `vscode://chat-plugin/install?source=[&plugin=]` and * `vscode://chat-plugin/add-marketplace?ref=` URLs. * * The `source` / `ref` query parameter is a base64-encoded `owner/repo` or * git clone URL. When `plugin` is provided on the `/install` route, the handler * targets that specific plugin within the marketplace, installs it, and opens * its details in the editor. Otherwise, a confirmation dialog is shown before * any action. */ export declare class PluginUrlHandler extends Disposable implements IWorkbenchContribution, IURLHandler { private readonly _pluginInstallService; private readonly _dialogService; private readonly _configurationService; private readonly _extensionsWorkbenchService; private readonly _hostService; private readonly _logService; private readonly _editorService; private readonly _instantiationService; static readonly ID = "workbench.contrib.pluginUrlHandler"; constructor(urlService: IURLService, _pluginInstallService: IPluginInstallService, _dialogService: IDialogService, _configurationService: IConfigurationService, _extensionsWorkbenchService: IExtensionsWorkbenchService, _hostService: IHostService, _logService: ILogService, _editorService: IEditorService, _instantiationService: IInstantiationService); handleURL(uri: URI): Promise; private _handleInstall; /** * Handles the case where a specific plugin is targeted within a * marketplace. Delegates trust and discovery to the install service, * then opens the plugin details in a modal editor. */ private _handleInstallTargetedPlugin; private _handleAddMarketplace; /** * Reads a query parameter and attempts to parse it as a marketplace * reference. Tries base64-decoding first, then falls back to the raw * value so that plain-text `owner/repo` values also work in URLs. */ private _decodeQueryParam; /** * Reads a query parameter and decodes it. Tries base64-decoding first, * then falls back to the raw value. */ private _decodeStringParam; private _tryBase64Decode; }