add blocked_actions to settings too

This commit is contained in:
MaxRobinsonTheGreat 2025-03-07 15:02:31 -06:00
parent 5c3efb870b
commit c58ad93f24
2 changed files with 2 additions and 1 deletions

View file

@ -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.

View file

@ -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);