feat: add Accordion component for UI and Zustand store for coordinator management

- Implemented Accordion component using Radix UI for collapsible sections.
- Created Zustand store to manage coordinator execution state, command chains, logs, and interactive questions.
- Added validation tests for CLI settings type definitions, ensuring type safety and correct behavior of helper functions.
This commit is contained in:
catlog22
2026-02-03 10:02:40 +08:00
parent bcb4af3ba0
commit 5483a72e9f
82 changed files with 6156 additions and 7605 deletions

View File

@@ -481,11 +481,15 @@ function NotificationItem({ notification, onDelete, onToggleRead }: Notification
<div
className={cn(
'p-3 border-b border-border hover:bg-muted/50 transition-colors',
'border-l-4',
'border-l-4 relative',
getTypeBorder(notification.type),
isRead && 'opacity-70'
)}
>
{/* Unread dot indicator */}
{!isRead && (
<span className="absolute top-2 right-2 h-2 w-2 rounded-full bg-destructive" />
)}
<div className="flex gap-3">
{/* Icon */}
<div className="mt-0.5">{getNotificationIcon(notification.type)}</div>
@@ -512,6 +516,23 @@ function NotificationItem({ notification, onDelete, onToggleRead }: Notification
{notification.source}
</Badge>
)}
{/* Read/Unread status badge */}
{!isRead && (
<Badge
variant="destructive"
className="h-5 px-1.5 text-[10px] font-medium shrink-0"
>
{formatMessage({ id: 'notifications.unread' }) || '未读'}
</Badge>
)}
{isRead && (
<Badge
variant="outline"
className="h-5 px-1.5 text-[10px] font-medium shrink-0 opacity-60"
>
{formatMessage({ id: 'notifications.read' }) || '已读'}
</Badge>
)}
</div>
{/* Timestamp row: absolute + relative */}