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 { URI } from '../../../../../base/common/uri.js';
import { ensureNoDisposablesAreLeakedInTestSuite } from '../../../../../base/test/common/utils.js';
import { readAgentMessageDelegationMeta } from '../../../common/meta/agentMessageDelegationMeta.js';
import { createCodexSessionMapState, extractUserInputText, finalizeCodexTurnMapState, mapAgentMessageDelta, mapCommandExecutionOutputDelta, mapFileChangePatchUpdated, mapItemCompleted, mapItemStarted, mapMcpToolCallProgress, mapReasoningSummaryPartAdded, mapReasoningSummaryTextDelta, mapReasoningTextDelta, mapTokenUsageModelCallCompleted, mapTokenUsageUpdated, mapTurnCompleted, mapTurnStarted, resetCodexTurnMapState turnStateFromStatus
ActionType
chatReducer
ChatOriginKind MessageKind ResponsePartKind SessionStatus ToolCallConfirmationReason ToolCallContributorKind ToolResultContentType TurnState
ActiveClientToolSet
action SessionAction ChatAction
actiontype ActionTypeChatResponsePart actionpartkind ResponsePartKindMarkdown
actionpartcontent
state
actions state
threadId
turn
id
items
type
id
clientId
content type text text_elements
itemsView type
status
error
startedAt
completedAt
durationMs
assertstatecurrentTurnId
assertactions
type ActionTypeChatTurnStarted
turnId
startedAt
message text origin kind MessageKindUser
state
actions state
threadId
turn
id
items
itemsView type
status
error
startedAt
completedAt
durationMs
assertactions message text messagetext
actions
threadId
turn
id
items
type
id
clientId
content
type
text
text_elements
itemsView type
status
error
startedAt
completedAt
durationMs
action actions
assertactiontype ActionTypeChatTurnStarted
actiontype ActionTypeChatTurnStarted
assert
text actionmessagetext
delegation actionmessage
text
delegation sourceThreadId
before
actions
threadId
turn
id
items
itemsView type
status
error
startedAt
completedAt
durationMs
startedAt actionstype ActionTypeChatTurnStarted actionsstartedAt
assert startedAt startedAt before startedAt
state
actions state
item type id text phase memoryCitation
threadId
turnId
startedAtMs
assertactionslength
a actions type ActionType turnId part kind ResponsePartKind id content
assertatype ActionTypeChatResponsePart
assertaturnId
assertapartkind ResponsePartKindMarkdown
assert apartid
assertapartidlength
assertstateitemToPartId apartid
state
actions state
item type id text
threadId
turnId
startedAtMs
assertactions
assertstateitemToPartIdsize
state
state
item type id text phase memoryCitation
threadId turnId startedAtMs
partId stateitemToPartId
actions state
threadId
turnId
itemId
delta
assertactions
type ActionTypeChatDelta
turnId
partId
content
state
actions state
threadId turnId itemId delta
assertactions
state
start state
threadId turnId itemId summaryIndex
partId stateitemToReasoningPartId
delta state
threadId turnId itemId summaryIndex delta
assert
start startaction actiontype
partKind starttype ActionTypeChatResponsePart startpartkind
delta
start ActionTypeChatResponsePart
partKind ResponsePartKindReasoning
delta type ActionTypeChatReasoning turnId partId content
state
actions state
threadId turnId itemId contentIndex delta
partId stateitemToReasoningPartId
assert
types actionsaction actiontype
partKind actionstype ActionTypeChatResponsePart actionspartkind
delta actions
types ActionTypeChatResponsePart ActionTypeChatReasoning
partKind ResponsePartKindReasoning
delta type ActionTypeChatReasoning turnId partId content
actions
threadId
turnId
tokenUsage
last inputTokens cachedInputTokens cacheWriteInputTokens outputTokens reasoningOutputTokens totalTokens
total inputTokens cachedInputTokens cacheWriteInputTokens outputTokens reasoningOutputTokens totalTokens
modelContextWindow
assertactions
type ActionTypeChatUsage
turnId
usage
inputTokens
outputTokens
model
cacheReadTokens
_meta reasoningOutputTokens modelContextWindow
resource
assert
threadId
turnId
tokenUsage
last inputTokens cachedInputTokens cacheWriteInputTokens outputTokens reasoningOutputTokens totalTokens
total inputTokens cachedInputTokens cacheWriteInputTokens outputTokens reasoningOutputTokens totalTokens
modelContextWindow
resource
kind
resource
turnId
modelCallId
state
started state
item type id
threadId turnId startedAtMs
toolCallId stateitemToToolCalltoolCallId
completed state
item type id
threadId turnId completedAtMs
assert started completed remaining stateitemToToolCallsize
started
type ActionTypeChatToolCallStart turnId toolCallId toolName displayName
type ActionTypeChatToolCallReady turnId toolCallId invocationMessage confirmed ToolCallConfirmationReasonNotNeeded
completed
type ActionTypeChatToolCallComplete
turnId
toolCallId
result success pastTenseMessage
remaining
state
state
item type id text phase memoryCitation
threadId turnId startedAtMs
assertstateitemToPartIdsize
state
item type id text phase memoryCitation
threadId turnId completedAtMs
assertstateitemToPartIdsize
state
first state
item type id text phase memoryCitation
threadId turnId startedAtMs
second state
item type id text phase memoryCitation
threadId turnId startedAtMs
assert
first first
second second
first
second
state
state item type id text phase memoryCitation threadId turnId startedAtMs
state item type id text phase memoryCitation threadId turnId startedAtMs
state
firstOfNextTurn state item type id text phase memoryCitation threadId turnId startedAtMs
assertfirstOfNextTurn
state
chat ChatState
resource
title
status SessionStatusIdle
modifiedAt
origin kind ChatOriginKindUser
turns
activeTurn
actions SessionAction ChatAction
action actions
chat chat action ChatAction
state
threadId
turn id items itemsView type status error startedAt completedAt durationMs
state item type id text phase memoryCitation threadId turnId startedAtMs
state threadId turnId itemId delta
state item type id text phase memoryCitation threadId turnId startedAtMs
state threadId turnId itemId delta
joined chatactiveTurnresponseParts
part partkind ResponsePartKindMarkdown partcontent
assertjoined
state
actions state
item
type id
command cwd processId
source status
commandActions aggregatedOutput
exitCode durationMs
threadId turnId startedAtMs
assertactionslength
start actions
delta actions
ready actions
assertstarttype ActionTypeChatToolCallStart
assertdeltatype ActionTypeChatToolCallDelta
assertreadytype ActionTypeChatToolCallReady
entry stateitemToToolCall
assertentry
assertentrytoolCallId start toolCallId toolCallId
assertentryturnId
assertdelta content content
assertready confirmed ToolCallConfirmationReason confirmed ToolCallConfirmationReasonNotNeeded
assertstart _meta Record _meta toolKind
state
started state
item
type id
command cwd processId
source status
commandActions aggregatedOutput
exitCode durationMs
threadId turnId startedAtMs
delta started content
ready started invocationMessage toolInput
deferred state
item
type id
command cwd processId
source status
commandActions aggregatedOutput
exitCode durationMs
threadId turnId completedAtMs
flushed state
threadId
turn
id
items itemsView type
status
error startedAt completedAt durationMs
complete flushed result pastTenseMessage
assert
deferred
delta deltacontent
invocationMessage readyinvocationMessage
toolInput readytoolInput
pastTenseMessage completeresultpastTenseMessage
deferred
delta
invocationMessage
toolInput
pastTenseMessage
state
preStarted state
item
type id
command cwd processId
source status
commandActions aggregatedOutput exitCode durationMs
threadId turnId startedAtMs
toolCallId stateitemToToolCalltoolCallId
preCompleted state
item
type id
command cwd processId
source status
commandActions aggregatedOutput exitCode durationMs
threadId turnId completedAtMs
escStarted state
item
type id
command cwd processId
source status
commandActions aggregatedOutput exitCode durationMs
threadId turnId startedAtMs
escCompleted state
item
type id
command cwd processId
source status
commandActions aggregatedOutput exitCode durationMs
threadId turnId completedAtMs
actions actionsa a type ActionType type ActionTypeChatToolCallStartlength
assert
starts preStarted escStarted
preCompleted
escStarted
escComplete escCompleted
starts
preCompleted
escStarted
escComplete
type ActionTypeChatToolCallComplete
turnId
toolCallId
result
success
pastTenseMessage
content type ToolResultContentTypeText text
error
state
state
item
type id
command cwd processId
source status
commandActions aggregatedOutput
exitCode durationMs
threadId turnId startedAtMs
toolCallId stateitemToToolCalltoolCallId
first state threadId turnId itemId delta
second state threadId turnId itemId delta
assert first second
first type ActionTypeChatToolCallContentChanged turnId toolCallId content type ToolResultContentTypeText text
second type ActionTypeChatToolCallContentChanged turnId toolCallId content type ToolResultContentTypeText text
state
state
item
type id
command cwd processId
source status
commandActions aggregatedOutput
exitCode durationMs
threadId turnId startedAtMs
toolCallId stateitemToToolCalltoolCallId
state threadId turnId itemId delta
actions state
item
type id
command cwd processId
source status
commandActions aggregatedOutput
exitCode durationMs
threadId turnId completedAtMs
assertactions
type ActionTypeChatToolCallComplete
turnId
toolCallId
result
success
pastTenseMessage
content type ToolResultContentTypeText text
error
state
state
item
type id
command cwd processId
source status
commandActions aggregatedOutput
exitCode durationMs
threadId turnId startedAtMs
toolCallId stateitemToToolCalltoolCallId
actions state
item
type id
command cwd processId
source status
commandActions aggregatedOutput
exitCode durationMs
threadId turnId completedAtMs
assertactionslength
complete actions type ActionType toolCallId result success content type ToolResultContentType text
assertcompletetype ActionTypeChatToolCallComplete
assertcompletetoolCallId toolCallId
assertcompleteresultsuccess
assertcompleteresultcontent type ToolResultContentTypeText text
assertstateitemToToolCallsize
state
state
item
type id
command cwd processId
source status
commandActions aggregatedOutput
exitCode durationMs
threadId turnId startedAtMs
actions state
item
type id
command cwd processId
source status
commandActions aggregatedOutput
exitCode durationMs
threadId turnId completedAtMs
complete actions result success error message
assertcompleteresultsuccess
assertcompleteresulterrormessage
state
startActions state
item
type id query
action type query queries
threadId turnId startedAtMs
toolCallId stateitemToToolCalltoolCallId
completeActions state
item
type id query
action type query queries
threadId turnId completedAtMs
assert
startTypes startActionsaction actiontype
startMeta startActionstype ActionTypeChatToolCallStart startActions_meta
delta startActions
ready startActions
complete completeActions
remainingToolCalls stateitemToToolCallsize
startTypes ActionTypeChatToolCallStart ActionTypeChatToolCallDelta ActionTypeChatToolCallReady
startMeta toolKind
delta type ActionTypeChatToolCallDelta turnId toolCallId content
ready type ActionTypeChatToolCallReady turnId toolCallId invocationMessage toolInput confirmed ToolCallConfirmationReasonNotNeeded _meta toolKind
complete type ActionTypeChatToolCallComplete turnId toolCallId result success pastTenseMessage
remainingToolCalls
state
startActions state
item type id status revisedPrompt result
threadId turnId startedAtMs
toolCallId stateitemToToolCalltoolCallId
completeActions state
item type id status revisedPrompt result
threadId turnId completedAtMs
assert
start startActions
complete completeActions
remainingToolCalls stateitemToToolCallsize
start
type ActionTypeChatToolCallStart
turnId
toolCallId
toolName
displayName
type ActionTypeChatToolCallReady
turnId
toolCallId
invocationMessage
toolInput
confirmed ToolCallConfirmationReasonNotNeeded
complete
type ActionTypeChatToolCallComplete
turnId
toolCallId
result
success
pastTenseMessage
content type ToolResultContentTypeEmbeddedResource data contentType
remainingToolCalls
state
changes path kind type move_path diff
startActions state
item type id changes status
threadId turnId startedAtMs
toolCallId stateitemToToolCalltoolCallId
patchActions state threadId turnId itemId changes path kind type diff
completeActions state
item type id changes status
threadId turnId completedAtMs
assert
startTypes startActionsaction actiontype
delta startActions
ready startActions
initialContent startActions
patchActions
completeActions
remainingToolCalls stateitemToToolCallsize
startTypes ActionTypeChatToolCallStart ActionTypeChatToolCallDelta ActionTypeChatToolCallReady ActionTypeChatToolCallContentChanged
delta type ActionTypeChatToolCallDelta turnId toolCallId content
ready type ActionTypeChatToolCallReady turnId toolCallId invocationMessage toolInput confirmed ToolCallConfirmationReasonNotNeeded
initialContent type ActionTypeChatToolCallContentChanged turnId toolCallId content type ToolResultContentTypeText text
patchActions type ActionTypeChatToolCallContentChanged turnId toolCallId content type ToolResultContentTypeText text
completeActions type ActionTypeChatToolCallComplete turnId toolCallId result success pastTenseMessage content type ToolResultContentTypeText text
remainingToolCalls
state
startActions state
item type id server tool status arguments query mcpAppResourceUri pluginId result error durationMs
threadId turnId startedAtMs
toolCallId stateitemToToolCalltoolCallId
progressActions state threadId turnId itemId message
completeActions state
item type id server tool status arguments query mcpAppResourceUri pluginId result content structuredContent count _meta error durationMs
threadId turnId completedAtMs
assert
startTypes startActionsaction actiontype
delta startActions
ready startActions
progressActions
completeActions
remainingToolCalls stateitemToToolCallsize
startTypes ActionTypeChatToolCallStart ActionTypeChatToolCallDelta ActionTypeChatToolCallReady
delta type ActionTypeChatToolCallDelta turnId toolCallId content
ready type ActionTypeChatToolCallReady turnId toolCallId invocationMessage toolInput confirmed ToolCallConfirmationReasonNotNeeded
progressActions type ActionTypeChatToolCallContentChanged turnId toolCallId content type ToolResultContentTypeText text
completeActions type ActionTypeChatToolCallComplete turnId toolCallId result success pastTenseMessage content type ToolResultContentTypeText text
remainingToolCalls
state
statemcpCustomizationIds
startActions state
item
type id server tool
status arguments mcpAppResourceUri
pluginId result error durationMs
threadId turnId startedAtMs
start startActions
starttype ActionTypeChatToolCallStart
assertstartcontributor kind ToolCallContributorKind customizationId
state
startActions state
item
type id server tool
status arguments mcpAppResourceUri
pluginId result error durationMs
threadId turnId startedAtMs
start startActions
starttype ActionTypeChatToolCallStart
assertstartcontributor
state
state
item
type id
command cwd processId
source status
commandActions aggregatedOutput
exitCode durationMs
threadId turnId startedAtMs
entry stateitemToToolCall
entry
statedeclinedToolCallsentrytoolCallId
actions state
item
type id
command cwd processId
source status
commandActions aggregatedOutput
exitCode durationMs
threadId turnId completedAtMs
complete actions
completetype ActionTypeChatToolCallComplete
assertcompleteresultsuccess
assertcompleteresulterrorcode
state
state
item
type id server tool
status arguments mcpAppResourceUri
pluginId result error durationMs
threadId turnId startedAtMs
entry stateitemToToolCall
entry
statedeclinedToolCallsentrytoolCallId
actions state
item
type id server tool
status arguments mcpAppResourceUri
pluginId result error durationMs
threadId turnId completedAtMs
complete actions
completetype ActionTypeChatToolCallComplete
assertcompleteresultsuccess
assertcompleteresulterrorcode
state
startActions state
item
type id tool
status senderThreadId receiverThreadIds
prompt model
reasoningEffort agentsStates
threadId turnId startedAtMs
toolCallId stateitemToToolCalltoolCallId
assert
actions startActions
entryToolName stateitemToToolCalltoolName
actions
type ActionTypeChatToolCallStart turnId toolCallId toolName displayName
type ActionTypeChatToolCallReady turnId toolCallId invocationMessage confirmed ToolCallConfirmationReasonNotNeeded
entryToolName
state
startActions state
item
type id tool
status senderThreadId receiverThreadIds
prompt model
reasoningEffort agentsStates
threadId turnId startedAtMs
toolCallId stateitemToToolCalltoolCallId
assertstartActions
type ActionTypeChatToolCallStart turnId toolCallId toolName displayName
type ActionTypeChatToolCallDelta turnId toolCallId content
type ActionTypeChatToolCallReady turnId toolCallId invocationMessage toolInput confirmed ToolCallConfirmationReasonNotNeeded
state
state
item
type id tool
status senderThreadId receiverThreadIds
prompt model
reasoningEffort agentsStates
threadId turnId startedAtMs
toolCallId stateitemToToolCalltoolCallId
actions state
item
type id tool
status senderThreadId receiverThreadIds
prompt model
reasoningEffort
agentsStates sub_1 status message
threadId turnId completedAtMs
assert actions remainingToolCalls stateitemToToolCallsize
actions
type ActionTypeChatToolCallComplete turnId toolCallId
result
success
pastTenseMessage
content type ToolResultContentTypeText text
remainingToolCalls
state
state
item
type id tool
status senderThreadId receiverThreadIds
prompt model reasoningEffort agentsStates
threadId turnId startedAtMs
toolCallId stateitemToToolCalltoolCallId
actions state
item
type id tool
status senderThreadId receiverThreadIds
prompt model reasoningEffort
agentsStates
sub_1 status message
sub_2 status message
threadId turnId completedAtMs
assertactions
type ActionTypeChatToolCallComplete turnId toolCallId
result
success
pastTenseMessage
content type ToolResultContentTypeText text
state
state
item
type id tool
status senderThreadId receiverThreadIds
prompt model reasoningEffort agentsStates
threadId turnId startedAtMs
toolCallId stateitemToToolCalltoolCallId
actions state
item
type id tool
status senderThreadId receiverThreadIds
prompt model reasoningEffort
agentsStates sub_1 status message
threadId turnId completedAtMs
assertactions
type ActionTypeChatToolCallComplete turnId toolCallId
result
success
pastTenseMessage
content type ToolResultContentTypeText text
error message
toolSet
toolSet name
state toolSet
startActions state
item type id namespace tool arguments status contentItems success durationMs
threadId turnId startedAtMs
start startActions type ActionType toolName contributor kind ToolCallContributorKind clientId
assert
type starttype
toolName starttoolName
contributor startcontributor
type ActionTypeChatToolCallStart
toolName
contributor kind ToolCallContributorKindClient clientId
toolSet
toolSet name
state toolSet
startActions state
item type id namespace tool arguments status contentItems success durationMs
threadId turnId startedAtMs
start startActions type ActionType toolName contributor kind ToolCallContributorKind clientId
assert
type starttype
toolName starttoolName
contributor startcontributor
type ActionTypeChatToolCallStart
toolName
contributor
state
startActions state
item type id namespace tool arguments status contentItems success durationMs
threadId turnId startedAtMs
toolCallId stateitemToToolCalltoolCallId
completeActions state
item type id namespace tool arguments status contentItems type text type imageUrl success durationMs
threadId turnId completedAtMs
assert
startTypes startActionsaction actiontype
delta startActions
ready startActions
completeActions
remainingToolCalls stateitemToToolCallsize
startTypes ActionTypeChatToolCallStart ActionTypeChatToolCallDelta ActionTypeChatToolCallReady
delta type ActionTypeChatToolCallDelta turnId toolCallId content
ready type ActionTypeChatToolCallReady turnId toolCallId invocationMessage toolInput confirmed ToolCallConfirmationReasonNotNeeded
completeActions type ActionTypeChatToolCallComplete turnId toolCallId result success pastTenseMessage content type ToolResultContentTypeText text
remainingToolCalls
state
statecurrentTurnId
actions state
threadId
turn
id
items itemsView type
status
error startedAt completedAt durationMs
assertactions type ActionTypeChatTurnComplete turnId duration
assertstatecurrentTurnId
state
state
item
type id command cwd
processId source status
commandActions aggregatedOutput exitCode durationMs
threadId turnId startedAtMs
toolCallId stateitemToToolCalltoolCallId
responseStarted state
item type id text
threadId turnId startedAtMs
responseDelta state
threadId turnId itemId delta
assert responseStarted responseDelta responseStarted responseDelta
partId stateitemToPartId
notification
threadId
turn
id
items
type id command cwd
processId source status commandActions
aggregatedOutput exitCode durationMs
itemsView type
status
error startedAt completedAt durationMs
actions state notification
assertactions
type ActionTypeChatToolCallComplete turnId toolCallId
result success pastTenseMessage content error message
type ActionTypeChatResponsePart turnId part kind ResponsePartKindMarkdown id partId content
type ActionTypeChatDelta turnId partId content
type ActionTypeChatTurnComplete turnId duration
state
state
item
type id command cwd
processId source status
commandActions aggregatedOutput exitCode durationMs
threadId turnId startedAtMs
toolCallId stateitemToToolCalltoolCallId
actions state
threadId
turn
id
items
type id command cwd
processId source status commandActions
aggregatedOutput exitCode durationMs
itemsView type
status
error startedAt completedAt durationMs
assertactions
type ActionTypeChatToolCallComplete turnId toolCallId
result
success
pastTenseMessage
content type ToolResultContentTypeText text
error
type ActionTypeChatTurnComplete turnId duration
state
stateitemToToolCall toolCallId turnId toolName output
responseStarted state
item type id text
threadId turnId startedAtMs
partId stateitemToPartId
assertresponseStarted
type ActionTypeChatResponsePart turnId part kind ResponsePartKindMarkdown id partId content
actions state
threadId
turn
id
items type id query action type query
itemsView type
status
error startedAt completedAt durationMs
assertactions
type ActionTypeChatToolCallComplete turnId toolCallId
result success pastTenseMessage content error message
type ActionTypeChatTurnComplete turnId duration
state
state
item
type id command cwd
processId source status
commandActions aggregatedOutput exitCode durationMs
threadId turnId startedAtMs
toolCallId stateitemToToolCalltoolCallId
firstResponse state
item type id text
threadId turnId startedAtMs
assertfirstResponse
firstPartId stateitemToPartId
completed state
item
type id command cwd
processId source status
commandActions aggregatedOutput exitCode durationMs
threadId turnId completedAtMs
assertcompleted
nextResponse state
item type id text
threadId turnId startedAtMs
secondPartId stateitemToPartId
assertnextResponse
type ActionTypeChatToolCallComplete turnId toolCallId
result
success
pastTenseMessage
content
error
type ActionTypeChatResponsePart turnId part kind ResponsePartKindMarkdown id firstPartId content
type ActionTypeChatResponsePart turnId part kind ResponsePartKindMarkdown id secondPartId content
state
state
item
type id command cwd
processId source status
commandActions aggregatedOutput exitCode durationMs
threadId turnId startedAtMs
toolCallId stateitemToToolCalltoolCallId
assertstate
item type id text
threadId turnId startedAtMs
partId stateitemToPartId
actions state
assertactions
type ActionTypeChatToolCallComplete turnId toolCallId
result
success
pastTenseMessage
content
error message
type ActionTypeChatResponsePart turnId part kind ResponsePartKindMarkdown id partId content
assert
toolCalls stateitemToToolCallsize
deferredResponses statedeferredResponseActionslength
pendingPreflight statependingPreflight
toolCalls
deferredResponses
pendingPreflight
state
stateitemToToolCall toolCallId turnId toolName output
actions state
threadId
turn
id items itemsView type
status
error startedAt completedAt durationMs
completeAction actions type ActionType turnId duration
duration completeDuration completeRest completeAction
assert actions actions completeRest remainingToolCalls stateitemToToolCallsize
actions
type ActionTypeChatToolCallComplete turnId toolCallId result success pastTenseMessage content type ToolResultContentTypeText text error message
type ActionTypeChatTurnComplete turnId
remainingToolCalls
assertcompleteDuration
state
actions state
threadId
turn
id items itemsView type
status
error message
startedAt completedAt durationMs
assertactions
type ActionTypeChatError turnId duration part kind ResponsePartKindError error errorType message
type ActionTypeChatTurnComplete turnId duration
state
actions state
threadId
turn
id items itemsView type
status
error startedAt completedAt durationMs
assertactions type ActionTypeChatTurnCancelled turnId duration
assert TurnStateComplete
assert TurnStateCancelled
assert TurnStateError
assert TurnStateComplete
assert
type text text_elements
type url
type text text_elements
type name path
assert
assert type url
state
statecurrentTurnId
stateitemToPartId
stateitemToToolCall toolCallId turnId toolName output
stateitemToReasoningPartId
statedeclinedToolCalls
state
assert
currentTurnId statecurrentTurnId
parts stateitemToPartIdsize
toolCalls stateitemToToolCallsize
reasoning stateitemToReasoningPartIdsize
declined statedeclinedToolCallssize
currentTurnId parts toolCalls reasoning declined