Update history.js

This commit is contained in:
Sweaterdog 2025-02-27 21:16:05 -08:00 committed by GitHub
parent b0803ca184
commit 6d350f1c1d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -84,7 +84,8 @@ export class History {
const data = {
memory: this.memory,
turns: this.turns,
self_prompt: this.agent.self_prompter.on ? this.agent.self_prompter.prompt : null,
self_prompting_state: this.agent.self_prompter.state,
self_prompt: this.agent.self_prompter.isStopped() ? null : this.agent.self_prompter.prompt,
last_sender: this.agent.last_sender
};
writeFileSync(this.memory_fp, JSON.stringify(data, null, 2));
@ -116,4 +117,4 @@ export class History {
this.turns = [];
this.memory = '';
}
}
}