You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
kev/Drawer/AI/AgentIntegration/NoOpAppController.cs

21 lines
591 B
C#

1 month ago
using System;
using System.Threading.Tasks;
namespace AI.AgentIntegration
{
/// <summary>
/// 无操作 AppController在未注入真实控制器时使用如独立运行 AI 模块时)。
/// </summary>
public sealed class NoOpAppController : IAppController
{
public event EventHandler<AppState>? StateChanged;
public AppState GetCurrentState() => new AppState();
public Task<AppActionResult> ExecuteAsync(AppAction action)
{
return Task.FromResult(AppActionResult.Fail("未连接应用控制器"));
}
}
}