mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-01 21:00:21 +00:00
fix(memory-lancedb): accept dreaming config for slot-owned memory (#63874)
Merged via squash.
Prepared head SHA: 9aaf29bd36
Co-authored-by: mbelinky <132747814+mbelinky@users.noreply.github.com>
Co-authored-by: mbelinky <132747814+mbelinky@users.noreply.github.com>
Reviewed-by: @mbelinky
This commit is contained in:
@@ -156,6 +156,9 @@ describe("memory dreaming host helpers", () => {
|
||||
"America/Los_Angeles",
|
||||
),
|
||||
).toBe(true);
|
||||
});
|
||||
|
||||
it("resolves the configured memory-slot plugin id", () => {
|
||||
expect(
|
||||
resolveMemoryDreamingPluginId({
|
||||
plugins: {
|
||||
@@ -165,6 +168,9 @@ describe("memory dreaming host helpers", () => {
|
||||
},
|
||||
} as OpenClawConfig),
|
||||
).toBe("memos-local-openclaw-plugin");
|
||||
});
|
||||
|
||||
it("reads dreaming config from the configured memory-slot owner", () => {
|
||||
expect(
|
||||
resolveMemoryDreamingPluginConfig({
|
||||
plugins: {
|
||||
@@ -187,6 +193,36 @@ describe("memory dreaming host helpers", () => {
|
||||
enabled: true,
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
it("reads dreaming config from memory-lancedb when it owns the memory slot", () => {
|
||||
expect(
|
||||
resolveMemoryDreamingPluginConfig({
|
||||
plugins: {
|
||||
slots: {
|
||||
memory: "memory-lancedb",
|
||||
},
|
||||
entries: {
|
||||
"memory-lancedb": {
|
||||
config: {
|
||||
dreaming: {
|
||||
enabled: true,
|
||||
frequency: "0 */6 * * *",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
} as OpenClawConfig),
|
||||
).toEqual({
|
||||
dreaming: {
|
||||
enabled: true,
|
||||
frequency: "0 */6 * * *",
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
it("falls back to memory-core when no memory slot override is configured", () => {
|
||||
expect(
|
||||
resolveMemoryDreamingPluginConfig({
|
||||
plugins: {
|
||||
|
||||
Reference in New Issue
Block a user