Process tool with safety checks
(self, tool, args)
| 132 | self.log("Client disconnected") |
| 133 | |
| 134 | def process_tool(self, tool, args): |
| 135 | """Process tool with safety checks""" |
| 136 | self.log(f"=== PROCESSING TOOL: {tool} ===") |
| 137 | |
| 138 | if tool == "test_echo": |
| 139 | return f"Debug echo: {args.get('message', 'no message')}" |
| 140 | |
| 141 | elif tool == "execute_python": |
| 142 | return self.safe_execute_python(args) |
| 143 | |
| 144 | elif tool == "check_state": |
| 145 | return self.check_freecad_state() |
| 146 | |
| 147 | else: |
| 148 | return f"Unknown tool: {tool}" |
| 149 | |
| 150 | def safe_execute_python(self, args): |
| 151 | """Execute Python with extensive logging""" |
no test coverage detected