@mingxy/cerebro 1.7.3 → 1.7.5
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/package.json +1 -1
- package/src/index.ts +1 -1
- package/src/tools.ts +3 -2
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -84,7 +84,7 @@ const OmemPlugin: Plugin = async (input) => {
|
|
|
84
84
|
// 启动时检测连接状态
|
|
85
85
|
try {
|
|
86
86
|
await omemClient.getStats();
|
|
87
|
-
showToast(tui, "🧠 Cerebro", `v${pluginVersion}
|
|
87
|
+
showToast(tui, "🧠 Cerebro · Connected", `Version v${pluginVersion}`, "success", 6000);
|
|
88
88
|
logInfo(`Connected to ${config.apiUrl}`);
|
|
89
89
|
} catch (err) {
|
|
90
90
|
const errMsg = err instanceof Error ? err.message : String(err);
|
package/src/tools.ts
CHANGED
|
@@ -388,10 +388,11 @@ export function buildTools(client: OmemClient, containerTags: string[], context:
|
|
|
388
388
|
const sessionId = context.getSessionId();
|
|
389
389
|
if (!sessionId) return JSON.stringify({ ok: false, error: "No active session" });
|
|
390
390
|
|
|
391
|
-
|
|
391
|
+
const state = args.state?.toLowerCase();
|
|
392
|
+
if (state === "on") {
|
|
392
393
|
setAutoStoreEnabled(sessionId, true);
|
|
393
394
|
return JSON.stringify({ ok: true, auto_store: true, message: "Cerebro auto-store: ON" });
|
|
394
|
-
} else if (
|
|
395
|
+
} else if (state === "off") {
|
|
395
396
|
setAutoStoreEnabled(sessionId, false);
|
|
396
397
|
return JSON.stringify({ ok: true, auto_store: false, message: "Cerebro auto-store: OFF" });
|
|
397
398
|
} else {
|