From e1a47ce7c909e39b81a36cf1401877e26624ecd2 Mon Sep 17 00:00:00 2001 From: Sweaterdog Date: Thu, 27 Feb 2025 21:17:16 -0800 Subject: [PATCH] Update modes.js --- src/agent/modes.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/agent/modes.js b/src/agent/modes.js index 8bf1594..8747cf3 100644 --- a/src/agent/modes.js +++ b/src/agent/modes.js @@ -277,7 +277,7 @@ const modes_list = [ ]; async function execute(mode, agent, func, timeout=-1) { - if (agent.self_prompter.on) + if (agent.self_prompter.isActive()) agent.self_prompter.stopLoop(); let interrupted_action = agent.actions.currentActionLabel; mode.active = true; @@ -290,7 +290,7 @@ async function execute(mode, agent, func, timeout=-1) { let should_reprompt = interrupted_action && // it interrupted a previous action !agent.actions.resume_func && // there is no resume function - !agent.self_prompter.on && // self prompting is not on + !agent.self_prompter.isActive() && // self prompting is not on !code_return.interrupted; // this mode action was not interrupted by something else if (should_reprompt) { @@ -311,9 +311,9 @@ for (let mode of modes_list) { class ModeController { /* SECURITY WARNING: - ModesController must be isolated. Do not store references to external objects like `agent`. + ModesController must be reference isolated. Do not store references to external objects like `agent`. This object is accessible by LLM generated code, so any stored references are also accessible. - This can be used to expose sensitive information by malicious human prompters. + This can be used to expose sensitive information by malicious prompters. */ constructor() { this.behavior_log = '';