From 6ec56e3e110a75ead63165ed7223699fa10614e2 Mon Sep 17 00:00:00 2001 From: vikingowl Date: Wed, 7 Jan 2026 13:02:58 +0100 Subject: [PATCH] fix: recall without parameters now returns all memories like list When the model calls recall without key or category (e.g., 'what memories do you have?'), it now returns all memories across all categories instead of an error. This provides better UX since models often use recall instead of list for memory queries. --- frontend/src/lib/tools/templates.ts | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/frontend/src/lib/tools/templates.ts b/frontend/src/lib/tools/templates.ts index 49723e5..14d4a9f 100644 --- a/frontend/src/lib/tools/templates.ts +++ b/frontend/src/lib/tools/templates.ts @@ -707,7 +707,20 @@ switch (action) { return { found: false, key }; } - return { error: 'Provide key and/or category' }; + // No key or category provided - return all memories (like list) + const allMemories = {}; + for (const cat in memory) { + allMemories[cat] = Object.entries(memory[cat]).map(([k, data]) => ({ + key: k, + value: data.value, + stored: data.stored + })); + } + return { + memories: allMemories, + totalCategories: Object.keys(memory).length, + totalEntries: Object.values(memory).reduce((sum, cat) => sum + Object.keys(cat).length, 0) + }; } case 'list': {