File tree Expand file tree Collapse file tree 1 file changed +26
-2
lines changed
src/views/Generator/AutoCorrelation Expand file tree Collapse file tree 1 file changed +26
-2
lines changed Original file line number Diff line number Diff line change 11import { Button , Flex , Text } from '@radix-ui/themes'
2- import { ExternalLink , KeyIcon , RefreshCw } from 'lucide-react'
2+ import {
3+ ExternalLink as ExternalLinkIcon ,
4+ KeyIcon ,
5+ RefreshCw ,
6+ } from 'lucide-react'
37
48import grotCrashed from '@/assets/grot-crashed.svg'
9+ import { ExternalLink } from '@/components/ExternalLink'
510import { useSettingsChanged } from '@/hooks/useSettings'
611import { useFeaturesStore } from '@/store/features'
712import { useStudioUIStore } from '@/store/ui'
@@ -49,7 +54,7 @@ function OpenAiError({ error, onRetry }: AutoCorrelationErrorProps) {
4954
5055 const reportIssueButton = (
5156 < Button onClick = { ( ) => window . studio . ui . reportIssue ( ) } variant = "outline" >
52- < ExternalLink />
57+ < ExternalLinkIcon />
5358 Report issue
5459 </ Button >
5560 )
@@ -65,6 +70,25 @@ function OpenAiError({ error, onRetry }: AutoCorrelationErrorProps) {
6570 )
6671 }
6772
73+ if ( errorMessage . includes ( 'insufficient_quota' ) ) {
74+ return (
75+ < MessageContent
76+ title = "Quota exceeded"
77+ message = {
78+ < >
79+ You have exceeded your OpenAI API quota. Check your{ ' ' }
80+ < ExternalLink href = "https://platform.openai.com/account/billing" >
81+ plan and billing details
82+ </ ExternalLink > { ' ' }
83+ on the OpenAI platform.
84+ </ >
85+ }
86+ >
87+ { openSettingsButton }
88+ </ MessageContent >
89+ )
90+ }
91+
6892 if ( errorMessage . includes ( 'context window' ) ) {
6993 return (
7094 < MessageContent
You can’t perform that action at this time.
0 commit comments