@codingame/monaco-vscode-extensions-service-override 23.2.2 → 24.1.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 (94) hide show
  1. package/index.d.ts +7 -3
  2. package/index.js +12 -18
  3. package/package.json +3 -30
  4. package/vscode/src/vs/platform/extensionManagement/common/extensionManagementCLI.js +28 -28
  5. package/vscode/src/vs/platform/extensionResourceLoader/common/extensionResourceLoader.js +1 -1
  6. package/vscode/src/vs/platform/remote/common/managedSocket.d.ts +2 -2
  7. package/vscode/src/vs/platform/remote/common/managedSocket.js +1 -1
  8. package/vscode/src/vs/workbench/api/browser/mainThreadAuthentication.d.ts +3 -3
  9. package/vscode/src/vs/workbench/api/browser/mainThreadAuthentication.js +43 -34
  10. package/vscode/src/vs/workbench/api/browser/mainThreadBulkEdits.js +1 -1
  11. package/vscode/src/vs/workbench/api/browser/mainThreadCLICommands.js +1 -1
  12. package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents2.d.ts +8 -1
  13. package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents2.js +50 -19
  14. package/vscode/src/vs/workbench/api/browser/mainThreadChatCodeMapper.js +1 -1
  15. package/vscode/src/vs/workbench/api/browser/mainThreadChatContext.d.ts +3 -2
  16. package/vscode/src/vs/workbench/api/browser/mainThreadChatContext.js +9 -2
  17. package/vscode/src/vs/workbench/api/browser/mainThreadChatSessions.d.ts +16 -6
  18. package/vscode/src/vs/workbench/api/browser/mainThreadChatSessions.js +91 -23
  19. package/vscode/src/vs/workbench/api/browser/mainThreadChatStatus.d.ts +1 -1
  20. package/vscode/src/vs/workbench/api/browser/mainThreadChatStatus.js +1 -1
  21. package/vscode/src/vs/workbench/api/browser/mainThreadComments.d.ts +1 -1
  22. package/vscode/src/vs/workbench/api/browser/mainThreadComments.js +5 -5
  23. package/vscode/src/vs/workbench/api/browser/mainThreadCustomEditors.js +7 -7
  24. package/vscode/src/vs/workbench/api/browser/mainThreadDocumentsAndEditors.d.ts +2 -1
  25. package/vscode/src/vs/workbench/api/browser/mainThreadDocumentsAndEditors.js +1 -1
  26. package/vscode/src/vs/workbench/api/browser/mainThreadEditSessionIdentityParticipant.js +1 -1
  27. package/vscode/src/vs/workbench/api/browser/mainThreadEditorTabs.d.ts +1 -1
  28. package/vscode/src/vs/workbench/api/browser/mainThreadEditorTabs.js +11 -11
  29. package/vscode/src/vs/workbench/api/browser/mainThreadEditors.d.ts +1 -1
  30. package/vscode/src/vs/workbench/api/browser/mainThreadEditors.js +1 -1
  31. package/vscode/src/vs/workbench/api/browser/mainThreadExtensionService.js +11 -11
  32. package/vscode/src/vs/workbench/api/browser/mainThreadFileSystemEventService.js +24 -20
  33. package/vscode/src/vs/workbench/api/browser/mainThreadLabelService.d.ts +1 -1
  34. package/vscode/src/vs/workbench/api/browser/mainThreadLanguageFeatures.d.ts +3 -2
  35. package/vscode/src/vs/workbench/api/browser/mainThreadLanguageFeatures.js +196 -136
  36. package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModelTools.d.ts +1 -1
  37. package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModelTools.js +2 -1
  38. package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModels.js +3 -3
  39. package/vscode/src/vs/workbench/api/browser/mainThreadManagedSockets.js +1 -1
  40. package/vscode/src/vs/workbench/api/browser/mainThreadMcp.d.ts +4 -0
  41. package/vscode/src/vs/workbench/api/browser/mainThreadMcp.js +93 -14
  42. package/vscode/src/vs/workbench/api/browser/mainThreadMessageService.js +4 -4
  43. package/vscode/src/vs/workbench/api/browser/mainThreadNotebook.js +1 -1
  44. package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDocumentsAndEditors.js +2 -2
  45. package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDto.d.ts +1 -1
  46. package/vscode/src/vs/workbench/api/browser/mainThreadNotebookEditors.d.ts +2 -2
  47. package/vscode/src/vs/workbench/api/browser/mainThreadNotebookEditors.js +2 -2
  48. package/vscode/src/vs/workbench/api/browser/mainThreadNotebookSaveParticipant.js +2 -2
  49. package/vscode/src/vs/workbench/api/browser/mainThreadOutputService.js +3 -3
  50. package/vscode/src/vs/workbench/api/browser/mainThreadProgress.js +1 -1
  51. package/vscode/src/vs/workbench/api/browser/mainThreadQuickOpen.js +6 -2
  52. package/vscode/src/vs/workbench/api/browser/mainThreadSCM.js +2 -2
  53. package/vscode/src/vs/workbench/api/browser/mainThreadSaveParticipant.js +1 -1
  54. package/vscode/src/vs/workbench/api/browser/mainThreadSearch.js +1 -1
  55. package/vscode/src/vs/workbench/api/browser/mainThreadSecretState.d.ts +1 -1
  56. package/vscode/src/vs/workbench/api/browser/mainThreadSecretState.js +1 -1
  57. package/vscode/src/vs/workbench/api/browser/mainThreadShare.js +2 -6
  58. package/vscode/src/vs/workbench/api/browser/mainThreadStorage.d.ts +1 -1
  59. package/vscode/src/vs/workbench/api/browser/mainThreadTask.js +1 -1
  60. package/vscode/src/vs/workbench/api/browser/mainThreadTerminalService.d.ts +4 -5
  61. package/vscode/src/vs/workbench/api/browser/mainThreadTerminalService.js +57 -43
  62. package/vscode/src/vs/workbench/api/browser/mainThreadTerminalShellIntegration.js +1 -1
  63. package/vscode/src/vs/workbench/api/browser/mainThreadTesting.js +2 -2
  64. package/vscode/src/vs/workbench/api/browser/mainThreadTunnelService.js +2 -2
  65. package/vscode/src/vs/workbench/api/browser/mainThreadUriOpeners.d.ts +1 -1
  66. package/vscode/src/vs/workbench/api/browser/mainThreadUriOpeners.js +3 -3
  67. package/vscode/src/vs/workbench/api/browser/mainThreadWebviewPanels.d.ts +1 -1
  68. package/vscode/src/vs/workbench/api/browser/mainThreadWebviewPanels.js +3 -3
  69. package/vscode/src/vs/workbench/api/browser/mainThreadWebviews.d.ts +1 -1
  70. package/vscode/src/vs/workbench/api/browser/mainThreadWebviews.js +1 -1
  71. package/vscode/src/vs/workbench/api/browser/mainThreadWorkspace.js +5 -5
  72. package/vscode/src/vs/workbench/contrib/customEditor/common/customTextEditorModel.js +1 -1
  73. package/vscode/src/vs/workbench/contrib/externalUriOpener/common/contributedOpeners.js +2 -2
  74. package/vscode/src/vs/workbench/services/extensionManagement/browser/extensionBisect.js +23 -23
  75. package/vscode/src/vs/workbench/services/extensionManagement/browser/webExtensionsScannerService.d.ts +1 -1
  76. package/vscode/src/vs/workbench/services/extensionManagement/browser/webExtensionsScannerService.js +8 -7
  77. package/vscode/src/vs/workbench/services/extensions/browser/extensionService.d.ts +2 -2
  78. package/vscode/src/vs/workbench/services/extensions/browser/extensionService.js +5 -5
  79. package/vscode/src/vs/workbench/services/extensions/browser/webWorkerExtensionHost.d.ts +6 -6
  80. package/vscode/src/vs/workbench/services/extensions/browser/webWorkerExtensionHost.js +33 -19
  81. package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.d.ts +1 -1
  82. package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.js +13 -13
  83. package/vscode/src/vs/workbench/services/extensions/common/extHostCustomers.d.ts +1 -1
  84. package/vscode/src/vs/workbench/services/extensions/common/extensionHostManager.d.ts +1 -1
  85. package/vscode/src/vs/workbench/services/extensions/common/extensionHostManager.js +1 -1
  86. package/vscode/src/vs/workbench/services/extensions/common/extensionHostManagers.d.ts +1 -1
  87. package/vscode/src/vs/workbench/services/extensions/common/extensionRunningLocationTracker.d.ts +1 -1
  88. package/vscode/src/vs/workbench/services/extensions/common/extensionRunningLocationTracker.js +1 -1
  89. package/vscode/src/vs/workbench/services/extensions/common/extensionsProposedApi.js +1 -1
  90. package/vscode/src/vs/workbench/services/extensions/common/extensionsUtil.js +4 -4
  91. package/vscode/src/vs/workbench/services/extensions/common/lazyCreateExtensionHostManager.d.ts +1 -1
  92. package/vscode/src/vs/workbench/services/extensions/common/remoteExtensionHost.d.ts +2 -2
  93. package/vscode/src/vs/workbench/services/extensions/common/remoteExtensionHost.js +1 -1
  94. package/vscode/src/vs/workbench/services/extensions/worker/webWorkerExtensionHostIframe.html +2 -2
@@ -75,28 +75,28 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
75
75
  if (data.extensionNames.length === 1) {
76
76
  if (operation === FileOperation.CREATE) {
77
77
  message = ( localize(
78
- 2483,
78
+ 2496,
79
79
  "Extension '{0}' wants to make refactoring changes with this file creation",
80
80
  data.extensionNames[0]
81
81
  ));
82
82
  }
83
83
  else if (operation === FileOperation.COPY) {
84
84
  message = ( localize(
85
- 2484,
85
+ 2497,
86
86
  "Extension '{0}' wants to make refactoring changes with this file copy",
87
87
  data.extensionNames[0]
88
88
  ));
89
89
  }
90
90
  else if (operation === FileOperation.MOVE) {
91
91
  message = ( localize(
92
- 2485,
92
+ 2498,
93
93
  "Extension '{0}' wants to make refactoring changes with this file move",
94
94
  data.extensionNames[0]
95
95
  ));
96
96
  }
97
97
  else {
98
98
  message = ( localize(
99
- 2486,
99
+ 2499,
100
100
  "Extension '{0}' wants to make refactoring changes with this file deletion",
101
101
  data.extensionNames[0]
102
102
  ));
@@ -105,28 +105,28 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
105
105
  else {
106
106
  if (operation === FileOperation.CREATE) {
107
107
  message = ( localize(
108
- 2487,
108
+ 2500,
109
109
  "{0} extensions want to make refactoring changes with this file creation",
110
110
  data.extensionNames.length
111
111
  ));
112
112
  }
113
113
  else if (operation === FileOperation.COPY) {
114
114
  message = ( localize(
115
- 2488,
115
+ 2501,
116
116
  "{0} extensions want to make refactoring changes with this file copy",
117
117
  data.extensionNames.length
118
118
  ));
119
119
  }
120
120
  else if (operation === FileOperation.MOVE) {
121
121
  message = ( localize(
122
- 2489,
122
+ 2502,
123
123
  "{0} extensions want to make refactoring changes with this file move",
124
124
  data.extensionNames.length
125
125
  ));
126
126
  }
127
127
  else {
128
128
  message = ( localize(
129
- 2490,
129
+ 2503,
130
130
  "{0} extensions want to make refactoring changes with this file deletion",
131
131
  data.extensionNames.length
132
132
  ));
@@ -136,8 +136,8 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
136
136
  const { confirmed } = await dialogService.confirm({
137
137
  type: Severity.Info,
138
138
  message,
139
- primaryButton: ( localize(2491, "Show &&Preview")),
140
- cancelButton: ( localize(2492, "Skip Changes"))
139
+ primaryButton: ( localize(2504, "Show &&Preview")),
140
+ cancelButton: ( localize(2505, "Skip Changes"))
141
141
  });
142
142
  showPreview = true;
143
143
  if (!confirmed) {
@@ -156,19 +156,19 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
156
156
  message,
157
157
  buttons: [
158
158
  {
159
- label: ( localize(2493, "&&OK")),
159
+ label: ( localize(2506, "&&OK")),
160
160
  run: () => Choice.OK
161
161
  },
162
162
  {
163
- label: ( localize(2491, "Show &&Preview")),
163
+ label: ( localize(2504, "Show &&Preview")),
164
164
  run: () => Choice.Preview
165
165
  }
166
166
  ],
167
167
  cancelButton: {
168
- label: ( localize(2492, "Skip Changes")),
168
+ label: ( localize(2505, "Skip Changes")),
169
169
  run: () => Choice.Cancel
170
170
  },
171
- checkbox: { label: ( localize(2494, "Do not ask me again")) }
171
+ checkbox: { label: ( localize(2507, "Do not ask me again")) }
172
172
  });
173
173
  if (result === Choice.Cancel) {
174
174
  return;
@@ -185,15 +185,15 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
185
185
  _progressLabel(operation) {
186
186
  switch (operation) {
187
187
  case FileOperation.CREATE:
188
- return localize(2495, "Running 'File Create' participants...");
188
+ return localize(2508, "Running 'File Create' participants...");
189
189
  case FileOperation.MOVE:
190
- return localize(2496, "Running 'File Rename' participants...");
190
+ return localize(2509, "Running 'File Rename' participants...");
191
191
  case FileOperation.COPY:
192
- return localize(2497, "Running 'File Copy' participants...");
192
+ return localize(2510, "Running 'File Copy' participants...");
193
193
  case FileOperation.DELETE:
194
- return localize(2498, "Running 'File Delete' participants...");
194
+ return localize(2511, "Running 'File Delete' participants...");
195
195
  case FileOperation.WRITE:
196
- return localize(2499, "Running 'File Write' participants...");
196
+ return localize(2512, "Running 'File Write' participants...");
197
197
  }
198
198
  }
199
199
  });
@@ -202,6 +202,10 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
202
202
  }
203
203
  async $watch(extensionId, session, resource, unvalidatedOpts, correlate) {
204
204
  const uri = URI.revive(resource);
205
+ const canHandleWatcher = await this._fileService.canHandleResource(uri);
206
+ if (!canHandleWatcher) {
207
+ this._logService.warn(`MainThreadFileSystemEventService#$watch(): cannot watch resource as its scheme is not handled by the file service (extension: ${extensionId}, path: ${( uri.toString(true))})`);
208
+ }
205
209
  const opts = {
206
210
  ...unvalidatedOpts
207
211
  };
@@ -264,7 +268,7 @@ registerAction2(class ResetMemento extends Action2 {
264
268
  super({
265
269
  id: 'files.participants.resetChoice',
266
270
  title: {
267
- value: ( localize(2500, "Reset choice for 'File operation needs preview'")),
271
+ value: ( localize(2513, "Reset choice for 'File operation needs preview'")),
268
272
  original: `Reset choice for 'File operation needs preview'`
269
273
  },
270
274
  f1: true
@@ -1,5 +1,5 @@
1
1
  import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
2
- import { ResourceLabelFormatter } from "@codingame/monaco-vscode-158b9837-fc78-5d9c-86f5-9134e4358643-common/vscode/vs/platform/label/common/label";
2
+ import { ResourceLabelFormatter } from "@codingame/monaco-vscode-api/vscode/vs/platform/label/common/label";
3
3
  import { ILabelService } from "@codingame/monaco-vscode-api/vscode/vs/platform/label/common/label.service";
4
4
  import { MainThreadLabelServiceShape } from "@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol";
5
5
  import { IExtHostContext } from "../../services/extensions/common/extHostCustomers.js";
@@ -11,7 +11,7 @@ import { ILanguageFeaturesService } from "@codingame/monaco-vscode-api/vscode/vs
11
11
  import { ExtensionIdentifier } from "@codingame/monaco-vscode-api/vscode/vs/platform/extensions/common/extensions";
12
12
  import { IUriIdentityService } from "@codingame/monaco-vscode-api/vscode/vs/platform/uriIdentity/common/uriIdentity.service";
13
13
  import { IExtHostContext } from "../../services/extensions/common/extHostCustomers.js";
14
- import { ExtHostLanguageFeaturesShape, ICodeActionProviderMetadataDto, IDocumentDropEditProviderMetadata, IDocumentFilterDto, ILanguageConfigurationDto, IPasteEditProviderMetadataDto, ISignatureHelpProviderMetadataDto, MainThreadLanguageFeaturesShape } from "@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol";
14
+ import { ExtHostLanguageFeaturesShape, ICodeActionProviderMetadataDto, IDocumentDropEditProviderMetadata, IDocumentFilterDto, IInlineCompletionModelInfoDto, ILanguageConfigurationDto, IPasteEditProviderMetadataDto, ISignatureHelpProviderMetadataDto, MainThreadLanguageFeaturesShape } from "@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol";
15
15
  import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
16
16
  import { IInlineCompletionsUnificationService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/inlineCompletions/common/inlineCompletionsUnification.service";
17
17
  export declare class MainThreadLanguageFeatures extends Disposable implements MainThreadLanguageFeaturesShape {
@@ -63,8 +63,9 @@ export declare class MainThreadLanguageFeatures extends Disposable implements Ma
63
63
  $registerDocumentRangeSemanticTokensProvider(handle: number, selector: IDocumentFilterDto[], legend: languages.SemanticTokensLegend, eventHandle: number | undefined): void;
64
64
  private static _inflateSuggestDto;
65
65
  $registerCompletionsProvider(handle: number, selector: IDocumentFilterDto[], triggerCharacters: string[], supportsResolveDetails: boolean, extensionId: ExtensionIdentifier): void;
66
- $registerInlineCompletionsSupport(handle: number, selector: IDocumentFilterDto[], supportsHandleEvents: boolean, extensionId: string, extensionVersion: string, groupId: string | undefined, yieldsToExtensionIds: string[], displayName: string | undefined, debounceDelayMs: number | undefined, excludesExtensionIds: string[], eventHandle: number | undefined): void;
66
+ $registerInlineCompletionsSupport(handle: number, selector: IDocumentFilterDto[], supportsHandleEvents: boolean, extensionId: string, extensionVersion: string, groupId: string | undefined, yieldsToExtensionIds: string[], displayName: string | undefined, debounceDelayMs: number | undefined, excludesExtensionIds: string[], supportsOnDidChange: boolean, supportsSetModelId: boolean, initialModelInfo: IInlineCompletionModelInfoDto | undefined, supportsOnDidChangeModelInfo: boolean): void;
67
67
  $emitInlineCompletionsChange(handle: number): void;
68
+ $emitInlineCompletionModelInfoChange(handle: number, data: IInlineCompletionModelInfoDto | undefined): void;
68
69
  $registerSignatureHelpProvider(handle: number, selector: IDocumentFilterDto[], metadata: ISignatureHelpProviderMetadataDto): void;
69
70
  $registerInlayHintsProvider(handle: number, selector: IDocumentFilterDto[], supportsResolve: boolean, eventHandle: number | undefined, displayName: string | undefined): void;
70
71
  $emitInlayHintsEvent(eventHandle: number): void;
@@ -18,9 +18,9 @@ import { IUriIdentityService } from '@codingame/monaco-vscode-api/vscode/vs/plat
18
18
  import { reviveWorkspaceEditDto } from './mainThreadBulkEdits.js';
19
19
  import { DataTransfer } from '@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHostTypeConverters';
20
20
  import { DataTransferFileCache } from '../common/shared/dataTransferCache.js';
21
- import { CallHierarchyProviderRegistry } from '@codingame/monaco-vscode-7f39b6f1-3542-5430-8760-0f404d7a7cee-common/vscode/vs/workbench/contrib/callHierarchy/common/callHierarchy';
22
- import { WorkspaceSymbolProviderRegistry } from '@codingame/monaco-vscode-6f931a91-88ea-5232-897f-a17ec3929ba5-common/vscode/vs/workbench/contrib/search/common/search';
23
- import { TypeHierarchyProviderRegistry } from '@codingame/monaco-vscode-7f39b6f1-3542-5430-8760-0f404d7a7cee-common/vscode/vs/workbench/contrib/typeHierarchy/common/typeHierarchy';
21
+ import { CallHierarchyProviderRegistry } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/callHierarchy/common/callHierarchy';
22
+ import { WorkspaceSymbolProviderRegistry } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/search/common/search';
23
+ import { TypeHierarchyProviderRegistry } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/typeHierarchy/common/typeHierarchy';
24
24
  import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
25
25
  import { ExtHostContext, ISuggestDataDtoField, ISuggestResultDtoField, MainContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol';
26
26
  import { InlineCompletionEndOfLifeReasonKind as InlineCompletionEndOfLifeReasonKind$1 } from '@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHostTypes';
@@ -523,143 +523,21 @@ let MainThreadLanguageFeatures = MainThreadLanguageFeatures_1 = class MainThread
523
523
  }
524
524
  this._registrations.set(handle, this._languageFeaturesService.completionProvider.register(selector, provider));
525
525
  }
526
- $registerInlineCompletionsSupport(handle, selector, supportsHandleEvents, extensionId, extensionVersion, groupId, yieldsToExtensionIds, displayName, debounceDelayMs, excludesExtensionIds, eventHandle) {
526
+ $registerInlineCompletionsSupport(handle, selector, supportsHandleEvents, extensionId, extensionVersion, groupId, yieldsToExtensionIds, displayName, debounceDelayMs, excludesExtensionIds, supportsOnDidChange, supportsSetModelId, initialModelInfo, supportsOnDidChangeModelInfo) {
527
527
  const providerId = new ProviderId(extensionId, extensionVersion, groupId);
528
- const provider = {
529
- provideInlineCompletions: async (model, position, context, token) => {
530
- const result = await this._proxy.$provideInlineCompletions(handle, model.uri, position, context, token);
531
- return result;
532
- },
533
- handleItemDidShow: async (completions, item, updatedInsertText, editDeltaInfo) => {
534
- this._instantiationService.invokeFunction(accessor => {
535
- const aiEditTelemetryService = accessor.getIfExists(IAiEditTelemetryService);
536
- if (item.suggestionId === undefined) {
537
- item.suggestionId = aiEditTelemetryService?.createSuggestionId({
538
- applyCodeBlockSuggestionId: undefined,
539
- feature: 'inlineSuggestion',
540
- source: providerId,
541
- languageId: completions.languageId,
542
- editDeltaInfo: editDeltaInfo,
543
- modeId: undefined,
544
- modelId: undefined,
545
- presentation: item.isInlineEdit ? 'nextEditSuggestion' : 'inlineCompletion',
546
- });
547
- }
548
- });
549
- if (supportsHandleEvents) {
550
- await this._proxy.$handleInlineCompletionDidShow(handle, completions.pid, item.idx, updatedInsertText);
551
- }
552
- },
553
- handlePartialAccept: async (completions, item, acceptedCharacters, info) => {
554
- if (supportsHandleEvents) {
555
- await this._proxy.$handleInlineCompletionPartialAccept(handle, completions.pid, item.idx, acceptedCharacters, info);
556
- }
557
- },
558
- handleEndOfLifetime: async (completions, item, reason, lifetimeSummary) => {
559
- function mapReason(reason, f) {
560
- if (reason.kind === InlineCompletionEndOfLifeReasonKind.Ignored) {
561
- return {
562
- ...reason,
563
- supersededBy: reason.supersededBy ? f(reason.supersededBy) : undefined,
564
- };
565
- }
566
- return reason;
567
- }
568
- if (supportsHandleEvents) {
569
- await this._proxy.$handleInlineCompletionEndOfLifetime(handle, completions.pid, item.idx, mapReason(reason, i => ({ pid: completions.pid, idx: i.idx })));
570
- }
571
- if (reason.kind === InlineCompletionEndOfLifeReasonKind.Accepted) {
572
- this._instantiationService.invokeFunction(accessor => {
573
- const aiEditTelemetryService = accessor.getIfExists(IAiEditTelemetryService);
574
- if (item.suggestionId !== undefined) {
575
- aiEditTelemetryService?.handleCodeAccepted({
576
- suggestionId: item.suggestionId,
577
- feature: 'inlineSuggestion',
578
- source: providerId,
579
- languageId: completions.languageId,
580
- editDeltaInfo: EditDeltaInfo.tryCreate(lifetimeSummary.lineCountModified, lifetimeSummary.lineCountOriginal, lifetimeSummary.characterCountModified, lifetimeSummary.characterCountOriginal),
581
- modeId: undefined,
582
- modelId: undefined,
583
- presentation: item.isInlineEdit ? 'nextEditSuggestion' : 'inlineCompletion',
584
- acceptanceMethod: 'accept',
585
- applyCodeBlockSuggestionId: undefined,
586
- });
587
- }
588
- });
589
- }
590
- const endOfLifeSummary = {
591
- opportunityId: lifetimeSummary.requestUuid,
592
- correlationId: lifetimeSummary.correlationId,
593
- shown: lifetimeSummary.shown,
594
- shownDuration: lifetimeSummary.shownDuration,
595
- shownDurationUncollapsed: lifetimeSummary.shownDurationUncollapsed,
596
- timeUntilShown: lifetimeSummary.timeUntilShown,
597
- timeUntilProviderRequest: lifetimeSummary.timeUntilProviderRequest,
598
- timeUntilProviderResponse: lifetimeSummary.timeUntilProviderResponse,
599
- editorType: lifetimeSummary.editorType,
600
- viewKind: lifetimeSummary.viewKind,
601
- preceeded: lifetimeSummary.preceeded,
602
- requestReason: lifetimeSummary.requestReason,
603
- typingInterval: lifetimeSummary.typingInterval,
604
- typingIntervalCharacterCount: lifetimeSummary.typingIntervalCharacterCount,
605
- languageId: lifetimeSummary.languageId,
606
- cursorColumnDistance: lifetimeSummary.cursorColumnDistance,
607
- cursorLineDistance: lifetimeSummary.cursorLineDistance,
608
- lineCountOriginal: lifetimeSummary.lineCountOriginal,
609
- lineCountModified: lifetimeSummary.lineCountModified,
610
- characterCountOriginal: lifetimeSummary.characterCountOriginal,
611
- characterCountModified: lifetimeSummary.characterCountModified,
612
- disjointReplacements: lifetimeSummary.disjointReplacements,
613
- sameShapeReplacements: lifetimeSummary.sameShapeReplacements,
614
- selectedSuggestionInfo: lifetimeSummary.selectedSuggestionInfo,
615
- extensionId,
616
- extensionVersion,
617
- groupId,
618
- availableProviders: lifetimeSummary.availableProviders,
619
- partiallyAccepted: lifetimeSummary.partiallyAccepted,
620
- partiallyAcceptedCountSinceOriginal: lifetimeSummary.partiallyAcceptedCountSinceOriginal,
621
- partiallyAcceptedRatioSinceOriginal: lifetimeSummary.partiallyAcceptedRatioSinceOriginal,
622
- partiallyAcceptedCharactersSinceOriginal: lifetimeSummary.partiallyAcceptedCharactersSinceOriginal,
623
- superseded: reason.kind === InlineCompletionEndOfLifeReasonKind$1.Ignored && !!reason.supersededBy,
624
- reason: reason.kind === InlineCompletionEndOfLifeReasonKind$1.Accepted ? 'accepted'
625
- : reason.kind === InlineCompletionEndOfLifeReasonKind$1.Rejected ? 'rejected'
626
- : reason.kind === InlineCompletionEndOfLifeReasonKind$1.Ignored ? 'ignored' : undefined,
627
- noSuggestionReason: undefined,
628
- notShownReason: lifetimeSummary.notShownReason,
629
- ...forwardToChannelIf(isCopilotLikeExtension(extensionId)),
630
- };
631
- const dataChannelForwardingTelemetryService = this._instantiationService.createInstance(DataChannelForwardingTelemetryService);
632
- sendInlineCompletionsEndOfLifeTelemetry(dataChannelForwardingTelemetryService, endOfLifeSummary);
633
- },
634
- disposeInlineCompletions: (completions, reason) => {
635
- this._proxy.$freeInlineCompletionsList(handle, completions.pid, reason);
636
- },
637
- handleRejection: async (completions, item) => {
638
- if (supportsHandleEvents) {
639
- await this._proxy.$handleInlineCompletionRejection(handle, completions.pid, item.idx);
640
- }
641
- },
642
- groupId: groupId ?? extensionId,
643
- providerId,
644
- yieldsToGroupIds: yieldsToExtensionIds,
645
- excludesGroupIds: excludesExtensionIds,
646
- debounceDelayMs,
647
- displayName,
648
- toString() {
649
- return `InlineCompletionsProvider(${extensionId})`;
650
- },
651
- };
652
- if (typeof eventHandle === 'number') {
653
- const emitter = ( new Emitter());
654
- this._registrations.set(eventHandle, emitter);
655
- provider.onDidChangeInlineCompletions = emitter.event;
656
- }
657
- this._registrations.set(handle, this._languageFeaturesService.inlineCompletionsProvider.register(selector, provider));
528
+ const provider = this._instantiationService.createInstance(ExtensionBackedInlineCompletionsProvider, handle, groupId ?? extensionId, providerId, yieldsToExtensionIds, excludesExtensionIds, debounceDelayMs, displayName, initialModelInfo, supportsHandleEvents, supportsSetModelId, supportsOnDidChange, supportsOnDidChangeModelInfo, selector, this._proxy);
529
+ this._registrations.set(handle, provider);
658
530
  }
659
531
  $emitInlineCompletionsChange(handle) {
660
532
  const obj = this._registrations.get(handle);
661
- if (obj instanceof Emitter) {
662
- obj.fire(undefined);
533
+ if (obj instanceof ExtensionBackedInlineCompletionsProvider) {
534
+ obj._emitDidChange();
535
+ }
536
+ }
537
+ $emitInlineCompletionModelInfoChange(handle, data) {
538
+ const obj = this._registrations.get(handle);
539
+ if (obj instanceof ExtensionBackedInlineCompletionsProvider) {
540
+ obj._setModelInfo(data);
663
541
  }
664
542
  }
665
543
  $registerSignatureHelpProvider(handle, selector, metadata) {
@@ -1161,5 +1039,187 @@ class MainThreadDocumentRangeSemanticTokensProvider {
1161
1039
  throw ( new Error(`Unexpected`));
1162
1040
  }
1163
1041
  }
1042
+ let ExtensionBackedInlineCompletionsProvider = class ExtensionBackedInlineCompletionsProvider extends Disposable {
1043
+ constructor(handle, groupId, providerId, yieldsToGroupIds, excludesGroupIds, debounceDelayMs, displayName, modelInfo, _supportsHandleEvents, _supportsSetModelId, _supportsOnDidChange, _supportsOnDidChangeModelInfo, _selector, _proxy, _languageFeaturesService, _aiEditTelemetryService, _instantiationService) {
1044
+ super();
1045
+ this.handle = handle;
1046
+ this.groupId = groupId;
1047
+ this.providerId = providerId;
1048
+ this.yieldsToGroupIds = yieldsToGroupIds;
1049
+ this.excludesGroupIds = excludesGroupIds;
1050
+ this.debounceDelayMs = debounceDelayMs;
1051
+ this.displayName = displayName;
1052
+ this.modelInfo = modelInfo;
1053
+ this._supportsHandleEvents = _supportsHandleEvents;
1054
+ this._supportsSetModelId = _supportsSetModelId;
1055
+ this._supportsOnDidChange = _supportsOnDidChange;
1056
+ this._supportsOnDidChangeModelInfo = _supportsOnDidChangeModelInfo;
1057
+ this._selector = _selector;
1058
+ this._proxy = _proxy;
1059
+ this._languageFeaturesService = _languageFeaturesService;
1060
+ this._aiEditTelemetryService = _aiEditTelemetryService;
1061
+ this._instantiationService = _instantiationService;
1062
+ this._onDidChangeEmitter = ( new Emitter());
1063
+ this._onDidChangeModelInfoEmitter = ( new Emitter());
1064
+ this.setModelId = this._supportsSetModelId ? async (modelId) => {
1065
+ await this._proxy.$handleInlineCompletionSetCurrentModelId(this.handle, modelId);
1066
+ } : undefined;
1067
+ this.onDidChangeInlineCompletions = this._supportsOnDidChange ? this._onDidChangeEmitter.event : undefined;
1068
+ this.onDidChangeModelInfo = this._supportsOnDidChangeModelInfo ? this._onDidChangeModelInfoEmitter.event : undefined;
1069
+ this._register(this._languageFeaturesService.inlineCompletionsProvider.register(this._selector, this));
1070
+ }
1071
+ _setModelInfo(newModelInfo) {
1072
+ this.modelInfo = newModelInfo;
1073
+ if (this._supportsOnDidChangeModelInfo) {
1074
+ this._onDidChangeModelInfoEmitter.fire();
1075
+ }
1076
+ }
1077
+ _emitDidChange() {
1078
+ if (this._supportsOnDidChange) {
1079
+ this._onDidChangeEmitter.fire();
1080
+ }
1081
+ }
1082
+ async provideInlineCompletions(model, position, context, token) {
1083
+ const result = await this._proxy.$provideInlineCompletions(this.handle, model.uri, position, context, token);
1084
+ return result;
1085
+ }
1086
+ async handleItemDidShow(completions, item, updatedInsertText, editDeltaInfo) {
1087
+ if (item.suggestionId === undefined) {
1088
+ item.suggestionId = this._aiEditTelemetryService.createSuggestionId({
1089
+ applyCodeBlockSuggestionId: undefined,
1090
+ feature: 'inlineSuggestion',
1091
+ source: this.providerId,
1092
+ languageId: completions.languageId,
1093
+ editDeltaInfo: editDeltaInfo,
1094
+ modeId: undefined,
1095
+ modelId: undefined,
1096
+ presentation: item.isInlineEdit ? 'nextEditSuggestion' : 'inlineCompletion',
1097
+ });
1098
+ }
1099
+ if (this._supportsHandleEvents) {
1100
+ await this._proxy.$handleInlineCompletionDidShow(this.handle, completions.pid, item.idx, updatedInsertText);
1101
+ }
1102
+ }
1103
+ async handlePartialAccept(completions, item, acceptedCharacters, info) {
1104
+ if (this._supportsHandleEvents) {
1105
+ await this._proxy.$handleInlineCompletionPartialAccept(this.handle, completions.pid, item.idx, acceptedCharacters, info);
1106
+ }
1107
+ }
1108
+ async handleEndOfLifetime(completions, item, reason, lifetimeSummary) {
1109
+ function mapReason(reason, f) {
1110
+ if (reason.kind === InlineCompletionEndOfLifeReasonKind.Ignored) {
1111
+ return {
1112
+ ...reason,
1113
+ supersededBy: reason.supersededBy ? f(reason.supersededBy) : undefined,
1114
+ };
1115
+ }
1116
+ return reason;
1117
+ }
1118
+ if (this._supportsHandleEvents) {
1119
+ await this._proxy.$handleInlineCompletionEndOfLifetime(this.handle, completions.pid, item.idx, mapReason(reason, i => ({ pid: completions.pid, idx: i.idx })));
1120
+ }
1121
+ if (reason.kind === InlineCompletionEndOfLifeReasonKind.Accepted) {
1122
+ if (item.suggestionId !== undefined) {
1123
+ this._aiEditTelemetryService.handleCodeAccepted({
1124
+ suggestionId: item.suggestionId,
1125
+ feature: 'inlineSuggestion',
1126
+ source: this.providerId,
1127
+ languageId: completions.languageId,
1128
+ editDeltaInfo: EditDeltaInfo.tryCreate(lifetimeSummary.lineCountModified, lifetimeSummary.lineCountOriginal, lifetimeSummary.characterCountModified, lifetimeSummary.characterCountOriginal),
1129
+ modeId: undefined,
1130
+ modelId: undefined,
1131
+ presentation: item.isInlineEdit ? 'nextEditSuggestion' : 'inlineCompletion',
1132
+ acceptanceMethod: 'accept',
1133
+ applyCodeBlockSuggestionId: undefined,
1134
+ });
1135
+ }
1136
+ }
1137
+ const endOfLifeSummary = {
1138
+ opportunityId: lifetimeSummary.requestUuid,
1139
+ correlationId: lifetimeSummary.correlationId,
1140
+ shown: lifetimeSummary.shown,
1141
+ shownDuration: lifetimeSummary.shownDuration,
1142
+ shownDurationUncollapsed: lifetimeSummary.shownDurationUncollapsed,
1143
+ timeUntilShown: lifetimeSummary.timeUntilShown,
1144
+ timeUntilProviderRequest: lifetimeSummary.timeUntilProviderRequest,
1145
+ timeUntilProviderResponse: lifetimeSummary.timeUntilProviderResponse,
1146
+ editorType: lifetimeSummary.editorType,
1147
+ viewKind: lifetimeSummary.viewKind,
1148
+ preceeded: lifetimeSummary.preceeded,
1149
+ requestReason: lifetimeSummary.requestReason,
1150
+ typingInterval: lifetimeSummary.typingInterval,
1151
+ typingIntervalCharacterCount: lifetimeSummary.typingIntervalCharacterCount,
1152
+ languageId: lifetimeSummary.languageId,
1153
+ cursorColumnDistance: lifetimeSummary.cursorColumnDistance,
1154
+ cursorLineDistance: lifetimeSummary.cursorLineDistance,
1155
+ lineCountOriginal: lifetimeSummary.lineCountOriginal,
1156
+ lineCountModified: lifetimeSummary.lineCountModified,
1157
+ characterCountOriginal: lifetimeSummary.characterCountOriginal,
1158
+ characterCountModified: lifetimeSummary.characterCountModified,
1159
+ disjointReplacements: lifetimeSummary.disjointReplacements,
1160
+ sameShapeReplacements: lifetimeSummary.sameShapeReplacements,
1161
+ selectedSuggestionInfo: lifetimeSummary.selectedSuggestionInfo,
1162
+ extensionId: this.providerId.extensionId,
1163
+ extensionVersion: this.providerId.extensionVersion,
1164
+ groupId: extractEngineFromCorrelationId(lifetimeSummary.correlationId) ?? this.groupId,
1165
+ skuPlan: lifetimeSummary.skuPlan,
1166
+ skuType: lifetimeSummary.skuType,
1167
+ performanceMarkers: lifetimeSummary.performanceMarkers,
1168
+ availableProviders: lifetimeSummary.availableProviders,
1169
+ partiallyAccepted: lifetimeSummary.partiallyAccepted,
1170
+ partiallyAcceptedCountSinceOriginal: lifetimeSummary.partiallyAcceptedCountSinceOriginal,
1171
+ partiallyAcceptedRatioSinceOriginal: lifetimeSummary.partiallyAcceptedRatioSinceOriginal,
1172
+ partiallyAcceptedCharactersSinceOriginal: lifetimeSummary.partiallyAcceptedCharactersSinceOriginal,
1173
+ superseded: reason.kind === InlineCompletionEndOfLifeReasonKind$1.Ignored && !!reason.supersededBy,
1174
+ reason: reason.kind === InlineCompletionEndOfLifeReasonKind$1.Accepted ? 'accepted'
1175
+ : reason.kind === InlineCompletionEndOfLifeReasonKind$1.Rejected ? 'rejected'
1176
+ : reason.kind === InlineCompletionEndOfLifeReasonKind$1.Ignored ? 'ignored' : undefined,
1177
+ noSuggestionReason: undefined,
1178
+ notShownReason: lifetimeSummary.notShownReason,
1179
+ renameCreated: lifetimeSummary.renameCreated,
1180
+ renameDuration: lifetimeSummary.renameDuration,
1181
+ renameTimedOut: lifetimeSummary.renameTimedOut,
1182
+ renameDroppedOtherEdits: lifetimeSummary.renameDroppedOtherEdits,
1183
+ renameDroppedRenameEdits: lifetimeSummary.renameDroppedRenameEdits,
1184
+ editKind: lifetimeSummary.editKind,
1185
+ longDistanceHintVisible: lifetimeSummary.longDistanceHintVisible,
1186
+ longDistanceHintDistance: lifetimeSummary.longDistanceHintDistance,
1187
+ ...forwardToChannelIf(isCopilotLikeExtension(this.providerId.extensionId)),
1188
+ };
1189
+ const dataChannelForwardingTelemetryService = this._instantiationService.createInstance(DataChannelForwardingTelemetryService);
1190
+ sendInlineCompletionsEndOfLifeTelemetry(dataChannelForwardingTelemetryService, endOfLifeSummary);
1191
+ }
1192
+ disposeInlineCompletions(completions, reason) {
1193
+ this._proxy.$freeInlineCompletionsList(this.handle, completions.pid, reason);
1194
+ }
1195
+ async handleRejection(completions, item) {
1196
+ if (this._supportsHandleEvents) {
1197
+ await this._proxy.$handleInlineCompletionRejection(this.handle, completions.pid, item.idx);
1198
+ }
1199
+ }
1200
+ toString() {
1201
+ return `InlineCompletionsProvider(${( this.providerId.toString())})`;
1202
+ }
1203
+ };
1204
+ ExtensionBackedInlineCompletionsProvider = ( __decorate([
1205
+ ( __param(14, ILanguageFeaturesService)),
1206
+ ( __param(15, IAiEditTelemetryService)),
1207
+ ( __param(16, IInstantiationService))
1208
+ ], ExtensionBackedInlineCompletionsProvider));
1209
+ function extractEngineFromCorrelationId(correlationId) {
1210
+ if (!correlationId) {
1211
+ return undefined;
1212
+ }
1213
+ try {
1214
+ const parsed = JSON.parse(correlationId);
1215
+ if (typeof parsed === 'object' && parsed !== null && typeof parsed.engine === 'string') {
1216
+ return parsed.engine;
1217
+ }
1218
+ return undefined;
1219
+ }
1220
+ catch {
1221
+ return undefined;
1222
+ }
1223
+ }
1164
1224
 
1165
1225
  export { MainThreadDocumentRangeSemanticTokensProvider, MainThreadDocumentSemanticTokensProvider, MainThreadLanguageFeatures };
@@ -13,7 +13,7 @@ export declare class MainThreadLanguageModelTools extends Disposable implements
13
13
  constructor(extHostContext: IExtHostContext, _languageModelToolsService: ILanguageModelToolsService);
14
14
  private getToolDtos;
15
15
  $getTools(): Promise<IToolDataDto[]>;
16
- $invokeTool(dto: IToolInvocation, token?: CancellationToken): Promise<Dto<IToolResult> | SerializableObjectWithBuffers<Dto<IToolResult>>>;
16
+ $invokeTool(dto: Dto<IToolInvocation>, token?: CancellationToken): Promise<Dto<IToolResult> | SerializableObjectWithBuffers<Dto<IToolResult>>>;
17
17
  $acceptToolProgress(callId: string, progress: IToolProgressStep): void;
18
18
  $countTokensForInvocation(callId: string, input: string, token: CancellationToken): Promise<number>;
19
19
  $registerTool(id: string): void;
@@ -24,6 +24,7 @@ let MainThreadLanguageModelTools = class MainThreadLanguageModelTools extends Di
24
24
  id: tool.id,
25
25
  displayName: tool.displayName,
26
26
  toolReferenceName: tool.toolReferenceName,
27
+ legacyToolReferenceFullNames: tool.legacyToolReferenceFullNames,
27
28
  tags: tool.tags,
28
29
  userDescription: tool.userDescription,
29
30
  modelDescription: tool.modelDescription,
@@ -35,7 +36,7 @@ let MainThreadLanguageModelTools = class MainThreadLanguageModelTools extends Di
35
36
  return this.getToolDtos();
36
37
  }
37
38
  async $invokeTool(dto, token) {
38
- const result = await this._languageModelToolsService.invokeTool(dto, (input, token) => this._proxy.$countTokensForInvocation(dto.callId, input, token), token ?? CancellationToken.None);
39
+ const result = await this._languageModelToolsService.invokeTool(revive(dto), (input, token) => this._proxy.$countTokensForInvocation(dto.callId, input, token), token ?? CancellationToken.None);
39
40
  const out = {
40
41
  content: result.content,
41
42
  toolMetadata: result.toolMetadata
@@ -9,7 +9,7 @@ import { DisposableStore, DisposableMap, Disposable, toDisposable } from '@codin
9
9
  import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
10
10
  import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
11
11
  import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
12
- import { resizeImage } from '@codingame/monaco-vscode-9d2c06d1-1f89-51a5-9964-aa01fe50c198-common/vscode/vs/workbench/contrib/chat/browser/imageUtils';
12
+ import { resizeImage } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/imageUtils';
13
13
  import { ILanguageModelIgnoredFilesService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/ignoredFiles.service';
14
14
  import { ILanguageModelsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModels.service';
15
15
  import { IAuthenticationAccessService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/authentication/browser/authenticationAccessService.service';
@@ -160,7 +160,7 @@ let MainThreadLanguageModels = class MainThreadLanguageModels {
160
160
  if (this._authenticationService.getProviderIds().includes(authProviderId)) {
161
161
  return Disposable.None;
162
162
  }
163
- const accountLabel = auth.accountLabel ?? ( localize(2501, 'Language Models'));
163
+ const accountLabel = auth.accountLabel ?? ( localize(2514, 'Language Models'));
164
164
  const disposables = ( new DisposableStore());
165
165
  this._authenticationService.registerAuthenticationProvider(authProviderId, ( new LanguageModelAccessAuthProvider(authProviderId, auth.providerLabel, accountLabel)));
166
166
  disposables.add(toDisposable(() => {
@@ -236,7 +236,7 @@ class LanguageModelAccessAuthProvider {
236
236
  }
237
237
  confirmation(extensionName, _recreatingSession) {
238
238
  return localize(
239
- 2502,
239
+ 2515,
240
240
  "The extension '{0}' wants to access the language models provided by {1}.",
241
241
  extensionName,
242
242
  this.label
@@ -2,7 +2,7 @@
2
2
  import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
3
3
  import { Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
4
4
  import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
5
- import { SocketCloseEventType } from '@codingame/monaco-vscode-4a3ac544-9a61-534c-88df-756262793ef7-common/vscode/vs/base/parts/ipc/common/ipc.net';
5
+ import { SocketCloseEventType } from '@codingame/monaco-vscode-api/vscode/vs/base/parts/ipc/common/ipc.net';
6
6
  import { ManagedSocket, connectManagedSocket } from '../../../platform/remote/common/managedSocket.js';
7
7
  import { RemoteConnectionType } from '@codingame/monaco-vscode-api/vscode/vs/platform/remote/common/remoteAuthorityResolver';
8
8
  import { IRemoteSocketFactoryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/remote/common/remoteSocketFactoryService.service';
@@ -26,6 +26,7 @@ export declare class MainThreadMcp extends Disposable implements MainThreadMcpSh
26
26
  private _serverIdCounter;
27
27
  private readonly _servers;
28
28
  private readonly _serverDefinitions;
29
+ private readonly _serverAuthTracking;
29
30
  private readonly _proxy;
30
31
  private readonly _collectionDefinitions;
31
32
  constructor(_extHostContext: IExtHostContext, _mcpRegistry: IMcpRegistry, dialogService: IDialogService, _authenticationService: IAuthenticationService, authenticationMcpServersService: IAuthenticationMcpService, authenticationMCPServerAccessService: IAuthenticationMcpAccessService, authenticationMCPServerUsageService: IAuthenticationMcpUsageService, _dynamicAuthenticationProviderStorageService: IDynamicAuthenticationProviderStorageService, _extensionService: IExtensionService, _contextKeyService: IContextKeyService);
@@ -34,8 +35,11 @@ export declare class MainThreadMcp extends Disposable implements MainThreadMcpSh
34
35
  $onDidChangeState(id: number, update: McpConnectionState): void;
35
36
  $onDidPublishLog(id: number, level: LogLevel, log: string): void;
36
37
  $onDidReceiveMessage(id: number, message: string): void;
38
+ $getTokenForProviderId(id: number, providerId: string, scopes: string[], options?: IMcpAuthenticationOptions): Promise<string | undefined>;
37
39
  $getTokenFromServerMetadata(id: number, authDetails: IMcpAuthenticationDetails, { errorOnUserInteraction, forceNewRegistration }?: IMcpAuthenticationOptions): Promise<string | undefined>;
40
+ private _getSessionForProvider;
38
41
  private continueWithIncorrectAccountPrompt;
42
+ private _onDidChangeAuthSessions;
39
43
  private loginPrompt;
40
44
  dispose(): void;
41
45
  }