nggrouter 0.1.21 → 0.1.23
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 +14 -12
- package/app/.next-cli-build/build-manifest.json +4 -4
- package/app/.next-cli-build/prerender-manifest.json +49 -21
- package/app/.next-cli-build/react-loadable-manifest.json +2 -2
- package/app/.next-cli-build/routes-manifest.json +12 -0
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/addons/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/addons/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/addons/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/arena/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/arena/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/arena/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/checkin/page.js +1 -0
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/checkin/page.js.nft.json +1 -0
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/checkin/page_client-reference-manifest.js +1 -0
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/error-log/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/error-log/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/error-log/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +5 -5
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/system-status/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/system-status/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/system-status/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_global-error/page.js +2 -2
- package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_global-error.html +1 -1
- package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_not-found/page.js +1 -1
- package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_not-found.html +1 -1
- package/app/.next-cli-build/server/app/_not-found.rsc +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/_not-found/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/api/addons/list/route.js +1 -1
- package/app/.next-cli-build/server/app/api/addons/list/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/addons/update/route.js +1 -1
- package/app/.next-cli-build/server/app/api/addons/update/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/saml/acs/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/acs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/start/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/status/route.js +2 -2
- package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/checkin/route.js +1 -0
- package/app/.next-cli-build/server/app/api/checkin/route.js.nft.json +1 -0
- package/app/.next-cli-build/server/app/api/checkin/route_client-reference-manifest.js +1 -0
- package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +5 -5
- package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codewhale-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codewhale-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codex-profiles/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codex-profiles/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 +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/crush-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/crush-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +3 -3
- package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/forge-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/forge-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/hermes-profiles/route.js +22 -2
- package/app/.next-cli-build/server/app/api/cli-tools/hermes-profiles/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/omp-settings/route.js +3 -3
- package/app/.next-cli-build/server/app/api/cli-tools/omp-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/cli-tools/pi-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/smelt-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/smelt-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/presets/route.js +1 -1
- package/app/.next-cli-build/server/app/api/combos/presets/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
- package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/extras/route.js +1 -1
- package/app/.next-cli-build/server/app/api/headroom/extras/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/restart/route.js +1 -1
- package/app/.next-cli-build/server/app/api/headroom/restart/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -1
- package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -1
- package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/stop/route.js +1 -1
- package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/health/route.js +1 -1
- package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/init/route.js +1 -1
- package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
- package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/locale/route.js +1 -1
- package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +1 -1
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +2 -2
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/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/[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 +1 -1
- package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/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]/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/overrides/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/overrides/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/bulk-proxy/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/bulk-proxy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +2 -2
- package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +2 -2
- package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/netlify-deploy/route.js +2 -2
- package/app/.next-cli-build/server/app/api/proxy-pools/netlify-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/health/route.js +2 -2
- package/app/.next-cli-build/server/app/api/pxpipe/health/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/install/route.js +2 -2
- package/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js +2 -2
- package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js +2 -2
- package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/start/route.js +2 -2
- package/app/.next-cli-build/server/app/api/pxpipe/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js +2 -2
- package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/status/route.js +2 -2
- package/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js +2 -2
- package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/database/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/system/status/route.js +1 -1
- package/app/.next-cli-build/server/app/api/system/status/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]/claude-reset/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/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/error-logs/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/error-logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/logs/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/stream/route.js +2 -2
- package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +2 -2
- package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/[...model]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/[...model]/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/systemone/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/systemone/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/version/route.js +1 -1
- package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
- package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
- package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/callback/page.js +1 -1
- package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/callback.html +1 -1
- package/app/.next-cli-build/server/app/callback.rsc +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/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/arena.html +2 -2
- package/app/.next-cli-build/server/app/dashboard/arena.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/arena.segments/!KGRhc2hib2FyZCk/dashboard/arena/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/arena.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/arena.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/checkin.html +1 -0
- package/app/.next-cli-build/server/app/dashboard/checkin.meta +44 -0
- package/app/.next-cli-build/server/app/dashboard/checkin.rsc +45 -0
- package/app/.next-cli-build/server/app/dashboard/checkin.segments/!KGRhc2hib2FyZCk/dashboard/checkin/__PAGE__.segment.rsc +47 -0
- package/app/.next-cli-build/server/app/dashboard/checkin.segments/_full.segment.rsc +45 -0
- package/app/.next-cli-build/server/app/dashboard/checkin.segments/_tree.segment.rsc +11 -0
- package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/combos.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/profile.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/quota.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/quota.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/system-status.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/system-status.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/system-status.segments/!KGRhc2hib2FyZCk/dashboard/system-status/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/system-status.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/system-status.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/translator.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/usage.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard.html +1 -1
- package/app/.next-cli-build/server/app/dashboard.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/favicon.ico/route.js +1 -1
- package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/index.html +1 -1
- package/app/.next-cli-build/server/app/index.rsc +6 -6
- package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/index.segments/_full.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 +1 -1
- package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/landing.html +1 -1
- package/app/.next-cli-build/server/app/landing.rsc +6 -6
- package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/login/page.js +1 -1
- package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/login.html +1 -1
- package/app/.next-cli-build/server/app/login.rsc +6 -6
- package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/manifest.webmanifest/route.js +2 -2
- package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/page.js +1 -1
- package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app-paths-manifest.json +14 -12
- package/app/.next-cli-build/server/chunks/1132.js +1 -1
- package/app/.next-cli-build/server/chunks/1306.js +1 -1
- package/app/.next-cli-build/server/chunks/1350.js +1 -1
- package/app/.next-cli-build/server/chunks/1757.js +22 -2
- package/app/.next-cli-build/server/chunks/1782.js +51 -0
- package/app/.next-cli-build/server/chunks/2236.js +1 -0
- package/app/.next-cli-build/server/chunks/238.js +1 -1
- package/app/.next-cli-build/server/chunks/24.js +1 -1
- package/app/.next-cli-build/server/chunks/2559.js +1 -1
- package/app/.next-cli-build/server/chunks/2925.js +1 -1
- package/app/.next-cli-build/server/chunks/2970.js +2 -2
- package/app/.next-cli-build/server/chunks/3192.js +3 -3
- package/app/.next-cli-build/server/chunks/{1851.js → 3360.js} +1 -1
- package/app/.next-cli-build/server/chunks/3943.js +1 -1
- package/app/.next-cli-build/server/chunks/3966.js +1 -1
- package/app/.next-cli-build/server/chunks/412.js +2 -2
- package/app/.next-cli-build/server/chunks/4123.js +1 -1
- package/app/.next-cli-build/server/chunks/4334.js +1 -0
- package/app/.next-cli-build/server/chunks/4386.js +1 -1
- package/app/.next-cli-build/server/chunks/444.js +1 -0
- package/app/.next-cli-build/server/chunks/4732.js +2 -0
- package/app/.next-cli-build/server/chunks/4775.js +1 -1
- package/app/.next-cli-build/server/chunks/4803.js +9 -0
- package/app/.next-cli-build/server/chunks/4827.js +1 -1
- package/app/.next-cli-build/server/chunks/{3277.js → 5274.js} +1 -1
- package/app/.next-cli-build/server/chunks/5299.js +11 -4
- package/app/.next-cli-build/server/chunks/5330.js +11 -7
- package/app/.next-cli-build/server/chunks/5360.js +2 -0
- package/app/.next-cli-build/server/chunks/539.js +1 -0
- package/app/.next-cli-build/server/chunks/5390.js +1 -1
- package/app/.next-cli-build/server/chunks/5615.js +1 -1
- package/app/.next-cli-build/server/chunks/5800.js +9 -0
- package/app/.next-cli-build/server/chunks/6103.js +1 -0
- package/app/.next-cli-build/server/chunks/6252.js +9 -0
- package/app/.next-cli-build/server/chunks/6267.js +1 -0
- package/app/.next-cli-build/server/chunks/6763.js +1 -1
- package/app/.next-cli-build/server/chunks/6877.js +1 -1
- package/app/.next-cli-build/server/chunks/6922.js +1 -1
- package/app/.next-cli-build/server/chunks/7121.js +1 -1
- package/app/.next-cli-build/server/chunks/7141.js +1 -0
- package/app/.next-cli-build/server/chunks/7211.js +1 -1
- package/app/.next-cli-build/server/chunks/7247.js +1 -1
- package/app/.next-cli-build/server/chunks/7373.js +2 -2
- package/app/.next-cli-build/server/chunks/7716.js +1 -1
- package/app/.next-cli-build/server/chunks/7774.js +13 -13
- package/app/.next-cli-build/server/chunks/7828.js +1 -1
- package/app/.next-cli-build/server/chunks/7911.js +1 -1
- package/app/.next-cli-build/server/chunks/7965.js +2 -2
- package/app/.next-cli-build/server/chunks/8062.js +9 -0
- package/app/.next-cli-build/server/chunks/8228.js +9 -0
- package/app/.next-cli-build/server/chunks/8238.js +1 -1
- package/app/.next-cli-build/server/chunks/8432.js +1 -0
- package/app/.next-cli-build/server/chunks/8469.js +9 -0
- package/app/.next-cli-build/server/chunks/8499.js +4 -54
- package/app/.next-cli-build/server/chunks/8895.js +13 -8
- package/app/.next-cli-build/server/chunks/8910.js +1 -1
- package/app/.next-cli-build/server/chunks/8920.js +1 -1
- package/app/.next-cli-build/server/chunks/915.js +1 -1
- package/app/.next-cli-build/server/instrumentation.js +2 -1
- package/app/.next-cli-build/server/instrumentation.js.nft.json +1 -1
- package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
- package/app/.next-cli-build/server/middleware-react-loadable-manifest.js +1 -1
- package/app/.next-cli-build/server/middleware.js +6 -6
- package/app/.next-cli-build/server/middleware.js.nft.json +1 -1
- package/app/.next-cli-build/server/pages/404.html +1 -1
- package/app/.next-cli-build/server/pages/500.html +1 -1
- package/app/.next-cli-build/server/prefetch-hints.json +24 -0
- package/app/.next-cli-build/server/preview-props.json +3 -3
- 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/2985-0edfac861dcab249.js +1 -0
- package/app/.next-cli-build/static/chunks/{3794-39f2d5bb0d40336b.js → 3794-04350b0fcecd82e5.js} +1 -1
- package/app/.next-cli-build/static/chunks/5497-2ad88f6a28d488f2.js +7 -0
- package/app/.next-cli-build/static/chunks/{620-eb4703fefb0a8224.js → 620-664195c468db3646.js} +1 -1
- package/app/.next-cli-build/static/chunks/{761-ee86f920b407fe8e.js → 761-4b979ab522d3ca71.js} +11 -4
- package/app/.next-cli-build/static/chunks/8105-8f6822fa963b7f8e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/checkin/page-42825bd41f565908.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/{page-cfb01ebc3a0d2693.js → page-96c2c298c3e438e7.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/error-log/page-41255a729606a996.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-b9356341fb501ec9.js +27 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-5fb01979338d3c54.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/translator/{page-e2e50aefcea07c9b.js → page-002702d0d2cd95ab.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/page-c2ab03a59a42ed24.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/layout-bac485d168267329.js +1 -0
- package/app/.next-cli-build/static/chunks/app/_global-error/page-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/addons/list/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/addons/update/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/login/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/saml/acs/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/saml/metadata/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/saml/start/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/saml/test/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/status/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/checkin/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/codewhale-settings/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-profiles/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/crush-settings/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/devin-settings/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/forge-settings/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/grok-build-settings/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-profiles/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/omp-settings/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/pi-settings/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/smelt-settings/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/combos/presets/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/combos/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/extras/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/restart/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/health/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/init/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/keys/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/locale/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/alias/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/availability/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/catalog-sync/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/custom/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/test/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/bulk-import/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/zed/auto-import/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/zed/import/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pricing/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/overrides/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/bulk-proxy/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/client/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/netlify-deploy/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/health/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/logs/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/restart/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/start/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/stats/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/stop/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/database/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/shutdown/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/system/status/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tags/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/load/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/save/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/send/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/claude-reset/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/error-logs/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/history/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/models/[...model]/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/models/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/search/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/systemone/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/videos/[id]/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/videos/edits/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/videos/extensions/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/videos/generations/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/version/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/version/update/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/app/page-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/{main-00cd8c01f6f6e461.js → main-ca004678a0b6b16d.js} +1 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-9080ff61af91a815.js +1 -0
- package/app/.next-cli-build/static/chunks/{webpack-c056b5babdc7a81f.js → webpack-d22e163354099479.js} +1 -1
- package/app/.next-cli-build/static/css/5ce1d74323ea1a81.css +1 -0
- package/app/.next-cli-build/static/o6uo4o14Oyh19p0YQDVpi/_buildManifest.js +1 -0
- package/app/node_modules/@aws-sdk/core/dist-cjs/submodules/protocols/index.js +94 -1589
- package/app/node_modules/@aws-sdk/core/package.json +2 -2
- package/app/node_modules/@aws-sdk/credential-provider-cognito-identity/package.json +3 -3
- package/app/node_modules/@aws-sdk/credential-provider-env/package.json +3 -3
- package/app/node_modules/@aws-sdk/credential-provider-http/package.json +3 -3
- package/app/node_modules/@aws-sdk/credential-provider-ini/package.json +10 -10
- package/app/node_modules/@aws-sdk/credential-provider-login/package.json +4 -4
- package/app/node_modules/@aws-sdk/credential-provider-node/package.json +8 -8
- package/app/node_modules/@aws-sdk/credential-provider-process/package.json +3 -3
- package/app/node_modules/@aws-sdk/credential-provider-sso/package.json +5 -5
- package/app/node_modules/@aws-sdk/credential-provider-web-identity/package.json +4 -4
- package/app/node_modules/@aws-sdk/credential-providers/package.json +13 -13
- package/app/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +1 -1
- package/app/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +1 -1
- package/app/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +1 -1
- package/app/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +1 -1
- package/app/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +1 -1
- package/app/node_modules/@aws-sdk/nested-clients/package.json +3 -3
- package/app/node_modules/@aws-sdk/token-providers/dist-cjs/index.js +37 -19
- package/app/node_modules/@aws-sdk/token-providers/package.json +4 -4
- package/app/node_modules/@next/env/package.json +1 -1
- package/app/node_modules/baseline-browser-mapping/dist/index.cjs +1 -1
- package/app/node_modules/baseline-browser-mapping/package.json +4 -4
- package/app/node_modules/next/dist/build/swc/index.js +1 -1
- package/app/node_modules/next/dist/build/webpack-config.js +3 -3
- package/app/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js +1 -1
- package/app/node_modules/next/dist/compiled/next-server/app-page-turbo-experimental.runtime.prod.js +1 -1
- package/app/node_modules/next/dist/compiled/next-server/app-page-turbo.runtime.prod.js +1 -1
- package/app/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js +1 -1
- package/app/node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js +1 -1
- package/app/node_modules/next/dist/lib/patch-incorrect-lockfile.js +3 -3
- package/app/node_modules/next/dist/server/app-render/async-local-storage.js +1 -1
- package/app/node_modules/next/dist/server/config.js +1 -1
- package/app/node_modules/next/dist/server/dev/hot-reloader-turbopack.js +2 -2
- package/app/node_modules/next/dist/server/dev/hot-reloader-webpack.js +1 -1
- package/app/node_modules/next/dist/server/lib/app-info-log.js +1 -1
- package/app/node_modules/next/dist/server/lib/generate-agent-files.js +3 -3
- package/app/node_modules/next/dist/server/lib/router-server.js +1 -1
- package/app/node_modules/next/dist/server/lib/start-server.js +1 -1
- package/app/node_modules/next/dist/server/lib/trace/tracer.js +1 -1
- package/app/node_modules/next/dist/server/typescript/rules/config.js +2 -2
- package/app/node_modules/next/dist/telemetry/anonymous-meta.js +1 -1
- package/app/node_modules/next/dist/telemetry/events/swc-load-failure.js +1 -1
- package/app/node_modules/next/dist/telemetry/events/version.js +2 -2
- package/app/node_modules/next/package.json +10 -10
- package/app/node_modules/sql.js/dist/sql-wasm.js +92 -92
- package/app/node_modules/sql.js/package.json +1 -1
- package/app/package.json +2 -2
- package/app/public/fonts/material-symbols-outlined.woff2 +0 -0
- package/app/src/mitm/server.js +25 -25
- package/package.json +1 -1
- package/src/cli/menus/providers.js +4 -0
- package/app/.next-cli-build/server/chunks/2708.js +0 -1
- package/app/.next-cli-build/server/chunks/3726.js +0 -1
- package/app/.next-cli-build/server/chunks/700.js +0 -1
- package/app/.next-cli-build/server/chunks/7066.js +0 -1
- package/app/.next-cli-build/server/chunks/8251.js +0 -1
- package/app/.next-cli-build/server/chunks/8402.js +0 -1
- package/app/.next-cli-build/server/chunks/8716.js +0 -1
- package/app/.next-cli-build/static/-A8yVxeQUhunMwVeISlwZ/_buildManifest.js +0 -1
- package/app/.next-cli-build/static/chunks/5497-bdb464e8bf997966.js +0 -7
- package/app/.next-cli-build/static/chunks/6808-e6340e2d4cfe01fe.js +0 -1
- package/app/.next-cli-build/static/chunks/8105-5dd3fc022d984a17.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/error-log/page-b29648e60668531b.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-deb38e87524ff14e.js +0 -27
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-06427d5637ff9cb2.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/page-07ce5bf168a701aa.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/layout-8d03e04e4f7e0bcc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/_global-error/page-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/addons/list/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/addons/update/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/login/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/saml/acs/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/saml/metadata/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/saml/start/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/saml/test/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/status/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/codewhale-settings/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-profiles/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/crush-settings/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/devin-settings/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/forge-settings/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/grok-build-settings/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-profiles/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/omp-settings/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/pi-settings/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/smelt-settings/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/combos/presets/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/combos/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/extras/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/restart/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/health/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/init/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/keys/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/locale/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/alias/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/availability/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/catalog-sync/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/custom/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/test/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/bulk-import/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/zed/auto-import/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/zed/import/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pricing/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/overrides/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/bulk-proxy/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/client/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/netlify-deploy/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/health/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/logs/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/restart/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/start/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/stats/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/stop/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/database/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/shutdown/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/system/status/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tags/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/load/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/save/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/send/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/claude-reset/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/error-logs/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/history/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/models/[...model]/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/models/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/search/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/systemone/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/videos/[id]/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/videos/edits/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/videos/extensions/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/videos/generations/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/version/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/version/update/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/app/page-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-7d5b3595c7187b08.js +0 -1
- package/app/.next-cli-build/static/css/a97374177c39fad4.css +0 -1
- /package/app/.next-cli-build/static/{-A8yVxeQUhunMwVeISlwZ → o6uo4o14Oyh19p0YQDVpi}/_ssgManifest.js +0 -0
package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/checkin/page-42825bd41f565908.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6585],{11780:(e,t,s)=>{"use strict";s.d(t,{default:()=>d});var a=s(95155),i=s(12115),l=s(35497),r=s(73006);function n(e){let t=[];return e.claimed>0&&t.push(`${e.claimed} claimed`),e.credit>0&&t.push(`+${e.credit}`),e.alreadyClaimed>0&&t.push(`${e.alreadyClaimed} already done`),e.inactive>0&&t.push(`${e.inactive} no activity`),e.failed>0&&t.push(`${e.failed} failed`),t.join(", ")||"Nothing to do"}function c(e){let t={accounts:0,claimed:0,alreadyClaimed:0,inactive:0,failed:0,credit:0};for(let s of e)t.accounts+=s.accounts||0,t.claimed+=s.claimed||0,t.alreadyClaimed+=s.alreadyClaimed||0,t.inactive+=s.inactive||0,t.failed+=s.failed||0,t.credit+=s.credit||0;if(0===t.accounts)return"No accounts to check in";let s=[`${e.length} provider${1===e.length?"":"s"}, ${t.accounts} account${1===t.accounts?"":"s"}`];return t.claimed>0&&s.push(`${t.claimed} claimed`),t.credit>0&&s.push(`+${t.credit}`),t.alreadyClaimed>0&&s.push(`${t.alreadyClaimed} already done`),t.inactive>0&&s.push(`${t.inactive} no activity`),t.failed>0&&s.push(`${t.failed} failed`),s.join(" \xb7 ")}function d(){let[e,t]=(0,i.useState)(!0),[s,d]=(0,i.useState)(""),[o,x]=(0,i.useState)(!1),[h,m]=(0,i.useState)({}),[u,p]=(0,i.useState)([]),[f,y]=(0,i.useState)(0),[v,j]=(0,i.useState)(!1),[b,w]=(0,i.useState)(null),[g,k]=(0,i.useState)(null),[N,C]=(0,i.useState)(null),[$,E]=(0,i.useState)(!1),[S,T]=(0,i.useState)("en");(0,i.useEffect)(()=>(T((0,r.kk)()),(0,r.oQ)(()=>T((0,r.kk)()))),[]);let A=(0,i.useCallback)(e=>{x(!0===e.enabled),m(e.providers&&"object"==typeof e.providers?e.providers:{}),p(Array.isArray(e.supported)?e.supported:[]),y("number"==typeof e.totalAccounts?e.totalAccounts:0),j(!0===e.ranToday),w(e.state||null)},[]),_=(0,i.useCallback)(async()=>{try{let e=await fetch("/api/checkin",{headers:{"Cache-Control":"no-store"}});if(!e.ok)throw Error(`HTTP ${e.status}`);A(await e.json()),d("")}catch(e){d(String(e.message||e))}finally{t(!1)}},[A]);(0,i.useEffect)(()=>{_()},[_]);let O=async e=>{E(!0),d("");try{let t=await fetch("/api/checkin",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),s=await t.json();if(!t.ok)throw Error(s.error||`HTTP ${t.status}`);return A(s),!0}catch(e){return d(String(e.message||e)),await _(),!1}finally{E(!1)}},P=async e=>{k(e||"all"),d(""),C(null);try{let t,s=e?`?provider=${encodeURIComponent(e)}`:"",a=new AbortController,i=setTimeout(()=>a.abort(),18e4);try{t=await fetch(`/api/checkin${s}`,{method:"POST",signal:a.signal})}finally{clearTimeout(i)}let l=await t.json();if(!t.ok)throw Error(l.error||l.message||`HTTP ${t.status}`);C(l),await _()}catch(e){d("AbortError"===e.name?"Check-in timed out. Check the server logs for the result.":String(e.message||e))}finally{k(null)}},z=Object.keys(h).length>0,H=e=>!z||!0===h[e],M=b?.channels||[];return e?(0,a.jsx)("div",{className:"flex items-center justify-center py-16",children:(0,a.jsx)(l.y$,{})}):(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-6",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[o?(0,a.jsx)(l.Ex,{variant:"success",dot:!0,children:"Enabled"}):(0,a.jsx)(l.Ex,{variant:"default",dot:!0,children:"Disabled"}),v&&(0,a.jsx)(l.Ex,{variant:"info",icon:"check_circle",children:"Ran today"})]}),(0,a.jsx)("p",{className:"text-sm text-text-muted mt-2",children:"Claim daily credits from the providers that support check-in — right now, or automatically once a day."})]}),(0,a.jsx)("div",{className:"w-full sm:w-auto sm:shrink-0",children:(0,a.jsx)(l.$n,{onClick:()=>P(null),disabled:null!==g||$,size:"sm",fullWidth:!0,className:"sm:w-auto",children:"all"===g?"Running…":"Check in all now"})})]}),s&&(0,a.jsx)("div",{className:"p-3 rounded-[10px] bg-red-500/10 border border-red-500/30 text-sm text-red-600 dark:text-red-400 break-words",children:s}),(0,a.jsx)(l.Zp,{title:"Automatic check-in",subtitle:"Off by default — check-in spends upstream quota on your behalf",icon:"event_available",children:(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsx)(l.lM,{checked:o,onChange:e=>{x(e),O({enabled:e})},disabled:$,label:"Enable automatic check-in",description:o?"Runs once per day shortly after startup, then re-checks every 30 minutes":"Off — nothing is claimed automatically (manual buttons below still work)"}),(0,a.jsx)("div",{className:"text-xs text-text-muted break-words",children:f>0?`${f} account${1===f?"":"s"} across ${u.filter(e=>e.accounts>0).length} provider(s) can check in.`:"No connected accounts for any check-in provider yet."}),b?.channels?.length>0&&(0,a.jsxs)("div",{className:"p-3 rounded-[10px] bg-bg border border-border-subtle",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-baseline justify-between gap-x-3 gap-y-0.5",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted",children:"Last run"}),(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:[b.lastDate||"—",!1===b.lastMarked&&" \xb7 not recorded, will retry"]})]}),(0,a.jsx)("div",{className:"text-sm text-text-main mt-1",children:c(b.channels)}),(0,a.jsx)("div",{className:"space-y-0.5 mt-2",children:b.channels.map(e=>(0,a.jsxs)("div",{className:"flex flex-wrap items-baseline justify-between gap-x-3 gap-y-0.5 text-xs",children:[(0,a.jsx)("span",{className:"text-text-muted",children:e.label||e.provider}),(0,a.jsx)("span",{className:"text-text-muted",children:n(e)})]},e.provider))})]})]})}),N&&(0,a.jsx)(l.Zp,{title:"Latest result",icon:"receipt_long",children:(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("div",{className:"text-sm text-text-main",children:c(N.channels||[])}),(0,a.jsxs)("div",{className:"text-xs text-text-muted break-words",children:[N.date," \xb7"," ",N.marked?"recorded for today":"not recorded (will retry next start)",N.provider?` \xb7 only ${N.provider}`:""]}),(0,a.jsx)("div",{className:"space-y-1 mt-2",children:(N.channels||[]).map(e=>{var t,s;return(0,a.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-x-3 gap-y-1 text-sm",children:[(0,a.jsx)("span",{className:"text-text-muted",children:e.label}),(0,a.jsx)(l.Ex,{variant:(t=e.claimed,s=e.alreadyClaimed,e.failed>0?"warning":t>0?"success":s>0?"info":"default"),size:"sm",children:n(e)})]},e.provider)})})]})}),(0,a.jsxs)(l.Zp,{title:"Providers",subtitle:"Toggle a provider to include it in the automatic run, or claim it right now",icon:"dns",children:[(0,a.jsx)("div",{className:"space-y-1",children:u.map(e=>{let t=e.accounts>0,s=H(e.id),i=M.find(t=>t.provider===e.id),r=g===e.id;return(0,a.jsxs)("div",{className:"flex flex-col gap-3 py-3 border-b border-border-subtle last:border-b-0 sm:flex-row sm:items-center sm:justify-between sm:gap-4",children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)("span",{className:"text-sm font-medium text-text-main",children:e.label}),t?(0,a.jsxs)(l.Ex,{variant:"default",size:"sm",children:[e.accounts," account",1===e.accounts?"":"s"]}):(0,a.jsx)(l.Ex,{variant:"warning",size:"sm",children:"no accounts connected"})]}),i?.text&&(0,a.jsxs)("div",{className:"text-xs text-text-muted mt-1",children:["Last: ",n(i)]})]}),(0,a.jsxs)("div",{className:"flex w-full items-center gap-3 sm:w-auto sm:shrink-0",children:[(0,a.jsx)(l.lM,{checked:s,onChange:t=>((e,t)=>{let s={};for(let e of u)s[e.id]=H(e.id);s[e]=t,m(s),O({providers:s})})(e.id,t),disabled:$||!o,size:"sm"}),(0,a.jsx)(l.$n,{variant:"secondary",size:"sm",disabled:!t||null!==g||$,onClick:()=>P(e.id),className:"flex-1 sm:flex-none",children:r?"Running…":"Check in now"})]})]},e.id)})}),!o&&(0,a.jsx)("div",{className:"text-xs text-text-muted mt-4",children:"Per-provider toggles are disabled while automatic check-in is off. The “Check in now” buttons still work."}),o&&!z&&(0,a.jsx)("div",{className:"text-xs text-text-muted mt-4",children:"No provider filter set — every provider with accounts is included. Toggling any switch above pins the list explicitly."})]}),(0,a.jsx)(l.Zp,{title:"How it works",icon:"help",children:(0,a.jsxs)("ul",{className:"text-xs text-text-muted space-y-2 list-disc pl-4",children:[(0,a.jsx)("li",{children:"Off by default: check-in spends upstream quota on your behalf, so you opt in here."}),(0,a.jsx)("li",{children:"Accounts are processed one at a time, never in parallel, to avoid tripping provider rate limits."}),(0,a.jsx)("li",{children:"A provider is recorded as done for the day only when at least one account reports success or “already checked in”. A round where every account answers “activity not open” is not recorded, so the next start retries — that way a campaign that opens later is still claimed the same day it appears."}),(0,a.jsxs)("li",{children:["Day boundaries differ per provider: CodeBuddy settles its daily allowance on"," ",(0,a.jsx)("code",{className:"text-[11px]",children:"UTC+8"}),", while MiniMax Code settles on the IANA timezone sent with the request (here"," ",(0,a.jsx)("code",{className:"text-[11px]",children:"Asia/Jakarta"}),")."]}),(0,a.jsxs)("li",{children:["Implemented here: ",u.length>0?u.map((e,t)=>(0,a.jsxs)("span",{children:[t>0?", ":"",(0,a.jsx)("code",{className:"text-[11px]",children:e.id})]},e.id)):"none",". Every other provider’s check-in path is not ported."]})]})})]})}},57414:(e,t,s)=>{Promise.resolve().then(s.bind(s,11780))}},e=>{e.O(0,[763,8105,620,705,5497,8441,3794,7358],()=>e(e.s=57414)),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3649],{45606:(e,t,s)=>{Promise.resolve().then(s.bind(s,80191))},80191:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>y});var l=s(95155),a=s(12115),r=s(44923),o=s(87256),n=s(39768),i=s(5020),d=s(35497),c=s(11059),m=s(929),x=s(67899);let u=/^[a-zA-Z0-9_.\-]+$/,p=[{key:"vision",label:"Vision",icon:"visibility",desc:"images (png, jpg, webp, …)"},{key:"audioInput",label:"Audio",icon:"graphic_eq",desc:"audio input"}],h="oc/mimo-v2.6-flash-free",f=e=>"oc/mimo-v2.5-free"===e?h:e,b={enabled:!0,roundRobin:!1,models:[]},g={vision:{...b},pdf:{...b},audioInput:{...b},videoInput:{...b}},j=[{value:"fallback",label:"Fallback — try in order"},{value:"round-robin",label:"Round Robin — rotate"},{value:"fastest",label:"Fastest — lowest latency"},{value:"cheapest",label:"Cheapest — lowest cost"},{value:"fusion",label:"Fusion — panel + judge"}];function y(){let e,[t,s]=(0,a.useState)([]),[r,o]=(0,a.useState)(!0),[n,i]=(0,a.useState)(!1),[x,u]=(0,a.useState)(null),[h,y]=(0,a.useState)([]),[v,k]=(0,a.useState)({}),[C,$]=(0,a.useState)(g),{getCaps:E}=(0,m.yU)(),[M,D]=(0,a.useState)(null),[A,O]=(0,a.useState)(null),[F,P]=(0,a.useState)([]),[T,R]=(0,a.useState)(!1),{copied:_,copy:z}=(0,c.C)();(0,a.useEffect)(()=>{G()},[]),(0,a.useEffect)(()=>{let e=new Set(t.map(e=>e.id));P(t=>t.filter(t=>e.has(t)))},[t]);let I=t.filter(e=>F.includes(e.id)),q=t.length>0&&F.length===t.length,B=F.length>0,J=()=>P([]),V=async e=>{let t="cursor"===e?"Cursor Default":"Claude Default";O(e);try{let s=await fetch(`/api/combos/presets?source=${e}`),l=await s.json();if(!s.ok)return void alert(l.error||`Failed to preview ${t}`);let a=l.toCreate??(l.items||[]).filter(e=>!e.exists).length,r=l.toSkip??(l.items||[]).filter(e=>e.exists).length,o=(l.items||[]).length;if(0===o)return void alert(`No ${t} models available to generate.`);if(0===a)return void alert(`All ${o} ${t} combos already exist. Nothing to create.`);D({title:`Generate ${t}`,message:`Create ${a} combo${1===a?"":"s"} named like ${"cursor"===e?"Cursor":"Claude"} model IDs (seeded with cu/… or cc/…). ${r} already exist and will be skipped. You can edit any combo afterward to add fallbacks.`,confirmText:"Generate",variant:"primary",onConfirm:async()=>{D(e=>e?{...e,loading:!0}:null);try{let s=await fetch("/api/combos/presets",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({source:e})}),l=await s.json();if(!s.ok)return void alert(l.error||`Failed to generate ${t}`);await G(),D(null)}catch(e){console.log(`Error generating ${t}:`,e),alert(`Failed to generate ${t}`),D(e=>e?{...e,loading:!1}:null)}}})}catch(e){console.log(`Error previewing ${t}:`,e),alert(`Failed to preview ${t}`)}finally{O(null)}},G=async()=>{try{let[t,l,a]=await Promise.all([fetch("/api/combos"),fetch("/api/providers"),fetch("/api/settings")]),r=await t.json(),o=await l.json(),n=a.ok?await a.json():{};t.ok&&s((r.combos||[]).filter(e=>!e.kind||"llm"===e.kind)),l.ok&&y(o.connections||[]),k(n.comboStrategies||{});let i=n.capacityAdapter||{},d={};for(let t of p){var e;d[t.key]=(e=i[t.key],Array.isArray(e)?{enabled:!0,roundRobin:!1,models:e.map(e=>f(e?.model||e)).filter(Boolean)}:e&&"object"==typeof e?{enabled:!1!==e.enabled,roundRobin:!!e.roundRobin,models:Array.isArray(e.models)?e.models.map(f).filter(Boolean):[]}:{...b})}$(d)}catch(e){console.log("Error fetching data:",e)}finally{o(!1)}},L=async e=>{$(e);try{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({capacityAdapter:e})})}catch(e){console.log("Error updating capacity adapter:",e)}},Q=async e=>{try{let t=await fetch("/api/combos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(t.ok)await G(),i(!1);else{let e=await t.json();alert(e.error||"Failed to create combo")}}catch(e){console.log("Error creating combo:",e)}},U=async(e,t)=>{try{let s=await fetch(`/api/combos/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(s.ok)await G(),u(null);else{let e=await s.json();alert(e.error||"Failed to update combo")}}catch(e){console.log("Error updating combo:",e)}},Z=(e,t=v)=>{let s={...t};for(let t of e)delete s[t];return s},W=async e=>{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStrategies:e})}),k(e)},H=async e=>{let l=t.find(t=>t.id===e);D({title:"Delete Combo",message:l?`Delete combo "${l.name}"?`:"Delete this combo?",onConfirm:async()=>{D(e=>e?{...e,loading:!0}:null);try{(await fetch(`/api/combos/${e}`,{method:"DELETE"})).ok&&(l?.name&&await W(Z([l.name])),s(t=>t.filter(t=>t.id!==e)),P(t=>t.filter(t=>t!==e))),D(null)}catch(e){console.log("Error deleting combo:",e),D(e=>e?{...e,loading:!1}:null)}}})},K=async(e,t)=>{try{let s={...v},l={...s[e]||{},...t};l.fallbackStrategy&&"fallback"!==l.fallbackStrategy?s[e]=l:delete s[e],await W(s)}catch(e){console.log("Error updating combo strategy:",e)}},Y=async e=>{if(0!==I.length&&e){R(!0);try{let t={...v};for(let s of I)e&&"fallback"!==e?t[s.name]={...t[s.name]||{},fallbackStrategy:e}:delete t[s.name];await W(t)}catch(e){console.log("Error bulk updating combo strategy:",e),alert("Failed to update strategy for selected combos")}finally{R(!1)}}};return r?(0,l.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,l.jsx)(d.Qv,{}),(0,l.jsx)(d.Qv,{})]}):(0,l.jsxs)("div",{className:"flex min-w-0 flex-col gap-6 px-1 sm:px-0",children:[(0,l.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsx)("p",{className:"text-sm text-text-muted mt-1",children:"Group models under one name, then pick a strategy per combo:"}),(0,l.jsxs)("ul",{className:"text-sm text-text-muted mt-2 flex flex-col gap-1",children:[(0,l.jsxs)("li",{children:[(0,l.jsx)("span",{className:"font-medium text-text-main",children:"Fallback"})," — tries models in order (next on failure)"]}),(0,l.jsxs)("li",{children:[(0,l.jsx)("span",{className:"font-medium text-text-main",children:"Round Robin"})," — rotates models across requests to spread load"]}),(0,l.jsxs)("li",{children:[(0,l.jsx)("span",{className:"font-medium text-text-main",children:"Fusion"})," — queries all models in parallel, then a judge synthesizes one answer. Best quality, but costs the most: every request bills all panel models + the judge (N+1 calls)"]})]}),(0,l.jsxs)("p",{className:"hidden text-xs text-text-muted mt-3 max-w-2xl",children:[(0,l.jsx)("span",{className:"font-medium text-text-main",children:"Cursor / Claude Default"})," create combos named exactly like those clients' model IDs (e.g. ",(0,l.jsx)("code",{className:"font-mono",children:"composer-2.5"}),", ",(0,l.jsx)("code",{className:"font-mono",children:"opus"}),"), seeded with the matching ",(0,l.jsx)("code",{className:"font-mono",children:"cu/…"})," or ",(0,l.jsx)("code",{className:"font-mono",children:"cc/…"})," route so traffic can hit 9router without the prefix."," ",'Note: Cursor IDE itself often blocks built-in Composer / Grok from Override OpenAI Base URL ("model does not support custom API"); add them via Cursor\'s ',(0,l.jsx)("span",{className:"font-medium text-text-main",children:"Add Custom Model"})," using the combo name, or pick a model Cursor allows through the custom endpoint."]})]}),(0,l.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:items-stretch",children:[(0,l.jsx)(d.$n,{icon:"add",onClick:()=>i(!0),className:"w-full sm:w-auto whitespace-nowrap",children:"Create Combo"}),(0,l.jsxs)("div",{className:"hidden",children:[(0,l.jsx)(d.$n,{variant:"secondary",size:"sm",icon:"edit_note",loading:"cursor"===A,disabled:!!A,onClick:()=>V("cursor"),className:"w-full whitespace-nowrap",children:"Cursor Default"}),(0,l.jsx)(d.$n,{variant:"secondary",size:"sm",icon:"smart_toy",loading:"claude"===A,disabled:!!A,onClick:()=>V("claude"),className:"w-full whitespace-nowrap",children:"Claude Default"})]})]})]}),0===t.length?(0,l.jsx)(d.Zp,{children:(0,l.jsxs)("div",{className:"text-center py-12",children:[(0,l.jsx)("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-full bg-primary/10 text-primary mb-4",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[32px]",children:"layers"})}),(0,l.jsx)("p",{className:"text-text-main font-medium mb-1",children:"No combos yet"}),(0,l.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Create model combos with fallback support"}),(0,l.jsx)(d.$n,{icon:"add",onClick:()=>i(!0),className:"w-full sm:w-auto",children:"Create Combo"})]})}):(0,l.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,l.jsxs)("div",{className:"flex min-w-0 flex-col gap-2 rounded-lg border border-black/5 bg-black/[0.015] px-3 py-2 dark:border-white/5 dark:bg-white/[0.02] sm:flex-row sm:items-center sm:justify-between",children:[(0,l.jsxs)("label",{className:"flex cursor-pointer items-center gap-2 text-xs text-text-muted hover:text-primary select-none",children:[(0,l.jsx)("input",{type:"checkbox",checked:q,ref:e=>{e&&(e.indeterminate=B&&!q)},onChange:()=>{P(q?[]:t.map(e=>e.id))},className:"h-3.5 w-3.5 rounded border-gray-300 text-primary focus:ring-primary"}),(0,l.jsx)("span",{children:B?`${F.length} selected`:`Select all (${t.length})`})]}),(0,l.jsx)("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:B&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"w-full min-w-[160px] sm:w-[200px]",children:(0,l.jsx)(d.l6,{options:j,value:"",placeholder:"Set strategy…",disabled:T,onChange:e=>{let t=e.target.value;t&&Y(t)},selectClassName:"py-1.5 text-xs"})}),(0,l.jsxs)(d.$n,{size:"sm",variant:"danger",icon:"delete",disabled:T,loading:T,onClick:()=>{if(0===I.length)return;let e=I.length;D({title:"Delete Selected Combos",message:`Delete ${e} selected combo${1===e?"":"s"}? This cannot be undone.`,confirmText:"Delete",variant:"danger",onConfirm:async()=>{D(e=>e?{...e,loading:!0}:null),R(!0);try{let e=I.map(e=>e.id),t=I.map(e=>e.name),l=(await Promise.all(e.map(e=>fetch(`/api/combos/${e}`,{method:"DELETE"})))).filter(e=>!e.ok).length;await W(Z(t)),s(t=>t.filter(t=>!e.includes(t.id))),J(),D(null),l>0&&alert(`Deleted with ${l} failure${1===l?"":"s"}.`)}catch(e){console.log("Error bulk deleting combos:",e),alert("Failed to delete selected combos"),D(e=>e?{...e,loading:!1}:null)}finally{R(!1)}}})},className:"whitespace-nowrap",children:["Delete (",F.length,")"]}),(0,l.jsx)(d.$n,{size:"sm",variant:"ghost",onClick:J,disabled:T,children:"Clear"})]})})]}),(0,l.jsx)("div",{className:"flex flex-col gap-3",children:(e=Object.fromEntries(t.map(e=>[e.name,e.models])),t.map(t=>(0,l.jsx)(w,{combo:t,getCaps:E,comboByName:e,activeProviders:h,copied:_,onCopy:z,onEdit:()=>u(t),onDelete:()=>H(t.id),strategy:v[t.name]||{},onSetStrategy:e=>K(t.name,e),selected:F.includes(t.id),onToggleSelect:()=>{var e;return e=t.id,void P(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])}},t.id)))})]}),(0,l.jsx)(N,{capacityAdapter:C,onChange:L,activeProviders:h,getCaps:E}),n&&(0,l.jsx)(S,{isOpen:n,onClose:()=>i(!1),onSave:Q,activeProviders:h},"create"),x&&(0,l.jsx)(S,{isOpen:!!x,combo:x,onClose:()=>u(null),onSave:e=>U(x.id,e),activeProviders:h},x.id),(0,l.jsx)(d.uo,{isOpen:!!M,onClose:()=>!M?.loading&&D(null),onConfirm:M?.onConfirm,title:M?.title||"Confirm",message:M?.message,confirmText:M?.confirmText||"Confirm",variant:M?.variant||"danger",loading:!!M?.loading})]})}let v=e=>{if(!e)return"?";if(e>=1e6){let t=e/1e6;return`${Number.isInteger(t)?t:t.toFixed(1)}M`}return`${Math.round(e/1e3)}k`};function w({combo:e,getCaps:t,comboByName:s={},activeProviders:r=[],copied:o,onCopy:n,onEdit:i,onDelete:c,strategy:m={},onSetStrategy:u,selected:p=!1,onToggleSelect:h}){let[f,b]=(0,a.useState)(!1),g=m.fallbackStrategy||"fallback",y=m.judgeModel||"",N=(0,x.Q5)(e.models,s,t);return(0,l.jsxs)(d.Zp,{padding:"sm",className:`group ${p?"ring-1 ring-primary/40 bg-primary/[0.03]":""}`,children:[(0,l.jsxs)("div",{className:"flex min-w-0 flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,l.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-3 sm:items-center",children:[(0,l.jsx)("label",{className:"flex shrink-0 items-center pt-1 sm:pt-0 cursor-pointer",title:"Select combo",children:(0,l.jsx)("input",{type:"checkbox",checked:p,onChange:h,onClick:e=>e.stopPropagation(),className:"h-4 w-4 rounded border-gray-300 text-primary focus:ring-primary","aria-label":`Select ${e.name}`})}),(0,l.jsx)("div",{className:"size-8 rounded-lg bg-primary/10 flex items-center justify-center shrink-0",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-primary text-[18px]",children:"layers"})}),(0,l.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,l.jsx)("code",{className:"block truncate font-mono text-sm font-medium",children:e.name}),(0,l.jsxs)("div",{className:"mt-1 flex min-w-0 flex-wrap items-center gap-1",children:[0===e.models.length?(0,l.jsx)("span",{className:"text-xs text-text-muted italic",children:"No models"}):e.models.slice(0,3).map((e,a)=>(0,l.jsxs)("code",{className:"inline-flex items-center gap-1 rounded bg-black/5 px-1.5 py-0.5 font-mono text-xs text-text-muted dark:bg-white/5",children:[(0,l.jsx)("span",{children:e}),(0,l.jsx)(d.nh,{caps:s[e]?(0,x.Q5)(s[e],s,t):t?.(e)})]},a)),e.models.length>3&&(0,l.jsxs)("span",{className:"text-[10px] text-text-muted",children:["+",e.models.length-3," more"]})]}),N&&(0,l.jsxs)("div",{className:"mt-1 flex items-center gap-2 text-[10px] text-text-muted",children:[(0,l.jsxs)("span",{children:["ctx ",v(N.contextWindow)]}),(0,l.jsx)("span",{className:"opacity-40",children:"\xb7"}),(0,l.jsxs)("span",{children:["max ",v(N.maxOutput)]})]}),"fusion"===g&&(0,l.jsxs)("div",{className:"mt-2 flex min-w-0 flex-wrap items-center gap-1.5",children:[(0,l.jsx)("span",{className:"text-[11px] font-medium text-text-muted",children:"Judge"}),(0,l.jsxs)("button",{onClick:()=>b(!0),className:"inline-flex max-w-full items-center gap-1 rounded border border-dashed border-primary/40 px-1.5 py-0.5 font-mono text-[11px] text-primary hover:border-primary hover:bg-primary/5 transition-colors",title:"Pick the model that fuses panel answers",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"gavel"}),(0,l.jsx)("span",{className:"truncate",children:y||`Auto — ${e.models[0]||"first model"}`})]}),y&&(0,l.jsx)("button",{onClick:()=>u({judgeModel:""}),className:"p-0.5 rounded text-text-muted hover:text-red-500 hover:bg-red-500/10 transition-colors",title:"Reset judge to Auto",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"close"})})]})]})]}),(0,l.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center sm:gap-3 sm:shrink-0",children:[(0,l.jsx)("div",{className:"w-full sm:w-[200px]",children:(0,l.jsx)(d.l6,{options:j,value:g,onChange:e=>u({fallbackStrategy:e.target.value}),selectClassName:"py-1.5 text-xs"})}),(0,l.jsxs)("div",{className:"grid grid-cols-3 gap-1 sm:flex",children:[(0,l.jsxs)("button",{onClick:t=>{t.stopPropagation(),n(e.name,`combo-${e.id}`)},className:"flex flex-col items-center rounded px-2 py-1 text-text-muted transition-colors hover:bg-black/5 hover:text-primary dark:hover:bg-white/5",title:"Copy combo name",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:o===`combo-${e.id}`?"check":"content_copy"}),(0,l.jsx)("span",{className:"text-[10px] leading-tight",children:"Copy"})]}),(0,l.jsxs)("button",{onClick:i,className:"flex flex-col items-center rounded px-2 py-1 text-text-muted transition-colors hover:bg-black/5 hover:text-primary dark:hover:bg-white/5",title:"Edit",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,l.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,l.jsxs)("button",{onClick:c,className:"flex flex-col items-center rounded px-2 py-1 text-red-500 transition-colors hover:bg-red-500/10",title:"Delete",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,l.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]})]})]}),f&&(0,l.jsx)(d.rq,{isOpen:f,onClose:()=>b(!1),onSelect:e=>{u({judgeModel:e?.value||""}),b(!1)},activeProviders:r,title:"Select Judge Model",addedModelValues:y?[y]:[],closeOnSelect:!0})]})}function N({capacityAdapter:e,onChange:t,activeProviders:s,getCaps:a}){return(0,l.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,l.jsx)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsx)("p",{className:"text-sm font-medium",children:"Vision Adapter"}),(0,l.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:"Your model can't read image/audio? Auto-switches to a model in the pool below."})]})}),(0,l.jsx)("div",{className:"flex flex-col gap-4",children:p.map(r=>(0,l.jsx)(k,{cap:r,entry:e[r.key]||b,onChange:s=>t({...e,[r.key]:s}),activeProviders:s,getCaps:a},r.key))})]})}function k({cap:e,entry:t,onChange:s,activeProviders:r,getCaps:o}){let[n,i]=(0,a.useState)(!1),{enabled:c,roundRobin:m,models:x}=t,u=e=>s({...t,...e}),p=(e,t)=>{let s=e+t;if(s<0||s>=x.length)return;let l=[...x];[l[e],l[s]]=[l[s],l[e]],u({models:l})};return(0,l.jsxs)(d.Zp,{padding:"sm",className:`group ${!c?"opacity-50":""}`,children:[(0,l.jsxs)("div",{className:"flex min-w-0 flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,l.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-2.5 sm:items-center",children:[(0,l.jsx)(d.lM,{checked:c,onChange:e=>u({enabled:e}),"aria-label":`Enable ${e.label} adapter`}),(0,l.jsx)("div",{className:"size-8 rounded-lg bg-primary/10 flex items-center justify-center shrink-0",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-primary text-[18px]",children:e.icon})}),(0,l.jsx)("div",{className:"min-w-0 flex-1",children:(0,l.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,l.jsx)("code",{className:"font-mono text-sm font-medium",children:e.label}),(0,l.jsxs)("span",{className:"text-[10px] text-text-muted",children:["— ",e.desc]})]})})]}),(0,l.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center sm:gap-3 sm:shrink-0",children:[(0,l.jsxs)("label",{className:"flex items-center gap-1.5 text-xs text-text-muted cursor-pointer select-none",children:[(0,l.jsx)(d.lM,{checked:m,onChange:e=>u({roundRobin:e}),disabled:!c,"aria-label":`Round-robin ${e.label} adapter`}),(0,l.jsx)("span",{children:"Round"})]}),(0,l.jsx)(d.$n,{icon:"add",variant:"ghost",size:"sm",onClick:()=>i(!0),disabled:!c,title:`Add ${e.label} model`,children:"Add Model"})]})]}),0===x.length?(0,l.jsxs)("div",{className:"mt-3 py-2 text-center text-xs text-text-muted italic",children:["No models in pool (will fallback to ",h,")"]}):(0,l.jsx)("div",{className:"mt-3 overflow-hidden rounded-lg border border-border/50",children:(0,l.jsxs)("table",{className:"w-full text-left text-xs",children:[(0,l.jsx)("thead",{children:(0,l.jsxs)("tr",{className:"border-b border-border/40 bg-black/[0.02] text-text-muted dark:bg-white/[0.02]",children:[(0,l.jsx)("th",{className:"w-12 px-3 py-1.5 font-medium text-center",children:"#"}),(0,l.jsx)("th",{className:"px-3 py-1.5 font-medium",children:"Model"}),(0,l.jsx)("th",{className:"w-24 px-3 py-1.5 font-medium text-center",children:"Order"}),(0,l.jsx)("th",{className:"w-12 px-3 py-1.5 font-medium text-right"})]})}),(0,l.jsx)("tbody",{className:"divide-y divide-border/30 font-mono",children:x.map((e,t)=>(0,l.jsxs)("tr",{className:"hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors",children:[(0,l.jsxs)("td",{className:"px-3 py-2 text-center text-text-muted text-[11px] font-sans",children:["#",t+1]}),(0,l.jsx)("td",{className:"px-3 py-2 text-text-main",children:(0,l.jsxs)("div",{className:"flex items-center gap-1.5 flex-wrap",children:[(0,l.jsx)("span",{className:"truncate",children:e}),(0,l.jsx)(d.nh,{caps:o?.(e)}),e===h&&(0,l.jsx)("span",{className:"rounded bg-emerald-500/10 px-1.5 py-0.5 font-sans text-[10px] font-medium text-emerald-600 dark:text-emerald-400",children:"free default"})]})}),(0,l.jsx)("td",{className:"px-3 py-2 text-center",children:(0,l.jsxs)("div",{className:"inline-flex items-center gap-1",children:[(0,l.jsx)("button",{type:"button",onClick:()=>p(t,-1),disabled:!c||0===t,className:`p-1 rounded transition-colors ${!c||0===t?"text-text-muted/20 cursor-not-allowed":"text-text-muted hover:text-primary hover:bg-black/5 dark:hover:bg-white/5"}`,title:"Move up",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[16px] leading-none",children:"arrow_upward"})}),(0,l.jsx)("button",{type:"button",onClick:()=>p(t,1),disabled:!c||t===x.length-1,className:`p-1 rounded transition-colors ${!c||t===x.length-1?"text-text-muted/20 cursor-not-allowed":"text-text-muted hover:text-primary hover:bg-black/5 dark:hover:bg-white/5"}`,title:"Move down",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[16px] leading-none",children:"arrow_downward"})})]})}),(0,l.jsx)("td",{className:"px-3 py-2 text-right",children:(0,l.jsx)("button",{type:"button",onClick:()=>{let e;u({models:0===(e=x.filter((e,s)=>s!==t)).length?[h]:e})},disabled:!c,className:`p-1 rounded transition-colors ${!c?"text-text-muted/20 cursor-not-allowed":"text-text-muted hover:text-red-500 hover:bg-red-500/10"}`,title:"Remove model",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[16px] leading-none",children:"close"})})})]},`${e}-${t}`))})]})}),n&&(0,l.jsx)(d.rq,{isOpen:n,onClose:()=>i(!1),onSelect:e=>{let t=e?.value||e?.name||e;!t||x.includes(t)||u({models:[...x,t]})},onDeselect:e=>{let t=e?.value||e?.name||e,s=x.filter(e=>e!==t);u({models:0===s.length?[h]:s})},activeProviders:r,title:`Add ${e.label} Model`,addedModelValues:x,capFilter:e.key,closeOnSelect:!1})]})}function C({id:e,index:t,model:s,isFirst:r,isLast:i,onEdit:d,onMoveUp:c,onMoveDown:m,onRemove:x}){let{attributes:u,listeners:p,setNodeRef:h,transform:f,isDragging:b}=(0,o.gl)({id:e}),g={transform:n.Ks.Transform.toString(f),opacity:b?.4:1,zIndex:b?999:void 0},[j,y]=(0,a.useState)(!1),[v,w]=(0,a.useState)(s),N=()=>{let e=v.trim();e&&e!==s?d(e):w(s),y(!1)};return(0,l.jsxs)("div",{ref:h,style:g,className:`group flex min-w-0 items-center gap-1.5 rounded-md px-2 py-1 bg-black/[0.02] hover:bg-black/[0.04] dark:bg-white/[0.02] dark:hover:bg-white/[0.04] transition-colors ${b?"shadow-md ring-1 ring-primary/30":""}`,children:[(0,l.jsx)("button",{...u,...p,type:"button",className:"cursor-grab touch-none p-0.5 rounded text-text-muted hover:text-primary active:cursor-grabbing shrink-0",title:"Drag to reorder",children:(0,l.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,l.jsx)("circle",{cx:"9",cy:"4",r:"2"}),(0,l.jsx)("circle",{cx:"15",cy:"4",r:"2"}),(0,l.jsx)("circle",{cx:"9",cy:"12",r:"2"}),(0,l.jsx)("circle",{cx:"15",cy:"12",r:"2"}),(0,l.jsx)("circle",{cx:"9",cy:"20",r:"2"}),(0,l.jsx)("circle",{cx:"15",cy:"20",r:"2"})]})}),(0,l.jsx)("span",{className:"text-[10px] font-medium text-text-muted w-3 text-center shrink-0",children:t+1}),j?(0,l.jsx)("input",{autoFocus:!0,value:v,onChange:e=>w(e.target.value),onBlur:N,onKeyDown:e=>{"Enter"===e.key&&N(),"Escape"===e.key&&(w(s),y(!1))},className:"min-w-0 flex-1 rounded border border-primary/40 bg-white px-1.5 py-0.5 font-mono text-xs text-text-main outline-none dark:bg-black/20"}):(0,l.jsx)("div",{className:"min-w-0 flex-1 cursor-text truncate rounded px-1.5 py-0.5 font-mono text-xs text-text-main hover:bg-black/5 dark:hover:bg-white/5",onClick:()=>y(!0),title:"Click to edit",children:s}),(0,l.jsxs)("div",{className:"flex shrink-0 items-center gap-0.5",children:[(0,l.jsx)("button",{onClick:c,disabled:r,className:`p-0.5 rounded ${r?"text-text-muted/20 cursor-not-allowed":"text-text-muted hover:text-primary hover:bg-black/5 dark:hover:bg-white/5"}`,title:"Move up",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"arrow_upward"})}),(0,l.jsx)("button",{onClick:m,disabled:i,className:`p-0.5 rounded ${i?"text-text-muted/20 cursor-not-allowed":"text-text-muted hover:text-primary hover:bg-black/5 dark:hover:bg-white/5"}`,title:"Move down",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"arrow_downward"})})]}),(0,l.jsx)("button",{onClick:x,className:"p-0.5 hover:bg-red-500/10 rounded text-text-muted hover:text-red-500 transition-all",title:"Remove",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"close"})})]})}function S({isOpen:e,combo:t,onClose:s,onSave:n,activeProviders:c,kindFilter:m=null}){let[x,p]=(0,a.useState)(t?.name||""),[h,f]=(0,a.useState)(t?.models||[]),[b,g]=(0,a.useState)(!1),[j,y]=(0,a.useState)(!1),[v,w]=(0,a.useState)(""),[N,k]=(0,a.useState)({}),$=(0,r.FR)((0,r.MS)(r.AN,{activationConstraint:{distance:5}}),(0,r.MS)(r.uN,{coordinateGetter:o.JR})),E=h.map((e,t)=>({uid:`item-${t}`,model:e})),M=async()=>{try{let e=await fetch("/api/models/alias");if(!e.ok)return;let t=await e.json();k(t.aliases||{})}catch(e){console.error("Error fetching modal data:",e)}};(0,a.useEffect)(()=>{e&&M()},[e]);let D=e=>e.trim()?u.test(e)?(w(""),!0):(w("Only letters, numbers, -, _ and . allowed"),!1):(w("Name is required"),!1),A=async()=>{D(x)&&(y(!0),await n({name:x.trim(),models:h}),y(!1))},O=!!t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(d.aF,{isOpen:e,onClose:s,title:O?"Edit Combo":"Create Combo",children:(0,l.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(d.pd,{label:"Combo Name",value:x,onChange:e=>{let t=e.target.value;p(t),t?D(t):w("")},placeholder:"my-combo",error:v}),(0,l.jsx)("p",{className:"text-[10px] text-text-muted mt-0.5",children:"Only letters, numbers, -, _ and . allowed"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Models"}),0===h.length?(0,l.jsxs)("div",{className:"text-center py-4 border border-dashed border-black/10 dark:border-white/10 rounded-lg bg-black/[0.01] dark:bg-white/[0.01]",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-xl mb-1",children:"layers"}),(0,l.jsx)("p",{className:"text-xs text-text-muted",children:"No models added yet"})]}):(0,l.jsx)(r.Mp,{sensors:$,collisionDetection:r.fp,onDragEnd:e=>{let{active:t,over:s}=e;if(s&&t.id!==s.id){let e=E.findIndex(e=>e.uid===t.id),l=E.findIndex(e=>e.uid===s.id);-1!==e&&-1!==l&&f(t=>(0,o.be)(t,e,l))}},modifiers:[i.FN,i.gj],children:(0,l.jsx)(o.gB,{items:E.map(e=>e.uid),strategy:o._G,children:(0,l.jsx)("div",{className:"flex max-h-[55vh] min-w-0 flex-col gap-1 overflow-y-auto sm:max-h-[350px]",children:E.map(({uid:e,model:t},s)=>(0,l.jsx)(C,{id:e,index:s,model:t,isFirst:0===s,isLast:s===E.length-1,onEdit:e=>{let t=[...h];t[s]=e,f(t)},onMoveUp:()=>(e=>{if(0===e)return;let t=[...h];[t[e-1],t[e]]=[t[e],t[e-1]],f(t)})(s),onMoveDown:()=>(e=>{if(e===h.length-1)return;let t=[...h];[t[e],t[e+1]]=[t[e+1],t[e]],f(t)})(s),onRemove:()=>{f(h.filter((e,t)=>t!==s))}},e))})})}),(0,l.jsxs)("button",{onClick:()=>g(!0),className:"w-full mt-2 py-2 border border-dashed border-black/10 dark:border-white/10 rounded-lg text-xs text-primary font-medium hover:text-primary hover:border-primary/50 transition-colors flex items-center justify-center gap-1",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"add"}),"Add Model"]})]}),(0,l.jsxs)("div",{className:"flex flex-col gap-2 pt-1 sm:flex-row",children:[(0,l.jsx)(d.$n,{onClick:s,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,l.jsx)(d.$n,{onClick:A,fullWidth:!0,size:"sm",disabled:!x.trim()||!!v||j,children:j?"Saving...":O?"Save":"Create"})]})]})}),b&&(0,l.jsx)(d.rq,{isOpen:b,onClose:()=>g(!1),onSelect:e=>{h.includes(e.value)||f([...h,e.value])},onDeselect:e=>{f(h.filter(t=>t!==e.value))},activeProviders:c,modelAliases:N,title:"Add Model to Combo",kindFilter:m,addedModelValues:h,closeOnSelect:!1})]})}},84680:(e,t,s)=>{"use strict";s.d(t,{PM:()=>l.PM,Sj:()=>l.Sj,Vy:()=>l.Vy,fF:()=>l.fF,sl:()=>l.sl,vL:()=>l.vL,y$:()=>l.y$,zM:()=>l.zM});var l=s(44923)}},e=>{e.O(0,[763,5353,8105,620,705,5497,8441,3794,7358],()=>e(e.s=45606)),_N_E=e.O()}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3649],{45606:(e,t,s)=>{Promise.resolve().then(s.bind(s,80191))},80191:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>y});var l=s(95155),a=s(12115),r=s(44923),n=s(87256),i=s(39768),o=s(5020),d=s(35497),c=s(11059),m=s(929),x=s(67899);let u=/^[a-zA-Z0-9_.\-]+$/,p=[{key:"vision",label:"Vision",icon:"visibility",desc:"images (png, jpg, webp, …)"},{key:"audioInput",label:"Audio",icon:"graphic_eq",desc:"audio input"}],h="oc/mimo-v2.6-flash-free",f=e=>"oc/mimo-v2.5-free"===e?h:e,b={enabled:!0,roundRobin:!1,models:[]},g={vision:{...b},pdf:{...b},audioInput:{...b},videoInput:{...b}},j=[{value:"fallback",label:"Fallback — try in order"},{value:"round-robin",label:"Round Robin — rotate"},{value:"fastest",label:"Fastest — lowest latency"},{value:"cheapest",label:"Cheapest — lowest cost"},{value:"fusion",label:"Fusion — panel + judge"}];function y(){let e,[t,s]=(0,a.useState)([]),[r,n]=(0,a.useState)(!0),[i,o]=(0,a.useState)(!1),[x,u]=(0,a.useState)(null),[h,y]=(0,a.useState)([]),[v,k]=(0,a.useState)({}),[C,$]=(0,a.useState)(g),{getCaps:E}=(0,m.yU)(),[M,D]=(0,a.useState)(null),[A,O]=(0,a.useState)(null),[F,P]=(0,a.useState)([]),[T,R]=(0,a.useState)(!1),{copied:_,copy:z}=(0,c.C)();(0,a.useEffect)(()=>{G()},[]),(0,a.useEffect)(()=>{let e=new Set(t.map(e=>e.id));P(t=>t.filter(t=>e.has(t)))},[t]);let I=t.filter(e=>F.includes(e.id)),q=t.length>0&&F.length===t.length,B=F.length>0,J=()=>P([]),V=async e=>{let t="cursor"===e?"Cursor Default":"Claude Default";O(e);try{let s=await fetch(`/api/combos/presets?source=${e}`),l=await s.json();if(!s.ok)return void alert(l.error||`Failed to preview ${t}`);let a=l.toCreate??(l.items||[]).filter(e=>!e.exists).length,r=l.toSkip??(l.items||[]).filter(e=>e.exists).length,n=(l.items||[]).length;if(0===n)return void alert(`No ${t} models available to generate.`);if(0===a)return void alert(`All ${n} ${t} combos already exist. Nothing to create.`);D({title:`Generate ${t}`,message:`Create ${a} combo${1===a?"":"s"} named like ${"cursor"===e?"Cursor":"Claude"} model IDs (seeded with cu/… or cc/…). ${r} already exist and will be skipped. You can edit any combo afterward to add fallbacks.`,confirmText:"Generate",variant:"primary",onConfirm:async()=>{D(e=>e?{...e,loading:!0}:null);try{let s=await fetch("/api/combos/presets",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({source:e})}),l=await s.json();if(!s.ok)return void alert(l.error||`Failed to generate ${t}`);await G(),D(null)}catch(e){console.log(`Error generating ${t}:`,e),alert(`Failed to generate ${t}`),D(e=>e?{...e,loading:!1}:null)}}})}catch(e){console.log(`Error previewing ${t}:`,e),alert(`Failed to preview ${t}`)}finally{O(null)}},G=async()=>{try{let[t,l,a]=await Promise.all([fetch("/api/combos"),fetch("/api/providers"),fetch("/api/settings")]),r=await t.json(),n=await l.json(),i=a.ok?await a.json():{};t.ok&&s((r.combos||[]).filter(e=>!e.kind||"llm"===e.kind)),l.ok&&y(n.connections||[]),k(i.comboStrategies||{});let o=i.capacityAdapter||{},d={};for(let t of p){var e;d[t.key]=(e=o[t.key],Array.isArray(e)?{enabled:!0,roundRobin:!1,models:e.map(e=>f(e?.model||e)).filter(Boolean)}:e&&"object"==typeof e?{enabled:!1!==e.enabled,roundRobin:!!e.roundRobin,models:Array.isArray(e.models)?e.models.map(f).filter(Boolean):[]}:{...b})}$(d)}catch(e){console.log("Error fetching data:",e)}finally{n(!1)}},L=async e=>{$(e);try{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({capacityAdapter:e})})}catch(e){console.log("Error updating capacity adapter:",e)}},Q=async e=>{try{let t=await fetch("/api/combos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(t.ok)await G(),o(!1);else{let e=await t.json();alert(e.error||"Failed to create combo")}}catch(e){console.log("Error creating combo:",e)}},U=async(e,t)=>{try{let s=await fetch(`/api/combos/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(s.ok)await G(),u(null);else{let e=await s.json();alert(e.error||"Failed to update combo")}}catch(e){console.log("Error updating combo:",e)}},Z=(e,t=v)=>{let s={...t};for(let t of e)delete s[t];return s},W=async e=>{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStrategies:e})}),k(e)},H=async e=>{let l=t.find(t=>t.id===e);D({title:"Delete Combo",message:l?`Delete combo "${l.name}"?`:"Delete this combo?",onConfirm:async()=>{D(e=>e?{...e,loading:!0}:null);try{(await fetch(`/api/combos/${e}`,{method:"DELETE"})).ok&&(l?.name&&await W(Z([l.name])),s(t=>t.filter(t=>t.id!==e)),P(t=>t.filter(t=>t!==e))),D(null)}catch(e){console.log("Error deleting combo:",e),D(e=>e?{...e,loading:!1}:null)}}})},K=async(e,t)=>{try{let s={...v},l={...s[e]||{},...t};l.fallbackStrategy&&"fallback"!==l.fallbackStrategy?s[e]=l:delete s[e],await W(s)}catch(e){console.log("Error updating combo strategy:",e)}},Y=async e=>{if(0!==I.length&&e){R(!0);try{let t={...v};for(let s of I)e&&"fallback"!==e?t[s.name]={...t[s.name]||{},fallbackStrategy:e}:delete t[s.name];await W(t)}catch(e){console.log("Error bulk updating combo strategy:",e),alert("Failed to update strategy for selected combos")}finally{R(!1)}}};return r?(0,l.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,l.jsx)(d.Qv,{}),(0,l.jsx)(d.Qv,{})]}):(0,l.jsxs)("div",{className:"flex min-w-0 flex-col gap-6 px-1 sm:px-0",children:[(0,l.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsx)("p",{className:"text-sm text-text-muted mt-1",children:"Group models under one name, then pick a strategy per combo:"}),(0,l.jsxs)("ul",{className:"text-sm text-text-muted mt-2 flex flex-col gap-1",children:[(0,l.jsxs)("li",{children:[(0,l.jsx)("span",{className:"font-medium text-text-main",children:"Fallback"})," — tries models in order (next on failure)"]}),(0,l.jsxs)("li",{children:[(0,l.jsx)("span",{className:"font-medium text-text-main",children:"Round Robin"})," — rotates models across requests to spread load"]}),(0,l.jsxs)("li",{children:[(0,l.jsx)("span",{className:"font-medium text-text-main",children:"Fusion"})," — queries all models in parallel, then a judge synthesizes one answer. Best quality, but costs the most: every request bills all panel models + the judge (N+1 calls)"]})]}),(0,l.jsxs)("p",{className:"hidden text-xs text-text-muted mt-3 max-w-2xl",children:[(0,l.jsx)("span",{className:"font-medium text-text-main",children:"Cursor / Claude Default"})," create combos named exactly like those clients' model IDs (e.g. ",(0,l.jsx)("code",{className:"font-mono",children:"composer-2.5"}),", ",(0,l.jsx)("code",{className:"font-mono",children:"opus"}),"), seeded with the matching ",(0,l.jsx)("code",{className:"font-mono",children:"cu/…"})," or ",(0,l.jsx)("code",{className:"font-mono",children:"cc/…"})," route so traffic can hit 9router without the prefix."," ",'Note: Cursor IDE itself often blocks built-in Composer / Grok from Override OpenAI Base URL ("model does not support custom API"); add them via Cursor\'s ',(0,l.jsx)("span",{className:"font-medium text-text-main",children:"Add Custom Model"})," using the combo name, or pick a model Cursor allows through the custom endpoint."]})]}),(0,l.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:items-stretch",children:[(0,l.jsx)(d.$n,{icon:"add",onClick:()=>o(!0),className:"w-full sm:w-auto whitespace-nowrap",children:"Create Combo"}),(0,l.jsxs)("div",{className:"hidden",children:[(0,l.jsx)(d.$n,{variant:"secondary",size:"sm",icon:"edit_note",loading:"cursor"===A,disabled:!!A,onClick:()=>V("cursor"),className:"w-full whitespace-nowrap",children:"Cursor Default"}),(0,l.jsx)(d.$n,{variant:"secondary",size:"sm",icon:"smart_toy",loading:"claude"===A,disabled:!!A,onClick:()=>V("claude"),className:"w-full whitespace-nowrap",children:"Claude Default"})]})]})]}),0===t.length?(0,l.jsx)(d.Zp,{children:(0,l.jsxs)("div",{className:"text-center py-12",children:[(0,l.jsx)("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-full bg-primary/10 text-primary mb-4",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[32px]",children:"layers"})}),(0,l.jsx)("p",{className:"text-text-main font-medium mb-1",children:"No combos yet"}),(0,l.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Create model combos with fallback support"}),(0,l.jsx)(d.$n,{icon:"add",onClick:()=>o(!0),className:"w-full sm:w-auto",children:"Create Combo"})]})}):(0,l.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,l.jsxs)("div",{className:"flex min-w-0 flex-col gap-2 rounded-lg border border-black/5 bg-black/[0.015] px-3 py-2 dark:border-white/5 dark:bg-white/[0.02] sm:flex-row sm:items-center sm:justify-between",children:[(0,l.jsxs)("label",{className:"flex cursor-pointer items-center gap-2 text-xs text-text-muted hover:text-primary select-none",children:[(0,l.jsx)("input",{type:"checkbox",checked:q,ref:e=>{e&&(e.indeterminate=B&&!q)},onChange:()=>{P(q?[]:t.map(e=>e.id))},className:"h-3.5 w-3.5 rounded border-gray-300 text-primary focus:ring-primary"}),(0,l.jsx)("span",{children:B?`${F.length} selected`:`Select all (${t.length})`})]}),(0,l.jsx)("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:B&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"w-full min-w-[160px] sm:w-[200px]",children:(0,l.jsx)(d.l6,{options:j,value:"",placeholder:"Set strategy…",disabled:T,onChange:e=>{let t=e.target.value;t&&Y(t)},selectClassName:"py-1.5 text-xs"})}),(0,l.jsxs)(d.$n,{size:"sm",variant:"danger",icon:"delete",disabled:T,loading:T,onClick:()=>{if(0===I.length)return;let e=I.length;D({title:"Delete Selected Combos",message:`Delete ${e} selected combo${1===e?"":"s"}? This cannot be undone.`,confirmText:"Delete",variant:"danger",onConfirm:async()=>{D(e=>e?{...e,loading:!0}:null),R(!0);try{let e=I.map(e=>e.id),t=I.map(e=>e.name),l=(await Promise.all(e.map(e=>fetch(`/api/combos/${e}`,{method:"DELETE"})))).filter(e=>!e.ok).length;await W(Z(t)),s(t=>t.filter(t=>!e.includes(t.id))),J(),D(null),l>0&&alert(`Deleted with ${l} failure${1===l?"":"s"}.`)}catch(e){console.log("Error bulk deleting combos:",e),alert("Failed to delete selected combos"),D(e=>e?{...e,loading:!1}:null)}finally{R(!1)}}})},className:"whitespace-nowrap",children:["Delete (",F.length,")"]}),(0,l.jsx)(d.$n,{size:"sm",variant:"ghost",onClick:J,disabled:T,children:"Clear"})]})})]}),(0,l.jsx)("div",{className:"flex flex-col gap-3",children:(e=Object.fromEntries(t.map(e=>[e.name,e.models])),t.map(t=>(0,l.jsx)(w,{combo:t,getCaps:E,comboByName:e,activeProviders:h,copied:_,onCopy:z,onEdit:()=>u(t),onDelete:()=>H(t.id),strategy:v[t.name]||{},onSetStrategy:e=>K(t.name,e),selected:F.includes(t.id),onToggleSelect:()=>{var e;return e=t.id,void P(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])}},t.id)))})]}),(0,l.jsx)(N,{capacityAdapter:C,onChange:L,activeProviders:h,getCaps:E}),i&&(0,l.jsx)(S,{isOpen:i,onClose:()=>o(!1),onSave:Q,activeProviders:h},"create"),x&&(0,l.jsx)(S,{isOpen:!!x,combo:x,onClose:()=>u(null),onSave:e=>U(x.id,e),activeProviders:h},x.id),(0,l.jsx)(d.uo,{isOpen:!!M,onClose:()=>!M?.loading&&D(null),onConfirm:M?.onConfirm,title:M?.title||"Confirm",message:M?.message,confirmText:M?.confirmText||"Confirm",variant:M?.variant||"danger",loading:!!M?.loading})]})}let v=e=>{if(!e)return"?";if(e>=1e6){let t=e/1e6;return`${Number.isInteger(t)?t:t.toFixed(1)}M`}return`${Math.round(e/1e3)}k`};function w({combo:e,getCaps:t,comboByName:s={},activeProviders:r=[],copied:n,onCopy:i,onEdit:o,onDelete:c,strategy:m={},onSetStrategy:u,selected:p=!1,onToggleSelect:h}){let[f,b]=(0,a.useState)(!1),g=m.fallbackStrategy||"fallback",y=m.judgeModel||"",N=(0,x.Q5)(e.models,s,t);return(0,l.jsxs)(d.Zp,{padding:"sm",className:`group ${p?"ring-1 ring-primary/40 bg-primary/[0.03]":""}`,children:[(0,l.jsxs)("div",{className:"flex min-w-0 flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,l.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-3 sm:items-center",children:[(0,l.jsx)("label",{className:"flex shrink-0 items-center pt-1 sm:pt-0 cursor-pointer",title:"Select combo",children:(0,l.jsx)("input",{type:"checkbox",checked:p,onChange:h,onClick:e=>e.stopPropagation(),className:"h-4 w-4 rounded border-gray-300 text-primary focus:ring-primary","aria-label":`Select ${e.name}`})}),(0,l.jsx)("div",{className:"size-8 rounded-lg bg-primary/10 flex items-center justify-center shrink-0",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-primary text-[18px]",children:"layers"})}),(0,l.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,l.jsx)("code",{className:"block truncate font-mono text-sm font-medium",children:e.name}),(0,l.jsxs)("div",{className:"mt-1 flex min-w-0 flex-wrap items-center gap-1",children:[0===e.models.length?(0,l.jsx)("span",{className:"text-xs text-text-muted italic",children:"No models"}):e.models.slice(0,3).map((e,a)=>(0,l.jsxs)("code",{className:"inline-flex items-center gap-1 rounded bg-black/5 px-1.5 py-0.5 font-mono text-xs text-text-muted dark:bg-white/5",children:[(0,l.jsx)("span",{children:e}),(0,l.jsx)(d.nh,{caps:s[e]?(0,x.Q5)(s[e],s,t):t?.(e)})]},a)),e.models.length>3&&(0,l.jsxs)("span",{className:"text-[10px] text-text-muted",children:["+",e.models.length-3," more"]})]}),N&&(0,l.jsxs)("div",{className:"mt-1 flex items-center gap-2 text-[10px] text-text-muted",children:[(0,l.jsxs)("span",{children:["ctx ",v(N.contextWindow)]}),(0,l.jsx)("span",{className:"opacity-40",children:"\xb7"}),(0,l.jsxs)("span",{children:["max ",v(N.maxOutput)]})]}),"fusion"===g&&(0,l.jsxs)("div",{className:"mt-2 flex min-w-0 flex-wrap items-center gap-1.5",children:[(0,l.jsx)("span",{className:"text-[11px] font-medium text-text-muted",children:"Judge"}),(0,l.jsxs)("button",{onClick:()=>b(!0),className:"inline-flex max-w-full items-center gap-1 rounded border border-dashed border-primary/40 px-1.5 py-0.5 font-mono text-[11px] text-primary hover:border-primary hover:bg-primary/5 transition-colors",title:"Pick the model that fuses panel answers",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"gavel"}),(0,l.jsx)("span",{className:"truncate",children:y||`Auto — ${e.models[0]||"first model"}`})]}),y&&(0,l.jsx)("button",{onClick:()=>u({judgeModel:""}),className:"p-0.5 rounded text-text-muted hover:text-red-500 hover:bg-red-500/10 transition-colors",title:"Reset judge to Auto",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"close"})})]})]})]}),(0,l.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center sm:gap-3 sm:shrink-0",children:[(0,l.jsx)("div",{className:"w-full sm:w-[200px]",children:(0,l.jsx)(d.l6,{options:j,value:g,onChange:e=>u({fallbackStrategy:e.target.value}),selectClassName:"py-1.5 text-xs"})}),(0,l.jsxs)("div",{className:"grid grid-cols-3 gap-1 sm:flex",children:[(0,l.jsxs)("button",{onClick:t=>{t.stopPropagation(),i(e.name,`combo-${e.id}`)},className:"flex flex-col items-center rounded px-2 py-1 text-text-muted transition-colors hover:bg-black/5 hover:text-primary dark:hover:bg-white/5",title:"Copy combo name",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:n===`combo-${e.id}`?"check":"content_copy"}),(0,l.jsx)("span",{className:"text-[10px] leading-tight",children:"Copy"})]}),(0,l.jsxs)("button",{onClick:o,className:"flex flex-col items-center rounded px-2 py-1 text-text-muted transition-colors hover:bg-black/5 hover:text-primary dark:hover:bg-white/5",title:"Edit",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,l.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,l.jsxs)("button",{onClick:c,className:"flex flex-col items-center rounded px-2 py-1 text-red-500 transition-colors hover:bg-red-500/10",title:"Delete",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,l.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]})]})]}),f&&(0,l.jsx)(d.rq,{isOpen:f,onClose:()=>b(!1),onSelect:e=>{u({judgeModel:e?.value||""}),b(!1)},activeProviders:r,title:"Select Judge Model",addedModelValues:y?[y]:[],closeOnSelect:!0})]})}function N({capacityAdapter:e,onChange:t,activeProviders:s,getCaps:a}){return(0,l.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,l.jsx)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsx)("p",{className:"text-sm font-medium",children:"Vision Adapter"}),(0,l.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:"Your model can't read image/audio? Auto-switches to a model in the pool below."})]})}),(0,l.jsx)("div",{className:"flex flex-col gap-4",children:p.map(r=>(0,l.jsx)(k,{cap:r,entry:e[r.key]||b,onChange:s=>t({...e,[r.key]:s}),activeProviders:s,getCaps:a},r.key))})]})}function k({cap:e,entry:t,onChange:s,activeProviders:r,getCaps:n}){let[i,o]=(0,a.useState)(!1),{enabled:c,roundRobin:m,models:x}=t,u=e=>s({...t,...e}),p=(e,t)=>{let s=e+t;if(s<0||s>=x.length)return;let l=[...x];[l[e],l[s]]=[l[s],l[e]],u({models:l})};return(0,l.jsxs)(d.Zp,{padding:"sm",className:`group ${!c?"opacity-50":""}`,children:[(0,l.jsxs)("div",{className:"flex min-w-0 flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,l.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-2.5 sm:items-center",children:[(0,l.jsx)(d.lM,{checked:c,onChange:e=>u({enabled:e}),"aria-label":`Enable ${e.label} adapter`}),(0,l.jsx)("div",{className:"size-8 rounded-lg bg-primary/10 flex items-center justify-center shrink-0",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-primary text-[18px]",children:e.icon})}),(0,l.jsx)("div",{className:"min-w-0 flex-1",children:(0,l.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,l.jsx)("code",{className:"font-mono text-sm font-medium",children:e.label}),(0,l.jsxs)("span",{className:"text-[10px] text-text-muted",children:["— ",e.desc]})]})})]}),(0,l.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center sm:gap-3 sm:shrink-0",children:[(0,l.jsxs)("label",{className:"flex items-center gap-1.5 text-xs text-text-muted cursor-pointer select-none",children:[(0,l.jsx)(d.lM,{checked:m,onChange:e=>u({roundRobin:e}),disabled:!c,"aria-label":`Round-robin ${e.label} adapter`}),(0,l.jsx)("span",{children:"Round"})]}),(0,l.jsx)(d.$n,{icon:"add",variant:"ghost",size:"sm",onClick:()=>o(!0),disabled:!c,title:`Add ${e.label} model`,children:"Add Model"})]})]}),0===x.length?(0,l.jsxs)("div",{className:"mt-3 py-2 text-center text-xs text-text-muted italic",children:["No models in pool (will fallback to ",h,")"]}):(0,l.jsxs)("div",{className:"mt-3 overflow-hidden rounded-lg border border-border/50",children:[(0,l.jsxs)("div",{className:"hidden items-center border-b border-border/40 bg-black/[0.02] text-xs text-text-muted sm:flex dark:bg-white/[0.02]",children:[(0,l.jsx)("span",{className:"w-12 shrink-0 px-3 py-1.5 text-center font-medium",children:"#"}),(0,l.jsx)("span",{className:"min-w-0 flex-1 px-3 py-1.5 font-medium",children:"Model"}),(0,l.jsx)("span",{className:"w-20 shrink-0 px-3 py-1.5 text-center font-medium",children:"Order"}),(0,l.jsx)("span",{className:"w-10 shrink-0 px-3 py-1.5"})]}),(0,l.jsx)("div",{className:"divide-y divide-border/30",children:x.map((e,t)=>(0,l.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 transition-colors hover:bg-black/[0.02] dark:hover:bg-white/[0.02]",children:[(0,l.jsxs)("span",{className:"w-6 shrink-0 text-center font-sans text-[11px] text-text-muted",children:["#",t+1]}),(0,l.jsx)("div",{className:"min-w-0 flex-1 font-mono text-xs",children:(0,l.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[(0,l.jsx)("span",{className:"break-all text-text-main",children:e}),(0,l.jsx)(d.nh,{caps:n?.(e)}),e===h&&(0,l.jsx)("span",{className:"rounded bg-emerald-500/10 px-1.5 py-0.5 font-sans text-[10px] font-medium text-emerald-600 dark:text-emerald-400",children:"free default"})]})}),(0,l.jsxs)("div",{className:"flex shrink-0 items-center gap-0.5",children:[(0,l.jsx)("button",{type:"button",onClick:()=>p(t,-1),disabled:!c||0===t,className:`p-1 rounded transition-colors ${!c||0===t?"text-text-muted/20 cursor-not-allowed":"text-text-muted hover:text-primary hover:bg-black/5 dark:hover:bg-white/5"}`,title:"Move up",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[16px] leading-none",children:"arrow_upward"})}),(0,l.jsx)("button",{type:"button",onClick:()=>p(t,1),disabled:!c||t===x.length-1,className:`p-1 rounded transition-colors ${!c||t===x.length-1?"text-text-muted/20 cursor-not-allowed":"text-text-muted hover:text-primary hover:bg-black/5 dark:hover:bg-white/5"}`,title:"Move down",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[16px] leading-none",children:"arrow_downward"})})]}),(0,l.jsx)("button",{type:"button",onClick:()=>{let e;u({models:0===(e=x.filter((e,s)=>s!==t)).length?[h]:e})},disabled:!c,className:`shrink-0 p-1 rounded transition-colors ${!c?"text-text-muted/20 cursor-not-allowed":"text-text-muted hover:text-red-500 hover:bg-red-500/10"}`,title:"Remove model",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[16px] leading-none",children:"close"})})]},`${e}-${t}`))})]}),i&&(0,l.jsx)(d.rq,{isOpen:i,onClose:()=>o(!1),onSelect:e=>{let t=e?.value||e?.name||e;!t||x.includes(t)||u({models:[...x,t]})},onDeselect:e=>{let t=e?.value||e?.name||e,s=x.filter(e=>e!==t);u({models:0===s.length?[h]:s})},activeProviders:r,title:`Add ${e.label} Model`,addedModelValues:x,capFilter:e.key,closeOnSelect:!1})]})}function C({id:e,index:t,model:s,isFirst:r,isLast:o,onEdit:d,onMoveUp:c,onMoveDown:m,onRemove:x}){let{attributes:u,listeners:p,setNodeRef:h,transform:f,isDragging:b}=(0,n.gl)({id:e}),g={transform:i.Ks.Transform.toString(f),opacity:b?.4:1,zIndex:b?999:void 0},[j,y]=(0,a.useState)(!1),[v,w]=(0,a.useState)(s),N=()=>{let e=v.trim();e&&e!==s?d(e):w(s),y(!1)};return(0,l.jsxs)("div",{ref:h,style:g,className:`group flex min-w-0 items-center gap-1.5 rounded-md px-2 py-1 bg-black/[0.02] hover:bg-black/[0.04] dark:bg-white/[0.02] dark:hover:bg-white/[0.04] transition-colors ${b?"shadow-md ring-1 ring-primary/30":""}`,children:[(0,l.jsx)("button",{...u,...p,type:"button",className:"cursor-grab touch-none p-0.5 rounded text-text-muted hover:text-primary active:cursor-grabbing shrink-0",title:"Drag to reorder",children:(0,l.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,l.jsx)("circle",{cx:"9",cy:"4",r:"2"}),(0,l.jsx)("circle",{cx:"15",cy:"4",r:"2"}),(0,l.jsx)("circle",{cx:"9",cy:"12",r:"2"}),(0,l.jsx)("circle",{cx:"15",cy:"12",r:"2"}),(0,l.jsx)("circle",{cx:"9",cy:"20",r:"2"}),(0,l.jsx)("circle",{cx:"15",cy:"20",r:"2"})]})}),(0,l.jsx)("span",{className:"text-[10px] font-medium text-text-muted w-3 text-center shrink-0",children:t+1}),j?(0,l.jsx)("input",{autoFocus:!0,value:v,onChange:e=>w(e.target.value),onBlur:N,onKeyDown:e=>{"Enter"===e.key&&N(),"Escape"===e.key&&(w(s),y(!1))},className:"min-w-0 flex-1 rounded border border-primary/40 bg-white px-1.5 py-0.5 font-mono text-xs text-text-main outline-none dark:bg-black/20"}):(0,l.jsx)("div",{className:"min-w-0 flex-1 cursor-text truncate rounded px-1.5 py-0.5 font-mono text-xs text-text-main hover:bg-black/5 dark:hover:bg-white/5",onClick:()=>y(!0),title:"Click to edit",children:s}),(0,l.jsxs)("div",{className:"flex shrink-0 items-center gap-0.5",children:[(0,l.jsx)("button",{onClick:c,disabled:r,className:`p-0.5 rounded ${r?"text-text-muted/20 cursor-not-allowed":"text-text-muted hover:text-primary hover:bg-black/5 dark:hover:bg-white/5"}`,title:"Move up",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"arrow_upward"})}),(0,l.jsx)("button",{onClick:m,disabled:o,className:`p-0.5 rounded ${o?"text-text-muted/20 cursor-not-allowed":"text-text-muted hover:text-primary hover:bg-black/5 dark:hover:bg-white/5"}`,title:"Move down",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"arrow_downward"})})]}),(0,l.jsx)("button",{onClick:x,className:"p-0.5 hover:bg-red-500/10 rounded text-text-muted hover:text-red-500 transition-all",title:"Remove",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"close"})})]})}function S({isOpen:e,combo:t,onClose:s,onSave:i,activeProviders:c,kindFilter:m=null}){let[x,p]=(0,a.useState)(t?.name||""),[h,f]=(0,a.useState)(t?.models||[]),[b,g]=(0,a.useState)(!1),[j,y]=(0,a.useState)(!1),[v,w]=(0,a.useState)(""),[N,k]=(0,a.useState)({}),$=(0,r.FR)((0,r.MS)(r.AN,{activationConstraint:{distance:5}}),(0,r.MS)(r.uN,{coordinateGetter:n.JR})),E=h.map((e,t)=>({uid:`item-${t}`,model:e})),M=async()=>{try{let e=await fetch("/api/models/alias");if(!e.ok)return;let t=await e.json();k(t.aliases||{})}catch(e){console.error("Error fetching modal data:",e)}};(0,a.useEffect)(()=>{e&&M()},[e]);let D=e=>e.trim()?u.test(e)?(w(""),!0):(w("Only letters, numbers, -, _ and . allowed"),!1):(w("Name is required"),!1),A=async()=>{D(x)&&(y(!0),await i({name:x.trim(),models:h}),y(!1))},O=!!t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(d.aF,{isOpen:e,onClose:s,title:O?"Edit Combo":"Create Combo",children:(0,l.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(d.pd,{label:"Combo Name",value:x,onChange:e=>{let t=e.target.value;p(t),t?D(t):w("")},placeholder:"my-combo",error:v}),(0,l.jsx)("p",{className:"text-[10px] text-text-muted mt-0.5",children:"Only letters, numbers, -, _ and . allowed"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Models"}),0===h.length?(0,l.jsxs)("div",{className:"text-center py-4 border border-dashed border-black/10 dark:border-white/10 rounded-lg bg-black/[0.01] dark:bg-white/[0.01]",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-xl mb-1",children:"layers"}),(0,l.jsx)("p",{className:"text-xs text-text-muted",children:"No models added yet"})]}):(0,l.jsx)(r.Mp,{sensors:$,collisionDetection:r.fp,onDragEnd:e=>{let{active:t,over:s}=e;if(s&&t.id!==s.id){let e=E.findIndex(e=>e.uid===t.id),l=E.findIndex(e=>e.uid===s.id);-1!==e&&-1!==l&&f(t=>(0,n.be)(t,e,l))}},modifiers:[o.FN,o.gj],children:(0,l.jsx)(n.gB,{items:E.map(e=>e.uid),strategy:n._G,children:(0,l.jsx)("div",{className:"flex max-h-[55vh] min-w-0 flex-col gap-1 overflow-y-auto sm:max-h-[350px]",children:E.map(({uid:e,model:t},s)=>(0,l.jsx)(C,{id:e,index:s,model:t,isFirst:0===s,isLast:s===E.length-1,onEdit:e=>{let t=[...h];t[s]=e,f(t)},onMoveUp:()=>(e=>{if(0===e)return;let t=[...h];[t[e-1],t[e]]=[t[e],t[e-1]],f(t)})(s),onMoveDown:()=>(e=>{if(e===h.length-1)return;let t=[...h];[t[e],t[e+1]]=[t[e+1],t[e]],f(t)})(s),onRemove:()=>{f(h.filter((e,t)=>t!==s))}},e))})})}),(0,l.jsxs)("button",{onClick:()=>g(!0),className:"w-full mt-2 py-2 border border-dashed border-black/10 dark:border-white/10 rounded-lg text-xs text-primary font-medium hover:text-primary hover:border-primary/50 transition-colors flex items-center justify-center gap-1",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"add"}),"Add Model"]})]}),(0,l.jsxs)("div",{className:"flex flex-col gap-2 pt-1 sm:flex-row",children:[(0,l.jsx)(d.$n,{onClick:s,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,l.jsx)(d.$n,{onClick:A,fullWidth:!0,size:"sm",disabled:!x.trim()||!!v||j,children:j?"Saving...":O?"Save":"Create"})]})]})}),b&&(0,l.jsx)(d.rq,{isOpen:b,onClose:()=>g(!1),onSelect:e=>{h.includes(e.value)||f([...h,e.value])},onDeselect:e=>{f(h.filter(t=>t!==e.value))},activeProviders:c,modelAliases:N,title:"Add Model to Combo",kindFilter:m,addedModelValues:h,closeOnSelect:!1})]})}},84680:(e,t,s)=>{"use strict";s.d(t,{PM:()=>l.PM,Sj:()=>l.Sj,Vy:()=>l.Vy,fF:()=>l.fF,sl:()=>l.sl,vL:()=>l.vL,y$:()=>l.y$,zM:()=>l.zM});var l=s(44923)}},e=>{e.O(0,[763,5353,8105,620,705,5497,8441,3794,7358],()=>e(e.s=45606)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4455],{1934:(e,t,s)=>{"use strict";s.d(t,{v:()=>l});var a=s(12115);let r=e=>{let t,s=new Set,a=(e,a)=>{let r="function"==typeof e?e(t):e;if(!Object.is(r,t)){let e=t;t=(null!=a?a:"object"!=typeof r||null===r)?r:Object.assign({},t,r),s.forEach(s=>s(t,e))}},r=()=>t,n={setState:a,getState:r,getInitialState:()=>l,subscribe:e=>(s.add(e),()=>s.delete(e))},l=t=e(a,r,n);return n},n=e=>{let t=e?r(e):r,s=e=>(function(e,t=e=>e){let s=a.useSyncExternalStore(e.subscribe,a.useCallback(()=>t(e.getState()),[e,t]),a.useCallback(()=>t(e.getInitialState()),[e,t]));return a.useDebugValue(s),s})(t,e);return Object.assign(s,t),s},l=e=>e?n(e):n},4797:(e,t,s)=>{Promise.resolve().then(s.bind(s,92717))},29499:(e,t,s)=>{"use strict";s.d(t,{A:()=>l});var a=s(95155),r=s(12115),n=s(31474);function l({isOpen:e,onClose:t,title:s,children:i,width:o="md",className:d}){let c={sm:"w-full max-w-[400px]",md:"w-full max-w-[500px]",lg:"w-full max-w-[600px]",xl:"w-full max-w-[800px]",full:"w-full"};return((0,r.useEffect)(()=>(e?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[e]),(0,r.useEffect)(()=>{let s=s=>{"Escape"===s.key&&e&&t()};return document.addEventListener("keydown",s),()=>document.removeEventListener("keydown",s)},[e,t]),e)?(0,a.jsxs)("div",{className:"fixed inset-0 z-50",children:[(0,a.jsx)("div",{className:"absolute inset-0 bg-black/50 backdrop-blur-[2px] fade-in cursor-pointer",onClick:t,"aria-hidden":"true"}),(0,a.jsxs)("div",{className:(0,n.cn)("absolute right-0 top-0 h-full bg-surface flex flex-col","shadow-[var(--shadow-elev)]","slide-in-right","border-l border-border-subtle",c[o]||c.md,d),children:[(0,a.jsxs)("div",{className:"flex items-center justify-between p-6 border-b border-border-subtle flex-shrink-0",children:[(0,a.jsx)("div",{className:"flex items-center gap-3",children:s&&(0,a.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:s})}),(0,a.jsx)("button",{type:"button",onClick:t,className:"p-1.5 rounded-[10px] text-text-muted hover:bg-surface-2 hover:text-text-main transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"close"})})]}),(0,a.jsx)("div",{className:"flex-1 overflow-y-auto p-6 custom-scrollbar",children:i})]})]}):null}},31474:(e,t,s)=>{"use strict";function a(...e){return e.filter(Boolean).join(" ").replace(/\s+/g," ").trim()}s.d(t,{cn:()=>a})},31590:(e,t,s)=>{"use strict";function a(e){let t,s,a=(t=e?.ttft,s=e?.total,"number"!=typeof t||!Number.isFinite(t)||"number"!=typeof s||!Number.isFinite(s)||t<=0||t>=s?null:t);return null===a?"—":`${a}ms`}function r(e){let t=e?.total;return"number"==typeof t&&Number.isFinite(t)?`${t}ms`:"—"}s.d(t,{Ej:()=>r,_g:()=>a})},50378:(e,t,s)=>{"use strict";s.d(t,{A:()=>l});var a=s(95155),r=s(31474),n=s(92542);function l({currentPage:e,pageSize:t,totalItems:s,onPageChange:i,onPageSizeChange:o,className:d}){let c=Math.ceil(s/t),m=s>0?(e-1)*t+1:0,x=Math.min(e*t,s),u=(()=>{let t=[],s=Math.max(1,e-2),a=Math.min(c,s+5-1);a-s+1<5&&(s=Math.max(1,a-5+1));for(let e=s;e<=a;e++)t.push(e);return t})();return(0,a.jsxs)("div",{className:(0,r.cn)("flex flex-col sm:flex-row items-center justify-between gap-4 py-4 px-2",d),children:[s>0&&(0,a.jsxs)("div",{className:"text-sm text-text-muted",children:["Showing ",(0,a.jsx)("span",{className:"font-medium text-text-main",children:m})," to"," ",(0,a.jsx)("span",{className:"font-medium text-text-main",children:x})," of"," ",(0,a.jsx)("span",{className:"font-medium text-text-main",children:s})," results"]}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center justify-center gap-2 sm:gap-4",children:[o&&(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-sm text-text-muted",children:"Rows:"}),(0,a.jsx)("select",{value:t,onChange:e=>o(Number(e.target.value)),className:(0,r.cn)("h-9 rounded-lg border border-black/10 dark:border-white/10 bg-surface","text-sm text-text-main focus:outline-none focus:ring-2 focus:ring-primary/20","cursor-pointer"),style:{colorScheme:"auto"},children:[10,20,50].map(e=>(0,a.jsx)("option",{value:e,children:e},e))})]}),c>1&&(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)(n.default,{variant:"outline",size:"sm",onClick:()=>i(e-1),disabled:1===e,className:"w-9 px-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"chevron_left"})}),u[0]>1&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.default,{variant:"ghost",size:"sm",onClick:()=>i(1),className:"w-9 px-0 hidden sm:inline-flex",children:"1"}),u[0]>2&&(0,a.jsx)("span",{className:"text-text-muted px-1 hidden sm:inline",children:"..."})]}),u.map(t=>(0,a.jsx)(n.default,{variant:e===t?"primary":"ghost",size:"sm",onClick:()=>i(t),className:(0,r.cn)("w-9 px-0",e===t?"inline-flex":"hidden sm:inline-flex"),children:t},t)),u[u.length-1]<c&&(0,a.jsxs)(a.Fragment,{children:[u[u.length-1]<c-1&&(0,a.jsx)("span",{className:"text-text-muted px-1 hidden sm:inline",children:"..."}),(0,a.jsx)(n.default,{variant:"ghost",size:"sm",onClick:()=>i(c),className:"w-9 px-0 hidden sm:inline-flex",children:c})]}),(0,a.jsx)(n.default,{variant:"outline",size:"sm",onClick:()=>i(e+1),disabled:e===c,className:"w-9 px-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"chevron_right"})})]})]})]})}},54642:e=>{var t;"u">typeof __nccwpck_require__&&(__nccwpck_require__.ab="//"),(t={}).endianness=function(){return"LE"},t.hostname=function(){return"u">typeof location?location.hostname:""},t.loadavg=function(){return[]},t.uptime=function(){return 0},t.freemem=function(){return Number.MAX_VALUE},t.totalmem=function(){return Number.MAX_VALUE},t.cpus=function(){return[]},t.type=function(){return"Browser"},t.release=function(){return"u">typeof navigator?navigator.appVersion:""},t.networkInterfaces=t.getNetworkInterfaces=function(){return{}},t.arch=function(){return"javascript"},t.platform=function(){return"browser"},t.tmpdir=t.tmpDir=function(){return"/tmp"},t.EOL="\n",t.homedir=function(){return"/"},e.exports=t},65921:(e,t,s)=>{"use strict";s.d(t,{i:()=>n});var a=s(1934);let r=0,n=(0,a.v)((e,t)=>({notifications:[],addNotification:s=>{let a=++r,n={id:a,type:s.type||"info",message:s.message,title:s.title||null,duration:s.duration??5e3,dismissible:s.dismissible??!0,createdAt:Date.now()};return e(e=>({notifications:[...e.notifications,n]})),n.duration>0&&setTimeout(()=>t().removeNotification(a),n.duration),a},removeNotification:t=>{e(e=>({notifications:e.notifications.filter(e=>e.id!==t)}))},clearAll:()=>e({notifications:[]}),success:(e,s)=>t().addNotification({type:"success",message:e,title:s}),error:(e,s)=>t().addNotification({type:"error",message:e,title:s,duration:8e3}),warning:(e,s)=>t().addNotification({type:"warning",message:e,title:s}),info:(e,s)=>t().addNotification({type:"info",message:e,title:s})}))},81127:(e,t,s)=>{"use strict";s.d(t,{ConfirmModal:()=>c,default:()=>d});var a=s(95155),r=s(12115),n=s(47650),l=s(31474),i=s(92542),o=s(97677);function d({isOpen:e,onClose:t,title:s,children:i,footer:c,size:m="md",closeOnOverlay:x=!0,showTrafficLights:u=!0,className:p}){if((0,r.useEffect)(()=>(e?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[e]),(0,r.useEffect)(()=>{let s=s=>{"Escape"===s.key&&e&&t()};return document.addEventListener("keydown",s),()=>document.removeEventListener("keydown",s)},[e,t]),!e)return null;let h=(0,a.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[(0,a.jsx)("div",{className:"absolute inset-0 bg-black/50 backdrop-blur-[2px] fade-in",onClick:x?t:void 0}),(0,a.jsxs)("div",{className:(0,l.cn)("relative w-full bg-surface","border border-border-subtle","rounded-[14px] shadow-[var(--shadow-elev)]","fade-in",{sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-xl",full:"max-w-4xl"}[m],p),children:[(s||u)&&(0,a.jsxs)("div",{className:"flex items-center justify-between p-2 border-b border-border-subtle",children:[(0,a.jsxs)("div",{className:"flex items-center",children:[u&&(0,a.jsxs)("div",{className:"hidden md:flex items-center gap-2 mr-4 ml-2",children:[(0,a.jsx)(o.default,{text:"Close",position:"top",color:"#FF5F56",children:(0,a.jsx)("button",{onClick:t,"aria-label":"Close",title:"Close",className:"w-4 h-4 rounded-full bg-[#FF5F56] hover:brightness-90 transition-all cursor-pointer flex items-center justify-center group/dot",children:(0,a.jsx)("span",{className:"text-[9px] font-bold text-white opacity-0 group-hover/dot:opacity-100 transition-opacity leading-none",children:"✕"})})}),(0,a.jsx)("div",{className:"w-4 h-4 rounded-full bg-[#3a3a3a]/20 dark:bg-white/15 cursor-not-allowed"}),(0,a.jsx)("div",{className:"w-4 h-4 rounded-full bg-[#3a3a3a]/20 dark:bg-white/15 cursor-not-allowed"})]}),s&&(0,a.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:s})]}),(0,a.jsx)("button",{onClick:t,"aria-label":"Close",className:"md:hidden p-1.5 rounded-[10px] text-text-muted hover:bg-surface-2 hover:text-text-main transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"close"})})]}),(0,a.jsx)("div",{className:"p-6 max-h-[calc(85vh-100px)] overflow-y-auto custom-scrollbar",children:i}),c&&(0,a.jsx)("div",{className:"flex flex-wrap items-center justify-end gap-3 p-6 border-t border-border-subtle",children:c})]})]});return"u"<typeof document?null:(0,n.createPortal)(h,document.body)}function c({isOpen:e,onClose:t,onConfirm:s,title:r="Confirm",message:n,confirmText:l="Confirm",cancelText:o="Cancel",variant:m="danger",loading:x=!1}){return(0,a.jsx)(d,{isOpen:e,onClose:t,title:r,size:"sm",footer:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.default,{variant:"ghost",onClick:t,disabled:x,children:o}),(0,a.jsx)(i.default,{variant:m,onClick:s,loading:x,children:l})]}),children:(0,a.jsx)("p",{className:"text-text-muted",children:n})})}},84588:(e,t,s)=>{"use strict";s.d(t,{default:()=>n});var a=s(95155),r=s(31474);function n({children:e,title:t,subtitle:s,icon:l,action:i,padding:o="md",hover:d=!1,elev:c=!1,className:m,...x}){return(0,a.jsxs)("div",{className:(0,r.cn)("bg-surface border border-border-subtle",c?"rounded-[14px] shadow-[var(--shadow-elev)]":"rounded-[14px] shadow-[var(--shadow-soft)]",d&&"hover:shadow-[var(--shadow-warm)] hover:border-brand-500/30 transition-all cursor-pointer",{none:"",xs:"p-3",sm:"p-4",md:"p-6",lg:"p-8"}[o],m),...x,children:[(t||i)&&(0,a.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[l&&(0,a.jsx)("div",{className:"p-2 rounded-[10px] bg-bg text-text-muted",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:l})}),(0,a.jsxs)("div",{children:[t&&(0,a.jsx)("h3",{className:"text-text-main font-semibold",children:t}),s&&(0,a.jsx)("p",{className:"text-sm text-text-muted",children:s})]})]}),i]}),e]})}n.Section=function({children:e,className:t,...s}){return(0,a.jsx)("div",{className:(0,r.cn)("p-4 rounded-[10px]","bg-bg border border-border-subtle",t),...s,children:e})},n.Row=function({children:e,className:t,...s}){return(0,a.jsx)("div",{className:(0,r.cn)("p-3 -mx-3 px-3 transition-colors","border-b border-border-subtle last:border-b-0","hover:bg-surface-2/50",t),...s,children:e})},n.ListItem=function({children:e,actions:t,className:s,...n}){return(0,a.jsxs)("div",{className:(0,r.cn)("group flex items-center justify-between p-3 -mx-3 px-3","border-b border-border-subtle last:border-b-0","hover:bg-surface-2/50 transition-colors",s),...n,children:[(0,a.jsx)("div",{className:"flex-1 min-w-0",children:e}),t&&(0,a.jsx)("div",{className:"flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:t})]})}},92542:(e,t,s)=>{"use strict";s.d(t,{default:()=>i});var a=s(95155),r=s(31474);let n={primary:"bg-brand-500 hover:bg-brand-600 text-white shadow-sm disabled:bg-surface-3 disabled:text-text-disabled",secondary:"bg-surface-2 hover:bg-surface-3 text-text-main border border-border disabled:text-text-disabled",outline:"border border-border text-text-main hover:bg-surface-2 hover:border-brand-500/40 disabled:text-text-disabled",ghost:"text-text-muted hover:bg-surface-2 hover:text-text-main disabled:text-text-disabled",danger:"bg-red-500 hover:bg-red-600 text-white shadow-sm disabled:bg-surface-3 disabled:text-text-disabled",success:"bg-green-600 hover:bg-green-700 text-white shadow-sm disabled:bg-surface-3 disabled:text-text-disabled"},l={sm:"h-7 px-3 text-xs rounded-[8px]",md:"h-9 px-4 text-sm rounded-[10px]",lg:"h-11 px-6 text-sm rounded-[10px]",stretch:"h-auto px-4 text-sm rounded-[10px]"};function i({children:e,variant:t="primary",size:s="md",icon:o,iconRight:d,disabled:c=!1,loading:m=!1,fullWidth:x=!1,className:u,...p}){return(0,a.jsxs)("button",{className:(0,r.cn)("inline-flex items-center justify-center gap-2 font-semibold whitespace-nowrap transition-all duration-150 ease-out cursor-pointer","active:scale-[0.97] disabled:cursor-not-allowed disabled:active:scale-100",n[t],l[s],x&&"w-full",u),disabled:c||m,...p,children:[m?(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-[18px]",children:"progress_activity"}):o?(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:o}):null,e,d&&!m&&(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:d})]})}},92717:(e,t,s)=>{"use strict";s.d(t,{default:()=>h});var a=s(95155),r=s(12115),n=s(84588),l=s(92542),i=s(29499),o=s(50378),d=s(81127),c=s(31474),m=s(88105),x=s(65921),u=s(31590);function p(e){if(!e)return null;if("string"!=typeof e)try{e=JSON.stringify(e)}catch{e=String(e)}return e.length>240?`${e.slice(0,237)}...`:e}function h(){let[e,t]=(0,r.useState)([]),[s,h]=(0,r.useState)({page:1,pageSize:20,totalItems:0,totalPages:0}),[b,g]=(0,r.useState)(!1),[j,v]=(0,r.useState)(null),[N,w]=(0,r.useState)(!1),[y,k]=(0,r.useState)({provider:"",model:"",connectionId:"",comboName:"",statusCode:""}),[C,S]=(0,r.useState)(!0),E=(0,r.useCallback)(async()=>{g(!0);try{let e=new URLSearchParams({page:String(s.page),pageSize:String(s.pageSize)});for(let[t,s]of Object.entries(y))s&&e.append(t,s);let a=await fetch(`/api/usage/error-logs?${e}`),r=await a.json();t(r.details||[]),h(e=>({...e,...r.pagination}))}catch(e){console.error("Failed to fetch error logs:",e)}finally{g(!1)}},[s.page,s.pageSize,y]);(0,r.useEffect)(()=>{let e=setTimeout(E,0);return()=>clearTimeout(e)},[E]),(0,r.useEffect)(()=>{if(!C)return;let e=setInterval(E,4e3);return()=>clearInterval(e)},[C,E]);let[_,I]=(0,r.useState)(!1),[A,R]=(0,r.useState)(null),[F,z]=(0,r.useState)(!1),L=(0,x.i)(),M=async()=>{I(!0);try{let e=await fetch("/api/usage/error-logs",{method:"DELETE"}),s=await e.json();if(!e.ok)throw Error(s.error||"Failed to clear");t([]),h(e=>({...e,page:1,totalItems:0,totalPages:0})),v(null),w(!1),R(s.deleted),z(!1),L.success(s.deleted>0?`Cleared ${s.deleted} error logs`:"No error logs to clear"),E()}catch(e){console.error("Failed to clear error logs:",e),L.error(e.message||"Failed to clear error logs")}finally{I(!1)}};return(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-6",children:[(0,a.jsx)(n.default,{padding:"md",children:(0,a.jsxs)("div",{className:"flex flex-col gap-4 lg:flex-row lg:items-end lg:justify-between",children:[(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 xl:grid-cols-5",children:[(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-sm font-medium text-text-main",children:"Provider"}),(0,a.jsx)("input",{value:y.provider,onChange:e=>{k(t=>({...t,provider:e.target.value})),h(e=>({...e,page:1}))},placeholder:"All providers",className:(0,c.cn)("h-9 rounded-lg border border-black/10 bg-surface px-3 text-sm text-text-main dark:border-white/10","placeholder:text-text-muted focus:outline-none focus:ring-2 focus:ring-primary/20")})]}),(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-sm font-medium text-text-main",children:"Model"}),(0,a.jsx)("input",{value:y.model,onChange:e=>{k(t=>({...t,model:e.target.value})),h(e=>({...e,page:1}))},placeholder:"All models",className:(0,c.cn)("h-9 rounded-lg border border-black/10 bg-surface px-3 text-sm text-text-main dark:border-white/10","placeholder:text-text-muted focus:outline-none focus:ring-2 focus:ring-primary/20")})]}),(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-sm font-medium text-text-main",children:"Combo"}),(0,a.jsx)("input",{value:y.comboName,onChange:e=>{k(t=>({...t,comboName:e.target.value})),h(e=>({...e,page:1}))},placeholder:"All combos",className:(0,c.cn)("h-9 rounded-lg border border-black/10 bg-surface px-3 text-sm text-text-main dark:border-white/10","placeholder:text-text-muted focus:outline-none focus:ring-2 focus:ring-primary/20")})]}),(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-sm font-medium text-text-main",children:"Status"}),(0,a.jsx)("input",{value:y.statusCode,onChange:e=>{k(t=>({...t,statusCode:e.target.value})),h(e=>({...e,page:1}))},placeholder:"e.g. 502",className:(0,c.cn)("h-9 rounded-lg border border-black/10 bg-surface px-3 font-mono text-sm text-text-main dark:border-white/10","placeholder:text-text-muted focus:outline-none focus:ring-2 focus:ring-primary/20")})]}),(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-sm font-medium text-text-main",children:"Account"}),(0,a.jsx)("input",{value:y.connectionId,onChange:e=>{k(t=>({...t,connectionId:e.target.value})),h(e=>({...e,page:1}))},placeholder:"All accounts",className:(0,c.cn)("h-9 rounded-lg border border-black/10 bg-surface px-3 font-mono text-sm text-text-main dark:border-white/10","placeholder:text-text-muted focus:outline-none focus:ring-2 focus:ring-primary/20")})]})]}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)(l.default,{variant:"ghost",onClick:()=>{S(e=>!e)},children:C?"Pause live refresh":"Resume live refresh"}),(0,a.jsx)(l.default,{variant:"outline",onClick:()=>{k({provider:"",model:"",connectionId:"",comboName:"",statusCode:""}),h(e=>({...e,page:1}))},disabled:!Object.values(y).some(e=>e),className:"whitespace-nowrap",children:"Clear filters"}),(0,a.jsx)(l.default,{variant:"outline",size:"sm",icon:"delete_sweep",onClick:()=>z(!0),disabled:_||0===s.totalItems,className:"border-red-500/30 text-red-500 hover:bg-red-500/10 hover:text-red-600 whitespace-nowrap",children:_?"Clearing…":"Clear all logs"})]})]})}),(0,a.jsxs)(n.default,{padding:"none",children:[(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"min-w-[860px] w-full",children:[(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{className:"border-b border-black/5 dark:border-white/5",children:[(0,a.jsx)("th",{className:"text-left p-4 text-sm font-semibold text-text-main",children:"Timestamp"}),(0,a.jsx)("th",{className:"text-left p-4 text-sm font-semibold text-text-main",children:"Endpoint / Combo"}),(0,a.jsx)("th",{className:"text-left p-4 text-sm font-semibold text-text-main",children:"Model"}),(0,a.jsx)("th",{className:"text-left p-4 text-sm font-semibold text-text-main",children:"Provider"}),(0,a.jsx)("th",{className:"text-left p-4 text-sm font-semibold text-text-main",children:"Account"}),(0,a.jsx)("th",{className:"text-center p-4 text-sm font-semibold text-text-main",children:"Status"}),(0,a.jsx)("th",{className:"text-left p-4 text-sm font-semibold text-text-main",children:"Error"}),(0,a.jsx)("th",{className:"text-center p-4 text-sm font-semibold text-text-main",children:"Action"})]})}),(0,a.jsx)("tbody",{children:b&&0===e.length?(0,a.jsx)("tr",{children:(0,a.jsx)("td",{colSpan:"8",className:"p-8 text-center text-text-muted",children:(0,a.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-[20px]",children:"progress_activity"}),"Loading error logs..."]})})}):0===e.length?(0,a.jsx)("tr",{children:(0,a.jsx)("td",{colSpan:"8",className:"p-8 text-center text-text-muted",children:"No error logs match the current filters."})}):e.map(e=>((e=>{if(!e)return;let t=[];return e.fallback&&t.push({label:"Fallback",variant:"danger"}),e.retryAfterHuman&&t.push({label:`Retry in ${e.retryAfterHuman}`,variant:"warning"})})(e.meta),(0,a.jsxs)("tr",{className:"border-b border-black/5 dark:border-white/5 last:border-b-0 hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors",children:[(0,a.jsx)("td",{className:"whitespace-nowrap p-4 text-sm text-text-main",children:new Date(e.timestamp).toLocaleString()}),(0,a.jsx)("td",{className:"max-w-[220px] truncate p-4 text-sm text-text-main",children:(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)("span",{className:"font-mono text-xs text-text-muted",children:e.endpoint||"/v1/chat/completions"}),e.comboName?(0,a.jsxs)("span",{className:"inline-flex w-fit items-center rounded-md border border-black/10 bg-amber-500/10 px-2 py-0.5 text-xs font-medium text-amber-700 dark:border-white/10 dark:text-amber-300",children:["Combo: ",e.comboName]}):null]})}),(0,a.jsx)("td",{className:"max-w-[180px] truncate p-4 text-sm font-mono text-text-main",children:e.model}),(0,a.jsx)("td",{className:"max-w-[160px] truncate p-4 text-sm text-text-main",children:m.Q2[e.provider]?.name||e.provider||"Unknown provider"}),(0,a.jsx)("td",{className:"max-w-[180px] truncate p-4 font-mono text-sm text-text-main",children:e.connectionId?(0,a.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,a.jsx)("span",{className:"truncate",children:e.connectionName||e.connectionId}),e.connectionName?(0,a.jsx)("span",{className:"truncate text-xs text-text-muted",children:e.connectionId}):null]}):"—"}),(0,a.jsx)("td",{className:"whitespace-nowrap p-4 text-center text-sm",children:(0,a.jsx)("span",{className:(0,c.cn)("inline-flex min-w-[3.5rem] justify-center rounded-md border px-2 py-1 font-mono text-xs",e.statusCode&&/4|5/.test(String(e.statusCode))?"border-red-500/20 bg-red-500/10 text-red-700 dark:text-red-300":"border-black/10 bg-black/5 text-text-main dark:border-white/10 dark:bg-white/5"),children:e.statusCode||"ERR"})}),(0,a.jsx)("td",{className:"max-w-[320px] truncate p-4 text-sm text-text-main",children:p(e.errorMessage)}),(0,a.jsx)("td",{className:"p-4 text-center",children:(0,a.jsx)(l.default,{variant:"outline",size:"sm",onClick:()=>{v(e),w(!0)},children:"Inspect"})})]},e.id)))})]})}),!b&&e.length>0&&(0,a.jsx)("div",{className:"border-t border-black/5 dark:border-white/5",children:(0,a.jsx)(o.A,{currentPage:s.page,pageSize:s.pageSize,totalItems:s.totalItems,onPageChange:e=>h(t=>({...t,page:e})),onPageSizeChange:e=>h(t=>({...t,pageSize:e,page:1}))})})]}),(0,a.jsx)(i.A,{isOpen:N,onClose:()=>w(!1),title:"Error Log Details",width:"lg",children:j&&(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsxs)("div",{className:"grid min-w-0 grid-cols-1 gap-4 text-sm sm:grid-cols-2",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-text-muted",children:"Timestamp:"})," ",(0,a.jsx)("span",{className:"text-text-main",children:new Date(j.timestamp).toLocaleString()})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-text-muted",children:"Endpoint:"})," ",(0,a.jsx)("span",{className:"break-all font-mono text-text-main",children:j.endpoint||"/v1/chat/completions"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-text-muted",children:"Provider:"})," ",(0,a.jsx)("span",{className:"text-text-main",children:m.Q2[j.provider]?.name||j.provider||"Unknown provider"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-text-muted",children:"Model:"})," ",(0,a.jsx)("span",{className:"break-all font-mono text-text-main",children:j.model})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-text-muted",children:"Account:"})," ",j.connectionName?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"break-all font-mono text-text-main",children:j.connectionName})," ",(0,a.jsxs)("span",{className:"break-all font-mono text-xs text-text-muted",children:["(",j.connectionId,")"]})]}):(0,a.jsx)("span",{className:"break-all font-mono text-text-main",children:j.connectionId||"—"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-text-muted",children:"Combo:"})," ",(0,a.jsx)("span",{className:"text-text-main",children:j.comboName||"—"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-text-muted",children:"Status:"})," ",(0,a.jsx)("span",{className:(0,c.cn)("font-mono font-medium",j.statusCode&&/4|5/.test(String(j.statusCode))?"text-red-600":"text-text-main"),children:j.statusCode||"ERR"})]}),(0,a.jsxs)("div",{className:"sm:col-span-2",children:[(0,a.jsx)("span",{className:"text-text-muted",children:"Error:"})," ",(0,a.jsx)("span",{className:"text-red-700 dark:text-red-300",children:p(j.errorMessage)})]}),j.meta?.latency?.total!=null?(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-text-muted",children:"Latency:"})," ",(0,a.jsxs)("span",{className:"font-mono text-text-main",children:["TTFT ",(0,u._g)(j.meta.latency)," / Total ",(0,u.Ej)(j.meta.latency)]})]}):null,j.meta?.tokens?(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-text-muted",children:"Tokens:"})," ",(0,a.jsx)("span",{className:"font-mono text-text-main",children:`in ${j.meta.tokens.prompt_tokens||j.meta.tokens.input_tokens||0} / out ${j.meta.tokens.completion_tokens||j.meta.tokens.output_tokens||0}`})]}):null,j.meta?.retryAfterHuman?(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-text-muted",children:"Retry after:"})," ",(0,a.jsx)("span",{className:"font-mono text-text-main",children:j.meta.retryAfterHuman})]}):null,(0,a.jsx)("div",{className:"sm:col-span-2 flex gap-2",children:j.meta?.fallback?(0,a.jsx)("span",{className:"inline-flex rounded-md border border-amber-500/20 bg-amber-500/10 px-2 py-1 text-xs font-medium text-amber-700 dark:text-amber-300",children:"Fallback event"}):null})]}),(0,a.jsxs)("div",{className:"space-y-4",children:[j.request&&(0,a.jsx)(f,{title:"Client Request (Input)",defaultOpen:!0,icon:"input",data:j.request}),j.providerRequest&&(0,a.jsx)(f,{title:"Provider Request (Translated)",icon:"translate",data:j.providerRequest}),j.providerResponse&&(0,a.jsx)(f,{title:"Provider Response (Raw)",icon:"data_object",data:j.providerResponse})]})]})}),(0,a.jsx)(d.ConfirmModal,{isOpen:F,onClose:()=>!_&&z(!1),onConfirm:M,title:"Clear all error logs",message:`This permanently deletes all ${s.totalItems} error log${1===s.totalItems?"":"s"} and cannot be undone. Request details and usage history are not affected.`,confirmText:"Clear all logs",cancelText:"Cancel",variant:"danger",loading:_})]})}function f({title:e,children:t,defaultOpen:s=!1,icon:n=null,data:l}){let[i,o]=(0,r.useState)(s);return(0,a.jsxs)("div",{className:"rounded-lg border border-black/5 dark:border-white/5",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>o(e=>!e),className:"flex w-full items-center justify-between p-3 hover:bg-black/[0.04] dark:hover:bg-white/[0.04]",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[n&&(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] text-text-muted",children:n}),(0,a.jsx)("span",{className:"text-sm font-semibold text-text-main",children:e})]}),(0,a.jsx)("span",{className:(0,c.cn)("material-symbols-outlined text-text-muted transition-transform",i?"rotate-90":""),children:"chevron_right"})]}),i&&(0,a.jsx)("div",{className:"space-y-0 border-t border-black/5 p-4 dark:border-white/5",children:t??(0,a.jsx)("pre",{className:"max-h-[280px] max-w-full overflow-auto rounded-lg border border-black/5 bg-black/5 p-3 font-mono text-xs dark:border-white/5 dark:bg-white/5",children:JSON.stringify(l,null,2)})})]})}},97677:(e,t,s)=>{"use strict";s.d(t,{default:()=>l});var a=s(95155),r=s(12115),n=s(47650);function l({text:e,children:t,position:s="top",color:i}){let o=(0,r.useRef)(null),[d,c]=(0,r.useState)(null);return(0,a.jsxs)("div",{ref:o,className:"relative inline-flex",onMouseEnter:()=>{let e=o.current?.getBoundingClientRect();if(!e)return;let t=e.left+e.width/2,a=e.top+e.height/2;c({position:"fixed",..."bottom"===s?{top:e.bottom+6,left:t,transform:"translateX(-50%)"}:"left"===s?{right:window.innerWidth-e.left+6,top:a,transform:"translateY(-50%)"}:"right"===s?{left:e.right+6,top:a,transform:"translateY(-50%)"}:{bottom:window.innerHeight-e.top+6,left:t,transform:"translateX(-50%)"}})},onMouseLeave:()=>c(null),children:[t,d&&(0,n.createPortal)((0,a.jsx)("div",{className:`pointer-events-none z-50 w-max max-w-56 rounded px-2 py-1 text-[11px] leading-snug text-white whitespace-normal ${i?"":"bg-gray-900"}`,style:{...d,...i?{backgroundColor:i}:{}},children:e}),document.body)]})}}},e=>{e.O(0,[8105,8441,3794,7358],()=>e(e.s=4797)),_N_E=e.O()}]);
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2134],{56828:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>ee});var a=s(95155),i=s(12115),l=s(73321),r=s(98500),n=s.n(r),o=s(5772),d=s(8247),c=s(35497),m=s(88105),p=s(28777),u=s(67899),x=s(62630);s(67468);var h=s(13097);let f=["none","low","medium","high"],g=["none","thinking"],y=["none","low","medium","high","xhigh","max"],b={openai:["none","minimal","low","medium","high","xhigh"],"claude-adaptive":y,"claude-budget":y,"gemini-level":["minimal","low","medium","high"],"gemini-budget":f,zai:g,qwen:f,kimi:["none","low","medium","high","max"],deepseek:["none","high","max"],commandcode:["none","low","medium","high","xhigh","max"],minimax:g,hunyuan:f,step:f,nous:f},v=["none","minimal","low","medium","high","xhigh","max"],j=["none","low","medium","high","max"],w=[{pattern:"*gemini-4*",levels:["low","medium","high"]},{pattern:"*claude*4.6*",levels:j},{pattern:"*claude*4-6*",levels:j},{provider:"codex",pattern:"*gpt-6*",levels:v},{provider:"codex",pattern:"*gpt-5.6-sol*",levels:[...v,"ultra"]},{provider:"codex",pattern:"*gpt-5.6-terra*",levels:[...v,"ultra"]},{provider:"codex",pattern:"*gpt-5.6-luna*",levels:v},{pattern:"*codex*",levels:["low","medium","high","xhigh"]},{provider:"opencode",pattern:"*mimo*v2.6*",levels:["none","minimal","low","medium","high","xhigh","max"]},{pattern:"*mimo*v2.6*",levels:["none","low","medium","high","xhigh"]},{pattern:"*mimo*v2.5-pro*",levels:["none","low","medium","high","xhigh"]},{provider:"codebuddy-cn",pattern:"deepseek-v4-pro",levels:["low","high","xhigh"]},{provider:"codebuddy-cn",pattern:"deepseek-v4.1-flash",levels:["low","high","max"]},{provider:"codebuddy-cn",pattern:"deepseek-v4*",levels:["low","high","xhigh"]},{pattern:"*deepseek-v4.*",levels:["none","low","medium","high","xhigh","max"]},{provider:"codebuddy-cn",pattern:"glm-5.3",levels:["low","high","max"]},{provider:"codebuddy-cn",pattern:"glm-5.3-flash",levels:["low","high","max"]},{provider:"codebuddy-cn",pattern:"glm-5.2",levels:["high","xhigh"]},{provider:"codebuddy-cn",pattern:"kimi-k2.8-preview",levels:["low","medium","high"]},{provider:"codebuddy-cn",pattern:"hy3",levels:["low","high"]},{provider:"codebuddy-cn",pattern:"hy4-preview",levels:["high"]},{provider:"codebuddy-intl",pattern:"deepseek-v4*",levels:["low","high","xhigh"]},{provider:"minimax-code",pattern:"MiniMax-M3.1*",levels:["low","medium","high","xhigh","max"]},{provider:"minimax-code",pattern:"MiniMax-M3",levels:["none","high"]},{provider:"minimax-code-global",pattern:"MiniMax-M3.1*",levels:["low","medium","high","xhigh","max"]},{provider:"minimax-code-global",pattern:"MiniMax-M3",levels:["none","high"]}];function k(e,t){if("kiro"===e&&null===function(e){if("string"!=typeof e)return null;let t=e.toLowerCase().replace(/-/g,".");if(/(?:^|[/.])gpt[/.]5[/.]6(?:[/.]|$)/.test(t))return"reasoning";if(!t.includes("claude"))return null;let s=function(e){if("string"!=typeof e)return null;let t=e.toLowerCase().replace(/-/g,".").match(/(?:^|[/.])claude(?:[/.][a-z]+)*[/.](\d+)(?:[/.](\d+))?(?:[/.]|$)/);return t?{major:Number(t[1]),minor:void 0===t[2]?null:Number(t[2])}:null}(e);if(!s)return null;let{major:a,minor:i}=s;return a<4||4===a&&(null===i||i<=5||null!==i&&i>=1e3)?null:"output_config"}(t))return null;let s=(0,u.nl)(e,t);if(!s.reasoning)return null;let a=String(t||"").replace(/\([^()]+\)\s*$/,""),i="codex"===e?(0,h.SM)("cx").find(e=>e.id===a)?.thinkingLevels:null,l=w.find(s=>(!s.provider||s.provider===e)&&(0,x.gH)(s.pattern,t)),r=i||l?.levels||b[s.thinkingFormat]||f;return!1===s.thinkingCanDisable&&(r=r.filter(e=>"none"!==e)),r}var N=s(11059),C=s(929),S=s(73006);let A=new Map;async function T(e){if(!e?.url||!e?.type)return[];let t=A.get(e.url);if(t&&Date.now()<t.expiresAt)return t.data;try{let t=new URLSearchParams({url:e.url,type:e.type}),s=await fetch(`/api/providers/suggested-models?${t}`);if(!s.ok)return[];let a=(await s.json()).data??[];return A.set(e.url,{data:a,expiresAt:Date.now()+6e5}),a}catch{return[]}}var $=s(81231),O=s(14051),I=s.n(O);function P({model:e,fullModel:t,alias:s,copied:i,onCopy:l,testStatus:r,isCustom:n,isFree:o,onDeleteAlias:d,onTest:m,isTesting:p,onDisable:u,caps:x,thinkingSuffix:h}){let f=h?`${t}(${h})`:t,g="ok"===r?"#22c55e":"error"===r?"#ef4444":void 0;return(0,a.jsx)("div",{className:`group w-full sm:w-auto min-w-0 max-w-full rounded-lg border px-3 py-2 ${"ok"===r?"border-green-500/40":"error"===r?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:(0,a.jsxs)("div",{className:"flex min-w-0 items-start gap-2 sm:items-center",children:[(0,a.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base mt-0.5 sm:mt-0",style:g?{color:g}:void 0,children:"ok"===r?"check_circle":"error"===r?"cancel":"smart_toy"}),(0,a.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[(0,a.jsx)("code",{className:"w-fit max-w-full break-all rounded bg-sidebar px-1.5 py-0.5 font-mono text-xs text-text-muted sm:max-w-[360px] sm:truncate",children:f}),(0,a.jsxs)("span",{className:"flex min-w-0 items-center text-[9px] gap-1 pl-1",children:[e.name&&(0,a.jsx)("span",{className:"break-all sm:truncate text-[9px] italic text-text-muted/70",children:e.name}),(0,a.jsx)(c.nh,{caps:x,colorOverride:"text-text-muted/70",size:12})]})]}),(0,a.jsxs)("div",{className:"flex shrink-0 items-center gap-0.5 sm:gap-1",children:[m&&(0,a.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,a.jsx)("button",{onClick:m,disabled:p,className:`rounded p-0.5 text-text-muted transition-opacity hover:bg-sidebar hover:text-primary ${p?"opacity-100":"opacity-100 sm:opacity-0 sm:group-hover:opacity-100"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",style:p?{animation:"spin 1s linear infinite"}:void 0,children:p?"progress_activity":"science"})}),(0,a.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:p?"Testing...":"Test"})]}),(0,a.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,a.jsx)("button",{onClick:()=>l(f,`model-${e.id}`),className:"rounded p-0.5 text-text-muted hover:bg-sidebar hover:text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:i===`model-${e.id}`?"check":"content_copy"})}),(0,a.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:i===`model-${e.id}`?"Copied!":"Copy"})]}),n?(0,a.jsx)("button",{onClick:d,className:"rounded p-0.5 text-text-muted opacity-100 transition-opacity hover:bg-red-500/10 hover:text-red-500 sm:opacity-0 sm:group-hover:opacity-100",title:"Remove custom model",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):u?(0,a.jsx)("button",{onClick:u,className:"rounded p-0.5 text-text-muted opacity-100 transition-opacity hover:bg-red-500/10 hover:text-red-500 sm:opacity-0 sm:group-hover:opacity-100",title:"Disable this model",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):null]})]})})}function E({modelId:e,fullModel:t,caps:s,copied:i,onCopy:l,onDeleteAlias:r,onTest:n,testStatus:o,isTesting:d}){let c="ok"===o?"#22c55e":"error"===o?"#ef4444":void 0;return(0,a.jsxs)("div",{className:`flex items-center gap-3 p-3 rounded-lg border ${"ok"===o?"border-green-500/40":"error"===o?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted",style:c?{color:c}:void 0,children:"ok"===o?"check_circle":"error"===o?"cancel":"smart_toy"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium truncate",children:e}),(0,a.jsxs)("div",{className:"flex items-center gap-1 mt-1",children:[(0,a.jsx)("code",{className:"text-xs text-text-muted font-mono bg-sidebar px-1.5 py-0.5 rounded",children:t}),(0,a.jsxs)("div",{className:"relative group/btn",children:[(0,a.jsx)("button",{onClick:()=>l(t,`model-${e}`),className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:i===`model-${e}`?"check":"content_copy"})}),(0,a.jsx)("span",{className:"pointer-events-none absolute top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:i===`model-${e}`?"Copied!":"Copy"})]}),n&&(0,a.jsxs)("div",{className:"relative group/btn",children:[(0,a.jsx)("button",{onClick:n,disabled:d,className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",style:d?{animation:"spin 1s linear infinite"}:void 0,children:d?"progress_activity":"science"})}),(0,a.jsx)("span",{className:"pointer-events-none absolute top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:d?"Testing...":"Test"})]})]}),(s?.contextWindow||s?.maxOutput)&&(0,a.jsxs)("p",{className:"mt-1 text-[10px] text-text-muted",children:[s.contextWindow?`${s.contextWindow.toLocaleString()} context`:"",s.contextWindow&&s.maxOutput?" \xb7 ":"",s.maxOutput?`${s.maxOutput.toLocaleString()} max output`:""]})]}),(0,a.jsx)("button",{onClick:r,className:"p-1 hover:bg-red-50 rounded text-red-500",title:"Remove model",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"delete"})})]})}function D({providerStorageAlias:e,providerDisplayAlias:t,modelAliases:s,customModels:l,copied:r,onCopy:n,onDeleteAlias:o,onAddCustomModel:d,onDeleteCustomModel:m,connections:p,isAnthropic:u}){let[x,h]=(0,i.useState)(""),[f,g]=(0,i.useState)(""),[y,b]=(0,i.useState)(""),[v,j]=(0,i.useState)(!1),[w,k]=(0,i.useState)(!1),[N,C]=(0,i.useState)(()=>new Set),[S,A]=(0,i.useState)({}),T=async t=>{if(!N.has(t)){C(e=>new Set(e).add(t));try{let s=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${e}/${t}`})}),a=await s.json();A(e=>({...e,[t]:a.ok?"ok":"error"}))}catch{A(e=>({...e,[t]:"error"}))}finally{C(e=>{let s=new Set(e);return s.delete(t),s})}}},O=(0,$.R)({customModels:l,modelAliases:s,providerAlias:e,type:"llm"}),I=async()=>{if(!x.trim()||v)return;let e=x.trim();if(O.some(t=>t.id===e))return void alert("Model already exists for this provider.");j(!0);try{await d(e,{...f?{contextWindow:Number(f)}:{},...y?{maxOutput:Number(y)}:{}}),h(""),g(""),b("")}catch(e){console.log("Error adding model:",e)}finally{j(!1)}},P=async()=>{if(w)return;let e=p.find(e=>!1!==e.isActive);if(e){k(!0);try{let t=await fetch(`/api/providers/${e.id}/models`),s=await t.json();if(!t.ok)return void alert(s.error||"Failed to import models");let a=s.models||[];if(0===a.length)return void alert("No models returned from /models.");let i=0;for(let e of a){let t=e.id||e.name||e.model;t&&(O.some(e=>e.id===t)||(await d(t,e.caps),i+=1))}0===i&&alert("No new models were added.")}catch(e){console.log("Error importing models:",e)}finally{k(!1)}}},R=p.some(e=>!1!==e.isActive);return(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("p",{className:"text-sm text-text-muted",children:["Add ",u?"Anthropic":"OpenAI","-compatible models manually or import them from the /models endpoint."]}),(0,a.jsxs)("div",{className:"flex items-end gap-2 flex-wrap",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-[240px]",children:[(0,a.jsx)("label",{htmlFor:"new-compatible-model-input",className:"text-xs text-text-muted mb-1 block",children:"Model ID"}),(0,a.jsx)("input",{id:"new-compatible-model-input",type:"text",value:x,onChange:e=>h(e.target.value),onKeyDown:e=>"Enter"===e.key&&I(),placeholder:u?"claude-3-opus-20240229":"gpt-4o",className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})]}),(0,a.jsx)(c.$n,{size:"sm",icon:"add",onClick:I,disabled:!x.trim()||v,children:v?"Adding...":"Add"}),(0,a.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"download",onClick:P,disabled:!R||w,children:w?"Importing...":"Import from /models"})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{htmlFor:"compatible-model-context-window",className:"text-xs text-text-muted mb-1 block",children:"Context window"}),(0,a.jsx)("input",{id:"compatible-model-context-window",type:"number",min:"1",step:"1",value:f,onChange:e=>g(e.target.value),placeholder:"Optional, in tokens",className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{htmlFor:"compatible-model-max-output",className:"text-xs text-text-muted mb-1 block",children:"Maximum output"}),(0,a.jsx)("input",{id:"compatible-model-max-output",type:"number",min:"1",step:"1",value:y,onChange:e=>b(e.target.value),placeholder:"Optional, in tokens",className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})]})]}),!R&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Add a connection to enable importing models."}),O.length>0&&(0,a.jsx)("div",{className:"flex flex-col gap-3",children:O.map(({id:s,alias:i,source:l,caps:d})=>(0,a.jsx)(E,{modelId:s,fullModel:`${t}/${s}`,caps:d,copied:r,onCopy:n,onDeleteAlias:()=>"custom"===l?m(s):o(i),onTest:p.length>0?()=>T(s):void 0,testStatus:S[s],isTesting:N.has(s)},`${l}-${e}/${s}`))})]})}P.propTypes={model:I().shape({id:I().string.isRequired}).isRequired,fullModel:I().string.isRequired,alias:I().string,copied:I().string,onCopy:I().func.isRequired,testStatus:I().oneOf(["ok","error"]),isCustom:I().bool,isFree:I().bool,onDeleteAlias:I().func,onTest:I().func,isTesting:I().bool,onDisable:I().func,caps:I().object,thinkingSuffix:I().string},I().string.isRequired,I().string.isRequired,I().string,I().func.isRequired,I().func.isRequired,I().func,I().oneOf(["ok","error"]),I().bool,I().string.isRequired,I().object.isRequired,I().arrayOf(I().object),I().string,I().func.isRequired,I().func.isRequired,I().func.isRequired,I().func.isRequired,D.propTypes={providerStorageAlias:I().string.isRequired,providerDisplayAlias:I().string.isRequired,modelAliases:I().object.isRequired,customModels:I().arrayOf(I().object),copied:I().string,onCopy:I().func.isRequired,onDeleteAlias:I().func.isRequired,onAddCustomModel:I().func.isRequired,onDeleteCustomModel:I().func.isRequired,connections:I().arrayOf(I().shape({id:I().string,isActive:I().bool})).isRequired,isAnthropic:I().bool};var R=s(47650),z=s(70217);function q({until:e}){let[t,s]=(0,i.useState)("");return((0,i.useEffect)(()=>{let t=()=>{let t=new Date(e).getTime()-Date.now();if(t<=0)return void s("");let a=Math.floor(t/1e3);if(a<60)s(`${a}s`);else if(a<3600)s(`${Math.floor(a/60)}m ${a%60}s`);else{let e=Math.floor(a/3600),t=Math.floor(a%3600/60);s(`${e}h ${t}m`)}};t();let a=setInterval(t,1e3);return()=>clearInterval(a)},[e]),t)?(0,a.jsxs)("span",{className:"text-xs text-orange-500 font-mono",children:["⏱ ",t]}):null}function _({connection:e,proxyPools:t,isOAuth:s,isFirst:l,isLast:r,onMoveUp:n,onMoveDown:o,onToggleActive:d,onUpdateProxy:m,onEdit:p,onDelete:u,oneByOneStatus:x=null,autoPing:h=null}){let[f,g]=(0,i.useState)(!1),[y,b]=(0,i.useState)(!1),v=(0,i.useRef)(null),j=(0,i.useRef)(null),[w,k]=(0,i.useState)(null),N=new Map((t||[]).map(e=>[e.id,e])),C=e.providerSpecificData?.proxyPoolId||null,S=C?N.get(C):null,A=e.providerSpecificData?.connectionProxyEnabled===!0&&!!e.providerSpecificData?.connectionProxyUrl,T=!!C||A,$=S?`Pool: ${S.name}`:C?`Pool: ${C} (inactive/missing)`:A?`Legacy: ${e.providerSpecificData?.connectionProxyUrl}`:"",O=h?.provider==="codex"?"Auto-starts the next 5h Codex window after reset by sending a tiny request. Consumes a small amount of quota.":"When your 5h quota runs out, auto-sends a request the moment it resets so a new window starts right away.",I="";if(S?.proxyUrl||e.providerSpecificData?.connectionProxyUrl){let t=S?.proxyUrl||e.providerSpecificData?.connectionProxyUrl;try{let e=new URL(t);I=`${e.protocol}//${e.hostname}${e.port?`:${e.port}`:""}`}catch{I=t}}let P=S?.noProxy||e.providerSpecificData?.connectionNoProxy||"",E="default";S?.isActive===!0?E="success":(C||A)&&(E="error"),(0,i.useEffect)(()=>{if(!f)return;let e=e=>{v.current?.contains(e.target)||j.current?.contains(e.target)||g(!1)},t=()=>g(!1);return document.addEventListener("mousedown",e),window.addEventListener("resize",t),document.addEventListener("scroll",t,!0),()=>{document.removeEventListener("mousedown",e),window.removeEventListener("resize",t),document.removeEventListener("scroll",t,!0)}},[f]);let D=async e=>{b(!0);try{await m("__none__"===e?null:e)}finally{b(!1),g(!1)}},U=e.authType||(s?"oauth":"apikey"),M="oauth"===U,K="cookie"===U,F=e.name?.trim()||e.email?.trim()||e.displayName?.trim()||(M?"OAuth Account":K?"Cookie Account":"API Key"),L=e.name?.trim()&&e.email?.trim()&&e.name.trim()!==e.email.trim()?e.email.trim():e.name?.trim()&&e.displayName?.trim()&&e.name.trim()!==e.displayName.trim()?e.displayName.trim():null,[J,W]=(0,i.useState)(!1),H=Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>e).filter(e=>!!e).sort()[0]||null;(0,i.useEffect)(()=>{let t=()=>{W(!!Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>e).filter(e=>e&&new Date(e).getTime()>Date.now()).sort()[0])};t();let s=H?setInterval(t,1e3):null;return()=>{s&&clearInterval(s)}},[H]);let B="unavailable"!==e.testStatus||J?e.testStatus:"active",G=()=>x?"queued"===x.state?"queued":"testing"===x.state?"testing":"success"===x.state?"success":"failed"===x.state?x.error?`failed: ${x.error}`:"failed":null:null;return(0,a.jsxs)("div",{className:`group flex min-w-0 flex-col gap-3 rounded-lg p-2 transition-colors hover:bg-black/[0.02] dark:hover:bg-white/[0.02] sm:flex-row sm:items-center sm:justify-between ${!1===e.isActive?"opacity-60":""}`,children:[(0,a.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-2 sm:items-center sm:gap-3",children:[(0,a.jsxs)("div",{className:"flex shrink-0 flex-col",children:[(0,a.jsx)("button",{onClick:n,disabled:l,className:`p-0.5 rounded ${l?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_up"})}),(0,a.jsx)("button",{onClick:o,disabled:r,className:`p-0.5 rounded ${r?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_down"})})]}),(0,a.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base text-text-muted",children:K?"cookie":M?"lock":"key"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium truncate",children:F}),L&&(0,a.jsx)("p",{className:"text-xs text-text-muted truncate",children:L}),(0,a.jsxs)("div",{className:"mt-1 flex min-w-0 flex-wrap items-center gap-1.5 sm:gap-2",children:[(0,a.jsx)(c.Ex,{variant:(0,z.g)(e.isActive,B),size:"sm",dot:!0,children:!1===e.isActive?"disabled":B||"Unknown"}),(0,a.jsx)(c.Ex,{variant:"default",size:"sm",children:M?"OAuth":K?"Cookie":"API Key"}),T&&(0,a.jsx)(c.Ex,{variant:E,size:"sm",children:"Proxy"}),J&&!1!==e.isActive&&(0,a.jsx)(q,{until:H}),e.lastError&&!1!==e.isActive&&(0,a.jsx)("span",{className:"max-w-full truncate text-xs text-red-500 sm:max-w-[300px]",title:e.lastError,children:e.lastError}),(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["#",e.priority]}),e.globalPriority&&(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["Auto: ",e.globalPriority]}),G()&&(0,a.jsx)(c.Ex,{variant:x?"success"===x.state?"success":"failed"===x.state?"error":"testing"===x.state?"primary":"default":"default",size:"sm",children:G()})]}),T&&(0,a.jsxs)("div",{className:"mt-1 flex items-center gap-2 flex-wrap",children:[(0,a.jsx)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[420px]",title:$,children:$}),I&&(0,a.jsx)("code",{className:"max-w-full truncate rounded bg-black/5 px-1 py-0.5 font-mono text-[10px] text-text-muted dark:bg-white/5 sm:max-w-[260px]",children:I}),P&&(0,a.jsxs)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[320px]",title:P,children:["no_proxy: ",P]})]})]})]}),(0,a.jsxs)("div",{className:"flex w-full items-center justify-between gap-2 sm:w-auto sm:justify-end",children:[(0,a.jsxs)("div",{className:"grid flex-1 grid-cols-3 gap-1 sm:flex sm:flex-none",children:[(t||[]).length>0&&(0,a.jsxs)("div",{children:[(0,a.jsxs)("button",{ref:j,onClick:()=>{if(f)return void g(!1);let e=j.current?.getBoundingClientRect();if(!e)return void g(!0);let s=((t?.length||0)+1)*34+8,a=window.innerHeight-e.bottom,i=a<s&&e.top>a;k({position:"fixed",right:window.innerWidth-e.right,...i?{bottom:window.innerHeight-e.top+4,maxHeight:Math.max(e.top-8,120)}:{top:e.bottom+4,maxHeight:Math.max(a-8,120)}}),g(!0)},className:`flex w-full flex-col items-center rounded px-2 py-1 transition-colors hover:bg-black/5 dark:hover:bg-white/5 ${T?"text-primary":"text-text-muted hover:text-primary"}`,disabled:y,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:y?"progress_activity":"lan"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Proxy"})]}),f&&(0,R.createPortal)((0,a.jsxs)("div",{ref:v,style:w,className:"z-50 max-w-[78vw] min-w-[160px] overflow-y-auto rounded-lg border border-border bg-bg py-1 shadow-lg",children:[(0,a.jsx)("button",{onClick:()=>D("__none__"),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${!C?"text-primary font-medium":"text-text-main"}`,children:"None"}),(t||[]).map(e=>(0,a.jsx)("button",{onClick:()=>D(e.id),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${C===e.id?"text-primary font-medium":"text-text-main"}`,children:e.name},e.id))]}),document.body)]}),h&&(0,a.jsx)(c.m_,{text:O,children:(0,a.jsxs)("button",{onClick:()=>h.onToggle(!h.on),className:`flex w-full flex-col items-center rounded px-2 py-1 transition-colors hover:bg-black/5 dark:hover:bg-white/5 ${h.on?"text-primary":"text-text-muted hover:text-primary"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"bolt"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Auto-ping"})]})}),(0,a.jsxs)("button",{onClick:p,className:"flex flex-col items-center rounded px-2 py-1 text-text-muted hover:bg-black/5 hover:text-primary dark:hover:bg-white/5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,a.jsxs)("button",{onClick:u,className:"flex flex-col items-center rounded px-2 py-1 text-red-500 hover:bg-red-500/10",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]}),(0,a.jsx)(c.lM,{size:"sm",checked:e.isActive??!0,onChange:d,title:e.isActive??!0?"Disable connection":"Enable connection"})]})]})}q.propTypes={until:I().string.isRequired},_.propTypes={connection:I().shape({id:I().string,name:I().string,email:I().string,displayName:I().string,modelLockUntil:I().string,testStatus:I().string,isActive:I().bool,lastError:I().string,priority:I().number,globalPriority:I().number}).isRequired,proxyPools:I().arrayOf(I().shape({id:I().string,name:I().string,proxyUrl:I().string,noProxy:I().string,isActive:I().bool})),isOAuth:I().bool.isRequired,isFirst:I().bool.isRequired,isLast:I().bool.isRequired,onMoveUp:I().func.isRequired,onMoveDown:I().func.isRequired,onToggleActive:I().func.isRequired,onUpdateProxy:I().func,onEdit:I().func.isRequired,onDelete:I().func.isRequired,oneByOneStatus:I().shape({state:I().string,error:I().string}),autoPing:I().shape({on:I().bool,onToggle:I().func,provider:I().string})};let U=`name1|sk-key1
|
|
2
|
+
name2|sk-key2
|
|
3
|
+
sk-key-only-auto-named`;function M({isOpen:e,provider:t,providerName:s,isCompatible:l,isAnthropic:r,authType:n,authHint:o,website:d,proxyPools:p,error:u,existingNames:x,onSave:h,onBulkDone:f,onClose:g}){let y="__none__",b="ollama-local"===t,v="cookie"===n,j="xai"===t&&!v,w=v?"Cookie Value":"qoder"===t||"qoder-cn"===t?"Personal Access Token (PAT)":"API Key",k="azure"===t,N="cloudflare-ai"===t,C=m.Q2?.[t]?.credentialForm==="aws",S=m.Q2?.[t]?.apiKeyOptionalWith||null,A=m.Q2?.[t]?.regions||null,T=m.Q2?.[t]?.defaultRegion||A?.[0]?.id||"",[$,O]=(0,i.useState)({name:"",apiKey:"",defaultModel:"",priority:1,proxyPoolId:y,ollamaHostUrl:""}),[I,P]=(0,i.useState)({azureEndpoint:"",apiVersion:"2024-10-01-preview",deployment:"",organization:""}),[E,D]=(0,i.useState)({accountId:""}),[R,z]=(0,i.useState)({profile:"",region:"",accessKeyId:"",sessionToken:""}),[q,_]=(0,i.useState)(T),[K,F]=(0,i.useState)(!1),[L,J]=(0,i.useState)(null),[W,H]=(0,i.useState)(!1),B=N?`name1|sk-key1|acc123456
|
|
4
|
+
name2|sk-key2|def789012
|
|
5
|
+
sk-key-only-auto-named`:"qoder"===t||"qoder-cn"===t?`name1|pt-xxxxx
|
|
6
|
+
name2|pt-yyyyy
|
|
7
|
+
pt-only-auto-named`:U,[G,Q]=(0,i.useState)("single"),[V,Z]=(0,i.useState)(""),[X,Y]=(0,i.useState)(null),ee=()=>{if(b&&$.ollamaHostUrl.trim())return{baseUrl:$.ollamaHostUrl.trim()};if(k)return{azureEndpoint:I.azureEndpoint,apiVersion:I.apiVersion,deployment:I.deployment,organization:I.organization};if(N)return{accountId:E.accountId};if(C){let e={};return R.profile.trim()&&(e.profile=R.profile.trim()),R.region.trim()&&(e.region=R.region.trim()),R.accessKeyId.trim()&&(e.accessKeyId=R.accessKeyId.trim()),R.sessionToken.trim()&&(e.sessionToken=R.sessionToken.trim()),Object.keys(e).length?e:void 0}if(A&&q)return{region:q}},et=()=>{let e=ee();return!!(S&&e?.[S])||(C?!!$.apiKey&&!!e?.accessKeyId:!!$.apiKey)},es=async()=>{F(!0);try{let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:$.apiKey,providerSpecificData:ee()})}),s=await e.json();J(s.valid?"success":"failed")}catch{J("failed")}finally{F(!1)}},ea=async()=>{if(t&&(b||et())&&(b||$.name)&&(!l||$.defaultModel.trim())){H(!0);try{let e=!1;try{F(!0),J(null);let s=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:$.apiKey,providerSpecificData:ee()})});e=!!(await s.json()).valid,J(e?"success":"failed")}catch{J("failed")}finally{F(!1)}await h({name:$.name||(b?"Ollama Local":""),apiKey:$.apiKey,defaultModel:l?$.defaultModel.trim():void 0,priority:$.priority,proxyPoolId:$.proxyPoolId===y?null:$.proxyPoolId,testStatus:e?"active":"unknown",providerSpecificData:ee()})}finally{H(!1)}}},ei=async()=>{let e=V.split("\n");if(!e.length)return;let s=function(e,t,s={}){let{isCloudflareAi:a=!1}=s,i=new Set((Array.isArray(t)?t:[]).map(e=>"string"==typeof e?e.toLowerCase():"")),l=[];for(let t of e){let e,s="string"==typeof t?t.trim():"";if(!s)continue;let r=function(e,t={}){let{isCloudflareAi:s=!1}=t,a=e.split("|");if(s&&a.length>=3){let e=a[0].trim();return{baseName:e||"Key",apiKey:a.slice(1,-1).join("|").trim(),providerSpecificData:{accountId:a[a.length-1].trim()}}}return a.length>=2?{baseName:a[0].trim()||"Key",apiKey:a.slice(1).join("|").trim()}:{baseName:"Key",apiKey:a[0].trim()}}(s,{isCloudflareAi:a});if(!r||!r.apiKey)continue;let n=r.baseName,o=1;for(;e=`${n} ${o}`,i.has(e.toLowerCase());)o+=1;i.add(e.toLowerCase());let d={name:e,apiKey:r.apiKey,skipped:!1};r.providerSpecificData&&(d.providerSpecificData=r.providerSpecificData),l.push(d)}return l}(e,x,{isCloudflareAi:N});if(!s.length)return;H(!0),Y(null);let a=0,i=0;for(let e of s)try{let s=!1;try{let a=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:e.apiKey})});s=!!(await a.json().catch(()=>({}))).valid}catch{s=!1}(await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:e.apiKey,name:e.name,priority:1,testStatus:s?"active":"unknown",...e.providerSpecificData?{providerSpecificData:e.providerSpecificData}:{}})})).ok?a++:i++}catch{i++}H(!1),Y({success:a,failed:i}),a>0&&f&&f()};return t?(0,a.jsx)(c.aF,{isOpen:e,title:`Add ${s||t} ${w}`,onClose:g,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[!C&&(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(c.$n,{size:"sm",variant:"single"===G?"primary":"ghost",onClick:()=>{Q("single"),Y(null)},children:"Single"}),(0,a.jsx)(c.$n,{size:"sm",variant:"bulk"===G?"primary":"ghost",onClick:()=>{Q("bulk"),Y(null)},children:"Bulk Add"})]}),"bulk"===G&&(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsx)("p",{className:"text-xs text-text-muted",children:N?(0,a.jsxs)(a.Fragment,{children:["One key per line. Format: ",(0,a.jsx)("code",{children:"name|apiKey|accountId"})," or just ",(0,a.jsx)("code",{children:"apiKey"})," (auto-named by index)."]}):"qoder"===t||"qoder-cn"===t?(0,a.jsxs)(a.Fragment,{children:["One PAT per line. Format: ",(0,a.jsx)("code",{children:"name|pt-..."})," or just ",(0,a.jsx)("code",{children:"pt-..."})," (auto-named by index)."]}):(0,a.jsxs)(a.Fragment,{children:["One key per line. Format: ",(0,a.jsx)("code",{children:"name|apiKey"})," or just ",(0,a.jsx)("code",{children:"apiKey"})," (auto-named by index)."]})}),(0,a.jsx)("textarea",{className:"w-full rounded border border-accent/30 bg-sidebar p-2 text-sm font-mono resize-y min-h-[140px] focus:outline-none focus:ring-1 focus:ring-primary",placeholder:B,value:V,onChange:e=>Z(e.target.value)}),X&&(0,a.jsxs)("div",{className:`text-sm font-medium ${X.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",X.success," added",X.failed>0?`, ✗ ${X.failed} failed`:""]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(c.$n,{onClick:ei,fullWidth:!0,disabled:W||!V.trim(),children:W?"Adding...":"Add All Keys"}),(0,a.jsx)(c.$n,{onClick:g,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),"single"===G&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(c.pd,{label:"Name",value:$.name,onChange:e=>O({...$,name:e.target.value}),placeholder:b?"Ollama Local":"Production Key"}),b&&(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(c.pd,{label:"Ollama Host URL",value:$.ollamaHostUrl,onChange:e=>O({...$,ollamaHostUrl:e.target.value}),placeholder:"http://localhost:11434",className:"flex-1"}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(c.$n,{onClick:es,disabled:K||W,variant:"secondary",children:K?"Checking...":"Check"})})]}),!b&&(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(c.pd,{label:w,type:v?"text":"password",value:$.apiKey,onChange:e=>O({...$,apiKey:e.target.value}),placeholder:v?"grok-web"===t?"sso=xxxxx... or just the raw value":"eyJhbGciOi...":j?"xai-...":"qoder"===t||"qoder-cn"===t?"pt-...":"",className:"flex-1"}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(c.$n,{onClick:es,disabled:!et()||K||W,variant:"secondary",children:K?"Checking...":"Check"})})]}),j&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Use a direct xAI API key from console.x.ai. This is separate from Grok Build OAuth."}),v&&o&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:[o,d&&(0,a.jsxs)(a.Fragment,{children:[" ",(0,a.jsxs)("a",{href:d,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:["Open ",d.replace(/^https?:\/\//,"")]})]})]}),A&&(0,a.jsx)(c.l6,{label:"Region",value:q,onChange:e=>_(e.target.value),options:A.map(e=>({value:e.id,label:e.label}))}),l&&(0,a.jsx)(c.pd,{label:"Default Model",value:$.defaultModel,onChange:e=>O({...$,defaultModel:e.target.value}),placeholder:r?"claude-3-5-sonnet-latest":"gpt-4o-mini"}),b&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Leave blank to use ",(0,a.jsx)("code",{children:"http://localhost:11434"}),". For remote Ollama, enter the full host URL (e.g. ",(0,a.jsx)("code",{children:"http://192.168.1.10:11434"}),")."]}),L&&(0,a.jsx)(c.Ex,{variant:"success"===L?"success":"error",children:"success"===L?"Valid":"Invalid"}),u&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:u}),l&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Enter the model ID exactly as your compatible endpoint expects it. This model will be saved as the connection default."}),N&&(0,a.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,a.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Cloudflare Workers AI"}),(0,a.jsx)(c.pd,{label:"Account ID",value:E.accountId,onChange:e=>D({...E,accountId:e.target.value}),placeholder:"abc123def456..."}),(0,a.jsxs)("p",{className:"text-xs text-text-muted mt-2",children:["Find your Account ID in the right sidebar of ",(0,a.jsx)("a",{href:"https://dash.cloudflare.com",target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:"dash.cloudflare.com"})]})]}),C&&(0,a.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,a.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"AWS Bedrock Credentials"}),(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsx)(c.pd,{label:"AWS Profile (SSO — recommended)",value:R.profile,onChange:e=>z({...R,profile:e.target.value}),placeholder:"my-sso-profile"}),(0,a.jsx)(c.pd,{label:"Region",value:R.region,onChange:e=>z({...R,region:e.target.value}),placeholder:"us-east-1"})]}),(0,a.jsxs)("p",{className:"text-xs text-text-muted mt-2",children:["Set a profile from ",(0,a.jsx)("code",{children:"~/.aws/config"})," and leave the API key empty, then run"," ",(0,a.jsxs)("code",{children:["aws sso login --profile ",R.profile||"my-sso-profile"]}),". Credentials refresh automatically."]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 mt-4",children:[(0,a.jsx)(c.pd,{label:"Access Key ID (only for static keys)",value:R.accessKeyId,onChange:e=>z({...R,accessKeyId:e.target.value}),placeholder:"AKIA..."}),(0,a.jsx)(c.pd,{label:"Session Token (only for temporary ASIA… keys)",type:"password",value:R.sessionToken,onChange:e=>z({...R,sessionToken:e.target.value}),placeholder:"FwoGZXIvYXdz..."})]}),(0,a.jsxs)("p",{className:"text-xs text-text-muted mt-2",children:["For static keys instead: put the AWS ",(0,a.jsx)("strong",{children:"secret"})," access key in the API Key field above and the access key id here. A profile, if set, takes precedence."]})]}),k&&(0,a.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,a.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Azure OpenAI Configuration"}),(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsx)(c.pd,{label:"Azure Endpoint",value:I.azureEndpoint,onChange:e=>P({...I,azureEndpoint:e.target.value}),placeholder:"https://your-resource.openai.azure.com"}),(0,a.jsx)(c.pd,{label:"Deployment Name",value:I.deployment,onChange:e=>P({...I,deployment:e.target.value}),placeholder:"gpt-4"}),(0,a.jsx)(c.pd,{label:"API Version",value:I.apiVersion,onChange:e=>P({...I,apiVersion:e.target.value}),placeholder:"2024-10-01-preview"}),(0,a.jsx)(c.pd,{label:"Organization",value:I.organization,onChange:e=>P({...I,organization:e.target.value}),placeholder:"Organization ID"})]})]}),(0,a.jsx)(c.pd,{label:"Priority",type:"number",value:$.priority,onChange:e=>O({...$,priority:Number.parseInt(e.target.value)||1})}),(0,a.jsx)(c.l6,{label:"Proxy Pool",value:$.proxyPoolId,onChange:e=>O({...$,proxyPoolId:e.target.value}),options:[{value:y,label:"None"},...(p||[]).map(e=>({value:e.id,label:e.name}))],placeholder:"None"}),0===(p||[]).length&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"No active proxy pools available. Create one in Proxy Pools page first."}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Legacy manual proxy fields are still accepted by API for backward compatibility."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(c.$n,{onClick:ea,fullWidth:!0,disabled:W||!b&&(!$.name||!et())||l&&!$.defaultModel.trim()||k&&(!I.azureEndpoint||!I.deployment||!I.organization)||N&&!E.accountId,children:W?"Saving...":"Save"}),(0,a.jsx)(c.$n,{onClick:g,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})}):null}function K({isOpen:e,node:t,onSave:s,onClose:l,isAnthropic:r}){let[n,o]=(0,i.useState)({name:"",prefix:"",apiType:"chat",baseUrl:"https://api.openai.com/v1"}),[d,m]=(0,i.useState)(!1),[p,u]=(0,i.useState)(""),[x,h]=(0,i.useState)(""),[f,g]=(0,i.useState)(!1),[y,b]=(0,i.useState)(null);(0,i.useEffect)(()=>{t&&o({name:t.name||"",prefix:t.prefix||"",apiType:t.apiType||"chat",baseUrl:t.baseUrl||(r?"https://api.anthropic.com/v1":"https://api.openai.com/v1")})},[t,r]);let v=async()=>{if(n.name.trim()&&n.prefix.trim()&&n.baseUrl.trim()){m(!0);try{let e={name:n.name,prefix:n.prefix,baseUrl:n.baseUrl};r||(e.apiType=n.apiType),await s(e)}finally{m(!1)}}},j=async()=>{g(!0);try{let e=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:n.baseUrl,apiKey:p,type:r?"anthropic-compatible":"openai-compatible",modelId:x.trim()||void 0})}),t=await e.json();b(t.valid?"success":"failed")}catch{b("failed")}finally{g(!1)}};return t?(0,a.jsx)(c.aF,{isOpen:e,title:`Edit ${r?"Anthropic":"OpenAI"} Compatible`,onClose:l,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)(c.pd,{label:"Name",value:n.name,onChange:e=>o({...n,name:e.target.value}),placeholder:`${r?"Anthropic":"OpenAI"} Compatible (Prod)`,hint:"Required. A friendly label for this node."}),(0,a.jsx)(c.pd,{label:"Prefix",value:n.prefix,onChange:e=>o({...n,prefix:e.target.value}),placeholder:r?"ac-prod":"oc-prod",hint:"Required. Used as the provider prefix for model IDs."}),!r&&(0,a.jsx)(c.l6,{label:"API Type",options:[{value:"chat",label:"Chat Completions"},{value:"responses",label:"Responses API"}],value:n.apiType,onChange:e=>o({...n,apiType:e.target.value})}),(0,a.jsx)(c.pd,{label:"Base URL",value:n.baseUrl,onChange:e=>o({...n,baseUrl:e.target.value}),placeholder:r?"https://api.anthropic.com/v1":"https://api.openai.com/v1",hint:`Use the base URL (ending in /v1) for your ${r?"Anthropic":"OpenAI"}-compatible API.`}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(c.pd,{label:"API Key (for Check)",type:"password",value:p,onChange:e=>u(e.target.value),className:"flex-1"}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(c.$n,{onClick:j,disabled:!p||f||!n.baseUrl.trim(),variant:"secondary",children:f?"Checking...":"Check"})})]}),(0,a.jsx)(c.pd,{label:"Model ID (optional)",value:x,onChange:e=>h(e.target.value),placeholder:"e.g. my-model-id",hint:"If provider lacks /models endpoint, enter a model ID to validate via chat/completions instead."}),y&&(0,a.jsx)(c.Ex,{variant:"success"===y?"success":"error",children:"success"===y?"Valid":"Invalid"}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(c.$n,{onClick:v,fullWidth:!0,disabled:!n.name.trim()||!n.prefix.trim()||!n.baseUrl.trim()||d,children:d?"Saving...":"Save"}),(0,a.jsx)(c.$n,{onClick:l,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}M.propTypes={isOpen:I().bool.isRequired,provider:I().string,providerName:I().string,isCompatible:I().bool,isAnthropic:I().bool,authType:I().string,authHint:I().string,website:I().string,proxyPools:I().arrayOf(I().shape({id:I().string,name:I().string})),error:I().string,existingNames:I().arrayOf(I().string),onSave:I().func.isRequired,onBulkDone:I().func,onClose:I().func.isRequired},K.propTypes={isOpen:I().bool.isRequired,node:I().shape({id:I().string,name:I().string,prefix:I().string,apiType:I().string,baseUrl:I().string}),onSave:I().func.isRequired,onClose:I().func.isRequired,isAnthropic:I().bool};let F=()=>Object.fromEntries(Object.keys(p.bs).map(e=>[e,!1]));function L({isOpen:e,providerAlias:t,providerDisplayAlias:s,onSave:l,onClose:r}){let[n,o]=(0,i.useState)(""),[d,m]=(0,i.useState)(F),[u,x]=(0,i.useState)(""),[h,f]=(0,i.useState)(""),[g,y]=(0,i.useState)(null),[b,v]=(0,i.useState)(""),[j,w]=(0,i.useState)(!1),[k,N]=(0,i.useState)("");(0,i.useEffect)(()=>{e&&(o(""),m(F()),x(""),f(""),N(""),y(null),v(""))},[e]);let C=e=>{let s=`${t}/`;return e.startsWith(s)?e.slice(s.length):e},S=async()=>{let e=C(n.trim());if(e){y("testing"),v("");try{let s=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${t}/${e}`})}),a=await s.json();y(a.ok?"ok":"error"),v(a.error||"")}catch(e){y("error"),v(e.message)}}},A=async()=>{let e=C(n.trim());if(e&&!j){w(!0);try{let t={...d,...u?{contextWindow:Number(u)}:{},...h?{maxOutput:Number(h)}:{}};await l(e,t,d.stt?k:null)}finally{w(!1)}}};return(0,a.jsx)(c.aF,{isOpen:e,onClose:r,title:"Add Custom Model",children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Model ID"}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)("input",{type:"text",value:n,onChange:e=>{o(e.target.value),y(null),v("")},onKeyDown:e=>{"Enter"===e.key&&S()},placeholder:"e.g. claude-opus-4-5",className:"flex-1 px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",autoFocus:!0}),(0,a.jsx)(c.$n,{variant:"secondary",icon:"science",loading:"testing"===g,onClick:S,disabled:!n.trim()||"testing"===g,children:"testing"===g?"Testing...":"Test"})]}),(0,a.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:["Sent to provider as: ",(0,a.jsx)("code",{className:"font-mono bg-sidebar px-1 rounded",children:C(n.trim())||"model-id"})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Capabilities"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-4",children:Object.entries(p.bs).map(([e,t])=>(0,a.jsx)(c.lM,{checked:!!d[e],onChange:t=>m(s=>({...s,[e]:t})),label:t.label,description:t.desc,size:"sm"},e))})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Context window"}),(0,a.jsx)("input",{type:"number",min:"1",step:"1",value:u,onChange:e=>x(e.target.value),placeholder:"Optional, in tokens",className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Maximum output"}),(0,a.jsx)("input",{type:"number",min:"1",step:"1",value:h,onChange:e=>f(e.target.value),placeholder:"Optional, in tokens",className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(c.lM,{checked:!!d.stt,onChange:e=>{m(t=>({...t,stt:e})),e||N("")},label:"Speech to text",description:"Transcribes audio via /v1/audio/transcriptions",size:"sm"}),d.stt&&(0,a.jsx)("div",{className:"mt-3",children:(0,a.jsx)(c.l6,{label:"Transport",value:k,onChange:e=>N(e.target.value),placeholder:"Provider default (REST)",options:p.vp.map(e=>({value:e,label:p.qw[e].label})),hint:"Realtime transport marker for the STT dispatcher. Empty keeps the provider's REST format."})})]}),"ok"===g&&(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm text-green-600",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base",children:"check_circle"}),"Model is reachable"]}),"error"===g&&(0,a.jsxs)("div",{className:"flex items-start gap-2 text-sm text-red-500",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base shrink-0",children:"cancel"}),(0,a.jsx)("span",{children:b||"Model not reachable"})]}),(0,a.jsxs)("div",{className:"flex gap-2 pt-1",children:[(0,a.jsx)(c.$n,{onClick:r,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,a.jsx)(c.$n,{onClick:A,fullWidth:!0,size:"sm",disabled:!n.trim()||j,children:j?"Adding...":"Add Model"})]})]})})}L.propTypes={isOpen:I().bool.isRequired,providerAlias:I().string.isRequired,providerDisplayAlias:I().string.isRequired,onSave:I().func.isRequired,onClose:I().func.isRequired};let J=`[
|
|
8
|
+
{
|
|
9
|
+
"accessToken": "eyJhbGc...",
|
|
10
|
+
"refreshToken": "rt_...",
|
|
11
|
+
"idToken": "eyJhbGc...",
|
|
12
|
+
"email": "user@example.com"
|
|
13
|
+
}
|
|
14
|
+
]`;function W({isOpen:e,onClose:t,onSuccess:s}){let[l,r]=(0,i.useState)(""),[n,o]=(0,i.useState)(!1),[d,m]=(0,i.useState)(""),[p,u]=(0,i.useState)(null),x=()=>{n||(r(""),m(""),u(null),t())},h=async()=>{var e;let t;m(""),u(null);let a=l.trim();if(!a)return;try{t=JSON.parse(a)}catch(e){m(`${(0,S.Tl)("Invalid JSON")}: ${e.message}`);return}let i=Array.isArray(e=t)?e:e&&"object"==typeof e?Array.isArray(e.accounts)?e.accounts:[e]:null;if(!i||0===i.length)return void m((0,S.Tl)("No accounts found in input"));o(!0);try{let e=await fetch("/api/oauth/codex/bulk-import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accounts:i})}),t=await e.json();if(!e.ok)return void m(t?.error||`Request failed: ${e.status}`);u(t),t.success>0&&"function"==typeof s&&s()}catch(e){m(e.message||(0,S.Tl)("Request failed"))}finally{o(!1)}},f=p?.results?.filter(e=>!e.ok)||[];return(0,a.jsx)(c.aF,{isOpen:e,title:(0,S.Tl)("Bulk Add Codex Accounts"),onClose:x,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)("p",{className:"text-xs text-text-muted",children:(0,S.Tl)("Paste an array of codex account JSON objects. Each must include accessToken (and ideally refreshToken, idToken).")}),(0,a.jsx)("textarea",{className:"w-full rounded border border-accent/30 bg-sidebar p-2 text-sm font-mono resize-y min-h-[240px] focus:outline-none focus:ring-1 focus:ring-primary",placeholder:J,value:l,onChange:e=>r(e.target.value),disabled:n}),d&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:d}),p&&(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsxs)("div",{className:`text-sm font-medium ${p.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",p.success," ",(0,S.Tl)("added"),p.failed>0?`, ✗ ${p.failed} ${(0,S.Tl)("failed")}`:""]}),f.length>0&&(0,a.jsx)("ul",{className:"rounded border border-accent/20 bg-sidebar/50 p-2 text-xs font-mono max-h-40 overflow-y-auto",children:f.map(e=>(0,a.jsxs)("li",{className:"text-red-400",children:["[",e.index,"] ",e.error]},e.index))})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(c.$n,{onClick:h,fullWidth:!0,disabled:n||!l.trim(),children:n?(0,S.Tl)("Importing..."):(0,S.Tl)("Import All")}),(0,a.jsx)(c.$n,{onClick:x,variant:"ghost",fullWidth:!0,disabled:n,children:(0,S.Tl)("Close")})]})]})})}W.propTypes={isOpen:I().bool.isRequired,onClose:I().func.isRequired,onSuccess:I().func};let H=`[
|
|
15
|
+
{
|
|
16
|
+
"access_token": "eyJ0eXAiOiJhdCtqd3Qi...",
|
|
17
|
+
"refresh_token": "LZhriF9bf88pPykpXCuZ9...",
|
|
18
|
+
"id_token": "eyJ0eXAiOiJKV1QiLCJhbGci...",
|
|
19
|
+
"email": "account1@example.com"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"access_token": "eyJ0eXAiOiJhdCtqd3Qi...",
|
|
23
|
+
"refresh_token": "LZhriF9bf88pPykpXCuZ9...",
|
|
24
|
+
"id_token": "eyJ0eXAiOiJKV1QiLCJhbGci...",
|
|
25
|
+
"email": "account2@example.com"
|
|
26
|
+
}
|
|
27
|
+
]`;function B(e){let t,s=e.trim();if(!s)return[];try{t=JSON.parse(s)}catch(e){try{let e=s;e.startsWith("[")||((e=e.replace(/\}\s*,\s*\{/g,"},{").replace(/\}\s*\{/g,"},{")).endsWith(",")&&(e=e.slice(0,-1)),e=`[${e}]`),t=JSON.parse(e)}catch{throw e}}if(Array.isArray(t))return t;if(t&&"object"==typeof t)return Array.isArray(t.accounts)?t.accounts:[t];throw Error("Input must be a JSON object or array of objects")}function G({isOpen:e,onClose:t,onSuccess:s}){let[l,r]=(0,i.useState)(""),[n,o]=(0,i.useState)(!1),[d,m]=(0,i.useState)(""),[p,u]=(0,i.useState)(null),[x,h]=(0,i.useState)(!1),[f,g]=(0,i.useState)(null),y=(0,i.useRef)(null),b=()=>{n||(r(""),m(""),u(null),g(null),h(!1),t())},v=async e=>{if(!e||0===e.length)return;m("");let t=Array.from(e).filter(e=>e.name.endsWith(".json")||"application/json"===e.type||""===e.type);if(0===t.length)return void m((0,S.Tl)("Please select valid .json files"));try{let e=[];for(let s of t){let t=await s.text(),a=B(t);Array.isArray(a)?e.push(...a):a&&e.push(a)}if(0===e.length)return void m((0,S.Tl)("No accounts found in selected files"));r(JSON.stringify(e,null,2)),g({filesCount:t.length,accountsCount:e.length})}catch(e){m(`${(0,S.Tl)("Error reading files")}: ${e.message}`)}},j=async()=>{let e;m(""),u(null);try{e=B(l)}catch(e){m(`${(0,S.Tl)("Invalid JSON")}: ${e.message}`);return}if(!e||0===e.length)return void m((0,S.Tl)("No accounts found in input"));o(!0);try{let t=await fetch("/api/oauth/grok-cli/bulk-import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accounts:e})}),a=await t.json();if(!t.ok)return void m(a?.error||`Request failed: ${t.status}`);u(a),a.success>0&&"function"==typeof s&&s()}catch(e){m(e.message||(0,S.Tl)("Request failed"))}finally{o(!1)}},w=p?.results?.filter(e=>!e.ok)||[];return(0,a.jsx)(c.aF,{isOpen:e,title:(0,S.Tl)("Bulk Add Grok CLI Accounts"),onClose:b,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,a.jsx)("p",{className:"text-xs text-text-muted",children:(0,S.Tl)("Upload multiple .json files or paste JSON array / object.")}),(0,a.jsx)("input",{ref:y,type:"file",accept:".json,application/json",multiple:!0,className:"hidden",onChange:e=>{v(e.target.files),e.target&&(e.target.value="")}}),(0,a.jsx)(c.$n,{type:"button",size:"sm",variant:"secondary",icon:"upload_file",onClick:()=>y.current?.click(),disabled:n,children:(0,S.Tl)("Upload JSON Files")})]}),(0,a.jsxs)("div",{onDragOver:e=>{e.preventDefault(),h(!0)},onDragLeave:e=>{e.preventDefault(),h(!1)},onDrop:e=>{e.preventDefault(),h(!1),e.dataTransfer?.files?.length>0&&v(e.dataTransfer.files)},className:`relative rounded border transition-colors ${x?"border-primary bg-primary/10 ring-2 ring-primary/30":"border-accent/30 bg-sidebar"}`,children:[(0,a.jsx)("textarea",{className:"w-full rounded bg-transparent p-2.5 text-sm font-mono resize-y min-h-[240px] focus:outline-none focus:ring-1 focus:ring-primary",placeholder:H,value:l,onChange:e=>{r(e.target.value),g(null)},disabled:n}),x&&(0,a.jsxs)("div",{className:"absolute inset-0 flex flex-col items-center justify-center bg-sidebar/90 rounded pointer-events-none backdrop-blur-xs",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-3xl text-primary mb-1",children:"upload_file"}),(0,a.jsx)("span",{className:"text-sm font-medium text-primary",children:(0,S.Tl)("Drop .json files here")})]})]}),f&&(0,a.jsxs)("div",{className:"flex items-center gap-1.5 text-xs text-green-400 font-medium bg-green-500/10 border border-green-500/20 px-2.5 py-1.5 rounded",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"check_circle"}),(0,a.jsxs)("span",{children:[(0,S.Tl)("Loaded")," ",f.accountsCount," ",(0,S.Tl)("account(s) from")," ",f.filesCount," ",(0,S.Tl)("file(s)")]})]}),d&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:d}),p&&p.failed>0&&(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsxs)("div",{className:"text-sm font-medium text-yellow-400",children:["✗ ",p.failed," ",(0,S.Tl)("failed")]}),w.length>0&&(0,a.jsx)("ul",{className:"rounded border border-accent/20 bg-sidebar/50 p-2 text-xs font-mono max-h-40 overflow-y-auto",children:w.map(e=>(0,a.jsxs)("li",{className:"text-red-400",children:["[",e.index,"] ",e.error]},e.index))})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(c.$n,{onClick:j,fullWidth:!0,disabled:n||!l.trim(),children:n?(0,S.Tl)("Importing..."):(0,S.Tl)("Import All")}),(0,a.jsx)(c.$n,{onClick:b,variant:"ghost",fullWidth:!0,disabled:n,children:(0,S.Tl)("Close")})]})]})})}var Q=s(65921);let V=["host","content-length","content-type","connection","transfer-encoding","authorization","cookie"],Z=/^[A-Za-z0-9-]+$/;function X({providerId:e}){let t=(0,Q.i)(),[s,l]=(0,i.useState)(!1),[r,n]=(0,i.useState)([{name:"",value:""}]),[o,d]=(0,i.useState)({}),[m,p]=(0,i.useState)(!1),[u,x]=(0,i.useState)(!1);(0,i.useEffect)(()=>{let t=!1;return fetch(`/api/providers/${e}/overrides`,{cache:"no-store"}).then(e=>e.ok?e.json():null).then(e=>{if(t||!e)return;let s=e.builtinHeaders||{},a=Object.entries({...s,...e.headers||{}}).map(([e,t])=>({name:e,value:t}));d(s),n(a.length?a:[{name:"",value:""}]),p(Object.keys(e.headers||{}).length>0)}).catch(()=>{}),()=>{t=!0}},[e]);let h=(e,t,s)=>{n(a=>a.map((a,i)=>i===e?{...a,[t]:s}:a))},f=(0,i.useCallback)(async()=>{let s={};for(let e of r.filter(e=>e.name.trim())){let a=e.name.trim();if(!Z.test(a))return void t.error(`Invalid header name: ${a}`);if(V.includes(a.toLowerCase()))return void t.error(`Header ${a} cannot be overridden`);if(a in s)return void t.error(`Duplicate header name: ${a}`);e.value!==o[a]&&(s[a]=e.value)}x(!0);try{let a=await fetch(`/api/providers/${e}/overrides`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({headers:s})});if(!a.ok){let e=await a.json().catch(()=>({}));t.error(e.error||"Failed to save");return}p(Object.keys(s).length>0),t.success("Custom headers saved")}finally{x(!1)}},[r,o,e,t]);return 0!==Object.keys(o).length||m?(0,a.jsxs)(c.Zp,{padding:"xs",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>l(e=>!e),className:"flex w-full items-center justify-between text-left",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary text-[20px]",children:"tune"}),(0,a.jsx)("span",{className:"text-sm font-semibold",children:"Custom Headers"}),m&&(0,a.jsx)(c.Ex,{variant:"success",size:"sm",children:"Active"})]}),(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted",children:s?"expand_less":"expand_more"})]}),s&&(0,a.jsxs)("div",{className:"mt-3 border-t border-border pt-3",children:[(0,a.jsx)("div",{className:"flex flex-col gap-2",children:r.map((e,t)=>{let s=e.name.trim()in o&&e.value!==o[e.name.trim()];return(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("input",{value:e.name,onChange:e=>h(t,"name",e.target.value),placeholder:"Header-Name",spellCheck:!1,className:"w-44 rounded-md border border-border bg-background px-2 py-1.5 text-sm focus:border-primary focus:outline-none"}),(0,a.jsx)("input",{value:e.value,onChange:e=>h(t,"value",e.target.value),placeholder:"Value",spellCheck:!1,title:s?"Overridden":e.name.trim()in o?"Registry default":"",className:`min-w-0 flex-1 rounded-md border bg-background px-2 py-1.5 text-sm focus:border-primary focus:outline-none ${s?"border-amber-400/60":"border-border"}`}),(0,a.jsx)("button",{type:"button",title:"Remove header",onClick:()=>n(e=>e.length>1?e.filter((e,s)=>s!==t):[{name:"",value:""}]),className:"shrink-0 text-text-muted hover:text-red-500",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"})})]},t)})}),(0,a.jsxs)("div",{className:"mt-3 flex items-center justify-between gap-2",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>n(e=>[...e,{name:"",value:""}]),className:"flex items-center gap-1 text-xs text-primary hover:underline",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"add"}),"Add header"]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)("button",{type:"button",disabled:u,onClick:()=>{n(Object.entries(o).map(([e,t])=>({name:e,value:t})))},className:"rounded-md border border-border px-3 py-1.5 text-xs hover:bg-black/[0.03] dark:hover:bg-white/[0.03] disabled:opacity-50",children:"Reset"}),(0,a.jsx)("button",{type:"button",disabled:u,onClick:f,className:"rounded-md bg-primary px-3 py-1.5 text-xs font-medium text-white hover:opacity-90 disabled:opacity-50",children:u?"Saving...":"Save"})]})]})]})]}):null}X.propTypes={providerId:I().string.isRequired};let Y={claude:"claudeAutoPing",codex:"codexAutoPing"};function ee(){let e,t,s=(0,l.useParams)(),r=(0,l.useRouter)(),u=s.id,{getCaps:x}=(0,C.yU)(),[h,f]=(0,i.useState)([]),[g,y]=(0,i.useState)(!0),[b,v]=(0,i.useState)(null),[j,w]=(0,i.useState)([]),[A,O]=(0,i.useState)(!1),[I,E]=(0,i.useState)(!1),[R,z]=(0,i.useState)(!1),[q,U]=(0,i.useState)(""),[F,J]=(0,i.useState)(!1),[H,B]=(0,i.useState)(!1),[Q,V]=(0,i.useState)(!1),[Z,ee]=(0,i.useState)(!1),[et,es]=(0,i.useState)(!1),[ea,ei]=(0,i.useState)(null),[el,er]=(0,i.useState)({}),[en,eo]=(0,i.useState)([]),[ed,ec]=(0,i.useState)(!1),[em,ep]=(0,i.useState)({}),[eu,ex]=(0,i.useState)(""),[eh,ef]=(0,i.useState)(()=>new Set),[eg,ey]=(0,i.useState)(!1),[eb,ev]=(0,i.useState)([]),[ej,ew]=(0,i.useState)("__none__"),[ek,eN]=(0,i.useState)(!1),[eC,eS]=(0,i.useState)(null),[eA,eT]=(0,i.useState)(""),[e$,eO]=(0,i.useState)("auto"),[eI,eP]=(0,i.useState)({enabled:!1,connections:{}}),[eE,eD]=(0,i.useState)([]),[eR,ez]=(0,i.useState)([]),[eq,e_]=(0,i.useState)(null),[eU,eM]=(0,i.useState)([]),[eK,eF]=(0,i.useState)([]),[eL,eJ]=(0,i.useState)(null),[eW,eH]=(0,i.useState)(!1),[eB,eG]=(0,i.useState)(!1),[eQ,eV]=(0,i.useState)(!1),[eZ,eX]=(0,i.useState)(null),[eY,e0]=(0,i.useState)({}),[e1,e2]=(0,i.useState)(null),e5=(0,i.useRef)(!1),[e3,e4]=(0,i.useState)(!1),[e6,e8]=(0,i.useState)(!1),[e7,e9]=(0,i.useState)(!1),{copied:te,copy:tt}=(0,N.C)(),ts="ag_risk_confirmed",ta=()=>{O(!0)},ti=()=>{"antigravity"===u&&"true"!==window.localStorage.getItem(ts)?eH(!0):td?ta():(U(""),z(!0))},tl=()=>{U(""),z(!0)},tr=()=>{td?ti():tl()},tn=b?{id:b.id,name:b.name||("anthropic-compatible"===b.type?"Anthropic Compatible":"OpenAI Compatible"),color:"anthropic-compatible"===b.type?"#D97757":"#10A37F",textIcon:"anthropic-compatible"===b.type?"AC":"OC",apiType:b.apiType,baseUrl:b.baseUrl,type:b.type}:m.zN[u]||m.fg[u]||m.IS[u]||m.nJ[u]||m.br[u],to=tn?.authModes||[],td=!!m.zN[u]||!!m.IS[u]||to.includes("oauth"),tc=!!m.fg[u]||to.includes("apikey"),tm=!!m.IS[u]?.noAuth,tp=(0,p.KC)(u),tu=("cursor"===u||"zed"===u)&&eR.length>0?eR:tp,tx=(0,m.wG)(u),th=(0,m.mq)(u),tf=(0,m.gb)(u),tg=th||tf,ty=!tg&&td&&tc,tb="xai"===u?"Grok Build OAuth":"grok-cli"===u?"Grok CLI Device Login":"kimi"===u?"Kimi Coding OAuth":"OAuth",tv="xai"===u?"xAI API Key":"kimi"===u?"Kimi API Key":"qoder"===u||"qoder-cn"===u?"PAT":"API Key",tj=e=>{if(!e$||"auto"===e$)return null;let t=k(u,e);return t&&t.includes(e$)?e$:null},tw=tg?u:tx,tk=(()=>{let e=new Set,t=new Set,s=s=>{if(!s||t.has(s))return;t.add(s);let a=k(u,s);a&&a.forEach(t=>{"none"!==t&&e.add(t)})};for(let e of tu)s(e.id);for(let e of eU)s(e.id);for(let e of en)e.providerAlias===tw&&"llm"===(e.kind||e.type||"llm")&&s(e.id);return e.size?["auto",...e]:null})(),tN=tg?b?.prefix||u:tx,tC=(0,i.useCallback)(async()=>{try{let e=await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tw)}`,{cache:"no-store"}),t=await e.json();e.ok&&eF(t.ids||[])}catch(e){console.log("Error fetching disabled models:",e)}},[tw]),tS=async e=>{try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:tw,ids:[e]})})).ok&&await tC()}catch(e){console.log("Error disabling model:",e)}},tA=async e=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tw)}&id=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await tC()}catch(e){console.log("Error enabling model:",e)}},tT=async e=>{e.length&&eJ({title:"Disable All Models",message:`Disable all ${e.length} model(s)?`,onConfirm:async()=>{eJ(null);try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:tw,ids:e})})).ok&&await tC()}catch(e){console.log("Error disabling all models:",e)}}})},t$=async()=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tw)}`,{method:"DELETE"})).ok&&await tC()}catch(e){console.log("Error enabling all models:",e)}},tO=(0,i.useCallback)(async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&er(t.aliases||{})}catch(e){console.log("Error fetching aliases:",e)}},[]),tI=(0,i.useCallback)(async()=>{try{let e=await fetch("/api/models/custom",{cache:"no-store"}),t=await e.json();e.ok&&eo(t.models||[])}catch(e){console.log("Error fetching custom models:",e)}},[]);(0,i.useEffect)(()=>{"kilocode"===u&&fetch("/api/providers/kilo/free-models").then(e=>e.json()).then(e=>{e.models?.length&&eM(e.models)}).catch(()=>{})},[u]);let tP=(0,i.useCallback)(async()=>{try{let[e,t,s,a]=await Promise.all([fetch("/api/providers",{cache:"no-store"}),fetch("/api/provider-nodes",{cache:"no-store"}),fetch("/api/proxy-pools?isActive=true",{cache:"no-store"}),fetch("/api/settings",{cache:"no-store"})]),i=await e.json(),l=await t.json(),r=await s.json(),n=a.ok?await a.json():{};if(e.ok){let e=(i.connections||[]).filter(e=>e.provider===u);f(e)}s.ok&&w(r.proxyPools||[]);let o=(n.providerStrategies||{})[u]||{};eS(o.fallbackStrategy||null),eT(null!=o.stickyRoundRobinLimit?String(o.stickyRoundRobinLimit):"1");let d=(n.providerThinking||{})[u]||{};eO(d.mode||"auto");let c=Y[u],m=c&&n[c]||{};if(eP({enabled:!0===m.enabled,connections:m.connections||{}}),t.ok){let e=(l.nodes||[]).find(e=>e.id===u)||null;if(!e&&tg)for(let t=0;t<3;t+=1){await new Promise(e=>setTimeout(e,150));let t=await fetch("/api/provider-nodes",{cache:"no-store"});if(t.ok&&(e=((await t.json()).nodes||[]).find(e=>e.id===u)||null))break}v(e)}}catch(e){console.log("Error fetching connections:",e)}finally{y(!1)}},[u,tg]),tE=async e=>{try{let t=await fetch(`/api/provider-nodes/${u}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),s=await t.json();t.ok&&(v(s.node),await tP(),ee(!1))}catch(e){console.log("Error updating provider node:",e)}},tD=async(e,t)=>{try{let s=await fetch("/api/settings",{cache:"no-store"}),a=(s.ok?await s.json():{}).providerStrategies||{},i={};e&&(i.fallbackStrategy=e),"round-robin"===e&&""!==t&&(i.stickyRoundRobinLimit=Number(t)||3);let l={...a};0===Object.keys(i).length?delete l[u]:l[u]=i,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:l})})}catch(e){console.log("Error saving provider strategy:",e)}},tR=async e=>{try{let t=await fetch("/api/settings",{cache:"no-store"}),s={...(t.ok?await t.json():{}).providerThinking||{}};e&&"auto"!==e?s[u]={mode:e}:delete s[u],await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerThinking:s})})}catch(e){console.log("Error saving thinking config:",e)}},tz=async e=>{let t=Y[u];if(t){eP(e);try{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({[t]:e})})}catch(e){console.log("Error saving auto-ping config:",e)}}};(0,i.useEffect)(()=>{tP(),tO(),tI(),tC()},[tP,tO,tI,tC]),(0,i.useEffect)(()=>{if("cursor"!==u&&"zed"!==u)return void ez([]);let e=h.find(e=>!1!==e.isActive);if(!e?.id){ez([]),"zed"===u&&e_(null);return}let t=!1;return"zed"===u&&e_(null),fetch(`/api/providers/${e.id}/models`,{cache:"no-store"}).then(async e=>({ok:e.ok,data:await e.json().catch(()=>null)})).then(({ok:e,data:s})=>{if(!t){if(e&&Array.isArray(s?.models)&&s.models.length>0){ez(s.models),"zed"===u&&s?.warning&&e_(s.warning);return}"zed"===u&&(ez([]),e_(s?.warning||s?.error||"Zed returned no live models."))}}).catch(()=>{t||"zed"!==u||(ez([]),e_("Failed to reach the Zed model catalog."))}),()=>{t=!0}},[u,h]),(0,i.useEffect)(()=>{let e=(m.zN[u]||m.fg[u]||m.IS[u]||m.nJ[u])?.modelsFetcher;e&&T(e).then(eD)},[u]);let tq=async(e,t,s=tx)=>{let a=`${s}/${e}`;try{let e=await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:a,alias:t})});if(e.ok)await tO();else{let t=await e.json();alert(t.error||"Failed to set alias")}}catch(e){console.log("Error setting alias:",e)}},t_=async e=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await tO()}catch(e){console.log("Error deleting alias:",e)}},tU=async(e,t="llm",s=tw,a,i)=>{try{let l=await fetch("/api/models/custom",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:s,id:e,type:t,...a?{caps:a}:{},...i?{transport:i}:{}})});if(l.ok)await tI(),window.dispatchEvent(new CustomEvent("customModelChanged"));else{let e=await l.json();alert(e.error||"Failed to add custom model")}}catch(e){console.log("Error adding custom model:",e)}},tM=async(e,t="llm",s=tw)=>{try{let a=new URLSearchParams({providerAlias:s,id:e,type:t});(await fetch(`/api/models/custom?${a}`,{method:"DELETE"})).ok&&(await tI(),window.dispatchEvent(new CustomEvent("customModelChanged")))}catch(e){console.log("Error deleting custom model:",e)}},tK=async()=>{if(!e6&&0!==eE.length){e8(!0);try{let e=new Set(tu.map(e=>e.id)),t=new Set(en.filter(e=>e.providerAlias===tw&&"llm"===(e.kind||e.type||"llm")).map(e=>e.id)),s=new Set(Object.values(el).filter(e=>"string"==typeof e)),a=0;for(let i of eE){let l=i.id||i.name||i.model;!(!l||e.has(l)||t.has(l))&&(s.has(`${tw}/${l}`)||(await tU(l,"llm",tw,i.caps),t.add(l),a+=1))}alert(a>0?`${(0,S.Tl)("Successfully added")} ${a} ${(0,S.Tl)("models")}`:(0,S.Tl)("All models already exist, no new models added"))}catch(e){console.log("Error importing provider models:",e),alert((0,S.Tl)("Error fetching models")+": "+e.message)}finally{e8(!1)}}},tF=async()=>{if(e3)return;let e=h.find(e=>!1!==e.isActive);if(!e)return void alert((0,S.Tl)("Please add an active Qoder connection first"));e4(!0);try{let t=await fetch(`/api/providers/${e.id}/models`),s=await t.json();if(!t.ok)return void alert(s.error||(0,S.Tl)("Failed to fetch models"));let a=s.models||[];if(0===a.length)return void alert((0,S.Tl)("No models returned"));let i=0;for(let e of a){let t=e.id||e.name;if(!t)continue;let s=t.replace(/^(qoder-cn|qoder)\//,"");en.some(e=>e.providerAlias===tw&&e.id===s&&"llm"===(e.kind||e.type||"llm"))||Object.values(el).includes(`${tw}/${s}`)||(await tU(s,"llm",tw,e.caps),i+=1)}0===i?alert((0,S.Tl)("All models already exist, no new models added")):alert((0,S.Tl)("Successfully added")+` ${i} `+(0,S.Tl)("models"))}catch(e){console.log("Error importing Qoder models:",e),alert((0,S.Tl)("Error fetching models")+": "+e.message)}finally{e4(!1)}},tL=async()=>{if(e7)return;let e=h.find(e=>!1!==e.isActive);if(!e)return void alert((0,S.Tl)("Please add an active Cline connection first"));e9(!0);try{let t=await fetch(`/api/providers/${e.id}/models`),s=await t.json();if(!t.ok)return void alert(s.error||(0,S.Tl)("Failed to fetch models"));let a=s.models||[];if(0===a.length)return void alert((0,S.Tl)("No models returned"));let i=0;for(let e of a){let t=e.id||e.name;t&&(en.some(e=>e.providerAlias===tw&&e.id===t&&"llm"===(e.kind||e.type||"llm"))||Object.values(el).includes(`${tw}/${t}`)||(await tU(t,"llm",tw),i+=1))}0===i?alert((0,S.Tl)("All models already exist, no new models added")):alert((0,S.Tl)("Successfully added")+` ${i} `+(0,S.Tl)("models"))}catch(e){console.log("Error importing Cline models:",e),alert((0,S.Tl)("Error fetching models")+": "+e.message)}finally{e9(!1)}},tJ=async()=>{if(eB||0===h.length)return;let e=Object.fromEntries(h.map(e=>[e.id,{state:"queued",error:null}]));e5.current=!1,eG(!0),eV(!1),eX(null),e0(e),e2({total:h.length,completed:0,passed:0,failed:0,stopped:!1});let t=0,s=0;try{for(let e=0;e<h.length;e+=1){if(e5.current){e2({total:h.length,completed:e,passed:t,failed:s,stopped:!0});break}let a=h[e];eX(a.id),e0(e=>({...e,[a.id]:{state:"testing",error:null}}));try{let e=await fetch(`/api/providers/${a.id}/test`,{method:"POST"}),i=await e.json(),l=!!i.valid;l?t+=1:s+=1,e0(e=>({...e,[a.id]:{state:l?"success":"failed",error:l?null:i.error||null}}))}catch(e){s+=1,e0(t=>({...t,[a.id]:{state:"failed",error:e.message||"Test failed"}}))}e2({total:h.length,completed:e+1,passed:t,failed:s,stopped:!1}),e<h.length-1&&await new Promise(e=>setTimeout(e,1e3))}}finally{eX(null),eG(!1),eV(!1),e5.current=!1}},tW=async e=>{eJ({title:"Delete Connection",message:"Delete this connection?",onConfirm:async()=>{eJ(null);try{(await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok&&f(t=>t.filter(t=>t.id!==e))}catch(e){console.log("Error deleting connection:",e)}}})},tH=()=>{tP(),O(!1)},tB=async e=>{U("");try{let t=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:u,...e})}),s=null;try{s=await t.json()}catch{s=null}if(t.ok){await tP(),z(!1);return}U(s?.error||"Failed to save connection")}catch(e){console.log("Error saving connection:",e),U("Failed to save connection")}},tG=async e=>{try{(await fetch(`/api/providers/${ea.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await tP(),V(!1))}catch(e){console.log("Error updating connection:",e)}},tQ=async(e,t)=>{try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&f(s=>s.map(s=>s.id===e?{...s,isActive:t}:s))}catch(e){console.log("Error updating connection status:",e)}},tV=async(e,t)=>{let s=[...h];[s[e],s[t]]=[s[t],s[e]],f(s);try{await Promise.all([fetch(`/api/providers/${s[e].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:e})}),fetch(`/api/providers/${s[t].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:t})})])}catch(e){console.log("Error swapping priority:",e),await tP()}},tZ=h.filter(e=>eb.includes(e.id)),tX=h.length>0&&eb.length===h.length;(0,i.useEffect)(()=>{ev(e=>e.filter(e=>h.some(t=>t.id===e)))},[h]),(()=>{if(0===tZ.length)return;let e=new Set(tZ.map(e=>e.providerSpecificData?.proxyPoolId||"__none__"));if(1===e.size){let t=[...e][0];if("__none__"===t)return;let s=j.find(e=>e.id===t);return s?.name}})();let tY=()=>{ek||es(!1)},t0=async(e,{mode:t}={})=>{eN(!0);try{let s=await fetch("/api/providers/bulk-proxy",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:u,mode:t||"single",proxyPoolId:e[0]?.proxyPoolId??null,connectionIds:e.map(e=>e.connectionId)})});if(s.ok){let e=await s.json().catch(()=>({}));Array.isArray(e.missing)&&e.missing.length>0&&alert(`Applied to ${e.updated} connection(s); ${e.missing.length} no longer exist.`)}else if(404===s.status||405===s.status)await t1(e);else{let e=await s.json().catch(()=>({}));alert(e.error||"Failed to apply proxy.")}await tP(),es(!1)}finally{eN(!1)}},t1=async e=>{let t=0;for(let{connectionId:s,proxyPoolId:a}of e)try{(await fetch(`/api/providers/${s}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:a})})).ok||(t+=1)}catch(e){console.log("Error applying proxy for",s,e),t+=1}t>0&&alert(`Updated with ${t} failed request(s).`)},t2=e=>t0(h.map(t=>({connectionId:t.id,proxyPoolId:e})),{mode:"single"}),t5=(0,a.jsx)("div",{className:"flex min-w-0 flex-col divide-y divide-black/[0.03] dark:divide-white/[0.03] max-h-[500px] overflow-y-auto pr-1",children:h.map((e,t)=>{let s;return(0,a.jsxs)("div",{className:"flex min-w-0 items-stretch",children:[(0,a.jsx)("div",{className:"flex shrink-0 items-center pl-1 sm:pl-2",children:(0,a.jsx)("input",{type:"checkbox",checked:(s=e.id,eb.includes(s)),onChange:()=>{var t;return t=e.id,void ev(e=>e.includes(t)?e.filter(e=>e!==t):[...e,t])},className:"h-4 w-4 rounded border-gray-300 text-primary focus:ring-primary"})}),(0,a.jsx)("div",{className:"flex-1 min-w-0",children:(0,a.jsx)(_,{connection:e,proxyPools:j,isOAuth:td,isFirst:0===t,isLast:t===h.length-1,onMoveUp:()=>tV(t,t-1),onMoveDown:()=>tV(t,t+1),onToggleActive:t=>tQ(e.id,t),autoPing:Y[u]&&"oauth"===e.authType?{on:!0===eI.connections[e.id],onToggle:t=>{var s;return s=e.id,void tz({...eI,connections:{...eI.connections,[s]:t}})},provider:u}:null,onUpdateProxy:async t=>{try{(await fetch(`/api/providers/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:t||null})})).ok&&f(s=>s.map(s=>s.id===e.id?{...s,providerSpecificData:{...s.providerSpecificData,proxyPoolId:t||null}}:s))}catch(e){console.log("Error updating proxy:",e)}},onEdit:()=>{ei(e),V(!0)},onDelete:()=>tW(e.id),oneByOneStatus:eY[e.id]||null})})]},e.id)})}),t3=j.filter(e=>!0===e.isActive),t4=(0,a.jsx)(c.aF,{isOpen:et,onClose:tY,title:`Apply Proxy (${h.length} connections)`,children:(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsxs)("button",{onClick:()=>{let e=j.filter(e=>!0===e.isActive);return 0===e.length?void alert("No active proxy pools available."):t0(h.map((t,s)=>({connectionId:t.id,proxyPoolId:e[s%e.length].id})),{mode:"one-to-one"})},disabled:ek||0===t3.length,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"sync_alt"}),(0,a.jsx)("span",{className:"text-sm text-text-main",children:"One-to-one (rotate)"})]}),(0,a.jsxs)("button",{onClick:()=>t2(null),disabled:ek,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"link_off"}),(0,a.jsx)("span",{className:"text-sm text-text-main",children:"None (unbind all)"})]}),j.map(e=>(0,a.jsxs)("button",{onClick:()=>t2(e.id),disabled:ek||!0!==e.isActive,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"lan"}),(0,a.jsx)("span",{className:"truncate text-sm text-text-main",children:e.name}),!0!==e.isActive&&(0,a.jsx)("span",{className:"text-[10px] text-text-muted",children:"(inactive)"})]},e.id))]}),ek&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Applying..."}),(0,a.jsx)(c.$n,{onClick:tY,variant:"ghost",fullWidth:!0,disabled:ek,children:"Cancel"})]})}),t6=async e=>{if(!eh.has(e)){ef(t=>new Set(t).add(e));try{let t=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${tw}/${e}`})}),s=await t.json();ep(t=>({...t,[e]:s.ok?"ok":"error"})),ex(s.ok?"":s.error||"Model not reachable")}catch{ep(t=>({...t,[e]:"error"})),ex("Network error")}finally{ef(t=>{let s=new Set(t);return s.delete(e),s})}}};if(g)return(0,a.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,a.jsx)(c.Qv,{}),(0,a.jsx)(c.Qv,{})]});if(!tn)return(0,a.jsxs)("div",{className:"text-center py-20",children:[(0,a.jsx)("p",{className:"text-text-muted",children:"Provider not found"}),(0,a.jsx)(n(),{href:"/dashboard/providers",className:"text-primary mt-4 inline-block",children:"Back to Providers"})]});let t8=()=>th&&tn.apiType?"responses"===tn.apiType?"/providers/oai-r.png":"/providers/oai-cc.png":tf?"/providers/anthropic-m.png":(0,d.HY)(tn.id);return(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-6 px-1 sm:gap-8 sm:px-0",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)(n(),{href:"/dashboard/providers",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary transition-colors mb-4",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),"Back to Providers"]}),(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-3 sm:gap-4",children:[(0,a.jsx)("div",{className:"flex size-12 shrink-0 items-center justify-center rounded-lg",style:{backgroundColor:`${tn.color}15`},children:ed||!t8()?(0,a.jsx)("span",{className:"text-sm font-bold",style:{color:tn.color},children:tn.textIcon||tn.id.slice(0,2).toUpperCase()}):(0,a.jsx)(o.A,{src:t8(),alt:tn.name,width:48,height:48,className:"max-h-12 max-w-12 rounded-lg object-contain",sizes:"48px",onError:()=>{(0,d.Kw)(tn.id),ec(!0)},loading:"lazy",decoding:"async"})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[(0,a.jsx)("h1",{className:"truncate text-2xl font-semibold tracking-tight sm:text-3xl",children:tn.name}),(tn.notice?.apiKeyUrl||tn.notice?.signupUrl||tn.website)&&(0,a.jsxs)("a",{href:tn.notice?.apiKeyUrl||tn.notice?.signupUrl||tn.website,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline inline-flex items-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),tn.notice?.apiKeyUrl?"Get API Key":"Sign up / Learn more"]})]}),(0,a.jsxs)("p",{className:"text-text-muted",children:[h.length," connection",1===h.length?"":"s"]})]})]})]}),tn.deprecated&&(0,a.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-yellow-500/10 border border-yellow-500/30",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-yellow-500 mt-0.5 shrink-0",children:"warning"}),(0,a.jsx)("p",{className:"text-xs text-red-600 dark:text-yellow-400 leading-relaxed",children:tn.deprecationNotice})]}),tn.notice?.text&&!tn.deprecated&&(0,a.jsxs)("div",{className:"flex flex-col gap-2 rounded-lg border border-blue-500/30 bg-blue-500/10 px-3 py-2 sm:flex-row sm:items-center",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-blue-500 shrink-0",children:"info"}),(0,a.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-blue-600 dark:text-blue-400",children:tn.notice.text}),tn.notice.apiKeyUrl&&(0,a.jsx)("a",{href:tn.notice.apiKeyUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-flex justify-center rounded bg-blue-500 px-2 py-1 text-xs font-medium text-white transition-colors hover:bg-blue-600 sm:py-0.5",children:"Get API Key →"})]}),tg&&b&&(0,a.jsx)(c.Zp,{children:(0,a.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:tf?"Anthropic Compatible Details":"OpenAI Compatible Details"}),(0,a.jsxs)("p",{className:"break-all text-sm text-text-muted",children:[tf?"Messages API":"responses"===b.apiType?"Responses API":"Chat Completions"," \xb7 ",(b.baseUrl||"").replace(/\/$/,""),"/",tf?"messages":"responses"===b.apiType?"responses":"chat/completions"]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,a.jsx)(c.$n,{size:"sm",icon:"add",onClick:()=>{U(""),z(!0)},className:"w-full sm:w-auto",children:"Add API Key"}),(0,a.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>ee(!0),className:"w-full sm:w-auto",children:"Edit"}),(0,a.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:async()=>{eJ({title:"Delete Compatible Node",message:`Delete this ${tf?"Anthropic":"OpenAI"} Compatible node?`,onConfirm:async()=>{eJ(null);try{(await fetch(`/api/provider-nodes/${u}`,{method:"DELETE"})).ok&&r.push("/dashboard/providers")}catch(e){console.log("Error deleting provider node:",e)}}})},className:"w-full sm:w-auto",children:"Delete"})]})]})}),tm?(0,a.jsx)(c.gw,{providerId:u}):(0,a.jsxs)(c.Zp,{children:[(0,a.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Connections"}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:flex-wrap sm:items-center sm:gap-4",children:[h.length>0&&j.length>0&&(0,a.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"lan",onClick:()=>es(!0),className:"whitespace-nowrap",children:"Apply Proxy"}),h.length>0&&(0,a.jsxs)(a.Fragment,{children:[eb.length>0&&(0,a.jsxs)(c.$n,{size:"sm",variant:"danger",icon:"delete",onClick:()=>{let e=eb.length;0!==e&&eJ({title:`Delete ${e} Connection${e>1?"s":""}`,message:`Delete ${e} connection${e>1?"s":""}? This cannot be undone.`,onConfirm:async()=>{eJ(null);let e=0,t=[...eb];for(let s of t)try{(await fetch(`/api/providers/${s}`,{method:"DELETE"})).ok||(e+=1)}catch(t){console.log("Error deleting connection:",t),e+=1}f(e=>e.filter(e=>!t.includes(e.id))),ev([]),e>0&&alert(`Deleted ${t.length-e} connection(s), ${e} failed.`)}})},className:"whitespace-nowrap",children:["Delete Selected (",eb.length,")"]}),(0,a.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"sync",onClick:tJ,disabled:eB,className:"whitespace-nowrap",children:eB?"Testing Connection One-by-One...":"Test Connection One-by-One"}),eB&&(0,a.jsx)(c.$n,{size:"sm",variant:"ghost",icon:"stop",onClick:()=>{eB&&(e5.current=!0,eV(!0))},className:"whitespace-nowrap",disabled:eQ,children:eQ?"Stopping...":"Stop"})]}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"Round Robin"}),(0,a.jsx)(c.lM,{checked:"round-robin"===eC,onChange:e=>{let t=e?"round-robin":null,s=e?eA||"1":eA;e&&!eA&&eT("1"),eS(t),tD(t,s)}}),"round-robin"===eC&&(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted",children:"Sticky:"}),(0,a.jsx)("input",{type:"number",min:1,value:eA,onChange:e=>{var t;eT(t=e.target.value),tD("round-robin",t)},placeholder:"1",className:"w-14 px-2 py-1 text-xs border border-border rounded-md bg-background focus:outline-none focus:border-primary"})]})]})]})]}),0===h.length?(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"inline-flex items-center justify-center w-9 h-9 rounded-full bg-primary/10 text-primary shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:td?"lock":"key"})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"No connections yet"}),ty&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Choose ",tb," or ",tv,"."]})]})]}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:ty?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(c.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:ti,className:"w-full sm:w-auto",children:tb}),(0,a.jsx)(c.$n,{size:"sm",icon:"key",onClick:tl,className:"w-full sm:w-auto",children:tv})]}):(0,a.jsxs)(a.Fragment,{children:[!tg&&"iflow"===u&&(0,a.jsx)(c.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>E(!0),children:"Cookie"}),"codex"===u&&(0,a.jsx)(c.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>J(!0),children:(0,S.Tl)("Bulk Add")}),"grok-cli"===u&&(0,a.jsx)(c.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>B(!0),children:(0,S.Tl)("Bulk Add")}),(0,a.jsx)(c.$n,{size:"sm",icon:"add",onClick:tr,children:tg?"Add API Key":"iflow"===u?"OAuth":"Add Connection"})]})})]}):(0,a.jsxs)(a.Fragment,{children:[e1&&(0,a.jsx)("div",{className:"mb-4 rounded-lg border border-black/10 bg-black/[0.02] px-3 py-2 text-xs text-text-muted dark:border-white/10 dark:bg-white/[0.03]",children:(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,a.jsxs)("span",{children:["Total: ",e1.total]}),(0,a.jsxs)("span",{children:["Completed: ",e1.completed]}),(0,a.jsxs)("span",{children:["Passed: ",e1.passed]}),(0,a.jsxs)("span",{children:["Failed: ",e1.failed]}),e1.stopped&&(0,a.jsx)("span",{className:"text-amber-600 dark:text-amber-400",children:"Stopped"}),eB&&eZ&&(0,a.jsxs)("span",{children:["Running: ",h.find(e=>e.id===eZ)?.name||eZ]})]})}),h.length>0&&(0,a.jsx)("div",{className:"mb-3 flex items-center gap-2 border-b border-black/[0.03] pb-2 dark:border-white/[0.03]",children:(0,a.jsxs)("label",{className:"flex cursor-pointer items-center gap-1.5 text-xs text-text-muted hover:text-primary",children:[(0,a.jsx)("input",{type:"checkbox",checked:tX,onChange:()=>{tX?ev([]):ev(h.map(e=>e.id))},className:"h-3.5 w-3.5 rounded border-gray-300 text-primary focus:ring-primary"}),"Select All"]})}),t5,!tg&&(0,a.jsxs)("div",{className:"mt-4 grid grid-cols-1 gap-2 sm:flex",children:["iflow"===u&&(0,a.jsx)(c.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>E(!0),title:"Add connection using browser cookie",className:"w-full sm:w-auto",children:"Cookie"}),"codex"===u&&(0,a.jsx)(c.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>J(!0),title:(0,S.Tl)("Bulk import codex accounts from JSON"),className:"w-full sm:w-auto",children:(0,S.Tl)("Bulk Add")}),"grok-cli"===u&&(0,a.jsx)(c.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>B(!0),title:(0,S.Tl)("Bulk import Grok CLI accounts from JSON"),className:"w-full sm:w-auto",children:(0,S.Tl)("Bulk Add")}),ty?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(c.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:ti,className:"w-full sm:w-auto",children:tb}),(0,a.jsx)(c.$n,{size:"sm",icon:"key",onClick:tl,className:"w-full sm:w-auto",children:tv})]}):(0,a.jsx)(c.$n,{size:"sm",icon:"add",onClick:tr,className:"w-full sm:w-auto",children:"Add"})]})]})]}),(0,a.jsx)(X,{providerId:u}),(0,a.jsxs)(c.Zp,{children:[(0,a.jsxs)("div",{className:"mb-4 flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Available Models"}),tk&&(0,a.jsx)("select",{value:e$,onChange:e=>{var t;eO(t=e.target.value),tR(t)},title:"Appends (level) suffix to copied model names",className:"rounded-md border border-border bg-background px-2 py-1 text-xs focus:border-primary focus:outline-none",children:tk.map(e=>(0,a.jsx)("option",{value:e,children:`Thinking: ${e.charAt(0).toUpperCase()+e.slice(1)}`},e))})]}),!tg&&(e=[...tu,...eU.filter(e=>!tu.some(t=>t.id===e.id))].filter(e=>{let t=(0,p.CP)(e);return!t||"llm"===t}).map(e=>e.id).filter(e=>!eK.includes(e)),t=("aihorde"===u||"opencode"===u)&&eE.length>0,(0,a.jsxs)("div",{className:"flex flex-wrap gap-2",children:[t&&(0,a.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"download",onClick:tK,disabled:e6,className:"whitespace-nowrap",children:e6?"Importing...":"Import from /models"}),eK.length>0&&(0,a.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"restart_alt",onClick:t$,className:"whitespace-nowrap",children:"Active All"}),e.length>0&&(0,a.jsx)(c.$n,{size:"sm",variant:"secondary",icon:"block",onClick:()=>tT(e),className:"whitespace-nowrap",children:"Disable All"})]}))]}),!!eu&&(0,a.jsx)("p",{className:"text-xs text-red-500 mb-3 break-words",children:eu}),"zed"===u&&!!eq&&(0,a.jsx)("p",{className:"text-xs text-red-500 mb-3 break-words",children:eq}),(()=>{let e,t,s;if(tg)return(0,a.jsx)(D,{providerStorageAlias:tw,providerDisplayAlias:tN,modelAliases:el,customModels:en,copied:te,onCopy:tt,onSetAlias:tq,onDeleteAlias:t_,onAddCustomModel:(e,t)=>tU(e,"llm",tw,t),onDeleteCustomModel:e=>tM(e,"llm",tw),connections:h,isAnthropic:tf});let i=[...tu,...eU.filter(e=>!tu.some(t=>t.id===e.id))].filter(e=>{let t=(0,p.CP)(e);return!t||"llm"===t}),l=new Set(eK),r=i.filter(e=>!l.has(e.id)),n=i.filter(e=>l.has(e.id)),o=(0,$.R)({customModels:en,modelAliases:el,providerAlias:tw,builtInModels:tu,type:"llm"});return(0,a.jsxs)("div",{className:"flex flex-wrap gap-3",children:[o.map(e=>(0,a.jsx)(P,{model:{id:e.id,name:e.name},fullModel:`${tN}/${e.id}`,alias:e.alias,copied:te,onCopy:tt,onSetAlias:()=>{},onDeleteAlias:()=>{"custom"===e.source?tM(e.id,"llm",tw):t_(e.alias)},testStatus:em[e.id],onTest:h.length>0||tm?()=>t6(e.id):void 0,isTesting:eh.has(e.id),isCustom:!0,isFree:!1,caps:e.caps||x(`${tw}/${e.id}`),thinkingSuffix:tj(e.id)},`${e.source}-${e.fullModel}`)),r.map(e=>{let t=`${tw}/${e.id}`,s=`${u}/${e.id}`,i=Object.entries(el).find(([,e])=>e===t||e===s)?.[0];return(0,a.jsx)(P,{model:e,fullModel:`${tN}/${e.id}`,alias:i,copied:te,onCopy:tt,onSetAlias:t=>tq(e.id,t,tw),onDeleteAlias:()=>t_(i),testStatus:em[e.id],onTest:h.length>0||tm?()=>t6(e.id):void 0,isTesting:eh.has(e.id),isFree:e.isFree,onDisable:()=>tS(e.id),caps:x(`${u}/${e.id}`),thinkingSuffix:tj(e.id)},e.id)}),(0,a.jsxs)("button",{onClick:()=>ey(!0),className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-primary/40 px-3 py-2 text-xs text-primary transition-colors hover:border-primary hover:bg-primary/5 sm:w-auto",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"}),"Add Model"]}),("qoder"===u||"qoder-cn"===u)&&h.some(e=>!1!==e.isActive)&&(0,a.jsxs)("button",{onClick:tF,disabled:e3,className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-blue-500/40 px-3 py-2 text-xs text-blue-600 dark:text-blue-400 transition-colors hover:border-blue-500 hover:bg-blue-500/5 sm:w-auto disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",style:e3?{animation:"spin 1s linear infinite"}:void 0,children:e3?"progress_activity":"download"}),e3?(0,S.Tl)("Fetching..."):(0,S.Tl)("Fetch Qoder Models")]}),("cline"===u||"clinepass"===u)&&h.some(e=>!1!==e.isActive)&&(0,a.jsxs)("button",{onClick:tL,disabled:e7,className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-blue-500/40 px-3 py-2 text-xs text-blue-600 dark:text-blue-400 transition-colors hover:border-blue-500 hover:bg-blue-500/5 sm:w-auto disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",style:e7?{animation:"spin 1s linear infinite"}:void 0,children:e7?"progress_activity":"download"}),e7?(0,S.Tl)("Fetching..."):(0,S.Tl)("Import from /models")]}),eE.length>0&&(e=new Set([...Object.values(el),...o.map(e=>e.fullModel)]),t=new Set(tu.map(e=>e.id)),0===(s=eE.filter(s=>!e.has(`${tw}/${s.id}`)&&!t.has(s.id))).length?null:(0,a.jsxs)("div",{className:"w-full mt-2",children:[(0,a.jsx)("p",{className:"text-xs text-text-muted mb-2",children:"Suggested free models (≥200k context):"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:s.map(e=>(0,a.jsxs)("button",{onClick:async()=>{await tU(e.id,"llm",tw,e.caps)},className:"flex items-center gap-1 px-2.5 py-1.5 rounded-lg border border-black/10 dark:border-white/10 text-xs text-text-muted hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-colors",title:e.contextLength?`${e.name} \xb7 ${(e.contextLength/1e3).toFixed(0)}k ctx`:e.name,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),e.id.split("/").pop()]},e.id))})]})),n.length>0&&(0,a.jsxs)("div",{className:"w-full mt-2",children:[(0,a.jsxs)("p",{className:"text-xs text-text-muted mb-2",children:["Disabled models (",n.length,"):"]}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:n.map(e=>(0,a.jsxs)("button",{onClick:()=>tA(e.id),className:"flex items-center gap-1 px-2.5 py-1.5 rounded-lg border border-dashed border-black/10 dark:border-white/10 text-xs text-text-muted hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-colors",title:"Restore model",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),e.id]},e.id))})]})]})})()]}),t4,"kiro"===u?(0,a.jsx)(c.Mh,{isOpen:A,providerInfo:tn,onSuccess:tH,onClose:()=>O(!1)}):"cursor"===u?(0,a.jsx)(c.G9,{isOpen:A,onSuccess:tH,onClose:()=>O(!1)}):"zed"===u?(0,a.jsx)(c.TE,{isOpen:A,providerInfo:tn,onSuccess:tH,onClose:()=>O(!1)}):"gitlab"===u?(0,a.jsx)(c.vj,{isOpen:A,providerInfo:tn,onSuccess:tH,onClose:()=>O(!1)}):(0,a.jsx)(c.LF,{isOpen:A,provider:u,providerInfo:tn,onSuccess:tH,onClose:()=>O(!1)}),"iflow"===u&&(0,a.jsx)(c.vE,{isOpen:I,onSuccess:()=>{tP(),E(!1)},onClose:()=>E(!1)}),(0,a.jsx)(M,{isOpen:R,provider:u,providerName:tn.name,isCompatible:tg,isAnthropic:tf,authType:tn?.authType,authHint:tn?.authHint,website:tn?.website,proxyPools:j,error:q,existingNames:h.map(e=>e.name).filter(Boolean),onSave:tB,onBulkDone:tP,onClose:()=>{U(""),z(!1)}}),(0,a.jsx)(c.wI,{isOpen:Q,connection:ea,proxyPools:j,onSave:tG,onClose:()=>V(!1)}),tg&&(0,a.jsx)(K,{isOpen:Z,node:b,onSave:tE,onClose:()=>ee(!1),isAnthropic:tf}),!tg&&(0,a.jsx)(L,{isOpen:eg,providerAlias:tw,providerDisplayAlias:tN,onSave:async(e,t,s)=>{await tU(e,t?.stt?"stt":"llm",tw,t,s),ey(!1)},onClose:()=>ey(!1)}),"codex"===u&&(0,a.jsx)(W,{isOpen:F,onClose:()=>J(!1),onSuccess:tP}),"grok-cli"===u&&(0,a.jsx)(G,{isOpen:H,onClose:()=>B(!1),onSuccess:tP}),(0,a.jsx)(c.uo,{isOpen:eW,onClose:()=>eH(!1),onConfirm:()=>{(window.localStorage.setItem(ts,"true"),eH(!1),td)?ta():tl()},title:"Risk Notice",message:tn?.deprecationNotice,confirmText:"I Understand, Continue",cancelText:"Cancel",variant:"danger"}),(0,a.jsx)(c.uo,{isOpen:!!eL,onClose:()=>eJ(null),onConfirm:eL?.onConfirm,title:eL?.title||"Confirm",message:eL?.message,variant:"danger"})]})}},70217:(e,t,s)=>{"use strict";function a(e,t){return!1===e?"default":"active"===t||"success"===t?"success":"error"===t||"expired"===t||"unavailable"===t?"error":"default"}s.d(t,{g:()=>a})},82837:(e,t,s)=>{Promise.resolve().then(s.bind(s,56828))}},e=>{e.O(0,[763,5772,8105,620,705,5497,8441,3794,7358],()=>e(e.s=82837)),_N_E=e.O()}]);
|