@codingame/monaco-vscode-extensions-service-override 3.2.2 → 4.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/extensions.js +1 -82
- package/override/vs/platform/dialogs/common/dialogs.js +2 -0
- package/package.json +9 -9
- package/vscode/src/vs/base/common/console.js +3 -0
- package/vscode/src/vs/workbench/api/browser/extensionHost.contribution.js +104 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadAuthentication.js +75 -48
- package/vscode/src/vs/workbench/api/browser/mainThreadChat.js +0 -13
- package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents2.js +35 -31
- package/vscode/src/vs/workbench/api/browser/mainThreadCodeInsets.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadComments.js +23 -8
- package/vscode/src/vs/workbench/api/browser/mainThreadCustomEditors.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadDebugService.js +33 -22
- package/vscode/src/vs/workbench/api/browser/mainThreadEditorTabs.js +21 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadExtensionService.js +7 -7
- package/vscode/src/vs/workbench/api/browser/mainThreadFileSystemEventService.js +5 -10
- package/vscode/src/vs/workbench/api/browser/mainThreadInlineChat.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageFeatures.js +47 -22
- package/vscode/src/vs/workbench/api/browser/{mainThreadChatProvider.js → mainThreadLanguageModels.js} +25 -41
- package/vscode/src/vs/workbench/api/browser/mainThreadQuickDiff.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadSCM.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadSearch.js +27 -5
- package/vscode/src/vs/workbench/api/browser/mainThreadShare.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadTerminalService.js +1 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTerminalShellIntegration.js +51 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTesting.js +39 -15
- package/vscode/src/vs/workbench/contrib/customEditor/common/customTextEditorModel.js +3 -0
- package/vscode/src/vs/workbench/services/extensions/browser/extensionService.js +1 -0
- package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.js +13 -2
- /package/vscode/src/vs/workbench/api/browser/{mainThreadProfilContentHandlers.js → mainThreadProfileContentHandlers.js} +0 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { __decorate, __param } from '../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
+
import { getWindow } from 'vscode/vscode/vs/base/browser/dom';
|
|
2
3
|
import { DisposableStore } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
3
4
|
import { isEqual } from 'vscode/vscode/vs/base/common/resources';
|
|
4
5
|
import { URI } from 'vscode/vscode/vs/base/common/uri';
|
|
@@ -20,7 +21,7 @@ class EditorWebviewZone {
|
|
|
20
21
|
this.afterColumn = 1;
|
|
21
22
|
this.heightInLines = height;
|
|
22
23
|
editor.changeViewZones(accessor => this._id = accessor.addZone(this));
|
|
23
|
-
webview.mountTo(this.domNode);
|
|
24
|
+
webview.mountTo(this.domNode, getWindow(editor.getDomNode()));
|
|
24
25
|
}
|
|
25
26
|
dispose() {
|
|
26
27
|
this.editor.changeViewZones(accessor => this._id && accessor.removeZone(this._id));
|
|
@@ -93,6 +93,13 @@ class MainThreadCommentThread {
|
|
|
93
93
|
this._state = newState;
|
|
94
94
|
this._onDidChangeState.fire(this._state);
|
|
95
95
|
}
|
|
96
|
+
get applicability() {
|
|
97
|
+
return this._applicability;
|
|
98
|
+
}
|
|
99
|
+
set applicability(value) {
|
|
100
|
+
this._applicability = value;
|
|
101
|
+
this._onDidChangeApplicability.fire(value);
|
|
102
|
+
}
|
|
96
103
|
get isTemplate() {
|
|
97
104
|
return this._isTemplate;
|
|
98
105
|
}
|
|
@@ -116,6 +123,8 @@ class MainThreadCommentThread {
|
|
|
116
123
|
this.onDidChangeCollapsibleState = this._onDidChangeCollapsibleState.event;
|
|
117
124
|
this._onDidChangeInitialCollapsibleState = ( new Emitter());
|
|
118
125
|
this.onDidChangeInitialCollapsibleState = this._onDidChangeInitialCollapsibleState.event;
|
|
126
|
+
this._onDidChangeApplicability = ( new Emitter());
|
|
127
|
+
this.onDidChangeApplicability = this._onDidChangeApplicability.event;
|
|
119
128
|
this._onDidChangeState = ( new Emitter());
|
|
120
129
|
this.onDidChangeState = this._onDidChangeState.event;
|
|
121
130
|
this._isDisposed = false;
|
|
@@ -146,6 +155,9 @@ class MainThreadCommentThread {
|
|
|
146
155
|
if (modified('state')) {
|
|
147
156
|
this.state = changes.state;
|
|
148
157
|
}
|
|
158
|
+
if (modified('applicability')) {
|
|
159
|
+
this.applicability = changes.applicability;
|
|
160
|
+
}
|
|
149
161
|
if (modified('isTemplate')) {
|
|
150
162
|
this._isTemplate = changes.isTemplate;
|
|
151
163
|
}
|
|
@@ -195,6 +207,9 @@ class MainThreadCommentController {
|
|
|
195
207
|
get features() {
|
|
196
208
|
return this._features;
|
|
197
209
|
}
|
|
210
|
+
get owner() {
|
|
211
|
+
return this._id;
|
|
212
|
+
}
|
|
198
213
|
constructor(_proxy, _commentService, _handle, _uniqueId, _id, _label, _features) {
|
|
199
214
|
this._proxy = _proxy;
|
|
200
215
|
this._commentService = _commentService;
|
|
@@ -288,8 +303,8 @@ class MainThreadCommentController {
|
|
|
288
303
|
thread.input = commentInput;
|
|
289
304
|
}
|
|
290
305
|
}
|
|
291
|
-
updateCommentingRanges() {
|
|
292
|
-
this._commentService.updateCommentingRanges(this._uniqueId);
|
|
306
|
+
updateCommentingRanges(resourceHints) {
|
|
307
|
+
this._commentService.updateCommentingRanges(this._uniqueId, resourceHints);
|
|
293
308
|
}
|
|
294
309
|
getKnownThread(commentThreadHandle) {
|
|
295
310
|
const thread = this._threads.get(commentThreadHandle);
|
|
@@ -301,7 +316,7 @@ class MainThreadCommentController {
|
|
|
301
316
|
async getDocumentComments(resource, token) {
|
|
302
317
|
if (resource.scheme === Schemas.vscodeNotebookCell) {
|
|
303
318
|
return {
|
|
304
|
-
|
|
319
|
+
uniqueOwner: this._uniqueId,
|
|
305
320
|
label: this.label,
|
|
306
321
|
threads: [],
|
|
307
322
|
commentingRanges: {
|
|
@@ -320,7 +335,7 @@ class MainThreadCommentController {
|
|
|
320
335
|
}
|
|
321
336
|
const commentingRanges = await this._proxy.$provideCommentingRanges(this.handle, resource, token);
|
|
322
337
|
return {
|
|
323
|
-
|
|
338
|
+
uniqueOwner: this._uniqueId,
|
|
324
339
|
label: this.label,
|
|
325
340
|
threads: ret,
|
|
326
341
|
commentingRanges: {
|
|
@@ -333,7 +348,7 @@ class MainThreadCommentController {
|
|
|
333
348
|
async getNotebookComments(resource, token) {
|
|
334
349
|
if (resource.scheme !== Schemas.vscodeNotebookCell) {
|
|
335
350
|
return {
|
|
336
|
-
|
|
351
|
+
uniqueOwner: this._uniqueId,
|
|
337
352
|
label: this.label,
|
|
338
353
|
threads: []
|
|
339
354
|
};
|
|
@@ -346,7 +361,7 @@ class MainThreadCommentController {
|
|
|
346
361
|
}
|
|
347
362
|
}
|
|
348
363
|
return {
|
|
349
|
-
|
|
364
|
+
uniqueOwner: this._uniqueId,
|
|
350
365
|
label: this.label,
|
|
351
366
|
threads: ret
|
|
352
367
|
};
|
|
@@ -454,12 +469,12 @@ let MainThreadComments = class MainThreadComments extends Disposable {
|
|
|
454
469
|
}
|
|
455
470
|
return provider.deleteCommentThread(commentThreadHandle);
|
|
456
471
|
}
|
|
457
|
-
$updateCommentingRanges(handle) {
|
|
472
|
+
$updateCommentingRanges(handle, resourceHints) {
|
|
458
473
|
const provider = this._commentControllers.get(handle);
|
|
459
474
|
if (!provider) {
|
|
460
475
|
return;
|
|
461
476
|
}
|
|
462
|
-
provider.updateCommentingRanges();
|
|
477
|
+
provider.updateCommentingRanges(resourceHints);
|
|
463
478
|
}
|
|
464
479
|
registerView(commentsViewAlreadyRegistered) {
|
|
465
480
|
if (!commentsViewAlreadyRegistered) {
|
|
@@ -504,6 +504,7 @@ let MainThreadCustomEditorModel = MainThreadCustomEditorModel_1 = class MainThre
|
|
|
504
504
|
return true;
|
|
505
505
|
}
|
|
506
506
|
}
|
|
507
|
+
get canHotExit() { return typeof this._backupId === 'string' && this._hotExitState.type === 0 ; }
|
|
507
508
|
async backup(token) {
|
|
508
509
|
const editors = this._getEditors();
|
|
509
510
|
if (!editors.length) {
|
|
@@ -561,7 +562,7 @@ let MainThreadCustomEditorModel = MainThreadCustomEditorModel_1 = class MainThre
|
|
|
561
562
|
if (this._hotExitState === HotExitState.Allowed) {
|
|
562
563
|
return backupData;
|
|
563
564
|
}
|
|
564
|
-
throw new Error(`Cannot
|
|
565
|
+
throw new Error(`Cannot backup in this state: ${errorMessage}`);
|
|
565
566
|
}
|
|
566
567
|
};
|
|
567
568
|
MainThreadCustomEditorModel = MainThreadCustomEditorModel_1 = ( __decorate([
|
|
@@ -4,12 +4,13 @@ import { URI } from 'vscode/vscode/vs/base/common/uri';
|
|
|
4
4
|
import { IDebugService, IDebugVisualization } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug';
|
|
5
5
|
import { MainContext, ExtHostContext } from 'vscode/vscode/vs/workbench/api/common/extHost.protocol';
|
|
6
6
|
import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
|
|
7
|
-
import Severity from 'vscode/vscode/vs/base/common/severity';
|
|
7
|
+
import Severity$1 from 'vscode/vscode/vs/base/common/severity';
|
|
8
8
|
import { AbstractDebugAdapter } from 'vscode/vscode/vs/workbench/contrib/debug/common/abstractDebugAdapter';
|
|
9
9
|
import { isSessionAttach, convertToVSCPaths, convertToDAPaths } from 'vscode/vscode/vs/workbench/contrib/debug/common/debugUtils';
|
|
10
10
|
import { ErrorNoTelemetry } from 'vscode/vscode/vs/base/common/errors';
|
|
11
11
|
import { IDebugVisualizerService } from 'vscode/vscode/vs/workbench/contrib/debug/common/debugVisualizers';
|
|
12
12
|
import { ExtensionIdentifier } from 'vscode/vscode/vs/platform/extensions/common/extensions';
|
|
13
|
+
import { Event } from 'vscode/vscode/vs/base/common/event';
|
|
13
14
|
|
|
14
15
|
let MainThreadDebugService = class MainThreadDebugService {
|
|
15
16
|
constructor(extHostContext, debugService, visualizerService) {
|
|
@@ -61,25 +62,27 @@ let MainThreadDebugService = class MainThreadDebugService {
|
|
|
61
62
|
this._debugConfigurationProviders = ( new Map());
|
|
62
63
|
this._debugAdapterDescriptorFactories = ( new Map());
|
|
63
64
|
this._extHostKnownSessions = ( new Set());
|
|
64
|
-
this.
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
const viewModel = this.debugService.getViewModel();
|
|
66
|
+
this._toDispose.add(Event.any(viewModel.onDidFocusStackFrame, viewModel.onDidFocusThread)(() => {
|
|
67
|
+
const stackFrame = viewModel.focusedStackFrame;
|
|
68
|
+
const thread = viewModel.focusedThread;
|
|
69
|
+
if (stackFrame) {
|
|
70
|
+
this._proxy.$acceptStackFrameFocus({
|
|
71
|
+
kind: 'stackFrame',
|
|
72
|
+
threadId: stackFrame.thread.threadId,
|
|
73
|
+
frameId: stackFrame.frameId,
|
|
74
|
+
sessionId: stackFrame.thread.session.getId(),
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
else if (thread) {
|
|
78
|
+
this._proxy.$acceptStackFrameFocus({
|
|
67
79
|
kind: 'thread',
|
|
68
|
-
threadId: thread
|
|
69
|
-
sessionId: session.getId(),
|
|
70
|
-
};
|
|
71
|
-
this._proxy.$acceptStackFrameFocus(dto);
|
|
80
|
+
threadId: thread.threadId,
|
|
81
|
+
sessionId: thread.session.getId(),
|
|
82
|
+
});
|
|
72
83
|
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
if (session) {
|
|
76
|
-
const dto = {
|
|
77
|
-
kind: 'stackFrame',
|
|
78
|
-
threadId: stackFrame?.thread.threadId,
|
|
79
|
-
frameId: stackFrame?.frameId,
|
|
80
|
-
sessionId: session.getId(),
|
|
81
|
-
};
|
|
82
|
-
this._proxy.$acceptStackFrameFocus(dto);
|
|
84
|
+
else {
|
|
85
|
+
this._proxy.$acceptStackFrameFocus(undefined);
|
|
83
86
|
}
|
|
84
87
|
}));
|
|
85
88
|
this.sendBreakpointsAndListen();
|
|
@@ -176,7 +179,14 @@ let MainThreadDebugService = class MainThreadDebugService {
|
|
|
176
179
|
this.debugService.addFunctionBreakpoint(dto.functionName, dto.id, dto.mode);
|
|
177
180
|
}
|
|
178
181
|
else if (dto.type === 'data') {
|
|
179
|
-
this.debugService.addDataBreakpoint(
|
|
182
|
+
this.debugService.addDataBreakpoint({
|
|
183
|
+
description: dto.label,
|
|
184
|
+
src: { type: 0 , dataId: dto.dataId },
|
|
185
|
+
canPersist: dto.canPersist,
|
|
186
|
+
accessTypes: dto.accessTypes,
|
|
187
|
+
accessType: dto.accessType,
|
|
188
|
+
mode: dto.mode
|
|
189
|
+
});
|
|
180
190
|
}
|
|
181
191
|
}
|
|
182
192
|
return Promise.resolve();
|
|
@@ -305,7 +315,7 @@ let MainThreadDebugService = class MainThreadDebugService {
|
|
|
305
315
|
}
|
|
306
316
|
$appendDebugConsole(value) {
|
|
307
317
|
const session = this.debugService.getViewModel().focusedSession;
|
|
308
|
-
session?.appendToRepl({ output: value, sev: Severity.Warning });
|
|
318
|
+
session?.appendToRepl({ output: value, sev: Severity$1.Warning });
|
|
309
319
|
}
|
|
310
320
|
$acceptDAMessage(handle, message) {
|
|
311
321
|
this.getDebugAdapter(handle).acceptMessage(convertToVSCPaths(message, false));
|
|
@@ -359,16 +369,17 @@ let MainThreadDebugService = class MainThreadDebugService {
|
|
|
359
369
|
functionName: fbp.name
|
|
360
370
|
};
|
|
361
371
|
}
|
|
362
|
-
else if ('
|
|
372
|
+
else if ('src' in bp) {
|
|
363
373
|
const dbp = bp;
|
|
364
374
|
return {
|
|
365
375
|
type: 'data',
|
|
366
376
|
id: dbp.getId(),
|
|
367
|
-
dataId: dbp.dataId,
|
|
377
|
+
dataId: dbp.src.type === 0 ? dbp.src.dataId : dbp.src.address,
|
|
368
378
|
enabled: dbp.enabled,
|
|
369
379
|
condition: dbp.condition,
|
|
370
380
|
hitCondition: dbp.hitCondition,
|
|
371
381
|
logMessage: dbp.logMessage,
|
|
382
|
+
accessType: dbp.accessType,
|
|
372
383
|
label: dbp.description,
|
|
373
384
|
canPersist: dbp.canPersist
|
|
374
385
|
};
|
|
@@ -21,6 +21,7 @@ import { InteractiveEditorInput } from 'vscode/vscode/vs/workbench/contrib/inter
|
|
|
21
21
|
import { MergeEditorInput } from 'vscode/vscode/vs/workbench/contrib/mergeEditor/browser/mergeEditorInput';
|
|
22
22
|
import { ILogService } from 'vscode/vscode/vs/platform/log/common/log';
|
|
23
23
|
import { ChatEditorInput } from 'vscode/vscode/vs/workbench/contrib/chat/browser/chatEditorInput';
|
|
24
|
+
import { MultiDiffEditorInput } from 'vscode/vscode/vs/workbench/contrib/multiDiffEditor/browser/multiDiffEditorInput';
|
|
24
25
|
|
|
25
26
|
let MainThreadEditorTabs = class MainThreadEditorTabs {
|
|
26
27
|
constructor(extHostContext, _editorGroupsService, _configurationService, _logService, editorService) {
|
|
@@ -150,6 +151,22 @@ let MainThreadEditorTabs = class MainThreadEditorTabs {
|
|
|
150
151
|
providerId: editor.providerId ?? 'unknown',
|
|
151
152
|
};
|
|
152
153
|
}
|
|
154
|
+
if (editor instanceof MultiDiffEditorInput) {
|
|
155
|
+
const diffEditors = [];
|
|
156
|
+
for (const resource of (editor?.initialResources ?? [])) {
|
|
157
|
+
if (resource.original && resource.modified) {
|
|
158
|
+
diffEditors.push({
|
|
159
|
+
kind: 2 ,
|
|
160
|
+
original: resource.original,
|
|
161
|
+
modified: resource.modified
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
return {
|
|
166
|
+
kind: 11 ,
|
|
167
|
+
diffEditors
|
|
168
|
+
};
|
|
169
|
+
}
|
|
153
170
|
return { kind: 0 };
|
|
154
171
|
}
|
|
155
172
|
_generateTabId(editor, groupId) {
|
|
@@ -374,12 +391,12 @@ let MainThreadEditorTabs = class MainThreadEditorTabs {
|
|
|
374
391
|
this._onDidTabActiveChange(groupId, event.editorIndex);
|
|
375
392
|
break;
|
|
376
393
|
}
|
|
377
|
-
case
|
|
394
|
+
case 13 :
|
|
378
395
|
if (event.editorIndex !== undefined && event.editor !== undefined) {
|
|
379
396
|
this._onDidTabDirty(groupId, event.editorIndex, event.editor);
|
|
380
397
|
break;
|
|
381
398
|
}
|
|
382
|
-
case
|
|
399
|
+
case 12 :
|
|
383
400
|
if (event.editorIndex !== undefined && event.editor !== undefined) {
|
|
384
401
|
this._onDidTabPinChange(groupId, event.editorIndex, event.editor);
|
|
385
402
|
break;
|
|
@@ -389,6 +406,8 @@ let MainThreadEditorTabs = class MainThreadEditorTabs {
|
|
|
389
406
|
this._onDidTabPreviewChange(groupId, event.editorIndex, event.editor);
|
|
390
407
|
break;
|
|
391
408
|
}
|
|
409
|
+
case 11 :
|
|
410
|
+
break;
|
|
392
411
|
case 6 :
|
|
393
412
|
if (isGroupEditorMoveEvent(event) && event.editor && event.editorIndex !== undefined && event.oldEditorIndex !== undefined) {
|
|
394
413
|
this._onDidTabMove(groupId, event.editorIndex, event.oldEditorIndex, event.editor);
|
|
@@ -2,7 +2,7 @@ import { __decorate, __param } from '../../../../../../external/tslib/tslib.es6.
|
|
|
2
2
|
import { Action } from 'vscode/vscode/vs/base/common/actions';
|
|
3
3
|
import { CancellationToken } from 'vscode/vscode/vs/base/common/cancellation';
|
|
4
4
|
import { FileAccess } from 'vscode/vscode/vs/base/common/network';
|
|
5
|
-
import Severity from 'vscode/vscode/vs/base/common/severity';
|
|
5
|
+
import Severity$1 from 'vscode/vscode/vs/base/common/severity';
|
|
6
6
|
import { URI } from 'vscode/vscode/vs/base/common/uri';
|
|
7
7
|
import { localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
8
8
|
import { ICommandService } from 'vscode/vscode/vs/platform/commands/common/commands';
|
|
@@ -89,7 +89,7 @@ let MainThreadExtensionService = class MainThreadExtensionService {
|
|
|
89
89
|
const extName = extension.displayName || extension.name;
|
|
90
90
|
if (this._extensionEnablementService.isEnabled(missingInstalledDependency)) {
|
|
91
91
|
this._notificationService.notify({
|
|
92
|
-
severity: Severity.Error,
|
|
92
|
+
severity: Severity$1.Error,
|
|
93
93
|
message: ( localizeWithPath(
|
|
94
94
|
'vs/workbench/api/browser/mainThreadExtensionService',
|
|
95
95
|
'reload window',
|
|
@@ -110,7 +110,7 @@ let MainThreadExtensionService = class MainThreadExtensionService {
|
|
|
110
110
|
const enablementState = this._extensionEnablementService.getEnablementState(missingInstalledDependency);
|
|
111
111
|
if (enablementState === 4 ) {
|
|
112
112
|
this._notificationService.notify({
|
|
113
|
-
severity: Severity.Error,
|
|
113
|
+
severity: Severity$1.Error,
|
|
114
114
|
message: ( localizeWithPath(
|
|
115
115
|
'vs/workbench/api/browser/mainThreadExtensionService',
|
|
116
116
|
'notSupportedInWorkspace',
|
|
@@ -122,7 +122,7 @@ let MainThreadExtensionService = class MainThreadExtensionService {
|
|
|
122
122
|
}
|
|
123
123
|
else if (enablementState === 0 ) {
|
|
124
124
|
this._notificationService.notify({
|
|
125
|
-
severity: Severity.Error,
|
|
125
|
+
severity: Severity$1.Error,
|
|
126
126
|
message: ( localizeWithPath(
|
|
127
127
|
'vs/workbench/api/browser/mainThreadExtensionService',
|
|
128
128
|
'restrictedMode',
|
|
@@ -141,7 +141,7 @@ let MainThreadExtensionService = class MainThreadExtensionService {
|
|
|
141
141
|
}
|
|
142
142
|
else if (this._extensionEnablementService.canChangeEnablement(missingInstalledDependency)) {
|
|
143
143
|
this._notificationService.notify({
|
|
144
|
-
severity: Severity.Error,
|
|
144
|
+
severity: Severity$1.Error,
|
|
145
145
|
message: ( localizeWithPath(
|
|
146
146
|
'vs/workbench/api/browser/mainThreadExtensionService',
|
|
147
147
|
'disabledDep',
|
|
@@ -161,7 +161,7 @@ let MainThreadExtensionService = class MainThreadExtensionService {
|
|
|
161
161
|
}
|
|
162
162
|
else {
|
|
163
163
|
this._notificationService.notify({
|
|
164
|
-
severity: Severity.Error,
|
|
164
|
+
severity: Severity$1.Error,
|
|
165
165
|
message: ( localizeWithPath(
|
|
166
166
|
'vs/workbench/api/browser/mainThreadExtensionService',
|
|
167
167
|
'disabledDepNoAction',
|
|
@@ -183,7 +183,7 @@ let MainThreadExtensionService = class MainThreadExtensionService {
|
|
|
183
183
|
}
|
|
184
184
|
if (dependencyExtension) {
|
|
185
185
|
this._notificationService.notify({
|
|
186
|
-
severity: Severity.Error,
|
|
186
|
+
severity: Severity$1.Error,
|
|
187
187
|
message: ( localizeWithPath(
|
|
188
188
|
'vs/workbench/api/browser/mainThreadExtensionService',
|
|
189
189
|
'uninstalledDep',
|
|
@@ -10,7 +10,7 @@ import { IProgressService } from 'vscode/vscode/vs/platform/progress/common/prog
|
|
|
10
10
|
import { raceCancellation } from 'vscode/vscode/vs/base/common/async';
|
|
11
11
|
import { CancellationTokenSource } from 'vscode/vscode/vs/base/common/cancellation';
|
|
12
12
|
import '../../../../../../override/vs/platform/dialogs/common/dialogs.js';
|
|
13
|
-
import Severity from 'vscode/vscode/vs/base/common/severity';
|
|
13
|
+
import Severity$1 from 'vscode/vscode/vs/base/common/severity';
|
|
14
14
|
import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage';
|
|
15
15
|
import { registerAction2, Action2 } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
16
16
|
import { ILogService } from 'vscode/vscode/vs/platform/log/common/log';
|
|
@@ -146,7 +146,7 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
|
|
|
146
146
|
}
|
|
147
147
|
if (needsConfirmation) {
|
|
148
148
|
const { confirmed } = await dialogService.confirm({
|
|
149
|
-
type: Severity.Info,
|
|
149
|
+
type: Severity$1.Info,
|
|
150
150
|
message,
|
|
151
151
|
primaryButton: ( localizeWithPath(
|
|
152
152
|
'vs/workbench/api/browser/mainThreadFileSystemEventService',
|
|
@@ -172,7 +172,7 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
|
|
|
172
172
|
Choice[Choice["Cancel"] = 2] = "Cancel";
|
|
173
173
|
})(Choice || (Choice = {})));
|
|
174
174
|
const { result, checkboxChecked } = await dialogService.prompt({
|
|
175
|
-
type: Severity.Info,
|
|
175
|
+
type: Severity$1.Info,
|
|
176
176
|
message,
|
|
177
177
|
buttons: [
|
|
178
178
|
{
|
|
@@ -269,7 +269,6 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
|
|
|
269
269
|
}
|
|
270
270
|
}
|
|
271
271
|
catch (error) {
|
|
272
|
-
this._logService.error(`MainThreadFileSystemEventService#$watch(): failed to stat a resource for file watching (extension: ${extensionId}, path: ${( uri.toString(true))}, recursive: ${opts.recursive}, session: ${session}): ${error}`);
|
|
273
272
|
}
|
|
274
273
|
}
|
|
275
274
|
if (correlate) {
|
|
@@ -287,12 +286,8 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
|
|
|
287
286
|
this._watches.set(session, watcherDisposables);
|
|
288
287
|
}
|
|
289
288
|
else {
|
|
290
|
-
const workspaceFolder = this._contextService.getWorkspaceFolder(uri);
|
|
291
|
-
if (workspaceFolder && opts.recursive) {
|
|
292
|
-
this._logService.trace(`MainThreadFileSystemEventService#$watch(): ignoring request to start watching because path is inside workspace (extension: ${extensionId}, path: ${( uri.toString(true))}, recursive: ${opts.recursive}, session: ${session})`);
|
|
293
|
-
return;
|
|
294
|
-
}
|
|
295
289
|
this._logService.trace(`MainThreadFileSystemEventService#$watch(): request to start watching uncorrelated (extension: ${extensionId}, path: ${( uri.toString(true))}, recursive: ${opts.recursive}, session: ${session})`);
|
|
290
|
+
const workspaceFolder = this._contextService.getWorkspaceFolder(uri);
|
|
296
291
|
if (opts.recursive && opts.excludes.length === 0) {
|
|
297
292
|
const config = this._configurationService.getValue();
|
|
298
293
|
if (config.files?.watcherExclude) {
|
|
@@ -303,7 +298,7 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
|
|
|
303
298
|
}
|
|
304
299
|
}
|
|
305
300
|
}
|
|
306
|
-
else if (workspaceFolder) {
|
|
301
|
+
else if (!opts.recursive && workspaceFolder) {
|
|
307
302
|
const config = this._configurationService.getValue();
|
|
308
303
|
if (config.files?.watcherExclude) {
|
|
309
304
|
for (const key in config.files.watcherExclude) {
|
|
@@ -17,9 +17,9 @@ let MainThreadInlineChat = class MainThreadInlineChat {
|
|
|
17
17
|
dispose() {
|
|
18
18
|
this._registrations.dispose();
|
|
19
19
|
}
|
|
20
|
-
async $registerInteractiveEditorProvider(handle, label,
|
|
20
|
+
async $registerInteractiveEditorProvider(handle, label, extensionId, supportsFeedback, supportsFollowups, supportIssueReporting) {
|
|
21
21
|
const unreg = this._inlineChatService.addProvider({
|
|
22
|
-
|
|
22
|
+
extensionId,
|
|
23
23
|
label,
|
|
24
24
|
supportIssueReporting,
|
|
25
25
|
prepareInlineChatSession: async (model, range, token) => {
|
|
@@ -21,6 +21,7 @@ import { extHostNamedCustomer } from '../../services/extensions/common/extHostCu
|
|
|
21
21
|
import { MainContext, ExtHostContext } from 'vscode/vscode/vs/workbench/api/common/extHost.protocol';
|
|
22
22
|
import { ResourceMap } from 'vscode/vscode/vs/base/common/map';
|
|
23
23
|
import { isFalsyOrEmpty } from 'vscode/vscode/vs/base/common/arrays';
|
|
24
|
+
import { HierarchicalKind } from 'vscode/vscode/vs/base/common/hierarchicalKind';
|
|
24
25
|
|
|
25
26
|
var MainThreadLanguageFeatures_1;
|
|
26
27
|
let MainThreadLanguageFeatures = MainThreadLanguageFeatures_1 = class MainThreadLanguageFeatures extends Disposable {
|
|
@@ -317,8 +318,8 @@ let MainThreadLanguageFeatures = MainThreadLanguageFeatures_1 = class MainThread
|
|
|
317
318
|
}
|
|
318
319
|
this._registrations.set(handle, this._languageFeaturesService.codeActionProvider.register(selector, provider));
|
|
319
320
|
}
|
|
320
|
-
$registerPasteEditProvider(handle, selector,
|
|
321
|
-
const provider = ( new MainThreadPasteEditProvider(handle, this._proxy,
|
|
321
|
+
$registerPasteEditProvider(handle, selector, metadata) {
|
|
322
|
+
const provider = ( new MainThreadPasteEditProvider(handle, this._proxy, metadata, this._uriIdentService));
|
|
322
323
|
this._pasteEditProviders.set(handle, provider);
|
|
323
324
|
this._registrations.set(handle, combinedDisposable(this._languageFeaturesService.documentPasteEditProvider.register(selector, provider), toDisposable(() => this._pasteEditProviders.delete(handle))));
|
|
324
325
|
}
|
|
@@ -491,9 +492,9 @@ let MainThreadLanguageFeatures = MainThreadLanguageFeatures_1 = class MainThread
|
|
|
491
492
|
await this._proxy.$handleInlineCompletionDidShow(handle, completions.pid, item.idx, updatedInsertText);
|
|
492
493
|
}
|
|
493
494
|
},
|
|
494
|
-
handlePartialAccept: async (completions, item, acceptedCharacters) => {
|
|
495
|
+
handlePartialAccept: async (completions, item, acceptedCharacters, info) => {
|
|
495
496
|
if (supportsHandleEvents) {
|
|
496
|
-
await this._proxy.$handleInlineCompletionPartialAccept(handle, completions.pid, item.idx, acceptedCharacters);
|
|
497
|
+
await this._proxy.$handleInlineCompletionPartialAccept(handle, completions.pid, item.idx, acceptedCharacters, info);
|
|
497
498
|
}
|
|
498
499
|
},
|
|
499
500
|
freeInlineCompletions: (completions) => {
|
|
@@ -796,8 +797,8 @@ let MainThreadLanguageFeatures = MainThreadLanguageFeatures_1 = class MainThread
|
|
|
796
797
|
}
|
|
797
798
|
}));
|
|
798
799
|
}
|
|
799
|
-
$registerDocumentOnDropEditProvider(handle, selector,
|
|
800
|
-
const provider = ( new MainThreadDocumentOnDropEditProvider(handle, this._proxy,
|
|
800
|
+
$registerDocumentOnDropEditProvider(handle, selector, metadata) {
|
|
801
|
+
const provider = ( new MainThreadDocumentOnDropEditProvider(handle, this._proxy, metadata, this._uriIdentService));
|
|
801
802
|
this._documentOnDropEditProviders.set(handle, provider);
|
|
802
803
|
this._registrations.set(handle, combinedDisposable(this._languageFeaturesService.documentOnDropEditProvider.register(selector, provider), toDisposable(() => this._documentOnDropEditProviders.delete(handle))));
|
|
803
804
|
}
|
|
@@ -821,14 +822,14 @@ MainThreadLanguageFeatures = MainThreadLanguageFeatures_1 = __decorate([
|
|
|
821
822
|
( __param(4, IUriIdentityService))
|
|
822
823
|
], MainThreadLanguageFeatures);
|
|
823
824
|
let MainThreadPasteEditProvider = class MainThreadPasteEditProvider {
|
|
824
|
-
constructor(_handle, _proxy,
|
|
825
|
+
constructor(_handle, _proxy, metadata, _uriIdentService) {
|
|
825
826
|
this._handle = _handle;
|
|
826
827
|
this._proxy = _proxy;
|
|
827
828
|
this._uriIdentService = _uriIdentService;
|
|
828
829
|
this.dataTransfers = ( new DataTransferFileCache());
|
|
829
|
-
this.id = id;
|
|
830
830
|
this.copyMimeTypes = metadata.copyMimeTypes;
|
|
831
831
|
this.pasteMimeTypes = metadata.pasteMimeTypes;
|
|
832
|
+
this.providedPasteEditKinds = metadata.providedPasteEditKinds?.map(kind => ( new HierarchicalKind(kind)));
|
|
832
833
|
if (metadata.supportsCopy) {
|
|
833
834
|
this.prepareDocumentPaste = async (model, selections, dataTransfer, token) => {
|
|
834
835
|
const dataTransferDto = await DataTransfer.from(dataTransfer);
|
|
@@ -854,13 +855,25 @@ let MainThreadPasteEditProvider = class MainThreadPasteEditProvider {
|
|
|
854
855
|
if (token.isCancellationRequested) {
|
|
855
856
|
return;
|
|
856
857
|
}
|
|
857
|
-
const
|
|
858
|
-
|
|
858
|
+
const edits = await this._proxy.$providePasteEdits(this._handle, request.id, model.uri, selections, dataTransferDto, {
|
|
859
|
+
only: context.only?.value,
|
|
860
|
+
triggerKind: context.triggerKind,
|
|
861
|
+
}, token);
|
|
862
|
+
if (!edits) {
|
|
859
863
|
return;
|
|
860
864
|
}
|
|
861
865
|
return {
|
|
862
|
-
|
|
863
|
-
|
|
866
|
+
edits: ( edits.map((edit) => {
|
|
867
|
+
return {
|
|
868
|
+
...edit,
|
|
869
|
+
kind: edit.kind ? ( new HierarchicalKind(edit.kind.value)) : ( new HierarchicalKind('')),
|
|
870
|
+
yieldTo: edit.yieldTo?.map(x => ({ kind: ( new HierarchicalKind(x)) })),
|
|
871
|
+
additionalEdit: edit.additionalEdit ? reviveWorkspaceEditDto(edit.additionalEdit, this._uriIdentService, dataId => this.resolveFileData(request.id, dataId)) : undefined,
|
|
872
|
+
};
|
|
873
|
+
})),
|
|
874
|
+
dispose: () => {
|
|
875
|
+
this._proxy.$releasePasteEdits(this._handle, request.id);
|
|
876
|
+
},
|
|
864
877
|
};
|
|
865
878
|
}
|
|
866
879
|
finally {
|
|
@@ -868,21 +881,29 @@ let MainThreadPasteEditProvider = class MainThreadPasteEditProvider {
|
|
|
868
881
|
}
|
|
869
882
|
};
|
|
870
883
|
}
|
|
884
|
+
if (metadata.supportsResolve) {
|
|
885
|
+
this.resolveDocumentPasteEdit = async (edit, token) => {
|
|
886
|
+
const resolved = await this._proxy.$resolvePasteEdit(this._handle, edit._cacheId, token);
|
|
887
|
+
if (resolved.additionalEdit) {
|
|
888
|
+
edit.additionalEdit = reviveWorkspaceEditDto(resolved.additionalEdit, this._uriIdentService);
|
|
889
|
+
}
|
|
890
|
+
return edit;
|
|
891
|
+
};
|
|
892
|
+
}
|
|
871
893
|
}
|
|
872
894
|
resolveFileData(requestId, dataId) {
|
|
873
895
|
return this.dataTransfers.resolveFileData(requestId, dataId);
|
|
874
896
|
}
|
|
875
897
|
};
|
|
876
898
|
MainThreadPasteEditProvider = ( __decorate([
|
|
877
|
-
( __param(
|
|
899
|
+
( __param(3, IUriIdentityService))
|
|
878
900
|
], MainThreadPasteEditProvider));
|
|
879
901
|
let MainThreadDocumentOnDropEditProvider = class MainThreadDocumentOnDropEditProvider {
|
|
880
|
-
constructor(_handle, _proxy,
|
|
902
|
+
constructor(_handle, _proxy, metadata, _uriIdentService) {
|
|
881
903
|
this._handle = _handle;
|
|
882
904
|
this._proxy = _proxy;
|
|
883
905
|
this._uriIdentService = _uriIdentService;
|
|
884
906
|
this.dataTransfers = ( new DataTransferFileCache());
|
|
885
|
-
this.id = id;
|
|
886
907
|
this.dropMimeTypes = metadata?.dropMimeTypes ?? ['*/*'];
|
|
887
908
|
}
|
|
888
909
|
async provideDocumentOnDropEdits(model, position, dataTransfer, token) {
|
|
@@ -892,14 +913,18 @@ let MainThreadDocumentOnDropEditProvider = class MainThreadDocumentOnDropEditPro
|
|
|
892
913
|
if (token.isCancellationRequested) {
|
|
893
914
|
return;
|
|
894
915
|
}
|
|
895
|
-
const
|
|
896
|
-
if (!
|
|
916
|
+
const edits = await this._proxy.$provideDocumentOnDropEdits(this._handle, request.id, model.uri, position, dataTransferDto, token);
|
|
917
|
+
if (!edits) {
|
|
897
918
|
return;
|
|
898
919
|
}
|
|
899
|
-
return {
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
920
|
+
return ( edits.map(edit => {
|
|
921
|
+
return {
|
|
922
|
+
...edit,
|
|
923
|
+
yieldTo: edit.yieldTo?.map(x => ({ kind: ( new HierarchicalKind(x)) })),
|
|
924
|
+
kind: edit.kind ? ( new HierarchicalKind(edit.kind)) : undefined,
|
|
925
|
+
additionalEdit: reviveWorkspaceEditDto(edit.additionalEdit, this._uriIdentService, dataId => this.resolveDocumentOnDropFileData(request.id, dataId)),
|
|
926
|
+
};
|
|
927
|
+
}));
|
|
903
928
|
}
|
|
904
929
|
finally {
|
|
905
930
|
request.dispose();
|
|
@@ -910,7 +935,7 @@ let MainThreadDocumentOnDropEditProvider = class MainThreadDocumentOnDropEditPro
|
|
|
910
935
|
}
|
|
911
936
|
};
|
|
912
937
|
MainThreadDocumentOnDropEditProvider = ( __decorate([
|
|
913
|
-
( __param(
|
|
938
|
+
( __param(3, IUriIdentityService))
|
|
914
939
|
], MainThreadDocumentOnDropEditProvider));
|
|
915
940
|
class MainThreadDocumentSemanticTokensProvider {
|
|
916
941
|
constructor(_proxy, _handle, _legend, onDidChange) {
|