diff --git a/src/vs/platform/extensions/common/extensionsApiProposals.ts b/src/vs/platform/extensions/common/extensionsApiProposals.ts index 9a6636005b3d7..bd35500287e25 100644 --- a/src/vs/platform/extensions/common/extensionsApiProposals.ts +++ b/src/vs/platform/extensions/common/extensionsApiProposals.ts @@ -319,9 +319,6 @@ const _allApiProposals = { shareProvider: { proposal: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.shareProvider.d.ts', }, - showLocal: { - proposal: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.showLocal.d.ts', - }, speech: { proposal: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.speech.d.ts', }, diff --git a/src/vs/workbench/api/browser/mainThreadDialogs.ts b/src/vs/workbench/api/browser/mainThreadDialogs.ts index 4ab41cf26636e..50f3a61b94d78 100644 --- a/src/vs/workbench/api/browser/mainThreadDialogs.ts +++ b/src/vs/workbench/api/browser/mainThreadDialogs.ts @@ -7,7 +7,6 @@ import { URI } from '../../../base/common/uri.js'; import { MainThreadDiaglogsShape, MainContext, MainThreadDialogOpenOptions, MainThreadDialogSaveOptions } from '../common/extHost.protocol.js'; import { extHostNamedCustomer, IExtHostContext } from '../../services/extensions/common/extHostCustomers.js'; import { IFileDialogService, IOpenDialogOptions, ISaveDialogOptions } from '../../../platform/dialogs/common/dialogs.js'; -import { Schemas } from '../../../base/common/network.js'; @extHostNamedCustomer(MainContext.MainThreadDialogs) export class MainThreadDialogs implements MainThreadDiaglogsShape { @@ -47,7 +46,7 @@ export class MainThreadDialogs implements MainThreadDiaglogsShape { canSelectMany: options?.canSelectMany, defaultUri: options?.defaultUri ? URI.revive(options.defaultUri) : undefined, title: options?.title || undefined, - availableFileSystems: options?.allowUIResources ? [Schemas.vscodeRemote, Schemas.file] : [] + availableFileSystems: [] }; if (options?.filters) { result.filters = []; diff --git a/src/vs/workbench/api/common/extHost.api.impl.ts b/src/vs/workbench/api/common/extHost.api.impl.ts index 6e68860da3f89..85ff1aa52b2c3 100644 --- a/src/vs/workbench/api/common/extHost.api.impl.ts +++ b/src/vs/workbench/api/common/extHost.api.impl.ts @@ -781,7 +781,7 @@ export function createApiFactoryAndRegisterActors(accessor: ServicesAccessor): I return extHostQuickOpen.showInput(options, token); }, showOpenDialog(options) { - return extHostDialogs.showOpenDialog(extension, options); + return extHostDialogs.showOpenDialog(options); }, showSaveDialog(options) { return extHostDialogs.showSaveDialog(options); diff --git a/src/vs/workbench/api/common/extHostDialogs.ts b/src/vs/workbench/api/common/extHostDialogs.ts index 8e98769e19cc4..05b3777694345 100644 --- a/src/vs/workbench/api/common/extHostDialogs.ts +++ b/src/vs/workbench/api/common/extHostDialogs.ts @@ -6,8 +6,6 @@ import type * as vscode from 'vscode'; import { URI } from '../../../base/common/uri.js'; import { MainContext, MainThreadDiaglogsShape, IMainContext } from './extHost.protocol.js'; -import { checkProposedApiEnabled } from '../../services/extensions/common/extensions.js'; -import { IExtensionDescription } from '../../../platform/extensions/common/extensions.js'; export class ExtHostDialogs { @@ -17,10 +15,7 @@ export class ExtHostDialogs { this._proxy = mainContext.getProxy(MainContext.MainThreadDialogs); } - showOpenDialog(extension: IExtensionDescription, options?: vscode.OpenDialogOptions): Promise { - if (options?.allowUIResources) { - checkProposedApiEnabled(extension, 'showLocal'); - } + showOpenDialog(options?: vscode.OpenDialogOptions): Promise { return this._proxy.$showOpenDialog(options).then(filepaths => { return filepaths ? filepaths.map(p => URI.revive(p)) : undefined; }); diff --git a/src/vscode-dts/vscode.proposed.showLocal.d.ts b/src/vscode-dts/vscode.proposed.showLocal.d.ts deleted file mode 100644 index 9a9294f596bbc..0000000000000 --- a/src/vscode-dts/vscode.proposed.showLocal.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * 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/131138 - -declare module 'vscode' { - - export interface OpenDialogOptions { - /** - * Controls whether the dialog allows users to select local files via the "Show Local" button. - * Extensions that set this to `true` should check the scheme of the selected file. - * Resources with the `file` scheme come from the same extension host as the extension. - * Resources with the `vscode-local` scheme come from an extension host running in the same place as the UI. - */ - allowUIResources?: boolean; - } -}