@codingame/monaco-vscode-extensions-service-override 38.1.3 → 39.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 +1 -0
- package/package.json +3 -3
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagementCLI.js +29 -29
- package/vscode/src/vs/platform/extensionResourceLoader/browser/extensionResourceLoaderService.js +1 -1
- package/vscode/src/vs/platform/extensionResourceLoader/common/extensionResourceLoader.d.ts +1 -1
- package/vscode/src/vs/platform/extensionResourceLoader/common/extensionResourceLoader.js +5 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadAuthentication.js +33 -31
- package/vscode/src/vs/workbench/api/browser/mainThreadBrowserTunnelProxy.d.ts +19 -13
- package/vscode/src/vs/workbench/api/browser/mainThreadBrowserTunnelProxy.js +57 -27
- package/vscode/src/vs/workbench/api/browser/mainThreadBrowsers.js +13 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadCLICommands.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadComments.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadCustomEditors.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadDataChannels.js +6 -6
- package/vscode/src/vs/workbench/api/browser/mainThreadDebugService.d.ts +0 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadDebugService.js +1 -8
- package/vscode/src/vs/workbench/api/browser/mainThreadDiagnostics.d.ts +2 -7
- package/vscode/src/vs/workbench/api/browser/mainThreadDiagnostics.js +9 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadEditSessionIdentityParticipant.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadEditorTabs.js +8 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadExtensionService.js +11 -11
- package/vscode/src/vs/workbench/api/browser/mainThreadFileSystemEventService.js +20 -20
- package/vscode/src/vs/workbench/api/browser/mainThreadGitExtensionService.d.ts +2 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadGitExtensionService.js +7 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadGitHub.d.ts +36 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadGitHub.js +370 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageFeatures.d.ts +1 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageFeatures.js +9 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadMessageService.js +5 -5
- package/vscode/src/vs/workbench/api/browser/mainThreadOutputService.js +3 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadProgress.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadQuickOpen.js +9 -7
- package/vscode/src/vs/workbench/api/browser/mainThreadSaveParticipant.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadSpeech.d.ts +1 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadSpeech.js +7 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTask.d.ts +4 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadTask.js +46 -7
- package/vscode/src/vs/workbench/api/browser/mainThreadTerminalService.d.ts +1 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTerminalService.js +12 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadTimeline.d.ts +9 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadTimeline.js +49 -9
- package/vscode/src/vs/workbench/api/browser/mainThreadTreeViews.js +6 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadTunnelService.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadUriOpeners.js +7 -6
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviews.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadWorkspace.js +5 -5
- package/vscode/src/vs/workbench/contrib/customEditor/common/customTextEditorModel.d.ts +1 -1
- package/vscode/src/vs/workbench/contrib/customEditor/common/customTextEditorModel.js +1 -1
- package/vscode/src/vs/workbench/contrib/git/common/gitService.d.ts +12 -0
- package/vscode/src/vs/workbench/services/extensionManagement/browser/extensionBisect.js +23 -23
- package/vscode/src/vs/workbench/services/extensionManagement/browser/webExtensionsScannerService.js +2 -2
- package/vscode/src/vs/workbench/services/extensions/browser/extensionService.js +1 -0
- package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.js +13 -13
- package/vscode/src/vs/workbench/services/extensions/common/extensionHostManager.js +2 -1
- package/vscode/src/vs/workbench/services/extensions/common/extensionsProposedApi.js +1 -1
- package/vscode/src/vs/workbench/services/extensions/common/extensionsUtil.js +4 -4
- package/vscode/src/vs/workbench/services/extensions/common/remoteExtensionHost.d.ts +3 -0
- package/vscode/src/vs/workbench/services/extensions/common/remoteExtensionHost.js +1 -0
- package/vscode/src/vs/workbench/services/themes/browser/cssExtensionPoint.js +5 -5
- package/vscode/src/vs/workbench/api/common/shared/tasks.d.ts +0 -158
- package/vscode/src/vs/workbench/api/common/shared/tasks.js +0 -20
|
@@ -107,9 +107,20 @@ let MainThreadBrowsers = class MainThreadBrowsers extends Disposable {
|
|
|
107
107
|
if (!known) {
|
|
108
108
|
throw ( new Error(`Unknown browser id: ${browserId}`));
|
|
109
109
|
}
|
|
110
|
-
await known.input.resolve();
|
|
111
|
-
const
|
|
110
|
+
const model = await known.input.resolve();
|
|
111
|
+
const network = model.network;
|
|
112
|
+
const networkHold = network ? await this.browserViewService.acquireNetwork(network) : undefined;
|
|
113
|
+
let groupId;
|
|
114
|
+
try {
|
|
115
|
+
groupId = await this.cdpService.createSessionGroup(browserId, network);
|
|
116
|
+
} catch (error) {
|
|
117
|
+
networkHold?.dispose();
|
|
118
|
+
throw error;
|
|
119
|
+
}
|
|
112
120
|
const disposables = ( new DisposableStore());
|
|
121
|
+
if (networkHold) {
|
|
122
|
+
disposables.add(networkHold);
|
|
123
|
+
}
|
|
113
124
|
disposables.add(this.cdpService.onCDPMessage(groupId)(message => {
|
|
114
125
|
this._proxy.$onCDPSessionMessage(sessionId, message);
|
|
115
126
|
}));
|
|
@@ -108,7 +108,7 @@ let RemoteExtensionManagementCLI = class RemoteExtensionManagementCLI extends Ex
|
|
|
108
108
|
if (
|
|
109
109
|
!this._extensionManifestPropertiesService.canExecuteOnWorkspace(manifest) && !(isWeb && this._extensionManifestPropertiesService.canExecuteOnWeb(manifest))) {
|
|
110
110
|
this.logger.info(( localize(
|
|
111
|
-
|
|
111
|
+
7776,
|
|
112
112
|
"Cannot install the '{0}' extension because it is declared to not run in this setup.",
|
|
113
113
|
getExtensionId(manifest.publisher, manifest.name)
|
|
114
114
|
)));
|
|
@@ -468,7 +468,7 @@ let MainThreadCommentController = class MainThreadCommentController extends Disp
|
|
|
468
468
|
}
|
|
469
469
|
};
|
|
470
470
|
MainThreadCommentController = ( __decorate([( __param(6, ICommentService)), ( __param(7, IUriIdentityService))], MainThreadCommentController));
|
|
471
|
-
const commentsViewIcon = registerIcon("comments-view-icon", Codicon.commentDiscussion, ( localize(
|
|
471
|
+
const commentsViewIcon = registerIcon("comments-view-icon", Codicon.commentDiscussion, ( localize(7781, "View icon of the comments view.")));
|
|
472
472
|
let MainThreadComments = class MainThreadComments extends Disposable {
|
|
473
473
|
constructor(
|
|
474
474
|
extHostContext,
|
|
@@ -626,7 +626,7 @@ let MainThreadCustomEditorModel = MainThreadCustomEditorModel_1 = class MainThre
|
|
|
626
626
|
this._register(workingCopyService.registerWorkingCopy(this));
|
|
627
627
|
this._register(extensionService.onWillStop(e => {
|
|
628
628
|
e.veto(true, ( localize(
|
|
629
|
-
|
|
629
|
+
7782,
|
|
630
630
|
"An extension provided editor for '{0}' is still open that would close otherwise.",
|
|
631
631
|
this.name
|
|
632
632
|
)));
|
|
@@ -694,7 +694,7 @@ let MainThreadCustomEditorModel = MainThreadCustomEditorModel_1 = class MainThre
|
|
|
694
694
|
this._undoService.pushElement({
|
|
695
695
|
type: UndoRedoElementType.Resource,
|
|
696
696
|
resource: this._editorResource,
|
|
697
|
-
label: label ?? ( localize(
|
|
697
|
+
label: label ?? ( localize(7783, "Edit")),
|
|
698
698
|
code: "undoredo.customEditorEdit",
|
|
699
699
|
undo: () => this.undo(),
|
|
700
700
|
redo: () => this.redo()
|
|
@@ -54,13 +54,13 @@ let MainThreadDataChannels = class MainThreadDataChannels extends Disposable {
|
|
|
54
54
|
kind,
|
|
55
55
|
status: {
|
|
56
56
|
kind: "error",
|
|
57
|
-
label: ( localize(
|
|
57
|
+
label: ( localize(7784, "Not available"))
|
|
58
58
|
},
|
|
59
59
|
tooltip: ( localize(
|
|
60
|
-
|
|
60
|
+
7785,
|
|
61
61
|
"The selected link presentation provider does not accept this resource."
|
|
62
62
|
)),
|
|
63
|
-
ariaLabel: ( localize(
|
|
63
|
+
ariaLabel: ( localize(7786, "Link presentation is not available"))
|
|
64
64
|
});
|
|
65
65
|
return;
|
|
66
66
|
}
|
|
@@ -105,10 +105,10 @@ let MainThreadDataChannels = class MainThreadDataChannels extends Disposable {
|
|
|
105
105
|
kind: "resource",
|
|
106
106
|
status: {
|
|
107
107
|
kind: "error",
|
|
108
|
-
label: ( localize(
|
|
108
|
+
label: ( localize(7784, "Not available"))
|
|
109
109
|
},
|
|
110
|
-
tooltip: ( localize(
|
|
111
|
-
ariaLabel: ( localize(
|
|
110
|
+
tooltip: ( localize(7787, "The link presentation provider failed to load.")),
|
|
111
|
+
ariaLabel: ( localize(7786, "Link presentation is not available"))
|
|
112
112
|
});
|
|
113
113
|
});
|
|
114
114
|
return watcher;
|
|
@@ -44,7 +44,6 @@ export declare class MainThreadDebugService implements MainThreadDebugServiceSha
|
|
|
44
44
|
$acceptDAMessage(handle: number, message: DebugProtocol.ProtocolMessage): void;
|
|
45
45
|
$acceptDAError(handle: number, name: string, message: string, stack: string): void;
|
|
46
46
|
$acceptDAExit(handle: number, code: number, signal: string): void;
|
|
47
|
-
private getDebugAdapter;
|
|
48
47
|
$sessionCached(sessionID: string): void;
|
|
49
48
|
getSessionDto(session: undefined): undefined;
|
|
50
49
|
getSessionDto(session: IDebugSession): IDebugSessionDto;
|
|
@@ -342,7 +342,7 @@ let MainThreadDebugService = class MainThreadDebugService {
|
|
|
342
342
|
});
|
|
343
343
|
}
|
|
344
344
|
$acceptDAMessage(handle, message) {
|
|
345
|
-
this.
|
|
345
|
+
this._debugAdapters.get(handle)?.acceptMessage(convertToVSCPaths(message, false));
|
|
346
346
|
}
|
|
347
347
|
$acceptDAError(handle, name, message, stack) {
|
|
348
348
|
this._debugAdapters.get(handle)?.fireError(handle, ( new Error(`${name}: ${message}\n${stack}`)));
|
|
@@ -350,13 +350,6 @@ let MainThreadDebugService = class MainThreadDebugService {
|
|
|
350
350
|
$acceptDAExit(handle, code, signal) {
|
|
351
351
|
this._debugAdapters.get(handle)?.fireExit(handle, code, signal);
|
|
352
352
|
}
|
|
353
|
-
getDebugAdapter(handle) {
|
|
354
|
-
const adapter = this._debugAdapters.get(handle);
|
|
355
|
-
if (!adapter) {
|
|
356
|
-
throw ( new Error("Invalid debug adapter"));
|
|
357
|
-
}
|
|
358
|
-
return adapter;
|
|
359
|
-
}
|
|
360
353
|
$sessionCached(sessionID) {
|
|
361
354
|
this._extHostKnownSessions.add(sessionID);
|
|
362
355
|
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { IMarkerData } from "@codingame/monaco-vscode-api/vscode/vs/platform/markers/common/markers";
|
|
2
1
|
import { IMarkerService } from "@codingame/monaco-vscode-api/vscode/vs/platform/markers/common/markers.service";
|
|
3
|
-
import {
|
|
4
|
-
import { MainThreadDiagnosticsShape } from "@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol";
|
|
2
|
+
import { MainThreadDiagnosticsShape, IMarkerChange } from "@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol";
|
|
5
3
|
import { IExtHostContext } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extHostCustomers";
|
|
6
4
|
import { IUriIdentityService } from "@codingame/monaco-vscode-api/vscode/vs/platform/uriIdentity/common/uriIdentity.service";
|
|
7
5
|
export declare class MainThreadDiagnostics implements MainThreadDiagnosticsShape {
|
|
@@ -15,9 +13,6 @@ export declare class MainThreadDiagnostics implements MainThreadDiagnosticsShape
|
|
|
15
13
|
constructor(extHostContext: IExtHostContext, _markerService: IMarkerService, _uriIdentService: IUriIdentityService);
|
|
16
14
|
dispose(): void;
|
|
17
15
|
private _forwardMarkers;
|
|
18
|
-
$changeMany(owner: string, entries: [
|
|
19
|
-
UriComponents,
|
|
20
|
-
IMarkerData[]
|
|
21
|
-
][]): void;
|
|
16
|
+
$changeMany(owner: string, entries: IMarkerChange[]): void;
|
|
22
17
|
$clear(owner: string): void;
|
|
23
18
|
}
|
|
@@ -61,7 +61,7 @@ let MainThreadDiagnostics = class MainThreadDiagnostics {
|
|
|
61
61
|
}
|
|
62
62
|
$changeMany(owner, entries) {
|
|
63
63
|
for (const entry of entries) {
|
|
64
|
-
const [uri, markers] = entry;
|
|
64
|
+
const [uri, markers, isTruncated] = entry;
|
|
65
65
|
if (markers) {
|
|
66
66
|
for (const marker of markers) {
|
|
67
67
|
if (marker.relatedInformation) {
|
|
@@ -77,7 +77,14 @@ let MainThreadDiagnostics = class MainThreadDiagnostics {
|
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
|
-
this._markerService.changeOne(
|
|
80
|
+
this._markerService.changeOne(
|
|
81
|
+
owner,
|
|
82
|
+
this._uriIdentService.asCanonicalUri(URI.revive(uri)),
|
|
83
|
+
markers ?? [],
|
|
84
|
+
{
|
|
85
|
+
isTruncated
|
|
86
|
+
}
|
|
87
|
+
);
|
|
81
88
|
}
|
|
82
89
|
this._activeOwners.add(owner);
|
|
83
90
|
}
|
|
@@ -14,7 +14,7 @@ class ExtHostEditSessionIdentityCreateParticipant {
|
|
|
14
14
|
}
|
|
15
15
|
async participate(workspaceFolder, token) {
|
|
16
16
|
const p = ( new Promise((resolve, reject) => {
|
|
17
|
-
setTimeout(() => reject(( new Error(( localize(
|
|
17
|
+
setTimeout(() => reject(( new Error(( localize(7788, "Aborted onWillCreateEditSessionIdentity-event after 10000ms"))))), this.timeout);
|
|
18
18
|
this._proxy.$onWillCreateEditSessionIdentity(workspaceFolder.uri, token, this.timeout).then(resolve, reject);
|
|
19
19
|
}));
|
|
20
20
|
return raceCancellationError(p, token);
|
|
@@ -14,6 +14,7 @@ import { SideBySideEditorInput } from '@codingame/monaco-vscode-api/vscode/vs/wo
|
|
|
14
14
|
import { AbstractTextResourceEditorInput } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor/textResourceEditorInput';
|
|
15
15
|
import { ChatEditorInput } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/browser/widgetHosts/editor/chatEditorInput';
|
|
16
16
|
import { CustomEditorInput } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/customEditor/browser/customEditorInput';
|
|
17
|
+
import { isCustomEditorCompatibleInput } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/customEditor/common/customEditor';
|
|
17
18
|
import { InteractiveEditorInput } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/interactive/browser/interactiveEditorInput';
|
|
18
19
|
import { MergeEditorInput } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mergeEditor/browser/mergeEditorInput';
|
|
19
20
|
import { MultiDiffEditorInput } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/multiDiffEditor/browser/multiDiffEditorInput';
|
|
@@ -119,6 +120,13 @@ let MainThreadEditorTabs = class MainThreadEditorTabs {
|
|
|
119
120
|
uri: editor.resource
|
|
120
121
|
};
|
|
121
122
|
}
|
|
123
|
+
if (isCustomEditorCompatibleInput(editor)) {
|
|
124
|
+
return {
|
|
125
|
+
kind: TabInputKind.CustomEditorInput,
|
|
126
|
+
viewType: editor.customEditorViewType,
|
|
127
|
+
uri: editor.resource
|
|
128
|
+
};
|
|
129
|
+
}
|
|
122
130
|
if (editor instanceof WebviewInput) {
|
|
123
131
|
return {
|
|
124
132
|
kind: TabInputKind.WebviewEditorInput,
|
|
@@ -111,7 +111,7 @@ let MainThreadExtensionService = class MainThreadExtensionService {
|
|
|
111
111
|
this._notificationService.notify({
|
|
112
112
|
severity: Severity.Error,
|
|
113
113
|
message: ( localize(
|
|
114
|
-
|
|
114
|
+
7789,
|
|
115
115
|
"Cannot activate the '{0}' extension because it depends on the '{1}' extension, which is not loaded. Would you like to reload the window to load the extension?",
|
|
116
116
|
extName,
|
|
117
117
|
missingInstalledDependency.manifest.displayName || missingInstalledDependency.manifest.name
|
|
@@ -119,7 +119,7 @@ let MainThreadExtensionService = class MainThreadExtensionService {
|
|
|
119
119
|
actions: {
|
|
120
120
|
primary: [toAction({
|
|
121
121
|
id: "reload",
|
|
122
|
-
label: ( localize(
|
|
122
|
+
label: ( localize(7790, "Reload Window")),
|
|
123
123
|
run: () => this._hostService.reload()
|
|
124
124
|
})]
|
|
125
125
|
}
|
|
@@ -130,7 +130,7 @@ let MainThreadExtensionService = class MainThreadExtensionService {
|
|
|
130
130
|
this._notificationService.notify({
|
|
131
131
|
severity: Severity.Error,
|
|
132
132
|
message: ( localize(
|
|
133
|
-
|
|
133
|
+
7791,
|
|
134
134
|
"Cannot activate the '{0}' extension because it depends on the '{1}' extension which is not supported in the current workspace",
|
|
135
135
|
extName,
|
|
136
136
|
missingInstalledDependency.manifest.displayName || missingInstalledDependency.manifest.name
|
|
@@ -140,7 +140,7 @@ let MainThreadExtensionService = class MainThreadExtensionService {
|
|
|
140
140
|
this._notificationService.notify({
|
|
141
141
|
severity: Severity.Error,
|
|
142
142
|
message: ( localize(
|
|
143
|
-
|
|
143
|
+
7792,
|
|
144
144
|
"Cannot activate the '{0}' extension because it depends on the '{1}' extension which is not supported in Restricted Mode",
|
|
145
145
|
extName,
|
|
146
146
|
missingInstalledDependency.manifest.displayName || missingInstalledDependency.manifest.name
|
|
@@ -148,7 +148,7 @@ let MainThreadExtensionService = class MainThreadExtensionService {
|
|
|
148
148
|
actions: {
|
|
149
149
|
primary: [toAction({
|
|
150
150
|
id: "manageWorkspaceTrust",
|
|
151
|
-
label: ( localize(
|
|
151
|
+
label: ( localize(7793, "Manage Workspace Trust")),
|
|
152
152
|
run: () => this._commandService.executeCommand("workbench.trust.manage")
|
|
153
153
|
})]
|
|
154
154
|
}
|
|
@@ -157,7 +157,7 @@ let MainThreadExtensionService = class MainThreadExtensionService {
|
|
|
157
157
|
this._notificationService.notify({
|
|
158
158
|
severity: Severity.Error,
|
|
159
159
|
message: ( localize(
|
|
160
|
-
|
|
160
|
+
7794,
|
|
161
161
|
"Cannot activate the '{0}' extension because it depends on the '{1}' extension which is disabled. Would you like to enable the extension and reload the window?",
|
|
162
162
|
extName,
|
|
163
163
|
missingInstalledDependency.manifest.displayName || missingInstalledDependency.manifest.name
|
|
@@ -165,7 +165,7 @@ let MainThreadExtensionService = class MainThreadExtensionService {
|
|
|
165
165
|
actions: {
|
|
166
166
|
primary: [toAction({
|
|
167
167
|
id: "enable",
|
|
168
|
-
label: ( localize(
|
|
168
|
+
label: ( localize(7795, "Enable and Reload")),
|
|
169
169
|
enabled: true,
|
|
170
170
|
run: () => this._extensionEnablementService.setEnablement(
|
|
171
171
|
[missingInstalledDependency],
|
|
@@ -178,7 +178,7 @@ let MainThreadExtensionService = class MainThreadExtensionService {
|
|
|
178
178
|
this._notificationService.notify({
|
|
179
179
|
severity: Severity.Error,
|
|
180
180
|
message: ( localize(
|
|
181
|
-
|
|
181
|
+
7796,
|
|
182
182
|
"Cannot activate the '{0}' extension because it depends on the '{1}' extension which is disabled.",
|
|
183
183
|
extName,
|
|
184
184
|
missingInstalledDependency.manifest.displayName || missingInstalledDependency.manifest.name
|
|
@@ -199,7 +199,7 @@ let MainThreadExtensionService = class MainThreadExtensionService {
|
|
|
199
199
|
this._notificationService.notify({
|
|
200
200
|
severity: Severity.Error,
|
|
201
201
|
message: ( localize(
|
|
202
|
-
|
|
202
|
+
7797,
|
|
203
203
|
"Cannot activate the '{0}' extension because it depends on the '{1}' extension from '{2}', which is not installed. Would you like to install the extension and reload the window?",
|
|
204
204
|
extName,
|
|
205
205
|
dependencyExtension.displayName,
|
|
@@ -208,14 +208,14 @@ let MainThreadExtensionService = class MainThreadExtensionService {
|
|
|
208
208
|
actions: {
|
|
209
209
|
primary: [toAction({
|
|
210
210
|
id: "install",
|
|
211
|
-
label: ( localize(
|
|
211
|
+
label: ( localize(7798, "Install and Reload")),
|
|
212
212
|
run: () => this._extensionsWorkbenchService.install(dependencyExtension).then(() => this._hostService.reload(), e => this._notificationService.error(e))
|
|
213
213
|
})]
|
|
214
214
|
}
|
|
215
215
|
});
|
|
216
216
|
} else {
|
|
217
217
|
this._notificationService.error(( localize(
|
|
218
|
-
|
|
218
|
+
7799,
|
|
219
219
|
"Cannot activate the '{0}' extension because it depends on an unknown '{1}' extension.",
|
|
220
220
|
extName,
|
|
221
221
|
missingDependency
|
|
@@ -96,25 +96,25 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
|
|
|
96
96
|
if (data.extensionNames.length === 1) {
|
|
97
97
|
if (operation === FileOperation.CREATE) {
|
|
98
98
|
message = ( localize(
|
|
99
|
-
|
|
99
|
+
7800,
|
|
100
100
|
"Extension '{0}' wants to make refactoring changes with this file creation",
|
|
101
101
|
data.extensionNames[0]
|
|
102
102
|
));
|
|
103
103
|
} else if (operation === FileOperation.COPY) {
|
|
104
104
|
message = ( localize(
|
|
105
|
-
|
|
105
|
+
7801,
|
|
106
106
|
"Extension '{0}' wants to make refactoring changes with this file copy",
|
|
107
107
|
data.extensionNames[0]
|
|
108
108
|
));
|
|
109
109
|
} else if (operation === FileOperation.MOVE) {
|
|
110
110
|
message = ( localize(
|
|
111
|
-
|
|
111
|
+
7802,
|
|
112
112
|
"Extension '{0}' wants to make refactoring changes with this file move",
|
|
113
113
|
data.extensionNames[0]
|
|
114
114
|
));
|
|
115
115
|
} else {
|
|
116
116
|
message = ( localize(
|
|
117
|
-
|
|
117
|
+
7803,
|
|
118
118
|
"Extension '{0}' wants to make refactoring changes with this file deletion",
|
|
119
119
|
data.extensionNames[0]
|
|
120
120
|
));
|
|
@@ -122,25 +122,25 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
|
|
|
122
122
|
} else {
|
|
123
123
|
if (operation === FileOperation.CREATE) {
|
|
124
124
|
message = ( localize(
|
|
125
|
-
|
|
125
|
+
7804,
|
|
126
126
|
"{0} extensions want to make refactoring changes with this file creation",
|
|
127
127
|
data.extensionNames.length
|
|
128
128
|
));
|
|
129
129
|
} else if (operation === FileOperation.COPY) {
|
|
130
130
|
message = ( localize(
|
|
131
|
-
|
|
131
|
+
7805,
|
|
132
132
|
"{0} extensions want to make refactoring changes with this file copy",
|
|
133
133
|
data.extensionNames.length
|
|
134
134
|
));
|
|
135
135
|
} else if (operation === FileOperation.MOVE) {
|
|
136
136
|
message = ( localize(
|
|
137
|
-
|
|
137
|
+
7806,
|
|
138
138
|
"{0} extensions want to make refactoring changes with this file move",
|
|
139
139
|
data.extensionNames.length
|
|
140
140
|
));
|
|
141
141
|
} else {
|
|
142
142
|
message = ( localize(
|
|
143
|
-
|
|
143
|
+
7807,
|
|
144
144
|
"{0} extensions want to make refactoring changes with this file deletion",
|
|
145
145
|
data.extensionNames.length
|
|
146
146
|
));
|
|
@@ -152,8 +152,8 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
|
|
|
152
152
|
} = await dialogService.confirm({
|
|
153
153
|
type: Severity.Info,
|
|
154
154
|
message,
|
|
155
|
-
primaryButton: ( localize(
|
|
156
|
-
cancelButton: ( localize(
|
|
155
|
+
primaryButton: ( localize(7808, "Show &&Preview")),
|
|
156
|
+
cancelButton: ( localize(7809, "Skip Changes"))
|
|
157
157
|
});
|
|
158
158
|
showPreview = true;
|
|
159
159
|
if (!confirmed) {
|
|
@@ -173,18 +173,18 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
|
|
|
173
173
|
type: Severity.Info,
|
|
174
174
|
message,
|
|
175
175
|
buttons: [{
|
|
176
|
-
label: ( localize(
|
|
176
|
+
label: ( localize(7810, "&&OK")),
|
|
177
177
|
run: () => Choice.OK
|
|
178
178
|
}, {
|
|
179
|
-
label: ( localize(
|
|
179
|
+
label: ( localize(7808, "Show &&Preview")),
|
|
180
180
|
run: () => Choice.Preview
|
|
181
181
|
}],
|
|
182
182
|
cancelButton: {
|
|
183
|
-
label: ( localize(
|
|
183
|
+
label: ( localize(7809, "Skip Changes")),
|
|
184
184
|
run: () => Choice.Cancel
|
|
185
185
|
},
|
|
186
186
|
checkbox: {
|
|
187
|
-
label: ( localize(
|
|
187
|
+
label: ( localize(7811, "Do not ask me again"))
|
|
188
188
|
}
|
|
189
189
|
});
|
|
190
190
|
if (result === Choice.Cancel) {
|
|
@@ -213,15 +213,15 @@ let MainThreadFileSystemEventService = class MainThreadFileSystemEventService {
|
|
|
213
213
|
_progressLabel(operation) {
|
|
214
214
|
switch (operation) {
|
|
215
215
|
case FileOperation.CREATE:
|
|
216
|
-
return localize(
|
|
216
|
+
return localize(7812, "Running 'File Create' participants...");
|
|
217
217
|
case FileOperation.MOVE:
|
|
218
|
-
return localize(
|
|
218
|
+
return localize(7813, "Running 'File Rename' participants...");
|
|
219
219
|
case FileOperation.COPY:
|
|
220
|
-
return localize(
|
|
220
|
+
return localize(7814, "Running 'File Copy' participants...");
|
|
221
221
|
case FileOperation.DELETE:
|
|
222
|
-
return localize(
|
|
222
|
+
return localize(7815, "Running 'File Delete' participants...");
|
|
223
223
|
case FileOperation.WRITE:
|
|
224
|
-
return localize(
|
|
224
|
+
return localize(7816, "Running 'File Write' participants...");
|
|
225
225
|
}
|
|
226
226
|
}
|
|
227
227
|
})();
|
|
@@ -309,7 +309,7 @@ registerAction2(class ResetMemento extends Action2 {
|
|
|
309
309
|
super({
|
|
310
310
|
id: "files.participants.resetChoice",
|
|
311
311
|
title: {
|
|
312
|
-
value: ( localize(
|
|
312
|
+
value: ( localize(7817, "Reset choice for 'File operation needs preview'")),
|
|
313
313
|
original: `Reset choice for 'File operation needs preview'`
|
|
314
314
|
},
|
|
315
315
|
f1: true
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CancellationToken } from "@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation";
|
|
2
2
|
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
3
3
|
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
4
|
-
import { IGitExtensionDelegate, GitRef, GitRefQuery, GitDiffChange, IGitRepository } from "../../contrib/git/common/gitService.js";
|
|
4
|
+
import { IGitExtensionDelegate, GitRef, GitRefQuery, GitDiffChange, IGitRepository, GitCommitOptions } from "../../contrib/git/common/gitService.js";
|
|
5
5
|
import { IGitService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/git/common/gitService.service";
|
|
6
6
|
import { IExtHostContext } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extHostCustomers";
|
|
7
7
|
import { MainThreadGitExtensionShape } from "@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol";
|
|
@@ -18,5 +18,6 @@ export declare class MainThreadGitExtensionService extends Disposable implements
|
|
|
18
18
|
getRefs(root: URI, query: GitRefQuery, token?: CancellationToken): Promise<GitRef[]>;
|
|
19
19
|
diffBetweenWithStats(root: URI, ref1: string, ref2: string, path?: string): Promise<GitDiffChange[]>;
|
|
20
20
|
diffBetweenWithStats2(root: URI, ref: string, path?: string): Promise<GitDiffChange[]>;
|
|
21
|
+
commitFiles(root: URI, files: readonly URI[], message: string, options?: GitCommitOptions): Promise<void>;
|
|
21
22
|
$onDidChangeRepository(handle: number): Promise<void>;
|
|
22
23
|
}
|
|
@@ -131,6 +131,13 @@ let MainThreadGitExtensionService = class MainThreadGitExtensionService extends
|
|
|
131
131
|
const result = await this._proxy.$diffBetweenWithStats2(handle, ref, path);
|
|
132
132
|
return result.map(toGitDiffChange);
|
|
133
133
|
}
|
|
134
|
+
async commitFiles(root, files, message, options) {
|
|
135
|
+
const handle = this._repositoryHandles.get(root);
|
|
136
|
+
if (handle === undefined) {
|
|
137
|
+
throw ( new Error(`Git repository is not open: ${( root.toString())}`));
|
|
138
|
+
}
|
|
139
|
+
await this._proxy.$commitFiles(handle, [...files], message, options);
|
|
140
|
+
}
|
|
134
141
|
async $onDidChangeRepository(handle) {
|
|
135
142
|
const repository = this._repositories.get(handle);
|
|
136
143
|
if (!repository) {
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { CancellationToken } from "@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation";
|
|
2
|
+
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
3
|
+
import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
|
|
4
|
+
import { IAuthenticationAccessService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/authentication/browser/authenticationAccessService.service";
|
|
5
|
+
import { IAuthenticationService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/authentication/common/authentication.service";
|
|
6
|
+
import { IExtHostContext } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extHostCustomers";
|
|
7
|
+
import { IWorkbenchGitHubService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/github/common/githubService.service";
|
|
8
|
+
import { GitHubResultDto, IGitHubCreateGistDto, IGitHubGistDto, MainThreadGitHubShape } from "@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol";
|
|
9
|
+
/**
|
|
10
|
+
* Executes the proposed `vscode.github` API through the workbench GitHub service, which routes to the shared
|
|
11
|
+
* process on desktop and runs locally in browser deployments. The extension host only chooses a session id;
|
|
12
|
+
* this side resolves it, enforces the extension's account access, and never returns credentials.
|
|
13
|
+
*/
|
|
14
|
+
export declare class MainThreadGitHub extends Disposable implements MainThreadGitHubShape {
|
|
15
|
+
private readonly _gitHubService;
|
|
16
|
+
private readonly _authenticationService;
|
|
17
|
+
private readonly _authenticationAccessService;
|
|
18
|
+
private readonly _logService;
|
|
19
|
+
private readonly _clients;
|
|
20
|
+
constructor(_extHostContext: IExtHostContext, _gitHubService: IWorkbenchGitHubService, _authenticationService: IAuthenticationService, _authenticationAccessService: IAuthenticationAccessService, _logService: ILogService);
|
|
21
|
+
$getClient(handle: number, extensionId: string, sessionId: string, token: CancellationToken): Promise<GitHubResultDto<void>>;
|
|
22
|
+
$getAnonymousClient(handle: number, extensionId: string, token: CancellationToken): Promise<GitHubResultDto<void>>;
|
|
23
|
+
$releaseClient(handle: number): void;
|
|
24
|
+
$getGist(handle: number, gistId: string, token: CancellationToken): Promise<GitHubResultDto<IGitHubGistDto>>;
|
|
25
|
+
$createGist(handle: number, gist: IGitHubCreateGistDto, token: CancellationToken): Promise<GitHubResultDto<IGitHubGistDto>>;
|
|
26
|
+
private _acquire;
|
|
27
|
+
private _release;
|
|
28
|
+
private _run;
|
|
29
|
+
/** Resolves a `github` session the extension may use; absent and inaccessible sessions are indistinguishable. */
|
|
30
|
+
private _resolveSession;
|
|
31
|
+
private _hasAccess;
|
|
32
|
+
private _invalidate;
|
|
33
|
+
private _createSignal;
|
|
34
|
+
private _requestOptions;
|
|
35
|
+
private _toFailure;
|
|
36
|
+
}
|