/** * NotificationTriggerSettings - Component for managing notification triggers. * Allows users to configure when notifications should be generated. * * Uses intent-first design pattern with 4 sections: * 1. General Info (always visible) * 2. Trigger Condition (mode selector) * 3. Dynamic Configuration (based on mode) * 4. Advanced (collapsible) */ import { AddTriggerForm } from './components/AddTriggerForm'; import { SectionHeader } from './components/SectionHeader'; import { TriggerCard } from './components/TriggerCard'; import type { NotificationTriggerSettingsProps } from './types'; // Stable no-op function for builtin triggers that can't be removed const noopRemove = (_triggerId: string): Promise => Promise.resolve(); /** * Main component for managing notification triggers. */ export const NotificationTriggerSettings = ({ triggers, saving, onUpdateTrigger, onAddTrigger, onRemoveTrigger, }: Readonly): React.JSX.Element => { // Separate builtin and custom triggers const builtinTriggers = triggers.filter((t) => t.isBuiltin); const customTriggers = triggers.filter((t) => !t.isBuiltin); return (
{/* Builtin Triggers */} {builtinTriggers.length > 0 && (

Default triggers that come with the application. You can enable/disable them and customize their patterns.

{builtinTriggers.map((trigger) => ( ))}
)} {/* Custom Triggers */}

Create your own triggers to get notified for specific patterns or tool outputs.

{customTriggers.length > 0 && (
{customTriggers.map((trigger) => ( ))}
)} {customTriggers.length === 0 && (

No custom triggers configured yet.

)}
); };