IssueTriage can now interact with task in YouTrack and it is idempotent
This commit is contained in:
@@ -14,6 +14,9 @@ def _as_dict(result: Any) -> dict:
|
||||
if isinstance(result, dict):
|
||||
return result
|
||||
|
||||
if isinstance(result, str):
|
||||
return json.loads(result)
|
||||
|
||||
if not isinstance(result, list):
|
||||
raise ValueError(f"Unexpected MCP response shape: {type(result)}")
|
||||
|
||||
@@ -57,6 +60,8 @@ def _as_list(result: Any) -> list[dict]:
|
||||
text = result[0].get("text", "")
|
||||
elif isinstance(result, list):
|
||||
return result # already a list of dicts
|
||||
elif isinstance(result, str):
|
||||
return json.loads(result)
|
||||
else:
|
||||
raise ValueError(f"Unexpected MCP response shape: {type(result)}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user