@codingame/monaco-vscode-extensions-service-override 10.1.3 → 11.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/assets/{webWorkerExtensionHostIframe.esm.html → webWorkerExtensionHostIframe.html} +5 -12
- package/extensions.js +2 -2
- package/package.json +7 -3
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagementCLI.js +28 -28
- package/vscode/src/vs/workbench/api/browser/mainThreadAuthentication.js +11 -11
- package/vscode/src/vs/workbench/api/browser/mainThreadCLICommands.js +26 -20
- package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents2.js +26 -8
- package/vscode/src/vs/workbench/api/browser/mainThreadComments.js +35 -22
- 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/mainThreadEditor.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadEditorTabs.js +2 -2
- 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 +10 -6
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModelTools.js +3 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModels.js +21 -4
- 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/mainThreadProgress.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadSCM.js +5 -4
- package/vscode/src/vs/workbench/api/browser/mainThreadSaveParticipant.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadTask.js +6 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadTreeViews.js +13 -9
- 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/extensions/browser/webWorkerExtensionHost.js +2 -4
- package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.js +21 -16
- 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
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
2
2
|
import { Emitter } from 'vscode/vscode/vs/base/common/event';
|
|
3
|
-
import {
|
|
3
|
+
import { DisposableStore, DisposableMap, Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
4
4
|
import { URI } from 'vscode/vscode/vs/base/common/uri';
|
|
5
5
|
import { Range } from 'vscode/vscode/vs/editor/common/core/range';
|
|
6
6
|
import { CommentThreadCollapsibleState } from 'vscode/vscode/vs/editor/common/languages';
|
|
7
7
|
import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
|
|
8
8
|
import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
|
|
9
9
|
import { ICommentService } from 'vscode/vscode/vs/workbench/contrib/comments/browser/commentService.service';
|
|
10
|
-
import { CommentsPanel } from 'vscode/vscode/vs/workbench/contrib/comments/browser/commentsView';
|
|
10
|
+
import { CommentsPanel } from '@codingame/monaco-vscode-comments-extensions-common/vscode/vs/workbench/contrib/comments/browser/commentsView';
|
|
11
11
|
import { ExtHostContext, MainContext } from 'vscode/vscode/vs/workbench/api/common/extHost.protocol';
|
|
12
|
-
import { COMMENTS_VIEW_ID, COMMENTS_VIEW_TITLE, COMMENTS_VIEW_STORAGE_ID } from 'vscode/vscode/vs/workbench/contrib/comments/browser/commentsTreeViewer';
|
|
12
|
+
import { COMMENTS_VIEW_ID, COMMENTS_VIEW_TITLE, COMMENTS_VIEW_STORAGE_ID } from '@codingame/monaco-vscode-comments-extensions-common/vscode/vs/workbench/contrib/comments/browser/commentsTreeViewer';
|
|
13
13
|
import { Extensions } from 'vscode/vscode/vs/workbench/common/views';
|
|
14
14
|
import { IViewDescriptorService } from 'vscode/vscode/vs/workbench/common/views.service';
|
|
15
15
|
import { SyncDescriptor } from 'vscode/vscode/vs/platform/instantiation/common/descriptors';
|
|
@@ -19,7 +19,7 @@ import { registerIcon } from 'vscode/vscode/vs/platform/theme/common/iconRegistr
|
|
|
19
19
|
import { localize } from 'vscode/vscode/vs/nls';
|
|
20
20
|
import { Schemas } from 'vscode/vscode/vs/base/common/network';
|
|
21
21
|
import { IViewsService } from 'vscode/vscode/vs/workbench/services/views/common/viewsService.service';
|
|
22
|
-
import { revealCommentThread } from 'vscode/vscode/vs/workbench/contrib/comments/browser/commentsController';
|
|
22
|
+
import { revealCommentThread } from '@codingame/monaco-vscode-comments-extensions-common/vscode/vs/workbench/contrib/comments/browser/commentsController';
|
|
23
23
|
import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
24
24
|
import { IUriIdentityService } from 'vscode/vscode/vs/platform/uriIdentity/common/uriIdentity.service';
|
|
25
25
|
|
|
@@ -71,6 +71,9 @@ class MainThreadCommentThread {
|
|
|
71
71
|
return this._collapsibleState;
|
|
72
72
|
}
|
|
73
73
|
set collapsibleState(newState) {
|
|
74
|
+
if (this.initialCollapsibleState === undefined) {
|
|
75
|
+
this.initialCollapsibleState = newState;
|
|
76
|
+
}
|
|
74
77
|
if (newState !== this._collapsibleState) {
|
|
75
78
|
this._collapsibleState = newState;
|
|
76
79
|
this._onDidChangeCollapsibleState.fire(this._collapsibleState);
|
|
@@ -81,9 +84,6 @@ class MainThreadCommentThread {
|
|
|
81
84
|
}
|
|
82
85
|
set initialCollapsibleState(initialCollapsibleState) {
|
|
83
86
|
this._initialCollapsibleState = initialCollapsibleState;
|
|
84
|
-
if (this.collapsibleState === undefined) {
|
|
85
|
-
this.collapsibleState = this.initialCollapsibleState;
|
|
86
|
-
}
|
|
87
87
|
this._onDidChangeInitialCollapsibleState.fire(initialCollapsibleState);
|
|
88
88
|
}
|
|
89
89
|
get isDisposed() {
|
|
@@ -155,7 +155,7 @@ class MainThreadCommentThread {
|
|
|
155
155
|
this.comments = changes.comments;
|
|
156
156
|
}
|
|
157
157
|
if (modified('collapseState')) {
|
|
158
|
-
this.
|
|
158
|
+
this.collapsibleState = changes.collapseState;
|
|
159
159
|
}
|
|
160
160
|
if (modified('canReply')) {
|
|
161
161
|
this.canReply = changes.canReply;
|
|
@@ -189,6 +189,15 @@ class MainThreadCommentThread {
|
|
|
189
189
|
};
|
|
190
190
|
}
|
|
191
191
|
}
|
|
192
|
+
class CommentThreadWithDisposable {
|
|
193
|
+
constructor(thread) {
|
|
194
|
+
this.thread = thread;
|
|
195
|
+
this.disposableStore = ( (new DisposableStore()));
|
|
196
|
+
}
|
|
197
|
+
dispose() {
|
|
198
|
+
this.disposableStore.dispose();
|
|
199
|
+
}
|
|
200
|
+
}
|
|
192
201
|
class MainThreadCommentController {
|
|
193
202
|
get handle() {
|
|
194
203
|
return this._handle;
|
|
@@ -228,7 +237,7 @@ class MainThreadCommentController {
|
|
|
228
237
|
this._id = _id;
|
|
229
238
|
this._label = _label;
|
|
230
239
|
this._features = _features;
|
|
231
|
-
this._threads = ( (new
|
|
240
|
+
this._threads = ( (new DisposableMap()));
|
|
232
241
|
}
|
|
233
242
|
get activeComment() {
|
|
234
243
|
return this._activeComment;
|
|
@@ -253,7 +262,11 @@ class MainThreadCommentController {
|
|
|
253
262
|
isTemplate,
|
|
254
263
|
editorId
|
|
255
264
|
)));
|
|
256
|
-
|
|
265
|
+
const threadWithDisposable = ( (new CommentThreadWithDisposable(thread)));
|
|
266
|
+
this._threads.set(commentThreadHandle, threadWithDisposable);
|
|
267
|
+
threadWithDisposable.disposableStore.add(thread.onDidChangeCollapsibleState(() => {
|
|
268
|
+
this.proxy.$updateCommentThread(this.handle, thread.commentThreadHandle, { collapseState: thread.collapsibleState });
|
|
269
|
+
}));
|
|
257
270
|
if (thread.isDocumentCommentThread()) {
|
|
258
271
|
this._commentService.updateComments(this._uniqueId, {
|
|
259
272
|
added: [thread],
|
|
@@ -294,7 +307,7 @@ class MainThreadCommentController {
|
|
|
294
307
|
}
|
|
295
308
|
deleteCommentThread(commentThreadHandle) {
|
|
296
309
|
const thread = this.getKnownThread(commentThreadHandle);
|
|
297
|
-
this._threads.
|
|
310
|
+
this._threads.deleteAndDispose(commentThreadHandle);
|
|
298
311
|
thread.dispose();
|
|
299
312
|
if (thread.isDocumentCommentThread()) {
|
|
300
313
|
this._commentService.updateComments(this._uniqueId, {
|
|
@@ -314,11 +327,11 @@ class MainThreadCommentController {
|
|
|
314
327
|
}
|
|
315
328
|
}
|
|
316
329
|
deleteCommentThreadMain(commentThreadId) {
|
|
317
|
-
this._threads.
|
|
330
|
+
for (const { thread } of ( (this._threads.values()))) {
|
|
318
331
|
if (thread.threadId === commentThreadId) {
|
|
319
332
|
this._proxy.$deleteCommentThread(this._handle, thread.commentThreadHandle);
|
|
320
333
|
}
|
|
321
|
-
}
|
|
334
|
+
}
|
|
322
335
|
}
|
|
323
336
|
updateInput(input) {
|
|
324
337
|
const thread = this.activeEditingCommentThread;
|
|
@@ -336,7 +349,7 @@ class MainThreadCommentController {
|
|
|
336
349
|
if (!thread) {
|
|
337
350
|
throw ( (new Error('unknown thread')));
|
|
338
351
|
}
|
|
339
|
-
return thread;
|
|
352
|
+
return thread.thread;
|
|
340
353
|
}
|
|
341
354
|
async getDocumentComments(resource, token) {
|
|
342
355
|
if (resource.scheme === Schemas.vscodeNotebookCell) {
|
|
@@ -354,9 +367,9 @@ class MainThreadCommentController {
|
|
|
354
367
|
const ret = [];
|
|
355
368
|
for (const thread of [...( (this._threads.keys()))]) {
|
|
356
369
|
const commentThread = this._threads.get(thread);
|
|
357
|
-
if (commentThread.resource === ( (resource.toString()))) {
|
|
358
|
-
if (commentThread.isDocumentCommentThread()) {
|
|
359
|
-
ret.push(commentThread);
|
|
370
|
+
if (commentThread.thread.resource === ( (resource.toString()))) {
|
|
371
|
+
if (commentThread.thread.isDocumentCommentThread()) {
|
|
372
|
+
ret.push(commentThread.thread);
|
|
360
373
|
}
|
|
361
374
|
}
|
|
362
375
|
}
|
|
@@ -383,9 +396,9 @@ class MainThreadCommentController {
|
|
|
383
396
|
const ret = [];
|
|
384
397
|
for (const thread of [...( (this._threads.keys()))]) {
|
|
385
398
|
const commentThread = this._threads.get(thread);
|
|
386
|
-
if (commentThread.resource === ( (resource.toString()))) {
|
|
387
|
-
if (!commentThread.isDocumentCommentThread()) {
|
|
388
|
-
ret.push(commentThread);
|
|
399
|
+
if (commentThread.thread.resource === ( (resource.toString()))) {
|
|
400
|
+
if (!commentThread.thread.isDocumentCommentThread()) {
|
|
401
|
+
ret.push(commentThread.thread);
|
|
389
402
|
}
|
|
390
403
|
}
|
|
391
404
|
}
|
|
@@ -401,7 +414,7 @@ class MainThreadCommentController {
|
|
|
401
414
|
getAllComments() {
|
|
402
415
|
const ret = [];
|
|
403
416
|
for (const thread of [...( (this._threads.keys()))]) {
|
|
404
|
-
ret.push(this._threads.get(thread));
|
|
417
|
+
ret.push(this._threads.get(thread).thread);
|
|
405
418
|
}
|
|
406
419
|
return ret;
|
|
407
420
|
}
|
|
@@ -418,7 +431,7 @@ class MainThreadCommentController {
|
|
|
418
431
|
};
|
|
419
432
|
}
|
|
420
433
|
}
|
|
421
|
-
const commentsViewIcon = registerIcon('comments-view-icon', Codicon.commentDiscussion, ( localize(
|
|
434
|
+
const commentsViewIcon = registerIcon('comments-view-icon', Codicon.commentDiscussion, ( localize(4979, 'View icon of the comments view.')));
|
|
422
435
|
let MainThreadComments = class MainThreadComments extends Disposable {
|
|
423
436
|
constructor(extHostContext, _commentService, _viewsService, _viewDescriptorService, _uriIdentityService, _editorService) {
|
|
424
437
|
super();
|
|
@@ -288,7 +288,7 @@ let MainThreadCustomEditorModel = MainThreadCustomEditorModel_1 = class MainThre
|
|
|
288
288
|
if (_editable) {
|
|
289
289
|
this._register(workingCopyService.registerWorkingCopy(this));
|
|
290
290
|
this._register(extensionService.onWillStop(e => {
|
|
291
|
-
e.veto(true, ( localize(
|
|
291
|
+
e.veto(true, ( localize(10047, "A custom editor for '{0}' is open.", this.name)));
|
|
292
292
|
}));
|
|
293
293
|
}
|
|
294
294
|
if (startDirty) {
|
|
@@ -355,7 +355,7 @@ let MainThreadCustomEditorModel = MainThreadCustomEditorModel_1 = class MainThre
|
|
|
355
355
|
this._undoService.pushElement({
|
|
356
356
|
type: 0 ,
|
|
357
357
|
resource: this._editorResource,
|
|
358
|
-
label: label ?? ( localize(
|
|
358
|
+
label: label ?? ( localize(10048, "Edit")),
|
|
359
359
|
code: 'undoredo.customEditorEdit',
|
|
360
360
|
undo: () => this.undo(),
|
|
361
361
|
redo: () => this.redo(),
|
|
@@ -13,7 +13,7 @@ class ExtHostEditSessionIdentityCreateParticipant {
|
|
|
13
13
|
}
|
|
14
14
|
async participate(workspaceFolder, token) {
|
|
15
15
|
const p = ( (new Promise((resolve, reject) => {
|
|
16
|
-
setTimeout(() => reject(( (new Error(( localize(
|
|
16
|
+
setTimeout(() => reject(( (new Error(( localize(4971, "Aborted onWillCreateEditSessionIdentity-event after 10000ms")))))), this.timeout);
|
|
17
17
|
this._proxy.$onWillCreateEditSessionIdentity(workspaceFolder.uri, token, this.timeout).then(resolve, reject);
|
|
18
18
|
})));
|
|
19
19
|
return raceCancellationError(p, token);
|
|
@@ -42,7 +42,7 @@ class MainThreadTextEditorProperties {
|
|
|
42
42
|
let lineNumbers;
|
|
43
43
|
if (codeEditor) {
|
|
44
44
|
const options = codeEditor.getOptions();
|
|
45
|
-
const lineNumbersOpts = options.get(
|
|
45
|
+
const lineNumbersOpts = options.get(69 );
|
|
46
46
|
cursorStyle = options.get(28 );
|
|
47
47
|
lineNumbers = lineNumbersOpts.renderType;
|
|
48
48
|
}
|
|
@@ -11,13 +11,13 @@ import { DiffEditorInput } from 'vscode/vscode/vs/workbench/common/editor/diffEd
|
|
|
11
11
|
import { isGroupEditorMoveEvent } from 'vscode/vscode/vs/workbench/common/editor/editorGroupModel';
|
|
12
12
|
import { SideBySideEditorInput } from 'vscode/vscode/vs/workbench/common/editor/sideBySideEditorInput';
|
|
13
13
|
import { AbstractTextResourceEditorInput } from 'vscode/vscode/vs/workbench/common/editor/textResourceEditorInput';
|
|
14
|
-
import { ChatEditorInput } from 'vscode/vscode/vs/workbench/contrib/chat/browser/chatEditorInput';
|
|
14
|
+
import { ChatEditorInput } from '@codingame/monaco-vscode-chat-extensions-interactive-notebook-quickaccess-search-terminal-common/vscode/vs/workbench/contrib/chat/browser/chatEditorInput';
|
|
15
15
|
import { CustomEditorInput } from 'vscode/vscode/vs/workbench/contrib/customEditor/browser/customEditorInput';
|
|
16
16
|
import { InteractiveEditorInput } from 'vscode/vscode/vs/workbench/contrib/interactive/browser/interactiveEditorInput';
|
|
17
17
|
import { MergeEditorInput } from 'vscode/vscode/vs/workbench/contrib/mergeEditor/browser/mergeEditorInput';
|
|
18
18
|
import { MultiDiffEditorInput } from 'vscode/vscode/vs/workbench/contrib/multiDiffEditor/browser/multiDiffEditorInput';
|
|
19
19
|
import { NotebookEditorInput } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookEditorInput';
|
|
20
|
-
import { TerminalEditorInput } from 'vscode/vscode/vs/workbench/contrib/terminal/browser/terminalEditorInput';
|
|
20
|
+
import { TerminalEditorInput } from '@codingame/monaco-vscode-chat-extensions-notebook-terminal-common/vscode/vs/workbench/contrib/terminal/browser/terminalEditorInput';
|
|
21
21
|
import { WebviewInput } from 'vscode/vscode/vs/workbench/contrib/webviewPanel/browser/webviewEditorInput';
|
|
22
22
|
import { editorGroupToColumn, columnToEditorGroup } from 'vscode/vscode/vs/workbench/services/editor/common/editorGroupColumn';
|
|
23
23
|
import { preferredSideBySideGroupDirection } from 'vscode/vscode/vs/workbench/services/editor/common/editorGroupsService';
|
|
@@ -88,13 +88,13 @@ let MainThreadExtensionService = class MainThreadExtensionService {
|
|
|
88
88
|
this._notificationService.notify({
|
|
89
89
|
severity: Severity$1.Error,
|
|
90
90
|
message: ( localize(
|
|
91
|
-
|
|
91
|
+
4936,
|
|
92
92
|
"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?",
|
|
93
93
|
extName,
|
|
94
94
|
missingInstalledDependency.manifest.displayName || missingInstalledDependency.manifest.name
|
|
95
95
|
)),
|
|
96
96
|
actions: {
|
|
97
|
-
primary: [( (new Action('reload', ( localize(
|
|
97
|
+
primary: [( (new Action('reload', ( localize(4937, "Reload Window")), '', true, () => this._hostService.reload())))]
|
|
98
98
|
}
|
|
99
99
|
});
|
|
100
100
|
}
|
|
@@ -104,7 +104,7 @@ let MainThreadExtensionService = class MainThreadExtensionService {
|
|
|
104
104
|
this._notificationService.notify({
|
|
105
105
|
severity: Severity$1.Error,
|
|
106
106
|
message: ( localize(
|
|
107
|
-
|
|
107
|
+
4938,
|
|
108
108
|
"Cannot activate the '{0}' extension because it depends on the '{1}' extension which is not supported in the current workspace",
|
|
109
109
|
extName,
|
|
110
110
|
missingInstalledDependency.manifest.displayName || missingInstalledDependency.manifest.name
|
|
@@ -115,13 +115,13 @@ let MainThreadExtensionService = class MainThreadExtensionService {
|
|
|
115
115
|
this._notificationService.notify({
|
|
116
116
|
severity: Severity$1.Error,
|
|
117
117
|
message: ( localize(
|
|
118
|
-
|
|
118
|
+
4939,
|
|
119
119
|
"Cannot activate the '{0}' extension because it depends on the '{1}' extension which is not supported in Restricted Mode",
|
|
120
120
|
extName,
|
|
121
121
|
missingInstalledDependency.manifest.displayName || missingInstalledDependency.manifest.name
|
|
122
122
|
)),
|
|
123
123
|
actions: {
|
|
124
|
-
primary: [( (new Action('manageWorkspaceTrust', ( localize(
|
|
124
|
+
primary: [( (new Action('manageWorkspaceTrust', ( localize(4940, "Manage Workspace Trust")), '', true, () => this._commandService.executeCommand('workbench.trust.manage'))))]
|
|
125
125
|
}
|
|
126
126
|
});
|
|
127
127
|
}
|
|
@@ -129,13 +129,13 @@ let MainThreadExtensionService = class MainThreadExtensionService {
|
|
|
129
129
|
this._notificationService.notify({
|
|
130
130
|
severity: Severity$1.Error,
|
|
131
131
|
message: ( localize(
|
|
132
|
-
|
|
132
|
+
4941,
|
|
133
133
|
"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?",
|
|
134
134
|
extName,
|
|
135
135
|
missingInstalledDependency.manifest.displayName || missingInstalledDependency.manifest.name
|
|
136
136
|
)),
|
|
137
137
|
actions: {
|
|
138
|
-
primary: [( (new Action('enable', ( localize(
|
|
138
|
+
primary: [( (new Action('enable', ( localize(4942, "Enable and Reload")), '', true, () => this._extensionEnablementService.setEnablement([missingInstalledDependency], enablementState === 7 ? 9 : 10 )
|
|
139
139
|
.then(() => this._hostService.reload(), e => this._notificationService.error(e)))))]
|
|
140
140
|
}
|
|
141
141
|
});
|
|
@@ -144,7 +144,7 @@ let MainThreadExtensionService = class MainThreadExtensionService {
|
|
|
144
144
|
this._notificationService.notify({
|
|
145
145
|
severity: Severity$1.Error,
|
|
146
146
|
message: ( localize(
|
|
147
|
-
|
|
147
|
+
4943,
|
|
148
148
|
"Cannot activate the '{0}' extension because it depends on the '{1}' extension which is disabled.",
|
|
149
149
|
extName,
|
|
150
150
|
missingInstalledDependency.manifest.displayName || missingInstalledDependency.manifest.name
|
|
@@ -165,21 +165,21 @@ let MainThreadExtensionService = class MainThreadExtensionService {
|
|
|
165
165
|
this._notificationService.notify({
|
|
166
166
|
severity: Severity$1.Error,
|
|
167
167
|
message: ( localize(
|
|
168
|
-
|
|
168
|
+
4944,
|
|
169
169
|
"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?",
|
|
170
170
|
extName,
|
|
171
171
|
dependencyExtension.displayName,
|
|
172
172
|
dependencyExtension.publisherDisplayName
|
|
173
173
|
)),
|
|
174
174
|
actions: {
|
|
175
|
-
primary: [( (new Action('install', ( localize(
|
|
175
|
+
primary: [( (new Action('install', ( localize(4945, "Install and Reload")), '', true, () => this._extensionsWorkbenchService.install(dependencyExtension)
|
|
176
176
|
.then(() => this._hostService.reload(), e => this._notificationService.error(e)))))]
|
|
177
177
|
}
|
|
178
178
|
});
|
|
179
179
|
}
|
|
180
180
|
else {
|
|
181
181
|
this._notificationService.error(( localize(
|
|
182
|
-
|
|
182
|
+
4946,
|
|
183
183
|
"Cannot activate the '{0}' extension because it depends on an unknown '{1}' extension.",
|
|
184
184
|
extName,
|
|
185
185
|
missingDependency
|
|
@@ -71,28 +71,28 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
|
|
|
71
71
|
if (data.extensionNames.length === 1) {
|
|
72
72
|
if (operation === 0 ) {
|
|
73
73
|
message = ( localize(
|
|
74
|
-
|
|
74
|
+
4947,
|
|
75
75
|
"Extension '{0}' wants to make refactoring changes with this file creation",
|
|
76
76
|
data.extensionNames[0]
|
|
77
77
|
));
|
|
78
78
|
}
|
|
79
79
|
else if (operation === 3 ) {
|
|
80
80
|
message = ( localize(
|
|
81
|
-
|
|
81
|
+
4948,
|
|
82
82
|
"Extension '{0}' wants to make refactoring changes with this file copy",
|
|
83
83
|
data.extensionNames[0]
|
|
84
84
|
));
|
|
85
85
|
}
|
|
86
86
|
else if (operation === 2 ) {
|
|
87
87
|
message = ( localize(
|
|
88
|
-
|
|
88
|
+
4949,
|
|
89
89
|
"Extension '{0}' wants to make refactoring changes with this file move",
|
|
90
90
|
data.extensionNames[0]
|
|
91
91
|
));
|
|
92
92
|
}
|
|
93
93
|
else {
|
|
94
94
|
message = ( localize(
|
|
95
|
-
|
|
95
|
+
4950,
|
|
96
96
|
"Extension '{0}' wants to make refactoring changes with this file deletion",
|
|
97
97
|
data.extensionNames[0]
|
|
98
98
|
));
|
|
@@ -101,28 +101,28 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
|
|
|
101
101
|
else {
|
|
102
102
|
if (operation === 0 ) {
|
|
103
103
|
message = ( localize(
|
|
104
|
-
|
|
104
|
+
4951,
|
|
105
105
|
"{0} extensions want to make refactoring changes with this file creation",
|
|
106
106
|
data.extensionNames.length
|
|
107
107
|
));
|
|
108
108
|
}
|
|
109
109
|
else if (operation === 3 ) {
|
|
110
110
|
message = ( localize(
|
|
111
|
-
|
|
111
|
+
4952,
|
|
112
112
|
"{0} extensions want to make refactoring changes with this file copy",
|
|
113
113
|
data.extensionNames.length
|
|
114
114
|
));
|
|
115
115
|
}
|
|
116
116
|
else if (operation === 2 ) {
|
|
117
117
|
message = ( localize(
|
|
118
|
-
|
|
118
|
+
4953,
|
|
119
119
|
"{0} extensions want to make refactoring changes with this file move",
|
|
120
120
|
data.extensionNames.length
|
|
121
121
|
));
|
|
122
122
|
}
|
|
123
123
|
else {
|
|
124
124
|
message = ( localize(
|
|
125
|
-
|
|
125
|
+
4954,
|
|
126
126
|
"{0} extensions want to make refactoring changes with this file deletion",
|
|
127
127
|
data.extensionNames.length
|
|
128
128
|
));
|
|
@@ -132,8 +132,8 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
|
|
|
132
132
|
const { confirmed } = await dialogService.confirm({
|
|
133
133
|
type: Severity$1.Info,
|
|
134
134
|
message,
|
|
135
|
-
primaryButton: ( localize(
|
|
136
|
-
cancelButton: ( localize(
|
|
135
|
+
primaryButton: ( localize(4955, "Show &&Preview")),
|
|
136
|
+
cancelButton: ( localize(4956, "Skip Changes"))
|
|
137
137
|
});
|
|
138
138
|
showPreview = true;
|
|
139
139
|
if (!confirmed) {
|
|
@@ -152,19 +152,19 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
|
|
|
152
152
|
message,
|
|
153
153
|
buttons: [
|
|
154
154
|
{
|
|
155
|
-
label: ( localize(
|
|
155
|
+
label: ( localize(4957, "&&OK")),
|
|
156
156
|
run: () => Choice.OK
|
|
157
157
|
},
|
|
158
158
|
{
|
|
159
|
-
label: ( localize(
|
|
159
|
+
label: ( localize(4955, "Show &&Preview")),
|
|
160
160
|
run: () => Choice.Preview
|
|
161
161
|
}
|
|
162
162
|
],
|
|
163
163
|
cancelButton: {
|
|
164
|
-
label: ( localize(
|
|
164
|
+
label: ( localize(4956, "Skip Changes")),
|
|
165
165
|
run: () => Choice.Cancel
|
|
166
166
|
},
|
|
167
|
-
checkbox: { label: ( localize(
|
|
167
|
+
checkbox: { label: ( localize(4958, "Do not ask me again")) }
|
|
168
168
|
});
|
|
169
169
|
if (result === Choice.Cancel) {
|
|
170
170
|
return;
|
|
@@ -181,15 +181,15 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
|
|
|
181
181
|
_progressLabel(operation) {
|
|
182
182
|
switch (operation) {
|
|
183
183
|
case 0 :
|
|
184
|
-
return ( localize(
|
|
184
|
+
return ( localize(4959, "Running 'File Create' participants..."));
|
|
185
185
|
case 2 :
|
|
186
|
-
return ( localize(
|
|
186
|
+
return ( localize(4960, "Running 'File Rename' participants..."));
|
|
187
187
|
case 3 :
|
|
188
|
-
return ( localize(
|
|
188
|
+
return ( localize(4961, "Running 'File Copy' participants..."));
|
|
189
189
|
case 1 :
|
|
190
|
-
return ( localize(
|
|
190
|
+
return ( localize(4962, "Running 'File Delete' participants..."));
|
|
191
191
|
case 4 :
|
|
192
|
-
return ( localize(
|
|
192
|
+
return ( localize(4963, "Running 'File Write' participants..."));
|
|
193
193
|
}
|
|
194
194
|
}
|
|
195
195
|
});
|
|
@@ -260,7 +260,7 @@ registerAction2(class ResetMemento extends Action2 {
|
|
|
260
260
|
super({
|
|
261
261
|
id: 'files.participants.resetChoice',
|
|
262
262
|
title: {
|
|
263
|
-
value: ( localize(
|
|
263
|
+
value: ( localize(4964, "Reset choice for 'File operation needs preview'")),
|
|
264
264
|
original: `Reset choice for 'File operation needs preview'`
|
|
265
265
|
},
|
|
266
266
|
f1: true
|
|
@@ -430,6 +430,15 @@ let MainThreadLanguageFeatures = MainThreadLanguageFeatures_1 = class MainThread
|
|
|
430
430
|
const commandId = data["o" ];
|
|
431
431
|
const commandIdent = data["n" ];
|
|
432
432
|
const commitChars = data["k" ];
|
|
433
|
+
let command;
|
|
434
|
+
if (commandId) {
|
|
435
|
+
command = {
|
|
436
|
+
$ident: commandIdent,
|
|
437
|
+
id: commandId,
|
|
438
|
+
title: '',
|
|
439
|
+
arguments: commandIdent ? [commandIdent] : data["p" ],
|
|
440
|
+
};
|
|
441
|
+
}
|
|
433
442
|
return {
|
|
434
443
|
label,
|
|
435
444
|
extensionId,
|
|
@@ -445,12 +454,7 @@ let MainThreadLanguageFeatures = MainThreadLanguageFeatures_1 = class MainThread
|
|
|
445
454
|
insertTextRules: data["i" ],
|
|
446
455
|
commitCharacters: commitChars ? Array.from(commitChars) : undefined,
|
|
447
456
|
additionalTextEdits: data["l" ],
|
|
448
|
-
command
|
|
449
|
-
$ident: commandIdent,
|
|
450
|
-
id: commandId,
|
|
451
|
-
title: '',
|
|
452
|
-
arguments: commandIdent ? [commandIdent] : data["p" ],
|
|
453
|
-
} : undefined,
|
|
457
|
+
command,
|
|
454
458
|
_id: data.x,
|
|
455
459
|
};
|
|
456
460
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
2
|
+
import { CancellationToken } from 'vscode/vscode/vs/base/common/cancellation';
|
|
2
3
|
import { Disposable, DisposableMap } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
3
4
|
import { ILanguageModelToolsService } from 'vscode/vscode/vs/workbench/contrib/chat/common/languageModelToolsService.service';
|
|
4
5
|
import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
|
|
@@ -17,7 +18,7 @@ let MainThreadLanguageModelTools = class MainThreadLanguageModelTools extends Di
|
|
|
17
18
|
return Array.from(this._languageModelToolsService.getTools());
|
|
18
19
|
}
|
|
19
20
|
async $invokeTool(dto, token) {
|
|
20
|
-
return await this._languageModelToolsService.invokeTool(dto, (input, token) => this._proxy.$countTokensForInvocation(dto.callId, input, token), token);
|
|
21
|
+
return await this._languageModelToolsService.invokeTool(dto, (input, token) => this._proxy.$countTokensForInvocation(dto.callId, input, token), token ?? CancellationToken.None);
|
|
21
22
|
}
|
|
22
23
|
$countTokensForInvocation(callId, input, token) {
|
|
23
24
|
const fn = this._countTokenCallbacks.get(callId);
|
|
@@ -37,8 +38,7 @@ let MainThreadLanguageModelTools = class MainThreadLanguageModelTools extends Di
|
|
|
37
38
|
this._countTokenCallbacks.delete(dto.callId);
|
|
38
39
|
}
|
|
39
40
|
},
|
|
40
|
-
|
|
41
|
-
provideToolInvocationMessage: (parameters, token) => this._proxy.$provideToolInvocationMessage(id, parameters, token),
|
|
41
|
+
prepareToolInvocation: (parameters, token) => this._proxy.$prepareToolInvocation(id, parameters, token),
|
|
42
42
|
});
|
|
43
43
|
this._tools.set(id, disposable);
|
|
44
44
|
}
|
|
@@ -3,9 +3,10 @@ import { DeferredPromise, AsyncIterableSource } from 'vscode/vscode/vs/base/comm
|
|
|
3
3
|
import { transformErrorFromSerialization, transformErrorForSerialization } from 'vscode/vscode/vs/base/common/errors';
|
|
4
4
|
import { Emitter } from 'vscode/vscode/vs/base/common/event';
|
|
5
5
|
import { DisposableStore, DisposableMap, Disposable, toDisposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
6
|
+
import { URI } from 'vscode/vscode/vs/base/common/uri';
|
|
6
7
|
import { localize } from 'vscode/vscode/vs/nls';
|
|
7
8
|
import { ILogService } from 'vscode/vscode/vs/platform/log/common/log.service';
|
|
8
|
-
import {
|
|
9
|
+
import { ILanguageModelIgnoredFilesService } from 'vscode/vscode/vs/workbench/contrib/chat/common/ignoredFiles.service';
|
|
9
10
|
import { ILanguageModelStatsService } from 'vscode/vscode/vs/workbench/contrib/chat/common/languageModelStats.service';
|
|
10
11
|
import { ILanguageModelsService } from 'vscode/vscode/vs/workbench/contrib/chat/common/languageModels.service';
|
|
11
12
|
import { IAuthenticationAccessService } from 'vscode/vscode/vs/workbench/services/authentication/browser/authenticationAccessService.service';
|
|
@@ -13,18 +14,21 @@ import { INTERNAL_AUTH_PROVIDER_PREFIX } from 'vscode/vscode/vs/workbench/servic
|
|
|
13
14
|
import { IAuthenticationService } from 'vscode/vscode/vs/workbench/services/authentication/common/authentication.service';
|
|
14
15
|
import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
|
|
15
16
|
import { IExtensionService } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions.service';
|
|
17
|
+
import { ExtHostContext, MainContext } from 'vscode/vscode/vs/workbench/api/common/extHost.protocol';
|
|
16
18
|
|
|
17
19
|
let MainThreadLanguageModels = class MainThreadLanguageModels {
|
|
18
|
-
constructor(extHostContext, _chatProviderService, _languageModelStatsService, _logService, _authenticationService, _authenticationAccessService, _extensionService) {
|
|
20
|
+
constructor(extHostContext, _chatProviderService, _languageModelStatsService, _logService, _authenticationService, _authenticationAccessService, _extensionService, _ignoredFilesService) {
|
|
19
21
|
this._chatProviderService = _chatProviderService;
|
|
20
22
|
this._languageModelStatsService = _languageModelStatsService;
|
|
21
23
|
this._logService = _logService;
|
|
22
24
|
this._authenticationService = _authenticationService;
|
|
23
25
|
this._authenticationAccessService = _authenticationAccessService;
|
|
24
26
|
this._extensionService = _extensionService;
|
|
27
|
+
this._ignoredFilesService = _ignoredFilesService;
|
|
25
28
|
this._store = ( (new DisposableStore()));
|
|
26
29
|
this._providerRegistrations = ( (new DisposableMap()));
|
|
27
30
|
this._pendingProgress = ( (new Map()));
|
|
31
|
+
this._ignoredFileProviderRegistrations = ( (new DisposableMap()));
|
|
28
32
|
this._proxy = ( (extHostContext.getProxy(ExtHostContext.ExtHostChatProvider)));
|
|
29
33
|
this._proxy.$acceptChatModelMetadata({ added: ( (_chatProviderService.getLanguageModelIds().map(
|
|
30
34
|
id => ({ identifier: id, metadata: _chatProviderService.lookupLanguageModel(id) })
|
|
@@ -33,6 +37,7 @@ let MainThreadLanguageModels = class MainThreadLanguageModels {
|
|
|
33
37
|
}
|
|
34
38
|
dispose() {
|
|
35
39
|
this._providerRegistrations.dispose();
|
|
40
|
+
this._ignoredFileProviderRegistrations.dispose();
|
|
36
41
|
this._store.dispose();
|
|
37
42
|
}
|
|
38
43
|
$registerLanguageModelProvider(handle, identifier, metadata) {
|
|
@@ -129,7 +134,7 @@ let MainThreadLanguageModels = class MainThreadLanguageModels {
|
|
|
129
134
|
if (this._authenticationService.getProviderIds().includes(authProviderId)) {
|
|
130
135
|
return Disposable.None;
|
|
131
136
|
}
|
|
132
|
-
const accountLabel = auth.accountLabel ?? ( localize(
|
|
137
|
+
const accountLabel = auth.accountLabel ?? ( localize(4934, 'Language Models'));
|
|
133
138
|
const disposables = ( (new DisposableStore()));
|
|
134
139
|
this._authenticationService.registerAuthenticationProvider(authProviderId, ( (new LanguageModelAccessAuthProvider(authProviderId, auth.providerLabel, accountLabel))));
|
|
135
140
|
disposables.add(toDisposable(() => {
|
|
@@ -152,6 +157,17 @@ let MainThreadLanguageModels = class MainThreadLanguageModels {
|
|
|
152
157
|
}));
|
|
153
158
|
return disposables;
|
|
154
159
|
}
|
|
160
|
+
$fileIsIgnored(uri, token) {
|
|
161
|
+
return this._ignoredFilesService.fileIsIgnored(URI.revive(uri), token);
|
|
162
|
+
}
|
|
163
|
+
$registerFileIgnoreProvider(handle) {
|
|
164
|
+
this._ignoredFileProviderRegistrations.set(handle, this._ignoredFilesService.registerIgnoredFileProvider({
|
|
165
|
+
isFileIgnored: async (uri, token) => this._proxy.$isFileIgnored(handle, uri, token)
|
|
166
|
+
}));
|
|
167
|
+
}
|
|
168
|
+
$unregisterFileIgnoreProvider(handle) {
|
|
169
|
+
this._ignoredFileProviderRegistrations.deleteAndDispose(handle);
|
|
170
|
+
}
|
|
155
171
|
};
|
|
156
172
|
MainThreadLanguageModels = __decorate([
|
|
157
173
|
extHostNamedCustomer(MainContext.MainThreadLanguageModels),
|
|
@@ -160,7 +176,8 @@ MainThreadLanguageModels = __decorate([
|
|
|
160
176
|
( (__param(3, ILogService))),
|
|
161
177
|
( (__param(4, IAuthenticationService))),
|
|
162
178
|
( (__param(5, IAuthenticationAccessService))),
|
|
163
|
-
( (__param(6, IExtensionService)))
|
|
179
|
+
( (__param(6, IExtensionService))),
|
|
180
|
+
( (__param(7, ILanguageModelIgnoredFilesService)))
|
|
164
181
|
], MainThreadLanguageModels);
|
|
165
182
|
class LanguageModelAccessAuthProvider {
|
|
166
183
|
constructor(id, label, _accountLabel) {
|
|
@@ -51,13 +51,13 @@ let MainThreadMessageService = class MainThreadMessageService {
|
|
|
51
51
|
};
|
|
52
52
|
}
|
|
53
53
|
if (!source) {
|
|
54
|
-
source = ( localize(
|
|
54
|
+
source = ( localize(4965, "Extension"));
|
|
55
55
|
}
|
|
56
56
|
const secondaryActions = [];
|
|
57
57
|
if (options.source) {
|
|
58
58
|
secondaryActions.push(toAction({
|
|
59
59
|
id: options.source.identifier.value,
|
|
60
|
-
label: ( localize(
|
|
60
|
+
label: ( localize(4966, "Manage Extension")),
|
|
61
61
|
run: () => {
|
|
62
62
|
return this._commandService.executeCommand('_extensions.manage', options.source.identifier.value);
|
|
63
63
|
}
|
|
@@ -93,13 +93,13 @@ let MainThreadMessageService = class MainThreadMessageService {
|
|
|
93
93
|
if (!cancelButton) {
|
|
94
94
|
if (buttons.length > 0) {
|
|
95
95
|
cancelButton = {
|
|
96
|
-
label: ( localize(
|
|
96
|
+
label: ( localize(4967, "Cancel")),
|
|
97
97
|
run: () => undefined
|
|
98
98
|
};
|
|
99
99
|
}
|
|
100
100
|
else {
|
|
101
101
|
cancelButton = {
|
|
102
|
-
label: ( localize(
|
|
102
|
+
label: ( localize(4968, "&&OK")),
|
|
103
103
|
run: () => undefined
|
|
104
104
|
};
|
|
105
105
|
}
|
|
@@ -17,7 +17,7 @@ class ExtHostNotebookDocumentSaveParticipant {
|
|
|
17
17
|
}
|
|
18
18
|
let _warningTimeout;
|
|
19
19
|
const p = ( (new Promise((resolve, reject) => {
|
|
20
|
-
_warningTimeout = setTimeout(() => reject(( (new Error(( localize(
|
|
20
|
+
_warningTimeout = setTimeout(() => reject(( (new Error(( localize(4980, "Aborted onWillSaveNotebookDocument-event after 1750ms")))))), 1750);
|
|
21
21
|
this._proxy.$participateInSave(workingCopy.resource, context.reason, token).then(_ => {
|
|
22
22
|
clearTimeout(_warningTimeout);
|
|
23
23
|
return undefined;
|
|
@@ -30,7 +30,7 @@ let MainThreadProgress = class MainThreadProgress {
|
|
|
30
30
|
const notificationOptions = {
|
|
31
31
|
...options,
|
|
32
32
|
location: 15 ,
|
|
33
|
-
secondaryActions: [( (new ManageExtensionAction(extensionId, ( localize(
|
|
33
|
+
secondaryActions: [( (new ManageExtensionAction(extensionId, ( localize(4969, "Manage Extension")), this._commandService)))]
|
|
34
34
|
};
|
|
35
35
|
options = notificationOptions;
|
|
36
36
|
}
|