Add a remote CPA import entry that routes users to settings and simplify image preview rendering to use native img elements consistently.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add CLIProxyAPI (CPA) integration for automatic access_token fetching
- Support multiple CPA pools with add/edit/delete/enable/disable
- New settings page for managing CPA pools via web UI
- Fetch tokens via /v0/management/auth-files + /download endpoint
- Concurrent token fetching with 5-minute cache and round-robin selection
- Auto fallback to local account pool when no CPA is configured
Stability fixes:
- Add trailingSlash to Next.js config for reliable static page routing
- Protect _next/ static assets from HTML fallback (prevents chunk load errors)
- Fix 401 redirect crash during hydration (replace + guard + pending promise)