fix: do not crash if runtime parameter is not set in code exec (#641)

Co-authored-by: Rafael Uzarowski <uzarowski.rafael@proton.me>

ehl0wr0ld committed Jul 31, 2025 at 09:55 UTC edffad2ea9d404d1d605f7be26486e68467f457b
1 file changed +1 -1
python/tools/code_execution_tool.py
+1 -1
@@ -71,7 +71,7 @@ class CodeExecution(Tool):
71
72 def get_heading(self, text: str = ""):
73 if not text:
74 - text = f"{self.name} - {self.args['runtime']}"
74 + text = f"{self.name} - {self.args['runtime'] if 'runtime' in self.args else 'unknown'}"
75 text = truncate_text_string(text, 60)
76 session = self.args.get("session", None)
77 session_text = f"[{session}] " if session or session == 0 else ""