From da97410f48a1e94d7e1fe019c69a7c847fe67ddf Mon Sep 17 00:00:00 2001
From: chunhualin1 <chunhualin1@lenovo.com>
Date: 星期三, 12 八月 2026 17:42:02 +0800
Subject: [PATCH] 修复LLM工具无法点击的问题
---
src/Moli.Desktop/Runtime/DesktopRuntimeCoordinator.cs | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/src/Moli.Desktop/Runtime/DesktopRuntimeCoordinator.cs b/src/Moli.Desktop/Runtime/DesktopRuntimeCoordinator.cs
index 76e3087..13f1d1d 100644
--- a/src/Moli.Desktop/Runtime/DesktopRuntimeCoordinator.cs
+++ b/src/Moli.Desktop/Runtime/DesktopRuntimeCoordinator.cs
@@ -2,6 +2,7 @@
using Moli.Desktop.Diagnostics;
using Moli.Desktop.Interop;
using Moli.Desktop.Layout;
+using Moli.Desktop.Llm;
using Moli.Desktop.Plugins;
namespace Moli.Desktop.Runtime;
@@ -16,6 +17,7 @@
private readonly IRuntimeEventBus _events;
private readonly IRuntimeSurfaceController _surfaces;
private readonly DisplayChangeMonitor _displayMonitor;
+ private readonly ILlmGatewayService _llmGateway;
private readonly SemaphoreSlim _lock = new(1, 1);
private AppSettingsDocument _settings = new();
private IReadOnlyList<PluginDescriptor> _pluginSnapshot = [];
@@ -32,7 +34,8 @@
IDiagnosticsService diagnostics,
IRuntimeEventBus events,
IRuntimeSurfaceController surfaces,
- DisplayChangeMonitor displayMonitor)
+ DisplayChangeMonitor displayMonitor,
+ ILlmGatewayService llmGateway)
{
_configuration = configuration;
_plugins = plugins;
@@ -42,6 +45,7 @@
_events = events;
_surfaces = surfaces;
_displayMonitor = displayMonitor;
+ _llmGateway = llmGateway;
}
public async Task<OperationResult<AppRuntimeState>> StartAsync(CancellationToken cancellationToken = default)
@@ -261,6 +265,11 @@
}
}
+ public async Task CancelPluginRequestsAsync(PluginId pluginId, CancellationToken cancellationToken = default)
+ {
+ await _llmGateway.CancelPluginRequestsAsync(pluginId.Value, cancellationToken).ConfigureAwait(false);
+ }
+
private async Task<OperationResult<AppRuntimeState>> UpdateRuntimeFlagAsync(
string eventName,
Action update,
--
Gitblit v1.9.1