标签 Toast Notification 下的文章


如图,每次一轮对话完成进行 toast 提示 + 系统提示音

{ "alwaysThinkingEnabled": true, "env": { "ANTHROPIC_MODEL": "claude-sonnet-4-5-20250929", }, "hooks": { "Stop": [ { "hooks": [ { "command": "powershell -NoProfile -Command \"[Windows.UI.Notifications.ToastNotificationManager, Windows.UI.Notifications, ContentType = WindowsRuntime] | Out-Null; $t=[Windows.UI.Notifications.ToastTemplateType]::ToastText02; $x=[Windows.UI.Notifications.ToastNotificationManager]::GetTemplateContent($t); $x.GetElementsByTagName('text')[0].AppendChild($x.CreateTextNode('Claude'))|Out-Null; $x.GetElementsByTagName('text')[1].AppendChild($x.CreateTextNode('Stop'))|Out-Null; $toast=[Windows.UI.Notifications.ToastNotification]::new($x); [Windows.UI.Notifications.ToastNotificationManager]::CreateToastNotifier('Windows PowerShell').Show($toast)\"", "type": "command" }, { "command": "powershell -NoProfile -Command \"[console]::Beep(1000,200)\"", "type": "command" } ] } ] } } 

📌 转载信息
转载时间:
2026/1/12 10:55:11