@codingame/monaco-vscode-issue-service-override 11.1.1 → 12.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.
Files changed (28) hide show
  1. package/index.d.ts +2 -1
  2. package/index.js +18 -1
  3. package/package.json +15 -7
  4. package/vscode/src/vs/workbench/contrib/issue/browser/baseIssueReporterService.d.ts +95 -0
  5. package/vscode/src/vs/workbench/contrib/issue/browser/baseIssueReporterService.js +78 -75
  6. package/vscode/src/vs/workbench/contrib/issue/browser/issue.contribution.d.ts +1 -0
  7. package/vscode/src/vs/workbench/contrib/issue/browser/issue.contribution.js +11 -8
  8. package/vscode/src/vs/workbench/contrib/issue/browser/issueFormService.d.ts +40 -0
  9. package/vscode/src/vs/workbench/contrib/issue/browser/issueFormService.js +30 -29
  10. package/vscode/src/vs/workbench/contrib/issue/browser/issueReporterModel.d.ts +51 -0
  11. package/vscode/src/vs/workbench/contrib/issue/browser/issueReporterModel.js +10 -8
  12. package/vscode/src/vs/workbench/contrib/issue/browser/issueReporterPage.d.ts +2 -0
  13. package/vscode/src/vs/workbench/contrib/issue/browser/issueReporterPage.js +36 -35
  14. package/vscode/src/vs/workbench/contrib/issue/browser/issueReporterService.d.ts +13 -0
  15. package/vscode/src/vs/workbench/contrib/issue/browser/issueReporterService.js +7 -6
  16. package/vscode/src/vs/workbench/contrib/issue/browser/issueService.d.ts +33 -0
  17. package/vscode/src/vs/workbench/contrib/issue/browser/issueService.js +6 -3
  18. package/vscode/src/vs/workbench/contrib/issue/browser/issueTroubleshoot.d.ts +61 -0
  19. package/vscode/src/vs/workbench/contrib/issue/browser/issueTroubleshoot.js +82 -85
  20. package/vscode/src/vs/workbench/contrib/issue/browser/media/issueReporter.css.js +1 -1
  21. package/vscode/src/vs/workbench/contrib/issue/common/issue.contribution.d.ts +7 -0
  22. package/vscode/src/vs/workbench/contrib/issue/common/issue.contribution.js +8 -7
  23. package/vscode/src/vs/workbench/contrib/issue/common/issue.d.ts +95 -0
  24. package/vscode/src/vs/workbench/contrib/issue/common/issue.js +16 -0
  25. package/vscode/src/vs/workbench/contrib/issue/common/issueReporterUtil.d.ts +1 -0
  26. package/vscode/src/vs/workbench/contrib/issue/common/issueReporterUtil.js +1 -0
  27. package/issue.js +0 -17
  28. package/vscode/src/vs/platform/issue/common/issueReporterUtil.js +0 -17
package/index.d.ts CHANGED
@@ -1 +1,2 @@
1
- export { default } from 'vscode/service-override/issue';
1
+ import type { IEditorOverrideServices } from "vscode/vscode/vs/editor/standalone/browser/standaloneServices";
2
+ export default function getServiceOverride(): IEditorOverrideServices;
package/index.js CHANGED
@@ -1 +1,18 @@
1
- export { default } from './issue.js';
1
+
2
+ import { SyncDescriptor } from 'vscode/vscode/vs/platform/instantiation/common/descriptors';
3
+ import { IWorkbenchIssueService, IIssueFormService } from 'vscode/vscode/vs/workbench/contrib/issue/common/issue.service';
4
+ import { TroubleshootIssueService } from './vscode/src/vs/workbench/contrib/issue/browser/issueTroubleshoot.js';
5
+ import { ITroubleshootIssueService } from 'vscode/vscode/vs/workbench/contrib/issue/browser/issueTroubleshoot.service';
6
+ import { BrowserIssueService } from './vscode/src/vs/workbench/contrib/issue/browser/issueService.js';
7
+ import { IssueFormService } from './vscode/src/vs/workbench/contrib/issue/browser/issueFormService.js';
8
+ import './vscode/src/vs/workbench/contrib/issue/browser/issue.contribution.js';
9
+
10
+ function getServiceOverride() {
11
+ return {
12
+ [IWorkbenchIssueService.toString()]: new SyncDescriptor(BrowserIssueService, [], false),
13
+ [ITroubleshootIssueService.toString()]: new SyncDescriptor(TroubleshootIssueService, [], false),
14
+ [IIssueFormService.toString()]: new SyncDescriptor(IssueFormService, [], false)
15
+ };
16
+ }
17
+
18
+ export { getServiceOverride as default };
package/package.json CHANGED
@@ -1,6 +1,8 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-issue-service-override",
3
- "version": "11.1.1",
3
+ "version": "12.0.0",
4
+ "private": false,
5
+ "description": "VSCode public API plugged on the monaco editor - issue service-override",
4
6
  "keywords": [],
5
7
  "author": {
6
8
  "name": "CodinGame",
@@ -12,8 +14,12 @@
12
14
  "url": "git+ssh://git@github.com/CodinGame/monaco-vscode-api.git"
13
15
  },
14
16
  "type": "module",
15
- "private": false,
16
- "description": "VSCode public API plugged on the monaco editor - issue service-override",
17
+ "dependencies": {
18
+ "@codingame/monaco-vscode-89a82baf-8ded-5b2f-b8af-e5fbd72dc5ad-common": "12.0.0",
19
+ "vscode": "npm:@codingame/monaco-vscode-api@12.0.0"
20
+ },
21
+ "peerDependencies": {},
22
+ "peerDependenciesMeta": {},
17
23
  "main": "index.js",
18
24
  "module": "index.js",
19
25
  "types": "index.d.ts",
@@ -22,10 +28,12 @@
22
28
  "default": "./index.js"
23
29
  },
24
30
  "./vscode/*": {
25
- "default": "./vscode/src/*.js"
31
+ "default": "./vscode/src/*.js",
32
+ "types": "./vscode/src/*.d.ts"
33
+ },
34
+ "./*": {
35
+ "default": "./*.js",
36
+ "types": "./*.d.ts"
26
37
  }
27
- },
28
- "dependencies": {
29
- "vscode": "npm:@codingame/monaco-vscode-api@11.1.1"
30
38
  }
31
39
  }
@@ -0,0 +1,95 @@
1
+ import { Button } from "vscode/vscode/vs/base/browser/ui/button/button";
2
+ import { Delayer } from "vscode/vscode/vs/base/common/async";
3
+ import { Disposable } from "vscode/vscode/vs/base/common/lifecycle";
4
+ import { IProductConfiguration } from "vscode/vscode/vs/base/common/product";
5
+ import { IThemeService } from "vscode/vscode/vs/platform/theme/common/themeService.service";
6
+ import { IssueReporterModel } from "./issueReporterModel.js";
7
+ import { IssueReporterData, IssueReporterExtensionData } from "../common/issue.js";
8
+ import { IIssueFormService } from "vscode/vscode/vs/workbench/contrib/issue/common/issue.service";
9
+ export declare class BaseIssueReporterService extends Disposable {
10
+ disableExtensions: boolean;
11
+ data: IssueReporterData;
12
+ os: {
13
+ type: string;
14
+ arch: string;
15
+ release: string;
16
+ };
17
+ product: IProductConfiguration;
18
+ readonly window: Window;
19
+ readonly isWeb: boolean;
20
+ readonly issueFormService: IIssueFormService;
21
+ readonly themeService: IThemeService;
22
+ issueReporterModel: IssueReporterModel;
23
+ receivedSystemInfo: boolean;
24
+ numberOfSearchResultsDisplayed: number;
25
+ receivedPerformanceInfo: boolean;
26
+ shouldQueueSearch: boolean;
27
+ hasBeenSubmitted: boolean;
28
+ openReporter: boolean;
29
+ loadingExtensionData: boolean;
30
+ selectedExtension: string;
31
+ delayedSubmit: Delayer<void>;
32
+ previewButton: Button;
33
+ nonGitHubIssueUrl: boolean;
34
+ constructor(disableExtensions: boolean, data: IssueReporterData, os: {
35
+ type: string;
36
+ arch: string;
37
+ release: string;
38
+ }, product: IProductConfiguration, window: Window, isWeb: boolean, issueFormService: IIssueFormService, themeService: IThemeService);
39
+ render(): void;
40
+ setInitialFocus(): void;
41
+ private applyStyles;
42
+ private updateIssueReporterUri;
43
+ private handleExtensionData;
44
+ private updateExtensionSelector;
45
+ private sendReporterMenu;
46
+ setEventHandlers(): void;
47
+ updatePerformanceInfo(info: Partial<IssueReporterData>): void;
48
+ updatePreviewButtonState(): void;
49
+ private isPreviewEnabled;
50
+ private getExtensionRepositoryUrl;
51
+ getExtensionBugsUrl(): string | undefined;
52
+ searchVSCodeIssues(title: string, issueDescription?: string): void;
53
+ searchIssues(title: string, fileOnExtension: boolean | undefined, fileOnMarketplace: boolean | undefined): void;
54
+ private searchExtensionIssues;
55
+ private searchMarketplaceIssues;
56
+ close(): Promise<void>;
57
+ clearSearchResults(): void;
58
+ private searchGitHub;
59
+ private searchDuplicates;
60
+ private displaySearchResults;
61
+ private setUpTypes;
62
+ makeOption(value: string, description: string, disabled: boolean): HTMLOptionElement;
63
+ setSourceOptions(): void;
64
+ renderBlocks(): void;
65
+ validateInput(inputId: string): boolean;
66
+ validateInputs(): boolean;
67
+ submitToGitHub(issueTitle: string, issueBody: string, gitHubDetails: {
68
+ owner: string;
69
+ repositoryName: string;
70
+ }): Promise<boolean>;
71
+ createIssue(): Promise<boolean>;
72
+ writeToClipboard(baseUrl: string, issueBody: string): Promise<string>;
73
+ getIssueUrl(): string;
74
+ parseGitHubUrl(url: string): undefined | {
75
+ repositoryName: string;
76
+ owner: string;
77
+ };
78
+ private getExtensionGitHubUrl;
79
+ getIssueUrlWithTitle(issueTitle: string, repositoryUrl: string): string;
80
+ clearExtensionData(): void;
81
+ updateExtensionStatus(extension: IssueReporterExtensionData): Promise<void>;
82
+ validateSelectedExtension(): void;
83
+ setLoading(element: HTMLElement): void;
84
+ removeLoading(element: HTMLElement, fromReporter?: boolean): void;
85
+ private setExtensionValidationMessage;
86
+ private updateProcessInfo;
87
+ private updateWorkspaceInfo;
88
+ updateExtensionTable(extensions: IssueReporterExtensionData[], numThemeExtensions: number): void;
89
+ private getExtensionTableHtml;
90
+ private openLink;
91
+ getElementById<T extends HTMLElement = HTMLElement>(elementId: string): T | undefined;
92
+ addEventListener(elementId: string, eventType: string, handler: (event: Event) => void): void;
93
+ }
94
+ export declare function hide(el: Element | undefined | null): void;
95
+ export declare function show(el: Element | undefined | null): void;
@@ -1,5 +1,7 @@
1
- import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
2
- import { createStyleSheet, $, reset, windowOpenNoOpener, isHTMLInputElement, isHTMLTextAreaElement } from 'vscode/vscode/vs/base/browser/dom';
1
+
2
+ import { __decorate, __param } from 'vscode/external/tslib/tslib.es6';
3
+ import { $, reset, windowOpenNoOpener, isHTMLInputElement, isHTMLTextAreaElement } from 'vscode/vscode/vs/base/browser/dom';
4
+ import { createStyleSheet } from 'vscode/vscode/vs/base/browser/domStylesheets';
3
5
  import { Button, unthemedButtonStyles } from 'vscode/vscode/vs/base/browser/ui/button/button';
4
6
  import { renderIcon } from 'vscode/vscode/vs/base/browser/ui/iconLabel/iconLabels';
5
7
  import { mainWindow } from 'vscode/vscode/vs/base/browser/window';
@@ -17,17 +19,18 @@ import { localize } from 'vscode/vscode/vs/nls';
17
19
  import { getIconsStyleSheet } from 'vscode/vscode/vs/platform/theme/browser/iconsStyleSheet';
18
20
  import { IThemeService } from 'vscode/vscode/vs/platform/theme/common/themeService.service';
19
21
  import { IssueReporterModel } from './issueReporterModel.js';
22
+ import { IssueType } from '../common/issue.js';
20
23
  import { IIssueFormService } from 'vscode/vscode/vs/workbench/contrib/issue/common/issue.service';
21
24
  import { normalizeGitHubUrl } from '../common/issueReporterUtil.js';
22
25
 
23
26
  const MAX_URL_LENGTH = 7500;
24
27
  var IssueSource;
25
- ( ((function(IssueSource) {
28
+ (function (IssueSource) {
26
29
  IssueSource["VSCode"] = "vscode";
27
30
  IssueSource["Extension"] = "extension";
28
31
  IssueSource["Marketplace"] = "marketplace";
29
32
  IssueSource["Unknown"] = "unknown";
30
- })(IssueSource || (IssueSource = {}))));
33
+ })(IssueSource || (IssueSource = {}));
31
34
  let BaseIssueReporterService = class BaseIssueReporterService extends Disposable {
32
35
  constructor(disableExtensions, data, os, product, window, isWeb, issueFormService, themeService) {
33
36
  super();
@@ -47,12 +50,12 @@ let BaseIssueReporterService = class BaseIssueReporterService extends Disposable
47
50
  this.openReporter = false;
48
51
  this.loadingExtensionData = false;
49
52
  this.selectedExtension = '';
50
- this.delayedSubmit = ( (new Delayer(300)));
53
+ this.delayedSubmit = ( new Delayer(300));
51
54
  this.nonGitHubIssueUrl = false;
52
55
  const targetExtension = data.extensionId ? data.enabledExtensions.find(extension => extension.id.toLocaleLowerCase() === data.extensionId?.toLocaleLowerCase()) : undefined;
53
- this.issueReporterModel = ( (new IssueReporterModel({
56
+ this.issueReporterModel = ( new IssueReporterModel({
54
57
  ...data,
55
- issueType: data.issueType || 0 ,
58
+ issueType: data.issueType || IssueType.Bug,
56
59
  versionInfo: {
57
60
  vscodeVersion: `${product.nameShort} ${!!product.darwinUniversalAssetId ? `${product.version} (Universal)` : product.version} (${product.commit || 'Commit unknown'}, ${product.date || 'Date unknown'})`,
58
61
  os: `${this.os.type} ${this.os.arch} ${this.os.release}${isLinuxSnap ? ' snap' : ''}`
@@ -60,13 +63,13 @@ let BaseIssueReporterService = class BaseIssueReporterService extends Disposable
60
63
  extensionsDisabled: !!this.disableExtensions,
61
64
  fileOnExtension: data.extensionId ? !targetExtension?.isBuiltin : undefined,
62
65
  selectedExtension: targetExtension
63
- })));
66
+ }));
64
67
  const fileOnMarketplace = data.issueSource === IssueSource.Marketplace;
65
68
  const fileOnProduct = data.issueSource === IssueSource.VSCode;
66
69
  this.issueReporterModel.update({ fileOnMarketplace, fileOnProduct });
67
70
  const issueReporterElement = this.getElementById('issue-reporter');
68
71
  if (issueReporterElement) {
69
- this.previewButton = ( (new Button(issueReporterElement, unthemedButtonStyles)));
72
+ this.previewButton = ( new Button(issueReporterElement, unthemedButtonStyles));
70
73
  const issueRepoName = document.createElement('a');
71
74
  issueReporterElement.appendChild(issueRepoName);
72
75
  issueRepoName.id = 'show-repo-name';
@@ -97,7 +100,7 @@ let BaseIssueReporterService = class BaseIssueReporterService extends Disposable
97
100
  function updateAll() {
98
101
  codiconStyleSheet.textContent = iconsStyleSheet.getCSS();
99
102
  }
100
- const delayer = ( (new RunOnceScheduler(updateAll, 0)));
103
+ const delayer = ( new RunOnceScheduler(updateAll, 0));
101
104
  iconsStyleSheet.onDidChange(() => delayer.schedule());
102
105
  delayer.schedule();
103
106
  this.handleExtensionData(data.enabledExtensions);
@@ -186,7 +189,7 @@ let BaseIssueReporterService = class BaseIssueReporterService extends Disposable
186
189
  try {
187
190
  if (extension.uri) {
188
191
  const uri = URI.revive(extension.uri);
189
- extension.bugsUrl = ( (uri.toString()));
192
+ extension.bugsUrl = ( uri.toString());
190
193
  }
191
194
  }
192
195
  catch (e) {
@@ -207,12 +210,12 @@ let BaseIssueReporterService = class BaseIssueReporterService extends Disposable
207
210
  this.updateExtensionSelector(installedExtensions);
208
211
  }
209
212
  updateExtensionSelector(extensions) {
210
- const extensionOptions = ( (extensions.map(extension => {
213
+ const extensionOptions = ( extensions.map(extension => {
211
214
  return {
212
215
  name: extension.displayName || extension.name || '',
213
216
  id: extension.id
214
217
  };
215
- })));
218
+ }));
216
219
  extensionOptions.sort((a, b) => {
217
220
  const aName = a.name.toLowerCase();
218
221
  const bName = b.name.toLowerCase();
@@ -234,7 +237,7 @@ let BaseIssueReporterService = class BaseIssueReporterService extends Disposable
234
237
  const extensionsSelector = this.getElementById('extension-selector');
235
238
  if (extensionsSelector) {
236
239
  const { selectedExtension } = this.issueReporterModel.getData();
237
- reset(extensionsSelector, this.makeOption('', ( localize(10329, "Select extension")), true), ...( (extensionOptions.map(extension => makeOption(extension, selectedExtension)))));
240
+ reset(extensionsSelector, this.makeOption('', ( localize(6844, "Select extension")), true), ...( extensionOptions.map(extension => makeOption(extension, selectedExtension))));
238
241
  if (!selectedExtension) {
239
242
  extensionsSelector.selectedIndex = 0;
240
243
  }
@@ -315,11 +318,11 @@ let BaseIssueReporterService = class BaseIssueReporterService extends Disposable
315
318
  const info = containingElement && containingElement.lastElementChild;
316
319
  if (info && info.classList.contains('hidden')) {
317
320
  show(info);
318
- label.textContent = ( localize(10330, "hide"));
321
+ label.textContent = ( localize(6845, "hide"));
319
322
  }
320
323
  else {
321
324
  hide(info);
322
- label.textContent = ( localize(10331, "show"));
325
+ label.textContent = ( localize(6846, "show"));
323
326
  }
324
327
  }
325
328
  });
@@ -339,16 +342,16 @@ let BaseIssueReporterService = class BaseIssueReporterService extends Disposable
339
342
  }
340
343
  const descriptionTextArea = this.getElementById('issue-title');
341
344
  if (value === IssueSource.VSCode) {
342
- descriptionTextArea.placeholder = ( localize(10332, "E.g Workbench is missing problems panel"));
345
+ descriptionTextArea.placeholder = ( localize(6847, "E.g Workbench is missing problems panel"));
343
346
  }
344
347
  else if (value === IssueSource.Extension) {
345
- descriptionTextArea.placeholder = ( localize(10333, "E.g. Missing alt text on extension readme image"));
348
+ descriptionTextArea.placeholder = ( localize(6848, "E.g. Missing alt text on extension readme image"));
346
349
  }
347
350
  else if (value === IssueSource.Marketplace) {
348
- descriptionTextArea.placeholder = ( localize(10334, "E.g Cannot disable installed extension"));
351
+ descriptionTextArea.placeholder = ( localize(6849, "E.g Cannot disable installed extension"));
349
352
  }
350
353
  else {
351
- descriptionTextArea.placeholder = ( localize(10335, "Please enter a title"));
354
+ descriptionTextArea.placeholder = ( localize(6850, "Please enter a title"));
352
355
  }
353
356
  let fileOnExtension, fileOnMarketplace = false;
354
357
  if (value === IssueSource.Extension) {
@@ -453,21 +456,21 @@ let BaseIssueReporterService = class BaseIssueReporterService extends Disposable
453
456
  updatePreviewButtonState() {
454
457
  if (this.isPreviewEnabled()) {
455
458
  if (this.data.githubAccessToken) {
456
- this.previewButton.label = ( localize(10336, "Create on GitHub"));
459
+ this.previewButton.label = ( localize(6851, "Create on GitHub"));
457
460
  }
458
461
  else {
459
- this.previewButton.label = ( localize(10337, "Preview on GitHub"));
462
+ this.previewButton.label = ( localize(6852, "Preview on GitHub"));
460
463
  }
461
464
  this.previewButton.enabled = true;
462
465
  }
463
466
  else {
464
467
  this.previewButton.enabled = false;
465
- this.previewButton.label = ( localize(10338, "Loading data..."));
468
+ this.previewButton.label = ( localize(6853, "Loading data..."));
466
469
  }
467
470
  const issueRepoName = this.getElementById('show-repo-name');
468
471
  const selectedExtension = this.issueReporterModel.getData().selectedExtension;
469
472
  if (selectedExtension && selectedExtension.uri) {
470
- const urlString = ( (URI.revive(selectedExtension.uri).toString()));
473
+ const urlString = ( URI.revive(selectedExtension.uri).toString());
471
474
  issueRepoName.href = urlString;
472
475
  issueRepoName.addEventListener('click', (e) => this.openLink(e));
473
476
  issueRepoName.addEventListener('auxclick', (e) => this.openLink(e));
@@ -496,18 +499,18 @@ let BaseIssueReporterService = class BaseIssueReporterService extends Disposable
496
499
  return false;
497
500
  }
498
501
  if (this.isWeb) {
499
- if (issueType === 2 || issueType === 1 || issueType === 0 ) {
502
+ if (issueType === IssueType.FeatureRequest || issueType === IssueType.PerformanceIssue || issueType === IssueType.Bug) {
500
503
  return true;
501
504
  }
502
505
  }
503
506
  else {
504
- if (issueType === 0 && this.receivedSystemInfo) {
507
+ if (issueType === IssueType.Bug && this.receivedSystemInfo) {
505
508
  return true;
506
509
  }
507
- if (issueType === 1 && this.receivedSystemInfo && this.receivedPerformanceInfo) {
510
+ if (issueType === IssueType.PerformanceIssue && this.receivedSystemInfo && this.receivedPerformanceInfo) {
508
511
  return true;
509
512
  }
510
- if (issueType === 2 ) {
513
+ if (issueType === IssueType.FeatureRequest) {
511
514
  return true;
512
515
  }
513
516
  }
@@ -581,7 +584,7 @@ let BaseIssueReporterService = class BaseIssueReporterService extends Disposable
581
584
  }
582
585
  else {
583
586
  const message = $('div.list-title');
584
- message.textContent = ( localize(10339, "GitHub query limit exceeded. Please wait."));
587
+ message.textContent = ( localize(6854, "GitHub query limit exceeded. Please wait."));
585
588
  similarIssues.appendChild(message);
586
589
  const resetTime = response.headers.get('X-RateLimit-Reset');
587
590
  const timeToWait = resetTime ? parseInt(resetTime) - Math.floor(Date.now() / 1000) : 1;
@@ -608,9 +611,9 @@ let BaseIssueReporterService = class BaseIssueReporterService extends Disposable
608
611
  title,
609
612
  body
610
613
  }),
611
- headers: ( (new Headers({
614
+ headers: ( new Headers({
612
615
  'Content-Type': 'application/json'
613
- })))
616
+ }))
614
617
  };
615
618
  fetch(url, init).then((response) => {
616
619
  response.json().then(result => {
@@ -619,7 +622,7 @@ let BaseIssueReporterService = class BaseIssueReporterService extends Disposable
619
622
  this.displaySearchResults(result.candidates);
620
623
  }
621
624
  else {
622
- throw ( (new Error('Unexpected response, no candidates property')));
625
+ throw ( new Error('Unexpected response, no candidates property'));
623
626
  }
624
627
  }).catch(_ => {
625
628
  });
@@ -631,7 +634,7 @@ let BaseIssueReporterService = class BaseIssueReporterService extends Disposable
631
634
  if (results.length) {
632
635
  const issues = $('div.issues-container');
633
636
  const issuesText = $('div.list-title');
634
- issuesText.textContent = ( localize(10340, "Similar issues"));
637
+ issuesText.textContent = ( localize(6855, "Similar issues"));
635
638
  this.numberOfSearchResultsDisplayed = results.length < 5 ? results.length : 5;
636
639
  for (let i = 0; i < this.numberOfSearchResultsDisplayed; i++) {
637
640
  const issue = results[i];
@@ -647,8 +650,8 @@ let BaseIssueReporterService = class BaseIssueReporterService extends Disposable
647
650
  const issueIcon = $('span.issue-icon');
648
651
  issueIcon.appendChild(renderIcon(issue.state === 'open' ? Codicon.issueOpened : Codicon.issueClosed));
649
652
  const issueStateLabel = $('span.issue-state.label');
650
- issueStateLabel.textContent = issue.state === 'open' ? ( localize(10341, "Open")) : ( localize(10342, "Closed"));
651
- issueState.title = issue.state === 'open' ? ( localize(10341, "Open")) : ( localize(10342, "Closed"));
653
+ issueStateLabel.textContent = issue.state === 'open' ? ( localize(6856, "Open")) : ( localize(6857, "Closed"));
654
+ issueState.title = issue.state === 'open' ? ( localize(6856, "Open")) : ( localize(6857, "Closed"));
652
655
  issueState.appendChild(issueIcon);
653
656
  issueState.appendChild(issueStateLabel);
654
657
  item = $('div.issue', undefined, issueState, link);
@@ -663,7 +666,7 @@ let BaseIssueReporterService = class BaseIssueReporterService extends Disposable
663
666
  }
664
667
  else {
665
668
  const message = $('div.list-title');
666
- message.textContent = ( localize(10343, "No similar issues found"));
669
+ message.textContent = ( localize(6858, "No similar issues found"));
667
670
  similarIssues.appendChild(message);
668
671
  }
669
672
  }
@@ -671,8 +674,8 @@ let BaseIssueReporterService = class BaseIssueReporterService extends Disposable
671
674
  const makeOption = (issueType, description) => $('option', { 'value': issueType.valueOf() }, escape(description));
672
675
  const typeSelect = this.getElementById('issue-type');
673
676
  const { issueType } = this.issueReporterModel.getData();
674
- reset(typeSelect, makeOption(0 , ( localize(10344, "Bug Report"))), makeOption(2 , ( localize(10345, "Feature Request"))), makeOption(1 , ( localize(10346, "Performance Issue (freeze, slow, crash)"))));
675
- typeSelect.value = ( (issueType.toString()));
677
+ reset(typeSelect, makeOption(IssueType.Bug, ( localize(6859, "Bug Report"))), makeOption(IssueType.FeatureRequest, ( localize(6860, "Feature Request"))), makeOption(IssueType.PerformanceIssue, ( localize(6861, "Performance Issue (freeze, slow, crash)"))));
678
+ typeSelect.value = ( issueType.toString());
676
679
  this.setSourceOptions();
677
680
  }
678
681
  makeOption(value, description, disabled) {
@@ -701,14 +704,14 @@ let BaseIssueReporterService = class BaseIssueReporterService extends Disposable
701
704
  }
702
705
  }
703
706
  sourceSelect.innerText = '';
704
- sourceSelect.append(this.makeOption('', ( localize(10347, "Select source")), true));
705
- sourceSelect.append(this.makeOption(IssueSource.VSCode, ( localize(10348, "Visual Studio Code")), false));
706
- sourceSelect.append(this.makeOption(IssueSource.Extension, ( localize(10349, "A VS Code extension")), false));
707
+ sourceSelect.append(this.makeOption('', ( localize(6862, "Select source")), true));
708
+ sourceSelect.append(this.makeOption(IssueSource.VSCode, ( localize(6863, "Visual Studio Code")), false));
709
+ sourceSelect.append(this.makeOption(IssueSource.Extension, ( localize(6864, "A VS Code extension")), false));
707
710
  if (this.product.reportMarketplaceIssueUrl) {
708
- sourceSelect.append(this.makeOption(IssueSource.Marketplace, ( localize(10350, "Extensions Marketplace")), false));
711
+ sourceSelect.append(this.makeOption(IssueSource.Marketplace, ( localize(6865, "Extensions Marketplace")), false));
709
712
  }
710
- if (issueType !== 2 ) {
711
- sourceSelect.append(this.makeOption(IssueSource.Unknown, ( localize(10351, "Don't know")), false));
713
+ if (issueType !== IssueType.FeatureRequest) {
714
+ sourceSelect.append(this.makeOption(IssueSource.Unknown, ( localize(6866, "Don't know")), false));
712
715
  }
713
716
  if (selected !== -1 && selected < sourceSelect.options.length) {
714
717
  sourceSelect.selectedIndex = selected;
@@ -752,18 +755,18 @@ let BaseIssueReporterService = class BaseIssueReporterService extends Disposable
752
755
  if (selectedExtension && this.nonGitHubIssueUrl) {
753
756
  hide(titleTextArea);
754
757
  hide(descriptionTextArea);
755
- reset(descriptionTitle, ( localize(10352, "This extension handles issues outside of VS Code")));
758
+ reset(descriptionTitle, ( localize(6867, "This extension handles issues outside of VS Code")));
756
759
  reset(descriptionSubtitle, ( localize(
757
- 10353,
760
+ 6868,
758
761
  "The '{0}' extension prefers to use an external issue reporter. To be taken to that issue reporting experience, click the button below.",
759
762
  selectedExtension.displayName
760
763
  )));
761
- this.previewButton.label = ( localize(10354, "Open External Issue Reporter"));
764
+ this.previewButton.label = ( localize(6869, "Open External Issue Reporter"));
762
765
  return;
763
766
  }
764
767
  if (fileOnExtension && selectedExtension?.data) {
765
768
  const data = selectedExtension?.data;
766
- extensionDataTextArea.innerText = ( (data.toString()));
769
+ extensionDataTextArea.innerText = ( data.toString());
767
770
  extensionDataTextArea.readOnly = true;
768
771
  show(extensionDataBlock);
769
772
  }
@@ -776,7 +779,7 @@ let BaseIssueReporterService = class BaseIssueReporterService extends Disposable
776
779
  }, 100);
777
780
  show(extensionDataBlock);
778
781
  }
779
- if (issueType === 0 ) {
782
+ if (issueType === IssueType.Bug) {
780
783
  if (!fileOnMarketplace) {
781
784
  show(blockContainer);
782
785
  show(systemBlock);
@@ -785,13 +788,13 @@ let BaseIssueReporterService = class BaseIssueReporterService extends Disposable
785
788
  show(extensionsBlock);
786
789
  }
787
790
  }
788
- reset(descriptionTitle, ( localize(10355, "Steps to Reproduce")) + ' ', $('span.required-input', undefined, '*'));
791
+ reset(descriptionTitle, ( localize(6870, "Steps to Reproduce")) + ' ', $('span.required-input', undefined, '*'));
789
792
  reset(descriptionSubtitle, ( localize(
790
- 10356,
793
+ 6871,
791
794
  "Share the steps needed to reliably reproduce the problem. Please include actual and expected results. We support GitHub-flavored Markdown. You will be able to edit your issue and add screenshots when we preview it on GitHub."
792
795
  )));
793
796
  }
794
- else if (issueType === 1 ) {
797
+ else if (issueType === IssueType.PerformanceIssue) {
795
798
  if (!fileOnMarketplace) {
796
799
  show(blockContainer);
797
800
  show(systemBlock);
@@ -805,16 +808,16 @@ let BaseIssueReporterService = class BaseIssueReporterService extends Disposable
805
808
  else if (!fileOnMarketplace) {
806
809
  show(extensionsBlock);
807
810
  }
808
- reset(descriptionTitle, ( localize(10355, "Steps to Reproduce")) + ' ', $('span.required-input', undefined, '*'));
811
+ reset(descriptionTitle, ( localize(6870, "Steps to Reproduce")) + ' ', $('span.required-input', undefined, '*'));
809
812
  reset(descriptionSubtitle, ( localize(
810
- 10357,
813
+ 6872,
811
814
  "When did this performance issue happen? Does it occur on startup or after a specific series of actions? We support GitHub-flavored Markdown. You will be able to edit your issue and add screenshots when we preview it on GitHub."
812
815
  )));
813
816
  }
814
- else if (issueType === 2 ) {
815
- reset(descriptionTitle, ( localize(10358, "Description")) + ' ', $('span.required-input', undefined, '*'));
817
+ else if (issueType === IssueType.FeatureRequest) {
818
+ reset(descriptionTitle, ( localize(6873, "Description")) + ' ', $('span.required-input', undefined, '*'));
816
819
  reset(descriptionSubtitle, ( localize(
817
- 10359,
820
+ 6874,
818
821
  "Please describe the feature you would like to see. We support GitHub-flavored Markdown. You will be able to edit your issue and add screenshots when we preview it on GitHub."
819
822
  )));
820
823
  }
@@ -865,11 +868,11 @@ let BaseIssueReporterService = class BaseIssueReporterService extends Disposable
865
868
  title: issueTitle,
866
869
  body: issueBody
867
870
  }),
868
- headers: ( (new Headers({
871
+ headers: ( new Headers({
869
872
  'Content-Type': 'application/json',
870
873
  'Authorization': `Bearer ${this.data.githubAccessToken}`,
871
874
  'User-Agent': 'request'
872
- })))
875
+ }))
873
876
  };
874
877
  const response = await fetch(url, init);
875
878
  if (!response.ok) {
@@ -922,7 +925,7 @@ let BaseIssueReporterService = class BaseIssueReporterService extends Disposable
922
925
  }
923
926
  if (selectedExtension?.uri) {
924
927
  const uri = URI.revive(selectedExtension.uri);
925
- issueUrl = ( (uri.toString()));
928
+ issueUrl = ( uri.toString());
926
929
  }
927
930
  const gitHubDetails = this.parseGitHubUrl(issueUrl);
928
931
  if (this.data.githubAccessToken && gitHubDetails) {
@@ -945,10 +948,10 @@ let BaseIssueReporterService = class BaseIssueReporterService extends Disposable
945
948
  async writeToClipboard(baseUrl, issueBody) {
946
949
  const shouldWrite = await this.issueFormService.showClipboardDialog();
947
950
  if (!shouldWrite) {
948
- throw ( (new CancellationError()));
951
+ throw ( new CancellationError());
949
952
  }
950
953
  return baseUrl + `&body=${encodeURIComponent(( localize(
951
- 10360,
954
+ 6875,
952
955
  "We have written the needed data into your clipboard because it was too large to send. Please paste."
953
956
  )))}`;
954
957
  }
@@ -1008,8 +1011,8 @@ let BaseIssueReporterService = class BaseIssueReporterService extends Disposable
1008
1011
  if (template) {
1009
1012
  const descriptionTextArea = this.getElementById('description');
1010
1013
  const descriptionText = descriptionTextArea.value;
1011
- if (descriptionText === '' || !descriptionText.includes(( (template.toString())))) {
1012
- const fullTextArea = descriptionText + (descriptionText === '' ? '' : '\n') + ( (template.toString()));
1014
+ if (descriptionText === '' || !descriptionText.includes(( template.toString()))) {
1015
+ const fullTextArea = descriptionText + (descriptionText === '' ? '' : '\n') + ( template.toString());
1013
1016
  descriptionTextArea.value = fullTextArea;
1014
1017
  this.issueReporterModel.update({ issueDescription: fullTextArea });
1015
1018
  }
@@ -1118,7 +1121,7 @@ let BaseIssueReporterService = class BaseIssueReporterService extends Disposable
1118
1121
  const target = this.window.document.querySelector('.block-extensions .block-info');
1119
1122
  if (target) {
1120
1123
  if (this.disableExtensions) {
1121
- reset(target, ( localize(10361, "Extensions are disabled")));
1124
+ reset(target, ( localize(6876, "Extensions are disabled")));
1122
1125
  return;
1123
1126
  }
1124
1127
  const themeExclusionStr = numThemeExtensions ? `\n(${numThemeExtensions} theme extensions excluded)` : '';
@@ -1131,9 +1134,9 @@ let BaseIssueReporterService = class BaseIssueReporterService extends Disposable
1131
1134
  }
1132
1135
  }
1133
1136
  getExtensionTableHtml(extensions) {
1134
- return $('table', undefined, $('tr', undefined, $('th', undefined, 'Extension'), $('th', undefined, 'Author (truncated)'), $('th', undefined, 'Version')), ...( (extensions.map(
1137
+ return $('table', undefined, $('tr', undefined, $('th', undefined, 'Extension'), $('th', undefined, 'Author (truncated)'), $('th', undefined, 'Version')), ...( extensions.map(
1135
1138
  extension => $('tr', undefined, $('td', undefined, extension.name), $('td', undefined, extension.publisher?.substr(0, 3) ?? 'N/A'), $('td', undefined, extension.version))
1136
- ))));
1139
+ )));
1137
1140
  }
1138
1141
  openLink(event) {
1139
1142
  event.preventDefault();
@@ -1156,16 +1159,16 @@ let BaseIssueReporterService = class BaseIssueReporterService extends Disposable
1156
1159
  element?.addEventListener(eventType, handler);
1157
1160
  }
1158
1161
  };
1159
- BaseIssueReporterService.__decorator = ( (__decorate([
1162
+ BaseIssueReporterService.__decorator = ( __decorate([
1160
1163
  debounce(300)
1161
- ], BaseIssueReporterService.prototype, "searchGitHub", null)));
1162
- BaseIssueReporterService.__decorator = ( (__decorate([
1164
+ ], BaseIssueReporterService.prototype, "searchGitHub", null));
1165
+ BaseIssueReporterService.__decorator = ( __decorate([
1163
1166
  debounce(300)
1164
- ], BaseIssueReporterService.prototype, "searchDuplicates", null)));
1165
- BaseIssueReporterService = ( (__decorate([
1166
- ( (__param(6, IIssueFormService))),
1167
- ( (__param(7, IThemeService)))
1168
- ], BaseIssueReporterService)));
1167
+ ], BaseIssueReporterService.prototype, "searchDuplicates", null));
1168
+ BaseIssueReporterService = ( __decorate([
1169
+ ( __param(6, IIssueFormService)),
1170
+ ( __param(7, IThemeService))
1171
+ ], BaseIssueReporterService));
1169
1172
  function hide(el) {
1170
1173
  el?.classList.add('hidden');
1171
1174
  }
@@ -1,8 +1,10 @@
1
- import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
1
+
2
+ import { __decorate, __param } from 'vscode/external/tslib/tslib.es6';
2
3
  import { localize } from 'vscode/vscode/vs/nls';
3
4
  import { CommandsRegistry } from 'vscode/vscode/vs/platform/commands/common/commands';
4
5
  import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
5
6
  import { Extensions } from 'vscode/vscode/vs/platform/configuration/common/configurationRegistry';
7
+ import 'vscode/vscode/vs/platform/instantiation/common/extensions';
6
8
  import { IProductService } from 'vscode/vscode/vs/platform/product/common/productService.service';
7
9
  import { Registry } from 'vscode/vscode/vs/platform/registry/common/platform';
8
10
  import { Extensions as Extensions$1 } from 'vscode/vscode/vs/workbench/common/contributions';
@@ -11,11 +13,12 @@ import './issueService.js';
11
13
  import './issueTroubleshoot.js';
12
14
  import 'vscode/vscode/vs/platform/instantiation/common/instantiation';
13
15
  import { BaseIssueContribution } from '../common/issue.contribution.js';
16
+ import { LifecyclePhase } from 'vscode/vscode/vs/workbench/services/lifecycle/common/lifecycle';
14
17
 
15
18
  let WebIssueContribution = class WebIssueContribution extends BaseIssueContribution {
16
19
  constructor(productService, configurationService) {
17
20
  super(productService, configurationService);
18
- ( (Registry.as(Extensions.Configuration))).registerConfiguration({
21
+ ( Registry.as(Extensions.Configuration)).registerConfiguration({
19
22
  properties: {
20
23
  'issueReporter.experimental.webReporter': {
21
24
  type: 'boolean',
@@ -26,11 +29,11 @@ let WebIssueContribution = class WebIssueContribution extends BaseIssueContribut
26
29
  });
27
30
  }
28
31
  };
29
- WebIssueContribution = ( (__decorate([
30
- ( (__param(0, IProductService))),
31
- ( (__param(1, IConfigurationService)))
32
- ], WebIssueContribution)));
33
- ( (Registry.as(Extensions$1.Workbench))).registerWorkbenchContribution(WebIssueContribution, 3 );
32
+ WebIssueContribution = ( __decorate([
33
+ ( __param(0, IProductService)),
34
+ ( __param(1, IConfigurationService))
35
+ ], WebIssueContribution));
36
+ ( Registry.as(Extensions$1.Workbench)).registerWorkbenchContribution(WebIssueContribution, LifecyclePhase.Restored);
34
37
  CommandsRegistry.registerCommand('_issues.getSystemStatus', (accessor) => {
35
- return ( localize(2032, "The --status argument is not yet supported in browsers."));
38
+ return localize(6877, "The --status argument is not yet supported in browsers.");
36
39
  });