@codingame/monaco-vscode-base-service-override 25.1.1 → 26.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.
Files changed (22) hide show
  1. package/index.js +4 -1
  2. package/package.json +2 -2
  3. package/vscode/src/vs/base/common/observableInternal/experimental/time.js +3 -5
  4. package/vscode/src/vs/base/parts/request/common/requestImpl.js +25 -29
  5. package/vscode/src/vs/platform/download/common/downloadService.js +6 -7
  6. package/vscode/src/vs/platform/request/common/requestIpc.js +9 -6
  7. package/vscode/src/vs/workbench/contrib/inlineCompletions/browser/renameSymbolTrackerService.d.ts +18 -0
  8. package/vscode/src/vs/workbench/contrib/inlineCompletions/browser/renameSymbolTrackerService.js +240 -0
  9. package/vscode/src/vs/workbench/services/configuration/common/jsonEditingService.js +37 -23
  10. package/vscode/src/vs/workbench/services/decorations/browser/decorationsService.js +64 -45
  11. package/vscode/src/vs/workbench/services/inlineCompletions/common/inlineCompletionsUnification.js +39 -29
  12. package/vscode/src/vs/workbench/services/label/common/labelService.js +139 -111
  13. package/vscode/src/vs/workbench/services/path/browser/pathService.js +1 -1
  14. package/vscode/src/vs/workbench/services/path/common/pathService.js +12 -19
  15. package/vscode/src/vs/workbench/services/request/browser/requestService.js +16 -14
  16. package/vscode/src/vs/workbench/services/url/browser/urlService.js +9 -9
  17. package/vscode/src/vs/workbench/services/userActivity/common/userActivityRegistry.js +1 -1
  18. package/vscode/src/vs/workbench/services/userActivity/common/userActivityService.js +4 -4
  19. package/vscode/src/vs/workbench/services/userAttention/browser/userAttentionBrowser.js +32 -19
  20. package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopySaveParticipant.js +9 -12
  21. package/vscode/src/vs/workbench/services/workingCopy/common/workingCopyFileOperationParticipant.js +4 -8
  22. package/vscode/src/vs/workbench/services/workingCopy/common/workingCopyFileService.js +100 -41
@@ -29,63 +29,63 @@ import { IStorageService } from '@codingame/monaco-vscode-api/vscode/vs/platform
29
29
  import { Memento } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/memento';
30
30
 
31
31
  const resourceLabelFormattersExtPoint = ExtensionsRegistry.registerExtensionPoint({
32
- extensionPoint: 'resourceLabelFormatters',
32
+ extensionPoint: "resourceLabelFormatters",
33
33
  jsonSchema: {
34
- description: ( localize(14142, 'Contributes resource label formatting rules.')),
35
- type: 'array',
34
+ description: ( localize(14531, "Contributes resource label formatting rules.")),
35
+ type: "array",
36
36
  items: {
37
- type: 'object',
38
- required: ['scheme', 'formatting'],
37
+ type: "object",
38
+ required: ["scheme", "formatting"],
39
39
  properties: {
40
40
  scheme: {
41
- type: 'string',
41
+ type: "string",
42
42
  description: ( localize(
43
- 14143,
44
- 'URI scheme on which to match the formatter on. For example "file". Simple glob patterns are supported.'
45
- )),
43
+ 14532,
44
+ "URI scheme on which to match the formatter on. For example \"file\". Simple glob patterns are supported."
45
+ ))
46
46
  },
47
47
  authority: {
48
- type: 'string',
48
+ type: "string",
49
49
  description: ( localize(
50
- 14144,
51
- 'URI authority on which to match the formatter on. Simple glob patterns are supported.'
52
- )),
50
+ 14533,
51
+ "URI authority on which to match the formatter on. Simple glob patterns are supported."
52
+ ))
53
53
  },
54
54
  formatting: {
55
- description: ( localize(14145, "Rules for formatting uri resource labels.")),
56
- type: 'object',
55
+ description: ( localize(14534, "Rules for formatting uri resource labels.")),
56
+ type: "object",
57
57
  properties: {
58
58
  label: {
59
- type: 'string',
59
+ type: "string",
60
60
  description: ( localize(
61
- 14146,
61
+ 14535,
62
62
  "Label rules to display. For example: myLabel:/${path}. ${path}, ${scheme}, ${authority} and ${authoritySuffix} are supported as variables."
63
63
  ))
64
64
  },
65
65
  separator: {
66
- type: 'string',
66
+ type: "string",
67
67
  description: ( localize(
68
- 14147,
69
- "Separator to be used in the uri label display. '/' or '\' as an example."
68
+ 14536,
69
+ "Separator to be used in the uri label display. '/' or '' as an example."
70
70
  ))
71
71
  },
72
72
  stripPathStartingSeparator: {
73
- type: 'boolean',
73
+ type: "boolean",
74
74
  description: ( localize(
75
- 14148,
75
+ 14537,
76
76
  "Controls whether `${path}` substitutions should have starting separator characters stripped."
77
77
  ))
78
78
  },
79
79
  tildify: {
80
- type: 'boolean',
80
+ type: "boolean",
81
81
  description: ( localize(
82
- 14149,
82
+ 14538,
83
83
  "Controls if the start of the uri label should be tildified when possible."
84
84
  ))
85
85
  },
86
86
  workspaceSuffix: {
87
- type: 'string',
88
- description: ( localize(14150, "Suffix appended to the workspace label."))
87
+ type: "string",
88
+ description: ( localize(14539, "Suffix appended to the workspace label."))
89
89
  }
90
90
  }
91
91
  }
@@ -97,7 +97,7 @@ const posixPathSeparatorRegexp = /\//g;
97
97
  const winPathSeparatorRegexp = /[\\\/]/g;
98
98
  const labelMatchingRegexp = /\$\{(scheme|authoritySuffix|authority|path|(query)\.(.+?))\}/g;
99
99
  function hasDriveLetterIgnorePlatform(path) {
100
- return !!(path && path[2] === ':');
100
+ return !!(path && path[2] === ":");
101
101
  }
102
102
  let ResourceLabelFormattersHandler = class ResourceLabelFormattersHandler {
103
103
  constructor(labelService) {
@@ -105,14 +105,16 @@ let ResourceLabelFormattersHandler = class ResourceLabelFormattersHandler {
105
105
  resourceLabelFormattersExtPoint.setHandler((extensions, delta) => {
106
106
  for (const added of delta.added) {
107
107
  for (const untrustedFormatter of added.value) {
108
- const formatter = { ...untrustedFormatter };
109
- if (typeof formatter.formatting.label !== 'string') {
110
- formatter.formatting.label = '${authority}${path}';
108
+ const formatter = {
109
+ ...untrustedFormatter
110
+ };
111
+ if (typeof formatter.formatting.label !== "string") {
112
+ formatter.formatting.label = "${authority}${path}";
111
113
  }
112
114
  if (typeof formatter.formatting.separator !== `string`) {
113
115
  formatter.formatting.separator = sep;
114
116
  }
115
- if (!isProposedApiEnabled(added.description, 'contribLabelFormatterWorkspaceTooltip') && formatter.formatting.workspaceTooltip) {
117
+ if (!isProposedApiEnabled(added.description, "contribLabelFormatterWorkspaceTooltip") && formatter.formatting.workspaceTooltip) {
116
118
  formatter.formatting.workspaceTooltip = undefined;
117
119
  }
118
120
  this.formattersDisposables.set(formatter, labelService.registerFormatter(formatter));
@@ -126,23 +128,32 @@ let ResourceLabelFormattersHandler = class ResourceLabelFormattersHandler {
126
128
  });
127
129
  }
128
130
  };
129
- ResourceLabelFormattersHandler = ( __decorate([
130
- ( __param(0, ILabelService))
131
- ], ResourceLabelFormattersHandler));
131
+ ResourceLabelFormattersHandler = ( __decorate([( __param(0, ILabelService))], ResourceLabelFormattersHandler));
132
132
  ( Registry.as(Extensions.Workbench)).registerWorkbenchContribution(ResourceLabelFormattersHandler, LifecyclePhase.Restored);
133
133
  const FORMATTER_CACHE_SIZE = 50;
134
134
  let LabelService = class LabelService extends Disposable {
135
- constructor(environmentService, contextService, pathService, remoteAgentService, storageService, lifecycleService) {
135
+ constructor(
136
+ environmentService,
137
+ contextService,
138
+ pathService,
139
+ remoteAgentService,
140
+ storageService,
141
+ lifecycleService
142
+ ) {
136
143
  super();
137
144
  this.environmentService = environmentService;
138
145
  this.contextService = contextService;
139
146
  this.pathService = pathService;
140
147
  this.remoteAgentService = remoteAgentService;
141
- this._onDidChangeFormatters = this._register(( new Emitter({ leakWarningThreshold: 400 })));
148
+ this._onDidChangeFormatters = this._register(( new Emitter({
149
+ leakWarningThreshold: 400
150
+ })));
142
151
  this.onDidChangeFormatters = this._onDidChangeFormatters.event;
143
152
  this.os = OS;
144
- this.userHome = pathService.defaultUriScheme === Schemas.file ? this.pathService.userHome({ preferLocal: true }) : undefined;
145
- const memento = this.storedFormattersMemento = ( new Memento('cachedResourceLabelFormatters2', storageService));
153
+ this.userHome = pathService.defaultUriScheme === Schemas.file ? this.pathService.userHome({
154
+ preferLocal: true
155
+ }) : undefined;
156
+ const memento = this.storedFormattersMemento = ( new Memento("cachedResourceLabelFormatters2", storageService));
146
157
  this.storedFormatters = memento.getMemento(StorageScope.PROFILE, StorageTarget.MACHINE);
147
158
  this.formatters = this.storedFormatters?.formatters?.slice() || [];
148
159
  this.resolveRemoteEnvironment();
@@ -163,10 +174,9 @@ let LabelService = class LabelService extends Disposable {
163
174
  if (!formatter.authority) {
164
175
  continue;
165
176
  }
166
- if (match(formatter.authority, resource.authority, { ignoreCase: true }) &&
167
- (!bestResult?.authority ||
168
- formatter.authority.length > bestResult.authority.length ||
169
- ((formatter.authority.length === bestResult.authority.length) && formatter.priority))) {
177
+ if (match(formatter.authority, resource.authority, {
178
+ ignoreCase: true
179
+ }) && (!bestResult?.authority || formatter.authority.length > bestResult.authority.length || ((formatter.authority.length === bestResult.authority.length) && formatter.priority))) {
170
180
  bestResult = formatter;
171
181
  }
172
182
  }
@@ -176,7 +186,10 @@ let LabelService = class LabelService extends Disposable {
176
186
  getUriLabel(resource, options = {}) {
177
187
  let formatting = this.findFormatting(resource);
178
188
  if (formatting && options.separator) {
179
- formatting = { ...formatting, separator: options.separator };
189
+ formatting = {
190
+ ...formatting,
191
+ separator: options.separator
192
+ };
180
193
  }
181
194
  let label = this.doGetUriLabel(resource, formatting, options);
182
195
  if (!formatting && options.separator) {
@@ -191,7 +204,9 @@ let LabelService = class LabelService extends Disposable {
191
204
  if (!formatting) {
192
205
  return getPathLabel(resource, {
193
206
  os: this.os,
194
- tildify: this.userHome ? { userHome: this.userHome } : undefined,
207
+ tildify: this.userHome ? {
208
+ userHome: this.userHome
209
+ } : undefined,
195
210
  relative: options.relative ? {
196
211
  noPrefix: options.noPrefix,
197
212
  getWorkspace: () => this.contextService.getWorkspace(),
@@ -205,7 +220,9 @@ let LabelService = class LabelService extends Disposable {
205
220
  const workspace = this.contextService.getWorkspace();
206
221
  const firstFolder = workspace.folders.at(0);
207
222
  if (firstFolder && resource.scheme !== firstFolder.uri.scheme && resource.path.startsWith(posix.sep)) {
208
- folder = this.contextService.getWorkspaceFolder(firstFolder.uri.with({ path: resource.path }));
223
+ folder = this.contextService.getWorkspaceFolder(firstFolder.uri.with({
224
+ path: resource.path
225
+ }));
209
226
  }
210
227
  }
211
228
  if (folder) {
@@ -217,8 +234,7 @@ let LabelService = class LabelService extends Disposable {
217
234
  }
218
235
  if (!relativeLabel[overlap] || relativeLabel[overlap] === formatting.separator) {
219
236
  relativeLabel = relativeLabel.substring(1 + overlap);
220
- }
221
- else if (overlap === folderLabel.length && folder.uri.path === posix.sep) {
237
+ } else if (overlap === folderLabel.length && folder.uri.path === posix.sep) {
222
238
  relativeLabel = relativeLabel.substring(overlap);
223
239
  }
224
240
  const hasMultipleRoots = this.contextService.getWorkspace().folders.length > 1;
@@ -237,22 +253,23 @@ let LabelService = class LabelService extends Disposable {
237
253
  let pathLib;
238
254
  if (formatting?.separator === win32.sep) {
239
255
  pathLib = win32;
240
- }
241
- else if (formatting?.separator === posix.sep) {
256
+ } else if (formatting?.separator === posix.sep) {
242
257
  pathLib = posix;
243
- }
244
- else {
258
+ } else {
245
259
  pathLib = (this.os === OperatingSystem.Windows) ? win32 : posix;
246
260
  }
247
261
  return pathLib.basename(label);
248
262
  }
249
263
  getWorkspaceLabel(workspace, options) {
250
264
  if (isWorkspace(workspace)) {
265
+ if (workspace.isAgentSessionsWorkspace) {
266
+ return localize(14540, "Agent Sessions");
267
+ }
251
268
  const identifier = toWorkspaceIdentifier(workspace);
252
269
  if (isSingleFolderWorkspaceIdentifier(identifier) || isWorkspaceIdentifier(identifier)) {
253
270
  return this.getWorkspaceLabel(identifier, options);
254
271
  }
255
- return '';
272
+ return "";
256
273
  }
257
274
  if (URI.isUri(workspace)) {
258
275
  return this.doGetSingleFolderWorkspaceLabel(workspace, options);
@@ -263,14 +280,14 @@ let LabelService = class LabelService extends Disposable {
263
280
  if (isWorkspaceIdentifier(workspace)) {
264
281
  return this.doGetWorkspaceLabel(workspace.configPath, options);
265
282
  }
266
- return '';
283
+ return "";
267
284
  }
268
285
  doGetWorkspaceLabel(workspaceUri, options) {
269
286
  if (isUntitledWorkspace(workspaceUri, this.environmentService)) {
270
- return localize(14151, "Untitled (Workspace)");
287
+ return localize(14541, "Untitled (Workspace)");
271
288
  }
272
289
  if (isTemporaryWorkspace(workspaceUri)) {
273
- return localize(14152, "Workspace");
290
+ return localize(14542, "Workspace");
274
291
  }
275
292
  let filename = basename(workspaceUri);
276
293
  if (filename.endsWith(WORKSPACE_EXTENSION)) {
@@ -278,20 +295,20 @@ let LabelService = class LabelService extends Disposable {
278
295
  }
279
296
  let label;
280
297
  switch (options?.verbose) {
281
- case Verbosity.SHORT:
282
- label = filename;
283
- break;
284
- case Verbosity.LONG:
285
- label = ( localize(
286
- 14153,
287
- "{0} (Workspace)",
288
- this.getUriLabel(joinPath(dirname(workspaceUri), filename))
289
- ));
290
- break;
291
- case Verbosity.MEDIUM:
292
- default:
293
- label = ( localize(14154, "{0} (Workspace)", filename));
294
- break;
298
+ case Verbosity.SHORT:
299
+ label = filename;
300
+ break;
301
+ case Verbosity.LONG:
302
+ label = ( localize(
303
+ 14543,
304
+ "{0} (Workspace)",
305
+ this.getUriLabel(joinPath(dirname(workspaceUri), filename))
306
+ ));
307
+ break;
308
+ case Verbosity.MEDIUM:
309
+ default:
310
+ label = ( localize(14544, "{0} (Workspace)", filename));
311
+ break;
295
312
  }
296
313
  if (options?.verbose === Verbosity.SHORT) {
297
314
  return label;
@@ -301,14 +318,14 @@ let LabelService = class LabelService extends Disposable {
301
318
  doGetSingleFolderWorkspaceLabel(folderUri, options) {
302
319
  let label;
303
320
  switch (options?.verbose) {
304
- case Verbosity.LONG:
305
- label = this.getUriLabel(folderUri);
306
- break;
307
- case Verbosity.SHORT:
308
- case Verbosity.MEDIUM:
309
- default:
310
- label = basename(folderUri) || posix.sep;
311
- break;
321
+ case Verbosity.LONG:
322
+ label = this.getUriLabel(folderUri);
323
+ break;
324
+ case Verbosity.SHORT:
325
+ case Verbosity.MEDIUM:
326
+ default:
327
+ label = basename(folderUri) || posix.sep;
328
+ break;
312
329
  }
313
330
  if (options?.verbose === Verbosity.SHORT) {
314
331
  return label;
@@ -316,15 +333,24 @@ let LabelService = class LabelService extends Disposable {
316
333
  return this.appendWorkspaceSuffix(label, folderUri);
317
334
  }
318
335
  getSeparator(scheme, authority) {
319
- const formatter = this.findFormatting(( URI.from({ scheme, authority })));
336
+ const formatter = this.findFormatting(( URI.from({
337
+ scheme,
338
+ authority
339
+ })));
320
340
  return formatter?.separator || posix.sep;
321
341
  }
322
342
  getHostLabel(scheme, authority) {
323
- const formatter = this.findFormatting(( URI.from({ scheme, authority })));
324
- return formatter?.workspaceSuffix || authority || '';
343
+ const formatter = this.findFormatting(( URI.from({
344
+ scheme,
345
+ authority
346
+ })));
347
+ return formatter?.workspaceSuffix || authority || "";
325
348
  }
326
349
  getHostTooltip(scheme, authority) {
327
- const formatter = this.findFormatting(( URI.from({ scheme, authority })));
350
+ const formatter = this.findFormatting(( URI.from({
351
+ scheme,
352
+ authority
353
+ })));
328
354
  return formatter?.workspaceTooltip;
329
355
  }
330
356
  registerCachedFormatter(formatter) {
@@ -335,8 +361,7 @@ let LabelService = class LabelService extends Disposable {
335
361
  }
336
362
  if (replace === -1) {
337
363
  list.unshift(formatter);
338
- }
339
- else {
364
+ } else {
340
365
  for (let i = replace; i > 0; i--) {
341
366
  list[i] = list[i - 1];
342
367
  }
@@ -347,38 +372,45 @@ let LabelService = class LabelService extends Disposable {
347
372
  }
348
373
  registerFormatter(formatter) {
349
374
  this.formatters.push(formatter);
350
- this._onDidChangeFormatters.fire({ scheme: formatter.scheme });
375
+ this._onDidChangeFormatters.fire({
376
+ scheme: formatter.scheme
377
+ });
351
378
  return {
352
379
  dispose: () => {
353
380
  this.formatters = this.formatters.filter(f => f !== formatter);
354
- this._onDidChangeFormatters.fire({ scheme: formatter.scheme });
381
+ this._onDidChangeFormatters.fire({
382
+ scheme: formatter.scheme
383
+ });
355
384
  }
356
385
  };
357
386
  }
358
387
  formatUri(resource, formatting, forceNoTildify) {
359
388
  let label = formatting.label.replace(labelMatchingRegexp, (match, token, qsToken, qsValue) => {
360
389
  switch (token) {
361
- case 'scheme': return resource.scheme;
362
- case 'authority': return resource.authority;
363
- case 'authoritySuffix': {
364
- const i = resource.authority.indexOf('+');
390
+ case "scheme":
391
+ return resource.scheme;
392
+ case "authority":
393
+ return resource.authority;
394
+ case "authoritySuffix":
395
+ {
396
+ const i = resource.authority.indexOf("+");
365
397
  return i === -1 ? resource.authority : resource.authority.slice(i + 1);
366
398
  }
367
- case 'path':
368
- return formatting.stripPathStartingSeparator
369
- ? resource.path.slice(resource.path[0] === formatting.separator ? 1 : 0)
370
- : resource.path;
371
- default: {
372
- if (qsToken === 'query') {
373
- const { query } = resource;
374
- if (query && query[0] === '{' && query[query.length - 1] === '}') {
399
+ case "path":
400
+ return formatting.stripPathStartingSeparator ? resource.path.slice(resource.path[0] === formatting.separator ? 1 : 0) : resource.path;
401
+ default:
402
+ {
403
+ if (qsToken === "query") {
404
+ const {
405
+ query
406
+ } = resource;
407
+ if (query && query[0] === "{" && query[query.length - 1] === "}") {
375
408
  try {
376
- return JSON.parse(query)[qsValue] || '';
377
- }
378
- catch { }
409
+ return JSON.parse(query)[qsValue] || "";
410
+ } catch {}
379
411
  }
380
412
  }
381
- return '';
413
+ return "";
382
414
  }
383
415
  }
384
416
  });
@@ -396,21 +428,17 @@ let LabelService = class LabelService extends Disposable {
396
428
  return this.adjustPathSeparators(label, formatting.separator);
397
429
  }
398
430
  adjustPathSeparators(label, separator) {
399
- return label.replace(this.os === OperatingSystem.Windows ? winPathSeparatorRegexp : posixPathSeparatorRegexp, separator);
431
+ return label.replace(
432
+ this.os === OperatingSystem.Windows ? winPathSeparatorRegexp : posixPathSeparatorRegexp,
433
+ separator
434
+ );
400
435
  }
401
436
  appendWorkspaceSuffix(label, uri) {
402
437
  const formatting = this.findFormatting(uri);
403
- const suffix = formatting && (typeof formatting.workspaceSuffix === 'string') ? formatting.workspaceSuffix : undefined;
438
+ const suffix = formatting && (typeof formatting.workspaceSuffix === "string") ? formatting.workspaceSuffix : undefined;
404
439
  return suffix ? `${label} [${suffix}]` : label;
405
440
  }
406
441
  };
407
- LabelService = ( __decorate([
408
- ( __param(0, IWorkbenchEnvironmentService)),
409
- ( __param(1, IWorkspaceContextService)),
410
- ( __param(2, IPathService)),
411
- ( __param(3, IRemoteAgentService)),
412
- ( __param(4, IStorageService)),
413
- ( __param(5, ILifecycleService))
414
- ], LabelService));
442
+ LabelService = ( __decorate([( __param(0, IWorkbenchEnvironmentService)), ( __param(1, IWorkspaceContextService)), ( __param(2, IPathService)), ( __param(3, IRemoteAgentService)), ( __param(4, IStorageService)), ( __param(5, ILifecycleService))], LabelService));
415
443
 
416
444
  export { LabelService };
@@ -17,7 +17,7 @@ function guessLocalUserHome(environmentService, contextService) {
17
17
  return ( URI.from({
18
18
  scheme: AbstractPathService.findDefaultUriScheme(environmentService, contextService),
19
19
  authority: environmentService.remoteAuthority,
20
- path: '/'
20
+ path: "/"
21
21
  }));
22
22
  }
23
23
 
@@ -29,7 +29,7 @@ let AbstractPathService = AbstractPathService_1 = class AbstractPathService {
29
29
  })();
30
30
  }
31
31
  hasValidBasename(resource, arg2, basename) {
32
- if (typeof arg2 === 'string' || typeof arg2 === 'undefined') {
32
+ if (typeof arg2 === "string" || typeof arg2 === "undefined") {
33
33
  return this.resolveOS.then(os => this.doHasValidBasename(resource, os, arg2));
34
34
  }
35
35
  return this.doHasValidBasename(resource, arg2, basename);
@@ -69,41 +69,34 @@ let AbstractPathService = AbstractPathService_1 = class AbstractPathService {
69
69
  }
70
70
  get path() {
71
71
  return this.resolveOS.then(os => {
72
- return os === OperatingSystem.Windows ?
73
- win32 :
74
- posix;
72
+ return os === OperatingSystem.Windows ? win32 : posix;
75
73
  });
76
74
  }
77
75
  async fileURI(_path) {
78
- let authority = '';
76
+ let authority = "";
79
77
  const os = await this.resolveOS;
80
78
  if (os === OperatingSystem.Windows) {
81
- _path = _path.replace(/\\/g, '/');
79
+ _path = _path.replace(/\\/g, "/");
82
80
  }
83
- if (_path[0] === '/' && _path[1] === '/') {
84
- const idx = _path.indexOf('/', 2);
81
+ if (_path[0] === "/" && _path[1] === "/") {
82
+ const idx = _path.indexOf("/", 2);
85
83
  if (idx === -1) {
86
84
  authority = _path.substring(2);
87
- _path = '/';
88
- }
89
- else {
85
+ _path = "/";
86
+ } else {
90
87
  authority = _path.substring(2, idx);
91
- _path = _path.substring(idx) || '/';
88
+ _path = _path.substring(idx) || "/";
92
89
  }
93
90
  }
94
91
  return ( URI.from({
95
92
  scheme: Schemas.file,
96
93
  authority,
97
94
  path: _path,
98
- query: '',
99
- fragment: ''
95
+ query: "",
96
+ fragment: ""
100
97
  }));
101
98
  }
102
99
  };
103
- AbstractPathService = AbstractPathService_1 = ( __decorate([
104
- ( __param(1, IRemoteAgentService)),
105
- ( __param(2, IWorkbenchEnvironmentService)),
106
- ( __param(3, IWorkspaceContextService))
107
- ], AbstractPathService));
100
+ AbstractPathService = AbstractPathService_1 = ( __decorate([( __param(1, IRemoteAgentService)), ( __param(2, IWorkbenchEnvironmentService)), ( __param(3, IWorkspaceContextService))], AbstractPathService));
108
101
 
109
102
  export { AbstractPathService };
@@ -14,7 +14,10 @@ import { mainWindow } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/
14
14
 
15
15
  let BrowserRequestService = class BrowserRequestService extends AbstractRequestService {
16
16
  constructor(remoteAgentService, configurationService, loggerService) {
17
- const logger = loggerService.createLogger(`network`, { name: ( localize(14260, "Network")), group: windowLogGroup });
17
+ const logger = loggerService.createLogger(`network`, {
18
+ name: ( localize(14651, "Network")),
19
+ group: windowLogGroup
20
+ });
18
21
  const logService = ( new LogService(logger));
19
22
  super(logService);
20
23
  this.remoteAgentService = remoteAgentService;
@@ -25,7 +28,7 @@ let BrowserRequestService = class BrowserRequestService extends AbstractRequestS
25
28
  async request(options, token) {
26
29
  try {
27
30
  if (!options.proxyAuthorization) {
28
- options.proxyAuthorization = this.configurationService.inspect('http.proxyAuthorization').userLocalValue;
31
+ options.proxyAuthorization = this.configurationService.inspect("http.proxyAuthorization").userLocalValue;
29
32
  }
30
33
  const context = await this.logAndRequest(options, () => request(options, token, () => mainWindow.navigator.onLine));
31
34
  const connection = this.remoteAgentService.getConnection();
@@ -33,8 +36,7 @@ let BrowserRequestService = class BrowserRequestService extends AbstractRequestS
33
36
  return this._makeRemoteRequest(connection, options, token);
34
37
  }
35
38
  return context;
36
- }
37
- catch (error) {
39
+ } catch (error) {
38
40
  const connection = this.remoteAgentService.getConnection();
39
41
  if (connection) {
40
42
  return this._makeRemoteRequest(connection, options, token);
@@ -55,20 +57,20 @@ let BrowserRequestService = class BrowserRequestService extends AbstractRequestS
55
57
  return [];
56
58
  }
57
59
  _makeRemoteRequest(connection, options, token) {
58
- return connection.withChannel('request', channel => ( new RequestChannelClient(channel)).request(options, token));
60
+ return connection.withChannel("request", channel => ( new RequestChannelClient(channel)).request(options, token));
59
61
  }
60
62
  };
61
- BrowserRequestService = ( __decorate([
62
- ( __param(0, IRemoteAgentService)),
63
- ( __param(1, IConfigurationService)),
64
- ( __param(2, ILoggerService))
65
- ], BrowserRequestService));
66
- CommandsRegistry.registerCommand('_workbench.fetchJSON', async function (accessor, url, method) {
67
- const result = await fetch(url, { method, headers: { Accept: 'application/json' } });
63
+ BrowserRequestService = ( __decorate([( __param(0, IRemoteAgentService)), ( __param(1, IConfigurationService)), ( __param(2, ILoggerService))], BrowserRequestService));
64
+ CommandsRegistry.registerCommand("_workbench.fetchJSON", async function(accessor, url, method) {
65
+ const result = await fetch(url, {
66
+ method,
67
+ headers: {
68
+ Accept: "application/json"
69
+ }
70
+ });
68
71
  if (result.ok) {
69
72
  return result.json();
70
- }
71
- else {
73
+ } else {
72
74
  throw ( new Error(result.statusText));
73
75
  }
74
76
  });
@@ -21,10 +21,12 @@ class BrowserURLOpener {
21
21
  if (!matchesScheme(resource, this.productService.urlProtocol)) {
22
22
  return false;
23
23
  }
24
- if (typeof resource === 'string') {
24
+ if (typeof resource === "string") {
25
25
  resource = ( URI.parse(resource));
26
26
  }
27
- return this.urlService.open(resource, { trusted: true });
27
+ return this.urlService.open(resource, {
28
+ trusted: true
29
+ });
28
30
  }
29
31
  }
30
32
  let BrowserURLService = class BrowserURLService extends AbstractURLService {
@@ -32,7 +34,9 @@ let BrowserURLService = class BrowserURLService extends AbstractURLService {
32
34
  super();
33
35
  this.provider = environmentService.options?.urlCallbackProvider;
34
36
  if (this.provider) {
35
- this._register(this.provider.onCallback(uri => this.open(uri, { trusted: true })));
37
+ this._register(this.provider.onCallback(uri => this.open(uri, {
38
+ trusted: true
39
+ })));
36
40
  }
37
41
  this._register(openerService.registerOpener(( new BrowserURLOpener(this, productService))));
38
42
  }
@@ -40,13 +44,9 @@ let BrowserURLService = class BrowserURLService extends AbstractURLService {
40
44
  if (this.provider) {
41
45
  return this.provider.create(options);
42
46
  }
43
- return ( URI.parse('unsupported://'));
47
+ return ( URI.parse("unsupported://"));
44
48
  }
45
49
  };
46
- BrowserURLService = ( __decorate([
47
- ( __param(0, IBrowserWorkbenchEnvironmentService)),
48
- ( __param(1, IOpenerService)),
49
- ( __param(2, IProductService))
50
- ], BrowserURLService));
50
+ BrowserURLService = ( __decorate([( __param(0, IBrowserWorkbenchEnvironmentService)), ( __param(1, IOpenerService)), ( __param(2, IProductService))], BrowserURLService));
51
51
 
52
52
  export { BrowserURLService };
@@ -3,7 +3,7 @@
3
3
  class UserActivityRegistry {
4
4
  constructor() {
5
5
  this.todo = [];
6
- this.add = (ctor) => {
6
+ this.add = ctor => {
7
7
  this.todo.push(ctor);
8
8
  };
9
9
  }
@@ -19,7 +19,9 @@ let UserActivityService = class UserActivityService extends Disposable {
19
19
  this.active = 0;
20
20
  this.isActive = true;
21
21
  this.onDidChangeIsActive = this.changeEmitter.event;
22
- this._register(runWhenGlobalIdle(() => userActivityRegistry.take(this, instantiationService)));
22
+ this._register(
23
+ runWhenGlobalIdle(() => userActivityRegistry.take(this, instantiationService))
24
+ );
23
25
  }
24
26
  markActive(opts) {
25
27
  if (opts?.extendOnly && !this.isActive) {
@@ -42,8 +44,6 @@ let UserActivityService = class UserActivityService extends Disposable {
42
44
  });
43
45
  }
44
46
  };
45
- UserActivityService = ( __decorate([
46
- ( __param(0, IInstantiationService))
47
- ], UserActivityService));
47
+ UserActivityService = ( __decorate([( __param(0, IInstantiationService))], UserActivityService));
48
48
 
49
49
  export { UserActivityService };