Skip to content

Commit

Permalink
Propose "allowLocal" open dialog option API
Browse files Browse the repository at this point in the history
Part of #131138
  • Loading branch information
alexr00 committed Feb 8, 2023
1 parent beb9ed3 commit 0bdc442
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export const allApiProposals = Object.freeze({
scmActionButton: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.scmActionButton.d.ts',
scmSelectedProvider: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.scmSelectedProvider.d.ts',
scmValidation: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.scmValidation.d.ts',
showLocal: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.showLocal.d.ts',
tabInputTextMerge: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.tabInputTextMerge.d.ts',
taskPresentationGroup: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.taskPresentationGroup.d.ts',
telemetry: 'https://raw.githubusercontent.com/microsoft/vscode/main/src/vscode-dts/vscode.proposed.telemetry.d.ts',
Expand Down
19 changes: 19 additions & 0 deletions src/vscode-dts/vscode.proposed.showLocal.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/*---------------------------------------------------------------------------------------------
* 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.
*
* TODO: Workspace extensions already get only `file` scheme URIs back from the dialog. Should we ignore `allowLocal` for them?
*/
allowLocal?: boolean;
}
}

0 comments on commit 0bdc442

Please sign in to comment.