@codingame/monaco-vscode-extensions-service-override 28.4.0 → 29.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/browserView/common/browserViewTelemetry.d.ts +34 -0
- package/vscode/src/vs/platform/browserView/common/browserViewTelemetry.js +7 -0
- package/vscode/src/vs/platform/browserView/common/browserViewUri.d.ts +21 -0
- package/vscode/src/vs/platform/browserView/common/browserViewUri.js +34 -0
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagementCLI.js +28 -28
- package/vscode/src/vs/workbench/api/browser/mainThreadAuthentication.js +25 -25
- package/vscode/src/vs/workbench/api/browser/mainThreadBrowsers.d.ts +29 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadBrowsers.js +147 -0
- package/vscode/src/vs/workbench/api/browser/mainThreadCLICommands.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadChatAgents2.js +6 -20
- package/vscode/src/vs/workbench/api/browser/mainThreadChatDebug.d.ts +8 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadChatDebug.js +160 -4
- package/vscode/src/vs/workbench/api/browser/mainThreadChatSessions.d.ts +19 -14
- package/vscode/src/vs/workbench/api/browser/mainThreadChatSessions.js +134 -49
- 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/mainThreadDownloadService.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadEditSessionIdentityParticipant.js +1 -1
- 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 +3 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadGitExtensionService.js +47 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModelTools.d.ts +3 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModelTools.js +9 -4
- package/vscode/src/vs/workbench/api/browser/mainThreadLanguageModels.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadMcp.d.ts +4 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadMcp.js +21 -10
- package/vscode/src/vs/workbench/api/browser/mainThreadMessageService.js +4 -4
- package/vscode/src/vs/workbench/api/browser/mainThreadNotebookSaveParticipant.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadOutputService.js +3 -3
- package/vscode/src/vs/workbench/api/browser/mainThreadProgress.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadSaveParticipant.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadTask.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadTunnelService.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadUriOpeners.js +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadWebviews.js +1 -1
- package/vscode/src/vs/workbench/api/browser/mainThreadWorkspace.d.ts +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadWorkspace.js +25 -23
- package/vscode/src/vs/workbench/api/common/shared/tasks.d.ts +1 -0
- package/vscode/src/vs/workbench/contrib/browserView/common/browserEditorInput.d.ts +60 -0
- package/vscode/src/vs/workbench/contrib/browserView/common/browserEditorInput.js +222 -0
- package/vscode/src/vs/workbench/contrib/customEditor/common/customTextEditorModel.js +1 -1
- package/vscode/src/vs/workbench/contrib/git/common/gitService.d.ts +22 -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/common/abstractExtensionService.js +12 -12
- package/vscode/src/vs/workbench/services/extensions/common/extensionHostManager.js +1 -1
- package/vscode/src/vs/workbench/services/extensions/common/extensionRunningLocationTracker.js +1 -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/themes/browser/cssExtensionPoint.js +6 -6
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
3
|
import { isCancellationError } from '@codingame/monaco-vscode-api/vscode/vs/base/common/errors';
|
|
4
|
-
import {
|
|
4
|
+
import { Disposable, DisposableMap } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
5
5
|
import { isNative } from '@codingame/monaco-vscode-api/vscode/vs/base/common/platform';
|
|
6
6
|
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
7
7
|
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
@@ -28,7 +28,7 @@ import { ICanonicalUriService } from '@codingame/monaco-vscode-api/vscode/vs/pla
|
|
|
28
28
|
import { revive } from '@codingame/monaco-vscode-api/vscode/vs/base/common/marshalling';
|
|
29
29
|
import { ITextFileService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/textfile/common/textfiles.service';
|
|
30
30
|
|
|
31
|
-
let MainThreadWorkspace = class MainThreadWorkspace {
|
|
31
|
+
let MainThreadWorkspace = class MainThreadWorkspace extends Disposable {
|
|
32
32
|
constructor(
|
|
33
33
|
extHostContext,
|
|
34
34
|
_searchService,
|
|
@@ -47,6 +47,7 @@ let MainThreadWorkspace = class MainThreadWorkspace {
|
|
|
47
47
|
_workspaceTrustRequestService,
|
|
48
48
|
_textFileService
|
|
49
49
|
) {
|
|
50
|
+
super();
|
|
50
51
|
this._searchService = _searchService;
|
|
51
52
|
this._contextService = _contextService;
|
|
52
53
|
this._editSessionIdentityService = _editSessionIdentityService;
|
|
@@ -61,10 +62,9 @@ let MainThreadWorkspace = class MainThreadWorkspace {
|
|
|
61
62
|
this._workspaceTrustManagementService = _workspaceTrustManagementService;
|
|
62
63
|
this._workspaceTrustRequestService = _workspaceTrustRequestService;
|
|
63
64
|
this._textFileService = _textFileService;
|
|
64
|
-
this._toDispose = ( new DisposableStore());
|
|
65
65
|
this._activeCancelTokens = Object.create(null);
|
|
66
|
-
this.registeredEditSessionProviders = ( new
|
|
67
|
-
this.registeredCanonicalUriProviders = ( new
|
|
66
|
+
this.registeredEditSessionProviders = this._register(( new DisposableMap()));
|
|
67
|
+
this.registeredCanonicalUriProviders = this._register(( new DisposableMap()));
|
|
68
68
|
this._queryBuilder = this._instantiationService.createInstance(QueryBuilder);
|
|
69
69
|
this._proxy = ( extHostContext.getProxy(ExtHostContext.ExtHostWorkspace));
|
|
70
70
|
const workspace = this._contextService.getWorkspace();
|
|
@@ -75,13 +75,21 @@ let MainThreadWorkspace = class MainThreadWorkspace {
|
|
|
75
75
|
workspace => this._proxy.$initializeWorkspace(this.getWorkspaceData(workspace), this.isWorkspaceTrusted())
|
|
76
76
|
);
|
|
77
77
|
}
|
|
78
|
-
this.
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
this.
|
|
78
|
+
this._register(
|
|
79
|
+
this._contextService.onDidChangeWorkspaceFolders(this._onDidChangeWorkspace, this)
|
|
80
|
+
);
|
|
81
|
+
this._register(
|
|
82
|
+
this._contextService.onDidChangeWorkbenchState(this._onDidChangeWorkspace, this)
|
|
83
|
+
);
|
|
84
|
+
this._register(
|
|
85
|
+
this._workspaceTrustManagementService.onDidChangeTrust(this._onDidGrantWorkspaceTrust, this)
|
|
86
|
+
);
|
|
87
|
+
this._register(
|
|
88
|
+
this._workspaceTrustManagementService.onDidChangeTrustedFolders(this._onDidChangeWorkspaceTrustedFolders, this)
|
|
89
|
+
);
|
|
82
90
|
}
|
|
83
91
|
dispose() {
|
|
84
|
-
|
|
92
|
+
super.dispose();
|
|
85
93
|
for (const requestId in this._activeCancelTokens) {
|
|
86
94
|
const tokenSource = this._activeCancelTokens[requestId];
|
|
87
95
|
tokenSource.cancel();
|
|
@@ -106,10 +114,10 @@ let MainThreadWorkspace = class MainThreadWorkspace {
|
|
|
106
114
|
const wantsToDelete = removeCount > 0;
|
|
107
115
|
if (wantsToAdd && !wantsToDelete) {
|
|
108
116
|
if (addCount === 1) {
|
|
109
|
-
message = ( localize(
|
|
117
|
+
message = ( localize(2615, "Extension '{0}' added 1 folder to the workspace", extensionName));
|
|
110
118
|
} else {
|
|
111
119
|
message = ( localize(
|
|
112
|
-
|
|
120
|
+
2616,
|
|
113
121
|
"Extension '{0}' added {1} folders to the workspace",
|
|
114
122
|
extensionName,
|
|
115
123
|
addCount
|
|
@@ -118,10 +126,10 @@ let MainThreadWorkspace = class MainThreadWorkspace {
|
|
|
118
126
|
}
|
|
119
127
|
else if (wantsToDelete && !wantsToAdd) {
|
|
120
128
|
if (removeCount === 1) {
|
|
121
|
-
message = ( localize(
|
|
129
|
+
message = ( localize(2617, "Extension '{0}' removed 1 folder from the workspace", extensionName));
|
|
122
130
|
} else {
|
|
123
131
|
message = ( localize(
|
|
124
|
-
|
|
132
|
+
2618,
|
|
125
133
|
"Extension '{0}' removed {1} folders from the workspace",
|
|
126
134
|
extensionName,
|
|
127
135
|
removeCount
|
|
@@ -129,7 +137,7 @@ let MainThreadWorkspace = class MainThreadWorkspace {
|
|
|
129
137
|
}
|
|
130
138
|
}
|
|
131
139
|
else {
|
|
132
|
-
message = ( localize(
|
|
140
|
+
message = ( localize(2619, "Extension '{0}' changed folders of the workspace", extensionName));
|
|
133
141
|
}
|
|
134
142
|
return message;
|
|
135
143
|
}
|
|
@@ -260,12 +268,9 @@ let MainThreadWorkspace = class MainThreadWorkspace {
|
|
|
260
268
|
}
|
|
261
269
|
});
|
|
262
270
|
this.registeredEditSessionProviders.set(handle, disposable);
|
|
263
|
-
this._toDispose.add(disposable);
|
|
264
271
|
}
|
|
265
272
|
$unregisterEditSessionIdentityProvider(handle) {
|
|
266
|
-
|
|
267
|
-
disposable?.dispose();
|
|
268
|
-
this.registeredEditSessionProviders.delete(handle);
|
|
273
|
+
this.registeredEditSessionProviders.deleteAndDispose(handle);
|
|
269
274
|
}
|
|
270
275
|
$registerCanonicalUriProvider(handle, scheme) {
|
|
271
276
|
const disposable = this._canonicalUriService.registerCanonicalUriProvider({
|
|
@@ -279,12 +284,9 @@ let MainThreadWorkspace = class MainThreadWorkspace {
|
|
|
279
284
|
}
|
|
280
285
|
});
|
|
281
286
|
this.registeredCanonicalUriProviders.set(handle, disposable);
|
|
282
|
-
this._toDispose.add(disposable);
|
|
283
287
|
}
|
|
284
288
|
$unregisterCanonicalUriProvider(handle) {
|
|
285
|
-
|
|
286
|
-
disposable?.dispose();
|
|
287
|
-
this.registeredCanonicalUriProviders.delete(handle);
|
|
289
|
+
this.registeredCanonicalUriProviders.deleteAndDispose(handle);
|
|
288
290
|
}
|
|
289
291
|
$resolveDecoding(resource, options) {
|
|
290
292
|
return this._textFileService.resolveDecoding(URI.revive(resource), options);
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { ThemeIcon } from "@codingame/monaco-vscode-api/vscode/vs/base/common/themables";
|
|
2
|
+
import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
|
|
3
|
+
import { IBrowserEditorViewState, IBrowserViewModel } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/browserView/common/browserView";
|
|
4
|
+
import { IBrowserViewWorkbenchService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/browserView/common/browserView.service";
|
|
5
|
+
import { EditorInputCapabilities, IEditorSerializer, IUntypedEditorInput } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor";
|
|
6
|
+
import { EditorInput } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor/editorInput";
|
|
7
|
+
import { IThemeService } from "@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/themeService.service";
|
|
8
|
+
import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
9
|
+
import { ILifecycleService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/lifecycle/common/lifecycle.service";
|
|
10
|
+
import { ITelemetryService } from "@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service";
|
|
11
|
+
/**
|
|
12
|
+
* JSON-serializable type used during browser state serialization/deserialization
|
|
13
|
+
*/
|
|
14
|
+
export interface IBrowserEditorInputData extends IBrowserEditorViewState {
|
|
15
|
+
readonly id: string;
|
|
16
|
+
}
|
|
17
|
+
export declare class BrowserEditorInput extends EditorInput {
|
|
18
|
+
private readonly themeService;
|
|
19
|
+
private readonly browserViewWorkbenchService;
|
|
20
|
+
private readonly lifecycleService;
|
|
21
|
+
private readonly instantiationService;
|
|
22
|
+
private readonly telemetryService;
|
|
23
|
+
static readonly ID = "workbench.editorinputs.browser";
|
|
24
|
+
static readonly EDITOR_ID = "workbench.editor.browser";
|
|
25
|
+
private static readonly DEFAULT_LABEL;
|
|
26
|
+
private readonly _id;
|
|
27
|
+
private readonly _initialData;
|
|
28
|
+
private _model;
|
|
29
|
+
private _modelPromise;
|
|
30
|
+
constructor(options: IBrowserEditorInputData, themeService: IThemeService, browserViewWorkbenchService: IBrowserViewWorkbenchService, lifecycleService: ILifecycleService, instantiationService: IInstantiationService, telemetryService: ITelemetryService);
|
|
31
|
+
get id(): string;
|
|
32
|
+
get url(): string | undefined;
|
|
33
|
+
get title(): string | undefined;
|
|
34
|
+
get favicon(): string | undefined;
|
|
35
|
+
resolve(): Promise<IBrowserViewModel>;
|
|
36
|
+
get typeId(): string;
|
|
37
|
+
get editorId(): string;
|
|
38
|
+
get capabilities(): EditorInputCapabilities;
|
|
39
|
+
get resource(): URI;
|
|
40
|
+
getIcon(): ThemeIcon | URI | undefined;
|
|
41
|
+
getName(): string;
|
|
42
|
+
getTitle(): string;
|
|
43
|
+
getDescription(): string | undefined;
|
|
44
|
+
canReopen(): boolean;
|
|
45
|
+
matches(otherInput: EditorInput | IUntypedEditorInput): boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Creates a copy of this browser editor input with a new unique ID, creating an independent browser view with no linked state.
|
|
48
|
+
* This is used during Copy into New Window.
|
|
49
|
+
*/
|
|
50
|
+
copy(): EditorInput;
|
|
51
|
+
toUntyped(): IUntypedEditorInput;
|
|
52
|
+
private _resourceBeforeDisposal;
|
|
53
|
+
dispose(): void;
|
|
54
|
+
serialize(): IBrowserEditorInputData;
|
|
55
|
+
}
|
|
56
|
+
export declare class BrowserEditorSerializer implements IEditorSerializer {
|
|
57
|
+
canSerialize(editorInput: EditorInput): editorInput is BrowserEditorInput;
|
|
58
|
+
serialize(editorInput: EditorInput): string | undefined;
|
|
59
|
+
deserialize(instantiationService: IInstantiationService, serializedEditor: string): EditorInput | undefined;
|
|
60
|
+
}
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
|
|
2
|
+
import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
|
|
3
|
+
import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
|
|
4
|
+
import { truncate } from '@codingame/monaco-vscode-api/vscode/vs/base/common/strings';
|
|
5
|
+
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
6
|
+
import { generateUuid } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uuid';
|
|
7
|
+
import { BrowserViewUri } from '../../../../platform/browserView/common/browserViewUri.js';
|
|
8
|
+
import { IBrowserViewWorkbenchService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/browserView/common/browserView.service';
|
|
9
|
+
import { EditorInputCapabilities } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor';
|
|
10
|
+
import { EditorInput } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor/editorInput';
|
|
11
|
+
import { IThemeService } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/themeService.service';
|
|
12
|
+
import { TAB_ACTIVE_FOREGROUND } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/theme';
|
|
13
|
+
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
14
|
+
import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
15
|
+
import { hasKey } from '@codingame/monaco-vscode-api/vscode/vs/base/common/types';
|
|
16
|
+
import { ShutdownReason } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/lifecycle/common/lifecycle';
|
|
17
|
+
import { ILifecycleService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/lifecycle/common/lifecycle.service';
|
|
18
|
+
import { ITelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service';
|
|
19
|
+
import { logBrowserOpen } from '../../../../platform/browserView/common/browserViewTelemetry.js';
|
|
20
|
+
|
|
21
|
+
var BrowserEditorInput_1;
|
|
22
|
+
const LOADING_SPINNER_SVG = color => `
|
|
23
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16">
|
|
24
|
+
<path d="M8 1a7 7 0 1 0 0 14 7 7 0 0 0 0-14zm0 1.5a5.5 5.5 0 1 1 0 11 5.5 5.5 0 0 1 0-11z" fill="${color}" opacity="0.3"/>
|
|
25
|
+
<path d="M8 1a7 7 0 0 1 7 7h-1.5A5.5 5.5 0 0 0 8 2.5V1z" fill="${color}">
|
|
26
|
+
<animateTransform attributeName="transform" type="rotate" dur="1s" repeatCount="indefinite" values="0 8 8;360 8 8"/>
|
|
27
|
+
</path>
|
|
28
|
+
</svg>
|
|
29
|
+
`;
|
|
30
|
+
const MAX_TITLE_LENGTH = 30;
|
|
31
|
+
let BrowserEditorInput = class BrowserEditorInput extends EditorInput {
|
|
32
|
+
static {
|
|
33
|
+
BrowserEditorInput_1 = this;
|
|
34
|
+
}
|
|
35
|
+
static {
|
|
36
|
+
this.ID = "workbench.editorinputs.browser";
|
|
37
|
+
}
|
|
38
|
+
static {
|
|
39
|
+
this.EDITOR_ID = "workbench.editor.browser";
|
|
40
|
+
}
|
|
41
|
+
static {
|
|
42
|
+
this.DEFAULT_LABEL = ( localize(4618, "Browser"));
|
|
43
|
+
}
|
|
44
|
+
constructor(
|
|
45
|
+
options,
|
|
46
|
+
themeService,
|
|
47
|
+
browserViewWorkbenchService,
|
|
48
|
+
lifecycleService,
|
|
49
|
+
instantiationService,
|
|
50
|
+
telemetryService
|
|
51
|
+
) {
|
|
52
|
+
super();
|
|
53
|
+
this.themeService = themeService;
|
|
54
|
+
this.browserViewWorkbenchService = browserViewWorkbenchService;
|
|
55
|
+
this.lifecycleService = lifecycleService;
|
|
56
|
+
this.instantiationService = instantiationService;
|
|
57
|
+
this.telemetryService = telemetryService;
|
|
58
|
+
this._id = options.id;
|
|
59
|
+
this._initialData = options;
|
|
60
|
+
this._register(this.lifecycleService.onWillShutdown(e => {
|
|
61
|
+
if (this._model) {
|
|
62
|
+
if (e.reason === ShutdownReason.RELOAD) {
|
|
63
|
+
void this._model.setVisible(false);
|
|
64
|
+
} else {
|
|
65
|
+
this._model.dispose();
|
|
66
|
+
this._model = undefined;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}));
|
|
70
|
+
}
|
|
71
|
+
get id() {
|
|
72
|
+
return this._id;
|
|
73
|
+
}
|
|
74
|
+
get url() {
|
|
75
|
+
return this._model ? this._model.url : this._initialData.url;
|
|
76
|
+
}
|
|
77
|
+
get title() {
|
|
78
|
+
return this._model ? this._model.title : this._initialData.title;
|
|
79
|
+
}
|
|
80
|
+
get favicon() {
|
|
81
|
+
return this._model ? this._model.favicon : this._initialData.favicon;
|
|
82
|
+
}
|
|
83
|
+
async resolve() {
|
|
84
|
+
if (!this._model && !this._modelPromise) {
|
|
85
|
+
this._modelPromise = (async () => {
|
|
86
|
+
this._model = await this.browserViewWorkbenchService.getOrCreateBrowserViewModel(this._id);
|
|
87
|
+
this._modelPromise = undefined;
|
|
88
|
+
this._register(this._model.onWillDispose(() => {
|
|
89
|
+
this._model = undefined;
|
|
90
|
+
}));
|
|
91
|
+
this._register(this._model.onDidClose(() => {
|
|
92
|
+
this.dispose();
|
|
93
|
+
}));
|
|
94
|
+
this._register(this._model.onDidChangeTitle(() => this._onDidChangeLabel.fire()));
|
|
95
|
+
this._register(this._model.onDidChangeFavicon(() => this._onDidChangeLabel.fire()));
|
|
96
|
+
this._register(this._model.onDidChangeLoadingState(() => this._onDidChangeLabel.fire()));
|
|
97
|
+
this._register(this._model.onDidNavigate(() => this._onDidChangeLabel.fire()));
|
|
98
|
+
if (this._initialData.url && this._model.url !== this._initialData.url) {
|
|
99
|
+
void this._model.loadURL(this._initialData.url);
|
|
100
|
+
}
|
|
101
|
+
return this._model;
|
|
102
|
+
})();
|
|
103
|
+
}
|
|
104
|
+
return this._model || this._modelPromise;
|
|
105
|
+
}
|
|
106
|
+
get typeId() {
|
|
107
|
+
return BrowserEditorInput_1.ID;
|
|
108
|
+
}
|
|
109
|
+
get editorId() {
|
|
110
|
+
return BrowserEditorInput_1.EDITOR_ID;
|
|
111
|
+
}
|
|
112
|
+
get capabilities() {
|
|
113
|
+
return EditorInputCapabilities.ForceReveal | EditorInputCapabilities.Readonly;
|
|
114
|
+
}
|
|
115
|
+
get resource() {
|
|
116
|
+
if (this._resourceBeforeDisposal) {
|
|
117
|
+
return this._resourceBeforeDisposal;
|
|
118
|
+
}
|
|
119
|
+
return BrowserViewUri.forId(this._id);
|
|
120
|
+
}
|
|
121
|
+
getIcon() {
|
|
122
|
+
if (this._model) {
|
|
123
|
+
if (this._model.loading) {
|
|
124
|
+
const color = this.themeService.getColorTheme().getColor(TAB_ACTIVE_FOREGROUND);
|
|
125
|
+
return ( URI.parse(
|
|
126
|
+
"data:image/svg+xml;utf8," + encodeURIComponent(LOADING_SPINNER_SVG(color?.toString()))
|
|
127
|
+
));
|
|
128
|
+
}
|
|
129
|
+
if (this._model.favicon) {
|
|
130
|
+
return ( URI.parse(this._model.favicon));
|
|
131
|
+
}
|
|
132
|
+
return Codicon.globe;
|
|
133
|
+
}
|
|
134
|
+
if (this._initialData.favicon) {
|
|
135
|
+
return ( URI.parse(this._initialData.favicon));
|
|
136
|
+
}
|
|
137
|
+
return Codicon.globe;
|
|
138
|
+
}
|
|
139
|
+
getName() {
|
|
140
|
+
return truncate(this.getTitle(), MAX_TITLE_LENGTH);
|
|
141
|
+
}
|
|
142
|
+
getTitle() {
|
|
143
|
+
if (this._model && this._model.url) {
|
|
144
|
+
if (this._model.title) {
|
|
145
|
+
return this._model.title;
|
|
146
|
+
}
|
|
147
|
+
const authority = ( URI.parse(this._model.url)).authority;
|
|
148
|
+
return authority || BrowserEditorInput_1.DEFAULT_LABEL;
|
|
149
|
+
}
|
|
150
|
+
if (this._initialData.title) {
|
|
151
|
+
return this._initialData.title;
|
|
152
|
+
}
|
|
153
|
+
const url = this._initialData.url ?? "";
|
|
154
|
+
const authority = ( URI.parse(url)).authority;
|
|
155
|
+
return authority || BrowserEditorInput_1.DEFAULT_LABEL;
|
|
156
|
+
}
|
|
157
|
+
getDescription() {
|
|
158
|
+
return this.url;
|
|
159
|
+
}
|
|
160
|
+
canReopen() {
|
|
161
|
+
return true;
|
|
162
|
+
}
|
|
163
|
+
matches(otherInput) {
|
|
164
|
+
if (super.matches(otherInput)) {
|
|
165
|
+
return true;
|
|
166
|
+
}
|
|
167
|
+
if (otherInput instanceof BrowserEditorInput_1) {
|
|
168
|
+
return this._id === otherInput._id;
|
|
169
|
+
}
|
|
170
|
+
if (hasKey(otherInput, {
|
|
171
|
+
resource: true
|
|
172
|
+
}) && otherInput.resource?.scheme === BrowserViewUri.scheme) {
|
|
173
|
+
const parsed = BrowserViewUri.parse(otherInput.resource);
|
|
174
|
+
if (parsed) {
|
|
175
|
+
return this._id === parsed.id;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
return false;
|
|
179
|
+
}
|
|
180
|
+
copy() {
|
|
181
|
+
logBrowserOpen(this.telemetryService, "copyToNewWindow");
|
|
182
|
+
return this.instantiationService.createInstance(BrowserEditorInput_1, {
|
|
183
|
+
id: generateUuid(),
|
|
184
|
+
url: this.url,
|
|
185
|
+
title: this.title,
|
|
186
|
+
favicon: this.favicon
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
toUntyped() {
|
|
190
|
+
const viewState = {
|
|
191
|
+
url: this.url,
|
|
192
|
+
title: this.title,
|
|
193
|
+
favicon: this.favicon
|
|
194
|
+
};
|
|
195
|
+
return {
|
|
196
|
+
resource: this.resource,
|
|
197
|
+
options: {
|
|
198
|
+
override: BrowserEditorInput_1.ID,
|
|
199
|
+
viewState
|
|
200
|
+
}
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
dispose() {
|
|
204
|
+
if (this._model) {
|
|
205
|
+
this._resourceBeforeDisposal = this.resource;
|
|
206
|
+
this._model.dispose();
|
|
207
|
+
this._model = undefined;
|
|
208
|
+
}
|
|
209
|
+
super.dispose();
|
|
210
|
+
}
|
|
211
|
+
serialize() {
|
|
212
|
+
return {
|
|
213
|
+
id: this._id,
|
|
214
|
+
url: this.url,
|
|
215
|
+
title: this.title,
|
|
216
|
+
favicon: this.favicon
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
};
|
|
220
|
+
BrowserEditorInput = BrowserEditorInput_1 = ( __decorate([( __param(1, IThemeService)), ( __param(2, IBrowserViewWorkbenchService)), ( __param(3, ILifecycleService)), ( __param(4, IInstantiationService)), ( __param(5, ITelemetryService))], BrowserEditorInput));
|
|
221
|
+
|
|
222
|
+
export { BrowserEditorInput };
|
|
@@ -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
|
+
7949,
|
|
64
64
|
"An extension provided text editor for '{0}' is still open that would close otherwise.",
|
|
65
65
|
this.name
|
|
66
66
|
)));
|
|
@@ -18,14 +18,32 @@ export interface GitRefQuery {
|
|
|
18
18
|
readonly pattern?: string | string[];
|
|
19
19
|
readonly sort?: "alphabetically" | "committerdate" | "creatordate";
|
|
20
20
|
}
|
|
21
|
+
export interface GitChange {
|
|
22
|
+
readonly uri: URI;
|
|
23
|
+
readonly originalUri: URI | undefined;
|
|
24
|
+
readonly modifiedUri: URI | undefined;
|
|
25
|
+
}
|
|
26
|
+
export interface GitDiffChange extends GitChange {
|
|
27
|
+
readonly insertions: number;
|
|
28
|
+
readonly deletions: number;
|
|
29
|
+
}
|
|
21
30
|
export interface GitRepositoryState {
|
|
22
31
|
readonly HEAD?: GitBranch;
|
|
32
|
+
readonly mergeChanges: readonly GitChange[];
|
|
33
|
+
readonly indexChanges: readonly GitChange[];
|
|
34
|
+
readonly workingTreeChanges: readonly GitChange[];
|
|
35
|
+
readonly untrackedChanges: readonly GitChange[];
|
|
23
36
|
}
|
|
24
37
|
export interface GitBranch extends GitRef {
|
|
38
|
+
readonly base?: GitBaseRef;
|
|
25
39
|
readonly upstream?: GitUpstreamRef;
|
|
26
40
|
readonly ahead?: number;
|
|
27
41
|
readonly behind?: number;
|
|
28
42
|
}
|
|
43
|
+
export interface GitBaseRef {
|
|
44
|
+
readonly name: string;
|
|
45
|
+
readonly isProtected: boolean;
|
|
46
|
+
}
|
|
29
47
|
export interface GitUpstreamRef {
|
|
30
48
|
readonly remote: string;
|
|
31
49
|
readonly name: string;
|
|
@@ -36,9 +54,13 @@ export interface IGitRepository {
|
|
|
36
54
|
readonly state: IObservable<GitRepositoryState>;
|
|
37
55
|
updateState(state: GitRepositoryState): void;
|
|
38
56
|
getRefs(query: GitRefQuery, token?: CancellationToken): Promise<GitRef[]>;
|
|
57
|
+
diffBetweenWithStats(ref1: string, ref2: string, path?: string): Promise<GitDiffChange[]>;
|
|
58
|
+
diffBetweenWithStats2(ref: string, path?: string): Promise<GitDiffChange[]>;
|
|
39
59
|
}
|
|
40
60
|
export interface IGitExtensionDelegate {
|
|
41
61
|
readonly repositories: Iterable<IGitRepository>;
|
|
42
62
|
openRepository(uri: URI): Promise<IGitRepository | undefined>;
|
|
43
63
|
getRefs(root: URI, query?: GitRefQuery, token?: CancellationToken): Promise<GitRef[]>;
|
|
64
|
+
diffBetweenWithStats(root: URI, ref1: string, ref2: string, path?: string): Promise<GitDiffChange[]>;
|
|
65
|
+
diffBetweenWithStats2(root: URI, ref: string, path?: string): Promise<GitDiffChange[]>;
|
|
44
66
|
}
|
|
@@ -169,11 +169,11 @@ let ExtensionBisectUi = class ExtensionBisectUi {
|
|
|
169
169
|
}
|
|
170
170
|
_showBisectPrompt() {
|
|
171
171
|
const goodPrompt = {
|
|
172
|
-
label: ( localize(
|
|
172
|
+
label: ( localize(15893, "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(15894, "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
|
+
15895,
|
|
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
|
+
15896,
|
|
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(15897, "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(15898, "Extension Bisect")),
|
|
224
224
|
detail: ( localize(
|
|
225
|
-
|
|
225
|
+
15899,
|
|
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(15900, "&&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(15901, "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(15902, "Extension Bisect")), ( localize(
|
|
276
|
+
15903,
|
|
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(15902, "Extension Bisect")),
|
|
284
|
+
primaryButton: ( localize(15904, "&&Report Issue & Continue")),
|
|
285
|
+
cancelButton: ( localize(15905, "Continue")),
|
|
286
286
|
detail: ( localize(
|
|
287
|
-
|
|
287
|
+
15906,
|
|
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(15907, "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(15908, "Extension Bisect")),
|
|
314
314
|
detail: ( localize(
|
|
315
|
-
|
|
315
|
+
15909,
|
|
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(15910, "I ca&&n't reproduce")),
|
|
321
321
|
run: () => false
|
|
322
322
|
}, {
|
|
323
|
-
label: ( localize(
|
|
323
|
+
label: ( localize(15911, "I can &&reproduce")),
|
|
324
324
|
run: () => true
|
|
325
325
|
}, {
|
|
326
|
-
label: ( localize(
|
|
326
|
+
label: ( localize(15912, "&&Stop Bisect")),
|
|
327
327
|
run: () => undefined
|
|
328
328
|
}],
|
|
329
329
|
cancelButton: {
|
|
330
|
-
label: ( localize(
|
|
330
|
+
label: ( localize(15913, "&&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(15914, "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
|
@@ -768,7 +768,7 @@ let WebExtensionsScannerService = class WebExtensionsScannerService extends Disp
|
|
|
768
768
|
}
|
|
769
769
|
if (!this.extensionManifestPropertiesService.canExecuteOnWeb(manifest)) {
|
|
770
770
|
throw ( new Error(( localize(
|
|
771
|
-
|
|
771
|
+
15929,
|
|
772
772
|
"Cannot add '{0}' because this extension is not a web extension.",
|
|
773
773
|
manifest.displayName || manifest.name
|
|
774
774
|
))));
|
|
@@ -1049,7 +1049,7 @@ if (isWeb) {
|
|
|
1049
1049
|
constructor() {
|
|
1050
1050
|
super({
|
|
1051
1051
|
id: "workbench.extensions.action.openInstalledWebExtensionsResource",
|
|
1052
|
-
title: ( localize2(
|
|
1052
|
+
title: ( localize2(15930, "Open Installed Web Extensions Resource")),
|
|
1053
1053
|
category: Categories.Developer,
|
|
1054
1054
|
f1: true,
|
|
1055
1055
|
precondition: IsWebContext
|