vansrouter 0.91.20 → 0.91.21
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/app/.next-cli-build/BUILD_ID +1 -1
- package/app/.next-cli-build/app-path-routes-manifest.json +19 -19
- package/app/.next-cli-build/build-manifest.json +3 -3
- package/app/.next-cli-build/prerender-manifest.json +3 -3
- package/app/.next-cli-build/react-loadable-manifest.json +7 -7
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +5 -5
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-fitness/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-fitness/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_global-error.html +1 -1
- package/app/.next-cli-build/server/app/_global-error.rsc +2 -2
- package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_not-found.html +1 -1
- package/app/.next-cli-build/server/app/_not-found.rsc +4 -4
- package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/api/auth/check/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/check/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/reset-password/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +5 -5
- package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/extras/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/restart/route.js +1 -1
- package/app/.next-cli-build/server/app/api/headroom/restart/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -1
- package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -1
- package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
- package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/catalog-sync/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
- package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/gcp-projects/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/gcp-projects/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/bulk/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/bulk/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/circuit-breakers/[name]/reset/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/circuit-breakers/[name]/reset/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/circuit-breakers/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/fitness/clear/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/fitness/clear/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/fitness/clear-all/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/fitness/clear-all/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/fitness/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/fitness/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +2 -2
- package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/health/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/start/route.js +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/status/route.js +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
- package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
- package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +2 -2
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-details/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/version/route.js +1 -1
- package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/callback.html +1 -1
- package/app/.next-cli-build/server/app/callback.rsc +4 -4
- package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/combos.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/profile.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/proxy-fitness.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-fitness.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/proxy-fitness.segments/!KGRhc2hib2FyZCk/dashboard/proxy-fitness/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/proxy-fitness.segments/!KGRhc2hib2FyZCk/dashboard/proxy-fitness.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-fitness.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-fitness.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/proxy-fitness.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/proxy-fitness.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-fitness.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/proxy-fitness.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/quota.html +2 -2
- package/app/.next-cli-build/server/app/dashboard/quota.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/translator.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/usage.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard.html +1 -1
- package/app/.next-cli-build/server/app/dashboard.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/landing.html +1 -1
- package/app/.next-cli-build/server/app/landing.rsc +4 -4
- package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/login.html +1 -1
- package/app/.next-cli-build/server/app/login.rsc +5 -5
- package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/masuk/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/masuk/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app-paths-manifest.json +19 -19
- package/app/.next-cli-build/server/chunks/1248.js +1 -1
- package/app/.next-cli-build/server/chunks/1685.js +2 -2
- package/app/.next-cli-build/server/chunks/1945.js +1 -0
- package/app/.next-cli-build/server/chunks/1986.js +1 -0
- package/app/.next-cli-build/server/chunks/224.js +1 -1
- package/app/.next-cli-build/server/chunks/2411.js +1 -1
- package/app/.next-cli-build/server/chunks/2764.js +1 -1
- package/app/.next-cli-build/server/chunks/3539.js +1 -1
- package/app/.next-cli-build/server/chunks/3736.js +1 -1
- package/app/.next-cli-build/server/chunks/4121.js +2 -2
- package/app/.next-cli-build/server/chunks/4574.js +1 -1
- package/app/.next-cli-build/server/chunks/4836.js +1 -1
- package/app/.next-cli-build/server/chunks/5006.js +1 -1
- package/app/.next-cli-build/server/chunks/5009.js +1 -1
- package/app/.next-cli-build/server/chunks/5050.js +1 -1
- package/app/.next-cli-build/server/chunks/5302.js +1 -1
- package/app/.next-cli-build/server/chunks/5598.js +1 -1
- package/app/.next-cli-build/server/chunks/7010.js +1 -1
- package/app/.next-cli-build/server/chunks/7074.js +1 -1
- package/app/.next-cli-build/server/chunks/7104.js +1 -1
- package/app/.next-cli-build/server/chunks/7425.js +1 -1
- package/app/.next-cli-build/server/chunks/7950.js +1 -1
- package/app/.next-cli-build/server/chunks/8695.js +1 -1
- package/app/.next-cli-build/server/chunks/8941.js +1 -1
- package/app/.next-cli-build/server/chunks/912.js +1 -1
- package/app/.next-cli-build/server/chunks/9784.js +1 -1
- package/app/.next-cli-build/server/chunks/9974.js +1 -1
- package/app/.next-cli-build/server/chunks/9984.js +1 -1
- package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
- package/app/.next-cli-build/server/middleware-react-loadable-manifest.js +1 -1
- package/app/.next-cli-build/server/pages/404.html +1 -1
- package/app/.next-cli-build/server/pages/500.html +1 -1
- package/app/.next-cli-build/server/server-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/server-reference-manifest.json +1 -1
- package/app/.next-cli-build/static/chunks/{2940-21a3028bcf119a04.js → 2940-b6dd0c5879412cea.js} +1 -1
- package/app/.next-cli-build/static/chunks/3257.4095ef9514389f69.js +1 -0
- package/app/.next-cli-build/static/chunks/4385-ce7b55264de51d47.js +1 -0
- package/app/.next-cli-build/static/chunks/5337.0f3e559687a6f415.js +1 -0
- package/app/.next-cli-build/static/chunks/5479-20746781c1de7eb2.js +1 -0
- package/app/.next-cli-build/static/chunks/6474.d4e25fbe7c09068f.js +1 -0
- package/app/.next-cli-build/static/chunks/{8914-28038867caf43f95.js → 8914-58cf85ef9bb0b6e0.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-1fdc31375a54bb60.js +27 -0
- package/app/.next-cli-build/static/chunks/{webpack-25f21f01d9ae668b.js → webpack-81a7adaed327dd6b.js} +1 -1
- package/app/.next-cli-build/static/css/c78f5cc987a85267.css +1 -0
- package/app/package.json +1 -1
- package/app/src/mitm/server.js +1 -1
- package/package.json +1 -1
- package/src/cli/menus/providers.js +854 -849
- package/app/.next-cli-build/server/chunks/8327.js +0 -1
- package/app/.next-cli-build/server/chunks/8524.js +0 -1
- package/app/.next-cli-build/static/chunks/3257.44e07ea94f2f69cb.js +0 -1
- package/app/.next-cli-build/static/chunks/4385-687393d85e60d52a.js +0 -1
- package/app/.next-cli-build/static/chunks/5479-e0d8f21aa6ccb873.js +0 -1
- package/app/.next-cli-build/static/chunks/5560.e2ab1ca9979178f3.js +0 -1
- package/app/.next-cli-build/static/chunks/6474.05cd6a7a0760c2a1.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-66b7153f953ac668.js +0 -27
- package/app/.next-cli-build/static/css/e40cf3e80ed8b48b.css +0 -1
- /package/app/.next-cli-build/static/{wgsSmVaMOGS9soPOZ4iuB → yvUSImiXUeMIOPHHzKVq_}/_buildManifest.js +0 -0
- /package/app/.next-cli-build/static/{wgsSmVaMOGS9soPOZ4iuB → yvUSImiXUeMIOPHHzKVq_}/_ssgManifest.js +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5560],{65560:(e,t,r)=>{r.r(t),r.d(t,{default:()=>i});var s=r(15102),a=r(82030),n=r(92940),l=r(21577);function c(e,t){switch(t.type){case"INIT":return{...e,error:null,step:"loading"};case"AUTH_READY":return{...e,step:"input",authUrl:t.authUrl,authData:t.data};case"AUTH_ERROR":return{...e,step:"error",error:t.error};case"SET_CALLBACK":return{...e,callbackUrl:t.value};case"CLEAR_ERROR":return{...e,error:null};case"GO_INPUT":return{...e,step:"input",error:null};case"SUCCESS":return{...e,step:"success"};default:return e}}function i({isOpen:e,provider:t,onSuccess:r,onClose:o}){let[u,d]=(0,a.useReducer)(c,{step:"loading",authUrl:"",authData:null,callbackUrl:"",error:null}),{step:h,authUrl:x,authData:m,callbackUrl:p,error:f}=u,{copied:j,copy:g}=(0,l.C)(),y=(0,a.useRef)(!1),b=(0,a.useRef)(!1),N=(0,a.useRef)(0);(0,a.useEffect)(()=>{if(e&&!b.current&&t){let r=++N.current;y.current=!1,(async()=>{try{d({type:"INIT"});let s=await fetch(`/api/oauth/kiro/social-authorize?provider=${t}`),a=await s.json();if(!s.ok)throw Error(a.error);if(r!==N.current||!e)return;d({type:"AUTH_READY",authUrl:a.authUrl,data:a}),y.current||(y.current=!0,window.open(a.authUrl,"_blank"))}catch(t){r===N.current&&e&&d({type:"AUTH_ERROR",error:t.message})}})()}else!e&&b.current&&(N.current+=1,y.current=!1);b.current=e},[e,t]);let v=async()=>{let s=N.current;try{let a;d({type:"CLEAR_ERROR"});try{a=new URL(p)}catch(e){throw Error("Invalid callback URL format")}let n=a.searchParams.get("code"),l=a.searchParams.get("state"),c=a.searchParams.get("error");if(c)throw Error(a.searchParams.get("error_description")||c);if(!n)throw Error("No authorization code found in URL");if(!m?.state||l!==m.state)throw Error("Invalid or expired authorization state");let i=await fetch("/api/oauth/kiro/social-exchange",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:n,codeVerifier:m.codeVerifier,provider:t})}),o=await i.json();if(!i.ok)throw Error(o.error);if(s!==N.current||!e)return;d({type:"SUCCESS"}),r?.()}catch(t){s===N.current&&e&&d({type:"AUTH_ERROR",error:t.message})}},C="google"===t?"Google":"GitHub";return(0,s.jsx)(n.Modal,{isOpen:e,title:`Connect Kiro via ${C}`,onClose:o,size:"lg",children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:["loading"===h&&(0,s.jsxs)("div",{className:"text-center py-6",children:[(0,s.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-primary/10 flex items-center justify-center",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-3xl text-primary animate-spin",children:"progress_activity"})}),(0,s.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Initializing..."}),(0,s.jsxs)("p",{className:"text-sm text-text-muted",children:["Setting up ",C," authentication"]})]}),"input"===h&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-sm font-medium mb-2",children:"Step 1: Open this URL in your browser"}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(n.Input,{value:x,readOnly:!0,className:"flex-1 font-mono text-xs"}),(0,s.jsx)(n.Button,{variant:"secondary",icon:"auth_url"===j?"check":"content_copy",onClick:()=>g(x,"auth_url"),children:"Copy"})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-sm font-medium mb-2",children:"Step 2: Paste the callback URL here"}),(0,s.jsx)("p",{className:"text-xs text-text-muted mb-2",children:"After authorization, copy the full URL from your browser address bar."}),(0,s.jsx)(n.Input,{value:p,onChange:e=>d({type:"SET_CALLBACK",value:e.target.value}),placeholder:"kiro://kiro.kiroAgent/authenticate-success?code=...",className:"font-mono text-xs"})]})]}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(n.Button,{onClick:v,fullWidth:!0,disabled:!p,children:"Connect"}),(0,s.jsx)(n.Button,{onClick:o,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),"success"===h&&(0,s.jsxs)("div",{className:"text-center py-6",children:[(0,s.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-green-100 dark:bg-green-900/30 flex items-center justify-center",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-3xl text-green-600",children:"check_circle"})}),(0,s.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Connected Successfully!"}),(0,s.jsxs)("p",{className:"text-sm text-text-muted mb-4",children:["Your Kiro account via ",C," has been connected."]}),(0,s.jsx)(n.Button,{onClick:o,fullWidth:!0,children:"Done"})]}),"error"===h&&(0,s.jsxs)("div",{className:"text-center py-6",children:[(0,s.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-red-100 dark:bg-red-900/30 flex items-center justify-center",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-3xl text-red-600",children:"error"})}),(0,s.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Connection Failed"}),(0,s.jsx)("p",{className:"text-sm text-red-600 mb-4",children:f}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(n.Button,{onClick:()=>d({type:"GO_INPUT"}),variant:"secondary",fullWidth:!0,children:"Try Again"}),(0,s.jsx)(n.Button,{onClick:o,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})})}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6474],{76474:(e,t,s)=>{s.r(t),s.d(t,{default:()=>i});var r=s(15102),a=s(82030),l=s(92940);function i({isOpen:e,onMethodSelect:t,onClose:s}){let[d,n]=(0,a.useState)(null),[o,c]=(0,a.useState)(""),[m,x]=(0,a.useState)("us-east-1"),[u,h]=(0,a.useState)(""),[b,p]=(0,a.useState)(""),[f,j]=(0,a.useState)(""),[g,N]=(0,a.useState)("us-east-1"),[k,y]=(0,a.useState)(null),[v,C]=(0,a.useState)(!1),[I,S]=(0,a.useState)(!1),[A,P]=(0,a.useState)(!1),[w,W]=(0,a.useState)(null),B=(0,a.useRef)(0);(0,a.useEffect)(()=>{if("import"!==d||!e)return;let t=++B.current;(async()=>{S(!0),y(null),P(!1),W(null);try{let s=await fetch("/api/oauth/kiro/auto-import"),r=await s.json();if(t!==B.current||!e||"import"!==d)return;r.found?(h(r.refreshToken),P(!0),r.clientId&&r.clientSecret&&W({clientId:r.clientId,clientSecret:r.clientSecret,region:r.region,authMethod:r.authMethod,profileArn:r.profileArn})):y(r.error||"Could not auto-detect token")}catch(s){t===B.current&&e&&"import"===d&&y("Failed to auto-detect token")}finally{t===B.current&&S(!1)}})()},[d,e]);let _=e=>{B.current+=1,n(e),y(null)},O=()=>{B.current+=1,n(null),y(null)},L=async()=>{if(!u.trim())return void y("Please enter a refresh token");let s=++B.current;C(!0),y(null);try{let r=await fetch("/api/oauth/kiro/import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({refreshToken:u.trim(),...w||{}})}),a=await r.json();if(!r.ok)throw Error(a.error||"Import failed");if(s!==B.current||!e)return;t("import")}catch(t){s===B.current&&e&&y(t.message)}finally{s===B.current&&C(!1)}},K=async()=>{if(!b.trim())return void y("Please paste CLIProxyAPI auth JSON");C(!0),y(null);try{let e=await fetch("/api/oauth/kiro/import-cli-proxy",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({json:b.trim()})}),s=await e.json();if(!e.ok)throw Error(s.error||"CLIProxyAPI import failed");t("import-cli-proxy")}catch(e){y(e.message)}finally{C(!1)}},R=async()=>{if(!f.trim())return void y("Please enter an API key");C(!0),y(null);try{let e=await fetch("/api/oauth/kiro/api-key",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiKey:f.trim(),region:g.trim()||"us-east-1"})}),s=await e.json();if(!e.ok)throw Error(s.error||"Import failed");t("api-key")}catch(e){y(e.message)}finally{C(!1)}},T=e=>{t("social",{provider:e})};return(0,r.jsx)(l.Modal,{isOpen:e,title:"Connect Kiro",onClose:s,size:"lg",children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[!d&&(0,r.jsxs)("div",{className:"space-y-3",children:[(0,r.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Choose your authentication method:"}),(0,r.jsx)("button",{onClick:()=>t("builder-id"),className:"w-full p-4 text-left border border-border rounded-lg hover:bg-sidebar transition-colors",children:(0,r.jsxs)("div",{className:"flex items-start gap-3",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary mt-0.5",children:"shield"}),(0,r.jsxs)("div",{className:"flex-1",children:[(0,r.jsx)("h3",{className:"font-semibold mb-1",children:"AWS Builder ID"}),(0,r.jsx)("p",{className:"text-sm text-text-muted",children:"Recommended for most users. Free AWS account required."})]})]})}),(0,r.jsx)("button",{onClick:()=>_("idc"),className:"w-full p-4 text-left border border-border rounded-lg hover:bg-sidebar transition-colors",children:(0,r.jsxs)("div",{className:"flex items-start gap-3",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary mt-0.5",children:"business"}),(0,r.jsxs)("div",{className:"flex-1",children:[(0,r.jsx)("h3",{className:"font-semibold mb-1",children:"AWS IAM Identity Center"}),(0,r.jsx)("p",{className:"text-sm text-text-muted",children:"For enterprise users with custom AWS IAM Identity Center."})]})]})}),(0,r.jsx)("button",{onClick:()=>_("api-key"),className:"w-full p-4 text-left border border-border rounded-lg hover:bg-sidebar transition-colors",children:(0,r.jsxs)("div",{className:"flex items-start gap-3",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary mt-0.5",children:"key"}),(0,r.jsxs)("div",{className:"flex-1",children:[(0,r.jsx)("h3",{className:"font-semibold mb-1",children:"API Key"}),(0,r.jsx)("p",{className:"text-sm text-text-muted",children:"Use a long-lived Kiro/CodeWhisperer API key (headless auth)."})]})]})}),(0,r.jsx)("button",{onClick:()=>_("social-google"),className:"hidden w-full p-4 text-left border border-border rounded-lg hover:bg-sidebar transition-colors",children:(0,r.jsxs)("div",{className:"flex items-start gap-3",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary mt-0.5",children:"account_circle"}),(0,r.jsxs)("div",{className:"flex-1",children:[(0,r.jsx)("h3",{className:"font-semibold mb-1",children:"Google Account"}),(0,r.jsx)("p",{className:"text-sm text-text-muted",children:"Login with your Google account (manual callback)."})]})]})}),(0,r.jsx)("button",{onClick:()=>_("social-github"),className:"hidden w-full p-4 text-left border border-border rounded-lg hover:bg-sidebar transition-colors",children:(0,r.jsxs)("div",{className:"flex items-start gap-3",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary mt-0.5",children:"code"}),(0,r.jsxs)("div",{className:"flex-1",children:[(0,r.jsx)("h3",{className:"font-semibold mb-1",children:"GitHub Account"}),(0,r.jsx)("p",{className:"text-sm text-text-muted",children:"Login with your GitHub account (manual callback)."})]})]})}),(0,r.jsx)("button",{onClick:()=>_("import"),className:"w-full p-4 text-left border border-border rounded-lg hover:bg-sidebar transition-colors",children:(0,r.jsxs)("div",{className:"flex items-start gap-3",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary mt-0.5",children:"file_upload"}),(0,r.jsxs)("div",{className:"flex-1",children:[(0,r.jsx)("h3",{className:"font-semibold mb-1",children:"Import Token"}),(0,r.jsx)("p",{className:"text-sm text-text-muted",children:"Paste refresh token from Kiro IDE."})]})]})}),(0,r.jsx)("button",{onClick:()=>_("import-cli-proxy"),className:"w-full p-4 text-left border border-border rounded-lg hover:bg-sidebar transition-colors",children:(0,r.jsxs)("div",{className:"flex items-start gap-3",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary mt-0.5",children:"data_object"}),(0,r.jsxs)("div",{className:"flex-1",children:[(0,r.jsx)("h3",{className:"font-semibold mb-1",children:"Import CLIProxyAPI JSON"}),(0,r.jsx)("p",{className:"text-sm text-text-muted",children:"Paste external_idp auth JSON from CLIProxyAPI/Kiro Microsoft login."})]})]})})]}),"idc"===d&&(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsxs)("label",{className:"block text-sm font-medium mb-2",children:["IDC Start URL ",(0,r.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,r.jsx)(l.Input,{value:o,onChange:e=>c(e.target.value),placeholder:"https://your-org.awsapps.com/start",className:"font-mono text-sm"}),(0,r.jsx)("p",{className:"text-xs text-text-muted mt-1",children:"Your organization's AWS IAM Identity Center URL"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-sm font-medium mb-2",children:"AWS Region"}),(0,r.jsx)(l.Input,{value:m,onChange:e=>x(e.target.value),placeholder:"us-east-1",className:"font-mono text-sm"}),(0,r.jsx)("p",{className:"text-xs text-text-muted mt-1",children:"AWS region for your Identity Center (default: us-east-1)"})]}),k&&(0,r.jsx)("p",{className:"text-sm text-red-600",children:k}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(l.Button,{onClick:()=>{o.trim()?t("idc",{startUrl:o.trim(),region:m}):y("Please enter your IDC start URL")},fullWidth:!0,children:"Continue"}),(0,r.jsx)(l.Button,{onClick:O,variant:"ghost",fullWidth:!0,children:"Back"})]})]}),"api-key"===d&&(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)("div",{className:"bg-blue-50 dark:bg-blue-900/20 p-3 rounded-lg border border-blue-200 dark:border-blue-800",children:(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-blue-600 dark:text-blue-400",children:"info"}),(0,r.jsx)("p",{className:"text-sm text-blue-800 dark:text-blue-200",children:"Paste a long-lived Kiro/CodeWhisperer API key. It is validated against AWS and stored directly as a bearer credential (no refresh)."})]})}),(0,r.jsxs)("div",{children:[(0,r.jsxs)("label",{className:"block text-sm font-medium mb-2",children:["API Key ",(0,r.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,r.jsx)(l.Input,{value:f,onChange:e=>j(e.target.value),placeholder:"Paste your Kiro API key...",className:"font-mono text-sm"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-sm font-medium mb-2",children:"AWS Region"}),(0,r.jsx)(l.Input,{value:g,onChange:e=>N(e.target.value),placeholder:"us-east-1",className:"font-mono text-sm"}),(0,r.jsx)("p",{className:"text-xs text-text-muted mt-1",children:"AWS region for the key (default: us-east-1)"})]}),k&&(0,r.jsx)("div",{className:"bg-red-50 dark:bg-red-900/20 p-3 rounded-lg border border-red-200 dark:border-red-800",children:(0,r.jsx)("p",{className:"text-sm text-red-600 dark:text-red-400",children:k})}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(l.Button,{onClick:R,fullWidth:!0,disabled:v||!f.trim(),children:v?"Validating...":"Add API Key"}),(0,r.jsx)(l.Button,{onClick:O,variant:"ghost",fullWidth:!0,children:"Back"})]})]}),"social-google"===d&&(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)("div",{className:"bg-amber-50 dark:bg-amber-900/20 p-4 rounded-lg border border-amber-200 dark:border-amber-800",children:(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-amber-600 dark:text-amber-400",children:"info"}),(0,r.jsxs)("div",{className:"flex-1 text-sm",children:[(0,r.jsx)("p",{className:"font-medium text-amber-900 dark:text-amber-100 mb-1",children:"Manual Callback Required"}),(0,r.jsx)("p",{className:"text-amber-800 dark:text-amber-200",children:"After login, you'll need to copy the callback URL from your browser and paste it back here."})]})]})}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(l.Button,{onClick:()=>T("google"),fullWidth:!0,children:"Continue with Google"}),(0,r.jsx)(l.Button,{onClick:O,variant:"ghost",fullWidth:!0,children:"Back"})]})]}),"social-github"===d&&(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)("div",{className:"bg-amber-50 dark:bg-amber-900/20 p-4 rounded-lg border border-amber-200 dark:border-amber-800",children:(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-amber-600 dark:text-amber-400",children:"info"}),(0,r.jsxs)("div",{className:"flex-1 text-sm",children:[(0,r.jsx)("p",{className:"font-medium text-amber-900 dark:text-amber-100 mb-1",children:"Manual Callback Required"}),(0,r.jsx)("p",{className:"text-amber-800 dark:text-amber-200",children:"After login, you'll need to copy the callback URL from your browser and paste it back here."})]})]})}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(l.Button,{onClick:()=>T("github"),fullWidth:!0,children:"Continue with GitHub"}),(0,r.jsx)(l.Button,{onClick:O,variant:"ghost",fullWidth:!0,children:"Back"})]})]}),"import"===d&&(0,r.jsxs)("div",{className:"space-y-4",children:[I&&(0,r.jsxs)("div",{className:"text-center py-6",children:[(0,r.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-primary/10 flex items-center justify-center",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-3xl text-primary animate-spin",children:"progress_activity"})}),(0,r.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Auto-detecting token..."}),(0,r.jsx)("p",{className:"text-sm text-text-muted",children:"Reading from AWS SSO cache"})]}),!I&&(0,r.jsxs)(r.Fragment,{children:[A&&(0,r.jsx)("div",{className:"bg-green-50 dark:bg-green-900/20 p-3 rounded-lg border border-green-200 dark:border-green-800",children:(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-green-600 dark:text-green-400",children:"check_circle"}),(0,r.jsx)("p",{className:"text-sm text-green-800 dark:text-green-200",children:"Token auto-detected from Kiro IDE successfully!"})]})}),!A&&!k&&(0,r.jsx)("div",{className:"bg-blue-50 dark:bg-blue-900/20 p-3 rounded-lg border border-blue-200 dark:border-blue-800",children:(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-blue-600 dark:text-blue-400",children:"info"}),(0,r.jsx)("p",{className:"text-sm text-blue-800 dark:text-blue-200",children:"Kiro IDE not detected. Please paste your refresh token manually."})]})}),(0,r.jsxs)("div",{children:[(0,r.jsxs)("label",{className:"block text-sm font-medium mb-2",children:["Refresh Token ",(0,r.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,r.jsx)(l.Input,{value:u,onChange:e=>h(e.target.value),placeholder:"Token will be auto-filled...",className:"font-mono text-sm"})]}),k&&(0,r.jsx)("div",{className:"bg-red-50 dark:bg-red-900/20 p-3 rounded-lg border border-red-200 dark:border-red-800",children:(0,r.jsx)("p",{className:"text-sm text-red-600 dark:text-red-400",children:k})}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(l.Button,{onClick:L,fullWidth:!0,disabled:v||!u.trim(),children:v?"Importing...":"Import Token"}),(0,r.jsx)(l.Button,{onClick:O,variant:"ghost",fullWidth:!0,children:"Back"})]})]})]}),"import-cli-proxy"===d&&(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)("div",{className:"bg-blue-50 dark:bg-blue-900/20 p-3 rounded-lg border border-blue-200 dark:border-blue-800",children:(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-blue-600 dark:text-blue-400",children:"info"}),(0,r.jsx)("p",{className:"text-sm text-blue-800 dark:text-blue-200",children:"Paste the Kiro CLIProxyAPI auth JSON containing auth_method=external_idp. Only Microsoft login token endpoints are accepted."})]})}),(0,r.jsxs)("div",{children:[(0,r.jsxs)("label",{className:"block text-sm font-medium mb-2",children:["CLIProxyAPI Auth JSON ",(0,r.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,r.jsx)("textarea",{value:b,onChange:e=>p(e.target.value),placeholder:'{"auth_method":"external_idp","access_token":"...","refresh_token":"...","client_id":"...","token_endpoint":"https://login.microsoftonline.com/.../oauth2/v2.0/token","profile_arn":"...","scopes":"..."}',className:"min-h-40 w-full rounded-md border border-border bg-background p-3 font-mono text-sm outline-none focus:border-primary"})]}),k&&(0,r.jsx)("div",{className:"bg-red-50 dark:bg-red-900/20 p-3 rounded-lg border border-red-200 dark:border-red-800",children:(0,r.jsx)("p",{className:"text-sm text-red-600 dark:text-red-400",children:k})}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(l.Button,{onClick:K,fullWidth:!0,disabled:v||!b.trim(),children:v?"Importing...":"Import CLIProxyAPI JSON"}),(0,r.jsx)(l.Button,{onClick:O,variant:"ghost",fullWidth:!0,children:"Back"})]})]})]})})}}}]);
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2134],{21863:(e,t,a)=>{"use strict";function s(e,t){return!1===e?"default":"active"===t||"success"===t?"success":"error"===t||"expired"===t||"unavailable"===t?"error":"default"}a.d(t,{g:()=>s})},44878:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>V});var s=a(15102),l=a(82030),i=a(93278),r=a(93885),n=a.n(r);a(37837),a(19965);var o=a(31704),d=a(92940),c=a(31038),m=a(55223),p=a(24332),x=a(47236);a(5477);let u=["none","low","medium","high"],h=["none","thinking"],f=["none","low","medium","high","max"],y={openai:["none","minimal","low","medium","high","xhigh"],"claude-adaptive":f,"claude-budget":["none","low","medium","high","xhigh","max"],"gemini-level":["minimal","low","medium","high"],"gemini-budget":u,zai:h,qwen:u,kimi:f,deepseek:["none","high","max"],minimax:h,hunyuan:u,step:u},g=["none","minimal","low","medium","high","xhigh","max"],b=[{provider:"codex",pattern:"*gpt-5.6-sol*",levels:g},{provider:"codex",pattern:"*gpt-5.6-terra*",levels:g},{provider:"codex",pattern:"*gpt-5.6-luna*",levels:g},{pattern:"*gpt-5.6-sol*",levels:["none","minimal","low","medium","high","xhigh","max"]},{pattern:"*claude*opus-5*",levels:f},{pattern:"*codex*",levels:["low","medium","high","xhigh"]}];function v(e,t){if("kiro"===e&&null===function(e){if("string"!=typeof e)return null;let t=e.toLowerCase().replace(/-/g,".");if(/(?:^|[/.])gpt[/.]5[/.]6(?:[/.]|$)/.test(t))return"reasoning";if(!t.includes("claude"))return null;let a=t.match(/(?:^|[/.])claude(?:[/.][a-z]+)*[/.](\d+)(?:[/.](\d+))?(?:[/.]|$)/);if(!a)return null;let[,s,l]=a,i=Number(s),r=void 0===l?null:Number(l);return i<4||4===i&&(null===r||r<=5||null!==r&&r>=1e3)?null:"output_config"}(t))return null;let a=(0,p.nl)(e,t);if(!a.reasoning)return null;let s=b.find(a=>(!a.provider||a.provider===e)&&(0,x.gH)(a.pattern,t)),l=s?.levels||y[a.thinkingFormat]||u;return!1===a.thinkingCanDisable&&(l=l.filter(e=>"none"!==e)),l}var j=a(21577),k=a(85479),N=a(20264);let w=new Map;async function S(e){if(!e?.url||!e?.type)return[];let t=w.get(e.url);if(t&&Date.now()<t.expiresAt)return t.data;try{let t=new URLSearchParams({url:e.url,type:e.type}),a=await fetch(`/api/providers/suggested-models?${t}`);if(!a.ok)return[];let s=(await a.json()).data??[];return w.set(e.url,{data:s,expiresAt:Date.now()+6e5}),s}catch{return[]}}function C({customModels:e=[],modelAliases:t={},providerAlias:a,builtInModels:s=[],type:l="llm",includeLegacyAliases:i=!0}){let r=new Set(s.map(e=>e.id)),n=new Set,o=[];for(let t of e){if(!t?.id||t.providerAlias!==a)continue;let e=t?.kind||t?.type||"llm";if(l&&e!==l||r.has(t.id))continue;let s=`${a}/${t.id}`;n.has(s)||(n.add(s),o.push({id:t.id,name:t.name||t.id,fullModel:s,source:"custom",type:e}))}if(!i)return o;let d=`${a}/`;for(let[e,a]of Object.entries(t||{})){if("string"!=typeof a||!a.startsWith(d))continue;let t=a.slice(d.length);!t||r.has(t)||n.has(a)||(n.add(a),o.push({id:t,alias:e,fullModel:a,source:"legacyAlias",type:l||"llm"}))}return o}function A({model:e,fullModel:t,alias:a,copied:l,onCopy:i,testStatus:r,isCustom:n,isFree:o,onDeleteAlias:c,onTest:m,isTesting:p,onDisable:x,caps:u}){let h="ok"===r?"#22c55e":"error"===r?"#ef4444":void 0;return(0,s.jsx)("div",{className:`group min-w-0 max-w-full rounded-lg border px-3 py-2 ${"ok"===r?"border-green-500/40":"error"===r?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:(0,s.jsxs)("div",{className:"flex min-w-0 items-start gap-2 sm:items-center",children:[(0,s.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base",style:h?{color:h}:void 0,children:"ok"===r?"check_circle":"error"===r?"cancel":"smart_toy"}),(0,s.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[(0,s.jsx)("code",{className:"max-w-[72vw] truncate rounded bg-sidebar px-1.5 py-0.5 font-mono text-xs text-text-muted sm:max-w-[360px]",children:t}),(0,s.jsxs)("span",{className:"flex min-w-0 items-center text-[9px] gap-1 pl-1",children:[e.name&&(0,s.jsx)("span",{className:"truncate text-[9px] italic text-text-muted/70",children:e.name}),(0,s.jsx)(d.CapacityBadges,{caps:u,colorOverride:"text-text-muted/70",size:12})]})]}),m&&(0,s.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,s.jsx)("button",{onClick:m,disabled:p,className:`rounded p-0.5 text-text-muted transition-opacity hover:bg-sidebar hover:text-primary ${p?"opacity-100":"opacity-100 sm:opacity-0 sm:group-hover:opacity-100"}`,children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",style:p?{animation:"spin 1s linear infinite"}:void 0,children:p?"progress_activity":"science"})}),(0,s.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:p?"Testing...":"Test"})]}),(0,s.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,s.jsx)("button",{onClick:()=>i(t,`model-${e.id}`),className:"rounded p-0.5 text-text-muted hover:bg-sidebar hover:text-primary",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:l===`model-${e.id}`?"check":"content_copy"})}),(0,s.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:l===`model-${e.id}`?"Copied!":"Copy"})]}),n?(0,s.jsx)("button",{onClick:c,className:"ml-auto rounded p-0.5 text-text-muted opacity-100 transition-opacity hover:bg-red-500/10 hover:text-red-500 sm:opacity-0 sm:group-hover:opacity-100",title:"Remove custom model",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):x?(0,s.jsx)("button",{onClick:x,className:"ml-auto rounded p-0.5 text-text-muted opacity-100 transition-opacity hover:bg-red-500/10 hover:text-red-500 sm:opacity-0 sm:group-hover:opacity-100",title:"Disable this model",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):null]})})}function T({modelId:e,fullModel:t,copied:a,onCopy:l,onDeleteAlias:i,onTest:r,testStatus:n,isTesting:o}){let d="ok"===n?"#22c55e":"error"===n?"#ef4444":void 0;return(0,s.jsxs)("div",{className:`flex items-center gap-3 p-3 rounded-lg border ${"ok"===n?"border-green-500/40":"error"===n?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted",style:d?{color:d}:void 0,children:"ok"===n?"check_circle":"error"===n?"cancel":"smart_toy"}),(0,s.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,s.jsx)("p",{className:"text-sm font-medium truncate",children:e}),(0,s.jsxs)("div",{className:"flex items-center gap-1 mt-1",children:[(0,s.jsx)("code",{className:"text-xs text-text-muted font-mono bg-sidebar px-1.5 py-0.5 rounded",children:t}),(0,s.jsxs)("div",{className:"relative group/btn",children:[(0,s.jsx)("button",{onClick:()=>l(t,`model-${e}`),className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:a===`model-${e}`?"check":"content_copy"})}),(0,s.jsx)("span",{className:"pointer-events-none absolute 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:a===`model-${e}`?"Copied!":"Copy"})]}),r&&(0,s.jsxs)("div",{className:"relative group/btn",children:[(0,s.jsx)("button",{onClick:r,disabled:o,className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary transition-colors",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",style:o?{animation:"spin 1s linear infinite"}:void 0,children:o?"progress_activity":"science"})}),(0,s.jsx)("span",{className:"pointer-events-none absolute 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:o?"Testing...":"Test"})]})]})]}),(0,s.jsx)("button",{onClick:i,className:"p-1 hover:bg-red-50 rounded text-red-500",title:"Remove model",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"delete"})})]})}function I({providerStorageAlias:e,providerDisplayAlias:t,modelAliases:a,customModels:i,copied:r,onCopy:n,onDeleteAlias:o,onAddCustomModel:c,onDeleteCustomModel:m,connections:p,isAnthropic:x}){let[u,h]=(0,l.useState)(""),[f,y]=(0,l.useState)(!1),[g,b]=(0,l.useState)(!1),[v,j]=(0,l.useState)(null),[k,N]=(0,l.useState)({}),w=async t=>{if(!v){j(t);try{let a=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${e}/${t}`})}),s=await a.json();N(e=>({...e,[t]:s.ok?"ok":"error"}))}catch{N(e=>({...e,[t]:"error"}))}finally{j(null)}}},S=C({customModels:i,modelAliases:a,providerAlias:e,type:"llm"}),A=async()=>{if(!u.trim()||f)return;let e=u.trim();if(S.some(t=>t.id===e))return void alert("Model already exists for this provider.");y(!0);try{await c(e),h("")}catch(e){console.log("Error adding model:",e)}finally{y(!1)}},O=async()=>{if(g)return;let e=p.find(e=>!1!==e.isActive);if(e){b(!0);try{let t=await fetch(`/api/providers/${e.id}/models`),a=await t.json();if(!t.ok)return void alert(a.error||"Failed to import models");let s=a.models||[];if(0===s.length)return void alert("No models returned from /models.");let l=0;for(let e of s){let t=e.id||e.name||e.model;t&&(S.some(e=>e.id===t)||(await c(t),l+=1))}0===l&&alert("No new models were added.")}catch(e){console.log("Error importing models:",e)}finally{b(!1)}}},$=p.some(e=>!1!==e.isActive);return(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("p",{className:"text-sm text-text-muted",children:["Add ",x?"Anthropic":"OpenAI","-compatible models manually or import them from the /models endpoint."]}),(0,s.jsxs)("div",{className:"flex items-end gap-2 flex-wrap",children:[(0,s.jsxs)("div",{className:"flex-1 min-w-[240px]",children:[(0,s.jsx)("label",{htmlFor:"new-compatible-model-input",className:"text-xs text-text-muted mb-1 block",children:"Model ID"}),(0,s.jsx)("input",{id:"new-compatible-model-input",type:"text",value:u,onChange:e=>h(e.target.value),onKeyDown:e=>"Enter"===e.key&&A(),placeholder:x?"claude-3-opus-20240229":"gpt-4o",className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})]}),(0,s.jsx)(d.Button,{size:"sm",icon:"add",onClick:A,disabled:!u.trim()||f,children:f?"Adding...":"Add"}),(0,s.jsx)(d.Button,{size:"sm",variant:"secondary",icon:"download",onClick:O,disabled:!$||g,children:g?"Importing...":"Import from /models"})]}),!$&&(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Add a connection to enable importing models."}),S.length>0&&(0,s.jsx)("div",{className:"flex flex-col gap-3",children:S.map(({id:a,alias:l,source:i})=>(0,s.jsx)(T,{modelId:a,fullModel:`${t}/${a}`,copied:r,onCopy:n,onDeleteAlias:()=>"custom"===i?m(a):o(l),onTest:p.length>0?()=>w(a):void 0,testStatus:k[a],isTesting:v===a},`${i}-${e}/${a}`))})]})}var O=a(21863);function $({until:e}){let[t,a]=(0,l.useState)("");return((0,l.useEffect)(()=>{let t=()=>{let t=new Date(e).getTime()-Date.now();if(t<=0)return void a("");let s=Math.floor(t/1e3);if(s<60)a(`${s}s`);else if(s<3600)a(`${Math.floor(s/60)}m ${s%60}s`);else{let e=Math.floor(s/3600),t=Math.floor(s%3600/60);a(`${e}h ${t}m`)}};t();let s=setInterval(t,1e3);return()=>clearInterval(s)},[e]),t)?(0,s.jsxs)("span",{className:"text-xs text-orange-500 font-mono",children:["⏱ ",t]}):null}function P({connection:e,proxyPools:t,isOAuth:a,isFirst:i,isLast:r,onMoveUp:n,onMoveDown:o,onToggleActive:c,onUpdateProxy:m,onEdit:p,onDelete:x,oneByOneStatus:u=null,autoPing:h=null,modelAssignmentOptions:f=null,onModelAssignmentChange:y=null,strictModelAssignment:g=!1}){let[b,v]=(0,l.useState)(!1),[j,k]=(0,l.useState)(!1),N=(0,l.useRef)(null),w=new Map((t||[]).map(e=>[e.id,e])),S=e.providerSpecificData?.proxyPoolIds||(e.providerSpecificData?.proxyPoolId?[e.providerSpecificData.proxyPoolId]:[]),C=e.providerSpecificData?.proxyRotationStrategy||"none",A=S[0]||e.providerSpecificData?.proxyPoolId||null,T=A?w.get(A):null,I=e.providerSpecificData?.connectionProxyEnabled===!0&&!!e.providerSpecificData?.connectionProxyUrl,E=!!A||I,D=S.length>1?`${S.length} pools (${C})`:T?`Pool: ${T.name}`:A?`Pool: ${A} (inactive/missing)`:I?`Legacy: ${e.providerSpecificData?.connectionProxyUrl}`:"",_=h?.provider==="codex"?"Auto-starts the next 5h Codex window after reset by sending a tiny gpt-5.5 request. Consumes a small amount of quota.":"When your 5h quota runs out, auto-sends a request the moment it resets so a new window starts right away.",U="";if(T?.proxyUrl||e.providerSpecificData?.connectionProxyUrl){let t=T?.proxyUrl||e.providerSpecificData?.connectionProxyUrl;try{let e=new URL(t);U=`${e.protocol}//${e.hostname}${e.port?`:${e.port}`:""}`}catch{U=t}}let B=T?.noProxy||e.providerSpecificData?.connectionNoProxy||"",z="default";T?.isActive===!0?z="success":(A||I)&&(z="error"),(0,l.useEffect)(()=>{if(!b)return;let e=e=>{N.current&&!N.current.contains(e.target)&&v(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[b]);let M=async e=>{k(!0);try{"__none__"===e?await m(null):await m(e),v(!1)}finally{k(!1)}},R=async(e,t)=>{let a=t.filter(e=>w.get(e)?.isActive===!0);if(a.length){k(!0);try{await m({proxyPoolIds:a,proxyRotationStrategy:e}),v(!1)}finally{k(!1)}}},K=e.authType||(a?"oauth":"apikey"),J="oauth"===K,L="cookie"===K,F=e.name?.trim()||e.email?.trim()||e.displayName?.trim()||(J?"OAuth Account":L?"Cookie Account":"API Key"),q=e.name?.trim()&&e.email?.trim()&&e.name.trim()!==e.email.trim()?e.email.trim():e.name?.trim()&&e.displayName?.trim()&&e.name.trim()!==e.displayName.trim()?e.displayName.trim():null,[W,V]=(0,l.useState)(!1),G=Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>e).filter(e=>!!e).sort()[0]||null;(0,l.useEffect)(()=>{let t=null,a=()=>{V(!!Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>e).filter(e=>e&&new Date(e).getTime()>Date.now()).sort()[0])};return a(),G&&(t=setInterval(a,1e3)),()=>{t&&clearInterval(t)}},[G,e]);let H="unavailable"!==e.testStatus||W?e.testStatus:"active",Q=()=>u?"queued"===u.state?"queued":"testing"===u.state?"testing":"success"===u.state?"success":"failed"===u.state?u.error?`failed: ${u.error}`:"failed":null:null;return(0,s.jsxs)("div",{className:`group flex min-w-0 flex-col gap-3 rounded-lg p-2 transition-colors hover:bg-black/[0.02] dark:hover:bg-white/[0.02] sm:flex-row sm:items-center sm:justify-between ${!1===e.isActive?"opacity-60":""}`,children:[(0,s.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-2 sm:items-center sm:gap-3",children:[(0,s.jsxs)("div",{className:"flex shrink-0 flex-col",children:[(0,s.jsx)("button",{onClick:n,disabled:i,className:`p-0.5 rounded ${i?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_up"})}),(0,s.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,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_down"})})]}),(0,s.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base text-text-muted",children:L?"cookie":J?"lock":"key"}),(0,s.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,s.jsx)("p",{className:"text-sm font-medium truncate",children:F}),q&&(0,s.jsx)("p",{className:"text-xs text-text-muted truncate",children:q}),(0,s.jsxs)("div",{className:"mt-1 flex min-w-0 flex-wrap items-center gap-1.5 sm:gap-2",children:[(0,s.jsx)(d.Badge,{variant:(0,O.g)(e.isActive,H),size:"sm",dot:!0,children:!1===e.isActive?"disabled":H||"Unknown"}),(0,s.jsx)(d.Badge,{variant:"default",size:"sm",children:J?"OAuth":L?"Cookie":"API Key"}),E&&(0,s.jsx)(d.Badge,{variant:z,size:"sm",children:"Proxy"}),W&&!1!==e.isActive&&(0,s.jsx)($,{until:G}),e.lastError&&!1!==e.isActive&&(0,s.jsx)("span",{className:"max-w-full truncate text-xs text-red-500 sm:max-w-[300px]",title:e.lastError,children:e.lastError}),(0,s.jsxs)("span",{className:"text-xs text-text-muted",children:["#",e.priority]}),e.globalPriority&&(0,s.jsxs)("span",{className:"text-xs text-text-muted",children:["Auto: ",e.globalPriority]}),Q()&&(0,s.jsx)(d.Badge,{variant:u?"success"===u.state?"success":"failed"===u.state?"error":"testing"===u.state?"primary":"default":"default",size:"sm",children:Q()})]}),E&&(0,s.jsxs)("div",{className:"mt-1 flex items-center gap-2 flex-wrap",children:[(0,s.jsx)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[420px]",title:D,children:D}),U&&(0,s.jsx)("code",{className:"max-w-full truncate rounded bg-black/5 px-1 py-0.5 font-mono text-[10px] text-text-muted dark:bg-white/5 sm:max-w-[260px]",children:U}),B&&(0,s.jsxs)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[320px]",title:B,children:["no_proxy: ",B]})]}),f&&y&&(0,s.jsxs)("select",{value:Object.prototype.hasOwnProperty.call(e.providerSpecificData||{},"assignedModel")?e.providerSpecificData.assignedModel||"":e.providerSpecificData?.freebuffModel||"",onChange:e=>y(e.target.value),disabled:!g,className:"mt-2 max-w-full rounded-md border border-border bg-background px-2 py-1 text-[11px] text-text-main",title:"Model assignment",children:[(0,s.jsx)("option",{value:"",children:"Unassigned"}),f.map(e=>(0,s.jsx)("option",{value:e.id,children:e.name||e.id},e.id))]})]})]}),(0,s.jsxs)("div",{className:"flex w-full items-center justify-between gap-2 sm:w-auto sm:justify-end",children:[(0,s.jsxs)("div",{className:"grid flex-1 grid-cols-3 gap-1 sm:flex sm:flex-none",children:[(t||[]).length>0&&(0,s.jsxs)("div",{className:"relative",ref:N,children:[(0,s.jsxs)("button",{type:"button",onClick:()=>v(e=>!e),className:`flex w-full flex-col items-center rounded px-2 py-1 transition-colors hover:bg-black/5 dark:hover:bg-white/5 ${E?"text-primary":"text-text-muted hover:text-primary"}`,disabled:j,children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:j?"progress_activity":"lan"}),(0,s.jsx)("span",{className:"text-[10px] leading-tight",children:"Proxy"})]}),b&&(0,s.jsxs)("div",{className:"absolute right-0 top-full z-50 mt-1 max-w-[78vw] min-w-[160px] rounded-lg border border-border bg-bg py-1 shadow-lg",children:["smart"===C&&(0,s.jsx)("p",{className:"px-3 py-1 text-[10px] text-text-muted",children:"Smart skips unfit pools for this provider/model."}),(0,s.jsx)("button",{type:"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 ${!A?"text-primary font-medium":"text-text-main"}`,children:"None"}),(0,s.jsx)("p",{className:"px-3 pt-2 text-[10px] font-medium uppercase text-text-muted",children:"Rotation"}),["fill-first","round-robin","random","smart"].map(e=>(0,s.jsx)("button",{type:"button",onClick:()=>R(e,S.length>1?S:(t||[]).filter(e=>e.isActive).map(e=>e.id)),disabled:j,className:`w-full px-3 py-1.5 text-left text-sm hover:bg-black/5 dark:hover:bg-white/5 ${C===e?"font-medium text-primary":"text-text-main"}`,children:"smart"===e?"Smart (provider/model aware)":e},e)),(0,s.jsx)("p",{className:"px-3 pt-2 text-[10px] font-medium uppercase text-text-muted",children:"Single pool"}),(t||[]).map(e=>(0,s.jsx)("button",{type:"button",onClick:()=>M(e.id),disabled:j||!0!==e.isActive,className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${A===e.id?"text-primary font-medium":"text-text-main"}`,children:e.name},e.id))]})]}),h&&(0,s.jsx)(d.Tooltip,{text:_,children:(0,s.jsxs)("button",{onClick:()=>h.onToggle(!h.on),className:`flex w-full flex-col items-center rounded px-2 py-1 transition-colors hover:bg-black/5 dark:hover:bg-white/5 ${h.on?"text-primary":"text-text-muted hover:text-primary"}`,children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"bolt"}),(0,s.jsx)("span",{className:"text-[10px] leading-tight",children:"Auto-ping"})]})}),(0,s.jsxs)("button",{onClick:p,className:"flex flex-col items-center rounded px-2 py-1 text-text-muted hover:bg-black/5 hover:text-primary dark:hover:bg-white/5",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,s.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,s.jsxs)("button",{onClick:x,className:"flex flex-col items-center rounded px-2 py-1 text-red-500 hover:bg-red-500/10",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,s.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]}),(0,s.jsx)(d.Toggle,{size:"sm",checked:e.isActive??!0,onChange:c,title:e.isActive??!0?"Disable connection":"Enable connection"})]})]})}var E=a(28937),D=a.n(E);let _=`name1|sk-key1
|
|
2
|
-
name2|sk-key2
|
|
3
|
-
sk-key-only-auto-named`;function U({isOpen:e,provider:t,providerName:a,isCompatible:i,isAnthropic:r,authType:n,authHint:o,website:m,proxyPools:p,error:x,existingNames:u,onSave:h,onBulkDone:f,onClose:y}){let g="__none__",b="ollama-local"===t,v="cookie"===n,j="xai"===t&&!v,k=v?"Cookie Value":"API Key",N="azure"===t,w="cloudflare-ai"===t,S=c.Q2?.[t]?.regions||null,C=c.Q2?.[t]?.defaultRegion||S?.[0]?.id||"",[A,T]=(0,l.useState)({name:"",apiKey:"",priority:1,proxyPoolId:g,ollamaHostUrl:""}),[I,O]=(0,l.useState)({azureEndpoint:"",apiVersion:"2024-10-01-preview",deployment:"",organization:""}),[$,P]=(0,l.useState)({accountId:""}),[E,D]=(0,l.useState)(C),[B,z]=(0,l.useState)(!1),[M,R]=(0,l.useState)(null),[K,J]=(0,l.useState)(!1),L=w?`name1|sk-key1|acc123456
|
|
4
|
-
name2|sk-key2|def789012
|
|
5
|
-
sk-key-only-auto-named`:"exa"===t?`account-1|exa-key-1
|
|
6
|
-
account-2|exa-key-2
|
|
7
|
-
exa-key-only-auto-named`:_,[F,q]=(0,l.useState)("single"),[W,V]=(0,l.useState)(""),[G,H]=(0,l.useState)(null),Q=()=>b&&A.ollamaHostUrl.trim()?{baseUrl:A.ollamaHostUrl.trim()}:N?{azureEndpoint:I.azureEndpoint,apiVersion:I.apiVersion,deployment:I.deployment,organization:I.organization}:w?{accountId:$.accountId}:S&&E?{region:E}:void 0,X=async()=>{z(!0);try{let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:A.apiKey,providerSpecificData:Q()})}),a=await e.json();R(a.valid?"success":"failed")}catch{R("failed")}finally{z(!1)}},Z=async()=>{if(t&&(b||A.apiKey)&&(b||A.name)){J(!0);try{let e=!1;try{z(!0),R(null);let a=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:A.apiKey,providerSpecificData:Q()})});e=!!(await a.json()).valid,R(e?"success":"failed")}catch{R("failed")}finally{z(!1)}await h({name:A.name||(b?"Ollama Local":""),apiKey:A.apiKey,priority:A.priority,proxyPoolId:A.proxyPoolId===g?null:A.proxyPoolId,testStatus:e?"active":"unknown",providerSpecificData:Q()})}finally{J(!1)}}},Y=async()=>{let e=W.split("\n");if(!e.length)return;let a=function(e,t,a={}){let{isCloudflareAi:s=!1}=a,l=new Set((Array.isArray(t)?t:[]).map(e=>"string"==typeof e?e.toLowerCase():"")),i=[];for(let t of e){let e,a="string"==typeof t?t.trim():"";if(!a)continue;let r=function(e,t={}){let{isCloudflareAi:a=!1}=t,s=e.split("|");if(a&&s.length>=3){let e=s[0].trim();return{baseName:e||"Key",apiKey:s.slice(1,-1).join("|").trim(),providerSpecificData:{accountId:s[s.length-1].trim()}}}return s.length>=2?{baseName:s[0].trim()||"Key",apiKey:s.slice(1).join("|").trim()}:{baseName:"Key",apiKey:s[0].trim()}}(a,{isCloudflareAi:s});if(!r||!r.apiKey)continue;let n=r.baseName,o=1;for(;e=`${n} ${o}`,l.has(e.toLowerCase());)o+=1;l.add(e.toLowerCase());let d={name:e,apiKey:r.apiKey,skipped:!1};r.providerSpecificData&&(d.providerSpecificData=r.providerSpecificData),i.push(d)}return i}(e,u,{isCloudflareAi:w});if(!a.length)return;J(!0),H(null);let s=0,l=0;try{let e=await fetch("/api/providers/bulk",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({items:a.map(e=>({provider:t,apiKey:e.apiKey,name:e.name,priority:1,providerSpecificData:e.providerSpecificData}))})}),i=await e.json();s=Array.isArray(i.results)?i.results.filter(e=>e.ok).length:0,l=a.length-s}catch{l=a.length}J(!1),H({success:s,failed:l}),s>0&&f&&f()};return t?(0,s.jsx)(d.Modal,{isOpen:e,title:`Add ${a||t} ${k}`,onClose:y,children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(d.Button,{size:"sm",variant:"single"===F?"primary":"ghost",onClick:()=>{q("single"),H(null)},children:"Single"}),(0,s.jsx)(d.Button,{size:"sm",variant:"bulk"===F?"primary":"ghost",onClick:()=>{q("bulk"),H(null)},children:"Bulk Add"})]}),"bulk"===F&&(0,s.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,s.jsx)("p",{className:"text-xs text-text-muted",children:w?(0,s.jsxs)(s.Fragment,{children:["One key per line. Format: ",(0,s.jsx)("code",{children:"name|apiKey|accountId"})," or just ",(0,s.jsx)("code",{children:"apiKey"})," (auto-named by index)."]}):"exa"===t?(0,s.jsxs)(s.Fragment,{children:["One Exa account per line: ",(0,s.jsx)("code",{children:"name|apiKey"})," or ",(0,s.jsx)("code",{children:"apiKey"}),". Keys are stored without a billable probe; runtime rotates on auth, quota, and rate-limit errors."]}):(0,s.jsxs)(s.Fragment,{children:["One key per line. Format: ",(0,s.jsx)("code",{children:"name|apiKey"})," or just ",(0,s.jsx)("code",{children:"apiKey"})," (auto-named by index)."]})}),(0,s.jsx)("textarea",{className:"w-full rounded border border-accent/30 bg-sidebar p-2 text-sm font-mono resize-y min-h-[140px] focus:outline-none focus:ring-1 focus:ring-primary",placeholder:L,value:W,onChange:e=>V(e.target.value)}),G&&(0,s.jsxs)("div",{className:`text-sm font-medium ${G.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",G.success," added",G.failed>0?`, ✗ ${G.failed} failed`:""]}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(d.Button,{onClick:Y,fullWidth:!0,disabled:K||!W.trim(),children:K?"Adding...":"Add All Keys"}),(0,s.jsx)(d.Button,{onClick:y,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),"single"===F&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(d.Input,{label:"Name",value:A.name,onChange:e=>T({...A,name:e.target.value}),placeholder:b?"Ollama Local":"Production Key"}),b&&(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(d.Input,{label:"Ollama Host URL",value:A.ollamaHostUrl,onChange:e=>T({...A,ollamaHostUrl:e.target.value}),placeholder:"http://localhost:11434",className:"flex-1"}),(0,s.jsx)("div",{className:"pt-6",children:(0,s.jsx)(d.Button,{onClick:X,disabled:B||K,variant:"secondary",children:B?"Checking...":"Check"})})]}),!b&&(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(d.Input,{label:k,type:v?"text":"password",value:A.apiKey,onChange:e=>T({...A,apiKey:e.target.value}),placeholder:v?"grok-web"===t?"sso=xxxxx... or just the raw value":"eyJhbGciOi...":j?"xai-...":"",className:"flex-1"}),(0,s.jsx)("div",{className:"pt-6",children:(0,s.jsx)(d.Button,{onClick:X,disabled:!A.apiKey||B||K,variant:"secondary",children:B?"Checking...":"Check"})})]}),j&&(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Use a direct xAI API key from console.x.ai. This is separate from Grok Build OAuth."}),v&&o&&(0,s.jsxs)("p",{className:"text-xs text-text-muted",children:[o,m&&(0,s.jsxs)(s.Fragment,{children:[" ",(0,s.jsxs)("a",{href:m,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:["Open ",m.replace(/^https?:\/\//,"")]})]})]}),S&&(0,s.jsx)(d.Select,{label:"Region",value:E,onChange:e=>D(e.target.value),options:S.map(e=>({value:e.id,label:e.label}))}),b&&(0,s.jsxs)("p",{className:"text-xs text-text-muted",children:["Leave blank to use ",(0,s.jsx)("code",{children:"http://localhost:11434"}),". For remote Ollama, enter the full host URL (e.g. ",(0,s.jsx)("code",{children:"http://192.168.1.10:11434"}),")."]}),M&&(0,s.jsx)(d.Badge,{variant:"success"===M?"success":"error",children:"success"===M?"Valid":"Invalid"}),x&&(0,s.jsx)("p",{className:"text-xs text-red-500 break-words",children:x}),w&&(0,s.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,s.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Cloudflare Workers AI"}),(0,s.jsx)(d.Input,{label:"Account ID",value:$.accountId,onChange:e=>P({...$,accountId:e.target.value}),placeholder:"abc123def456..."}),(0,s.jsxs)("p",{className:"text-xs text-text-muted mt-2",children:["Find your Account ID in the right sidebar of ",(0,s.jsx)("a",{href:"https://dash.cloudflare.com",target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:"dash.cloudflare.com"})]})]}),N&&(0,s.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,s.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Azure OpenAI Configuration"}),(0,s.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,s.jsx)(d.Input,{label:"Azure Endpoint",value:I.azureEndpoint,onChange:e=>O({...I,azureEndpoint:e.target.value}),placeholder:"https://your-resource.openai.azure.com"}),(0,s.jsx)(d.Input,{label:"Deployment Name",value:I.deployment,onChange:e=>O({...I,deployment:e.target.value}),placeholder:"gpt-4"}),(0,s.jsx)(d.Input,{label:"API Version",value:I.apiVersion,onChange:e=>O({...I,apiVersion:e.target.value}),placeholder:"2024-10-01-preview"}),(0,s.jsx)(d.Input,{label:"Organization",value:I.organization,onChange:e=>O({...I,organization:e.target.value}),placeholder:"Organization ID"})]})]}),(0,s.jsx)(d.Input,{label:"Priority",type:"number",value:A.priority,onChange:e=>T({...A,priority:Number.parseInt(e.target.value)||1})}),(0,s.jsx)(d.Select,{label:"Proxy Pool",value:A.proxyPoolId,onChange:e=>T({...A,proxyPoolId:e.target.value}),options:[{value:g,label:"None"},...(p||[]).map(e=>({value:e.id,label:e.name}))],placeholder:"None"}),0===(p||[]).length&&(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"No active proxy pools available. Create one in Proxy Pools page first."}),(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Legacy manual proxy fields are still accepted by API for backward compatibility."}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(d.Button,{onClick:Z,fullWidth:!0,disabled:K||!b&&(!A.name||!A.apiKey)||N&&(!I.azureEndpoint||!I.deployment||!I.organization)||w&&!$.accountId,children:K?"Saving...":"Save"}),(0,s.jsx)(d.Button,{onClick:y,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})}):null}U.propTypes={isOpen:D().bool.isRequired,provider:D().string,providerName:D().string,isCompatible:D().bool,isAnthropic:D().bool,authType:D().string,authHint:D().string,website:D().string,proxyPools:D().arrayOf(D().shape({id:D().string,name:D().string})),error:D().string,existingNames:D().arrayOf(D().string),onSave:D().func.isRequired,onBulkDone:D().func,onClose:D().func.isRequired};let B=[{value:"chat",label:"Chat Completions"},{value:"responses",label:"Responses API"}];function z({isOpen:e,node:t,onSave:a,onClose:i,isAnthropic:r}){let[n,o]=(0,l.useState)(()=>({name:t?.name||"",prefix:t?.prefix||"",apiType:t?.apiType||"chat",baseUrl:t?.baseUrl||(r?"https://api.anthropic.com/v1":"https://api.openai.com/v1")})),[c,m]=(0,l.useState)(!1),[p,x]=(0,l.useState)(""),[u,h]=(0,l.useState)(""),[f,y]=(0,l.useState)(!1),[g,b]=(0,l.useState)(null),[v,j]=(0,l.useState)(t);t!==v&&(j(t),t&&o({name:t.name||"",prefix:t.prefix||"",apiType:t.apiType||"chat",baseUrl:t.baseUrl||(r?"https://api.anthropic.com/v1":"https://api.openai.com/v1")}));let k=async()=>{if(n.name.trim()&&n.prefix.trim()&&n.baseUrl.trim()){m(!0);try{let e={name:n.name,prefix:n.prefix,baseUrl:n.baseUrl};r||(e.apiType=n.apiType),await a(e)}finally{m(!1)}}},N=async()=>{y(!0);try{let e=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:n.baseUrl,apiKey:p,type:r?"anthropic-compatible":"openai-compatible",modelId:u.trim()||void 0})}),t=await e.json();b(t.valid?"success":"failed")}catch{b("failed")}finally{y(!1)}};return t?(0,s.jsx)(d.Modal,{isOpen:e,title:`Edit ${r?"Anthropic":"OpenAI"} Compatible`,onClose:i,children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsx)(d.Input,{label:"Name",value:n.name,onChange:e=>o({...n,name:e.target.value}),placeholder:`${r?"Anthropic":"OpenAI"} Compatible (Prod)`,hint:"Required. A friendly label for this node."}),(0,s.jsx)(d.Input,{label:"Prefix",value:n.prefix,onChange:e=>o({...n,prefix:e.target.value}),placeholder:r?"ac-prod":"oc-prod",hint:"Required. Used as the provider prefix for model IDs."}),!r&&(0,s.jsx)(d.Select,{label:"API Type",options:B,value:n.apiType,onChange:e=>o({...n,apiType:e.target.value})}),(0,s.jsx)(d.Input,{label:"Base URL",value:n.baseUrl,onChange:e=>o({...n,baseUrl:e.target.value}),placeholder:r?"https://api.anthropic.com/v1":"https://api.openai.com/v1",hint:`Use the base URL (ending in /v1) for your ${r?"Anthropic":"OpenAI"}-compatible API.`}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(d.Input,{label:"API Key (for Check)",type:"password",value:p,onChange:e=>x(e.target.value),className:"flex-1"}),(0,s.jsx)("div",{className:"pt-6",children:(0,s.jsx)(d.Button,{onClick:N,disabled:!p||f||!n.baseUrl.trim(),variant:"secondary",children:f?"Checking...":"Check"})})]}),(0,s.jsx)(d.Input,{label:"Model ID (optional)",value:u,onChange:e=>h(e.target.value),placeholder:"e.g. my-model-id",hint:"If provider lacks /models endpoint, enter a model ID to validate via chat/completions instead."}),g&&(0,s.jsx)(d.Badge,{variant:"success"===g?"success":"error",children:"success"===g?"Valid":"Invalid"}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(d.Button,{onClick:k,fullWidth:!0,disabled:!n.name.trim()||!n.prefix.trim()||!n.baseUrl.trim()||c,children:c?"Saving...":"Save"}),(0,s.jsx)(d.Button,{onClick:i,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}function M(e,t){switch(t.type){case"RESET":return{modelId:"",testStatus:null,testError:"",saving:!1};case"SET_MODEL":return{...e,modelId:t.value,testStatus:null,testError:""};case"TEST_START":return{...e,testStatus:"testing",testError:""};case"TEST_RESULT":return{...e,testStatus:t.ok?"ok":"error",testError:t.error||""};case"SAVE_START":return{...e,saving:!0};case"SAVE_DONE":return{...e,saving:!1};default:return e}}function R({isOpen:e,providerAlias:t,providerDisplayAlias:a,onSave:i,onClose:r}){let[n,o]=(0,l.useReducer)(M,{modelId:"",testStatus:null,testError:"",saving:!1}),{modelId:c,testStatus:m,testError:p,saving:x}=n,[u,h]=(0,l.useState)(!1);e&&!u?(h(!0),o({type:"RESET"})):!e&&u&&h(!1);let f=e=>{let a=`${t}/`;return e.startsWith(a)?e.slice(a.length):e},y=async()=>{let e=f(c.trim());if(e){o({type:"TEST_START"});try{let a=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${t}/${e}`})}),s=await a.json();o({type:"TEST_RESULT",ok:s.ok,error:s.error})}catch(e){o({type:"TEST_RESULT",ok:!1,error:e.message})}}},g=async()=>{let e=f(c.trim());if(e&&!x){o({type:"SAVE_START"});try{await i(e)}finally{o({type:"SAVE_DONE"})}}};return(0,s.jsx)(d.Modal,{isOpen:e,onClose:r,title:"Add Custom Model",children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{htmlFor:"add-custom-model-id",className:"text-sm font-medium mb-1.5 block",children:"Model ID"}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)("input",{id:"add-custom-model-id",type:"text",value:c,onChange:e=>o({type:"SET_MODEL",value:e.target.value}),onKeyDown:e=>{"Enter"===e.key&&y()},placeholder:"e.g. claude-opus-4-5",className:"flex-1 px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"}),(0,s.jsx)(d.Button,{variant:"secondary",icon:"science",loading:"testing"===m,onClick:y,disabled:!c.trim()||"testing"===m,children:"testing"===m?"Testing...":"Test"})]}),(0,s.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:["Sent to provider as: ",(0,s.jsx)("code",{className:"font-mono bg-sidebar px-1 rounded",children:f(c.trim())||"model-id"})]})]}),"ok"===m&&(0,s.jsxs)("div",{className:"flex items-center gap-2 text-sm text-green-600",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-base",children:"check_circle"}),"Model is reachable"]}),"error"===m&&(0,s.jsxs)("div",{className:"flex items-start gap-2 text-sm text-red-500",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-base shrink-0",children:"cancel"}),(0,s.jsx)("span",{children:p||"Model not reachable"})]}),(0,s.jsxs)("div",{className:"flex gap-2 pt-1",children:[(0,s.jsx)(d.Button,{onClick:r,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,s.jsx)(d.Button,{onClick:g,fullWidth:!0,size:"sm",disabled:!c.trim()||x,children:x?"Adding...":"Add Model"})]})]})})}let K=`[
|
|
8
|
-
{
|
|
9
|
-
"accessToken": "eyJhbGc...",
|
|
10
|
-
"refreshToken": "rt_...",
|
|
11
|
-
"idToken": "eyJhbGc...",
|
|
12
|
-
"email": "user@example.com"
|
|
13
|
-
}
|
|
14
|
-
]`;function J({isOpen:e,onClose:t,onSuccess:a}){let[i,r]=(0,l.useState)(""),[n,o]=(0,l.useState)(!1),[c,m]=(0,l.useState)(""),[p,x]=(0,l.useState)(null),u=()=>{n||(r(""),m(""),x(null),t())},h=async()=>{var e;let t;m(""),x(null);let s=i.trim();if(!s)return;try{t=JSON.parse(s)}catch(e){m(`${(0,N.Tl)("Invalid JSON")}: ${e.message}`);return}let l=Array.isArray(e=t)?e:e&&"object"==typeof e?Array.isArray(e.accounts)?e.accounts:[e]:null;if(!l||0===l.length)return void m((0,N.Tl)("No accounts found in input"));o(!0);try{let e=await fetch("/api/oauth/codex/bulk-import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accounts:l})}),t=await e.json();if(!e.ok)return void m(t?.error||`Request failed: ${e.status}`);x(t),t.success>0&&"function"==typeof a&&a()}catch(e){m(e.message||(0,N.Tl)("Request failed"))}finally{o(!1)}},f=p?.results?.filter(e=>!e.ok)||[];return(0,s.jsx)(d.Modal,{isOpen:e,title:(0,N.Tl)("Bulk Add Codex Accounts"),onClose:u,children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsx)("p",{className:"text-xs text-text-muted",children:(0,N.Tl)("Paste an array of codex account JSON objects. Each must include accessToken (and ideally refreshToken, idToken).")}),(0,s.jsx)("textarea",{className:"w-full rounded border border-accent/30 bg-sidebar p-2 text-sm font-mono resize-y min-h-[240px] focus:outline-none focus:ring-1 focus:ring-primary",placeholder:K,value:i,onChange:e=>r(e.target.value),disabled:n}),c&&(0,s.jsx)("p",{className:"text-xs text-red-500 break-words",children:c}),p&&(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.jsxs)("div",{className:`text-sm font-medium ${p.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",p.success," ",(0,N.Tl)("added"),p.failed>0?`, ✗ ${p.failed} ${(0,N.Tl)("failed")}`:""]}),f.length>0&&(0,s.jsx)("ul",{className:"rounded border border-accent/20 bg-sidebar/50 p-2 text-xs font-mono max-h-40 overflow-y-auto",children:f.map(e=>(0,s.jsxs)("li",{className:"text-red-400",children:["[",e.index,"] ",e.error]},e.index))})]}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(d.Button,{onClick:h,fullWidth:!0,disabled:n||!i.trim(),children:n?(0,N.Tl)("Importing..."):(0,N.Tl)("Import All")}),(0,s.jsx)(d.Button,{onClick:u,variant:"ghost",fullWidth:!0,disabled:n,children:(0,N.Tl)("Close")})]})]})})}let L=`[
|
|
15
|
-
{
|
|
16
|
-
"access_token": "eyJ0eXAiOiJhdCtqd3Qi...",
|
|
17
|
-
"refresh_token": "LZhriF9bf88pPykpXCuZ9...",
|
|
18
|
-
"id_token": "eyJ0eXAiOiJKV1QiLCJhbGci...",
|
|
19
|
-
"email": "account1@example.com"
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
"access_token": "eyJ0eXAiOiJhdCtqd3Qi...",
|
|
23
|
-
"refresh_token": "LZhriF9bf88pPykpXCuZ9...",
|
|
24
|
-
"id_token": "eyJ0eXAiOiJKV1QiLCJhbGci...",
|
|
25
|
-
"email": "account2@example.com"
|
|
26
|
-
}
|
|
27
|
-
]`;function F(e){let t,a=e.trim();if(!a)return[];try{t=JSON.parse(a)}catch(e){try{let e=a;e.startsWith("[")||((e=e.replace(/\}\s*,\s*\{/g,"},{").replace(/\}\s*\{/g,"},{")).endsWith(",")&&(e=e.slice(0,-1)),e=`[${e}]`),t=JSON.parse(e)}catch{throw e}}if(Array.isArray(t))return t;if(t&&"object"==typeof t)return Array.isArray(t.accounts)?t.accounts:[t];throw Error("Input must be a JSON object or array of objects")}function q({isOpen:e,onClose:t,onSuccess:a}){let[i,r]=(0,l.useState)(""),[n,o]=(0,l.useState)(!1),[c,m]=(0,l.useState)(""),[p,x]=(0,l.useState)(null),[u,h]=(0,l.useState)(!1),[f,y]=(0,l.useState)(null),g=(0,l.useRef)(null),b=()=>{n||(r(""),m(""),x(null),y(null),h(!1),t())},v=async e=>{if(!e||0===e.length)return;m("");let t=Array.from(e).filter(e=>e.name.endsWith(".json")||"application/json"===e.type||""===e.type);if(0===t.length)return void m((0,N.Tl)("Please select valid .json files"));try{let e=[];for(let a of t){let t=await a.text(),s=F(t);Array.isArray(s)?e.push(...s):s&&e.push(s)}if(0===e.length)return void m((0,N.Tl)("No accounts found in selected files"));r(JSON.stringify(e,null,2)),y({filesCount:t.length,accountsCount:e.length})}catch(e){m(`${(0,N.Tl)("Error reading files")}: ${e.message}`)}},j=async()=>{let e;m(""),x(null);try{e=F(i)}catch(e){m(`${(0,N.Tl)("Invalid JSON")}: ${e.message}`);return}if(!e||0===e.length)return void m((0,N.Tl)("No accounts found in input"));o(!0);try{let t=await fetch("/api/oauth/grok-cli/bulk-import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accounts:e})}),s=await t.json();if(!t.ok)return void m(s?.error||`Request failed: ${t.status}`);x(s),s.success>0&&"function"==typeof a&&a()}catch(e){m(e.message||(0,N.Tl)("Request failed"))}finally{o(!1)}},k=p?.results?.filter(e=>!e.ok)||[];return(0,s.jsx)(d.Modal,{isOpen:e,title:(0,N.Tl)("Bulk Add Grok CLI Accounts"),onClose:b,children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,s.jsx)("p",{className:"text-xs text-text-muted",children:(0,N.Tl)("Upload multiple .json files or paste JSON array / object.")}),(0,s.jsx)("input",{ref:g,type:"file",accept:".json,application/json",multiple:!0,className:"hidden",onChange:e=>{v(e.target.files),e.target&&(e.target.value="")}}),(0,s.jsx)(d.Button,{type:"button",size:"sm",variant:"secondary",icon:"upload_file",onClick:()=>g.current?.click(),disabled:n,children:(0,N.Tl)("Upload JSON Files")})]}),(0,s.jsxs)("div",{onDragOver:e=>{e.preventDefault(),h(!0)},onDragLeave:e=>{e.preventDefault(),h(!1)},onDrop:e=>{e.preventDefault(),h(!1),e.dataTransfer?.files?.length>0&&v(e.dataTransfer.files)},className:`relative rounded border transition-colors ${u?"border-primary bg-primary/10 ring-2 ring-primary/30":"border-accent/30 bg-sidebar"}`,children:[(0,s.jsx)("textarea",{className:"w-full rounded bg-transparent p-2.5 text-sm font-mono resize-y min-h-[240px] focus:outline-none focus:ring-1 focus:ring-primary",placeholder:L,value:i,onChange:e=>{r(e.target.value),y(null)},disabled:n}),u&&(0,s.jsxs)("div",{className:"absolute inset-0 flex flex-col items-center justify-center bg-sidebar/90 rounded pointer-events-none backdrop-blur-xs",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-3xl text-primary mb-1",children:"upload_file"}),(0,s.jsx)("span",{className:"text-sm font-medium text-primary",children:(0,N.Tl)("Drop .json files here")})]})]}),f&&(0,s.jsxs)("div",{className:"flex items-center gap-1.5 text-xs text-green-400 font-medium bg-green-500/10 border border-green-500/20 px-2.5 py-1.5 rounded",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"check_circle"}),(0,s.jsxs)("span",{children:[(0,N.Tl)("Loaded")," ",f.accountsCount," ",(0,N.Tl)("account(s) from")," ",f.filesCount," ",(0,N.Tl)("file(s)")]})]}),c&&(0,s.jsx)("p",{className:"text-xs text-red-500 break-words",children:c}),p&&p.failed>0&&(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.jsxs)("div",{className:"text-sm font-medium text-yellow-400",children:["✗ ",p.failed," ",(0,N.Tl)("failed")]}),k.length>0&&(0,s.jsx)("ul",{className:"rounded border border-accent/20 bg-sidebar/50 p-2 text-xs font-mono max-h-40 overflow-y-auto",children:k.map(e=>(0,s.jsxs)("li",{className:"text-red-400",children:["[",e.index,"] ",e.error]},e.index))})]}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(d.Button,{onClick:j,fullWidth:!0,disabled:n||!i.trim(),children:n?(0,N.Tl)("Importing..."):(0,N.Tl)("Import All")}),(0,s.jsx)(d.Button,{onClick:b,variant:"ghost",fullWidth:!0,disabled:n,children:(0,N.Tl)("Close")})]})]})})}let W={claude:"claudeAutoPing",codex:"codexAutoPing"};function V(){let e,t,a,r,p=(0,i.useParams)(),x=(0,i.useRouter)(),u=p.id,{getCaps:h}=(0,k.y)(),[f,y]=(0,l.useState)([]),[g,b]=(0,l.useState)(!0),[w,T]=(0,l.useState)(null),[O,$]=(0,l.useState)([]),[E,D]=(0,l.useState)(!1),[_,B]=(0,l.useState)(!1),[M,K]=(0,l.useState)(!1),[L,F]=(0,l.useState)(""),[V,G]=(0,l.useState)(!1),[H,Q]=(0,l.useState)(!1),[X,Z]=(0,l.useState)(!1),[Y,ee]=(0,l.useState)(!1),[et,ea]=(0,l.useState)(!1),[es,el]=(0,l.useState)(null),[ei,er]=(0,l.useState)({}),[en,eo]=(0,l.useState)([]),[ed,ec]=(0,l.useState)(!1),[em,ep]=(0,l.useState)({}),[ex,eu]=(0,l.useState)(""),[eh,ef]=(0,l.useState)(()=>new Set),[ey,eg]=(0,l.useState)(!1),[eb,ev]=(0,l.useState)([]),[ej,ek]=(0,l.useState)(1),[eN,ew]=(0,l.useState)("__none__"),[eS,eC]=(0,l.useState)(!1),[eA,eT]=(0,l.useState)(null),[eI,eO]=(0,l.useState)(""),[e$,eP]=(0,l.useState)(!1),[eE,eD]=(0,l.useState)("auto"),[e_,eU]=(0,l.useState)({enabled:!1,connections:{}}),[eB,ez]=(0,l.useState)([]),[eM,eR]=(0,l.useState)([]),[eK,eJ]=(0,l.useState)([]),[eL,eF]=(0,l.useState)([]),[eq,eW]=(0,l.useState)(null),[eV,eG]=(0,l.useState)(!1),[eH,eQ]=(0,l.useState)(!1),[eX,eZ]=(0,l.useState)(!1),[eY,e0]=(0,l.useState)(null),[e1,e2]=(0,l.useState)({}),[e5,e3]=(0,l.useState)(null),e4=(0,l.useRef)(!1),[e6,e8]=(0,l.useState)(!1),{copied:e7,copy:e9}=(0,j.C)(),te="ag_risk_confirmed",tt=()=>{D(!0)},ta=()=>{"antigravity"===u&&"true"!==window.localStorage.getItem(te)?eG(!0):tn?tt():(F(""),K(!0))},ts=()=>{F(""),K(!0)},tl=()=>{tn?ta():ts()},ti=w?{id:w.id,name:w.name||("anthropic-compatible"===w.type?"Anthropic Compatible":"OpenAI Compatible"),color:"anthropic-compatible"===w.type?"#D97757":"#10A37F",textIcon:"anthropic-compatible"===w.type?"AC":"OC",apiType:w.apiType,baseUrl:w.baseUrl,type:w.type}:c.zN[u]||c.fg[u]||c.IS[u]||c.nJ[u]||c.br[u],tr=ti?.authModes||[],tn=!!c.zN[u]||!!c.IS[u]||tr.includes("oauth"),to=!!c.fg[u]||tr.includes("apikey"),td=!!c.IS[u]?.noAuth,tc=(0,m.KC)(u),tm="cursor"===u&&eM.length>0?eM:tc,tp=(0,c.wG)(u),tx=(0,c.mq)(u),tu=(0,c.gb)(u),th=tx||tu,tf=!th&&tn&&to,ty="xai"===u?"Grok Build OAuth":"grok-cli"===u?"Grok CLI Device Login":"kimi"===u?"Kimi Coding OAuth":"OAuth",tg="xai"===u?"xAI API Key":"kimi"===u?"Kimi API Key":"qoder"===u?"PAT":"API Key",tb=e=>{if(!eE||"auto"===eE)return null;let t=v(u,e);return t&&t.includes(eE)?eE:null},tv=th?u:tp,tj=(e=new Map,t=t=>{t?.id&&!e.has(t.id)&&e.set(t.id,t)},tm.forEach(t),en.forEach(e=>{e.providerAlias===tv&&"llm"===(e.kind||e.type||"llm")&&t(e)}),a=new Set(eL),[...e.values()].filter(e=>!a.has(e.id))),tk=(()=>{let e=new Set,t=new Set,a=a=>{if(!a||t.has(a))return;t.add(a);let s=v(u,a);s&&s.forEach(t=>{"none"!==t&&e.add(t)})};for(let e of tm)a(e.id);for(let e of eK)a(e.id);for(let e of en)e.providerAlias===tv&&"llm"===(e.kind||e.type||"llm")&&a(e.id);return e.size?["auto",...e]:null})(),tN=th?w?.prefix||u:tp,tw=(0,l.useCallback)(async()=>{try{let e=await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tv)}`,{cache:"no-store"}),t=await e.json();e.ok&&eF(t.ids||[])}catch(e){console.log("Error fetching disabled models:",e)}},[tv]),tS=async e=>{try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:tv,ids:[e]})})).ok&&await tw()}catch(e){console.log("Error disabling model:",e)}},tC=async e=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tv)}&id=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await tw()}catch(e){console.log("Error enabling model:",e)}},tA=async e=>{e.length&&eW({title:"Disable All Models",message:`Disable all ${e.length} model(s)?`,onConfirm:async()=>{eW(null);try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:tv,ids:e})})).ok&&await tw()}catch(e){console.log("Error disabling all models:",e)}}})},tT=async()=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tv)}`,{method:"DELETE"})).ok&&await tw()}catch(e){console.log("Error enabling all models:",e)}},tI=(0,l.useCallback)(async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&er(t.aliases||{})}catch(e){console.log("Error fetching aliases:",e)}},[]),tO=(0,l.useCallback)(async()=>{try{let e=await fetch("/api/models/custom",{cache:"no-store"}),t=await e.json();e.ok&&eo(t.models||[])}catch(e){console.log("Error fetching custom models:",e)}},[]);(0,l.useEffect)(()=>{"kilocode"===u&&fetch("/api/providers/kilo/free-models").then(e=>e.json()).then(e=>{e.models?.length&&eJ(e.models)}).catch(()=>{})},[u]);let t$=(0,l.useCallback)(async()=>{try{let[e,t,a,s]=await Promise.all([fetch("/api/providers",{cache:"no-store"}),fetch("/api/provider-nodes",{cache:"no-store"}),fetch("/api/proxy-pools?isActive=true",{cache:"no-store"}),fetch("/api/settings",{cache:"no-store"})]),l=await e.json(),i=await t.json(),r=await a.json(),n=s.ok?await s.json():{};if(e.ok){let e=(l.connections||[]).filter(e=>e.provider===u);y(e)}a.ok&&$(r.proxyPools||[]);let o=(n.providerStrategies||{})[u]||{};eT(o.fallbackStrategy||null),eO(null!=o.stickyRoundRobinLimit?String(o.stickyRoundRobinLimit):"1"),eP(!0===o.strictModelAssignment);let d=(n.providerThinking||{})[u]||{};eD(d.mode||"auto");let c=W[u],m=c&&n[c]||{};if(eU({enabled:!0===m.enabled,connections:m.connections||{}}),t.ok){let e=(i.nodes||[]).find(e=>e.id===u)||null;if(!e&&th)for(let t=0;t<3;t+=1){await new Promise(e=>setTimeout(e,150));let t=await fetch("/api/provider-nodes",{cache:"no-store"});if(t.ok&&(e=((await t.json()).nodes||[]).find(e=>e.id===u)||null))break}T(e)}}catch(e){console.log("Error fetching connections:",e)}finally{b(!1)}},[u,th]),tP=async e=>{try{let t=await fetch(`/api/provider-nodes/${u}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),a=await t.json();t.ok&&(T(a.node),await t$(),ee(!1))}catch(e){console.log("Error updating provider node:",e)}},tE=async(e,t)=>{try{let a=await fetch("/api/settings",{cache:"no-store"}),s=(a.ok?await a.json():{}).providerStrategies||{},l={...s[u]||{}};e?l.fallbackStrategy=e:(delete l.fallbackStrategy,delete l.stickyRoundRobinLimit),"round-robin"===e&&""!==t&&(l.stickyRoundRobinLimit=Number(t)||3);let i={...s};0===Object.keys(l).length?delete i[u]:i[u]=l,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:i})})}catch(e){console.log("Error saving provider strategy:",e)}},tD=async e=>{eP(e);try{let t=await fetch("/api/settings",{cache:"no-store"}),a=(t.ok?await t.json():{}).providerStrategies||{};await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:{...a,[u]:{...a[u]||{},strictModelAssignment:e}}})})}catch(e){console.log("Error saving Freebuff strict assignment:",e)}},t_=async(e,t)=>{try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerSpecificData:{assignedModel:t||null}})})).ok&&y(a=>a.map(a=>a.id===e?{...a,providerSpecificData:{...a.providerSpecificData||{},assignedModel:t||null}}:a))}catch(e){console.log("Error saving Freebuff model assignment:",e)}},tU=async e=>{try{let t=await fetch("/api/settings",{cache:"no-store"}),a={...(t.ok?await t.json():{}).providerThinking||{}};e&&"auto"!==e?a[u]={mode:e}:delete a[u],await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerThinking:a})})}catch(e){console.log("Error saving thinking config:",e)}},tB=async e=>{let t=W[u];if(t){eU(e);try{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({[t]:e})})}catch(e){console.log("Error saving auto-ping config:",e)}}};(0,l.useEffect)(()=>{t$(),tI(),tO(),tw()},[t$,tI,tO,tw]),(0,l.useEffect)(()=>{if("cursor"!==u)return void eR([]);let e=f.find(e=>!1!==e.isActive);if(!e?.id)return void eR([]);let t=!1;return fetch(`/api/providers/${e.id}/models`,{cache:"no-store"}).then(async e=>({ok:e.ok,data:await e.json()})).then(({ok:e,data:a})=>{!t&&e&&Array.isArray(a.models)&&a.models.length>0&&eR(a.models)}).catch(()=>{}),()=>{t=!0}},[u,f]),(0,l.useEffect)(()=>{let e=(c.zN[u]||c.fg[u]||c.IS[u]||c.nJ[u])?.modelsFetcher;e&&S(e).then(ez)},[u]);let tz=async(e,t,a=tp)=>{let s=`${a}/${e}`;try{let e=await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:s,alias:t})});if(e.ok)await tI();else{let t=await e.json();alert(t.error||"Failed to set alias")}}catch(e){console.log("Error setting alias:",e)}},tM=async e=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await tI()}catch(e){console.log("Error deleting alias:",e)}},tR=async(e,t="llm",a=tv)=>{try{let s=await fetch("/api/models/custom",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:a,id:e,type:t})});if(s.ok)await tO(),window.dispatchEvent(new CustomEvent("customModelChanged"));else{let e=await s.json();alert(e.error||"Failed to add custom model")}}catch(e){console.log("Error adding custom model:",e)}},tK=async(e,t="llm",a=tv)=>{try{let s=new URLSearchParams({providerAlias:a,id:e,type:t});(await fetch(`/api/models/custom?${s}`,{method:"DELETE"})).ok&&(await tO(),window.dispatchEvent(new CustomEvent("customModelChanged")))}catch(e){console.log("Error deleting custom model:",e)}},tJ=async()=>{if(e6)return;let e=f.find(e=>!1!==e.isActive);if(!e)return void alert((0,N.Tl)("Please add an active Qoder connection first"));e8(!0);try{let t=await fetch(`/api/providers/${e.id}/models`),a=await t.json();if(!t.ok)return void alert(a.error||(0,N.Tl)("Failed to fetch models"));let s=a.models||[];if(0===s.length)return void alert((0,N.Tl)("No models returned"));let l=0;for(let e of s){let t=e.id||e.name;if(!t)continue;let a=t.replace(/^qoder\//,"");en.some(e=>e.providerAlias===tv&&e.id===a&&"llm"===(e.kind||e.type||"llm"))||Object.values(ei).includes(`${tv}/${a}`)||(await tR(a,"llm",tv),l+=1)}0===l?alert((0,N.Tl)("All models already exist, no new models added")):alert((0,N.Tl)("Successfully added")+` ${l} `+(0,N.Tl)("models"))}catch(e){console.log("Error importing Qoder models:",e),alert((0,N.Tl)("Error fetching models")+": "+e.message)}finally{e8(!1)}},tL=async()=>{if(eH||0===f.length)return;let e=Object.fromEntries(f.map(e=>[e.id,{state:"queued",error:null}]));e4.current=!1,eQ(!0),eZ(!1),e0(null),e2(e),e3({total:f.length,completed:0,passed:0,failed:0,stopped:!1});let t=0,a=0;try{for(let e=0;e<f.length;e+=1){if(e4.current){e3({total:f.length,completed:e,passed:t,failed:a,stopped:!0});break}let s=f[e];e0(s.id),e2(e=>({...e,[s.id]:{state:"testing",error:null}}));try{let e=await fetch(`/api/providers/${s.id}/test`,{method:"POST"}),l=await e.json(),i=!!l.valid;i?t+=1:a+=1,e2(e=>({...e,[s.id]:{state:i?"success":"failed",error:i?null:l.error||null}}))}catch(e){a+=1,e2(t=>({...t,[s.id]:{state:"failed",error:e.message||"Test failed"}}))}e3({total:f.length,completed:e+1,passed:t,failed:a,stopped:!1}),e<f.length-1&&await new Promise(e=>setTimeout(e,1e3))}}finally{e0(null),eQ(!1),eZ(!1),e4.current=!1}},tF=async e=>{eW({title:"Delete Connection",message:"Delete this connection?",onConfirm:async()=>{eW(null);try{(await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok&&y(t=>t.filter(t=>t.id!==e))}catch(e){console.log("Error deleting connection:",e)}}})},tq=()=>{t$(),D(!1)},tW=async e=>{F("");try{let t=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:u,...e})}),a=null;try{a=await t.json()}catch{a=null}if(t.ok){await t$(),K(!1);return}F(a?.error||"Failed to save connection")}catch(e){console.log("Error saving connection:",e),F("Failed to save connection")}},tV=async e=>{try{(await fetch(`/api/providers/${es.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await t$(),Z(!1))}catch(e){console.log("Error updating connection:",e)}},tG=async(e,t)=>{try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&y(a=>a.map(a=>a.id===e?{...a,isActive:t}:a))}catch(e){console.log("Error updating connection status:",e)}},tH=async(e,t)=>{let a=[...f];[a[e],a[t]]=[a[t],a[e]],y(a);try{await Promise.all([fetch(`/api/providers/${a[e].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:e})}),fetch(`/api/providers/${a[t].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:t})})])}catch(e){console.log("Error swapping priority:",e),await t$()}},tQ=f.filter(e=>eb.includes(e.id)),{currentPage:tX,totalPages:tZ,items:tY,start:t0}=function(e=[],t=1){let a=Array.isArray(e)?e:[],s=a.length,l=Math.max(1,Math.ceil(s/10)),i=Math.floor(Number(t)),r=Math.min(Number.isFinite(i)&&i>0?i:1,l),n=(r-1)*10,o=a.slice(n,n+10);return{currentPage:r,totalPages:l,totalItems:s,start:n,items:o,pageSize:10}}(f,ej),t1=f.length>0&&eb.length===f.length;(0,l.useEffect)(()=>{ev(e=>e.filter(e=>f.some(t=>t.id===e)))},[f]);let t2=(()=>{if(0===tQ.length)return"";let e=new Set(tQ.map(e=>e.providerSpecificData?.proxyPoolId||"__none__"));if(1===e.size){let t=[...e][0];if("__none__"===t)return"All selected currently unbound";let a=O.find(e=>e.id===t);return`All selected currently bound to ${a?.name||t}`}return"Selected connections have mixed proxy bindings"})(),t5=()=>{eS||ea(!1)},t3=async(e,t)=>{let a=await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!a.ok)throw Error((await a.json().catch(()=>({}))).error||`Proxy update failed (${a.status})`);return a.json()},t4=async e=>{eC(!0);try{let t=[];for(let{connectionId:a,proxyPoolId:s,proxyPoolIds:l,proxyRotationStrategy:i}of e)try{let e=l?{proxyPoolIds:l,proxyRotationStrategy:i}:{proxyPoolId:s};await t3(a,e)}catch(e){console.log("Error applying proxy for",a,e),t.push(a)}if(await t$(),t.length>0)return void alert(`Updated with ${t.length} failed request(s). Retry the selected connections.`);ea(!1),ev([]),ew("__none__")}finally{eC(!1)}},t6=e=>t4((eb.length>0?tQ:f).map(t=>({connectionId:t.id,proxyPoolId:e}))),t8=(0,s.jsxs)("div",{className:"flex min-w-0 flex-col divide-y divide-black/[0.03] dark:divide-white/[0.03]",children:[tY.map((e,t)=>{let a,l=t0+t;return(0,s.jsxs)("div",{className:"flex min-w-0 items-stretch",children:[(0,s.jsx)("div",{className:"flex shrink-0 items-center pl-1 sm:pl-2",children:(0,s.jsx)("input",{type:"checkbox",checked:(a=e.id,eb.includes(a)),onChange:()=>{var t;return t=e.id,void ev(e=>e.includes(t)?e.filter(e=>e!==t):[...e,t])},className:"h-4 w-4 rounded border-gray-300 text-primary focus:ring-primary"})}),(0,s.jsx)("div",{className:"flex-1 min-w-0",children:(0,s.jsx)(P,{connection:e,proxyPools:O,isOAuth:tn,isFirst:0===l,isLast:l===f.length-1,onMoveUp:()=>tH(l,l-1),onMoveDown:()=>tH(l,l+1),onToggleActive:t=>tG(e.id,t),autoPing:W[u]&&"oauth"===e.authType?{on:!0===e_.connections[e.id],onToggle:t=>{var a;return a=e.id,void tB({...e_,connections:{...e_.connections,[a]:t}})},provider:u}:null,onUpdateProxy:async t=>{try{let a="object"==typeof t?t:{proxyPoolId:t||null};if((await fetch(`/api/providers/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)})).ok){let t={...e.providerSpecificData};a.proxyPoolIds?(t.proxyPoolIds=a.proxyPoolIds,t.proxyRotationStrategy=a.proxyRotationStrategy,delete t.proxyPoolId):(a.proxyPoolId?t.proxyPoolId=a.proxyPoolId:delete t.proxyPoolId,delete t.proxyPoolIds,delete t.proxyRotationStrategy),y(a=>a.map(a=>a.id===e.id?{...a,providerSpecificData:t}:a))}}catch(e){console.log("Error updating proxy:",e)}},onEdit:()=>{el(e),Z(!0)},onDelete:()=>tF(e.id),oneByOneStatus:e1[e.id]||null,modelAssignmentOptions:"freebuff"===u?tj:null,onModelAssignmentChange:"freebuff"===u?t=>t_(e.id,t):null,strictModelAssignment:e$})})]},e.id)}),f.length>10&&(0,s.jsx)(d.Pagination,{currentPage:tX,pageSize:10,totalItems:f.length,onPageChange:ek})]}),t7=O.filter(e=>!0===e.isActive),t9=(0,s.jsx)(d.Modal,{isOpen:et,onClose:t5,title:eb.length>0?`Apply Proxy (${eb.length} selected)`:`Apply Proxy (All ${f.length} connections)`,children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[t2&&(0,s.jsx)("p",{className:"text-xs text-text-muted bg-surface-2 px-3 py-2 rounded-lg border border-border/50",children:t2}),(0,s.jsxs)("div",{className:"flex flex-col divide-y divide-border/30 border border-border/50 rounded-xl overflow-hidden bg-surface",children:[(0,s.jsxs)("div",{className:"p-3 flex flex-col gap-1",children:[(0,s.jsx)("p",{className:"px-3 pb-1 text-[10px] font-semibold uppercase tracking-wider text-text-muted",children:"Dynamic Strategies"}),(0,s.jsxs)("button",{type:"button",onClick:()=>{let e=O.filter(e=>!0===e.isActive);return 0===e.length?void alert("No active proxy pools available."):t4((eb.length>0?tQ:f).map((t,a)=>({connectionId:t.id,proxyPoolId:e[a%e.length].id})))},disabled:eS||0===t7.length,className:"flex items-center gap-3 rounded-lg px-3 py-2 text-left transition-colors hover:bg-surface-2 disabled:cursor-not-allowed disabled:opacity-50",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[20px]",children:"sync_alt"}),(0,s.jsxs)("div",{className:"flex flex-col",children:[(0,s.jsx)("span",{className:"text-sm font-medium text-text-main",children:"One-to-one (rotate)"}),(0,s.jsx)("span",{className:"text-[10px] text-text-muted mt-0.5",children:"Distribute active proxy pools round-robin"})]})]}),["fill-first","round-robin","random","smart"].map(e=>(0,s.jsxs)("button",{type:"button",onClick:()=>{let t;return(t=t7.map(e=>e.id).filter(e=>O.find(t=>t.id===e)?.isActive===!0)).length?t4((eb.length>0?tQ:f).map(a=>({connectionId:a.id,proxyPoolIds:t,proxyRotationStrategy:e}))):void alert("No active proxy pools selected.")},disabled:eS||0===t7.length,className:"flex items-center gap-3 rounded-lg px-3 py-2 text-left transition-colors hover:bg-surface-2 disabled:cursor-not-allowed disabled:opacity-50",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[20px]",children:"autorenew"}),(0,s.jsxs)("div",{className:"flex flex-col",children:[(0,s.jsxs)("span",{className:"text-sm font-medium text-text-main capitalize",children:[e," strategy"]}),(0,s.jsx)("span",{className:"text-[10px] text-text-muted mt-0.5",children:"smart"===e?"Bypass pools marked unfit for provider/model":`Rotate over all active pools using ${e}`})]})]},e))]}),(0,s.jsxs)("div",{className:"p-3 flex flex-col gap-1",children:[(0,s.jsx)("p",{className:"px-3 pb-1 text-[10px] font-semibold uppercase tracking-wider text-text-muted",children:"Static Assignment"}),(0,s.jsxs)("button",{type:"button",onClick:()=>t6(null),disabled:eS,className:"flex items-center gap-3 rounded-lg px-3 py-2 text-left transition-colors hover:bg-surface-2 disabled:cursor-not-allowed disabled:opacity-50",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[20px]",children:"link_off"}),(0,s.jsxs)("div",{className:"flex flex-col",children:[(0,s.jsx)("span",{className:"text-sm font-medium text-text-main",children:"None (unbind all)"}),(0,s.jsx)("span",{className:"text-[10px] text-text-muted mt-0.5",children:"Direct routing without proxy"})]})]}),O.map(e=>(0,s.jsxs)("button",{type:"button",onClick:()=>t6(e.id),disabled:eS||!0!==e.isActive,className:"flex items-center gap-3 rounded-lg px-3 py-2 text-left transition-colors hover:bg-surface-2 disabled:cursor-not-allowed disabled:opacity-50",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[20px]",children:"lan"}),(0,s.jsxs)("div",{className:"flex flex-col min-w-0 flex-1",children:[(0,s.jsx)("span",{className:"truncate text-sm font-medium text-text-main",children:e.name}),(0,s.jsx)("span",{className:"text-[10px] text-text-muted truncate mt-0.5",children:e.proxyUrl})]}),!0!==e.isActive&&(0,s.jsx)(d.Badge,{variant:"secondary",size:"sm",className:"ml-auto shrink-0",children:"inactive"})]},e.id))]})]}),eS&&(0,s.jsx)("p",{className:"text-xs text-text-muted animate-pulse px-1",children:"Applying proxy configuration..."}),(0,s.jsx)(d.Button,{onClick:t5,variant:"ghost",fullWidth:!0,disabled:eS,children:"Cancel"})]})}),ae=async e=>{if(!eh.has(e)){ef(t=>new Set(t).add(e));try{let t=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${tv}/${e}`})}),a=await t.json();ep(t=>({...t,[e]:a.ok?"ok":"error"})),eu(a.ok?"":a.error||"Model not reachable")}catch{ep(t=>({...t,[e]:"error"})),eu("Network error")}finally{ef(t=>{let a=new Set(t);return a.delete(e),a})}}};return g?(0,s.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,s.jsx)(d.CardSkeleton,{}),(0,s.jsx)(d.CardSkeleton,{})]}):ti?(0,s.jsxs)("div",{className:"flex min-w-0 flex-col gap-6 px-1 sm:gap-8 sm:px-0",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)(n(),{href:"/dashboard/providers",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary transition-colors mb-4",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),"Back to Providers"]}),(0,s.jsxs)("div",{className:"flex min-w-0 items-center gap-3 sm:gap-4",children:[(0,s.jsx)(o.A,{providerId:ti.id,size:48,alt:ti.name,className:"shrink-0 rounded-lg",fallbackText:ti.textIcon||ti.id.slice(0,2).toUpperCase(),fallbackColor:ti.color}),(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[(0,s.jsx)("h1",{className:"truncate text-2xl font-semibold tracking-tight sm:text-3xl",children:ti.name}),(ti.notice?.apiKeyUrl||ti.notice?.signupUrl||ti.website)&&(0,s.jsxs)("a",{href:ti.notice?.apiKeyUrl||ti.notice?.signupUrl||ti.website,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline inline-flex items-center gap-1",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),ti.notice?.apiKeyUrl?"Get API Key":"Sign up / Learn more"]})]}),(0,s.jsxs)("p",{className:"text-text-muted",children:[f.length," connection",1===f.length?"":"s"]})]})]})]}),ti.deprecated&&(0,s.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-yellow-500/10 border border-yellow-500/30",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px] text-yellow-500 mt-0.5 shrink-0",children:"warning"}),(0,s.jsx)("p",{className:"text-xs text-red-600 dark:text-yellow-400 leading-relaxed",children:ti.deprecationNotice})]}),ti.notice?.text&&!ti.deprecated&&(0,s.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,s.jsx)("span",{className:"material-symbols-outlined text-[16px] text-blue-500 shrink-0",children:"info"}),(0,s.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-blue-600 dark:text-blue-400",children:ti.notice.text}),ti.notice.apiKeyUrl&&(0,s.jsx)("a",{href:ti.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 →"})]}),th&&w&&(0,s.jsx)(d.Card,{children:(0,s.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold",children:tu?"Anthropic Compatible Details":"OpenAI Compatible Details"}),(0,s.jsxs)("p",{className:"break-all text-sm text-text-muted",children:[tu?"Messages API":"responses"===w.apiType?"Responses API":"Chat Completions"," \xb7 ",(w.baseUrl||"").replace(/\/$/,""),"/",tu?"messages":"responses"===w.apiType?"responses":"chat/completions"]})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,s.jsx)(d.Button,{size:"sm",icon:"add",onClick:()=>{F(""),K(!0)},className:"w-full sm:w-auto",children:"Add API Key"}),(0,s.jsx)(d.Button,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>ee(!0),className:"w-full sm:w-auto",children:"Edit"}),(0,s.jsx)(d.Button,{size:"sm",variant:"secondary",icon:"delete",onClick:async()=>{eW({title:"Delete Compatible Node",message:`Delete this ${tu?"Anthropic":"OpenAI"} Compatible node?`,onConfirm:async()=>{eW(null);try{(await fetch(`/api/provider-nodes/${u}`,{method:"DELETE"})).ok&&x.push("/dashboard/providers")}catch(e){console.log("Error deleting provider node:",e)}}})},className:"w-full sm:w-auto",children:"Delete"})]})]})}),td?(0,s.jsx)(d.NoAuthProxyCard,{providerId:u}):(0,s.jsxs)(d.Card,{children:[(0,s.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold",children:"Connections"}),(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-4",children:[f.length>0&&O.length>0&&(0,s.jsx)(d.Button,{size:"sm",variant:"secondary",icon:"lan",onClick:()=>ea(!0),children:"Apply Proxy"}),f.length>0&&(0,s.jsxs)(s.Fragment,{children:[eb.length>0&&(0,s.jsxs)(d.Button,{size:"sm",variant:"danger",icon:"delete",onClick:()=>{let e=eb.length;0!==e&&eW({title:`Delete ${e} Connection${e>1?"s":""}`,message:`Delete ${e} connection${e>1?"s":""}? This cannot be undone.`,onConfirm:async()=>{eW(null);let e=0,t=[...eb];for(let a of t)try{(await fetch(`/api/providers/${a}`,{method:"DELETE"})).ok||(e+=1)}catch(t){console.log("Error deleting connection:",t),e+=1}y(e=>e.filter(e=>!t.includes(e.id))),ev([]),e>0&&alert(`Deleted ${t.length-e} connection(s), ${e} failed.`)}})},children:["Delete Selected (",eb.length,")"]}),(0,s.jsx)(d.Button,{size:"sm",variant:"secondary",icon:"sync",onClick:tL,disabled:eH,children:eH?"Testing Connection One-by-One...":"Test Connection One-by-One"}),eH&&(0,s.jsx)(d.Button,{size:"sm",variant:"ghost",icon:"stop",onClick:()=>{eH&&(e4.current=!0,eZ(!0))},disabled:eX,children:eX?"Stopping...":"Stop"})]}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,s.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"Round Robin"}),(0,s.jsx)(d.Toggle,{checked:"round-robin"===eA,onChange:e=>{let t=e?"round-robin":null,a=e?eI||"1":eI;e&&!eI&&eO("1"),eT(t),tE(t,a)}}),"round-robin"===eA&&(0,s.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,s.jsx)("span",{className:"text-xs text-text-muted",children:"Sticky:"}),(0,s.jsx)("input",{type:"number",min:1,value:eI,onChange:e=>{var t;eO(t=e.target.value),tE("round-robin",t)},placeholder:"1",className:"w-14 px-2 py-1 text-xs border border-border rounded-md bg-background focus:outline-none focus:border-primary"})]})]}),"freebuff"===u&&(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2 border-t border-black/[0.03] pt-2 dark:border-white/[0.03]",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"Strict Model Assignment"}),(0,s.jsx)("p",{className:"text-[10px] text-text-muted",children:"Only assigned accounts can serve each Freebuff model."})]}),(0,s.jsx)(d.Toggle,{checked:e$,onChange:tD})]})]})]}),0===f.length?(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("div",{className:"inline-flex items-center justify-center w-9 h-9 rounded-full bg-primary/10 text-primary shrink-0",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:tn?"lock":"key"})}),(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"No connections yet"}),tf&&(0,s.jsxs)("p",{className:"text-xs text-text-muted",children:["Choose ",ty," or ",tg,"."]})]})]}),(0,s.jsx)("div",{className:"flex gap-2",children:tf?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(d.Button,{size:"sm",icon:"lock",variant:"secondary",onClick:ta,children:ty}),(0,s.jsx)(d.Button,{size:"sm",icon:"key",onClick:ts,children:tg})]}):(0,s.jsxs)(s.Fragment,{children:[!th&&"iflow"===u&&(0,s.jsx)(d.Button,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>B(!0),children:"Cookie"}),"codex"===u&&(0,s.jsx)(d.Button,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>G(!0),children:(0,N.Tl)("Bulk Add")}),"grok-cli"===u&&(0,s.jsx)(d.Button,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>Q(!0),children:(0,N.Tl)("Bulk Add")}),(0,s.jsx)(d.Button,{size:"sm",icon:"add",onClick:tl,children:th?"Add API Key":"iflow"===u?"OAuth":"Add Connection"})]})})]}):(0,s.jsxs)(s.Fragment,{children:[e5&&(0,s.jsx)("div",{className:"mb-4 rounded-lg border border-black/10 bg-black/[0.02] px-3 py-2 text-xs text-text-muted dark:border-white/10 dark:bg-white/[0.03]",children:(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,s.jsxs)("span",{children:["Total: ",e5.total]}),(0,s.jsxs)("span",{children:["Completed: ",e5.completed]}),(0,s.jsxs)("span",{children:["Passed: ",e5.passed]}),(0,s.jsxs)("span",{children:["Failed: ",e5.failed]}),e5.stopped&&(0,s.jsx)("span",{className:"text-amber-600 dark:text-amber-400",children:"Stopped"}),eH&&eY&&(0,s.jsxs)("span",{children:["Running: ",f.find(e=>e.id===eY)?.name||eY]})]})}),f.length>0&&(0,s.jsx)("div",{className:"mb-3 flex items-center gap-2 border-b border-black/[0.03] pb-2 dark:border-white/[0.03]",children:(0,s.jsxs)("label",{className:"flex cursor-pointer items-center gap-1.5 text-xs text-text-muted hover:text-primary",children:[(0,s.jsx)("input",{type:"checkbox",checked:t1,onChange:()=>{t1?ev([]):ev(f.map(e=>e.id))},className:"h-3.5 w-3.5 rounded border-gray-300 text-primary focus:ring-primary"}),"Select All"]})}),t8,!th&&(0,s.jsxs)("div",{className:"mt-4 grid grid-cols-1 gap-2 sm:flex",children:["iflow"===u&&(0,s.jsx)(d.Button,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>B(!0),title:"Add connection using browser cookie",className:"w-full sm:w-auto",children:"Cookie"}),"codex"===u&&(0,s.jsx)(d.Button,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>G(!0),title:(0,N.Tl)("Bulk import codex accounts from JSON"),className:"w-full sm:w-auto",children:(0,N.Tl)("Bulk Add")}),"grok-cli"===u&&(0,s.jsx)(d.Button,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>Q(!0),title:(0,N.Tl)("Bulk import Grok CLI accounts from JSON"),className:"w-full sm:w-auto",children:(0,N.Tl)("Bulk Add")}),tf?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(d.Button,{size:"sm",icon:"lock",variant:"secondary",onClick:ta,className:"w-full sm:w-auto",children:ty}),(0,s.jsx)(d.Button,{size:"sm",icon:"key",onClick:ts,className:"w-full sm:w-auto",children:tg})]}):(0,s.jsx)(d.Button,{size:"sm",icon:"add",onClick:tl,className:"w-full sm:w-auto",children:"Add"})]})]})]}),(0,s.jsxs)(d.Card,{children:[(0,s.jsxs)("div",{className:"mb-4 flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold",children:"Available Models"}),tk&&(0,s.jsx)("select",{value:eE,onChange:e=>{var t;eD(t=e.target.value),tU(t)},title:"Appends (level) suffix to copied model names",className:"rounded-md border border-border bg-background px-2 py-1 text-xs focus:border-primary focus:outline-none",children:tk.map(e=>(0,s.jsx)("option",{value:e,children:`Thinking: ${e.charAt(0).toUpperCase()+e.slice(1)}`},e))})]}),!th&&(r=[...tm,...eK.filter(e=>!tm.some(t=>t.id===e.id))].filter(e=>{let t=(0,m.CP)(e);return!t||"llm"===t}).map(e=>e.id).filter(e=>!eL.includes(e)),(0,s.jsxs)("div",{className:"flex gap-2",children:[eL.length>0&&(0,s.jsx)(d.Button,{size:"sm",variant:"secondary",icon:"restart_alt",onClick:tT,children:"Active All"}),r.length>0&&(0,s.jsx)(d.Button,{size:"sm",variant:"secondary",icon:"block",onClick:()=>tA(r),children:"Disable All"})]}))]}),!!ex&&(0,s.jsx)("p",{className:"text-xs text-red-500 mb-3 break-words",children:ex}),(()=>{let e,t,a;if(th)return(0,s.jsx)(I,{providerStorageAlias:tv,providerDisplayAlias:tN,modelAliases:ei,customModels:en,copied:e7,onCopy:e9,onSetAlias:tz,onDeleteAlias:tM,onAddCustomModel:e=>tR(e,"llm",tv),onDeleteCustomModel:e=>tK(e,"llm",tv),connections:f,isAnthropic:tu});let l=[...tm,...eK.filter(e=>!tm.some(t=>t.id===e.id))].filter(e=>{let t=(0,m.CP)(e);return!t||"llm"===t}),i=new Set(eL),r=l.filter(e=>!i.has(e.id)),n=l.filter(e=>i.has(e.id)),o=C({customModels:en,modelAliases:ei,providerAlias:tv,builtInModels:tm,type:"llm"});return(0,s.jsxs)("div",{className:"flex flex-wrap gap-3",children:[o.map(e=>(0,s.jsx)(A,{model:{id:e.id,name:e.name},fullModel:`${tN}/${e.id}`,alias:e.alias,copied:e7,onCopy:e9,onSetAlias:()=>{},onDeleteAlias:()=>{"custom"===e.source?tK(e.id,"llm",tv):tM(e.alias)},testStatus:em[e.id],onTest:f.length>0||td?()=>ae(e.id):void 0,isTesting:eh.has(e.id),isCustom:!0,isFree:!1,caps:h(`${u}/${e.id}`),thinkingSuffix:tb(e.id)},`${e.source}-${e.fullModel}`)),r.map(e=>{let t=`${tv}/${e.id}`,a=`${u}/${e.id}`,l=Object.entries(ei).find(([,e])=>e===t||e===a)?.[0];return(0,s.jsx)(A,{model:e,fullModel:`${tN}/${e.id}`,alias:l,copied:e7,onCopy:e9,onSetAlias:t=>tz(e.id,t,tv),onDeleteAlias:()=>tM(l),testStatus:em[e.id],onTest:f.length>0||td?()=>ae(e.id):void 0,isTesting:eh.has(e.id),isFree:e.isFree,onDisable:()=>tS(e.id),caps:h(`${u}/${e.id}`),thinkingSuffix:tb(e.id)},e.id)}),(0,s.jsxs)("button",{onClick:()=>eg(!0),className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-primary/40 px-3 py-2 text-xs text-primary transition-colors hover:border-primary hover:bg-primary/5 sm:w-auto",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"}),"Add Model"]}),"qoder"===u&&f.some(e=>!1!==e.isActive)&&(0,s.jsxs)("button",{onClick:tJ,disabled:e6,className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-blue-500/40 px-3 py-2 text-xs text-blue-600 dark:text-blue-400 transition-colors hover:border-blue-500 hover:bg-blue-500/5 sm:w-auto disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",style:e6?{animation:"spin 1s linear infinite"}:void 0,children:e6?"progress_activity":"download"}),e6?(0,N.Tl)("Fetching..."):(0,N.Tl)("Fetch Qoder Models")]}),eB.length>0&&(e=new Set([...Object.values(ei),...o.map(e=>e.fullModel)]),t=new Set(tm.map(e=>e.id)),0===(a=eB.filter(a=>!e.has(`${tv}/${a.id}`)&&!t.has(a.id))).length?null:(0,s.jsxs)("div",{className:"w-full mt-2",children:[(0,s.jsx)("p",{className:"text-xs text-text-muted mb-2",children:"Suggested free models (≥200k context):"}),(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:a.map(e=>(0,s.jsxs)("button",{onClick:async()=>{await tR(e.id,"llm",tv)},className:"flex items-center gap-1 px-2.5 py-1.5 rounded-lg border border-black/10 dark:border-white/10 text-xs text-text-muted hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-colors",title:`${e.name} \xb7 ${(e.contextLength/1e3).toFixed(0)}k ctx`,children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),e.id.split("/").pop()]},e.id))})]})),n.length>0&&(0,s.jsxs)("div",{className:"w-full mt-2",children:[(0,s.jsxs)("p",{className:"text-xs text-text-muted mb-2",children:["Disabled models (",n.length,"):"]}),(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:n.map(e=>(0,s.jsxs)("button",{onClick:()=>tC(e.id),className:"flex items-center gap-1 px-2.5 py-1.5 rounded-lg border border-dashed border-black/10 dark:border-white/10 text-xs text-text-muted hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-colors",title:"Restore model",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),e.id]},e.id))})]})]})})()]}),t9,"kiro"===u?(0,s.jsx)(d.KiroOAuthWrapper,{isOpen:E,providerInfo:ti,onSuccess:tq,onClose:()=>D(!1)}):"cursor"===u?(0,s.jsx)(d.CursorAuthModal,{isOpen:E,onSuccess:tq,onClose:()=>D(!1)}):"gitlab"===u?(0,s.jsx)(d.GitLabAuthModal,{isOpen:E,providerInfo:ti,onSuccess:tq,onClose:()=>D(!1)}):(0,s.jsx)(d.OAuthModal,{isOpen:E,provider:u,providerInfo:ti,onSuccess:tq,onClose:()=>D(!1)}),"iflow"===u&&(0,s.jsx)(d.IFlowCookieModal,{isOpen:_,onSuccess:()=>{t$(),B(!1)},onClose:()=>B(!1)}),(0,s.jsx)(U,{isOpen:M,provider:u,providerName:ti.name,isCompatible:th,isAnthropic:tu,authType:ti?.authType,authHint:ti?.authHint,website:ti?.website,proxyPools:O,error:L,existingNames:f.map(e=>e.name).filter(Boolean),onSave:tW,onBulkDone:t$,onClose:()=>{F(""),K(!1)}}),(0,s.jsx)(d.EditConnectionModal,{isOpen:X,connection:es,proxyPools:O,onSave:tV,onClose:()=>Z(!1)}),th&&(0,s.jsx)(z,{isOpen:Y,node:w,onSave:tP,onClose:()=>ee(!1),isAnthropic:tu}),!th&&(0,s.jsx)(R,{isOpen:ey,providerAlias:tv,providerDisplayAlias:tN,onSave:async e=>{await tR(e,"llm",tv),eg(!1)},onClose:()=>eg(!1)}),"codex"===u&&(0,s.jsx)(J,{isOpen:V,onClose:()=>G(!1),onSuccess:t$}),"grok-cli"===u&&(0,s.jsx)(q,{isOpen:H,onClose:()=>Q(!1),onSuccess:t$}),(0,s.jsx)(d.ConfirmModal,{isOpen:eV,onClose:()=>eG(!1),onConfirm:()=>{(window.localStorage.setItem(te,"true"),eG(!1),tn)?tt():ts()},title:"Risk Notice",message:ti?.deprecationNotice,confirmText:"I Understand, Continue",cancelText:"Cancel",variant:"danger"}),(0,s.jsx)(d.ConfirmModal,{isOpen:!!eq,onClose:()=>eW(null),onConfirm:eq?.onConfirm,title:eq?.title||"Confirm",message:eq?.message,variant:"danger"})]}):(0,s.jsxs)("div",{className:"text-center py-20",children:[(0,s.jsx)("p",{className:"text-text-muted",children:"Provider not found"}),(0,s.jsx)(n(),{href:"/dashboard/providers",className:"text-primary mt-4 inline-block",children:"Back to Providers"})]})}},68810:(e,t,a)=>{Promise.resolve().then(a.bind(a,44878))}},e=>{e.O(0,[3885,2318,4385,2940,7236,5479,2147,3204,7358],()=>e(e.s=68810)),_N_E=e.O()}]);
|