@rsalmn/extremerouter 0.8.7 → 0.8.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/.next-cli-build/BUILD_ID +1 -1
- package/app/.next-cli-build/app-path-routes-manifest.json +15 -13
- 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 +14 -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 +3 -3
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/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 +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +3 -3
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/smart-routing/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/smart-routing/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/smart-routing/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/swarm/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/swarm/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/swarm/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_global-error/page.js +3 -3
- package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_global-error.html +1 -1
- package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_not-found/page.js +2 -2
- package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_not-found.html +1 -1
- package/app/.next-cli-build/server/app/_not-found.rsc +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 +4 -4
- package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +3 -3
- package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/combos/lab/route.js +1 -1
- package/app/.next-cli-build/server/app/api/combos/lab/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
- package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/combos/simulate/route.js +1 -1
- package/app/.next-cli-build/server/app/api/combos/simulate/route.js.nft.json +1 -1
- 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 -1
- package/app/.next-cli-build/server/app/api/health/overview/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/health/providers/route.js +1 -1
- package/app/.next-cli-build/server/app/api/health/providers/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/health/route.js +1 -1
- package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/health/stream/route.js +2 -2
- package/app/.next-cli-build/server/app/api/health/stream/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/init/route.js +1 -1
- package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
- package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/locale/route.js +1 -1
- package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +1 -1
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +3 -3
- 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/catalog-sync/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/catalog-sync/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/disabled/route.js +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 -1
- package/app/.next-cli-build/server/app/api/oauth/freebuff/import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/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/zcode/import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/zcode/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 +2 -2
- package/app/.next-cli-build/server/app/api/providers/[id]/felo-profile/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/freebuff-profile/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/freebuff-profile/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/health-timeline/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/health-timeline/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/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 +2 -2
- 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 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/zai-profile/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/zenmux-plans/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/zenmux-plans/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/capture/launch/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/capture/launch/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/capture/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/capture/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/felo-capture/launch/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/felo-capture/launch/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/felo-capture/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/felo-capture/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +2 -2
- package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +2 -2
- package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +2 -2
- package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/install/route.js +2 -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 -1
- package/app/.next-cli-build/server/app/api/smart-routing/active/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/smart-routing/history/route.js +2 -2
- package/app/.next-cli-build/server/app/api/smart-routing/history/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/smart-routing/lab/route.js +2 -2
- package/app/.next-cli-build/server/app/api/smart-routing/lab/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/smart-routing/stream/route.js +2 -2
- package/app/.next-cli-build/server/app/api/smart-routing/stream/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/swarm/active/route.js +1 -1
- package/app/.next-cli-build/server/app/api/swarm/active/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/swarm/stream/route.js +2 -2
- package/app/.next-cli-build/server/app/api/swarm/stream/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tags/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
- package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +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/media/results/[id]/route.js +1 -0
- package/app/.next-cli-build/server/app/api/v1/media/results/[id]/route.js.nft.json +1 -0
- package/app/.next-cli-build/server/app/api/v1/media/results/[id]/route_client-reference-manifest.js +1 -0
- 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/video/generations/route.js +1 -0
- package/app/.next-cli-build/server/app/api/v1/video/generations/route.js.nft.json +1 -0
- package/app/.next-cli-build/server/app/api/v1/video/generations/route_client-reference-manifest.js +1 -0
- 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 +15 -13
- package/app/.next-cli-build/server/chunks/1194.js +1 -1
- package/app/.next-cli-build/server/chunks/1350.js +3 -3
- package/app/.next-cli-build/server/chunks/1411.js +1 -1
- 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/212.js +1 -1
- package/app/.next-cli-build/server/chunks/2436.js +1 -0
- package/app/.next-cli-build/server/chunks/3520.js +1 -1
- package/app/.next-cli-build/server/chunks/3552.js +1 -1
- package/app/.next-cli-build/server/chunks/4046.js +1 -1
- package/app/.next-cli-build/server/chunks/412.js +1 -1
- package/app/.next-cli-build/server/chunks/4161.js +1 -0
- package/app/.next-cli-build/server/chunks/4502.js +6 -6
- package/app/.next-cli-build/server/chunks/4828.js +1 -0
- package/app/.next-cli-build/server/chunks/{3841.js → 4987.js} +1 -1
- package/app/.next-cli-build/server/chunks/5050.js +2 -2
- package/app/.next-cli-build/server/chunks/5253.js +1 -1
- package/app/.next-cli-build/server/chunks/5330.js +9 -9
- package/app/.next-cli-build/server/chunks/5473.js +1 -1
- package/app/.next-cli-build/server/chunks/5604.js +1 -1
- 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/5961.js +1 -1
- package/app/.next-cli-build/server/chunks/6007.js +10 -0
- package/app/.next-cli-build/server/chunks/6157.js +1 -0
- package/app/.next-cli-build/server/chunks/6182.js +1 -1
- package/app/.next-cli-build/server/chunks/6488.js +1 -1
- package/app/.next-cli-build/server/chunks/6777.js +1 -1
- package/app/.next-cli-build/server/chunks/7247.js +1 -0
- package/app/.next-cli-build/server/chunks/7765.js +2 -2
- package/app/.next-cli-build/server/chunks/809.js +1 -1
- package/app/.next-cli-build/server/chunks/8238.js +1 -1
- package/app/.next-cli-build/server/chunks/8240.js +1 -0
- package/app/.next-cli-build/server/chunks/8266.js +1 -1
- package/app/.next-cli-build/server/chunks/8271.js +1 -1
- package/app/.next-cli-build/server/chunks/8802.js +2 -2
- package/app/.next-cli-build/server/chunks/885.js +7 -7
- package/app/.next-cli-build/server/chunks/8851.js +3 -0
- package/app/.next-cli-build/server/chunks/8895.js +6 -6
- package/app/.next-cli-build/server/chunks/9715.js +1 -0
- package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
- package/app/.next-cli-build/server/middleware.js +3 -3
- package/app/.next-cli-build/server/pages/404.html +1 -1
- package/app/.next-cli-build/server/pages/500.html +1 -1
- package/app/.next-cli-build/server/server-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/server-reference-manifest.json +1 -1
- package/app/.next-cli-build/static/chunks/1321-738b3efba6f43f03.js +1 -0
- package/app/.next-cli-build/static/chunks/5497-97801e653d366579.js +7 -0
- package/app/.next-cli-build/static/chunks/705-1b66113f1f9bdd89.js +1 -0
- package/app/.next-cli-build/static/chunks/9086-5e0c8ccb81f25cbb.js +1 -0
- package/app/.next-cli-build/static/chunks/{9622-d0f22be4f1ef8011.js → 9622-1dc5485471326b33.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/alerts/{page-3527fe022102a692.js → page-5da9d88aea0f0c4d.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/basic-chat/{page-fe59538aa4add719.js → page-af18b8bd5a604e31.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/{page-1849f671db0f9fe9.js → page-c933ec2b61961be3.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/{page-0e903eb34158c8a8.js → page-3b6ddb5ae1f382fc.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/{page-8406e79b31e512bb.js → page-6e960c6e7b31b9df.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/{page-81ef4c324f201832.js → page-dd4edb101f50cc0f.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-f1add2aaae4a459c.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/health/{page-d71cb9f910cb5d13.js → page-2ac0245eea32c9aa.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/{page-94341b277cf27462.js → page-e0b2567bb9fe606d.js} +7 -7
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/{page-558f5601f8df1d4d.js → page-9da68f29ab52796d.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/combo/[id]/{page-6effc5c0f2b1d72e.js → page-2c80d26d992e4bb2.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/page-7cdd74503baa001a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/web/{page-95375c7b40f99306.js → page-ebc169fccd95e5d8.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/{page-4549c187375b9192.js → page-50b3f8c8ed3358f2.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/overview/{page-bb459e518dfa9f70.js → page-c4728000c2a09214.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-86eaf12ef68c60ba.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/playground/{page-625485e32264e15b.js → page-c43d594bf432dbb3.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/{page-09b1b5beae8435cd.js → page-8147c101767a32a1.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/{page-776433cfd87f123a.js → page-f20fce2b984f4ef3.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/new/{page-1f67fe5d69805df2.js → page-99b2fb0411fa61e4.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/{page-5d9d7d47216375ea.js → page-3231355c17df9913.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/proxy-pools/{page-c561cab29785310a.js → page-c619835a47dd125d.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/{page-140fef4b235b4792.js → page-46f5c7b65b5bb9ad.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/{page-acf6cde3210c179a.js → page-fb7fe2c2ce8ee710.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/{page-c3ae0ab7f0d0634d.js → page-971ad40322c4940b.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/translator/{page-cb12854a23416b01.js → page-33f472a9351a93f8.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/page-52a5ff6e854d82e7.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/{layout-66efb163e888cd6b.js → layout-6605206f3a2e2db9.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/_global-error/page-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/alerts/test/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/login/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/status/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/breaker/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cache/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/combos/lab/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/combos/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/combos/simulate/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/combos/validate-roles/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/dashboard/stream/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/health/overview/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/health/providers/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/health/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/health/stream/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/init/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/keys/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/locale/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/alias/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/availability/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/catalog-sync/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/custom/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/test/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/1min/import/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/freebuff/import/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kimi-desktop/auto-import/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kimi-desktop/import/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kimi-desktop/quota/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/qwen/import/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/wp-studio/import/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/zcode/import/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/zed/auto-import/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/zed/import/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pricing/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/agnes-profile/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/felo-profile/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/freebuff-profile/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/health-timeline/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/inxora-profile/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/onemin-api-profile/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/onemin-profile/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/qwencloud-profile/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/v0-profile/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/vault-pool/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/zai-profile/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/zenmux-plans/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/capture/launch/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/capture/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/client/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/felo-capture/launch/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/felo-capture/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/database/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/shutdown/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/smart-routing/active/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/smart-routing/history/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/smart-routing/lab/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/smart-routing/stream/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/swarm/active/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/swarm/stream/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tags/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/load/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/save/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/send/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/history/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/leaderboard/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/meta/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/retry-stats/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/media/results/[id]/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/models/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/search/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/video/generations/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/version/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/version/update/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/dashboard/settings/pricing/{page-baf12d16760e9b90.js → page-cb505396f61fd853.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/{layout-155acd4a482252b8.js → layout-43c49c1c04131398.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/login/{page-089f2be5081e9c05.js → page-783218bde9da4df5.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/app/page-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-fe046df355b8d174.js +1 -0
- package/app/.next-cli-build/static/css/4311ce5e9ab1213e.css +1 -0
- package/app/.next-cli-build/static/zahf-uMWnrDSCrrfcee0d/_buildManifest.js +1 -0
- package/app/package.json +1 -1
- package/app/public/favicon.svg +70 -8
- package/app/public/icons/icon-192.svg +73 -3
- package/app/public/icons/icon-512.svg +72 -3
- package/app/public/providers/xkiro.svg +11 -0
- package/app/public/vercel.svg +73 -1
- package/app/src/mitm/server.js +27 -27
- package/package.json +1 -1
- package/src/cli/tray/icon.ico +0 -0
- package/src/cli/tray/icon.png +0 -0
- package/app/.next-cli-build/server/chunks/1891.js +0 -10
- package/app/.next-cli-build/server/chunks/3735.js +0 -1
- package/app/.next-cli-build/server/chunks/5699.js +0 -1
- package/app/.next-cli-build/server/chunks/6878.js +0 -1
- package/app/.next-cli-build/server/chunks/7016.js +0 -3
- package/app/.next-cli-build/server/chunks/7410.js +0 -1
- package/app/.next-cli-build/server/chunks/7815.js +0 -1
- package/app/.next-cli-build/server/chunks/8048.js +0 -1
- package/app/.next-cli-build/static/BmLJ5bmQbpsF-jvZIwr9t/_buildManifest.js +0 -1
- package/app/.next-cli-build/static/chunks/1321-184fe0dd34faf680.js +0 -1
- package/app/.next-cli-build/static/chunks/2563-a547c8ef699e1791.js +0 -1
- package/app/.next-cli-build/static/chunks/5497-9caed03337b37e47.js +0 -7
- package/app/.next-cli-build/static/chunks/705-eaa2de0fd5964be4.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-72670cb4cac6b97d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/page-05b05e6f6136829d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-cc5141ff81040e89.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/page-55b0738c2d201462.js +0 -1
- package/app/.next-cli-build/static/chunks/app/_global-error/page-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/alerts/test/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/login/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/status/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/breaker/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cache/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/combos/lab/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/combos/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/combos/simulate/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/combos/validate-roles/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/dashboard/stream/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/health/overview/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/health/providers/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/health/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/health/stream/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/init/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/keys/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/locale/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/alias/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/availability/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/catalog-sync/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/custom/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/test/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/1min/import/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/freebuff/import/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kimi-desktop/auto-import/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kimi-desktop/import/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kimi-desktop/quota/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/qwen/import/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/wp-studio/import/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/zcode/import/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/zed/auto-import/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/zed/import/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pricing/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/agnes-profile/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/felo-profile/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/freebuff-profile/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/health-timeline/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/inxora-profile/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/onemin-api-profile/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/onemin-profile/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/qwencloud-profile/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/v0-profile/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/vault-pool/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/zai-profile/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/zenmux-plans/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/capture/launch/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/capture/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/client/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/felo-capture/launch/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/felo-capture/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/database/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/shutdown/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/smart-routing/active/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/smart-routing/history/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/smart-routing/lab/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/smart-routing/stream/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/swarm/active/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/swarm/stream/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tags/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/load/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/save/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/send/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/history/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/leaderboard/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/meta/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/retry-stats/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/models/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/search/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/version/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/version/update/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/page-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-bf747ebfcd7e601c.js +0 -1
- package/app/.next-cli-build/static/css/8a8ea9ee79a01730.css +0 -1
- /package/app/.next-cli-build/static/{BmLJ5bmQbpsF-jvZIwr9t → zahf-uMWnrDSCrrfcee0d}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6620],{16144:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>g});var i=s(95155),a=s(73321),o=s(98500),r=s.n(o),n=s(12115),l=s(35497),c=s(57250),d=s(88105),m=s(8247);let x={embedding:{type:"custom-embedding",label:"Embedding"},stt:{type:"custom-stt",label:"STT"},tts:{type:"custom-tts",label:"TTS"}},h=new Set([]),p={image:"image-combo",tts:"tts-combo"};function u(e){let t=Object.entries(e).some(([e,t])=>e.startsWith("modelLock_")&&t&&new Date(t).getTime()>Date.now());return"unavailable"!==e.testStatus||t?e.testStatus:"active"}function b({provider:e,kind:t,connections:s,isCustom:a,onToggle:o}){let n=d.Q2[e.id],x=!!n?.noAuth,h=s.filter(t=>t.provider===e.id),p=h.filter(e=>{let t=u(e);return"active"===t||"success"===t}).length,f=h.filter(e=>{let t=u(e);return"error"===t||"expired"===t||"unavailable"===t}).length,g=h.length,j=g>0&&h.every(e=>!1===e.isActive);return(0,i.jsx)(r(),{href:`/dashboard/media-providers/${t}/${e.id}`,className:"group",children:(0,i.jsx)(l.Zp,{padding:"xs",className:`h-full hover:bg-black/[0.01] dark:hover:bg-white/[0.01] transition-colors cursor-pointer ${j?"opacity-50":""}`,children:(0,i.jsxs)("div",{className:"flex min-w-0 items-center justify-between gap-3",children:[(0,i.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,i.jsx)("div",{className:"size-8 rounded-lg flex items-center justify-center shrink-0",style:{backgroundColor:`${e.color?.length>7?e.color:(e.color??"#888")+"15"}`},children:(0,i.jsx)(c.A,{src:(0,m.k)(e.id),alt:e.name,size:30,className:"object-contain rounded-lg max-w-[30px] max-h-[30px]",fallbackText:e.textIcon||e.id.slice(0,2).toUpperCase(),fallbackColor:e.color})}),(0,i.jsxs)("div",{className:"min-w-0",children:[(0,i.jsx)("h3",{className:"font-semibold text-sm",children:e.name}),(0,i.jsxs)("div",{className:"flex items-center gap-2 mt-0.5 flex-wrap",children:[a&&(0,i.jsx)(l.Ex,{variant:"default",size:"sm",children:"Custom"}),x?(0,i.jsx)(l.Ex,{variant:"success",size:"sm",children:"Ready"}):j?(0,i.jsx)(l.Ex,{variant:"default",size:"sm",children:"Disabled"}):0===g?(0,i.jsx)("span",{className:"text-xs text-text-muted",children:"No connections"}):(0,i.jsxs)(i.Fragment,{children:[p>0&&(0,i.jsxs)(l.Ex,{variant:"success",size:"sm",dot:!0,children:[p," Connected"]}),f>0&&(0,i.jsxs)(l.Ex,{variant:"error",size:"sm",dot:!0,children:[f," Error"]}),0===p&&0===f&&(0,i.jsxs)(l.Ex,{variant:"default",size:"sm",children:[g," Added"]})]})]})]})]}),g>0&&(0,i.jsx)("div",{className:"shrink-0 opacity-100 transition-opacity sm:opacity-0 sm:group-hover:opacity-100",onClick:t=>{t.preventDefault(),t.stopPropagation(),o&&o(e.id,j)},children:(0,i.jsx)(l.lM,{size:"sm",checked:!j,onChange:()=>{},title:j?"Enable provider":"Disable provider"})})]})})})}function f({combos:e}){return 0===e.length?null:(0,i.jsx)("div",{className:"flex flex-col gap-2",children:e.map(e=>(0,i.jsx)(r(),{href:`/dashboard/media-providers/combo/${e.id}`,children:(0,i.jsx)(l.Zp,{padding:"xs",className:"hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors cursor-pointer",children:(0,i.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-primary text-[18px]",children:"layers"}),(0,i.jsx)("code",{className:"text-sm font-mono font-medium flex-1 truncate",children:e.name}),(0,i.jsxs)("div",{className:"flex flex-wrap items-center gap-1 sm:shrink-0",children:[e.models.slice(0,6).map((e,t)=>{let s="string"==typeof e?e.split("/")[0]:"",a=d.Q2[s];return(0,i.jsx)("div",{title:a?.name||e,className:"size-5 rounded flex items-center justify-center",style:{backgroundColor:`${a?.color??"#888"}15`},children:(0,i.jsx)(c.A,{src:(0,m.k)(s),alt:a?.name||s,size:18,className:"object-contain rounded max-w-[18px] max-h-[18px]",fallbackText:a?.textIcon||s.slice(0,2).toUpperCase(),fallbackColor:a?.color})},`${e}-${t}`)}),e.models.length>6&&(0,i.jsxs)("span",{className:"text-[10px] text-text-muted ml-1",children:["+",e.models.length-6]})]}),(0,i.jsx)("span",{className:"text-[11px] text-text-muted shrink-0",children:e.models.length}),(0,i.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[16px]",children:"chevron_right"})]})})},e.id))})}function g(){let{kind:e}=(0,a.useParams)(),t=(0,a.useRouter)(),[s,o]=(0,n.useState)([]),[r,c]=(0,n.useState)([]),[m,u]=(0,n.useState)([]),[g,j]=(0,n.useState)(!1);(0,n.useEffect)(()=>{("webSearch"===e||"webFetch"===e)&&t.replace("/dashboard/media-providers/web")},[e,t]);let v=d.rj.find(t=>t.id===e),y=x[e],N=h.has(e);if((0,n.useEffect)(()=>{v&&(fetch("/api/providers",{cache:"no-store"}).then(e=>e.json()).then(e=>o(e.connections||[])).catch(()=>{}),y&&fetch("/api/provider-nodes",{cache:"no-store"}).then(e=>e.json()).then(e=>c((e.nodes||[]).filter(e=>e.type===y.type))).catch(()=>{}),N&&fetch("/api/combos",{cache:"no-store"}).then(e=>e.json()).then(e=>u(e.combos||[])).catch(()=>{}))},[y,N,v]),!v)return(0,a.notFound)();let k=(0,d.o5)(e),C=m.filter(t=>t.kind===e),w=()=>({"custom-embedding":{color:"#6366F1",textIcon:"CE"},"custom-stt":{color:"#DC2626",textIcon:"ST"},"custom-tts":{color:"#10B981",textIcon:"TT"}})[y?.type]||{color:"#6366F1",textIcon:"CE"},T=r.map(e=>({id:e.id,name:e.name||`Custom ${y?.label}`,...w})),$=[...k,...T],E=async(e,t)=>{let i=s.filter(t=>t.provider===e);o(s=>s.map(s=>s.provider===e?{...s,isActive:t}:s)),await Promise.allSettled(i.map(e=>fetch(`/api/providers/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})))},S=async()=>{let s=p[e]||`${e}-combo`,i=s,a=1,o=new Set(m.map(e=>e.name));for(;o.has(i);)i=`${s}-${a++}`;let r=await fetch("/api/combos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:i,models:[],kind:e})});if(r.ok){let e=await r.json();t.push(`/dashboard/media-providers/combo/${e.id}`)}else alert((await r.json()).error||"Failed to create combo")};return(0,i.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,i.jsx)(l.zY,{title:v?.label||e,description:`Manage your ${v?.label||e} providers`,icon:v?.icon||"perm_media",actions:(y||N)&&(0,i.jsxs)(i.Fragment,{children:[N&&(0,i.jsx)(l.$n,{size:"sm",icon:"add",onClick:S,children:"Create Combo"}),y&&(0,i.jsxs)(l.$n,{size:"sm",icon:"add",onClick:()=>j(!0),children:["Add Custom ",y.label]})]})}),N&&C.length>0&&(0,i.jsx)(f,{combos:C}),0===$.length?(0,i.jsxs)("div",{className:"text-center py-12 border border-dashed border-border rounded-xl text-text-muted text-sm",children:["No providers support ",(0,i.jsx)("strong",{children:v.label})," yet."]}):(0,i.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:[k.map(t=>(0,i.jsx)(b,{provider:t,kind:e,connections:s,onToggle:E},t.id)),T.map(t=>(0,i.jsx)(b,{provider:t,kind:e,connections:s,isCustom:!0,onToggle:E},t.id))]}),y&&(0,i.jsx)(l.x0,{isOpen:g,nodeType:y.type,onClose:()=>j(!1),onCreated:e=>{c(t=>[...t,e]),j(!1)}})]})}},86663:(e,t,s)=>{Promise.resolve().then(s.bind(s,16144))}},e=>{e.O(0,[27,
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6620],{16144:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>g});var i=s(95155),a=s(73321),o=s(98500),r=s.n(o),n=s(12115),l=s(35497),c=s(57250),d=s(88105),m=s(8247);let x={embedding:{type:"custom-embedding",label:"Embedding"},stt:{type:"custom-stt",label:"STT"},tts:{type:"custom-tts",label:"TTS"}},h=new Set([]),p={image:"image-combo",tts:"tts-combo"};function u(e){let t=Object.entries(e).some(([e,t])=>e.startsWith("modelLock_")&&t&&new Date(t).getTime()>Date.now());return"unavailable"!==e.testStatus||t?e.testStatus:"active"}function b({provider:e,kind:t,connections:s,isCustom:a,onToggle:o}){let n=d.Q2[e.id],x=!!n?.noAuth,h=s.filter(t=>t.provider===e.id),p=h.filter(e=>{let t=u(e);return"active"===t||"success"===t}).length,f=h.filter(e=>{let t=u(e);return"error"===t||"expired"===t||"unavailable"===t}).length,g=h.length,j=g>0&&h.every(e=>!1===e.isActive);return(0,i.jsx)(r(),{href:`/dashboard/media-providers/${t}/${e.id}`,className:"group",children:(0,i.jsx)(l.Zp,{padding:"xs",className:`h-full hover:bg-black/[0.01] dark:hover:bg-white/[0.01] transition-colors cursor-pointer ${j?"opacity-50":""}`,children:(0,i.jsxs)("div",{className:"flex min-w-0 items-center justify-between gap-3",children:[(0,i.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,i.jsx)("div",{className:"size-8 rounded-lg flex items-center justify-center shrink-0",style:{backgroundColor:`${e.color?.length>7?e.color:(e.color??"#888")+"15"}`},children:(0,i.jsx)(c.A,{src:(0,m.k)(e.id),alt:e.name,size:30,className:"object-contain rounded-lg max-w-[30px] max-h-[30px]",fallbackText:e.textIcon||e.id.slice(0,2).toUpperCase(),fallbackColor:e.color})}),(0,i.jsxs)("div",{className:"min-w-0",children:[(0,i.jsx)("h3",{className:"font-semibold text-sm",children:e.name}),(0,i.jsxs)("div",{className:"flex items-center gap-2 mt-0.5 flex-wrap",children:[a&&(0,i.jsx)(l.Ex,{variant:"default",size:"sm",children:"Custom"}),x?(0,i.jsx)(l.Ex,{variant:"success",size:"sm",children:"Ready"}):j?(0,i.jsx)(l.Ex,{variant:"default",size:"sm",children:"Disabled"}):0===g?(0,i.jsx)("span",{className:"text-xs text-text-muted",children:"No connections"}):(0,i.jsxs)(i.Fragment,{children:[p>0&&(0,i.jsxs)(l.Ex,{variant:"success",size:"sm",dot:!0,children:[p," Connected"]}),f>0&&(0,i.jsxs)(l.Ex,{variant:"error",size:"sm",dot:!0,children:[f," Error"]}),0===p&&0===f&&(0,i.jsxs)(l.Ex,{variant:"default",size:"sm",children:[g," Added"]})]})]})]})]}),g>0&&(0,i.jsx)("div",{className:"shrink-0 opacity-100 transition-opacity sm:opacity-0 sm:group-hover:opacity-100",onClick:t=>{t.preventDefault(),t.stopPropagation(),o&&o(e.id,j)},children:(0,i.jsx)(l.lM,{size:"sm",checked:!j,onChange:()=>{},title:j?"Enable provider":"Disable provider"})})]})})})}function f({combos:e}){return 0===e.length?null:(0,i.jsx)("div",{className:"flex flex-col gap-2",children:e.map(e=>(0,i.jsx)(r(),{href:`/dashboard/media-providers/combo/${e.id}`,children:(0,i.jsx)(l.Zp,{padding:"xs",className:"hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors cursor-pointer",children:(0,i.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-primary text-[18px]",children:"layers"}),(0,i.jsx)("code",{className:"text-sm font-mono font-medium flex-1 truncate",children:e.name}),(0,i.jsxs)("div",{className:"flex flex-wrap items-center gap-1 sm:shrink-0",children:[e.models.slice(0,6).map((e,t)=>{let s="string"==typeof e?e.split("/")[0]:"",a=d.Q2[s];return(0,i.jsx)("div",{title:a?.name||e,className:"size-5 rounded flex items-center justify-center",style:{backgroundColor:`${a?.color??"#888"}15`},children:(0,i.jsx)(c.A,{src:(0,m.k)(s),alt:a?.name||s,size:18,className:"object-contain rounded max-w-[18px] max-h-[18px]",fallbackText:a?.textIcon||s.slice(0,2).toUpperCase(),fallbackColor:a?.color})},`${e}-${t}`)}),e.models.length>6&&(0,i.jsxs)("span",{className:"text-[10px] text-text-muted ml-1",children:["+",e.models.length-6]})]}),(0,i.jsx)("span",{className:"text-[11px] text-text-muted shrink-0",children:e.models.length}),(0,i.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[16px]",children:"chevron_right"})]})})},e.id))})}function g(){let{kind:e}=(0,a.useParams)(),t=(0,a.useRouter)(),[s,o]=(0,n.useState)([]),[r,c]=(0,n.useState)([]),[m,u]=(0,n.useState)([]),[g,j]=(0,n.useState)(!1);(0,n.useEffect)(()=>{("webSearch"===e||"webFetch"===e)&&t.replace("/dashboard/media-providers/web")},[e,t]);let v=d.rj.find(t=>t.id===e),y=x[e],N=h.has(e);if((0,n.useEffect)(()=>{v&&(fetch("/api/providers",{cache:"no-store"}).then(e=>e.json()).then(e=>o(e.connections||[])).catch(()=>{}),y&&fetch("/api/provider-nodes",{cache:"no-store"}).then(e=>e.json()).then(e=>c((e.nodes||[]).filter(e=>e.type===y.type))).catch(()=>{}),N&&fetch("/api/combos",{cache:"no-store"}).then(e=>e.json()).then(e=>u(e.combos||[])).catch(()=>{}))},[y,N,v]),!v)return(0,a.notFound)();let k=(0,d.o5)(e),C=m.filter(t=>t.kind===e),w=()=>({"custom-embedding":{color:"#6366F1",textIcon:"CE"},"custom-stt":{color:"#DC2626",textIcon:"ST"},"custom-tts":{color:"#10B981",textIcon:"TT"}})[y?.type]||{color:"#6366F1",textIcon:"CE"},T=r.map(e=>({id:e.id,name:e.name||`Custom ${y?.label}`,...w})),$=[...k,...T],E=async(e,t)=>{let i=s.filter(t=>t.provider===e);o(s=>s.map(s=>s.provider===e?{...s,isActive:t}:s)),await Promise.allSettled(i.map(e=>fetch(`/api/providers/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})))},S=async()=>{let s=p[e]||`${e}-combo`,i=s,a=1,o=new Set(m.map(e=>e.name));for(;o.has(i);)i=`${s}-${a++}`;let r=await fetch("/api/combos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:i,models:[],kind:e})});if(r.ok){let e=await r.json();t.push(`/dashboard/media-providers/combo/${e.id}`)}else alert((await r.json()).error||"Failed to create combo")};return(0,i.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,i.jsx)(l.zY,{title:v?.label||e,description:`Manage your ${v?.label||e} providers`,icon:v?.icon||"perm_media",actions:(y||N)&&(0,i.jsxs)(i.Fragment,{children:[N&&(0,i.jsx)(l.$n,{size:"sm",icon:"add",onClick:S,children:"Create Combo"}),y&&(0,i.jsxs)(l.$n,{size:"sm",icon:"add",onClick:()=>j(!0),children:["Add Custom ",y.label]})]})}),N&&C.length>0&&(0,i.jsx)(f,{combos:C}),0===$.length?(0,i.jsxs)("div",{className:"text-center py-12 border border-dashed border-border rounded-xl text-text-muted text-sm",children:["No providers support ",(0,i.jsx)("strong",{children:v.label})," yet."]}):(0,i.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:[k.map(t=>(0,i.jsx)(b,{provider:t,kind:e,connections:s,onToggle:E},t.id)),T.map(t=>(0,i.jsx)(b,{provider:t,kind:e,connections:s,isCustom:!0,onToggle:E},t.id))]}),y&&(0,i.jsx)(l.x0,{isOpen:g,nodeType:y.type,onClose:()=>j(!1),onCreated:e=>{c(t=>[...t,e]),j(!1)}})]})}},86663:(e,t,s)=>{Promise.resolve().then(s.bind(s,16144))}},e=>{e.O(0,[27,9086,705,1321,5497,8441,3794,7358],()=>e(e.s=86663)),_N_E=e.O()}]);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8334],{22662:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>p});var s=a(95155),l=a(73321),r=a(12115);a(98500);var i=a(35497),n=a(57250),o=a(88105),d=a(8247);let c=/^[a-zA-Z0-9_.\-]+$/,m={webSearch:"Web Search",webFetch:"Web Fetch",image:"Text to Image",tts:"Text To Speech"},x={webSearch:"/v1/search",webFetch:"/v1/web/fetch",image:"/v1/images/generations",tts:"/v1/audio/speech"},h={webSearch:e=>({model:e,query:"What is the latest news about AI?",search_type:"web",max_results:5}),webFetch:e=>({model:e,url:"https://example.com",format:"markdown"}),image:e=>({model:e,prompt:"A cute cat playing piano",n:1,size:"1024x1024"}),tts:e=>({model:e,input:"Hello, this is a test.",voice:"alloy"})};function u(e){return"webSearch"===e||"webFetch"===e?"/dashboard/media-providers/web":`/dashboard/media-providers/${e}`}function p(){let{id:e}=(0,l.useParams)(),t=(0,l.useRouter)(),[a,p]=(0,r.useState)(null),[b,f]=(0,r.useState)(!0),[j,g]=(0,r.useState)(""),[w,v]=(0,r.useState)(""),[y,k]=(0,r.useState)([]),[N,S]=(0,r.useState)(!1),[$,U]=(0,r.useState)(!1),[C,O]=(0,r.useState)([]),[_,T]=(0,r.useState)(!1),[R,A]=(0,r.useState)(null),[P,L]=(0,r.useState)(""),[z,E]=(0,r.useState)(""),[D,F]=(0,r.useState)([]),[M,I]=(0,r.useState)({}),J=async()=>{try{let[t,a,s,l,r,i]=await Promise.all([fetch(`/api/combos/${e}`,{cache:"no-store"}),fetch("/api/settings",{cache:"no-store"}),fetch("/api/usage/logs",{cache:"no-store"}),fetch("/api/keys",{cache:"no-store"}),fetch("/api/providers",{cache:"no-store"}),fetch("/api/models/alias",{cache:"no-store"})]);if(i.ok&&I((await i.json()).aliases||{}),l.ok){let e=await l.json();E((e.keys||[]).find(e=>!1!==e.isActive)?.key||"")}if(r.ok&&F((await r.json()).connections||[]),!t.ok){p(null),f(!1);return}let n=await t.json();p(n),g(n.name),k(n.models||[]);let o=a.ok?await a.json():{};S(o.comboStrategies?.[n.name]?.fallbackStrategy==="round-robin");let d=s.ok?await s.json():[];O(d.filter(e=>"string"==typeof e&&e.includes(n.name)).slice(0,50))}catch{}f(!1)};(0,r.useEffect)(()=>{J()},[e]);let W=e=>e.trim()?c.test(e)?(v(""),!0):(v("Only letters, numbers, -, _ and ."),!1):(v("Name is required"),!1),H=async t=>{let a=await fetch(`/api/combos/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});return!!a.ok||(alert((await a.json()).error||"Failed to save"),!1)},Z=async()=>{!W(j)||j===a.name||await H({name:j})&&await J()},q=async e=>{let t=e?.value||e;if(!t||y.includes(t))return;let a=[...y,t];k(a),await H({models:a})},B=async e=>{let t=e?.value||e;if(!t||!y.includes(t))return;let a=y.filter(e=>e!==t);k(a),await H({models:a})},Y=async e=>{let t=y.filter((t,a)=>a!==e);k(t),await H({models:t})},G=async(e,t)=>{let a=[...y],s=e+t;s<0||s>=a.length||([a[e],a[s]]=[a[s],a[e]],k(a),await H({models:a}))},K=async e=>{S(e);let t=await fetch("/api/settings",{cache:"no-store"}),s={...(t.ok?await t.json():{}).comboStrategies||{}};e?s[a.name]={fallbackStrategy:"round-robin"}:delete s[a.name],await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStrategies:s})})},Q=async()=>{!confirm(`Delete combo "${a.name}"?`)||(await fetch(`/api/combos/${e}`,{method:"DELETE"})).ok&&t.push(u(a.kind))},V=async()=>{if(T(!0),A(null),L(""),R?.audioUrl)try{URL.revokeObjectURL(R.audioUrl)}catch{}if(R?.imageUrl?.startsWith("blob:"))try{URL.revokeObjectURL(R.imageUrl)}catch{}let e=Date.now();try{let t=x[a.kind],s=h[a.kind](a.name),l={"Content-Type":"application/json"};z&&(l.Authorization=`Bearer ${z}`);let r=await fetch(`/api${t}`,{method:"POST",headers:l,body:JSON.stringify(s)}),i=Date.now()-e;if(!r.ok){let e=await r.json().catch(()=>({}));L(e?.error?.message||e?.error||`HTTP ${r.status}`),A({json:JSON.stringify(e,null,2),latencyMs:i});return}let n=r.headers.get("content-type")||"";if(n.startsWith("image/")){let e=await r.blob();A({imageUrl:URL.createObjectURL(e),latencyMs:i});return}if(n.startsWith("audio/")||"application/octet-stream"===n){let e=await r.blob();A({audioUrl:URL.createObjectURL(e),latencyMs:i});return}let o=await r.json(),d=o?.data?.[0],c=d?.b64_json?`data:image/png;base64,${d.b64_json}`:d?.url||"";A({json:JSON.stringify(function e(t){if(!t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(e);let a={};for(let[s,l]of Object.entries(t))a[s]="b64_json"===s&&"string"==typeof l&&l.length>100?`<${l.length} chars base64>`:e(l);return a}(o),null,2),imageUrl:c,latencyMs:i})}catch(e){L(e.message||"Network error")}T(!1)};if(b)return(0,s.jsx)("div",{className:"text-text-muted text-sm",children:"Loading..."});if(!a)return(0,l.notFound)();let X=m[a.kind]||o.rj.find(e=>e.id===a.kind)?.label||"Combo",ee=x[a.kind],et=a.kind&&h[a.kind]?h[a.kind](a.name):null,ea=ee?`curl -X POST http://localhost:20128${ee} \\
|
|
2
2
|
-H "Content-Type: application/json" \\
|
|
3
3
|
-H "Authorization: Bearer ${z||"YOUR_KEY"}" \\
|
|
4
|
-
-d '${JSON.stringify(et)}'`:"";return u(a.kind),(0,s.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,s.jsx)(i.zY,{title:a.name,description:`${X} Combo`,icon:"layers",breadcrumbs:[{label:"Media Providers",href:`/dashboard/media-providers/${a.kind}`},{label:`${X} Combos`,href:`/dashboard/media-providers/${a.kind}`},{label:a.name}],actions:(0,s.jsx)(i.$n,{variant:"outline",size:"sm",icon:"delete",onClick:Q,children:"Delete"})}),(0,s.jsxs)(i.Zp,{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold mb-3",children:"Settings"}),(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(i.pd,{label:"Combo Name",value:j,onChange:e=>{g(e.target.value),W(e.target.value)},onBlur:Z,error:w}),(0,s.jsx)("p",{className:"text-[10px] text-text-muted mt-0.5",children:"Only letters, numbers, -, _ and ."})]}),(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-sm font-medium",children:"Round Robin"}),(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Rotate providers across requests instead of strict fallback order."})]}),(0,s.jsx)(i.lM,{checked:N,onChange:K})]})]})]}),(0,s.jsxs)(i.Zp,{children:[(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold",children:"Providers"}),(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Tried in order (top-down) or rotated when round-robin is on."})]}),(0,s.jsx)(i.$n,{size:"sm",icon:"add",onClick:()=>U(!0),children:"Add Provider"})]}),0===y.length?(0,s.jsx)("div",{className:"text-center py-6 border border-dashed border-border rounded-lg text-text-muted text-sm",children:"No providers yet."}):(0,s.jsx)("div",{className:"flex flex-col gap-2",children:y.map((e,t)=>{let{providerId:a,model:l}=function(e){if("string"!=typeof e)return{providerId:"",model:""};let t=e.indexOf("/");return t<0?{providerId:e,model:""}:{providerId:e.slice(0,t),model:e.slice(t+1)}}(e),r=o.Q2[a];return(0,s.jsxs)("div",{className:"flex items-center gap-3 p-2 rounded-lg bg-black/[0.02] dark:bg-white/[0.02]",children:[(0,s.jsx)("span",{className:"text-xs text-text-muted w-5 text-center",children:t+1}),(0,s.jsx)(n.A,{src:(0,d.k)(a),alt:r?.name||a,size:24,className:"object-contain rounded shrink-0",fallbackText:r?.textIcon||a.slice(0,2).toUpperCase(),fallbackColor:r?.color}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsx)("div",{className:"text-sm font-medium truncate",children:r?.name||a}),l&&(0,s.jsx)("code",{className:"text-[10px] text-text-muted font-mono truncate block",children:l})]}),(0,s.jsxs)("div",{className:"flex items-center gap-0.5",children:[(0,s.jsx)("button",{onClick:()=>G(t,-1),disabled:0===t,className:`p-1 rounded ${0===t?"text-text-muted/20":"text-text-muted hover:text-primary hover:bg-black/5"}`,title:"Move up",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"arrow_upward"})}),(0,s.jsx)("button",{onClick:()=>G(t,1),disabled:t===y.length-1,className:`p-1 rounded ${t===y.length-1?"text-text-muted/20":"text-text-muted hover:text-primary hover:bg-black/5"}`,title:"Move down",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"arrow_downward"})}),(0,s.jsx)("button",{onClick:()=>Y(t),className:"p-1 rounded text-text-muted hover:text-red-500 hover:bg-red-500/10",title:"Remove",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"close"})})]})]},`${e}-${t}`)})})]}),a.kind&&ee&&(0,s.jsxs)(i.Zp,{children:[(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-3",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold",children:"Test Example"}),(0,s.jsx)(i.$n,{size:"sm",icon:"play_arrow",onClick:V,disabled:_||0===y.length,children:_?"Running...":"Run"})]}),(0,s.jsx)("pre",{className:"text-xs font-mono bg-black/[0.03] dark:bg-white/[0.03] p-3 rounded-lg overflow-x-auto whitespace-pre-wrap break-all",children:ea}),P&&(0,s.jsx)("p",{className:"mt-3 text-xs text-red-500 break-words",children:P}),R&&(0,s.jsxs)("div",{className:"mt-3 flex flex-col gap-3",children:[null!=R.latencyMs&&(0,s.jsxs)("span",{className:"text-[11px] text-text-muted",children:["⚡ ",R.latencyMs,"ms"]}),R.imageUrl&&(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"flex items-center justify-end mb-1.5",children:(0,s.jsxs)("a",{href:R.imageUrl,download:"image.png",className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"download"}),"Download"]})}),(0,s.jsx)("img",{src:R.imageUrl,alt:"Generated",className:"max-w-full rounded-lg border border-border"})]}),R.audioUrl&&(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"flex items-center justify-end mb-1.5",children:(0,s.jsxs)("a",{href:R.audioUrl,download:"speech.mp3",className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"download"}),"Download"]})}),(0,s.jsx)("audio",{controls:!0,src:R.audioUrl,className:"w-full"})]}),R.json&&(0,s.jsx)("pre",{className:"text-xs font-mono bg-black/[0.03] dark:bg-white/[0.03] p-3 rounded-lg overflow-auto max-h-[300px] whitespace-pre-wrap break-all",children:R.json})]})]}),(0,s.jsxs)(i.Zp,{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold mb-3",children:"Usage Logs"}),0===C.length?(0,s.jsx)("p",{className:"text-xs text-text-muted italic",children:"No usage yet."}):(0,s.jsx)("pre",{className:"text-[11px] font-mono bg-black/[0.03] dark:bg-white/[0.03] p-3 rounded-lg overflow-auto max-h-[400px] whitespace-pre-wrap",children:C.join("\n")})]}),(0,s.jsx)(i.rq,{isOpen:$,onClose:()=>U(!1),onSelect:q,onDeselect:B,activeProviders:D,modelAliases:M,title:`Add ${X} Model`,kindFilter:a.kind,addedModelValues:y,closeOnSelect:!1})]})}},28903:(e,t,a)=>{Promise.resolve().then(a.bind(a,22662))}},e=>{e.O(0,[27,
|
|
4
|
+
-d '${JSON.stringify(et)}'`:"";return u(a.kind),(0,s.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,s.jsx)(i.zY,{title:a.name,description:`${X} Combo`,icon:"layers",breadcrumbs:[{label:"Media Providers",href:`/dashboard/media-providers/${a.kind}`},{label:`${X} Combos`,href:`/dashboard/media-providers/${a.kind}`},{label:a.name}],actions:(0,s.jsx)(i.$n,{variant:"outline",size:"sm",icon:"delete",onClick:Q,children:"Delete"})}),(0,s.jsxs)(i.Zp,{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold mb-3",children:"Settings"}),(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(i.pd,{label:"Combo Name",value:j,onChange:e=>{g(e.target.value),W(e.target.value)},onBlur:Z,error:w}),(0,s.jsx)("p",{className:"text-[10px] text-text-muted mt-0.5",children:"Only letters, numbers, -, _ and ."})]}),(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-sm font-medium",children:"Round Robin"}),(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Rotate providers across requests instead of strict fallback order."})]}),(0,s.jsx)(i.lM,{checked:N,onChange:K})]})]})]}),(0,s.jsxs)(i.Zp,{children:[(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold",children:"Providers"}),(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Tried in order (top-down) or rotated when round-robin is on."})]}),(0,s.jsx)(i.$n,{size:"sm",icon:"add",onClick:()=>U(!0),children:"Add Provider"})]}),0===y.length?(0,s.jsx)("div",{className:"text-center py-6 border border-dashed border-border rounded-lg text-text-muted text-sm",children:"No providers yet."}):(0,s.jsx)("div",{className:"flex flex-col gap-2",children:y.map((e,t)=>{let{providerId:a,model:l}=function(e){if("string"!=typeof e)return{providerId:"",model:""};let t=e.indexOf("/");return t<0?{providerId:e,model:""}:{providerId:e.slice(0,t),model:e.slice(t+1)}}(e),r=o.Q2[a];return(0,s.jsxs)("div",{className:"flex items-center gap-3 p-2 rounded-lg bg-black/[0.02] dark:bg-white/[0.02]",children:[(0,s.jsx)("span",{className:"text-xs text-text-muted w-5 text-center",children:t+1}),(0,s.jsx)(n.A,{src:(0,d.k)(a),alt:r?.name||a,size:24,className:"object-contain rounded shrink-0",fallbackText:r?.textIcon||a.slice(0,2).toUpperCase(),fallbackColor:r?.color}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsx)("div",{className:"text-sm font-medium truncate",children:r?.name||a}),l&&(0,s.jsx)("code",{className:"text-[10px] text-text-muted font-mono truncate block",children:l})]}),(0,s.jsxs)("div",{className:"flex items-center gap-0.5",children:[(0,s.jsx)("button",{onClick:()=>G(t,-1),disabled:0===t,className:`p-1 rounded ${0===t?"text-text-muted/20":"text-text-muted hover:text-primary hover:bg-black/5"}`,title:"Move up",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"arrow_upward"})}),(0,s.jsx)("button",{onClick:()=>G(t,1),disabled:t===y.length-1,className:`p-1 rounded ${t===y.length-1?"text-text-muted/20":"text-text-muted hover:text-primary hover:bg-black/5"}`,title:"Move down",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"arrow_downward"})}),(0,s.jsx)("button",{onClick:()=>Y(t),className:"p-1 rounded text-text-muted hover:text-red-500 hover:bg-red-500/10",title:"Remove",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"close"})})]})]},`${e}-${t}`)})})]}),a.kind&&ee&&(0,s.jsxs)(i.Zp,{children:[(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-3",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold",children:"Test Example"}),(0,s.jsx)(i.$n,{size:"sm",icon:"play_arrow",onClick:V,disabled:_||0===y.length,children:_?"Running...":"Run"})]}),(0,s.jsx)("pre",{className:"text-xs font-mono bg-black/[0.03] dark:bg-white/[0.03] p-3 rounded-lg overflow-x-auto whitespace-pre-wrap break-all",children:ea}),P&&(0,s.jsx)("p",{className:"mt-3 text-xs text-red-500 break-words",children:P}),R&&(0,s.jsxs)("div",{className:"mt-3 flex flex-col gap-3",children:[null!=R.latencyMs&&(0,s.jsxs)("span",{className:"text-[11px] text-text-muted",children:["⚡ ",R.latencyMs,"ms"]}),R.imageUrl&&(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"flex items-center justify-end mb-1.5",children:(0,s.jsxs)("a",{href:R.imageUrl,download:"image.png",className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"download"}),"Download"]})}),(0,s.jsx)("img",{src:R.imageUrl,alt:"Generated",className:"max-w-full rounded-lg border border-border"})]}),R.audioUrl&&(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"flex items-center justify-end mb-1.5",children:(0,s.jsxs)("a",{href:R.audioUrl,download:"speech.mp3",className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"download"}),"Download"]})}),(0,s.jsx)("audio",{controls:!0,src:R.audioUrl,className:"w-full"})]}),R.json&&(0,s.jsx)("pre",{className:"text-xs font-mono bg-black/[0.03] dark:bg-white/[0.03] p-3 rounded-lg overflow-auto max-h-[300px] whitespace-pre-wrap break-all",children:R.json})]})]}),(0,s.jsxs)(i.Zp,{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold mb-3",children:"Usage Logs"}),0===C.length?(0,s.jsx)("p",{className:"text-xs text-text-muted italic",children:"No usage yet."}):(0,s.jsx)("pre",{className:"text-[11px] font-mono bg-black/[0.03] dark:bg-white/[0.03] p-3 rounded-lg overflow-auto max-h-[400px] whitespace-pre-wrap",children:C.join("\n")})]}),(0,s.jsx)(i.rq,{isOpen:$,onClose:()=>U(!1),onSelect:q,onDeselect:B,activeProviders:D,modelAliases:M,title:`Add ${X} Model`,kindFilter:a.kind,addedModelValues:y,closeOnSelect:!1})]})}},28903:(e,t,a)=>{Promise.resolve().then(a.bind(a,22662))}},e=>{e.O(0,[27,9086,705,1321,5497,8441,3794,7358],()=>e(e.s=28903)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9749],{57767:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>v});var n=s(95155),i=s(98500),o=s.n(i),r=s(12115),d=s(35497),l=s(57250),c=s(88105),a=s(8247);let m=[{kind:"image",title:"Text to Image",icon:"brush",nodeType:null,addLabel:""},{kind:"video",title:"Text to Video",icon:"movie",nodeType:null,addLabel:""},{kind:"stt",title:"Speech To Text",icon:"mic",nodeType:"custom-stt",addLabel:"STT"},{kind:"tts",title:"Text To Speech",icon:"record_voice_over",nodeType:"custom-tts",addLabel:"TTS"}],x={"custom-stt":{color:"#DC2626",textIcon:"ST"},"custom-tts":{color:"#10B981",textIcon:"TT"}};function u(e){let t=Object.entries(e).some(([e,t])=>e.startsWith("modelLock_")&&t&&new Date(t).getTime()>Date.now());return"unavailable"!==e.testStatus||t?e.testStatus:"active"}function h({provider:e,kind:t,connections:s,isCustom:i}){let r=!!c.Q2[e.id]?.noAuth,m=(s||[]).filter(t=>t.provider===e.id),x=m.filter(e=>{let t=u(e);return"active"===t||"success"===t}).length,p=m.filter(e=>{let t=u(e);return"error"===t||"expired"===t||"unavailable"===t}).length,v=m.length;return(0,n.jsx)(o(),{href:`/dashboard/media-providers/${t}/${e.id}`,className:"group",children:(0,n.jsx)(d.Zp,{padding:"xs",className:"h-full hover:bg-black/[0.01] dark:hover:bg-white/[0.01] transition-colors cursor-pointer",children:(0,n.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,n.jsx)("div",{className:"size-8 rounded-lg flex items-center justify-center shrink-0",style:{backgroundColor:`${e.color?.length>7?e.color:(e.color??"#888")+"15"}`},children:(0,n.jsx)(l.A,{src:(0,a.k)(e.id),alt:e.name,size:30,className:"object-contain rounded-lg max-w-[30px] max-h-[30px]",fallbackText:e.textIcon||e.id.slice(0,2).toUpperCase(),fallbackColor:e.color})}),(0,n.jsxs)("div",{children:[(0,n.jsx)("h3",{className:"font-semibold text-sm",children:e.name}),(0,n.jsxs)("div",{className:"flex items-center gap-2 mt-0.5 flex-wrap",children:[i&&(0,n.jsx)(d.Ex,{variant:"default",size:"sm",children:"Custom"}),r?(0,n.jsx)(d.Ex,{variant:"success",size:"sm",children:"Ready"}):0===v?(0,n.jsx)("span",{className:"text-xs text-text-muted",children:"No connections"}):(0,n.jsxs)(n.Fragment,{children:[x>0&&(0,n.jsxs)(d.Ex,{variant:"success",size:"sm",dot:!0,children:[x," Connected"]}),p>0&&(0,n.jsxs)(d.Ex,{variant:"error",size:"sm",dot:!0,children:[p," Error"]}),0===x&&0===p&&(0,n.jsxs)(d.Ex,{variant:"default",size:"sm",children:[v," Added"]})]})]})]})]})})})}function p({title:e,icon:t,kind:s,connections:i,providers:o,custom:r,addLabel:l,onAddCustom:c}){let a=[...o,...r];return(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-3",children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-primary",children:t}),(0,n.jsx)("h2",{className:"text-base font-semibold",children:e}),(0,n.jsxs)("span",{className:"text-xs text-text-muted",children:["(",o.length," providers \xb7 ",r.length," custom)"]})]}),c&&(0,n.jsxs)(d.$n,{size:"sm",icon:"add",onClick:c,children:["Add Custom ",l]})]}),0===a.length?(0,n.jsx)("div",{className:"text-center py-8 border border-dashed border-border rounded-xl text-text-muted text-sm",children:"No providers."}):(0,n.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:a.map(e=>(0,n.jsx)(h,{provider:e,kind:s,connections:i,isCustom:e.isCustom},e.id))})]})}function v(){let[e,t]=(0,r.useState)([]),[s,i]=(0,r.useState)([]),[o,l]=(0,r.useState)(null);return(0,r.useEffect)(()=>{fetch("/api/providers",{cache:"no-store"}).then(e=>e.json()).then(e=>t(e.connections||[])).catch(()=>{}),fetch("/api/provider-nodes",{cache:"no-store"}).then(e=>e.json()).then(e=>i((e.nodes||[]).filter(e=>["custom-stt","custom-tts"].includes(e.type)))).catch(()=>{})},[]),(0,n.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,n.jsx)(d.zY,{title:"Media Providers",description:"Text to Image, speech-to-text, and text-to-speech providers",icon:"perm_media"}),m.map(t=>{let i=(0,c.o5)(t.kind).map(e=>({...e})),o=s.filter(e=>e.type===t.nodeType).map(e=>({id:e.id,name:e.name||`Custom ${t.addLabel}`,isCustom:!0,...x[t.nodeType]||{color:"#6366F1",textIcon:"CE"}}));return(0,n.jsxs)("div",{children:[(0,n.jsx)(p,{title:t.title,icon:t.icon,kind:t.kind,providers:i,custom:o,connections:e,addLabel:t.addLabel,onAddCustom:t.nodeType?()=>l(t.nodeType):null}),t!==m[m.length-1]&&(0,n.jsx)("div",{className:"my-6 border-t border-border"})]},t.kind)}),(0,n.jsx)(d.x0,{isOpen:!!o,nodeType:o||"custom-stt",onClose:()=>l(null),onCreated:e=>{i(t=>[...t,e]),l(null)}})]})}},61412:(e,t,s)=>{Promise.resolve().then(s.bind(s,57767))}},e=>{e.O(0,[27,9086,705,1321,5497,8441,3794,7358],()=>e(e.s=61412)),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9260],{55039:(e,s,t)=>{Promise.resolve().then(t.bind(t,71088))},71088:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>u});var r=t(95155),a=t(98500),i=t.n(a),l=t(12115),c=t(73321),o=t(35497),n=t(57250),d=t(88105),m=t(8247);function x(e){let s=Object.entries(e).some(([e,s])=>e.startsWith("modelLock_")&&s&&new Date(s).getTime()>Date.now());return"unavailable"!==e.testStatus||s?e.testStatus:"active"}function h({provider:e,kind:s,connections:t}){let a=d.Q2[e.id],l=!!a?.noAuth,c=t.filter(s=>s.provider===e.id),p=c.filter(e=>{let s=x(e);return"active"===s||"success"===s}).length,b=c.filter(e=>{let s=x(e);return"error"===s||"expired"===s||"unavailable"===s}).length,u=c.length,f=u>0&&c.every(e=>!1===e.isActive);return(0,r.jsx)(i(),{href:`/dashboard/media-providers/${s}/${e.id}`,className:"group",children:(0,r.jsx)(o.Zp,{padding:"xs",className:`h-full hover:bg-black/[0.01] dark:hover:bg-white/[0.01] transition-colors cursor-pointer ${f?"opacity-50":""}`,children:(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,r.jsx)("div",{className:"size-8 rounded-lg flex items-center justify-center shrink-0",style:{backgroundColor:`${e.color?.length>7?e.color:(e.color??"#888")+"15"}`},children:(0,r.jsx)(n.A,{src:(0,m.k)(e.id),alt:e.name,size:30,className:"object-contain rounded-lg max-w-[30px] max-h-[30px]",fallbackText:e.textIcon||e.id.slice(0,2).toUpperCase(),fallbackColor:e.color})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"font-semibold text-sm",children:e.name}),(0,r.jsx)("div",{className:"flex items-center gap-2 mt-0.5 flex-wrap",children:l?(0,r.jsx)(o.Ex,{variant:"success",size:"sm",children:"Ready"}):f?(0,r.jsx)(o.Ex,{variant:"default",size:"sm",children:"Disabled"}):0===u?(0,r.jsx)("span",{className:"text-xs text-text-muted",children:"No connections"}):(0,r.jsxs)(r.Fragment,{children:[p>0&&(0,r.jsxs)(o.Ex,{variant:"success",size:"sm",dot:!0,children:[p," Connected"]}),b>0&&(0,r.jsxs)(o.Ex,{variant:"error",size:"sm",dot:!0,children:[b," Error"]}),0===p&&0===b&&(0,r.jsxs)(o.Ex,{variant:"default",size:"sm",children:[u," Added"]})]})})]})]})})})}function p({combos:e}){return 0===e.length?(0,r.jsx)("p",{className:"text-xs text-text-muted italic",children:"No combos yet."}):(0,r.jsx)("div",{className:"flex flex-col gap-2",children:e.map(e=>(0,r.jsx)(i(),{href:`/dashboard/media-providers/combo/${e.id}`,children:(0,r.jsx)(o.Zp,{padding:"xs",className:"hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors cursor-pointer",children:(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary text-[18px]",children:"layers"}),(0,r.jsx)("code",{className:"text-sm font-mono font-medium flex-1 truncate",children:e.name}),(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-1 sm:shrink-0",children:[e.models.slice(0,6).map((e,s)=>{let t="string"==typeof e?e.split("/")[0]:"",a=d.Q2[t];return(0,r.jsx)("div",{title:a?.name||e,className:"size-5 rounded flex items-center justify-center",style:{backgroundColor:`${a?.color??"#888"}15`},children:(0,r.jsx)(n.A,{src:(0,m.k)(t),alt:a?.name||t,size:18,className:"object-contain rounded max-w-[18px] max-h-[18px]",fallbackText:a?.textIcon||t.slice(0,2).toUpperCase(),fallbackColor:a?.color})},`${e}-${s}`)}),e.models.length>6&&(0,r.jsxs)("span",{className:"text-[10px] text-text-muted ml-1",children:["+",e.models.length-6]})]}),(0,r.jsx)("span",{className:"text-[11px] text-text-muted shrink-0",children:e.models.length}),(0,r.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[16px]",children:"chevron_right"})]})})},e.id))})}function b({title:e,icon:s,kind:t,providers:a,connections:i,combos:l,onCreateCombo:c}){return(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-3",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary",children:s}),(0,r.jsx)("h2",{className:"text-base font-semibold",children:e}),(0,r.jsxs)("span",{className:"text-xs text-text-muted",children:["(",a.length," providers \xb7 ",l.length," combos)"]})]}),(0,r.jsx)(o.$n,{size:"sm",icon:"add",onClick:c,children:"Create Combo"})]}),l.length>0&&(0,r.jsx)("div",{className:"mb-4",children:(0,r.jsx)(p,{combos:l})}),0===a.length?(0,r.jsx)("div",{className:"text-center py-8 border border-dashed border-border rounded-xl text-text-muted text-sm",children:"No providers."}):(0,r.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:a.map(e=>(0,r.jsx)(h,{provider:e,kind:t,connections:i},e.id))})]})}function u(){let e=(0,c.useRouter)(),[s,t]=(0,l.useState)([]),[a,i]=(0,l.useState)([]),n=async()=>{try{let[e,s]=await Promise.all([fetch("/api/providers",{cache:"no-store"}),fetch("/api/combos",{cache:"no-store"})]);e.ok&&t((await e.json()).connections||[]),s.ok&&i((await s.json()).combos||[])}catch{}};(0,l.useEffect)(()=>{n()},[]);let m=(0,d.o5)("webSearch"),x=(0,d.o5)("webFetch"),h=a.filter(e=>"webSearch"===e.kind),p=a.filter(e=>"webFetch"===e.kind),u=async s=>{let t="webSearch"===s?"search-combo":"fetch-combo",r=t,i=1,l=new Set(a.map(e=>e.name));for(;l.has(r);)r=`${t}-${i++}`;let c=await fetch("/api/combos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:r,models:[],kind:s})});if(c.ok){let s=await c.json();e.push(`/dashboard/media-providers/combo/${s.id}`)}else alert((await c.json()).error||"Failed to create combo")};return(0,r.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,r.jsx)(o.zY,{title:"Web Fetch & Search",description:"Web search and web fetch providers",icon:"travel_explore"}),(0,r.jsx)(b,{title:"Web Search",icon:"search",kind:"webSearch",providers:m,connections:s,combos:h,onCreateCombo:()=>u("webSearch")}),(0,r.jsx)("div",{className:"border-t border-border"}),(0,r.jsx)(b,{title:"Web Fetch",icon:"travel_explore",kind:"webFetch",providers:x,connections:s,combos:p,onCreateCombo:()=>u("webFetch")})]})}}},e=>{e.O(0,[27,
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9260],{55039:(e,s,t)=>{Promise.resolve().then(t.bind(t,71088))},71088:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>u});var r=t(95155),a=t(98500),i=t.n(a),l=t(12115),c=t(73321),o=t(35497),n=t(57250),d=t(88105),m=t(8247);function x(e){let s=Object.entries(e).some(([e,s])=>e.startsWith("modelLock_")&&s&&new Date(s).getTime()>Date.now());return"unavailable"!==e.testStatus||s?e.testStatus:"active"}function h({provider:e,kind:s,connections:t}){let a=d.Q2[e.id],l=!!a?.noAuth,c=t.filter(s=>s.provider===e.id),p=c.filter(e=>{let s=x(e);return"active"===s||"success"===s}).length,b=c.filter(e=>{let s=x(e);return"error"===s||"expired"===s||"unavailable"===s}).length,u=c.length,f=u>0&&c.every(e=>!1===e.isActive);return(0,r.jsx)(i(),{href:`/dashboard/media-providers/${s}/${e.id}`,className:"group",children:(0,r.jsx)(o.Zp,{padding:"xs",className:`h-full hover:bg-black/[0.01] dark:hover:bg-white/[0.01] transition-colors cursor-pointer ${f?"opacity-50":""}`,children:(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,r.jsx)("div",{className:"size-8 rounded-lg flex items-center justify-center shrink-0",style:{backgroundColor:`${e.color?.length>7?e.color:(e.color??"#888")+"15"}`},children:(0,r.jsx)(n.A,{src:(0,m.k)(e.id),alt:e.name,size:30,className:"object-contain rounded-lg max-w-[30px] max-h-[30px]",fallbackText:e.textIcon||e.id.slice(0,2).toUpperCase(),fallbackColor:e.color})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"font-semibold text-sm",children:e.name}),(0,r.jsx)("div",{className:"flex items-center gap-2 mt-0.5 flex-wrap",children:l?(0,r.jsx)(o.Ex,{variant:"success",size:"sm",children:"Ready"}):f?(0,r.jsx)(o.Ex,{variant:"default",size:"sm",children:"Disabled"}):0===u?(0,r.jsx)("span",{className:"text-xs text-text-muted",children:"No connections"}):(0,r.jsxs)(r.Fragment,{children:[p>0&&(0,r.jsxs)(o.Ex,{variant:"success",size:"sm",dot:!0,children:[p," Connected"]}),b>0&&(0,r.jsxs)(o.Ex,{variant:"error",size:"sm",dot:!0,children:[b," Error"]}),0===p&&0===b&&(0,r.jsxs)(o.Ex,{variant:"default",size:"sm",children:[u," Added"]})]})})]})]})})})}function p({combos:e}){return 0===e.length?(0,r.jsx)("p",{className:"text-xs text-text-muted italic",children:"No combos yet."}):(0,r.jsx)("div",{className:"flex flex-col gap-2",children:e.map(e=>(0,r.jsx)(i(),{href:`/dashboard/media-providers/combo/${e.id}`,children:(0,r.jsx)(o.Zp,{padding:"xs",className:"hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors cursor-pointer",children:(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary text-[18px]",children:"layers"}),(0,r.jsx)("code",{className:"text-sm font-mono font-medium flex-1 truncate",children:e.name}),(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-1 sm:shrink-0",children:[e.models.slice(0,6).map((e,s)=>{let t="string"==typeof e?e.split("/")[0]:"",a=d.Q2[t];return(0,r.jsx)("div",{title:a?.name||e,className:"size-5 rounded flex items-center justify-center",style:{backgroundColor:`${a?.color??"#888"}15`},children:(0,r.jsx)(n.A,{src:(0,m.k)(t),alt:a?.name||t,size:18,className:"object-contain rounded max-w-[18px] max-h-[18px]",fallbackText:a?.textIcon||t.slice(0,2).toUpperCase(),fallbackColor:a?.color})},`${e}-${s}`)}),e.models.length>6&&(0,r.jsxs)("span",{className:"text-[10px] text-text-muted ml-1",children:["+",e.models.length-6]})]}),(0,r.jsx)("span",{className:"text-[11px] text-text-muted shrink-0",children:e.models.length}),(0,r.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[16px]",children:"chevron_right"})]})})},e.id))})}function b({title:e,icon:s,kind:t,providers:a,connections:i,combos:l,onCreateCombo:c}){return(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-3",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary",children:s}),(0,r.jsx)("h2",{className:"text-base font-semibold",children:e}),(0,r.jsxs)("span",{className:"text-xs text-text-muted",children:["(",a.length," providers \xb7 ",l.length," combos)"]})]}),(0,r.jsx)(o.$n,{size:"sm",icon:"add",onClick:c,children:"Create Combo"})]}),l.length>0&&(0,r.jsx)("div",{className:"mb-4",children:(0,r.jsx)(p,{combos:l})}),0===a.length?(0,r.jsx)("div",{className:"text-center py-8 border border-dashed border-border rounded-xl text-text-muted text-sm",children:"No providers."}):(0,r.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:a.map(e=>(0,r.jsx)(h,{provider:e,kind:t,connections:i},e.id))})]})}function u(){let e=(0,c.useRouter)(),[s,t]=(0,l.useState)([]),[a,i]=(0,l.useState)([]),n=async()=>{try{let[e,s]=await Promise.all([fetch("/api/providers",{cache:"no-store"}),fetch("/api/combos",{cache:"no-store"})]);e.ok&&t((await e.json()).connections||[]),s.ok&&i((await s.json()).combos||[])}catch{}};(0,l.useEffect)(()=>{n()},[]);let m=(0,d.o5)("webSearch"),x=(0,d.o5)("webFetch"),h=a.filter(e=>"webSearch"===e.kind),p=a.filter(e=>"webFetch"===e.kind),u=async s=>{let t="webSearch"===s?"search-combo":"fetch-combo",r=t,i=1,l=new Set(a.map(e=>e.name));for(;l.has(r);)r=`${t}-${i++}`;let c=await fetch("/api/combos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:r,models:[],kind:s})});if(c.ok){let s=await c.json();e.push(`/dashboard/media-providers/combo/${s.id}`)}else alert((await c.json()).error||"Failed to create combo")};return(0,r.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,r.jsx)(o.zY,{title:"Web Fetch & Search",description:"Web search and web fetch providers",icon:"travel_explore"}),(0,r.jsx)(b,{title:"Web Search",icon:"search",kind:"webSearch",providers:m,connections:s,combos:h,onCreateCombo:()=>u("webSearch")}),(0,r.jsx)("div",{className:"border-t border-border"}),(0,r.jsx)(b,{title:"Web Fetch",icon:"travel_explore",kind:"webFetch",providers:x,connections:s,combos:p,onCreateCombo:()=>u("webFetch")})]})}}},e=>{e.O(0,[27,9086,705,1321,5497,8441,3794,7358],()=>e(e.s=55039)),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6607],{23879:(e,t,s)=>{"use strict";s.d(t,{default:()=>d});var a=s(95155),i=s(12115),n=s(3534),r=s(28777),o=s(88105),l=s(64137),c=s(54960);function d(){let[e,t]=(0,i.useState)([]),[s,d]=(0,i.useState)([]),[u,h]=(0,i.useState)({}),[p,f]=(0,i.useState)(!1),[g,w]=(0,i.useState)(null),[x,y]=(0,i.useState)({running:!1,certExists:!1,dnsStatus:{},hasCachedPassword:!1});(0,i.useEffect)(()=>{v(),m(),S(),b()},[]);let v=async()=>{try{let e=await fetch("/api/providers");if(e.ok){let s=await e.json();t(s.connections||[])}}catch{}},m=async()=>{try{let e=await fetch("/api/keys");if(e.ok){let t=await e.json();d(t.keys||[])}}catch{}},S=async()=>{try{let e=await fetch("/api/models/alias");if(e.ok){let t=await e.json();h(t.aliases||{})}}catch{}},b=async()=>{try{let e=await fetch("/api/settings");if(e.ok){let t=await e.json();f(t.cloudEnabled||!1)}}catch{}},j=()=>e.filter(e=>!1!==e.isActive),k=Object.entries(n.wn);return(0,a.jsxs)("div",{className:"flex w-full flex-col gap-6",children:[(0,a.jsx)(c.default,{title:"MITM Proxy",description:"Intercept selected IDE traffic through the gateway",icon:"security"}),(0,a.jsxs)("div",{className:"flex items-start gap-2 rounded-panel border border-warning/30 bg-warning/10 px-3 py-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined mt-0.5 shrink-0 text-[16px] text-warning",children:"warning"}),(0,a.jsx)("p",{className:"text-xs leading-relaxed text-warning",children:"MITM intercepts HTTPS traffic of IDE tools (Antigravity, GitHub Copilot, Kiro) via local CA to redirect requests to your providers. May violate ToS → account ban. Use at your own risk."})]}),(0,a.jsx)(l.tA,{apiKeys:s,cloudEnabled:p,onStatusChange:y}),(0,a.jsx)("div",{className:"grid gap-3 sm:gap-4",children:k.map(([e,t])=>(0,a.jsx)(l.kn,{tool:t,isExpanded:g===e,onToggle:()=>w(g===e?null:e),serverRunning:x.running,dnsActive:x.dnsStatus?.[e]||!1,hasCachedPassword:x.hasCachedPassword||!1,needsSudoPassword:!1!==x.needsSudoPassword,isWin:!0===x.isWin,apiKeys:s,activeProviders:j(),hasActiveProviders:j().some(e=>(0,r.KC)(e.provider).length>0||(0,o.mq)(e.provider)||(0,o.gb)(e.provider)),modelAliases:u,cloudEnabled:p,onDnsChange:e=>y(t=>({...t,dnsStatus:e.dnsStatus??t.dnsStatus}))},e))})]})}},80409:(e,t,s)=>{Promise.resolve().then(s.bind(s,23879))}},e=>{e.O(0,[27,5772,
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6607],{23879:(e,t,s)=>{"use strict";s.d(t,{default:()=>d});var a=s(95155),i=s(12115),n=s(3534),r=s(28777),o=s(88105),l=s(64137),c=s(54960);function d(){let[e,t]=(0,i.useState)([]),[s,d]=(0,i.useState)([]),[u,h]=(0,i.useState)({}),[p,f]=(0,i.useState)(!1),[g,w]=(0,i.useState)(null),[x,y]=(0,i.useState)({running:!1,certExists:!1,dnsStatus:{},hasCachedPassword:!1});(0,i.useEffect)(()=>{v(),m(),S(),b()},[]);let v=async()=>{try{let e=await fetch("/api/providers");if(e.ok){let s=await e.json();t(s.connections||[])}}catch{}},m=async()=>{try{let e=await fetch("/api/keys");if(e.ok){let t=await e.json();d(t.keys||[])}}catch{}},S=async()=>{try{let e=await fetch("/api/models/alias");if(e.ok){let t=await e.json();h(t.aliases||{})}}catch{}},b=async()=>{try{let e=await fetch("/api/settings");if(e.ok){let t=await e.json();f(t.cloudEnabled||!1)}}catch{}},j=()=>e.filter(e=>!1!==e.isActive),k=Object.entries(n.wn);return(0,a.jsxs)("div",{className:"flex w-full flex-col gap-6",children:[(0,a.jsx)(c.default,{title:"MITM Proxy",description:"Intercept selected IDE traffic through the gateway",icon:"security"}),(0,a.jsxs)("div",{className:"flex items-start gap-2 rounded-panel border border-warning/30 bg-warning/10 px-3 py-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined mt-0.5 shrink-0 text-[16px] text-warning",children:"warning"}),(0,a.jsx)("p",{className:"text-xs leading-relaxed text-warning",children:"MITM intercepts HTTPS traffic of IDE tools (Antigravity, GitHub Copilot, Kiro) via local CA to redirect requests to your providers. May violate ToS → account ban. Use at your own risk."})]}),(0,a.jsx)(l.tA,{apiKeys:s,cloudEnabled:p,onStatusChange:y}),(0,a.jsx)("div",{className:"grid gap-3 sm:gap-4",children:k.map(([e,t])=>(0,a.jsx)(l.kn,{tool:t,isExpanded:g===e,onToggle:()=>w(g===e?null:e),serverRunning:x.running,dnsActive:x.dnsStatus?.[e]||!1,hasCachedPassword:x.hasCachedPassword||!1,needsSudoPassword:!1!==x.needsSudoPassword,isWin:!0===x.isWin,apiKeys:s,activeProviders:j(),hasActiveProviders:j().some(e=>(0,r.KC)(e.provider).length>0||(0,o.mq)(e.provider)||(0,o.gb)(e.provider)),modelAliases:u,cloudEnabled:p,onDnsChange:e=>y(t=>({...t,dnsStatus:e.dnsStatus??t.dnsStatus}))},e))})]})}},80409:(e,t,s)=>{Promise.resolve().then(s.bind(s,23879))}},e=>{e.O(0,[27,5772,9086,705,1321,5497,9622,8441,3794,7358],()=>e(e.s=80409)),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3645],{41190:(e,t,s)=>{Promise.resolve().then(s.bind(s,54645))},54645:(e,t,s)=>{"use strict";s.d(t,{default:()=>B});var a=s(95155),r=s(12115),l=s(35497),n=s(14051),i=s.n(n);let o=e=>{let t=Number(e||0);return t>=1e9?`${(t/1e9).toFixed(1)}B`:t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}K`:t.toLocaleString()},c=[{key:"rtk",label:"RTK",icon:"compress",color:"text-primary"},{key:"headroom",label:"Headroom",icon:"air",color:"text-info"},{key:"pxpipe",label:"Pxpipe",icon:"image_search",color:"text-secondary"},{key:"cache",label:"Cache",icon:"cached",color:"text-success"},{key:"caveman",label:"Caveman",icon:"short_text",color:"text-warning"},{key:"ponytail",label:"Ponytail",icon:"notes",color:"text-accent"}];function d({breakdown:e}){let t=c.map(t=>({...t,value:e?.[t.key]||0})).filter(e=>e.value>0);return 0===t.length?(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"No per-mechanism data yet."}):(0,a.jsx)("div",{className:"flex flex-wrap gap-1.5 pt-1",children:t.map(e=>(0,a.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[11px] font-medium",title:`${e.label}: ${e.value.toLocaleString()} tokens saved`,children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[12px] ${e.color}`,children:e.icon}),(0,a.jsx)("span",{className:"text-text-muted",children:e.label}),(0,a.jsx)("span",{className:"font-semibold text-text-main",children:o(e.value)})]},e.key))})}let x=[{key:"tokensSaved",icon:"savings",color:"success",label:"Tokens Saved",sub:"All token savers",expandable:!0},{key:"requestsRouted",icon:"route",color:"primary",label:"Requests Routed",sub:"Lifetime"},{key:"cacheTokens",icon:"cached",color:"info",label:"Cache Tokens",sub:"From cache reads"}];function m({data:e}){let[t,s]=(0,r.useState)(!1);if(!e)return null;let l={tokensSaved:e.tokensSavedLifetime,requestsRouted:e.totalRequestsLifetime,cacheTokens:e.totalCachedTokens};return(0,a.jsx)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-3",children:x.map(r=>{let n=r.expandable&&t;return(0,a.jsxs)("div",{className:`flex flex-col gap-2 rounded-panel border bg-panel p-5 shadow-[var(--shadow-soft)] ${r.expandable?"cursor-pointer transition-colors hover:border-primary/30":"border-border-subtle"} ${n?"border-primary/30":"border-border-subtle"}`,onClick:r.expandable?()=>s(e=>!e):void 0,children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:`flex size-10 items-center justify-center rounded-brand ring-1 ${{success:"bg-success/10 text-success ring-success/20",primary:"bg-primary/10 text-primary ring-primary/20",info:"bg-info/10 text-info ring-info/20"}[r.color]}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:r.icon})}),(0,a.jsx)("div",{className:"min-w-0 flex-1",children:(0,a.jsx)("span",{className:"text-2xl font-bold text-text-main",children:o(l[r.key])})}),r.expandable&&(0,a.jsx)("span",{className:`material-symbols-outlined text-[18px] text-text-muted transition-transform ${n?"rotate-180":""}`,children:"expand_more"})]}),(0,a.jsx)("div",{className:"text-sm font-medium text-text-main",children:r.label}),(0,a.jsx)("div",{className:"text-xs text-text-muted",children:r.sub}),n&&"tokensSaved"===r.key&&(0,a.jsxs)("div",{className:"mt-2 border-t border-border-subtle pt-2",children:[(0,a.jsx)("p",{className:"mb-1.5 text-[11px] font-semibold uppercase tracking-wide text-text-muted",children:"Breakdown by mechanism"}),(0,a.jsx)(d,{breakdown:e.tokensSavedByMechanism}),e.semanticCacheHits>0&&(0,a.jsxs)("p",{className:"mt-2 text-[11px] text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px] align-middle text-success",children:"bolt"})," ",e.semanticCacheHits.toLocaleString()," cache hits served from Semantic Cache"]})]})]},r.key)})})}m.propTypes={data:i().object};var u=s(84588);function p(e){return 0===e?"$0.00":e>=1e3?`$${(e/1e3).toFixed(1)}K`:e>=1?`$${e.toFixed(2)}`:`$${e.toFixed(4)}`}function h(e){let t=Number(e)||0;return t>=1048576?`${(t/1048576).toFixed(1)}MB`:t>=1024?`${(t/1024).toFixed(1)}KB`:`${Math.round(t)}B`}let b=[{key:"rtk",label:"RTK",icon:"compress",color:"#3B82F6"},{key:"headroom",label:"Headroom",icon:"expand_less",color:"#10B981"},{key:"pxpipe",label:"Pxpipe",icon:"image_search",color:"#8B5CF6"},{key:"cache",label:"Cache",icon:"cached",color:"#F59E0B"},{key:"caveman",label:"Caveman",icon:"short_text",color:"#EF4444"},{key:"ponytail",label:"Ponytail",icon:"code",color:"#EC4899"}];function f({data:e}){let[t,s]=(0,r.useState)(!1),l=e?.costSavedLifetime||0,n=e?.costSavedByMechanism||{},i=e?.tokensSavedLifetime||0,o=e?.bytesSavedByMechanism?.headroom||null,c=o?.bodyBefore>0?((o.bodyBefore-o.bodyAfter)/o.bodyBefore*100).toFixed(1):null,d=e?.totalCost||0;return(0,a.jsxs)(u.default,{padding:"md",className:"relative overflow-hidden",children:[(0,a.jsx)("div",{className:"pointer-events-none absolute inset-0 bg-gradient-to-br from-emerald-500/5 to-transparent"}),(0,a.jsxs)("div",{className:"relative flex items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-4",children:[(0,a.jsx)("div",{className:"flex size-14 items-center justify-center rounded-2xl bg-emerald-500/10",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[32px] text-emerald-500",children:"payments"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-xs font-medium uppercase tracking-wide text-text-muted",children:"Total Dollar Savings"}),(0,a.jsx)("p",{className:"text-3xl font-bold text-emerald-500",children:p(l)}),(0,a.jsxs)("p",{className:"mt-0.5 text-xs text-text-muted",children:[i.toLocaleString()," tokens saved across all mechanisms"]})]})]}),(0,a.jsxs)("div",{className:"hidden flex-col items-end gap-1 sm:flex",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 rounded-lg bg-surface-2 px-3 py-1.5",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted",children:"Without ER:"}),(0,a.jsx)("span",{className:"text-sm font-semibold text-red-500 line-through opacity-70",children:p(d+l)})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2 rounded-lg bg-emerald-500/10 px-3 py-1.5",children:[(0,a.jsx)("span",{className:"text-xs text-emerald-600 dark:text-emerald-400",children:"With ER:"}),(0,a.jsx)("span",{className:"text-sm font-semibold text-emerald-500",children:p(d)})]})]})]}),(0,a.jsxs)("button",{onClick:()=>s(e=>!e),className:"relative mt-3 flex w-full items-center justify-between rounded-lg bg-surface-2/50 px-3 py-2 text-left transition-colors hover:bg-surface-2",children:[(0,a.jsx)("span",{className:"text-xs font-medium text-text-muted",children:"Savings by mechanism"}),(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-text-muted transition-transform",style:{transform:t?"rotate(180deg)":"none"},children:"expand_more"})]}),t&&(0,a.jsx)("div",{className:"relative mt-2 grid grid-cols-2 gap-2 sm:grid-cols-3",children:b.map(e=>{let t=n[e.key]||0,s=l>0?t/l*100:0;return(0,a.jsxs)("div",{className:"flex items-center gap-2 rounded-lg border border-border-subtle px-2.5 py-2",children:[(0,a.jsx)("div",{className:"flex size-7 shrink-0 items-center justify-center rounded-md",style:{backgroundColor:`${e.color}15`},children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",style:{color:e.color},children:e.icon})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("p",{className:"truncate text-xs font-medium text-text-primary",children:e.label}),(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:[p(t)," ",(0,a.jsxs)("span",{className:"opacity-50",children:["(",s.toFixed(0),"%)"]})]})]})]},e.key)})}),null!==c&&(0,a.jsxs)("div",{className:"mt-2 rounded-lg border border-emerald-500/20 bg-emerald-500/5 px-3 py-2",children:[(0,a.jsxs)("p",{className:"flex items-center gap-1.5 text-xs font-medium text-emerald-600 dark:text-emerald-400",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"expand_less"}),"Headroom effective payload savings: ",c,"% outbound"]}),(0,a.jsxs)("p",{className:"mt-0.5 text-xs text-text-muted",children:["body ",h(o.bodyBefore)," → ",h(o.bodyAfter),o.toolsBefore>0&&` \xb7 tools ${h(o.toolsBefore)} → ${h(o.toolsAfter)}`,o.historyBefore>0&&` \xb7 history ${h(o.historyBefore)} → ${h(o.historyAfter)}`,o.requests>0&&` \xb7 ${o.requests.toLocaleString()} compressed request${1===o.requests?"":"s"}`]})]})]})}var y=s(98500),v=s.n(y),g=s(57250),j=s(8247),N=s(92899);let k=[{value:"24h",label:"24h"},{value:"7d",label:"7d"},{value:"30d",label:"30d"}],$=[{key:"requests",label:"Requests",sortable:!0},{key:"totalTokens",label:"Tokens",sortable:!0},{key:"avgTtft",label:"TTFT",sortable:!0},{key:"p95Latency",label:"P95",sortable:!0},{key:"successRate",label:"Success",sortable:!0},{key:"cost",label:"Cost",sortable:!0}];function w(){let[e,t]=(0,r.useState)([]),[s,l]=(0,r.useState)(!0),[n,i]=(0,r.useState)("7d"),[o,c]=(0,r.useState)("requests"),[d,x]=(0,r.useState)("desc");(0,r.useEffect)(()=>{let e=!1;return l(!0),fetch(`/api/usage/leaderboard?period=${n}`).then(e=>e.json()).then(s=>{e||s.error||t(s.leaderboard||[])}).catch(()=>{}).finally(()=>{e||l(!1)}),()=>{e=!0}},[n]);let m=(0,r.useMemo)(()=>{let t=[...e];return t.sort((e,t)=>{let s=e[o]??-1,a=t[o]??-1;return"desc"===d?a-s:s-a}),t},[e,o,d]);return(0,a.jsx)(u.default,{title:"Provider Leaderboard",subtitle:"Performance ranking by requests, latency, and cost",icon:"leaderboard",padding:"none",action:(0,a.jsx)("div",{className:"flex items-center gap-1",children:k.map(e=>(0,a.jsx)("button",{onClick:()=>i(e.value),className:`rounded-md px-2 py-1 text-xs font-medium transition-colors ${n===e.value?"bg-primary/10 text-primary":"text-text-muted hover:bg-surface-2"}`,children:e.label},e.value))}),children:s?(0,a.jsxs)("div",{className:"flex items-center justify-center gap-2 py-12 text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-[20px]",children:"progress_activity"}),(0,a.jsx)("span",{className:"text-sm",children:"Loading leaderboard..."})]}):0===m.length?(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center gap-2 py-12 text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[40px] opacity-20",children:"leaderboard"}),(0,a.jsx)("span",{className:"text-sm",children:"No usage data for this period"})]}):(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full min-w-[640px] text-left",children:[(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{className:"border-b border-border bg-surface-2/50",children:[(0,a.jsx)("th",{className:"px-3 py-2 text-[10px] font-medium uppercase tracking-wide text-text-muted",children:"Provider"}),$.map(e=>(0,a.jsxs)("th",{onClick:()=>{var t;return e.sortable&&void(o===(t=e.key)?x(e=>"desc"===e?"asc":"desc"):(c(t),x("desc")))},className:`px-3 py-2 text-[10px] font-medium uppercase tracking-wide ${e.sortable?"cursor-pointer select-none hover:text-text-primary":""} ${o===e.key?"text-primary":"text-text-muted"}`,children:[e.label,o===e.key&&(0,a.jsx)("span",{className:"material-symbols-outlined ml-0.5 inline text-[12px] align-middle",children:"desc"===d?"arrow_downward":"arrow_upward"})]},e.key))]})}),(0,a.jsx)("tbody",{children:m.map((e,t)=>{var s,r,l;let n=e.successRate>=95?"text-emerald-500":e.successRate>=80?"text-amber-500":"text-red-500",i=(0,N.vT)(e.p95Latency,e.latencySampleCount);return(0,a.jsxs)("tr",{className:"border-b border-border-subtle transition-colors hover:bg-surface-2/30",children:[(0,a.jsx)("td",{className:"px-3 py-2.5",children:(0,a.jsxs)(v(),{href:`/dashboard/providers/${e.provider}`,className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-[10px] font-mono text-text-muted w-4",children:t+1}),(0,a.jsx)("div",{className:"flex size-6 shrink-0 items-center justify-center rounded",children:(0,a.jsx)(g.A,{src:(0,j.k)(e.provider),alt:e.provider,size:24,className:"object-contain rounded",fallbackText:e.provider?.slice(0,2).toUpperCase(),fallbackColor:e.color})}),(0,a.jsx)("span",{className:"truncate text-xs font-medium text-text-primary",children:e.displayName})]})}),(0,a.jsx)("td",{className:"px-3 py-2.5 text-xs tabular-nums text-text-primary",children:e.requests.toLocaleString()}),(0,a.jsx)("td",{className:"px-3 py-2.5 text-xs tabular-nums text-text-muted",children:(s=e.totalTokens)>=1e6?`${(s/1e6).toFixed(1)}M`:s>=1e3?`${(s/1e3).toFixed(1)}K`:String(s)}),(0,a.jsx)("td",{className:"px-3 py-2.5 text-xs tabular-nums text-text-muted",children:null==(r=e.avgTtft)?"—":r<1e3?`${r}ms`:`${(r/1e3).toFixed(1)}s`}),(0,a.jsx)("td",{className:"px-3 py-2.5 text-xs tabular-nums",children:i.insufficient?(0,a.jsx)("span",{className:"text-amber-500",title:`${e.latencySampleCount} latency sample${1===e.latencySampleCount?"":"s"} this period — need at least ${N.uv}`,children:"insufficient data"}):(0,a.jsx)("span",{className:"text-text-muted",children:i.value})}),(0,a.jsxs)("td",{className:`px-3 py-2.5 text-xs font-medium tabular-nums ${n}`,children:[e.successRate.toFixed(1),"%"]}),(0,a.jsx)("td",{className:"px-3 py-2.5 text-xs tabular-nums text-text-muted",children:null==(l=e.cost)||0===l?"$0.00":l<.01?`$${l.toFixed(4)}`:`$${l.toFixed(2)}`})]},e.provider)})})]})})})}let S=[{key:"rtkEnabled",name:"RTK Token Saver",icon:"compress"},{key:"headroomEnabled",name:"Headroom",icon:"cloud_compress"},{key:"pxpipeEnabled",name:"Pxpipe",icon:"image_search"},{key:"semanticCacheEnabled",name:"Semantic Cache",icon:"cached"},{key:"cavemanEnabled",name:"Caveman Mode",icon:"cottage"},{key:"ponytailEnabled",name:"Ponytail",icon:"cut"}];function C({settings:e}){return e?(0,a.jsx)("div",{className:"flex flex-wrap gap-3",children:S.map(t=>{let s=!!e[t.key];return(0,a.jsxs)("div",{className:`flex items-center gap-2 rounded-brand border px-3 py-2 transition-colors ${s?"border-success/30 bg-success/5":"border-border-subtle bg-surface-2"}`,children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[18px] ${s?"text-success":"text-text-muted"}`,children:t.icon}),(0,a.jsx)("span",{className:"text-sm font-medium text-text-main",children:t.name}),(0,a.jsx)(l.Ex,{variant:s?"success":"default",size:"sm",dot:!0,children:s?"Active":"Off"})]},t.key)})}):null}C.propTypes={settings:i().object};let F=e=>{let t=Number(e||0);return t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}K`:t.toLocaleString()};function T({providers:e}){return e&&0!==e.length?(0,a.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 sm:gap-4 lg:grid-cols-3 xl:grid-cols-4",children:e.map(e=>{let t=e.color||"#6b7280",s=t.length>7?t:t+"15";return(0,a.jsxs)(v(),{href:`/dashboard/providers/${e.id}`,className:"group flex items-center gap-3 rounded-brand border border-border-subtle bg-panel px-3 py-2.5 shadow-[var(--shadow-soft)] transition-all hover:border-primary/35 hover:bg-panel-elev hover:shadow-[var(--shadow-warm)]",children:[(0,a.jsx)("div",{className:"size-8 shrink-0 rounded-lg flex items-center justify-center",style:{backgroundColor:s},children:(0,a.jsx)(g.A,{src:(0,j.k)(e.id),alt:e.name,size:24,className:"object-contain rounded max-w-[24px] max-h-[24px]",fallbackText:(e.name||e.id).slice(0,2).toUpperCase(),fallbackColor:t})}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("h3",{className:"truncate text-sm font-semibold text-text-main",children:e.name}),(0,a.jsx)("div",{className:"flex items-center gap-2 text-xs text-text-muted",children:e.requests>0?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("span",{className:"font-medium",children:[F(e.requests)," requests"]}),(0,a.jsx)("span",{children:"\xb7"}),(0,a.jsxs)("span",{children:[F(e.tokens)," tokens"]})]}):e.connected?(0,a.jsxs)("span",{className:"flex items-center gap-1 text-success",children:[(0,a.jsx)("span",{className:"size-1.5 rounded-full bg-success"}),"Connected"]}):(0,a.jsx)("span",{children:"No usage yet"})})]})]},e.id)})}):(0,a.jsx)(l.pp,{icon:"redeem",title:"No free providers used yet",description:"Connect a free provider (Kiro, OpenCode, etc.) and start routing requests to see usage here."})}function B(){let[e,t]=(0,r.useState)(null),[s,n]=(0,r.useState)(!0);return((0,r.useEffect)(()=>{fetch("/api/usage/meta").then(e=>e.json()).then(e=>{e.error||t(e)}).catch(()=>{}).finally(()=>n(!1))},[]),s)?(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsx)(l.zY,{title:"Overview",description:"Gateway summary, savings, and free-tier usage",icon:"dashboard"}),(0,a.jsx)(l.Qv,{}),(0,a.jsx)(l.Qv,{})]}):(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-6",children:[(0,a.jsx)(l.zY,{title:"Overview",description:"Gateway summary, savings, and free-tier usage",icon:"dashboard"}),(0,a.jsx)(m,{data:e}),(0,a.jsx)(f,{data:e}),(0,a.jsx)(l.Zp,{title:"Token Savers",subtitle:"Input compression and output optimization",icon:"savings",padding:"sm",children:(0,a.jsx)(C,{settings:e?.tokenSaverSettings})}),(0,a.jsx)(l.Zp,{title:"Free Providers Used",subtitle:"Providers with no API cost routing through your gateway",icon:"redeem",padding:"sm",children:(0,a.jsx)(T,{providers:e?.freeProviders||[]})}),(0,a.jsx)(w,{})]})}T.propTypes={providers:i().arrayOf(i().shape({id:i().string,name:i().string,icon:i().string,color:i().string,requests:i().number,tokens:i().number}))}},92899:(e,t,s)=>{"use strict";s.d(t,{Se:()=>l,Uk:()=>r,uv:()=>a,vT:()=>n});let a=10;function r(e){return null==e||e>=a}function l(e){return null==e?"—":e<1e3?`${e}ms`:`${(e/1e3).toFixed(1)}s`}function n(e,t){return null==e?{value:"—",insufficient:!1}:r(t)?{value:l(e),insufficient:!1}:{value:"insufficient data",insufficient:!0}}}},e=>{e.O(0,[27,2563,705,1321,5497,8441,3794,7358],()=>e(e.s=41190)),_N_E=e.O()}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3645],{41190:(e,t,s)=>{Promise.resolve().then(s.bind(s,54645))},54645:(e,t,s)=>{"use strict";s.d(t,{default:()=>B});var a=s(95155),r=s(12115),l=s(35497),n=s(14051),i=s.n(n);let o=e=>{let t=Number(e||0);return t>=1e9?`${(t/1e9).toFixed(1)}B`:t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}K`:t.toLocaleString()},c=[{key:"rtk",label:"RTK",icon:"compress",color:"text-primary"},{key:"headroom",label:"Headroom",icon:"air",color:"text-info"},{key:"pxpipe",label:"Pxpipe",icon:"image_search",color:"text-secondary"},{key:"cache",label:"Cache",icon:"cached",color:"text-success"},{key:"caveman",label:"Caveman",icon:"short_text",color:"text-warning"},{key:"ponytail",label:"Ponytail",icon:"notes",color:"text-accent"}];function d({breakdown:e}){let t=c.map(t=>({...t,value:e?.[t.key]||0})).filter(e=>e.value>0);return 0===t.length?(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"No per-mechanism data yet."}):(0,a.jsx)("div",{className:"flex flex-wrap gap-1.5 pt-1",children:t.map(e=>(0,a.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-full bg-surface-2 px-2 py-0.5 text-[11px] font-medium",title:`${e.label}: ${e.value.toLocaleString()} tokens saved`,children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[12px] ${e.color}`,children:e.icon}),(0,a.jsx)("span",{className:"text-text-muted",children:e.label}),(0,a.jsx)("span",{className:"font-semibold text-text-main",children:o(e.value)})]},e.key))})}let x=[{key:"tokensSaved",icon:"savings",color:"success",label:"Tokens Saved",sub:"All token savers",expandable:!0},{key:"requestsRouted",icon:"route",color:"primary",label:"Requests Routed",sub:"Lifetime"},{key:"cacheTokens",icon:"cached",color:"info",label:"Cache Tokens",sub:"From cache reads"}];function m({data:e}){let[t,s]=(0,r.useState)(!1);if(!e)return null;let l={tokensSaved:e.tokensSavedLifetime,requestsRouted:e.totalRequestsLifetime,cacheTokens:e.totalCachedTokens};return(0,a.jsx)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-3",children:x.map(r=>{let n=r.expandable&&t;return(0,a.jsxs)("div",{className:`flex flex-col gap-2 rounded-panel border bg-panel p-5 shadow-[var(--shadow-soft)] ${r.expandable?"cursor-pointer transition-colors hover:border-primary/30":"border-border-subtle"} ${n?"border-primary/30":"border-border-subtle"}`,onClick:r.expandable?()=>s(e=>!e):void 0,children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:`flex size-10 items-center justify-center rounded-brand ring-1 ${{success:"bg-success/10 text-success ring-success/20",primary:"bg-primary/10 text-primary ring-primary/20",info:"bg-info/10 text-info ring-info/20"}[r.color]}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:r.icon})}),(0,a.jsx)("div",{className:"min-w-0 flex-1",children:(0,a.jsx)("span",{className:"text-2xl font-bold text-text-main",children:o(l[r.key])})}),r.expandable&&(0,a.jsx)("span",{className:`material-symbols-outlined text-[18px] text-text-muted transition-transform ${n?"rotate-180":""}`,children:"expand_more"})]}),(0,a.jsx)("div",{className:"text-sm font-medium text-text-main",children:r.label}),(0,a.jsx)("div",{className:"text-xs text-text-muted",children:r.sub}),n&&"tokensSaved"===r.key&&(0,a.jsxs)("div",{className:"mt-2 border-t border-border-subtle pt-2",children:[(0,a.jsx)("p",{className:"mb-1.5 text-[11px] font-semibold uppercase tracking-wide text-text-muted",children:"Breakdown by mechanism"}),(0,a.jsx)(d,{breakdown:e.tokensSavedByMechanism}),e.semanticCacheHits>0&&(0,a.jsxs)("p",{className:"mt-2 text-[11px] text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px] align-middle text-success",children:"bolt"})," ",e.semanticCacheHits.toLocaleString()," cache hits served from Semantic Cache"]})]})]},r.key)})})}m.propTypes={data:i().object};var u=s(84588);function p(e){return 0===e?"$0.00":e>=1e3?`$${(e/1e3).toFixed(1)}K`:e>=1?`$${e.toFixed(2)}`:`$${e.toFixed(4)}`}function h(e){let t=Number(e)||0;return t>=1048576?`${(t/1048576).toFixed(1)}MB`:t>=1024?`${(t/1024).toFixed(1)}KB`:`${Math.round(t)}B`}let b=[{key:"rtk",label:"RTK",icon:"compress",color:"#3B82F6"},{key:"headroom",label:"Headroom",icon:"expand_less",color:"#10B981"},{key:"pxpipe",label:"Pxpipe",icon:"image_search",color:"#8B5CF6"},{key:"cache",label:"Cache",icon:"cached",color:"#F59E0B"},{key:"caveman",label:"Caveman",icon:"short_text",color:"#EF4444"},{key:"ponytail",label:"Ponytail",icon:"code",color:"#EC4899"}];function f({data:e}){let[t,s]=(0,r.useState)(!1),l=e?.costSavedLifetime||0,n=e?.costSavedByMechanism||{},i=e?.tokensSavedLifetime||0,o=e?.bytesSavedByMechanism?.headroom||null,c=o?.bodyBefore>0?((o.bodyBefore-o.bodyAfter)/o.bodyBefore*100).toFixed(1):null,d=e?.totalCost||0;return(0,a.jsxs)(u.default,{padding:"md",className:"relative overflow-hidden",children:[(0,a.jsx)("div",{className:"pointer-events-none absolute inset-0 bg-gradient-to-br from-emerald-500/5 to-transparent"}),(0,a.jsxs)("div",{className:"relative flex items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-4",children:[(0,a.jsx)("div",{className:"flex size-14 items-center justify-center rounded-2xl bg-emerald-500/10",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[32px] text-emerald-500",children:"payments"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-xs font-medium uppercase tracking-wide text-text-muted",children:"Total Dollar Savings"}),(0,a.jsx)("p",{className:"text-3xl font-bold text-emerald-500",children:p(l)}),(0,a.jsxs)("p",{className:"mt-0.5 text-xs text-text-muted",children:[i.toLocaleString()," tokens saved across all mechanisms"]})]})]}),(0,a.jsxs)("div",{className:"hidden flex-col items-end gap-1 sm:flex",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 rounded-lg bg-surface-2 px-3 py-1.5",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted",children:"Without ER:"}),(0,a.jsx)("span",{className:"text-sm font-semibold text-red-500 line-through opacity-70",children:p(d+l)})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2 rounded-lg bg-emerald-500/10 px-3 py-1.5",children:[(0,a.jsx)("span",{className:"text-xs text-emerald-600 dark:text-emerald-400",children:"With ER:"}),(0,a.jsx)("span",{className:"text-sm font-semibold text-emerald-500",children:p(d)})]})]})]}),(0,a.jsxs)("button",{onClick:()=>s(e=>!e),className:"relative mt-3 flex w-full items-center justify-between rounded-lg bg-surface-2/50 px-3 py-2 text-left transition-colors hover:bg-surface-2",children:[(0,a.jsx)("span",{className:"text-xs font-medium text-text-muted",children:"Savings by mechanism"}),(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-text-muted transition-transform",style:{transform:t?"rotate(180deg)":"none"},children:"expand_more"})]}),t&&(0,a.jsx)("div",{className:"relative mt-2 grid grid-cols-2 gap-2 sm:grid-cols-3",children:b.map(e=>{let t=n[e.key]||0,s=l>0?t/l*100:0;return(0,a.jsxs)("div",{className:"flex items-center gap-2 rounded-lg border border-border-subtle px-2.5 py-2",children:[(0,a.jsx)("div",{className:"flex size-7 shrink-0 items-center justify-center rounded-md",style:{backgroundColor:`${e.color}15`},children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",style:{color:e.color},children:e.icon})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("p",{className:"truncate text-xs font-medium text-text-primary",children:e.label}),(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:[p(t)," ",(0,a.jsxs)("span",{className:"opacity-50",children:["(",s.toFixed(0),"%)"]})]})]})]},e.key)})}),null!==c&&(0,a.jsxs)("div",{className:"mt-2 rounded-lg border border-emerald-500/20 bg-emerald-500/5 px-3 py-2",children:[(0,a.jsxs)("p",{className:"flex items-center gap-1.5 text-xs font-medium text-emerald-600 dark:text-emerald-400",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"expand_less"}),"Headroom effective payload savings: ",c,"% outbound"]}),(0,a.jsxs)("p",{className:"mt-0.5 text-xs text-text-muted",children:["body ",h(o.bodyBefore)," → ",h(o.bodyAfter),o.toolsBefore>0&&` \xb7 tools ${h(o.toolsBefore)} → ${h(o.toolsAfter)}`,o.historyBefore>0&&` \xb7 history ${h(o.historyBefore)} → ${h(o.historyAfter)}`,o.requests>0&&` \xb7 ${o.requests.toLocaleString()} compressed request${1===o.requests?"":"s"}`]})]})]})}var y=s(98500),v=s.n(y),g=s(57250),j=s(8247),N=s(92899);let k=[{value:"24h",label:"24h"},{value:"7d",label:"7d"},{value:"30d",label:"30d"}],$=[{key:"requests",label:"Requests",sortable:!0},{key:"totalTokens",label:"Tokens",sortable:!0},{key:"avgTtft",label:"TTFT",sortable:!0},{key:"p95Latency",label:"P95",sortable:!0},{key:"successRate",label:"Success",sortable:!0},{key:"cost",label:"Cost",sortable:!0}];function w(){let[e,t]=(0,r.useState)([]),[s,l]=(0,r.useState)(!0),[n,i]=(0,r.useState)("7d"),[o,c]=(0,r.useState)("requests"),[d,x]=(0,r.useState)("desc");(0,r.useEffect)(()=>{let e=!1;return l(!0),fetch(`/api/usage/leaderboard?period=${n}`).then(e=>e.json()).then(s=>{e||s.error||t(s.leaderboard||[])}).catch(()=>{}).finally(()=>{e||l(!1)}),()=>{e=!0}},[n]);let m=(0,r.useMemo)(()=>{let t=[...e];return t.sort((e,t)=>{let s=e[o]??-1,a=t[o]??-1;return"desc"===d?a-s:s-a}),t},[e,o,d]);return(0,a.jsx)(u.default,{title:"Provider Leaderboard",subtitle:"Performance ranking by requests, latency, and cost",icon:"leaderboard",padding:"none",action:(0,a.jsx)("div",{className:"flex items-center gap-1",children:k.map(e=>(0,a.jsx)("button",{onClick:()=>i(e.value),className:`rounded-md px-2 py-1 text-xs font-medium transition-colors ${n===e.value?"bg-primary/10 text-primary":"text-text-muted hover:bg-surface-2"}`,children:e.label},e.value))}),children:s?(0,a.jsxs)("div",{className:"flex items-center justify-center gap-2 py-12 text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-[20px]",children:"progress_activity"}),(0,a.jsx)("span",{className:"text-sm",children:"Loading leaderboard..."})]}):0===m.length?(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center gap-2 py-12 text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[40px] opacity-20",children:"leaderboard"}),(0,a.jsx)("span",{className:"text-sm",children:"No usage data for this period"})]}):(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full min-w-[640px] text-left",children:[(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{className:"border-b border-border bg-surface-2/50",children:[(0,a.jsx)("th",{className:"px-3 py-2 text-[10px] font-medium uppercase tracking-wide text-text-muted",children:"Provider"}),$.map(e=>(0,a.jsxs)("th",{onClick:()=>{var t;return e.sortable&&void(o===(t=e.key)?x(e=>"desc"===e?"asc":"desc"):(c(t),x("desc")))},className:`px-3 py-2 text-[10px] font-medium uppercase tracking-wide ${e.sortable?"cursor-pointer select-none hover:text-text-primary":""} ${o===e.key?"text-primary":"text-text-muted"}`,children:[e.label,o===e.key&&(0,a.jsx)("span",{className:"material-symbols-outlined ml-0.5 inline text-[12px] align-middle",children:"desc"===d?"arrow_downward":"arrow_upward"})]},e.key))]})}),(0,a.jsx)("tbody",{children:m.map((e,t)=>{var s,r,l;let n=e.successRate>=95?"text-emerald-500":e.successRate>=80?"text-amber-500":"text-red-500",i=(0,N.vT)(e.p95Latency,e.latencySampleCount);return(0,a.jsxs)("tr",{className:"border-b border-border-subtle transition-colors hover:bg-surface-2/30",children:[(0,a.jsx)("td",{className:"px-3 py-2.5",children:(0,a.jsxs)(v(),{href:`/dashboard/providers/${e.provider}`,className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-[10px] font-mono text-text-muted w-4",children:t+1}),(0,a.jsx)("div",{className:"flex size-6 shrink-0 items-center justify-center rounded",children:(0,a.jsx)(g.A,{src:(0,j.k)(e.provider),alt:e.provider,size:24,className:"object-contain rounded",fallbackText:e.provider?.slice(0,2).toUpperCase(),fallbackColor:e.color})}),(0,a.jsx)("span",{className:"truncate text-xs font-medium text-text-primary",children:e.displayName})]})}),(0,a.jsx)("td",{className:"px-3 py-2.5 text-xs tabular-nums text-text-primary",children:e.requests.toLocaleString()}),(0,a.jsx)("td",{className:"px-3 py-2.5 text-xs tabular-nums text-text-muted",children:(s=e.totalTokens)>=1e6?`${(s/1e6).toFixed(1)}M`:s>=1e3?`${(s/1e3).toFixed(1)}K`:String(s)}),(0,a.jsx)("td",{className:"px-3 py-2.5 text-xs tabular-nums text-text-muted",children:null==(r=e.avgTtft)?"—":r<1e3?`${r}ms`:`${(r/1e3).toFixed(1)}s`}),(0,a.jsx)("td",{className:"px-3 py-2.5 text-xs tabular-nums",children:i.insufficient?(0,a.jsx)("span",{className:"text-amber-500",title:`${e.latencySampleCount} latency sample${1===e.latencySampleCount?"":"s"} this period — need at least ${N.uv}`,children:"insufficient data"}):(0,a.jsx)("span",{className:"text-text-muted",children:i.value})}),(0,a.jsxs)("td",{className:`px-3 py-2.5 text-xs font-medium tabular-nums ${n}`,children:[e.successRate.toFixed(1),"%"]}),(0,a.jsx)("td",{className:"px-3 py-2.5 text-xs tabular-nums text-text-muted",children:null==(l=e.cost)||0===l?"$0.00":l<.01?`$${l.toFixed(4)}`:`$${l.toFixed(2)}`})]},e.provider)})})]})})})}let S=[{key:"rtkEnabled",name:"RTK Token Saver",icon:"compress"},{key:"headroomEnabled",name:"Headroom",icon:"cloud_compress"},{key:"pxpipeEnabled",name:"Pxpipe",icon:"image_search"},{key:"semanticCacheEnabled",name:"Semantic Cache",icon:"cached"},{key:"cavemanEnabled",name:"Caveman Mode",icon:"cottage"},{key:"ponytailEnabled",name:"Ponytail",icon:"cut"}];function C({settings:e}){return e?(0,a.jsx)("div",{className:"flex flex-wrap gap-3",children:S.map(t=>{let s=!!e[t.key];return(0,a.jsxs)("div",{className:`flex items-center gap-2 rounded-brand border px-3 py-2 transition-colors ${s?"border-success/30 bg-success/5":"border-border-subtle bg-surface-2"}`,children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[18px] ${s?"text-success":"text-text-muted"}`,children:t.icon}),(0,a.jsx)("span",{className:"text-sm font-medium text-text-main",children:t.name}),(0,a.jsx)(l.Ex,{variant:s?"success":"default",size:"sm",dot:!0,children:s?"Active":"Off"})]},t.key)})}):null}C.propTypes={settings:i().object};let F=e=>{let t=Number(e||0);return t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}K`:t.toLocaleString()};function T({providers:e}){return e&&0!==e.length?(0,a.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 sm:gap-4 lg:grid-cols-3 xl:grid-cols-4",children:e.map(e=>{let t=e.color||"#6b7280",s=t.length>7?t:t+"15";return(0,a.jsxs)(v(),{href:`/dashboard/providers/${e.id}`,className:"group flex items-center gap-3 rounded-brand border border-border-subtle bg-panel px-3 py-2.5 shadow-[var(--shadow-soft)] transition-all hover:border-primary/35 hover:bg-panel-elev hover:shadow-[var(--shadow-warm)]",children:[(0,a.jsx)("div",{className:"size-8 shrink-0 rounded-lg flex items-center justify-center",style:{backgroundColor:s},children:(0,a.jsx)(g.A,{src:(0,j.k)(e.id),alt:e.name,size:24,className:"object-contain rounded max-w-[24px] max-h-[24px]",fallbackText:(e.name||e.id).slice(0,2).toUpperCase(),fallbackColor:t})}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("h3",{className:"truncate text-sm font-semibold text-text-main",children:e.name}),(0,a.jsx)("div",{className:"flex items-center gap-2 text-xs text-text-muted",children:e.requests>0?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("span",{className:"font-medium",children:[F(e.requests)," requests"]}),(0,a.jsx)("span",{children:"\xb7"}),(0,a.jsxs)("span",{children:[F(e.tokens)," tokens"]})]}):e.connected?(0,a.jsxs)("span",{className:"flex items-center gap-1 text-success",children:[(0,a.jsx)("span",{className:"size-1.5 rounded-full bg-success"}),"Connected"]}):(0,a.jsx)("span",{children:"No usage yet"})})]})]},e.id)})}):(0,a.jsx)(l.pp,{icon:"redeem",title:"No free providers used yet",description:"Connect a free provider (Kiro, OpenCode, etc.) and start routing requests to see usage here."})}function B(){let[e,t]=(0,r.useState)(null),[s,n]=(0,r.useState)(!0);return((0,r.useEffect)(()=>{fetch("/api/usage/meta").then(e=>e.json()).then(e=>{e.error||t(e)}).catch(()=>{}).finally(()=>n(!1))},[]),s)?(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsx)(l.zY,{title:"Overview",description:"Gateway summary, savings, and free-tier usage",icon:"dashboard"}),(0,a.jsx)(l.Qv,{}),(0,a.jsx)(l.Qv,{})]}):(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-6",children:[(0,a.jsx)(l.zY,{title:"Overview",description:"Gateway summary, savings, and free-tier usage",icon:"dashboard"}),(0,a.jsx)(m,{data:e}),(0,a.jsx)(f,{data:e}),(0,a.jsx)(l.Zp,{title:"Token Savers",subtitle:"Input compression and output optimization",icon:"savings",padding:"sm",children:(0,a.jsx)(C,{settings:e?.tokenSaverSettings})}),(0,a.jsx)(l.Zp,{title:"Free Providers Used",subtitle:"Providers with no API cost routing through your gateway",icon:"redeem",padding:"sm",children:(0,a.jsx)(T,{providers:e?.freeProviders||[]})}),(0,a.jsx)(w,{})]})}T.propTypes={providers:i().arrayOf(i().shape({id:i().string,name:i().string,icon:i().string,color:i().string,requests:i().number,tokens:i().number}))}},92899:(e,t,s)=>{"use strict";s.d(t,{Se:()=>l,Uk:()=>r,uv:()=>a,vT:()=>n});let a=10;function r(e){return null==e||e>=a}function l(e){return null==e?"—":e<1e3?`${e}ms`:`${(e/1e3).toFixed(1)}s`}function n(e,t){return null==e?{value:"—",insufficient:!1}:r(t)?{value:l(e),insufficient:!1}:{value:"insufficient data",insufficient:!0}}}},e=>{e.O(0,[27,9086,705,1321,5497,8441,3794,7358],()=>e(e.s=41190)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6337],{},_=>{_.O(0,[27,9086,705,1321,5497,981,8441,3794,7358],()=>_(_.s=90981)),_N_E=_.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1287],{45518:(e,t,s)=>{Promise.resolve().then(s.bind(s,81149))},81149:(e,t,s)=>{"use strict";s.d(t,{default:()=>D});var r=s(95155),a=s(12115),n=s(35497),l=s(14051),i=s.n(l),o=s(57250),c=s(8247),d=s(28777);function m({value:e,onChange:t,models:s,compact:l=!1,modelAliases:i={},activeProviders:u=[]}){let[x,p]=(0,a.useState)(!1),g="string"==typeof e?e:null==e?"":String(e),f=(()=>{if(!g)return null;let e=s?.find(e=>e.id===g);return e?.provider||g.split("/")[0]})(),h=(()=>{if(!g)return"Select a model...";if(i?.[g])return i[g];if(f){let e=(0,d.u0)(f,g);if(e&&e!==g)return e}return g})();return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("button",{type:"button",onClick:()=>p(!0),className:l?"flex h-8 items-center gap-1.5 rounded-lg border border-border-subtle bg-surface-2 px-2 text-xs text-text-main hover:border-primary/40":"flex h-9 w-full items-center gap-2 rounded-lg border border-border-subtle bg-surface-2 px-3 text-sm text-text-main hover:border-primary/40",title:h,children:[f&&(0,r.jsx)(o.A,{src:(0,c.k)(f),alt:f,size:l?16:18,fallbackText:(f||"?").slice(0,2).toUpperCase()}),(0,r.jsx)("span",{className:`truncate ${e?"font-medium":"text-text-muted"}`,children:h}),(0,r.jsx)("span",{className:"material-symbols-outlined ml-auto text-[16px] text-text-muted",children:"expand_more"})]}),(0,r.jsx)(n.rq,{isOpen:x,onClose:()=>p(!1),onSelect:e=>{t("string"==typeof e?e:e?.value||e?.name||e?.id||""),p(!1)},selectedModel:g,activeProviders:u,title:"Select Model",modelAliases:i})]})}m.propTypes={value:i().string,onChange:i().func.isRequired,models:i().arrayOf(i().shape({id:i().string,provider:i().string})),compact:i().bool,modelAliases:i().object,activeProviders:i().array};var u=s(2106);function x(e,t){return t?(e||"")+t:e}let p={content:"",reasoning:"",streaming:!0,error:null};function g(e,t,s){let r=e[t]||{content:"",reasoning:"",streaming:!0,error:null};return{...e,[t]:{...r,...s}}}function f(e,t,s){return e.map(e=>e.id!==t?e:{...e,...s})}let h=["minimal","low","medium","high"],b=[...h,"max"];function y(e){return JSON.stringify(e)}function j({params:e,onChange:t,selectedModel:s=""}){let n,[l,i]=(0,a.useState)(!0),{getCaps:o}=(0,u.y)(),c=(s,r)=>t({...e,[s]:r}),d=o?.(s),m=!!d?.reasoning,x=(d?.reasoning?Array.isArray(d.thinkingLevels)&&d.thinkingLevels.length>0?[...d.thinkingLevels]:d.thinkingMaxEffort?[...b]:[...h]:null)||[],p="number"==typeof(n=d?.maxOutput)&&Number.isFinite(n)&&n>0?n:128e3,g=!!(e.systemPrompt&&e.systemPrompt.trim());return(0,r.jsxs)("div",{className:"rounded-brand border border-border-subtle bg-panel p-3",children:[(0,r.jsxs)("button",{onClick:()=>i(!l),className:"mb-3 flex w-full items-center justify-between",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-[18px] text-primary",children:"tune"}),"Parameters",g&&(0,r.jsx)("span",{className:"rounded-full bg-primary/10 px-1.5 py-0.5 text-[10px] font-medium text-primary",children:"system"})]}),(0,r.jsx)("span",{className:`material-symbols-outlined text-[18px] text-text-muted transition-transform ${l?"rotate-90":""}`,children:"chevron_right"})]}),l&&(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"mb-1 block text-xs font-medium text-text-muted",children:"System Prompt"}),(0,r.jsx)("textarea",{value:e.systemPrompt||"",onChange:e=>c("systemPrompt",e.target.value),placeholder:"You are a helpful assistant...",rows:3,className:"custom-scrollbar w-full resize-none rounded-lg border border-border-subtle bg-surface-2 px-3 py-2 text-sm text-text-main placeholder:text-text-muted focus:border-primary focus:outline-none"})]}),m&&(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"mb-1 block text-xs font-medium text-text-muted",children:"Thinking Level"}),(0,r.jsxs)("div",{className:"flex flex-wrap gap-1",children:[(0,r.jsx)("button",{onClick:()=>c("reasoningEffort",""),className:`rounded-lg px-2.5 py-1 text-xs font-medium capitalize transition-colors ${!e.reasoningEffort?"bg-primary text-white":"bg-surface-2 text-text-muted hover:bg-surface-3"}`,children:"auto"}),x.map(t=>{let s=e.reasoningEffort===t;return(0,r.jsx)("button",{onClick:()=>c("reasoningEffort",s?"":t),className:`rounded-lg px-2.5 py-1 text-xs font-medium capitalize transition-colors ${s?"bg-primary text-white":"bg-surface-2 text-text-muted hover:bg-surface-3"}`,children:t},t)}),d?.thinkingCanDisable!==!1&&(0,r.jsx)("button",{onClick:()=>c("reasoningEffort","none"),className:`rounded-lg px-2.5 py-1 text-xs font-medium capitalize transition-colors ${"none"===e.reasoningEffort?"bg-primary text-white":"bg-surface-2 text-text-muted hover:bg-surface-3"}`,children:"none"})]}),(0,r.jsx)("p",{className:"mt-1 text-[10px] text-text-muted",children:"Reasoning effort. Auto = provider default."})]}),(0,r.jsx)(v,{label:"Temperature",value:e.temperature??.7,min:0,max:2,step:.05,onChange:e=>c("temperature",e)}),(0,r.jsx)(v,{label:"Top P",value:e.topP??1,min:0,max:1,step:.05,onChange:e=>c("topP",e)}),(0,r.jsx)(v,{label:"Frequency Penalty",value:e.frequencyPenalty??0,min:0,max:2,step:.1,onChange:e=>c("frequencyPenalty",e)}),(0,r.jsx)(v,{label:"Presence Penalty",value:e.presencePenalty??0,min:0,max:2,step:.1,onChange:e=>c("presencePenalty",e)}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"mb-1 block text-xs font-medium text-text-muted",children:"Max Tokens"}),(0,r.jsx)("input",{type:"number",min:"1",max:p,value:e.maxTokens??4096,onChange:e=>{let t=parseInt(e.target.value);c("maxTokens",Number.isFinite(t)&&t>0?Math.min(t,p):4096)},className:"w-full rounded-lg border border-border-subtle bg-surface-2 px-3 py-1.5 text-sm text-text-main focus:border-primary focus:outline-none"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"mb-1 block text-xs font-medium text-text-muted",children:"Top K"}),(0,r.jsx)("input",{type:"number",min:"1",max:"1000",placeholder:"unset",value:e.topK??"",onChange:e=>c("topK",""===e.target.value?null:parseInt(e.target.value)),className:"w-full rounded-lg border border-border-subtle bg-surface-2 px-3 py-1.5 text-sm text-text-main placeholder:text-text-muted focus:border-primary focus:outline-none"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"mb-1 block text-xs font-medium text-text-muted",children:"Seed"}),(0,r.jsx)("input",{type:"number",placeholder:"unset",value:e.seed??"",onChange:e=>c("seed",""===e.target.value?null:parseInt(e.target.value)),className:"w-full rounded-lg border border-border-subtle bg-surface-2 px-3 py-1.5 text-sm text-text-main placeholder:text-text-muted focus:border-primary focus:outline-none"})]})]})]})}function v({label:e,value:t,min:s,max:a,step:n,onChange:l}){return(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"mb-1 flex items-center justify-between",children:[(0,r.jsx)("label",{className:"text-xs font-medium text-text-muted",children:e}),(0,r.jsx)("span",{className:"text-xs font-mono text-text-main",children:Number(t).toFixed(2)})]}),(0,r.jsx)("input",{type:"range",min:s,max:a,step:n,value:t,onChange:e=>l(parseFloat(e.target.value)),className:"w-full accent-primary"})]})}j.propTypes={params:i().shape({systemPrompt:i().string,reasoningEffort:i().string,temperature:i().number,maxTokens:i().number,topP:i().number,frequencyPenalty:i().number,presencePenalty:i().number,topK:i().number,seed:i().number}).isRequired,onChange:i().func.isRequired,selectedModel:i().string},v.propTypes={label:i().string.isRequired,value:i().number.isRequired,min:i().number.isRequired,max:i().number.isRequired,step:i().number.isRequired,onChange:i().func.isRequired};var N=s(62630);function w(e){return null==e?"—":e>=1e3?`${(e/1e3).toFixed(1)}K`:e.toLocaleString()}function k(e){return null==e?"—":e<1e3?`${e}ms`:`${(e/1e3).toFixed(1)}s`}function C({stats:e,mode:t="single"}){var s;if("compare"===t)return(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-3 rounded-brand border border-border-subtle bg-surface-2 px-3 py-2 text-xs",children:[(0,r.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px] text-primary",children:"compare_arrows"}),(0,r.jsxs)("span",{className:"font-medium text-text-main",children:[e.models||0," models compared"]})]}),(0,r.jsx)("span",{className:"text-text-muted",children:"\xb7"}),(0,r.jsxs)("span",{className:"text-text-muted",children:["Total: ",k(e.compareLatencyMs)]})]});let a=null==(s=function(e){if(!e?.model||!e.inputTokens&&!e.outputTokens)return null;let t=e.model,s=t.indexOf("/"),r=s>0?t.slice(0,s):null,a=s>0?t.slice(s+1):t,n=(0,N.PS)(r,a);if(!n)return null;let l={prompt_tokens:e.inputTokens||0,completion_tokens:e.outputTokens||0,cached_tokens:e.cachedTokens||0,reasoning_tokens:e.reasoningTokens||0};return(0,N.uy)(l,n)}(e))||0===s?null:s<.01?`$${s.toFixed(4)}`:(0,N.BD)(s);return(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-3 rounded-brand border border-border-subtle bg-surface-2 px-3 py-2 text-xs",children:[(0,r.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px] text-success",children:"arrow_upward"}),(0,r.jsx)("span",{className:"text-text-muted",children:"In:"}),(0,r.jsx)("span",{className:"font-mono font-medium text-text-main",children:w(e.inputTokens)})]}),(0,r.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px] text-info",children:"arrow_downward"}),(0,r.jsx)("span",{className:"text-text-muted",children:"Out:"}),(0,r.jsx)("span",{className:"font-mono font-medium text-text-main",children:w(e.outputTokens)})]}),(0,r.jsx)("span",{className:"text-text-muted",children:"\xb7"}),(0,r.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"timer"}),(0,r.jsx)("span",{className:"text-text-muted",children:"Latency:"}),(0,r.jsx)("span",{className:"font-mono font-medium text-text-main",children:k(e.latencyMs)})]}),a&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:"text-text-muted",children:"\xb7"}),(0,r.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px] text-warning",children:"payments"}),(0,r.jsx)("span",{className:"text-text-muted",children:"Cost:"}),(0,r.jsx)("span",{className:"font-mono font-medium text-warning",children:a})]})]}),e.model&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:"text-text-muted",children:"\xb7"}),(0,r.jsx)("span",{className:"font-mono text-text-muted",children:e.model})]})]})}function S({sessions:e,currentSession:t,onNew:s,onLoad:l,onDelete:i}){let[o,c]=(0,a.useState)(""),[,d]=(0,a.useState)(0);(0,a.useEffect)(()=>{let e=setInterval(()=>d(e=>e+1),6e4);return()=>clearInterval(e)},[]);let m=(0,a.useMemo)(()=>{let t=o.trim().toLowerCase();return t?e.filter(e=>(e.title||"").toLowerCase().includes(t)):e},[e,o]);return(0,r.jsxs)("div",{className:"flex flex-col gap-2 rounded-brand border border-border-subtle bg-panel p-3",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)("span",{className:"text-xs font-semibold uppercase tracking-wide text-text-muted",children:"History"}),(0,r.jsx)(n.$n,{size:"sm",variant:"ghost",icon:"add",onClick:s,title:"New chat","aria-label":"New chat"})]}),e.length>0&&(0,r.jsxs)("div",{className:"flex items-center gap-1.5 rounded-lg border border-border-subtle bg-surface-2 px-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"search"}),(0,r.jsx)("input",{value:o,onChange:e=>c(e.target.value),placeholder:"Search...",className:"w-full bg-transparent py-1 text-xs text-text-main placeholder:text-text-muted focus:outline-none"})]}),0===e.length?(0,r.jsx)("p",{className:"py-4 text-center text-xs text-text-muted",children:"No saved conversations"}):0===m.length?(0,r.jsx)("p",{className:"py-4 text-center text-xs text-text-muted",children:"No matches"}):(0,r.jsx)("div",{className:"custom-scrollbar flex max-h-[70vh] flex-col gap-1 overflow-y-auto",children:m.map(e=>(0,r.jsxs)("div",{className:`group flex items-center gap-2 rounded-lg px-2 py-1.5 transition-colors ${t===e.id?"bg-primary/10":"hover:bg-surface-2"}`,children:[(0,r.jsxs)("button",{onClick:()=>l(e),className:"flex min-w-0 flex-1 flex-col items-start",children:[(0,r.jsx)("span",{className:"w-full truncate text-xs font-medium text-text-main",children:e.title}),(0,r.jsx)("span",{className:"text-[10px] text-text-muted",children:function(e){if(!e)return"";let t=Math.floor((Date.now()-e)/6e4);if(t<1)return"just now";if(t<60)return`${t}m ago`;let s=Math.floor(t/60);return s<24?`${s}h ago`:new Date(e).toLocaleDateString()}(e.updatedAt||e.createdAt)})]}),(0,r.jsx)("button",{onClick:()=>i(e.id),className:"rounded p-1 text-text-muted opacity-0 hover:text-danger group-hover:opacity-100",title:"Delete","aria-label":`Delete ${e.title}`,children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"delete"})})]},e.id))})]})}C.propTypes={stats:i().object,mode:i().string},S.propTypes={sessions:i().array,currentSession:i().string,onNew:i().func.isRequired,onLoad:i().func.isRequired,onDelete:i().func.isRequired};var A=s(9233),T=s(91992);let P=void 0!==window.document,_=!1,R={FORBID_TAGS:["style","form","input","textarea","button","select","svg"],FORBID_ATTR:["style"],ALLOW_UNKNOWN_PROTOCOLS:!1};function $({content:e,role:t,error:s=!1}){let n=!s&&"assistant"===t,l=(0,a.useMemo)(()=>{if(!n||!e)return"";try{var t;let s=A.xI.parse(e);return t="string"==typeof s?s:String(s),"string"==typeof t&&t?P?(!_&&P&&(_=!0,T.A.addHook("afterSanitizeAttributes",e=>{for(let t of("A"===e.tagName&&(e.setAttribute("target","_blank"),e.setAttribute("rel","noopener noreferrer")),["src","href","xlink:href","action","formaction"])){let s=e.getAttribute(t);s&&/^\s*data:/i.test(s)&&!/^\s*data:image\/(?:png|jpe?g|gif|webp);/i.test(s)&&e.removeAttribute(t)}})),T.A.sanitize(t,R)):t:""}catch{return""}},[e,n]);return n&&l?(0,r.jsx)("div",{className:"prose-chat whitespace-pre-wrap break-words",dangerouslySetInnerHTML:{__html:l}}):(0,r.jsx)("p",{className:"whitespace-pre-wrap break-words",children:e})}function O({messages:e,onSend:t,streaming:s}){let l=(0,a.useRef)(null),i=(0,a.useRef)(!0);return((0,a.useEffect)(()=>{l.current&&i.current&&(l.current.scrollTop=l.current.scrollHeight)},[e]),0===e.length)?(0,r.jsx)("div",{className:"flex min-h-[300px] flex-1 items-center justify-center",children:(0,r.jsx)(n.pp,{icon:"science",title:"Start a conversation",description:"Pick a model above, type a message below, and press Enter. Switch to Compare mode to test multiple models side-by-side."})}):(0,r.jsx)("div",{ref:l,onScroll:()=>{let e=l.current;e&&(i.current=e.scrollHeight-e.scrollTop-e.clientHeight<80)},className:"custom-scrollbar flex max-h-[60vh] min-h-[200px] flex-1 flex-col gap-3 overflow-y-auto rounded-brand border border-border-subtle bg-panel p-4",children:e.map(e=>(0,r.jsx)(E,{msg:e},e.id))})}function E({msg:e}){let t="user"===e.role,s=e.error;return(0,r.jsx)("div",{className:`flex ${t?"justify-end":"justify-start"}`,children:(0,r.jsxs)("div",{className:`max-w-[80%] rounded-2xl px-4 py-2.5 text-sm ${t?"bg-primary text-white":s?"bg-danger/10 text-danger border border-danger/20":"bg-surface-2 text-text-main"}`,children:[e.model&&!t&&(0,r.jsx)("div",{className:"mb-1 text-[10px] font-medium text-text-muted",children:e.model}),e.reasoning&&(0,r.jsxs)("details",{className:"mb-1.5 rounded bg-black/5 px-2 py-1 dark:bg-white/5",children:[(0,r.jsx)("summary",{className:"cursor-pointer text-[10px] font-medium text-text-muted",children:"Reasoning"}),(0,r.jsx)("p",{className:"mt-1 whitespace-pre-wrap break-words text-xs italic text-text-muted",children:e.reasoning})]}),t&&e.attachments&&e.attachments.length>0&&(0,r.jsx)("div",{className:"mb-1.5 flex flex-wrap gap-1.5",children:e.attachments.map(e=>(0,r.jsx)("img",{src:e.dataUrl,alt:e.name,className:"h-20 w-20 rounded-lg border border-white/20 object-cover"},e.id))}),(0,r.jsxs)("div",{className:"break-words",children:[(0,r.jsx)($,{content:e.content,role:e.role,error:s}),e.streaming&&(0,r.jsx)("span",{className:"ml-0.5 inline-block size-3 animate-pulse rounded-full bg-primary/50 align-middle"})]})]})})}async function I(e,{onChunk:t}={}){if(!e?.body?.getReader)return null;let s=e.body.getReader(),r=new TextDecoder,a="",n=null;for(;;){let{value:e,done:l}=await s.read();if(l)break;let i=(a+=r.decode(e,{stream:!0})).split(/\r?\n/);for(let e of(a=i.pop()||"",i)){let s=e.trim();if(!s.startsWith("data:"))continue;let r=s.slice(5).trim();if(r&&"[DONE]"!==r)try{let e=function(e){let t=e?.choices?.[0],s=t?.delta||{};return{content:"string"==typeof s.content?s.content:null,reasoning:"string"==typeof s.reasoning_content?s.reasoning_content:null,toolCalls:Array.isArray(s.tool_calls)&&s.tool_calls.length>0?s.tool_calls:null,finishReason:t?.finish_reason??null,usage:e?.usage??null}}(JSON.parse(r));e.usage&&(n=e.usage),t?.(e)}catch{}}}return n}function z(){return`${Date.now()}-${Math.random().toString(36).slice(2,9)}`}function q(e){var t=localStorage;try{return t.setItem("extremerouter.playground.sessions",y(e)),"saved"}catch{try{return t.setItem("extremerouter.playground.sessions",y(e.map(e=>({...e,messages:(e.messages||[]).map(e=>"user"!==e.role?e:{...e,displayAttachments:Array.isArray(e.displayAttachments)?e.displayAttachments.map(e=>({id:e.id,name:e.name,stripped:!0})):void 0,content:Array.isArray(e.content)?e.content.map(e=>e&&"image_url"===e.type?{type:"image_url",image_url:{url:""}}:e):e.content})})))),"stripped"}catch{return"failed"}}}function D(){let[e,t]=(0,a.useState)(!0),[s,l]=(0,a.useState)([]),[i,o]=(0,a.useState)([]),[c,d]=(0,a.useState)({}),[u,h]=(0,a.useState)([]),[b,y]=(0,a.useState)(null),[v,N]=(0,a.useState)([]),[w,k]=(0,a.useState)({}),[A,T]=(0,a.useState)("single"),[P,_]=(0,a.useState)([""]),[R,E]=(0,a.useState)({systemPrompt:"",temperature:.7,maxTokens:4096,topP:1,frequencyPenalty:0,presencePenalty:0,topK:null,seed:null,reasoningEffort:""}),[D,F]=(0,a.useState)({}),L=(0,a.useRef)(null),K=(0,a.useRef)({}),[B,H]=(0,a.useState)(null),U=(0,a.useRef)(!1),[J,W]=(0,a.useState)(null),Y=(0,a.useRef)(null),Z=(0,a.useCallback)(e=>{W(e),Y.current&&clearTimeout(Y.current),Y.current=setTimeout(()=>W(null),3e3)},[]),[G,Q]=(0,a.useState)(!1),[V,X]=(0,a.useState)(null),[ee,et]=(0,a.useState)(null),{streamChat:es,abortAll:er,streaming:ea}=function({onDelta:e,onComplete:t,onError:s}){let r=(0,a.useRef)({}),[n,l]=(0,a.useState)(0);(0,a.useEffect)(()=>{let e=r.current;return()=>{Object.values(e).forEach(e=>e?.abort?.())}},[]);let i=(0,a.useCallback)(async(a,{body:n,apiKey:i})=>{let o=new AbortController;r.current[a]=o,l(e=>e+1);try{let r={"Content-Type":"application/json",Accept:"text/event-stream"};i&&(r.Authorization=`Bearer ${i}`);let l=await fetch("/api/v1/chat/completions",{method:"POST",headers:r,body:JSON.stringify({...n,stream:!0}),signal:o.signal});if(!l.ok){let e=await l.json().catch(()=>({error:{message:`HTTP ${l.status}`}}));s(a,e.error?.message||`HTTP ${l.status}`,l.status);return}let c=await I(l,{onChunk:t=>e(a,t)});t(a,{usage:c,ok:!0})}catch(e){e?.name!=="AbortError"&&s(a,e?.message||"Network error",0)}finally{delete r.current[a],l(e=>Math.max(0,e-1))}},[e,t,s]);return{streamChat:i,abort:(0,a.useCallback)(e=>{r.current[e]?.abort?.()},[]),abortAll:(0,a.useCallback)(()=>{Object.values(r.current).forEach(e=>e?.abort?.())},[]),streaming:n>0}}({onDelta:(0,a.useCallback)((e,t)=>{let s=K.current[e];s&&("single"===s.mode?N(e=>f(e,s.assistantId,{content:x(e.find(e=>e.id===s.assistantId)?.content,t.content),reasoning:x(e.find(e=>e.id===s.assistantId)?.reasoning,t.reasoning)})):k(s=>{let r;return r=s[e]||{...p},{...s,[e]:{...r,content:x(r.content,t.content),reasoning:x(r.reasoning,t.reasoning)}}}))},[]),onComplete:(0,a.useCallback)((e,{usage:t})=>{let s=K.current[e];s&&("single"===s.mode?(N(e=>f(e,s.assistantId,{streaming:!1})),F({model:s.modelId,inputTokens:t?.prompt_tokens||0,outputTokens:t?.completion_tokens||0,latencyMs:Date.now()-s.startTime})):k(s=>g(s,e,{streaming:!1,usage:t})),delete K.current[e])},[]),onError:(0,a.useCallback)((e,t)=>{let s,r=K.current[e];if(!r)return;let a=((s=(s=(s=(s=(s="string"==typeof t?t:String(t??"")).replace(/https?:\/\/[^\s"'<>]+/g,"[url]")).replace(/(Bearer\s+)[A-Za-z0-9._\-]{16,}/gi,"$1[token]")).replace(/(signature=)[A-Za-z0-9%+/=]{16,}/gi,"$1[sig]")).replace(/\{[\s\S]{80,}\}/g,"[provider json]")).length>300&&(s=s.slice(0,297)+"..."),s.trim());"single"===r.mode?N(e=>f(e,r.assistantId,{content:`❌ Error: ${a}`,streaming:!1,error:!0})):k(t=>g(t,e,{content:`❌ ${a}`,streaming:!1,error:!0})),delete K.current[e]},[])}),en=(0,a.useCallback)(async()=>{X(null);try{let[e,t,s]=await Promise.all([fetch("/api/providers"),fetch("/api/models/alias"),fetch("/api/v1/models")]),r=await e.json();o((r.connections||[]).filter(e=>!1!==e.isActive));let a=await t.json();d(a.aliases||{});let n=((await s.json()).data||[]).map(e=>({id:e.id,name:e.id,provider:e.owned_by||e.id.split("/")[0]}));l(n),n.length>0&&_(e=>e[0]?e:[n[0].id])}catch(e){X(e?.message||"Failed to load models")}},[]);(0,a.useEffect)(()=>{(async()=>{h(function(){try{let e=localStorage.getItem("extremerouter.playground.sessions");return e?JSON.parse(e):[]}catch{return[]}}());try{let e=await fetch("/api/keys"),t=await e.json(),s=(t.keys||t||[]).find?.(e=>!1!==e.isActive);s?.key&&(L.current=s.key)}catch{}try{let e=await fetch("/api/settings"),t=await e.json(),s=!0===t.requireApiKey;Q(s&&!L.current)}catch{Q(!1)}await en(),t(!1)})()},[en]),(0,a.useEffect)(()=>{"single"===A&&(U.current=!1)},[A]);let el=(0,a.useCallback)(()=>{v.length>0&&b&&ec(b,v),H(null),N([]),y(null),F({}),k({})},[v,b]),ei=(0,a.useCallback)(e=>{v.length>0&&b&&ec(b,v),N(e.messages||[]),y(e.id),Array.isArray(e.models)&&e.models.length>0?_([...e.models]):e.model&&_([e.model]),e.mode&&T(e.mode),e.params&&E(e.params),F({}),k(e.compareResults?{...e.compareResults}:{})},[v,b]),eo=(0,a.useCallback)(e=>{let t=u.filter(t=>t.id!==e);h(t),q(t),b===e&&(y(null),N([]))},[u,b]),ec=(0,a.useCallback)((e,t)=>{let s=u.map(s=>s.id===e?{...s,messages:t.slice(-60),updatedAt:Date.now()}:s).slice(0,100);h(s),q(s)},[u]),ed=(0,a.useCallback)(()=>{let e=v.length>0,t="compare"===A&&Object.keys(w).length>0;if(!e&&!t)return;let s=b||z(),r=function({id:e,messages:t,params:s,selectedModels:r,mode:a,compareResults:n}){return{id:e,title:t.length>0?function(e,t="New Chat"){let s=e.find(e=>"user"===e.role);if(!s)return t;let r=s.content;Array.isArray(r)&&(r=r.map(e=>e&&"text"===e.type?e.text:"").filter(Boolean).join(" ")),"string"!=typeof r&&(r="");let a=r.trim().replace(/\s+/g," ");return a?a.slice(0,40):t}(t):"compare"===a?"Compare":"New Chat",messages:t.slice(-60),model:r[0]||"",models:r,mode:a,compareResults:"compare"===a&&n&&Object.keys(n).length>0?JSON.parse(JSON.stringify(n)):void 0,params:{...s},createdAt:Date.now(),updatedAt:Date.now()}}({id:s,messages:v,params:R,selectedModels:P,mode:A,compareResults:w}),a=(u.find(e=>e.id===s)?u.map(e=>e.id===s?{...e,...r}:e):[r,...u]).slice(0,100);h(a);let n=q(a);y(s),Z(n)},[v,b,u,P,R,A,w,Z]),em=(0,a.useCallback)((e,t=[])=>{let s=t.length>0,r={role:"user",content:s?[{type:"text",text:e},...t.map(e=>({type:"image_url",image_url:{url:e.dataUrl}}))]:e,id:z(),displayText:e,displayAttachments:s?t:void 0},a=[...v];R.systemPrompt&&a.unshift({role:"system",content:R.systemPrompt});let n=[...a.slice(-50),r],l={temperature:R.temperature,max_tokens:R.maxTokens,top_p:R.topP};return R.frequencyPenalty&&(l.frequency_penalty=R.frequencyPenalty),R.presencePenalty&&(l.presence_penalty=R.presencePenalty),R.topK&&(l.top_k=R.topK),null!=R.seed&&(l.seed=R.seed),R.reasoningEffort&&(l.reasoning_effort=R.reasoningEffort),{userMsg:r,baseMessages:n,requestParams:l}},[v,R]),eu=(0,a.useCallback)(async(e,t=[])=>{let{userMsg:s,baseMessages:r,requestParams:a}=em(e,t),n=L.current,l=Date.now();if("single"===A){let e=P[0];if(!e)return;let t=z();N([...r.filter(e=>"system"!==e.role).map(e=>"user"===e.role?{...e,content:e.displayText??e.content,attachments:e.displayAttachments}:e),{role:"assistant",content:"",reasoning:"",id:t,model:e,streaming:!0}]),K.current.single={mode:"single",assistantId:t,modelId:e,startTime:l},await es("single",{body:{model:e,messages:r,...a},apiKey:n})}else{let e=P.map((e,t)=>({modelId:e,key:`${t}::${e}`})).filter(e=>e.modelId);if(0===e.length)return;let t={};for(let s of e)t[s.key]={...p};k(t),e.forEach(e=>{K.current[e.key]={mode:"compare",modelId:e.modelId,startTime:l}}),await Promise.allSettled(e.map(e=>es(e.key,{body:{model:e.modelId,messages:r,...a},apiKey:n}))),F({compareLatencyMs:Date.now()-l,models:e.length})}},[A,P,em,es]),ex=(0,a.useCallback)(async(e,t=[])=>{if((e.trim()||0!==t.length)&&!ea){if("compare"===A&&!U.current&&P.filter(Boolean).length>1)return void H({text:e,attachments:t});await eu(e,t)}},[A,ea,P,eu]),ep=(0,a.useCallback)(()=>{U.current=!0,B&&(eu(B.text,B.attachments),H(null))},[B,eu]),eg=(0,a.useCallback)(()=>{er(),K.current={},N(e=>e.map(e=>e.streaming?{...e,streaming:!1}:e)),k(e=>{let t={};for(let[s,r]of Object.entries(e))t[s]={...r,streaming:!1};return t})},[er]);return e?(0,r.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,r.jsx)(n.zY,{title:"Playground",description:"Test models, compare outputs, tune parameters",icon:"science"}),(0,r.jsx)(n.Qv,{})]}):(0,r.jsxs)("div",{className:"flex min-w-0 flex-col gap-4",children:[(0,r.jsx)(n.zY,{title:"Playground",description:"Test models, compare outputs, tune parameters",icon:"science",actions:(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)(n.Iz,{options:[{value:"single",label:"Chat"},{value:"compare",label:"Compare"}],value:A,onChange:T,size:"sm"}),(0,r.jsx)(n.$n,{size:"sm",variant:"ghost",icon:ea?"stop":"save",onClick:ea?eg:ed,disabled:!ea&&0===v.length,children:ea?"Stop":"Save"}),(0,r.jsx)(n.$n,{size:"sm",variant:"ghost",icon:"history",className:"lg:hidden","aria-label":"Open history",onClick:()=>et("history")}),(0,r.jsx)(n.$n,{size:"sm",variant:"ghost",icon:"tune",className:"lg:hidden","aria-label":"Open parameters",onClick:()=>et("params")}),J&&(0,r.jsxs)("span",{className:"text-xs text-text-muted",role:"status","aria-live":"polite",children:["saved"===J&&"Saved","stripped"===J&&"Saved — images removed to fit storage","failed"===J&&"Save failed"]})]})}),(G||V)&&(0,r.jsxs)("div",{className:"flex flex-col gap-2",children:[G&&(0,r.jsxs)("div",{className:"flex items-center justify-between gap-3 rounded-brand border border-warning/30 bg-warning/5 px-3 py-2 text-xs text-warning",children:[(0,r.jsxs)("span",{children:[(0,r.jsx)("b",{children:"API key required."})," The gateway requires an API key for requests, but no active key was found — sends will fail with a 401."]}),(0,r.jsx)("a",{href:"/dashboard/endpoint",className:"shrink-0 font-semibold underline hover:text-warning/80",children:"Create an API key →"})]}),V&&(0,r.jsxs)("div",{className:"flex items-center justify-between gap-3 rounded-brand border border-danger/30 bg-danger/5 px-3 py-2 text-xs text-danger",children:[(0,r.jsxs)("span",{className:"truncate",children:["Failed to load models: ",V]}),(0,r.jsx)(n.$n,{size:"sm",variant:"outline",icon:"refresh",onClick:en,children:"Retry"})]})]}),(0,r.jsxs)("div",{className:"flex min-w-0 gap-4",children:[(0,r.jsx)("div",{className:"hidden w-56 shrink-0 lg:block",children:(0,r.jsx)(S,{sessions:u,currentSession:b,onNew:el,onLoad:ei,onDelete:eo})}),(0,r.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-3",children:["single"===A?(0,r.jsx)(m,{models:s,value:P[0],onChange:e=>_([e]),activeProviders:i,modelAliases:c}):(0,r.jsxs)("div",{className:"flex flex-wrap gap-2",children:[P.map((e,t)=>(0,r.jsxs)("div",{className:"flex items-center gap-1",children:[(0,r.jsx)(m,{models:s,value:e,onChange:e=>{let s=[...P];s[t]=e,_(s)},compact:!0,activeProviders:i,modelAliases:c}),P.length>2&&(0,r.jsx)("button",{onClick:()=>_(P.filter((e,s)=>s!==t)),className:"rounded-lg p-1.5 text-text-muted hover:bg-surface-2 hover:text-danger",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"close"})})]},t)),P.length<4&&(0,r.jsxs)("button",{onClick:()=>_([...P,""]),className:"flex items-center gap-1 rounded-lg border border-dashed border-border px-3 py-1.5 text-xs text-text-muted hover:border-primary/40 hover:text-primary",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"add"}),"Add Model"]})]}),"single"===A?(0,r.jsx)(O,{messages:v,onSend:ex,streaming:ea,stats:D}):(0,r.jsx)("div",{className:"flex min-w-0 gap-3",children:P.map((e,t)=>{if(!e)return null;let s=`${t}::${e}`,a=w[s];return(0,r.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col rounded-brand border border-border-subtle bg-panel",children:[(0,r.jsx)("div",{className:"border-b border-border-subtle px-3 py-2",children:(0,r.jsx)("span",{className:"truncate text-xs font-medium text-text-main",children:e})}),(0,r.jsxs)("div",{className:"custom-scrollbar max-h-[60vh] min-h-[200px] overflow-y-auto p-3",children:[a?.reasoning&&(0,r.jsxs)("details",{className:"mb-2 rounded bg-black/5 px-2 py-1 dark:bg-white/5",children:[(0,r.jsx)("summary",{className:"cursor-pointer text-[10px] font-medium text-text-muted",children:"Reasoning"}),(0,r.jsx)("p",{className:"mt-1 whitespace-pre-wrap text-xs italic text-text-muted",children:a.reasoning})]}),a?.content?(0,r.jsxs)("div",{className:`text-sm ${a.error?"text-danger":"text-text-main"}`,children:[a.error?(0,r.jsx)("p",{className:"whitespace-pre-wrap break-words",children:a.content}):(0,r.jsx)($,{content:a.content,role:"assistant"}),a.streaming&&(0,r.jsx)("span",{className:"ml-0.5 inline-block size-3 animate-pulse rounded-full bg-primary/50 align-middle"})]}):(0,r.jsx)("p",{className:"text-sm text-text-muted",children:ea?"Waiting...":"Send a message to compare"})]})]},s)})}),(0,r.jsx)(M,{onSend:ex,streaming:ea,onStop:eg}),Object.keys(D).length>0&&(0,r.jsx)(C,{stats:D,mode:A})]}),(0,r.jsx)("div",{className:"hidden w-60 shrink-0 xl:block",children:(0,r.jsx)(j,{params:R,onChange:E,selectedModel:P[0]})})]}),(0,r.jsx)(n.uo,{isOpen:!!B,onClose:()=>H(null),onConfirm:ep,title:"Send to multiple models at once?",message:B?`Compare mode sends this exact prompt to ${P.filter(Boolean).length} models simultaneously. One request becomes ${P.filter(Boolean).length} upstream calls (~${P.filter(Boolean).length}\xd7 the tokens of a single request), billed by each provider.`:"",confirmText:"Compare all",cancelText:"Cancel",variant:"secondary"}),(0,r.jsx)(n.aF,{isOpen:"history"===ee,onClose:()=>et(null),title:"History",size:"lg",children:(0,r.jsx)("div",{className:"max-h-[70vh] overflow-y-auto",children:(0,r.jsx)(S,{sessions:u,currentSession:b,onNew:el,onLoad:e=>{ei(e),et(null)},onDelete:eo})})}),(0,r.jsx)(n.aF,{isOpen:"params"===ee,onClose:()=>et(null),title:"Parameters",size:"lg",children:(0,r.jsx)(j,{params:R,onChange:E,selectedModel:P[0]})})]})}function M({onSend:e,streaming:t,onStop:s}){let[n,l]=(0,a.useState)(""),[i,o]=(0,a.useState)([]),[c,d]=(0,a.useState)(null),m=(0,a.useRef)(null),u=(0,a.useRef)(null),x=e=>{d(e),m.current&&clearTimeout(m.current),m.current=setTimeout(()=>d(null),4e3)},p=e=>{if(!e||!e.type.startsWith("image/"))return void x("Only image files can be attached");if(e.size>5242880)return void x("Image too large — max 5MB");let t=new FileReader;t.onload=()=>{o(s=>[...s,{id:z(),dataUrl:t.result,name:e.name}])},t.readAsDataURL(e)},g=()=>{(n.trim()||0!==i.length)&&!t&&(e(n,i),l(""),o([]),u.current&&(u.current.style.height="auto"))},f=(n.trim()||i.length>0)&&!t;return(0,r.jsxs)("div",{className:"flex flex-col gap-2 rounded-brand border border-border-subtle bg-panel p-2",children:[i.length>0&&(0,r.jsx)("div",{className:"flex flex-wrap gap-2",children:i.map(e=>(0,r.jsxs)("div",{className:"group relative",children:[(0,r.jsx)("img",{src:e.dataUrl,alt:e.name,className:"h-16 w-16 rounded-lg border border-border-subtle object-cover"}),(0,r.jsx)("button",{onClick:()=>o(t=>t.filter(t=>t.id!==e.id)),className:"absolute -right-1.5 -top-1.5 flex size-5 items-center justify-center rounded-full bg-danger text-white opacity-0 transition-opacity group-hover:opacity-100",title:"Remove",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"close"})})]},e.id))}),c&&(0,r.jsx)("p",{className:"px-1 text-[10px] text-warning",role:"status","aria-live":"polite",children:c}),(0,r.jsxs)("div",{className:"flex items-end gap-2",children:[(0,r.jsx)("textarea",{ref:u,value:n,onChange:e=>{l(e.target.value),e.target.style.height="auto",e.target.style.height=Math.min(e.target.scrollHeight,120)+"px"},onPaste:e=>{let t=e.clipboardData?.items;if(!t)return;let s=!1;for(let e of t)e.type.startsWith("image/")&&(s=!0,p(e.getAsFile()));s&&e.preventDefault()},onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),g())},placeholder:"Send a message... (Enter to send, Shift+Enter for newline, paste images)",rows:1,className:"custom-scrollbar max-h-[120px] flex-1 resize-none bg-transparent px-2 py-1.5 text-sm text-text-main placeholder:text-text-muted focus:outline-none"}),t?(0,r.jsx)("button",{onClick:s,className:"flex size-9 shrink-0 items-center justify-center rounded-lg bg-danger/15 text-danger hover:bg-danger/25",title:"Stop","aria-label":"Stop",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"stop"})}):(0,r.jsx)("button",{onClick:g,disabled:!f,className:"flex size-9 shrink-0 items-center justify-center rounded-lg bg-primary text-white hover:bg-primary-hover disabled:opacity-40",title:"Send","aria-label":"Send",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"send"})})]})]})}A.xI.setOptions({gfm:!0,breaks:!0,async:!1}),$.propTypes={content:i().string,role:i().string,error:i().bool},O.propTypes={messages:i().arrayOf(i().shape({id:i().string,role:i().string,content:i().string,reasoning:i().string,model:i().string,streaming:i().bool,error:i().bool,attachments:i().array})),onSend:i().func,streaming:i().bool}}},e=>{e.O(0,[27,1992,2563,705,1321,5497,8441,3794,7358],()=>e(e.s=45518)),_N_E=e.O()}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1287],{45518:(e,t,s)=>{Promise.resolve().then(s.bind(s,81149))},81149:(e,t,s)=>{"use strict";s.d(t,{default:()=>D});var r=s(95155),a=s(12115),n=s(35497),l=s(14051),i=s.n(l),o=s(57250),c=s(8247),d=s(28777);function m({value:e,onChange:t,models:s,compact:l=!1,modelAliases:i={},activeProviders:u=[]}){let[x,p]=(0,a.useState)(!1),g="string"==typeof e?e:null==e?"":String(e),f=(()=>{if(!g)return null;let e=s?.find(e=>e.id===g);return e?.provider||g.split("/")[0]})(),h=(()=>{if(!g)return"Select a model...";if(i?.[g])return i[g];if(f){let e=(0,d.u0)(f,g);if(e&&e!==g)return e}return g})();return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("button",{type:"button",onClick:()=>p(!0),className:l?"flex h-8 items-center gap-1.5 rounded-lg border border-border-subtle bg-surface-2 px-2 text-xs text-text-main hover:border-primary/40":"flex h-9 w-full items-center gap-2 rounded-lg border border-border-subtle bg-surface-2 px-3 text-sm text-text-main hover:border-primary/40",title:h,children:[f&&(0,r.jsx)(o.A,{src:(0,c.k)(f),alt:f,size:l?16:18,fallbackText:(f||"?").slice(0,2).toUpperCase()}),(0,r.jsx)("span",{className:`truncate ${e?"font-medium":"text-text-muted"}`,children:h}),(0,r.jsx)("span",{className:"material-symbols-outlined ml-auto text-[16px] text-text-muted",children:"expand_more"})]}),(0,r.jsx)(n.rq,{isOpen:x,onClose:()=>p(!1),onSelect:e=>{t("string"==typeof e?e:e?.value||e?.name||e?.id||""),p(!1)},selectedModel:g,activeProviders:u,title:"Select Model",modelAliases:i})]})}m.propTypes={value:i().string,onChange:i().func.isRequired,models:i().arrayOf(i().shape({id:i().string,provider:i().string})),compact:i().bool,modelAliases:i().object,activeProviders:i().array};var u=s(2106);function x(e,t){return t?(e||"")+t:e}let p={content:"",reasoning:"",streaming:!0,error:null};function g(e,t,s){let r=e[t]||{content:"",reasoning:"",streaming:!0,error:null};return{...e,[t]:{...r,...s}}}function f(e,t,s){return e.map(e=>e.id!==t?e:{...e,...s})}let h=["minimal","low","medium","high"],b=[...h,"max"];function y(e){return JSON.stringify(e)}function j({params:e,onChange:t,selectedModel:s=""}){let n,[l,i]=(0,a.useState)(!0),{getCaps:o}=(0,u.y)(),c=(s,r)=>t({...e,[s]:r}),d=o?.(s),m=!!d?.reasoning,x=(d?.reasoning?Array.isArray(d.thinkingLevels)&&d.thinkingLevels.length>0?[...d.thinkingLevels]:d.thinkingMaxEffort?[...b]:[...h]:null)||[],p="number"==typeof(n=d?.maxOutput)&&Number.isFinite(n)&&n>0?n:128e3,g=!!(e.systemPrompt&&e.systemPrompt.trim());return(0,r.jsxs)("div",{className:"rounded-brand border border-border-subtle bg-panel p-3",children:[(0,r.jsxs)("button",{onClick:()=>i(!l),className:"mb-3 flex w-full items-center justify-between",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-[18px] text-primary",children:"tune"}),"Parameters",g&&(0,r.jsx)("span",{className:"rounded-full bg-primary/10 px-1.5 py-0.5 text-[10px] font-medium text-primary",children:"system"})]}),(0,r.jsx)("span",{className:`material-symbols-outlined text-[18px] text-text-muted transition-transform ${l?"rotate-90":""}`,children:"chevron_right"})]}),l&&(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"mb-1 block text-xs font-medium text-text-muted",children:"System Prompt"}),(0,r.jsx)("textarea",{value:e.systemPrompt||"",onChange:e=>c("systemPrompt",e.target.value),placeholder:"You are a helpful assistant...",rows:3,className:"custom-scrollbar w-full resize-none rounded-lg border border-border-subtle bg-surface-2 px-3 py-2 text-sm text-text-main placeholder:text-text-muted focus:border-primary focus:outline-none"})]}),m&&(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"mb-1 block text-xs font-medium text-text-muted",children:"Thinking Level"}),(0,r.jsxs)("div",{className:"flex flex-wrap gap-1",children:[(0,r.jsx)("button",{onClick:()=>c("reasoningEffort",""),className:`rounded-lg px-2.5 py-1 text-xs font-medium capitalize transition-colors ${!e.reasoningEffort?"bg-primary text-white":"bg-surface-2 text-text-muted hover:bg-surface-3"}`,children:"auto"}),x.map(t=>{let s=e.reasoningEffort===t;return(0,r.jsx)("button",{onClick:()=>c("reasoningEffort",s?"":t),className:`rounded-lg px-2.5 py-1 text-xs font-medium capitalize transition-colors ${s?"bg-primary text-white":"bg-surface-2 text-text-muted hover:bg-surface-3"}`,children:t},t)}),d?.thinkingCanDisable!==!1&&(0,r.jsx)("button",{onClick:()=>c("reasoningEffort","none"),className:`rounded-lg px-2.5 py-1 text-xs font-medium capitalize transition-colors ${"none"===e.reasoningEffort?"bg-primary text-white":"bg-surface-2 text-text-muted hover:bg-surface-3"}`,children:"none"})]}),(0,r.jsx)("p",{className:"mt-1 text-[10px] text-text-muted",children:"Reasoning effort. Auto = provider default."})]}),(0,r.jsx)(v,{label:"Temperature",value:e.temperature??.7,min:0,max:2,step:.05,onChange:e=>c("temperature",e)}),(0,r.jsx)(v,{label:"Top P",value:e.topP??1,min:0,max:1,step:.05,onChange:e=>c("topP",e)}),(0,r.jsx)(v,{label:"Frequency Penalty",value:e.frequencyPenalty??0,min:0,max:2,step:.1,onChange:e=>c("frequencyPenalty",e)}),(0,r.jsx)(v,{label:"Presence Penalty",value:e.presencePenalty??0,min:0,max:2,step:.1,onChange:e=>c("presencePenalty",e)}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"mb-1 block text-xs font-medium text-text-muted",children:"Max Tokens"}),(0,r.jsx)("input",{type:"number",min:"1",max:p,value:e.maxTokens??4096,onChange:e=>{let t=parseInt(e.target.value);c("maxTokens",Number.isFinite(t)&&t>0?Math.min(t,p):4096)},className:"w-full rounded-lg border border-border-subtle bg-surface-2 px-3 py-1.5 text-sm text-text-main focus:border-primary focus:outline-none"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"mb-1 block text-xs font-medium text-text-muted",children:"Top K"}),(0,r.jsx)("input",{type:"number",min:"1",max:"1000",placeholder:"unset",value:e.topK??"",onChange:e=>c("topK",""===e.target.value?null:parseInt(e.target.value)),className:"w-full rounded-lg border border-border-subtle bg-surface-2 px-3 py-1.5 text-sm text-text-main placeholder:text-text-muted focus:border-primary focus:outline-none"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"mb-1 block text-xs font-medium text-text-muted",children:"Seed"}),(0,r.jsx)("input",{type:"number",placeholder:"unset",value:e.seed??"",onChange:e=>c("seed",""===e.target.value?null:parseInt(e.target.value)),className:"w-full rounded-lg border border-border-subtle bg-surface-2 px-3 py-1.5 text-sm text-text-main placeholder:text-text-muted focus:border-primary focus:outline-none"})]})]})]})}function v({label:e,value:t,min:s,max:a,step:n,onChange:l}){return(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"mb-1 flex items-center justify-between",children:[(0,r.jsx)("label",{className:"text-xs font-medium text-text-muted",children:e}),(0,r.jsx)("span",{className:"text-xs font-mono text-text-main",children:Number(t).toFixed(2)})]}),(0,r.jsx)("input",{type:"range",min:s,max:a,step:n,value:t,onChange:e=>l(parseFloat(e.target.value)),className:"w-full accent-primary"})]})}j.propTypes={params:i().shape({systemPrompt:i().string,reasoningEffort:i().string,temperature:i().number,maxTokens:i().number,topP:i().number,frequencyPenalty:i().number,presencePenalty:i().number,topK:i().number,seed:i().number}).isRequired,onChange:i().func.isRequired,selectedModel:i().string},v.propTypes={label:i().string.isRequired,value:i().number.isRequired,min:i().number.isRequired,max:i().number.isRequired,step:i().number.isRequired,onChange:i().func.isRequired};var N=s(62630);function w(e){return null==e?"—":e>=1e3?`${(e/1e3).toFixed(1)}K`:e.toLocaleString()}function k(e){return null==e?"—":e<1e3?`${e}ms`:`${(e/1e3).toFixed(1)}s`}function C({stats:e,mode:t="single"}){var s;if("compare"===t)return(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-3 rounded-brand border border-border-subtle bg-surface-2 px-3 py-2 text-xs",children:[(0,r.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px] text-primary",children:"compare_arrows"}),(0,r.jsxs)("span",{className:"font-medium text-text-main",children:[e.models||0," models compared"]})]}),(0,r.jsx)("span",{className:"text-text-muted",children:"\xb7"}),(0,r.jsxs)("span",{className:"text-text-muted",children:["Total: ",k(e.compareLatencyMs)]})]});let a=null==(s=function(e){if(!e?.model||!e.inputTokens&&!e.outputTokens)return null;let t=e.model,s=t.indexOf("/"),r=s>0?t.slice(0,s):null,a=s>0?t.slice(s+1):t,n=(0,N.PS)(r,a);if(!n)return null;let l={prompt_tokens:e.inputTokens||0,completion_tokens:e.outputTokens||0,cached_tokens:e.cachedTokens||0,reasoning_tokens:e.reasoningTokens||0};return(0,N.uy)(l,n)}(e))||0===s?null:s<.01?`$${s.toFixed(4)}`:(0,N.BD)(s);return(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-3 rounded-brand border border-border-subtle bg-surface-2 px-3 py-2 text-xs",children:[(0,r.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px] text-success",children:"arrow_upward"}),(0,r.jsx)("span",{className:"text-text-muted",children:"In:"}),(0,r.jsx)("span",{className:"font-mono font-medium text-text-main",children:w(e.inputTokens)})]}),(0,r.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px] text-info",children:"arrow_downward"}),(0,r.jsx)("span",{className:"text-text-muted",children:"Out:"}),(0,r.jsx)("span",{className:"font-mono font-medium text-text-main",children:w(e.outputTokens)})]}),(0,r.jsx)("span",{className:"text-text-muted",children:"\xb7"}),(0,r.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"timer"}),(0,r.jsx)("span",{className:"text-text-muted",children:"Latency:"}),(0,r.jsx)("span",{className:"font-mono font-medium text-text-main",children:k(e.latencyMs)})]}),a&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:"text-text-muted",children:"\xb7"}),(0,r.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px] text-warning",children:"payments"}),(0,r.jsx)("span",{className:"text-text-muted",children:"Cost:"}),(0,r.jsx)("span",{className:"font-mono font-medium text-warning",children:a})]})]}),e.model&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:"text-text-muted",children:"\xb7"}),(0,r.jsx)("span",{className:"font-mono text-text-muted",children:e.model})]})]})}function S({sessions:e,currentSession:t,onNew:s,onLoad:l,onDelete:i}){let[o,c]=(0,a.useState)(""),[,d]=(0,a.useState)(0);(0,a.useEffect)(()=>{let e=setInterval(()=>d(e=>e+1),6e4);return()=>clearInterval(e)},[]);let m=(0,a.useMemo)(()=>{let t=o.trim().toLowerCase();return t?e.filter(e=>(e.title||"").toLowerCase().includes(t)):e},[e,o]);return(0,r.jsxs)("div",{className:"flex flex-col gap-2 rounded-brand border border-border-subtle bg-panel p-3",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)("span",{className:"text-xs font-semibold uppercase tracking-wide text-text-muted",children:"History"}),(0,r.jsx)(n.$n,{size:"sm",variant:"ghost",icon:"add",onClick:s,title:"New chat","aria-label":"New chat"})]}),e.length>0&&(0,r.jsxs)("div",{className:"flex items-center gap-1.5 rounded-lg border border-border-subtle bg-surface-2 px-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"search"}),(0,r.jsx)("input",{value:o,onChange:e=>c(e.target.value),placeholder:"Search...",className:"w-full bg-transparent py-1 text-xs text-text-main placeholder:text-text-muted focus:outline-none"})]}),0===e.length?(0,r.jsx)("p",{className:"py-4 text-center text-xs text-text-muted",children:"No saved conversations"}):0===m.length?(0,r.jsx)("p",{className:"py-4 text-center text-xs text-text-muted",children:"No matches"}):(0,r.jsx)("div",{className:"custom-scrollbar flex max-h-[70vh] flex-col gap-1 overflow-y-auto",children:m.map(e=>(0,r.jsxs)("div",{className:`group flex items-center gap-2 rounded-lg px-2 py-1.5 transition-colors ${t===e.id?"bg-primary/10":"hover:bg-surface-2"}`,children:[(0,r.jsxs)("button",{onClick:()=>l(e),className:"flex min-w-0 flex-1 flex-col items-start",children:[(0,r.jsx)("span",{className:"w-full truncate text-xs font-medium text-text-main",children:e.title}),(0,r.jsx)("span",{className:"text-[10px] text-text-muted",children:function(e){if(!e)return"";let t=Math.floor((Date.now()-e)/6e4);if(t<1)return"just now";if(t<60)return`${t}m ago`;let s=Math.floor(t/60);return s<24?`${s}h ago`:new Date(e).toLocaleDateString()}(e.updatedAt||e.createdAt)})]}),(0,r.jsx)("button",{onClick:()=>i(e.id),className:"rounded p-1 text-text-muted opacity-0 hover:text-danger group-hover:opacity-100",title:"Delete","aria-label":`Delete ${e.title}`,children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"delete"})})]},e.id))})]})}C.propTypes={stats:i().object,mode:i().string},S.propTypes={sessions:i().array,currentSession:i().string,onNew:i().func.isRequired,onLoad:i().func.isRequired,onDelete:i().func.isRequired};var A=s(9233),T=s(91992);let P=void 0!==window.document,_=!1,R={FORBID_TAGS:["style","form","input","textarea","button","select","svg"],FORBID_ATTR:["style"],ALLOW_UNKNOWN_PROTOCOLS:!1};function $({content:e,role:t,error:s=!1}){let n=!s&&"assistant"===t,l=(0,a.useMemo)(()=>{if(!n||!e)return"";try{var t;let s=A.xI.parse(e);return t="string"==typeof s?s:String(s),"string"==typeof t&&t?P?(!_&&P&&(_=!0,T.A.addHook("afterSanitizeAttributes",e=>{for(let t of("A"===e.tagName&&(e.setAttribute("target","_blank"),e.setAttribute("rel","noopener noreferrer")),["src","href","xlink:href","action","formaction"])){let s=e.getAttribute(t);s&&/^\s*data:/i.test(s)&&!/^\s*data:image\/(?:png|jpe?g|gif|webp);/i.test(s)&&e.removeAttribute(t)}})),T.A.sanitize(t,R)):t:""}catch{return""}},[e,n]);return n&&l?(0,r.jsx)("div",{className:"prose-chat whitespace-pre-wrap break-words",dangerouslySetInnerHTML:{__html:l}}):(0,r.jsx)("p",{className:"whitespace-pre-wrap break-words",children:e})}function O({messages:e,onSend:t,streaming:s}){let l=(0,a.useRef)(null),i=(0,a.useRef)(!0);return((0,a.useEffect)(()=>{l.current&&i.current&&(l.current.scrollTop=l.current.scrollHeight)},[e]),0===e.length)?(0,r.jsx)("div",{className:"flex min-h-[300px] flex-1 items-center justify-center",children:(0,r.jsx)(n.pp,{icon:"science",title:"Start a conversation",description:"Pick a model above, type a message below, and press Enter. Switch to Compare mode to test multiple models side-by-side."})}):(0,r.jsx)("div",{ref:l,onScroll:()=>{let e=l.current;e&&(i.current=e.scrollHeight-e.scrollTop-e.clientHeight<80)},className:"custom-scrollbar flex max-h-[60vh] min-h-[200px] flex-1 flex-col gap-3 overflow-y-auto rounded-brand border border-border-subtle bg-panel p-4",children:e.map(e=>(0,r.jsx)(E,{msg:e},e.id))})}function E({msg:e}){let t="user"===e.role,s=e.error;return(0,r.jsx)("div",{className:`flex ${t?"justify-end":"justify-start"}`,children:(0,r.jsxs)("div",{className:`max-w-[80%] rounded-2xl px-4 py-2.5 text-sm ${t?"bg-primary text-white":s?"bg-danger/10 text-danger border border-danger/20":"bg-surface-2 text-text-main"}`,children:[e.model&&!t&&(0,r.jsx)("div",{className:"mb-1 text-[10px] font-medium text-text-muted",children:e.model}),e.reasoning&&(0,r.jsxs)("details",{className:"mb-1.5 rounded bg-black/5 px-2 py-1 dark:bg-white/5",children:[(0,r.jsx)("summary",{className:"cursor-pointer text-[10px] font-medium text-text-muted",children:"Reasoning"}),(0,r.jsx)("p",{className:"mt-1 whitespace-pre-wrap break-words text-xs italic text-text-muted",children:e.reasoning})]}),t&&e.attachments&&e.attachments.length>0&&(0,r.jsx)("div",{className:"mb-1.5 flex flex-wrap gap-1.5",children:e.attachments.map(e=>(0,r.jsx)("img",{src:e.dataUrl,alt:e.name,className:"h-20 w-20 rounded-lg border border-white/20 object-cover"},e.id))}),(0,r.jsxs)("div",{className:"break-words",children:[(0,r.jsx)($,{content:e.content,role:e.role,error:s}),e.streaming&&(0,r.jsx)("span",{className:"ml-0.5 inline-block size-3 animate-pulse rounded-full bg-primary/50 align-middle"})]})]})})}async function I(e,{onChunk:t}={}){if(!e?.body?.getReader)return null;let s=e.body.getReader(),r=new TextDecoder,a="",n=null;for(;;){let{value:e,done:l}=await s.read();if(l)break;let i=(a+=r.decode(e,{stream:!0})).split(/\r?\n/);for(let e of(a=i.pop()||"",i)){let s=e.trim();if(!s.startsWith("data:"))continue;let r=s.slice(5).trim();if(r&&"[DONE]"!==r)try{let e=function(e){let t=e?.choices?.[0],s=t?.delta||{};return{content:"string"==typeof s.content?s.content:null,reasoning:"string"==typeof s.reasoning_content?s.reasoning_content:null,toolCalls:Array.isArray(s.tool_calls)&&s.tool_calls.length>0?s.tool_calls:null,finishReason:t?.finish_reason??null,usage:e?.usage??null}}(JSON.parse(r));e.usage&&(n=e.usage),t?.(e)}catch{}}}return n}function z(){return`${Date.now()}-${Math.random().toString(36).slice(2,9)}`}function q(e){var t=localStorage;try{return t.setItem("extremerouter.playground.sessions",y(e)),"saved"}catch{try{return t.setItem("extremerouter.playground.sessions",y(e.map(e=>({...e,messages:(e.messages||[]).map(e=>"user"!==e.role?e:{...e,displayAttachments:Array.isArray(e.displayAttachments)?e.displayAttachments.map(e=>({id:e.id,name:e.name,stripped:!0})):void 0,content:Array.isArray(e.content)?e.content.map(e=>e&&"image_url"===e.type?{type:"image_url",image_url:{url:""}}:e):e.content})})))),"stripped"}catch{return"failed"}}}function D(){let[e,t]=(0,a.useState)(!0),[s,l]=(0,a.useState)([]),[i,o]=(0,a.useState)([]),[c,d]=(0,a.useState)({}),[u,h]=(0,a.useState)([]),[b,y]=(0,a.useState)(null),[v,N]=(0,a.useState)([]),[w,k]=(0,a.useState)({}),[A,T]=(0,a.useState)("single"),[P,_]=(0,a.useState)([""]),[R,E]=(0,a.useState)({systemPrompt:"",temperature:.7,maxTokens:4096,topP:1,frequencyPenalty:0,presencePenalty:0,topK:null,seed:null,reasoningEffort:""}),[D,F]=(0,a.useState)({}),L=(0,a.useRef)(null),K=(0,a.useRef)({}),[B,H]=(0,a.useState)(null),U=(0,a.useRef)(!1),[J,W]=(0,a.useState)(null),Y=(0,a.useRef)(null),Z=(0,a.useCallback)(e=>{W(e),Y.current&&clearTimeout(Y.current),Y.current=setTimeout(()=>W(null),3e3)},[]),[G,Q]=(0,a.useState)(!1),[V,X]=(0,a.useState)(null),[ee,et]=(0,a.useState)(null),{streamChat:es,abortAll:er,streaming:ea}=function({onDelta:e,onComplete:t,onError:s}){let r=(0,a.useRef)({}),[n,l]=(0,a.useState)(0);(0,a.useEffect)(()=>{let e=r.current;return()=>{Object.values(e).forEach(e=>e?.abort?.())}},[]);let i=(0,a.useCallback)(async(a,{body:n,apiKey:i})=>{let o=new AbortController;r.current[a]=o,l(e=>e+1);try{let r={"Content-Type":"application/json",Accept:"text/event-stream"};i&&(r.Authorization=`Bearer ${i}`);let l=await fetch("/api/v1/chat/completions",{method:"POST",headers:r,body:JSON.stringify({...n,stream:!0}),signal:o.signal});if(!l.ok){let e=await l.json().catch(()=>({error:{message:`HTTP ${l.status}`}}));s(a,e.error?.message||`HTTP ${l.status}`,l.status);return}let c=await I(l,{onChunk:t=>e(a,t)});t(a,{usage:c,ok:!0})}catch(e){e?.name!=="AbortError"&&s(a,e?.message||"Network error",0)}finally{delete r.current[a],l(e=>Math.max(0,e-1))}},[e,t,s]);return{streamChat:i,abort:(0,a.useCallback)(e=>{r.current[e]?.abort?.()},[]),abortAll:(0,a.useCallback)(()=>{Object.values(r.current).forEach(e=>e?.abort?.())},[]),streaming:n>0}}({onDelta:(0,a.useCallback)((e,t)=>{let s=K.current[e];s&&("single"===s.mode?N(e=>f(e,s.assistantId,{content:x(e.find(e=>e.id===s.assistantId)?.content,t.content),reasoning:x(e.find(e=>e.id===s.assistantId)?.reasoning,t.reasoning)})):k(s=>{let r;return r=s[e]||{...p},{...s,[e]:{...r,content:x(r.content,t.content),reasoning:x(r.reasoning,t.reasoning)}}}))},[]),onComplete:(0,a.useCallback)((e,{usage:t})=>{let s=K.current[e];s&&("single"===s.mode?(N(e=>f(e,s.assistantId,{streaming:!1})),F({model:s.modelId,inputTokens:t?.prompt_tokens||0,outputTokens:t?.completion_tokens||0,latencyMs:Date.now()-s.startTime})):k(s=>g(s,e,{streaming:!1,usage:t})),delete K.current[e])},[]),onError:(0,a.useCallback)((e,t)=>{let s,r=K.current[e];if(!r)return;let a=((s=(s=(s=(s=(s="string"==typeof t?t:String(t??"")).replace(/https?:\/\/[^\s"'<>]+/g,"[url]")).replace(/(Bearer\s+)[A-Za-z0-9._\-]{16,}/gi,"$1[token]")).replace(/(signature=)[A-Za-z0-9%+/=]{16,}/gi,"$1[sig]")).replace(/\{[\s\S]{80,}\}/g,"[provider json]")).length>300&&(s=s.slice(0,297)+"..."),s.trim());"single"===r.mode?N(e=>f(e,r.assistantId,{content:`❌ Error: ${a}`,streaming:!1,error:!0})):k(t=>g(t,e,{content:`❌ ${a}`,streaming:!1,error:!0})),delete K.current[e]},[])}),en=(0,a.useCallback)(async()=>{X(null);try{let[e,t,s]=await Promise.all([fetch("/api/providers"),fetch("/api/models/alias"),fetch("/api/v1/models")]),r=await e.json();o((r.connections||[]).filter(e=>!1!==e.isActive));let a=await t.json();d(a.aliases||{});let n=((await s.json()).data||[]).map(e=>({id:e.id,name:e.id,provider:e.owned_by||e.id.split("/")[0]}));l(n),n.length>0&&_(e=>e[0]?e:[n[0].id])}catch(e){X(e?.message||"Failed to load models")}},[]);(0,a.useEffect)(()=>{(async()=>{h(function(){try{let e=localStorage.getItem("extremerouter.playground.sessions");return e?JSON.parse(e):[]}catch{return[]}}());try{let e=await fetch("/api/keys"),t=await e.json(),s=(t.keys||t||[]).find?.(e=>!1!==e.isActive);s?.key&&(L.current=s.key)}catch{}try{let e=await fetch("/api/settings"),t=await e.json(),s=!0===t.requireApiKey;Q(s&&!L.current)}catch{Q(!1)}await en(),t(!1)})()},[en]),(0,a.useEffect)(()=>{"single"===A&&(U.current=!1)},[A]);let el=(0,a.useCallback)(()=>{v.length>0&&b&&ec(b,v),H(null),N([]),y(null),F({}),k({})},[v,b]),ei=(0,a.useCallback)(e=>{v.length>0&&b&&ec(b,v),N(e.messages||[]),y(e.id),Array.isArray(e.models)&&e.models.length>0?_([...e.models]):e.model&&_([e.model]),e.mode&&T(e.mode),e.params&&E(e.params),F({}),k(e.compareResults?{...e.compareResults}:{})},[v,b]),eo=(0,a.useCallback)(e=>{let t=u.filter(t=>t.id!==e);h(t),q(t),b===e&&(y(null),N([]))},[u,b]),ec=(0,a.useCallback)((e,t)=>{let s=u.map(s=>s.id===e?{...s,messages:t.slice(-60),updatedAt:Date.now()}:s).slice(0,100);h(s),q(s)},[u]),ed=(0,a.useCallback)(()=>{let e=v.length>0,t="compare"===A&&Object.keys(w).length>0;if(!e&&!t)return;let s=b||z(),r=function({id:e,messages:t,params:s,selectedModels:r,mode:a,compareResults:n}){return{id:e,title:t.length>0?function(e,t="New Chat"){let s=e.find(e=>"user"===e.role);if(!s)return t;let r=s.content;Array.isArray(r)&&(r=r.map(e=>e&&"text"===e.type?e.text:"").filter(Boolean).join(" ")),"string"!=typeof r&&(r="");let a=r.trim().replace(/\s+/g," ");return a?a.slice(0,40):t}(t):"compare"===a?"Compare":"New Chat",messages:t.slice(-60),model:r[0]||"",models:r,mode:a,compareResults:"compare"===a&&n&&Object.keys(n).length>0?JSON.parse(JSON.stringify(n)):void 0,params:{...s},createdAt:Date.now(),updatedAt:Date.now()}}({id:s,messages:v,params:R,selectedModels:P,mode:A,compareResults:w}),a=(u.find(e=>e.id===s)?u.map(e=>e.id===s?{...e,...r}:e):[r,...u]).slice(0,100);h(a);let n=q(a);y(s),Z(n)},[v,b,u,P,R,A,w,Z]),em=(0,a.useCallback)((e,t=[])=>{let s=t.length>0,r={role:"user",content:s?[{type:"text",text:e},...t.map(e=>({type:"image_url",image_url:{url:e.dataUrl}}))]:e,id:z(),displayText:e,displayAttachments:s?t:void 0},a=[...v];R.systemPrompt&&a.unshift({role:"system",content:R.systemPrompt});let n=[...a.slice(-50),r],l={temperature:R.temperature,max_tokens:R.maxTokens,top_p:R.topP};return R.frequencyPenalty&&(l.frequency_penalty=R.frequencyPenalty),R.presencePenalty&&(l.presence_penalty=R.presencePenalty),R.topK&&(l.top_k=R.topK),null!=R.seed&&(l.seed=R.seed),R.reasoningEffort&&(l.reasoning_effort=R.reasoningEffort),{userMsg:r,baseMessages:n,requestParams:l}},[v,R]),eu=(0,a.useCallback)(async(e,t=[])=>{let{userMsg:s,baseMessages:r,requestParams:a}=em(e,t),n=L.current,l=Date.now();if("single"===A){let e=P[0];if(!e)return;let t=z();N([...r.filter(e=>"system"!==e.role).map(e=>"user"===e.role?{...e,content:e.displayText??e.content,attachments:e.displayAttachments}:e),{role:"assistant",content:"",reasoning:"",id:t,model:e,streaming:!0}]),K.current.single={mode:"single",assistantId:t,modelId:e,startTime:l},await es("single",{body:{model:e,messages:r,...a},apiKey:n})}else{let e=P.map((e,t)=>({modelId:e,key:`${t}::${e}`})).filter(e=>e.modelId);if(0===e.length)return;let t={};for(let s of e)t[s.key]={...p};k(t),e.forEach(e=>{K.current[e.key]={mode:"compare",modelId:e.modelId,startTime:l}}),await Promise.allSettled(e.map(e=>es(e.key,{body:{model:e.modelId,messages:r,...a},apiKey:n}))),F({compareLatencyMs:Date.now()-l,models:e.length})}},[A,P,em,es]),ex=(0,a.useCallback)(async(e,t=[])=>{if((e.trim()||0!==t.length)&&!ea){if("compare"===A&&!U.current&&P.filter(Boolean).length>1)return void H({text:e,attachments:t});await eu(e,t)}},[A,ea,P,eu]),ep=(0,a.useCallback)(()=>{U.current=!0,B&&(eu(B.text,B.attachments),H(null))},[B,eu]),eg=(0,a.useCallback)(()=>{er(),K.current={},N(e=>e.map(e=>e.streaming?{...e,streaming:!1}:e)),k(e=>{let t={};for(let[s,r]of Object.entries(e))t[s]={...r,streaming:!1};return t})},[er]);return e?(0,r.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,r.jsx)(n.zY,{title:"Playground",description:"Test models, compare outputs, tune parameters",icon:"science"}),(0,r.jsx)(n.Qv,{})]}):(0,r.jsxs)("div",{className:"flex min-w-0 flex-col gap-4",children:[(0,r.jsx)(n.zY,{title:"Playground",description:"Test models, compare outputs, tune parameters",icon:"science",actions:(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)(n.Iz,{options:[{value:"single",label:"Chat"},{value:"compare",label:"Compare"}],value:A,onChange:T,size:"sm"}),(0,r.jsx)(n.$n,{size:"sm",variant:"ghost",icon:ea?"stop":"save",onClick:ea?eg:ed,disabled:!ea&&0===v.length,children:ea?"Stop":"Save"}),(0,r.jsx)(n.$n,{size:"sm",variant:"ghost",icon:"history",className:"lg:hidden","aria-label":"Open history",onClick:()=>et("history")}),(0,r.jsx)(n.$n,{size:"sm",variant:"ghost",icon:"tune",className:"lg:hidden","aria-label":"Open parameters",onClick:()=>et("params")}),J&&(0,r.jsxs)("span",{className:"text-xs text-text-muted",role:"status","aria-live":"polite",children:["saved"===J&&"Saved","stripped"===J&&"Saved — images removed to fit storage","failed"===J&&"Save failed"]})]})}),(G||V)&&(0,r.jsxs)("div",{className:"flex flex-col gap-2",children:[G&&(0,r.jsxs)("div",{className:"flex items-center justify-between gap-3 rounded-brand border border-warning/30 bg-warning/5 px-3 py-2 text-xs text-warning",children:[(0,r.jsxs)("span",{children:[(0,r.jsx)("b",{children:"API key required."})," The gateway requires an API key for requests, but no active key was found — sends will fail with a 401."]}),(0,r.jsx)("a",{href:"/dashboard/endpoint",className:"shrink-0 font-semibold underline hover:text-warning/80",children:"Create an API key →"})]}),V&&(0,r.jsxs)("div",{className:"flex items-center justify-between gap-3 rounded-brand border border-danger/30 bg-danger/5 px-3 py-2 text-xs text-danger",children:[(0,r.jsxs)("span",{className:"truncate",children:["Failed to load models: ",V]}),(0,r.jsx)(n.$n,{size:"sm",variant:"outline",icon:"refresh",onClick:en,children:"Retry"})]})]}),(0,r.jsxs)("div",{className:"flex min-w-0 gap-4",children:[(0,r.jsx)("div",{className:"hidden w-56 shrink-0 lg:block",children:(0,r.jsx)(S,{sessions:u,currentSession:b,onNew:el,onLoad:ei,onDelete:eo})}),(0,r.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-3",children:["single"===A?(0,r.jsx)(m,{models:s,value:P[0],onChange:e=>_([e]),activeProviders:i,modelAliases:c}):(0,r.jsxs)("div",{className:"flex flex-wrap gap-2",children:[P.map((e,t)=>(0,r.jsxs)("div",{className:"flex items-center gap-1",children:[(0,r.jsx)(m,{models:s,value:e,onChange:e=>{let s=[...P];s[t]=e,_(s)},compact:!0,activeProviders:i,modelAliases:c}),P.length>2&&(0,r.jsx)("button",{onClick:()=>_(P.filter((e,s)=>s!==t)),className:"rounded-lg p-1.5 text-text-muted hover:bg-surface-2 hover:text-danger",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"close"})})]},t)),P.length<4&&(0,r.jsxs)("button",{onClick:()=>_([...P,""]),className:"flex items-center gap-1 rounded-lg border border-dashed border-border px-3 py-1.5 text-xs text-text-muted hover:border-primary/40 hover:text-primary",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"add"}),"Add Model"]})]}),"single"===A?(0,r.jsx)(O,{messages:v,onSend:ex,streaming:ea,stats:D}):(0,r.jsx)("div",{className:"flex min-w-0 gap-3",children:P.map((e,t)=>{if(!e)return null;let s=`${t}::${e}`,a=w[s];return(0,r.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col rounded-brand border border-border-subtle bg-panel",children:[(0,r.jsx)("div",{className:"border-b border-border-subtle px-3 py-2",children:(0,r.jsx)("span",{className:"truncate text-xs font-medium text-text-main",children:e})}),(0,r.jsxs)("div",{className:"custom-scrollbar max-h-[60vh] min-h-[200px] overflow-y-auto p-3",children:[a?.reasoning&&(0,r.jsxs)("details",{className:"mb-2 rounded bg-black/5 px-2 py-1 dark:bg-white/5",children:[(0,r.jsx)("summary",{className:"cursor-pointer text-[10px] font-medium text-text-muted",children:"Reasoning"}),(0,r.jsx)("p",{className:"mt-1 whitespace-pre-wrap text-xs italic text-text-muted",children:a.reasoning})]}),a?.content?(0,r.jsxs)("div",{className:`text-sm ${a.error?"text-danger":"text-text-main"}`,children:[a.error?(0,r.jsx)("p",{className:"whitespace-pre-wrap break-words",children:a.content}):(0,r.jsx)($,{content:a.content,role:"assistant"}),a.streaming&&(0,r.jsx)("span",{className:"ml-0.5 inline-block size-3 animate-pulse rounded-full bg-primary/50 align-middle"})]}):(0,r.jsx)("p",{className:"text-sm text-text-muted",children:ea?"Waiting...":"Send a message to compare"})]})]},s)})}),(0,r.jsx)(M,{onSend:ex,streaming:ea,onStop:eg}),Object.keys(D).length>0&&(0,r.jsx)(C,{stats:D,mode:A})]}),(0,r.jsx)("div",{className:"hidden w-60 shrink-0 xl:block",children:(0,r.jsx)(j,{params:R,onChange:E,selectedModel:P[0]})})]}),(0,r.jsx)(n.uo,{isOpen:!!B,onClose:()=>H(null),onConfirm:ep,title:"Send to multiple models at once?",message:B?`Compare mode sends this exact prompt to ${P.filter(Boolean).length} models simultaneously. One request becomes ${P.filter(Boolean).length} upstream calls (~${P.filter(Boolean).length}\xd7 the tokens of a single request), billed by each provider.`:"",confirmText:"Compare all",cancelText:"Cancel",variant:"secondary"}),(0,r.jsx)(n.aF,{isOpen:"history"===ee,onClose:()=>et(null),title:"History",size:"lg",children:(0,r.jsx)("div",{className:"max-h-[70vh] overflow-y-auto",children:(0,r.jsx)(S,{sessions:u,currentSession:b,onNew:el,onLoad:e=>{ei(e),et(null)},onDelete:eo})})}),(0,r.jsx)(n.aF,{isOpen:"params"===ee,onClose:()=>et(null),title:"Parameters",size:"lg",children:(0,r.jsx)(j,{params:R,onChange:E,selectedModel:P[0]})})]})}function M({onSend:e,streaming:t,onStop:s}){let[n,l]=(0,a.useState)(""),[i,o]=(0,a.useState)([]),[c,d]=(0,a.useState)(null),m=(0,a.useRef)(null),u=(0,a.useRef)(null),x=e=>{d(e),m.current&&clearTimeout(m.current),m.current=setTimeout(()=>d(null),4e3)},p=e=>{if(!e||!e.type.startsWith("image/"))return void x("Only image files can be attached");if(e.size>5242880)return void x("Image too large — max 5MB");let t=new FileReader;t.onload=()=>{o(s=>[...s,{id:z(),dataUrl:t.result,name:e.name}])},t.readAsDataURL(e)},g=()=>{(n.trim()||0!==i.length)&&!t&&(e(n,i),l(""),o([]),u.current&&(u.current.style.height="auto"))},f=(n.trim()||i.length>0)&&!t;return(0,r.jsxs)("div",{className:"flex flex-col gap-2 rounded-brand border border-border-subtle bg-panel p-2",children:[i.length>0&&(0,r.jsx)("div",{className:"flex flex-wrap gap-2",children:i.map(e=>(0,r.jsxs)("div",{className:"group relative",children:[(0,r.jsx)("img",{src:e.dataUrl,alt:e.name,className:"h-16 w-16 rounded-lg border border-border-subtle object-cover"}),(0,r.jsx)("button",{onClick:()=>o(t=>t.filter(t=>t.id!==e.id)),className:"absolute -right-1.5 -top-1.5 flex size-5 items-center justify-center rounded-full bg-danger text-white opacity-0 transition-opacity group-hover:opacity-100",title:"Remove",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"close"})})]},e.id))}),c&&(0,r.jsx)("p",{className:"px-1 text-[10px] text-warning",role:"status","aria-live":"polite",children:c}),(0,r.jsxs)("div",{className:"flex items-end gap-2",children:[(0,r.jsx)("textarea",{ref:u,value:n,onChange:e=>{l(e.target.value),e.target.style.height="auto",e.target.style.height=Math.min(e.target.scrollHeight,120)+"px"},onPaste:e=>{let t=e.clipboardData?.items;if(!t)return;let s=!1;for(let e of t)e.type.startsWith("image/")&&(s=!0,p(e.getAsFile()));s&&e.preventDefault()},onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),g())},placeholder:"Send a message... (Enter to send, Shift+Enter for newline, paste images)",rows:1,className:"custom-scrollbar max-h-[120px] flex-1 resize-none bg-transparent px-2 py-1.5 text-sm text-text-main placeholder:text-text-muted focus:outline-none"}),t?(0,r.jsx)("button",{onClick:s,className:"flex size-9 shrink-0 items-center justify-center rounded-lg bg-danger/15 text-danger hover:bg-danger/25",title:"Stop","aria-label":"Stop",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"stop"})}):(0,r.jsx)("button",{onClick:g,disabled:!f,className:"flex size-9 shrink-0 items-center justify-center rounded-lg bg-primary text-white hover:bg-primary-hover disabled:opacity-40",title:"Send","aria-label":"Send",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"send"})})]})]})}A.xI.setOptions({gfm:!0,breaks:!0,async:!1}),$.propTypes={content:i().string,role:i().string,error:i().bool},O.propTypes={messages:i().arrayOf(i().shape({id:i().string,role:i().string,content:i().string,reasoning:i().string,model:i().string,streaming:i().bool,error:i().bool,attachments:i().array})),onSend:i().func,streaming:i().bool}}},e=>{e.O(0,[27,1992,9086,705,1321,5497,8441,3794,7358],()=>e(e.s=45518)),_N_E=e.O()}]);
|