feat: Claude Code 原生 Windows 通知(C# / .NET 10 + Avalonia 12)
为 Claude Code 提供原生 Windows toast 通知:点击跳回原窗口、切回 Windows Terminal 标签、跨虚拟桌面、调用方图标、非阻塞投递;NativeAOT 单文件分发。
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
namespace Notify.Models;
|
||||
|
||||
/// <summary>
|
||||
/// 一次弹窗请求(后续由 hook / named pipe 投递)
|
||||
/// </summary>
|
||||
public sealed class ToastRequest
|
||||
{
|
||||
public required string Title { get; init; }
|
||||
|
||||
public required string Message { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// true = 需要输入(黄色边框),false = 任务完成(橙色边框)
|
||||
/// </summary>
|
||||
public bool InputMode { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// true = 常驻:不自动消失,只能点击 / ✕ 关闭
|
||||
/// </summary>
|
||||
public bool Sticky { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 点击 toast 主体时要激活的窗口句柄,0 表示不激活
|
||||
/// </summary>
|
||||
public long TargetHwnd { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 目标若为 Windows Terminal,激活后要切回的标签 RuntimeId
|
||||
/// </summary>
|
||||
public string? WtRuntimeId { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 调用方 App 的 exe 路径,用于显示其图标
|
||||
/// </summary>
|
||||
public string? IconPath { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 覆盖停留秒数;为 null 时用设置里的默认值
|
||||
/// </summary>
|
||||
public int? DurationSecondsOverride { get; init; }
|
||||
}
|
||||
Reference in New Issue
Block a user