This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
using AI.Interface;
namespace AI.Service
{
/// <summary>
/// 消息通知器,用于在 Filter 和 ViewModel 之间传递工具调用通知
/// </summary>
public class MessageNotifier : IMessageNotifier
/// 当工具调用发生时触发此事件
public event EventHandler<string>? ToolCallReceived;
/// 通知添加一条工具调用消息到 UI(仅显示,不进入 AI 上下文)
/// <param name="message">消息内容</param>
public void NotifyToolCall(string message)
// 触发事件,让订阅者(如 MainWindowViewModel)处理
ToolCallReceived?.Invoke(this, message);
}