@rsalmn/extremerouter 0.7.0 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/.next-cli-build/BUILD_ID +1 -1
- package/app/.next-cli-build/app-path-routes-manifest.json +4 -1
- package/app/.next-cli-build/build-manifest.json +2 -2
- package/app/.next-cli-build/routes-manifest.json +20 -0
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/alerts/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/alerts/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/alerts/page_client-reference-manifest.js +1 -1
- 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 +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +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 +2 -2
- 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 +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +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 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page_client-reference-manifest.js +1 -1
- 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 -2
- package/app/.next-cli-build/server/app/api/alerts/test/route.js.nft.json +1 -1
- 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/cache/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cache/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +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 +1 -1
- 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 +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
- package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -1
- package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -1
- package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/stop/route.js +1 -1
- package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/health/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 +2 -2
- 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]/freebuff-profile/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/freebuff-profile/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/health-timeline/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/health-timeline/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]/qwencloud-profile/route.js +1 -0
- package/app/.next-cli-build/server/app/api/providers/[id]/qwencloud-profile/route.js.nft.json +1 -0
- package/app/.next-cli-build/server/app/api/providers/[id]/qwencloud-profile/route_client-reference-manifest.js +1 -0
- 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]/v0-profile/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/v0-profile/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/vault-pool/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/vault-pool/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/zenmux-plans/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/zenmux-plans/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +2 -2
- package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +2 -2
- package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +2 -2
- package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/install/route.js +2 -0
- package/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -0
- package/app/.next-cli-build/server/app/api/pxpipe/install/route_client-reference-manifest.js +1 -0
- package/app/.next-cli-build/server/app/api/pxpipe/status/route.js +2 -0
- package/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -0
- package/app/.next-cli-build/server/app/api/pxpipe/status/route_client-reference-manifest.js +1 -0
- 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 +1 -1
- 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/retry-stats/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/retry-stats/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 +1 -1
- package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +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/alerts.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/alerts.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/alerts.segments/!KGRhc2hib2FyZCk/dashboard/alerts/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/alerts.segments/!KGRhc2hib2FyZCk/dashboard/alerts.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/alerts.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/alerts.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/alerts.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/alerts.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/alerts.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/alerts.segments/_tree.segment.rsc +2 -2
- 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 -1
- package/app/.next-cli-build/server/app/dashboard/playground.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk/dashboard/playground/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk/dashboard/playground.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/playground.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/playground.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/playground.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/playground.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/profile.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +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 +6 -6
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +6 -6
- 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 +2 -2
- 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 +4 -1
- package/app/.next-cli-build/server/chunks/1051.js +1 -1
- package/app/.next-cli-build/server/chunks/1350.js +1 -1
- package/app/.next-cli-build/server/chunks/1719.js +1 -1
- package/app/.next-cli-build/server/chunks/212.js +1 -1
- 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 +10 -6
- package/app/.next-cli-build/server/chunks/412.js +2 -2
- 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/6306.js +1 -1
- package/app/.next-cli-build/server/chunks/6316.js +2 -2
- package/app/.next-cli-build/server/chunks/6638.js +1 -0
- package/app/.next-cli-build/server/chunks/6763.js +1 -1
- package/app/.next-cli-build/server/chunks/6777.js +1 -1
- package/app/.next-cli-build/server/chunks/788.js +1 -1
- 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/8833.js +2 -2
- package/app/.next-cli-build/server/chunks/8881.js +1 -0
- package/app/.next-cli-build/server/chunks/8895.js +4 -4
- package/app/.next-cli-build/server/chunks/8920.js +1 -1
- package/app/.next-cli-build/server/chunks/9422.js +1 -1
- package/app/.next-cli-build/server/chunks/9609.js +1 -1
- package/app/.next-cli-build/server/chunks/9630.js +1 -1
- package/app/.next-cli-build/server/chunks/9903.js +1 -1
- package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
- package/app/.next-cli-build/server/middleware.js +1 -1
- package/app/.next-cli-build/server/pages/404.html +1 -1
- package/app/.next-cli-build/server/pages/500.html +1 -1
- package/app/.next-cli-build/static/23aWRrHmOJ1Tzk56dkLJB/_buildManifest.js +1 -0
- package/app/.next-cli-build/static/chunks/1321-8314ee2680bf7ab2.js +1 -0
- package/app/.next-cli-build/static/chunks/5497-d3d03cfbda019d34.js +7 -0
- package/app/.next-cli-build/static/chunks/705-197061b2f061280b.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/alerts/page-4a622e705e5c4efc.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/{page-0858623d4e6bc8d9.js → page-31f4cbfce77ceaea.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/overview/page-537c17c4126f970d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-dcb7a8b427eac378.js +10 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-fe66d16bbf50730a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/page-73e504f021474182.js +1 -0
- package/app/.next-cli-build/static/chunks/app/_global-error/page-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/alerts/test/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/login/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/status/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cache/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/combos/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/health/providers/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/health/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/health/stream/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/init/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/keys/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/locale/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/alias/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/availability/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/custom/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/test/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pricing/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/freebuff-profile/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/health-timeline/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/qwencloud-profile/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/v0-profile/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/vault-pool/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/zenmux-plans/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/client/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/database/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/shutdown/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/swarm/active/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/swarm/stream/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tags/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/load/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/save/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/send/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/history/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/meta/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/retry-stats/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/models/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/search/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/version/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/version/update/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/page-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-ef8b722482bf88a8.js +1 -0
- package/app/.next-cli-build/static/css/a71a7af7805ce8e8.css +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/package.json +1 -1
- package/app/public/providers/featherless.svg +8 -0
- package/app/public/providers/moonshot.svg +8 -0
- package/app/public/providers/perplexity-agent.svg +13 -0
- package/app/public/providers/qwencloud.svg +6 -0
- package/app/src/lib/network/pickProxyPoolId.js +38 -0
- package/package.json +1 -1
- package/app/.next-cli-build/server/chunks/8142.js +0 -1
- package/app/.next-cli-build/static/chunks/1321-c2673b86ae099f7a.js +0 -1
- package/app/.next-cli-build/static/chunks/5497-4a46de726a80ec4c.js +0 -7
- package/app/.next-cli-build/static/chunks/705-88c44a85ef2fa706.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/alerts/page-9f05c495f92fb578.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/overview/page-02c60e92de70e467.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-bc74cf85727e59c8.js +0 -10
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-88b8c16ff41dc468.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/page-2ebb6e5a67759dda.js +0 -1
- package/app/.next-cli-build/static/chunks/app/_global-error/page-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/alerts/test/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/login/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/status/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cache/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/combos/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/health/providers/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/health/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/health/stream/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/init/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/keys/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/locale/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/alias/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/availability/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/custom/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/test/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pricing/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/freebuff-profile/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/health-timeline/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/v0-profile/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/vault-pool/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/zenmux-plans/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/client/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/database/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/shutdown/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/swarm/active/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/swarm/stream/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tags/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/load/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/save/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/send/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/history/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/meta/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/retry-stats/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/models/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/search/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/version/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/version/update/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/page-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-7321cb331506637b.js +0 -1
- package/app/.next-cli-build/static/css/a024ae3118bec883.css +0 -1
- package/app/.next-cli-build/static/p-3kW8XDeBLQg0sl_rzmI/_buildManifest.js +0 -1
- /package/app/.next-cli-build/static/{p-3kW8XDeBLQg0sl_rzmI → 23aWRrHmOJ1Tzk56dkLJB}/_ssgManifest.js +0 -0
- /package/app/cli/.build-home/AppData/Roaming/extremerouter/db/backups/{upgrade-0.6.5-to-0.6.6-0.6.6-20260707-011739 → upgrade-0.6.9-to-0.7.0-0.7.0-20260715-111110}/data.sqlite +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3649],{49293:(e,t,s)=>{Promise.resolve().then(s.bind(s,85330))},85330:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>$});var l=s(95155),a=s(12115),r=s(73321),i=s(35497),o=s(11059);let n=/^[a-zA-Z0-9_.\-]+$/,c=[{value:"fallback",label:"Fallback",desc:"Try models in order, next on failure",icon:"layers"},{value:"round-robin",label:"Round Robin",desc:"Rotate models across requests",icon:"cached"},{value:"fusion",label:"Fusion",desc:"Parallel panel + judge synthesis",icon:"hub"},{value:"swarm",label:"Swarm",desc:"Hierarchical Manager→Staff→Workers",icon:"account_tree"}],d={fallback:{icon:"layers",color:"#3B82F6",badge:"info"},"round-robin":{icon:"cached",color:"#10B981",badge:"success"},fusion:{icon:"hub",color:"#8B5CF6",badge:"primary"},swarm:{icon:"account_tree",color:"#F59E0B",badge:"warning"}};function m(e){return d[e]||d.fallback}function x(e){let t=c.find(t=>t.value===e);return t?.label||"Fallback"}let u=[{value:"all",label:"All"},{value:"fallback",label:"Fallback"},{value:"round-robin",label:"Round Robin"},{value:"fusion",label:"Fusion"},{value:"swarm",label:"Swarm"}],p=[{value:"name",label:"Name"},{value:"models-desc",label:"Most Models"},{value:"models-asc",label:"Fewest Models"}];function h({combos:e,comboStrategies:t,activeProviders:s,onViewCombos:a,onCreate:r}){let o=e.length,n=function(e){let t=new Set;for(let s of e)for(let e of s.models||[])t.add(e);return t.size}(e),c=function(e,t){let s={fallback:0,"round-robin":0,fusion:0,swarm:0};for(let l of e){let e=t[l.name]?.fallbackStrategy||"fallback";s[e]=(s[e]||0)+1}return s}(e,t),d=Object.values(c).filter(e=>e>0).length,u=o>0?Math.round(e.reduce((e,t)=>e+(t.models?.length||0),0)/o*10)/10:0,p=Math.max(...Object.values(c),1);return(0,l.jsxs)("div",{className:"flex flex-col gap-5",children:[(0,l.jsx)("div",{className:"grid grid-cols-2 gap-3 lg:grid-cols-4",children:[{label:"Total Combos",value:o,icon:"layers",color:"#3B82F6"},{label:"Unique Models",value:n,icon:"model_training",color:"#10B981"},{label:"Strategies Used",value:d,icon:"account_tree",color:"#8B5CF6"},{label:"Avg Models/Combo",value:u,icon:"analytics",color:"#F59E0B"}].map(e=>(0,l.jsx)(i.Zp,{padding:"sm",children:(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[(0,l.jsx)("div",{className:"flex size-9 shrink-0 items-center justify-center rounded-lg",style:{backgroundColor:`${e.color}15`},children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",style:{color:e.color},children:e.icon})}),(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{className:"font-mono text-lg font-bold text-text-main",children:e.value}),(0,l.jsx)("p",{className:"text-[10px] uppercase tracking-wide text-text-muted",children:e.label})]})]})},e.label))}),(0,l.jsxs)(i.Zp,{children:[(0,l.jsxs)("div",{className:"mb-3",children:[(0,l.jsx)("h3",{className:"text-sm font-semibold text-text-main",children:"Strategy Distribution"}),(0,l.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:"How combos are distributed across routing strategies"})]}),(0,l.jsx)("div",{className:"flex flex-col gap-2.5",children:Object.entries(c).map(([e,t])=>{let s=m(e),a=o>0?Math.round(t/o*100):0;return(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[(0,l.jsxs)("div",{className:"flex w-28 items-center gap-1.5",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",style:{color:s.color},children:s.icon}),(0,l.jsx)("span",{className:"text-xs font-medium text-text-main",children:x(e)})]}),(0,l.jsx)("div",{className:"flex-1 overflow-hidden rounded-full bg-surface-2",children:(0,l.jsx)("div",{className:"h-2.5 rounded-full transition-all",style:{width:`${t/p*100}%`,backgroundColor:s.color}})}),(0,l.jsxs)("span",{className:"w-16 text-right font-mono text-xs text-text-muted",children:[t," (",a,"%)"]})]},e)})})]}),(0,l.jsxs)(i.Zp,{children:[(0,l.jsxs)("div",{className:"mb-3 flex items-center justify-between",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("h3",{className:"text-sm font-semibold text-text-main",children:"Combo Health"}),(0,l.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:"Overview of each combo's status"})]}),(0,l.jsx)(i.$n,{size:"sm",variant:"ghost",icon:"list_alt",onClick:a,children:"View All"})]}),0===e.length?(0,l.jsxs)("div",{className:"py-6 text-center text-sm text-text-muted",children:["No combos yet. ",(0,l.jsx)("button",{onClick:r,className:"text-primary hover:underline",children:"Create one →"})]}):(0,l.jsx)("div",{className:"flex flex-col gap-2",children:e.map(e=>{let a=t[e.name]?.fallbackStrategy||"fallback",r=m(a),o=(e.models||[]).filter(e=>{let t=e.split("/")[0];return s.some(e=>e.provider===t&&!1!==e.isActive)}).length,n=(e.models||[]).length,c=n>0?Math.round(o/n*100):0;return(0,l.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle px-3 py-2 hover:bg-sidebar/30",children:[(0,l.jsx)("div",{className:"flex size-7 shrink-0 items-center justify-center rounded",style:{backgroundColor:`${r.color}15`},children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[15px]",style:{color:r.color},children:r.icon})}),(0,l.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,l.jsx)("code",{className:"truncate font-mono text-xs font-medium",children:e.name}),(0,l.jsxs)("div",{className:"flex items-center gap-2 mt-0.5",children:[(0,l.jsx)(i.Ex,{variant:r.badge,size:"sm",children:x(a)}),(0,l.jsxs)("span",{className:"text-[10px] text-text-muted",children:[n," models"]})]})]}),(0,l.jsxs)("div",{className:"hidden sm:flex items-center gap-2 shrink-0",children:[(0,l.jsx)("div",{className:"w-20 overflow-hidden rounded-full bg-surface-2",children:(0,l.jsx)("div",{className:`h-1.5 rounded-full ${c>=80?"bg-success":c>=50?"bg-warning":"bg-danger"}`,style:{width:`${c}%`}})}),(0,l.jsxs)("span",{className:"w-8 text-right font-mono text-[10px] text-text-muted",children:[o,"/",n]})]})]},e.id)})})]})]})}function b({combo:e,modelCaps:t={},activeProviders:s=[],copied:r,onCopy:o,onEdit:n,onDelete:d,strategy:u={},onSetStrategy:p}){let[h,g]=(0,a.useState)(!1),[f,j]=(0,a.useState)(!1),[v,y]=(0,a.useState)(null),N=u.fallbackStrategy||"fallback",w=u.judgeModel||"",k="fusion"===N,C="swarm"===N,S=u.managerModel||"",M=u.staffModel||"",$=u.auditModel||"",E=m(N);return(0,l.jsxs)(i.Zp,{padding:"sm",className:"group transition-all hover:border-primary/20",children:[(0,l.jsxs)("div",{className:"flex min-w-0 flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,l.jsxs)("button",{className:"flex min-w-0 flex-1 items-start gap-3 text-left sm:items-center",onClick:()=>g(!h),children:[(0,l.jsx)("div",{className:"flex size-8 shrink-0 items-center justify-center rounded-lg",style:{backgroundColor:`${E.color}15`},children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",style:{color:E.color},children:E.icon})}),(0,l.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("code",{className:"truncate font-mono text-sm font-medium",children:e.name}),(0,l.jsx)(i.Ex,{variant:E.badge,size:"sm",children:x(N)}),(0,l.jsxs)("span",{className:"text-[10px] text-text-muted",children:[e.models.length," models"]})]}),(0,l.jsxs)("div",{className:"mt-1 flex min-w-0 flex-wrap items-center gap-1",children:[0===e.models.length?(0,l.jsx)("span",{className:"text-xs text-text-muted italic",children:"No models"}):e.models.slice(0,3).map((e,s)=>(0,l.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,l.jsx)("span",{className:"truncate max-w-[120px]",children:e}),t[e]&&(0,l.jsx)(i.nh,{caps:t[e],size:11})]},s)),e.models.length>3&&(0,l.jsxs)("span",{className:"text-[10px] text-text-muted",children:["+",e.models.length-3," more"]})]})]}),(0,l.jsx)("span",{className:`shrink-0 text-text-muted transition-transform ${h?"rotate-180":""}`,children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"expand_more"})})]}),(0,l.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,l.jsx)("div",{className:"w-full sm:w-[180px]",children:(0,l.jsx)(i.l6,{options:c,value:N,onChange:e=>p({fallbackStrategy:e.target.value}),selectClassName:"py-1.5 text-xs"})}),(0,l.jsxs)("div",{className:"grid grid-cols-3 gap-1 sm:flex",children:[(0,l.jsxs)("button",{onClick:t=>{t.stopPropagation(),o(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,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:r===`combo-${e.id}`?"check":"content_copy"}),(0,l.jsx)("span",{className:"text-[10px] leading-tight",children:"Copy"})]}),(0,l.jsxs)("button",{onClick:n,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,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,l.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,l.jsxs)("button",{onClick:d,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,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,l.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]})]})]}),h&&(0,l.jsxs)("div",{className:"mt-3 border-t border-border-subtle pt-3",children:[(0,l.jsxs)("div",{className:"mb-3",children:[(0,l.jsxs)("p",{className:"text-[10px] uppercase tracking-wide text-text-muted mb-1.5",children:["Models (",e.models.length,")"]}),(0,l.jsx)("div",{className:"flex flex-col gap-1",children:e.models.map((e,s)=>(0,l.jsxs)("div",{className:"flex items-center gap-2 rounded px-2 py-1 bg-black/[0.02] dark:bg-white/[0.02]",children:[(0,l.jsx)("span",{className:"text-[10px] font-medium text-text-muted w-4 text-center",children:s+1}),(0,l.jsx)("code",{className:"min-w-0 flex-1 truncate font-mono text-xs text-text-main",children:e}),t[e]&&(0,l.jsx)(i.nh,{caps:t[e],size:11})]},s))})]}),k&&(0,l.jsxs)("div",{className:"mb-3",children:[(0,l.jsx)("p",{className:"text-[10px] uppercase tracking-wide text-text-muted mb-1.5",children:"Fusion Judge"}),(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsxs)("button",{onClick:()=>j(!0),className:"inline-flex max-w-full items-center gap-1 rounded border border-dashed border-primary/40 px-2 py-1 font-mono text-xs text-primary hover:border-primary hover:bg-primary/5",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"gavel"}),(0,l.jsx)("span",{className:"truncate",children:w||`Auto — ${e.models[0]||"first model"}`})]}),w&&(0,l.jsx)("button",{onClick:()=>p({judgeModel:""}),className:"p-1 rounded text-text-muted hover:text-red-500 hover:bg-red-500/10",title:"Reset to Auto",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})]}),C&&(0,l.jsxs)("div",{className:"mb-3",children:[(0,l.jsx)("p",{className:"text-[10px] uppercase tracking-wide text-text-muted mb-1.5",children:"Swarm Roles"}),(0,l.jsxs)("div",{className:"flex flex-col gap-1.5",children:[[{key:"manager",label:"Manager",icon:"psychology",value:S,placeholder:`Auto — ${e.models[0]||"first"}`},{key:"staff",label:"Staff",icon:"badge",value:M,placeholder:"Same as Manager"},{key:"audit",label:"Audit",icon:"fact_check",value:$,placeholder:"Same as Staff"}].map(e=>(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"text-xs font-medium text-text-muted w-16",children:e.label}),(0,l.jsxs)("button",{onClick:()=>y(e.key),className:"inline-flex max-w-full items-center gap-1 rounded border border-dashed border-primary/40 px-2 py-0.5 font-mono text-[11px] text-primary hover:border-primary hover:bg-primary/5",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:e.icon}),(0,l.jsx)("span",{className:"truncate",children:e.value||e.placeholder})]}),e.value&&(0,l.jsx)("button",{onClick:()=>p({[`${e.key}Model`]:""}),className:"p-0.5 rounded text-text-muted hover:text-red-500 hover:bg-red-500/10",title:`Reset ${e.label}`,children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"close"})})]},e.key)),(0,l.jsxs)("div",{className:"flex items-center gap-2 text-[11px] text-text-muted",children:[(0,l.jsx)("span",{className:"font-medium",children:"Workers"}),(0,l.jsxs)("span",{children:["= combo models (",e.models.length,")"]}),(0,l.jsx)("span",{className:"text-text-subtle",children:"\xb7"}),(0,l.jsx)("a",{href:"/dashboard/swarm",className:"text-primary hover:underline",children:"Telemetry →"})]})]})]}),(0,l.jsxs)("div",{className:"text-xs text-text-muted bg-black/[0.02] dark:bg-white/[0.02] rounded px-2 py-1.5",children:[(0,l.jsxs)("span",{className:"font-medium",children:[x(N),":"]})," ",c.find(e=>e.value===N)?.desc]})]}),(0,l.jsx)(i.rq,{isOpen:f,onClose:()=>j(!1),onSelect:e=>{p({judgeModel:e?.value||""}),j(!1)},activeProviders:s,title:"Select Judge Model",addedModelValues:w?[w]:[],closeOnSelect:!0}),v&&(0,l.jsx)(i.rq,{isOpen:!0,onClose:()=>y(null),onSelect:e=>{p({[`${v}Model`]:e?.value||""}),y(null)},activeProviders:s,title:`Select ${"manager"===v?"Manager":"staff"===v?"Staff":"Audit"} Model`,addedModelValues:[],closeOnSelect:!0})]})}function g({combos:e,modelCaps:t,activeProviders:s,comboStrategies:r,copied:o,copy:n,onEdit:c,onDelete:d,onSetStrategy:m,onCreate:x}){let[h,f]=(0,a.useState)(""),[j,v]=(0,a.useState)("all"),[y,N]=(0,a.useState)("name"),w=(0,a.useMemo)(()=>{var t;let s;return t=function(e,t,s,l){let a=e;if("all"!==s&&(a=a.filter(e=>(l[e.name]?.fallbackStrategy||"fallback")===s)),t.trim()){let e=t.trim().toLowerCase();a=a.filter(t=>t.name.toLowerCase().includes(e)||(t.models||[]).some(t=>t.toLowerCase().includes(e)))}return a}(e,h,j,r),s=[...t],"models-desc"===y?s.sort((e,t)=>(t.models?.length||0)-(e.models?.length||0)):"models-asc"===y?s.sort((e,t)=>(e.models?.length||0)-(t.models?.length||0)):s.sort((e,t)=>e.name.localeCompare(t.name)),s},[e,h,j,y,r]);return 0===e.length?(0,l.jsx)(i.pp,{icon:"layers",title:"No combos yet",description:"Create model combos with fallback, round-robin, fusion, or swarm strategies",actionText:"Create Combo",onAction:x}):(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,l.jsx)(i.pd,{placeholder:"Search combos or models...",value:h,onChange:e=>f(e.target.value),className:"sm:max-w-xs"}),(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("div",{className:"flex flex-wrap gap-1",children:u.map(e=>(0,l.jsx)("button",{onClick:()=>v(e.value),className:`rounded-full px-2.5 py-1 text-xs font-medium transition-colors ${j===e.value?"bg-primary/15 text-primary ring-1 ring-primary/20":"bg-surface-2 text-text-muted hover:text-text-main"}`,children:e.label},e.value))}),(0,l.jsx)("select",{value:y,onChange:e=>N(e.target.value),className:"appearance-none rounded-lg border border-border bg-surface-2 py-1.5 pl-3 pr-8 text-xs text-text-main [-webkit-appearance:none] [-moz-appearance:none] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/30",children:p.map(e=>(0,l.jsx)("option",{value:e.value,children:e.label},e.value))})]})]}),(0,l.jsx)("p",{className:"text-xs text-text-muted",children:w.length===e.length?`${e.length} combo${1!==e.length?"s":""}`:`${w.length} of ${e.length} combos`}),0===w.length?(0,l.jsx)(i.Zp,{children:(0,l.jsxs)("div",{className:"py-8 text-center text-sm text-text-muted",children:['No combos match "',h,'" ',"all"!==j&&`with ${j} strategy`]})}):(0,l.jsx)("div",{className:"flex flex-col gap-3",children:w.map(e=>(0,l.jsx)(b,{combo:e,modelCaps:t,activeProviders:s,copied:o,onCopy:n,onEdit:()=>c(e),onDelete:()=>d(e.id),strategy:r[e.name]||{},onSetStrategy:t=>m(e.name,t)},e.id))})]})}let f=[{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 j({combos:e,connections:t,onApply:s}){let[r,o]=(0,a.useState)(null),n=new Set(t?.filter(e=>!1!==e.isActive).map(e=>e.provider)||[]),c=new Set((e||[]).map(e=>e.name)),d=async e=>{o(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{o(null)}};return 0===f.length?(0,l.jsx)(i.pp,{icon:"dashboard_customize",title:"No templates available",description:"Combo templates will appear here when added."}):(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsxs)("div",{className:"mb-1",children:[(0,l.jsx)("h2",{className:"text-sm font-semibold text-text-main",children:"Combo Templates"}),(0,l.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:"One-click prebuilt combos. Provider availability is checked automatically."})]}),(0,l.jsx)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:f.map(e=>{let t=(e.requiredProviders||[]).filter(e=>n.has(e)).length,s=(e.requiredProviders||[]).length,a=c.has(e.name),o=m(e.strategy);return(0,l.jsxs)(i.Zp,{padding:"sm",className:"flex flex-col gap-3 hover:border-primary/20 transition-all",children:[(0,l.jsxs)("div",{className:"flex items-start justify-between",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,l.jsx)("div",{className:"flex size-9 shrink-0 items-center justify-center rounded-lg",style:{backgroundColor:`${o.color}15`},children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",style:{color:o.color},children:e.icon||o.icon})}),(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{className:"text-sm font-semibold text-text-main",children:e.name}),(0,l.jsx)(i.Ex,{variant:o.badge,size:"sm",children:x(e.strategy)})]})]}),a&&(0,l.jsx)(i.Ex,{variant:"success",size:"sm",dot:!0,children:"Created"})]}),(0,l.jsx)("p",{className:"text-xs text-text-muted leading-relaxed",children:e.description}),(0,l.jsxs)("div",{className:"flex flex-wrap gap-1",children:[(e.models||[]).slice(0,4).map((e,t)=>(0,l.jsx)("code",{className:"inline-flex items-center rounded bg-black/5 px-1.5 py-0.5 font-mono text-[10px] text-text-muted dark:bg-white/5",children:e},t)),(e.models||[]).length>4&&(0,l.jsxs)("span",{className:"text-[10px] text-text-muted",children:["+",(e.models||[]).length-4," more"]})]}),(0,l.jsx)("div",{className:"flex flex-wrap gap-1",children:(e.requiredProviders||[]).map(e=>{let t=n.has(e);return(0,l.jsxs)("span",{className:`inline-flex items-center gap-0.5 rounded-full px-1.5 py-0.5 text-[10px] font-medium ${t?"bg-success/10 text-success":"bg-surface-2 text-text-muted"}`,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[10px]",children:t?"check_circle":"radio_button_unchecked"}),e]},e)})}),(0,l.jsx)("div",{className:"mt-auto pt-1",children:(0,l.jsx)(i.$n,{size:"sm",fullWidth:!0,variant:a?"secondary":"primary",icon:r===e.id?"progress_activity":"add",disabled:a||r===e.id,onClick:()=>d(e),children:r===e.id?"Creating...":a?"Already Created":t===s?"Apply Template":`Apply (${t}/${s} ready)`})})]},e.id)})})]})}var v=s(44923),y=s(87256),N=s(5020),w=s(39768);function k({id:e,index:t,model:s,isFirst:r,isLast:o,modelCaps:n,onEdit:c,onMoveUp:d,onMoveDown:m,onRemove:x}){let{attributes:u,listeners:p,setNodeRef:h,transform:b,isDragging:g}=(0,y.gl)({id:e}),f={transform:w.Ks.Transform.toString(b),opacity:g?.5:1,zIndex:g?999:void 0},[j,v]=(0,a.useState)(!1),[N,C]=(0,a.useState)(s),S=()=>{let e=N.trim();e&&e!==s?c(e):C(s),v(!1)};return(0,l.jsxs)("div",{ref:h,style:f,className:`group flex min-w-0 items-center gap-2 rounded-lg border px-2.5 py-1.5 transition-all ${g?"border-primary/40 bg-panel shadow-md ring-1 ring-primary/20":"border-transparent bg-panel hover:border-border-subtle"}`,children:[(0,l.jsx)("span",{className:"flex size-5 shrink-0 items-center justify-center rounded bg-primary/10 text-[10px] font-bold text-primary",children:t+1}),(0,l.jsx)("button",{...u,...p,type:"button",className:"cursor-grab touch-none shrink-0 p-0.5 rounded text-text-muted/50 hover:text-text-main active:cursor-grabbing",title:"Drag to reorder",children:(0,l.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,l.jsx)("circle",{cx:"9",cy:"4",r:"1.5"}),(0,l.jsx)("circle",{cx:"15",cy:"4",r:"1.5"}),(0,l.jsx)("circle",{cx:"9",cy:"12",r:"1.5"}),(0,l.jsx)("circle",{cx:"15",cy:"12",r:"1.5"}),(0,l.jsx)("circle",{cx:"9",cy:"20",r:"1.5"}),(0,l.jsx)("circle",{cx:"15",cy:"20",r:"1.5"})]})}),j?(0,l.jsx)("input",{autoFocus:!0,value:N,onChange:e=>C(e.target.value),onBlur:S,onKeyDown:e=>{"Enter"===e.key&&S(),"Escape"===e.key&&(C(s),v(!1))},className:"min-w-0 flex-1 rounded border border-primary/40 bg-panel px-1.5 py-0.5 font-mono text-xs text-text-main outline-none"}):(0,l.jsxs)("div",{className:"flex min-w-0 flex-1 items-center gap-1.5 cursor-text rounded px-1 py-0.5 hover:bg-black/[0.03] dark:hover:bg-white/[0.03]",onClick:()=>v(!0),title:"Click to edit",children:[(0,l.jsx)("code",{className:"min-w-0 flex-1 truncate font-mono text-xs text-text-main",children:s}),n?.[s]&&(0,l.jsx)(i.nh,{caps:n[s],size:11})]}),(0,l.jsxs)("div",{className:"flex shrink-0 items-center gap-0.5 opacity-0 transition-opacity group-hover:opacity-100",children:[(0,l.jsx)("button",{onClick:d,disabled:r,className:`rounded p-1 transition-colors ${r?"cursor-not-allowed text-text-muted/20":"text-text-muted hover:bg-black/5 hover:text-primary dark:hover:bg-white/5"}`,title:"Move up",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"arrow_upward"})}),(0,l.jsx)("button",{onClick:m,disabled:o,className:`rounded p-1 transition-colors ${o?"cursor-not-allowed text-text-muted/20":"text-text-muted hover:bg-black/5 hover:text-primary dark:hover:bg-white/5"}`,title:"Move down",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"arrow_downward"})})]}),(0,l.jsx)("button",{onClick:x,className:"shrink-0 rounded p-1 text-text-muted opacity-0 transition-all hover:bg-danger/10 hover:text-danger group-hover:opacity-100",title:"Remove model",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})}function C({isOpen:e,combo:t,onClose:s,onSave:r,activeProviders:o,modelCaps:d={},kindFilter:m=null}){let[x,u]=(0,a.useState)(t?.name||""),[p,h]=(0,a.useState)(t?.models||[]),[b,g]=(0,a.useState)(!1),[f,j]=(0,a.useState)(!1),[w,S]=(0,a.useState)(""),[M,$]=(0,a.useState)({}),E=(0,v.FR)((0,v.MS)(v.AN,{activationConstraint:{distance:5}}),(0,v.MS)(v.uN,{coordinateGetter:y.JR})),z=p.map((e,t)=>({uid:`item-${t}`,model:e}));(0,a.useEffect)(()=>{e&&(async()=>{try{let e=await fetch("/api/models/alias");if(e.ok){let t=await e.json();$(t.aliases||{})}}catch{}})()},[e]);let F=e=>e.trim()?n.test(e)?(S(""),!0):(S("Only letters, numbers, -, _ and . allowed"),!1):(S("Name is required"),!1),O=async()=>{F(x)&&(j(!0),await r({name:x.trim(),models:p}),j(!1))},A=!!t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(i.aF,{isOpen:e,onClose:s,title:A?"Edit Combo":"Create Combo",size:"lg",children:(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(i.pd,{label:"Combo Name",value:x,onChange:e=>{let t=e.target.value;u(t),t?F(t):S("")},placeholder:"my-combo",error:w}),(0,l.jsxs)("div",{className:"mt-1.5 flex items-center gap-2",children:[(0,l.jsx)("p",{className:"text-[10px] text-text-muted",children:"Use this name as the model in your client:"}),x.trim()&&(0,l.jsx)("code",{className:"rounded bg-primary/10 px-1.5 py-0.5 font-mono text-[10px] text-primary",children:x.trim()})]})]}),(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:"mb-2 flex items-center justify-between",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("label",{className:"text-sm font-medium text-text-main",children:"Models"}),p.length>0&&(0,l.jsxs)(i.Ex,{variant:"info",size:"sm",children:[p.length," model",1!==p.length?"s":""]})]}),(0,l.jsx)("span",{className:"text-[10px] text-text-muted",children:"Drag to reorder priority"})]}),0===p.length?(0,l.jsxs)("div",{className:"flex flex-col items-center justify-center py-8 border border-dashed border-border rounded-lg bg-surface-2/50",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-2xl mb-2",children:"layers"}),(0,l.jsx)("p",{className:"text-xs text-text-muted mb-3",children:"Add models to build your combo"}),(0,l.jsx)(i.$n,{size:"sm",variant:"secondary",icon:"add",onClick:()=>g(!0),children:"Add First Model"})]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v.Mp,{sensors:E,collisionDetection:v.fp,onDragEnd:e=>{let{active:t,over:s}=e;if(s&&t.id!==s.id){let e=z.findIndex(e=>e.uid===t.id),l=z.findIndex(e=>e.uid===s.id);-1!==e&&-1!==l&&h(t=>(0,y.be)(t,e,l))}},modifiers:[N.FN,N.gj],children:(0,l.jsx)(y.gB,{items:z.map(e=>e.uid),strategy:y._G,children:(0,l.jsx)("div",{className:"flex max-h-[45vh] min-w-0 flex-col gap-1 overflow-y-auto rounded-lg bg-surface-2/30 p-1.5",children:z.map(({uid:e,model:t},s)=>(0,l.jsx)(k,{id:e,index:s,model:t,modelCaps:d,isFirst:0===s,isLast:s===z.length-1,onEdit:e=>{let t=[...p];t[s]=e,h(t)},onMoveUp:()=>(e=>{if(0===e)return;let t=[...p];[t[e-1],t[e]]=[t[e],t[e-1]],h(t)})(s),onMoveDown:()=>(e=>{if(e===p.length-1)return;let t=[...p];[t[e],t[e+1]]=[t[e+1],t[e]],h(t)})(s),onRemove:()=>{h(p.filter((e,t)=>t!==s))}},e))})})}),(0,l.jsxs)("button",{onClick:()=>g(!0),className:"w-full mt-2 py-2 border border-dashed border-primary/30 rounded-lg text-xs text-primary font-medium hover:border-primary hover:bg-primary/5 transition-colors flex items-center justify-center gap-1.5",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"add"}),"Add Model"]})]})]}),p.length>=2&&(0,l.jsxs)("div",{className:"rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2 mb-1.5",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"lightbulb"}),(0,l.jsx)("span",{className:"text-xs font-medium text-text-main",children:"Strategy Tips"})]}),(0,l.jsx)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-2",children:c.map(e=>(0,l.jsxs)("div",{className:"flex items-start gap-1.5 text-[11px] text-text-muted",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[12px] mt-0.5 text-primary/60",children:e.icon}),(0,l.jsxs)("span",{children:[(0,l.jsx)("span",{className:"font-medium text-text-main",children:e.label})," — ",e.desc]})]},e.value))}),(0,l.jsx)("p",{className:"mt-1.5 text-[10px] text-text-muted",children:"Set strategy after creating the combo from the Combos tab."})]}),(0,l.jsxs)("div",{className:"flex flex-col gap-2 pt-1 sm:flex-row",children:[(0,l.jsx)(i.$n,{onClick:s,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,l.jsx)(i.$n,{onClick:O,fullWidth:!0,size:"sm",icon:A?"save":"add",disabled:!x.trim()||!!w||f,children:f?"Saving...":A?"Save Changes":"Create Combo"})]})]})}),(0,l.jsx)(i.rq,{isOpen:b,onClose:()=>g(!1),onSelect:e=>{p.includes(e.value)||h([...p,e.value])},onDeselect:e=>{h(p.filter(t=>t!==e.value))},activeProviders:o,modelAliases:M,title:"Add Model to Combo",kindFilter:m,addedModelValues:p,closeOnSelect:!1})]})}let S=[{value:"overview",label:"Overview"},{value:"combos",label:"Combos"},{value:"templates",label:"Templates"}];function M(){let e=(0,r.useRouter)(),t=(0,r.useSearchParams)().get("tab")||"overview",[s,n]=(0,a.useState)([]),[c,d]=(0,a.useState)(!0),[m,x]=(0,a.useState)(!1),[u,p]=(0,a.useState)(null),[b,f]=(0,a.useState)([]),[v,y]=(0,a.useState)({}),[N,w]=(0,a.useState)({}),[k,M]=(0,a.useState)(null),{copied:$,copy:E}=(0,o.C)(),z=(0,a.useCallback)(async()=>{try{let[e,t,s,l]=await Promise.all([fetch("/api/combos"),fetch("/api/providers"),fetch("/api/settings"),fetch("/api/models")]),a=await e.json(),r=await t.json(),i=s.ok?await s.json():{};if(e.ok&&n((a.combos||[]).filter(e=>!e.kind||"llm"===e.kind)),t.ok&&f(r.connections||[]),l.ok){let e=await l.json(),t={};for(let s of e.models||[])s.caps&&(t[s.fullModel]=s.caps);w(t)}y(i.comboStrategies||{})}catch(e){console.log("Error fetching data:",e)}finally{d(!1)}},[]);(0,a.useEffect)(()=>{z()},[z]);let F=t=>e.push(`/dashboard/combos?tab=${t}`),O=async e=>{try{let t=await fetch("/api/combos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(t.ok)await z(),x(!1);else{let e=await t.json();alert(e.error||"Failed to create combo")}}catch(e){console.log("Error creating combo:",e)}},A=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 z(),p(null);else{let e=await s.json();alert(e.error||"Failed to update combo")}}catch(e){console.log("Error updating combo:",e)}},_=async(e,t)=>{try{let s={...v},l={...s[e]||{},...t};l.fallbackStrategy&&"fallback"!==l.fallbackStrategy?s[e]=l:delete s[e],await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStrategies:s})}),y(s)}catch(e){console.log("Error updating combo strategy:",e)}};return c?(0,l.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,l.jsx)(i.Qv,{}),(0,l.jsx)(i.Qv,{})]}):(0,l.jsxs)("div",{className:"flex min-w-0 flex-col gap-5",children:[(0,l.jsx)(i.zY,{title:"Combos",description:"Group models under one name, then pick a strategy per combo",icon:"layers",actions:(0,l.jsx)(i.$n,{size:"sm",icon:"add",onClick:()=>x(!0),className:"whitespace-nowrap",children:"Create Combo"})}),(0,l.jsx)(i.Iz,{options:S,value:t,onChange:F}),"overview"===t&&(0,l.jsx)(h,{combos:s,comboStrategies:v,activeProviders:b,onViewCombos:()=>F("combos"),onCreate:()=>x(!0)}),"combos"===t&&(0,l.jsx)(g,{combos:s,modelCaps:N,activeProviders:b,comboStrategies:v,copied:$,copy:E,onEdit:p,onDelete:e=>{M({title:"Delete Combo",message:"Delete this combo?",onConfirm:async()=>{M(null);try{(await fetch(`/api/combos/${e}`,{method:"DELETE"})).ok&&n(s.filter(t=>t.id!==e))}catch(e){console.log("Error deleting combo:",e)}}})},onSetStrategy:_,onCreate:()=>x(!0)}),"templates"===t&&(0,l.jsx)(j,{combos:s,connections:b,onApply:z}),(0,l.jsx)(C,{isOpen:m,onClose:()=>x(!1),onSave:O,activeProviders:b,modelCaps:N},"create"),(0,l.jsx)(C,{isOpen:!!u,combo:u,onClose:()=>p(null),onSave:e=>A(u.id,e),activeProviders:b,modelCaps:N},u?.id||"new"),(0,l.jsx)(i.uo,{isOpen:!!k,onClose:()=>M(null),onConfirm:k?.onConfirm,title:k?.title||"Confirm",message:k?.message,variant:"danger"})]})}function $(){return(0,l.jsx)(a.Suspense,{fallback:(0,l.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,l.jsx)("div",{className:"h-32 animate-pulse rounded-lg bg-sidebar"}),(0,l.jsx)("div",{className:"h-32 animate-pulse rounded-lg bg-sidebar"})]}),children:(0,l.jsx)(M,{})})}}},e=>{e.O(0,[27,7055,1321,705,5497,8441,3794,7358],()=>e(e.s=49293)),_N_E=e.O()}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3649],{49293:(e,t,s)=>{Promise.resolve().then(s.bind(s,85330))},85330:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>$});var l=s(95155),a=s(12115),r=s(73321),i=s(35497),o=s(11059);let n=/^[a-zA-Z0-9_.\-]+$/,c=[{value:"fallback",label:"Fallback",desc:"Try models in order, next on failure",icon:"layers"},{value:"round-robin",label:"Round Robin",desc:"Rotate models across requests",icon:"cached"},{value:"fusion",label:"Fusion",desc:"Parallel panel + judge synthesis",icon:"hub"},{value:"swarm",label:"Swarm",desc:"Hierarchical Manager→Staff→Workers",icon:"account_tree"}],d={fallback:{icon:"layers",color:"#3B82F6",badge:"info"},"round-robin":{icon:"cached",color:"#10B981",badge:"success"},fusion:{icon:"hub",color:"#8B5CF6",badge:"primary"},swarm:{icon:"account_tree",color:"#F59E0B",badge:"warning"}};function m(e){return d[e]||d.fallback}function x(e){let t=c.find(t=>t.value===e);return t?.label||"Fallback"}let u=[{value:"all",label:"All"},{value:"fallback",label:"Fallback"},{value:"round-robin",label:"Round Robin"},{value:"fusion",label:"Fusion"},{value:"swarm",label:"Swarm"}],p=[{value:"name",label:"Name"},{value:"models-desc",label:"Most Models"},{value:"models-asc",label:"Fewest Models"}];function h({combos:e,comboStrategies:t,activeProviders:s,onViewCombos:a,onCreate:r}){let o=e.length,n=function(e){let t=new Set;for(let s of e)for(let e of s.models||[])t.add(e);return t.size}(e),c=function(e,t){let s={fallback:0,"round-robin":0,fusion:0,swarm:0};for(let l of e){let e=t[l.name]?.fallbackStrategy||"fallback";s[e]=(s[e]||0)+1}return s}(e,t),d=Object.values(c).filter(e=>e>0).length,u=o>0?Math.round(e.reduce((e,t)=>e+(t.models?.length||0),0)/o*10)/10:0,p=Math.max(...Object.values(c),1);return(0,l.jsxs)("div",{className:"flex flex-col gap-5",children:[(0,l.jsx)("div",{className:"grid grid-cols-2 gap-3 lg:grid-cols-4",children:[{label:"Total Combos",value:o,icon:"layers",color:"#3B82F6"},{label:"Unique Models",value:n,icon:"model_training",color:"#10B981"},{label:"Strategies Used",value:d,icon:"account_tree",color:"#8B5CF6"},{label:"Avg Models/Combo",value:u,icon:"analytics",color:"#F59E0B"}].map(e=>(0,l.jsx)(i.Zp,{padding:"sm",children:(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[(0,l.jsx)("div",{className:"flex size-9 shrink-0 items-center justify-center rounded-lg",style:{backgroundColor:`${e.color}15`},children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",style:{color:e.color},children:e.icon})}),(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{className:"font-mono text-lg font-bold text-text-main",children:e.value}),(0,l.jsx)("p",{className:"text-[10px] uppercase tracking-wide text-text-muted",children:e.label})]})]})},e.label))}),(0,l.jsxs)(i.Zp,{children:[(0,l.jsxs)("div",{className:"mb-3",children:[(0,l.jsx)("h3",{className:"text-sm font-semibold text-text-main",children:"Strategy Distribution"}),(0,l.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:"How combos are distributed across routing strategies"})]}),(0,l.jsx)("div",{className:"flex flex-col gap-2.5",children:Object.entries(c).map(([e,t])=>{let s=m(e),a=o>0?Math.round(t/o*100):0;return(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[(0,l.jsxs)("div",{className:"flex w-28 items-center gap-1.5",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",style:{color:s.color},children:s.icon}),(0,l.jsx)("span",{className:"text-xs font-medium text-text-main",children:x(e)})]}),(0,l.jsx)("div",{className:"flex-1 overflow-hidden rounded-full bg-surface-2",children:(0,l.jsx)("div",{className:"h-2.5 rounded-full transition-all",style:{width:`${t/p*100}%`,backgroundColor:s.color}})}),(0,l.jsxs)("span",{className:"w-16 text-right font-mono text-xs text-text-muted",children:[t," (",a,"%)"]})]},e)})})]}),(0,l.jsxs)(i.Zp,{children:[(0,l.jsxs)("div",{className:"mb-3 flex items-center justify-between",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("h3",{className:"text-sm font-semibold text-text-main",children:"Combo Health"}),(0,l.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:"Overview of each combo's status"})]}),(0,l.jsx)(i.$n,{size:"sm",variant:"ghost",icon:"list_alt",onClick:a,children:"View All"})]}),0===e.length?(0,l.jsxs)("div",{className:"py-6 text-center text-sm text-text-muted",children:["No combos yet. ",(0,l.jsx)("button",{onClick:r,className:"text-primary hover:underline",children:"Create one →"})]}):(0,l.jsx)("div",{className:"flex flex-col gap-2",children:e.map(e=>{let a=t[e.name]?.fallbackStrategy||"fallback",r=m(a),o=(e.models||[]).filter(e=>{let t=e.split("/")[0];return s.some(e=>e.provider===t&&!1!==e.isActive)}).length,n=(e.models||[]).length,c=n>0?Math.round(o/n*100):0;return(0,l.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle px-3 py-2 hover:bg-sidebar/30",children:[(0,l.jsx)("div",{className:"flex size-7 shrink-0 items-center justify-center rounded",style:{backgroundColor:`${r.color}15`},children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[15px]",style:{color:r.color},children:r.icon})}),(0,l.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,l.jsx)("code",{className:"truncate font-mono text-xs font-medium",children:e.name}),(0,l.jsxs)("div",{className:"flex items-center gap-2 mt-0.5",children:[(0,l.jsx)(i.Ex,{variant:r.badge,size:"sm",children:x(a)}),(0,l.jsxs)("span",{className:"text-[10px] text-text-muted",children:[n," models"]})]})]}),(0,l.jsxs)("div",{className:"hidden sm:flex items-center gap-2 shrink-0",children:[(0,l.jsx)("div",{className:"w-20 overflow-hidden rounded-full bg-surface-2",children:(0,l.jsx)("div",{className:`h-1.5 rounded-full ${c>=80?"bg-success":c>=50?"bg-warning":"bg-danger"}`,style:{width:`${c}%`}})}),(0,l.jsxs)("span",{className:"w-8 text-right font-mono text-[10px] text-text-muted",children:[o,"/",n]})]})]},e.id)})})]})]})}function b({combo:e,modelCaps:t={},activeProviders:s=[],copied:r,onCopy:o,onEdit:n,onDelete:d,strategy:u={},onSetStrategy:p}){let[h,g]=(0,a.useState)(!1),[f,j]=(0,a.useState)(!1),[v,y]=(0,a.useState)(null),N=u.fallbackStrategy||"fallback",w=u.judgeModel||"",k="fusion"===N,C="swarm"===N,S=u.managerModel||"",M=u.staffModel||"",$=u.auditModel||"",E=m(N);return(0,l.jsxs)(i.Zp,{padding:"sm",className:"group transition-all hover:border-primary/20",children:[(0,l.jsxs)("div",{className:"flex min-w-0 flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,l.jsxs)("button",{className:"flex min-w-0 flex-1 items-start gap-3 text-left sm:items-center",onClick:()=>g(!h),children:[(0,l.jsx)("div",{className:"flex size-8 shrink-0 items-center justify-center rounded-lg",style:{backgroundColor:`${E.color}15`},children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",style:{color:E.color},children:E.icon})}),(0,l.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("code",{className:"truncate font-mono text-sm font-medium",children:e.name}),(0,l.jsx)(i.Ex,{variant:E.badge,size:"sm",children:x(N)}),(0,l.jsxs)("span",{className:"text-[10px] text-text-muted",children:[e.models.length," models"]})]}),(0,l.jsxs)("div",{className:"mt-1 flex min-w-0 flex-wrap items-center gap-1",children:[0===e.models.length?(0,l.jsx)("span",{className:"text-xs text-text-muted italic",children:"No models"}):e.models.slice(0,3).map((e,s)=>(0,l.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,l.jsx)("span",{className:"truncate max-w-[120px]",children:e}),t[e]&&(0,l.jsx)(i.nh,{caps:t[e],size:11})]},s)),e.models.length>3&&(0,l.jsxs)("span",{className:"text-[10px] text-text-muted",children:["+",e.models.length-3," more"]})]})]}),(0,l.jsx)("span",{className:`shrink-0 text-text-muted transition-transform ${h?"rotate-180":""}`,children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"expand_more"})})]}),(0,l.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,l.jsx)("div",{className:"w-full sm:w-[180px]",children:(0,l.jsx)(i.l6,{options:c,value:N,onChange:e=>p({fallbackStrategy:e.target.value}),selectClassName:"py-1.5 text-xs"})}),(0,l.jsxs)("div",{className:"grid grid-cols-3 gap-1 sm:flex",children:[(0,l.jsxs)("button",{onClick:t=>{t.stopPropagation(),o(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,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:r===`combo-${e.id}`?"check":"content_copy"}),(0,l.jsx)("span",{className:"text-[10px] leading-tight",children:"Copy"})]}),(0,l.jsxs)("button",{onClick:n,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,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,l.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,l.jsxs)("button",{onClick:d,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,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,l.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]})]})]}),h&&(0,l.jsxs)("div",{className:"mt-3 border-t border-border-subtle pt-3",children:[(0,l.jsxs)("div",{className:"mb-3",children:[(0,l.jsxs)("p",{className:"text-[10px] uppercase tracking-wide text-text-muted mb-1.5",children:["Models (",e.models.length,")"]}),(0,l.jsx)("div",{className:"flex flex-col gap-1",children:e.models.map((e,s)=>(0,l.jsxs)("div",{className:"flex items-center gap-2 rounded px-2 py-1 bg-black/[0.02] dark:bg-white/[0.02]",children:[(0,l.jsx)("span",{className:"text-[10px] font-medium text-text-muted w-4 text-center",children:s+1}),(0,l.jsx)("code",{className:"min-w-0 flex-1 truncate font-mono text-xs text-text-main",children:e}),t[e]&&(0,l.jsx)(i.nh,{caps:t[e],size:11})]},s))})]}),k&&(0,l.jsxs)("div",{className:"mb-3",children:[(0,l.jsx)("p",{className:"text-[10px] uppercase tracking-wide text-text-muted mb-1.5",children:"Fusion Judge"}),(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsxs)("button",{onClick:()=>j(!0),className:"inline-flex max-w-full items-center gap-1 rounded border border-dashed border-primary/40 px-2 py-1 font-mono text-xs text-primary hover:border-primary hover:bg-primary/5",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"gavel"}),(0,l.jsx)("span",{className:"truncate",children:w||`Auto — ${e.models[0]||"first model"}`})]}),w&&(0,l.jsx)("button",{onClick:()=>p({judgeModel:""}),className:"p-1 rounded text-text-muted hover:text-red-500 hover:bg-red-500/10",title:"Reset to Auto",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})]}),C&&(0,l.jsxs)("div",{className:"mb-3",children:[(0,l.jsx)("p",{className:"text-[10px] uppercase tracking-wide text-text-muted mb-1.5",children:"Swarm Roles"}),(0,l.jsxs)("div",{className:"flex flex-col gap-1.5",children:[[{key:"manager",label:"Manager",icon:"psychology",value:S,placeholder:`Auto — ${e.models[0]||"first"}`},{key:"staff",label:"Staff",icon:"badge",value:M,placeholder:"Same as Manager"},{key:"audit",label:"Audit",icon:"fact_check",value:$,placeholder:"Same as Staff"}].map(e=>(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"text-xs font-medium text-text-muted w-16",children:e.label}),(0,l.jsxs)("button",{onClick:()=>y(e.key),className:"inline-flex max-w-full items-center gap-1 rounded border border-dashed border-primary/40 px-2 py-0.5 font-mono text-[11px] text-primary hover:border-primary hover:bg-primary/5",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:e.icon}),(0,l.jsx)("span",{className:"truncate",children:e.value||e.placeholder})]}),e.value&&(0,l.jsx)("button",{onClick:()=>p({[`${e.key}Model`]:""}),className:"p-0.5 rounded text-text-muted hover:text-red-500 hover:bg-red-500/10",title:`Reset ${e.label}`,children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"close"})})]},e.key)),(0,l.jsxs)("div",{className:"flex items-center gap-2 text-[11px] text-text-muted",children:[(0,l.jsx)("span",{className:"font-medium",children:"Workers"}),(0,l.jsxs)("span",{children:["= combo models (",e.models.length,")"]}),(0,l.jsx)("span",{className:"text-text-subtle",children:"\xb7"}),(0,l.jsx)("a",{href:"/dashboard/swarm",className:"text-primary hover:underline",children:"Telemetry →"})]})]})]}),(0,l.jsxs)("div",{className:"text-xs text-text-muted bg-black/[0.02] dark:bg-white/[0.02] rounded px-2 py-1.5",children:[(0,l.jsxs)("span",{className:"font-medium",children:[x(N),":"]})," ",c.find(e=>e.value===N)?.desc]})]}),(0,l.jsx)(i.rq,{isOpen:f,onClose:()=>j(!1),onSelect:e=>{p({judgeModel:e?.value||""}),j(!1)},activeProviders:s,title:"Select Judge Model",addedModelValues:w?[w]:[],closeOnSelect:!0}),v&&(0,l.jsx)(i.rq,{isOpen:!0,onClose:()=>y(null),onSelect:e=>{p({[`${v}Model`]:e?.value||""}),y(null)},activeProviders:s,title:`Select ${"manager"===v?"Manager":"staff"===v?"Staff":"Audit"} Model`,addedModelValues:[],closeOnSelect:!0})]})}function g({combos:e,modelCaps:t,activeProviders:s,comboStrategies:r,copied:o,copy:n,onEdit:c,onDelete:d,onSetStrategy:m,onCreate:x}){let[h,f]=(0,a.useState)(""),[j,v]=(0,a.useState)("all"),[y,N]=(0,a.useState)("name"),w=(0,a.useMemo)(()=>{var t;let s;return t=function(e,t,s,l){let a=e;if("all"!==s&&(a=a.filter(e=>(l[e.name]?.fallbackStrategy||"fallback")===s)),t.trim()){let e=t.trim().toLowerCase();a=a.filter(t=>t.name.toLowerCase().includes(e)||(t.models||[]).some(t=>t.toLowerCase().includes(e)))}return a}(e,h,j,r),s=[...t],"models-desc"===y?s.sort((e,t)=>(t.models?.length||0)-(e.models?.length||0)):"models-asc"===y?s.sort((e,t)=>(e.models?.length||0)-(t.models?.length||0)):s.sort((e,t)=>e.name.localeCompare(t.name)),s},[e,h,j,y,r]);return 0===e.length?(0,l.jsx)(i.pp,{icon:"layers",title:"No combos yet",description:"Create model combos with fallback, round-robin, fusion, or swarm strategies",actionText:"Create Combo",onAction:x}):(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,l.jsx)(i.pd,{placeholder:"Search combos or models...",value:h,onChange:e=>f(e.target.value),className:"sm:max-w-xs"}),(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("div",{className:"flex flex-wrap gap-1",children:u.map(e=>(0,l.jsx)("button",{onClick:()=>v(e.value),className:`rounded-full px-2.5 py-1 text-xs font-medium transition-colors ${j===e.value?"bg-primary/15 text-primary ring-1 ring-primary/20":"bg-surface-2 text-text-muted hover:text-text-main"}`,children:e.label},e.value))}),(0,l.jsx)("select",{value:y,onChange:e=>N(e.target.value),className:"appearance-none rounded-lg border border-border bg-surface-2 py-1.5 pl-3 pr-8 text-xs text-text-main [-webkit-appearance:none] [-moz-appearance:none] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/30",children:p.map(e=>(0,l.jsx)("option",{value:e.value,children:e.label},e.value))})]})]}),(0,l.jsx)("p",{className:"text-xs text-text-muted",children:w.length===e.length?`${e.length} combo${1!==e.length?"s":""}`:`${w.length} of ${e.length} combos`}),0===w.length?(0,l.jsx)(i.Zp,{children:(0,l.jsxs)("div",{className:"py-8 text-center text-sm text-text-muted",children:['No combos match "',h,'" ',"all"!==j&&`with ${j} strategy`]})}):(0,l.jsx)("div",{className:"flex flex-col gap-3",children:w.map(e=>(0,l.jsx)(b,{combo:e,modelCaps:t,activeProviders:s,copied:o,onCopy:n,onEdit:()=>c(e),onDelete:()=>d(e.id),strategy:r[e.name]||{},onSetStrategy:t=>m(e.name,t)},e.id))})]})}let f=[{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 j({combos:e,connections:t,onApply:s}){let[r,o]=(0,a.useState)(null),n=new Set(t?.filter(e=>!1!==e.isActive).map(e=>e.provider)||[]),c=new Set((e||[]).map(e=>e.name)),d=async e=>{o(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{o(null)}};return 0===f.length?(0,l.jsx)(i.pp,{icon:"dashboard_customize",title:"No templates available",description:"Combo templates will appear here when added."}):(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsxs)("div",{className:"mb-1",children:[(0,l.jsx)("h2",{className:"text-sm font-semibold text-text-main",children:"Combo Templates"}),(0,l.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:"One-click prebuilt combos. Provider availability is checked automatically."})]}),(0,l.jsx)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:f.map(e=>{let t=(e.requiredProviders||[]).filter(e=>n.has(e)).length,s=(e.requiredProviders||[]).length,a=c.has(e.name),o=m(e.strategy);return(0,l.jsxs)(i.Zp,{padding:"sm",className:"flex flex-col gap-3 hover:border-primary/20 transition-all",children:[(0,l.jsxs)("div",{className:"flex items-start justify-between",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,l.jsx)("div",{className:"flex size-9 shrink-0 items-center justify-center rounded-lg",style:{backgroundColor:`${o.color}15`},children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",style:{color:o.color},children:e.icon||o.icon})}),(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{className:"text-sm font-semibold text-text-main",children:e.name}),(0,l.jsx)(i.Ex,{variant:o.badge,size:"sm",children:x(e.strategy)})]})]}),a&&(0,l.jsx)(i.Ex,{variant:"success",size:"sm",dot:!0,children:"Created"})]}),(0,l.jsx)("p",{className:"text-xs text-text-muted leading-relaxed",children:e.description}),(0,l.jsxs)("div",{className:"flex flex-wrap gap-1",children:[(e.models||[]).slice(0,4).map((e,t)=>(0,l.jsx)("code",{className:"inline-flex items-center rounded bg-black/5 px-1.5 py-0.5 font-mono text-[10px] text-text-muted dark:bg-white/5",children:e},t)),(e.models||[]).length>4&&(0,l.jsxs)("span",{className:"text-[10px] text-text-muted",children:["+",(e.models||[]).length-4," more"]})]}),(0,l.jsx)("div",{className:"flex flex-wrap gap-1",children:(e.requiredProviders||[]).map(e=>{let t=n.has(e);return(0,l.jsxs)("span",{className:`inline-flex items-center gap-0.5 rounded-full px-1.5 py-0.5 text-[10px] font-medium ${t?"bg-success/10 text-success":"bg-surface-2 text-text-muted"}`,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[10px]",children:t?"check_circle":"radio_button_unchecked"}),e]},e)})}),(0,l.jsx)("div",{className:"mt-auto pt-1",children:(0,l.jsx)(i.$n,{size:"sm",fullWidth:!0,variant:a?"secondary":"primary",icon:r===e.id?"progress_activity":"add",disabled:a||r===e.id,onClick:()=>d(e),children:r===e.id?"Creating...":a?"Already Created":t===s?"Apply Template":`Apply (${t}/${s} ready)`})})]},e.id)})})]})}var v=s(44923),y=s(87256),N=s(5020),w=s(39768);function k({id:e,index:t,model:s,isFirst:r,isLast:o,modelCaps:n,onEdit:c,onMoveUp:d,onMoveDown:m,onRemove:x}){let{attributes:u,listeners:p,setNodeRef:h,transform:b,isDragging:g}=(0,y.gl)({id:e}),f={transform:w.Ks.Transform.toString(b),opacity:g?.5:1,zIndex:g?999:void 0},[j,v]=(0,a.useState)(!1),[N,C]=(0,a.useState)(s),S=()=>{let e=N.trim();e&&e!==s?c(e):C(s),v(!1)};return(0,l.jsxs)("div",{ref:h,style:f,className:`group flex min-w-0 items-center gap-2 rounded-lg border px-2.5 py-1.5 transition-all ${g?"border-primary/40 bg-panel shadow-md ring-1 ring-primary/20":"border-transparent bg-panel hover:border-border-subtle"}`,children:[(0,l.jsx)("span",{className:"flex size-5 shrink-0 items-center justify-center rounded bg-primary/10 text-[10px] font-bold text-primary",children:t+1}),(0,l.jsx)("button",{...u,...p,type:"button",className:"cursor-grab touch-none shrink-0 p-0.5 rounded text-text-muted/50 hover:text-text-main active:cursor-grabbing",title:"Drag to reorder",children:(0,l.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,l.jsx)("circle",{cx:"9",cy:"4",r:"1.5"}),(0,l.jsx)("circle",{cx:"15",cy:"4",r:"1.5"}),(0,l.jsx)("circle",{cx:"9",cy:"12",r:"1.5"}),(0,l.jsx)("circle",{cx:"15",cy:"12",r:"1.5"}),(0,l.jsx)("circle",{cx:"9",cy:"20",r:"1.5"}),(0,l.jsx)("circle",{cx:"15",cy:"20",r:"1.5"})]})}),j?(0,l.jsx)("input",{autoFocus:!0,value:N,onChange:e=>C(e.target.value),onBlur:S,onKeyDown:e=>{"Enter"===e.key&&S(),"Escape"===e.key&&(C(s),v(!1))},className:"min-w-0 flex-1 rounded border border-primary/40 bg-panel px-1.5 py-0.5 font-mono text-xs text-text-main outline-none"}):(0,l.jsxs)("div",{className:"flex min-w-0 flex-1 items-center gap-1.5 cursor-text rounded px-1 py-0.5 hover:bg-black/[0.03] dark:hover:bg-white/[0.03]",onClick:()=>v(!0),title:"Click to edit",children:[(0,l.jsx)("code",{className:"min-w-0 flex-1 truncate font-mono text-xs text-text-main",children:s}),n?.[s]&&(0,l.jsx)(i.nh,{caps:n[s],size:11})]}),(0,l.jsxs)("div",{className:"flex shrink-0 items-center gap-0.5 opacity-0 transition-opacity group-hover:opacity-100",children:[(0,l.jsx)("button",{onClick:d,disabled:r,className:`rounded p-1 transition-colors ${r?"cursor-not-allowed text-text-muted/20":"text-text-muted hover:bg-black/5 hover:text-primary dark:hover:bg-white/5"}`,title:"Move up",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"arrow_upward"})}),(0,l.jsx)("button",{onClick:m,disabled:o,className:`rounded p-1 transition-colors ${o?"cursor-not-allowed text-text-muted/20":"text-text-muted hover:bg-black/5 hover:text-primary dark:hover:bg-white/5"}`,title:"Move down",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"arrow_downward"})})]}),(0,l.jsx)("button",{onClick:x,className:"shrink-0 rounded p-1 text-text-muted opacity-0 transition-all hover:bg-danger/10 hover:text-danger group-hover:opacity-100",title:"Remove model",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})}function C({isOpen:e,combo:t,onClose:s,onSave:r,activeProviders:o,modelCaps:d={},kindFilter:m=null}){let[x,u]=(0,a.useState)(t?.name||""),[p,h]=(0,a.useState)(t?.models||[]),[b,g]=(0,a.useState)(!1),[f,j]=(0,a.useState)(!1),[w,S]=(0,a.useState)(""),[M,$]=(0,a.useState)({}),E=(0,v.FR)((0,v.MS)(v.AN,{activationConstraint:{distance:5}}),(0,v.MS)(v.uN,{coordinateGetter:y.JR})),z=p.map((e,t)=>({uid:`item-${t}`,model:e}));(0,a.useEffect)(()=>{e&&(async()=>{try{let e=await fetch("/api/models/alias");if(e.ok){let t=await e.json();$(t.aliases||{})}}catch{}})()},[e]);let F=e=>e.trim()?n.test(e)?(S(""),!0):(S("Only letters, numbers, -, _ and . allowed"),!1):(S("Name is required"),!1),O=async()=>{F(x)&&(j(!0),await r({name:x.trim(),models:p}),j(!1))},A=!!t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(i.aF,{isOpen:e,onClose:s,title:A?"Edit Combo":"Create Combo",size:"lg",children:(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(i.pd,{label:"Combo Name",value:x,onChange:e=>{let t=e.target.value;u(t),t?F(t):S("")},placeholder:"my-combo",error:w}),(0,l.jsxs)("div",{className:"mt-1.5 flex items-center gap-2",children:[(0,l.jsx)("p",{className:"text-[10px] text-text-muted",children:"Use this name as the model in your client:"}),x.trim()&&(0,l.jsx)("code",{className:"rounded bg-primary/10 px-1.5 py-0.5 font-mono text-[10px] text-primary",children:x.trim()})]})]}),(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:"mb-2 flex items-center justify-between",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("label",{className:"text-sm font-medium text-text-main",children:"Models"}),p.length>0&&(0,l.jsxs)(i.Ex,{variant:"info",size:"sm",children:[p.length," model",1!==p.length?"s":""]})]}),(0,l.jsx)("span",{className:"text-[10px] text-text-muted",children:"Drag to reorder priority"})]}),0===p.length?(0,l.jsxs)("div",{className:"flex flex-col items-center justify-center py-8 border border-dashed border-border rounded-lg bg-surface-2/50",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-2xl mb-2",children:"layers"}),(0,l.jsx)("p",{className:"text-xs text-text-muted mb-3",children:"Add models to build your combo"}),(0,l.jsx)(i.$n,{size:"sm",variant:"secondary",icon:"add",onClick:()=>g(!0),children:"Add First Model"})]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(v.Mp,{sensors:E,collisionDetection:v.fp,onDragEnd:e=>{let{active:t,over:s}=e;if(s&&t.id!==s.id){let e=z.findIndex(e=>e.uid===t.id),l=z.findIndex(e=>e.uid===s.id);-1!==e&&-1!==l&&h(t=>(0,y.be)(t,e,l))}},modifiers:[N.FN,N.gj],children:(0,l.jsx)(y.gB,{items:z.map(e=>e.uid),strategy:y._G,children:(0,l.jsx)("div",{className:"flex max-h-[45vh] min-w-0 flex-col gap-1 overflow-y-auto rounded-lg bg-surface-2/30 p-1.5",children:z.map(({uid:e,model:t},s)=>(0,l.jsx)(k,{id:e,index:s,model:t,modelCaps:d,isFirst:0===s,isLast:s===z.length-1,onEdit:e=>{let t=[...p];t[s]=e,h(t)},onMoveUp:()=>(e=>{if(0===e)return;let t=[...p];[t[e-1],t[e]]=[t[e],t[e-1]],h(t)})(s),onMoveDown:()=>(e=>{if(e===p.length-1)return;let t=[...p];[t[e],t[e+1]]=[t[e+1],t[e]],h(t)})(s),onRemove:()=>{h(p.filter((e,t)=>t!==s))}},e))})})}),(0,l.jsxs)("button",{onClick:()=>g(!0),className:"w-full mt-2 py-2 border border-dashed border-primary/30 rounded-lg text-xs text-primary font-medium hover:border-primary hover:bg-primary/5 transition-colors flex items-center justify-center gap-1.5",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"add"}),"Add Model"]})]})]}),p.length>=2&&(0,l.jsxs)("div",{className:"rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2 mb-1.5",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"lightbulb"}),(0,l.jsx)("span",{className:"text-xs font-medium text-text-main",children:"Strategy Tips"})]}),(0,l.jsx)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-2",children:c.map(e=>(0,l.jsxs)("div",{className:"flex items-start gap-1.5 text-[11px] text-text-muted",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[12px] mt-0.5 text-primary/60",children:e.icon}),(0,l.jsxs)("span",{children:[(0,l.jsx)("span",{className:"font-medium text-text-main",children:e.label})," — ",e.desc]})]},e.value))}),(0,l.jsx)("p",{className:"mt-1.5 text-[10px] text-text-muted",children:"Set strategy after creating the combo from the Combos tab."})]}),(0,l.jsxs)("div",{className:"flex flex-col gap-2 pt-1 sm:flex-row",children:[(0,l.jsx)(i.$n,{onClick:s,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,l.jsx)(i.$n,{onClick:O,fullWidth:!0,size:"sm",icon:A?"save":"add",disabled:!x.trim()||!!w||f,children:f?"Saving...":A?"Save Changes":"Create Combo"})]})]})}),(0,l.jsx)(i.rq,{isOpen:b,onClose:()=>g(!1),onSelect:e=>{p.includes(e.value)||h([...p,e.value])},onDeselect:e=>{h(p.filter(t=>t!==e.value))},activeProviders:o,modelAliases:M,title:"Add Model to Combo",kindFilter:m,addedModelValues:p,closeOnSelect:!1})]})}let S=[{value:"overview",label:"Overview"},{value:"combos",label:"Combos"},{value:"templates",label:"Templates"}];function M(){let e=(0,r.useRouter)(),t=(0,r.useSearchParams)().get("tab")||"overview",[s,n]=(0,a.useState)([]),[c,d]=(0,a.useState)(!0),[m,x]=(0,a.useState)(!1),[u,p]=(0,a.useState)(null),[b,f]=(0,a.useState)([]),[v,y]=(0,a.useState)({}),[N,w]=(0,a.useState)({}),[k,M]=(0,a.useState)(null),{copied:$,copy:E}=(0,o.C)(),z=(0,a.useCallback)(async()=>{try{let[e,t,s,l]=await Promise.all([fetch("/api/combos"),fetch("/api/providers"),fetch("/api/settings"),fetch("/api/models")]),a=await e.json(),r=await t.json(),i=s.ok?await s.json():{};if(e.ok&&n((a.combos||[]).filter(e=>!e.kind||"llm"===e.kind)),t.ok&&f(r.connections||[]),l.ok){let e=await l.json(),t={};for(let s of e.models||[])s.caps&&(t[s.fullModel]=s.caps);w(t)}y(i.comboStrategies||{})}catch(e){console.log("Error fetching data:",e)}finally{d(!1)}},[]);(0,a.useEffect)(()=>{z()},[z]);let F=t=>e.push(`/dashboard/combos?tab=${t}`),O=async e=>{try{let t=await fetch("/api/combos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(t.ok)await z(),x(!1);else{let e=await t.json();alert(e.error||"Failed to create combo")}}catch(e){console.log("Error creating combo:",e)}},A=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 z(),p(null);else{let e=await s.json();alert(e.error||"Failed to update combo")}}catch(e){console.log("Error updating combo:",e)}},_=async(e,t)=>{try{let s={...v},l={...s[e]||{},...t};l.fallbackStrategy&&"fallback"!==l.fallbackStrategy?s[e]=l:delete s[e],await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStrategies:s})}),y(s)}catch(e){console.log("Error updating combo strategy:",e)}};return c?(0,l.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,l.jsx)(i.Qv,{}),(0,l.jsx)(i.Qv,{})]}):(0,l.jsxs)("div",{className:"flex min-w-0 flex-col gap-5",children:[(0,l.jsx)(i.zY,{title:"Combos",description:"Group models under one name, then pick a strategy per combo",icon:"layers",actions:(0,l.jsx)(i.$n,{size:"sm",icon:"add",onClick:()=>x(!0),className:"whitespace-nowrap",children:"Create Combo"})}),(0,l.jsx)(i.Iz,{options:S,value:t,onChange:F}),"overview"===t&&(0,l.jsx)(h,{combos:s,comboStrategies:v,activeProviders:b,onViewCombos:()=>F("combos"),onCreate:()=>x(!0)}),"combos"===t&&(0,l.jsx)(g,{combos:s,modelCaps:N,activeProviders:b,comboStrategies:v,copied:$,copy:E,onEdit:p,onDelete:e=>{M({title:"Delete Combo",message:"Delete this combo?",onConfirm:async()=>{M(null);try{(await fetch(`/api/combos/${e}`,{method:"DELETE"})).ok&&n(t=>t.filter(t=>t.id!==e))}catch(e){console.log("Error deleting combo:",e)}}})},onSetStrategy:_,onCreate:()=>x(!0)}),"templates"===t&&(0,l.jsx)(j,{combos:s,connections:b,onApply:z}),(0,l.jsx)(C,{isOpen:m,onClose:()=>x(!1),onSave:O,activeProviders:b,modelCaps:N},"create"),(0,l.jsx)(C,{isOpen:!!u,combo:u,onClose:()=>p(null),onSave:e=>A(u.id,e),activeProviders:b,modelCaps:N},u?.id||"new"),(0,l.jsx)(i.uo,{isOpen:!!k,onClose:()=>M(null),onConfirm:k?.onConfirm,title:k?.title||"Confirm",message:k?.message,variant:"danger"})]})}function $(){return(0,l.jsx)(a.Suspense,{fallback:(0,l.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,l.jsx)("div",{className:"h-32 animate-pulse rounded-lg bg-sidebar"}),(0,l.jsx)("div",{className:"h-32 animate-pulse rounded-lg bg-sidebar"})]}),children:(0,l.jsx)(M,{})})}}},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","openvecta","freebuff-web","zenmux-free","perplexity-agent","featherless","moonshot","qwencloud"]),h=e=>{let s=Number(e||0);return s>=1e6?`${(s/1e6).toFixed(1)}M`:s>=1e3?`${(s/1e3).toFixed(1)}K`:s.toLocaleString()};function g({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:[h(e.requests)," requests"]}),(0,r.jsx)("span",{children:"\xb7"}),(0,r.jsxs)("span",{children:[h(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)(g,{providers:e?.freeProviders||[]})})]})}g.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,10 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2134],{26706:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>F});var a=s(95155),l=s(12115),i=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:l="llm",includeLegacyAliases:i=!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(l&&e!==l||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(!i)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:l||"llm"}))}return o}var y=s(14051),b=s.n(y);let v=[{value:"auto",label:"Auto",hint:"No override"},{value:"none",label:"Off",hint:"Disable thinking"},{value:"minimal",label:"Minimal",hint:"512 tokens"},{value:"low",label:"Low",hint:"1,024 tokens"},{value:"medium",label:"Medium",hint:"8,192 tokens"},{value:"high",label:"High",hint:"24,576 tokens"},{value:"xhigh",label:"X-High",hint:"32,768 tokens"},{value:"max",label:"Max",hint:"128,000 tokens"}];function j({caps:e,selectedLevel:t,onSelect:s}){let[i,r]=(0,l.useState)(!1),n=(0,l.useRef)(null);(0,l.useEffect)(()=>{if(!i)return;let e=e=>{n.current&&!n.current.contains(e.target)&&r(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[i]);let o=v.filter(t=>"auto"===t.value||("none"===t.value?e?.thinkingCanDisable!==!1:"max"!==t.value||e?.thinkingMaxEffort===!0)),d=o.find(e=>e.value===t)||o[0];return(0,a.jsxs)("div",{className:"relative",ref:n,children:[(0,a.jsx)("button",{onClick:()=>r(e=>!e),title:`Thinking: ${d.label}${d.hint?` (${d.hint})`:""}`,className:`rounded p-0.5 transition-colors ${"auto"!==t?"text-primary":"text-text-muted hover:bg-sidebar hover:text-primary"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"psychology"})}),i&&(0,a.jsxs)("div",{className:"absolute right-0 top-full z-20 mt-1 min-w-[140px] rounded-lg border border-border bg-panel shadow-[var(--shadow-warm)]",children:[(0,a.jsx)("div",{className:"px-2 py-1.5 border-b border-border-subtle",children:(0,a.jsx)("span",{className:"text-[10px] font-semibold uppercase tracking-wide text-text-muted",children:"Thinking Level"})}),o.map(e=>(0,a.jsxs)("button",{onClick:()=>{s(e.value),r(!1)},className:`flex w-full items-center justify-between gap-2 px-2.5 py-1.5 text-xs transition-colors hover:bg-sidebar ${e.value===t?"text-primary font-semibold":"text-text-main"}`,children:[(0,a.jsx)("span",{children:e.label}),(0,a.jsx)("span",{className:"text-[10px] text-text-muted",children:e.hint})]},e.value))]})]})}function N({model:e,fullModel:t,alias:s,copied:i,onCopy:r,testStatus:n,isCustom:o,isFree:c,onDeleteAlias:m,onTest:p,isTesting:x,onDisable:u,caps:h}){let[f,g]=(0,l.useState)("auto"),y="ok"===n?"#22c55e":"error"===n?"#ef4444":void 0,b=!!h?.reasoning,v="auto"!==f&&"none"!==f?`${t}(${f})`:"none"===f?`${t}(none)`:t;return(0,a.jsx)("div",{className:`group min-w-0 max-w-full rounded-lg border px-3 py-2 ${"ok"===n?"border-green-500/40":"error"===n?"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:y?{color:y}:void 0,children:"ok"===n?"check_circle":"error"===n?"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:v}),(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:h,colorOverride:"text-text-muted/70",size:12})]})]}),b&&(0,a.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,a.jsx)(j,{caps:h,selectedLevel:f,onSelect:g}),(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:"Thinking"})]}),p&&(0,a.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,a.jsx)("button",{onClick:p,disabled:x,className:`rounded p-0.5 text-text-muted transition-opacity hover:bg-sidebar hover:text-primary ${x?"opacity-100":"opacity-100 sm:opacity-0 sm:group-hover:opacity-100"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",style:x?{animation:"spin 1s linear infinite"}:void 0,children:x?"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:x?"Testing...":"Test"})]}),(0,a.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,a.jsx)("button",{onClick:()=>r(v,`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"})]}),o?(0,a.jsx)("button",{onClick:m,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"})}):u?(0,a.jsx)("button",{onClick:u,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 w({modelId:e,fullModel:t,copied:s,onCopy:l,onDeleteAlias:i,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:()=>l(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:i,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 k({providerStorageAlias:e,providerDisplayAlias:t,modelAliases:s,customModels:i,copied:r,onCopy:n,onDeleteAlias:o,onAddCustomModel:c,onDeleteCustomModel:m,connections:p,isAnthropic:x}){let[u,h]=(0,l.useState)(""),[f,y]=(0,l.useState)(!1),[b,v]=(0,l.useState)(!1),[j,N]=(0,l.useState)(null),[C,S]=(0,l.useState)({}),$=async t=>{if(!j){N(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{N(null)}}},A=g({customModels:i,modelAliases:s,providerAlias:e,type:"llm"}),T=async()=>{if(!u.trim()||f)return;let e=u.trim();if(A.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)}},E=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 l=0;for(let e of a){let t=e.id||e.name||e.model;t&&(A.some(e=>e.id===t)||(await c(t),l+=1))}0===l&&alert("No new models were added.")}catch(e){console.log("Error importing models:",e)}finally{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:E,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."}),A.length>0&&(0,a.jsx)("div",{className:"flex flex-col gap-3",children:A.map(({id:s,alias:l,source:i})=>(0,a.jsx)(w,{modelId:s,fullModel:`${t}/${s}`,copied:r,onCopy:n,onDeleteAlias:()=>"custom"===i?m(s):o(l),onTest:p.length>0?()=>$(s):void 0,testStatus:C[s],isTesting:j===s},`${i}-${e}/${s}`))})]})}N.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},k.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 C=s(70217);function S({until:e}){let[t,s]=(0,l.useState)("");return((0,l.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 $({connection:e,proxyPools:t,isOAuth:s,isFirst:i,isLast:r,onMoveUp:n,onMoveDown:o,onToggleActive:c,onUpdateProxy:m,onEdit:p,onDelete:x,oneByOneStatus:u=null,autoPing:h=null}){let[f,g]=(0,l.useState)(!1),[y,b]=(0,l.useState)(!1),v=(0,l.useRef)(null),j=new Map((t||[]).map(e=>[e.id,e])),N=e.providerSpecificData?.proxyPoolId||null,w=N?j.get(N):null,k=e.providerSpecificData?.connectionProxyEnabled===!0&&!!e.providerSpecificData?.connectionProxyUrl,A=!!N||k,T=w?`Pool: ${w.name}`:N?`Pool: ${N} (inactive/missing)`:k?`Legacy: ${e.providerSpecificData?.connectionProxyUrl}`:"",E=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(w?.proxyUrl||e.providerSpecificData?.connectionProxyUrl){let t=w?.proxyUrl||e.providerSpecificData?.connectionProxyUrl;try{let e=new URL(t);P=`${e.protocol}//${e.hostname}${e.port?`:${e.port}`:""}`}catch{P=t}}let O=w?.noProxy||e.providerSpecificData?.connectionNoProxy||"",I="default";w?.isActive===!0?I="success":(N||k)&&(I="error"),(0,l.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 z=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,R=e.name?.trim()||e.email?.trim()||e.displayName?.trim()||(_?"OAuth Account":U?"Cookie Account":"API Key"),M=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,[q,L]=(0,l.useState)(!1),K=Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>e).filter(e=>!!e).sort()[0]||null;(0,l.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||q?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:i,className:`p-0.5 rounded ${i?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,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:R}),M&&(0,a.jsx)("p",{className:"text-xs text-text-muted truncate",children:M}),(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,C.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"}),A&&(0,a.jsx)(d.Ex,{variant:I,size:"sm",children:"Proxy"}),q&&!1!==e.isActive&&(0,a.jsx)(S,{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()})]}),A&&(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}),O&&(0,a.jsxs)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[320px]",title:O,children:["no_proxy: ",O]})]})]})]}),(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 ${A?"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:()=>z("__none__"),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${!N?"text-primary font-medium":"text-text-main"}`,children:"None"}),(t||[]).map(e=>(0,a.jsx)("button",{onClick:()=>z(e.id),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${N===e.id?"text-primary font-medium":"text-text-main"}`,children:e.name},e.id))]})]}),h&&(0,a.jsx)(d.m_,{text:E,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"})]})]})}S.propTypes={until:b().string.isRequired},$.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 A=`name1|sk-key1
|
|
2
|
+
name2|sk-key2
|
|
3
|
+
sk-key-only-auto-named`;function T({isOpen:e,provider:t,providerName:s,isCompatible:i,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",N=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-...":"",w="azure"===t,k="cloudflare-ai"===t,C=c.Q2?.[t]?.regions||null,S=c.Q2?.[t]?.defaultRegion||C?.[0]?.id||"",[$,E]=(0,l.useState)({name:"",apiKey:"",defaultModel:"",priority:1,proxyPoolId:g,ollamaHostUrl:""}),[P,O]=(0,l.useState)({azureEndpoint:"",apiVersion:"2024-10-01-preview",deployment:"",organization:""}),[I,z]=(0,l.useState)({accountId:""}),[D,_]=(0,l.useState)(S),[U,R]=(0,l.useState)(!1),[M,q]=(0,l.useState)(null),[L,K]=(0,l.useState)(!1),[F,J]=(0,l.useState)("single"),[W,B]=(0,l.useState)(""),[H,G]=(0,l.useState)(null),Q=()=>y&&$.ollamaHostUrl.trim()?{baseUrl:$.ollamaHostUrl.trim()}:w?{azureEndpoint:P.azureEndpoint,apiVersion:P.apiVersion,deployment:P.deployment,organization:P.organization}:k?{accountId:I.accountId}:C&&D?{region:D}:void 0,V=async()=>{R(!0);try{let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:$.apiKey,providerSpecificData:Q()})}),s=await e.json();q(s.valid?"success":"failed")}catch{q("failed")}finally{R(!1)}},Z=async()=>{if(t&&(y||$.apiKey)&&(y||$.name)&&(!i||$.defaultModel.trim())){K(!0);try{let e=!1;try{R(!0),q(null);let s=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:$.apiKey,providerSpecificData:Q()})});e=!!(await s.json()).valid,q(e?"success":"failed")}catch{q("failed")}finally{R(!1)}await u({name:$.name||(y?"Ollama Local":""),apiKey:$.apiKey,defaultModel:i?$.defaultModel.trim():void 0,priority:$.priority,proxyPoolId:$.proxyPoolId===g?null:$.proxyPoolId,testStatus:e?"active":"unknown",providerSpecificData:Q()})}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 l=0;l<e.length;l++){let i=e[l].split("|"),r=i.length>=2?i.slice(1).join("|").trim():i[0].trim(),n=i.length>=2?i[0].trim():"Key",o=`${n} ${l+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:A,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:$.name,onChange:e=>E({...$,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:$.ollamaHostUrl,onChange:e=>E({...$,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:V,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:$.apiKey,onChange:e=>E({...$,apiKey:e.target.value}),placeholder:N,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:$.apiKey,onChange:e=>E({...$,apiKey:e.target.value}),placeholder:N,className:"flex-1"}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(d.$n,{onClick:V,disabled:!$.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}))}),i&&(0,a.jsx)(d.pd,{label:"Default Model",value:$.defaultModel,onChange:e=>E({...$,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"}),")."]}),M&&(0,a.jsx)(d.Ex,{variant:"success"===M?"success":"error",children:"success"===M?"Valid":"Invalid"}),x&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:x}),i&&(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=>z({...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"})]})]}),w&&(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=>O({...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=>O({...P,deployment:e.target.value}),placeholder:"gpt-4"}),(0,a.jsx)(d.pd,{label:"API Version",value:P.apiVersion,onChange:e=>O({...P,apiVersion:e.target.value}),placeholder:"2024-10-01-preview"}),(0,a.jsx)(d.pd,{label:"Organization",value:P.organization,onChange:e=>O({...P,organization:e.target.value}),placeholder:"Organization ID"})]})]}),(0,a.jsx)(d.pd,{label:"Priority",type:"number",value:$.priority,onChange:e=>E({...$,priority:Number.parseInt(e.target.value)||1})}),(0,a.jsx)(d.l6,{label:"Proxy Pool",value:$.proxyPoolId,onChange:e=>E({...$,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&&(!$.name||!$.apiKey)||i&&!$.defaultModel.trim()||w&&(!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 E({isOpen:e,node:t,onSave:s,onClose:i,isAnthropic:r}){let[n,o]=(0,l.useState)({name:"",prefix:"",apiType:"chat",baseUrl:"https://api.openai.com/v1"}),[c,m]=(0,l.useState)(!1),[p,x]=(0,l.useState)(""),[u,h]=(0,l.useState)(""),[f,g]=(0,l.useState)(!1),[y,b]=(0,l.useState)(null);(0,l.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:i,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:i,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}function P({isOpen:e,providerAlias:t,providerDisplayAlias:s,onSave:i,onClose:r}){let[n,o]=(0,l.useState)(""),[c,m]=(0,l.useState)(null),[p,x]=(0,l.useState)(""),[u,h]=(0,l.useState)(!1);(0,l.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 i(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"})]})]})})}T.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},E.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},P.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 I({isOpen:e,onClose:t,onSuccess:s}){let[i,r]=(0,l.useState)(""),[n,o]=(0,l.useState)(!1),[c,m]=(0,l.useState)(""),[p,x]=(0,l.useState)(null),h=()=>{n||(r(""),m(""),x(null),t())},f=async()=>{var e;let t;m(""),x(null);let a=i.trim();if(!a)return;try{t=JSON.parse(a)}catch(e){m(`${(0,u.Tl)("Invalid JSON")}: ${e.message}`);return}let l=Array.isArray(e=t)?e:e&&"object"==typeof e?Array.isArray(e.accounts)?e.accounts:[e]:null;if(!l||0===l.length)return void m((0,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:l})}),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:i,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||!i.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")})]})]})})}I.propTypes={isOpen:b().bool.isRequired,onClose:b().func.isRequired,onSuccess:b().func};let z={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 D({providerId:e}){let[t,s]=(0,l.useState)(null);if((0,l.useEffect)(()=>{let t;if(!e)return;let a=!1,l=async()=>{try{let t=await fetch(`/api/providers/${e}/vault-pool`,{cache:"no-store"});if(!t.ok)return;let l=await t.json();a||s(l)}catch{}};l();let i=()=>{t||(t=setInterval(l,1e4))},r=()=>{t&&(clearInterval(t),t=null)},n=()=>document.hidden?r():i();return i(),document.addEventListener("visibilitychange",n),()=>{a=!0,r(),document.removeEventListener("visibilitychange",n)}},[e]),!t||!t.hasPool)return null;let i=z[t.status]||z.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:i.variant,size:"sm",icon:i.icon,children:i.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"]})]})}function _({connectionId:e,cookie:t,currentPlan:s="free",onPlanChanged:i}){let r,[n,o]=(0,l.useState)([]),[c,m]=(0,l.useState)(s),[p,x]=(0,l.useState)(null),[u,h]=(0,l.useState)(!1),[f,g]=(0,l.useState)(!1),[y,b]=(0,l.useState)(null),v=(r=String(t||"").match(/ctoken=([^;]+)/),r?.[1]||"");(0,l.useEffect)(()=>{let e=!1;return(async()=>{try{let t=await fetch("/api/providers/zenmux-free/zenmux-plans",{cache:"no-store"});if(!t.ok)return;let s=await t.json();!e&&Array.isArray(s.plans)&&o(s.plans)}catch{}})(),()=>{e=!0}},[]),(0,l.useEffect)(()=>{if(!v)return;let e=!1;return h(!0),(async()=>{try{let t=await fetch("/api/providers/zenmux-free/zenmux-plans",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({ctoken:v})});if(!t.ok)return;let a=await t.json();!e&&a.planKey&&(x(a.planKey),s&&"free"!==s||m(a.planKey))}catch{}finally{e||h(!1)}})(),()=>{e=!0}},[v,s]);let j=async t=>{let a=t.target.value;m(a),g(!0),b(null);try{if(!(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerSpecificData:{zenmuxPlan:a}})})).ok)throw Error("Failed to save plan");i?.(a)}catch(e){b(e.message),m(s)}finally{g(!1)}},N=p&&p===c;return 0===n.length?(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"ZenMux Plan"}),(0,a.jsx)("select",{value:c,onChange:j,disabled:!0,className:"appearance-none rounded-brand border border-border bg-surface-2 py-1.5 pl-3 pr-8 text-xs text-text-muted [-webkit-appearance:none] [-moz-appearance:none]",children:(0,a.jsxs)("option",{value:c,children:[c," (loading…)"]})})]}):(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(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:"ZenMux Plan"}),(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("select",{value:c,onChange:j,disabled:f,title:"Select your ZenMux subscription plan. Models from this plan will be available.",className:"appearance-none rounded-brand border border-border bg-surface-2 py-1.5 pl-3 pr-8 text-xs text-text-main [-webkit-appearance:none] [-moz-appearance:none] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/35 disabled:opacity-50",children:n.map(e=>(0,a.jsxs)("option",{value:e.planKey,children:[e.name," (",e.modelCount," models",e.price>0?`, $${e.price}/mo`:", free",")"]},e.planKey))}),(0,a.jsx)("span",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-2 text-text-muted",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"expand_more"})})]}),u&&(0,a.jsx)(d.Ex,{variant:"info",size:"sm",children:"Detecting…"}),N&&!u&&(0,a.jsx)(d.Ex,{variant:"success",size:"sm",icon:"check_circle",dot:!0,children:"Auto-detected"}),f&&(0,a.jsx)(d.Ex,{variant:"info",size:"sm",children:"Saving…"}),y&&(0,a.jsx)(d.Ex,{variant:"error",size:"sm",icon:"error",children:y})]}),(0,a.jsx)("p",{className:"text-[11px] text-text-muted",children:p?`Plan auto-detected from your ctoken: ${p}. You can override manually if needed.`:"Select your ZenMux subscription plan. Models available depend on your plan."})]})}function U({providerId:e,hours:t=24}){let[s,i]=(0,l.useState)(null);if((0,l.useEffect)(()=>{if(!e)return;let s=!1,a=async()=>{try{let a=await fetch(`/api/providers/${e}/health-timeline?hours=${t}`,{cache:"no-store"});if(!a.ok)return;let l=await a.json();s||i(l.timeline||[])}catch{}};a();let l=setInterval(a,6e4),r=()=>{document.hidden?clearInterval(l):(clearInterval(l),a(),l=setInterval(a,6e4))};return document.addEventListener("visibilitychange",r),()=>{s=!0,clearInterval(l),document.removeEventListener("visibilitychange",r)}},[e,t]),!s)return(0,a.jsxs)("div",{className:"flex items-center gap-2 text-xs text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] animate-pulse",children:"monitor_heart"}),"Loading health timeline..."]});if(0===s.length||s.every(e=>0===e.ok&&0===e.err))return(0,a.jsxs)("div",{className:"flex items-center gap-2 text-xs text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"monitor_heart"}),"No request history yet."]});let r=s.length,n=s.reduce((e,t)=>e+t.ok+t.err,0),o=s.reduce((e,t)=>e+t.err,0),d=Math.max(...s.map(e=>e.ok+e.err),1),c=Math.max(...s.map(e=>e.latency),1),m=Math.max(6*r,120),p=Math.max(m/r-1,2),x=s.filter(e=>e.latency>0).map((e,t)=>{let s=t/Math.max(r-1,1)*m,a=32-e.latency/c*19.2-2;return`${s.toFixed(1)},${a.toFixed(1)}`}),u=x.length>1?`M${x.join(" L")}`:"",h=n>0?Math.round((n-o)/n*100):null;return(0,a.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-xs font-medium text-text-muted",children:"Health (24h)"}),null!==h&&(0,a.jsxs)("span",{className:`text-[10px] font-bold ${h>=90?"text-success":h>=70?"text-warning":"text-danger"}`,children:[h,"% success \xb7 ",n," requests \xb7 ",o," errors"]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2 text-[10px] text-text-muted",children:[(0,a.jsxs)("span",{className:"flex items-center gap-1",children:[(0,a.jsx)("span",{className:"inline-block size-2 rounded-sm bg-success"})," OK"]}),(0,a.jsxs)("span",{className:"flex items-center gap-1",children:[(0,a.jsx)("span",{className:"inline-block size-2 rounded-sm bg-danger"})," Error"]}),(0,a.jsxs)("span",{className:"flex items-center gap-1",children:[(0,a.jsx)("span",{className:"inline-block h-0.5 w-3 bg-info"})," Latency"]})]})]}),(0,a.jsxs)("svg",{width:m,height:32,className:"overflow-visible",children:[s.map((e,t)=>{let s=m/r*t;if(0===e.ok+e.err)return null;let l=e.ok/d*32,i=e.err/d*32;return(0,a.jsxs)("g",{children:[(0,a.jsx)("rect",{x:s,y:32-l-i,width:p,height:i,rx:.5,className:"fill-danger/60"}),(0,a.jsx)("rect",{x:s,y:32-l,width:p,height:l,rx:.5,className:"fill-success/60"})]},t)}),u&&(0,a.jsx)("path",{d:u,fill:"none",strokeWidth:1,className:"stroke-info",strokeDasharray:"2 2"})]})]})}function R({connectionId:e}){let[t,s]=(0,l.useState)(null),[i,r]=(0,l.useState)(!0);if((0,l.useEffect)(()=>{if(!e)return;let t=!1;return(async()=>{try{let a=await fetch(`/api/providers/${e}/freebuff-profile`,{cache:"no-store"});if(!a.ok)return;let l=await a.json();t||s(l)}catch{}t||r(!1)})(),()=>{t=!0}},[e]),i)return(0,a.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[(0,a.jsx)("div",{className:"size-8 animate-pulse rounded-full bg-sidebar"}),(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)("div",{className:"h-3 w-32 animate-pulse rounded bg-sidebar"}),(0,a.jsx)("div",{className:"h-2 w-48 animate-pulse rounded bg-sidebar"})]})]});if(!t)return null;let n=t.expires?new Date(t.expires):null,o=n?Math.ceil((n.getTime()-Date.now())/864e5):null,c=null!==o&&o<=3;return(0,a.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[t.image?(0,a.jsx)("img",{src:t.image,alt:t.name,className:"size-9 rounded-full object-cover ring-2 ring-border-subtle"}):(0,a.jsx)("div",{className:"flex size-9 items-center justify-center rounded-full bg-primary/10 text-sm font-bold text-primary",children:t.name?.charAt(0)?.toUpperCase()||"F"}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("p",{className:"truncate text-sm font-medium text-text-main",children:t.name}),t.email&&(0,a.jsx)("span",{className:"truncate text-xs text-text-muted",children:t.email})]}),n&&(0,a.jsxs)("div",{className:"mt-0.5 flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px] text-text-muted",children:"schedule"}),(0,a.jsxs)("span",{className:"text-[11px] text-text-muted",children:["Session expires ",n.toLocaleDateString()]}),null!==o&&(0,a.jsxs)(d.Ex,{variant:c?"warning":"success",size:"sm",children:[o,"d left"]})]})]})]})}function M({connectionId:e}){let[t,s]=(0,l.useState)(null),[i,r]=(0,l.useState)(!0);if((0,l.useEffect)(()=>{if(!e)return;let t=!1;return(async()=>{try{let a=await fetch(`/api/providers/${e}/v0-profile`,{cache:"no-store"});if(!a.ok)return;let l=await a.json();t||s(l)}catch{}t||r(!1)})(),()=>{t=!0}},[e]),i)return(0,a.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[(0,a.jsx)("div",{className:"size-8 animate-pulse rounded-full bg-sidebar"}),(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)("div",{className:"h-3 w-32 animate-pulse rounded bg-sidebar"}),(0,a.jsx)("div",{className:"h-2 w-48 animate-pulse rounded bg-sidebar"})]})]});if(!t?.profile&&!t?.balance)return null;let{profile:n,balance:o}=t;return(0,a.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[n?.image?(0,a.jsx)("img",{src:n.image,alt:n.name,className:"size-9 rounded-full object-cover ring-2 ring-border-subtle"}):(0,a.jsx)("div",{className:"flex size-9 items-center justify-center rounded-full bg-primary/10 text-sm font-bold text-primary",children:n?.name?.charAt(0)?.toUpperCase()||"v"}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("p",{className:"truncate text-sm font-medium text-text-main",children:n?.name||"User"}),n?.email&&(0,a.jsx)("span",{className:"truncate text-xs text-text-muted",children:n.email})]}),(0,a.jsxs)("div",{className:"mt-0.5 flex items-center gap-1.5",children:[n?.plan&&(0,a.jsx)(d.Ex,{variant:"v0-free"===n.plan?"default":"primary",size:"sm",children:"v0-free"===n.plan?"Free":n.plan}),n?.teamName&&(0,a.jsx)("span",{className:"truncate text-[11px] text-text-muted",children:n.teamName})]})]}),o&&(0,a.jsxs)("div",{className:"flex shrink-0 flex-col items-end",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-warning",children:"bolt"}),(0,a.jsx)("span",{className:"font-mono text-sm font-bold text-text-main",children:o.remaining}),(0,a.jsxs)("span",{className:"text-[10px] text-text-muted",children:["/",o.total||"?"]})]}),(0,a.jsx)("span",{className:"text-[10px] text-text-muted",children:"credits left"})]})]})}function q({connectionId:e}){let[t,s]=(0,l.useState)(null),[i,r]=(0,l.useState)(!0);return((0,l.useEffect)(()=>{if(!e)return;let t=!1;return(async()=>{try{let a=await fetch(`/api/providers/${e}/qwencloud-profile`,{cache:"no-store"});if(!a.ok)return;let l=await a.json();t||s(l)}catch{}t||r(!1)})(),()=>{t=!0}},[e]),i)?(0,a.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[(0,a.jsx)("div",{className:"size-8 animate-pulse rounded-full bg-sidebar"}),(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)("div",{className:"h-3 w-32 animate-pulse rounded bg-sidebar"}),(0,a.jsx)("div",{className:"h-2 w-48 animate-pulse rounded bg-sidebar"})]})]}):t?(0,a.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2",children:[t.image?(0,a.jsx)("img",{src:t.image,alt:t.name,className:"size-9 rounded-full object-cover ring-2 ring-border-subtle"}):(0,a.jsx)("div",{className:"flex size-9 items-center justify-center rounded-full bg-primary/10 text-sm font-bold text-primary",children:t.name?.charAt(0)?.toUpperCase()||"Q"}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("p",{className:"truncate text-sm font-medium text-text-main",children:t.name}),t.email&&(0,a.jsx)("span",{className:"truncate text-xs text-text-muted",children:t.email})]}),(0,a.jsxs)("div",{className:"mt-0.5 flex items-center gap-1.5",children:[t.channelId&&(0,a.jsxs)(d.Ex,{variant:"info",size:"sm",children:["Region: ",t.channelId]}),t.uid&&(0,a.jsxs)("span",{className:"text-[11px] text-text-muted",children:["UID: ",t.uid]})]})]})]}):null}var L=s(67098);let K={claude:"claudeAutoPing",codex:"codexAutoPing"};function F(){let e,t,s,r=(0,i.useParams)(),h=(0,i.useRouter)(),y=r.id,{getCaps:b}=(0,x.y)(),{markSeen:v}=(0,L.P)("providers");(0,l.useEffect)(()=>{y&&v(y)},[y,v]);let[j,w]=(0,l.useState)([]),[C,S]=(0,l.useState)(!0),[A,O]=(0,l.useState)(null),[z,F]=(0,l.useState)([]),[J,W]=(0,l.useState)(!1),[B,H]=(0,l.useState)(!1),[G,Q]=(0,l.useState)(!1),[V,Z]=(0,l.useState)(""),[X,Y]=(0,l.useState)(!1),[ee,et]=(0,l.useState)(!1),[es,ea]=(0,l.useState)(!1),[el,ei]=(0,l.useState)(!1),[er,en]=(0,l.useState)(null),[eo,ed]=(0,l.useState)({}),[ec,em]=(0,l.useState)([]),[ep,ex]=(0,l.useState)(!1),[eu,eh]=(0,l.useState)({}),[ef,eg]=(0,l.useState)(""),[ey,eb]=(0,l.useState)(()=>new Set),[ev,ej]=(0,l.useState)(""),[eN,ew]=(0,l.useState)(!1),[ek,eC]=(0,l.useState)(!1),[eS,e$]=(0,l.useState)([]),[eA,eT]=(0,l.useState)("__none__"),[eE,eP]=(0,l.useState)(!1),[eO,eI]=(0,l.useState)(null),[ez,eD]=(0,l.useState)(""),[e_,eU]=(0,l.useState)("auto"),[eR,eM]=(0,l.useState)({enabled:!1,connections:{}}),[eq,eL]=(0,l.useState)([]),[eK,eF]=(0,l.useState)([]),[eJ,eW]=(0,l.useState)([]),[eB,eH]=(0,l.useState)(null),[eG,eQ]=(0,l.useState)(!1),[eV,eZ]=(0,l.useState)(!1),[eX,eY]=(0,l.useState)(!1),[e0,e1]=(0,l.useState)(null),[e2,e5]=(0,l.useState)({}),[e3,e4]=(0,l.useState)(null),e6=(0,l.useRef)(!1),[e8,e7]=(0,l.useState)(!1),{copied:e9,copy:te}=(0,p.C)(),tt="ag_risk_confirmed",ts=()=>{W(!0)},ta=()=>{"antigravity"===y&&"true"!==window.localStorage.getItem(tt)?eQ(!0):to?ts():(Z(""),Q(!0))},tl=()=>{Z(""),Q(!0)},ti=()=>{to?ta():tl()},tr=A?{id:A.id,name:A.name||("anthropic-compatible"===A.type?"Anthropic Compatible":"OpenAI Compatible"),color:"anthropic-compatible"===A.type?"#D97757":"#10A37F",textIcon:"anthropic-compatible"===A.type?"AC":"OC",apiType:A.apiType,baseUrl:A.baseUrl,type:A.type}:c.zN[y]||c.fg[y]||c.IS[y]||c.nJ[y]||c.br[y],tn=tr?.authModes||[],to=(!!c.zN[y]||!!c.IS[y]||tn.includes("oauth"))&&tr?.hasOAuth!==!1,td=!!c.fg[y]||tn.includes("apikey")||tr?.hasOAuth===!1,tc=!!c.IS[y]?.noAuth,tm=(0,m.KC)(y),tp=(0,c.wG)(y),tx=(0,c.mq)(y),tu=(0,c.gb)(y),th=tx||tu,tf=!th&&to&&td,tg="xai"===y?"Grok Build OAuth":"OAuth",ty="xai"===y?"xAI API Key":"API Key",tb=c.Q2[y]?.thinkingConfig||c.s9.extended,tv=th?y:tp,tj=th?A?.prefix||y:tp,tN=(0,l.useCallback)(async()=>{try{let e=await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tv)}`,{cache:"no-store"}),t=await e.json();e.ok&&eW(t.ids||[])}catch(e){console.log("Error fetching disabled models:",e)}},[tv]),tw=async e=>{try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:tv,ids:[e]})})).ok&&await tN()}catch(e){console.log("Error disabling model:",e)}},tk=async e=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tv)}&id=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await tN()}catch(e){console.log("Error enabling model:",e)}},tC=async e=>{e.length&&eH({title:"Disable All Models",message:`Disable all ${e.length} model(s)?`,onConfirm:async()=>{eH(null);try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:tv,ids:e})})).ok&&await tN()}catch(e){console.log("Error disabling all models:",e)}}})},tS=async()=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tv)}`,{method:"DELETE"})).ok&&await tN()}catch(e){console.log("Error enabling all models:",e)}},t$=(0,l.useCallback)(async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&ed(t.aliases||{})}catch(e){console.log("Error fetching aliases:",e)}},[]),tA=(0,l.useCallback)(async()=>{try{let e=await fetch("/api/models/custom",{cache:"no-store"}),t=await e.json();e.ok&&em(t.models||[])}catch(e){console.log("Error fetching custom models:",e)}},[]);(0,l.useEffect)(()=>{"kilocode"===y&&fetch("/api/providers/kilo/free-models").then(e=>e.json()).then(e=>{e.models?.length&&eF(e.models)}).catch(()=>{})},[y]);let tT=(0,l.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"})]),l=await e.json(),i=await t.json(),r=await s.json(),n=a.ok?await a.json():{};if(e.ok){let e=(l.connections||[]).filter(e=>e.provider===y);w(e)}s.ok&&F(r.proxyPools||[]);let o=(n.providerStrategies||{})[y]||{};eI(o.fallbackStrategy||null),eD(null!=o.stickyRoundRobinLimit?String(o.stickyRoundRobinLimit):"1");let d=(n.providerThinking||{})[y]||{};eU(d.mode||"auto");let c=K[y],m=c&&n[c]||{};if(eM({enabled:!0===m.enabled,connections:m.connections||{}}),t.ok){let e=(i.nodes||[]).find(e=>e.id===y)||null;if(!e&&th)for(let t=0;t<3;t+=1){await new Promise(e=>setTimeout(e,150));let t=await fetch("/api/provider-nodes",{cache:"no-store"});if(t.ok&&(e=((await t.json()).nodes||[]).find(e=>e.id===y)||null))break}O(e)}}catch(e){console.log("Error fetching connections:",e)}finally{S(!1)}},[y,th]),tE=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&&(O(s.node),await tT(),ea(!1))}catch(e){console.log("Error updating provider node:",e)}},tP=async(e,t)=>{try{let s=await fetch("/api/settings",{cache:"no-store"}),a=(s.ok?await s.json():{}).providerStrategies||{},l={};e&&(l.fallbackStrategy=e),"round-robin"===e&&""!==t&&(l.stickyRoundRobinLimit=Number(t)||3);let i={...a};0===Object.keys(l).length?delete i[y]:i[y]=l,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:i})})}catch(e){console.log("Error saving provider strategy:",e)}},tO=async e=>{try{let t=await fetch("/api/settings",{cache:"no-store"}),s={...(t.ok?await t.json():{}).providerThinking||{}};e&&"auto"!==e?s[y]={mode:e}:delete s[y],await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerThinking:s})})}catch(e){console.log("Error saving thinking config:",e)}},tI=async e=>{let t=K[y];if(t){eM(e);try{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({[t]:e})})}catch(e){console.log("Error saving auto-ping config:",e)}}};(0,l.useEffect)(()=>{tT(),t$(),tA(),tN()},[tT,t$,tA,tN]),(0,l.useEffect)(()=>{let e=(c.zN[y]||c.fg[y]||c.IS[y]||c.nJ[y])?.modelsFetcher;e&&f(e).then(eL)},[y]);let tz=async(e,t,s=tp)=>{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 t$();else{let t=await e.json();alert(t.error||"Failed to set alias")}}catch(e){console.log("Error setting alias:",e)}},tD=async e=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await t$()}catch(e){console.log("Error deleting alias:",e)}},t_=async(e,t="llm",s=tv)=>{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 tA(),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)}},tU=async(e,t="llm",s=tv)=>{try{let a=new URLSearchParams({providerAlias:s,id:e,type:t});(await fetch(`/api/models/custom?${a}`,{method:"DELETE"})).ok&&(await tA(),window.dispatchEvent(new CustomEvent("customModelChanged")))}catch(e){console.log("Error deleting custom model:",e)}},tR=async()=>{if(e8)return;let e=j.find(e=>!1!==e.isActive);if(!e)return void alert((0,u.Tl)("Please add an active Qoder connection first"));e7(!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 l=0;for(let e of a){let t=e.id||e.name;if(!t)continue;let s=t.replace(/^qoder\//,"");ec.some(e=>e.providerAlias===tv&&e.id===s&&"llm"===(e.kind||e.type||"llm"))||Object.values(eo).includes(`${tv}/${s}`)||(await t_(s,"llm",tv),l+=1)}0===l?alert((0,u.Tl)("All models already exist, no new models added")):alert((0,u.Tl)("Successfully added")+` ${l} `+(0,u.Tl)("models"))}catch(e){console.log("Error importing Qoder models:",e),alert((0,u.Tl)("Error fetching models")+": "+e.message)}finally{e7(!1)}},tM=async()=>{if(eV||0===j.length)return;let e=Object.fromEntries(j.map(e=>[e.id,{state:"queued",error:null}]));e6.current=!1,eZ(!0),eY(!1),e1(null),e5(e),e4({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(e6.current){e4({total:j.length,completed:e,passed:t,failed:s,stopped:!0});break}let a=j[e];e1(a.id),e5(e=>({...e,[a.id]:{state:"testing",error:null}}));try{let e=await fetch(`/api/providers/${a.id}/test`,{method:"POST"}),l=await e.json(),i=!!l.valid;i?t+=1:s+=1,e5(e=>({...e,[a.id]:{state:i?"success":"failed",error:i?null:l.error||null}}))}catch(e){s+=1,e5(t=>({...t,[a.id]:{state:"failed",error:e.message||"Test failed"}}))}e4({total:j.length,completed:e+1,passed:t,failed:s,stopped:!1}),e<j.length-1&&await new Promise(e=>setTimeout(e,1e3))}}finally{e1(null),eZ(!1),eY(!1),e6.current=!1}},tq=async e=>{eH({title:"Delete Connection",message:"Delete this connection?",onConfirm:async()=>{eH(null);try{(await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok&&w(t=>t.filter(t=>t.id!==e))}catch(e){console.log("Error deleting connection:",e)}}})},tL=()=>{tT(),W(!1)},tK=async e=>{Z("");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 tT(),Q(!1);return}Z(s?.error||"Failed to save connection")}catch(e){console.log("Error saving connection:",e),Z("Failed to save connection")}},tF=async e=>{try{(await fetch(`/api/providers/${er.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await tT(),et(!1))}catch(e){console.log("Error updating connection:",e)}},tJ=async(e,t)=>{try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&w(s=>s.map(s=>s.id===e?{...s,isActive:t}:s))}catch(e){console.log("Error updating connection status:",e)}},tW=async(e,t)=>{let s=[...j];[s[e],s[t]]=[s[t],s[e]],w(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 tT()}},tB=j.filter(e=>eS.includes(e.id)),tH=j.length>0&&eS.length===j.length;(0,l.useEffect)(()=>{e$(e=>e.filter(e=>j.some(t=>t.id===e)))},[j]),(()=>{if(0===tB.length)return;let e=new Set(tB.map(e=>e.providerSpecificData?.proxyPoolId||"__none__"));if(1===e.size){let t=[...e][0];if("__none__"===t)return;let s=z.find(e=>e.id===t);return s?.name}})();let tG=()=>{eE||ei(!1)},tQ=async e=>{eP(!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 tT(),ei(!1)}finally{eP(!1)}},tV=e=>tQ(j.map(t=>({connectionId:t.id,proxyPoolId:e}))),tZ=(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,eS.includes(s)),onChange:()=>{var t;return t=e.id,void e$(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)($,{connection:e,proxyPools:z,isOAuth:to,isFirst:0===t,isLast:t===j.length-1,onMoveUp:()=>tW(t,t-1),onMoveDown:()=>tW(t,t+1),onToggleActive:t=>tJ(e.id,t),autoPing:K[y]&&"oauth"===e.authType?{on:!0===eR.connections[e.id],onToggle:t=>{var s;return s=e.id,void tI({...eR,connections:{...eR.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&&w(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:()=>{en(e),et(!0)},onDelete:()=>tq(e.id),oneByOneStatus:e2[e.id]||null})})]},e.id)})}),tX=z.filter(e=>!0===e.isActive),tY=(0,a.jsx)(d.aF,{isOpen:el,onClose:tG,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=z.filter(e=>!0===e.isActive);return 0===e.length?void alert("No active proxy pools available."):tQ(j.map((t,s)=>({connectionId:t.id,proxyPoolId:e[s%e.length].id})))},disabled:eE||0===tX.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:()=>tV(null),disabled:eE,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)"})]}),z.map(e=>(0,a.jsxs)("button",{onClick:()=>tV(e.id),disabled:eE||!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))]}),eE&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Applying..."}),(0,a.jsx)(d.$n,{onClick:tG,variant:"ghost",fullWidth:!0,disabled:eE,children:"Cancel"})]})}),t0=async e=>{if(!ey.has(e)){eb(t=>new Set(t).add(e));try{let t=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${tv}/${e}`})}),s=await t.json();eh(t=>({...t,[e]:s.ok?"ok":"error"})),eg(s.ok?"":s.error||"Model not reachable")}catch{eh(t=>({...t,[e]:"error"})),eg("Network error")}finally{eb(t=>{let s=new Set(t);return s.delete(e),s})}}},t1=async e=>{eN||0===e.length||(ew(!0),eg(""),await Promise.all(e.map(e=>t0(e))),ew(!1))};return C?(0,a.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,a.jsx)(d.Qv,{}),(0,a.jsx)(d.Qv,{})]}):tr?(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:`${tr.color}15`},children:ep?(0,a.jsx)("span",{className:"text-sm font-bold",style:{color:tr.color},children:tr.textIcon||tr.id.slice(0,2).toUpperCase()}):(0,a.jsx)(o.default,{src:tx&&tr.apiType?"responses"===tr.apiType?"/providers/oai-r.png":"/providers/oai-cc.png":tu?"/providers/anthropic-m.png":`/providers/${tr.id}.png`,alt:tr.name,width:48,height:48,className:"max-h-12 max-w-12 rounded-lg object-contain",sizes:"48px",onError:()=>ex(!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:tr.name}),(tr.notice?.apiKeyUrl||tr.notice?.signupUrl||tr.website)&&(0,a.jsxs)("a",{href:tr.notice?.apiKeyUrl||tr.notice?.signupUrl||tr.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"}),tr.notice?.apiKeyUrl?"Get API Key":"Sign up / Learn more"]}),"moonshot"===y&&(0,a.jsxs)("a",{href:"https://www.kimi.com/activities/viral-referral/share?scenario=invite&from=share_poster&invitation_code=BPGXZR",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 rounded-full bg-primary/12 px-3 py-1 text-xs font-semibold text-primary ring-1 ring-primary/20 hover:bg-primary/20 transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"celebration"}),"Get KIMI K3 For Free"]})]}),(0,a.jsxs)("p",{className:"text-text-muted",children:[j.length," connection",1===j.length?"":"s"]})]})]})]}),tr.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:tr.deprecationNotice})]}),tr.notice?.text&&!tr.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:tr.notice.text}),tr.notice.apiKeyUrl&&(0,a.jsx)("a",{href:tr.notice.apiKeyUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-flex justify-center rounded bg-blue-500 px-2 py-1 text-xs font-medium text-white transition-colors hover:bg-blue-600 sm:py-0.5",children:"Get API Key →"})]}),th&&A&&(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:tu?"Anthropic Compatible Details":"OpenAI Compatible Details"}),(0,a.jsxs)("p",{className:"break-all text-sm text-text-muted",children:[tu?"Messages API":"responses"===A.apiType?"Responses API":"Chat Completions"," \xb7 ",(A.baseUrl||"").replace(/\/$/,""),"/",tu?"messages":"responses"===A.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:()=>{Z(""),Q(!0)},className:"w-full sm:w-auto",children:"Add API Key"}),(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>ea(!0),className:"w-full sm:w-auto",children:"Edit"}),(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:async()=>{eH({title:"Delete Compatible Node",message:`Delete this ${tu?"Anthropic":"OpenAI"} Compatible node?`,onConfirm:async()=>{eH(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"})]})]})}),tc?(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)(D,{providerId:y}),"freebuff-web"===y&&j.length>0&&(0,a.jsx)(R,{connectionId:j[0].id}),"v0-vercel-web"===y&&j.length>0&&(0,a.jsx)(M,{connectionId:j[0].id}),"qwencloud"===y&&j.length>0&&(0,a.jsx)(q,{connectionId:j[0].id})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-4",children:[j.length>0&&z.length>0&&(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"lan",onClick:()=>ei(!0),children:"Apply Proxy"}),j.length>0&&(0,a.jsxs)(a.Fragment,{children:[eS.length>0&&(0,a.jsxs)(d.$n,{size:"sm",variant:"danger",icon:"delete",onClick:()=>{let e=eS.length;0!==e&&eH({title:`Delete ${e} Connection${e>1?"s":""}`,message:`Delete ${e} connection${e>1?"s":""}? This cannot be undone.`,onConfirm:async()=>{eH(null);let e=0,t=[...eS];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}w(e=>e.filter(e=>!t.includes(e.id))),e$([]),e>0&&alert(`Deleted ${t.length-e} connection(s), ${e} failed.`)}})},children:["Delete Selected (",eS.length,")"]}),(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"sync",onClick:tM,disabled:eV,children:eV?"Testing Connection One-by-One...":"Test Connection One-by-One"}),eV&&(0,a.jsx)(d.$n,{size:"sm",variant:"ghost",icon:"stop",onClick:()=>{eV&&(e6.current=!0,eY(!0))},disabled:eX,children:eX?"Stopping...":"Stop"})]}),tb&&(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"Thought Level"}),(0,a.jsx)("select",{value:e_,onChange:e=>{var t;eU(t=e.target.value),tO(t)},className:"text-xs px-2 py-1 border border-border rounded-md bg-background focus:outline-none focus:border-primary",children:tb.options.map(e=>(0,a.jsx)("option",{value:e,children:e.charAt(0).toUpperCase()+e.slice(1)},e))})]}),(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"===eO,onChange:e=>{let t=e?"round-robin":null,s=e?ez||"1":ez;e&&!ez&&eD("1"),eI(t),tP(t,s)}}),"round-robin"===eO&&(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:ez,onChange:e=>{var t;eD(t=e.target.value),tP("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"})]})]}),"zenmux-free"===y&&j.length>0&&(0,a.jsx)(_,{connectionId:j[0].id,cookie:j[0].apiKey||"",currentPlan:j[0].providerSpecificData?.zenmuxPlan||"free",onPlanChanged:()=>{tT()}})]})]}),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:to?"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"}),tf&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Choose ",tg," or ",ty,"."]})]})]}),(0,a.jsx)("div",{className:"flex gap-2",children:tf?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:ta,children:tg}),(0,a.jsx)(d.$n,{size:"sm",icon:"key",onClick:tl,children:ty})]}):(0,a.jsxs)(a.Fragment,{children:[!th&&"iflow"===y&&(0,a.jsx)(d.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>H(!0),children:"Cookie"}),"codex"===y&&(0,a.jsx)(d.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>Y(!0),children:(0,u.Tl)("Bulk Add")}),(0,a.jsx)(d.$n,{size:"sm",icon:"add",onClick:ti,children:th?"Add API Key":"iflow"===y?"OAuth":"Add Connection"})]})})]}):(0,a.jsxs)(a.Fragment,{children:[e3&&(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: ",e3.total]}),(0,a.jsxs)("span",{children:["Completed: ",e3.completed]}),(0,a.jsxs)("span",{children:["Passed: ",e3.passed]}),(0,a.jsxs)("span",{children:["Failed: ",e3.failed]}),e3.stopped&&(0,a.jsx)("span",{className:"text-warning",children:"Stopped"}),eV&&e0&&(0,a.jsxs)("span",{children:["Running: ",j.find(e=>e.id===e0)?.name||e0]})]})}),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:tH,onChange:()=>{tH?e$([]):e$(j.map(e=>e.id))},className:"h-3.5 w-3.5 rounded border-gray-300 text-primary focus:ring-primary"}),"Select All"]})}),tZ,!th&&(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:()=>H(!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:()=>Y(!0),title:(0,u.Tl)("Bulk import codex accounts from JSON"),className:"w-full sm:w-auto",children:(0,u.Tl)("Bulk Add")}),tf?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:ta,className:"w-full sm:w-auto",children:tg}),(0,a.jsx)(d.$n,{size:"sm",icon:"key",onClick:tl,className:"w-full sm:w-auto",children:ty})]}):(0,a.jsx)(d.$n,{size:"sm",icon:"add",onClick:ti,className:"w-full sm:w-auto",children:"Add"})]})]})]}),(0,a.jsx)(d.Zp,{children:(0,a.jsx)("div",{className:"py-1",children:(0,a.jsx)(U,{providerId:y})})}),(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"}),!th&&(e=[...tm,...eK.filter(e=>!tm.some(t=>t.id===e.id))].filter(e=>{let t=(0,m.CP)(e);return!t||"llm"===t}).map(e=>e.id).filter(e=>!eJ.includes(e)),t=ev.trim().toLowerCase(),s=e.filter(e=>!t||e.toLowerCase().includes(t)),(0,a.jsxs)("div",{className:"flex flex-wrap gap-2",children:[eJ.length>0&&(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"restart_alt",onClick:tS,children:"Active All"}),e.length>0&&(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"block",onClick:()=>tC(e),children:"Disable All"}),(j.length>0||tc)&&s.length>0&&(0,a.jsx)(d.$n,{size:"sm",variant:"primary",icon:eN?"progress_activity":"play_arrow",onClick:()=>t1(s),disabled:eN,children:eN?"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:ev,onChange:e=>ej(e.target.value),className:"w-full"})})]}),!!ef&&(0,a.jsx)("p",{className:"text-xs text-danger mb-3 break-words",children:ef}),(()=>{let e,t,s;if(th)return(0,a.jsx)(k,{providerStorageAlias:tv,providerDisplayAlias:tj,modelAliases:eo,customModels:ec,copied:e9,onCopy:te,onSetAlias:tz,onDeleteAlias:tD,onAddCustomModel:e=>t_(e,"llm",tv),onDeleteCustomModel:e=>tU(e,"llm",tv),connections:j,isAnthropic:tu});let l=[...tm,...eK.filter(e=>!tm.some(t=>t.id===e.id))].filter(e=>{let t=(0,m.CP)(e);return!t||"llm"===t}),i=new Set(eJ),r=l.filter(e=>!i.has(e.id)),n=l.filter(e=>i.has(e.id)),o=g({customModels:ec,modelAliases:eo,providerAlias:tv,builtInModels:tm,type:"llm"}),d=ev.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)(N,{model:{id:e.id,name:e.name},fullModel:`${tj}/${e.id}`,alias:e.alias,copied:e9,onCopy:te,onSetAlias:()=>{},onDeleteAlias:()=>{"custom"===e.source?tU(e.id,"llm",tv):tD(e.alias)},testStatus:eu[e.id],onTest:j.length>0||tc?()=>t0(e.id):void 0,isTesting:ey.has(e.id),isCustom:!0,isFree:!1,caps:b(`${y}/${e.id}`)},`${e.source}-${e.fullModel}`)),p.map(e=>{let t=`${tv}/${e.id}`,s=`${y}/${e.id}`,l=Object.entries(eo).find(([,e])=>e===t||e===s)?.[0];return(0,a.jsx)(N,{model:e,fullModel:`${tj}/${e.id}`,alias:l,copied:e9,onCopy:te,onSetAlias:t=>tz(e.id,t,tv),onDeleteAlias:()=>tD(l),testStatus:eu[e.id],onTest:j.length>0||tc?()=>t0(e.id):void 0,isTesting:ey.has(e.id),isFree:e.isFree,onDisable:()=>tw(e.id),caps:b(`${y}/${e.id}`)},e.id)}),ev.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 “",ev,"”"]}),(0,a.jsxs)("button",{onClick:()=>eC(!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:tR,disabled:e8,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:e8?{animation:"spin 1s linear infinite"}:void 0,children:e8?"progress_activity":"download"}),e8?(0,u.Tl)("Fetching..."):(0,u.Tl)("Fetch Qoder Models")]}),eq.length>0&&(e=new Set([...Object.values(eo),...o.map(e=>e.fullModel)]),t=new Set(tm.map(e=>e.id)),0===(s=eq.filter(s=>!e.has(`${tv}/${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 t_(e.id,"llm",tv)},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:()=>tk(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))})]})]})})()]}),tY,"kiro"===y?(0,a.jsx)(d.Mh,{isOpen:J,providerInfo:tr,onSuccess:tL,onClose:()=>W(!1)}):"cursor"===y?(0,a.jsx)(d.G9,{isOpen:J,onSuccess:tL,onClose:()=>W(!1)}):"gitlab"===y?(0,a.jsx)(d.vj,{isOpen:J,providerInfo:tr,onSuccess:tL,onClose:()=>W(!1)}):(0,a.jsx)(d.LF,{isOpen:J,provider:y,providerInfo:tr,onSuccess:tL,onClose:()=>W(!1)}),"iflow"===y&&(0,a.jsx)(d.vE,{isOpen:B,onSuccess:()=>{tT(),H(!1)},onClose:()=>H(!1)}),(0,a.jsx)(T,{isOpen:G,provider:y,providerName:tr.name,isCompatible:th,isAnthropic:tu,authType:tr?.authType,authHint:tr?.authHint,website:tr?.website,proxyPools:z,error:V,onSave:tK,onBulkDone:tT,onClose:()=>{Z(""),Q(!1)}}),(0,a.jsx)(d.wI,{isOpen:ee,connection:er,proxyPools:z,onSave:tF,onClose:()=>et(!1)}),th&&(0,a.jsx)(E,{isOpen:es,node:A,onSave:tE,onClose:()=>ea(!1),isAnthropic:tu}),!th&&(0,a.jsx)(P,{isOpen:ek,providerAlias:tv,providerDisplayAlias:tj,onSave:async e=>{await t_(e,"llm",tv),eC(!1)},onClose:()=>eC(!1)}),"codex"===y&&(0,a.jsx)(I,{isOpen:X,onClose:()=>Y(!1),onSuccess:tT}),(0,a.jsx)(d.uo,{isOpen:eG,onClose:()=>eQ(!1),onConfirm:()=>{(window.localStorage.setItem(tt,"true"),eQ(!1),to)?ts():tl()},title:"Risk Notice",message:tr?.deprecationNotice,confirmText:"I Understand, Continue",cancelText:"Cancel",variant:"danger"}),(0,a.jsx)(d.uo,{isOpen:!!eB,onClose:()=>eH(null),onConfirm:eB?.onConfirm,title:eB?.title||"Confirm",message:eB?.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"})]})}},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,26706))}},e=>{e.O(0,[27,5772,1321,705,5497,8441,3794,7358],()=>e(e.s=88845)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8460],{34695:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>T});var a=s(95155),r=s(12115),i=s(98500),n=s.n(i),l=s(35497),o=s(90620),d=s(88105),c=s(65921),p=s(38003),m=s(67098),h=s(14051),u=s.n(h),x=s(57250);let g=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","openvecta","freebuff-web","zenmux-free","perplexity-agent","featherless","moonshot","qwencloud"]);function f({providerId:e,provider:t,stats:s,onToggle:r,isNoAuth:i=!1,comingSoon:o=!1,isNew:c=!1}){let p=e.startsWith(d.JH),m=e.startsWith(d.DI),{connected:h,error:u,errorCode:b,errorTime:v,allDisabled:y}=s;return(0,a.jsxs)("div",{className:"group relative flex items-center justify-between 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,a.jsxs)(n(),{href:`/dashboard/providers/${e}`,className:"flex min-w-0 flex-1 items-center gap-3",children:[(0,a.jsx)("div",{className:"size-8 shrink-0 rounded-lg flex items-center justify-center",style:{backgroundColor:`${t.color?.length>7?t.color:t.color+"15"}`},children:(0,a.jsx)(x.A,{src:p?"responses"===t.apiType?"/providers/oai-r.png":"/providers/oai-cc.png":m?"/providers/anthropic-m.png":`/providers/${t.id}.${g.has(t.id)?"svg":"png"}`,alt:t.name,size:30,className:"object-contain rounded-lg max-w-[30px] max-h-[30px]",fallbackText:t.textIcon||t.id.slice(0,2).toUpperCase(),fallbackColor:t.color})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("h3",{className:"truncate text-sm font-semibold text-text-main",children:[t.name,c&&(0,a.jsx)("span",{className:"ml-1.5 inline-flex items-center rounded-full bg-primary/12 px-1.5 py-0.5 text-[10px] font-bold text-primary ring-1 ring-primary/20",children:"NEW"})]}),(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-1.5 text-xs flex-wrap",children:[y?(0,a.jsx)(l.Ex,{variant:"default",size:"sm",children:(0,a.jsxs)("span",{className:"flex items-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"pause_circle"}),"Disabled"]})}):i&&0===h&&0===u?(0,a.jsx)(l.Ex,{variant:"success",size:"sm",dot:!0,children:"Ready"}):h>0?(0,a.jsxs)(l.Ex,{variant:"success",size:"sm",dot:!0,children:[h," Connected"]}):null,u>0&&(0,a.jsx)(l.Ex,{variant:"error",size:"sm",dot:!0,children:b?`${u} Error (${b})`:`${u} Error`}),0===h&&0===u&&!i&&0===s.total&&(0,a.jsx)("span",{className:"text-text-muted",children:"No connections"}),o&&(0,a.jsx)(l.Ex,{variant:"warning",size:"sm",children:(0,a.jsxs)("span",{className:"flex items-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"schedule"}),"Coming Soon"]})}),p&&(0,a.jsx)(l.Ex,{variant:"default",size:"sm",children:"responses"===t.apiType?"Responses":"Chat"}),m&&(0,a.jsx)(l.Ex,{variant:"default",size:"sm",children:"Messages"}),v&&(0,a.jsx)("span",{className:"text-text-muted",children:v})]})]})]}),(0,a.jsx)("div",{className:"flex shrink-0 items-center gap-2",children:s.total>0&&r&&(0,a.jsx)("div",{className:"opacity-60 transition-opacity sm:opacity-0 sm:group-hover:opacity-100",onClick:e=>{e.preventDefault(),e.stopPropagation(),r(!!y)},children:(0,a.jsx)(l.lM,{size:"sm",checked:!y,onChange:()=>{}})})})]})}function b({title:e,icon:t,count:s,connectedCount:r,isExpanded:i,onToggle:n,isSearching:o,onTestAll:d,testingMode:c,testModeKey:p,children:m,hasContent:h=!0,emptyTitle:u="No providers in this category",emptyDescription:x="Providers you add will appear here."}){let g=i||o;return(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("button",{type:"button",onClick:n,className:"flex items-center gap-2 text-lg font-semibold leading-tight text-text-main transition-colors hover:text-primary","aria-expanded":g,children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[20px] transition-transform ${g?"rotate-90":""}`,children:"chevron_right"}),e,(0,a.jsxs)("span",{className:"text-xs font-normal text-text-muted",children:["(",s,")"]})]}),d&&h&&(0,a.jsx)(l.$n,{size:"sm",variant:"outline",icon:c===p?"progress_activity":"play_arrow",onClick:d,disabled:!!c,className:c===p?"animate-pulse":"",children:c===p?"Testing...":"Test All"})]}),g&&(h?(0,a.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:m}):(0,a.jsx)(l.pp,{icon:t||"dns",title:u,description:x}))]})}f.propTypes={providerId:u().string.isRequired,provider:u().shape({id:u().string,name:u().string,color:u().string,textIcon:u().string,apiType:u().string}).isRequired,stats:u().shape({connected:u().number,error:u().number,total:u().number,errorCode:u().string,errorTime:u().string,allDisabled:u().bool}).isRequired,onToggle:u().func,isNoAuth:u().bool,comingSoon:u().bool},b.propTypes={title:u().string.isRequired,icon:u().string,count:u().number.isRequired,connectedCount:u().number,isExpanded:u().bool.isRequired,onToggle:u().func.isRequired,isSearching:u().bool,onTestAll:u().func,testingMode:u().string,testModeKey:u().string,children:u().node,hasContent:u().bool,emptyTitle:u().string,emptyDescription:u().string};let v={oauth:"OAuth",free:"Free",apikey:"API Key",cookie:"Cookies",compatible:"Custom",provider:"Provider",all:"All"};function y({results:e}){if(e.error&&!e.results)return(0,a.jsxs)("div",{className:"py-6 text-center",children:[(0,a.jsx)("span",{className:"material-symbols-outlined mb-2 block text-[32px] text-danger",children:"error"}),(0,a.jsx)("p",{className:"text-sm text-danger",children:e.error})]});let{summary:t,mode:s}=e,r=e.results||[],i=v[s]||s;return(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-3",children:[t&&(0,a.jsxs)("div",{className:"mb-1 flex flex-wrap items-center gap-2 text-xs sm:gap-3",children:[(0,a.jsxs)("span",{className:"text-text-muted",children:[i," Test"]}),(0,a.jsxs)("span",{className:"rounded bg-success/15 px-2 py-0.5 font-medium text-success",children:[t.passed," passed"]}),t.failed>0&&(0,a.jsxs)("span",{className:"rounded bg-danger/15 px-2 py-0.5 font-medium text-danger",children:[t.failed," failed"]}),(0,a.jsxs)("span",{className:"text-text-muted sm:ml-auto",children:[t.total," tested"]})]}),r.map((e,t)=>(0,a.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2 rounded-lg bg-surface-2 px-3 py-2 text-xs sm:flex-nowrap",children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[16px] ${e.valid?"text-success":"text-danger"}`,children:e.valid?"check_circle":"error"}),(0,a.jsxs)("div",{className:"min-w-0 flex-[1_1_160px]",children:[(0,a.jsx)("span",{className:"block truncate font-medium sm:inline",children:e.connectionName}),(0,a.jsxs)("span",{className:"block truncate text-text-muted sm:ml-1.5 sm:inline",children:["(",e.provider,")"]})]}),void 0!==e.latencyMs&&(0,a.jsxs)("span",{className:"shrink-0 font-mono tabular-nums text-text-muted",children:[e.latencyMs,"ms"]}),(0,a.jsx)("span",{className:`shrink-0 rounded px-1.5 py-0.5 text-[10px] font-bold uppercase ${e.valid?"bg-success/15 text-success":"bg-danger/15 text-danger"}`,children:e.valid?"OK":e.diagnosis?.type||"ERROR"})]},e.connectionId||t)),0===r.length&&(0,a.jsx)("div",{className:"py-4 text-center text-sm text-text-muted",children:"No active connections found for this group."})]})}function j({totalProviders:e,connectedProviders:t,errorCount:s,onTestAll:r,testingMode:i}){return(0,a.jsxs)("div",{className:"flex flex-col gap-3 rounded-brand border border-border-subtle bg-panel p-4 shadow-[var(--shadow-soft)] sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-4 text-sm",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] text-primary",children:"dns"}),(0,a.jsx)("span",{className:"font-semibold text-text-main",children:e}),(0,a.jsx)("span",{className:"text-text-muted",children:"providers"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"size-2 rounded-full bg-success"}),(0,a.jsx)("span",{className:"font-semibold text-text-main",children:t}),(0,a.jsx)("span",{className:"text-text-muted",children:"connected"})]}),s>0&&(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"size-2 rounded-full bg-danger"}),(0,a.jsx)("span",{className:"font-semibold text-text-main",children:s}),(0,a.jsx)("span",{className:"text-text-muted",children:"errors"})]})]}),r&&(0,a.jsx)(l.$n,{size:"sm",variant:"primary",icon:"all"===i?"progress_activity":"bolt",onClick:r,disabled:!!i,className:"all"===i?"animate-pulse":"",children:"all"===i?"Testing All...":"Test All Providers"})]})}y.propTypes={results:u().shape({mode:u().string,results:u().array,summary:u().shape({total:u().number,passed:u().number,failed:u().number}),error:u().string}).isRequired},j.propTypes={totalProviders:u().number,connectedProviders:u().number,errorCount:u().number,onTestAll:u().func,testingMode:u().string};let N={openai:{title:"Add OpenAI Compatible",type:"openai-compatible",defaultBaseUrl:"https://api.openai.com/v1",namePlaceholder:"OpenAI Compatible (Prod)",prefixPlaceholder:"oc-prod",baseUrlHint:"Use the base URL (ending in /v1) for your OpenAI-compatible API.",modelIdPlaceholder:"e.g. gpt-4, claude-3-opus",errorLabel:"OpenAI Compatible",hasApiType:!0},anthropic:{title:"Add Anthropic Compatible",type:"anthropic-compatible",defaultBaseUrl:"https://api.anthropic.com/v1",namePlaceholder:"Anthropic Compatible (Prod)",prefixPlaceholder:"ac-prod",baseUrlHint:"Use the base URL (ending in /v1) for your Anthropic-compatible API. The system will append /messages.",modelIdPlaceholder:"e.g. claude-3-opus",errorLabel:"Anthropic Compatible",hasApiType:!1}},w=[{value:"chat",label:"Chat Completions"},{value:"responses",label:"Responses API"}];function C({variant:e,isOpen:t,onClose:s,onCreated:i}){let n=N[e],o=()=>({name:"",prefix:"",...n.hasApiType?{apiType:"chat"}:{},baseUrl:n.defaultBaseUrl}),[d,c]=(0,r.useState)(o),[p,m]=(0,r.useState)(!1),[h,u]=(0,r.useState)(""),[x,g]=(0,r.useState)(""),[f,b]=(0,r.useState)(!1),[v,y]=(0,r.useState)(null);(0,r.useEffect)(()=>{n.hasApiType?c(e=>({...e,baseUrl:n.defaultBaseUrl})):t&&(y(null),u(""),g(""))},[n.hasApiType?d.apiType:t]);let j=async()=>{if(d.name.trim()&&d.prefix.trim()&&d.baseUrl.trim()){m(!0);try{let e=await fetch("/api/provider-nodes",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:d.name,prefix:d.prefix,...n.hasApiType?{apiType:d.apiType}:{},baseUrl:d.baseUrl,type:n.type})}),t=await e.json();e.ok&&(i(t.node),c(o()),u(""),y(null))}catch(e){console.log(`Error creating ${n.errorLabel} node:`,e)}finally{m(!1)}}},k=async()=>{b(!0);try{let e=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:d.baseUrl,apiKey:h,type:n.type,modelId:x.trim()||void 0})}),t=await e.json();y(t)}catch{y({valid:!1,error:"Network error"})}finally{b(!1)}};return(0,a.jsx)(l.aF,{isOpen:t,title:n.title,onClose:s,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)(l.pd,{label:"Name",value:d.name,onChange:e=>c({...d,name:e.target.value}),placeholder:n.namePlaceholder,hint:"Required. A friendly label for this node."}),(0,a.jsx)(l.pd,{label:"Prefix",value:d.prefix,onChange:e=>c({...d,prefix:e.target.value}),placeholder:n.prefixPlaceholder,hint:"Required. Used as the provider prefix for model IDs."}),n.hasApiType&&(0,a.jsx)(l.l6,{label:"API Type",options:w,value:d.apiType,onChange:e=>c({...d,apiType:e.target.value})}),(0,a.jsx)(l.pd,{label:"Base URL",value:d.baseUrl,onChange:e=>c({...d,baseUrl:e.target.value}),placeholder:n.defaultBaseUrl,hint:n.baseUrlHint}),(0,a.jsx)(l.pd,{label:"API Key (for Check)",type:"password",value:h,onChange:e=>u(e.target.value)}),(0,a.jsx)(l.pd,{label:"Model ID (optional)",value:x,onChange:e=>g(e.target.value),placeholder:n.modelIdPlaceholder,hint:"If provider lacks /models endpoint, enter a model ID to validate via chat/completions instead."}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center",children:[(0,a.jsx)(l.$n,{onClick:k,disabled:!h||f||!d.baseUrl.trim(),variant:"secondary",className:"w-full sm:w-auto",children:f?"Checking...":"Check"}),(()=>{if(!v)return null;let{valid:e,error:t,method:s}=v;return e?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(l.Ex,{variant:"success",children:"Valid"}),"chat"===s&&(0,a.jsx)("span",{className:"text-sm text-text-muted",children:"(via inference test)"})]}):(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)(l.Ex,{variant:"error",children:"Invalid"}),t&&(0,a.jsx)("span",{className:"text-sm text-red-500",children:t})]})})()]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row",children:[(0,a.jsx)(l.$n,{onClick:j,fullWidth:!0,disabled:!d.name.trim()||!d.prefix.trim()||!d.baseUrl.trim()||p,children:p?"Creating...":"Create"}),(0,a.jsx)(l.$n,{onClick:s,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})})}function k(e,t){return e?.hasOAuth===!1?"apikey":t}function T(){let e,[t,s]=(0,r.useState)([]),[i,n]=(0,r.useState)([]),[h,u]=(0,r.useState)(!0),[x,g]=(0,r.useState)(!1),{isNew:v,markSeen:N}=(0,m.P)("providers"),[w,T]=(0,r.useState)(!1),[A,S]=(0,r.useState)(!1),[P,I]=(0,r.useState)(!0),[O,$]=(0,r.useState)(!0),[E,U]=(0,r.useState)(!0),[R,z]=(0,r.useState)(!1),[M,_]=(0,r.useState)(!1),[q,D]=(0,r.useState)(null),[L,K]=(0,r.useState)(null),J=(0,r.useRef)(!1),W=(0,c.i)(),F=(0,p.C)(e=>e.query),B=(0,p.C)(e=>e.register),H=(0,p.C)(e=>e.unregister),Q=(0,r.useCallback)(async()=>{try{let e=await fetch("/api/providers"),t=await e.json();e.ok&&s(t.connections||[])}catch{}},[]);(0,r.useEffect)(()=>(B("Search providers..."),()=>H()),[B,H]),(0,r.useEffect)(()=>{(async()=>{try{let[e,t]=await Promise.all([fetch("/api/providers"),fetch("/api/provider-nodes")]),a=await e.json(),r=await t.json();e.ok&&s(a.connections||[]),t.ok&&n(r.nodes||[])}catch{}u(!1)})()},[]);let V=!!F.trim(),Y=(e=F.trim().toLowerCase(),(t,s="",a="")=>!e||t.toLowerCase().includes(e)||s.toLowerCase().includes(e)||a.toLowerCase().includes(e)),G=(e,s)=>{let a=Array.isArray(s)?s:[s],r=t.filter(t=>t.provider===e&&a.includes(t.authType)),i=e=>{let t=Object.entries(e).some(([e,t])=>e.startsWith("modelLock_")&&t&&new Date(t).getTime()>Date.now());return"unavailable"!==e.testStatus||t?e.testStatus:"active"},n=r.filter(e=>{let t=i(e);return"active"===t||"success"===t}).length,l=r.filter(e=>{let t=i(e);return"error"===t||"failed"===t}),o=l.length,d=l[0],c=d?Object.entries(d).some(([e,t])=>e.startsWith("modelLock_")&&t&&new Date(t).getTime()>Date.now())?"COOLDOWN":d.errorCode||null:null,p=d?.lastErrorAt?function(e){if(!e)return null;let t=new Date(e),s=Math.floor((new Date().getTime()-t.getTime())/6e4);if(s<1)return"just now";if(s<60)return`${s}m ago`;let a=Math.floor(s/60);if(a<24)return`${a}h ago`;let r=Math.floor(a/24);return r<7?`${r}d ago`:t.toLocaleDateString()}(d.lastErrorAt):null,m=r.length>0&&r.every(e=>!1===e.isActive);return{connected:n,error:o,total:r.length,errorCode:c,errorTime:p,allDisabled:m}},X=(e,t)=>[...e].sort(([e,s],[a,r])=>{let i=s.priority??999,n=r.priority??999;if(i!==n)return i-n;let l=G(e,t),o=G(a,t),d=l.total>0?0:1,c=o.total>0?0:1;return d!==c?d-c:(s.name||"").localeCompare(r.name||"")}),Z=(0,r.useCallback)((e,t,a)=>{let r=Array.isArray(t)?t:[t],i=t=>t.provider===e&&r.includes(t.authType);s(e=>(Promise.allSettled(e.filter(i).map(e=>fetch(`/api/providers/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:a})}))),e.map(e=>i(e)?{...e,isActive:a}:e)))},[]),ee=(0,r.useCallback)(async(e,t=null)=>{if(!J.current){J.current=!0,D("provider"===e?t:e),K(null);try{let s=await fetch("/api/providers/test-batch",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({mode:e,providerId:t})}),a=await s.json();if(K(a),a.summary){let{passed:e,failed:t,total:s}=a.summary;0===t?W.success(`All ${s} tests passed`):W.warning(`${e}/${s} passed, ${t} failed`)}Q()}catch{K({error:"Test request failed"}),W.error("Provider test failed")}finally{D(null),J.current=!1}}},[W,Q]),et=i.filter(e=>"openai-compatible"===e.type).map(e=>({id:e.id,name:e.name||"OpenAI Compatible",color:"#10A37F",textIcon:"OC",apiType:e.apiType})).filter(e=>Y(e.name,e.id)),es=i.filter(e=>"anthropic-compatible"===e.type).map(e=>({id:e.id,name:e.name||"Anthropic Compatible",color:"#D97757",textIcon:"AC"})).filter(e=>Y(e.name,e.id)),ea=X(Object.entries(o.zN).filter(([,e])=>!e.hidden&&Y(e.name,e.id,e.alias)),"oauth"),er=Object.entries(d.IS).filter(([,e])=>!e.hidden&&Y(e.name,e.id,e.alias)).sort(([,e],[,t])=>!!t.noAuth-!!e.noAuth),ei=X(Object.entries(d.nJ).filter(([,e])=>!e.hidden&&Y(e.name,e.id,e.alias)),"apikey"),en=Object.entries(o.fg).filter(([,e])=>!e.hidden&&(e.serviceKinds??["llm"]).includes("llm")&&Y(e.name,e.id,e.alias)).sort(([e,t],[s,a])=>{let r=G(e,"apikey").total>0?0:1,i=G(s,"apikey").total>0?0:1;return r!==i?r-i:(t.name||"").localeCompare(a.name||"")}),el=Object.entries(d.br).filter(([,e])=>!e.hidden&&Y(e.name,e.id,e.alias)).sort(([e,t],[s,a])=>{let r=G(e,"cookie").total>0?0:1,i=G(s,"cookie").total>0?0:1;return r!==i?r-i:(t.name||"").localeCompare(a.name||"")}),eo=V||x?en:en.slice(0,20),ed=ea.length+er.length+ei.length+en.length+el.length,ec=[...ea,...er,...ei,...en,...el].map(([e])=>e),ep=ec.filter(e=>{let t=o.zN[e]||o.fg[e]||d.IS[e]||d.nJ[e]||d.br[e];return G(e,k(t,t?.authType||"apikey")).connected>0}).length,em=ec.filter(e=>{let t=o.zN[e]||o.fg[e]||d.IS[e]||d.nJ[e]||d.br[e];return G(e,k(t,t?.authType||"apikey")).error>0}).length;if(h)return(0,a.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,a.jsx)(l.Qv,{}),(0,a.jsx)(l.Qv,{})]});let eh=et.length>0||es.length>0||ea.length>0||er.length>0||ei.length>0||en.length>0||el.length>0;return(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-6",children:[(0,a.jsx)(l.zY,{title:"Providers",description:"Connect, configure, and manage AI providers",icon:"dns",actions:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(l.$n,{size:"sm",variant:"outline",icon:"add",onClick:()=>_(!0),children:"Anthropic"}),(0,a.jsx)(l.$n,{size:"sm",icon:"add",onClick:()=>z(!0),children:"OpenAI"})]})}),(0,a.jsx)(j,{totalProviders:ed,connectedProviders:ep,errorCount:em,onTestAll:()=>ee("all"),testingMode:q}),V&&!eh&&(0,a.jsx)(l.pp,{icon:"search_off",title:`No providers match "${F}"`,description:"Try a different search term, or browse the sections below."}),(0,a.jsxs)(b,{title:"Custom Providers (OpenAI/Anthropic Compatible)",icon:"extension",count:et.length+es.length,isExpanded:w,onToggle:()=>T(e=>!e),isSearching:V,hasContent:et.length>0||es.length>0,emptyTitle:"No custom providers",emptyDescription:"Add OpenAI or Anthropic compatible endpoints to get started.",children:[(0,a.jsx)(l.$n,{size:"sm",icon:"add",onClick:()=>_(!0),children:"Add Anthropic"}),(0,a.jsx)(l.$n,{size:"sm",variant:"secondary",icon:"add",onClick:()=>z(!0),children:"Add OpenAI"}),[...et,...es].map(e=>(0,a.jsx)(f,{providerId:e.id,provider:e,stats:G(e.id,"apikey"),isNew:v(e.id),onToggle:t=>Z(e.id,"apikey",t)},e.id))]}),(0,a.jsx)(b,{title:"Cookies Provider",icon:"cookie",count:el.length,isExpanded:A,onToggle:()=>S(e=>!e),isSearching:V,onTestAll:()=>ee("cookie"),testingMode:q,testModeKey:"cookie",hasContent:el.length>0,children:el.map(([e,t])=>(0,a.jsx)(f,{providerId:e,provider:t,stats:G(e,"cookie"),isNoAuth:!!t.noAuth,isNew:v(e),onToggle:t=>Z(e,"cookie",t)},e))}),(0,a.jsx)(b,{title:"OAuth Providers",icon:"lock",count:ea.length,isExpanded:P,onToggle:()=>I(e=>!e),isSearching:V,onTestAll:()=>ee("oauth"),testingMode:q,testModeKey:"oauth",hasContent:ea.length>0,children:ea.map(([e,t])=>{let s=k(t,"oauth");return(0,a.jsx)(f,{providerId:e,provider:t,stats:G(e,s),comingSoon:!!t.comingSoon,isNew:v(e),onToggle:t=>Z(e,s,t)},e)})}),(0,a.jsxs)(b,{title:"Free Tier Providers",icon:"redeem",count:er.length+ei.length,isExpanded:O,onToggle:()=>$(e=>!e),isSearching:V,onTestAll:()=>ee("free"),testingMode:q,testModeKey:"free",hasContent:er.length>0||ei.length>0,children:[er.map(([e,t])=>{let s="kiro"===e?["oauth","apikey","api_key"]:"oauth";return(0,a.jsx)(f,{providerId:e,provider:t,stats:G(e,s),isNoAuth:!!t.noAuth,isNew:v(e),onToggle:t=>Z(e,s,t)},e)}),ei.map(([e,t])=>(0,a.jsx)(f,{providerId:e,provider:t,stats:G(e,"apikey"),isNew:v(e),onToggle:t=>Z(e,"apikey",t)},e))]}),(0,a.jsxs)(b,{title:"API Key Providers",icon:"key",count:en.length,isExpanded:E,onToggle:()=>U(e=>!e),isSearching:V,onTestAll:()=>ee("apikey"),testingMode:q,testModeKey:"apikey",hasContent:en.length>0,children:[eo.map(([e,t])=>(0,a.jsx)(f,{providerId:e,provider:t,stats:G(e,"apikey"),isNew:v(e),onToggle:t=>Z(e,"apikey",t)},e)),!V&&!x&&en.length>20&&(0,a.jsxs)("button",{onClick:()=>g(!0),className:"flex w-full items-center justify-center gap-1.5 rounded-brand border border-dashed border-primary/40 px-3 py-2.5 text-sm font-medium text-primary transition-colors hover:border-primary hover:bg-primary/5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"expand_more"}),"Show all ",en.length," providers"]})]}),L&&(0,a.jsx)(l.aF,{isOpen:!!L,onClose:()=>K(null),title:"Provider Test Results",size:"md",children:(0,a.jsx)(y,{results:L})}),(0,a.jsx)(C,{variant:"openai",isOpen:R,onClose:()=>z(!1),onCreated:e=>{n(t=>[...t,e]),z(!1)}}),(0,a.jsx)(C,{variant:"anthropic",isOpen:M,onClose:()=>_(!1),onCreated:e=>{n(t=>[...t,e]),_(!1)}})]})}C.propTypes={variant:u().oneOf(["openai","anthropic"]).isRequired,isOpen:u().bool.isRequired,onClose:u().func.isRequired,onCreated:u().func.isRequired}},86296:(e,t,s)=>{Promise.resolve().then(s.bind(s,34695))}},e=>{e.O(0,[27,1321,705,5497,8441,3794,7358],()=>e(e.s=86296)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9839],{15536:(e,t,s)=>{"use strict";s.d(t,{Cp:()=>r,Hx:()=>n,Iv:()=>o,Nv:()=>m,RL:()=>d,ev:()=>x,fl:()=>i,hT:()=>a,oX:()=>l,t6:()=>c});let a=["zh-CN","zh-TW"],l=[{icon:"public",title:"Access Anywhere",desc:"Use your API from any network"},{icon:"group",title:"Share Endpoint",desc:"Share URL with team members"},{icon:"code",title:"Use in Cursor/Cline",desc:"Connect AI tools remotely"},{icon:"lock",title:"Encrypted",desc:"End-to-end TLS via Cloudflare"}],n=2e3,r=3e5,i=5e3,c=5,d=1e4,o=5e3,x=[{id:"lite",label:"Lite",desc:"Drop filler, keep grammar"},{id:"full",label:"Full",desc:"Drop articles, fragments OK"},{id:"ultra",label:"Ultra",desc:"Telegraphic, max compression"},{id:"wenyan-lite",label:"文 Lite",desc:"Classical Chinese, light compression",wenyan:!0},{id:"wenyan",label:"文 Full",desc:"Maximum 文言文, 80-90% reduction",wenyan:!0},{id:"wenyan-ultra",label:"文 Ultra",desc:"Extreme classical compression",wenyan:!0}],m=[{id:"lite",label:"Lite",desc:"Build asked, name lazier option"},{id:"full",label:"Full",desc:"Ladder enforced: stdlib/native first"},{id:"ultra",label:"Ultra",desc:"YAGNI extremist, deletion first"}]},61203:(e,t,s)=>{"use strict";s.d(t,{default:()=>d});var a=s(95155),l=s(12115),n=s(35497),r=s(11059),i=s(73006),c=s(15536);function d(){let[e,t]=(0,l.useState)(!0),[s,d]=(0,l.useState)(!1),[o,x]=(0,l.useState)("http://localhost:8787"),[m,h]=(0,l.useState)({installed:!1,running:!1,python:null,loading:!0}),[p,u]=(0,l.useState)(!1),[f,j]=(0,l.useState)(!1),[g,b]=(0,l.useState)(""),[y,v]=(0,l.useState)(!1),[N,w]=(0,l.useState)("full"),[k,C]=(0,l.useState)(!1),[S,E]=(0,l.useState)("full"),[T,L]=(0,l.useState)(!1),[U,P]=(0,l.useState)(.85),[$,R]=(0,l.useState)(null),[z,_]=(0,l.useState)(!1),[H,I]=(0,l.useState)({installed:!1,loaded:!1,version:null,loading:!0}),[M,O]=(0,l.useState)(!1),[A,F]=(0,l.useState)("en"),{copied:D,copy:B}=(0,r.C)();(0,l.useEffect)(()=>(F((0,i.kk)()),(0,i.oQ)(()=>F((0,i.kk)()))),[]);let W=c.hT.includes(A),G=W?c.ev:c.ev.filter(e=>!e.wenyan);(0,l.useEffect)(()=>{let e=c.ev.find(e=>e.id===N);e?.wenyan&&!W&&(w("ultra"),J({cavemanLevel:"ultra"}))},[W,N]);let J=async e=>{try{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}catch(e){console.log("Error updating setting:",e)}},Y=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({rtkEnabled:e})})).ok&&t(e)}catch(e){console.log("Error updating rtkEnabled:",e)}},q=async()=>{let e=o.trim()||"http://localhost:8787";x(e),await J({headroomUrl:e}),Z()},Z=(0,l.useCallback)(async()=>{h(e=>({...e,loading:!0}));try{let e=await fetch("/api/headroom/status",{headers:{"Cache-Control":"no-store"}}),t=await e.json();h({...t,loading:!1})}catch{h({installed:!1,running:!1,python:null,loading:!1})}},[]),K=(0,l.useCallback)(async()=>{b(""),j(!0);try{let e=await fetch("/api/headroom/start",{method:"POST"}),t=await e.json().catch(()=>({}));if(!e.ok)throw Error(t.error||"Failed to start proxy");await Z()}catch(e){b(e.message)}finally{j(!1)}},[Z]),Q=(0,l.useCallback)(async()=>{j(!0);try{await fetch("/api/headroom/stop",{method:"POST"}),await Z()}finally{j(!1)}},[Z]),X=async()=>{I(e=>({...e,loading:!0}));try{let e=await fetch("/api/pxpipe/status",{headers:{"Cache-Control":"no-store"}}),t=await e.json();I({...t,loading:!1})}catch{I({installed:!1,loaded:!1,version:null,loading:!1})}},V=async()=>{O(!0);try{let e=await fetch("/api/pxpipe/install",{method:"POST"});await e.json(),await X()}catch{}O(!1)},ee=async()=>{try{await fetch("/api/cache",{method:"DELETE"}),R(null)}catch{}};(0,l.useEffect)(()=>{(async()=>{try{let e=await fetch("/api/settings");if(e.ok){let s=await e.json();t(!1!==s.rtkEnabled),d(!!s.headroomEnabled),x(s.headroomUrl||"http://localhost:8787"),v(!!s.cavemanEnabled),w(s.cavemanLevel||"full"),C(!!s.ponytailEnabled),E(s.ponytailLevel||"full"),L(!!s.semanticCacheEnabled),P("number"==typeof s.semanticCacheThreshold?s.semanticCacheThreshold:.85),_(!!s.pxpipeEnabled),Z(),X()}}catch{}})()},[Z]);let et=!!m.running,es=m.loading?"Checking…":et?"Running":!1===m.localUrl||m.installed?!1!==m.localUrl?"Stopped":"External":"Not installed",ea=!1!==m.localUrl,el=!!m.canStart,en=ea&&!!m.managedPid;return(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsx)(n.zY,{title:"Token Saver",description:"Compression policies for prompt and tool output",icon:"savings"}),(0,a.jsxs)(n.Zp,{id:"rtk",children:[(0,a.jsx)("div",{className:"flex items-center justify-between mb-2",children:(0,a.jsxs)("h2",{className:"text-lg font-semibold flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary",children:"bolt"}),"Token Saver"]})}),(0,a.jsxs)("div",{className:"flex items-center justify-between pt-2 pb-4 border-b border-border gap-4",children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("p",{className:"font-medium",children:["Compress tool output"," ",(0,a.jsx)("a",{href:"https://github.com/rtk-ai/rtk",target:"_blank",rel:"noreferrer",className:"text-xs font-normal text-primary underline hover:opacity-80",children:"(RTK)"})]}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"git/grep/ls/tree/logs → 60-90% fewer input tokens"})]}),(0,a.jsx)(n.lM,{checked:e,onChange:()=>Y(!e)})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between py-4 border-b border-border gap-4 flex-wrap",children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[(0,a.jsxs)("p",{className:"font-medium",children:["Compress context"," ",(0,a.jsx)("a",{href:"https://github.com/chopratejas/headroom",target:"_blank",rel:"noreferrer",className:"text-xs font-normal text-primary underline hover:opacity-80",children:"(Headroom)"})]}),(0,a.jsx)("span",{className:`text-xs px-2 py-0.5 rounded ${et?"bg-success/15 text-success":"bg-warning/15 text-warning"}`,children:es}),(0,a.jsx)("button",{type:"button",onClick:()=>u(!0),className:"text-xs text-primary underline hover:opacity-80",children:et?"Manage":"Setup"})]}),(0,a.jsx)("p",{className:"text-sm text-text-muted mt-1",children:"Compress prompts via /v1/compress before routing to the model"})]}),(0,a.jsx)(n.lM,{checked:s&&et,disabled:!et,onChange:()=>{var e;let t;return e=!s,void(x(t=o.trim()||"http://localhost:8787"),d(e),J({headroomEnabled:e,headroomUrl:t}))}})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between pt-4 gap-4 flex-wrap",children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("p",{className:"font-medium",children:["Compress LLM output"," ",(0,a.jsx)("a",{href:"https://github.com/JuliusBrussee/caveman",target:"_blank",rel:"noreferrer",className:"text-xs font-normal text-primary underline hover:opacity-80",children:"(Caveman)"})]}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Terse-style system prompt → ~65% fewer output tokens (up to 87%)"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-3 shrink-0",children:[y&&(0,a.jsxs)("div",{className:"flex flex-col items-end gap-1",children:[(0,a.jsx)("div",{className:"flex items-center gap-1.5",children:G.map(e=>(0,a.jsx)("button",{onClick:()=>{var t;w(t=e.id),J({cavemanLevel:t})},className:`px-3 py-1.5 rounded text-xs font-medium border transition-colors ${N===e.id?"bg-primary text-white border-primary":"bg-transparent border-border text-text-muted hover:bg-surface-2"}`,title:e.desc,children:e.label},e.id))}),(0,a.jsx)("p",{className:"text-xs text-primary",children:c.ev.find(e=>e.id===N)?.desc})]}),(0,a.jsx)(n.lM,{checked:y,onChange:()=>{var e;v(e=!y),J({cavemanEnabled:e})}})]})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between pt-4 mt-4 border-t border-border gap-4 flex-wrap",children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("p",{className:"font-medium",children:["Lazy senior dev"," ",(0,a.jsx)("a",{href:"https://github.com/DietrichGebert/ponytail",target:"_blank",rel:"noreferrer",className:"text-xs font-normal text-primary underline hover:opacity-80",children:"(Ponytail)"})]}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Bias the model toward minimal code: YAGNI, reuse stdlib, deletion over addition"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-3 shrink-0",children:[k&&(0,a.jsxs)("div",{className:"flex flex-col items-end gap-1",children:[(0,a.jsx)("div",{className:"flex items-center gap-1.5",children:c.Nv.map(e=>(0,a.jsx)("button",{onClick:()=>{var t;E(t=e.id),J({ponytailLevel:t})},className:`px-3 py-1.5 rounded text-xs font-medium border transition-colors ${S===e.id?"bg-primary text-white border-primary":"bg-transparent border-border text-text-muted hover:bg-surface-2"}`,title:e.desc,children:e.label},e.id))}),(0,a.jsx)("p",{className:"text-xs text-primary",children:c.Nv.find(e=>e.id===S)?.desc})]}),(0,a.jsx)(n.lM,{checked:k,onChange:()=>{var e;C(e=!k),J({ponytailEnabled:e})}})]})]})]}),(0,a.jsxs)(n.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted",children:"cached"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-medium text-text-main",children:"Semantic Cache"}),(0,a.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:"Cache responses by message similarity (Jaccard). Instant hits, $0 cost."})]})]}),(0,a.jsx)(n.lM,{checked:T,onChange:()=>{var e;L(e=!T),J({semanticCacheEnabled:e})}})]}),T&&(0,a.jsxs)("div",{className:"mt-4 flex flex-col gap-3 border-t border-border-subtle pt-3",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted",children:"Similarity Threshold"}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("input",{type:"range",min:.5,max:1,step:.05,value:U,onChange:e=>{var t;P(t=parseFloat(e.target.value)),J({semanticCacheThreshold:t})},className:"w-32 accent-[var(--color-primary)]"}),(0,a.jsxs)("span",{className:"w-10 text-right font-mono text-xs text-text-main",children:[Math.round(100*U),"%"]})]})]}),$&&(0,a.jsxs)("div",{className:"flex flex-wrap gap-3 text-xs text-text-muted",children:[(0,a.jsxs)("span",{children:["Size: ",$.size]}),(0,a.jsx)("span",{children:"\xb7"}),(0,a.jsxs)("span",{children:["Hits: ",$.hits]}),(0,a.jsx)("span",{children:"\xb7"}),(0,a.jsxs)("span",{children:["Near: ",$.nearHits]}),(0,a.jsx)("span",{children:"\xb7"}),(0,a.jsxs)("span",{children:["Misses: ",$.misses]}),(0,a.jsx)("span",{children:"\xb7"}),(0,a.jsxs)("span",{children:["Rate: ",$.hitRate,"%"]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(n.$n,{size:"sm",variant:"secondary",icon:"refresh",onClick:async()=>{try{let e=await fetch("/api/cache");R(await e.json())}catch{}},children:"Refresh Stats"}),(0,a.jsx)(n.$n,{size:"sm",variant:"ghost",icon:"delete",onClick:ee,children:"Clear Cache"})]})]})]}),(0,a.jsxs)(n.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted",children:"image_compressor"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-medium text-text-main",children:"Pxpipe (Image Compression)"}),(0,a.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:"Render dense Claude-format contexts as PNG images before dispatch. Saves ~35-60% input tokens on large payloads."})]})]}),(0,a.jsx)(n.lM,{checked:z,onChange:()=>{var e;_(e=!z),J({pxpipeEnabled:e})}})]}),z&&(0,a.jsxs)("div",{className:"mt-4 flex flex-col gap-3 border-t border-border-subtle pt-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-xs",children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[14px] ${H.installed?"text-success":"text-warning"}`,children:H.installed?"check_circle":"error"}),(0,a.jsxs)("span",{className:"text-text-muted",children:["Package: ",H.installed?`v${H.version||"?"} installed`:"not installed"]}),H.loaded&&(0,a.jsx)(Badge,{variant:"success",size:"sm",dot:!0,children:"Loaded"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(n.$n,{size:"sm",variant:"secondary",icon:M?"progress_activity":"download",onClick:V,disabled:M,children:M?"Installing...":H.installed?"Reinstall / Upgrade":"Install Package"}),(0,a.jsx)(n.$n,{size:"sm",variant:"ghost",icon:"refresh",onClick:X,children:"Refresh Status"})]}),(0,a.jsx)("p",{className:"text-[11px] text-text-muted",children:"Only activates for Claude-format requests with text content above threshold. Fail-open — never blocks requests."})]})]}),(0,a.jsx)(n.aF,{isOpen:p,title:et?"Headroom":"Setup Headroom",onClose:()=>u(!1),children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,a.jsx)("span",{children:"Status"}),(0,a.jsx)("span",{className:et?"text-success":"text-warning",children:es})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:"Proxy URL"}),(0,a.jsx)(n.pd,{value:o,onChange:e=>x(e.target.value),onBlur:q,placeholder:"http://localhost:8787",className:"font-mono text-sm"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Use a local proxy for Start/Stop, or an external Docker sidecar like http://headroom:8787."})]}),en?(0,a.jsx)(n.$n,{onClick:Q,variant:"ghost",fullWidth:!0,disabled:f,children:f?"Stopping…":"Stop Headroom"}):et?(0,a.jsx)("p",{className:"text-sm text-success",children:"Headroom proxy is reachable. You can enable the token saver."}):el?(0,a.jsx)(n.$n,{onClick:K,fullWidth:!0,disabled:f,children:f?"Starting…":"Start Headroom"}):ea?m.python?(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:"Install then click Start:"}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("pre",{className:"flex-1 rounded bg-black/5 dark:bg-white/5 p-2 text-xs font-mono overflow-x-auto",children:'pip install "headroom-ai[proxy]"'}),(0,a.jsx)(n.$n,{size:"sm",variant:"ghost",onClick:()=>B('pip install "headroom-ai[proxy]"'),children:D?"Copied":"Copy"})]})]}):(0,a.jsx)("p",{className:"text-sm text-warning",children:"Python ≥ 3.10 required for local managed mode. Install Python first, or use an external proxy URL."}):(0,a.jsx)("p",{className:"text-sm text-warning",children:"Start Headroom separately at the configured URL, then recheck."}),g&&(0,a.jsx)("p",{className:"text-sm text-warning",children:g}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(n.$n,{onClick:()=>Z(),variant:"ghost",fullWidth:!0,children:"Recheck"}),(0,a.jsx)(n.$n,{onClick:()=>u(!1),fullWidth:!0,children:"Done"})]})]})})]})}},67466:(e,t,s)=>{Promise.resolve().then(s.bind(s,61203))}},e=>{e.O(0,[27,1321,705,5497,8441,3794,7358],()=>e(e.s=67466)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,335,342,387,501,516,543,552,675,684,747,748,907,931,948,992,997,1045,1077,1088,1091,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1674,1697,1704,1750,1860,1898,1907,1910,1946,1949,2121,2198,2284,2296,2536,2772,2785,2797,2845,2919,2922,3025,3038,3079,3351,3397,3472,3549,3562,3568,3883,3888,4010,4061,4245,4286,4422,4444,4612,4648,4656,4674,4761,4831,4896,4993,5018,5107,5170,5177,5211,5226,5297,5466,5616,5637,5685,5745,5922,6091,6107,6121,6268,6319,6463,6478,6479,6517,6529,6580,6594,6740,6743,6819,6919,6988,7131,7158,7241,7311,7429,7445,7473,7508,7520,7751,7758,7824,7851,8026,8167,8207,8246,8255,8264,8375,8453,8489,8573,8648,8658,8736,8791,8814,8835,8870,8889,8948,8974,8975,9027,9036,9056,9069,9088,9141,9199,9321,9461,9678,9709],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,335,342,387,501,516,543,552,675,684,747,748,907,931,948,992,997,1045,1077,1088,1091,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1674,1697,1704,1750,1860,1898,1907,1910,1946,1949,2121,2198,2284,2296,2536,2772,2785,2797,2845,2919,2922,3025,3038,3079,3351,3397,3472,3549,3562,3568,3883,3888,4010,4061,4245,4286,4422,4444,4612,4648,4656,4674,4761,4831,4896,4993,5018,5107,5170,5177,5211,5226,5297,5466,5616,5637,5685,5745,5922,6091,6107,6121,6268,6319,6463,6478,6479,6517,6529,6580,6594,6740,6743,6819,6919,6988,7131,7158,7241,7311,7429,7445,7473,7508,7520,7751,7758,7824,7851,8026,8167,8207,8246,8255,8264,8375,8453,8489,8573,8648,8658,8736,8791,8814,8835,8870,8889,8948,8974,8975,9027,9036,9056,9069,9088,9141,9199,9321,9461,9678,9709],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[39,174,204,335,342,387,501,516,543,552,675,684,747,748,907,931,948,992,997,1045,1077,1088,1091,1110,1118,1200,1288,1337,1382,1451,1512,1566,1666,1674,1697,1704,1750,1860,1898,1907,1910,1946,1949,2121,2198,2284,2296,2536,2772,2785,2797,2845,2919,2922,3025,3038,3079,3351,3397,3472,3549,3562,3568,3883,3888,4010,4061,4245,4286,4422,4444,4612,4648,4656,4674,4761,4831,4896,4993,5018,5107,5170,5177,5211,5226,5297,5466,5616,5637,5685,5745,5922,6091,6107,6121,6268,6319,6463,6478,6479,6517,6529,6580,6594,6740,6743,6819,6919,6988,7131,7158,7241,7311,7429,7445,7473,7508,7520,7751,7758,7824,7851,8026,8167,8207,8246,8255,8264,8375,8453,8489,8573,8648,8658,8736,8791,8814,8835,8870,8889,8948,8974,8975,9027,9036,9056,9069,9088,9141,9199,9321,9461,9678,9709],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
|