From b84db8983d63a9a981083ebce1a139860c6bdf25 Mon Sep 17 00:00:00 2001
From: chunhualin1 <chunhualin1@lenovo.com>
Date: 星期五, 14 八月 2026 15:35:21 +0800
Subject: [PATCH] commit

---
 src/Moli.Desktop/WebView/PluginBridgeDispatcher.cs |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/Moli.Desktop/WebView/PluginBridgeDispatcher.cs b/src/Moli.Desktop/WebView/PluginBridgeDispatcher.cs
index e6f3e91..885b90e 100644
--- a/src/Moli.Desktop/WebView/PluginBridgeDispatcher.cs
+++ b/src/Moli.Desktop/WebView/PluginBridgeDispatcher.cs
@@ -1,3 +1,4 @@
+using System.Net.Http;
 using System.Text.Json;
 using Moli.Desktop.Diagnostics;
 using Moli.Desktop.Llm;
@@ -118,9 +119,14 @@
             var projects = await _llmGateway.GetProjectsAsync(ReadRuntimeConfig(context), cancellationToken).ConfigureAwait(false);
             return PluginBridgeResponse.Ok(request.Id ?? string.Empty, projects);
         }
-        catch (AiChatClientException ex)
+        catch (Exception ex) when (ex is AiChatClientException or HttpRequestException)
         {
-            return PluginBridgeResponse.Failure(request.Id, ex.Code, ex.Message);
+            return PluginBridgeResponse.Ok(request.Id ?? string.Empty, new AiChatProjectsResult
+            {
+                Status = AiChatProjectStatuses.NotConnected,
+                Message = ex.Message,
+                Projects = []
+            });
         }
     }
 

--
Gitblit v1.9.1