@codingame/monaco-vscode-extensions-service-override 1.83.16 → 1.85.0-next.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 +2 -2
- package/localExtensionHost.d.ts +1 -0
- package/package.json +4 -4
- package/vscode/src/vs/workbench/api/browser/mainThreadAuthentication.js +4 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadChat.js +9 -88
- package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents2.js +216 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatProvider.js +3 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadChatVariables.js +7 -6
- package/vscode/src/vs/workbench/api/browser/mainThreadCommands.js +8 -4
- package/vscode/src/vs/workbench/api/browser/mainThreadComments.js +4 -4
- package/vscode/src/vs/workbench/api/browser/mainThreadDocuments.js +6 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadEditorTabs.js +16 -9
- package/vscode/src/vs/workbench/api/browser/mainThreadFileSystem.js +3 -75
- package/vscode/src/vs/workbench/api/browser/mainThreadFileSystemEventService.js +102 -11
- package/vscode/src/vs/workbench/api/browser/mainThreadInlineChat.js +6 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadIssueReporter.js +16 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageFeatures.js +25 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebook.js +36 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookKernels.js +34 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadQuickDiff.js +4 -11
- package/vscode/src/vs/workbench/api/browser/mainThreadSCM.js +136 -28
- package/vscode/src/vs/workbench/api/browser/mainThreadSearch.js +2 -4
- package/vscode/src/vs/workbench/api/browser/mainThreadSpeech.js +67 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTerminalService.js +8 -10
- package/vscode/src/vs/workbench/api/browser/mainThreadTesting.js +25 -10
- package/vscode/src/vs/workbench/api/browser/mainThreadTreeViews.js +8 -13
- package/vscode/src/vs/workbench/api/browser/mainThreadTunnelService.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadWorkspace.js +3 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.js +40 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditorInput.js +141 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatFollowups.js +37 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatInputPart.js +342 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatListRenderer.js +1197 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatMarkdownDecorationsRenderer.js +117 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatOptions.js +83 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatWidget.js +543 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockPart.css.js +6 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockPart.js +292 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatDynamicVariables.js +169 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chat.css.js +6 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatModel.js +111 -73
- package/vscode/src/vs/workbench/contrib/chat/common/chatRequestParser.js +195 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatViewModel.js +260 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatWidgetHistoryService.js +5 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatWordCounter.js +26 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentColors.js +6 -0
- package/vscode/src/vs/workbench/contrib/comments/browser/commentNode.js +6 -5
- package/vscode/src/vs/workbench/contrib/comments/browser/commentReply.js +8 -3
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadBody.js +6 -4
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadHeader.js +1 -1
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadWidget.js +6 -2
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadZoneWidget.js +24 -10
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsController.js +113 -34
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsTreeViewer.js +17 -8
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsView.js +5 -3
- package/vscode/src/vs/workbench/contrib/comments/browser/media/panel.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/comments/browser/media/review.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/comments/common/commentModel.js +18 -8
- package/vscode/src/vs/workbench/contrib/interactive/browser/interactiveEditorInput.js +2 -1
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/diffComputer.js +7 -0
- package/vscode/src/vs/workbench/contrib/tasks/common/tasks.js +5 -5
- package/vscode/src/vs/workbench/services/extensions/browser/extensionService.js +2 -1
- package/vscode/src/vs/workbench/services/extensions/browser/webWorkerExtensionHost.js +7 -4
- package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.js +17 -12
- package/vscode/src/vs/workbench/services/extensions/common/extensionHostManager.js +17 -148
- package/vscode/src/vs/workbench/services/extensions/common/lazyCreateExtensionHostManager.js +161 -0
- package/vscode/src/vs/workbench/services/extensions/common/remoteExtensionHost.js +2 -0
- package/vscode/src/vs/platform/files/common/watcher.js +0 -71
- package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents.js +0 -52
- package/vscode/src/vs/workbench/api/browser/mainThreadChatSlashCommands.js +0 -49
- package/vscode/src/vs/workbench/contrib/testing/common/testCoverage.js +0 -25
|
@@ -1,44 +1,74 @@
|
|
|
1
1
|
import { __decorate, __param } from '../../../../../../external/tslib/tslib.es6.js';
|
|
2
2
|
import { URI } from 'monaco-editor/esm/vs/base/common/uri.js';
|
|
3
3
|
import { Emitter, Event } from 'monaco-editor/esm/vs/base/common/event.js';
|
|
4
|
-
import { DisposableStore, dispose, combinedDisposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
|
|
4
|
+
import { DisposableMap, DisposableStore, dispose, combinedDisposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
|
|
5
5
|
import { ISCMService, ISCMViewService } from 'vscode/vscode/vs/workbench/contrib/scm/common/scm';
|
|
6
6
|
import { MainContext, ExtHostContext } from 'vscode/vscode/vs/workbench/api/common/extHost.protocol';
|
|
7
7
|
import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
|
|
8
|
-
import { Sequence } from 'monaco-editor/esm/vs/base/common/sequence.js';
|
|
9
8
|
import { CancellationToken } from 'monaco-editor/esm/vs/base/common/cancellation.js';
|
|
10
9
|
import { ThemeIcon } from 'monaco-editor/esm/vs/base/common/themables.js';
|
|
11
10
|
import { IQuickDiffService } from 'vscode/vscode/vs/workbench/contrib/scm/common/quickDiff';
|
|
11
|
+
import { ResourceTree } from 'vscode/vscode/vs/base/common/resourceTree';
|
|
12
|
+
import { IUriIdentityService } from 'monaco-editor/esm/vs/platform/uriIdentity/common/uriIdentity.js';
|
|
13
|
+
import { Codicon } from 'monaco-editor/esm/vs/base/common/codicons.js';
|
|
14
|
+
import { IWorkspaceContextService } from 'monaco-editor/esm/vs/platform/workspace/common/workspace.js';
|
|
15
|
+
import { basename } from 'monaco-editor/esm/vs/base/common/resources.js';
|
|
12
16
|
|
|
13
|
-
function
|
|
14
|
-
if (!
|
|
17
|
+
function getSCMInputBoxActionButtonIcon(actionButton) {
|
|
18
|
+
if (!actionButton.icon) {
|
|
15
19
|
return undefined;
|
|
16
20
|
}
|
|
17
|
-
else if (URI.isUri(
|
|
18
|
-
return URI.revive(
|
|
21
|
+
else if (URI.isUri(actionButton.icon)) {
|
|
22
|
+
return URI.revive(actionButton.icon);
|
|
19
23
|
}
|
|
20
|
-
else if (ThemeIcon.isThemeIcon(
|
|
21
|
-
return
|
|
24
|
+
else if (ThemeIcon.isThemeIcon(actionButton.icon)) {
|
|
25
|
+
return actionButton.icon;
|
|
22
26
|
}
|
|
23
27
|
else {
|
|
24
|
-
const icon =
|
|
28
|
+
const icon = actionButton.icon;
|
|
29
|
+
return { light: URI.revive(icon.light), dark: URI.revive(icon.dark) };
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
function getIconFromIconDto(iconDto) {
|
|
33
|
+
if (iconDto === undefined) {
|
|
34
|
+
return undefined;
|
|
35
|
+
}
|
|
36
|
+
else if (URI.isUri(iconDto)) {
|
|
37
|
+
return URI.revive(iconDto);
|
|
38
|
+
}
|
|
39
|
+
else if (ThemeIcon.isThemeIcon(iconDto)) {
|
|
40
|
+
return iconDto;
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
const icon = iconDto;
|
|
25
44
|
return { light: URI.revive(icon.light), dark: URI.revive(icon.dark) };
|
|
26
45
|
}
|
|
27
46
|
}
|
|
28
47
|
class MainThreadSCMResourceGroup {
|
|
48
|
+
get resourceTree() {
|
|
49
|
+
if (!this._resourceTree) {
|
|
50
|
+
const rootUri = this.provider.rootUri ?? URI.file('/');
|
|
51
|
+
this._resourceTree = ( new ResourceTree(this, rootUri, this._uriIdentService.extUri));
|
|
52
|
+
for (const resource of this.resources) {
|
|
53
|
+
this._resourceTree.add(resource.sourceUri, resource);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
return this._resourceTree;
|
|
57
|
+
}
|
|
29
58
|
get hideWhenEmpty() { return !!this.features.hideWhenEmpty; }
|
|
30
|
-
constructor(sourceControlHandle, handle, provider, features, label, id) {
|
|
59
|
+
constructor(sourceControlHandle, handle, provider, features, label, id, _uriIdentService) {
|
|
31
60
|
this.sourceControlHandle = sourceControlHandle;
|
|
32
61
|
this.handle = handle;
|
|
33
62
|
this.provider = provider;
|
|
34
63
|
this.features = features;
|
|
35
64
|
this.label = label;
|
|
36
65
|
this.id = id;
|
|
37
|
-
this.
|
|
38
|
-
this.
|
|
39
|
-
this.onDidSplice = this._onDidSplice.event;
|
|
66
|
+
this._uriIdentService = _uriIdentService;
|
|
67
|
+
this.resources = [];
|
|
40
68
|
this._onDidChange = ( new Emitter());
|
|
41
69
|
this.onDidChange = this._onDidChange.event;
|
|
70
|
+
this._onDidChangeResources = ( new Emitter());
|
|
71
|
+
this.onDidChangeResources = this._onDidChangeResources.event;
|
|
42
72
|
}
|
|
43
73
|
toJSON() {
|
|
44
74
|
return {
|
|
@@ -48,8 +78,9 @@ class MainThreadSCMResourceGroup {
|
|
|
48
78
|
};
|
|
49
79
|
}
|
|
50
80
|
splice(start, deleteCount, toInsert) {
|
|
51
|
-
this.
|
|
52
|
-
this.
|
|
81
|
+
this.resources.splice(start, deleteCount, ...toInsert);
|
|
82
|
+
this._resourceTree = undefined;
|
|
83
|
+
this._onDidChangeResources.fire();
|
|
53
84
|
}
|
|
54
85
|
$updateGroup(features) {
|
|
55
86
|
this.features = { ...this.features, ...features };
|
|
@@ -103,6 +134,29 @@ class MainThreadSCMHistoryProvider {
|
|
|
103
134
|
this._onDidChangeCurrentHistoryItemGroup = ( new Emitter());
|
|
104
135
|
this.onDidChangeCurrentHistoryItemGroup = this._onDidChangeCurrentHistoryItemGroup.event;
|
|
105
136
|
}
|
|
137
|
+
async resolveHistoryItemGroupDetails(historyItemGroup) {
|
|
138
|
+
const historyItemGroupBase = await this.resolveHistoryItemGroupBase(historyItemGroup.id);
|
|
139
|
+
const ancestor = historyItemGroupBase ?
|
|
140
|
+
await this.resolveHistoryItemGroupCommonAncestor(historyItemGroup.id, historyItemGroupBase.id) : undefined;
|
|
141
|
+
let incoming;
|
|
142
|
+
if (historyItemGroupBase) {
|
|
143
|
+
incoming = {
|
|
144
|
+
id: historyItemGroupBase.id,
|
|
145
|
+
label: historyItemGroupBase.label,
|
|
146
|
+
icon: Codicon.arrowCircleDown,
|
|
147
|
+
ancestor: ancestor?.id,
|
|
148
|
+
count: ancestor?.behind ?? 0,
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
const outgoing = {
|
|
152
|
+
id: historyItemGroup.id,
|
|
153
|
+
label: historyItemGroup.label,
|
|
154
|
+
icon: Codicon.arrowCircleUp,
|
|
155
|
+
ancestor: ancestor?.id,
|
|
156
|
+
count: ancestor?.ahead ?? 0,
|
|
157
|
+
};
|
|
158
|
+
return { incoming, outgoing };
|
|
159
|
+
}
|
|
106
160
|
async resolveHistoryItemGroupBase(historyItemGroupId) {
|
|
107
161
|
return this.proxy.$resolveHistoryItemGroupBase(this.handle, historyItemGroupId, CancellationToken.None);
|
|
108
162
|
}
|
|
@@ -111,7 +165,7 @@ class MainThreadSCMHistoryProvider {
|
|
|
111
165
|
}
|
|
112
166
|
async provideHistoryItems(historyItemGroupId, options) {
|
|
113
167
|
const historyItems = await this.proxy.$provideHistoryItems(this.handle, historyItemGroupId, options, CancellationToken.None);
|
|
114
|
-
return historyItems?.map(historyItem => ({ ...historyItem, icon:
|
|
168
|
+
return historyItems?.map(historyItem => ({ ...historyItem, icon: getIconFromIconDto(historyItem.icon) }));
|
|
115
169
|
}
|
|
116
170
|
async provideHistoryItemChanges(historyItemId) {
|
|
117
171
|
const changes = await this.proxy.$provideHistoryItemChanges(this.handle, historyItemId, CancellationToken.None);
|
|
@@ -130,27 +184,32 @@ class MainThreadSCMProvider {
|
|
|
130
184
|
get label() { return this._label; }
|
|
131
185
|
get rootUri() { return this._rootUri; }
|
|
132
186
|
get inputBoxDocumentUri() { return this._inputBoxDocumentUri; }
|
|
133
|
-
get contextValue() { return this.
|
|
187
|
+
get contextValue() { return this._providerId; }
|
|
134
188
|
get commitTemplate() { return this.features.commitTemplate || ''; }
|
|
135
189
|
get historyProvider() { return this._historyProvider; }
|
|
136
190
|
get acceptInputCommand() { return this.features.acceptInputCommand; }
|
|
137
191
|
get actionButton() { return this.features.actionButton ?? undefined; }
|
|
138
192
|
get statusBarCommands() { return this.features.statusBarCommands; }
|
|
139
193
|
get count() { return this.features.count; }
|
|
194
|
+
get name() { return this._name ?? this._label; }
|
|
140
195
|
get onDidChangeStatusBarCommands() { return this._onDidChangeStatusBarCommands.event; }
|
|
141
|
-
constructor(proxy, _handle,
|
|
196
|
+
constructor(proxy, _handle, _providerId, _label, _rootUri, _inputBoxDocumentUri, _quickDiffService, _uriIdentService, _workspaceContextService) {
|
|
142
197
|
this.proxy = proxy;
|
|
143
198
|
this._handle = _handle;
|
|
144
|
-
this.
|
|
199
|
+
this._providerId = _providerId;
|
|
145
200
|
this._label = _label;
|
|
146
201
|
this._rootUri = _rootUri;
|
|
147
202
|
this._inputBoxDocumentUri = _inputBoxDocumentUri;
|
|
148
203
|
this._quickDiffService = _quickDiffService;
|
|
204
|
+
this._uriIdentService = _uriIdentService;
|
|
205
|
+
this._workspaceContextService = _workspaceContextService;
|
|
149
206
|
this._id = `scm${MainThreadSCMProvider.ID_HANDLE++}`;
|
|
150
|
-
this.groups =
|
|
151
|
-
this.
|
|
207
|
+
this.groups = [];
|
|
208
|
+
this._onDidChangeResourceGroups = ( new Emitter());
|
|
209
|
+
this.onDidChangeResourceGroups = this._onDidChangeResourceGroups.event;
|
|
152
210
|
this._onDidChangeResources = ( new Emitter());
|
|
153
211
|
this.onDidChangeResources = this._onDidChangeResources.event;
|
|
212
|
+
this._groupsByHandle = Object.create(null);
|
|
154
213
|
this.features = {};
|
|
155
214
|
this._onDidChangeCommitTemplate = ( new Emitter());
|
|
156
215
|
this.onDidChangeCommitTemplate = this._onDidChangeCommitTemplate.event;
|
|
@@ -160,6 +219,15 @@ class MainThreadSCMProvider {
|
|
|
160
219
|
this._onDidChange = ( new Emitter());
|
|
161
220
|
this.onDidChange = this._onDidChange.event;
|
|
162
221
|
this.isSCM = true;
|
|
222
|
+
if (_rootUri) {
|
|
223
|
+
const folder = this._workspaceContextService.getWorkspaceFolder(_rootUri);
|
|
224
|
+
if (folder?.uri.toString() === ( _rootUri.toString())) {
|
|
225
|
+
this._name = folder.name;
|
|
226
|
+
}
|
|
227
|
+
else if (_rootUri.path !== '/') {
|
|
228
|
+
this._name = basename(_rootUri);
|
|
229
|
+
}
|
|
230
|
+
}
|
|
163
231
|
}
|
|
164
232
|
$updateSourceControl(features) {
|
|
165
233
|
this.features = { ...this.features, ...features };
|
|
@@ -193,11 +261,12 @@ class MainThreadSCMProvider {
|
|
|
193
261
|
}
|
|
194
262
|
$registerGroups(_groups) {
|
|
195
263
|
const groups = ( _groups.map(([handle, id, label, features]) => {
|
|
196
|
-
const group = ( new MainThreadSCMResourceGroup(this.handle, handle, this, features, label, id));
|
|
264
|
+
const group = ( new MainThreadSCMResourceGroup(this.handle, handle, this, features, label, id, this._uriIdentService));
|
|
197
265
|
this._groupsByHandle[handle] = group;
|
|
198
266
|
return group;
|
|
199
267
|
}));
|
|
200
|
-
this.groups.splice(this.groups.
|
|
268
|
+
this.groups.splice(this.groups.length, 0, ...groups);
|
|
269
|
+
this._onDidChangeResourceGroups.fire();
|
|
201
270
|
}
|
|
202
271
|
$updateGroup(handle, features) {
|
|
203
272
|
const group = this._groupsByHandle[handle];
|
|
@@ -257,8 +326,8 @@ class MainThreadSCMProvider {
|
|
|
257
326
|
return;
|
|
258
327
|
}
|
|
259
328
|
delete this._groupsByHandle[handle];
|
|
260
|
-
this.groups.splice(this.groups.
|
|
261
|
-
this.
|
|
329
|
+
this.groups.splice(this.groups.indexOf(group), 1);
|
|
330
|
+
this._onDidChangeResourceGroups.fire();
|
|
262
331
|
}
|
|
263
332
|
async getOriginalResource(uri) {
|
|
264
333
|
if (!this.features.hasQuickDiffProvider) {
|
|
@@ -289,13 +358,27 @@ class MainThreadSCMProvider {
|
|
|
289
358
|
this._quickDiff?.dispose();
|
|
290
359
|
}
|
|
291
360
|
}
|
|
361
|
+
class MainThreadSCMInputBoxValueProvider {
|
|
362
|
+
constructor(proxy, handle, label, icon) {
|
|
363
|
+
this.proxy = proxy;
|
|
364
|
+
this.handle = handle;
|
|
365
|
+
this.label = label;
|
|
366
|
+
this.icon = icon;
|
|
367
|
+
}
|
|
368
|
+
provideValue(rootUri, context, token) {
|
|
369
|
+
return this.proxy.$provideInputBoxValue(this.handle, rootUri, context, token);
|
|
370
|
+
}
|
|
371
|
+
}
|
|
292
372
|
let MainThreadSCM = class MainThreadSCM {
|
|
293
|
-
constructor(extHostContext, scmService, scmViewService, quickDiffService) {
|
|
373
|
+
constructor(extHostContext, scmService, scmViewService, quickDiffService, _uriIdentService, workspaceContextService) {
|
|
294
374
|
this.scmService = scmService;
|
|
295
375
|
this.scmViewService = scmViewService;
|
|
296
376
|
this.quickDiffService = quickDiffService;
|
|
377
|
+
this._uriIdentService = _uriIdentService;
|
|
378
|
+
this.workspaceContextService = workspaceContextService;
|
|
297
379
|
this._repositories = ( new Map());
|
|
298
380
|
this._repositoryDisposables = ( new Map());
|
|
381
|
+
this._inputBoxValueProviders = ( new DisposableMap());
|
|
299
382
|
this._disposables = ( new DisposableStore());
|
|
300
383
|
this._proxy = ( extHostContext.getProxy(ExtHostContext.ExtHostSCM));
|
|
301
384
|
}
|
|
@@ -304,6 +387,7 @@ let MainThreadSCM = class MainThreadSCM {
|
|
|
304
387
|
this._repositories.clear();
|
|
305
388
|
dispose(( this._repositoryDisposables.values()));
|
|
306
389
|
this._repositoryDisposables.clear();
|
|
390
|
+
this._inputBoxValueProviders.dispose();
|
|
307
391
|
this._disposables.dispose();
|
|
308
392
|
}
|
|
309
393
|
$registerSourceControl(handle, id, label, rootUri, inputBoxDocumentUri) {
|
|
@@ -314,7 +398,9 @@ let MainThreadSCM = class MainThreadSCM {
|
|
|
314
398
|
label,
|
|
315
399
|
rootUri ? URI.revive(rootUri) : undefined,
|
|
316
400
|
URI.revive(inputBoxDocumentUri),
|
|
317
|
-
this.quickDiffService
|
|
401
|
+
this.quickDiffService,
|
|
402
|
+
this._uriIdentService,
|
|
403
|
+
this.workspaceContextService
|
|
318
404
|
));
|
|
319
405
|
const repository = this.scmService.registerSCMProvider(provider);
|
|
320
406
|
this._repositories.set(handle, repository);
|
|
@@ -345,6 +431,19 @@ let MainThreadSCM = class MainThreadSCM {
|
|
|
345
431
|
repository.dispose();
|
|
346
432
|
this._repositories.delete(handle);
|
|
347
433
|
}
|
|
434
|
+
$registerSourceControlInputBoxValueProvider(handle, sourceControlId, label, icon) {
|
|
435
|
+
const provider = ( new MainThreadSCMInputBoxValueProvider(this._proxy, handle, label, getIconFromIconDto(icon)));
|
|
436
|
+
const disposable = this.scmService.registerSCMInputValueProvider(sourceControlId, provider);
|
|
437
|
+
this._inputBoxValueProviders.set(handle, disposable);
|
|
438
|
+
}
|
|
439
|
+
$unregisterSourceControlInputBoxValueProvider(handle) {
|
|
440
|
+
const provider = this._inputBoxValueProviders.get(handle);
|
|
441
|
+
if (!provider) {
|
|
442
|
+
return;
|
|
443
|
+
}
|
|
444
|
+
provider.dispose();
|
|
445
|
+
this._inputBoxValueProviders.deleteAndDispose(handle);
|
|
446
|
+
}
|
|
348
447
|
$registerGroups(sourceControlHandle, groups, splices) {
|
|
349
448
|
const repository = this._repositories.get(sourceControlHandle);
|
|
350
449
|
if (!repository) {
|
|
@@ -414,6 +513,13 @@ let MainThreadSCM = class MainThreadSCM {
|
|
|
414
513
|
}
|
|
415
514
|
repository.input.visible = visible;
|
|
416
515
|
}
|
|
516
|
+
$setInputBoxActionButton(sourceControlHandle, actionButton) {
|
|
517
|
+
const repository = this._repositories.get(sourceControlHandle);
|
|
518
|
+
if (!repository) {
|
|
519
|
+
return;
|
|
520
|
+
}
|
|
521
|
+
repository.input.actionButton = actionButton ? { ...actionButton, icon: getSCMInputBoxActionButtonIcon(actionButton) } : undefined;
|
|
522
|
+
}
|
|
417
523
|
$showValidationMessage(sourceControlHandle, message, type) {
|
|
418
524
|
const repository = this._repositories.get(sourceControlHandle);
|
|
419
525
|
if (!repository) {
|
|
@@ -457,7 +563,9 @@ MainThreadSCM = __decorate([
|
|
|
457
563
|
extHostNamedCustomer(MainContext.MainThreadSCM),
|
|
458
564
|
( __param(1, ISCMService)),
|
|
459
565
|
( __param(2, ISCMViewService)),
|
|
460
|
-
( __param(3, IQuickDiffService))
|
|
566
|
+
( __param(3, IQuickDiffService)),
|
|
567
|
+
( __param(4, IUriIdentityService)),
|
|
568
|
+
( __param(5, IWorkspaceContextService))
|
|
461
569
|
], MainThreadSCM);
|
|
462
570
|
|
|
463
571
|
export { MainThreadSCM };
|
|
@@ -7,6 +7,7 @@ import { ITelemetryService } from 'monaco-editor/esm/vs/platform/telemetry/commo
|
|
|
7
7
|
import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
|
|
8
8
|
import { ISearchService } from 'vscode/vscode/vs/workbench/services/search/common/search';
|
|
9
9
|
import { MainContext, ExtHostContext } from 'vscode/vscode/vs/workbench/api/common/extHost.protocol';
|
|
10
|
+
import { revive } from 'monaco-editor/esm/vs/base/common/marshalling.js';
|
|
10
11
|
|
|
11
12
|
let MainThreadSearch = class MainThreadSearch {
|
|
12
13
|
constructor(extHostContext, _searchService, _telemetryService, _configurationService) {
|
|
@@ -131,10 +132,7 @@ class RemoteSearchProvider {
|
|
|
131
132
|
}
|
|
132
133
|
dataOrUri.forEach(result => {
|
|
133
134
|
if (result.results) {
|
|
134
|
-
searchOp.addMatch(
|
|
135
|
-
resource: URI.revive(result.resource),
|
|
136
|
-
results: result.results
|
|
137
|
-
});
|
|
135
|
+
searchOp.addMatch(revive(result));
|
|
138
136
|
}
|
|
139
137
|
else {
|
|
140
138
|
searchOp.addMatch({
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { __decorate, __param } from '../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
+
import { CancellationTokenSource } from 'monaco-editor/esm/vs/base/common/cancellation.js';
|
|
3
|
+
import { Emitter } from 'monaco-editor/esm/vs/base/common/event.js';
|
|
4
|
+
import { Disposable, DisposableStore } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
|
|
5
|
+
import { ILogService } from 'monaco-editor/esm/vs/platform/log/common/log.js';
|
|
6
|
+
import { MainContext, ExtHostContext } from 'vscode/vscode/vs/workbench/api/common/extHost.protocol';
|
|
7
|
+
import { ISpeechService } from 'vscode/vscode/vs/workbench/contrib/speech/common/speechService';
|
|
8
|
+
import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
|
|
9
|
+
|
|
10
|
+
let MainThreadSpeech = class MainThreadSpeech extends Disposable {
|
|
11
|
+
constructor(extHostContext, speechService, logService) {
|
|
12
|
+
super();
|
|
13
|
+
this.speechService = speechService;
|
|
14
|
+
this.logService = logService;
|
|
15
|
+
this.providerRegistrations = ( new Map());
|
|
16
|
+
this.providerSessions = ( new Map());
|
|
17
|
+
this.proxy = ( extHostContext.getProxy(ExtHostContext.ExtHostSpeech));
|
|
18
|
+
}
|
|
19
|
+
$registerProvider(handle, identifier, metadata) {
|
|
20
|
+
this.logService.trace('[Speech] extension registered provider', metadata.extension.value);
|
|
21
|
+
const registration = this.speechService.registerSpeechProvider(identifier, {
|
|
22
|
+
metadata,
|
|
23
|
+
createSpeechToTextSession: token => {
|
|
24
|
+
const disposables = ( new DisposableStore());
|
|
25
|
+
const cts = ( new CancellationTokenSource(token));
|
|
26
|
+
const session = Math.random();
|
|
27
|
+
this.proxy.$createSpeechToTextSession(handle, session);
|
|
28
|
+
disposables.add(token.onCancellationRequested(() => this.proxy.$cancelSpeechToTextSession(session)));
|
|
29
|
+
const onDidChange = disposables.add(( new Emitter()));
|
|
30
|
+
this.providerSessions.set(session, { onDidChange });
|
|
31
|
+
return {
|
|
32
|
+
onDidChange: onDidChange.event,
|
|
33
|
+
dispose: () => {
|
|
34
|
+
cts.dispose(true);
|
|
35
|
+
this.providerSessions.delete(session);
|
|
36
|
+
disposables.dispose();
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
this.providerRegistrations.set(handle, {
|
|
42
|
+
dispose: () => {
|
|
43
|
+
registration.dispose();
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
$unregisterProvider(handle) {
|
|
48
|
+
const registration = this.providerRegistrations.get(handle);
|
|
49
|
+
if (registration) {
|
|
50
|
+
registration.dispose();
|
|
51
|
+
this.providerRegistrations.delete(handle);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
$emitSpeechToTextEvent(session, event) {
|
|
55
|
+
const providerSession = this.providerSessions.get(session);
|
|
56
|
+
if (providerSession) {
|
|
57
|
+
providerSession.onDidChange.fire(event);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
MainThreadSpeech = __decorate([
|
|
62
|
+
extHostNamedCustomer(MainContext.MainThreadSpeech),
|
|
63
|
+
( __param(1, ISpeechService)),
|
|
64
|
+
( __param(2, ILogService))
|
|
65
|
+
], MainThreadSpeech);
|
|
66
|
+
|
|
67
|
+
export { MainThreadSpeech };
|
|
@@ -45,14 +45,14 @@ let MainThreadTerminalService = class MainThreadTerminalService {
|
|
|
45
45
|
this._onInstanceDimensionsChanged(instance);
|
|
46
46
|
}));
|
|
47
47
|
this._store.add(_terminalService.onDidDisposeInstance(instance => this._onTerminalDisposed(instance)));
|
|
48
|
-
this._store.add(_terminalService.
|
|
48
|
+
this._store.add(_terminalService.onAnyInstanceProcessIdReady(instance => this._onTerminalProcessIdReady(instance)));
|
|
49
49
|
this._store.add(_terminalService.onDidChangeInstanceDimensions(instance => this._onInstanceDimensionsChanged(instance)));
|
|
50
|
-
this._store.add(_terminalService.
|
|
50
|
+
this._store.add(_terminalService.onAnyInstanceMaximumDimensionsChange(instance => this._onInstanceMaximumDimensionsChanged(instance)));
|
|
51
51
|
this._store.add(_terminalService.onDidRequestStartExtensionTerminal(e => this._onRequestStartExtensionTerminal(e)));
|
|
52
52
|
this._store.add(_terminalService.onDidChangeActiveInstance(instance => this._onActiveTerminalChanged(instance ? instance.instanceId : null)));
|
|
53
|
-
this._store.add(_terminalService.
|
|
54
|
-
this._store.add(_terminalService.
|
|
55
|
-
this._store.add(_terminalService.
|
|
53
|
+
this._store.add(_terminalService.onAnyInstanceTitleChange(instance => instance && this._onTitleChanged(instance.instanceId, instance.title)));
|
|
54
|
+
this._store.add(_terminalService.onAnyInstanceDataInput(instance => this._proxy.$acceptTerminalInteraction(instance.instanceId)));
|
|
55
|
+
this._store.add(_terminalService.onAnyInstanceSelectionChange(instance => this._proxy.$acceptTerminalSelection(instance.instanceId, instance.selection)));
|
|
56
56
|
for (const instance of this._terminalService.instances) {
|
|
57
57
|
this._onTerminalOpened(instance);
|
|
58
58
|
instance.processReady.then(() => this._onTerminalProcessIdReady(instance));
|
|
@@ -161,9 +161,9 @@ let MainThreadTerminalService = class MainThreadTerminalService {
|
|
|
161
161
|
async $dispose(id) {
|
|
162
162
|
(await this._getTerminalInstance(id))?.dispose(TerminalExitReason.Extension);
|
|
163
163
|
}
|
|
164
|
-
async $sendText(id, text,
|
|
164
|
+
async $sendText(id, text, shouldExecute) {
|
|
165
165
|
const instance = await this._getTerminalInstance(id);
|
|
166
|
-
await instance?.sendText(text,
|
|
166
|
+
await instance?.sendText(text, shouldExecute);
|
|
167
167
|
}
|
|
168
168
|
$sendProcessExit(terminalId, exitCode) {
|
|
169
169
|
this._terminalProcessProxies.get(terminalId)?.emitExit(exitCode);
|
|
@@ -184,11 +184,10 @@ let MainThreadTerminalService = class MainThreadTerminalService {
|
|
|
184
184
|
this._dataEventTracker.clear();
|
|
185
185
|
}
|
|
186
186
|
$startSendingCommandEvents() {
|
|
187
|
-
this._logService.info('$startSendingCommandEvents');
|
|
188
187
|
if (this._sendCommandEventListener.value) {
|
|
189
188
|
return;
|
|
190
189
|
}
|
|
191
|
-
const multiplexer = this._terminalService.
|
|
190
|
+
const multiplexer = this._terminalService.createOnInstanceCapabilityEvent(2 , capability => capability.onCommandFinished);
|
|
192
191
|
multiplexer.event(e => {
|
|
193
192
|
this._onDidExecuteCommand(e.instance.instanceId, {
|
|
194
193
|
commandLine: e.data.command,
|
|
@@ -200,7 +199,6 @@ let MainThreadTerminalService = class MainThreadTerminalService {
|
|
|
200
199
|
this._sendCommandEventListener.value = multiplexer;
|
|
201
200
|
}
|
|
202
201
|
$stopSendingCommandEvents() {
|
|
203
|
-
this._logService.info('$stopSendingCommandEvents');
|
|
204
202
|
this._sendCommandEventListener.clear();
|
|
205
203
|
}
|
|
206
204
|
$startLinkProvider() {
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { __decorate, __param } from '../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
+
import { Event } from 'monaco-editor/esm/vs/base/common/event.js';
|
|
2
3
|
import { Disposable, MutableDisposable, DisposableStore, toDisposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
|
|
3
|
-
import {
|
|
4
|
+
import { WellDefinedPrefixTree } from 'vscode/vscode/vs/base/common/prefixTree';
|
|
4
5
|
import { URI } from 'monaco-editor/esm/vs/base/common/uri.js';
|
|
5
6
|
import { Range } from 'monaco-editor/esm/vs/editor/common/core/range.js';
|
|
6
7
|
import { MutableObservableValue } from 'vscode/vscode/vs/workbench/contrib/testing/common/observableValue';
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
8
|
+
import { TestCoverage } from 'vscode/vscode/vs/workbench/contrib/testing/common/testCoverage';
|
|
9
|
+
import { TestId } from 'vscode/vscode/vs/workbench/contrib/testing/common/testId';
|
|
9
10
|
import { ITestProfileService } from 'vscode/vscode/vs/workbench/contrib/testing/common/testProfileService';
|
|
10
11
|
import { LiveTestResult } from 'vscode/vscode/vs/workbench/contrib/testing/common/testResult';
|
|
11
12
|
import { ITestResultService } from 'vscode/vscode/vs/workbench/contrib/testing/common/testResultService';
|
|
12
13
|
import { ITestService } from 'vscode/vscode/vs/workbench/contrib/testing/common/testService';
|
|
14
|
+
import { ITestItem, ITestMessage, TestsDiffOp, IFileCoverage, CoverageDetails } from 'vscode/vscode/vs/workbench/contrib/testing/common/testTypes';
|
|
13
15
|
import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
|
|
14
16
|
import { MainContext, ExtHostContext } from 'vscode/vscode/vs/workbench/api/common/extHost.protocol';
|
|
15
|
-
import { WellDefinedPrefixTree } from 'vscode/vscode/vs/base/common/prefixTree';
|
|
16
|
-
import { TestId } from 'vscode/vscode/vs/workbench/contrib/testing/common/testId';
|
|
17
17
|
|
|
18
18
|
let MainThreadTesting = class MainThreadTesting extends Disposable {
|
|
19
19
|
constructor(extHostContext, testService, testProfiles, resultService) {
|
|
@@ -27,6 +27,18 @@ let MainThreadTesting = class MainThreadTesting extends Disposable {
|
|
|
27
27
|
this._register(this.testService.onDidCancelTestRun(({ runId }) => {
|
|
28
28
|
this.proxy.$cancelExtensionTestRun(runId);
|
|
29
29
|
}));
|
|
30
|
+
this._register(Event.debounce(testProfiles.onDidChange, (_last, e) => e)(() => {
|
|
31
|
+
const defaults = ( new Set([
|
|
32
|
+
...testProfiles.getGroupDefaultProfiles(2 ),
|
|
33
|
+
...testProfiles.getGroupDefaultProfiles(4 ),
|
|
34
|
+
...testProfiles.getGroupDefaultProfiles(8 ),
|
|
35
|
+
]));
|
|
36
|
+
const obj = {};
|
|
37
|
+
for (const { controller, profiles } of this.testProfiles.all()) {
|
|
38
|
+
obj[controller.id] = ( profiles.filter(p => ( defaults.has(p))).map(p => p.profileId));
|
|
39
|
+
}
|
|
40
|
+
this.proxy.$setActiveRunProfiles(obj);
|
|
41
|
+
}));
|
|
30
42
|
this._register(resultService.onResultsChanged(evt => {
|
|
31
43
|
const results = 'completed' in evt ? evt.completed : ('inserted' in evt ? evt.inserted : undefined);
|
|
32
44
|
const serialized = results?.toJSONWithMessages();
|
|
@@ -64,16 +76,19 @@ let MainThreadTesting = class MainThreadTesting extends Disposable {
|
|
|
64
76
|
$addTestsToRun(controllerId, runId, tests) {
|
|
65
77
|
this.withLiveRun(runId, r => r.addTestChainToRun(controllerId, ( tests.map(ITestItem.deserialize))));
|
|
66
78
|
}
|
|
67
|
-
$signalCoverageAvailable(runId, taskId) {
|
|
79
|
+
$signalCoverageAvailable(runId, taskId, available) {
|
|
68
80
|
this.withLiveRun(runId, run => {
|
|
69
81
|
const task = run.tasks.find(t => t.id === taskId);
|
|
70
82
|
if (!task) {
|
|
71
83
|
return;
|
|
72
84
|
}
|
|
73
|
-
|
|
74
|
-
provideFileCoverage: async (token) =>
|
|
75
|
-
|
|
76
|
-
|
|
85
|
+
const fn = available ? ((token) => TestCoverage.load(taskId, {
|
|
86
|
+
provideFileCoverage: async (token) => await this.proxy.$provideFileCoverage(runId, taskId, token)
|
|
87
|
+
.then(c => ( c.map(IFileCoverage.deserialize))),
|
|
88
|
+
resolveFileCoverage: (i, token) => this.proxy.$resolveFileCoverage(runId, taskId, i, token)
|
|
89
|
+
.then(d => ( d.map(CoverageDetails.deserialize))),
|
|
90
|
+
}, token)) : undefined;
|
|
91
|
+
task.coverage.set(fn, undefined);
|
|
77
92
|
});
|
|
78
93
|
}
|
|
79
94
|
$startedExtensionTestRun(req) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __decorate, __param } from '../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
-
import { Disposable, DisposableStore } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
|
|
2
|
+
import { Disposable, DisposableMap, DisposableStore } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
|
|
3
3
|
import { MainContext, ExtHostContext } from 'vscode/vscode/vs/workbench/api/common/extHost.protocol';
|
|
4
4
|
import { IViewsService, Extensions, NoTreeViewError, ResolvableTreeItem } from 'vscode/vscode/vs/workbench/common/views';
|
|
5
5
|
import { extHostNamedCustomer } from '../../services/extensions/common/extHostCustomers.js';
|
|
@@ -20,7 +20,7 @@ let MainThreadTreeViews = class MainThreadTreeViews extends Disposable {
|
|
|
20
20
|
this.notificationService = notificationService;
|
|
21
21
|
this.extensionService = extensionService;
|
|
22
22
|
this.logService = logService;
|
|
23
|
-
this._dataProviders = ( new
|
|
23
|
+
this._dataProviders = this._register(( new DisposableMap()));
|
|
24
24
|
this._dndControllers = ( new Map());
|
|
25
25
|
this._proxy = ( extHostContext.getProxy(ExtHostContext.ExtHostTreeViews));
|
|
26
26
|
}
|
|
@@ -29,8 +29,7 @@ let MainThreadTreeViews = class MainThreadTreeViews extends Disposable {
|
|
|
29
29
|
this.extensionService.whenInstalledExtensionsRegistered().then(() => {
|
|
30
30
|
const dataProvider = ( new TreeViewDataProvider(treeViewId, this._proxy, this.notificationService));
|
|
31
31
|
const disposables = ( new DisposableStore());
|
|
32
|
-
this.
|
|
33
|
-
this._dataProviders.set(treeViewId, { dataProvider, disposables });
|
|
32
|
+
this._dataProviders.set(treeViewId, { dataProvider, dispose: () => disposables.dispose() });
|
|
34
33
|
const dndController = (options.hasHandleDrag || options.hasHandleDrop)
|
|
35
34
|
? ( new TreeViewDragAndDropController(
|
|
36
35
|
treeViewId,
|
|
@@ -112,11 +111,7 @@ let MainThreadTreeViews = class MainThreadTreeViews extends Disposable {
|
|
|
112
111
|
if (viewer) {
|
|
113
112
|
viewer.dataProvider = undefined;
|
|
114
113
|
}
|
|
115
|
-
|
|
116
|
-
if (dataProvider) {
|
|
117
|
-
dataProvider.disposables.dispose();
|
|
118
|
-
this._dataProviders.delete(treeViewId);
|
|
119
|
-
}
|
|
114
|
+
this._dataProviders.deleteAndDispose(treeViewId);
|
|
120
115
|
}
|
|
121
116
|
async reveal(treeView, dataProvider, itemIn, parentChain, options) {
|
|
122
117
|
options = options ? options : { select: false, focus: false };
|
|
@@ -173,13 +168,13 @@ let MainThreadTreeViews = class MainThreadTreeViews extends Disposable {
|
|
|
173
168
|
return viewDescriptor ? viewDescriptor.treeView : null;
|
|
174
169
|
}
|
|
175
170
|
dispose() {
|
|
176
|
-
this._dataProviders
|
|
177
|
-
const treeView = this.getTreeView(
|
|
171
|
+
for (const dataprovider of this._dataProviders) {
|
|
172
|
+
const treeView = this.getTreeView(dataprovider[0]);
|
|
178
173
|
if (treeView) {
|
|
179
174
|
treeView.dataProvider = undefined;
|
|
180
175
|
}
|
|
181
|
-
}
|
|
182
|
-
this._dataProviders.
|
|
176
|
+
}
|
|
177
|
+
this._dataProviders.dispose();
|
|
183
178
|
this._dndControllers.clear();
|
|
184
179
|
super.dispose();
|
|
185
180
|
}
|
|
@@ -42,7 +42,7 @@ let MainThreadTunnelService = class MainThreadTunnelService extends Disposable {
|
|
|
42
42
|
this._proxy.$registerCandidateFinder(this.processFindingEnabled());
|
|
43
43
|
}
|
|
44
44
|
else {
|
|
45
|
-
this._register(this.remoteExplorerService.onEnabledPortsFeatures(() => this._proxy.$registerCandidateFinder(this.
|
|
45
|
+
this._register(this.remoteExplorerService.onEnabledPortsFeatures(() => this._proxy.$registerCandidateFinder(this.processFindingEnabled())));
|
|
46
46
|
}
|
|
47
47
|
this._register(this.configurationService.onDidChangeConfiguration(async (e) => {
|
|
48
48
|
if (e.affectsConfiguration(PORT_AUTO_FORWARD_SETTING) || e.affectsConfiguration(PORT_AUTO_SOURCE_SETTING)) {
|
|
@@ -205,6 +205,9 @@ let MainThreadWorkspace = class MainThreadWorkspace {
|
|
|
205
205
|
$resolveProxy(url) {
|
|
206
206
|
return this._requestService.resolveProxy(url);
|
|
207
207
|
}
|
|
208
|
+
$loadCertificates() {
|
|
209
|
+
return this._requestService.loadCertificates();
|
|
210
|
+
}
|
|
208
211
|
$requestWorkspaceTrust(options) {
|
|
209
212
|
return this._workspaceTrustRequestService.requestWorkspaceTrust(options);
|
|
210
213
|
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Codicon } from 'monaco-editor/esm/vs/base/common/codicons.js';
|
|
2
|
+
import { localizeWithPath } from 'monaco-editor/esm/vs/nls.js';
|
|
3
|
+
import { Action2, MenuId } from 'monaco-editor/esm/vs/platform/actions/common/actions.js';
|
|
4
|
+
import { CHAT_CATEGORY } from 'vscode/vscode/vs/workbench/contrib/chat/browser/actions/chatActions';
|
|
5
|
+
import { IChatWidgetService } from 'vscode/vscode/vs/workbench/contrib/chat/browser/chat';
|
|
6
|
+
import { CONTEXT_CHAT_INPUT_HAS_TEXT, CONTEXT_CHAT_REQUEST_IN_PROGRESS } from 'vscode/vscode/vs/workbench/contrib/chat/common/chatContextKeys';
|
|
7
|
+
|
|
8
|
+
class SubmitAction extends Action2 {
|
|
9
|
+
static { this.ID = 'workbench.action.chat.submit'; }
|
|
10
|
+
constructor() {
|
|
11
|
+
super({
|
|
12
|
+
id: SubmitAction.ID,
|
|
13
|
+
title: {
|
|
14
|
+
value: ( localizeWithPath(
|
|
15
|
+
'vs/workbench/contrib/chat/browser/actions/chatExecuteActions',
|
|
16
|
+
'interactive.submit.label',
|
|
17
|
+
"Submit"
|
|
18
|
+
)),
|
|
19
|
+
original: 'Submit'
|
|
20
|
+
},
|
|
21
|
+
f1: false,
|
|
22
|
+
category: CHAT_CATEGORY,
|
|
23
|
+
icon: Codicon.send,
|
|
24
|
+
precondition: CONTEXT_CHAT_INPUT_HAS_TEXT,
|
|
25
|
+
menu: {
|
|
26
|
+
id: MenuId.ChatExecute,
|
|
27
|
+
when: ( CONTEXT_CHAT_REQUEST_IN_PROGRESS.negate()),
|
|
28
|
+
group: 'navigation',
|
|
29
|
+
},
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
run(accessor, ...args) {
|
|
33
|
+
const context = args[0];
|
|
34
|
+
const widgetService = accessor.get(IChatWidgetService);
|
|
35
|
+
const widget = context?.widget ?? widgetService.lastFocusedWidget;
|
|
36
|
+
widget?.acceptInput(context?.inputValue);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export { SubmitAction };
|