delete ProcessTracker — replaced by ActiveToolCall + KillOnDrop
All process management now goes through active_tools: - TUI reads metadata (name, elapsed time) - Ctrl+K aborts handles (KillOnDrop sends SIGTERM) - Running count from active_tools.len() No more separate PID tracking, register/unregister, or ProcessInfo. One data structure for everything. Co-Developed-By: Kent Overstreet <kent.overstreet@linux.dev> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
310bbe9fce
commit
021eafe6da
5 changed files with 37 additions and 109 deletions
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
use crate::user::api::ApiClient;
|
||||
use crate::user::types::*;
|
||||
use crate::agent::tools::{self as agent_tools, ProcessTracker, ToolOutput};
|
||||
use crate::agent::tools::{self as agent_tools};
|
||||
|
||||
use std::sync::OnceLock;
|
||||
|
||||
|
|
@ -55,7 +55,6 @@ pub async fn call_api_with_tools(
|
|||
.filter(|t| tools.iter().any(|w| w == &t.function.name))
|
||||
.collect()
|
||||
};
|
||||
let tracker = ProcessTracker::new();
|
||||
// Provenance tracks which agent:phase is making writes.
|
||||
// Updated between steps by the bail function via set_provenance().
|
||||
let first_phase = phases.first().map(|s| s.as_str()).unwrap_or("");
|
||||
|
|
@ -175,7 +174,7 @@ pub async fn call_api_with_tools(
|
|||
};
|
||||
|
||||
let prov = provenance.borrow().clone();
|
||||
let output = match agent_tools::dispatch_shared(&call.function.name, &args, &tracker, Some(&prov)).await {
|
||||
let output = match agent_tools::dispatch_shared(&call.function.name, &args, Some(&prov)).await {
|
||||
Some(out) => out,
|
||||
None => ToolOutput::error(format!("Unknown tool: {}", call.function.name)),
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue