@codingame/monaco-vscode-base-service-override 37.1.0 → 37.3.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.
package/index.js CHANGED
@@ -46,8 +46,6 @@ import { IRandomService } from '@codingame/monaco-vscode-api/vscode/vs/workbench
46
46
  import { RandomService } from './vscode/src/vs/workbench/contrib/editTelemetry/browser/randomService.js';
47
47
  import { registerServiceInitializeParticipant } from '@codingame/monaco-vscode-api/lifecycle';
48
48
  import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
49
- import { IMeteredConnectionService } from '@codingame/monaco-vscode-api/vscode/vs/platform/meteredConnection/common/meteredConnection.service';
50
- import { MeteredConnectionService } from './vscode/src/vs/platform/meteredConnection/browser/meteredConnectionService.js';
51
49
 
52
50
  let BrowserPathServiceOverride = class BrowserPathServiceOverride extends AbstractPathService {
53
51
  constructor(remoteAgentService, environmentService, contextService) {
@@ -83,8 +81,7 @@ function getServiceOverride() {
83
81
  [IMarkdownRendererService.toString()]: new SyncDescriptor(MarkdownRendererService, [], true),
84
82
  [IUserAttentionService.toString()]: new SyncDescriptor(UserAttentionService, [], true),
85
83
  [IRenameSymbolTrackerService.toString()]: new SyncDescriptor(RenameSymbolTrackerService, [], true),
86
- [IRandomService.toString()]: new SyncDescriptor(RandomService, [], true),
87
- [IMeteredConnectionService.toString()]: new SyncDescriptor(MeteredConnectionService, [], true)
84
+ [IRandomService.toString()]: new SyncDescriptor(RandomService, [], true)
88
85
  };
89
86
  }
90
87
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-base-service-override",
3
- "version": "37.1.0",
3
+ "version": "37.3.0",
4
4
  "private": false,
5
5
  "description": "VSCode public API plugged on the monaco editor - base service-override",
6
6
  "keywords": [],
@@ -15,7 +15,7 @@
15
15
  },
16
16
  "type": "module",
17
17
  "dependencies": {
18
- "@codingame/monaco-vscode-api": "37.1.0"
18
+ "@codingame/monaco-vscode-api": "37.3.0"
19
19
  },
20
20
  "main": "index.js",
21
21
  "module": "index.js",
@@ -14,7 +14,7 @@ class AbstractURLService extends Disposable {
14
14
  }
15
15
  open(uri, options) {
16
16
  const handlers = [...( this.handlers.values())];
17
- return first(( handlers.map(h => () => h.handleURL(uri, options))), undefined, false).then(val => val || false);
17
+ return first(handlers.map(h => () => h.handleURL(uri, options)), undefined, false).then(val => val || false);
18
18
  }
19
19
  registerHandler(handler) {
20
20
  this.handlers.add(handler);
@@ -137,7 +137,7 @@ let JSONEditingService = class JSONEditingService {
137
137
  case JSONEditingErrorCode.ERROR_INVALID_FILE:
138
138
  {
139
139
  return localize(
140
- 19504,
140
+ 21647,
141
141
  "Unable to write into the file. Please open the file to correct errors/warnings in the file and try again."
142
142
  );
143
143
  }
@@ -34,7 +34,7 @@ import { getIconRegistry } from '@codingame/monaco-vscode-api/vscode/vs/platform
34
34
  class DecorationRule {
35
35
  static keyOf(data) {
36
36
  if (Array.isArray(data)) {
37
- return ( data.map(DecorationRule.keyOf)).join(",");
37
+ return data.map(DecorationRule.keyOf).join(",");
38
38
  } else {
39
39
  const {
40
40
  color,
@@ -178,11 +178,11 @@ class DecorationStyles {
178
178
  const labelClassName = rule.itemColorClassName;
179
179
  let badgeClassName = rule.itemBadgeClassName;
180
180
  const iconClassName = rule.iconBadgeClassName;
181
- let tooltip = distinct(( data.filter(d => !isFalsyOrWhitespace(d.tooltip)).map(d => d.tooltip))).join(" • ");
181
+ let tooltip = distinct(data.filter(d => !isFalsyOrWhitespace(d.tooltip)).map(d => d.tooltip)).join(" • ");
182
182
  const strikethrough = ( data.some(d => d.strikethrough));
183
183
  if (onlyChildren) {
184
184
  badgeClassName = rule.bubbleBadgeClassName;
185
- tooltip = ( localize(19554, "Contains emphasized items"));
185
+ tooltip = ( localize(21697, "Contains emphasized items"));
186
186
  }
187
187
  return {
188
188
  labelClassName,
@@ -20,7 +20,7 @@ const CODE_UNIFICATION_PREFIX = "cmp-cht-";
20
20
  const EXTENSION_UNIFICATION_PREFIX = "cmp-ext-";
21
21
  const CODE_UNIFICATION_FF = "inlineCompletionsUnificationCode";
22
22
  const MODEL_UNIFICATION_FF = "inlineCompletionsUnificationModel";
23
- const isRunningUnificationExperiment = ( new RawContextKey("isRunningUnificationExperiment", false));
23
+ const isRunningUnificationExperiment = new RawContextKey("isRunningUnificationExperiment", false);
24
24
  const ExtensionUnificationSetting = "chat.extensionUnification.enabled";
25
25
  let InlineCompletionsUnificationImpl = class InlineCompletionsUnificationImpl extends Disposable {
26
26
  get state() {
@@ -32,7 +32,7 @@ import { escapeRegExpCharacters } from '@codingame/monaco-vscode-api/vscode/vs/b
32
32
  const resourceLabelFormattersExtPoint = ExtensionsRegistry.registerExtensionPoint({
33
33
  extensionPoint: "resourceLabelFormatters",
34
34
  jsonSchema: {
35
- description: ( localize(19869, "Contributes resource label formatting rules.")),
35
+ description: ( localize(22012, "Contributes resource label formatting rules.")),
36
36
  type: "array",
37
37
  items: {
38
38
  type: "object",
@@ -41,52 +41,52 @@ const resourceLabelFormattersExtPoint = ExtensionsRegistry.registerExtensionPoin
41
41
  scheme: {
42
42
  type: "string",
43
43
  description: ( localize(
44
- 19870,
44
+ 22013,
45
45
  "URI scheme on which to match the formatter on. For example \"file\". Simple glob patterns are supported."
46
46
  ))
47
47
  },
48
48
  authority: {
49
49
  type: "string",
50
50
  description: ( localize(
51
- 19871,
51
+ 22014,
52
52
  "URI authority on which to match the formatter on. Simple glob patterns are supported."
53
53
  ))
54
54
  },
55
55
  formatting: {
56
- description: ( localize(19872, "Rules for formatting uri resource labels.")),
56
+ description: ( localize(22015, "Rules for formatting uri resource labels.")),
57
57
  type: "object",
58
58
  properties: {
59
59
  label: {
60
60
  type: "string",
61
61
  description: ( localize(
62
- 19873,
62
+ 22016,
63
63
  "Label rules to display. For example: myLabel:/${path}. ${path}, ${scheme}, ${authority} and ${authoritySuffix} are supported as variables."
64
64
  ))
65
65
  },
66
66
  separator: {
67
67
  type: "string",
68
68
  description: ( localize(
69
- 19874,
69
+ 22017,
70
70
  "Separator to be used in the uri label display. '/' or '' as an example."
71
71
  ))
72
72
  },
73
73
  stripPathStartingSeparator: {
74
74
  type: "boolean",
75
75
  description: ( localize(
76
- 19875,
76
+ 22018,
77
77
  "Controls whether `${path}` substitutions should have starting separator characters stripped."
78
78
  ))
79
79
  },
80
80
  tildify: {
81
81
  type: "boolean",
82
82
  description: ( localize(
83
- 19876,
83
+ 22019,
84
84
  "Controls if the start of the uri label should be tildified when possible."
85
85
  ))
86
86
  },
87
87
  workspaceSuffix: {
88
88
  type: "string",
89
- description: ( localize(19877, "Suffix appended to the workspace label."))
89
+ description: ( localize(22020, "Suffix appended to the workspace label."))
90
90
  }
91
91
  }
92
92
  }
@@ -367,10 +367,10 @@ let LabelService = class LabelService extends Disposable {
367
367
  }
368
368
  doGetWorkspaceLabel(workspaceUri, options) {
369
369
  if (isUntitledWorkspace(workspaceUri, this.environmentService)) {
370
- return localize(19878, "Untitled (Workspace)");
370
+ return localize(22021, "Untitled (Workspace)");
371
371
  }
372
372
  if (isTemporaryWorkspace(workspaceUri)) {
373
- return localize(19879, "Workspace");
373
+ return localize(22022, "Workspace");
374
374
  }
375
375
  let filename = basename(workspaceUri);
376
376
  if (filename.endsWith(WORKSPACE_EXTENSION)) {
@@ -383,14 +383,14 @@ let LabelService = class LabelService extends Disposable {
383
383
  break;
384
384
  case Verbosity.LONG:
385
385
  label = ( localize(
386
- 19880,
386
+ 22023,
387
387
  "{0} (Workspace)",
388
388
  this.getUriLabel(joinPath(dirname(workspaceUri), filename))
389
389
  ));
390
390
  break;
391
391
  case Verbosity.MEDIUM:
392
392
  default:
393
- label = ( localize(19881, "{0} (Workspace)", filename));
393
+ label = ( localize(22024, "{0} (Workspace)", filename));
394
394
  break;
395
395
  }
396
396
  if (options?.verbose === Verbosity.SHORT) {
@@ -489,7 +489,7 @@ let LabelService = class LabelService extends Disposable {
489
489
  } = formatter;
490
490
  const homePath = home.path.length > 1 ? home.path.replace(/\/+$/, "") : home.path;
491
491
  const parameterNames = ( new Set());
492
- const matcherPattern = ( homePath.split("/").map(segment => {
492
+ const matcherPattern = homePath.split("/").map(segment => {
493
493
  const parameterMatch = homeTemplateParameterRegex.exec(segment);
494
494
  if (parameterMatch?.groups?.name) {
495
495
  const parameterName = parameterMatch.groups.name;
@@ -505,7 +505,7 @@ let LabelService = class LabelService extends Disposable {
505
505
  ));
506
506
  }
507
507
  return escapeRegExpCharacters(segment);
508
- })).join("/");
508
+ }).join("/");
509
509
  const isRootHome = homePath === "" || homePath === "/";
510
510
  return {
511
511
  formatter,
@@ -15,7 +15,7 @@ import { mainWindow } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/
15
15
  let BrowserRequestService = class BrowserRequestService extends AbstractRequestService {
16
16
  constructor(remoteAgentService, configurationService, loggerService) {
17
17
  const logger = loggerService.createLogger(`network`, {
18
- name: ( localize(20013, "Network")),
18
+ name: ( localize(22156, "Network")),
19
19
  group: windowLogGroup
20
20
  });
21
21
  const logService = ( new LogService(logger));
@@ -29,13 +29,13 @@ let StoredFileWorkingCopySaveParticipant = class StoredFileWorkingCopySavePartic
29
29
  const cts = ( new CancellationTokenSource(token));
30
30
  workingCopy.model?.pushStackElement();
31
31
  progress.report({
32
- message: ( localize(20416, "Running Code Actions and Formatters..."))
32
+ message: ( localize(22559, "Running Code Actions and Formatters..."))
33
33
  });
34
34
  let bubbleCancel = false;
35
35
  await this.progressService.withProgress({
36
36
  priority: NotificationPriority.URGENT,
37
37
  location: ProgressLocation.Notification,
38
- cancellable: ( localize(20417, "Skip")),
38
+ cancellable: ( localize(22560, "Skip")),
39
39
  delay: workingCopy.isDirty() ? 5000 : 3000
40
40
  }, async progress => {
41
41
  const participants = Array.from(this.saveParticipants).sort((a, b) => {
@@ -50,17 +50,19 @@ let WorkingCopyFileService = class WorkingCopyFileService extends Disposable {
50
50
  return [];
51
51
  }
52
52
  if (isFile) {
53
- const validateCreates = await Promises.settled(( operations.map(operation => this.fileService.canCreateFile(operation.resource, {
54
- overwrite: operation.overwrite
55
- }))));
53
+ const validateCreates = await Promises.settled(
54
+ operations.map(operation => this.fileService.canCreateFile(operation.resource, {
55
+ overwrite: operation.overwrite
56
+ }))
57
+ );
56
58
  const error = validateCreates.find(validateCreate => validateCreate instanceof Error);
57
59
  if (error instanceof Error) {
58
60
  throw error;
59
61
  }
60
62
  }
61
- const files = ( operations.map(operation => ({
63
+ const files = operations.map(operation => ({
62
64
  target: operation.resource
63
- })));
65
+ }));
64
66
  await this.runFileOperationParticipants(files, FileOperation.CREATE, undoInfo, token);
65
67
  const event = {
66
68
  correlationId: this.correlationIds++,
@@ -74,13 +76,15 @@ let WorkingCopyFileService = class WorkingCopyFileService extends Disposable {
74
76
  let stats;
75
77
  try {
76
78
  if (isFile) {
77
- stats = await Promises.settled(( operations.map(
79
+ stats = await Promises.settled(operations.map(
78
80
  operation => this.fileService.createFile(operation.resource, operation.contents, {
79
81
  overwrite: operation.overwrite
80
82
  })
81
- )));
83
+ ));
82
84
  } else {
83
- stats = await Promises.settled(( operations.map(operation => this.fileService.createFolder(operation.resource))));
85
+ stats = await Promises.settled(
86
+ operations.map(operation => this.fileService.createFolder(operation.resource))
87
+ );
84
88
  }
85
89
  } catch (error) {
86
90
  await this._onDidFailWorkingCopyFileOperation.fireAsync(
@@ -115,7 +119,7 @@ let WorkingCopyFileService = class WorkingCopyFileService extends Disposable {
115
119
  throw validateMoveOrCopy;
116
120
  }
117
121
  }
118
- const files = ( operations.map(o => o.file));
122
+ const files = operations.map(o => o.file);
119
123
  await this.runFileOperationParticipants(files, move ? FileOperation.MOVE : FileOperation.COPY, undoInfo, token);
120
124
  const event = {
121
125
  correlationId: this.correlationIds++,
@@ -136,9 +140,9 @@ let WorkingCopyFileService = class WorkingCopyFileService extends Disposable {
136
140
  } of operations) {
137
141
  if (!this.uriIdentityService.extUri.isEqual(source, target)) {
138
142
  const dirtyWorkingCopies = (move ? [...this.getDirty(source), ...this.getDirty(target)] : this.getDirty(target));
139
- await Promises.settled(( dirtyWorkingCopies.map(dirtyWorkingCopy => dirtyWorkingCopy.revert({
143
+ await Promises.settled(dirtyWorkingCopies.map(dirtyWorkingCopy => dirtyWorkingCopy.revert({
140
144
  soft: true
141
- }))));
145
+ })));
142
146
  }
143
147
  if (move) {
144
148
  stats.push(await this.fileService.move(source, target, overwrite));
@@ -169,9 +173,9 @@ let WorkingCopyFileService = class WorkingCopyFileService extends Disposable {
169
173
  throw validateDelete;
170
174
  }
171
175
  }
172
- const files = ( operations.map(operation => ({
176
+ const files = operations.map(operation => ({
173
177
  target: operation.resource
174
- })));
178
+ }));
175
179
  await this.runFileOperationParticipants(files, FileOperation.DELETE, undoInfo, token);
176
180
  const event = {
177
181
  correlationId: this.correlationIds++,
@@ -184,9 +188,9 @@ let WorkingCopyFileService = class WorkingCopyFileService extends Disposable {
184
188
  );
185
189
  for (const operation of operations) {
186
190
  const dirtyWorkingCopies = this.getDirty(operation.resource);
187
- await Promises.settled(( dirtyWorkingCopies.map(dirtyWorkingCopy => dirtyWorkingCopy.revert({
191
+ await Promises.settled(dirtyWorkingCopies.map(dirtyWorkingCopy => dirtyWorkingCopy.revert({
188
192
  soft: true
189
- }))));
193
+ })));
190
194
  }
191
195
  try {
192
196
  for (const operation of operations) {
@@ -1,9 +0,0 @@
1
- import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
2
- import { AbstractMeteredConnectionService } from "@codingame/monaco-vscode-api/vscode/vs/platform/meteredConnection/common/meteredConnection";
3
- /**
4
- * Browser implementation of the metered connection service.
5
- * This implementation monitors navigator.connection for changes.
6
- */
7
- export declare class MeteredConnectionService extends AbstractMeteredConnectionService {
8
- constructor(configurationService: IConfigurationService);
9
- }
@@ -1,22 +0,0 @@
1
-
2
- import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
3
- import { toDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
4
- import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
5
- import '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/extensions';
6
- import { AbstractMeteredConnectionService, getIsBrowserConnectionMetered } from '@codingame/monaco-vscode-api/vscode/vs/platform/meteredConnection/common/meteredConnection';
7
- import '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
8
-
9
- let MeteredConnectionService = class MeteredConnectionService extends AbstractMeteredConnectionService {
10
- constructor(configurationService) {
11
- super(configurationService, getIsBrowserConnectionMetered());
12
- const connection = navigator.connection;
13
- if (connection) {
14
- const onChange = () => this.setIsBrowserConnectionMetered(getIsBrowserConnectionMetered());
15
- connection.addEventListener("change", onChange);
16
- this._register(toDisposable(() => connection.removeEventListener("change", onChange)));
17
- }
18
- }
19
- };
20
- MeteredConnectionService = ( __decorate([( __param(0, IConfigurationService))], MeteredConnectionService));
21
-
22
- export { MeteredConnectionService };