@techysy/10router 1.1.0 → 1.1.1
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 +11 -7
- package/app/.next-cli-build/build-manifest.json +3 -3
- package/app/.next-cli-build/prerender-manifest.json +26 -26
- package/app/.next-cli-build/react-loadable-manifest.json +1540 -0
- package/app/.next-cli-build/routes-manifest.json +24 -0
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +1 -1
- 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 +2 -2
- 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 +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 +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 +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 +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 +28 -28
- 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 +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 +2 -2
- 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 +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 +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 +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 +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 +8 -8
- 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 +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 +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-pools/page.js +3 -3
- 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 +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 +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 +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 +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 +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 +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 +2 -2
- 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 +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
- 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/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_not-found/page.js +1 -1
- 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 +5 -5
- package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/api/auth/login/route.js +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/saml/acs/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/acs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/start/route.js +2 -2
- package/app/.next-cli-build/server/app/api/auth/saml/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/test/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/auth/verify-password/route.js +1 -0
- package/app/.next-cli-build/server/app/api/auth/verify-password/route.js.nft.json +1 -0
- package/app/.next-cli-build/server/app/api/auth/verify-password/route_client-reference-manifest.js +1 -0
- 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 +2 -2
- 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 +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 +3 -3
- 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 +2 -2
- 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 +1 -1
- 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 +2 -2
- 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 +2 -2
- 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 +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 +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 +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 +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 +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 +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/rotate/route.js +1 -1
- package/app/.next-cli-build/server/app/api/keys/rotate/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 +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 +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 +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 +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/custom/bulk/route.js +1 -0
- package/app/.next-cli-build/server/app/api/models/custom/bulk/route.js.nft.json +1 -0
- package/app/.next-cli-build/server/app/api/models/custom/bulk/route_client-reference-manifest.js +1 -0
- 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 +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 +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 +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/codebuddy-cn/bulk-import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/checkin/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/checkin/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/export/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/export/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 +2 -2
- 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/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 +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/oauth/transfer/export/route.js +1 -0
- package/app/.next-cli-build/server/app/api/oauth/transfer/export/route.js.nft.json +1 -0
- package/app/.next-cli-build/server/app/api/oauth/transfer/export/route_client-reference-manifest.js +1 -0
- package/app/.next-cli-build/server/app/api/oauth/transfer/import/route.js +1 -0
- package/app/.next-cli-build/server/app/api/oauth/transfer/import/route.js.nft.json +1 -0
- package/app/.next-cli-build/server/app/api/oauth/transfer/import/route_client-reference-manifest.js +1 -0
- package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js +2 -2
- package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/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 +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]/models/route.js +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 +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 +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/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 +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 +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 +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]/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 +2 -2
- 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 +2 -2
- 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/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 +1 -1
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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/import-usage/route.js +1 -1
- package/app/.next-cli-build/server/app/api/settings/database/import-usage/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 +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 +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 +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 +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 +2 -2
- 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 +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 +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 +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 +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 +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 +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 +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 +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 +3 -3
- 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 +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 +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 +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 +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 +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/route.js +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 +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 +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 +2 -2
- 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 +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 +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 +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 +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 +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 +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 +2 -2
- 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 +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 +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 +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 +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 +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 +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 +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 +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 +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 +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 +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 +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 +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 +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 +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 +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 +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 +5 -5
- package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +5 -5
- 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 +5 -5
- package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +7 -7
- 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 +7 -7
- 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/_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 +7 -7
- package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +7 -7
- 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 +7 -7
- 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/_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 +7 -7
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +7 -7
- 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 +7 -7
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +7 -7
- 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 +7 -7
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +7 -7
- 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 +7 -7
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +7 -7
- 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 +7 -7
- package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/providers.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 +7 -7
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +7 -7
- 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 +7 -7
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +7 -7
- 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 +8 -8
- package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +8 -8
- 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 +1 -1
- 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 +5 -5
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +5 -5
- 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 +5 -5
- package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +7 -7
- 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 +7 -7
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +7 -7
- 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 +7 -7
- package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +7 -7
- 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 +7 -7
- package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +7 -7
- 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 +7 -7
- package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +7 -7
- 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 +1 -1
- package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/index.html +1 -1
- package/app/.next-cli-build/server/app/index.rsc +5 -5
- package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/landing/page.js +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 +6 -6
- package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +6 -6
- 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 +6 -6
- package/app/.next-cli-build/server/app/login/page.js +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 +6 -6
- package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +6 -6
- 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 +6 -6
- package/app/.next-cli-build/server/app/manifest.webmanifest/route.js +2 -2
- package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/page.js +1 -1
- package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app-paths-manifest.json +11 -7
- package/app/.next-cli-build/server/chunks/1159.js +1 -0
- package/app/.next-cli-build/server/chunks/1260.js +1 -1
- package/app/.next-cli-build/server/chunks/1377.js +1 -1
- package/app/.next-cli-build/server/chunks/1937.js +1 -1
- package/app/.next-cli-build/server/chunks/{3212.js → 2112.js} +1 -1
- package/app/.next-cli-build/server/chunks/2120.js +1 -0
- package/app/.next-cli-build/server/chunks/2132.js +1 -1
- package/app/.next-cli-build/server/chunks/2179.js +1 -1
- package/app/.next-cli-build/server/chunks/3651.js +92 -0
- package/app/.next-cli-build/server/chunks/3662.js +1 -1
- package/app/.next-cli-build/server/chunks/3879.js +1 -0
- package/app/.next-cli-build/server/chunks/3901.js +1 -0
- package/app/.next-cli-build/server/chunks/3943.js +1 -1
- package/app/.next-cli-build/server/chunks/3962.js +1 -1
- package/app/.next-cli-build/server/chunks/4037.js +1 -1
- package/app/.next-cli-build/server/chunks/4049.js +1 -1
- package/app/.next-cli-build/server/chunks/4123.js +1 -1
- package/app/.next-cli-build/server/chunks/4293.js +1 -1
- package/app/.next-cli-build/server/chunks/436.js +1 -0
- package/app/.next-cli-build/server/chunks/4840.js +1 -0
- package/app/.next-cli-build/server/chunks/4862.js +1 -0
- package/app/.next-cli-build/server/chunks/4985.js +1 -1
- package/app/.next-cli-build/server/chunks/5182.js +1 -1
- package/app/.next-cli-build/server/chunks/5217.js +2 -2
- package/app/.next-cli-build/server/chunks/{318.js → 5330.js} +3 -3
- package/app/.next-cli-build/server/chunks/5433.js +1 -1
- package/app/.next-cli-build/server/chunks/5485.js +1 -0
- package/app/.next-cli-build/server/chunks/5615.js +1 -1
- package/app/.next-cli-build/server/chunks/5781.js +2 -2
- package/app/.next-cli-build/server/chunks/595.js +1 -1
- package/app/.next-cli-build/server/chunks/6070.js +1 -1
- package/app/.next-cli-build/server/chunks/615.js +1 -1
- package/app/.next-cli-build/server/chunks/6212.js +1 -0
- package/app/.next-cli-build/server/chunks/6306.js +1 -1
- package/app/.next-cli-build/server/chunks/6326.js +1 -1
- package/app/.next-cli-build/server/chunks/6457.js +2 -2
- package/app/.next-cli-build/server/chunks/653.js +1 -1
- package/app/.next-cli-build/server/chunks/6871.js +1 -1
- package/app/.next-cli-build/server/chunks/6960.js +7 -0
- package/app/.next-cli-build/server/chunks/7239.js +1 -1
- package/app/.next-cli-build/server/chunks/7247.js +1 -1
- package/app/.next-cli-build/server/chunks/7322.js +2 -2
- package/app/.next-cli-build/server/chunks/7805.js +1 -1
- package/app/.next-cli-build/server/chunks/7843.js +51 -0
- package/app/.next-cli-build/server/chunks/8145.js +1 -1
- package/app/.next-cli-build/server/chunks/8410.js +1 -0
- package/app/.next-cli-build/server/chunks/8499.js +3 -53
- package/app/.next-cli-build/server/chunks/8546.js +1 -1
- package/app/.next-cli-build/server/chunks/8635.js +3 -0
- package/app/.next-cli-build/server/chunks/869.js +1 -1
- package/app/.next-cli-build/server/chunks/877.js +65 -0
- package/app/.next-cli-build/server/chunks/8838.js +1 -1
- package/app/.next-cli-build/server/chunks/8990.js +1 -1
- package/app/.next-cli-build/server/chunks/937.js +1 -0
- package/app/.next-cli-build/server/chunks/939.js +1 -0
- package/app/.next-cli-build/server/chunks/9609.js +1 -1
- package/app/.next-cli-build/server/chunks/9679.js +1 -0
- package/app/.next-cli-build/server/chunks/9713.js +1 -0
- package/app/.next-cli-build/server/instrumentation.js +1 -1
- package/app/.next-cli-build/server/instrumentation.js.nft.json +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/middleware.js +7 -7
- package/app/.next-cli-build/server/middleware.js.nft.json +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/ZVF_AsRusUqo_O-OyJWPo/_buildManifest.js +1 -0
- package/app/.next-cli-build/static/chunks/1243-220f1fd87235cb92.js +3 -0
- package/app/.next-cli-build/static/chunks/1321-ad1ba3dfb4f417dd.js +1 -0
- package/app/.next-cli-build/static/chunks/1728-9783950fd2b6ad81.js +65 -0
- package/app/.next-cli-build/static/chunks/3170-8dc71548e5b2cbf9.js +1 -0
- package/app/.next-cli-build/static/chunks/5497-8b67dd598415a05b.js +7 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/basic-chat/{page-05baf24fe36fbd8f.js → page-5d45a84bf4178e23.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/{page-272386fb26fd75c3.js → page-d9b185c845eb0735.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/{page-f098adefd36910e1.js → page-baf9fb2b236ff509.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/{page-a2a6c56b7776af70.js → page-395c2359af9bc2a9.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/{page-cfdc0f6cf601fb4f.js → page-30c02c5c5eefddbd.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-c748c385fd4207db.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page-df8dac9c150f9f1e.js +59 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/{page-23a27239721d0c86.js → page-502e7efb917191b9.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/combo/[id]/{page-11b1e63e5750aa80.js → page-244f4c72b60bf0a0.js} +2 -2
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/web/{page-fa0de4d9f54eb3ef.js → page-720b5ab2e46fc6bb.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/{page-d4b67cdea67b89d0.js → page-12cb89849a36b78d.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-6abbed908eb3721a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-d8fb1a26657cc67f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-f9d2dd98fde8ba67.js +14 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/new/{page-a04315501559f028.js → page-40e882239717e69f.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/{page-c1757ed34595dcdb.js → page-e5e78bb5f4aa4063.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/proxy-pools/{page-46d86481868d6900.js → page-4f50d3385b23743f.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/pxpipe/{page-895a59d896e1399c.js → page-5f5434b22c7f7b73.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-1ce31613b04ec926.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/{page-e16aaf24dc525a49.js → page-6a0eb15b8664e682.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/{page-d17ab83ab811a84c.js → page-27bf96f0f2568f09.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/translator/{page-346541a45bcf828f.js → page-b2a5c4828ff3f6e0.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/{page-f3c3284e4b3cb324.js → page-a442053054654766.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/{layout-1cffa0a228a79ad6.js → layout-158175db070fe14c.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/_global-error/page-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/login/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/saml/acs/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/saml/metadata/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/saml/start/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/saml/test/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/status/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/verify-password/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/devin-settings/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/grok-build-settings/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/combos/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/extras/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/restart/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/health/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/init/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/keys/rotate/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/keys/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/locale/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/alias/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/availability/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/custom/bulk/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/custom/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/test/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-import/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/checkin/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/export/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/transfer/export/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/transfer/import/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/api-key/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/auto-import/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pricing/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/client/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/health/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/logs/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/restart/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/start/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/stats/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/stop/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/database/import-usage/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/database/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/shutdown/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tags/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/load/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/save/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/send/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/history/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/models/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/search/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/videos/[id]/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/videos/edits/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/videos/extensions/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/videos/generations/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/version/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/version/update/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/landing/page-da7215e0796dbf9b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/login/{page-f3c1df1fc132afda.js → page-0da5fcc5d841cbb9.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/app/page-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-73a852c9be713797.js +1 -0
- package/app/.next-cli-build/static/chunks/{webpack-f52125609b4734b6.js → webpack-77a7ed7beb6725df.js} +1 -1
- package/app/.next-cli-build/static/css/adecbbef384db8e1.css +1 -0
- package/app/custom-server.js +177 -167
- package/app/package.json +2 -1
- package/app/public/i18n/changelog/en.md +203 -179
- package/app/public/i18n/changelog/zh-CN.md +201 -177
- package/app/public/i18n/changelog/zh-TW.md +203 -179
- package/app/public/i18n/literals/zh-CN.json +85 -6
- package/app/public/i18n/literals/zh-TW.json +126 -4
- package/app/public/providers/amd.png +0 -0
- package/app/src/lib/consoleArchiveStandalone.mjs +73 -0
- package/app/src/sse/services/codebuddyCheckin.js +308 -54
- package/package.json +1 -1
- package/app/.next-cli-build/server/chunks/1636.js +0 -1
- package/app/.next-cli-build/server/chunks/2765.js +0 -1
- package/app/.next-cli-build/server/chunks/295.js +0 -1
- package/app/.next-cli-build/server/chunks/412.js +0 -7
- package/app/.next-cli-build/server/chunks/4665.js +0 -65
- package/app/.next-cli-build/server/chunks/525.js +0 -1
- package/app/.next-cli-build/server/chunks/6877.js +0 -1
- package/app/.next-cli-build/server/chunks/7211.js +0 -1
- package/app/.next-cli-build/server/chunks/7913.js +0 -92
- package/app/.next-cli-build/server/chunks/8363.js +0 -1
- package/app/.next-cli-build/server/chunks/8444.js +0 -3
- package/app/.next-cli-build/server/chunks/9896.js +0 -1
- package/app/.next-cli-build/static/chunks/1243-a9f0940294c15c24.js +0 -3
- package/app/.next-cli-build/static/chunks/1321-0167273f2d678ede.js +0 -1
- package/app/.next-cli-build/static/chunks/4614-de3422f98b83f305.js +0 -65
- package/app/.next-cli-build/static/chunks/5242-bb1a1a7ec3bfb62f.js +0 -1
- package/app/.next-cli-build/static/chunks/5497-a55c9d3d9f5b5cbf.js +0 -7
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-36c5d10e7c244d2d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page-b475f81b3d89c963.js +0 -59
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-237c096548d0981d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-cd93d4f0b910293c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-60c620ec082ed541.js +0 -14
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-c7ef8300ebeb4889.js +0 -1
- package/app/.next-cli-build/static/chunks/app/_global-error/page-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/login/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/saml/acs/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/saml/metadata/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/saml/start/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/saml/test/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/status/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/devin-settings/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/grok-build-settings/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/combos/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/extras/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/restart/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/health/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/init/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/keys/rotate/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/keys/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/locale/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/alias/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/availability/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/custom/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/test/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/bulk-import/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/checkin/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/codebuddy-cn/export/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/api-key/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/auto-import/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pricing/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/client/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/health/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/logs/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/restart/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/start/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/stats/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/stop/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/database/import-usage/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/database/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/shutdown/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tags/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/load/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/save/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/send/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/history/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/models/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/search/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/videos/[id]/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/videos/edits/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/videos/extensions/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/videos/generations/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/version/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/version/update/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/landing/page-abe5fbd51346146f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/app/page-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-f5ad4d359abeda22.js +0 -1
- package/app/.next-cli-build/static/css/87048d3b7e880a4f.css +0 -1
- package/app/.next-cli-build/static/rBJbR_XYSlh3OgKbcSSXs/_buildManifest.js +0 -1
- package/app/public/providers/apinex.png +0 -0
- /package/app/.next-cli-build/static/{rBJbR_XYSlh3OgKbcSSXs → ZVF_AsRusUqo_O-OyJWPo}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2134],{69955:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>V});var i=s(95155),a=s(12115),l=s(73321),n=s(98500),r=s.n(n),o=s(5772),d=s(8247),c=s(35497),p=s(88105),m=s(28777),u=s(990),x=s(62630);s(67468);let h=["none","low","medium","high"],f=["none","thinking"],g=["none","low","medium","high","max"],y={openai:["none","minimal","low","medium","high","xhigh"],"claude-adaptive":g,"claude-budget":["none","low","medium","high","xhigh","max"],"gemini-level":["minimal","low","medium","high"],"gemini-budget":h,zai:f,qwen:h,kimi:g,deepseek:["none","high","max"],minimax:f,hunyuan:h,step:h},b=["none","minimal","low","medium","high","xhigh","max"],v=[{provider:"codex",pattern:"*gpt-6*",levels:b},{provider:"codex",pattern:"*gpt-5.6-sol*",levels:[...b,"ultra"]},{provider:"codex",pattern:"*gpt-5.6-terra*",levels:[...b,"ultra"]},{provider:"codex",pattern:"*gpt-5.6-luna*",levels:b},{pattern:"*codex*",levels:["low","medium","high","xhigh"]},{provider:"amd",pattern:"DeepSeek-V4-Flash*",levels:["none","minimal","low","medium","high","xhigh","max"]},{provider:"amd",pattern:"Qwen3.8-Flash-Next",levels:["none","low","medium","xhigh"]},{provider:"codebuddy-cn",pattern:"glm-5.3*",levels:["low","high","max"]},{provider:"codebuddy-cn",pattern:"glm-5.2",levels:["high","xhigh"]},{provider:"codebuddy-cn",pattern:"deepseek-v4*",levels:["low","high","xhigh"]},{provider:"codebuddy-cn",pattern:"hy3*",levels:["low","high"]},{provider:"codebuddy-cn",pattern:"hy4*",levels:["high"]}];function j(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 s=t.match(/(?:^|[/.])claude(?:[/.][a-z]+)*[/.](\d+)(?:[/.](\d+))?(?:[/.]|$)/);if(!s)return null;let[,i,a]=s,l=Number(i),n=void 0===a?null:Number(a);return l<4||4===l&&(null===n||n<=5||null!==n&&n>=1e3)?null:"output_config"}(t))return null;let s=(0,u.nl)(e,t);if(!s.reasoning)return null;let i=v.find(s=>(!s.provider||s.provider===e)&&(0,x.gH)(s.pattern,t)),a=i?.levels||y[s.thinkingFormat]||h;return!1===s.thinkingCanDisable&&(a=a.filter(e=>"none"!==e)),a}var w=s(11059),k=s(929),N=s(73006),C=s(65921);let T=new Map;async function S(e){if(!e?.url||!e?.type)return[];let t=T.get(e.url);if(t&&Date.now()<t.expiresAt)return t.data;try{let t=new URLSearchParams({url:e.url,type:e.type}),s=await fetch(`/api/providers/suggested-models?${t}`);if(!s.ok)return[];let i=(await s.json()).data??[];return T.set(e.url,{data:i,expiresAt:Date.now()+6e5}),i}catch{return[]}}function $({customModels:e=[],modelAliases:t={},providerAlias:s,builtInModels:i=[],type:a="llm",includeLegacyAliases:l=!0}){let n=new Set(i.map(e=>e.id)),r=new Set,o=[];for(let t of e){if(!t?.id||t.providerAlias!==s)continue;let e=t?.kind||t?.type||"llm";if(a&&e!==a||n.has(t.id))continue;let i=`${s}/${t.id}`;r.has(i)||(r.add(i),o.push({id:t.id,name:t.name||t.id,fullModel:i,source:"custom",type:e,enabled:!1!==t.enabled,...void 0===t.vision?{}:{vision:t.vision},...void 0===t.reasoning?{}:{reasoning:t.reasoning},...void 0===t.contextWindow?{}:{contextWindow:t.contextWindow},...void 0===t.maxOutput?{}:{maxOutput:t.maxOutput}}))}if(!l)return o;let d=`${s}/`;for(let[e,s]of Object.entries(t||{})){if("string"!=typeof s||!s.startsWith(d))continue;let t=s.slice(d.length);!t||n.has(t)||r.has(s)||(r.add(s),o.push({id:t,alias:e,fullModel:s,source:"legacyAlias",type:a||"llm"}))}return o}let A=/https:\/\/accounts\.google\.com\/signin\/continue[^\s"'<>)\]]+/;function O(e){if("string"!=typeof e)return null;let t=A.exec(e);return t?t[0]:null}var E=s(14051),P=s.n(E);function I({model:e,fullModel:t,alias:s,copied:l,onCopy:n,testStatus:r,isCustom:o,isFree:d,onDeleteAlias:p,onTest:m,isTesting:u,onDisable:x,onEnable:h,caps:f,thinkingSuffix:g}){let y=function(){let[e,t]=(0,a.useState)(()=>new Date().getHours());return(0,a.useEffect)(()=>{let e=setInterval(()=>t(new Date().getHours()),6e4);return()=>clearInterval(e)},[]),e}(),b=g?`${t}(${g})`:t,v="number"==typeof e.rateMultiplier?e.rateMultiplier:null,j=function(e,t){if(!t||"number"!=typeof e||Number.isNaN(e))return!1;let{from:s,to:i}=t;return s<=i?e>=s&&e<i:e>=s||e<i}(y,e.nightFree),w=null!==v&&v>0&&function(e,t=Date.now()){let s=function(e){let t=e?.promoFreeUntil;if("string"!=typeof t||""===t.trim())return null;let s=Date.parse(t);return Number.isFinite(s)?s:null}(e);return null!==s&&t<s}(e),k=w?0:v,C=j||0===k,T="ok"===r?"#22c55e":"error"===r?"#ef4444":void 0;return(0,i.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,i.jsxs)("div",{className:"flex min-w-0 items-start gap-2 sm:items-center",children:[(0,i.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base",style:T?{color:T}:void 0,children:"ok"===r?"check_circle":"error"===r?"cancel":"smart_toy"}),(0,i.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[(0,i.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:b}),(0,i.jsxs)("span",{className:"flex min-w-0 items-center text-[9px] gap-1 pl-1",children:[e.name&&(0,i.jsx)("span",{className:"truncate text-[9px] italic text-text-muted/70",children:e.name}),(0,i.jsx)(c.nh,{caps:f,colorOverride:"text-text-muted/70",size:12}),(null!==k||j)&&(0,i.jsx)(c.m_,{text:j?`${(0,N.Tl)("Night-free window")} (23:00–08:00) — ${(0,N.Tl)("rides the free quota")}`:w?(0,N.Tl)("Credit multiplier")+`: ${v}x — `+(0,N.Tl)("promo free until")+` ${e.promoFreeUntil}`:0===k?(0,N.Tl)("Credit multiplier")+": 0x — "+(0,N.Tl)("rides the free quota"):(0,N.Tl)("Credit multiplier")+`: ${k}x`,children:(0,i.jsx)(c.Ex,{size:"sm",variant:C?"success":"default",className:`shrink-0 cursor-help leading-none${C?"":" font-mono"}`,children:C?"free":`${k.toFixed(2)}x`})})]})]}),m&&(0,i.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,i.jsx)("button",{onClick:m,disabled:u,className:`rounded p-0.5 text-text-muted transition-opacity hover:bg-sidebar hover:text-primary ${u?"opacity-100":"opacity-100 sm:opacity-0 sm:group-hover:opacity-100"}`,children:(0,i.jsx)("span",{className:"material-symbols-outlined text-sm",style:u?{animation:"spin 1s linear infinite"}:void 0,children:u?"progress_activity":"science"})}),(0,i.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:u?"Testing...":"Test"})]}),(0,i.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,i.jsx)("button",{onClick:()=>n(b,`model-${e.id}`),className:"rounded p-0.5 text-text-muted hover:bg-sidebar hover:text-primary",children:(0,i.jsx)("span",{className:"material-symbols-outlined text-sm",children:l===`model-${e.id}`?"check":"content_copy"})}),(0,i.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"})]}),o?(0,i.jsx)("button",{onClick:p,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,i.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):h?(0,i.jsx)("button",{onClick:h,className:"ml-auto rounded p-0.5 text-text-muted opacity-100 transition-opacity hover:bg-green-500/10 hover:text-green-500",title:(0,N.Tl)("Enable this model"),children:(0,i.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"})}):x?(0,i.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,i.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):null]})})}function R({modelId:e,fullModel:t,copied:s,onCopy:a,onDeleteAlias:l,onToggle:n,enabled:r=!0,onTest:o,testStatus:d,isTesting:c}){let p="ok"===d?"#22c55e":"error"===d?"#ef4444":void 0;return(0,i.jsxs)("div",{className:`flex items-center gap-3 p-3 rounded-lg border ${"ok"===d?"border-green-500/40":"error"===d?"border-red-500/40":"border-border"} hover:bg-sidebar/50 ${r?"":"opacity-60"}`,children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted",style:p?{color:p}:void 0,children:"ok"===d?"check_circle":"error"===d?"cancel":"smart_toy"}),(0,i.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,i.jsx)("p",{className:"text-sm font-medium truncate",children:e}),(0,i.jsxs)("div",{className:"flex items-center gap-1 mt-1",children:[(0,i.jsx)("code",{className:"text-xs text-text-muted font-mono bg-sidebar px-1.5 py-0.5 rounded",children:t}),(0,i.jsxs)("div",{className:"relative group/btn",children:[(0,i.jsx)("button",{onClick:()=>a(t,`model-${e}`),className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary",children:(0,i.jsx)("span",{className:"material-symbols-outlined text-sm",children:s===`model-${e}`?"check":"content_copy"})}),(0,i.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:s===`model-${e}`?"Copied!":"Copy"})]}),o&&(0,i.jsxs)("div",{className:"relative group/btn",children:[(0,i.jsx)("button",{onClick:o,disabled:c,className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary transition-colors",children:(0,i.jsx)("span",{className:"material-symbols-outlined text-sm",style:c?{animation:"spin 1s linear infinite"}:void 0,children:c?"progress_activity":"science"})}),(0,i.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:c?"Testing...":"Test"})]})]})]}),n&&(0,i.jsx)("button",{onClick:n,className:`p-1 rounded ${r?"text-amber-500 hover:bg-amber-50 dark:hover:bg-amber-500/10":"text-green-600 hover:bg-green-50 dark:hover:bg-green-500/10"}`,title:r?"Disable model":"Activate model",children:(0,i.jsx)("span",{className:"material-symbols-outlined text-sm",children:r?"block":"restart_alt"})}),(0,i.jsx)("button",{onClick:l,className:"p-1 hover:bg-red-50 rounded text-red-500",title:"Remove model",children:(0,i.jsx)("span",{className:"material-symbols-outlined text-sm",children:"delete"})})]})}function D({providerStorageAlias:e,providerDisplayAlias:t,modelAliases:s,customModels:l,copied:n,onCopy:r,onDeleteAlias:o,onAddCustomModel:d,onToggleCustomModel:p,onDeleteCustomModel:m,onBulkCustomModels:u,connections:x,isAnthropic:h}){let f=(0,C.i)(),[g,y]=(0,a.useState)(""),[b,v]=(0,a.useState)(!1),[j,w]=(0,a.useState)(!1),[k,T]=(0,a.useState)(null),[S,A]=(0,a.useState)({}),O=async t=>{if(!k){T(t);try{let s=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${e}/${t}`})}),i=await s.json();A(e=>({...e,[t]:i.ok?"ok":"error"}))}catch{A(e=>({...e,[t]:"error"}))}finally{T(null)}}},E=$({customModels:l,modelAliases:s,providerAlias:e,type:"llm"}),P=E.filter(e=>!1!==e.enabled),I=E.filter(e=>!1===e.enabled),q=async()=>{if(!g.trim()||b)return;let e=g.trim();if(E.some(t=>t.id===e))return void f.warning("Model already exists for this provider.");v(!0);try{await d(e),y("")}catch(e){console.log("Error adding model:",e)}finally{v(!1)}},U=async()=>{if(j)return;let e=x.find(e=>!1!==e.isActive);if(e){w(!0);try{let t=await fetch(`/api/providers/${e.id}/models`),s=await t.json();if(!t.ok)return void f.error(s.error||"Failed to import models");let i=s.models||[];if(0===i.length)return void f.warning("No models returned from /models.");let a=0;for(let e of i){let t=e.id||e.name||e.model;t&&(E.some(e=>e.id===t)||(await d(t,!1),a+=1))}0===a&&f.warning("No new models were added.")}catch(e){console.log("Error importing models:",e)}finally{w(!1)}}},_=x.some(e=>!1!==e.isActive);return(0,i.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,i.jsxs)("p",{className:"text-sm text-text-muted",children:["Add ",h?"Anthropic":"OpenAI","-compatible models manually or import them from the /models endpoint."]}),(0,i.jsxs)("div",{className:"flex items-end gap-2 flex-wrap",children:[(0,i.jsxs)("div",{className:"flex-1 min-w-[240px]",children:[(0,i.jsx)("label",{htmlFor:"new-compatible-model-input",className:"text-xs text-text-muted mb-1 block",children:"Model ID"}),(0,i.jsx)("input",{id:"new-compatible-model-input",type:"text",value:g,onChange:e=>y(e.target.value),onKeyDown:e=>"Enter"===e.key&&q(),placeholder:h?"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,i.jsx)(c.$n,{size:"sm",icon:"add",onClick:q,disabled:!g.trim()||b,children:b?"Adding...":"Add"}),(0,i.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"download",onClick:U,disabled:!_||j,children:j?"Importing...":"Import from /models"})]}),!_&&(0,i.jsx)("p",{className:"text-xs text-text-muted",children:"Add a connection to enable importing models."}),E.length>0&&u&&(0,i.jsxs)("div",{className:"flex items-center gap-2 text-xs text-text-muted",children:[(0,i.jsxs)("span",{children:[E.length," custom model",E.length>1?"s":""]}),(0,i.jsx)("span",{children:"\xb7"}),(0,i.jsx)("button",{onClick:()=>u(!0),className:"text-primary hover:underline",children:(0,N.Tl)("Enable all")}),(0,i.jsx)("span",{children:"\xb7"}),(0,i.jsx)("button",{onClick:()=>u(!1),className:"text-text-muted hover:text-red-500 hover:underline",children:(0,N.Tl)("Disable all")}),(0,i.jsxs)("span",{children:["— ",(0,N.Tl)("bulk actions affect what clients see in /v1/models")]})]}),P.length>0&&(0,i.jsx)("div",{className:"flex flex-col gap-3",children:P.map(({id:s,alias:a,source:l})=>(0,i.jsx)(R,{modelId:s,fullModel:`${t}/${s}`,copied:n,onCopy:r,onDeleteAlias:()=>"custom"===l?m(s):o(a),onToggle:"custom"===l&&p?()=>p(s,!1):void 0,onTest:x.length>0?()=>O(s):void 0,testStatus:S[s],isTesting:k===s},`${l}-${e}/${s}`))}),I.length>0&&(0,i.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,i.jsx)("p",{className:"text-xs text-text-muted",children:"Disabled (activate to expose again):"}),I.map(({id:s,alias:a,source:l})=>(0,i.jsx)(R,{modelId:s,fullModel:`${t}/${s}`,copied:n,onCopy:r,enabled:!1,onDeleteAlias:()=>"custom"===l?m(s):o(a),onToggle:"custom"===l&&p?()=>p(s,!0):void 0,onTest:x.length>0?()=>O(s):void 0,testStatus:S[s],isTesting:k===s},`disabled-${l}-${e}/${s}`))]})]})}I.propTypes={model:P().shape({id:P().string.isRequired,rateMultiplier:P().number,nightFree:P().shape({from:P().number,to:P().number})}).isRequired,fullModel:P().string.isRequired,alias:P().string,copied:P().string,onCopy:P().func.isRequired,testStatus:P().oneOf(["ok","error"]),isCustom:P().bool,isFree:P().bool,onDeleteAlias:P().func,onTest:P().func,isTesting:P().bool,onDisable:P().func,onEnable:P().func,caps:P().object,thinkingSuffix:P().string},P().string.isRequired,P().string.isRequired,P().string,P().func.isRequired,P().func.isRequired,P().func,P().oneOf(["ok","error"]),P().bool,P().string.isRequired,P().object.isRequired,P().arrayOf(P().object),P().string,P().func.isRequired,P().func.isRequired,P().func.isRequired,P().func.isRequired,D.propTypes={providerStorageAlias:P().string.isRequired,providerDisplayAlias:P().string.isRequired,modelAliases:P().object.isRequired,customModels:P().arrayOf(P().object),copied:P().string,onCopy:P().func.isRequired,onDeleteAlias:P().func.isRequired,onAddCustomModel:P().func.isRequired,onBulkCustomModels:P().func,onToggleCustomModel:P().func,onDeleteCustomModel:P().func.isRequired,connections:P().arrayOf(P().shape({id:P().string,isActive:P().bool})).isRequired,isAnthropic:P().bool};var q=s(70217);function U({until:e}){let[t,s]=(0,a.useState)("");return((0,a.useEffect)(()=>{let t=()=>{let t=new Date(e).getTime()-Date.now();if(t<=0)return void s("");let i=Math.floor(t/1e3);if(i<60)s(`${i}s`);else if(i<3600)s(`${Math.floor(i/60)}m ${i%60}s`);else{let e=Math.floor(i/3600),t=Math.floor(i%3600/60);s(`${e}h ${t}m`)}};t();let i=setInterval(t,1e3);return()=>clearInterval(i)},[e]),t)?(0,i.jsxs)("span",{className:"text-xs text-orange-500 font-mono",children:["⏱ ",t]}):null}function _({connection:e,proxyPools:t,isOAuth:s,isFirst:l,isLast:n,onMoveUp:r,onMoveDown:o,onToggleActive:d,onUpdateProxy:p,onEdit:m,onDelete:u,oneByOneStatus:x=null,autoPing:h=null}){let[f,g]=(0,a.useState)(!1),[y,b]=(0,a.useState)(!1),v=(0,a.useRef)(null),j=new Map((t||[]).map(e=>[e.id,e])),k=e.providerSpecificData?.proxyPoolId||null,C=k?j.get(k):null,T=e.providerSpecificData?.connectionProxyEnabled===!0&&!!e.providerSpecificData?.connectionProxyUrl,S=!!k||T,$=C?`Pool: ${C.name}`:k?`Pool: ${k} (inactive/missing)`:T?`Legacy: ${e.providerSpecificData?.connectionProxyUrl}`:"",A=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.",E="";if(C?.proxyUrl||e.providerSpecificData?.connectionProxyUrl){let t=C?.proxyUrl||e.providerSpecificData?.connectionProxyUrl;try{let e=new URL(t);E=`${e.protocol}//${e.hostname}${e.port?`:${e.port}`:""}`}catch{E=t}}let P=C?.noProxy||e.providerSpecificData?.connectionNoProxy||"",I="default";C?.isActive===!0?I="success":(k||T)&&(I="error"),(0,a.useEffect)(()=>{if(!f)return;let e=e=>{v.current&&!v.current.contains(e.target)&&g(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[f]);let R=async e=>{b(!0);try{await p("__none__"===e?null:e)}finally{b(!1),g(!1)}},D=e.authType||(s?"oauth":"apikey"),F="oauth"===D,z="cookie"===D,M=e.name?.trim()||e.email?.trim()||e.displayName?.trim()||(F?"OAuth Account":z?"Cookie Account":"API Key"),K=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,[J,L]=(0,a.useState)(!1),W=Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>e).filter(e=>!!e).sort()[0]||null;(0,a.useEffect)(()=>{let t=()=>{L(!!Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>e).filter(e=>e&&new Date(e).getTime()>Date.now()).sort()[0])};t();let s=W?setInterval(t,1e3):null;return()=>{s&&clearInterval(s)}},[W]);let B="unavailable"!==e.testStatus||J?e.testStatus:"active",H=!1!==e.isActive?O(e.lastError):null,{copied:V,copy:G}=(0,w.C)(),Q=()=>x?"queued"===x.state?(0,N.Tl)("queued"):"testing"===x.state?(0,N.Tl)("testing"):"success"===x.state?(0,N.Tl)("success"):"failed"===x.state?x.error?`${(0,N.Tl)("failed")}: ${x.error}`:(0,N.Tl)("failed"):null:null;return(0,i.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,i.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-2 sm:items-center sm:gap-3",children:[(0,i.jsxs)("div",{className:"flex shrink-0 flex-col",children:[(0,i.jsx)("button",{onClick:r,disabled:l,className:`p-0.5 rounded ${l?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,i.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_up"})}),(0,i.jsx)("button",{onClick:o,disabled:n,className:`p-0.5 rounded ${n?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,i.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_down"})})]}),(0,i.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base text-text-muted",children:z?"cookie":F?"lock":"key"}),(0,i.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,i.jsx)("p",{className:"text-sm font-medium truncate",children:M}),K&&(0,i.jsx)("p",{className:"text-xs text-text-muted truncate",children:K}),(0,i.jsxs)("div",{className:"mt-1 flex min-w-0 flex-wrap items-center gap-1.5 sm:gap-2",children:[(0,i.jsx)(c.Ex,{variant:(0,q.g)(e.isActive,B),size:"sm",dot:!0,children:!1===e.isActive?(0,N.Tl)("disabled"):B||(0,N.Tl)("Unknown")}),(0,i.jsx)(c.Ex,{variant:"default",size:"sm",children:F?"OAuth":z?"Cookie":"API Key"}),S&&(0,i.jsx)(c.Ex,{variant:I,size:"sm",children:"Proxy"}),e.earliestPackageExpiry&&(0,i.jsxs)(c.Ex,{variant:"outline",size:"sm",title:`${(0,N.Tl)("Earliest package")}: ${e.earliestPackageName||(0,N.Tl)("Quota package")} (${new Date(e.earliestPackageExpiry).toLocaleString()})`,children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-[12px] mr-1",children:"schedule"}),function(e){if(!e)return"";let t=new Date(e).getTime()-Date.now();if(t<=0)return(0,N.Tl)("expired");let s=Math.floor(t/36e5);if(s<24)return`${s}h`;let i=Math.floor(s/24);return i<30?`${i}d`:new Date(e).toLocaleDateString()}(e.earliestPackageExpiry)]}),J&&!1!==e.isActive&&(0,i.jsx)(U,{until:W}),e.lastError&&!1!==e.isActive&&(0,i.jsx)("span",{className:"max-w-full truncate text-xs text-red-500 sm:max-w-[300px]",title:e.lastError,children:e.lastError}),H&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("a",{href:H,target:"_blank",rel:"noopener noreferrer",title:(0,N.Tl)("Recommended: open in an incognito window and sign in with the affected account"),className:"shrink-0 text-xs text-blue-500 underline hover:text-blue-400",children:(0,N.Tl)("Verify your account")}),(0,i.jsx)("button",{type:"button",onClick:()=>G(H,"verification"),title:(0,N.Tl)("Copy link"),className:"shrink-0 text-xs text-text-muted hover:text-primary",children:(0,i.jsx)("span",{className:"material-symbols-outlined text-sm align-middle",children:"verification"===V?"check":"content_copy"})})]}),(0,i.jsxs)("span",{className:"text-xs text-text-muted",children:["#",e.priority]}),e.globalPriority&&(0,i.jsxs)("span",{className:"text-xs text-text-muted",children:["Auto: ",e.globalPriority]}),Q()&&(0,i.jsx)(c.Ex,{variant:x?"success"===x.state?"success":"failed"===x.state?"error":"testing"===x.state?"primary":"default":"default",size:"sm",children:Q()})]}),S&&(0,i.jsxs)("div",{className:"mt-1 flex items-center gap-2 flex-wrap",children:[(0,i.jsx)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[420px]",title:$,children:$}),E&&(0,i.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:E}),P&&(0,i.jsxs)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[320px]",title:P,children:["no_proxy: ",P]})]})]})]}),(0,i.jsxs)("div",{className:"flex w-full items-center justify-between gap-2 sm:w-auto sm:justify-end",children:[(0,i.jsxs)("div",{className:"grid flex-1 grid-cols-3 gap-1 sm:flex sm:flex-none",children:[(t||[]).length>0&&(0,i.jsxs)("div",{className:"relative",ref:v,children:[(0,i.jsxs)("button",{onClick:()=>g(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 ${S?"text-primary":"text-text-muted hover:text-primary"}`,disabled:y,children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:y?"progress_activity":"lan"}),(0,i.jsx)("span",{className:"text-[10px] leading-tight",children:"Proxy"})]}),f&&(0,i.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:[(0,i.jsx)("button",{onClick:()=>R("__none__"),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${!k?"text-primary font-medium":"text-text-main"}`,children:"None"}),(t||[]).map(e=>(0,i.jsx)("button",{onClick:()=>R(e.id),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${k===e.id?"text-primary font-medium":"text-text-main"}`,children:e.name},e.id))]})]}),h&&(0,i.jsx)(c.m_,{text:A,children:(0,i.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,i.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"bolt"}),(0,i.jsx)("span",{className:"text-[10px] leading-tight",children:"Auto-ping"})]})}),(0,i.jsxs)("button",{onClick:m,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,i.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,i.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,i.jsxs)("button",{onClick:u,className:"flex flex-col items-center rounded px-2 py-1 text-red-500 hover:bg-red-500/10",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,i.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]}),(0,i.jsx)(c.lM,{size:"sm",checked:e.isActive??!0,onChange:d,title:e.isActive??!0?"Disable connection":"Enable connection"})]})]})}U.propTypes={until:P().string.isRequired},_.propTypes={connection:P().shape({id:P().string,name:P().string,email:P().string,displayName:P().string,modelLockUntil:P().string,testStatus:P().string,isActive:P().bool,lastError:P().string,priority:P().number,globalPriority:P().number}).isRequired,proxyPools:P().arrayOf(P().shape({id:P().string,name:P().string,proxyUrl:P().string,noProxy:P().string,isActive:P().bool})),isOAuth:P().bool.isRequired,isFirst:P().bool.isRequired,isLast:P().bool.isRequired,onMoveUp:P().func.isRequired,onMoveDown:P().func.isRequired,onToggleActive:P().func.isRequired,onUpdateProxy:P().func,onEdit:P().func.isRequired,onDelete:P().func.isRequired,oneByOneStatus:P().shape({state:P().string,error:P().string}),autoPing:P().shape({on:P().bool,onToggle:P().func,provider:P().string})};let F=`name1|sk-key1
|
|
2
|
+
name2|sk-key2
|
|
3
|
+
sk-key-only-auto-named`;function z({isOpen:e,provider:t,providerName:s,isCompatible:l,isAnthropic:n,authType:r,authHint:o,website:d,proxyPools:m,error:u,existingNames:x,onSave:h,onBulkDone:f,onClose:g}){let y="__none__",b="ollama-local"===t,v="cookie"===r,j="xai"===t&&!v,w=v?"Cookie Value":"qoder"===t?"Personal Access Token (PAT)":"API Key",k="azure"===t,N="cloudflare-ai"===t,C=p.Q2?.[t]?.regions||null,T=p.Q2?.[t]?.defaultRegion||C?.[0]?.id||"",[S,$]=(0,a.useState)({name:"",apiKey:"",defaultModel:"",priority:1,proxyPoolId:y,ollamaHostUrl:""}),[A,O]=(0,a.useState)({azureEndpoint:"",apiVersion:"2024-10-01-preview",deployment:"",organization:""}),[E,P]=(0,a.useState)({accountId:""}),[I,R]=(0,a.useState)(T),[D,q]=(0,a.useState)(!1),[U,_]=(0,a.useState)(null),[M,K]=(0,a.useState)(null),[J,L]=(0,a.useState)(!1),[W,B]=(0,a.useState)(!1),H=N?`name1|sk-key1|acc123456
|
|
4
|
+
name2|sk-key2|def789012
|
|
5
|
+
sk-key-only-auto-named`:"qoder"===t?`name1|pt-xxxxx
|
|
6
|
+
name2|pt-yyyyy
|
|
7
|
+
pt-only-auto-named`:F,[V,G]=(0,a.useState)("single"),[Q,Z]=(0,a.useState)(""),[Y,X]=(0,a.useState)(null),ee=()=>b&&S.ollamaHostUrl.trim()?{baseUrl:S.ollamaHostUrl.trim()}:k?{azureEndpoint:A.azureEndpoint,apiVersion:A.apiVersion,deployment:A.deployment,organization:A.organization}:N?{accountId:E.accountId}:C&&I?{region:I}:void 0,et=async()=>{q(!0);try{let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:S.apiKey,providerSpecificData:ee()})}),s=await e.json();_(s.valid?"success":"failed"),K(s.valid?null:s.error||null),L(!!s.maintenance)}catch{_("failed"),K(null),L(!1)}finally{q(!1)}},es=async()=>{if(t&&(b||S.apiKey)&&(b||S.name)&&(!l||S.defaultModel.trim())){B(!0);try{let e=!1;try{q(!0),_(null);let s=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:S.apiKey,providerSpecificData:ee()})});e=!!(await s.json()).valid,_(e?"success":"failed")}catch{_("failed")}finally{q(!1)}await h({name:S.name||(b?"Ollama Local":""),apiKey:S.apiKey,defaultModel:l?S.defaultModel.trim():void 0,priority:S.priority,proxyPoolId:S.proxyPoolId===y?null:S.proxyPoolId,testStatus:e?"active":"unknown",providerSpecificData:ee()})}finally{B(!1)}}},ei=async()=>{let e=Q.split("\n");if(!e.length)return;let s=function(e,t,s={}){let{isCloudflareAi:i=!1}=s,a=new Set((Array.isArray(t)?t:[]).map(e=>"string"==typeof e?e.toLowerCase():"")),l=[];for(let t of e){let e,s="string"==typeof t?t.trim():"";if(!s)continue;let n=function(e,t={}){let{isCloudflareAi:s=!1}=t,i=e.split("|");if(s&&i.length>=3){let e=i[0].trim();return{baseName:e||"Key",apiKey:i.slice(1,-1).join("|").trim(),providerSpecificData:{accountId:i[i.length-1].trim()}}}return i.length>=2?{baseName:i[0].trim()||"Key",apiKey:i.slice(1).join("|").trim()}:{baseName:"Key",apiKey:i[0].trim()}}(s,{isCloudflareAi:i});if(!n||!n.apiKey)continue;let r=n.baseName,o=1;for(;e=`${r} ${o}`,a.has(e.toLowerCase());)o+=1;a.add(e.toLowerCase());let d={name:e,apiKey:n.apiKey,skipped:!1};n.providerSpecificData&&(d.providerSpecificData=n.providerSpecificData),l.push(d)}return l}(e,x,{isCloudflareAi:N});if(!s.length)return;B(!0),X(null);let i=0,a=0;for(let e of s)try{let s=!1;try{let i=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:e.apiKey})});s=!!(await i.json().catch(()=>({}))).valid}catch{s=!1}(await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:e.apiKey,name:e.name,priority:1,testStatus:s?"active":"unknown",...e.providerSpecificData?{providerSpecificData:e.providerSpecificData}:{}})})).ok?i++:a++}catch{a++}B(!1),X({success:i,failed:a}),i>0&&f&&f()};return t?(0,i.jsx)(c.aF,{isOpen:e,title:`Add ${s||t} ${w}`,onClose:g,children:(0,i.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)(c.$n,{size:"sm",variant:"single"===V?"primary":"ghost",onClick:()=>{G("single"),X(null)},children:"Single"}),(0,i.jsx)(c.$n,{size:"sm",variant:"bulk"===V?"primary":"ghost",onClick:()=>{G("bulk"),X(null)},children:"Bulk Add"})]}),"bulk"===V&&(0,i.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,i.jsx)("p",{className:"text-xs text-text-muted",children:N?(0,i.jsxs)(i.Fragment,{children:["One key per line. Format: ",(0,i.jsx)("code",{children:"name|apiKey|accountId"})," or just ",(0,i.jsx)("code",{children:"apiKey"})," (auto-named by index)."]}):"qoder"===t?(0,i.jsxs)(i.Fragment,{children:["One PAT per line. Format: ",(0,i.jsx)("code",{children:"name|pt-..."})," or just ",(0,i.jsx)("code",{children:"pt-..."})," (auto-named by index)."]}):(0,i.jsxs)(i.Fragment,{children:["One key per line. Format: ",(0,i.jsx)("code",{children:"name|apiKey"})," or just ",(0,i.jsx)("code",{children:"apiKey"})," (auto-named by index)."]})}),(0,i.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:H,value:Q,onChange:e=>Z(e.target.value)}),Y&&(0,i.jsxs)("div",{className:`text-sm font-medium ${Y.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",Y.success," added",Y.failed>0?`, ✗ ${Y.failed} failed`:""]}),(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)(c.$n,{onClick:ei,fullWidth:!0,disabled:W||!Q.trim(),children:W?"Adding...":"Add All Keys"}),(0,i.jsx)(c.$n,{onClick:g,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),"single"===V&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(c.pd,{label:"Name",value:S.name,onChange:e=>$({...S,name:e.target.value}),placeholder:b?"Ollama Local":"Production Key"}),b&&(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)(c.pd,{label:"Ollama Host URL",value:S.ollamaHostUrl,onChange:e=>$({...S,ollamaHostUrl:e.target.value}),placeholder:"http://localhost:11434",className:"flex-1"}),(0,i.jsx)("div",{className:"pt-6",children:(0,i.jsx)(c.$n,{onClick:et,disabled:D||W,variant:"secondary",children:D?"Checking...":"Check"})})]}),!b&&(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)(c.pd,{label:w,type:v?"text":"password",value:S.apiKey,onChange:e=>$({...S,apiKey:e.target.value}),placeholder:v?"grok-web"===t?"sso=xxxxx... or just the raw value":"eyJhbGciOi...":j?"xai-...":"qoder"===t?"pt-...":"",className:"flex-1"}),(0,i.jsx)("div",{className:"pt-6",children:(0,i.jsx)(c.$n,{onClick:et,disabled:!S.apiKey||D||W,variant:"secondary",children:D?"Checking...":"Check"})})]}),j&&(0,i.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,i.jsxs)("p",{className:"text-xs text-text-muted",children:[o,d&&(0,i.jsxs)(i.Fragment,{children:[" ",(0,i.jsxs)("a",{href:d,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:["Open ",d.replace(/^https?:\/\//,"")]})]})]}),C&&(0,i.jsx)(c.l6,{label:"Region",value:I,onChange:e=>R(e.target.value),options:C.map(e=>({value:e.id,label:e.label}))}),l&&(0,i.jsx)(c.pd,{label:"Default Model",value:S.defaultModel,onChange:e=>$({...S,defaultModel:e.target.value}),placeholder:n?"claude-3-5-sonnet-latest":"gpt-4o-mini"}),b&&(0,i.jsxs)("p",{className:"text-xs text-text-muted",children:["Leave blank to use ",(0,i.jsx)("code",{children:"http://localhost:11434"}),". For remote Ollama, enter the full host URL (e.g. ",(0,i.jsx)("code",{children:"http://192.168.1.10:11434"}),")."]}),U&&(0,i.jsx)(c.Ex,{variant:"success"===U?"success":J?"warning":"error",children:"success"===U?"Valid":J?"Check endpoint":"Invalid"}),J&&M&&(0,i.jsx)("p",{className:"text-xs text-amber-500 break-words",children:M}),u&&(0,i.jsx)("p",{className:"text-xs text-red-500 break-words",children:u}),l&&(0,i.jsx)("p",{className:"text-xs text-text-muted",children:"Enter the model ID exactly as your compatible endpoint expects it. This model will be saved as the connection default."}),N&&(0,i.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,i.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Cloudflare Workers AI"}),(0,i.jsx)(c.pd,{label:"Account ID",value:E.accountId,onChange:e=>P({...E,accountId:e.target.value}),placeholder:"abc123def456..."}),(0,i.jsxs)("p",{className:"text-xs text-text-muted mt-2",children:["Find your Account ID in the right sidebar of ",(0,i.jsx)("a",{href:"https://dash.cloudflare.com",target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:"dash.cloudflare.com"})]})]}),k&&(0,i.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,i.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Azure OpenAI Configuration"}),(0,i.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,i.jsx)(c.pd,{label:"Azure Endpoint",value:A.azureEndpoint,onChange:e=>O({...A,azureEndpoint:e.target.value}),placeholder:"https://your-resource.openai.azure.com"}),(0,i.jsx)(c.pd,{label:"Deployment Name",value:A.deployment,onChange:e=>O({...A,deployment:e.target.value}),placeholder:"gpt-4"}),(0,i.jsx)(c.pd,{label:"API Version",value:A.apiVersion,onChange:e=>O({...A,apiVersion:e.target.value}),placeholder:"2024-10-01-preview"}),(0,i.jsx)(c.pd,{label:"Organization",value:A.organization,onChange:e=>O({...A,organization:e.target.value}),placeholder:"Organization ID"})]})]}),(0,i.jsx)(c.pd,{label:"Priority",type:"number",value:S.priority,onChange:e=>$({...S,priority:Number.parseInt(e.target.value)||1})}),(0,i.jsx)(c.l6,{label:"Proxy Pool",value:S.proxyPoolId,onChange:e=>$({...S,proxyPoolId:e.target.value}),options:[{value:y,label:"None"},...(m||[]).map(e=>({value:e.id,label:e.name}))],placeholder:"None"}),0===(m||[]).length&&(0,i.jsx)("p",{className:"text-xs text-text-muted",children:"No active proxy pools available. Create one in Proxy Pools page first."}),(0,i.jsx)("p",{className:"text-xs text-text-muted",children:"Legacy manual proxy fields are still accepted by API for backward compatibility."}),(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)(c.$n,{onClick:es,fullWidth:!0,disabled:W||!b&&(!S.name||!S.apiKey)||l&&!S.defaultModel.trim()||k&&(!A.azureEndpoint||!A.deployment||!A.organization)||N&&!E.accountId,children:W?"Saving...":"Save"}),(0,i.jsx)(c.$n,{onClick:g,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})}):null}function M({isOpen:e,node:t,onSave:s,onClose:l,isAnthropic:n}){let[r,o]=(0,a.useState)({name:"",prefix:"",apiType:"chat",baseUrl:"https://api.openai.com/v1"}),[d,p]=(0,a.useState)(!1),[m,u]=(0,a.useState)(""),[x,h]=(0,a.useState)(""),[f,g]=(0,a.useState)(!1),[y,b]=(0,a.useState)(null);(0,a.useEffect)(()=>{t&&o({name:t.name||"",prefix:t.prefix||"",apiType:t.apiType||"chat",baseUrl:t.baseUrl||(n?"https://api.anthropic.com/v1":"https://api.openai.com/v1")})},[t,n]);let v=async()=>{if(r.name.trim()&&r.prefix.trim()&&r.baseUrl.trim()){p(!0);try{let e={name:r.name,prefix:r.prefix,baseUrl:r.baseUrl};n||(e.apiType=r.apiType),await s(e)}finally{p(!1)}}},j=async()=>{g(!0);try{let e=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:r.baseUrl,apiKey:m,type:n?"anthropic-compatible":"openai-compatible",modelId:x.trim()||void 0})}),t=await e.json();b(t.valid?"success":"failed")}catch{b("failed")}finally{g(!1)}};return t?(0,i.jsx)(c.aF,{isOpen:e,title:`Edit ${n?"Anthropic":"OpenAI"} Compatible`,onClose:l,children:(0,i.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,i.jsx)(c.pd,{label:"Name",value:r.name,onChange:e=>o({...r,name:e.target.value}),placeholder:`${n?"Anthropic":"OpenAI"} Compatible (Prod)`,hint:"Required. A friendly label for this node."}),(0,i.jsx)(c.pd,{label:"Prefix",value:r.prefix,onChange:e=>o({...r,prefix:e.target.value}),placeholder:n?"ac-prod":"oc-prod",hint:"Required. Used as the provider prefix for model IDs."}),!n&&(0,i.jsx)(c.l6,{label:"API Type",options:[{value:"chat",label:"Chat Completions"},{value:"responses",label:"Responses API"}],value:r.apiType,onChange:e=>o({...r,apiType:e.target.value})}),(0,i.jsx)(c.pd,{label:"Base URL",value:r.baseUrl,onChange:e=>o({...r,baseUrl:e.target.value}),placeholder:n?"https://api.anthropic.com/v1":"https://api.openai.com/v1",hint:`Use the base URL (ending in /v1) for your ${n?"Anthropic":"OpenAI"}-compatible API.`}),(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)(c.pd,{label:"API Key (for Check)",type:"password",value:m,onChange:e=>u(e.target.value),className:"flex-1"}),(0,i.jsx)("div",{className:"pt-6",children:(0,i.jsx)(c.$n,{onClick:j,disabled:!m||f||!r.baseUrl.trim(),variant:"secondary",children:f?"Checking...":"Check"})})]}),(0,i.jsx)(c.pd,{label:"Model ID (optional)",value:x,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."}),y&&(0,i.jsx)(c.Ex,{variant:"success"===y?"success":"error",children:"success"===y?"Valid":"Invalid"}),(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)(c.$n,{onClick:v,fullWidth:!0,disabled:!r.name.trim()||!r.prefix.trim()||!r.baseUrl.trim()||d,children:d?"Saving...":"Save"}),(0,i.jsx)(c.$n,{onClick:l,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}function K({isOpen:e,providerAlias:t,providerDisplayAlias:s,onSave:l,onClose:n}){let[r,o]=(0,a.useState)(""),[d,p]=(0,a.useState)(null),[m,u]=(0,a.useState)(""),[x,h]=(0,a.useState)(!1);(0,a.useEffect)(()=>{e&&(o(""),p(null),u(""))},[e]);let f=e=>{let s=`${t}/`;return e.startsWith(s)?e.slice(s.length):e},g=async()=>{let e=f(r.trim());if(e){p("testing"),u("");try{let s=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${t}/${e}`})}),i=await s.json();p(i.ok?"ok":"error"),u(i.error||"")}catch(e){p("error"),u(e.message)}}},y=async()=>{let e=f(r.trim());if(e&&!x){h(!0);try{await l(e)}finally{h(!1)}}};return(0,i.jsx)(c.aF,{isOpen:e,onClose:n,title:"Add Custom Model",children:(0,i.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,i.jsxs)("div",{children:[(0,i.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Model ID"}),(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)("input",{type:"text",value:r,onChange:e=>{o(e.target.value),p(null),u("")},onKeyDown:e=>{"Enter"===e.key&&g()},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",autoFocus:!0}),(0,i.jsx)(c.$n,{variant:"secondary",icon:"science",loading:"testing"===d,onClick:g,disabled:!r.trim()||"testing"===d,children:"testing"===d?"Testing...":"Test"})]}),(0,i.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:["Sent to provider as: ",(0,i.jsx)("code",{className:"font-mono bg-sidebar px-1 rounded",children:f(r.trim())||"model-id"})]})]}),"ok"===d&&(0,i.jsxs)("div",{className:"flex items-center gap-2 text-sm text-green-600",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-base",children:"check_circle"}),"Model is reachable"]}),"error"===d&&(0,i.jsxs)("div",{className:"flex items-start gap-2 text-sm text-red-500",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-base shrink-0",children:"cancel"}),(0,i.jsx)("span",{children:m||"Model not reachable"})]}),(0,i.jsxs)("div",{className:"flex gap-2 pt-1",children:[(0,i.jsx)(c.$n,{onClick:n,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,i.jsx)(c.$n,{onClick:y,fullWidth:!0,size:"sm",disabled:!r.trim()||x,children:x?"Adding...":"Add Model"})]})]})})}z.propTypes={isOpen:P().bool.isRequired,provider:P().string,providerName:P().string,isCompatible:P().bool,isAnthropic:P().bool,authType:P().string,authHint:P().string,website:P().string,proxyPools:P().arrayOf(P().shape({id:P().string,name:P().string})),error:P().string,existingNames:P().arrayOf(P().string),onSave:P().func.isRequired,onBulkDone:P().func,onClose:P().func.isRequired},M.propTypes={isOpen:P().bool.isRequired,node:P().shape({id:P().string,name:P().string,prefix:P().string,apiType:P().string,baseUrl:P().string}),onSave:P().func.isRequired,onClose:P().func.isRequired,isAnthropic:P().bool},K.propTypes={isOpen:P().bool.isRequired,providerAlias:P().string.isRequired,providerDisplayAlias:P().string.isRequired,onSave:P().func.isRequired,onClose:P().func.isRequired};let J=`[
|
|
8
|
+
{
|
|
9
|
+
"accessToken": "eyJhbGc...",
|
|
10
|
+
"refreshToken": "rt_...",
|
|
11
|
+
"idToken": "eyJhbGc...",
|
|
12
|
+
"email": "user@example.com"
|
|
13
|
+
}
|
|
14
|
+
]`;function L({isOpen:e,onClose:t,onSuccess:s}){let[l,n]=(0,a.useState)(""),[r,o]=(0,a.useState)(!1),[d,p]=(0,a.useState)(""),[m,u]=(0,a.useState)(null),x=()=>{r||(n(""),p(""),u(null),t())},h=async()=>{var e;let t;p(""),u(null);let i=l.trim();if(!i)return;try{t=JSON.parse(i)}catch(e){p(`${(0,N.Tl)("Invalid JSON")}: ${e.message}`);return}let a=Array.isArray(e=t)?e:e&&"object"==typeof e?Array.isArray(e.accounts)?e.accounts:[e]:null;if(!a||0===a.length)return void p((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:a})}),t=await e.json();if(!e.ok)return void p(t?.error||`Request failed: ${e.status}`);u(t),t.success>0&&"function"==typeof s&&s()}catch(e){p(e.message||(0,N.Tl)("Request failed"))}finally{o(!1)}},f=m?.results?.filter(e=>!e.ok)||[];return(0,i.jsx)(c.aF,{isOpen:e,title:(0,N.Tl)("Bulk Add Codex Accounts"),onClose:x,children:(0,i.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,i.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,i.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:J,value:l,onChange:e=>n(e.target.value),disabled:r}),d&&(0,i.jsx)("p",{className:"text-xs text-red-500 break-words",children:d}),m&&(0,i.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,i.jsxs)("div",{className:`text-sm font-medium ${m.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",m.success," ",(0,N.Tl)("added"),m.failed>0?`, ✗ ${m.failed} ${(0,N.Tl)("failed")}`:""]}),f.length>0&&(0,i.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,i.jsxs)("li",{className:"text-red-400",children:["[",e.index,"] ",e.error]},e.index))})]}),(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)(c.$n,{onClick:h,fullWidth:!0,disabled:r||!l.trim(),children:r?(0,N.Tl)("Importing..."):(0,N.Tl)("Import All")}),(0,i.jsx)(c.$n,{onClick:x,variant:"ghost",fullWidth:!0,disabled:r,children:(0,N.Tl)("Close")})]})]})})}function W({isOpen:e,onClose:t,onSuccess:s,password:l=""}){let[n,r]=(0,a.useState)(""),[o,d]=(0,a.useState)(""),[p,m]=(0,a.useState)(!1),[u,x]=(0,a.useState)(""),[h,f]=(0,a.useState)(null),g=(0,a.useRef)(null),y=()=>{p||(r(""),d(""),x(""),f(null),g.current&&(g.current.value=""),t())},b=async()=>{let e;x(""),f(null);let t=n.trim();if(!t)return;try{e=JSON.parse(t)}catch(e){x(`${(0,N.Tl)("Invalid JSON")}: ${e.message}`);return}let i=Array.isArray(e)?e:e&&"object"==typeof e?Array.isArray(e.accounts)?e.accounts:[e]:null;if(!i||0===i.length)return void x((0,N.Tl)("No accounts found in input"));m(!0);try{let e=await fetch("/api/oauth/codebuddy-cn/bulk-import",{method:"POST",headers:{"Content-Type":"application/json",...l?{"x-9r-password":l}:{}},body:JSON.stringify({accounts:i})}),t=await e.json();if(!e.ok)return void x(401===e.status?(0,N.Tl)("Invalid password"):t?.error||`Request failed: ${e.status}`);f(t),(t.imported>0||t.updated>0)&&"function"==typeof s&&s()}catch(e){x(e.message||(0,N.Tl)("Request failed"))}finally{m(!1)}},v=h?.results?.filter(e=>!e.ok)||[],j=h?.skipped??0;return(0,i.jsx)(c.aF,{isOpen:e,title:(0,N.Tl)("Import CodeBuddy CN Accounts"),onClose:y,children:(0,i.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,i.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,i.jsx)(c.$n,{variant:"secondary",fullWidth:!0,icon:"upload_file",onClick:()=>g.current?.click(),disabled:p,children:o||(0,N.Tl)("Choose JSON file...")}),(0,i.jsx)("input",{ref:g,type:"file",accept:".json,application/json",className:"hidden",onChange:e=>{let t=e.target.files?.[0];if(!t)return;d(t.name),x(""),f(null);let s=new FileReader;s.onload=()=>r(String(s.result||"")),s.onerror=()=>x((0,N.Tl)("Failed to read file")),s.readAsText(t)}})]}),(0,i.jsxs)("div",{className:"relative",children:[(0,i.jsx)("div",{className:"absolute -top-2 left-2 bg-sidebar px-1 text-[10px] text-text-muted",children:(0,N.Tl)("Or paste JSON")}),(0,i.jsx)("textarea",{className:"w-full rounded border border-accent/30 bg-sidebar p-2 pt-4 text-sm font-mono resize-y min-h-[160px] focus:outline-none focus:ring-1 focus:ring-primary",placeholder:'[{ "access_token": "eyJ...", "refresh_token": "eyJ...", "nickname": "<nickname>" }]',value:n,onChange:e=>r(e.target.value),disabled:p})]}),u&&(0,i.jsx)("p",{className:"text-xs text-red-500 break-words",children:u}),h&&(0,i.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,i.jsxs)("div",{className:`text-sm font-medium ${h.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",h.imported," ",(0,N.Tl)("added"),", ",h.updated," ",(0,N.Tl)("updated"),j>0?`, ${j} ${(0,N.Tl)("skipped")}`:"",h.failed>0?`, ✗ ${h.failed} ${(0,N.Tl)("failed")}`:""]}),v.length>0&&(0,i.jsx)("ul",{className:"rounded border border-accent/20 bg-sidebar/50 p-2 text-xs font-mono max-h-40 overflow-y-auto",children:v.map(e=>(0,i.jsxs)("li",{className:"text-red-400",children:["[",e.index,"] ",e.error]},e.index))})]}),(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)(c.$n,{onClick:b,fullWidth:!0,disabled:p||!n.trim(),children:p?(0,N.Tl)("Importing..."):(0,N.Tl)("Import All")}),(0,i.jsx)(c.$n,{onClick:y,variant:"ghost",fullWidth:!0,disabled:p,children:(0,N.Tl)("Close")})]})]})})}function B({isOpen:e,mode:t,provider:s,providerName:l,dashboardPassword:n,onClose:r,onSuccess:o}){let[d,p]=(0,a.useState)(""),[m,u]=(0,a.useState)(""),[x,h]=(0,a.useState)(!1),[f,g]=(0,a.useState)(""),[y,b]=(0,a.useState)(null),[v,j]=(0,a.useState)(""),[w,k]=(0,a.useState)(null),C=(0,a.useRef)(null),T={"Content-Type":"application/json","x-9r-password":n||""},S=async()=>{if(g(""),d.length<4)return void g((0,N.Tl)("Passphrase must be at least 4 characters"));if(d!==m)return void g((0,N.Tl)("Passphrases do not match"));h(!0);try{let e=await fetch("/api/oauth/transfer/export",{method:"POST",headers:T,body:JSON.stringify({provider:s,passphrase:d})}),t=await e.json();if(!e.ok)throw Error(t?.error||`Request failed: ${e.status}`);let i=JSON.stringify(t.blob,null,2),a=URL.createObjectURL(new Blob([i],{type:"application/json"})),l=document.createElement("a");l.href=a,l.download=`oauth-${s}-transfer-${new Date().toISOString().slice(0,10)}.json`,document.body.appendChild(l),l.click(),l.remove(),setTimeout(()=>URL.revokeObjectURL(a),1e3),b({exported:t.count})}catch(e){g(e.message||(0,N.Tl)("Export failed"))}finally{h(!1)}},$=async()=>{if(g(""),b(null),!w)return void g((0,N.Tl)("Pick a transfer file first"));if(!d)return void g((0,N.Tl)("Transfer passphrase required"));h(!0);try{let e=await fetch("/api/oauth/transfer/import",{method:"POST",headers:T,body:JSON.stringify({provider:s,passphrase:d,blob:w})}),t=await e.json();if(!e.ok){if(401===e.status&&/passphrase/i.test(t?.error||""))throw Error((0,N.Tl)("Wrong passphrase"));throw Error(t?.error||`Request failed: ${e.status}`)}b(t),"function"==typeof o&&o()}catch(e){g(e.message||(0,N.Tl)("Import failed"))}finally{h(!1)}};return(0,i.jsx)(c.aF,{isOpen:e,title:"export"===t?(0,N.Tl)("Export OAuth accounts"):(0,N.Tl)("Import OAuth accounts"),onClose:()=>{x||(p(""),u(""),h(!1),g(""),b(null),j(""),k(null),C.current&&(C.current.value=""),r())},children:(0,i.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,i.jsxs)("p",{className:"text-xs text-text-muted",children:[(0,N.Tl)("Provider"),": ",(0,i.jsx)("span",{className:"font-medium text-text-main",children:l||s})]}),"export"===t?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)(c.pd,{type:"password",label:(0,N.Tl)("Transfer passphrase"),value:d,onChange:e=>p(e.target.value),placeholder:"••••••••"}),(0,i.jsx)(c.pd,{type:"password",label:(0,N.Tl)("Confirm passphrase"),value:m,onChange:e=>u(e.target.value),placeholder:"••••••••"})]}),(0,i.jsx)("p",{className:"text-xs text-text-muted",children:(0,N.Tl)("The file is encrypted with this passphrase — it is required again at import, and cannot be recovered.")}),f&&(0,i.jsx)("p",{className:"text-xs text-red-500",children:f}),y&&(0,i.jsxs)("p",{className:"text-xs text-green-600",children:[(0,N.Tl)("Export complete")," — ",y.exported," ",(0,N.Tl)("accounts exported")]}),(0,i.jsx)(c.$n,{onClick:S,disabled:x,fullWidth:!0,children:(0,N.Tl)("Export encrypted file")})]}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(c.pd,{label:(0,N.Tl)("Transfer file"),value:v,readOnly:!0,placeholder:(0,N.Tl)("Pick a transfer file first"),className:"cursor-pointer",onClick:()=>C.current?.click()}),(0,i.jsx)("input",{ref:C,type:"file",accept:".json,application/json",className:"hidden",onChange:e=>{let t=e.target.files?.[0];if(!t)return;j(t.name),g(""),b(null);let s=new FileReader;s.onload=()=>{try{let e=JSON.parse(String(s.result||""));if(e?.format!=="10router-oauth-secure-v1"){g((0,N.Tl)("Unrecognized transfer file (expected an encrypted OAuth transfer)")),k(null);return}k(e)}catch(e){g(`${(0,N.Tl)("Invalid JSON")}: ${e.message}`),k(null)}},s.onerror=()=>g((0,N.Tl)("Failed to read file")),s.readAsText(t)}}),(0,i.jsx)(c.pd,{type:"password",label:(0,N.Tl)("Transfer passphrase"),value:d,onChange:e=>p(e.target.value),placeholder:"••••••••"}),f&&(0,i.jsx)("p",{className:"text-xs text-red-500",children:f}),y&&(0,i.jsx)("div",{className:"text-xs text-text-muted",children:(0,i.jsxs)("p",{children:[(0,N.Tl)("Import complete"),": ",y.imported||0," ",(0,N.Tl)("imported"),", ",y.updated||0," ",(0,N.Tl)("updated"),(y.failed||0)>0?`, ${y.failed} ${(0,N.Tl)("failed")}`:""]})}),(0,i.jsx)(c.$n,{onClick:$,disabled:x,fullWidth:!0,children:(0,N.Tl)("Import connections")})]})]})})}L.propTypes={isOpen:P().bool.isRequired,onClose:P().func.isRequired,onSuccess:P().func},W.propTypes={isOpen:P().bool.isRequired,onClose:P().func.isRequired,onSuccess:P().func,password:P().string},B.propTypes={isOpen:P().bool.isRequired,mode:P().oneOf(["export","import"]).isRequired,provider:P().string.isRequired,providerName:P().string,dashboardPassword:P().string,onClose:P().func.isRequired,onSuccess:P().func};let H={claude:"claudeAutoPing",codex:"codexAutoPing"};function V(){let e,t,s,n,u,x,h,f=(0,l.useParams)(),g=(0,l.useRouter)(),y=f.id,{getCaps:b}=(0,k.y)(),v=(0,C.i)(),[T,A]=(0,a.useState)([]),[E,P]=(0,a.useState)(!0),[R,q]=(0,a.useState)(null),[U,F]=(0,a.useState)([]),[J,V]=(0,a.useState)(!1),[G,Q]=(0,a.useState)(!1),[Z,Y]=(0,a.useState)(!1),[X,ee]=(0,a.useState)(!1),[et,es]=(0,a.useState)(""),[ei,ea]=(0,a.useState)(!1),[el,en]=(0,a.useState)(!1),[er,eo]=(0,a.useState)(!1),[ed,ec]=(0,a.useState)(!1),[ep,em]=(0,a.useState)(!1),[eu,ex]=(0,a.useState)(null),[eh,ef]=(0,a.useState)({}),[eg,ey]=(0,a.useState)([]),[eb,ev]=(0,a.useState)(!1),[ej,ew]=(0,a.useState)(!1),[ek,eN]=(0,a.useState)(!1),[eC,eT]=(0,a.useState)({open:!1,action:null,value:""}),[eS,e$]=(0,a.useState)(!1),[eA,eO]=(0,a.useState)(""),[eE,eP]=(0,a.useState)(""),[eI,eR]=(0,a.useState)(!1),[eD,eq]=(0,a.useState)({}),[eU,e_]=(0,a.useState)(""),[eF,ez]=(0,a.useState)(()=>new Set),[eM,eK]=(0,a.useState)(!1),[eJ,eL]=(0,a.useState)([]),[eW,eB]=(0,a.useState)("__none__"),[eH,eV]=(0,a.useState)(!1),[eG,eQ]=(0,a.useState)(null),[eZ,eY]=(0,a.useState)(""),[eX,e0]=(0,a.useState)(!1),[e1,e5]=(0,a.useState)("auto"),[e2,e4]=(0,a.useState)({enabled:!1,connections:{}}),[e3,e6]=(0,a.useState)([]),[e7,e8]=(0,a.useState)(!1),[e9,te]=(0,a.useState)([]),[tt,ts]=(0,a.useState)([]),[ti,ta]=(0,a.useState)([]),[tl,tn]=(0,a.useState)(null),[tr,to]=(0,a.useState)(!1),[td,tc]=(0,a.useState)(!1),[tp,tm]=(0,a.useState)(!1),[tu,tx]=(0,a.useState)(null),[th,tf]=(0,a.useState)({}),[tg,ty]=(0,a.useState)(null),tb=(0,a.useRef)(!1),[tv,tj]=(0,a.useState)(!1),{copied:tw,copy:tk}=(0,w.C)(),tN="ag_risk_confirmed",tC=()=>{"xiaomi-mimo"===y?Q(!0):V(!0)},tT=()=>{"antigravity"===y&&"true"!==window.localStorage.getItem(tN)?to(!0):tF?tC():(es(""),ee(!0))},tS=()=>{es(""),ee(!0)},t$=()=>{tF?tT():tS()},tA=async()=>{if(!eS){e$(!0),eO("");try{let e=await fetch("/api/auth/verify-password",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({password:eC.value})});if(!e.ok){let t=await e.json().catch(()=>({}));eO(t?.error||(0,N.Tl)("Invalid password"));return}let{action:t}=eC;eT({open:!1,action:null,value:""}),"export"===t&&(tR(t),tP(!0))}catch(e){eO(e.message||(0,N.Tl)("Invalid password"))}finally{e$(!1)}}},tO=e=>{eP(""),eT({open:!0,action:e,value:""})},[tE,tP]=(0,a.useState)(!1),[tI,tR]=(0,a.useState)("export"),tD=async()=>{eN(!0);try{let e=await fetch("/api/oauth/codebuddy-cn/checkin",{method:"POST",cache:"no-store"}),t=await e.json();if(!e.ok)throw Error(t?.error||`Request failed: ${e.status}`);let s=Array.isArray(t?.results)?t.results:[];if(0===s.length)return void v.warning((0,N.Tl)("No CodeBuddy CN connections to check in"));let i=s.filter(e=>"checked-in"===e.status).length,a=s.filter(e=>"already"===e.status).length,l=s.filter(e=>"failed"===e.status).length;0===l?v.success(`${(0,N.Tl)("Check-in complete")}: ${i} ${(0,N.Tl)("checked-in")}, ${a} ${(0,N.Tl)("already checked in")}`):v.error(`${(0,N.Tl)("Check-in complete with errors")}: ${l} ${(0,N.Tl)("failed")}`)}catch(e){v.error((0,N.Tl)("Check-in failed")+": "+e.message)}finally{eN(!1)}},tq=()=>(0,i.jsx)("div",{className:"flex flex-wrap items-center gap-2",children:(0,i.jsx)(c.$n,{size:"sm",icon:"calendar_today",onClick:tD,disabled:ek,className:"w-full sm:w-auto",title:(0,N.Tl)("CodeBuddy CN auto-checks in daily (retries all day until confirmed)"),children:ek?(0,N.Tl)("Checking in..."):(0,N.Tl)("Check in now")})}),tU=R?{id:R.id,name:R.name||("anthropic-compatible"===R.type?"Anthropic Compatible":"OpenAI Compatible"),color:"anthropic-compatible"===R.type?"#D97757":"#10A37F",textIcon:"anthropic-compatible"===R.type?"AC":"OC",apiType:R.apiType,baseUrl:R.baseUrl,type:R.type}:p.zN[y]||p.fg[y]||p.IS[y]||p.nJ[y]||p.br[y],t_=tU?.authModes||[],tF=!!p.zN[y]||!!p.IS[y]||t_.includes("oauth"),tz=!!p.fg[y]||t_.includes("apikey"),tM=!!p.IS[y]?.noAuth,tK="codebuddy-cn"===y,tJ=tF&&tU?.authModes?.includes("oauth")&&eb,tL=tK&&ej,tW=(0,m.KC)(y),tB="cursor"===y&&e9.length>0?e9:tW,tH=(0,p.wG)(y),tV=(0,p.mq)(y),tG=(0,p.gb)(y),tQ=tV||tG,tZ=!tQ&&tF&&tz,tY="xai"===y?"Grok Build OAuth":"grok-cli"===y?"Grok CLI Device Login":"kimi"===y?"Kimi Coding OAuth":"OAuth",tX="xai"===y?"xAI API Key":"kimi"===y?"Kimi API Key":"qoder"===y?"PAT":"API Key",t0=e=>{if(!e1||"auto"===e1)return null;let t=j(y,e);return t&&t.includes(e1)?e1:null},t1=tQ?y:tH,t5=(()=>{let e=new Set,t=new Set,s=s=>{if(!s||t.has(s))return;t.add(s);let i=j(y,s);i&&i.forEach(t=>{"none"!==t&&e.add(t)})};for(let e of tB)s(e.id);for(let e of tt)s(e.id);for(let e of eg)e.providerAlias===t1&&"llm"===(e.kind||e.type||"llm")&&s(e.id);return e.size?["auto",...e]:null})(),t2=tQ?R?.prefix||y:tH,t4=(0,a.useCallback)(async()=>{try{let e=await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(t1)}`,{cache:"no-store"}),t=await e.json();e.ok&&ta(t.ids||[])}catch(e){console.log("Error fetching disabled models:",e)}},[t1]),t3=async e=>{try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:t1,ids:[e]})})).ok&&await t4()}catch(e){console.log("Error disabling model:",e)}},t6=async e=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(t1)}&id=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await t4()}catch(e){console.log("Error enabling model:",e)}},t7=async(e,t)=>{await fetch("/api/models/custom",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:t1,id:e,type:"llm",enabled:t})})},t8=async(e,t=[])=>{let s=e.length+t.length;s&&tn({title:"Disable All Models",message:`Disable all ${s} model(s)?`,onConfirm:async()=>{tn(null);try{for(let s of(e.length&&(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:t1,ids:e})})).ok&&await t4(),t))await t7(s,!1);t.length&&await st()}catch(e){console.log("Error disabling all models:",e)}}})},t9=async(e=[])=>{try{for(let t of((await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(t1)}`,{method:"DELETE"})).ok&&await t4(),e))await t7(t,!0);e.length&&await st()}catch(e){console.log("Error enabling all models:",e)}},se=(0,a.useCallback)(async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&ef(t.aliases||{})}catch(e){console.log("Error fetching aliases:",e)}},[]),st=(0,a.useCallback)(async()=>{try{let e=await fetch("/api/models/custom",{cache:"no-store"}),t=await e.json();e.ok&&ey(t.models||[])}catch(e){console.log("Error fetching custom models:",e)}},[]);(0,a.useEffect)(()=>{"kilocode"===y&&fetch("/api/providers/kilo/free-models").then(e=>e.json()).then(e=>{e.models?.length&&ts(e.models)}).catch(()=>{})},[y]);let ss=(0,a.useCallback)(async()=>{try{let[e,t,s,i]=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"})]),a=await e.json(),l=await t.json(),n=await s.json(),r=i.ok?await i.json():{};if(e.ok){let e=(a.connections||[]).filter(e=>e.provider===y);A(e)}s.ok&&F(n.proxyPools||[]);let o=(r.providerStrategies||{})[y]||{};eQ(o.fallbackStrategy||null),eY(null!=o.stickyRoundRobinLimit?String(o.stickyRoundRobinLimit):"1"),e0(!0===o.earliestExpiryFirst);let d=(r.providerThinking||{})[y]||{};e5(d.mode||"auto");let c=H[y],p=c&&r[c]||{};if(e4({enabled:!0===p.enabled,connections:p.connections||{}}),t.ok){let e=(l.nodes||[]).find(e=>e.id===y)||null;if(!e&&tQ)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===y)||null))break}q(e)}}catch(e){console.log("Error fetching connections:",e)}finally{P(!1)}},[y,tQ]),si=(0,a.useCallback)(async()=>{await ss(),await t4()},[ss,t4]),sa=async e=>{try{let t=await fetch(`/api/provider-nodes/${y}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),s=await t.json();t.ok&&(q(s.node),await ss(),ec(!1))}catch(e){console.log("Error updating provider node:",e)}},sl=async(e,t,s=eX)=>{try{let i=await fetch("/api/settings",{cache:"no-store"}),a=(i.ok?await i.json():{}).providerStrategies||{},l={...a[y]||{}};e?l.fallbackStrategy=e:delete l.fallbackStrategy,"round-robin"===e&&""!==t?l.stickyRoundRobinLimit=Number(t)||3:delete l.stickyRoundRobinLimit,s?l.earliestExpiryFirst=!0:delete l.earliestExpiryFirst;let n={...a};0===Object.keys(l).length?delete n[y]:n[y]=l,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:n})})}catch(e){console.log("Error saving provider strategy:",e)}},sn=async e=>{try{let t=await fetch("/api/settings",{cache:"no-store"}),s={...(t.ok?await t.json():{}).providerThinking||{}};e&&"auto"!==e?s[y]={mode:e}:delete s[y],await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerThinking:s})})}catch(e){console.log("Error saving thinking config:",e)}},sr=async e=>{let t=H[y];if(t){e4(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,a.useEffect)(()=>{ss(),se(),st(),t4()},[ss,se,st,t4]),(0,a.useEffect)(()=>{fetch("/api/settings",{cache:"no-store"}).then(e=>e.json()).then(e=>{"boolean"==typeof e.codeBuddyOAuthImport&&ev(e.codeBuddyOAuthImport),"boolean"==typeof e.codeBuddyCheckin&&ew(e.codeBuddyCheckin)}).catch(e=>console.log("Error reading settings:",e))},[]),(0,a.useEffect)(()=>{if("cursor"!==y)return void te([]);let e=T.find(e=>!1!==e.isActive);if(!e?.id)return void te([]);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:s})=>{!t&&e&&Array.isArray(s.models)&&s.models.length>0&&te(s.models)}).catch(()=>{}),()=>{t=!0}},[y,T]),(0,a.useEffect)(()=>{let e=(p.zN[y]||p.fg[y]||p.IS[y]||p.nJ[y])?.modelsFetcher;e&&S(e).then(e6)},[y]);let so=async(e,t,s=tH)=>{let i=`${s}/${e}`;try{let e=await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:i,alias:t})});if(e.ok)await se();else{let t=await e.json();v.error(t.error||"Failed to set alias")}}catch(e){console.log("Error setting alias:",e)}},sd=async e=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await se()}catch(e){console.log("Error deleting alias:",e)}},sc=async(e,t="llm",s=t1,i={},a)=>{try{let l={providerAlias:s,id:e,type:t};if(void 0!==a&&(l.enabled=a),i&&"object"==typeof i)for(let e of["vision","reasoning","contextWindow","maxOutput","thinkingFormat"])void 0!==i[e]&&(l[e]=i[e]);let n=await fetch("/api/models/custom",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)});if(n.ok)await st(),window.dispatchEvent(new CustomEvent("customModelChanged"));else{let e=await n.json();v.error(e.error||"Failed to add custom model")}}catch(e){console.log("Error adding custom model:",e)}},sp=async(e,t="llm",s=t1)=>{try{let i=new URLSearchParams({providerAlias:s,id:e,type:t});(await fetch(`/api/models/custom?${i}`,{method:"DELETE"})).ok&&(await st(),window.dispatchEvent(new CustomEvent("customModelChanged")))}catch(e){console.log("Error deleting custom model:",e)}},sm=async(e,t,s="llm")=>{try{(await fetch("/api/models/custom",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:t1,id:e,type:s,enabled:t})})).ok&&(await st(),window.dispatchEvent(new CustomEvent("customModelChanged")))}catch(e){console.log("Error toggling custom model:",e)}},su=(e,t="llm")=>{tn({title:e?(0,N.Tl)("Enable all custom models?"):(0,N.Tl)("Disable all custom models?"),message:e?(0,N.Tl)("All custom models of this provider will be listed in /v1/models and exposed to clients."):(0,N.Tl)("All custom models of this provider will disappear from /v1/models until re-enabled. Clients will no longer see them."),onConfirm:async()=>{tn(null);try{(await fetch("/api/models/custom/bulk",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:t1,type:t,enabled:e})})).ok&&(await st(),window.dispatchEvent(new CustomEvent("customModelChanged")))}catch(e){console.log("Error bulk-updating custom models:",e)}}})},sx=async()=>{if(tv)return;let e=T.find(e=>!1!==e.isActive);if(!e)return void v.warning((0,N.Tl)("Please add an active Qoder connection first"));tj(!0);try{let t=await fetch(`/api/providers/${e.id}/models`),s=await t.json();if(!t.ok)return void v.error(s.error||(0,N.Tl)("Failed to fetch models"));let i=s.models||[];if(0===i.length)return void v.warning((0,N.Tl)("No models returned"));let a=0;for(let e of i){let t=e.id||e.name;if(!t)continue;let s=t.replace(/^qoder\//,"");eg.some(e=>e.providerAlias===t1&&e.id===s&&"llm"===(e.kind||e.type||"llm"))||Object.values(eh).includes(`${t1}/${s}`)||(await sc(s,"llm",t1,{},!1),a+=1)}0===a?v.warning((0,N.Tl)("All models already exist, no new models added")):v.success((0,N.Tl)("Successfully added")+` ${a} `+(0,N.Tl)("models"))}catch(e){console.log("Error importing Qoder models:",e),v.error((0,N.Tl)("Error fetching models")+": "+e.message)}finally{tj(!1)}},sh="opencode-go"===y||"bai"===y,sf=async()=>{if(e7)return;let e=T.find(e=>!1!==e.isActive);if(!e?.id)return void v.warning((0,N.Tl)("Add a connection to enable importing models."));e8(!0);try{let t=await fetch(`/api/providers/${e.id}/models`,{cache:"no-store"}),s=await t.json();if(!t.ok)throw Error(s?.error||`Request failed: ${t.status}`);let i=(Array.isArray(s.models)?s.models:[]).map(e=>{let t=e?.id||e?.name||e?.model;return t?{...e,id:String(t),name:e.name||String(t)}:null}).filter(Boolean);e6(i),v.success(`${(0,N.Tl)("Models refreshed")} (${i.length})`)}catch(e){v.error((0,N.Tl)("Failed to fetch models")+": "+e.message)}finally{e8(!1)}},sg=async()=>{if(td||0===T.length)return;let e=Object.fromEntries(T.map(e=>[e.id,{state:"queued",error:null}]));tb.current=!1,tc(!0),tm(!1),tx(null),tf(e),ty({total:T.length,completed:0,passed:0,failed:0,stopped:!1});let t=0,s=0;try{for(let e=0;e<T.length;e+=1){if(tb.current){ty({total:T.length,completed:e,passed:t,failed:s,stopped:!0});break}let i=T[e];tx(i.id),tf(e=>({...e,[i.id]:{state:"testing",error:null}}));try{let e=await fetch(`/api/providers/${i.id}/test`,{method:"POST"}),a=await e.json(),l=!!a.valid;l?t+=1:s+=1,tf(e=>({...e,[i.id]:{state:l?"success":"failed",error:l?null:a.error||null}}))}catch(e){s+=1,tf(t=>({...t,[i.id]:{state:"failed",error:e.message||"Test failed"}}))}ty({total:T.length,completed:e+1,passed:t,failed:s,stopped:!1}),e<T.length-1&&await new Promise(e=>setTimeout(e,1e3))}}finally{tx(null),tc(!1),tm(!1),tb.current=!1}},sy=async e=>{tn({title:"Delete Connection",message:"Delete this connection?",onConfirm:async()=>{tn(null);try{(await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok&&A(t=>t.filter(t=>t.id!==e))}catch(e){console.log("Error deleting connection:",e)}}})},sb=()=>{ss(),V(!1)},sv=async e=>{es("");try{let t=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:y,...e})}),s=null;try{s=await t.json()}catch{s=null}if(t.ok){await si(),ee(!1);return}es(s?.error||"Failed to save connection")}catch(e){console.log("Error saving connection:",e),es("Failed to save connection")}},sj=async e=>{try{(await fetch(`/api/providers/${eu.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await ss(),eo(!1))}catch(e){console.log("Error updating connection:",e)}},sw=async(e,t)=>{try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&A(s=>s.map(s=>s.id===e?{...s,isActive:t}:s))}catch(e){console.log("Error updating connection status:",e)}},sk=async(e,t)=>{let s=[...T];[s[e],s[t]]=[s[t],s[e]],A(s);try{await Promise.all([fetch(`/api/providers/${s[e].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:e})}),fetch(`/api/providers/${s[t].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:t})})])}catch(e){console.log("Error swapping priority:",e),await ss()}},sN=T.filter(e=>eJ.includes(e.id)),sC=T.length>0&&eJ.length===T.length;(0,a.useEffect)(()=>{eL(e=>e.filter(e=>T.some(t=>t.id===e)))},[T]),(()=>{if(0===sN.length)return;let e=new Set(sN.map(e=>e.providerSpecificData?.proxyPoolId||"__none__"));if(1===e.size){let t=[...e][0];if("__none__"===t)return;let s=U.find(e=>e.id===t);return s?.name}})();let sT=()=>{eH||em(!1)},sS=async e=>{eV(!0);try{let t=0;for(let{connectionId:s,proxyPoolId:i}of e)try{(await fetch(`/api/providers/${s}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:i})})).ok||(t+=1)}catch(e){console.log("Error applying proxy for",s,e),t+=1}t>0&&alert(`Updated with ${t} failed request(s).`),await ss(),em(!1)}finally{eV(!1)}},s$=e=>sS(T.map(t=>({connectionId:t.id,proxyPoolId:e}))),sA=(0,i.jsx)("div",{className:"flex min-w-0 flex-col divide-y divide-black/[0.03] dark:divide-white/[0.03]",children:T.map((e,t)=>{let s;return(0,i.jsxs)("div",{className:"flex min-w-0 items-stretch",children:[(0,i.jsx)("div",{className:"flex shrink-0 items-center pl-1 sm:pl-2",children:(0,i.jsx)("input",{type:"checkbox",checked:(s=e.id,eJ.includes(s)),onChange:()=>{var t;return t=e.id,void eL(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,i.jsx)("div",{className:"flex-1 min-w-0",children:(0,i.jsx)(_,{connection:e,proxyPools:U,isOAuth:tF,isFirst:0===t,isLast:t===T.length-1,onMoveUp:()=>sk(t,t-1),onMoveDown:()=>sk(t,t+1),onToggleActive:t=>sw(e.id,t),autoPing:H[y]&&"oauth"===e.authType?{on:!0===e2.connections[e.id],onToggle:t=>{var s;return s=e.id,void sr({...e2,connections:{...e2.connections,[s]:t}})},provider:y}:null,onUpdateProxy:async t=>{try{(await fetch(`/api/providers/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:t||null})})).ok&&A(s=>s.map(s=>s.id===e.id?{...s,providerSpecificData:{...s.providerSpecificData,proxyPoolId:t||null}}:s))}catch(e){console.log("Error updating proxy:",e)}},onEdit:()=>{ex(e),eo(!0)},onDelete:()=>sy(e.id),oneByOneStatus:th[e.id]||null})})]},e.id)})}),sO=U.filter(e=>!0===e.isActive),sE=(0,i.jsx)(c.aF,{isOpen:ep,onClose:sT,title:`Apply Proxy (${T.length} connections)`,children:(0,i.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,i.jsxs)("div",{className:"flex flex-col",children:[(0,i.jsxs)("button",{onClick:()=>{let e=U.filter(e=>!0===e.isActive);return 0===e.length?void v.warning("No active proxy pools available."):sS(T.map((t,s)=>({connectionId:t.id,proxyPoolId:e[s%e.length].id})))},disabled:eH||0===sO.length,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"sync_alt"}),(0,i.jsx)("span",{className:"text-sm text-text-main",children:"One-to-one (rotate)"})]}),(0,i.jsxs)("button",{onClick:()=>s$(null),disabled:eH,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"link_off"}),(0,i.jsx)("span",{className:"text-sm text-text-main",children:"None (unbind all)"})]}),U.map(e=>(0,i.jsxs)("button",{onClick:()=>s$(e.id),disabled:eH||!0!==e.isActive,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"lan"}),(0,i.jsx)("span",{className:"truncate text-sm text-text-main",children:e.name}),!0!==e.isActive&&(0,i.jsx)("span",{className:"text-[10px] text-text-muted",children:"(inactive)"})]},e.id))]}),eH&&(0,i.jsx)("p",{className:"text-xs text-text-muted",children:"Applying..."}),(0,i.jsx)(c.$n,{onClick:sT,variant:"ghost",fullWidth:!0,disabled:eH,children:"Cancel"})]})}),sP=async e=>{if(!eF.has(e)){ez(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:`${t1}/${e}`})}),s=await t.json();eq(t=>({...t,[e]:s.ok?"ok":"error"})),e_(s.ok?"":s.error||"Model not reachable")}catch{eq(t=>({...t,[e]:"error"})),e_("Network error")}finally{ez(t=>{let s=new Set(t);return s.delete(e),s})}}};if(E)return(0,i.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,i.jsx)(c.Qv,{}),(0,i.jsx)(c.Qv,{})]});if(!tU)return(0,i.jsxs)("div",{className:"text-center py-20",children:[(0,i.jsx)("p",{className:"text-text-muted",children:"Provider not found"}),(0,i.jsx)(r(),{href:"/dashboard/providers",className:"text-primary mt-4 inline-block",children:"Back to Providers"})]});let sI=()=>tV&&tU.apiType?"responses"===tU.apiType?"/providers/oai-r.png":"/providers/oai-cc.png":tG?"/providers/anthropic-m.png":(0,d.HY)(tU.id);return(0,i.jsxs)("div",{className:"flex min-w-0 flex-col gap-6 px-1 sm:gap-8 sm:px-0",children:[(0,i.jsxs)("div",{className:"min-w-0",children:[(0,i.jsxs)(r(),{href:"/dashboard/providers",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary transition-colors mb-4",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),"Back to Providers"]}),(0,i.jsxs)("div",{className:"flex min-w-0 items-center gap-3 sm:gap-4",children:[(0,i.jsx)("div",{className:"flex size-12 shrink-0 items-center justify-center rounded-lg",style:{backgroundColor:`${tU.color}15`},children:eI||!sI()?(0,i.jsx)("span",{className:"text-sm font-bold",style:{color:tU.color},children:tU.textIcon||tU.id.slice(0,2).toUpperCase()}):(0,i.jsx)(o.default,{src:sI(),alt:tU.name,width:48,height:48,className:"max-h-12 max-w-12 rounded-lg object-contain",sizes:"48px",onError:()=>{(0,d.Kw)(tU.id),eR(!0)},loading:"lazy",decoding:"async"})}),(0,i.jsxs)("div",{className:"min-w-0",children:[(0,i.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[(0,i.jsx)("h1",{className:"truncate text-2xl font-semibold tracking-tight sm:text-3xl",children:tU.name}),(tU.notice?.webUrl||tU.notice?.apiKeyUrl||tU.notice?.signupUrl||tU.website)&&(0,i.jsxs)("a",{href:tU.notice?.webUrl||tU.notice?.apiKeyUrl||tU.notice?.signupUrl||tU.website,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline inline-flex items-center gap-1",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),tU.notice?.webUrl?"Web console":tU.notice?.apiKeyUrl?"Get API Key":"Sign up / Learn more"]}),(0,i.jsx)(c.N5,{code:tU.notice?.inviteCode})]}),(0,i.jsxs)("p",{className:"text-text-muted",children:[T.length," connection",1===T.length?"":"s"]})]})]})]}),tU.deprecated&&(0,i.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,i.jsx)("span",{className:"material-symbols-outlined text-[16px] text-yellow-500 mt-0.5 shrink-0",children:"warning"}),(0,i.jsx)("p",{className:"text-xs text-red-600 dark:text-yellow-400 leading-relaxed",children:tU.deprecationNotice})]}),tU.notice?.text&&!tU.deprecated&&(0,i.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,i.jsx)("span",{className:"material-symbols-outlined text-[16px] text-blue-500 shrink-0",children:"info"}),(0,i.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-blue-600 dark:text-blue-400",children:(0,N.Tl)(tU.notice.text)}),tU.notice.apiKeyUrl&&(0,i.jsx)("a",{href:tU.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:(0,N.Tl)("Get API Key →")}),(0,i.jsx)(c.N5,{code:tU.notice?.inviteCode})]}),tQ&&R&&(0,i.jsx)(c.Zp,{children:(0,i.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,i.jsxs)("div",{className:"min-w-0",children:[(0,i.jsx)("h2",{className:"text-lg font-semibold",children:tG?"Anthropic Compatible Details":"OpenAI Compatible Details"}),(0,i.jsxs)("p",{className:"break-all text-sm text-text-muted",children:[tG?"Messages API":"responses"===R.apiType?"Responses API":"Chat Completions"," \xb7 ",(R.baseUrl||"").replace(/\/$/,""),"/",tG?"messages":"responses"===R.apiType?"responses":"chat/completions"]})]}),(0,i.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,i.jsx)(c.$n,{size:"sm",icon:"add",onClick:()=>{es(""),ee(!0)},className:"w-full sm:w-auto",children:"Add API Key"}),(0,i.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>ec(!0),className:"w-full sm:w-auto",children:"Edit"}),(0,i.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:async()=>{tn({title:"Delete Compatible Node",message:`Delete this ${tG?"Anthropic":"OpenAI"} Compatible node?`,onConfirm:async()=>{tn(null);try{(await fetch(`/api/provider-nodes/${y}`,{method:"DELETE"})).ok&&g.push("/dashboard/providers")}catch(e){console.log("Error deleting provider node:",e)}}})},className:"w-full sm:w-auto",children:"Delete"})]})]})}),tM?(0,i.jsx)(c.gw,{providerId:y}):(0,i.jsxs)(c.Zp,{children:[(0,i.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,i.jsx)("h2",{className:"text-lg font-semibold",children:"Connections"}),(0,i.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-4",children:[T.length>0&&U.length>0&&(0,i.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"lan",onClick:()=>em(!0),children:"Apply Proxy"}),T.length>0&&(0,i.jsxs)(i.Fragment,{children:[eJ.length>0&&(0,i.jsxs)(c.$n,{size:"sm",variant:"danger",icon:"delete",onClick:()=>{let e=eJ.length;0!==e&&tn({title:`Delete ${e} Connection${e>1?"s":""}`,message:`Delete ${e} connection${e>1?"s":""}? This cannot be undone.`,onConfirm:async()=>{tn(null);let e=0,t=[...eJ];for(let s of t)try{(await fetch(`/api/providers/${s}`,{method:"DELETE"})).ok||(e+=1)}catch(t){console.log("Error deleting connection:",t),e+=1}A(e=>e.filter(e=>!t.includes(e.id))),eL([]),e>0&&alert(`Deleted ${t.length-e} connection(s), ${e} failed.`)}})},children:["Delete Selected (",eJ.length,")"]}),(0,i.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"sync",onClick:sg,disabled:td,children:td?(0,N.Tl)("Testing Connection One-by-One..."):(0,N.Tl)("Test Connection One-by-One")}),td&&(0,i.jsx)(c.$n,{size:"sm",variant:"ghost",icon:"stop",onClick:()=>{td&&(tb.current=!0,tm(!0))},disabled:tp,children:tp?(0,N.Tl)("Stopping..."):(0,N.Tl)("Stop")})]}),(0,i.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,i.jsx)("span",{className:"text-xs text-text-muted font-medium",title:(0,N.Tl)("Prioritize accounts with quota packages that expire soonest"),children:(0,N.Tl)("Earliest Expiry First")}),(0,i.jsx)(c.lM,{checked:eX,onChange:e=>{e0(e),sl(eG,eZ,e)}})]}),(0,i.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,i.jsx)("span",{className:"text-xs text-text-muted font-medium",children:(0,N.Tl)("Round Robin")}),(0,i.jsx)(c.lM,{checked:"round-robin"===eG,onChange:e=>{let t=e?"round-robin":null,s=e?eZ||"1":eZ;e&&!eZ&&eY("1"),eQ(t),sl(t,s,eX)}}),"round-robin"===eG&&(0,i.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,i.jsx)("span",{className:"text-xs text-text-muted",children:(0,N.Tl)("Sticky:")}),(0,i.jsx)("input",{type:"number",min:1,value:eZ,onChange:e=>{var t;eY(t=e.target.value),sl("round-robin",t,eX)},placeholder:"1",className:"w-14 px-2 py-1 text-xs border border-border rounded-md bg-background focus:outline-none focus:border-primary"})]})]})]})]}),0===T.length?(0,i.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,i.jsxs)("div",{className:"flex items-center gap-3",children:[(0,i.jsx)("div",{className:"inline-flex items-center justify-center w-9 h-9 rounded-full bg-primary/10 text-primary shrink-0",children:(0,i.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:tF?"lock":"key"})}),(0,i.jsxs)("div",{className:"min-w-0",children:[(0,i.jsx)("p",{className:"text-sm text-text-muted",children:"No connections yet"}),tZ&&(0,i.jsxs)("p",{className:"text-xs text-text-muted",children:["Choose ",tY," or ",tX,"."]})]})]}),(0,i.jsx)("div",{className:"flex gap-2",children:tZ?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(c.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:tT,children:tY}),(0,i.jsx)(c.$n,{size:"sm",icon:"key",onClick:tS,children:tX}),tJ&&!tL&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(c.$n,{size:"sm",icon:"file_download",variant:"secondary",onClick:()=>tO("export"),children:(0,N.Tl)("Export")}),(0,i.jsx)(c.$n,{size:"sm",icon:"upload_file",variant:"secondary",onClick:()=>{tR("import"),tP(!0)},children:(0,N.Tl)("Import")})]}),tL&&tq()]}):(0,i.jsxs)(i.Fragment,{children:[!tQ&&"iflow"===y&&(0,i.jsx)(c.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>Y(!0),children:"Cookie"}),"codex"===y&&(0,i.jsx)(c.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>ea(!0),children:(0,N.Tl)("Bulk Add")}),(0,i.jsx)(c.$n,{size:"sm",icon:"add",onClick:t$,children:tQ?"Add API Key":"iflow"===y?"OAuth":"Add Connection"})]})})]}):(0,i.jsxs)(i.Fragment,{children:[tg&&(0,i.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,i.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,i.jsxs)("span",{children:[(0,N.Tl)("Total:")," ",tg.total]}),(0,i.jsxs)("span",{children:[(0,N.Tl)("Completed:")," ",tg.completed]}),(0,i.jsxs)("span",{children:[(0,N.Tl)("Passed:")," ",tg.passed]}),(0,i.jsxs)("span",{children:[(0,N.Tl)("Failed:")," ",tg.failed]}),tg.stopped&&(0,i.jsx)("span",{className:"text-amber-600 dark:text-amber-400",children:(0,N.Tl)("Stopped")}),td&&tu&&(0,i.jsxs)("span",{children:[(0,N.Tl)("Running:")," ",T.find(e=>e.id===tu)?.name||tu]})]})}),T.length>0&&(0,i.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,i.jsxs)("label",{className:"flex cursor-pointer items-center gap-1.5 text-xs text-text-muted hover:text-primary",children:[(0,i.jsx)("input",{type:"checkbox",checked:sC,onChange:()=>{sC?eL([]):eL(T.map(e=>e.id))},className:"h-3.5 w-3.5 rounded border-gray-300 text-primary focus:ring-primary"}),"Select All"]})}),sA,!tQ&&(0,i.jsxs)("div",{className:"mt-4 grid grid-cols-1 gap-2 sm:flex",children:["iflow"===y&&(0,i.jsx)(c.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>Y(!0),title:"Add connection using browser cookie",className:"w-full sm:w-auto",children:"Cookie"}),"codex"===y&&(0,i.jsx)(c.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>ea(!0),title:(0,N.Tl)("Bulk import codex accounts from JSON"),className:"w-full sm:w-auto",children:(0,N.Tl)("Bulk Add")}),tZ?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(c.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:tT,className:"w-full sm:w-auto",children:tY}),(0,i.jsx)(c.$n,{size:"sm",icon:"key",onClick:tS,className:"w-full sm:w-auto",children:tX}),tJ&&!tL&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(c.$n,{size:"sm",icon:"file_download",variant:"secondary",onClick:()=>tO("export"),className:"w-full sm:w-auto",children:(0,N.Tl)("Export")}),(0,i.jsx)(c.$n,{size:"sm",icon:"upload_file",variant:"secondary",onClick:()=>{tR("import"),tP(!0)},className:"w-full sm:w-auto",children:(0,N.Tl)("Import")})]}),tL&&tq()]}):(0,i.jsx)(c.$n,{size:"sm",icon:"add",onClick:t$,className:"w-full sm:w-auto",children:"Add"})]})]})]}),(0,i.jsxs)(c.Zp,{children:[(0,i.jsxs)("div",{className:"mb-4 flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,i.jsxs)("div",{className:"flex items-center gap-3",children:[(0,i.jsx)("h2",{className:"text-lg font-semibold",children:"Available Models"}),t5&&(0,i.jsx)("select",{value:e1,onChange:e=>{var t;e5(t=e.target.value),sn(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:t5.map(e=>(0,i.jsx)("option",{value:e,children:`Thinking: ${e.charAt(0).toUpperCase()+e.slice(1)}`},e))})]}),!tQ&&(e=[...tB,...tt.filter(e=>!tB.some(t=>t.id===e.id))].filter(e=>{let t=(0,m.CP)(e);return!t||"llm"===t}).map(e=>e.id).filter(e=>!ti.includes(e)),s=(t=eg.filter(e=>e?.providerAlias===t1&&"llm"===(e.kind||e.type||"llm"))).filter(e=>!1!==e.enabled).map(e=>e.id),n=t.filter(e=>!1===e.enabled).map(e=>e.id),u=ti.length>0||n.length>0,x=e.length>0||s.length>0,(0,i.jsxs)("div",{className:"flex gap-2",children:[u&&(0,i.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"restart_alt",onClick:()=>t9(n),children:"Active All"}),x&&(0,i.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"block",onClick:()=>t8(e,s),children:"Disable All"})]}))]}),!!eU&&(h=O(eU),(0,i.jsxs)("p",{className:"text-xs text-red-500 mb-3 break-words",children:[eU," ",h&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("a",{href:h,target:"_blank",rel:"noopener noreferrer",title:(0,N.Tl)("Recommended: open in an incognito window and sign in with the affected account"),className:"text-blue-500 underline hover:text-blue-400",children:(0,N.Tl)("Verify your account")})," ",(0,i.jsx)("button",{type:"button",onClick:()=>tk(h,"verification"),className:"text-text-muted underline hover:text-primary",children:"verification"===tw?(0,N.Tl)("Copied"):(0,N.Tl)("Copy link")}),(0,i.jsxs)("span",{className:"text-text-muted",children:[" ","(",(0,N.Tl)("Recommended: open in an incognito window and sign in with the affected account"),")"]})]})]})),(()=>{let e,t,s;if(tQ)return(0,i.jsx)(D,{providerStorageAlias:t1,providerDisplayAlias:t2,modelAliases:eh,customModels:eg,copied:tw,onCopy:tk,onSetAlias:so,onDeleteAlias:sd,onAddCustomModel:(e,t)=>sc(e,"llm",t1,{},t),onToggleCustomModel:sm,onDeleteCustomModel:e=>sp(e,"llm",t1),onBulkCustomModels:su,connections:T,isAnthropic:tG});let a=[...tB,...tt.filter(e=>!tB.some(t=>t.id===e.id))].filter(e=>{let t=(0,m.CP)(e);return!t||"llm"===t}),l=new Set(ti),n=a.filter(e=>!l.has(e.id)),r=a.filter(e=>l.has(e.id)),o=$({customModels:eg,modelAliases:eh,providerAlias:t1,builtInModels:tB,type:"llm"}),d=o.filter(e=>!1!==e.enabled),c=o.filter(e=>!1===e.enabled);return(0,i.jsxs)("div",{className:"flex flex-wrap gap-3",children:[d.length+c.length>0&&(0,i.jsxs)("div",{className:"w-full flex items-center gap-2 text-xs text-text-muted -mb-1",children:[(0,i.jsxs)("span",{children:[(0,N.Tl)("Custom models")," (",d.length+c.length,")"]}),(0,i.jsx)("span",{children:"\xb7"}),(0,i.jsx)("button",{onClick:()=>su(!0),className:"text-primary hover:underline",children:(0,N.Tl)("Enable all")}),(0,i.jsx)("span",{children:"\xb7"}),(0,i.jsx)("button",{onClick:()=>su(!1),className:"text-text-muted hover:text-red-500 hover:underline",children:(0,N.Tl)("Disable all")})]}),d.map(e=>(0,i.jsx)(I,{model:{id:e.id,name:e.name},fullModel:`${t2}/${e.id}`,alias:e.alias,copied:tw,onCopy:tk,onSetAlias:()=>{},onDeleteAlias:()=>{"custom"===e.source?sp(e.id,"llm",t1):sd(e.alias)},testStatus:eD[e.id],onTest:T.length>0||tM?()=>sP(e.id):void 0,isTesting:eF.has(e.id),isCustom:!0,isFree:!1,caps:b(`${y}/${e.id}`),thinkingSuffix:t0(e.id)},`${e.source}-${e.fullModel}`)),n.map(e=>{let t=`${t1}/${e.id}`,s=`${y}/${e.id}`,a=Object.entries(eh).find(([,e])=>e===t||e===s)?.[0];return(0,i.jsx)(I,{model:e,fullModel:`${t2}/${e.id}`,alias:a,copied:tw,onCopy:tk,onSetAlias:t=>so(e.id,t,t1),onDeleteAlias:()=>sd(a),testStatus:eD[e.id],onTest:T.length>0||tM?()=>sP(e.id):void 0,isTesting:eF.has(e.id),isFree:e.isFree,onDisable:()=>t3(e.id),caps:b(`${y}/${e.id}`),thinkingSuffix:t0(e.id)},e.id)}),(0,i.jsxs)("button",{onClick:()=>eK(!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,i.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"}),"Add Model"]}),"qoder"===y&&T.some(e=>!1!==e.isActive)&&(0,i.jsxs)("button",{onClick:sx,disabled:tv,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,i.jsx)("span",{className:"material-symbols-outlined text-sm",style:tv?{animation:"spin 1s linear infinite"}:void 0,children:tv?"progress_activity":"download"}),tv?(0,N.Tl)("Fetching..."):(0,N.Tl)("Fetch Qoder Models")]}),sh&&(0,i.jsxs)("button",{onClick:sf,disabled:e7||!T.some(e=>!1!==e.isActive),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,i.jsx)("span",{className:"material-symbols-outlined text-sm",style:e7?{animation:"spin 1s linear infinite"}:void 0,children:e7?"progress_activity":"refresh"}),e7?(0,N.Tl)("Refreshing..."):(0,N.Tl)("Refresh Official Models")]}),e3.length>0&&(e=new Set([...Object.values(eh),...o.map(e=>e.fullModel)]),t=new Set(tB.map(e=>e.id)),0===(s=e3.filter(s=>!e.has(`${t1}/${s.id}`)&&!t.has(s.id))).length?null:(0,i.jsxs)("div",{className:"w-full mt-2",children:[(0,i.jsx)("p",{className:"text-xs text-text-muted mb-2",children:"Suggested free models (≥200k context):"}),(0,i.jsx)("div",{className:"flex flex-wrap gap-2",children:s.map(e=>(0,i.jsxs)("button",{onClick:async()=>{await sc(e.id,"llm",t1)},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,i.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),e.id.split("/").pop()]},e.id))})]})),(r.length>0||c.length>0)&&(0,i.jsxs)("div",{className:"w-full mt-2",children:[(0,i.jsxs)("p",{className:"text-xs text-text-muted mb-2",children:["Disabled models (",r.length+c.length,"):"]}),(0,i.jsxs)("div",{className:"flex flex-wrap gap-3",children:[c.map(e=>(0,i.jsx)(I,{model:{id:e.id,name:e.name},fullModel:`${t2}/${e.id}`,copied:tw,onCopy:tk,testStatus:eD[e.id],onTest:T.length>0||tM?()=>sP(e.id):void 0,isTesting:eF.has(e.id),onEnable:()=>sm(e.id,!0),isCustom:!1,isFree:!1},`custom-${e.fullModel}`)),r.map(e=>(0,i.jsx)(I,{model:e,fullModel:`${t2}/${e.id}`,copied:tw,onCopy:tk,testStatus:eD[e.id],onTest:T.length>0||tM?()=>sP(e.id):void 0,isTesting:eF.has(e.id),onEnable:()=>t6(e.id),isFree:e.isFree,caps:b(`${y}/${e.id}`),thinkingSuffix:t0(e.id)},e.id))]})]})]})})()]}),sE,"kiro"===y?(0,i.jsx)(c.Mh,{isOpen:J,providerInfo:tU,onSuccess:sb,onClose:()=>V(!1)}):"cursor"===y?(0,i.jsx)(c.G9,{isOpen:J,onSuccess:sb,onClose:()=>V(!1)}):"gitlab"===y?(0,i.jsx)(c.vj,{isOpen:J,providerInfo:tU,onSuccess:sb,onClose:()=>V(!1)}):(0,i.jsx)(c.LF,{isOpen:J,provider:y,providerInfo:tU,onSuccess:sb,onClose:()=>V(!1)}),"xiaomi-mimo"===y&&(0,i.jsx)(c.LH,{isOpen:G,onSuccess:sb,onClose:()=>Q(!1)}),"iflow"===y&&(0,i.jsx)(c.vE,{isOpen:Z,onSuccess:()=>{ss(),Y(!1)},onClose:()=>Y(!1)}),(0,i.jsx)(z,{isOpen:X,provider:y,providerName:tU.name,isCompatible:tQ,isAnthropic:tG,authType:tU?.authType,authHint:tU?.authHint,website:tU?.website,proxyPools:U,error:et,existingNames:T.map(e=>e.name).filter(Boolean),onSave:sv,onBulkDone:si,onClose:()=>{es(""),ee(!1)}}),(0,i.jsx)(c.wI,{isOpen:er,connection:eu,proxyPools:U,onSave:sj,onClose:()=>eo(!1)}),tQ&&(0,i.jsx)(M,{isOpen:ed,node:R,onSave:sa,onClose:()=>ec(!1),isAnthropic:tG}),!tQ&&(0,i.jsx)(K,{isOpen:eM,providerAlias:t1,providerDisplayAlias:t2,onSave:async e=>{await sc(e,"llm",t1),eK(!1)},onClose:()=>eK(!1)}),"codex"===y&&(0,i.jsx)(L,{isOpen:ei,onClose:()=>ea(!1),onSuccess:ss}),"codebuddy-cn"===y&&(0,i.jsx)(W,{isOpen:el,password:eE,onClose:()=>en(!1),onSuccess:ss}),(0,i.jsx)(B,{isOpen:tE,mode:tI,provider:y,providerName:tU?.name,onClose:()=>tP(!1),onSuccess:ss}),(0,i.jsxs)(c.aF,{isOpen:eC.open,onClose:()=>eT({open:!1,action:null,value:""}),title:(0,N.Tl)("Confirm Password"),size:"sm",footer:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(c.$n,{variant:"ghost",onClick:()=>eT({open:!1,action:null,value:""}),children:(0,N.Tl)("Cancel")}),(0,i.jsx)(c.$n,{variant:"primary",onClick:tA,disabled:!eC.value||eS,children:eS?(0,N.Tl)("Verifying..."):(0,N.Tl)("Confirm")})]}),children:[(0,i.jsx)("p",{className:"text-text-muted mb-3 text-sm",children:(0,N.Tl)("Enter your dashboard password to export OAuth accounts (the file will be encrypted with the transfer passphrase you pick next).")}),(0,i.jsx)(c.pd,{type:"password",autoFocus:!0,value:eC.value,onChange:e=>eT(t=>({...t,value:e.target.value})),onKeyDown:e=>{"Enter"===e.key&&eC.value&&tA()},placeholder:(0,N.Tl)("Password")}),eA&&(0,i.jsx)("p",{className:"text-xs text-red-500 mt-2",children:eA})]}),(0,i.jsx)(c.uo,{isOpen:tr,onClose:()=>to(!1),onConfirm:()=>{(window.localStorage.setItem(tN,"true"),to(!1),tF)?tC():tS()},title:"Risk Notice",message:tU?.deprecationNotice,confirmText:"I Understand, Continue",cancelText:"Cancel",variant:"danger"}),(0,i.jsx)(c.uo,{isOpen:!!tl,onClose:()=>tn(null),onConfirm:tl?.onConfirm,title:tl?.title||"Confirm",message:tl?.message,variant:"danger"})]})}},70217:(e,t,s)=>{"use strict";function i(e,t){return!1===e?"default":"active"===t||"success"===t?"success":"error"===t||"expired"===t||"unavailable"===t?"error":"default"}s.d(t,{g:()=>i})},93578:(e,t,s)=>{Promise.resolve().then(s.bind(s,69955))}},e=>{e.O(0,[3170,1728,5772,1321,5497,8441,3794,7358],()=>e(e.s=93578)),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9089],{12055:(e,r,t)=>{Promise.resolve().then(t.bind(t,15615))},15615:(e,r,t)=>{"use strict";t.r(r),t.d(r,{default:()=>u});var a=t(95155),s=t(12115),i=t(73321),l=t(98500),d=t.n(l),o=t(35497),n=t(90620);let c=Object.values(n.Q2).map(e=>({value:e.id,label:e.name})),p=Object.values(n.MA).map(e=>({value:e.id,label:e.name}));function u(){let e=(0,i.useRouter)(),[r,t]=(0,s.useState)(!1),[l,u]=(0,s.useState)({provider:"",authMethod:"api_key",apiKey:"",displayName:"",isActive:!0}),[h,m]=(0,s.useState)({}),x=(e,r)=>{u(t=>({...t,[e]:r})),h[e]&&m(r=>({...r,[e]:null}))},b=async r=>{let a;if(r.preventDefault(),a={},l.provider||(a.provider="Please select a provider"),"api_key"!==l.authMethod||l.apiKey||(a.apiKey="API Key is required"),m(a),0===Object.keys(a).length){t(!0);try{let r=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)});if(r.ok)e.push("/dashboard/providers");else{let e=await r.json();m({submit:e.error||"Failed to create provider"})}}catch(e){m({submit:"An error occurred. Please try again."})}finally{t(!1)}}},v=n.Q2[l.provider];return(0,a.jsxs)("div",{className:"max-w-2xl mx-auto",children:[(0,a.jsxs)("div",{className:"mb-8",children:[(0,a.jsxs)(d(),{href:"/dashboard/providers",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary transition-colors mb-4",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),"Back to Providers"]}),(0,a.jsx)("h1",{className:"text-3xl font-semibold tracking-tight",children:"Add New Provider"}),(0,a.jsx)("p",{className:"text-text-muted mt-2",children:"Configure a new AI provider to use with your applications."})]}),(0,a.jsx)(o.Zp,{children:(0,a.jsxs)("form",{onSubmit:b,className:"flex flex-col gap-6",children:[(0,a.jsx)(o.l6,{label:"Provider",options:c,value:l.provider,onChange:e=>x("provider",e.target.value),placeholder:"Select a provider",error:h.provider,required:!0}),v&&(0,a.jsxs)(o.Zp.Section,{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"size-10 rounded-lg flex items-center justify-center bg-bg border border-border",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-xl",style:{color:v.color},children:v.icon})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:v.name}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Selected provider"})]})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("label",{className:"text-sm font-medium",children:["Authentication Method ",(0,a.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,a.jsx)("div",{className:"flex gap-3",children:p.map(e=>(0,a.jsxs)("button",{type:"button",onClick:()=>x("authMethod",e.value),className:`flex-1 flex items-center justify-center gap-2 p-4 rounded-lg border transition-all ${l.authMethod===e.value?"border-primary bg-primary/5 text-primary":"border-border hover:border-primary/50"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined",children:"api_key"===e.value?"key":"lock"}),(0,a.jsx)("span",{className:"font-medium",children:e.label})]},e.value))})]}),"api_key"===l.authMethod&&(0,a.jsx)(o.pd,{label:"API Key",type:"password",placeholder:"Enter your API key",value:l.apiKey,onChange:e=>x("apiKey",e.target.value),error:h.apiKey,hint:"Your API key will be encrypted and stored securely.",required:!0}),"oauth2"===l.authMethod&&(0,a.jsxs)(o.Zp.Section,{children:[(0,a.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Connect your account using OAuth2 authentication."}),(0,a.jsx)(o.$n,{type:"button",variant:"secondary",icon:"link",children:"Connect with OAuth2"})]}),(0,a.jsx)(o.pd,{label:"Display Name",placeholder:"e.g., Production API, Dev Environment",value:l.displayName,onChange:e=>x("displayName",e.target.value),hint:"Optional. A friendly name to identify this configuration."}),(0,a.jsx)(o.lM,{checked:l.isActive,onChange:e=>x("isActive",e),label:"Active",description:"Enable this provider for use in your applications"}),h.submit&&(0,a.jsx)("div",{className:"p-4 rounded-lg bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 text-red-600 dark:text-red-400 text-sm",children:h.submit}),(0,a.jsxs)("div",{className:"flex gap-3 pt-4 border-t border-border",children:[(0,a.jsx)(d(),{href:"/dashboard/providers",className:"flex-1",children:(0,a.jsx)(o.$n,{type:"button",variant:"ghost",fullWidth:!0,children:"Cancel"})}),(0,a.jsx)(o.$n,{type:"submit",loading:r,fullWidth:!0,className:"flex-1",children:"Create Provider"})]})]})})]})}}},e=>{e.O(0,[
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9089],{12055:(e,r,t)=>{Promise.resolve().then(t.bind(t,15615))},15615:(e,r,t)=>{"use strict";t.r(r),t.d(r,{default:()=>u});var a=t(95155),s=t(12115),i=t(73321),l=t(98500),d=t.n(l),o=t(35497),n=t(90620);let c=Object.values(n.Q2).map(e=>({value:e.id,label:e.name})),p=Object.values(n.MA).map(e=>({value:e.id,label:e.name}));function u(){let e=(0,i.useRouter)(),[r,t]=(0,s.useState)(!1),[l,u]=(0,s.useState)({provider:"",authMethod:"api_key",apiKey:"",displayName:"",isActive:!0}),[h,m]=(0,s.useState)({}),x=(e,r)=>{u(t=>({...t,[e]:r})),h[e]&&m(r=>({...r,[e]:null}))},b=async r=>{let a;if(r.preventDefault(),a={},l.provider||(a.provider="Please select a provider"),"api_key"!==l.authMethod||l.apiKey||(a.apiKey="API Key is required"),m(a),0===Object.keys(a).length){t(!0);try{let r=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)});if(r.ok)e.push("/dashboard/providers");else{let e=await r.json();m({submit:e.error||"Failed to create provider"})}}catch(e){m({submit:"An error occurred. Please try again."})}finally{t(!1)}}},v=n.Q2[l.provider];return(0,a.jsxs)("div",{className:"max-w-2xl mx-auto",children:[(0,a.jsxs)("div",{className:"mb-8",children:[(0,a.jsxs)(d(),{href:"/dashboard/providers",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary transition-colors mb-4",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),"Back to Providers"]}),(0,a.jsx)("h1",{className:"text-3xl font-semibold tracking-tight",children:"Add New Provider"}),(0,a.jsx)("p",{className:"text-text-muted mt-2",children:"Configure a new AI provider to use with your applications."})]}),(0,a.jsx)(o.Zp,{children:(0,a.jsxs)("form",{onSubmit:b,className:"flex flex-col gap-6",children:[(0,a.jsx)(o.l6,{label:"Provider",options:c,value:l.provider,onChange:e=>x("provider",e.target.value),placeholder:"Select a provider",error:h.provider,required:!0}),v&&(0,a.jsxs)(o.Zp.Section,{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"size-10 rounded-lg flex items-center justify-center bg-bg border border-border",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-xl",style:{color:v.color},children:v.icon})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:v.name}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Selected provider"})]})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("label",{className:"text-sm font-medium",children:["Authentication Method ",(0,a.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,a.jsx)("div",{className:"flex gap-3",children:p.map(e=>(0,a.jsxs)("button",{type:"button",onClick:()=>x("authMethod",e.value),className:`flex-1 flex items-center justify-center gap-2 p-4 rounded-lg border transition-all ${l.authMethod===e.value?"border-primary bg-primary/5 text-primary":"border-border hover:border-primary/50"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined",children:"api_key"===e.value?"key":"lock"}),(0,a.jsx)("span",{className:"font-medium",children:e.label})]},e.value))})]}),"api_key"===l.authMethod&&(0,a.jsx)(o.pd,{label:"API Key",type:"password",placeholder:"Enter your API key",value:l.apiKey,onChange:e=>x("apiKey",e.target.value),error:h.apiKey,hint:"Your API key will be encrypted and stored securely.",required:!0}),"oauth2"===l.authMethod&&(0,a.jsxs)(o.Zp.Section,{children:[(0,a.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Connect your account using OAuth2 authentication."}),(0,a.jsx)(o.$n,{type:"button",variant:"secondary",icon:"link",children:"Connect with OAuth2"})]}),(0,a.jsx)(o.pd,{label:"Display Name",placeholder:"e.g., Production API, Dev Environment",value:l.displayName,onChange:e=>x("displayName",e.target.value),hint:"Optional. A friendly name to identify this configuration."}),(0,a.jsx)(o.lM,{checked:l.isActive,onChange:e=>x("isActive",e),label:"Active",description:"Enable this provider for use in your applications"}),h.submit&&(0,a.jsx)("div",{className:"p-4 rounded-lg bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 text-red-600 dark:text-red-400 text-sm",children:h.submit}),(0,a.jsxs)("div",{className:"flex gap-3 pt-4 border-t border-border",children:[(0,a.jsx)(d(),{href:"/dashboard/providers",className:"flex-1",children:(0,a.jsx)(o.$n,{type:"button",variant:"ghost",fullWidth:!0,children:"Cancel"})}),(0,a.jsx)(o.$n,{type:"submit",loading:r,fullWidth:!0,className:"flex-1",children:"Create Provider"})]})]})})]})}}},e=>{e.O(0,[3170,1728,1321,5497,8441,3794,7358],()=>e(e.s=12055)),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8460],{67455:(e,t,r)=>{Promise.resolve().then(r.bind(r,97678))},97678:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>T});var s=r(95155),a=r(12115),l=r(14051),i=r.n(l),n=r(35497),o=r(57250),d=r(8247),c=r(90620),p=r(88105),m=r(98500),x=r.n(m),u=r(65921),h=r(38003),f=r(73006);let g={available:{icon:"check_circle",color:"#22c55e",label:"Available"},cooldown:{icon:"schedule",color:"#f59e0b",label:"Cooldown"},unavailable:{icon:"error",color:"#ef4444",label:"Unavailable"},unknown:{icon:"help",color:"#6b7280",label:"Unknown"}};function y(){let[e,t]=(0,a.useState)(null),[r,l]=(0,a.useState)(!0),[i,o]=(0,a.useState)(!1),[d,c]=(0,a.useState)(null),p=(0,a.useRef)(null),m=(0,u.i)(),x=(0,a.useCallback)(async()=>{try{let e=await fetch("/api/models/availability");if(e.ok){let r=await e.json();t(r)}}catch{}finally{l(!1)}},[]);(0,a.useEffect)(()=>{x();let e=setInterval(x,3e4);return()=>clearInterval(e)},[x]),(0,a.useEffect)(()=>{let e=e=>{p.current&&!p.current.contains(e.target)&&o(!1)};return i&&document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[i]);let h=async(e,t)=>{c(`${e}:${t}`);try{(await fetch("/api/models/availability",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"clearCooldown",provider:e,model:t})})).ok?(m.success(`Cooldown cleared for ${t}`),await x()):m.error("Failed to clear cooldown")}catch{m.error("Failed to clear cooldown")}finally{c(null)}};if(r)return null;let f=e?.models||[],y=0===(e?.unavailableCount||f.filter(e=>"available"!==e.status).length),b={};return f.forEach(e=>{if("available"===e.status)return;let t=e.provider||"unknown";b[t]||(b[t]=[]),b[t].push(e)}),(0,s.jsx)("div",{className:"relative",ref:p,children:i&&(0,s.jsxs)("div",{className:"absolute top-full right-0 mt-2 w-80 bg-surface border border-border rounded-xl shadow-2xl z-50 overflow-hidden",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border bg-bg",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",style:{color:y?"#22c55e":"#f59e0b"},children:y?"verified":"warning"}),(0,s.jsx)("span",{className:"text-sm font-semibold text-text-main",children:"Model Status"})]}),(0,s.jsx)("button",{onClick:x,className:"p-1 rounded-lg hover:bg-surface text-text-muted hover:text-text-main transition-colors",title:"Refresh",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"refresh"})})]}),(0,s.jsx)("div",{className:"px-4 py-3 max-h-60 overflow-y-auto",children:y?(0,s.jsx)("p",{className:"text-sm text-text-muted text-center py-2",children:"All models are responding normally."}):(0,s.jsx)("div",{className:"flex flex-col gap-2.5",children:Object.entries(b).map(([e,t])=>(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-xs font-semibold text-text-main mb-1.5 capitalize",children:e}),(0,s.jsx)("div",{className:"flex flex-col gap-1",children:t.map(e=>{let t=g[e.status]||g.unknown,r=d===`${e.provider}:${e.model}`;return(0,s.jsxs)("div",{className:"flex items-center justify-between px-2.5 py-1.5 rounded-lg bg-surface/30",children:[(0,s.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px] shrink-0",style:{color:t.color},children:t.icon}),(0,s.jsx)("span",{className:"font-mono text-xs text-text-main truncate",children:e.model})]}),"cooldown"===e.status&&(0,s.jsx)(n.$n,{size:"sm",variant:"ghost",onClick:()=>h(e.provider,e.model),disabled:r,className:"text-[10px] px-1.5! py-0.5! ml-2",children:r?"...":"Clear"})]},`${e.provider}-${e.model}`)})})]},e))})})]})})}let b={openai:{title:"Add OpenAI Compatible",type:"openai-compatible",defaultBaseUrl:"https://api.openai.com/v1",namePlaceholder:"OpenAI Compatible (Prod)",prefixPlaceholder:"oc-prod",baseUrlHint:"Use the base URL (ending in /v1) for your OpenAI-compatible API.",modelIdPlaceholder:"e.g. gpt-4, claude-3-opus",errorLabel:"OpenAI Compatible",hasApiType:!0},anthropic:{title:"Add Anthropic Compatible",type:"anthropic-compatible",defaultBaseUrl:"https://api.anthropic.com/v1",namePlaceholder:"Anthropic Compatible (Prod)",prefixPlaceholder:"ac-prod",baseUrlHint:"Use the base URL (ending in /v1) for your Anthropic-compatible API. The system will append /messages.",modelIdPlaceholder:"e.g. claude-3-opus",errorLabel:"Anthropic Compatible",hasApiType:!1}},v=[{value:"chat",label:"Chat Completions"},{value:"responses",label:"Responses API"}];function j({variant:e,isOpen:t,onClose:r,onCreated:l}){let i=b[e],o=()=>({name:"",prefix:"",...i.hasApiType?{apiType:"chat"}:{},baseUrl:i.defaultBaseUrl}),[d,c]=(0,a.useState)(o),[p,m]=(0,a.useState)(!1),[x,u]=(0,a.useState)(""),[h,f]=(0,a.useState)(""),[g,y]=(0,a.useState)(""),[N,T]=(0,a.useState)(!1),[w,k]=(0,a.useState)(null);(0,a.useEffect)(()=>{i.hasApiType?c(e=>({...e,baseUrl:i.defaultBaseUrl})):t&&(k(null),f(""),y(""),u(""))},[i.hasApiType?d.apiType:t]);let C=async()=>{if(d.name.trim()&&d.prefix.trim()&&d.baseUrl.trim()){m(!0),u("");try{let e=await fetch("/api/provider-nodes",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:d.name,prefix:d.prefix,...i.hasApiType?{apiType:d.apiType}:{},baseUrl:d.baseUrl,type:i.type})}),t=await e.json();e.ok?(l(t.node),c(o()),f(""),k(null),u("")):u(t?.error||"Failed to create provider")}catch(e){console.log(`Error creating ${i.errorLabel} node:`,e),u("Network error creating provider")}finally{m(!1)}}},A=async()=>{T(!0);try{let e=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:d.baseUrl,apiKey:h,type:i.type,modelId:g.trim()||void 0})}),t=await e.json();k(t)}catch{k({valid:!1,error:"Network error"})}finally{T(!1)}};return(0,s.jsx)(n.aF,{isOpen:t,title:i.title,onClose:r,children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsx)(n.pd,{label:"Name",value:d.name,onChange:e=>c({...d,name:e.target.value}),placeholder:i.namePlaceholder,hint:"Required. A friendly label for this node."}),(0,s.jsx)(n.pd,{label:"Prefix",value:d.prefix,onChange:e=>c({...d,prefix:e.target.value}),placeholder:i.prefixPlaceholder,hint:"Required. Used as the provider prefix for model IDs."}),i.hasApiType&&(0,s.jsx)(n.l6,{label:"API Type",options:v,value:d.apiType,onChange:e=>c({...d,apiType:e.target.value})}),(0,s.jsx)(n.pd,{label:"Base URL",value:d.baseUrl,onChange:e=>c({...d,baseUrl:e.target.value}),placeholder:i.defaultBaseUrl,hint:i.baseUrlHint}),(0,s.jsx)(n.pd,{label:"API Key (for Check)",type:"password",value:h,onChange:e=>f(e.target.value)}),(0,s.jsx)(n.pd,{label:"Model ID (optional)",value:g,onChange:e=>y(e.target.value),placeholder:i.modelIdPlaceholder,hint:"If provider lacks /models endpoint, enter a model ID to validate via chat/completions instead."}),(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center",children:[(0,s.jsx)(n.$n,{onClick:A,disabled:!h||N||!d.baseUrl.trim(),variant:"secondary",className:"w-full sm:w-auto",children:N?"Checking...":"Check"}),(()=>{if(!w)return null;let{valid:e,error:t,method:r}=w;return e?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.Ex,{variant:"success",children:"Valid"}),"chat"===r&&(0,s.jsx)("span",{className:"text-sm text-text-muted",children:"(via inference test)"})]}):(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsx)(n.Ex,{variant:"error",children:"Invalid"}),t&&(0,s.jsx)("span",{className:"text-sm text-red-500",children:t})]})})()]}),x&&(0,s.jsx)("div",{className:"rounded border border-red-500/40 bg-red-500/10 px-3 py-2 text-sm text-red-500",children:x}),(0,s.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row",children:[(0,s.jsx)(n.$n,{onClick:C,fullWidth:!0,disabled:!d.name.trim()||!d.prefix.trim()||!d.baseUrl.trim()||p,children:p?"Creating...":"Create"}),(0,s.jsx)(n.$n,{onClick:r,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})})}function N(e,t,r){let a=[];if(e>0&&a.push((0,s.jsxs)(n.Ex,{variant:"success",size:"sm",dot:!0,children:[e," Connected"]},"connected")),t>0){let e=r?`${t} Error (${r})`:`${t} Error`;a.push((0,s.jsx)(n.Ex,{variant:"error",size:"sm",dot:!0,children:e},"error"))}return 0===a.length?(0,s.jsx)("span",{className:"text-text-muted",children:"No connections"}):a}function T(){let e,t,[r,l]=(0,a.useState)([]),[i,o]=(0,a.useState)([]),[d,m]=(0,a.useState)(!0),[x,g]=(0,a.useState)(!1),[b,v]=(0,a.useState)(!0),[N,T]=(0,a.useState)(!1),[A,I]=(0,a.useState)(!1),[E,$]=(0,a.useState)(null),[S,P]=(0,a.useState)(null),[O,R]=(0,a.useState)({}),[U,_]=(0,a.useState)(!1),z=(0,u.i)(),D=(0,h.C)(e=>e.query),q=(0,h.C)(e=>e.register),F=(0,h.C)(e=>e.unregister);(0,a.useEffect)(()=>(q("Search providers..."),()=>F()),[q,F]);let M=e=>!D.trim()||!!e&&e.toLowerCase().includes(D.trim().toLowerCase()),L=(e,t,r)=>{if(e.connected>0)return 0;if(t?.noAuth){let e;return+(!1===(e=O?.[r])||!0!==e&&!!t.topologyHiddenByDefault)}return U?0===e.total?3:2:1};(0,a.useEffect)(()=>{(async()=>{try{let[e,t,r]=await Promise.all([fetch("/api/providers"),fetch("/api/provider-nodes"),fetch("/api/settings",{cache:"no-store"})]),s=await e.json(),a=await t.json();if(e.ok&&l(s.connections||[]),t.ok&&o(a.nodes||[]),r.ok){let e=await r.json();R(e.topologyVisibility||{}),_(!0===e.providerDisabledLastSort),v(!1!==e.showCommunityProviders)}}catch(e){console.log("Error fetching data:",e)}finally{m(!1)}})()},[]);let H=(0,a.useCallback)(async(e,t)=>{let r={...O,[e]:t};R(r);try{if(!(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({topologyVisibility:r})})).ok)throw Error("Failed to update topology visibility")}catch(e){console.error("Error updating topology visibility:",e),R(O)}},[O]),J=(e,t)=>{let s=Array.isArray(t)?t:[t],a=r.filter(t=>t.provider===e&&s.includes(t.authType)),l=e=>{let t=Object.entries(e).some(([e,t])=>e.startsWith("modelLock_")&&t&&new Date(t).getTime()>Date.now());return"unavailable"!==e.testStatus||t?e.testStatus:"active"},i=a.filter(e=>{if(!1===e.isActive)return!1;let t=l(e);return"active"===t||"success"===t}).length,n=a.filter(e=>{let t=l(e);return"error"===t||"expired"===t||"unavailable"===t}),o=n.length,d=a.length,c=d>0&&a.every(e=>!1===e.isActive),p=n.sort((e,t)=>new Date(t.lastErrorAt||0)-new Date(e.lastErrorAt||0))[0];return{connected:i,error:o,total:d,errorCode:p?function(e){if(!e)return null;let t=e.lastErrorType;if("runtime_error"===t)return"RUNTIME";if("upstream_auth_error"===t||"auth_missing"===t||"token_refresh_failed"===t||"token_expired"===t)return"AUTH";if("upstream_rate_limited"===t)return"429";if("upstream_unavailable"===t)return"5XX";if("network_error"===t)return"NET";let r=Number(e.errorCode);if(Number.isFinite(r)&&r>=400)return String(r);let s=function(e){if(!e)return null;let t=e.match(/\b([45]\d{2})\b/);return t?t[1]:"ERR"}(e.lastError);if("401"===s||"403"===s)return"AUTH";if(s&&"ERR"!==s)return s;let a=(e.lastError||"").toLowerCase();return a.includes("runtime")||a.includes("not runnable")||a.includes("not installed")?"RUNTIME":a.includes("invalid api key")||a.includes("token invalid")||a.includes("revoked")||a.includes("unauthorized")?"AUTH":"ERR"}(p):null,errorTime:p?.lastErrorAt?function(e){if(!e)return"";let t=Math.floor((Date.now()-new Date(e).getTime())/6e4);if(t<1)return"just now";if(t<60)return`${t}m ago`;let r=Math.floor(t/60);if(r<24)return`${r}h ago`;let s=Math.floor(r/24);return`${s}d ago`}(p.lastErrorAt):null,allDisabled:c}},K=async(e,t,s)=>{let a=Array.isArray(t)?t:[t],i=t=>t.provider===e&&a.includes(t.authType),n=r.filter(i);l(e=>e.map(e=>i(e)?{...e,isActive:s}:e)),await Promise.allSettled(n.map(e=>fetch(`/api/providers/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:s})})))},B=async(e,t=null)=>{if(!E){$("provider"===e?t:e),P(null);try{let r=await fetch("/api/providers/test-batch",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({mode:e,providerId:t})}),s=await r.json();if(P(s),s.summary){let{passed:e,failed:t,total:r}=s.summary;0===t?z.success(`${(0,f.Tl)("All")} ${r} ${(0,f.Tl)("tests passed")}`):z.warning(`${e}/${r} ${(0,f.Tl)("passed")}, ${t} ${(0,f.Tl)("failed")}`)}}catch(e){P({error:(0,f.Tl)("Test request failed")}),z.error((0,f.Tl)("Provider test failed"))}finally{$(null)}}},W=i.filter(e=>"openai-compatible"===e.type).map(e=>({id:e.id,name:e.name||"OpenAI Compatible",color:"#10A37F",textIcon:"OC",apiType:e.apiType})).filter(e=>M(e.name)),V=i.filter(e=>"anthropic-compatible"===e.type).map(e=>({id:e.id,name:e.name||"Anthropic Compatible",color:"#D97757",textIcon:"AC"})).filter(e=>M(e.name)),Q=(e,t)=>{if("kiro"===t)return["oauth","apikey","api_key"];let r=e?.authModes;return Array.isArray(r)?r.includes("apikey")?["oauth","apikey","api_key"]:"oauth":t in p.nJ||t in c.fg?["oauth","apikey","api_key"]:"oauth"},X=(e=Object.entries(c.zN).filter(([,e])=>!e.hidden&&M(e.name)),t="oauth",[...e].sort(([e,r],[s,a])=>{let l=J(e,t),i=J(s,t),n=L(l,r,e),o=L(i,a,s);if(n!==o)return n-o;let d=r.priority??999,c=a.priority??999;return d!==c?d-c:(r.name||"").localeCompare(a.name||"")})),Z=[...Object.entries(p.IS).filter(([,e])=>!e.hidden&&!(e.community&&!b)&&M(e.name)).map(([e,t])=>({key:e,info:t,stats:J(e,Q(t,e)),isFreeTier:!1})),...Object.entries(p.nJ).filter(([,e])=>!e.hidden&&!(e.community&&!b)&&M(e.name)&&(e.serviceKinds??["llm"]).includes("llm")).map(([e,t])=>({key:e,info:t,stats:J(e,Q(t,e)),isFreeTier:!0}))].sort((e,t)=>{let r=L(e.stats,e.info,e.key),s=L(t.stats,t.info,t.key);if(r!==s)return r-s;let a=!!t.info.noAuth-!!e.info.noAuth;if(0!==a)return a;let l=+!!e.info.community,i=+!!t.info.community;if(l!==i)return l-i;let n=e.info.priority??999,o=t.info.priority??999;return n!==o?n-o:(e.info.name||"").localeCompare(t.info.name||"")}),Y=Object.entries(c.fg).filter(([,e])=>!e.hidden&&(e.serviceKinds??["llm"]).includes("llm")&&M(e.name)).sort(([e,t],[r,s])=>{let a=J(e,"apikey"),l=J(r,"apikey"),i=L(a,t,e),n=L(l,s,r);if(i!==n)return i-n;let o=t.priority??999,d=s.priority??999;return o!==d?o-d:(t.name||"").localeCompare(s.name||"")}),G=!!D.trim(),ee=G||x?Y:Y.slice(0,20),et=Y.length-20;if(d)return(0,s.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,s.jsx)(n.Qv,{}),(0,s.jsx)(n.Qv,{})]});let er=X.length>0||Z.length>0||Y.length>0||W.length>0||V.length>0;return(0,s.jsxs)("div",{className:"flex min-w-0 flex-col gap-6 px-1 sm:px-0",children:[!er&&(0,s.jsxs)("div",{className:"text-center py-8 border border-dashed border-border rounded-xl",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[32px] text-text-muted mb-2",children:"search_off"}),(0,s.jsx)("p",{className:"text-text-muted text-sm",children:"No providers match your search"})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsxs)("h2",{className:"text-lg sm:text-xl font-semibold flex items-center gap-2 leading-tight",children:["Custom Providers (OpenAI/Anthropic Compatible)"," "]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:w-auto",children:[(0,s.jsx)(n.$n,{size:"sm",icon:"add",onClick:()=>I(!0),className:"w-full sm:w-auto",children:"Add Anthropic Compatible"}),(0,s.jsx)(n.$n,{size:"sm",variant:"secondary",icon:"add",onClick:()=>T(!0),className:"w-full !bg-white !text-black hover:!bg-gray-100 sm:w-auto",children:"Add OpenAI Compatible"})]})]}),0===W.length&&0===V.length?(0,s.jsxs)("div",{className:"flex items-center justify-center gap-2 py-2 border border-dashed border-border rounded-xl text-text-muted text-sm",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"extension"}),(0,s.jsx)("span",{children:"No custom providers — use buttons above to add OpenAI/Anthropic compatible endpoints"})]}):(0,s.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 sm:gap-4 lg:grid-cols-3 xl:grid-cols-4",children:[...W,...V].map(e=>(0,s.jsx)(k,{providerId:e.id,provider:e,stats:J(e.id,"apikey"),authType:"compatible",onToggle:t=>K(e.id,"apikey",t)},e.id))})]}),X.length>0&&(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsx)("h2",{className:"text-lg sm:text-xl font-semibold flex items-center gap-2 leading-tight",children:"OAuth Providers"}),(0,s.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,s.jsx)(y,{}),(0,s.jsxs)("button",{onClick:()=>B("oauth"),disabled:!!E,className:`flex w-full items-center justify-center gap-1.5 rounded-lg border px-3 py-2 text-xs font-medium transition-colors sm:w-auto sm:py-1.5 ${"oauth"===E?"bg-primary/20 border-primary/40 text-primary animate-pulse":"bg-bg border-border text-text-muted hover:text-text-main hover:border-primary/40"}`,title:(0,f.Tl)("Test all OAuth connections"),"aria-label":(0,f.Tl)("Test all OAuth connections"),children:[(0,s.jsx)("span",{className:`material-symbols-outlined text-[14px]${"oauth"===E?" animate-spin":""}`,children:"play_arrow"}),"oauth"===E?(0,f.Tl)("Testing..."):(0,f.Tl)("Test All")]})]})]}),(0,s.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 sm:gap-4 lg:grid-cols-3 xl:grid-cols-4",children:X.map(([e,t])=>{let r=Q(t,e);return(0,s.jsx)(w,{providerId:e,provider:t,stats:J(e,r),authType:"oauth",onToggle:t=>K(e,r,t)},e)})})]}),Z.length>0&&(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsx)("h2",{className:"text-lg sm:text-xl font-semibold flex items-center gap-2 leading-tight",children:"Free Tier Providers"}),(0,s.jsxs)("button",{onClick:()=>B("free"),disabled:!!E,className:`flex w-full items-center justify-center gap-1.5 rounded-lg border px-3 py-2 text-xs font-medium transition-colors sm:w-auto sm:py-1.5 ${"free"===E?"bg-primary/20 border-primary/40 text-primary animate-pulse":"bg-bg border-border text-text-muted hover:text-text-main hover:border-primary/40"}`,title:(0,f.Tl)("Test all Free connections"),"aria-label":(0,f.Tl)("Test all Free provider connections"),children:[(0,s.jsx)("span",{className:`material-symbols-outlined text-[14px]${"free"===E?" animate-spin":""}`,children:"play_arrow"}),"free"===E?(0,f.Tl)("Testing..."):(0,f.Tl)("Test All")]})]}),(0,s.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 sm:gap-4 lg:grid-cols-3 xl:grid-cols-4",children:Z.map(({key:e,info:t,isFreeTier:r})=>{let a=Q(t,e);if(!r){let r=O?.[e],l=!1!==r&&(!0===r||!t.topologyHiddenByDefault);return(0,s.jsx)(w,{providerId:e,provider:t,stats:J(e,a),authType:"free",onToggle:t=>K(e,a,t),topologyVisible:l,onToggleTopology:t.noAuth?t=>H(e,t):void 0},e)}return(0,s.jsx)(k,{providerId:e,provider:t,stats:J(e,a),authType:Array.isArray(a)?a[0]??"apikey":a,onToggle:t=>K(e,a,t)},e)})})]}),Y.length>0&&(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsxs)("h2",{className:"text-lg sm:text-xl font-semibold flex items-center gap-2 leading-tight",children:["API Key Providers"," "]}),(0,s.jsxs)("button",{onClick:()=>B("apikey"),disabled:!!E,className:`flex w-full items-center justify-center gap-1.5 rounded-lg border px-3 py-2 text-xs font-medium transition-colors sm:w-auto sm:py-1.5 ${"apikey"===E?"bg-primary/20 border-primary/40 text-primary animate-pulse":"bg-bg border-border text-text-muted hover:text-text-main hover:border-primary/40"}`,title:(0,f.Tl)("Test all API Key connections"),"aria-label":(0,f.Tl)("Test all API Key connections"),children:[(0,s.jsx)("span",{className:`material-symbols-outlined text-[14px]${"apikey"===E?" animate-spin":""}`,children:"play_arrow"}),"apikey"===E?(0,f.Tl)("Testing..."):(0,f.Tl)("Test All")]})]}),(0,s.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 sm:gap-4 lg:grid-cols-3 xl:grid-cols-4",children:ee.map(([e,t])=>(0,s.jsx)(k,{providerId:e,provider:t,stats:J(e,"apikey"),authType:"apikey",onToggle:t=>K(e,"apikey",t)},e))}),!G&&!x&&et>0&&(0,s.jsxs)("button",{onClick:()=>g(!0),className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-primary/40 px-3 py-2.5 text-sm font-medium text-primary transition-colors hover:border-primary hover:bg-primary/5",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"expand_more"}),"Show all ",Y.length," providers"]})]}),(0,s.jsx)(j,{variant:"openai",isOpen:N,onClose:()=>T(!1),onCreated:e=>{o(t=>[...t,e]),T(!1)}}),(0,s.jsx)(j,{variant:"anthropic",isOpen:A,onClose:()=>I(!1),onCreated:e=>{o(t=>[...t,e]),I(!1)}}),S&&(0,s.jsxs)("div",{className:"fixed inset-0 z-50 flex items-start justify-center px-3 pt-[6vh] sm:pt-[10vh]",onClick:()=>P(null),children:[(0,s.jsx)("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm"}),(0,s.jsxs)("div",{className:"relative bg-surface border border-border rounded-xl w-full max-w-[600px] max-h-[86vh] sm:max-h-[80vh] overflow-y-auto shadow-2xl",onClick:e=>e.stopPropagation(),children:[(0,s.jsxs)("div",{className:"sticky top-0 z-10 flex items-center justify-between px-5 py-3 border-b border-border bg-surface/95 backdrop-blur-sm rounded-t-xl",children:[(0,s.jsx)("h3",{className:"font-semibold",children:(0,f.Tl)("Test Results")}),(0,s.jsx)("button",{onClick:()=>P(null),className:"p-1 rounded-lg hover:bg-bg text-text-muted hover:text-text-main transition-colors","aria-label":(0,f.Tl)("Close"),children:(0,s.jsx)("span",{className:"material-symbols-outlined text-lg",children:"close"})})]}),(0,s.jsx)("div",{className:"p-5",children:(0,s.jsx)(C,{results:S})})]})]})]})}function w({providerId:e,provider:t,stats:r,authType:a,onToggle:l,topologyVisible:i,onToggleTopology:d}){let{connected:c,error:p,errorCode:m,errorTime:u,allDisabled:h}=r,g=!!t.noAuth,y=r.total>0,b=g&&"function"==typeof d,v=!1!==i;return(0,s.jsx)(x(),{href:`/dashboard/providers/${e}`,className:"group min-w-0",children:(0,s.jsx)(n.Zp,{padding:"xs",className:`h-full hover:bg-black/[0.01] dark:hover:bg-white/[0.01] transition-colors cursor-pointer ${h||b&&!v?"opacity-50":""}`,children:(0,s.jsxs)("div",{className:"flex min-w-0 items-center justify-between gap-3",children:[(0,s.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,s.jsx)("div",{className:"size-8 shrink-0 rounded-lg flex items-center justify-center",style:{backgroundColor:`${t.color?.length>7?t.color:t.color+"15"}`},children:(0,s.jsx)(o.A,{src:`/providers/${t.id}.png`,alt:t.name,size:30,className:"object-contain rounded-lg max-w-[32px] max-h-[32px]",fallbackText:t.textIcon||t.id.slice(0,2).toUpperCase(),fallbackColor:t.color})}),(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)("h3",{className:"truncate font-semibold flex items-center gap-1.5",children:[t.name,t.community&&(0,s.jsx)(n.Ex,{variant:"warning",size:"sm",className:"shrink-0",children:(0,f.Tl)("Community")})]}),(0,s.jsx)("div",{className:"flex min-w-0 items-center gap-1.5 text-xs flex-wrap",children:h?(0,s.jsx)(n.Ex,{variant:"default",size:"sm",children:(0,s.jsxs)("span",{className:"flex items-center gap-1",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"pause_circle"}),(0,f.Tl)("Disabled")]})}):g?v?(0,s.jsx)(n.Ex,{variant:"success",size:"sm",dot:!0,children:(0,f.Tl)("Ready")}):(0,s.jsx)(n.Ex,{variant:"default",size:"sm",children:(0,f.Tl)("Topology off")}):(0,s.jsxs)(s.Fragment,{children:[N(c,p,m),u&&(0,s.jsx)("span",{className:"text-text-muted",children:u})]})})]})]}),(0,s.jsxs)("div",{className:"flex shrink-0 items-center gap-2",children:[y&&(0,s.jsx)("div",{className:"opacity-100 transition-opacity sm:opacity-0 sm:group-hover:opacity-100",onClick:e=>{e.preventDefault(),e.stopPropagation(),l(!!h)},children:(0,s.jsx)(n.lM,{size:"sm",checked:!h,onChange:()=>{},title:h?(0,f.Tl)("Enable provider"):(0,f.Tl)("Disable provider")})}),b&&(0,s.jsx)("div",{className:"opacity-100 transition-opacity sm:opacity-0 sm:group-hover:opacity-100",onClick:e=>{e.preventDefault(),e.stopPropagation(),d(!v)},children:(0,s.jsx)(n.lM,{size:"sm",checked:v,onChange:()=>{},title:v?"Hide from usage topology":"Show on usage topology"})})]})]})})})}function k({providerId:e,provider:t,stats:r,authType:a,onToggle:l}){let{connected:i,error:c,errorCode:m,errorTime:u,allDisabled:h}=r,g=e.startsWith(p.JH),y=e.startsWith(p.DI);return(0,s.jsx)(x(),{href:`/dashboard/providers/${e}`,className:"group min-w-0",children:(0,s.jsx)(n.Zp,{padding:"xs",className:`h-full hover:bg-black/[0.01] dark:hover:bg-white/[0.01] transition-colors cursor-pointer ${h?"opacity-50":""}`,children:(0,s.jsxs)("div",{className:"flex min-w-0 items-center justify-between gap-3",children:[(0,s.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,s.jsx)("div",{className:"size-8 shrink-0 rounded-lg flex items-center justify-center",style:{backgroundColor:`${t.color?.length>7?t.color:t.color+"15"}`},children:(0,s.jsx)(o.A,{src:g&&t.apiType?"responses"===t.apiType?"/providers/oai-r.png":"/providers/oai-cc.png":y?"/providers/anthropic-m.png":(0,d.HY)(t.id),alt:t.name,size:30,className:"object-contain rounded-lg max-w-[30px] max-h-[30px]",fallbackText:t.textIcon||t.id.slice(0,2).toUpperCase(),fallbackColor:t.color})}),(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)("h3",{className:"truncate font-semibold flex items-center gap-1.5",children:[t.name,t.community&&(0,s.jsx)(n.Ex,{variant:"warning",size:"sm",className:"shrink-0",children:(0,f.Tl)("Community")})]}),(0,s.jsx)("div",{className:"flex min-w-0 items-center gap-1.5 text-xs flex-wrap",children:h?(0,s.jsx)(n.Ex,{variant:"default",size:"sm",children:(0,s.jsxs)("span",{className:"flex items-center gap-1",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"pause_circle"}),(0,f.Tl)("Disabled")]})}):(0,s.jsxs)(s.Fragment,{children:[N(i,c,m),g&&(0,s.jsx)(n.Ex,{variant:"default",size:"sm",children:"responses"===t.apiType?"Responses":"Chat"}),y&&(0,s.jsx)(n.Ex,{variant:"default",size:"sm",children:"Messages"}),u&&(0,s.jsx)("span",{className:"text-text-muted",children:u})]})})]})]}),(0,s.jsx)("div",{className:"flex shrink-0 items-center gap-2",children:r.total>0&&(0,s.jsx)("div",{className:"opacity-100 transition-opacity sm:opacity-0 sm:group-hover:opacity-100",onClick:e=>{e.preventDefault(),e.stopPropagation(),l(!!h)},children:(0,s.jsx)(n.lM,{size:"sm",checked:!h,onChange:()=>{},title:h?(0,f.Tl)("Enable provider"):(0,f.Tl)("Disable provider")})})})]})})})}function C({results:e}){if(e.error&&!e.results)return(0,s.jsxs)("div",{className:"text-center py-6",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-red-500 text-[32px] mb-2 block",children:"error"}),(0,s.jsx)("p",{className:"text-sm text-red-400",children:e.error})]});let{summary:t,mode:r}=e,a=e.results||[],l={oauth:"OAuth",free:(0,f.Tl)("Free"),apikey:(0,f.Tl)("API Key"),provider:(0,f.Tl)("Provider"),all:(0,f.Tl)("All")}[r]||r;return(0,s.jsxs)("div",{className:"flex min-w-0 flex-col gap-3",children:[t&&(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2 text-xs mb-1 sm:gap-3",children:[(0,s.jsxs)("span",{className:"text-text-muted",children:[l," ",(0,f.Tl)("Test")]}),(0,s.jsxs)("span",{className:"px-2 py-0.5 rounded bg-emerald-500/15 text-emerald-400 font-medium",children:[t.passed," ",(0,f.Tl)("passed")]}),t.failed>0&&(0,s.jsxs)("span",{className:"px-2 py-0.5 rounded bg-red-500/15 text-red-400 font-medium",children:[t.failed," ",(0,f.Tl)("failed")]}),(0,s.jsxs)("span",{className:"text-text-muted sm:ml-auto",children:[t.total," ",(0,f.Tl)("tested")]})]}),a.map((e,t)=>(0,s.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2 rounded-lg bg-black/[0.03] px-3 py-2 text-xs dark:bg-white/[0.03] sm:flex-nowrap",children:[(0,s.jsx)("span",{className:`material-symbols-outlined text-[16px] ${e.valid?"text-emerald-500":"text-red-500"}`,children:e.valid?"check_circle":"error"}),(0,s.jsxs)("div",{className:"min-w-0 flex-[1_1_160px]",children:[(0,s.jsx)("span",{className:"block truncate font-medium sm:inline",children:e.connectionName}),(0,s.jsxs)("span",{className:"block truncate text-text-muted sm:ml-1.5 sm:inline",children:["(",e.provider,")"]})]}),void 0!==e.latencyMs&&(0,s.jsxs)("span",{className:"shrink-0 text-text-muted font-mono tabular-nums",children:[e.latencyMs,"ms"]}),(0,s.jsx)("span",{className:`shrink-0 text-[10px] uppercase font-bold px-1.5 py-0.5 rounded ${e.valid?"bg-emerald-500/15 text-emerald-400":"bg-red-500/15 text-red-400"}`,children:e.valid?(0,f.Tl)("OK"):e.diagnosis?.type||(0,f.Tl)("ERROR")})]},e.connectionId||t)),0===a.length&&(0,s.jsx)("div",{className:"text-center py-4 text-text-muted text-sm",children:(0,f.Tl)("No active connections found for this group.")})]})}j.propTypes={variant:i().oneOf(["openai","anthropic"]).isRequired,isOpen:i().bool.isRequired,onClose:i().func.isRequired,onCreated:i().func.isRequired},w.propTypes={providerId:i().string.isRequired,provider:i().shape({id:i().string.isRequired,name:i().string.isRequired,color:i().string,textIcon:i().string}).isRequired,stats:i().shape({connected:i().number,error:i().number,errorCode:i().string,errorTime:i().string}).isRequired,authType:i().string,onToggle:i().func},k.propTypes={providerId:i().string.isRequired,provider:i().shape({id:i().string.isRequired,name:i().string.isRequired,color:i().string,textIcon:i().string,apiType:i().string}).isRequired,stats:i().shape({connected:i().number,error:i().number,errorCode:i().string,errorTime:i().string}).isRequired,authType:i().string,onToggle:i().func},C.propTypes={results:i().shape({mode:i().string,results:i().array,summary:i().shape({total:i().number,passed:i().number,failed:i().number}),error:i().string}).isRequired}}},e=>{e.O(0,[4614,1321,5497,8441,3794,7358],()=>e(e.s=67455)),_N_E=e.O()}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8460],{67455:(e,t,r)=>{Promise.resolve().then(r.bind(r,97678))},97678:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>T});var s=r(95155),a=r(12115),l=r(14051),i=r.n(l),n=r(35497),o=r(67852),d=r(8247),c=r(90620),p=r(88105),m=r(98500),x=r.n(m),u=r(65921),h=r(38003),f=r(73006);let g={available:{icon:"check_circle",color:"#22c55e",label:"Available"},cooldown:{icon:"schedule",color:"#f59e0b",label:"Cooldown"},unavailable:{icon:"error",color:"#ef4444",label:"Unavailable"},unknown:{icon:"help",color:"#6b7280",label:"Unknown"}};function y(){let[e,t]=(0,a.useState)(null),[r,l]=(0,a.useState)(!0),[i,o]=(0,a.useState)(!1),[d,c]=(0,a.useState)(null),p=(0,a.useRef)(null),m=(0,u.i)(),x=(0,a.useCallback)(async()=>{try{let e=await fetch("/api/models/availability");if(e.ok){let r=await e.json();t(r)}}catch{}finally{l(!1)}},[]);(0,a.useEffect)(()=>{x();let e=setInterval(x,3e4);return()=>clearInterval(e)},[x]),(0,a.useEffect)(()=>{let e=e=>{p.current&&!p.current.contains(e.target)&&o(!1)};return i&&document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[i]);let h=async(e,t)=>{c(`${e}:${t}`);try{(await fetch("/api/models/availability",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"clearCooldown",provider:e,model:t})})).ok?(m.success(`Cooldown cleared for ${t}`),await x()):m.error("Failed to clear cooldown")}catch{m.error("Failed to clear cooldown")}finally{c(null)}};if(r)return null;let f=e?.models||[],y=0===(e?.unavailableCount||f.filter(e=>"available"!==e.status).length),b={};return f.forEach(e=>{if("available"===e.status)return;let t=e.provider||"unknown";b[t]||(b[t]=[]),b[t].push(e)}),(0,s.jsx)("div",{className:"relative",ref:p,children:i&&(0,s.jsxs)("div",{className:"absolute top-full right-0 mt-2 w-80 bg-surface border border-border rounded-xl shadow-2xl z-50 overflow-hidden",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border bg-bg",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",style:{color:y?"#22c55e":"#f59e0b"},children:y?"verified":"warning"}),(0,s.jsx)("span",{className:"text-sm font-semibold text-text-main",children:"Model Status"})]}),(0,s.jsx)("button",{onClick:x,className:"p-1 rounded-lg hover:bg-surface text-text-muted hover:text-text-main transition-colors",title:"Refresh",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"refresh"})})]}),(0,s.jsx)("div",{className:"px-4 py-3 max-h-60 overflow-y-auto",children:y?(0,s.jsx)("p",{className:"text-sm text-text-muted text-center py-2",children:"All models are responding normally."}):(0,s.jsx)("div",{className:"flex flex-col gap-2.5",children:Object.entries(b).map(([e,t])=>(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-xs font-semibold text-text-main mb-1.5 capitalize",children:e}),(0,s.jsx)("div",{className:"flex flex-col gap-1",children:t.map(e=>{let t=g[e.status]||g.unknown,r=d===`${e.provider}:${e.model}`;return(0,s.jsxs)("div",{className:"flex items-center justify-between px-2.5 py-1.5 rounded-lg bg-surface/30",children:[(0,s.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px] shrink-0",style:{color:t.color},children:t.icon}),(0,s.jsx)("span",{className:"font-mono text-xs text-text-main truncate",children:e.model})]}),"cooldown"===e.status&&(0,s.jsx)(n.$n,{size:"sm",variant:"ghost",onClick:()=>h(e.provider,e.model),disabled:r,className:"text-[10px] px-1.5! py-0.5! ml-2",children:r?"...":"Clear"})]},`${e.provider}-${e.model}`)})})]},e))})})]})})}let b={openai:{title:"Add OpenAI Compatible",type:"openai-compatible",defaultBaseUrl:"https://api.openai.com/v1",namePlaceholder:"OpenAI Compatible (Prod)",prefixPlaceholder:"oc-prod",baseUrlHint:"Use the base URL (ending in /v1) for your OpenAI-compatible API.",modelIdPlaceholder:"e.g. gpt-4, claude-3-opus",errorLabel:"OpenAI Compatible",hasApiType:!0},anthropic:{title:"Add Anthropic Compatible",type:"anthropic-compatible",defaultBaseUrl:"https://api.anthropic.com/v1",namePlaceholder:"Anthropic Compatible (Prod)",prefixPlaceholder:"ac-prod",baseUrlHint:"Use the base URL (ending in /v1) for your Anthropic-compatible API. The system will append /messages.",modelIdPlaceholder:"e.g. claude-3-opus",errorLabel:"Anthropic Compatible",hasApiType:!1}},v=[{value:"chat",label:"Chat Completions"},{value:"responses",label:"Responses API"}];function j({variant:e,isOpen:t,onClose:r,onCreated:l}){let i=b[e],o=()=>({name:"",prefix:"",...i.hasApiType?{apiType:"chat"}:{},baseUrl:i.defaultBaseUrl}),[d,c]=(0,a.useState)(o),[p,m]=(0,a.useState)(!1),[x,u]=(0,a.useState)(""),[h,f]=(0,a.useState)(""),[g,y]=(0,a.useState)(""),[N,T]=(0,a.useState)(!1),[w,k]=(0,a.useState)(null);(0,a.useEffect)(()=>{i.hasApiType?c(e=>({...e,baseUrl:i.defaultBaseUrl})):t&&(k(null),f(""),y(""),u(""))},[i.hasApiType?d.apiType:t]);let C=async()=>{if(d.name.trim()&&d.prefix.trim()&&d.baseUrl.trim()){m(!0),u("");try{let e=await fetch("/api/provider-nodes",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:d.name,prefix:d.prefix,...i.hasApiType?{apiType:d.apiType}:{},baseUrl:d.baseUrl,type:i.type})}),t=await e.json();e.ok?(l(t.node),c(o()),f(""),k(null),u("")):u(t?.error||"Failed to create provider")}catch(e){console.log(`Error creating ${i.errorLabel} node:`,e),u("Network error creating provider")}finally{m(!1)}}},A=async()=>{T(!0);try{let e=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:d.baseUrl,apiKey:h,type:i.type,modelId:g.trim()||void 0})}),t=await e.json();k(t)}catch{k({valid:!1,error:"Network error"})}finally{T(!1)}};return(0,s.jsx)(n.aF,{isOpen:t,title:i.title,onClose:r,children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsx)(n.pd,{label:"Name",value:d.name,onChange:e=>c({...d,name:e.target.value}),placeholder:i.namePlaceholder,hint:"Required. A friendly label for this node."}),(0,s.jsx)(n.pd,{label:"Prefix",value:d.prefix,onChange:e=>c({...d,prefix:e.target.value}),placeholder:i.prefixPlaceholder,hint:"Required. Used as the provider prefix for model IDs."}),i.hasApiType&&(0,s.jsx)(n.l6,{label:"API Type",options:v,value:d.apiType,onChange:e=>c({...d,apiType:e.target.value})}),(0,s.jsx)(n.pd,{label:"Base URL",value:d.baseUrl,onChange:e=>c({...d,baseUrl:e.target.value}),placeholder:i.defaultBaseUrl,hint:i.baseUrlHint}),(0,s.jsx)(n.pd,{label:"API Key (for Check)",type:"password",value:h,onChange:e=>f(e.target.value)}),(0,s.jsx)(n.pd,{label:"Model ID (optional)",value:g,onChange:e=>y(e.target.value),placeholder:i.modelIdPlaceholder,hint:"If provider lacks /models endpoint, enter a model ID to validate via chat/completions instead."}),(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center",children:[(0,s.jsx)(n.$n,{onClick:A,disabled:!h||N||!d.baseUrl.trim(),variant:"secondary",className:"w-full sm:w-auto",children:N?"Checking...":"Check"}),(()=>{if(!w)return null;let{valid:e,error:t,method:r}=w;return e?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.Ex,{variant:"success",children:"Valid"}),"chat"===r&&(0,s.jsx)("span",{className:"text-sm text-text-muted",children:"(via inference test)"})]}):(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsx)(n.Ex,{variant:"error",children:"Invalid"}),t&&(0,s.jsx)("span",{className:"text-sm text-red-500",children:t})]})})()]}),x&&(0,s.jsx)("div",{className:"rounded border border-red-500/40 bg-red-500/10 px-3 py-2 text-sm text-red-500",children:x}),(0,s.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row",children:[(0,s.jsx)(n.$n,{onClick:C,fullWidth:!0,disabled:!d.name.trim()||!d.prefix.trim()||!d.baseUrl.trim()||p,children:p?"Creating...":"Create"}),(0,s.jsx)(n.$n,{onClick:r,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})})}function N(e,t,r){let a=[];if(e>0&&a.push((0,s.jsxs)(n.Ex,{variant:"success",size:"sm",dot:!0,children:[e," Connected"]},"connected")),t>0){let e=r?`${t} Error (${r})`:`${t} Error`;a.push((0,s.jsx)(n.Ex,{variant:"error",size:"sm",dot:!0,children:e},"error"))}return 0===a.length?(0,s.jsx)("span",{className:"text-text-muted",children:"No connections"}):a}function T(){let e,t,[r,l]=(0,a.useState)([]),[i,o]=(0,a.useState)([]),[d,m]=(0,a.useState)(!0),[x,g]=(0,a.useState)(!1),[b,v]=(0,a.useState)(!0),[N,T]=(0,a.useState)(!1),[A,I]=(0,a.useState)(!1),[E,$]=(0,a.useState)(null),[S,P]=(0,a.useState)(null),[O,R]=(0,a.useState)({}),[U,_]=(0,a.useState)(!1),z=(0,u.i)(),D=(0,h.C)(e=>e.query),q=(0,h.C)(e=>e.register),F=(0,h.C)(e=>e.unregister);(0,a.useEffect)(()=>(q("Search providers..."),()=>F()),[q,F]);let M=e=>!D.trim()||!!e&&e.toLowerCase().includes(D.trim().toLowerCase()),L=(e,t,r)=>{if(e.connected>0)return 0;if(t?.noAuth){let e;return+(!1===(e=O?.[r])||!0!==e&&!!t.topologyHiddenByDefault)}return U?0===e.total?3:2:1};(0,a.useEffect)(()=>{(async()=>{try{let[e,t,r]=await Promise.all([fetch("/api/providers"),fetch("/api/provider-nodes"),fetch("/api/settings",{cache:"no-store"})]),s=await e.json(),a=await t.json();if(e.ok&&l(s.connections||[]),t.ok&&o(a.nodes||[]),r.ok){let e=await r.json();R(e.topologyVisibility||{}),_(!0===e.providerDisabledLastSort),v(!1!==e.showCommunityProviders)}}catch(e){console.log("Error fetching data:",e)}finally{m(!1)}})()},[]);let H=(0,a.useCallback)(async(e,t)=>{let r={...O,[e]:t};R(r);try{if(!(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({topologyVisibility:r})})).ok)throw Error("Failed to update topology visibility")}catch(e){console.error("Error updating topology visibility:",e),R(O)}},[O]),J=(e,t)=>{let s=Array.isArray(t)?t:[t],a=r.filter(t=>t.provider===e&&s.includes(t.authType)),l=e=>{let t=Object.entries(e).some(([e,t])=>e.startsWith("modelLock_")&&t&&new Date(t).getTime()>Date.now());return"unavailable"!==e.testStatus||t?e.testStatus:"active"},i=a.filter(e=>{if(!1===e.isActive)return!1;let t=l(e);return"active"===t||"success"===t}).length,n=a.filter(e=>{let t=l(e);return"error"===t||"expired"===t||"unavailable"===t}),o=n.length,d=a.length,c=d>0&&a.every(e=>!1===e.isActive),p=n.sort((e,t)=>new Date(t.lastErrorAt||0)-new Date(e.lastErrorAt||0))[0];return{connected:i,error:o,total:d,errorCode:p?function(e){if(!e)return null;let t=e.lastErrorType;if("runtime_error"===t)return"RUNTIME";if("upstream_auth_error"===t||"auth_missing"===t||"token_refresh_failed"===t||"token_expired"===t)return"AUTH";if("upstream_rate_limited"===t)return"429";if("upstream_unavailable"===t)return"5XX";if("network_error"===t)return"NET";let r=Number(e.errorCode);if(Number.isFinite(r)&&r>=400)return String(r);let s=function(e){if(!e)return null;let t=e.match(/\b([45]\d{2})\b/);return t?t[1]:"ERR"}(e.lastError);if("401"===s||"403"===s)return"AUTH";if(s&&"ERR"!==s)return s;let a=(e.lastError||"").toLowerCase();return a.includes("runtime")||a.includes("not runnable")||a.includes("not installed")?"RUNTIME":a.includes("invalid api key")||a.includes("token invalid")||a.includes("revoked")||a.includes("unauthorized")?"AUTH":"ERR"}(p):null,errorTime:p?.lastErrorAt?function(e){if(!e)return"";let t=Math.floor((Date.now()-new Date(e).getTime())/6e4);if(t<1)return"just now";if(t<60)return`${t}m ago`;let r=Math.floor(t/60);if(r<24)return`${r}h ago`;let s=Math.floor(r/24);return`${s}d ago`}(p.lastErrorAt):null,allDisabled:c}},K=async(e,t,s)=>{let a=Array.isArray(t)?t:[t],i=t=>t.provider===e&&a.includes(t.authType),n=r.filter(i);l(e=>e.map(e=>i(e)?{...e,isActive:s}:e)),await Promise.allSettled(n.map(e=>fetch(`/api/providers/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:s})})))},B=async(e,t=null)=>{if(!E){$("provider"===e?t:e),P(null);try{let r=await fetch("/api/providers/test-batch",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({mode:e,providerId:t})}),s=await r.json();if(P(s),s.summary){let{passed:e,failed:t,total:r}=s.summary;0===t?z.success(`${(0,f.Tl)("All")} ${r} ${(0,f.Tl)("tests passed")}`):z.warning(`${e}/${r} ${(0,f.Tl)("passed")}, ${t} ${(0,f.Tl)("failed")}`)}}catch(e){P({error:(0,f.Tl)("Test request failed")}),z.error((0,f.Tl)("Provider test failed"))}finally{$(null)}}},W=i.filter(e=>"openai-compatible"===e.type).map(e=>({id:e.id,name:e.name||"OpenAI Compatible",color:"#10A37F",textIcon:"OC",apiType:e.apiType})).filter(e=>M(e.name)),V=i.filter(e=>"anthropic-compatible"===e.type).map(e=>({id:e.id,name:e.name||"Anthropic Compatible",color:"#D97757",textIcon:"AC"})).filter(e=>M(e.name)),Q=(e,t)=>{if("kiro"===t)return["oauth","apikey","api_key"];let r=e?.authModes;return Array.isArray(r)?r.includes("apikey")?["oauth","apikey","api_key"]:"oauth":t in p.nJ||t in c.fg?["oauth","apikey","api_key"]:"oauth"},X=(e=Object.entries(c.zN).filter(([,e])=>!e.hidden&&M(e.name)),t="oauth",[...e].sort(([e,r],[s,a])=>{let l=J(e,t),i=J(s,t),n=L(l,r,e),o=L(i,a,s);if(n!==o)return n-o;let d=r.priority??999,c=a.priority??999;return d!==c?d-c:(r.name||"").localeCompare(a.name||"")})),Z=[...Object.entries(p.IS).filter(([,e])=>!e.hidden&&!(e.community&&!b)&&M(e.name)).map(([e,t])=>({key:e,info:t,stats:J(e,Q(t,e)),isFreeTier:!1})),...Object.entries(p.nJ).filter(([,e])=>!e.hidden&&!(e.community&&!b)&&M(e.name)&&(e.serviceKinds??["llm"]).includes("llm")).map(([e,t])=>({key:e,info:t,stats:J(e,Q(t,e)),isFreeTier:!0}))].sort((e,t)=>{let r=L(e.stats,e.info,e.key),s=L(t.stats,t.info,t.key);if(r!==s)return r-s;let a=!!t.info.noAuth-!!e.info.noAuth;if(0!==a)return a;let l=+!!e.info.community,i=+!!t.info.community;if(l!==i)return l-i;let n=e.info.priority??999,o=t.info.priority??999;return n!==o?n-o:(e.info.name||"").localeCompare(t.info.name||"")}),Y=Object.entries(c.fg).filter(([,e])=>!e.hidden&&(e.serviceKinds??["llm"]).includes("llm")&&M(e.name)).sort(([e,t],[r,s])=>{let a=J(e,"apikey"),l=J(r,"apikey"),i=L(a,t,e),n=L(l,s,r);if(i!==n)return i-n;let o=t.priority??999,d=s.priority??999;return o!==d?o-d:(t.name||"").localeCompare(s.name||"")}),G=!!D.trim(),ee=G||x?Y:Y.slice(0,20),et=Y.length-20;if(d)return(0,s.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,s.jsx)(n.Qv,{}),(0,s.jsx)(n.Qv,{})]});let er=X.length>0||Z.length>0||Y.length>0||W.length>0||V.length>0;return(0,s.jsxs)("div",{className:"flex min-w-0 flex-col gap-6 px-1 sm:px-0",children:[!er&&(0,s.jsxs)("div",{className:"text-center py-8 border border-dashed border-border rounded-xl",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[32px] text-text-muted mb-2",children:"search_off"}),(0,s.jsx)("p",{className:"text-text-muted text-sm",children:"No providers match your search"})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsxs)("h2",{className:"text-lg sm:text-xl font-semibold flex items-center gap-2 leading-tight",children:["Custom Providers (OpenAI/Anthropic Compatible)"," "]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:w-auto",children:[(0,s.jsx)(n.$n,{size:"sm",icon:"add",onClick:()=>I(!0),className:"w-full sm:w-auto",children:"Add Anthropic Compatible"}),(0,s.jsx)(n.$n,{size:"sm",variant:"secondary",icon:"add",onClick:()=>T(!0),className:"w-full !bg-white !text-black hover:!bg-gray-100 sm:w-auto",children:"Add OpenAI Compatible"})]})]}),0===W.length&&0===V.length?(0,s.jsxs)("div",{className:"flex items-center justify-center gap-2 py-2 border border-dashed border-border rounded-xl text-text-muted text-sm",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"extension"}),(0,s.jsx)("span",{children:"No custom providers — use buttons above to add OpenAI/Anthropic compatible endpoints"})]}):(0,s.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 sm:gap-4 lg:grid-cols-3 xl:grid-cols-4",children:[...W,...V].map(e=>(0,s.jsx)(k,{providerId:e.id,provider:e,stats:J(e.id,"apikey"),authType:"compatible",onToggle:t=>K(e.id,"apikey",t)},e.id))})]}),X.length>0&&(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsx)("h2",{className:"text-lg sm:text-xl font-semibold flex items-center gap-2 leading-tight",children:"OAuth Providers"}),(0,s.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,s.jsx)(y,{}),(0,s.jsxs)("button",{onClick:()=>B("oauth"),disabled:!!E,className:`flex w-full items-center justify-center gap-1.5 rounded-lg border px-3 py-2 text-xs font-medium transition-colors sm:w-auto sm:py-1.5 ${"oauth"===E?"bg-primary/20 border-primary/40 text-primary animate-pulse":"bg-bg border-border text-text-muted hover:text-text-main hover:border-primary/40"}`,title:(0,f.Tl)("Test all OAuth connections"),"aria-label":(0,f.Tl)("Test all OAuth connections"),children:[(0,s.jsx)("span",{className:`material-symbols-outlined text-[14px]${"oauth"===E?" animate-spin":""}`,children:"play_arrow"}),"oauth"===E?(0,f.Tl)("Testing..."):(0,f.Tl)("Test All")]})]})]}),(0,s.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 sm:gap-4 lg:grid-cols-3 xl:grid-cols-4",children:X.map(([e,t])=>{let r=Q(t,e);return(0,s.jsx)(w,{providerId:e,provider:t,stats:J(e,r),authType:"oauth",onToggle:t=>K(e,r,t)},e)})})]}),Z.length>0&&(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsx)("h2",{className:"text-lg sm:text-xl font-semibold flex items-center gap-2 leading-tight",children:"Free Tier Providers"}),(0,s.jsxs)("button",{onClick:()=>B("free"),disabled:!!E,className:`flex w-full items-center justify-center gap-1.5 rounded-lg border px-3 py-2 text-xs font-medium transition-colors sm:w-auto sm:py-1.5 ${"free"===E?"bg-primary/20 border-primary/40 text-primary animate-pulse":"bg-bg border-border text-text-muted hover:text-text-main hover:border-primary/40"}`,title:(0,f.Tl)("Test all Free connections"),"aria-label":(0,f.Tl)("Test all Free provider connections"),children:[(0,s.jsx)("span",{className:`material-symbols-outlined text-[14px]${"free"===E?" animate-spin":""}`,children:"play_arrow"}),"free"===E?(0,f.Tl)("Testing..."):(0,f.Tl)("Test All")]})]}),(0,s.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 sm:gap-4 lg:grid-cols-3 xl:grid-cols-4",children:Z.map(({key:e,info:t,isFreeTier:r})=>{let a=Q(t,e);if(!r){let r=O?.[e],l=!1!==r&&(!0===r||!t.topologyHiddenByDefault);return(0,s.jsx)(w,{providerId:e,provider:t,stats:J(e,a),authType:"free",onToggle:t=>K(e,a,t),topologyVisible:l,onToggleTopology:t.noAuth?t=>H(e,t):void 0},e)}return(0,s.jsx)(k,{providerId:e,provider:t,stats:J(e,a),authType:Array.isArray(a)?a[0]??"apikey":a,onToggle:t=>K(e,a,t)},e)})})]}),Y.length>0&&(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsxs)("h2",{className:"text-lg sm:text-xl font-semibold flex items-center gap-2 leading-tight",children:["API Key Providers"," "]}),(0,s.jsxs)("button",{onClick:()=>B("apikey"),disabled:!!E,className:`flex w-full items-center justify-center gap-1.5 rounded-lg border px-3 py-2 text-xs font-medium transition-colors sm:w-auto sm:py-1.5 ${"apikey"===E?"bg-primary/20 border-primary/40 text-primary animate-pulse":"bg-bg border-border text-text-muted hover:text-text-main hover:border-primary/40"}`,title:(0,f.Tl)("Test all API Key connections"),"aria-label":(0,f.Tl)("Test all API Key connections"),children:[(0,s.jsx)("span",{className:`material-symbols-outlined text-[14px]${"apikey"===E?" animate-spin":""}`,children:"play_arrow"}),"apikey"===E?(0,f.Tl)("Testing..."):(0,f.Tl)("Test All")]})]}),(0,s.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 sm:gap-4 lg:grid-cols-3 xl:grid-cols-4",children:ee.map(([e,t])=>(0,s.jsx)(k,{providerId:e,provider:t,stats:J(e,"apikey"),authType:"apikey",onToggle:t=>K(e,"apikey",t)},e))}),!G&&!x&&et>0&&(0,s.jsxs)("button",{onClick:()=>g(!0),className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-primary/40 px-3 py-2.5 text-sm font-medium text-primary transition-colors hover:border-primary hover:bg-primary/5",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"expand_more"}),"Show all ",Y.length," providers"]})]}),(0,s.jsx)(j,{variant:"openai",isOpen:N,onClose:()=>T(!1),onCreated:e=>{o(t=>[...t,e]),T(!1)}}),(0,s.jsx)(j,{variant:"anthropic",isOpen:A,onClose:()=>I(!1),onCreated:e=>{o(t=>[...t,e]),I(!1)}}),S&&(0,s.jsxs)("div",{className:"fixed inset-0 z-50 flex items-start justify-center px-3 pt-[6vh] sm:pt-[10vh]",onClick:()=>P(null),children:[(0,s.jsx)("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm"}),(0,s.jsxs)("div",{className:"relative bg-surface border border-border rounded-xl w-full max-w-[600px] max-h-[86vh] sm:max-h-[80vh] overflow-y-auto shadow-2xl",onClick:e=>e.stopPropagation(),children:[(0,s.jsxs)("div",{className:"sticky top-0 z-10 flex items-center justify-between px-5 py-3 border-b border-border bg-surface/95 backdrop-blur-sm rounded-t-xl",children:[(0,s.jsx)("h3",{className:"font-semibold",children:(0,f.Tl)("Test Results")}),(0,s.jsx)("button",{onClick:()=>P(null),className:"p-1 rounded-lg hover:bg-bg text-text-muted hover:text-text-main transition-colors","aria-label":(0,f.Tl)("Close"),children:(0,s.jsx)("span",{className:"material-symbols-outlined text-lg",children:"close"})})]}),(0,s.jsx)("div",{className:"p-5",children:(0,s.jsx)(C,{results:S})})]})]})]})}function w({providerId:e,provider:t,stats:r,authType:a,onToggle:l,topologyVisible:i,onToggleTopology:d}){let{connected:c,error:p,errorCode:m,errorTime:u,allDisabled:h}=r,g=!!t.noAuth,y=r.total>0,b=g&&"function"==typeof d,v=!1!==i;return(0,s.jsx)(x(),{href:`/dashboard/providers/${e}`,className:"group min-w-0",children:(0,s.jsx)(n.Zp,{padding:"xs",className:`h-full hover:bg-black/[0.01] dark:hover:bg-white/[0.01] transition-colors cursor-pointer ${h||b&&!v?"opacity-50":""}`,children:(0,s.jsxs)("div",{className:"flex min-w-0 items-center justify-between gap-3",children:[(0,s.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,s.jsx)("div",{className:"size-8 shrink-0 rounded-lg flex items-center justify-center",style:{backgroundColor:`${t.color?.length>7?t.color:t.color+"15"}`},children:(0,s.jsx)(o.A,{src:`/providers/${t.id}.png`,alt:t.name,size:30,className:"object-contain rounded-lg max-w-[32px] max-h-[32px]",fallbackText:t.textIcon||t.id.slice(0,2).toUpperCase(),fallbackColor:t.color})}),(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)("h3",{className:"truncate font-semibold flex items-center gap-1.5",children:[t.name,t.community&&(0,s.jsx)(n.Ex,{variant:"warning",size:"sm",className:"shrink-0",children:(0,f.Tl)("Community")})]}),(0,s.jsx)("div",{className:"flex min-w-0 items-center gap-1.5 text-xs flex-wrap",children:h?(0,s.jsx)(n.Ex,{variant:"default",size:"sm",children:(0,s.jsxs)("span",{className:"flex items-center gap-1",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"pause_circle"}),(0,f.Tl)("Disabled")]})}):g?v?(0,s.jsx)(n.Ex,{variant:"success",size:"sm",dot:!0,children:(0,f.Tl)("Ready")}):(0,s.jsx)(n.Ex,{variant:"default",size:"sm",children:(0,f.Tl)("Topology off")}):(0,s.jsxs)(s.Fragment,{children:[N(c,p,m),u&&(0,s.jsx)("span",{className:"text-text-muted",children:u})]})})]})]}),(0,s.jsxs)("div",{className:"flex shrink-0 items-center gap-2",children:[y&&(0,s.jsx)("div",{className:"opacity-100 transition-opacity sm:opacity-0 sm:group-hover:opacity-100",onClick:e=>{e.preventDefault(),e.stopPropagation(),l(!!h)},children:(0,s.jsx)(n.lM,{size:"sm",checked:!h,onChange:()=>{},title:h?(0,f.Tl)("Enable provider"):(0,f.Tl)("Disable provider")})}),b&&(0,s.jsx)("div",{className:"opacity-100 transition-opacity sm:opacity-0 sm:group-hover:opacity-100",onClick:e=>{e.preventDefault(),e.stopPropagation(),d(!v)},children:(0,s.jsx)(n.lM,{size:"sm",checked:v,onChange:()=>{},title:v?"Hide from usage topology":"Show on usage topology"})})]})]})})})}function k({providerId:e,provider:t,stats:r,authType:a,onToggle:l}){let{connected:i,error:c,errorCode:m,errorTime:u,allDisabled:h}=r,g=e.startsWith(p.JH),y=e.startsWith(p.DI);return(0,s.jsx)(x(),{href:`/dashboard/providers/${e}`,className:"group min-w-0",children:(0,s.jsx)(n.Zp,{padding:"xs",className:`h-full hover:bg-black/[0.01] dark:hover:bg-white/[0.01] transition-colors cursor-pointer ${h?"opacity-50":""}`,children:(0,s.jsxs)("div",{className:"flex min-w-0 items-center justify-between gap-3",children:[(0,s.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,s.jsx)("div",{className:"size-8 shrink-0 rounded-lg flex items-center justify-center",style:{backgroundColor:`${t.color?.length>7?t.color:t.color+"15"}`},children:(0,s.jsx)(o.A,{src:g&&t.apiType?"responses"===t.apiType?"/providers/oai-r.png":"/providers/oai-cc.png":y?"/providers/anthropic-m.png":(0,d.HY)(t.id),alt:t.name,size:30,className:"object-contain rounded-lg max-w-[30px] max-h-[30px]",fallbackText:t.textIcon||t.id.slice(0,2).toUpperCase(),fallbackColor:t.color})}),(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)("h3",{className:"truncate font-semibold flex items-center gap-1.5",children:[t.name,t.community&&(0,s.jsx)(n.Ex,{variant:"warning",size:"sm",className:"shrink-0",children:(0,f.Tl)("Community")})]}),(0,s.jsx)("div",{className:"flex min-w-0 items-center gap-1.5 text-xs flex-wrap",children:h?(0,s.jsx)(n.Ex,{variant:"default",size:"sm",children:(0,s.jsxs)("span",{className:"flex items-center gap-1",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"pause_circle"}),(0,f.Tl)("Disabled")]})}):(0,s.jsxs)(s.Fragment,{children:[N(i,c,m),g&&(0,s.jsx)(n.Ex,{variant:"default",size:"sm",children:"responses"===t.apiType?"Responses":"Chat"}),y&&(0,s.jsx)(n.Ex,{variant:"default",size:"sm",children:"Messages"}),u&&(0,s.jsx)("span",{className:"text-text-muted",children:u})]})})]})]}),(0,s.jsx)("div",{className:"flex shrink-0 items-center gap-2",children:r.total>0&&(0,s.jsx)("div",{className:"opacity-100 transition-opacity sm:opacity-0 sm:group-hover:opacity-100",onClick:e=>{e.preventDefault(),e.stopPropagation(),l(!!h)},children:(0,s.jsx)(n.lM,{size:"sm",checked:!h,onChange:()=>{},title:h?(0,f.Tl)("Enable provider"):(0,f.Tl)("Disable provider")})})})]})})})}function C({results:e}){if(e.error&&!e.results)return(0,s.jsxs)("div",{className:"text-center py-6",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-red-500 text-[32px] mb-2 block",children:"error"}),(0,s.jsx)("p",{className:"text-sm text-red-400",children:e.error})]});let{summary:t,mode:r}=e,a=e.results||[],l={oauth:"OAuth",free:(0,f.Tl)("Free"),apikey:(0,f.Tl)("API Key"),provider:(0,f.Tl)("Provider"),all:(0,f.Tl)("All")}[r]||r;return(0,s.jsxs)("div",{className:"flex min-w-0 flex-col gap-3",children:[t&&(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2 text-xs mb-1 sm:gap-3",children:[(0,s.jsxs)("span",{className:"text-text-muted",children:[l," ",(0,f.Tl)("Test")]}),(0,s.jsxs)("span",{className:"px-2 py-0.5 rounded bg-emerald-500/15 text-emerald-400 font-medium",children:[t.passed," ",(0,f.Tl)("passed")]}),t.failed>0&&(0,s.jsxs)("span",{className:"px-2 py-0.5 rounded bg-red-500/15 text-red-400 font-medium",children:[t.failed," ",(0,f.Tl)("failed")]}),(0,s.jsxs)("span",{className:"text-text-muted sm:ml-auto",children:[t.total," ",(0,f.Tl)("tested")]})]}),a.map((e,t)=>(0,s.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2 rounded-lg bg-black/[0.03] px-3 py-2 text-xs dark:bg-white/[0.03] sm:flex-nowrap",children:[(0,s.jsx)("span",{className:`material-symbols-outlined text-[16px] ${e.valid?"text-emerald-500":"text-red-500"}`,children:e.valid?"check_circle":"error"}),(0,s.jsxs)("div",{className:"min-w-0 flex-[1_1_160px]",children:[(0,s.jsx)("span",{className:"block truncate font-medium sm:inline",children:e.connectionName}),(0,s.jsxs)("span",{className:"block truncate text-text-muted sm:ml-1.5 sm:inline",children:["(",e.provider,")"]})]}),void 0!==e.latencyMs&&(0,s.jsxs)("span",{className:"shrink-0 text-text-muted font-mono tabular-nums",children:[e.latencyMs,"ms"]}),(0,s.jsx)("span",{className:`shrink-0 text-[10px] uppercase font-bold px-1.5 py-0.5 rounded ${e.valid?"bg-emerald-500/15 text-emerald-400":"bg-red-500/15 text-red-400"}`,children:e.valid?(0,f.Tl)("OK"):e.diagnosis?.type||(0,f.Tl)("ERROR")})]},e.connectionId||t)),0===a.length&&(0,s.jsx)("div",{className:"text-center py-4 text-text-muted text-sm",children:(0,f.Tl)("No active connections found for this group.")})]})}j.propTypes={variant:i().oneOf(["openai","anthropic"]).isRequired,isOpen:i().bool.isRequired,onClose:i().func.isRequired,onCreated:i().func.isRequired},w.propTypes={providerId:i().string.isRequired,provider:i().shape({id:i().string.isRequired,name:i().string.isRequired,color:i().string,textIcon:i().string}).isRequired,stats:i().shape({connected:i().number,error:i().number,errorCode:i().string,errorTime:i().string}).isRequired,authType:i().string,onToggle:i().func},k.propTypes={providerId:i().string.isRequired,provider:i().shape({id:i().string.isRequired,name:i().string.isRequired,color:i().string,textIcon:i().string,apiType:i().string}).isRequired,stats:i().shape({connected:i().number,error:i().number,errorCode:i().string,errorTime:i().string}).isRequired,authType:i().string,onToggle:i().func},C.propTypes={results:i().shape({mode:i().string,results:i().array,summary:i().shape({total:i().number,passed:i().number,failed:i().number}),error:i().string}).isRequired}}},e=>{e.O(0,[3170,1728,1321,5497,8441,3794,7358],()=>e(e.s=67455)),_N_E=e.O()}]);
|