Skip to content

Commit 747e8a3

Browse files
author
艾森
committed
feat: include memory ID in store/update response text
Include the full memory ID in the response text of `memory_store` and `memory_update` tools so the AI model can verify successful persistence and reference specific entries. - `memory_store`: add `(ID: <uuid>)` to response text - `memory_update`: show full ID instead of truncated 8-char prefix Closes #139
1 parent 631e0b3 commit 747e8a3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/tools.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -664,7 +664,7 @@ export function registerMemoryStoreTool(
664664
content: [
665665
{
666666
type: "text",
667-
text: `Stored: "${text.slice(0, 100)}${text.length > 100 ? "..." : ""}" in scope '${targetScope}'`,
667+
text: `Stored: "${text.slice(0, 100)}${text.length > 100 ? "..." : ""}" (ID: ${entry.id}) in scope '${targetScope}'`,
668668
},
669669
],
670670
details: {
@@ -996,7 +996,7 @@ export function registerMemoryUpdateTool(
996996
content: [
997997
{
998998
type: "text",
999-
text: `Updated memory ${updated.id.slice(0, 8)}...: "${updated.text.slice(0, 80)}${updated.text.length > 80 ? "..." : ""}"`,
999+
text: `Updated memory (ID: ${updated.id}): "${updated.text.slice(0, 80)}${updated.text.length > 80 ? "..." : ""}"`,
10001000
},
10011001
],
10021002
details: {

0 commit comments

Comments
 (0)