@codingame/monaco-vscode-extensions-service-override 33.0.9 → 34.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 +3 -3
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagementCLI.js +29 -29
- package/vscode/src/vs/workbench/api/browser/mainThreadAuthentication.d.ts +6 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadAuthentication.js +92 -29
- package/vscode/src/vs/workbench/api/browser/mainThreadCLICommands.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents2.js +9 -10
- package/vscode/src/vs/workbench/api/browser/mainThreadChatQuota.d.ts +9 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatQuota.js +22 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatSessions.js +4 -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/mainThreadEditorTabs.js +2 -0
- 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/mainThreadLanguageModels.js +12 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadMcp.d.ts +6 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadMcp.js +134 -20
- 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/mainThreadSaveParticipant.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadTask.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadTerminalService.js +11 -33
- 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 +2 -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.js +2 -2
- package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.d.ts +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/themes/browser/cssExtensionPoint.js +5 -5
|
@@ -0,0 +1,22 @@
|
|
|
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 { IChatEntitlementService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/chat/common/chatEntitlementService.service';
|
|
5
|
+
import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
|
|
6
|
+
import { MainContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol';
|
|
7
|
+
|
|
8
|
+
let MainThreadChatQuota = class MainThreadChatQuota extends Disposable {
|
|
9
|
+
constructor(extHostContext, _chatEntitlementService) {
|
|
10
|
+
super();
|
|
11
|
+
this._chatEntitlementService = _chatEntitlementService;
|
|
12
|
+
}
|
|
13
|
+
$updateQuotas(quotas) {
|
|
14
|
+
this._chatEntitlementService.acceptQuotas({
|
|
15
|
+
...this._chatEntitlementService.quotas,
|
|
16
|
+
...quotas
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
MainThreadChatQuota = __decorate([extHostNamedCustomer(MainContext.MainThreadChatQuota), ( __param(1, IChatEntitlementService))], MainThreadChatQuota);
|
|
21
|
+
|
|
22
|
+
export { MainThreadChatQuota };
|
|
@@ -136,7 +136,7 @@ class ObservableChatSession extends Disposable {
|
|
|
136
136
|
return confirmInterrupt();
|
|
137
137
|
}
|
|
138
138
|
return this._dialogService.confirm({
|
|
139
|
-
message: ( localize(
|
|
139
|
+
message: ( localize(2662, "Are you sure you want to interrupt the active session?"))
|
|
140
140
|
}).then(confirmed => {
|
|
141
141
|
if (confirmed.confirmed) {
|
|
142
142
|
return confirmInterrupt();
|
|
@@ -468,6 +468,7 @@ class MainThreadChatSessionItem {
|
|
|
468
468
|
this.tooltip = reviveMarkdownString(dto.tooltip);
|
|
469
469
|
this.archived = dto.archived;
|
|
470
470
|
this.metadata = dto.metadata;
|
|
471
|
+
this.legacyResource = dto.legacyResource ? URI.revive(dto.legacyResource) : undefined;
|
|
471
472
|
this.description = (model && getInProgressSessionDescription(model)) ?? reviveMarkdownString(dto.description);
|
|
472
473
|
this.status = (model && getSessionStatusForModel(model)) ?? dto.status;
|
|
473
474
|
this.changes = revive(dto.changes);
|
|
@@ -483,7 +484,7 @@ class MainThreadChatSessionItem {
|
|
|
483
484
|
}
|
|
484
485
|
}
|
|
485
486
|
isEqual(other) {
|
|
486
|
-
return isEqual(this.resource, other.resource) && this.label === other.label && this.description === other.description && this.status === other.status && this.timing.created === other.timing.created && this.timing.lastRequestStarted === other.timing.lastRequestStarted && this.timing.lastRequestEnded === other.timing.lastRequestEnded && equals(this.changes, other.changes) && equals(this.iconPath, other.iconPath) && stringOrMarkdownEqual(this.badge, other.badge) && stringOrMarkdownEqual(this.tooltip, other.tooltip) && this.archived === other.archived && equals(this.metadata, other.metadata);
|
|
487
|
+
return isEqual(this.resource, other.resource) && this.label === other.label && this.description === other.description && this.status === other.status && this.timing.created === other.timing.created && this.timing.lastRequestStarted === other.timing.lastRequestStarted && this.timing.lastRequestEnded === other.timing.lastRequestEnded && equals(this.changes, other.changes) && equals(this.iconPath, other.iconPath) && stringOrMarkdownEqual(this.badge, other.badge) && stringOrMarkdownEqual(this.tooltip, other.tooltip) && this.archived === other.archived && equals(this.metadata, other.metadata) && isEqual(this.legacyResource, other.legacyResource);
|
|
487
488
|
}
|
|
488
489
|
}
|
|
489
490
|
let MainThreadChatSessions = class MainThreadChatSessions extends Disposable {
|
|
@@ -652,7 +653,7 @@ let MainThreadChatSessions = class MainThreadChatSessions extends Disposable {
|
|
|
652
653
|
const options = {
|
|
653
654
|
title: {
|
|
654
655
|
preferred: originalEditor?.getName() || undefined,
|
|
655
|
-
fallback: ( localize(
|
|
656
|
+
fallback: ( localize(2663, "{0}", contribution?.displayName))
|
|
656
657
|
}
|
|
657
658
|
};
|
|
658
659
|
const newSession = await this._chatSessionsService.getOrCreateChatSession(URI.revive(modifiedResource), CancellationToken.None);
|
|
@@ -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(2664, "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
|
+
2665,
|
|
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(2666, "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(2667, "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);
|
|
@@ -443,6 +443,8 @@ let MainThreadEditorTabs = class MainThreadEditorTabs {
|
|
|
443
443
|
}
|
|
444
444
|
case GroupModelChangeKind.EDITOR_TRANSIENT:
|
|
445
445
|
break;
|
|
446
|
+
case GroupModelChangeKind.EDITORS_SELECTION:
|
|
447
|
+
break;
|
|
446
448
|
case GroupModelChangeKind.EDITOR_MOVE:
|
|
447
449
|
if (isGroupEditorMoveEvent(event) && event.editor && event.editorIndex !== undefined && event.oldEditorIndex !== undefined) {
|
|
448
450
|
this._onDidTabMove(groupId, event.editorIndex, event.oldEditorIndex, event.editor);
|
|
@@ -111,7 +111,7 @@ let MainThreadExtensionService = class MainThreadExtensionService {
|
|
|
111
111
|
this._notificationService.notify({
|
|
112
112
|
severity: Severity.Error,
|
|
113
113
|
message: ( localize(
|
|
114
|
-
|
|
114
|
+
2668,
|
|
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(2669, "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
|
+
2670,
|
|
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
|
+
2671,
|
|
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(2672, "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
|
+
2673,
|
|
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(2674, "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
|
+
2675,
|
|
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
|
+
2676,
|
|
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(2677, "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
|
+
2678,
|
|
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
|
+
2679,
|
|
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
|
+
2680,
|
|
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
|
+
2681,
|
|
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
|
+
2682,
|
|
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
|
+
2683,
|
|
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
|
+
2684,
|
|
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
|
+
2685,
|
|
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
|
+
2686,
|
|
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(2687, "Show &&Preview")),
|
|
154
|
+
cancelButton: ( localize(2688, "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(2689, "&&OK")),
|
|
175
175
|
run: () => Choice.OK
|
|
176
176
|
}, {
|
|
177
|
-
label: ( localize(
|
|
177
|
+
label: ( localize(2687, "Show &&Preview")),
|
|
178
178
|
run: () => Choice.Preview
|
|
179
179
|
}],
|
|
180
180
|
cancelButton: {
|
|
181
|
-
label: ( localize(
|
|
181
|
+
label: ( localize(2688, "Skip Changes")),
|
|
182
182
|
run: () => Choice.Cancel
|
|
183
183
|
},
|
|
184
184
|
checkbox: {
|
|
185
|
-
label: ( localize(
|
|
185
|
+
label: ( localize(2690, "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(2691, "Running 'File Create' participants...");
|
|
215
215
|
case FileOperation.MOVE:
|
|
216
|
-
return localize(
|
|
216
|
+
return localize(2692, "Running 'File Rename' participants...");
|
|
217
217
|
case FileOperation.COPY:
|
|
218
|
-
return localize(
|
|
218
|
+
return localize(2693, "Running 'File Copy' participants...");
|
|
219
219
|
case FileOperation.DELETE:
|
|
220
|
-
return localize(
|
|
220
|
+
return localize(2694, "Running 'File Delete' participants...");
|
|
221
221
|
case FileOperation.WRITE:
|
|
222
|
-
return localize(
|
|
222
|
+
return localize(2695, "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(2696, "Reset choice for 'File operation needs preview'")),
|
|
311
311
|
original: `Reset choice for 'File operation needs preview'`
|
|
312
312
|
},
|
|
313
313
|
f1: true
|
|
@@ -5,6 +5,7 @@ import { VSBuffer } from '@codingame/monaco-vscode-api/vscode/vs/base/common/buf
|
|
|
5
5
|
import { toErrorMessage } from '@codingame/monaco-vscode-api/vscode/vs/base/common/errorMessage';
|
|
6
6
|
import { transformErrorFromSerialization, transformErrorForSerialization } from '@codingame/monaco-vscode-api/vscode/vs/base/common/errors';
|
|
7
7
|
import { Emitter, Event } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
8
|
+
import { equalSets } from '@codingame/monaco-vscode-api/vscode/vs/base/common/collections';
|
|
8
9
|
import { DisposableStore, DisposableMap, Disposable, toDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
9
10
|
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
10
11
|
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
@@ -43,6 +44,15 @@ let MainThreadLanguageModels = class MainThreadLanguageModels {
|
|
|
43
44
|
this._pendingProgress = ( new Map());
|
|
44
45
|
this._ignoredFileProviderRegistrations = ( new DisposableMap());
|
|
45
46
|
this._proxy = ( extHostContext.getProxy(ExtHostContext.ExtHostChatProvider));
|
|
47
|
+
let lastModelIds = ( new Set(this._chatProviderService.getLanguageModelIds()));
|
|
48
|
+
this._store.add(this._chatProviderService.onDidChangeLanguageModels(() => {
|
|
49
|
+
const currentModelIds = ( new Set(this._chatProviderService.getLanguageModelIds()));
|
|
50
|
+
if (equalSets(lastModelIds, currentModelIds)) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
lastModelIds = currentModelIds;
|
|
54
|
+
this._proxy.$onChatModelsChange();
|
|
55
|
+
}));
|
|
46
56
|
}
|
|
47
57
|
dispose() {
|
|
48
58
|
this._lmProviderChange.dispose();
|
|
@@ -178,7 +188,7 @@ let MainThreadLanguageModels = class MainThreadLanguageModels {
|
|
|
178
188
|
if (this._authenticationService.getProviderIds().includes(authProviderId)) {
|
|
179
189
|
return Disposable.None;
|
|
180
190
|
}
|
|
181
|
-
const accountLabel = auth.accountLabel ?? ( localize(
|
|
191
|
+
const accountLabel = auth.accountLabel ?? ( localize(2697, "Language Models"));
|
|
182
192
|
const disposables = ( new DisposableStore());
|
|
183
193
|
const provider = ( new LanguageModelAccessAuthProvider(authProviderId, auth.providerLabel, accountLabel));
|
|
184
194
|
this._authenticationService.registerAuthenticationProvider(authProviderId, provider);
|
|
@@ -261,7 +271,7 @@ class LanguageModelAccessAuthProvider {
|
|
|
261
271
|
}
|
|
262
272
|
confirmation(extensionName, _recreatingSession) {
|
|
263
273
|
return localize(
|
|
264
|
-
|
|
274
|
+
2698,
|
|
265
275
|
"The extension '{0}' wants to access the language models provided by {1}.",
|
|
266
276
|
extensionName,
|
|
267
277
|
this.label
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
2
|
import { URI, UriComponents } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
3
3
|
import { IContextKeyService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service";
|
|
4
|
+
import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
4
5
|
import { IDialogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/common/dialogs.service";
|
|
5
6
|
import { LogLevel } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log";
|
|
6
7
|
import { ITelemetryService } from "@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service";
|
|
8
|
+
import { ISecretStorageService } from "@codingame/monaco-vscode-api/vscode/vs/platform/secrets/common/secrets.service";
|
|
7
9
|
import { IWorkbenchMcpGatewayService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/common/mcpGatewayService.service";
|
|
8
10
|
import { IMcpRegistry } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/common/mcpRegistryTypes.service";
|
|
9
11
|
import { McpCollectionDefinition, McpConnectionState, McpServerDefinition } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/common/mcpTypes";
|
|
@@ -28,6 +30,8 @@ export declare class MainThreadMcp extends Disposable implements MainThreadMcpSh
|
|
|
28
30
|
private readonly _contextKeyService;
|
|
29
31
|
private readonly _telemetryService;
|
|
30
32
|
private readonly _mcpGatewayService;
|
|
33
|
+
private readonly _configurationService;
|
|
34
|
+
private readonly _secretStorageService;
|
|
31
35
|
private _serverIdCounter;
|
|
32
36
|
private readonly _servers;
|
|
33
37
|
private readonly _serverDefinitions;
|
|
@@ -35,7 +39,7 @@ export declare class MainThreadMcp extends Disposable implements MainThreadMcpSh
|
|
|
35
39
|
private readonly _proxy;
|
|
36
40
|
private readonly _collectionDefinitions;
|
|
37
41
|
private readonly _gateways;
|
|
38
|
-
constructor(_extHostContext: IExtHostContext, _mcpRegistry: IMcpRegistry, dialogService: IDialogService, _authenticationService: IAuthenticationService, authenticationMcpServersService: IAuthenticationMcpService, authenticationMCPServerAccessService: IAuthenticationMcpAccessService, authenticationMCPServerUsageService: IAuthenticationMcpUsageService, _dynamicAuthenticationProviderStorageService: IDynamicAuthenticationProviderStorageService, _extensionService: IExtensionService, _contextKeyService: IContextKeyService, _telemetryService: ITelemetryService, _mcpGatewayService: IWorkbenchMcpGatewayService);
|
|
42
|
+
constructor(_extHostContext: IExtHostContext, _mcpRegistry: IMcpRegistry, dialogService: IDialogService, _authenticationService: IAuthenticationService, authenticationMcpServersService: IAuthenticationMcpService, authenticationMCPServerAccessService: IAuthenticationMcpAccessService, authenticationMCPServerUsageService: IAuthenticationMcpUsageService, _dynamicAuthenticationProviderStorageService: IDynamicAuthenticationProviderStorageService, _extensionService: IExtensionService, _contextKeyService: IContextKeyService, _telemetryService: ITelemetryService, _mcpGatewayService: IWorkbenchMcpGatewayService, _configurationService: IConfigurationService, _secretStorageService: ISecretStorageService);
|
|
39
43
|
private _publishServerDefinitions;
|
|
40
44
|
$upsertMcpCollection(collection: McpCollectionDefinition.FromExtHost, serversDto: McpServerDefinition.Serialized[]): void;
|
|
41
45
|
$deleteMcpCollection(collectionId: string): void;
|
|
@@ -44,6 +48,7 @@ export declare class MainThreadMcp extends Disposable implements MainThreadMcpSh
|
|
|
44
48
|
$onDidReceiveMessage(id: number, message: string): void;
|
|
45
49
|
$getTokenForProviderId(id: number, providerId: string, scopes: string[], options?: IMcpAuthenticationOptions): Promise<string | undefined>;
|
|
46
50
|
$getTokenFromServerMetadata(id: number, authDetails: IMcpAuthenticationDetails, { errorOnUserInteraction, forceNewRegistration, clientId }?: IMcpAuthenticationOptions): Promise<string | undefined>;
|
|
51
|
+
private _ensureXaaIssuer;
|
|
47
52
|
private _getSessionForProvider;
|
|
48
53
|
private continueWithIncorrectAccountPrompt;
|
|
49
54
|
private _onDidChangeAuthSessions;
|