@rsalmn/extremerouter 0.6.6 → 0.6.7
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 +9 -6
- package/app/.next-cli-build/build-manifest.json +2 -2
- package/app/.next-cli-build/prerender-manifest.json +24 -0
- package/app/.next-cli-build/required-server-files.json +2 -1
- package/app/.next-cli-build/routes-manifest.json +20 -0
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +2 -2
- 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 +3 -3
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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/health/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/health/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/health/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +3 -3
- 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 +2 -2
- 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 +3 -3
- 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 +2 -2
- 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 +2 -2
- 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/overview/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/overview/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/overview/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +2 -2
- 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/playground/page.js +2 -0
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page.js.nft.json +1 -0
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page_client-reference-manifest.js +1 -0
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +2 -2
- 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 +3 -3
- 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 +2 -2
- 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 +2 -2
- 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/quota/page.js +2 -2
- 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 +2 -2
- 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/swarm/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/swarm/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/swarm/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +3 -3
- 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/_global-error.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_not-found/page.js +2 -2
- package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_not-found.html +1 -1
- package/app/.next-cli-build/server/app/_not-found.rsc +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/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/api/alerts/test/route.js +2 -0
- package/app/.next-cli-build/server/app/api/alerts/test/route.js.nft.json +1 -0
- package/app/.next-cli-build/server/app/api/alerts/test/route_client-reference-manifest.js +1 -0
- 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/status/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +3 -3
- 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 +1 -1
- 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 +1 -1
- 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 +2 -2
- 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/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/hermes-settings/route.js +1 -1
- 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 +2 -2
- 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/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 +2 -2
- 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/providers/route.js +1 -1
- package/app/.next-cli-build/server/app/api/health/providers/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/health/stream/route.js +2 -2
- package/app/.next-cli-build/server/app/api/health/stream/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/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 +2 -2
- 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/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/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/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/[id]/vault-pool/route.js +1 -0
- package/app/.next-cli-build/server/app/api/providers/[id]/vault-pool/route.js.nft.json +1 -0
- package/app/.next-cli-build/server/app/api/providers/[id]/vault-pool/route_client-reference-manifest.js +1 -0
- 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 +2 -2
- package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/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/swarm/active/route.js +1 -1
- package/app/.next-cli-build/server/app/api/swarm/active/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/swarm/stream/route.js +2 -2
- package/app/.next-cli-build/server/app/api/swarm/stream/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/meta/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/meta/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/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 +2 -2
- 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/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/callback.segments/_index.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 +1 -1
- package/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_index.segment.rsc +5 -5
- 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 +2 -2
- package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_index.segment.rsc +5 -5
- 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 +2 -2
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +5 -5
- 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 +2 -2
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/overview.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/overview.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/overview.segments/!KGRhc2hib2FyZCk/dashboard/overview/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/overview.segments/!KGRhc2hib2FyZCk/dashboard/overview.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/overview.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/overview.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/overview.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/overview.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/overview.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/overview.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/playground.html +1 -0
- package/app/.next-cli-build/server/app/dashboard/playground.meta +17 -0
- package/app/.next-cli-build/server/app/dashboard/playground.rsc +22 -0
- package/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk/dashboard/playground/__PAGE__.segment.rsc +6 -0
- package/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk/dashboard/playground.segment.rsc +5 -0
- package/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +5 -0
- package/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk.segment.rsc +5 -0
- package/app/.next-cli-build/server/app/dashboard/playground.segments/_full.segment.rsc +22 -0
- package/app/.next-cli-build/server/app/dashboard/playground.segments/_head.segment.rsc +6 -0
- package/app/.next-cli-build/server/app/dashboard/playground.segments/_index.segment.rsc +9 -0
- package/app/.next-cli-build/server/app/dashboard/playground.segments/_tree.segment.rsc +3 -0
- 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 +2 -2
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_index.segment.rsc +5 -5
- 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 +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_index.segment.rsc +5 -5
- 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 +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_index.segment.rsc +5 -5
- 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 +2 -2
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.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 +3 -3
- package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_index.segment.rsc +5 -5
- 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 +2 -2
- package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +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/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.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 +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_index.segment.rsc +5 -5
- 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 +2 -2
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_index.segment.rsc +5 -5
- 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 +2 -2
- package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_index.segment.rsc +5 -5
- 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 +2 -2
- package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_index.segment.rsc +5 -5
- 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 +2 -2
- package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard.segments/_index.segment.rsc +5 -5
- 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 +1 -1
- package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/index.segments/_index.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 +2 -2
- 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 +5 -5
- package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/login/page.js +2 -2
- 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/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/manifest.webmanifest/route.js +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 +2 -2
- 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 +9 -6
- package/app/.next-cli-build/server/chunks/1051.js +1 -1
- package/app/.next-cli-build/server/chunks/{4746.js → 1350.js} +2 -2
- package/app/.next-cli-build/server/chunks/1719.js +1 -0
- package/app/.next-cli-build/server/chunks/2231.js +1 -1
- package/app/.next-cli-build/server/chunks/2701.js +1 -1
- package/app/.next-cli-build/server/chunks/318.js +13 -11
- package/app/.next-cli-build/server/chunks/412.js +1 -1
- package/app/.next-cli-build/server/chunks/5141.js +1 -0
- package/app/.next-cli-build/server/chunks/5612.js +1 -1
- package/app/.next-cli-build/server/chunks/5699.js +1 -1
- package/app/.next-cli-build/server/chunks/5961.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/6316.js +2 -1
- package/app/.next-cli-build/server/chunks/{8658.js → 6630.js} +1 -1
- package/app/.next-cli-build/server/chunks/7524.js +1 -0
- package/app/.next-cli-build/server/chunks/8238.js +1 -1
- package/app/.next-cli-build/server/chunks/8271.js +1 -1
- package/app/.next-cli-build/server/chunks/{4884.js → 9248.js} +5 -5
- package/app/.next-cli-build/server/chunks/9573.js +2 -0
- package/app/.next-cli-build/server/chunks/9609.js +1 -0
- package/app/.next-cli-build/server/chunks/9630.js +1 -1
- package/app/.next-cli-build/server/chunks/9903.js +2 -0
- package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
- package/app/.next-cli-build/server/middleware.js +3 -3
- 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/static/chunks/1321-4a7a9ee14e7c1d60.js +1 -0
- package/app/.next-cli-build/static/chunks/{5497-6e1985d958a64ed9.js → 5497-a9063203a149ed58.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-13dd1e8e32f7d580.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/overview/page-d88cff439c2fa57d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/playground/page-503d94f002901e45.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/{page-1b18b64a9ced4e9f.js → page-c996eca2209ec67d.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-e78f58ada6b70744.js +10 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-87fcc6ce7d4004b5.js +1 -0
- package/app/.next-cli-build/static/chunks/app/_global-error/page-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/alerts/test/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/login/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/status/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/combos/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/health/providers/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/health/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/health/stream/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/init/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/keys/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/locale/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/alias/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/availability/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/custom/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/test/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pricing/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/vault-pool/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/client/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/database/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/shutdown/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/swarm/active/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/swarm/stream/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tags/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/load/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/save/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/send/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/history/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/meta/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/models/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/search/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/version/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/version/update/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/page-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-937d036ce54449cc.js +1 -0
- package/app/.next-cli-build/static/css/4ab17be64cde47af.css +1 -0
- package/app/.next-cli-build/static/v68eSfZDt6D04piWfJX-7/_buildManifest.js +1 -0
- package/app/cli/.build-home/AppData/Roaming/extremerouter/db/data.sqlite-shm +0 -0
- package/app/cli/.build-home/AppData/Roaming/extremerouter/db/data.sqlite-wal +0 -0
- package/app/node_modules/wreq-js/dist/wreq-js.cjs +2216 -0
- package/app/node_modules/wreq-js/package.json +120 -0
- package/app/package.json +2 -1
- package/app/public/providers/api-airforce.svg +8 -0
- package/app/server.js +1 -1
- package/package.json +1 -1
- package/app/.next-cli-build/server/chunks/4827.js +0 -1
- package/app/.next-cli-build/server/chunks/8497.js +0 -1
- package/app/.next-cli-build/static/chunks/1321-272aef69f8a5a079.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-bb8f74eb19be72b4.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/overview/page-a51a293917886fef.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-ec258bc489c68411.js +0 -10
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-9e34cc08c32987bd.js +0 -1
- package/app/.next-cli-build/static/chunks/app/_global-error/page-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/login/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/status/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/combos/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/health/providers/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/health/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/health/stream/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/init/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/keys/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/locale/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/alias/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/availability/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/custom/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/test/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pricing/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/client/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/database/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/shutdown/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/swarm/active/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/swarm/stream/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tags/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/load/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/save/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/send/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/history/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/meta/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/models/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/search/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/version/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/version/update/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/page-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/css/f8bcd5e082a2459f.css +0 -1
- package/app/.next-cli-build/static/nn0K2UwbRB5lQVINYaLtq/_buildManifest.js +0 -1
- /package/app/.next-cli-build/static/{nn0K2UwbRB5lQVINYaLtq → v68eSfZDt6D04piWfJX-7}/_ssgManifest.js +0 -0
- /package/app/cli/.build-home/AppData/Roaming/extremerouter/db/backups/{upgrade-0.6.0-to-0.6.2-0.6.2-20260704-113435 → upgrade-0.6.6-to-0.6.7-0.6.7-20260708-103430}/data.sqlite +0 -0
package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-13dd1e8e32f7d580.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3649],{6815:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>b});var a=s(95155),l=s(12115),r=s(44923),i=s(87256),o=s(39768),n=s(5020),d=s(35497),c=s(11059);s(88105);var m=s(14051),x=s.n(m);let p=[{id:"always-on",name:"Always-On (5-Layer Fallback)",description:"Zero-downtime coding with 5 layers of fallback. Mix of subscription, cheap, and free tiers — if any model fails, the next picks up automatically.",icon:"shield",category:"reliability",strategy:"fallback",models:["cc/claude-opus-4-7","cx/gpt-5.4","glm/glm-5.1","minimax/MiniMax-M2.7","kr/claude-sonnet-4.5"],requiredProviders:["claude","codex","glm","minimax","kiro"]}];function u({combos:e,connections:t,onApply:s}){let[r,i]=(0,l.useState)(null),o=new Set(t?.filter(e=>!1!==e.isActive).map(e=>e.provider)||[]),n=new Set((e||[]).map(e=>e.name)),c=async e=>{i(e.id);try{let t=await fetch("/api/combos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e.name,models:e.models,kind:null})});if(!t.ok){let e=await t.json();alert(e.error||"Failed to create combo from template");return}await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStrategies:{[e.name]:{fallbackStrategy:e.strategy}}})}),s&&s()}catch(e){alert("Failed to apply template: "+(e?.message||String(e)))}finally{i(null)}};return(0,a.jsx)(d.Zp,{title:"Combo Templates",subtitle:"Pre-built combos — one click to apply",icon:"auto_awesome",padding:"sm",children:(0,a.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3",children:p.map(e=>{let t=n.has(e.name),s=e.requiredProviders.filter(e=>o.has(e)).length,l=s===e.requiredProviders.length;return(0,a.jsxs)("div",{className:"flex flex-col gap-3 rounded-brand border border-border-subtle bg-surface-2 p-4 transition-colors hover:border-primary/30",children:[(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsx)("div",{className:"flex size-10 shrink-0 items-center justify-center rounded-brand bg-primary/10 text-primary ring-1 ring-primary/15",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:e.icon})}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("h4",{className:"text-sm font-semibold text-text-main",children:e.name}),(0,a.jsx)("p",{className:"text-xs text-text-muted mt-0.5 line-clamp-2",children:e.description})]})]}),(0,a.jsx)("div",{className:"flex flex-wrap gap-1.5",children:e.models.map(e=>{let t=e.split("/")[0],s=o.has(t);return(0,a.jsxs)("span",{className:`inline-flex items-center gap-1 rounded-md px-2 py-0.5 text-[10px] font-medium ${s?"bg-success/10 text-success":"bg-surface-3 text-text-muted"}`,children:[(0,a.jsx)("span",{className:`size-1.5 rounded-full ${s?"bg-success":"bg-text-muted"}`}),e]},e)})}),(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2 mt-auto",children:[(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:[s,"/",e.requiredProviders.length," providers connected"]}),t?(0,a.jsx)(d.Ex,{variant:"default",size:"sm",icon:"check",children:"Created"}):(0,a.jsx)(d.$n,{size:"sm",variant:l?"primary":"secondary",icon:r===e.id?"progress_activity":"add",disabled:!!r,onClick:()=>c(e),className:r===e.id?"animate-pulse":"",children:r===e.id?"Applying...":"Apply"})]})]},e.id)})})})}u.propTypes={combos:x().arrayOf(x().shape({name:x().string})),connections:x().arrayOf(x().shape({provider:x().string,isActive:x().bool})),onApply:x().func};let h=/^[a-zA-Z0-9_.\-]+$/;function b(){let[e,t]=(0,l.useState)([]),[s,r]=(0,l.useState)(!0),[i,o]=(0,l.useState)(!1),[n,m]=(0,l.useState)(null),[x,p]=(0,l.useState)([]),[h,b]=(0,l.useState)({}),[f,y]=(0,l.useState)({}),[v,N]=(0,l.useState)(null),{copied:k,copy:w}=(0,c.C)();(0,l.useEffect)(()=>{C()},[]);let C=async()=>{try{let[e,s,a,l]=await Promise.all([fetch("/api/combos"),fetch("/api/providers"),fetch("/api/settings"),fetch("/api/models")]),r=await e.json(),i=await s.json(),o=a.ok?await a.json():{};if(e.ok&&t((r.combos||[]).filter(e=>!e.kind||"llm"===e.kind)),s.ok&&p(i.connections||[]),l.ok){let e=await l.json(),t={};for(let s of e.models||[])s.caps&&(t[s.fullModel]=s.caps);y(t)}b(o.comboStrategies||{})}catch(e){console.log("Error fetching data:",e)}finally{r(!1)}},S=async e=>{try{let t=await fetch("/api/combos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(t.ok)await C(),o(!1);else{let e=await t.json();alert(e.error||"Failed to create combo")}}catch(e){console.log("Error creating combo:",e)}},M=async(e,t)=>{try{let s=await fetch(`/api/combos/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(s.ok)await C(),m(null);else{let e=await s.json();alert(e.error||"Failed to update combo")}}catch(e){console.log("Error updating combo:",e)}},O=async s=>{N({title:"Delete Combo",message:"Delete this combo?",onConfirm:async()=>{N(null);try{(await fetch(`/api/combos/${s}`,{method:"DELETE"})).ok&&t(e.filter(e=>e.id!==s))}catch(e){console.log("Error deleting combo:",e)}}})},E=async(e,t)=>{try{let s={...h},a={...s[e]||{},...t};a.fallbackStrategy&&"fallback"!==a.fallbackStrategy?s[e]=a:delete s[e],await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStrategies:s})}),b(s)}catch(e){console.log("Error updating combo strategy:",e)}};return s?(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsx)(d.Qv,{}),(0,a.jsx)(d.Qv,{})]}):(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-6",children:[(0,a.jsx)(d.zY,{title:"Combos",description:"Group models under one name, then pick a strategy per combo",icon:"layers",actions:(0,a.jsx)(d.$n,{size:"sm",icon:"add",onClick:()=>o(!0),className:"whitespace-nowrap",children:"Create Combo"})}),(0,a.jsx)("div",{className:"rounded-panel border border-border-subtle bg-panel/60 p-4 text-xs text-text-muted",children:(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2 lg:grid-cols-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"font-semibold text-text-main",children:"Fallback"})," — tries models in order (next on failure)"]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"font-semibold text-text-main",children:"Round Robin"})," — rotates models across requests to spread load"]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"font-semibold text-text-main",children:"Fusion"})," — parallel panel + judge synthesis (N+1 calls)"]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"font-semibold text-text-main",children:"Capacity auto-switch"})," — routes multimodal inputs to a capable model first"]})]})}),(0,a.jsx)(u,{combos:e,connections:x,onApply:C}),0===e.length?(0,a.jsx)(d.Zp,{children:(0,a.jsxs)("div",{className:"text-center py-12",children:[(0,a.jsx)("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-full bg-primary/10 text-primary mb-4",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[32px]",children:"layers"})}),(0,a.jsx)("p",{className:"text-text-main font-medium mb-1",children:"No combos yet"}),(0,a.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Create model combos with fallback support"}),(0,a.jsx)(d.$n,{icon:"add",onClick:()=>o(!0),className:"w-full sm:w-auto",children:"Create Combo"})]})}):(0,a.jsx)("div",{className:"flex flex-col gap-4",children:e.map(e=>(0,a.jsx)(g,{combo:e,modelCaps:f,activeProviders:x,copied:k,onCopy:w,onEdit:()=>m(e),onDelete:()=>O(e.id),strategy:h[e.name]||{},onSetStrategy:t=>E(e.name,t)},e.id))}),(0,a.jsx)(j,{isOpen:i,onClose:()=>o(!1),onSave:S,activeProviders:x},"create"),(0,a.jsx)(j,{isOpen:!!n,combo:n,onClose:()=>m(null),onSave:e=>M(n.id,e),activeProviders:x},n?.id||"new"),(0,a.jsx)(d.uo,{isOpen:!!v,onClose:()=>N(null),onConfirm:v?.onConfirm,title:v?.title||"Confirm",message:v?.message,variant:"danger"})]})}let f=[{value:"fallback",label:"Fallback — try in order"},{value:"round-robin",label:"Round Robin — rotate"},{value:"fusion",label:"Fusion — panel + judge"},{value:"swarm",label:"Hierarchical Swarm — Manager→Staff→Workers"}];function g({combo:e,modelCaps:t={},activeProviders:s=[],copied:r,onCopy:i,onEdit:o,onDelete:n,strategy:c={},onSetStrategy:m}){let[x,p]=(0,l.useState)(!1),[u,h]=(0,l.useState)(null),b=c.fallbackStrategy||"fallback",y=c.judgeModel||"",j=c.managerModel||"",v=c.staffModel||"",N=c.auditModel||"";return(0,a.jsxs)(d.Zp,{padding:"sm",className:"group",children:[(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-3 sm:items-center",children:[(0,a.jsx)("div",{className:"size-8 rounded-lg bg-primary/10 flex items-center justify-center shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-primary text-[18px]",children:"layers"})}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("code",{className:"block truncate font-mono text-sm font-medium",children:e.name}),(0,a.jsxs)("div",{className:"mt-1 flex min-w-0 flex-wrap items-center gap-1",children:[0===e.models.length?(0,a.jsx)("span",{className:"text-xs text-text-muted italic",children:"No models"}):e.models.slice(0,3).map((e,s)=>(0,a.jsxs)("code",{className:"inline-flex items-center gap-1 rounded bg-black/5 px-1.5 py-0.5 font-mono text-xs text-text-muted dark:bg-white/5",children:[(0,a.jsx)("span",{children:e}),(0,a.jsx)(d.nh,{caps:t[e]})]},s)),e.models.length>3&&(0,a.jsxs)("span",{className:"text-[10px] text-text-muted",children:["+",e.models.length-3," more"]})]}),"fusion"===b&&(0,a.jsxs)("div",{className:"mt-2 flex min-w-0 flex-wrap items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-[11px] font-medium text-text-muted",children:"Judge"}),(0,a.jsxs)("button",{onClick:()=>p(!0),className:"inline-flex max-w-full items-center gap-1 rounded border border-dashed border-primary/40 px-1.5 py-0.5 font-mono text-[11px] text-primary hover:border-primary hover:bg-primary/5 transition-colors",title:"Pick the model that fuses panel answers",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"gavel"}),(0,a.jsx)("span",{className:"truncate",children:y||`Auto — ${e.models[0]||"first model"}`})]}),y&&(0,a.jsx)("button",{onClick:()=>m({judgeModel:""}),className:"p-0.5 rounded text-text-muted hover:text-red-500 hover:bg-red-500/10 transition-colors",title:"Reset judge to Auto",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"close"})})]}),"swarm"===b&&(0,a.jsxs)("div",{className:"mt-2 flex min-w-0 flex-col gap-1.5",children:[(0,a.jsx)("div",{className:"flex flex-wrap items-center gap-1.5",children:[{key:"manager",label:"Manager",icon:"psychology",value:j,placeholder:`Auto — ${e.models[0]||"first"}`},{key:"staff",label:"Staff",icon:"badge",value:v,placeholder:"Same as Manager"},{key:"audit",label:"Audit",icon:"fact_check",value:N,placeholder:"Same as Staff"}].map(e=>(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)("span",{className:"text-[11px] font-medium text-text-muted",children:e.label}),(0,a.jsxs)("button",{onClick:()=>h(e.key),className:"inline-flex max-w-full items-center gap-1 rounded border border-dashed border-primary/40 px-1.5 py-0.5 font-mono text-[11px] text-primary hover:border-primary hover:bg-primary/5 transition-colors",title:`Pick the ${e.label} model`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:e.icon}),(0,a.jsx)("span",{className:"truncate",children:e.value||e.placeholder})]}),e.value&&(0,a.jsx)("button",{onClick:()=>m({[`${e.key}Model`]:""}),className:"p-0.5 rounded text-text-muted hover:text-red-500 hover:bg-red-500/10 transition-colors",title:`Reset ${e.label}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"close"})})]},e.key))}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5 text-[11px] text-text-muted",children:[(0,a.jsx)("span",{className:"font-medium",children:"Workers"}),(0,a.jsxs)("span",{children:["= combo models (",e.models.length,")"]}),(0,a.jsx)("span",{className:"text-text-subtle",children:"\xb7"}),(0,a.jsx)("a",{href:"/dashboard/swarm",className:"text-primary hover:underline",children:"Telemetry →"})]})]})]})]}),(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center sm:gap-3 sm:shrink-0",children:[(0,a.jsx)("div",{className:"w-full sm:w-[200px]",children:(0,a.jsx)(d.l6,{options:f,value:b,onChange:e=>m({fallbackStrategy:e.target.value}),selectClassName:"py-1.5 text-xs"})}),(0,a.jsxs)("div",{className:"grid grid-cols-3 gap-1 sm:flex",children:[(0,a.jsxs)("button",{onClick:t=>{t.stopPropagation(),i(e.name,`combo-${e.id}`)},className:"flex flex-col items-center rounded px-2 py-1 text-text-muted transition-colors hover:bg-black/5 hover:text-primary dark:hover:bg-white/5",title:"Copy combo name",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:r===`combo-${e.id}`?"check":"content_copy"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Copy"})]}),(0,a.jsxs)("button",{onClick:o,className:"flex flex-col items-center rounded px-2 py-1 text-text-muted transition-colors hover:bg-black/5 hover:text-primary dark:hover:bg-white/5",title:"Edit",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,a.jsxs)("button",{onClick:n,className:"flex flex-col items-center rounded px-2 py-1 text-red-500 transition-colors hover:bg-red-500/10",title:"Delete",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]})]})]}),(0,a.jsx)(d.rq,{isOpen:x,onClose:()=>p(!1),onSelect:e=>{m({judgeModel:e?.value||""}),p(!1)},activeProviders:s,title:"Select Judge Model",addedModelValues:y?[y]:[],closeOnSelect:!0}),u&&(0,a.jsx)(d.rq,{isOpen:!0,onClose:()=>h(null),onSelect:e=>{m({[`${u}Model`]:e?.value||""}),h(null)},activeProviders:s,title:`Select ${"manager"===u?"Manager":"staff"===u?"Staff":"Audit"} Model`,addedModelValues:[],closeOnSelect:!0})]})}function y({id:e,index:t,model:s,isFirst:r,isLast:n,onEdit:d,onMoveUp:c,onMoveDown:m,onRemove:x}){let{attributes:p,listeners:u,setNodeRef:h,transform:b,isDragging:f}=(0,i.gl)({id:e}),g={transform:o.Ks.Transform.toString(b),opacity:f?.4:1,zIndex:f?999:void 0},[j,v]=(0,l.useState)(!1),[N,k]=(0,l.useState)(s),w=()=>{let e=N.trim();e&&e!==s?d(e):k(s),v(!1)};return(0,a.jsxs)("div",{ref:h,style:g,className:`group flex min-w-0 items-center gap-1.5 rounded-md px-2 py-1 bg-black/[0.02] hover:bg-black/[0.04] dark:bg-white/[0.02] dark:hover:bg-white/[0.04] transition-colors ${f?"shadow-md ring-1 ring-primary/30":""}`,children:[(0,a.jsx)("button",{...p,...u,type:"button",className:"cursor-grab touch-none p-0.5 rounded text-text-muted hover:text-primary active:cursor-grabbing shrink-0",title:"Drag to reorder",children:(0,a.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,a.jsx)("circle",{cx:"9",cy:"4",r:"2"}),(0,a.jsx)("circle",{cx:"15",cy:"4",r:"2"}),(0,a.jsx)("circle",{cx:"9",cy:"12",r:"2"}),(0,a.jsx)("circle",{cx:"15",cy:"12",r:"2"}),(0,a.jsx)("circle",{cx:"9",cy:"20",r:"2"}),(0,a.jsx)("circle",{cx:"15",cy:"20",r:"2"})]})}),(0,a.jsx)("span",{className:"text-[10px] font-medium text-text-muted w-3 text-center shrink-0",children:t+1}),j?(0,a.jsx)("input",{autoFocus:!0,value:N,onChange:e=>k(e.target.value),onBlur:w,onKeyDown:e=>{"Enter"===e.key&&w(),"Escape"===e.key&&(k(s),v(!1))},className:"min-w-0 flex-1 rounded border border-primary/40 bg-white px-1.5 py-0.5 font-mono text-xs text-text-main outline-none dark:bg-black/20"}):(0,a.jsx)("div",{className:"min-w-0 flex-1 cursor-text truncate rounded px-1.5 py-0.5 font-mono text-xs text-text-main hover:bg-black/5 dark:hover:bg-white/5",onClick:()=>v(!0),title:"Click to edit",children:s}),(0,a.jsxs)("div",{className:"flex shrink-0 items-center gap-0.5",children:[(0,a.jsx)("button",{onClick:c,disabled:r,className:`p-0.5 rounded ${r?"text-text-muted/20 cursor-not-allowed":"text-text-muted hover:text-primary hover:bg-black/5 dark:hover:bg-white/5"}`,title:"Move up",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"arrow_upward"})}),(0,a.jsx)("button",{onClick:m,disabled:n,className:`p-0.5 rounded ${n?"text-text-muted/20 cursor-not-allowed":"text-text-muted hover:text-primary hover:bg-black/5 dark:hover:bg-white/5"}`,title:"Move down",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"arrow_downward"})})]}),(0,a.jsx)("button",{onClick:x,className:"p-0.5 hover:bg-red-500/10 rounded text-text-muted hover:text-red-500 transition-all",title:"Remove",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"close"})})]})}function j({isOpen:e,combo:t,onClose:s,onSave:o,activeProviders:c,kindFilter:m=null}){let[x,p]=(0,l.useState)(t?.name||""),[u,b]=(0,l.useState)(t?.models||[]),[f,g]=(0,l.useState)(!1),[v,N]=(0,l.useState)(!1),[k,w]=(0,l.useState)(""),[C,S]=(0,l.useState)({}),M=(0,r.FR)((0,r.MS)(r.AN,{activationConstraint:{distance:5}}),(0,r.MS)(r.uN,{coordinateGetter:i.JR})),O=u.map((e,t)=>({uid:`item-${t}`,model:e})),E=async()=>{try{let e=await fetch("/api/models/alias");if(!e.ok)return;let t=await e.json();S(t.aliases||{})}catch(e){console.error("Error fetching modal data:",e)}};(0,l.useEffect)(()=>{e&&E()},[e]);let $=e=>e.trim()?h.test(e)?(w(""),!0):(w("Only letters, numbers, -, _ and . allowed"),!1):(w("Name is required"),!1),P=async()=>{$(x)&&(N(!0),await o({name:x.trim(),models:u}),N(!1))},A=!!t;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.aF,{isOpen:e,onClose:s,title:A?"Edit Combo":"Create Combo",children:(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(d.pd,{label:"Combo Name",value:x,onChange:e=>{let t=e.target.value;p(t),t?$(t):w("")},placeholder:"my-combo",error:k}),(0,a.jsx)("p",{className:"text-[10px] text-text-muted mt-0.5",children:"Only letters, numbers, -, _ and . allowed"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Models"}),0===u.length?(0,a.jsxs)("div",{className:"text-center py-4 border border-dashed border-black/10 dark:border-white/10 rounded-lg bg-black/[0.01] dark:bg-white/[0.01]",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-xl mb-1",children:"layers"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"No models added yet"})]}):(0,a.jsx)(r.Mp,{sensors:M,collisionDetection:r.fp,onDragEnd:e=>{let{active:t,over:s}=e;if(s&&t.id!==s.id){let e=O.findIndex(e=>e.uid===t.id),a=O.findIndex(e=>e.uid===s.id);-1!==e&&-1!==a&&b(t=>(0,i.be)(t,e,a))}},modifiers:[n.FN,n.gj],children:(0,a.jsx)(i.gB,{items:O.map(e=>e.uid),strategy:i._G,children:(0,a.jsx)("div",{className:"flex max-h-[55vh] min-w-0 flex-col gap-1 overflow-y-auto sm:max-h-[350px]",children:O.map(({uid:e,model:t},s)=>(0,a.jsx)(y,{id:e,index:s,model:t,isFirst:0===s,isLast:s===O.length-1,onEdit:e=>{let t=[...u];t[s]=e,b(t)},onMoveUp:()=>(e=>{if(0===e)return;let t=[...u];[t[e-1],t[e]]=[t[e],t[e-1]],b(t)})(s),onMoveDown:()=>(e=>{if(e===u.length-1)return;let t=[...u];[t[e],t[e+1]]=[t[e+1],t[e]],b(t)})(s),onRemove:()=>{b(u.filter((e,t)=>t!==s))}},e))})})}),(0,a.jsxs)("button",{onClick:()=>g(!0),className:"w-full mt-2 py-2 border border-dashed border-black/10 dark:border-white/10 rounded-lg text-xs text-primary font-medium hover:text-primary hover:border-primary/50 transition-colors flex items-center justify-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"add"}),"Add Model"]})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2 pt-1 sm:flex-row",children:[(0,a.jsx)(d.$n,{onClick:s,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,a.jsx)(d.$n,{onClick:P,fullWidth:!0,size:"sm",disabled:!x.trim()||!!k||v,children:v?"Saving...":A?"Save":"Create"})]})]})}),(0,a.jsx)(d.rq,{isOpen:f,onClose:()=>g(!1),onSelect:e=>{u.includes(e.value)||b([...u,e.value])},onDeselect:e=>{b(u.filter(t=>t!==e.value))},activeProviders:c,modelAliases:C,title:"Add Model to Combo",kindFilter:m,addedModelValues:u,closeOnSelect:!1})]})}},49293:(e,t,s)=>{Promise.resolve().then(s.bind(s,6815))}},e=>{e.O(0,[27,7055,1321,705,5497,8441,3794,7358],()=>e(e.s=49293)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3645],{73411:(e,s,t)=>{Promise.resolve().then(t.bind(t,98378))},98378:(e,s,t)=>{"use strict";t.d(s,{default:()=>f});var r=t(95155),a=t(12115),n=t(35497),i=t(14051),o=t.n(i);let c=[{key:"tokensSaved",icon:"savings",color:"success",label:"Tokens Saved",sub:"Via RTK + Headroom"},{key:"requestsRouted",icon:"route",color:"primary",label:"Requests Routed",sub:"Lifetime"},{key:"cacheTokens",icon:"cached",color:"info",label:"Cache Tokens",sub:"From cache reads"}];function l({data:e}){if(!e)return null;let s={tokensSaved:e.tokensSavedLifetime,requestsRouted:e.totalRequestsLifetime,cacheTokens:e.totalCachedTokens};return(0,r.jsx)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-3",children:c.map(e=>{let t;return(0,r.jsxs)("div",{className:"flex flex-col gap-2 rounded-panel border border-border-subtle bg-panel p-5 shadow-[var(--shadow-soft)]",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)("div",{className:`flex size-10 items-center justify-center rounded-brand ring-1 ${{success:"bg-success/10 text-success ring-success/20",primary:"bg-primary/10 text-primary ring-primary/20",info:"bg-info/10 text-info ring-info/20"}[e.color]}`,children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:e.icon})}),(0,r.jsx)("div",{className:"min-w-0",children:(0,r.jsx)("span",{className:"text-2xl font-bold text-text-main",children:(t=Number(s[e.key]||0))>=1e9?`${(t/1e9).toFixed(1)}B`:t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}K`:t.toLocaleString()})})]}),(0,r.jsx)("div",{className:"text-sm font-medium text-text-main",children:e.label}),(0,r.jsx)("div",{className:"text-xs text-text-muted",children:e.sub})]},e.key)})})}l.propTypes={data:o().object};let d=[{key:"rtkEnabled",name:"RTK Token Saver",icon:"compress"},{key:"headroomEnabled",name:"Headroom",icon:"cloud_compress"},{key:"cavemanEnabled",name:"Caveman Mode",icon:"cottage"},{key:"ponytailEnabled",name:"Ponytail",icon:"cut"}];function m({settings:e}){return e?(0,r.jsx)("div",{className:"flex flex-wrap gap-3",children:d.map(s=>{let t=!!e[s.key];return(0,r.jsxs)("div",{className:`flex items-center gap-2 rounded-brand border px-3 py-2 transition-colors ${t?"border-success/30 bg-success/5":"border-border-subtle bg-surface-2"}`,children:[(0,r.jsx)("span",{className:`material-symbols-outlined text-[18px] ${t?"text-success":"text-text-muted"}`,children:s.icon}),(0,r.jsx)("span",{className:"text-sm font-medium text-text-main",children:s.name}),(0,r.jsx)(n.Ex,{variant:t?"success":"default",size:"sm",dot:!0,children:t?"Active":"Off"})]},s.key)})}):null}m.propTypes={settings:o().object};var u=t(98500),x=t.n(u),p=t(57250);let b=new Set(["windsurf","trae","cody","kimchi","chatglm-cn","blackbox-web","puter","adapta-web","deepseek-web","chatgpt-web","doubao-web","gemini-web","copilot-web","muse-spark-web","duckduckgo-web","venice-web","t3-web","lmarena","veoaifree-web","claude-web","pollinations","poe-web","v0-vercel-web","qwen-web","kimi-web","huggingchat","api-airforce"]),g=e=>{let s=Number(e||0);return s>=1e6?`${(s/1e6).toFixed(1)}M`:s>=1e3?`${(s/1e3).toFixed(1)}K`:s.toLocaleString()};function h({providers:e}){return e&&0!==e.length?(0,r.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:e.map(e=>{var s;let t=e.color||"#6b7280",a=t.length>7?t:t+"15";return(0,r.jsxs)(x(),{href:`/dashboard/providers/${e.id}`,className:"group flex items-center gap-3 rounded-brand border border-border-subtle bg-panel px-3 py-2.5 shadow-[var(--shadow-soft)] transition-all hover:border-primary/35 hover:bg-panel-elev hover:shadow-[var(--shadow-warm)]",children:[(0,r.jsx)("div",{className:"size-8 shrink-0 rounded-lg flex items-center justify-center",style:{backgroundColor:a},children:(0,r.jsx)(p.A,{src:(s=e.id,`/providers/${s}.${b.has(s)?"svg":"png"}`),alt:e.name,size:24,className:"object-contain rounded max-w-[24px] max-h-[24px]",fallbackText:(e.name||e.id).slice(0,2).toUpperCase(),fallbackColor:t})}),(0,r.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,r.jsx)("h3",{className:"truncate text-sm font-semibold text-text-main",children:e.name}),(0,r.jsx)("div",{className:"flex items-center gap-2 text-xs text-text-muted",children:e.requests>0?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("span",{className:"font-medium",children:[g(e.requests)," requests"]}),(0,r.jsx)("span",{children:"\xb7"}),(0,r.jsxs)("span",{children:[g(e.tokens)," tokens"]})]}):e.connected?(0,r.jsxs)("span",{className:"flex items-center gap-1 text-success",children:[(0,r.jsx)("span",{className:"size-1.5 rounded-full bg-success"}),"Connected"]}):(0,r.jsx)("span",{children:"No usage yet"})})]})]},e.id)})}):(0,r.jsx)(n.pp,{icon:"redeem",title:"No free providers used yet",description:"Connect a free provider (Kiro, OpenCode, etc.) and start routing requests to see usage here."})}function f(){let[e,s]=(0,a.useState)(null),[t,i]=(0,a.useState)(!0);return((0,a.useEffect)(()=>{fetch("/api/usage/meta").then(e=>e.json()).then(e=>{e.error||s(e)}).catch(()=>{}).finally(()=>i(!1))},[]),t)?(0,r.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,r.jsx)(n.zY,{title:"Overview",description:"Gateway summary, savings, and free-tier usage",icon:"dashboard"}),(0,r.jsx)(n.Qv,{}),(0,r.jsx)(n.Qv,{})]}):(0,r.jsxs)("div",{className:"flex min-w-0 flex-col gap-6",children:[(0,r.jsx)(n.zY,{title:"Overview",description:"Gateway summary, savings, and free-tier usage",icon:"dashboard"}),(0,r.jsx)(l,{data:e}),(0,r.jsx)(n.Zp,{title:"Token Savers",subtitle:"Input compression and output optimization",icon:"savings",padding:"sm",children:(0,r.jsx)(m,{settings:e?.tokenSaverSettings})}),(0,r.jsx)(n.Zp,{title:"Free Providers Used",subtitle:"Providers with no API cost routing through your gateway",icon:"redeem",padding:"sm",children:(0,r.jsx)(h,{providers:e?.freeProviders||[]})})]})}h.propTypes={providers:o().arrayOf(o().shape({id:o().string,name:o().string,icon:o().string,color:o().string,requests:o().number,tokens:o().number}))}}},e=>{e.O(0,[27,1321,705,5497,8441,3794,7358],()=>e(e.s=73411)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1287],{38485:(e,t,s)=>{"use strict";s.d(t,{default:()=>j});var a=s(95155),r=s(12115),n=s(35497),l=s(14051),o=s.n(l);function i({models:e,value:t,onChange:s,compact:r=!1}){let n=function(e){let t={};for(let s of e){let e=s.provider||s.id.split("/")[0]||"other";t[e]||(t[e]=[]),t[e].push(s)}return t}(e);return(0,a.jsxs)("select",{value:t,onChange:e=>s(e.target.value),className:`${r?"h-8 text-xs":"h-9 text-sm"} rounded-lg border border-border-subtle bg-surface-2 px-3 text-text-main focus:border-primary focus:outline-none focus:ring-1 focus:ring-primary/30`,children:[(0,a.jsx)("option",{value:"",children:"Select a model..."}),Object.entries(n).map(([e,t])=>(0,a.jsx)("optgroup",{label:e,children:t.map(e=>(0,a.jsx)("option",{value:e.id,children:e.id},e.id))},e))]})}function c({params:e,onChange:t}){let[s,n]=(0,r.useState)(!0),l=(s,a)=>t({...e,[s]:a});return(0,a.jsxs)("div",{className:"rounded-brand border border-border-subtle bg-panel p-3",children:[(0,a.jsxs)("button",{onClick:()=>n(!s),className:"mb-3 flex w-full items-center justify-between",children:[(0,a.jsxs)("span",{className:"flex items-center gap-2 text-sm font-semibold text-text-main",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] text-primary",children:"tune"}),"Parameters"]}),(0,a.jsx)("span",{className:`material-symbols-outlined text-[18px] text-text-muted transition-transform ${s?"rotate-90":""}`,children:"chevron_right"})]}),s&&(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"mb-1 block text-xs font-medium text-text-muted",children:"System Prompt"}),(0,a.jsx)("textarea",{value:e.systemPrompt||"",onChange:e=>l("systemPrompt",e.target.value),placeholder:"You are a helpful assistant...",rows:3,className:"custom-scrollbar w-full resize-none rounded-lg border border-border-subtle bg-surface-2 px-3 py-2 text-sm text-text-main placeholder:text-text-muted focus:border-primary focus:outline-none"})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"mb-1 flex items-center justify-between",children:[(0,a.jsx)("label",{className:"text-xs font-medium text-text-muted",children:"Temperature"}),(0,a.jsx)("span",{className:"text-xs font-mono text-text-main",children:e.temperature?.toFixed(2)})]}),(0,a.jsx)("input",{type:"range",min:"0",max:"2",step:"0.05",value:e.temperature??.7,onChange:e=>l("temperature",parseFloat(e.target.value)),className:"w-full accent-primary"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"mb-1 block text-xs font-medium text-text-muted",children:"Max Tokens"}),(0,a.jsx)("input",{type:"number",min:"1",max:"128000",value:e.maxTokens??4096,onChange:e=>l("maxTokens",parseInt(e.target.value)||4096),className:"w-full rounded-lg border border-border-subtle bg-surface-2 px-3 py-1.5 text-sm text-text-main focus:border-primary focus:outline-none"})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"mb-1 flex items-center justify-between",children:[(0,a.jsx)("label",{className:"text-xs font-medium text-text-muted",children:"Top P"}),(0,a.jsx)("span",{className:"text-xs font-mono text-text-main",children:e.topP?.toFixed(2)})]}),(0,a.jsx)("input",{type:"range",min:"0",max:"1",step:"0.05",value:e.topP??1,onChange:e=>l("topP",parseFloat(e.target.value)),className:"w-full accent-primary"})]})]})]})}function m(e){return null==e?"—":e>=1e3?`${(e/1e3).toFixed(1)}K`:e.toLocaleString()}function d(e){return null==e?"—":e<1e3?`${e}ms`:`${(e/1e3).toFixed(1)}s`}function x({stats:e,mode:t="single"}){return"compare"===t?(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-3 rounded-brand border border-border-subtle bg-surface-2 px-3 py-2 text-xs",children:[(0,a.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-primary",children:"compare_arrows"}),(0,a.jsxs)("span",{className:"font-medium text-text-main",children:[e.models||0," models compared"]})]}),(0,a.jsx)("span",{className:"text-text-muted",children:"\xb7"}),(0,a.jsxs)("span",{className:"text-text-muted",children:["Total: ",d(e.compareLatencyMs)]})]}):(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-3 rounded-brand border border-border-subtle bg-surface-2 px-3 py-2 text-xs",children:[(0,a.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-success",children:"arrow_upward"}),(0,a.jsx)("span",{className:"text-text-muted",children:"In:"}),(0,a.jsx)("span",{className:"font-mono font-medium text-text-main",children:m(e.inputTokens)})]}),(0,a.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-info",children:"arrow_downward"}),(0,a.jsx)("span",{className:"text-text-muted",children:"Out:"}),(0,a.jsx)("span",{className:"font-mono font-medium text-text-main",children:m(e.outputTokens)})]}),(0,a.jsx)("span",{className:"text-text-muted",children:"\xb7"}),(0,a.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"timer"}),(0,a.jsx)("span",{className:"text-text-muted",children:"Latency:"}),(0,a.jsx)("span",{className:"font-mono font-medium text-text-main",children:d(e.latencyMs)})]}),e.model&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-text-muted",children:"\xb7"}),(0,a.jsx)("span",{className:"font-mono text-text-muted",children:e.model})]})]})}function u({sessions:e,currentSession:t,onNew:s,onLoad:r,onDelete:l}){return(0,a.jsxs)("div",{className:"flex flex-col gap-2 rounded-brand border border-border-subtle bg-panel p-3",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("span",{className:"text-xs font-semibold uppercase tracking-wide text-text-muted",children:"History"}),(0,a.jsx)(n.$n,{size:"sm",variant:"ghost",icon:"add",onClick:s,title:"New chat"})]}),0===e.length?(0,a.jsx)("p",{className:"py-4 text-center text-xs text-text-muted",children:"No saved conversations"}):(0,a.jsx)("div",{className:"custom-scrollbar flex max-h-[70vh] flex-col gap-1 overflow-y-auto",children:e.map(e=>(0,a.jsxs)("div",{className:`group flex items-center gap-2 rounded-lg px-2 py-1.5 transition-colors ${t===e.id?"bg-primary/10":"hover:bg-surface-2"}`,children:[(0,a.jsxs)("button",{onClick:()=>r(e),className:"flex min-w-0 flex-1 flex-col items-start",children:[(0,a.jsx)("span",{className:"w-full truncate text-xs font-medium text-text-main",children:e.title}),(0,a.jsx)("span",{className:"text-[10px] text-text-muted",children:function(e){if(!e)return"";let t=Math.floor((Date.now()-e)/6e4);if(t<1)return"just now";if(t<60)return`${t}m ago`;let s=Math.floor(t/60);return s<24?`${s}h ago`:new Date(e).toLocaleDateString()}(e.updatedAt||e.createdAt)})]}),(0,a.jsx)("button",{onClick:()=>l(e.id),className:"rounded p-1 text-text-muted opacity-0 hover:text-danger group-hover:opacity-100",title:"Delete",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"delete"})})]},e.id))})]})}function p({messages:e,onSend:t,streaming:s}){let l=(0,r.useRef)(null);return((0,r.useEffect)(()=>{l.current&&(l.current.scrollTop=l.current.scrollHeight)},[e]),0===e.length)?(0,a.jsx)("div",{className:"flex min-h-[300px] flex-1 items-center justify-center",children:(0,a.jsx)(n.pp,{icon:"science",title:"Start a conversation",description:"Pick a model above, type a message below, and press Enter. Switch to Compare mode to test multiple models side-by-side."})}):(0,a.jsx)("div",{ref:l,className:"custom-scrollbar flex max-h-[60vh] min-h-[200px] flex-1 flex-col gap-3 overflow-y-auto rounded-brand border border-border-subtle bg-panel p-4",children:e.map(e=>(0,a.jsx)(h,{msg:e},e.id))})}function h({msg:e}){let t="user"===e.role,s=e.error;return(0,a.jsx)("div",{className:`flex ${t?"justify-end":"justify-start"}`,children:(0,a.jsxs)("div",{className:`max-w-[80%] rounded-2xl px-4 py-2.5 text-sm ${t?"bg-primary text-white":s?"bg-danger/10 text-danger border border-danger/20":"bg-surface-2 text-text-main"}`,children:[e.model&&!t&&(0,a.jsx)("div",{className:"mb-1 text-[10px] font-medium text-text-muted",children:e.model}),(0,a.jsxs)("p",{className:"whitespace-pre-wrap break-words",children:[e.content,e.streaming&&(0,a.jsx)("span",{className:"ml-0.5 inline-block size-3 animate-pulse rounded-full bg-primary/50 align-middle"})]})]})})}i.propTypes={models:o().arrayOf(o().shape({id:o().string,provider:o().string})),value:o().string,onChange:o().func.isRequired,compact:o().bool},c.propTypes={params:o().shape({systemPrompt:o().string,temperature:o().number,maxTokens:o().number,topP:o().number}).isRequired,onChange:o().func.isRequired},x.propTypes={stats:o().object,mode:o().string},u.propTypes={sessions:o().array,currentSession:o().string,onNew:o().func.isRequired,onLoad:o().func.isRequired,onDelete:o().func.isRequired},p.propTypes={messages:o().arrayOf(o().shape({id:o().string,role:o().string,content:o().string,model:o().string,streaming:o().bool,error:o().bool})),onSend:o().func,streaming:o().bool};let f="extremerouter.playground.sessions";function g(){return`${Date.now()}-${Math.random().toString(36).slice(2,9)}`}function b(e){try{localStorage.setItem(f,JSON.stringify(e))}catch{}}function j(){let[e,t]=(0,r.useState)(!0),[s,l]=(0,r.useState)([]),[o,m]=(0,r.useState)([]),[d,h]=(0,r.useState)(null),[j,N]=(0,r.useState)([]),[v,w]=(0,r.useState)(!1),[k,S]=(0,r.useState)({}),[C,T]=(0,r.useState)("single"),[P,$]=(0,r.useState)([""]),[D,O]=(0,r.useState)({}),[_,E]=(0,r.useState)({systemPrompt:"",temperature:.7,maxTokens:4096,topP:1}),[A,z]=(0,r.useState)({}),R=(0,r.useRef)({}),M=(0,r.useRef)(null);(0,r.useEffect)(()=>{(async()=>{m(function(){try{let e=localStorage.getItem(f);return e?JSON.parse(e):[]}catch{return[]}}());try{let e=await fetch("/api/keys"),t=await e.json(),s=(t.keys||t||[]).find?.(e=>!1!==e.isActive);s?.key&&(M.current=s.key)}catch{}try{let e=await fetch("/api/v1/models"),t=((await e.json()).data||[]).map(e=>({id:e.id,name:e.id,provider:e.owned_by||e.id.split("/")[0]}));l(t),t.length>0&&$([t[0].id])}catch{}t(!1)})()},[]);let F=(0,r.useCallback)(()=>{j.length>0&&d&&J(d,j),N([]),h(null),z({}),O({})},[j,d]),L=(0,r.useCallback)(e=>{j.length>0&&d&&J(d,j),N(e.messages||[]),h(e.id),e.model&&$([e.model]),e.params&&E(e.params),z({}),O({})},[j,d]),q=(0,r.useCallback)(e=>{let t=o.filter(t=>t.id!==e);m(t),b(t),d===e&&(h(null),N([]))},[o,d]),J=(0,r.useCallback)((e,t)=>{let s=o.map(s=>s.id===e?{...s,messages:t,updatedAt:Date.now()}:s);m(s),b(s)},[o]),H=(0,r.useCallback)(()=>{if(0===j.length)return;let e=d||g(),t={id:e,title:j.find(e=>"user"===e.role)?.content?.slice(0,40)||"New Chat",messages:j,model:P[0],params:_,createdAt:Date.now(),updatedAt:Date.now()},s=o.find(t=>t.id===e)?o.map(s=>s.id===e?{...s,...t}:s):[t,...o];m(s),b(s),h(e)},[j,d,o,P,_]),I=(0,r.useCallback)(async e=>{if(!e.trim()||v)return;let t=[...j,{role:"user",content:e,id:g()}];if(_.systemPrompt&&t.unshift({role:"system",content:_.systemPrompt}),"single"===C){let e=P[0];if(!e)return;let s=g();N([...t.filter(e=>"system"!==e.role),{role:"assistant",content:"",id:s,model:e,streaming:!0}]),w(!0);let a=Date.now(),r=new AbortController;R.current={single:r};try{let n={"Content-Type":"application/json",Accept:"text/event-stream"};M.current&&(n.Authorization=`Bearer ${M.current}`);let l=await fetch("/api/v1/chat/completions",{method:"POST",headers:n,body:JSON.stringify({model:e,messages:t,stream:!0,temperature:_.temperature,max_tokens:_.maxTokens,top_p:_.topP}),signal:r.signal});if(!l.ok){let e=await l.json().catch(()=>({error:{message:`HTTP ${l.status}`}}));N(t=>t.map(t=>t.id===s?{...t,content:`❌ Error: ${e.error?.message||l.status}`,streaming:!1,error:!0}:t));return}let o=l.body.getReader(),i=new TextDecoder,c="",m="",d=null;for(;;){let{value:e,done:t}=await o.read();if(t)break;let a=(c+=i.decode(e,{stream:!0})).split("\n");for(let e of(c=a.pop()||"",a)){let t=e.trim();if(!t.startsWith("data:"))continue;let a=t.slice(5).trim();if(a&&"[DONE]"!==a)try{let e=JSON.parse(a),t=e.choices?.[0]?.delta?.content;t&&(m+=t,N(e=>e.map(e=>e.id===s?{...e,content:m}:e))),e.usage&&(d=e.usage)}catch{}}}let x=Date.now()-a;z({model:e,inputTokens:d?.prompt_tokens||0,outputTokens:d?.completion_tokens||0,latencyMs:x}),N(e=>e.map(e=>e.id===s?{...e,streaming:!1}:e))}catch(e){"AbortError"!==e.name?N(t=>t.map(t=>t.id===s?{...t,content:`❌ Error: ${e.message}`,streaming:!1,error:!0}:t)):N(e=>e.map(e=>e.id===s?{...e,streaming:!1}:e))}finally{w(!1),delete R.current.single}}else{let e=P.filter(Boolean);if(0===e.length)return;O({}),w(!0);let s=Date.now(),a={};await Promise.allSettled(e.map(async e=>{let s=new AbortController;R.current[e]=s,a[e]={content:"",streaming:!0,error:null},O({...a});try{let r={"Content-Type":"application/json",Accept:"text/event-stream"};M.current&&(r.Authorization=`Bearer ${M.current}`);let n=await fetch("/api/v1/chat/completions",{method:"POST",headers:r,body:JSON.stringify({model:e,messages:t,stream:!0,temperature:_.temperature,max_tokens:_.maxTokens,top_p:_.topP}),signal:s.signal});if(!n.ok){let t=await n.json().catch(()=>({error:{message:`HTTP ${n.status}`}}));a[e]={...a[e],content:`❌ ${t.error?.message||n.status}`,streaming:!1,error:!0},O({...a});return}let l=n.body.getReader(),o=new TextDecoder,i="",c="";for(;;){let{value:t,done:s}=await l.read();if(s)break;let r=(i+=o.decode(t,{stream:!0})).split("\n");for(let t of(i=r.pop()||"",r)){let s=t.trim();if(!s.startsWith("data:"))continue;let r=s.slice(5).trim();if(r&&"[DONE]"!==r)try{let t=JSON.parse(r),s=t.choices?.[0]?.delta?.content;s&&(c+=s,a[e]={...a[e],content:c,streaming:!0},O({...a}))}catch{}}}a[e]={...a[e],streaming:!1},O({...a})}catch(t){"AbortError"!==t.name?a[e]={...a[e],content:`❌ ${t.message}`,streaming:!1,error:!0}:a[e]={...a[e],streaming:!1},O({...a})}finally{delete R.current[e]}})),z({compareLatencyMs:Date.now()-s,models:e.length}),w(!1)}},[j,v,C,P,_]),B=(0,r.useCallback)(()=>{Object.values(R.current).forEach(e=>e?.abort?.()),w(!1),N(e=>e.map(e=>e.streaming?{...e,streaming:!1}:e)),O(e=>{let t={};for(let[s,a]of Object.entries(e))t[s]={...a,streaming:!1};return t})},[]);return e?(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsx)(n.zY,{title:"Playground",description:"Test models, compare outputs, tune parameters",icon:"science"}),(0,a.jsx)(n.Qv,{})]}):(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-4",children:[(0,a.jsx)(n.zY,{title:"Playground",description:"Test models, compare outputs, tune parameters",icon:"science",actions:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(n.Iz,{options:[{value:"single",label:"Chat"},{value:"compare",label:"Compare"}],value:C,onChange:T,size:"sm"}),(0,a.jsx)(n.$n,{size:"sm",variant:"ghost",icon:v?"stop":"save",onClick:v?B:H,disabled:!v&&0===j.length,children:v?"Stop":"Save"})]})}),(0,a.jsxs)("div",{className:"flex min-w-0 gap-4",children:[(0,a.jsx)("div",{className:"hidden w-56 shrink-0 lg:block",children:(0,a.jsx)(u,{sessions:o,currentSession:d,onNew:F,onLoad:L,onDelete:q})}),(0,a.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-3",children:["single"===C?(0,a.jsx)(i,{models:s,value:P[0],onChange:e=>$([e])}):(0,a.jsxs)("div",{className:"flex flex-wrap gap-2",children:[P.map((e,t)=>(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)(i,{models:s,value:e,onChange:e=>{let s=[...P];s[t]=e,$(s)},compact:!0}),P.length>2&&(0,a.jsx)("button",{onClick:()=>$(P.filter((e,s)=>s!==t)),className:"rounded-lg p-1.5 text-text-muted hover:bg-surface-2 hover:text-danger",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"close"})})]},t)),P.length<4&&(0,a.jsxs)("button",{onClick:()=>$([...P,""]),className:"flex items-center gap-1 rounded-lg border border-dashed border-border px-3 py-1.5 text-xs text-text-muted hover:border-primary/40 hover:text-primary",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"add"}),"Add Model"]})]}),"single"===C?(0,a.jsx)(p,{messages:j,onSend:I,streaming:v,stats:A}):(0,a.jsx)("div",{className:"flex min-w-0 gap-3",children:P.filter(Boolean).map(e=>{let t=D[e];return(0,a.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col rounded-brand border border-border-subtle bg-panel",children:[(0,a.jsx)("div",{className:"border-b border-border-subtle px-3 py-2",children:(0,a.jsx)("span",{className:"truncate text-xs font-medium text-text-main",children:e})}),(0,a.jsx)("div",{className:"custom-scrollbar max-h-[60vh] min-h-[200px] overflow-y-auto p-3",children:t?.content?(0,a.jsxs)("p",{className:`whitespace-pre-wrap text-sm ${t.error?"text-danger":"text-text-main"}`,children:[t.content,t.streaming&&(0,a.jsx)("span",{className:"ml-0.5 inline-block size-3 animate-pulse rounded-full bg-primary/50 align-middle"})]}):(0,a.jsx)("p",{className:"text-sm text-text-muted",children:v?"Waiting...":"Send a message to compare"})})]},e)})}),(0,a.jsx)(y,{onSend:I,streaming:v,onStop:B}),Object.keys(A).length>0&&(0,a.jsx)(x,{stats:A,mode:C})]}),(0,a.jsx)("div",{className:"hidden w-60 shrink-0 xl:block",children:(0,a.jsx)(c,{params:_,onChange:E})})]})]})}function y({onSend:e,streaming:t,onStop:s}){let[n,l]=(0,r.useState)(""),o=(0,r.useRef)(null),i=()=>{n.trim()&&!t&&(e(n),l(""),o.current&&(o.current.style.height="auto"))};return(0,a.jsxs)("div",{className:"flex items-end gap-2 rounded-brand border border-border-subtle bg-panel p-2",children:[(0,a.jsx)("textarea",{ref:o,value:n,onChange:e=>{l(e.target.value),e.target.style.height="auto",e.target.style.height=Math.min(e.target.scrollHeight,120)+"px"},onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),i())},placeholder:"Send a message... (Enter to send, Shift+Enter for new line)",rows:1,className:"custom-scrollbar max-h-[120px] flex-1 resize-none bg-transparent px-2 py-1.5 text-sm text-text-main placeholder:text-text-muted focus:outline-none"}),t?(0,a.jsx)("button",{onClick:s,className:"flex size-9 shrink-0 items-center justify-center rounded-lg bg-danger/15 text-danger hover:bg-danger/25",title:"Stop",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"stop"})}):(0,a.jsx)("button",{onClick:i,disabled:!n.trim(),className:"flex size-9 shrink-0 items-center justify-center rounded-lg bg-primary text-white hover:bg-primary-hover disabled:opacity-40",title:"Send",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"send"})})]})}},51191:(e,t,s)=>{Promise.resolve().then(s.bind(s,38485))}},e=>{e.O(0,[27,1321,705,5497,8441,3794,7358],()=>e(e.s=51191)),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3471],{64561:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>p});var a=s(95155),r=s(12115),o=s(35497),i=s(81127),l=s(21931),n=s(1620),d=s(31474),c=s(90620),m=s(93308),x=s(38202);function p(){let{theme:e,setTheme:t,isDark:s}=(0,n.D)(),[p,u]=(0,r.useState)("en"),[h,b]=(0,r.useState)(!1),[g,y]=(0,r.useState)(!1),[f,j]=(0,r.useState)(!1),[w,N]=(0,r.useState)({fallbackStrategy:"fill-first"}),[v,C]=(0,r.useState)(!0),[k,S]=(0,r.useState)({current:"",new:"",confirm:""}),[P,O]=(0,r.useState)({type:"",message:""}),[I,L]=(0,r.useState)(!1),[R,D]=(0,r.useState)(!1),[U,T]=(0,r.useState)({type:"",message:""}),[A,M]=(0,r.useState)({open:!1,mode:"",password:""}),$=(0,r.useRef)(null),[E,F]=(0,r.useState)({authMode:"password",oidcIssuerUrl:"",oidcClientId:"",oidcScopes:"openid profile email",oidcLoginLabel:"Sign in with OIDC"}),[q,J]=(0,r.useState)(""),[_,H]=(0,r.useState)({type:"",message:""}),[K,Z]=(0,r.useState)(!1),[z,B]=(0,r.useState)(!1),[W,Q]=(0,r.useState)({type:"",message:""}),[Y,G]=(0,r.useState)("/api/auth/oidc/callback"),[V,X]=(0,r.useState)(!1),ee=(0,r.useRef)(null),[et,es]=(0,r.useState)({outboundProxyEnabled:!1,outboundProxyUrl:"",outboundNoProxy:""}),[ea,er]=(0,r.useState)({type:"",message:""}),[eo,ei]=(0,r.useState)(!1),[el,en]=(0,r.useState)(!1);(0,r.useEffect)(()=>{u(function(){if("u"<typeof document)return"en";let e=document.cookie.split(";").find(e=>e.trim().startsWith(`${m.CL}=`)),t=e?decodeURIComponent(e.split("=")[1]):"en";return(0,m.QC)(t)}())},[h]),(0,r.useEffect)(()=>{fetch("/api/settings").then(e=>e.json()).then(e=>{N(e),F({authMode:e?.authMode||"password",oidcIssuerUrl:e?.oidcIssuerUrl||"",oidcClientId:e?.oidcClientId||"",oidcScopes:e?.oidcScopes||"openid profile email",oidcLoginLabel:e?.oidcLoginLabel||"Sign in with OIDC"}),J(""),(e?.authMode==="oidc"||e?.authMode==="both")&&X(!0),es({outboundProxyEnabled:e?.outboundProxyEnabled===!0,outboundProxyUrl:e?.outboundProxyUrl||"",outboundNoProxy:e?.outboundNoProxy||""}),C(!1)}).catch(e=>{console.error("Failed to fetch settings:",e),C(!1)})},[]),(0,r.useEffect)(()=>{G(`${window.location.origin}/api/auth/oidc/callback`)},[]);let ed=async e=>{if(e.preventDefault(),!0===w.outboundProxyEnabled){ei(!0),er({type:"",message:""});try{let e=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({outboundProxyUrl:et.outboundProxyUrl,outboundNoProxy:et.outboundNoProxy})}),t=await e.json();e.ok?(N(e=>({...e,...t})),er({type:"success",message:"Proxy settings applied"})):er({type:"error",message:t.error||"Failed to update proxy settings"})}catch(e){er({type:"error",message:"An error occurred"})}finally{ei(!1)}}},ec=async()=>{if(!0!==w.outboundProxyEnabled)return;let e=(et.outboundProxyUrl||"").trim();if(!e)return void er({type:"error",message:"Please enter a Proxy URL to test"});en(!0),er({type:"",message:""});try{let t=await fetch("/api/settings/proxy-test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyUrl:e})}),s=await t.json();t.ok&&s?.ok?er({type:"success",message:`Proxy test OK (${s.status}) in ${s.elapsedMs}ms`}):er({type:"error",message:s?.error||"Proxy test failed"})}catch(e){er({type:"error",message:"An error occurred"})}finally{en(!1)}},em=async e=>{ei(!0),er({type:"",message:""});try{let t=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({outboundProxyEnabled:e})}),s=await t.json();t.ok?(N(e=>({...e,...s})),es(e=>({...e,outboundProxyEnabled:s?.outboundProxyEnabled===!0})),er({type:"success",message:e?"Proxy enabled":"Proxy disabled"})):er({type:"error",message:s.error||"Failed to update proxy settings"})}catch(e){er({type:"error",message:"An error occurred"})}finally{ei(!1)}},ex=async e=>{if(e.preventDefault(),k.new!==k.confirm)return void O({type:"error",message:"Passwords do not match"});L(!0),O({type:"",message:""});try{let e=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({currentPassword:k.current,newPassword:k.new})}),t=await e.json();e.ok?(O({type:"success",message:"Password updated successfully"}),S({current:"",new:"",confirm:""})):O({type:"error",message:t.error||"Failed to update password"})}catch(e){O({type:"error",message:"An error occurred"})}finally{L(!1)}},ep=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({fallbackStrategy:e})})).ok&&N(t=>({...t,fallbackStrategy:e}))}catch(e){console.error("Failed to update settings:",e)}},eu=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStrategy:e})})).ok&&N(t=>({...t,comboStrategy:e}))}catch(e){console.error("Failed to update combo strategy:",e)}},eh=async e=>{let t=parseInt(e);if(!isNaN(t)&&!(t<1))try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({stickyRoundRobinLimit:t})})).ok&&N(e=>({...e,stickyRoundRobinLimit:t}))}catch(e){console.error("Failed to update sticky limit:",e)}},eb=async e=>{let t=parseInt(e);if(!isNaN(t)&&!(t<1))try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStickyRoundRobinLimit:t})})).ok&&N(e=>({...e,comboStickyRoundRobinLimit:t}))}catch(e){console.error("Failed to update combo sticky limit:",e)}},eg=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({requireLogin:e})})).ok&&N(t=>({...t,requireLogin:e}))}catch(e){console.error("Failed to update require login:",e)}},ey=(e,t)=>{F(s=>({...s,[e]:t}))},ef=async(e=E.authMode||"password")=>{let t=E.oidcIssuerUrl.trim(),s=E.oidcClientId.trim(),a=E.oidcScopes.trim(),r=E.oidcLoginLabel.trim(),o=q.trim();if("password"!==e&&(!t||!s||!o)&&!w.oidcConfigured)return void H({type:"error",message:"Issuer URL, client ID, and client secret are required to enable OIDC."});Z(!0),H({type:"",message:""}),Q({type:"",message:""});try{let i={authMode:e,oidcIssuerUrl:t,oidcClientId:s,oidcScopes:a||"openid profile email",oidcLoginLabel:r||"Sign in with OIDC"};o&&(i.oidcClientSecret=o);let l=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)}),n=await l.json();l.ok?(N(e=>({...e,...n})),F({authMode:n?.authMode||e,oidcIssuerUrl:n?.oidcIssuerUrl||t,oidcClientId:n?.oidcClientId||s,oidcScopes:n?.oidcScopes||a||"openid profile email",oidcLoginLabel:n?.oidcLoginLabel||r||"Sign in with OIDC"}),J(""),H({type:"success",message:"oidc"===e?"OIDC login enabled":"both"===e?"Password and OIDC login enabled":"OIDC settings saved"})):H({type:"error",message:n.error||"Failed to save OIDC settings"})}catch(e){H({type:"error",message:"An error occurred"})}finally{Z(!1)}},ej=async()=>{let e=E.oidcIssuerUrl.trim(),t=E.oidcClientId.trim(),s=E.oidcScopes.trim(),a=q.trim();if(!e||!t)return void Q({type:"error",message:"Issuer URL and client ID are required to test the connection."});B(!0),H({type:"",message:""}),Q({type:"",message:""});try{let r=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({authMode:E.authMode||w.authMode||"password",oidcIssuerUrl:e,oidcClientId:t,oidcScopes:s||"openid profile email",oidcLoginLabel:E.oidcLoginLabel.trim()||"Sign in with OIDC",...a?{oidcClientSecret:a}:{}})}),o=await r.json().catch(()=>({}));if(!r.ok)return void Q({type:"error",message:o.error||"Failed to save OIDC settings before testing"});let i=await fetch("/api/auth/oidc/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({issuerUrl:o.oidcIssuerUrl||e,clientId:o.oidcClientId||t,scopes:o.oidcScopes||s||"openid profile email"})}),l=await i.json().catch(()=>({}));if(i.ok&&l?.ok){let e=l.clientSecretTested?!0===l.clientSecretValid?`Connection OK. Discovery loaded from ${l.issuerUrl}. Client secret validated too.`:`Connection OK. Discovery loaded from ${l.issuerUrl}. Client secret was not checked.`:`Connection OK. Discovery loaded from ${l.issuerUrl}.`;Q({type:"success",message:e})}else Q({type:"error",message:l.error||"OIDC connection test failed"})}catch(e){Q({type:"error",message:"An error occurred"})}finally{B(!1)}},ew=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({enableObservability:e})})).ok&&N(t=>({...t,enableObservability:e}))}catch(e){console.error("Failed to update enableObservability:",e)}},eN=async()=>{try{let e=await fetch("/api/settings");if(!e.ok)return;let t=await e.json();N(t)}catch(e){console.error("Failed to reload settings:",e)}},ev=async e=>{D(!0),T({type:"",message:""});try{let t=await fetch("/api/settings/database",{headers:{"x-9r-password":e}});if(!t.ok){let e=await t.json().catch(()=>({}));throw Error(e.error||"Failed to export database")}let s=await t.json(),a=JSON.stringify(s,null,2),r=new Blob([a],{type:"application/json"}),o=URL.createObjectURL(r),i=document.createElement("a"),l=new Date().toISOString().replace(/[.:]/g,"-");i.href=o,i.download=`extremerouter-backup-${l}.json`,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(o),T({type:"success",message:"Database backup downloaded"})}catch(e){T({type:"error",message:e.message||"Failed to export database"})}finally{D(!1)}},eC=async e=>{let t=$.current;if(t){D(!0);try{let s=await t.text(),a=JSON.parse(s),r=await fetch("/api/settings/database",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...a,password:e})}),o=await r.json().catch(()=>({}));if(!r.ok)throw Error(o.error||"Failed to import database");await eN(),T({type:"success",message:"Database imported successfully"})}catch(e){T({type:"error",message:e.message||"Invalid backup file"})}finally{$.current=null,D(!1)}}},ek=async()=>{let{mode:e,password:t}=A;M({open:!1,mode:"",password:""}),"export"===e?await ev(t):"import"===e&&await eC(t)},eS=!0===w.enableObservability,eP=async()=>{j(!0);try{await fetch("/api/version/shutdown",{method:"POST"})}catch(e){}j(!1),y(!1)},eO=async()=>{try{(await fetch("/api/auth/logout",{method:"POST"})).ok&&window.location.assign("/login")}catch(e){console.error("Failed to logout:",e)}};return(0,a.jsxs)("div",{className:"mx-auto max-w-3xl",children:[(0,a.jsx)(o.zY,{title:"Settings",description:"Security, routing, network, and account preferences",icon:"settings"}),(0,a.jsxs)("div",{className:"flex flex-col gap-5",children:[(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 mb-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 sm:gap-4",children:[(0,a.jsx)("div",{className:"size-10 sm:size-12 rounded-lg bg-green-500/10 text-green-500 flex items-center justify-center shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-xl sm:text-2xl",children:"computer"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-lg sm:text-xl font-semibold",children:"Local Mode"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Running on your machine"})]})]}),(0,a.jsx)("div",{className:"inline-flex p-1 rounded-lg bg-black/5 dark:bg-white/5 w-full sm:w-auto",children:["light","dark","system"].map(s=>(0,a.jsxs)("button",{type:"button",onClick:()=>t(s),className:(0,d.cn)("flex items-center justify-center gap-1 sm:gap-1.5 px-2 sm:px-3 py-1.5 rounded-md font-medium transition-all flex-1 sm:flex-initial",e===s?"bg-white dark:bg-white/10 text-text-main shadow-sm":"text-text-muted hover:text-text-main"),children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"light"===s?"light_mode":"dark"===s?"dark_mode":"contrast"}),(0,a.jsx)("span",{className:"capitalize text-xs sm:text-sm",children:s})]},s))})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 pt-4 border-t border-border",children:[(0,a.jsx)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between p-3 rounded-lg bg-bg border border-border gap-2",children:(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Database Location"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted font-mono break-all",children:"~/.extremerouter/db/data.sqlite"})]})}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2",children:[(0,a.jsx)(o.$n,{variant:"secondary",icon:"download",onClick:()=>M({open:!0,mode:"export",password:""}),loading:R,className:"w-full sm:w-auto",children:"Download Backup"}),(0,a.jsx)(o.$n,{variant:"outline",icon:"upload",onClick:()=>ee.current?.click(),disabled:R,className:"w-full sm:w-auto",children:"Import Backup"}),(0,a.jsx)("input",{ref:ee,type:"file",accept:"application/json,.json",className:"hidden",onChange:e=>{let t=e.target.files?.[0];ee.current&&(ee.current.value=""),t&&($.current=t,T({type:"",message:""}),M({open:!0,mode:"import",password:""}))}})]}),U.message&&(0,a.jsx)("p",{className:`text-sm ${"error"===U.type?"text-red-500":"text-green-600 dark:text-green-400"}`,children:U.message})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"size-10 rounded-lg bg-blue-500/10 text-blue-500 flex items-center justify-center shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"language"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Language"})]}),(0,a.jsxs)("button",{onClick:()=>b(!0),className:"flex items-center justify-between w-full p-3 rounded-lg bg-bg border border-border hover:border-primary/50 transition-colors","data-i18n-skip":"true",children:[(0,a.jsx)("span",{className:"text-sm text-text-muted",children:"Display language"}),(0,a.jsx)("span",{className:"text-2xl",children:x.h[p]||"\uD83C\uDF10"})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-primary/10 text-primary shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"shield"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Security"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Require login"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"When ON, dashboard requires password. When OFF, access without login."})]}),(0,a.jsx)(o.lM,{checked:!0===w.requireLogin,onChange:()=>eg(!w.requireLogin),disabled:v})]}),!0===w.requireLogin&&(0,a.jsxs)("form",{onSubmit:ex,className:"flex flex-col gap-4 pt-4 border-t border-border/50",children:[w.hasPassword&&(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-xs sm:text-sm font-medium",children:"Current Password"}),(0,a.jsx)(o.pd,{type:"password",placeholder:"Enter current password",value:k.current,onChange:e=>S({...k,current:e.target.value}),required:!0})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-xs sm:text-sm font-medium",children:"New Password"}),(0,a.jsx)(o.pd,{type:"password",placeholder:"Enter new password",value:k.new,onChange:e=>S({...k,new:e.target.value}),required:!0})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-xs sm:text-sm font-medium",children:"Confirm New Password"}),(0,a.jsx)(o.pd,{type:"password",placeholder:"Confirm new password",value:k.confirm,onChange:e=>S({...k,confirm:e.target.value}),required:!0})]})]}),P.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===P.type?"text-red-500":"text-green-500"}`,children:P.message}),(0,a.jsx)("div",{className:"pt-2",children:(0,a.jsx)(o.$n,{type:"submit",variant:"primary",loading:I,className:"w-full sm:w-auto",children:w.hasPassword?"Update Password":"Set Password"})})]})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("button",{type:"button",onClick:()=>X(e=>!e),className:"w-full flex items-center gap-3 text-left",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-indigo-500/10 text-indigo-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"lock_open"})}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"OIDC Dashboard Login"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"oidc"===w.authMode?"OIDC active":"both"===w.authMode?"Password + OIDC active":"Optional SSO via Authentik/Keycloak/Google"})]}),(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted shrink-0",children:V?"expand_less":"expand_more"})]}),V&&(0,a.jsxs)("div",{className:"flex flex-col gap-4 mt-4",children:[(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Use Authentik or any OIDC provider to sign in to the dashboard. You can enable password-only, OIDC-only, or both for the dashboard; model API access still uses API keys."}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Auth Mode"}),(0,a.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-2",children:[{value:"password",title:"Password only",desc:"Keep the legacy password login."},{value:"oidc",title:"OIDC only",desc:"Require OIDC for dashboard access."},{value:"both",title:"Both",desc:"Allow either password or OIDC."}].map(e=>{let t=E.authMode===e.value;return(0,a.jsxs)("button",{type:"button",onClick:()=>ey("authMode",e.value),className:(0,d.cn)("text-left rounded-lg border p-3 transition-colors",t?"border-primary bg-primary/5":"border-border bg-bg hover:bg-black/5 dark:hover:bg-white/5"),disabled:v||K,children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:e.title}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted mt-1",children:e.desc})]},e.value)})})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Issuer URL"}),(0,a.jsx)(o.pd,{placeholder:"https://auth.example.com/application/o/extremerouter/",value:E.oidcIssuerUrl,onChange:e=>ey("oidcIssuerUrl",e.target.value),disabled:v||K})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Client ID"}),(0,a.jsx)(o.pd,{placeholder:"extremerouter-dashboard",value:E.oidcClientId,onChange:e=>ey("oidcClientId",e.target.value),disabled:v||K})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Client Secret"}),(0,a.jsx)(o.pd,{type:"password",placeholder:"Leave blank to keep existing secret",value:q,onChange:e=>J(e.target.value),disabled:v||K}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"This value is write-only after saving."})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Scopes"}),(0,a.jsx)(o.pd,{placeholder:"openid profile email",value:E.oidcScopes,onChange:e=>ey("oidcScopes",e.target.value),disabled:v||K})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Login Button Label"}),(0,a.jsx)(o.pd,{placeholder:"Sign in with OIDC",value:E.oidcLoginLabel,onChange:e=>ey("oidcLoginLabel",e.target.value),disabled:v||K})]})]}),(0,a.jsxs)("div",{className:"rounded-lg border border-border bg-bg p-3 text-xs sm:text-sm text-text-muted",children:[(0,a.jsx)("p",{className:"font-medium text-text-main mb-1",children:"Redirect URI"}),(0,a.jsx)("code",{className:"block break-all font-mono",children:Y})]}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2 pt-2 border-t border-border/50",children:[(0,a.jsx)(o.$n,{type:"button",variant:"primary",loading:K,onClick:()=>ef(),className:"w-full sm:w-auto",children:"Save auth mode"}),(0,a.jsx)(o.$n,{type:"button",variant:"outline",loading:z,onClick:ej,className:"w-full sm:w-auto",children:"Test connection"})]}),W.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===W.type?"text-red-500":"text-green-500"}`,children:W.message}),_.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===_.type?"text-red-500":"text-green-500"}`,children:_.message}),"oidc"===w.authMode&&(0,a.jsx)("p",{className:"text-xs sm:text-sm text-amber-600 dark:text-amber-400",children:"OIDC login is currently active. Password login is disabled until you switch back."}),"both"===w.authMode&&(0,a.jsx)("p",{className:"text-xs sm:text-sm text-amber-600 dark:text-amber-400",children:"Password and OIDC login are both active."})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-blue-500/10 text-blue-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"route"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Routing Strategy"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Round Robin"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Cycle through accounts to distribute load"})]}),(0,a.jsx)(o.lM,{checked:"round-robin"===w.fallbackStrategy,onChange:()=>ep("round-robin"===w.fallbackStrategy?"fill-first":"round-robin"),disabled:v})]}),"round-robin"===w.fallbackStrategy&&(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4 pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Sticky Limit"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Calls per account before switching"})]}),(0,a.jsx)(o.pd,{type:"number",min:"1",max:"10",value:w.stickyRoundRobinLimit||3,onChange:e=>eh(e.target.value),disabled:v,className:"w-16 sm:w-20 text-center shrink-0"})]}),(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4 pt-4 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Combo Round Robin"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Cycle through providers in combos instead of always starting with first"})]}),(0,a.jsx)(o.lM,{checked:"round-robin"===w.comboStrategy,onChange:()=>eu("round-robin"===w.comboStrategy?"fallback":"round-robin"),disabled:v})]}),"round-robin"===w.comboStrategy&&(0,a.jsxs)("div",{className:"flex items-center justify-between pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:"Combo Sticky Limit"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Calls per combo model before switching"})]}),(0,a.jsx)(o.pd,{type:"number",min:"1",max:"100",value:w.comboStickyRoundRobinLimit||1,onChange:e=>eb(e.target.value),disabled:v,className:"w-20 text-center"})]}),(0,a.jsxs)("p",{className:"text-xs text-text-muted italic pt-2 border-t border-border/50",children:["round-robin"===w.fallbackStrategy?`Currently distributing requests across all available accounts with ${w.stickyRoundRobinLimit||3} calls per account.`:"Currently using accounts in priority order (Fill First).","round-robin"===w.comboStrategy?` Combos rotate after ${w.comboStickyRoundRobinLimit||1} call${1===(w.comboStickyRoundRobinLimit||1)?"":"s"} per model.`:" Combos always start with their first model."]})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-purple-500/10 text-purple-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"wifi"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Network"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Outbound Proxy"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Enable proxy for OAuth + provider outbound requests."})]}),(0,a.jsx)(o.lM,{checked:!0===w.outboundProxyEnabled,onChange:()=>em(!0!==w.outboundProxyEnabled),disabled:v||eo})]}),!0===w.outboundProxyEnabled&&(0,a.jsxs)("form",{onSubmit:ed,className:"flex flex-col gap-4 pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Proxy URL"}),(0,a.jsx)(o.pd,{placeholder:"http://127.0.0.1:7897",value:et.outboundProxyUrl,onChange:e=>es(t=>({...t,outboundProxyUrl:e.target.value})),disabled:v||eo}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Leave empty to inherit existing env proxy (if any)."})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2 pt-2 border-t border-border/50",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"No Proxy"}),(0,a.jsx)(o.pd,{placeholder:"localhost,127.0.0.1",value:et.outboundNoProxy,onChange:e=>es(t=>({...t,outboundNoProxy:e.target.value})),disabled:v||eo}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Comma-separated hostnames/domains to bypass the proxy."})]}),(0,a.jsxs)("div",{className:"pt-2 border-t border-border/50 flex flex-col sm:flex-row items-stretch sm:items-center gap-2",children:[(0,a.jsx)(o.$n,{type:"button",variant:"secondary",loading:el,disabled:v||eo,onClick:ec,className:"w-full sm:w-auto",children:"Test proxy URL"}),(0,a.jsx)(o.$n,{type:"submit",variant:"primary",loading:eo,className:"w-full sm:w-auto",children:"Apply"})]})]}),ea.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===ea.type?"text-red-500":"text-green-500"} pt-2 border-t border-border/50`,children:ea.message})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-orange-500/10 text-orange-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"monitoring"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Observability"})]}),(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Enable Observability"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Record request details for inspection in the logs view"})]}),(0,a.jsx)(o.lM,{checked:eS,onChange:ew,disabled:v})]})]}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2",children:[(0,a.jsx)(o.$n,{variant:"outline",fullWidth:!0,icon:"power_settings_new",onClick:()=>y(!0),className:"text-red-500 border-red-200 hover:bg-red-50 hover:border-red-300",children:"Shutdown"}),(0,a.jsx)(o.$n,{variant:"outline",fullWidth:!0,icon:"logout",onClick:eO,children:"Logout"})]}),(0,a.jsxs)("div",{className:"text-center text-xs sm:text-sm text-text-muted py-4",children:[(0,a.jsxs)("p",{children:[c.vQ.name," v",c.vQ.version]}),(0,a.jsx)("p",{className:"mt-1",children:"Local Mode - All data stored on your machine"})]})]}),(0,a.jsx)(l.default,{hideTrigger:!0,isOpen:h,onClose:e=>{b(!1),u(e)}}),(0,a.jsx)(i.ConfirmModal,{isOpen:g,onClose:()=>y(!1),onConfirm:eP,title:"Close Proxy",message:"Are you sure you want to close the proxy server?",confirmText:"Close",cancelText:"Cancel",variant:"danger",loading:f}),(0,a.jsxs)(i.default,{isOpen:A.open,onClose:()=>M({open:!1,mode:"",password:""}),title:"Confirm Password",size:"sm",footer:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(o.$n,{variant:"ghost",onClick:()=>M({open:!1,mode:"",password:""}),disabled:R,children:"Cancel"}),(0,a.jsx)(o.$n,{variant:"primary",onClick:ek,loading:R,disabled:!A.password,children:"Confirm"})]}),children:[(0,a.jsxs)("p",{className:"text-text-muted mb-3 text-sm",children:["Enter your current password to ","export"===A.mode?"export":"import"," the database."]}),(0,a.jsx)(o.pd,{type:"password",value:A.password,onChange:e=>M(t=>({...t,password:e.target.value})),onKeyDown:e=>{"Enter"===e.key&&A.password&&ek()},placeholder:"Current password",autoFocus:!0})]})]})}},79797:(e,t,s)=>{Promise.resolve().then(s.bind(s,64561))}},e=>{e.O(0,[27,1321,705,5497,8441,3794,7358],()=>e(e.s=79797)),_N_E=e.O()}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3471],{64561:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>p});var a=s(95155),r=s(12115),o=s(35497),i=s(81127),l=s(21931),n=s(1620),d=s(31474),c=s(90620),m=s(93308),x=s(38202);function p(){let{theme:e,setTheme:t,isDark:s}=(0,n.D)(),[p,h]=(0,r.useState)("en"),[u,b]=(0,r.useState)(!1),[g,y]=(0,r.useState)(!1),[f,j]=(0,r.useState)(!1),[w,N]=(0,r.useState)({fallbackStrategy:"fill-first"}),[v,C]=(0,r.useState)(!0),[k,S]=(0,r.useState)({current:"",new:"",confirm:""}),[P,O]=(0,r.useState)({type:"",message:""}),[I,T]=(0,r.useState)(!1),[L,D]=(0,r.useState)(!1),[U,R]=(0,r.useState)({type:"",message:""}),[A,E]=(0,r.useState)({open:!1,mode:"",password:""}),M=(0,r.useRef)(null),[$,F]=(0,r.useState)({authMode:"password",oidcIssuerUrl:"",oidcClientId:"",oidcScopes:"openid profile email",oidcLoginLabel:"Sign in with OIDC"}),[J,H]=(0,r.useState)(""),[q,_]=(0,r.useState)({type:"",message:""}),[W,z]=(0,r.useState)(!1),[Z,B]=(0,r.useState)(!1),[K,G]=(0,r.useState)({type:"",message:""}),[Q,Y]=(0,r.useState)("/api/auth/oidc/callback"),[V,X]=(0,r.useState)(!1),ee=(0,r.useRef)(null),[et,es]=(0,r.useState)({outboundProxyEnabled:!1,outboundProxyUrl:"",outboundNoProxy:""}),[ea,er]=(0,r.useState)({type:"",message:""}),[eo,ei]=(0,r.useState)(!1),[el,en]=(0,r.useState)(!1);(0,r.useEffect)(()=>{h(function(){if("u"<typeof document)return"en";let e=document.cookie.split(";").find(e=>e.trim().startsWith(`${m.CL}=`)),t=e?decodeURIComponent(e.split("=")[1]):"en";return(0,m.QC)(t)}())},[u]),(0,r.useEffect)(()=>{fetch("/api/settings").then(e=>e.json()).then(e=>{N(e),F({authMode:e?.authMode||"password",oidcIssuerUrl:e?.oidcIssuerUrl||"",oidcClientId:e?.oidcClientId||"",oidcScopes:e?.oidcScopes||"openid profile email",oidcLoginLabel:e?.oidcLoginLabel||"Sign in with OIDC"}),H(""),(e?.authMode==="oidc"||e?.authMode==="both")&&X(!0),es({outboundProxyEnabled:e?.outboundProxyEnabled===!0,outboundProxyUrl:e?.outboundProxyUrl||"",outboundNoProxy:e?.outboundNoProxy||""}),C(!1)}).catch(e=>{console.error("Failed to fetch settings:",e),C(!1)})},[]),(0,r.useEffect)(()=>{Y(`${window.location.origin}/api/auth/oidc/callback`)},[]);let ed=async e=>{if(e.preventDefault(),!0===w.outboundProxyEnabled){ei(!0),er({type:"",message:""});try{let e=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({outboundProxyUrl:et.outboundProxyUrl,outboundNoProxy:et.outboundNoProxy})}),t=await e.json();e.ok?(N(e=>({...e,...t})),er({type:"success",message:"Proxy settings applied"})):er({type:"error",message:t.error||"Failed to update proxy settings"})}catch(e){er({type:"error",message:"An error occurred"})}finally{ei(!1)}}},ec=async()=>{if(!0!==w.outboundProxyEnabled)return;let e=(et.outboundProxyUrl||"").trim();if(!e)return void er({type:"error",message:"Please enter a Proxy URL to test"});en(!0),er({type:"",message:""});try{let t=await fetch("/api/settings/proxy-test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyUrl:e})}),s=await t.json();t.ok&&s?.ok?er({type:"success",message:`Proxy test OK (${s.status}) in ${s.elapsedMs}ms`}):er({type:"error",message:s?.error||"Proxy test failed"})}catch(e){er({type:"error",message:"An error occurred"})}finally{en(!1)}},em=async e=>{ei(!0),er({type:"",message:""});try{let t=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({outboundProxyEnabled:e})}),s=await t.json();t.ok?(N(e=>({...e,...s})),es(e=>({...e,outboundProxyEnabled:s?.outboundProxyEnabled===!0})),er({type:"success",message:e?"Proxy enabled":"Proxy disabled"})):er({type:"error",message:s.error||"Failed to update proxy settings"})}catch(e){er({type:"error",message:"An error occurred"})}finally{ei(!1)}},ex=async e=>{if(e.preventDefault(),k.new!==k.confirm)return void O({type:"error",message:"Passwords do not match"});T(!0),O({type:"",message:""});try{let e=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({currentPassword:k.current,newPassword:k.new})}),t=await e.json();e.ok?(O({type:"success",message:"Password updated successfully"}),S({current:"",new:"",confirm:""})):O({type:"error",message:t.error||"Failed to update password"})}catch(e){O({type:"error",message:"An error occurred"})}finally{T(!1)}},ep=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({fallbackStrategy:e})})).ok&&N(t=>({...t,fallbackStrategy:e}))}catch(e){console.error("Failed to update settings:",e)}},eh=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStrategy:e})})).ok&&N(t=>({...t,comboStrategy:e}))}catch(e){console.error("Failed to update combo strategy:",e)}},eu=async e=>{let t=parseInt(e);if(!isNaN(t)&&!(t<1))try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({stickyRoundRobinLimit:t})})).ok&&N(e=>({...e,stickyRoundRobinLimit:t}))}catch(e){console.error("Failed to update sticky limit:",e)}},eb=async e=>{let t=parseInt(e);if(!isNaN(t)&&!(t<1))try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStickyRoundRobinLimit:t})})).ok&&N(e=>({...e,comboStickyRoundRobinLimit:t}))}catch(e){console.error("Failed to update combo sticky limit:",e)}},eg=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({requireLogin:e})})).ok&&N(t=>({...t,requireLogin:e}))}catch(e){console.error("Failed to update require login:",e)}},ey=(e,t)=>{F(s=>({...s,[e]:t}))},ef=async(e=$.authMode||"password")=>{let t=$.oidcIssuerUrl.trim(),s=$.oidcClientId.trim(),a=$.oidcScopes.trim(),r=$.oidcLoginLabel.trim(),o=J.trim();if("password"!==e&&(!t||!s||!o)&&!w.oidcConfigured)return void _({type:"error",message:"Issuer URL, client ID, and client secret are required to enable OIDC."});z(!0),_({type:"",message:""}),G({type:"",message:""});try{let i={authMode:e,oidcIssuerUrl:t,oidcClientId:s,oidcScopes:a||"openid profile email",oidcLoginLabel:r||"Sign in with OIDC"};o&&(i.oidcClientSecret=o);let l=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)}),n=await l.json();l.ok?(N(e=>({...e,...n})),F({authMode:n?.authMode||e,oidcIssuerUrl:n?.oidcIssuerUrl||t,oidcClientId:n?.oidcClientId||s,oidcScopes:n?.oidcScopes||a||"openid profile email",oidcLoginLabel:n?.oidcLoginLabel||r||"Sign in with OIDC"}),H(""),_({type:"success",message:"oidc"===e?"OIDC login enabled":"both"===e?"Password and OIDC login enabled":"OIDC settings saved"})):_({type:"error",message:n.error||"Failed to save OIDC settings"})}catch(e){_({type:"error",message:"An error occurred"})}finally{z(!1)}},ej=async()=>{let e=$.oidcIssuerUrl.trim(),t=$.oidcClientId.trim(),s=$.oidcScopes.trim(),a=J.trim();if(!e||!t)return void G({type:"error",message:"Issuer URL and client ID are required to test the connection."});B(!0),_({type:"",message:""}),G({type:"",message:""});try{let r=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({authMode:$.authMode||w.authMode||"password",oidcIssuerUrl:e,oidcClientId:t,oidcScopes:s||"openid profile email",oidcLoginLabel:$.oidcLoginLabel.trim()||"Sign in with OIDC",...a?{oidcClientSecret:a}:{}})}),o=await r.json().catch(()=>({}));if(!r.ok)return void G({type:"error",message:o.error||"Failed to save OIDC settings before testing"});let i=await fetch("/api/auth/oidc/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({issuerUrl:o.oidcIssuerUrl||e,clientId:o.oidcClientId||t,scopes:o.oidcScopes||s||"openid profile email"})}),l=await i.json().catch(()=>({}));if(i.ok&&l?.ok){let e=l.clientSecretTested?!0===l.clientSecretValid?`Connection OK. Discovery loaded from ${l.issuerUrl}. Client secret validated too.`:`Connection OK. Discovery loaded from ${l.issuerUrl}. Client secret was not checked.`:`Connection OK. Discovery loaded from ${l.issuerUrl}.`;G({type:"success",message:e})}else G({type:"error",message:l.error||"OIDC connection test failed"})}catch(e){G({type:"error",message:"An error occurred"})}finally{B(!1)}},ew=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({enableObservability:e})})).ok&&N(t=>({...t,enableObservability:e}))}catch(e){console.error("Failed to update enableObservability:",e)}},eN=async()=>{try{let e=await fetch("/api/settings");if(!e.ok)return;let t=await e.json();N(t)}catch(e){console.error("Failed to reload settings:",e)}},ev=async e=>{D(!0),R({type:"",message:""});try{let t=await fetch("/api/settings/database",{headers:{"x-9r-password":e}});if(!t.ok){let e=await t.json().catch(()=>({}));throw Error(e.error||"Failed to export database")}let s=await t.json(),a=JSON.stringify(s,null,2),r=new Blob([a],{type:"application/json"}),o=URL.createObjectURL(r),i=document.createElement("a"),l=new Date().toISOString().replace(/[.:]/g,"-");i.href=o,i.download=`extremerouter-backup-${l}.json`,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(o),R({type:"success",message:"Database backup downloaded"})}catch(e){R({type:"error",message:e.message||"Failed to export database"})}finally{D(!1)}},eC=async e=>{let t=M.current;if(t){D(!0);try{let s=await t.text(),a=JSON.parse(s),r=await fetch("/api/settings/database",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...a,password:e})}),o=await r.json().catch(()=>({}));if(!r.ok)throw Error(o.error||"Failed to import database");await eN(),R({type:"success",message:"Database imported successfully"})}catch(e){R({type:"error",message:e.message||"Invalid backup file"})}finally{M.current=null,D(!1)}}},ek=async()=>{let{mode:e,password:t}=A;E({open:!1,mode:"",password:""}),"export"===e?await ev(t):"import"===e&&await eC(t)},eS=!0===w.enableObservability,eP=async()=>{j(!0);try{await fetch("/api/version/shutdown",{method:"POST"})}catch(e){}j(!1),y(!1)},eO=async()=>{try{(await fetch("/api/auth/logout",{method:"POST"})).ok&&window.location.assign("/login")}catch(e){console.error("Failed to logout:",e)}};return(0,a.jsxs)("div",{className:"mx-auto max-w-3xl",children:[(0,a.jsx)(o.zY,{title:"Settings",description:"Security, routing, network, and account preferences",icon:"settings"}),(0,a.jsxs)("div",{className:"flex flex-col gap-5",children:[(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 mb-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 sm:gap-4",children:[(0,a.jsx)("div",{className:"size-10 sm:size-12 rounded-lg bg-green-500/10 text-green-500 flex items-center justify-center shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-xl sm:text-2xl",children:"computer"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-lg sm:text-xl font-semibold",children:"Local Mode"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Running on your machine"})]})]}),(0,a.jsx)("div",{className:"inline-flex p-1 rounded-lg bg-black/5 dark:bg-white/5 w-full sm:w-auto",children:["light","dark","system"].map(s=>(0,a.jsxs)("button",{type:"button",onClick:()=>t(s),className:(0,d.cn)("flex items-center justify-center gap-1 sm:gap-1.5 px-2 sm:px-3 py-1.5 rounded-md font-medium transition-all flex-1 sm:flex-initial",e===s?"bg-white dark:bg-white/10 text-text-main shadow-sm":"text-text-muted hover:text-text-main"),children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"light"===s?"light_mode":"dark"===s?"dark_mode":"contrast"}),(0,a.jsx)("span",{className:"capitalize text-xs sm:text-sm",children:s})]},s))})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 pt-4 border-t border-border",children:[(0,a.jsx)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between p-3 rounded-lg bg-bg border border-border gap-2",children:(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Database Location"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted font-mono break-all",children:"~/.extremerouter/db/data.sqlite"})]})}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2",children:[(0,a.jsx)(o.$n,{variant:"secondary",icon:"download",onClick:()=>E({open:!0,mode:"export",password:""}),loading:L,className:"w-full sm:w-auto",children:"Download Backup"}),(0,a.jsx)(o.$n,{variant:"outline",icon:"upload",onClick:()=>ee.current?.click(),disabled:L,className:"w-full sm:w-auto",children:"Import Backup"}),(0,a.jsx)("input",{ref:ee,type:"file",accept:"application/json,.json",className:"hidden",onChange:e=>{let t=e.target.files?.[0];ee.current&&(ee.current.value=""),t&&(M.current=t,R({type:"",message:""}),E({open:!0,mode:"import",password:""}))}})]}),U.message&&(0,a.jsx)("p",{className:`text-sm ${"error"===U.type?"text-red-500":"text-green-600 dark:text-green-400"}`,children:U.message})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"size-10 rounded-lg bg-blue-500/10 text-blue-500 flex items-center justify-center shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"language"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Language"})]}),(0,a.jsxs)("button",{onClick:()=>b(!0),className:"flex items-center justify-between w-full p-3 rounded-lg bg-bg border border-border hover:border-primary/50 transition-colors","data-i18n-skip":"true",children:[(0,a.jsx)("span",{className:"text-sm text-text-muted",children:"Display language"}),(0,a.jsx)("span",{className:"text-2xl",children:x.h[p]||"\uD83C\uDF10"})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-primary/10 text-primary shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"shield"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Security"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Require login"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"When ON, dashboard requires password. When OFF, access without login."})]}),(0,a.jsx)(o.lM,{checked:!0===w.requireLogin,onChange:()=>eg(!w.requireLogin),disabled:v})]}),!0===w.requireLogin&&(0,a.jsxs)("form",{onSubmit:ex,className:"flex flex-col gap-4 pt-4 border-t border-border/50",children:[w.hasPassword&&(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-xs sm:text-sm font-medium",children:"Current Password"}),(0,a.jsx)(o.pd,{type:"password",placeholder:"Enter current password",value:k.current,onChange:e=>S({...k,current:e.target.value}),required:!0})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-xs sm:text-sm font-medium",children:"New Password"}),(0,a.jsx)(o.pd,{type:"password",placeholder:"Enter new password",value:k.new,onChange:e=>S({...k,new:e.target.value}),required:!0})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-xs sm:text-sm font-medium",children:"Confirm New Password"}),(0,a.jsx)(o.pd,{type:"password",placeholder:"Confirm new password",value:k.confirm,onChange:e=>S({...k,confirm:e.target.value}),required:!0})]})]}),P.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===P.type?"text-red-500":"text-green-500"}`,children:P.message}),(0,a.jsx)("div",{className:"pt-2",children:(0,a.jsx)(o.$n,{type:"submit",variant:"primary",loading:I,className:"w-full sm:w-auto",children:w.hasPassword?"Update Password":"Set Password"})})]})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("button",{type:"button",onClick:()=>X(e=>!e),className:"w-full flex items-center gap-3 text-left",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-indigo-500/10 text-indigo-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"lock_open"})}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"OIDC Dashboard Login"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"oidc"===w.authMode?"OIDC active":"both"===w.authMode?"Password + OIDC active":"Optional SSO via Authentik/Keycloak/Google"})]}),(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted shrink-0",children:V?"expand_less":"expand_more"})]}),V&&(0,a.jsxs)("div",{className:"flex flex-col gap-4 mt-4",children:[(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Use Authentik or any OIDC provider to sign in to the dashboard. You can enable password-only, OIDC-only, or both for the dashboard; model API access still uses API keys."}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Auth Mode"}),(0,a.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-2",children:[{value:"password",title:"Password only",desc:"Keep the legacy password login."},{value:"oidc",title:"OIDC only",desc:"Require OIDC for dashboard access."},{value:"both",title:"Both",desc:"Allow either password or OIDC."}].map(e=>{let t=$.authMode===e.value;return(0,a.jsxs)("button",{type:"button",onClick:()=>ey("authMode",e.value),className:(0,d.cn)("text-left rounded-lg border p-3 transition-colors",t?"border-primary bg-primary/5":"border-border bg-bg hover:bg-black/5 dark:hover:bg-white/5"),disabled:v||W,children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:e.title}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted mt-1",children:e.desc})]},e.value)})})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Issuer URL"}),(0,a.jsx)(o.pd,{placeholder:"https://auth.example.com/application/o/extremerouter/",value:$.oidcIssuerUrl,onChange:e=>ey("oidcIssuerUrl",e.target.value),disabled:v||W})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Client ID"}),(0,a.jsx)(o.pd,{placeholder:"extremerouter-dashboard",value:$.oidcClientId,onChange:e=>ey("oidcClientId",e.target.value),disabled:v||W})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Client Secret"}),(0,a.jsx)(o.pd,{type:"password",placeholder:"Leave blank to keep existing secret",value:J,onChange:e=>H(e.target.value),disabled:v||W}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"This value is write-only after saving."})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Scopes"}),(0,a.jsx)(o.pd,{placeholder:"openid profile email",value:$.oidcScopes,onChange:e=>ey("oidcScopes",e.target.value),disabled:v||W})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Login Button Label"}),(0,a.jsx)(o.pd,{placeholder:"Sign in with OIDC",value:$.oidcLoginLabel,onChange:e=>ey("oidcLoginLabel",e.target.value),disabled:v||W})]})]}),(0,a.jsxs)("div",{className:"rounded-lg border border-border bg-bg p-3 text-xs sm:text-sm text-text-muted",children:[(0,a.jsx)("p",{className:"font-medium text-text-main mb-1",children:"Redirect URI"}),(0,a.jsx)("code",{className:"block break-all font-mono",children:Q})]}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2 pt-2 border-t border-border/50",children:[(0,a.jsx)(o.$n,{type:"button",variant:"primary",loading:W,onClick:()=>ef(),className:"w-full sm:w-auto",children:"Save auth mode"}),(0,a.jsx)(o.$n,{type:"button",variant:"outline",loading:Z,onClick:ej,className:"w-full sm:w-auto",children:"Test connection"})]}),K.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===K.type?"text-red-500":"text-green-500"}`,children:K.message}),q.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===q.type?"text-red-500":"text-green-500"}`,children:q.message}),"oidc"===w.authMode&&(0,a.jsx)("p",{className:"text-xs sm:text-sm text-amber-600 dark:text-amber-400",children:"OIDC login is currently active. Password login is disabled until you switch back."}),"both"===w.authMode&&(0,a.jsx)("p",{className:"text-xs sm:text-sm text-amber-600 dark:text-amber-400",children:"Password and OIDC login are both active."})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-blue-500/10 text-blue-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"route"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Routing Strategy"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Round Robin"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Cycle through accounts to distribute load"})]}),(0,a.jsx)(o.lM,{checked:"round-robin"===w.fallbackStrategy,onChange:()=>ep("round-robin"===w.fallbackStrategy?"fill-first":"round-robin"),disabled:v})]}),"round-robin"===w.fallbackStrategy&&(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4 pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Sticky Limit"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Calls per account before switching"})]}),(0,a.jsx)(o.pd,{type:"number",min:"1",max:"10",value:w.stickyRoundRobinLimit||3,onChange:e=>eu(e.target.value),disabled:v,className:"w-16 sm:w-20 text-center shrink-0"})]}),(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4 pt-4 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Combo Round Robin"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Cycle through providers in combos instead of always starting with first"})]}),(0,a.jsx)(o.lM,{checked:"round-robin"===w.comboStrategy,onChange:()=>eh("round-robin"===w.comboStrategy?"fallback":"round-robin"),disabled:v})]}),"round-robin"===w.comboStrategy&&(0,a.jsxs)("div",{className:"flex items-center justify-between pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:"Combo Sticky Limit"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Calls per combo model before switching"})]}),(0,a.jsx)(o.pd,{type:"number",min:"1",max:"100",value:w.comboStickyRoundRobinLimit||1,onChange:e=>eb(e.target.value),disabled:v,className:"w-20 text-center"})]}),(0,a.jsxs)("p",{className:"text-xs text-text-muted italic pt-2 border-t border-border/50",children:["round-robin"===w.fallbackStrategy?`Currently distributing requests across all available accounts with ${w.stickyRoundRobinLimit||3} calls per account.`:"Currently using accounts in priority order (Fill First).","round-robin"===w.comboStrategy?` Combos rotate after ${w.comboStickyRoundRobinLimit||1} call${1===(w.comboStickyRoundRobinLimit||1)?"":"s"} per model.`:" Combos always start with their first model."]})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-purple-500/10 text-purple-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"wifi"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Network"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Outbound Proxy"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Enable proxy for OAuth + provider outbound requests."})]}),(0,a.jsx)(o.lM,{checked:!0===w.outboundProxyEnabled,onChange:()=>em(!0!==w.outboundProxyEnabled),disabled:v||eo})]}),!0===w.outboundProxyEnabled&&(0,a.jsxs)("form",{onSubmit:ed,className:"flex flex-col gap-4 pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Proxy URL"}),(0,a.jsx)(o.pd,{placeholder:"http://127.0.0.1:7897",value:et.outboundProxyUrl,onChange:e=>es(t=>({...t,outboundProxyUrl:e.target.value})),disabled:v||eo}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Leave empty to inherit existing env proxy (if any)."})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2 pt-2 border-t border-border/50",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"No Proxy"}),(0,a.jsx)(o.pd,{placeholder:"localhost,127.0.0.1",value:et.outboundNoProxy,onChange:e=>es(t=>({...t,outboundNoProxy:e.target.value})),disabled:v||eo}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Comma-separated hostnames/domains to bypass the proxy."})]}),(0,a.jsxs)("div",{className:"pt-2 border-t border-border/50 flex flex-col sm:flex-row items-stretch sm:items-center gap-2",children:[(0,a.jsx)(o.$n,{type:"button",variant:"secondary",loading:el,disabled:v||eo,onClick:ec,className:"w-full sm:w-auto",children:"Test proxy URL"}),(0,a.jsx)(o.$n,{type:"submit",variant:"primary",loading:eo,className:"w-full sm:w-auto",children:"Apply"})]})]}),ea.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===ea.type?"text-red-500":"text-green-500"} pt-2 border-t border-border/50`,children:ea.message})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-orange-500/10 text-orange-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"monitoring"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Observability"})]}),(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Enable Observability"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Record request details for inspection in the logs view"})]}),(0,a.jsx)(o.lM,{checked:eS,onChange:ew,disabled:v})]})]}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2",children:[(0,a.jsx)(o.$n,{variant:"outline",fullWidth:!0,icon:"power_settings_new",onClick:()=>y(!0),className:"text-red-500 border-red-200 hover:bg-red-50 hover:border-red-300",children:"Shutdown"}),(0,a.jsx)(o.$n,{variant:"outline",fullWidth:!0,icon:"logout",onClick:eO,children:"Logout"})]}),(0,a.jsxs)("div",{className:"text-center text-xs sm:text-sm text-text-muted py-4",children:[(0,a.jsxs)("p",{children:[c.vQ.name," v",c.vQ.version]}),(0,a.jsx)("p",{className:"mt-1",children:"Local Mode - All data stored on your machine"})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold text-text-main",children:"Webhook Alerts"}),(0,a.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:"Get notified when providers go down, get rate-limited, or health degrades."})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)(o.lM,{checked:!0===w.webhookEnabled,onChange:async e=>{try{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({webhookEnabled:e})}),N(t=>({...t,webhookEnabled:e}))}catch{}},label:"Enable Webhook Alerts"}),!0===w.webhookEnabled&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(o.pd,{label:"Discord Webhook URL",type:"text",value:w.webhookDiscordUrl||"",onChange:async e=>{let t=e.target.value;N(e=>({...e,webhookDiscordUrl:t}));try{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({webhookDiscordUrl:t})})}catch{}},placeholder:"https://discord.com/api/webhooks/...",className:"flex-1"}),(0,a.jsxs)("div",{className:"flex gap-3",children:[(0,a.jsx)(o.pd,{label:"Telegram Bot Token",type:"password",value:w.webhookTelegramToken||"",onChange:async e=>{let t=e.target.value;N(e=>({...e,webhookTelegramToken:t}));try{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({webhookTelegramToken:t})})}catch{}},placeholder:"123456:ABC-DEF...",className:"flex-1"}),(0,a.jsx)(o.pd,{label:"Telegram Chat ID",type:"text",value:w.webhookTelegramChatId||"",onChange:async e=>{let t=e.target.value;N(e=>({...e,webhookTelegramChatId:t}));try{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({webhookTelegramChatId:t})})}catch{}},placeholder:"-1001234567890",className:"flex-1"})]}),(0,a.jsx)(o.pd,{label:"Generic Webhook URL",type:"text",value:w.webhookGenericUrl||"",onChange:async e=>{let t=e.target.value;N(e=>({...e,webhookGenericUrl:t}));try{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({webhookGenericUrl:t})})}catch{}},placeholder:"https://your-server.com/webhook",className:"flex-1"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-3",children:[{key:"providerDown",label:"Provider Down"},{key:"rateLimited",label:"Rate Limited"},{key:"healthDegraded",label:"Health Degraded"}].map(e=>(0,a.jsx)(o.lM,{size:"sm",checked:w.webhookAlertEvents?.[e.key]===!0,onChange:async t=>{let s={...w.webhookAlertEvents,[e.key]:t};N(e=>({...e,webhookAlertEvents:s}));try{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({webhookAlertEvents:s})})}catch{}},label:e.label},e.key))}),(0,a.jsx)(o.$n,{size:"sm",variant:"secondary",icon:"send",onClick:async()=>{try{let e=await fetch("/api/alerts/test",{method:"POST"});(await e.json()).success?alert("Test alert sent! Check your configured channels."):alert("Failed to send test alert.")}catch{alert("Failed to send test alert.")}},children:"Send Test Alert"})]})]})]}),(0,a.jsx)(l.default,{hideTrigger:!0,isOpen:u,onClose:e=>{b(!1),h(e)}}),(0,a.jsx)(i.ConfirmModal,{isOpen:g,onClose:()=>y(!1),onConfirm:eP,title:"Close Proxy",message:"Are you sure you want to close the proxy server?",confirmText:"Close",cancelText:"Cancel",variant:"danger",loading:f}),(0,a.jsxs)(i.default,{isOpen:A.open,onClose:()=>E({open:!1,mode:"",password:""}),title:"Confirm Password",size:"sm",footer:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(o.$n,{variant:"ghost",onClick:()=>E({open:!1,mode:"",password:""}),disabled:L,children:"Cancel"}),(0,a.jsx)(o.$n,{variant:"primary",onClick:ek,loading:L,disabled:!A.password,children:"Confirm"})]}),children:[(0,a.jsxs)("p",{className:"text-text-muted mb-3 text-sm",children:["Enter your current password to ","export"===A.mode?"export":"import"," the database."]}),(0,a.jsx)(o.pd,{type:"password",value:A.password,onChange:e=>E(t=>({...t,password:e.target.value})),onKeyDown:e=>{"Enter"===e.key&&A.password&&ek()},placeholder:"Current password",autoFocus:!0})]})]})}},79797:(e,t,s)=>{Promise.resolve().then(s.bind(s,64561))}},e=>{e.O(0,[27,1321,705,5497,8441,3794,7358],()=>e(e.s=79797)),_N_E=e.O()}]);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2134],{70217:(e,t,s)=>{"use strict";function a(e,t){return!1===e?"default":"active"===t||"success"===t?"success":"error"===t||"expired"===t||"unavailable"===t?"error":"default"}s.d(t,{g:()=>a})},88845:(e,t,s)=>{Promise.resolve().then(s.bind(s,94127))},94127:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>D});var a=s(95155),i=s(12115),l=s(73321),r=s(98500),n=s.n(r),o=s(5772),d=s(35497),c=s(88105),m=s(28777),p=s(11059),x=s(53593),u=s(73006);let h=new Map;async function f(e){if(!e?.url||!e?.type)return[];let t=h.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 a=(await s.json()).data??[];return h.set(e.url,{data:a,expiresAt:Date.now()+6e5}),a}catch{return[]}}function g({customModels:e=[],modelAliases:t={},providerAlias:s,builtInModels:a=[],type:i="llm",includeLegacyAliases:l=!0}){let r=new Set(a.map(e=>e.id)),n=new Set,o=[];for(let t of e){if(!t?.id||t.providerAlias!==s)continue;let e=t?.kind||t?.type||"llm";if(i&&e!==i||r.has(t.id))continue;let a=`${s}/${t.id}`;n.has(a)||(n.add(a),o.push({id:t.id,name:t.name||t.id,fullModel:a,source:"custom",type:e}))}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||r.has(t)||n.has(s)||(n.add(s),o.push({id:t,alias:e,fullModel:s,source:"legacyAlias",type:i||"llm"}))}return o}var y=s(14051),b=s.n(y);function v({model:e,fullModel:t,alias:s,copied:i,onCopy:l,testStatus:r,isCustom:n,isFree:o,onDeleteAlias:c,onTest:m,isTesting:p,onDisable:x,caps:u}){let h="ok"===r?"#22c55e":"error"===r?"#ef4444":void 0;return(0,a.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,a.jsxs)("div",{className:"flex min-w-0 items-start gap-2 sm:items-center",children:[(0,a.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base",style:h?{color:h}:void 0,children:"ok"===r?"check_circle":"error"===r?"cancel":"smart_toy"}),(0,a.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[(0,a.jsx)("code",{className:"max-w-[72vw] truncate rounded bg-sidebar px-1.5 py-0.5 font-mono text-xs text-text-muted sm:max-w-[360px]",children:t}),(0,a.jsxs)("span",{className:"flex min-w-0 items-center text-[9px] gap-1 pl-1",children:[e.name&&(0,a.jsx)("span",{className:"truncate text-[9px] italic text-text-muted/70",children:e.name}),(0,a.jsx)(d.nh,{caps:u,colorOverride:"text-text-muted/70",size:12})]})]}),m&&(0,a.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,a.jsx)("button",{onClick:m,disabled:p,className:`rounded p-0.5 text-text-muted transition-opacity hover:bg-sidebar hover:text-primary ${p?"opacity-100":"opacity-100 sm:opacity-0 sm:group-hover:opacity-100"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",style:p?{animation:"spin 1s linear infinite"}:void 0,children:p?"progress_activity":"science"})}),(0,a.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:p?"Testing...":"Test"})]}),(0,a.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,a.jsx)("button",{onClick:()=>l(t,`model-${e.id}`),className:"rounded p-0.5 text-text-muted hover:bg-sidebar hover:text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:i===`model-${e.id}`?"check":"content_copy"})}),(0,a.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:i===`model-${e.id}`?"Copied!":"Copy"})]}),n?(0,a.jsx)("button",{onClick:c,className:"ml-auto rounded p-0.5 text-text-muted opacity-100 transition-opacity hover:bg-red-500/10 hover:text-red-500 sm:opacity-0 sm:group-hover:opacity-100",title:"Remove custom model",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):x?(0,a.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,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):null]})})}function j({modelId:e,fullModel:t,copied:s,onCopy:i,onDeleteAlias:l,onTest:r,testStatus:n,isTesting:o}){let d="ok"===n?"#22c55e":"error"===n?"#ef4444":void 0;return(0,a.jsxs)("div",{className:`flex items-center gap-3 p-3 rounded-lg border ${"ok"===n?"border-green-500/40":"error"===n?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted",style:d?{color:d}:void 0,children:"ok"===n?"check_circle":"error"===n?"cancel":"smart_toy"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium truncate",children:e}),(0,a.jsxs)("div",{className:"flex items-center gap-1 mt-1",children:[(0,a.jsx)("code",{className:"text-xs text-text-muted font-mono bg-sidebar px-1.5 py-0.5 rounded",children:t}),(0,a.jsxs)("div",{className:"relative group/btn",children:[(0,a.jsx)("button",{onClick:()=>i(t,`model-${e}`),className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:s===`model-${e}`?"check":"content_copy"})}),(0,a.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"})]}),r&&(0,a.jsxs)("div",{className:"relative group/btn",children:[(0,a.jsx)("button",{onClick:r,disabled:o,className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",style:o?{animation:"spin 1s linear infinite"}:void 0,children:o?"progress_activity":"science"})}),(0,a.jsx)("span",{className:"pointer-events-none absolute top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:o?"Testing...":"Test"})]})]})]}),(0,a.jsx)("button",{onClick:l,className:"p-1 hover:bg-red-50 rounded text-red-500",title:"Remove model",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"delete"})})]})}function w({providerStorageAlias:e,providerDisplayAlias:t,modelAliases:s,customModels:l,copied:r,onCopy:n,onDeleteAlias:o,onAddCustomModel:c,onDeleteCustomModel:m,connections:p,isAnthropic:x}){let[u,h]=(0,i.useState)(""),[f,y]=(0,i.useState)(!1),[b,v]=(0,i.useState)(!1),[N,k]=(0,i.useState)(null),[C,S]=(0,i.useState)({}),A=async t=>{if(!N){k(t);try{let s=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${e}/${t}`})}),a=await s.json();S(e=>({...e,[t]:a.ok?"ok":"error"}))}catch{S(e=>({...e,[t]:"error"}))}finally{k(null)}}},$=g({customModels:l,modelAliases:s,providerAlias:e,type:"llm"}),T=async()=>{if(!u.trim()||f)return;let e=u.trim();if($.some(t=>t.id===e))return void alert("Model already exists for this provider.");y(!0);try{await c(e),h("")}catch(e){console.log("Error adding model:",e)}finally{y(!1)}},O=async()=>{if(b)return;let e=p.find(e=>!1!==e.isActive);if(e){v(!0);try{let t=await fetch(`/api/providers/${e.id}/models`),s=await t.json();if(!t.ok)return void alert(s.error||"Failed to import models");let a=s.models||[];if(0===a.length)return void alert("No models returned from /models.");let i=0;for(let e of a){let t=e.id||e.name||e.model;t&&($.some(e=>e.id===t)||(await c(t),i+=1))}0===i&&alert("No new models were added.")}catch(e){console.log("Error importing models:",e)}finally{v(!1)}}},P=p.some(e=>!1!==e.isActive);return(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("p",{className:"text-sm text-text-muted",children:["Add ",x?"Anthropic":"OpenAI","-compatible models manually or import them from the /models endpoint."]}),(0,a.jsxs)("div",{className:"flex items-end gap-2 flex-wrap",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-[240px]",children:[(0,a.jsx)("label",{htmlFor:"new-compatible-model-input",className:"text-xs text-text-muted mb-1 block",children:"Model ID"}),(0,a.jsx)("input",{id:"new-compatible-model-input",type:"text",value:u,onChange:e=>h(e.target.value),onKeyDown:e=>"Enter"===e.key&&T(),placeholder:x?"claude-3-opus-20240229":"gpt-4o",className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})]}),(0,a.jsx)(d.$n,{size:"sm",icon:"add",onClick:T,disabled:!u.trim()||f,children:f?"Adding...":"Add"}),(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"download",onClick:O,disabled:!P||b,children:b?"Importing...":"Import from /models"})]}),!P&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Add a connection to enable importing models."}),$.length>0&&(0,a.jsx)("div",{className:"flex flex-col gap-3",children:$.map(({id:s,alias:i,source:l})=>(0,a.jsx)(j,{modelId:s,fullModel:`${t}/${s}`,copied:r,onCopy:n,onDeleteAlias:()=>"custom"===l?m(s):o(i),onTest:p.length>0?()=>A(s):void 0,testStatus:C[s],isTesting:N===s},`${l}-${e}/${s}`))})]})}v.propTypes={model:b().shape({id:b().string.isRequired}).isRequired,fullModel:b().string.isRequired,alias:b().string,copied:b().string,onCopy:b().func.isRequired,testStatus:b().oneOf(["ok","error"]),isCustom:b().bool,isFree:b().bool,onDeleteAlias:b().func,onTest:b().func,isTesting:b().bool,onDisable:b().func,caps:b().object},b().string.isRequired,b().string.isRequired,b().string,b().func.isRequired,b().func.isRequired,b().func,b().oneOf(["ok","error"]),b().bool,b().string.isRequired,b().object.isRequired,b().arrayOf(b().object),b().string,b().func.isRequired,b().func.isRequired,b().func.isRequired,b().func.isRequired,w.propTypes={providerStorageAlias:b().string.isRequired,providerDisplayAlias:b().string.isRequired,modelAliases:b().object.isRequired,customModels:b().arrayOf(b().object),copied:b().string,onCopy:b().func.isRequired,onDeleteAlias:b().func.isRequired,onAddCustomModel:b().func.isRequired,onDeleteCustomModel:b().func.isRequired,connections:b().arrayOf(b().shape({id:b().string,isActive:b().bool})).isRequired,isAnthropic:b().bool};var N=s(70217);function k({until:e}){let[t,s]=(0,i.useState)("");return((0,i.useEffect)(()=>{let t=()=>{let t=new Date(e).getTime()-Date.now();if(t<=0)return void s("");let a=Math.floor(t/1e3);if(a<60)s(`${a}s`);else if(a<3600)s(`${Math.floor(a/60)}m ${a%60}s`);else{let e=Math.floor(a/3600),t=Math.floor(a%3600/60);s(`${e}h ${t}m`)}};t();let a=setInterval(t,1e3);return()=>clearInterval(a)},[e]),t)?(0,a.jsxs)("span",{className:"text-xs text-orange-500 font-mono",children:["⏱ ",t]}):null}function C({connection:e,proxyPools:t,isOAuth:s,isFirst:l,isLast:r,onMoveUp:n,onMoveDown:o,onToggleActive:c,onUpdateProxy:m,onEdit:p,onDelete:x,oneByOneStatus:u=null,autoPing:h=null}){let[f,g]=(0,i.useState)(!1),[y,b]=(0,i.useState)(!1),v=(0,i.useRef)(null),j=new Map((t||[]).map(e=>[e.id,e])),w=e.providerSpecificData?.proxyPoolId||null,S=w?j.get(w):null,A=e.providerSpecificData?.connectionProxyEnabled===!0&&!!e.providerSpecificData?.connectionProxyUrl,$=!!w||A,T=S?`Pool: ${S.name}`:w?`Pool: ${w} (inactive/missing)`:A?`Legacy: ${e.providerSpecificData?.connectionProxyUrl}`:"",O=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.",P="";if(S?.proxyUrl||e.providerSpecificData?.connectionProxyUrl){let t=S?.proxyUrl||e.providerSpecificData?.connectionProxyUrl;try{let e=new URL(t);P=`${e.protocol}//${e.hostname}${e.port?`:${e.port}`:""}`}catch{P=t}}let E=S?.noProxy||e.providerSpecificData?.connectionNoProxy||"",I="default";S?.isActive===!0?I="success":(w||A)&&(I="error"),(0,i.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 m("__none__"===e?null:e)}finally{b(!1),g(!1)}},D=e.authType||(s?"oauth":"apikey"),_="oauth"===D,U="cookie"===D,z=e.name?.trim()||e.email?.trim()||e.displayName?.trim()||(_?"OAuth Account":U?"Cookie Account":"API Key"),q=e.name?.trim()&&e.email?.trim()&&e.name.trim()!==e.email.trim()?e.email.trim():e.name?.trim()&&e.displayName?.trim()&&e.name.trim()!==e.displayName.trim()?e.displayName.trim():null,[M,L]=(0,i.useState)(!1),K=Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>e).filter(e=>!!e).sort()[0]||null;(0,i.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=K?setInterval(t,1e3):null;return()=>{s&&clearInterval(s)}},[K]);let F="unavailable"!==e.testStatus||M?e.testStatus:"active",J=()=>u?"queued"===u.state?"queued":"testing"===u.state?"testing":"success"===u.state?"success":"failed"===u.state?u.error?`failed: ${u.error}`:"failed":null:null;return(0,a.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,a.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-2 sm:items-center sm:gap-3",children:[(0,a.jsxs)("div",{className:"flex shrink-0 flex-col",children:[(0,a.jsx)("button",{onClick:n,disabled:l,className:`p-0.5 rounded ${l?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_up"})}),(0,a.jsx)("button",{onClick:o,disabled:r,className:`p-0.5 rounded ${r?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_down"})})]}),(0,a.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base text-text-muted",children:U?"cookie":_?"lock":"key"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium truncate",children:z}),q&&(0,a.jsx)("p",{className:"text-xs text-text-muted truncate",children:q}),(0,a.jsxs)("div",{className:"mt-1 flex min-w-0 flex-wrap items-center gap-1.5 sm:gap-2",children:[(0,a.jsx)(d.Ex,{variant:(0,N.g)(e.isActive,F),size:"sm",dot:!0,children:!1===e.isActive?"disabled":F||"Unknown"}),(0,a.jsx)(d.Ex,{variant:"default",size:"sm",children:_?"OAuth":U?"Cookie":"API Key"}),$&&(0,a.jsx)(d.Ex,{variant:I,size:"sm",children:"Proxy"}),M&&!1!==e.isActive&&(0,a.jsx)(k,{until:K}),e.lastError&&!1!==e.isActive&&(0,a.jsx)("span",{className:"max-w-full truncate text-xs text-red-500 sm:max-w-[300px]",title:e.lastError,children:e.lastError}),(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["#",e.priority]}),e.globalPriority&&(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["Auto: ",e.globalPriority]}),J()&&(0,a.jsx)(d.Ex,{variant:u?"success"===u.state?"success":"failed"===u.state?"error":"testing"===u.state?"primary":"default":"default",size:"sm",children:J()})]}),$&&(0,a.jsxs)("div",{className:"mt-1 flex items-center gap-2 flex-wrap",children:[(0,a.jsx)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[420px]",title:T,children:T}),P&&(0,a.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:P}),E&&(0,a.jsxs)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[320px]",title:E,children:["no_proxy: ",E]})]})]})]}),(0,a.jsxs)("div",{className:"flex w-full items-center justify-between gap-2 sm:w-auto sm:justify-end",children:[(0,a.jsxs)("div",{className:"grid flex-1 grid-cols-3 gap-1 sm:flex sm:flex-none",children:[(t||[]).length>0&&(0,a.jsxs)("div",{className:"relative",ref:v,children:[(0,a.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 ${$?"text-primary":"text-text-muted hover:text-primary"}`,disabled:y,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:y?"progress_activity":"lan"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Proxy"})]}),f&&(0,a.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,a.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 ${!w?"text-primary font-medium":"text-text-main"}`,children:"None"}),(t||[]).map(e=>(0,a.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 ${w===e.id?"text-primary font-medium":"text-text-main"}`,children:e.name},e.id))]})]}),h&&(0,a.jsx)(d.m_,{text:O,children:(0,a.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,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"bolt"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Auto-ping"})]})}),(0,a.jsxs)("button",{onClick:p,className:"flex flex-col items-center rounded px-2 py-1 text-text-muted hover:bg-black/5 hover:text-primary dark:hover:bg-white/5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,a.jsxs)("button",{onClick:x,className:"flex flex-col items-center rounded px-2 py-1 text-red-500 hover:bg-red-500/10",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]}),(0,a.jsx)(d.lM,{size:"sm",checked:e.isActive??!0,onChange:c,title:e.isActive??!0?"Disable connection":"Enable connection"})]})]})}k.propTypes={until:b().string.isRequired},C.propTypes={connection:b().shape({id:b().string,name:b().string,email:b().string,displayName:b().string,modelLockUntil:b().string,testStatus:b().string,isActive:b().bool,lastError:b().string,priority:b().number,globalPriority:b().number}).isRequired,proxyPools:b().arrayOf(b().shape({id:b().string,name:b().string,proxyUrl:b().string,noProxy:b().string,isActive:b().bool})),isOAuth:b().bool.isRequired,isFirst:b().bool.isRequired,isLast:b().bool.isRequired,onMoveUp:b().func.isRequired,onMoveDown:b().func.isRequired,onToggleActive:b().func.isRequired,onUpdateProxy:b().func,onEdit:b().func.isRequired,onDelete:b().func.isRequired,oneByOneStatus:b().shape({state:b().string,error:b().string}),autoPing:b().shape({on:b().bool,onToggle:b().func,provider:b().string})};let S=`name1|sk-key1
|
|
2
|
+
name2|sk-key2
|
|
3
|
+
sk-key-only-auto-named`;function A({isOpen:e,provider:t,providerName:s,isCompatible:l,isAnthropic:r,authType:n,authHint:o,website:m,proxyPools:p,error:x,onSave:u,onBulkDone:h,onClose:f}){let g="__none__",y="ollama-local"===t,b="cookie"===n,v="xai"===t&&!b,j=b?"Cookie Value":"API Key",w=b?"grok-web"===t?"sso=xxxxx... or just the raw value":"chatglm-cn"===t?"Paste your full chatglm.cn cookies, or just the chatglm_refresh_token value (eyJhbGc...)":"eyJhbGciOi...":v?"xai-...":"",N="azure"===t,k="cloudflare-ai"===t,C=c.Q2?.[t]?.regions||null,$=c.Q2?.[t]?.defaultRegion||C?.[0]?.id||"",[T,O]=(0,i.useState)({name:"",apiKey:"",defaultModel:"",priority:1,proxyPoolId:g,ollamaHostUrl:""}),[P,E]=(0,i.useState)({azureEndpoint:"",apiVersion:"2024-10-01-preview",deployment:"",organization:""}),[I,R]=(0,i.useState)({accountId:""}),[D,_]=(0,i.useState)($),[U,z]=(0,i.useState)(!1),[q,M]=(0,i.useState)(null),[L,K]=(0,i.useState)(!1),[F,J]=(0,i.useState)("single"),[W,B]=(0,i.useState)(""),[H,G]=(0,i.useState)(null),V=()=>y&&T.ollamaHostUrl.trim()?{baseUrl:T.ollamaHostUrl.trim()}:N?{azureEndpoint:P.azureEndpoint,apiVersion:P.apiVersion,deployment:P.deployment,organization:P.organization}:k?{accountId:I.accountId}:C&&D?{region:D}:void 0,Q=async()=>{z(!0);try{let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:T.apiKey,providerSpecificData:V()})}),s=await e.json();M(s.valid?"success":"failed")}catch{M("failed")}finally{z(!1)}},Z=async()=>{if(t&&(y||T.apiKey)&&(y||T.name)&&(!l||T.defaultModel.trim())){K(!0);try{let e=!1;try{z(!0),M(null);let s=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:T.apiKey,providerSpecificData:V()})});e=!!(await s.json()).valid,M(e?"success":"failed")}catch{M("failed")}finally{z(!1)}await u({name:T.name||(y?"Ollama Local":""),apiKey:T.apiKey,defaultModel:l?T.defaultModel.trim():void 0,priority:T.priority,proxyPoolId:T.proxyPoolId===g?null:T.proxyPoolId,testStatus:e?"active":"unknown",providerSpecificData:V()})}finally{K(!1)}}},X=async()=>{let e=W.split("\n").map(e=>e.trim()).filter(Boolean);if(!e.length)return;K(!0),G(null);let s=0,a=0;for(let i=0;i<e.length;i++){let l=e[i].split("|"),r=l.length>=2?l.slice(1).join("|").trim():l[0].trim(),n=l.length>=2?l[0].trim():"Key",o=`${n} ${i+1}`;try{(await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:r,name:o,priority:1,testStatus:"unknown"})})).ok?s++:a++}catch{a++}}K(!1),G({success:s,failed:a}),s>0&&h&&h()};return t?(0,a.jsx)(d.aF,{isOpen:e,title:`Add ${s||t} ${j}`,onClose:f,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{size:"sm",variant:"single"===F?"primary":"ghost",onClick:()=>{J("single"),G(null)},children:"Single"}),(0,a.jsx)(d.$n,{size:"sm",variant:"bulk"===F?"primary":"ghost",onClick:()=>{J("bulk"),G(null)},children:"Bulk Add"})]}),"bulk"===F&&(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["One key per line. Format: ",(0,a.jsx)("code",{children:"name|apiKey"})," or just ",(0,a.jsx)("code",{children:"apiKey"})," (auto-named by index)."]}),(0,a.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:S,value:W,onChange:e=>B(e.target.value)}),H&&(0,a.jsxs)("div",{className:`text-sm font-medium ${H.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",H.success," added",H.failed>0?`, ✗ ${H.failed} failed`:""]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{onClick:X,fullWidth:!0,disabled:L||!W.trim(),children:L?"Adding...":"Add All Keys"}),(0,a.jsx)(d.$n,{onClick:f,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),"single"===F&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.pd,{label:"Name",value:T.name,onChange:e=>O({...T,name:e.target.value}),placeholder:y?"Ollama Local":"Production Key"}),y&&(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.pd,{label:"Ollama Host URL",value:T.ollamaHostUrl,onChange:e=>O({...T,ollamaHostUrl:e.target.value}),placeholder:"http://localhost:11434",className:"flex-1"}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(d.$n,{onClick:Q,disabled:U||L,variant:"secondary",children:U?"Checking...":"Check"})})]}),!y&&(0,a.jsxs)("div",{className:"flex gap-2",children:[b?(0,a.jsxs)("div",{className:"flex-1 flex flex-col gap-1",children:[(0,a.jsx)("label",{className:"text-xs font-medium text-text-muted",children:j}),(0,a.jsx)("textarea",{value:T.apiKey,onChange:e=>O({...T,apiKey:e.target.value}),placeholder:w,rows:5,spellCheck:!1,autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",className:"w-full rounded-lg border border-border bg-input px-3 py-2 text-sm text-text-main placeholder:text-text-muted focus:border-primary focus:outline-none focus:ring-1 focus:ring-primary font-mono resize-y"})]}):(0,a.jsx)(d.pd,{label:j,type:"password",value:T.apiKey,onChange:e=>O({...T,apiKey:e.target.value}),placeholder:w,className:"flex-1"}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(d.$n,{onClick:Q,disabled:!T.apiKey||U||L,variant:"secondary",children:U?"Checking...":"Check"})})]}),v&&(0,a.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."}),b&&o&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:[o,m&&(0,a.jsxs)(a.Fragment,{children:[" ",(0,a.jsxs)("a",{href:m,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:["Open ",m.replace(/^https?:\/\//,"")]})]})]}),C&&(0,a.jsx)(d.l6,{label:"Region",value:D,onChange:e=>_(e.target.value),options:C.map(e=>({value:e.id,label:e.label}))}),l&&(0,a.jsx)(d.pd,{label:"Default Model",value:T.defaultModel,onChange:e=>O({...T,defaultModel:e.target.value}),placeholder:r?"claude-3-5-sonnet-latest":"gpt-4o-mini"}),y&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Leave blank to use ",(0,a.jsx)("code",{children:"http://localhost:11434"}),". For remote Ollama, enter the full host URL (e.g. ",(0,a.jsx)("code",{children:"http://192.168.1.10:11434"}),")."]}),q&&(0,a.jsx)(d.Ex,{variant:"success"===q?"success":"error",children:"success"===q?"Valid":"Invalid"}),x&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:x}),l&&(0,a.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."}),k&&(0,a.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,a.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Cloudflare Workers AI"}),(0,a.jsx)(d.pd,{label:"Account ID",value:I.accountId,onChange:e=>R({...I,accountId:e.target.value}),placeholder:"abc123def456..."}),(0,a.jsxs)("p",{className:"text-xs text-text-muted mt-2",children:["Find your Account ID in the right sidebar of ",(0,a.jsx)("a",{href:"https://dash.cloudflare.com",target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:"dash.cloudflare.com"})]})]}),N&&(0,a.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,a.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Azure OpenAI Configuration"}),(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsx)(d.pd,{label:"Azure Endpoint",value:P.azureEndpoint,onChange:e=>E({...P,azureEndpoint:e.target.value}),placeholder:"https://your-resource.openai.azure.com"}),(0,a.jsx)(d.pd,{label:"Deployment Name",value:P.deployment,onChange:e=>E({...P,deployment:e.target.value}),placeholder:"gpt-4"}),(0,a.jsx)(d.pd,{label:"API Version",value:P.apiVersion,onChange:e=>E({...P,apiVersion:e.target.value}),placeholder:"2024-10-01-preview"}),(0,a.jsx)(d.pd,{label:"Organization",value:P.organization,onChange:e=>E({...P,organization:e.target.value}),placeholder:"Organization ID"})]})]}),(0,a.jsx)(d.pd,{label:"Priority",type:"number",value:T.priority,onChange:e=>O({...T,priority:Number.parseInt(e.target.value)||1})}),(0,a.jsx)(d.l6,{label:"Proxy Pool",value:T.proxyPoolId,onChange:e=>O({...T,proxyPoolId:e.target.value}),options:[{value:g,label:"None"},...(p||[]).map(e=>({value:e.id,label:e.name}))],placeholder:"None"}),0===(p||[]).length&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"No active proxy pools available. Create one in Proxy Pools page first."}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Legacy manual proxy fields are still accepted by API for backward compatibility."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{onClick:Z,fullWidth:!0,disabled:L||!y&&(!T.name||!T.apiKey)||l&&!T.defaultModel.trim()||N&&(!P.azureEndpoint||!P.deployment||!P.organization)||k&&!I.accountId,children:L?"Saving...":"Save"}),(0,a.jsx)(d.$n,{onClick:f,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})}):null}function $({isOpen:e,node:t,onSave:s,onClose:l,isAnthropic:r}){let[n,o]=(0,i.useState)({name:"",prefix:"",apiType:"chat",baseUrl:"https://api.openai.com/v1"}),[c,m]=(0,i.useState)(!1),[p,x]=(0,i.useState)(""),[u,h]=(0,i.useState)(""),[f,g]=(0,i.useState)(!1),[y,b]=(0,i.useState)(null);(0,i.useEffect)(()=>{t&&o({name:t.name||"",prefix:t.prefix||"",apiType:t.apiType||"chat",baseUrl:t.baseUrl||(r?"https://api.anthropic.com/v1":"https://api.openai.com/v1")})},[t,r]);let v=async()=>{if(n.name.trim()&&n.prefix.trim()&&n.baseUrl.trim()){m(!0);try{let e={name:n.name,prefix:n.prefix,baseUrl:n.baseUrl};r||(e.apiType=n.apiType),await s(e)}finally{m(!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:n.baseUrl,apiKey:p,type:r?"anthropic-compatible":"openai-compatible",modelId:u.trim()||void 0})}),t=await e.json();b(t.valid?"success":"failed")}catch{b("failed")}finally{g(!1)}};return t?(0,a.jsx)(d.aF,{isOpen:e,title:`Edit ${r?"Anthropic":"OpenAI"} Compatible`,onClose:l,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)(d.pd,{label:"Name",value:n.name,onChange:e=>o({...n,name:e.target.value}),placeholder:`${r?"Anthropic":"OpenAI"} Compatible (Prod)`,hint:"Required. A friendly label for this node."}),(0,a.jsx)(d.pd,{label:"Prefix",value:n.prefix,onChange:e=>o({...n,prefix:e.target.value}),placeholder:r?"ac-prod":"oc-prod",hint:"Required. Used as the provider prefix for model IDs."}),!r&&(0,a.jsx)(d.l6,{label:"API Type",options:[{value:"chat",label:"Chat Completions"},{value:"responses",label:"Responses API"}],value:n.apiType,onChange:e=>o({...n,apiType:e.target.value})}),(0,a.jsx)(d.pd,{label:"Base URL",value:n.baseUrl,onChange:e=>o({...n,baseUrl:e.target.value}),placeholder:r?"https://api.anthropic.com/v1":"https://api.openai.com/v1",hint:`Use the base URL (ending in /v1) for your ${r?"Anthropic":"OpenAI"}-compatible API.`}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.pd,{label:"API Key (for Check)",type:"password",value:p,onChange:e=>x(e.target.value),className:"flex-1"}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(d.$n,{onClick:j,disabled:!p||f||!n.baseUrl.trim(),variant:"secondary",children:f?"Checking...":"Check"})})]}),(0,a.jsx)(d.pd,{label:"Model ID (optional)",value:u,onChange:e=>h(e.target.value),placeholder:"e.g. my-model-id",hint:"If provider lacks /models endpoint, enter a model ID to validate via chat/completions instead."}),y&&(0,a.jsx)(d.Ex,{variant:"success"===y?"success":"error",children:"success"===y?"Valid":"Invalid"}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{onClick:v,fullWidth:!0,disabled:!n.name.trim()||!n.prefix.trim()||!n.baseUrl.trim()||c,children:c?"Saving...":"Save"}),(0,a.jsx)(d.$n,{onClick:l,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}function T({isOpen:e,providerAlias:t,providerDisplayAlias:s,onSave:l,onClose:r}){let[n,o]=(0,i.useState)(""),[c,m]=(0,i.useState)(null),[p,x]=(0,i.useState)(""),[u,h]=(0,i.useState)(!1);(0,i.useEffect)(()=>{e&&(o(""),m(null),x(""))},[e]);let f=e=>{let s=`${t}/`;return e.startsWith(s)?e.slice(s.length):e},g=async()=>{let e=f(n.trim());if(e){m("testing"),x("");try{let s=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${t}/${e}`})}),a=await s.json();m(a.ok?"ok":"error"),x(a.error||"")}catch(e){m("error"),x(e.message)}}},y=async()=>{let e=f(n.trim());if(e&&!u){h(!0);try{await l(e)}finally{h(!1)}}};return(0,a.jsx)(d.aF,{isOpen:e,onClose:r,title:"Add Custom Model",children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Model ID"}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)("input",{type:"text",value:n,onChange:e=>{o(e.target.value),m(null),x("")},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,a.jsx)(d.$n,{variant:"secondary",icon:"science",loading:"testing"===c,onClick:g,disabled:!n.trim()||"testing"===c,children:"testing"===c?"Testing...":"Test"})]}),(0,a.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:["Sent to provider as: ",(0,a.jsx)("code",{className:"font-mono bg-sidebar px-1 rounded",children:f(n.trim())||"model-id"})]})]}),"ok"===c&&(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm text-green-600",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base",children:"check_circle"}),"Model is reachable"]}),"error"===c&&(0,a.jsxs)("div",{className:"flex items-start gap-2 text-sm text-red-500",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base shrink-0",children:"cancel"}),(0,a.jsx)("span",{children:p||"Model not reachable"})]}),(0,a.jsxs)("div",{className:"flex gap-2 pt-1",children:[(0,a.jsx)(d.$n,{onClick:r,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,a.jsx)(d.$n,{onClick:y,fullWidth:!0,size:"sm",disabled:!n.trim()||u,children:u?"Adding...":"Add Model"})]})]})})}A.propTypes={isOpen:b().bool.isRequired,provider:b().string,providerName:b().string,isCompatible:b().bool,isAnthropic:b().bool,authType:b().string,authHint:b().string,website:b().string,proxyPools:b().arrayOf(b().shape({id:b().string,name:b().string})),error:b().string,onSave:b().func.isRequired,onBulkDone:b().func,onClose:b().func.isRequired},$.propTypes={isOpen:b().bool.isRequired,node:b().shape({id:b().string,name:b().string,prefix:b().string,apiType:b().string,baseUrl:b().string}),onSave:b().func.isRequired,onClose:b().func.isRequired,isAnthropic:b().bool},T.propTypes={isOpen:b().bool.isRequired,providerAlias:b().string.isRequired,providerDisplayAlias:b().string.isRequired,onSave:b().func.isRequired,onClose:b().func.isRequired};let O=`[
|
|
4
|
+
{
|
|
5
|
+
"accessToken": "eyJhbGc...",
|
|
6
|
+
"refreshToken": "rt_...",
|
|
7
|
+
"idToken": "eyJhbGc...",
|
|
8
|
+
"email": "user@example.com"
|
|
9
|
+
}
|
|
10
|
+
]`;function P({isOpen:e,onClose:t,onSuccess:s}){let[l,r]=(0,i.useState)(""),[n,o]=(0,i.useState)(!1),[c,m]=(0,i.useState)(""),[p,x]=(0,i.useState)(null),h=()=>{n||(r(""),m(""),x(null),t())},f=async()=>{var e;let t;m(""),x(null);let a=l.trim();if(!a)return;try{t=JSON.parse(a)}catch(e){m(`${(0,u.Tl)("Invalid JSON")}: ${e.message}`);return}let i=Array.isArray(e=t)?e:e&&"object"==typeof e?Array.isArray(e.accounts)?e.accounts:[e]:null;if(!i||0===i.length)return void m((0,u.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:i})}),t=await e.json();if(!e.ok)return void m(t?.error||`Request failed: ${e.status}`);x(t),t.success>0&&"function"==typeof s&&s()}catch(e){m(e.message||(0,u.Tl)("Request failed"))}finally{o(!1)}},g=p?.results?.filter(e=>!e.ok)||[];return(0,a.jsx)(d.aF,{isOpen:e,title:(0,u.Tl)("Bulk Add Codex Accounts"),onClose:h,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)("p",{className:"text-xs text-text-muted",children:(0,u.Tl)("Paste an array of codex account JSON objects. Each must include accessToken (and ideally refreshToken, idToken).")}),(0,a.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:O,value:l,onChange:e=>r(e.target.value),disabled:n}),c&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:c}),p&&(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsxs)("div",{className:`text-sm font-medium ${p.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",p.success," ",(0,u.Tl)("added"),p.failed>0?`, ✗ ${p.failed} ${(0,u.Tl)("failed")}`:""]}),g.length>0&&(0,a.jsx)("ul",{className:"rounded border border-accent/20 bg-sidebar/50 p-2 text-xs font-mono max-h-40 overflow-y-auto",children:g.map(e=>(0,a.jsxs)("li",{className:"text-red-400",children:["[",e.index,"] ",e.error]},e.index))})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{onClick:f,fullWidth:!0,disabled:n||!l.trim(),children:n?(0,u.Tl)("Importing..."):(0,u.Tl)("Import All")}),(0,a.jsx)(d.$n,{onClick:h,variant:"ghost",fullWidth:!0,disabled:n,children:(0,u.Tl)("Close")})]})]})})}P.propTypes={isOpen:b().bool.isRequired,onClose:b().func.isRequired,onSuccess:b().func};let E={healthy:{variant:"success",label:"Pool healthy",icon:"shield"},degraded:{variant:"warning",label:"Pool degraded",icon:"warning"},exhausted:{variant:"error",label:"Pool exhausted",icon:"error"}};function I({providerId:e}){let[t,s]=(0,i.useState)(null);if((0,i.useEffect)(()=>{let t;if(!e)return;let a=!1,i=async()=>{try{let t=await fetch(`/api/providers/${e}/vault-pool`,{cache:"no-store"});if(!t.ok)return;let i=await t.json();a||s(i)}catch{}};i();let l=()=>{t||(t=setInterval(i,1e4))},r=()=>{t&&(clearInterval(t),t=null)},n=()=>document.hidden?r():l();return l(),document.addEventListener("visibilitychange",n),()=>{a=!0,r(),document.removeEventListener("visibilitychange",n)}},[e]),!t||!t.hasPool)return null;let l=E[t.status]||E.healthy;return(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",title:"Admin-provided shared key pool. Keys are hidden; only counts are shown.",children:[(0,a.jsx)(d.Ex,{variant:l.variant,size:"sm",icon:l.icon,children:l.label}),(0,a.jsxs)(d.Ex,{variant:"info",size:"sm",icon:"key",children:[t.total," pool keys"]}),(0,a.jsxs)(d.Ex,{variant:"success",size:"sm",icon:"check_circle",children:[t.available," available"]}),t.rateLimited>0&&(0,a.jsxs)(d.Ex,{variant:"warning",size:"sm",icon:"schedule",children:[t.rateLimited," cooling"]})]})}let R={claude:"claudeAutoPing",codex:"codexAutoPing"};function D(){let e,t,s,r=(0,l.useParams)(),h=(0,l.useRouter)(),y=r.id,{getCaps:b}=(0,x.y)(),[j,N]=(0,i.useState)([]),[k,S]=(0,i.useState)(!0),[O,E]=(0,i.useState)(null),[D,_]=(0,i.useState)([]),[U,z]=(0,i.useState)(!1),[q,M]=(0,i.useState)(!1),[L,K]=(0,i.useState)(!1),[F,J]=(0,i.useState)(""),[W,B]=(0,i.useState)(!1),[H,G]=(0,i.useState)(!1),[V,Q]=(0,i.useState)(!1),[Z,X]=(0,i.useState)(!1),[Y,ee]=(0,i.useState)(null),[et,es]=(0,i.useState)({}),[ea,ei]=(0,i.useState)([]),[el,er]=(0,i.useState)(!1),[en,eo]=(0,i.useState)({}),[ed,ec]=(0,i.useState)(""),[em,ep]=(0,i.useState)(()=>new Set),[ex,eu]=(0,i.useState)(""),[eh,ef]=(0,i.useState)(!1),[eg,ey]=(0,i.useState)(!1),[eb,ev]=(0,i.useState)([]),[ej,ew]=(0,i.useState)("__none__"),[eN,ek]=(0,i.useState)(!1),[eC,eS]=(0,i.useState)(null),[eA,e$]=(0,i.useState)(""),[eT,eO]=(0,i.useState)("auto"),[eP,eE]=(0,i.useState)({enabled:!1,connections:{}}),[eI,eR]=(0,i.useState)([]),[eD,e_]=(0,i.useState)([]),[eU,ez]=(0,i.useState)([]),[eq,eM]=(0,i.useState)(null),[eL,eK]=(0,i.useState)(!1),[eF,eJ]=(0,i.useState)(!1),[eW,eB]=(0,i.useState)(!1),[eH,eG]=(0,i.useState)(null),[eV,eQ]=(0,i.useState)({}),[eZ,eX]=(0,i.useState)(null),eY=(0,i.useRef)(!1),[e0,e1]=(0,i.useState)(!1),{copied:e2,copy:e5}=(0,p.C)(),e3="ag_risk_confirmed",e4=()=>{z(!0)},e7=()=>{"antigravity"===y&&"true"!==window.localStorage.getItem(e3)?eK(!0):tt?e4():(J(""),K(!0))},e6=()=>{J(""),K(!0)},e8=()=>{tt?e7():e6()},e9=O?{id:O.id,name:O.name||("anthropic-compatible"===O.type?"Anthropic Compatible":"OpenAI Compatible"),color:"anthropic-compatible"===O.type?"#D97757":"#10A37F",textIcon:"anthropic-compatible"===O.type?"AC":"OC",apiType:O.apiType,baseUrl:O.baseUrl,type:O.type}:c.zN[y]||c.fg[y]||c.IS[y]||c.nJ[y]||c.br[y],te=e9?.authModes||[],tt=(!!c.zN[y]||!!c.IS[y]||te.includes("oauth"))&&e9?.hasOAuth!==!1,ts=!!c.fg[y]||te.includes("apikey")||e9?.hasOAuth===!1,ta=!!c.IS[y]?.noAuth,ti=(0,m.KC)(y),tl=(0,c.wG)(y),tr=(0,c.mq)(y),tn=(0,c.gb)(y),to=tr||tn,td=!to&&tt&&ts,tc="xai"===y?"Grok Build OAuth":"OAuth",tm="xai"===y?"xAI API Key":"API Key";c.Q2[y]?.thinkingConfig||c.s9.extended;let tp=to?y:tl,tx=to?O?.prefix||y:tl,tu=(0,i.useCallback)(async()=>{try{let e=await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tp)}`,{cache:"no-store"}),t=await e.json();e.ok&&ez(t.ids||[])}catch(e){console.log("Error fetching disabled models:",e)}},[tp]),th=async e=>{try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:tp,ids:[e]})})).ok&&await tu()}catch(e){console.log("Error disabling model:",e)}},tf=async e=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tp)}&id=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await tu()}catch(e){console.log("Error enabling model:",e)}},tg=async e=>{e.length&&eM({title:"Disable All Models",message:`Disable all ${e.length} model(s)?`,onConfirm:async()=>{eM(null);try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:tp,ids:e})})).ok&&await tu()}catch(e){console.log("Error disabling all models:",e)}}})},ty=async()=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tp)}`,{method:"DELETE"})).ok&&await tu()}catch(e){console.log("Error enabling all models:",e)}},tb=(0,i.useCallback)(async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&es(t.aliases||{})}catch(e){console.log("Error fetching aliases:",e)}},[]),tv=(0,i.useCallback)(async()=>{try{let e=await fetch("/api/models/custom",{cache:"no-store"}),t=await e.json();e.ok&&ei(t.models||[])}catch(e){console.log("Error fetching custom models:",e)}},[]);(0,i.useEffect)(()=>{"kilocode"===y&&fetch("/api/providers/kilo/free-models").then(e=>e.json()).then(e=>{e.models?.length&&e_(e.models)}).catch(()=>{})},[y]);let tj=(0,i.useCallback)(async()=>{try{let[e,t,s,a]=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"})]),i=await e.json(),l=await t.json(),r=await s.json(),n=a.ok?await a.json():{};if(e.ok){let e=(i.connections||[]).filter(e=>e.provider===y);N(e)}s.ok&&_(r.proxyPools||[]);let o=(n.providerStrategies||{})[y]||{};eS(o.fallbackStrategy||null),e$(null!=o.stickyRoundRobinLimit?String(o.stickyRoundRobinLimit):"1");let d=(n.providerThinking||{})[y]||{};eO(d.mode||"auto");let c=R[y],m=c&&n[c]||{};if(eE({enabled:!0===m.enabled,connections:m.connections||{}}),t.ok){let e=(l.nodes||[]).find(e=>e.id===y)||null;if(!e&&to)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}E(e)}}catch(e){console.log("Error fetching connections:",e)}finally{S(!1)}},[y,to]),tw=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&&(E(s.node),await tj(),Q(!1))}catch(e){console.log("Error updating provider node:",e)}},tN=async(e,t)=>{try{let s=await fetch("/api/settings",{cache:"no-store"}),a=(s.ok?await s.json():{}).providerStrategies||{},i={};e&&(i.fallbackStrategy=e),"round-robin"===e&&""!==t&&(i.stickyRoundRobinLimit=Number(t)||3);let l={...a};0===Object.keys(i).length?delete l[y]:l[y]=i,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:l})})}catch(e){console.log("Error saving provider strategy:",e)}},tk=async e=>{let t=R[y];if(t){eE(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,i.useEffect)(()=>{tj(),tb(),tv(),tu()},[tj,tb,tv,tu]),(0,i.useEffect)(()=>{let e=(c.zN[y]||c.fg[y]||c.IS[y]||c.nJ[y])?.modelsFetcher;e&&f(e).then(eR)},[y]);let tC=async(e,t,s=tl)=>{let a=`${s}/${e}`;try{let e=await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:a,alias:t})});if(e.ok)await tb();else{let t=await e.json();alert(t.error||"Failed to set alias")}}catch(e){console.log("Error setting alias:",e)}},tS=async e=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await tb()}catch(e){console.log("Error deleting alias:",e)}},tA=async(e,t="llm",s=tp)=>{try{let a=await fetch("/api/models/custom",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:s,id:e,type:t})});if(a.ok)await tv(),window.dispatchEvent(new CustomEvent("customModelChanged"));else{let e=await a.json();alert(e.error||"Failed to add custom model")}}catch(e){console.log("Error adding custom model:",e)}},t$=async(e,t="llm",s=tp)=>{try{let a=new URLSearchParams({providerAlias:s,id:e,type:t});(await fetch(`/api/models/custom?${a}`,{method:"DELETE"})).ok&&(await tv(),window.dispatchEvent(new CustomEvent("customModelChanged")))}catch(e){console.log("Error deleting custom model:",e)}},tT=async()=>{if(e0)return;let e=j.find(e=>!1!==e.isActive);if(!e)return void alert((0,u.Tl)("Please add an active Qoder connection first"));e1(!0);try{let t=await fetch(`/api/providers/${e.id}/models`),s=await t.json();if(!t.ok)return void alert(s.error||(0,u.Tl)("Failed to fetch models"));let a=s.models||[];if(0===a.length)return void alert((0,u.Tl)("No models returned"));let i=0;for(let e of a){let t=e.id||e.name;if(!t)continue;let s=t.replace(/^qoder\//,"");ea.some(e=>e.providerAlias===tp&&e.id===s&&"llm"===(e.kind||e.type||"llm"))||Object.values(et).includes(`${tp}/${s}`)||(await tA(s,"llm",tp),i+=1)}0===i?alert((0,u.Tl)("All models already exist, no new models added")):alert((0,u.Tl)("Successfully added")+` ${i} `+(0,u.Tl)("models"))}catch(e){console.log("Error importing Qoder models:",e),alert((0,u.Tl)("Error fetching models")+": "+e.message)}finally{e1(!1)}},tO=async()=>{if(eF||0===j.length)return;let e=Object.fromEntries(j.map(e=>[e.id,{state:"queued",error:null}]));eY.current=!1,eJ(!0),eB(!1),eG(null),eQ(e),eX({total:j.length,completed:0,passed:0,failed:0,stopped:!1});let t=0,s=0;try{for(let e=0;e<j.length;e+=1){if(eY.current){eX({total:j.length,completed:e,passed:t,failed:s,stopped:!0});break}let a=j[e];eG(a.id),eQ(e=>({...e,[a.id]:{state:"testing",error:null}}));try{let e=await fetch(`/api/providers/${a.id}/test`,{method:"POST"}),i=await e.json(),l=!!i.valid;l?t+=1:s+=1,eQ(e=>({...e,[a.id]:{state:l?"success":"failed",error:l?null:i.error||null}}))}catch(e){s+=1,eQ(t=>({...t,[a.id]:{state:"failed",error:e.message||"Test failed"}}))}eX({total:j.length,completed:e+1,passed:t,failed:s,stopped:!1}),e<j.length-1&&await new Promise(e=>setTimeout(e,1e3))}}finally{eG(null),eJ(!1),eB(!1),eY.current=!1}},tP=async e=>{eM({title:"Delete Connection",message:"Delete this connection?",onConfirm:async()=>{eM(null);try{(await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok&&N(t=>t.filter(t=>t.id!==e))}catch(e){console.log("Error deleting connection:",e)}}})},tE=()=>{tj(),z(!1)},tI=async e=>{J("");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 tj(),K(!1);return}J(s?.error||"Failed to save connection")}catch(e){console.log("Error saving connection:",e),J("Failed to save connection")}},tR=async e=>{try{(await fetch(`/api/providers/${Y.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await tj(),G(!1))}catch(e){console.log("Error updating connection:",e)}},tD=async(e,t)=>{try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&N(s=>s.map(s=>s.id===e?{...s,isActive:t}:s))}catch(e){console.log("Error updating connection status:",e)}},t_=async(e,t)=>{let s=[...j];[s[e],s[t]]=[s[t],s[e]],N(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 tj()}},tU=j.filter(e=>eb.includes(e.id)),tz=j.length>0&&eb.length===j.length;(0,i.useEffect)(()=>{ev(e=>e.filter(e=>j.some(t=>t.id===e)))},[j]),(()=>{if(0===tU.length)return;let e=new Set(tU.map(e=>e.providerSpecificData?.proxyPoolId||"__none__"));if(1===e.size){let t=[...e][0];if("__none__"===t)return;let s=D.find(e=>e.id===t);return s?.name}})();let tq=()=>{eN||X(!1)},tM=async e=>{ek(!0);try{let t=0;for(let{connectionId:s,proxyPoolId:a}of e)try{(await fetch(`/api/providers/${s}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:a})})).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 tj(),X(!1)}finally{ek(!1)}},tL=e=>tM(j.map(t=>({connectionId:t.id,proxyPoolId:e}))),tK=(0,a.jsx)("div",{className:"flex min-w-0 flex-col divide-y divide-border-subtle",children:j.map((e,t)=>{let s;return(0,a.jsxs)("div",{className:"flex min-w-0 items-stretch",children:[(0,a.jsx)("div",{className:"flex shrink-0 items-center pl-1 sm:pl-2",children:(0,a.jsx)("input",{type:"checkbox",checked:(s=e.id,eb.includes(s)),onChange:()=>{var t;return t=e.id,void ev(e=>e.includes(t)?e.filter(e=>e!==t):[...e,t])},className:"h-4 w-4 rounded border-gray-300 text-primary focus:ring-primary"})}),(0,a.jsx)("div",{className:"flex-1 min-w-0",children:(0,a.jsx)(C,{connection:e,proxyPools:D,isOAuth:tt,isFirst:0===t,isLast:t===j.length-1,onMoveUp:()=>t_(t,t-1),onMoveDown:()=>t_(t,t+1),onToggleActive:t=>tD(e.id,t),autoPing:R[y]&&"oauth"===e.authType?{on:!0===eP.connections[e.id],onToggle:t=>{var s;return s=e.id,void tk({...eP,connections:{...eP.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&&N(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:()=>{ee(e),G(!0)},onDelete:()=>tP(e.id),oneByOneStatus:eV[e.id]||null})})]},e.id)})}),tF=D.filter(e=>!0===e.isActive),tJ=(0,a.jsx)(d.aF,{isOpen:Z,onClose:tq,title:`Apply Proxy (${j.length} connections)`,children:(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsxs)("button",{onClick:()=>{let e=D.filter(e=>!0===e.isActive);return 0===e.length?void alert("No active proxy pools available."):tM(j.map((t,s)=>({connectionId:t.id,proxyPoolId:e[s%e.length].id})))},disabled:eN||0===tF.length,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-surface-2 disabled:cursor-not-allowed disabled:opacity-50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"sync_alt"}),(0,a.jsx)("span",{className:"text-sm text-text-main",children:"One-to-one (rotate)"})]}),(0,a.jsxs)("button",{onClick:()=>tL(null),disabled:eN,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-surface-2 disabled:cursor-not-allowed disabled:opacity-50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"link_off"}),(0,a.jsx)("span",{className:"text-sm text-text-main",children:"None (unbind all)"})]}),D.map(e=>(0,a.jsxs)("button",{onClick:()=>tL(e.id),disabled:eN||!0!==e.isActive,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-surface-2 disabled:cursor-not-allowed disabled:opacity-50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"lan"}),(0,a.jsx)("span",{className:"truncate text-sm text-text-main",children:e.name}),!0!==e.isActive&&(0,a.jsx)("span",{className:"text-[10px] text-text-muted",children:"(inactive)"})]},e.id))]}),eN&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Applying..."}),(0,a.jsx)(d.$n,{onClick:tq,variant:"ghost",fullWidth:!0,disabled:eN,children:"Cancel"})]})}),tW=async e=>{if(!em.has(e)){ep(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:`${tp}/${e}`})}),s=await t.json();eo(t=>({...t,[e]:s.ok?"ok":"error"})),ec(s.ok?"":s.error||"Model not reachable")}catch{eo(t=>({...t,[e]:"error"})),ec("Network error")}finally{ep(t=>{let s=new Set(t);return s.delete(e),s})}}},tB=async e=>{eh||0===e.length||(ef(!0),ec(""),await Promise.all(e.map(e=>tW(e))),ef(!1))};return k?(0,a.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,a.jsx)(d.Qv,{}),(0,a.jsx)(d.Qv,{})]}):e9?(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-6",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)(n(),{href:"/dashboard/providers",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary transition-colors mb-4",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),"Back to Providers"]}),(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-3 sm:gap-4",children:[(0,a.jsx)("div",{className:"flex size-12 shrink-0 items-center justify-center rounded-lg",style:{backgroundColor:`${e9.color}15`},children:el?(0,a.jsx)("span",{className:"text-sm font-bold",style:{color:e9.color},children:e9.textIcon||e9.id.slice(0,2).toUpperCase()}):(0,a.jsx)(o.default,{src:tr&&e9.apiType?"responses"===e9.apiType?"/providers/oai-r.png":"/providers/oai-cc.png":tn?"/providers/anthropic-m.png":`/providers/${e9.id}.png`,alt:e9.name,width:48,height:48,className:"max-h-12 max-w-12 rounded-lg object-contain",sizes:"48px",onError:()=>er(!0)})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[(0,a.jsx)("h1",{className:"truncate text-2xl font-semibold tracking-tight sm:text-3xl",children:e9.name}),(e9.notice?.apiKeyUrl||e9.notice?.signupUrl||e9.website)&&(0,a.jsxs)("a",{href:e9.notice?.apiKeyUrl||e9.notice?.signupUrl||e9.website,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline inline-flex items-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),e9.notice?.apiKeyUrl?"Get API Key":"Sign up / Learn more"]})]}),(0,a.jsxs)("p",{className:"text-text-muted",children:[j.length," connection",1===j.length?"":"s"]})]})]})]}),e9.deprecated&&(0,a.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,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-yellow-500 mt-0.5 shrink-0",children:"warning"}),(0,a.jsx)("p",{className:"text-xs text-red-600 dark:text-yellow-400 leading-relaxed",children:e9.deprecationNotice})]}),e9.notice?.text&&!e9.deprecated&&(0,a.jsxs)("div",{className:"flex flex-col gap-2 rounded-lg border border-info/30 bg-info/10 px-3 py-2 sm:flex-row sm:items-center",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-info shrink-0",children:"info"}),(0,a.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-info",children:e9.notice.text}),e9.notice.apiKeyUrl&&(0,a.jsx)("a",{href:e9.notice.apiKeyUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-flex justify-center rounded bg-blue-500 px-2 py-1 text-xs font-medium text-white transition-colors hover:bg-blue-600 sm:py-0.5",children:"Get API Key →"})]}),to&&O&&(0,a.jsx)(d.Zp,{children:(0,a.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:tn?"Anthropic Compatible Details":"OpenAI Compatible Details"}),(0,a.jsxs)("p",{className:"break-all text-sm text-text-muted",children:[tn?"Messages API":"responses"===O.apiType?"Responses API":"Chat Completions"," \xb7 ",(O.baseUrl||"").replace(/\/$/,""),"/",tn?"messages":"responses"===O.apiType?"responses":"chat/completions"]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,a.jsx)(d.$n,{size:"sm",icon:"add",onClick:()=>{J(""),K(!0)},className:"w-full sm:w-auto",children:"Add API Key"}),(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>Q(!0),className:"w-full sm:w-auto",children:"Edit"}),(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:async()=>{eM({title:"Delete Compatible Node",message:`Delete this ${tn?"Anthropic":"OpenAI"} Compatible node?`,onConfirm:async()=>{eM(null);try{(await fetch(`/api/provider-nodes/${y}`,{method:"DELETE"})).ok&&h.push("/dashboard/providers")}catch(e){console.log("Error deleting provider node:",e)}}})},className:"w-full sm:w-auto",children:"Delete"})]})]})}),ta?(0,a.jsx)(d.gw,{providerId:y}):(0,a.jsxs)(d.Zp,{children:[(0,a.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Connections"}),(0,a.jsx)(I,{providerId:y})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-4",children:[j.length>0&&D.length>0&&(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"lan",onClick:()=>X(!0),children:"Apply Proxy"}),j.length>0&&(0,a.jsxs)(a.Fragment,{children:[eb.length>0&&(0,a.jsxs)(d.$n,{size:"sm",variant:"danger",icon:"delete",onClick:()=>{let e=eb.length;0!==e&&eM({title:`Delete ${e} Connection${e>1?"s":""}`,message:`Delete ${e} connection${e>1?"s":""}? This cannot be undone.`,onConfirm:async()=>{eM(null);let e=0,t=[...eb];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}N(e=>e.filter(e=>!t.includes(e.id))),ev([]),e>0&&alert(`Deleted ${t.length-e} connection(s), ${e} failed.`)}})},children:["Delete Selected (",eb.length,")"]}),(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"sync",onClick:tO,disabled:eF,children:eF?"Testing Connection One-by-One...":"Test Connection One-by-One"}),eF&&(0,a.jsx)(d.$n,{size:"sm",variant:"ghost",icon:"stop",onClick:()=>{eF&&(eY.current=!0,eB(!0))},disabled:eW,children:eW?"Stopping...":"Stop"})]}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"Round Robin"}),(0,a.jsx)(d.lM,{checked:"round-robin"===eC,onChange:e=>{let t=e?"round-robin":null,s=e?eA||"1":eA;e&&!eA&&e$("1"),eS(t),tN(t,s)}}),"round-robin"===eC&&(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted",children:"Sticky:"}),(0,a.jsx)("input",{type:"number",min:1,value:eA,onChange:e=>{var t;e$(t=e.target.value),tN("round-robin",t)},placeholder:"1",className:"w-14 px-2 py-1 text-xs border border-border rounded-md bg-background focus:outline-none focus:border-primary"})]})]})]})]}),0===j.length?(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"inline-flex items-center justify-center w-9 h-9 rounded-full bg-primary/10 text-primary shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:tt?"lock":"key"})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"No connections yet"}),td&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Choose ",tc," or ",tm,"."]})]})]}),(0,a.jsx)("div",{className:"flex gap-2",children:td?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:e7,children:tc}),(0,a.jsx)(d.$n,{size:"sm",icon:"key",onClick:e6,children:tm})]}):(0,a.jsxs)(a.Fragment,{children:[!to&&"iflow"===y&&(0,a.jsx)(d.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>M(!0),children:"Cookie"}),"codex"===y&&(0,a.jsx)(d.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>B(!0),children:(0,u.Tl)("Bulk Add")}),(0,a.jsx)(d.$n,{size:"sm",icon:"add",onClick:e8,children:to?"Add API Key":"iflow"===y?"OAuth":"Add Connection"})]})})]}):(0,a.jsxs)(a.Fragment,{children:[eZ&&(0,a.jsx)("div",{className:"mb-4 rounded-lg border border-border bg-black/[0.02] px-3 py-2 text-xs text-text-muted dark:border-white/10 dark:bg-white/[0.03]",children:(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,a.jsxs)("span",{children:["Total: ",eZ.total]}),(0,a.jsxs)("span",{children:["Completed: ",eZ.completed]}),(0,a.jsxs)("span",{children:["Passed: ",eZ.passed]}),(0,a.jsxs)("span",{children:["Failed: ",eZ.failed]}),eZ.stopped&&(0,a.jsx)("span",{className:"text-warning",children:"Stopped"}),eF&&eH&&(0,a.jsxs)("span",{children:["Running: ",j.find(e=>e.id===eH)?.name||eH]})]})}),j.length>0&&(0,a.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,a.jsxs)("label",{className:"flex cursor-pointer items-center gap-1.5 text-xs text-text-muted hover:text-primary",children:[(0,a.jsx)("input",{type:"checkbox",checked:tz,onChange:()=>{tz?ev([]):ev(j.map(e=>e.id))},className:"h-3.5 w-3.5 rounded border-gray-300 text-primary focus:ring-primary"}),"Select All"]})}),tK,!to&&(0,a.jsxs)("div",{className:"mt-4 grid grid-cols-1 gap-2 sm:flex",children:["iflow"===y&&(0,a.jsx)(d.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>M(!0),title:"Add connection using browser cookie",className:"w-full sm:w-auto",children:"Cookie"}),"codex"===y&&(0,a.jsx)(d.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>B(!0),title:(0,u.Tl)("Bulk import codex accounts from JSON"),className:"w-full sm:w-auto",children:(0,u.Tl)("Bulk Add")}),td?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:e7,className:"w-full sm:w-auto",children:tc}),(0,a.jsx)(d.$n,{size:"sm",icon:"key",onClick:e6,className:"w-full sm:w-auto",children:tm})]}):(0,a.jsx)(d.$n,{size:"sm",icon:"add",onClick:e8,className:"w-full sm:w-auto",children:"Add"})]})]})]}),(0,a.jsxs)(d.Zp,{children:[(0,a.jsxs)("div",{className:"mb-4 flex flex-col gap-3",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Available Models"}),!to&&(e=[...ti,...eD.filter(e=>!ti.some(t=>t.id===e.id))].filter(e=>{let t=(0,m.CP)(e);return!t||"llm"===t}).map(e=>e.id).filter(e=>!eU.includes(e)),t=ex.trim().toLowerCase(),s=e.filter(e=>!t||e.toLowerCase().includes(t)),(0,a.jsxs)("div",{className:"flex flex-wrap gap-2",children:[eU.length>0&&(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"restart_alt",onClick:ty,children:"Active All"}),e.length>0&&(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"block",onClick:()=>tg(e),children:"Disable All"}),(j.length>0||ta)&&s.length>0&&(0,a.jsx)(d.$n,{size:"sm",variant:"primary",icon:eh?"progress_activity":"play_arrow",onClick:()=>tB(s),disabled:eh,children:eh?"Testing...":`Test All (${s.length})`})]}))]}),(0,a.jsx)("div",{className:"sm:max-w-xs",children:(0,a.jsx)(d.pd,{type:"search",placeholder:"Search models...",value:ex,onChange:e=>eu(e.target.value),className:"w-full"})})]}),!!ed&&(0,a.jsx)("p",{className:"text-xs text-danger mb-3 break-words",children:ed}),(()=>{let e,t,s;if(to)return(0,a.jsx)(w,{providerStorageAlias:tp,providerDisplayAlias:tx,modelAliases:et,customModels:ea,copied:e2,onCopy:e5,onSetAlias:tC,onDeleteAlias:tS,onAddCustomModel:e=>tA(e,"llm",tp),onDeleteCustomModel:e=>t$(e,"llm",tp),connections:j,isAnthropic:tn});let i=[...ti,...eD.filter(e=>!ti.some(t=>t.id===e.id))].filter(e=>{let t=(0,m.CP)(e);return!t||"llm"===t}),l=new Set(eU),r=i.filter(e=>!l.has(e.id)),n=i.filter(e=>l.has(e.id)),o=g({customModels:ea,modelAliases:et,providerAlias:tp,builtInModels:ti,type:"llm"}),d=ex.trim().toLowerCase(),c=(e,t="")=>!d||e.toLowerCase().includes(d)||String(t).toLowerCase().includes(d),p=r.filter(e=>c(e.id,e.name)),x=o.filter(e=>c(e.id,e.name));return(0,a.jsxs)("div",{className:"flex flex-wrap gap-3",children:[x.map(e=>(0,a.jsx)(v,{model:{id:e.id,name:e.name},fullModel:`${tx}/${e.id}`,alias:e.alias,copied:e2,onCopy:e5,onSetAlias:()=>{},onDeleteAlias:()=>{"custom"===e.source?t$(e.id,"llm",tp):tS(e.alias)},testStatus:en[e.id],onTest:j.length>0||ta?()=>tW(e.id):void 0,isTesting:em.has(e.id),isCustom:!0,isFree:!1,caps:b(`${y}/${e.id}`)},`${e.source}-${e.fullModel}`)),p.map(e=>{let t=`${tp}/${e.id}`,s=`${y}/${e.id}`,i=Object.entries(et).find(([,e])=>e===t||e===s)?.[0];return(0,a.jsx)(v,{model:e,fullModel:`${tx}/${e.id}`,alias:i,copied:e2,onCopy:e5,onSetAlias:t=>tC(e.id,t,tp),onDeleteAlias:()=>tS(i),testStatus:en[e.id],onTest:j.length>0||ta?()=>tW(e.id):void 0,isTesting:em.has(e.id),isFree:e.isFree,onDisable:()=>th(e.id),caps:b(`${y}/${e.id}`)},e.id)}),ex.trim()&&0===p.length&&0===x.length&&(0,a.jsxs)("p",{className:"w-full text-center text-sm text-text-muted py-4",children:["No models match “",ex,"”"]}),(0,a.jsxs)("button",{onClick:()=>ey(!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,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"}),"Add Model"]}),"qoder"===y&&j.some(e=>!1!==e.isActive)&&(0,a.jsxs)("button",{onClick:tT,disabled:e0,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-info transition-colors hover:border-blue-500 hover:bg-blue-500/5 sm:w-auto disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",style:e0?{animation:"spin 1s linear infinite"}:void 0,children:e0?"progress_activity":"download"}),e0?(0,u.Tl)("Fetching..."):(0,u.Tl)("Fetch Qoder Models")]}),eI.length>0&&(e=new Set([...Object.values(et),...o.map(e=>e.fullModel)]),t=new Set(ti.map(e=>e.id)),0===(s=eI.filter(s=>!e.has(`${tp}/${s.id}`)&&!t.has(s.id))).length?null:(0,a.jsxs)("div",{className:"w-full mt-2",children:[(0,a.jsx)("p",{className:"text-xs text-text-muted mb-2",children:"Suggested free models (≥200k context):"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:s.map(e=>(0,a.jsxs)("button",{onClick:async()=>{await tA(e.id,"llm",tp)},className:"flex items-center gap-1 px-2.5 py-1.5 rounded-lg border border-border 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,a.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),e.id.split("/").pop()]},e.id))})]})),n.length>0&&(0,a.jsxs)("div",{className:"w-full mt-2",children:[(0,a.jsxs)("p",{className:"text-xs text-text-muted mb-2",children:["Disabled models (",n.length,"):"]}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:n.map(e=>(0,a.jsxs)("button",{onClick:()=>tf(e.id),className:"flex items-center gap-1 px-2.5 py-1.5 rounded-lg border border-dashed border-border text-xs text-text-muted hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-colors",title:"Restore model",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),e.id]},e.id))})]})]})})()]}),tJ,"kiro"===y?(0,a.jsx)(d.Mh,{isOpen:U,providerInfo:e9,onSuccess:tE,onClose:()=>z(!1)}):"cursor"===y?(0,a.jsx)(d.G9,{isOpen:U,onSuccess:tE,onClose:()=>z(!1)}):"gitlab"===y?(0,a.jsx)(d.vj,{isOpen:U,providerInfo:e9,onSuccess:tE,onClose:()=>z(!1)}):(0,a.jsx)(d.LF,{isOpen:U,provider:y,providerInfo:e9,onSuccess:tE,onClose:()=>z(!1)}),"iflow"===y&&(0,a.jsx)(d.vE,{isOpen:q,onSuccess:()=>{tj(),M(!1)},onClose:()=>M(!1)}),(0,a.jsx)(A,{isOpen:L,provider:y,providerName:e9.name,isCompatible:to,isAnthropic:tn,authType:e9?.authType,authHint:e9?.authHint,website:e9?.website,proxyPools:D,error:F,onSave:tI,onBulkDone:tj,onClose:()=>{J(""),K(!1)}}),(0,a.jsx)(d.wI,{isOpen:H,connection:Y,proxyPools:D,onSave:tR,onClose:()=>G(!1)}),to&&(0,a.jsx)($,{isOpen:V,node:O,onSave:tw,onClose:()=>Q(!1),isAnthropic:tn}),!to&&(0,a.jsx)(T,{isOpen:eg,providerAlias:tp,providerDisplayAlias:tx,onSave:async e=>{await tA(e,"llm",tp),ey(!1)},onClose:()=>ey(!1)}),"codex"===y&&(0,a.jsx)(P,{isOpen:W,onClose:()=>B(!1),onSuccess:tj}),(0,a.jsx)(d.uo,{isOpen:eL,onClose:()=>eK(!1),onConfirm:()=>{(window.localStorage.setItem(e3,"true"),eK(!1),tt)?e4():e6()},title:"Risk Notice",message:e9?.deprecationNotice,confirmText:"I Understand, Continue",cancelText:"Cancel",variant:"danger"}),(0,a.jsx)(d.uo,{isOpen:!!eq,onClose:()=>eM(null),onConfirm:eq?.onConfirm,title:eq?.title||"Confirm",message:eq?.message,variant:"danger"})]}):(0,a.jsxs)("div",{className:"text-center py-20",children:[(0,a.jsx)("p",{className:"text-text-muted",children:"Provider not found"}),(0,a.jsx)(n(),{href:"/dashboard/providers",className:"text-primary mt-4 inline-block",children:"Back to Providers"})]})}}},e=>{e.O(0,[27,5772,1321,705,5497,8441,3794,7358],()=>e(e.s=88845)),_N_E=e.O()}]);
|