The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
fix(notices): handle undefined notice data in useAppNotices
Steven Enamakel32661f002d7b
diff --git a/app/src/components/notices/useAppNotices.ts b/app/src/components/notices/useAppNotices.tsindex 37d855955b..f10658b38a 100644--- a/app/src/components/notices/useAppNotices.ts+++ b/app/src/components/notices/useAppNotices.ts@@ -85,7 +85,14 @@ export function useAppNotices(): AppNotice[] {const navigate = useNavigate();const active = useAppSelector(selectActiveUserErrors);const { level: budgetLevel, pct: budgetPct } = useEmbeddingBudgetState();- const { teamUsage, isLoading: usageLoading, isAtLimit, isNearLimit, isFreeTier } = useUsageState();+ const {+ teamUsage,+ isLoading: usageLoading,+ isAtLimit,+ isNearLimit,+ isFreeTier,+ usagePct,+ } = useUsageState();// Per-session, per-key dismissal for the derived (non-store) notices.//@@ -170,7 +177,7 @@ export function useAppNotices(): AppNotice[] {? t('upsell.global.limitMessage'): t('upsell.global.nearLimitMessage').replace('{pct}',- String(Math.round(usagePctOf(teamUsage)))+ String(Math.round(usagePct * 100))),actionLabel: t('chat.upgrade'),onAction: () => void openUrl(PRICING_URL),@@ -197,10 +204,6 @@ export function useAppNotices(): AppNotice[] {t,teamUsage,usageLoading,+ usagePct,]);}--/** Percentage used, from whichever shape the usage payload carries. */-function usagePctOf(teamUsage: { usagePct?: number } | null): number {- return Math.round((teamUsage?.usagePct ?? 0) * 100);-}