@codingame/monaco-vscode-extensions-service-override 22.1.9 → 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.
- package/index.js +1 -0
- package/package.json +30 -29
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagementCLI.js +28 -28
- package/vscode/src/vs/workbench/api/browser/mainThreadAuthentication.d.ts +3 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadAuthentication.js +47 -41
- package/vscode/src/vs/workbench/api/browser/mainThreadBulkEdits.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadCLICommands.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents2.d.ts +3 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents2.js +52 -24
- package/vscode/src/vs/workbench/api/browser/mainThreadChatContext.d.ts +16 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatContext.js +43 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatSessions.d.ts +23 -17
- package/vscode/src/vs/workbench/api/browser/mainThreadChatSessions.js +133 -90
- package/vscode/src/vs/workbench/api/browser/mainThreadClipboard.d.ts +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadCodeInsets.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadCommands.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadComments.d.ts +6 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadComments.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadCustomEditors.js +8 -6
- package/vscode/src/vs/workbench/api/browser/mainThreadDebugService.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadDocuments.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadDocumentsAndEditors.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadEditSessionIdentityParticipant.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadEditorTabs.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadEditorTabs.js +7 -7
- package/vscode/src/vs/workbench/api/browser/mainThreadEditors.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadEditors.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadErrors.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadErrors.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadExtensionService.js +21 -14
- package/vscode/src/vs/workbench/api/browser/mainThreadFileSystemEventService.js +20 -20
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageFeatures.d.ts +7 -5
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageFeatures.js +17 -6
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModels.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModels.js +3 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadMcp.d.ts +5 -5
- package/vscode/src/vs/workbench/api/browser/mainThreadMcp.js +29 -21
- package/vscode/src/vs/workbench/api/browser/mainThreadMessageService.js +4 -4
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebook.js +4 -5
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDocumentsAndEditors.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookEditors.d.ts +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookEditors.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookKernels.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookKernels.js +13 -17
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookSaveParticipant.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadOutputService.js +3 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadProgress.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadQuickOpen.d.ts +24 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadQuickOpen.js +172 -55
- package/vscode/src/vs/workbench/api/browser/mainThreadSCM.d.ts +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadSCM.js +57 -6
- package/vscode/src/vs/workbench/api/browser/mainThreadSaveParticipant.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadSearch.d.ts +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadSearch.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadTask.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadTelemetry.d.ts +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadTerminalService.js +6 -6
- package/vscode/src/vs/workbench/api/browser/mainThreadTerminalShellIntegration.js +7 -7
- package/vscode/src/vs/workbench/api/browser/mainThreadTunnelService.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadUriOpeners.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviewPanels.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviewPanels.js +5 -5
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviews.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviews.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadWorkspace.js +5 -5
- package/vscode/src/vs/workbench/contrib/customEditor/common/customTextEditorModel.js +1 -1
- package/vscode/src/vs/workbench/contrib/externalUriOpener/common/contributedOpeners.js +3 -1
- package/vscode/src/vs/workbench/services/extensionManagement/browser/extensionBisect.js +23 -23
- package/vscode/src/vs/workbench/services/extensionManagement/browser/webExtensionsScannerService.js +2 -2
- package/vscode/src/vs/workbench/services/extensions/browser/extensionService.js +2 -2
- package/vscode/src/vs/workbench/services/extensions/browser/webWorkerExtensionHost.js +1 -1
- package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.js +12 -12
- package/vscode/src/vs/workbench/services/extensions/common/extensionHostManager.js +1 -1
- package/vscode/src/vs/workbench/services/extensions/common/extensionsProposedApi.js +1 -1
- package/vscode/src/vs/workbench/services/extensions/common/extensionsUtil.js +4 -4
- package/vscode/src/vs/workbench/services/extensions/common/lazyCreateExtensionHostManager.d.ts +1 -0
- package/vscode/src/vs/workbench/services/extensions/common/lazyCreateExtensionHostManager.js +6 -0
- 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-
|
|
23
|
-
import { ChatRequestParser } from '@codingame/monaco-vscode-
|
|
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-
|
|
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
|
-
|
|
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
|
-
|
|
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.
|
|
137
|
+
const chatSession = this._chatService.getSessionByLegacyId(request.sessionId);
|
|
138
|
+
this._pendingProgress.set(request.requestId, { progress, chatSession });
|
|
131
139
|
try {
|
|
132
|
-
|
|
133
|
-
|
|
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
|
-
|
|
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
|
-
|
|
254
|
+
break;
|
|
229
255
|
case 'warning':
|
|
230
256
|
case 'reference':
|
|
231
257
|
task?.add(revivedProgress);
|
|
232
|
-
|
|
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
|
-
|
|
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.
|
|
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,
|
|
342
|
-
( __param(3,
|
|
343
|
-
( __param(4,
|
|
344
|
-
( __param(5,
|
|
345
|
-
( __param(6,
|
|
346
|
-
( __param(7,
|
|
347
|
-
( __param(8,
|
|
348
|
-
( __param(9,
|
|
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-
|
|
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 {
|
|
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
|
|
18
|
-
|
|
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(
|
|
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
|
|
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,
|
|
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,
|
|
77
|
+
$registerChatSessionContentProvider(handle: number, chatSessionScheme: string): void;
|
|
78
78
|
$unregisterChatSessionContentProvider(handle: number): void;
|
|
79
|
-
$handleProgressChunk(handle: number,
|
|
79
|
+
$handleProgressChunk(handle: number, sessionResource: UriComponents, requestId: string, chunks: (IChatProgressDto | [
|
|
80
80
|
IChatProgressDto,
|
|
81
81
|
number
|
|
82
82
|
])[]): Promise<void>;
|
|
83
|
-
$handleProgressComplete(handle: number,
|
|
84
|
-
$handleAnchorResolve(handle: number,
|
|
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
|
-
|
|
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
|
}
|