import React from 'react'; import { ThemeToggle } from './ThemeToggle'; import { ThemePreference } from '../hooks/useTheme'; import { GitHubStarsButton } from './GitHubStarsButton'; import { useSpinningFavicon } from '../hooks/useSpinningFavicon'; interface HeaderProps { isConnected: boolean; projects: string[]; sources: string[]; currentFilter: string; currentSource: string; onFilterChange: (filter: string) => void; onSourceChange: (source: string) => void; isProcessing: boolean; queueDepth: number; themePreference: ThemePreference; onThemeChange: (theme: ThemePreference) => void; onContextPreviewToggle: () => void; } function formatSourceLabel(source: string): string { if (source === 'all') return 'All'; if (source === 'claude') return 'Claude'; if (source === 'codex') return 'Codex'; return source.charAt(0).toUpperCase() + source.slice(1); } function buildSourceTabs(sources: string[]): string[] { const merged = ['all', 'claude', 'codex', ...sources]; return Array.from(new Set(merged.filter(Boolean))); } export function Header({ isConnected, projects, sources, currentFilter, currentSource, onFilterChange, onSourceChange, isProcessing, queueDepth, themePreference, onThemeChange, onContextPreviewToggle }: HeaderProps) { useSpinningFavicon(isProcessing); const availableSources = buildSourceTabs(sources); return (
); }