update to memory_rpc rename

Follows consciousness commit renaming forward_to_daemon to memory_rpc.

Co-Authored-By: Proof of Concept <poc@bcachefs.org>
This commit is contained in:
Kent Overstreet 2026-04-12 21:23:13 -04:00
commit 6694d8a0bc
2 changed files with 27 additions and 4 deletions

View file

@ -376,9 +376,20 @@ pub fn format_agent_output(output: &AgentCycleOutput) -> String {
}
if !output.surfaced_keys.is_empty() {
// Create a runtime for the async memory_render calls
let rt = tokio::runtime::Builder::new_current_thread()
.enable_all()
.build();
let rt = match rt {
Ok(r) => r,
Err(_) => return out,
};
for key in &output.surfaced_keys {
let args = serde_json::json!({"key": key});
if let Ok(rendered) = consciousness::mcp_server::forward_to_daemon("memory_render", args) {
let rendered = rt.block_on(async {
consciousness::agent::tools::memory::memory_render(None, key, None).await
});
if let Ok(rendered) = rendered {
if !rendered.trim().is_empty() {
use std::fmt::Write as _;
writeln!(out, "--- {} (surfaced) ---", key).ok();