@rsalmn/extremerouter 0.8.4 → 0.8.6
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/README.id.md +130 -0
- package/README.md +73 -32
- package/README.zh-CN.md +130 -0
- package/app/.next-cli-build/BUILD_ID +1 -1
- package/app/.next-cli-build/app-path-routes-manifest.json +25 -10
- package/app/.next-cli-build/build-manifest.json +2 -2
- package/app/.next-cli-build/prerender-manifest.json +3 -3
- package/app/.next-cli-build/routes-manifest.json +94 -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 +3 -3
- 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 +3 -3
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/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 +4 -4
- 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 +2 -2
- 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/smart-routing/page.js +2 -0
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/smart-routing/page.js.nft.json +1 -0
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/smart-routing/page_client-reference-manifest.js +1 -0
- 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 +6 -6
- package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +6 -6
- 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 +6 -6
- 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/breaker/route.js +1 -1
- package/app/.next-cli-build/server/app/api/breaker/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 +9 -11
- package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +5 -2
- package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +5 -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 +4 -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 +5 -2
- package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +7 -4
- 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 +5 -2
- package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +10 -9
- 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 +5 -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 +5 -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 +5 -2
- package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +5 -2
- package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/combos/lab/route.js +1 -0
- package/app/.next-cli-build/server/app/api/combos/lab/route.js.nft.json +1 -0
- package/app/.next-cli-build/server/app/api/combos/lab/route_client-reference-manifest.js +1 -0
- 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/combos/simulate/route.js +1 -0
- package/app/.next-cli-build/server/app/api/combos/simulate/route.js.nft.json +1 -0
- package/app/.next-cli-build/server/app/api/combos/simulate/route_client-reference-manifest.js +1 -0
- package/app/.next-cli-build/server/app/api/combos/validate-roles/route.js +1 -1
- package/app/.next-cli-build/server/app/api/combos/validate-roles/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/dashboard/stream/route.js +2 -2
- package/app/.next-cli-build/server/app/api/dashboard/stream/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -1
- package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -1
- package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/stop/route.js +2 -2
- package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/health/overview/route.js +1 -0
- package/app/.next-cli-build/server/app/api/health/overview/route.js.nft.json +1 -0
- package/app/.next-cli-build/server/app/api/health/overview/route_client-reference-manifest.js +1 -0
- package/app/.next-cli-build/server/app/api/health/providers/route.js +1 -1
- package/app/.next-cli-build/server/app/api/health/providers/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/health/route.js +1 -1
- package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/health/stream/route.js +2 -2
- package/app/.next-cli-build/server/app/api/health/stream/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/init/route.js +1 -1
- package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
- package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/locale/route.js +1 -1
- package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +1 -1
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +2 -2
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/1min/import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/1min/import/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/freebuff/import/route.js +1 -0
- package/app/.next-cli-build/server/app/api/oauth/freebuff/import/route.js.nft.json +1 -0
- package/app/.next-cli-build/server/app/api/oauth/freebuff/import/route_client-reference-manifest.js +1 -0
- 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/kimi-desktop/auto-import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kimi-desktop/auto-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kimi-desktop/import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kimi-desktop/import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kimi-desktop/quota/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kimi-desktop/quota/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/qwen/import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/qwen/import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/wp-studio/import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/wp-studio/import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js +2 -2
- package/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
- package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/agnes-profile/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/agnes-profile/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/felo-profile/route.js +3 -0
- package/app/.next-cli-build/server/app/api/providers/[id]/felo-profile/route.js.nft.json +1 -0
- package/app/.next-cli-build/server/app/api/providers/[id]/felo-profile/route_client-reference-manifest.js +1 -0
- 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]/inxora-profile/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/inxora-profile/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +3 -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]/onemin-api-profile/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/onemin-api-profile/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/onemin-profile/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/onemin-profile/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/qwencloud-profile/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/qwencloud-profile/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/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]/zai-profile/route.js +1 -0
- package/app/.next-cli-build/server/app/api/providers/[id]/zai-profile/route.js.nft.json +1 -0
- package/app/.next-cli-build/server/app/api/providers/[id]/zai-profile/route_client-reference-manifest.js +1 -0
- 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/capture/launch/route.js +1 -0
- package/app/.next-cli-build/server/app/api/providers/capture/launch/route.js.nft.json +1 -0
- package/app/.next-cli-build/server/app/api/providers/capture/launch/route_client-reference-manifest.js +1 -0
- package/app/.next-cli-build/server/app/api/providers/capture/route.js +1 -0
- package/app/.next-cli-build/server/app/api/providers/capture/route.js.nft.json +1 -0
- package/app/.next-cli-build/server/app/api/providers/capture/route_client-reference-manifest.js +1 -0
- package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/felo-capture/launch/route.js +1 -0
- package/app/.next-cli-build/server/app/api/providers/felo-capture/launch/route.js.nft.json +1 -0
- package/app/.next-cli-build/server/app/api/providers/felo-capture/launch/route_client-reference-manifest.js +1 -0
- package/app/.next-cli-build/server/app/api/providers/felo-capture/route.js +1 -0
- package/app/.next-cli-build/server/app/api/providers/felo-capture/route.js.nft.json +1 -0
- package/app/.next-cli-build/server/app/api/providers/felo-capture/route_client-reference-manifest.js +1 -0
- 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 -2
- package/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/status/route.js +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/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/smart-routing/active/route.js +1 -0
- package/app/.next-cli-build/server/app/api/smart-routing/active/route.js.nft.json +1 -0
- package/app/.next-cli-build/server/app/api/smart-routing/active/route_client-reference-manifest.js +1 -0
- package/app/.next-cli-build/server/app/api/smart-routing/history/route.js +17 -0
- package/app/.next-cli-build/server/app/api/smart-routing/history/route.js.nft.json +1 -0
- package/app/.next-cli-build/server/app/api/smart-routing/history/route_client-reference-manifest.js +1 -0
- package/app/.next-cli-build/server/app/api/smart-routing/lab/route.js +16 -0
- package/app/.next-cli-build/server/app/api/smart-routing/lab/route.js.nft.json +1 -0
- package/app/.next-cli-build/server/app/api/smart-routing/lab/route_client-reference-manifest.js +1 -0
- package/app/.next-cli-build/server/app/api/smart-routing/stream/route.js +7 -0
- package/app/.next-cli-build/server/app/api/smart-routing/stream/route.js.nft.json +1 -0
- package/app/.next-cli-build/server/app/api/smart-routing/stream/route_client-reference-manifest.js +1 -0
- 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 +4 -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 +2 -2
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +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/leaderboard/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/leaderboard/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 +6 -6
- package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +6 -6
- 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 +6 -6
- 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/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 +7 -7
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +7 -7
- 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 +6 -6
- 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/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 +6 -6
- 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 +6 -6
- 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 +6 -6
- 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 +6 -6
- package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +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 +7 -7
- package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +7 -7
- 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 +6 -6
- package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +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 +25 -10
- package/app/.next-cli-build/server/chunks/1241.js +1 -1
- package/app/.next-cli-build/server/chunks/1350.js +5 -2
- package/app/.next-cli-build/server/chunks/1429.js +1 -1
- package/app/.next-cli-build/server/chunks/1719.js +1 -1
- package/app/.next-cli-build/server/chunks/1891.js +10 -0
- package/app/.next-cli-build/server/chunks/212.js +1 -1
- package/app/.next-cli-build/server/chunks/2409.js +1 -1
- package/app/.next-cli-build/server/chunks/3520.js +1 -0
- package/app/.next-cli-build/server/chunks/3535.js +1 -1
- package/app/.next-cli-build/server/chunks/3593.js +1 -1
- package/app/.next-cli-build/server/chunks/3841.js +1 -0
- package/app/.next-cli-build/server/chunks/3988.js +1 -0
- package/app/.next-cli-build/server/chunks/4046.js +1 -1
- package/app/.next-cli-build/server/chunks/4109.js +4 -0
- package/app/.next-cli-build/server/chunks/412.js +5 -5
- package/app/.next-cli-build/server/chunks/422.js +1 -1
- package/app/.next-cli-build/server/chunks/4502.js +16 -0
- package/app/.next-cli-build/server/chunks/4739.js +1 -1
- package/app/.next-cli-build/server/chunks/4780.js +1 -1
- package/app/.next-cli-build/server/chunks/507.js +1 -1
- package/app/.next-cli-build/server/chunks/5253.js +17 -0
- package/app/.next-cli-build/server/chunks/5258.js +1 -1
- package/app/.next-cli-build/server/chunks/5330.js +37 -28
- package/app/.next-cli-build/server/chunks/5612.js +1 -1
- package/app/.next-cli-build/server/chunks/5615.js +1 -1
- package/app/.next-cli-build/server/chunks/5628.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/6306.js +1 -1
- package/app/.next-cli-build/server/chunks/6630.js +1 -1
- package/app/.next-cli-build/server/chunks/6777.js +1 -1
- package/app/.next-cli-build/server/chunks/6878.js +1 -0
- package/app/.next-cli-build/server/chunks/698.js +1 -1
- package/app/.next-cli-build/server/chunks/7016.js +3 -0
- package/app/.next-cli-build/server/chunks/7410.js +1 -1
- package/app/.next-cli-build/server/chunks/7566.js +2 -2
- package/app/.next-cli-build/server/chunks/7765.js +13 -0
- package/app/.next-cli-build/server/chunks/7965.js +1 -1
- package/app/.next-cli-build/server/chunks/8048.js +1 -0
- package/app/.next-cli-build/server/chunks/809.js +1 -0
- package/app/.next-cli-build/server/chunks/8238.js +1 -1
- package/app/.next-cli-build/server/chunks/8266.js +1 -0
- package/app/.next-cli-build/server/chunks/8271.js +1 -1
- package/app/.next-cli-build/server/chunks/8520.js +1 -1
- package/app/.next-cli-build/server/chunks/874.js +2 -2
- package/app/.next-cli-build/server/chunks/8802.js +2 -2
- package/app/.next-cli-build/server/chunks/885.js +11 -7
- package/app/.next-cli-build/server/chunks/8895.js +4 -4
- package/app/.next-cli-build/server/chunks/9365.js +9 -0
- package/app/.next-cli-build/server/chunks/9703.js +5 -5
- 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 +6 -6
- package/app/.next-cli-build/server/pages/404.html +1 -1
- package/app/.next-cli-build/server/pages/500.html +1 -1
- package/app/.next-cli-build/server/server-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/server-reference-manifest.json +1 -1
- package/app/.next-cli-build/static/FP2YsqoRbzETOIHRfld7X/_buildManifest.js +1 -0
- package/app/.next-cli-build/static/chunks/1321-a387932dc3179f86.js +1 -0
- package/app/.next-cli-build/static/chunks/5497-c6d8b48c8828240a.js +7 -0
- package/app/.next-cli-build/static/chunks/705-42ad329bbe0c47df.js +1 -0
- package/app/.next-cli-build/static/chunks/9497-d27e455b90c7936e.js +1 -0
- package/app/.next-cli-build/static/chunks/981-eead750d8fdba2cb.js +3 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/alerts/{page-c263cd784e69e6f1.js → page-812b19e92ea94f14.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/basic-chat/page-9a0e996c5bc5a169.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/{page-3c3074cf3f61df46.js → page-0e1d5c3cf52823c3.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/{page-f7cdc992cb310077.js → page-3122fd2735ba291c.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-a84afe4d66f3439a.js +3 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/{page-959b3ee3c662de33.js → page-9850fafcf9dd605b.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-9879594c5128cd91.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/health/page-1c94a0710d61767e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/{page-7d472b122fb182f0.js → page-9e98db59d6b1d05f.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/{page-83272baae17d38f1.js → page-026721fa921475e0.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/combo/[id]/{page-f36e5ac11783fd1e.js → page-ec37860600228def.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/{page-4069e1d40a3c70a6.js → page-99c8024bece93467.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/web/{page-e794909abbc7a09a.js → page-825c8673e6351d02.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/{page-1d972fd3baee7474.js → page-65072e4024bb73b6.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/overview/page-b92bc7ebaa0813b2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-d3be818ebce4ade2.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/playground/page-5ef2d54550eda9da.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-d208597b457fee58.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-9eea89b85926cfd8.js +10 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/new/{page-bcf9d97ab4dc20d9.js → page-aaaaeede554f51a5.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/{page-5b11b61863963cad.js → page-1f465a9d64823fe6.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/proxy-pools/{page-58d8d0fa5523ff95.js → page-70bfba02b4fc414f.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-e249d28461673557.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/{page-a8b151d5ae9004ea.js → page-17bcf4e0db497e3a.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/smart-routing/page-5c8e7b3b71579268.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/swarm/page-6cda956597418bd9.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/{page-d57c129c03c9cb36.js → page-6e8f34517990d858.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/translator/{page-61d162d7a7f88a11.js → page-d9e35b679b85696a.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/page-7ea08e0acef52ce3.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/layout-20cc41f2e1307f06.js +1 -0
- package/app/.next-cli-build/static/chunks/app/_global-error/page-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/alerts/test/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/login/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/status/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/breaker/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cache/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/combos/lab/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/combos/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/combos/simulate/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/combos/validate-roles/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/dashboard/stream/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/health/overview/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/health/providers/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/health/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/health/stream/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/init/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/keys/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/locale/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/alias/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/availability/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/custom/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/test/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/1min/import/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/freebuff/import/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kimi-desktop/auto-import/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kimi-desktop/import/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kimi-desktop/quota/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/qwen/import/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/wp-studio/import/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/zed/auto-import/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/zed/import/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pricing/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/agnes-profile/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/felo-profile/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/freebuff-profile/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/health-timeline/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/inxora-profile/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/onemin-api-profile/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/onemin-profile/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/qwencloud-profile/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/v0-profile/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/vault-pool/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/zai-profile/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/zenmux-plans/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/capture/launch/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/capture/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/client/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/felo-capture/launch/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/felo-capture/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/database/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/shutdown/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/smart-routing/active/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/smart-routing/history/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/smart-routing/lab/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/smart-routing/stream/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/swarm/active/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/swarm/stream/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tags/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/load/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/save/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/send/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/history/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/leaderboard/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/meta/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/retry-stats/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/models/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/search/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/version/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/version/update/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/dashboard/settings/pricing/page-bc142d42a8a549b4.js +1 -0
- package/app/.next-cli-build/static/chunks/app/{layout-10bff7b57a2a3c2c.js → layout-0e3fdd66d189006c.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/login/{page-32ab5d7c75651107.js → page-4b39978fc147efa3.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/app/page-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-d93feb6893aee449.js +1 -0
- package/app/.next-cli-build/static/css/d30ee18d498368cc.css +1 -0
- package/app/node_modules/playwright-core/browsers.json +75 -0
- package/app/node_modules/playwright-core/index.js +17 -0
- package/app/node_modules/playwright-core/index.mjs +28 -0
- package/app/node_modules/playwright-core/lib/bootstrap.js +88 -0
- package/app/node_modules/playwright-core/lib/coreBundle.js +74830 -0
- package/app/node_modules/playwright-core/lib/utilsBundle.js +90764 -0
- package/app/node_modules/playwright-core/package.json +34 -0
- package/app/package.json +2 -5
- package/app/public/providers/ai21.svg +4 -0
- package/app/public/providers/aihorde.png +0 -0
- package/app/public/providers/aimlapi.svg +4 -0
- package/app/public/providers/ainative.svg +4 -0
- package/app/public/providers/aion.svg +4 -0
- package/app/public/providers/anyapi.svg +4 -0
- package/app/public/providers/arcee-ai.svg +4 -0
- package/app/public/providers/auriko.svg +4 -0
- package/app/public/providers/azure-ai.svg +4 -0
- package/app/public/providers/bai.svg +4 -0
- package/app/public/providers/baseten.svg +4 -0
- package/app/public/providers/bazaarlink.svg +8 -0
- package/app/public/providers/bluesminds.svg +4 -0
- package/app/public/providers/bytez.svg +4 -0
- package/app/public/providers/charm-hyper.svg +4 -0
- package/app/public/providers/chat-oripe.svg +4 -0
- package/app/public/providers/chatanywhere.svg +4 -0
- package/app/public/providers/cheaperinference.svg +4 -0
- package/app/public/providers/chenzk.svg +4 -0
- package/app/public/providers/clarifai.svg +4 -0
- package/app/public/providers/cloudcode-one.svg +4 -0
- package/app/public/providers/conol-web.svg +1 -0
- package/app/public/providers/crof.svg +4 -0
- package/app/public/providers/dahl.png +0 -0
- package/app/public/providers/datarobot.svg +4 -0
- package/app/public/providers/dgrid.png +0 -0
- package/app/public/providers/digitalocean.svg +4 -0
- package/app/public/providers/dit.svg +4 -0
- package/app/public/providers/docker-model-runner.svg +1 -0
- package/app/public/providers/dxnt.svg +4 -0
- package/app/public/providers/electronhub.svg +4 -0
- package/app/public/providers/empower.svg +4 -0
- package/app/public/providers/factory.svg +4 -0
- package/app/public/providers/fastrouter.svg +4 -0
- package/app/public/providers/felo-web.svg +50 -0
- package/app/public/providers/fireworks.svg +3 -0
- package/app/public/providers/fishaudio.svg +1 -0
- package/app/public/providers/free-ai.svg +4 -0
- package/app/public/providers/freeaiapikey.svg +4 -0
- package/app/public/providers/freebuff.svg +6 -0
- package/app/public/providers/freeinference.svg +4 -0
- package/app/public/providers/freemodel-dev.svg +4 -0
- package/app/public/providers/freetheai.svg +4 -0
- package/app/public/providers/friendliai.svg +4 -0
- package/app/public/providers/g4f-gemini.png +0 -0
- package/app/public/providers/g4f-groq.png +0 -0
- package/app/public/providers/g4f-nvidia.png +0 -0
- package/app/public/providers/g4f-ollama.png +0 -0
- package/app/public/providers/g4f-pollinations.svg +9 -0
- package/app/public/providers/gemini-business.svg +1 -0
- package/app/public/providers/getgoapi.svg +4 -0
- package/app/public/providers/gitlab.png +0 -0
- package/app/public/providers/gitlawb-gmi.svg +4 -0
- package/app/public/providers/gitlawb.svg +4 -0
- package/app/public/providers/gladia.svg +1 -0
- package/app/public/providers/hackclub.png +0 -0
- package/app/public/providers/hailuo-web.svg +1 -0
- package/app/public/providers/helixmind.svg +4 -0
- package/app/public/providers/helyxai.png +0 -0
- package/app/public/providers/heroku.svg +4 -0
- package/app/public/providers/hyperagent.svg +1 -0
- package/app/public/providers/inception.svg +4 -0
- package/app/public/providers/inference-net.svg +4 -0
- package/app/public/providers/inner-ai.svg +1 -0
- package/app/public/providers/kenari.svg +4 -0
- package/app/public/providers/kilo-gateway.svg +4 -0
- package/app/public/providers/lambda-ai.svg +4 -0
- package/app/public/providers/laozhang.svg +4 -0
- package/app/public/providers/lemonade.svg +1 -0
- package/app/public/providers/liquid.svg +4 -0
- package/app/public/providers/literouter.svg +4 -0
- package/app/public/providers/llama-cpp.svg +1 -0
- package/app/public/providers/llamafile.svg +1 -0
- package/app/public/providers/llamagate.svg +4 -0
- package/app/public/providers/llm-kiwi.svg +4 -0
- package/app/public/providers/llm7.png +0 -0
- package/app/public/providers/llmgateway.svg +4 -0
- package/app/public/providers/lm-studio.svg +1 -0
- package/app/public/providers/maritalk.svg +4 -0
- package/app/public/providers/meganova-ai.svg +4 -0
- package/app/public/providers/meta-ai.svg +68 -0
- package/app/public/providers/meta-llama.svg +4 -0
- package/app/public/providers/mimocode.png +0 -0
- package/app/public/providers/mixlayer.svg +4 -0
- package/app/public/providers/mnn-ai.svg +4 -0
- package/app/public/providers/modal.svg +4 -0
- package/app/public/providers/modelscope.svg +4 -0
- package/app/public/providers/morph.svg +4 -0
- package/app/public/providers/naga-ac.svg +4 -0
- package/app/public/providers/naga-ai.svg +4 -0
- package/app/public/providers/nanogpt.svg +4 -0
- package/app/public/providers/nara.svg +4 -0
- package/app/public/providers/navy.svg +4 -0
- package/app/public/providers/notion-web.svg +1 -0
- package/app/public/providers/nous-research.svg +4 -0
- package/app/public/providers/nscale.svg +4 -0
- package/app/public/providers/nube.svg +4 -0
- package/app/public/providers/oci.svg +4 -0
- package/app/public/providers/ofoxai.svg +4 -0
- package/app/public/providers/ollama-cloud.svg +4 -0
- package/app/public/providers/oobabooga.svg +1 -0
- package/app/public/providers/openadapter.svg +4 -0
- package/app/public/providers/opencode-zen.svg +4 -0
- package/app/public/providers/openference-api.svg +4 -0
- package/app/public/providers/orcarouter.svg +4 -0
- package/app/public/providers/ovhcloud.svg +4 -0
- package/app/public/providers/piapi.svg +4 -0
- package/app/public/providers/pioneer.svg +4 -0
- package/app/public/providers/poixe-ai.svg +4 -0
- package/app/public/providers/poolside.svg +4 -0
- package/app/public/providers/predibase.svg +4 -0
- package/app/public/providers/publicai.svg +4 -0
- package/app/public/providers/qiniu.svg +4 -0
- package/app/public/providers/regolo.svg +4 -0
- package/app/public/providers/reka.svg +4 -0
- package/app/public/providers/requesty.svg +4 -0
- package/app/public/providers/rev-ai.svg +1 -0
- package/app/public/providers/routeway.svg +4 -0
- package/app/public/providers/sambanova.svg +4 -0
- package/app/public/providers/sap.svg +4 -0
- package/app/public/providers/scaleway.svg +4 -0
- package/app/public/providers/snowflake.svg +4 -0
- package/app/public/providers/soniox.svg +1 -0
- package/app/public/providers/speechmatics.svg +1 -0
- package/app/public/providers/speka.svg +4 -0
- package/app/public/providers/sumopod.svg +4 -0
- package/app/public/providers/synthetic.svg +4 -0
- package/app/public/providers/tencent-aistudio-web.png +0 -0
- package/app/public/providers/thebai.svg +4 -0
- package/app/public/providers/theoldllm.png +0 -0
- package/app/public/providers/tokenharbor.svg +12 -0
- package/app/public/providers/tokenreply.svg +4 -0
- package/app/public/providers/triton.svg +1 -0
- package/app/public/providers/uncloseai.png +0 -0
- package/app/public/providers/unorouter.svg +4 -0
- package/app/public/providers/upstage.svg +4 -0
- package/app/public/providers/vllm.svg +1 -0
- package/app/public/providers/void-ai.svg +4 -0
- package/app/public/providers/wafer.svg +4 -0
- package/app/public/providers/wandb.svg +4 -0
- package/app/public/providers/watsonx.svg +4 -0
- package/app/public/providers/writer.svg +4 -0
- package/app/public/providers/x5lab.svg +4 -0
- package/app/public/providers/xinference.svg +1 -0
- package/app/public/providers/yolo-auto.svg +4 -0
- package/app/public/providers/{chatglm-cn.svg → zai-web.svg} +3 -3
- package/app/public/providers/zerolimitai.svg +4 -0
- package/app/public/providers/zylo-api.svg +4 -0
- package/package.json +3 -1
- package/app/.next-cli-build/server/chunks/2231.js +0 -1
- package/app/.next-cli-build/server/chunks/2701.js +0 -10
- package/app/.next-cli-build/server/chunks/2742.js +0 -1
- package/app/.next-cli-build/server/chunks/6070.js +0 -1
- package/app/.next-cli-build/server/chunks/6560.js +0 -1
- package/app/.next-cli-build/server/chunks/7187.js +0 -1
- package/app/.next-cli-build/server/chunks/7218.js +0 -1
- package/app/.next-cli-build/server/chunks/7872.js +0 -1
- package/app/.next-cli-build/server/chunks/8955.js +0 -16
- package/app/.next-cli-build/server/chunks/9422.js +0 -13
- package/app/.next-cli-build/static/JRaGItQgERhBp83cHyRqE/_buildManifest.js +0 -1
- package/app/.next-cli-build/static/chunks/1321-a7bfb848c63bdbf7.js +0 -1
- package/app/.next-cli-build/static/chunks/5497-6eb58895074fec6d.js +0 -7
- package/app/.next-cli-build/static/chunks/705-35d16348285626c8.js +0 -1
- package/app/.next-cli-build/static/chunks/8105-49cec265df0de251.js +0 -1
- package/app/.next-cli-build/static/chunks/981-777b2911f938c030.js +0 -3
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/basic-chat/page-ecd3a85a40e51c66.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-b4a78d784383253c.js +0 -3
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-5689c88f2746c37a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/health/page-133cf1aa2ce53c87.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/overview/page-2dae733c8e1582bf.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-7325c65533e4cf60.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/playground/page-e7ba910803086460.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-0f877a8a2550a1ea.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-6b500acebeff856b.js +0 -10
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-c02ccb0fd35970d1.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/swarm/page-594a59006196a03a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/page-483f01fd35d212f5.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/layout-0a63db83d5e05667.js +0 -1
- package/app/.next-cli-build/static/chunks/app/_global-error/page-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/alerts/test/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/login/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/status/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/breaker/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cache/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/combos/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/combos/validate-roles/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/dashboard/stream/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/health/providers/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/health/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/health/stream/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/init/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/keys/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/locale/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/alias/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/availability/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/custom/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/test/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/1min/import/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kimi-desktop/auto-import/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kimi-desktop/import/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kimi-desktop/quota/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/qwen/import/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/wp-studio/import/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/zed/auto-import/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/zed/import/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pricing/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/agnes-profile/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/freebuff-profile/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/health-timeline/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/inxora-profile/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/onemin-api-profile/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/onemin-profile/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/qwencloud-profile/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/v0-profile/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/vault-pool/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/zenmux-plans/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/client/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/database/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/shutdown/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/swarm/active/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/swarm/stream/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tags/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/load/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/save/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/send/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/history/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/leaderboard/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/meta/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/retry-stats/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/models/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/search/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/version/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/version/update/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/dashboard/settings/pricing/page-bb9f307074c5c23a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/page-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-158df2528a1edacc.js +0 -1
- package/app/.next-cli-build/static/css/d25230f8c6390408.css +0 -1
- /package/app/.next-cli-build/static/{JRaGItQgERhBp83cHyRqE → FP2YsqoRbzETOIHRfld7X}/_ssgManifest.js +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6812],{57076:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});var l=r(95155),s=r(12115),o=r(35497),a=r(65921);function i(e={}){return{name:e.name||"",proxyUrl:e.proxyUrl||"",noProxy:e.noProxy||"",isActive:!1!==e.isActive,strictProxy:!0===e.strictProxy}}function n(){let[e,t]=(0,s.useState)([]),[r,n]=(0,s.useState)(!0),[d,c]=(0,s.useState)(!1),[x,p]=(0,s.useState)(!1),[m,h]=(0,s.useState)(!1),[u,y]=(0,s.useState)(!1),[f,g]=(0,s.useState)(!1),[j,v]=(0,s.useState)(!1),[b,k]=(0,s.useState)(null),[N,w]=(0,s.useState)(i()),[C,P]=(0,s.useState)(""),[$,D]=(0,s.useState)({vercelToken:"",projectName:"vercel-relay"}),[S,T]=(0,s.useState)({accountId:"",apiToken:"",projectName:"cloudflare-relay"}),[A,E]=(0,s.useState)({denoToken:"",orgDomain:"",projectName:""}),[I,U]=(0,s.useState)(!1),[O,z]=(0,s.useState)(!1),[F,W]=(0,s.useState)(!1),[R,_]=(0,s.useState)(null),[L,q]=(0,s.useState)([]),[V,J]=(0,s.useState)(!1),[B,G]=(0,s.useState)({current:0,total:0}),[M,H]=(0,s.useState)(!1),[Y,Q]=(0,s.useState)(null),K=(0,s.useRef)(null),Z=(0,a.i)();(0,s.useEffect)(()=>{let e=e=>{K.current&&!K.current.contains(e.target)&&v(!1)};return j&&document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[j]);let X=(0,s.useCallback)(async()=>{try{let e=await fetch("/api/proxy-pools?includeUsage=true",{cache:"no-store"}),r=await e.json();e.ok&&t(r.proxyPools||[])}catch(e){console.log("Error fetching proxy pools:",e)}finally{n(!1)}},[]);(0,s.useEffect)(()=>{X()},[X]);let ee=()=>{k(null),w(i())},et=()=>{ee(),c(!0)},er=()=>{c(!1),ee()},el=async()=>{let e={name:N.name.trim(),proxyUrl:N.proxyUrl.trim(),noProxy:N.noProxy.trim(),isActive:!0===N.isActive,strictProxy:!0===N.strictProxy};if(e.name&&e.proxyUrl){U(!0);try{let t=!!b,r=await fetch(t?`/api/proxy-pools/${b.id}`:"/api/proxy-pools",{method:t?"PUT":"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(r.ok)await X(),er(),Z.success(b?"Proxy pool updated":"Proxy pool created");else{let e=await r.json();Z.error(e.error||"Failed to save proxy pool")}}catch(e){console.log("Error saving proxy pool:",e)}finally{U(!1)}}},es=async e=>{Q({title:"Delete Proxy Pool",message:`Delete proxy pool "${e.name}"?`,onConfirm:async()=>{Q(null);try{let r=await fetch(`/api/proxy-pools/${e.id}`,{method:"DELETE"});if(r.ok){t(t=>t.filter(t=>t.id!==e.id)),Z.success("Proxy pool deleted");return}let l=await r.json();409===r.status?Z.warning(`Cannot delete: ${l.boundConnectionCount||0} connection(s) are still using this pool.`):Z.error(l.error||"Failed to delete proxy pool")}catch(e){console.log("Error deleting proxy pool:",e),Z.error("Failed to delete proxy pool")}}})},eo=async e=>{_(e);try{let t=await fetch(`/api/proxy-pools/${e}/test`,{method:"POST"}),r=await t.json();if(!t.ok)return void Z.error(r.error||"Failed to test proxy");await X(),Z.success(r.ok?"Proxy test passed":"Proxy test failed")}catch(e){console.log("Error testing proxy pool:",e),Z.error("Failed to test proxy")}finally{_(null)}},ea=async e=>{let r=!e.isActive;t(t=>t.map(t=>t.id===e.id?{...t,isActive:r}:t));try{(await fetch(`/api/proxy-pools/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:r})})).ok||(t(t=>t.map(t=>t.id===e.id?{...t,isActive:e.isActive}:t)),Z.error("Failed to update active state"))}catch(r){console.log("Error toggling active:",r),t(t=>t.map(t=>t.id===e.id?{...t,isActive:e.isActive}:t))}},ei=e.length>0&&L.length===e.length,en=()=>q([]),ed=async t=>{let r=L.length>0?L:e.map(e=>e.id);if(0!==r.length){H(!0);try{let e=0,l=0;for(let s of r)try{(await fetch(`/api/proxy-pools/${s}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok?e+=1:l+=1}catch{l+=1}await X(),Z.success(`${t?"Activated":"Deactivated"} ${e}${l?`, failed ${l}`:""}`)}finally{H(!1)}}},ec=async()=>{0!==L.length&&Q({title:"Delete Proxy Pools",message:`Delete ${L.length} proxy pool(s)?`,onConfirm:async()=>{Q(null),H(!0);try{let e=0,t=0,r=0;for(let l of L)try{let s=await fetch(`/api/proxy-pools/${l}`,{method:"DELETE"});s.ok?e+=1:409===s.status?t+=1:r+=1}catch{r+=1}await X(),en(),Z.success(`Deleted ${e}${t?`, ${t} bound`:""}${r?`, ${r} failed`:""}`)}finally{H(!1)}}})},ex=async()=>{let t=L.length>0?e.filter(e=>L.includes(e.id)):e;if(0===t.length)return;J(!0),G({current:0,total:t.length});let r=0,l=[],s=0,o=[...t],a=async()=>{for(;o.length>0;){let e=o.shift();if(!e)break;try{let t=await fetch(`/api/proxy-pools/${e.id}/test`,{method:"POST"}),s=await t.json();t.ok&&s.ok?r+=1:l.push(e.id)}catch{l.push(e.id)}finally{G({current:s+=1,total:t.length})}}};await Promise.all(Array.from({length:Math.min(10,t.length)},a)),await X(),J(!1),G({current:0,total:0}),l.length>0?Q({title:"Disable Dead Proxies",message:`Alive: ${r}, Dead: ${l.length}.
|
|
2
2
|
|
|
3
3
|
Disable ${l.length} dead proxies?`,onConfirm:async()=>{Q(null),H(!0);try{for(let e of l)try{await fetch(`/api/proxy-pools/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:!1})})}catch{}await X(),Z.success(`Disabled ${l.length} dead proxies`)}finally{H(!1)}}}):Z.success(`Health check done. Alive: ${r}, Dead: ${l.length}`)};(0,s.useEffect)(()=>{q(t=>t.filter(t=>e.some(e=>e.id===t)))},[e]);let ep=()=>{O||p(!1)},em=()=>{F||h(!1)},eh=()=>{F||y(!1)},eu=()=>{F||g(!1)},ey=async()=>{if($.vercelToken.trim()){W(!0);try{let e=await fetch("/api/proxy-pools/vercel-deploy",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify($)}),t=await e.json();e.ok?(await X(),em(),Z.success(`Deployed: ${t.deployUrl}`)):Z.error(t.error||"Deploy failed")}catch(e){console.log("Error deploying Vercel relay:",e),Z.error("Deploy failed")}finally{W(!1)}}},ef=async()=>{if(S.accountId.trim()&&S.apiToken.trim()){W(!0);try{let e=await fetch("/api/proxy-pools/cloudflare-deploy",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(S)}),t=await e.json();e.ok?(await X(),eh(),Z.success(`Deployed: ${t.deployUrl}`)):Z.error(t.error||"Deploy failed")}catch(e){console.log("Error deploying Cloudflare relay:",e),Z.error("Deploy failed")}finally{W(!1)}}},eg=async()=>{if(A.denoToken.trim()){W(!0);try{let e=await fetch("/api/proxy-pools/deno-deploy",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(A)}),t=await e.json();e.ok?(await X(),eu(),Z.success(`Deployed: ${t.deployUrl}`)):Z.error(t.error||"Deploy failed")}catch(e){console.log("Error deploying Deno relay:",e),Z.error("Deploy failed")}finally{W(!1)}}},ej=async()=>{let t=C.split(/\r?\n/).map(e=>e.trim()).filter(Boolean);if(0===t.length)return void Z.warning("Please paste at least one proxy line.");let r=[],l=[];if(t.forEach((e,t)=>{try{let l=(e=>{let t=e.trim();if(!t)return null;if(t.includes("://")){let e=new URL(t),r=e.port?`${e.hostname}:${e.port}`:e.hostname;return{proxyUrl:e.toString(),name:`Imported ${r}`}}let r=t.split(":");if(4===r.length){let[e,t,l,s]=r;if(!e||!t||!l||!s)throw Error("Invalid host:port:user:pass format");return{proxyUrl:new URL(`http://${encodeURIComponent(l)}:${encodeURIComponent(s)}@${e}:${t}`).toString(),name:`Imported ${e}:${t}`}}throw Error("Unsupported format")})(e);l&&r.push({...l,lineNumber:t+1})}catch(e){l.push(`Line ${t+1}: ${e.message}`)}}),l.length>0)return void Z.error(`Invalid proxy format:
|
|
4
|
-
${l.join("\n")}`);z(!0);try{let t=new Set(e.map(e=>`${(e.proxyUrl||"").trim()}|||${(e.noProxy||"").trim()}`)),l=0,s=0,o=0;for(let e of r){let r=`${e.proxyUrl}|||`;if(t.has(r)){s+=1;continue}(await fetch("/api/proxy-pools",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e.name,proxyUrl:e.proxyUrl,noProxy:"",isActive:!0})})).ok?(l+=1,t.add(r)):o+=1}await X(),p(!1),Z.success(`Batch import completed: Created ${l}, Skipped ${s}, Failed ${o}`)}catch(e){console.log("Error batch importing proxies:",e),Z.error("Batch import failed")}finally{z(!1)}},ev=(0,s.useMemo)(()=>e.filter(e=>!0===e.isActive).length,[e]);return r?(0,l.jsxs)("div",{className:"mx-auto flex w-full max-w-5xl flex-col gap-4 px-1 sm:gap-6 sm:px-0",children:[(0,l.jsx)(o.Qv,{}),(0,l.jsx)(o.Qv,{})]}):(0,l.jsxs)("div",{className:"mx-auto flex w-full max-w-5xl flex-col gap-4 sm:gap-6",children:[(0,l.jsx)(o.zY,{title:"Proxy Pools",description:"Outbound proxy routing and health checks",icon:"lan",actions:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"relative",ref:K,children:[(0,l.jsxs)(o.$n,{size:"sm",variant:"secondary",icon:"rocket_launch",onClick:()=>v(!j),children:["Deploy Relay",(0,l.jsx)("span",{className:"material-symbols-outlined ml-1 text-[18px]",children:j?"expand_less":"expand_more"})]}),j&&(0,l.jsxs)("div",{className:"absolute right-0 top-full z-50 mt-1 w-48 rounded-panel border border-border-subtle bg-panel p-1 shadow-[var(--shadow-elev)]",children:[(0,l.jsxs)("button",{onClick:()=>{T({accountId:"",apiToken:"",projectName:"cloudflare-relay"}),y(!0),v(!1)},className:"flex w-full items-center gap-2 rounded-md px-3 py-2 text-sm text-text-main transition-colors hover:bg-surface-2",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px] text-warning",children:"cloud"}),"Cloudflare Relay"]}),(0,l.jsxs)("button",{onClick:()=>{D({vercelToken:"",projectName:"vercel-relay"}),h(!0),v(!1)},className:"flex w-full items-center gap-2 rounded-md px-3 py-2 text-sm text-text-main transition-colors hover:bg-surface-2",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px] text-info",children:"cloud_upload"}),"Vercel Relay"]}),(0,l.jsxs)("button",{onClick:()=>{E({denoToken:"",orgDomain:"",projectName:""}),g(!0),v(!1)},className:"flex w-full items-center gap-2 rounded-md px-3 py-2 text-sm text-text-main transition-colors hover:bg-surface-2",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px] text-success",children:"terminal"}),"Deno Relay"]})]})]}),(0,l.jsx)(o.$n,{size:"sm",variant:"secondary",icon:"upload",onClick:()=>{P(""),p(!0)},children:"Batch Import"}),(0,l.jsx)(o.$n,{size:"sm",icon:"add",onClick:et,children:"Add Proxy Pool"})]})}),(0,l.jsxs)(o.Zp,{children:[(0,l.jsxs)("div",{className:"mb-4 flex flex-wrap items-center gap-2",children:[e.length>0&&(0,l.jsxs)("label",{className:"flex items-center gap-1.5 text-xs text-text-muted cursor-pointer",children:[(0,l.jsx)("input",{type:"checkbox",checked:ei,onChange:()=>q(ei?[]:e.map(e=>e.id)),className:"size-4 rounded border-black/20 dark:border-white/20"}),ei?"Unselect all":"Select all"]}),(0,l.jsxs)(o.Ex,{variant:"default",children:["Total: ",e.length]}),(0,l.jsxs)(o.Ex,{variant:"success",children:["Active: ",ev]})]}),(L.length>0||V)&&(0,l.jsxs)("div",{className:"mb-4 flex flex-wrap items-center gap-2 rounded-lg border border-primary/30 bg-primary/5 px-3 py-2",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px] text-primary",children:"checklist"}),(0,l.jsx)("span",{className:"text-xs font-medium text-primary",children:L.length>0?`${L.length} selected`:"All pools"}),(0,l.jsxs)("div",{className:"ml-auto flex flex-wrap items-center gap-2",children:[(0,l.jsx)(o.$n,{size:"sm",icon:V?"progress_activity":"health_and_safety",onClick:ex,disabled:V||M||0===e.length,children:V?`Checking ${B.current}/${B.total}`:"Health Check"}),L.length>0&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(o.$n,{size:"sm",variant:"secondary",icon:"toggle_on",onClick:()=>ed(!0),disabled:M||V,children:"Activate"}),(0,l.jsx)(o.$n,{size:"sm",variant:"secondary",icon:"toggle_off",onClick:()=>ed(!1),disabled:M||V,children:"Deactivate"}),(0,l.jsx)(o.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:ec,disabled:M||V,children:"Delete"}),(0,l.jsx)(o.$n,{size:"sm",variant:"ghost",onClick:en,disabled:M||V,children:"Clear"})]})]})]}),0===e.length?(0,l.jsxs)("div",{className:"text-center py-10",children:[(0,l.jsx)("p",{className:"text-text-main font-medium mb-1",children:"No proxy pool entries yet"}),(0,l.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Create a proxy pool entry, then assign it to connections."}),(0,l.jsx)(o.$n,{icon:"add",onClick:et,children:"Add Proxy Pool"})]}):(0,l.jsx)("div",{className:"flex flex-col divide-y divide-black/[0.04] dark:divide-white/[0.05]",children:e.map(e=>{var t;return(0,l.jsxs)("div",{className:"flex flex-col gap-3 py-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,l.jsxs)("div",{className:"flex items-start gap-3 min-w-0 flex-1",children:[(0,l.jsx)("input",{type:"checkbox",checked:L.includes(e.id),onChange:()=>{let t;return t=e.id,q(e=>e.includes(t)?e.filter(e=>e!==t):[...e,t])},className:"mt-1 size-4 shrink-0 rounded border-black/20 dark:border-white/20"}),(0,l.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,l.jsx)("p",{className:"min-w-0 max-w-full truncate text-sm font-medium sm:max-w-[18rem]",children:e.name}),(0,l.jsx)(o.Ex,{variant:"active"===(t=e.testStatus)?"success":"error"===t?"error":"default",size:"sm",dot:!0,children:e.testStatus||"unknown"}),(0,l.jsx)(o.Ex,{variant:e.isActive?"success":"default",size:"sm",children:e.isActive?"active":"inactive"}),"vercel"===e.type&&(0,l.jsx)(o.Ex,{variant:"default",size:"sm",children:"vercel relay"}),"cloudflare"===e.type&&(0,l.jsx)(o.Ex,{variant:"default",size:"sm",children:"cloudflare relay"}),(0,l.jsxs)(o.Ex,{variant:"default",size:"sm",children:[e.boundConnectionCount||0," bound"]})]}),(0,l.jsx)("p",{className:"text-xs text-text-muted truncate mt-1",children:e.proxyUrl}),e.noProxy?(0,l.jsxs)("p",{className:"text-xs text-text-muted truncate",children:["No proxy: ",e.noProxy]}):null,(0,l.jsxs)("p",{className:"text-[11px] text-text-muted mt-1",children:["Last tested: ",function(e){if(!e)return"Never";let t=new Date(e);return Number.isNaN(t.getTime())?"Never":t.toLocaleString()}(e.lastTestedAt),e.lastError?` \xb7 ${e.lastError}`:""]})]})]}),(0,l.jsxs)("div",{className:"flex items-center justify-end gap-1",children:[(0,l.jsx)(o.lM,{size:"sm",checked:!0===e.isActive,onChange:()=>ea(e),title:e.isActive?"Disable":"Enable"}),(0,l.jsx)("button",{onClick:()=>eo(e.id),className:"p-2 rounded hover:bg-black/5 dark:hover:bg-white/5 text-text-muted hover:text-primary",title:"Test proxy",disabled:R===e.id,children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",style:R===e.id?{animation:"spin 1s linear infinite"}:void 0,children:R===e.id?"progress_activity":"science"})}),(0,l.jsx)("button",{onClick:()=>{k(e),w(i(e)),c(!0)},className:"p-2 rounded hover:bg-black/5 dark:hover:bg-white/5 text-text-muted hover:text-primary",title:"Edit",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"})}),(0,l.jsx)("button",{onClick:()=>es(e),className:"p-2 rounded hover:bg-red-500/10 text-red-500",title:"Delete",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"})})]})]},e.id)})})]}),(0,l.jsx)(o.aF,{isOpen:x,title:"Batch Import Proxies",onClose:ep,children:(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"text-sm font-medium text-text-main mb-1 block",children:"Paste Proxy List (One per line)"}),(0,l.jsx)("textarea",{value:C,onChange:e=>P(e.target.value),placeholder:"http://user:pass@127.0.0.1:7897\n127.0.0.1:7897:user:pass",className:"w-full min-h-[180px] py-2 px-3 text-sm text-text-main bg-white dark:bg-white/5 border border-black/10 dark:border-white/10 rounded-md focus:ring-1 focus:ring-primary/30 focus:border-primary/50 focus:outline-none transition-all"}),(0,l.jsx)("p",{className:"text-xs text-text-muted mt-1",children:"Supported formats: protocol://user:pass@host:port, host:port:user:pass"})]}),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:[(0,l.jsx)(o.$n,{fullWidth:!0,onClick:ej,disabled:!C.trim()||O,children:O?"Importing...":"Import"}),(0,l.jsx)(o.$n,{fullWidth:!0,variant:"ghost",onClick:ep,disabled:O,children:"Cancel"})]})]})}),(0,l.jsx)(o.aF,{isOpen:m,title:"Deploy Vercel Relay",onClose:em,children:(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsxs)("div",{className:"rounded-lg bg-blue-500/5 border border-blue-500/10 p-3 flex flex-col gap-1.5",children:[(0,l.jsx)("p",{className:"text-sm text-text-main font-medium",children:"What is Vercel Relay?"}),(0,l.jsx)("p",{className:"text-xs text-text-muted",children:"Deploys an edge relay function to Vercel. All AI provider requests will be forwarded through Vercel's edge network, masking your real IP from providers."}),(0,l.jsxs)("ul",{className:"text-xs text-text-muted list-disc pl-4 space-y-0.5",children:[(0,l.jsx)("li",{children:"Your IP is replaced by Vercel's dynamic edge IPs (hundreds of IPs across 20+ global regions)"}),(0,l.jsx)("li",{children:"Vercel serves millions of apps — providers can't block Vercel IPs without affecting legitimate traffic"}),(0,l.jsx)("li",{children:"Free tier: 100GB bandwidth/month, 500K edge invocations"}),(0,l.jsx)("li",{children:"Deploy multiple relays on different accounts for more IP diversity"})]})]}),(0,l.jsx)(o.pd,{label:"Vercel API Token",value:$.vercelToken,onChange:e=>D(t=>({...t,vercelToken:e.target.value})),placeholder:"your-vercel-api-token",hint:(0,l.jsxs)(l.Fragment,{children:["Token is used once for deployment and not stored. ",(0,l.jsx)("a",{href:"https://vercel.com/account/tokens",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"Get token →"})]}),type:"password"}),(0,l.jsx)(o.pd,{label:"Project Name",value:$.projectName,onChange:e=>D(t=>({...t,projectName:e.target.value})),placeholder:"my-relay",hint:"Unique name for your Vercel project. Leave empty for auto-generated name."}),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:[(0,l.jsx)(o.$n,{fullWidth:!0,onClick:ey,disabled:!$.vercelToken.trim()||F,children:F?"Deploying... (may take ~1 min)":"Deploy"}),(0,l.jsx)(o.$n,{fullWidth:!0,variant:"ghost",onClick:em,disabled:F,children:"Cancel"})]})]})}),(0,l.jsx)(o.aF,{isOpen:u,title:"Deploy Cloudflare Relay",onClose:eh,children:(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsxs)("div",{className:"rounded-lg bg-orange-500/5 border border-orange-500/10 p-3 flex flex-col gap-1.5",children:[(0,l.jsx)("p",{className:"text-sm text-text-main font-medium",children:"What is Cloudflare Relay?"}),(0,l.jsx)("p",{className:"text-xs text-text-muted",children:"Deploys a Cloudflare Worker as a proxy relay. All AI provider requests will be forwarded through Cloudflare's global edge network."}),(0,l.jsxs)("ul",{className:"text-xs text-text-muted list-disc pl-4 space-y-0.5",children:[(0,l.jsx)("li",{children:"High performance global routing and IP masking via Cloudflare Workers"}),(0,l.jsx)("li",{children:"Free tier: 100,000 requests per day"}),(0,l.jsx)("li",{children:"Requires Cloudflare Account ID and a Workers API Token (Edit Workers permission)"})]}),(0,l.jsxs)("div",{className:"mt-2 pt-2 border-t border-orange-500/10 text-xs text-text-muted",children:[(0,l.jsx)("p",{className:"font-medium text-text-main mb-1",children:"How to generate your API Token:"}),(0,l.jsxs)("ol",{className:"list-decimal pl-4 space-y-0.5",children:[(0,l.jsxs)("li",{children:["Go to ",(0,l.jsx)("b",{children:"My Profile"})," → ",(0,l.jsx)("b",{children:"API Tokens"})," → ",(0,l.jsx)("b",{children:"Create Token"})]}),(0,l.jsxs)("li",{children:["Scroll down to ",(0,l.jsx)("b",{children:"Custom Token"})," and click ",(0,l.jsx)("b",{children:"Get started"})]}),(0,l.jsxs)("li",{children:["Under ",(0,l.jsx)("b",{children:"Permissions"}),": Account | Workers Scripts | Edit"]}),(0,l.jsxs)("li",{children:["Under ",(0,l.jsx)("b",{children:"Account Resources"}),": Include | Account | ",(0,l.jsx)("i",{children:"Your Account Name"})]}),(0,l.jsxs)("li",{children:["Click ",(0,l.jsx)("b",{children:"Continue to summary"})," → ",(0,l.jsx)("b",{children:"Create Token"})]})]})]})]}),(0,l.jsx)(o.pd,{label:"Account ID",value:S.accountId,onChange:e=>T(t=>({...t,accountId:e.target.value})),placeholder:"your-cloudflare-account-id",hint:(0,l.jsx)(l.Fragment,{children:"Found on the right side of the Cloudflare dashboard overview page."})}),(0,l.jsx)(o.pd,{label:"API Token",value:S.apiToken,onChange:e=>T(t=>({...t,apiToken:e.target.value})),placeholder:"your-cloudflare-api-token",hint:(0,l.jsxs)(l.Fragment,{children:['Requires "Workers Scripts: Edit" permission. ',(0,l.jsx)("a",{href:"https://dash.cloudflare.com/profile/api-tokens",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"Get token →"})]}),type:"password"}),(0,l.jsx)(o.pd,{label:"Worker Name",value:S.projectName,onChange:e=>T(t=>({...t,projectName:e.target.value})),placeholder:"my-relay",hint:"Unique name for your Cloudflare Worker. Leave empty for auto-generated name."}),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:[(0,l.jsx)(o.$n,{fullWidth:!0,onClick:ef,disabled:!S.accountId.trim()||!S.apiToken.trim()||F,children:F?"Deploying...":"Deploy Worker"}),(0,l.jsx)(o.$n,{fullWidth:!0,variant:"ghost",onClick:eh,disabled:F,children:"Cancel"})]})]})}),(0,l.jsx)(o.aF,{isOpen:f,title:"Deploy Deno Relay",onClose:eu,children:(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsxs)("div",{className:"rounded-lg bg-black/5 dark:bg-white/5 border border-black/10 dark:border-white/10 p-3 flex flex-col gap-1.5",children:[(0,l.jsx)("p",{className:"text-sm text-text-main font-medium",children:"What is Deno Relay?"}),(0,l.jsx)("p",{className:"text-xs text-text-muted",children:"Deploys a relay worker to Deno Deploy's global edge network. All AI provider requests are forwarded through Deno's edge, masking your real IP."}),(0,l.jsxs)("ul",{className:"text-xs text-text-muted list-disc pl-4 space-y-0.5",children:[(0,l.jsx)("li",{children:"Deno Deploy v2 runs on a high-performance global edge network"}),(0,l.jsx)("li",{children:"Free tier: 1M requests & 100GiB outbound traffic per month"}),(0,l.jsx)("li",{children:"No per-request CPU time limits (unlike Vercel/Cloudflare)"}),(0,l.jsx)("li",{children:"Support up to 20 active apps & 50 custom domains"}),(0,l.jsx)("li",{children:"Deploy multiple relays for maximum IP diversity"})]}),(0,l.jsxs)("div",{className:"mt-2 pt-2 border-t border-black/10 dark:border-white/10 text-xs text-text-muted",children:[(0,l.jsx)("p",{className:"font-medium text-text-main mb-1",children:"How to generate API token:"}),(0,l.jsxs)("ol",{className:"list-decimal pl-4 space-y-0.5",children:[(0,l.jsxs)("li",{children:["Go to ",(0,l.jsx)("b",{children:"console.deno.com"})]}),(0,l.jsxs)("li",{children:["Select your ",(0,l.jsx)("b",{children:"Organization"})," → ",(0,l.jsx)("b",{children:"Settings"})," → ",(0,l.jsx)("b",{children:"Organization Tokens"})]}),(0,l.jsxs)("li",{children:["Create a ",(0,l.jsx)("b",{children:"Organization Token"})," (prefix ",(0,l.jsx)("b",{children:"ddo_"}),")"]})]})]})]}),(0,l.jsx)(o.pd,{label:"Deno Deploy API Token",value:A.denoToken,onChange:e=>E(t=>({...t,denoToken:e.target.value})),placeholder:"ddo_xxxxxxxxxxxxxxxx",hint:(0,l.jsx)(l.Fragment,{children:"Token is used once for deployment, not stored. Found in Organization Settings."}),type:"password"}),(0,l.jsx)(o.pd,{label:"Organization Domain",value:A.orgDomain,onChange:e=>E(t=>({...t,orgDomain:e.target.value})),placeholder:"your-org.deno.net",hint:"Organization's default domain. Your relay URL will be in the format: https://my-relay.your-org.deno.net"}),(0,l.jsx)(o.pd,{label:"App Name",value:A.projectName,onChange:e=>E(t=>({...t,projectName:e.target.value})),placeholder:"deno-relay",hint:"Unique app name. Leave empty for auto-generated name."}),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:[(0,l.jsx)(o.$n,{fullWidth:!0,onClick:eg,disabled:!A.denoToken.trim()||!A.orgDomain.trim()||F,children:F?"Deploying...":"Deploy Relay"}),(0,l.jsx)(o.$n,{fullWidth:!0,variant:"ghost",onClick:eu,disabled:F,children:"Cancel"})]})]})}),(0,l.jsx)(o.aF,{isOpen:d,title:b?"Edit Proxy Pool":"Add Proxy Pool",onClose:er,children:(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsx)(o.pd,{label:"Name",value:N.name,onChange:e=>w(t=>({...t,name:e.target.value})),placeholder:"Office Proxy"}),(0,l.jsx)(o.pd,{label:"Proxy URL",value:N.proxyUrl,onChange:e=>w(t=>({...t,proxyUrl:e.target.value})),placeholder:"http://127.0.0.1:7897"}),(0,l.jsx)(o.pd,{label:"No Proxy",value:N.noProxy,onChange:e=>w(t=>({...t,noProxy:e.target.value})),placeholder:"localhost,127.0.0.1,.internal",hint:"Comma-separated hosts/domains to bypass proxy"}),(0,l.jsxs)("div",{className:"flex flex-col gap-3 rounded-lg border border-border/50 p-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{className:"font-medium text-sm",children:"Active"}),(0,l.jsx)("p",{className:"text-xs text-text-muted",children:"Inactive pools are ignored by runtime resolution."})]}),(0,l.jsx)(o.lM,{checked:!0===N.isActive,onChange:()=>w(e=>({...e,isActive:!e.isActive})),disabled:I})]}),(0,l.jsxs)("div",{className:"flex flex-col gap-3 rounded-lg border border-border/50 p-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{className:"font-medium text-sm",children:"Strict Proxy"}),(0,l.jsx)("p",{className:"text-xs text-text-muted",children:"Fail request if proxy is unreachable instead of falling back to direct."})]}),(0,l.jsx)(o.lM,{checked:!0===N.strictProxy,onChange:()=>w(e=>({...e,strictProxy:!e.strictProxy})),disabled:I})]}),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:[(0,l.jsx)(o.$n,{fullWidth:!0,onClick:el,disabled:!N.name.trim()||!N.proxyUrl.trim()||I,children:I?"Saving...":"Save"}),(0,l.jsx)(o.$n,{fullWidth:!0,variant:"ghost",onClick:er,disabled:I,children:"Cancel"})]})]})}),(0,l.jsx)(o.uo,{isOpen:!!Y,onClose:()=>Q(null),onConfirm:Y?.onConfirm,title:Y?.title||"Confirm",message:Y?.message,variant:"danger"})]})}},87197:(e,t,r)=>{Promise.resolve().then(r.bind(r,57076))}},e=>{e.O(0,[27,8105,705,1321,5497,8441,3794,7358],()=>e(e.s=87197)),_N_E=e.O()}]);
|
|
4
|
+
${l.join("\n")}`);z(!0);try{let t=new Set(e.map(e=>`${(e.proxyUrl||"").trim()}|||${(e.noProxy||"").trim()}`)),l=0,s=0,o=0;for(let e of r){let r=`${e.proxyUrl}|||`;if(t.has(r)){s+=1;continue}(await fetch("/api/proxy-pools",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e.name,proxyUrl:e.proxyUrl,noProxy:"",isActive:!0})})).ok?(l+=1,t.add(r)):o+=1}await X(),p(!1),Z.success(`Batch import completed: Created ${l}, Skipped ${s}, Failed ${o}`)}catch(e){console.log("Error batch importing proxies:",e),Z.error("Batch import failed")}finally{z(!1)}},ev=(0,s.useMemo)(()=>e.filter(e=>!0===e.isActive).length,[e]);return r?(0,l.jsxs)("div",{className:"mx-auto flex w-full max-w-5xl flex-col gap-4 px-1 sm:gap-6 sm:px-0",children:[(0,l.jsx)(o.Qv,{}),(0,l.jsx)(o.Qv,{})]}):(0,l.jsxs)("div",{className:"mx-auto flex w-full max-w-5xl flex-col gap-4 sm:gap-6",children:[(0,l.jsx)(o.zY,{title:"Proxy Pools",description:"Outbound proxy routing and health checks",icon:"lan",actions:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"relative",ref:K,children:[(0,l.jsxs)(o.$n,{size:"sm",variant:"secondary",icon:"rocket_launch",onClick:()=>v(!j),children:["Deploy Relay",(0,l.jsx)("span",{className:"material-symbols-outlined ml-1 text-[18px]",children:j?"expand_less":"expand_more"})]}),j&&(0,l.jsxs)("div",{className:"absolute right-0 top-full z-50 mt-1 w-48 rounded-panel border border-border-subtle bg-panel p-1 shadow-[var(--shadow-elev)]",children:[(0,l.jsxs)("button",{onClick:()=>{T({accountId:"",apiToken:"",projectName:"cloudflare-relay"}),y(!0),v(!1)},className:"flex w-full items-center gap-2 rounded-md px-3 py-2 text-sm text-text-main transition-colors hover:bg-surface-2",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px] text-warning",children:"cloud"}),"Cloudflare Relay"]}),(0,l.jsxs)("button",{onClick:()=>{D({vercelToken:"",projectName:"vercel-relay"}),h(!0),v(!1)},className:"flex w-full items-center gap-2 rounded-md px-3 py-2 text-sm text-text-main transition-colors hover:bg-surface-2",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px] text-info",children:"cloud_upload"}),"Vercel Relay"]}),(0,l.jsxs)("button",{onClick:()=>{E({denoToken:"",orgDomain:"",projectName:""}),g(!0),v(!1)},className:"flex w-full items-center gap-2 rounded-md px-3 py-2 text-sm text-text-main transition-colors hover:bg-surface-2",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px] text-success",children:"terminal"}),"Deno Relay"]})]})]}),(0,l.jsx)(o.$n,{size:"sm",variant:"secondary",icon:"upload",onClick:()=>{P(""),p(!0)},children:"Batch Import"}),(0,l.jsx)(o.$n,{size:"sm",icon:"add",onClick:et,children:"Add Proxy Pool"})]})}),(0,l.jsxs)(o.Zp,{children:[(0,l.jsxs)("div",{className:"mb-4 flex flex-wrap items-center gap-2",children:[e.length>0&&(0,l.jsxs)("label",{className:"flex items-center gap-1.5 text-xs text-text-muted cursor-pointer",children:[(0,l.jsx)("input",{type:"checkbox",checked:ei,onChange:()=>q(ei?[]:e.map(e=>e.id)),className:"size-4 rounded border-black/20 dark:border-white/20"}),ei?"Unselect all":"Select all"]}),(0,l.jsxs)(o.Ex,{variant:"default",children:["Total: ",e.length]}),(0,l.jsxs)(o.Ex,{variant:"success",children:["Active: ",ev]})]}),(L.length>0||V)&&(0,l.jsxs)("div",{className:"mb-4 flex flex-wrap items-center gap-2 rounded-lg border border-primary/30 bg-primary/5 px-3 py-2",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px] text-primary",children:"checklist"}),(0,l.jsx)("span",{className:"text-xs font-medium text-primary",children:L.length>0?`${L.length} selected`:"All pools"}),(0,l.jsxs)("div",{className:"ml-auto flex flex-wrap items-center gap-2",children:[(0,l.jsx)(o.$n,{size:"sm",icon:V?"progress_activity":"health_and_safety",onClick:ex,disabled:V||M||0===e.length,children:V?`Checking ${B.current}/${B.total}`:"Health Check"}),L.length>0&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(o.$n,{size:"sm",variant:"secondary",icon:"toggle_on",onClick:()=>ed(!0),disabled:M||V,children:"Activate"}),(0,l.jsx)(o.$n,{size:"sm",variant:"secondary",icon:"toggle_off",onClick:()=>ed(!1),disabled:M||V,children:"Deactivate"}),(0,l.jsx)(o.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:ec,disabled:M||V,children:"Delete"}),(0,l.jsx)(o.$n,{size:"sm",variant:"ghost",onClick:en,disabled:M||V,children:"Clear"})]})]})]}),0===e.length?(0,l.jsxs)("div",{className:"text-center py-10",children:[(0,l.jsx)("p",{className:"text-text-main font-medium mb-1",children:"No proxy pool entries yet"}),(0,l.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Create a proxy pool entry, then assign it to connections."}),(0,l.jsx)(o.$n,{icon:"add",onClick:et,children:"Add Proxy Pool"})]}):(0,l.jsx)("div",{className:"flex flex-col divide-y divide-black/[0.04] dark:divide-white/[0.05]",children:e.map(e=>{var t;return(0,l.jsxs)("div",{className:"flex flex-col gap-3 py-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,l.jsxs)("div",{className:"flex items-start gap-3 min-w-0 flex-1",children:[(0,l.jsx)("input",{type:"checkbox",checked:L.includes(e.id),onChange:()=>{let t;return t=e.id,q(e=>e.includes(t)?e.filter(e=>e!==t):[...e,t])},className:"mt-1 size-4 shrink-0 rounded border-black/20 dark:border-white/20"}),(0,l.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,l.jsx)("p",{className:"min-w-0 max-w-full truncate text-sm font-medium sm:max-w-[18rem]",children:e.name}),(0,l.jsx)(o.Ex,{variant:"active"===(t=e.testStatus)?"success":"error"===t?"error":"default",size:"sm",dot:!0,children:e.testStatus||"unknown"}),(0,l.jsx)(o.Ex,{variant:e.isActive?"success":"default",size:"sm",children:e.isActive?"active":"inactive"}),"vercel"===e.type&&(0,l.jsx)(o.Ex,{variant:"default",size:"sm",children:"vercel relay"}),"cloudflare"===e.type&&(0,l.jsx)(o.Ex,{variant:"default",size:"sm",children:"cloudflare relay"}),(0,l.jsxs)(o.Ex,{variant:"default",size:"sm",children:[e.boundConnectionCount||0," bound"]})]}),(0,l.jsx)("p",{className:"text-xs text-text-muted truncate mt-1",children:e.proxyUrl}),e.noProxy?(0,l.jsxs)("p",{className:"text-xs text-text-muted truncate",children:["No proxy: ",e.noProxy]}):null,(0,l.jsxs)("p",{className:"text-[11px] text-text-muted mt-1",children:["Last tested: ",function(e){if(!e)return"Never";let t=new Date(e);return Number.isNaN(t.getTime())?"Never":t.toLocaleString()}(e.lastTestedAt),e.lastError?` \xb7 ${e.lastError}`:""]})]})]}),(0,l.jsxs)("div",{className:"flex items-center justify-end gap-1",children:[(0,l.jsx)(o.lM,{size:"sm",checked:!0===e.isActive,onChange:()=>ea(e),title:e.isActive?"Disable":"Enable"}),(0,l.jsx)("button",{onClick:()=>eo(e.id),className:"p-2 rounded hover:bg-black/5 dark:hover:bg-white/5 text-text-muted hover:text-primary",title:"Test proxy",disabled:R===e.id,children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",style:R===e.id?{animation:"spin 1s linear infinite"}:void 0,children:R===e.id?"progress_activity":"science"})}),(0,l.jsx)("button",{onClick:()=>{k(e),w(i(e)),c(!0)},className:"p-2 rounded hover:bg-black/5 dark:hover:bg-white/5 text-text-muted hover:text-primary",title:"Edit",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"})}),(0,l.jsx)("button",{onClick:()=>es(e),className:"p-2 rounded hover:bg-red-500/10 text-red-500",title:"Delete",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"})})]})]},e.id)})})]}),(0,l.jsx)(o.aF,{isOpen:x,title:"Batch Import Proxies",onClose:ep,children:(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"text-sm font-medium text-text-main mb-1 block",children:"Paste Proxy List (One per line)"}),(0,l.jsx)("textarea",{value:C,onChange:e=>P(e.target.value),placeholder:"http://user:pass@127.0.0.1:7897\n127.0.0.1:7897:user:pass",className:"w-full min-h-[180px] py-2 px-3 text-sm text-text-main bg-white dark:bg-white/5 border border-black/10 dark:border-white/10 rounded-md focus:ring-1 focus:ring-primary/30 focus:border-primary/50 focus:outline-none transition-all"}),(0,l.jsx)("p",{className:"text-xs text-text-muted mt-1",children:"Supported formats: protocol://user:pass@host:port, host:port:user:pass"})]}),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:[(0,l.jsx)(o.$n,{fullWidth:!0,onClick:ej,disabled:!C.trim()||O,children:O?"Importing...":"Import"}),(0,l.jsx)(o.$n,{fullWidth:!0,variant:"ghost",onClick:ep,disabled:O,children:"Cancel"})]})]})}),(0,l.jsx)(o.aF,{isOpen:m,title:"Deploy Vercel Relay",onClose:em,children:(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsxs)("div",{className:"rounded-lg bg-blue-500/5 border border-blue-500/10 p-3 flex flex-col gap-1.5",children:[(0,l.jsx)("p",{className:"text-sm text-text-main font-medium",children:"What is Vercel Relay?"}),(0,l.jsx)("p",{className:"text-xs text-text-muted",children:"Deploys an edge relay function to Vercel. All AI provider requests will be forwarded through Vercel's edge network, masking your real IP from providers."}),(0,l.jsxs)("ul",{className:"text-xs text-text-muted list-disc pl-4 space-y-0.5",children:[(0,l.jsx)("li",{children:"Your IP is replaced by Vercel's dynamic edge IPs (hundreds of IPs across 20+ global regions)"}),(0,l.jsx)("li",{children:"Vercel serves millions of apps — providers can't block Vercel IPs without affecting legitimate traffic"}),(0,l.jsx)("li",{children:"Free tier: 100GB bandwidth/month, 500K edge invocations"}),(0,l.jsx)("li",{children:"Deploy multiple relays on different accounts for more IP diversity"})]})]}),(0,l.jsx)(o.pd,{label:"Vercel API Token",value:$.vercelToken,onChange:e=>D(t=>({...t,vercelToken:e.target.value})),placeholder:"your-vercel-api-token",hint:(0,l.jsxs)(l.Fragment,{children:["Token is used once for deployment and not stored. ",(0,l.jsx)("a",{href:"https://vercel.com/account/tokens",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"Get token →"})]}),type:"password"}),(0,l.jsx)(o.pd,{label:"Project Name",value:$.projectName,onChange:e=>D(t=>({...t,projectName:e.target.value})),placeholder:"my-relay",hint:"Unique name for your Vercel project. Leave empty for auto-generated name."}),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:[(0,l.jsx)(o.$n,{fullWidth:!0,onClick:ey,disabled:!$.vercelToken.trim()||F,children:F?"Deploying... (may take ~1 min)":"Deploy"}),(0,l.jsx)(o.$n,{fullWidth:!0,variant:"ghost",onClick:em,disabled:F,children:"Cancel"})]})]})}),(0,l.jsx)(o.aF,{isOpen:u,title:"Deploy Cloudflare Relay",onClose:eh,children:(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsxs)("div",{className:"rounded-lg bg-orange-500/5 border border-orange-500/10 p-3 flex flex-col gap-1.5",children:[(0,l.jsx)("p",{className:"text-sm text-text-main font-medium",children:"What is Cloudflare Relay?"}),(0,l.jsx)("p",{className:"text-xs text-text-muted",children:"Deploys a Cloudflare Worker as a proxy relay. All AI provider requests will be forwarded through Cloudflare's global edge network."}),(0,l.jsxs)("ul",{className:"text-xs text-text-muted list-disc pl-4 space-y-0.5",children:[(0,l.jsx)("li",{children:"High performance global routing and IP masking via Cloudflare Workers"}),(0,l.jsx)("li",{children:"Free tier: 100,000 requests per day"}),(0,l.jsx)("li",{children:"Requires Cloudflare Account ID and a Workers API Token (Edit Workers permission)"})]}),(0,l.jsxs)("div",{className:"mt-2 pt-2 border-t border-orange-500/10 text-xs text-text-muted",children:[(0,l.jsx)("p",{className:"font-medium text-text-main mb-1",children:"How to generate your API Token:"}),(0,l.jsxs)("ol",{className:"list-decimal pl-4 space-y-0.5",children:[(0,l.jsxs)("li",{children:["Go to ",(0,l.jsx)("b",{children:"My Profile"})," → ",(0,l.jsx)("b",{children:"API Tokens"})," → ",(0,l.jsx)("b",{children:"Create Token"})]}),(0,l.jsxs)("li",{children:["Scroll down to ",(0,l.jsx)("b",{children:"Custom Token"})," and click ",(0,l.jsx)("b",{children:"Get started"})]}),(0,l.jsxs)("li",{children:["Under ",(0,l.jsx)("b",{children:"Permissions"}),": Account | Workers Scripts | Edit"]}),(0,l.jsxs)("li",{children:["Under ",(0,l.jsx)("b",{children:"Account Resources"}),": Include | Account | ",(0,l.jsx)("i",{children:"Your Account Name"})]}),(0,l.jsxs)("li",{children:["Click ",(0,l.jsx)("b",{children:"Continue to summary"})," → ",(0,l.jsx)("b",{children:"Create Token"})]})]})]})]}),(0,l.jsx)(o.pd,{label:"Account ID",value:S.accountId,onChange:e=>T(t=>({...t,accountId:e.target.value})),placeholder:"your-cloudflare-account-id",hint:(0,l.jsx)(l.Fragment,{children:"Found on the right side of the Cloudflare dashboard overview page."})}),(0,l.jsx)(o.pd,{label:"API Token",value:S.apiToken,onChange:e=>T(t=>({...t,apiToken:e.target.value})),placeholder:"your-cloudflare-api-token",hint:(0,l.jsxs)(l.Fragment,{children:['Requires "Workers Scripts: Edit" permission. ',(0,l.jsx)("a",{href:"https://dash.cloudflare.com/profile/api-tokens",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"Get token →"})]}),type:"password"}),(0,l.jsx)(o.pd,{label:"Worker Name",value:S.projectName,onChange:e=>T(t=>({...t,projectName:e.target.value})),placeholder:"my-relay",hint:"Unique name for your Cloudflare Worker. Leave empty for auto-generated name."}),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:[(0,l.jsx)(o.$n,{fullWidth:!0,onClick:ef,disabled:!S.accountId.trim()||!S.apiToken.trim()||F,children:F?"Deploying...":"Deploy Worker"}),(0,l.jsx)(o.$n,{fullWidth:!0,variant:"ghost",onClick:eh,disabled:F,children:"Cancel"})]})]})}),(0,l.jsx)(o.aF,{isOpen:f,title:"Deploy Deno Relay",onClose:eu,children:(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsxs)("div",{className:"rounded-lg bg-black/5 dark:bg-white/5 border border-black/10 dark:border-white/10 p-3 flex flex-col gap-1.5",children:[(0,l.jsx)("p",{className:"text-sm text-text-main font-medium",children:"What is Deno Relay?"}),(0,l.jsx)("p",{className:"text-xs text-text-muted",children:"Deploys a relay worker to Deno Deploy's global edge network. All AI provider requests are forwarded through Deno's edge, masking your real IP."}),(0,l.jsxs)("ul",{className:"text-xs text-text-muted list-disc pl-4 space-y-0.5",children:[(0,l.jsx)("li",{children:"Deno Deploy v2 runs on a high-performance global edge network"}),(0,l.jsx)("li",{children:"Free tier: 1M requests & 100GiB outbound traffic per month"}),(0,l.jsx)("li",{children:"No per-request CPU time limits (unlike Vercel/Cloudflare)"}),(0,l.jsx)("li",{children:"Support up to 20 active apps & 50 custom domains"}),(0,l.jsx)("li",{children:"Deploy multiple relays for maximum IP diversity"})]}),(0,l.jsxs)("div",{className:"mt-2 pt-2 border-t border-black/10 dark:border-white/10 text-xs text-text-muted",children:[(0,l.jsx)("p",{className:"font-medium text-text-main mb-1",children:"How to generate API token:"}),(0,l.jsxs)("ol",{className:"list-decimal pl-4 space-y-0.5",children:[(0,l.jsxs)("li",{children:["Go to ",(0,l.jsx)("b",{children:"console.deno.com"})]}),(0,l.jsxs)("li",{children:["Select your ",(0,l.jsx)("b",{children:"Organization"})," → ",(0,l.jsx)("b",{children:"Settings"})," → ",(0,l.jsx)("b",{children:"Organization Tokens"})]}),(0,l.jsxs)("li",{children:["Create a ",(0,l.jsx)("b",{children:"Organization Token"})," (prefix ",(0,l.jsx)("b",{children:"ddo_"}),")"]})]})]})]}),(0,l.jsx)(o.pd,{label:"Deno Deploy API Token",value:A.denoToken,onChange:e=>E(t=>({...t,denoToken:e.target.value})),placeholder:"ddo_xxxxxxxxxxxxxxxx",hint:(0,l.jsx)(l.Fragment,{children:"Token is used once for deployment, not stored. Found in Organization Settings."}),type:"password"}),(0,l.jsx)(o.pd,{label:"Organization Domain",value:A.orgDomain,onChange:e=>E(t=>({...t,orgDomain:e.target.value})),placeholder:"your-org.deno.net",hint:"Organization's default domain. Your relay URL will be in the format: https://my-relay.your-org.deno.net"}),(0,l.jsx)(o.pd,{label:"App Name",value:A.projectName,onChange:e=>E(t=>({...t,projectName:e.target.value})),placeholder:"deno-relay",hint:"Unique app name. Leave empty for auto-generated name."}),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:[(0,l.jsx)(o.$n,{fullWidth:!0,onClick:eg,disabled:!A.denoToken.trim()||!A.orgDomain.trim()||F,children:F?"Deploying...":"Deploy Relay"}),(0,l.jsx)(o.$n,{fullWidth:!0,variant:"ghost",onClick:eu,disabled:F,children:"Cancel"})]})]})}),(0,l.jsx)(o.aF,{isOpen:d,title:b?"Edit Proxy Pool":"Add Proxy Pool",onClose:er,children:(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsx)(o.pd,{label:"Name",value:N.name,onChange:e=>w(t=>({...t,name:e.target.value})),placeholder:"Office Proxy"}),(0,l.jsx)(o.pd,{label:"Proxy URL",value:N.proxyUrl,onChange:e=>w(t=>({...t,proxyUrl:e.target.value})),placeholder:"http://127.0.0.1:7897"}),(0,l.jsx)(o.pd,{label:"No Proxy",value:N.noProxy,onChange:e=>w(t=>({...t,noProxy:e.target.value})),placeholder:"localhost,127.0.0.1,.internal",hint:"Comma-separated hosts/domains to bypass proxy"}),(0,l.jsxs)("div",{className:"flex flex-col gap-3 rounded-lg border border-border/50 p-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{className:"font-medium text-sm",children:"Active"}),(0,l.jsx)("p",{className:"text-xs text-text-muted",children:"Inactive pools are ignored by runtime resolution."})]}),(0,l.jsx)(o.lM,{checked:!0===N.isActive,onChange:()=>w(e=>({...e,isActive:!e.isActive})),disabled:I})]}),(0,l.jsxs)("div",{className:"flex flex-col gap-3 rounded-lg border border-border/50 p-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{className:"font-medium text-sm",children:"Strict Proxy"}),(0,l.jsx)("p",{className:"text-xs text-text-muted",children:"Fail request if proxy is unreachable instead of falling back to direct."})]}),(0,l.jsx)(o.lM,{checked:!0===N.strictProxy,onChange:()=>w(e=>({...e,strictProxy:!e.strictProxy})),disabled:I})]}),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:[(0,l.jsx)(o.$n,{fullWidth:!0,onClick:el,disabled:!N.name.trim()||!N.proxyUrl.trim()||I,children:I?"Saving...":"Save"}),(0,l.jsx)(o.$n,{fullWidth:!0,variant:"ghost",onClick:er,disabled:I,children:"Cancel"})]})]})}),(0,l.jsx)(o.uo,{isOpen:!!Y,onClose:()=>Q(null),onConfirm:Y?.onConfirm,title:Y?.title||"Confirm",message:Y?.message,variant:"danger"})]})}},87197:(e,t,r)=>{Promise.resolve().then(r.bind(r,57076))}},e=>{e.O(0,[27,9497,705,1321,5497,8441,3794,7358],()=>e(e.s=87197)),_N_E=e.O()}]);
|
package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-e249d28461673557.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3826],{15670:(e,t,r)=>{"use strict";r.d(t,{default:()=>R});var a=r(95155),i=r(54960),s=r(84588),n=r(35497),l=r(70778);let o="quotaCacheData",d="quotaAutoRefresh",c=[10,20,50,100],u=[{value:"all",label:"All accounts"},{value:"active",label:"Active"},{value:"inactive",label:"Turned off"}],m=[{value:"default",label:"Default quota order"},{value:"remaining-asc",label:"% quota: low to high"},{value:"remaining-desc",label:"% quota: high to low"}];function x(e){return e.name?.trim()||e.email?.trim()||e.displayName?.trim()||null}function h(e,t){let r=t[e.id]?.quotas?.[0];return r&&"number"==typeof r.remaining?r.remaining:1/0}function p(e){let t={};return e.forEach(e=>{t[e.id]=!0}),t}function b(e,t){let r=new Set(t.map(e=>e.id));return Object.fromEntries(Object.entries(e).filter(([e])=>r.has(e)))}async function g(e,t){return await e(t)}function f(){try{let e=window.localStorage.getItem(o);return e?JSON.parse(e):{}}catch(e){return console.error("Error reading quota cache:",e),{}}}function y(e,t){try{let r=f();r[e]={...t,cachedAt:new Date().toISOString()},window.localStorage.setItem(o,JSON.stringify(r))}catch(e){console.error("Error writing quota cache:",e)}}function v(e,t){return t&&0!==t?!e||e<0?100:e>=t?0:Math.round((t-e)/t*100):0}let j={"builder-id":"AWS Builder ID",idc:"IAM Identity Center",google:"Google",github:"GitHub",imported:"Imported Token",api_key:"API Key"},w={claude:"claudeAutoPing",codex:"codexAutoPing"},k={claude:"When your 5h quota runs out, auto-sends a request the moment it resets so a new window starts right away.",codex:"Auto-starts the next 5h Codex window after reset by sending a tiny gpt-5.5 request. Consumes a small amount of quota."};function N(e){return 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}function C(e){let t=e.providerSpecificData?.region;if(t)return t;let r=e.providerSpecificData?.profileArn;return("string"==typeof r?r.split(":")[3]:"")||""}function S(e){if(!e)return"N/A";let t=new Date(e);return Number.isFinite(t.getTime())?t.toLocaleString(void 0,{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"}):"N/A"}var A=r(12115),P=r(88105),$=r(57250),q=r(8247);function E({providerFilter:e,providerOptions:t,providerMenuOpen:r,onToggleMenu:i,onSelectProvider:s}){let n="all"===e?"All providers":e;return(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsxs)("button",{type:"button",onClick:i,className:"flex h-8 items-center justify-between gap-1 rounded-lg border border-border bg-black/[0.02] px-2 text-xs text-text-primary transition-colors hover:bg-surface-2 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-haspopup":"menu","aria-expanded":r,title:"Filter quota providers",children:[(0,a.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5",children:["all"===e?(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"apps"}):(0,a.jsx)($.A,{src:(0,q.k)(e),alt:e,size:18,className:"size-[18px] rounded object-contain",fallbackText:e.slice(0,2).toUpperCase()}),(0,a.jsx)("span",{className:"truncate capitalize hidden lg:inline",children:n})]}),(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"expand_more"})]}),r&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("button",{type:"button",className:"fixed inset-0 z-30 bg-transparent","aria-label":"Close provider filter",onClick:i}),(0,a.jsxs)("div",{className:"absolute left-0 z-40 mt-2 w-64 overflow-hidden rounded-2xl border border-border bg-surface/95 p-1.5 shadow-xl shadow-black/10 backdrop-blur dark:border-white/10 dark:bg-surface/95 sm:w-72",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>s("all"),className:`flex w-full items-center gap-3 rounded-xl px-3 py-2.5 text-left text-sm transition-colors ${"all"===e?"bg-primary/10 text-primary":"text-text-primary hover:hover:bg-surface-3"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[22px]",children:"apps"}),(0,a.jsx)("span",{className:"font-medium",children:"All providers"}),"all"===e&&(0,a.jsx)("span",{className:"material-symbols-outlined ml-auto text-[20px]",children:"check"})]}),(0,a.jsx)("div",{className:"my-1 h-px bg-black/10 dark:bg-white/10"}),(0,a.jsx)("div",{className:"max-h-72 overflow-y-auto pr-1",children:t.map(t=>(0,a.jsxs)("button",{type:"button",onClick:()=>s(t),className:`flex w-full items-center gap-3 rounded-xl px-3 py-2.5 text-left text-sm transition-colors ${e===t?"bg-primary/10 text-primary":"text-text-primary hover:hover:bg-surface-3"}`,children:[(0,a.jsx)($.A,{src:(0,q.k)(t),alt:t,size:24,className:"size-6 rounded-md object-contain",fallbackText:t.slice(0,2).toUpperCase()}),(0,a.jsx)("span",{className:"font-medium capitalize",children:t}),e===t&&(0,a.jsx)("span",{className:"material-symbols-outlined ml-auto text-[20px]",children:"check"})]},t))})]})]})]})}function T({providerFilter:e,providerOptions:t,providerMenuOpen:r,onToggleProviderMenu:i,onSelectProvider:s,accountFilter:n,onAccountFilterChange:l,quotaSortMode:o,onQuotaSortModeChange:d,expiringFirst:c,onToggleExpiringFirst:x,autoRefresh:h,onToggleAutoRefresh:p,countdown:b,bulkToggling:g,onDisableDepleted:f,onEnableAvailable:y,refreshingAll:v,onRefreshAll:j}){return(0,a.jsx)("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-end",children:(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[(0,a.jsx)(E,{providerFilter:e,providerOptions:t,providerMenuOpen:r,onToggleMenu:i,onSelectProvider:s}),(0,a.jsx)("select",{value:n,onChange:e=>l(e.target.value),className:"h-8 rounded-lg border border-border bg-black/[0.02] px-2 text-xs text-text-primary outline-none transition-colors hover:bg-surface-2 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-label":"Filter accounts by status",children:u.map(e=>(0,a.jsx)("option",{value:e.value,children:e.label},e.value))}),"codex"===e&&(0,a.jsx)("select",{value:o,onChange:e=>d(e.target.value),className:"h-8 rounded-lg border border-border bg-black/[0.02] px-2 text-xs text-text-primary outline-none transition-colors hover:bg-surface-2 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-label":"Sort Codex quotas by remaining",children:m.map(e=>(0,a.jsx)("option",{value:e.value,children:e.label},e.value))}),(0,a.jsxs)("button",{type:"button",onClick:x,"aria-pressed":c,className:`flex h-8 shrink-0 items-center gap-1 rounded-lg border px-2 text-xs transition-colors ${c?"border-amber-500/40 bg-warning/10 text-warning":"border-border text-text-primary hover:bg-surface-2 dark:border-white/10 dark:hover:bg-white/5"}`,title:"Sort accounts by earliest quota reset time",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"hourglass_top"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:"Expiring first"})]}),(0,a.jsxs)("button",{type:"button",onClick:f,disabled:g,className:"flex h-8 shrink-0 items-center gap-1 rounded-lg border border-red-500/30 px-2 text-xs text-danger transition-colors hover:bg-danger/10 disabled:opacity-50",title:"Disable connections with depleted quota on the current page",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"block"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:"Turn off Empty"})]}),(0,a.jsxs)("button",{type:"button",onClick:y,disabled:g,className:"flex h-8 shrink-0 items-center gap-1 rounded-lg border border-emerald-500/30 px-2 text-xs text-emerald-500 transition-colors hover:bg-emerald-500/10 disabled:opacity-50",title:"Enable connections that still have quota on the current page",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"check_circle"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:"Turn on Available"})]}),(0,a.jsxs)("button",{onClick:p,className:"flex h-8 shrink-0 items-center gap-1 rounded-lg border border-border px-2 text-xs transition-colors hover:bg-surface-2 dark:border-white/10 dark:hover:bg-white/5",title:h?"Disable auto-refresh":"Enable auto-refresh",children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[14px] ${h?"text-primary":"text-text-muted"}`,children:h?"toggle_on":"toggle_off"}),(0,a.jsx)("span",{className:"hidden text-text-primary sm:inline",children:"Auto-refresh"}),h&&(0,a.jsxs)("span",{className:"text-[10px] text-text-muted tabular-nums",children:["(",b,"s)"]})]}),(0,a.jsx)("button",{type:"button",onClick:()=>j(!0),disabled:v,className:"flex h-8 shrink-0 items-center gap-1 rounded-lg border border-border px-2 text-xs text-text-primary transition-colors hover:bg-surface-2 dark:border-white/10 dark:hover:bg-white/5 disabled:opacity-50",title:"Refresh all",children:(0,a.jsx)("span",{className:`material-symbols-outlined text-[14px] ${v?"animate-spin":""}`,children:"refresh"})})]})})}var D=r(98542),M=r(97677),O=r(11059);function I({quotas:e=[],compact:t=!1,sortMode:r="default",showSortLabel:i=!1}){let[s,n]=(0,A.useState)(1),l=(0,A.useMemo)(()=>e.map((e,t)=>({...e,index:t,remaining:e?.remaining!==void 0?Math.max(0,Math.round(e.remaining)):e?.remainingPercentage!==void 0?Math.round(e.remainingPercentage):v(e?.used,e?.total)})),[e]),o=(0,A.useMemo)(()=>"remaining-asc"===r?[...l].sort((e,t)=>e.remaining-t.remaining||e.name.localeCompare(t.name)):"remaining-desc"===r?[...l].sort((e,t)=>t.remaining-e.remaining||e.name.localeCompare(t.name)):l,[l,r]),d=Math.max(1,Math.ceil(o.length/10));if((0,A.useEffect)(()=>{n(1)},[r,e]),(0,A.useEffect)(()=>{n(e=>Math.min(e,d))},[d]),!e||0===e.length)return null;let c=o.slice((s-1)*10,10*s),u=0===o.length?0:(s-1)*10+1,m=Math.min(10*s,o.length),x=t?"py-1 px-1.5":"py-2 px-3",h=t?"text-[11px]":"text-sm",p=t?"text-[11px]":"text-sm",b=t?"text-[10px] leading-tight":"text-xs";return(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsxs)("div",{className:"text-[10px] text-text-muted",children:[o.length," quota",o.length>1?"s":""]}),i&&(0,a.jsx)("div",{className:"rounded-md border border-black/10 bg-black/[0.02] px-2 py-1 text-[10px] text-text-muted dark:border-white/10 dark:bg-white/[0.03]",children:"Sorted by account remaining"})]}),(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsx)("table",{className:"w-full table-fixed text-left",children:(0,a.jsx)("tbody",{children:c.map(e=>{var r;let i=(r=e.remaining)>70?{text:"text-green-600 dark:text-green-400",bg:"bg-green-500",bgLight:"bg-green-500/10",emoji:"\uD83D\uDFE2"}:r>=30?{text:"text-yellow-600 dark:text-yellow-400",bg:"bg-yellow-500",bgLight:"bg-yellow-500/10",emoji:"\uD83D\uDFE1"}:{text:"text-red-600 dark:text-red-400",bg:"bg-red-500",bgLight:"bg-red-500/10",emoji:"\uD83D\uDD34"},s=function(e){if(!e)return"-";try{let t="string"==typeof e?new Date(e):e,r=new Date,a=t-r;if(a<=0)return"-";let i=Math.ceil(a/6e4);if(i<60)return`${i}m`;let s=Math.floor(i/60),n=i%60;if(s<24)return`${s}h ${n}m`;let l=Math.floor(s/24);return`${l}d ${s%24}h ${n}m`}catch(e){return"-"}}(e.resetAt),n=function(e){if(!e)return null;try{let t=new Date(e),r=new Date,a=new Date(r.getFullYear(),r.getMonth(),r.getDate()),i=new Date(a);i.setDate(i.getDate()+1);let s="";s=t>=a&&t<i?"Today":t>=i&&t<new Date(i.getTime()+864e5)?"Tomorrow":t.toLocaleDateString("en-US",{month:"short",day:"numeric"});let n=t.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});return`${s}, ${n}`}catch{return null}}(e.resetAt),l=!1!==e.recurring?`in ${s}`:`expires in ${s}`;return(0,a.jsxs)("tr",{className:"border-b border-black/5 dark:border-white/5 hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors",children:[(0,a.jsx)("td",{className:`${x} w-[30%]`,children:(0,a.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0",children:[(0,a.jsx)("span",{className:"text-[10px] shrink-0",children:i.emoji}),(0,a.jsx)("span",{className:`${h} font-medium text-text-primary truncate`,children:e.name})]})}),(0,a.jsx)("td",{className:`${x} w-[45%]`,children:(0,a.jsxs)("div",{className:t?"space-y-1":"space-y-1.5",children:[(0,a.jsx)("div",{className:`${t?"h-1":"h-1.5"} rounded-full overflow-hidden border ${i.bgLight} ${0===e.remaining?"border-black/10 dark:border-white/10":"border-transparent"}`,children:(0,a.jsx)("div",{className:`h-full transition-all duration-300 ${i.bg}`,style:{width:`${Math.min(e.remaining,100)}%`}})}),(0,a.jsxs)("div",{className:`flex items-center justify-between ${t?"text-[10px]":"text-xs"}`,children:[(0,a.jsxs)("span",{className:"text-text-muted",children:[e.used.toLocaleString()," / ",e.total>0?e.total.toLocaleString():"∞"]}),(0,a.jsxs)("span",{className:`font-medium ${i.text}`,children:[e.remaining,"%"]})]})]})}),(0,a.jsx)("td",{className:`${x} w-[25%]`,children:"-"!==s||n?t?(0,a.jsx)("div",{className:`${p} text-text-primary font-medium truncate`,title:n||"",children:"-"!==s?l:n}):(0,a.jsxs)("div",{className:"space-y-0.5",children:["-"!==s&&(0,a.jsx)("div",{className:`${p} text-text-primary font-medium`,children:l}),n&&(0,a.jsx)("div",{className:`${b} text-text-muted`,children:n})]}):(0,a.jsx)("div",{className:`${p} text-text-muted italic`,children:"N/A"})})]},`${e.name}-${e.index}`)})})})}),d>1&&(0,a.jsxs)("div",{className:"rounded-md border border-black/10 bg-black/[0.02] px-2 py-1.5 dark:border-white/10 dark:bg-white/[0.03]",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2 text-[10px] text-text-muted",children:[(0,a.jsxs)("span",{children:["Showing ",u,"-",m," of ",o.length]}),(0,a.jsxs)("span",{children:["Page ",s," / ",d]})]}),(0,a.jsxs)("div",{className:"mt-1.5 flex items-center justify-end gap-1",children:[(0,a.jsx)("button",{type:"button",onClick:()=>n(e=>Math.max(1,e-1)),disabled:1===s,className:"flex h-6 items-center rounded-md border border-black/10 px-2 text-[10px] text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5",children:"Prev"}),(0,a.jsx)("button",{type:"button",onClick:()=>n(e=>Math.min(d,e+1)),disabled:s===d,className:"flex h-6 items-center rounded-md border border-black/10 px-2 text-[10px] text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5",children:"Next"})]})]})]})}function F({conn:e,quota:t,isLoading:r,error:i,autoPingMaps:n,quotaSortMode:l,resettingLimitId:o,deletingId:d,togglingId:c,onRefresh:u,onEdit:m,onDelete:h,onToggleActive:p,onRequestReset:b,onViewResetCredits:g,onToggleAutoPing:f}){let y,v,S,{copied:A,copy:P}=(0,O.C)(),E=!1===e.isActive,T="codex"===e.provider,_=Number.isFinite(v="number"==typeof(y=t?.raw?.resetCredits?.availableCount)?y:Number(y))?Math.max(0,v):0,z=o===e.id,L=d===e.id||c===e.id||z;return(0,a.jsxs)(s.default,{padding:"none",className:`min-w-0 ${E?"opacity-60":""}`,children:[(0,a.jsx)("div",{className:"px-3 py-2 border-b border-border",children:(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,a.jsx)("div",{className:"w-8 h-8 shrink-0 rounded-md flex items-center justify-center overflow-hidden",children:(0,a.jsx)($.A,{src:(0,q.k)(e.provider),alt:e.provider,size:32,className:"object-contain",fallbackText:e.provider?.slice(0,2).toUpperCase()||"PR"})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold text-text-primary capitalize truncate",children:e.provider}),x(e)?(0,a.jsx)("p",{className:"text-xs text-text-muted truncate",children:x(e)}):null,N(e)?(0,a.jsx)("p",{className:"text-[11px] text-text-muted/80 truncate",children:N(e)}):null,"kiro"===e.provider&&(0,a.jsxs)("div",{className:"mt-1 flex flex-wrap items-center gap-1",children:[(0,a.jsx)("span",{className:"rounded-full bg-brand-500/10 px-2 py-0.5 text-[10px] font-semibold text-brand-600 dark:text-brand-300",children:(S=e.providerSpecificData?.authMethod)&&j[S]?j[S]:"api_key"===e.authType?"API Key":"OAuth"}),C(e)&&(0,a.jsx)("span",{className:"rounded-full bg-info/10 px-2 py-0.5 text-[10px] font-semibold text-info",children:C(e)}),(0,a.jsx)("span",{className:`rounded-full px-2 py-0.5 text-[10px] font-semibold ${E?"bg-surface-2 text-text-muted":"active"===e.testStatus||"success"===e.testStatus?"bg-green-500/10 text-success":"error"===e.testStatus||"expired"===e.testStatus||"unavailable"===e.testStatus?"bg-red-500/10 text-danger":"bg-surface-2 text-text-muted"}`,children:E?"disabled":e.testStatus||"unknown"}),e.providerSpecificData?.profileArn&&(0,a.jsxs)("button",{type:"button",onClick:()=>P(e.providerSpecificData.profileArn,e.id),title:e.providerSpecificData.profileArn,className:"inline-flex max-w-full items-center gap-1 rounded-full border border-border-subtle px-2 py-0.5 text-[10px] text-text-muted transition-colors hover:text-primary",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:A===e.id?"check":"content_copy"}),(0,a.jsx)("code",{className:"truncate font-mono",children:e.providerSpecificData.profileArn})]})]})]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1 shrink-0",children:[T&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(M.default,{text:_>0?`Use one Codex reset credit. Available: ${_}`:"No Codex reset credits available",children:(0,a.jsxs)("button",{type:"button",onClick:()=>b(e,_),disabled:_<=0||r||L,"aria-label":_>0?`Use one Codex reset credit. ${_} available.`:"No Codex reset credits available",className:`flex h-8 min-w-10 items-center justify-center gap-1 rounded-lg border px-2 text-[11px] font-medium tabular-nums transition-colors focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary/60 disabled:cursor-not-allowed disabled:opacity-60 ${_>0?"border-primary/30 bg-primary/5 text-primary hover:bg-primary/10":"border-border bg-black/[0.02] text-text-muted dark:border-white/10 dark:bg-white/[0.03]"}`,children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[15px] ${z?"animate-spin":""}`,children:z?"progress_activity":"restart_alt"}),(0,a.jsx)("span",{children:_})]})}),(0,a.jsx)(M.default,{text:"View Codex reset credit expiry",children:(0,a.jsx)("button",{type:"button",onClick:()=>g(e),disabled:r||L,"aria-label":"View Codex reset credit expiry",className:"flex h-8 w-8 items-center justify-center rounded-lg border border-border text-text-muted transition-colors hover:bg-surface-2 hover:text-primary disabled:cursor-not-allowed disabled:opacity-50 dark:border-white/10 dark:hover:bg-white/5",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[17px]",children:"schedule"})})})]}),w[e.provider]&&"oauth"===e.authType&&(0,a.jsx)(M.default,{text:k[e.provider],children:(0,a.jsx)("button",{type:"button",onClick:()=>f(e.id,e.provider,n[e.provider]?.[e.id]!==!0),"aria-label":"Toggle auto-ping",className:`flex h-8 w-8 items-center justify-center rounded-lg transition-colors hover:hover:bg-surface-3 ${n[e.provider]?.[e.id]===!0?"text-primary":"text-text-muted"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"bolt"})})}),(0,a.jsx)(M.default,{text:"Refresh quota",children:(0,a.jsx)("button",{type:"button",onClick:()=>u(e.id,e.provider),disabled:r||L,"aria-label":"Refresh quota",className:"flex h-8 w-8 items-center justify-center rounded-lg hover:hover:bg-surface-3 transition-colors disabled:opacity-50",children:(0,a.jsx)("span",{className:`material-symbols-outlined text-[18px] text-text-muted ${r?"animate-spin":""}`,children:"refresh"})})}),(0,a.jsx)(M.default,{text:"Edit connection",children:(0,a.jsx)("button",{type:"button",onClick:()=>m(e),disabled:L,"aria-label":"Edit connection",className:"flex h-8 w-8 items-center justify-center rounded-lg hover:hover:bg-surface-3 text-text-muted hover:text-primary transition-colors disabled:opacity-50",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"})})}),(0,a.jsx)(M.default,{text:"Delete connection",children:(0,a.jsx)("button",{type:"button",onClick:()=>h(e.id),disabled:L,"aria-label":"Delete connection",className:"flex h-8 w-8 items-center justify-center rounded-lg hover:bg-danger/10 text-danger transition-colors disabled:opacity-50",children:(0,a.jsx)("span",{className:`material-symbols-outlined text-[18px] ${d===e.id?"animate-pulse":""}`,children:"delete"})})}),(0,a.jsx)("div",{className:"inline-flex items-center pl-0.5",title:e.isActive??!0?"Disable connection":"Enable connection",children:(0,a.jsx)(D.default,{size:"sm",checked:e.isActive??!0,disabled:L,onChange:t=>p(e.id,t)})})]})]})}),(0,a.jsx)("div",{className:"px-2 py-1.5",children:r?(0,a.jsx)("div",{className:"text-center py-5 text-text-muted",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[28px] animate-spin",children:"progress_activity"})}):i?(0,a.jsxs)("div",{className:"text-center py-5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[28px] text-danger",children:"error"}),(0,a.jsx)("p",{className:"mt-1.5 text-xs text-text-muted",children:i})]}):t?.message?(0,a.jsx)("div",{className:"text-center py-5",children:(0,a.jsx)("p",{className:"text-xs text-text-muted",children:t.message})}):(0,a.jsx)(I,{quotas:t?.quotas,compact:!0,sortMode:"default",showSortLabel:"codex"===e.provider&&"default"!==l})})]})}function _({pagination:e,pageSize:t,customPageSizeInput:r,connectionsLoading:i,refreshingAll:s,connectionsPageSummary:n,setPage:l,onPageSizeSelect:o,onCustomPageSizeInputChange:d,onCommitCustomPageSize:u}){let m=!c.includes(t);return(0,a.jsx)("div",{className:"rounded-xl border border-border bg-black/[0.02] px-3 py-2 dark:border-white/10 dark:bg-white/[0.03]",children:(0,a.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted",children:n}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsxs)("select",{value:m?"custom":String(t),onChange:e=>o(e.target.value),className:"h-8 rounded-lg border border-border bg-black/[0.02] px-2 text-xs text-text-primary outline-none transition-colors hover:bg-surface-2 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-label":"Accounts per page",children:[c.map(e=>(0,a.jsxs)("option",{value:String(e),children:[e," / page"]},e)),(0,a.jsx)("option",{value:"custom",children:"Custom"})]}),(0,a.jsx)("input",{type:"number",min:"1",max:String(500),inputMode:"numeric",value:r,onChange:e=>d(e.target.value),onBlur:u,onKeyDown:e=>{"Enter"===e.key&&u()},className:"h-8 w-20 rounded-lg border border-border bg-black/[0.02] px-2 text-xs text-text-primary outline-none transition-colors hover:bg-surface-2 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-label":"Custom accounts per page",placeholder:"Custom"}),(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["Page ",e.page," / ",e.totalPages]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("button",{type:"button",onClick:()=>l(1),disabled:e.page<=1||i||s,className:"flex h-8 items-center rounded-lg border border-border px-3 text-xs text-text-primary transition-colors hover:bg-surface-2 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5",children:"First Page"}),(0,a.jsx)("button",{type:"button",onClick:()=>l(e=>Math.max(1,e-1)),disabled:e.page<=1||i||s,className:"flex h-8 w-8 items-center justify-center rounded-lg border border-border text-text-primary transition-colors hover:bg-surface-2 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5","aria-label":"Previous accounts page",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"chevron_left"})}),(0,a.jsx)("button",{type:"button",onClick:()=>l(t=>Math.min(e.totalPages,t+1)),disabled:e.page>=e.totalPages||i||s,className:"flex h-8 w-8 items-center justify-center rounded-lg border border-border text-text-primary transition-colors hover:bg-surface-2 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5","aria-label":"Next accounts page",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"chevron_right"})}),(0,a.jsx)("button",{type:"button",onClick:()=>l(e.totalPages),disabled:e.page>=e.totalPages||i||s,className:"flex h-8 items-center rounded-lg border border-border px-3 text-xs text-text-primary transition-colors hover:bg-surface-2 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5",children:"Last Page"})]})]})})}function z({state:e,onClose:t}){return e?(0,a.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 px-4 backdrop-blur-sm",children:(0,a.jsxs)("div",{className:"w-full max-w-2xl overflow-hidden rounded-2xl border border-black/15 bg-white shadow-2xl ring-1 ring-black/10 dark:border-white/15 dark:bg-surface dark:ring-white/10",children:[(0,a.jsxs)("div",{className:"flex items-start justify-between gap-3 border-b border-border bg-black/[0.03] px-4 py-3 dark:border-white/10 dark:bg-white/[0.04]",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("h3",{className:"text-base font-semibold text-text-primary",children:"Codex Reset Credit Expiry"}),(0,a.jsx)("p",{className:"mt-0.5 truncate text-xs text-text-muted",children:x(e.connection)||"Codex account"})]}),(0,a.jsx)("button",{type:"button",onClick:t,className:"flex h-8 w-8 items-center justify-center rounded-lg text-text-muted transition-colors hover:bg-surface-2 hover:text-text-primary dark:hover:bg-white/5","aria-label":"Close reset credit expiry modal",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"close"})})]}),(0,a.jsx)("div",{className:"max-h-[70vh] overflow-auto bg-white p-4 dark:bg-surface",children:e.loading?(0,a.jsxs)("div",{className:"flex items-center justify-center gap-2 py-10 text-sm text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-[20px]",children:"progress_activity"}),"Loading reset credits..."]}):e.error?(0,a.jsx)("div",{className:"rounded-xl border border-red-500/20 bg-red-500/10 px-3 py-2 text-sm text-red-600 dark:text-red-300",children:e.error}):e.data?.credits?.length?(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between rounded-xl 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)("span",{children:[e.data.credits.length," reset credit",1===e.data.credits.length?"":"s"]}),(0,a.jsxs)("span",{children:[e.data.availableCount??0," available"]})]}),(0,a.jsx)("div",{className:"overflow-x-auto rounded-xl border border-border",children:(0,a.jsxs)("table",{className:"w-full min-w-[560px] text-left text-sm",children:[(0,a.jsx)("thead",{className:"bg-black/[0.03] text-xs uppercase tracking-wide text-text-muted dark:bg-white/[0.04]",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"px-3 py-2 font-medium",children:"Status"}),(0,a.jsx)("th",{className:"px-3 py-2 font-medium",children:"Granted At"}),(0,a.jsx)("th",{className:"px-3 py-2 font-medium",children:"Expires At"}),(0,a.jsx)("th",{className:"px-3 py-2 font-medium",children:"Remaining"})]})}),(0,a.jsx)("tbody",{children:e.data.credits.map((e,t)=>(0,a.jsxs)("tr",{className:"border-t border-border-subtle",children:[(0,a.jsx)("td",{className:"px-3 py-2",children:(0,a.jsx)("span",{className:"rounded-full bg-primary/10 px-2 py-0.5 text-xs font-medium text-primary",children:e.status||"unknown"})}),(0,a.jsx)("td",{className:"px-3 py-2 text-text-muted",children:S(e.grantedAt)}),(0,a.jsx)("td",{className:"px-3 py-2 text-text-primary",children:S(e.expiresAt)}),(0,a.jsx)("td",{className:"px-3 py-2 font-medium text-text-primary",children:function(e){if(!e)return"N/A";let t=new Date(e).getTime()-Date.now();if(!Number.isFinite(t))return"N/A";if(t<=0)return"Expired";let r=Math.ceil(t/36e5),a=Math.floor(r/24),i=r%24;return a>0?`${a}d ${i}h`:`${i}h`}(e.expiresAt)})]},`${e.status}-${e.expiresAt||t}`))})]})})]}):(0,a.jsx)("div",{className:"rounded-xl border border-border bg-black/[0.02] px-3 py-8 text-center text-sm text-text-muted dark:border-white/10 dark:bg-white/[0.03]",children:"No reset credit details returned for this account."})})]})}):null}function L({icon:e,title:t,description:r}){return(0,a.jsx)(s.default,{padding:"lg",children:(0,a.jsxs)("div",{className:"text-center py-12",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[64px] text-text-muted opacity-20",children:e}),(0,a.jsx)("h3",{className:"mt-4 text-lg font-semibold text-text-primary",children:t}),(0,a.jsx)("p",{className:"mt-2 text-sm text-text-muted max-w-md mx-auto",children:r})]})})}function R(){let{quotaData:e,loading:t,errors:r,autoRefresh:s,autoPingMaps:u,refreshingAll:m,countdown:j,connectionsLoading:w,deletingId:k,togglingId:N,resettingLimitId:C,resetConfirmState:S,resetCreditsState:$,showEditModal:q,selectedConnection:E,proxyPools:D,providerFilter:M,providerOptions:O,accountFilter:I,quotaSortMode:R,expiringFirst:U,providerMenuOpen:K,bulkToggling:J,page:G,pageSize:H,customPageSizeInput:V,pagination:B,setAutoRefresh:Q,setResetConfirmState:W,setResetCreditsState:Y,setShowEditModal:X,setSelectedConnection:Z,setProviderFilter:ee,setProviderMenuOpen:et,setAccountFilter:er,setQuotaSortMode:ea,setExpiringFirst:ei,setPage:es,setPageSize:en,setCustomPageSizeInput:el,refreshProvider:eo,handleResetCodexLimit:ed,handleViewCodexResetCredits:ec,handleDeleteConnection:eu,handleToggleConnectionActive:em,handleUpdateConnection:ex,refreshAll:eh,toggleAutoPing:ep,handleDisableDepleted:eb,handleEnableAvailable:eg,sortedConnections:ef,hasEligibleConnections:ey,hasVisibleConnections:ev,emptyState:ej,connectionsPageSummary:ew}=function(){let[e,t]=(0,A.useState)([]),[r,a]=(0,A.useState)({}),[i,s]=(0,A.useState)({}),[n,u]=(0,A.useState)({}),[m,j]=(0,A.useState)(!0),[w,k]=(0,A.useState)({claude:{},codex:{}}),[N,C]=(0,A.useState)(null),[S,$]=(0,A.useState)(!1),[q,E]=(0,A.useState)(!1),[T,D]=(0,A.useState)(60),[M,O]=(0,A.useState)(!0),[I,F]=(0,A.useState)(null),[_,z]=(0,A.useState)(null),[L,R]=(0,A.useState)(null),[U,K]=(0,A.useState)(null),[J,G]=(0,A.useState)(null),[H,V]=(0,A.useState)(!1),[B,Q]=(0,A.useState)(null),[W,Y]=(0,A.useState)([]),[X,Z]=(0,A.useState)("all"),[ee,et]=(0,A.useState)([]),[er,ea]=(0,A.useState)("all"),[ei,es]=(0,A.useState)("default"),[en,el]=(0,A.useState)(!1),[eo,ed]=(0,A.useState)(!1),[ec,eu]=(0,A.useState)(!1),[em,ex]=(0,A.useState)(1),[eh,ep]=(0,A.useState)(20),[eb,eg]=(0,A.useState)(String(20)),[ef,ey]=(0,A.useState)({page:1,pageSize:20,total:0,totalPages:1}),[ev,ej]=(0,A.useState)({eligibleConnections:0,providerFilteredConnections:0}),ew=(0,A.useRef)(null),ek=(0,A.useRef)(null),eN=(0,A.useRef)(0),eC=(0,A.useCallback)(async(e=em)=>{try{var r,a;let i=new URLSearchParams({page:String(e),pageSize:String(eh),accountStatus:er,sort:"priority"});"all"!==X&&i.set("provider",X);let s=await fetch(`/api/providers/client?${i.toString()}`);if(!s.ok)throw Error("Failed to fetch connections");let n=await s.json(),l=n.connections||[],o=(r=n.pagination,r||{page:1,pageSize:eh,total:0,totalPages:1}),d=function(e,t=0){return e||{eligibleConnections:t,providerFilteredConnections:t}}(n.totals,l.length);return t(l),et(n.providerOptions||[]),ey(o),ej(d),ex((a=n.pagination,a?.page||e)),l}catch(e){return console.error("Error fetching connections:",e),t([]),et([]),ey({page:1,pageSize:eh,total:0,totalPages:1}),ej({eligibleConnections:0,providerFilteredConnections:0}),[]}},[er,en,em,eh,X]),eS=(0,A.useCallback)(async(e,t)=>{s(t=>({...t,[e]:!0})),u(t=>({...t,[e]:null}));try{console.log(`[ProviderLimits] Fetching quota for ${t} (${e})`);let r=await fetch(`/api/usage/${e}`);if(!r.ok){let i=(await r.json().catch(()=>({}))).error||r.statusText;if(404===r.status)return void console.warn(`[ProviderLimits] Connection not found for ${t}, skipping`);if(401===r.status){console.warn(`[ProviderLimits] Auth error for ${t}:`,i);let r={quotas:[],message:i};a(t=>({...t,[e]:r})),y(e,r);return}throw Error(`HTTP ${r.status}: ${i}`)}let i=await r.json();console.log(`[ProviderLimits] Got quota for ${t}:`,i);let s=i??{},n={quotas:function(e,t){if(!t||"object"!=typeof t)return[];let r=[];try{switch(e.toLowerCase()){case"github":default:t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null})});break;case"antigravity":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:t.displayName||e,modelKey:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:t.remainingPercentage})});break;case"codex":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,remaining:t.remaining,resetAt:t.resetAt||null})});break;case"kiro":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null})});break;case"qoder":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{("organization"!==e||t&&0!==(Number(t.total)||0))&&r.push({name:"user"===e?"Personal":"organization"===e?"Organization":e,used:t.used||0,total:t.total||0,unit:t.unit,resetAt:t.resetAt||null})});break;case"claude":t.message?r.push({name:"error",used:0,total:0,resetAt:null,message:t.message}):t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null})});break;case"vercel-ai-gateway":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:t.remainingPercentage})});break;case"codebuddy-cn":case"codebuddy-intl":case"workbuddy":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,recurring:!1!==t.recurring})});break;case"xai":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,remaining:t.remaining,remainingPercentage:t.remainingPercentage,resetAt:t.resetAt||null,recurring:!1,unlimited:!0===t.unlimited})}),0===r.length&&t.plan&&r.push({name:`${t.plan} (subscription)`,used:0,total:0,remainingPercentage:null,resetAt:null,recurring:!1,unlimited:!0});break;case"tokenrouter":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,remaining:t.remaining,remainingPercentage:t.remainingPercentage,resetAt:t.resetAt||null,recurring:!1,unlimited:!1})});break;case"cline":case"clinepass":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,remaining:t.remainingPercentage,remainingPercentage:t.remainingPercentage,resetAt:t.resetAt||null,recurring:!0,unlimited:!1})});break;case"infron":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,remaining:t.remaining,remainingPercentage:t.remainingPercentage,resetAt:t.resetAt||null,recurring:!1,unlimited:!1})});break;case"grok-web":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,remaining:t.remaining,remainingPercentage:t.remainingPercentage,resetAt:t.resetAt||null,recurring:!0,unlimited:!1})});break;case"kimi-desktop":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:t.name||("subscription"===e?"Subscription":e),used:t.used||0,total:t.total||0,remainingPercentage:t.remainingPercentage,resetAt:t.resetAt||null,unit:t.unit,recurring:!1!==t.recurring,unlimited:!1})});break;case"kimchi":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,remaining:t.remaining,remainingPercentage:t.remainingPercentage,resetAt:t.resetAt||null,unit:t.unit,recurring:!1!==t.recurring,unlimited:!0===t.unlimited})}),0===r.length&&t.plan&&r.push({name:`${t.plan} (subscription)`,used:0,total:0,remainingPercentage:null,resetAt:null,unlimited:!0})}}catch(t){return console.error(`Error parsing quota data for ${e}:`,t),[]}let a=(0,l.KC)(e);if(a.length>0){let e=new Map(a.map((e,t)=>[e.id,t]));r.sort((t,r)=>{let a=t.modelKey||t.name,i=r.modelKey||r.name;return(e.get(a)??999)-(e.get(i)??999)})}return r}(t,s),plan:s.plan||null,message:s.message||null,raw:i};a(t=>({...t,[e]:n})),y(e,n)}catch(r){console.error(`[ProviderLimits] Error fetching quota for ${t} (${e}):`,r),u(t=>({...t,[e]:r.message||"Failed to fetch quota"}))}finally{s(t=>({...t,[e]:!1}))}},[]),eA=(0,A.useCallback)(async(e,t)=>{await eS(e,t),C(new Date)},[eS]),eP=(0,A.useCallback)(async(e,t)=>{if("codex"===t&&!L){R(e),u(t=>({...t,[e]:null}));try{let r=await fetch(`/api/usage/${e}/codex-reset-credits`,{method:"POST"}),a=await r.json().catch(()=>({}));if(!r.ok)throw Error(a.message||a.error||a.code||"Failed to reset Codex limit");await eS(e,t),C(new Date)}catch(t){u(r=>({...r,[e]:t.message||"Failed to reset Codex limit"}))}finally{R(null)}}},[eS,L]),e$=(0,A.useCallback)(async e=>{G({connection:e,loading:!0,error:null,data:null});try{let t=await fetch(`/api/usage/${e.id}/codex-reset-credits`,{cache:"no-store"}),r=await t.json().catch(()=>({}));if(!t.ok)throw Error(r.error||r.message||"Failed to load Codex reset credits");let a=Array.isArray(r.credits)?[...r.credits]:[];a.sort((e,t)=>{let r=e.expiresAt?new Date(e.expiresAt).getTime():1/0,a=t.expiresAt?new Date(t.expiresAt).getTime():1/0;return r-a}),G({connection:e,loading:!1,error:null,data:{...r,credits:a}})}catch(t){G({connection:e,loading:!1,error:t.message||"Failed to load Codex reset credits",data:null})}},[]),eq=(0,A.useCallback)(async e=>{if(confirm("Delete this connection?")){F(e);try{if((await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok){a(t=>{let r={...t};return delete r[e],r}),s(t=>{let r={...t};return delete r[e],r}),u(t=>{let r={...t};return delete r[e],r});try{let t=f();t[e]&&(delete t[e],window.localStorage.setItem(o,JSON.stringify(t)))}catch(e){console.error("Error deleting cache entry:",e)}await g(eC,em)}}catch(e){console.error("Error deleting connection:",e)}finally{F(null)}}},[eC,em]),eE=(0,A.useCallback)(async(e,t)=>{z(e);try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&(a(e=>({...e})),await g(eC,em))}catch(e){console.error("Error updating connection status:",e)}finally{z(null)}},[eC,em]),eT=(0,A.useCallback)(async e=>{if(!B?.id)return;let t=B.id,r=B.provider;try{(await fetch(`/api/providers/${t}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await eC(),V(!1),Q(null),P.wb.includes(r)&&await eS(t,r))}catch(e){console.error("Error saving connection:",e)}},[B,eC,eS]);(0,A.useEffect)(()=>{let e=!1;return fetch("/api/proxy-pools?isActive=true",{cache:"no-store"}).then(e=>e.json()).then(t=>{!e&&t?.proxyPools&&Y(t.proxyPools)}).catch(()=>{}),()=>{e=!0}},[]);let eD=(0,A.useCallback)(async(e=!1)=>{if(q)return;E(!0),D(60);let t=eN.current+=1,r=Math.round(3);try{let i=await eC(em);s(p(i)),u(e=>b(e,i)),a(e=>b(e,i)),await Promise.all(i.filter(a=>e||"claude"!==a.provider||t%r==0).map(e=>eS(e.id,e.provider))),C(new Date)}catch(e){console.error("Error refreshing all providers:",e)}finally{E(!1)}},[q,eC,eS,em]);(0,A.useEffect)(()=>{(async()=>{O(!0);let e=await eC(em);O(!1),s(p(e)),u(t=>b(t,e)),a(t=>b(t,e)),await Promise.all(e.map(e=>eS(e.id,e.provider))),C(new Date)})()},[eC,eS,em]),(0,A.useEffect)(()=>{let e=window.localStorage.getItem(d);j(null===e||"true"===e),$(!0)},[]),(0,A.useEffect)(()=>{S&&window.localStorage.setItem(d,String(m))},[m,S]),(0,A.useEffect)(()=>{fetch("/api/settings",{cache:"no-store"}).then(e=>e.ok?e.json():{}).then(e=>k({claude:e?.claudeAutoPing?.connections||{},codex:e?.codexAutoPing?.connections||{}})).catch(()=>{})},[]);let eM=(0,A.useCallback)(async(e,t,r)=>{let a=AUTO_PING_SETTINGS_KEYS[t];if(!a)return;let i={...w[t]||{},[e]:r};k({...w,[t]:i});try{let e=await fetch("/api/settings",{cache:"no-store"}),t={...(e.ok?await e.json():{})[a]||{},connections:i};await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({[a]:t})})}catch{k(w)}},[w]);(0,A.useEffect)(()=>{if(!S||!m){ew.current&&(clearInterval(ew.current),ew.current=null),ek.current&&(clearInterval(ek.current),ek.current=null);return}return ew.current=setInterval(()=>{eD()},6e4),ek.current=setInterval(()=>{D(e=>e<=1?60:e-1)},1e3),()=>{ew.current&&clearInterval(ew.current),ek.current&&clearInterval(ek.current)}},[m,eD,S]),(0,A.useEffect)(()=>{let e=()=>{document.hidden?(ew.current&&(clearInterval(ew.current),ew.current=null),ek.current&&(clearInterval(ek.current),ek.current=null)):m&&S&&(ew.current=setInterval(()=>eD(),6e4),ek.current=setInterval(()=>{D(e=>e<=1?60:e-1)},1e3))};return document.addEventListener("visibilitychange",e),()=>{document.removeEventListener("visibilitychange",e)}},[m,eD,S]);let eO=(0,A.useMemo)(()=>(function(e,t,r,a,i){if("codex"===a&&"default"!==i)return[...e].sort((e,r)=>{let a=h(e,t),s=h(r,t),n="remaining-asc"===i?a-s:s-a;return 0!==n?n:(x(e)||"").localeCompare(x(r)||"")});if(!r)return e;let s=e=>{let r=(t[e.id]?.quotas||[]).map(e=>e.resetAt?new Date(e.resetAt).getTime():1/0).filter(e=>Number.isFinite(e));return r.length>0?Math.min(...r):1/0};return[...e].sort((e,t)=>{let r=s(e)-s(t);return 0!==r?r:(e.provider||"").localeCompare(t.provider||"")||(x(e)||"").localeCompare(x(t)||"")})})(e,r,en,X,ei),[e,r,en,X,ei]),eI=e=>{let t=r[e.id]?.quotas;return!!t?.length&&t.some(e=>!!e.total&&!(e.total<=0)&&5>=v(e.used,e.total))},eF=(0,A.useCallback)(async(e,t)=>{if(e.length&&!ec){eu(!0);try{await Promise.all(e.map(e=>fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})}))),await g(eC,em)}catch(e){console.error("Error bulk toggling connections:",e)}finally{eu(!1)}}},[ec,eC,em]),e_="all"===X?"All providers":X,ez=ev.eligibleConnections>0,eL=eO.length>0,eR=ev.eligibleConnections?ev.providerFilteredConnections?{icon:"filter_alt_off",title:"No Accounts On This Page",description:"Try moving to another page or refreshing the current filters."}:{icon:"filter_alt_off",title:"No Accounts Match Current Filters",description:"all"===X?"Try changing the account status filter to see more quota trackers.":`No ${"inactive"===er?"turned off":"active"===er?"active":"matching"} accounts found for ${X}.`}:{icon:"cloud_off",title:"No Providers Connected",description:"Connect to providers with OAuth to track your API quota limits and usage."},eU=function(e){var t;let{start:r,end:a}=(t=e).total?{start:(t.page-1)*t.pageSize+1,end:Math.min(t.page*t.pageSize,t.total)}:{start:0,end:0};return`Showing ${r}-${a} of ${e.total}`}(ef),eK=!c.includes(eh),eJ=eK?`Custom: ${eh} / page`:`${eh} / page`;return{connections:e,quotaData:r,loading:i,errors:n,autoRefresh:m,autoPingMaps:w,lastUpdated:N,hasHydratedAutoRefresh:S,refreshingAll:q,countdown:T,connectionsLoading:M,deletingId:I,togglingId:_,resettingLimitId:L,resetConfirmState:U,resetCreditsState:J,showEditModal:H,selectedConnection:B,proxyPools:W,providerFilter:X,providerOptions:ee,accountFilter:er,quotaSortMode:ei,expiringFirst:en,providerMenuOpen:eo,bulkToggling:ec,page:em,pageSize:eh,customPageSizeInput:eb,pagination:ef,totals:ev,setAutoRefresh:j,setResetConfirmState:K,setResetCreditsState:G,setShowEditModal:V,setSelectedConnection:Q,setProviderFilter:Z,setProviderMenuOpen:ed,setAccountFilter:ea,setQuotaSortMode:es,setExpiringFirst:el,setPage:ex,setPageSize:ep,setCustomPageSizeInput:eg,refreshProvider:eA,handleResetCodexLimit:eP,handleViewCodexResetCredits:e$,handleDeleteConnection:eq,handleToggleConnectionActive:eE,handleUpdateConnection:eT,refreshAll:eD,toggleAutoPing:eM,handleDisableDepleted:()=>{eF(eO.filter(e=>(e.isActive??!0)&&eI(e)).map(e=>e.id),!1)},handleEnableAvailable:()=>{eF(eO.filter(e=>!(e.isActive??!0)&&!eI(e)).map(e=>e.id),!0)},sortedConnections:eO,isConnectionDepleted:eI,selectedProviderLabel:e_,hasEligibleConnections:ez,hasVisibleConnections:eL,emptyState:eR,connectionsPageSummary:eU,isCustomPageSize:eK,pageSizeLabel:eJ}}();return w||ey?w||ev?(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsx)(i.default,{title:"Quota",description:"Capacity, resets, and account availability",icon:"data_usage"}),(0,a.jsx)(T,{providerFilter:M,providerOptions:O,providerMenuOpen:K,onToggleProviderMenu:()=>et(e=>!e),onSelectProvider:e=>{M!==e&&es(1),ee(e),et(!1)},accountFilter:I,onAccountFilterChange:e=>{I!==e&&es(1),er(e)},quotaSortMode:R,onQuotaSortModeChange:ea,expiringFirst:U,onToggleExpiringFirst:()=>ei(e=>!e),autoRefresh:s,onToggleAutoRefresh:()=>Q(e=>!e),countdown:j,bulkToggling:J,onDisableDepleted:eb,onEnableAvailable:eg,refreshingAll:m,onRefreshAll:eh}),U&&(0,a.jsx)("div",{className:"rounded-xl border border-amber-500/20 bg-warning/10 px-3 py-2 text-xs text-amber-700 dark:text-amber-300",children:"Expiring-first currently reorders accounts inside the current page. Cross-page ordering still follows backend pagination."}),(0,a.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:ef.map(i=>(0,a.jsx)(F,{conn:i,quota:e[i.id],isLoading:t[i.id],error:r[i.id],autoPingMaps:u,quotaSortMode:R,resettingLimitId:C,deletingId:k,togglingId:N,onRefresh:eo,onEdit:e=>{Z(e),X(!0)},onDelete:eu,onToggleActive:em,onRequestReset:(e,t)=>W({connection:e,resetCreditCount:t}),onViewResetCredits:ec,onToggleAutoPing:ep},i.id))}),(0,a.jsx)(_,{pagination:B,pageSize:H,customPageSizeInput:V,connectionsLoading:w,refreshingAll:m,connectionsPageSummary:ew,setPage:es,onPageSizeSelect:e=>{if("custom"===e)return;let t=Number.parseInt(e,10);Number.isFinite(t)&&(es(1),en(t),el(String(t)))},onCustomPageSizeInputChange:el,onCommitCustomPageSize:()=>{let e=Number.parseInt(V,10);if(!Number.isFinite(e))return void el(String(H));let t=Math.min(500,Math.max(1,e));es(1),en(t),el(String(t))}}),(0,a.jsx)(n.uo,{isOpen:!!S,onClose:()=>{C||W(null)},onConfirm:async()=>{let e=S?.connection;e&&(await ed(e.id,e.provider),W(null))},title:"Reset Codex limit?",message:`Use 1 Codex reset credit for ${x(S?.connection||{})||"this account"}. This cannot be undone. Remaining credits: ${S?.resetCreditCount??0}.`,confirmText:"Reset limit",cancelText:"Cancel",variant:"danger",loading:!!C}),(0,a.jsx)(z,{state:$,onClose:()=>Y(null)}),(0,a.jsx)(n.wI,{isOpen:q,connection:E,proxyPools:D,onSave:ex,onClose:()=>{X(!1),Z(null)}})]}):(0,a.jsx)(L,{icon:ej.icon,title:ej.title,description:ej.description}):(0,a.jsx)(L,{icon:"cloud_off",title:"No Providers Connected",description:"Connect to providers with OAuth to track your API quota limits and usage."})}},96133:(e,t,r)=>{Promise.resolve().then(r.bind(r,15670)),Promise.resolve().then(r.bind(r,25086))}},e=>{e.O(0,[27,9497,705,1321,5497,8441,3794,7358],()=>e(e.s=96133)),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9516],{25023:(e,t,i)=>{Promise.resolve().then(i.bind(i,64082))},64082:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>b});var s=i(95155),r=i(35497),n=i(11059);let a="rsalmn/extremerouter",o="master",l="skills",c=`https://github.com/${a}`,d=`https://raw.githubusercontent.com/${a}/refs/heads/${o}/${l}`,m=`https://github.com/${a}/blob/${o}/${l}`,x=[{id:"@rsalmn/extremerouter",name:"ExtremeRouter (Entry)",description:"Setup + index of all capabilities. Start here — covers base URL, auth, model discovery, and links to every capability skill.",endpoint:null,icon:"hub",isEntry:!0},{id:"extremerouter-chat",name:"Chat",description:"Chat / code-gen via OpenAI or Anthropic format with streaming.",endpoint:"/v1/chat/completions",icon:"chat"},{id:"extremerouter-image",name:"Image Generation",description:"Text-to-image via DALL-E, Imagen, FLUX, MiniMax, SDWebUI…",endpoint:"/v1/images/generations",icon:"image"},{id:"extremerouter-tts",name:"Text-to-Speech",description:"OpenAI / ElevenLabs / Edge / Google / Deepgram voices.",endpoint:"/v1/audio/speech",icon:"record_voice_over"},{id:"extremerouter-stt",name:"Speech-to-Text",description:"Transcribe audio via OpenAI Whisper, Groq, Gemini, Deepgram, AssemblyAI…",endpoint:"/v1/audio/transcriptions",icon:"mic"},{id:"extremerouter-embeddings",name:"Embeddings",description:"Vectors for RAG / semantic search via OpenAI, Gemini, Mistral…",endpoint:"/v1/embeddings",icon:"scatter_plot"},{id:"extremerouter-web-search",name:"Web Search",description:"Tavily / Exa / Brave / Serper / SearXNG / Google PSE / You.com.",endpoint:"/v1/search",icon:"search"},{id:"extremerouter-web-fetch",name:"Web Fetch",description:"URL → markdown / text / HTML via Firecrawl, Jina, Tavily, Exa.",endpoint:"/v1/web/fetch",icon:"language"}];function p(e){return`${d}/${e}/SKILL.md`}function h({value:e,label:t="Copy link"}){let{copied:i,copy:r}=(0,n.C)(2e3);return(0,s.jsxs)("button",{onClick:()=>r(e),className:"px-2 py-1 rounded-md bg-primary text-white text-[11px] font-medium hover:bg-primary/90 transition-colors cursor-pointer shrink-0 inline-flex items-center gap-1",title:e,children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:i?"check":"content_copy"}),i?"Copied!":t]})}function u({skill:e}){var t;let i=p(e.id);return(0,s.jsxs)("div",{className:`flex items-start gap-3 p-4 rounded-[14px] border shadow-[var(--shadow-soft)] transition-colors ${e.isEntry?"border-brand-500/40 bg-brand-500/5":"border-border-subtle bg-surface hover:bg-surface-2"}`,children:[(0,s.jsx)("div",{className:`size-9 rounded-lg flex items-center justify-center shrink-0 ${e.isEntry?"bg-primary text-white":"bg-primary/10 text-primary"}`,children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:e.icon})}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,s.jsx)("h3",{className:"font-semibold text-sm text-text-main",children:e.name}),e.isEntry&&(0,s.jsx)(r.Ex,{variant:"primary",size:"sm",children:"START HERE"}),e.endpoint&&(0,s.jsx)(r.Ex,{variant:"default",size:"sm",children:(0,s.jsx)("code",{className:"text-[10px]",children:e.endpoint})})]}),(0,s.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:e.description}),(0,s.jsxs)("a",{href:(t=e.id,`${m}/${t}/SKILL.md`),target:"_blank",rel:"noreferrer",className:"text-[11px] text-text-muted hover:text-primary mt-1 inline-flex items-center gap-1 break-all",children:[i,(0,s.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"open_in_new"})]})]}),(0,s.jsx)(h,{value:i})]})}function b(){return(0,s.jsxs)("div",{className:"mx-auto max-w-4xl space-y-6",children:[(0,s.jsx)(r.zY,{title:"Skills",description:"Reusable agent skills and install links",icon:"extension"}),(0,s.jsxs)(r.Zp,{padding:"md",children:[(0,s.jsx)("div",{className:"text-xs text-text-muted mb-2",children:"Paste this to your AI:"}),(0,s.jsxs)("div",{className:"px-3 py-2 rounded bg-surface-2 font-mono text-[12px] text-text-main",children:["Read this skill and use it: ",p("@rsalmn/extremerouter")]})]}),(0,s.jsx)("div",{className:"space-y-2",children:x.map(e=>(0,s.jsx)(u,{skill:e},e.id))}),(0,s.jsx)(r.Zp,{padding:"md",children:(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3 flex-wrap",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-text-main",children:"More on GitHub"}),(0,s.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:"Browse source, README, and examples."})]}),(0,s.jsxs)("a",{href:`${c}/tree/master/skills`,target:"_blank",rel:"noreferrer",className:"text-sm text-primary hover:underline inline-flex items-center gap-1",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"open_in_new"}),"View on GitHub"]})]})})]})}}},e=>{e.O(0,[27,
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9516],{25023:(e,t,i)=>{Promise.resolve().then(i.bind(i,64082))},64082:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>b});var s=i(95155),r=i(35497),n=i(11059);let a="rsalmn/extremerouter",o="master",l="skills",c=`https://github.com/${a}`,d=`https://raw.githubusercontent.com/${a}/refs/heads/${o}/${l}`,m=`https://github.com/${a}/blob/${o}/${l}`,x=[{id:"@rsalmn/extremerouter",name:"ExtremeRouter (Entry)",description:"Setup + index of all capabilities. Start here — covers base URL, auth, model discovery, and links to every capability skill.",endpoint:null,icon:"hub",isEntry:!0},{id:"extremerouter-chat",name:"Chat",description:"Chat / code-gen via OpenAI or Anthropic format with streaming.",endpoint:"/v1/chat/completions",icon:"chat"},{id:"extremerouter-image",name:"Image Generation",description:"Text-to-image via DALL-E, Imagen, FLUX, MiniMax, SDWebUI…",endpoint:"/v1/images/generations",icon:"image"},{id:"extremerouter-tts",name:"Text-to-Speech",description:"OpenAI / ElevenLabs / Edge / Google / Deepgram voices.",endpoint:"/v1/audio/speech",icon:"record_voice_over"},{id:"extremerouter-stt",name:"Speech-to-Text",description:"Transcribe audio via OpenAI Whisper, Groq, Gemini, Deepgram, AssemblyAI…",endpoint:"/v1/audio/transcriptions",icon:"mic"},{id:"extremerouter-embeddings",name:"Embeddings",description:"Vectors for RAG / semantic search via OpenAI, Gemini, Mistral…",endpoint:"/v1/embeddings",icon:"scatter_plot"},{id:"extremerouter-web-search",name:"Web Search",description:"Tavily / Exa / Brave / Serper / SearXNG / Google PSE / You.com.",endpoint:"/v1/search",icon:"search"},{id:"extremerouter-web-fetch",name:"Web Fetch",description:"URL → markdown / text / HTML via Firecrawl, Jina, Tavily, Exa.",endpoint:"/v1/web/fetch",icon:"language"}];function p(e){return`${d}/${e}/SKILL.md`}function h({value:e,label:t="Copy link"}){let{copied:i,copy:r}=(0,n.C)(2e3);return(0,s.jsxs)("button",{onClick:()=>r(e),className:"px-2 py-1 rounded-md bg-primary text-white text-[11px] font-medium hover:bg-primary/90 transition-colors cursor-pointer shrink-0 inline-flex items-center gap-1",title:e,children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:i?"check":"content_copy"}),i?"Copied!":t]})}function u({skill:e}){var t;let i=p(e.id);return(0,s.jsxs)("div",{className:`flex items-start gap-3 p-4 rounded-[14px] border shadow-[var(--shadow-soft)] transition-colors ${e.isEntry?"border-brand-500/40 bg-brand-500/5":"border-border-subtle bg-surface hover:bg-surface-2"}`,children:[(0,s.jsx)("div",{className:`size-9 rounded-lg flex items-center justify-center shrink-0 ${e.isEntry?"bg-primary text-white":"bg-primary/10 text-primary"}`,children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:e.icon})}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,s.jsx)("h3",{className:"font-semibold text-sm text-text-main",children:e.name}),e.isEntry&&(0,s.jsx)(r.Ex,{variant:"primary",size:"sm",children:"START HERE"}),e.endpoint&&(0,s.jsx)(r.Ex,{variant:"default",size:"sm",children:(0,s.jsx)("code",{className:"text-[10px]",children:e.endpoint})})]}),(0,s.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:e.description}),(0,s.jsxs)("a",{href:(t=e.id,`${m}/${t}/SKILL.md`),target:"_blank",rel:"noreferrer",className:"text-[11px] text-text-muted hover:text-primary mt-1 inline-flex items-center gap-1 break-all",children:[i,(0,s.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"open_in_new"})]})]}),(0,s.jsx)(h,{value:i})]})}function b(){return(0,s.jsxs)("div",{className:"mx-auto max-w-4xl space-y-6",children:[(0,s.jsx)(r.zY,{title:"Skills",description:"Reusable agent skills and install links",icon:"extension"}),(0,s.jsxs)(r.Zp,{padding:"md",children:[(0,s.jsx)("div",{className:"text-xs text-text-muted mb-2",children:"Paste this to your AI:"}),(0,s.jsxs)("div",{className:"px-3 py-2 rounded bg-surface-2 font-mono text-[12px] text-text-main",children:["Read this skill and use it: ",p("@rsalmn/extremerouter")]})]}),(0,s.jsx)("div",{className:"space-y-2",children:x.map(e=>(0,s.jsx)(u,{skill:e},e.id))}),(0,s.jsx)(r.Zp,{padding:"md",children:(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3 flex-wrap",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-text-main",children:"More on GitHub"}),(0,s.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:"Browse source, README, and examples."})]}),(0,s.jsxs)("a",{href:`${c}/tree/master/skills`,target:"_blank",rel:"noreferrer",className:"text-sm text-primary hover:underline inline-flex items-center gap-1",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"open_in_new"}),"View on GitHub"]})]})})]})}}},e=>{e.O(0,[27,9497,705,1321,5497,8441,3794,7358],()=>e(e.s=25023)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1372],{16688:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>q,dynamic:()=>A});var r=s(95155),a=s(12115),l=s(54960),n=s(56061),i=s(99312),o=s(31474);let d={tool_calling:{label:"Tool Calling",variant:"cyan",icon:"construction",desc:"tools / tool_choice / functions detected → routed only to tool-capable non-cookie models"},tool_calling_pool_empty_fallback:{label:"Tool Pool Empty",variant:"warning",icon:"construction",desc:"no tool-capable member in combo → used the full pool with a warning"},research_cookie_primary:{label:"Research → Cookie Pool",variant:"info",icon:"travel_explore",desc:"research intent → cookie providers tried first, normal pool as fallback"},research_cookie_pool_empty:{label:"Research (No Cookies)",variant:"warning",icon:"travel_explore",desc:"research intent but no cookie provider in combo → default order"},general:{label:"General",variant:"default",icon:"route",desc:"no tool-calling, no research intent → default fallback chain"}},c={keyword:"keyword match",url:"URL detected",none:"no signal",empty:"empty prompt"};function x(e){return"done"===e?"success":"running"===e?"info":"error"===e?"error":"default"}function m(e){return"done"===e?"Done":"running"===e?"Routing…":"error"===e?"Error":"Pending"}function u(e){return e||0===e?e<1e3?`${e}ms`:`${(e/1e3).toFixed(1)}s`:"—"}function p(e){if(!e)return null;let t=c[e.signal]||e.signal||"no signal",s=Number.isFinite(e.confidence)?Math.round(100*e.confidence):null;return"classifier"===e.source?`classifier ${e.classifierModel||"?"} → ${e.intent} (heuristic: ${t}${null!=s?`, ${s}%`:""})`:`${t}${null!=s?` (${s}% confidence)`:""} → ${e.intent}`}function h({model:e,index:t,blocked:s=!1,muted:a=!1,risk:l=!1}){return(0,r.jsxs)("div",{title:l?`${e} fails frequently in production (30d)`:void 0,className:(0,o.cn)("flex items-center gap-2 rounded-md border px-2.5 py-1.5 font-mono text-xs",s?"border-danger/30 bg-danger/5 text-text-muted line-through decoration-danger/60":a?"border-border-subtle bg-surface-2 text-text-subtle":l?"border-danger/30 bg-danger/5 text-danger":"border-border-subtle bg-surface-2 text-text-muted"),children:[null!=t&&(0,r.jsxs)("span",{className:"text-[10px] text-text-subtle",children:["#",t]}),(0,r.jsx)("span",{className:"truncate max-w-[200px]",children:e}),s&&(0,r.jsx)("span",{className:"material-symbols-outlined text-[13px] text-danger",children:"block"}),l&&(0,r.jsx)("span",{className:"material-symbols-outlined text-[13px] text-danger",children:"warning"})]})}function b({routing:e,servedModel:t,pendingLabel:s="Resolving routing decision…"}){if(!e)return(0,r.jsxs)("div",{className:"flex items-center gap-2 px-4 py-3 text-xs text-text-muted",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px] animate-spin",children:"progress_activity"}),s]});let a=d[e.reason]||d.general;return(0,r.jsxs)("div",{className:"flex flex-col gap-3 px-4 py-3",children:[(0,r.jsxs)("div",{className:"flex items-start gap-2.5",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px] text-text-subtle",children:a.icon}),(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,r.jsx)(n.default,{variant:a.variant,size:"sm",children:a.label}),e.intent&&(0,r.jsx)("span",{className:"text-[11px] text-text-subtle",children:p(e.intent)})]}),(0,r.jsx)("p",{className:"mt-1 text-xs text-text-muted",children:a.desc})]})]}),e.order?.length>0&&(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"mb-1.5 text-[11px] font-semibold uppercase tracking-wide text-text-muted",children:["Selected pool ",(0,r.jsx)("span",{className:"font-normal normal-case",children:"(fallback order)"})]}),(0,r.jsx)("div",{className:"flex flex-wrap gap-2",children:e.order.map((e,t)=>(0,r.jsx)(h,{model:e,index:t+1},t))})]}),"research_cookie_primary"===e.reason&&(0,r.jsxs)("div",{className:"grid gap-2 sm:grid-cols-2",children:[e.cookiePool?.length>0&&(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"mb-1.5 text-[11px] font-semibold uppercase tracking-wide text-text-muted",children:"Cookie pool (first)"}),(0,r.jsx)("div",{className:"flex flex-wrap gap-2",children:e.cookiePool.map((e,t)=>(0,r.jsx)(h,{model:e},t))})]}),e.normalPool?.length>0&&(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"mb-1.5 text-[11px] font-semibold uppercase tracking-wide text-text-muted",children:"Normal pool (fallback)"}),(0,r.jsx)("div",{className:"flex flex-wrap gap-2",children:e.normalPool.map((e,t)=>(0,r.jsx)(h,{model:e,muted:!0},t))})]})]}),e.excludedCookies?.length>0&&(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"mb-1.5 text-[11px] font-semibold uppercase tracking-wide text-text-muted",children:["Excluded cookie providers ",(0,r.jsx)("span",{className:"font-normal normal-case",children:"(no tool calling)"})]}),(0,r.jsx)("div",{className:"flex flex-wrap gap-2",children:e.excludedCookies.map((e,t)=>(0,r.jsx)(h,{model:e,blocked:!0},t))})]}),t&&(0,r.jsxs)("div",{className:"flex items-center gap-2 border-t border-border-subtle pt-2.5",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px] text-success",children:"check_circle"}),(0,r.jsx)("span",{className:"text-xs text-text-muted",children:"Served by"}),(0,r.jsx)("span",{className:"truncate font-mono text-xs font-medium text-text-main",children:t})]})]})}function g(){let[e,t]=(0,a.useState)([]),[s,l]=(0,a.useState)(!1),[,d]=(0,a.useState)(0);(0,a.useEffect)(()=>{let e=new EventSource("/api/smart-routing/stream");return e.onopen=()=>l(!0),e.onerror=()=>l(!1),e.onmessage=e=>{try{let s=JSON.parse(e.data);t(e=>"snapshot"===s.type&&Array.isArray(s.runs)?s.runs:s.runId?"smart:start"===s.type?[{runId:s.runId,comboName:s.comboName,promptPreview:s.promptPreview,routing:null,servedModel:null,status:"running",error:null,startedAt:Date.now(),totalDurationMs:null},...e].slice(0,50):e.map(e=>{if(e.runId!==s.runId)return e;let t={...e};return"smart:route"===s.type?t.routing=s.routing:"smart:served"===s.type?t.servedModel=s.servedModel:"smart:complete"===s.type?(t.status="done",t.totalDurationMs=s.totalDurationMs):"smart:error"===s.type&&(t.status="error",t.error=s.error,t.totalDurationMs=s.totalDurationMs),t}):e)}catch{}},()=>e.close()},[]),(0,a.useEffect)(()=>{let e=setInterval(()=>d(e=>e+1),3e4);return()=>clearInterval(e)},[]);let c=e.filter(e=>"running"===e.status),x=e.filter(e=>"running"!==e.status);return(0,r.jsxs)("div",{className:"flex flex-col gap-5",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 text-sm text-text-muted",children:[(0,r.jsx)("span",{className:(0,o.cn)("size-2 rounded-full",s?"bg-success animate-pulse":"bg-danger")}),s?"Live":"Reconnecting…"]}),c.length>0&&(0,r.jsxs)(n.default,{variant:"info",dot:!0,children:[c.length," active run",c.length>1?"s":""]})]}),0===e.length?(0,r.jsx)(i.default,{icon:"alt_route",title:"No smart-routing runs yet",description:"Routing decisions will appear here in real time. Send a request to a combo with the 'Smart Routing' strategy to see the reason, selected pool and excluded cookie providers per request."}):(0,r.jsxs)(r.Fragment,{children:[c.length>0&&(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)("h3",{className:"text-xs font-semibold uppercase tracking-wide text-text-muted",children:"Active"}),c.map(e=>(0,r.jsx)(f,{run:e,expanded:!0},e.runId))]}),x.length>0&&(0,r.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,r.jsx)("h3",{className:"text-xs font-semibold uppercase tracking-wide text-text-muted",children:"Recent"}),x.slice(0,10).map(e=>(0,r.jsx)(f,{run:e},e.runId))]})]})]})}function f({run:e,expanded:t=!1}){return(0,r.jsxs)("div",{className:(0,o.cn)("rounded-panel border bg-panel shadow-[var(--shadow-soft)]","error"===e.status?"border-danger/30":"border-border-subtle"),children:[(0,r.jsxs)("div",{className:"flex items-center justify-between gap-3 border-b border-border-subtle px-4 py-3",children:[(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,r.jsx)(n.default,{variant:x(e.status),dot:!0,size:"sm",children:m(e.status)}),(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("div",{className:"truncate font-mono text-sm font-medium text-text-main",children:e.comboName||"smart-routing"}),(0,r.jsx)("div",{className:"truncate text-xs text-text-muted",children:function(e){if(!e)return"—";let t=Date.now()-e;return t<5e3?"just now":t<6e4?`${Math.floor(t/1e3)}s ago`:t<36e5?`${Math.floor(t/6e4)}m ago`:new Date(e).toLocaleTimeString()}(e.startedAt)})]})]}),(0,r.jsxs)("div",{className:"flex shrink-0 items-center gap-3 text-xs text-text-muted",children:[e.totalDurationMs&&(0,r.jsx)("span",{className:"font-mono",children:u(e.totalDurationMs)}),e.routing?.order?.length>0&&(0,r.jsxs)("span",{className:"flex items-center gap-1",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"alt_route"}),e.routing.order.length," pool"]})]})]}),e.promptPreview&&(0,r.jsx)("div",{className:"border-b border-border-subtle px-4 py-2",children:(0,r.jsx)("p",{className:"truncate text-xs text-text-muted",children:e.promptPreview})}),(0,r.jsx)(b,{routing:e.routing,servedModel:e.servedModel}),"error"===e.status&&e.error&&(0,r.jsx)("div",{className:"border-t border-danger/20 bg-danger/5 px-4 py-2",children:(0,r.jsx)("p",{className:"text-xs text-danger",children:e.error})})]})}var j=s(84588),N=s(92542);async function v(e){let t=null;try{t=await e.json()}catch{let s=await e.text().catch(()=>"");t=s?{error:s.slice(0,300)}:null}if(!e.ok)throw Error(t?.error||`Request failed with status ${e.status}`);return t}let y={fallback:{label:"Fallback",icon:"format_list_numbered",desc:"Plain ordered chain — member 1 first, then 2, … until one answers.",variant:"default"},"smart-routing":{label:"Smart Routing",icon:"alt_route",desc:"Tool-calling → API models only \xb7 Research → cookie pool first \xb7 else default chain.",variant:"info"},swarm:{label:"Hierarchical Swarm",icon:"hub",desc:"Gatekeeper triage → manager strategy → parallel workers → staff audit → manager synthesis.",variant:"primary"}},w=new Set(["tool_calling","tool_calling_pool_empty_fallback"]);function k(e){return null!=e&&Number.isFinite(e)?0===e?"$0":e<.001?`$${e.toPrecision(2)}`:`$${e.toFixed(4).replace(/\.?0+$/,"")}`:"—"}function S(e){return e?e.min===e.max?`${e.min}`:`${e.min}–${e.max}`:"—"}let C={served:{label:"✓ Matched",variant:"success"},different:{label:"Different",variant:"warning"},failed:{label:"No answer",variant:"error"},no_data:{label:"No data",variant:null}};function _({entry:e}){if(!e)return null;let t=C[e.match]||C.no_data;return t.variant?(0,r.jsx)(n.default,{variant:t.variant,size:"sm",children:t.label}):(0,r.jsx)("span",{className:"text-xs text-text-subtle",children:"No data"})}function M({compareRun:e,onRunConsumed:t}){let[s,l]=(0,a.useState)([]),[n,i]=(0,a.useState)(""),[d,c]=(0,a.useState)(""),[x,m]=(0,a.useState)(!1),[u,p]=(0,a.useState)(1e3),[h,b]=(0,a.useState)(["fallback","smart-routing","swarm"]),[g,f]=(0,a.useState)(null),[k,S]=(0,a.useState)(!1),[C,_]=(0,a.useState)(null),[P,z]=(0,a.useState)(null),D=(0,a.useRef)(null),I=(0,a.useRef)(e);(0,a.useEffect)(()=>{let e=!1;return fetch("/api/smart-routing/history?pageSize=50").then(v).then(t=>{e||l(t.runs||[])}).catch(()=>{}),()=>{e=!0}},[]);let $=(0,a.useCallback)(e=>{e&&(i(e.runId),c(e.lastUserMessage||e.promptPreview||""),m(w.has(e.routing?.reason)))},[]),F=(0,a.useCallback)(async(e,t={})=>{let s=void 0!==t.prompt?t.prompt:e?e.lastUserMessage||e.promptPreview||"":d,r=void 0!==t.hadTools?t.hadTools:e?w.has(e.routing?.reason):x,a=h.filter(e=>y[e]);if(0===a.length)return void _("Select at least one strategy to compare");if(!s.trim())return void _("Enter a prompt (or pick a request from history)");S(!0),_(null),D.current={prompt:s,hadTools:r,inputTokens:u,runId:e?.runId||null};try{let t=await fetch("/api/smart-routing/lab",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({runId:e?.runId||null,prompt:s,hadTools:r,strategies:a,inputTokens:u})}),l=await v(t);f(l)}catch(e){console.error("Lab comparison failed:",e),_(e?.message||"Lab comparison failed — server unreachable"),f(null)}finally{S(!1)}},[d,x,u,h]);return(0,a.useEffect)(()=>{e&&e.runId!==I.current?.runId&&(I.current=e,$(e),F(e),t?.())},[e,$,F,t]),(0,r.jsxs)(j.default,{padding:"lg",children:[(0,r.jsxs)("div",{className:"mb-4 flex items-center gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px] text-primary",children:"science"}),(0,r.jsx)("h2",{className:"text-base font-semibold text-text-main",children:"A/B Lab — Strategy Comparison"}),(0,r.jsx)("span",{className:"text-xs text-text-muted",children:"Simulate fallback vs smart-routing vs swarm on the same request"})]}),(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-[280px_1fr]",children:[(0,r.jsxs)("div",{className:"flex min-w-0 flex-col gap-2",children:[(0,r.jsx)("label",{htmlFor:"lab-run-picker",className:"text-sm font-medium text-text-main",children:"Request from history"}),(0,r.jsxs)("select",{id:"lab-run-picker",value:n,onChange:e=>{var t;let r;return i(t=e.target.value),void((r=s.find(e=>e.runId===t))&&($(r),F(r)))},className:"h-9 w-full cursor-pointer rounded-lg border border-border bg-surface-2 px-3 text-sm text-text-main focus:outline-none focus:ring-2 focus:ring-primary/20",children:[(0,r.jsx)("option",{value:"",children:"— select a past request —"}),s.map(e=>(0,r.jsxs)("option",{value:e.runId,children:[e.comboName||"unknown combo"," \xb7 ",(e.promptPreview||"").slice(0,60)||"no preview"]},e.runId))]}),0===s.length&&(0,r.jsx)("p",{className:"text-xs text-text-muted",children:"No history yet — type a prompt below instead."})]}),(0,r.jsxs)("div",{className:"flex min-w-0 flex-col gap-2",children:[(0,r.jsx)("label",{htmlFor:"lab-prompt",className:"text-sm font-medium text-text-main",children:"Prompt (editable)"}),(0,r.jsx)("textarea",{id:"lab-prompt",value:d,onChange:e=>c(e.target.value),rows:2,placeholder:"e.g. research the latest AI trends and cite sources…",className:"w-full resize-y rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm text-text-main focus:outline-none focus:ring-2 focus:ring-primary/20"})]})]}),(0,r.jsxs)("div",{className:"mt-4 flex flex-wrap items-end gap-x-8 gap-y-3",children:[(0,r.jsxs)("label",{className:"flex cursor-pointer items-center gap-2 text-sm text-text-main",children:[(0,r.jsx)("input",{type:"checkbox",checked:x,onChange:e=>m(e.target.checked),className:"h-4 w-4 accent-primary"}),"Simulate tool-calling request (tools[])"]}),(0,r.jsxs)("label",{className:"flex items-center gap-2 text-sm text-text-main",children:["Input tokens",(0,r.jsx)("input",{type:"number",min:1,value:u,onChange:e=>p(Math.max(1,Number(e.target.value)||1)),className:"h-9 w-24 rounded-lg border border-border bg-surface-2 px-3 text-sm text-text-main focus:outline-none focus:ring-2 focus:ring-primary/20"})]}),(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,r.jsx)("span",{className:"text-sm font-medium text-text-main",children:"Strategies:"}),Object.entries(y).map(([e,t])=>(0,r.jsxs)("button",{type:"button",onClick:()=>{b(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},className:(0,o.cn)("flex items-center gap-1.5 rounded-full border px-3 py-1.5 text-xs font-medium transition-colors",h.includes(e)?"border-primary/40 bg-primary/10 text-primary":"border-border bg-surface-2 text-text-muted hover:border-border-subtle"),children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:t.icon}),t.label]},e))]}),(0,r.jsx)(N.default,{onClick:()=>F(null),disabled:k,className:"ml-auto",children:k?"Comparing…":"Run Comparison"})]}),C&&(0,r.jsx)("div",{className:"mt-4 rounded-lg border border-danger/20 bg-danger/5 px-3 py-2 text-sm text-danger",children:C}),g&&!k&&(0,r.jsx)(R,{result:g,expanded:P,onToggle:z,ran:D.current})]})}function R({result:e,expanded:t,onToggle:s,ran:a}){let l=e.strategies||[];if(0===l.length)return null;let i=l.some(e=>e.reason?.startsWith("research")),c=e.reality||null,p=e.atRiskModels||[],b=Object.entries(e.reliability||{});return(0,r.jsxs)("div",{className:"mt-6 flex flex-col gap-4",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2 text-xs text-text-muted",children:[(0,r.jsxs)("span",{className:"max-w-[420px] truncate font-mono text-text-main",children:["“",a?.prompt||e.request?.prompt||"","”"]}),e.comboName&&(0,r.jsxs)("span",{children:["combo: ",(0,r.jsx)("span",{className:"font-mono text-text-main",children:e.comboName})]}),(0,r.jsxs)("span",{children:[e.memberCount," members"]}),(0,r.jsx)("span",{children:e.request?.hadTools?"tools: yes":"tools: no"}),(0,r.jsxs)("span",{children:[e.assumptions?.inputTokens," tok/call"]}),e.originalReason&&(0,r.jsxs)("span",{children:["original: ",(0,r.jsx)(n.default,{variant:d[e.originalReason]?.variant||"default",size:"sm",children:d[e.originalReason]?.label||e.originalReason})]})]}),(0,r.jsx)("div",{className:"overflow-x-auto rounded-lg border border-border-subtle",children:(0,r.jsxs)("table",{className:"w-full min-w-[720px]",children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{className:"border-b border-border-subtle bg-surface-2/40",children:[(0,r.jsx)("th",{className:"p-3 text-left text-sm font-semibold text-text-main",children:"Metric"}),l.map(e=>{let t=y[e.strategy]||{};return(0,r.jsx)("th",{className:"p-3 text-left",children:(0,r.jsxs)("div",{className:"flex items-center gap-1.5 text-sm font-semibold text-text-main",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px] text-text-subtle",children:t.icon}),t.label]})},e.strategy)})]})}),(0,r.jsxs)("tbody",{className:"align-top",children:[(0,r.jsxs)("tr",{className:"border-b border-border-subtle",children:[(0,r.jsx)("td",{className:"p-3 text-sm font-medium text-text-muted",children:"First to answer"}),l.map(e=>(0,r.jsx)("td",{className:"p-3",children:(0,r.jsxs)("div",{className:"flex flex-col items-start gap-1.5",children:[(0,r.jsx)(h,{model:e.primaryModel||"—",index:1,risk:p.includes(e.primaryModel)}),"smart-routing"===e.strategy&&e.reason&&(0,r.jsx)(n.default,{variant:d[e.reason]?.variant||"default",size:"sm",children:d[e.reason]?.label||e.reason})]})},e.strategy))]}),c&&(0,r.jsxs)("tr",{className:"border-b border-border-subtle",children:[(0,r.jsx)("td",{className:"p-3 text-sm font-medium text-text-muted",children:"Predicted vs reality"}),l.map(e=>{let t=c.strategies?.find(t=>t.strategy===e.strategy);return(0,r.jsx)("td",{className:"p-3",children:(0,r.jsxs)("div",{className:"flex flex-col items-start gap-1",children:[(0,r.jsx)(_,{entry:t}),t?.match==="different"&&c.servedModel&&(0,r.jsxs)("span",{className:"font-mono text-xs text-text-muted",children:["→ served ",c.servedModel]}),t?.match==="failed"&&(0,r.jsx)("span",{className:"text-xs text-text-muted",children:"nothing answered on the real run"})]})},e.strategy)})]}),(0,r.jsxs)("tr",{className:"border-b border-border-subtle",children:[(0,r.jsx)("td",{className:"p-3 text-sm font-medium text-text-muted",children:"Logical calls"}),l.map(e=>(0,r.jsx)("td",{className:"p-3 font-mono text-sm text-text-main",children:S(e.calls)},e.strategy))]}),(0,r.jsxs)("tr",{className:"border-b border-border-subtle",children:[(0,r.jsx)("td",{className:"p-3 text-sm font-medium text-text-muted",children:"Est. cost / request"}),l.map(e=>(0,r.jsxs)("td",{className:"p-3 font-mono text-sm text-text-main",children:[(0,r.jsx)("span",{className:"text-text-muted",children:k(e.cost?.optimistic)})," – ",(0,r.jsx)("span",{children:k(e.cost?.worst)})]},e.strategy))]}),(0,r.jsxs)("tr",{className:"border-b border-border-subtle",children:[(0,r.jsx)("td",{className:"p-3 text-sm font-medium text-text-muted",children:"Per call"}),l.map(e=>(0,r.jsx)("td",{className:"p-3 font-mono text-sm text-text-muted",children:k(e.cost?.perCall)},e.strategy))]}),(0,r.jsxs)("tr",{className:"border-b border-border-subtle",children:[(0,r.jsx)("td",{className:"p-3 text-sm font-medium text-text-muted",children:"Pool tried"}),l.map(e=>(0,r.jsxs)("td",{className:"p-3 text-sm text-text-muted",children:[e.order.length," model",1===e.order.length?"":"s",e.excludedCookies?.length>0&&(0,r.jsxs)("span",{className:"text-danger",children:[" \xb7 ",e.excludedCookies.length," cookie",1===e.excludedCookies.length?"":"s"," excluded"]}),"swarm"===e.strategy&&Object.keys(e.roleModels||{}).length>0&&(0,r.jsxs)("span",{className:"text-text-subtle",children:[" \xb7 +",Object.keys(e.roleModels).length," role call",1===Object.keys(e.roleModels).length?"":"s"]})]},e.strategy))]})]})]})}),c&&c.status&&(0,r.jsxs)("div",{className:(0,o.cn)("flex flex-wrap items-center gap-x-4 gap-y-1 rounded-lg border px-3 py-2 text-xs","error"===c.status?"border-danger/20 bg-danger/5 text-danger":"border-border-subtle bg-surface-2/50 text-text-muted"),children:[(0,r.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[15px]",children:"fact_check"}),(0,r.jsx)("span",{className:"font-semibold text-text-main",children:"Reality"})]}),(0,r.jsx)(n.default,{variant:x(c.status),size:"sm",children:m(c.status)}),c.originalReason&&(0,r.jsxs)("span",{children:["original:"," ",(0,r.jsx)(n.default,{variant:d[c.originalReason]?.variant||"default",size:"sm",children:d[c.originalReason]?.label||c.originalReason})]}),c.servedModel?(0,r.jsxs)("span",{children:["served: ",(0,r.jsx)("span",{className:"font-mono text-text-main",children:c.servedModel})]}):"error"===c.status?(0,r.jsx)("span",{children:"no model answered — chain failed"}):(0,r.jsx)("span",{children:"no served model recorded"}),null!=c.totalDurationMs&&(0,r.jsx)("span",{className:"font-mono",children:u(c.totalDurationMs)}),c.fellThrough&&(0,r.jsx)("span",{className:"text-warning",children:"predicted head failed → chain fell through"}),"error"===c.status&&c.error&&(0,r.jsx)("span",{className:"max-w-[420px] truncate",children:c.error})]}),e.pool&&(e.pool.cookie.length>0||i)&&(0,r.jsxs)("p",{className:"text-xs text-text-muted",children:["Cookie providers in pool:"," ",(0,r.jsx)("span",{className:"font-mono text-text-subtle",children:e.pool.cookie.length>0?e.pool.cookie.join(", "):"none"})," \xb7 ","normal: ",(0,r.jsx)("span",{className:"font-mono text-text-subtle",children:e.pool.normal.map(e=>e.split("/")[0]).join(", ")||"none"})]}),b.length>0&&(0,r.jsxs)("div",{className:"flex flex-col gap-1.5 rounded-lg border border-border-subtle bg-surface-2/40 px-3 py-2",children:[(0,r.jsxs)("div",{className:"flex items-center gap-1.5 text-xs font-medium text-text-muted",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"monitor_heart"}),"Production reliability (30d)"]}),(0,r.jsx)("div",{className:"flex flex-wrap gap-x-5 gap-y-1",children:b.map(([e,t])=>{var s;let a=p.includes(e);return(0,r.jsxs)("span",{className:(0,o.cn)("flex items-center gap-1 font-mono text-xs",a?"text-danger":"text-text-muted"),children:[(0,r.jsx)("span",{className:"truncate max-w-[180px]",children:e}),(0,r.jsx)("span",{className:"font-medium",children:null!=(s=t.successRate)&&Number.isFinite(s)?`${Math.round(100*s)}%`:"—"}),(0,r.jsxs)("span",{className:"text-text-subtle",children:["(",t.total," req)"]}),a&&(0,r.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"warning"})]},e)})}),p.length>0&&(0,r.jsxs)("p",{className:"text-xs text-danger",children:["⚠ ",p.join(", ")," fail",1===p.length?"s":""," ≥ 50% of requests (30d) — smart-routing pushes these behind healthier members automatically."]})]}),(0,r.jsx)("div",{className:"grid grid-cols-1 gap-3 xl:grid-cols-3",children:l.map(e=>{let a=y[e.strategy]||{},l=t===e.strategy;return(0,r.jsxs)("div",{className:"overflow-hidden rounded-lg border border-border-subtle",children:[(0,r.jsxs)("button",{type:"button",onClick:()=>s(l?null:e.strategy),className:"flex w-full items-center justify-between gap-2 bg-surface-2/40 px-3 py-2.5 text-left",children:[(0,r.jsxs)("span",{className:"flex items-center gap-2 text-sm font-semibold text-text-main",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px] text-text-subtle",children:a.icon}),a.label]}),(0,r.jsx)("span",{className:(0,o.cn)("material-symbols-outlined text-[18px] text-text-subtle transition-transform",l&&"rotate-180"),children:"expand_more"})]}),l&&(0,r.jsx)(P,{s:e,atRisk:p})]},e.strategy)})})]})}function P({s:e,atRisk:t=[]}){let s=y[e.strategy]||{};return(0,r.jsxs)("div",{className:"flex flex-col gap-3 px-3 py-3",children:[(0,r.jsx)("p",{className:"text-xs text-text-muted",children:s.desc}),"smart-routing"===e.strategy&&e.reason&&(0,r.jsxs)("div",{className:"flex flex-col gap-1 rounded-md border border-border-subtle bg-surface-2/50 p-2.5",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)(n.default,{variant:d[e.reason]?.variant||"default",size:"sm",children:d[e.reason]?.label||e.reason}),e.intent&&(0,r.jsx)("span",{className:"text-xs text-text-muted",children:p({...e.intent,source:"heuristic"})})]}),(0,r.jsx)("p",{className:"text-xs text-text-muted",children:d[e.reason]?.desc||""})]}),"swarm"===e.strategy&&Object.keys(e.roleModels||{}).length>0&&(0,r.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,r.jsx)("span",{className:"text-xs font-medium text-text-muted",children:"Roles"}),Object.entries(e.roleModels).map(([e,t])=>(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)(n.default,{variant:"primary",size:"sm",children:e}),(0,r.jsx)(h,{model:t,muted:!0})]},e))]}),(0,r.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,r.jsxs)("span",{className:"text-xs font-medium text-text-muted",children:["Pool order (",e.order.length,")"]}),(0,r.jsx)("div",{className:"flex flex-wrap gap-1.5",children:e.order.map((e,s)=>(0,r.jsx)(h,{model:e,index:s+1,risk:t.includes(e)},`${e}-${s}`))})]}),e.excludedCookies?.length>0&&(0,r.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,r.jsxs)("span",{className:"text-xs font-medium text-danger",children:["Excluded for tool-calling (",e.excludedCookies.length,")"]}),(0,r.jsx)("div",{className:"flex flex-wrap gap-1.5",children:e.excludedCookies.map(e=>(0,r.jsx)(h,{model:e,blocked:!0},e))})]}),(0,r.jsxs)("div",{className:"flex flex-wrap gap-x-5 gap-y-1 border-t border-border-subtle pt-2.5 text-xs text-text-muted",children:[(0,r.jsxs)("span",{children:["Calls: ",(0,r.jsx)("span",{className:"font-mono text-text-main",children:S(e.calls)})]}),(0,r.jsxs)("span",{children:["Per call: ",(0,r.jsx)("span",{className:"font-mono text-text-main",children:k(e.cost?.perCall)})]}),(0,r.jsxs)("span",{children:["Cost: ",(0,r.jsxs)("span",{className:"font-mono text-text-main",children:[k(e.cost?.optimistic),"–",k(e.cost?.worst)]})]})]})]})}var z=s(50378);let D=Object.keys(d),I=["running","done","error"],$={reason:"",comboName:"",status:"",startDate:"",endDate:""};function F({onCompare:e}){let[t,s]=(0,a.useState)([]),[l,n]=(0,a.useState)([]),[i,o]=(0,a.useState)({page:1,pageSize:20,totalItems:0,totalPages:0}),[c,x]=(0,a.useState)($),[m,u]=(0,a.useState)(!1),[p,h]=(0,a.useState)(null),[b,g]=(0,a.useState)(null),f=(0,a.useCallback)(async()=>{u(!0),g(null);try{let e=new URLSearchParams({page:i.page.toString(),pageSize:i.pageSize.toString()});c.reason&&e.append("reason",c.reason),c.comboName&&e.append("comboName",c.comboName),c.status&&e.append("status",c.status),c.startDate&&e.append("startDate",c.startDate),c.endDate&&e.append("endDate",c.endDate);let t=await fetch(`/api/smart-routing/history?${e}`),r=await v(t);s(r.runs||[]),n(r.combos||[]),o(e=>({...e,...r.pagination}))}catch(e){console.error("Failed to fetch smart-routing history:",e),g(e?.message||"Failed to load history")}finally{u(!1)}},[i.page,i.pageSize,c]);(0,a.useEffect)(()=>{f()},[f]);let y=(e,t)=>{x(s=>({...s,[e]:t})),o(e=>({...e,page:1}))},w=Object.values(c).some(Boolean);return(0,r.jsxs)("div",{className:"flex flex-col gap-5",children:[(0,r.jsxs)(j.default,{padding:"md",children:[(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-5",children:[(0,r.jsxs)("div",{className:"flex min-w-0 flex-col gap-2",children:[(0,r.jsx)("label",{htmlFor:"sr-reason-filter",className:"text-sm font-medium text-text-main",children:"Reason"}),(0,r.jsxs)("select",{id:"sr-reason-filter",value:c.reason,onChange:e=>y("reason",e.target.value),className:"h-9 w-full min-w-0 cursor-pointer rounded-lg border border-border bg-surface-2 px-3 text-sm text-text-main focus:outline-none focus:ring-2 focus:ring-primary/20",children:[(0,r.jsx)("option",{value:"",children:"All Reasons"}),D.map(e=>(0,r.jsx)("option",{value:e,children:d[e].label},e))]})]}),(0,r.jsxs)("div",{className:"flex min-w-0 flex-col gap-2",children:[(0,r.jsx)("label",{htmlFor:"sr-combo-filter",className:"text-sm font-medium text-text-main",children:"Combo"}),(0,r.jsxs)("select",{id:"sr-combo-filter",value:c.comboName,onChange:e=>y("comboName",e.target.value),className:"h-9 w-full min-w-0 cursor-pointer rounded-lg border border-border bg-surface-2 px-3 text-sm text-text-main focus:outline-none focus:ring-2 focus:ring-primary/20",children:[(0,r.jsx)("option",{value:"",children:"All Combos"}),l.map(e=>(0,r.jsx)("option",{value:e,children:e},e))]})]}),(0,r.jsxs)("div",{className:"flex min-w-0 flex-col gap-2",children:[(0,r.jsx)("label",{htmlFor:"sr-status-filter",className:"text-sm font-medium text-text-main",children:"Status"}),(0,r.jsxs)("select",{id:"sr-status-filter",value:c.status,onChange:e=>y("status",e.target.value),className:"h-9 w-full min-w-0 cursor-pointer rounded-lg border border-border bg-surface-2 px-3 text-sm text-text-main focus:outline-none focus:ring-2 focus:ring-primary/20",children:[(0,r.jsx)("option",{value:"",children:"All Statuses"}),I.map(e=>(0,r.jsx)("option",{value:e,children:e},e))]})]}),(0,r.jsxs)("div",{className:"flex min-w-0 flex-col gap-2",children:[(0,r.jsx)("label",{htmlFor:"sr-start-filter",className:"text-sm font-medium text-text-main",children:"From"}),(0,r.jsx)("input",{id:"sr-start-filter",type:"datetime-local",value:c.startDate,onChange:e=>y("startDate",e.target.value),className:"h-9 w-full min-w-0 rounded-lg border border-border bg-surface-2 px-3 text-sm text-text-main focus:outline-none focus:ring-2 focus:ring-primary/20",style:{colorScheme:"auto"}})]}),(0,r.jsxs)("div",{className:"flex min-w-0 flex-col gap-2",children:[(0,r.jsx)("label",{htmlFor:"sr-end-filter",className:"text-sm font-medium text-text-main",children:"To"}),(0,r.jsx)("input",{id:"sr-end-filter",type:"datetime-local",value:c.endDate,onChange:e=>y("endDate",e.target.value),className:"h-9 w-full min-w-0 rounded-lg border border-border bg-surface-2 px-3 text-sm text-text-main focus:outline-none focus:ring-2 focus:ring-primary/20",style:{colorScheme:"auto"}})]})]}),(0,r.jsx)("div",{className:"mt-4 flex items-center justify-end",children:(0,r.jsx)(N.default,{variant:"ghost",onClick:()=>{x($),o(e=>({...e,page:1}))},disabled:!w,children:"Clear Filters"})})]}),(0,r.jsxs)(j.default,{padding:"none",children:[b?(0,r.jsx)("div",{className:"p-8 text-center text-sm text-danger",children:b}):(0,r.jsx)("div",{className:"overflow-x-auto",children:(0,r.jsxs)("table",{className:"w-full min-w-[880px]",children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{className:"border-b border-border-subtle",children:[(0,r.jsx)("th",{className:"p-4 text-left text-sm font-semibold text-text-main",children:"Time"}),(0,r.jsx)("th",{className:"p-4 text-left text-sm font-semibold text-text-main",children:"Combo"}),(0,r.jsx)("th",{className:"p-4 text-left text-sm font-semibold text-text-main",children:"Reason"}),(0,r.jsx)("th",{className:"p-4 text-left text-sm font-semibold text-text-main",children:"Pool"}),(0,r.jsx)("th",{className:"p-4 text-left text-sm font-semibold text-text-main",children:"Served"}),(0,r.jsx)("th",{className:"p-4 text-left text-sm font-semibold text-text-main",children:"Status"}),(0,r.jsx)("th",{className:"p-4 text-right text-sm font-semibold text-text-main",children:"Duration"}),(0,r.jsx)("th",{className:"p-4 text-right text-sm font-semibold text-text-main",children:"Compare"})]})}),(0,r.jsx)("tbody",{children:m?(0,r.jsx)("tr",{children:(0,r.jsx)("td",{colSpan:"8",className:"p-8 text-center text-text-muted",children:(0,r.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined animate-spin text-[20px]",children:"progress_activity"}),"Loading…"]})})}):0===t.length?(0,r.jsx)("tr",{children:(0,r.jsxs)("td",{colSpan:"8",className:"p-8 text-center text-text-muted",children:["No smart-routing history found",w&&" for the selected filters"]})}):t.map(t=>{let s=d[t.routing?.reason]||d.general,a=p===t.runId;return(0,r.jsx)(T,{run:t,meta:s,expanded:a,onToggle:()=>h(a?null:t.runId),onCompare:e},t.runId)})})]})}),!m&&t.length>0&&(0,r.jsx)("div",{className:"border-t border-border-subtle",children:(0,r.jsx)(z.A,{currentPage:i.page,pageSize:i.pageSize,totalItems:i.totalItems,onPageChange:e=>o(t=>({...t,page:e})),onPageSizeChange:e=>o(t=>({...t,pageSize:e,page:1}))})})]})]})}function T({run:e,meta:t,expanded:s,onToggle:a,onCompare:l}){let i=(e.routing?.order||[]).slice(0,3).join(", "),o=(e.routing?.order?.length||0)-3;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("tr",{onClick:a,className:"cursor-pointer border-b border-border-subtle transition-colors last:border-b-0 hover:bg-black/[0.02] dark:hover:bg-white/[0.02]",children:[(0,r.jsx)("td",{className:"whitespace-nowrap p-4 text-sm text-text-muted",children:e.startedAt?new Date(e.startedAt).toLocaleString():"—"}),(0,r.jsx)("td",{className:"max-w-[200px] truncate p-4 font-mono text-sm text-text-main",children:e.comboName||"—"}),(0,r.jsx)("td",{className:"p-4",children:(0,r.jsx)(n.default,{variant:t.variant,size:"sm",children:t.label})}),(0,r.jsx)("td",{className:"max-w-[280px] p-4",children:(0,r.jsxs)("div",{className:"truncate font-mono text-xs text-text-muted",children:[i,o>0&&(0,r.jsxs)("span",{className:"text-text-subtle",children:[" +",o," more"]}),!i&&"—"]})}),(0,r.jsx)("td",{className:"max-w-[200px] truncate p-4 font-mono text-xs text-text-muted",children:e.servedModel||"—"}),(0,r.jsx)("td",{className:"p-4",children:(0,r.jsx)(n.default,{variant:x(e.status),size:"sm",children:m(e.status)})}),(0,r.jsx)("td",{className:"whitespace-nowrap p-4 text-right font-mono text-sm text-text-muted",children:u(e.totalDurationMs)}),(0,r.jsx)("td",{className:"whitespace-nowrap p-4 text-right",children:"function"==typeof l&&(0,r.jsx)("button",{type:"button",title:"A/B compare strategies on this request",onClick:t=>{t.stopPropagation(),l(e)},className:"flex h-8 w-8 items-center justify-center rounded-lg border border-border bg-surface-2 text-text-muted transition-colors hover:border-primary/40 hover:text-primary",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"science"})})})]}),s&&(0,r.jsx)("tr",{className:"border-b border-border-subtle bg-surface-2/40 last:border-b-0",children:(0,r.jsx)("td",{colSpan:"8",className:"p-0",children:(0,r.jsxs)("div",{className:"flex flex-col",children:[e.promptPreview&&(0,r.jsx)("div",{className:"border-b border-border-subtle px-4 py-2",children:(0,r.jsx)("p",{className:"truncate text-xs text-text-muted",children:e.promptPreview})}),(0,r.jsx)(b,{routing:e.routing,servedModel:e.servedModel,pendingLabel:"No routing decision recorded"}),"error"===e.status&&e.error&&(0,r.jsx)("div",{className:"border-t border-danger/20 bg-danger/5 px-4 py-2",children:(0,r.jsx)("p",{className:"text-xs text-danger",children:e.error})})]})})})]})}let A="force-dynamic";function q(){let[e,t]=(0,a.useState)(null);return(0,r.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,r.jsx)(l.default,{title:"Smart Routing",description:"Live routing decisions per request — reason, selected pool & excluded cookies",icon:"alt_route"}),(0,r.jsx)(g,{}),(0,r.jsx)("div",{className:"mt-2 border-t border-border-subtle pt-6",children:(0,r.jsx)(M,{compareRun:e,onRunConsumed:()=>t(null)})}),(0,r.jsxs)("div",{className:"mt-2 border-t border-border-subtle pt-6",children:[(0,r.jsxs)("div",{className:"mb-4 flex items-center gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px] text-text-muted",children:"database"}),(0,r.jsx)("h2",{className:"text-base font-semibold text-text-main",children:"History"}),(0,r.jsx)("span",{className:"text-xs text-text-muted",children:"Persisted across restarts — filter, paginate & A/B compare"})]}),(0,r.jsx)(F,{onCompare:t})]})]})}},31474:(e,t,s)=>{"use strict";function r(...e){return e.filter(Boolean).join(" ").replace(/\s+/g," ").trim()}s.d(t,{cn:()=>r})},50378:(e,t,s)=>{"use strict";s.d(t,{A:()=>n});var r=s(95155),a=s(31474),l=s(92542);function n({currentPage:e,pageSize:t,totalItems:s,onPageChange:i,onPageSizeChange:o,className:d}){let c=Math.ceil(s/t),x=s>0?(e-1)*t+1:0,m=Math.min(e*t,s),u=(()=>{let t=[],s=Math.max(1,e-2),r=Math.min(c,s+5-1);r-s+1<5&&(s=Math.max(1,r-5+1));for(let e=s;e<=r;e++)t.push(e);return t})();return(0,r.jsxs)("div",{className:(0,a.cn)("flex flex-col sm:flex-row items-center justify-between gap-4 py-4 px-2",d),children:[s>0&&(0,r.jsxs)("div",{className:"text-sm text-text-muted",children:["Showing ",(0,r.jsx)("span",{className:"font-medium text-text-main",children:x})," to"," ",(0,r.jsx)("span",{className:"font-medium text-text-main",children:m})," of"," ",(0,r.jsx)("span",{className:"font-medium text-text-main",children:s})," results"]}),(0,r.jsxs)("div",{className:"flex flex-wrap items-center justify-center gap-2 sm:gap-4",children:[o&&(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("span",{className:"text-sm text-text-muted",children:"Rows:"}),(0,r.jsx)("select",{value:t,onChange:e=>o(Number(e.target.value)),className:(0,a.cn)("h-9 rounded-lg border border-black/10 dark:border-white/10 bg-surface","text-sm text-text-main focus:outline-none focus:ring-2 focus:ring-primary/20","cursor-pointer"),style:{colorScheme:"auto"},children:[10,20,50].map(e=>(0,r.jsx)("option",{value:e,children:e},e))})]}),c>1&&(0,r.jsxs)("div",{className:"flex items-center gap-1",children:[(0,r.jsx)(l.default,{variant:"outline",size:"sm",onClick:()=>i(e-1),disabled:1===e,className:"w-9 px-0",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"chevron_left"})}),u[0]>1&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.default,{variant:"ghost",size:"sm",onClick:()=>i(1),className:"w-9 px-0 hidden sm:inline-flex",children:"1"}),u[0]>2&&(0,r.jsx)("span",{className:"text-text-muted px-1 hidden sm:inline",children:"..."})]}),u.map(t=>(0,r.jsx)(l.default,{variant:e===t?"primary":"ghost",size:"sm",onClick:()=>i(t),className:(0,a.cn)("w-9 px-0",e===t?"inline-flex":"hidden sm:inline-flex"),children:t},t)),u[u.length-1]<c&&(0,r.jsxs)(r.Fragment,{children:[u[u.length-1]<c-1&&(0,r.jsx)("span",{className:"text-text-muted px-1 hidden sm:inline",children:"..."}),(0,r.jsx)(l.default,{variant:"ghost",size:"sm",onClick:()=>i(c),className:"w-9 px-0 hidden sm:inline-flex",children:c})]}),(0,r.jsx)(l.default,{variant:"outline",size:"sm",onClick:()=>i(e+1),disabled:e===c,className:"w-9 px-0",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"chevron_right"})})]})]})]})}},54960:(e,t,s)=>{"use strict";s.d(t,{default:()=>l});var r=s(95155),a=s(31474);function l({title:e,description:t,icon:s,iconNode:n,actions:i,breadcrumbs:o,className:d}){return(0,r.jsxs)("div",{className:(0,a.cn)("mb-6",d),children:[o?.length>0&&(0,r.jsx)("nav",{className:"mb-2 flex items-center gap-1.5 text-xs text-text-muted",children:o.map((e,t)=>(0,r.jsxs)("span",{className:"flex items-center gap-1.5",children:[t>0&&(0,r.jsx)("span",{className:"material-symbols-outlined text-[12px] opacity-60",children:"chevron_right"}),e.href?(0,r.jsx)("a",{href:e.href,className:"transition-colors hover:text-primary",children:e.label}):(0,r.jsx)("span",{className:"font-medium text-text-main",children:e.label})]},t))}),(0,r.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,r.jsxs)("div",{className:"flex min-w-0 items-start gap-3",children:[n?(0,r.jsx)("div",{className:"mt-0.5 shrink-0",children:n}):s&&(0,r.jsx)("div",{className:"mt-0.5 flex size-9 shrink-0 items-center justify-center rounded-brand bg-primary/10 text-primary ring-1 ring-primary/15",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:s})}),(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("h1",{className:"truncate text-xl font-semibold tracking-tight text-text-main",children:e}),t&&(0,r.jsx)("p",{className:"mt-0.5 text-sm text-text-muted",children:t})]})]}),i&&(0,r.jsx)("div",{className:"flex shrink-0 items-center gap-2",children:i})]})]})}},56061:(e,t,s)=>{"use strict";s.d(t,{default:()=>o});var r=s(95155),a=s(31474);let l={default:"bg-surface-2 text-text-muted ring-1 ring-border-subtle",primary:"bg-primary/12 text-primary ring-1 ring-primary/20",success:"bg-success/12 text-success ring-1 ring-success/20",warning:"bg-warning/12 text-warning ring-1 ring-warning/20",error:"bg-danger/12 text-danger ring-1 ring-danger/20",info:"bg-info/12 text-info ring-1 ring-info/20",cyan:"bg-cyan/12 text-cyan ring-1 ring-cyan/20"},n={default:"bg-text-subtle",primary:"bg-primary",success:"bg-success",warning:"bg-warning",error:"bg-danger",info:"bg-info",cyan:"bg-cyan"},i={sm:"px-2 py-0.5 text-xs",md:"px-2.5 py-1 text-xs",lg:"px-3 py-1.5 text-sm"};function o({children:e,variant:t="default",size:s="md",dot:d=!1,icon:c,className:x}){return(0,r.jsxs)("span",{className:(0,a.cn)("inline-flex items-center gap-1.5 rounded-full font-semibold leading-none",l[t],i[s],x),children:[d&&(0,r.jsx)("span",{className:(0,a.cn)("size-1.5 rounded-full",n[t])}),c&&(0,r.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:c}),e]})}},70445:(e,t,s)=>{Promise.resolve().then(s.bind(s,16688))},84588:(e,t,s)=>{"use strict";s.d(t,{default:()=>l});var r=s(95155),a=s(31474);function l({children:e,title:t,subtitle:s,icon:n,action:i,padding:o="md",hover:d=!1,elev:c=!1,className:x,...m}){return(0,r.jsxs)("div",{className:(0,a.cn)("bg-panel border border-border-subtle text-text-main",c?"rounded-panel shadow-[var(--shadow-elev)]":"rounded-panel shadow-[var(--shadow-soft)]",d&&"hover:border-primary/35 hover:bg-panel-elev hover:shadow-[var(--shadow-warm)] transition-all cursor-pointer",{none:"",xs:"p-3",sm:"p-4",md:"p-5",lg:"p-6"}[o],x),...m,children:[(t||i)&&(0,r.jsxs)("div",{className:"mb-4 flex items-center justify-between gap-3",children:[(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[n&&(0,r.jsx)("div",{className:"flex size-9 items-center justify-center rounded-brand bg-primary/10 text-primary ring-1 ring-primary/15",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:n})}),(0,r.jsxs)("div",{className:"min-w-0",children:[t&&(0,r.jsx)("h3",{className:"truncate text-sm font-semibold tracking-tight text-text-main",children:t}),s&&(0,r.jsx)("p",{className:"mt-0.5 truncate text-xs text-text-muted",children:s})]})]}),i]}),e]})}l.Section=function({children:e,className:t,...s}){return(0,r.jsx)("div",{className:(0,a.cn)("rounded-brand border border-border-subtle bg-surface-2 p-4",t),...s,children:e})},l.Row=function({children:e,className:t,...s}){return(0,r.jsx)("div",{className:(0,a.cn)("-mx-3 border-b border-border-subtle px-3 py-3 transition-colors last:border-b-0","hover:bg-surface-2/70",t),...s,children:e})},l.ListItem=function({children:e,actions:t,className:s,...l}){return(0,r.jsxs)("div",{className:(0,a.cn)("group -mx-3 flex items-center justify-between border-b border-border-subtle px-3 py-3 transition-colors last:border-b-0","hover:bg-surface-2/70",s),...l,children:[(0,r.jsx)("div",{className:"min-w-0 flex-1",children:e}),t&&(0,r.jsx)("div",{className:"flex items-center gap-1 opacity-0 transition-opacity group-hover:opacity-100",children:t})]})}},92542:(e,t,s)=>{"use strict";s.d(t,{default:()=>i});var r=s(95155),a=s(31474);let l={primary:"bg-primary hover:bg-primary-hover text-white shadow-[0_0_0_1px_rgba(255,255,255,0.08)_inset,0_10px_30px_-18px_rgba(139,92,246,0.75)] disabled:bg-surface-3 disabled:text-text-muted",secondary:"bg-surface-2 hover:bg-surface-3 text-text-main border border-border disabled:opacity-50",outline:"border border-border text-text-main hover:bg-surface-2 hover:border-primary/45",ghost:"text-text-muted hover:bg-surface-2 hover:text-text-main",danger:"bg-danger hover:brightness-110 text-white shadow-sm disabled:bg-surface-3 disabled:text-text-muted",success:"bg-success hover:brightness-110 text-white shadow-sm disabled:bg-surface-3 disabled:text-text-muted"},n={sm:"h-7 px-3 text-xs rounded-brand",md:"h-9 px-4 text-sm rounded-brand",lg:"h-10 px-5 text-sm rounded-brand"};function i({children:e,variant:t="primary",size:s="md",icon:o,iconRight:d,disabled:c=!1,loading:x=!1,fullWidth:m=!1,className:u,...p}){return(0,r.jsxs)("button",{className:(0,a.cn)("inline-flex items-center justify-center gap-2 font-semibold transition-all duration-150 ease-out cursor-pointer","active:scale-[0.98] disabled:opacity-50 disabled:cursor-not-allowed disabled:active:scale-100","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/35 focus-visible:ring-offset-2 focus-visible:ring-offset-bg",l[t],n[s],m&&"w-full",u),disabled:c||x,...p,children:[x?(0,r.jsx)("span",{className:"material-symbols-outlined animate-spin text-[16px]",children:"progress_activity"}):o?(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:o}):null,e,d&&!x&&(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:d})]})}},99312:(e,t,s)=>{"use strict";s.d(t,{default:()=>n});var r=s(95155),a=s(31474),l=s(92542);function n({icon:e="inbox",title:t="No items found",description:s="There's nothing here yet.",action:i,actionText:o,onAction:d,className:c}){return(0,r.jsxs)("div",{className:(0,a.cn)("flex flex-col items-center justify-center rounded-panel border border-dashed border-border p-12 text-center",c),children:[(0,r.jsx)("div",{className:"mb-4 flex size-12 items-center justify-center rounded-full bg-surface-2 text-text-muted ring-1 ring-border-subtle",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[24px]",children:e})}),(0,r.jsx)("h3",{className:"mb-1.5 text-sm font-semibold text-text-main",children:t}),(0,r.jsx)("p",{className:"mb-6 max-w-sm text-xs text-text-muted",children:s}),i||o&&d&&(0,r.jsx)(l.default,{variant:"outline",size:"sm",onClick:d,children:o})]})}}},e=>{e.O(0,[8441,3794,7358],()=>e(e.s=70445)),_N_E=e.O()}]);
|
package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/swarm/page-6cda956597418bd9.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3054],{31474:(e,t,s)=>{"use strict";function r(...e){return e.filter(Boolean).join(" ").replace(/\s+/g," ").trim()}s.d(t,{cn:()=>r})},42616:(e,t,s)=>{Promise.resolve().then(s.bind(s,54960)),Promise.resolve().then(s.bind(s,79765))},54960:(e,t,s)=>{"use strict";s.d(t,{default:()=>n});var r=s(95155),a=s(31474);function n({title:e,description:t,icon:s,iconNode:i,actions:l,breadcrumbs:d,className:o}){return(0,r.jsxs)("div",{className:(0,a.cn)("mb-6",o),children:[d?.length>0&&(0,r.jsx)("nav",{className:"mb-2 flex items-center gap-1.5 text-xs text-text-muted",children:d.map((e,t)=>(0,r.jsxs)("span",{className:"flex items-center gap-1.5",children:[t>0&&(0,r.jsx)("span",{className:"material-symbols-outlined text-[12px] opacity-60",children:"chevron_right"}),e.href?(0,r.jsx)("a",{href:e.href,className:"transition-colors hover:text-primary",children:e.label}):(0,r.jsx)("span",{className:"font-medium text-text-main",children:e.label})]},t))}),(0,r.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,r.jsxs)("div",{className:"flex min-w-0 items-start gap-3",children:[i?(0,r.jsx)("div",{className:"mt-0.5 shrink-0",children:i}):s&&(0,r.jsx)("div",{className:"mt-0.5 flex size-9 shrink-0 items-center justify-center rounded-brand bg-primary/10 text-primary ring-1 ring-primary/15",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:s})}),(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("h1",{className:"truncate text-xl font-semibold tracking-tight text-text-main",children:e}),t&&(0,r.jsx)("p",{className:"mt-0.5 text-sm text-text-muted",children:t})]})]}),l&&(0,r.jsx)("div",{className:"flex shrink-0 items-center gap-2",children:l})]})]})}},56061:(e,t,s)=>{"use strict";s.d(t,{default:()=>d});var r=s(95155),a=s(31474);let n={default:"bg-surface-2 text-text-muted ring-1 ring-border-subtle",primary:"bg-primary/12 text-primary ring-1 ring-primary/20",success:"bg-success/12 text-success ring-1 ring-success/20",warning:"bg-warning/12 text-warning ring-1 ring-warning/20",error:"bg-danger/12 text-danger ring-1 ring-danger/20",info:"bg-info/12 text-info ring-1 ring-info/20",cyan:"bg-cyan/12 text-cyan ring-1 ring-cyan/20"},i={default:"bg-text-subtle",primary:"bg-primary",success:"bg-success",warning:"bg-warning",error:"bg-danger",info:"bg-info",cyan:"bg-cyan"},l={sm:"px-2 py-0.5 text-xs",md:"px-2.5 py-1 text-xs",lg:"px-3 py-1.5 text-sm"};function d({children:e,variant:t="default",size:s="md",dot:o=!1,icon:c,className:u}){return(0,r.jsxs)("span",{className:(0,a.cn)("inline-flex items-center gap-1.5 rounded-full font-semibold leading-none",n[t],l[s],u),children:[o&&(0,r.jsx)("span",{className:(0,a.cn)("size-1.5 rounded-full",i[t])}),c&&(0,r.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:c}),e]})}},79765:(e,t,s)=>{"use strict";s.d(t,{default:()=>m});var r=s(95155),a=s(12115),n=s(56061),i=s(99312),l=s(31474);let d={gatekeeper:{label:"Gatekeeper",icon:"fork_right",desc:"Classifies request complexity"},manager:{label:"Manager",icon:"psychology",desc:"Decomposes into subtasks"},workers:{label:"Workers",icon:"group_work",desc:"Parallel specialist execution"},audit:{label:"Staff Audit",icon:"fact_check",desc:"Reviews worker outputs"},synthesis:{label:"Synthesis",icon:"auto_awesome",desc:"Final cohesive answer"}},o=["gatekeeper","manager","workers","audit","synthesis"];function c(e){return"done"===e?"success":"running"===e?"info":"error"===e?"error":"default"}function u(e){return"done"===e?"Done":"running"===e?"Running":"error"===e?"Error":"Pending"}function x(e){return e||0===e?e<1e3?`${e}ms`:`${(e/1e3).toFixed(1)}s`:"—"}function m(){let[e,t]=(0,a.useState)([]),[s,d]=(0,a.useState)(!1),[,o]=(0,a.useState)(0),c=(0,a.useRef)(null);(0,a.useEffect)(()=>{let e=new EventSource("/api/swarm/stream");return c.current=e,e.onopen=()=>d(!0),e.onerror=()=>d(!1),e.onmessage=e=>{try{let s=JSON.parse(e.data);t(e=>"snapshot"===s.type&&Array.isArray(s.runs)?s.runs:s.runId?"swarm:start"===s.type?[{runId:s.runId,comboName:s.comboName,promptPreview:s.promptPreview,workerCount:s.workerCount,status:"running",startedAt:Date.now(),totalDurationMs:null,stages:{gatekeeper:{status:"pending"},manager:{status:"pending"},workers:{status:"pending",workers:[]},audit:{status:"pending"},synthesis:{status:"pending"}}},...e].slice(0,50):e.map(e=>{if(e.runId!==s.runId)return e;let t={...e,stages:{...e.stages}};if("swarm:stage"===s.type)if("workers"===s.stage&&void 0!==s.worker){let e=[...t.stages.workers?.workers||[]];for(;e.length<=s.worker;)e.push({index:e.length,status:"pending",model:null});e[s.worker]={...e[s.worker],status:s.status,model:s.model??e[s.worker].model,durationMs:s.durationMs??e[s.worker].durationMs},t.stages.workers={...t.stages.workers,workers:e}}else s.stage&&(t.stages[s.stage]={...t.stages[s.stage],status:s.status,durationMs:s.durationMs??t.stages[s.stage]?.durationMs,model:s.model??t.stages[s.stage]?.model,verdict:s.verdict??t.stages[s.stage]?.verdict,strategy:s.strategy??t.stages[s.stage]?.strategy,skipped:s.skipped??t.stages[s.stage]?.skipped});else"swarm:complete"===s.type?(t.status="done",t.totalDurationMs=s.totalDurationMs,"number"==typeof s.workerCount&&(t.workerCount=s.workerCount)):"swarm:error"===s.type&&(t.status="error",t.error=s.error,t.totalDurationMs=s.totalDurationMs);return t}):e)}catch{}},()=>{e.close(),c.current=null}},[]),(0,a.useEffect)(()=>{let e=setInterval(()=>o(e=>e+1),3e4);return()=>clearInterval(e)},[]);let u=e.filter(e=>"running"===e.status),x=e.filter(e=>"running"!==e.status);return(0,r.jsxs)("div",{className:"flex flex-col gap-5",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 text-sm text-text-muted",children:[(0,r.jsx)("span",{className:(0,l.cn)("size-2 rounded-full",s?"bg-success animate-pulse":"bg-danger")}),s?"Live":"Reconnecting…"]}),u.length>0&&(0,r.jsxs)(n.default,{variant:"info",dot:!0,children:[u.length," active run",u.length>1?"s":""]})]}),0===e.length?(0,r.jsx)(i.default,{icon:"hub",title:"No swarm runs yet",description:"Hierarchical Swarm runs will appear here in real time. Send a request to a combo with the 'Hierarchical Swarm' strategy to see the pipeline in action."}):(0,r.jsxs)(r.Fragment,{children:[u.length>0&&(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)("h3",{className:"text-xs font-semibold uppercase tracking-wide text-text-muted",children:"Active"}),u.map(e=>(0,r.jsx)(g,{run:e,expanded:!0},e.runId))]}),x.length>0&&(0,r.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,r.jsx)("h3",{className:"text-xs font-semibold uppercase tracking-wide text-text-muted",children:"Recent"}),x.slice(0,10).map(e=>(0,r.jsx)(g,{run:e},e.runId))]})]})]})}function g({run:e,expanded:t=!1}){let s=o.map(t=>[t,e.stages?.[t]]);return(0,r.jsxs)("div",{className:(0,l.cn)("rounded-panel border bg-panel shadow-[var(--shadow-soft)]","error"===e.status?"border-danger/30":"border-border-subtle"),children:[(0,r.jsxs)("div",{className:"flex items-center justify-between gap-3 border-b border-border-subtle px-4 py-3",children:[(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,r.jsx)(n.default,{variant:c(e.status),dot:!0,size:"sm",children:u(e.status)}),(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("div",{className:"truncate font-mono text-sm font-medium text-text-main",children:e.comboName||"swarm"}),(0,r.jsx)("div",{className:"truncate text-xs text-text-muted",children:function(e){if(!e)return"—";let t=Date.now()-e;return t<5e3?"just now":t<6e4?`${Math.floor(t/1e3)}s ago`:t<36e5?`${Math.floor(t/6e4)}m ago`:new Date(e).toLocaleTimeString()}(e.startedAt)})]})]}),(0,r.jsxs)("div",{className:"flex shrink-0 items-center gap-3 text-xs text-text-muted",children:[e.totalDurationMs&&(0,r.jsx)("span",{className:"font-mono",children:x(e.totalDurationMs)}),null!=e.workerCount&&e.workerCount>0&&(0,r.jsxs)("span",{className:"flex items-center gap-1",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"group_work"}),e.workerCount]})]})]}),e.promptPreview&&(0,r.jsx)("div",{className:"border-b border-border-subtle px-4 py-2",children:(0,r.jsx)("p",{className:"truncate text-xs text-text-muted",children:e.promptPreview})}),(0,r.jsx)("div",{className:"grid grid-cols-2 gap-px bg-border-subtle sm:grid-cols-5",children:s.map(([e,t])=>{let s=d[e];c(t?.status);let a=t?.status==="running";return(0,r.jsxs)("div",{className:(0,l.cn)("bg-panel p-3 transition-colors",a&&"bg-primary/5"),children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("span",{className:(0,l.cn)("material-symbols-outlined text-[16px]",t?.status==="done"&&"text-success",t?.status==="running"&&"text-info",t?.status==="error"&&"text-danger",(!t?.status||t?.status==="pending")&&"text-text-subtle"),children:a?"progress_activity":s.icon}),(0,r.jsx)("span",{className:"text-xs font-semibold text-text-main",children:s.label})]}),(0,r.jsxs)("div",{className:"mt-1.5 flex items-center gap-1.5",children:[(0,r.jsx)("span",{className:(0,l.cn)("size-1.5 rounded-full",t?.status==="done"&&"bg-success",t?.status==="running"&&"bg-info animate-pulse",t?.status==="error"&&"bg-danger",(!t?.status||t?.status==="pending")&&"bg-text-subtle")}),(0,r.jsx)("span",{className:"text-[11px] text-text-muted",children:t?.skipped?"Skipped":t?.durationMs?x(t.durationMs):u(t?.status)})]}),t?.verdict&&(0,r.jsx)("div",{className:"mt-1 text-[10px] uppercase tracking-wide text-text-subtle",children:t.verdict})]},e)})}),t&&e.stages?.workers?.workers?.length>0&&(0,r.jsxs)("div",{className:"border-t border-border-subtle px-4 py-3",children:[(0,r.jsx)("div",{className:"mb-2 text-[11px] font-semibold uppercase tracking-wide text-text-muted",children:"Workers"}),(0,r.jsx)("div",{className:"flex flex-wrap gap-2",children:e.stages.workers.workers.map((e,t)=>(0,r.jsxs)("div",{className:(0,l.cn)("flex items-center gap-2 rounded-md border px-2.5 py-1.5 text-xs","done"===e.status?"border-success/30 bg-success/5":"running"===e.status?"border-info/30 bg-info/5":"error"===e.status?"border-danger/30 bg-danger/5":"border-border-subtle bg-surface-2"),children:[(0,r.jsxs)("span",{className:"font-mono text-text-subtle",children:["#",t+1]}),(0,r.jsx)("span",{className:"truncate max-w-[160px] text-text-muted",children:e.model||"—"}),(0,r.jsx)("span",{className:(0,l.cn)("size-1.5 rounded-full","done"===e.status&&"bg-success","running"===e.status&&"bg-info animate-pulse","error"===e.status&&"bg-danger",(!e.status||"pending"===e.status)&&"bg-text-subtle")}),e.durationMs&&(0,r.jsx)("span",{className:"font-mono text-text-subtle",children:x(e.durationMs)})]},t))})]}),"error"===e.status&&e.error&&(0,r.jsx)("div",{className:"border-t border-danger/20 bg-danger/5 px-4 py-2",children:(0,r.jsx)("p",{className:"text-xs text-danger",children:e.error})})]})}},92542:(e,t,s)=>{"use strict";s.d(t,{default:()=>l});var r=s(95155),a=s(31474);let n={primary:"bg-primary hover:bg-primary-hover text-white shadow-[0_0_0_1px_rgba(255,255,255,0.08)_inset,0_10px_30px_-18px_rgba(139,92,246,0.75)] disabled:bg-surface-3 disabled:text-text-muted",secondary:"bg-surface-2 hover:bg-surface-3 text-text-main border border-border disabled:opacity-50",outline:"border border-border text-text-main hover:bg-surface-2 hover:border-primary/45",ghost:"text-text-muted hover:bg-surface-2 hover:text-text-main",danger:"bg-danger hover:brightness-110 text-white shadow-sm disabled:bg-surface-3 disabled:text-text-muted",success:"bg-success hover:brightness-110 text-white shadow-sm disabled:bg-surface-3 disabled:text-text-muted"},i={sm:"h-7 px-3 text-xs rounded-brand",md:"h-9 px-4 text-sm rounded-brand",lg:"h-10 px-5 text-sm rounded-brand"};function l({children:e,variant:t="primary",size:s="md",icon:d,iconRight:o,disabled:c=!1,loading:u=!1,fullWidth:x=!1,className:m,...g}){return(0,r.jsxs)("button",{className:(0,a.cn)("inline-flex items-center justify-center gap-2 font-semibold transition-all duration-150 ease-out cursor-pointer","active:scale-[0.98] disabled:opacity-50 disabled:cursor-not-allowed disabled:active:scale-100","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/35 focus-visible:ring-offset-2 focus-visible:ring-offset-bg",n[t],i[s],x&&"w-full",m),disabled:c||u,...g,children:[u?(0,r.jsx)("span",{className:"material-symbols-outlined animate-spin text-[16px]",children:"progress_activity"}):d?(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:d}):null,e,o&&!u&&(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:o})]})}},99312:(e,t,s)=>{"use strict";s.d(t,{default:()=>i});var r=s(95155),a=s(31474),n=s(92542);function i({icon:e="inbox",title:t="No items found",description:s="There's nothing here yet.",action:l,actionText:d,onAction:o,className:c}){return(0,r.jsxs)("div",{className:(0,a.cn)("flex flex-col items-center justify-center rounded-panel border border-dashed border-border p-12 text-center",c),children:[(0,r.jsx)("div",{className:"mb-4 flex size-12 items-center justify-center rounded-full bg-surface-2 text-text-muted ring-1 ring-border-subtle",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[24px]",children:e})}),(0,r.jsx)("h3",{className:"mb-1.5 text-sm font-semibold text-text-main",children:t}),(0,r.jsx)("p",{className:"mb-6 max-w-sm text-xs text-text-muted",children:s}),l||d&&o&&(0,r.jsx)(n.default,{variant:"outline",size:"sm",onClick:o,children:d})]})}}},e=>{e.O(0,[8441,3794,7358],()=>e(e.s=42616)),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9839],{5047:(e,t,s)=>{Promise.resolve().then(s.bind(s,61203))},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:W}=(0,r.C)();(0,l.useEffect)(()=>(F((0,i.kk)()),(0,i.oQ)(()=>F((0,i.kk)()))),[]);let B=c.hT.includes(A),G=B?c.ev:c.ev.filter(e=>!e.wenyan);(0,l.useEffect)(()=>{let e=c.ev.find(e=>e.id===N);e?.wenyan&&!B&&(w("ultra"),J({cavemanLevel:"ultra"}))},[B,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)(n.Ex,{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:()=>W('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"})]})]})})]})}}},e=>{e.O(0,[27,8105,705,1321,5497,8441,3794,7358],()=>e(e.s=5047)),_N_E=e.O()}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9839],{5047:(e,t,s)=>{Promise.resolve().then(s.bind(s,61203))},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:W}=(0,r.C)();(0,l.useEffect)(()=>(F((0,i.kk)()),(0,i.oQ)(()=>F((0,i.kk)()))),[]);let B=c.hT.includes(A),G=B?c.ev:c.ev.filter(e=>!e.wenyan);(0,l.useEffect)(()=>{let e=c.ev.find(e=>e.id===N);e?.wenyan&&!B&&(w("ultra"),J({cavemanLevel:"ultra"}))},[B,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)(n.Ex,{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:()=>W('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"})]})]})})]})}}},e=>{e.O(0,[27,9497,705,1321,5497,8441,3794,7358],()=>e(e.s=5047)),_N_E=e.O()}]);
|