@codingame/monaco-vscode-extensions-service-override 24.3.0 → 25.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.
Files changed (62) hide show
  1. package/package.json +3 -3
  2. package/vscode/src/vs/platform/extensionManagement/common/extensionManagementCLI.js +28 -28
  3. package/vscode/src/vs/workbench/api/browser/mainThreadAuthentication.js +29 -29
  4. package/vscode/src/vs/workbench/api/browser/mainThreadCLICommands.js +1 -1
  5. package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents2.d.ts +6 -6
  6. package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents2.js +14 -10
  7. package/vscode/src/vs/workbench/api/browser/mainThreadChatCodeMapper.d.ts +1 -1
  8. package/vscode/src/vs/workbench/api/browser/mainThreadChatCodeMapper.js +1 -1
  9. package/vscode/src/vs/workbench/api/browser/mainThreadChatContext.d.ts +2 -2
  10. package/vscode/src/vs/workbench/api/browser/mainThreadChatContext.js +1 -1
  11. package/vscode/src/vs/workbench/api/browser/mainThreadChatSessions.d.ts +5 -4
  12. package/vscode/src/vs/workbench/api/browser/mainThreadChatSessions.js +28 -31
  13. package/vscode/src/vs/workbench/api/browser/mainThreadComments.js +1 -1
  14. package/vscode/src/vs/workbench/api/browser/mainThreadCustomEditors.js +3 -6
  15. package/vscode/src/vs/workbench/api/browser/mainThreadDocumentContentProviders.js +3 -0
  16. package/vscode/src/vs/workbench/api/browser/mainThreadEditSessionIdentityParticipant.js +1 -1
  17. package/vscode/src/vs/workbench/api/browser/mainThreadEditorTabs.js +1 -1
  18. package/vscode/src/vs/workbench/api/browser/mainThreadEditors.js +10 -29
  19. package/vscode/src/vs/workbench/api/browser/mainThreadExtensionService.js +11 -11
  20. package/vscode/src/vs/workbench/api/browser/mainThreadFileSystemEventService.js +20 -20
  21. package/vscode/src/vs/workbench/api/browser/mainThreadLanguageFeatures.js +1 -0
  22. package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModelTools.d.ts +2 -2
  23. package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModelTools.js +2 -2
  24. package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModels.js +3 -3
  25. package/vscode/src/vs/workbench/api/browser/mainThreadLanguages.d.ts +2 -3
  26. package/vscode/src/vs/workbench/api/browser/mainThreadLanguages.js +6 -11
  27. package/vscode/src/vs/workbench/api/browser/mainThreadMcp.d.ts +5 -2
  28. package/vscode/src/vs/workbench/api/browser/mainThreadMcp.js +16 -10
  29. package/vscode/src/vs/workbench/api/browser/mainThreadMessageService.js +4 -4
  30. package/vscode/src/vs/workbench/api/browser/mainThreadNotebookSaveParticipant.js +1 -1
  31. package/vscode/src/vs/workbench/api/browser/mainThreadOutputService.js +3 -3
  32. package/vscode/src/vs/workbench/api/browser/mainThreadProgress.js +1 -1
  33. package/vscode/src/vs/workbench/api/browser/mainThreadQuickOpen.d.ts +0 -5
  34. package/vscode/src/vs/workbench/api/browser/mainThreadQuickOpen.js +7 -65
  35. package/vscode/src/vs/workbench/api/browser/mainThreadSCM.d.ts +1 -1
  36. package/vscode/src/vs/workbench/api/browser/mainThreadSCM.js +5 -2
  37. package/vscode/src/vs/workbench/api/browser/mainThreadSaveParticipant.js +1 -1
  38. package/vscode/src/vs/workbench/api/browser/mainThreadSearch.d.ts +1 -0
  39. package/vscode/src/vs/workbench/api/browser/mainThreadSearch.js +7 -0
  40. package/vscode/src/vs/workbench/api/browser/mainThreadStatusBar.d.ts +3 -3
  41. package/vscode/src/vs/workbench/api/browser/mainThreadStatusBar.js +8 -9
  42. package/vscode/src/vs/workbench/api/browser/mainThreadTask.js +1 -1
  43. package/vscode/src/vs/workbench/api/browser/mainThreadTerminalShellIntegration.js +1 -1
  44. package/vscode/src/vs/workbench/api/browser/mainThreadTunnelService.js +2 -2
  45. package/vscode/src/vs/workbench/api/browser/mainThreadUriOpeners.js +2 -2
  46. package/vscode/src/vs/workbench/api/browser/mainThreadWebviewPanels.js +4 -0
  47. package/vscode/src/vs/workbench/api/browser/mainThreadWebviews.js +1 -1
  48. package/vscode/src/vs/workbench/api/browser/mainThreadWorkspace.js +5 -5
  49. package/vscode/src/vs/workbench/contrib/customEditor/common/customTextEditorModel.js +1 -1
  50. package/vscode/src/vs/workbench/services/extensionManagement/browser/extensionBisect.js +23 -23
  51. package/vscode/src/vs/workbench/services/extensionManagement/browser/webExtensionsScannerService.js +2 -2
  52. package/vscode/src/vs/workbench/services/extensions/browser/extensionService.d.ts +1 -0
  53. package/vscode/src/vs/workbench/services/extensions/browser/extensionService.js +8 -5
  54. package/vscode/src/vs/workbench/services/extensions/browser/webWorkerExtensionHost.d.ts +3 -1
  55. package/vscode/src/vs/workbench/services/extensions/browser/webWorkerExtensionHost.js +8 -3
  56. package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.d.ts +2 -0
  57. package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.js +25 -13
  58. package/vscode/src/vs/workbench/services/extensions/common/extensionHostManager.js +1 -1
  59. package/vscode/src/vs/workbench/services/extensions/common/extensionsProposedApi.js +1 -1
  60. package/vscode/src/vs/workbench/services/extensions/common/extensionsUtil.js +4 -4
  61. package/vscode/src/vs/workbench/services/extensions/common/remoteExtensionHost.d.ts +3 -1
  62. package/vscode/src/vs/workbench/services/extensions/common/remoteExtensionHost.js +8 -3
@@ -2,6 +2,7 @@ import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/l
2
2
  import { IContextKeyService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service";
3
3
  import { IDialogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service";
4
4
  import { LogLevel } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log";
5
+ import { ITelemetryService } from "@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service";
5
6
  import { IMcpRegistry } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/common/mcpRegistryTypes.service";
6
7
  import { McpCollectionDefinition, McpConnectionState, McpServerDefinition } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/common/mcpTypes";
7
8
  import { IAuthenticationMcpAccessService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/authentication/browser/authenticationMcpAccessService.service";
@@ -11,7 +12,7 @@ import { IAuthenticationService } from "@codingame/monaco-vscode-api/vscode/vs/w
11
12
  import { IDynamicAuthenticationProviderStorageService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/authentication/common/dynamicAuthenticationProviderStorage.service";
12
13
  import { IExtensionService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions.service";
13
14
  import { IExtHostContext } from "../../services/extensions/common/extHostCustomers.js";
14
- import { IMcpAuthenticationDetails, IMcpAuthenticationOptions, MainThreadMcpShape } from "@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol";
15
+ import { IMcpAuthenticationDetails, IMcpAuthenticationOptions, IMcpAuthSetupTelemetry, MainThreadMcpShape } from "@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol";
15
16
  export declare class MainThreadMcp extends Disposable implements MainThreadMcpShape {
16
17
  private readonly _extHostContext;
17
18
  private readonly _mcpRegistry;
@@ -23,13 +24,14 @@ export declare class MainThreadMcp extends Disposable implements MainThreadMcpSh
23
24
  private readonly _dynamicAuthenticationProviderStorageService;
24
25
  private readonly _extensionService;
25
26
  private readonly _contextKeyService;
27
+ private readonly _telemetryService;
26
28
  private _serverIdCounter;
27
29
  private readonly _servers;
28
30
  private readonly _serverDefinitions;
29
31
  private readonly _serverAuthTracking;
30
32
  private readonly _proxy;
31
33
  private readonly _collectionDefinitions;
32
- constructor(_extHostContext: IExtHostContext, _mcpRegistry: IMcpRegistry, dialogService: IDialogService, _authenticationService: IAuthenticationService, authenticationMcpServersService: IAuthenticationMcpService, authenticationMCPServerAccessService: IAuthenticationMcpAccessService, authenticationMCPServerUsageService: IAuthenticationMcpUsageService, _dynamicAuthenticationProviderStorageService: IDynamicAuthenticationProviderStorageService, _extensionService: IExtensionService, _contextKeyService: IContextKeyService);
34
+ constructor(_extHostContext: IExtHostContext, _mcpRegistry: IMcpRegistry, dialogService: IDialogService, _authenticationService: IAuthenticationService, authenticationMcpServersService: IAuthenticationMcpService, authenticationMCPServerAccessService: IAuthenticationMcpAccessService, authenticationMCPServerUsageService: IAuthenticationMcpUsageService, _dynamicAuthenticationProviderStorageService: IDynamicAuthenticationProviderStorageService, _extensionService: IExtensionService, _contextKeyService: IContextKeyService, _telemetryService: ITelemetryService);
33
35
  $upsertMcpCollection(collection: McpCollectionDefinition.FromExtHost, serversDto: McpServerDefinition.Serialized[]): void;
34
36
  $deleteMcpCollection(collectionId: string): void;
35
37
  $onDidChangeState(id: number, update: McpConnectionState): void;
@@ -40,6 +42,7 @@ export declare class MainThreadMcp extends Disposable implements MainThreadMcpSh
40
42
  private _getSessionForProvider;
41
43
  private continueWithIncorrectAccountPrompt;
42
44
  private _onDidChangeAuthSessions;
45
+ $logMcpAuthSetup(data: IMcpAuthSetupTelemetry): void;
43
46
  private loginPrompt;
44
47
  dispose(): void;
45
48
  }
@@ -14,6 +14,7 @@ import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platf
14
14
  import { IDialogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service';
15
15
  import { ExtensionIdentifier } from '@codingame/monaco-vscode-api/vscode/vs/platform/extensions/common/extensions';
16
16
  import { LogLevel } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log';
17
+ import { ITelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service';
17
18
  import { IMcpRegistry } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/common/mcpRegistryTypes.service';
18
19
  import { McpServerLaunch, McpServerTransportType, McpServerDefinition, McpServerTrust, extensionPrefixedIdentifier, McpConnectionState, UserInteractionRequiredError } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/common/mcpTypes';
19
20
  import { IAuthenticationMcpAccessService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/authentication/browser/authenticationMcpAccessService.service';
@@ -28,7 +29,7 @@ import { ExtHostContext, MainContext } from '@codingame/monaco-vscode-api/vscode
28
29
  import { observableValue } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableValue';
29
30
 
30
31
  let MainThreadMcp = class MainThreadMcp extends Disposable {
31
- constructor(_extHostContext, _mcpRegistry, dialogService, _authenticationService, authenticationMcpServersService, authenticationMCPServerAccessService, authenticationMCPServerUsageService, _dynamicAuthenticationProviderStorageService, _extensionService, _contextKeyService) {
32
+ constructor(_extHostContext, _mcpRegistry, dialogService, _authenticationService, authenticationMcpServersService, authenticationMCPServerAccessService, authenticationMCPServerUsageService, _dynamicAuthenticationProviderStorageService, _extensionService, _contextKeyService, _telemetryService) {
32
33
  super();
33
34
  this._extHostContext = _extHostContext;
34
35
  this._mcpRegistry = _mcpRegistry;
@@ -40,6 +41,7 @@ let MainThreadMcp = class MainThreadMcp extends Disposable {
40
41
  this._dynamicAuthenticationProviderStorageService = _dynamicAuthenticationProviderStorageService;
41
42
  this._extensionService = _extensionService;
42
43
  this._contextKeyService = _contextKeyService;
44
+ this._telemetryService = _telemetryService;
43
45
  this._serverIdCounter = 0;
44
46
  this._servers = ( new Map());
45
47
  this._serverDefinitions = ( new Map());
@@ -250,9 +252,9 @@ let MainThreadMcp = class MainThreadMcp extends Disposable {
250
252
  }
251
253
  async continueWithIncorrectAccountPrompt(chosenAccountLabel, requestedAccountLabel) {
252
254
  const result = await this.dialogService.prompt({
253
- message: ( localize(2516, "Incorrect account detected")),
255
+ message: ( localize(2535, "Incorrect account detected")),
254
256
  detail: ( localize(
255
- 2517,
257
+ 2536,
256
258
  "The chosen account, {0}, does not match the requested account, {1}.",
257
259
  chosenAccountLabel,
258
260
  requestedAccountLabel
@@ -261,11 +263,11 @@ let MainThreadMcp = class MainThreadMcp extends Disposable {
261
263
  cancelButton: true,
262
264
  buttons: [
263
265
  {
264
- label: ( localize(2518, 'Keep {0}', chosenAccountLabel)),
266
+ label: ( localize(2537, 'Keep {0}', chosenAccountLabel)),
265
267
  run: () => chosenAccountLabel
266
268
  },
267
269
  {
268
- label: ( localize(2519, 'Login with {0}', requestedAccountLabel)),
270
+ label: ( localize(2538, 'Login with {0}', requestedAccountLabel)),
269
271
  run: () => requestedAccountLabel
270
272
  }
271
273
  ],
@@ -296,7 +298,7 @@ let MainThreadMcp = class MainThreadMcp extends Disposable {
296
298
  catch (e) {
297
299
  if (UserInteractionRequiredError.is(e)) {
298
300
  server.pushLog(LogLevel.Warning, ( localize(
299
- 2520,
301
+ 2539,
300
302
  "Authentication session for {0} removed, stopping server",
301
303
  providerLabel
302
304
  )));
@@ -305,23 +307,26 @@ let MainThreadMcp = class MainThreadMcp extends Disposable {
305
307
  }
306
308
  }
307
309
  }
310
+ $logMcpAuthSetup(data) {
311
+ this._telemetryService.publicLog2('mcp/authSetup', data);
312
+ }
308
313
  async loginPrompt(mcpLabel, providerLabel, recreatingSession) {
309
314
  const message = recreatingSession
310
315
  ? ( localize(
311
- 2521,
316
+ 2540,
312
317
  "The MCP Server Definition '{0}' wants you to authenticate to {1}.",
313
318
  mcpLabel,
314
319
  providerLabel
315
320
  ))
316
321
  : ( localize(
317
- 2522,
322
+ 2541,
318
323
  "The MCP Server Definition '{0}' wants to authenticate to {1}.",
319
324
  mcpLabel,
320
325
  providerLabel
321
326
  ));
322
327
  const buttons = [
323
328
  {
324
- label: ( localize(2523, "&&Allow")),
329
+ label: ( localize(2542, "&&Allow")),
325
330
  run() {
326
331
  return true;
327
332
  },
@@ -355,7 +360,8 @@ MainThreadMcp = __decorate([
355
360
  ( __param(6, IAuthenticationMcpUsageService)),
356
361
  ( __param(7, IDynamicAuthenticationProviderStorageService)),
357
362
  ( __param(8, IExtensionService)),
358
- ( __param(9, IContextKeyService))
363
+ ( __param(9, IContextKeyService)),
364
+ ( __param(10, ITelemetryService))
359
365
  ], MainThreadMcp);
360
366
  class ExtHostMcpServerLaunch extends Disposable {
361
367
  pushLog(level, message) {
@@ -60,13 +60,13 @@ let MainThreadMessageService = class MainThreadMessageService {
60
60
  sourceIsUrgent = MainThreadMessageService_1.URGENT_NOTIFICATION_SOURCES.includes(source.id);
61
61
  }
62
62
  if (!source) {
63
- source = ( localize(2524, "Extension"));
63
+ source = ( localize(2543, "Extension"));
64
64
  }
65
65
  const secondaryActions = [];
66
66
  if (options.source) {
67
67
  secondaryActions.push(toAction({
68
68
  id: options.source.identifier.value,
69
- label: ( localize(2525, "Manage Extension")),
69
+ label: ( localize(2544, "Manage Extension")),
70
70
  run: () => {
71
71
  return this._commandService.executeCommand('_extensions.manage', options.source.identifier.value);
72
72
  }
@@ -103,13 +103,13 @@ let MainThreadMessageService = class MainThreadMessageService {
103
103
  if (!cancelButton) {
104
104
  if (buttons.length > 0) {
105
105
  cancelButton = {
106
- label: ( localize(2526, "Cancel")),
106
+ label: ( localize(2545, "Cancel")),
107
107
  run: () => undefined
108
108
  };
109
109
  }
110
110
  else {
111
111
  cancelButton = {
112
- label: ( localize(2527, "&&OK")),
112
+ label: ( localize(2546, "&&OK")),
113
113
  run: () => undefined
114
114
  };
115
115
  }
@@ -18,7 +18,7 @@ class ExtHostNotebookDocumentSaveParticipant {
18
18
  }
19
19
  let _warningTimeout;
20
20
  const p = ( new Promise((resolve, reject) => {
21
- _warningTimeout = setTimeout(() => reject(( new Error(( localize(2528, "Aborted onWillSaveNotebookDocument-event after 1750ms"))))), 1750);
21
+ _warningTimeout = setTimeout(() => reject(( new Error(( localize(2547, "Aborted onWillSaveNotebookDocument-event after 1750ms"))))), 1750);
22
22
  this._proxy.$participateInSave(workingCopy.resource, context.reason, token).then(_ => {
23
23
  clearTimeout(_warningTimeout);
24
24
  return undefined;
@@ -69,11 +69,11 @@ let MainThreadOutputService = class MainThreadOutputService extends Disposable {
69
69
  }
70
70
  _showChannelQuietly(channel) {
71
71
  const statusProperties = {
72
- name: ( localize(2529, "Show Output")),
72
+ name: ( localize(2548, "Show Output")),
73
73
  text: '$(output)',
74
- ariaLabel: ( localize(2530, "Show {0} Output Channel", channel.label)),
74
+ ariaLabel: ( localize(2549, "Show {0} Output Channel", channel.label)),
75
75
  command: `workbench.action.output.show.${channel.id}`,
76
- tooltip: ( localize(2531, "Show {0} Output Channel", channel.label)),
76
+ tooltip: ( localize(2550, "Show {0} Output Channel", channel.label)),
77
77
  kind: 'prominent'
78
78
  };
79
79
  if (!this._outputStatusItem.value) {
@@ -37,7 +37,7 @@ let MainThreadProgress = class MainThreadProgress {
37
37
  location: ProgressLocation.Notification,
38
38
  secondaryActions: [toAction({
39
39
  id: extensionId,
40
- label: ( localize(2532, "Manage Extension")),
40
+ label: ( localize(2551, "Manage Extension")),
41
41
  run: () => this._commandService.executeCommand('_extensions.manage', extensionId)
42
42
  })]
43
43
  };
@@ -32,9 +32,4 @@ export declare class MainThreadQuickOpen implements MainThreadQuickOpenShape {
32
32
  * Converts IconPath DTO into iconPath/iconClass properties.
33
33
  */
34
34
  private expandIconPath;
35
- /**
36
- * Updates the toggles for a given quick input session by creating new {@link Toggle}-s
37
- * from buttons, updating existing toggles props and removing old ones.
38
- */
39
- private updateToggles;
40
35
  }
@@ -1,6 +1,5 @@
1
1
 
2
2
  import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
3
- import { Toggle } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/toggle/toggle';
4
3
  import { Lazy } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lazy';
5
4
  import { DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
6
5
  import { basenameOrAuthority, dirname, hasTrailingPathSeparator } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
@@ -11,19 +10,7 @@ import { getIconClasses } from '@codingame/monaco-vscode-api/vscode/vs/editor/co
11
10
  import { IModelService } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/services/model.service';
12
11
  import { FileKind } from '@codingame/monaco-vscode-api/vscode/vs/platform/files/common/files';
13
12
  import { ILabelService } from '@codingame/monaco-vscode-api/vscode/vs/platform/label/common/label.service';
14
- import { QuickInputButtonLocation } from '@codingame/monaco-vscode-api/vscode/vs/platform/quickinput/common/quickInput';
15
13
  import { IQuickInputService } from '@codingame/monaco-vscode-api/vscode/vs/platform/quickinput/common/quickInput.service';
16
- import { asCssVariable } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colorUtils';
17
- import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/baseColors';
18
- import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/chartsColors';
19
- import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/editorColors';
20
- import { inputActiveOptionBackground, inputActiveOptionForeground, inputActiveOptionBorder } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/inputColors';
21
- import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/listColors';
22
- import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/menuColors';
23
- import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/minimapColors';
24
- import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/miscColors';
25
- import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/quickpickColors';
26
- import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/searchColors';
27
14
  import { ICustomEditorLabelService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/customEditorLabelService.service';
28
15
  import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
29
16
  import { ExtHostContext, MainContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol';
@@ -117,7 +104,7 @@ let MainThreadQuickOpen = class MainThreadQuickOpen {
117
104
  this._proxy.$onDidAccept(sessionId);
118
105
  }));
119
106
  store.add(input.onDidTriggerButton(button => {
120
- this._proxy.$onDidTriggerButton(sessionId, button.handle);
107
+ this._proxy.$onDidTriggerButton(sessionId, button.handle, button.toggle?.checked);
121
108
  }));
122
109
  store.add(input.onDidChangeValue(value => {
123
110
  this._proxy.$onDidChangeValue(sessionId, value);
@@ -126,21 +113,20 @@ let MainThreadQuickOpen = class MainThreadQuickOpen {
126
113
  this._proxy.$onDidHide(sessionId);
127
114
  }));
128
115
  if (params.type === 'quickPick') {
129
- const quickpick = input;
130
- store.add(quickpick.onDidChangeActive(items => {
116
+ const quickPick = input;
117
+ store.add(quickPick.onDidChangeActive(items => {
131
118
  this._proxy.$onDidChangeActive(sessionId, ( items.map(item => item.handle)));
132
119
  }));
133
- store.add(quickpick.onDidChangeSelection(items => {
120
+ store.add(quickPick.onDidChangeSelection(items => {
134
121
  this._proxy.$onDidChangeSelection(sessionId, ( items.map(item => item.handle)));
135
122
  }));
136
- store.add(quickpick.onDidTriggerItemButton((e) => {
123
+ store.add(quickPick.onDidTriggerItemButton((e) => {
137
124
  this._proxy.$onDidTriggerItemButton(sessionId, e.item.handle, e.button.handle);
138
125
  }));
139
126
  }
140
127
  session = {
141
128
  input,
142
129
  handlesToItems: ( new Map()),
143
- handlesToToggles: ( new Map()),
144
130
  store
145
131
  };
146
132
  this.sessions.set(sessionId, session);
@@ -183,23 +169,17 @@ let MainThreadQuickOpen = class MainThreadQuickOpen {
183
169
  .filter(Boolean);
184
170
  break;
185
171
  case 'buttons': {
186
- const buttons = [], toggles = [];
172
+ const buttons = [];
187
173
  for (const button of params.buttons) {
188
174
  if (button.handle === -1) {
189
175
  buttons.push(this._quickInputService.backButton);
190
176
  }
191
177
  else {
192
178
  this.expandIconPath(button);
193
- if (button.location === QuickInputButtonLocation.Input) {
194
- toggles.push(button);
195
- }
196
- else {
197
- buttons.push(button);
198
- }
179
+ buttons.push(button);
199
180
  }
200
181
  }
201
182
  input.buttons = buttons;
202
- this.updateToggles(sessionId, session, toggles);
203
183
  break;
204
184
  }
205
185
  default:
@@ -263,44 +243,6 @@ let MainThreadQuickOpen = class MainThreadQuickOpen {
263
243
  target.iconPath = { dark: ( URI.from(dark)), light: ( URI.from(light)) };
264
244
  }
265
245
  }
266
- updateToggles(sessionId, session, buttons) {
267
- const { input, handlesToToggles, store } = session;
268
- const toggles = [];
269
- for (const button of buttons) {
270
- const title = button.tooltip || '';
271
- const isChecked = !!button.checked;
272
- const icon = ThemeIcon.isThemeIcon(button.iconPathDto) ? button.iconPathDto : undefined;
273
- let { toggle } = handlesToToggles.get(button.handle) || {};
274
- if (toggle) {
275
- toggle.setTitle(title);
276
- toggle.setIcon(icon);
277
- toggle.checked = isChecked;
278
- }
279
- else {
280
- toggle = store.add(( new Toggle({
281
- title,
282
- icon,
283
- isChecked,
284
- inputActiveOptionBorder: asCssVariable(inputActiveOptionBorder),
285
- inputActiveOptionForeground: asCssVariable(inputActiveOptionForeground),
286
- inputActiveOptionBackground: asCssVariable(inputActiveOptionBackground)
287
- })));
288
- const listener = store.add(toggle.onChange(() => {
289
- this._proxy.$onDidTriggerButton(sessionId, button.handle, toggle.checked);
290
- }));
291
- handlesToToggles.set(button.handle, { toggle, listener });
292
- }
293
- toggles.push(toggle);
294
- }
295
- for (const [handle, { toggle, listener }] of handlesToToggles) {
296
- if (!( buttons.some(button => button.handle === handle))) {
297
- handlesToToggles.delete(handle);
298
- store.delete(toggle);
299
- store.delete(listener);
300
- }
301
- }
302
- input.toggles = toggles;
303
- }
304
246
  };
305
247
  MainThreadQuickOpen = __decorate([
306
248
  extHostNamedCustomer(MainContext.MainThreadQuickOpen),
@@ -31,7 +31,7 @@ export declare class MainThreadSCM implements MainThreadSCMShape {
31
31
  $registerSourceControl(handle: number, parentHandle: number | undefined, id: string, label: string, rootUri: UriComponents | undefined, iconPath: UriComponents | {
32
32
  light: UriComponents;
33
33
  dark: UriComponents;
34
- } | ThemeIcon | undefined, inputBoxDocumentUri: UriComponents): Promise<void>;
34
+ } | ThemeIcon | undefined, isHidden: boolean | undefined, inputBoxDocumentUri: UriComponents): Promise<void>;
35
35
  $updateSourceControl(handle: number, features: SCMProviderFeatures): Promise<void>;
36
36
  $unregisterSourceControl(handle: number): Promise<void>;
37
37
  $registerGroups(sourceControlHandle: number, groups: [
@@ -242,6 +242,7 @@ class MainThreadSCMProvider {
242
242
  get label() { return this._label; }
243
243
  get rootUri() { return this._rootUri; }
244
244
  get iconPath() { return this._iconPath; }
245
+ get isHidden() { return this._isHidden; }
245
246
  get inputBoxTextModel() { return this._inputBoxTextModel; }
246
247
  get contextValue() { return this._contextValue; }
247
248
  get acceptInputCommand() { return this.features.acceptInputCommand; }
@@ -252,7 +253,7 @@ class MainThreadSCMProvider {
252
253
  get actionButton() { return this._actionButton; }
253
254
  get artifactProvider() { return this._artifactProvider; }
254
255
  get historyProvider() { return this._historyProvider; }
255
- constructor(proxy, _handle, _parentHandle, _providerId, _label, _rootUri, _iconPath, _inputBoxTextModel, _quickDiffService, _uriIdentService, _workspaceContextService) {
256
+ constructor(proxy, _handle, _parentHandle, _providerId, _label, _rootUri, _iconPath, _isHidden, _inputBoxTextModel, _quickDiffService, _uriIdentService, _workspaceContextService) {
256
257
  this.proxy = proxy;
257
258
  this._handle = _handle;
258
259
  this._parentHandle = _parentHandle;
@@ -260,6 +261,7 @@ class MainThreadSCMProvider {
260
261
  this._label = _label;
261
262
  this._rootUri = _rootUri;
262
263
  this._iconPath = _iconPath;
264
+ this._isHidden = _isHidden;
263
265
  this._inputBoxTextModel = _inputBoxTextModel;
264
266
  this._quickDiffService = _quickDiffService;
265
267
  this._uriIdentService = _uriIdentService;
@@ -502,7 +504,7 @@ let MainThreadSCM = class MainThreadSCM {
502
504
  this._repositoryDisposables.clear();
503
505
  this._disposables.dispose();
504
506
  }
505
- async $registerSourceControl(handle, parentHandle, id, label, rootUri, iconPath, inputBoxDocumentUri) {
507
+ async $registerSourceControl(handle, parentHandle, id, label, rootUri, iconPath, isHidden, inputBoxDocumentUri) {
506
508
  this._repositoryBarriers.set(handle, ( new Barrier()));
507
509
  const inputBoxTextModelRef = await this.textModelService.createModelReference(URI.revive(inputBoxDocumentUri));
508
510
  const provider = ( new MainThreadSCMProvider(
@@ -513,6 +515,7 @@ let MainThreadSCM = class MainThreadSCM {
513
515
  label,
514
516
  rootUri ? URI.revive(rootUri) : undefined,
515
517
  getIconFromIconDto(iconPath),
518
+ isHidden,
516
519
  inputBoxTextModelRef.object.textEditorModel,
517
520
  this.quickDiffService,
518
521
  this._uriIdentService,
@@ -17,7 +17,7 @@ class ExtHostSaveParticipant {
17
17
  return undefined;
18
18
  }
19
19
  const p = ( new Promise((resolve, reject) => {
20
- setTimeout(() => reject(( new Error(( localize(2533, "Aborted onWillSaveTextDocument-event after 1750ms"))))), 1750);
20
+ setTimeout(() => reject(( new Error(( localize(2552, "Aborted onWillSaveTextDocument-event after 1750ms"))))), 1750);
21
21
  this._proxy.$participateInSave(editorModel.resource, context.reason).then(values => {
22
22
  if (!values.every(success => success)) {
23
23
  return Promise.reject(( new Error('listener failed')));
@@ -14,6 +14,7 @@ export declare class MainThreadSearch implements MainThreadSearchShape {
14
14
  protected contextKeyService: IContextKeyService;
15
15
  private readonly _proxy;
16
16
  private readonly _searchProvider;
17
+ private readonly _aiSearchProviderHandles;
17
18
  constructor(extHostContext: IExtHostContext, _searchService: ISearchService, _telemetryService: ITelemetryService, _configurationService: IConfigurationService, contextKeyService: IContextKeyService);
18
19
  dispose(): void;
19
20
  $registerTextSearchProvider(handle: number, scheme: string): void;
@@ -19,18 +19,22 @@ let MainThreadSearch = class MainThreadSearch {
19
19
  this._telemetryService = _telemetryService;
20
20
  this.contextKeyService = contextKeyService;
21
21
  this._searchProvider = ( new Map());
22
+ this._aiSearchProviderHandles = ( new Set());
22
23
  this._proxy = ( extHostContext.getProxy(ExtHostContext.ExtHostSearch));
23
24
  this._proxy.$enableExtensionHostSearch();
24
25
  }
25
26
  dispose() {
26
27
  this._searchProvider.forEach(value => value.dispose());
27
28
  this._searchProvider.clear();
29
+ this._aiSearchProviderHandles.clear();
30
+ SearchContext.hasAIResultProvider.bindTo(this.contextKeyService).set(false);
28
31
  }
29
32
  $registerTextSearchProvider(handle, scheme) {
30
33
  this._searchProvider.set(handle, ( new RemoteSearchProvider(this._searchService, SearchProviderType.text, scheme, handle, this._proxy)));
31
34
  }
32
35
  $registerAITextSearchProvider(handle, scheme) {
33
36
  SearchContext.hasAIResultProvider.bindTo(this.contextKeyService).set(true);
37
+ this._aiSearchProviderHandles.add(handle);
34
38
  this._searchProvider.set(handle, ( new RemoteSearchProvider(
35
39
  this._searchService,
36
40
  SearchProviderType.aiText,
@@ -45,6 +49,9 @@ let MainThreadSearch = class MainThreadSearch {
45
49
  $unregisterProvider(handle) {
46
50
  dispose(this._searchProvider.get(handle));
47
51
  this._searchProvider.delete(handle);
52
+ if (this._aiSearchProviderHandles.delete(handle) && this._aiSearchProviderHandles.size === 0) {
53
+ SearchContext.hasAIResultProvider.bindTo(this.contextKeyService).set(false);
54
+ }
48
55
  }
49
56
  $handleFileMatch(handle, session, data) {
50
57
  const provider = this._searchProvider.get(handle);
@@ -1,16 +1,16 @@
1
1
  import { MainThreadStatusBarShape } from "@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol";
2
2
  import { ThemeColor } from "@codingame/monaco-vscode-api/vscode/vs/base/common/themables";
3
3
  import { IExtHostContext } from "../../services/extensions/common/extHostCustomers.js";
4
+ import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
4
5
  import { Command } from "@codingame/monaco-vscode-api/vscode/vs/editor/common/languages";
5
6
  import { IAccessibilityInformation } from "@codingame/monaco-vscode-api/vscode/vs/platform/accessibility/common/accessibility";
6
7
  import { IMarkdownString } from "@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent";
7
8
  import { IExtensionStatusBarItemService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/api/browser/statusBarService";
8
- export declare class MainThreadStatusBar implements MainThreadStatusBarShape {
9
+ export declare class MainThreadStatusBar extends Disposable implements MainThreadStatusBarShape {
9
10
  private readonly statusbarService;
10
11
  private readonly _proxy;
11
- private readonly _store;
12
+ private readonly _entryDisposables;
12
13
  constructor(extHostContext: IExtHostContext, statusbarService: IExtensionStatusBarItemService);
13
- dispose(): void;
14
14
  $setEntry(entryId: string, id: string, extensionId: string | undefined, name: string, text: string, tooltip: IMarkdownString | string | undefined, hasTooltipProvider: boolean, command: Command | undefined, color: string | ThemeColor | undefined, backgroundColor: ThemeColor | undefined, alignLeft: boolean, priority: number | undefined, accessibilityInformation: IAccessibilityInformation | undefined): void;
15
15
  $disposeEntry(entryId: string): void;
16
16
  }
@@ -2,21 +2,22 @@
2
2
  import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
3
3
  import { ExtHostContext, MainContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol';
4
4
  import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
5
- import { DisposableStore, toDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
5
+ import { Disposable, DisposableMap, toDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
6
6
  import { StatusbarAlignment } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/statusbar/browser/statusbar';
7
7
  import { StatusBarUpdateKind, IExtensionStatusBarItemService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/api/browser/statusBarService';
8
8
 
9
- let MainThreadStatusBar = class MainThreadStatusBar {
9
+ let MainThreadStatusBar = class MainThreadStatusBar extends Disposable {
10
10
  constructor(extHostContext, statusbarService) {
11
+ super();
11
12
  this.statusbarService = statusbarService;
12
- this._store = ( new DisposableStore());
13
+ this._entryDisposables = this._register(( new DisposableMap()));
13
14
  this._proxy = ( extHostContext.getProxy(ExtHostContext.ExtHostStatusBar));
14
15
  const entries = [];
15
16
  for (const [entryId, item] of statusbarService.getEntries()) {
16
17
  entries.push(asDto(entryId, item));
17
18
  }
18
19
  this._proxy.$acceptStaticEntries(entries);
19
- this._store.add(statusbarService.onDidChange(e => {
20
+ this._register(statusbarService.onDidChange(e => {
20
21
  if (e.added) {
21
22
  this._proxy.$acceptStaticEntries([asDto(e.added[0], e.added[1])]);
22
23
  }
@@ -34,9 +35,6 @@ let MainThreadStatusBar = class MainThreadStatusBar {
34
35
  };
35
36
  }
36
37
  }
37
- dispose() {
38
- this._store.dispose();
39
- }
40
38
  $setEntry(entryId, id, extensionId, name, text, tooltip, hasTooltipProvider, command, color, backgroundColor, alignLeft, priority, accessibilityInformation) {
41
39
  const tooltipOrTooltipProvider = hasTooltipProvider
42
40
  ? {
@@ -48,11 +46,12 @@ let MainThreadStatusBar = class MainThreadStatusBar {
48
46
  : tooltip;
49
47
  const kind = this.statusbarService.setOrUpdateEntry(entryId, id, extensionId, name, text, tooltipOrTooltipProvider, command, color, backgroundColor, alignLeft, priority, accessibilityInformation);
50
48
  if (kind === StatusBarUpdateKind.DidDefine) {
51
- this._store.add(toDisposable(() => this.statusbarService.unsetEntry(entryId)));
49
+ const disposable = toDisposable(() => this.statusbarService.unsetEntry(entryId));
50
+ this._entryDisposables.set(entryId, disposable);
52
51
  }
53
52
  }
54
53
  $disposeEntry(entryId) {
55
- this.statusbarService.unsetEntry(entryId);
54
+ this._entryDisposables.deleteAndDispose(entryId);
56
55
  }
57
56
  };
58
57
  MainThreadStatusBar = __decorate([
@@ -405,7 +405,7 @@ var TaskDTO;
405
405
  }
406
406
  command.presentation = TaskPresentationOptionsDTO.to(task.presentationOptions);
407
407
  const source = TaskSourceDTO.to(task.source, workspace);
408
- const label = ( localize(2534, '{0}: {1}', source.label, task.name));
408
+ const label = ( localize(2553, '{0}: {1}', source.label, task.name));
409
409
  const definition = TaskDefinitionDTO.to(task.definition, executeOnly);
410
410
  const id = (CustomExecutionDTO.is(task.execution) && task._id) ? task._id : `${task.source.extensionId}.${definition._key}`;
411
411
  const result = ( new ContributedTask(
@@ -55,7 +55,7 @@ let MainThreadTerminalShellIntegration = class MainThreadTerminalShellIntegratio
55
55
  const instanceId = e.instance.instanceId;
56
56
  this._proxy.$shellExecutionStart(instanceId, instanceSupportsExecuteCommandApi(e.instance), e.data.command, convertToExtHostCommandLineConfidence(e.data), e.data.isTrusted, e.data.cwd);
57
57
  instanceDataListeners.get(instanceId)?.dispose();
58
- instanceDataListeners.set(instanceId, Event.accumulate(e.instance.onData, 50, this._store)(events => {
58
+ instanceDataListeners.set(instanceId, Event.accumulate(e.instance.onData, 50, true, this._store)(events => {
59
59
  this._proxy.$shellExecutionData(instanceId, events.join(''));
60
60
  }));
61
61
  }));
@@ -112,13 +112,13 @@ let MainThreadTunnelService = class MainThreadTunnelService extends Disposable {
112
112
  }
113
113
  async elevationPrompt(tunnelOptions, tunnel, source) {
114
114
  return this.notificationService.prompt(Severity.Info, ( localize(
115
- 2535,
115
+ 2554,
116
116
  "The extension {0} has forwarded port {1}. You'll need to run as superuser to use port {2} locally.",
117
117
  source,
118
118
  tunnelOptions.remoteAddress.port,
119
119
  tunnelOptions.localAddressPort
120
120
  )), [{
121
- label: ( localize(2536, "Use Port {0} as Sudo...", tunnel.tunnelRemotePort)),
121
+ label: ( localize(2555, "Use Port {0} as Sudo...", tunnel.tunnelRemotePort)),
122
122
  run: async () => {
123
123
  this.elevateionRetry = true;
124
124
  await this.remoteExplorerService.close({ host: tunnel.tunnelRemoteHost, port: tunnel.tunnelRemotePort }, TunnelCloseReason.Other);
@@ -52,7 +52,7 @@ let MainThreadUriOpeners = class MainThreadUriOpeners extends Disposable {
52
52
  }
53
53
  catch (e) {
54
54
  if (!isCancellationError(e)) {
55
- const openDefaultAction = ( new Action('default', ( localize(2537, "Open using default opener")), undefined, undefined, async () => {
55
+ const openDefaultAction = ( new Action('default', ( localize(2556, "Open using default opener")), undefined, undefined, async () => {
56
56
  await this.openerService.open(uri, {
57
57
  allowTunneling: false,
58
58
  allowContributedOpeners: defaultExternalUriOpenerId,
@@ -61,7 +61,7 @@ let MainThreadUriOpeners = class MainThreadUriOpeners extends Disposable {
61
61
  openDefaultAction.tooltip = ( uri.toString());
62
62
  this.notificationService.notify({
63
63
  severity: Severity.Error,
64
- message: ( localize(2538, 'Could not open uri with \'{0}\': {1}', id, (e.toString()))),
64
+ message: ( localize(2557, 'Could not open uri with \'{0}\': {1}', id, (e.toString()))),
65
65
  actions: {
66
66
  primary: [
67
67
  openDefaultAction
@@ -19,6 +19,7 @@ import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench
19
19
  import { IExtensionService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions.service';
20
20
  import { ExtHostContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol';
21
21
  import { reviveWebviewExtension, reviveWebviewContentOptions } from './mainThreadWebviews.js';
22
+ import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
22
23
 
23
24
  class WebviewInputStore {
24
25
  constructor() {
@@ -264,6 +265,9 @@ function reviveWebviewIcon(value) {
264
265
  if (!value) {
265
266
  return undefined;
266
267
  }
268
+ if (ThemeIcon.isThemeIcon(value)) {
269
+ return value;
270
+ }
267
271
  return {
268
272
  light: URI.revive(value.light),
269
273
  dark: URI.revive(value.dark),
@@ -104,7 +104,7 @@ let MainThreadWebviews = class MainThreadWebviews extends Disposable {
104
104
  <meta http-equiv="Content-type" content="text/html;charset=UTF-8">
105
105
  <meta http-equiv="Content-Security-Policy" content="default-src 'none';">
106
106
  </head>
107
- <body>${( localize(2539, "An error occurred while loading view: {0}", escape(viewType)))}</body>
107
+ <body>${( localize(2558, "An error occurred while loading view: {0}", escape(viewType)))}</body>
108
108
  </html>`;
109
109
  }
110
110
  };