@modelstudio/modelstudio-memory-for-openclaw 1.0.2 → 1.0.3
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/index.ts +11 -5
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
package/index.ts
CHANGED
|
@@ -358,7 +358,7 @@ function stripInjectedContext(text: string): string {
|
|
|
358
358
|
}
|
|
359
359
|
|
|
360
360
|
const CONFIG_REQUIRED_MESSAGE =
|
|
361
|
-
"Memory plugin is not configured. Please add apiKey and userId to ~/.openclaw/openclaw.json under plugins.entries.modelstudio-memory-for-openclaw.config
|
|
361
|
+
"Memory plugin is not configured. Please add apiKey and userId to ~/.openclaw/openclaw.json under plugins.entries.modelstudio-memory-for-openclaw.config";
|
|
362
362
|
|
|
363
363
|
// ============================================================================
|
|
364
364
|
// Plugin Definition
|
|
@@ -381,9 +381,10 @@ const modelstudioMemoryPlugin = {
|
|
|
381
381
|
);
|
|
382
382
|
|
|
383
383
|
if (!cfg.apiKey) {
|
|
384
|
-
|
|
385
|
-
"modelstudio-memory
|
|
386
|
-
);
|
|
384
|
+
const msg =
|
|
385
|
+
"[modelstudio-memory] apiKey not configured. Memory features disabled. Add apiKey to ~/.openclaw/openclaw.json under plugins.entries.modelstudio-memory-for-openclaw.config";
|
|
386
|
+
api.logger.warn(msg);
|
|
387
|
+
console.warn(msg);
|
|
387
388
|
}
|
|
388
389
|
api.logger.info(
|
|
389
390
|
`modelstudio-memory: registered (user: ${cfg.userId}, autoCapture: ${cfg.autoCapture}, autoRecall: ${cfg.autoRecall})`
|
|
@@ -722,7 +723,12 @@ const modelstudioMemoryPlugin = {
|
|
|
722
723
|
// ========== autoRecall ==========
|
|
723
724
|
if (cfg.autoRecall) {
|
|
724
725
|
api.on("before_agent_start", async (event) => {
|
|
725
|
-
if (!cfg.apiKey)
|
|
726
|
+
if (!cfg.apiKey) {
|
|
727
|
+
return {
|
|
728
|
+
prependSystemContext:
|
|
729
|
+
"Note: Memory plugin is not configured (apiKey missing). Long-term memory is disabled. Ask the user to add apiKey to ~/.openclaw/openclaw.json under plugins.entries.modelstudio-memory-for-openclaw.config and restart the gateway.",
|
|
730
|
+
};
|
|
731
|
+
}
|
|
726
732
|
const prompt = extractTextContent(event.prompt);
|
|
727
733
|
if (!prompt || prompt.length < cfg.recallMinPromptLength) {
|
|
728
734
|
return;
|
package/openclaw.plugin.json
CHANGED