ide на основе vs code
Это ide на основе vs code(code oss), в ней будет встроенный умный апи роутинг, свой маркет с плагинами(агент харнесс, поддержка java/kotlin/мобильной разработки, командная разработка проектов, orca, оркестратор агентов
Это ide на основе vs code(code oss), в ней будет встроенный умный апи роутинг, свой маркет с плагинами(агент харнесс, поддержка java/kotlin/мобильной разработки, командная разработка проектов, orca, оркестратор агентов
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import assert from 'assert';
import { ensureNoDisposablesAreLeakedInTestSuite } from '../../../../base/test/common/utils.js';
import { sortCustomizationEnablement, withCustomizationEnablement } from '../../common/customizationEnablement.js';
import { changesetReducer, chatReducer, sessionReducer } from '../../common/state/protocol/reducers.js';
import { ChatInputRequestPurpose, withChatInputRequestPurpose } from '../../common/meta/agentChatInputRequestMeta.js';
import { ActionType } from '../../common/state/sessionActions.js';
import { ChangesetStatus, ChangesetOperationStatus, CustomizationLoadStatus, MessageKind ChatInputAnswerState ChatInputAnswerValueKind ChatInputQuestionKind ChatInputResponseKind ChatOriginKind SessionLifecycle SessionStatus ToolCallConfirmationReason ToolCallRiskAssessmentKind ToolCallRiskAssessmentStatus ResponsePartKind ToolCallStatus TurnState
CustomizationEnablementKind CustomizationType McpServerStatus ToolCallContributorKind
SessionState
provider
title
status SessionStatusIdle
project uri displayName
lifecycle SessionLifecycleReady
activeClients
chats
ChatState
now Date
resource
title
status SessionStatusIdle
modifiedAt now
origin kind ChatOriginKindUser
turns
activeTurn
state ChatState ChatState
state state
type ActionTypeChatTurnStarted
turnId
startedAt
message text origin kind MessageKindUser
state state
type ActionTypeChatToolCallStart
turnId
toolCallId
toolName
displayName
state
state
type ActionTypeChatTurnStarted
turnId
startedAt
message text origin kind MessageKindUser
activeStartedAt stateactiveTurnstartedAt
state state
type ActionTypeChatTurnComplete
turnId
duration
assert
activeStartedAt
completedStartedAt stateturnsstartedAt
duration stateturnsduration
activeStartedAt
completedStartedAt
duration
active
type ActionTypeChatTurnStarted
turnId
startedAt
message text origin kind MessageKindUser
afterNegativeDuration active
type ActionTypeChatTurnComplete
turnId
duration
assertafterNegativeDurationturns
id
startedAt
duration
message text origin kind MessageKindUser
responseParts
usage
state TurnStateComplete
state
type ActionTypeChatTurnStarted
turnId
startedAt
message text origin kind MessageKindUser
state state
type ActionTypeChatError
turnId
duration
part kind ResponsePartKindError error errorType message resumable
state state type ActionTypeChatTurnResume turnId
state state
type ActionTypeChatError
turnId
duration
part kind ResponsePartKindError error errorType message resumable
state state type ActionTypeChatTurnResume turnId
state state type ActionTypeChatTurnComplete turnId duration
assert
activeTurn stateactiveTurn
turns stateturnsturn
id turnid
message turnmessagetext
state turnstate
duration turnduration
errors turnresponsePartspart partkind ResponsePartKindError
activeTurn
turns
id
message
state TurnStateComplete
duration
errors
kind ResponsePartKindError error errorType message resumable
kind ResponsePartKindError error errorType message resumable
state
state state
type ActionTypeChatToolCallReady
turnId
toolCallId
invocationMessage
toolInput
assertstatestatus SessionStatusInputNeeded
state
state state
type ActionTypeChatToolCallReady
turnId
toolCallId
invocationMessage
toolInput
confirmed ToolCallConfirmationReasonNotNeeded
state state
type ActionTypeChatToolCallComplete
turnId
toolCallId
requiresResultConfirmation
result
success
pastTenseMessage
assertstatestatus SessionStatusInputNeeded
state
state state
type ActionTypeChatToolCallReady
turnId
toolCallId
invocationMessage
toolInput
assertstatestatus SessionStatusInputNeeded
state state
type ActionTypeChatToolCallConfirmed
turnId
toolCallId
approved
confirmed ToolCallConfirmationReasonUserAction
assertstatestatus SessionStatusInProgress
state
state state
type ActionTypeChatInputRequested
request
id
message
questions
kind ChatInputQuestionKindText
id
message
required
ChatInputRequestPurposeAskUser
assert
status statestatus
responsePart stateactiveTurnresponseParts
status SessionStatusInputNeeded
responsePart
kind ResponsePartKindInputRequest
request
id
message
questions
kind ChatInputQuestionKindText
id
message
required
ChatInputRequestPurposeAskUser
state
state state
type ActionTypeChatInputRequested
request
id
questions kind ChatInputQuestionKindText id message
ChatInputRequestPurposeAskUser
state state
type ActionTypeChatInputAnswerChanged
requestId
questionId
answer state ChatInputAnswerStateSubmitted value kind ChatInputAnswerValueKindText value
state state
type ActionTypeChatInputRequested
request
id
questions kind ChatInputQuestionKindText id message
ChatInputRequestPurposeAskUser
state state
type ActionTypeChatInputCompleted
requestId
response ChatInputResponseKindAccept
assertstateactiveTurnresponseParts
kind ResponsePartKindInputRequest
request
id
questions kind ChatInputQuestionKindText id message
answers
state ChatInputAnswerStateSubmitted value kind ChatInputAnswerValueKindText value
ChatInputRequestPurposeAskUser
response ChatInputResponseKindAccept
state
type ActionTypeChatInputRequested
request id questions
assert
status statestatus
activeTurn stateactiveTurn
status SessionStatusIdle
activeTurn
state
state state
type ActionTypeChatInputRequested
request
id
message
questions
kind ChatInputQuestionKindText
id
message
required
ChatInputRequestPurposeAskUser
assertstatestatus SessionStatusInputNeeded
state state
type ActionTypeChatInputCompleted
requestId
response ChatInputResponseKindAccept
answers state ChatInputAnswerStateSubmitted value kind ChatInputAnswerValueKindText value
assert
status statestatus
responsePart stateactiveTurnresponseParts
status SessionStatusInProgress
responsePart
kind ResponsePartKindInputRequest
request
id
message
questions
kind ChatInputQuestionKindText
id
message
required
answers
state ChatInputAnswerStateSubmitted
value kind ChatInputAnswerValueKindText value
ChatInputRequestPurposeAskUser
response ChatInputResponseKindAccept
state
assertstatestatus SessionStatusInProgress
state state
type ActionTypeChatToolCallReady
turnId
toolCallId
invocationMessage
toolInput
assertstatestatus SessionStatusInputNeeded
state
pending state
type ActionTypeChatToolCallReady
turnId
toolCallId
invocationMessage
toolInput
_meta autoApproveBySetting
running state
type ActionTypeChatToolCallReady
turnId
toolCallId
invocationMessage
toolInput
confirmed ToolCallConfirmationReasonNotNeeded
_meta autoApproveBySetting
s ChatState
part sactiveTurnresponsePartspart partkind ResponsePartKindToolCall parttoolCalltoolCallId
assertpartkind ResponsePartKindToolCall
parttoolCall
assert
status pendingstatus meta pending_meta
status runningstatus meta running_meta
status ToolCallStatusPendingConfirmation meta autoApproveBySetting
status ToolCallStatusRunning meta autoApproveBySetting
state
type ActionTypeChatTurnStarted
turnId
startedAt
message text origin kind MessageKindUser
state state
type ActionTypeChatToolCallStart
turnId
toolCallId
toolName
displayName
state state
type ActionTypeChatToolCallDelta
turnId
toolCallId
content
invocationMessage
part stateactiveTurnresponsePartspart partkind ResponsePartKindToolCall
assertpartkind ResponsePartKindToolCall
assert
invocationMessage parttoolCallstatus ToolCallStatusStreaming parttoolCallinvocationMessage
partialInput parttoolCallstatus ToolCallStatusStreaming parttoolCallpartialInput
invocationMessage
partialInput
state
type ActionTypeChatTurnStarted
turnId
startedAt
message text origin kind MessageKindUser
state state
type ActionTypeChatToolCallStart
turnId
toolCallId
toolName
displayName
intention
state state
type ActionTypeChatToolCallReady
turnId
toolCallId
contributor kind ToolCallContributorKind customizationId
intention
invocationMessage
toolInput
confirmed ToolCallConfirmationReasonNotNeeded
part stateactiveTurnresponsePartspart partkind ResponsePartKindToolCall
assertpartkind ResponsePartKindToolCall
assert
status parttoolCallstatus
contributor parttoolCallcontributor
intention parttoolCallintention
status ToolCallStatusRunning
contributor kind ToolCallContributorKind customizationId
intention
startContributor ToolCallContributor contributor ToolCallContributor
state
type ActionTypeChatTurnStarted
turnId
startedAt
message text origin kind MessageKindUser
state state
type ActionTypeChatToolCallStart
turnId
toolCallId
toolName
displayName
contributor startContributor
state state
type ActionTypeChatToolCallReady
turnId
toolCallId
contributor
invocationMessage
confirmed ToolCallConfirmationReasonNotNeeded
part stateactiveTurnresponsePartspart partkind ResponsePartKindToolCall
assertpartkind ResponsePartKindToolCall
parttoolCallcontributor
assert
kind ToolCallContributorKindClient clientId
kind ToolCallContributorKind customizationId
kind ToolCallContributorKindClient clientId
kind ToolCallContributorKindClient clientId
kind ToolCallContributorKindClient clientId
kind ToolCallContributorKindClient clientId
kind ToolCallContributorKindClient clientId
kind ToolCallContributorKind customizationId
kind ToolCallContributorKindClient clientId
kind ToolCallContributorKindClient clientId
loading
type ActionTypeChatToolCallReady
turnId
toolCallId
invocationMessage
confirmationTitle
toolInput
riskAssessment
kind ToolCallRiskAssessmentKindJudge
status ToolCallRiskAssessmentStatusLoading
complete loading
type ActionTypeChatToolCallReady
turnId
toolCallId
invocationMessage
riskAssessment
kind ToolCallRiskAssessmentKindJudge
status ToolCallRiskAssessmentStatusComplete
reason
safety
part completeactiveTurnresponsePartspart partkind ResponsePartKindToolCall parttoolCalltoolCallId
assertpartkind ResponsePartKindToolCall parttoolCallstatus ToolCallStatusPendingConfirmation
assert
confirmationTitle parttoolCallconfirmationTitle
toolInput parttoolCalltoolInput
riskAssessment parttoolCallriskAssessment
confirmationTitle
toolInput
riskAssessment
kind ToolCallRiskAssessmentKindJudge
status ToolCallRiskAssessmentStatusComplete
reason
safety
ready ChangesetState status ChangesetStatusReady files
fileA id edit after uri content uri diff added removed
fileARenamed id edit after uri content uri diff added removed
next ready type ActionTypeChangesetFileSet file fileA
assertnextfiles fileA
seeded ready type ActionTypeChangesetFileSet file fileA
next seeded type ActionTypeChangesetFileSet file fileARenamed
assertnextfiles fileARenamed
seeded ready type ActionTypeChangesetFileSet file fileA
next seeded type ActionTypeChangesetFileRemoved fileId fileAid
assertnextfiles
seeded ready type ActionTypeChangesetFileSet file fileA
next seeded type ActionTypeChangesetFileRemoved fileId
assertnext seeded
err errorType message
next ready type ActionTypeChangesetStatusChanged status ChangesetStatusError error err
assert status nextstatus error nexterror status ChangesetStatusError error err
errored ChangesetState status ChangesetStatusError error errorType message files fileA
next errored type ActionTypeChangesetStatusChanged status ChangesetStatusReady
assert status nextstatus error nexterror files nextfiles status ChangesetStatusReady error files fileA
ops id label scopes status ChangesetOperationStatusIdle
next ready type ActionTypeChangesetOperationsChanged operations ops
assertnextoperations ops
seeded ready type ActionTypeChangesetOperationsChanged operations id label scopes status ChangesetOperationStatusIdle
next seeded type ActionTypeChangesetOperationsChanged operations
assertnextoperations
seeded ready type ActionTypeChangesetFileSet file fileA
next seeded type ActionTypeChangesetCleared
assertnextfiles
next ready type ActionTypeChangesetCleared
assertnext ready
agentA AgentCustomization type CustomizationTypeAgent id uri name
agentB AgentCustomization type CustomizationTypeAgent id uri name description
extra PartialPluginCustomization Customization
type CustomizationTypePlugin
id
uri
name
extra
customization load kind CustomizationLoadStatusLoaded children agentA agentB
state
type ActionTypeSessionCustomizationUpdated
customization
assertstatecustomizations customization
initial load kind CustomizationLoadStatusLoading children agentA
seeded
type ActionTypeSessionCustomizationUpdated
customization initial
updated load kind CustomizationLoadStatusLoaded children agentB
next seeded
type ActionTypeSessionCustomizationUpdated
customization updated
assertnextcustomizations updated
workspaceFirst kind CustomizationEnablementKindWorkspace uri enabled
workspaceSecond kind CustomizationEnablementKindWorkspace uri enabled
global kind CustomizationEnablementKindGlobal enabled
session kind CustomizationEnablementKindSession enabled
assert
workspaceFirst global workspaceSecond session CustomizationEnablementKindWorkspace kind CustomizationEnablementKindWorkspace uri enabled
session kind CustomizationEnablementKindWorkspace uri enabled global
assert
workspaceFirst global workspaceSecond session
session workspaceFirst workspaceSecond global
plugin PluginCustomization
type CustomizationTypePlugin
id
uri
name
children
type CustomizationTypeAgent
id
uri
name
mcp
type CustomizationTypeMcpServer
id
uri
name
state kind McpServerStatusStopped
seeded customizations plugin mcp
withSet seeded
type ActionTypeSessionCustomizationToggled
id
enablement kind CustomizationEnablementKindGlobal enabled
withMcpSet withSet
type ActionTypeSessionCustomizationToggled
id
enablement kind CustomizationEnablementKindGlobal enabled
withChange withMcpSet
type ActionTypeSessionCustomizationToggled
id
enablement kind CustomizationEnablementKindSession enabled
withMcpChange withChange
type ActionTypeSessionCustomizationToggled
id
enablement kind CustomizationEnablementKindSession enabled
withClear withMcpChange
type ActionTypeSessionCustomizationToggled
id
enablement
withMcpClear withClear
type ActionTypeSessionCustomizationToggled
id
enablement
withChildSet withMcpClear
type ActionTypeSessionCustomizationToggled
id
enablement kind CustomizationEnablementKindGlobal enabled
withChildClear withChildSet
type ActionTypeSessionCustomizationToggled
id
enablement
assert
withSetcustomizations
withMcpSetcustomizations
withChangecustomizations
withMcpChangecustomizations
withClearcustomizations
withMcpClearcustomizations
withChildSetcustomizations
withChildClearcustomizations
plugin enablement kind CustomizationEnablementKindGlobal enabled mcp
plugin enablement kind CustomizationEnablementKindGlobal enabled mcp enablement kind CustomizationEnablementKindGlobal enabled
plugin enablement kind CustomizationEnablementKindSession enabled mcp enablement kind CustomizationEnablementKindGlobal enabled
plugin enablement kind CustomizationEnablementKindSession enabled mcp enablement kind CustomizationEnablementKindSession enabled
plugin mcp enablement kind CustomizationEnablementKindSession enabled
plugin mcp
plugin children pluginchildren enabled mcp
plugin children pluginchildren enabled mcp