@codingame/monaco-vscode-view-common-service-override 26.2.2 → 27.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 (55) hide show
  1. package/index.js +1 -1
  2. package/package.json +3 -3
  3. package/vscode/src/vs/workbench/api/browser/viewsExtensionPoint.js +56 -56
  4. package/vscode/src/vs/workbench/browser/actions/helpActions.js +21 -21
  5. package/vscode/src/vs/workbench/browser/actions/listCommands.js +3 -3
  6. package/vscode/src/vs/workbench/browser/actions/navigationActions.js +6 -6
  7. package/vscode/src/vs/workbench/browser/parts/editor/editor.contribution.js +166 -166
  8. package/vscode/src/vs/workbench/browser/parts/editor/editorConfiguration.js +8 -8
  9. package/vscode/src/vs/workbench/browser/parts/paneCompositePartService.d.ts +3 -0
  10. package/vscode/src/vs/workbench/browser/parts/paneCompositePartService.js +14 -3
  11. package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchy.contribution.js +12 -12
  12. package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyPeek.js +3 -3
  13. package/vscode/src/vs/workbench/contrib/callHierarchy/browser/callHierarchyTree.js +4 -3
  14. package/vscode/src/vs/workbench/contrib/customEditor/common/contributedCustomEditors.js +1 -1
  15. package/vscode/src/vs/workbench/contrib/customEditor/common/customEditor.js +1 -1
  16. package/vscode/src/vs/workbench/contrib/customEditor/common/extensionPoint.js +10 -10
  17. package/vscode/src/vs/workbench/contrib/languageStatus/browser/languageStatus.js +7 -7
  18. package/vscode/src/vs/workbench/contrib/limitIndicator/browser/limitIndicator.contribution.js +8 -8
  19. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/commands.js +29 -29
  20. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/commands/devCommands.js +14 -14
  21. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditor.contribution.js +2 -2
  22. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorAccessibilityHelp.js +5 -5
  23. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/colors.js +13 -13
  24. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/conflictActions.js +20 -20
  25. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/baseCodeEditorView.js +3 -3
  26. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/codeEditorView.js +1 -1
  27. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/inputCodeEditorView.js +10 -10
  28. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/editors/resultCodeEditorView.js +3 -3
  29. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/mergeEditor.js +2 -2
  30. package/vscode/src/vs/workbench/contrib/mergeEditor/browser/view/viewModel.js +1 -1
  31. package/vscode/src/vs/workbench/contrib/preferences/browser/keyboardLayoutPicker.js +12 -12
  32. package/vscode/src/vs/workbench/contrib/sash/browser/sash.contribution.js +2 -2
  33. package/vscode/src/vs/workbench/contrib/scrollLocking/browser/scrollLocking.js +8 -8
  34. package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchy.contribution.js +10 -10
  35. package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyPeek.js +3 -3
  36. package/vscode/src/vs/workbench/contrib/typeHierarchy/browser/typeHierarchyTree.js +4 -3
  37. package/vscode/src/vs/workbench/contrib/webview/browser/overlayWebview.d.ts +6 -4
  38. package/vscode/src/vs/workbench/contrib/webview/browser/overlayWebview.js +19 -4
  39. package/vscode/src/vs/workbench/contrib/webview/browser/resourceLoading.d.ts +3 -1
  40. package/vscode/src/vs/workbench/contrib/webview/browser/resourceLoading.js +22 -14
  41. package/vscode/src/vs/workbench/contrib/webview/browser/themeing.js +11 -0
  42. package/vscode/src/vs/workbench/contrib/webview/browser/webviewElement.d.ts +3 -1
  43. package/vscode/src/vs/workbench/contrib/webview/browser/webviewElement.js +7 -4
  44. package/vscode/src/vs/workbench/contrib/webview/browser/webviewFindWidget.d.ts +3 -1
  45. package/vscode/src/vs/workbench/contrib/webview/browser/webviewFindWidget.js +7 -3
  46. package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewCommands.js +5 -5
  47. package/vscode/src/vs/workbench/contrib/webviewPanel/browser/webviewPanel.contribution.js +1 -1
  48. package/vscode/src/vs/workbench/services/editor/browser/editorResolverService.js +8 -8
  49. package/vscode/src/vs/workbench/services/history/browser/historyService.js +9 -9
  50. package/vscode/src/vs/workbench/services/progress/browser/progressService.d.ts +3 -1
  51. package/vscode/src/vs/workbench/services/progress/browser/progressService.js +14 -11
  52. package/vscode/src/vs/workbench/services/views/browser/viewDescriptorService.d.ts +7 -1
  53. package/vscode/src/vs/workbench/services/views/browser/viewDescriptorService.js +71 -14
  54. package/vscode/src/vs/workbench/services/views/browser/viewsService.d.ts +75 -0
  55. package/vscode/src/vs/workbench/services/views/browser/viewsService.js +711 -0
@@ -23,6 +23,7 @@ import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log
23
23
  import { INotificationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/notification/common/notification.service';
24
24
  import { IRemoteAuthorityResolverService } from '@codingame/monaco-vscode-api/vscode/vs/platform/remote/common/remoteAuthorityResolver.service';
25
25
  import { ITunnelService } from '@codingame/monaco-vscode-api/vscode/vs/platform/tunnel/common/tunnel.service';
26
+ import { IUriIdentityService } from '@codingame/monaco-vscode-api/vscode/vs/platform/uriIdentity/common/uriIdentity.service';
26
27
  import { WebviewPortMappingManager } from '../../../../platform/webview/common/webviewPortMapping.js';
27
28
  import { IWorkbenchEnvironmentService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/environment/common/environmentService.service';
28
29
  import { decodeAuthority, webviewRootResourceAuthority, webviewGenericCspSource } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/webview/common/webview';
@@ -85,7 +86,8 @@ let WebviewElement = class WebviewElement extends Disposable {
85
86
  _remoteAuthorityResolverService,
86
87
  _tunnelService,
87
88
  instantiationService,
88
- _accessibilityService
89
+ _accessibilityService,
90
+ _uriIdentityService
89
91
  ) {
90
92
  super();
91
93
  this.webviewThemeDataProvider = webviewThemeDataProvider;
@@ -95,6 +97,7 @@ let WebviewElement = class WebviewElement extends Disposable {
95
97
  this._remoteAuthorityResolverService = _remoteAuthorityResolverService;
96
98
  this._tunnelService = _tunnelService;
97
99
  this._accessibilityService = _accessibilityService;
100
+ this._uriIdentityService = _uriIdentityService;
98
101
  this.id = generateUuid();
99
102
  this._windowId = undefined;
100
103
  this._expectedServiceWorkerVersion = 4;
@@ -202,7 +205,7 @@ let WebviewElement = class WebviewElement extends Disposable {
202
205
  this._hasFindResult.fire(didFind);
203
206
  }));
204
207
  this._register(this.on("fatal-error", e => {
205
- notificationService.error(( localize(13710, "Error loading webview: {0}", e.message)));
208
+ notificationService.error(( localize(14607, "Error loading webview: {0}", e.message)));
206
209
  this._onFatalError.fire({
207
210
  message: e.message
208
211
  });
@@ -664,7 +667,7 @@ let WebviewElement = class WebviewElement extends Disposable {
664
667
  const result = await loadLocalResource(uri, {
665
668
  ifNoneMatch,
666
669
  roots: this._content.options.localResourceRoots || []
667
- }, this._fileService, this._logService, this._resourceLoadingCts.token);
670
+ }, this._uriIdentityService, this._fileService, this._logService, this._resourceLoadingCts.token);
668
671
  switch (result.type) {
669
672
  case WebviewResourceResponse.Type.Success:
670
673
  {
@@ -780,6 +783,6 @@ let WebviewElement = class WebviewElement extends Disposable {
780
783
  this._webviewFindWidget?.find(previous);
781
784
  }
782
785
  };
783
- WebviewElement = ( __decorate([( __param(2, IConfigurationService)), ( __param(3, IContextMenuService)), ( __param(4, INotificationService)), ( __param(5, IWorkbenchEnvironmentService)), ( __param(6, IFileService)), ( __param(7, ILogService)), ( __param(8, IRemoteAuthorityResolverService)), ( __param(9, ITunnelService)), ( __param(10, IInstantiationService)), ( __param(11, IAccessibilityService))], WebviewElement));
786
+ WebviewElement = ( __decorate([( __param(2, IConfigurationService)), ( __param(3, IContextMenuService)), ( __param(4, INotificationService)), ( __param(5, IWorkbenchEnvironmentService)), ( __param(6, IFileService)), ( __param(7, ILogService)), ( __param(8, IRemoteAuthorityResolverService)), ( __param(9, ITunnelService)), ( __param(10, IInstantiationService)), ( __param(11, IAccessibilityService)), ( __param(12, IUriIdentityService))], WebviewElement));
784
787
 
785
788
  export { WebviewElement };
@@ -4,6 +4,8 @@ import { IContextKeyService } from "@codingame/monaco-vscode-api/vscode/vs/platf
4
4
  import { IContextViewService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextview/browser/contextView.service";
5
5
  import { IHoverService } from "@codingame/monaco-vscode-api/vscode/vs/platform/hover/browser/hover.service";
6
6
  import { IKeybindingService } from "@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service";
7
+ import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
8
+ import { IAccessibilityService } from "@codingame/monaco-vscode-api/vscode/vs/platform/accessibility/common/accessibility.service";
7
9
  import { SimpleFindWidget } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget";
8
10
  export interface WebviewFindDelegate {
9
11
  readonly hasFindResult: Event<boolean>;
@@ -21,7 +23,7 @@ export declare class WebviewFindWidget extends SimpleFindWidget {
21
23
  resultCount: number;
22
24
  } | undefined>;
23
25
  protected readonly _findWidgetFocused: IContextKey<boolean>;
24
- constructor(_delegate: WebviewFindDelegate, contextViewService: IContextViewService, contextKeyService: IContextKeyService, hoverService: IHoverService, keybindingService: IKeybindingService);
26
+ constructor(_delegate: WebviewFindDelegate, contextViewService: IContextViewService, contextKeyService: IContextKeyService, hoverService: IHoverService, keybindingService: IKeybindingService, configurationService: IConfigurationService, accessibilityService: IAccessibilityService);
25
27
  find(previous: boolean): void;
26
28
  hide(animated?: boolean): void;
27
29
  protected _onInputChanged(): boolean;
@@ -4,6 +4,8 @@ import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platf
4
4
  import { IContextViewService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextview/browser/contextView.service';
5
5
  import { IHoverService } from '@codingame/monaco-vscode-api/vscode/vs/platform/hover/browser/hover.service';
6
6
  import { IKeybindingService } from '@codingame/monaco-vscode-api/vscode/vs/platform/keybinding/common/keybinding.service';
7
+ import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
8
+ import { IAccessibilityService } from '@codingame/monaco-vscode-api/vscode/vs/platform/accessibility/common/accessibility.service';
7
9
  import { SimpleFindWidget } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget';
8
10
  import { KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_FOCUSED } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/webview/browser/webview';
9
11
 
@@ -16,13 +18,15 @@ let WebviewFindWidget = class WebviewFindWidget extends SimpleFindWidget {
16
18
  contextViewService,
17
19
  contextKeyService,
18
20
  hoverService,
19
- keybindingService
21
+ keybindingService,
22
+ configurationService,
23
+ accessibilityService
20
24
  ) {
21
25
  super({
22
26
  showCommonFindToggles: false,
23
27
  checkImeCompletionState: _delegate.checkImeCompletionState,
24
28
  enableSash: true
25
- }, contextViewService, contextKeyService, hoverService, keybindingService);
29
+ }, contextViewService, contextKeyService, hoverService, keybindingService, configurationService, accessibilityService);
26
30
  this._delegate = _delegate;
27
31
  this._findWidgetFocused = KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_FOCUSED.bindTo(contextKeyService);
28
32
  this._register(_delegate.hasFindResult(hasResult => {
@@ -63,6 +67,6 @@ let WebviewFindWidget = class WebviewFindWidget extends SimpleFindWidget {
63
67
  _onFindInputFocusTrackerBlur() {}
64
68
  findFirst() {}
65
69
  };
66
- WebviewFindWidget = ( __decorate([( __param(1, IContextViewService)), ( __param(2, IContextKeyService)), ( __param(3, IHoverService)), ( __param(4, IKeybindingService))], WebviewFindWidget));
70
+ WebviewFindWidget = ( __decorate([( __param(1, IContextViewService)), ( __param(2, IContextKeyService)), ( __param(3, IHoverService)), ( __param(4, IKeybindingService)), ( __param(5, IConfigurationService)), ( __param(6, IAccessibilityService))], WebviewFindWidget));
67
71
 
68
72
  export { WebviewFindWidget };
@@ -18,7 +18,7 @@ class ShowWebViewEditorFindWidgetAction extends Action2 {
18
18
  this.ID = "editor.action.webvieweditor.showFind";
19
19
  }
20
20
  static {
21
- this.LABEL = ( localize(13711, "Show find"));
21
+ this.LABEL = ( localize(14638, "Show find"));
22
22
  }
23
23
  constructor() {
24
24
  super({
@@ -43,7 +43,7 @@ class HideWebViewEditorFindCommand extends Action2 {
43
43
  this.ID = "editor.action.webvieweditor.hideFind";
44
44
  }
45
45
  static {
46
- this.LABEL = ( localize(13712, "Stop find"));
46
+ this.LABEL = ( localize(14639, "Stop find"));
47
47
  }
48
48
  constructor() {
49
49
  super({
@@ -68,7 +68,7 @@ class WebViewEditorFindNextCommand extends Action2 {
68
68
  this.ID = "editor.action.webvieweditor.findNext";
69
69
  }
70
70
  static {
71
- this.LABEL = ( localize(13713, "Find next"));
71
+ this.LABEL = ( localize(14640, "Find next"));
72
72
  }
73
73
  constructor() {
74
74
  super({
@@ -93,7 +93,7 @@ class WebViewEditorFindPreviousCommand extends Action2 {
93
93
  this.ID = "editor.action.webvieweditor.findPrevious";
94
94
  }
95
95
  static {
96
- this.LABEL = ( localize(13714, "Find previous"));
96
+ this.LABEL = ( localize(14641, "Find previous"));
97
97
  }
98
98
  constructor() {
99
99
  super({
@@ -118,7 +118,7 @@ class ReloadWebviewAction extends Action2 {
118
118
  this.ID = "workbench.action.webview.reloadWebviewAction";
119
119
  }
120
120
  static {
121
- this.LABEL = ( localize2(13715, "Reload Webviews"));
121
+ this.LABEL = ( localize2(14642, "Reload Webviews"));
122
122
  }
123
123
  constructor() {
124
124
  super({
@@ -19,7 +19,7 @@ import '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/ins
19
19
  import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
20
20
 
21
21
  ( Registry.as(EditorExtensions.EditorPane)).registerEditorPane(
22
- EditorPaneDescriptor.create(WebviewEditor, WebviewEditor.ID, ( localize(13717, "webview editor"))),
22
+ EditorPaneDescriptor.create(WebviewEditor, WebviewEditor.ID, ( localize(14644, "webview editor"))),
23
23
  [( new SyncDescriptor(WebviewInput))]
24
24
  );
25
25
  let WebviewPanelContribution = class WebviewPanelContribution extends Disposable {
@@ -560,8 +560,8 @@ let EditorResolverService = class EditorResolverService extends Disposable {
560
560
  if (storedChoices[globForResource]?.find(editorID => editorID === currentEditor.editorId)) {
561
561
  return;
562
562
  }
563
- const handle = this.notificationService.prompt(Severity.Warning, ( localize(14461, "There are multiple default editors available for the resource.")), [{
564
- label: ( localize(14462, "Configure Default")),
563
+ const handle = this.notificationService.prompt(Severity.Warning, ( localize(15389, "There are multiple default editors available for the resource.")), [{
564
+ label: ( localize(15390, "Configure Default")),
565
565
  run: async () => {
566
566
  const picked = await this.doPickEditor(untypedInput, true);
567
567
  if (!picked) {
@@ -579,7 +579,7 @@ let EditorResolverService = class EditorResolverService extends Disposable {
579
579
  }]);
580
580
  }
581
581
  }, {
582
- label: ( localize(14463, "Keep {0}", editorName)),
582
+ label: ( localize(15391, "Keep {0}", editorName)),
583
583
  run: writeCurrentEditorsToStorage
584
584
  }]);
585
585
  const onCloseListener = handle.onDidClose(() => {
@@ -602,9 +602,9 @@ let EditorResolverService = class EditorResolverService extends Disposable {
602
602
  }
603
603
  });
604
604
  const quickPickEntries = [];
605
- const currentlyActiveLabel = ( localize(14464, "Active"));
606
- const currentDefaultLabel = ( localize(14465, "Default"));
607
- const currentDefaultAndActiveLabel = ( localize(14466, "Active and Default"));
605
+ const currentlyActiveLabel = ( localize(15392, "Active"));
606
+ const currentDefaultLabel = ( localize(15393, "Default"));
607
+ const currentDefaultAndActiveLabel = ( localize(15394, "Active and Default"));
608
608
  let defaultViewType = defaultSetting;
609
609
  if (!defaultViewType && registeredEditors.length > 2 && registeredEditors[1]?.editorInfo.priority !== RegisteredEditorPriority.option) {
610
610
  defaultViewType = registeredEditors[1]?.editorInfo.id;
@@ -631,7 +631,7 @@ let EditorResolverService = class EditorResolverService extends Disposable {
631
631
  quickPickEntries.push(separator);
632
632
  const configureDefaultEntry = {
633
633
  id: EditorResolverService_1.configureDefaultID,
634
- label: ( localize(14467, "Configure default editor for '{0}'...", `*${extname(resource)}`))
634
+ label: ( localize(15395, "Configure default editor for '{0}'...", `*${extname(resource)}`))
635
635
  };
636
636
  quickPickEntries.push(configureDefaultEntry);
637
637
  }
@@ -651,7 +651,7 @@ let EditorResolverService = class EditorResolverService extends Disposable {
651
651
  const editorPicker = disposables.add(this.quickInputService.createQuickPick({
652
652
  useSeparators: true
653
653
  }));
654
- const placeHolderMessage = showDefaultPicker ? ( localize(14468, "Select new default editor for '{0}'", `*${extname(resource)}`)) : ( localize(14469, "Select editor for '{0}'", basename(resource)));
654
+ const placeHolderMessage = showDefaultPicker ? ( localize(15396, "Select new default editor for '{0}'", `*${extname(resource)}`)) : ( localize(15397, "Select editor for '{0}'", basename(resource)));
655
655
  editorPicker.placeholder = placeHolderMessage;
656
656
  editorPicker.canAcceptInBackground = true;
657
657
  editorPicker.items = editorPicks;
@@ -101,33 +101,33 @@ let HistoryService = class HistoryService extends Disposable {
101
101
  return matcher;
102
102
  })));
103
103
  this.editorHelper = this.instantiationService.createInstance(EditorHelper);
104
- this.canNavigateBackContextKey = ( new RawContextKey("canNavigateBack", false, ( localize(14683, "Whether it is possible to navigate back in editor history")))).bindTo(this.contextKeyService);
105
- this.canNavigateForwardContextKey = ( new RawContextKey("canNavigateForward", false, ( localize(14684, "Whether it is possible to navigate forward in editor history")))).bindTo(this.contextKeyService);
104
+ this.canNavigateBackContextKey = ( new RawContextKey("canNavigateBack", false, ( localize(15611, "Whether it is possible to navigate back in editor history")))).bindTo(this.contextKeyService);
105
+ this.canNavigateForwardContextKey = ( new RawContextKey("canNavigateForward", false, ( localize(15612, "Whether it is possible to navigate forward in editor history")))).bindTo(this.contextKeyService);
106
106
  this.canNavigateBackInNavigationsContextKey = ( new RawContextKey("canNavigateBackInNavigationLocations", false, ( localize(
107
- 14685,
107
+ 15613,
108
108
  "Whether it is possible to navigate back in editor navigation locations history"
109
109
  )))).bindTo(this.contextKeyService);
110
110
  this.canNavigateForwardInNavigationsContextKey = ( new RawContextKey("canNavigateForwardInNavigationLocations", false, ( localize(
111
- 14686,
111
+ 15614,
112
112
  "Whether it is possible to navigate forward in editor navigation locations history"
113
113
  )))).bindTo(this.contextKeyService);
114
114
  this.canNavigateToLastNavigationLocationContextKey = ( new RawContextKey("canNavigateToLastNavigationLocation", false, ( localize(
115
- 14687,
115
+ 15615,
116
116
  "Whether it is possible to navigate to the last editor navigation location"
117
117
  )))).bindTo(this.contextKeyService);
118
118
  this.canNavigateBackInEditsContextKey = ( new RawContextKey("canNavigateBackInEditLocations", false, ( localize(
119
- 14688,
119
+ 15616,
120
120
  "Whether it is possible to navigate back in editor edit locations history"
121
121
  )))).bindTo(this.contextKeyService);
122
122
  this.canNavigateForwardInEditsContextKey = ( new RawContextKey("canNavigateForwardInEditLocations", false, ( localize(
123
- 14689,
123
+ 15617,
124
124
  "Whether it is possible to navigate forward in editor edit locations history"
125
125
  )))).bindTo(this.contextKeyService);
126
126
  this.canNavigateToLastEditLocationContextKey = ( new RawContextKey("canNavigateToLastEditLocation", false, ( localize(
127
- 14690,
127
+ 15618,
128
128
  "Whether it is possible to navigate to the last editor edit location"
129
129
  )))).bindTo(this.contextKeyService);
130
- this.canReopenClosedEditorContextKey = ( new RawContextKey("canReopenClosedEditor", false, ( localize(14691, "Whether it is possible to reopen the last closed editor")))).bindTo(this.contextKeyService);
130
+ this.canReopenClosedEditorContextKey = ( new RawContextKey("canReopenClosedEditor", false, ( localize(15619, "Whether it is possible to reopen the last closed editor")))).bindTo(this.contextKeyService);
131
131
  this.registerListeners();
132
132
  if (this.editorService.activeEditorPane) {
133
133
  this.onDidActiveEditorChange();
@@ -10,6 +10,7 @@ import { IViewDescriptorService } from "@codingame/monaco-vscode-api/vscode/vs/w
10
10
  import { IViewsService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/views/common/viewsService.service";
11
11
  import { IPaneCompositePartService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/panecomposite/browser/panecomposite.service";
12
12
  import { IUserActivityService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/userActivity/common/userActivityService.service";
13
+ import { IHostService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/host/browser/host.service";
13
14
  export declare class ProgressService extends Disposable implements IProgressService {
14
15
  private readonly activityService;
15
16
  private readonly paneCompositeService;
@@ -20,8 +21,9 @@ export declare class ProgressService extends Disposable implements IProgressServ
20
21
  private readonly layoutService;
21
22
  private readonly keybindingService;
22
23
  private readonly userActivityService;
24
+ private readonly hostService;
23
25
  readonly _serviceBrand: undefined;
24
- constructor(activityService: IActivityService, paneCompositeService: IPaneCompositePartService, viewDescriptorService: IViewDescriptorService, viewsService: IViewsService, notificationService: INotificationService, statusbarService: IStatusbarService, layoutService: ILayoutService, keybindingService: IKeybindingService, userActivityService: IUserActivityService);
26
+ constructor(activityService: IActivityService, paneCompositeService: IPaneCompositePartService, viewDescriptorService: IViewDescriptorService, viewsService: IViewsService, notificationService: INotificationService, statusbarService: IStatusbarService, layoutService: ILayoutService, keybindingService: IKeybindingService, userActivityService: IUserActivityService, hostService: IHostService);
25
27
  withProgress<R = unknown>(options: IProgressOptions, originalTask: (progress: IProgress<IProgressStep>) => Promise<R>, onDidCancel?: (choice?: number) => void): Promise<R>;
26
28
  private readonly windowProgressStack;
27
29
  private windowProgressStatusEntry;
@@ -26,7 +26,8 @@ import { IViewsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/
26
26
  import { IPaneCompositePartService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/panecomposite/browser/panecomposite.service';
27
27
  import { stripIcons } from '@codingame/monaco-vscode-api/vscode/vs/base/common/iconLabels';
28
28
  import { IUserActivityService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/userActivity/common/userActivityService.service';
29
- import { createWorkbenchDialogOptions } from '@codingame/monaco-vscode-api/vscode/vs/platform/dialogs/browser/dialog';
29
+ import { createWorkbenchDialogOptions } from '@codingame/monaco-vscode-api/vscode/vs/workbench/browser/parts/dialogs/dialog';
30
+ import { IHostService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/host/browser/host.service';
30
31
  import Severity from '@codingame/monaco-vscode-api/vscode/vs/base/common/severity';
31
32
 
32
33
  registerCss(progressService);
@@ -40,7 +41,8 @@ let ProgressService = class ProgressService extends Disposable {
40
41
  statusbarService,
41
42
  layoutService,
42
43
  keybindingService,
43
- userActivityService
44
+ userActivityService,
45
+ hostService
44
46
  ) {
45
47
  super();
46
48
  this.activityService = activityService;
@@ -52,6 +54,7 @@ let ProgressService = class ProgressService extends Disposable {
52
54
  this.layoutService = layoutService;
53
55
  this.keybindingService = keybindingService;
54
56
  this.userActivityService = userActivityService;
57
+ this.hostService = hostService;
55
58
  this.windowProgressStack = [];
56
59
  this.windowProgressStatusEntry = undefined;
57
60
  }
@@ -170,20 +173,20 @@ let ProgressService = class ProgressService extends Disposable {
170
173
  let title;
171
174
  const source = options.source && typeof options.source !== "string" ? options.source.label : options.source;
172
175
  if (progressTitle && progressMessage) {
173
- text = ( localize(14820, "{0}: {1}", progressTitle, progressMessage));
174
- title = source ? ( localize(14821, "[{0}] {1}: {2}", source, progressTitle, progressMessage)) : text;
176
+ text = ( localize(15747, "{0}: {1}", progressTitle, progressMessage));
177
+ title = source ? ( localize(15748, "[{0}] {1}: {2}", source, progressTitle, progressMessage)) : text;
175
178
  } else if (progressTitle) {
176
179
  text = progressTitle;
177
- title = source ? ( localize(14822, "[{0}]: {1}", source, progressTitle)) : text;
180
+ title = source ? ( localize(15749, "[{0}]: {1}", source, progressTitle)) : text;
178
181
  } else if (progressMessage) {
179
182
  text = progressMessage;
180
- title = source ? ( localize(14822, "[{0}]: {1}", source, progressMessage)) : text;
183
+ title = source ? ( localize(15749, "[{0}]: {1}", source, progressMessage)) : text;
181
184
  } else {
182
185
  this.updateWindowProgress(idx + 1);
183
186
  return;
184
187
  }
185
188
  const statusEntryProperties = {
186
- name: ( localize(14823, "Progress Message")),
189
+ name: ( localize(15750, "Progress Message")),
187
190
  text,
188
191
  showProgress: options.type || true,
189
192
  ariaLabel: text,
@@ -289,7 +292,7 @@ let ProgressService = class ProgressService extends Disposable {
289
292
  constructor() {
290
293
  super(
291
294
  "progress.cancel",
292
- typeof options.cancellable === "string" ? options.cancellable : ( localize(14824, "Cancel")),
295
+ typeof options.cancellable === "string" ? options.cancellable : ( localize(15751, "Cancel")),
293
296
  undefined,
294
297
  true
295
298
  );
@@ -481,7 +484,7 @@ let ProgressService = class ProgressService extends Disposable {
481
484
  const buttons = options.buttons || [];
482
485
  if (!options.sticky) {
483
486
  buttons.push(
484
- options.cancellable ? (typeof options.cancellable === "boolean" ? ( localize(14824, "Cancel")) : options.cancellable) : ( localize(14825, "Dismiss"))
487
+ options.cancellable ? (typeof options.cancellable === "boolean" ? ( localize(15751, "Cancel")) : options.cancellable) : ( localize(15752, "Dismiss"))
485
488
  );
486
489
  }
487
490
  dialog = ( new Dialog(
@@ -494,7 +497,7 @@ let ProgressService = class ProgressService extends Disposable {
494
497
  cancelId: buttons.length - 1,
495
498
  disableCloseAction: options.sticky,
496
499
  disableDefaultAction: options.sticky
497
- }, this.keybindingService, this.layoutService)
500
+ }, this.keybindingService, this.layoutService, this.hostService)
498
501
  ));
499
502
  disposables.add(dialog);
500
503
  dialog.show().then(dialogResult => {
@@ -536,6 +539,6 @@ let ProgressService = class ProgressService extends Disposable {
536
539
  return promise;
537
540
  }
538
541
  };
539
- ProgressService = ( __decorate([( __param(0, IActivityService)), ( __param(1, IPaneCompositePartService)), ( __param(2, IViewDescriptorService)), ( __param(3, IViewsService)), ( __param(4, INotificationService)), ( __param(5, IStatusbarService)), ( __param(6, ILayoutService)), ( __param(7, IKeybindingService)), ( __param(8, IUserActivityService))], ProgressService));
542
+ ProgressService = ( __decorate([( __param(0, IActivityService)), ( __param(1, IPaneCompositePartService)), ( __param(2, IViewDescriptorService)), ( __param(3, IViewsService)), ( __param(4, INotificationService)), ( __param(5, IStatusbarService)), ( __param(6, ILayoutService)), ( __param(7, IKeybindingService)), ( __param(8, IUserActivityService)), ( __param(9, IHostService))], ProgressService));
540
543
 
541
544
  export { ProgressService };
@@ -9,6 +9,7 @@ import { ITelemetryService } from "@codingame/monaco-vscode-api/vscode/vs/platfo
9
9
  import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
10
10
  import { ViewContainerModel } from "../common/viewContainerModel.js";
11
11
  import { ILoggerService } from "@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service";
12
+ import { IWorkbenchEnvironmentService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/environment/common/environmentService.service";
12
13
  export declare class ViewDescriptorService extends Disposable implements IViewDescriptorService {
13
14
  private readonly instantiationService;
14
15
  private readonly contextKeyService;
@@ -61,7 +62,8 @@ export declare class ViewDescriptorService extends Disposable implements IViewDe
61
62
  }>;
62
63
  get viewContainers(): ReadonlyArray<ViewContainer>;
63
64
  private readonly logger;
64
- constructor(instantiationService: IInstantiationService, contextKeyService: IContextKeyService, storageService: IStorageService, extensionService: IExtensionService, telemetryService: ITelemetryService, loggerService: ILoggerService);
65
+ private readonly isSessionsWindow;
66
+ constructor(instantiationService: IInstantiationService, contextKeyService: IContextKeyService, storageService: IStorageService, extensionService: IExtensionService, telemetryService: ITelemetryService, loggerService: ILoggerService, environmentService: IWorkbenchEnvironmentService);
65
67
  private migrateToViewsCustomizationsStorage;
66
68
  private registerGroupedViews;
67
69
  private deregisterGroupedViews;
@@ -76,11 +78,15 @@ export declare class ViewDescriptorService extends Disposable implements IViewDe
76
78
  getViewContainerByViewId(viewId: string): ViewContainer | null;
77
79
  getViewContainerLocation(viewContainer: ViewContainer): ViewContainerLocation;
78
80
  getDefaultViewContainerLocation(viewContainer: ViewContainer): ViewContainerLocation;
81
+ private getEffectiveViewContainerLocation;
79
82
  getDefaultContainerById(viewId: string): ViewContainer | null;
80
83
  getViewContainerModel(container: ViewContainer): ViewContainerModel;
81
84
  getViewContainerById(id: string): ViewContainer | null;
82
85
  getViewContainersByLocation(location: ViewContainerLocation): ViewContainer[];
86
+ private isViewContainerVisible;
87
+ private isViewVisible;
83
88
  getDefaultViewContainer(location: ViewContainerLocation): ViewContainer | undefined;
89
+ canMoveViews(): boolean;
84
90
  moveViewContainerToLocation(viewContainer: ViewContainer, location: ViewContainerLocation, requestedIndex?: number, reason?: string): void;
85
91
  getViewContainerBadgeEnablementState(id: string): boolean;
86
92
  setViewContainerBadgeEnablementState(id: string, badgesEnabled: boolean): void;
@@ -1,6 +1,6 @@
1
1
 
2
2
  import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
3
- import { VIEWS_LOG_ID, VIEWS_LOG_NAME, Extensions, ViewContainerLocation, ViewVisibilityState, defaultViewIcon, ViewContainerLocationToString } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/views';
3
+ import { VIEWS_LOG_ID, VIEWS_LOG_NAME, Extensions, ViewContainerLocation, WindowVisibility, ViewVisibilityState, defaultViewIcon, ViewContainerLocationToString } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/views';
4
4
  import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
5
5
  import { ContextKeyExpr, RawContextKey } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey';
6
6
  import { IContextKeyService } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service';
@@ -22,6 +22,7 @@ import { ILoggerService } from '@codingame/monaco-vscode-api/vscode/vs/platform/
22
22
  import { Lazy } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lazy';
23
23
  import { IViewsService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/views/common/viewsService.service';
24
24
  import { windowLogGroup } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/log/common/logConstants';
25
+ import { IWorkbenchEnvironmentService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/environment/common/environmentService.service';
25
26
 
26
27
  var ViewDescriptorService_1;
27
28
  function getViewContainerStorageId(viewContainerId) {
@@ -46,7 +47,8 @@ let ViewDescriptorService = class ViewDescriptorService extends Disposable {
46
47
  storageService,
47
48
  extensionService,
48
49
  telemetryService,
49
- loggerService
50
+ loggerService,
51
+ environmentService
50
52
  ) {
51
53
  super();
52
54
  this.instantiationService = instantiationService;
@@ -69,6 +71,7 @@ let ViewDescriptorService = class ViewDescriptorService extends Disposable {
69
71
  name: VIEWS_LOG_NAME,
70
72
  group: windowLogGroup
71
73
  })));
74
+ this.isSessionsWindow = environmentService.isSessionsWindow;
72
75
  this.activeViewContextKeys = ( new Map());
73
76
  this.movableViewContextKeys = ( new Map());
74
77
  this.defaultViewLocationContextKeys = ( new Map());
@@ -259,7 +262,11 @@ let ViewDescriptorService = class ViewDescriptorService extends Disposable {
259
262
  return viewsByContainer;
260
263
  }
261
264
  getViewDescriptorById(viewId) {
262
- return this.viewsRegistry.getView(viewId);
265
+ const view = this.viewsRegistry.getView(viewId);
266
+ if (view && !this.isViewVisible(view)) {
267
+ return null;
268
+ }
269
+ return view;
263
270
  }
264
271
  getViewLocationById(viewId) {
265
272
  const container = this.getViewContainerByViewId(viewId);
@@ -269,14 +276,25 @@ let ViewDescriptorService = class ViewDescriptorService extends Disposable {
269
276
  return this.getViewContainerLocation(container);
270
277
  }
271
278
  getViewContainerByViewId(viewId) {
279
+ const view = this.viewsRegistry.getView(viewId);
280
+ if (view && !this.isViewVisible(view)) {
281
+ return null;
282
+ }
272
283
  const containerId = this.viewDescriptorsCustomLocations.get(viewId);
273
284
  return containerId ? this.viewContainersRegistry.get(containerId) ?? null : this.getDefaultContainerById(viewId);
274
285
  }
275
286
  getViewContainerLocation(viewContainer) {
276
- return this.viewContainersCustomLocations.get(viewContainer.id) ?? this.getDefaultViewContainerLocation(viewContainer);
287
+ const location = this.viewContainersCustomLocations.get(viewContainer.id) ?? this.getDefaultViewContainerLocation(viewContainer);
288
+ return this.getEffectiveViewContainerLocation(location);
277
289
  }
278
290
  getDefaultViewContainerLocation(viewContainer) {
279
- return this.viewContainersRegistry.getViewContainerLocation(viewContainer);
291
+ return this.getEffectiveViewContainerLocation(this.viewContainersRegistry.getViewContainerLocation(viewContainer));
292
+ }
293
+ getEffectiveViewContainerLocation(location) {
294
+ if (!this.isSessionsWindow && location === ViewContainerLocation.ChatBar) {
295
+ return ViewContainerLocation.AuxiliaryBar;
296
+ }
297
+ return location;
280
298
  }
281
299
  getDefaultContainerById(viewId) {
282
300
  return this.viewsRegistry.getViewContainer(viewId) ?? null;
@@ -285,15 +303,42 @@ let ViewDescriptorService = class ViewDescriptorService extends Disposable {
285
303
  return this.getOrRegisterViewContainerModel(container);
286
304
  }
287
305
  getViewContainerById(id) {
288
- return this.viewContainersRegistry.get(id) || null;
306
+ const viewContainer = this.viewContainersRegistry.get(id) || null;
307
+ if (viewContainer && !this.isViewContainerVisible(viewContainer)) {
308
+ return null;
309
+ }
310
+ return viewContainer;
289
311
  }
290
312
  getViewContainersByLocation(location) {
291
- return this.viewContainers.filter(v => this.getViewContainerLocation(v) === location);
313
+ return this.viewContainers.filter(
314
+ v => this.getViewContainerLocation(v) === location && this.isViewContainerVisible(v)
315
+ );
316
+ }
317
+ isViewContainerVisible(viewContainer) {
318
+ const layoutVisibility = viewContainer.windowVisibility;
319
+ if (this.isSessionsWindow) {
320
+ return layoutVisibility === WindowVisibility.Sessions || layoutVisibility === WindowVisibility.Both;
321
+ }
322
+ return !layoutVisibility || layoutVisibility === WindowVisibility.Editor || layoutVisibility === WindowVisibility.Both;
323
+ }
324
+ isViewVisible(view) {
325
+ const layoutVisibility = view.windowVisibility;
326
+ if (this.isSessionsWindow) {
327
+ return layoutVisibility === WindowVisibility.Sessions || layoutVisibility === WindowVisibility.Both;
328
+ }
329
+ return !layoutVisibility || layoutVisibility === WindowVisibility.Editor || layoutVisibility === WindowVisibility.Both;
292
330
  }
293
331
  getDefaultViewContainer(location) {
294
- return this.viewContainersRegistry.getDefaultViewContainer(location);
332
+ const viewContainers = this.viewContainersRegistry.getDefaultViewContainers(location);
333
+ return viewContainers.find(viewContainer => this.isViewContainerVisible(viewContainer));
334
+ }
335
+ canMoveViews() {
336
+ return !this.isSessionsWindow;
295
337
  }
296
338
  moveViewContainerToLocation(viewContainer, location, requestedIndex, reason) {
339
+ if (!this.canMoveViews()) {
340
+ return;
341
+ }
297
342
  this.logger.value.trace(
298
343
  `moveViewContainerToLocation: viewContainer:${viewContainer.id} location:${location} reason:${reason}`
299
344
  );
@@ -308,6 +353,9 @@ let ViewDescriptorService = class ViewDescriptorService extends Disposable {
308
353
  this.saveViewCustomizations();
309
354
  }
310
355
  moveViewToLocation(view, location, reason) {
356
+ if (!this.canMoveViews()) {
357
+ return;
358
+ }
311
359
  this.logger.value.trace(
312
360
  `moveViewToLocation: view:${view.id} location:${location} reason:${reason}`
313
361
  );
@@ -318,6 +366,9 @@ let ViewDescriptorService = class ViewDescriptorService extends Disposable {
318
366
  if (!views.length) {
319
367
  return;
320
368
  }
369
+ if (!this.canMoveViews()) {
370
+ return;
371
+ }
321
372
  this.logger.value.trace(`moveViewsToContainer: views:${( views.map(view => view.id)).join(",")} viewContainer:${viewContainer.id} reason:${reason}`);
322
373
  const from = this.getViewContainerByViewId(views[0].id);
323
374
  const to = viewContainer;
@@ -458,7 +509,7 @@ let ViewDescriptorService = class ViewDescriptorService extends Disposable {
458
509
  mergeViewWithContainerWhenSingleView: true
459
510
  }])),
460
511
  title: {
461
- value: ( localize(15199, "User View Container")),
512
+ value: ( localize(16126, "User View Container")),
462
513
  original: "User View Container"
463
514
  },
464
515
  icon: location === ViewContainerLocation.Sidebar ? defaultViewIcon : undefined,
@@ -597,9 +648,15 @@ let ViewDescriptorService = class ViewDescriptorService extends Disposable {
597
648
  }
598
649
  }
599
650
  getStoredViewCustomizationsValue() {
651
+ if (this.isSessionsWindow) {
652
+ return "{}";
653
+ }
600
654
  return this.storageService.get(ViewDescriptorService_1.VIEWS_CUSTOMIZATIONS, StorageScope.PROFILE, "{}");
601
655
  }
602
656
  setStoredViewCustomizationsValue(value) {
657
+ if (this.isSessionsWindow) {
658
+ return;
659
+ }
603
660
  this.storageService.store(
604
661
  ViewDescriptorService_1.VIEWS_CUSTOMIZATIONS,
605
662
  value,
@@ -765,7 +822,7 @@ let ViewDescriptorService = class ViewDescriptorService extends Disposable {
765
822
  title: viewDescriptor.name,
766
823
  metadata: {
767
824
  description: ( localize2(
768
- 15200,
825
+ 16127,
769
826
  "Toggles the visibility of the {0} view if the view container it is located in is visible",
770
827
  viewDescriptor.name.value
771
828
  ))
@@ -796,10 +853,10 @@ let ViewDescriptorService = class ViewDescriptorService extends Disposable {
796
853
  super({
797
854
  id: `${viewDescriptor.id}.removeView`,
798
855
  viewPaneContainerId: viewContainerModel.viewContainer.id,
799
- title: ( localize(15201, "Hide '{0}'", viewDescriptor.name.value)),
856
+ title: ( localize(16128, "Hide '{0}'", viewDescriptor.name.value)),
800
857
  metadata: {
801
858
  description: ( localize2(
802
- 15202,
859
+ 16129,
803
860
  "Hides the {0} view if it is visible and the view container it is located in is visible",
804
861
  viewDescriptor.name.value
805
862
  ))
@@ -829,7 +886,7 @@ let ViewDescriptorService = class ViewDescriptorService extends Disposable {
829
886
  constructor() {
830
887
  super({
831
888
  id: `${viewContainer.id}.resetViewContainerLocation`,
832
- title: ( localize2(15203, "Reset Location")),
889
+ title: ( localize2(16130, "Reset Location")),
833
890
  menu: [{
834
891
  id: MenuId.ViewContainerTitleContext,
835
892
  group: "1_viewActions",
@@ -925,6 +982,6 @@ let ViewDescriptorService = class ViewDescriptorService extends Disposable {
925
982
  return contextKey;
926
983
  }
927
984
  };
928
- ViewDescriptorService = ViewDescriptorService_1 = ( __decorate([( __param(0, IInstantiationService)), ( __param(1, IContextKeyService)), ( __param(2, IStorageService)), ( __param(3, IExtensionService)), ( __param(4, ITelemetryService)), ( __param(5, ILoggerService))], ViewDescriptorService));
985
+ ViewDescriptorService = ViewDescriptorService_1 = ( __decorate([( __param(0, IInstantiationService)), ( __param(1, IContextKeyService)), ( __param(2, IStorageService)), ( __param(3, IExtensionService)), ( __param(4, ITelemetryService)), ( __param(5, ILoggerService)), ( __param(6, IWorkbenchEnvironmentService))], ViewDescriptorService));
929
986
 
930
987
  export { ViewDescriptorService };