diff --git a/.dev_session/SESSION_INFO b/.dev_session/SESSION_INFO index 321a1b9a..9396b1ca 100644 --- a/.dev_session/SESSION_INFO +++ b/.dev_session/SESSION_INFO @@ -1 +1 @@ -{"task_id": "30a88f42-8544-819a-b5fc-c85cd80f43b7", "token": "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", "session_start_time": "2026-02-17T07:16:11.126812"} \ No newline at end of file +{"task_id": "30b88f42-8544-80ea-88a7-e7c03e749c30", "token": "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", "session_start_time": "2026-02-18T14:32:47.873998"} \ No newline at end of file diff --git a/.gemini/env_old b/.gemini/env_old new file mode 100644 index 00000000..cf6c484c --- /dev/null +++ b/.gemini/env_old @@ -0,0 +1 @@ +GEMINI_API_KEY=AIzaSyBNg5yQ-dezfDs6j9DGn8qJ8SImNCGm9Ds diff --git a/.gitignore b/.gitignore index 72d4be11..69d5ad73 100644 --- a/.gitignore +++ b/.gitignore @@ -68,3 +68,6 @@ Log_from_docker/ # Node.js specific !package.json !package-lock.json + +.gemini/.env +gemini_api_key.txt diff --git a/company-explorer/frontend/src/components/Inspector.tsx b/company-explorer/frontend/src/components/Inspector.tsx index bc2a576a..cf94576d 100644 --- a/company-explorer/frontend/src/components/Inspector.tsx +++ b/company-explorer/frontend/src/components/Inspector.tsx @@ -1,6 +1,6 @@ import { useEffect, useState } from 'react' import axios from 'axios' -import { X, ExternalLink, Bot, Briefcase, Globe, Users, DollarSign, MapPin, Tag, RefreshCw as RefreshCwIcon, Search as SearchIcon, Pencil, Check, Download, Clock, Lock, Unlock, Calculator, Ruler, Database, Trash2, Flag, AlertTriangle, Scale, Target, Save } from 'lucide-react' +import { X, ExternalLink, Bot, Briefcase, Globe, Users, DollarSign, MapPin, Tag, RefreshCw as RefreshCwIcon, Search as SearchIcon, Pencil, Check, Download, Clock, Lock, Unlock, Calculator, Ruler, Database, Trash2, Flag, AlertTriangle, Scale, Target } from 'lucide-react' import clsx from 'clsx' import { ContactsManager, Contact } from './ContactsManager' @@ -453,41 +453,78 @@ export function Inspector({ companyId, initialContactId, onClose, apiBase }: Ins ) } - // CRM Comparison Renderer - const renderCRMComparison = () => { - if (!data?.crm_name && !data?.crm_website) return null; + // CRM Comparison and Data Quality Renderer + const renderDataQualityCard = () => { + if (!data) return null; + const hasCrmData = data.crm_name || data.crm_website; + const hasQualityScores = data.confidence_score != null || data.data_mismatch_score != null; + + if (!hasCrmData && !hasQualityScores) return null; + const confidenceScore = data.confidence_score ?? 0; + const mismatchScore = data.data_mismatch_score ?? 0; + + const getConfidenceColor = (score: number) => { + if (score > 0.8) return { bg: "bg-green-100", text: "text-green-700" }; + if (score > 0.5) return { bg: "bg-yellow-100", text: "text-yellow-700" }; + return { bg: "bg-red-100", text: "text-red-700" }; + } + + const getMismatchColor = (score: number) => { + if (score <= 0.3) return { bg: "bg-green-100", text: "text-green-700" }; + if (score <= 0.5) return { bg: "bg-yellow-100", text: "text-yellow-700" }; + return { bg: "bg-red-100", text: "text-red-700" }; + } + + const confidenceColors = getConfidenceColor(confidenceScore); + const mismatchColors = getMismatchColor(mismatchScore); + return (
{ind.description || "No definition"}
+ +{ind.description || "No definition"}
+ + {(ind.pains || ind.gains) && ( +