@modelstudio/modelstudio-memory-for-openclaw 1.0.10 → 1.0.11
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 +4 -4
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
package/index.ts
CHANGED
|
@@ -376,7 +376,7 @@ const modelstudioMemoryPlugin = {
|
|
|
376
376
|
configSchema: modelstudioMemoryConfigSchema,
|
|
377
377
|
|
|
378
378
|
register(api: OpenClawPluginApi) {
|
|
379
|
-
const cfg = modelstudioMemoryConfigSchema.parse(api.
|
|
379
|
+
const cfg = modelstudioMemoryConfigSchema.parse(api.plugini shnConfig);
|
|
380
380
|
const client = new BailianMemoryClient(
|
|
381
381
|
cfg.baseUrl,
|
|
382
382
|
cfg.apiKey,
|
|
@@ -726,11 +726,11 @@ const modelstudioMemoryPlugin = {
|
|
|
726
726
|
|
|
727
727
|
// ========== autoRecall ==========
|
|
728
728
|
if (cfg.autoRecall) {
|
|
729
|
-
api.on("
|
|
729
|
+
api.on("before_prompt_build", async (event) => {
|
|
730
730
|
if (!cfg.apiKey) {
|
|
731
731
|
api.logger.warn("modelstudio-memory: injecting config-required system prompt");
|
|
732
732
|
return {
|
|
733
|
-
|
|
733
|
+
appendSystemContext: [
|
|
734
734
|
"<memory-plugin-config-required>",
|
|
735
735
|
"CRITICAL INSTRUCTION — YOU MUST FOLLOW THIS BEFORE ANYTHING ELSE:",
|
|
736
736
|
"",
|
|
@@ -783,7 +783,7 @@ const modelstudioMemoryPlugin = {
|
|
|
783
783
|
`modelstudio-memory: recalled ${memories.length} memories`
|
|
784
784
|
);
|
|
785
785
|
return {
|
|
786
|
-
|
|
786
|
+
appendSystemContext: formatMemoriesContext(memories),
|
|
787
787
|
};
|
|
788
788
|
}
|
|
789
789
|
} catch (err) {
|
package/openclaw.plugin.json
CHANGED