memory_write result shows scope and hook
This commit is contained in:
1 parent
9b6eb9bee1
commit
6cad314ab1
1 file changed
+6
-1
@@ -409,7 +409,12 @@ impl Tool for MemoryWrite {
|
||||
async fn call(&self, a: Value, cx: &ToolCtx) -> ToolResult {
|
||||
let g = |k: &str| a[k].as_str().unwrap_or_default();
|
||||
match hx_core::memory::write(&memory_dir(&a, cx), g("slug"), g("hook"), g("body")) {
|
||||
Ok(()) => ToolResult::ok(format!("saved memory '{}'", g("slug"))),
|
||||
Ok(()) => ToolResult::ok(format!(
|
||||
"saved {} memory '{}' – {}",
|
||||
a["scope"].as_str().unwrap_or("global"),
|
||||
g("slug"),
|
||||
g("hook")
|
||||
)),
|
||||
Err(e) => ToolResult::err(e),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user