feat: action enum for browser agent
This commit is contained in:
@@ -44,7 +44,7 @@ class BashInterpreter(Tools):
|
||||
command = command.replace('\n', '')
|
||||
if self.safe_mode and is_unsafe(commands):
|
||||
return "Unsafe command detected, execution aborted."
|
||||
if self.language_bash_attempt(command):
|
||||
if self.language_bash_attempt(command) and allow_language_exec_bash == False:
|
||||
continue
|
||||
try:
|
||||
process = subprocess.Popen(
|
||||
|
||||
@@ -37,10 +37,14 @@ class Tools():
|
||||
self.work_dir = self.create_work_dir()
|
||||
self.excutable_blocks_found = False
|
||||
self.safe_mode = True
|
||||
self.allow_language_exec_bash = False
|
||||
|
||||
def get_work_dir(self):
|
||||
return self.work_dir
|
||||
|
||||
def set_allow_language_exec_bash(value: bool) -> None:
|
||||
self.allow_language_exec_bash = value
|
||||
|
||||
def check_config_dir_validity(self):
|
||||
"""Check if the config directory is valid."""
|
||||
path = self.config['MAIN']['work_dir']
|
||||
|
||||
Reference in New Issue
Block a user