Это ide на основе vs code(code oss), в ней будет встроенный умный апи роутинг, свой маркет с плагинами(агент харнесс, поддержка java/kotlin/мобильной разработки, командная разработка проектов, orca, оркестратор агентов
/** Narrower dimensions used when the floating panels (Modern UI) experiment is enabled. */
static
readonly
FLOATING_ACTION_HEIGHT
=
36
;
static
readonly
FLOATING_ACTIVITYBAR_WIDTH
=
36
;
static
readonly
FLOATING_COMPACT_ACTIVITYBAR_WIDTH
=
28
;
/**
* Vertical gap between activity bar items at the default size under the floating
* panels experiment. Published to CSS as `--activity-bar-action-gap` so that the
* stylesheet and the overflow computation cannot drift apart.
*/
static
readonly
FLOATING_ACTION_GAP
=
8
;
/**
* The compact Modern UI density tightens that gap to match its denser rhythm.
*/
static
readonly
FLOATING_COMPACT_ACTION_GAP
=
4
;
static
readonly
ICON_SIZE
=
24
;
static
readonly
COMPACT_ICON_SIZE
=
16
;
/**
* Base gutter reserved around the activity bar under the floating panels
* experiment. Must match the margins applied in `floatingPanels.css`.
*/
static
readonly
FLOATING_MARGIN
=
FLOATING_PANEL_MARGIN
;
/**
* The rail's own horizontal padding, doubled: the space inside the card beside the icon
* column. Independent of the cluster perimeter so the icons keep their inset whatever the
* gutter is. Must match `--modern-ui-activitybar-lane` in `floatingPanels.css`.
*/
static
readonly
FLOATING_LANE
=
8
;
static
readonly
FLOATING_COMPACT_LANE
=
4
;
/**
* The card border the activity bar draws on each edge under the floating panels
* experiment. Must match the border width applied in `floatingPanels.css`.
*/
static
readonly
FLOATING_BORDER
=
1
;
static
readonly
=
'workbench.activity.pinnedViewlets2'
;
static
readonly
=
'workbench.activity.placeholderViewlets'
;
static
readonly
=
'workbench.activity.viewletsWorkspaceState'
;
//#region IView
get
minimumWidth
(
)
:
number
{
return
this
.
+
this
.
;
}
get
maximumWidth
(
)
:
number
{
return
this
.
+
this
.
;
}
readonly
:
number
=
0
;
readonly
:
number
=
.
POSITIVE_INFINITY
;
//#endregion
/** The intrinsic activity bar width (excludes any floating gutter). */
private
get
baseWidth
(
)
:
number
{
if
(
this
.
.
isFloatingPanelsEnabled
(
)
)
{
if
(
this
.
)
{
return
.
FLOATING_COMPACT_ACTIVITYBAR_WIDTH
;
}
return
.
FLOATING_ACTIVITYBAR_WIDTH
;
}
return
this
.
?
.
COMPACT_ACTIVITYBAR_WIDTH
:
.
ACTIVITYBAR_WIDTH
;
}
/** The action (item) height that drives visible item sizing. */
private
get
actionHeight
(
)
:
number
{
if
(
this
.
)
{
return
.
COMPACT_ACTION_HEIGHT
;
}
if
(
this
.
.
isFloatingPanelsEnabled
(
)
)
{
return
.
FLOATING_ACTION_HEIGHT
;
}
return
.
ACTION_HEIGHT
;
}
/**
* Vertical gap rendered between two adjacent items. Only the floating panels
* experiment separates items, and only at the default activity bar size; the compact
* Modern UI density tightens it to match its denser rhythm.
*/
private
get
actionGap
(
)
:
number
{
if
(
!
this
.
.
isFloatingPanelsEnabled
(
)
||
this
.
)
{
return
0
;
}
return
this
.
.
isModernUICompact
(
)
?
.
FLOATING_COMPACT_ACTION_GAP
:
.
FLOATING_ACTION_GAP
;
}
/**
* The vertical space a single item occupies in the bar (its height plus the gap that
* separates it from the next one). This drives the overflow computation, so it has to
* track the current activity bar size, otherwise items collapse into the overflow menu
* prematurely.
*/
private
get
compositeSize
(
)
:
number
{
return
this
.
+
this
.
;
}
private
get
floatingHorizontalGutter
(
)
:
number
{
if
(
!
this
.
.
isFloatingPanelsEnabled
(
)
)
{
return
0
;
}
// The cluster perimeter on the window side, plus the rail's own lane beside the icon
// column, where the primary side bar meets it flush.
const
=
this
.
.
isModernUICompact
(
)
?
.
FLOATING_COMPACT_LANE
:
.
FLOATING_LANE
;
return
getFloatingPanelOuterMargin
(
this
.
)
+
+
(
this
.
?
getFloatingPanelMargin
(
this
.
)
:
0
)
;
}
/**
* Whether the rail has to supply the gap to the card before it. Under this system's
* leading-margin convention each card owns the gap on its leading edge, so a rail that
* follows the editor — on the right, with no side bar to connect to — reserves one more
* margin than it does when it leads. Compact density keeps its cards joined, so it never
* needs the gap. Mirrors `.nosidebar .part.activitybar.right` in `floatingPanels.css`.
*/
private
get
needsFloatingLeadingGap
(
)
:
boolean
{
return
!
this
.
.
isModernUICompact
(
)
&&
this
.
.
getSideBarPosition
(
)
===
.
RIGHT
&&
!
this
.
.
isVisible
(
.
SIDEBAR_PART
)
;
}
private
readonly
=
this
.
_register
(
new
MutableDisposable<PaneCompositeBar>
(
)
)
;
private
:
|
undefined
;
private
:
boolean
;
private
:
boolean
;
constructor
(
private
readonly
:
,
private
readonly
:
,
@IInstantiationService
private
readonly
:
,
@IWorkbenchLayoutService
:
,
@IThemeService
:
,
@IStorageService
:
,
@IConfigurationService
private
readonly
:
,
@IHostService
private
readonly
:
,
)
{
super
(
.
ACTIVITYBAR_PART
,
{
:
false
}
,
,
,
)
;
this
.
=
this
.
.
getValue<boolean>
(
.
ACTIVITY_BAR_COMPACT
)
??
false
;
this
.
=
!
this
.
.
;
this
.
_register
(
this
.
.
onDidChangeConfiguration
(
=>
{
if
(
.
affectsConfiguration
(
.
ACTIVITY_BAR_COMPACT
)
)
{
this
.
=
this
.
.
getValue<boolean>
(
.
ACTIVITY_BAR_COMPACT
)
??
false
;
this
.
updateCompactStyle
(
)
;
this
.
recreateCompositeBar
(
)
;
this
.
.
fire
(
undefined
)
;
// Signal grid that size constraints changed
}
// Floating panels changes the reserved left/bottom gutter (and therefore
// the fixed part width): signal the grid that the size constraint changed.
if
(
.
affectsConfiguration
(
.
MODERN_UI
)
||
.
affectsConfiguration
(
.
MODERN_UI_DENSITY
)
)
{
this
.
updateCompactStyle
(
)
;
this
.
recreateCompositeBar
(
)
;
this
.
.
fire
(
undefined
)
;
if
(
this
.
)
{
this
.
updateStyles
(
)
;
}
}
}
)
)
;
this
.
_register
(
this
.
.
onDidChangeFocus
(
=>
this
.
setInactive
(
!
)
)
)
;
this
.
_register
(
this
.
.
onDidChangeActiveWindow
(
=>
this
.
setInactive
(
!==
.
)
)
)
;
// Showing or hiding the primary side bar decides whether the rail connects to it or
// stands alone, which can change the gutter it reserves (see `needsFloatingLeadingGap`).
this
.
_register
(
this
.
.
onDidChangePartVisibility
(
=>
{
if
(
.
===
.
SIDEBAR_PART
&&
this
.
.
isFloatingPanelsEnabled
(
)
)
{
this
.
.
fire
(
undefined
)
;
}
}
)
)
;
}
private
setInactive
(
:
boolean
)
:
void
{
if
(
this
.
===
)
{
return
;
}
this
.
=
;
if
(
this
.
)
{
this
.
updateStyles
(
)
;
}
}
private
updateCompactStyle
(
)
:
void
{
if
(
this
.
)
{
this
.
.
.
toggle
(
'compact'
,
this
.
)
;
// Mirrored on the workbench root for floatingPanels.css
// In Modern UI the rail is a floating card whose border is owned by the stylesheet via
// the `modernActivityBar.border` token. Leaving it out of the inline style lets CSS
// vary it per edge (the seam it shares with the side bar) without needing `!important`.
const
=
this
.
.
isFloatingPanelsEnabled
(
)
?
''
:
this
.
getColor
(
ACTIVITY_BAR_BORDER
)
||
this
.
getColor
(
)
||
''
;
.
.
toggle
(
'bordered'
,
!
!
)
;
.
.
=
;
}
show
(
?
:
boolean
)
:
void
{
if
(
!
this
.
)
{
return
;
}
if
(
!
this
.
.
)
{
this
.
.
=
this
.
createCompositeBar
(
)
;
this
.
.
.
create
(
this
.
)
;
if
(
this
.
)
{
this
.
layout
(
this
.
.
,
this
.
.
)
;
}
}
if
(
)
{
this
.
focus
(
)
;
}
}
hide
(
)
:
void
{
if
(
!
this
.
.
)
{
return
;
}
this
.
.
clear
(
)
;
if
(
this
.
)
{
clearNode
(
this
.
)
;
}
}
layout
(
:
number
,
:
number
)
:
void
{
super
.
layout
(
,
,
0
,
0
)
;
if
(
!
this
.
)
{
return
;
// not created yet
}
const
{
,
}
=
this
.
getFloatingGutters
(
)
;
const
=
.
max
(
0
,
-
this
.
)
;
const
=
.
max
(
0
,
-
-
)
;
// Layout contents
const
=
super
.
layoutContents
(
,
)
.
;
// The first item has no preceding gap, so give one gap back to the composite bar.
this
.
.
?.
layout
(
,
.
+
this
.
)
;
}
/**
* Vertical gutters (in pixels) mirroring the margins in `floatingPanels.css`, plus the
* card's 1px border on each edge (drawn inside the box, as `.monaco-workbench .part` is
* `box-sizing: border-box`). The top is flush with title/banner chrome and doubles only at
* an exposed window edge.
*/
private
getFloatingGutters
(
)
:
{
:
number
;
:
number
}
{
if
(
!
this
.
.
isFloatingPanelsEnabled
(
)
)
{
return
{
:
0
,
:
0
}
;
}
const
=
getFloatingPanelMargin
(
this
.
)
;
const
=
getFloatingPanelOuterMargin
(
this
.
)
;
const
=
.
FLOATING_BORDER
;
return
{
:
+
(
isFloatingTopEdgeExposed
(
this
.
,
)
?
:
FLOATING_PANEL_INNER_MARGIN
)
,
:
+
(
this
.
.
isModernUICompact
(
)
?
:
this
.
.
isVisible
(
.
STATUSBAR_PART
,
)
?
:
)
}
;
}
toJSON
(
)
:
{
return
{
:
.
ACTIVITYBAR_PART
}
;
}
}
export
class
ActivityBarCompositeBar
extends
PaneCompositeBar
{
private
:
|
undefined
;
private
readonly
=
this
.
_register
(
new
MutableDisposable<CustomMenubarControl>
(
)
)
;
private
:
|
undefined
;
private
:
|
undefined
;
private
readonly
:
|
undefined
;
private
readonly
=
this
.
_register
(
new
DisposableStore
(
)
)
;
constructor
(
:
,
:
,
:
,
:
,
:
boolean
,
@IInstantiationService
:
,
@IStorageService
:
,
@IExtensionService
:
,
@IViewDescriptorService
:
,
@IViewsService
:
,
@IContextKeyService
:
,
@IWorkbenchEnvironmentService
:
,
@IConfigurationService
private
readonly
:
,
@IMenuService
private
readonly
:
,
@IWorkbenchLayoutService
:
,
)
{
super
(
,
{
...
,
fillExtraContextMenuActions
:
(
,
)
=>
{
.
fillExtraContextMenuActions
(
,
)
;
this
.
fillContextMenuActions
(
,
)
;
}
}
,
,
,
,
,
,
,
,
,
,
)
;
if
(
)
{
this
.
=
this
.
_register
(
.
createInstance
(
,
(
)
=>
this
.
getContextMenuActions
(
)
,
(
:
)
=>
this
.
.
colors
(
)
,
this
.
.
)
)
;
}
// Register for configuration changes
this
.
_register
(
this
.
.
onDidChangeConfiguration
(
=>
{
if
(
.
affectsConfiguration
(
.
)
)
{
if
(
getMenuBarVisibility
(
this
.
)
===
'compact'
)
{
this
.
installMenubar
(
)
;
}
else
{
this
.
uninstallMenubar
(
)
;
}
}
}
)
)
;
}
private
fillContextMenuActions
(
:
[
]
,
?
:
|
)
{
// Menu
const
=
getMenuBarVisibility
(
this
.
)
;
if
(
===
'compact'
||
===
'hidden'
||
===
'toggle'
)
{
.
unshift
(
...
[
toAction
(
{
:
'toggleMenuVisibility'
,
:
localize
(
'menu'
,
"Menu"
)
,
:
===
'compact'
,
run
:
(
)
=>
this
.
.
updateValue
(
.
,
===
'compact'
?
'toggle'
:
'compact'
)
}
)
,
new
Separator
(
)
]
)
;
}
if
(
===
'compact'
&&
this
.
&&
?.
)
{
if
(
isAncestor
(
.
as
,
this
.
)
)
{
.
unshift
(
...
[
toAction
(
{
:
'hideCompactMenu'
,
:
localize
(
'hideMenu'
,
"Hide Menu"
)
,
run
:
(
)
=>
this
.
.
updateValue
(
.
,
'toggle'
)
}
)
,
new
Separator
(
)
]
)
;
}
}
// Global Composite Bar
if
(
this
.
)
{
.
push
(
new
Separator
(
)
)
;
.
push
(
...
this
.
.
getContextMenuActions
(
)
)
;
}
.
push
(
new
Separator
(
)
)
;
.
push
(
...
this
.
getActivityBarContextMenuActions
(
)
)
;
}
private
uninstallMenubar
(
)
{
if
(
this
.
.
)
{
this
.
.
=
undefined
;
}
if
(
this
.
)
{
this
.
.
remove
(
)
;
this
.
=
undefined
;
}
}
private
installMenubar
(
)
{
if
(
this
.
.
)
{
return
;
// prevent menu bar from installing twice #110720
}
this
.
=
$
(
'.menubar'
)
;
const
=
assertReturnsDefined
(
this
.
)
;
.
prepend
(
this
.
)
;
// Menubar: install a custom menu bar depending on configuration
this
.
.
=
this
.
.
createInstance
(
)
;
this
.
.
.
create
(
this
.
)
;
}
private
registerKeyboardNavigationListeners
(
)
:
void
{
this
.
.
clear
(
)
;
// Up/Down or Left/Right arrow on compact menu
if
(
this
.
)
{
this
.
.
add
(
addDisposableListener
(
this
.
,
.
KEY_DOWN
,
=>
{
const
=
new
StandardKeyboardEvent
(
)
;
if
(
.
equals
(
.
)
||
.
equals
(
.
)
)
{
this
.
focus
(
)
;
}
}
)
)
;
}
// Up/Down on Activity Icons
if
(
this
.
)
{
this
.
.
add
(
addDisposableListener
(
this
.
,
.
KEY_DOWN
,
=>
{
const
=
new
StandardKeyboardEvent
(
)
;
if
(
.
equals
(
.
)
||
.
equals
(
.
)
)
{
this
.
?.
focus
(
)
;
}
else
if
(
.
equals
(
.
)
||
.
equals
(
.
)
)
{
this
.
.
?.
toggleFocus
(
)
;
}
}
)
)
;
}
// Up arrow on global icons
if
(
this
.
)
{
this
.
.
add
(
addDisposableListener
(
this
.
.
,
.
KEY_DOWN
,
=>
{
const
=
new
StandardKeyboardEvent
(
)
;
if
(
.
equals
(
.
)
||
.
equals
(
.
)
)
{
this
.
focus
(
this
.
getVisiblePaneCompositeIds
(
)
.
-
1
)
;
}
}
)
)
;
}
}
create
(
:
)
:
{
this
.
=
;
// Install menubar if compact
if
(
getMenuBarVisibility
(
this
.
)
===
'compact'
)
{
this
.
installMenubar
(
)
;
}
// View Containers action bar
this
.
=
super
.
create
(
this
.
)
;
// Global action bar
if
(
this
.
)
{
this
.
.
create
(
this
.
)
;
}
// Keyboard Navigation
this
.
registerKeyboardNavigationListeners
(
)
;
return
this
.
;
}
layout
(
:
number
,
:
number
)
:
void
{
if
(
this
.
)
{
if
(
this
.
.
===
.
VERTICAL
)
{
-=
this
.
.
;
}
else
{
-=
this
.
.
;
}
}
if
(
this
.
)
{
if
(
this
.
.
===
.
VERTICAL
)
{
-=
this
.
.
.
;
}
else
{
-=
this
.
.
.
;
}
}
super
.
layout
(
,
)
;
}
getActivityBarContextMenuActions
(
)
:
[
]
{
const
=
this
.
.
getMenuActions
(
.
,
this
.
,
{
:
true
,
:
true
}
)
;
const
=
getContextMenuActions
(
)
.
;
const
:
[
]
=
[
new
SubmenuAction
(
'workbench.action.activityBar.position'
,
localize
(
'activity bar position'
,
"Activity Bar Position"
)
,
)
,
]
;
// Show size submenu only when activity bar is in default position