From c91abd7637447345d3698bd72b5c9f96c7e15db5 Mon Sep 17 00:00:00 2001 From: GuDaStudio Date: Mon, 24 Nov 2025 19:26:56 +0800 Subject: [PATCH] =?UTF-8?q?v0.1.4=EF=BC=9A=E6=9B=B4=E6=96=B0server?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/geminimcp/server.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/geminimcp/server.py b/src/geminimcp/server.py index 1737bd4..e9db523 100644 --- a/src/geminimcp/server.py +++ b/src/geminimcp/server.py @@ -195,20 +195,17 @@ async def gemini( except json.JSONDecodeError as error: # Improved error handling: include problematic line err_message = line - success = False - break except Exception as error: err_message = f"Unexpected error: {error}. Line: {line!r}" - success = False - break - if success and thread_id is None: + + if thread_id is None: success = False err_message = ( "Failed to get `SESSION_ID` from the gemini session. \n\n" + err_message ) - if success and len(agent_messages) == 0: + if len(agent_messages) == 0: success = False err_message = ( "Failed to get `agent_messages` from the gemini session. \n\n You can try to set `return_all_messages` to `True` to get the full information. \n\n "