hermes-agent/apps/desktop/src/lib/icons.ts
Brooklyn Nicholson 630a4ef03c feat(desktop): native OS notifications with per-type toggles
Adds a native OS notification system (Electron Notification, routed cross-OS)
distinct from the in-app toast feed. Before this, one hardcoded cue existed
(message.complete while document.hidden) with no settings or event coverage.

- Engine (store/native-notifications.ts): localStorage-backed prefs (master
  switch + per-kind toggles) and a gated dispatcher over five kinds — approval,
  input, turnDone, turnError, backgroundDone — with a 1s per-(kind,session)
  self-evicting throttle.
- Gating: "backgrounded" = document.hidden OR !document.hasFocus(), so an
  alt-tabbed window still counts as away. Completion kinds fire only when
  backgrounded and for the active session (no spam from a busy gateway);
  attention kinds (approval/input) also break through for off-screen sessions.
- Wired into real event sites (use-message-stream.ts): message.complete, error,
  approval/clarify/sudo/secret.request; backgroundDone from composer-status at
  the running -> exited transition.
- Click focuses the window and jumps to the originating session; approval
  notifications carry Approve/Reject buttons that resolve in place over
  approval.respond, mirroring the in-app Run/Reject bar.
- Settings: new Notifications panel (master + per-kind switches, test button
  with real OS-result feedback). Full i18n (en/ja/zh/zh-hant).
2026-06-14 00:31:03 -05:00

205 lines
4 KiB
TypeScript

import {
IconActivity as Activity,
IconAlertCircle as AlertCircle,
IconAlertTriangle as AlertTriangle,
IconArchive as Archive,
IconArchiveOff as ArchiveOff,
IconArrowUp as ArrowUp,
IconArrowUpRight as ArrowUpRight,
IconAt as AtSign,
IconWaveSine as AudioLines,
IconChartBar as BarChart3,
IconBell as Bell,
IconBrain as Brain,
IconBug as Bug,
IconCheck as Check,
IconCircleCheck as CheckCircle2,
IconCheck as CheckIcon,
IconChevronDown as ChevronDown,
IconChevronDown as ChevronDownIcon,
IconChevronLeft as ChevronLeft,
IconChevronLeft as ChevronLeftIcon,
IconChevronRight as ChevronRight,
IconChevronRight as ChevronRightIcon,
IconCircle as CircleIcon,
IconClipboard as Clipboard,
IconClock as Clock,
IconCommand as Command,
IconCopy as Copy,
IconCopy as CopyIcon,
IconCpu as Cpu,
IconDownload as Download,
IconExternalLink as ExternalLink,
IconEye as Eye,
IconEyeOff as EyeOff,
IconPhoto as FileImage,
IconFileText as FileText,
IconFolderOpen as FolderOpen,
IconGitBranch as GitBranch,
IconGitBranch as GitBranchIcon,
IconGlobe as Globe,
IconHash as Hash,
IconHelpCircle as HelpCircle,
IconPhoto as ImageIcon,
IconInfoCircle as Info,
IconKey as KeyRound,
IconLayersIntersect2 as Layers3,
IconLink as Link,
IconLink as Link2,
IconLink as LinkIcon,
IconLoader2 as Loader2,
IconLoader2 as Loader2Icon,
IconLock as Lock,
IconLogin as LogIn,
IconMessageCircle as MessageCircle,
IconMessage2 as MessageSquareText,
IconMicrophone as Mic,
IconMicrophoneOff as MicOff,
IconDeviceDesktop as Monitor,
IconDeviceDesktopAnalytics as MonitorPlay,
IconMoon as Moon,
IconDots as MoreHorizontal,
IconDots as MoreHorizontalIcon,
IconDotsVertical as MoreVertical,
IconNotebook as NotebookTabs,
IconPackage as Package,
IconPalette as Palette,
IconLayoutBottombar as PanelBottom,
IconLayoutSidebar as PanelLeftIcon,
IconPlayerPause as Pause,
IconPencil as Pencil,
IconPencil as PencilIcon,
IconPencil as PencilLine,
IconPin as Pin,
IconPlayerPlay as Play,
IconPlus as Plus,
IconRefresh as RefreshCw,
IconRefresh as RefreshCwIcon,
IconDeviceFloppy as Save,
IconSearch as Search,
IconSearch as SearchIcon,
IconSend as Send,
IconSettings as Settings,
IconSettings2 as Settings2,
IconAdjustmentsHorizontal as SlidersHorizontal,
IconSparkles as Sparkles,
IconSquare as Square,
IconSteeringWheel as SteeringWheel,
IconSun as Sun,
IconTerminal2 as Terminal,
IconTrash as Trash2,
IconUsers as Users,
IconVolume2 as Volume2,
IconVolume2 as Volume2Icon,
IconVolumeOff as VolumeX,
IconVolumeOff as VolumeXIcon,
IconTool as Wrench,
IconX as X,
IconX as XIcon,
IconBolt as Zap,
IconBoltFilled as ZapFilled
} from '@tabler/icons-react'
export {
Activity,
AlertCircle,
AlertTriangle,
Archive,
ArchiveOff,
ArrowUp,
ArrowUpRight,
AtSign,
AudioLines,
BarChart3,
Bell,
Brain,
Bug,
Check,
CheckCircle2,
CheckIcon,
ChevronDown,
ChevronDownIcon,
ChevronLeft,
ChevronLeftIcon,
ChevronRight,
ChevronRightIcon,
CircleIcon,
Clipboard,
Clock,
Command,
Copy,
CopyIcon,
Cpu,
Download,
ExternalLink,
Eye,
EyeOff,
FileImage,
FileText,
FolderOpen,
GitBranch,
GitBranchIcon,
Globe,
Hash,
HelpCircle,
ImageIcon,
Info,
KeyRound,
Layers3,
Link,
Link2,
LinkIcon,
Loader2,
Loader2Icon,
Lock,
LogIn,
MessageCircle,
MessageSquareText,
Mic,
MicOff,
Monitor,
MonitorPlay,
Moon,
MoreHorizontal,
MoreHorizontalIcon,
MoreVertical,
NotebookTabs,
Package,
Palette,
PanelBottom,
PanelLeftIcon,
Pause,
Pencil,
PencilIcon,
PencilLine,
Pin,
Play,
Plus,
RefreshCw,
RefreshCwIcon,
Save,
Search,
SearchIcon,
Send,
Settings,
Settings2,
SlidersHorizontal,
Sparkles,
Square,
SteeringWheel,
Sun,
Terminal,
Trash2,
Users,
Volume2,
Volume2Icon,
VolumeX,
VolumeXIcon,
Wrench,
X,
XIcon,
Zap,
ZapFilled
}
export type { Icon as IconComponent } from '@tabler/icons-react'