summaryrefslogtreecommitdiff
path: root/makima/src/server
diff options
context:
space:
mode:
authorsoryu <soryu@soryu.co>2026-01-21 17:32:49 +0000
committersoryu <soryu@soryu.co>2026-01-21 17:32:59 +0000
commit9e286c146e29e714b3b209b4d948d75cce179b05 (patch)
treee833c5314cfc089f9cd2c34dff8376cb083cbaad /makima/src/server
parent94e5604e770d6589f786ea71e51738e21492f301 (diff)
downloadsoryu-9e286c146e29e714b3b209b4d948d75cce179b05.tar.gz
soryu-9e286c146e29e714b3b209b4d948d75cce179b05.zip
Enforce phaseguard
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);