summaryrefslogtreecommitdiff
path: root/makima/src/server
diff options
context:
space:
mode:
Diffstat (limited to 'makima/src/server')
-rw-r--r--makima/src/server/handlers/mesh_supervisor.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/makima/src/server/handlers/mesh_supervisor.rs b/makima/src/server/handlers/mesh_supervisor.rs
index 6cdbba6..668ea7b 100644
--- a/makima/src/server/handlers/mesh_supervisor.rs
+++ b/makima/src/server/handlers/mesh_supervisor.rs
@@ -1589,8 +1589,9 @@ pub async fn ask_question(
).await;
}
- // If non_blocking mode is enabled, return immediately with the question_id
- if request.non_blocking {
+ // If non_blocking mode or phaseguard is enabled, return immediately with the question_id
+ // Phaseguard questions persist until answered (no timeout) and are displayed by the frontend
+ if request.non_blocking || request.phaseguard {
return (
StatusCode::OK,
Json(AskQuestionResponse {
@@ -1622,8 +1623,8 @@ pub async fn ask_question(
).into_response();
}
- // Check timeout (skip timeout if phaseguard is enabled - wait indefinitely)
- if !request.phaseguard && start.elapsed() >= timeout_duration {
+ // Check timeout
+ if start.elapsed() >= timeout_duration {
// Remove the pending question on timeout
state.remove_pending_question(question_id);