Это ide на основе vs code(code oss), в ней будет встроенный умный апи роутинг, свой маркет с плагинами(агент харнесс, поддержка java/kotlin/мобильной разработки, командная разработка проектов, orca, оркестратор агентов
"Whether all selected editors in a group have a file or untitled resource associated"
)
)
;
// Editor Part Context Keys
export
const
=
new
RawContextKey<boolean>
(
'editorPartMultipleEditorGroups'
,
false
,
localize
(
'editorPartMultipleEditorGroups'
,
"Whether there are multiple editor groups opened in an editor part"
)
)
;
export
const
=
new
RawContextKey<boolean>
(
'editorPartMaximizedEditorGroup'
,
false
,
localize
(
'editorPartEditorGroupMaximized'
,
"Editor Part has a maximized group"
)
)
;
export
const
=
new
RawContextKey<boolean>
(
'editorPartModal'
,
false
,
localize
(
'editorPartModal'
,
"Whether focus is in a modal editor part"
)
)
;
export
const
=
new
RawContextKey<boolean>
(
'editorPartModalVisible'
,
false
,
localize
(
'editorPartModalVisible'
,
"Whether a modal editor part is visible"
)
)
;
export
const
=
new
RawContextKey<boolean>
(
'editorPartModalMaximized'
,
false
,
localize
(
'editorPartModalMaximized'
,
"Whether the modal editor part is maximized"
)
)
;
export
const
=
new
RawContextKey<boolean>
(
'editorPartModalNavigation'
,
false
,
localize
(
'editorPartModalNavigation'
,
"Whether the modal editor part has navigation context"
)
)
;
export
const
=
new
RawContextKey<boolean>
(
'editorPartModalSidebar'
,
false
,
localize
(
'editorPartModalSidebar'
,
"Whether the modal editor part has a sidebar"
)
)
;
export
const
=
new
RawContextKey<boolean>
(
'editorPartModalSidebarVisible'
,
false
,
localize
(
'editorPartModalSidebarVisible'
,
"Whether the modal editor part sidebar is visible"
)
)
;
// Editor Layout Context Keys
export
const
=
new
RawContextKey<boolean>
(
'editorIsOpen'
,
false
,
localize
(
'editorIsOpen'
,
"Whether an editor is open"
)
)
;
export
const
=
new
RawContextKey<boolean>
(
'editorAreaFocus'
,
false
,
localize
(
'editorAreaFocus'
,
"Whether the editor area (any editor part) has keyboard focus"
)
)
;
export
const
=
new
RawContextKey<boolean>
(
'inZenMode'
,
false
,
localize
(
'inZenMode'
,
"Whether Zen mode is enabled"
)
)
;
export
const
=
new
RawContextKey<boolean>
(
'isCenteredLayout'
,
false
,
localize
(
'isMainEditorCenteredLayout'
,
"Whether centered layout is enabled for the main editor"
)
)
;
export
const
=
new
RawContextKey<boolean>
(
'splitEditorsVertically'
,
false
,
localize
(
'splitEditorsVertically'
,
"Whether editors split vertically"
)
)
;
export
const
=
new
RawContextKey<boolean>
(
'mainEditorAreaVisible'
,
true
,
localize
(
'mainEditorAreaVisible'
,
"Whether the editor area in the main window is visible"
)
)
;
export
const
=
new
RawContextKey<boolean>
(
'editorTabsVisible'
,
true
,
localize
(
'editorTabsVisible'
,
"Whether editor tabs are visible"
)
)
;
//#endregion
//#region < --- Side Bar --- >
export
const
=
new
RawContextKey<boolean>
(
'sideBarVisible'
,
false
,
localize
(
'sideBarVisible'
,
"Whether the sidebar is visible"
)
)
;
export
const
=
new
RawContextKey<boolean>
(
'sideBarFocus'
,
false
,
localize
(
'sideBarFocus'
,
"Whether the sidebar has keyboard focus"
)
)
;
export
const
=
new
RawContextKey<string>
(
'activeViewlet'
,
''
,
localize
(
'activeViewlet'
,
"The identifier of the active viewlet"
)
)
;
//#endregion
//#region < --- Status Bar --- >
export
const
=
new
RawContextKey<boolean>
(
'statusBarFocused'
,
false
,
localize
(
'statusBarFocused'
,
"Whether the status bar has keyboard focus"
)
)
;
//#endregion
//#region < --- Title Bar --- >
export
const
=
new
RawContextKey<string>
(
'titleBarStyle'
,
'custom'
,
localize
(
'titleBarStyle'
,
"Style of the window title bar"
)
)
;
export
const
=
new
RawContextKey<boolean>
(
'titleBarVisible'
,
false
,
localize
(
'titleBarVisible'
,
"Whether the title bar is visible"
)
)
;
export
const
=
new
RawContextKey<boolean>
(
'isCompactTitleBar'
,
false
,
localize
(
'isCompactTitleBar'
,
"Title bar is in compact mode"
)
)
;
//#endregion
//#region < --- Banner --- >
export
const
=
new
RawContextKey<boolean>
(
'bannerFocused'
,
false
,
localize
(
'bannerFocused'
,
"Whether the banner has keyboard focus"
)
)
;
//#endregion
//#region < --- Notifications --- >
export
const
=
new
RawContextKey<boolean>
(
'notificationFocus'
,
true
,
localize
(
'notificationFocus'
,
"Whether a notification has keyboard focus"
)
)
;
export
const
=
new
RawContextKey<boolean>
(
'notificationCenterVisible'
,
false
,
localize
(
'notificationCenterVisible'
,
"Whether the notifications center is visible"
)
)
;
export
const
=
new
RawContextKey<boolean>
(
'notificationToastsVisible'
,
false
,
localize
(
'notificationToastsVisible'
,
"Whether a notification toast is visible"
)
)
;
//#endregion
//#region < --- Auxiliary Bar --- >
export
const
=
new
RawContextKey<string>
(
'activeAuxiliary'
,
''
,
localize
(
'activeAuxiliary'
,
"The identifier of the active auxiliary panel"
)
)
;
export
const
=
new
RawContextKey<boolean>
(
'auxiliaryBarFocus'
,
false
,
localize
(
'auxiliaryBarFocus'
,
"Whether the auxiliary bar has keyboard focus"
)
)
;
export
const
=
new
RawContextKey<boolean>
(
'auxiliaryBarVisible'
,
false
,
localize
(
'auxiliaryBarVisible'
,
"Whether the auxiliary bar is visible"
)
)
;
export
const
=
new
RawContextKey<boolean>
(
'secondarySideBarVisible'
,
false
,
localize
(
'secondarySideBarVisible'
,
"Whether the layout surface representing the secondary side bar is visible"
)
)
;
export
const
=
new
RawContextKey<boolean>
(
'auxiliaryBarMaximized'
,
false
,
localize
(
'auxiliaryBarMaximized'
,
"Whether the auxiliary bar is maximized"
)
)
;
//#endregion
//#region < --- Panel --- >
export
const
=
new
RawContextKey<string>
(
'activePanel'
,
''
,
localize
(
'activePanel'
,
"The identifier of the active panel"
)
)
;
export
const
=
new
RawContextKey<boolean>
(
'panelFocus'
,
false
,
localize
(
'panelFocus'
,
"Whether the panel has keyboard focus"
)
)
;
export
const
=
new
RawContextKey<string>
(
'panelPosition'
,
'bottom'
,
localize
(
'panelPosition'
,
"The position of the panel, always 'bottom'"
)
)
;
export
const
=
new
RawContextKey<string>
(
'panelAlignment'
,
'center'
,
localize
(
'panelAlignment'
,
"The alignment of the panel, either 'center', 'left', 'right' or 'justify'"
)
)
;
export
const
=
new
RawContextKey<boolean>
(
'panelVisible'
,
false
,
localize
(
'panelVisible'
,
"Whether the panel is visible"
)
)
;
export
const
=
new
RawContextKey<boolean>
(
'panelMaximized'
,
false
,
localize
(
'panelMaximized'
,
"Whether the panel is maximized"
)
)
;
//#endregion
//#region < --- Views --- >
export
const
=
new
RawContextKey<string>
(
'focusedView'
,
''
,
localize
(
'focusedView'
,
"The identifier of the view that has keyboard focus"
)
)
;
export
function
getVisbileViewContextKey
(
:
string
)
:
string
{
return
`view.${viewId}.visible`
;
}
//#endregion
//#region < --- Resources --- >
abstract
class
AbstractResourceContextKey
{
// NOTE: DO NOT CHANGE THE DEFAULT VALUE TO ANYTHING BUT
// UNDEFINED! IT IS IMPORTANT THAT DEFAULTS ARE INHERITED
// FROM THE PARENT CONTEXT AND ONLY UNDEFINED DOES THIS
static
readonly
=
new
RawContextKey<string>
(
'resourceScheme'
,
undefined
,
{
:
'string'
,
:
localize
(
'resourceScheme'
,
"The scheme of the resource"
)
}
)
;
static
readonly
=
new
RawContextKey<string>
(
'resourceFilename'
,
undefined
,
{
:
'string'
,
:
localize
(
'resourceFilename'
,
"The file name of the resource"
)
}
)
;
static
readonly
=
new
RawContextKey<string>
(
'resourceDirname'
,
undefined
,
{
:
'string'
,
:
localize
(
'resourceDirname'
,
"The folder name the resource is contained in"
)
}
)
;
static
readonly
=
new
RawContextKey<string>
(
'resourcePath'
,
undefined
,
{
:
'string'
,
:
localize
(
'resourcePath'
,
"The full path of the resource"
)
}
)
;
static
readonly
=
new
RawContextKey<string>
(
'resourceLangId'
,
undefined
,
{
:
'string'
,
:
localize
(
'resourceLangId'
,
"The language identifier of the resource"
)
}
)
;
static
readonly
=
new
RawContextKey<string>
(
'resource'
,
undefined
,
{
:
'URI'
,
:
localize
(
'resource'
,
"The full value of the resource including scheme and path"
)
}
)
;
static
readonly
=
new
RawContextKey<string>
(
'resourceExtname'
,
undefined
,
{
:
'string'
,
:
localize
(
'resourceExtname'
,
"The extension name of the resource"
)
}
)
;
static
readonly
=
new
RawContextKey<boolean>
(
'resourceSet'
,
undefined
,
{
:
'boolean'
,
:
localize
(
'resourceSet'
,
"Whether a resource is present or not"
)
}
)
;
static
readonly
=
new
RawContextKey<boolean>
(
'isFileSystemResource'
,
undefined
,
{
:
'boolean'
,
:
localize
(
'isFileSystemResource'
,
"Whether the resource is backed by a file system provider"
)
}
)
;
protected
:
URI
|
undefined
;
protected
readonly
:
<
string
|
null
>
;
protected
readonly
:
<
string
|
null
>
;
protected
readonly
:
<
string
|
null
>
;
protected
readonly
:
<
string
|
null
>
;
protected
readonly
:
<
string
|
null
>
;
protected
readonly
:
<
string
|
null
>
;
protected
readonly
:
<
string
|
null
>
;
protected
readonly
:
<
boolean
>
;
protected
readonly
:
<
boolean
>
;
constructor
(
@IContextKeyService
protected
readonly
:
,
@IFileService
protected
readonly
:
,
@ILanguageService
protected
readonly
:
,
@IModelService
protected
readonly
:
)
{
this
.
=
.
.
bindTo
(
this
.
)
;
this
.
=
.
.
bindTo
(
this
.
)
;
this
.
=
.
.
bindTo
(
this
.
)
;
this
.
=
.
.
bindTo
(
this
.
)
;
this
.
=
.
.
bindTo
(
this
.
)
;
this
.
=
.
.
bindTo
(
this
.
)
;
this
.
=
.
.
bindTo
(
this
.
)
;
this
.
=
.
.
bindTo
(
this
.
)
;
this
.
=
.
.
bindTo
(
this
.
)
;
}
protected
_setLangId
(
)
:
void
{
const
=
this
.
get
(
)
;
if
(
!
)
{
this
.
.
set
(
null
)
;
return
;
}
const
=
this
.
.
getModel
(
)
?.
getLanguageId
(
)
??
this
.
.
guessLanguageIdByFilepathOrFirstLine
(
)
;
this
.
.
set
(
)
;
}
set
(
:
URI
|
null
|
undefined
)
{
=
??
undefined
;
if
(
isEqual
(
this
.
,
)
)
{
return
;
}
this
.
=
;
this
.
.
bufferChangeEvents
(
(
)
=>
{
this
.
.
set
(
?
.
toString
(
)
:
null
)
;
this
.
.
set
(
?
.
:
null
)
;
this
.
.
set
(
?
basename
(
)
:
null
)
;
this
.
.
set
(
?
this
.
uriToPath
(
dirname
(
)
)
:
null
)
;
this
.
.
set
(
?
this
.
uriToPath
(
)
:
null
)
;
this
.
_setLangId
(
)
;
this
.
.
set
(
?
extname
(
)
:
null
)
;
this
.
.
set
(
Boolean
(
)
)
;
this
.
.
set
(
?
this
.
.
hasProvider
(
)
:
false
)
;
}
)
;
}
protected
uriToPath
(
:
URI
)
:
string
{
if
(
.
===
.
)
{
return
.
;
}
return
.
;
}
reset
(
)
:
void
{
this
.
=
undefined
;
this
.
.
bufferChangeEvents
(
(
)
=>
{
this
.
.
reset
(
)
;
this
.
.
reset
(
)
;
this
.
.
reset
(
)
;
this
.
.
reset
(
)
;
this
.
.
reset
(
)
;
this
.
.
reset
(
)
;
this
.
.
reset
(
)
;
this
.
.
reset
(
)
;
this
.
.
reset
(
)
;
}
)
;
}
get
(
)
:
URI
|
undefined
{
return
this
.
;
}
}
export
class
ResourceContextKey
extends
AbstractResourceContextKey
{
private
readonly
=
new
DisposableStore
(
)
;
constructor
(
@IContextKeyService
:
,
@IFileService
:
,
@ILanguageService
:
,
@IModelService
:
)
{
super
(
,
,
,
)
;
this
.
.
add
(
.
onDidChangeFileSystemProviderRegistrations
(
(
)
=>
{
const
=
this
.
get
(
)
;
this
.
.
set
(
Boolean
(
&&
.
hasProvider
(
)
)
)
;
}
)
)
;
this
.
.
add
(
.
onModelAdded
(
=>
{
if
(
isEqual
(
.
,
this
.
get
(
)
)
)
{
this
.
_setLangId
(
)
;
}
}
)
)
;
this
.
.
add
(
.
onModelLanguageChanged
(
=>
{
if
(
isEqual
(
.
.
,
this
.
get
(
)
)
)
{
this
.
_setLangId
(
)
;
}
}
)
)
;
}
dispose
(
)
:
void
{
this
.
.
dispose
(
)
;
}
}
/**
* This is a version of ResourceContextKey that is not disposable and has no listeners for model change events.
* It will configure itself for the state/presence of a model only when created and not update.
*/
export
class
StaticResourceContextKey
extends
AbstractResourceContextKey
{
}
//#endregion
export
function
applyAvailableEditorIds
(
:
<
string
>
,
:
|
undefined
|
null
,
:
)
:
void
{
if
(
!
)
{
.
set
(
''
)
;
return
;
}
const
=
getAvailableEditorIds
(
,
)
;
.
set
(
.
join
(
','
)
)
;
}
function
getAvailableEditorIds
(
:
,
:
)
:
string
[
]
{
// Non text editor untitled files cannot be easily serialized between
// extensions so instead we disable this context key to prevent common
// commands that act on the active editor.
if
(
.
?.
===
.
&&
.
!==
DEFAULT_EDITOR_ASSOCIATION
.
)
{
return
[
]
;
}
// Diff editors. The original and modified resources of a diff editor
// *should* be the same, but calculate the set intersection just to be safe.