diff --git a/src/vs/vscode.d.ts b/src/vs/vscode.d.ts index 216ad0dcde2..81b5fce5fcd 100644 --- a/src/vs/vscode.d.ts +++ b/src/vs/vscode.d.ts @@ -6640,7 +6640,7 @@ declare module 'vscode' { * be able to handle uris which are directed to the extension itself. A uri must respect * the following rules: * - * - The uri-scheme must be the product name; + * - The uri-scheme must be `vscode.env.uriScheme`; * - The uri-authority must be the extension id (eg. `my.extension`); * - The uri-path, -query and -fragment parts are arbitrary. * diff --git a/src/vs/vscode.proposed.d.ts b/src/vs/vscode.proposed.d.ts index 3919943503b..409a752ec8a 100644 --- a/src/vs/vscode.proposed.d.ts +++ b/src/vs/vscode.proposed.d.ts @@ -623,6 +623,11 @@ declare module 'vscode' { * An [event](#Event) that fires when the log level has changed. */ export const onDidChangeLogLevel: Event; + + /** + * The custom uri scheme the editor registers to in the operating system, like 'vscode', 'vscode-insiders'. + */ + export const uriScheme: string; } //#endregion diff --git a/src/vs/workbench/api/node/extHost.api.impl.ts b/src/vs/workbench/api/node/extHost.api.impl.ts index 67be3ea59bc..163d9dd0ea3 100644 --- a/src/vs/workbench/api/node/extHost.api.impl.ts +++ b/src/vs/workbench/api/node/extHost.api.impl.ts @@ -235,6 +235,7 @@ export function createApiFactory( get language() { return platform.language!; }, get appName() { return product.nameLong; }, get appRoot() { return initData.environment.appRoot!.fsPath; }, + get uriScheme() { return product.urlProtocol; }, get logLevel() { checkProposedApiEnabled(extension); return typeConverters.LogLevel.to(extHostLogService.getLevel());