import { useCLITaskStore } from '../../stores/cliTaskStore' import { useTranslation } from '../../i18n' import type { CLITask } from '../../types/cliTask' const statusConfig = { pending: { icon: 'radio_button_unchecked', color: 'var(--color-text-tertiary)', label: 'pending', }, in_progress: { icon: 'pending', color: 'var(--color-warning)', label: 'active', }, completed: { icon: 'check_circle', color: 'var(--color-success)', label: 'done', }, } as const export function SessionTaskBar() { const { tasks, expanded, toggleExpanded, completedAndDismissed, resetCompletedTasks, } = useCLITaskStore() const t = useTranslation() if (tasks.length === 0) return null // Don't show sticky bar if tasks were completed and the user already continued chatting const allCompleted = tasks.every((tk) => tk.status === 'completed') if (allCompleted && completedAndDismissed) return null const completedCount = tasks.filter((tk) => tk.status === 'completed').length const totalCount = tasks.length const progressPercent = totalCount > 0 ? Math.round((completedCount / totalCount) * 100) : 0 return (