diff --git a/apps/x/apps/renderer/src/App.tsx b/apps/x/apps/renderer/src/App.tsx index 0ca4b6b3..79a2b266 100644 --- a/apps/x/apps/renderer/src/App.tsx +++ b/apps/x/apps/renderer/src/App.tsx @@ -2291,7 +2291,9 @@ function App() { message: event.error, timestamp: Date.now(), }]) - toast.error(event.error.split('\n')[0] || 'Model error') + if (!matchBillingError(event.error)) { + toast.error(event.error.split('\n')[0] || 'Model error') + } console.error('Run error:', event.error) break } @@ -4649,6 +4651,9 @@ function App() { } if (isErrorMessage(item)) { + if (matchBillingError(item.message)) { + return null + } return ( diff --git a/apps/x/apps/renderer/src/components/chat-sidebar.tsx b/apps/x/apps/renderer/src/components/chat-sidebar.tsx index 4ce3e533..3b4021c8 100644 --- a/apps/x/apps/renderer/src/components/chat-sidebar.tsx +++ b/apps/x/apps/renderer/src/components/chat-sidebar.tsx @@ -86,35 +86,6 @@ function AutoScrollPre({ className, children }: { className?: string; children: ) } -/* ─── Billing error helpers ─── */ - -interface BillingRowboatAccount { - config?: { - appUrl?: string | null - } | null -} - -function BillingErrorCTA({ label }: { label: string }) { - const [appUrl, setAppUrl] = useState(null) - - useEffect(() => { - window.ipc.invoke('account:getRowboat', null) - .then((account: BillingRowboatAccount) => setAppUrl(account.config?.appUrl ?? null)) - .catch(() => {}) - }, []) - - if (!appUrl) return null - - return ( - - ) -} - const MIN_WIDTH = 360 const MAX_WIDTH = 1600 const MIN_MAIN_PANE_WIDTH = 420 @@ -467,19 +438,8 @@ export function ChatSidebar({ } if (isErrorMessage(item)) { - const billingError = matchBillingError(item.message) - if (billingError) { - return ( - - -
-

{billingError.title}

-

{billingError.subtitle}

- -
-
-
- ) + if (matchBillingError(item.message)) { + return null } return (