diff --git a/apps/web/src/components/chat/ThreadDetailsUsage.tsx b/apps/web/src/components/chat/ThreadDetailsUsage.tsx
index 2997f6faa21b6..46dba875f4ca2 100644
--- a/apps/web/src/components/chat/ThreadDetailsUsage.tsx
+++ b/apps/web/src/components/chat/ThreadDetailsUsage.tsx
@@ -10,6 +10,7 @@ import {
paceOf,
remainingPercent,
} from "@t3tools/shared/usageLimits";
+import { Link } from "@tanstack/react-router";
import { formatDuration, limitsNotice } from "@t3tools/shared/usageLimitsCopy";
import { msg, useGT, useLocale, useMessages } from "gt-react";
import type { ReactNode } from "react";
@@ -74,6 +75,7 @@ export function ThreadDetailsUsage({
fill={null}
tone={null}
value={gt("Unavailable")}
+ opensUsagePage
tooltip={{notice}}
/>
) : (
@@ -171,6 +173,7 @@ function LimitRow({
tone={left <= 10 ? "error" : left <= 20 ? "warning" : null}
value={`${left}%`}
ariaValue={gt("{left}% left", { left })}
+ opensUsagePage
tooltip={
<>
@@ -201,6 +204,7 @@ function UsageRow({
ariaValue = value,
tooltip,
muted = false,
+ opensUsagePage = false,
}: {
readonly label: string;
/** Bar fill from 0 to 100. Null hides the bar. */
@@ -212,17 +216,30 @@ function UsageRow({
readonly ariaValue?: string;
readonly tooltip: ReactNode;
readonly muted?: boolean;
+ readonly opensUsagePage?: boolean;
}) {
+ const rowClassName = cn(
+ "col-span-3 grid h-6 grid-cols-subgrid items-center rounded-lg px-2.5 outline-none hover:bg-black/[0.035] focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring data-popup-open:bg-black/[0.035] dark:hover:bg-white/[0.08] dark:data-popup-open:bg-white/[0.08]",
+ opensUsagePage ? "cursor-pointer" : "cursor-default",
+ );
const gt = useGT();
return (
+ opensUsagePage ? (
+
+ ) : (
+
+ )
}
>
{label}