mirror of
https://github.com/GuDaStudio/codexmcp.git
synced 2026-02-05 02:00:24 +08:00
v0.7.2:允许mcp等错误发生
This commit is contained in:
@@ -218,8 +218,6 @@ async def codex(
|
|||||||
if "fail" in line_dict.get("type", ""):
|
if "fail" in line_dict.get("type", ""):
|
||||||
success = False if len(agent_messages) == 0 else success
|
success = False if len(agent_messages) == 0 else success
|
||||||
err_message = "codex error: " + line_dict.get("error", {}).get("message", "")
|
err_message = "codex error: " + line_dict.get("error", {}).get("message", "")
|
||||||
if "reconnecting" not in err_message.lower():
|
|
||||||
break
|
|
||||||
if "error" in line_dict.get("type", ""):
|
if "error" in line_dict.get("type", ""):
|
||||||
success = False if len(agent_messages) == 0 else success
|
success = False if len(agent_messages) == 0 else success
|
||||||
err_message = "codex error: " + line_dict.get("message", "")
|
err_message = "codex error: " + line_dict.get("message", "")
|
||||||
@@ -233,11 +231,11 @@ async def codex(
|
|||||||
success = False
|
success = False
|
||||||
break
|
break
|
||||||
|
|
||||||
if success and thread_id is None:
|
if thread_id is None:
|
||||||
success = False
|
success = False
|
||||||
err_message = "Failed to get `SESSION_ID` from the codex session. \n\n" + err_message
|
err_message = "Failed to get `SESSION_ID` from the codex session. \n\n" + err_message
|
||||||
|
|
||||||
if success and len(agent_messages) == 0:
|
if len(agent_messages) == 0:
|
||||||
success = False
|
success = False
|
||||||
err_message = "Failed to get `agent_messages` from the codex session. \n\n You can try to set `return_all_messages` to `True` to get the full reasoning information. \n\n " + err_message
|
err_message = "Failed to get `agent_messages` from the codex session. \n\n You can try to set `return_all_messages` to `True` to get the full reasoning information. \n\n " + err_message
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user