@jheavenknows/bluerouter 1.0.89 → 1.0.94
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 +5 -4
- package/app/.next-cli-build/build-manifest.json +2 -2
- package/app/.next-cli-build/prerender-manifest.json +3 -3
- package/app/.next-cli-build/routes-manifest.json +6 -0
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +3 -3
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +3 -3
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/prompt-logs/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/prompt-logs/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/prompt-logs/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/provider-health/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/provider-health/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/provider-health/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +3 -3
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +3 -3
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_global-error/page.js +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/_global-error.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_not-found/page.js +2 -2
- package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_not-found.html +1 -1
- package/app/.next-cli-build/server/app/_not-found.rsc +4 -4
- package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/api/auth/ldap/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/ldap/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/ldap/users/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/ldap/users/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/status/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +4 -4
- package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/autostart/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/autostart/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/prompt-log-db/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/prompt-log-db/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/root-ca/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/root-ca/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +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/droid-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
- package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/[id]/route.js +1 -81
- package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/options/route.js +1 -0
- package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/options/route.js.nft.json +1 -0
- package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/options/route_client-reference-manifest.js +1 -0
- package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/route.js +1 -81
- package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/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/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/import-token/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +2 -2
- package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/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/social-authorize/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
- package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-health/route.js +1 -1
- package/app/.next-cli-build/server/app/api/provider-health/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +2 -2
- package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +2 -2
- package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +2 -2
- package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
- package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
- package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/shutdown/route.js +1 -1
- package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tags/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
- package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +3 -3
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-login/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-login/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-start-daemon/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-start-daemon/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/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 +1 -1
- package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/version/restart/route.js +1 -1
- package/app/.next-cli-build/server/app/api/version/restart/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/version/route.js +1 -1
- package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
- package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
- package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/callback/page.js +2 -2
- package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/callback.html +1 -1
- package/app/.next-cli-build/server/app/callback.rsc +4 -4
- package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_index.segment.rsc +4 -4
- 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 +6 -6
- package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_index.segment.rsc +4 -4
- 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 +3 -3
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_index.segment.rsc +4 -4
- 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 +2 -2
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +4 -4
- 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 +6 -6
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_index.segment.rsc +4 -4
- 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 +5 -5
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/prompt-logs.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/prompt-logs.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/!KGRhc2hib2FyZCk/dashboard/prompt-logs/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/!KGRhc2hib2FyZCk/dashboard/prompt-logs.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/provider-health.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/provider-health.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/provider-health.segments/!KGRhc2hib2FyZCk/dashboard/provider-health/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/provider-health.segments/!KGRhc2hib2FyZCk/dashboard/provider-health.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/provider-health.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/provider-health.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/provider-health.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/provider-health.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/provider-health.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/provider-health.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 +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_index.segment.rsc +4 -4
- 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 +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_index.segment.rsc +4 -4
- 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 +2 -2
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/quota.html +2 -2
- package/app/.next-cli-build/server/app/dashboard/quota.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +2 -2
- package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/skills.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 +6 -6
- package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_index.segment.rsc +4 -4
- 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 +6 -6
- package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_index.segment.rsc +4 -4
- 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 +6 -6
- package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard.segments/_index.segment.rsc +4 -4
- 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 +4 -4
- package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/landing/page.js +2 -2
- package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/landing.html +1 -1
- package/app/.next-cli-build/server/app/landing.rsc +4 -4
- package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/login/page.js +2 -2
- package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/login.html +1 -1
- package/app/.next-cli-build/server/app/login.rsc +4 -4
- package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +4 -4
- 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 +1 -1
- package/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/manifest.webmanifest/route.js +2 -2
- package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/page.js +2 -2
- package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app-paths-manifest.json +5 -4
- package/app/.next-cli-build/server/chunks/3110.js +1 -1
- package/app/.next-cli-build/server/chunks/4746.js +1 -1
- package/app/.next-cli-build/server/chunks/6108.js +1 -1
- package/app/.next-cli-build/server/chunks/6604.js +1 -1
- package/app/.next-cli-build/server/chunks/7130.js +1 -1
- package/app/.next-cli-build/server/chunks/7153.js +1 -1
- package/app/.next-cli-build/server/chunks/7242.js +81 -0
- package/app/.next-cli-build/server/chunks/8491.js +2 -2
- package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
- package/app/.next-cli-build/server/middleware.js +1 -1
- package/app/.next-cli-build/server/pages/404.html +1 -1
- package/app/.next-cli-build/server/pages/500.html +1 -1
- package/app/.next-cli-build/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/2wVbBRo5vqEo1H7lnZ4Br/_buildManifest.js +1 -0
- package/app/.next-cli-build/static/chunks/{1321-5219c9cd6470007e.js → 1321-95cfda023590b661.js} +1 -1
- package/app/.next-cli-build/static/chunks/4288-6abec21269cb069a.js +64 -0
- package/app/.next-cli-build/static/chunks/8500-f62a38ff68ab7f42.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/basic-chat/{page-1b2283499089d7dc.js → page-782bbed51a1d07eb.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/{page-1adaf9be4107d227.js → page-a292301b8b48ef83.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/{page-85cb2bafe0526c5d.js → page-8ad96767b17e1927.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/{page-82be3137baaf2025.js → page-eb9021fb6f29af9f.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/{page-d26b9256cf41fb19.js → page-f1374ae2a282dad8.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/{page-e0b4284d8e973996.js → page-3dbf8ec9932781b6.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/{page-4377fb8d824f5bde.js → page-6d9c6db190394765.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/{page-3cf8e9de4ed5bf33.js → page-752ab915a6ff4667.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/combo/[id]/{page-b2b612e7dedabef1.js → page-7a79761f2d99ef4f.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/web/{page-356120709e5a1a94.js → page-2bff0a674207059c.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/{page-161edd90803b7184.js → page-f05795e77fee5793.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/{page-5e2bec66810c6089.js → page-22722a6c1a7dd8b1.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/prompt-logs/page-8ac96eee4d4039bd.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/{page-2e7e458a07d9bff6.js → page-16420e5af81379e8.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/new/{page-009821d1edc5606b.js → page-055466baadc14356.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/{page-0cf8abbb69a8a288.js → page-665d20d11df80056.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/proxy-pools/{page-0e356884dbb16e9e.js → page-45282c7ec724a7d4.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/{page-383255c4b63ebf3b.js → page-c391079554415d2f.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/{page-de03c9c19092784e.js → page-506f34296b69aa15.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/translator/{page-fdac9423efa73ccd.js → page-cf56a227a13523f9.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/{page-a4e4500cdae96c24.js → page-549cd9fef3803dcb.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/{layout-3a946e00857971ef.js → layout-6402a1623c681e71.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/_global-error/page-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/ldap/test/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/ldap/users/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/login/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/status/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/autostart/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/prompt-log-db/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/root-ca/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/combos/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/dashboard/prompt-logs/[id]/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/dashboard/prompt-logs/options/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/dashboard/prompt-logs/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/health/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/init/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/keys/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/locale/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/alias/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/availability/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/custom/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/test/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pricing/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-health/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/client/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/database/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/shutdown/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tags/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/load/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/save/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/send/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-login/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-start-daemon/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/history/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/models/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/search/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/version/restart/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/version/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/version/update/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/app/page-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-5aa237cf23fbbc99.js +1 -0
- package/app/.next-cli-build/static/css/81f84900c1e2a106.css +1 -0
- package/app/cli/.build-home/AppData/Roaming/nextjs-nodejs/Config/config.json +3 -3
- package/app/package.json +1 -1
- package/package.json +1 -1
- package/app/.next-cli-build/static/chunks/1051-eec0f271123ef82f.js +0 -64
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/prompt-logs/page-51f32ade40c03a33.js +0 -1
- package/app/.next-cli-build/static/chunks/app/_global-error/page-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/ldap/test/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/ldap/users/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/login/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/status/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/autostart/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/prompt-log-db/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/root-ca/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/combos/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/dashboard/prompt-logs/[id]/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/dashboard/prompt-logs/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/health/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/init/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/keys/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/locale/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/alias/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/availability/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/custom/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/test/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pricing/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-health/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/client/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/database/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/shutdown/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tags/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/load/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/save/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/send/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-login/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-start-daemon/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/history/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/models/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/search/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/version/restart/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/version/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/version/update/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/app/page-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-06c52ffae3497d9a.js +0 -1
- package/app/.next-cli-build/static/css/3a67cc4681c0b941.css +0 -1
- package/app/.next-cli-build/static/fxI7BigXZpXvax9V2TOCV/_buildManifest.js +0 -1
- package/app/cli/.build-home/AppData/Roaming/bluerouter/db/backups/upgrade-1.0.86-to-1.0.87-1.0.87-20260609-093407/data.sqlite +0 -0
- package/app/cli/.build-home/AppData/Roaming/bluerouter/db/backups/upgrade-1.0.87-to-1.0.88-1.0.88-20260609-093623/data.sqlite +0 -0
- package/app/cli/.build-home/AppData/Roaming/bluerouter/db/data.sqlite +0 -0
- package/app/cli/.build-home/AppData/Roaming/bluerouter/db/data.sqlite-shm +0 -0
- package/app/cli/.build-home/AppData/Roaming/bluerouter/db/data.sqlite-wal +0 -0
- package/app/cli/.build-home/AppData/Roaming/bluerouter/jwt-secret +0 -1
- package/app/cli/.build-home/AppData/Roaming/bluerouter/machine-id +0 -1
- /package/app/.next-cli-build/static/{fxI7BigXZpXvax9V2TOCV → 2wVbBRo5vqEo1H7lnZ4Br}/_ssgManifest.js +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8334],{22662:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>b});var a=s(95155),l=s(73321),r=s(12115),i=s(98500),n=s.n(i),o=s(35497),c=s(57250),d=s(52679);let m=/^[a-zA-Z0-9_.\-]+$/,x={webSearch:"Web Search",webFetch:"Web Fetch",image:"Text to Image",tts:"Text To Speech"},h={webSearch:"/v1/search",webFetch:"/v1/web/fetch",image:"/v1/images/generations",tts:"/v1/audio/speech"},u={webSearch:e=>({model:e,query:"What is the latest news about AI?",search_type:"web",max_results:5}),webFetch:e=>({model:e,url:"https://example.com",format:"markdown"}),image:e=>({model:e,prompt:"A cute cat playing piano",n:1,size:"1024x1024"}),tts:e=>({model:e,input:"Hello, this is a test.",voice:"alloy"})};function p(e){return"webSearch"===e||"webFetch"===e?"/dashboard/media-providers/web":`/dashboard/media-providers/${e}`}function b(){let{id:e}=(0,l.useParams)(),t=(0,l.useRouter)(),[s,i]=(0,r.useState)(null),[b,f]=(0,r.useState)(!0),[j,g]=(0,r.useState)(""),[w,y]=(0,r.useState)(""),[v,N]=(0,r.useState)([]),[k,S]=(0,r.useState)(!1),[U,$]=(0,r.useState)(!1),[C,O]=(0,r.useState)([]),[_,T]=(0,r.useState)(!1),[R,A]=(0,r.useState)(null),[L,P]=(0,r.useState)(""),[E,z]=(0,r.useState)(""),[D,F]=(0,r.useState)([]),[M,I]=(0,r.useState)({}),J=async()=>{try{let[t,s,a,l,r,n]=await Promise.all([fetch(`/api/combos/${e}`,{cache:"no-store"}),fetch("/api/settings",{cache:"no-store"}),fetch("/api/usage/logs",{cache:"no-store"}),fetch("/api/keys",{cache:"no-store"}),fetch("/api/providers",{cache:"no-store"}),fetch("/api/models/alias",{cache:"no-store"})]);if(n.ok&&I((await n.json()).aliases||{}),l.ok){let e=await l.json();z((e.keys||[]).find(e=>!1!==e.isActive)?.key||"")}if(r.ok&&F((await r.json()).connections||[]),!t.ok){i(null),f(!1);return}let o=await t.json();i(o),g(o.name),N(o.models||[]);let c=s.ok?await s.json():{};S(c.comboStrategies?.[o.name]?.fallbackStrategy==="round-robin");let d=a.ok?await a.json():[];O(d.filter(e=>"string"==typeof e&&e.includes(o.name)).slice(0,50))}catch{}f(!1)};(0,r.useEffect)(()=>{J()},[e]);let W=e=>e.trim()?m.test(e)?(y(""),!0):(y("Only letters, numbers, -, _ and ."),!1):(y("Name is required"),!1),H=async t=>{let s=await fetch(`/api/combos/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});return!!s.ok||(alert((await s.json()).error||"Failed to save"),!1)},Z=async()=>{!W(j)||j===s.name||await H({name:j})&&await J()},q=async e=>{let t=e?.value||e;if(!t||v.includes(t))return;let s=[...v,t];N(s),await H({models:s})},B=async e=>{let t=e?.value||e;if(!t||!v.includes(t))return;let s=v.filter(e=>e!==t);N(s),await H({models:s})},Y=async e=>{let t=v.filter((t,s)=>s!==e);N(t),await H({models:t})},G=async(e,t)=>{let s=[...v],a=e+t;a<0||a>=s.length||([s[e],s[a]]=[s[a],s[e]],N(s),await H({models:s}))},K=async e=>{S(e);let t=await fetch("/api/settings",{cache:"no-store"}),a={...(t.ok?await t.json():{}).comboStrategies||{}};e?a[s.name]={fallbackStrategy:"round-robin"}:delete a[s.name],await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStrategies:a})})},Q=async()=>{!confirm(`Delete combo "${s.name}"?`)||(await fetch(`/api/combos/${e}`,{method:"DELETE"})).ok&&t.push(p(s.kind))},V=async()=>{if(T(!0),A(null),P(""),R?.audioUrl)try{URL.revokeObjectURL(R.audioUrl)}catch{}if(R?.imageUrl?.startsWith("blob:"))try{URL.revokeObjectURL(R.imageUrl)}catch{}let e=Date.now();try{let t=h[s.kind],a=u[s.kind](s.name),l={"Content-Type":"application/json"};E&&(l.Authorization=`Bearer ${E}`);let r=await fetch(`/api${t}`,{method:"POST",headers:l,body:JSON.stringify(a)}),i=Date.now()-e;if(!r.ok){let e=await r.json().catch(()=>({}));P(e?.error?.message||e?.error||`HTTP ${r.status}`),A({json:JSON.stringify(e,null,2),latencyMs:i});return}let n=r.headers.get("content-type")||"";if(n.startsWith("image/")){let e=await r.blob();A({imageUrl:URL.createObjectURL(e),latencyMs:i});return}if(n.startsWith("audio/")||"application/octet-stream"===n){let e=await r.blob();A({audioUrl:URL.createObjectURL(e),latencyMs:i});return}let o=await r.json(),c=o?.data?.[0],d=c?.b64_json?`data:image/png;base64,${c.b64_json}`:c?.url||"";A({json:JSON.stringify(function e(t){if(!t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(e);let s={};for(let[a,l]of Object.entries(t))s[a]="b64_json"===a&&"string"==typeof l&&l.length>100?`<${l.length} chars base64>`:e(l);return s}(o),null,2),imageUrl:d,latencyMs:i})}catch(e){P(e.message||"Network error")}T(!1)};if(b)return(0,a.jsx)("div",{className:"text-text-muted text-sm",children:"Loading..."});if(!s)return(0,l.notFound)();let X=x[s.kind]||d.rj.find(e=>e.id===s.kind)?.label||"Combo",ee=h[s.kind],et=s.kind&&u[s.kind]?u[s.kind](s.name):null,es=ee?`curl -X POST http://localhost:20128${ee} \\
|
|
2
2
|
-H "Content-Type: application/json" \\
|
|
3
3
|
-H "Authorization: Bearer ${E||"YOUR_KEY"}" \\
|
|
4
|
-
-d '${JSON.stringify(et)}'`:"",ea=p(s.kind);return(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 min-w-0",children:[(0,a.jsx)(n(),{href:ea,className:"text-text-muted hover:text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined",children:"arrow_back"})}),(0,a.jsx)("div",{className:"size-10 rounded-lg bg-primary/10 flex items-center justify-center",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-primary",children:"layers"})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:[X," Combo"]}),(0,a.jsx)("code",{className:"text-lg font-semibold font-mono",children:s.name})]})]}),(0,a.jsx)(o.$n,{variant:"outline",icon:"delete",onClick:Q,className:"text-red-500 border-red-200 hover:bg-red-50",children:"Delete"})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold mb-3",children:"Settings"}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(o.pd,{label:"Combo Name",value:j,onChange:e=>{g(e.target.value),W(e.target.value)},onBlur:Z,error:w}),(0,a.jsx)("p",{className:"text-[10px] text-text-muted mt-0.5",children:"Only letters, numbers, -, _ and ."})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:"Round Robin"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Rotate providers across requests instead of strict fallback order."})]}),(0,a.jsx)(o.lM,{checked:k,onChange:K})]})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Providers"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Tried in order (top-down) or rotated when round-robin is on."})]}),(0,a.jsx)(o.$n,{size:"sm",icon:"add",onClick:()=>$(!0),children:"Add Provider"})]}),0===v.length?(0,a.jsx)("div",{className:"text-center py-6 border border-dashed border-border rounded-lg text-text-muted text-sm",children:"No providers yet."}):(0,a.jsx)("div",{className:"flex flex-col gap-2",children:v.map((e,t)=>{let{providerId:s,model:l}=function(e){if("string"!=typeof e)return{providerId:"",model:""};let t=e.indexOf("/");return t<0?{providerId:e,model:""}:{providerId:e.slice(0,t),model:e.slice(t+1)}}(e),r=d.Q2[s];return(0,a.jsxs)("div",{className:"flex items-center gap-3 p-2 rounded-lg bg-black/[0.02] dark:bg-white/[0.02]",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted w-5 text-center",children:t+1}),(0,a.jsx)(c.A,{src:`/providers/${s}.png`,alt:r?.name||s,size:24,className:"object-contain rounded shrink-0",fallbackText:r?.textIcon||s.slice(0,2).toUpperCase(),fallbackColor:r?.color}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("div",{className:"text-sm font-medium truncate",children:r?.name||s}),l&&(0,a.jsx)("code",{className:"text-[10px] text-text-muted font-mono truncate block",children:l})]}),(0,a.jsxs)("div",{className:"flex items-center gap-0.5",children:[(0,a.jsx)("button",{onClick:()=>G(t,-1),disabled:0===t,className:`p-1 rounded ${0===t?"text-text-muted/20":"text-text-muted hover:text-primary hover:bg-black/5"}`,title:"Move up",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"arrow_upward"})}),(0,a.jsx)("button",{onClick:()=>G(t,1),disabled:t===v.length-1,className:`p-1 rounded ${t===v.length-1?"text-text-muted/20":"text-text-muted hover:text-primary hover:bg-black/5"}`,title:"Move down",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"arrow_downward"})}),(0,a.jsx)("button",{onClick:()=>Y(t),className:"p-1 rounded text-text-muted hover:text-red-500 hover:bg-red-500/10",title:"Remove",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"close"})})]})]},`${e}-${t}`)})})]}),s.kind&&ee&&(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-3",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Test Example"}),(0,a.jsx)(o.$n,{size:"sm",icon:"play_arrow",onClick:V,disabled:_||0===v.length,children:_?"Running...":"Run"})]}),(0,a.jsx)("pre",{className:"text-xs font-mono bg-black/[0.03] dark:bg-white/[0.03] p-3 rounded-lg overflow-x-auto whitespace-pre-wrap break-all",children:es}),L&&(0,a.jsx)("p",{className:"mt-3 text-xs text-red-500 break-words",children:L}),R&&(0,a.jsxs)("div",{className:"mt-3 flex flex-col gap-3",children:[null!=R.latencyMs&&(0,a.jsxs)("span",{className:"text-[11px] text-text-muted",children:["⚡ ",R.latencyMs,"ms"]}),R.imageUrl&&(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"flex items-center justify-end mb-1.5",children:(0,a.jsxs)("a",{href:R.imageUrl,download:"image.png",className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"download"}),"Download"]})}),(0,a.jsx)("img",{src:R.imageUrl,alt:"Generated",className:"max-w-full rounded-lg border border-border"})]}),R.audioUrl&&(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"flex items-center justify-end mb-1.5",children:(0,a.jsxs)("a",{href:R.audioUrl,download:"speech.mp3",className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"download"}),"Download"]})}),(0,a.jsx)("audio",{controls:!0,src:R.audioUrl,className:"w-full"})]}),R.json&&(0,a.jsx)("pre",{className:"text-xs font-mono bg-black/[0.03] dark:bg-white/[0.03] p-3 rounded-lg overflow-auto max-h-[300px] whitespace-pre-wrap break-all",children:R.json})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold mb-3",children:"Usage Logs"}),0===C.length?(0,a.jsx)("p",{className:"text-xs text-text-muted italic",children:"No usage yet."}):(0,a.jsx)("pre",{className:"text-[11px] font-mono bg-black/[0.03] dark:bg-white/[0.03] p-3 rounded-lg overflow-auto max-h-[400px] whitespace-pre-wrap",children:C.join("\n")})]}),(0,a.jsx)(o.rq,{isOpen:U,onClose:()=>$(!1),onSelect:q,onDeselect:B,activeProviders:D,modelAliases:M,title:`Add ${X} Model`,kindFilter:s.kind,addedModelValues:v,closeOnSelect:!1})]})}},70878:(e,t,s)=>{Promise.resolve().then(s.bind(s,22662))}},e=>{e.O(0,[2574,3862,
|
|
4
|
+
-d '${JSON.stringify(et)}'`:"",ea=p(s.kind);return(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 min-w-0",children:[(0,a.jsx)(n(),{href:ea,className:"text-text-muted hover:text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined",children:"arrow_back"})}),(0,a.jsx)("div",{className:"size-10 rounded-lg bg-primary/10 flex items-center justify-center",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-primary",children:"layers"})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:[X," Combo"]}),(0,a.jsx)("code",{className:"text-lg font-semibold font-mono",children:s.name})]})]}),(0,a.jsx)(o.$n,{variant:"outline",icon:"delete",onClick:Q,className:"text-red-500 border-red-200 hover:bg-red-50",children:"Delete"})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold mb-3",children:"Settings"}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(o.pd,{label:"Combo Name",value:j,onChange:e=>{g(e.target.value),W(e.target.value)},onBlur:Z,error:w}),(0,a.jsx)("p",{className:"text-[10px] text-text-muted mt-0.5",children:"Only letters, numbers, -, _ and ."})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:"Round Robin"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Rotate providers across requests instead of strict fallback order."})]}),(0,a.jsx)(o.lM,{checked:k,onChange:K})]})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Providers"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Tried in order (top-down) or rotated when round-robin is on."})]}),(0,a.jsx)(o.$n,{size:"sm",icon:"add",onClick:()=>$(!0),children:"Add Provider"})]}),0===v.length?(0,a.jsx)("div",{className:"text-center py-6 border border-dashed border-border rounded-lg text-text-muted text-sm",children:"No providers yet."}):(0,a.jsx)("div",{className:"flex flex-col gap-2",children:v.map((e,t)=>{let{providerId:s,model:l}=function(e){if("string"!=typeof e)return{providerId:"",model:""};let t=e.indexOf("/");return t<0?{providerId:e,model:""}:{providerId:e.slice(0,t),model:e.slice(t+1)}}(e),r=d.Q2[s];return(0,a.jsxs)("div",{className:"flex items-center gap-3 p-2 rounded-lg bg-black/[0.02] dark:bg-white/[0.02]",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted w-5 text-center",children:t+1}),(0,a.jsx)(c.A,{src:`/providers/${s}.png`,alt:r?.name||s,size:24,className:"object-contain rounded shrink-0",fallbackText:r?.textIcon||s.slice(0,2).toUpperCase(),fallbackColor:r?.color}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("div",{className:"text-sm font-medium truncate",children:r?.name||s}),l&&(0,a.jsx)("code",{className:"text-[10px] text-text-muted font-mono truncate block",children:l})]}),(0,a.jsxs)("div",{className:"flex items-center gap-0.5",children:[(0,a.jsx)("button",{onClick:()=>G(t,-1),disabled:0===t,className:`p-1 rounded ${0===t?"text-text-muted/20":"text-text-muted hover:text-primary hover:bg-black/5"}`,title:"Move up",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"arrow_upward"})}),(0,a.jsx)("button",{onClick:()=>G(t,1),disabled:t===v.length-1,className:`p-1 rounded ${t===v.length-1?"text-text-muted/20":"text-text-muted hover:text-primary hover:bg-black/5"}`,title:"Move down",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"arrow_downward"})}),(0,a.jsx)("button",{onClick:()=>Y(t),className:"p-1 rounded text-text-muted hover:text-red-500 hover:bg-red-500/10",title:"Remove",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"close"})})]})]},`${e}-${t}`)})})]}),s.kind&&ee&&(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-3",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Test Example"}),(0,a.jsx)(o.$n,{size:"sm",icon:"play_arrow",onClick:V,disabled:_||0===v.length,children:_?"Running...":"Run"})]}),(0,a.jsx)("pre",{className:"text-xs font-mono bg-black/[0.03] dark:bg-white/[0.03] p-3 rounded-lg overflow-x-auto whitespace-pre-wrap break-all",children:es}),L&&(0,a.jsx)("p",{className:"mt-3 text-xs text-red-500 break-words",children:L}),R&&(0,a.jsxs)("div",{className:"mt-3 flex flex-col gap-3",children:[null!=R.latencyMs&&(0,a.jsxs)("span",{className:"text-[11px] text-text-muted",children:["⚡ ",R.latencyMs,"ms"]}),R.imageUrl&&(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"flex items-center justify-end mb-1.5",children:(0,a.jsxs)("a",{href:R.imageUrl,download:"image.png",className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"download"}),"Download"]})}),(0,a.jsx)("img",{src:R.imageUrl,alt:"Generated",className:"max-w-full rounded-lg border border-border"})]}),R.audioUrl&&(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"flex items-center justify-end mb-1.5",children:(0,a.jsxs)("a",{href:R.audioUrl,download:"speech.mp3",className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"download"}),"Download"]})}),(0,a.jsx)("audio",{controls:!0,src:R.audioUrl,className:"w-full"})]}),R.json&&(0,a.jsx)("pre",{className:"text-xs font-mono bg-black/[0.03] dark:bg-white/[0.03] p-3 rounded-lg overflow-auto max-h-[300px] whitespace-pre-wrap break-all",children:R.json})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold mb-3",children:"Usage Logs"}),0===C.length?(0,a.jsx)("p",{className:"text-xs text-text-muted italic",children:"No usage yet."}):(0,a.jsx)("pre",{className:"text-[11px] font-mono bg-black/[0.03] dark:bg-white/[0.03] p-3 rounded-lg overflow-auto max-h-[400px] whitespace-pre-wrap",children:C.join("\n")})]}),(0,a.jsx)(o.rq,{isOpen:U,onClose:()=>$(!1),onSelect:q,onDeselect:B,activeProviders:D,modelAliases:M,title:`Add ${X} Model`,kindFilter:s.kind,addedModelValues:v,closeOnSelect:!1})]})}},70878:(e,t,s)=>{Promise.resolve().then(s.bind(s,22662))}},e=>{e.O(0,[2574,3862,8500,4288,1321,5497,8441,3794,7358],()=>e(e.s=70878)),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9260],{41347:(e,s,t)=>{Promise.resolve().then(t.bind(t,71088))},71088:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>b});var r=t(95155),a=t(98500),i=t.n(a),l=t(12115),o=t(73321),c=t(35497),n=t(57250),d=t(52679);function m(e){let s=Object.entries(e).some(([e,s])=>e.startsWith("modelLock_")&&s&&new Date(s).getTime()>Date.now());return"unavailable"!==e.testStatus||s?e.testStatus:"active"}function x({provider:e,kind:s,connections:t}){let a=d.Q2[e.id],l=!!a?.noAuth,o=t.filter(s=>s.provider===e.id),h=o.filter(e=>{let s=m(e);return"active"===s||"success"===s}).length,p=o.filter(e=>{let s=m(e);return"error"===s||"expired"===s||"unavailable"===s}).length,b=o.length,u=b>0&&o.every(e=>!1===e.isActive);return(0,r.jsx)(i(),{href:`/dashboard/media-providers/${s}/${e.id}`,className:"group",children:(0,r.jsx)(c.Zp,{padding:"xs",className:`h-full hover:bg-black/[0.01] dark:hover:bg-white/[0.01] transition-colors cursor-pointer ${u?"opacity-50":""}`,children:(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,r.jsx)("div",{className:"size-8 rounded-lg flex items-center justify-center shrink-0",style:{backgroundColor:`${e.color?.length>7?e.color:(e.color??"#888")+"15"}`},children:(0,r.jsx)(n.A,{src:`/providers/${e.id}.png`,alt:e.name,size:30,className:"object-contain rounded-lg max-w-[30px] max-h-[30px]",fallbackText:e.textIcon||e.id.slice(0,2).toUpperCase(),fallbackColor:e.color})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"font-semibold text-sm",children:e.name}),(0,r.jsx)("div",{className:"flex items-center gap-2 mt-0.5 flex-wrap",children:l?(0,r.jsx)(c.Ex,{variant:"success",size:"sm",children:"Ready"}):u?(0,r.jsx)(c.Ex,{variant:"default",size:"sm",children:"Disabled"}):0===b?(0,r.jsx)("span",{className:"text-xs text-text-muted",children:"No connections"}):(0,r.jsxs)(r.Fragment,{children:[h>0&&(0,r.jsxs)(c.Ex,{variant:"success",size:"sm",dot:!0,children:[h," Connected"]}),p>0&&(0,r.jsxs)(c.Ex,{variant:"error",size:"sm",dot:!0,children:[p," Error"]}),0===h&&0===p&&(0,r.jsxs)(c.Ex,{variant:"default",size:"sm",children:[b," Added"]})]})})]})]})})})}function h({combos:e}){return 0===e.length?(0,r.jsx)("p",{className:"text-xs text-text-muted italic",children:"No combos yet."}):(0,r.jsx)("div",{className:"flex flex-col gap-2",children:e.map(e=>(0,r.jsx)(i(),{href:`/dashboard/media-providers/combo/${e.id}`,children:(0,r.jsx)(c.Zp,{padding:"xs",className:"hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors cursor-pointer",children:(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary text-[18px]",children:"layers"}),(0,r.jsx)("code",{className:"text-sm font-mono font-medium flex-1 truncate",children:e.name}),(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-1 sm:shrink-0",children:[e.models.slice(0,6).map((e,s)=>{let t="string"==typeof e?e.split("/")[0]:"",a=d.Q2[t];return(0,r.jsx)("div",{title:a?.name||e,className:"size-5 rounded flex items-center justify-center",style:{backgroundColor:`${a?.color??"#888"}15`},children:(0,r.jsx)(n.A,{src:`/providers/${t}.png`,alt:a?.name||t,size:18,className:"object-contain rounded max-w-[18px] max-h-[18px]",fallbackText:a?.textIcon||t.slice(0,2).toUpperCase(),fallbackColor:a?.color})},`${e}-${s}`)}),e.models.length>6&&(0,r.jsxs)("span",{className:"text-[10px] text-text-muted ml-1",children:["+",e.models.length-6]})]}),(0,r.jsx)("span",{className:"text-[11px] text-text-muted shrink-0",children:e.models.length}),(0,r.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[16px]",children:"chevron_right"})]})})},e.id))})}function p({title:e,icon:s,kind:t,providers:a,connections:i,combos:l,onCreateCombo:o}){return(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-3",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary",children:s}),(0,r.jsx)("h2",{className:"text-base font-semibold",children:e}),(0,r.jsxs)("span",{className:"text-xs text-text-muted",children:["(",a.length," providers \xb7 ",l.length," combos)"]})]}),(0,r.jsx)(c.$n,{size:"sm",icon:"add",onClick:o,children:"Create Combo"})]}),l.length>0&&(0,r.jsx)("div",{className:"mb-4",children:(0,r.jsx)(h,{combos:l})}),0===a.length?(0,r.jsx)("div",{className:"text-center py-8 border border-dashed border-border rounded-xl text-text-muted text-sm",children:"No providers."}):(0,r.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:a.map(e=>(0,r.jsx)(x,{provider:e,kind:t,connections:i},e.id))})]})}function b(){let e=(0,o.useRouter)(),[s,t]=(0,l.useState)([]),[a,i]=(0,l.useState)([]),c=async()=>{try{let[e,s]=await Promise.all([fetch("/api/providers",{cache:"no-store"}),fetch("/api/combos",{cache:"no-store"})]);e.ok&&t((await e.json()).connections||[]),s.ok&&i((await s.json()).combos||[])}catch{}};(0,l.useEffect)(()=>{c()},[]);let n=(0,d.o5)("webSearch"),m=(0,d.o5)("webFetch"),x=a.filter(e=>"webSearch"===e.kind),h=a.filter(e=>"webFetch"===e.kind),b=async s=>{let t="webSearch"===s?"search-combo":"fetch-combo",r=t,i=1,l=new Set(a.map(e=>e.name));for(;l.has(r);)r=`${t}-${i++}`;let o=await fetch("/api/combos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:r,models:[],kind:s})});if(o.ok){let s=await o.json();e.push(`/dashboard/media-providers/combo/${s.id}`)}else alert((await o.json()).error||"Failed to create combo")};return(0,r.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,r.jsx)(p,{title:"Web Search",icon:"search",kind:"webSearch",providers:n,connections:s,combos:x,onCreateCombo:()=>b("webSearch")}),(0,r.jsx)("div",{className:"border-t border-border"}),(0,r.jsx)(p,{title:"Web Fetch",icon:"travel_explore",kind:"webFetch",providers:m,connections:s,combos:h,onCreateCombo:()=>b("webFetch")})]})}}},e=>{e.O(0,[2574,3862,
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9260],{41347:(e,s,t)=>{Promise.resolve().then(t.bind(t,71088))},71088:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>b});var r=t(95155),a=t(98500),i=t.n(a),l=t(12115),o=t(73321),c=t(35497),n=t(57250),d=t(52679);function m(e){let s=Object.entries(e).some(([e,s])=>e.startsWith("modelLock_")&&s&&new Date(s).getTime()>Date.now());return"unavailable"!==e.testStatus||s?e.testStatus:"active"}function x({provider:e,kind:s,connections:t}){let a=d.Q2[e.id],l=!!a?.noAuth,o=t.filter(s=>s.provider===e.id),h=o.filter(e=>{let s=m(e);return"active"===s||"success"===s}).length,p=o.filter(e=>{let s=m(e);return"error"===s||"expired"===s||"unavailable"===s}).length,b=o.length,u=b>0&&o.every(e=>!1===e.isActive);return(0,r.jsx)(i(),{href:`/dashboard/media-providers/${s}/${e.id}`,className:"group",children:(0,r.jsx)(c.Zp,{padding:"xs",className:`h-full hover:bg-black/[0.01] dark:hover:bg-white/[0.01] transition-colors cursor-pointer ${u?"opacity-50":""}`,children:(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,r.jsx)("div",{className:"size-8 rounded-lg flex items-center justify-center shrink-0",style:{backgroundColor:`${e.color?.length>7?e.color:(e.color??"#888")+"15"}`},children:(0,r.jsx)(n.A,{src:`/providers/${e.id}.png`,alt:e.name,size:30,className:"object-contain rounded-lg max-w-[30px] max-h-[30px]",fallbackText:e.textIcon||e.id.slice(0,2).toUpperCase(),fallbackColor:e.color})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"font-semibold text-sm",children:e.name}),(0,r.jsx)("div",{className:"flex items-center gap-2 mt-0.5 flex-wrap",children:l?(0,r.jsx)(c.Ex,{variant:"success",size:"sm",children:"Ready"}):u?(0,r.jsx)(c.Ex,{variant:"default",size:"sm",children:"Disabled"}):0===b?(0,r.jsx)("span",{className:"text-xs text-text-muted",children:"No connections"}):(0,r.jsxs)(r.Fragment,{children:[h>0&&(0,r.jsxs)(c.Ex,{variant:"success",size:"sm",dot:!0,children:[h," Connected"]}),p>0&&(0,r.jsxs)(c.Ex,{variant:"error",size:"sm",dot:!0,children:[p," Error"]}),0===h&&0===p&&(0,r.jsxs)(c.Ex,{variant:"default",size:"sm",children:[b," Added"]})]})})]})]})})})}function h({combos:e}){return 0===e.length?(0,r.jsx)("p",{className:"text-xs text-text-muted italic",children:"No combos yet."}):(0,r.jsx)("div",{className:"flex flex-col gap-2",children:e.map(e=>(0,r.jsx)(i(),{href:`/dashboard/media-providers/combo/${e.id}`,children:(0,r.jsx)(c.Zp,{padding:"xs",className:"hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors cursor-pointer",children:(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary text-[18px]",children:"layers"}),(0,r.jsx)("code",{className:"text-sm font-mono font-medium flex-1 truncate",children:e.name}),(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-1 sm:shrink-0",children:[e.models.slice(0,6).map((e,s)=>{let t="string"==typeof e?e.split("/")[0]:"",a=d.Q2[t];return(0,r.jsx)("div",{title:a?.name||e,className:"size-5 rounded flex items-center justify-center",style:{backgroundColor:`${a?.color??"#888"}15`},children:(0,r.jsx)(n.A,{src:`/providers/${t}.png`,alt:a?.name||t,size:18,className:"object-contain rounded max-w-[18px] max-h-[18px]",fallbackText:a?.textIcon||t.slice(0,2).toUpperCase(),fallbackColor:a?.color})},`${e}-${s}`)}),e.models.length>6&&(0,r.jsxs)("span",{className:"text-[10px] text-text-muted ml-1",children:["+",e.models.length-6]})]}),(0,r.jsx)("span",{className:"text-[11px] text-text-muted shrink-0",children:e.models.length}),(0,r.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[16px]",children:"chevron_right"})]})})},e.id))})}function p({title:e,icon:s,kind:t,providers:a,connections:i,combos:l,onCreateCombo:o}){return(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-3",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary",children:s}),(0,r.jsx)("h2",{className:"text-base font-semibold",children:e}),(0,r.jsxs)("span",{className:"text-xs text-text-muted",children:["(",a.length," providers \xb7 ",l.length," combos)"]})]}),(0,r.jsx)(c.$n,{size:"sm",icon:"add",onClick:o,children:"Create Combo"})]}),l.length>0&&(0,r.jsx)("div",{className:"mb-4",children:(0,r.jsx)(h,{combos:l})}),0===a.length?(0,r.jsx)("div",{className:"text-center py-8 border border-dashed border-border rounded-xl text-text-muted text-sm",children:"No providers."}):(0,r.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:a.map(e=>(0,r.jsx)(x,{provider:e,kind:t,connections:i},e.id))})]})}function b(){let e=(0,o.useRouter)(),[s,t]=(0,l.useState)([]),[a,i]=(0,l.useState)([]),c=async()=>{try{let[e,s]=await Promise.all([fetch("/api/providers",{cache:"no-store"}),fetch("/api/combos",{cache:"no-store"})]);e.ok&&t((await e.json()).connections||[]),s.ok&&i((await s.json()).combos||[])}catch{}};(0,l.useEffect)(()=>{c()},[]);let n=(0,d.o5)("webSearch"),m=(0,d.o5)("webFetch"),x=a.filter(e=>"webSearch"===e.kind),h=a.filter(e=>"webFetch"===e.kind),b=async s=>{let t="webSearch"===s?"search-combo":"fetch-combo",r=t,i=1,l=new Set(a.map(e=>e.name));for(;l.has(r);)r=`${t}-${i++}`;let o=await fetch("/api/combos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:r,models:[],kind:s})});if(o.ok){let s=await o.json();e.push(`/dashboard/media-providers/combo/${s.id}`)}else alert((await o.json()).error||"Failed to create combo")};return(0,r.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,r.jsx)(p,{title:"Web Search",icon:"search",kind:"webSearch",providers:n,connections:s,combos:x,onCreateCombo:()=>b("webSearch")}),(0,r.jsx)("div",{className:"border-t border-border"}),(0,r.jsx)(p,{title:"Web Fetch",icon:"travel_explore",kind:"webFetch",providers:m,connections:s,combos:h,onCreateCombo:()=>b("webFetch")})]})}}},e=>{e.O(0,[2574,3862,8500,4288,1321,5497,8441,3794,7358],()=>e(e.s=41347)),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6607],{2276:(e,s,a)=>{Promise.resolve().then(a.bind(a,55987))},55987:(e,s,a)=>{"use strict";a.d(s,{default:()=>b});var t=a(95155),l=a(12115),r=a(3534),o=a(28777),n=a(52679),i=a(38719),d=a(35497);let c={enabled:!1,type:"sqlite",sqlitePath:"",host:"",port:"",database:"",username:"",password:"",ssl:!1,createDatabase:!1,logClientRequest:!0,logSourceRequest:!0,logTargetRequest:!0,logProviderResponse:!1,logErrors:!0,retentionDays:30};function g({label:e,value:s,onChange:a,type:l="text",placeholder:r="",disabled:o=!1}){return(0,t.jsxs)("label",{className:"flex flex-col gap-1 text-xs",children:[(0,t.jsx)("span",{className:"text-text-muted",children:e}),(0,t.jsx)("input",{type:l,value:s||"",placeholder:r,disabled:o,onChange:e=>a(e.target.value),className:"w-full rounded border border-border bg-surface px-2 py-1.5 text-xs text-text-main focus:outline-none focus:ring-1 focus:ring-primary/50 disabled:opacity-50"})]})}function u({label:e,checked:s,onChange:a,disabled:l=!1}){return(0,t.jsxs)("label",{className:"flex items-center gap-2 text-xs text-text-main",children:[(0,t.jsx)("input",{type:"checkbox",checked:!!s,disabled:l,onChange:e=>a(e.target.checked)}),e]})}function p(){let[e,s]=(0,l.useState)(c),[a,r]=(0,l.useState)(!1),[o,n]=(0,l.useState)(null),[i,p]=(0,l.useState)(null),b=e=>s(s=>({...s,...e})),x=async()=>{r(!0),p(null);try{let e=await fetch("/api/cli-tools/antigravity-mitm/prompt-log-db"),a=await e.json();if(!e.ok)throw Error(a.error||"Failed to load config");s({...c,...a.config||{}})}catch(e){p(e.message||"Failed to load config")}finally{r(!1)}};(0,l.useEffect)(()=>{x()},[]);let h=async()=>{r(!0),p(null),n(null);try{let a=await fetch("/api/cli-tools/antigravity-mitm/prompt-log-db",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({config:e})}),t=await a.json();if(!a.ok)throw Error(t.error||"Failed to save config");s({...c,...t.config||{}}),n("Saved")}catch(e){p(e.message||"Failed to save config")}finally{r(!1)}},m=async s=>{r(!0),p(null),n(null);try{let a=await fetch("/api/cli-tools/antigravity-mitm/prompt-log-db",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:s,config:e})}),t=await a.json();if(!a.ok)throw Error(t.error||"Action failed");n(t.message||t.init?.message||"OK")}catch(e){p(e.message||"Action failed")}finally{r(!1)}},y="sqlite"===e.type,f="postgres"===e.type||"mysql"===e.type;return(0,t.jsx)(d.Zp,{title:"Prompt Log Database",subtitle:"Store MITM/Copilot prompt logs in a queryable database",icon:"database",children:(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,t.jsx)(d.Ex,{variant:e.enabled?"success":"default",children:e.enabled?"Enabled":"Disabled"}),(0,t.jsx)("span",{className:"text-xs text-text-muted",children:"File logs still remain available under DATA_DIR/logs/requests."})]}),(0,t.jsx)("div",{className:"rounded-lg border border-yellow-500/30 bg-yellow-500/10 p-3 text-xs text-yellow-700 dark:text-yellow-300",children:"Prompt logs may contain source code, selected code, internal URLs, and user prompts. Protect the database and set retention according to your policy."}),(0,t.jsxs)("div",{className:"grid gap-3 md:grid-cols-2",children:[(0,t.jsxs)("label",{className:"flex flex-col gap-1 text-xs",children:[(0,t.jsx)("span",{className:"text-text-muted",children:"Database type"}),(0,t.jsxs)("select",{value:e.type,disabled:a,onChange:s=>{let a=s.target.value;b({type:a,port:"postgres"===a?e.port||"5432":"mysql"===a?e.port||"3306":e.port})},className:"w-full rounded border border-border bg-surface px-2 py-1.5 text-xs text-text-main focus:outline-none focus:ring-1 focus:ring-primary/50",children:[(0,t.jsx)("option",{value:"sqlite",children:"SQLite local"}),(0,t.jsx)("option",{value:"postgres",children:"PostgreSQL"}),(0,t.jsx)("option",{value:"mysql",children:"MySQL / MariaDB"})]})]}),(0,t.jsx)(g,{label:"Retention days",type:"number",value:String(e.retentionDays||30),onChange:e=>b({retentionDays:Number(e)||30}),disabled:a})]}),y&&(0,t.jsx)(g,{label:"SQLite path",value:e.sqlitePath||"",placeholder:"/var/lib/bluerouter/logs/promptLogs.sqlite",onChange:e=>b({sqlitePath:e}),disabled:a}),f&&(0,t.jsxs)("div",{className:"grid gap-3 md:grid-cols-2",children:[(0,t.jsx)(g,{label:"Host",value:e.host,placeholder:"127.0.0.1",onChange:e=>b({host:e}),disabled:a}),(0,t.jsx)(g,{label:"Port",value:e.port,placeholder:"postgres"===e.type?"5432":"3306",onChange:e=>b({port:e}),disabled:a}),(0,t.jsx)(g,{label:"Database",value:e.database,placeholder:"bluerouter_logs",onChange:e=>b({database:e}),disabled:a}),(0,t.jsx)(g,{label:"Username",value:e.username,placeholder:"bluerouter",onChange:e=>b({username:e}),disabled:a}),(0,t.jsx)(g,{label:"Password",type:"password",value:e.password,placeholder:"Leave as ******** to keep existing password",onChange:e=>b({password:e}),disabled:a}),(0,t.jsxs)("div",{className:"flex flex-col justify-end gap-2",children:[(0,t.jsx)(u,{label:"Use SSL",checked:e.ssl,onChange:e=>b({ssl:e}),disabled:a}),(0,t.jsx)(u,{label:"Create database if missing",checked:e.createDatabase,onChange:e=>b({createDatabase:e}),disabled:a})]})]}),(0,t.jsxs)("div",{className:"grid gap-2 rounded-lg border border-border bg-surface/40 p-3 md:grid-cols-2",children:[(0,t.jsx)(u,{label:"Enable database prompt logging",checked:e.enabled,onChange:e=>b({enabled:e}),disabled:a}),(0,t.jsx)(u,{label:"Log client request",checked:e.logClientRequest,onChange:e=>b({logClientRequest:e}),disabled:a}),(0,t.jsx)(u,{label:"Log normalized/source request",checked:e.logSourceRequest,onChange:e=>b({logSourceRequest:e}),disabled:a}),(0,t.jsx)(u,{label:"Log target/provider request",checked:e.logTargetRequest,onChange:e=>b({logTargetRequest:e}),disabled:a}),(0,t.jsx)(u,{label:"Log provider response",checked:e.logProviderResponse,onChange:e=>b({logProviderResponse:e}),disabled:a}),(0,t.jsx)(u,{label:"Log errors",checked:e.logErrors,onChange:e=>b({logErrors:e}),disabled:a})]}),f&&(0,t.jsxs)("div",{className:"rounded-lg border border-blue-500/30 bg-blue-500/10 p-3 text-xs text-blue-700 dark:text-blue-300",children:["PostgreSQL requires npm package ",(0,t.jsx)("code",{children:"pg"}),". MySQL/MariaDB requires ",(0,t.jsx)("code",{children:"mysql2"}),". Run ",(0,t.jsx)("code",{children:"npm install pg mysql2"})," before build if you use external databases."]}),o&&(0,t.jsx)("div",{className:"rounded-lg border border-green-500/30 bg-green-500/10 p-2 text-xs text-green-600",children:o}),i&&(0,t.jsx)("div",{className:"rounded-lg border border-red-500/30 bg-red-500/10 p-2 text-xs text-red-500",children:i}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,t.jsx)(d.$n,{size:"sm",variant:"secondary",onClick:x,loading:a,children:"Reload"}),(0,t.jsx)(d.$n,{size:"sm",variant:"secondary",onClick:()=>m("test"),loading:a,children:"Test connection"}),(0,t.jsx)(d.$n,{size:"sm",variant:"secondary",onClick:()=>m("init"),loading:a,children:"Initialize schema"}),(0,t.jsx)(d.$n,{size:"sm",onClick:h,loading:a,children:"Save"}),(0,t.jsx)(d.$n,{size:"sm",variant:"success",onClick:()=>m("save-and-init"),loading:a,children:"Save & initialize"})]})]})})}function b(){let[e,s]=(0,l.useState)([]),[a,d]=(0,l.useState)([]),[c,g]=(0,l.useState)({}),[u,b]=(0,l.useState)(!1),[x,h]=(0,l.useState)(null),[m,y]=(0,l.useState)({running:!1,certExists:!1,dnsStatus:{},hasCachedPassword:!1});(0,l.useEffect)(()=>{f(),j(),v(),w()},[]);let f=async()=>{try{let e=await fetch("/api/providers");if(e.ok){let a=await e.json();s(a.connections||[])}}catch{}},j=async()=>{try{let e=await fetch("/api/keys");if(e.ok){let s=await e.json();d(s.keys||[])}}catch{}},v=async()=>{try{let e=await fetch("/api/models/alias");if(e.ok){let s=await e.json();g(s.aliases||{})}}catch{}},w=async()=>{try{let e=await fetch("/api/settings");if(e.ok){let s=await e.json();b(s.cloudEnabled||!1)}}catch{}},C=()=>e.filter(e=>!1!==e.isActive),S=Object.entries(r.wn);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"rounded-lg border border-yellow-500/30 bg-yellow-500/10 p-4 text-sm text-yellow-700 dark:text-yellow-300",children:[(0,t.jsx)("span",{className:"material-symbols-rounded align-middle text-base",children:"warning"})," ","⚠️ MITM intercepts HTTPS traffic of IDE tools (Antigravity, GitHub Copilot, Kiro) via local CA to redirect requests to your providers. May violate ToS → account ban. Use at your own risk."]}),(0,t.jsx)(i.tA,{apiKeys:a,cloudEnabled:u,onStatusChange:y}),(0,t.jsx)(i.k0,{serverRunning:m.running,onChanged:e=>y(s=>({...s,certExists:e?.certExists??s.certExists}))}),(0,t.jsx)(p,{}),S.map(([e,s])=>(0,t.jsx)(i.kn,{tool:{...s,id:e},isExpanded:x===e,onToggle:()=>h(x===e?null:e),serverRunning:m.running,dnsActive:m.dnsStatus?.[e]||!1,hasCachedPassword:m.hasCachedPassword||!1,needsSudoPassword:!1!==m.needsSudoPassword,isWin:!0===m.isWin,apiKeys:a,activeProviders:C(),hasActiveProviders:C().some(e=>(0,o.KC)(e.provider).length>0||(0,n.mq)(e.provider)||(0,n.gb)(e.provider)),modelAliases:c,cloudEnabled:u,onDnsChange:e=>y(s=>({...s,dnsStatus:e.dnsStatus??s.dnsStatus}))},e))]})}}},e=>{e.O(0,[2574,3862,
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6607],{2276:(e,s,a)=>{Promise.resolve().then(a.bind(a,55987))},55987:(e,s,a)=>{"use strict";a.d(s,{default:()=>b});var t=a(95155),l=a(12115),r=a(3534),o=a(28777),n=a(52679),i=a(38719),d=a(35497);let c={enabled:!1,type:"sqlite",sqlitePath:"",host:"",port:"",database:"",username:"",password:"",ssl:!1,createDatabase:!1,logClientRequest:!0,logSourceRequest:!0,logTargetRequest:!0,logProviderResponse:!1,logErrors:!0,retentionDays:30};function g({label:e,value:s,onChange:a,type:l="text",placeholder:r="",disabled:o=!1}){return(0,t.jsxs)("label",{className:"flex flex-col gap-1 text-xs",children:[(0,t.jsx)("span",{className:"text-text-muted",children:e}),(0,t.jsx)("input",{type:l,value:s||"",placeholder:r,disabled:o,onChange:e=>a(e.target.value),className:"w-full rounded border border-border bg-surface px-2 py-1.5 text-xs text-text-main focus:outline-none focus:ring-1 focus:ring-primary/50 disabled:opacity-50"})]})}function u({label:e,checked:s,onChange:a,disabled:l=!1}){return(0,t.jsxs)("label",{className:"flex items-center gap-2 text-xs text-text-main",children:[(0,t.jsx)("input",{type:"checkbox",checked:!!s,disabled:l,onChange:e=>a(e.target.checked)}),e]})}function p(){let[e,s]=(0,l.useState)(c),[a,r]=(0,l.useState)(!1),[o,n]=(0,l.useState)(null),[i,p]=(0,l.useState)(null),b=e=>s(s=>({...s,...e})),x=async()=>{r(!0),p(null);try{let e=await fetch("/api/cli-tools/antigravity-mitm/prompt-log-db"),a=await e.json();if(!e.ok)throw Error(a.error||"Failed to load config");s({...c,...a.config||{}})}catch(e){p(e.message||"Failed to load config")}finally{r(!1)}};(0,l.useEffect)(()=>{x()},[]);let h=async()=>{r(!0),p(null),n(null);try{let a=await fetch("/api/cli-tools/antigravity-mitm/prompt-log-db",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({config:e})}),t=await a.json();if(!a.ok)throw Error(t.error||"Failed to save config");s({...c,...t.config||{}}),n("Saved")}catch(e){p(e.message||"Failed to save config")}finally{r(!1)}},m=async s=>{r(!0),p(null),n(null);try{let a=await fetch("/api/cli-tools/antigravity-mitm/prompt-log-db",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:s,config:e})}),t=await a.json();if(!a.ok)throw Error(t.error||"Action failed");n(t.message||t.init?.message||"OK")}catch(e){p(e.message||"Action failed")}finally{r(!1)}},y="sqlite"===e.type,f="postgres"===e.type||"mysql"===e.type;return(0,t.jsx)(d.Zp,{title:"Prompt Log Database",subtitle:"Store MITM/Copilot prompt logs in a queryable database",icon:"database",children:(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,t.jsx)(d.Ex,{variant:e.enabled?"success":"default",children:e.enabled?"Enabled":"Disabled"}),(0,t.jsx)("span",{className:"text-xs text-text-muted",children:"File logs still remain available under DATA_DIR/logs/requests."})]}),(0,t.jsx)("div",{className:"rounded-lg border border-yellow-500/30 bg-yellow-500/10 p-3 text-xs text-yellow-700 dark:text-yellow-300",children:"Prompt logs may contain source code, selected code, internal URLs, and user prompts. Protect the database and set retention according to your policy."}),(0,t.jsxs)("div",{className:"grid gap-3 md:grid-cols-2",children:[(0,t.jsxs)("label",{className:"flex flex-col gap-1 text-xs",children:[(0,t.jsx)("span",{className:"text-text-muted",children:"Database type"}),(0,t.jsxs)("select",{value:e.type,disabled:a,onChange:s=>{let a=s.target.value;b({type:a,port:"postgres"===a?e.port||"5432":"mysql"===a?e.port||"3306":e.port})},className:"w-full rounded border border-border bg-surface px-2 py-1.5 text-xs text-text-main focus:outline-none focus:ring-1 focus:ring-primary/50",children:[(0,t.jsx)("option",{value:"sqlite",children:"SQLite local"}),(0,t.jsx)("option",{value:"postgres",children:"PostgreSQL"}),(0,t.jsx)("option",{value:"mysql",children:"MySQL / MariaDB"})]})]}),(0,t.jsx)(g,{label:"Retention days",type:"number",value:String(e.retentionDays||30),onChange:e=>b({retentionDays:Number(e)||30}),disabled:a})]}),y&&(0,t.jsx)(g,{label:"SQLite path",value:e.sqlitePath||"",placeholder:"/var/lib/bluerouter/logs/promptLogs.sqlite",onChange:e=>b({sqlitePath:e}),disabled:a}),f&&(0,t.jsxs)("div",{className:"grid gap-3 md:grid-cols-2",children:[(0,t.jsx)(g,{label:"Host",value:e.host,placeholder:"127.0.0.1",onChange:e=>b({host:e}),disabled:a}),(0,t.jsx)(g,{label:"Port",value:e.port,placeholder:"postgres"===e.type?"5432":"3306",onChange:e=>b({port:e}),disabled:a}),(0,t.jsx)(g,{label:"Database",value:e.database,placeholder:"bluerouter_logs",onChange:e=>b({database:e}),disabled:a}),(0,t.jsx)(g,{label:"Username",value:e.username,placeholder:"bluerouter",onChange:e=>b({username:e}),disabled:a}),(0,t.jsx)(g,{label:"Password",type:"password",value:e.password,placeholder:"Leave as ******** to keep existing password",onChange:e=>b({password:e}),disabled:a}),(0,t.jsxs)("div",{className:"flex flex-col justify-end gap-2",children:[(0,t.jsx)(u,{label:"Use SSL",checked:e.ssl,onChange:e=>b({ssl:e}),disabled:a}),(0,t.jsx)(u,{label:"Create database if missing",checked:e.createDatabase,onChange:e=>b({createDatabase:e}),disabled:a})]})]}),(0,t.jsxs)("div",{className:"grid gap-2 rounded-lg border border-border bg-surface/40 p-3 md:grid-cols-2",children:[(0,t.jsx)(u,{label:"Enable database prompt logging",checked:e.enabled,onChange:e=>b({enabled:e}),disabled:a}),(0,t.jsx)(u,{label:"Log client request",checked:e.logClientRequest,onChange:e=>b({logClientRequest:e}),disabled:a}),(0,t.jsx)(u,{label:"Log normalized/source request",checked:e.logSourceRequest,onChange:e=>b({logSourceRequest:e}),disabled:a}),(0,t.jsx)(u,{label:"Log target/provider request",checked:e.logTargetRequest,onChange:e=>b({logTargetRequest:e}),disabled:a}),(0,t.jsx)(u,{label:"Log provider response",checked:e.logProviderResponse,onChange:e=>b({logProviderResponse:e}),disabled:a}),(0,t.jsx)(u,{label:"Log errors",checked:e.logErrors,onChange:e=>b({logErrors:e}),disabled:a})]}),f&&(0,t.jsxs)("div",{className:"rounded-lg border border-blue-500/30 bg-blue-500/10 p-3 text-xs text-blue-700 dark:text-blue-300",children:["PostgreSQL requires npm package ",(0,t.jsx)("code",{children:"pg"}),". MySQL/MariaDB requires ",(0,t.jsx)("code",{children:"mysql2"}),". Run ",(0,t.jsx)("code",{children:"npm install pg mysql2"})," before build if you use external databases."]}),o&&(0,t.jsx)("div",{className:"rounded-lg border border-green-500/30 bg-green-500/10 p-2 text-xs text-green-600",children:o}),i&&(0,t.jsx)("div",{className:"rounded-lg border border-red-500/30 bg-red-500/10 p-2 text-xs text-red-500",children:i}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,t.jsx)(d.$n,{size:"sm",variant:"secondary",onClick:x,loading:a,children:"Reload"}),(0,t.jsx)(d.$n,{size:"sm",variant:"secondary",onClick:()=>m("test"),loading:a,children:"Test connection"}),(0,t.jsx)(d.$n,{size:"sm",variant:"secondary",onClick:()=>m("init"),loading:a,children:"Initialize schema"}),(0,t.jsx)(d.$n,{size:"sm",onClick:h,loading:a,children:"Save"}),(0,t.jsx)(d.$n,{size:"sm",variant:"success",onClick:()=>m("save-and-init"),loading:a,children:"Save & initialize"})]})]})})}function b(){let[e,s]=(0,l.useState)([]),[a,d]=(0,l.useState)([]),[c,g]=(0,l.useState)({}),[u,b]=(0,l.useState)(!1),[x,h]=(0,l.useState)(null),[m,y]=(0,l.useState)({running:!1,certExists:!1,dnsStatus:{},hasCachedPassword:!1});(0,l.useEffect)(()=>{f(),j(),v(),w()},[]);let f=async()=>{try{let e=await fetch("/api/providers");if(e.ok){let a=await e.json();s(a.connections||[])}}catch{}},j=async()=>{try{let e=await fetch("/api/keys");if(e.ok){let s=await e.json();d(s.keys||[])}}catch{}},v=async()=>{try{let e=await fetch("/api/models/alias");if(e.ok){let s=await e.json();g(s.aliases||{})}}catch{}},w=async()=>{try{let e=await fetch("/api/settings");if(e.ok){let s=await e.json();b(s.cloudEnabled||!1)}}catch{}},C=()=>e.filter(e=>!1!==e.isActive),S=Object.entries(r.wn);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"rounded-lg border border-yellow-500/30 bg-yellow-500/10 p-4 text-sm text-yellow-700 dark:text-yellow-300",children:[(0,t.jsx)("span",{className:"material-symbols-rounded align-middle text-base",children:"warning"})," ","⚠️ MITM intercepts HTTPS traffic of IDE tools (Antigravity, GitHub Copilot, Kiro) via local CA to redirect requests to your providers. May violate ToS → account ban. Use at your own risk."]}),(0,t.jsx)(i.tA,{apiKeys:a,cloudEnabled:u,onStatusChange:y}),(0,t.jsx)(i.k0,{serverRunning:m.running,onChanged:e=>y(s=>({...s,certExists:e?.certExists??s.certExists}))}),(0,t.jsx)(p,{}),S.map(([e,s])=>(0,t.jsx)(i.kn,{tool:{...s,id:e},isExpanded:x===e,onToggle:()=>h(x===e?null:e),serverRunning:m.running,dnsActive:m.dnsStatus?.[e]||!1,hasCachedPassword:m.hasCachedPassword||!1,needsSudoPassword:!1!==m.needsSudoPassword,isWin:!0===m.isWin,apiKeys:a,activeProviders:C(),hasActiveProviders:C().some(e=>(0,o.KC)(e.provider).length>0||(0,n.mq)(e.provider)||(0,n.gb)(e.provider)),modelAliases:c,cloudEnabled:u,onDnsChange:e=>y(s=>({...s,dnsStatus:e.dnsStatus??s.dnsStatus}))},e))]})}}},e=>{e.O(0,[2574,3862,8500,4288,5772,1321,5497,4404,8441,3794,7358],()=>e(e.s=2276)),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6337],{18032:(e,s,_)=>{Promise.resolve().then(_.bind(_,95907))}},e=>{e.O(0,[2574,3862,
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6337],{18032:(e,s,_)=>{Promise.resolve().then(_.bind(_,95907))}},e=>{e.O(0,[2574,3862,8500,4288,1321,5497,5907,8441,3794,7358],()=>e(e.s=18032)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7692],{55478:(e,t,r)=>{"use strict";r.d(t,{default:()=>N});var s=r(95155),o=r(98500),a=r.n(o),l=r(12115);let n={client:"Client request",source:"Source request",openai:"OpenAI normalized",target:"Provider request",provider_response:"Provider response",error:"Error"},d={client:"bg-blue-500/10 text-blue-600 border-blue-500/20",source:"bg-cyan-500/10 text-cyan-600 border-cyan-500/20",openai:"bg-purple-500/10 text-purple-600 border-purple-500/20",target:"bg-orange-500/10 text-orange-600 border-orange-500/20",provider_response:"bg-green-500/10 text-green-600 border-green-500/20",error:"bg-red-500/10 text-red-600 border-red-500/20"},i={keyword:"",model:"",stage:"",sourceTool:"",clientIp:"",sessionId:"",dateFrom:"",dateTo:"",limit:"50",offset:"0"};function c(e){if(!e)return"-";try{let t=function(e){if(!e)return"";if(e instanceof Date)return e.toISOString();let t=String(e).trim();if(!t)return"";let r=t.replace(" ","T");return/(?:Z|[+-]\d{2}:?\d{2})$/i.test(r)?r:`${r}Z`}(e),r=new Date(t);if(Number.isNaN(r.getTime()))return String(e);return r.toLocaleString("vi-VN",{timeZone:"Asia/Ho_Chi_Minh",day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})}catch{return String(e)}}function x(e,t=240){let r=String(e||"").replace(/\s+/g," ").trim();return r.length>t?`${r.slice(0,t)}...`:r}function u(e){let t=String(e||"").trim();if(!t)return"";try{return new URL(t).hostname||""}catch{return t.replace(/^https?:\/\//,"").replace(/\/.*$/,"").replace(/:\d+$/,"")}}function m(e){return e?.provider_name||e?.provider_label||e?.provider_id||e?.provider||u(e?.provider_url)||u(e?.endpoint)||""}function b(e){if(e?.display_model)return e.display_model;let t=e?.model||"-",r=m(e);return!r||"-"===t||String(t).startsWith(`${r}/`)?t:`${r}/${t}`}function p({value:e}){let t=function(e){if(!e)return null;if("object"==typeof e)return e;try{return JSON.parse(e)}catch{return null}}(e),r=t?JSON.stringify(t,null,2):String(e||"");return(0,s.jsx)("pre",{className:"max-h-[60vh] overflow-auto whitespace-pre-wrap rounded-2xl border border-border bg-background p-4 text-xs leading-relaxed text-text-main",children:r||"No JSON"})}function g({value:e,empty:t="No content"}){return(0,s.jsx)("pre",{className:"max-h-[60vh] overflow-auto whitespace-pre-wrap rounded-2xl border border-border bg-background p-4 text-xs leading-relaxed text-text-main",children:e||t})}function h({label:e,value:t}){return(0,s.jsxs)("div",{className:"rounded-2xl border border-border bg-surface p-3",children:[(0,s.jsx)("div",{className:"text-[11px] font-semibold uppercase tracking-wide text-text-muted",children:e}),(0,s.jsx)("div",{className:"mt-1 min-w-0 break-words text-sm font-medium text-text-main",children:t||"-"})]})}function f({stage:e}){let t=d[e]||"bg-surface text-text-main border-border";return(0,s.jsx)("span",{className:`inline-flex rounded-full border px-2 py-1 text-[11px] font-semibold ${t}`,children:n[e]||e||"-"})}function j({label:e,children:t}){return(0,s.jsxs)("label",{className:"flex min-w-0 flex-col gap-1 text-sm font-semibold text-text-main",children:[(0,s.jsx)("span",{children:e}),t]})}function v({label:e,value:t,title:r}){return(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("div",{className:"text-[11px] font-semibold uppercase tracking-wide text-text-muted",children:e}),(0,s.jsx)("div",{className:"mt-1 truncate text-sm text-text-main",title:r||t||"",children:t||"-"})]})}function y({children:e,title:t}){return(0,s.jsx)("div",{className:"text-sm leading-relaxed text-text-main",title:t||"",style:{display:"-webkit-box",WebkitLineClamp:3,WebkitBoxOrient:"vertical",overflow:"hidden",overflowWrap:"anywhere"},children:e})}function N(){let[e,t]=(0,l.useState)(i),[r,o]=(0,l.useState)(i),[d,u]=(0,l.useState)([]),[N,w]=(0,l.useState)([]),[_,k]=(0,l.useState)([]),[S,C]=(0,l.useState)(0),[E,I]=(0,l.useState)(null),[P,T]=(0,l.useState)(""),[A,$]=(0,l.useState)(""),[F,L]=(0,l.useState)(!1),[D,M]=(0,l.useState)(!1),[q,O]=(0,l.useState)(0),[R,J]=(0,l.useState)(null),[U,W]=(0,l.useState)("prompt"),[z,H]=(0,l.useState)(!1),[Z,B]=(0,l.useState)(""),V=(0,l.useRef)(0),K=(0,l.useRef)(null),Q=(0,l.useMemo)(()=>{let e=Number(r.limit||50);return Math.floor(Number(r.offset||0)/e)+1},[r.limit,r.offset]),G=(0,l.useCallback)(async e=>{M(!0);try{let t=await fetch("/api/dashboard/prompt-logs/options",{signal:e});if(404===t.status)return;let r=await t.json();if(!t.ok)throw Error(r.error||"Failed to load prompt log options");if(e?.aborted)return;w(r.models||[]),k(r.stages||[]),r.dbInfo&&I(e=>e||r.dbInfo)}catch(e){e?.name!=="AbortError"&&console.warn("Failed to load prompt log options:",e)}finally{e?.aborted||M(!1)}},[]),X=(0,l.useCallback)(async(e,{signal:t,requestId:r}={})=>{L(!0),$(""),T("");try{let s=new URLSearchParams;Object.entries(e).forEach(([e,t])=>{let r=String(t||"").trim();r&&s.set(e,r)});let o=s.toString()?`?${s}`:"",a=await fetch(`/api/dashboard/prompt-logs${o}`,{signal:t}),l=await a.json();if(!a.ok)throw Error(l.error||"Failed to load prompt logs");if(t?.aborted||r!==V.current)return;u(l.rows||[]),C(l.total||0),I(l.dbInfo||null),Array.isArray(l.models)&&l.models.length&&w(l.models),Array.isArray(l.stages)&&l.stages.length&&k(l.stages),l.disabled?T("Database prompt logging is disabled. Enable it in Dashboard -> MITM -> Prompt Log Database."):l.missing&&T("Prompt log database/table has no data yet, or SQLite file does not exist.")}catch(e){e?.name!=="AbortError"&&r===V.current&&$(e.message||"Failed to load prompt logs")}finally{t?.aborted||r!==V.current||L(!1)}},[]);(0,l.useEffect)(()=>{let e=new AbortController;return G(e.signal),()=>e.abort()},[G]),(0,l.useEffect)(()=>{let t=window.setTimeout(()=>o(e),500);return()=>window.clearTimeout(t)},[e]),(0,l.useEffect)(()=>{let e=new AbortController,t=V.current+1;return V.current=t,X(r,{signal:e.signal,requestId:t}),()=>e.abort()},[X,r,q]),(0,l.useEffect)(()=>{if(!R)return;let e=e=>{"Escape"===e.key&&J(null)};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[R]),(0,l.useEffect)(()=>()=>K.current?.abort(),[]);let Y=e=>{t(t=>({...t,...e,offset:void 0!==e.offset?e.offset:"0"}))},ee=e=>{t(e),o(e),O(e=>e+1)},et=async e=>{let t=e?.id;if(!t)return;K.current?.abort();let r=new AbortController;K.current=r,J(e),W("prompt"),B(""),H(!0);try{let s=await fetch(`/api/dashboard/prompt-logs/${encodeURIComponent(t)}`,{signal:r.signal}),o=await s.json();if(!s.ok)throw Error(o.error||"Failed to load detail");r.signal.aborted||J(o.row||e)}catch(e){e?.name!=="AbortError"&&B(e.message||"Failed to load detail")}finally{r.signal.aborted||H(!1)}},er=async e=>navigator.clipboard.writeText(String(e||"")),es=async()=>{if(!R?.id||!confirm("Delete this prompt log row?"))return;let e=await fetch(`/api/dashboard/prompt-logs/${encodeURIComponent(R.id)}`,{method:"DELETE"});e.ok?(J(null),O(e=>e+1)):B((await e.json().catch(()=>({}))).error||"Failed to delete prompt log row")};return(0,s.jsxs)("div",{className:"space-y-6",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-3 lg:flex-row lg:items-start lg:justify-between",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h1",{className:"text-2xl font-bold text-text-main",children:"Prompt Logs"}),(0,s.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"Search Copilot/MITM prompts across the currently configured prompt log database."})]}),(0,s.jsxs)("div",{className:"flex shrink-0 gap-2",children:[(0,s.jsx)(a(),{href:"/dashboard/mitm",className:"rounded-xl border border-border bg-surface px-4 py-2 text-sm font-medium text-text-main hover:bg-background",children:"MITM Settings"}),(0,s.jsx)("button",{type:"button",onClick:()=>{o(e),O(e=>e+1),G(new AbortController().signal)},disabled:F||D,className:"rounded-xl bg-primary px-4 py-2 text-sm font-medium text-white hover:bg-primary/90 disabled:cursor-not-allowed disabled:opacity-60",children:F||D?"Loading...":"Refresh"})]})]}),P&&(0,s.jsx)("div",{className:"rounded-2xl border border-amber-500/20 bg-amber-500/10 p-4 text-sm text-amber-700",children:P}),A&&(0,s.jsx)("div",{className:"rounded-2xl border border-red-500/20 bg-red-500/10 p-4 text-sm text-red-600",children:A}),E&&(0,s.jsxs)("div",{className:"rounded-2xl border border-border bg-surface p-4 text-xs text-text-muted",children:["DB: ",(0,s.jsx)("code",{children:E.type}),E.sqlitePath?(0,s.jsxs)(s.Fragment,{children:[" ","\xb7 Path: ",(0,s.jsx)("code",{children:E.sqlitePath})]}):null,E.host?(0,s.jsxs)(s.Fragment,{children:[" ","\xb7 Host: ",(0,s.jsx)("code",{children:E.host})]}):null,E.database?(0,s.jsxs)(s.Fragment,{children:[" ","\xb7 Database: ",(0,s.jsx)("code",{children:E.database})]}):null]}),(0,s.jsxs)("section",{className:"rounded-3xl border border-border bg-surface p-4 shadow-card md:p-6",children:[(0,s.jsxs)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 xl:grid-cols-4",children:[(0,s.jsx)(j,{label:"Keyword",children:(0,s.jsx)("input",{value:e.keyword,onChange:e=>Y({keyword:e.target.value}),placeholder:"prompt, code, model, error...",className:"rounded-xl border border-border bg-background px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-primary/30"})}),(0,s.jsx)(j,{label:"Model",children:(0,s.jsxs)("select",{value:e.model,onChange:e=>Y({model:e.target.value}),className:"rounded-xl border border-border bg-background px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-primary/30",children:[(0,s.jsx)("option",{value:"",children:"All models"}),N.map(e=>(0,s.jsx)("option",{value:e,children:e},e))]})}),(0,s.jsx)(j,{label:"Stage",children:(0,s.jsxs)("select",{value:e.stage,onChange:e=>Y({stage:e.target.value}),className:"rounded-xl border border-border bg-background px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-primary/30",children:[(0,s.jsx)("option",{value:"",children:"All stages"}),_.map(e=>(0,s.jsx)("option",{value:e,children:n[e]||e},e))]})}),(0,s.jsx)(j,{label:"Tool",children:(0,s.jsx)("input",{value:e.sourceTool,onChange:e=>Y({sourceTool:e.target.value}),placeholder:"copilot, antigravity...",className:"rounded-xl border border-border bg-background px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-primary/30"})}),(0,s.jsx)(j,{label:"Client IP",children:(0,s.jsx)("input",{value:e.clientIp,onChange:e=>Y({clientIp:e.target.value}),placeholder:"172.16.253.1",className:"rounded-xl border border-border bg-background px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-primary/30"})}),(0,s.jsx)(j,{label:"Session ID",children:(0,s.jsx)("input",{value:e.sessionId,onChange:e=>Y({sessionId:e.target.value}),placeholder:"session id",className:"rounded-xl border border-border bg-background px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-primary/30"})}),(0,s.jsx)(j,{label:"From",children:(0,s.jsx)("input",{type:"datetime-local",value:e.dateFrom,onChange:e=>Y({dateFrom:e.target.value}),className:"rounded-xl border border-border bg-background px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-primary/30"})}),(0,s.jsx)(j,{label:"To",children:(0,s.jsx)("input",{type:"datetime-local",value:e.dateTo,onChange:e=>Y({dateTo:e.target.value}),className:"rounded-xl border border-border bg-background px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-primary/30"})}),(0,s.jsx)(j,{label:"Limit",children:(0,s.jsxs)("select",{value:e.limit,onChange:e=>Y({limit:e.target.value}),className:"rounded-xl border border-border bg-background px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-primary/30",children:[(0,s.jsx)("option",{value:"25",children:"25"}),(0,s.jsx)("option",{value:"50",children:"50"}),(0,s.jsx)("option",{value:"100",children:"100"}),(0,s.jsx)("option",{value:"200",children:"200"})]})})]}),(0,s.jsxs)("div",{className:"mt-5 flex flex-wrap items-center gap-2",children:[(0,s.jsx)("button",{type:"button",onClick:()=>ee(i),className:"rounded-xl border border-border px-4 py-2 text-sm font-medium text-text-main hover:bg-background",children:"Reset"}),(0,s.jsx)("button",{type:"button",onClick:()=>ee({...e,offset:"0"}),className:"rounded-xl bg-primary px-4 py-2 text-sm font-medium text-white hover:bg-primary/90",children:"Search"}),(0,s.jsxs)("span",{className:"text-xs text-text-muted",children:["Auto-search is debounced by ",500,"ms. In-flight requests are cancelled when filters change."]})]})]}),(0,s.jsxs)("section",{className:"space-y-3 rounded-3xl border border-border bg-surface p-3 shadow-card md:p-4",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3 px-1",children:[(0,s.jsx)("div",{className:"text-sm font-semibold text-text-main",children:"Results"}),(0,s.jsxs)("div",{className:"text-xs text-text-muted",children:["Showing ",d.length," of ",S,". Page ",Q,"."]})]}),0===d.length?(0,s.jsx)("div",{className:"rounded-2xl border border-dashed border-border bg-background p-8 text-center text-sm text-text-muted",children:F?"Loading prompt logs...":"No prompt logs found."}):(0,s.jsx)("div",{className:"space-y-3",children:d.map(e=>{let t=b(e),r=x(e.prompt_preview,420),o=x(e.error_text,160),a=z&&R?.id===e.id;return(0,s.jsx)("article",{className:"rounded-2xl border border-border bg-background p-4 shadow-sm",children:(0,s.jsxs)("div",{className:"grid grid-cols-1 gap-4 xl:grid-cols-[160px_120px_120px_150px_220px_220px_minmax(280px,1fr)_150px_96px] xl:items-start",children:[(0,s.jsx)(v,{label:"Time",value:c(e.created_at)}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"mb-1 text-[11px] font-semibold uppercase tracking-wide text-text-muted",children:"Stage"}),(0,s.jsx)(f,{stage:e.stage})]}),(0,s.jsx)(v,{label:"Tool",value:e.source_tool_label||e.source_tool||e.source_format||"-"}),(0,s.jsx)(v,{label:"Client IP",value:e.client_ip||"-"}),(0,s.jsx)(v,{label:"Model",value:t,title:t}),(0,s.jsx)(v,{label:"Session",value:e.session_id||"-",title:e.session_id||"-"}),(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("div",{className:"mb-1 text-[11px] font-semibold uppercase tracking-wide text-text-muted",children:"Prompt preview"}),r?(0,s.jsx)(y,{title:r,children:r}):(0,s.jsx)("span",{className:"text-sm text-text-muted",children:"No prompt text"})]}),(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("div",{className:"mb-1 text-[11px] font-semibold uppercase tracking-wide text-text-muted",children:"Status/Error"}),e.error_text?(0,s.jsx)(y,{title:o,children:o}):(0,s.jsx)("span",{className:"text-sm text-text-main",children:e.status_code||"-"})]}),(0,s.jsx)("div",{className:"flex xl:justify-end",children:(0,s.jsx)("button",{type:"button",onClick:t=>{t.preventDefault(),t.stopPropagation(),et(e)},disabled:a,className:"relative z-10 inline-flex min-w-[72px] items-center justify-center rounded-xl bg-primary px-4 py-2 text-sm font-semibold text-white shadow-sm hover:bg-primary/90 disabled:cursor-wait disabled:opacity-60",children:a?"Loading":"View"})})]})},e.id||`${e.created_at}-${e.session_id}-${e.stage}`)})}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3 pt-2",children:[(0,s.jsxs)("div",{className:"text-xs text-text-muted",children:["Showing ",d.length," of ",S,". Page ",Q,"."]}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)("button",{type:"button",onClick:()=>{let t=Number(r.limit||50),s=Number(r.offset||0);ee({...e,offset:String(Math.max(0,s-t))})},disabled:0>=Number(r.offset||0)||F,className:"rounded-xl border border-border px-3 py-1.5 text-sm disabled:opacity-50",children:"Previous"}),(0,s.jsx)("button",{type:"button",onClick:()=>{let t=Number(r.limit||50),s=Number(r.offset||0);s+t>=S||ee({...e,offset:String(s+t)})},disabled:Number(r.offset||0)+Number(r.limit||50)>=S||F,className:"rounded-xl border border-border px-3 py-1.5 text-sm disabled:opacity-50",children:"Next"})]})]})]}),R&&(0,s.jsx)("div",{className:"fixed inset-0 z-[1000] flex items-center justify-center bg-black/60 p-4 backdrop-blur-sm",onMouseDown:e=>{e.target===e.currentTarget&&J(null)},children:(0,s.jsxs)("div",{className:"max-h-[92vh] w-full max-w-6xl overflow-hidden rounded-3xl border border-border bg-surface shadow-2xl",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-3 border-b border-border p-4 md:flex-row md:items-start md:justify-between",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("h2",{className:"text-xl font-bold text-text-main",children:"Prompt Log Detail"}),(0,s.jsxs)("p",{className:"mt-1 break-words text-xs text-text-muted",children:[c(R.created_at)," \xb7 ",b(R)," \xb7 ",R.session_id||"-"]}),z&&(0,s.jsx)("p",{className:"mt-2 text-sm text-primary",children:"Loading full detail..."}),Z&&(0,s.jsx)("p",{className:"mt-2 text-sm text-red-600",children:Z})]}),(0,s.jsxs)("div",{className:"flex shrink-0 flex-wrap gap-2",children:[(0,s.jsx)("button",{type:"button",onClick:()=>J(null),className:"rounded-xl border border-border bg-background px-3 py-2 text-sm font-medium text-text-main hover:bg-surface",children:"Close"}),(0,s.jsx)("button",{type:"button",onClick:()=>er(R.prompt_text||R.prompt_preview),className:"rounded-xl border border-border bg-background px-3 py-2 text-sm font-medium text-text-main hover:bg-surface",children:"Copy prompt"}),(0,s.jsx)("button",{type:"button",onClick:()=>er(R.full_request_json),className:"rounded-xl border border-border bg-background px-3 py-2 text-sm font-medium text-text-main hover:bg-surface",children:"Copy request JSON"}),(0,s.jsx)("button",{type:"button",onClick:es,className:"rounded-xl border border-red-500/30 bg-red-500/10 px-3 py-2 text-sm font-medium text-red-600 hover:bg-red-500/20",children:"Delete row"})]})]}),(0,s.jsx)("div",{className:"flex gap-2 overflow-x-auto border-b border-border p-4",children:[["prompt","Prompt"],["request","Request JSON"],["response","Response"],["meta","Metadata"]].map(([e,t])=>(0,s.jsx)("button",{type:"button",onClick:()=>W(e),className:`whitespace-nowrap rounded-xl px-3 py-2 text-sm ${U===e?"bg-primary text-white shadow-sm":"border border-border bg-background text-text-main hover:bg-surface"}`,children:t},e))}),(0,s.jsxs)("div",{className:"max-h-[62vh] overflow-auto p-4",children:["prompt"===U&&(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsx)("h3",{className:"font-semibold text-text-main",children:"Extracted prompt text"}),(0,s.jsx)(g,{value:R.prompt_text||R.prompt_preview})]}),"request"===U&&(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsx)("h3",{className:"font-semibold text-text-main",children:"Full request JSON"}),(0,s.jsx)(p,{value:R.full_request_json})]}),"response"===U&&(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsx)("h3",{className:"font-semibold text-text-main",children:"Response text"}),(0,s.jsx)(g,{value:R.response_text,empty:"No response captured"}),R.error_text?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("h3",{className:"font-semibold text-text-main",children:"Error"}),(0,s.jsx)(g,{value:R.error_text})]}):null]}),"meta"===U&&(0,s.jsxs)("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2 xl:grid-cols-3",children:[(0,s.jsx)(h,{label:"ID",value:R.id}),(0,s.jsx)(h,{label:"Stage",value:n[R.stage]||R.stage}),(0,s.jsx)(h,{label:"Status",value:R.status_code}),(0,s.jsx)(h,{label:"Tool",value:R.source_tool_label||R.source_tool||R.source_format}),(0,s.jsx)(h,{label:"Client IP",value:R.client_ip}),(0,s.jsx)(h,{label:"Client Host",value:R.client_host}),(0,s.jsx)(h,{label:"Session",value:R.session_id}),(0,s.jsx)(h,{label:"Model",value:b(R)}),(0,s.jsx)(h,{label:"Provider",value:m(R)}),(0,s.jsx)(h,{label:"Endpoint",value:R.endpoint||R.provider_url}),(0,s.jsx)(h,{label:"Account",value:R.account_name||R.connection_id}),(0,s.jsx)(h,{label:"Created",value:c(R.created_at)})]})]})]})})]})}},79705:(e,t,r)=>{Promise.resolve().then(r.bind(r,55478))}},e=>{e.O(0,[8500,8441,3794,7358],()=>e(e.s=79705)),_N_E=e.O()}]);
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2134],{5020:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>M});var s=a(95155),i=a(12115),l=a(73321),r=a(98500),n=a.n(r),o=a(5772),d=a(35497),c=a(52679),m=a(28777),p=a(11059);let x=new Map;async function u(e){if(!e?.url||!e?.type)return[];let t=x.get(e.url);if(t&&Date.now()<t.expiresAt)return t.data;try{let t=new URLSearchParams({url:e.url,type:e.type}),a=await fetch(`/api/providers/suggested-models?${t}`);if(!a.ok)return[];let s=(await a.json()).data??[];return x.set(e.url,{data:s,expiresAt:Date.now()+6e5}),s}catch{return[]}}var h=a(14051),b=a.n(h);function g({model:e,fullModel:t,alias:a,copied:i,onCopy:l,testStatus:r,isCustom:n,isFree:o,onDeleteAlias:d,onTest:c,isTesting:m,onDisable:p}){let x="ok"===r?"#22c55e":"error"===r?"#ef4444":void 0;return(0,s.jsx)("div",{className:`group min-w-0 max-w-full rounded-lg border px-3 py-2 ${"ok"===r?"border-green-500/40":"error"===r?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:(0,s.jsxs)("div",{className:"flex min-w-0 items-start gap-2 sm:items-center",children:[(0,s.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base",style:x?{color:x}:void 0,children:"ok"===r?"check_circle":"error"===r?"cancel":"smart_toy"}),(0,s.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[(0,s.jsx)("code",{className:"max-w-[72vw] truncate rounded bg-sidebar px-1.5 py-0.5 font-mono text-xs text-text-muted sm:max-w-[360px]",children:t}),e.name&&(0,s.jsx)("span",{className:"truncate pl-1 text-[9px] italic text-text-muted/70",children:e.name})]}),c&&(0,s.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,s.jsx)("button",{onClick:c,disabled:m,className:`rounded p-0.5 text-text-muted transition-opacity hover:bg-sidebar hover:text-primary ${m?"opacity-100":"opacity-100 sm:opacity-0 sm:group-hover:opacity-100"}`,children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",style:m?{animation:"spin 1s linear infinite"}:void 0,children:m?"progress_activity":"science"})}),(0,s.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:m?"Testing...":"Test"})]}),(0,s.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,s.jsx)("button",{onClick:()=>l(t,`model-${e.id}`),className:"rounded p-0.5 text-text-muted hover:bg-sidebar hover:text-primary",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:i===`model-${e.id}`?"check":"content_copy"})}),(0,s.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,s.jsx)("button",{onClick:d,className:"ml-auto rounded p-0.5 text-text-muted opacity-100 transition-opacity hover:bg-red-500/10 hover:text-red-500 sm:opacity-0 sm:group-hover:opacity-100",title:"Remove custom model",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):p?(0,s.jsx)("button",{onClick:p,className:"ml-auto rounded p-0.5 text-text-muted opacity-100 transition-opacity hover:bg-red-500/10 hover:text-red-500 sm:opacity-0 sm:group-hover:opacity-100",title:"Disable this model",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):null]})})}function f({modelId:e,fullModel:t,copied:a,onCopy:i,onDeleteAlias:l,onTest:r,testStatus:n,isTesting:o}){let d=`model_support:${e}`,c="ok"===n?"#22c55e":"error"===n?"#ef4444":void 0;return(0,s.jsxs)("div",{className:`flex items-center gap-3 p-3 rounded-lg border ${"ok"===n?"border-green-500/40":"error"===n?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted",style:c?{color:c}:void 0,children:"ok"===n?"check_circle":"error"===n?"cancel":"smart_toy"}),(0,s.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,s.jsx)("p",{className:"text-sm font-medium truncate",children:e}),(0,s.jsxs)("div",{className:"flex items-center gap-1 mt-1",children:[(0,s.jsx)("code",{className:"text-xs text-text-muted font-mono bg-sidebar px-1.5 py-0.5 rounded",children:t}),(0,s.jsxs)("div",{className:"relative group/btn",children:[(0,s.jsx)("button",{onClick:()=>i(t,`model-${e}`),className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:a===`model-${e}`?"check":"content_copy"})}),(0,s.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:a===`model-${e}`?"Copied!":"Copy"})]}),r&&(0,s.jsxs)("div",{className:"relative group/btn",children:[(0,s.jsx)("button",{onClick:r,disabled:o,className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary transition-colors",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",style:o?{animation:"spin 1s linear infinite"}:void 0,children:o?"progress_activity":"science"})}),(0,s.jsx)("span",{className:"pointer-events-none absolute top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:o?"Testing...":"Test"})]})]}),(0,s.jsxs)("div",{className:"mt-2 flex flex-wrap items-center gap-1.5",children:[(0,s.jsx)("span",{className:"text-[10px] text-text-muted",children:"LAN tag:"}),(0,s.jsx)("code",{className:"rounded bg-primary/10 px-1.5 py-0.5 font-mono text-[10px] text-primary",children:d}),(0,s.jsx)("button",{type:"button",onClick:()=>i(d,`tag-${e}`),className:"rounded px-1 py-0.5 text-[10px] text-text-muted hover:bg-sidebar hover:text-primary",title:"Copy model_support tag",children:a===`tag-${e}`?"Copied":"Copy tag"})]})]}),(0,s.jsx)("button",{onClick:l,className:"p-1 hover:bg-red-50 rounded text-red-500",title:"Remove model",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"delete"})})]})}function y({providerStorageAlias:e,providerDisplayAlias:t,modelAliases:a,copied:l,onCopy:r,onSetAlias:n,onDeleteAlias:o,connections:c,isAnthropic:m}){let[p,x]=(0,i.useState)(""),[u,h]=(0,i.useState)(!1),[b,g]=(0,i.useState)(!1),[v,j]=(0,i.useState)(null),[k,N]=(0,i.useState)({}),w=async t=>{if(!v){j(t);try{let a=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${e}/${t}`})}),s=await a.json();N(e=>({...e,[t]:s.ok?"ok":"error"}))}catch{N(e=>({...e,[t]:"error"}))}finally{j(null)}}},C=Object.entries(a).filter(([,t])=>t.startsWith(`${e}/`)).map(([t,a])=>({modelId:a.replace(`${e}/`,""),fullModel:a,alias:t})),S=s=>{let i,l=`${e}/${s}`;if(Object.values(a).includes(l))return null;let r=(i=s.split("/"))[i.length-1];if(!a[r])return r;let n=`${t}-${r}`;return a[n]?null:n},T=async()=>{if(!p.trim()||u)return;let t=p.trim(),a=S(t);if(!a)return void alert("All suggested aliases already exist. Please choose a different model or remove conflicting aliases.");h(!0);try{await n(t,a,e),x("")}catch(e){console.log("Error adding model:",e)}finally{h(!1)}},A=async()=>{if(b)return;let t=c.find(e=>!1!==e.isActive);if(t){g(!0);try{let a=await fetch(`/api/providers/${t.id}/models`),s=await a.json();if(!a.ok)return void alert(s.error||"Failed to import models");let i=s.models||[];if(0===i.length)return void alert("No models returned from /models.");let l=0;for(let t of i){let a=t.id||t.name||t.model;if(!a)continue;let s=S(a);s&&(await n(a,s,e),l+=1)}0===l&&alert("No new models were added.")}catch(e){console.log("Error importing models:",e)}finally{g(!1)}}},$=c.some(e=>!1!==e.isActive);return(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("p",{className:"text-sm text-text-muted",children:["Add ",m?"Anthropic":"OpenAI","-compatible models manually or import them from the /models endpoint. Each model also shows a ",(0,s.jsx)("code",{className:"rounded bg-sidebar px-1 py-0.5 font-mono text-xs",children:"model_support:*"})," tag you can paste into an Ollama endpoint label for Combo tag routing."]}),(0,s.jsxs)("div",{className:"flex items-end gap-2 flex-wrap",children:[(0,s.jsxs)("div",{className:"flex-1 min-w-[240px]",children:[(0,s.jsx)("label",{htmlFor:"new-compatible-model-input",className:"text-xs text-text-muted mb-1 block",children:"Model ID"}),(0,s.jsx)("input",{id:"new-compatible-model-input",type:"text",value:p,onChange:e=>x(e.target.value),onKeyDown:e=>"Enter"===e.key&&T(),placeholder:m?"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,s.jsx)(d.$n,{size:"sm",icon:"add",onClick:T,disabled:!p.trim()||u,children:u?"Adding...":"Add"}),(0,s.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"download",onClick:A,disabled:!$||b,children:b?"Importing...":"Import from /models"})]}),!$&&(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Add a connection to enable importing models."}),C.length>0&&(0,s.jsx)("div",{className:"flex flex-col gap-3",children:C.map(({modelId:e,fullModel:a,alias:i})=>(0,s.jsx)(f,{modelId:e,fullModel:`${t}/${e}`,copied:l,onCopy:r,onDeleteAlias:()=>o(i),onTest:c.length>0?()=>w(e):void 0,testStatus:k[e],isTesting:v===e},a))})]})}function v({until:e}){let[t,a]=(0,i.useState)("");return((0,i.useEffect)(()=>{let t=()=>{let t=new Date(e).getTime()-Date.now();if(t<=0)return void a("");let s=Math.floor(t/1e3);if(s<60)a(`${s}s`);else if(s<3600)a(`${Math.floor(s/60)}m ${s%60}s`);else{let e=Math.floor(s/3600),t=Math.floor(s%3600/60);a(`${e}h ${t}m`)}};t();let s=setInterval(t,1e3);return()=>clearInterval(s)},[e]),t)?(0,s.jsxs)("span",{className:"text-xs text-orange-500 font-mono",children:["⏱ ",t]}):null}function j(e){if(!e)return"never";try{return new Date(e).toLocaleString()}catch{return e}}function k(e={}){let t=e&&"object"==typeof e?e:{};return{enabled:!0===t.enabled,intervalSec:Math.max(10,Number.parseInt(t.intervalSec||60,10)||60),failureThreshold:Math.max(1,Number.parseInt(t.failureThreshold||3,10)||3),timeoutMs:Math.max(1e3,Number.parseInt(t.timeoutMs||15e3,10)||15e3),prompt:t.prompt||"Say hi",disableThinking:!1!==t.disableThinking}}function N({connection:e,proxyPools:t,isOAuth:a,isFirst:l,isLast:r,onMoveUp:n,onMoveDown:o,onToggleActive:c,onUpdateProxy:m,onEdit:p,onDelete:x,oneByOneStatus:u=null,providerHealthConfig:h=null,healthCheckRunning:b=!1,onRunHealthCheck:g=null}){let[f,y]=(0,i.useState)(!1),[w,C]=(0,i.useState)(!1),S=(0,i.useRef)(null),T=new Map((t||[]).map(e=>[e.id,e])),A=e.providerSpecificData?.proxyPoolId||null,$=A?T.get(A):null,I=e.providerSpecificData?.connectionProxyEnabled===!0&&!!e.providerSpecificData?.connectionProxyUrl,O=!!A||I,P=$?`Pool: ${$.name}`:A?`Pool: ${A} (inactive/missing)`:I?`Legacy: ${e.providerSpecificData?.connectionProxyUrl}`:"",R="";if($?.proxyUrl||e.providerSpecificData?.connectionProxyUrl){let t=$?.proxyUrl||e.providerSpecificData?.connectionProxyUrl;try{let e=new URL(t);R=`${e.protocol}//${e.hostname}${e.port?`:${e.port}`:""}`}catch{R=t}}let E=$?.noProxy||e.providerSpecificData?.connectionNoProxy||"",D=function(e={}){let t=e.tags||e.labels||e.providerSpecificData?.routingTags||e.providerSpecificData?.tags||e.providerSpecificData?.labels||[];return Array.isArray(t)?t.map(e=>String(e||"").trim()).filter(Boolean):"string"==typeof t?t.split(/[\n,;\s]+/).map(e=>e.trim()).filter(Boolean):t&&"object"==typeof t?Object.entries(t).filter(([,e])=>!1!==e&&null!=e).map(([e,t])=>!0===t?e:`${e}:${t}`):[]}(e),F=e.providerSpecificData?.maxInFlight||e.maxInFlight||null,U="default";$?.isActive===!0?U="success":(A||I)&&(U="error"),(0,i.useEffect)(()=>{if(!f)return;let e=e=>{S.current&&!S.current.contains(e.target)&&y(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[f]);let M=async e=>{C(!0);try{await m("__none__"===e?null:e)}finally{C(!1),y(!1)}},_=e.authType||(a?"oauth":"apikey"),z="oauth"===_,L="cookie"===_,q=e=>"string"==typeof e&&/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e),K=z?q(e.email)?e.email:q(e.name)?e.name:e.name||e.email||e.displayName||"OAuth Account":e.name||e.email||e.displayName||"API Key",[H,J]=(0,i.useState)(!1),W=Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>e).filter(e=>!!e).sort()[0]||null;(0,i.useEffect)(()=>{let t=()=>{J(!!Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>e).filter(e=>e&&new Date(e).getTime()>Date.now()).sort()[0])};t();let a=W?setInterval(t,1e3):null;return()=>{a&&clearInterval(a)}},[W]);let B="unavailable"!==e.testStatus||H?e.testStatus:"active",G=()=>u?"queued"===u.state?"queued":"testing"===u.state?"testing":"success"===u.state?"success":"failed"===u.state?u.error?`failed: ${u.error}`:"failed":null:null,V=function(e={},t=null){let a=t&&"object"==typeof t?t:{};return!0===a.overrideConnections?{healthCheck:k(a.healthCheck||a),source:"provider",override:!0}:{healthCheck:k(e.healthCheck||{}),source:"account",override:!1}}(e,h),Q=V.healthCheck,Z=!0===Q.enabled,X=e.healthStatus||"unknown",Y=Number(e.healthConsecutiveFailures||0),ee=Number(Q.failureThreshold||3),et=Z?"degraded"===X?`Health: Degraded ${Y}/${ee}`:"dead"===X?"Health: Dead":"alive"===X?"Health: Alive":"Health: Unknown":"Health: off";return(0,s.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,s.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-2 sm:items-center sm:gap-3",children:[(0,s.jsxs)("div",{className:"flex shrink-0 flex-col",children:[(0,s.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,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_up"})}),(0,s.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,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_down"})})]}),(0,s.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base text-text-muted",children:L?"cookie":z?"lock":"key"}),(0,s.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,s.jsx)("p",{className:"text-sm font-medium truncate",children:K}),(0,s.jsxs)("div",{className:"mt-1 flex min-w-0 flex-wrap items-center gap-1.5 sm:gap-2",children:[(0,s.jsx)(d.Ex,{variant:!1===e.isActive?"default":"active"===B||"success"===B?"success":"error"===B||"expired"===B||"unavailable"===B?"error":"default",size:"sm",dot:!0,children:!1===e.isActive?"disabled":B||"Unknown"}),(0,s.jsx)(d.Ex,{variant:"default",size:"sm",children:z?"OAuth":L?"Cookie":"API Key"}),O&&(0,s.jsx)(d.Ex,{variant:U,size:"sm",children:"Proxy"}),F&&(0,s.jsxs)(d.Ex,{variant:"default",size:"sm",children:["max ",F," in-flight"]}),D.slice(0,3).map(e=>(0,s.jsx)(d.Ex,{variant:"primary",size:"sm",children:e},e)),D.length>3&&(0,s.jsxs)(d.Ex,{variant:"default",size:"sm",children:["+",D.length-3," tags"]}),H&&!1!==e.isActive&&(0,s.jsx)(v,{until:W}),e.lastError&&!1!==e.isActive&&(0,s.jsx)("span",{className:"max-w-full truncate text-xs text-red-500 sm:max-w-[300px]",title:e.lastError,children:e.lastError}),(0,s.jsxs)("span",{className:"text-xs text-text-muted",children:["#",e.priority]}),e.globalPriority&&(0,s.jsxs)("span",{className:"text-xs text-text-muted",children:["Auto: ",e.globalPriority]}),G()&&(0,s.jsx)(d.Ex,{variant:u?"success"===u.state?"success":"failed"===u.state?"error":"testing"===u.state?"primary":"default":"default",size:"sm",children:G()})]}),(0,s.jsxs)("div",{className:"mt-2 flex flex-wrap items-center gap-2 text-xs text-text-muted",children:[" ",(0,s.jsx)(d.Ex,{variant:"alive"===X?"success":"dead"===X?"error":"default",children:et})," ",(0,s.jsx)("span",{children:V.override?"provider policy":"account policy"})," ",(0,s.jsxs)("span",{children:["last check: ",j(e.healthLastCheckedAt)]})," ",null!=e.healthLastLatencyMs&&(0,s.jsxs)("span",{children:[e.healthLastLatencyMs,"ms"]})," ",e.healthLastRecoveredAt&&(0,s.jsxs)("span",{children:["recovered: ",j(e.healthLastRecoveredAt)]})," ",e.healthLastError&&(0,s.jsx)("span",{className:"text-red-500",children:e.healthLastError})," ",(0,s.jsx)("button",{type:"button",onClick:g||void 0,disabled:!g||b,className:"rounded border border-border px-2 py-1 text-xs text-text-main transition-colors hover:border-primary hover:text-primary disabled:cursor-not-allowed disabled:opacity-50",children:b?"Checking...":"Run health check now"})," "]})," ",D.length>0&&(0,s.jsxs)("div",{className:"mt-1 flex items-center gap-1.5 flex-wrap",children:[(0,s.jsx)("span",{className:"text-[11px] text-text-muted",children:"routing tags:"}),D.map(e=>(0,s.jsx)("code",{className:"rounded bg-primary/10 px-1 py-0.5 font-mono text-[10px] text-primary",children:e},e))]}),O&&(0,s.jsxs)("div",{className:"mt-1 flex items-center gap-2 flex-wrap",children:[(0,s.jsx)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[420px]",title:P,children:P}),R&&(0,s.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:R}),E&&(0,s.jsxs)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[320px]",title:E,children:["no_proxy: ",E]})]})]})]}),(0,s.jsxs)("div",{className:"flex w-full items-center justify-between gap-2 sm:w-auto sm:justify-end",children:[(0,s.jsxs)("div",{className:"grid flex-1 grid-cols-3 gap-1 sm:flex sm:flex-none",children:[(t||[]).length>0&&(0,s.jsxs)("div",{className:"relative",ref:S,children:[(0,s.jsxs)("button",{onClick:()=>y(e=>!e),className:`flex w-full flex-col items-center rounded px-2 py-1 transition-colors hover:bg-black/5 dark:hover:bg-white/5 ${O?"text-primary":"text-text-muted hover:text-primary"}`,disabled:w,children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:w?"progress_activity":"lan"}),(0,s.jsx)("span",{className:"text-[10px] leading-tight",children:"Proxy"})]}),f&&(0,s.jsxs)("div",{className:"absolute right-0 top-full z-50 mt-1 max-w-[78vw] min-w-[160px] rounded-lg border border-border bg-bg py-1 shadow-lg",children:[(0,s.jsx)("button",{onClick:()=>M("__none__"),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${!A?"text-primary font-medium":"text-text-main"}`,children:"None"}),(t||[]).map(e=>(0,s.jsx)("button",{onClick:()=>M(e.id),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${A===e.id?"text-primary font-medium":"text-text-main"}`,children:e.name},e.id))]})]}),(0,s.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,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,s.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,s.jsxs)("button",{onClick:x,className:"flex flex-col items-center rounded px-2 py-1 text-red-500 hover:bg-red-500/10",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,s.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]}),(0,s.jsx)(d.lM,{size:"sm",checked:e.isActive??!0,onChange:c,title:e.isActive??!0?"Disable connection":"Enable connection"})]})]})}g.propTypes={model:b().shape({id:b().string.isRequired}).isRequired,fullModel:b().string.isRequired,alias:b().string,copied:b().string,onCopy:b().func.isRequired,testStatus:b().oneOf(["ok","error"]),isCustom:b().bool,isFree:b().bool,onDeleteAlias:b().func,onTest:b().func,isTesting:b().bool,onDisable:b().func},b().string.isRequired,b().string.isRequired,b().string,b().func.isRequired,b().func.isRequired,b().func,b().oneOf(["ok","error"]),b().bool,b().string.isRequired,b().object.isRequired,b().string,b().func.isRequired,b().func.isRequired,b().func.isRequired,y.propTypes={providerStorageAlias:b().string.isRequired,providerDisplayAlias:b().string.isRequired,modelAliases:b().object.isRequired,copied:b().string,onCopy:b().func.isRequired,onSetAlias:b().func.isRequired,onDeleteAlias:b().func.isRequired,connections:b().arrayOf(b().shape({id:b().string,isActive:b().bool})).isRequired,isAnthropic:b().bool},v.propTypes={until:b().string.isRequired},N.propTypes={connection:b().shape({id:b().string,name:b().string,email:b().string,displayName:b().string,modelLockUntil:b().string,testStatus:b().string,isActive:b().bool,lastError:b().string,priority:b().number,globalPriority:b().number,providerSpecificData:b().object,tags:b().oneOfType([b().string,b().array]),labels:b().oneOfType([b().string,b().array]),maxInFlight:b().oneOfType([b().string,b().number]),healthCheck:b().object,healthStatus:b().string,healthConsecutiveFailures:b().number,healthLastCheckedAt:b().string,healthLastOkAt:b().string,healthLastRecoveredAt:b().string,healthLastLatencyMs:b().number,healthLastError:b().string}).isRequired,proxyPools:b().arrayOf(b().shape({id:b().string,name:b().string,proxyUrl:b().string,noProxy:b().string,isActive:b().bool})),isOAuth:b().bool.isRequired,isFirst:b().bool.isRequired,isLast:b().bool.isRequired,onMoveUp:b().func.isRequired,onMoveDown:b().func.isRequired,onToggleActive:b().func.isRequired,onUpdateProxy:b().func,onEdit:b().func.isRequired,onDelete:b().func.isRequired,oneByOneStatus:b().shape({state:b().string,error:b().string}),providerHealthConfig:b().object,healthCheckRunning:b().bool,onRunHealthCheck:b().func};let w=[{value:1,label:"Mon"},{value:2,label:"Tue"},{value:3,label:"Wed"},{value:4,label:"Thu"},{value:5,label:"Fri"},{value:6,label:"Sat"},{value:0,label:"Sun"}],C=[0,1,2,3,4,5,6],S={enabled:!0,weekdays:C,fromTime:"00:00",toTime:"23:59"},T={enabled:!1,intervalSec:60,failureThreshold:3,timeoutMs:15e3,prompt:"Say hi",disableThinking:!0};function A(e,t){let a=String(e||"").trim();return/^([01]\d|2[0-3]):([0-5]\d)$/.test(a)?a:t}function $(e={}){let t=e&&"object"==typeof e?e:{},a=Array.isArray(t.weekdays)?t.weekdays.map(Number).filter(e=>e>=0&&e<=6):C;return{enabled:!1!==t.enabled,weekdays:[...new Set(a)].sort((e,t)=>e-t),fromTime:A(t.fromTime||t.from,"00:00"),toTime:A(t.toTime||t.to,"23:59")}}function I(e={}){return{overrideConnections:!0===e.overrideConnections,schedule:$(e.schedule||S)}}function O(e={}){let t=e&&"object"==typeof e?e:{};return{enabled:!0===t.enabled,intervalSec:Math.max(10,Number.parseInt(t.intervalSec||T.intervalSec,10)||T.intervalSec),failureThreshold:Math.max(1,Number.parseInt(t.failureThreshold||T.failureThreshold,10)||T.failureThreshold),timeoutMs:Math.max(1e3,Number.parseInt(t.timeoutMs||T.timeoutMs,10)||T.timeoutMs),prompt:"string"==typeof t.prompt&&t.prompt.trim()?t.prompt.trim():T.prompt,disableThinking:!1!==t.disableThinking}}function P(e={}){return{overrideConnections:!0===e.overrideConnections,healthCheck:O(e.healthCheck||e||T)}}function R({providerId:e,onSaved:t}){let[a,l]=(0,i.useState)(I()),[r,n]=(0,i.useState)(P()),[o,d]=(0,i.useState)(!0),[c,m]=(0,i.useState)(!1),[p,x]=(0,i.useState)(!1);(0,i.useEffect)(()=>{let t=!1;return async function(){try{let a=await fetch("/api/settings",{cache:"no-store"}),s=a.ok?await a.json():{};t||(l(I((s.providerSchedules||{})[e]||{})),n(P((s.providerHealthChecks||{})[e]||{})))}finally{t||d(!1)}}(),()=>{t=!0}},[e]);let u=e=>{l(t=>({...t,schedule:$({...t.schedule,...e})})),x(!1)},h=e=>{n(t=>({...t,healthCheck:O({...t.healthCheck,...e})})),x(!1)},b=async()=>{m(!0),x(!1);try{let s=await fetch("/api/settings",{cache:"no-store"}),i=s.ok?await s.json():{},l={...i.providerSchedules||{},[e]:I(a)},n={...i.providerHealthChecks||{},[e]:P(r)};(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerSchedules:l,providerHealthChecks:n})})).ok&&(x(!0),"function"==typeof t&&await t())}finally{m(!1)}};return o?null:(0,s.jsxs)("div",{className:"mb-4 space-y-4 rounded-xl border border-border bg-card p-4",children:[(0,s.jsxs)("div",{className:"rounded-xl border border-border/70 p-3",children:[(0,s.jsxs)("div",{className:"mb-3 flex flex-col gap-2 sm:flex-row sm:items-start sm:justify-between",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"font-semibold text-text-main",children:"Provider Scheduler Override"}),(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"When enabled, every account in this provider uses this provider-level schedule and account schedulers are locked."})]}),(0,s.jsxs)("label",{className:"flex items-center gap-2 text-sm text-text-main",children:[(0,s.jsx)("input",{type:"checkbox",checked:a.overrideConnections,onChange:e=>{l(t=>({...t,overrideConnections:e.target.checked})),x(!1)}}),"Override all accounts"]})]}),(0,s.jsxs)("div",{className:"grid gap-3 md:grid-cols-2",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"mb-1 text-xs font-medium text-text-muted",children:"Weekdays"}),(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:w.map(e=>(0,s.jsxs)("label",{className:"flex items-center gap-1 rounded-lg border border-border px-2 py-1 text-xs",children:[(0,s.jsx)("input",{type:"checkbox",checked:(Array.isArray(a.schedule.weekdays)?a.schedule.weekdays:C).includes(e.value),onChange:()=>{var t;return t=e.value,void(l(e=>{let a=new Set(Array.isArray(e.schedule.weekdays)?e.schedule.weekdays:C);a.has(t)?a.delete(t):a.add(t);let s=[...a].sort((e,t)=>e-t);return{...e,schedule:{...e.schedule,weekdays:s}}}),x(!1))}}),e.label]},e.value))}),!1!==a.schedule.enabled&&0===a.schedule.weekdays.length&&(0,s.jsx)("div",{className:"mt-2 rounded-lg border border-amber-300/40 bg-amber-500/10 px-3 py-2 text-xs text-amber-700 dark:text-amber-300",children:"No weekdays selected. This provider schedule will make accounts unavailable until at least one weekday is selected."})]}),(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,s.jsxs)("label",{className:"text-xs font-medium text-text-muted",children:["From time",(0,s.jsx)("input",{type:"time",value:a.schedule.fromTime,onChange:e=>u({fromTime:e.target.value}),className:"mt-1 w-full rounded-lg border border-border bg-background px-3 py-2 text-sm text-text-main outline-none focus:border-primary"})]}),(0,s.jsxs)("label",{className:"text-xs font-medium text-text-muted",children:["To time",(0,s.jsx)("input",{type:"time",value:a.schedule.toTime,onChange:e=>u({toTime:e.target.value}),className:"mt-1 w-full rounded-lg border border-border bg-background px-3 py-2 text-sm text-text-main outline-none focus:border-primary"})]})]})]})]}),(0,s.jsxs)("div",{className:"rounded-xl border border-border/70 p-3",children:[(0,s.jsxs)("div",{className:"mb-3 flex flex-col gap-2 sm:flex-row sm:items-start sm:justify-between",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"font-semibold text-text-main",children:"Provider Health Check Override"}),(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"When enabled, every account in this provider uses the same periodic ping policy and account health settings are locked."})]}),(0,s.jsxs)("label",{className:"flex items-center gap-2 text-sm text-text-main",children:[(0,s.jsx)("input",{type:"checkbox",checked:r.overrideConnections,onChange:e=>{n(t=>({...t,overrideConnections:e.target.checked})),x(!1)}}),"Override all accounts"]})]}),(0,s.jsxs)("label",{className:"mb-3 flex items-center gap-2 text-sm text-text-main",children:[(0,s.jsx)("input",{type:"checkbox",checked:!0===r.healthCheck.enabled,onChange:e=>h({enabled:e.target.checked})}),"Enable periodic ping healthcheck"]}),(0,s.jsxs)("div",{className:"grid gap-3 md:grid-cols-4",children:[(0,s.jsxs)("label",{className:"text-xs font-medium text-text-muted",children:["Interval seconds",(0,s.jsx)("input",{type:"number",min:"10",value:r.healthCheck.intervalSec,disabled:!r.healthCheck.enabled,onChange:e=>h({intervalSec:Math.max(10,Number.parseInt(e.target.value,10)||60)}),className:"mt-1 w-full rounded-lg border border-border bg-background px-3 py-2 text-sm text-text-main outline-none focus:border-primary disabled:opacity-50"})]}),(0,s.jsxs)("label",{className:"text-xs font-medium text-text-muted",children:["Fail threshold",(0,s.jsx)("input",{type:"number",min:"1",max:"20",value:r.healthCheck.failureThreshold,disabled:!r.healthCheck.enabled,onChange:e=>h({failureThreshold:Math.max(1,Number.parseInt(e.target.value,10)||3)}),className:"mt-1 w-full rounded-lg border border-border bg-background px-3 py-2 text-sm text-text-main outline-none focus:border-primary disabled:opacity-50"})]}),(0,s.jsxs)("label",{className:"text-xs font-medium text-text-muted",children:["Timeout ms",(0,s.jsx)("input",{type:"number",min:"1000",step:"1000",value:r.healthCheck.timeoutMs,disabled:!r.healthCheck.enabled,onChange:e=>h({timeoutMs:Math.max(1e3,Number.parseInt(e.target.value,10)||15e3)}),className:"mt-1 w-full rounded-lg border border-border bg-background px-3 py-2 text-sm text-text-main outline-none focus:border-primary disabled:opacity-50"})]}),(0,s.jsxs)("label",{className:"text-xs font-medium text-text-muted",children:["Prompt",(0,s.jsx)("input",{type:"text",value:r.healthCheck.prompt,disabled:!r.healthCheck.enabled,onChange:e=>h({prompt:e.target.value}),className:"mt-1 w-full rounded-lg border border-border bg-background px-3 py-2 text-sm text-text-main outline-none focus:border-primary disabled:opacity-50"})]})]}),(0,s.jsxs)("label",{className:"mt-3 flex items-center gap-2 text-xs text-text-muted",children:[(0,s.jsx)("input",{type:"checkbox",checked:!1!==r.healthCheck.disableThinking,disabled:!r.healthCheck.enabled,onChange:e=>h({disableThinking:e.target.checked})}),"Force lightweight test payload / disable thinking when provider supports it"]})]}),(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("button",{type:"button",onClick:b,disabled:c,className:"rounded-lg bg-primary px-3 py-2 text-sm font-medium text-white disabled:cursor-not-allowed disabled:opacity-60",children:c?"Saving...":"Save Provider Policy"}),p&&(0,s.jsx)("span",{className:"text-sm text-green-600",children:"Saved"})]})]})}let E=`name1|sk-key1
|
|
2
2
|
name2|sk-key2
|
|
3
|
-
sk-key-only-auto-named`;function D({isOpen:e,provider:t,providerName:a,isCompatible:l,isAnthropic:r,authType:n,authHint:o,website:m,proxyPools:p,error:x,onSave:u,onBulkDone:h,onClose:b}){let g="__none__",f="ollama-local"===t,y="cookie"===n,v="xai"===t&&!y,j=y?"Cookie Value":"API Key",k="azure"===t,N="cloudflare-ai"===t,w=c.Q2?.[t]?.regions||null,C=c.Q2?.[t]?.defaultRegion||w?.[0]?.id||"",[S,T]=(0,i.useState)({name:"",apiKey:"",defaultModel:"",priority:1,proxyPoolId:g,ollamaHostUrl:""}),[A,$]=(0,i.useState)({azureEndpoint:"",apiVersion:"2024-10-01-preview",deployment:"",organization:""}),[I,O]=(0,i.useState)({accountId:""}),[P,R]=(0,i.useState)(C),[F,U]=(0,i.useState)(!1),[M,_]=(0,i.useState)(null),[z,L]=(0,i.useState)(!1),[q,K]=(0,i.useState)("single"),[H,J]=(0,i.useState)(""),[W,B]=(0,i.useState)(null),G=()=>f&&S.ollamaHostUrl.trim()?{baseUrl:S.ollamaHostUrl.trim()}:k?{azureEndpoint:A.azureEndpoint,apiVersion:A.apiVersion,deployment:A.deployment,organization:A.organization}:N?{accountId:I.accountId}:w&&P?{region:P}:void 0,V=async()=>{U(!0);try{let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:S.apiKey,providerSpecificData:G()})}),a=await e.json();_(a.valid?"success":"failed")}catch{_("failed")}finally{U(!1)}},Q=async()=>{if(t&&(f||S.apiKey)&&(f||S.name)&&(!l||S.defaultModel.trim())){L(!0);try{let e=!1;try{U(!0),_(null);let a=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:S.apiKey,providerSpecificData:G()})});e=!!(await a.json()).valid,_(e?"success":"failed")}catch{_("failed")}finally{U(!1)}await u({name:S.name||(f?"Ollama Local":""),apiKey:S.apiKey,defaultModel:l?S.defaultModel.trim():void 0,priority:S.priority,proxyPoolId:S.proxyPoolId===g?null:S.proxyPoolId,testStatus:e?"active":"unknown",providerSpecificData:G()})}finally{L(!1)}}},Z=async()=>{let e=H.split("\n").map(e=>e.trim()).filter(Boolean);if(!e.length)return;L(!0),B(null);let a=0,s=0;for(let i=0;i<e.length;i++){let l=e[i].split("|"),r=l.length>=2?l.slice(1).join("|").trim():l[0].trim(),n=l.length>=2?l[0].trim():"Key",o=`${n} ${i+1}`;try{(await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:r,name:o,priority:1,testStatus:"unknown"})})).ok?a++:s++}catch{s++}}L(!1),B({success:a,failed:s}),a>0&&h&&h()};return t?(0,s.jsx)(d.aF,{isOpen:e,title:`Add ${a||t} ${j}`,onClose:b,children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(d.$n,{size:"sm",variant:"single"===q?"primary":"ghost",onClick:()=>{K("single"),B(null)},children:"Single"}),(0,s.jsx)(d.$n,{size:"sm",variant:"bulk"===q?"primary":"ghost",onClick:()=>{K("bulk"),B(null)},children:"Bulk Add"})]}),"bulk"===q&&(0,s.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,s.jsxs)("p",{className:"text-xs text-text-muted",children:["One key per line. Format: ",(0,s.jsx)("code",{children:"name|apiKey"})," or just ",(0,s.jsx)("code",{children:"apiKey"})," (auto-named by index)."]}),(0,s.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:E,value:H,onChange:e=>J(e.target.value)}),W&&(0,s.jsxs)("div",{className:`text-sm font-medium ${W.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",W.success," added",W.failed>0?`, ✗ ${W.failed} failed`:""]}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(d.$n,{onClick:Z,fullWidth:!0,disabled:z||!H.trim(),children:z?"Adding...":"Add All Keys"}),(0,s.jsx)(d.$n,{onClick:b,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),"single"===q&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(d.pd,{label:"Name",value:S.name,onChange:e=>T({...S,name:e.target.value}),placeholder:f?"Ollama Local":"Production Key"}),f&&(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(d.pd,{label:"Ollama Host URL",value:S.ollamaHostUrl,onChange:e=>T({...S,ollamaHostUrl:e.target.value}),placeholder:"http://localhost:11434",className:"flex-1"}),(0,s.jsx)("div",{className:"pt-6",children:(0,s.jsx)(d.$n,{onClick:V,disabled:F||z,variant:"secondary",children:F?"Checking...":"Check"})})]}),!f&&(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(d.pd,{label:j,type:y?"text":"password",value:S.apiKey,onChange:e=>T({...S,apiKey:e.target.value}),placeholder:y?"grok-web"===t?"sso=xxxxx... or just the raw value":"eyJhbGciOi...":v?"xai-...":"",className:"flex-1"}),(0,s.jsx)("div",{className:"pt-6",children:(0,s.jsx)(d.$n,{onClick:V,disabled:!S.apiKey||F||z,variant:"secondary",children:F?"Checking...":"Check"})})]}),v&&(0,s.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."}),y&&o&&(0,s.jsxs)("p",{className:"text-xs text-text-muted",children:[o,m&&(0,s.jsxs)(s.Fragment,{children:[" ",(0,s.jsxs)("a",{href:m,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:["Open ",m.replace(/^https?:\/\//,"")]})]})]}),w&&(0,s.jsx)(d.l6,{label:"Region",value:P,onChange:e=>R(e.target.value),options:w.map(e=>({value:e.id,label:e.label}))}),l&&(0,s.jsx)(d.pd,{label:"Default Model",value:S.defaultModel,onChange:e=>T({...S,defaultModel:e.target.value}),placeholder:r?"claude-3-5-sonnet-latest":"gpt-4o-mini"}),f&&(0,s.jsxs)("p",{className:"text-xs text-text-muted",children:["Leave blank to use ",(0,s.jsx)("code",{children:"http://localhost:11434"}),". For remote Ollama, enter the full host URL (e.g. ",(0,s.jsx)("code",{children:"http://192.168.1.10:11434"}),")."]}),M&&(0,s.jsx)(d.Ex,{variant:"success"===M?"success":"error",children:"success"===M?"Valid":"Invalid"}),x&&(0,s.jsx)("p",{className:"text-xs text-red-500 break-words",children:x}),l&&(0,s.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,s.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,s.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Cloudflare Workers AI"}),(0,s.jsx)(d.pd,{label:"Account ID",value:I.accountId,onChange:e=>O({...I,accountId:e.target.value}),placeholder:"abc123def456..."}),(0,s.jsxs)("p",{className:"text-xs text-text-muted mt-2",children:["Find your Account ID in the right sidebar of ",(0,s.jsx)("a",{href:"https://dash.cloudflare.com",target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:"dash.cloudflare.com"})]})]}),k&&(0,s.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,s.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Azure OpenAI Configuration"}),(0,s.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,s.jsx)(d.pd,{label:"Azure Endpoint",value:A.azureEndpoint,onChange:e=>$({...A,azureEndpoint:e.target.value}),placeholder:"https://your-resource.openai.azure.com"}),(0,s.jsx)(d.pd,{label:"Deployment Name",value:A.deployment,onChange:e=>$({...A,deployment:e.target.value}),placeholder:"gpt-4"}),(0,s.jsx)(d.pd,{label:"API Version",value:A.apiVersion,onChange:e=>$({...A,apiVersion:e.target.value}),placeholder:"2024-10-01-preview"}),(0,s.jsx)(d.pd,{label:"Organization",value:A.organization,onChange:e=>$({...A,organization:e.target.value}),placeholder:"Organization ID"})]})]}),(0,s.jsx)(d.pd,{label:"Priority",type:"number",value:S.priority,onChange:e=>T({...S,priority:Number.parseInt(e.target.value)||1})}),(0,s.jsx)(d.l6,{label:"Proxy Pool",value:S.proxyPoolId,onChange:e=>T({...S,proxyPoolId:e.target.value}),options:[{value:g,label:"None"},...(p||[]).map(e=>({value:e.id,label:e.name}))],placeholder:"None"}),0===(p||[]).length&&(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"No active proxy pools available. Create one in Proxy Pools page first."}),(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Legacy manual proxy fields are still accepted by API for backward compatibility."}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(d.$n,{onClick:Q,fullWidth:!0,disabled:z||!f&&(!S.name||!S.apiKey)||l&&!S.defaultModel.trim()||k&&(!A.azureEndpoint||!A.deployment||!A.organization)||N&&!I.accountId,children:z?"Saving...":"Save"}),(0,s.jsx)(d.$n,{onClick:b,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})}):null}function F({isOpen:e,node:t,onSave:a,onClose:l,isAnthropic:r}){let[n,o]=(0,i.useState)({name:"",prefix:"",apiType:"chat",baseUrl:"https://api.openai.com/v1",routingTags:"",maxInFlight:""}),[c,m]=(0,i.useState)(!1),[p,x]=(0,i.useState)(""),[u,h]=(0,i.useState)(""),[b,g]=(0,i.useState)(!1),[f,y]=(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"),routingTags:Array.isArray(t.providerSpecificData?.routingTags||t.providerSpecificData?.tags||t.tags)?(t.providerSpecificData?.routingTags||t.providerSpecificData?.tags||t.tags).join(", "):t.providerSpecificData?.routingTags||t.providerSpecificData?.tags||t.tags||"",maxInFlight:t.providerSpecificData?.maxInFlight||t.maxInFlight||""})},[t,r]);let v=async()=>{if(n.name.trim()&&n.prefix.trim()&&n.baseUrl.trim()){m(!0);try{let e=String(n.routingTags||"").split(/[\n,;]+/).map(e=>e.trim()).filter(Boolean),s=Number(n.maxInFlight),i={...t.providerSpecificData||{},routingTags:e,tags:e};Number.isFinite(s)&&s>0?i.maxInFlight=s:delete i.maxInFlight;let l={name:n.name,prefix:n.prefix,baseUrl:n.baseUrl,routingTags:e,tags:e,providerSpecificData:i};r||(l.apiType=n.apiType),await a(l)}finally{m(!1)}}},j=async()=>{g(!0);try{let e=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:n.baseUrl,apiKey:p,type:r?"anthropic-compatible":"openai-compatible",modelId:u.trim()||void 0})}),t=await e.json();y(t.valid?"success":"failed")}catch{y("failed")}finally{g(!1)}};return t?(0,s.jsx)(d.aF,{isOpen:e,title:`Edit ${r?"Anthropic":"OpenAI"} Compatible`,onClose:l,children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsx)(d.pd,{label:"Name",value:n.name,onChange:e=>o({...n,name:e.target.value}),placeholder:`${r?"Anthropic":"OpenAI"} Compatible (Prod)`,hint:"Required. A friendly label for this node."}),(0,s.jsx)(d.pd,{label:"Prefix",value:n.prefix,onChange:e=>o({...n,prefix:e.target.value}),placeholder:r?"ac-prod":"oc-prod",hint:"Required. Used as the provider prefix for model IDs."}),!r&&(0,s.jsx)(d.l6,{label:"API Type",options:[{value:"chat",label:"Chat Completions"},{value:"responses",label:"Responses API"}],value:n.apiType,onChange:e=>o({...n,apiType:e.target.value})}),(0,s.jsx)(d.pd,{label:"Base URL",value:n.baseUrl,onChange:e=>o({...n,baseUrl:e.target.value}),placeholder:r?"https://api.anthropic.com/v1":"https://api.openai.com/v1",hint:`Use the base URL (ending in /v1) for your ${r?"Anthropic":"OpenAI"}-compatible API.`}),(0,s.jsx)(d.pd,{label:"Routing Tags / Labels",value:n.routingTags,onChange:e=>o({...n,routingTags:e.target.value}),placeholder:"gpu, vram:8gb, model_support:qwen3:8b",hint:"Comma or newline separated. Used by Combo least-latency/P2C tag rules for LAN Ollama."}),(0,s.jsx)(d.pd,{label:"Max In-flight Requests",type:"number",value:n.maxInFlight,onChange:e=>o({...n,maxInFlight:e.target.value}),placeholder:"2",hint:"Optional per-endpoint concurrency cap used by P2C and circuit-aware routing."}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(d.pd,{label:"API Key (for Check)",type:"password",value:p,onChange:e=>x(e.target.value),className:"flex-1"}),(0,s.jsx)("div",{className:"pt-6",children:(0,s.jsx)(d.$n,{onClick:j,disabled:!p||b||!n.baseUrl.trim(),variant:"secondary",children:b?"Checking...":"Check"})})]}),(0,s.jsx)(d.pd,{label:"Model ID (optional)",value:u,onChange:e=>h(e.target.value),placeholder:"e.g. my-model-id",hint:"If provider lacks /models endpoint, enter a model ID to validate via chat/completions instead."}),f&&(0,s.jsx)(d.Ex,{variant:"success"===f?"success":"error",children:"success"===f?"Valid":"Invalid"}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(d.$n,{onClick:v,fullWidth:!0,disabled:!n.name.trim()||!n.prefix.trim()||!n.baseUrl.trim()||c,children:c?"Saving...":"Save"}),(0,s.jsx)(d.$n,{onClick:l,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}function U({isOpen:e,providerAlias:t,providerDisplayAlias:a,onSave:l,onClose:r}){let[n,o]=(0,i.useState)(""),[c,m]=(0,i.useState)(null),[p,x]=(0,i.useState)(""),[u,h]=(0,i.useState)(!1);(0,i.useEffect)(()=>{e&&(o(""),m(null),x(""))},[e]);let b=e=>{let a=`${t}/`;return e.startsWith(a)?e.slice(a.length):e},g=async()=>{let e=b(n.trim());if(e){m("testing"),x("");try{let a=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${t}/${e}`})}),s=await a.json();m(s.ok?"ok":"error"),x(s.error||"")}catch(e){m("error"),x(e.message)}}},f=async()=>{let e=b(n.trim());if(e&&!u){h(!0);try{await l(e)}finally{h(!1)}}};return(0,s.jsx)(d.aF,{isOpen:e,onClose:r,title:"Add Custom Model",children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Model ID"}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)("input",{type:"text",value:n,onChange:e=>{o(e.target.value),m(null),x("")},onKeyDown:e=>{"Enter"===e.key&&g()},placeholder:"e.g. claude-opus-4-5",className:"flex-1 px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",autoFocus:!0}),(0,s.jsx)(d.$n,{variant:"secondary",icon:"science",loading:"testing"===c,onClick:g,disabled:!n.trim()||"testing"===c,children:"testing"===c?"Testing...":"Test"})]}),(0,s.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:["Sent to provider as: ",(0,s.jsx)("code",{className:"font-mono bg-sidebar px-1 rounded",children:b(n.trim())||"model-id"})]})]}),"ok"===c&&(0,s.jsxs)("div",{className:"flex items-center gap-2 text-sm text-green-600",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-base",children:"check_circle"}),"Model is reachable"]}),"error"===c&&(0,s.jsxs)("div",{className:"flex items-start gap-2 text-sm text-red-500",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-base shrink-0",children:"cancel"}),(0,s.jsx)("span",{children:p||"Model not reachable"})]}),(0,s.jsxs)("div",{className:"flex gap-2 pt-1",children:[(0,s.jsx)(d.$n,{onClick:r,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,s.jsx)(d.$n,{onClick:f,fullWidth:!0,size:"sm",disabled:!n.trim()||u,children:u?"Adding...":"Add Model"})]})]})})}function M(){let e,t=(0,l.useParams)(),a=(0,l.useRouter)(),r=t.id,[x,h]=(0,i.useState)([]),[b,f]=(0,i.useState)(!0),[v,j]=(0,i.useState)(null),[k,w]=(0,i.useState)([]),[C,S]=(0,i.useState)(!1),[T,A]=(0,i.useState)(!1),[$,I]=(0,i.useState)(!1),[O,P]=(0,i.useState)(""),[E,M]=(0,i.useState)(!1),[_,z]=(0,i.useState)(!1),[L,q]=(0,i.useState)(!1),[K,H]=(0,i.useState)(null),[J,W]=(0,i.useState)({}),[B,G]=(0,i.useState)(!1),[V,Q]=(0,i.useState)({}),[Z,X]=(0,i.useState)(""),[Y,ee]=(0,i.useState)(null),[et,ea]=(0,i.useState)(!1),[es,ei]=(0,i.useState)([]),[el,er]=(0,i.useState)("__none__"),[en,eo]=(0,i.useState)(!1),[ed,ec]=(0,i.useState)(null),[em,ep]=(0,i.useState)({}),[ex,eu]=(0,i.useState)(null),[eh,eb]=(0,i.useState)(""),[eg,ef]=(0,i.useState)("global"),[ey,ev]=(0,i.useState)("120"),[ej,ek]=(0,i.useState)(!0),[eN,ew]=(0,i.useState)(!0),[eC,eS]=(0,i.useState)("3"),[eT,eA]=(0,i.useState)("auto"),[e$,eI]=(0,i.useState)([]),[eO,eP]=(0,i.useState)([]),[eR,eE]=(0,i.useState)([]),[eD,eF]=(0,i.useState)(null),[eU,eM]=(0,i.useState)(!1),[e_,ez]=(0,i.useState)(!1),[eL,eq]=(0,i.useState)(!1),[eK,eH]=(0,i.useState)(null),[eJ,eW]=(0,i.useState)({}),[eB,eG]=(0,i.useState)(null),eV=(0,i.useRef)(!1),{copied:eQ,copy:eZ}=(0,p.C)(),eX="ag_risk_confirmed",eY=()=>{S(!0)},e0=()=>{"antigravity"===r&&"true"!==window.localStorage.getItem(eX)?eM(!0):e4?eY():(P(""),I(!0))},e1=()=>{P(""),I(!0)},e2=()=>{e4?e0():e1()},e3=v?{id:v.id,name:v.name||("anthropic-compatible"===v.type?"Anthropic Compatible":"OpenAI Compatible"),color:"anthropic-compatible"===v.type?"#D97757":"#10A37F",textIcon:"anthropic-compatible"===v.type?"AC":"OC",apiType:v.apiType,baseUrl:v.baseUrl,type:v.type}:c.zN[r]||c.fg[r]||c.IS[r]||c.nJ[r]||c.br[r],e5=e3?.authModes||[],e4=!!c.zN[r]||!!c.IS[r]||e5.includes("oauth"),e6=!!c.fg[r]||e5.includes("apikey"),e7=!!c.IS[r]?.noAuth,e8=(0,m.KC)(r),e9=(0,c.wG)(r),te=(0,c.mq)(r),tt=(0,c.gb)(r),ta=te||tt,ts=!ta&&e4&&e6,ti="xai"===r?"Grok Build OAuth":"OAuth",tl="xai"===r?"xAI API Key":"API Key";c.Q2[r]?.thinkingConfig||c.s9.extended;let tr=ta?r:e9,tn=ta?v?.prefix||r:e9,to=(0,i.useCallback)(async()=>{try{let e=await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tr)}`,{cache:"no-store"}),t=await e.json();e.ok&&eE(t.ids||[])}catch(e){console.log("Error fetching disabled models:",e)}},[tr]),td=async e=>{try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:tr,ids:[e]})})).ok&&await to()}catch(e){console.log("Error disabling model:",e)}},tc=async e=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tr)}&id=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await to()}catch(e){console.log("Error enabling model:",e)}},tm=async e=>{e.length&&eF({title:"Disable All Models",message:`Disable all ${e.length} model(s)?`,onConfirm:async()=>{eF(null);try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:tr,ids:e})})).ok&&await to()}catch(e){console.log("Error disabling all models:",e)}}})},tp=async()=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tr)}`,{method:"DELETE"})).ok&&await to()}catch(e){console.log("Error enabling all models:",e)}},tx=(0,i.useCallback)(async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&W(t.aliases||{})}catch(e){console.log("Error fetching aliases:",e)}},[]);(0,i.useEffect)(()=>{"kilocode"===r&&fetch("/api/providers/kilo/free-models").then(e=>e.json()).then(e=>{e.models?.length&&eP(e.models)}).catch(()=>{})},[r]);let tu=(0,i.useCallback)(async()=>{try{let[e,t,a,s]=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(),n=await a.json(),o=s.ok?await s.json():{};if(e.ok){let e=(i.connections||[]).filter(e=>e.provider===r);h(e)}a.ok&&w(n.proxyPools||[]),ec((o.providerHealthChecks||{})[r]||null);let d=(o.providerStrategies||{})[r]||{};eu(d.fallbackStrategy||null),eb(null!=d.stickyRoundRobinLimit?String(d.stickyRoundRobinLimit):"1"),ef(d.stickyScope||"global"),ev(null!=d.stickyTtlMinutes?String(d.stickyTtlMinutes):"120"),ek(!1!==d.stickyFallbackToClientIp),ew(!1!==d.stickyRebindOnFailure),eS(null!=d.stickyRebindFailureThreshold?String(d.stickyRebindFailureThreshold):"3");let c=(o.providerThinking||{})[r]||{};if(eA(c.mode||"auto"),t.ok){let e=(l.nodes||[]).find(e=>e.id===r)||null;if(!e&&ta)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===r)||null))break}j(e)}}catch(e){console.log("Error fetching connections:",e)}finally{f(!1)}},[r,ta]),th=async e=>{try{let t=await fetch(`/api/provider-nodes/${r}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),a=await t.json();t.ok&&(j(a.node),await tu(),z(!1))}catch(e){console.log("Error updating provider node:",e)}},tb=async(e,t,a={})=>{try{let s=await fetch("/api/settings",{cache:"no-store"}),i=(s.ok?await s.json():{}).providerStrategies||{},l={...i[r]||{}};delete l.fallbackStrategy,delete l.stickyRoundRobinLimit,delete l.stickyScope,delete l.stickyTtlMinutes,delete l.stickyFallbackToClientIp,delete l.stickyRebindOnFailure,delete l.stickyRebindFailureThreshold,e&&(l.fallbackStrategy=e),"round-robin"===e&&(l.stickyRoundRobinLimit=Number(t||eh||1)||1,l.stickyScope=a.stickyScope??eg??"global",l.stickyTtlMinutes=Number(a.stickyTtlMinutes??ey??120)||120,l.stickyFallbackToClientIp=void 0!==a.stickyFallbackToClientIp?!!a.stickyFallbackToClientIp:!1!==ej,l.stickyRebindOnFailure=void 0!==a.stickyRebindOnFailure?!!a.stickyRebindOnFailure:!1!==eN,l.stickyRebindFailureThreshold=Number(a.stickyRebindFailureThreshold??eC??3)||3);let n={...i};0===Object.keys(l).length?delete n[r]:n[r]=l,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:n})})}catch(e){console.log("Error saving provider strategy:",e)}};(0,i.useEffect)(()=>{tu(),tx(),to()},[tu,tx,to]),(0,i.useEffect)(()=>{let e=(c.zN[r]||c.fg[r]||c.IS[r]||c.nJ[r])?.modelsFetcher;e&&u(e).then(eI)},[r]);let tg=async(e,t,a=e9)=>{let s=`${a}/${e}`;try{let e=await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:s,alias:t})});if(e.ok)await tx();else{let t=await e.json();alert(t.error||"Failed to set alias")}}catch(e){console.log("Error setting alias:",e)}},tf=async e=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await tx()}catch(e){console.log("Error deleting alias:",e)}},ty=async()=>{if(e_||0===x.length)return;let e=Object.fromEntries(x.map(e=>[e.id,{state:"queued",error:null}]));eV.current=!1,ez(!0),eq(!1),eH(null),eW(e),eG({total:x.length,completed:0,passed:0,failed:0,stopped:!1});let t=0,a=0;try{for(let e=0;e<x.length;e+=1){if(eV.current){eG({total:x.length,completed:e,passed:t,failed:a,stopped:!0});break}let s=x[e];eH(s.id),eW(e=>({...e,[s.id]:{state:"testing",error:null}}));try{let e=await fetch(`/api/providers/${s.id}/test`,{method:"POST"}),i=await e.json(),l=!!i.valid;l?t+=1:a+=1,eW(e=>({...e,[s.id]:{state:l?"success":"failed",error:l?null:i.error||null}}))}catch(e){a+=1,eW(t=>({...t,[s.id]:{state:"failed",error:e.message||"Test failed"}}))}eG({total:x.length,completed:e+1,passed:t,failed:a,stopped:!1}),e<x.length-1&&await new Promise(e=>setTimeout(e,1e3))}}finally{eH(null),ez(!1),eq(!1),eV.current=!1}},tv=async e=>{ep(t=>({...t,[e]:!0}));try{let t=await fetch("/api/provider-health",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({connectionId:e})}),a=await t.json().catch(()=>({}));t.ok||alert(a.error||"Health check failed"),await tu()}catch(e){console.log("Error running health check:",e),alert(e.message||"Health check failed")}finally{ep(t=>({...t,[e]:!1}))}},tj=async e=>{eF({title:"Delete Connection",message:"Delete this connection?",onConfirm:async()=>{eF(null);try{(await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok&&h(x.filter(t=>t.id!==e))}catch(e){console.log("Error deleting connection:",e)}}})},tk=()=>{tu(),S(!1)},tN=async e=>{P("");try{let t=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:r,...e})}),a=null;try{a=await t.json()}catch{a=null}if(t.ok){await tu(),I(!1);return}P(a?.error||"Failed to save connection")}catch(e){console.log("Error saving connection:",e),P("Failed to save connection")}},tw=async e=>{try{(await fetch(`/api/providers/${K.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await tu(),M(!1))}catch(e){console.log("Error updating connection:",e)}},tC=async(e,t)=>{try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&h(a=>a.map(a=>a.id===e?{...a,isActive:t}:a))}catch(e){console.log("Error updating connection status:",e)}},tS=async(e,t)=>{let a=[...x];[a[e],a[t]]=[a[t],a[e]],h(a);try{await Promise.all([fetch(`/api/providers/${a[e].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:e})}),fetch(`/api/providers/${a[t].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:t})})])}catch(e){console.log("Error swapping priority:",e),await tu()}},tT=x.filter(e=>es.includes(e.id));x.length>0&&(es.length,x.length),(0,i.useEffect)(()=>{ei(e=>e.filter(e=>x.some(t=>t.id===e)))},[x]),(()=>{if(0===tT.length)return;let e=new Set(tT.map(e=>e.providerSpecificData?.proxyPoolId||"__none__"));if(1===e.size){let t=[...e][0];if("__none__"===t)return;let a=k.find(e=>e.id===t);return a?.name}})();let tA=()=>{en||q(!1)},t$=async e=>{eo(!0);try{let t=0;for(let{connectionId:a,proxyPoolId:s}of e)try{(await fetch(`/api/providers/${a}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:s})})).ok||(t+=1)}catch(e){console.log("Error applying proxy for",a,e),t+=1}t>0&&alert(`Updated with ${t} failed request(s).`),await tu(),q(!1)}finally{eo(!1)}},tI=e=>t$(x.map(t=>({connectionId:t.id,proxyPoolId:e}))),tO=(0,s.jsx)("div",{className:"flex min-w-0 flex-col divide-y divide-black/[0.03] dark:divide-white/[0.03]",children:x.map((e,t)=>(0,s.jsx)("div",{className:"flex min-w-0 items-stretch",children:(0,s.jsx)("div",{className:"flex-1 min-w-0",children:(0,s.jsx)(N,{connection:e,proxyPools:k,isOAuth:e4,isFirst:0===t,isLast:t===x.length-1,onMoveUp:()=>tS(t,t-1),onMoveDown:()=>tS(t,t+1),onToggleActive:t=>tC(e.id,t),onUpdateProxy:async t=>{try{(await fetch(`/api/providers/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:t||null})})).ok&&h(a=>a.map(a=>a.id===e.id?{...a,providerSpecificData:{...a.providerSpecificData,proxyPoolId:t||null}}:a))}catch(e){console.log("Error updating proxy:",e)}},onEdit:()=>{H(e),M(!0)},onDelete:()=>tj(e.id),oneByOneStatus:eJ[e.id]||null,providerHealthConfig:ed,healthCheckRunning:!!em[e.id],onRunHealthCheck:()=>tv(e.id)})})},e.id))}),tP=k.filter(e=>!0===e.isActive),tR=(0,s.jsx)(d.aF,{isOpen:L,onClose:tA,title:`Apply Proxy (${x.length} connections)`,children:(0,s.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,s.jsxs)("div",{className:"flex flex-col",children:[(0,s.jsxs)("button",{onClick:()=>{let e=k.filter(e=>!0===e.isActive);return 0===e.length?void alert("No active proxy pools available."):t$(x.map((t,a)=>({connectionId:t.id,proxyPoolId:e[a%e.length].id})))},disabled:en||0===tP.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,s.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"sync_alt"}),(0,s.jsx)("span",{className:"text-sm text-text-main",children:"One-to-one (rotate)"})]}),(0,s.jsxs)("button",{onClick:()=>tI(null),disabled:en,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,s.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"link_off"}),(0,s.jsx)("span",{className:"text-sm text-text-main",children:"None (unbind all)"})]}),k.map(e=>(0,s.jsxs)("button",{onClick:()=>tI(e.id),disabled:en||!0!==e.isActive,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"lan"}),(0,s.jsx)("span",{className:"truncate text-sm text-text-main",children:e.name}),!0!==e.isActive&&(0,s.jsx)("span",{className:"text-[10px] text-text-muted",children:"(inactive)"})]},e.id))]}),en&&(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Applying..."}),(0,s.jsx)(d.$n,{onClick:tA,variant:"ghost",fullWidth:!0,disabled:en,children:"Cancel"})]})}),tE=async e=>{if(!Y){ee(e);try{let t=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${tr}/${e}`})}),a=await t.json();Q(t=>({...t,[e]:a.ok?"ok":"error"})),X(a.ok?"":a.error||"Model not reachable")}catch{Q(t=>({...t,[e]:"error"})),X("Network error")}finally{ee(null)}}};return b?(0,s.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,s.jsx)(d.Qv,{}),(0,s.jsx)(d.Qv,{})]}):e3?(0,s.jsxs)("div",{className:"flex min-w-0 flex-col gap-6 px-1 sm:gap-8 sm:px-0",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.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,s.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),"Back to Providers"]}),(0,s.jsxs)("div",{className:"flex min-w-0 items-center gap-3 sm:gap-4",children:[(0,s.jsx)("div",{className:"flex size-12 shrink-0 items-center justify-center rounded-lg",style:{backgroundColor:`${e3.color}15`},children:B?(0,s.jsx)("span",{className:"text-sm font-bold",style:{color:e3.color},children:e3.textIcon||e3.id.slice(0,2).toUpperCase()}):(0,s.jsx)(o.default,{src:te&&e3.apiType?"responses"===e3.apiType?"/providers/oai-r.png":"/providers/oai-cc.png":tt?"/providers/anthropic-m.png":`/providers/${e3.id}.png`,alt:e3.name,width:48,height:48,className:"max-h-12 max-w-12 rounded-lg object-contain",sizes:"48px",onError:()=>G(!0)})}),(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[(0,s.jsx)("h1",{className:"truncate text-2xl font-semibold tracking-tight sm:text-3xl",children:e3.name}),(e3.notice?.apiKeyUrl||e3.notice?.signupUrl||e3.website)&&(0,s.jsxs)("a",{href:e3.notice?.apiKeyUrl||e3.notice?.signupUrl||e3.website,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline inline-flex items-center gap-1",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),e3.notice?.apiKeyUrl?"Get API Key":"Sign up / Learn more"]})]}),(0,s.jsxs)("p",{className:"text-text-muted",children:[x.length," connection",1===x.length?"":"s"]})]})]})]}),e3.deprecated&&(0,s.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,s.jsx)("span",{className:"material-symbols-outlined text-[16px] text-yellow-500 mt-0.5 shrink-0",children:"warning"}),(0,s.jsx)("p",{className:"text-xs text-red-600 dark:text-yellow-400 leading-relaxed",children:e3.deprecationNotice})]}),e3.notice?.text&&!e3.deprecated&&(0,s.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,s.jsx)("span",{className:"material-symbols-outlined text-[16px] text-blue-500 shrink-0",children:"info"}),(0,s.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-blue-600 dark:text-blue-400",children:e3.notice.text}),e3.notice.apiKeyUrl&&(0,s.jsx)("a",{href:e3.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 →"})]}),ta&&v&&(0,s.jsx)(d.Zp,{children:(0,s.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold",children:tt?"Anthropic Compatible Details":"OpenAI Compatible Details"}),(0,s.jsxs)("p",{className:"break-all text-sm text-text-muted",children:[tt?"Messages API":"responses"===v.apiType?"Responses API":"Chat Completions"," \xb7 ",(v.baseUrl||"").replace(/\/$/,""),"/",tt?"messages":"responses"===v.apiType?"responses":"chat/completions"]})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,s.jsx)(d.$n,{size:"sm",icon:"add",onClick:()=>{P(""),I(!0)},className:"w-full sm:w-auto",children:"Add API Key"}),(0,s.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>z(!0),className:"w-full sm:w-auto",children:"Edit"}),(0,s.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:async()=>{eF({title:"Delete Compatible Node",message:`Delete this ${tt?"Anthropic":"OpenAI"} Compatible node?`,onConfirm:async()=>{eF(null);try{(await fetch(`/api/provider-nodes/${r}`,{method:"DELETE"})).ok&&a.push("/dashboard/providers")}catch(e){console.log("Error deleting provider node:",e)}}})},className:"w-full sm:w-auto",children:"Delete"})]})]})}),e7?(0,s.jsx)(d.gw,{providerId:r}):(0,s.jsxs)(d.Zp,{children:[(0,s.jsxs)("div",{className:"mb-5 flex flex-col gap-4",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-3 lg:flex-row lg:items-center lg:justify-between",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold",children:"Connections"}),"round-robin"===ex&&(0,s.jsx)("p",{className:"mt-1 text-xs text-text-muted",children:"Round Robin distributes requests across active accounts for this provider."})]}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2 lg:justify-end",children:[x.length>0&&k.length>0&&(0,s.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"lan",onClick:()=>q(!0),children:"Apply Proxy"}),x.length>0&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"sync",onClick:ty,disabled:e_,children:e_?"Testing Connection One-by-One...":"Test Connection One-by-One"}),e_&&(0,s.jsx)(d.$n,{size:"sm",variant:"ghost",icon:"stop",onClick:()=>{e_&&(eV.current=!0,eq(!0))},disabled:eL,children:eL?"Stopping...":"Stop"})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2 rounded-xl border border-border bg-surface/60 px-3 py-2 shadow-sm",children:[(0,s.jsx)("span",{className:"text-xs font-medium text-text-muted",children:"Round Robin"}),(0,s.jsx)(d.lM,{checked:"round-robin"===ex,onChange:e=>{let t=e?"round-robin":null,a=e?eh||"1":eh;e&&!eh&&eb("1"),eu(t),tb(t,a)}}),"round-robin"===ex&&(0,s.jsxs)("label",{className:"flex items-center gap-1.5 border-l border-border pl-2",children:[(0,s.jsx)("span",{className:"text-xs text-text-muted",children:"Sticky:"}),(0,s.jsx)("input",{type:"number",min:1,value:eh,onChange:e=>{var t;eb(t=e.target.value),tb("round-robin",t)},placeholder:"1",className:"w-14 rounded-md border border-border bg-background px-2 py-1 text-xs focus:border-primary focus:outline-none",title:"How many selections/sessions use the same account before global round-robin advances."})]})]})]})]}),"round-robin"===ex&&(0,s.jsxs)("div",{className:"rounded-2xl border border-border bg-surface/70 p-4 shadow-sm",children:[(0,s.jsxs)("div",{className:"mb-4 flex flex-col gap-2 lg:flex-row lg:items-start lg:justify-between",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px] text-primary",children:"sticky_note_2"}),(0,s.jsx)("h3",{className:"text-sm font-semibold text-text-main",children:"Provider Round Robin Sticky"})]}),(0,s.jsx)("p",{className:"mt-1 max-w-3xl text-xs leading-relaxed text-text-muted",children:"Choose how this provider keeps the same account/API key/OAuth connection for a client. Leave it on Global to keep the current behavior."})]}),(0,s.jsx)(d.Ex,{variant:"secondary",className:"w-fit shrink-0",children:"Per provider"})]}),(0,s.jsxs)("div",{className:"grid gap-4 lg:grid-cols-3",children:[(0,s.jsxs)("label",{className:"block",children:[(0,s.jsx)("span",{className:"mb-1 block text-[11px] font-semibold uppercase tracking-wide text-text-muted",children:"Sticky mode"}),(0,s.jsxs)("select",{value:eg,onChange:e=>{var t;ef(t=e.target.value),tb("round-robin",eh||"1",{stickyScope:t})},className:"w-full rounded-lg border border-border bg-background px-3 py-2 text-sm text-text-main outline-none focus:border-primary",children:[(0,s.jsx)("option",{value:"global",children:"Global / current behavior"}),(0,s.jsx)("option",{value:"client_ip",children:"Client IP"}),(0,s.jsx)("option",{value:"client_session",children:"Client IP + chat session"})]}),(0,s.jsx)("p",{className:"mt-1 text-[11px] leading-relaxed text-text-muted",children:"Global rotates like before. Client/session modes keep account identity more stable."})]}),(0,s.jsxs)("label",{className:"block",children:[(0,s.jsx)("span",{className:"mb-1 block text-[11px] font-semibold uppercase tracking-wide text-text-muted",children:"Sticky TTL minutes"}),(0,s.jsx)("input",{type:"number",min:1,max:10080,value:ey,onChange:e=>{var t;ev(t=e.target.value),tb("round-robin",eh||"1",{stickyTtlMinutes:Number(t)||120})},className:"w-full rounded-lg border border-border bg-background px-3 py-2 text-sm text-text-main outline-none focus:border-primary"}),(0,s.jsx)("p",{className:"mt-1 text-[11px] leading-relaxed text-text-muted",children:"Sticky assignments stay in memory and expire after this time."})]}),(0,s.jsxs)("label",{className:"block",children:[(0,s.jsx)("span",{className:"mb-1 block text-[11px] font-semibold uppercase tracking-wide text-text-muted",children:"Rebind after fallback count"}),(0,s.jsx)("input",{type:"number",min:1,max:50,value:eC,onChange:e=>{var t;eS(t=e.target.value),tb("round-robin",eh||"1",{stickyRebindFailureThreshold:Number(t)||3})},disabled:!eN,className:"w-full rounded-lg border border-border bg-background px-3 py-2 text-sm text-text-main outline-none focus:border-primary disabled:cursor-not-allowed disabled:opacity-50"}),(0,s.jsx)("p",{className:"mt-1 text-[11px] leading-relaxed text-text-muted",children:"After this many temporary fallbacks, the session is rebound to the fallback account."})]})]}),(0,s.jsxs)("div",{className:"mt-4 grid gap-3 lg:grid-cols-2",children:[(0,s.jsxs)("label",{className:"flex items-start gap-3 rounded-xl border border-border bg-background/70 p-3",children:[(0,s.jsx)("input",{type:"checkbox",checked:ej,onChange:e=>{var t;ek(t=e.target.checked),tb("round-robin",eh||"1",{stickyFallbackToClientIp:t})},className:"mt-0.5"}),(0,s.jsxs)("span",{children:[(0,s.jsx)("span",{className:"block text-xs font-medium text-text-main",children:"Fallback to Client IP when session id is missing"}),(0,s.jsx)("span",{className:"mt-1 block text-[11px] leading-relaxed text-text-muted",children:"Useful when the app does not send a stable chat session id."})]})]}),(0,s.jsxs)("label",{className:"flex items-start gap-3 rounded-xl border border-border bg-background/70 p-3",children:[(0,s.jsx)("input",{type:"checkbox",checked:eN,onChange:e=>{var t;ew(t=e.target.checked),tb("round-robin",eh||"1",{stickyRebindOnFailure:t})},className:"mt-0.5"}),(0,s.jsxs)("span",{children:[(0,s.jsx)("span",{className:"block text-xs font-medium text-text-main",children:"Rebind session after repeated unavailable/rate-limited hits"}),(0,s.jsx)("span",{className:"mt-1 block text-[11px] leading-relaxed text-text-muted",children:"First fallbacks are temporary; repeated failures switch that sticky session to a healthier account."})]})]})]}),(0,s.jsxs)("div",{className:"mt-4 rounded-xl border border-primary/20 bg-primary/5 px-3 py-2 text-[11px] leading-relaxed text-text-muted",children:["Recommended for Codex/Copilot-style OAuth providers:",(0,s.jsx)("span",{className:"font-medium text-text-main",children:" Client IP + chat session"}),", TTL 120 minutes, Client IP fallback enabled, rebind enabled after 3 fallbacks."]})]})]}),(0,s.jsx)(R,{providerId:r,onSaved:tu})," ",0===x.length?(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("div",{className:"inline-flex items-center justify-center w-9 h-9 rounded-full bg-primary/10 text-primary shrink-0",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:e4?"lock":"key"})}),(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"No connections yet"}),ts&&(0,s.jsxs)("p",{className:"text-xs text-text-muted",children:["Choose ",ti," or ",tl,"."]})]})]}),(0,s.jsx)("div",{className:"flex gap-2",children:ts?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(d.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:e0,children:ti}),(0,s.jsx)(d.$n,{size:"sm",icon:"key",onClick:e1,children:tl})]}):(0,s.jsxs)(s.Fragment,{children:[!ta&&"iflow"===r&&(0,s.jsx)(d.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>A(!0),children:"Cookie"}),(0,s.jsx)(d.$n,{size:"sm",icon:"add",onClick:e2,children:ta?"Add API Key":"iflow"===r?"OAuth":"Add Connection"})]})})]}):(0,s.jsxs)(s.Fragment,{children:[eB&&(0,s.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,s.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,s.jsxs)("span",{children:["Total: ",eB.total]}),(0,s.jsxs)("span",{children:["Completed: ",eB.completed]}),(0,s.jsxs)("span",{children:["Passed: ",eB.passed]}),(0,s.jsxs)("span",{children:["Failed: ",eB.failed]}),eB.stopped&&(0,s.jsx)("span",{className:"text-amber-600 dark:text-amber-400",children:"Stopped"}),e_&&eK&&(0,s.jsxs)("span",{children:["Running: ",x.find(e=>e.id===eK)?.name||eK]})]})}),tO,!ta&&(0,s.jsxs)("div",{className:"mt-4 grid grid-cols-1 gap-2 sm:flex",children:["iflow"===r&&(0,s.jsx)(d.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>A(!0),title:"Add connection using browser cookie",className:"w-full sm:w-auto",children:"Cookie"}),ts?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(d.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:e0,className:"w-full sm:w-auto",children:ti}),(0,s.jsx)(d.$n,{size:"sm",icon:"key",onClick:e1,className:"w-full sm:w-auto",children:tl})]}):(0,s.jsx)(d.$n,{size:"sm",icon:"add",onClick:e2,className:"w-full sm:w-auto",children:"Add"})]})]})]}),(0,s.jsxs)(d.Zp,{children:[(0,s.jsxs)("div",{className:"mb-4 flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold",children:"Available Models"}),!ta&&(e=[...e8,...eO.filter(e=>!e8.some(t=>t.id===e.id))].filter(e=>!e.type||"llm"===e.type).map(e=>e.id).filter(e=>!eR.includes(e)),(0,s.jsxs)("div",{className:"flex gap-2",children:[eR.length>0&&(0,s.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"restart_alt",onClick:tp,children:"Active All"}),e.length>0&&(0,s.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"block",onClick:()=>tm(e),children:"Disable All"})]}))]}),!!Z&&(0,s.jsx)("p",{className:"text-xs text-red-500 mb-3 break-words",children:Z}),(()=>{let e,t,a;if(ta)return(0,s.jsx)(y,{providerStorageAlias:tr,providerDisplayAlias:tn,modelAliases:J,copied:eQ,onCopy:eZ,onSetAlias:tg,onDeleteAlias:tf,connections:x,isAnthropic:tt});let i=[...e8,...eO.filter(e=>!e8.some(t=>t.id===e.id))].filter(e=>!e.type||"llm"===e.type),l=new Set(eR),n=i.filter(e=>!l.has(e.id)),o=i.filter(e=>l.has(e.id)),d=Object.entries(J).filter(([e,t])=>{let a=`${tr}/`;if(!t.startsWith(a))return!1;let s=t.slice(a.length);return e3.passthroughModels?!e8.some(e=>e.id===s):!e8.some(e=>e.id===s)&&e===s}).map(([e,t])=>({id:t.slice(`${tr}/`.length),alias:e,fullModel:t}));return(0,s.jsxs)("div",{className:"flex flex-wrap gap-3",children:[d.map(e=>(0,s.jsx)(g,{model:{id:e.id},fullModel:`${tn}/${e.id}`,alias:e.alias,copied:eQ,onCopy:eZ,onSetAlias:()=>{},onDeleteAlias:()=>tf(e.alias),testStatus:V[e.id],onTest:x.length>0||e7?()=>tE(e.id):void 0,isTesting:Y===e.id,isCustom:!0,isFree:!1},e.id)),n.map(e=>{let t=`${tr}/${e.id}`,a=`${r}/${e.id}`,i=Object.entries(J).find(([,e])=>e===t||e===a)?.[0];return(0,s.jsx)(g,{model:e,fullModel:`${tn}/${e.id}`,alias:i,copied:eQ,onCopy:eZ,onSetAlias:t=>tg(e.id,t,tr),onDeleteAlias:()=>tf(i),testStatus:V[e.id],onTest:x.length>0||e7?()=>tE(e.id):void 0,isTesting:Y===e.id,isFree:e.isFree,onDisable:()=>td(e.id)},e.id)}),(0,s.jsxs)("button",{onClick:()=>ea(!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,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"}),"Add Model"]}),e$.length>0&&(e=new Set(Object.values(J)),t=new Set(e8.map(e=>e.id)),0===(a=e$.filter(a=>!e.has(`${tr}/${a.id}`)&&!t.has(a.id))).length?null:(0,s.jsxs)("div",{className:"w-full mt-2",children:[(0,s.jsx)("p",{className:"text-xs text-text-muted mb-2",children:"Suggested free models (≥200k context):"}),(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:a.map(e=>(0,s.jsxs)("button",{onClick:async()=>{let t=e.id.split("/").pop();await tg(e.id,t,tr)},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.name} \xb7 ${(e.contextLength/1e3).toFixed(0)}k ctx`,children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),e.id.split("/").pop()]},e.id))})]})),o.length>0&&(0,s.jsxs)("div",{className:"w-full mt-2",children:[(0,s.jsxs)("p",{className:"text-xs text-text-muted mb-2",children:["Disabled models (",o.length,"):"]}),(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:o.map(e=>(0,s.jsxs)("button",{onClick:()=>tc(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,s.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),e.id]},e.id))})]})]})})()]}),tR,"kiro"===r?(0,s.jsx)(d.Mh,{isOpen:C,providerInfo:e3,onSuccess:tk,onClose:()=>S(!1)}):"cursor"===r?(0,s.jsx)(d.G9,{isOpen:C,onSuccess:tk,onClose:()=>S(!1)}):"gitlab"===r?(0,s.jsx)(d.vj,{isOpen:C,providerInfo:e3,onSuccess:tk,onClose:()=>S(!1)}):(0,s.jsx)(d.LF,{isOpen:C,provider:r,providerInfo:e3,onSuccess:tk,onClose:()=>S(!1)}),"iflow"===r&&(0,s.jsx)(d.vE,{isOpen:T,onSuccess:()=>{tu(),A(!1)},onClose:()=>A(!1)}),(0,s.jsx)(D,{isOpen:$,provider:r,providerName:e3.name,isCompatible:ta,isAnthropic:tt,authType:e3?.authType,authHint:e3?.authHint,website:e3?.website,proxyPools:k,error:O,onSave:tN,onBulkDone:tu,onClose:()=>{P(""),I(!1)}}),(0,s.jsx)(d.wI,{isOpen:E,connection:K,proxyPools:k,onSave:tw,onClose:()=>M(!1)}),ta&&(0,s.jsx)(F,{isOpen:_,node:v,onSave:th,onClose:()=>z(!1),isAnthropic:tt}),!ta&&(0,s.jsx)(U,{isOpen:et,providerAlias:tr,providerDisplayAlias:tn,onSave:async e=>{let t=e3?.passthroughModels?e.split("/").pop():e;await tg(e,t,tr),ea(!1)},onClose:()=>ea(!1)}),(0,s.jsx)(d.uo,{isOpen:eU,onClose:()=>eM(!1),onConfirm:()=>{(window.localStorage.setItem(eX,"true"),eM(!1),e4)?eY():e1()},title:"Risk Notice",message:e3?.deprecationNotice,confirmText:"I Understand, Continue",cancelText:"Cancel",variant:"danger"}),(0,s.jsx)(d.uo,{isOpen:!!eD,onClose:()=>eF(null),onConfirm:eD?.onConfirm,title:eD?.title||"Confirm",message:eD?.message,variant:"danger"})]}):(0,s.jsxs)("div",{className:"text-center py-20",children:[(0,s.jsx)("p",{className:"text-text-muted",children:"Provider not found"}),(0,s.jsx)(n(),{href:"/dashboard/providers",className:"text-primary mt-4 inline-block",children:"Back to Providers"})]})}D.propTypes={isOpen:b().bool.isRequired,provider:b().string,providerName:b().string,isCompatible:b().bool,isAnthropic:b().bool,authType:b().string,authHint:b().string,website:b().string,proxyPools:b().arrayOf(b().shape({id:b().string,name:b().string})),error:b().string,onSave:b().func.isRequired,onBulkDone:b().func,onClose:b().func.isRequired},F.propTypes={isOpen:b().bool.isRequired,node:b().shape({id:b().string,name:b().string,prefix:b().string,apiType:b().string,baseUrl:b().string,providerSpecificData:b().object,tags:b().oneOfType([b().string,b().array]),maxInFlight:b().oneOfType([b().string,b().number])}),onSave:b().func.isRequired,onClose:b().func.isRequired,isAnthropic:b().bool},U.propTypes={isOpen:b().bool.isRequired,providerAlias:b().string.isRequired,providerDisplayAlias:b().string.isRequired,onSave:b().func.isRequired,onClose:b().func.isRequired}},18205:(e,t,a)=>{Promise.resolve().then(a.bind(a,5020))}},e=>{e.O(0,[2574,3862,1051,5772,1321,5497,8441,3794,7358],()=>e(e.s=18205)),_N_E=e.O()}]);
|
|
3
|
+
sk-key-only-auto-named`;function D({isOpen:e,provider:t,providerName:a,isCompatible:l,isAnthropic:r,authType:n,authHint:o,website:m,proxyPools:p,error:x,onSave:u,onBulkDone:h,onClose:b}){let g="__none__",f="ollama-local"===t,y="cookie"===n,v="xai"===t&&!y,j=y?"Cookie Value":"API Key",k="azure"===t,N="cloudflare-ai"===t,w=c.Q2?.[t]?.regions||null,C=c.Q2?.[t]?.defaultRegion||w?.[0]?.id||"",[S,T]=(0,i.useState)({name:"",apiKey:"",defaultModel:"",priority:1,proxyPoolId:g,ollamaHostUrl:""}),[A,$]=(0,i.useState)({azureEndpoint:"",apiVersion:"2024-10-01-preview",deployment:"",organization:""}),[I,O]=(0,i.useState)({accountId:""}),[P,R]=(0,i.useState)(C),[F,U]=(0,i.useState)(!1),[M,_]=(0,i.useState)(null),[z,L]=(0,i.useState)(!1),[q,K]=(0,i.useState)("single"),[H,J]=(0,i.useState)(""),[W,B]=(0,i.useState)(null),G=()=>f&&S.ollamaHostUrl.trim()?{baseUrl:S.ollamaHostUrl.trim()}:k?{azureEndpoint:A.azureEndpoint,apiVersion:A.apiVersion,deployment:A.deployment,organization:A.organization}:N?{accountId:I.accountId}:w&&P?{region:P}:void 0,V=async()=>{U(!0);try{let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:S.apiKey,providerSpecificData:G()})}),a=await e.json();_(a.valid?"success":"failed")}catch{_("failed")}finally{U(!1)}},Q=async()=>{if(t&&(f||S.apiKey)&&(f||S.name)&&(!l||S.defaultModel.trim())){L(!0);try{let e=!1;try{U(!0),_(null);let a=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:S.apiKey,providerSpecificData:G()})});e=!!(await a.json()).valid,_(e?"success":"failed")}catch{_("failed")}finally{U(!1)}await u({name:S.name||(f?"Ollama Local":""),apiKey:S.apiKey,defaultModel:l?S.defaultModel.trim():void 0,priority:S.priority,proxyPoolId:S.proxyPoolId===g?null:S.proxyPoolId,testStatus:e?"active":"unknown",providerSpecificData:G()})}finally{L(!1)}}},Z=async()=>{let e=H.split("\n").map(e=>e.trim()).filter(Boolean);if(!e.length)return;L(!0),B(null);let a=0,s=0;for(let i=0;i<e.length;i++){let l=e[i].split("|"),r=l.length>=2?l.slice(1).join("|").trim():l[0].trim(),n=l.length>=2?l[0].trim():"Key",o=`${n} ${i+1}`;try{(await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:r,name:o,priority:1,testStatus:"unknown"})})).ok?a++:s++}catch{s++}}L(!1),B({success:a,failed:s}),a>0&&h&&h()};return t?(0,s.jsx)(d.aF,{isOpen:e,title:`Add ${a||t} ${j}`,onClose:b,children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(d.$n,{size:"sm",variant:"single"===q?"primary":"ghost",onClick:()=>{K("single"),B(null)},children:"Single"}),(0,s.jsx)(d.$n,{size:"sm",variant:"bulk"===q?"primary":"ghost",onClick:()=>{K("bulk"),B(null)},children:"Bulk Add"})]}),"bulk"===q&&(0,s.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,s.jsxs)("p",{className:"text-xs text-text-muted",children:["One key per line. Format: ",(0,s.jsx)("code",{children:"name|apiKey"})," or just ",(0,s.jsx)("code",{children:"apiKey"})," (auto-named by index)."]}),(0,s.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:E,value:H,onChange:e=>J(e.target.value)}),W&&(0,s.jsxs)("div",{className:`text-sm font-medium ${W.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",W.success," added",W.failed>0?`, ✗ ${W.failed} failed`:""]}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(d.$n,{onClick:Z,fullWidth:!0,disabled:z||!H.trim(),children:z?"Adding...":"Add All Keys"}),(0,s.jsx)(d.$n,{onClick:b,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),"single"===q&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(d.pd,{label:"Name",value:S.name,onChange:e=>T({...S,name:e.target.value}),placeholder:f?"Ollama Local":"Production Key"}),f&&(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(d.pd,{label:"Ollama Host URL",value:S.ollamaHostUrl,onChange:e=>T({...S,ollamaHostUrl:e.target.value}),placeholder:"http://localhost:11434",className:"flex-1"}),(0,s.jsx)("div",{className:"pt-6",children:(0,s.jsx)(d.$n,{onClick:V,disabled:F||z,variant:"secondary",children:F?"Checking...":"Check"})})]}),!f&&(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(d.pd,{label:j,type:y?"text":"password",value:S.apiKey,onChange:e=>T({...S,apiKey:e.target.value}),placeholder:y?"grok-web"===t?"sso=xxxxx... or just the raw value":"eyJhbGciOi...":v?"xai-...":"",className:"flex-1"}),(0,s.jsx)("div",{className:"pt-6",children:(0,s.jsx)(d.$n,{onClick:V,disabled:!S.apiKey||F||z,variant:"secondary",children:F?"Checking...":"Check"})})]}),v&&(0,s.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."}),y&&o&&(0,s.jsxs)("p",{className:"text-xs text-text-muted",children:[o,m&&(0,s.jsxs)(s.Fragment,{children:[" ",(0,s.jsxs)("a",{href:m,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:["Open ",m.replace(/^https?:\/\//,"")]})]})]}),w&&(0,s.jsx)(d.l6,{label:"Region",value:P,onChange:e=>R(e.target.value),options:w.map(e=>({value:e.id,label:e.label}))}),l&&(0,s.jsx)(d.pd,{label:"Default Model",value:S.defaultModel,onChange:e=>T({...S,defaultModel:e.target.value}),placeholder:r?"claude-3-5-sonnet-latest":"gpt-4o-mini"}),f&&(0,s.jsxs)("p",{className:"text-xs text-text-muted",children:["Leave blank to use ",(0,s.jsx)("code",{children:"http://localhost:11434"}),". For remote Ollama, enter the full host URL (e.g. ",(0,s.jsx)("code",{children:"http://192.168.1.10:11434"}),")."]}),M&&(0,s.jsx)(d.Ex,{variant:"success"===M?"success":"error",children:"success"===M?"Valid":"Invalid"}),x&&(0,s.jsx)("p",{className:"text-xs text-red-500 break-words",children:x}),l&&(0,s.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,s.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,s.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Cloudflare Workers AI"}),(0,s.jsx)(d.pd,{label:"Account ID",value:I.accountId,onChange:e=>O({...I,accountId:e.target.value}),placeholder:"abc123def456..."}),(0,s.jsxs)("p",{className:"text-xs text-text-muted mt-2",children:["Find your Account ID in the right sidebar of ",(0,s.jsx)("a",{href:"https://dash.cloudflare.com",target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:"dash.cloudflare.com"})]})]}),k&&(0,s.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,s.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Azure OpenAI Configuration"}),(0,s.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,s.jsx)(d.pd,{label:"Azure Endpoint",value:A.azureEndpoint,onChange:e=>$({...A,azureEndpoint:e.target.value}),placeholder:"https://your-resource.openai.azure.com"}),(0,s.jsx)(d.pd,{label:"Deployment Name",value:A.deployment,onChange:e=>$({...A,deployment:e.target.value}),placeholder:"gpt-4"}),(0,s.jsx)(d.pd,{label:"API Version",value:A.apiVersion,onChange:e=>$({...A,apiVersion:e.target.value}),placeholder:"2024-10-01-preview"}),(0,s.jsx)(d.pd,{label:"Organization",value:A.organization,onChange:e=>$({...A,organization:e.target.value}),placeholder:"Organization ID"})]})]}),(0,s.jsx)(d.pd,{label:"Priority",type:"number",value:S.priority,onChange:e=>T({...S,priority:Number.parseInt(e.target.value)||1})}),(0,s.jsx)(d.l6,{label:"Proxy Pool",value:S.proxyPoolId,onChange:e=>T({...S,proxyPoolId:e.target.value}),options:[{value:g,label:"None"},...(p||[]).map(e=>({value:e.id,label:e.name}))],placeholder:"None"}),0===(p||[]).length&&(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"No active proxy pools available. Create one in Proxy Pools page first."}),(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Legacy manual proxy fields are still accepted by API for backward compatibility."}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(d.$n,{onClick:Q,fullWidth:!0,disabled:z||!f&&(!S.name||!S.apiKey)||l&&!S.defaultModel.trim()||k&&(!A.azureEndpoint||!A.deployment||!A.organization)||N&&!I.accountId,children:z?"Saving...":"Save"}),(0,s.jsx)(d.$n,{onClick:b,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})}):null}function F({isOpen:e,node:t,onSave:a,onClose:l,isAnthropic:r}){let[n,o]=(0,i.useState)({name:"",prefix:"",apiType:"chat",baseUrl:"https://api.openai.com/v1",routingTags:"",maxInFlight:""}),[c,m]=(0,i.useState)(!1),[p,x]=(0,i.useState)(""),[u,h]=(0,i.useState)(""),[b,g]=(0,i.useState)(!1),[f,y]=(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"),routingTags:Array.isArray(t.providerSpecificData?.routingTags||t.providerSpecificData?.tags||t.tags)?(t.providerSpecificData?.routingTags||t.providerSpecificData?.tags||t.tags).join(", "):t.providerSpecificData?.routingTags||t.providerSpecificData?.tags||t.tags||"",maxInFlight:t.providerSpecificData?.maxInFlight||t.maxInFlight||""})},[t,r]);let v=async()=>{if(n.name.trim()&&n.prefix.trim()&&n.baseUrl.trim()){m(!0);try{let e=String(n.routingTags||"").split(/[\n,;]+/).map(e=>e.trim()).filter(Boolean),s=Number(n.maxInFlight),i={...t.providerSpecificData||{},routingTags:e,tags:e};Number.isFinite(s)&&s>0?i.maxInFlight=s:delete i.maxInFlight;let l={name:n.name,prefix:n.prefix,baseUrl:n.baseUrl,routingTags:e,tags:e,providerSpecificData:i};r||(l.apiType=n.apiType),await a(l)}finally{m(!1)}}},j=async()=>{g(!0);try{let e=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:n.baseUrl,apiKey:p,type:r?"anthropic-compatible":"openai-compatible",modelId:u.trim()||void 0})}),t=await e.json();y(t.valid?"success":"failed")}catch{y("failed")}finally{g(!1)}};return t?(0,s.jsx)(d.aF,{isOpen:e,title:`Edit ${r?"Anthropic":"OpenAI"} Compatible`,onClose:l,children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsx)(d.pd,{label:"Name",value:n.name,onChange:e=>o({...n,name:e.target.value}),placeholder:`${r?"Anthropic":"OpenAI"} Compatible (Prod)`,hint:"Required. A friendly label for this node."}),(0,s.jsx)(d.pd,{label:"Prefix",value:n.prefix,onChange:e=>o({...n,prefix:e.target.value}),placeholder:r?"ac-prod":"oc-prod",hint:"Required. Used as the provider prefix for model IDs."}),!r&&(0,s.jsx)(d.l6,{label:"API Type",options:[{value:"chat",label:"Chat Completions"},{value:"responses",label:"Responses API"}],value:n.apiType,onChange:e=>o({...n,apiType:e.target.value})}),(0,s.jsx)(d.pd,{label:"Base URL",value:n.baseUrl,onChange:e=>o({...n,baseUrl:e.target.value}),placeholder:r?"https://api.anthropic.com/v1":"https://api.openai.com/v1",hint:`Use the base URL (ending in /v1) for your ${r?"Anthropic":"OpenAI"}-compatible API.`}),(0,s.jsx)(d.pd,{label:"Routing Tags / Labels",value:n.routingTags,onChange:e=>o({...n,routingTags:e.target.value}),placeholder:"gpu, vram:8gb, model_support:qwen3:8b",hint:"Comma or newline separated. Used by Combo least-latency/P2C tag rules for LAN Ollama."}),(0,s.jsx)(d.pd,{label:"Max In-flight Requests",type:"number",value:n.maxInFlight,onChange:e=>o({...n,maxInFlight:e.target.value}),placeholder:"2",hint:"Optional per-endpoint concurrency cap used by P2C and circuit-aware routing."}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(d.pd,{label:"API Key (for Check)",type:"password",value:p,onChange:e=>x(e.target.value),className:"flex-1"}),(0,s.jsx)("div",{className:"pt-6",children:(0,s.jsx)(d.$n,{onClick:j,disabled:!p||b||!n.baseUrl.trim(),variant:"secondary",children:b?"Checking...":"Check"})})]}),(0,s.jsx)(d.pd,{label:"Model ID (optional)",value:u,onChange:e=>h(e.target.value),placeholder:"e.g. my-model-id",hint:"If provider lacks /models endpoint, enter a model ID to validate via chat/completions instead."}),f&&(0,s.jsx)(d.Ex,{variant:"success"===f?"success":"error",children:"success"===f?"Valid":"Invalid"}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(d.$n,{onClick:v,fullWidth:!0,disabled:!n.name.trim()||!n.prefix.trim()||!n.baseUrl.trim()||c,children:c?"Saving...":"Save"}),(0,s.jsx)(d.$n,{onClick:l,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}function U({isOpen:e,providerAlias:t,providerDisplayAlias:a,onSave:l,onClose:r}){let[n,o]=(0,i.useState)(""),[c,m]=(0,i.useState)(null),[p,x]=(0,i.useState)(""),[u,h]=(0,i.useState)(!1);(0,i.useEffect)(()=>{e&&(o(""),m(null),x(""))},[e]);let b=e=>{let a=`${t}/`;return e.startsWith(a)?e.slice(a.length):e},g=async()=>{let e=b(n.trim());if(e){m("testing"),x("");try{let a=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${t}/${e}`})}),s=await a.json();m(s.ok?"ok":"error"),x(s.error||"")}catch(e){m("error"),x(e.message)}}},f=async()=>{let e=b(n.trim());if(e&&!u){h(!0);try{await l(e)}finally{h(!1)}}};return(0,s.jsx)(d.aF,{isOpen:e,onClose:r,title:"Add Custom Model",children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Model ID"}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)("input",{type:"text",value:n,onChange:e=>{o(e.target.value),m(null),x("")},onKeyDown:e=>{"Enter"===e.key&&g()},placeholder:"e.g. claude-opus-4-5",className:"flex-1 px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",autoFocus:!0}),(0,s.jsx)(d.$n,{variant:"secondary",icon:"science",loading:"testing"===c,onClick:g,disabled:!n.trim()||"testing"===c,children:"testing"===c?"Testing...":"Test"})]}),(0,s.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:["Sent to provider as: ",(0,s.jsx)("code",{className:"font-mono bg-sidebar px-1 rounded",children:b(n.trim())||"model-id"})]})]}),"ok"===c&&(0,s.jsxs)("div",{className:"flex items-center gap-2 text-sm text-green-600",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-base",children:"check_circle"}),"Model is reachable"]}),"error"===c&&(0,s.jsxs)("div",{className:"flex items-start gap-2 text-sm text-red-500",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-base shrink-0",children:"cancel"}),(0,s.jsx)("span",{children:p||"Model not reachable"})]}),(0,s.jsxs)("div",{className:"flex gap-2 pt-1",children:[(0,s.jsx)(d.$n,{onClick:r,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,s.jsx)(d.$n,{onClick:f,fullWidth:!0,size:"sm",disabled:!n.trim()||u,children:u?"Adding...":"Add Model"})]})]})})}function M(){let e,t=(0,l.useParams)(),a=(0,l.useRouter)(),r=t.id,[x,h]=(0,i.useState)([]),[b,f]=(0,i.useState)(!0),[v,j]=(0,i.useState)(null),[k,w]=(0,i.useState)([]),[C,S]=(0,i.useState)(!1),[T,A]=(0,i.useState)(!1),[$,I]=(0,i.useState)(!1),[O,P]=(0,i.useState)(""),[E,M]=(0,i.useState)(!1),[_,z]=(0,i.useState)(!1),[L,q]=(0,i.useState)(!1),[K,H]=(0,i.useState)(null),[J,W]=(0,i.useState)({}),[B,G]=(0,i.useState)(!1),[V,Q]=(0,i.useState)({}),[Z,X]=(0,i.useState)(""),[Y,ee]=(0,i.useState)(null),[et,ea]=(0,i.useState)(!1),[es,ei]=(0,i.useState)([]),[el,er]=(0,i.useState)("__none__"),[en,eo]=(0,i.useState)(!1),[ed,ec]=(0,i.useState)(null),[em,ep]=(0,i.useState)({}),[ex,eu]=(0,i.useState)(null),[eh,eb]=(0,i.useState)(""),[eg,ef]=(0,i.useState)("global"),[ey,ev]=(0,i.useState)("120"),[ej,ek]=(0,i.useState)(!0),[eN,ew]=(0,i.useState)(!0),[eC,eS]=(0,i.useState)("3"),[eT,eA]=(0,i.useState)("auto"),[e$,eI]=(0,i.useState)([]),[eO,eP]=(0,i.useState)([]),[eR,eE]=(0,i.useState)([]),[eD,eF]=(0,i.useState)(null),[eU,eM]=(0,i.useState)(!1),[e_,ez]=(0,i.useState)(!1),[eL,eq]=(0,i.useState)(!1),[eK,eH]=(0,i.useState)(null),[eJ,eW]=(0,i.useState)({}),[eB,eG]=(0,i.useState)(null),eV=(0,i.useRef)(!1),{copied:eQ,copy:eZ}=(0,p.C)(),eX="ag_risk_confirmed",eY=()=>{S(!0)},e0=()=>{"antigravity"===r&&"true"!==window.localStorage.getItem(eX)?eM(!0):e4?eY():(P(""),I(!0))},e1=()=>{P(""),I(!0)},e2=()=>{e4?e0():e1()},e3=v?{id:v.id,name:v.name||("anthropic-compatible"===v.type?"Anthropic Compatible":"OpenAI Compatible"),color:"anthropic-compatible"===v.type?"#D97757":"#10A37F",textIcon:"anthropic-compatible"===v.type?"AC":"OC",apiType:v.apiType,baseUrl:v.baseUrl,type:v.type}:c.zN[r]||c.fg[r]||c.IS[r]||c.nJ[r]||c.br[r],e5=e3?.authModes||[],e4=!!c.zN[r]||!!c.IS[r]||e5.includes("oauth"),e6=!!c.fg[r]||e5.includes("apikey"),e7=!!c.IS[r]?.noAuth,e8=(0,m.KC)(r),e9=(0,c.wG)(r),te=(0,c.mq)(r),tt=(0,c.gb)(r),ta=te||tt,ts=!ta&&e4&&e6,ti="xai"===r?"Grok Build OAuth":"OAuth",tl="xai"===r?"xAI API Key":"API Key";c.Q2[r]?.thinkingConfig||c.s9.extended;let tr=ta?r:e9,tn=ta?v?.prefix||r:e9,to=(0,i.useCallback)(async()=>{try{let e=await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tr)}`,{cache:"no-store"}),t=await e.json();e.ok&&eE(t.ids||[])}catch(e){console.log("Error fetching disabled models:",e)}},[tr]),td=async e=>{try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:tr,ids:[e]})})).ok&&await to()}catch(e){console.log("Error disabling model:",e)}},tc=async e=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tr)}&id=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await to()}catch(e){console.log("Error enabling model:",e)}},tm=async e=>{e.length&&eF({title:"Disable All Models",message:`Disable all ${e.length} model(s)?`,onConfirm:async()=>{eF(null);try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:tr,ids:e})})).ok&&await to()}catch(e){console.log("Error disabling all models:",e)}}})},tp=async()=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(tr)}`,{method:"DELETE"})).ok&&await to()}catch(e){console.log("Error enabling all models:",e)}},tx=(0,i.useCallback)(async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&W(t.aliases||{})}catch(e){console.log("Error fetching aliases:",e)}},[]);(0,i.useEffect)(()=>{"kilocode"===r&&fetch("/api/providers/kilo/free-models").then(e=>e.json()).then(e=>{e.models?.length&&eP(e.models)}).catch(()=>{})},[r]);let tu=(0,i.useCallback)(async()=>{try{let[e,t,a,s]=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(),n=await a.json(),o=s.ok?await s.json():{};if(e.ok){let e=(i.connections||[]).filter(e=>e.provider===r);h(e)}a.ok&&w(n.proxyPools||[]),ec((o.providerHealthChecks||{})[r]||null);let d=(o.providerStrategies||{})[r]||{};eu(d.fallbackStrategy||null),eb(null!=d.stickyRoundRobinLimit?String(d.stickyRoundRobinLimit):"1"),ef(d.stickyScope||"global"),ev(null!=d.stickyTtlMinutes?String(d.stickyTtlMinutes):"120"),ek(!1!==d.stickyFallbackToClientIp),ew(!1!==d.stickyRebindOnFailure),eS(null!=d.stickyRebindFailureThreshold?String(d.stickyRebindFailureThreshold):"3");let c=(o.providerThinking||{})[r]||{};if(eA(c.mode||"auto"),t.ok){let e=(l.nodes||[]).find(e=>e.id===r)||null;if(!e&&ta)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===r)||null))break}j(e)}}catch(e){console.log("Error fetching connections:",e)}finally{f(!1)}},[r,ta]),th=async e=>{try{let t=await fetch(`/api/provider-nodes/${r}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),a=await t.json();t.ok&&(j(a.node),await tu(),z(!1))}catch(e){console.log("Error updating provider node:",e)}},tb=async(e,t,a={})=>{try{let s=await fetch("/api/settings",{cache:"no-store"}),i=(s.ok?await s.json():{}).providerStrategies||{},l={...i[r]||{}};delete l.fallbackStrategy,delete l.stickyRoundRobinLimit,delete l.stickyScope,delete l.stickyTtlMinutes,delete l.stickyFallbackToClientIp,delete l.stickyRebindOnFailure,delete l.stickyRebindFailureThreshold,e&&(l.fallbackStrategy=e),"round-robin"===e&&(l.stickyRoundRobinLimit=Number(t||eh||1)||1,l.stickyScope=a.stickyScope??eg??"global",l.stickyTtlMinutes=Number(a.stickyTtlMinutes??ey??120)||120,l.stickyFallbackToClientIp=void 0!==a.stickyFallbackToClientIp?!!a.stickyFallbackToClientIp:!1!==ej,l.stickyRebindOnFailure=void 0!==a.stickyRebindOnFailure?!!a.stickyRebindOnFailure:!1!==eN,l.stickyRebindFailureThreshold=Number(a.stickyRebindFailureThreshold??eC??3)||3);let n={...i};0===Object.keys(l).length?delete n[r]:n[r]=l,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:n})})}catch(e){console.log("Error saving provider strategy:",e)}};(0,i.useEffect)(()=>{tu(),tx(),to()},[tu,tx,to]),(0,i.useEffect)(()=>{let e=(c.zN[r]||c.fg[r]||c.IS[r]||c.nJ[r])?.modelsFetcher;e&&u(e).then(eI)},[r]);let tg=async(e,t,a=e9)=>{let s=`${a}/${e}`;try{let e=await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:s,alias:t})});if(e.ok)await tx();else{let t=await e.json();alert(t.error||"Failed to set alias")}}catch(e){console.log("Error setting alias:",e)}},tf=async e=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await tx()}catch(e){console.log("Error deleting alias:",e)}},ty=async()=>{if(e_||0===x.length)return;let e=Object.fromEntries(x.map(e=>[e.id,{state:"queued",error:null}]));eV.current=!1,ez(!0),eq(!1),eH(null),eW(e),eG({total:x.length,completed:0,passed:0,failed:0,stopped:!1});let t=0,a=0;try{for(let e=0;e<x.length;e+=1){if(eV.current){eG({total:x.length,completed:e,passed:t,failed:a,stopped:!0});break}let s=x[e];eH(s.id),eW(e=>({...e,[s.id]:{state:"testing",error:null}}));try{let e=await fetch(`/api/providers/${s.id}/test`,{method:"POST"}),i=await e.json(),l=!!i.valid;l?t+=1:a+=1,eW(e=>({...e,[s.id]:{state:l?"success":"failed",error:l?null:i.error||null}}))}catch(e){a+=1,eW(t=>({...t,[s.id]:{state:"failed",error:e.message||"Test failed"}}))}eG({total:x.length,completed:e+1,passed:t,failed:a,stopped:!1}),e<x.length-1&&await new Promise(e=>setTimeout(e,1e3))}}finally{eH(null),ez(!1),eq(!1),eV.current=!1}},tv=async e=>{ep(t=>({...t,[e]:!0}));try{let t=await fetch("/api/provider-health",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({connectionId:e})}),a=await t.json().catch(()=>({}));t.ok||alert(a.error||"Health check failed"),await tu()}catch(e){console.log("Error running health check:",e),alert(e.message||"Health check failed")}finally{ep(t=>({...t,[e]:!1}))}},tj=async e=>{eF({title:"Delete Connection",message:"Delete this connection?",onConfirm:async()=>{eF(null);try{(await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok&&h(x.filter(t=>t.id!==e))}catch(e){console.log("Error deleting connection:",e)}}})},tk=()=>{tu(),S(!1)},tN=async e=>{P("");try{let t=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:r,...e})}),a=null;try{a=await t.json()}catch{a=null}if(t.ok){await tu(),I(!1);return}P(a?.error||"Failed to save connection")}catch(e){console.log("Error saving connection:",e),P("Failed to save connection")}},tw=async e=>{try{(await fetch(`/api/providers/${K.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await tu(),M(!1))}catch(e){console.log("Error updating connection:",e)}},tC=async(e,t)=>{try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&h(a=>a.map(a=>a.id===e?{...a,isActive:t}:a))}catch(e){console.log("Error updating connection status:",e)}},tS=async(e,t)=>{let a=[...x];[a[e],a[t]]=[a[t],a[e]],h(a);try{await Promise.all([fetch(`/api/providers/${a[e].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:e})}),fetch(`/api/providers/${a[t].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:t})})])}catch(e){console.log("Error swapping priority:",e),await tu()}},tT=x.filter(e=>es.includes(e.id));x.length>0&&(es.length,x.length),(0,i.useEffect)(()=>{ei(e=>e.filter(e=>x.some(t=>t.id===e)))},[x]),(()=>{if(0===tT.length)return;let e=new Set(tT.map(e=>e.providerSpecificData?.proxyPoolId||"__none__"));if(1===e.size){let t=[...e][0];if("__none__"===t)return;let a=k.find(e=>e.id===t);return a?.name}})();let tA=()=>{en||q(!1)},t$=async e=>{eo(!0);try{let t=0;for(let{connectionId:a,proxyPoolId:s}of e)try{(await fetch(`/api/providers/${a}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:s})})).ok||(t+=1)}catch(e){console.log("Error applying proxy for",a,e),t+=1}t>0&&alert(`Updated with ${t} failed request(s).`),await tu(),q(!1)}finally{eo(!1)}},tI=e=>t$(x.map(t=>({connectionId:t.id,proxyPoolId:e}))),tO=(0,s.jsx)("div",{className:"flex min-w-0 flex-col divide-y divide-black/[0.03] dark:divide-white/[0.03]",children:x.map((e,t)=>(0,s.jsx)("div",{className:"flex min-w-0 items-stretch",children:(0,s.jsx)("div",{className:"flex-1 min-w-0",children:(0,s.jsx)(N,{connection:e,proxyPools:k,isOAuth:e4,isFirst:0===t,isLast:t===x.length-1,onMoveUp:()=>tS(t,t-1),onMoveDown:()=>tS(t,t+1),onToggleActive:t=>tC(e.id,t),onUpdateProxy:async t=>{try{(await fetch(`/api/providers/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:t||null})})).ok&&h(a=>a.map(a=>a.id===e.id?{...a,providerSpecificData:{...a.providerSpecificData,proxyPoolId:t||null}}:a))}catch(e){console.log("Error updating proxy:",e)}},onEdit:()=>{H(e),M(!0)},onDelete:()=>tj(e.id),oneByOneStatus:eJ[e.id]||null,providerHealthConfig:ed,healthCheckRunning:!!em[e.id],onRunHealthCheck:()=>tv(e.id)})})},e.id))}),tP=k.filter(e=>!0===e.isActive),tR=(0,s.jsx)(d.aF,{isOpen:L,onClose:tA,title:`Apply Proxy (${x.length} connections)`,children:(0,s.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,s.jsxs)("div",{className:"flex flex-col",children:[(0,s.jsxs)("button",{onClick:()=>{let e=k.filter(e=>!0===e.isActive);return 0===e.length?void alert("No active proxy pools available."):t$(x.map((t,a)=>({connectionId:t.id,proxyPoolId:e[a%e.length].id})))},disabled:en||0===tP.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,s.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"sync_alt"}),(0,s.jsx)("span",{className:"text-sm text-text-main",children:"One-to-one (rotate)"})]}),(0,s.jsxs)("button",{onClick:()=>tI(null),disabled:en,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,s.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"link_off"}),(0,s.jsx)("span",{className:"text-sm text-text-main",children:"None (unbind all)"})]}),k.map(e=>(0,s.jsxs)("button",{onClick:()=>tI(e.id),disabled:en||!0!==e.isActive,className:"flex items-center gap-2 rounded-lg px-3 py-2 text-left transition-colors hover:bg-black/[0.04] dark:hover:bg-white/[0.04] disabled:cursor-not-allowed disabled:opacity-50",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px]",children:"lan"}),(0,s.jsx)("span",{className:"truncate text-sm text-text-main",children:e.name}),!0!==e.isActive&&(0,s.jsx)("span",{className:"text-[10px] text-text-muted",children:"(inactive)"})]},e.id))]}),en&&(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Applying..."}),(0,s.jsx)(d.$n,{onClick:tA,variant:"ghost",fullWidth:!0,disabled:en,children:"Cancel"})]})}),tE=async e=>{if(!Y){ee(e);try{let t=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${tr}/${e}`})}),a=await t.json();Q(t=>({...t,[e]:a.ok?"ok":"error"})),X(a.ok?"":a.error||"Model not reachable")}catch{Q(t=>({...t,[e]:"error"})),X("Network error")}finally{ee(null)}}};return b?(0,s.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,s.jsx)(d.Qv,{}),(0,s.jsx)(d.Qv,{})]}):e3?(0,s.jsxs)("div",{className:"flex min-w-0 flex-col gap-6 px-1 sm:gap-8 sm:px-0",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.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,s.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),"Back to Providers"]}),(0,s.jsxs)("div",{className:"flex min-w-0 items-center gap-3 sm:gap-4",children:[(0,s.jsx)("div",{className:"flex size-12 shrink-0 items-center justify-center rounded-lg",style:{backgroundColor:`${e3.color}15`},children:B?(0,s.jsx)("span",{className:"text-sm font-bold",style:{color:e3.color},children:e3.textIcon||e3.id.slice(0,2).toUpperCase()}):(0,s.jsx)(o.default,{src:te&&e3.apiType?"responses"===e3.apiType?"/providers/oai-r.png":"/providers/oai-cc.png":tt?"/providers/anthropic-m.png":`/providers/${e3.id}.png`,alt:e3.name,width:48,height:48,className:"max-h-12 max-w-12 rounded-lg object-contain",sizes:"48px",onError:()=>G(!0)})}),(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[(0,s.jsx)("h1",{className:"truncate text-2xl font-semibold tracking-tight sm:text-3xl",children:e3.name}),(e3.notice?.apiKeyUrl||e3.notice?.signupUrl||e3.website)&&(0,s.jsxs)("a",{href:e3.notice?.apiKeyUrl||e3.notice?.signupUrl||e3.website,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline inline-flex items-center gap-1",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),e3.notice?.apiKeyUrl?"Get API Key":"Sign up / Learn more"]})]}),(0,s.jsxs)("p",{className:"text-text-muted",children:[x.length," connection",1===x.length?"":"s"]})]})]})]}),e3.deprecated&&(0,s.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,s.jsx)("span",{className:"material-symbols-outlined text-[16px] text-yellow-500 mt-0.5 shrink-0",children:"warning"}),(0,s.jsx)("p",{className:"text-xs text-red-600 dark:text-yellow-400 leading-relaxed",children:e3.deprecationNotice})]}),e3.notice?.text&&!e3.deprecated&&(0,s.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,s.jsx)("span",{className:"material-symbols-outlined text-[16px] text-blue-500 shrink-0",children:"info"}),(0,s.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-blue-600 dark:text-blue-400",children:e3.notice.text}),e3.notice.apiKeyUrl&&(0,s.jsx)("a",{href:e3.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 →"})]}),ta&&v&&(0,s.jsx)(d.Zp,{children:(0,s.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold",children:tt?"Anthropic Compatible Details":"OpenAI Compatible Details"}),(0,s.jsxs)("p",{className:"break-all text-sm text-text-muted",children:[tt?"Messages API":"responses"===v.apiType?"Responses API":"Chat Completions"," \xb7 ",(v.baseUrl||"").replace(/\/$/,""),"/",tt?"messages":"responses"===v.apiType?"responses":"chat/completions"]})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,s.jsx)(d.$n,{size:"sm",icon:"add",onClick:()=>{P(""),I(!0)},className:"w-full sm:w-auto",children:"Add API Key"}),(0,s.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>z(!0),className:"w-full sm:w-auto",children:"Edit"}),(0,s.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:async()=>{eF({title:"Delete Compatible Node",message:`Delete this ${tt?"Anthropic":"OpenAI"} Compatible node?`,onConfirm:async()=>{eF(null);try{(await fetch(`/api/provider-nodes/${r}`,{method:"DELETE"})).ok&&a.push("/dashboard/providers")}catch(e){console.log("Error deleting provider node:",e)}}})},className:"w-full sm:w-auto",children:"Delete"})]})]})}),e7?(0,s.jsx)(d.gw,{providerId:r}):(0,s.jsxs)(d.Zp,{children:[(0,s.jsxs)("div",{className:"mb-5 flex flex-col gap-4",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-3 lg:flex-row lg:items-center lg:justify-between",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold",children:"Connections"}),"round-robin"===ex&&(0,s.jsx)("p",{className:"mt-1 text-xs text-text-muted",children:"Round Robin distributes requests across active accounts for this provider."})]}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2 lg:justify-end",children:[x.length>0&&k.length>0&&(0,s.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"lan",onClick:()=>q(!0),children:"Apply Proxy"}),x.length>0&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"sync",onClick:ty,disabled:e_,children:e_?"Testing Connection One-by-One...":"Test Connection One-by-One"}),e_&&(0,s.jsx)(d.$n,{size:"sm",variant:"ghost",icon:"stop",onClick:()=>{e_&&(eV.current=!0,eq(!0))},disabled:eL,children:eL?"Stopping...":"Stop"})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2 rounded-xl border border-border bg-surface/60 px-3 py-2 shadow-sm",children:[(0,s.jsx)("span",{className:"text-xs font-medium text-text-muted",children:"Round Robin"}),(0,s.jsx)(d.lM,{checked:"round-robin"===ex,onChange:e=>{let t=e?"round-robin":null,a=e?eh||"1":eh;e&&!eh&&eb("1"),eu(t),tb(t,a)}}),"round-robin"===ex&&(0,s.jsxs)("label",{className:"flex items-center gap-1.5 border-l border-border pl-2",children:[(0,s.jsx)("span",{className:"text-xs text-text-muted",children:"Sticky:"}),(0,s.jsx)("input",{type:"number",min:1,value:eh,onChange:e=>{var t;eb(t=e.target.value),tb("round-robin",t)},placeholder:"1",className:"w-14 rounded-md border border-border bg-background px-2 py-1 text-xs focus:border-primary focus:outline-none",title:"How many selections/sessions use the same account before global round-robin advances."})]})]})]})]}),"round-robin"===ex&&(0,s.jsxs)("div",{className:"rounded-2xl border border-border bg-surface/70 p-4 shadow-sm",children:[(0,s.jsxs)("div",{className:"mb-4 flex flex-col gap-2 lg:flex-row lg:items-start lg:justify-between",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px] text-primary",children:"sticky_note_2"}),(0,s.jsx)("h3",{className:"text-sm font-semibold text-text-main",children:"Provider Round Robin Sticky"})]}),(0,s.jsx)("p",{className:"mt-1 max-w-3xl text-xs leading-relaxed text-text-muted",children:"Choose how this provider keeps the same account/API key/OAuth connection for a client. Leave it on Global to keep the current behavior."})]}),(0,s.jsx)(d.Ex,{variant:"secondary",className:"w-fit shrink-0",children:"Per provider"})]}),(0,s.jsxs)("div",{className:"grid gap-4 lg:grid-cols-3",children:[(0,s.jsxs)("label",{className:"block",children:[(0,s.jsx)("span",{className:"mb-1 block text-[11px] font-semibold uppercase tracking-wide text-text-muted",children:"Sticky mode"}),(0,s.jsxs)("select",{value:eg,onChange:e=>{var t;ef(t=e.target.value),tb("round-robin",eh||"1",{stickyScope:t})},className:"w-full rounded-lg border border-border bg-background px-3 py-2 text-sm text-text-main outline-none focus:border-primary",children:[(0,s.jsx)("option",{value:"global",children:"Global / current behavior"}),(0,s.jsx)("option",{value:"client_ip",children:"Client IP"}),(0,s.jsx)("option",{value:"client_session",children:"Client IP + chat session"})]}),(0,s.jsx)("p",{className:"mt-1 text-[11px] leading-relaxed text-text-muted",children:"Global rotates like before. Client/session modes keep account identity more stable."})]}),(0,s.jsxs)("label",{className:"block",children:[(0,s.jsx)("span",{className:"mb-1 block text-[11px] font-semibold uppercase tracking-wide text-text-muted",children:"Sticky TTL minutes"}),(0,s.jsx)("input",{type:"number",min:1,max:10080,value:ey,onChange:e=>{var t;ev(t=e.target.value),tb("round-robin",eh||"1",{stickyTtlMinutes:Number(t)||120})},className:"w-full rounded-lg border border-border bg-background px-3 py-2 text-sm text-text-main outline-none focus:border-primary"}),(0,s.jsx)("p",{className:"mt-1 text-[11px] leading-relaxed text-text-muted",children:"Sticky assignments stay in memory and expire after this time."})]}),(0,s.jsxs)("label",{className:"block",children:[(0,s.jsx)("span",{className:"mb-1 block text-[11px] font-semibold uppercase tracking-wide text-text-muted",children:"Rebind after fallback count"}),(0,s.jsx)("input",{type:"number",min:1,max:50,value:eC,onChange:e=>{var t;eS(t=e.target.value),tb("round-robin",eh||"1",{stickyRebindFailureThreshold:Number(t)||3})},disabled:!eN,className:"w-full rounded-lg border border-border bg-background px-3 py-2 text-sm text-text-main outline-none focus:border-primary disabled:cursor-not-allowed disabled:opacity-50"}),(0,s.jsx)("p",{className:"mt-1 text-[11px] leading-relaxed text-text-muted",children:"After this many temporary fallbacks, the session is rebound to the fallback account."})]})]}),(0,s.jsxs)("div",{className:"mt-4 grid gap-3 lg:grid-cols-2",children:[(0,s.jsxs)("label",{className:"flex items-start gap-3 rounded-xl border border-border bg-background/70 p-3",children:[(0,s.jsx)("input",{type:"checkbox",checked:ej,onChange:e=>{var t;ek(t=e.target.checked),tb("round-robin",eh||"1",{stickyFallbackToClientIp:t})},className:"mt-0.5"}),(0,s.jsxs)("span",{children:[(0,s.jsx)("span",{className:"block text-xs font-medium text-text-main",children:"Fallback to Client IP when session id is missing"}),(0,s.jsx)("span",{className:"mt-1 block text-[11px] leading-relaxed text-text-muted",children:"Useful when the app does not send a stable chat session id."})]})]}),(0,s.jsxs)("label",{className:"flex items-start gap-3 rounded-xl border border-border bg-background/70 p-3",children:[(0,s.jsx)("input",{type:"checkbox",checked:eN,onChange:e=>{var t;ew(t=e.target.checked),tb("round-robin",eh||"1",{stickyRebindOnFailure:t})},className:"mt-0.5"}),(0,s.jsxs)("span",{children:[(0,s.jsx)("span",{className:"block text-xs font-medium text-text-main",children:"Rebind session after repeated unavailable/rate-limited hits"}),(0,s.jsx)("span",{className:"mt-1 block text-[11px] leading-relaxed text-text-muted",children:"First fallbacks are temporary; repeated failures switch that sticky session to a healthier account."})]})]})]}),(0,s.jsxs)("div",{className:"mt-4 rounded-xl border border-primary/20 bg-primary/5 px-3 py-2 text-[11px] leading-relaxed text-text-muted",children:["Recommended for Codex/Copilot-style OAuth providers:",(0,s.jsx)("span",{className:"font-medium text-text-main",children:" Client IP + chat session"}),", TTL 120 minutes, Client IP fallback enabled, rebind enabled after 3 fallbacks."]})]})]}),(0,s.jsx)(R,{providerId:r,onSaved:tu})," ",0===x.length?(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("div",{className:"inline-flex items-center justify-center w-9 h-9 rounded-full bg-primary/10 text-primary shrink-0",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:e4?"lock":"key"})}),(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"No connections yet"}),ts&&(0,s.jsxs)("p",{className:"text-xs text-text-muted",children:["Choose ",ti," or ",tl,"."]})]})]}),(0,s.jsx)("div",{className:"flex gap-2",children:ts?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(d.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:e0,children:ti}),(0,s.jsx)(d.$n,{size:"sm",icon:"key",onClick:e1,children:tl})]}):(0,s.jsxs)(s.Fragment,{children:[!ta&&"iflow"===r&&(0,s.jsx)(d.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>A(!0),children:"Cookie"}),(0,s.jsx)(d.$n,{size:"sm",icon:"add",onClick:e2,children:ta?"Add API Key":"iflow"===r?"OAuth":"Add Connection"})]})})]}):(0,s.jsxs)(s.Fragment,{children:[eB&&(0,s.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,s.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,s.jsxs)("span",{children:["Total: ",eB.total]}),(0,s.jsxs)("span",{children:["Completed: ",eB.completed]}),(0,s.jsxs)("span",{children:["Passed: ",eB.passed]}),(0,s.jsxs)("span",{children:["Failed: ",eB.failed]}),eB.stopped&&(0,s.jsx)("span",{className:"text-amber-600 dark:text-amber-400",children:"Stopped"}),e_&&eK&&(0,s.jsxs)("span",{children:["Running: ",x.find(e=>e.id===eK)?.name||eK]})]})}),tO,!ta&&(0,s.jsxs)("div",{className:"mt-4 grid grid-cols-1 gap-2 sm:flex",children:["iflow"===r&&(0,s.jsx)(d.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>A(!0),title:"Add connection using browser cookie",className:"w-full sm:w-auto",children:"Cookie"}),ts?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(d.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:e0,className:"w-full sm:w-auto",children:ti}),(0,s.jsx)(d.$n,{size:"sm",icon:"key",onClick:e1,className:"w-full sm:w-auto",children:tl})]}):(0,s.jsx)(d.$n,{size:"sm",icon:"add",onClick:e2,className:"w-full sm:w-auto",children:"Add"})]})]})]}),(0,s.jsxs)(d.Zp,{children:[(0,s.jsxs)("div",{className:"mb-4 flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold",children:"Available Models"}),!ta&&(e=[...e8,...eO.filter(e=>!e8.some(t=>t.id===e.id))].filter(e=>!e.type||"llm"===e.type).map(e=>e.id).filter(e=>!eR.includes(e)),(0,s.jsxs)("div",{className:"flex gap-2",children:[eR.length>0&&(0,s.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"restart_alt",onClick:tp,children:"Active All"}),e.length>0&&(0,s.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"block",onClick:()=>tm(e),children:"Disable All"})]}))]}),!!Z&&(0,s.jsx)("p",{className:"text-xs text-red-500 mb-3 break-words",children:Z}),(()=>{let e,t,a;if(ta)return(0,s.jsx)(y,{providerStorageAlias:tr,providerDisplayAlias:tn,modelAliases:J,copied:eQ,onCopy:eZ,onSetAlias:tg,onDeleteAlias:tf,connections:x,isAnthropic:tt});let i=[...e8,...eO.filter(e=>!e8.some(t=>t.id===e.id))].filter(e=>!e.type||"llm"===e.type),l=new Set(eR),n=i.filter(e=>!l.has(e.id)),o=i.filter(e=>l.has(e.id)),d=Object.entries(J).filter(([e,t])=>{let a=`${tr}/`;if(!t.startsWith(a))return!1;let s=t.slice(a.length);return e3.passthroughModels?!e8.some(e=>e.id===s):!e8.some(e=>e.id===s)&&e===s}).map(([e,t])=>({id:t.slice(`${tr}/`.length),alias:e,fullModel:t}));return(0,s.jsxs)("div",{className:"flex flex-wrap gap-3",children:[d.map(e=>(0,s.jsx)(g,{model:{id:e.id},fullModel:`${tn}/${e.id}`,alias:e.alias,copied:eQ,onCopy:eZ,onSetAlias:()=>{},onDeleteAlias:()=>tf(e.alias),testStatus:V[e.id],onTest:x.length>0||e7?()=>tE(e.id):void 0,isTesting:Y===e.id,isCustom:!0,isFree:!1},e.id)),n.map(e=>{let t=`${tr}/${e.id}`,a=`${r}/${e.id}`,i=Object.entries(J).find(([,e])=>e===t||e===a)?.[0];return(0,s.jsx)(g,{model:e,fullModel:`${tn}/${e.id}`,alias:i,copied:eQ,onCopy:eZ,onSetAlias:t=>tg(e.id,t,tr),onDeleteAlias:()=>tf(i),testStatus:V[e.id],onTest:x.length>0||e7?()=>tE(e.id):void 0,isTesting:Y===e.id,isFree:e.isFree,onDisable:()=>td(e.id)},e.id)}),(0,s.jsxs)("button",{onClick:()=>ea(!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,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"}),"Add Model"]}),e$.length>0&&(e=new Set(Object.values(J)),t=new Set(e8.map(e=>e.id)),0===(a=e$.filter(a=>!e.has(`${tr}/${a.id}`)&&!t.has(a.id))).length?null:(0,s.jsxs)("div",{className:"w-full mt-2",children:[(0,s.jsx)("p",{className:"text-xs text-text-muted mb-2",children:"Suggested free models (≥200k context):"}),(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:a.map(e=>(0,s.jsxs)("button",{onClick:async()=>{let t=e.id.split("/").pop();await tg(e.id,t,tr)},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.name} \xb7 ${(e.contextLength/1e3).toFixed(0)}k ctx`,children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),e.id.split("/").pop()]},e.id))})]})),o.length>0&&(0,s.jsxs)("div",{className:"w-full mt-2",children:[(0,s.jsxs)("p",{className:"text-xs text-text-muted mb-2",children:["Disabled models (",o.length,"):"]}),(0,s.jsx)("div",{className:"flex flex-wrap gap-2",children:o.map(e=>(0,s.jsxs)("button",{onClick:()=>tc(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,s.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),e.id]},e.id))})]})]})})()]}),tR,"kiro"===r?(0,s.jsx)(d.Mh,{isOpen:C,providerInfo:e3,onSuccess:tk,onClose:()=>S(!1)}):"cursor"===r?(0,s.jsx)(d.G9,{isOpen:C,onSuccess:tk,onClose:()=>S(!1)}):"gitlab"===r?(0,s.jsx)(d.vj,{isOpen:C,providerInfo:e3,onSuccess:tk,onClose:()=>S(!1)}):(0,s.jsx)(d.LF,{isOpen:C,provider:r,providerInfo:e3,onSuccess:tk,onClose:()=>S(!1)}),"iflow"===r&&(0,s.jsx)(d.vE,{isOpen:T,onSuccess:()=>{tu(),A(!1)},onClose:()=>A(!1)}),(0,s.jsx)(D,{isOpen:$,provider:r,providerName:e3.name,isCompatible:ta,isAnthropic:tt,authType:e3?.authType,authHint:e3?.authHint,website:e3?.website,proxyPools:k,error:O,onSave:tN,onBulkDone:tu,onClose:()=>{P(""),I(!1)}}),(0,s.jsx)(d.wI,{isOpen:E,connection:K,proxyPools:k,onSave:tw,onClose:()=>M(!1)}),ta&&(0,s.jsx)(F,{isOpen:_,node:v,onSave:th,onClose:()=>z(!1),isAnthropic:tt}),!ta&&(0,s.jsx)(U,{isOpen:et,providerAlias:tr,providerDisplayAlias:tn,onSave:async e=>{let t=e3?.passthroughModels?e.split("/").pop():e;await tg(e,t,tr),ea(!1)},onClose:()=>ea(!1)}),(0,s.jsx)(d.uo,{isOpen:eU,onClose:()=>eM(!1),onConfirm:()=>{(window.localStorage.setItem(eX,"true"),eM(!1),e4)?eY():e1()},title:"Risk Notice",message:e3?.deprecationNotice,confirmText:"I Understand, Continue",cancelText:"Cancel",variant:"danger"}),(0,s.jsx)(d.uo,{isOpen:!!eD,onClose:()=>eF(null),onConfirm:eD?.onConfirm,title:eD?.title||"Confirm",message:eD?.message,variant:"danger"})]}):(0,s.jsxs)("div",{className:"text-center py-20",children:[(0,s.jsx)("p",{className:"text-text-muted",children:"Provider not found"}),(0,s.jsx)(n(),{href:"/dashboard/providers",className:"text-primary mt-4 inline-block",children:"Back to Providers"})]})}D.propTypes={isOpen:b().bool.isRequired,provider:b().string,providerName:b().string,isCompatible:b().bool,isAnthropic:b().bool,authType:b().string,authHint:b().string,website:b().string,proxyPools:b().arrayOf(b().shape({id:b().string,name:b().string})),error:b().string,onSave:b().func.isRequired,onBulkDone:b().func,onClose:b().func.isRequired},F.propTypes={isOpen:b().bool.isRequired,node:b().shape({id:b().string,name:b().string,prefix:b().string,apiType:b().string,baseUrl:b().string,providerSpecificData:b().object,tags:b().oneOfType([b().string,b().array]),maxInFlight:b().oneOfType([b().string,b().number])}),onSave:b().func.isRequired,onClose:b().func.isRequired,isAnthropic:b().bool},U.propTypes={isOpen:b().bool.isRequired,providerAlias:b().string.isRequired,providerDisplayAlias:b().string.isRequired,onSave:b().func.isRequired,onClose:b().func.isRequired}},18205:(e,t,a)=>{Promise.resolve().then(a.bind(a,5020))}},e=>{e.O(0,[2574,3862,8500,4288,5772,1321,5497,8441,3794,7358],()=>e(e.s=18205)),_N_E=e.O()}]);
|