mirror of
https://github.com/kolbytn/mindcraft.git
synced 2025-04-21 21:52:07 +02:00
sendThouhgt fix
This commit is contained in:
parent
85e7a508c2
commit
c8f2cb5a39
2 changed files with 3 additions and 4 deletions
|
@ -22,8 +22,8 @@ export class AgentProcess {
|
|||
console.log(`Agent process exited with code ${code} and signal ${signal}`);
|
||||
|
||||
if (code !== 0) {
|
||||
// agent must run for at least 30 seconds before restarting
|
||||
if (Date.now() - last_restart < 30 * 1000) {
|
||||
// agent must run for at least 10 seconds before restarting
|
||||
if (Date.now() - last_restart < 10000) {
|
||||
console.error('Agent process exited too quickly. Killing entire process. Goodbye.');
|
||||
process.exit(1);
|
||||
}
|
||||
|
|
|
@ -38,8 +38,7 @@ export class Events {
|
|||
}
|
||||
|
||||
sendThought(agent, message) {
|
||||
agent.history.add(agent.name, message);
|
||||
agent.handleMessage();
|
||||
agent.handleMessage(agent.name, message);
|
||||
}
|
||||
|
||||
sendChat(agent, message) {
|
||||
|
|
Loading…
Add table
Reference in a new issue