@codingame/monaco-vscode-issue-service-override 4.4.1 → 4.5.0-improve-code-splitting.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/issue.js +3 -2
- package/package.json +10 -2
- package/vscode/src/vs/workbench/contrib/issue/browser/issue.contribution.js +2 -2
- package/vscode/src/vs/workbench/contrib/issue/common/issue.contribution.js +3 -3
- package/vscode/src/vs/workbench/services/issue/browser/issueService.js +3 -3
- package/vscode/src/vs/workbench/services/issue/browser/issueTroubleshoot.js +421 -0
package/issue.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { SyncDescriptor } from 'vscode/vscode/vs/platform/instantiation/common/descriptors';
|
|
2
|
-
import { IWorkbenchIssueService } from 'vscode/vscode/vs/workbench/services/issue/common/issue';
|
|
2
|
+
import { IWorkbenchIssueService } from 'vscode/vscode/vs/workbench/services/issue/common/issue.service';
|
|
3
3
|
import { WebIssueService } from './vscode/src/vs/workbench/services/issue/browser/issueService.js';
|
|
4
|
-
import {
|
|
4
|
+
import { TroubleshootIssueService } from './vscode/src/vs/workbench/services/issue/browser/issueTroubleshoot.js';
|
|
5
|
+
import { ITroubleshootIssueService } from 'vscode/vscode/vs/workbench/services/issue/browser/issueTroubleshoot.service';
|
|
5
6
|
import './vscode/src/vs/workbench/contrib/issue/browser/issue.contribution.js';
|
|
6
7
|
|
|
7
8
|
function getServiceOverride() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-issue-service-override",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.5.0-improve-code-splitting.1",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "CodinGame",
|
|
@@ -17,7 +17,15 @@
|
|
|
17
17
|
"main": "index.js",
|
|
18
18
|
"module": "index.js",
|
|
19
19
|
"types": "index.d.ts",
|
|
20
|
+
"exports": {
|
|
21
|
+
".": {
|
|
22
|
+
"default": "./index.js"
|
|
23
|
+
},
|
|
24
|
+
"./vscode/*": {
|
|
25
|
+
"default": "./vscode/src/*.js"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
20
28
|
"dependencies": {
|
|
21
|
-
"vscode": "npm:@codingame/monaco-vscode-api@4.
|
|
29
|
+
"vscode": "npm:@codingame/monaco-vscode-api@4.5.0-improve-code-splitting.1"
|
|
22
30
|
}
|
|
23
31
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
2
2
|
import { localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
3
3
|
import { CommandsRegistry } from 'vscode/vscode/vs/platform/commands/common/commands';
|
|
4
|
-
import { IProductService } from 'vscode/vscode/vs/platform/product/common/productService';
|
|
4
|
+
import { IProductService } from 'vscode/vscode/vs/platform/product/common/productService.service';
|
|
5
5
|
import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
|
|
6
6
|
import { Extensions } from 'vscode/vscode/vs/workbench/common/contributions';
|
|
7
7
|
import '../../../services/issue/browser/issueService.js';
|
|
8
8
|
import 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
9
9
|
import { BaseIssueContribution } from '../common/issue.contribution.js';
|
|
10
|
-
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration';
|
|
10
|
+
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
|
|
11
11
|
|
|
12
12
|
let WebIssueContribution = class WebIssueContribution extends BaseIssueContribution {
|
|
13
13
|
constructor(productService, configurationService) {
|
|
@@ -3,9 +3,9 @@ import { localize2WithPath, localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
|
3
3
|
import { Categories } from 'vscode/vscode/vs/platform/action/common/actionCommonCategories';
|
|
4
4
|
import { MenuRegistry, MenuId } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
5
5
|
import { CommandsRegistry } from 'vscode/vscode/vs/platform/commands/common/commands';
|
|
6
|
-
import { IProductService } from 'vscode/vscode/vs/platform/product/common/productService';
|
|
7
|
-
import { IWorkbenchIssueService } from 'vscode/vscode/vs/workbench/services/issue/common/issue';
|
|
8
|
-
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration';
|
|
6
|
+
import { IProductService } from 'vscode/vscode/vs/platform/product/common/productService.service';
|
|
7
|
+
import { IWorkbenchIssueService } from 'vscode/vscode/vs/workbench/services/issue/common/issue.service';
|
|
8
|
+
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
|
|
9
9
|
import { Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
10
10
|
|
|
11
11
|
const OpenIssueReporterActionId = 'workbench.action.openIssueReporter';
|
|
@@ -4,9 +4,9 @@ import { CancellationToken } from 'vscode/vscode/vs/base/common/cancellation';
|
|
|
4
4
|
import { toDisposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
5
5
|
import { userAgent } from 'vscode/vscode/vs/base/common/platform';
|
|
6
6
|
import { normalizeGitHubUrl } from '../../../../platform/issue/common/issueReporterUtil.js';
|
|
7
|
-
import { ILogService } from 'vscode/vscode/vs/platform/log/common/log';
|
|
8
|
-
import { IProductService } from 'vscode/vscode/vs/platform/product/common/productService';
|
|
9
|
-
import { IExtensionService } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions';
|
|
7
|
+
import { ILogService } from 'vscode/vscode/vs/platform/log/common/log.service';
|
|
8
|
+
import { IProductService } from 'vscode/vscode/vs/platform/product/common/productService.service';
|
|
9
|
+
import { IExtensionService } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions.service';
|
|
10
10
|
|
|
11
11
|
let WebIssueService = class WebIssueService {
|
|
12
12
|
constructor(extensionService, productService, logService) {
|
|
@@ -0,0 +1,421 @@
|
|
|
1
|
+
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
2
|
+
import { localizeWithPath, localize2WithPath } from 'vscode/vscode/vs/nls';
|
|
3
|
+
import { IExtensionManagementService } from 'vscode/vscode/vs/platform/extensionManagement/common/extensionManagement.service';
|
|
4
|
+
import { IProductService } from 'vscode/vscode/vs/platform/product/common/productService.service';
|
|
5
|
+
import { IWorkbenchIssueService } from 'vscode/vscode/vs/workbench/services/issue/common/issue.service';
|
|
6
|
+
import { Disposable, DisposableStore } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
7
|
+
import { registerAction2, Action2 } from 'vscode/vscode/vs/platform/actions/common/actions';
|
|
8
|
+
import { IUserDataProfileService, IUserDataProfileManagementService, IUserDataProfileImportExportService } from 'vscode/vscode/vs/workbench/services/userDataProfile/common/userDataProfile.service';
|
|
9
|
+
import { IDialogService } from 'vscode/vscode/vs/platform/dialogs/common/dialogs.service';
|
|
10
|
+
import { IExtensionBisectService } from 'vscode/vscode/vs/workbench/services/extensionManagement/browser/extensionBisect.service';
|
|
11
|
+
import { NotificationPriority } from 'vscode/vscode/vs/platform/notification/common/notification';
|
|
12
|
+
import { INotificationService } from 'vscode/vscode/vs/platform/notification/common/notification.service';
|
|
13
|
+
import { IWorkbenchExtensionEnablementService } from 'vscode/vscode/vs/workbench/services/extensionManagement/common/extensionManagement.service';
|
|
14
|
+
import { IHostService } from 'vscode/vscode/vs/workbench/services/host/browser/host.service';
|
|
15
|
+
import { IUserDataProfilesService } from 'vscode/vscode/vs/platform/userDataProfile/common/userDataProfile.service';
|
|
16
|
+
import { Categories } from 'vscode/vscode/vs/platform/action/common/actionCommonCategories';
|
|
17
|
+
import { RawContextKey, ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
|
|
18
|
+
import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
19
|
+
import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
|
|
20
|
+
import { Extensions } from 'vscode/vscode/vs/workbench/common/contributions';
|
|
21
|
+
import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
|
|
22
|
+
import { IOpenerService } from 'vscode/vscode/vs/platform/opener/common/opener.service';
|
|
23
|
+
import { URI } from 'vscode/vscode/vs/base/common/uri';
|
|
24
|
+
import { RemoteNameContext } from 'vscode/vscode/vs/workbench/common/contextkeys';
|
|
25
|
+
import { IsWebContext } from 'vscode/vscode/vs/platform/contextkey/common/contextkeys';
|
|
26
|
+
import { ITroubleshootIssueService } from 'vscode/vscode/vs/workbench/services/issue/browser/issueTroubleshoot.service';
|
|
27
|
+
import Severity$1 from 'vscode/vscode/vs/base/common/severity';
|
|
28
|
+
|
|
29
|
+
var TroubleshootIssueService_1, IssueTroubleshootUi_1;
|
|
30
|
+
var TroubleshootStage;
|
|
31
|
+
( (function(TroubleshootStage) {
|
|
32
|
+
TroubleshootStage[TroubleshootStage["EXTENSIONS"] = 1] = "EXTENSIONS";
|
|
33
|
+
TroubleshootStage[TroubleshootStage["WORKBENCH"] = 2] = "WORKBENCH";
|
|
34
|
+
})(TroubleshootStage || (TroubleshootStage = {})));
|
|
35
|
+
class TroubleShootState {
|
|
36
|
+
static fromJSON(raw) {
|
|
37
|
+
if (!raw) {
|
|
38
|
+
return undefined;
|
|
39
|
+
}
|
|
40
|
+
try {
|
|
41
|
+
const data = JSON.parse(raw);
|
|
42
|
+
if ((data.stage === TroubleshootStage.EXTENSIONS || data.stage === TroubleshootStage.WORKBENCH)
|
|
43
|
+
&& typeof data.profile === 'string') {
|
|
44
|
+
return ( new TroubleShootState(data.stage, data.profile));
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
catch { }
|
|
48
|
+
return undefined;
|
|
49
|
+
}
|
|
50
|
+
constructor(stage, profile) {
|
|
51
|
+
this.stage = stage;
|
|
52
|
+
this.profile = profile;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
let TroubleshootIssueService = class TroubleshootIssueService extends Disposable {
|
|
56
|
+
static { TroubleshootIssueService_1 = this; }
|
|
57
|
+
static { this.storageKey = 'issueTroubleshootState'; }
|
|
58
|
+
constructor(userDataProfileService, userDataProfilesService, userDataProfileManagementService, userDataProfileImportExportService, dialogService, extensionBisectService, notificationService, extensionManagementService, extensionEnablementService, issueService, productService, hostService, storageService, openerService) {
|
|
59
|
+
super();
|
|
60
|
+
this.userDataProfileService = userDataProfileService;
|
|
61
|
+
this.userDataProfilesService = userDataProfilesService;
|
|
62
|
+
this.userDataProfileManagementService = userDataProfileManagementService;
|
|
63
|
+
this.userDataProfileImportExportService = userDataProfileImportExportService;
|
|
64
|
+
this.dialogService = dialogService;
|
|
65
|
+
this.extensionBisectService = extensionBisectService;
|
|
66
|
+
this.notificationService = notificationService;
|
|
67
|
+
this.extensionManagementService = extensionManagementService;
|
|
68
|
+
this.extensionEnablementService = extensionEnablementService;
|
|
69
|
+
this.issueService = issueService;
|
|
70
|
+
this.productService = productService;
|
|
71
|
+
this.hostService = hostService;
|
|
72
|
+
this.storageService = storageService;
|
|
73
|
+
this.openerService = openerService;
|
|
74
|
+
}
|
|
75
|
+
isActive() {
|
|
76
|
+
return this.state !== undefined;
|
|
77
|
+
}
|
|
78
|
+
async start() {
|
|
79
|
+
if (this.isActive()) {
|
|
80
|
+
throw new Error('invalid state');
|
|
81
|
+
}
|
|
82
|
+
const res = await this.dialogService.confirm({
|
|
83
|
+
message: ( localizeWithPath(
|
|
84
|
+
'vs/workbench/services/issue/browser/issueTroubleshoot',
|
|
85
|
+
'troubleshoot issue',
|
|
86
|
+
"Troubleshoot Issue"
|
|
87
|
+
)),
|
|
88
|
+
detail: ( localizeWithPath(
|
|
89
|
+
'vs/workbench/services/issue/browser/issueTroubleshoot',
|
|
90
|
+
'detail.start',
|
|
91
|
+
"Issue troubleshooting is a process to help you identify the cause for an issue. The cause for an issue can be a misconfiguration, due to an extension, or be {0} itself.\n\nDuring the process the window reloads repeatedly. Each time you must confirm if you are still seeing the issue.",
|
|
92
|
+
this.productService.nameLong
|
|
93
|
+
)),
|
|
94
|
+
primaryButton: ( localizeWithPath(
|
|
95
|
+
'vs/workbench/services/issue/browser/issueTroubleshoot',
|
|
96
|
+
{ key: 'msg', comment: ['&& denotes a mnemonic'] },
|
|
97
|
+
"&&Troubleshoot Issue"
|
|
98
|
+
)),
|
|
99
|
+
custom: true
|
|
100
|
+
});
|
|
101
|
+
if (!res.confirmed) {
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
const originalProfile = this.userDataProfileService.currentProfile;
|
|
105
|
+
await this.userDataProfileImportExportService.createTroubleshootProfile();
|
|
106
|
+
this.state = ( new TroubleShootState(TroubleshootStage.EXTENSIONS, originalProfile.id));
|
|
107
|
+
await this.resume();
|
|
108
|
+
}
|
|
109
|
+
async resume() {
|
|
110
|
+
if (!this.isActive()) {
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
if (this.state?.stage === TroubleshootStage.EXTENSIONS && !this.extensionBisectService.isActive) {
|
|
114
|
+
await this.reproduceIssueWithExtensionsDisabled();
|
|
115
|
+
}
|
|
116
|
+
if (this.state?.stage === TroubleshootStage.WORKBENCH) {
|
|
117
|
+
await this.reproduceIssueWithEmptyProfile();
|
|
118
|
+
}
|
|
119
|
+
await this.stop();
|
|
120
|
+
}
|
|
121
|
+
async stop() {
|
|
122
|
+
if (!this.isActive()) {
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
if (this.notificationHandle) {
|
|
126
|
+
this.notificationHandle.close();
|
|
127
|
+
this.notificationHandle = undefined;
|
|
128
|
+
}
|
|
129
|
+
if (this.extensionBisectService.isActive) {
|
|
130
|
+
await this.extensionBisectService.reset();
|
|
131
|
+
}
|
|
132
|
+
const profile = this.userDataProfilesService.profiles.find(p => p.id === this.state?.profile) ?? this.userDataProfilesService.defaultProfile;
|
|
133
|
+
this.state = undefined;
|
|
134
|
+
await this.userDataProfileManagementService.switchProfile(profile);
|
|
135
|
+
}
|
|
136
|
+
async reproduceIssueWithExtensionsDisabled() {
|
|
137
|
+
if (!(await this.extensionManagementService.getInstalled(1 )).length) {
|
|
138
|
+
this.state = ( new TroubleShootState(TroubleshootStage.WORKBENCH, this.state.profile));
|
|
139
|
+
return;
|
|
140
|
+
}
|
|
141
|
+
const result = await this.askToReproduceIssue(( localizeWithPath(
|
|
142
|
+
'vs/workbench/services/issue/browser/issueTroubleshoot',
|
|
143
|
+
'profile.extensions.disabled',
|
|
144
|
+
"Issue troubleshooting is active and has temporarily disabled all installed extensions. Check if you can still reproduce the problem and proceed by selecting from these options."
|
|
145
|
+
)));
|
|
146
|
+
if (result === 'good') {
|
|
147
|
+
const profile = this.userDataProfilesService.profiles.find(p => p.id === this.state.profile) ?? this.userDataProfilesService.defaultProfile;
|
|
148
|
+
await this.reproduceIssueWithExtensionsBisect(profile);
|
|
149
|
+
}
|
|
150
|
+
if (result === 'bad') {
|
|
151
|
+
this.state = ( new TroubleShootState(TroubleshootStage.WORKBENCH, this.state.profile));
|
|
152
|
+
}
|
|
153
|
+
if (result === 'stop') {
|
|
154
|
+
await this.stop();
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
async reproduceIssueWithEmptyProfile() {
|
|
158
|
+
await this.userDataProfileManagementService.createAndEnterTransientProfile();
|
|
159
|
+
this.updateState(this.state);
|
|
160
|
+
const result = await this.askToReproduceIssue(( localizeWithPath(
|
|
161
|
+
'vs/workbench/services/issue/browser/issueTroubleshoot',
|
|
162
|
+
'empty.profile',
|
|
163
|
+
"Issue troubleshooting is active and has temporarily reset your configurations to defaults. Check if you can still reproduce the problem and proceed by selecting from these options."
|
|
164
|
+
)));
|
|
165
|
+
if (result === 'stop') {
|
|
166
|
+
await this.stop();
|
|
167
|
+
}
|
|
168
|
+
if (result === 'good') {
|
|
169
|
+
await this.askToReportIssue(( localizeWithPath(
|
|
170
|
+
'vs/workbench/services/issue/browser/issueTroubleshoot',
|
|
171
|
+
'issue is with configuration',
|
|
172
|
+
"Issue troubleshooting has identified that the issue is caused by your configurations. Please report the issue by exporting your configurations using \"Export Profile\" command and share the file in the issue report."
|
|
173
|
+
)));
|
|
174
|
+
}
|
|
175
|
+
if (result === 'bad') {
|
|
176
|
+
await this.askToReportIssue(( localizeWithPath(
|
|
177
|
+
'vs/workbench/services/issue/browser/issueTroubleshoot',
|
|
178
|
+
'issue is in core',
|
|
179
|
+
"Issue troubleshooting has identified that the issue is with {0}.",
|
|
180
|
+
this.productService.nameLong
|
|
181
|
+
)));
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
async reproduceIssueWithExtensionsBisect(profile) {
|
|
185
|
+
await this.userDataProfileManagementService.switchProfile(profile);
|
|
186
|
+
const extensions = (await this.extensionManagementService.getInstalled(1 )).filter(ext => this.extensionEnablementService.isEnabled(ext));
|
|
187
|
+
await this.extensionBisectService.start(extensions);
|
|
188
|
+
await this.hostService.reload();
|
|
189
|
+
}
|
|
190
|
+
askToReproduceIssue(message) {
|
|
191
|
+
return ( new Promise((c, e) => {
|
|
192
|
+
const goodPrompt = {
|
|
193
|
+
label: ( localizeWithPath(
|
|
194
|
+
'vs/workbench/services/issue/browser/issueTroubleshoot',
|
|
195
|
+
'I cannot reproduce',
|
|
196
|
+
"I Can't Reproduce"
|
|
197
|
+
)),
|
|
198
|
+
run: () => c('good')
|
|
199
|
+
};
|
|
200
|
+
const badPrompt = {
|
|
201
|
+
label: ( localizeWithPath(
|
|
202
|
+
'vs/workbench/services/issue/browser/issueTroubleshoot',
|
|
203
|
+
'This is Bad',
|
|
204
|
+
"I Can Reproduce"
|
|
205
|
+
)),
|
|
206
|
+
run: () => c('bad')
|
|
207
|
+
};
|
|
208
|
+
const stop = {
|
|
209
|
+
label: ( localizeWithPath('vs/workbench/services/issue/browser/issueTroubleshoot', 'Stop', "Stop")),
|
|
210
|
+
run: () => c('stop')
|
|
211
|
+
};
|
|
212
|
+
this.notificationHandle = this.notificationService.prompt(Severity$1.Info, message, [goodPrompt, badPrompt, stop], { sticky: true, priority: NotificationPriority.URGENT });
|
|
213
|
+
}));
|
|
214
|
+
}
|
|
215
|
+
async askToReportIssue(message) {
|
|
216
|
+
let isCheckedInInsiders = false;
|
|
217
|
+
if (this.productService.quality === 'stable') {
|
|
218
|
+
const res = await this.askToReproduceIssueWithInsiders();
|
|
219
|
+
if (res === 'good') {
|
|
220
|
+
await this.dialogService.prompt({
|
|
221
|
+
type: Severity$1.Info,
|
|
222
|
+
message: ( localizeWithPath(
|
|
223
|
+
'vs/workbench/services/issue/browser/issueTroubleshoot',
|
|
224
|
+
'troubleshoot issue',
|
|
225
|
+
"Troubleshoot Issue"
|
|
226
|
+
)),
|
|
227
|
+
detail: ( localizeWithPath(
|
|
228
|
+
'vs/workbench/services/issue/browser/issueTroubleshoot',
|
|
229
|
+
'use insiders',
|
|
230
|
+
"This likely means that the issue has been addressed already and will be available in an upcoming release. You can safely use {0} insiders until the new stable version is available.",
|
|
231
|
+
this.productService.nameLong
|
|
232
|
+
)),
|
|
233
|
+
custom: true
|
|
234
|
+
});
|
|
235
|
+
return;
|
|
236
|
+
}
|
|
237
|
+
if (res === 'stop') {
|
|
238
|
+
await this.stop();
|
|
239
|
+
return;
|
|
240
|
+
}
|
|
241
|
+
if (res === 'bad') {
|
|
242
|
+
isCheckedInInsiders = true;
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
await this.issueService.openReporter({
|
|
246
|
+
issueBody: `> ${message} ${isCheckedInInsiders ? `It is confirmed that the issue exists in ${this.productService.nameLong} Insiders` : ''}`,
|
|
247
|
+
});
|
|
248
|
+
}
|
|
249
|
+
async askToReproduceIssueWithInsiders() {
|
|
250
|
+
const confirmRes = await this.dialogService.confirm({
|
|
251
|
+
type: 'info',
|
|
252
|
+
message: ( localizeWithPath(
|
|
253
|
+
'vs/workbench/services/issue/browser/issueTroubleshoot',
|
|
254
|
+
'troubleshoot issue',
|
|
255
|
+
"Troubleshoot Issue"
|
|
256
|
+
)),
|
|
257
|
+
primaryButton: ( localizeWithPath(
|
|
258
|
+
'vs/workbench/services/issue/browser/issueTroubleshoot',
|
|
259
|
+
'download insiders',
|
|
260
|
+
"Download {0} Insiders",
|
|
261
|
+
this.productService.nameLong
|
|
262
|
+
)),
|
|
263
|
+
cancelButton: ( localizeWithPath(
|
|
264
|
+
'vs/workbench/services/issue/browser/issueTroubleshoot',
|
|
265
|
+
'report anyway',
|
|
266
|
+
"Report Issue Anyway"
|
|
267
|
+
)),
|
|
268
|
+
detail: ( localizeWithPath(
|
|
269
|
+
'vs/workbench/services/issue/browser/issueTroubleshoot',
|
|
270
|
+
'ask to download insiders',
|
|
271
|
+
"Please try to download and reproduce the issue in {0} insiders.",
|
|
272
|
+
this.productService.nameLong
|
|
273
|
+
)),
|
|
274
|
+
custom: {
|
|
275
|
+
disableCloseAction: true,
|
|
276
|
+
}
|
|
277
|
+
});
|
|
278
|
+
if (!confirmRes.confirmed) {
|
|
279
|
+
return undefined;
|
|
280
|
+
}
|
|
281
|
+
const opened = await this.openerService.open(( URI.parse('https://aka.ms/vscode-insiders')));
|
|
282
|
+
if (!opened) {
|
|
283
|
+
return undefined;
|
|
284
|
+
}
|
|
285
|
+
const res = await this.dialogService.prompt({
|
|
286
|
+
type: 'info',
|
|
287
|
+
message: ( localizeWithPath(
|
|
288
|
+
'vs/workbench/services/issue/browser/issueTroubleshoot',
|
|
289
|
+
'troubleshoot issue',
|
|
290
|
+
"Troubleshoot Issue"
|
|
291
|
+
)),
|
|
292
|
+
buttons: [{
|
|
293
|
+
label: ( localizeWithPath(
|
|
294
|
+
'vs/workbench/services/issue/browser/issueTroubleshoot',
|
|
295
|
+
'good',
|
|
296
|
+
"I can't reproduce"
|
|
297
|
+
)),
|
|
298
|
+
run: () => 'good'
|
|
299
|
+
}, {
|
|
300
|
+
label: ( localizeWithPath(
|
|
301
|
+
'vs/workbench/services/issue/browser/issueTroubleshoot',
|
|
302
|
+
'bad',
|
|
303
|
+
"I can reproduce"
|
|
304
|
+
)),
|
|
305
|
+
run: () => 'bad'
|
|
306
|
+
}],
|
|
307
|
+
cancelButton: {
|
|
308
|
+
label: ( localizeWithPath('vs/workbench/services/issue/browser/issueTroubleshoot', 'stop', "Stop")),
|
|
309
|
+
run: () => 'stop'
|
|
310
|
+
},
|
|
311
|
+
detail: ( localizeWithPath(
|
|
312
|
+
'vs/workbench/services/issue/browser/issueTroubleshoot',
|
|
313
|
+
'ask to reproduce issue',
|
|
314
|
+
"Please try to reproduce the issue in {0} insiders and confirm if the issue exists there.",
|
|
315
|
+
this.productService.nameLong
|
|
316
|
+
)),
|
|
317
|
+
custom: {
|
|
318
|
+
disableCloseAction: true,
|
|
319
|
+
}
|
|
320
|
+
});
|
|
321
|
+
return res.result;
|
|
322
|
+
}
|
|
323
|
+
get state() {
|
|
324
|
+
if (this._state === undefined) {
|
|
325
|
+
const raw = this.storageService.get(TroubleshootIssueService_1.storageKey, 0 );
|
|
326
|
+
this._state = TroubleShootState.fromJSON(raw);
|
|
327
|
+
}
|
|
328
|
+
return this._state || undefined;
|
|
329
|
+
}
|
|
330
|
+
set state(state) {
|
|
331
|
+
this._state = state ?? null;
|
|
332
|
+
this.updateState(state);
|
|
333
|
+
}
|
|
334
|
+
updateState(state) {
|
|
335
|
+
if (state) {
|
|
336
|
+
this.storageService.store(TroubleshootIssueService_1.storageKey, JSON.stringify(state), 0 , 1 );
|
|
337
|
+
}
|
|
338
|
+
else {
|
|
339
|
+
this.storageService.remove(TroubleshootIssueService_1.storageKey, 0 );
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
};
|
|
343
|
+
TroubleshootIssueService = TroubleshootIssueService_1 = ( __decorate([
|
|
344
|
+
( __param(0, IUserDataProfileService)),
|
|
345
|
+
( __param(1, IUserDataProfilesService)),
|
|
346
|
+
( __param(2, IUserDataProfileManagementService)),
|
|
347
|
+
( __param(3, IUserDataProfileImportExportService)),
|
|
348
|
+
( __param(4, IDialogService)),
|
|
349
|
+
( __param(5, IExtensionBisectService)),
|
|
350
|
+
( __param(6, INotificationService)),
|
|
351
|
+
( __param(7, IExtensionManagementService)),
|
|
352
|
+
( __param(8, IWorkbenchExtensionEnablementService)),
|
|
353
|
+
( __param(9, IWorkbenchIssueService)),
|
|
354
|
+
( __param(10, IProductService)),
|
|
355
|
+
( __param(11, IHostService)),
|
|
356
|
+
( __param(12, IStorageService)),
|
|
357
|
+
( __param(13, IOpenerService))
|
|
358
|
+
], TroubleshootIssueService));
|
|
359
|
+
let IssueTroubleshootUi = class IssueTroubleshootUi extends Disposable {
|
|
360
|
+
static { IssueTroubleshootUi_1 = this; }
|
|
361
|
+
static { this.ctxIsTroubleshootActive = ( new RawContextKey('isIssueTroubleshootActive', false)); }
|
|
362
|
+
constructor(contextKeyService, troubleshootIssueService, storageService) {
|
|
363
|
+
super();
|
|
364
|
+
this.contextKeyService = contextKeyService;
|
|
365
|
+
this.troubleshootIssueService = troubleshootIssueService;
|
|
366
|
+
this.updateContext();
|
|
367
|
+
if (troubleshootIssueService.isActive()) {
|
|
368
|
+
troubleshootIssueService.resume();
|
|
369
|
+
}
|
|
370
|
+
this._register(storageService.onDidChangeValue(0 , TroubleshootIssueService.storageKey, this._register(( new DisposableStore())))(() => {
|
|
371
|
+
this.updateContext();
|
|
372
|
+
}));
|
|
373
|
+
}
|
|
374
|
+
updateContext() {
|
|
375
|
+
IssueTroubleshootUi_1.ctxIsTroubleshootActive.bindTo(this.contextKeyService).set(this.troubleshootIssueService.isActive());
|
|
376
|
+
}
|
|
377
|
+
};
|
|
378
|
+
IssueTroubleshootUi = IssueTroubleshootUi_1 = ( __decorate([
|
|
379
|
+
( __param(0, IContextKeyService)),
|
|
380
|
+
( __param(1, ITroubleshootIssueService)),
|
|
381
|
+
( __param(2, IStorageService))
|
|
382
|
+
], IssueTroubleshootUi));
|
|
383
|
+
( Registry.as(Extensions.Workbench)).registerWorkbenchContribution(IssueTroubleshootUi, 3 );
|
|
384
|
+
registerAction2(class TroubleshootIssueAction extends Action2 {
|
|
385
|
+
constructor() {
|
|
386
|
+
super({
|
|
387
|
+
id: 'workbench.action.troubleshootIssue.start',
|
|
388
|
+
title: ( localize2WithPath(
|
|
389
|
+
'vs/workbench/services/issue/browser/issueTroubleshoot',
|
|
390
|
+
'troubleshootIssue',
|
|
391
|
+
'Troubleshoot Issue...'
|
|
392
|
+
)),
|
|
393
|
+
category: Categories.Help,
|
|
394
|
+
f1: true,
|
|
395
|
+
precondition: ( ContextKeyExpr.and(( IssueTroubleshootUi.ctxIsTroubleshootActive.negate()), ( RemoteNameContext.isEqualTo('')), ( IsWebContext.negate()))),
|
|
396
|
+
});
|
|
397
|
+
}
|
|
398
|
+
run(accessor) {
|
|
399
|
+
return accessor.get(ITroubleshootIssueService).start();
|
|
400
|
+
}
|
|
401
|
+
});
|
|
402
|
+
registerAction2(class extends Action2 {
|
|
403
|
+
constructor() {
|
|
404
|
+
super({
|
|
405
|
+
id: 'workbench.action.troubleshootIssue.stop',
|
|
406
|
+
title: ( localize2WithPath(
|
|
407
|
+
'vs/workbench/services/issue/browser/issueTroubleshoot',
|
|
408
|
+
'title.stop',
|
|
409
|
+
'Stop Troubleshoot Issue'
|
|
410
|
+
)),
|
|
411
|
+
category: Categories.Help,
|
|
412
|
+
f1: true,
|
|
413
|
+
precondition: IssueTroubleshootUi.ctxIsTroubleshootActive
|
|
414
|
+
});
|
|
415
|
+
}
|
|
416
|
+
async run(accessor) {
|
|
417
|
+
return accessor.get(ITroubleshootIssueService).stop();
|
|
418
|
+
}
|
|
419
|
+
});
|
|
420
|
+
|
|
421
|
+
export { TroubleshootIssueService };
|