mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-26 16:41:49 +00:00
feat(memory-wiki): add prompt supplement integration
This commit is contained in:
@@ -9,6 +9,7 @@ import {
|
||||
buildMemoryPromptSection,
|
||||
getMemoryRuntime,
|
||||
registerMemoryFlushPlanResolver,
|
||||
registerMemoryPromptSupplement,
|
||||
registerMemoryPromptSection,
|
||||
registerMemoryRuntime,
|
||||
resolveMemoryFlushPlan,
|
||||
@@ -156,6 +157,7 @@ describe("clearPluginLoaderCache", () => {
|
||||
create: async () => ({ provider: null }),
|
||||
});
|
||||
registerMemoryPromptSection(() => ["stale memory section"]);
|
||||
registerMemoryPromptSupplement("memory-wiki", () => ["stale wiki supplement"]);
|
||||
registerMemoryFlushPlanResolver(() => ({
|
||||
softThresholdTokens: 1,
|
||||
forceFlushTranscriptBytes: 2,
|
||||
@@ -174,6 +176,7 @@ describe("clearPluginLoaderCache", () => {
|
||||
});
|
||||
expect(buildMemoryPromptSection({ availableTools: new Set() })).toEqual([
|
||||
"stale memory section",
|
||||
"stale wiki supplement",
|
||||
]);
|
||||
expect(resolveMemoryFlushPlan({})?.relativePath).toBe("memory/stale.md");
|
||||
expect(getMemoryRuntime()).toBeDefined();
|
||||
|
||||
Reference in New Issue
Block a user