@codingame/monaco-vscode-extensions-service-override 22.1.8 → 23.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/index.js +1 -0
  2. package/package.json +30 -29
  3. package/vscode/src/vs/platform/extensionManagement/common/extensionManagementCLI.js +28 -28
  4. package/vscode/src/vs/workbench/api/browser/mainThreadAuthentication.d.ts +3 -1
  5. package/vscode/src/vs/workbench/api/browser/mainThreadAuthentication.js +47 -41
  6. package/vscode/src/vs/workbench/api/browser/mainThreadBulkEdits.js +1 -1
  7. package/vscode/src/vs/workbench/api/browser/mainThreadCLICommands.js +1 -1
  8. package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents2.d.ts +3 -1
  9. package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents2.js +52 -24
  10. package/vscode/src/vs/workbench/api/browser/mainThreadChatContext.d.ts +16 -0
  11. package/vscode/src/vs/workbench/api/browser/mainThreadChatContext.js +43 -0
  12. package/vscode/src/vs/workbench/api/browser/mainThreadChatSessions.d.ts +23 -17
  13. package/vscode/src/vs/workbench/api/browser/mainThreadChatSessions.js +133 -90
  14. package/vscode/src/vs/workbench/api/browser/mainThreadClipboard.d.ts +2 -1
  15. package/vscode/src/vs/workbench/api/browser/mainThreadCodeInsets.d.ts +1 -1
  16. package/vscode/src/vs/workbench/api/browser/mainThreadCommands.d.ts +1 -1
  17. package/vscode/src/vs/workbench/api/browser/mainThreadComments.d.ts +6 -2
  18. package/vscode/src/vs/workbench/api/browser/mainThreadComments.js +1 -1
  19. package/vscode/src/vs/workbench/api/browser/mainThreadCustomEditors.js +8 -6
  20. package/vscode/src/vs/workbench/api/browser/mainThreadDebugService.d.ts +1 -1
  21. package/vscode/src/vs/workbench/api/browser/mainThreadDocuments.d.ts +1 -1
  22. package/vscode/src/vs/workbench/api/browser/mainThreadDocumentsAndEditors.js +1 -1
  23. package/vscode/src/vs/workbench/api/browser/mainThreadEditSessionIdentityParticipant.js +1 -1
  24. package/vscode/src/vs/workbench/api/browser/mainThreadEditorTabs.d.ts +1 -1
  25. package/vscode/src/vs/workbench/api/browser/mainThreadEditorTabs.js +7 -7
  26. package/vscode/src/vs/workbench/api/browser/mainThreadEditors.d.ts +1 -1
  27. package/vscode/src/vs/workbench/api/browser/mainThreadEditors.js +1 -1
  28. package/vscode/src/vs/workbench/api/browser/mainThreadErrors.d.ts +1 -1
  29. package/vscode/src/vs/workbench/api/browser/mainThreadErrors.js +1 -1
  30. package/vscode/src/vs/workbench/api/browser/mainThreadExtensionService.js +21 -14
  31. package/vscode/src/vs/workbench/api/browser/mainThreadFileSystemEventService.js +20 -20
  32. package/vscode/src/vs/workbench/api/browser/mainThreadLanguageFeatures.d.ts +7 -5
  33. package/vscode/src/vs/workbench/api/browser/mainThreadLanguageFeatures.js +17 -6
  34. package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModels.d.ts +1 -1
  35. package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModels.js +3 -3
  36. package/vscode/src/vs/workbench/api/browser/mainThreadMcp.d.ts +5 -5
  37. package/vscode/src/vs/workbench/api/browser/mainThreadMcp.js +29 -21
  38. package/vscode/src/vs/workbench/api/browser/mainThreadMessageService.js +4 -4
  39. package/vscode/src/vs/workbench/api/browser/mainThreadNotebook.js +4 -5
  40. package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDocumentsAndEditors.js +2 -2
  41. package/vscode/src/vs/workbench/api/browser/mainThreadNotebookEditors.d.ts +2 -2
  42. package/vscode/src/vs/workbench/api/browser/mainThreadNotebookEditors.js +2 -2
  43. package/vscode/src/vs/workbench/api/browser/mainThreadNotebookKernels.d.ts +1 -1
  44. package/vscode/src/vs/workbench/api/browser/mainThreadNotebookKernels.js +13 -17
  45. package/vscode/src/vs/workbench/api/browser/mainThreadNotebookSaveParticipant.js +2 -2
  46. package/vscode/src/vs/workbench/api/browser/mainThreadOutputService.js +3 -3
  47. package/vscode/src/vs/workbench/api/browser/mainThreadProgress.js +1 -1
  48. package/vscode/src/vs/workbench/api/browser/mainThreadQuickOpen.d.ts +24 -3
  49. package/vscode/src/vs/workbench/api/browser/mainThreadQuickOpen.js +172 -55
  50. package/vscode/src/vs/workbench/api/browser/mainThreadSCM.d.ts +2 -1
  51. package/vscode/src/vs/workbench/api/browser/mainThreadSCM.js +57 -6
  52. package/vscode/src/vs/workbench/api/browser/mainThreadSaveParticipant.js +1 -1
  53. package/vscode/src/vs/workbench/api/browser/mainThreadSearch.d.ts +2 -1
  54. package/vscode/src/vs/workbench/api/browser/mainThreadSearch.js +1 -1
  55. package/vscode/src/vs/workbench/api/browser/mainThreadTask.js +2 -2
  56. package/vscode/src/vs/workbench/api/browser/mainThreadTelemetry.d.ts +2 -1
  57. package/vscode/src/vs/workbench/api/browser/mainThreadTerminalService.js +6 -6
  58. package/vscode/src/vs/workbench/api/browser/mainThreadTerminalShellIntegration.js +7 -7
  59. package/vscode/src/vs/workbench/api/browser/mainThreadTunnelService.js +2 -2
  60. package/vscode/src/vs/workbench/api/browser/mainThreadUriOpeners.js +2 -2
  61. package/vscode/src/vs/workbench/api/browser/mainThreadWebviewPanels.d.ts +1 -1
  62. package/vscode/src/vs/workbench/api/browser/mainThreadWebviewPanels.js +5 -5
  63. package/vscode/src/vs/workbench/api/browser/mainThreadWebviews.d.ts +1 -1
  64. package/vscode/src/vs/workbench/api/browser/mainThreadWebviews.js +1 -1
  65. package/vscode/src/vs/workbench/api/browser/mainThreadWorkspace.js +5 -5
  66. package/vscode/src/vs/workbench/contrib/customEditor/common/customTextEditorModel.js +1 -1
  67. package/vscode/src/vs/workbench/contrib/externalUriOpener/common/contributedOpeners.js +3 -1
  68. package/vscode/src/vs/workbench/services/extensionManagement/browser/extensionBisect.js +23 -23
  69. package/vscode/src/vs/workbench/services/extensionManagement/browser/webExtensionsScannerService.js +2 -2
  70. package/vscode/src/vs/workbench/services/extensions/browser/extensionService.js +2 -2
  71. package/vscode/src/vs/workbench/services/extensions/browser/webWorkerExtensionHost.js +1 -1
  72. package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.js +12 -12
  73. package/vscode/src/vs/workbench/services/extensions/common/extensionHostManager.js +1 -1
  74. package/vscode/src/vs/workbench/services/extensions/common/extensionsProposedApi.js +1 -1
  75. package/vscode/src/vs/workbench/services/extensions/common/extensionsUtil.js +4 -4
  76. package/vscode/src/vs/workbench/services/extensions/common/lazyCreateExtensionHostManager.d.ts +1 -0
  77. package/vscode/src/vs/workbench/services/extensions/common/lazyCreateExtensionHostManager.js +6 -0
  78. package/vscode/src/vs/workbench/services/extensions/common/remoteExtensionHost.js +1 -1
@@ -19,15 +19,17 @@ import { IUriIdentityService } from '@codingame/monaco-vscode-api/vscode/vs/plat
19
19
  import { IChatWidgetService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service';
20
20
  import { IChatAgentService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatAgents.service';
21
21
  import { IChatEditingService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatEditingService.service';
22
- import { ChatRequestAgentPart } from '@codingame/monaco-vscode-b994942c-360d-5b68-8a33-77d4bde6b714-common/vscode/vs/workbench/contrib/chat/common/chatParserTypes';
23
- import { ChatRequestParser } from '@codingame/monaco-vscode-5084de40-f866-5cb5-9d9b-33a10f6f235d-common/vscode/vs/workbench/contrib/chat/common/chatRequestParser';
22
+ import { ChatRequestAgentPart } from '@codingame/monaco-vscode-aac7027b-326c-513a-95a9-e4eedd151b38-common/vscode/vs/workbench/contrib/chat/common/chatParserTypes';
23
+ import { ChatRequestParser } from '@codingame/monaco-vscode-bc6f260d-ec63-5c95-9446-1ca7d0872719-common/vscode/vs/workbench/contrib/chat/common/chatRequestParser';
24
24
  import { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService.service';
25
+ import { IChatSessionsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService.service';
26
+ import { LocalChatSessionUri } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatUri';
25
27
  import { ChatModeKind, ChatAgentLocation } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
26
28
  import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
27
29
  import { IExtensionService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions.service';
28
30
  import { ExtHostContext, MainContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol';
29
31
  import { NotebookDto } from './mainThreadNotebookDto.js';
30
- import { addDynamicVariableActionId } from '@codingame/monaco-vscode-bba55be6-41a2-50cd-a3cc-8bafa35bfa89-common/vscode/vs/workbench/contrib/chat/browser/contrib/chatDynamicVariablesConstant';
32
+ import { addDynamicVariableActionId } from '@codingame/monaco-vscode-9d2c06d1-1f89-51a5-9964-aa01fe50c198-common/vscode/vs/workbench/contrib/chat/browser/contrib/chatDynamicVariablesConstant';
31
33
 
32
34
  class MainThreadChatTask {
33
35
  get onDidAddProgress() { return this._onDidAddProgress.event; }
@@ -60,9 +62,10 @@ class MainThreadChatTask {
60
62
  }
61
63
  }
62
64
  let MainThreadChatAgents2 = class MainThreadChatAgents2 extends Disposable {
63
- constructor(extHostContext, _chatAgentService, _chatService, _chatEditingService, _languageFeaturesService, _chatWidgetService, _instantiationService, _logService, _extensionService, _uriIdentityService) {
65
+ constructor(extHostContext, _chatAgentService, _chatSessionService, _chatService, _chatEditingService, _languageFeaturesService, _chatWidgetService, _instantiationService, _logService, _extensionService, _uriIdentityService) {
64
66
  super();
65
67
  this._chatAgentService = _chatAgentService;
68
+ this._chatSessionService = _chatSessionService;
66
69
  this._chatService = _chatService;
67
70
  this._chatEditingService = _chatEditingService;
68
71
  this._languageFeaturesService = _languageFeaturesService;
@@ -81,7 +84,10 @@ let MainThreadChatAgents2 = class MainThreadChatAgents2 extends Disposable {
81
84
  this._unresolvedAnchors = ( new Map());
82
85
  this._proxy = ( extHostContext.getProxy(ExtHostContext.ExtHostChatAgents2));
83
86
  this._register(this._chatService.onDidDisposeSession(e => {
84
- this._proxy.$releaseSession(e.sessionId);
87
+ const localSessionId = LocalChatSessionUri.parseLocalSessionId(e.sessionResource);
88
+ if (localSessionId) {
89
+ this._proxy.$releaseSession(localSessionId);
90
+ }
85
91
  }));
86
92
  this._register(this._chatService.onDidPerformUserAction(e => {
87
93
  if (typeof e.agentId === 'string') {
@@ -117,7 +123,8 @@ let MainThreadChatAgents2 = class MainThreadChatAgents2 extends Disposable {
117
123
  async $registerAgent(handle, extension, id, metadata, dynamicProps) {
118
124
  await this._extensionService.whenInstalledExtensionsRegistered();
119
125
  const staticAgentRegistration = this._chatAgentService.getAgent(id, true);
120
- if (!staticAgentRegistration && !dynamicProps) {
126
+ const chatSessionRegistration = this._chatSessionService.getAllChatSessionContributions().find(c => c.type === id || c.alternativeIds?.includes(id));
127
+ if (!staticAgentRegistration && !chatSessionRegistration && !dynamicProps) {
121
128
  if (this._chatAgentService.getAgentsByName(id).length) {
122
129
  throw ( new Error(
123
130
  `chatParticipant must be declared with an ID in package.json. The "id" property may be missing! "${id}"`
@@ -127,10 +134,14 @@ let MainThreadChatAgents2 = class MainThreadChatAgents2 extends Disposable {
127
134
  }
128
135
  const impl = {
129
136
  invoke: async (request, progress, history, token) => {
130
- this._pendingProgress.set(request.requestId, progress);
137
+ const chatSession = this._chatService.getSessionByLegacyId(request.sessionId);
138
+ this._pendingProgress.set(request.requestId, { progress, chatSession });
131
139
  try {
132
- const chatSessionContext = this._chatService.getChatSessionFromInternalId(request.sessionId);
133
- return (await this._proxy.$invokeAgent(handle, request, { history, chatSessionContext }, token)) ?? {};
140
+ return (await this._proxy.$invokeAgent(handle, request, {
141
+ history,
142
+ chatSessionContext: chatSession?.contributedChatSession,
143
+ chatSummary: request.chatSummary
144
+ }, token)) ?? {};
134
145
  }
135
146
  finally {
136
147
  this._pendingProgress.delete(request.requestId);
@@ -193,9 +204,25 @@ let MainThreadChatAgents2 = class MainThreadChatAgents2 extends Disposable {
193
204
  this._chatAgentService.updateAgent(data.id, revive(metadataUpdate));
194
205
  }
195
206
  async $handleProgressChunk(requestId, chunks) {
207
+ const pendingProgress = this._pendingProgress.get(requestId);
208
+ if (!pendingProgress) {
209
+ this._logService.warn(`MainThreadChatAgents2#$handleProgressChunk: No pending progress for requestId ${requestId}`);
210
+ return;
211
+ }
212
+ const { progress, chatSession } = pendingProgress;
196
213
  const chatProgressParts = [];
197
- chunks.forEach(item => {
214
+ for (const item of chunks) {
198
215
  const [progress, responsePartHandle] = Array.isArray(item) ? item : [item];
216
+ if (progress.kind === 'externalEdits') {
217
+ const response = chatSession?.getRequests().at(-1)?.response;
218
+ if (chatSession?.editingSession && responsePartHandle !== undefined && response) {
219
+ const parts = progress.start
220
+ ? await chatSession.editingSession.startExternalEdits(response, responsePartHandle, revive(progress.resources))
221
+ : await chatSession.editingSession.stopExternalEdits(response, responsePartHandle);
222
+ chatProgressParts.push(...parts);
223
+ }
224
+ continue;
225
+ }
199
226
  const revivedProgress = progress.kind === 'notebookEdit'
200
227
  ? ChatNotebookEdit.fromChatEdit(progress)
201
228
  : revive(progress);
@@ -211,7 +238,6 @@ let MainThreadChatAgents2 = class MainThreadChatAgents2 extends Disposable {
211
238
  const task = ( new MainThreadChatTask(revivedProgress.content));
212
239
  this._activeTasks.set(responsePartId, task);
213
240
  chatProgressParts.push(task);
214
- return;
215
241
  }
216
242
  else if (responsePartHandle !== undefined) {
217
243
  const responsePartId = `${requestId}_${responsePartHandle}`;
@@ -225,13 +251,14 @@ let MainThreadChatAgents2 = class MainThreadChatAgents2 extends Disposable {
225
251
  else {
226
252
  task?.complete(undefined);
227
253
  }
228
- return;
254
+ break;
229
255
  case 'warning':
230
256
  case 'reference':
231
257
  task?.add(revivedProgress);
232
- return;
258
+ break;
233
259
  }
234
260
  }
261
+ continue;
235
262
  }
236
263
  if (revivedProgress.kind === 'inlineReference' && revivedProgress.resolveId) {
237
264
  if (!( this._unresolvedAnchors.has(requestId))) {
@@ -240,8 +267,8 @@ let MainThreadChatAgents2 = class MainThreadChatAgents2 extends Disposable {
240
267
  this._unresolvedAnchors.get(requestId)?.set(revivedProgress.resolveId, revivedProgress);
241
268
  }
242
269
  chatProgressParts.push(revivedProgress);
243
- });
244
- this._pendingProgress.get(requestId)?.(chatProgressParts);
270
+ }
271
+ progress(chatProgressParts);
245
272
  }
246
273
  $handleAnchorResolve(requestId, handle, resolveAnchor) {
247
274
  const anchor = this._unresolvedAnchors.get(requestId)?.get(handle);
@@ -274,7 +301,7 @@ let MainThreadChatAgents2 = class MainThreadChatAgents2 extends Disposable {
274
301
  if (query && !( triggerCharacters.some(c => query.startsWith(c)))) {
275
302
  return;
276
303
  }
277
- const parsedRequest = this._instantiationService.createInstance(ChatRequestParser).parseChatRequest(widget.viewModel.sessionId, model.getValue()).parts;
304
+ const parsedRequest = this._instantiationService.createInstance(ChatRequestParser).parseChatRequest(widget.viewModel.sessionResource, model.getValue()).parts;
278
305
  const agentPart = parsedRequest.find((part) => part instanceof ChatRequestAgentPart);
279
306
  const thisAgentId = this._agents.get(handle)?.id;
280
307
  if (agentPart?.agent.id !== thisAgentId) {
@@ -338,14 +365,15 @@ let MainThreadChatAgents2 = class MainThreadChatAgents2 extends Disposable {
338
365
  MainThreadChatAgents2 = __decorate([
339
366
  extHostNamedCustomer(MainContext.MainThreadChatAgents2),
340
367
  ( __param(1, IChatAgentService)),
341
- ( __param(2, IChatService)),
342
- ( __param(3, IChatEditingService)),
343
- ( __param(4, ILanguageFeaturesService)),
344
- ( __param(5, IChatWidgetService)),
345
- ( __param(6, IInstantiationService)),
346
- ( __param(7, ILogService)),
347
- ( __param(8, IExtensionService)),
348
- ( __param(9, IUriIdentityService))
368
+ ( __param(2, IChatSessionsService)),
369
+ ( __param(3, IChatService)),
370
+ ( __param(4, IChatEditingService)),
371
+ ( __param(5, ILanguageFeaturesService)),
372
+ ( __param(6, IChatWidgetService)),
373
+ ( __param(7, IInstantiationService)),
374
+ ( __param(8, ILogService)),
375
+ ( __param(9, IExtensionService)),
376
+ ( __param(10, IUriIdentityService))
349
377
  ], MainThreadChatAgents2);
350
378
  function computeCompletionRanges(model, position, reg) {
351
379
  const varWord = getWordAtText(position.column, reg, model.getLineContent(position.lineNumber), 0);
@@ -0,0 +1,16 @@
1
+ import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
2
+ import { ThemeIcon } from "@codingame/monaco-vscode-api/vscode/vs/base/common/themables";
3
+ import { IChatContextSupport } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/chat/common/chatContext";
4
+ import { IExtHostContext } from "../../services/extensions/common/extHostCustomers.js";
5
+ import { IDocumentFilterDto, MainThreadChatContextShape } from "@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol";
6
+ import { IChatContextService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatContextService.service";
7
+ export declare class MainThreadChatContext extends Disposable implements MainThreadChatContextShape {
8
+ private readonly _chatContextService;
9
+ private readonly _proxy;
10
+ private readonly _providers;
11
+ constructor(extHostContext: IExtHostContext, _chatContextService: IChatContextService);
12
+ $registerChatContextProvider(handle: number, id: string, selector: IDocumentFilterDto[], _options: {
13
+ icon: ThemeIcon;
14
+ }, support: IChatContextSupport): void;
15
+ $unregisterChatContextProvider(handle: number): void;
16
+ }
@@ -0,0 +1,43 @@
1
+
2
+ import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
3
+ import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
4
+ import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
5
+ import { ExtHostContext, MainContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol';
6
+ import { IChatContextService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatContextService.service';
7
+
8
+ let MainThreadChatContext = class MainThreadChatContext extends Disposable {
9
+ constructor(extHostContext, _chatContextService) {
10
+ super();
11
+ this._chatContextService = _chatContextService;
12
+ this._providers = ( new Map());
13
+ this._proxy = ( extHostContext.getProxy(ExtHostContext.ExtHostChatContext));
14
+ }
15
+ $registerChatContextProvider(handle, id, selector, _options, support) {
16
+ this._providers.set(handle, { selector, support, id });
17
+ this._chatContextService.registerChatContextProvider(id, selector, {
18
+ provideChatContext: (token) => {
19
+ return this._proxy.$provideChatContext(handle, token);
20
+ },
21
+ resolveChatContext: support.supportsResolve ? (context, token) => {
22
+ return this._proxy.$resolveChatContext(handle, context, token);
23
+ } : undefined,
24
+ provideChatContextForResource: support.supportsResource ? (resource, token) => {
25
+ return this._proxy.$provideChatContextForResource(handle, { resource }, token);
26
+ } : undefined
27
+ });
28
+ }
29
+ $unregisterChatContextProvider(handle) {
30
+ const provider = this._providers.get(handle);
31
+ if (!provider) {
32
+ return;
33
+ }
34
+ this._chatContextService.unregisterChatContextProvider(provider.id);
35
+ this._providers.delete(handle);
36
+ }
37
+ };
38
+ MainThreadChatContext = __decorate([
39
+ extHostNamedCustomer(MainContext.MainThreadChatContext),
40
+ ( __param(1, IChatContextService))
41
+ ], MainThreadChatContext);
42
+
43
+ export { MainThreadChatContext };
@@ -1,24 +1,24 @@
1
1
  import { CancellationToken } from "@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation";
2
2
  import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
3
3
  import { IObservable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/observable";
4
+ import { URI, UriComponents } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
4
5
  import { IDialogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service";
5
6
  import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
6
- import { IChatAgentRequest } from "@codingame/monaco-vscode-b994942c-360d-5b68-8a33-77d4bde6b714-common/vscode/vs/workbench/contrib/chat/common/chatAgents";
7
+ import { IChatAgentRequest } from "@codingame/monaco-vscode-aac7027b-326c-513a-95a9-e4eedd151b38-common/vscode/vs/workbench/contrib/chat/common/chatAgents";
7
8
  import { IChatContentInlineReference, IChatProgress } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService";
8
- import { ChatSession, IChatSessionHistoryItem } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService";
9
+ import { IChatSession, IChatSessionHistoryItem } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService";
9
10
  import { IChatSessionsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService.service";
10
- import { EditorGroupColumn } from "@codingame/monaco-vscode-a17e9d37-b6c1-5556-8402-5db73960fae3-common/vscode/vs/workbench/services/editor/common/editorGroupColumn";
11
11
  import { IEditorGroupsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorGroupsService.service";
12
12
  import { IEditorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service";
13
13
  import { IExtHostContext } from "../../services/extensions/common/extHostCustomers.js";
14
14
  import { Dto } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/proxyIdentifier";
15
- import { IViewsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/views/common/viewsService.service";
16
15
  import { ExtHostChatSessionsShape, IChatProgressDto, MainThreadChatSessionsShape } from "@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol";
17
- export declare class ObservableChatSession extends Disposable implements ChatSession {
18
- static generateSessionKey(providerHandle: number, sessionId: string): string;
19
- readonly sessionId: string;
16
+ export declare class ObservableChatSession extends Disposable implements IChatSession {
17
+ readonly sessionResource: URI;
20
18
  readonly providerHandle: number;
21
19
  readonly history: Array<IChatSessionHistoryItem>;
20
+ private _options?;
21
+ get options(): Record<string, string> | undefined;
22
22
  private readonly _progressObservable;
23
23
  private readonly _isCompleteObservable;
24
24
  private readonly _onWillDispose;
@@ -34,10 +34,9 @@ export declare class ObservableChatSession extends Disposable implements ChatSes
34
34
  private readonly _providerHandle;
35
35
  private readonly _logService;
36
36
  private readonly _dialogService;
37
- get sessionKey(): string;
38
37
  get progressObs(): IObservable<IChatProgress[]>;
39
38
  get isCompleteObs(): IObservable<boolean>;
40
- constructor(id: string, providerHandle: number, proxy: ExtHostChatSessionsShape, logService: ILogService, dialogService: IDialogService);
39
+ constructor(resource: URI, providerHandle: number, proxy: ExtHostChatSessionsShape, logService: ILogService, dialogService: IDialogService);
41
40
  initialize(token: CancellationToken): Promise<void>;
42
41
  private _doInitializeContent;
43
42
  /**
@@ -60,29 +59,36 @@ export declare class MainThreadChatSessions extends Disposable implements MainTh
60
59
  private readonly _editorService;
61
60
  private readonly editorGroupService;
62
61
  private readonly _logService;
63
- private readonly _viewsService;
64
62
  private readonly _itemProvidersRegistrations;
65
63
  private readonly _contentProvidersRegistrations;
64
+ private readonly _sessionTypeToHandle;
66
65
  private readonly _activeSessions;
67
66
  private readonly _sessionDisposables;
68
67
  private readonly _proxy;
69
- constructor(_extHostContext: IExtHostContext, _chatSessionsService: IChatSessionsService, _dialogService: IDialogService, _editorService: IEditorService, editorGroupService: IEditorGroupsService, _logService: ILogService, _viewsService: IViewsService);
68
+ constructor(_extHostContext: IExtHostContext, _chatSessionsService: IChatSessionsService, _dialogService: IDialogService, _editorService: IEditorService, editorGroupService: IEditorGroupsService, _logService: ILogService);
69
+ private _getHandleForSessionType;
70
70
  $registerChatSessionItemProvider(handle: number, chatSessionType: string): void;
71
71
  $onDidChangeChatSessionItems(handle: number): void;
72
- $onDidCommitChatSessionItem(handle: number, original: string, modified: string): void;
72
+ $onDidCommitChatSessionItem(handle: number, originalComponents: UriComponents, modifiedCompoennts: UriComponents): Promise<void>;
73
73
  private _provideChatSessionItems;
74
74
  private _provideNewChatSessionItem;
75
75
  private _provideChatSessionContent;
76
76
  $unregisterChatSessionItemProvider(handle: number): void;
77
- $registerChatSessionContentProvider(handle: number, chatSessionType: string): void;
77
+ $registerChatSessionContentProvider(handle: number, chatSessionScheme: string): void;
78
78
  $unregisterChatSessionContentProvider(handle: number): void;
79
- $handleProgressChunk(handle: number, sessionId: string, requestId: string, chunks: (IChatProgressDto | [
79
+ $handleProgressChunk(handle: number, sessionResource: UriComponents, requestId: string, chunks: (IChatProgressDto | [
80
80
  IChatProgressDto,
81
81
  number
82
82
  ])[]): Promise<void>;
83
- $handleProgressComplete(handle: number, sessionId: string, requestId: string): void;
84
- $handleAnchorResolve(handle: number, sessionId: string, requestId: string, requestHandle: string, anchor: Dto<IChatContentInlineReference>): void;
83
+ $handleProgressComplete(handle: number, sessionResource: UriComponents, requestId: string): void;
84
+ $handleAnchorResolve(handle: number, sesssionResource: UriComponents, requestId: string, requestHandle: string, anchor: Dto<IChatContentInlineReference>): void;
85
85
  dispose(): void;
86
86
  private _reviveTooltip;
87
- $showChatSession(chatSessionType: string, sessionId: string, position: EditorGroupColumn | undefined): Promise<void>;
87
+ /**
88
+ * Notify the extension about option changes for a session
89
+ */
90
+ notifyOptionsChange(handle: number, sessionResource: URI, updates: ReadonlyArray<{
91
+ optionId: string;
92
+ value: string | undefined;
93
+ }>): Promise<void>;
88
94
  }