@codingame/monaco-vscode-extensions-service-override 15.0.2 → 16.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 +3 -1
- package/package.json +35 -28
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagementCLI.js +33 -29
- package/vscode/src/vs/platform/extensionResourceLoader/browser/extensionResourceLoaderService.d.ts +2 -2
- package/vscode/src/vs/platform/extensionResourceLoader/browser/extensionResourceLoaderService.js +6 -5
- package/vscode/src/vs/platform/remote/common/managedSocket.d.ts +1 -1
- package/vscode/src/vs/platform/remote/common/managedSocket.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadAuthentication.js +10 -10
- package/vscode/src/vs/workbench/api/browser/mainThreadCLICommands.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents2.js +4 -7
- package/vscode/src/vs/workbench/api/browser/mainThreadChatStatus.d.ts +10 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatStatus.js +30 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadComments.d.ts +3 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadComments.js +35 -27
- package/vscode/src/vs/workbench/api/browser/mainThreadCustomEditors.js +4 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadEditSessionIdentityParticipant.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadEditorTabs.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/mainThreadLanguageModels.d.ts +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModels.js +11 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadManagedSockets.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadMcp.d.ts +22 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadMcp.js +166 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadMessageService.js +4 -4
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDocuments.js +2 -1
- 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/mainThreadSaveParticipant.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadTask.d.ts +14 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadTask.js +46 -7
- package/vscode/src/vs/workbench/api/browser/mainThreadTerminalShellIntegration.d.ts +1 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTerminalShellIntegration.js +15 -10
- package/vscode/src/vs/workbench/api/browser/mainThreadTunnelService.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadUriOpeners.js +3 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadUrls.d.ts +5 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadUrls.js +18 -12
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviewPanels.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviews.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadWorkspace.js +6 -6
- package/vscode/src/vs/workbench/api/common/shared/tasks.d.ts +144 -0
- package/vscode/src/vs/workbench/api/common/shared/tasks.js +20 -0
- package/vscode/src/vs/workbench/contrib/customEditor/common/customTextEditorModel.js +1 -1
- package/vscode/src/vs/workbench/contrib/externalUriOpener/common/contributedOpeners.js +1 -1
- package/vscode/src/vs/workbench/services/extensionManagement/browser/extensionBisect.js +23 -23
- package/vscode/src/vs/workbench/services/extensions/browser/extensionService.js +1 -1
- package/vscode/src/vs/workbench/services/extensions/browser/webWorkerExtensionHost.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 +2 -2
- 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/remoteExtensionHost.d.ts +1 -1
- package/vscode/src/vs/workbench/services/extensions/common/remoteExtensionHost.js +1 -1
- /package/{assets → vscode/src/vs/workbench/services/extensions/worker}/webWorkerExtensionHostIframe.html +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
3
|
import { Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
4
|
-
import { DisposableStore, DisposableMap, Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
4
|
+
import { DisposableStore, DisposableMap, Disposable, MutableDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
5
5
|
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
6
6
|
import { Range } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/core/range';
|
|
7
7
|
import { CommentThreadCollapsibleState } from '@codingame/monaco-vscode-api/vscode/vs/editor/common/languages';
|
|
@@ -14,7 +14,7 @@ import { COMMENTS_VIEW_ID, COMMENTS_VIEW_STORAGE_ID, COMMENTS_VIEW_TITLE } from
|
|
|
14
14
|
import { Extensions, ViewContainerLocation } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/views';
|
|
15
15
|
import { IViewDescriptorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/views.service';
|
|
16
16
|
import { SyncDescriptor } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/descriptors';
|
|
17
|
-
import { ViewPaneContainer } from '@codingame/monaco-vscode-
|
|
17
|
+
import { ViewPaneContainer } from '@codingame/monaco-vscode-b1110435-a331-5549-ab1e-aa3d763c3a1f-common/vscode/vs/workbench/browser/parts/views/viewPaneContainer';
|
|
18
18
|
import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
|
|
19
19
|
import { registerIcon } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/iconRegistry';
|
|
20
20
|
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
@@ -423,7 +423,7 @@ class MainThreadCommentController {
|
|
|
423
423
|
};
|
|
424
424
|
}
|
|
425
425
|
}
|
|
426
|
-
const commentsViewIcon = registerIcon('comments-view-icon', Codicon.commentDiscussion, ( localize(
|
|
426
|
+
const commentsViewIcon = registerIcon('comments-view-icon', Codicon.commentDiscussion, ( localize(2374, 'View icon of the comments view.')));
|
|
427
427
|
let MainThreadComments = class MainThreadComments extends Disposable {
|
|
428
428
|
constructor(extHostContext, _commentService, _viewsService, _viewDescriptorService, _uriIdentityService, _editorService) {
|
|
429
429
|
super();
|
|
@@ -435,7 +435,9 @@ let MainThreadComments = class MainThreadComments extends Disposable {
|
|
|
435
435
|
this._handlers = ( new Map());
|
|
436
436
|
this._commentControllers = ( new Map());
|
|
437
437
|
this._activeEditingCommentThreadDisposables = this._register(( new DisposableStore()));
|
|
438
|
-
this._openViewListener =
|
|
438
|
+
this._openViewListener = this._register(( new MutableDisposable()));
|
|
439
|
+
this._onChangeContainerListener = this._register(( new MutableDisposable()));
|
|
440
|
+
this._onChangeContainerLocationListener = this._register(( new MutableDisposable()));
|
|
439
441
|
this._proxy = ( extHostContext.getProxy(ExtHostContext.ExtHostComments));
|
|
440
442
|
this._commentService.unregisterCommentController();
|
|
441
443
|
this._register(this._commentService.onDidChangeActiveEditingCommentThread(async (thread) => {
|
|
@@ -455,11 +457,12 @@ let MainThreadComments = class MainThreadComments extends Disposable {
|
|
|
455
457
|
const provider = ( new MainThreadCommentController(this._proxy, this._commentService, handle, providerId, id, label, {}));
|
|
456
458
|
this._commentService.registerCommentController(providerId, provider);
|
|
457
459
|
this._commentControllers.set(handle, provider);
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
460
|
+
this._register(this._commentService.onResourceHasCommentingRanges(e => {
|
|
461
|
+
this.registerView();
|
|
462
|
+
}));
|
|
463
|
+
this._register(this._commentService.onDidUpdateCommentThreads(e => {
|
|
464
|
+
this.registerView();
|
|
465
|
+
}));
|
|
463
466
|
this._commentService.setWorkspaceComments(String(handle), []);
|
|
464
467
|
}
|
|
465
468
|
$unregisterCommentController(handle) {
|
|
@@ -531,8 +534,9 @@ let MainThreadComments = class MainThreadComments extends Disposable {
|
|
|
531
534
|
}
|
|
532
535
|
thread.collapsibleState = CommentThreadCollapsibleState.Collapsed;
|
|
533
536
|
}
|
|
534
|
-
registerView(
|
|
535
|
-
|
|
537
|
+
registerView() {
|
|
538
|
+
const commentsPanelAlreadyConstructed = !!this._viewDescriptorService.getViewDescriptorById(COMMENTS_VIEW_ID);
|
|
539
|
+
if (!commentsPanelAlreadyConstructed) {
|
|
536
540
|
const VIEW_CONTAINER = ( Registry.as(Extensions.ViewContainersRegistry)).registerViewContainer({
|
|
537
541
|
id: COMMENTS_VIEW_ID,
|
|
538
542
|
title: COMMENTS_VIEW_TITLE,
|
|
@@ -557,6 +561,7 @@ let MainThreadComments = class MainThreadComments extends Disposable {
|
|
|
557
561
|
}
|
|
558
562
|
}], VIEW_CONTAINER);
|
|
559
563
|
}
|
|
564
|
+
this.registerViewListeners(commentsPanelAlreadyConstructed);
|
|
560
565
|
}
|
|
561
566
|
setComments() {
|
|
562
567
|
[...( this._commentControllers.keys())].forEach(handle => {
|
|
@@ -568,13 +573,12 @@ let MainThreadComments = class MainThreadComments extends Disposable {
|
|
|
568
573
|
});
|
|
569
574
|
}
|
|
570
575
|
registerViewOpenedListener() {
|
|
571
|
-
if (!this._openViewListener) {
|
|
572
|
-
this._openViewListener = this._viewsService.onDidChangeViewVisibility(e => {
|
|
576
|
+
if (!this._openViewListener.value) {
|
|
577
|
+
this._openViewListener.value = this._viewsService.onDidChangeViewVisibility(e => {
|
|
573
578
|
if (e.id === COMMENTS_VIEW_ID && e.visible) {
|
|
574
579
|
this.setComments();
|
|
575
580
|
if (this._openViewListener) {
|
|
576
581
|
this._openViewListener.dispose();
|
|
577
|
-
this._openViewListener = null;
|
|
578
582
|
}
|
|
579
583
|
}
|
|
580
584
|
});
|
|
@@ -584,19 +588,23 @@ let MainThreadComments = class MainThreadComments extends Disposable {
|
|
|
584
588
|
if (!commentsPanelAlreadyConstructed) {
|
|
585
589
|
this.registerViewOpenedListener();
|
|
586
590
|
}
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
this.
|
|
598
|
-
|
|
599
|
-
|
|
591
|
+
if (!this._onChangeContainerListener.value) {
|
|
592
|
+
this._onChangeContainerListener.value = this._viewDescriptorService.onDidChangeContainer(e => {
|
|
593
|
+
if (e.views.find(view => view.id === COMMENTS_VIEW_ID)) {
|
|
594
|
+
this.setComments();
|
|
595
|
+
this.registerViewOpenedListener();
|
|
596
|
+
}
|
|
597
|
+
});
|
|
598
|
+
}
|
|
599
|
+
if (!this._onChangeContainerLocationListener.value) {
|
|
600
|
+
this._onChangeContainerLocationListener.value = this._viewDescriptorService.onDidChangeContainerLocation(e => {
|
|
601
|
+
const commentsContainer = this._viewDescriptorService.getViewContainerByViewId(COMMENTS_VIEW_ID);
|
|
602
|
+
if (e.viewContainer.id === commentsContainer?.id) {
|
|
603
|
+
this.setComments();
|
|
604
|
+
this.registerViewOpenedListener();
|
|
605
|
+
}
|
|
606
|
+
});
|
|
607
|
+
}
|
|
600
608
|
}
|
|
601
609
|
getHandler(handle) {
|
|
602
610
|
if (!( this._handlers.has(handle))) {
|
|
@@ -126,7 +126,8 @@ let MainThreadCustomEditors = class MainThreadCustomEditors extends Disposable {
|
|
|
126
126
|
modelRef.dispose();
|
|
127
127
|
return;
|
|
128
128
|
}
|
|
129
|
-
webviewInput.webview.onDidDispose(() => {
|
|
129
|
+
const disposeSub = webviewInput.webview.onDidDispose(() => {
|
|
130
|
+
disposeSub.dispose();
|
|
130
131
|
if (modelRef.object.isDirty()) {
|
|
131
132
|
const sub = modelRef.object.onDidChangeDirty(() => {
|
|
132
133
|
if (!modelRef.object.isDirty()) {
|
|
@@ -301,7 +302,7 @@ let MainThreadCustomEditorModel = MainThreadCustomEditorModel_1 = class MainThre
|
|
|
301
302
|
this._register(workingCopyService.registerWorkingCopy(this));
|
|
302
303
|
this._register(extensionService.onWillStop(e => {
|
|
303
304
|
e.veto(true, ( localize(
|
|
304
|
-
|
|
305
|
+
2375,
|
|
305
306
|
"An extension provided editor for '{0}' is still open that would close otherwise.",
|
|
306
307
|
this.name
|
|
307
308
|
)));
|
|
@@ -369,7 +370,7 @@ let MainThreadCustomEditorModel = MainThreadCustomEditorModel_1 = class MainThre
|
|
|
369
370
|
this._undoService.pushElement({
|
|
370
371
|
type: UndoRedoElementType.Resource,
|
|
371
372
|
resource: this._editorResource,
|
|
372
|
-
label: label ?? ( localize(
|
|
373
|
+
label: label ?? ( localize(2376, "Edit")),
|
|
373
374
|
code: 'undoredo.customEditorEdit',
|
|
374
375
|
undo: () => this.undo(),
|
|
375
376
|
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(2377, "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);
|
|
@@ -16,7 +16,7 @@ import { ChatEditorInput } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-955
|
|
|
16
16
|
import { CustomEditorInput } from '@codingame/monaco-vscode-7f39b6f1-3542-5430-8760-0f404d7a7cee-common/vscode/vs/workbench/contrib/customEditor/browser/customEditorInput';
|
|
17
17
|
import { InteractiveEditorInput } from '@codingame/monaco-vscode-eba0b9b3-174c-5dae-9867-a37810ca1808-common/vscode/vs/workbench/contrib/interactive/browser/interactiveEditorInput';
|
|
18
18
|
import { MergeEditorInput } from '@codingame/monaco-vscode-8ccb7637-50ea-5359-97bf-00015d7fe567-common/vscode/vs/workbench/contrib/mergeEditor/browser/mergeEditorInput';
|
|
19
|
-
import { MultiDiffEditorInput } from '@codingame/monaco-vscode-
|
|
19
|
+
import { MultiDiffEditorInput } from '@codingame/monaco-vscode-1cc4ea0a-c5b6-54ed-bb60-078a99119b55-common/vscode/vs/workbench/contrib/multiDiffEditor/browser/multiDiffEditorInput';
|
|
20
20
|
import { NotebookEditorInput } from '@codingame/monaco-vscode-9b5a5e82-d649-5455-b4bf-ef90d6afd294-common/vscode/vs/workbench/contrib/notebook/common/notebookEditorInput';
|
|
21
21
|
import { TerminalEditorInput } from '@codingame/monaco-vscode-42931eb9-e564-530c-bafc-fa23ab43a070-common/vscode/vs/workbench/contrib/terminal/browser/terminalEditorInput';
|
|
22
22
|
import { WebviewInput } from '@codingame/monaco-vscode-9b5a5e82-d649-5455-b4bf-ef90d6afd294-common/vscode/vs/workbench/contrib/webviewPanel/browser/webviewEditorInput';
|
|
@@ -89,13 +89,13 @@ let MainThreadExtensionService = class MainThreadExtensionService {
|
|
|
89
89
|
this._notificationService.notify({
|
|
90
90
|
severity: Severity.Error,
|
|
91
91
|
message: ( localize(
|
|
92
|
-
|
|
92
|
+
2378,
|
|
93
93
|
"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?",
|
|
94
94
|
extName,
|
|
95
95
|
missingInstalledDependency.manifest.displayName || missingInstalledDependency.manifest.name
|
|
96
96
|
)),
|
|
97
97
|
actions: {
|
|
98
|
-
primary: [( new Action('reload', ( localize(
|
|
98
|
+
primary: [( new Action('reload', ( localize(2379, "Reload Window")), '', true, () => this._hostService.reload()))]
|
|
99
99
|
}
|
|
100
100
|
});
|
|
101
101
|
}
|
|
@@ -105,7 +105,7 @@ let MainThreadExtensionService = class MainThreadExtensionService {
|
|
|
105
105
|
this._notificationService.notify({
|
|
106
106
|
severity: Severity.Error,
|
|
107
107
|
message: ( localize(
|
|
108
|
-
|
|
108
|
+
2380,
|
|
109
109
|
"Cannot activate the '{0}' extension because it depends on the '{1}' extension which is not supported in the current workspace",
|
|
110
110
|
extName,
|
|
111
111
|
missingInstalledDependency.manifest.displayName || missingInstalledDependency.manifest.name
|
|
@@ -116,13 +116,13 @@ let MainThreadExtensionService = class MainThreadExtensionService {
|
|
|
116
116
|
this._notificationService.notify({
|
|
117
117
|
severity: Severity.Error,
|
|
118
118
|
message: ( localize(
|
|
119
|
-
|
|
119
|
+
2381,
|
|
120
120
|
"Cannot activate the '{0}' extension because it depends on the '{1}' extension which is not supported in Restricted Mode",
|
|
121
121
|
extName,
|
|
122
122
|
missingInstalledDependency.manifest.displayName || missingInstalledDependency.manifest.name
|
|
123
123
|
)),
|
|
124
124
|
actions: {
|
|
125
|
-
primary: [( new Action('manageWorkspaceTrust', ( localize(
|
|
125
|
+
primary: [( new Action('manageWorkspaceTrust', ( localize(2382, "Manage Workspace Trust")), '', true, () => this._commandService.executeCommand('workbench.trust.manage')))]
|
|
126
126
|
}
|
|
127
127
|
});
|
|
128
128
|
}
|
|
@@ -130,13 +130,13 @@ let MainThreadExtensionService = class MainThreadExtensionService {
|
|
|
130
130
|
this._notificationService.notify({
|
|
131
131
|
severity: Severity.Error,
|
|
132
132
|
message: ( localize(
|
|
133
|
-
|
|
133
|
+
2383,
|
|
134
134
|
"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?",
|
|
135
135
|
extName,
|
|
136
136
|
missingInstalledDependency.manifest.displayName || missingInstalledDependency.manifest.name
|
|
137
137
|
)),
|
|
138
138
|
actions: {
|
|
139
|
-
primary: [( new Action('enable', ( localize(
|
|
139
|
+
primary: [( new Action('enable', ( localize(2384, "Enable and Reload")), '', true, () => this._extensionEnablementService.setEnablement([missingInstalledDependency], enablementState === EnablementState.DisabledGlobally ? EnablementState.EnabledGlobally : EnablementState.EnabledWorkspace)
|
|
140
140
|
.then(() => this._hostService.reload(), e => this._notificationService.error(e))))]
|
|
141
141
|
}
|
|
142
142
|
});
|
|
@@ -145,7 +145,7 @@ let MainThreadExtensionService = class MainThreadExtensionService {
|
|
|
145
145
|
this._notificationService.notify({
|
|
146
146
|
severity: Severity.Error,
|
|
147
147
|
message: ( localize(
|
|
148
|
-
|
|
148
|
+
2385,
|
|
149
149
|
"Cannot activate the '{0}' extension because it depends on the '{1}' extension which is disabled.",
|
|
150
150
|
extName,
|
|
151
151
|
missingInstalledDependency.manifest.displayName || missingInstalledDependency.manifest.name
|
|
@@ -166,21 +166,21 @@ let MainThreadExtensionService = class MainThreadExtensionService {
|
|
|
166
166
|
this._notificationService.notify({
|
|
167
167
|
severity: Severity.Error,
|
|
168
168
|
message: ( localize(
|
|
169
|
-
|
|
169
|
+
2386,
|
|
170
170
|
"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?",
|
|
171
171
|
extName,
|
|
172
172
|
dependencyExtension.displayName,
|
|
173
173
|
dependencyExtension.publisherDisplayName
|
|
174
174
|
)),
|
|
175
175
|
actions: {
|
|
176
|
-
primary: [( new Action('install', ( localize(
|
|
176
|
+
primary: [( new Action('install', ( localize(2387, "Install and Reload")), '', true, () => this._extensionsWorkbenchService.install(dependencyExtension)
|
|
177
177
|
.then(() => this._hostService.reload(), e => this._notificationService.error(e))))]
|
|
178
178
|
}
|
|
179
179
|
});
|
|
180
180
|
}
|
|
181
181
|
else {
|
|
182
182
|
this._notificationService.error(( localize(
|
|
183
|
-
|
|
183
|
+
2388,
|
|
184
184
|
"Cannot activate the '{0}' extension because it depends on an unknown '{1}' extension.",
|
|
185
185
|
extName,
|
|
186
186
|
missingDependency
|
|
@@ -75,28 +75,28 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
|
|
|
75
75
|
if (data.extensionNames.length === 1) {
|
|
76
76
|
if (operation === FileOperation.CREATE) {
|
|
77
77
|
message = ( localize(
|
|
78
|
-
|
|
78
|
+
2389,
|
|
79
79
|
"Extension '{0}' wants to make refactoring changes with this file creation",
|
|
80
80
|
data.extensionNames[0]
|
|
81
81
|
));
|
|
82
82
|
}
|
|
83
83
|
else if (operation === FileOperation.COPY) {
|
|
84
84
|
message = ( localize(
|
|
85
|
-
|
|
85
|
+
2390,
|
|
86
86
|
"Extension '{0}' wants to make refactoring changes with this file copy",
|
|
87
87
|
data.extensionNames[0]
|
|
88
88
|
));
|
|
89
89
|
}
|
|
90
90
|
else if (operation === FileOperation.MOVE) {
|
|
91
91
|
message = ( localize(
|
|
92
|
-
|
|
92
|
+
2391,
|
|
93
93
|
"Extension '{0}' wants to make refactoring changes with this file move",
|
|
94
94
|
data.extensionNames[0]
|
|
95
95
|
));
|
|
96
96
|
}
|
|
97
97
|
else {
|
|
98
98
|
message = ( localize(
|
|
99
|
-
|
|
99
|
+
2392,
|
|
100
100
|
"Extension '{0}' wants to make refactoring changes with this file deletion",
|
|
101
101
|
data.extensionNames[0]
|
|
102
102
|
));
|
|
@@ -105,28 +105,28 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
|
|
|
105
105
|
else {
|
|
106
106
|
if (operation === FileOperation.CREATE) {
|
|
107
107
|
message = ( localize(
|
|
108
|
-
|
|
108
|
+
2393,
|
|
109
109
|
"{0} extensions want to make refactoring changes with this file creation",
|
|
110
110
|
data.extensionNames.length
|
|
111
111
|
));
|
|
112
112
|
}
|
|
113
113
|
else if (operation === FileOperation.COPY) {
|
|
114
114
|
message = ( localize(
|
|
115
|
-
|
|
115
|
+
2394,
|
|
116
116
|
"{0} extensions want to make refactoring changes with this file copy",
|
|
117
117
|
data.extensionNames.length
|
|
118
118
|
));
|
|
119
119
|
}
|
|
120
120
|
else if (operation === FileOperation.MOVE) {
|
|
121
121
|
message = ( localize(
|
|
122
|
-
|
|
122
|
+
2395,
|
|
123
123
|
"{0} extensions want to make refactoring changes with this file move",
|
|
124
124
|
data.extensionNames.length
|
|
125
125
|
));
|
|
126
126
|
}
|
|
127
127
|
else {
|
|
128
128
|
message = ( localize(
|
|
129
|
-
|
|
129
|
+
2396,
|
|
130
130
|
"{0} extensions want to make refactoring changes with this file deletion",
|
|
131
131
|
data.extensionNames.length
|
|
132
132
|
));
|
|
@@ -136,8 +136,8 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
|
|
|
136
136
|
const { confirmed } = await dialogService.confirm({
|
|
137
137
|
type: Severity.Info,
|
|
138
138
|
message,
|
|
139
|
-
primaryButton: ( localize(
|
|
140
|
-
cancelButton: ( localize(
|
|
139
|
+
primaryButton: ( localize(2397, "Show &&Preview")),
|
|
140
|
+
cancelButton: ( localize(2398, "Skip Changes"))
|
|
141
141
|
});
|
|
142
142
|
showPreview = true;
|
|
143
143
|
if (!confirmed) {
|
|
@@ -156,19 +156,19 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
|
|
|
156
156
|
message,
|
|
157
157
|
buttons: [
|
|
158
158
|
{
|
|
159
|
-
label: ( localize(
|
|
159
|
+
label: ( localize(2399, "&&OK")),
|
|
160
160
|
run: () => Choice.OK
|
|
161
161
|
},
|
|
162
162
|
{
|
|
163
|
-
label: ( localize(
|
|
163
|
+
label: ( localize(2397, "Show &&Preview")),
|
|
164
164
|
run: () => Choice.Preview
|
|
165
165
|
}
|
|
166
166
|
],
|
|
167
167
|
cancelButton: {
|
|
168
|
-
label: ( localize(
|
|
168
|
+
label: ( localize(2398, "Skip Changes")),
|
|
169
169
|
run: () => Choice.Cancel
|
|
170
170
|
},
|
|
171
|
-
checkbox: { label: ( localize(
|
|
171
|
+
checkbox: { label: ( localize(2400, "Do not ask me again")) }
|
|
172
172
|
});
|
|
173
173
|
if (result === Choice.Cancel) {
|
|
174
174
|
return;
|
|
@@ -185,15 +185,15 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
|
|
|
185
185
|
_progressLabel(operation) {
|
|
186
186
|
switch (operation) {
|
|
187
187
|
case FileOperation.CREATE:
|
|
188
|
-
return localize(
|
|
188
|
+
return localize(2401, "Running 'File Create' participants...");
|
|
189
189
|
case FileOperation.MOVE:
|
|
190
|
-
return localize(
|
|
190
|
+
return localize(2402, "Running 'File Rename' participants...");
|
|
191
191
|
case FileOperation.COPY:
|
|
192
|
-
return localize(
|
|
192
|
+
return localize(2403, "Running 'File Copy' participants...");
|
|
193
193
|
case FileOperation.DELETE:
|
|
194
|
-
return localize(
|
|
194
|
+
return localize(2404, "Running 'File Delete' participants...");
|
|
195
195
|
case FileOperation.WRITE:
|
|
196
|
-
return localize(
|
|
196
|
+
return localize(2405, "Running 'File Write' participants...");
|
|
197
197
|
}
|
|
198
198
|
}
|
|
199
199
|
});
|
|
@@ -264,7 +264,7 @@ registerAction2(class ResetMemento extends Action2 {
|
|
|
264
264
|
super({
|
|
265
265
|
id: 'files.participants.resetChoice',
|
|
266
266
|
title: {
|
|
267
|
-
value: ( localize(
|
|
267
|
+
value: ( localize(2406, "Reset choice for 'File operation needs preview'")),
|
|
268
268
|
original: `Reset choice for 'File operation needs preview'`
|
|
269
269
|
},
|
|
270
270
|
f1: true
|
|
@@ -11,6 +11,7 @@ import { IAuthenticationAccessService } from "@codingame/monaco-vscode-api/vscod
|
|
|
11
11
|
import { IAuthenticationService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/authentication/common/authentication.service";
|
|
12
12
|
import { IExtHostContext } from "../../services/extensions/common/extHostCustomers.js";
|
|
13
13
|
import { IExtensionService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions.service";
|
|
14
|
+
import { SerializableObjectWithBuffers } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/proxyIdentifier";
|
|
14
15
|
import { MainThreadLanguageModelsShape } from "@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol";
|
|
15
16
|
export declare class MainThreadLanguageModels implements MainThreadLanguageModelsShape {
|
|
16
17
|
private readonly _chatProviderService;
|
|
@@ -33,7 +34,7 @@ export declare class MainThreadLanguageModels implements MainThreadLanguageModel
|
|
|
33
34
|
$unregisterProvider(handle: number): void;
|
|
34
35
|
$selectChatModels(selector: ILanguageModelChatSelector): Promise<string[]>;
|
|
35
36
|
$whenLanguageModelChatRequestMade(identifier: string, extensionId: ExtensionIdentifier, participant?: string | undefined, tokenCount?: number | undefined): void;
|
|
36
|
-
$tryStartChatRequest(extension: ExtensionIdentifier, providerId: string, requestId: number, messages: IChatMessage[]
|
|
37
|
+
$tryStartChatRequest(extension: ExtensionIdentifier, providerId: string, requestId: number, messages: SerializableObjectWithBuffers<IChatMessage[]>, options: {}, token: CancellationToken): Promise<any>;
|
|
37
38
|
$countTokens(provider: string, value: string | IChatMessage, token: CancellationToken): Promise<number>;
|
|
38
39
|
private _registerAuthenticationProvider;
|
|
39
40
|
$fileIsIgnored(uri: UriComponents, token: CancellationToken): Promise<boolean>;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
|
|
2
2
|
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
3
|
import { DeferredPromise, AsyncIterableSource } from '@codingame/monaco-vscode-api/vscode/vs/base/common/async';
|
|
4
|
+
import { VSBuffer } from '@codingame/monaco-vscode-api/vscode/vs/base/common/buffer';
|
|
4
5
|
import { transformErrorFromSerialization, transformErrorForSerialization } from '@codingame/monaco-vscode-api/vscode/vs/base/common/errors';
|
|
5
6
|
import { Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
6
7
|
import { DisposableStore, DisposableMap, Disposable, toDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
7
8
|
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
8
9
|
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
9
10
|
import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
|
|
11
|
+
import { resizeImage } from '@codingame/monaco-vscode-9a6d8b6c-ad4c-5ea3-9558-f43d6dc4c0ad-common/vscode/vs/workbench/contrib/chat/browser/imageUtils';
|
|
10
12
|
import { ILanguageModelIgnoredFilesService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/ignoredFiles.service';
|
|
11
13
|
import { ILanguageModelStatsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModelStats.service';
|
|
12
14
|
import { ILanguageModelsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/languageModels.service';
|
|
@@ -15,6 +17,7 @@ import { INTERNAL_AUTH_PROVIDER_PREFIX } from '@codingame/monaco-vscode-api/vsco
|
|
|
15
17
|
import { IAuthenticationService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/authentication/common/authentication.service';
|
|
16
18
|
import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
|
|
17
19
|
import { IExtensionService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions.service';
|
|
20
|
+
import { SerializableObjectWithBuffers } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/proxyIdentifier';
|
|
18
21
|
import { ExtHostContext, MainContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol';
|
|
19
22
|
import { LanguageModelError } from '@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHostTypes';
|
|
20
23
|
|
|
@@ -52,7 +55,12 @@ let MainThreadLanguageModels = class MainThreadLanguageModels {
|
|
|
52
55
|
const stream = ( new AsyncIterableSource());
|
|
53
56
|
try {
|
|
54
57
|
this._pendingProgress.set(requestId, { defer, stream });
|
|
55
|
-
await
|
|
58
|
+
await Promise.all(( messages.flatMap(msg => msg.content)
|
|
59
|
+
.filter(part => part.type === 'image_url')
|
|
60
|
+
.map(async (part) => {
|
|
61
|
+
part.value.data = VSBuffer.wrap(await resizeImage(part.value.data.buffer));
|
|
62
|
+
})));
|
|
63
|
+
await this._proxy.$startChatRequest(handle, requestId, from, ( new SerializableObjectWithBuffers(messages)), options, token);
|
|
56
64
|
}
|
|
57
65
|
catch (err) {
|
|
58
66
|
this._pendingProgress.delete(requestId);
|
|
@@ -108,7 +116,7 @@ let MainThreadLanguageModels = class MainThreadLanguageModels {
|
|
|
108
116
|
this._logService.trace('[CHAT] request STARTED', extension.value, requestId);
|
|
109
117
|
let response;
|
|
110
118
|
try {
|
|
111
|
-
response = await this._chatProviderService.sendChatRequest(providerId, extension, messages, options, token);
|
|
119
|
+
response = await this._chatProviderService.sendChatRequest(providerId, extension, messages.value, options, token);
|
|
112
120
|
}
|
|
113
121
|
catch (err) {
|
|
114
122
|
this._logService.error('[CHAT] request FAILED', extension.value, requestId, err);
|
|
@@ -143,7 +151,7 @@ let MainThreadLanguageModels = class MainThreadLanguageModels {
|
|
|
143
151
|
if (this._authenticationService.getProviderIds().includes(authProviderId)) {
|
|
144
152
|
return Disposable.None;
|
|
145
153
|
}
|
|
146
|
-
const accountLabel = auth.accountLabel ?? ( localize(
|
|
154
|
+
const accountLabel = auth.accountLabel ?? ( localize(2407, 'Language Models'));
|
|
147
155
|
const disposables = ( new DisposableStore());
|
|
148
156
|
this._authenticationService.registerAuthenticationProvider(authProviderId, ( new LanguageModelAccessAuthProvider(authProviderId, auth.providerLabel, accountLabel)));
|
|
149
157
|
disposables.add(toDisposable(() => {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
3
|
import { Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
4
4
|
import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
5
|
-
import { SocketCloseEventType } from '@codingame/monaco-vscode-
|
|
5
|
+
import { SocketCloseEventType } from '@codingame/monaco-vscode-4a3ac544-9a61-534c-88df-756262793ef7-common/vscode/vs/base/parts/ipc/common/ipc.net';
|
|
6
6
|
import { ManagedSocket, connectManagedSocket } from '../../../platform/remote/common/managedSocket.js';
|
|
7
7
|
import { RemoteConnectionType } from '@codingame/monaco-vscode-api/vscode/vs/platform/remote/common/remoteAuthorityResolver';
|
|
8
8
|
import { IRemoteSocketFactoryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/remote/common/remoteSocketFactoryService.service';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
|
+
import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
|
|
3
|
+
import { LogLevel } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log";
|
|
4
|
+
import { IMcpRegistry } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/common/mcpRegistryTypes.service";
|
|
5
|
+
import { McpCollectionDefinition, McpConnectionState, McpServerDefinition } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/common/mcpTypes";
|
|
6
|
+
import { IExtHostContext } from "../../services/extensions/common/extHostCustomers.js";
|
|
7
|
+
import { MainThreadMcpShape } from "@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol";
|
|
8
|
+
export declare class MainThreadMcp extends Disposable implements MainThreadMcpShape {
|
|
9
|
+
private readonly _extHostContext;
|
|
10
|
+
private readonly _mcpRegistry;
|
|
11
|
+
private _serverIdCounter;
|
|
12
|
+
private readonly _servers;
|
|
13
|
+
private readonly _collectionDefinitions;
|
|
14
|
+
private readonly _mcpEnabled;
|
|
15
|
+
constructor(_extHostContext: IExtHostContext, _mcpRegistry: IMcpRegistry, configurationService: IConfigurationService);
|
|
16
|
+
$upsertMcpCollection(collection: McpCollectionDefinition.FromExtHost, serversDto: McpServerDefinition.Serialized[]): void;
|
|
17
|
+
$deleteMcpCollection(collectionId: string): void;
|
|
18
|
+
$onDidChangeState(id: number, update: McpConnectionState): void;
|
|
19
|
+
$onDidPublishLog(id: number, level: LogLevel, log: string): void;
|
|
20
|
+
$onDidReceiveMessage(id: number, message: string): void;
|
|
21
|
+
dispose(): void;
|
|
22
|
+
}
|