agent: /send returns 200 (terminal + turn-end refresh already cover the visual update)
This commit is contained in:
parent
616ca38199
commit
aa24080f7b
1 changed files with 7 additions and 1 deletions
|
|
@ -343,7 +343,13 @@ async fn post_send(State(state): State<AppState>, Form(form): Form<SendForm>) ->
|
|||
},
|
||||
};
|
||||
match result {
|
||||
Ok(()) => Redirect::to("/").into_response(),
|
||||
// 200 instead of 303 → the client doesn't refetch /api/state.
|
||||
// The operator message becomes a broker `Sent` (already shown
|
||||
// server-side in the dashboard); on the agent side, the
|
||||
// resulting `TurnStart` SSE event drives the terminal + the
|
||||
// inbox row gets consumed by the time `TurnEnd` fires the
|
||||
// existing turn-end refresh.
|
||||
Ok(()) => (axum::http::StatusCode::OK, "ok").into_response(),
|
||||
Err(e) => error_response(&format!("send failed: {e}")),
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue