Skip to main content

Module code_tools

Module code_tools 

Source
Expand description

Code tools — execute_python, run_tests, debug_code, analyze_code.

Ported from Python tools/code_tools.py + tools/custom_tools.py.

Structs§

AnalyzeCodeTool
Analyzes a source file and returns its structure (functions, classes, imports, line count). Language-agnostic via regex patterns.
DebugCodeTool
ExecutePythonTool
Executes Python code by writing to a temp file and running it through the shell backend. On desktop this uses the native OS shell (python3); on mobile it routes through fastshell’s embedded CPython engine.
RunTestsTool