+
= 90
+ ? 'var(--color-status-error, #e05a6b)'
+ : limit.usedPercent >= 70
+ ? 'var(--color-status-warning, #e0913a)'
+ : 'var(--color-status-success, #37b877)',
+ }}
+ />
+
+ {/*
+ When the reading was taken matters as much as the
+ reading: these come from the last transcript line the
+ agent wrote, and a 0% from yesterday is not a claim
+ about now.
+ */}
+
+ Reported {formatAge(limit.capturedAtMs)}
+ {limit.resetsAtMs
+ ? limit.resetsAtMs <= Date.now()
+ ? ' · window has since reset'
+ : ` · resets ${formatReset(limit.resetsAtMs)}`
+ : ''}
+
+
+ ))}
+
+ )}
+
+
+
+ {/*
+ The window cap is the user's to state — no provider publishes
+ a per-plan token number, and the gauge is guesswork until
+ someone says what it is measuring against.
+ */}
+
+
+
+ setLimitDraft(event.target.value)}
+ onBlur={applyLimit}
+ onKeyDown={event => { if (event.key === 'Enter') applyLimit(); }}
+ className="w-24 rounded border border-border-secondary bg-surface-primary px-1.5 py-0.5 text-[11px] tabular-nums text-text-primary focus:border-interactive focus:outline-none"
+ />
+ million tokens
+ {windowLimitMTok !== null && (
+
+ )}
+
+
+
+
+
+