(
state: AIChatSessionState,
phase: AgentRuntimeStatus['phase'],
extra?: Partial<AgentRuntimeStatus>
)
| 502 | } |
| 503 | |
| 504 | function setAgentPhase( |
| 505 | state: AIChatSessionState, |
| 506 | phase: AgentRuntimeStatus['phase'], |
| 507 | extra?: Partial<AgentRuntimeStatus> |
| 508 | ): void { |
| 509 | const base = state.agentStatus ? { ...state.agentStatus } : buildFallbackAgentStatus(state) |
| 510 | state.agentStatus = { |
| 511 | ...base, |
| 512 | ...extra, |
| 513 | phase, |
| 514 | updatedAt: Date.now(), |
| 515 | } |
| 516 | } |
| 517 | |
| 518 | function selectAssistantForSession(chatKey: string, assistantId: string): boolean { |
| 519 | const state = getSessionState(chatKey) |
no test coverage detected