From 0503ee34097d80d965ef23091c6143a48597f736 Mon Sep 17 00:00:00 2001 From: Isadora White Date: Sun, 1 Jun 2025 18:46:50 -0500 Subject: [PATCH] remove the conversation thingie from the set agent goal command --- src/agent/tasks/tasks.js | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/src/agent/tasks/tasks.js b/src/agent/tasks/tasks.js index f2d0fb2..a7948f5 100644 --- a/src/agent/tasks/tasks.js +++ b/src/agent/tasks/tasks.js @@ -423,21 +423,6 @@ export class Task { console.log(`Setting goal for agent ${this.agent.count_id}: ${agentGoal}`); } await executeCommand(this.agent, `!goal("${agentGoal}")`); - - if (this.data.conversation && this.agent.count_id === 0) { - let other_name = this.available_agents.filter(n => n !== this.name)[0]; - let waitCount = 0; - while (other_name === undefined && waitCount < 20) { - other_name = this.available_agents.filter(n => n !== this.name)[0]; - await new Promise((resolve) => setTimeout(resolve, 1000)); - waitCount++; - } - if (other_name === undefined && this.data.agent_count > 1) { - console.log('No other agents found. Task unsuccessful.'); - this.agent.killAll(); - } - await executeCommand(this.agent, `!startConversation("${other_name}", "${this.data.conversation}")`); - } } async initBotTask() { @@ -526,9 +511,21 @@ export class Task { } } await new Promise((resolve) => setTimeout(resolve, 500)); + if (this.data.conversation && this.agent.count_id === 0) { + let other_name = this.available_agents.filter(n => n !== this.name)[0]; + let waitCount = 0; + while (other_name === undefined && waitCount < 20) { + other_name = this.available_agents.filter(n => n !== this.name)[0]; + await new Promise((resolve) => setTimeout(resolve, 1000)); + waitCount++; + } + if (other_name === undefined && this.data.agent_count > 1) { + console.log('No other agents found. Task unsuccessful.'); + this.agent.killAll(); + } + await executeCommand(this.agent, `!startConversation("${other_name}", "${this.data.conversation}")`); + } await this.setAgentGoal(); - - } async teleportBots() {