feat: add daily request limit with custom toast notification (#167)

- Add DAILY_REQUEST_LIMIT env var support in config API
- Track request count in localStorage (resets daily)
- Show friendly quota limit toast with self-host/sponsor links
- Apply limit to send, regenerate, and edit message actions
This commit is contained in:
Dayuan Jiang
2025-12-08 14:26:01 +09:00
committed by GitHub
parent b68b1b0f33
commit 728dda5267
3 changed files with 191 additions and 3 deletions

View File

@@ -8,5 +8,6 @@ export async function GET() {
return NextResponse.json({
accessCodeRequired: accessCodes.length > 0,
dailyRequestLimit: parseInt(process.env.DAILY_REQUEST_LIMIT || "0", 10),
})
}