forked from kent/consciousness
WIP: Output tool via Arc<Mutex<Subconscious>>, ToolHandler to Arc<dyn Fn>
- ToolHandler changed to Arc<dyn Fn(...)> (supports closures) - Subconscious wrapped in Arc<Mutex<>> on Mind - init_output_tool() pushes output tool closure capturing the Arc - Output removed from static memory_tools() - Most tool handlers wrapped in Arc::new() but some have paren issues Co-Authored-By: Proof of Concept <poc@bcachefs.org>
This commit is contained in:
parent
d167b11283
commit
12798eeae2
15 changed files with 74 additions and 51 deletions
|
|
@ -37,7 +37,7 @@ pub fn tool() -> super::Tool {
|
|||
name: "bash",
|
||||
description: "Execute a bash command and return its output. Use for git operations, building, running tests, and other terminal tasks.",
|
||||
parameters_json: r#"{"type":"object","properties":{"command":{"type":"string","description":"The bash command to execute"},"timeout_secs":{"type":"integer","description":"Timeout in seconds (default 120)"}},"required":["command"]}"#,
|
||||
handler: |_a, v| Box::pin(async move { run_bash(&v).await }),
|
||||
handler: Arc::new(|_a, v| Box::pin(async move { run_bash(&v).await })),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue