fix: hide usage errors in status
parent
f07c39b265
commit
c63144ab14
|
|
@ -39,7 +39,7 @@ export function formatUsageWindowSummary(
|
||||||
snapshot: ProviderUsageSnapshot,
|
snapshot: ProviderUsageSnapshot,
|
||||||
opts?: { now?: number; maxWindows?: number; includeResets?: boolean },
|
opts?: { now?: number; maxWindows?: number; includeResets?: boolean },
|
||||||
): string | null {
|
): string | null {
|
||||||
if (snapshot.error) return `error: ${snapshot.error}`;
|
if (snapshot.error) return null;
|
||||||
if (snapshot.windows.length === 0) return null;
|
if (snapshot.windows.length === 0) return null;
|
||||||
const now = opts?.now ?? Date.now();
|
const now = opts?.now ?? Date.now();
|
||||||
const maxWindows =
|
const maxWindows =
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue