test(memoryFlush): add tests for resetSession option
This commit is contained in:
parent
5b325ae413
commit
f8a2f048cc
@ -42,6 +42,41 @@ describe("memory flush settings", () => {
|
||||
expect(settings?.prompt).toContain("NO_REPLY");
|
||||
expect(settings?.systemPrompt).toContain("NO_REPLY");
|
||||
});
|
||||
|
||||
it("defaults resetSession to false", () => {
|
||||
const settings = resolveMemoryFlushSettings();
|
||||
expect(settings?.resetSession).toBe(false);
|
||||
});
|
||||
|
||||
it("respects resetSession when set to true", () => {
|
||||
const settings = resolveMemoryFlushSettings({
|
||||
agents: {
|
||||
defaults: {
|
||||
compaction: {
|
||||
memoryFlush: {
|
||||
resetSession: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
expect(settings?.resetSession).toBe(true);
|
||||
});
|
||||
|
||||
it("respects resetSession when explicitly set to false", () => {
|
||||
const settings = resolveMemoryFlushSettings({
|
||||
agents: {
|
||||
defaults: {
|
||||
compaction: {
|
||||
memoryFlush: {
|
||||
resetSession: false,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
expect(settings?.resetSession).toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
describe("shouldRunMemoryFlush", () => {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user