Files
notify/Notify/Ipc/NotifyMessage.cs
T
chuan f390bcd133 feat: 提示音、调用方图标与消息清洗(P2)
- 提示音:winmm 从内存异步播放打包 wav,可在设置开关,带防连环音
- 调用方图标:进程树上溯识别编辑器/终端,ExtractIconEx + GDI 转 Avalonia 位图显示
- 进程树跳过 shell/运行时,取不到图标回退默认 Claude 图标
- 消息清洗:折叠换行/多余空白为单行,避免撑乱 toast 布局
- 全程 LibraryImport/源生成,AOT 友好
2026-06-22 16:00:59 +08:00

30 lines
825 B
C#

namespace Notify.Ipc;
/// <summary>
/// 一条投递给 Host 的弹窗请求,经 spool 文件传递
/// </summary>
public sealed class NotifyMessage
{
public string Title { get; set; } = "";
public string Message { get; set; } = "";
// true = 需要输入(青色边框)
public bool InputMode { get; set; }
// true = 常驻,不自动消失
public bool Sticky { get; set; }
// 触发该通知的会话 id
public string? SessionId { get; set; }
// 点击 toast 时要激活的目标窗口句柄,0 表示无
public long TargetHwnd { get; set; }
// 目标若为 Windows Terminal,激活后要切回的标签 RuntimeId
public string? WtRuntimeId { get; set; }
// 调用方 App 的 exe 路径,用于显示其图标
public string? IconPath { get; set; }
}