@codingame/monaco-vscode-base-service-override 26.2.1 → 27.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.
package/index.js CHANGED
@@ -26,7 +26,7 @@ import { guessLocalUserHome } from './vscode/src/vs/workbench/services/path/brow
26
26
  import { AbstractPathService } from './vscode/src/vs/workbench/services/path/common/pathService.js';
27
27
  import { UserActivityService } from './vscode/src/vs/workbench/services/userActivity/common/userActivityService.js';
28
28
  import { WorkingCopyFileService } from './vscode/src/vs/workbench/services/workingCopy/common/workingCopyFileService.js';
29
- import { ITrustedDomainService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/url/browser/trustedDomainService.service';
29
+ import { ITrustedDomainService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/url/common/trustedDomainService.service';
30
30
  import { TrustedDomainService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/url/browser/trustedDomainService';
31
31
  import { LabelService } from './vscode/src/vs/workbench/services/label/common/labelService.js';
32
32
  import { ILabelService } from '@codingame/monaco-vscode-api/vscode/vs/platform/label/common/label.service';
@@ -42,8 +42,12 @@ import { EditorWorkerService } from '@codingame/monaco-vscode-api/vscode/vs/edit
42
42
  import { IRenameSymbolTrackerService } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/services/renameSymbolTrackerService.service';
43
43
  import { RenameSymbolTrackerService } from './vscode/src/vs/workbench/contrib/inlineCompletions/browser/renameSymbolTrackerService.js';
44
44
  import { EditorMarkdownCodeBlockRenderer } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/widget/markdownRenderer/browser/editorMarkdownCodeBlockRenderer';
45
+ import { IRandomService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/editTelemetry/browser/randomService.service';
46
+ import { RandomService } from './vscode/src/vs/workbench/contrib/editTelemetry/browser/randomService.js';
45
47
  import { registerServiceInitializeParticipant } from '@codingame/monaco-vscode-api/lifecycle';
46
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';
47
51
 
48
52
  let BrowserPathServiceOverride = class BrowserPathServiceOverride extends AbstractPathService {
49
53
  constructor(remoteAgentService, environmentService, contextService) {
@@ -78,7 +82,9 @@ function getServiceOverride() {
78
82
  [IInlineCompletionsUnificationService.toString()]: new SyncDescriptor(InlineCompletionsUnificationImpl, [], true),
79
83
  [IMarkdownRendererService.toString()]: new SyncDescriptor(MarkdownRendererService, [], true),
80
84
  [IUserAttentionService.toString()]: new SyncDescriptor(UserAttentionService, [], true),
81
- [IRenameSymbolTrackerService.toString()]: new SyncDescriptor(RenameSymbolTrackerService, [], true)
85
+ [IRenameSymbolTrackerService.toString()]: new SyncDescriptor(RenameSymbolTrackerService, [], true),
86
+ [IRandomService.toString()]: new SyncDescriptor(RandomService, [], true),
87
+ [IMeteredConnectionService.toString()]: new SyncDescriptor(MeteredConnectionService, [], true)
82
88
  };
83
89
  }
84
90
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-base-service-override",
3
- "version": "26.2.1",
3
+ "version": "27.0.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": "26.2.1"
18
+ "@codingame/monaco-vscode-api": "27.0.0"
19
19
  },
20
20
  "main": "index.js",
21
21
  "module": "index.js",
@@ -0,0 +1,9 @@
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
+ }
@@ -0,0 +1,22 @@
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 };
@@ -0,0 +1,7 @@
1
+ import { IRandomService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/editTelemetry/browser/randomService.service";
2
+ export declare class RandomService implements IRandomService {
3
+ readonly _serviceBrand: undefined;
4
+ generateUuid(): string;
5
+ /** Namespace should be 3 letter. */
6
+ generatePrefixedUuid(namespace: string): string;
7
+ }
@@ -0,0 +1,13 @@
1
+
2
+ import { generateUuid } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uuid';
3
+
4
+ class RandomService {
5
+ generateUuid() {
6
+ return generateUuid();
7
+ }
8
+ generatePrefixedUuid(namespace) {
9
+ return `${namespace}-${this.generateUuid()}`;
10
+ }
11
+ }
12
+
13
+ export { RandomService };
@@ -137,7 +137,7 @@ let JSONEditingService = class JSONEditingService {
137
137
  case JSONEditingErrorCode.ERROR_INVALID_FILE:
138
138
  {
139
139
  return localize(
140
- 14378,
140
+ 15306,
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
  }
@@ -181,7 +181,7 @@ class DecorationStyles {
181
181
  const strikethrough = ( data.some(d => d.strikethrough));
182
182
  if (onlyChildren) {
183
183
  badgeClassName = rule.bubbleBadgeClassName;
184
- tooltip = ( localize(14417, "Contains emphasized items"));
184
+ tooltip = ( localize(15345, "Contains emphasized items"));
185
185
  }
186
186
  return {
187
187
  labelClassName,
@@ -31,7 +31,7 @@ import { Memento } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common
31
31
  const resourceLabelFormattersExtPoint = ExtensionsRegistry.registerExtensionPoint({
32
32
  extensionPoint: "resourceLabelFormatters",
33
33
  jsonSchema: {
34
- description: ( localize(14722, "Contributes resource label formatting rules.")),
34
+ description: ( localize(15650, "Contributes resource label formatting rules.")),
35
35
  type: "array",
36
36
  items: {
37
37
  type: "object",
@@ -40,52 +40,52 @@ const resourceLabelFormattersExtPoint = ExtensionsRegistry.registerExtensionPoin
40
40
  scheme: {
41
41
  type: "string",
42
42
  description: ( localize(
43
- 14723,
43
+ 15651,
44
44
  "URI scheme on which to match the formatter on. For example \"file\". Simple glob patterns are supported."
45
45
  ))
46
46
  },
47
47
  authority: {
48
48
  type: "string",
49
49
  description: ( localize(
50
- 14724,
50
+ 15652,
51
51
  "URI authority on which to match the formatter on. Simple glob patterns are supported."
52
52
  ))
53
53
  },
54
54
  formatting: {
55
- description: ( localize(14725, "Rules for formatting uri resource labels.")),
55
+ description: ( localize(15653, "Rules for formatting uri resource labels.")),
56
56
  type: "object",
57
57
  properties: {
58
58
  label: {
59
59
  type: "string",
60
60
  description: ( localize(
61
- 14726,
61
+ 15654,
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
66
  type: "string",
67
67
  description: ( localize(
68
- 14727,
68
+ 15655,
69
69
  "Separator to be used in the uri label display. '/' or '' as an example."
70
70
  ))
71
71
  },
72
72
  stripPathStartingSeparator: {
73
73
  type: "boolean",
74
74
  description: ( localize(
75
- 14728,
75
+ 15656,
76
76
  "Controls whether `${path}` substitutions should have starting separator characters stripped."
77
77
  ))
78
78
  },
79
79
  tildify: {
80
80
  type: "boolean",
81
81
  description: ( localize(
82
- 14729,
82
+ 15657,
83
83
  "Controls if the start of the uri label should be tildified when possible."
84
84
  ))
85
85
  },
86
86
  workspaceSuffix: {
87
87
  type: "string",
88
- description: ( localize(14730, "Suffix appended to the workspace label."))
88
+ description: ( localize(15658, "Suffix appended to the workspace label."))
89
89
  }
90
90
  }
91
91
  }
@@ -262,9 +262,6 @@ let LabelService = class LabelService extends Disposable {
262
262
  }
263
263
  getWorkspaceLabel(workspace, options) {
264
264
  if (isWorkspace(workspace)) {
265
- if (workspace.isAgentSessionsWorkspace) {
266
- return localize(14731, "Agent Sessions");
267
- }
268
265
  const identifier = toWorkspaceIdentifier(workspace);
269
266
  if (isSingleFolderWorkspaceIdentifier(identifier) || isWorkspaceIdentifier(identifier)) {
270
267
  return this.getWorkspaceLabel(identifier, options);
@@ -284,10 +281,10 @@ let LabelService = class LabelService extends Disposable {
284
281
  }
285
282
  doGetWorkspaceLabel(workspaceUri, options) {
286
283
  if (isUntitledWorkspace(workspaceUri, this.environmentService)) {
287
- return localize(14732, "Untitled (Workspace)");
284
+ return localize(15659, "Untitled (Workspace)");
288
285
  }
289
286
  if (isTemporaryWorkspace(workspaceUri)) {
290
- return localize(14733, "Workspace");
287
+ return localize(15660, "Workspace");
291
288
  }
292
289
  let filename = basename(workspaceUri);
293
290
  if (filename.endsWith(WORKSPACE_EXTENSION)) {
@@ -300,14 +297,14 @@ let LabelService = class LabelService extends Disposable {
300
297
  break;
301
298
  case Verbosity.LONG:
302
299
  label = ( localize(
303
- 14734,
300
+ 15661,
304
301
  "{0} (Workspace)",
305
302
  this.getUriLabel(joinPath(dirname(workspaceUri), filename))
306
303
  ));
307
304
  break;
308
305
  case Verbosity.MEDIUM:
309
306
  default:
310
- label = ( localize(14735, "{0} (Workspace)", filename));
307
+ label = ( localize(15662, "{0} (Workspace)", filename));
311
308
  break;
312
309
  }
313
310
  if (options?.verbose === Verbosity.SHORT) {
@@ -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(14842, "Network")),
18
+ name: ( localize(15769, "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(15241, "Running Code Actions and Formatters..."))
32
+ message: ( localize(16168, "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(15242, "Skip")),
38
+ cancellable: ( localize(16169, "Skip")),
39
39
  delay: workingCopy.isDirty() ? 5000 : 3000
40
40
  }, async progress => {
41
41
  const participants = Array.from(this.saveParticipants).sort((a, b) => {