@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.
- package/index.d.ts +7 -3
- package/index.js +12 -18
- package/package.json +3 -30
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagementCLI.js +28 -28
- package/vscode/src/vs/platform/extensionResourceLoader/common/extensionResourceLoader.js +1 -1
- package/vscode/src/vs/platform/remote/common/managedSocket.d.ts +2 -2
- package/vscode/src/vs/platform/remote/common/managedSocket.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadAuthentication.d.ts +3 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadAuthentication.js +43 -34
- 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 +8 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents2.js +50 -19
- package/vscode/src/vs/workbench/api/browser/mainThreadChatCodeMapper.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadChatContext.d.ts +3 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadChatContext.js +9 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadChatSessions.d.ts +16 -6
- package/vscode/src/vs/workbench/api/browser/mainThreadChatSessions.js +91 -23
- package/vscode/src/vs/workbench/api/browser/mainThreadChatStatus.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadChatStatus.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadComments.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadComments.js +5 -5
- package/vscode/src/vs/workbench/api/browser/mainThreadCustomEditors.js +7 -7
- package/vscode/src/vs/workbench/api/browser/mainThreadDocumentsAndEditors.d.ts +2 -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 +11 -11
- 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/mainThreadExtensionService.js +11 -11
- package/vscode/src/vs/workbench/api/browser/mainThreadFileSystemEventService.js +24 -20
- package/vscode/src/vs/workbench/api/browser/mainThreadLabelService.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageFeatures.d.ts +3 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageFeatures.js +196 -136
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModelTools.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModelTools.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModels.js +3 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadManagedSockets.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadMcp.d.ts +4 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadMcp.js +93 -14
- package/vscode/src/vs/workbench/api/browser/mainThreadMessageService.js +4 -4
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebook.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDocumentsAndEditors.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDto.d.ts +1 -1
- 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/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.js +6 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadSCM.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadSaveParticipant.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadSearch.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadSecretState.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadSecretState.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadShare.js +2 -6
- package/vscode/src/vs/workbench/api/browser/mainThreadStorage.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadTask.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadTerminalService.d.ts +4 -5
- package/vscode/src/vs/workbench/api/browser/mainThreadTerminalService.js +57 -43
- package/vscode/src/vs/workbench/api/browser/mainThreadTerminalShellIntegration.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadTesting.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadTunnelService.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadUriOpeners.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadUriOpeners.js +3 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviewPanels.d.ts +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviewPanels.js +3 -3
- 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 +2 -2
- package/vscode/src/vs/workbench/services/extensionManagement/browser/extensionBisect.js +23 -23
- package/vscode/src/vs/workbench/services/extensionManagement/browser/webExtensionsScannerService.d.ts +1 -1
- package/vscode/src/vs/workbench/services/extensionManagement/browser/webExtensionsScannerService.js +8 -7
- package/vscode/src/vs/workbench/services/extensions/browser/extensionService.d.ts +2 -2
- package/vscode/src/vs/workbench/services/extensions/browser/extensionService.js +5 -5
- package/vscode/src/vs/workbench/services/extensions/browser/webWorkerExtensionHost.d.ts +6 -6
- package/vscode/src/vs/workbench/services/extensions/browser/webWorkerExtensionHost.js +33 -19
- package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.d.ts +1 -1
- package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.js +13 -13
- package/vscode/src/vs/workbench/services/extensions/common/extHostCustomers.d.ts +1 -1
- package/vscode/src/vs/workbench/services/extensions/common/extensionHostManager.d.ts +1 -1
- package/vscode/src/vs/workbench/services/extensions/common/extensionHostManager.js +1 -1
- package/vscode/src/vs/workbench/services/extensions/common/extensionHostManagers.d.ts +1 -1
- package/vscode/src/vs/workbench/services/extensions/common/extensionRunningLocationTracker.d.ts +1 -1
- package/vscode/src/vs/workbench/services/extensions/common/extensionRunningLocationTracker.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 -1
- package/vscode/src/vs/workbench/services/extensions/common/remoteExtensionHost.d.ts +2 -2
- package/vscode/src/vs/workbench/services/extensions/common/remoteExtensionHost.js +1 -1
- package/vscode/src/vs/workbench/services/extensions/worker/webWorkerExtensionHostIframe.html +2 -2
|
@@ -15,7 +15,7 @@ import { ITelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/platfo
|
|
|
15
15
|
import { Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
16
16
|
import { IAuthenticationAccessService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/authentication/browser/authenticationAccessService.service';
|
|
17
17
|
import { IAuthenticationUsageService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/authentication/browser/authenticationUsageService.service';
|
|
18
|
-
import { getAuthenticationProviderActivationEvent } from '@codingame/monaco-vscode-
|
|
18
|
+
import { getAuthenticationProviderActivationEvent } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/authentication/browser/authenticationService';
|
|
19
19
|
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
20
20
|
import { IOpenerService } from '@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service';
|
|
21
21
|
import { CancellationError } from '@codingame/monaco-vscode-api/vscode/vs/base/common/errors';
|
|
@@ -29,13 +29,14 @@ import { IQuickInputService } from '@codingame/monaco-vscode-api/vscode/vs/platf
|
|
|
29
29
|
import { IProductService } from '@codingame/monaco-vscode-api/vscode/vs/platform/product/common/productService.service';
|
|
30
30
|
|
|
31
31
|
class MainThreadAuthenticationProvider extends Disposable {
|
|
32
|
-
constructor(_proxy, id, label, supportsMultipleAccounts, authorizationServers, onDidChangeSessionsEmitter) {
|
|
32
|
+
constructor(_proxy, id, label, supportsMultipleAccounts, authorizationServers, resourceServer, onDidChangeSessionsEmitter) {
|
|
33
33
|
super();
|
|
34
34
|
this._proxy = _proxy;
|
|
35
35
|
this.id = id;
|
|
36
36
|
this.label = label;
|
|
37
37
|
this.supportsMultipleAccounts = supportsMultipleAccounts;
|
|
38
38
|
this.authorizationServers = authorizationServers;
|
|
39
|
+
this.resourceServer = resourceServer;
|
|
39
40
|
this.onDidChangeSessions = onDidChangeSessionsEmitter.event;
|
|
40
41
|
}
|
|
41
42
|
async getSessions(scopes, options) {
|
|
@@ -49,8 +50,8 @@ class MainThreadAuthenticationProvider extends Disposable {
|
|
|
49
50
|
}
|
|
50
51
|
}
|
|
51
52
|
class MainThreadAuthenticationProviderWithChallenges extends MainThreadAuthenticationProvider {
|
|
52
|
-
constructor(proxy, id, label, supportsMultipleAccounts, authorizationServers, onDidChangeSessionsEmitter) {
|
|
53
|
-
super(proxy, id, label, supportsMultipleAccounts, authorizationServers, onDidChangeSessionsEmitter);
|
|
53
|
+
constructor(proxy, id, label, supportsMultipleAccounts, authorizationServers, resourceServer, onDidChangeSessionsEmitter) {
|
|
54
|
+
super(proxy, id, label, supportsMultipleAccounts, authorizationServers, resourceServer, onDidChangeSessionsEmitter);
|
|
54
55
|
}
|
|
55
56
|
getSessionsFromChallenges(constraint, options) {
|
|
56
57
|
return this._proxy.$getSessionsFromChallenges(this.id, constraint, options);
|
|
@@ -113,14 +114,14 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
|
|
|
113
114
|
}
|
|
114
115
|
}));
|
|
115
116
|
}
|
|
116
|
-
async $registerAuthenticationProvider(id, label, supportsMultipleAccounts,
|
|
117
|
+
async $registerAuthenticationProvider({ id, label, supportsMultipleAccounts, resourceServer, supportedAuthorizationServers, supportsChallenges }) {
|
|
117
118
|
if (!this.authenticationService.declaredProviders.find(p => p.id === id)) {
|
|
118
119
|
this.logService.warn(`Authentication provider ${id} was not declared in the Extension Manifest.`);
|
|
119
120
|
this.telemetryService.publicLog2('authentication.providerNotDeclared', { id });
|
|
120
121
|
}
|
|
121
122
|
const emitter = ( new Emitter());
|
|
122
123
|
this._registrations.set(id, emitter);
|
|
123
|
-
const supportedAuthorizationServerUris = (
|
|
124
|
+
const supportedAuthorizationServerUris = ( (supportedAuthorizationServers ?? []).map(i => URI.revive(i)));
|
|
124
125
|
const provider = supportsChallenges
|
|
125
126
|
? ( new MainThreadAuthenticationProviderWithChallenges(
|
|
126
127
|
this._proxy,
|
|
@@ -128,6 +129,7 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
|
|
|
128
129
|
label,
|
|
129
130
|
supportsMultipleAccounts,
|
|
130
131
|
supportedAuthorizationServerUris,
|
|
132
|
+
resourceServer ? URI.revive(resourceServer) : undefined,
|
|
131
133
|
emitter
|
|
132
134
|
))
|
|
133
135
|
: ( new MainThreadAuthenticationProvider(
|
|
@@ -136,6 +138,7 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
|
|
|
136
138
|
label,
|
|
137
139
|
supportsMultipleAccounts,
|
|
138
140
|
supportedAuthorizationServerUris,
|
|
141
|
+
resourceServer ? URI.revive(resourceServer) : undefined,
|
|
139
142
|
emitter
|
|
140
143
|
));
|
|
141
144
|
this.authenticationService.registerAuthenticationProvider(id, provider);
|
|
@@ -183,8 +186,8 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
|
|
|
183
186
|
return await deferredPromise.p;
|
|
184
187
|
}
|
|
185
188
|
$showContinueNotification(message) {
|
|
186
|
-
const yes = ( localize(
|
|
187
|
-
const no = ( localize(
|
|
189
|
+
const yes = ( localize(2453, "Yes"));
|
|
190
|
+
const no = ( localize(2454, "No"));
|
|
188
191
|
const deferredPromise = ( new DeferredPromise());
|
|
189
192
|
let result = false;
|
|
190
193
|
const handle = this.notificationService.prompt(Severity.Warning, message, [{
|
|
@@ -200,9 +203,15 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
|
|
|
200
203
|
});
|
|
201
204
|
return deferredPromise.p;
|
|
202
205
|
}
|
|
203
|
-
async $registerDynamicAuthenticationProvider(
|
|
204
|
-
await this.$registerAuthenticationProvider(
|
|
205
|
-
|
|
206
|
+
async $registerDynamicAuthenticationProvider(details) {
|
|
207
|
+
await this.$registerAuthenticationProvider({
|
|
208
|
+
id: details.id,
|
|
209
|
+
label: details.label,
|
|
210
|
+
supportsMultipleAccounts: true,
|
|
211
|
+
supportedAuthorizationServers: [details.authorizationServer],
|
|
212
|
+
resourceServer: details.resourceServer,
|
|
213
|
+
});
|
|
214
|
+
await this.dynamicAuthProviderStorageService.storeClientRegistration(details.id, ( URI.revive(details.authorizationServer).toString(true)), details.clientId, details.clientSecret, details.label);
|
|
206
215
|
}
|
|
207
216
|
async $setSessionsForDynamicAuthProvider(authProviderId, clientId, sessions) {
|
|
208
217
|
await this.dynamicAuthProviderStorageService.setSessionsForDynamicAuthProvider(authProviderId, clientId, sessions);
|
|
@@ -226,13 +235,13 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
|
|
|
226
235
|
else {
|
|
227
236
|
message = recreatingSession
|
|
228
237
|
? ( localize(
|
|
229
|
-
|
|
238
|
+
2455,
|
|
230
239
|
"The extension '{0}' wants you to sign in again using {1}.",
|
|
231
240
|
extensionName,
|
|
232
241
|
provider.label
|
|
233
242
|
))
|
|
234
243
|
: ( localize(
|
|
235
|
-
|
|
244
|
+
2456,
|
|
236
245
|
"The extension '{0}' wants to sign in using {1}.",
|
|
237
246
|
extensionName,
|
|
238
247
|
provider.label
|
|
@@ -240,7 +249,7 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
|
|
|
240
249
|
}
|
|
241
250
|
const buttons = [
|
|
242
251
|
{
|
|
243
|
-
label: ( localize(
|
|
252
|
+
label: ( localize(2457, "&&Allow")),
|
|
244
253
|
run() {
|
|
245
254
|
return true;
|
|
246
255
|
},
|
|
@@ -248,7 +257,7 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
|
|
|
248
257
|
];
|
|
249
258
|
if (options?.learnMore) {
|
|
250
259
|
buttons.push({
|
|
251
|
-
label: ( localize(
|
|
260
|
+
label: ( localize(2458, "Learn more")),
|
|
252
261
|
run: async () => {
|
|
253
262
|
const result = this.loginPrompt(provider, extensionName, recreatingSession, options);
|
|
254
263
|
await this.openerService.open(URI.revive(options.learnMore), { allowCommands: true });
|
|
@@ -267,9 +276,9 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
|
|
|
267
276
|
}
|
|
268
277
|
async continueWithIncorrectAccountPrompt(chosenAccountLabel, requestedAccountLabel) {
|
|
269
278
|
const result = await this.dialogService.prompt({
|
|
270
|
-
message: ( localize(
|
|
279
|
+
message: ( localize(2459, "Incorrect account detected")),
|
|
271
280
|
detail: ( localize(
|
|
272
|
-
|
|
281
|
+
2460,
|
|
273
282
|
"The chosen account, {0}, does not match the requested account, {1}.",
|
|
274
283
|
chosenAccountLabel,
|
|
275
284
|
requestedAccountLabel
|
|
@@ -278,11 +287,11 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
|
|
|
278
287
|
cancelButton: true,
|
|
279
288
|
buttons: [
|
|
280
289
|
{
|
|
281
|
-
label: ( localize(
|
|
290
|
+
label: ( localize(2461, 'Keep {0}', chosenAccountLabel)),
|
|
282
291
|
run: () => chosenAccountLabel
|
|
283
292
|
},
|
|
284
293
|
{
|
|
285
|
-
label: ( localize(
|
|
294
|
+
label: ( localize(2462, 'Login with {0}', requestedAccountLabel)),
|
|
286
295
|
run: () => requestedAccountLabel
|
|
287
296
|
}
|
|
288
297
|
],
|
|
@@ -424,16 +433,16 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
|
|
|
424
433
|
async $showDeviceCodeModal(userCode, verificationUri) {
|
|
425
434
|
const { result } = await this.dialogService.prompt({
|
|
426
435
|
type: Severity.Info,
|
|
427
|
-
message: ( localize(
|
|
436
|
+
message: ( localize(2463, "Device Code Authentication")),
|
|
428
437
|
detail: ( localize(
|
|
429
|
-
|
|
438
|
+
2464,
|
|
430
439
|
"Your code: {0}\n\nTo complete authentication, navigate to {1} and enter the code above.",
|
|
431
440
|
userCode,
|
|
432
441
|
verificationUri
|
|
433
442
|
)),
|
|
434
443
|
buttons: [
|
|
435
444
|
{
|
|
436
|
-
label: ( localize(
|
|
445
|
+
label: ( localize(2465, "Copy & Continue")),
|
|
437
446
|
run: () => true
|
|
438
447
|
}
|
|
439
448
|
],
|
|
@@ -445,7 +454,7 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
|
|
|
445
454
|
return await this.openerService.open(( URI.parse(verificationUri)));
|
|
446
455
|
}
|
|
447
456
|
catch (error) {
|
|
448
|
-
this.notificationService.error(( localize(
|
|
457
|
+
this.notificationService.error(( localize(2466, "Failed to open {0}", verificationUri)));
|
|
449
458
|
}
|
|
450
459
|
}
|
|
451
460
|
return false;
|
|
@@ -454,47 +463,47 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
|
|
|
454
463
|
const redirectUrls = 'http://127.0.0.1:33418\nhttps://vscode.dev/redirect';
|
|
455
464
|
const result = await this.dialogService.prompt({
|
|
456
465
|
type: Severity.Info,
|
|
457
|
-
message: ( localize(
|
|
466
|
+
message: ( localize(2467, "Dynamic Client Registration not supported")),
|
|
458
467
|
detail: ( localize(
|
|
459
|
-
|
|
468
|
+
2468,
|
|
460
469
|
"The authorization server '{0}' does not support automatic client registration. Do you want to proceed by manually providing a client registration (client ID)?\n\nNote: When registering your OAuth application, make sure to include these redirect URIs:\n{1}",
|
|
461
470
|
authorizationServerUrl,
|
|
462
471
|
redirectUrls
|
|
463
472
|
)),
|
|
464
473
|
buttons: [
|
|
465
474
|
{
|
|
466
|
-
label: ( localize(
|
|
475
|
+
label: ( localize(2469, "Copy URIs & Proceed")),
|
|
467
476
|
run: async () => {
|
|
468
477
|
try {
|
|
469
478
|
await this.clipboardService.writeText(redirectUrls);
|
|
470
479
|
}
|
|
471
480
|
catch (error) {
|
|
472
|
-
this.notificationService.error(( localize(
|
|
481
|
+
this.notificationService.error(( localize(2470, "Failed to copy redirect URIs to clipboard.")));
|
|
473
482
|
}
|
|
474
483
|
return true;
|
|
475
484
|
}
|
|
476
485
|
},
|
|
477
486
|
],
|
|
478
487
|
cancelButton: {
|
|
479
|
-
label: ( localize(
|
|
488
|
+
label: ( localize(2471, "Cancel")),
|
|
480
489
|
run: () => false
|
|
481
490
|
}
|
|
482
491
|
});
|
|
483
492
|
if (!result) {
|
|
484
493
|
return undefined;
|
|
485
494
|
}
|
|
486
|
-
const sharedTitle = ( localize(
|
|
495
|
+
const sharedTitle = ( localize(2472, "Add Client Registration Details"));
|
|
487
496
|
const clientId = await this.quickInputService.input({
|
|
488
497
|
title: sharedTitle,
|
|
489
498
|
prompt: ( localize(
|
|
490
|
-
|
|
499
|
+
2473,
|
|
491
500
|
"Enter an existing client ID that has been registered with the following redirect URIs: http://127.0.0.1:33418, https://vscode.dev/redirect"
|
|
492
501
|
)),
|
|
493
|
-
placeHolder: ( localize(
|
|
502
|
+
placeHolder: ( localize(2474, "OAuth client ID (azye39d...)")),
|
|
494
503
|
ignoreFocusLost: true,
|
|
495
504
|
validateInput: async (value) => {
|
|
496
505
|
if (!value || value.trim().length === 0) {
|
|
497
|
-
return localize(
|
|
506
|
+
return localize(2475, "Client ID is required");
|
|
498
507
|
}
|
|
499
508
|
return undefined;
|
|
500
509
|
}
|
|
@@ -505,11 +514,11 @@ let MainThreadAuthentication = class MainThreadAuthentication extends Disposable
|
|
|
505
514
|
const clientSecret = await this.quickInputService.input({
|
|
506
515
|
title: sharedTitle,
|
|
507
516
|
prompt: ( localize(
|
|
508
|
-
|
|
517
|
+
2476,
|
|
509
518
|
"(optional) Enter an existing client secret associated with the client id '{0}' or leave this field blank",
|
|
510
519
|
clientId
|
|
511
520
|
)),
|
|
512
|
-
placeHolder: ( localize(
|
|
521
|
+
placeHolder: ( localize(2477, "OAuth client secret (wer32o50f...) or leave it blank")),
|
|
513
522
|
password: true,
|
|
514
523
|
ignoreFocusLost: true
|
|
515
524
|
});
|
|
@@ -7,7 +7,7 @@ import { IBulkEditService } from '@codingame/monaco-vscode-api/vscode/vs/editor/
|
|
|
7
7
|
import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
|
|
8
8
|
import { IUriIdentityService } from '@codingame/monaco-vscode-api/vscode/vs/platform/uriIdentity/common/uriIdentity.service';
|
|
9
9
|
import { MainContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol';
|
|
10
|
-
import { ResourceNotebookCellEdit } from '@codingame/monaco-vscode-
|
|
10
|
+
import { ResourceNotebookCellEdit } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/bulkEdit/browser/bulkCellEdits';
|
|
11
11
|
import { CellEditType } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
|
|
12
12
|
import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
|
|
13
13
|
|
|
@@ -92,7 +92,7 @@ let RemoteExtensionManagementCLI = class RemoteExtensionManagementCLI extends Ex
|
|
|
92
92
|
if (!this._extensionManifestPropertiesService.canExecuteOnWorkspace(manifest)
|
|
93
93
|
&& !(isWeb && this._extensionManifestPropertiesService.canExecuteOnWeb(manifest))) {
|
|
94
94
|
this.logger.info(( localize(
|
|
95
|
-
|
|
95
|
+
2478,
|
|
96
96
|
"Cannot install the '{0}' extension because it is declared to not run in this setup.",
|
|
97
97
|
getExtensionId(manifest.publisher, manifest.name)
|
|
98
98
|
)));
|
|
@@ -10,6 +10,7 @@ import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log
|
|
|
10
10
|
import { IUriIdentityService } from "@codingame/monaco-vscode-api/vscode/vs/platform/uriIdentity/common/uriIdentity.service";
|
|
11
11
|
import { IChatWidgetService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service";
|
|
12
12
|
import { IChatAgentService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatAgents.service";
|
|
13
|
+
import { IPromptsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService.service";
|
|
13
14
|
import { IChatRelatedFileProviderMetadata } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatEditingService";
|
|
14
15
|
import { IChatEditingService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatEditingService.service";
|
|
15
16
|
import { IChatContentInlineReference, IChatContentReference, IChatTask, IChatTaskSerialized, IChatWarningMessage } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService";
|
|
@@ -44,16 +45,19 @@ export declare class MainThreadChatAgents2 extends Disposable implements MainThr
|
|
|
44
45
|
private readonly _logService;
|
|
45
46
|
private readonly _extensionService;
|
|
46
47
|
private readonly _uriIdentityService;
|
|
48
|
+
private readonly _promptsService;
|
|
47
49
|
private readonly _agents;
|
|
48
50
|
private readonly _agentCompletionProviders;
|
|
49
51
|
private readonly _agentIdsToCompletionProviders;
|
|
50
52
|
private readonly _chatParticipantDetectionProviders;
|
|
51
53
|
private readonly _chatRelatedFilesProviders;
|
|
54
|
+
private readonly _customAgentsProviders;
|
|
55
|
+
private readonly _customAgentsProviderEmitters;
|
|
52
56
|
private readonly _pendingProgress;
|
|
53
57
|
private readonly _proxy;
|
|
54
58
|
private readonly _activeTasks;
|
|
55
59
|
private readonly _unresolvedAnchors;
|
|
56
|
-
constructor(extHostContext: IExtHostContext, _chatAgentService: IChatAgentService, _chatSessionService: IChatSessionsService, _chatService: IChatService, _chatEditingService: IChatEditingService, _languageFeaturesService: ILanguageFeaturesService, _chatWidgetService: IChatWidgetService, _instantiationService: IInstantiationService, _logService: ILogService, _extensionService: IExtensionService, _uriIdentityService: IUriIdentityService);
|
|
60
|
+
constructor(extHostContext: IExtHostContext, _chatAgentService: IChatAgentService, _chatSessionService: IChatSessionsService, _chatService: IChatService, _chatEditingService: IChatEditingService, _languageFeaturesService: ILanguageFeaturesService, _chatWidgetService: IChatWidgetService, _instantiationService: IInstantiationService, _logService: ILogService, _extensionService: IExtensionService, _uriIdentityService: IUriIdentityService, _promptsService: IPromptsService);
|
|
57
61
|
$unregisterAgent(handle: number): void;
|
|
58
62
|
$transferActiveChatSession(toWorkspace: UriComponents): void;
|
|
59
63
|
$registerAgent(handle: number, extension: ExtensionIdentifier, id: string, metadata: IExtensionChatAgentMetadata, dynamicProps: IDynamicChatAgentProps | undefined): Promise<void>;
|
|
@@ -69,4 +73,7 @@ export declare class MainThreadChatAgents2 extends Disposable implements MainThr
|
|
|
69
73
|
$unregisterChatParticipantDetectionProvider(handle: number): void;
|
|
70
74
|
$registerRelatedFilesProvider(handle: number, metadata: IChatRelatedFileProviderMetadata): void;
|
|
71
75
|
$unregisterRelatedFilesProvider(handle: number): void;
|
|
76
|
+
$registerCustomAgentsProvider(handle: number, extensionId: ExtensionIdentifier): Promise<void>;
|
|
77
|
+
$unregisterCustomAgentsProvider(handle: number): void;
|
|
78
|
+
$onDidChangeCustomAgents(handle: number): void;
|
|
72
79
|
}
|
|
@@ -18,18 +18,18 @@ import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log
|
|
|
18
18
|
import { IUriIdentityService } from '@codingame/monaco-vscode-api/vscode/vs/platform/uriIdentity/common/uriIdentity.service';
|
|
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
|
+
import { IPromptsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/promptSyntax/service/promptsService.service';
|
|
21
22
|
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-
|
|
23
|
+
import { ChatRequestAgentPart } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatParserTypes';
|
|
24
|
+
import { ChatRequestParser } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatRequestParser';
|
|
24
25
|
import { IChatService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService.service';
|
|
25
26
|
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';
|
|
27
27
|
import { ChatModeKind, ChatAgentLocation } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/constants';
|
|
28
28
|
import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
|
|
29
29
|
import { IExtensionService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions.service';
|
|
30
30
|
import { ExtHostContext, MainContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol';
|
|
31
31
|
import { NotebookDto } from './mainThreadNotebookDto.js';
|
|
32
|
-
import { addDynamicVariableActionId } from '@codingame/monaco-vscode-
|
|
32
|
+
import { addDynamicVariableActionId } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/contrib/chatDynamicVariablesConstant';
|
|
33
33
|
|
|
34
34
|
class MainThreadChatTask {
|
|
35
35
|
get onDidAddProgress() { return this._onDidAddProgress.event; }
|
|
@@ -62,7 +62,7 @@ class MainThreadChatTask {
|
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
let MainThreadChatAgents2 = class MainThreadChatAgents2 extends Disposable {
|
|
65
|
-
constructor(extHostContext, _chatAgentService, _chatSessionService, _chatService, _chatEditingService, _languageFeaturesService, _chatWidgetService, _instantiationService, _logService, _extensionService, _uriIdentityService) {
|
|
65
|
+
constructor(extHostContext, _chatAgentService, _chatSessionService, _chatService, _chatEditingService, _languageFeaturesService, _chatWidgetService, _instantiationService, _logService, _extensionService, _uriIdentityService, _promptsService) {
|
|
66
66
|
super();
|
|
67
67
|
this._chatAgentService = _chatAgentService;
|
|
68
68
|
this._chatSessionService = _chatSessionService;
|
|
@@ -74,20 +74,20 @@ let MainThreadChatAgents2 = class MainThreadChatAgents2 extends Disposable {
|
|
|
74
74
|
this._logService = _logService;
|
|
75
75
|
this._extensionService = _extensionService;
|
|
76
76
|
this._uriIdentityService = _uriIdentityService;
|
|
77
|
+
this._promptsService = _promptsService;
|
|
77
78
|
this._agents = this._register(( new DisposableMap()));
|
|
78
79
|
this._agentCompletionProviders = this._register(( new DisposableMap()));
|
|
79
80
|
this._agentIdsToCompletionProviders = this._register(( new DisposableMap()));
|
|
80
81
|
this._chatParticipantDetectionProviders = this._register(( new DisposableMap()));
|
|
81
82
|
this._chatRelatedFilesProviders = this._register(( new DisposableMap()));
|
|
83
|
+
this._customAgentsProviders = this._register(( new DisposableMap()));
|
|
84
|
+
this._customAgentsProviderEmitters = this._register(( new DisposableMap()));
|
|
82
85
|
this._pendingProgress = ( new Map());
|
|
83
86
|
this._activeTasks = ( new Map());
|
|
84
87
|
this._unresolvedAnchors = ( new Map());
|
|
85
88
|
this._proxy = ( extHostContext.getProxy(ExtHostContext.ExtHostChatAgents2));
|
|
86
89
|
this._register(this._chatService.onDidDisposeSession(e => {
|
|
87
|
-
|
|
88
|
-
if (localSessionId) {
|
|
89
|
-
this._proxy.$releaseSession(localSessionId);
|
|
90
|
-
}
|
|
90
|
+
this._proxy.$releaseSession(e.sessionResource);
|
|
91
91
|
}));
|
|
92
92
|
this._register(this._chatService.onDidPerformUserAction(e => {
|
|
93
93
|
if (typeof e.agentId === 'string') {
|
|
@@ -110,15 +110,13 @@ let MainThreadChatAgents2 = class MainThreadChatAgents2 extends Disposable {
|
|
|
110
110
|
}
|
|
111
111
|
$transferActiveChatSession(toWorkspace) {
|
|
112
112
|
const widget = this._chatWidgetService.lastFocusedWidget;
|
|
113
|
-
const
|
|
114
|
-
if (!
|
|
113
|
+
const model = widget?.viewModel?.model;
|
|
114
|
+
if (!model) {
|
|
115
115
|
this._logService.error(`MainThreadChat#$transferActiveChatSession: No active chat session found`);
|
|
116
116
|
return;
|
|
117
117
|
}
|
|
118
|
-
const inputValue = widget?.inputEditor.getValue() ?? '';
|
|
119
118
|
const location = widget.location;
|
|
120
|
-
|
|
121
|
-
this._chatService.transferChatSession({ sessionId, inputValue, location, mode }, URI.revive(toWorkspace));
|
|
119
|
+
this._chatService.transferChatSession({ sessionId: model.sessionId, inputState: model.inputModel.state.get(), location }, URI.revive(toWorkspace));
|
|
122
120
|
}
|
|
123
121
|
async $registerAgent(handle, extension, id, metadata, dynamicProps) {
|
|
124
122
|
await this._extensionService.whenInstalledExtensionsRegistered();
|
|
@@ -134,13 +132,12 @@ let MainThreadChatAgents2 = class MainThreadChatAgents2 extends Disposable {
|
|
|
134
132
|
}
|
|
135
133
|
const impl = {
|
|
136
134
|
invoke: async (request, progress, history, token) => {
|
|
137
|
-
const chatSession = this._chatService.
|
|
135
|
+
const chatSession = this._chatService.getSession(request.sessionResource);
|
|
138
136
|
this._pendingProgress.set(request.requestId, { progress, chatSession });
|
|
139
137
|
try {
|
|
140
138
|
return (await this._proxy.$invokeAgent(handle, request, {
|
|
141
139
|
history,
|
|
142
|
-
chatSessionContext: chatSession?.contributedChatSession
|
|
143
|
-
chatSummary: request.chatSummary
|
|
140
|
+
chatSessionContext: chatSession?.contributedChatSession
|
|
144
141
|
}, token)) ?? {};
|
|
145
142
|
}
|
|
146
143
|
finally {
|
|
@@ -217,7 +214,7 @@ let MainThreadChatAgents2 = class MainThreadChatAgents2 extends Disposable {
|
|
|
217
214
|
const response = chatSession?.getRequests().at(-1)?.response;
|
|
218
215
|
if (chatSession?.editingSession && responsePartHandle !== undefined && response) {
|
|
219
216
|
const parts = progress.start
|
|
220
|
-
? await chatSession.editingSession.startExternalEdits(response, responsePartHandle, revive(progress.resources))
|
|
217
|
+
? await chatSession.editingSession.startExternalEdits(response, responsePartHandle, revive(progress.resources), progress.undoStopId)
|
|
221
218
|
: await chatSession.editingSession.stopExternalEdits(response, responsePartHandle);
|
|
222
219
|
chatProgressParts.push(...parts);
|
|
223
220
|
}
|
|
@@ -361,6 +358,39 @@ let MainThreadChatAgents2 = class MainThreadChatAgents2 extends Disposable {
|
|
|
361
358
|
$unregisterRelatedFilesProvider(handle) {
|
|
362
359
|
this._chatRelatedFilesProviders.deleteAndDispose(handle);
|
|
363
360
|
}
|
|
361
|
+
async $registerCustomAgentsProvider(handle, extensionId) {
|
|
362
|
+
const extension = await this._extensionService.getExtension(extensionId.value);
|
|
363
|
+
if (!extension) {
|
|
364
|
+
this._logService.error(`[MainThreadChatAgents2] Could not find extension for CustomAgentsProvider: ${extensionId.value}`);
|
|
365
|
+
return;
|
|
366
|
+
}
|
|
367
|
+
const emitter = ( new Emitter());
|
|
368
|
+
this._customAgentsProviderEmitters.set(handle, emitter);
|
|
369
|
+
const disposable = this._promptsService.registerCustomAgentsProvider(extension, {
|
|
370
|
+
onDidChangeCustomAgents: emitter.event,
|
|
371
|
+
provideCustomAgents: async (options, token) => {
|
|
372
|
+
const agents = await this._proxy.$provideCustomAgents(handle, options, token);
|
|
373
|
+
if (!agents) {
|
|
374
|
+
return undefined;
|
|
375
|
+
}
|
|
376
|
+
return ( agents.map(agent => ({
|
|
377
|
+
...agent,
|
|
378
|
+
uri: URI.revive(agent.uri)
|
|
379
|
+
})));
|
|
380
|
+
}
|
|
381
|
+
});
|
|
382
|
+
this._customAgentsProviders.set(handle, disposable);
|
|
383
|
+
}
|
|
384
|
+
$unregisterCustomAgentsProvider(handle) {
|
|
385
|
+
this._customAgentsProviders.deleteAndDispose(handle);
|
|
386
|
+
this._customAgentsProviderEmitters.deleteAndDispose(handle);
|
|
387
|
+
}
|
|
388
|
+
$onDidChangeCustomAgents(handle) {
|
|
389
|
+
const emitter = this._customAgentsProviderEmitters.get(handle);
|
|
390
|
+
if (emitter) {
|
|
391
|
+
emitter.fire();
|
|
392
|
+
}
|
|
393
|
+
}
|
|
364
394
|
};
|
|
365
395
|
MainThreadChatAgents2 = __decorate([
|
|
366
396
|
extHostNamedCustomer(MainContext.MainThreadChatAgents2),
|
|
@@ -373,7 +403,8 @@ MainThreadChatAgents2 = __decorate([
|
|
|
373
403
|
( __param(7, IInstantiationService)),
|
|
374
404
|
( __param(8, ILogService)),
|
|
375
405
|
( __param(9, IExtensionService)),
|
|
376
|
-
( __param(10, IUriIdentityService))
|
|
406
|
+
( __param(10, IUriIdentityService)),
|
|
407
|
+
( __param(11, IPromptsService))
|
|
377
408
|
], MainThreadChatAgents2);
|
|
378
409
|
function computeCompletionRanges(model, position, reg) {
|
|
379
410
|
const varWord = getWordAtText(position.column, reg, model.getLineContent(position.lineNumber), 0);
|
|
@@ -30,7 +30,7 @@ let MainThreadChatCodemapper = class MainThreadChatCodemapper extends Disposable
|
|
|
30
30
|
codeBlocks: uiRequest.codeBlocks,
|
|
31
31
|
chatRequestId: uiRequest.chatRequestId,
|
|
32
32
|
chatRequestModel: uiRequest.chatRequestModel,
|
|
33
|
-
|
|
33
|
+
chatSessionResource: uiRequest.chatSessionResource,
|
|
34
34
|
location: uiRequest.location
|
|
35
35
|
};
|
|
36
36
|
try {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
2
|
import { ThemeIcon } from "@codingame/monaco-vscode-api/vscode/vs/base/common/themables";
|
|
3
|
-
import { IChatContextSupport } from "@codingame/monaco-vscode-api/vscode/vs/workbench/
|
|
3
|
+
import { IChatContextItem, IChatContextSupport } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatContext";
|
|
4
4
|
import { IExtHostContext } from "../../services/extensions/common/extHostCustomers.js";
|
|
5
5
|
import { IDocumentFilterDto, MainThreadChatContextShape } from "@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol";
|
|
6
6
|
import { IChatContextService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chatContextService.service";
|
|
@@ -9,8 +9,9 @@ export declare class MainThreadChatContext extends Disposable implements MainThr
|
|
|
9
9
|
private readonly _proxy;
|
|
10
10
|
private readonly _providers;
|
|
11
11
|
constructor(extHostContext: IExtHostContext, _chatContextService: IChatContextService);
|
|
12
|
-
$registerChatContextProvider(handle: number, id: string, selector: IDocumentFilterDto[], _options: {
|
|
12
|
+
$registerChatContextProvider(handle: number, id: string, selector: IDocumentFilterDto[] | undefined, _options: {
|
|
13
13
|
icon: ThemeIcon;
|
|
14
14
|
}, support: IChatContextSupport): void;
|
|
15
15
|
$unregisterChatContextProvider(handle: number): void;
|
|
16
|
+
$updateWorkspaceContextItems(handle: number, items: IChatContextItem[]): void;
|
|
16
17
|
}
|
|
@@ -21,8 +21,8 @@ let MainThreadChatContext = class MainThreadChatContext extends Disposable {
|
|
|
21
21
|
resolveChatContext: support.supportsResolve ? (context, token) => {
|
|
22
22
|
return this._proxy.$resolveChatContext(handle, context, token);
|
|
23
23
|
} : undefined,
|
|
24
|
-
provideChatContextForResource: support.supportsResource ? (resource, token) => {
|
|
25
|
-
return this._proxy.$provideChatContextForResource(handle, { resource }, token);
|
|
24
|
+
provideChatContextForResource: support.supportsResource ? (resource, withValue, token) => {
|
|
25
|
+
return this._proxy.$provideChatContextForResource(handle, { resource, withValue }, token);
|
|
26
26
|
} : undefined
|
|
27
27
|
});
|
|
28
28
|
}
|
|
@@ -34,6 +34,13 @@ let MainThreadChatContext = class MainThreadChatContext extends Disposable {
|
|
|
34
34
|
this._chatContextService.unregisterChatContextProvider(provider.id);
|
|
35
35
|
this._providers.delete(handle);
|
|
36
36
|
}
|
|
37
|
+
$updateWorkspaceContextItems(handle, items) {
|
|
38
|
+
const provider = this._providers.get(handle);
|
|
39
|
+
if (!provider) {
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
this._chatContextService.updateWorkspaceContextItems(provider.id, items);
|
|
43
|
+
}
|
|
37
44
|
};
|
|
38
45
|
MainThreadChatContext = __decorate([
|
|
39
46
|
extHostNamedCustomer(MainContext.MainThreadChatContext),
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { CancellationToken } from "@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation";
|
|
2
|
+
import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
|
|
2
3
|
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
3
4
|
import { IObservable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/observable";
|
|
4
5
|
import { URI, UriComponents } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
5
6
|
import { IDialogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service";
|
|
6
7
|
import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
|
|
7
|
-
import {
|
|
8
|
+
import { IChatWidgetService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/chat.service";
|
|
9
|
+
import { IChatAgentRequest } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatAgents";
|
|
8
10
|
import { IChatContentInlineReference, IChatProgress } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService";
|
|
9
|
-
import {
|
|
11
|
+
import { IChatService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatService.service";
|
|
12
|
+
import { IChatSession, IChatSessionHistoryItem, IChatSessionProviderOptionItem } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService";
|
|
10
13
|
import { IChatSessionsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/chatSessionsService.service";
|
|
11
14
|
import { IEditorGroupsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorGroupsService.service";
|
|
12
15
|
import { IEditorService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service";
|
|
@@ -18,11 +21,11 @@ export declare class ObservableChatSession extends Disposable implements IChatSe
|
|
|
18
21
|
readonly providerHandle: number;
|
|
19
22
|
readonly history: Array<IChatSessionHistoryItem>;
|
|
20
23
|
private _options?;
|
|
21
|
-
get options(): Record<string, string> | undefined;
|
|
24
|
+
get options(): Record<string, string | IChatSessionProviderOptionItem> | undefined;
|
|
22
25
|
private readonly _progressObservable;
|
|
23
26
|
private readonly _isCompleteObservable;
|
|
24
27
|
private readonly _onWillDispose;
|
|
25
|
-
readonly onWillDispose:
|
|
28
|
+
readonly onWillDispose: Event<void>;
|
|
26
29
|
private readonly _pendingProgressChunks;
|
|
27
30
|
private _isInitialized;
|
|
28
31
|
private _interruptionWasCanceled;
|
|
@@ -55,6 +58,8 @@ export declare class ObservableChatSession extends Disposable implements IChatSe
|
|
|
55
58
|
export declare class MainThreadChatSessions extends Disposable implements MainThreadChatSessionsShape {
|
|
56
59
|
private readonly _extHostContext;
|
|
57
60
|
private readonly _chatSessionsService;
|
|
61
|
+
private readonly _chatService;
|
|
62
|
+
private readonly _chatWidgetService;
|
|
58
63
|
private readonly _dialogService;
|
|
59
64
|
private readonly _editorService;
|
|
60
65
|
private readonly editorGroupService;
|
|
@@ -65,12 +70,17 @@ export declare class MainThreadChatSessions extends Disposable implements MainTh
|
|
|
65
70
|
private readonly _activeSessions;
|
|
66
71
|
private readonly _sessionDisposables;
|
|
67
72
|
private readonly _proxy;
|
|
68
|
-
constructor(_extHostContext: IExtHostContext, _chatSessionsService: IChatSessionsService, _dialogService: IDialogService, _editorService: IEditorService, editorGroupService: IEditorGroupsService, _logService: ILogService);
|
|
73
|
+
constructor(_extHostContext: IExtHostContext, _chatSessionsService: IChatSessionsService, _chatService: IChatService, _chatWidgetService: IChatWidgetService, _dialogService: IDialogService, _editorService: IEditorService, editorGroupService: IEditorGroupsService, _logService: ILogService);
|
|
69
74
|
private _getHandleForSessionType;
|
|
70
75
|
$registerChatSessionItemProvider(handle: number, chatSessionType: string): void;
|
|
71
76
|
$onDidChangeChatSessionItems(handle: number): void;
|
|
77
|
+
$onDidChangeChatSessionOptions(handle: number, sessionResourceComponents: UriComponents, updates: ReadonlyArray<{
|
|
78
|
+
optionId: string;
|
|
79
|
+
value: string;
|
|
80
|
+
}>): void;
|
|
72
81
|
$onDidCommitChatSessionItem(handle: number, originalComponents: UriComponents, modifiedCompoennts: UriComponents): Promise<void>;
|
|
73
82
|
private _provideChatSessionItems;
|
|
83
|
+
private handleSessionModelOverrides;
|
|
74
84
|
private _provideNewChatSessionItem;
|
|
75
85
|
private _provideChatSessionContent;
|
|
76
86
|
$unregisterChatSessionItemProvider(handle: number): void;
|
|
@@ -89,6 +99,6 @@ export declare class MainThreadChatSessions extends Disposable implements MainTh
|
|
|
89
99
|
*/
|
|
90
100
|
notifyOptionsChange(handle: number, sessionResource: URI, updates: ReadonlyArray<{
|
|
91
101
|
optionId: string;
|
|
92
|
-
value: string | undefined;
|
|
102
|
+
value: string | IChatSessionProviderOptionItem | undefined;
|
|
93
103
|
}>): Promise<void>;
|
|
94
104
|
}
|