feat: improve quota toast with ByteDance Doubao sponsorship info and model config button (#447)

- Add 'Use Your API Key' button to open model config dialog
- Add ByteDance Doubao sponsorship message with registration link
- Update quota limit messages to be warmer and friendlier
- Add dev panel button to test quota toast
- Update i18n translations for EN, ZH, JA
This commit is contained in:
Dayuan Jiang
2025-12-29 12:12:22 +09:00
committed by GitHub
parent 6d1e12bb39
commit 27f26d8b26
7 changed files with 61 additions and 15 deletions

View File

@@ -134,11 +134,13 @@ const DEV_XML_PRESETS: Record<string, string> = {
interface DevXmlSimulatorProps {
setMessages: React.Dispatch<React.SetStateAction<any[]>>
onDisplayChart: (xml: string) => void
onShowQuotaToast?: () => void
}
export function DevXmlSimulator({
setMessages,
onDisplayChart,
onShowQuotaToast,
}: DevXmlSimulatorProps) {
const [devXml, setDevXml] = useState("")
const [isSimulating, setIsSimulating] = useState(false)
@@ -342,6 +344,15 @@ export function DevXmlSimulator({
Stop
</button>
)}
{onShowQuotaToast && (
<button
type="button"
onClick={onShowQuotaToast}
className="px-3 py-1 text-xs bg-purple-500 text-white rounded hover:bg-purple-600"
>
Test Quota Toast
</button>
)}
</div>
</div>
</details>