@codingame/monaco-vscode-workbench-service-override 36.2.7 → 37.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +3 -0
- package/package.json +8 -8
- package/vscode/src/vs/workbench/browser/layout.d.ts +4 -0
- package/vscode/src/vs/workbench/browser/layout.js +49 -7
- package/vscode/src/vs/workbench/browser/workbench.js +1 -1
- package/vscode/src/vs/workbench/services/workspaces/common/workspaceFolderLabelService.d.ts +6 -0
- package/vscode/src/vs/workbench/services/workspaces/common/workspaceFolderLabelService.js +11 -0
- package/vscode/src/vs/workbench/browser/parts/notifications/notificationAccessibleView.d.ts +0 -10
- package/vscode/src/vs/workbench/browser/parts/notifications/notificationAccessibleView.js +0 -126
package/index.js
CHANGED
|
@@ -10,6 +10,8 @@ import { IEditorGroupsService } from '@codingame/monaco-vscode-api/vscode/vs/wor
|
|
|
10
10
|
import { IEditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
11
11
|
import { EditorService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/editor/browser/editorService';
|
|
12
12
|
import { EditorParts } from '@codingame/monaco-vscode-api/vscode/vs/workbench/browser/parts/editor/editorParts';
|
|
13
|
+
import { IWorkspaceFolderLabelService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/workspaces/common/workspaceFolderLabelService.service';
|
|
14
|
+
import { WorkspaceFolderLabelService } from './vscode/src/vs/workbench/services/workspaces/common/workspaceFolderLabelService.js';
|
|
13
15
|
import { setUnexpectedErrorHandler, onUnexpectedError } from '@codingame/monaco-vscode-api/vscode/vs/base/common/errors';
|
|
14
16
|
import { BrowserWindow } from '@codingame/monaco-vscode-api/vscode/vs/workbench/browser/window';
|
|
15
17
|
import { detectFullscreen } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
|
|
@@ -84,6 +86,7 @@ function getServiceOverride(options, _webviewIframeAlternateDomains) {
|
|
|
84
86
|
[IWorkbenchLayoutService.toString()]: new SyncDescriptor(CustomWorkbench, [options], false),
|
|
85
87
|
[IEditorGroupsService.toString()]: new SyncDescriptor(EditorParts, [], false),
|
|
86
88
|
[IEditorService.toString()]: new SyncDescriptor(EditorService, [undefined], false),
|
|
89
|
+
[IWorkspaceFolderLabelService.toString()]: new SyncDescriptor(WorkspaceFolderLabelService, [], true),
|
|
87
90
|
...getServiceOverride$3(),
|
|
88
91
|
...getServiceOverride$2(),
|
|
89
92
|
...getServiceOverride$1()
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-workbench-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "37.1.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor - workbench service-override",
|
|
6
6
|
"keywords": [],
|
|
@@ -15,13 +15,13 @@
|
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codingame/monaco-vscode-api": "
|
|
19
|
-
"@codingame/monaco-vscode-keybindings-service-override": "
|
|
20
|
-
"@codingame/monaco-vscode-quickaccess-service-override": "
|
|
21
|
-
"@codingame/monaco-vscode-view-banner-service-override": "
|
|
22
|
-
"@codingame/monaco-vscode-view-common-service-override": "
|
|
23
|
-
"@codingame/monaco-vscode-view-status-bar-service-override": "
|
|
24
|
-
"@codingame/monaco-vscode-view-title-bar-service-override": "
|
|
18
|
+
"@codingame/monaco-vscode-api": "37.1.0",
|
|
19
|
+
"@codingame/monaco-vscode-keybindings-service-override": "37.1.0",
|
|
20
|
+
"@codingame/monaco-vscode-quickaccess-service-override": "37.1.0",
|
|
21
|
+
"@codingame/monaco-vscode-view-banner-service-override": "37.1.0",
|
|
22
|
+
"@codingame/monaco-vscode-view-common-service-override": "37.1.0",
|
|
23
|
+
"@codingame/monaco-vscode-view-status-bar-service-override": "37.1.0",
|
|
24
|
+
"@codingame/monaco-vscode-view-title-bar-service-override": "37.1.0"
|
|
25
25
|
},
|
|
26
26
|
"main": "index.js",
|
|
27
27
|
"module": "index.js",
|
|
@@ -160,6 +160,7 @@ export declare abstract class Layout extends Disposable implements IWorkbenchLay
|
|
|
160
160
|
private isShadowsDisabled;
|
|
161
161
|
private updateShadows;
|
|
162
162
|
isFloatingPanelsEnabled(): boolean;
|
|
163
|
+
isModernUICompact(): boolean;
|
|
163
164
|
private updateFloatingPanels;
|
|
164
165
|
private setSideBarPosition;
|
|
165
166
|
private updateWindowBorder;
|
|
@@ -226,12 +227,15 @@ export declare abstract class Layout extends Disposable implements IWorkbenchLay
|
|
|
226
227
|
private panelOpensMaximized;
|
|
227
228
|
private setAuxiliaryBarHidden;
|
|
228
229
|
setPartHidden(hidden: boolean, part: Parts): void;
|
|
230
|
+
toggleSecondarySideBar(): void;
|
|
231
|
+
isSecondarySideBarVisible(): boolean;
|
|
229
232
|
hasMainWindowBorder(): boolean;
|
|
230
233
|
getMainWindowBorderRadius(): string | undefined;
|
|
231
234
|
getSideBarPosition(): Position;
|
|
232
235
|
getPanelAlignment(): PanelAlignment;
|
|
233
236
|
updateMenubarVisibility(skipLayout: boolean): void;
|
|
234
237
|
updateCustomTitleBarVisibility(): void;
|
|
238
|
+
private updateTopWindowEdgeClass;
|
|
235
239
|
toggleMenuBar(): void;
|
|
236
240
|
getPanelPosition(): Position;
|
|
237
241
|
setPanelPosition(position: Position): void;
|
|
@@ -8,17 +8,19 @@ import { coalesce } from '@codingame/monaco-vscode-api/vscode/vs/base/common/arr
|
|
|
8
8
|
import { DeferredPromise, Promises } from '@codingame/monaco-vscode-api/vscode/vs/base/common/async';
|
|
9
9
|
import { Emitter, Event } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
|
|
10
10
|
import { Disposable, toDisposable, DisposableStore, DisposableMap } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
|
|
11
|
+
import { alert } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/aria/aria';
|
|
11
12
|
import { isWindows, isLinux, isWeb, isIOS, isMacintosh } from '@codingame/monaco-vscode-api/vscode/vs/base/common/platform';
|
|
12
13
|
import { pathsToEditors, isResourceEditorInput, EditorInputCapabilities } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor';
|
|
13
14
|
import { SidebarPart } from '@codingame/monaco-vscode-api/vscode/vs/workbench/browser/parts/sidebar/sidebarPart';
|
|
14
15
|
import { PanelPart } from '@codingame/monaco-vscode-api/vscode/vs/workbench/browser/parts/panel/panelPart';
|
|
15
|
-
import { LayoutSettings, Parts, EditorActionsLocation, ActivityBarPosition, shouldShowCustomTitleBar, Position, isHorizontal, ZenModeSettings, isMultiWindowPart, positionToString, partOpensMaximizedFromString, PartOpensMaximizedOptions, positionFromString } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/layout/browser/layoutService';
|
|
16
|
+
import { LayoutSettings, Parts, EditorActionsLocation, ActivityBarPosition, shouldShowCustomTitleBar, ModernUIDensity, Position, isHorizontal, ZenModeSettings, isMultiWindowPart, isFloatingTopEdgeExposed, positionToString, partOpensMaximizedFromString, PartOpensMaximizedOptions, positionFromString } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/layout/browser/layoutService';
|
|
16
17
|
import { WorkbenchState, isTemporaryWorkspace } from '@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace';
|
|
17
18
|
import { IWorkspaceContextService } from '@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace.service';
|
|
18
19
|
import { StorageScope, StorageTarget } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage';
|
|
19
20
|
import { IStorageService } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service';
|
|
20
21
|
import { isConfigured, isDefaultOverriden } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration';
|
|
21
22
|
import { IConfigurationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service';
|
|
23
|
+
import { ChatAIDisabledSettingId } from '@codingame/monaco-vscode-api/vscode/vs/platform/chat/common/chatSettings';
|
|
22
24
|
import { ITitleService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/title/browser/titleService.service';
|
|
23
25
|
import { StartupKind } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/lifecycle/common/lifecycle';
|
|
24
26
|
import { ILifecycleService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/lifecycle/common/lifecycle.service';
|
|
@@ -36,6 +38,7 @@ import { assertReturnsDefined } from '@codingame/monaco-vscode-api/vscode/vs/bas
|
|
|
36
38
|
import { NotificationsFilter } from '@codingame/monaco-vscode-api/vscode/vs/platform/notification/common/notification';
|
|
37
39
|
import { INotificationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/notification/common/notification.service';
|
|
38
40
|
import { IThemeService } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/themeService.service';
|
|
41
|
+
import { isHighContrast } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/theme';
|
|
39
42
|
import { WINDOW_ACTIVE_BORDER, WINDOW_INACTIVE_BORDER } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/theme';
|
|
40
43
|
import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
|
|
41
44
|
import { ViewContainerLocation } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/views';
|
|
@@ -45,6 +48,7 @@ import { mark } from '@codingame/monaco-vscode-api/vscode/vs/base/common/perform
|
|
|
45
48
|
import { ILogService } from '@codingame/monaco-vscode-api/vscode/vs/platform/log/common/log.service';
|
|
46
49
|
import { ITelemetryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/telemetry/common/telemetry.service';
|
|
47
50
|
import { IAuxiliaryWindowService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/auxiliaryWindow/browser/auxiliaryWindowService.service';
|
|
51
|
+
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
48
52
|
import { IBannerService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/banner/browser/bannerService.service';
|
|
49
53
|
import { IExtensionService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensions/common/extensions.service';
|
|
50
54
|
import { IPaneCompositePartService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/panecomposite/browser/panecomposite.service';
|
|
@@ -58,12 +62,17 @@ var LayoutClasses;
|
|
|
58
62
|
LayoutClasses["MAIN_EDITOR_AREA_HIDDEN"] = "nomaineditorarea";
|
|
59
63
|
LayoutClasses["PANEL_HIDDEN"] = "nopanel";
|
|
60
64
|
LayoutClasses["AUXILIARYBAR_HIDDEN"] = "noauxiliarybar";
|
|
65
|
+
LayoutClasses["ACTIVITYBAR_HIDDEN"] = "noactivitybar";
|
|
61
66
|
LayoutClasses["STATUSBAR_HIDDEN"] = "nostatusbar";
|
|
67
|
+
LayoutClasses["TOP_WINDOW_EDGE"] = "top-window-edge";
|
|
62
68
|
LayoutClasses["FULLSCREEN"] = "fullscreen";
|
|
63
69
|
LayoutClasses["MAXIMIZED"] = "maximized";
|
|
64
70
|
LayoutClasses["WINDOW_BORDER"] = "border";
|
|
65
71
|
LayoutClasses["NO_SHADOWS"] = "no-shadows";
|
|
66
72
|
LayoutClasses["FLOATING_PANELS"] = "floating-panels";
|
|
73
|
+
LayoutClasses["MODERN_UI"] = "modern-ui";
|
|
74
|
+
LayoutClasses["MODERN_UI_COMPACT"] = "modern-ui-compact";
|
|
75
|
+
LayoutClasses["MODERN_UI_TABS"] = "modern-ui-tabs";
|
|
67
76
|
})(LayoutClasses || (LayoutClasses = {}));
|
|
68
77
|
const COMMAND_CENTER_SETTINGS = [
|
|
69
78
|
"chat.agentsControl.enabled",
|
|
@@ -280,9 +289,8 @@ class Layout extends Disposable {
|
|
|
280
289
|
if (e.affectsConfiguration(LayoutSettings.SHADOWS)) {
|
|
281
290
|
this.updateShadows();
|
|
282
291
|
}
|
|
283
|
-
if (e.affectsConfiguration(LayoutSettings.MODERN_UI)) {
|
|
292
|
+
if (e.affectsConfiguration(LayoutSettings.MODERN_UI) || e.affectsConfiguration(LayoutSettings.MODERN_UI_DENSITY)) {
|
|
284
293
|
this.updateFloatingPanels();
|
|
285
|
-
this.layout();
|
|
286
294
|
}
|
|
287
295
|
if (e.affectsConfiguration(WorkbenchLayoutSettings.AUXILIARYBAR_FORCE_MAXIMIZED)) {
|
|
288
296
|
const forceMaximized = this.configurationService.getValue(WorkbenchLayoutSettings.AUXILIARYBAR_FORCE_MAXIMIZED);
|
|
@@ -440,8 +448,13 @@ class Layout extends Disposable {
|
|
|
440
448
|
isFloatingPanelsEnabled() {
|
|
441
449
|
return this.configurationService.getValue(LayoutSettings.MODERN_UI) === true;
|
|
442
450
|
}
|
|
451
|
+
isModernUICompact() {
|
|
452
|
+
return this.isFloatingPanelsEnabled() && this.configurationService.getValue(LayoutSettings.MODERN_UI_DENSITY) === ModernUIDensity.Compact;
|
|
453
|
+
}
|
|
443
454
|
updateFloatingPanels() {
|
|
444
455
|
this.mainContainer.classList.toggle(LayoutClasses.FLOATING_PANELS, this.isFloatingPanelsEnabled());
|
|
456
|
+
this.mainContainer.classList.toggle(LayoutClasses.MODERN_UI_COMPACT, this.isModernUICompact());
|
|
457
|
+
this.updateWindowBorder();
|
|
445
458
|
}
|
|
446
459
|
setSideBarPosition(position) {
|
|
447
460
|
const activityBar = this.getPart(Parts.ACTIVITYBAR_PART);
|
|
@@ -467,23 +480,26 @@ class Layout extends Disposable {
|
|
|
467
480
|
this.adjustPartPositions(position, panelAlignment, panelPosition);
|
|
468
481
|
}
|
|
469
482
|
updateWindowBorder(skipLayout = false) {
|
|
483
|
+
const theme = this.themeService.getColorTheme();
|
|
484
|
+
const didHaveMainWindowBorder = this.hasMainWindowBorder();
|
|
485
|
+
const suppressMainWindowBorder = this.isFloatingPanelsEnabled() && !isHighContrast(theme.type);
|
|
470
486
|
if (
|
|
471
487
|
isWeb || isWindows ||
|
|
472
488
|
((isWindows || isLinux) && useWindowControlsOverlay(this.configurationService)) || hasNativeTitlebar(this.configurationService)) {
|
|
473
489
|
return;
|
|
474
490
|
}
|
|
475
|
-
const theme = this.themeService.getColorTheme();
|
|
476
491
|
const activeBorder = theme.getColor(WINDOW_ACTIVE_BORDER);
|
|
477
492
|
const inactiveBorder = theme.getColor(WINDOW_INACTIVE_BORDER);
|
|
478
|
-
const didHaveMainWindowBorder = this.hasMainWindowBorder();
|
|
479
493
|
for (const container of this.containers) {
|
|
480
494
|
const isMainContainer = container === this.mainContainer;
|
|
481
495
|
const isActiveContainer = this.activeContainer === container;
|
|
482
496
|
let windowBorder = false;
|
|
483
|
-
if (!this.state.runtime.mainWindowFullscreen && (activeBorder || inactiveBorder)) {
|
|
497
|
+
if (!(isMainContainer && suppressMainWindowBorder) && !this.state.runtime.mainWindowFullscreen && (activeBorder || inactiveBorder)) {
|
|
484
498
|
windowBorder = true;
|
|
485
499
|
const borderColor = isActiveContainer && this.state.runtime.hasFocus ? activeBorder : inactiveBorder ?? activeBorder;
|
|
486
500
|
container.style.setProperty("--window-border-color", borderColor?.toString() ?? "transparent");
|
|
501
|
+
} else {
|
|
502
|
+
container.style.removeProperty("--window-border-color");
|
|
487
503
|
}
|
|
488
504
|
if (isMainContainer) {
|
|
489
505
|
this.state.runtime.mainWindowBorder = windowBorder;
|
|
@@ -1308,6 +1324,15 @@ class Layout extends Disposable {
|
|
|
1308
1324
|
this.handleContainerDidLayout(this.mainContainer, this._mainContainerDimension);
|
|
1309
1325
|
}));
|
|
1310
1326
|
}
|
|
1327
|
+
this._register(this.onDidChangePartVisibility((
|
|
1328
|
+
{
|
|
1329
|
+
partId
|
|
1330
|
+
}
|
|
1331
|
+
) => {
|
|
1332
|
+
if (partId === Parts.TITLEBAR_PART || partId === Parts.BANNER_PART) {
|
|
1333
|
+
this.updateTopWindowEdgeClass();
|
|
1334
|
+
}
|
|
1335
|
+
}));
|
|
1311
1336
|
this._register(this.storageService.onWillSaveState(() => {
|
|
1312
1337
|
const sideBarSize = this.stateModel.getRuntimeValue(LayoutStateKeys.SIDEBAR_HIDDEN) ? this.workbenchGrid.getViewCachedVisibleSize(this.sideBarPartView) : this.workbenchGrid.getViewSize(this.sideBarPartView).width;
|
|
1313
1338
|
this.stateModel.setInitializationValue(LayoutStateKeys.SIDEBAR_SIZE, sideBarSize);
|
|
@@ -1449,6 +1474,7 @@ class Layout extends Disposable {
|
|
|
1449
1474
|
}
|
|
1450
1475
|
setActivityBarHidden(hidden) {
|
|
1451
1476
|
this.stateModel.setRuntimeValue(LayoutStateKeys.ACTIVITYBAR_HIDDEN, hidden);
|
|
1477
|
+
this.mainContainer.classList.toggle(LayoutClasses.ACTIVITYBAR_HIDDEN, hidden);
|
|
1452
1478
|
this.workbenchGrid.setViewVisible(this.activityBarPartView, !hidden);
|
|
1453
1479
|
}
|
|
1454
1480
|
setBannerHidden(hidden) {
|
|
@@ -1475,10 +1501,15 @@ class Layout extends Disposable {
|
|
|
1475
1501
|
!this.isVisible(Parts.EDITOR_PART, mainWindow) ? LayoutClasses.MAIN_EDITOR_AREA_HIDDEN : undefined,
|
|
1476
1502
|
!this.isVisible(Parts.PANEL_PART) ? LayoutClasses.PANEL_HIDDEN : undefined,
|
|
1477
1503
|
!this.isVisible(Parts.AUXILIARYBAR_PART) ? LayoutClasses.AUXILIARYBAR_HIDDEN : undefined,
|
|
1504
|
+
!this.isVisible(Parts.ACTIVITYBAR_PART) ? LayoutClasses.ACTIVITYBAR_HIDDEN : undefined,
|
|
1478
1505
|
!this.isVisible(Parts.STATUSBAR_PART) ? LayoutClasses.STATUSBAR_HIDDEN : undefined,
|
|
1506
|
+
isFloatingTopEdgeExposed(this, mainWindow) ? LayoutClasses.TOP_WINDOW_EDGE : undefined,
|
|
1479
1507
|
this.state.runtime.mainWindowFullscreen ? LayoutClasses.FULLSCREEN : undefined,
|
|
1480
1508
|
this.isShadowsDisabled() ? LayoutClasses.NO_SHADOWS : undefined,
|
|
1481
1509
|
this.isFloatingPanelsEnabled() ? LayoutClasses.FLOATING_PANELS : undefined,
|
|
1510
|
+
this.isFloatingPanelsEnabled() ? LayoutClasses.MODERN_UI : undefined,
|
|
1511
|
+
this.isModernUICompact() ? LayoutClasses.MODERN_UI_COMPACT : undefined,
|
|
1512
|
+
this.isFloatingPanelsEnabled() ? LayoutClasses.MODERN_UI_TABS : undefined,
|
|
1482
1513
|
`panel-position-${positionToString(this.getPanelPosition())}`,
|
|
1483
1514
|
`panel-alignment-${this.getPanelAlignment()}`
|
|
1484
1515
|
]);
|
|
@@ -1807,6 +1838,14 @@ class Layout extends Disposable {
|
|
|
1807
1838
|
return this.setPanelHidden(hidden);
|
|
1808
1839
|
}
|
|
1809
1840
|
}
|
|
1841
|
+
toggleSecondarySideBar() {
|
|
1842
|
+
const visible = !this.isSecondarySideBarVisible();
|
|
1843
|
+
this.setPartHidden(!visible, Parts.AUXILIARYBAR_PART);
|
|
1844
|
+
alert(visible ? ( localize(3503, "Secondary Side Bar shown")) : ( localize(3504, "Secondary Side Bar hidden")));
|
|
1845
|
+
}
|
|
1846
|
+
isSecondarySideBarVisible() {
|
|
1847
|
+
return this.isVisible(Parts.AUXILIARYBAR_PART);
|
|
1848
|
+
}
|
|
1810
1849
|
hasMainWindowBorder() {
|
|
1811
1850
|
return this.state.runtime.mainWindowBorder;
|
|
1812
1851
|
}
|
|
@@ -1832,6 +1871,9 @@ class Layout extends Disposable {
|
|
|
1832
1871
|
this.workbenchGrid.setViewVisible(this.titleBarPartView, shouldShowTitleBar);
|
|
1833
1872
|
}
|
|
1834
1873
|
}
|
|
1874
|
+
updateTopWindowEdgeClass() {
|
|
1875
|
+
this.mainContainer.classList.toggle(LayoutClasses.TOP_WINDOW_EDGE, isFloatingTopEdgeExposed(this, mainWindow));
|
|
1876
|
+
}
|
|
1835
1877
|
toggleMenuBar() {
|
|
1836
1878
|
let currentVisibilityValue = getMenuBarVisibility(this.configurationService);
|
|
1837
1879
|
if (typeof currentVisibilityValue !== "string") {
|
|
@@ -2418,7 +2460,7 @@ class LayoutStateModel extends Disposable {
|
|
|
2418
2460
|
if (configuration.defaultValue !== "hidden" && !isConfigured(configuration) && !isDefaultOverriden(WorkbenchLayoutSettings.AUXILIARYBAR_DEFAULT_VISIBILITY) && this.stateCache.get(LayoutStateKeys.AUXILIARYBAR_EMPTY.name)) {
|
|
2419
2461
|
return true;
|
|
2420
2462
|
}
|
|
2421
|
-
if (this.isNew[StorageScope.APPLICATION] && configuration.value !== "hidden" && !this.configurationService.getValue(
|
|
2463
|
+
if (this.isNew[StorageScope.APPLICATION] && configuration.value !== "hidden" && !this.configurationService.getValue(ChatAIDisabledSettingId)) {
|
|
2422
2464
|
return false;
|
|
2423
2465
|
}
|
|
2424
2466
|
switch (configuration.value) {
|
|
@@ -35,7 +35,7 @@ import { PixelRatio } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/
|
|
|
35
35
|
import { AccessibilityProgressSignalScheduler } from '@codingame/monaco-vscode-api/vscode/vs/platform/accessibilitySignal/browser/progressAccessibilitySignalScheduler';
|
|
36
36
|
import { setProgressAccessibilitySignalScheduler } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/progressbar/progressAccessibilitySignal';
|
|
37
37
|
import { AccessibleViewRegistry } from '@codingame/monaco-vscode-api/vscode/vs/platform/accessibility/browser/accessibleViewRegistry';
|
|
38
|
-
import { NotificationAccessibleView } from '
|
|
38
|
+
import { NotificationAccessibleView } from '@codingame/monaco-vscode-api/vscode/vs/workbench/browser/parts/notifications/notificationAccessibleView';
|
|
39
39
|
import { IMarkdownRendererService } from '@codingame/monaco-vscode-api/vscode/vs/platform/markdown/browser/markdownRenderer.service';
|
|
40
40
|
import { EditorMarkdownCodeBlockRenderer } from '@codingame/monaco-vscode-api/vscode/vs/editor/browser/widget/markdownRenderer/browser/editorMarkdownCodeBlockRenderer';
|
|
41
41
|
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { IWorkspaceFolder } from "@codingame/monaco-vscode-api/vscode/vs/platform/workspace/common/workspace";
|
|
2
|
+
import { IWorkspaceFolderLabelService } from "@codingame/monaco-vscode-api/vscode/vs/workbench/services/workspaces/common/workspaceFolderLabelService.service";
|
|
3
|
+
export declare class WorkspaceFolderLabelService implements IWorkspaceFolderLabelService {
|
|
4
|
+
readonly _serviceBrand: undefined;
|
|
5
|
+
getWorkspaceFolderLabel(_folder: IWorkspaceFolder, _verbose?: boolean): undefined;
|
|
6
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
|
|
2
|
+
import '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/extensions';
|
|
3
|
+
import '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
4
|
+
|
|
5
|
+
class WorkspaceFolderLabelService {
|
|
6
|
+
getWorkspaceFolderLabel(_folder, _verbose) {
|
|
7
|
+
return undefined;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export { WorkspaceFolderLabelService };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { AccessibleViewType, AccessibleContentProvider } from "@codingame/monaco-vscode-api/vscode/vs/platform/accessibility/browser/accessibleView";
|
|
2
|
-
import { IAccessibleViewImplementation } from "@codingame/monaco-vscode-api/vscode/vs/platform/accessibility/browser/accessibleViewRegistry";
|
|
3
|
-
import { ServicesAccessor } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
|
|
4
|
-
export declare class NotificationAccessibleView implements IAccessibleViewImplementation {
|
|
5
|
-
readonly priority = 90;
|
|
6
|
-
readonly name = "notifications";
|
|
7
|
-
readonly when: import("@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey").RawContextKey<boolean>;
|
|
8
|
-
readonly type = AccessibleViewType.View;
|
|
9
|
-
getProvider(accessor: ServicesAccessor): AccessibleContentProvider | undefined;
|
|
10
|
-
}
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
|
|
3
|
-
import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
|
|
4
|
-
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
5
|
-
import { AccessibleViewType, AccessibleContentProvider, AccessibleViewProviderId } from '@codingame/monaco-vscode-api/vscode/vs/platform/accessibility/browser/accessibleView';
|
|
6
|
-
import { IAccessibleViewService } from '@codingame/monaco-vscode-api/vscode/vs/platform/accessibility/browser/accessibleView.service';
|
|
7
|
-
import { AccessibilitySignal } from '@codingame/monaco-vscode-api/vscode/vs/platform/accessibilitySignal/browser/accessibilitySignalService';
|
|
8
|
-
import { IAccessibilitySignalService } from '@codingame/monaco-vscode-api/vscode/vs/platform/accessibilitySignal/browser/accessibilitySignalService.service';
|
|
9
|
-
import { ICommandService } from '@codingame/monaco-vscode-api/vscode/vs/platform/commands/common/commands.service';
|
|
10
|
-
import { WorkbenchList } from '@codingame/monaco-vscode-api/vscode/vs/platform/list/browser/listService';
|
|
11
|
-
import { IListService } from '@codingame/monaco-vscode-api/vscode/vs/platform/list/browser/listService.service';
|
|
12
|
-
import { getNotificationFromContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/browser/parts/notifications/notificationsCommands';
|
|
13
|
-
import { NotificationFocusedContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/contextkeys';
|
|
14
|
-
import { withSeverityPrefix } from '@codingame/monaco-vscode-api/vscode/vs/platform/notification/common/notification';
|
|
15
|
-
|
|
16
|
-
class NotificationAccessibleView {
|
|
17
|
-
constructor() {
|
|
18
|
-
this.priority = 90;
|
|
19
|
-
this.name = "notifications";
|
|
20
|
-
this.when = NotificationFocusedContext;
|
|
21
|
-
this.type = AccessibleViewType.View;
|
|
22
|
-
}
|
|
23
|
-
getProvider(accessor) {
|
|
24
|
-
const accessibleViewService = accessor.get(IAccessibleViewService);
|
|
25
|
-
const listService = accessor.get(IListService);
|
|
26
|
-
const commandService = accessor.get(ICommandService);
|
|
27
|
-
const accessibilitySignalService = accessor.get(IAccessibilitySignalService);
|
|
28
|
-
function getProvider() {
|
|
29
|
-
const notification = getNotificationFromContext(listService);
|
|
30
|
-
if (!notification) {
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
commandService.executeCommand("notifications.showList");
|
|
34
|
-
let notificationIndex;
|
|
35
|
-
const list = listService.lastFocusedList;
|
|
36
|
-
if (list instanceof WorkbenchList) {
|
|
37
|
-
notificationIndex = list.indexOf(notification);
|
|
38
|
-
}
|
|
39
|
-
if (notificationIndex === undefined) {
|
|
40
|
-
return;
|
|
41
|
-
}
|
|
42
|
-
function focusList() {
|
|
43
|
-
commandService.executeCommand("notifications.showList");
|
|
44
|
-
if (list && notificationIndex !== undefined) {
|
|
45
|
-
list.domFocus();
|
|
46
|
-
try {
|
|
47
|
-
list.setFocus([notificationIndex]);
|
|
48
|
-
} catch {}
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
function getContentForNotification() {
|
|
52
|
-
const notification = getNotificationFromContext(listService);
|
|
53
|
-
const message = notification?.message.original.toString();
|
|
54
|
-
if (!notification || !message) {
|
|
55
|
-
return;
|
|
56
|
-
}
|
|
57
|
-
return withSeverityPrefix(notification.source ? ( localize(3797, "{0} Source: {1}", message, notification.source)) : message, notification.severity);
|
|
58
|
-
}
|
|
59
|
-
const content = getContentForNotification();
|
|
60
|
-
if (!content) {
|
|
61
|
-
return;
|
|
62
|
-
}
|
|
63
|
-
notification.onDidClose(() => accessibleViewService.next());
|
|
64
|
-
return ( new AccessibleContentProvider(AccessibleViewProviderId.Notification, {
|
|
65
|
-
type: AccessibleViewType.View
|
|
66
|
-
}, () => content, () => focusList(), "accessibility.verbosity.notification", undefined, getActionsFromNotification(notification, accessibilitySignalService), () => {
|
|
67
|
-
if (!list) {
|
|
68
|
-
return;
|
|
69
|
-
}
|
|
70
|
-
focusList();
|
|
71
|
-
list.focusNext();
|
|
72
|
-
return getContentForNotification();
|
|
73
|
-
}, () => {
|
|
74
|
-
if (!list) {
|
|
75
|
-
return;
|
|
76
|
-
}
|
|
77
|
-
focusList();
|
|
78
|
-
list.focusPrevious();
|
|
79
|
-
return getContentForNotification();
|
|
80
|
-
}));
|
|
81
|
-
}
|
|
82
|
-
return getProvider();
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
function getActionsFromNotification(notification, accessibilitySignalService) {
|
|
86
|
-
let actions = undefined;
|
|
87
|
-
if (notification.actions) {
|
|
88
|
-
actions = [];
|
|
89
|
-
if (notification.actions.primary) {
|
|
90
|
-
actions.push(...notification.actions.primary);
|
|
91
|
-
}
|
|
92
|
-
if (notification.actions.secondary) {
|
|
93
|
-
actions.push(...notification.actions.secondary);
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
if (actions) {
|
|
97
|
-
for (const action of actions) {
|
|
98
|
-
action.class = ThemeIcon.asClassName(Codicon.bell);
|
|
99
|
-
const initialAction = action.run;
|
|
100
|
-
action.run = () => {
|
|
101
|
-
initialAction();
|
|
102
|
-
notification.close();
|
|
103
|
-
};
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
const manageExtension = actions?.find(a => a.label.includes("Manage Extension"));
|
|
107
|
-
if (manageExtension) {
|
|
108
|
-
manageExtension.class = ThemeIcon.asClassName(Codicon.gear);
|
|
109
|
-
}
|
|
110
|
-
if (actions) {
|
|
111
|
-
actions.push({
|
|
112
|
-
id: "clearNotification",
|
|
113
|
-
label: ( localize(3798, "Clear Notification")),
|
|
114
|
-
tooltip: ( localize(3798, "Clear Notification")),
|
|
115
|
-
run: () => {
|
|
116
|
-
notification.close();
|
|
117
|
-
accessibilitySignalService.playSignal(AccessibilitySignal.clear);
|
|
118
|
-
},
|
|
119
|
-
enabled: true,
|
|
120
|
-
class: ThemeIcon.asClassName(Codicon.clearAll)
|
|
121
|
-
});
|
|
122
|
-
}
|
|
123
|
-
return actions;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
export { NotificationAccessibleView };
|