This commit is contained in:
2026-02-21 21:42:42 -05:00
parent 59208b27ec
commit f258fc5765
5 changed files with 412 additions and 41 deletions

15
gui.py
View File

@@ -1,4 +1,4 @@
# gui.py
# gui.py
import dearpygui.dearpygui as dpg
import tomllib
import tomli_w
@@ -149,7 +149,16 @@ def _render_payload_tool_call(parent: str, payload: dict):
_add_kv_row(parent, "name", payload.get("name", ""))
if "id" in payload:
_add_kv_row(parent, "id", payload["id"])
_add_text_field(parent, "script", payload.get("script", ""))
# PowerShell tool uses 'script'; MCP file tools use 'args' dict
if "script" in payload:
_add_text_field(parent, "script", payload.get("script", ""))
elif "args" in payload:
args = payload["args"]
if isinstance(args, dict):
for ak, av in args.items():
_add_text_field(parent, ak, str(av))
else:
_add_text_field(parent, "args", str(args))
def _render_payload_tool_result(parent: str, payload: dict):
@@ -385,7 +394,7 @@ class App:
except Exception:
continue
# No valid project file found migrate from legacy config.toml
# No valid project file found - migrate from legacy config.toml
self.project = project_manager.migrate_from_legacy_config(self.config)
name = self.project.get("project", {}).get("name", "project")
fallback_path = f"{name}.toml"