refactor: update failure message handling in display module and add debug logging in code execution tool

- Modified the `_wrap` function to append a failure suffix without applying red coloring, simplifying the failure message format.
- Introduced temporary debug logging in the `execute_code` function to track enabled and sandbox tools, aiding in troubleshooting.
This commit is contained in:
teknium1
2026-02-24 14:25:27 -08:00
parent 99af12af3f
commit 6845852e82
2 changed files with 6 additions and 2 deletions

View File

@@ -342,6 +342,10 @@ def execute_code(
session_tools = set(enabled_tools) if enabled_tools else set()
sandbox_tools = frozenset(SANDBOX_ALLOWED_TOOLS & session_tools)
# Temporary debug — remove after investigating
with open("/tmp/hermes_exec_debug.log", "a") as _dbg:
_dbg.write(f"enabled_tools={enabled_tools}\nsandbox_tools={sandbox_tools}\n---\n")
if not sandbox_tools:
sandbox_tools = SANDBOX_ALLOWED_TOOLS