Agent Zero AI framework
refactor: mask secrets in code execution command output and increase truncation limit
frdel6181ac9c204e
diff --git a/plugins/_code_execution/tools/code_execution_tool.py b/plugins/_code_execution/tools/code_execution_tool.pyindex 46319677b..88478bc82 100644--- a/plugins/_code_execution/tools/code_execution_tool.py+++ b/plugins/_code_execution/tools/code_execution_tool.py@@ -5,7 +5,7 @@ import shleximport timefrom helpers.tool import Tool, Response-from helpers import files, rfc_exchange, projects, runtime, settings+from helpers import files, rfc_exchange, projects, runtime, secrets, settingsfrom helpers.print_style import PrintStylefrom helpers.strings import truncate_text as truncate_text_stringfrom helpers.messages import truncate_text as truncate_text_agent@@ -200,8 +200,9 @@ class CodeExecution(Tool):raise edef format_command_for_output(self, command: str):- short_cmd = command[:200]+ short_cmd = command[:250]short_cmd = " ".join(short_cmd.split())+ short_cmd = secrets.get_secrets_manager(self.agent.context).mask_values(short_cmd)short_cmd = truncate_text_string(short_cmd, 100)return f"{short_cmd}"