@codingame/monaco-vscode-extensions-service-override 34.1.3 → 35.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +2 -0
- package/package.json +3 -3
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagementCLI.js +29 -29
- package/vscode/src/vs/workbench/api/browser/mainThreadAgentEditorComments.d.ts +25 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadAgentEditorComments.js +57 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadAuthentication.js +28 -28
- package/vscode/src/vs/workbench/api/browser/mainThreadBrowserTunnelProxy.d.ts +23 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadBrowserTunnelProxy.js +47 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadCLICommands.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents2.js +30 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadChatSessions.d.ts +12 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatSessions.js +12 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadComments.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadCustomEditors.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadEditSessionIdentityParticipant.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadExtensionService.js +11 -11
- package/vscode/src/vs/workbench/api/browser/mainThreadFileSystemEventService.js +20 -20
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageFeatures.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModelTools.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModels.d.ts +5 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModels.js +70 -10
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguages.d.ts +6 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguages.js +61 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadMcp.js +13 -13
- package/vscode/src/vs/workbench/api/browser/mainThreadMessageService.js +4 -4
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookSaveParticipant.js +1 -1
- 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/mainThreadQuickDiff.d.ts +7 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadQuickDiff.js +46 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadSaveParticipant.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadTask.js +1 -1
- 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/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/services/extensionManagement/browser/extensionBisect.js +23 -23
- package/vscode/src/vs/workbench/services/extensionManagement/browser/webExtensionsScannerService.d.ts +0 -1
- package/vscode/src/vs/workbench/services/extensionManagement/browser/webExtensionsScannerService.js +4 -7
- 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/worker/webWorkerExtensionHostIframe.html +12 -3
- package/vscode/src/vs/workbench/services/themes/browser/cssExtensionPoint.js +5 -5
|
@@ -311,7 +311,8 @@ let MainThreadChatAgents2 = class MainThreadChatAgents2 extends Disposable {
|
|
|
311
311
|
const chatSession = this._chatService.getSession(request.sessionResource);
|
|
312
312
|
this._pendingProgress.set(request.requestId, {
|
|
313
313
|
progress,
|
|
314
|
-
chatSession
|
|
314
|
+
chatSession,
|
|
315
|
+
isSubagent: !!request.subAgentInvocationId
|
|
315
316
|
});
|
|
316
317
|
try {
|
|
317
318
|
const chatSessionResource = request.sessionResource;
|
|
@@ -421,7 +422,8 @@ let MainThreadChatAgents2 = class MainThreadChatAgents2 extends Disposable {
|
|
|
421
422
|
}
|
|
422
423
|
const {
|
|
423
424
|
progress,
|
|
424
|
-
chatSession
|
|
425
|
+
chatSession,
|
|
426
|
+
isSubagent
|
|
425
427
|
} = pendingProgress;
|
|
426
428
|
const chatProgressParts = [];
|
|
427
429
|
const response = chatSession?.getRequests().find(req => req.id === requestId)?.response;
|
|
@@ -458,14 +460,28 @@ let MainThreadChatAgents2 = class MainThreadChatAgents2 extends Disposable {
|
|
|
458
460
|
continue;
|
|
459
461
|
}
|
|
460
462
|
if (progress.kind === "usage") {
|
|
461
|
-
if (
|
|
463
|
+
if (isSubagent) {
|
|
464
|
+
chatProgressParts.push({
|
|
465
|
+
kind: "usage",
|
|
466
|
+
promptTokens: progress.promptTokens,
|
|
467
|
+
completionTokens: progress.completionTokens,
|
|
468
|
+
outputBuffer: progress.outputBuffer,
|
|
469
|
+
copilotCredits: progress.copilotCredits,
|
|
470
|
+
promptTokenDetails: progress.promptTokenDetails
|
|
471
|
+
});
|
|
472
|
+
} else if (response) {
|
|
462
473
|
response.setUsage({
|
|
463
474
|
kind: "usage",
|
|
464
475
|
promptTokens: progress.promptTokens,
|
|
465
476
|
completionTokens: progress.completionTokens,
|
|
466
477
|
outputBuffer: progress.outputBuffer,
|
|
478
|
+
copilotCredits: progress.copilotCredits,
|
|
467
479
|
promptTokenDetails: progress.promptTokenDetails
|
|
468
480
|
});
|
|
481
|
+
} else {
|
|
482
|
+
this._logService.warn(
|
|
483
|
+
`MainThreadChatAgents2#$handleProgressChunk: No response model for usage of non-subagent request ${requestId}; dropping usage.`
|
|
484
|
+
);
|
|
469
485
|
}
|
|
470
486
|
continue;
|
|
471
487
|
}
|
|
@@ -707,8 +723,19 @@ let MainThreadChatAgents2 = class MainThreadChatAgents2 extends Disposable {
|
|
|
707
723
|
badgeTooltip: item.badgeTooltip,
|
|
708
724
|
extensionId: item.extensionId,
|
|
709
725
|
pluginUri: item.pluginUri ? URI.revive(item.pluginUri) : undefined,
|
|
726
|
+
pluginLabel: item.pluginLabel,
|
|
710
727
|
userInvocable: item.userInvocable
|
|
711
728
|
})));
|
|
729
|
+
},
|
|
730
|
+
provideSourceFolders: async (sessionResource, type, token) => {
|
|
731
|
+
const folders = await this._proxy.$provideSourceFolders(handle, sessionResource, type, token);
|
|
732
|
+
if (!folders) {
|
|
733
|
+
return undefined;
|
|
734
|
+
}
|
|
735
|
+
return ( folders.map(folder => ({
|
|
736
|
+
uri: URI.revive(folder.uri),
|
|
737
|
+
label: folder.label
|
|
738
|
+
})));
|
|
712
739
|
}
|
|
713
740
|
};
|
|
714
741
|
const typeToSection = {
|
|
@@ -35,6 +35,18 @@ export declare class ObservableChatSession extends Disposable implements IChatSe
|
|
|
35
35
|
private _isInitialized;
|
|
36
36
|
private _interruptionWasCanceled;
|
|
37
37
|
private _disposalPending;
|
|
38
|
+
/**
|
|
39
|
+
* Number of currently in-flight `requestHandler` invocations. Used to
|
|
40
|
+
* defer `$disposeChatSessionContent` when the workbench wants to release
|
|
41
|
+
* this session while a request is mid-flight on a `requestHandler`-style
|
|
42
|
+
* session (e.g. Copilot CLI). Without this guard, the proxy dispose
|
|
43
|
+
* synchronously cancels the ext-host `disposeCts` and tears down the
|
|
44
|
+
* underlying SDK session (which calls `sdkSession.abort()`), so the
|
|
45
|
+
* in-flight request is lost. The `activeResponseCallback`-style sessions
|
|
46
|
+
* have their own deferral via {@link interruptActiveResponseCallback};
|
|
47
|
+
* this counter is the equivalent for `requestHandler`-style sessions.
|
|
48
|
+
*/
|
|
49
|
+
private _inFlightRequestCount;
|
|
38
50
|
private _initializationPromise?;
|
|
39
51
|
interruptActiveResponseCallback?: () => Promise<boolean>;
|
|
40
52
|
requestHandler?: (request: IChatAgentRequest, progress: (progress: IChatProgress[]) => void, history: any[], token: CancellationToken) => Promise<void>;
|
|
@@ -70,6 +70,7 @@ class ObservableChatSession extends Disposable {
|
|
|
70
70
|
this._isInitialized = false;
|
|
71
71
|
this._interruptionWasCanceled = false;
|
|
72
72
|
this._disposalPending = false;
|
|
73
|
+
this._inFlightRequestCount = 0;
|
|
73
74
|
this.sessionResource = resource;
|
|
74
75
|
this.providerHandle = providerHandle;
|
|
75
76
|
this.history = [];
|
|
@@ -136,7 +137,7 @@ class ObservableChatSession extends Disposable {
|
|
|
136
137
|
return confirmInterrupt();
|
|
137
138
|
}
|
|
138
139
|
return this._dialogService.confirm({
|
|
139
|
-
message: ( localize(
|
|
140
|
+
message: ( localize(2738, "Are you sure you want to interrupt the active session?"))
|
|
140
141
|
}).then(confirmed => {
|
|
141
142
|
if (confirmed.confirmed) {
|
|
142
143
|
return confirmInterrupt();
|
|
@@ -162,6 +163,7 @@ class ObservableChatSession extends Disposable {
|
|
|
162
163
|
}
|
|
163
164
|
if (sessionContent.hasRequestHandler && !this.requestHandler) {
|
|
164
165
|
this.requestHandler = async (request, progress, history, token) => {
|
|
166
|
+
this._inFlightRequestCount++;
|
|
165
167
|
this._progressObservable.set([], undefined);
|
|
166
168
|
this._isCompleteObservable.set(false, undefined);
|
|
167
169
|
let lastProgressLength = 0;
|
|
@@ -195,6 +197,11 @@ class ObservableChatSession extends Disposable {
|
|
|
195
197
|
throw error;
|
|
196
198
|
} finally {
|
|
197
199
|
progressDisposable.dispose();
|
|
200
|
+
this._inFlightRequestCount--;
|
|
201
|
+
if (this._disposalPending && this._inFlightRequestCount === 0 && !this.interruptActiveResponseCallback) {
|
|
202
|
+
this._disposalPending = false;
|
|
203
|
+
this._proxy.$disposeChatSessionContent(this._providerHandle, this.sessionResource);
|
|
204
|
+
}
|
|
198
205
|
}
|
|
199
206
|
};
|
|
200
207
|
}
|
|
@@ -276,6 +283,8 @@ class ObservableChatSession extends Disposable {
|
|
|
276
283
|
this._pendingProgressChunks.clear();
|
|
277
284
|
if (this.interruptActiveResponseCallback && !this._interruptionWasCanceled) {
|
|
278
285
|
this._disposalPending = true;
|
|
286
|
+
} else if (this._inFlightRequestCount > 0) {
|
|
287
|
+
this._disposalPending = true;
|
|
279
288
|
} else {
|
|
280
289
|
this._proxy.$disposeChatSessionContent(this._providerHandle, this.sessionResource);
|
|
281
290
|
}
|
|
@@ -653,7 +662,7 @@ let MainThreadChatSessions = class MainThreadChatSessions extends Disposable {
|
|
|
653
662
|
const options = {
|
|
654
663
|
title: {
|
|
655
664
|
preferred: originalEditor?.getName() || undefined,
|
|
656
|
-
fallback: ( localize(
|
|
665
|
+
fallback: ( localize(2739, "{0}", contribution?.displayName))
|
|
657
666
|
}
|
|
658
667
|
};
|
|
659
668
|
const newSession = await this._chatSessionsService.getOrCreateChatSession(URI.revive(modifiedResource), CancellationToken.None);
|
|
@@ -683,7 +692,7 @@ let MainThreadChatSessions = class MainThreadChatSessions extends Disposable {
|
|
|
683
692
|
await this._chatWidgetService.openSession(modifiedResource, undefined, {
|
|
684
693
|
preserveFocus: true
|
|
685
694
|
});
|
|
686
|
-
} else {
|
|
695
|
+
} else if (!chatViewWidget) {
|
|
687
696
|
const ref = await this._chatService.acquireOrLoadSession(modifiedResource, ChatAgentLocation.Chat, CancellationToken.None);
|
|
688
697
|
ref?.dispose();
|
|
689
698
|
}
|
|
@@ -468,7 +468,7 @@ let MainThreadCommentController = class MainThreadCommentController extends Disp
|
|
|
468
468
|
}
|
|
469
469
|
};
|
|
470
470
|
MainThreadCommentController = ( __decorate([( __param(6, ICommentService)), ( __param(7, IUriIdentityService))], MainThreadCommentController));
|
|
471
|
-
const commentsViewIcon = registerIcon("comments-view-icon", Codicon.commentDiscussion, ( localize(
|
|
471
|
+
const commentsViewIcon = registerIcon("comments-view-icon", Codicon.commentDiscussion, ( localize(2740, "View icon of the comments view.")));
|
|
472
472
|
let MainThreadComments = class MainThreadComments extends Disposable {
|
|
473
473
|
constructor(
|
|
474
474
|
extHostContext,
|
|
@@ -532,7 +532,7 @@ let MainThreadCustomEditorModel = MainThreadCustomEditorModel_1 = class MainThre
|
|
|
532
532
|
this._register(workingCopyService.registerWorkingCopy(this));
|
|
533
533
|
this._register(extensionService.onWillStop(e => {
|
|
534
534
|
e.veto(true, ( localize(
|
|
535
|
-
|
|
535
|
+
2741,
|
|
536
536
|
"An extension provided editor for '{0}' is still open that would close otherwise.",
|
|
537
537
|
this.name
|
|
538
538
|
)));
|
|
@@ -600,7 +600,7 @@ let MainThreadCustomEditorModel = MainThreadCustomEditorModel_1 = class MainThre
|
|
|
600
600
|
this._undoService.pushElement({
|
|
601
601
|
type: UndoRedoElementType.Resource,
|
|
602
602
|
resource: this._editorResource,
|
|
603
|
-
label: label ?? ( localize(
|
|
603
|
+
label: label ?? ( localize(2742, "Edit")),
|
|
604
604
|
code: "undoredo.customEditorEdit",
|
|
605
605
|
undo: () => this.undo(),
|
|
606
606
|
redo: () => this.redo()
|
|
@@ -14,7 +14,7 @@ class ExtHostEditSessionIdentityCreateParticipant {
|
|
|
14
14
|
}
|
|
15
15
|
async participate(workspaceFolder, token) {
|
|
16
16
|
const p = ( new Promise((resolve, reject) => {
|
|
17
|
-
setTimeout(() => reject(( new Error(( localize(
|
|
17
|
+
setTimeout(() => reject(( new Error(( localize(2743, "Aborted onWillCreateEditSessionIdentity-event after 10000ms"))))), this.timeout);
|
|
18
18
|
this._proxy.$onWillCreateEditSessionIdentity(workspaceFolder.uri, token, this.timeout).then(resolve, reject);
|
|
19
19
|
}));
|
|
20
20
|
return raceCancellationError(p, token);
|
|
@@ -111,7 +111,7 @@ let MainThreadExtensionService = class MainThreadExtensionService {
|
|
|
111
111
|
this._notificationService.notify({
|
|
112
112
|
severity: Severity.Error,
|
|
113
113
|
message: ( localize(
|
|
114
|
-
|
|
114
|
+
2744,
|
|
115
115
|
"Cannot activate the '{0}' extension because it depends on the '{1}' extension, which is not loaded. Would you like to reload the window to load the extension?",
|
|
116
116
|
extName,
|
|
117
117
|
missingInstalledDependency.manifest.displayName || missingInstalledDependency.manifest.name
|
|
@@ -119,7 +119,7 @@ let MainThreadExtensionService = class MainThreadExtensionService {
|
|
|
119
119
|
actions: {
|
|
120
120
|
primary: [toAction({
|
|
121
121
|
id: "reload",
|
|
122
|
-
label: ( localize(
|
|
122
|
+
label: ( localize(2745, "Reload Window")),
|
|
123
123
|
run: () => this._hostService.reload()
|
|
124
124
|
})]
|
|
125
125
|
}
|
|
@@ -130,7 +130,7 @@ let MainThreadExtensionService = class MainThreadExtensionService {
|
|
|
130
130
|
this._notificationService.notify({
|
|
131
131
|
severity: Severity.Error,
|
|
132
132
|
message: ( localize(
|
|
133
|
-
|
|
133
|
+
2746,
|
|
134
134
|
"Cannot activate the '{0}' extension because it depends on the '{1}' extension which is not supported in the current workspace",
|
|
135
135
|
extName,
|
|
136
136
|
missingInstalledDependency.manifest.displayName || missingInstalledDependency.manifest.name
|
|
@@ -140,7 +140,7 @@ let MainThreadExtensionService = class MainThreadExtensionService {
|
|
|
140
140
|
this._notificationService.notify({
|
|
141
141
|
severity: Severity.Error,
|
|
142
142
|
message: ( localize(
|
|
143
|
-
|
|
143
|
+
2747,
|
|
144
144
|
"Cannot activate the '{0}' extension because it depends on the '{1}' extension which is not supported in Restricted Mode",
|
|
145
145
|
extName,
|
|
146
146
|
missingInstalledDependency.manifest.displayName || missingInstalledDependency.manifest.name
|
|
@@ -148,7 +148,7 @@ let MainThreadExtensionService = class MainThreadExtensionService {
|
|
|
148
148
|
actions: {
|
|
149
149
|
primary: [toAction({
|
|
150
150
|
id: "manageWorkspaceTrust",
|
|
151
|
-
label: ( localize(
|
|
151
|
+
label: ( localize(2748, "Manage Workspace Trust")),
|
|
152
152
|
run: () => this._commandService.executeCommand("workbench.trust.manage")
|
|
153
153
|
})]
|
|
154
154
|
}
|
|
@@ -157,7 +157,7 @@ let MainThreadExtensionService = class MainThreadExtensionService {
|
|
|
157
157
|
this._notificationService.notify({
|
|
158
158
|
severity: Severity.Error,
|
|
159
159
|
message: ( localize(
|
|
160
|
-
|
|
160
|
+
2749,
|
|
161
161
|
"Cannot activate the '{0}' extension because it depends on the '{1}' extension which is disabled. Would you like to enable the extension and reload the window?",
|
|
162
162
|
extName,
|
|
163
163
|
missingInstalledDependency.manifest.displayName || missingInstalledDependency.manifest.name
|
|
@@ -165,7 +165,7 @@ let MainThreadExtensionService = class MainThreadExtensionService {
|
|
|
165
165
|
actions: {
|
|
166
166
|
primary: [toAction({
|
|
167
167
|
id: "enable",
|
|
168
|
-
label: ( localize(
|
|
168
|
+
label: ( localize(2750, "Enable and Reload")),
|
|
169
169
|
enabled: true,
|
|
170
170
|
run: () => this._extensionEnablementService.setEnablement(
|
|
171
171
|
[missingInstalledDependency],
|
|
@@ -178,7 +178,7 @@ let MainThreadExtensionService = class MainThreadExtensionService {
|
|
|
178
178
|
this._notificationService.notify({
|
|
179
179
|
severity: Severity.Error,
|
|
180
180
|
message: ( localize(
|
|
181
|
-
|
|
181
|
+
2751,
|
|
182
182
|
"Cannot activate the '{0}' extension because it depends on the '{1}' extension which is disabled.",
|
|
183
183
|
extName,
|
|
184
184
|
missingInstalledDependency.manifest.displayName || missingInstalledDependency.manifest.name
|
|
@@ -199,7 +199,7 @@ let MainThreadExtensionService = class MainThreadExtensionService {
|
|
|
199
199
|
this._notificationService.notify({
|
|
200
200
|
severity: Severity.Error,
|
|
201
201
|
message: ( localize(
|
|
202
|
-
|
|
202
|
+
2752,
|
|
203
203
|
"Cannot activate the '{0}' extension because it depends on the '{1}' extension from '{2}', which is not installed. Would you like to install the extension and reload the window?",
|
|
204
204
|
extName,
|
|
205
205
|
dependencyExtension.displayName,
|
|
@@ -208,14 +208,14 @@ let MainThreadExtensionService = class MainThreadExtensionService {
|
|
|
208
208
|
actions: {
|
|
209
209
|
primary: [toAction({
|
|
210
210
|
id: "install",
|
|
211
|
-
label: ( localize(
|
|
211
|
+
label: ( localize(2753, "Install and Reload")),
|
|
212
212
|
run: () => this._extensionsWorkbenchService.install(dependencyExtension).then(() => this._hostService.reload(), e => this._notificationService.error(e))
|
|
213
213
|
})]
|
|
214
214
|
}
|
|
215
215
|
});
|
|
216
216
|
} else {
|
|
217
217
|
this._notificationService.error(( localize(
|
|
218
|
-
|
|
218
|
+
2754,
|
|
219
219
|
"Cannot activate the '{0}' extension because it depends on an unknown '{1}' extension.",
|
|
220
220
|
extName,
|
|
221
221
|
missingDependency
|
|
@@ -94,25 +94,25 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
|
|
|
94
94
|
if (data.extensionNames.length === 1) {
|
|
95
95
|
if (operation === FileOperation.CREATE) {
|
|
96
96
|
message = ( localize(
|
|
97
|
-
|
|
97
|
+
2755,
|
|
98
98
|
"Extension '{0}' wants to make refactoring changes with this file creation",
|
|
99
99
|
data.extensionNames[0]
|
|
100
100
|
));
|
|
101
101
|
} else if (operation === FileOperation.COPY) {
|
|
102
102
|
message = ( localize(
|
|
103
|
-
|
|
103
|
+
2756,
|
|
104
104
|
"Extension '{0}' wants to make refactoring changes with this file copy",
|
|
105
105
|
data.extensionNames[0]
|
|
106
106
|
));
|
|
107
107
|
} else if (operation === FileOperation.MOVE) {
|
|
108
108
|
message = ( localize(
|
|
109
|
-
|
|
109
|
+
2757,
|
|
110
110
|
"Extension '{0}' wants to make refactoring changes with this file move",
|
|
111
111
|
data.extensionNames[0]
|
|
112
112
|
));
|
|
113
113
|
} else {
|
|
114
114
|
message = ( localize(
|
|
115
|
-
|
|
115
|
+
2758,
|
|
116
116
|
"Extension '{0}' wants to make refactoring changes with this file deletion",
|
|
117
117
|
data.extensionNames[0]
|
|
118
118
|
));
|
|
@@ -120,25 +120,25 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
|
|
|
120
120
|
} else {
|
|
121
121
|
if (operation === FileOperation.CREATE) {
|
|
122
122
|
message = ( localize(
|
|
123
|
-
|
|
123
|
+
2759,
|
|
124
124
|
"{0} extensions want to make refactoring changes with this file creation",
|
|
125
125
|
data.extensionNames.length
|
|
126
126
|
));
|
|
127
127
|
} else if (operation === FileOperation.COPY) {
|
|
128
128
|
message = ( localize(
|
|
129
|
-
|
|
129
|
+
2760,
|
|
130
130
|
"{0} extensions want to make refactoring changes with this file copy",
|
|
131
131
|
data.extensionNames.length
|
|
132
132
|
));
|
|
133
133
|
} else if (operation === FileOperation.MOVE) {
|
|
134
134
|
message = ( localize(
|
|
135
|
-
|
|
135
|
+
2761,
|
|
136
136
|
"{0} extensions want to make refactoring changes with this file move",
|
|
137
137
|
data.extensionNames.length
|
|
138
138
|
));
|
|
139
139
|
} else {
|
|
140
140
|
message = ( localize(
|
|
141
|
-
|
|
141
|
+
2762,
|
|
142
142
|
"{0} extensions want to make refactoring changes with this file deletion",
|
|
143
143
|
data.extensionNames.length
|
|
144
144
|
));
|
|
@@ -150,8 +150,8 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
|
|
|
150
150
|
} = await dialogService.confirm({
|
|
151
151
|
type: Severity.Info,
|
|
152
152
|
message,
|
|
153
|
-
primaryButton: ( localize(
|
|
154
|
-
cancelButton: ( localize(
|
|
153
|
+
primaryButton: ( localize(2763, "Show &&Preview")),
|
|
154
|
+
cancelButton: ( localize(2764, "Skip Changes"))
|
|
155
155
|
});
|
|
156
156
|
showPreview = true;
|
|
157
157
|
if (!confirmed) {
|
|
@@ -171,18 +171,18 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
|
|
|
171
171
|
type: Severity.Info,
|
|
172
172
|
message,
|
|
173
173
|
buttons: [{
|
|
174
|
-
label: ( localize(
|
|
174
|
+
label: ( localize(2765, "&&OK")),
|
|
175
175
|
run: () => Choice.OK
|
|
176
176
|
}, {
|
|
177
|
-
label: ( localize(
|
|
177
|
+
label: ( localize(2763, "Show &&Preview")),
|
|
178
178
|
run: () => Choice.Preview
|
|
179
179
|
}],
|
|
180
180
|
cancelButton: {
|
|
181
|
-
label: ( localize(
|
|
181
|
+
label: ( localize(2764, "Skip Changes")),
|
|
182
182
|
run: () => Choice.Cancel
|
|
183
183
|
},
|
|
184
184
|
checkbox: {
|
|
185
|
-
label: ( localize(
|
|
185
|
+
label: ( localize(2766, "Do not ask me again"))
|
|
186
186
|
}
|
|
187
187
|
});
|
|
188
188
|
if (result === Choice.Cancel) {
|
|
@@ -211,15 +211,15 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
|
|
|
211
211
|
_progressLabel(operation) {
|
|
212
212
|
switch (operation) {
|
|
213
213
|
case FileOperation.CREATE:
|
|
214
|
-
return localize(
|
|
214
|
+
return localize(2767, "Running 'File Create' participants...");
|
|
215
215
|
case FileOperation.MOVE:
|
|
216
|
-
return localize(
|
|
216
|
+
return localize(2768, "Running 'File Rename' participants...");
|
|
217
217
|
case FileOperation.COPY:
|
|
218
|
-
return localize(
|
|
218
|
+
return localize(2769, "Running 'File Copy' participants...");
|
|
219
219
|
case FileOperation.DELETE:
|
|
220
|
-
return localize(
|
|
220
|
+
return localize(2770, "Running 'File Delete' participants...");
|
|
221
221
|
case FileOperation.WRITE:
|
|
222
|
-
return localize(
|
|
222
|
+
return localize(2771, "Running 'File Write' participants...");
|
|
223
223
|
}
|
|
224
224
|
}
|
|
225
225
|
})();
|
|
@@ -307,7 +307,7 @@ registerAction2(class ResetMemento extends Action2 {
|
|
|
307
307
|
super({
|
|
308
308
|
id: "files.participants.resetChoice",
|
|
309
309
|
title: {
|
|
310
|
-
value: ( localize(
|
|
310
|
+
value: ( localize(2772, "Reset choice for 'File operation needs preview'")),
|
|
311
311
|
original: `Reset choice for 'File operation needs preview'`
|
|
312
312
|
},
|
|
313
313
|
f1: true
|
|
@@ -1289,7 +1289,7 @@ let ExtensionBackedInlineCompletionsProvider = class ExtensionBackedInlineComple
|
|
|
1289
1289
|
}
|
|
1290
1290
|
if (this._supportsHandleEvents) {
|
|
1291
1291
|
await this._proxy.$handleInlineCompletionEndOfLifetime(this.handle, completions.pid, item.idx, mapReason(reason, i => ({
|
|
1292
|
-
pid:
|
|
1292
|
+
pid: i.pid,
|
|
1293
1293
|
idx: i.idx
|
|
1294
1294
|
})));
|
|
1295
1295
|
}
|
|
@@ -29,12 +29,13 @@ let MainThreadLanguageModelTools = class MainThreadLanguageModelTools extends Di
|
|
|
29
29
|
);
|
|
30
30
|
}
|
|
31
31
|
getToolDtos() {
|
|
32
|
+
const fullReferenceNameMap = this._languageModelToolsService.getFullReferenceNameMap();
|
|
32
33
|
return ( Array.from(this._languageModelToolsService.getAllToolsIncludingDisabled()).map(tool => ({
|
|
33
34
|
id: tool.id,
|
|
34
35
|
displayName: tool.displayName,
|
|
35
36
|
toolReferenceName: tool.toolReferenceName,
|
|
36
37
|
legacyToolReferenceFullNames: tool.legacyToolReferenceFullNames,
|
|
37
|
-
fullReferenceName:
|
|
38
|
+
fullReferenceName: fullReferenceNameMap.get(tool) ?? undefined,
|
|
38
39
|
tags: tool.tags,
|
|
39
40
|
userDescription: tool.userDescription,
|
|
40
41
|
modelDescription: tool.modelDescription,
|
|
@@ -3,6 +3,7 @@ import { SerializedError } from "@codingame/monaco-vscode-api/vscode/vs/base/com
|
|
|
3
3
|
import { UriComponents } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
4
4
|
import { ExtensionIdentifier } from "@codingame/monaco-vscode-api/vscode/vs/platform/extensions/common/extensions";
|
|
5
5
|
import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
|
|
6
|
+
import { IProductService } from "@codingame/monaco-vscode-api/vscode/vs/platform/product/common/productService.service";
|
|
6
7
|
import { ILanguageModelIgnoredFilesService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/ignoredFiles.service";
|
|
7
8
|
import { IChatMessage, IChatResponsePart, ILanguageModelChatSelector } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModels";
|
|
8
9
|
import { ILanguageModelsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModels.service";
|
|
@@ -15,6 +16,7 @@ import { MainThreadLanguageModelsShape } from "@codingame/monaco-vscode-api/vsco
|
|
|
15
16
|
export declare class MainThreadLanguageModels implements MainThreadLanguageModelsShape {
|
|
16
17
|
private readonly _chatProviderService;
|
|
17
18
|
private readonly _logService;
|
|
19
|
+
private readonly _productService;
|
|
18
20
|
private readonly _authenticationService;
|
|
19
21
|
private readonly _authenticationAccessService;
|
|
20
22
|
private readonly _extensionService;
|
|
@@ -24,14 +26,16 @@ export declare class MainThreadLanguageModels implements MainThreadLanguageModel
|
|
|
24
26
|
private readonly _providerRegistrations;
|
|
25
27
|
private readonly _lmProviderChange;
|
|
26
28
|
private readonly _pendingProgress;
|
|
29
|
+
private readonly _pendingCancelCTS;
|
|
27
30
|
private readonly _ignoredFileProviderRegistrations;
|
|
28
|
-
constructor(extHostContext: IExtHostContext, _chatProviderService: ILanguageModelsService, _logService: ILogService, _authenticationService: IAuthenticationService, _authenticationAccessService: IAuthenticationAccessService, _extensionService: IExtensionService, _ignoredFilesService: ILanguageModelIgnoredFilesService);
|
|
31
|
+
constructor(extHostContext: IExtHostContext, _chatProviderService: ILanguageModelsService, _logService: ILogService, _productService: IProductService, _authenticationService: IAuthenticationService, _authenticationAccessService: IAuthenticationAccessService, _extensionService: IExtensionService, _ignoredFilesService: ILanguageModelIgnoredFilesService);
|
|
29
32
|
dispose(): void;
|
|
30
33
|
$registerLanguageModelProvider(vendor: string): void;
|
|
31
34
|
$onLMProviderChange(vendor: string): void;
|
|
32
35
|
$reportResponsePart(requestId: number, chunk: SerializableObjectWithBuffers<IChatResponsePart | IChatResponsePart[]>): Promise<void>;
|
|
33
36
|
$reportResponseDone(requestId: number, err: SerializedError | undefined): Promise<void>;
|
|
34
37
|
$unregisterProvider(vendor: string): void;
|
|
38
|
+
$cancelLanguageModelChatRequest(requestId: number): void;
|
|
35
39
|
$selectChatModels(selector: ILanguageModelChatSelector): Promise<string[]>;
|
|
36
40
|
$tryStartChatRequest(extension: ExtensionIdentifier, modelIdentifier: string, requestId: number, messages: SerializableObjectWithBuffers<IChatMessage[]>, options: {}, token: CancellationToken): Promise<void>;
|
|
37
41
|
$countTokens(modelId: string, value: string | IChatMessage, token: CancellationToken): Promise<number>;
|