Это ide на основе vs code(code oss), в ней будет встроенный умный апи роутинг, свой маркет с плагинами(агент харнесс, поддержка java/kotlin/мобильной разработки, командная разработка проектов, orca, оркестратор агентов
"'Share' submenu in the file explorer context menu"
)
,
:
'contribShareMenu'
}
,
{
:
'editor/title/context'
,
:
.
,
:
localize
(
'menus.editorTabContext'
,
"The editor tabs context menu"
)
}
,
{
:
'editor/title/context/share'
,
:
.
,
:
localize
(
'menus.editorTitleContextShare'
,
"'Share' submenu inside the editor title context menu"
)
,
:
'contribShareMenu'
}
,
{
:
'debug/callstack/context'
,
:
.
,
:
localize
(
'menus.debugCallstackContext'
,
"The debug callstack view context menu"
)
}
,
{
:
'debug/variables/context'
,
:
.
,
:
localize
(
'menus.debugVariablesContext'
,
"The debug variables view context menu"
)
}
,
{
:
'debug/watch/context'
,
:
.
,
:
localize
(
'menus.debugWatchContext'
,
"The debug watch view context menu"
)
}
,
{
:
'debug/toolBar'
,
:
.
,
:
localize
(
'menus.debugToolBar'
,
"The debug toolbar menu"
)
}
,
{
:
'debug/createConfiguration'
,
:
.
,
:
'contribDebugCreateConfiguration'
,
:
localize
(
'menus.debugCreateConfiguation'
,
"The debug create configuration menu"
)
}
,
{
:
'notebook/variables/context'
,
:
.
,
:
localize
(
'menus.notebookVariablesContext'
,
"The notebook variables view context menu"
)
}
,
{
:
'menuBar/home'
,
:
.
,
:
localize
(
'menus.home'
,
"The home indicator context menu (web only)"
)
,
:
'contribMenuBarHome'
,
:
false
}
,
{
:
'menuBar/edit/copy'
,
:
.
,
:
localize
(
'menus.opy'
,
"'Copy as' submenu in the top level Edit menu"
)
}
,
{
:
'chat/input/status'
,
:
.
,
:
localize
(
'menus.chatInputStatus'
,
"The status indicator area at the rightmost end of the toolbar shown beneath the chat input"
)
,
:
false
}
,
{
:
'scm/title'
,
:
.
,
:
localize
(
'menus.scmTitle'
,
"The Source Control title menu"
)
}
,
{
:
'scm/sourceControl'
,
:
.
,
:
localize
(
'menus.scmSourceControl'
,
"The Source Control menu"
)
}
,
{
:
'scm/repositories/title'
,
:
.
,
:
localize
(
'menus.scmSourceControlTitle'
,
"The Source Control Repositories title menu"
)
,
:
'contribSourceControlTitleMenu'
}
,
{
:
'scm/repository'
,
:
.
,
:
localize
(
'menus.scmSourceControlInline'
,
"The Source Control repository menu"
)
,
}
,
{
:
'scm/resourceState/context'
,
:
.
,
:
localize
(
'menus.resourceStateContext'
,
"The Source Control resource state context menu"
)
}
,
{
:
'scm/resourceFolder/context'
,
:
.
,
:
localize
(
'menus.resourceFolderContext'
,
"The Source Control resource folder context menu"
)
}
,
{
:
'scm/resourceGroup/context'
,
:
.
,
:
localize
(
'menus.resourceGroupContext'
,
"The Source Control resource group context menu"
)
}
,
{
:
'scm/change/title'
,
:
.
,
:
localize
(
'menus.changeTitle'
,
"The Source Control inline change menu"
)
}
,
{
:
'scm/inputBox'
,
:
.
,
:
localize
(
'menus.input'
,
"The Source Control input box menu"
)
,
:
'contribSourceControlInputBoxMenu'
}
,
{
:
'scm/history/title'
,
:
.
,
:
localize
(
'menus.scmHistoryTitle'
,
"The Source Control History title menu"
)
,
:
'contribSourceControlHistoryTitleMenu'
}
,
{
:
'scm/historyItem/context'
,
:
.
,
:
localize
(
'menus.historyItemContext'
,
"The Source Control history item context menu"
)
,
:
'contribSourceControlHistoryItemMenu'
}
,
{
:
'scm/historyItemRef/context'
,
:
.
,
:
localize
(
'menus.historyItemRefContext'
,
"The Source Control history item reference context menu"
)
,
:
'contribSourceControlHistoryItemMenu'
}
,
{
:
'scm/artifactGroup/context'
,
:
.
,
:
localize
(
'menus.artifactGroupContext'
,
"The Source Control artifact group context menu"
)
,
:
'contribSourceControlArtifactGroupMenu'
}
,
{
:
'scm/artifact/context'
,
:
.
,
:
localize
(
'menus.artifactContext'
,
"The Source Control artifact context menu"
)
,
:
'contribSourceControlArtifactMenu'
}
,
{
:
'statusBar/remoteIndicator'
,
:
.
,
:
localize
(
'menus.statusBarRemoteIndicator'
,
"The remote indicator menu in the status bar"
)
,
:
false
}
,
{
:
'terminal/context'
,
:
.
,
:
localize
(
'menus.terminalContext'
,
"The terminal context menu"
)
}
,
{
:
'terminal/title/context'
,
:
.
,
:
localize
(
'menus.terminalTabContext'
,
"The terminal tabs context menu"
)
}
,
{
:
'view/title'
,
:
.
,
:
localize
(
'view.viewTitle'
,
"The contributed view title menu"
)
}
,
{
:
'viewContainer/title'
,
:
.
,
:
localize
(
'view.containerTitle'
,
"The contributed view container title menu"
)
,
:
'contribViewContainerTitle'
}
,
{
:
'view/item/context'
,
:
.
,
:
localize
(
'view.itemContext'
,
"The contributed view item context menu"
)
}
,
{
:
'comments/comment/editorActions'
,
:
.
,
:
localize
(
'commentThread.editorActions'
,
"The contributed comment editor actions"
)
,
:
'contribCommentEditorActionsMenu'
}
,
{
:
'comments/commentThread/title'
,
:
.
,
:
localize
(
'commentThread.title'
,
"The contributed comment thread title menu"
)
}
,
{
:
'comments/commentThread/context'
,
:
.
,
:
localize
(
'commentThread.actions'
,
"The contributed comment thread context menu, rendered as buttons below the comment editor"
)
,
:
false
}
,
{
:
'comments/commentThread/additionalActions'
,
:
.
,
:
localize
(
'commentThread.actions'
,
"The contributed comment thread context menu, rendered as buttons below the comment editor"
)
,
:
true
,
:
'contribCommentThreadAdditionalMenu'
}
,
{
:
'comments/commentThread/title/context'
,
:
.
,
:
localize
(
'commentThread.titleContext'
,
"The contributed comment thread title's peek context menu, rendered as a right click menu on the comment thread's peek title."
)
,
:
'contribCommentPeekContext'
}
,
{
:
'comments/comment/title'
,
:
.
,
:
localize
(
'comment.title'
,
"The contributed comment title menu"
)
}
,
{
:
'comments/comment/context'
,
:
.
,
:
localize
(
'comment.actions'
,
"The contributed comment context menu, rendered as buttons below the comment editor"
)
,
:
false
}
,
{
:
'comments/commentThread/comment/context'
,
:
.
,
:
localize
(
'comment.commentContext'
,
"The contributed comment context menu, rendered as a right click menu on the an individual comment in the comment thread's peek view."
)
,
:
'contribCommentPeekContext'
}
,
{
:
'commentsView/commentThread/context'
,
:
.
,
:
localize
(
'commentsView.threadActions'
,
"The contributed comment thread context menu in the comments view"
)
,
:
'contribCommentsViewThreadMenus'
}
,
{
:
'notebook/toolbar'
,
:
.
,
:
localize
(
'notebook.toolbar'
,
"The contributed notebook toolbar menu"
)
}
,
{
:
'notebook/kernelSource'
,
:
.
,
:
localize
(
'notebook.kernelSource'
,
"The contributed notebook kernel sources menu"
)
,
:
'notebookKernelSource'
}
,
{
:
'notebook/cell/title'
,
:
.
,
:
localize
(
'notebook.cell.title'
,
"The contributed notebook cell title menu"
)
}
,
{
:
'notebook/cell/execute'
,
:
.
,
:
localize
(
'notebook.cell.execute'
,
"The contributed notebook cell execution menu"
)
}
,
{
:
'interactive/toolbar'
,
:
.
,
:
localize
(
'interactive.toolbar'
,
"The contributed interactive toolbar menu"
)
,
}
,
{
:
'interactive/cell/title'
,
:
.
,
:
localize
(
'interactive.cell.title'
,
"The contributed interactive cell title menu"
)
,
}
,
{
:
'issue/reporter'
,
:
.
,
:
localize
(
'issue.reporter'
,
"The contributed issue reporter menu"
)
}
,
{
:
'testing/item/context'
,
:
.
,
:
localize
(
'testing.item.context'
,
"The contributed test item menu"
)
,
}
,
{
:
'testing/item/gutter'
,
:
.
,
:
localize
(
'testing.item.gutter.title'
,
"The menu for a gutter decoration for a test item"
)
,
}
,
{
:
'testing/profiles/context'
,
:
.
,
:
localize
(
'testing.profiles.context.title'
,
"The menu for configuring testing profiles."
)
,
}
,
{
:
'testing/item/result'
,
:
.
,
:
localize
(
'testing.item.result.title'
,
"The menu for an item in the Test Results view or peek."
)
,
}
,
{
:
'testing/message/context'
,
:
.
,
:
localize
(
'testing.message.context.title'
,
"A prominent button overlaying editor content where the message is displayed"
)
,
}
,
{
:
'testing/message/content'
,
:
.
,
:
localize
(
'testing.message.content.title'
,
"Context menu for the message in the results tree"
)
,
}
,
{
:
'extension/context'
,
:
.
,
:
localize
(
'menus.extensionContext'
,
"The extension context menu"
)
}
,
{
:
'timeline/title'
,
:
.
,
:
localize
(
'view.timelineTitle'
,
"The Timeline view title menu"
)
}
,
{
:
'timeline/item/context'
,
:
.
,
:
localize
(
'view.timelineContext'
,
"The Timeline view item context menu"
)
}
,
{
:
'ports/item/context'
,
:
.
,
:
localize
(
'view.tunnelContext'
,
"The Ports view item context menu"
)
}
,
{
:
'ports/item/origin/inline'
,
:
.
,
:
localize
(
'view.tunnelOriginInline'
,
"The Ports view item origin inline menu"
)
}
,
{
:
'ports/item/port/inline'
,
:
.
,
:
localize
(
'view.tunnelPortInline'
,
"The Ports view item port inline menu"
)
}
,
{
:
'file/newFile'
,
:
.
,
:
localize
(
'file.newFile'
,
"The 'New File...' quick pick, shown on welcome page and File menu."
)
,
:
false
,
}
,
{
:
'webview/context'
,
:
.
,
:
localize
(
'webview.context'
,
"The webview context menu"
)
}
,
{
:
'file/share'
,
:
.
,
:
localize
(
'menus.share'
,
"Share submenu shown in the top level File menu."
)
,
:
'contribShareMenu'
}
,
{
:
'editor/inlineCompletions/actions'
,
:
.
,
:
localize
(
'inlineCompletions.actions'
,
"The actions shown when hovering on an inline completion"
)
,
:
false
,
:
'inlineCompletionsAdditions'
}
,
{
:
'editor/content'
,
:
.
,
:
localize
(
'merge.toolbar'
,
"The prominent button in an editor, overlays its content"
)
,
:
'contribEditorContentMenu'
}
,
{
:
'editor/lineNumber/context'
,
:
.
,
:
localize
(
'editorLineNumberContext'
,
"The contributed editor line number context menu"
)
}
,
{
:
'mergeEditor/result/title'
,
:
.
,
:
localize
(
'menus.mergeEditorResult'
,
"The result toolbar of the merge editor"
)
,
:
'contribMergeEditorMenus'
}
,
{
:
'multiDiffEditor/content'
,
:
.
,
:
localize
(
'menus.multiDiffEditorContent'
,
"A prominent button overlaying the multi diff editor"
)
,
:
'contribEditorContentMenu'
}
,
{
:
'multiDiffEditor/resource/title'
,
:
.
,
:
localize
(
'menus.multiDiffEditorResource'
,
"The resource toolbar in the multi diff editor"
)
,
:
'contribMultiDiffEditorMenus'
}
,
{
:
'diffEditor/gutter/hunk'
,
:
.
,
:
localize
(
'menus.diffEditorGutterToolBarMenus'
,
"The gutter toolbar in the diff editor"
)
,
:
'contribDiffEditorGutterToolBarMenus'
}
,
{
:
'diffEditor/gutter/selection'
,
:
.
,
:
localize
(
'menus.diffEditorGutterToolBarMenus'
,
"The gutter toolbar in the diff editor"
)
,
:
'contribDiffEditorGutterToolBarMenus'
}
,
{
:
'searchPanel/aiResults/commands'
,
:
.
,
:
localize
(
'searchPanel.aiResultsCommands'
,
"The commands that will contribute to the menu rendered as buttons next to the AI search title"
)
,
}
,
{
:
'editor/context/chat'
,
:
.
,
:
localize
(
'menus.chatTextEditor'
,
"The Chat submenu in the text editor context menu."
)
,
:
false
,
:
'chatParticipantPrivate'
}
,
{
:
'chat/input/editing/sessionToolbar'
,
:
.
,
:
localize
(
'menus.chatEditingSessionChangesToolbar'
,
"The Chat Editing widget toolbar menu for session changes."
)
,
:
'chatSessionsProvider'
}
,
{
:
'chat/input/editing/sessionTitleToolbar'
,
:
.
,
:
localize
(
'menus.chatEditingSessionTitleToolbar'
,
"The Chat Editing widget toolbar menu for session title."
)
,
:
'chatSessionsProvider'
}
,
{
// TODO: rename this to something like: `chatSessions/item/inline`
:
'chat/chatSessions'
,
:
.
,
:
localize
(
'menus.chatSessions'
,
"The Chat Sessions menu."
)
,
:
false
,
:
'chatSessionsProvider'
}
,
{
:
'chatSessions/item/context'
,
:
.
,
:
localize
(
'menus.chatSessionsItemContext'
,
"The context menu for items in the Sessions window's session list."
)
,
:
false
,
:
'chatSessionsProvider'
}
,
{
:
'chatSessions/newSession'
,
:
.
,
:
localize
(
'menus.chatSessionsNewSession'
,
"Menu for new chat sessions."
)
,
:
false
,
:
'chatSessionsProvider'
}
,
{
:
'chat/multiDiff/context'
,
:
.
,
:
localize
(
'menus.chatMultiDiffContext'
,
"The Chat Multi-Diff context menu."
)
,
:
false
,
:
'chatSessionsProvider'
,
}
,
{
:
'chat/customizations/create'
,
:
.
for
(
'AICustomizationManagementCreate'
)
,
:
localize
(
'menus.chatCustomizationsCreate'
,
"The create button in the Chat Customizations management editor."
)
,
:
false
,
:
'chatSessionCustomizationProvider'
,
}
,
{
:
'chat/customizations/item'
,
:
.
for
(
'AICustomizationManagementEditorItem'
)
,
:
localize
(
'menus.chatCustomizationsItem'
,
"The item context menu in the Chat Customizations management editor, including inline actions."
)
,
:
false
,
:
'chatSessionCustomizationProvider'
,
}
,
{
:
'chat/editor/inlineGutter'
,
:
.
,
:
localize
(
'menus.chatEditorInlineGutter'
,
"The inline gutter menu in the chat editor."
)
,
:
false
,
:
'contribChatEditorInlineGutterMenu'
,
}
,
{
:
'chat/contextUsage/actions'
,
:
.
,
:
localize
(
'menus.chatContextUsageActions'
,
"Actions in the chat context usage details popup."
)
,
:
'chatParticipantAdditions'
}
,
{
:
'chat/newSession'
,
:
.
,
:
localize
(
'menus.chatNewSession'
,
"The Chat new session menu."
)
,
:
'chatSessionsProvider'
}
,
{
:
'agents/changes/actions'
,
:
.
,
:
localize
(
'menus.agentsChangesToolbar'
,
"The Changes view toolbar of the agents window."
)
,
:
'chatSessionsProvider'
}
,
{
:
'agents/changes/actions/primary'
,
:
.
,
:
localize
(
'menus.agentsChangesPrimaryActionSubMenu'
,
"The Changes view toolbar primary action submenu in the agents window."
)
,
:
'chatSessionsProvider'
}
,
{
:
'agents/change/inline'
,
:
.
,
:
localize
(
'menus.agentsChangeInline'
,
"The Changes view inline menu in the agents window."
)
,
:
'chatSessionsProvider'
}
,
]
;
namespace
{
// --- menus, submenus contribution point
export
interface
IUserFriendlyMenuItem
{
:
string
;
?
:
string
;
?
:
string
;
?
:
string
;
}
export
interface
IUserFriendlySubmenuItem
{
:
string
;
?
:
string
;
?
:
string
;
}
export
interface
IUserFriendlySubmenu
{
:
string
;
:
string
;
?
:
;
}
export
function
isMenuItem
(
:
|
)
:
is
{
return
typeof
(
as
)
.
===
'string'
;
}
export
function
isValidMenuItem
(
:
,
:
)
:
boolean
{
if
(
typeof
.
!==
'string'
)
{
.
error
(
localize
(
'requirestring'
,
"property `{0}` is mandatory and must be of type `string`"
,
'command'
)
)
;
return
false
;
}
if
(
.
&&
typeof
.
!==
'string'
)
{
.
error
(
localize
(
'optstring'
,
"property `{0}` can be omitted or must be of type `string`"
,
'alt'
)
)
;
return
false
;
}
if
(
.
&&
typeof
.
!==
'string'
)
{
.
error
(
localize
(
'optstring'
,
"property `{0}` can be omitted or must be of type `string`"
,
'when'
)
)
;
return
false
;
}
if
(
.
&&
typeof
.
!==
'string'
)
{
.
error
(
localize
(
'optstring'
,
"property `{0}` can be omitted or must be of type `string`"
,
'group'
)
)
;
return
false
;
}
return
true
;
}
export
function
isValidSubmenuItem
(
:
,
:
)
:
boolean
{
if
(
typeof
.
!==
'string'
)
{
.
error
(
localize
(
'requirestring'
,
"property `{0}` is mandatory and must be of type `string`"
,
'submenu'
)
)
;
return
false
;
}
if
(
.
&&
typeof
.
!==
'string'
)
{
.
error
(
localize
(
'optstring'
,
"property `{0}` can be omitted or must be of type `string`"
,
'when'
)
)
;
return
false
;
}
if
(
.
&&
typeof
.
!==
'string'
)
{
.
error
(
localize
(
'optstring'
,
"property `{0}` can be omitted or must be of type `string`"
,
'group'
)
)
;
return
false
;
}
return
true
;
}
export
function
isValidItems
(
:
(
|
)
[
]
,
:
)
:
boolean
{
if
(
!
Array
.
isArray
(
)
)
{
.
error
(
localize
(
'requirearray'
,
"submenu items must be an array"
)
)
;
return
false
;
}
for
(
const
of
)
{
if
(
isMenuItem
(
)
)
{
if
(
!
isValidMenuItem
(
,
)
)
{
return
false
;
}
}
else
{
if
(
!
isValidSubmenuItem
(
,
)
)
{
return
false
;
}
}
}
return
true
;
}
export
function
isValidSubmenu
(
:
,
:
)
:
boolean
{
if
(
typeof
!==
'object'
)
{
.
error
(
localize
(
'require'
,
"submenu items must be an object"
)
)
;
return
false
;
}
if
(
typeof
.
!==
'string'
)
{
.
error
(
localize
(
'requirestring'
,
"property `{0}` is mandatory and must be of type `string`"
,
'id'
)
)
;
return
false
;
}
if
(
typeof
.
!==
'string'
)
{
.
error
(
localize
(
'requirestring'
,
"property `{0}` is mandatory and must be of type `string`"
,
'label'
)
)
;
return
false
;
}
return
true
;
}
const
:
=
{
:
'object'
,
:
[
'command'
]
,
:
{
:
{
:
localize
(
'vscode.extension.contributes.menuItem.command'
,
'Identifier of the command to execute. The command must be declared in the \'commands\'-section'
)
,
:
'string'
}
,
:
{
:
localize
(
'vscode.extension.contributes.menuItem.alt'
,
'Identifier of an alternative command to execute. The command must be declared in the \'commands\'-section'
)
,
:
'string'
}
,
:
{
:
localize
(
'vscode.extension.contributes.menuItem.when'
,
'Condition which must be true to show this item'
)
,
:
'string'
}
,
:
{
:
localize
(
'vscode.extension.contributes.menuItem.group'
,
'Group into which this item belongs'
)
,
:
'string'
}
}
}
;
const
:
=
{
:
'object'
,
:
[
'submenu'
]
,
:
{
:
{
:
localize
(
'vscode.extension.contributes.menuItem.submenu'
,
'Identifier of the submenu to display in this item.'
)
,
:
'string'
}
,
:
{
:
localize
(
'vscode.extension.contributes.menuItem.when'
,
'Condition which must be true to show this item'
)
,
:
'string'
}
,
:
{
:
localize
(
'vscode.extension.contributes.menuItem.group'
,
'Group into which this item belongs'
)
,
:
'string'
}
}
}
;
const
:
=
{
:
'object'
,
:
[
'id'
,
'label'
]
,
:
{
:
{
:
localize
(
'vscode.extension.contributes.submenu.id'
,
'Identifier of the menu to display as a submenu.'
)
,
:
'string'
}
,
:
{
:
localize
(
'vscode.extension.contributes.submenu.label'
,
'The label of the menu item which leads to this submenu.'
)
,
:
'string'
}
,
:
{
:
localize
(
{
:
'vscode.extension.contributes.submenu.icon'
,
:
[
'do not translate or change "\\$(zap)", \\ in front of $ is important.'
]
}
,
'(Optional) Icon which is used to represent the submenu in the UI. Either a file path, an object with file paths for dark and light themes, or a theme icon references, like "\\$(zap)"'
'(Optional) Short title by which the command is represented in the UI. Menus pick either `title` or `shortTitle` depending on the context in which they show commands.'
'(Optional) Condition which must be true to enable the command in the UI (menu and keybindings). Does not prevent executing the command by other means, like the `executeCommand`-api.'
)
,
:
'string'
}
,
:
{
:
localize
(
{
:
'vscode.extension.contributes.commandType.icon'
,
:
[
'do not translate or change "\\$(zap)", \\ in front of $ is important.'
]
}
,
'(Optional) Icon which is used to represent the command in the UI. Either a file path, an object with file paths for dark and light themes, or a theme icon references, like "\\$(zap)"'
"{0} is a proposed menu identifier. It requires 'package.json#enabledApiProposals: [\"{1}\"]' and is only available when running out of dev or with the following command line switch: --enable-proposed-api {2}"
,
[
0
]
,
.
,
.
.
.
)
)
;
continue
;
}
for
(
const
of
[
1
]
)
{
let
:
|
;
if
(
.
isMenuItem
(
)
)
{
const
=
.
getCommand
(
.
)
;
const
=
.
&&
.
getCommand
(
.
)
||
undefined
;
if
(
!
)
{
.
error
(
localize
(
'missing.command'
,
"Menu item references a command `{0}` which is not defined in the 'commands' section."
,
.
)
)
;
continue
;
}
if
(
.
&&
!
)
{
.
warn
(
localize
(
'missing.altCommand'
,
"Menu item references an alt-command `{0}` which is not defined in the 'commands' section."
,
.
)
)
;
}
if
(
.
===
.
)
{
.
info
(
localize
(
'dupe.command'
,
"Menu item references the same command as default and alt-command"
)
)
;
}
=
{
,
,
:
undefined
,
:
undefined
,
:
undefined
}
;
}
else
{
if
(
.
===
false
)
{
.
error
(
localize
(
'unsupported.submenureference'
,
"Menu item references a submenu for a menu which doesn't have submenu support."
)
)
;
continue
;
}
const
=
.
get
(
.
)
;
if
(
!
)
{
.
error
(
localize
(
'missing.submenu'
,
"Menu item references a submenu `{0}` which is not defined in the 'submenus' section."
,
.
)
)
;
continue
;
}
let
=
.
get
(
.
.
)
;
if
(
!
)
{
=
new
Set
(
)
;
.
set
(
.
.
,
)
;
}
if
(
.
has
(
.
.
)
)
{
.
warn
(
localize
(
'submenuItem.duplicate'
,
"The `{0}` submenu was already contributed to the `{1}` menu."
,
.
,
[
0
]
)
)
;
continue
;
}
.
add
(
.
.
)
;
=
{
:
.
,
:
.
,
:
.
,
:
undefined
,
:
undefined
,
:
undefined
}
;
}
if
(
.
)
{
const
=
.
.
lastIndexOf
(
'@'
)
;
if
(
>
0
)
{
.
=
.
.
substr
(
0
,
)
;
.
=
Number
(
.
.
substr
(
+
1
)
)
||
undefined
;
}
else
{
.
=
.
;
}
}
if
(
.
===
.
&&
!
.
?.
includes
(
'viewContainer == workbench.view.debug'
)
)
{
// Not a perfect check but enough to communicate that this proposed extension point is currently only for the debug view container
.
error
(
localize
(
'viewContainerTitle.when'
,
"The {0} menu contribution must check {1} in its {2} clause."
,
'`viewContainer/title`'
,
'`viewContainer == workbench.view.debug`'
,
'"when"'
)
)
;
continue
;
}
.
=
.
deserialize
(
.
)
;
.
add
(
.
appendMenuItem
(
.
,
)
)
;
}
}
}
}
)
;
class
CommandsTableRenderer
extends
Disposable
implements
IExtensionFeatureTableRenderer
{
readonly
=
'table'
;
constructor
(
@IKeybindingService
private
readonly
:
)
{
super
(
)
;
}
shouldRender
(
:
)
:
boolean
{
return
!
!
.
?.
;
}
render
(
:
)
:
<
>
{
const
=
.
?.
||
[
]
;
const
=
.
map
(
=>
(
{
:
.
,
:
.
,
:
[
]
as
[
]
,
:
[
]
as
string
[
]
}
)
)
;
const
=
index
(
,
=>
.
)
;
const
=
.
?.
||
{
}
;
// Add to commandPalette array any commands not explicitly contributed to it
const
=
index
(
,
=>
.
)
;
if
(
[
'commandPalette'
]
)
{
for
(
const
of
[
'commandPalette'
]
)
{
delete
[
.
]
;
}
}
if
(
.
keys
(
)
.
)
{
if
(
!
[
'commandPalette'
]
)
{
[
'commandPalette'
]
=
[
]
;
}
for
(
const
in
)
{
[
'commandPalette'
]
.
push
(
{
}
)
;
}
}
for
(
const
in
)
{
for
(
const
of
[
]
)
{
// This typically happens for the commandPalette context