Files
notify/Notify/Models/ToastRequest.cs
T
chuan b89223fa54 feat: 定位模型重做、聚焦短显、托盘交互与 host spawn 修复
- 定位改为 水平(左/中/右) × 垂直(上/中/下) + 边缘留白,取代四角枚举
- 完成类通知在目标窗口已聚焦时用更短停留(FocusedDurationSeconds)
- 托盘左键单击直接打开设置,右键菜单仅保留退出
- 修复 host 拉起用 UseShellExecute=true,脱离钩子 stdout 管道,避免 Claude 卡在 running stop hook
2026-06-22 16:40:27 +08:00

42 lines
1.2 KiB
C#

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; }
}