Skip to content

Commit

Permalink
Remove unused showLocal proposal (#236032)
Browse files Browse the repository at this point in the history
* Remove unused showLocal proposal

* No local build error??
  • Loading branch information
alexr00 authored Dec 15, 2024
1 parent 4325b8c commit ce50bd4
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 31 deletions.
3 changes: 0 additions & 3 deletions src/vs/platform/extensions/common/extensionsApiProposals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
},
Expand Down
3 changes: 1 addition & 2 deletions src/vs/workbench/api/browser/mainThreadDialogs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 = [];
Expand Down
2 changes: 1 addition & 1 deletion src/vs/workbench/api/common/extHost.api.impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
7 changes: 1 addition & 6 deletions src/vs/workbench/api/common/extHostDialogs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand All @@ -17,10 +15,7 @@ export class ExtHostDialogs {
this._proxy = mainContext.getProxy(MainContext.MainThreadDialogs);
}

showOpenDialog(extension: IExtensionDescription, options?: vscode.OpenDialogOptions): Promise<URI[] | undefined> {
if (options?.allowUIResources) {
checkProposedApiEnabled(extension, 'showLocal');
}
showOpenDialog(options?: vscode.OpenDialogOptions): Promise<URI[] | undefined> {
return this._proxy.$showOpenDialog(options).then(filepaths => {
return filepaths ? filepaths.map(p => URI.revive(p)) : undefined;
});
Expand Down
19 changes: 0 additions & 19 deletions src/vscode-dts/vscode.proposed.showLocal.d.ts

This file was deleted.

0 comments on commit ce50bd4

Please sign in to comment.