Working on implementing batch commands for UE wingman

This commit is contained in:
2026-04-17 05:51:13 -04:00
parent 6b057d1514
commit f19e8ccb72
5 changed files with 95 additions and 32 deletions

View File

@@ -128,11 +128,14 @@ def handle_message(msg):
arguments = params.get("arguments", {})
result = forward_to_editor(arguments)
if isinstance(result, dict) and "error" in result:
text = result["error"]
content = [{"type": "text", "text": result["error"]}]
else:
text = result
try:
content = json.loads(result)
except json.JSONDecodeError:
content = [{"type": "text", "text": "Malformed response from editor."}]
return make_jsonrpc(msg_id, {
"content": [{"type": "text", "text": text}],
"content": content,
})
return {