@codingame/monaco-vscode-extensions-service-override 25.1.2 → 26.0.1
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/index.js +7 -0
- package/package.json +3 -3
- package/vscode/src/vs/base/common/console.js +24 -15
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagementCLI.d.ts +4 -1
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagementCLI.js +149 -84
- package/vscode/src/vs/platform/extensionResourceLoader/browser/extensionResourceLoaderService.js +20 -12
- package/vscode/src/vs/platform/extensionResourceLoader/common/extensionResourceLoader.js +38 -21
- package/vscode/src/vs/platform/remote/common/managedSocket.js +7 -10
- package/vscode/src/vs/workbench/api/browser/mainThreadAiEmbeddingVector.js +5 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadAiRelatedInformation.js +5 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadAiSettingsSearch.js +4 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadAuthentication.js +200 -143
- package/vscode/src/vs/workbench/api/browser/mainThreadBulkEdits.js +10 -14
- package/vscode/src/vs/workbench/api/browser/mainThreadCLICommands.js +41 -31
- package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents2.d.ts +9 -12
- package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents2.js +168 -115
- package/vscode/src/vs/workbench/api/browser/mainThreadChatCodeMapper.js +11 -13
- package/vscode/src/vs/workbench/api/browser/mainThreadChatContext.d.ts +5 -5
- package/vscode/src/vs/workbench/api/browser/mainThreadChatContext.js +42 -15
- package/vscode/src/vs/workbench/api/browser/mainThreadChatOutputRenderer.js +8 -7
- package/vscode/src/vs/workbench/api/browser/mainThreadChatSessions.d.ts +4 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadChatSessions.js +170 -99
- package/vscode/src/vs/workbench/api/browser/mainThreadChatStatus.js +2 -5
- package/vscode/src/vs/workbench/api/browser/mainThreadClipboard.js +4 -9
- package/vscode/src/vs/workbench/api/browser/mainThreadCodeInsets.js +13 -12
- package/vscode/src/vs/workbench/api/browser/mainThreadCommands.js +16 -19
- package/vscode/src/vs/workbench/api/browser/mainThreadComments.js +127 -70
- package/vscode/src/vs/workbench/api/browser/mainThreadConfiguration.js +80 -26
- package/vscode/src/vs/workbench/api/browser/mainThreadConsole.js +5 -11
- package/vscode/src/vs/workbench/api/browser/mainThreadCustomEditors.js +199 -97
- package/vscode/src/vs/workbench/api/browser/mainThreadDataChannels.js +1 -4
- package/vscode/src/vs/workbench/api/browser/mainThreadDebugService.js +88 -73
- package/vscode/src/vs/workbench/api/browser/mainThreadDecorations.js +5 -5
- package/vscode/src/vs/workbench/api/browser/mainThreadDiagnostics.js +16 -12
- package/vscode/src/vs/workbench/api/browser/mainThreadDialogs.js +10 -8
- package/vscode/src/vs/workbench/api/browser/mainThreadDocumentContentProviders.js +14 -6
- package/vscode/src/vs/workbench/api/browser/mainThreadDocuments.js +52 -37
- package/vscode/src/vs/workbench/api/browser/mainThreadDocumentsAndEditors.js +78 -58
- package/vscode/src/vs/workbench/api/browser/mainThreadEditSessionIdentityParticipant.js +5 -7
- package/vscode/src/vs/workbench/api/browser/mainThreadEditor.js +75 -63
- package/vscode/src/vs/workbench/api/browser/mainThreadEditorTabs.js +99 -91
- package/vscode/src/vs/workbench/api/browser/mainThreadEditors.js +93 -55
- package/vscode/src/vs/workbench/api/browser/mainThreadEmbeddings.js +3 -7
- package/vscode/src/vs/workbench/api/browser/mainThreadExtensionService.js +85 -60
- package/vscode/src/vs/workbench/api/browser/mainThreadFileSystem.js +49 -45
- package/vscode/src/vs/workbench/api/browser/mainThreadFileSystemEventService.js +114 -72
- package/vscode/src/vs/workbench/api/browser/mainThreadInteractive.js +4 -7
- package/vscode/src/vs/workbench/api/browser/mainThreadLabelService.js +1 -4
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageFeatures.d.ts +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageFeatures.js +381 -238
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModelTools.d.ts +7 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModelTools.js +90 -13
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModels.js +81 -58
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguages.js +9 -10
- package/vscode/src/vs/workbench/api/browser/mainThreadLocalization.js +2 -7
- package/vscode/src/vs/workbench/api/browser/mainThreadLogService.js +6 -10
- package/vscode/src/vs/workbench/api/browser/mainThreadManagedSockets.js +12 -10
- package/vscode/src/vs/workbench/api/browser/mainThreadMcp.d.ts +3 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadMcp.js +162 -97
- package/vscode/src/vs/workbench/api/browser/mainThreadMessageService.js +32 -26
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebook.js +38 -32
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDocuments.js +48 -46
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDocumentsAndEditors.js +22 -18
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookDto.js +5 -8
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookEditors.js +35 -21
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookKernels.js +31 -28
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookSaveParticipant.js +5 -7
- package/vscode/src/vs/workbench/api/browser/mainThreadOutputService.js +47 -23
- package/vscode/src/vs/workbench/api/browser/mainThreadProfileContentHandlers.js +15 -12
- package/vscode/src/vs/workbench/api/browser/mainThreadProgress.js +17 -18
- package/vscode/src/vs/workbench/api/browser/mainThreadQuickDiff.js +6 -7
- package/vscode/src/vs/workbench/api/browser/mainThreadQuickOpen.js +83 -66
- package/vscode/src/vs/workbench/api/browser/mainThreadRemoteConnectionData.js +1 -5
- package/vscode/src/vs/workbench/api/browser/mainThreadSCM.js +250 -92
- package/vscode/src/vs/workbench/api/browser/mainThreadSaveParticipant.js +6 -8
- package/vscode/src/vs/workbench/api/browser/mainThreadSearch.js +37 -26
- package/vscode/src/vs/workbench/api/browser/mainThreadSecretState.js +34 -21
- package/vscode/src/vs/workbench/api/browser/mainThreadShare.js +3 -6
- package/vscode/src/vs/workbench/api/browser/mainThreadSpeech.js +19 -14
- package/vscode/src/vs/workbench/api/browser/mainThreadStatusBar.js +41 -16
- package/vscode/src/vs/workbench/api/browser/mainThreadStorage.js +18 -17
- package/vscode/src/vs/workbench/api/browser/mainThreadTask.js +145 -145
- package/vscode/src/vs/workbench/api/browser/mainThreadTelemetry.js +19 -11
- package/vscode/src/vs/workbench/api/browser/mainThreadTerminalService.js +176 -80
- package/vscode/src/vs/workbench/api/browser/mainThreadTerminalShellIntegration.js +52 -21
- package/vscode/src/vs/workbench/api/browser/mainThreadTesting.js +26 -24
- package/vscode/src/vs/workbench/api/browser/mainThreadTheming.js +1 -4
- package/vscode/src/vs/workbench/api/browser/mainThreadTimeline.js +5 -8
- package/vscode/src/vs/workbench/api/browser/mainThreadTreeViews.d.ts +4 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadTreeViews.js +106 -46
- package/vscode/src/vs/workbench/api/browser/mainThreadTunnelService.js +83 -65
- package/vscode/src/vs/workbench/api/browser/mainThreadUriOpeners.js +20 -20
- package/vscode/src/vs/workbench/api/browser/mainThreadUrls.js +14 -9
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviewManager.js +17 -9
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviewPanels.js +49 -38
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviewViews.js +10 -13
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviews.js +38 -27
- package/vscode/src/vs/workbench/api/browser/mainThreadWindow.js +5 -11
- package/vscode/src/vs/workbench/api/browser/mainThreadWorkspace.d.ts +4 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadWorkspace.js +73 -43
- package/vscode/src/vs/workbench/api/common/shared/dataTransferCache.js +2 -2
- package/vscode/src/vs/workbench/contrib/customEditor/common/customTextEditorModel.js +17 -10
- package/vscode/src/vs/workbench/contrib/externalUriOpener/common/contributedOpeners.js +17 -11
- package/vscode/src/vs/workbench/services/extensionManagement/browser/extensionBisect.js +107 -80
- package/vscode/src/vs/workbench/services/extensionManagement/browser/webExtensionsScannerService.js +336 -175
- package/vscode/src/vs/workbench/services/extensions/browser/extensionService.js +126 -71
- package/vscode/src/vs/workbench/services/extensions/browser/webWorkerExtensionHost.js +76 -54
- package/vscode/src/vs/workbench/services/extensions/browser/webWorkerFileSystemProvider.js +1 -2
- package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.d.ts +2 -0
- package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.js +343 -192
- package/vscode/src/vs/workbench/services/extensions/common/extHostCustomers.js +5 -3
- package/vscode/src/vs/workbench/services/extensions/common/extensionHostManager.d.ts +0 -1
- package/vscode/src/vs/workbench/services/extensions/common/extensionHostManager.js +75 -68
- package/vscode/src/vs/workbench/services/extensions/common/extensionRunningLocationTracker.js +135 -36
- package/vscode/src/vs/workbench/services/extensions/common/extensionsProposedApi.js +22 -18
- package/vscode/src/vs/workbench/services/extensions/common/extensionsUtil.js +14 -12
- package/vscode/src/vs/workbench/services/extensions/common/lazyCreateExtensionHostManager.js +21 -9
- package/vscode/src/vs/workbench/services/extensions/common/remoteExtensionHost.js +48 -25
- package/vscode/src/vs/workbench/services/themes/browser/cssExtensionPoint.d.ts +24 -0
- package/vscode/src/vs/workbench/services/themes/browser/cssExtensionPoint.js +300 -0
|
@@ -10,22 +10,17 @@ let MainThreadClipboard = class MainThreadClipboard {
|
|
|
10
10
|
this._clipboardService = _clipboardService;
|
|
11
11
|
this._logService = _logService;
|
|
12
12
|
}
|
|
13
|
-
dispose() {
|
|
14
|
-
}
|
|
13
|
+
dispose() {}
|
|
15
14
|
$readText() {
|
|
16
|
-
this._logService.trace(
|
|
15
|
+
this._logService.trace("MainThreadClipboard#readText");
|
|
17
16
|
const readText = this._clipboardService.readText();
|
|
18
17
|
return readText;
|
|
19
18
|
}
|
|
20
19
|
$writeText(value) {
|
|
21
|
-
this._logService.trace(
|
|
20
|
+
this._logService.trace("MainThreadClipboard#writeText with text.length : ", value.length);
|
|
22
21
|
return this._clipboardService.writeText(value);
|
|
23
22
|
}
|
|
24
23
|
};
|
|
25
|
-
MainThreadClipboard = __decorate([
|
|
26
|
-
extHostNamedCustomer(MainContext.MainThreadClipboard),
|
|
27
|
-
( __param(1, IClipboardService)),
|
|
28
|
-
( __param(2, ILogService))
|
|
29
|
-
], MainThreadClipboard);
|
|
24
|
+
MainThreadClipboard = __decorate([extHostNamedCustomer(MainContext.MainThreadClipboard), ( __param(1, IClipboardService)), ( __param(2, ILogService))], MainThreadClipboard);
|
|
30
25
|
|
|
31
26
|
export { MainThreadClipboard };
|
|
@@ -16,8 +16,8 @@ class EditorWebviewZone {
|
|
|
16
16
|
this.line = line;
|
|
17
17
|
this.height = height;
|
|
18
18
|
this.webview = webview;
|
|
19
|
-
this.domNode = createElement(
|
|
20
|
-
this.domNode.style.zIndex =
|
|
19
|
+
this.domNode = createElement("div");
|
|
20
|
+
this.domNode.style.zIndex = "10";
|
|
21
21
|
this.afterLineNumber = line;
|
|
22
22
|
this.afterColumn = 1;
|
|
23
23
|
this.heightInLines = height;
|
|
@@ -41,7 +41,7 @@ let MainThreadEditorInsets = class MainThreadEditorInsets {
|
|
|
41
41
|
}
|
|
42
42
|
async $createEditorInset(handle, id, uri, line, height, options, extensionId, extensionLocation) {
|
|
43
43
|
let editor;
|
|
44
|
-
id = id.substr(0, id.indexOf(
|
|
44
|
+
id = id.substr(0, id.indexOf(","));
|
|
45
45
|
for (const candidate of this._editorService.listCodeEditors()) {
|
|
46
46
|
if (candidate.getId() === id && candidate.hasModel() && isEqual(candidate.getModel().uri, URI.revive(uri))) {
|
|
47
47
|
editor = candidate;
|
|
@@ -56,10 +56,13 @@ let MainThreadEditorInsets = class MainThreadEditorInsets {
|
|
|
56
56
|
const webview = this._webviewService.createWebviewElement({
|
|
57
57
|
title: undefined,
|
|
58
58
|
options: {
|
|
59
|
-
enableFindWidget: false
|
|
59
|
+
enableFindWidget: false
|
|
60
60
|
},
|
|
61
61
|
contentOptions: reviveWebviewContentOptions(options),
|
|
62
|
-
extension: {
|
|
62
|
+
extension: {
|
|
63
|
+
id: extensionId,
|
|
64
|
+
location: URI.revive(extensionLocation)
|
|
65
|
+
}
|
|
63
66
|
});
|
|
64
67
|
const webviewZone = ( new EditorWebviewZone(editor, line, height, webview));
|
|
65
68
|
const remove = () => {
|
|
@@ -71,7 +74,9 @@ let MainThreadEditorInsets = class MainThreadEditorInsets {
|
|
|
71
74
|
disposables.add(editor.onDidDispose(remove));
|
|
72
75
|
disposables.add(webviewZone);
|
|
73
76
|
disposables.add(webview);
|
|
74
|
-
disposables.add(
|
|
77
|
+
disposables.add(
|
|
78
|
+
webview.onMessage(msg => this._proxy.$onDidReceiveMessage(handle, msg.message))
|
|
79
|
+
);
|
|
75
80
|
this._insets.set(handle, webviewZone);
|
|
76
81
|
}
|
|
77
82
|
$disposeEditorInset(handle) {
|
|
@@ -95,15 +100,11 @@ let MainThreadEditorInsets = class MainThreadEditorInsets {
|
|
|
95
100
|
getInset(handle) {
|
|
96
101
|
const inset = this._insets.get(handle);
|
|
97
102
|
if (!inset) {
|
|
98
|
-
throw ( new Error(
|
|
103
|
+
throw ( new Error("Unknown inset"));
|
|
99
104
|
}
|
|
100
105
|
return inset;
|
|
101
106
|
}
|
|
102
107
|
};
|
|
103
|
-
MainThreadEditorInsets = __decorate([
|
|
104
|
-
extHostNamedCustomer(MainContext.MainThreadEditorInsets),
|
|
105
|
-
( __param(1, ICodeEditorService)),
|
|
106
|
-
( __param(2, IWebviewService))
|
|
107
|
-
], MainThreadEditorInsets);
|
|
108
|
+
MainThreadEditorInsets = __decorate([extHostNamedCustomer(MainContext.MainThreadEditorInsets), ( __param(1, ICodeEditorService)), ( __param(2, IWebviewService))], MainThreadEditorInsets);
|
|
108
109
|
|
|
109
110
|
export { MainThreadEditorInsets };
|
|
@@ -16,7 +16,10 @@ let MainThreadCommands = class MainThreadCommands {
|
|
|
16
16
|
this._extensionService = _extensionService;
|
|
17
17
|
this._commandRegistrations = ( new DisposableMap());
|
|
18
18
|
this._proxy = ( extHostContext.getProxy(ExtHostContext.ExtHostCommands));
|
|
19
|
-
this._generateCommandsDocumentationRegistration = CommandsRegistry.registerCommand(
|
|
19
|
+
this._generateCommandsDocumentationRegistration = CommandsRegistry.registerCommand(
|
|
20
|
+
"_generateCommandsDocumentation",
|
|
21
|
+
() => this._generateCommandsDocumentation()
|
|
22
|
+
);
|
|
20
23
|
}
|
|
21
24
|
dispose() {
|
|
22
25
|
this._commandRegistrations.dispose();
|
|
@@ -32,9 +35,9 @@ let MainThreadCommands = class MainThreadCommands {
|
|
|
32
35
|
}
|
|
33
36
|
const all = [];
|
|
34
37
|
for (const id in result) {
|
|
35
|
-
all.push(
|
|
38
|
+
all.push("`" + id + "` - " + _generateMarkdown(result[id]));
|
|
36
39
|
}
|
|
37
|
-
console.log(all.join(
|
|
40
|
+
console.log(all.join("\n"));
|
|
38
41
|
}
|
|
39
42
|
$registerCommand(id) {
|
|
40
43
|
this._commandRegistrations.set(id, CommandsRegistry.registerCommand(id, (accessor, ...args) => {
|
|
@@ -61,7 +64,7 @@ let MainThreadCommands = class MainThreadCommands {
|
|
|
61
64
|
}
|
|
62
65
|
if (retry && args.length > 0 && !CommandsRegistry.getCommand(id)) {
|
|
63
66
|
await this._extensionService.activateByEvent(`onCommand:${id}`);
|
|
64
|
-
throw ( new Error(
|
|
67
|
+
throw ( new Error("$executeCommand:retry"));
|
|
65
68
|
}
|
|
66
69
|
return this._commandService.executeCommand(id, ...args);
|
|
67
70
|
}
|
|
@@ -69,31 +72,25 @@ let MainThreadCommands = class MainThreadCommands {
|
|
|
69
72
|
return Promise.resolve([...( CommandsRegistry.getCommands().keys())]);
|
|
70
73
|
}
|
|
71
74
|
};
|
|
72
|
-
MainThreadCommands = __decorate([
|
|
73
|
-
extHostNamedCustomer(MainContext.MainThreadCommands),
|
|
74
|
-
( __param(1, ICommandService)),
|
|
75
|
-
( __param(2, IExtensionService))
|
|
76
|
-
], MainThreadCommands);
|
|
75
|
+
MainThreadCommands = __decorate([extHostNamedCustomer(MainContext.MainThreadCommands), ( __param(1, ICommandService)), ( __param(2, IExtensionService))], MainThreadCommands);
|
|
77
76
|
function _generateMarkdown(description) {
|
|
78
|
-
if (typeof description ===
|
|
77
|
+
if (typeof description === "string") {
|
|
79
78
|
return description;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
? description.description
|
|
84
|
-
: description.description.original;
|
|
79
|
+
} else {
|
|
80
|
+
const descriptionString = isString(description.description) ?
|
|
81
|
+
description.description : description.description.original;
|
|
85
82
|
const parts = [descriptionString];
|
|
86
|
-
parts.push(
|
|
83
|
+
parts.push("\n\n");
|
|
87
84
|
if (description.args) {
|
|
88
85
|
for (const arg of description.args) {
|
|
89
|
-
parts.push(`* _${arg.name}_ - ${arg.description ||
|
|
86
|
+
parts.push(`* _${arg.name}_ - ${arg.description || ""}\n`);
|
|
90
87
|
}
|
|
91
88
|
}
|
|
92
89
|
if (description.returns) {
|
|
93
90
|
parts.push(`* _(returns)_ - ${description.returns}`);
|
|
94
91
|
}
|
|
95
|
-
parts.push(
|
|
96
|
-
return parts.join(
|
|
92
|
+
parts.push("\n\n");
|
|
93
|
+
return parts.join("");
|
|
97
94
|
}
|
|
98
95
|
}
|
|
99
96
|
|
|
@@ -33,7 +33,9 @@ class MainThreadCommentThread {
|
|
|
33
33
|
this._input = value;
|
|
34
34
|
this._onDidChangeInput.fire(value);
|
|
35
35
|
}
|
|
36
|
-
get onDidChangeInput() {
|
|
36
|
+
get onDidChangeInput() {
|
|
37
|
+
return this._onDidChangeInput.event;
|
|
38
|
+
}
|
|
37
39
|
get label() {
|
|
38
40
|
return this._label;
|
|
39
41
|
}
|
|
@@ -54,14 +56,18 @@ class MainThreadCommentThread {
|
|
|
54
56
|
this._comments = newComments;
|
|
55
57
|
this._onDidChangeComments.fire(this._comments);
|
|
56
58
|
}
|
|
57
|
-
get onDidChangeComments() {
|
|
59
|
+
get onDidChangeComments() {
|
|
60
|
+
return this._onDidChangeComments.event;
|
|
61
|
+
}
|
|
58
62
|
set range(range) {
|
|
59
63
|
this._range = range;
|
|
60
64
|
}
|
|
61
65
|
get range() {
|
|
62
66
|
return this._range;
|
|
63
67
|
}
|
|
64
|
-
get onDidChangeCanReply() {
|
|
68
|
+
get onDidChangeCanReply() {
|
|
69
|
+
return this._onDidChangeCanReply.event;
|
|
70
|
+
}
|
|
65
71
|
set canReply(state) {
|
|
66
72
|
this._canReply = state;
|
|
67
73
|
this._onDidChangeCanReply.fire(!!this._canReply);
|
|
@@ -111,7 +117,18 @@ class MainThreadCommentThread {
|
|
|
111
117
|
get isTemplate() {
|
|
112
118
|
return this._isTemplate;
|
|
113
119
|
}
|
|
114
|
-
constructor(
|
|
120
|
+
constructor(
|
|
121
|
+
commentThreadHandle,
|
|
122
|
+
controllerHandle,
|
|
123
|
+
extensionId,
|
|
124
|
+
threadId,
|
|
125
|
+
resource,
|
|
126
|
+
_range,
|
|
127
|
+
comments,
|
|
128
|
+
_canReply,
|
|
129
|
+
_isTemplate,
|
|
130
|
+
editorId
|
|
131
|
+
) {
|
|
115
132
|
this.commentThreadHandle = commentThreadHandle;
|
|
116
133
|
this.controllerHandle = controllerHandle;
|
|
117
134
|
this.extensionId = extensionId;
|
|
@@ -138,38 +155,37 @@ class MainThreadCommentThread {
|
|
|
138
155
|
this._isDisposed = false;
|
|
139
156
|
if (_isTemplate) {
|
|
140
157
|
this.comments = [];
|
|
141
|
-
}
|
|
142
|
-
else if (comments) {
|
|
158
|
+
} else if (comments) {
|
|
143
159
|
this._comments = comments;
|
|
144
160
|
}
|
|
145
161
|
}
|
|
146
162
|
batchUpdate(changes) {
|
|
147
|
-
const modified =
|
|
148
|
-
if (modified(
|
|
163
|
+
const modified = value => Object.prototype.hasOwnProperty.call(changes, value);
|
|
164
|
+
if (modified("range")) {
|
|
149
165
|
this._range = changes.range;
|
|
150
166
|
}
|
|
151
|
-
if (modified(
|
|
167
|
+
if (modified("label")) {
|
|
152
168
|
this._label = changes.label;
|
|
153
169
|
}
|
|
154
|
-
if (modified(
|
|
170
|
+
if (modified("contextValue")) {
|
|
155
171
|
this._contextValue = changes.contextValue === null ? undefined : changes.contextValue;
|
|
156
172
|
}
|
|
157
|
-
if (modified(
|
|
173
|
+
if (modified("comments")) {
|
|
158
174
|
this.comments = changes.comments;
|
|
159
175
|
}
|
|
160
|
-
if (modified(
|
|
176
|
+
if (modified("collapseState")) {
|
|
161
177
|
this.collapsibleState = changes.collapseState;
|
|
162
178
|
}
|
|
163
|
-
if (modified(
|
|
179
|
+
if (modified("canReply")) {
|
|
164
180
|
this.canReply = changes.canReply;
|
|
165
181
|
}
|
|
166
|
-
if (modified(
|
|
182
|
+
if (modified("state")) {
|
|
167
183
|
this.state = changes.state;
|
|
168
184
|
}
|
|
169
|
-
if (modified(
|
|
185
|
+
if (modified("applicability")) {
|
|
170
186
|
this.applicability = changes.applicability;
|
|
171
187
|
}
|
|
172
|
-
if (modified(
|
|
188
|
+
if (modified("isTemplate")) {
|
|
173
189
|
this._isTemplate = changes.isTemplate;
|
|
174
190
|
}
|
|
175
191
|
}
|
|
@@ -188,7 +204,7 @@ class MainThreadCommentThread {
|
|
|
188
204
|
return {
|
|
189
205
|
$mid: MarshalledId.CommentThread,
|
|
190
206
|
commentControlHandle: this.controllerHandle,
|
|
191
|
-
commentThreadHandle: this.commentThreadHandle
|
|
207
|
+
commentThreadHandle: this.commentThreadHandle
|
|
192
208
|
};
|
|
193
209
|
}
|
|
194
210
|
}
|
|
@@ -248,17 +264,31 @@ class MainThreadCommentController extends Disposable {
|
|
|
248
264
|
}
|
|
249
265
|
async setActiveCommentAndThread(commentInfo) {
|
|
250
266
|
this._activeComment = commentInfo;
|
|
251
|
-
return this._proxy.$setActiveComment(this._handle, commentInfo ? {
|
|
267
|
+
return this._proxy.$setActiveComment(this._handle, commentInfo ? {
|
|
268
|
+
commentThreadHandle: commentInfo.thread.commentThreadHandle,
|
|
269
|
+
uniqueIdInThread: commentInfo.comment?.uniqueIdInThread
|
|
270
|
+
} : undefined);
|
|
252
271
|
}
|
|
253
272
|
updateFeatures(features) {
|
|
254
273
|
this._features = features;
|
|
255
274
|
}
|
|
256
|
-
createCommentThread(
|
|
275
|
+
createCommentThread(
|
|
276
|
+
extensionId,
|
|
277
|
+
commentThreadHandle,
|
|
278
|
+
threadId,
|
|
279
|
+
resource,
|
|
280
|
+
range,
|
|
281
|
+
comments,
|
|
282
|
+
isTemplate,
|
|
283
|
+
editorId
|
|
284
|
+
) {
|
|
257
285
|
const thread = ( new MainThreadCommentThread(commentThreadHandle, this.handle, extensionId, threadId, ( URI.revive(resource).toString()), range, comments, true, isTemplate, editorId));
|
|
258
286
|
const threadWithDisposable = ( new CommentThreadWithDisposable(thread));
|
|
259
287
|
this._threads.set(commentThreadHandle, threadWithDisposable);
|
|
260
288
|
threadWithDisposable.disposableStore.add(thread.onDidChangeCollapsibleState(() => {
|
|
261
|
-
this.proxy.$updateCommentThread(this.handle, thread.commentThreadHandle, {
|
|
289
|
+
this.proxy.$updateCommentThread(this.handle, thread.commentThreadHandle, {
|
|
290
|
+
collapseState: thread.collapsibleState
|
|
291
|
+
});
|
|
262
292
|
}));
|
|
263
293
|
if (thread.isDocumentCommentThread()) {
|
|
264
294
|
this._commentService.updateComments(this._uniqueId, {
|
|
@@ -267,8 +297,7 @@ class MainThreadCommentController extends Disposable {
|
|
|
267
297
|
changed: [],
|
|
268
298
|
pending: []
|
|
269
299
|
});
|
|
270
|
-
}
|
|
271
|
-
else {
|
|
300
|
+
} else {
|
|
272
301
|
this._commentService.updateNotebookComments(this._uniqueId, {
|
|
273
302
|
added: [thread],
|
|
274
303
|
removed: [],
|
|
@@ -288,8 +317,7 @@ class MainThreadCommentController extends Disposable {
|
|
|
288
317
|
changed: [thread],
|
|
289
318
|
pending: []
|
|
290
319
|
});
|
|
291
|
-
}
|
|
292
|
-
else {
|
|
320
|
+
} else {
|
|
293
321
|
this._commentService.updateNotebookComments(this._uniqueId, {
|
|
294
322
|
added: [],
|
|
295
323
|
removed: [],
|
|
@@ -309,8 +337,7 @@ class MainThreadCommentController extends Disposable {
|
|
|
309
337
|
changed: [],
|
|
310
338
|
pending: []
|
|
311
339
|
});
|
|
312
|
-
}
|
|
313
|
-
else {
|
|
340
|
+
} else {
|
|
314
341
|
this._commentService.updateNotebookComments(this._uniqueId, {
|
|
315
342
|
added: [],
|
|
316
343
|
removed: [thread],
|
|
@@ -320,7 +347,9 @@ class MainThreadCommentController extends Disposable {
|
|
|
320
347
|
}
|
|
321
348
|
}
|
|
322
349
|
deleteCommentThreadMain(commentThreadId) {
|
|
323
|
-
for (const {
|
|
350
|
+
for (const {
|
|
351
|
+
thread
|
|
352
|
+
} of ( this._threads.values())) {
|
|
324
353
|
if (thread.threadId === commentThreadId) {
|
|
325
354
|
this._proxy.$deleteCommentThread(this._handle, thread.commentThreadHandle);
|
|
326
355
|
}
|
|
@@ -340,7 +369,7 @@ class MainThreadCommentController extends Disposable {
|
|
|
340
369
|
getKnownThread(commentThreadHandle) {
|
|
341
370
|
const thread = this._threads.get(commentThreadHandle);
|
|
342
371
|
if (!thread) {
|
|
343
|
-
throw ( new Error(
|
|
372
|
+
throw ( new Error("unknown thread"));
|
|
344
373
|
}
|
|
345
374
|
return thread.thread;
|
|
346
375
|
}
|
|
@@ -424,9 +453,16 @@ class MainThreadCommentController extends Disposable {
|
|
|
424
453
|
};
|
|
425
454
|
}
|
|
426
455
|
}
|
|
427
|
-
const commentsViewIcon = registerIcon(
|
|
456
|
+
const commentsViewIcon = registerIcon("comments-view-icon", Codicon.commentDiscussion, ( localize(2503, "View icon of the comments view.")));
|
|
428
457
|
let MainThreadComments = class MainThreadComments extends Disposable {
|
|
429
|
-
constructor(
|
|
458
|
+
constructor(
|
|
459
|
+
extHostContext,
|
|
460
|
+
_commentService,
|
|
461
|
+
_viewsService,
|
|
462
|
+
_viewDescriptorService,
|
|
463
|
+
_uriIdentityService,
|
|
464
|
+
_editorService
|
|
465
|
+
) {
|
|
430
466
|
super();
|
|
431
467
|
this._commentService = _commentService;
|
|
432
468
|
this._viewsService = _viewsService;
|
|
@@ -441,16 +477,18 @@ let MainThreadComments = class MainThreadComments extends Disposable {
|
|
|
441
477
|
this._onChangeContainerLocationListener = this._register(( new MutableDisposable()));
|
|
442
478
|
this._proxy = ( extHostContext.getProxy(ExtHostContext.ExtHostComments));
|
|
443
479
|
this._commentService.unregisterCommentController();
|
|
444
|
-
this._register(
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
480
|
+
this._register(
|
|
481
|
+
this._commentService.onDidChangeActiveEditingCommentThread(async thread => {
|
|
482
|
+
const handle = thread.controllerHandle;
|
|
483
|
+
const controller = this._commentControllers.get(handle);
|
|
484
|
+
if (!controller) {
|
|
485
|
+
return;
|
|
486
|
+
}
|
|
487
|
+
this._activeEditingCommentThreadDisposables.clear();
|
|
488
|
+
this._activeEditingCommentThread = thread;
|
|
489
|
+
controller.activeEditingCommentThread = this._activeEditingCommentThread;
|
|
490
|
+
})
|
|
491
|
+
);
|
|
454
492
|
}
|
|
455
493
|
$registerCommentController(handle, id, label, extensionId) {
|
|
456
494
|
const providerId = `${id}-${extensionId}`;
|
|
@@ -471,10 +509,9 @@ let MainThreadComments = class MainThreadComments extends Disposable {
|
|
|
471
509
|
this._handlers.delete(handle);
|
|
472
510
|
this._commentControllers.get(handle)?.dispose();
|
|
473
511
|
this._commentControllers.delete(handle);
|
|
474
|
-
if (typeof providerId !==
|
|
512
|
+
if (typeof providerId !== "string") {
|
|
475
513
|
return;
|
|
476
|
-
}
|
|
477
|
-
else {
|
|
514
|
+
} else {
|
|
478
515
|
this._commentService.unregisterCommentController(providerId);
|
|
479
516
|
}
|
|
480
517
|
}
|
|
@@ -485,12 +522,31 @@ let MainThreadComments = class MainThreadComments extends Disposable {
|
|
|
485
522
|
}
|
|
486
523
|
provider.updateFeatures(features);
|
|
487
524
|
}
|
|
488
|
-
$createCommentThread(
|
|
525
|
+
$createCommentThread(
|
|
526
|
+
handle,
|
|
527
|
+
commentThreadHandle,
|
|
528
|
+
threadId,
|
|
529
|
+
resource,
|
|
530
|
+
range,
|
|
531
|
+
comments,
|
|
532
|
+
extensionId,
|
|
533
|
+
isTemplate,
|
|
534
|
+
editorId
|
|
535
|
+
) {
|
|
489
536
|
const provider = this._commentControllers.get(handle);
|
|
490
537
|
if (!provider) {
|
|
491
538
|
return undefined;
|
|
492
539
|
}
|
|
493
|
-
return provider.createCommentThread(
|
|
540
|
+
return provider.createCommentThread(
|
|
541
|
+
extensionId.value,
|
|
542
|
+
commentThreadHandle,
|
|
543
|
+
threadId,
|
|
544
|
+
resource,
|
|
545
|
+
range,
|
|
546
|
+
comments,
|
|
547
|
+
isTemplate,
|
|
548
|
+
editorId
|
|
549
|
+
);
|
|
494
550
|
}
|
|
495
551
|
$updateCommentThread(handle, commentThreadHandle, threadId, resource, changes) {
|
|
496
552
|
const provider = this._commentControllers.get(handle);
|
|
@@ -523,7 +579,16 @@ let MainThreadComments = class MainThreadComments extends Disposable {
|
|
|
523
579
|
return Promise.resolve();
|
|
524
580
|
}
|
|
525
581
|
const comment = thread.comments?.find(comment => comment.uniqueIdInThread === commentUniqueIdInThread);
|
|
526
|
-
revealCommentThread(
|
|
582
|
+
revealCommentThread(
|
|
583
|
+
this._commentService,
|
|
584
|
+
this._editorService,
|
|
585
|
+
this._uriIdentityService,
|
|
586
|
+
thread,
|
|
587
|
+
comment,
|
|
588
|
+
options.focusReply,
|
|
589
|
+
undefined,
|
|
590
|
+
options.preserveFocus
|
|
591
|
+
);
|
|
527
592
|
}
|
|
528
593
|
async $hideCommentThread(handle, commentThreadHandle) {
|
|
529
594
|
const provider = this._commentControllers.get(handle);
|
|
@@ -542,26 +607,25 @@ let MainThreadComments = class MainThreadComments extends Disposable {
|
|
|
542
607
|
const VIEW_CONTAINER = ( Registry.as(Extensions.ViewContainersRegistry)).registerViewContainer({
|
|
543
608
|
id: COMMENTS_VIEW_ID,
|
|
544
609
|
title: COMMENTS_VIEW_TITLE,
|
|
545
|
-
ctorDescriptor: ( new SyncDescriptor(
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
)),
|
|
610
|
+
ctorDescriptor: ( new SyncDescriptor(ViewPaneContainer, [COMMENTS_VIEW_ID, {
|
|
611
|
+
mergeViewWithContainerWhenSingleView: true
|
|
612
|
+
}])),
|
|
549
613
|
storageId: COMMENTS_VIEW_STORAGE_ID,
|
|
550
614
|
hideIfEmpty: true,
|
|
551
615
|
icon: commentsViewIcon,
|
|
552
|
-
order: 10
|
|
616
|
+
order: 10
|
|
553
617
|
}, ViewContainerLocation.Panel);
|
|
554
618
|
( Registry.as(Extensions.ViewsRegistry)).registerViews([{
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
619
|
+
id: COMMENTS_VIEW_ID,
|
|
620
|
+
name: COMMENTS_VIEW_TITLE,
|
|
621
|
+
canToggleVisibility: false,
|
|
622
|
+
ctorDescriptor: ( new SyncDescriptor(CommentsPanel)),
|
|
623
|
+
canMoveView: true,
|
|
624
|
+
containerIcon: commentsViewIcon,
|
|
625
|
+
focusCommand: {
|
|
626
|
+
id: "workbench.action.focusCommentsPanel"
|
|
627
|
+
}
|
|
628
|
+
}], VIEW_CONTAINER);
|
|
565
629
|
}
|
|
566
630
|
this.registerViewListeners(commentsPanelAlreadyConstructed);
|
|
567
631
|
}
|
|
@@ -610,18 +674,11 @@ let MainThreadComments = class MainThreadComments extends Disposable {
|
|
|
610
674
|
}
|
|
611
675
|
getHandler(handle) {
|
|
612
676
|
if (!( this._handlers.has(handle))) {
|
|
613
|
-
throw ( new Error(
|
|
677
|
+
throw ( new Error("Unknown handler"));
|
|
614
678
|
}
|
|
615
679
|
return this._handlers.get(handle);
|
|
616
680
|
}
|
|
617
681
|
};
|
|
618
|
-
MainThreadComments = __decorate([
|
|
619
|
-
extHostNamedCustomer(MainContext.MainThreadComments),
|
|
620
|
-
( __param(1, ICommentService)),
|
|
621
|
-
( __param(2, IViewsService)),
|
|
622
|
-
( __param(3, IViewDescriptorService)),
|
|
623
|
-
( __param(4, IUriIdentityService)),
|
|
624
|
-
( __param(5, IEditorService))
|
|
625
|
-
], MainThreadComments);
|
|
682
|
+
MainThreadComments = __decorate([extHostNamedCustomer(MainContext.MainThreadComments), ( __param(1, ICommentService)), ( __param(2, IViewsService)), ( __param(3, IViewDescriptorService)), ( __param(4, IUriIdentityService)), ( __param(5, IEditorService))], MainThreadComments);
|
|
626
683
|
|
|
627
684
|
export { MainThreadCommentController, MainThreadCommentThread, MainThreadComments };
|
|
@@ -12,7 +12,12 @@ import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/pl
|
|
|
12
12
|
import { IEnvironmentService } from '@codingame/monaco-vscode-api/vscode/vs/platform/environment/common/environment.service';
|
|
13
13
|
|
|
14
14
|
let MainThreadConfiguration = class MainThreadConfiguration {
|
|
15
|
-
constructor(
|
|
15
|
+
constructor(
|
|
16
|
+
extHostContext,
|
|
17
|
+
_workspaceContextService,
|
|
18
|
+
configurationService,
|
|
19
|
+
_environmentService
|
|
20
|
+
) {
|
|
16
21
|
this._workspaceContextService = _workspaceContextService;
|
|
17
22
|
this.configurationService = configurationService;
|
|
18
23
|
this._environmentService = _environmentService;
|
|
@@ -23,7 +28,10 @@ let MainThreadConfiguration = class MainThreadConfiguration {
|
|
|
23
28
|
});
|
|
24
29
|
}
|
|
25
30
|
_getConfigurationData() {
|
|
26
|
-
const configurationData = {
|
|
31
|
+
const configurationData = {
|
|
32
|
+
...(this.configurationService.getConfigurationData()),
|
|
33
|
+
configurationScopes: []
|
|
34
|
+
};
|
|
27
35
|
if (!this._environmentService.isBuilt || this._environmentService.isExtensionDevelopment) {
|
|
28
36
|
configurationData.configurationScopes = getScopes();
|
|
29
37
|
}
|
|
@@ -33,35 +41,86 @@ let MainThreadConfiguration = class MainThreadConfiguration {
|
|
|
33
41
|
this._configurationListener.dispose();
|
|
34
42
|
}
|
|
35
43
|
$updateConfigurationOption(target, key, value, overrides, scopeToLanguage) {
|
|
36
|
-
overrides = {
|
|
44
|
+
overrides = {
|
|
45
|
+
resource: overrides?.resource ? URI.revive(overrides.resource) : undefined,
|
|
46
|
+
overrideIdentifier: overrides?.overrideIdentifier
|
|
47
|
+
};
|
|
37
48
|
return this.writeConfiguration(target, key, value, overrides, scopeToLanguage);
|
|
38
49
|
}
|
|
39
50
|
$removeConfigurationOption(target, key, overrides, scopeToLanguage) {
|
|
40
|
-
overrides = {
|
|
51
|
+
overrides = {
|
|
52
|
+
resource: overrides?.resource ? URI.revive(overrides.resource) : undefined,
|
|
53
|
+
overrideIdentifier: overrides?.overrideIdentifier
|
|
54
|
+
};
|
|
41
55
|
return this.writeConfiguration(target, key, undefined, overrides, scopeToLanguage);
|
|
42
56
|
}
|
|
43
57
|
writeConfiguration(target, key, value, overrides, scopeToLanguage) {
|
|
44
58
|
target = target !== null && target !== undefined ? target : this.deriveConfigurationTarget(key, overrides);
|
|
45
59
|
const configurationValue = this.configurationService.inspect(key, overrides);
|
|
46
60
|
switch (target) {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
61
|
+
case ConfigurationTarget.MEMORY:
|
|
62
|
+
return this._updateValue(
|
|
63
|
+
key,
|
|
64
|
+
value,
|
|
65
|
+
target,
|
|
66
|
+
configurationValue?.memory?.override,
|
|
67
|
+
overrides,
|
|
68
|
+
scopeToLanguage
|
|
69
|
+
);
|
|
70
|
+
case ConfigurationTarget.WORKSPACE_FOLDER:
|
|
71
|
+
return this._updateValue(
|
|
72
|
+
key,
|
|
73
|
+
value,
|
|
74
|
+
target,
|
|
75
|
+
configurationValue?.workspaceFolder?.override,
|
|
76
|
+
overrides,
|
|
77
|
+
scopeToLanguage
|
|
78
|
+
);
|
|
79
|
+
case ConfigurationTarget.WORKSPACE:
|
|
80
|
+
return this._updateValue(
|
|
81
|
+
key,
|
|
82
|
+
value,
|
|
83
|
+
target,
|
|
84
|
+
configurationValue?.workspace?.override,
|
|
85
|
+
overrides,
|
|
86
|
+
scopeToLanguage
|
|
87
|
+
);
|
|
88
|
+
case ConfigurationTarget.USER_REMOTE:
|
|
89
|
+
return this._updateValue(
|
|
90
|
+
key,
|
|
91
|
+
value,
|
|
92
|
+
target,
|
|
93
|
+
configurationValue?.userRemote?.override,
|
|
94
|
+
overrides,
|
|
95
|
+
scopeToLanguage
|
|
96
|
+
);
|
|
97
|
+
default:
|
|
98
|
+
return this._updateValue(
|
|
99
|
+
key,
|
|
100
|
+
value,
|
|
101
|
+
target,
|
|
102
|
+
configurationValue?.userLocal?.override,
|
|
103
|
+
overrides,
|
|
104
|
+
scopeToLanguage
|
|
105
|
+
);
|
|
57
106
|
}
|
|
58
107
|
}
|
|
59
|
-
_updateValue(
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
108
|
+
_updateValue(
|
|
109
|
+
key,
|
|
110
|
+
value,
|
|
111
|
+
configurationTarget,
|
|
112
|
+
overriddenValue,
|
|
113
|
+
overrides,
|
|
114
|
+
scopeToLanguage
|
|
115
|
+
) {
|
|
116
|
+
overrides = scopeToLanguage === true ? overrides : scopeToLanguage === false ? {
|
|
117
|
+
resource: overrides.resource
|
|
118
|
+
} : overrides.overrideIdentifier && overriddenValue !== undefined ? overrides : {
|
|
119
|
+
resource: overrides.resource
|
|
120
|
+
};
|
|
121
|
+
return this.configurationService.updateValue(key, value, overrides, configurationTarget, {
|
|
122
|
+
donotNotifyError: true
|
|
123
|
+
});
|
|
65
124
|
}
|
|
66
125
|
deriveConfigurationTarget(key, overrides) {
|
|
67
126
|
if (overrides.resource && this._workspaceContextService.getWorkbenchState() === WorkbenchState.WORKSPACE) {
|
|
@@ -73,11 +132,6 @@ let MainThreadConfiguration = class MainThreadConfiguration {
|
|
|
73
132
|
return ConfigurationTarget.WORKSPACE;
|
|
74
133
|
}
|
|
75
134
|
};
|
|
76
|
-
MainThreadConfiguration = __decorate([
|
|
77
|
-
extHostNamedCustomer(MainContext.MainThreadConfiguration),
|
|
78
|
-
( __param(1, IWorkspaceContextService)),
|
|
79
|
-
( __param(2, IConfigurationService)),
|
|
80
|
-
( __param(3, IEnvironmentService))
|
|
81
|
-
], MainThreadConfiguration);
|
|
135
|
+
MainThreadConfiguration = __decorate([extHostNamedCustomer(MainContext.MainThreadConfiguration), ( __param(1, IWorkspaceContextService)), ( __param(2, IConfigurationService)), ( __param(3, IEnvironmentService))], MainThreadConfiguration);
|
|
82
136
|
|
|
83
137
|
export { MainThreadConfiguration };
|