Squashed commit of the following:
commit 93babc04486e64ae55c106478d5c04a9ec891c1f Author: Louis Knight-Webb <louis@bloop.ai> Date: Tue Jun 24 01:05:31 2025 +0100 UX commit 91c93187290e4e0882018c392dd744eba7cd2193 Author: Louis Knight-Webb <louis@bloop.ai> Date: Tue Jun 24 01:03:39 2025 +0100 Update TaskDetailsPanel.tsx Follow up UI commit b66cfbfa727eb7d69b2250102712d6169a3af3b1 Author: Louis Knight-Webb <louis@bloop.ai> Date: Tue Jun 24 00:58:21 2025 +0100 Tweaks commit aa2235c56413ffe88c4ec1bf7950012c019f9455 Author: Louis Knight-Webb <louis@bloop.ai> Date: Tue Jun 24 00:34:02 2025 +0100 Add follow up endpoint commit 1b536e33c956e39881d5ddfd169d229cfba99c20 Author: Louis Knight-Webb <louis@bloop.ai> Date: Tue Jun 24 00:12:55 2025 +0100 Track executor type commit 1c5d208f62fce2ed36e04384e139884e85dcb295 Author: Louis Knight-Webb <louis@bloop.ai> Date: Mon Jun 23 16:56:58 2025 +0100 Add executor_session commit 8e305953afb71d096079587df94cf5e63c4c6a04 Author: Louis Knight-Webb <louis@bloop.ai> Date: Mon Jun 23 16:49:07 2025 +0100 Fix type issue commit bc2dcf4fd4926ca2a42d71cd429de66fd1215208 Author: Louis Knight-Webb <louis@bloop.ai> Date: Mon Jun 23 16:03:27 2025 +0100 Refactor
This commit is contained in:
@@ -8,6 +8,12 @@ use crate::models::task::Task;
|
||||
/// An executor that uses Claude CLI to process tasks
|
||||
pub struct ClaudeExecutor;
|
||||
|
||||
/// An executor that resumes a Claude session
|
||||
pub struct ClaudeFollowupExecutor {
|
||||
pub session_id: String,
|
||||
pub prompt: String,
|
||||
}
|
||||
|
||||
#[async_trait]
|
||||
impl Executor for ClaudeExecutor {
|
||||
async fn spawn(
|
||||
@@ -49,3 +55,32 @@ impl Executor for ClaudeExecutor {
|
||||
Ok(child)
|
||||
}
|
||||
}
|
||||
|
||||
#[async_trait]
|
||||
impl Executor for ClaudeFollowupExecutor {
|
||||
async fn spawn(
|
||||
&self,
|
||||
pool: &sqlx::SqlitePool,
|
||||
task_id: Uuid,
|
||||
worktree_path: &str,
|
||||
) -> Result<Child, ExecutorError> {
|
||||
// Use Claude CLI with --resume flag to continue the session
|
||||
let child = Command::new("claude")
|
||||
.kill_on_drop(true)
|
||||
.stdin(std::process::Stdio::null())
|
||||
.stdout(std::process::Stdio::piped())
|
||||
.stderr(std::process::Stdio::piped())
|
||||
.current_dir(worktree_path)
|
||||
.arg(&self.prompt)
|
||||
.arg("-p")
|
||||
.arg("--dangerously-skip-permissions")
|
||||
.arg("--verbose")
|
||||
.arg("--output-format=stream-json")
|
||||
.arg(format!("--resume={}", self.session_id))
|
||||
.process_group(0) // Create new process group so we can kill entire tree
|
||||
.spawn()
|
||||
.map_err(ExecutorError::SpawnFailed)?;
|
||||
|
||||
Ok(child)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user