sendThouhgt fix

This commit is contained in:
Kolby Nottingham 2023-12-20 20:41:15 -08:00
parent 85e7a508c2
commit c8f2cb5a39
2 changed files with 3 additions and 4 deletions

View file

@ -22,8 +22,8 @@ export class AgentProcess {
console.log(`Agent process exited with code ${code} and signal ${signal}`); console.log(`Agent process exited with code ${code} and signal ${signal}`);
if (code !== 0) { if (code !== 0) {
// agent must run for at least 30 seconds before restarting // agent must run for at least 10 seconds before restarting
if (Date.now() - last_restart < 30 * 1000) { if (Date.now() - last_restart < 10000) {
console.error('Agent process exited too quickly. Killing entire process. Goodbye.'); console.error('Agent process exited too quickly. Killing entire process. Goodbye.');
process.exit(1); process.exit(1);
} }

View file

@ -38,8 +38,7 @@ export class Events {
} }
sendThought(agent, message) { sendThought(agent, message) {
agent.history.add(agent.name, message); agent.handleMessage(agent.name, message);
agent.handleMessage();
} }
sendChat(agent, message) { sendChat(agent, message) {