From 09d4e2f1a1bc206c80d8d3287d070c70ec7fd63d Mon Sep 17 00:00:00 2001
From: chunhualin1 <chunhualin1@lenovo.com>
Date: 星期五, 14 八月 2026 20:00:52 +0800
Subject: [PATCH] Merge branch 'master' of http://git.linmoli.cn/r/Moli.Desktop
---
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