memory_write result shows scope and hook

This commit is contained in:
hermes committed 2026-10-06 13:03:22 +00:00
1 parent 9b6eb9bee1
commit 6cad314ab1
1 file changed
+6 -1
+6 -1
View File
@@ -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),
}
}