Broad rearrangement of handlers
This commit is contained in:
@@ -128,8 +128,12 @@ def handle_message(msg):
|
||||
params = msg.get("params", {})
|
||||
arguments = params.get("arguments", {})
|
||||
result = forward_to_editor(arguments)
|
||||
if isinstance(result, dict) and "error" in result:
|
||||
text = result["error"]
|
||||
else:
|
||||
text = result
|
||||
return make_jsonrpc(msg_id, {
|
||||
"content": [{"type": "text", "text": result}],
|
||||
"content": [{"type": "text", "text": text}],
|
||||
})
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user