From c58ad93f24854bbcde610ccff7cb6742cba5141c Mon Sep 17 00:00:00 2001 From: MaxRobinsonTheGreat Date: Fri, 7 Mar 2025 15:02:31 -0600 Subject: [PATCH] add blocked_actions to settings too --- settings.js | 1 + src/agent/agent.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/settings.js b/settings.js index 7542a0e..c226658 100644 --- a/settings.js +++ b/settings.js @@ -35,6 +35,7 @@ export default "show_bot_views": false, // show bot's view in browser at localhost:3000, 3001... "allow_insecure_coding": false, // allows newAction command and model can write/run code on your computer. enable at own risk + "blocked_actions" : [], // commands to disable and remove from docs. Ex: ["!setMode"] "code_timeout_mins": -1, // minutes code is allowed to run. -1 for no timeout "relevant_docs_count": 5, // Parameter: -1 = all, 0 = no references, 5 = five references. If exceeding the maximum, all reference documents are returned. diff --git a/src/agent/agent.js b/src/agent/agent.js index 715fa21..853df3f 100644 --- a/src/agent/agent.js +++ b/src/agent/agent.js @@ -46,7 +46,7 @@ export class Agent { await this.prompter.initExamples(); console.log('Initializing task...'); this.task = new Task(this, task_path, task_id); - const blocked_actions = this.task.blocked_actions || []; + const blocked_actions = settings.blocked_actions.concat(this.task.blocked_actions || []); blacklistCommands(blocked_actions); serverProxy.connect(this);