@codingame/monaco-vscode-extensions-service-override 38.1.2 → 39.0.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/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
|
@@ -7,11 +7,10 @@ import { isString } from '@codingame/monaco-vscode-api/vscode/vs/base/common/typ
|
|
|
7
7
|
import { platform, Platform } from '@codingame/monaco-vscode-api/vscode/vs/base/common/platform';
|
|
8
8
|
import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
9
9
|
import { IWorkspaceContextService } from '@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace.service';
|
|
10
|
-
import { TaskDefinition, PresentationOptions, RunOptions, CommandOptions, RuntimeType, TaskSourceKind, TaskScope, CustomTask, ContributedTask, ConfiguringTask } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/tasks/common/tasks';
|
|
10
|
+
import { TaskDefinition, PresentationOptions, RunOptions, CommandOptions, RuntimeType, TaskSourceKind, TaskScope, CustomTask, ContributedTask, ConfiguringTask, TaskEventKind } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/tasks/common/tasks';
|
|
11
11
|
import { ITaskService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/tasks/common/taskService.service';
|
|
12
12
|
import { extHostNamedCustomer } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extHostCustomers';
|
|
13
13
|
import { ExtHostContext, MainContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol';
|
|
14
|
-
import { TaskEventKind } from '../common/shared/tasks.js';
|
|
15
14
|
import { IConfigurationResolverService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/configurationResolver/common/configurationResolver.service';
|
|
16
15
|
import { ErrorNoTelemetry } from '@codingame/monaco-vscode-api/vscode/vs/base/common/errors';
|
|
17
16
|
import { ConfigurationResolverExpression } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/configurationResolver/common/configurationResolverExpression';
|
|
@@ -397,7 +396,7 @@ var TaskDTO;
|
|
|
397
396
|
}
|
|
398
397
|
command.presentation = TaskPresentationOptionsDTO.to(task.presentationOptions);
|
|
399
398
|
const source = TaskSourceDTO.to(task.source, workspace);
|
|
400
|
-
const label = ( localize(
|
|
399
|
+
const label = ( localize(7852, "{0}: {1}", source.label, task.name));
|
|
401
400
|
const definition = TaskDefinitionDTO.to(task.definition, executeOnly);
|
|
402
401
|
const id = (CustomExecutionDTO.is(task.execution) && task._id) ? task._id : `${task.source.extensionId}.${definition._key}`;
|
|
403
402
|
const result = ( new ContributedTask(
|
|
@@ -450,6 +449,7 @@ let MainThreadTask = class MainThreadTask extends Disposable {
|
|
|
450
449
|
this._taskService = _taskService;
|
|
451
450
|
this._workspaceContextServer = _workspaceContextServer;
|
|
452
451
|
this._configurationResolverService = _configurationResolverService;
|
|
452
|
+
this._taskStarts = ( new Map());
|
|
453
453
|
this._proxy = ( extHostContext.getProxy(ExtHostContext.ExtHostTask));
|
|
454
454
|
this._providers = ( new Map());
|
|
455
455
|
this._register(this._taskService.onDidStateChange(async event => {
|
|
@@ -457,11 +457,21 @@ let MainThreadTask = class MainThreadTask extends Disposable {
|
|
|
457
457
|
return;
|
|
458
458
|
}
|
|
459
459
|
const task = event.__task;
|
|
460
|
+
if (event.kind === TaskEventKind.CustomExecutionAccepted) {
|
|
461
|
+
this.reserveCustomExecution(task);
|
|
462
|
+
return;
|
|
463
|
+
}
|
|
464
|
+
if (event.kind === TaskEventKind.CustomExecutionFinished) {
|
|
465
|
+
this.endCustomExecution(task);
|
|
466
|
+
return;
|
|
467
|
+
}
|
|
460
468
|
if (event.kind === TaskEventKind.Start) {
|
|
461
469
|
const execution = TaskExecutionDTO.from(task.getTaskExecution());
|
|
470
|
+
const isCustomExecution = execution.task?.execution && CustomExecutionDTO.is(execution.task.execution);
|
|
471
|
+
const starting = isCustomExecution ? this.reserveCustomExecution(task) : undefined;
|
|
462
472
|
let resolvedDefinition = execution.task.definition;
|
|
463
|
-
if (
|
|
464
|
-
const expr = ConfigurationResolverExpression.parse(
|
|
473
|
+
if (isCustomExecution && event.resolvedVariables) {
|
|
474
|
+
const expr = ConfigurationResolverExpression.parse(resolvedDefinition);
|
|
465
475
|
for (const replacement of expr.unresolved()) {
|
|
466
476
|
const value = event.resolvedVariables.get(replacement.inner);
|
|
467
477
|
if (value !== undefined) {
|
|
@@ -470,13 +480,22 @@ let MainThreadTask = class MainThreadTask extends Disposable {
|
|
|
470
480
|
}
|
|
471
481
|
resolvedDefinition = await this._configurationResolverService.resolveAsync(task.getWorkspaceFolder(), expr);
|
|
472
482
|
}
|
|
473
|
-
|
|
483
|
+
if (isCustomExecution) {
|
|
484
|
+
if (this._taskStarts.get(task) !== starting) {
|
|
485
|
+
return;
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
this._proxy.$onDidStartTask(execution, event.terminalId, resolvedDefinition, starting?.id);
|
|
474
489
|
} else if (event.kind === TaskEventKind.ProcessStarted) {
|
|
475
490
|
this._proxy.$onDidStartTaskProcess(TaskProcessStartedDTO.from(task.getTaskExecution(), event.processId));
|
|
476
491
|
} else if (event.kind === TaskEventKind.ProcessEnded) {
|
|
477
492
|
this._proxy.$onDidEndTaskProcess(TaskProcessEndedDTO.from(task.getTaskExecution(), event.exitCode));
|
|
478
493
|
} else if (event.kind === TaskEventKind.End) {
|
|
479
|
-
|
|
494
|
+
if ((ContributedTask.is(task) || CustomTask.is(task)) && task.command?.runtime === RuntimeType.CustomExecution) {
|
|
495
|
+
this.endCustomExecution(task);
|
|
496
|
+
} else {
|
|
497
|
+
this._proxy.$OnDidEndTask(TaskExecutionDTO.from(task.getTaskExecution()));
|
|
498
|
+
}
|
|
480
499
|
} else if (event.kind === TaskEventKind.ProblemMatcherStarted) {
|
|
481
500
|
this._proxy.$onDidStartTaskProblemMatchers(TaskProblemMatcherStartedDto.from({
|
|
482
501
|
execution: task.getTaskExecution()
|
|
@@ -494,11 +513,31 @@ let MainThreadTask = class MainThreadTask extends Disposable {
|
|
|
494
513
|
}
|
|
495
514
|
}));
|
|
496
515
|
}
|
|
516
|
+
reserveCustomExecution(task) {
|
|
517
|
+
let starting = this._taskStarts.get(task);
|
|
518
|
+
if (!starting) {
|
|
519
|
+
starting = {
|
|
520
|
+
id: generateUuid(),
|
|
521
|
+
execution: TaskExecutionDTO.from(task.getTaskExecution())
|
|
522
|
+
};
|
|
523
|
+
this._taskStarts.set(task, starting);
|
|
524
|
+
this._proxy.$onWillStartTask(starting.execution.id, starting.id);
|
|
525
|
+
}
|
|
526
|
+
return starting;
|
|
527
|
+
}
|
|
528
|
+
endCustomExecution(task) {
|
|
529
|
+
const starting = this._taskStarts.get(task);
|
|
530
|
+
if (starting) {
|
|
531
|
+
this._taskStarts.delete(task);
|
|
532
|
+
this._proxy.$OnDidEndTask(starting.execution, starting.id);
|
|
533
|
+
}
|
|
534
|
+
}
|
|
497
535
|
dispose() {
|
|
498
536
|
for (const value of ( this._providers.values())) {
|
|
499
537
|
value.disposable.dispose();
|
|
500
538
|
}
|
|
501
539
|
this._providers.clear();
|
|
540
|
+
this._taskStarts.clear();
|
|
502
541
|
super.dispose();
|
|
503
542
|
}
|
|
504
543
|
$createTaskId(taskDTO) {
|
|
@@ -17,6 +17,7 @@ import { ITerminalQuickFixService } from "@codingame/monaco-vscode-api/vscode/vs
|
|
|
17
17
|
import { ITerminalCompletionService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/terminalContrib/suggest/browser/terminalCompletionService.service";
|
|
18
18
|
import { IWorkbenchEnvironmentService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/environment/common/environmentService.service";
|
|
19
19
|
export declare class MainThreadTerminalService extends Disposable implements MainThreadTerminalServiceShape {
|
|
20
|
+
private readonly _extHostContext;
|
|
20
21
|
private readonly _terminalService;
|
|
21
22
|
private readonly _terminalLinkProviderService;
|
|
22
23
|
private readonly _terminalQuickFixService;
|
|
@@ -42,6 +42,7 @@ let MainThreadTerminalService = class MainThreadTerminalService extends Disposab
|
|
|
42
42
|
_environmentService
|
|
43
43
|
) {
|
|
44
44
|
super();
|
|
45
|
+
this._extHostContext = _extHostContext;
|
|
45
46
|
this._terminalService = _terminalService;
|
|
46
47
|
this._terminalLinkProviderService = _terminalLinkProviderService;
|
|
47
48
|
this._terminalQuickFixService = _terminalQuickFixService;
|
|
@@ -110,7 +111,15 @@ let MainThreadTerminalService = class MainThreadTerminalService extends Disposab
|
|
|
110
111
|
this._proxy.$acceptActiveTerminalChanged(activeInstance.instanceId);
|
|
111
112
|
}
|
|
112
113
|
if (this._environmentVariableService.collections.size > 0) {
|
|
113
|
-
const
|
|
114
|
+
const hostOS = _extHostContext.remoteAuthority === null ? OS : _extHostContext.remoteOS;
|
|
115
|
+
if (hostOS === undefined) {
|
|
116
|
+
throw ( new Error(
|
|
117
|
+
"Remote extension host operating system is required to restore terminal environment collections."
|
|
118
|
+
));
|
|
119
|
+
}
|
|
120
|
+
const collectionAsArray = [
|
|
121
|
+
...this._environmentVariableService.getMergedCollection(_extHostContext.remoteAuthority, hostOS).collections.entries()
|
|
122
|
+
];
|
|
114
123
|
const serializedCollections = collectionAsArray.map(e => {
|
|
115
124
|
return [e[0], serializeEnvironmentVariableCollection(e[1].map)];
|
|
116
125
|
});
|
|
@@ -469,7 +478,8 @@ let MainThreadTerminalService = class MainThreadTerminalService extends Disposab
|
|
|
469
478
|
const translatedCollection = {
|
|
470
479
|
persistent,
|
|
471
480
|
map: deserializeEnvironmentVariableCollection(collection),
|
|
472
|
-
descriptionMap: deserializeEnvironmentDescriptionMap(descriptionMap)
|
|
481
|
+
descriptionMap: deserializeEnvironmentDescriptionMap(descriptionMap),
|
|
482
|
+
remoteAuthority: this._extHostContext.remoteAuthority?.toLowerCase() ?? null
|
|
473
483
|
};
|
|
474
484
|
this._environmentVariableService.set(extensionIdentifier, translatedCollection);
|
|
475
485
|
} else {
|
|
@@ -1,16 +1,22 @@
|
|
|
1
|
+
import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
|
|
2
|
+
import { UriComponents } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
1
3
|
import { ILogService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
|
|
2
4
|
import { MainThreadTimelineShape } from "@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol";
|
|
3
5
|
import { IExtHostContext } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extHostCustomers";
|
|
4
|
-
import {
|
|
6
|
+
import { TimelineProviderDescriptor, WorkspaceTimelineProviderDescriptor } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/timeline/common/timeline";
|
|
5
7
|
import { ITimelineService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/timeline/common/timeline.service";
|
|
6
|
-
export declare class MainThreadTimeline implements MainThreadTimelineShape {
|
|
8
|
+
export declare class MainThreadTimeline extends Disposable implements MainThreadTimelineShape {
|
|
7
9
|
private readonly logService;
|
|
8
10
|
private readonly _timelineService;
|
|
9
11
|
private readonly _proxy;
|
|
10
12
|
private readonly _providerEmitters;
|
|
13
|
+
private readonly _workspaceProviderEmitters;
|
|
11
14
|
constructor(context: IExtHostContext, logService: ILogService, _timelineService: ITimelineService);
|
|
12
15
|
$registerTimelineProvider(provider: TimelineProviderDescriptor): void;
|
|
13
16
|
$unregisterTimelineProvider(id: string): void;
|
|
14
|
-
$
|
|
17
|
+
$registerWorkspaceTimelineProvider(provider: WorkspaceTimelineProviderDescriptor): void;
|
|
18
|
+
$unregisterWorkspaceTimelineProvider(id: string): void;
|
|
19
|
+
$emitTimelineChangeEvent(id: string, uris: UriComponents[] | undefined): void;
|
|
20
|
+
$emitWorkspaceTimelineChangeEvent(id: string): void;
|
|
15
21
|
dispose(): void;
|
|
16
22
|
}
|
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
|
|
2
2
|
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
3
|
import { Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
4
|
+
import { Disposable, DisposableMap } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
5
|
+
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
4
6
|
import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
|
|
5
7
|
import { ExtHostContext, MainContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/api/common/extHost.protocol';
|
|
6
8
|
import { extHostNamedCustomer } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extHostCustomers';
|
|
7
9
|
import { ITimelineService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/timeline/common/timeline.service';
|
|
8
10
|
import { revive } from '@codingame/monaco-vscode-api/vscode/vs/base/common/marshalling';
|
|
9
11
|
|
|
10
|
-
let MainThreadTimeline = class MainThreadTimeline {
|
|
12
|
+
let MainThreadTimeline = class MainThreadTimeline extends Disposable {
|
|
11
13
|
constructor(context, logService, _timelineService) {
|
|
14
|
+
super();
|
|
12
15
|
this.logService = logService;
|
|
13
16
|
this._timelineService = _timelineService;
|
|
14
|
-
this._providerEmitters = ( new
|
|
17
|
+
this._providerEmitters = this._register(( new DisposableMap()));
|
|
18
|
+
this._workspaceProviderEmitters = this._register(( new DisposableMap()));
|
|
15
19
|
this._proxy = ( context.getProxy(ExtHostContext.ExtHostTimeline));
|
|
16
20
|
}
|
|
17
21
|
$registerTimelineProvider(provider) {
|
|
@@ -30,23 +34,59 @@ let MainThreadTimeline = class MainThreadTimeline {
|
|
|
30
34
|
return revive(await proxy.$getTimeline(provider.id, uri, options, token));
|
|
31
35
|
},
|
|
32
36
|
dispose() {
|
|
33
|
-
emitters.
|
|
34
|
-
onDidChange?.dispose();
|
|
37
|
+
emitters.deleteAndDispose(provider.id);
|
|
35
38
|
}
|
|
36
39
|
});
|
|
37
40
|
}
|
|
38
41
|
$unregisterTimelineProvider(id) {
|
|
39
42
|
this.logService.trace(`MainThreadTimeline#unregisterTimelineProvider: id=${id}`);
|
|
40
43
|
this._timelineService.unregisterTimelineProvider(id);
|
|
44
|
+
this._providerEmitters.deleteAndDispose(id);
|
|
41
45
|
}
|
|
42
|
-
$
|
|
46
|
+
$registerWorkspaceTimelineProvider(provider) {
|
|
47
|
+
this.logService.trace(`MainThreadTimeline#registerWorkspaceTimelineProvider: id=${provider.id}`);
|
|
48
|
+
const proxy = this._proxy;
|
|
49
|
+
const emitters = this._workspaceProviderEmitters;
|
|
50
|
+
let onDidChange = emitters.get(provider.id);
|
|
51
|
+
if (onDidChange === undefined) {
|
|
52
|
+
onDidChange = ( new Emitter());
|
|
53
|
+
emitters.set(provider.id, onDidChange);
|
|
54
|
+
}
|
|
55
|
+
this._timelineService.registerWorkspaceTimelineProvider({
|
|
56
|
+
...provider,
|
|
57
|
+
onDidChange: onDidChange.event,
|
|
58
|
+
async provideWorkspaceTimeline(options, token) {
|
|
59
|
+
return revive(await proxy.$getTimeline(provider.id, undefined, options, token));
|
|
60
|
+
},
|
|
61
|
+
dispose() {
|
|
62
|
+
emitters.deleteAndDispose(provider.id);
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
$unregisterWorkspaceTimelineProvider(id) {
|
|
67
|
+
this.logService.trace(`MainThreadTimeline#unregisterWorkspaceTimelineProvider: id=${id}`);
|
|
68
|
+
this._timelineService.unregisterWorkspaceTimelineProvider(id);
|
|
69
|
+
this._workspaceProviderEmitters.deleteAndDispose(id);
|
|
70
|
+
}
|
|
71
|
+
$emitTimelineChangeEvent(id, uris) {
|
|
43
72
|
this.logService.trace(
|
|
44
|
-
`MainThreadTimeline#emitChangeEvent: id=${
|
|
73
|
+
`MainThreadTimeline#emitChangeEvent: id=${id}, uris=${uris?.map(uri => ( URI.revive(uri).toString(true))).join(", ")}`
|
|
45
74
|
);
|
|
46
|
-
|
|
47
|
-
|
|
75
|
+
this._providerEmitters.get(id)?.fire(uris?.map(uri => URI.revive(uri)));
|
|
76
|
+
}
|
|
77
|
+
$emitWorkspaceTimelineChangeEvent(id) {
|
|
78
|
+
this.logService.trace(`MainThreadTimeline#emitWorkspaceChangeEvent: id=${id}`);
|
|
79
|
+
this._workspaceProviderEmitters.get(id)?.fire();
|
|
80
|
+
}
|
|
81
|
+
dispose() {
|
|
82
|
+
for (const id of ( this._providerEmitters.keys())) {
|
|
83
|
+
this.$unregisterTimelineProvider(id);
|
|
84
|
+
}
|
|
85
|
+
for (const id of ( this._workspaceProviderEmitters.keys())) {
|
|
86
|
+
this.$unregisterWorkspaceTimelineProvider(id);
|
|
87
|
+
}
|
|
88
|
+
super.dispose();
|
|
48
89
|
}
|
|
49
|
-
dispose() {}
|
|
50
90
|
};
|
|
51
91
|
MainThreadTimeline = __decorate([extHostNamedCustomer(MainContext.MainThreadTimeline), ( __param(1, ILogService)), ( __param(2, ITimelineService))], MainThreadTimeline);
|
|
52
92
|
|
|
@@ -137,8 +137,10 @@ let MainThreadTreeViews = class MainThreadTreeViews extends Disposable {
|
|
|
137
137
|
async $disposeTree(treeViewId) {
|
|
138
138
|
const viewer = this.getTreeView(treeViewId);
|
|
139
139
|
if (viewer) {
|
|
140
|
+
viewer.dragAndDropController = undefined;
|
|
140
141
|
viewer.dataProvider = undefined;
|
|
141
142
|
}
|
|
143
|
+
this._dndControllers.delete(treeViewId);
|
|
142
144
|
this._dataProviders.deleteAndDispose(treeViewId);
|
|
143
145
|
}
|
|
144
146
|
$logResolveTreeNodeFailure(extensionId) {
|
|
@@ -224,6 +226,7 @@ let MainThreadTreeViews = class MainThreadTreeViews extends Disposable {
|
|
|
224
226
|
for (const dataprovider of this._dataProviders) {
|
|
225
227
|
const treeView = this.getTreeView(dataprovider[0]);
|
|
226
228
|
if (treeView) {
|
|
229
|
+
treeView.dragAndDropController = undefined;
|
|
227
230
|
treeView.dataProvider = undefined;
|
|
228
231
|
}
|
|
229
232
|
}
|
|
@@ -290,6 +293,9 @@ class TreeViewDragAndDropController {
|
|
|
290
293
|
resolveDropFileData(requestId, dataItemId) {
|
|
291
294
|
return this.dataTransfersCache.resolveFileData(requestId, dataItemId);
|
|
292
295
|
}
|
|
296
|
+
handleDragEnd(operationUuid) {
|
|
297
|
+
this._proxy.$releaseDragOperation(operationUuid);
|
|
298
|
+
}
|
|
293
299
|
}
|
|
294
300
|
class TreeViewDataProvider {
|
|
295
301
|
constructor(treeViewId, _proxy, notificationService) {
|
|
@@ -116,13 +116,13 @@ let MainThreadTunnelService = class MainThreadTunnelService extends Disposable {
|
|
|
116
116
|
}
|
|
117
117
|
async elevationPrompt(tunnelOptions, tunnel, source) {
|
|
118
118
|
return this.notificationService.prompt(Severity.Info, ( localize(
|
|
119
|
-
|
|
119
|
+
7853,
|
|
120
120
|
"The extension {0} has forwarded port {1}. You'll need to run as superuser to use port {2} locally.",
|
|
121
121
|
source,
|
|
122
122
|
tunnelOptions.remoteAddress.port,
|
|
123
123
|
tunnelOptions.localAddressPort
|
|
124
124
|
)), [{
|
|
125
|
-
label: ( localize(
|
|
125
|
+
label: ( localize(7854, "Use Port {0} as Sudo...", tunnel.tunnelRemotePort)),
|
|
126
126
|
run: async () => {
|
|
127
127
|
this.elevateionRetry = true;
|
|
128
128
|
await this.remoteExplorerService.close({
|
|
@@ -4,6 +4,7 @@ import { Action } from '@codingame/monaco-vscode-api/vscode/vs/base/common/actio
|
|
|
4
4
|
import { isCancellationError } from '@codingame/monaco-vscode-api/vscode/vs/base/common/errors';
|
|
5
5
|
import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
6
6
|
import { Schemas } from '@codingame/monaco-vscode-api/vscode/vs/base/common/network';
|
|
7
|
+
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
7
8
|
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
8
9
|
import '@codingame/monaco-vscode-api/vscode/vs/platform/notification/common/notification';
|
|
9
10
|
import { INotificationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/notification/common/notification.service';
|
|
@@ -55,25 +56,25 @@ let MainThreadUriOpeners = class MainThreadUriOpeners extends Disposable {
|
|
|
55
56
|
canOpen: (uri, token) => {
|
|
56
57
|
return this.proxy.$canOpenUri(id, uri, token);
|
|
57
58
|
},
|
|
58
|
-
openExternalUri: async (
|
|
59
|
+
openExternalUri: async (href, ctx, token) => {
|
|
59
60
|
try {
|
|
60
61
|
await this.proxy.$openUri(id, {
|
|
61
|
-
resolvedUri:
|
|
62
|
+
resolvedUri: ( URI.parse(href)),
|
|
62
63
|
sourceUri: ctx.sourceUri,
|
|
63
64
|
viewColumn: ctx.viewColumn
|
|
64
65
|
}, token);
|
|
65
66
|
} catch (e) {
|
|
66
67
|
if (!isCancellationError(e)) {
|
|
67
|
-
const openDefaultAction = ( new Action("default", ( localize(
|
|
68
|
-
await this.openerService.open(
|
|
68
|
+
const openDefaultAction = ( new Action("default", ( localize(7855, "Open using default opener")), undefined, undefined, async () => {
|
|
69
|
+
await this.openerService.open(href, {
|
|
69
70
|
allowTunneling: false,
|
|
70
71
|
allowContributedOpeners: defaultExternalUriOpenerId
|
|
71
72
|
});
|
|
72
73
|
}));
|
|
73
|
-
openDefaultAction.tooltip =
|
|
74
|
+
openDefaultAction.tooltip = href;
|
|
74
75
|
this.notificationService.notify({
|
|
75
76
|
severity: Severity.Error,
|
|
76
|
-
message: ( localize(
|
|
77
|
+
message: ( localize(7856, "Could not open uri with '{0}': {1}", id, (e.toString()))),
|
|
77
78
|
actions: {
|
|
78
79
|
primary: [openDefaultAction]
|
|
79
80
|
}
|
|
@@ -118,7 +118,7 @@ let MainThreadWebviews = class MainThreadWebviews extends Disposable {
|
|
|
118
118
|
<meta http-equiv="Content-type" content="text/html;charset=UTF-8">
|
|
119
119
|
<meta http-equiv="Content-Security-Policy" content="default-src 'none';">
|
|
120
120
|
</head>
|
|
121
|
-
<body>${( localize(
|
|
121
|
+
<body>${( localize(7857, "An error occurred while loading view: {0}", escape(viewType)))}</body>
|
|
122
122
|
</html>`;
|
|
123
123
|
}
|
|
124
124
|
};
|
|
@@ -114,10 +114,10 @@ let MainThreadWorkspace = class MainThreadWorkspace extends Disposable {
|
|
|
114
114
|
const wantsToDelete = removeCount > 0;
|
|
115
115
|
if (wantsToAdd && !wantsToDelete) {
|
|
116
116
|
if (addCount === 1) {
|
|
117
|
-
message = ( localize(
|
|
117
|
+
message = ( localize(7858, "Extension '{0}' added 1 folder to the workspace", extensionName));
|
|
118
118
|
} else {
|
|
119
119
|
message = ( localize(
|
|
120
|
-
|
|
120
|
+
7859,
|
|
121
121
|
"Extension '{0}' added {1} folders to the workspace",
|
|
122
122
|
extensionName,
|
|
123
123
|
addCount
|
|
@@ -126,10 +126,10 @@ let MainThreadWorkspace = class MainThreadWorkspace extends Disposable {
|
|
|
126
126
|
}
|
|
127
127
|
else if (wantsToDelete && !wantsToAdd) {
|
|
128
128
|
if (removeCount === 1) {
|
|
129
|
-
message = ( localize(
|
|
129
|
+
message = ( localize(7860, "Extension '{0}' removed 1 folder from the workspace", extensionName));
|
|
130
130
|
} else {
|
|
131
131
|
message = ( localize(
|
|
132
|
-
|
|
132
|
+
7861,
|
|
133
133
|
"Extension '{0}' removed {1} folders from the workspace",
|
|
134
134
|
extensionName,
|
|
135
135
|
removeCount
|
|
@@ -137,7 +137,7 @@ let MainThreadWorkspace = class MainThreadWorkspace extends Disposable {
|
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
139
|
else {
|
|
140
|
-
message = ( localize(
|
|
140
|
+
message = ( localize(7862, "Extension '{0}' changed folders of the workspace", extensionName));
|
|
141
141
|
}
|
|
142
142
|
return message;
|
|
143
143
|
}
|
|
@@ -6,7 +6,7 @@ import { IResolvedTextEditorModel } from "@codingame/monaco-vscode-model-service
|
|
|
6
6
|
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
7
7
|
import { ILabelService } from "@codingame/monaco-vscode-api/vscode/vs/platform/label/common/label.service";
|
|
8
8
|
import { IRevertOptions, ISaveOptions } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor";
|
|
9
|
-
import { ICustomEditorModel } from "@codingame/monaco-vscode-
|
|
9
|
+
import { ICustomEditorModel } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/customEditor/common/customEditor";
|
|
10
10
|
import { IExtensionService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions.service";
|
|
11
11
|
import { ITextFileService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/textfile/common/textfiles.service";
|
|
12
12
|
export declare class CustomTextEditorModel extends Disposable implements ICustomEditorModel {
|
|
@@ -60,7 +60,7 @@ let CustomTextEditorModel = CustomTextEditorModel_1 = class CustomTextEditorMode
|
|
|
60
60
|
}));
|
|
61
61
|
this._register(extensionService.onWillStop(e => {
|
|
62
62
|
e.veto(true, ( localize(
|
|
63
|
-
|
|
63
|
+
18716,
|
|
64
64
|
"An extension provided text editor for '{0}' is still open that would close otherwise.",
|
|
65
65
|
this.name
|
|
66
66
|
)));
|
|
@@ -55,6 +55,12 @@ export interface GitUpstreamRef {
|
|
|
55
55
|
readonly name: string;
|
|
56
56
|
readonly commit?: string;
|
|
57
57
|
}
|
|
58
|
+
export interface GitCommitOptions {
|
|
59
|
+
/** Skips the pre-commit and commit-msg hooks. */
|
|
60
|
+
readonly noVerify?: boolean;
|
|
61
|
+
/** Overrides whether the commit is signed. Leaves the user's signing configuration in effect when undefined. */
|
|
62
|
+
readonly signCommit?: boolean;
|
|
63
|
+
}
|
|
58
64
|
export interface IGitRepository {
|
|
59
65
|
readonly rootUri: URI;
|
|
60
66
|
readonly state: IObservable<GitRepositoryState>;
|
|
@@ -62,6 +68,11 @@ export interface IGitRepository {
|
|
|
62
68
|
getRefs(query: GitRefQuery, token?: CancellationToken): Promise<GitRef[]>;
|
|
63
69
|
diffBetweenWithStats(ref1: string, ref2: string, path?: string): Promise<GitDiffChange[]>;
|
|
64
70
|
diffBetweenWithStats2(ref: string, path?: string): Promise<GitDiffChange[]>;
|
|
71
|
+
/**
|
|
72
|
+
* Stages the given files, including files that were deleted from disk, and commits the index.
|
|
73
|
+
* Resolves without committing when there is nothing to commit.
|
|
74
|
+
*/
|
|
75
|
+
commitFiles(files: readonly URI[], message: string, options?: GitCommitOptions): Promise<void>;
|
|
65
76
|
}
|
|
66
77
|
export interface IGitExtensionDelegate {
|
|
67
78
|
readonly repositories: Iterable<IGitRepository>;
|
|
@@ -69,4 +80,5 @@ export interface IGitExtensionDelegate {
|
|
|
69
80
|
getRefs(root: URI, query?: GitRefQuery, token?: CancellationToken): Promise<GitRef[]>;
|
|
70
81
|
diffBetweenWithStats(root: URI, ref1: string, ref2: string, path?: string): Promise<GitDiffChange[]>;
|
|
71
82
|
diffBetweenWithStats2(root: URI, ref: string, path?: string): Promise<GitDiffChange[]>;
|
|
83
|
+
commitFiles(root: URI, files: readonly URI[], message: string, options?: GitCommitOptions): Promise<void>;
|
|
72
84
|
}
|
|
@@ -169,11 +169,11 @@ let ExtensionBisectUi = class ExtensionBisectUi {
|
|
|
169
169
|
}
|
|
170
170
|
_showBisectPrompt() {
|
|
171
171
|
const goodPrompt = {
|
|
172
|
-
label: ( localize(
|
|
172
|
+
label: ( localize(27418, "I can't reproduce")),
|
|
173
173
|
run: () => this._commandService.executeCommand("extension.bisect.next", false)
|
|
174
174
|
};
|
|
175
175
|
const badPrompt = {
|
|
176
|
-
label: ( localize(
|
|
176
|
+
label: ( localize(27419, "I can reproduce")),
|
|
177
177
|
run: () => this._commandService.executeCommand("extension.bisect.next", true)
|
|
178
178
|
};
|
|
179
179
|
const stop = {
|
|
@@ -181,10 +181,10 @@ let ExtensionBisectUi = class ExtensionBisectUi {
|
|
|
181
181
|
run: () => this._commandService.executeCommand("extension.bisect.stop")
|
|
182
182
|
};
|
|
183
183
|
const message = this._extensionBisectService.disabledCount === 1 ? ( localize(
|
|
184
|
-
|
|
184
|
+
27420,
|
|
185
185
|
"Extension Bisect is active and has disabled 1 extension. Check if you can still reproduce the problem and proceed by selecting from these options."
|
|
186
186
|
)) : ( localize(
|
|
187
|
-
|
|
187
|
+
27421,
|
|
188
188
|
"Extension Bisect is active and has disabled {0} extensions. Check if you can still reproduce the problem and proceed by selecting from these options.",
|
|
189
189
|
this._extensionBisectService.disabledCount
|
|
190
190
|
));
|
|
@@ -200,7 +200,7 @@ registerAction2(class extends Action2 {
|
|
|
200
200
|
constructor() {
|
|
201
201
|
super({
|
|
202
202
|
id: "extension.bisect.start",
|
|
203
|
-
title: ( localize2(
|
|
203
|
+
title: ( localize2(27422, "Start Extension Bisect")),
|
|
204
204
|
category: Categories.Help,
|
|
205
205
|
f1: true,
|
|
206
206
|
precondition: ( ExtensionBisectUi.ctxIsBisectActive.negate()),
|
|
@@ -220,13 +220,13 @@ registerAction2(class extends Action2 {
|
|
|
220
220
|
const extensionsBisect = accessor.get(IExtensionBisectService);
|
|
221
221
|
const extensions = (await extensionManagement.getInstalled(ExtensionType.User)).filter(ext => extensionEnablementService.isEnabled(ext));
|
|
222
222
|
const res = await dialogService.confirm({
|
|
223
|
-
message: ( localize(
|
|
223
|
+
message: ( localize(27423, "Extension Bisect")),
|
|
224
224
|
detail: ( localize(
|
|
225
|
-
|
|
225
|
+
27424,
|
|
226
226
|
"Extension Bisect will use binary search to find an extension that causes a problem. During the process the window reloads repeatedly (~{0} times). Each time you must confirm if you are still seeing problems.",
|
|
227
227
|
2 + Math.log2(extensions.length) | 0
|
|
228
228
|
)),
|
|
229
|
-
primaryButton: ( localize(
|
|
229
|
+
primaryButton: ( localize(27425, "&&Start Extension Bisect"))
|
|
230
230
|
});
|
|
231
231
|
if (res.confirmed) {
|
|
232
232
|
await extensionsBisect.start(extensions);
|
|
@@ -238,7 +238,7 @@ registerAction2(class extends Action2 {
|
|
|
238
238
|
constructor() {
|
|
239
239
|
super({
|
|
240
240
|
id: "extension.bisect.next",
|
|
241
|
-
title: ( localize2(
|
|
241
|
+
title: ( localize2(27426, "Continue Extension Bisect")),
|
|
242
242
|
category: Categories.Help,
|
|
243
243
|
f1: true,
|
|
244
244
|
precondition: ExtensionBisectUi.ctxIsBisectActive
|
|
@@ -272,24 +272,24 @@ registerAction2(class extends Action2 {
|
|
|
272
272
|
return;
|
|
273
273
|
}
|
|
274
274
|
if (done.bad) {
|
|
275
|
-
await dialogService.info(( localize(
|
|
276
|
-
|
|
275
|
+
await dialogService.info(( localize(27427, "Extension Bisect")), ( localize(
|
|
276
|
+
27428,
|
|
277
277
|
"Extension Bisect is done but no extension has been identified. This might be a problem with {0}.",
|
|
278
278
|
productService.nameShort
|
|
279
279
|
)));
|
|
280
280
|
} else {
|
|
281
281
|
const res = await dialogService.confirm({
|
|
282
282
|
type: Severity.Info,
|
|
283
|
-
message: ( localize(
|
|
284
|
-
primaryButton: ( localize(
|
|
285
|
-
cancelButton: ( localize(
|
|
283
|
+
message: ( localize(27427, "Extension Bisect")),
|
|
284
|
+
primaryButton: ( localize(27429, "&&Report Issue & Continue")),
|
|
285
|
+
cancelButton: ( localize(27430, "Continue")),
|
|
286
286
|
detail: ( localize(
|
|
287
|
-
|
|
287
|
+
27431,
|
|
288
288
|
"Extension Bisect is done and has identified {0} as the extension causing the problem.",
|
|
289
289
|
done.id
|
|
290
290
|
)),
|
|
291
291
|
checkbox: {
|
|
292
|
-
label: ( localize(
|
|
292
|
+
label: ( localize(27432, "Keep this extension disabled")),
|
|
293
293
|
checked: true
|
|
294
294
|
}
|
|
295
295
|
});
|
|
@@ -310,24 +310,24 @@ registerAction2(class extends Action2 {
|
|
|
310
310
|
result
|
|
311
311
|
} = await dialogService.prompt({
|
|
312
312
|
type: Severity.Info,
|
|
313
|
-
message: ( localize(
|
|
313
|
+
message: ( localize(27433, "Extension Bisect")),
|
|
314
314
|
detail: ( localize(
|
|
315
|
-
|
|
315
|
+
27434,
|
|
316
316
|
"Extension Bisect is active and has disabled {0} extensions. Check if you can still reproduce the problem and proceed by selecting from these options.",
|
|
317
317
|
bisectService.disabledCount
|
|
318
318
|
)),
|
|
319
319
|
buttons: [{
|
|
320
|
-
label: ( localize(
|
|
320
|
+
label: ( localize(27435, "I ca&&n't reproduce")),
|
|
321
321
|
run: () => false
|
|
322
322
|
}, {
|
|
323
|
-
label: ( localize(
|
|
323
|
+
label: ( localize(27436, "I can &&reproduce")),
|
|
324
324
|
run: () => true
|
|
325
325
|
}, {
|
|
326
|
-
label: ( localize(
|
|
326
|
+
label: ( localize(27437, "&&Stop Bisect")),
|
|
327
327
|
run: () => undefined
|
|
328
328
|
}],
|
|
329
329
|
cancelButton: {
|
|
330
|
-
label: ( localize(
|
|
330
|
+
label: ( localize(27438, "&&Cancel Bisect")),
|
|
331
331
|
run: () => null
|
|
332
332
|
}
|
|
333
333
|
});
|
|
@@ -338,7 +338,7 @@ registerAction2(class extends Action2 {
|
|
|
338
338
|
constructor() {
|
|
339
339
|
super({
|
|
340
340
|
id: "extension.bisect.stop",
|
|
341
|
-
title: ( localize2(
|
|
341
|
+
title: ( localize2(27439, "Stop Extension Bisect")),
|
|
342
342
|
category: Categories.Help,
|
|
343
343
|
f1: true,
|
|
344
344
|
precondition: ExtensionBisectUi.ctxIsBisectActive
|
package/vscode/src/vs/workbench/services/extensionManagement/browser/webExtensionsScannerService.js
CHANGED
|
@@ -772,7 +772,7 @@ let WebExtensionsScannerService = class WebExtensionsScannerService extends Disp
|
|
|
772
772
|
}
|
|
773
773
|
if (!this.extensionManifestPropertiesService.canExecuteOnWeb(manifest)) {
|
|
774
774
|
throw ( new Error(( localize(
|
|
775
|
-
|
|
775
|
+
27454,
|
|
776
776
|
"Cannot add '{0}' because this extension is not a web extension.",
|
|
777
777
|
manifest.displayName || manifest.name
|
|
778
778
|
))));
|
|
@@ -1051,7 +1051,7 @@ if (isWeb) {
|
|
|
1051
1051
|
constructor() {
|
|
1052
1052
|
super({
|
|
1053
1053
|
id: "workbench.extensions.action.openInstalledWebExtensionsResource",
|
|
1054
|
-
title: ( localize2(
|
|
1054
|
+
title: ( localize2(27455, "Open Installed Web Extensions Resource")),
|
|
1055
1055
|
category: Categories.Developer,
|
|
1056
1056
|
f1: true,
|
|
1057
1057
|
precondition: IsWebContext
|
|
@@ -294,6 +294,7 @@ let BrowserExtensionHostFactory = class BrowserExtensionHostFactory {
|
|
|
294
294
|
return {
|
|
295
295
|
connectionData: this._remoteAuthorityResolverService.getConnectionData(remoteAuthority),
|
|
296
296
|
pid: remoteEnv.pid,
|
|
297
|
+
os: remoteEnv.os,
|
|
297
298
|
appRoot: remoteEnv.appRoot,
|
|
298
299
|
extensionHostLogsPath: remoteEnv.extensionHostLogsPath,
|
|
299
300
|
globalStorageHome: remoteEnv.globalStorageHome,
|