Это ide на основе vs code(code oss), в ней будет встроенный умный апи роутинг, свой маркет с плагинами(агент харнесс, поддержка java/kotlin/мобильной разработки, командная разработка проектов, orca, оркестратор агентов
/**
* The inline chat zone widget hosts four menus: `ChatEditorInlineExecute`,
* `ChatEditorInlineInputSide`, `ChatInput`, and `ChatExecute`. The latter
* two are shared with the regular chat widget, which evolves frequently.
*
* These tests evaluate the `when` clauses of menu items against faked
* inline chat context keys. They guard against regressions where commands
* from the normal chat panel accidentally become visible in inline chat.
* When a test fails, double-check that the change is intentional for the
* inline chat zone widget specifically and update the expected ids.
*/
suite
(
'Inline chat zone widget — menu contributions'
,
function
(
)
{
const
=
new
DisposableStore
(
)
;
suiteSetup
(
(
)
=>
{
// Register every action whose menu items can appear in the inline chat
// zone widget. We only call the public registration helpers so that
// adding a new action to one of those helpers will surface here.
.
add
(
registerChatExecuteActions
(
)
)
;
.
add
(
registerChatContextActions
(
)
)
;
.
add
(
registerChatToolActions
(
)
)
;
.
add
(
registerAction2
(
)
)
;
.
add
(
registerAction2
(
)
)
;
.
add
(
registerAction2
(
)
)
;
.
add
(
registerAction2
(
)
)
;
.
add
(
registerAction2
(
)
)
;
}
)
;
suiteTeardown
(
(
)
=>
{
.
dispose
(
)
;
}
)
;
ensureNoDisposablesAreLeakedInTestSuite
(
)
;
/**
* Base context keys for the inline chat zone widget in an editor.
* Simulates a typical inline chat state: `chatLocation` is `editor`,
* the inline chat agent is available, and `quickChatHasFocus` is false.
*/
const
:
<
string
,
>
=
{
// inline chat is in an editor, not a panel
'chatLocation'
:
'editor'
,
// the inline chat agent is available
'inlineChatHasEditsAgent'
:
true
,
// NOT in quick chat
'quickChatHasFocus'
:
false
,
// NOT in global editing session (this is inline chat, not panel edits)
'chatEdits.isGlobalEditingSession'
:
false
,
// NOT locked to coding agent
'lockedToCodingAgent'
:
false
,
// NOT in sessions window
'isSessionsWindow'
:
false
,
// chat is enabled
'chatIsEnabled'
:
true
,
// mode is 'ask'
'chatAgentKind'
:
'ask'
,
}
;
function
createContext
(
:
<
string
,
>
=
{
}
)
:
{
const
:
<
string
,
>
=
{
...
,
...
}
;
return
{
:
<
T
extends
ContextKeyValue
>
(
:
string
)
:
T
|
undefined
=>
[
]
as
T
|
undefined
}
;
}
function
visibleIds
(
:
,
:
)
:
string
[
]
{
return
.
getMenuItems
(
)
.
filter
(
)
.
filter
(
=>
!
.
||
.
.
evaluate
(
)
)
.
map
(
=>
.
.
)
.
sort
(
)
;
}
// --- ChatEditorInlineExecute ---
test
(
'ChatEditorInlineExecute — idle, user has typed text'
,
(
)
=>
{
const
=
createContext
(
{
'chatInputHasText'
:
true
,
'chatSessionHasActiveRequest'
:
false
,
'chatEdits.isRequestInProgress'
:
false
,
'chatEdits.hasEditorModifications'
:
false
,
}
)
;
.
deepStrictEqual
(
visibleIds
(
.
,
)
,
[
'inlineChat2.close'
,
'workbench.action.chat.submit'
,
]
.
sort
(
)
)
;
}
)
;
test
(
'ChatEditorInlineExecute — request in progress'
,
(
)
=>
{
const
=
createContext
(
{
'chatEdits.isRequestInProgress'
:
true
,
'chatSessionHasActiveRequest'
:
true
,
}
)
;
.
deepStrictEqual
(
visibleIds
(
.
,
)
,
[
'inlineChat2.close'
,
'workbench.action.chat.cancel'
,
]
.
sort
(
)
)
;
}
)
;
test
(
'ChatEditorInlineExecute — terminated'
,
(
)
=>
{
const
=
createContext
(
{
'inlineChatTerminated'
:
true
,
'chatEdits.hasEditorModifications'
:
false
,
'chatEdits.isRequestInProgress'
:
false
,
'chatSessionHasActiveRequest'
:
false
,
}
)
;
.
deepStrictEqual
(
visibleIds
(
.
,
)
,
[
'inlineChat2.close'
,
'inlineChat2.continueInChat'
,
'inlineChat2.rephrase'
,
'workbench.action.chat.submit'
,
]
.
sort
(
)
)
;
}
)
;
// --- ChatEditorInlineInputSide ---
test
(
'ChatEditorInlineInputSide — always empty'
,
(
)
=>
{
const
=
createContext
(
)
;
.
deepStrictEqual
(
visibleIds
(
.
,
)
,
[
]
)
;
}
)
;
// --- ChatInput (shared with panel) ---
test
(
'ChatInput — inline chat context must NOT show panel-only items'
,
(
)
=>
{
const
=
createContext
(
{
'agentSupportsAttachments'
:
true
,
}
)
;
const
=
visibleIds
(
.
,
)
;
// Panel-only commands must never appear in inline chat (chatLocation == 'editor')
const
=
[
'workbench.action.chat.openModePicker'
,
'workbench.action.chat.openSessionTargetPicker'
,
'workbench.action.chat.openWorkspacePicker'
,
'workbench.action.chat.chatSessionPrimaryPicker'
,
]
;
for
(
const
of
)
{
.
ok
(
!
.
includes
(
)
,
`panel-only command "${cmd}" should NOT appear in inline chat`
)
;
}
// The attach context action should be present for inline chat
.
ok
(
.
includes
(
'workbench.action.chat.attachContext'
)
,
'attachContext should appear in inline chat'
)
;
}
)
;
test
(
'ChatInput — panel context for comparison'
,
(
)
=>
{
const
=
createContext
(
{
'chatLocation'
:
'panel'
,
'agentSupportsAttachments'
:
true
,
'chatIsEnabled'
:
true
,
'chatSessionHasCustomAgentTarget'
:
true
,
}
)
;
const
=
visibleIds
(
.
,
)
;
// In the panel, mode picker and attach context should appear
.
ok
(
.
includes
(
'workbench.action.chat.attachContext'
)
,
'attachContext should appear in panel'
)
;
.
ok
(
.
includes
(
'workbench.action.chat.openModePicker'
)
,
'openModePicker should appear in panel'
)
;
}
)
;
// --- ChatExecute (shared with panel) ---
test
(
'ChatExecute — inline chat idle with ask mode'
,
(
)
=>
{
const
=
createContext
(
{
'chatSessionHasActiveRequest'
:
false
,
'withinEditSessionDiff'
:
false
,
}
)
;
const
=
visibleIds
(
.
,
)
;
.
ok
(
.
includes
(
'workbench.action.chat.submit'
)
,
'submit should appear'
)
;
.
ok
(
!
.
includes
(
'workbench.action.chat.cancel'
)
,
'cancel should NOT appear when idle'
)
;
.
ok
(
!
.
includes
(
'workbench.action.edits.submit'
)
,
'edits.submit should NOT appear in ask mode'
)
;
}
)
;
test
(
'ChatExecute — inline chat request in progress'
,
(
)
=>
{
const
=
createContext
(
{
'chatSessionHasActiveRequest'
:
true
,
'chatSessionCurrentlyEditing'
:
false
,
'chatRemoteJobCreating'
:
false
,
}
)
;
const
=
visibleIds
(
.
,
)
;
.
ok
(
.
includes
(
'workbench.action.chat.cancel'
)
,
'cancel should appear during request'
)
;
.
ok
(
!
.
includes
(
'workbench.action.chat.submit'
)
,
'submit should NOT appear during request'
)
;
}
)
;
test
(
'ChatExecute — quick chat items do NOT appear in inline chat'
,
(
)
=>
{
// Quick chat specific items (those gated on quickChatHasFocus) must not appear
const
=
createContext
(
{
'quickChatHasFocus'
:
false
,
'chatSessionHasActiveRequest'
:
false
,
}
)
;
const
=
visibleIds
(
.
,
)
;
// The attach context action in ChatExecute is gated on quickChatHasFocus
.
ok
(
!
.
includes
(
'workbench.action.chat.attachContext'
)
,
'attachContext (quick chat variant) should NOT appear in inline chat'