address greptile review: per-provider deficit notch, startedAt filter, weekRange refresh, deduplicate providerDisplayName

This commit is contained in:
Sai Shankar
2026-03-08 03:35:23 +05:30
committed by Dotta
parent 94018e0239
commit 82bc00a3ae
4 changed files with 36 additions and 42 deletions

View File

@@ -1,7 +1,7 @@
import type { CostByProviderModel, CostWindowSpendRow } from "@paperclipai/shared";
import { Card, CardContent, CardHeader, CardTitle, CardDescription } from "@/components/ui/card";
import { QuotaBar } from "./QuotaBar";
import { formatCents, formatTokens } from "@/lib/utils";
import { formatCents, formatTokens, providerDisplayName } from "@/lib/utils";
interface ProviderQuotaCardProps {
provider: string;
@@ -17,17 +17,6 @@ interface ProviderQuotaCardProps {
showDeficitNotch: boolean;
}
function providerLabel(provider: string): string {
const map: Record<string, string> = {
anthropic: "Anthropic",
openai: "OpenAI",
google: "Google",
cursor: "Cursor",
jetbrains: "JetBrains AI",
};
return map[provider.toLowerCase()] ?? provider;
}
export function ProviderQuotaCard({
provider,
rows,
@@ -76,7 +65,7 @@ export function ProviderQuotaCard({
<div className="flex items-start justify-between gap-3">
<div className="min-w-0">
<CardTitle className="text-sm font-semibold">
{providerLabel(provider)}
{providerDisplayName(provider)}
</CardTitle>
<CardDescription className="text-xs mt-0.5">
<span className="font-mono">{formatTokens(totalInputTokens)}</span> in