@codingame/monaco-vscode-extensions-service-override 3.2.3 → 4.1.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 +6 -87
- package/override/vs/platform/dialogs/common/dialogs.js +2 -0
- package/package.json +9 -9
- package/_virtual/semver.js +0 -3
- package/external/vscode-semver/semver.js +0 -985
- package/override/vs/workbench/browser/parts/editor/textEditor.weak.js +0 -8
- package/vscode/src/vs/base/common/console.js +0 -59
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagementCLI.js +0 -497
- package/vscode/src/vs/platform/extensionResourceLoader/browser/extensionResourceLoaderService.js +0 -44
- package/vscode/src/vs/platform/lifecycle/common/lifecycle.js +0 -27
- package/vscode/src/vs/platform/remote/common/managedSocket.js +0 -98
- package/vscode/src/vs/workbench/api/browser/mainThreadAiEmbeddingVector.js +0 -31
- package/vscode/src/vs/workbench/api/browser/mainThreadAiRelatedInformation.js +0 -35
- package/vscode/src/vs/workbench/api/browser/mainThreadAuthentication.js +0 -227
- package/vscode/src/vs/workbench/api/browser/mainThreadBulkEdits.js +0 -68
- package/vscode/src/vs/workbench/api/browser/mainThreadCLICommands.js +0 -103
- package/vscode/src/vs/workbench/api/browser/mainThreadChat.js +0 -83
- package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents2.js +0 -203
- package/vscode/src/vs/workbench/api/browser/mainThreadChatProvider.js +0 -201
- package/vscode/src/vs/workbench/api/browser/mainThreadChatVariables.js +0 -41
- package/vscode/src/vs/workbench/api/browser/mainThreadClipboard.js +0 -24
- package/vscode/src/vs/workbench/api/browser/mainThreadCodeInsets.js +0 -107
- package/vscode/src/vs/workbench/api/browser/mainThreadCommands.js +0 -98
- package/vscode/src/vs/workbench/api/browser/mainThreadComments.js +0 -545
- package/vscode/src/vs/workbench/api/browser/mainThreadConfiguration.js +0 -80
- package/vscode/src/vs/workbench/api/browser/mainThreadConsole.js +0 -35
- package/vscode/src/vs/workbench/api/browser/mainThreadCustomEditors.js +0 -578
- package/vscode/src/vs/workbench/api/browser/mainThreadDebugService.js +0 -424
- package/vscode/src/vs/workbench/api/browser/mainThreadDecorations.js +0 -102
- package/vscode/src/vs/workbench/api/browser/mainThreadDiagnostics.js +0 -69
- package/vscode/src/vs/workbench/api/browser/mainThreadDialogs.js +0 -68
- package/vscode/src/vs/workbench/api/browser/mainThreadDocumentContentProviders.js +0 -79
- package/vscode/src/vs/workbench/api/browser/mainThreadDocuments.js +0 -253
- package/vscode/src/vs/workbench/api/browser/mainThreadDocumentsAndEditors.js +0 -370
- package/vscode/src/vs/workbench/api/browser/mainThreadDownloadService.js +0 -22
- package/vscode/src/vs/workbench/api/browser/mainThreadEditSessionIdentityParticipant.js +0 -41
- package/vscode/src/vs/workbench/api/browser/mainThreadEditor.js +0 -414
- package/vscode/src/vs/workbench/api/browser/mainThreadEditorTabs.js +0 -482
- package/vscode/src/vs/workbench/api/browser/mainThreadEditors.js +0 -227
- package/vscode/src/vs/workbench/api/browser/mainThreadErrors.js +0 -24
- package/vscode/src/vs/workbench/api/browser/mainThreadExtensionService.js +0 -317
- package/vscode/src/vs/workbench/api/browser/mainThreadFileSystem.js +0 -208
- package/vscode/src/vs/workbench/api/browser/mainThreadFileSystemEventService.js +0 -374
- package/vscode/src/vs/workbench/api/browser/mainThreadInlineChat.js +0 -72
- package/vscode/src/vs/workbench/api/browser/mainThreadInteractive.js +0 -28
- package/vscode/src/vs/workbench/api/browser/mainThreadIssueReporter.js +0 -50
- package/vscode/src/vs/workbench/api/browser/mainThreadLabelService.js +0 -27
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageFeatures.js +0 -991
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguages.js +0 -78
- package/vscode/src/vs/workbench/api/browser/mainThreadLocalization.js +0 -35
- package/vscode/src/vs/workbench/api/browser/mainThreadLogService.js +0 -78
- package/vscode/src/vs/workbench/api/browser/mainThreadManagedSockets.js +0 -93
- package/vscode/src/vs/workbench/api/browser/mainThreadMessageService.js +0 -137
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebook.js +0 -194
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDocuments.js +0 -123
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDocumentsAndEditors.js +0 -188
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDto.js +0 -129
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookEditors.js +0 -131
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookKernels.js +0 -374
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookRenderers.js +0 -25
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookSaveParticipant.js +0 -48
- package/vscode/src/vs/workbench/api/browser/mainThreadOutputService.js +0 -76
- package/vscode/src/vs/workbench/api/browser/mainThreadProfilContentHandlers.js +0 -38
- package/vscode/src/vs/workbench/api/browser/mainThreadProgress.js +0 -68
- package/vscode/src/vs/workbench/api/browser/mainThreadQuickDiff.js +0 -42
- package/vscode/src/vs/workbench/api/browser/mainThreadQuickOpen.js +0 -185
- package/vscode/src/vs/workbench/api/browser/mainThreadRemoteConnectionData.js +0 -30
- package/vscode/src/vs/workbench/api/browser/mainThreadSCM.js +0 -493
- package/vscode/src/vs/workbench/api/browser/mainThreadSaveParticipant.js +0 -49
- package/vscode/src/vs/workbench/api/browser/mainThreadSearch.js +0 -146
- package/vscode/src/vs/workbench/api/browser/mainThreadSecretState.js +0 -70
- package/vscode/src/vs/workbench/api/browser/mainThreadShare.js +0 -50
- package/vscode/src/vs/workbench/api/browser/mainThreadSpeech.js +0 -99
- package/vscode/src/vs/workbench/api/browser/mainThreadStatusBar.js +0 -53
- package/vscode/src/vs/workbench/api/browser/mainThreadStorage.js +0 -72
- package/vscode/src/vs/workbench/api/browser/mainThreadTask.js +0 -731
- package/vscode/src/vs/workbench/api/browser/mainThreadTelemetry.js +0 -53
- package/vscode/src/vs/workbench/api/browser/mainThreadTerminalService.js +0 -408
- package/vscode/src/vs/workbench/api/browser/mainThreadTesting.js +0 -195
- package/vscode/src/vs/workbench/api/browser/mainThreadTheming.js +0 -24
- package/vscode/src/vs/workbench/api/browser/mainThreadTimeline.js +0 -55
- package/vscode/src/vs/workbench/api/browser/mainThreadTreeViews.js +0 -312
- package/vscode/src/vs/workbench/api/browser/mainThreadTunnelService.js +0 -223
- package/vscode/src/vs/workbench/api/browser/mainThreadUriOpeners.js +0 -110
- package/vscode/src/vs/workbench/api/browser/mainThreadUrls.js +0 -61
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviewManager.js +0 -29
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviewPanels.js +0 -283
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviewViews.js +0 -100
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviews.js +0 -135
- package/vscode/src/vs/workbench/api/browser/mainThreadWindow.js +0 -57
- package/vscode/src/vs/workbench/api/browser/mainThreadWorkspace.js +0 -268
- package/vscode/src/vs/workbench/api/common/shared/dataTransferCache.js +0 -35
- package/vscode/src/vs/workbench/contrib/customEditor/common/customTextEditorModel.js +0 -73
- package/vscode/src/vs/workbench/contrib/externalUriOpener/common/contributedOpeners.js +0 -83
- package/vscode/src/vs/workbench/services/extensions/browser/extensionService.js +0 -284
- package/vscode/src/vs/workbench/services/extensions/browser/webWorkerExtensionHost.js +0 -276
- package/vscode/src/vs/workbench/services/extensions/browser/webWorkerFileSystemProvider.js +0 -52
- package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.js +0 -1138
- package/vscode/src/vs/workbench/services/extensions/common/extHostCustomers.js +0 -41
- package/vscode/src/vs/workbench/services/extensions/common/extensionDevOptions.js +0 -25
- package/vscode/src/vs/workbench/services/extensions/common/extensionHostManager.js +0 -512
- package/vscode/src/vs/workbench/services/extensions/common/extensionRunningLocationTracker.js +0 -274
- package/vscode/src/vs/workbench/services/extensions/common/extensionStorageMigration.js +0 -58
- package/vscode/src/vs/workbench/services/extensions/common/extensionsProposedApi.js +0 -80
- package/vscode/src/vs/workbench/services/extensions/common/extensionsUtil.js +0 -64
- package/vscode/src/vs/workbench/services/extensions/common/lazyCreateExtensionHostManager.js +0 -161
- package/vscode/src/vs/workbench/services/extensions/common/remoteConsoleUtil.js +0 -49
- package/vscode/src/vs/workbench/services/extensions/common/remoteExtensionHost.js +0 -222
|
@@ -1,208 +0,0 @@
|
|
|
1
|
-
import { __decorate, __param } from '../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
-
import { Emitter, Event } from 'vscode/vscode/vs/base/common/event';
|
|
3
|
-
import { DisposableMap, DisposableStore, toDisposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
4
|
-
import { URI } from 'vscode/vscode/vs/base/common/uri';
|
|
5
|
-
import { IFileService, FilePermission, FileSystemProviderErrorCode, FileType, FileOperationError, toFileSystemProviderErrorCode } from 'vscode/vscode/vs/platform/files/common/files';
|
|
6
|
-
import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
|
|
7
|
-
import { MainContext, ExtHostContext } from 'vscode/vscode/vs/workbench/api/common/extHost.protocol';
|
|
8
|
-
import { VSBuffer } from 'vscode/vscode/vs/base/common/buffer';
|
|
9
|
-
|
|
10
|
-
var MainThreadFileSystem_1;
|
|
11
|
-
let MainThreadFileSystem = MainThreadFileSystem_1 = class MainThreadFileSystem {
|
|
12
|
-
constructor(extHostContext, _fileService) {
|
|
13
|
-
this._fileService = _fileService;
|
|
14
|
-
this._fileProvider = ( new DisposableMap());
|
|
15
|
-
this._disposables = ( new DisposableStore());
|
|
16
|
-
this._proxy = ( extHostContext.getProxy(ExtHostContext.ExtHostFileSystem));
|
|
17
|
-
const infoProxy = ( extHostContext.getProxy(ExtHostContext.ExtHostFileSystemInfo));
|
|
18
|
-
for (const entry of _fileService.listCapabilities()) {
|
|
19
|
-
infoProxy.$acceptProviderInfos(( URI.from({ scheme: entry.scheme, path: '/dummy' })), entry.capabilities);
|
|
20
|
-
}
|
|
21
|
-
this._disposables.add(_fileService.onDidChangeFileSystemProviderRegistrations(e => infoProxy.$acceptProviderInfos(( URI.from({ scheme: e.scheme, path: '/dummy' })), e.provider?.capabilities ?? null)));
|
|
22
|
-
this._disposables.add(_fileService.onDidChangeFileSystemProviderCapabilities(e => infoProxy.$acceptProviderInfos(( URI.from({ scheme: e.scheme, path: '/dummy' })), e.provider.capabilities)));
|
|
23
|
-
}
|
|
24
|
-
dispose() {
|
|
25
|
-
this._disposables.dispose();
|
|
26
|
-
this._fileProvider.dispose();
|
|
27
|
-
}
|
|
28
|
-
async $registerFileSystemProvider(handle, scheme, capabilities, readonlyMessage) {
|
|
29
|
-
this._fileProvider.set(handle, ( new RemoteFileSystemProvider(
|
|
30
|
-
this._fileService,
|
|
31
|
-
scheme,
|
|
32
|
-
capabilities,
|
|
33
|
-
readonlyMessage,
|
|
34
|
-
handle,
|
|
35
|
-
this._proxy
|
|
36
|
-
)));
|
|
37
|
-
}
|
|
38
|
-
$unregisterProvider(handle) {
|
|
39
|
-
this._fileProvider.deleteAndDispose(handle);
|
|
40
|
-
}
|
|
41
|
-
$onFileSystemChange(handle, changes) {
|
|
42
|
-
const fileProvider = this._fileProvider.get(handle);
|
|
43
|
-
if (!fileProvider) {
|
|
44
|
-
throw new Error('Unknown file provider');
|
|
45
|
-
}
|
|
46
|
-
fileProvider.$onFileSystemChange(changes);
|
|
47
|
-
}
|
|
48
|
-
$stat(uri) {
|
|
49
|
-
return this._fileService.stat(URI.revive(uri)).then(stat => {
|
|
50
|
-
return {
|
|
51
|
-
ctime: stat.ctime,
|
|
52
|
-
mtime: stat.mtime,
|
|
53
|
-
size: stat.size,
|
|
54
|
-
permissions: stat.readonly ? FilePermission.Readonly : undefined,
|
|
55
|
-
type: MainThreadFileSystem_1._asFileType(stat)
|
|
56
|
-
};
|
|
57
|
-
}).catch(MainThreadFileSystem_1._handleError);
|
|
58
|
-
}
|
|
59
|
-
$readdir(uri) {
|
|
60
|
-
return this._fileService.resolve(URI.revive(uri), { resolveMetadata: false }).then(stat => {
|
|
61
|
-
if (!stat.isDirectory) {
|
|
62
|
-
const err = ( new Error(stat.name));
|
|
63
|
-
err.name = FileSystemProviderErrorCode.FileNotADirectory;
|
|
64
|
-
throw err;
|
|
65
|
-
}
|
|
66
|
-
return !stat.children ? [] : ( stat.children.map(child => [child.name, MainThreadFileSystem_1._asFileType(child)]));
|
|
67
|
-
}).catch(MainThreadFileSystem_1._handleError);
|
|
68
|
-
}
|
|
69
|
-
static _asFileType(stat) {
|
|
70
|
-
let res = 0;
|
|
71
|
-
if (stat.isFile) {
|
|
72
|
-
res += FileType.File;
|
|
73
|
-
}
|
|
74
|
-
else if (stat.isDirectory) {
|
|
75
|
-
res += FileType.Directory;
|
|
76
|
-
}
|
|
77
|
-
if (stat.isSymbolicLink) {
|
|
78
|
-
res += FileType.SymbolicLink;
|
|
79
|
-
}
|
|
80
|
-
return res;
|
|
81
|
-
}
|
|
82
|
-
$readFile(uri) {
|
|
83
|
-
return this._fileService.readFile(URI.revive(uri)).then(file => file.value).catch(MainThreadFileSystem_1._handleError);
|
|
84
|
-
}
|
|
85
|
-
$writeFile(uri, content) {
|
|
86
|
-
return this._fileService.writeFile(URI.revive(uri), content)
|
|
87
|
-
.then(() => undefined).catch(MainThreadFileSystem_1._handleError);
|
|
88
|
-
}
|
|
89
|
-
$rename(source, target, opts) {
|
|
90
|
-
return this._fileService.move(URI.revive(source), URI.revive(target), opts.overwrite)
|
|
91
|
-
.then(() => undefined).catch(MainThreadFileSystem_1._handleError);
|
|
92
|
-
}
|
|
93
|
-
$copy(source, target, opts) {
|
|
94
|
-
return this._fileService.copy(URI.revive(source), URI.revive(target), opts.overwrite)
|
|
95
|
-
.then(() => undefined).catch(MainThreadFileSystem_1._handleError);
|
|
96
|
-
}
|
|
97
|
-
$mkdir(uri) {
|
|
98
|
-
return this._fileService.createFolder(URI.revive(uri))
|
|
99
|
-
.then(() => undefined).catch(MainThreadFileSystem_1._handleError);
|
|
100
|
-
}
|
|
101
|
-
$delete(uri, opts) {
|
|
102
|
-
return this._fileService.del(URI.revive(uri), opts).catch(MainThreadFileSystem_1._handleError);
|
|
103
|
-
}
|
|
104
|
-
static _handleError(err) {
|
|
105
|
-
if (err instanceof FileOperationError) {
|
|
106
|
-
switch (err.fileOperationResult) {
|
|
107
|
-
case 1 :
|
|
108
|
-
err.name = FileSystemProviderErrorCode.FileNotFound;
|
|
109
|
-
break;
|
|
110
|
-
case 0 :
|
|
111
|
-
err.name = FileSystemProviderErrorCode.FileIsADirectory;
|
|
112
|
-
break;
|
|
113
|
-
case 6 :
|
|
114
|
-
err.name = FileSystemProviderErrorCode.NoPermissions;
|
|
115
|
-
break;
|
|
116
|
-
case 4 :
|
|
117
|
-
err.name = FileSystemProviderErrorCode.FileExists;
|
|
118
|
-
break;
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
else if (err instanceof Error) {
|
|
122
|
-
const code = toFileSystemProviderErrorCode(err);
|
|
123
|
-
if (code !== FileSystemProviderErrorCode.Unknown) {
|
|
124
|
-
err.name = code;
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
throw err;
|
|
128
|
-
}
|
|
129
|
-
$ensureActivation(scheme) {
|
|
130
|
-
return this._fileService.activateProvider(scheme);
|
|
131
|
-
}
|
|
132
|
-
};
|
|
133
|
-
MainThreadFileSystem = MainThreadFileSystem_1 = __decorate([
|
|
134
|
-
extHostNamedCustomer(MainContext.MainThreadFileSystem),
|
|
135
|
-
( __param(1, IFileService))
|
|
136
|
-
], MainThreadFileSystem);
|
|
137
|
-
class RemoteFileSystemProvider {
|
|
138
|
-
constructor(fileService, scheme, capabilities, readOnlyMessage, _handle, _proxy) {
|
|
139
|
-
this.readOnlyMessage = readOnlyMessage;
|
|
140
|
-
this._handle = _handle;
|
|
141
|
-
this._proxy = _proxy;
|
|
142
|
-
this._onDidChange = ( new Emitter());
|
|
143
|
-
this.onDidChangeFile = this._onDidChange.event;
|
|
144
|
-
this.onDidChangeCapabilities = Event.None;
|
|
145
|
-
this.capabilities = capabilities;
|
|
146
|
-
this._registration = fileService.registerProvider(scheme, this);
|
|
147
|
-
}
|
|
148
|
-
dispose() {
|
|
149
|
-
this._registration.dispose();
|
|
150
|
-
this._onDidChange.dispose();
|
|
151
|
-
}
|
|
152
|
-
watch(resource, opts) {
|
|
153
|
-
const session = Math.random();
|
|
154
|
-
this._proxy.$watch(this._handle, session, resource, opts);
|
|
155
|
-
return toDisposable(() => {
|
|
156
|
-
this._proxy.$unwatch(this._handle, session);
|
|
157
|
-
});
|
|
158
|
-
}
|
|
159
|
-
$onFileSystemChange(changes) {
|
|
160
|
-
this._onDidChange.fire(( changes.map(RemoteFileSystemProvider._createFileChange)));
|
|
161
|
-
}
|
|
162
|
-
static _createFileChange(dto) {
|
|
163
|
-
return { resource: URI.revive(dto.resource), type: dto.type };
|
|
164
|
-
}
|
|
165
|
-
stat(resource) {
|
|
166
|
-
return this._proxy.$stat(this._handle, resource).then(undefined, err => {
|
|
167
|
-
throw err;
|
|
168
|
-
});
|
|
169
|
-
}
|
|
170
|
-
readFile(resource) {
|
|
171
|
-
return this._proxy.$readFile(this._handle, resource).then(buffer => buffer.buffer);
|
|
172
|
-
}
|
|
173
|
-
writeFile(resource, content, opts) {
|
|
174
|
-
return this._proxy.$writeFile(this._handle, resource, VSBuffer.wrap(content), opts);
|
|
175
|
-
}
|
|
176
|
-
delete(resource, opts) {
|
|
177
|
-
return this._proxy.$delete(this._handle, resource, opts);
|
|
178
|
-
}
|
|
179
|
-
mkdir(resource) {
|
|
180
|
-
return this._proxy.$mkdir(this._handle, resource);
|
|
181
|
-
}
|
|
182
|
-
readdir(resource) {
|
|
183
|
-
return this._proxy.$readdir(this._handle, resource);
|
|
184
|
-
}
|
|
185
|
-
rename(resource, target, opts) {
|
|
186
|
-
return this._proxy.$rename(this._handle, resource, target, opts);
|
|
187
|
-
}
|
|
188
|
-
copy(resource, target, opts) {
|
|
189
|
-
return this._proxy.$copy(this._handle, resource, target, opts);
|
|
190
|
-
}
|
|
191
|
-
open(resource, opts) {
|
|
192
|
-
return this._proxy.$open(this._handle, resource, opts);
|
|
193
|
-
}
|
|
194
|
-
close(fd) {
|
|
195
|
-
return this._proxy.$close(this._handle, fd);
|
|
196
|
-
}
|
|
197
|
-
read(fd, pos, data, offset, length) {
|
|
198
|
-
return this._proxy.$read(this._handle, fd, pos, length).then(readData => {
|
|
199
|
-
data.set(readData.buffer, offset);
|
|
200
|
-
return readData.byteLength;
|
|
201
|
-
});
|
|
202
|
-
}
|
|
203
|
-
write(fd, pos, data, offset, length) {
|
|
204
|
-
return this._proxy.$write(this._handle, fd, pos, VSBuffer.wrap(data).slice(offset, offset + length));
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
export { MainThreadFileSystem };
|
|
@@ -1,374 +0,0 @@
|
|
|
1
|
-
import { __decorate, __param } from '../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
-
import { DisposableStore, DisposableMap } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
3
|
-
import { IFileService } from 'vscode/vscode/vs/platform/files/common/files';
|
|
4
|
-
import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
|
|
5
|
-
import { ExtHostContext, MainContext } from 'vscode/vscode/vs/workbench/api/common/extHost.protocol';
|
|
6
|
-
import { localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
7
|
-
import { IWorkingCopyFileService } from 'vscode/vscode/vs/workbench/services/workingCopy/common/workingCopyFileService';
|
|
8
|
-
import { IBulkEditService } from 'vscode/vscode/vs/editor/browser/services/bulkEditService';
|
|
9
|
-
import { IProgressService } from 'vscode/vscode/vs/platform/progress/common/progress';
|
|
10
|
-
import { raceCancellation } from 'vscode/vscode/vs/base/common/async';
|
|
11
|
-
import { CancellationTokenSource } from 'vscode/vscode/vs/base/common/cancellation';
|
|
12
|
-
import '../../../../../../override/vs/platform/dialogs/common/dialogs.js';
|
|
13
|
-
import Severity from 'vscode/vscode/vs/base/common/severity';
|
|
14
|
-
import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage';
|
|
15
|
-
import { registerAction2, Action2 } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
16
|
-
import { ILogService } from 'vscode/vscode/vs/platform/log/common/log';
|
|
17
|
-
import { IEnvironmentService } from 'vscode/vscode/vs/platform/environment/common/environment';
|
|
18
|
-
import { IUriIdentityService } from 'vscode/vscode/vs/platform/uriIdentity/common/uriIdentity';
|
|
19
|
-
import { reviveWorkspaceEditDto } from './mainThreadBulkEdits.js';
|
|
20
|
-
import { GLOBSTAR } from 'vscode/vscode/vs/base/common/glob';
|
|
21
|
-
import { rtrim } from 'vscode/vscode/vs/base/common/strings';
|
|
22
|
-
import { URI } from 'vscode/vscode/vs/base/common/uri';
|
|
23
|
-
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration';
|
|
24
|
-
import { normalizeWatcherPattern } from 'vscode/vscode/vs/platform/files/common/watcher';
|
|
25
|
-
import { IWorkspaceContextService } from 'vscode/vscode/vs/platform/workspace/common/workspace';
|
|
26
|
-
import { IDialogService } from 'vscode/vscode/vs/platform/dialogs/common/dialogs';
|
|
27
|
-
|
|
28
|
-
var MainThreadFileSystemEventService_1;
|
|
29
|
-
let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
|
|
30
|
-
static { MainThreadFileSystemEventService_1 = this; }
|
|
31
|
-
static { this.MementoKeyAdditionalEdits = `file.particpants.additionalEdits`; }
|
|
32
|
-
constructor(extHostContext, _fileService, workingCopyFileService, bulkEditService, progressService, dialogService, storageService, logService, envService, uriIdentService, _contextService, _logService, _configurationService) {
|
|
33
|
-
this._fileService = _fileService;
|
|
34
|
-
this._contextService = _contextService;
|
|
35
|
-
this._logService = _logService;
|
|
36
|
-
this._configurationService = _configurationService;
|
|
37
|
-
this._listener = ( new DisposableStore());
|
|
38
|
-
this._watches = ( new DisposableMap());
|
|
39
|
-
this._proxy = ( extHostContext.getProxy(ExtHostContext.ExtHostFileSystemEventService));
|
|
40
|
-
this._listener.add(_fileService.onDidFilesChange(event => {
|
|
41
|
-
this._proxy.$onFileEvent({
|
|
42
|
-
created: event.rawAdded,
|
|
43
|
-
changed: event.rawUpdated,
|
|
44
|
-
deleted: event.rawDeleted
|
|
45
|
-
});
|
|
46
|
-
}));
|
|
47
|
-
const that = this;
|
|
48
|
-
const fileOperationParticipant = new (class {
|
|
49
|
-
async participate(files, operation, undoInfo, timeout, token) {
|
|
50
|
-
if (undoInfo?.isUndoing) {
|
|
51
|
-
return;
|
|
52
|
-
}
|
|
53
|
-
const cts = ( new CancellationTokenSource(token));
|
|
54
|
-
const timer = setTimeout(() => cts.cancel(), timeout);
|
|
55
|
-
const data = await progressService.withProgress({
|
|
56
|
-
location: 15 ,
|
|
57
|
-
title: this._progressLabel(operation),
|
|
58
|
-
cancellable: true,
|
|
59
|
-
delay: Math.min(timeout / 2, 3000)
|
|
60
|
-
}, () => {
|
|
61
|
-
const onWillEvent = that._proxy.$onWillRunFileOperation(operation, files, timeout, cts.token);
|
|
62
|
-
return raceCancellation(onWillEvent, cts.token);
|
|
63
|
-
}, () => {
|
|
64
|
-
cts.cancel();
|
|
65
|
-
}).finally(() => {
|
|
66
|
-
cts.dispose();
|
|
67
|
-
clearTimeout(timer);
|
|
68
|
-
});
|
|
69
|
-
if (!data || data.edit.edits.length === 0) {
|
|
70
|
-
return;
|
|
71
|
-
}
|
|
72
|
-
const needsConfirmation = ( data.edit.edits.some(edit => edit.metadata?.needsConfirmation));
|
|
73
|
-
let showPreview = storageService.getBoolean(MainThreadFileSystemEventService_1.MementoKeyAdditionalEdits, 0 );
|
|
74
|
-
if (envService.extensionTestsLocationURI) {
|
|
75
|
-
showPreview = false;
|
|
76
|
-
}
|
|
77
|
-
if (showPreview === undefined) {
|
|
78
|
-
let message;
|
|
79
|
-
if (data.extensionNames.length === 1) {
|
|
80
|
-
if (operation === 0 ) {
|
|
81
|
-
message = ( localizeWithPath(
|
|
82
|
-
'vs/workbench/api/browser/mainThreadFileSystemEventService',
|
|
83
|
-
'ask.1.create',
|
|
84
|
-
"Extension '{0}' wants to make refactoring changes with this file creation",
|
|
85
|
-
data.extensionNames[0]
|
|
86
|
-
));
|
|
87
|
-
}
|
|
88
|
-
else if (operation === 3 ) {
|
|
89
|
-
message = ( localizeWithPath(
|
|
90
|
-
'vs/workbench/api/browser/mainThreadFileSystemEventService',
|
|
91
|
-
'ask.1.copy',
|
|
92
|
-
"Extension '{0}' wants to make refactoring changes with this file copy",
|
|
93
|
-
data.extensionNames[0]
|
|
94
|
-
));
|
|
95
|
-
}
|
|
96
|
-
else if (operation === 2 ) {
|
|
97
|
-
message = ( localizeWithPath(
|
|
98
|
-
'vs/workbench/api/browser/mainThreadFileSystemEventService',
|
|
99
|
-
'ask.1.move',
|
|
100
|
-
"Extension '{0}' wants to make refactoring changes with this file move",
|
|
101
|
-
data.extensionNames[0]
|
|
102
|
-
));
|
|
103
|
-
}
|
|
104
|
-
else {
|
|
105
|
-
message = ( localizeWithPath(
|
|
106
|
-
'vs/workbench/api/browser/mainThreadFileSystemEventService',
|
|
107
|
-
'ask.1.delete',
|
|
108
|
-
"Extension '{0}' wants to make refactoring changes with this file deletion",
|
|
109
|
-
data.extensionNames[0]
|
|
110
|
-
));
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
else {
|
|
114
|
-
if (operation === 0 ) {
|
|
115
|
-
message = ( localizeWithPath(
|
|
116
|
-
'vs/workbench/api/browser/mainThreadFileSystemEventService',
|
|
117
|
-
{ key: 'ask.N.create', comment: ['{0} is a number, e.g "3 extensions want..."'] },
|
|
118
|
-
"{0} extensions want to make refactoring changes with this file creation",
|
|
119
|
-
data.extensionNames.length
|
|
120
|
-
));
|
|
121
|
-
}
|
|
122
|
-
else if (operation === 3 ) {
|
|
123
|
-
message = ( localizeWithPath(
|
|
124
|
-
'vs/workbench/api/browser/mainThreadFileSystemEventService',
|
|
125
|
-
{ key: 'ask.N.copy', comment: ['{0} is a number, e.g "3 extensions want..."'] },
|
|
126
|
-
"{0} extensions want to make refactoring changes with this file copy",
|
|
127
|
-
data.extensionNames.length
|
|
128
|
-
));
|
|
129
|
-
}
|
|
130
|
-
else if (operation === 2 ) {
|
|
131
|
-
message = ( localizeWithPath(
|
|
132
|
-
'vs/workbench/api/browser/mainThreadFileSystemEventService',
|
|
133
|
-
{ key: 'ask.N.move', comment: ['{0} is a number, e.g "3 extensions want..."'] },
|
|
134
|
-
"{0} extensions want to make refactoring changes with this file move",
|
|
135
|
-
data.extensionNames.length
|
|
136
|
-
));
|
|
137
|
-
}
|
|
138
|
-
else {
|
|
139
|
-
message = ( localizeWithPath(
|
|
140
|
-
'vs/workbench/api/browser/mainThreadFileSystemEventService',
|
|
141
|
-
{ key: 'ask.N.delete', comment: ['{0} is a number, e.g "3 extensions want..."'] },
|
|
142
|
-
"{0} extensions want to make refactoring changes with this file deletion",
|
|
143
|
-
data.extensionNames.length
|
|
144
|
-
));
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
if (needsConfirmation) {
|
|
148
|
-
const { confirmed } = await dialogService.confirm({
|
|
149
|
-
type: Severity.Info,
|
|
150
|
-
message,
|
|
151
|
-
primaryButton: ( localizeWithPath(
|
|
152
|
-
'vs/workbench/api/browser/mainThreadFileSystemEventService',
|
|
153
|
-
'preview',
|
|
154
|
-
"Show &&Preview"
|
|
155
|
-
)),
|
|
156
|
-
cancelButton: ( localizeWithPath(
|
|
157
|
-
'vs/workbench/api/browser/mainThreadFileSystemEventService',
|
|
158
|
-
'cancel',
|
|
159
|
-
"Skip Changes"
|
|
160
|
-
))
|
|
161
|
-
});
|
|
162
|
-
showPreview = true;
|
|
163
|
-
if (!confirmed) {
|
|
164
|
-
return;
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
else {
|
|
168
|
-
let Choice;
|
|
169
|
-
( (function(Choice) {
|
|
170
|
-
Choice[Choice["OK"] = 0] = "OK";
|
|
171
|
-
Choice[Choice["Preview"] = 1] = "Preview";
|
|
172
|
-
Choice[Choice["Cancel"] = 2] = "Cancel";
|
|
173
|
-
})(Choice || (Choice = {})));
|
|
174
|
-
const { result, checkboxChecked } = await dialogService.prompt({
|
|
175
|
-
type: Severity.Info,
|
|
176
|
-
message,
|
|
177
|
-
buttons: [
|
|
178
|
-
{
|
|
179
|
-
label: ( localizeWithPath(
|
|
180
|
-
'vs/workbench/api/browser/mainThreadFileSystemEventService',
|
|
181
|
-
{ key: 'ok', comment: ['&& denotes a mnemonic'] },
|
|
182
|
-
"&&OK"
|
|
183
|
-
)),
|
|
184
|
-
run: () => Choice.OK
|
|
185
|
-
},
|
|
186
|
-
{
|
|
187
|
-
label: ( localizeWithPath(
|
|
188
|
-
'vs/workbench/api/browser/mainThreadFileSystemEventService',
|
|
189
|
-
{ key: 'preview', comment: ['&& denotes a mnemonic'] },
|
|
190
|
-
"Show &&Preview"
|
|
191
|
-
)),
|
|
192
|
-
run: () => Choice.Preview
|
|
193
|
-
}
|
|
194
|
-
],
|
|
195
|
-
cancelButton: {
|
|
196
|
-
label: ( localizeWithPath(
|
|
197
|
-
'vs/workbench/api/browser/mainThreadFileSystemEventService',
|
|
198
|
-
'cancel',
|
|
199
|
-
"Skip Changes"
|
|
200
|
-
)),
|
|
201
|
-
run: () => Choice.Cancel
|
|
202
|
-
},
|
|
203
|
-
checkbox: { label: ( localizeWithPath(
|
|
204
|
-
'vs/workbench/api/browser/mainThreadFileSystemEventService',
|
|
205
|
-
'again',
|
|
206
|
-
"Do not ask me again"
|
|
207
|
-
)) }
|
|
208
|
-
});
|
|
209
|
-
if (result === Choice.Cancel) {
|
|
210
|
-
return;
|
|
211
|
-
}
|
|
212
|
-
showPreview = result === Choice.Preview;
|
|
213
|
-
if (checkboxChecked) {
|
|
214
|
-
storageService.store(MainThreadFileSystemEventService_1.MementoKeyAdditionalEdits, showPreview, 0 , 0 );
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
logService.info('[onWill-handler] applying additional workspace edit from extensions', data.extensionNames);
|
|
219
|
-
await bulkEditService.apply(reviveWorkspaceEditDto(data.edit, uriIdentService), { undoRedoGroupId: undoInfo?.undoRedoGroupId, showPreview });
|
|
220
|
-
}
|
|
221
|
-
_progressLabel(operation) {
|
|
222
|
-
switch (operation) {
|
|
223
|
-
case 0 :
|
|
224
|
-
return ( localizeWithPath(
|
|
225
|
-
'vs/workbench/api/browser/mainThreadFileSystemEventService',
|
|
226
|
-
'msg-create',
|
|
227
|
-
"Running 'File Create' participants..."
|
|
228
|
-
));
|
|
229
|
-
case 2 :
|
|
230
|
-
return ( localizeWithPath(
|
|
231
|
-
'vs/workbench/api/browser/mainThreadFileSystemEventService',
|
|
232
|
-
'msg-rename',
|
|
233
|
-
"Running 'File Rename' participants..."
|
|
234
|
-
));
|
|
235
|
-
case 3 :
|
|
236
|
-
return ( localizeWithPath(
|
|
237
|
-
'vs/workbench/api/browser/mainThreadFileSystemEventService',
|
|
238
|
-
'msg-copy',
|
|
239
|
-
"Running 'File Copy' participants..."
|
|
240
|
-
));
|
|
241
|
-
case 1 :
|
|
242
|
-
return ( localizeWithPath(
|
|
243
|
-
'vs/workbench/api/browser/mainThreadFileSystemEventService',
|
|
244
|
-
'msg-delete',
|
|
245
|
-
"Running 'File Delete' participants..."
|
|
246
|
-
));
|
|
247
|
-
case 4 :
|
|
248
|
-
return ( localizeWithPath(
|
|
249
|
-
'vs/workbench/api/browser/mainThreadFileSystemEventService',
|
|
250
|
-
'msg-write',
|
|
251
|
-
"Running 'File Write' participants..."
|
|
252
|
-
));
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
});
|
|
256
|
-
this._listener.add(workingCopyFileService.addFileOperationParticipant(fileOperationParticipant));
|
|
257
|
-
this._listener.add(workingCopyFileService.onDidRunWorkingCopyFileOperation(e => this._proxy.$onDidRunFileOperation(e.operation, e.files)));
|
|
258
|
-
}
|
|
259
|
-
async $watch(extensionId, session, resource, unvalidatedOpts, correlate) {
|
|
260
|
-
const uri = URI.revive(resource);
|
|
261
|
-
const opts = {
|
|
262
|
-
...unvalidatedOpts
|
|
263
|
-
};
|
|
264
|
-
if (opts.recursive) {
|
|
265
|
-
try {
|
|
266
|
-
const stat = await this._fileService.stat(uri);
|
|
267
|
-
if (!stat.isDirectory) {
|
|
268
|
-
opts.recursive = false;
|
|
269
|
-
}
|
|
270
|
-
}
|
|
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
|
-
}
|
|
274
|
-
}
|
|
275
|
-
if (correlate) {
|
|
276
|
-
this._logService.trace(`MainThreadFileSystemEventService#$watch(): request to start watching correlated (extension: ${extensionId}, path: ${( uri.toString(true))}, recursive: ${opts.recursive}, session: ${session})`);
|
|
277
|
-
const watcherDisposables = ( new DisposableStore());
|
|
278
|
-
const subscription = watcherDisposables.add(this._fileService.createWatcher(uri, opts));
|
|
279
|
-
watcherDisposables.add(subscription.onDidChange(event => {
|
|
280
|
-
this._proxy.$onFileEvent({
|
|
281
|
-
session,
|
|
282
|
-
created: event.rawAdded,
|
|
283
|
-
changed: event.rawUpdated,
|
|
284
|
-
deleted: event.rawDeleted
|
|
285
|
-
});
|
|
286
|
-
}));
|
|
287
|
-
this._watches.set(session, watcherDisposables);
|
|
288
|
-
}
|
|
289
|
-
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
|
-
this._logService.trace(`MainThreadFileSystemEventService#$watch(): request to start watching uncorrelated (extension: ${extensionId}, path: ${( uri.toString(true))}, recursive: ${opts.recursive}, session: ${session})`);
|
|
296
|
-
if (opts.recursive && opts.excludes.length === 0) {
|
|
297
|
-
const config = this._configurationService.getValue();
|
|
298
|
-
if (config.files?.watcherExclude) {
|
|
299
|
-
for (const key in config.files.watcherExclude) {
|
|
300
|
-
if (key && config.files.watcherExclude[key] === true) {
|
|
301
|
-
opts.excludes.push(key);
|
|
302
|
-
}
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
}
|
|
306
|
-
else if (workspaceFolder) {
|
|
307
|
-
const config = this._configurationService.getValue();
|
|
308
|
-
if (config.files?.watcherExclude) {
|
|
309
|
-
for (const key in config.files.watcherExclude) {
|
|
310
|
-
if (key && config.files.watcherExclude[key] === true) {
|
|
311
|
-
if (!opts.includes) {
|
|
312
|
-
opts.includes = [];
|
|
313
|
-
}
|
|
314
|
-
const includePattern = `${rtrim(key, '/')}/${GLOBSTAR}`;
|
|
315
|
-
opts.includes.push(normalizeWatcherPattern(workspaceFolder.uri.fsPath, includePattern));
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
if (!opts.includes || opts.includes.length === 0) {
|
|
320
|
-
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})`);
|
|
321
|
-
return;
|
|
322
|
-
}
|
|
323
|
-
}
|
|
324
|
-
const subscription = this._fileService.watch(uri, opts);
|
|
325
|
-
this._watches.set(session, subscription);
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
|
-
$unwatch(session) {
|
|
329
|
-
if (( this._watches.has(session))) {
|
|
330
|
-
this._logService.trace(`MainThreadFileSystemEventService#$unwatch(): request to stop watching (session: ${session})`);
|
|
331
|
-
this._watches.deleteAndDispose(session);
|
|
332
|
-
}
|
|
333
|
-
}
|
|
334
|
-
dispose() {
|
|
335
|
-
this._listener.dispose();
|
|
336
|
-
this._watches.dispose();
|
|
337
|
-
}
|
|
338
|
-
};
|
|
339
|
-
MainThreadFileSystemEventService = MainThreadFileSystemEventService_1 = __decorate([
|
|
340
|
-
extHostNamedCustomer(MainContext.MainThreadFileSystemEventService),
|
|
341
|
-
( __param(1, IFileService)),
|
|
342
|
-
( __param(2, IWorkingCopyFileService)),
|
|
343
|
-
( __param(3, IBulkEditService)),
|
|
344
|
-
( __param(4, IProgressService)),
|
|
345
|
-
( __param(5, IDialogService)),
|
|
346
|
-
( __param(6, IStorageService)),
|
|
347
|
-
( __param(7, ILogService)),
|
|
348
|
-
( __param(8, IEnvironmentService)),
|
|
349
|
-
( __param(9, IUriIdentityService)),
|
|
350
|
-
( __param(10, IWorkspaceContextService)),
|
|
351
|
-
( __param(11, ILogService)),
|
|
352
|
-
( __param(12, IConfigurationService))
|
|
353
|
-
], MainThreadFileSystemEventService);
|
|
354
|
-
registerAction2(class ResetMemento extends Action2 {
|
|
355
|
-
constructor() {
|
|
356
|
-
super({
|
|
357
|
-
id: 'files.participants.resetChoice',
|
|
358
|
-
title: {
|
|
359
|
-
value: ( localizeWithPath(
|
|
360
|
-
'vs/workbench/api/browser/mainThreadFileSystemEventService',
|
|
361
|
-
'label',
|
|
362
|
-
"Reset choice for 'File operation needs preview'"
|
|
363
|
-
)),
|
|
364
|
-
original: `Reset choice for 'File operation needs preview'`
|
|
365
|
-
},
|
|
366
|
-
f1: true
|
|
367
|
-
});
|
|
368
|
-
}
|
|
369
|
-
run(accessor) {
|
|
370
|
-
accessor.get(IStorageService).remove(MainThreadFileSystemEventService.MementoKeyAdditionalEdits, 0 );
|
|
371
|
-
}
|
|
372
|
-
});
|
|
373
|
-
|
|
374
|
-
export { MainThreadFileSystemEventService };
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { __decorate, __param } from '../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
-
import { DisposableMap } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
3
|
-
import { IInlineChatService } from 'vscode/vscode/vs/workbench/contrib/inlineChat/common/inlineChat';
|
|
4
|
-
import { IUriIdentityService } from 'vscode/vscode/vs/platform/uriIdentity/common/uriIdentity';
|
|
5
|
-
import { reviveWorkspaceEditDto } from './mainThreadBulkEdits.js';
|
|
6
|
-
import { MainContext, ExtHostContext } from 'vscode/vscode/vs/workbench/api/common/extHost.protocol';
|
|
7
|
-
import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
|
|
8
|
-
|
|
9
|
-
let MainThreadInlineChat = class MainThreadInlineChat {
|
|
10
|
-
constructor(extHostContext, _inlineChatService, _uriIdentService) {
|
|
11
|
-
this._inlineChatService = _inlineChatService;
|
|
12
|
-
this._uriIdentService = _uriIdentService;
|
|
13
|
-
this._registrations = ( new DisposableMap());
|
|
14
|
-
this._progresses = ( new Map());
|
|
15
|
-
this._proxy = ( extHostContext.getProxy(ExtHostContext.ExtHostInlineChat));
|
|
16
|
-
}
|
|
17
|
-
dispose() {
|
|
18
|
-
this._registrations.dispose();
|
|
19
|
-
}
|
|
20
|
-
async $registerInteractiveEditorProvider(handle, label, debugName, supportsFeedback, supportsFollowups, supportIssueReporting) {
|
|
21
|
-
const unreg = this._inlineChatService.addProvider({
|
|
22
|
-
debugName,
|
|
23
|
-
label,
|
|
24
|
-
supportIssueReporting,
|
|
25
|
-
prepareInlineChatSession: async (model, range, token) => {
|
|
26
|
-
const session = await this._proxy.$prepareSession(handle, model.uri, range, token);
|
|
27
|
-
if (!session) {
|
|
28
|
-
return undefined;
|
|
29
|
-
}
|
|
30
|
-
return {
|
|
31
|
-
...session,
|
|
32
|
-
dispose: () => {
|
|
33
|
-
this._proxy.$releaseSession(handle, session.id);
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
},
|
|
37
|
-
provideResponse: async (item, request, progress, token) => {
|
|
38
|
-
this._progresses.set(request.requestId, progress);
|
|
39
|
-
try {
|
|
40
|
-
const result = await this._proxy.$provideResponse(handle, item, request, token);
|
|
41
|
-
if (result?.type === 'bulkEdit') {
|
|
42
|
-
result.edits = reviveWorkspaceEditDto(result.edits, this._uriIdentService);
|
|
43
|
-
}
|
|
44
|
-
return result;
|
|
45
|
-
}
|
|
46
|
-
finally {
|
|
47
|
-
this._progresses.delete(request.requestId);
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
provideFollowups: !supportsFollowups ? undefined : async (session, response, token) => {
|
|
51
|
-
return this._proxy.$provideFollowups(handle, session.id, response.id, token);
|
|
52
|
-
},
|
|
53
|
-
handleInlineChatResponseFeedback: !supportsFeedback ? undefined : async (session, response, kind) => {
|
|
54
|
-
this._proxy.$handleFeedback(handle, session.id, response.id, kind);
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
this._registrations.set(handle, unreg);
|
|
58
|
-
}
|
|
59
|
-
async $handleProgressChunk(requestId, chunk) {
|
|
60
|
-
await Promise.resolve(this._progresses.get(requestId)?.report(chunk));
|
|
61
|
-
}
|
|
62
|
-
async $unregisterInteractiveEditorProvider(handle) {
|
|
63
|
-
this._registrations.deleteAndDispose(handle);
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
MainThreadInlineChat = __decorate([
|
|
67
|
-
extHostNamedCustomer(MainContext.MainThreadInlineChat),
|
|
68
|
-
( __param(1, IInlineChatService)),
|
|
69
|
-
( __param(2, IUriIdentityService))
|
|
70
|
-
], MainThreadInlineChat);
|
|
71
|
-
|
|
72
|
-
export { MainThreadInlineChat };
|