import { Box, Chip, Typography } from '@mui/material' import type { AssistantContext } from '../../domain/assistant' const PAGE_LABELS: Record = { '/supply/dashboard': 'Übersicht', '/supply/properties': 'Meine Objekte', '/supply/match-center': 'Eingehende Bedarfe', '/supply/data-quality': 'Datenpflege', '/supply/future-availability':'Marktchancen', '/demand/ai-search': 'Flächensuche', '/demand/results': 'Ergebnisse', '/demand/compare': 'Vergleich', '/demand/shortlists': 'Shortlists', '/ops/review-queue': 'Review Queue', '/ops/ai-monitoring': 'AI Monitoring', '/ops/governance': 'Governance', } function resolvePageLabel(route: string): string { for (const [path, label] of Object.entries(PAGE_LABELS)) { if (route.startsWith(path)) return label } return route.split('/').filter(Boolean).pop()?.replace(/-/g, ' ') ?? 'Seite' } const ENTITY_LABELS: Record = { PROPERTY: 'Objekt', NEED: 'Gesuch', MATCH: 'Match', SIGNAL: 'Signal', AI_OUTPUT: 'AI-Output', } interface Props { context: AssistantContext } export function AssistantContextSummary({ context }: Props) { const pageLabel = resolvePageLabel(context.currentRoute) return ( {context.selectedEntityType && context.selectedEntityId && ( )} {context.visibleScores?.quality !== undefined && ( = 70 ? '#dcfce7' : '#fef3c7', color: context.visibleScores.quality >= 70 ? '#166534' : '#92400e', fontWeight: 600, fontSize: '0.65rem', height: 20, }} /> )} {context.visibleScores?.matchScore !== undefined && ( )} {context.visibleMissingData && context.visibleMissingData.length > 0 && ( Fehlende Daten: {context.visibleMissingData.slice(0, 3).join(', ')} )} ) }