@tpsdev-ai/flair-mcp 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +5 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -49,7 +49,8 @@ server.tool("memory_search", "Search memories by meaning. Understands temporal q
|
|
|
49
49
|
const text = results
|
|
50
50
|
.map((r, i) => {
|
|
51
51
|
const date = r.createdAt ? r.createdAt.slice(0, 10) : "";
|
|
52
|
-
const
|
|
52
|
+
const idStr = r.id ? `id:${r.id}` : "";
|
|
53
|
+
const meta = [date, r.type, idStr].filter(Boolean).join(", ");
|
|
53
54
|
return `${i + 1}. ${r.content}${meta ? ` (${meta})` : ""}`;
|
|
54
55
|
})
|
|
55
56
|
.join("\n");
|
|
@@ -69,7 +70,9 @@ server.tool("memory_store", "Save information to persistent memory. Use for less
|
|
|
69
70
|
dedup: true,
|
|
70
71
|
dedupThreshold: 0.7,
|
|
71
72
|
});
|
|
72
|
-
|
|
73
|
+
// Check if dedup returned an existing memory (different ID than what we generated)
|
|
74
|
+
const generatedPrefix = `${agentId}-`;
|
|
75
|
+
const wasDeduped = result.id && !result.id.startsWith(generatedPrefix);
|
|
73
76
|
if (wasDeduped) {
|
|
74
77
|
return { content: [{ type: "text", text: `Similar memory already exists (id: ${result.id}): ${result.content?.slice(0, 200)}` }] };
|
|
75
78
|
}
|