@codingame/monaco-vscode-dialogs-service-override 13.1.7 → 14.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-dialogs-service-override",
3
- "version": "13.1.7",
3
+ "version": "14.0.1",
4
4
  "private": false,
5
5
  "description": "VSCode public API plugged on the monaco editor - dialogs service-override",
6
6
  "keywords": [],
@@ -15,10 +15,10 @@
15
15
  },
16
16
  "type": "module",
17
17
  "dependencies": {
18
- "@codingame/monaco-vscode-411e0589-fa79-504b-b32c-80a88847b23a-common": "13.1.7",
19
- "@codingame/monaco-vscode-44b92f80-48ea-5562-a8d0-18a015f8d845-common": "13.1.7",
20
- "@codingame/monaco-vscode-api": "13.1.7",
21
- "@codingame/monaco-vscode-d6e33d82-c101-549d-a885-0807ab3e0cfb-common": "13.1.7"
18
+ "@codingame/monaco-vscode-411e0589-fa79-504b-b32c-80a88847b23a-common": "14.0.1",
19
+ "@codingame/monaco-vscode-44b92f80-48ea-5562-a8d0-18a015f8d845-common": "14.0.1",
20
+ "@codingame/monaco-vscode-api": "14.0.1",
21
+ "@codingame/monaco-vscode-d4a98668-f793-5361-a9cf-1e6ae6d62ce3-common": "14.0.1"
22
22
  },
23
23
  "main": "index.js",
24
24
  "module": "index.js",
@@ -1,4 +1,4 @@
1
- import { IConfirmation, IConfirmationResult, IInputResult, IInput, AbstractDialogHandler, IPrompt, IAsyncPromptResult } from "@codingame/monaco-vscode-d6e33d82-c101-549d-a885-0807ab3e0cfb-common/vscode/vs/platform/dialogs/common/dialogs";
1
+ import { IConfirmation, IConfirmationResult, IInputResult, IInput, AbstractDialogHandler, IPrompt, IAsyncPromptResult } from "@codingame/monaco-vscode-d4a98668-f793-5361-a9cf-1e6ae6d62ce3-common/vscode/vs/platform/dialogs/common/dialogs";
2
2
  import { ILayoutService } from "@codingame/monaco-vscode-api/vscode/vs/platform/layout/browser/layoutService.service";
3
3
  import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
4
4
  import { IKeybindingService } from "@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service";
@@ -1,7 +1,7 @@
1
1
 
2
2
  import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
3
3
  import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
4
- import { AbstractDialogHandler } from '@codingame/monaco-vscode-d6e33d82-c101-549d-a885-0807ab3e0cfb-common/vscode/vs/platform/dialogs/common/dialogs';
4
+ import { AbstractDialogHandler } from '@codingame/monaco-vscode-d4a98668-f793-5361-a9cf-1e6ae6d62ce3-common/vscode/vs/platform/dialogs/common/dialogs';
5
5
  import { ILayoutService } from '@codingame/monaco-vscode-api/vscode/vs/platform/layout/browser/layoutService.service';
6
6
  import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
7
7
  import Severity from '@codingame/monaco-vscode-api/vscode/vs/base/common/severity';
@@ -59,7 +59,7 @@ let BrowserDialogHandler = class BrowserDialogHandler extends AbstractDialogHand
59
59
  async about() {
60
60
  const detailString = (useAgo) => {
61
61
  return localize(
62
- 2747,
62
+ 2793,
63
63
  "Version: {0}\nCommit: {1}\nDate: {2}\nBrowser: {3}",
64
64
  this.productService.version || 'Unknown',
65
65
  this.productService.commit || 'Unknown',
@@ -70,14 +70,14 @@ let BrowserDialogHandler = class BrowserDialogHandler extends AbstractDialogHand
70
70
  const detail = detailString(true);
71
71
  const detailToCopy = detailString(false);
72
72
  const { button } = await this.doShow(Severity.Info, this.productService.nameLong, [
73
- ( localize(2748, "&&Copy")),
74
- ( localize(2749, "OK"))
73
+ ( localize(2794, "&&Copy")),
74
+ ( localize(2795, "OK"))
75
75
  ], detail, 1);
76
76
  if (button === 0) {
77
77
  this.clipboardService.writeText(detailToCopy);
78
78
  }
79
79
  }
80
- async doShow(type, message, buttons, detail, cancelId, checkbox, inputs, customOptions, cancellationToken) {
80
+ async doShow(type, message, buttons, detail, cancelId, checkbox, inputs, customOptions) {
81
81
  const dialogDisposables = ( new DisposableStore());
82
82
  const renderBody = customOptions ? (parent) => {
83
83
  parent.classList.add(...(customOptions.classes || []));
@@ -1,6 +1,6 @@
1
1
  import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
2
2
  import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
3
- import { IDialogArgs, IDialogResult } from "@codingame/monaco-vscode-d6e33d82-c101-549d-a885-0807ab3e0cfb-common/vscode/vs/platform/dialogs/common/dialogs";
3
+ import { IDialogArgs, IDialogResult } from "@codingame/monaco-vscode-d4a98668-f793-5361-a9cf-1e6ae6d62ce3-common/vscode/vs/platform/dialogs/common/dialogs";
4
4
  export interface IDialogViewItem {
5
5
  readonly args: IDialogArgs;
6
6
  close(result?: IDialogResult | Error): void;
@@ -90,7 +90,7 @@ configurationRegistry.registerConfiguration({
90
90
  type: 'boolean',
91
91
  default: false,
92
92
  tags: ['experimental'],
93
- description: ( localize(10733, "When enabled, a welcome widget is shown in the editor"))
93
+ description: ( localize(10930, "When enabled, a welcome widget is shown in the editor"))
94
94
  }
95
95
  }
96
96
  });
@@ -72,7 +72,7 @@ class WelcomeWidget extends Disposable {
72
72
  }
73
73
  async buildWidgetContent(title, message, buttonText, buttonAction) {
74
74
  const actionBar = this._register(( new ActionBar(this.element, {})));
75
- const action = this._register(( new Action('dialog.close', ( localize(10734, "Close Dialog")), ThemeIcon.asClassName(Codicon.dialogClose), true, async () => {
75
+ const action = this._register(( new Action('dialog.close', ( localize(10931, "Close Dialog")), ThemeIcon.asClassName(Codicon.dialogClose), true, async () => {
76
76
  this._hide();
77
77
  })));
78
78
  actionBar.push(action, { icon: true, label: false });
@@ -1,4 +1,4 @@
1
- import { IPickAndOpenOptions, ISaveDialogOptions, IOpenDialogOptions, ConfirmResult } from "@codingame/monaco-vscode-d6e33d82-c101-549d-a885-0807ab3e0cfb-common/vscode/vs/platform/dialogs/common/dialogs";
1
+ import { IPickAndOpenOptions, ISaveDialogOptions, IOpenDialogOptions, ConfirmResult } from "@codingame/monaco-vscode-d4a98668-f793-5361-a9cf-1e6ae6d62ce3-common/vscode/vs/platform/dialogs/common/dialogs";
2
2
  import { IFileDialogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service";
3
3
  import { IDialogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service";
4
4
  import { IWorkspaceContextService } from "@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace.service";
@@ -2,7 +2,7 @@
2
2
  import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
3
3
  import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
4
4
  import { isWorkspaceToOpen, isFileToOpen } from '@codingame/monaco-vscode-api/vscode/vs/platform/window/common/window';
5
- import { ConfirmResult, getFileNamesMessage } from '@codingame/monaco-vscode-d6e33d82-c101-549d-a885-0807ab3e0cfb-common/vscode/vs/platform/dialogs/common/dialogs';
5
+ import { ConfirmResult, getFileNamesMessage } from '@codingame/monaco-vscode-d4a98668-f793-5361-a9cf-1e6ae6d62ce3-common/vscode/vs/platform/dialogs/common/dialogs';
6
6
  import { IDialogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service';
7
7
  import { WorkbenchState, isSavedWorkspace, isTemporaryWorkspace, WORKSPACE_EXTENSION } from '@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace';
8
8
  import { IWorkspaceContextService } from '@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace.service';
@@ -121,17 +121,17 @@ let AbstractFileDialogService = class AbstractFileDialogService {
121
121
  return ConfirmResult.DONT_SAVE;
122
122
  }
123
123
  let message;
124
- let detail = ( localize(11359, "Your changes will be lost if you don't save them."));
124
+ let detail = ( localize(11556, "Your changes will be lost if you don't save them."));
125
125
  if (fileNamesOrResources.length === 1) {
126
126
  message = ( localize(
127
- 11360,
127
+ 11557,
128
128
  "Do you want to save the changes you made to {0}?",
129
129
  typeof fileNamesOrResources[0] === 'string' ? fileNamesOrResources[0] : basename(fileNamesOrResources[0])
130
130
  ));
131
131
  }
132
132
  else {
133
133
  message = ( localize(
134
- 11361,
134
+ 11558,
135
135
  "Do you want to save the changes to the following {0} files?",
136
136
  fileNamesOrResources.length
137
137
  ));
@@ -144,12 +144,12 @@ let AbstractFileDialogService = class AbstractFileDialogService {
144
144
  buttons: [
145
145
  {
146
146
  label: fileNamesOrResources.length > 1 ?
147
- ( localize(11362, "&&Save All")) :
148
- ( localize(11363, "&&Save")),
147
+ ( localize(11559, "&&Save All")) :
148
+ ( localize(11560, "&&Save")),
149
149
  run: () => ConfirmResult.SAVE
150
150
  },
151
151
  {
152
- label: ( localize(11364, "Do&&n't Save")),
152
+ label: ( localize(11561, "Do&&n't Save")),
153
153
  run: () => ConfirmResult.DONT_SAVE
154
154
  }
155
155
  ],
@@ -163,7 +163,7 @@ let AbstractFileDialogService = class AbstractFileDialogService {
163
163
  return schema === Schemas.untitled ? [Schemas.file] : (schema !== Schemas.file ? [schema, Schemas.file] : [schema]);
164
164
  }
165
165
  async pickFileFolderAndOpenSimplified(schema, options, preferNewWindow) {
166
- const title = ( localize(11365, 'Open File or Folder'));
166
+ const title = ( localize(11562, 'Open File or Folder'));
167
167
  const availableFileSystems = this.addFileSchemaIfNeeded(schema);
168
168
  const uri = await this.pickResource({ canSelectFiles: true, canSelectFolders: true, canSelectMany: false, defaultUri: options.defaultUri, title, availableFileSystems });
169
169
  if (uri) {
@@ -181,7 +181,7 @@ let AbstractFileDialogService = class AbstractFileDialogService {
181
181
  }
182
182
  }
183
183
  async pickFileAndOpenSimplified(schema, options, preferNewWindow) {
184
- const title = ( localize(11366, 'Open File'));
184
+ const title = ( localize(11563, 'Open File'));
185
185
  const availableFileSystems = this.addFileSchemaIfNeeded(schema);
186
186
  const uri = await this.pickResource({ canSelectFiles: true, canSelectFolders: false, canSelectMany: false, defaultUri: options.defaultUri, title, availableFileSystems });
187
187
  if (uri) {
@@ -195,10 +195,10 @@ let AbstractFileDialogService = class AbstractFileDialogService {
195
195
  }
196
196
  }
197
197
  addFileToRecentlyOpened(uri) {
198
- this.workspacesService.addRecentlyOpened([{ fileUri: uri, label: this.labelService.getUriLabel(uri) }]);
198
+ this.workspacesService.addRecentlyOpened([{ fileUri: uri, label: this.labelService.getUriLabel(uri, { appendWorkspaceSuffix: true }) }]);
199
199
  }
200
200
  async pickFolderAndOpenSimplified(schema, options) {
201
- const title = ( localize(11367, 'Open Folder'));
201
+ const title = ( localize(11564, 'Open Folder'));
202
202
  const availableFileSystems = this.addFileSchemaIfNeeded(schema, true);
203
203
  const uri = await this.pickResource({ canSelectFiles: false, canSelectFolders: true, canSelectMany: false, defaultUri: options.defaultUri, title, availableFileSystems });
204
204
  if (uri) {
@@ -206,8 +206,8 @@ let AbstractFileDialogService = class AbstractFileDialogService {
206
206
  }
207
207
  }
208
208
  async pickWorkspaceAndOpenSimplified(schema, options) {
209
- const title = ( localize(11368, 'Open Workspace from File'));
210
- const filters = [{ name: ( localize(11369, 'Workspace')), extensions: [WORKSPACE_EXTENSION] }];
209
+ const title = ( localize(11565, 'Open Workspace from File'));
210
+ const filters = [{ name: ( localize(11566, 'Workspace')), extensions: [WORKSPACE_EXTENSION] }];
211
211
  const availableFileSystems = this.addFileSchemaIfNeeded(schema, true);
212
212
  const uri = await this.pickResource({ canSelectFiles: true, canSelectFolders: false, canSelectMany: false, defaultUri: options.defaultUri, title, filters, availableFileSystems });
213
213
  if (uri) {
@@ -218,7 +218,7 @@ let AbstractFileDialogService = class AbstractFileDialogService {
218
218
  if (!options.availableFileSystems) {
219
219
  options.availableFileSystems = this.addFileSchemaIfNeeded(schema);
220
220
  }
221
- options.title = ( localize(11370, 'Save As'));
221
+ options.title = ( localize(11567, 'Save As'));
222
222
  const uri = await this.saveRemoteResource(options);
223
223
  if (uri) {
224
224
  this.addFileToRecentlyOpened(uri);
@@ -269,7 +269,7 @@ let AbstractFileDialogService = class AbstractFileDialogService {
269
269
  getPickFileToSaveDialogOptions(defaultUri, availableFileSystems) {
270
270
  const options = {
271
271
  defaultUri,
272
- title: ( localize(11371, "Save As")),
272
+ title: ( localize(11568, "Save As")),
273
273
  availableFileSystems
274
274
  };
275
275
  const ext = defaultUri ? extname(defaultUri) : undefined;
@@ -296,10 +296,10 @@ let AbstractFileDialogService = class AbstractFileDialogService {
296
296
  matchingFilter = { name: trim(ext, '.').toUpperCase(), extensions: [trim(ext, '.')] };
297
297
  }
298
298
  options.filters = coalesce([
299
- { name: ( localize(11372, "All Files")), extensions: ['*'] },
299
+ { name: ( localize(11569, "All Files")), extensions: ['*'] },
300
300
  matchingFilter,
301
301
  ...registeredLanguageFilters,
302
- { name: ( localize(11373, "No Extension")), extensions: [''] }
302
+ { name: ( localize(11570, "No Extension")), extensions: [''] }
303
303
  ]);
304
304
  return options;
305
305
  }
@@ -1,4 +1,4 @@
1
- import { IPickAndOpenOptions, ISaveDialogOptions, IOpenDialogOptions } from "@codingame/monaco-vscode-d6e33d82-c101-549d-a885-0807ab3e0cfb-common/vscode/vs/platform/dialogs/common/dialogs";
1
+ import { IPickAndOpenOptions, ISaveDialogOptions, IOpenDialogOptions } from "@codingame/monaco-vscode-d4a98668-f793-5361-a9cf-1e6ae6d62ce3-common/vscode/vs/platform/dialogs/common/dialogs";
2
2
  import { IFileDialogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service";
3
3
  import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
4
4
  import { AbstractFileDialogService } from "./abstractFileDialogService.js";
@@ -28,7 +28,7 @@ class FileDialogService extends AbstractFileDialogService {
28
28
  if (this.shouldUseSimplified(schema)) {
29
29
  return super.pickFileFolderAndOpenSimplified(schema, options, false);
30
30
  }
31
- throw ( new Error(( localize(11374, "Can't open folders, try adding a folder to the workspace instead."))));
31
+ throw ( new Error(( localize(11571, "Can't open folders, try adding a folder to the workspace instead."))));
32
32
  }
33
33
  addFileSchemaIfNeeded(schema, isFolder) {
34
34
  return (schema === Schemas.untitled) ? [Schemas.file]
@@ -68,7 +68,7 @@ class FileDialogService extends AbstractFileDialogService {
68
68
  if (this.shouldUseSimplified(schema)) {
69
69
  return super.pickFolderAndOpenSimplified(schema, options);
70
70
  }
71
- throw ( new Error(( localize(11374, "Can't open folders, try adding a folder to the workspace instead."))));
71
+ throw ( new Error(( localize(11571, "Can't open folders, try adding a folder to the workspace instead."))));
72
72
  }
73
73
  async pickWorkspaceAndOpen(options) {
74
74
  options.availableFileSystems = this.getWorkspaceAvailableFileSystems(options);
@@ -80,7 +80,7 @@ class FileDialogService extends AbstractFileDialogService {
80
80
  return super.pickWorkspaceAndOpenSimplified(schema, options);
81
81
  }
82
82
  throw ( new Error(( localize(
83
- 11375,
83
+ 11572,
84
84
  "Can't open workspaces, try adding a folder to the workspace instead."
85
85
  ))));
86
86
  }
@@ -182,17 +182,17 @@ class FileDialogService extends AbstractFileDialogService {
182
182
  }
183
183
  const buttons = [
184
184
  {
185
- label: ( localize(11376, "&&Open Remote...")),
185
+ label: ( localize(11573, "&&Open Remote...")),
186
186
  run: async () => { await this.commandService.executeCommand('workbench.action.remote.showMenu'); }
187
187
  },
188
188
  {
189
- label: ( localize(11377, "&&Learn More")),
189
+ label: ( localize(11574, "&&Learn More")),
190
190
  run: async () => { await this.openerService.open('https://aka.ms/VSCodeWebLocalFileSystemAccess'); }
191
191
  }
192
192
  ];
193
193
  if (context === 'open') {
194
194
  buttons.push({
195
- label: ( localize(11378, "Open &&Files...")),
195
+ label: ( localize(11575, "Open &&Files...")),
196
196
  run: async () => {
197
197
  const files = await triggerUpload();
198
198
  if (files) {
@@ -212,9 +212,9 @@ class FileDialogService extends AbstractFileDialogService {
212
212
  }
213
213
  await this.dialogService.prompt({
214
214
  type: Severity.Warning,
215
- message: ( localize(11379, "Opening Local Folders is Unsupported")),
215
+ message: ( localize(11576, "Opening Local Folders is Unsupported")),
216
216
  detail: ( localize(
217
- 11380,
217
+ 11577,
218
218
  "Your browser doesn't support opening local folders.\nYou can either open single files or open a remote repository."
219
219
  )),
220
220
  buttons
@@ -1,7 +1,7 @@
1
1
  import { IFileService } from "@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files.service";
2
2
  import { IQuickInputService } from "@codingame/monaco-vscode-api/vscode/vs/platform/quickinput/common/quickInput.service";
3
3
  import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
4
- import { ISaveDialogOptions, IOpenDialogOptions } from "@codingame/monaco-vscode-d6e33d82-c101-549d-a885-0807ab3e0cfb-common/vscode/vs/platform/dialogs/common/dialogs";
4
+ import { ISaveDialogOptions, IOpenDialogOptions } from "@codingame/monaco-vscode-d4a98668-f793-5361-a9cf-1e6ae6d62ce3-common/vscode/vs/platform/dialogs/common/dialogs";
5
5
  import { IFileDialogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service";
6
6
  import { ILabelService } from "@codingame/monaco-vscode-api/vscode/vs/platform/label/common/label.service";
7
7
  import { IWorkspaceContextService } from "@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace.service";
@@ -98,6 +98,7 @@ export declare class SimpleFileDialog extends Disposable implements ISimpleFileD
98
98
  private filePickBoxValue;
99
99
  private onDidAccept;
100
100
  private root;
101
+ private canTildaEscapeHatch;
101
102
  private tildaReplace;
102
103
  private tryAddTrailingSeparatorToDirectory;
103
104
  private tryUpdateItems;
@@ -37,7 +37,7 @@ import { getActiveDocument } from '@codingame/monaco-vscode-api/vscode/vs/base/b
37
37
  var OpenLocalFileCommand;
38
38
  (function (OpenLocalFileCommand) {
39
39
  OpenLocalFileCommand.ID = 'workbench.action.files.openLocalFile';
40
- OpenLocalFileCommand.LABEL = ( localize(11381, "Open Local File..."));
40
+ OpenLocalFileCommand.LABEL = ( localize(11578, "Open Local File..."));
41
41
  function handler() {
42
42
  return accessor => {
43
43
  const dialogService = accessor.get(IFileDialogService);
@@ -49,7 +49,7 @@ var OpenLocalFileCommand;
49
49
  var SaveLocalFileCommand;
50
50
  (function (SaveLocalFileCommand) {
51
51
  SaveLocalFileCommand.ID = 'workbench.action.files.saveLocalFile';
52
- SaveLocalFileCommand.LABEL = ( localize(11382, "Save Local File..."));
52
+ SaveLocalFileCommand.LABEL = ( localize(11579, "Save Local File..."));
53
53
  function handler() {
54
54
  return accessor => {
55
55
  const editorService = accessor.get(IEditorService);
@@ -65,7 +65,7 @@ var SaveLocalFileCommand;
65
65
  var OpenLocalFolderCommand;
66
66
  (function (OpenLocalFolderCommand) {
67
67
  OpenLocalFolderCommand.ID = 'workbench.action.files.openLocalFolder';
68
- OpenLocalFolderCommand.LABEL = ( localize(11383, "Open Local Folder..."));
68
+ OpenLocalFolderCommand.LABEL = ( localize(11580, "Open Local Folder..."));
69
69
  function handler() {
70
70
  return accessor => {
71
71
  const dialogService = accessor.get(IFileDialogService);
@@ -77,7 +77,7 @@ var OpenLocalFolderCommand;
77
77
  var OpenLocalFileFolderCommand;
78
78
  (function (OpenLocalFileFolderCommand) {
79
79
  OpenLocalFileFolderCommand.ID = 'workbench.action.files.openLocalFileFolder';
80
- OpenLocalFileFolderCommand.LABEL = ( localize(11384, "Open Local..."));
80
+ OpenLocalFileFolderCommand.LABEL = ( localize(11581, "Open Local..."));
81
81
  function handler() {
82
82
  return accessor => {
83
83
  const dialogService = accessor.get(IFileDialogService);
@@ -177,7 +177,7 @@ let SimpleFileDialog = class SimpleFileDialog extends Disposable {
177
177
  }
178
178
  if ((this.scheme !== Schemas.file) && !this.fileService.hasProvider(defaultUri)) {
179
179
  this.notificationService.info(( localize(
180
- 11385,
180
+ 11582,
181
181
  'File system provider for {0} is not available.',
182
182
  (defaultUri.toString())
183
183
  )));
@@ -248,9 +248,10 @@ let SimpleFileDialog = class SimpleFileDialog extends Disposable {
248
248
  this.filePickBox.sortByLabel = false;
249
249
  this.filePickBox.ignoreFocusOut = true;
250
250
  this.filePickBox.ok = true;
251
+ this.filePickBox.okLabel = this.options.openLabel;
251
252
  if ((this.scheme !== Schemas.file) && this.options && this.options.availableFileSystems && (this.options.availableFileSystems.length > 1) && (this.options.availableFileSystems.indexOf(Schemas.file) > -1)) {
252
253
  this.filePickBox.customButton = true;
253
- this.filePickBox.customLabel = ( localize(11386, 'Show Local'));
254
+ this.filePickBox.customLabel = ( localize(11583, 'Show Local'));
254
255
  let action;
255
256
  if (isSave) {
256
257
  action = SaveLocalFileCommand;
@@ -375,7 +376,7 @@ let SimpleFileDialog = class SimpleFileDialog extends Disposable {
375
376
  async handleValueChange(value) {
376
377
  try {
377
378
  if (this.isValueChangeFromUser()) {
378
- if (!equalsIgnoreCase(value, this.constructFullUserPath()) && !this.isBadSubpath(value)) {
379
+ if (!equalsIgnoreCase(value, this.constructFullUserPath()) && (!this.isBadSubpath(value) || this.canTildaEscapeHatch(value))) {
379
380
  this.filePickBox.validationMessage = undefined;
380
381
  const filePickBoxUri = this.filePickBoxValue();
381
382
  let updated = UpdateResult.NotUpdated;
@@ -447,7 +448,7 @@ let SimpleFileDialog = class SimpleFileDialog extends Disposable {
447
448
  }
448
449
  async onDidAccept() {
449
450
  this.busy = true;
450
- if (this.filePickBox.activeItems.length === 1) {
451
+ if (!this.updatingPromise && this.filePickBox.activeItems.length === 1) {
451
452
  const item = this.filePickBox.selectedItems[0];
452
453
  if (item.isFolder) {
453
454
  if (this.trailing) {
@@ -471,7 +472,7 @@ let SimpleFileDialog = class SimpleFileDialog extends Disposable {
471
472
  return;
472
473
  }
473
474
  }
474
- else {
475
+ else if (!this.updatingPromise) {
475
476
  if ((await this.tryUpdateItems(this.filePickBox.value, this.filePickBoxValue())) !== UpdateResult.NotUpdated) {
476
477
  this.filePickBox.busy = false;
477
478
  return;
@@ -503,11 +504,17 @@ let SimpleFileDialog = class SimpleFileDialog extends Disposable {
503
504
  }
504
505
  return dir;
505
506
  }
507
+ canTildaEscapeHatch(value) {
508
+ return !!(value.endsWith('~') && this.isBadSubpath(value));
509
+ }
506
510
  tildaReplace(value) {
507
511
  const home = this.trueHome;
508
512
  if ((value.length > 0) && (value[0] === '~')) {
509
513
  return joinPath(home, value.substring(1));
510
514
  }
515
+ else if (this.canTildaEscapeHatch(value)) {
516
+ return home;
517
+ }
511
518
  return this.remoteUriFrom(value);
512
519
  }
513
520
  tryAddTrailingSeparatorToDirectory(uri, stat) {
@@ -519,7 +526,7 @@ let SimpleFileDialog = class SimpleFileDialog extends Disposable {
519
526
  return uri;
520
527
  }
521
528
  async tryUpdateItems(value, valueUri) {
522
- if ((value.length > 0) && (value[0] === '~')) {
529
+ if ((value.length > 0) && ((value[0] === '~') || this.canTildaEscapeHatch(value))) {
523
530
  const newDir = this.tildaReplace(value);
524
531
  return (await this.updateItems(newDir, true)) ? UpdateResult.UpdatedWithTrailing : UpdateResult.Updated;
525
532
  }
@@ -545,7 +552,7 @@ let SimpleFileDialog = class SimpleFileDialog extends Disposable {
545
552
  return (await this.updateItems(valueUri)) ? UpdateResult.UpdatedWithTrailing : UpdateResult.Updated;
546
553
  }
547
554
  else if (this.endsWithSlash(value)) {
548
- this.filePickBox.validationMessage = ( localize(11387, 'The path does not exist.'));
555
+ this.filePickBox.validationMessage = ( localize(11584, 'The path does not exist. Use ~ to go to your home directory.'));
549
556
  this.badPath = value;
550
557
  return UpdateResult.InvalidPath;
551
558
  }
@@ -703,7 +710,7 @@ let SimpleFileDialog = class SimpleFileDialog extends Disposable {
703
710
  prompt.ignoreFocusOut = true;
704
711
  prompt.ok = true;
705
712
  prompt.customButton = true;
706
- prompt.customLabel = ( localize(11388, 'Cancel'));
713
+ prompt.customLabel = ( localize(11585, 'Cancel'));
707
714
  prompt.value = this.pathFromUri(uri);
708
715
  let isResolving = false;
709
716
  return ( new Promise(resolve => {
@@ -731,7 +738,7 @@ let SimpleFileDialog = class SimpleFileDialog extends Disposable {
731
738
  }
732
739
  async validate(uri) {
733
740
  if (uri === undefined) {
734
- this.filePickBox.validationMessage = ( localize(11389, 'Please enter a valid path.'));
741
+ this.filePickBox.validationMessage = ( localize(11586, 'Please enter a valid path.'));
735
742
  return Promise.resolve(false);
736
743
  }
737
744
  let stat;
@@ -744,36 +751,36 @@ let SimpleFileDialog = class SimpleFileDialog extends Disposable {
744
751
  }
745
752
  if (this.requiresTrailing) {
746
753
  if (stat && stat.isDirectory) {
747
- this.filePickBox.validationMessage = ( localize(11390, 'The folder already exists. Please use a new file name.'));
754
+ this.filePickBox.validationMessage = ( localize(11587, 'The folder already exists. Please use a new file name.'));
748
755
  return Promise.resolve(false);
749
756
  }
750
757
  else if (stat) {
751
758
  const message = ( localize(
752
- 11391,
759
+ 11588,
753
760
  '{0} already exists. Are you sure you want to overwrite it?',
754
761
  basename(uri)
755
762
  ));
756
763
  return this.yesNoPrompt(uri, message);
757
764
  }
758
765
  else if (!(isValidBasename(basename(uri), this.isWindows))) {
759
- this.filePickBox.validationMessage = ( localize(11392, 'Please enter a valid file name.'));
766
+ this.filePickBox.validationMessage = ( localize(11589, 'Please enter a valid file name.'));
760
767
  return Promise.resolve(false);
761
768
  }
762
769
  else if (!statDirname) {
763
770
  const message = ( localize(
764
- 11393,
771
+ 11590,
765
772
  'The folder {0} does not exist. Would you like to create it?',
766
773
  basename(dirname(uri))
767
774
  ));
768
775
  return this.yesNoPrompt(uri, message);
769
776
  }
770
777
  else if (!statDirname.isDirectory) {
771
- this.filePickBox.validationMessage = ( localize(11394, 'Please enter a path that exists.'));
778
+ this.filePickBox.validationMessage = ( localize(11591, 'Please enter a path that exists.'));
772
779
  return Promise.resolve(false);
773
780
  }
774
781
  else if (statDirname.readonly) {
775
782
  this.filePickBox.validationMessage = ( localize(
776
- 11395,
783
+ 11592,
777
784
  'This folder cannot be used as a save destination. Please choose another folder'
778
785
  ));
779
786
  return Promise.resolve(false);
@@ -781,19 +788,19 @@ let SimpleFileDialog = class SimpleFileDialog extends Disposable {
781
788
  }
782
789
  else {
783
790
  if (!stat) {
784
- this.filePickBox.validationMessage = ( localize(11394, 'Please enter a path that exists.'));
791
+ this.filePickBox.validationMessage = ( localize(11591, 'Please enter a path that exists.'));
785
792
  return Promise.resolve(false);
786
793
  }
787
794
  else if (uri.path === '/' && this.isWindows) {
788
- this.filePickBox.validationMessage = ( localize(11396, 'Please start the path with a drive letter.'));
795
+ this.filePickBox.validationMessage = ( localize(11593, 'Please start the path with a drive letter.'));
789
796
  return Promise.resolve(false);
790
797
  }
791
798
  else if (stat.isDirectory && !this.allowFolderSelection) {
792
- this.filePickBox.validationMessage = ( localize(11397, 'Please select a file.'));
799
+ this.filePickBox.validationMessage = ( localize(11594, 'Please select a file.'));
793
800
  return Promise.resolve(false);
794
801
  }
795
802
  else if (!stat.isDirectory && !this.allowFileSelection) {
796
- this.filePickBox.validationMessage = ( localize(11398, 'Please select a folder.'));
803
+ this.filePickBox.validationMessage = ( localize(11595, 'Please select a folder.'));
797
804
  return Promise.resolve(false);
798
805
  }
799
806
  }
@@ -802,6 +809,8 @@ let SimpleFileDialog = class SimpleFileDialog extends Disposable {
802
809
  async updateItems(newFolder, force = false, trailing) {
803
810
  this.busy = true;
804
811
  this.autoCompletePathSegment = '';
812
+ const wasDotDot = trailing === '..';
813
+ trailing = wasDotDot ? undefined : trailing;
805
814
  const isSave = !!trailing;
806
815
  let result = false;
807
816
  const updatingPromise = createCancelablePromise(async (token) => {
@@ -827,7 +836,7 @@ let SimpleFileDialog = class SimpleFileDialog extends Disposable {
827
836
  }
828
837
  this.filePickBox.itemActivation = ItemActivation.NONE;
829
838
  this.filePickBox.items = items;
830
- if (!equalsIgnoreCase(this.filePickBox.value, newValue) && force) {
839
+ if (!equalsIgnoreCase(this.filePickBox.value, newValue) && (force || wasDotDot)) {
831
840
  this.filePickBox.valueSelection = [0, this.filePickBox.value.length];
832
841
  this.insertText(newValue, newValue);
833
842
  }
@@ -1,5 +1,5 @@
1
1
  import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
2
- import { IConfirmation, IConfirmationResult, IInput, IInputResult, IPrompt, IPromptResult, IPromptResultWithCancel, IPromptWithCustomCancel, IPromptWithDefaultCancel } from "@codingame/monaco-vscode-d6e33d82-c101-549d-a885-0807ab3e0cfb-common/vscode/vs/platform/dialogs/common/dialogs";
2
+ import { IConfirmation, IConfirmationResult, IInput, IInputResult, IPrompt, IPromptResult, IPromptResultWithCancel, IPromptWithCustomCancel, IPromptWithDefaultCancel } from "@codingame/monaco-vscode-d4a98668-f793-5361-a9cf-1e6ae6d62ce3-common/vscode/vs/platform/dialogs/common/dialogs";
3
3
  import { IDialogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service";
4
4
  import { DialogsModel } from "../../../common/dialogs.js";
5
5
  import { IWorkbenchEnvironmentService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/environment/common/environmentService.service";