Working on implementing batch commands for UE wingman
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user