Merge pull request #475 from kolbytn/blacklist

add blocked_actions to settings too
This commit is contained in:
Max Robinson 2025-03-07 15:03:07 -06:00 committed by GitHub
commit b6666c9c75
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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);