@codingame/monaco-vscode-extensions-service-override 9.0.3 → 10.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/_virtual/semver.js +5 -0
- package/assets/webWorkerExtensionHostIframe.esm.html +8 -4
- package/extensions.js +14 -5
- package/override/vs/workbench/browser/parts/editor/textEditor.weak.js +1 -1
- package/package.json +3 -3
- package/vscode/src/vs/base/common/console.js +0 -2
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagementCLI.js +35 -35
- package/vscode/src/vs/platform/extensionResourceLoader/browser/extensionResourceLoaderService.js +0 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadAuthentication.js +54 -31
- package/vscode/src/vs/workbench/api/browser/mainThreadBulkEdits.js +1 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadCLICommands.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents2.js +4 -5
- package/vscode/src/vs/workbench/api/browser/mainThreadChatCodeMapper.js +57 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadComments.js +9 -10
- package/vscode/src/vs/workbench/api/browser/mainThreadConfiguration.js +9 -11
- package/vscode/src/vs/workbench/api/browser/mainThreadCustomEditors.js +16 -33
- package/vscode/src/vs/workbench/api/browser/mainThreadDebugService.js +4 -4
- package/vscode/src/vs/workbench/api/browser/mainThreadDocuments.js +2 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadDocumentsAndEditors.js +6 -12
- package/vscode/src/vs/workbench/api/browser/mainThreadEditSessionIdentityParticipant.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadEditor.js +16 -14
- package/vscode/src/vs/workbench/api/browser/mainThreadEditorTabs.js +38 -38
- package/vscode/src/vs/workbench/api/browser/mainThreadEmbeddings.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadExtensionService.js +17 -19
- package/vscode/src/vs/workbench/api/browser/mainThreadFileSystem.js +5 -5
- package/vscode/src/vs/workbench/api/browser/mainThreadFileSystemEventService.js +39 -80
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageFeatures.js +23 -24
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModelTools.js +8 -6
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModels.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadManagedSockets.js +2 -4
- package/vscode/src/vs/workbench/api/browser/mainThreadMessageService.js +4 -4
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDocumentsAndEditors.js +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDto.js +1 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookKernels.js +14 -11
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookSaveParticipant.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadProgress.js +3 -4
- package/vscode/src/vs/workbench/api/browser/mainThreadSCM.js +77 -42
- package/vscode/src/vs/workbench/api/browser/mainThreadSaveParticipant.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadSearch.js +23 -6
- package/vscode/src/vs/workbench/api/browser/mainThreadStatusBar.js +3 -4
- package/vscode/src/vs/workbench/api/browser/mainThreadStorage.js +1 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadTask.js +17 -17
- package/vscode/src/vs/workbench/api/browser/mainThreadTelemetry.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadTerminalService.js +3 -4
- package/vscode/src/vs/workbench/api/browser/mainThreadTerminalShellIntegration.js +4 -5
- package/vscode/src/vs/workbench/api/browser/mainThreadTesting.js +5 -5
- package/vscode/src/vs/workbench/api/browser/mainThreadTunnelService.js +14 -10
- package/vscode/src/vs/workbench/api/browser/mainThreadUriOpeners.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviewPanels.js +3 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviews.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadWorkspace.js +11 -11
- package/vscode/src/vs/workbench/contrib/customEditor/common/customTextEditorModel.js +22 -10
- package/vscode/src/vs/workbench/contrib/externalUriOpener/common/contributedOpeners.js +1 -2
- package/vscode/src/vs/workbench/services/extensionManagement/browser/extensionBisect.js +30 -33
- package/vscode/src/vs/workbench/services/extensions/browser/extensionService.js +19 -24
- package/vscode/src/vs/workbench/services/extensions/browser/webWorkerExtensionHost.js +11 -15
- package/vscode/src/vs/workbench/services/extensions/browser/webWorkerFileSystemProvider.js +2 -2
- package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.js +32 -32
- package/vscode/src/vs/workbench/services/extensions/common/extensionHostManager.js +7 -8
- package/vscode/src/vs/workbench/services/extensions/common/extensionRunningLocationTracker.js +12 -12
- package/vscode/src/vs/workbench/services/extensions/common/extensionStorageMigration.js +2 -3
- package/vscode/src/vs/workbench/services/extensions/common/extensionsProposedApi.js +1 -1
- package/vscode/src/vs/workbench/services/extensions/common/extensionsUtil.js +5 -5
- package/vscode/src/vs/workbench/services/extensions/common/lazyCreateExtensionHostManager.js +2 -2
- package/vscode/src/vs/workbench/services/extensions/common/remoteExtensionHost.js +7 -9
|
@@ -1,41 +1,31 @@
|
|
|
1
1
|
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
2
2
|
import { DisposableStore, DisposableMap } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
3
|
-
import { FileOperation } from 'vscode/vscode/vs/platform/files/common/files';
|
|
4
3
|
import { IFileService } from 'vscode/vscode/vs/platform/files/common/files.service';
|
|
5
4
|
import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
|
|
6
5
|
import { ExtHostContext, MainContext } from 'vscode/vscode/vs/workbench/api/common/extHost.protocol';
|
|
7
6
|
import { localize } from 'vscode/vscode/vs/nls';
|
|
8
7
|
import { IWorkingCopyFileService } from 'vscode/vscode/vs/workbench/services/workingCopy/common/workingCopyFileService.service';
|
|
9
8
|
import { IBulkEditService } from 'vscode/vscode/vs/editor/browser/services/bulkEditService';
|
|
10
|
-
import { ProgressLocation } from 'vscode/vscode/vs/platform/progress/common/progress';
|
|
11
9
|
import { IProgressService } from 'vscode/vscode/vs/platform/progress/common/progress.service';
|
|
12
10
|
import { raceCancellation } from 'vscode/vscode/vs/base/common/async';
|
|
13
11
|
import { CancellationTokenSource } from 'vscode/vscode/vs/base/common/cancellation';
|
|
14
12
|
import { IDialogService } from 'vscode/vscode/vs/platform/dialogs/common/dialogs.service';
|
|
15
13
|
import Severity$1 from 'vscode/vscode/vs/base/common/severity';
|
|
16
|
-
import { StorageScope, StorageTarget } from 'vscode/vscode/vs/platform/storage/common/storage';
|
|
17
14
|
import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
|
|
18
15
|
import { registerAction2, Action2 } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
19
16
|
import { ILogService } from 'vscode/vscode/vs/platform/log/common/log.service';
|
|
20
17
|
import { IEnvironmentService } from 'vscode/vscode/vs/platform/environment/common/environment.service';
|
|
21
18
|
import { IUriIdentityService } from 'vscode/vscode/vs/platform/uriIdentity/common/uriIdentity.service';
|
|
22
19
|
import { reviveWorkspaceEditDto } from './mainThreadBulkEdits.js';
|
|
23
|
-
import { GLOBSTAR } from 'vscode/vscode/vs/base/common/glob';
|
|
24
|
-
import { rtrim } from 'vscode/vscode/vs/base/common/strings';
|
|
25
20
|
import { URI } from 'vscode/vscode/vs/base/common/uri';
|
|
26
|
-
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
|
|
27
|
-
import { normalizeWatcherPattern } from 'vscode/vscode/vs/platform/files/common/watcher';
|
|
28
|
-
import { IWorkspaceContextService } from 'vscode/vscode/vs/platform/workspace/common/workspace.service';
|
|
29
21
|
|
|
30
22
|
var MainThreadFileSystemEventService_1;
|
|
31
23
|
let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
|
|
32
24
|
static { MainThreadFileSystemEventService_1 = this; }
|
|
33
25
|
static { this.MementoKeyAdditionalEdits = `file.particpants.additionalEdits`; }
|
|
34
|
-
constructor(extHostContext, _fileService, workingCopyFileService, bulkEditService, progressService, dialogService, storageService, logService, envService, uriIdentService,
|
|
26
|
+
constructor(extHostContext, _fileService, workingCopyFileService, bulkEditService, progressService, dialogService, storageService, logService, envService, uriIdentService, _logService) {
|
|
35
27
|
this._fileService = _fileService;
|
|
36
|
-
this._contextService = _contextService;
|
|
37
28
|
this._logService = _logService;
|
|
38
|
-
this._configurationService = _configurationService;
|
|
39
29
|
this._listener = ( (new DisposableStore()));
|
|
40
30
|
this._watches = ( (new DisposableMap()));
|
|
41
31
|
this._proxy = ( (extHostContext.getProxy(ExtHostContext.ExtHostFileSystemEventService)));
|
|
@@ -55,7 +45,7 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
|
|
|
55
45
|
const cts = ( (new CancellationTokenSource(token)));
|
|
56
46
|
const timer = setTimeout(() => cts.cancel(), timeout);
|
|
57
47
|
const data = await progressService.withProgress({
|
|
58
|
-
location:
|
|
48
|
+
location: 15 ,
|
|
59
49
|
title: this._progressLabel(operation),
|
|
60
50
|
cancellable: true,
|
|
61
51
|
delay: Math.min(timeout / 2, 3000)
|
|
@@ -72,67 +62,67 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
|
|
|
72
62
|
return;
|
|
73
63
|
}
|
|
74
64
|
const needsConfirmation = ( (data.edit.edits.some(edit => edit.metadata?.needsConfirmation)));
|
|
75
|
-
let showPreview = storageService.getBoolean(MainThreadFileSystemEventService_1.MementoKeyAdditionalEdits,
|
|
65
|
+
let showPreview = storageService.getBoolean(MainThreadFileSystemEventService_1.MementoKeyAdditionalEdits, 0 );
|
|
76
66
|
if (envService.extensionTestsLocationURI) {
|
|
77
67
|
showPreview = false;
|
|
78
68
|
}
|
|
79
69
|
if (showPreview === undefined) {
|
|
80
70
|
let message;
|
|
81
71
|
if (data.extensionNames.length === 1) {
|
|
82
|
-
if (operation ===
|
|
72
|
+
if (operation === 0 ) {
|
|
83
73
|
message = ( localize(
|
|
84
|
-
|
|
74
|
+
4846,
|
|
85
75
|
"Extension '{0}' wants to make refactoring changes with this file creation",
|
|
86
76
|
data.extensionNames[0]
|
|
87
77
|
));
|
|
88
78
|
}
|
|
89
|
-
else if (operation ===
|
|
79
|
+
else if (operation === 3 ) {
|
|
90
80
|
message = ( localize(
|
|
91
|
-
|
|
81
|
+
4847,
|
|
92
82
|
"Extension '{0}' wants to make refactoring changes with this file copy",
|
|
93
83
|
data.extensionNames[0]
|
|
94
84
|
));
|
|
95
85
|
}
|
|
96
|
-
else if (operation ===
|
|
86
|
+
else if (operation === 2 ) {
|
|
97
87
|
message = ( localize(
|
|
98
|
-
|
|
88
|
+
4848,
|
|
99
89
|
"Extension '{0}' wants to make refactoring changes with this file move",
|
|
100
90
|
data.extensionNames[0]
|
|
101
91
|
));
|
|
102
92
|
}
|
|
103
93
|
else {
|
|
104
94
|
message = ( localize(
|
|
105
|
-
|
|
95
|
+
4849,
|
|
106
96
|
"Extension '{0}' wants to make refactoring changes with this file deletion",
|
|
107
97
|
data.extensionNames[0]
|
|
108
98
|
));
|
|
109
99
|
}
|
|
110
100
|
}
|
|
111
101
|
else {
|
|
112
|
-
if (operation ===
|
|
102
|
+
if (operation === 0 ) {
|
|
113
103
|
message = ( localize(
|
|
114
|
-
|
|
104
|
+
4850,
|
|
115
105
|
"{0} extensions want to make refactoring changes with this file creation",
|
|
116
106
|
data.extensionNames.length
|
|
117
107
|
));
|
|
118
108
|
}
|
|
119
|
-
else if (operation ===
|
|
109
|
+
else if (operation === 3 ) {
|
|
120
110
|
message = ( localize(
|
|
121
|
-
|
|
111
|
+
4851,
|
|
122
112
|
"{0} extensions want to make refactoring changes with this file copy",
|
|
123
113
|
data.extensionNames.length
|
|
124
114
|
));
|
|
125
115
|
}
|
|
126
|
-
else if (operation ===
|
|
116
|
+
else if (operation === 2 ) {
|
|
127
117
|
message = ( localize(
|
|
128
|
-
|
|
118
|
+
4852,
|
|
129
119
|
"{0} extensions want to make refactoring changes with this file move",
|
|
130
120
|
data.extensionNames.length
|
|
131
121
|
));
|
|
132
122
|
}
|
|
133
123
|
else {
|
|
134
124
|
message = ( localize(
|
|
135
|
-
|
|
125
|
+
4853,
|
|
136
126
|
"{0} extensions want to make refactoring changes with this file deletion",
|
|
137
127
|
data.extensionNames.length
|
|
138
128
|
));
|
|
@@ -142,8 +132,8 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
|
|
|
142
132
|
const { confirmed } = await dialogService.confirm({
|
|
143
133
|
type: Severity$1.Info,
|
|
144
134
|
message,
|
|
145
|
-
primaryButton: ( localize(
|
|
146
|
-
cancelButton: ( localize(
|
|
135
|
+
primaryButton: ( localize(4854, "Show &&Preview")),
|
|
136
|
+
cancelButton: ( localize(4855, "Skip Changes"))
|
|
147
137
|
});
|
|
148
138
|
showPreview = true;
|
|
149
139
|
if (!confirmed) {
|
|
@@ -162,26 +152,26 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
|
|
|
162
152
|
message,
|
|
163
153
|
buttons: [
|
|
164
154
|
{
|
|
165
|
-
label: ( localize(
|
|
155
|
+
label: ( localize(4856, "&&OK")),
|
|
166
156
|
run: () => Choice.OK
|
|
167
157
|
},
|
|
168
158
|
{
|
|
169
|
-
label: ( localize(
|
|
159
|
+
label: ( localize(4854, "Show &&Preview")),
|
|
170
160
|
run: () => Choice.Preview
|
|
171
161
|
}
|
|
172
162
|
],
|
|
173
163
|
cancelButton: {
|
|
174
|
-
label: ( localize(
|
|
164
|
+
label: ( localize(4855, "Skip Changes")),
|
|
175
165
|
run: () => Choice.Cancel
|
|
176
166
|
},
|
|
177
|
-
checkbox: { label: ( localize(
|
|
167
|
+
checkbox: { label: ( localize(4857, "Do not ask me again")) }
|
|
178
168
|
});
|
|
179
169
|
if (result === Choice.Cancel) {
|
|
180
170
|
return;
|
|
181
171
|
}
|
|
182
172
|
showPreview = result === Choice.Preview;
|
|
183
173
|
if (checkboxChecked) {
|
|
184
|
-
storageService.store(MainThreadFileSystemEventService_1.MementoKeyAdditionalEdits, showPreview,
|
|
174
|
+
storageService.store(MainThreadFileSystemEventService_1.MementoKeyAdditionalEdits, showPreview, 0 , 0 );
|
|
185
175
|
}
|
|
186
176
|
}
|
|
187
177
|
}
|
|
@@ -190,16 +180,16 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
|
|
|
190
180
|
}
|
|
191
181
|
_progressLabel(operation) {
|
|
192
182
|
switch (operation) {
|
|
193
|
-
case
|
|
194
|
-
return ( localize(
|
|
195
|
-
case
|
|
196
|
-
return ( localize(
|
|
197
|
-
case
|
|
198
|
-
return ( localize(
|
|
199
|
-
case
|
|
200
|
-
return ( localize(
|
|
201
|
-
case
|
|
202
|
-
return ( localize(
|
|
183
|
+
case 0 :
|
|
184
|
+
return ( localize(4858, "Running 'File Create' participants..."));
|
|
185
|
+
case 2 :
|
|
186
|
+
return ( localize(4859, "Running 'File Rename' participants..."));
|
|
187
|
+
case 3 :
|
|
188
|
+
return ( localize(4860, "Running 'File Copy' participants..."));
|
|
189
|
+
case 1 :
|
|
190
|
+
return ( localize(4861, "Running 'File Delete' participants..."));
|
|
191
|
+
case 4 :
|
|
192
|
+
return ( localize(4862, "Running 'File Write' participants..."));
|
|
203
193
|
}
|
|
204
194
|
}
|
|
205
195
|
});
|
|
@@ -222,7 +212,7 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
|
|
|
222
212
|
}
|
|
223
213
|
}
|
|
224
214
|
if (correlate) {
|
|
225
|
-
this._logService.trace(`MainThreadFileSystemEventService#$watch(): request to start watching correlated (extension: ${extensionId}, path: ${( (uri.toString(true)))}, recursive: ${opts.recursive}, session: ${session})`);
|
|
215
|
+
this._logService.trace(`MainThreadFileSystemEventService#$watch(): request to start watching correlated (extension: ${extensionId}, path: ${( (uri.toString(true)))}, recursive: ${opts.recursive}, session: ${session}, excludes: ${JSON.stringify(opts.excludes)}, includes: ${JSON.stringify(opts.includes)})`);
|
|
226
216
|
const watcherDisposables = ( (new DisposableStore()));
|
|
227
217
|
const subscription = watcherDisposables.add(this._fileService.createWatcher(uri, opts));
|
|
228
218
|
watcherDisposables.add(subscription.onDidChange(event => {
|
|
@@ -236,36 +226,7 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
|
|
|
236
226
|
this._watches.set(session, watcherDisposables);
|
|
237
227
|
}
|
|
238
228
|
else {
|
|
239
|
-
this._logService.trace(`MainThreadFileSystemEventService#$watch(): request to start watching uncorrelated (extension: ${extensionId}, path: ${( (uri.toString(true)))}, recursive: ${opts.recursive}, session: ${session})`);
|
|
240
|
-
const workspaceFolder = this._contextService.getWorkspaceFolder(uri);
|
|
241
|
-
if (opts.recursive && opts.excludes.length === 0) {
|
|
242
|
-
const config = this._configurationService.getValue();
|
|
243
|
-
if (config.files?.watcherExclude) {
|
|
244
|
-
for (const key in config.files.watcherExclude) {
|
|
245
|
-
if (key && config.files.watcherExclude[key] === true) {
|
|
246
|
-
opts.excludes.push(key);
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
else if (!opts.recursive && workspaceFolder) {
|
|
252
|
-
const config = this._configurationService.getValue();
|
|
253
|
-
if (config.files?.watcherExclude) {
|
|
254
|
-
for (const key in config.files.watcherExclude) {
|
|
255
|
-
if (key && config.files.watcherExclude[key] === true) {
|
|
256
|
-
if (!opts.includes) {
|
|
257
|
-
opts.includes = [];
|
|
258
|
-
}
|
|
259
|
-
const includePattern = `${rtrim(key, '/')}/${GLOBSTAR}`;
|
|
260
|
-
opts.includes.push(normalizeWatcherPattern(workspaceFolder.uri.fsPath, includePattern));
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
if (!opts.includes || opts.includes.length === 0) {
|
|
265
|
-
this._logService.trace(`MainThreadFileSystemEventService#$watch(): ignoring request to start watching because path is inside workspace and no excludes are configured (extension: ${extensionId}, path: ${( (uri.toString(true)))}, recursive: ${opts.recursive}, session: ${session})`);
|
|
266
|
-
return;
|
|
267
|
-
}
|
|
268
|
-
}
|
|
229
|
+
this._logService.trace(`MainThreadFileSystemEventService#$watch(): request to start watching uncorrelated (extension: ${extensionId}, path: ${( (uri.toString(true)))}, recursive: ${opts.recursive}, session: ${session}, excludes: ${JSON.stringify(opts.excludes)}, includes: ${JSON.stringify(opts.includes)})`);
|
|
269
230
|
const subscription = this._fileService.watch(uri, opts);
|
|
270
231
|
this._watches.set(session, subscription);
|
|
271
232
|
}
|
|
@@ -292,23 +253,21 @@ MainThreadFileSystemEventService = MainThreadFileSystemEventService_1 = __decora
|
|
|
292
253
|
( (__param(7, ILogService))),
|
|
293
254
|
( (__param(8, IEnvironmentService))),
|
|
294
255
|
( (__param(9, IUriIdentityService))),
|
|
295
|
-
( (__param(10,
|
|
296
|
-
( (__param(11, ILogService))),
|
|
297
|
-
( (__param(12, IConfigurationService)))
|
|
256
|
+
( (__param(10, ILogService)))
|
|
298
257
|
], MainThreadFileSystemEventService);
|
|
299
258
|
registerAction2(class ResetMemento extends Action2 {
|
|
300
259
|
constructor() {
|
|
301
260
|
super({
|
|
302
261
|
id: 'files.participants.resetChoice',
|
|
303
262
|
title: {
|
|
304
|
-
value: ( localize(
|
|
263
|
+
value: ( localize(4863, "Reset choice for 'File operation needs preview'")),
|
|
305
264
|
original: `Reset choice for 'File operation needs preview'`
|
|
306
265
|
},
|
|
307
266
|
f1: true
|
|
308
267
|
});
|
|
309
268
|
}
|
|
310
269
|
run(accessor) {
|
|
311
|
-
accessor.get(IStorageService).remove(MainThreadFileSystemEventService.MementoKeyAdditionalEdits,
|
|
270
|
+
accessor.get(IStorageService).remove(MainThreadFileSystemEventService.MementoKeyAdditionalEdits, 0 );
|
|
312
271
|
}
|
|
313
272
|
});
|
|
314
273
|
|
|
@@ -8,7 +8,6 @@ import { ResourceMap } from 'vscode/vscode/vs/base/common/map';
|
|
|
8
8
|
import { revive } from 'vscode/vscode/vs/base/common/marshalling';
|
|
9
9
|
import { mixin } from 'vscode/vscode/vs/base/common/objects';
|
|
10
10
|
import { URI } from 'vscode/vscode/vs/base/common/uri';
|
|
11
|
-
import { CompletionItemKind } from 'vscode/vscode/vs/editor/common/languages';
|
|
12
11
|
import { ILanguageService } from 'vscode/vscode/vs/editor/common/languages/language';
|
|
13
12
|
import { ILanguageConfigurationService } from 'vscode/vscode/vs/editor/common/languages/languageConfigurationRegistry';
|
|
14
13
|
import { ILanguageFeaturesService } from 'vscode/vscode/vs/editor/common/services/languageFeatures';
|
|
@@ -21,7 +20,7 @@ import { CallHierarchyProviderRegistry } from 'vscode/vscode/vs/workbench/contri
|
|
|
21
20
|
import { WorkspaceSymbolProviderRegistry } from 'vscode/vscode/vs/workbench/contrib/search/common/search';
|
|
22
21
|
import { TypeHierarchyProviderRegistry } from 'vscode/vscode/vs/workbench/contrib/typeHierarchy/common/typeHierarchy';
|
|
23
22
|
import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
|
|
24
|
-
import { ExtHostContext,
|
|
23
|
+
import { ExtHostContext, MainContext } from 'vscode/vscode/vs/workbench/api/common/extHost.protocol';
|
|
25
24
|
|
|
26
25
|
var MainThreadLanguageFeatures_1;
|
|
27
26
|
let MainThreadLanguageFeatures = MainThreadLanguageFeatures_1 = class MainThreadLanguageFeatures extends Disposable {
|
|
@@ -427,30 +426,30 @@ let MainThreadLanguageFeatures = MainThreadLanguageFeatures_1 = class MainThread
|
|
|
427
426
|
this._registrations.set(handle, this._languageFeaturesService.documentRangeSemanticTokensProvider.register(selector, ( new MainThreadDocumentRangeSemanticTokensProvider(this._proxy, handle, legend))));
|
|
428
427
|
}
|
|
429
428
|
static _inflateSuggestDto(defaultRange, data, extensionId) {
|
|
430
|
-
const label = data[
|
|
431
|
-
const commandId = data[
|
|
432
|
-
const commandIdent = data[
|
|
433
|
-
const commitChars = data[
|
|
429
|
+
const label = data["a" ];
|
|
430
|
+
const commandId = data["o" ];
|
|
431
|
+
const commandIdent = data["n" ];
|
|
432
|
+
const commitChars = data["k" ];
|
|
434
433
|
return {
|
|
435
434
|
label,
|
|
436
435
|
extensionId,
|
|
437
|
-
kind: data[
|
|
438
|
-
tags: data[
|
|
439
|
-
detail: data[
|
|
440
|
-
documentation: data[
|
|
441
|
-
sortText: data[
|
|
442
|
-
filterText: data[
|
|
443
|
-
preselect: data[
|
|
444
|
-
insertText: data[
|
|
445
|
-
range: data[
|
|
446
|
-
insertTextRules: data[
|
|
436
|
+
kind: data["b" ] ?? 9 ,
|
|
437
|
+
tags: data["m" ],
|
|
438
|
+
detail: data["c" ],
|
|
439
|
+
documentation: data["d" ],
|
|
440
|
+
sortText: data["e" ],
|
|
441
|
+
filterText: data["f" ],
|
|
442
|
+
preselect: data["g" ],
|
|
443
|
+
insertText: data["h" ] ?? (typeof label === 'string' ? label : label.label),
|
|
444
|
+
range: data["j" ] ?? defaultRange,
|
|
445
|
+
insertTextRules: data["i" ],
|
|
447
446
|
commitCharacters: commitChars ? Array.from(commitChars) : undefined,
|
|
448
|
-
additionalTextEdits: data[
|
|
447
|
+
additionalTextEdits: data["l" ],
|
|
449
448
|
command: commandId ? {
|
|
450
449
|
$ident: commandIdent,
|
|
451
450
|
id: commandId,
|
|
452
451
|
title: '',
|
|
453
|
-
arguments: commandIdent ? [commandIdent] : data[
|
|
452
|
+
arguments: commandIdent ? [commandIdent] : data["p" ],
|
|
454
453
|
} : undefined,
|
|
455
454
|
_id: data.x,
|
|
456
455
|
};
|
|
@@ -465,11 +464,11 @@ let MainThreadLanguageFeatures = MainThreadLanguageFeatures_1 = class MainThread
|
|
|
465
464
|
return result;
|
|
466
465
|
}
|
|
467
466
|
return {
|
|
468
|
-
suggestions: ( result[
|
|
469
|
-
d => MainThreadLanguageFeatures_1._inflateSuggestDto(result[
|
|
467
|
+
suggestions: ( result["b" ].map(
|
|
468
|
+
d => MainThreadLanguageFeatures_1._inflateSuggestDto(result["a" ], d, extensionId)
|
|
470
469
|
)),
|
|
471
|
-
incomplete: result[
|
|
472
|
-
duration: result[
|
|
470
|
+
incomplete: result["c" ] || false,
|
|
471
|
+
duration: result["d" ],
|
|
473
472
|
dispose: () => {
|
|
474
473
|
if (typeof result.x === 'number') {
|
|
475
474
|
this._proxy.$releaseCompletionItems(handle, result.x);
|
|
@@ -496,8 +495,8 @@ let MainThreadLanguageFeatures = MainThreadLanguageFeatures_1 = class MainThread
|
|
|
496
495
|
provideInlineCompletions: async (model, position, context, token) => {
|
|
497
496
|
return this._proxy.$provideInlineCompletions(handle, model.uri, position, context, token);
|
|
498
497
|
},
|
|
499
|
-
|
|
500
|
-
return this._proxy.$
|
|
498
|
+
provideInlineEditsForRange: async (model, range, context, token) => {
|
|
499
|
+
return this._proxy.$provideInlineEditsForRange(handle, model.uri, range, context, token);
|
|
501
500
|
},
|
|
502
501
|
handleItemDidShow: async (completions, item, updatedInsertText) => {
|
|
503
502
|
if (supportsHandleEvents) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
2
2
|
import { Disposable, DisposableMap } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
3
|
-
import { ExtHostContext, MainContext } from 'vscode/vscode/vs/workbench/api/common/extHost.protocol';
|
|
4
3
|
import { ILanguageModelToolsService } from 'vscode/vscode/vs/workbench/contrib/chat/common/languageModelToolsService.service';
|
|
5
4
|
import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
|
|
5
|
+
import { ExtHostContext, MainContext } from 'vscode/vscode/vs/workbench/api/common/extHost.protocol';
|
|
6
6
|
|
|
7
7
|
let MainThreadLanguageModelTools = class MainThreadLanguageModelTools extends Disposable {
|
|
8
8
|
constructor(extHostContext, _languageModelToolsService) {
|
|
@@ -16,8 +16,8 @@ let MainThreadLanguageModelTools = class MainThreadLanguageModelTools extends Di
|
|
|
16
16
|
async $getTools() {
|
|
17
17
|
return Array.from(this._languageModelToolsService.getTools());
|
|
18
18
|
}
|
|
19
|
-
$invokeTool(dto, token) {
|
|
20
|
-
return this._languageModelToolsService.invokeTool(dto, (input, token) => this._proxy.$countTokensForInvocation(dto.callId, input, token), token);
|
|
19
|
+
async $invokeTool(dto, token) {
|
|
20
|
+
return await this._languageModelToolsService.invokeTool(dto, (input, token) => this._proxy.$countTokensForInvocation(dto.callId, input, token), token);
|
|
21
21
|
}
|
|
22
22
|
$countTokensForInvocation(callId, input, token) {
|
|
23
23
|
const fn = this._countTokenCallbacks.get(callId);
|
|
@@ -26,8 +26,8 @@ let MainThreadLanguageModelTools = class MainThreadLanguageModelTools extends Di
|
|
|
26
26
|
}
|
|
27
27
|
return fn(input, token);
|
|
28
28
|
}
|
|
29
|
-
$registerTool(
|
|
30
|
-
const disposable = this._languageModelToolsService.registerToolImplementation(
|
|
29
|
+
$registerTool(id) {
|
|
30
|
+
const disposable = this._languageModelToolsService.registerToolImplementation(id, {
|
|
31
31
|
invoke: async (dto, countTokens, token) => {
|
|
32
32
|
try {
|
|
33
33
|
this._countTokenCallbacks.set(dto.callId, countTokens);
|
|
@@ -37,8 +37,10 @@ let MainThreadLanguageModelTools = class MainThreadLanguageModelTools extends Di
|
|
|
37
37
|
this._countTokenCallbacks.delete(dto.callId);
|
|
38
38
|
}
|
|
39
39
|
},
|
|
40
|
+
provideToolConfirmationMessages: (participantName, parameters, token) => this._proxy.$provideToolConfirmationMessages(id, participantName, parameters, token),
|
|
41
|
+
provideToolInvocationMessage: (parameters, token) => this._proxy.$provideToolInvocationMessage(id, parameters, token),
|
|
40
42
|
});
|
|
41
|
-
this._tools.set(
|
|
43
|
+
this._tools.set(id, disposable);
|
|
42
44
|
}
|
|
43
45
|
$unregisterTool(name) {
|
|
44
46
|
this._tools.deleteAndDispose(name);
|
|
@@ -129,7 +129,7 @@ let MainThreadLanguageModels = class MainThreadLanguageModels {
|
|
|
129
129
|
if (this._authenticationService.getProviderIds().includes(authProviderId)) {
|
|
130
130
|
return Disposable.None;
|
|
131
131
|
}
|
|
132
|
-
const accountLabel = auth.accountLabel ?? ( localize(
|
|
132
|
+
const accountLabel = auth.accountLabel ?? ( localize(4833, 'Language Models'));
|
|
133
133
|
const disposables = ( (new DisposableStore()));
|
|
134
134
|
this._authenticationService.registerAuthenticationProvider(authProviderId, ( (new LanguageModelAccessAuthProvider(authProviderId, auth.providerLabel, accountLabel))));
|
|
135
135
|
disposables.add(toDisposable(() => {
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
2
2
|
import { Emitter } from 'vscode/vscode/vs/base/common/event';
|
|
3
3
|
import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
4
|
-
import { SocketCloseEventType } from 'vscode/vscode/vs/base/parts/ipc/common/ipc.net';
|
|
5
4
|
import { ManagedSocket, connectManagedSocket } from '../../../platform/remote/common/managedSocket.js';
|
|
6
|
-
import { RemoteConnectionType } from 'vscode/vscode/vs/platform/remote/common/remoteAuthorityResolver';
|
|
7
5
|
import { IRemoteSocketFactoryService } from 'vscode/vscode/vs/platform/remote/common/remoteSocketFactoryService.service';
|
|
8
6
|
import { ExtHostContext, MainContext } from 'vscode/vscode/vs/workbench/api/common/extHost.protocol';
|
|
9
7
|
import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
|
|
@@ -47,7 +45,7 @@ let MainThreadManagedSockets = class MainThreadManagedSockets extends Disposable
|
|
|
47
45
|
}));
|
|
48
46
|
}
|
|
49
47
|
});
|
|
50
|
-
this._registrations.set(socketFactoryId, this._remoteSocketFactoryService.register(
|
|
48
|
+
this._registrations.set(socketFactoryId, this._remoteSocketFactoryService.register(1 , socketFactory));
|
|
51
49
|
}
|
|
52
50
|
async $unregisterSocketFactory(socketFactoryId) {
|
|
53
51
|
this._registrations.get(socketFactoryId)?.dispose();
|
|
@@ -57,7 +55,7 @@ let MainThreadManagedSockets = class MainThreadManagedSockets extends Disposable
|
|
|
57
55
|
}
|
|
58
56
|
$onDidManagedSocketClose(socketId, error) {
|
|
59
57
|
this._remoteSockets.get(socketId)?.onClose.fire({
|
|
60
|
-
type:
|
|
58
|
+
type: 0 ,
|
|
61
59
|
error: error ? ( new Error(error)) : undefined,
|
|
62
60
|
hadError: !!error
|
|
63
61
|
});
|
|
@@ -51,13 +51,13 @@ let MainThreadMessageService = class MainThreadMessageService {
|
|
|
51
51
|
};
|
|
52
52
|
}
|
|
53
53
|
if (!source) {
|
|
54
|
-
source = ( localize(
|
|
54
|
+
source = ( localize(4864, "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(4865, "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(4866, "Cancel")),
|
|
97
97
|
run: () => undefined
|
|
98
98
|
};
|
|
99
99
|
}
|
|
100
100
|
else {
|
|
101
101
|
cancelButton = {
|
|
102
|
-
label: ( localize(
|
|
102
|
+
label: ( localize(4867, "&&OK")),
|
|
103
103
|
run: () => undefined
|
|
104
104
|
};
|
|
105
105
|
}
|
|
@@ -171,7 +171,8 @@ let MainThreadNotebooksAndEditors = MainThreadNotebooksAndEditors_1 = class Main
|
|
|
171
171
|
documentUri: add.textModel.uri,
|
|
172
172
|
selections: add.getSelections(),
|
|
173
173
|
visibleRanges: add.visibleRanges,
|
|
174
|
-
viewColumn: pane && editorGroupToColumn(this._editorGroupService, pane.group)
|
|
174
|
+
viewColumn: pane && editorGroupToColumn(this._editorGroupService, pane.group),
|
|
175
|
+
viewType: add.getViewModel().viewType
|
|
175
176
|
};
|
|
176
177
|
}
|
|
177
178
|
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { CellEditType } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookCommon';
|
|
2
1
|
import { CellExecutionUpdateType } from 'vscode/vscode/vs/workbench/contrib/notebook/common/notebookExecutionService';
|
|
3
2
|
|
|
4
3
|
var NotebookDto;
|
|
@@ -112,7 +111,7 @@ var NotebookDto;
|
|
|
112
111
|
}
|
|
113
112
|
NotebookDto.fromCellExecuteCompleteDto = fromCellExecuteCompleteDto;
|
|
114
113
|
function fromCellEditOperationDto(edit) {
|
|
115
|
-
if (edit.editType ===
|
|
114
|
+
if (edit.editType === 1 ) {
|
|
116
115
|
return {
|
|
117
116
|
editType: edit.editType,
|
|
118
117
|
index: edit.index,
|
|
@@ -3,7 +3,7 @@ import { isNonEmptyArray } from 'vscode/vscode/vs/base/common/arrays';
|
|
|
3
3
|
import { CancellationToken } from 'vscode/vscode/vs/base/common/cancellation';
|
|
4
4
|
import { onUnexpectedError } from 'vscode/vscode/vs/base/common/errors';
|
|
5
5
|
import { Emitter } from 'vscode/vscode/vs/base/common/event';
|
|
6
|
-
import { DisposableMap, DisposableStore, toDisposable
|
|
6
|
+
import { DisposableMap, DisposableStore, toDisposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
7
7
|
import { URI } from 'vscode/vscode/vs/base/common/uri';
|
|
8
8
|
import { ILanguageService } from 'vscode/vscode/vs/editor/common/languages/language';
|
|
9
9
|
import { NotebookDto } from './mainThreadNotebookDto.js';
|
|
@@ -109,6 +109,16 @@ let MainThreadNotebookKernels = class MainThreadNotebookKernels {
|
|
|
109
109
|
this._proxy.$cellExecutionChanged(e.notebook, e.cellHandle, e.changed?.state);
|
|
110
110
|
}
|
|
111
111
|
}));
|
|
112
|
+
this._disposables.add(this._notebookKernelService.onDidChangeSelectedNotebooks(e => {
|
|
113
|
+
for (const [handle, [kernel,]] of this._kernels) {
|
|
114
|
+
if (e.oldKernel === kernel.id) {
|
|
115
|
+
this._proxy.$acceptNotebookAssociation(handle, e.notebook, false);
|
|
116
|
+
}
|
|
117
|
+
else if (e.newKernel === kernel.id) {
|
|
118
|
+
this._proxy.$acceptNotebookAssociation(handle, e.notebook, true);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}));
|
|
112
122
|
}
|
|
113
123
|
dispose() {
|
|
114
124
|
this._disposables.dispose();
|
|
@@ -202,16 +212,9 @@ let MainThreadNotebookKernels = class MainThreadNotebookKernels {
|
|
|
202
212
|
return source.asyncIterable;
|
|
203
213
|
}
|
|
204
214
|
})(data, this._languageService);
|
|
205
|
-
const
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
}
|
|
209
|
-
else if (e.newKernel === kernel.id) {
|
|
210
|
-
this._proxy.$acceptNotebookAssociation(handle, e.notebook, true);
|
|
211
|
-
}
|
|
212
|
-
});
|
|
213
|
-
const registration = this._notebookKernelService.registerKernel(kernel);
|
|
214
|
-
this._kernels.set(handle, [kernel, combinedDisposable(listener, registration)]);
|
|
215
|
+
const disposables = this._disposables.add(( new DisposableStore()));
|
|
216
|
+
this._kernels.set(handle, [kernel, disposables]);
|
|
217
|
+
disposables.add(this._notebookKernelService.registerKernel(kernel));
|
|
215
218
|
}
|
|
216
219
|
$updateKernel(handle, data) {
|
|
217
220
|
const tuple = this._kernels.get(handle);
|
|
@@ -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(4879, "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;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
2
|
-
import { ProgressLocation } from 'vscode/vscode/vs/platform/progress/common/progress';
|
|
3
2
|
import { IProgressService } from 'vscode/vscode/vs/platform/progress/common/progress.service';
|
|
4
3
|
import { ExtHostContext, MainContext } from 'vscode/vscode/vs/workbench/api/common/extHost.protocol';
|
|
5
4
|
import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
|
|
@@ -27,11 +26,11 @@ let MainThreadProgress = class MainThreadProgress {
|
|
|
27
26
|
}
|
|
28
27
|
async $startProgress(handle, options, extensionId) {
|
|
29
28
|
const task = this._createTask(handle);
|
|
30
|
-
if (options.location ===
|
|
29
|
+
if (options.location === 15 && extensionId) {
|
|
31
30
|
const notificationOptions = {
|
|
32
31
|
...options,
|
|
33
|
-
location:
|
|
34
|
-
secondaryActions: [( (new ManageExtensionAction(extensionId, ( localize(
|
|
32
|
+
location: 15 ,
|
|
33
|
+
secondaryActions: [( (new ManageExtensionAction(extensionId, ( localize(4868, "Manage Extension")), this._commandService)))]
|
|
35
34
|
};
|
|
36
35
|
options = notificationOptions;
|
|
37
36
|
}
|