diff --git a/src-tauri/src/commands/chat.rs b/src-tauri/src/commands/chat.rs
index 728d469dd..af90f8b7b 100644
--- a/src-tauri/src/commands/chat.rs
+++ b/src-tauri/src/commands/chat.rs
@@ -535,12 +535,9 @@ async fn chat_send_inner(
log::info!(
"[chat] Conversation memory recall: has_data={}, len={}",
ctx.is_some(),
- ctx.as_deref().map(|s| s.len()).unwrap_or(0)
+ ctx.as_ref().map(|ctx| ctx.to_string().len()).unwrap_or(0)
);
- if let Some(ref data) = ctx {
- log::debug!("[chat] Conversation memory content:\n{}", data);
- }
- ctx
+ ctx.map(|ctx| ctx.to_string())
}
Err(e) => {
log::warn!("[chat] Conversation memory recall failed: {}", e);
@@ -567,10 +564,6 @@ async fn chat_send_inner(
log::info!("[chat] Recalling memory for skill={sid}");
match mem.recall_skill_context(sid, sid, 10).await {
Ok(Some(ctx)) => {
- log::info!(
- "[chat] Skill memory recall ok: skill={sid}, len={}",
- ctx.len()
- );
log::debug!("[chat] Skill memory content (skill={sid}):\n{}", ctx);
skill_contexts.push(format!(
"[{}_CONTEXT]\n{}\n[/{}_CONTEXT]",
diff --git a/src-tauri/src/commands/memory.rs b/src-tauri/src/commands/memory.rs
index 8bfd9a513..87d890a54 100644
--- a/src-tauri/src/commands/memory.rs
+++ b/src-tauri/src/commands/memory.rs
@@ -122,7 +122,7 @@ pub async fn recall_memory(
),
Err(e) => log::warn!("[memory] recall_memory: exit — error: {e}"),
}
- result
+ result.map(|ctx| ctx.map(|ctx| ctx.to_string()))
}
None => {
log::warn!("[memory] recall_memory: exit — client not initialised (no JWT set)");
diff --git a/src-tauri/src/memory/mod.rs b/src-tauri/src/memory/mod.rs
index c43aa4123..f92312daa 100644
--- a/src-tauri/src/memory/mod.rs
+++ b/src-tauri/src/memory/mod.rs
@@ -214,7 +214,7 @@ impl MemoryClient {
skill_id: &str,
_integration_id: &str,
max_chunks: u32,
- ) -> Result