import type React from "react"; import type { VectorCortexEconomicsView } from "../api/vector-cortex"; import { Card, CardContent, CardHeader, CardTitle } from "../components/ui/card"; import { Metric } from "./VectorCortexMetric"; import { VcStatusBadge } from "./VcStatusBadge"; export function VectorCortexEconomicsCard({ view }: { view: VectorCortexEconomicsView | null }): React.ReactElement { return (
Cache Economics (VC7B)
{!view?.enabled ? (
Cache economics disabled (VC7B off) — no cache reuse is priced; the cache-economics surface is reported bypassed rather than priced (mode C).
) : ( <>
Reader-only cache-economics diagnostics — counts and ECON_* codes only. Cache economics price a frozen rendered prompt's reuse, so provider prices, covered ranges, span/covered digests, request digests, and session ids are never exposed (SECURITY_PRIVACY). An unproven exclusion (declared without a proving fixture id) is rejected by the exclusion-proof rule and is reported here only as a count.
{view?.status === "awaiting_data" && (
Awaiting first event. Data will appear after the next pipeline run.
)} {view?.status === "deferred" && view?.deferredReason && (
Deferred: {view.deferredReason.replace(/_/g, " ")}
)} )}
); }