@codingame/monaco-vscode-extensions-service-override 4.1.0 → 4.1.2
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 +3 -0
- package/extensions.js +6 -6
- package/external/vscode-semver/semver.js +985 -0
- package/override/vs/workbench/browser/parts/editor/textEditor.weak.js +8 -0
- package/package.json +9 -9
- package/vscode/src/vs/base/common/console.js +62 -0
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagementCLI.js +497 -0
- package/vscode/src/vs/platform/extensionResourceLoader/browser/extensionResourceLoaderService.js +44 -0
- package/vscode/src/vs/platform/lifecycle/common/lifecycle.js +27 -0
- package/vscode/src/vs/platform/remote/common/managedSocket.js +98 -0
- package/vscode/src/vs/workbench/api/browser/extensionHost.contribution.js +104 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadAiEmbeddingVector.js +31 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadAiRelatedInformation.js +35 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadAuthentication.js +254 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadBulkEdits.js +68 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadCLICommands.js +103 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChat.js +70 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents2.js +207 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatVariables.js +41 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadClipboard.js +24 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadCodeInsets.js +108 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadCommands.js +98 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadComments.js +560 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadConfiguration.js +80 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadConsole.js +35 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadCustomEditors.js +579 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDebugService.js +435 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDecorations.js +102 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDiagnostics.js +69 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDialogs.js +68 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDocumentContentProviders.js +79 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDocuments.js +253 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDocumentsAndEditors.js +370 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadDownloadService.js +22 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadEditSessionIdentityParticipant.js +41 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadEditor.js +414 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadEditorTabs.js +501 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadEditors.js +227 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadErrors.js +24 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadExtensionService.js +317 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadFileSystem.js +208 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadFileSystemEventService.js +369 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadInlineChat.js +72 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadInteractive.js +28 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadIssueReporter.js +50 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadLabelService.js +27 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageFeatures.js +1016 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModels.js +185 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguages.js +78 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadLocalization.js +35 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadLogService.js +78 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadManagedSockets.js +93 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadMessageService.js +137 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebook.js +194 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDocuments.js +123 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDocumentsAndEditors.js +188 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDto.js +129 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookEditors.js +131 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookKernels.js +374 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookRenderers.js +25 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookSaveParticipant.js +48 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadOutputService.js +76 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadProfileContentHandlers.js +38 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadProgress.js +68 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadQuickDiff.js +42 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadQuickOpen.js +185 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadRemoteConnectionData.js +30 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadSCM.js +493 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadSaveParticipant.js +49 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadSearch.js +168 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadSecretState.js +70 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadShare.js +50 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadSpeech.js +99 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadStatusBar.js +53 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadStorage.js +72 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTask.js +731 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTelemetry.js +53 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTerminalService.js +409 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTerminalShellIntegration.js +51 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTesting.js +219 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTheming.js +24 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTimeline.js +55 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTreeViews.js +312 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTunnelService.js +223 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadUriOpeners.js +110 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadUrls.js +61 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviewManager.js +29 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviewPanels.js +283 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviewViews.js +100 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviews.js +135 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadWindow.js +57 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadWorkspace.js +268 -0
- package/vscode/src/vs/workbench/api/common/shared/dataTransferCache.js +35 -0
- package/vscode/src/vs/workbench/contrib/customEditor/common/customTextEditorModel.js +76 -0
- package/vscode/src/vs/workbench/contrib/externalUriOpener/common/contributedOpeners.js +83 -0
- package/vscode/src/vs/workbench/services/extensions/browser/extensionService.js +285 -0
- package/vscode/src/vs/workbench/services/extensions/browser/webWorkerExtensionHost.js +276 -0
- package/vscode/src/vs/workbench/services/extensions/browser/webWorkerFileSystemProvider.js +52 -0
- package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.js +1149 -0
- package/vscode/src/vs/workbench/services/extensions/common/extHostCustomers.js +41 -0
- package/vscode/src/vs/workbench/services/extensions/common/extensionDevOptions.js +25 -0
- package/vscode/src/vs/workbench/services/extensions/common/extensionHostManager.js +512 -0
- package/vscode/src/vs/workbench/services/extensions/common/extensionRunningLocationTracker.js +274 -0
- package/vscode/src/vs/workbench/services/extensions/common/extensionStorageMigration.js +58 -0
- package/vscode/src/vs/workbench/services/extensions/common/extensionsProposedApi.js +80 -0
- package/vscode/src/vs/workbench/services/extensions/common/extensionsUtil.js +64 -0
- package/vscode/src/vs/workbench/services/extensions/common/lazyCreateExtensionHostManager.js +161 -0
- package/vscode/src/vs/workbench/services/extensions/common/remoteConsoleUtil.js +49 -0
- package/vscode/src/vs/workbench/services/extensions/common/remoteExtensionHost.js +222 -0
|
@@ -0,0 +1,208 @@
|
|
|
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 };
|
|
@@ -0,0 +1,369 @@
|
|
|
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$1 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$1.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$1.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
|
+
}
|
|
273
|
+
}
|
|
274
|
+
if (correlate) {
|
|
275
|
+
this._logService.trace(`MainThreadFileSystemEventService#$watch(): request to start watching correlated (extension: ${extensionId}, path: ${( uri.toString(true))}, recursive: ${opts.recursive}, session: ${session})`);
|
|
276
|
+
const watcherDisposables = ( new DisposableStore());
|
|
277
|
+
const subscription = watcherDisposables.add(this._fileService.createWatcher(uri, opts));
|
|
278
|
+
watcherDisposables.add(subscription.onDidChange(event => {
|
|
279
|
+
this._proxy.$onFileEvent({
|
|
280
|
+
session,
|
|
281
|
+
created: event.rawAdded,
|
|
282
|
+
changed: event.rawUpdated,
|
|
283
|
+
deleted: event.rawDeleted
|
|
284
|
+
});
|
|
285
|
+
}));
|
|
286
|
+
this._watches.set(session, watcherDisposables);
|
|
287
|
+
}
|
|
288
|
+
else {
|
|
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);
|
|
291
|
+
if (opts.recursive && opts.excludes.length === 0) {
|
|
292
|
+
const config = this._configurationService.getValue();
|
|
293
|
+
if (config.files?.watcherExclude) {
|
|
294
|
+
for (const key in config.files.watcherExclude) {
|
|
295
|
+
if (key && config.files.watcherExclude[key] === true) {
|
|
296
|
+
opts.excludes.push(key);
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
else if (!opts.recursive && workspaceFolder) {
|
|
302
|
+
const config = this._configurationService.getValue();
|
|
303
|
+
if (config.files?.watcherExclude) {
|
|
304
|
+
for (const key in config.files.watcherExclude) {
|
|
305
|
+
if (key && config.files.watcherExclude[key] === true) {
|
|
306
|
+
if (!opts.includes) {
|
|
307
|
+
opts.includes = [];
|
|
308
|
+
}
|
|
309
|
+
const includePattern = `${rtrim(key, '/')}/${GLOBSTAR}`;
|
|
310
|
+
opts.includes.push(normalizeWatcherPattern(workspaceFolder.uri.fsPath, includePattern));
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
if (!opts.includes || opts.includes.length === 0) {
|
|
315
|
+
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})`);
|
|
316
|
+
return;
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
const subscription = this._fileService.watch(uri, opts);
|
|
320
|
+
this._watches.set(session, subscription);
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
$unwatch(session) {
|
|
324
|
+
if (( this._watches.has(session))) {
|
|
325
|
+
this._logService.trace(`MainThreadFileSystemEventService#$unwatch(): request to stop watching (session: ${session})`);
|
|
326
|
+
this._watches.deleteAndDispose(session);
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
dispose() {
|
|
330
|
+
this._listener.dispose();
|
|
331
|
+
this._watches.dispose();
|
|
332
|
+
}
|
|
333
|
+
};
|
|
334
|
+
MainThreadFileSystemEventService = MainThreadFileSystemEventService_1 = __decorate([
|
|
335
|
+
extHostNamedCustomer(MainContext.MainThreadFileSystemEventService),
|
|
336
|
+
( __param(1, IFileService)),
|
|
337
|
+
( __param(2, IWorkingCopyFileService)),
|
|
338
|
+
( __param(3, IBulkEditService)),
|
|
339
|
+
( __param(4, IProgressService)),
|
|
340
|
+
( __param(5, IDialogService)),
|
|
341
|
+
( __param(6, IStorageService)),
|
|
342
|
+
( __param(7, ILogService)),
|
|
343
|
+
( __param(8, IEnvironmentService)),
|
|
344
|
+
( __param(9, IUriIdentityService)),
|
|
345
|
+
( __param(10, IWorkspaceContextService)),
|
|
346
|
+
( __param(11, ILogService)),
|
|
347
|
+
( __param(12, IConfigurationService))
|
|
348
|
+
], MainThreadFileSystemEventService);
|
|
349
|
+
registerAction2(class ResetMemento extends Action2 {
|
|
350
|
+
constructor() {
|
|
351
|
+
super({
|
|
352
|
+
id: 'files.participants.resetChoice',
|
|
353
|
+
title: {
|
|
354
|
+
value: ( localizeWithPath(
|
|
355
|
+
'vs/workbench/api/browser/mainThreadFileSystemEventService',
|
|
356
|
+
'label',
|
|
357
|
+
"Reset choice for 'File operation needs preview'"
|
|
358
|
+
)),
|
|
359
|
+
original: `Reset choice for 'File operation needs preview'`
|
|
360
|
+
},
|
|
361
|
+
f1: true
|
|
362
|
+
});
|
|
363
|
+
}
|
|
364
|
+
run(accessor) {
|
|
365
|
+
accessor.get(IStorageService).remove(MainThreadFileSystemEventService.MementoKeyAdditionalEdits, 0 );
|
|
366
|
+
}
|
|
367
|
+
});
|
|
368
|
+
|
|
369
|
+
export { MainThreadFileSystemEventService };
|
|
@@ -0,0 +1,72 @@
|
|
|
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, extensionId, supportsFeedback, supportsFollowups, supportIssueReporting) {
|
|
21
|
+
const unreg = this._inlineChatService.addProvider({
|
|
22
|
+
extensionId,
|
|
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 };
|