agent conversation fix
This commit is contained in:
@ -1069,7 +1069,9 @@ pub fn list_live_agents(
|
||||
std::sync::Arc::clone(&state.terminal_sessions),
|
||||
std::sync::Arc::clone(&state.structured_sessions),
|
||||
);
|
||||
Ok(LiveAgentListDto::from_pairs(live.live_agents()))
|
||||
Ok(LiveAgentListDto::from_snapshots(
|
||||
live.live_agent_snapshots(),
|
||||
))
|
||||
}
|
||||
|
||||
/// `attach_live_agent` — rebind an already-running agent session to a visible
|
||||
@ -1116,9 +1118,15 @@ pub async fn stop_live_agent(
|
||||
) -> Result<StopLiveAgentResponseDto, ErrorDto> {
|
||||
let project = resolve_project(&request.project_id, &state).await?;
|
||||
let agent_id = parse_agent_id(&request.agent_id)?;
|
||||
let dependencies = state
|
||||
.orchestrator_service
|
||||
.active_wait_dependencies(agent_id);
|
||||
// Backstop no-reply : arrêter l'observateur de fin de tour de l'agent (le handle est
|
||||
// droppé ⇒ polling stoppé) avant de démonter sa session.
|
||||
state.stop_turn_watch(agent_id);
|
||||
for dependency in dependencies {
|
||||
state.stop_turn_watch(dependency);
|
||||
}
|
||||
state
|
||||
.stop_live_agent
|
||||
.execute(StopLiveAgentInput { project, agent_id })
|
||||
|
||||
Reference in New Issue
Block a user