From 94e5604e770d6589f786ea71e51738e21492f301 Mon Sep 17 00:00:00 2001 From: soryu Date: Wed, 21 Jan 2026 17:31:46 +0000 Subject: Add task branching feature (#15) --- makima/src/server/handlers/contract_chat.rs | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'makima/src/server/handlers/contract_chat.rs') diff --git a/makima/src/server/handlers/contract_chat.rs b/makima/src/server/handlers/contract_chat.rs index 0f794c1..c94538d 100644 --- a/makima/src/server/handlers/contract_chat.rs +++ b/makima/src/server/handlers/contract_chat.rs @@ -1356,7 +1356,7 @@ async fn handle_contract_request( }; let create_req = CreateTaskRequest { - contract_id, + contract_id: Some(contract_id), name: name.clone(), description: None, plan, @@ -1372,6 +1372,8 @@ async fn handle_contract_request( copy_files: None, is_supervisor: false, checkpoint_sha: None, + branched_from_task_id: None, + conversation_history: None, }; match repository::create_task_for_owner(pool, owner_id, create_req).await { @@ -1450,7 +1452,7 @@ async fn handle_contract_request( ); let create_req = CreateTaskRequest { - contract_id, + contract_id: Some(contract_id), name: task_name.clone(), description: Some(instruction.clone()), plan, @@ -1466,6 +1468,8 @@ async fn handle_contract_request( copy_files: None, is_supervisor: false, checkpoint_sha: None, + branched_from_task_id: None, + conversation_history: None, }; match repository::create_task_for_owner(pool, owner_id, create_req).await { @@ -2054,7 +2058,7 @@ async fn handle_contract_request( for task_def in &tasks { let create_req = CreateTaskRequest { - contract_id, + contract_id: Some(contract_id), name: task_def.name.clone(), description: None, plan: task_def.plan.clone(), @@ -2070,6 +2074,8 @@ async fn handle_contract_request( copy_files: None, is_supervisor: false, checkpoint_sha: None, + branched_from_task_id: None, + conversation_history: None, }; match repository::create_task_for_owner(pool, owner_id, create_req).await { @@ -2564,7 +2570,7 @@ async fn handle_contract_request( if include_action_items && !analysis.action_items.is_empty() { for item in &analysis.action_items { let task_req = CreateTaskRequest { - contract_id: contract.id, + contract_id: Some(contract.id), name: item.text.chars().take(100).collect(), description: Some(format!("Action item from: {}", item.speaker)), plan: item.text.clone(), @@ -2584,6 +2590,8 @@ async fn handle_contract_request( copy_files: None, is_supervisor: false, checkpoint_sha: None, + branched_from_task_id: None, + conversation_history: None, }; if repository::create_task_for_owner(pool, owner_id, task_req).await.is_ok() { -- cgit v1.2.3