diff options
| author | soryu <soryu@soryu.co> | 2026-01-25 04:39:37 +0000 |
|---|---|---|
| committer | soryu <soryu@soryu.co> | 2026-01-25 04:39:37 +0000 |
| commit | cb4f2fc40dbabb40de948512eee74c7e46264665 (patch) | |
| tree | 0a4f142609dceaf6cf6eafa4fa6a59beff4b1f80 /makima/src/server/state.rs | |
| parent | c908854e7e3571c99cce9f46497ce5337ea0aed1 (diff) | |
| download | soryu-cb4f2fc40dbabb40de948512eee74c7e46264665.tar.gz soryu-cb4f2fc40dbabb40de948512eee74c7e46264665.zip | |
Add automatic phase transitions and fix PR creation
Diffstat (limited to 'makima/src/server/state.rs')
| -rw-r--r-- | makima/src/server/state.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/makima/src/server/state.rs b/makima/src/server/state.rs index 32c0af3..b954efe 100644 --- a/makima/src/server/state.rs +++ b/makima/src/server/state.rs @@ -1065,6 +1065,9 @@ impl AppState { } /// Format and send a task completion notification to a supervisor. + /// + /// If `action_directive` is provided, it will be appended to the message + /// as an [ACTION REQUIRED] block to prompt the supervisor to take action. pub async fn notify_supervisor_of_task_completion( &self, supervisor_task_id: Uuid, @@ -1074,6 +1077,7 @@ impl AppState { status: &str, progress_summary: Option<&str>, error_message: Option<&str>, + action_directive: Option<&str>, ) { let mut message = format!( "TASK_COMPLETED task_id={} name=\"{}\" status={}", @@ -1091,6 +1095,12 @@ impl AppState { message.push_str(&format!(" error=\"{}\"", escaped)); } + // Append action directive if provided + if let Some(directive) = action_directive { + message.push_str("\n\n"); + message.push_str(directive); + } + if let Err(e) = self.notify_supervisor( supervisor_task_id, supervisor_daemon_id, |
