@mingxy/cerebro 1.5.1 → 1.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/hooks.ts +2 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mingxy/cerebro",
3
- "version": "1.5.1",
3
+ "version": "1.5.2",
4
4
  "description": "Cerebro persistent memory plugin for OpenCode — auto-recall, auto-capture, 9 memory tools with clustering",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
package/src/hooks.ts CHANGED
@@ -152,6 +152,8 @@ export function autoRecallHook(client: OmemClient, containerTags: string[], tui:
152
152
  const query_text = userMessages[userMessages.length - 1]?.content || firstMessages.get(input.sessionID) || "";
153
153
  const last_query_text = userMessages.length >= 2 ? userMessages[userMessages.length - 2].content : undefined;
154
154
 
155
+ if (!query_text.trim()) return;
156
+
155
157
  const projectTags = containerTags.filter(t => t.startsWith("omem_project_"));
156
158
  const shouldRecallRes = await client.shouldRecall(query_text, last_query_text, input.sessionID, similarityThreshold, maxRecallResults, projectTags.length > 0 ? projectTags : undefined);
157
159