@rigstate/mcp 0.5.1 → 0.5.2
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/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/tools/query-brain.ts +6 -2
package/dist/index.js
CHANGED
|
@@ -999,12 +999,14 @@ async function queryBrain(supabase, userId, projectId, query, limit = 8, thresho
|
|
|
999
999
|
}
|
|
1000
1000
|
const embedding = await generateQueryEmbedding(query);
|
|
1001
1001
|
let memories = [];
|
|
1002
|
+
console.log(`Searching brain for "${query}" (limit: ${limit}, threshold: ${threshold})`);
|
|
1003
|
+
console.log(`Embedding present: ${!!embedding}`);
|
|
1002
1004
|
const { data: searchResults, error: searchError } = await supabase.rpc("hybrid_search_memories", {
|
|
1003
1005
|
p_project_id: projectId,
|
|
1004
1006
|
p_query: query,
|
|
1005
|
-
p_embedding: embedding,
|
|
1007
|
+
p_embedding: embedding || null,
|
|
1006
1008
|
p_limit: limit,
|
|
1007
|
-
p_similarity_threshold: threshold || 0.
|
|
1009
|
+
p_similarity_threshold: threshold || 0.1
|
|
1008
1010
|
});
|
|
1009
1011
|
if (searchError) {
|
|
1010
1012
|
console.error("Hybrid search error:", searchError);
|
|
@@ -1020,6 +1022,7 @@ async function queryBrain(supabase, userId, projectId, query, limit = 8, thresho
|
|
|
1020
1022
|
}));
|
|
1021
1023
|
}
|
|
1022
1024
|
} else if (searchResults) {
|
|
1025
|
+
console.log(`Found ${searchResults.length} results from RPC`);
|
|
1023
1026
|
memories = searchResults.map((m) => ({
|
|
1024
1027
|
id: m.id,
|
|
1025
1028
|
content: m.content,
|