zevairouter 1.0.152 → 1.0.154
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -0
- package/cli/app/.next-cli-build/BUILD_ID +1 -1
- package/cli/app/.next-cli-build/app-path-routes-manifest.json +13 -11
- package/cli/app/.next-cli-build/build-manifest.json +2 -2
- package/cli/app/.next-cli-build/routes-manifest.json +14 -0
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/automation/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/automation/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/automation/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +3 -3
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/context/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/context/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/context/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +19 -19
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +4 -4
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +3 -3
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +4 -4
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/terminal/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/terminal/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/terminal/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/_global-error/page.js +3 -3
- package/cli/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/_global-error.html +1 -1
- package/cli/app/.next-cli-build/server/app/_global-error.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/_not-found/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/_not-found.html +1 -1
- package/cli/app/.next-cli-build/server/app/_not-found.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cache/stats/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/cache/stats/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/changelog/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/changelog/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-gateway/accounts/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-gateway/accounts/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/combos/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/context/[id]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/context/[id]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/context/bulk/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/context/bulk/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/context/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/context/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/dashboard/chat/completions/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/dashboard/chat/completions/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/dashboard/cli-tools/keys/route.js +1 -0
- package/cli/app/.next-cli-build/server/app/api/dashboard/cli-tools/keys/route.js.nft.json +1 -0
- package/cli/app/.next-cli-build/server/app/api/dashboard/cli-tools/keys/route_client-reference-manifest.js +1 -0
- package/cli/app/.next-cli-build/server/app/api/dashboard/media/[operation]/route.js +1 -0
- package/cli/app/.next-cli-build/server/app/api/dashboard/media/[operation]/route.js.nft.json +1 -0
- package/cli/app/.next-cli-build/server/app/api/dashboard/media/[operation]/route_client-reference-manifest.js +1 -0
- package/cli/app/.next-cli-build/server/app/api/headroom/extras/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/headroom/extras/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/headroom/restart/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/headroom/restart/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/headroom/stop/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/health/ready/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/health/ready/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/health/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/init/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/keys/[id]/rotate/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/keys/[id]/rotate/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/keys/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/locale/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/metrics/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/metrics/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/models/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/cancel/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/manual/[workerId]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/[jobId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/latest/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/latest/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/antigravity/bulk-import/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/cancel/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/manual/[workerId]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/latest/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/latest/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/cloudflare-ai/bulk-import/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/cancel/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/manual/[workerId]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/[jobId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/latest/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/latest/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-import/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-token/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/bulk-token/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/quota-cookie/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy/quota-cookie/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/cancel/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/manual/[workerId]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/latest/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/latest/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-token/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-token/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/quota-cookie/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/quota-cookie/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/cancel/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/manual/[workerId]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/[jobId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/latest/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/latest/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/bulk-import/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/cancel/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/cancel/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/manual/[workerId]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/manual/[workerId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/[jobId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/latest/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/latest/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/oauth/qoder/bulk-import/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/bulk-delete/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/bulk-delete/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/pxpipe/health/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/pxpipe/health/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/pxpipe/install/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/pxpipe/restart/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/pxpipe/restart/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/pxpipe/start/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/pxpipe/start/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/pxpipe/stats/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/pxpipe/stats/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/pxpipe/status/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/pxpipe/stop/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/pxpipe/stop/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/settings/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/shutdown/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/tags/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/terminal/auth/setup/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/terminal/auth/setup/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/terminal/auth/status/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/terminal/auth/status/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/terminal/auth/unlock/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/terminal/auth/unlock/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/input/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/input/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/resize/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/resize/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/stream/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/terminal/session/[id]/stream/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/terminal/session/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/terminal/session/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/aggregate/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/aggregate/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/usage/stream/route.js +3 -5
- package/cli/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/images/generations/route.js +1 -4
- package/cli/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/version/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
- package/cli/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/callback/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/callback.html +1 -1
- package/cli/app/.next-cli-build/server/app/callback.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/automation.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/automation.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk/dashboard/automation/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk/dashboard/automation.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_full.segment.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/automation.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/combos.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/context.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/context.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk/dashboard/context/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk/dashboard/context.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/context.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_full.segment.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/context.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/endpoint.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/mitm.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/playground.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/playground.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk/dashboard/playground/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk/dashboard/playground.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/_full.segment.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/playground.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/profile.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/providers/new.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/providers.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/quota.html +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/quota.rsc +6 -6
- package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +6 -6
- package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/token-saver.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/translator.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/usage.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard.html +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +5 -5
- package/cli/app/.next-cli-build/server/app/dashboard.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/dashboard.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/index.html +1 -1
- package/cli/app/.next-cli-build/server/app/index.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/landing/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/landing.html +1 -1
- package/cli/app/.next-cli-build/server/app/landing.rsc +4 -4
- package/cli/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +4 -4
- package/cli/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/login/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app/login.html +1 -1
- package/cli/app/.next-cli-build/server/app/login.rsc +4 -4
- package/cli/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +4 -4
- package/cli/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +3 -3
- package/cli/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
- package/cli/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
- package/cli/app/.next-cli-build/server/app/manifest.webmanifest/route.js +2 -2
- package/cli/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/page.js +2 -2
- package/cli/app/.next-cli-build/server/app/page.js.nft.json +1 -1
- package/cli/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/app-paths-manifest.json +13 -11
- package/cli/app/.next-cli-build/server/chunks/1188.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/2557.js +1 -0
- package/cli/app/.next-cli-build/server/chunks/2732.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/3104.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/3110.js +9 -8
- package/cli/app/.next-cli-build/server/chunks/3155.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/318.js +11 -9
- package/cli/app/.next-cli-build/server/chunks/3579.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/3593.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/412.js +2 -2
- package/cli/app/.next-cli-build/server/chunks/4229.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/4404.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/4470.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/4566.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/4632.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/4720.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/4739.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/4746.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/4780.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/507.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/5236.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/5258.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/5307.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/5436.js +4 -0
- package/cli/app/.next-cli-build/server/chunks/5949.js +3 -3
- package/cli/app/.next-cli-build/server/chunks/6036.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/698.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/7239.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/7965.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/8028.js +1 -0
- package/cli/app/.next-cli-build/server/chunks/8255.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/8306.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/8371.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/8520.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/877.js +24 -0
- package/cli/app/.next-cli-build/server/chunks/8895.js +7 -7
- package/cli/app/.next-cli-build/server/chunks/891.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/9372.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/9489.js +1 -1
- package/cli/app/.next-cli-build/server/chunks/9621.js +1 -1
- package/cli/app/.next-cli-build/server/functions-config-manifest.json +4 -0
- package/cli/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
- package/cli/app/.next-cli-build/server/middleware.js +4 -4
- package/cli/app/.next-cli-build/server/pages/404.html +1 -1
- package/cli/app/.next-cli-build/server/pages/500.html +1 -1
- package/cli/app/.next-cli-build/static/SC3btW1lCuB9q-iyIwwWK/_buildManifest.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/5497-f1e851d6feffa7c0.js +7 -0
- package/cli/app/.next-cli-build/static/chunks/{620-51d6fc84653a20a0.js → 620-a13f0f7b318585ab.js} +1 -1
- package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/page-da4bf4d40037f090.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/{page-27b7575d0d2d59fa.js → page-19f56d717383fbf9.js} +1 -1
- package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page-59c81d5cf13456ba.js +59 -0
- package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/combo/[id]/page-4c46f9cac4765fc5.js +4 -0
- package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/page-57c4b3a5e8b61f18.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/{page-ceb414eddc31fbfc.js → page-bdcc38dc8f8c5619.js} +1 -1
- package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-b4f4b88642bbe60d.js +3 -0
- package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/proxy-pools/page-16d3736170202fcd.js +4 -0
- package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-3e2009fdd918191b.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/page-6062386d726c38dd.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/{layout-59c5060c7f023ab8.js → layout-203b0a53f7406968.js} +1 -1
- package/cli/app/.next-cli-build/static/chunks/app/_global-error/page-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/auth/login/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/auth/logout/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/auth/status/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/cache/stats/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/changelog/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-gateway/accounts/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/combos/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/context/[id]/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/context/bulk/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/context/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/dashboard/chat/completions/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/dashboard/cli-tools/keys/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/dashboard/media/[operation]/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/headroom/extras/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/headroom/restart/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/headroom/start/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/headroom/status/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/health/ready/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/health/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/init/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/keys/[id]/rotate/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/keys/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/locale/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/metrics/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/models/alias/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/models/availability/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/models/custom/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/models/disabled/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/models/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/models/test/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/antigravity/bulk-import/[jobId]/cancel/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/antigravity/bulk-import/[jobId]/manual/[workerId]/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/antigravity/bulk-import/[jobId]/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/antigravity/bulk-import/latest/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/antigravity/bulk-import/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/cancel/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/manual/[workerId]/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/cloudflare-ai/bulk-import/latest/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/cloudflare-ai/bulk-import/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-import/[jobId]/cancel/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-import/[jobId]/manual/[workerId]/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-import/[jobId]/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-import/latest/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-import/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-token/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/quota-cookie/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/cancel/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/manual/[workerId]/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-import/latest/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-import/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-token/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/quota-cookie/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/bulk-import/[jobId]/cancel/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/bulk-import/[jobId]/manual/[workerId]/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/bulk-import/[jobId]/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/bulk-import/latest/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/bulk-import/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/qoder/bulk-import/[jobId]/cancel/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/qoder/bulk-import/[jobId]/manual/[workerId]/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/qoder/bulk-import/[jobId]/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/qoder/bulk-import/latest/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/qoder/bulk-import/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/pricing/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/providers/bulk-delete/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/providers/client/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/providers/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/providers/validate/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/pxpipe/health/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/pxpipe/restart/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/pxpipe/start/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/pxpipe/stats/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/pxpipe/stop/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/settings/database/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/settings/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/shutdown/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/tags/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/terminal/auth/setup/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/terminal/auth/status/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/terminal/auth/unlock/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/terminal/session/[id]/input/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/terminal/session/[id]/resize/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/terminal/session/[id]/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/terminal/session/[id]/stream/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/terminal/session/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/translator/load/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/translator/save/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/translator/send/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/translator/translate/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/usage/aggregate/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/usage/chart/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/usage/history/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/usage/providers/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/usage/stats/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/usage/stream/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/v1/messages/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/v1/models/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/v1/responses/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/v1/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/v1/search/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/version/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/api/version/update/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/app/page-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-f29633932d5ddd5a.js +1 -0
- package/cli/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-f29633932d5ddd5a.js +1 -0
- package/cli/app/CHANGELOG.md +24 -0
- package/cli/app/package.json +5 -3
- package/cli/app/src/lib/db/adapters/betterSqliteAdapter.js +6 -3
- package/cli/app/src/lib/db/adapters/bunSqliteAdapter.js +4 -2
- package/cli/app/src/lib/db/adapters/nodeSqliteAdapter.js +4 -2
- package/cli/app/src/lib/db/adapters/sqljsAdapter.js +84 -27
- package/cli/app/src/lib/db/maintenance.js +6 -0
- package/cli/package.json +1 -1
- package/cli/src/cli/api/client.js +3 -1
- package/open-sse/executors/github.js +7 -3
- package/open-sse/executors/kiro.js +29 -0
- package/open-sse/handlers/chatCore/nonStreamingHandler.js +40 -12
- package/open-sse/handlers/chatCore/sseToJsonHandler.js +348 -53
- package/open-sse/handlers/chatCore/streamingHandler.js +33 -11
- package/open-sse/handlers/chatCore.js +21 -6
- package/open-sse/handlers/responsesHandler.js +5 -70
- package/open-sse/services/accountFallback.js +146 -18
- package/open-sse/transformer/responsesTransformer.js +246 -176
- package/open-sse/transformer/streamToJsonConverter.js +68 -24
- package/open-sse/translator/helpers/claudeHelper.js +3 -2
- package/open-sse/translator/helpers/imageHelper.js +72 -8
- package/open-sse/translator/helpers/responsesApiHelper.js +100 -25
- package/open-sse/translator/index.js +4 -1
- package/open-sse/translator/request/antigravity-to-openai.js +40 -14
- package/open-sse/translator/request/claude-to-openai.js +74 -28
- package/open-sse/translator/request/openai-responses.js +84 -190
- package/open-sse/translator/request/openai-to-claude.js +40 -14
- package/open-sse/translator/request/openai-to-commandcode.js +11 -3
- package/open-sse/translator/request/openai-to-cursor.js +18 -6
- package/open-sse/translator/request/openai-to-gemini.js +7 -5
- package/open-sse/translator/request/openai-to-kiro.js +15 -3
- package/open-sse/translator/response/openai-responses.js +71 -37
- package/open-sse/utils/responsesStreamHelpers.js +73 -16
- package/open-sse/utils/stream.js +183 -73
- package/open-sse/utils/streamHandler.js +18 -6
- package/open-sse/utils/usageTracking.js +1 -1
- package/package.json +5 -3
- package/postcss.config.mjs +3 -1
- package/src/app/(dashboard)/dashboard/cli-tools/CLIToolsPageClient.js +5 -1
- package/src/app/(dashboard)/dashboard/cli-tools/[toolId]/ToolDetailClient.js +1 -1
- package/src/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +35 -41
- package/src/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +9 -9
- package/src/app/(dashboard)/dashboard/mitm/MitmPageClient.js +1 -1
- package/src/app/(dashboard)/dashboard/profile/page.js +3 -3
- package/src/app/(dashboard)/dashboard/providers/[id]/ConnectionRow.js +3 -26
- package/src/app/(dashboard)/dashboard/providers/[id]/page.js +29 -30
- package/src/app/(dashboard)/dashboard/providers/components/ConnectionsCard.js +3 -16
- package/src/app/(dashboard)/dashboard/proxy-pools/page.js +16 -4
- package/src/app/(dashboard)/dashboard/usage/components/ProviderLimits/index.js +23 -21
- package/src/app/(dashboard)/dashboard/usage/components/RequestDetailsTab.js +25 -6
- package/src/app/api/dashboard/cli-tools/keys/route.js +33 -0
- package/src/app/api/dashboard/media/[operation]/route.js +60 -0
- package/src/app/api/keys/[id]/route.js +62 -12
- package/src/app/api/keys/route.js +20 -6
- package/src/app/api/metrics/route.js +3 -2
- package/src/app/api/providers/[id]/route.js +79 -17
- package/src/app/api/providers/[id]/test/testUtils.js +11 -2
- package/src/app/api/providers/client/route.js +33 -31
- package/src/app/api/providers/route.js +87 -16
- package/src/app/api/providers/suggested-models/route.js +1 -0
- package/src/app/api/proxy-pools/[id]/route.js +16 -4
- package/src/app/api/proxy-pools/[id]/test/route.js +4 -2
- package/src/app/api/proxy-pools/route.js +23 -4
- package/src/app/api/usage/aggregate/route.js +6 -0
- package/src/app/api/usage/stream/route.js +106 -43
- package/src/app/api/v1/responses/compact/route.js +21 -3
- package/src/lib/db/adapters/betterSqliteAdapter.js +6 -3
- package/src/lib/db/adapters/bunSqliteAdapter.js +4 -2
- package/src/lib/db/adapters/nodeSqliteAdapter.js +4 -2
- package/src/lib/db/adapters/sqljsAdapter.js +84 -27
- package/src/lib/db/driver.js +27 -7
- package/src/lib/db/maintenance.js +6 -0
- package/src/lib/db/repos/requestDetailsRepo.js +35 -9
- package/src/lib/db/repos/settingsRepo.js +2 -0
- package/src/lib/db/repos/usageRepo.js +191 -52
- package/src/lib/headroom/process.js +128 -61
- package/src/lib/oauth/services/bulkImportBrowserEngine.js +141 -31
- package/src/lib/oauth/services/codebuddyCnBulkImportManager.js +265 -55
- package/src/lib/oauth/services/codebuddyCnPhoneAutomation.js +84 -24
- package/src/lib/oauth/services/fiveSimClient.js +237 -40
- package/src/lib/oauth/services/kiroBulkImportManager.js +178 -45
- package/src/lib/providerConnectionSanitizer.js +180 -0
- package/src/lib/responseCache.js +23 -13
- package/src/lib/safeFetch.js +101 -4
- package/src/lib/usage/quotaRefresh.js +51 -22
- package/src/lib/usage/quotaService.js +54 -2
- package/src/shared/components/BulkAccountAutomationModal.js +12 -16
- package/src/shared/components/CodeBuddyCnPhoneRegisterModal.js +13 -15
- package/src/shared/components/KiroAuthModal.js +23 -26
- package/src/shared/components/Modal.js +4 -1
- package/src/shared/components/UsageStats.js +4 -7
- package/src/shared/hooks/useModelLockUntil.js +18 -0
- package/src/shared/services/initializeApp.js +20 -3
- package/src/shared/utils/asyncPolling.js +27 -0
- package/src/shared/utils/connectionStatus.js +9 -3
- package/src/shared/utils/dashboardMedia.js +19 -0
- package/src/shared/utils/modelLockTimer.js +32 -0
- package/src/shared/utils/usageStats.js +10 -0
- package/src/sse/handlers/chat.js +12 -3
- package/src/sse/handlers/streamFailure.js +34 -0
- package/src/sse/services/auth.js +73 -33
- package/cli/app/.next-cli-build/server/chunks/5024.js +0 -1
- package/cli/app/.next-cli-build/server/chunks/601.js +0 -24
- package/cli/app/.next-cli-build/static/chunks/5497-8d0ec2995dc0a392.js +0 -7
- package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/page-f16310d2b403445e.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page-a35d16eda369d68e.js +0 -59
- package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/combo/[id]/page-e7989e6397c3cd28.js +0 -4
- package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/page-81eaa9fe75830559.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-4f6f0b7c3b3da037.js +0 -3
- package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/proxy-pools/page-9e3ac0e62a8bba94.js +0 -4
- package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-579bf915396efc69.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/page-bc3ada97fab644b3.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/_global-error/page-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/auth/login/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/auth/logout/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/auth/status/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/cache/stats/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/changelog/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-gateway/accounts/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/combos/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/context/[id]/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/context/bulk/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/context/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/dashboard/chat/completions/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/headroom/extras/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/headroom/restart/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/headroom/start/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/headroom/status/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/health/ready/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/health/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/init/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/keys/[id]/rotate/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/keys/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/locale/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/metrics/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/models/alias/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/models/availability/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/models/custom/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/models/disabled/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/models/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/models/test/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/antigravity/bulk-import/[jobId]/cancel/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/antigravity/bulk-import/[jobId]/manual/[workerId]/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/antigravity/bulk-import/[jobId]/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/antigravity/bulk-import/latest/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/antigravity/bulk-import/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/cancel/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/manual/[workerId]/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/cloudflare-ai/bulk-import/[jobId]/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/cloudflare-ai/bulk-import/latest/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/cloudflare-ai/bulk-import/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-import/[jobId]/cancel/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-import/[jobId]/manual/[workerId]/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-import/[jobId]/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-import/latest/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-import/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/bulk-token/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy/quota-cookie/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/cancel/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/manual/[workerId]/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-import/[jobId]/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-import/latest/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-import/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-token/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/quota-cookie/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/bulk-import/[jobId]/cancel/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/bulk-import/[jobId]/manual/[workerId]/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/bulk-import/[jobId]/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/bulk-import/latest/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/bulk-import/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/qoder/bulk-import/[jobId]/cancel/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/qoder/bulk-import/[jobId]/manual/[workerId]/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/qoder/bulk-import/[jobId]/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/qoder/bulk-import/latest/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/oauth/qoder/bulk-import/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/pricing/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/providers/bulk-delete/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/providers/client/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/providers/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/providers/validate/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/pxpipe/health/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/pxpipe/restart/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/pxpipe/start/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/pxpipe/stats/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/pxpipe/stop/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/settings/database/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/settings/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/shutdown/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/tags/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/terminal/auth/setup/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/terminal/auth/status/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/terminal/auth/unlock/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/terminal/session/[id]/input/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/terminal/session/[id]/resize/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/terminal/session/[id]/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/terminal/session/[id]/stream/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/terminal/session/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/translator/load/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/translator/save/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/translator/send/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/translator/translate/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/usage/aggregate/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/usage/chart/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/usage/history/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/usage/providers/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/usage/stats/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/usage/stream/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/v1/messages/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/v1/models/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/v1/responses/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/v1/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/v1/search/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/version/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/api/version/update/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/app/page-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-915c9a5b78eafa55.js +0 -1
- package/cli/app/.next-cli-build/static/i-IN0_JUvDPX2TawfW0UV/_buildManifest.js +0 -1
- /package/cli/app/.next-cli-build/static/{i-IN0_JUvDPX2TawfW0UV → SC3btW1lCuB9q-iyIwwWK}/_ssgManifest.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3554],{7905:(e,t,a)=>{Promise.resolve().then(a.bind(a,85309))},85309:(e,t,a)=>{"use strict";a.d(t,{default:()=>x});var s=a(95155),l=a(12115),r=a(98500),i=a.n(r),o=a(35497),c=a(3534),n=a(28777),d=a(43666);let u=a(41463).env.NEXT_PUBLIC_CLOUD_URL;function x({toolId:e,machineId:t}){let a=c.dM[e],[r,v]=(0,l.useState)([]),[h,m]=(0,l.useState)(!0),[p,b]=(0,l.useState)({}),[f,j]=(0,l.useState)(!1),[E,P]=(0,l.useState)(!1),[w,k]=(0,l.useState)(""),[g,N]=(0,l.useState)(!1),[_,y]=(0,l.useState)(""),[S,A]=(0,l.useState)([]);(0,l.useEffect)(()=>{let e=!0;return(async()=>{try{let[t,a,s,l]=await Promise.all([fetch("/api/providers"),fetch("/api/settings"),fetch("/api/tunnel/status"),fetch("/api/dashboard/cli-tools/keys",{cache:"no-store"})]);if(!e)return;if(t.ok){let e=await t.json();v(e.connections||[])}if(a.ok){let e=await a.json();j(e.cloudEnabled||!1)}if(s.ok){let e=await s.json();P(!!(e.tunnel?.enabled||e.tunnel?.settingsEnabled)),k(e.tunnel?.publicUrl||""),N(!!(e.tailscale?.enabled||e.tailscale?.settingsEnabled)),y(e.tailscale?.tunnelUrl||"")}if(l.ok){let e=await l.json();A(e.keys||[])}}catch(e){console.log("Error loading tool data:",e)}finally{e&&m(!1)}})(),()=>{e=!1}},[]);let C=()=>r.filter(e=>!1!==e.isActive),U=(0,l.useCallback)((e,t,a)=>{b(s=>s[e]?.[t]===a?s:{...s,[e]:{...s[e],[t]:a}})},[]);return a?(0,s.jsxs)("div",{className:"mx-auto flex w-full max-w-5xl flex-col gap-4 px-1 sm:px-0",children:[(0,s.jsxs)(i(),{href:"/dashboard/cli-tools",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary w-fit",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"arrow_back"}),"Back to CLI Tools"]}),(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsx)("h1",{className:"text-xl font-semibold text-text-main sm:text-2xl",children:a.name}),(0,s.jsx)("p",{className:"text-sm text-text-muted",children:a.description})]}),h?(0,s.jsx)(o.Qv,{}):(()=>{let t,l,r,i=(t=C(),l=[],r=new Set,t.forEach(e=>{let t=n.Xg[e.provider]||e.provider;(0,n.KC)(e.provider).forEach(a=>{let s=`${t}/${a.id}`;r.has(s)||(r.add(s),l.push({value:s,label:`${t}/${a.id}`,provider:e.provider,alias:t,connectionName:e.name,modelId:a.id}))})}),l).length>0,o={tool:a,isExpanded:!0,onToggle:()=>{},baseUrl:E&&w?w:f&&u?u:window.location.origin,apiKeys:S,tunnelEnabled:E,tunnelPublicUrl:w,tailscaleEnabled:g,tailscaleUrl:_};switch(e){case"claude":return(0,s.jsx)(d.Tk,{...o,activeProviders:C(),modelMappings:p[e]||{},onModelMappingChange:(t,a)=>U(e,t,a),hasActiveProviders:i,cloudEnabled:f});case"codex":return(0,s.jsx)(d.Ah,{...o,activeProviders:C(),cloudEnabled:f});case"opencode":return(0,s.jsx)(d.qO,{...o,activeProviders:C(),cloudEnabled:f});case"cowork":return(0,s.jsx)(d.Q6,{...o,activeProviders:C(),hasActiveProviders:i,cloudEnabled:f,cloudUrl:u,tunnelEnabled:E,tunnelPublicUrl:w,tailscaleEnabled:g,tailscaleUrl:_});case"droid":return(0,s.jsx)(d.ZM,{...o,activeProviders:C(),hasActiveProviders:i,cloudEnabled:f});case"openclaw":return(0,s.jsx)(d.yZ,{...o,activeProviders:C(),hasActiveProviders:i,cloudEnabled:f});case"hermes":return(0,s.jsx)(d.RF,{...o,activeProviders:C(),hasActiveProviders:i,cloudEnabled:f});case"copilot":return(0,s.jsx)(d.h1,{...o,activeProviders:C(),cloudEnabled:f});case"cline":return(0,s.jsx)(d.aG,{...o,activeProviders:C(),cloudEnabled:f});case"kilo":return(0,s.jsx)(d.c9,{...o,activeProviders:C(),cloudEnabled:f});case"deepseek-tui":return(0,s.jsx)(d.lF,{...o,activeProviders:C(),hasActiveProviders:i,cloudEnabled:f});case"jcode":return(0,s.jsx)(d.mW,{...o,activeProviders:C(),hasActiveProviders:i,cloudEnabled:f});default:return(0,s.jsx)(d.a7,{toolId:e,...o,activeProviders:C(),cloudEnabled:f,tunnelEnabled:E})}})()]}):(0,s.jsxs)("div",{className:"mx-auto flex w-full max-w-5xl flex-col gap-4 px-1 sm:px-0",children:[(0,s.jsxs)(i(),{href:"/dashboard/cli-tools",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary w-fit",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"arrow_back"}),"Back to CLI Tools"]}),(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"Tool not found or disabled."})]})}}},e=>{e.O(0,[2574,3862,3745,9802,620,5497,6069,8441,3794,7358],()=>e(e.s=7905)),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2326],{53501:(e,s,l)=>{"use strict";l.d(s,{default:()=>m});var t=l(95155),a=l(12115),r=l(35497),i=l(3534),n=l(43666),o=l(98500),c=l.n(o),d=l(5772);function x({toolId:e,tool:s,status:l}){let a=l?.error?{label:"Unavailable",cls:"bg-red-500/10 text-red-600 dark:text-red-400"}:l?l.installed?l.hasZevai?{label:"Connected",cls:"bg-green-500/10 text-green-600 dark:text-green-400"}:{label:"Not configured",cls:"bg-yellow-500/10 text-yellow-600 dark:text-yellow-400"}:{label:"Not installed",cls:"bg-gray-500/10 text-gray-500"}:{label:"Unknown",cls:"bg-gray-500/10 text-gray-500"};return(0,t.jsx)(c(),{href:`/dashboard/cli-tools/${e}`,className:"block",children:(0,t.jsx)(r.Zp,{padding:"sm",className:"h-full overflow-hidden hover:border-primary/50 transition-colors cursor-pointer",children:(0,t.jsx)("div",{className:"flex h-full flex-col gap-2",children:(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:s.image?(0,t.jsx)(d.default,{src:s.image,alt:s.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:e=>{e.target.style.display="none"}}):s.icon?(0,t.jsx)("span",{className:"material-symbols-outlined text-[28px]",style:{color:s.color},children:s.icon}):null}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("h3",{className:"font-medium text-sm truncate",children:s.name}),(0,t.jsx)("span",{className:`inline-block mt-1 px-1.5 py-0.5 text-[10px] font-medium rounded-full ${a.cls}`,children:a.label})]}),(0,t.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px] shrink-0",children:"chevron_right"})]})})})})}function m({machineId:e}){let[s,l]=(0,a.useState)(!0),[o,c]=(0,a.useState)({}),d=(0,a.useCallback)(async e=>{try{let s=await fetch("/api/cli-tools/all-statuses",{signal:e});s.ok&&c(await s.json())}catch(e){"AbortError"!==e.name&&console.log("Error fetching tool statuses:",e)}finally{e.aborted||l(!1)}},[]);if((0,a.useEffect)(()=>{let e=new AbortController
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2326],{53501:(e,s,l)=>{"use strict";l.d(s,{default:()=>m});var t=l(95155),a=l(12115),r=l(35497),i=l(3534),n=l(43666),o=l(98500),c=l.n(o),d=l(5772);function x({toolId:e,tool:s,status:l}){let a=l?.error?{label:"Unavailable",cls:"bg-red-500/10 text-red-600 dark:text-red-400"}:l?l.installed?l.hasZevai?{label:"Connected",cls:"bg-green-500/10 text-green-600 dark:text-green-400"}:{label:"Not configured",cls:"bg-yellow-500/10 text-yellow-600 dark:text-yellow-400"}:{label:"Not installed",cls:"bg-gray-500/10 text-gray-500"}:{label:"Unknown",cls:"bg-gray-500/10 text-gray-500"};return(0,t.jsx)(c(),{href:`/dashboard/cli-tools/${e}`,className:"block",children:(0,t.jsx)(r.Zp,{padding:"sm",className:"h-full overflow-hidden hover:border-primary/50 transition-colors cursor-pointer",children:(0,t.jsx)("div",{className:"flex h-full flex-col gap-2",children:(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:s.image?(0,t.jsx)(d.default,{src:s.image,alt:s.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:e=>{e.target.style.display="none"}}):s.icon?(0,t.jsx)("span",{className:"material-symbols-outlined text-[28px]",style:{color:s.color},children:s.icon}):null}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("h3",{className:"font-medium text-sm truncate",children:s.name}),(0,t.jsx)("span",{className:`inline-block mt-1 px-1.5 py-0.5 text-[10px] font-medium rounded-full ${a.cls}`,children:a.label})]}),(0,t.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px] shrink-0",children:"chevron_right"})]})})})})}function m({machineId:e}){let[s,l]=(0,a.useState)(!0),[o,c]=(0,a.useState)({}),d=(0,a.useCallback)(async e=>{try{let s=await fetch("/api/cli-tools/all-statuses",{signal:e});s.ok&&c(await s.json())}catch(e){"AbortError"!==e.name&&console.log("Error fetching tool statuses:",e)}finally{e.aborted||l(!1)}},[]);if((0,a.useEffect)(()=>{let e=new AbortController,s=e,l=window.setTimeout(()=>{d(s.signal)},0),t=()=>{e.abort(),d((e=new AbortController).signal)};return window.addEventListener("focus",t),()=>{window.clearTimeout(l),e.abort(),window.removeEventListener("focus",t)}},[d]),s)return(0,t.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 sm:gap-4",children:[(0,t.jsx)(r.Qv,{}),(0,t.jsx)(r.Qv,{}),(0,t.jsx)(r.Qv,{}),(0,t.jsx)(r.Qv,{}),(0,t.jsx)(r.Qv,{}),(0,t.jsx)(r.Qv,{})]});let g=Object.entries(i.dM),u=Object.entries(i.wn);return(0,t.jsxs)("div",{className:"mx-auto flex w-full max-w-5xl flex-col gap-6 px-1 sm:px-0",children:[(0,t.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 sm:gap-4",children:g.map(([e,s])=>(0,t.jsx)(x,{toolId:e,tool:s,status:o[e]},e))}),(0,t.jsxs)("div",{className:"flex flex-col gap-3 sm:gap-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 px-1",children:[(0,t.jsx)("span",{className:"material-symbols-outlined text-[18px] text-primary",children:"security"}),(0,t.jsx)("h2",{className:"text-sm font-semibold text-text-main",children:"MITM Tools"})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 sm:gap-4",children:u.map(([e,s])=>(0,t.jsx)(n.gY,{tool:s},e))})]})]})}},89734:(e,s,l)=>{Promise.resolve().then(l.bind(l,53501))}},e=>{e.O(0,[2574,3862,3745,9802,620,5497,6069,8441,3794,7358],()=>e(e.s=89734)),_N_E=e.O()}]);
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[182],{54909:(e,t,s)=>{Promise.resolve().then(s.bind(s,94588))},62199:(e,t,s)=>{"use strict";s.d(t,{O:()=>r});let a=Object.freeze({"/v1/embeddings":"embeddings","/v1/images/generations":"images","/v1/audio/speech":"speech","/v1/audio/transcriptions":"transcriptions","/v1/search":"search","/v1/web/fetch":"fetch"});function r(e){if("string"!=typeof e)return null;let t=e.indexOf("?"),s=-1===t?e:e.slice(0,t),r=-1===t?"":e.slice(t),l=a[s];return l?`/api/dashboard/media/${l}${r}`:null}},70217:(e,t,s)=>{"use strict";s.d(t,{BU:()=>c,G9:()=>o,d4:()=>i,gJ:()=>a,i2:()=>d});let a=[{id:"all",label:"All"},{id:"active",label:"Active",keys:["active"]},{id:"errors",label:"Errors",keys:["connection_error","auth_error","quota_exhausted","rate_limited","banned","cooldown","unknown"]},{id:"connection",label:"Connection",keys:["connection_error"]},{id:"auth",label:"Auth",keys:["auth_error"]},{id:"limit",label:"Limit",keys:["rate_limited","cooldown"]},{id:"exhausted",label:"Exhausted",keys:["quota_exhausted"]},{id:"banned",label:"Banned",keys:["banned"]},{id:"disabled",label:"Disabled",keys:["disabled"]}],r={active:{label:"active",severity:"success",terminal:!1},disabled:{label:"disabled",severity:"default",terminal:!1},connection_error:{label:"connection error",severity:"error",terminal:!1},auth_error:{label:"auth error",severity:"error",terminal:!0},quota_exhausted:{label:"exhausted",severity:"error",terminal:!0},rate_limited:{label:"rate limited",severity:"warning",terminal:!1},banned:{label:"banned",severity:"error",terminal:!0},cooldown:{label:"cooldown",severity:"warning",terminal:!1},unknown:{label:"unknown",severity:"default",terminal:!1}};function l(e){if(!e)return"";if("string"==typeof e)return e.toLowerCase();try{return JSON.stringify(e).toLowerCase()}catch{return String(e).toLowerCase()}}function o(e={},t=Date.now()){let s=Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>new Date(e).getTime()).filter(e=>Number.isFinite(e)&&e>t);return s.length>0?new Date(Math.min(...s)).toISOString():null}function n(e,t=""){let s=r[e]||r.unknown;return{key:e,...s,reason:t}}function i(e={}){if(!1===e.isActive)return n("disabled","Connection is disabled");if(function(e={}){return null!==o(e)}(e))return n("cooldown","Model cooldown is active");if(function(e){if(!e)return!1;let t=new Date(e).getTime();return Number.isFinite(t)&&t>Date.now()}(e.rateLimitedUntil))return n("rate_limited","Rate limit cooldown is active");let t=l(e.testStatus||e.status),s=l(e.lastErrorType||e.errorType),a=l(e.errorCode||e.statusCode),r=l(e.lastError||e.error),d=`${t} ${s} ${a} ${r}`.trim();return!d||["active","success","ok"].includes(t)?n("active",""):d.includes("ban")||d.includes("suspend")||d.includes("restricted")?n("banned",e.lastError||"Account appears restricted"):d.includes("exhaust")||d.includes("quota exceeded")||d.includes("insufficient_quota")||d.includes("payment required")||"402"===a?n("quota_exhausted",e.lastError||"Quota exhausted"):s.includes("rate_limited")||d.includes("rate limit")||d.includes("too many requests")||"429"===a?n("rate_limited",e.lastError||"Rate limited"):s.includes("auth")||s.includes("token")||d.includes("unauthorized")||d.includes("invalid api key")||d.includes("token invalid")||d.includes("token expired")||d.includes("revoked")||"401"===a||"403"===a?n("auth_error",e.lastError||"Authentication failed"):s.includes("network")||d.includes("network")||d.includes("timeout")||d.includes("fetch failed")||d.includes("econn")||d.includes("dns")||d.includes("proxy")?n("connection_error",e.lastError||"Connection failed"):["error","expired","unavailable","failed"].includes(t)?n("connection_error",e.lastError||e.testStatus||"Connection failed"):n("unknown",e.lastError||e.testStatus||"")}function d(e,t){if(!t||"all"===t)return!0;let s=a.find(e=>e.id===t);return!s||s.keys.includes(i(e).key)}function c(e){return e?.severity==="success"?"success":e?.severity==="error"?"error":"default"}},81277:(e,t,s)=>{"use strict";s.d(t,{c:()=>l});var a=s(12115),r=s(70217);function l(e={}){let[t,s]=(0,a.useState)(null),o=JSON.stringify(Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).sort(([e],[t])=>e.localeCompare(t)));return(0,a.useEffect)(()=>(function(e,t,s={}){let a=s.now||Date.now,l=s.setTimer||globalThis.setTimeout,o=s.clearTimer||globalThis.clearTimeout,n=!1,i=null,d=()=>{if(i=null,n)return;let s=a(),o=(0,r.G9)(e,s);t(o),o&&(i=l(d,Math.min(Math.max(1,new Date(o).getTime()-s+1),0x7fffffff)))};return i=l(d,0),()=>{n=!0,null!==i&&o(i),i=null}})(Object.fromEntries(JSON.parse(o)),s),[o]),t}},94588:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>L});var a=s(95155),r=s(73321),l=s(98500),o=s.n(l),n=s(12115),i=s(35497),d=s(57250),c=s(52679),u=s(28777),m=s(11059),p=s(14051),x=s.n(p),h=s(81277);function b({until:e}){let[t,s]=(0,n.useState)("");return((0,n.useEffect)(()=>{let t=()=>{let t=new Date(e).getTime()-Date.now();if(t<=0)return void s("");let a=Math.floor(t/1e3);a<60?s(`${a}s`):a<3600?s(`${Math.floor(a/60)}m ${a%60}s`):s(`${Math.floor(a/3600)}h ${Math.floor(a%3600/60)}m`)};t();let a=setInterval(t,1e3);return()=>clearInterval(a)},[e]),t)?(0,a.jsxs)("span",{className:"text-xs text-orange-500 font-mono",children:["⏱ ",t]}):null}function f({connection:e,proxyPools:t,isOAuth:s,isFirst:r,isLast:l,onMoveUp:o,onMoveDown:d,onToggleActive:c,onUpdateProxy:u,onEdit:m,onDelete:p}){let[x,g]=(0,n.useState)(!1),[y,v]=(0,n.useState)(!1),j=(0,n.useRef)(null),w=new Map((t||[]).map(e=>[e.id,e])),N=e.providerSpecificData?.proxyPoolId||null,k=N?w.get(N):null,C=e.providerSpecificData?.connectionProxyEnabled===!0&&!!e.providerSpecificData?.connectionProxyUrl,S=!!N||C,$=k?`Pool: ${k.name}`:N?`Pool: ${N} (inactive/missing)`:C?`Legacy: ${e.providerSpecificData?.connectionProxyUrl}`:"",_="",T=k?.proxyUrl||e.providerSpecificData?.connectionProxyUrl;if(T)try{let e=new URL(T);_=`${e.protocol}//${e.hostname}${e.port?`:${e.port}`:""}`}catch{_=T}let E=k?.noProxy||e.providerSpecificData?.connectionNoProxy||"",O=k?.isActive===!0?"success":N||C?"error":"default",P=(0,h.c)(e),A=null!==P;(0,n.useEffect)(()=>{if(!x)return;let e=e=>{j.current&&!j.current.contains(e.target)&&g(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[x]);let I="unavailable"!==e.testStatus||A?e.testStatus:"active",R=s?e.name||e.email||e.displayName||"OAuth Account":e.name,M=async e=>{v(!0);try{await u("__none__"===e?null:e)}finally{v(!1),g(!1)}};return(0,a.jsxs)("div",{className:`group flex flex-col gap-3 p-2 rounded-lg sm:flex-row sm:items-center sm:justify-between hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors ${!1===e.isActive?"opacity-60":""}`,children:[(0,a.jsxs)("div",{className:"flex w-full min-w-0 flex-1 items-start gap-3 sm:items-center",children:[(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsx)("button",{onClick:o,disabled:r,className:`p-0.5 rounded ${r?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_up"})}),(0,a.jsx)("button",{onClick:d,disabled:l,className:`p-0.5 rounded ${l?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_down"})})]}),(0,a.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted",children:s?"lock":"key"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium truncate",children:R}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2 mt-1",children:[(0,a.jsx)(i.Ex,{variant:!1===e.isActive?"default":"active"===I||"success"===I?"success":"error"===I||"expired"===I||"unavailable"===I?"error":"default",size:"sm",dot:!0,children:!1===e.isActive?"disabled":I||"Unknown"}),S&&(0,a.jsx)(i.Ex,{variant:O,size:"sm",children:"Proxy"}),A&&!1!==e.isActive&&(0,a.jsx)(b,{until:P}),e.lastError&&!1!==e.isActive&&(0,a.jsx)("span",{className:"text-xs text-red-500 truncate max-w-[300px]",title:e.lastError,children:e.lastError}),(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["#",e.priority]})]}),S&&(0,a.jsxs)("div",{className:"mt-1 flex flex-wrap items-center gap-2",children:[(0,a.jsx)("span",{className:"text-[11px] text-text-muted truncate max-w-[420px]",title:$,children:$}),_&&(0,a.jsx)("code",{className:"text-[10px] font-mono bg-black/5 dark:bg-white/5 px-1 py-0.5 rounded text-text-muted",children:_}),E&&(0,a.jsxs)("span",{className:"text-[11px] text-text-muted truncate max-w-[320px]",title:E,children:["no_proxy: ",E]})]})]})]}),(0,a.jsxs)("div",{className:"flex w-full flex-wrap items-center justify-between gap-2 sm:w-auto sm:justify-end",children:[(0,a.jsxs)("div",{className:"flex flex-wrap gap-1",children:[(t||[]).length>0&&(0,a.jsxs)("div",{className:"relative",ref:j,children:[(0,a.jsxs)("button",{onClick:()=>g(e=>!e),className:`flex flex-col items-center px-2 py-1 rounded hover:bg-black/5 dark:hover:bg-white/5 transition-colors ${S?"text-primary":"text-text-muted hover:text-primary"}`,disabled:y,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:y?"progress_activity":"lan"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Proxy"})]}),x&&(0,a.jsxs)("div",{className:"absolute right-0 top-full mt-1 z-50 bg-bg border border-border rounded-lg shadow-lg py-1 min-w-[160px]",children:[(0,a.jsx)("button",{onClick:()=>M("__none__"),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${!N?"text-primary font-medium":"text-text-main"}`,children:"None"}),(t||[]).map(e=>(0,a.jsx)("button",{onClick:()=>M(e.id),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${N===e.id?"text-primary font-medium":"text-text-main"}`,children:e.name},e.id))]})]}),(0,a.jsxs)("button",{onClick:m,className:"flex flex-col items-center px-2 py-1 rounded hover:bg-black/5 dark:hover:bg-white/5 text-text-muted hover:text-primary",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,a.jsxs)("button",{onClick:p,className:"flex flex-col items-center px-2 py-1 rounded hover:bg-red-500/10 text-red-500",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]}),(0,a.jsx)(i.lM,{size:"sm",checked:e.isActive??!0,onChange:c,title:e.isActive??!0?"Disable":"Enable"})]})]})}function g({isOpen:e,provider:t,providerName:s,proxyPools:r,onSave:l,onClose:o}){let d="__none__",[c,u]=(0,n.useState)({name:"",apiKey:"",priority:1,proxyPoolId:d}),[m,p]=(0,n.useState)(!1),[x,h]=(0,n.useState)(null),[b,f]=(0,n.useState)(!1),y=async()=>{p(!0);try{let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:c.apiKey})}),s=await e.json();h(s.valid?"success":"failed")}catch{h("failed")}finally{p(!1)}},v=async()=>{if(t&&c.apiKey){f(!0);try{let e=!1;try{p(!0),h(null);let s=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:c.apiKey})});e=!!(await s.json()).valid,h(e?"success":"failed")}catch{h("failed")}finally{p(!1)}await l({name:c.name,apiKey:c.apiKey,priority:c.priority,proxyPoolId:c.proxyPoolId===d?null:c.proxyPoolId,testStatus:e?"active":"unknown"})}finally{f(!1)}}};return t?(0,a.jsx)(i.aF,{isOpen:e,title:`Add ${s||t} API Key`,onClose:o,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-xs text-text-muted mb-1 block",children:"Name"}),(0,a.jsx)("input",{className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",value:c.name,onChange:e=>u({...c,name:e.target.value}),placeholder:"Production Key"})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("label",{className:"text-xs text-text-muted mb-1 block",children:"API Key"}),(0,a.jsx)("input",{type:"password",className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",value:c.apiKey,onChange:e=>u({...c,apiKey:e.target.value})})]}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(i.$n,{onClick:y,disabled:!c.apiKey||m||b,variant:"secondary",children:m?"Checking...":"Check"})})]}),x&&(0,a.jsx)(i.Ex,{variant:"success"===x?"success":"error",children:"success"===x?"Valid":"Invalid"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-xs text-text-muted mb-1 block",children:"Priority"}),(0,a.jsx)("input",{type:"number",className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",value:c.priority,onChange:e=>u({...c,priority:Number.parseInt(e.target.value)||1})})]}),(0,a.jsx)(i.l6,{label:"Proxy Pool",value:c.proxyPoolId,onChange:e=>u({...c,proxyPoolId:e.target.value}),options:[{value:d,label:"None"},...(r||[]).map(e=>({value:e.id,label:e.name}))]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:v,fullWidth:!0,disabled:!c.name||!c.apiKey||b,children:b?"Saving...":"Save"}),(0,a.jsx)(i.$n,{onClick:o,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}function y({providerId:e,isOAuth:t}){let[s,r]=(0,n.useState)([]),[l,o]=(0,n.useState)([]),[d,c]=(0,n.useState)(!0),[u,m]=(0,n.useState)(!1),[p,x]=(0,n.useState)(!1),[h,b]=(0,n.useState)(null),[v,j]=(0,n.useState)(null),[w,N]=(0,n.useState)("1"),[k,C]=(0,n.useState)(null),S=(0,n.useCallback)(async()=>{try{let[t,s,a]=await Promise.all([fetch("/api/providers",{cache:"no-store"}),fetch("/api/proxy-pools?isActive=true",{cache:"no-store"}),fetch("/api/settings",{cache:"no-store"})]),l=await t.json(),n=await s.json(),i=a.ok?await a.json():{};t.ok&&r((l.connections||[]).filter(t=>t.provider===e)),s.ok&&o(n.proxyPools||[]);let d=(i.providerStrategies||{})[e]||{};j(d.fallbackStrategy||null),N(null!=d.stickyRoundRobinLimit?String(d.stickyRoundRobinLimit):"1")}catch(e){console.log("ConnectionsCard fetch error:",e)}finally{c(!1)}},[e]);(0,n.useEffect)(()=>{S()},[S]);let $=async(t,s)=>{try{let a=await fetch("/api/settings",{cache:"no-store"}),r=(a.ok?await a.json():{}).providerStrategies||{},l={};t&&(l.fallbackStrategy=t),"round-robin"===t&&""!==s&&(l.stickyRoundRobinLimit=Number(s)||3);let o={...r};0===Object.keys(l).length?delete o[e]:o[e]=l,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:o})})}catch(e){console.log("saveStrategy error:",e)}},_=async(e,t)=>{let a=[...s];[a[e],a[t]]=[a[t],a[e]],r(a);try{await Promise.all([fetch(`/api/providers/${a[e].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:e+1})}),fetch(`/api/providers/${a[t].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:t+1})})])}catch{await S()}},T=async e=>{C({title:"Delete Connection",message:"Delete this connection?",onConfirm:async()=>{C(null);try{(await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok&&r(t=>t.filter(t=>t.id!==e))}catch(e){console.log("delete error:",e)}}})},E=async(e,t)=>{try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&r(s=>s.map(s=>s.id===e?{...s,isActive:t}:s))}catch(e){console.log("toggle error:",e)}},O=async(e,t)=>{try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:t||null})})).ok&&r(s=>s.map(s=>s.id===e?{...s,providerSpecificData:{...s.providerSpecificData,proxyPoolId:t||null}}:s))}catch(e){console.log("proxy error:",e)}},P=async t=>{try{(await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:e,...t})})).ok&&(await S(),m(!1))}catch(e){console.log("save apikey error:",e)}},A=async e=>{try{(await fetch(`/api/providers/${h.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await S(),x(!1))}catch(e){console.log("update connection error:",e)}};return d?(0,a.jsx)(i.Zp,{children:(0,a.jsx)("div",{className:"h-20 animate-pulse bg-black/5 rounded-lg"})}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(i.Zp,{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-4",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Connections"}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"Round Robin"}),(0,a.jsx)(i.lM,{checked:"round-robin"===v,onChange:e=>{let t=e?"round-robin":null;j(t),e&&!w&&N("1"),$(t,e?w||"1":w)}}),"round-robin"===v&&(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted",children:"Sticky:"}),(0,a.jsx)("input",{type:"number",min:1,value:w,onChange:e=>{N(e.target.value),$("round-robin",e.target.value)},className:"w-16 px-2 py-1 text-xs border border-border rounded-md bg-background focus:outline-none focus:border-primary"})]})]})]}),0===s.length?(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"No connections yet"}),(0,a.jsx)(i.$n,{size:"sm",icon:"add",onClick:()=>m(!0),children:"Add Connection"})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"flex flex-col divide-y divide-black/[0.03] dark:divide-white/[0.03]",children:s.map((e,r)=>(0,a.jsx)(f,{connection:e,proxyPools:l,isOAuth:t,isFirst:0===r,isLast:r===s.length-1,onMoveUp:()=>_(r,r-1),onMoveDown:()=>_(r,r+1),onToggleActive:t=>E(e.id,t),onUpdateProxy:t=>O(e.id,t),onEdit:()=>{b(e),x(!0)},onDelete:()=>T(e.id)},e.id))}),(0,a.jsx)("div",{className:"mt-4 flex justify-stretch sm:justify-start",children:(0,a.jsx)(i.$n,{size:"sm",icon:"add",onClick:()=>m(!0),children:"Add"})})]})]}),(0,a.jsx)(g,{isOpen:u,provider:e,proxyPools:l,onSave:P,onClose:()=>m(!1)}),(0,a.jsx)(i.wI,{isOpen:p,connection:h,proxyPools:l,onSave:A,onClose:()=>x(!1)}),(0,a.jsx)(i.uo,{isOpen:!!k,onClose:()=>C(null),onConfirm:k?.onConfirm,title:k?.title||"Confirm",message:k?.message,variant:"danger"})]})}function v({model:e,fullModel:t,copied:s,onCopy:r,testStatus:l,isCustom:o,isFree:n,onDeleteAlias:i,onTest:d,isTesting:c}){let u="ok"===l?"#22c55e":"error"===l?"#ef4444":void 0;return(0,a.jsx)("div",{className:`group px-3 py-2 rounded-lg border ${"ok"===l?"border-green-500/40":"error"===l?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base",style:u?{color:u}:void 0,children:"ok"===l?"check_circle":"error"===l?"cancel":"smart_toy"}),(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)("code",{className:"text-xs text-text-muted font-mono bg-sidebar px-1.5 py-0.5 rounded",children:t}),e.name&&(0,a.jsx)("span",{className:"text-[9px] text-text-muted/70 italic pl-1",children:e.name})]}),d&&(0,a.jsxs)("div",{className:"relative group/btn",children:[(0,a.jsx)("button",{onClick:d,disabled:c,className:`p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary transition-opacity ${c?"opacity-100":"opacity-0 group-hover:opacity-100"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",style:c?{animation:"spin 1s linear infinite"}:void 0,children:c?"progress_activity":"science"})}),(0,a.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:c?"Testing...":"Test"})]}),(0,a.jsxs)("div",{className:"relative group/btn",children:[(0,a.jsx)("button",{onClick:()=>r(t,`model-${e.id}`),className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:s===`model-${e.id}`?"check":"content_copy"})}),(0,a.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:s===`model-${e.id}`?"Copied!":"Copy"})]}),n&&(0,a.jsx)("span",{className:"text-[10px] font-bold text-green-500 bg-green-500/10 px-1.5 py-0.5 rounded",children:"FREE"}),o&&(0,a.jsx)("button",{onClick:i,className:"p-0.5 hover:bg-red-500/10 rounded text-text-muted hover:text-red-500 opacity-0 group-hover:opacity-100 transition-opacity ml-auto",title:"Remove custom model",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})})]})})}function j({isOpen:e,onSave:t,onClose:s}){let[r,l]=(0,n.useState)(""),o=()=>{r.trim()&&(t(r.trim()),l(""))};return(0,a.jsx)(i.aF,{isOpen:e,title:"Add Custom Model",onClose:s,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-xs text-text-muted mb-1 block",children:"Model ID"}),(0,a.jsx)("input",{className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",value:r,onChange:e=>l(e.target.value),onKeyDown:e=>"Enter"===e.key&&o(),placeholder:"e.g. tts-1-hd",autoFocus:!0})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:o,fullWidth:!0,disabled:!r.trim(),children:"Add"}),(0,a.jsx)(i.$n,{onClick:s,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})})}function w({providerId:e,kindFilter:t,providerAliasOverride:s}){let{copied:r,copy:l}=(0,m.C)(),[o,d]=(0,n.useState)({}),[p,x]=(0,n.useState)([]),[h,b]=(0,n.useState)({}),[f,g]=(0,n.useState)(null),[y,N]=(0,n.useState)(""),[k,C]=(0,n.useState)(!1),[S,$]=(0,n.useState)([]),_=s||(0,c.wG)(e),T=t||"llm",E=(0,n.useCallback)(async()=>{try{let[t,s,a]=await Promise.all([fetch("/api/models/alias"),fetch("/api/providers",{cache:"no-store"}),fetch("/api/models/custom",{cache:"no-store"})]),r=await t.json(),l=await s.json(),o=await a.json();t.ok&&d(r.aliases||{}),s.ok&&$((l.connections||[]).filter(t=>t.provider===e)),a.ok&&x(o.models||[])}catch(e){console.log("ModelsCard fetch error:",e)}},[e]);(0,n.useEffect)(()=>{E()},[E]);let O=async(e,t)=>{let s=`${_}/${e}`;try{(await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:s,alias:t})})).ok&&await E()}catch(e){console.log("set alias error:",e)}},P=async e=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await E()}catch(e){console.log("delete alias error:",e)}},A=async e=>{try{(await fetch("/api/models/custom",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:_,id:e,type:T})})).ok&&(await E(),window.dispatchEvent(new CustomEvent("customModelChanged")))}catch(e){console.log("add custom model error:",e)}},I=async e=>{try{let t=new URLSearchParams({providerAlias:_,id:e,type:T});(await fetch(`/api/models/custom?${t}`,{method:"DELETE"})).ok&&(await E(),window.dispatchEvent(new CustomEvent("customModelChanged")))}catch(e){console.log("delete custom model error:",e)}},R=async e=>{if(!f){g(e);try{let s=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${_}/${e}`,kind:t})}),a=await s.json();b(t=>({...t,[e]:a.ok?"ok":"error"})),N(a.ok?"":a.error||"Model not reachable")}catch{b(t=>({...t,[e]:"error"})),N("Network error")}finally{g(null)}}},M=(0,u.KC)(e),L=t?M.filter(e=>e.kinds?e.kinds.includes(t):(e.type||"llm")===t):M,D=p.filter(e=>e.providerAlias===_&&(e.type||"llm")===T&&!L.some(t=>t.id===e.id));return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(i.Zp,{children:[(0,a.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,a.jsxs)("h2",{className:"text-lg font-semibold",children:["Models",t?` — ${t.toUpperCase()}`:""]})}),y&&(0,a.jsx)("p",{className:"text-xs text-red-500 mb-3 break-words",children:y}),(0,a.jsxs)("div",{className:"flex flex-wrap gap-3",children:[L.map(e=>{let t=`${_}/${e.id}`,s=Object.entries(o).find(([,e])=>e===t)?.[0];return(0,a.jsx)(v,{model:e,fullModel:`${_}/${e.id}`,alias:s,copied:r,onCopy:l,onSetAlias:t=>O(e.id,t),onDeleteAlias:()=>P(s),testStatus:h[e.id],onTest:S.length>0?()=>R(e.id):void 0,isTesting:f===e.id,isFree:e.isFree},e.id)}),D.map(e=>(0,a.jsx)(v,{model:{id:e.id,name:e.name},fullModel:`${_}/${e.id}`,copied:r,onCopy:l,onSetAlias:()=>{},onDeleteAlias:()=>I(e.id),testStatus:h[e.id],onTest:S.length>0?()=>R(e.id):void 0,isTesting:f===e.id,isCustom:!0},`${e.id}-${e.type}`)),(0,a.jsxs)("button",{onClick:()=>C(!0),className:"flex items-center gap-1.5 px-3 py-2 rounded-lg border border-dashed border-black/15 dark:border-white/15 text-xs text-text-muted hover:text-primary hover:border-primary/40 transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"}),"Add Model"]})]})]}),(0,a.jsx)(j,{isOpen:k,onSave:async e=>{await A(e),C(!1)},onClose:()=>C(!1)})]})}b.propTypes={until:x().string.isRequired},f.propTypes={connection:x().shape({id:x().string,name:x().string,email:x().string,displayName:x().string,testStatus:x().string,isActive:x().bool,lastError:x().string,priority:x().number}).isRequired,proxyPools:x().array,isOAuth:x().bool.isRequired,isFirst:x().bool.isRequired,isLast:x().bool.isRequired,onMoveUp:x().func.isRequired,onMoveDown:x().func.isRequired,onToggleActive:x().func.isRequired,onUpdateProxy:x().func,onEdit:x().func.isRequired,onDelete:x().func.isRequired},g.propTypes={isOpen:x().bool.isRequired,provider:x().string,providerName:x().string,proxyPools:x().array,onSave:x().func.isRequired,onClose:x().func.isRequired},y.propTypes={providerId:x().string.isRequired,isOAuth:x().bool},v.propTypes={model:x().shape({id:x().string.isRequired}).isRequired,fullModel:x().string.isRequired,copied:x().string,onCopy:x().func.isRequired,testStatus:x().oneOf(["ok","error"]),isCustom:x().bool,isFree:x().bool,onDeleteAlias:x().func,onTest:x().func,isTesting:x().bool},j.propTypes={isOpen:x().bool.isRequired,onSave:x().func.isRequired,onClose:x().func.isRequired},w.propTypes={providerId:x().string.isRequired,kindFilter:x().string,providerAliasOverride:x().string};let N={"google-tts":{hasLanguageDropdown:!1,hasModelSelector:!1,hasBrowseButton:!0,voiceSource:"hardcoded"},openai:{hasLanguageDropdown:!1,hasModelSelector:!0,hasBrowseButton:!1,voiceSource:"hardcoded",modelKey:"openai-tts-models",voiceKey:"openai-tts-voices",voicesPerModel:!0},openrouter:{hasLanguageDropdown:!1,hasModelSelector:!0,hasBrowseButton:!1,voiceSource:"hardcoded",modelKey:"openrouter-tts-models",voiceKey:"openrouter-tts-voices",voicesPerModel:!0},elevenlabs:{hasLanguageDropdown:!1,hasModelSelector:!0,hasBrowseButton:!0,hasVoiceIdInput:!0,voiceSource:"api-language",modelKey:"elevenlabs-tts-models",apiEndpoint:"/api/media-providers/tts/elevenlabs/voices"},"edge-tts":{hasLanguageDropdown:!1,hasModelSelector:!1,hasBrowseButton:!0,voiceSource:"api-language"},"local-device":{hasLanguageDropdown:!1,hasModelSelector:!1,hasBrowseButton:!0,voiceSource:"api-language"},nvidia:{hasModelSelector:!0,hasBrowseButton:!1,hasVoiceIdInput:!0,voiceSource:"config"},hyperbolic:{hasModelSelector:!0,hasBrowseButton:!1,voiceSource:"config"},deepgram:{hasModelSelector:!1,hasBrowseButton:!0,voiceSource:"api-language",apiEndpoint:"/api/media-providers/tts/deepgram/voices"},huggingface:{hasModelSelector:!0,hasBrowseButton:!1,voiceSource:"config"},cartesia:{hasModelSelector:!0,hasBrowseButton:!1,hasVoiceIdInput:!0,voiceSource:"config"},playht:{hasModelSelector:!0,hasBrowseButton:!1,hasVoiceIdInput:!0,voiceSource:"config"},coqui:{hasModelSelector:!0,hasBrowseButton:!1,hasVoiceIdInput:!0,voiceSource:"config"},tortoise:{hasModelSelector:!0,hasBrowseButton:!1,hasVoiceIdInput:!0,voiceSource:"config"},inworld:{hasModelSelector:!0,hasBrowseButton:!0,hasVoiceIdInput:!0,voiceSource:"api-language",modelKey:"inworld-tts-models",apiEndpoint:"/api/media-providers/tts/inworld/voices"},qwen:{hasModelSelector:!0,hasBrowseButton:!1,hasVoiceIdInput:!0,voiceSource:"config"},minimax:{hasModelSelector:!0,hasBrowseButton:!0,hasVoiceIdInput:!0,voiceSource:"api-language",apiEndpoint:"/api/media-providers/tts/minimax/voices",defaultVoiceId:"English_expressive_narrator"},"minimax-cn":{hasModelSelector:!0,hasBrowseButton:!0,hasVoiceIdInput:!0,voiceSource:"api-language",apiEndpoint:"/api/media-providers/tts/minimax/voices?provider=minimax-cn",defaultVoiceId:"English_expressive_narrator"},gemini:{hasLanguageDropdown:!1,hasLanguageHint:!0,hasModelSelector:!0,hasBrowseButton:!1,voiceSource:"hardcoded",modelKey:"gemini-tts-models",voiceKey:"gemini-tts-voices",voicesPerModel:!0}};var k=s(717),C=s(91781),S=s(62199);function $({label:e,children:t}){return(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-1.5 sm:flex-row sm:items-center sm:gap-3",children:[(0,a.jsx)("span",{className:"w-full text-xs font-medium text-text-muted sm:w-20 sm:shrink-0",children:e}),(0,a.jsx)("div",{className:"w-full min-w-0 flex-1",children:t})]})}let _=`// Audio will appear here after running.
|
|
2
|
+
// Example JSON response (response_format=json):
|
|
3
|
+
{
|
|
4
|
+
"format": "mp3",
|
|
5
|
+
"audio": "//NExAANaAIIAUAAANNNNNNNN..." // base64 encoded MP3
|
|
6
|
+
}`,T=`{
|
|
7
|
+
"object": "list",
|
|
8
|
+
"data": [{
|
|
9
|
+
"object": "embedding",
|
|
10
|
+
"index": 0,
|
|
11
|
+
"embedding": [0.002301, -0.019212, 0.004815, -0.031249, ...]
|
|
12
|
+
}],
|
|
13
|
+
"model": "...",
|
|
14
|
+
"usage": { "prompt_tokens": 9, "total_tokens": 9 }
|
|
15
|
+
}`,E="https://pub-1fb693cb11cc46b2b2f656f51e015a2c.r2.dev/dog.png";function O(e){let t="string"==typeof e?e.trim():"";return t?/^(data:image\/|https?:\/\/)/i.test(t)?t:`data:image/png;base64,${t}`:""}let P={webSearch:{inputLabel:"Query",inputPlaceholder:"What is the latest news about AI?",defaultInput:"What is the latest news about AI?",bodyKey:"query",defaultResponse:`{
|
|
16
|
+
"results": [
|
|
17
|
+
{ "title": "...", "url": "...", "snippet": "..." }
|
|
18
|
+
]
|
|
19
|
+
}`,extraFields:[{key:"search_type",label:"Type",type:"select",default:"web",options:["web","news"]},{key:"max_results",label:"Max results",type:"number",default:5,min:1,max:100},{key:"country",label:"Country",type:"text",default:""},{key:"language",label:"Language",type:"text",default:""}]},webFetch:{inputLabel:"URL",inputPlaceholder:"https://example.com",defaultInput:"https://example.com",bodyKey:"url",defaultResponse:`{
|
|
20
|
+
"content": "...",
|
|
21
|
+
"title": "...",
|
|
22
|
+
"url": "..."
|
|
23
|
+
}`,extraFields:[{key:"format",label:"Format",type:"select",default:"markdown",options:["markdown","text","html"]},{key:"max_characters",label:"Max chars",type:"number",default:0,min:0}]},image:{inputLabel:"Prompt",inputPlaceholder:"A cute cat wearing a hat",defaultInput:"A cute cat wearing a hat",bodyKey:"prompt",defaultResponse:`{
|
|
24
|
+
"data": [
|
|
25
|
+
{ "url": "...", "b64_json": "..." }
|
|
26
|
+
]
|
|
27
|
+
}`,extraFields:[{key:"n",label:"n",type:"number",default:1,min:1,max:4},{key:"size",label:"Size",type:"select",default:"auto",options:["auto","1024x1024","1024x1536","1536x1024","1024x1792","1792x1024"]},{key:"quality",label:"Quality",type:"select",default:"auto",options:["auto","low","medium","high","standard","hd"]},{key:"background",label:"Background",type:"select",default:"auto",options:["auto","transparent","opaque"]},{key:"style",label:"Style",type:"select",default:"",options:["","vivid","natural"]},{key:"response_format",label:"Format",type:"select",default:"",options:["","url","b64_json"]},{key:"image_detail",label:"Image Detail",type:"select",default:"high",options:["auto","low","high","original"]},{key:"output_format",label:"Codec",type:"select",default:"png",options:["png","jpeg","webp"]}]},imageToText:{inputLabel:"Image URL",inputPlaceholder:"https://example.com/image.png",defaultInput:"https://upload.wikimedia.org/wikipedia/commons/thumb/3/3a/Cat03.jpg/1200px-Cat03.jpg",bodyKey:"url",extraBody:{prompt:"Describe this image in detail"},defaultResponse:`{
|
|
28
|
+
"text": "A cat sitting on a windowsill...",
|
|
29
|
+
"model": "..."
|
|
30
|
+
}`},video:{inputLabel:"Prompt",inputPlaceholder:"A serene lake at sunset",defaultInput:"A serene lake at sunset",bodyKey:"prompt",defaultResponse:`{
|
|
31
|
+
"data": [
|
|
32
|
+
{ "url": "..." }
|
|
33
|
+
]
|
|
34
|
+
}`},music:{inputLabel:"Prompt",inputPlaceholder:"A calm piano melody",defaultInput:"A calm piano melody",bodyKey:"prompt",defaultResponse:`{
|
|
35
|
+
"data": [
|
|
36
|
+
{ "url": "...", "format": "mp3" }
|
|
37
|
+
]
|
|
38
|
+
}`}};function A({providerId:e,customAlias:t}){let s=(0,c.gC)(e),r=s?t||e:(0,c.wG)(e),l=s?[]:(0,u.KC)(e).filter(e=>"embedding"===e.type),[o,d]=(0,n.useState)(l[0]?.id??""),[p,x]=(0,n.useState)("The quick brown fox jumps over the lazy dog"),[h,b]=(0,n.useState)(""),[f,g]=(0,n.useState)(""),[y,v]=(0,n.useState)(!1),[j,w]=(0,n.useState)(""),[N,k]=(0,n.useState)(""),[C,_]=(0,n.useState)(null),[E,O]=(0,n.useState)(!1),[P,I]=(0,n.useState)(""),{copied:R,copy:M}=(0,m.C)(),{copied:L,copy:D}=(0,m.C)();(0,n.useEffect)(()=>{w(window.location.origin),fetch("/api/tunnel/status").then(e=>e.json()).then(e=>{e.publicUrl&&k(e.publicUrl)}).catch(()=>{})},[]);let K=y?N:j,U=o?`${r}/${o}`:"",B=()=>{let e={model:U,input:p.trim()},t=Number(h);return h&&Number.isFinite(t)&&t>0&&(e.dimensions=t),e},F=`curl -X POST ${K}/v1/embeddings \\
|
|
39
|
+
-H "Content-Type: application/json" \\
|
|
40
|
+
-H "Authorization: Bearer ${f||"YOUR_KEY"}" \\
|
|
41
|
+
-d '${JSON.stringify(B())}'`,q=async()=>{if(!p.trim()||!U)return;O(!0),I(""),_(null);let e=Date.now();try{let t={"Content-Type":"application/json"};f&&(t.Authorization=`Bearer ${f}`);let s=await fetch((0,S.O)("/v1/embeddings"),{method:"POST",headers:t,body:JSON.stringify(B())}),a=Date.now()-e,r=await s.json();if(!s.ok)return void I(r?.error?.message||r?.error||`HTTP ${s.status}`);_({data:r,latencyMs:a})}catch(e){I(e.message||"Network error")}finally{O(!1)}},J=C?JSON.stringify(C.data,null,2):"";return(0,a.jsxs)(i.Zp,{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"Example"}),(0,a.jsxs)("div",{className:"flex flex-col gap-2.5",children:[(0,a.jsx)($,{label:"Model",children:s?(0,a.jsx)("input",{value:o,onChange:e=>d(e.target.value),placeholder:"e.g. voyage-3, embed-english-v3.0, text-embedding-3-small",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"}):(0,a.jsx)("select",{value:o,onChange:e=>d(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:l.map(e=>(0,a.jsx)("option",{value:e.id,children:e.name||e.id},e.id))})}),(0,a.jsx)($,{label:"Endpoint",children:(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsx)("input",{value:K,onChange:e=>y?k(e.target.value):w(e.target.value),className:"w-full min-w-0 flex-1 px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono",placeholder:"http://localhost:3000"}),N&&(0,a.jsxs)("button",{onClick:()=>v(e=>!e),title:y?"Using tunnel":"Using local",className:`flex items-center gap-1 text-xs px-2 py-1.5 rounded-lg border shrink-0 transition-colors ${y?"border-primary/40 bg-primary/10 text-primary":"border-border text-text-muted hover:text-primary"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"wifi_tethering"}),"Tunnel"]})]})}),(0,a.jsx)($,{label:"API Key",children:(0,a.jsx)("input",{type:"password",value:f,onChange:e=>g(e.target.value),placeholder:"sk-...",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"})}),(0,a.jsx)($,{label:"Input",children:(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("input",{value:p,onChange:e=>x(e.target.value),className:"w-full px-3 py-1.5 pr-7 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"}),p&&(0,a.jsx)("button",{type:"button",onClick:()=>x(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-muted hover:text-primary transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})}),(0,a.jsx)($,{label:"Dimensions",children:(0,a.jsx)("input",{type:"number",min:"1",value:h,onChange:e=>b(e.target.value),placeholder:"optional, e.g. 512, 1024 (leave empty for default)",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})}),(0,a.jsxs)("div",{className:"mt-1",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Request"}),(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsxs)("button",{onClick:()=>M(F),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:R?"check":"content_copy"}),R?"Copied":"Copy"]}),(0,a.jsxs)("button",{onClick:q,disabled:E||!p.trim()||!U,className:"flex w-full sm:w-auto items-center justify-center gap-1.5 px-3 py-1 rounded-lg bg-primary text-white text-xs font-medium hover:bg-primary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",style:E?{animation:"spin 1s linear infinite"}:void 0,children:"play_arrow"}),E?"Running...":"Run"]})]})]}),(0,a.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all",children:F})]}),P&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:P}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,a.jsxs)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:["Response ",C&&(0,a.jsxs)("span",{className:"font-normal normal-case",children:["⚡ ",C.latencyMs,"ms"]})]}),C&&(0,a.jsxs)("button",{onClick:()=>D(J),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:L?"check":"content_copy"}),L?"Copied":"Copy"]})]}),(0,a.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all opacity-70",children:(e=>{if(!e)return T;let t=JSON.parse(JSON.stringify(e));return(t.data||[]).forEach(e=>{Array.isArray(e.embedding)&&e.embedding.length>4&&(e.embedding=[...e.embedding.slice(0,4).map(e=>parseFloat(e.toFixed(6))),`... (${e.embedding.length} dims)`])}),JSON.stringify(t,null,2)})(C?.data)})]})]})]})}function I({providerId:e}){let t,s=(0,c.wG)(e),r=N[e]||N["edge-tts"],[l,o]=(0,n.useState)(r.defaultVoiceId||""),[d,p]=(0,n.useState)(""),[x,h]=(0,n.useState)(r.defaultVoiceId||""),[b,f]=(0,n.useState)([]),[g,y]=(0,n.useState)(""),[v,j]=(0,n.useState)(()=>{let t=c.Q2[e]?.ttsConfig?.models;if(t?.length)return t[0].id;if(r.hasModelSelector&&r.modelKey){let e=(0,u.KC)(r.modelKey);return e?.[0]?.id||""}return""}),[w,T]=(0,n.useState)("Hello, this is a text to speech test."),[E,O]=(0,n.useState)(!1),[P,A]=(0,n.useState)(""),[R,M]=(0,n.useState)(""),[L,D]=(0,n.useState)("mp3"),[K,U]=(0,n.useState)(""),[B,F]=(0,n.useState)(null),[q,J]=(0,n.useState)(!1),[z,V]=(0,n.useState)(""),[H,W]=(0,n.useState)(null),{copied:G,copy:Y}=(0,m.C)(),[Q,Z]=(0,n.useState)(!1),[X,ee]=(0,n.useState)([]),[et,es]=(0,n.useState)(!1),[ea,er]=(0,n.useState)(""),[el,eo]=(0,n.useState)(""),[en,ei]=(0,n.useState)({}),[ed,ec]=(0,n.useState)("");(0,n.useEffect)(()=>{if(A(window.location.origin),fetch("/api/tunnel/status").then(e=>e.json()).then(e=>{e.publicUrl&&M(e.publicUrl)}).catch(()=>{}),"hardcoded"===r.voiceSource){let t=r.hasModelSelector&&r.modelKey&&(0,u.KC)(r.modelKey)?.[0]?.id||"",s=r.voicesPerModel&&t?(0,k.jY)(e,t)||[]:(0,u.KC)(r.voiceKey||e).filter(e=>"tts"===e.type);if(s.length)if(r.hasBrowseButton){let e=s.find(e=>"en"===e.id)||s[0];y(e.id),o(e.id),p(e.name),f([{id:e.id,name:e.name}])}else f(s),o(s[0].id),p(s[0].name||s[0].id)}},[e]),(0,n.useEffect)(()=>{if(!r.voicesPerModel||!v)return;let t=(0,k.jY)(e,v)||[];f(t),t.length&&(o(t[0].id),p(t[0].name||t[0].id))},[v]);let eu=async()=>{if(Z(!0),er(""),eo(""),!X.length){es(!0);try{if("hardcoded"===r.voiceSource){let t=r.voiceKey||e,s=(0,u.KC)(t).filter(e=>"tts"===e.type),a={};for(let e of s)a[e.id]||(a[e.id]={code:e.id,name:e.name,voices:[{id:e.id,name:e.name}]});ei(a),ee(Object.values(a).sort((e,t)=>e.name.localeCompare(t.name)))}else{let t=r.apiEndpoint?r.apiEndpoint:`/api/media-providers/tts/voices?provider=${"local-device"===e?"local-device":"edge-tts"}`,s=await fetch(t),a=await s.json();if(a.error)return void eo(a.error);ee(a.languages||[]),ei(a.byLang||{})}}catch(e){eo(e.message)}finally{es(!1)}}},em=ea?X.filter(e=>e.name.toLowerCase().includes(ea.toLowerCase())||e.code.toLowerCase().includes(ea.toLowerCase())):X,ep=E?R:P,ex=r.hasVoiceIdInput&&x||l,eh=r.hasModelSelector&&v&&ex?`${s}/${v}/${ex}`:r.hasModelSelector&&v?`${s}/${v}`:ex?`${s}/${ex}`:"",eb=(t={model:eh,input:w},r.hasLanguageHint&&ed&&(t.language=ed),t),ef=`curl -X POST ${ep}/v1/audio/speech${"json"===L?"?response_format=json":""} \\
|
|
42
|
+
-H "Content-Type: application/json" \\
|
|
43
|
+
-H "Authorization: Bearer YOUR_KEY" \\
|
|
44
|
+
-d '${JSON.stringify(eb)}' \\
|
|
45
|
+
${"json"===L?"":"--output speech.mp3"}`,eg=async()=>{if(!w.trim()||!eh)return;J(!0),V(""),U(""),F(null);let e=Date.now();try{let t=(0,S.O)(`/v1/audio/speech${"json"===L?"?response_format=json":""}`),s=await fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...eb,input:w.trim()})});if(W(Date.now()-e),!s.ok){let e=await s.json().catch(()=>({}));V(e?.error?.message||e?.error||`HTTP ${s.status}`);return}if("json"===L){let e=await s.json();F(e);let t=await fetch(`data:audio/mp3;base64,${e.audio}`).then(e=>e.blob());U(URL.createObjectURL(t))}else{let e=await s.blob();U(URL.createObjectURL(e))}}catch(e){V(e.message||"Network error")}finally{J(!1)}};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(i.Zp,{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"Example"}),(0,a.jsxs)("div",{className:"flex flex-col gap-2.5",children:[(0,a.jsx)($,{label:"Endpoint",children:(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsxs)("span",{className:"w-full min-w-0 flex-1 px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate",children:[ep,"/v1/audio/speech"]}),R&&(0,a.jsxs)("button",{onClick:()=>O(e=>!e),title:E?"Using tunnel":"Using local",className:`flex items-center gap-1 text-xs px-2 py-1.5 rounded-lg border shrink-0 transition-colors ${E?"border-primary/40 bg-primary/10 text-primary":"border-border text-text-muted hover:text-primary"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"wifi_tethering"}),"Tunnel"]})]})}),(0,a.jsx)($,{label:"API Key",children:(0,a.jsx)("span",{className:"px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate block",children:(0,a.jsx)("span",{className:"text-text-muted italic",children:"Dashboard session (server-side)"})})}),r.hasModelSelector&&(r.modelKey||c.Q2[e]?.ttsConfig?.models?.length)&&(0,a.jsx)($,{label:"Model",children:(0,a.jsx)("select",{value:v,onChange:e=>j(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:((c.Q2[e]?.ttsConfig?.models?.length?c.Q2[e].ttsConfig.models:(0,u.KC)(r.modelKey))||[]).map(e=>(0,a.jsx)("option",{value:e.id,children:e.name||e.id},e.id))})}),r.hasLanguageHint&&(0,a.jsx)($,{label:"Language",children:(0,a.jsxs)("select",{value:ed,onChange:e=>ec(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:[(0,a.jsx)("option",{value:"",children:"Auto-detect"}),C.I.map(e=>(0,a.jsx)("option",{value:e.name,children:e.name},e.id))]})}),r.hasBrowseButton&&(0,a.jsx)($,{label:"Language",children:(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsx)("button",{onClick:eu,className:"w-full min-w-0 flex-1 px-3 py-1.5 text-sm border border-border rounded-lg bg-background font-mono truncate text-left hover:border-primary/40 transition-colors",children:g?(0,a.jsx)("span",{className:"text-text-main",children:X.find(e=>e.code===g)?.name||g}):(0,a.jsx)("span",{className:"text-text-muted",children:"No language selected"})}),(0,a.jsxs)("button",{onClick:eu,className:"flex w-full items-center justify-center gap-1 text-xs px-2.5 py-1.5 rounded-lg border border-border text-text-muted hover:text-primary hover:border-primary/40 transition-colors sm:w-auto sm:shrink-0",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"language"}),"Select language"]})]})}),b.length>0&&(0,a.jsx)($,{label:"Voice",children:(0,a.jsx)("div",{className:"flex flex-wrap gap-1.5",children:b.map(e=>(0,a.jsxs)("button",{onClick:()=>{o(e.id),p(e.name),r.hasVoiceIdInput&&h(e.id)},className:`px-2.5 py-1 rounded-full text-xs border transition-colors ${l===e.id?"bg-primary/15 border-primary/40 text-primary font-medium":"border-border text-text-muted hover:text-primary hover:border-primary/40"}`,children:[e.name,e.gender?` \xb7 ${e.gender[0].toUpperCase()}`:"",!0===e.free_users_allowed&&(0,a.jsx)("span",{className:"ml-1.5 px-1 py-0.5 text-[9px] font-semibold rounded bg-green-500/15 text-green-600 border border-green-500/20",children:"Free"}),!1===e.free_users_allowed&&(0,a.jsx)("span",{className:"ml-1.5 px-1 py-0.5 text-[9px] font-semibold rounded bg-amber-500/15 text-amber-600 border border-amber-500/20",children:"Paid"})]},e.id))})}),r.hasVoiceIdInput&&(0,a.jsx)($,{label:"Voice ID",children:(0,a.jsx)("div",{className:"flex flex-col gap-1",children:(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("input",{value:x,onChange:e=>{h(e.target.value),o(e.target.value)},placeholder:"e.g. CwhRBWXzGAHq8TQ4Fs17",className:"w-full px-3 py-1.5 pr-7 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"}),x&&(0,a.jsx)("button",{type:"button",onClick:()=>{h(""),o("")},className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-muted hover:text-primary transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})})}),r.hasLanguageDropdown&&(0,a.jsx)($,{label:"Language",children:(0,a.jsx)("select",{value:l,onChange:t=>{let s=(0,u.KC)(e).filter(e=>"tts"===e.type).find(e=>e.id===t.target.value);o(t.target.value),p(s?.name||t.target.value)},className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:(0,u.KC)(e).filter(e=>"tts"===e.type).map(e=>(0,a.jsx)("option",{value:e.id,children:e.name||e.id},e.id))})}),(0,a.jsx)($,{label:"Input",children:(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("input",{value:w,onChange:e=>T(e.target.value),className:"w-full px-3 py-1.5 pr-7 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"}),w&&(0,a.jsx)("button",{type:"button",onClick:()=>T(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-muted hover:text-primary transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})}),(0,a.jsx)($,{label:"Output Format",children:(0,a.jsxs)("select",{value:L,onChange:e=>D(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:[(0,a.jsx)("option",{value:"mp3",children:"MP3 (Binary)"}),(0,a.jsx)("option",{value:"json",children:"JSON (Base64)"})]})}),(0,a.jsxs)("div",{className:"mt-1",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Request"}),(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsxs)("button",{onClick:()=>Y(ef),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:G?"check":"content_copy"}),G?"Copied":"Copy"]}),(0,a.jsxs)("button",{onClick:eg,disabled:q||!w.trim()||!eh,className:"flex w-full sm:w-auto items-center justify-center gap-1.5 px-3 py-1 rounded-lg bg-primary text-white text-xs font-medium hover:bg-primary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",style:q?{animation:"spin 1s linear infinite"}:void 0,children:"play_arrow"}),q?"Generating...":"Run"]})]})]}),(0,a.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all",children:ef})]}),z&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:z}),K?(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,a.jsxs)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:["Response ",H&&(0,a.jsxs)("span",{className:"font-normal normal-case",children:["⚡ ",H,"ms"]})]}),(0,a.jsxs)("a",{href:K,download:"speech.mp3",className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"download"}),"Download"]})]}),(0,a.jsx)("audio",{controls:!0,src:K,className:"w-full"}),B&&(0,a.jsxs)("div",{className:"mt-3",children:[(0,a.jsx)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:(0,a.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"JSON Response"})}),(0,a.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all",children:JSON.stringify({format:B.format,audio:B.audio?`${B.audio.substring(0,100)}...`:""},null,2)})]})]}):(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Response"}),(0,a.jsx)("pre",{className:"mt-1.5 bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all opacity-50",children:_})]})]})]}),Q&&(0,a.jsx)("div",{className:"fixed inset-0 z-50 flex items-end justify-center sm:items-center",style:{backgroundColor:"rgba(0,0,0,0.6)",backdropFilter:"blur(2px)"},onClick:()=>Z(!1),children:(0,a.jsxs)("div",{className:"border border-border rounded-xl shadow-2xl w-full max-w-md mx-4 flex flex-col max-h-[80vh]",style:{backgroundColor:"var(--color-bg)",isolation:"isolate"},onClick:e=>e.stopPropagation(),children:[(0,a.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border shrink-0 rounded-t-xl",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold",children:"Select Language"}),(0,a.jsx)("button",{onClick:()=>Z(!1),className:"text-text-muted hover:text-primary transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"close"})})]}),(0,a.jsx)("div",{className:"px-4 py-2.5 border-b border-border shrink-0",children:(0,a.jsx)("input",{autoFocus:!0,value:ea,onChange:e=>er(e.target.value),placeholder:"Search language...",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})}),(0,a.jsxs)("div",{className:"overflow-y-auto flex-1 p-2",children:[el&&(0,a.jsx)("p",{className:"text-xs text-red-500 px-2 py-1",children:el}),et?(0,a.jsx)("p",{className:"text-xs text-text-muted px-2 py-3",children:"Loading..."}):(0,a.jsxs)("div",{className:"flex flex-col gap-0.5",children:[em.map(e=>(0,a.jsxs)("button",{onClick:()=>{let t;return Z(!1),y(e.code),void(f(t=en[e.code]?.voices||[]),t.length&&(o(t[0].id),p(t[0].name),r.hasVoiceIdInput&&h(t[0].id)))},className:`flex items-center justify-between w-full px-3 py-2 rounded-lg text-left hover:bg-sidebar transition-colors ${g===e.code?"bg-primary/10 text-primary":""}`,children:[(0,a.jsx)("span",{className:"text-sm",children:e.name}),(0,a.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:[(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:[e.voices.length," voices"]}),g===e.code&&(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-primary",children:"check"})]})]},e.code)),0===em.length&&(0,a.jsx)("p",{className:"text-xs text-text-muted px-2 py-3",children:"No languages found."})]})]})]})})]})}function R({providerId:e,kind:t}){let s=(0,c.wG)(e),r=(0,c.rs)(s)===e?s:e,l=c.rj.find(e=>e.id===t),o=P[t],d=o||{},p=(0,u.KC)(e).filter(e=>e.type===t),x=new Set(["image","video","music","imageToText"]).has(t),h=x&&0===p.length,[b,f]=(0,n.useState)(p[0]?.id??""),g=p.find(e=>e.id===b),y=!!g?.capabilities?.includes("edit"),v=!!g?.capabilities?.includes("mask"),[j,w]=(0,n.useState)(d.defaultInput||""),[N,k]=(0,n.useState)(""),[C,_]=(0,n.useState)(""),[T,A]=(0,n.useState)(()=>(d.extraFields||[]).reduce((e,t)=>(e[t.key]=t.default??"",e),{})),[I,M]=(0,n.useState)(!1),[L,D]=(0,n.useState)(""),[K,U]=(0,n.useState)(""),[B,F]=(0,n.useState)(null),[q,J]=(0,n.useState)(null),[z,V]=(0,n.useState)(null),[H,W]=(0,n.useState)("json"),[G,Y]=(0,n.useState)(""),[Q,Z]=(0,n.useState)(!1),[X,ee]=(0,n.useState)(""),[et,es]=(0,n.useState)([]),[ea,er]=(0,n.useState)(""),{copied:el,copy:eo}=(0,m.C)(),{copied:en,copy:ei}=(0,m.C)();if((0,n.useEffect)(()=>{D(window.location.origin),fetch("/api/tunnel/status").then(e=>e.json()).then(e=>{e.publicUrl&&U(e.publicUrl)}).catch(()=>{}),fetch("/api/providers/client").then(e=>e.json()).then(t=>{es((t.connections||[]).filter(t=>t.provider===e&&!1!==t.isActive))}).catch(()=>{})},[e]),!l||!o)return null;let ed=I?K:L,ec=l.endpoint.path,eu=x?b?`${r}/${b}`:h?"":r:r,em="cloudflare-ai"!==e?{}:"@cf/runwayml/stable-diffusion-v1-5-img2img"===b?{image:E}:"@cf/runwayml/stable-diffusion-v1-5-inpainting"===b?{image:E,mask_image:"https://pub-1fb693cb11cc46b2b2f656f51e015a2c.r2.dev/dog-mask.png"}:{},ep=N.trim()||em.image||"",ex=C.trim()||em.mask_image||"",eh=O(ep),eb=O(ex),ef=Object.entries(T).reduce((e,[t,s])=>(""===s||null==s||"number"==typeof s&&Number.isNaN(s)||(e[t]=s),e),{}),eg={model:eu,[o.bodyKey]:j,...o.extraBody,...ef,...y&&ep?{image:ep}:{},...v&&ex?{mask_image:ex}:{}},ey="image"===t&&"binary"===H,ev="image"===t&&"codex"===e&&!ey,ej=`${ec}${ey?"?response_format=binary":""}`,ew=(0,S.O)(ej),eN=`-H "Content-Type: application/json" \\
|
|
46
|
+
-H "Authorization: Bearer YOUR_KEY"${ea?` \\
|
|
47
|
+
-H "x-connection-id: ${ea}"`:""}${ev?` \\
|
|
48
|
+
-H "Accept: text/event-stream"`:""}`,ek=`curl -X ${l.endpoint.method} ${ed}${ej} \\
|
|
49
|
+
${eN.replace(/\\\n /g,"\\\n ")} \\
|
|
50
|
+
-d '${JSON.stringify(eg)}'${ey?" \\\n --output image.png":""}`,eC=async()=>{if(!ew)return void ee("Not supported by this router build");if(!j.trim()||!eu)return;if(Z(!0),ee(""),F(null),J(null),V(null),G){try{URL.revokeObjectURL(G)}catch{}Y("")}let e=Date.now();try{let t={"Content-Type":"application/json"};ea&&(t["x-connection-id"]=ea),ev&&(t.Accept="text/event-stream");let s={...eg,model:eu},a=await fetch(ew,{method:l.endpoint.method,headers:t,body:JSON.stringify(s)});if(!a.ok){let e=await a.json().catch(()=>({}));ee(e?.error?.message||e?.error||`HTTP ${a.status}`);return}let r=a.headers.get("content-type")||"";if(r.startsWith("image/")){let t=await a.blob(),s=URL.createObjectURL(t);Y(s),F({data:{binary:!0,mime:r,size:t.size},latencyMs:Date.now()-e});return}if(r.includes("text/event-stream")&&a.body){let t=a.body.getReader(),s=new TextDecoder,r="",l=null,o=null;for(;;){let e,{done:a,value:n}=await t.read();if(a)break;for(r+=s.decode(n,{stream:!0});-1!==(e=r.indexOf("\n\n"));){let t=r.slice(0,e);r=r.slice(e+2);let s=null,a="";for(let e of t.split("\n"))e.startsWith("event:")?s=e.slice(6).trim():e.startsWith("data:")&&(a+=e.slice(5).trim());if(s)try{let e=a?JSON.parse(a):{};"progress"===s?J(e):"partial_image"===s?V(e):"done"===s?l=e:"error"===s&&(o=e?.message||"Stream error")}catch{}}}let n=Date.now()-e;if(o)return void ee(o);l&&F({data:l,latencyMs:n})}else{let t=await a.json(),s=Date.now()-e;F({data:t,latencyMs:s})}}catch(e){ee(e.message||"Network error")}finally{Z(!1)}},eS=e=>{if(!e||"object"!=typeof e)return e;if(Array.isArray(e))return e.map(eS);let t={};for(let[s,a]of Object.entries(e))t[s]="b64_json"===s&&"string"==typeof a&&a.length>100?`<${a.length} chars base64>`:eS(a);return t},e$=B?JSON.stringify(eS(B.data),null,2):"";return(0,a.jsxs)(i.Zp,{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"Example"}),(0,a.jsxs)("div",{className:"flex flex-col gap-2.5",children:[p.length>0?(0,a.jsx)($,{label:"Model",children:(0,a.jsx)("select",{value:b,onChange:e=>f(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:p.map(e=>(0,a.jsx)("option",{value:e.id,children:e.name||e.id},e.id))})}):h?(0,a.jsx)($,{label:"Model",children:(0,a.jsx)("input",{value:b,onChange:e=>f(e.target.value),placeholder:"Enter model id (provider-specific)",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"})}):null,(0,a.jsx)($,{label:"Endpoint",children:(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsxs)("span",{className:"w-full min-w-0 flex-1 px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate",children:[ed,ec]}),K&&(0,a.jsxs)("button",{onClick:()=>M(e=>!e),title:I?"Using tunnel":"Using local",className:`flex items-center gap-1 text-xs px-2 py-1.5 rounded-lg border shrink-0 transition-colors ${I?"border-primary/40 bg-primary/10 text-primary":"border-border text-text-muted hover:text-primary"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"wifi_tethering"}),"Tunnel"]})]})}),(0,a.jsx)($,{label:"API Key",children:(0,a.jsx)("span",{className:"px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate block",children:(0,a.jsx)("span",{className:"text-text-muted italic",children:"Dashboard session (server-side)"})})}),et.length>0&&(0,a.jsx)($,{label:"Connection",children:(0,a.jsxs)("select",{value:ea,onChange:e=>er(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:[(0,a.jsx)("option",{value:"",children:"Auto (by priority)"}),et.map(e=>{let t=e.providerSpecificData?.chatgptPlanType,s=e.email||e.name||e.id.slice(0,8);return(0,a.jsxs)("option",{value:e.id,children:[s,t?` [${t}]`:""]},e.id)})]})}),(0,a.jsx)($,{label:o.inputLabel,children:(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("input",{value:j,onChange:e=>w(e.target.value),placeholder:o.inputPlaceholder,className:"w-full px-3 py-1.5 pr-7 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"}),j&&(0,a.jsx)("button",{type:"button",onClick:()=>w(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-muted hover:text-primary transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})}),y&&(0,a.jsx)($,{label:"Ref Image (URL)",children:(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("input",{value:N,onChange:e=>k(e.target.value),placeholder:em.image||"https://example.com/source.png",className:"w-full px-3 py-1.5 pr-7 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"}),N&&(0,a.jsx)("button",{type:"button",onClick:()=>k(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-muted hover:text-primary transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]}),eh&&(0,a.jsx)("img",{src:eh,alt:"Reference",className:"max-h-40 rounded-lg border border-border object-contain bg-sidebar",onError:e=>{e.currentTarget.style.display="none"},onLoad:e=>{e.currentTarget.style.display="block"}})]})}),v&&(0,a.jsx)($,{label:"Mask (URL)",children:(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("input",{value:C,onChange:e=>_(e.target.value),placeholder:em.mask_image||"https://example.com/mask.png",className:"w-full px-3 py-1.5 pr-7 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"}),C&&(0,a.jsx)("button",{type:"button",onClick:()=>_(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-muted hover:text-primary transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]}),eb&&(0,a.jsx)("img",{src:eb,alt:"Mask",className:"max-h-40 rounded-lg border border-border object-contain bg-sidebar",onError:e=>{e.currentTarget.style.display="none"},onLoad:e=>{e.currentTarget.style.display="block"}})]})}),(o.extraFields||[]).filter(e=>0===p.length||Array.isArray(g?.params)&&g.params.includes(e.key)).map(e=>(0,a.jsx)($,{label:e.label,children:"select"===e.type?(0,a.jsx)("select",{value:T[e.key]??"",onChange:t=>A(s=>({...s,[e.key]:t.target.value})),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:(e.options||[]).map(e=>(0,a.jsx)("option",{value:e,children:""===e?"(default)":e},e))}):"text"===e.type?(0,a.jsx)("input",{type:"text",value:T[e.key]??"",placeholder:e.placeholder,onChange:t=>A(s=>({...s,[e.key]:t.target.value})),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"}):(0,a.jsx)("input",{type:"number",value:T[e.key]??"",min:e.min,max:e.max,onChange:t=>A(s=>({...s,[e.key]:""===t.target.value?"":Number(t.target.value)})),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})},e.key)),"image"===t&&(0,a.jsx)($,{label:"Output Format",children:(0,a.jsxs)("select",{value:H,onChange:e=>W(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:[(0,a.jsx)("option",{value:"json",children:"JSON (Base64)"}),(0,a.jsx)("option",{value:"binary",children:"Binary File"})]})}),(0,a.jsxs)("div",{className:"mt-1",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Request"}),(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[ew&&(0,a.jsxs)("button",{onClick:()=>eo(ek),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:el?"check":"content_copy"}),el?"Copied":"Copy"]}),(0,a.jsxs)("button",{onClick:eC,disabled:!ew||Q||!j.trim()||!eu,title:ew?void 0:"Not supported by this router build",className:"flex w-full sm:w-auto items-center justify-center gap-1.5 px-3 py-1 rounded-lg bg-primary text-white text-xs font-medium hover:bg-primary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",style:Q?{animation:"spin 1s linear infinite"}:void 0,children:"play_arrow"}),ew?Q?"Running...":"Run":"Unavailable"]})]})]}),ew?(0,a.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all",children:ek}):(0,a.jsx)("div",{className:"rounded-lg border border-border bg-sidebar px-3 py-2.5 text-xs text-text-muted",children:"Not supported by this router build"})]}),(Q||q)&&ev&&(0,a.jsxs)("div",{className:"flex flex-col gap-2 px-3 py-2 rounded-lg bg-sidebar border border-border sm:flex-row sm:items-center sm:gap-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-primary",style:Q?{animation:"spin 1s linear infinite"}:void 0,children:Q?"progress_activity":"check_circle"}),(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:[q?.stage||"starting",!Q&&q?.bytesReceived?` \xb7 ${(q.bytesReceived/1024).toFixed(1)} KB`:""]})]}),z?.b64_json&&!B&&(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Partial preview"}),(0,a.jsx)("img",{src:`data:image/png;base64,${z.b64_json}`,alt:"Partial",className:"max-w-full rounded-lg border border-border mt-1.5 opacity-80"})]}),X&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:X}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,a.jsxs)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:["Response ",B&&(0,a.jsxs)("span",{className:"font-normal normal-case",children:["⚡ ",B.latencyMs,"ms"]})]}),B&&(0,a.jsxs)("button",{onClick:()=>ei(e$),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:en?"check":"content_copy"}),en?"Copied":"Copy"]})]}),(0,a.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all opacity-70",children:B?e$:o.defaultResponse}),"image"===t&&(G||B?.data?.data?.[0])&&(0,a.jsxs)("div",{className:"mt-2",children:[(0,a.jsx)("div",{className:"flex items-center justify-end mb-1.5",children:(0,a.jsxs)("a",{href:G||(B?.data?.data?.[0]?.b64_json?`data:image/png;base64,${B.data.data[0].b64_json}`:B?.data?.data?.[0]?.url||""),download:"image.png",className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"download"}),"Download"]})}),(0,a.jsx)("img",{src:G||(B?.data?.data?.[0]?.b64_json?`data:image/png;base64,${B.data.data[0].b64_json}`:B?.data?.data?.[0]?.url),alt:"Generated",className:"max-w-full rounded-lg border border-border"})]})]})]})]})}function M({providerId:e}){let t=(0,c.wG)(e),s=(0,u.KC)(e).filter(e=>"stt"===e.type),[r,l]=(0,n.useState)([]),o=[...s,...r],[d,p]=(0,n.useState)(s[0]?.id??""),x=o.find(e=>e.id===d),h=Array.isArray(x?.params)?x.params:[],[b,f]=(0,n.useState)(null),[g,y]=(0,n.useState)(""),[v,j]=(0,n.useState)(""),[w,N]=(0,n.useState)("json"),[k,C]=(0,n.useState)(""),[_,T]=(0,n.useState)(!1),[E,O]=(0,n.useState)(""),[P,A]=(0,n.useState)(""),[I,R]=(0,n.useState)(null),[L,D]=(0,n.useState)(null),[K,U]=(0,n.useState)(!1),[B,F]=(0,n.useState)(""),{copied:q,copy:J}=(0,m.C)(),{copied:z,copy:V}=(0,m.C)();(0,n.useEffect)(()=>{O(window.location.origin),fetch("/api/tunnel/status").then(e=>e.json()).then(e=>{e.publicUrl&&A(e.publicUrl)}).catch(()=>{});let e=()=>{fetch("/api/models/custom",{cache:"no-store"}).then(e=>e.json()).then(e=>{l((e.models||[]).filter(e=>"stt"===e.type&&e.providerAlias===t))}).catch(()=>{})};return e(),window.addEventListener("focus",e),window.addEventListener("customModelChanged",e),()=>{window.removeEventListener("focus",e),window.removeEventListener("customModelChanged",e)}},[t]);let H=_?P:E,W=d?`${t}/${d}`:"",G=`curl -X POST ${H}/v1/audio/transcriptions \\
|
|
51
|
+
-H "Authorization: Bearer YOUR_KEY" \\
|
|
52
|
+
-F "file=@${b?.name||"audio.mp3"}" \\
|
|
53
|
+
-F "model=${W}"${h.includes("language")&&g?` \\
|
|
54
|
+
-F "language=${g}"`:""}${h.includes("response_format")?` \\
|
|
55
|
+
-F "response_format=${w}"`:""}${h.includes("temperature")&&k?` \\
|
|
56
|
+
-F "temperature=${k}"`:""}${h.includes("prompt")&&v?` \\
|
|
57
|
+
-F "prompt=${v}"`:""}`,Y=async()=>{if(!b||!W)return;U(!0),F(""),R(null);let e=Date.now();try{let t=new FormData;t.append("file",b),t.append("model",W),h.includes("language")&&g&&t.append("language",g),h.includes("response_format")&&t.append("response_format",w),h.includes("temperature")&&k&&t.append("temperature",k),h.includes("prompt")&&v&&t.append("prompt",v);let s=await fetch((0,S.O)("/v1/audio/transcriptions"),{method:"POST",body:t});D(Date.now()-e);let a=(s.headers.get("content-type")||"").includes("application/json")?await s.json():await s.text();if(!s.ok)return void F(a?.error?.message||a?.error||a||`HTTP ${s.status}`);R(a)}catch(e){F(e.message||"Network error")}finally{U(!1)}},Q="string"==typeof I?I:I?JSON.stringify(I,null,2):`{
|
|
58
|
+
"text": "Hello world..."
|
|
59
|
+
}`;return(0,a.jsxs)(i.Zp,{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"Example"}),(0,a.jsxs)("div",{className:"flex flex-col gap-2.5",children:[o.length>0?(0,a.jsx)($,{label:"Model",children:(0,a.jsx)("select",{value:d,onChange:e=>p(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:o.map(e=>(0,a.jsx)("option",{value:e.id,children:e.name||e.id},e.id))})}):(0,a.jsx)($,{label:"Model",children:(0,a.jsx)("input",{value:d,onChange:e=>p(e.target.value),placeholder:"Enter model id",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"})}),(0,a.jsx)($,{label:"Endpoint",children:(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsxs)("span",{className:"w-full min-w-0 flex-1 px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate",children:[H,"/v1/audio/transcriptions"]}),P&&(0,a.jsxs)("button",{onClick:()=>T(e=>!e),title:_?"Using tunnel":"Using local",className:`flex items-center gap-1 text-xs px-2 py-1.5 rounded-lg border shrink-0 transition-colors ${_?"border-primary/40 bg-primary/10 text-primary":"border-border text-text-muted hover:text-primary"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"wifi_tethering"}),"Tunnel"]})]})}),(0,a.jsx)($,{label:"API Key",children:(0,a.jsx)("span",{className:"px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate block",children:(0,a.jsx)("span",{className:"text-text-muted italic",children:"Dashboard session (server-side)"})})}),(0,a.jsx)($,{label:"Audio File",children:(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("input",{type:"file",accept:"audio/*,video/mp4,.m4a,.mp3,.wav,.ogg,.flac,.webm,.opus",onChange:e=>f(e.target.files?.[0]||null),className:"w-full text-xs text-text-muted file:mr-2 file:py-1 file:px-2.5 file:rounded-lg file:border file:border-border file:bg-background file:text-text-main hover:file:bg-sidebar file:cursor-pointer"}),b&&(0,a.jsxs)("span",{className:"text-xs text-text-muted font-mono",children:[b.name," \xb7 ",(b.size/1024).toFixed(1)," KB"]})]})}),h.includes("language")&&(0,a.jsx)($,{label:"Language",children:(0,a.jsx)("input",{value:g,onChange:e=>y(e.target.value),placeholder:"e.g. en, vi, ja (auto-detect if empty)",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"})}),h.includes("prompt")&&(0,a.jsx)($,{label:"Prompt",children:(0,a.jsx)("input",{value:v,onChange:e=>j(e.target.value),placeholder:"optional context to improve accuracy",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})}),h.includes("temperature")&&(0,a.jsx)($,{label:"Temperature",children:(0,a.jsx)("input",{type:"number",step:"0.1",min:"0",max:"1",value:k,onChange:e=>C(e.target.value),placeholder:"0 - 1 (default 0)",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})}),h.includes("response_format")&&(0,a.jsx)($,{label:"Response Format",children:(0,a.jsxs)("select",{value:w,onChange:e=>N(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:[(0,a.jsx)("option",{value:"json",children:"json"}),(0,a.jsx)("option",{value:"text",children:"text"}),(0,a.jsx)("option",{value:"srt",children:"srt"}),(0,a.jsx)("option",{value:"verbose_json",children:"verbose_json"}),(0,a.jsx)("option",{value:"vtt",children:"vtt"})]})}),(0,a.jsxs)("div",{className:"mt-1",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Request"}),(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsxs)("button",{onClick:()=>J(G),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:q?"check":"content_copy"}),q?"Copied":"Copy"]}),(0,a.jsxs)("button",{onClick:Y,disabled:K||!b||!W,className:"flex w-full sm:w-auto items-center justify-center gap-1.5 px-3 py-1 rounded-lg bg-primary text-white text-xs font-medium hover:bg-primary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",style:K?{animation:"spin 1s linear infinite"}:void 0,children:"play_arrow"}),K?"Transcribing...":"Run"]})]})]}),(0,a.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all",children:G})]}),B&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:B}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,a.jsxs)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:["Response ",I&&L&&(0,a.jsxs)("span",{className:"font-normal normal-case",children:["⚡ ",L,"ms"]})]}),I&&(0,a.jsxs)("button",{onClick:()=>V(Q),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:z?"check":"content_copy"}),z?"Copied":"Copy"]})]}),(0,a.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all opacity-70",children:Q})]})]})]})}function L(){let{kind:e,id:t}=(0,r.useParams)(),s=(0,r.useRouter)(),l=c.rj.find(t=>t.id===e),u=(0,c.gC)(t)&&"embedding"===e,m=async()=>{if(confirm("Delete this Custom Embedding node?"))try{(await fetch(`/api/provider-nodes/${t}`,{method:"DELETE"})).ok&&s.push(`/dashboard/media-providers/${e}`)}catch(e){console.log("Error deleting custom embedding node:",e)}},[p,x]=(0,n.useState)(null),[h,b]=(0,n.useState)(u),[f,g]=(0,n.useState)(!1);if((0,n.useEffect)(()=>{if(!u)return;let e=!1;return fetch("/api/provider-nodes",{cache:"no-store"}).then(e=>e.json()).then(s=>{e||(x((s.nodes||[]).find(e=>e.id===t)||null),b(!1))}).catch(()=>{e||b(!1)}),()=>{e=!0}},[t,u]),!l)return(0,r.notFound)();let v=c.Q2[t],j=u?p?{id:t,name:p.name||"Custom Embedding",color:"#6366F1",textIcon:"CE"}:null:v;if(!u&&!v||u&&!h&&!p)return(0,r.notFound)();if(u&&h)return(0,a.jsx)("div",{className:"text-text-muted text-sm py-12 text-center",children:"Loading..."});let N=u?["embedding"]:j.serviceKinds??["llm"];return u||N.includes(e)?(0,a.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)(o(),{href:`/dashboard/media-providers/${e}`,className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary transition-colors mb-4",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),l.label]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-4",children:[(0,a.jsx)("div",{className:"size-12 rounded-lg flex items-center justify-center shrink-0",style:{backgroundColor:`${j.color}15`},children:(0,a.jsx)(d.A,{src:`/providers/${j.id}.png`,alt:j.name,size:48,className:"object-contain rounded-lg max-w-[48px] max-h-[48px]",fallbackText:j.textIcon||j.id.slice(0,2).toUpperCase(),fallbackColor:j.color})}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2 sm:gap-3",children:[(0,a.jsx)("h1",{className:"text-3xl font-semibold tracking-tight",children:j.name}),!u&&j.notice?.apiKeyUrl&&(0,a.jsxs)("a",{href:j.notice.apiKeyUrl,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline inline-flex items-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),"Get API Key"]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5 mt-1 flex-wrap",children:[u&&(0,a.jsxs)(i.Ex,{variant:"default",size:"sm",children:["Custom \xb7 ",p?.prefix]}),N.map(t=>(0,a.jsx)(i.Ex,{variant:t===e?"primary":"default",size:"sm",children:t.toUpperCase()},t))]})]}),u&&(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsx)(i.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>g(!0),children:"Edit"}),(0,a.jsx)(i.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:m,children:"Delete"})]})]})]}),!u&&j.kindNotice?.[e]&&(0,a.jsxs)("div",{className:"flex items-start gap-3 px-4 py-3 rounded-lg bg-amber-500/10 border border-amber-500/30 text-amber-700 dark:text-amber-400",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px] mt-0.5",children:"warning"}),(0,a.jsx)("p",{className:"text-sm",children:j.kindNotice[e]})]}),!u&&j.notice?.text&&!j.deprecated&&(0,a.jsxs)("div",{className:"flex flex-col gap-2 rounded-lg border border-blue-500/30 bg-blue-500/10 px-3 py-2 sm:flex-row sm:items-center",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-blue-500 shrink-0",children:"info"}),(0,a.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-blue-600 dark:text-blue-400",children:j.notice.text}),j.notice.apiKeyUrl&&(0,a.jsx)("a",{href:j.notice.apiKeyUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-flex justify-center rounded bg-blue-500 px-2 py-1 text-xs font-medium text-white transition-colors hover:bg-blue-600 sm:py-0.5",children:"Get API Key →"})]}),!u&&j.noAuth?(0,a.jsx)(i.gw,{providerId:t}):(0,a.jsx)(y,{providerId:t,isOAuth:!1}),"tts"!==e&&"webSearch"!==e&&"webFetch"!==e&&(0,a.jsx)(w,{providerId:t,kindFilter:e,providerAliasOverride:u?p?.prefix:void 0}),!u&&(j.searchConfig||j.fetchConfig||j.ttsConfig||j.sttConfig||j.embeddingConfig||j.searchViaChat)&&(0,a.jsx)(i.Wx,{config:"webFetch"===e?j.fetchConfig:"tts"===e?j.ttsConfig:"stt"===e?j.sttConfig:"embedding"===e?j.embeddingConfig:j.searchConfig||{mode:"chat-completions",defaultModel:j.searchViaChat?.defaultModel,pricingUrl:j.searchViaChat?.pricingUrl,freeTier:j.searchViaChat?.freeTier},provider:j,title:`${l.label} Config`}),"embedding"===e&&(0,a.jsx)(A,{providerId:t,customAlias:p?.prefix}),"tts"===e&&(0,a.jsx)(I,{providerId:t}),"stt"===e&&!u&&(0,a.jsx)(M,{providerId:t}),!u&&P[e]&&(0,a.jsx)(R,{providerId:t,kind:e}),u&&(0,a.jsx)(i.x0,{isOpen:f,node:p,onClose:()=>g(!1),onSaved:e=>{x(e),g(!1)}})]}):(0,r.notFound)()}}},e=>{e.O(0,[2574,3862,3745,9802,620,5497,8441,3794,7358],()=>e(e.s=54909)),_N_E=e.O()}]);
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8334],{22662:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>f});var a=s(95155),l=s(73321),r=s(12115),i=s(98500),n=s.n(i),o=s(35497),d=s(57250),c=s(52679),m=s(62199);let x=/^[a-zA-Z0-9_.\-]+$/,h={webSearch:"Web Search",webFetch:"Web Fetch",image:"Text to Image",tts:"Text To Speech"},u={webSearch:"/v1/search",webFetch:"/v1/web/fetch",image:"/v1/images/generations",tts:"/v1/audio/speech"},p={webSearch:e=>({model:e,query:"What is the latest news about AI?",search_type:"web",max_results:5}),webFetch:e=>({model:e,url:"https://example.com",format:"markdown"}),image:e=>({model:e,prompt:"A cute cat playing piano",n:1,size:"1024x1024"}),tts:e=>({model:e,input:"Hello, this is a test.",voice:"alloy"})};function b(e){return"webSearch"===e||"webFetch"===e?"/dashboard/media-providers/web":`/dashboard/media-providers/${e}`}function f(){let{id:e}=(0,l.useParams)(),t=(0,l.useRouter)(),[s,i]=(0,r.useState)(null),[f,j]=(0,r.useState)(!0),[g,w]=(0,r.useState)(""),[v,y]=(0,r.useState)(""),[N,k]=(0,r.useState)([]),[S,O]=(0,r.useState)(!1),[U,$]=(0,r.useState)(!1),[C,_]=(0,r.useState)([]),[T,R]=(0,r.useState)(!1),[A,L]=(0,r.useState)(null),[P,E]=(0,r.useState)(""),[z,D]=(0,r.useState)([]),[F,M]=(0,r.useState)({}),I=async()=>{try{let[t,s,a,l,r]=await Promise.all([fetch(`/api/combos/${e}`,{cache:"no-store"}),fetch("/api/settings",{cache:"no-store"}),fetch("/api/usage/logs",{cache:"no-store"}),fetch("/api/providers",{cache:"no-store"}),fetch("/api/models/alias",{cache:"no-store"})]);if(r.ok&&M((await r.json()).aliases||{}),l.ok&&D((await l.json()).connections||[]),!t.ok){i(null),j(!1);return}let n=await t.json();i(n),w(n.name),k(n.models||[]);let o=s.ok?await s.json():{};O(o.comboStrategies?.[n.name]?.fallbackStrategy==="round-robin");let d=a.ok?await a.json():[];_(d.filter(e=>"string"==typeof e&&e.includes(n.name)).slice(0,50))}catch{}j(!1)};(0,r.useEffect)(()=>{I()},[e]);let J=e=>e.trim()?x.test(e)?(y(""),!0):(y("Only letters, numbers, -, _ and ."),!1):(y("Name is required"),!1),W=async t=>{let s=await fetch(`/api/combos/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});return!!s.ok||(alert((await s.json()).error||"Failed to save"),!1)},H=async()=>{!J(g)||g===s.name||await W({name:g})&&await I()},Z=async e=>{let t=e?.value||e;if(!t||N.includes(t))return;let s=[...N,t];k(s),await W({models:s})},q=async e=>{let t=e?.value||e;if(!t||!N.includes(t))return;let s=N.filter(e=>e!==t);k(s),await W({models:s})},B=async e=>{let t=N.filter((t,s)=>s!==e);k(t),await W({models:t})},Y=async(e,t)=>{let s=[...N],a=e+t;a<0||a>=s.length||([s[e],s[a]]=[s[a],s[e]],k(s),await W({models:s}))},G=async e=>{O(e);let t=await fetch("/api/settings",{cache:"no-store"}),a={...(t.ok?await t.json():{}).comboStrategies||{}};e?a[s.name]={fallbackStrategy:"round-robin"}:delete a[s.name],await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStrategies:a})})},K=async()=>{!confirm(`Delete combo "${s.name}"?`)||(await fetch(`/api/combos/${e}`,{method:"DELETE"})).ok&&t.push(b(s.kind))},Q=async()=>{if(R(!0),L(null),E(""),A?.audioUrl)try{URL.revokeObjectURL(A.audioUrl)}catch{}if(A?.imageUrl?.startsWith("blob:"))try{URL.revokeObjectURL(A.imageUrl)}catch{}let e=Date.now();try{let t=u[s.kind],a=(0,m.O)(t);if(!a)return void E("Not supported by this router build");let l=p[s.kind](s.name),r=await fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)}),i=Date.now()-e;if(!r.ok){let e=await r.json().catch(()=>({}));E(e?.error?.message||e?.error||`HTTP ${r.status}`),L({json:JSON.stringify(e,null,2),latencyMs:i});return}let n=r.headers.get("content-type")||"";if(n.startsWith("image/")){let e=await r.blob();L({imageUrl:URL.createObjectURL(e),latencyMs:i});return}if(n.startsWith("audio/")||"application/octet-stream"===n){let e=await r.blob();L({audioUrl:URL.createObjectURL(e),latencyMs:i});return}let o=await r.json(),d=o?.data?.[0],c=d?.b64_json?`data:image/png;base64,${d.b64_json}`:d?.url||"";L({json:JSON.stringify(function e(t){if(!t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(e);let s={};for(let[a,l]of Object.entries(t))s[a]="b64_json"===a&&"string"==typeof l&&l.length>100?`<${l.length} chars base64>`:e(l);return s}(o),null,2),imageUrl:c,latencyMs:i})}catch(e){E(e.message||"Network error")}R(!1)};if(f)return(0,a.jsx)("div",{className:"text-text-muted text-sm",children:"Loading..."});if(!s)return(0,l.notFound)();let V=h[s.kind]||c.rj.find(e=>e.id===s.kind)?.label||"Combo",X=u[s.kind],ee=s.kind&&p[s.kind]?p[s.kind](s.name):null,et=X?`curl -X POST http://localhost:1997${X} \\
|
|
2
|
+
-H "Content-Type: application/json" \\
|
|
3
|
+
-H "Authorization: Bearer YOUR_KEY" \\
|
|
4
|
+
-d '${JSON.stringify(ee)}'`:"",es=b(s.kind);return(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 min-w-0",children:[(0,a.jsx)(n(),{href:es,className:"text-text-muted hover:text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined",children:"arrow_back"})}),(0,a.jsx)("div",{className:"size-10 rounded-lg bg-primary/10 flex items-center justify-center",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-primary",children:"layers"})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:[V," Combo"]}),(0,a.jsx)("code",{className:"text-lg font-semibold font-mono",children:s.name})]})]}),(0,a.jsx)(o.$n,{variant:"outline",icon:"delete",onClick:K,className:"text-red-500 border-red-200 hover:bg-red-50",children:"Delete"})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold mb-3",children:"Settings"}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(o.pd,{label:"Combo Name",value:g,onChange:e=>{w(e.target.value),J(e.target.value)},onBlur:H,error:v}),(0,a.jsx)("p",{className:"text-[10px] text-text-muted mt-0.5",children:"Only letters, numbers, -, _ and ."})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:"Round Robin"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Rotate providers across requests instead of strict fallback order."})]}),(0,a.jsx)(o.lM,{checked:S,onChange:G})]})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Providers"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Tried in order (top-down) or rotated when round-robin is on."})]}),(0,a.jsx)(o.$n,{size:"sm",icon:"add",onClick:()=>$(!0),children:"Add Provider"})]}),0===N.length?(0,a.jsx)("div",{className:"text-center py-6 border border-dashed border-border rounded-lg text-text-muted text-sm",children:"No providers yet."}):(0,a.jsx)("div",{className:"flex flex-col gap-2",children:N.map((e,t)=>{let{providerId:s,model:l}=function(e){if("string"!=typeof e)return{providerId:"",model:""};let t=e.indexOf("/");return t<0?{providerId:e,model:""}:{providerId:e.slice(0,t),model:e.slice(t+1)}}(e),r=c.Q2[s];return(0,a.jsxs)("div",{className:"flex items-center gap-3 p-2 rounded-lg bg-black/[0.02] dark:bg-white/[0.02]",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted w-5 text-center",children:t+1}),(0,a.jsx)(d.A,{src:`/providers/${s}.png`,alt:r?.name||s,size:24,className:"object-contain rounded shrink-0",fallbackText:r?.textIcon||s.slice(0,2).toUpperCase(),fallbackColor:r?.color}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("div",{className:"text-sm font-medium truncate",children:r?.name||s}),l&&(0,a.jsx)("code",{className:"text-[10px] text-text-muted font-mono truncate block",children:l})]}),(0,a.jsxs)("div",{className:"flex items-center gap-0.5",children:[(0,a.jsx)("button",{onClick:()=>Y(t,-1),disabled:0===t,className:`p-1 rounded ${0===t?"text-text-muted/20":"text-text-muted hover:text-primary hover:bg-black/5"}`,title:"Move up",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"arrow_upward"})}),(0,a.jsx)("button",{onClick:()=>Y(t,1),disabled:t===N.length-1,className:`p-1 rounded ${t===N.length-1?"text-text-muted/20":"text-text-muted hover:text-primary hover:bg-black/5"}`,title:"Move down",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"arrow_downward"})}),(0,a.jsx)("button",{onClick:()=>B(t),className:"p-1 rounded text-text-muted hover:text-red-500 hover:bg-red-500/10",title:"Remove",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"close"})})]})]},`${e}-${t}`)})})]}),s.kind&&X&&(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-3",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Test Example"}),(0,a.jsx)(o.$n,{size:"sm",icon:"play_arrow",onClick:Q,disabled:T||0===N.length,children:T?"Running...":"Run"})]}),(0,a.jsx)("pre",{className:"text-xs font-mono bg-black/[0.03] dark:bg-white/[0.03] p-3 rounded-lg overflow-x-auto whitespace-pre-wrap break-all",children:et}),P&&(0,a.jsx)("p",{className:"mt-3 text-xs text-red-500 break-words",children:P}),A&&(0,a.jsxs)("div",{className:"mt-3 flex flex-col gap-3",children:[null!=A.latencyMs&&(0,a.jsxs)("span",{className:"text-[11px] text-text-muted",children:["⚡ ",A.latencyMs,"ms"]}),A.imageUrl&&(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"flex items-center justify-end mb-1.5",children:(0,a.jsxs)("a",{href:A.imageUrl,download:"image.png",className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"download"}),"Download"]})}),(0,a.jsx)("img",{src:A.imageUrl,alt:"Generated",className:"max-w-full rounded-lg border border-border"})]}),A.audioUrl&&(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"flex items-center justify-end mb-1.5",children:(0,a.jsxs)("a",{href:A.audioUrl,download:"speech.mp3",className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"download"}),"Download"]})}),(0,a.jsx)("audio",{controls:!0,src:A.audioUrl,className:"w-full"})]}),A.json&&(0,a.jsx)("pre",{className:"text-xs font-mono bg-black/[0.03] dark:bg-white/[0.03] p-3 rounded-lg overflow-auto max-h-[300px] whitespace-pre-wrap break-all",children:A.json})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold mb-3",children:"Usage Logs"}),0===C.length?(0,a.jsx)("p",{className:"text-xs text-text-muted italic",children:"No usage yet."}):(0,a.jsx)("pre",{className:"text-[11px] font-mono bg-black/[0.03] dark:bg-white/[0.03] p-3 rounded-lg overflow-auto max-h-[400px] whitespace-pre-wrap",children:C.join("\n")})]}),(0,a.jsx)(o.rq,{isOpen:U,onClose:()=>$(!1),onSelect:Z,onDeselect:q,activeProviders:z,modelAliases:F,title:`Add ${V} Model`,kindFilter:s.kind,addedModelValues:N,closeOnSelect:!1})]})}},62199:(e,t,s)=>{"use strict";s.d(t,{O:()=>l});let a=Object.freeze({"/v1/embeddings":"embeddings","/v1/images/generations":"images","/v1/audio/speech":"speech","/v1/audio/transcriptions":"transcriptions","/v1/search":"search","/v1/web/fetch":"fetch"});function l(e){if("string"!=typeof e)return null;let t=e.indexOf("?"),s=-1===t?e:e.slice(0,t),l=-1===t?"":e.slice(t),r=a[s];return r?`/api/dashboard/media/${r}${l}`:null}},98269:(e,t,s)=>{Promise.resolve().then(s.bind(s,22662))}},e=>{e.O(0,[2574,3862,3745,9802,620,5497,8441,3794,7358],()=>e(e.s=98269)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6607],{23879:(e,s,t)=>{"use strict";t.d(s,{default:()=>d});var a=t(95155),i=t(12115),n=t(3534),l=t(28777),o=t(52679),r=t(43666);function d(){let[e,s]=(0,i.useState)([]),[t,d]=(0,i.useState)([]),[c,u]=(0,i.useState)({}),[h,p]=(0,i.useState)(!1),[w,f]=(0,i.useState)(null),[y,x]=(0,i.useState)({running:!1,certExists:!1,dnsStatus:{},hasCachedPassword:!1});(0,i.useEffect)(()=>{g(),v(),m(),S()},[]);let g=async()=>{try{let e=await fetch("/api/providers");if(e.ok){let t=await e.json();s(t.connections||[])}}catch{}},v=async()=>{try{let e=await fetch("/api/dashboard/cli-tools/keys",{cache:"no-store"});if(e.ok){let s=await e.json();d(s.keys||[])}}catch{}},m=async()=>{try{let e=await fetch("/api/models/alias");if(e.ok){let s=await e.json();u(s.aliases||{})}}catch{}},S=async()=>{try{let e=await fetch("/api/settings");if(e.ok){let s=await e.json();p(s.cloudEnabled||!1)}}catch{}},b=()=>e.filter(e=>!1!==e.isActive),k=Object.entries(n.wn);return(0,a.jsxs)("div",{className:"flex w-full flex-col gap-6",children:[(0,a.jsxs)("div",{className:"flex items-start gap-2 px-3 py-2 rounded-lg bg-yellow-500/10 border border-yellow-500/30",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-yellow-500 mt-0.5 shrink-0",children:"warning"}),(0,a.jsx)("p",{className:"text-xs text-red-600 dark:text-yellow-400 leading-relaxed",children:"⚠️ MITM intercepts HTTPS traffic of IDE tools (Antigravity, GitHub Copilot, Kiro) via local CA to redirect requests to your providers. May violate ToS → account ban. Use at your own risk."})]}),(0,a.jsx)(r.tA,{apiKeys:t,cloudEnabled:h,onStatusChange:x}),(0,a.jsx)("div",{className:"grid gap-3 sm:gap-4",children:k.map(([e,s])=>(0,a.jsx)(r.kn,{tool:s,isExpanded:w===e,onToggle:()=>f(w===e?null:e),serverRunning:y.running,dnsActive:y.dnsStatus?.[e]||!1,hasCachedPassword:y.hasCachedPassword||!1,needsSudoPassword:!1!==y.needsSudoPassword,isWin:!0===y.isWin,apiKeys:t,activeProviders:b(),hasActiveProviders:b().some(e=>(0,l.KC)(e.provider).length>0||(0,o.mq)(e.provider)||(0,o.gb)(e.provider)),modelAliases:c,cloudEnabled:h,onDnsChange:e=>x(s=>({...s,dnsStatus:e.dnsStatus??s.dnsStatus}))},e))})]})}},27943:(e,s,t)=>{Promise.resolve().then(t.bind(t,23879))}},e=>{e.O(0,[2574,3862,3745,9802,620,5497,6069,8441,3794,7358],()=>e(e.s=27943)),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3471],{52424:(e,t,s)=>{Promise.resolve().then(s.bind(s,64561))},64561:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>p});var a=s(95155),r=s(12115),o=s(73321),l=s(35497),i=s(81127),n=s(21931),d=s(1620),c=s(31474),m=s(90620),x=s(93308),u=s(38202);function p(){let e=(0,o.useRouter)(),{theme:t,setTheme:s,isDark:p}=(0,d.D)(),[h,b]=(0,r.useState)("en"),[g,y]=(0,r.useState)(!1),[f,j]=(0,r.useState)(!1),[N,w]=(0,r.useState)(!1),[v,C]=(0,r.useState)({fallbackStrategy:"fill-first"}),[k,S]=(0,r.useState)(!0),[P,O]=(0,r.useState)({current:"",new:"",confirm:""}),[I,L]=(0,r.useState)({type:"",message:""}),[T,R]=(0,r.useState)(!1),[D,U]=(0,r.useState)(!1),[M,A]=(0,r.useState)({type:"",message:""}),[E,$]=(0,r.useState)({authMode:"password",oidcIssuerUrl:"",oidcClientId:"",oidcScopes:"openid profile email",oidcLoginLabel:"Sign in with OIDC"}),[q,F]=(0,r.useState)(""),[J,H]=(0,r.useState)({type:"",message:""}),[_,W]=(0,r.useState)(!1),[z,B]=(0,r.useState)(!1),[Z,K]=(0,r.useState)({type:"",message:""}),[Q,V]=(0,r.useState)("/api/auth/oidc/callback"),[G,Y]=(0,r.useState)(!1),X=(0,r.useRef)(null),[ee,et]=(0,r.useState)({outboundProxyEnabled:!1,outboundProxyUrl:"",outboundNoProxy:""}),[es,ea]=(0,r.useState)({type:"",message:""}),[er,eo]=(0,r.useState)(!1),[el,ei]=(0,r.useState)(!1);(0,r.useEffect)(()=>{b(function(){if("u"<typeof document)return"en";let e=document.cookie.split(";").find(e=>e.trim().startsWith(`${x.CL}=`)),t=e?decodeURIComponent(e.split("=")[1]):"en";return(0,x.QC)(t)}())},[g]),(0,r.useEffect)(()=>{fetch("/api/settings").then(e=>e.json()).then(e=>{C(e),$({authMode:e?.authMode||"password",oidcIssuerUrl:e?.oidcIssuerUrl||"",oidcClientId:e?.oidcClientId||"",oidcScopes:e?.oidcScopes||"openid profile email",oidcLoginLabel:e?.oidcLoginLabel||"Sign in with OIDC"}),F(""),(e?.authMode==="oidc"||e?.authMode==="both")&&Y(!0),et({outboundProxyEnabled:e?.outboundProxyEnabled===!0,outboundProxyUrl:e?.outboundProxyUrl||"",outboundNoProxy:e?.outboundNoProxy||""}),S(!1)}).catch(e=>{console.error("Failed to fetch settings:",e),S(!1)})},[]),(0,r.useEffect)(()=>{V(`${window.location.origin}/api/auth/oidc/callback`)},[]);let en=async e=>{if(e.preventDefault(),!0===v.outboundProxyEnabled){eo(!0),ea({type:"",message:""});try{let e=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({outboundProxyUrl:ee.outboundProxyUrl,outboundNoProxy:ee.outboundNoProxy})}),t=await e.json();e.ok?(C(e=>({...e,...t})),ea({type:"success",message:"Proxy settings applied"})):ea({type:"error",message:t.error||"Failed to update proxy settings"})}catch(e){ea({type:"error",message:"An error occurred"})}finally{eo(!1)}}},ed=async()=>{if(!0!==v.outboundProxyEnabled)return;let e=(ee.outboundProxyUrl||"").trim();if(!e)return void ea({type:"error",message:"Please enter a Proxy URL to test"});ei(!0),ea({type:"",message:""});try{let t=await fetch("/api/settings/proxy-test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyUrl:e})}),s=await t.json();t.ok&&s?.ok?ea({type:"success",message:`Proxy test OK (${s.status}) in ${s.elapsedMs}ms`}):ea({type:"error",message:s?.error||"Proxy test failed"})}catch(e){ea({type:"error",message:"An error occurred"})}finally{ei(!1)}},ec=async e=>{eo(!0),ea({type:"",message:""});try{let t=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({outboundProxyEnabled:e})}),s=await t.json();t.ok?(C(e=>({...e,...s})),et(e=>({...e,outboundProxyEnabled:s?.outboundProxyEnabled===!0})),ea({type:"success",message:e?"Proxy enabled":"Proxy disabled"})):ea({type:"error",message:s.error||"Failed to update proxy settings"})}catch(e){ea({type:"error",message:"An error occurred"})}finally{eo(!1)}},em=async e=>{if(e.preventDefault(),P.new!==P.confirm)return void L({type:"error",message:"Passwords do not match"});R(!0),L({type:"",message:""});try{let e=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({currentPassword:P.current,newPassword:P.new})}),t=await e.json();e.ok?(L({type:"success",message:"Password updated successfully"}),O({current:"",new:"",confirm:""})):L({type:"error",message:t.error||"Failed to update password"})}catch(e){L({type:"error",message:"An error occurred"})}finally{R(!1)}},ex=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({fallbackStrategy:e})})).ok&&C(t=>({...t,fallbackStrategy:e}))}catch(e){console.error("Failed to update settings:",e)}},eu=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({responseCacheEnabled:e})})).ok&&C(t=>({...t,responseCacheEnabled:e}))}catch(e){console.error("Failed to update settings:",e)}},ep=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&C(t=>({...t,...e}))}catch(e){console.error("Failed to update alert settings:",e)}},eh=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStrategy:e})})).ok&&C(t=>({...t,comboStrategy:e}))}catch(e){console.error("Failed to update combo strategy:",e)}},eb=async e=>{let t=parseInt(e);if(!isNaN(t)&&!(t<1))try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({stickyRoundRobinLimit:t})})).ok&&C(e=>({...e,stickyRoundRobinLimit:t}))}catch(e){console.error("Failed to update sticky limit:",e)}},eg=async e=>{let t=parseInt(e);if(!isNaN(t)&&!(t<1))try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStickyRoundRobinLimit:t})})).ok&&C(e=>({...e,comboStickyRoundRobinLimit:t}))}catch(e){console.error("Failed to update combo sticky limit:",e)}},ey=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({requireLogin:e})})).ok&&C(t=>({...t,requireLogin:e}))}catch(e){console.error("Failed to update require login:",e)}},ef=(e,t)=>{$(s=>({...s,[e]:t}))},ej=async(e=E.authMode||"password")=>{let t=E.oidcIssuerUrl.trim(),s=E.oidcClientId.trim(),a=E.oidcScopes.trim(),r=E.oidcLoginLabel.trim(),o=q.trim();if("password"!==e&&(!t||!s||!o)&&!v.oidcConfigured)return void H({type:"error",message:"Issuer URL, client ID, and client secret are required to enable OIDC."});W(!0),H({type:"",message:""}),K({type:"",message:""});try{let l={authMode:e,oidcIssuerUrl:t,oidcClientId:s,oidcScopes:a||"openid profile email",oidcLoginLabel:r||"Sign in with OIDC"};o&&(l.oidcClientSecret=o);let i=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)}),n=await i.json();i.ok?(C(e=>({...e,...n})),$({authMode:n?.authMode||e,oidcIssuerUrl:n?.oidcIssuerUrl||t,oidcClientId:n?.oidcClientId||s,oidcScopes:n?.oidcScopes||a||"openid profile email",oidcLoginLabel:n?.oidcLoginLabel||r||"Sign in with OIDC"}),F(""),H({type:"success",message:"oidc"===e?"OIDC login enabled":"both"===e?"Password and OIDC login enabled":"OIDC settings saved"})):H({type:"error",message:n.error||"Failed to save OIDC settings"})}catch(e){H({type:"error",message:"An error occurred"})}finally{W(!1)}},eN=async()=>{let e=E.oidcIssuerUrl.trim(),t=E.oidcClientId.trim(),s=E.oidcScopes.trim(),a=q.trim();if(!e||!t)return void K({type:"error",message:"Issuer URL and client ID are required to test the connection."});B(!0),H({type:"",message:""}),K({type:"",message:""});try{let r=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({authMode:E.authMode||v.authMode||"password",oidcIssuerUrl:e,oidcClientId:t,oidcScopes:s||"openid profile email",oidcLoginLabel:E.oidcLoginLabel.trim()||"Sign in with OIDC",...a?{oidcClientSecret:a}:{}})}),o=await r.json().catch(()=>({}));if(!r.ok)return void K({type:"error",message:o.error||"Failed to save OIDC settings before testing"});let l=await fetch("/api/auth/oidc/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({issuerUrl:o.oidcIssuerUrl||e,clientId:o.oidcClientId||t,scopes:o.oidcScopes||s||"openid profile email"})}),i=await l.json().catch(()=>({}));if(l.ok&&i?.ok){let e=i.clientSecretTested?!0===i.clientSecretValid?`Connection OK. Discovery loaded from ${i.issuerUrl}. Client secret validated too.`:`Connection OK. Discovery loaded from ${i.issuerUrl}. Client secret was not checked.`:`Connection OK. Discovery loaded from ${i.issuerUrl}.`;K({type:"success",message:e})}else K({type:"error",message:i.error||"OIDC connection test failed"})}catch(e){K({type:"error",message:"An error occurred"})}finally{B(!1)}},ew=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({enableObservability:e})})).ok&&C(t=>({...t,enableObservability:e}))}catch(e){console.error("Failed to update enableObservability:",e)}},ev=async()=>{try{let e=await fetch("/api/settings");if(!e.ok)return;let t=await e.json();C(t)}catch(e){console.error("Failed to reload settings:",e)}},eC=async()=>{U(!0),A({type:"",message:""});try{let e=await fetch("/api/settings/database");if(!e.ok){let t=await e.json().catch(()=>({}));throw Error(t.error||"Failed to export database")}let t=await e.json(),s=JSON.stringify(t),a=new Blob([s],{type:"application/json"}),r=URL.createObjectURL(a),o=document.createElement("a"),l=new Date().toISOString().replace(/[.:]/g,"-");o.href=r,o.download=`zevairouter-backup-${l}.json`,document.body.appendChild(o),o.click(),document.body.removeChild(o),URL.revokeObjectURL(r);let i=(a.size/1048576).toFixed(2),n=Array.isArray(t?.excludedTables)&&t.excludedTables.length?` (config only — skipped ${t.excludedTables.join(", ")})`:"";A({type:"success",message:`Database backup downloaded (${i} MB)${n}`})}catch(e){A({type:"error",message:e.message||"Failed to export database"})}finally{U(!1)}},ek=async e=>{let t=e.target.files?.[0];if(t){U(!0),A({type:"",message:""});try{let e=await t.text(),s=JSON.parse(e),a=await fetch("/api/settings/database",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)}),r=await a.json().catch(()=>({}));if(!a.ok)throw Error(r.error||"Failed to import database");await ev(),A({type:"success",message:"Database imported successfully"})}catch(e){A({type:"error",message:e.message||"Invalid backup file"})}finally{X.current&&(X.current.value=""),U(!1)}}},eS=!0===v.enableObservability,eP=async()=>{w(!0);try{await fetch("/api/version/shutdown",{method:"POST"})}catch(e){}w(!1),j(!1)},eO=async()=>{try{(await fetch("/api/auth/logout",{method:"POST"})).ok&&(e.push("/login"),e.refresh())}catch(e){console.error("Failed to logout:",e)}};return(0,a.jsxs)("div",{className:"max-w-2xl mx-auto px-4 sm:px-0",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsxs)(l.Zp,{children:[(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 mb-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 sm:gap-4",children:[(0,a.jsx)("div",{className:"size-10 sm:size-12 rounded-lg bg-green-500/10 text-green-500 flex items-center justify-center shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-xl sm:text-2xl",children:"computer"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-lg sm:text-xl font-semibold",children:"Local Mode"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Running on your machine"})]})]}),(0,a.jsx)("div",{className:"inline-flex p-1 rounded-lg bg-black/5 dark:bg-white/5 w-full sm:w-auto",children:["light","dark","system"].map(e=>(0,a.jsxs)("button",{type:"button",onClick:()=>s(e),className:(0,c.cn)("flex items-center justify-center gap-1 sm:gap-1.5 px-2 sm:px-3 py-1.5 rounded-md font-medium transition-all flex-1 sm:flex-initial",t===e?"bg-white dark:bg-white/10 text-text-main shadow-sm":"text-text-muted hover:text-text-main"),children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"light"===e?"light_mode":"dark"===e?"dark_mode":"contrast"}),(0,a.jsx)("span",{className:"capitalize text-xs sm:text-sm",children:e})]},e))})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 pt-4 border-t border-border",children:[(0,a.jsx)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between p-3 rounded-lg bg-bg border border-border gap-2",children:(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Database Location"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted font-mono break-all",children:"~/.zevai/db/data.sqlite"})]})}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2",children:[(0,a.jsx)(l.$n,{variant:"secondary",icon:"download",onClick:eC,loading:D,className:"w-full sm:w-auto",children:"Download Backup"}),(0,a.jsx)(l.$n,{variant:"outline",icon:"upload",onClick:()=>X.current?.click(),disabled:D,className:"w-full sm:w-auto",children:"Import Backup"}),(0,a.jsx)("input",{ref:X,type:"file",accept:"application/json,.json",className:"hidden",onChange:ek})]}),M.message&&(0,a.jsx)("p",{className:`text-sm ${"error"===M.type?"text-red-500":"text-green-600 dark:text-green-400"}`,children:M.message})]})]}),(0,a.jsxs)(l.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"size-10 rounded-lg bg-blue-500/10 text-blue-500 flex items-center justify-center shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"language"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Language"})]}),(0,a.jsxs)("button",{onClick:()=>y(!0),className:"flex items-center justify-between w-full p-3 rounded-lg bg-bg border border-border hover:border-primary/50 transition-colors","data-i18n-skip":"true",children:[(0,a.jsx)("span",{className:"text-sm text-text-muted",children:"Display language"}),(0,a.jsx)("span",{className:"text-2xl",children:u.h[h]||"\uD83C\uDF10"})]})]}),(0,a.jsxs)(l.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-primary/10 text-primary shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"shield"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Security"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Require login"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"When ON, dashboard requires password. When OFF, access without login."})]}),(0,a.jsx)(l.lM,{checked:!0===v.requireLogin,onChange:()=>ey(!v.requireLogin),disabled:k})]}),!0===v.requireLogin&&(0,a.jsxs)("form",{onSubmit:em,className:"flex flex-col gap-4 pt-4 border-t border-border/50",children:[v.hasPassword&&(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-xs sm:text-sm font-medium",children:"Current Password"}),(0,a.jsx)(l.pd,{type:"password",placeholder:"Enter current password",value:P.current,onChange:e=>O({...P,current:e.target.value}),required:!0})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-xs sm:text-sm font-medium",children:"New Password"}),(0,a.jsx)(l.pd,{type:"password",placeholder:"Enter new password",value:P.new,onChange:e=>O({...P,new:e.target.value}),required:!0})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-xs sm:text-sm font-medium",children:"Confirm New Password"}),(0,a.jsx)(l.pd,{type:"password",placeholder:"Confirm new password",value:P.confirm,onChange:e=>O({...P,confirm:e.target.value}),required:!0})]})]}),I.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===I.type?"text-red-500":"text-green-500"}`,children:I.message}),(0,a.jsx)("div",{className:"pt-2",children:(0,a.jsx)(l.$n,{type:"submit",variant:"primary",loading:T,className:"w-full sm:w-auto",children:v.hasPassword?"Update Password":"Set Password"})})]})]})]}),(0,a.jsxs)(l.Zp,{children:[(0,a.jsxs)("button",{type:"button",onClick:()=>Y(e=>!e),className:"w-full flex items-center gap-3 text-left",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-indigo-500/10 text-indigo-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"lock_open"})}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"OIDC Dashboard Login"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"oidc"===v.authMode?"OIDC active":"both"===v.authMode?"Password + OIDC active":"Optional SSO via Authentik/Keycloak/Google"})]}),(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted shrink-0",children:G?"expand_less":"expand_more"})]}),G&&(0,a.jsxs)("div",{className:"flex flex-col gap-4 mt-4",children:[(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Use Authentik or any OIDC provider to sign in to the dashboard. You can enable password-only, OIDC-only, or both for the dashboard; model API access still uses API keys."}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Auth Mode"}),(0,a.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-2",children:[{value:"password",title:"Password only",desc:"Keep the legacy password login."},{value:"oidc",title:"OIDC only",desc:"Require OIDC for dashboard access."},{value:"both",title:"Both",desc:"Allow either password or OIDC."}].map(e=>{let t=E.authMode===e.value;return(0,a.jsxs)("button",{type:"button",onClick:()=>ef("authMode",e.value),className:(0,c.cn)("text-left rounded-lg border p-3 transition-colors",t?"border-primary bg-primary/5":"border-border bg-bg hover:bg-black/5 dark:hover:bg-white/5"),disabled:k||_,children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:e.title}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted mt-1",children:e.desc})]},e.value)})})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Issuer URL"}),(0,a.jsx)(l.pd,{placeholder:"https://auth.example.com/application/o/zevairouter/",value:E.oidcIssuerUrl,onChange:e=>ef("oidcIssuerUrl",e.target.value),disabled:k||_})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Client ID"}),(0,a.jsx)(l.pd,{placeholder:"zevairouter-dashboard",value:E.oidcClientId,onChange:e=>ef("oidcClientId",e.target.value),disabled:k||_})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Client Secret"}),(0,a.jsx)(l.pd,{type:"password",placeholder:"Leave blank to keep existing secret",value:q,onChange:e=>F(e.target.value),disabled:k||_}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"This value is write-only after saving."})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Scopes"}),(0,a.jsx)(l.pd,{placeholder:"openid profile email",value:E.oidcScopes,onChange:e=>ef("oidcScopes",e.target.value),disabled:k||_})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Login Button Label"}),(0,a.jsx)(l.pd,{placeholder:"Sign in with OIDC",value:E.oidcLoginLabel,onChange:e=>ef("oidcLoginLabel",e.target.value),disabled:k||_})]})]}),(0,a.jsxs)("div",{className:"rounded-lg border border-border bg-bg p-3 text-xs sm:text-sm text-text-muted",children:[(0,a.jsx)("p",{className:"font-medium text-text-main mb-1",children:"Redirect URI"}),(0,a.jsx)("code",{className:"block break-all font-mono",children:Q})]}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2 pt-2 border-t border-border/50",children:[(0,a.jsx)(l.$n,{type:"button",variant:"primary",loading:_,onClick:()=>ej(),className:"w-full sm:w-auto",children:"Save auth mode"}),(0,a.jsx)(l.$n,{type:"button",variant:"outline",loading:z,onClick:eN,className:"w-full sm:w-auto",children:"Test connection"})]}),Z.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===Z.type?"text-red-500":"text-green-500"}`,children:Z.message}),J.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===J.type?"text-red-500":"text-green-500"}`,children:J.message}),"oidc"===v.authMode&&(0,a.jsx)("p",{className:"text-xs sm:text-sm text-amber-600 dark:text-amber-400",children:"OIDC login is currently active. Password login is disabled until you switch back."}),"both"===v.authMode&&(0,a.jsx)("p",{className:"text-xs sm:text-sm text-amber-600 dark:text-amber-400",children:"Password and OIDC login are both active."})]})]}),(0,a.jsxs)(l.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-blue-500/10 text-blue-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"route"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Routing Strategy"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Round Robin"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Cycle through accounts to distribute load"})]}),(0,a.jsx)(l.lM,{checked:"round-robin"===v.fallbackStrategy,onChange:()=>ex("round-robin"===v.fallbackStrategy?"fill-first":"round-robin"),disabled:k})]}),"round-robin"===v.fallbackStrategy&&(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4 pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Sticky Limit"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Calls per account before switching"})]}),(0,a.jsx)(l.pd,{type:"number",min:"1",max:"10",value:v.stickyRoundRobinLimit||3,onChange:e=>eb(e.target.value),disabled:k,className:"w-16 sm:w-20 text-center shrink-0"})]}),(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4 pt-4 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Most Quota"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Pick the account with the most remaining quota (uses cached usage)"})]}),(0,a.jsx)(l.lM,{checked:"most-quota"===v.fallbackStrategy,onChange:()=>ex("most-quota"===v.fallbackStrategy?"fill-first":"most-quota"),disabled:k})]}),(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4 pt-4 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Lowest Latency"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Route to the fastest account by recent avg response time"})]}),(0,a.jsx)(l.lM,{checked:"lowest-latency"===v.fallbackStrategy,onChange:()=>ex("lowest-latency"===v.fallbackStrategy?"fill-first":"lowest-latency"),disabled:k})]}),(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4 pt-4 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Response Cache"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Serve identical non-streaming requests from memory (saves cost)"})]}),(0,a.jsx)(l.lM,{checked:!1!==v.responseCacheEnabled,onChange:()=>eu(!1===v.responseCacheEnabled),disabled:k})]}),(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4 pt-4 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Webhook Alerts"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Notify on provider down / quota exhausted (Discord, Telegram, or generic webhook)"})]}),(0,a.jsx)(l.lM,{checked:!0===v.alertEnabled,onChange:()=>ep({alertEnabled:!0!==v.alertEnabled}),disabled:k})]}),!0===v.alertEnabled&&(0,a.jsxs)("div",{className:"flex flex-col gap-3 pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-xs text-text-muted block mb-1",children:"Webhook URL"}),(0,a.jsx)(l.pd,{type:"url",placeholder:"https://discord.com/api/webhooks/… or https://api.telegram.org/bot<token>/sendMessage",defaultValue:v.alertWebhookUrl||"",onBlur:e=>ep({alertWebhookUrl:e.target.value.trim()}),disabled:k})]}),(0,a.jsxs)("div",{className:"flex gap-3",children:[(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("label",{className:"text-xs text-text-muted block mb-1",children:"Type"}),(0,a.jsxs)("select",{defaultValue:v.alertWebhookType||"discord",onChange:e=>ep({alertWebhookType:e.target.value}),disabled:k,className:"w-full px-2 py-1.5 text-sm bg-transparent border border-border rounded",children:[(0,a.jsx)("option",{value:"discord",children:"Discord"}),(0,a.jsx)("option",{value:"telegram",children:"Telegram"}),(0,a.jsx)("option",{value:"generic",children:"Generic JSON"})]})]}),"telegram"===v.alertWebhookType&&(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("label",{className:"text-xs text-text-muted block mb-1",children:"Telegram Chat ID"}),(0,a.jsx)(l.pd,{type:"text",placeholder:"-1001234567890",defaultValue:v.alertTelegramChatId||"",onBlur:e=>ep({alertTelegramChatId:e.target.value.trim()}),disabled:k})]})]})]}),(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4 pt-4 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Combo Round Robin"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Cycle through providers in combos instead of always starting with first"})]}),(0,a.jsx)(l.lM,{checked:"round-robin"===v.comboStrategy,onChange:()=>eh("round-robin"===v.comboStrategy?"fallback":"round-robin"),disabled:k})]}),"round-robin"===v.comboStrategy&&(0,a.jsxs)("div",{className:"flex items-center justify-between pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:"Combo Sticky Limit"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Calls per combo model before switching"})]}),(0,a.jsx)(l.pd,{type:"number",min:"1",max:"100",value:v.comboStickyRoundRobinLimit||1,onChange:e=>eg(e.target.value),disabled:k,className:"w-20 text-center"})]}),(0,a.jsxs)("p",{className:"text-xs text-text-muted italic pt-2 border-t border-border/50",children:["round-robin"===v.fallbackStrategy?`Currently distributing requests across all available accounts with ${v.stickyRoundRobinLimit||3} calls per account.`:"most-quota"===v.fallbackStrategy?"Currently routing to the account with the most remaining quota.":"lowest-latency"===v.fallbackStrategy?"Currently routing to the fastest account by recent avg latency.":"Currently using accounts in priority order (Fill First).","round-robin"===v.comboStrategy?` Combos rotate after ${v.comboStickyRoundRobinLimit||1} call${1===(v.comboStickyRoundRobinLimit||1)?"":"s"} per model.`:" Combos always start with their first model."]})]})]}),(0,a.jsxs)(l.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-purple-500/10 text-purple-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"wifi"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Network"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Outbound Proxy"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Enable proxy for OAuth + provider outbound requests."})]}),(0,a.jsx)(l.lM,{checked:!0===v.outboundProxyEnabled,onChange:()=>ec(!0!==v.outboundProxyEnabled),disabled:k||er})]}),!0===v.outboundProxyEnabled&&(0,a.jsxs)("form",{onSubmit:en,className:"flex flex-col gap-4 pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Proxy URL"}),(0,a.jsx)(l.pd,{placeholder:"http://127.0.0.1:7897",value:ee.outboundProxyUrl,onChange:e=>et(t=>({...t,outboundProxyUrl:e.target.value})),disabled:k||er}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Leave empty to inherit existing env proxy (if any)."})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2 pt-2 border-t border-border/50",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"No Proxy"}),(0,a.jsx)(l.pd,{placeholder:"localhost,127.0.0.1",value:ee.outboundNoProxy,onChange:e=>et(t=>({...t,outboundNoProxy:e.target.value})),disabled:k||er}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Comma-separated hostnames/domains to bypass the proxy."})]}),(0,a.jsxs)("div",{className:"pt-2 border-t border-border/50 flex flex-col sm:flex-row items-stretch sm:items-center gap-2",children:[(0,a.jsx)(l.$n,{type:"button",variant:"secondary",loading:el,disabled:k||er,onClick:ed,className:"w-full sm:w-auto",children:"Test proxy URL"}),(0,a.jsx)(l.$n,{type:"submit",variant:"primary",loading:er,className:"w-full sm:w-auto",children:"Apply"})]})]}),es.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===es.type?"text-red-500":"text-green-500"} pt-2 border-t border-border/50`,children:es.message})]})]}),(0,a.jsxs)(l.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-orange-500/10 text-orange-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"monitoring"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Observability"})]}),(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Enable Observability"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Record request details for inspection in the logs view"})]}),(0,a.jsx)(l.lM,{checked:eS,onChange:ew,disabled:k})]})]}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2",children:[(0,a.jsx)(l.$n,{variant:"outline",fullWidth:!0,icon:"power_settings_new",onClick:()=>j(!0),className:"text-red-500 border-red-200 hover:bg-red-50 hover:border-red-300",children:"Shutdown"}),(0,a.jsx)(l.$n,{variant:"outline",fullWidth:!0,icon:"logout",onClick:eO,children:"Logout"})]}),(0,a.jsxs)("div",{className:"text-center text-xs sm:text-sm text-text-muted py-4",children:[(0,a.jsxs)("p",{children:[m.vQ.name," v",m.vQ.version]}),(0,a.jsx)("p",{className:"mt-1",children:"Local Mode - All data stored on your machine"})]})]}),(0,a.jsx)(n.default,{hideTrigger:!0,isOpen:g,onClose:e=>{y(!1),b(e)}}),(0,a.jsx)(i.ConfirmModal,{isOpen:f,onClose:()=>j(!1),onConfirm:eP,title:"Close Proxy",message:"Are you sure you want to close the proxy server?",confirmText:"Close",cancelText:"Cancel",variant:"danger",loading:N})]})}}},e=>{e.O(0,[2574,3862,3745,9802,620,5497,8441,3794,7358],()=>e(e.s=52424)),_N_E=e.O()}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3471],{52424:(e,t,s)=>{Promise.resolve().then(s.bind(s,64561))},64561:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>p});var a=s(95155),r=s(12115),o=s(73321),l=s(35497),i=s(81127),n=s(21931),d=s(1620),c=s(31474),m=s(90620),x=s(93308),u=s(38202);function p(){let e=(0,o.useRouter)(),{theme:t,setTheme:s,isDark:p}=(0,d.D)(),[h,b]=(0,r.useState)("en"),[g,y]=(0,r.useState)(!1),[f,j]=(0,r.useState)(!1),[N,w]=(0,r.useState)(!1),[v,C]=(0,r.useState)({fallbackStrategy:"fill-first"}),[k,S]=(0,r.useState)(!0),[P,O]=(0,r.useState)({current:"",new:"",confirm:""}),[I,L]=(0,r.useState)({type:"",message:""}),[T,R]=(0,r.useState)(!1),[D,U]=(0,r.useState)(!1),[M,A]=(0,r.useState)({type:"",message:""}),[E,$]=(0,r.useState)({authMode:"password",oidcIssuerUrl:"",oidcClientId:"",oidcScopes:"openid profile email",oidcLoginLabel:"Sign in with OIDC"}),[q,F]=(0,r.useState)(""),[J,H]=(0,r.useState)({type:"",message:""}),[_,W]=(0,r.useState)(!1),[z,B]=(0,r.useState)(!1),[Z,K]=(0,r.useState)({type:"",message:""}),[Q,V]=(0,r.useState)("/api/auth/oidc/callback"),[G,Y]=(0,r.useState)(!1),X=(0,r.useRef)(null),[ee,et]=(0,r.useState)({outboundProxyEnabled:!1,outboundProxyUrl:"",outboundNoProxy:""}),[es,ea]=(0,r.useState)({type:"",message:""}),[er,eo]=(0,r.useState)(!1),[el,ei]=(0,r.useState)(!1);(0,r.useEffect)(()=>{b(function(){if("u"<typeof document)return"en";let e=document.cookie.split(";").find(e=>e.trim().startsWith(`${x.CL}=`)),t=e?decodeURIComponent(e.split("=")[1]):"en";return(0,x.QC)(t)}())},[g]),(0,r.useEffect)(()=>{fetch("/api/settings").then(e=>e.json()).then(e=>{C(e),$({authMode:e?.authMode||"password",oidcIssuerUrl:e?.oidcIssuerUrl||"",oidcClientId:e?.oidcClientId||"",oidcScopes:e?.oidcScopes||"openid profile email",oidcLoginLabel:e?.oidcLoginLabel||"Sign in with OIDC"}),F(""),(e?.authMode==="oidc"||e?.authMode==="both")&&Y(!0),et({outboundProxyEnabled:e?.outboundProxyEnabled===!0,outboundProxyUrl:e?.outboundProxyUrl||"",outboundNoProxy:e?.outboundNoProxy||""}),S(!1)}).catch(e=>{console.error("Failed to fetch settings:",e),S(!1)})},[]),(0,r.useEffect)(()=>{V(`${window.location.origin}/api/auth/oidc/callback`)},[]);let en=async e=>{if(e.preventDefault(),!0===v.outboundProxyEnabled){eo(!0),ea({type:"",message:""});try{let e=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({outboundProxyUrl:ee.outboundProxyUrl,outboundNoProxy:ee.outboundNoProxy})}),t=await e.json();e.ok?(C(e=>({...e,...t})),ea({type:"success",message:"Proxy settings applied"})):ea({type:"error",message:t.error||"Failed to update proxy settings"})}catch(e){ea({type:"error",message:"An error occurred"})}finally{eo(!1)}}},ed=async()=>{if(!0!==v.outboundProxyEnabled)return;let e=(ee.outboundProxyUrl||"").trim();if(!e)return void ea({type:"error",message:"Please enter a Proxy URL to test"});ei(!0),ea({type:"",message:""});try{let t=await fetch("/api/settings/proxy-test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyUrl:e})}),s=await t.json();t.ok&&s?.ok?ea({type:"success",message:`Proxy test OK (${s.status}) in ${s.elapsedMs}ms`}):ea({type:"error",message:s?.error||"Proxy test failed"})}catch(e){ea({type:"error",message:"An error occurred"})}finally{ei(!1)}},ec=async e=>{eo(!0),ea({type:"",message:""});try{let t=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({outboundProxyEnabled:e})}),s=await t.json();t.ok?(C(e=>({...e,...s})),et(e=>({...e,outboundProxyEnabled:s?.outboundProxyEnabled===!0})),ea({type:"success",message:e?"Proxy enabled":"Proxy disabled"})):ea({type:"error",message:s.error||"Failed to update proxy settings"})}catch(e){ea({type:"error",message:"An error occurred"})}finally{eo(!1)}},em=async e=>{if(e.preventDefault(),P.new!==P.confirm)return void L({type:"error",message:"Passwords do not match"});R(!0),L({type:"",message:""});try{let e=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({currentPassword:P.current,newPassword:P.new})}),t=await e.json();e.ok?(L({type:"success",message:"Password updated successfully"}),O({current:"",new:"",confirm:""})):L({type:"error",message:t.error||"Failed to update password"})}catch(e){L({type:"error",message:"An error occurred"})}finally{R(!1)}},ex=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({fallbackStrategy:e})})).ok&&C(t=>({...t,fallbackStrategy:e}))}catch(e){console.error("Failed to update settings:",e)}},eu=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({responseCacheEnabled:e})})).ok&&C(t=>({...t,responseCacheEnabled:e}))}catch(e){console.error("Failed to update settings:",e)}},ep=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&C(t=>({...t,...e}))}catch(e){console.error("Failed to update alert settings:",e)}},eh=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStrategy:e})})).ok&&C(t=>({...t,comboStrategy:e}))}catch(e){console.error("Failed to update combo strategy:",e)}},eb=async e=>{let t=parseInt(e);if(!isNaN(t)&&!(t<1))try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({stickyRoundRobinLimit:t})})).ok&&C(e=>({...e,stickyRoundRobinLimit:t}))}catch(e){console.error("Failed to update sticky limit:",e)}},eg=async e=>{let t=parseInt(e);if(!isNaN(t)&&!(t<1))try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStickyRoundRobinLimit:t})})).ok&&C(e=>({...e,comboStickyRoundRobinLimit:t}))}catch(e){console.error("Failed to update combo sticky limit:",e)}},ey=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({requireLogin:e})})).ok&&C(t=>({...t,requireLogin:e}))}catch(e){console.error("Failed to update require login:",e)}},ef=(e,t)=>{$(s=>({...s,[e]:t}))},ej=async(e=E.authMode||"password")=>{let t=E.oidcIssuerUrl.trim(),s=E.oidcClientId.trim(),a=E.oidcScopes.trim(),r=E.oidcLoginLabel.trim(),o=q.trim();if("password"!==e&&(!t||!s||!o)&&!v.oidcConfigured)return void H({type:"error",message:"Issuer URL, client ID, and client secret are required to enable OIDC."});W(!0),H({type:"",message:""}),K({type:"",message:""});try{let l={authMode:e,oidcIssuerUrl:t,oidcClientId:s,oidcScopes:a||"openid profile email",oidcLoginLabel:r||"Sign in with OIDC"};o&&(l.oidcClientSecret=o);let i=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)}),n=await i.json();i.ok?(C(e=>({...e,...n})),$({authMode:n?.authMode||e,oidcIssuerUrl:n?.oidcIssuerUrl||t,oidcClientId:n?.oidcClientId||s,oidcScopes:n?.oidcScopes||a||"openid profile email",oidcLoginLabel:n?.oidcLoginLabel||r||"Sign in with OIDC"}),F(""),H({type:"success",message:"oidc"===e?"OIDC login enabled":"both"===e?"Password and OIDC login enabled":"OIDC settings saved"})):H({type:"error",message:n.error||"Failed to save OIDC settings"})}catch(e){H({type:"error",message:"An error occurred"})}finally{W(!1)}},eN=async()=>{let e=E.oidcIssuerUrl.trim(),t=E.oidcClientId.trim(),s=E.oidcScopes.trim(),a=q.trim();if(!e||!t)return void K({type:"error",message:"Issuer URL and client ID are required to test the connection."});B(!0),H({type:"",message:""}),K({type:"",message:""});try{let r=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({authMode:E.authMode||v.authMode||"password",oidcIssuerUrl:e,oidcClientId:t,oidcScopes:s||"openid profile email",oidcLoginLabel:E.oidcLoginLabel.trim()||"Sign in with OIDC",...a?{oidcClientSecret:a}:{}})}),o=await r.json().catch(()=>({}));if(!r.ok)return void K({type:"error",message:o.error||"Failed to save OIDC settings before testing"});let l=await fetch("/api/auth/oidc/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({issuerUrl:o.oidcIssuerUrl||e,clientId:o.oidcClientId||t,scopes:o.oidcScopes||s||"openid profile email"})}),i=await l.json().catch(()=>({}));if(l.ok&&i?.ok){let e=i.clientSecretTested?!0===i.clientSecretValid?`Connection OK. Discovery loaded from ${i.issuerUrl}. Client secret validated too.`:`Connection OK. Discovery loaded from ${i.issuerUrl}. Client secret was not checked.`:`Connection OK. Discovery loaded from ${i.issuerUrl}.`;K({type:"success",message:e})}else K({type:"error",message:i.error||"OIDC connection test failed"})}catch(e){K({type:"error",message:"An error occurred"})}finally{B(!1)}},ew=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({enableObservability:e})})).ok&&C(t=>({...t,enableObservability:e}))}catch(e){console.error("Failed to update enableObservability:",e)}},ev=async()=>{try{let e=await fetch("/api/settings");if(!e.ok)return;let t=await e.json();C(t)}catch(e){console.error("Failed to reload settings:",e)}},eC=async()=>{U(!0),A({type:"",message:""});try{let e=await fetch("/api/settings/database");if(!e.ok){let t=await e.json().catch(()=>({}));throw Error(t.error||"Failed to export database")}let t=await e.json(),s=JSON.stringify(t),a=new Blob([s],{type:"application/json"}),r=URL.createObjectURL(a),o=document.createElement("a"),l=new Date().toISOString().replace(/[.:]/g,"-");o.href=r,o.download=`zevairouter-backup-${l}.json`,document.body.appendChild(o),o.click(),document.body.removeChild(o),URL.revokeObjectURL(r);let i=(a.size/1048576).toFixed(2),n=Array.isArray(t?.excludedTables)&&t.excludedTables.length?` (config only — skipped ${t.excludedTables.join(", ")})`:"";A({type:"success",message:`Database backup downloaded (${i} MB)${n}`})}catch(e){A({type:"error",message:e.message||"Failed to export database"})}finally{U(!1)}},ek=async e=>{let t=e.target.files?.[0];if(t){U(!0),A({type:"",message:""});try{let e=await t.text(),s=JSON.parse(e),a=await fetch("/api/settings/database",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)}),r=await a.json().catch(()=>({}));if(!a.ok)throw Error(r.error||"Failed to import database");await ev(),A({type:"success",message:"Database imported successfully"})}catch(e){A({type:"error",message:e.message||"Invalid backup file"})}finally{X.current&&(X.current.value=""),U(!1)}}},eS=!0===v.enableObservability,eP=async()=>{w(!0);try{await fetch("/api/version/shutdown",{method:"POST"})}catch(e){}w(!1),j(!1)},eO=async()=>{try{(await fetch("/api/auth/logout",{method:"POST"})).ok&&(e.push("/login"),e.refresh())}catch(e){console.error("Failed to logout:",e)}};return(0,a.jsxs)("div",{className:"max-w-2xl mx-auto px-4 sm:px-0",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsxs)(l.Zp,{children:[(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 mb-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 sm:gap-4",children:[(0,a.jsx)("div",{className:"size-10 sm:size-12 rounded-lg bg-green-500/10 text-green-500 flex items-center justify-center shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-xl sm:text-2xl",children:"computer"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-lg sm:text-xl font-semibold",children:"Local Mode"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Running on your machine"})]})]}),(0,a.jsx)("div",{className:"inline-flex p-1 rounded-lg bg-black/5 dark:bg-white/5 w-full sm:w-auto",children:["light","dark","system"].map(e=>(0,a.jsxs)("button",{type:"button",onClick:()=>s(e),className:(0,c.cn)("flex items-center justify-center gap-1 sm:gap-1.5 px-2 sm:px-3 py-1.5 rounded-md font-medium transition-all flex-1 sm:flex-initial",t===e?"bg-white dark:bg-white/10 text-text-main shadow-sm":"text-text-muted hover:text-text-main"),children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"light"===e?"light_mode":"dark"===e?"dark_mode":"contrast"}),(0,a.jsx)("span",{className:"capitalize text-xs sm:text-sm",children:e})]},e))})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 pt-4 border-t border-border",children:[(0,a.jsx)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between p-3 rounded-lg bg-bg border border-border gap-2",children:(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Database Location"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted font-mono break-all",children:"~/.zevai/db/data.sqlite"})]})}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2",children:[(0,a.jsx)(l.$n,{variant:"secondary",icon:"download",onClick:eC,loading:D,className:"w-full sm:w-auto",children:"Download Backup"}),(0,a.jsx)(l.$n,{variant:"outline",icon:"upload",onClick:()=>X.current?.click(),disabled:D,className:"w-full sm:w-auto",children:"Import Backup"}),(0,a.jsx)("input",{ref:X,type:"file",accept:"application/json,.json",className:"hidden",onChange:ek})]}),M.message&&(0,a.jsx)("p",{className:`text-sm ${"error"===M.type?"text-red-500":"text-green-600 dark:text-green-400"}`,children:M.message})]})]}),(0,a.jsxs)(l.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"size-10 rounded-lg bg-blue-500/10 text-blue-500 flex items-center justify-center shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"language"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Language"})]}),(0,a.jsxs)("button",{onClick:()=>y(!0),className:"flex items-center justify-between w-full p-3 rounded-lg bg-bg border border-border hover:border-primary/50 transition-colors","data-i18n-skip":"true",children:[(0,a.jsx)("span",{className:"text-sm text-text-muted",children:"Display language"}),(0,a.jsx)("span",{className:"text-2xl",children:u.h[h]||"\uD83C\uDF10"})]})]}),(0,a.jsxs)(l.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-primary/10 text-primary shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"shield"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Security"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Require login"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"When ON, dashboard requires password. When OFF, access without login."})]}),(0,a.jsx)(l.lM,{checked:!0===v.requireLogin,onChange:()=>ey(!v.requireLogin),disabled:k})]}),!0===v.requireLogin&&(0,a.jsxs)("form",{onSubmit:em,className:"flex flex-col gap-4 pt-4 border-t border-border/50",children:[v.hasPassword&&(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-xs sm:text-sm font-medium",children:"Current Password"}),(0,a.jsx)(l.pd,{type:"password",placeholder:"Enter current password",value:P.current,onChange:e=>O({...P,current:e.target.value}),required:!0})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-xs sm:text-sm font-medium",children:"New Password"}),(0,a.jsx)(l.pd,{type:"password",placeholder:"Enter new password",value:P.new,onChange:e=>O({...P,new:e.target.value}),required:!0})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-xs sm:text-sm font-medium",children:"Confirm New Password"}),(0,a.jsx)(l.pd,{type:"password",placeholder:"Confirm new password",value:P.confirm,onChange:e=>O({...P,confirm:e.target.value}),required:!0})]})]}),I.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===I.type?"text-red-500":"text-green-500"}`,children:I.message}),(0,a.jsx)("div",{className:"pt-2",children:(0,a.jsx)(l.$n,{type:"submit",variant:"primary",loading:T,className:"w-full sm:w-auto",children:v.hasPassword?"Update Password":"Set Password"})})]})]})]}),(0,a.jsxs)(l.Zp,{children:[(0,a.jsxs)("button",{type:"button",onClick:()=>Y(e=>!e),className:"w-full flex items-center gap-3 text-left",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-indigo-500/10 text-indigo-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"lock_open"})}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"OIDC Dashboard Login"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"oidc"===v.authMode?"OIDC active":"both"===v.authMode?"Password + OIDC active":"Optional SSO via Authentik/Keycloak/Google"})]}),(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted shrink-0",children:G?"expand_less":"expand_more"})]}),G&&(0,a.jsxs)("div",{className:"flex flex-col gap-4 mt-4",children:[(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Use Authentik or any OIDC provider to sign in to the dashboard. You can enable password-only, OIDC-only, or both for the dashboard; model API access still uses API keys."}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Auth Mode"}),(0,a.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-2",children:[{value:"password",title:"Password only",desc:"Keep the legacy password login."},{value:"oidc",title:"OIDC only",desc:"Require OIDC for dashboard access."},{value:"both",title:"Both",desc:"Allow either password or OIDC."}].map(e=>{let t=E.authMode===e.value;return(0,a.jsxs)("button",{type:"button",onClick:()=>ef("authMode",e.value),className:(0,c.cn)("text-left rounded-lg border p-3 transition-colors",t?"border-primary bg-primary/5":"border-border bg-bg hover:bg-black/5 dark:hover:bg-white/5"),disabled:k||_,children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:e.title}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted mt-1",children:e.desc})]},e.value)})})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Issuer URL"}),(0,a.jsx)(l.pd,{placeholder:"https://auth.example.com/application/o/zevairouter/",value:E.oidcIssuerUrl,onChange:e=>ef("oidcIssuerUrl",e.target.value),disabled:k||_})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Client ID"}),(0,a.jsx)(l.pd,{placeholder:"zevairouter-dashboard",value:E.oidcClientId,onChange:e=>ef("oidcClientId",e.target.value),disabled:k||_})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Client Secret"}),(0,a.jsx)(l.pd,{type:"password",placeholder:"Leave blank to keep existing secret",value:q,onChange:e=>F(e.target.value),disabled:k||_}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"This value is write-only after saving."})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Scopes"}),(0,a.jsx)(l.pd,{placeholder:"openid profile email",value:E.oidcScopes,onChange:e=>ef("oidcScopes",e.target.value),disabled:k||_})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Login Button Label"}),(0,a.jsx)(l.pd,{placeholder:"Sign in with OIDC",value:E.oidcLoginLabel,onChange:e=>ef("oidcLoginLabel",e.target.value),disabled:k||_})]})]}),(0,a.jsxs)("div",{className:"rounded-lg border border-border bg-bg p-3 text-xs sm:text-sm text-text-muted",children:[(0,a.jsx)("p",{className:"font-medium text-text-main mb-1",children:"Redirect URI"}),(0,a.jsx)("code",{className:"block break-all font-mono",children:Q})]}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2 pt-2 border-t border-border/50",children:[(0,a.jsx)(l.$n,{type:"button",variant:"primary",loading:_,onClick:()=>ej(),className:"w-full sm:w-auto",children:"Save auth mode"}),(0,a.jsx)(l.$n,{type:"button",variant:"outline",loading:z,onClick:eN,className:"w-full sm:w-auto",children:"Test connection"})]}),Z.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===Z.type?"text-red-500":"text-green-500"}`,children:Z.message}),J.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===J.type?"text-red-500":"text-green-500"}`,children:J.message}),"oidc"===v.authMode&&(0,a.jsx)("p",{className:"text-xs sm:text-sm text-amber-600 dark:text-amber-400",children:"OIDC login is currently active. Password login is disabled until you switch back."}),"both"===v.authMode&&(0,a.jsx)("p",{className:"text-xs sm:text-sm text-amber-600 dark:text-amber-400",children:"Password and OIDC login are both active."})]})]}),(0,a.jsxs)(l.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-blue-500/10 text-blue-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"route"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Routing Strategy"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Round Robin"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Cycle through accounts to distribute load"})]}),(0,a.jsx)(l.lM,{checked:"round-robin"===v.fallbackStrategy,onChange:()=>ex("round-robin"===v.fallbackStrategy?"fill-first":"round-robin"),disabled:k})]}),"round-robin"===v.fallbackStrategy&&(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4 pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Sticky Limit"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Calls per account before switching"})]}),(0,a.jsx)(l.pd,{type:"number",min:"1",max:"10",value:v.stickyRoundRobinLimit||3,onChange:e=>eb(e.target.value),disabled:k,className:"w-16 sm:w-20 text-center shrink-0"})]}),(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4 pt-4 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Most Quota"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Pick the account with the most remaining quota (uses cached usage)"})]}),(0,a.jsx)(l.lM,{checked:"most-quota"===v.fallbackStrategy,onChange:()=>ex("most-quota"===v.fallbackStrategy?"fill-first":"most-quota"),disabled:k})]}),(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4 pt-4 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Lowest Latency"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Route to the fastest account by recent avg response time"})]}),(0,a.jsx)(l.lM,{checked:"lowest-latency"===v.fallbackStrategy,onChange:()=>ex("lowest-latency"===v.fallbackStrategy?"fill-first":"lowest-latency"),disabled:k})]}),(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4 pt-4 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Response Cache"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Cache repeated temperature-0 requests per API key"})]}),(0,a.jsx)(l.lM,{checked:!0===v.responseCacheEnabled,onChange:()=>eu(!0!==v.responseCacheEnabled),disabled:k})]}),(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4 pt-4 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Webhook Alerts"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Notify on provider down / quota exhausted (Discord, Telegram, or generic webhook)"})]}),(0,a.jsx)(l.lM,{checked:!0===v.alertEnabled,onChange:()=>ep({alertEnabled:!0!==v.alertEnabled}),disabled:k})]}),!0===v.alertEnabled&&(0,a.jsxs)("div",{className:"flex flex-col gap-3 pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-xs text-text-muted block mb-1",children:"Webhook URL"}),(0,a.jsx)(l.pd,{type:"url",placeholder:"https://discord.com/api/webhooks/… or https://api.telegram.org/bot<token>/sendMessage",defaultValue:v.alertWebhookUrl||"",onBlur:e=>ep({alertWebhookUrl:e.target.value.trim()}),disabled:k})]}),(0,a.jsxs)("div",{className:"flex gap-3",children:[(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("label",{className:"text-xs text-text-muted block mb-1",children:"Type"}),(0,a.jsxs)("select",{defaultValue:v.alertWebhookType||"discord",onChange:e=>ep({alertWebhookType:e.target.value}),disabled:k,className:"w-full px-2 py-1.5 text-sm bg-transparent border border-border rounded",children:[(0,a.jsx)("option",{value:"discord",children:"Discord"}),(0,a.jsx)("option",{value:"telegram",children:"Telegram"}),(0,a.jsx)("option",{value:"generic",children:"Generic JSON"})]})]}),"telegram"===v.alertWebhookType&&(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("label",{className:"text-xs text-text-muted block mb-1",children:"Telegram Chat ID"}),(0,a.jsx)(l.pd,{type:"text",placeholder:"-1001234567890",defaultValue:v.alertTelegramChatId||"",onBlur:e=>ep({alertTelegramChatId:e.target.value.trim()}),disabled:k})]})]})]}),(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4 pt-4 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Combo Round Robin"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Cycle through providers in combos instead of always starting with first"})]}),(0,a.jsx)(l.lM,{checked:"round-robin"===v.comboStrategy,onChange:()=>eh("round-robin"===v.comboStrategy?"fallback":"round-robin"),disabled:k})]}),"round-robin"===v.comboStrategy&&(0,a.jsxs)("div",{className:"flex items-center justify-between pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:"Combo Sticky Limit"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Calls per combo model before switching"})]}),(0,a.jsx)(l.pd,{type:"number",min:"1",max:"100",value:v.comboStickyRoundRobinLimit||1,onChange:e=>eg(e.target.value),disabled:k,className:"w-20 text-center"})]}),(0,a.jsxs)("p",{className:"text-xs text-text-muted italic pt-2 border-t border-border/50",children:["round-robin"===v.fallbackStrategy?`Currently distributing requests across all available accounts with ${v.stickyRoundRobinLimit||3} calls per account.`:"most-quota"===v.fallbackStrategy?"Currently routing to the account with the most remaining quota.":"lowest-latency"===v.fallbackStrategy?"Currently routing to the fastest account by recent avg latency.":"Currently using accounts in priority order (Fill First).","round-robin"===v.comboStrategy?` Combos rotate after ${v.comboStickyRoundRobinLimit||1} call${1===(v.comboStickyRoundRobinLimit||1)?"":"s"} per model.`:" Combos always start with their first model."]})]})]}),(0,a.jsxs)(l.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-purple-500/10 text-purple-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"wifi"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Network"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Outbound Proxy"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Enable proxy for OAuth + provider outbound requests."})]}),(0,a.jsx)(l.lM,{checked:!0===v.outboundProxyEnabled,onChange:()=>ec(!0!==v.outboundProxyEnabled),disabled:k||er})]}),!0===v.outboundProxyEnabled&&(0,a.jsxs)("form",{onSubmit:en,className:"flex flex-col gap-4 pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Proxy URL"}),(0,a.jsx)(l.pd,{placeholder:"http://127.0.0.1:7897",value:ee.outboundProxyUrl,onChange:e=>et(t=>({...t,outboundProxyUrl:e.target.value})),disabled:k||er}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Leave empty to inherit existing env proxy (if any)."})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2 pt-2 border-t border-border/50",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"No Proxy"}),(0,a.jsx)(l.pd,{placeholder:"localhost,127.0.0.1",value:ee.outboundNoProxy,onChange:e=>et(t=>({...t,outboundNoProxy:e.target.value})),disabled:k||er}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Comma-separated hostnames/domains to bypass the proxy."})]}),(0,a.jsxs)("div",{className:"pt-2 border-t border-border/50 flex flex-col sm:flex-row items-stretch sm:items-center gap-2",children:[(0,a.jsx)(l.$n,{type:"button",variant:"secondary",loading:el,disabled:k||er,onClick:ed,className:"w-full sm:w-auto",children:"Test proxy URL"}),(0,a.jsx)(l.$n,{type:"submit",variant:"primary",loading:er,className:"w-full sm:w-auto",children:"Apply"})]})]}),es.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===es.type?"text-red-500":"text-green-500"} pt-2 border-t border-border/50`,children:es.message})]})]}),(0,a.jsxs)(l.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-orange-500/10 text-orange-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"monitoring"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Observability"})]}),(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Enable Observability"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Record request details for inspection in the logs view"})]}),(0,a.jsx)(l.lM,{checked:eS,onChange:ew,disabled:k})]})]}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2",children:[(0,a.jsx)(l.$n,{variant:"outline",fullWidth:!0,icon:"power_settings_new",onClick:()=>j(!0),className:"text-red-500 border-red-200 hover:bg-red-50 hover:border-red-300",children:"Shutdown"}),(0,a.jsx)(l.$n,{variant:"outline",fullWidth:!0,icon:"logout",onClick:eO,children:"Logout"})]}),(0,a.jsxs)("div",{className:"text-center text-xs sm:text-sm text-text-muted py-4",children:[(0,a.jsxs)("p",{children:[m.vQ.name," v",m.vQ.version]}),(0,a.jsx)("p",{className:"mt-1",children:"Local Mode - All data stored on your machine"})]})]}),(0,a.jsx)(n.default,{hideTrigger:!0,isOpen:g,onClose:e=>{y(!1),b(e)}}),(0,a.jsx)(i.ConfirmModal,{isOpen:f,onClose:()=>j(!1),onConfirm:eP,title:"Close Proxy",message:"Are you sure you want to close the proxy server?",confirmText:"Close",cancelText:"Cancel",variant:"danger",loading:N})]})}}},e=>{e.O(0,[2574,3862,3745,9802,620,5497,8441,3794,7358],()=>e(e.s=52424)),_N_E=e.O()}]);
|