@codingame/monaco-vscode-explorer-service-override 11.1.2 → 12.0.0

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.
@@ -1,476 +0,0 @@
1
- import { localize } from 'vscode/vscode/vs/nls';
2
- import { EditorResourceAccessor, SideBySideEditor } from 'vscode/vscode/vs/workbench/common/editor';
3
- import { isWorkspaceToOpen } from 'vscode/vscode/vs/platform/window/common/window';
4
- import { IHostService } from 'vscode/vscode/vs/workbench/services/host/browser/host.service';
5
- import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
6
- import { UNTITLED_WORKSPACE_NAME } from 'vscode/vscode/vs/platform/workspace/common/workspace';
7
- import { IWorkspaceContextService } from 'vscode/vscode/vs/platform/workspace/common/workspace.service';
8
- import { ExplorerFocusCondition, FilesExplorerFocusCondition, ExplorerFolderContext, TextFileContentProvider, VIEW_ID, ExplorerCompressedFocusContext, ExplorerCompressedFirstFocusContext, VIEWLET_ID, ExplorerCompressedLastFocusContext } from 'vscode/vscode/vs/workbench/contrib/files/common/files';
9
- import { IClipboardService } from 'vscode/vscode/vs/platform/clipboard/common/clipboardService.service';
10
- import { CommandsRegistry } from 'vscode/vscode/vs/platform/commands/common/commands';
11
- import { ICommandService } from 'vscode/vscode/vs/platform/commands/common/commands.service';
12
- import { ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
13
- import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey.service';
14
- import { IFileService } from 'vscode/vscode/vs/platform/files/common/files.service';
15
- import { KeybindingsRegistry } from 'vscode/vscode/vs/platform/keybinding/common/keybindingsRegistry';
16
- import { KeyChord } from 'vscode/vscode/vs/base/common/keyCodes';
17
- import { isWindows, isWeb } from 'vscode/vscode/vs/base/common/platform';
18
- import { ITextModelService } from 'vscode/vscode/vs/editor/common/services/resolverService';
19
- import { getMultiSelectedResources, getResourceForCommand } from 'vscode/vscode/vs/workbench/contrib/files/browser/files';
20
- import { IExplorerService } from 'vscode/vscode/vs/workbench/contrib/files/browser/files.service';
21
- import { IWorkspaceEditingService } from 'vscode/vscode/vs/workbench/services/workspaces/common/workspaceEditing.service';
22
- import { Schemas } from 'vscode/vscode/vs/base/common/network';
23
- import { EditorContextKeys } from 'vscode/vscode/vs/editor/common/editorContextKeys';
24
- import { SIDE_GROUP } from 'vscode/vscode/vs/workbench/services/editor/common/editorService';
25
- import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
26
- import { IEditorGroupsService } from 'vscode/vscode/vs/workbench/services/editor/common/editorGroupsService.service';
27
- import { ILabelService } from 'vscode/vscode/vs/platform/label/common/label.service';
28
- import { joinPath, basename } from 'vscode/vscode/vs/base/common/resources';
29
- import { dispose } from 'vscode/vscode/vs/base/common/lifecycle';
30
- import { IEnvironmentService } from 'vscode/vscode/vs/platform/environment/common/environment.service';
31
- import { IUriIdentityService } from 'vscode/vscode/vs/platform/uriIdentity/common/uriIdentity.service';
32
- import { EditorResolution, EditorOpenSource } from 'vscode/vscode/vs/platform/editor/common/editor';
33
- import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
34
- import { IPaneCompositePartService } from 'vscode/vscode/vs/workbench/services/panecomposite/browser/panecomposite.service';
35
- import { IViewsService } from 'vscode/vscode/vs/workbench/services/views/common/viewsService.service';
36
- import { OPEN_TO_SIDE_COMMAND_ID, COMPARE_WITH_SAVED_COMMAND_ID, SELECT_FOR_COMPARE_COMMAND_ID, ResourceSelectedForCompareContext, COMPARE_SELECTED_COMMAND_ID, COMPARE_RESOURCE_COMMAND_ID, COPY_PATH_COMMAND_ID, COPY_RELATIVE_PATH_COMMAND_ID, REVEAL_IN_EXPLORER_COMMAND_ID, OPEN_WITH_EXPLORER_COMMAND_ID, REMOVE_ROOT_FOLDER_COMMAND_ID, PREVIOUS_COMPRESSED_FOLDER, NEXT_COMPRESSED_FOLDER, FIRST_COMPRESSED_FOLDER, LAST_COMPRESSED_FOLDER, NEW_UNTITLED_FILE_COMMAND_ID, NEW_UNTITLED_FILE_LABEL, NEW_FILE_COMMAND_ID } from 'vscode/vscode/vs/workbench/contrib/files/browser/fileConstants';
37
- import { IFileDialogService } from 'vscode/vscode/vs/platform/dialogs/common/dialogs.service';
38
- import { RemoveRootFolderAction } from 'vscode/vscode/vs/workbench/browser/actions/workspaceActions';
39
- import { OpenEditorsView } from 'vscode/vscode/vs/workbench/contrib/files/browser/views/openEditorsView';
40
- import { IListService } from 'vscode/vscode/vs/platform/list/browser/listService.service';
41
- import 'vscode/vscode/vs/workbench/contrib/files/browser/fileCommands._save';
42
-
43
- const openWindowCommand = (accessor, toOpen, options) => {
44
- if (Array.isArray(toOpen)) {
45
- const hostService = accessor.get(IHostService);
46
- const environmentService = accessor.get(IEnvironmentService);
47
- toOpen = ( (toOpen.map(openable => {
48
- if (isWorkspaceToOpen(openable) && openable.workspaceUri.scheme === Schemas.untitled) {
49
- return {
50
- workspaceUri: joinPath(environmentService.untitledWorkspacesHome, openable.workspaceUri.path, UNTITLED_WORKSPACE_NAME)
51
- };
52
- }
53
- return openable;
54
- })));
55
- hostService.openWindow(toOpen, options);
56
- }
57
- };
58
- const newWindowCommand = (accessor, options) => {
59
- const hostService = accessor.get(IHostService);
60
- hostService.openWindow(options);
61
- };
62
- KeybindingsRegistry.registerCommandAndKeybindingRule({
63
- weight: 200 ,
64
- when: ExplorerFocusCondition,
65
- primary: 2048 | 3 ,
66
- mac: {
67
- primary: 256 | 3
68
- },
69
- id: OPEN_TO_SIDE_COMMAND_ID, handler: async (accessor, resource) => {
70
- const editorService = accessor.get(IEditorService);
71
- const fileService = accessor.get(IFileService);
72
- const explorerService = accessor.get(IExplorerService);
73
- const resources = getMultiSelectedResources(resource, accessor.get(IListService), editorService, accessor.get(IEditorGroupsService), explorerService);
74
- if (resources.length) {
75
- const untitledResources = resources.filter(resource => resource.scheme === Schemas.untitled);
76
- const fileResources = resources.filter(resource => resource.scheme !== Schemas.untitled);
77
- const items = await Promise.all(( (fileResources.map(async (resource) => {
78
- const item = explorerService.findClosest(resource);
79
- if (item) {
80
- return item;
81
- }
82
- return await fileService.stat(resource);
83
- }))));
84
- const files = items.filter(i => !i.isDirectory);
85
- const editors = ( (files.map(f => ({
86
- resource: f.resource,
87
- options: { pinned: true }
88
- })))).concat(...( (untitledResources.map(
89
- untitledResource => ({ resource: untitledResource, options: { pinned: true } })
90
- ))));
91
- await editorService.openEditors(editors, SIDE_GROUP);
92
- }
93
- }
94
- });
95
- KeybindingsRegistry.registerCommandAndKeybindingRule({
96
- weight: 200 + 10,
97
- when: ( (ContextKeyExpr.and(
98
- FilesExplorerFocusCondition,
99
- (ExplorerFolderContext.toNegated())
100
- ))),
101
- primary: 3 ,
102
- mac: {
103
- primary: 2048 | 18
104
- },
105
- id: 'explorer.openAndPassFocus', handler: async (accessor, _resource) => {
106
- const editorService = accessor.get(IEditorService);
107
- const explorerService = accessor.get(IExplorerService);
108
- const resources = explorerService.getContext(true);
109
- if (resources.length) {
110
- await editorService.openEditors(( (resources.map(
111
- r => ({ resource: r.resource, options: { preserveFocus: false, pinned: true } })
112
- ))));
113
- }
114
- }
115
- });
116
- const COMPARE_WITH_SAVED_SCHEMA = 'showModifications';
117
- let providerDisposables = [];
118
- KeybindingsRegistry.registerCommandAndKeybindingRule({
119
- id: COMPARE_WITH_SAVED_COMMAND_ID,
120
- when: undefined,
121
- weight: 200 ,
122
- primary: KeyChord(2048 | 41 , 34 ),
123
- handler: async (accessor, resource) => {
124
- const instantiationService = accessor.get(IInstantiationService);
125
- const textModelService = accessor.get(ITextModelService);
126
- const editorService = accessor.get(IEditorService);
127
- const fileService = accessor.get(IFileService);
128
- const listService = accessor.get(IListService);
129
- let registerEditorListener = false;
130
- if (providerDisposables.length === 0) {
131
- registerEditorListener = true;
132
- const provider = instantiationService.createInstance(TextFileContentProvider);
133
- providerDisposables.push(provider);
134
- providerDisposables.push(textModelService.registerTextModelContentProvider(COMPARE_WITH_SAVED_SCHEMA, provider));
135
- }
136
- const uri = getResourceForCommand(resource, editorService, listService);
137
- if (uri && fileService.hasProvider(uri)) {
138
- const name = basename(uri);
139
- const editorLabel = ( localize(2154, "{0} (in file) ↔ {1}", name, name));
140
- try {
141
- await TextFileContentProvider.open(uri, COMPARE_WITH_SAVED_SCHEMA, editorLabel, editorService, { pinned: true });
142
- if (registerEditorListener) {
143
- providerDisposables.push(editorService.onDidVisibleEditorsChange(() => {
144
- if (!( (editorService.editors.some(
145
- editor => !!EditorResourceAccessor.getCanonicalUri(editor, { supportSideBySide: SideBySideEditor.SECONDARY, filterByScheme: COMPARE_WITH_SAVED_SCHEMA })
146
- )))) {
147
- providerDisposables = dispose(providerDisposables);
148
- }
149
- }));
150
- }
151
- }
152
- catch {
153
- providerDisposables = dispose(providerDisposables);
154
- }
155
- }
156
- }
157
- });
158
- let globalResourceToCompare;
159
- let resourceSelectedForCompareContext;
160
- CommandsRegistry.registerCommand({
161
- id: SELECT_FOR_COMPARE_COMMAND_ID,
162
- handler: (accessor, resource) => {
163
- globalResourceToCompare = getResourceForCommand(resource, accessor.get(IEditorService), accessor.get(IListService));
164
- if (!resourceSelectedForCompareContext) {
165
- resourceSelectedForCompareContext = ResourceSelectedForCompareContext.bindTo(accessor.get(IContextKeyService));
166
- }
167
- resourceSelectedForCompareContext.set(true);
168
- }
169
- });
170
- CommandsRegistry.registerCommand({
171
- id: COMPARE_SELECTED_COMMAND_ID,
172
- handler: async (accessor, resource) => {
173
- const editorService = accessor.get(IEditorService);
174
- const resources = getMultiSelectedResources(resource, accessor.get(IListService), editorService, accessor.get(IEditorGroupsService), accessor.get(IExplorerService));
175
- if (resources.length === 2) {
176
- return editorService.openEditor({
177
- original: { resource: resources[0] },
178
- modified: { resource: resources[1] },
179
- options: { pinned: true }
180
- });
181
- }
182
- return true;
183
- }
184
- });
185
- CommandsRegistry.registerCommand({
186
- id: COMPARE_RESOURCE_COMMAND_ID,
187
- handler: (accessor, resource) => {
188
- const editorService = accessor.get(IEditorService);
189
- const rightResource = getResourceForCommand(resource, editorService, accessor.get(IListService));
190
- if (globalResourceToCompare && rightResource) {
191
- editorService.openEditor({
192
- original: { resource: globalResourceToCompare },
193
- modified: { resource: rightResource },
194
- options: { pinned: true }
195
- });
196
- }
197
- }
198
- });
199
- async function resourcesToClipboard(resources, relative, clipboardService, labelService, configurationService) {
200
- if (resources.length) {
201
- const lineDelimiter = isWindows ? '\r\n' : '\n';
202
- let separator = undefined;
203
- if (relative) {
204
- const relativeSeparator = configurationService.getValue('explorer.copyRelativePathSeparator');
205
- if (relativeSeparator === '/' || relativeSeparator === '\\') {
206
- separator = relativeSeparator;
207
- }
208
- }
209
- const text = ( (resources.map(
210
- resource => labelService.getUriLabel(resource, { relative, noPrefix: true, separator })
211
- ))).join(lineDelimiter);
212
- await clipboardService.writeText(text);
213
- }
214
- }
215
- const copyPathCommandHandler = async (accessor, resource) => {
216
- const resources = getMultiSelectedResources(resource, accessor.get(IListService), accessor.get(IEditorService), accessor.get(IEditorGroupsService), accessor.get(IExplorerService));
217
- await resourcesToClipboard(resources, false, accessor.get(IClipboardService), accessor.get(ILabelService), accessor.get(IConfigurationService));
218
- };
219
- KeybindingsRegistry.registerCommandAndKeybindingRule({
220
- weight: 200 ,
221
- when: ( (EditorContextKeys.focus.toNegated())),
222
- primary: 2048 | 512 | 33 ,
223
- win: {
224
- primary: 1024 | 512 | 33
225
- },
226
- id: COPY_PATH_COMMAND_ID,
227
- handler: copyPathCommandHandler
228
- });
229
- KeybindingsRegistry.registerCommandAndKeybindingRule({
230
- weight: 200 ,
231
- when: EditorContextKeys.focus,
232
- primary: KeyChord(2048 | 41 , 2048 | 512 | 33 ),
233
- win: {
234
- primary: 1024 | 512 | 33
235
- },
236
- id: COPY_PATH_COMMAND_ID,
237
- handler: copyPathCommandHandler
238
- });
239
- const copyRelativePathCommandHandler = async (accessor, resource) => {
240
- const resources = getMultiSelectedResources(resource, accessor.get(IListService), accessor.get(IEditorService), accessor.get(IEditorGroupsService), accessor.get(IExplorerService));
241
- await resourcesToClipboard(resources, true, accessor.get(IClipboardService), accessor.get(ILabelService), accessor.get(IConfigurationService));
242
- };
243
- KeybindingsRegistry.registerCommandAndKeybindingRule({
244
- weight: 200 ,
245
- when: ( (EditorContextKeys.focus.toNegated())),
246
- primary: 2048 | 1024 | 512 | 33 ,
247
- win: {
248
- primary: KeyChord(2048 | 41 , 2048 | 1024 | 33 )
249
- },
250
- id: COPY_RELATIVE_PATH_COMMAND_ID,
251
- handler: copyRelativePathCommandHandler
252
- });
253
- KeybindingsRegistry.registerCommandAndKeybindingRule({
254
- weight: 200 ,
255
- when: EditorContextKeys.focus,
256
- primary: KeyChord(2048 | 41 , 2048 | 1024 | 512 | 33 ),
257
- win: {
258
- primary: KeyChord(2048 | 41 , 2048 | 1024 | 33 )
259
- },
260
- id: COPY_RELATIVE_PATH_COMMAND_ID,
261
- handler: copyRelativePathCommandHandler
262
- });
263
- KeybindingsRegistry.registerCommandAndKeybindingRule({
264
- weight: 200 ,
265
- when: undefined,
266
- primary: KeyChord(2048 | 41 , 46 ),
267
- id: 'workbench.action.files.copyPathOfActiveFile',
268
- handler: async (accessor) => {
269
- const editorService = accessor.get(IEditorService);
270
- const activeInput = editorService.activeEditor;
271
- const resource = EditorResourceAccessor.getOriginalUri(activeInput, { supportSideBySide: SideBySideEditor.PRIMARY });
272
- const resources = resource ? [resource] : [];
273
- await resourcesToClipboard(resources, false, accessor.get(IClipboardService), accessor.get(ILabelService), accessor.get(IConfigurationService));
274
- }
275
- });
276
- CommandsRegistry.registerCommand({
277
- id: REVEAL_IN_EXPLORER_COMMAND_ID,
278
- handler: async (accessor, resource) => {
279
- const viewService = accessor.get(IViewsService);
280
- const contextService = accessor.get(IWorkspaceContextService);
281
- const explorerService = accessor.get(IExplorerService);
282
- const editorService = accessor.get(IEditorService);
283
- const listService = accessor.get(IListService);
284
- const uri = getResourceForCommand(resource, editorService, listService);
285
- if (uri && contextService.isInsideWorkspace(uri)) {
286
- const explorerView = await viewService.openView(VIEW_ID, false);
287
- if (explorerView) {
288
- const oldAutoReveal = explorerView.autoReveal;
289
- explorerView.autoReveal = false;
290
- explorerView.setExpanded(true);
291
- await explorerService.select(uri, 'force');
292
- explorerView.focus();
293
- explorerView.autoReveal = oldAutoReveal;
294
- }
295
- }
296
- else {
297
- const openEditorsView = viewService.getViewWithId(OpenEditorsView.ID);
298
- if (openEditorsView) {
299
- openEditorsView.setExpanded(true);
300
- openEditorsView.focus();
301
- }
302
- }
303
- }
304
- });
305
- CommandsRegistry.registerCommand({
306
- id: OPEN_WITH_EXPLORER_COMMAND_ID,
307
- handler: async (accessor, resource) => {
308
- const editorService = accessor.get(IEditorService);
309
- const listService = accessor.get(IListService);
310
- const uri = getResourceForCommand(resource, editorService, listService);
311
- if (uri) {
312
- return editorService.openEditor({ resource: uri, options: { override: EditorResolution.PICK, source: EditorOpenSource.USER } });
313
- }
314
- return undefined;
315
- }
316
- });
317
- CommandsRegistry.registerCommand({
318
- id: REMOVE_ROOT_FOLDER_COMMAND_ID,
319
- handler: (accessor, resource) => {
320
- const contextService = accessor.get(IWorkspaceContextService);
321
- const uriIdentityService = accessor.get(IUriIdentityService);
322
- const workspace = contextService.getWorkspace();
323
- const resources = getMultiSelectedResources(resource, accessor.get(IListService), accessor.get(IEditorService), accessor.get(IEditorGroupsService), accessor.get(IExplorerService)).filter(resource => ( (workspace.folders.some(folder => uriIdentityService.extUri.isEqual(folder.uri, resource))))
324
- );
325
- if (resources.length === 0) {
326
- const commandService = accessor.get(ICommandService);
327
- return commandService.executeCommand(RemoveRootFolderAction.ID);
328
- }
329
- const workspaceEditingService = accessor.get(IWorkspaceEditingService);
330
- return workspaceEditingService.removeFolders(resources);
331
- }
332
- });
333
- KeybindingsRegistry.registerCommandAndKeybindingRule({
334
- weight: 200 + 10,
335
- when: ( (ContextKeyExpr.and(
336
- FilesExplorerFocusCondition,
337
- ExplorerCompressedFocusContext,
338
- (ExplorerCompressedFirstFocusContext.negate())
339
- ))),
340
- primary: 15 ,
341
- id: PREVIOUS_COMPRESSED_FOLDER,
342
- handler: accessor => {
343
- const paneCompositeService = accessor.get(IPaneCompositePartService);
344
- const viewlet = paneCompositeService.getActivePaneComposite(0 );
345
- if (viewlet?.getId() !== VIEWLET_ID) {
346
- return;
347
- }
348
- const explorer = viewlet.getViewPaneContainer();
349
- const view = explorer.getExplorerView();
350
- view.previousCompressedStat();
351
- }
352
- });
353
- KeybindingsRegistry.registerCommandAndKeybindingRule({
354
- weight: 200 + 10,
355
- when: ( (ContextKeyExpr.and(
356
- FilesExplorerFocusCondition,
357
- ExplorerCompressedFocusContext,
358
- (ExplorerCompressedLastFocusContext.negate())
359
- ))),
360
- primary: 17 ,
361
- id: NEXT_COMPRESSED_FOLDER,
362
- handler: accessor => {
363
- const paneCompositeService = accessor.get(IPaneCompositePartService);
364
- const viewlet = paneCompositeService.getActivePaneComposite(0 );
365
- if (viewlet?.getId() !== VIEWLET_ID) {
366
- return;
367
- }
368
- const explorer = viewlet.getViewPaneContainer();
369
- const view = explorer.getExplorerView();
370
- view.nextCompressedStat();
371
- }
372
- });
373
- KeybindingsRegistry.registerCommandAndKeybindingRule({
374
- weight: 200 + 10,
375
- when: ( (ContextKeyExpr.and(
376
- FilesExplorerFocusCondition,
377
- ExplorerCompressedFocusContext,
378
- (ExplorerCompressedFirstFocusContext.negate())
379
- ))),
380
- primary: 14 ,
381
- id: FIRST_COMPRESSED_FOLDER,
382
- handler: accessor => {
383
- const paneCompositeService = accessor.get(IPaneCompositePartService);
384
- const viewlet = paneCompositeService.getActivePaneComposite(0 );
385
- if (viewlet?.getId() !== VIEWLET_ID) {
386
- return;
387
- }
388
- const explorer = viewlet.getViewPaneContainer();
389
- const view = explorer.getExplorerView();
390
- view.firstCompressedStat();
391
- }
392
- });
393
- KeybindingsRegistry.registerCommandAndKeybindingRule({
394
- weight: 200 + 10,
395
- when: ( (ContextKeyExpr.and(
396
- FilesExplorerFocusCondition,
397
- ExplorerCompressedFocusContext,
398
- (ExplorerCompressedLastFocusContext.negate())
399
- ))),
400
- primary: 13 ,
401
- id: LAST_COMPRESSED_FOLDER,
402
- handler: accessor => {
403
- const paneCompositeService = accessor.get(IPaneCompositePartService);
404
- const viewlet = paneCompositeService.getActivePaneComposite(0 );
405
- if (viewlet?.getId() !== VIEWLET_ID) {
406
- return;
407
- }
408
- const explorer = viewlet.getViewPaneContainer();
409
- const view = explorer.getExplorerView();
410
- view.lastCompressedStat();
411
- }
412
- });
413
- KeybindingsRegistry.registerCommandAndKeybindingRule({
414
- weight: 200 ,
415
- when: null,
416
- primary: isWeb ? ((isWindows ? KeyChord(2048 | 41 , 44 ) : 2048 | 512 | 44) ) : 2048 | 44 ,
417
- secondary: isWeb ? [2048 | 44 ] : undefined,
418
- id: NEW_UNTITLED_FILE_COMMAND_ID,
419
- metadata: {
420
- description: NEW_UNTITLED_FILE_LABEL,
421
- args: [
422
- {
423
- isOptional: true,
424
- name: 'New Untitled Text File arguments',
425
- description: 'The editor view type or language ID if known',
426
- schema: {
427
- 'type': 'object',
428
- 'properties': {
429
- 'viewType': {
430
- 'type': 'string'
431
- },
432
- 'languageId': {
433
- 'type': 'string'
434
- }
435
- }
436
- }
437
- }
438
- ]
439
- },
440
- handler: async (accessor, args) => {
441
- const editorService = accessor.get(IEditorService);
442
- await editorService.openEditor({
443
- resource: undefined,
444
- options: {
445
- override: args?.viewType,
446
- pinned: true
447
- },
448
- languageId: args?.languageId,
449
- });
450
- }
451
- });
452
- CommandsRegistry.registerCommand({
453
- id: NEW_FILE_COMMAND_ID,
454
- handler: async (accessor, args) => {
455
- const editorService = accessor.get(IEditorService);
456
- const dialogService = accessor.get(IFileDialogService);
457
- const fileService = accessor.get(IFileService);
458
- const createFileLocalized = ( localize(2155, "Create File"));
459
- const defaultFileUri = joinPath(await dialogService.defaultFilePath(), args?.fileName ?? 'Untitled.txt');
460
- const saveUri = await dialogService.showSaveDialog({ saveLabel: createFileLocalized, title: createFileLocalized, defaultUri: defaultFileUri });
461
- if (!saveUri) {
462
- return;
463
- }
464
- await fileService.createFile(saveUri, undefined, { overwrite: true });
465
- await editorService.openEditor({
466
- resource: saveUri,
467
- options: {
468
- override: args?.viewType,
469
- pinned: true
470
- },
471
- languageId: args?.languageId,
472
- });
473
- }
474
- });
475
-
476
- export { newWindowCommand, openWindowCommand };