@rabbi696/ezrouter 0.6.6 → 0.6.7
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 +21 -19
- 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 +12 -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 +3 -3
- 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/convoy/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/convoy/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/convoy/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/error-log/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/error-log/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/error-log/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/keys/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/keys/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/keys/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/servers/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/servers/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mcp-gateway/servers/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +16 -16
- 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/providers/[id]/page.js +6 -6
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +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/routing-health/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/routing-health/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/routing-health/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/token-saver/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_global-error/page.js +3 -3
- package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_global-error.html +1 -1
- package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_not-found/page.js +2 -2
- package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_not-found.html +1 -1
- package/app/.next-cli-build/server/app/_not-found.rsc +3 -3
- package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +3 -3
- 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 +3 -3
- 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 +1 -1
- package/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/reset-password/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/acs/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/acs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/start/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/status/route.js +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/changelog/route.js +1 -1
- package/app/.next-cli-build/server/app/api/changelog/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli/providers/codex/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli/providers/codex/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +6 -6
- package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codex-native/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codex-native/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codex-native/readiness/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codex-native/readiness/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +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/grok-build-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/hermes-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 +3 -3
- 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 +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/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/[id]/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/combos/[id]/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/combos/export/route.js +1 -1
- package/app/.next-cli-build/server/app/api/combos/export/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/combos/import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/combos/import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
- package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/combos/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/combos/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/convoy/rules/route.js +2 -2
- package/app/.next-cli-build/server/app/api/convoy/rules/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/extras/route.js +1 -1
- package/app/.next-cli-build/server/app/api/headroom/extras/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/restart/route.js +1 -1
- package/app/.next-cli-build/server/app/api/headroom/restart/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -1
- package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -1
- package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/stop/route.js +1 -1
- package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/health/route.js +1 -1
- package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/init/route.js +1 -1
- package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/internal/codex-native/lease/[action]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/internal/codex-native/lease/[action]/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/mcp-gateway/instances/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/mcp-gateway/instances/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp-gateway/instances/[id]/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/mcp-gateway/instances/[id]/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp-gateway/instances/route.js +1 -1
- package/app/.next-cli-build/server/app/api/mcp-gateway/instances/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp-gateway/keys/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/mcp-gateway/keys/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp-gateway/keys/route.js +1 -1
- package/app/.next-cli-build/server/app/api/mcp-gateway/keys/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp-gateway/message/route.js +2 -2
- package/app/.next-cli-build/server/app/api/mcp-gateway/message/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp-gateway/oauth/[id]/[action]/route.js +2 -2
- package/app/.next-cli-build/server/app/api/mcp-gateway/oauth/[id]/[action]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp-gateway/route.js +1 -1
- package/app/.next-cli-build/server/app/api/mcp-gateway/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp-gateway/sse/route.js +2 -2
- package/app/.next-cli-build/server/app/api/mcp-gateway/sse/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/catalog-sync/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/catalog-sync/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/callback/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/callback/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +2 -2
- package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js +1 -0
- package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js.nft.json +1 -0
- package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route_client-reference-manifest.js +1 -0
- package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js +4 -0
- package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js.nft.json +1 -0
- package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route_client-reference-manifest.js +1 -0
- package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
- package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/refresh-profile/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/refresh-profile/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/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 +14 -14
- 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 +14 -14
- 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 +14 -14
- package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/health/route.js +2 -2
- package/app/.next-cli-build/server/app/api/pxpipe/health/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/install/route.js +2 -2
- package/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js +2 -2
- package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js +2 -2
- package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/start/route.js +2 -2
- package/app/.next-cli-build/server/app/api/pxpipe/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js +2 -2
- package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/status/route.js +2 -2
- package/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js +2 -2
- package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/routing-health/route.js +1 -1
- package/app/.next-cli-build/server/app/api/routing-health/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/token-saver/stats/route.js +1 -1
- package/app/.next-cli-build/server/app/api/token-saver/stats/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/token-saver/stream/route.js +2 -2
- package/app/.next-cli-build/server/app/api/token-saver/stream/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tool-disclosure/stats/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tool-disclosure/stats/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
- package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +2 -2
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/error-logs/route.js +3 -3
- package/app/.next-cli-build/server/app/api/usage/error-logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/logs/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/stream/route.js +2 -2
- package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/alpha/search/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/alpha/search/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/codex/alpha/search/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/codex/alpha/search/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/codex/images/edits/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/codex/images/edits/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/codex/images/generations/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/codex/images/generations/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/codex/memories/trace_summarize/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/codex/memories/trace_summarize/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/codex/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/codex/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/codex/responses/compact/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/codex/responses/compact/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/codex/responses/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/codex/responses/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 +3 -3
- package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/[...model]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/[...model]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/version/route.js +1 -1
- package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
- package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
- package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/callback/page.js +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 +3 -3
- package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +3 -3
- 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 +3 -3
- package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +1 -1
- 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 +5 -5
- 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 +5 -5
- 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 +3 -3
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +5 -5
- 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 +5 -5
- 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 +3 -3
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/combos.rsc +5 -5
- 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 +5 -5
- 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 +3 -3
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/convoy.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/convoy.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/convoy.segments/!KGRhc2hib2FyZCk/dashboard/convoy/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/convoy.segments/!KGRhc2hib2FyZCk/dashboard/convoy.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/convoy.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/convoy.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/convoy.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/convoy.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/convoy.segments/_index.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/convoy.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +5 -5
- 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 +3 -3
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway/keys/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway/keys.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/_index.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/keys.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway/servers/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway/servers.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/_index.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway/servers.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/!KGRhc2hib2FyZCk/dashboard/mcp-gateway.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/_index.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/mcp-gateway.segments/_tree.segment.rsc +1 -1
- 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 +5 -5
- 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 +5 -5
- 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 +3 -3
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.rsc +5 -5
- 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 +5 -5
- 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 +3 -3
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +1 -1
- 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 +2 -2
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +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 +3 -3
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +5 -5
- 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 +5 -5
- 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 +3 -3
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers.rsc +5 -5
- 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 +5 -5
- 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 +3 -3
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +5 -5
- 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 +5 -5
- 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 +3 -3
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_index.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/quota.html +2 -2
- package/app/.next-cli-build/server/app/dashboard/quota.rsc +6 -6
- 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 +6 -6
- 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 +3 -3
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/routing-health.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/routing-health.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/routing-health.segments/!KGRhc2hib2FyZCk/dashboard/routing-health/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/routing-health.segments/!KGRhc2hib2FyZCk/dashboard/routing-health.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/routing-health.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/routing-health.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/routing-health.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/routing-health.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/routing-health.segments/_index.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/routing-health.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +2 -2
- package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +3 -3
- 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 +3 -3
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +1 -1
- 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 +5 -5
- 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 +5 -5
- 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 +3 -3
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_index.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/translator.rsc +5 -5
- 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 +5 -5
- 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 +3 -3
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/usage.rsc +5 -5
- 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 +5 -5
- 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 +3 -3
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard.html +1 -1
- package/app/.next-cli-build/server/app/dashboard.rsc +5 -5
- 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 +5 -5
- 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 +3 -3
- package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/favicon.ico/route.js +1 -1
- package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/index.html +1 -1
- package/app/.next-cli-build/server/app/index.rsc +3 -3
- 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 +3 -3
- 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 +3 -3
- package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +1 -1
- 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 +3 -3
- package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +3 -3
- 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 +3 -3
- package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +1 -1
- 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 +3 -3
- package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/manifest.webmanifest/route.js +2 -2
- package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/page.js +2 -2
- package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app-paths-manifest.json +21 -19
- package/app/.next-cli-build/server/chunks/1133.js +1 -1
- package/app/.next-cli-build/server/chunks/1273.js +1 -0
- package/app/.next-cli-build/server/chunks/1482.js +2 -2
- package/app/.next-cli-build/server/chunks/1531.js +1 -1
- package/app/.next-cli-build/server/chunks/{7306.js → 1744.js} +18 -18
- package/app/.next-cli-build/server/chunks/1847.js +1 -1
- package/app/.next-cli-build/server/chunks/2021.js +1 -1
- package/app/.next-cli-build/server/chunks/2348.js +1 -1
- package/app/.next-cli-build/server/chunks/2892.js +1 -1
- package/app/.next-cli-build/server/chunks/2898.js +22 -3
- package/app/.next-cli-build/server/chunks/3148.js +1 -1
- package/app/.next-cli-build/server/chunks/3245.js +1 -1
- package/app/.next-cli-build/server/chunks/3311.js +1 -1
- package/app/.next-cli-build/server/chunks/3433.js +4 -4
- package/app/.next-cli-build/server/chunks/3547.js +1 -1
- package/app/.next-cli-build/server/chunks/3583.js +2 -2
- package/app/.next-cli-build/server/chunks/369.js +22 -28
- package/app/.next-cli-build/server/chunks/3698.js +1 -1
- package/app/.next-cli-build/server/chunks/3886.js +1 -1
- package/app/.next-cli-build/server/chunks/3977.js +2 -2
- package/app/.next-cli-build/server/chunks/412.js +5 -5
- package/app/.next-cli-build/server/chunks/4123.js +1 -1
- package/app/.next-cli-build/server/chunks/4152.js +1 -0
- package/app/.next-cli-build/server/chunks/4574.js +1 -1
- package/app/.next-cli-build/server/chunks/4827.js +1 -1
- package/app/.next-cli-build/server/chunks/4878.js +1 -1
- package/app/.next-cli-build/server/chunks/4924.js +300 -0
- package/app/.next-cli-build/server/chunks/5130.js +1 -0
- package/app/.next-cli-build/server/chunks/5224.js +1 -0
- package/app/.next-cli-build/server/chunks/5315.js +1 -1
- package/app/.next-cli-build/server/chunks/576.js +1 -0
- package/app/.next-cli-build/server/chunks/5849.js +1 -1
- package/app/.next-cli-build/server/chunks/6000.js +1 -0
- package/app/.next-cli-build/server/chunks/6330.js +1 -0
- package/app/.next-cli-build/server/chunks/6816.js +4 -4
- package/app/.next-cli-build/server/chunks/6875.js +1 -0
- package/app/.next-cli-build/server/chunks/6892.js +1 -1
- package/app/.next-cli-build/server/chunks/6947.js +1 -1
- package/app/.next-cli-build/server/chunks/7239.js +3 -3
- package/app/.next-cli-build/server/chunks/7353.js +1 -1
- package/app/.next-cli-build/server/chunks/7362.js +1 -1
- package/app/.next-cli-build/server/chunks/{6535.js → 7524.js} +3 -3
- package/app/.next-cli-build/server/chunks/7603.js +1 -1
- package/app/.next-cli-build/server/chunks/7677.js +1 -1
- package/app/.next-cli-build/server/chunks/7774.js +8 -8
- package/app/.next-cli-build/server/chunks/7775.js +1 -1
- package/app/.next-cli-build/server/chunks/8129.js +1 -1
- package/app/.next-cli-build/server/chunks/823.js +1 -1
- package/app/.next-cli-build/server/chunks/8243.js +7 -7
- package/app/.next-cli-build/server/chunks/8299.js +1 -0
- package/app/.next-cli-build/server/chunks/8306.js +1 -1
- package/app/.next-cli-build/server/chunks/8459.js +1 -1
- package/app/.next-cli-build/server/chunks/8586.js +1 -1
- package/app/.next-cli-build/server/chunks/8658.js +1 -1
- package/app/.next-cli-build/server/chunks/880.js +7 -7
- package/app/.next-cli-build/server/chunks/8946.js +1 -1
- package/app/.next-cli-build/server/chunks/8976.js +1 -1
- package/app/.next-cli-build/server/chunks/9062.js +1 -1
- package/app/.next-cli-build/server/chunks/9217.js +1 -1
- package/app/.next-cli-build/server/chunks/9303.js +1 -1
- package/app/.next-cli-build/server/chunks/9485.js +1 -1
- package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
- package/app/.next-cli-build/server/middleware.js +4 -4
- 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/caISOCVUmfRaqJe0JjnZh/_buildManifest.js +1 -0
- package/app/.next-cli-build/static/chunks/{1321-f082c0cd9fbb2097.js → 1321-b8a4f80390cd3ea3.js} +1 -1
- package/app/.next-cli-build/static/chunks/2852-c263bdffcaa33c2a.js +95 -0
- package/app/.next-cli-build/static/chunks/{316-89ef881941b53b2c.js → 316-54e07b35de6154b5.js} +1 -1
- package/app/.next-cli-build/static/chunks/{5497-f328c487bfcc0d0e.js → 5497-a4fcd9746123edae.js} +5 -5
- package/app/.next-cli-build/static/chunks/{8010-5892efa7a8d0bb03.js → 8010-4f17bcbf4cac2817.js} +2 -2
- package/app/.next-cli-build/static/chunks/8105-914b0eb9e3a50b9d.js +1 -0
- package/app/.next-cli-build/static/chunks/9227-0d7e658f80553659.js +3 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/{page-ce0b5b8882899119.js → page-5c9ac89a0fd078b6.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/{page-257aaa1374d529b4.js → page-7a5b3f43946719b9.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/page-12452d79eba6c182.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/{page-90a4f789d907db25.js → page-8236097df15d7be9.js} +16 -16
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/{page-e44166090e05cfb3.js → page-694c3b4cef7d111e.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-11a1a4053a30913f.js +27 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-679ec0628cd9d54f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-6f16a27a86240648.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/page-f744066e8709b6c1.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/{layout-100d6d3c6c7256f1.js → layout-fa3153761cc595bb.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/_global-error/page-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/login/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/saml/acs/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/saml/metadata/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/saml/start/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/saml/test/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/status/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/changelog/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli/providers/codex/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-native/models/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-native/readiness/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/devin-settings/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/grok-build-settings/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/pi-settings/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/combos/[id]/test/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/combos/export/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/combos/import/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/combos/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/combos/test/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/convoy/rules/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/extras/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/restart/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/health/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/init/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/internal/codex-native/lease/[action]/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/keys/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/locale/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/mcp-gateway/instances/[id]/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/mcp-gateway/instances/[id]/test/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/mcp-gateway/instances/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/mcp-gateway/keys/[id]/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/mcp-gateway/keys/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/mcp-gateway/message/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/mcp-gateway/oauth/[id]/[action]/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/mcp-gateway/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/mcp-gateway/sse/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/alias/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/availability/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/catalog-sync/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/custom/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/test/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/callback/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/bulk-import/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/api-key/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/xiaomi-mimo/auto-import/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pricing/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/refresh-profile/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/client/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/health/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/logs/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/restart/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/start/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/stats/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/stop/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/routing-health/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/database/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/shutdown/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tags/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/token-saver/stats/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/token-saver/stream/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tool-disclosure/stats/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/load/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/save/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/send/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/error-logs/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/history/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/alpha/search/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/codex/alpha/search/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/codex/images/edits/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/codex/images/generations/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/codex/memories/trace_summarize/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/codex/models/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/codex/responses/compact/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/codex/responses/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/models/[...model]/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/models/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/search/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/videos/[id]/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/videos/edits/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/videos/extensions/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/videos/generations/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/version/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/version/update/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/app/page-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-116cfb93931e646f.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-116cfb93931e646f.js +1 -0
- package/app/CHANGELOG.md +14 -0
- package/app/package.json +1 -1
- package/app/public/CHANGELOG.md +14 -0
- package/app/src/lib/db/migrate.js +22 -1
- package/app/src/lib/oauth/providers/xiaomi-mimo.js +123 -0
- package/app/src/mitm/server.js +31 -31
- package/app/src/sse/services/backgroundTokenRefresh.js +9 -6
- package/cli.js +4 -3
- package/package.json +1 -1
- package/src/cli/tray/autostart.js +65 -3
- package/src/cli/utils/modelSelector.js +182 -45
- package/app/.next-cli-build/server/chunks/1012.js +0 -1
- package/app/.next-cli-build/server/chunks/2221.js +0 -300
- package/app/.next-cli-build/server/chunks/5681.js +0 -1
- package/app/.next-cli-build/server/chunks/5822.js +0 -1
- package/app/.next-cli-build/server/chunks/6030.js +0 -1
- package/app/.next-cli-build/server/chunks/8540.js +0 -1
- package/app/.next-cli-build/server/chunks/9637.js +0 -1
- package/app/.next-cli-build/static/3kPJjWzmNgPDoa5VgYHwk/_buildManifest.js +0 -1
- package/app/.next-cli-build/static/chunks/2595-a258abe0d4a34649.js +0 -95
- package/app/.next-cli-build/static/chunks/8105-b488efe0a830e2a7.js +0 -1
- package/app/.next-cli-build/static/chunks/9227-bb7d883d6cd67632.js +0 -3
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/page-2c65df20769d31df.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-c2fb956227849ef3.js +0 -27
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-10cfe308dcee550e.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-c55b823e44230396.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/page-e38b4f8ebf6a3d47.js +0 -1
- package/app/.next-cli-build/static/chunks/app/_global-error/page-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/login/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/saml/acs/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/saml/metadata/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/saml/start/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/saml/test/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/status/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/changelog/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli/providers/codex/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-native/models/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-native/readiness/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/devin-settings/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/grok-build-settings/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/pi-settings/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/combos/[id]/test/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/combos/export/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/combos/import/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/combos/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/combos/test/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/convoy/rules/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/extras/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/restart/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/health/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/init/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/internal/codex-native/lease/[action]/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/keys/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/locale/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/mcp-gateway/instances/[id]/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/mcp-gateway/instances/[id]/test/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/mcp-gateway/instances/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/mcp-gateway/keys/[id]/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/mcp-gateway/keys/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/mcp-gateway/message/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/mcp-gateway/oauth/[id]/[action]/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/mcp-gateway/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/mcp-gateway/sse/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/alias/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/availability/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/catalog-sync/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/custom/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/test/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/callback/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/bulk-import/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pricing/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/refresh-profile/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/client/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/health/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/logs/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/restart/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/start/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/stats/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pxpipe/stop/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/routing-health/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/database/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/shutdown/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tags/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/token-saver/stats/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/token-saver/stream/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tool-disclosure/stats/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/load/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/save/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/send/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/error-logs/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/history/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/alpha/search/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/codex/alpha/search/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/codex/images/edits/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/codex/images/generations/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/codex/memories/trace_summarize/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/codex/models/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/codex/responses/compact/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/codex/responses/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/models/[...model]/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/models/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/search/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/videos/[id]/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/videos/edits/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/videos/extensions/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/videos/generations/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/version/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/version/update/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/page-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-25eef5877853a92d.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-25eef5877853a92d.js +0 -1
- /package/app/.next-cli-build/static/{3kPJjWzmNgPDoa5VgYHwk → caISOCVUmfRaqJe0JjnZh}/_ssgManifest.js +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";exports.id=6535,exports.ids=[6535],exports.modules={9861:(a,b,c)=>{c.d(b,{A:()=>k});var d=c(48249),e=c(67484),f=c(50412),g=c(81220),h=c(52632),i=c(73725),j=c(31407);function k({tool:a,isExpanded:b,onToggle:c,baseUrl:l,apiKeys:m,activeProviders:n,cloudEnabled:o,initialStatus:p,tunnelEnabled:q,tunnelPublicUrl:r,tailscaleEnabled:s,tailscaleUrl:t}){let[u,v]=(0,e.useState)(p||null),[w,x]=(0,e.useState)(!1),[y,z]=(0,e.useState)(!1),[A,B]=(0,e.useState)(!1),[C,D]=(0,e.useState)(null),[E,F]=(0,e.useState)(!1),[G,H]=(0,e.useState)(""),[I,J]=(0,e.useState)(""),[K,L]=(0,e.useState)(!1),[M,N]=(0,e.useState)({}),[O,P]=(0,e.useState)(!1),[Q,R]=(0,e.useState)(""),S=u?.installed?u.has9Router?"configured":"not_configured":null,T=()=>{let a=Q||`${l}/v1`;return a.endsWith("/v1")?a:`${a}/v1`},U=async()=>{x(!0);try{let a=await fetch("/api/cli-tools/kilo-settings"),b=await a.json();v(b)}catch(a){v({installed:!1,error:a.message})}finally{x(!1)}},V=async()=>{z(!0),D(null);try{let a=G&&G.trim()||o?G:"sk_ezrouter",b=await fetch("/api/cli-tools/kilo-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:T(),apiKey:a,model:I})}),c=await b.json();b.ok?((0,i.Xg)(T(),{tunnelPublicUrl:r,tailscaleUrl:t}),D({type:"success",text:"Settings applied successfully!"}),U()):D({type:"error",text:c.error||"Failed to apply settings"})}catch(a){D({type:"error",text:a.message})}finally{z(!1)}},W=async()=>{B(!0),D(null);try{let a=await fetch("/api/cli-tools/kilo-settings",{method:"DELETE"}),b=await a.json();a.ok?(D({type:"success",text:"Settings reset successfully!"}),J(""),U()):D({type:"error",text:b.error||"Failed to reset settings"})}catch(a){D({type:"error",text:a.message})}finally{B(!1)}};return(0,d.jsxs)(f.Zp,{padding:"xs",className:"overflow-hidden",children:[(0,d.jsxs)("div",{className:"flex items-start justify-between gap-3 hover:cursor-pointer sm:items-center",onClick:c,children:[(0,d.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,d.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,d.jsx)(g.default,{src:"/providers/kilocode.png",alt:a.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:a=>{a.target.style.display="none"},loading:"lazy",decoding:"async"})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[(0,d.jsx)("h3",{className:"font-medium text-sm",children:a.name}),"configured"===S&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-green-500/10 text-green-600 dark:text-green-400 rounded-full",children:"Connected"}),"not_configured"===S&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-yellow-500/10 text-yellow-600 dark:text-yellow-400 rounded-full",children:"Not configured"})]}),(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:a.description})]})]}),(0,d.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${b?"rotate-180":""}`,children:"expand_more"})]}),b&&(0,d.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[w&&(0,d.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,d.jsx)("span",{children:"Checking Kilo Code..."})]}),!w&&u&&!u.installed&&(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{className:"flex flex-col gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,d.jsxs)("div",{className:"flex items-start gap-3",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,d.jsxs)("div",{className:"flex-1",children:[(0,d.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:"Kilo Code not detected locally"}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"Manual configuration is still available if 9router is deployed on a remote server."})]})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2 pl-9",children:[(0,d.jsxs)(f.$n,{variant:"secondary",size:"sm",onClick:()=>P(!0),className:"!bg-yellow-500/20 !border-yellow-500/40 !text-yellow-700 dark:!text-yellow-300 hover:!bg-yellow-500/30",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:"content_copy"}),"Manual Config"]}),(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:()=>F(!E),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:E?"expand_less":"help"}),E?"Hide":"How to Install"]})]})]}),E&&(0,d.jsxs)("div",{className:"p-4 bg-surface border border-border rounded-lg",children:[(0,d.jsx)("h4",{className:"font-medium mb-3",children:"Installation Guide"}),(0,d.jsxs)("p",{className:"text-sm text-text-muted",children:["Install Kilo Code from ",(0,d.jsx)("a",{className:"text-primary underline",href:"https://kilocode.ai",target:"_blank",rel:"noreferrer",children:"kilocode.ai"})," or VS Code extension marketplace."]})]})]}),!w&&u?.installed&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Select Endpoint"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)(h.A,{value:Q||Q||`${l}/v1`,onChange:R,requiresExternalUrl:a.requiresExternalUrl,tunnelEnabled:q,tunnelPublicUrl:r,tailscaleEnabled:s,tailscaleUrl:t})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"API Key"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)(j.A,{value:G,onChange:H,apiKeys:m,cloudEnabled:o})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Model"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsxs)("div",{className:"relative w-full min-w-0",children:[(0,d.jsx)("input",{type:"text",value:I,onChange:a=>J(a.target.value),placeholder:"provider/model-id",className:"w-full min-w-0 pl-2 pr-7 py-2 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50 sm:py-1.5"}),I&&(0,d.jsx)("button",{onClick:()=>J(""),className:"absolute right-1 top-1/2 -translate-y-1/2 p-0.5 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]}),(0,d.jsx)("button",{onClick:()=>L(!0),disabled:!n?.length,className:`w-full sm:w-auto rounded border px-2 py-2 text-xs transition-colors sm:py-1.5 whitespace-nowrap sm:shrink-0 ${n?.length?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select Model"})]})]}),C&&(0,d.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===C.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===C.type?"check_circle":"error"}),(0,d.jsx)("span",{children:C.text})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,d.jsxs)(f.$n,{variant:"primary",size:"sm",onClick:V,disabled:!G&&o&&m.length>0||!I,loading:y,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:W,disabled:A,loading:A,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,d.jsxs)(f.$n,{variant:"ghost",size:"sm",onClick:()=>P(!0),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]})]})]})]}),K&&(0,d.jsx)(f.rq,{isOpen:K,onClose:()=>L(!1),onSelect:a=>{J(a.value),L(!1)},selectedModel:I,activeProviders:n,modelAliases:M,title:"Select Model for Kilo Code"}),(0,d.jsx)(f.uR,{isOpen:O,onClose:()=>P(!1),title:"Kilo Code - Manual Configuration",configs:[{filename:"~/.local/share/kilo/auth.json",content:JSON.stringify({"openai-compatible":{type:"api-key",apiKey:G&&G.trim()?G:o?"<API_KEY_FROM_DASHBOARD>":"sk_ezrouter",baseUrl:T(),model:I||"provider/model-id"}},null,2)}]})]})}},17126:(a,b,c)=>{c.d(b,{A:()=>l});var d=c(48249),e=c(67484),f=c(50412),g=c(81220),h=c(52632),i=c(73725),j=c(31407),k=c(78052);function l({tool:a,isExpanded:b,onToggle:c,baseUrl:m,apiKeys:n,activeProviders:o,cloudEnabled:p,initialStatus:q,tunnelEnabled:r,tunnelPublicUrl:s,tailscaleEnabled:t,tailscaleUrl:u}){let v,w,[x,y]=(0,e.useState)(q||null),[z,A]=(0,e.useState)(!1),[B,C]=(0,e.useState)(!1),[D,E]=(0,e.useState)(!1),[F,G]=(0,e.useState)(null),[H,I]=(0,e.useState)(""),[J,K]=(0,e.useState)(""),[L,M]=(0,e.useState)({}),[N,O]=(0,e.useState)(!1),[P,Q]=(0,e.useState)([]),[R,S]=(0,e.useState)(!1),T=(0,e.useRef)([]),U=async a=>{try{let b=H&&H.trim()||p?H:"sk_ezrouter";await fetch("/api/cli-tools/copilot-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:X(),apiKey:b,models:a})})}catch(a){console.log("Error saving models:",a)}},V=x?.currentUrl||"",W=(()=>{if(!x)return null;if(!x.has9Router)return"not_configured";let a=x.currentUrl||"";return(0,k.Q)(a,{tunnelPublicUrl:s,tailscaleUrl:u})?"configured":"other"})(),X=()=>{let a=J||m;return a.endsWith("/v1")?a:`${a}/v1`},Y=async()=>{A(!0);try{let a=await fetch("/api/cli-tools/copilot-settings"),b=await a.json();y(b)}catch(a){y({error:a.message})}finally{A(!1)}},Z=async()=>{C(!0),G(null);try{let a=H&&H.trim()||p?H:"sk_ezrouter",b=await fetch("/api/cli-tools/copilot-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:X(),apiKey:a,models:P})}),c=await b.json();b.ok?((0,i.Xg)(X(),{tunnelPublicUrl:s,tailscaleUrl:u}),G({type:"success",text:c.message||"Settings applied! Reload VS Code."}),Y()):G({type:"error",text:c.error||"Failed to apply settings"})}catch(a){G({type:"error",text:a.message})}finally{C(!1)}},$=async()=>{E(!0),G(null);try{let a=await fetch("/api/cli-tools/copilot-settings",{method:"DELETE"}),b=await a.json();a.ok?(G({type:"success",text:"Settings reset successfully!"}),Q([]),Y()):G({type:"error",text:b.error||"Failed to reset settings"})}catch(a){G({type:"error",text:a.message})}finally{E(!1)}};return(0,d.jsxs)(f.Zp,{padding:"xs",className:"overflow-hidden",children:[(0,d.jsxs)("div",{className:"flex items-start justify-between gap-3 hover:cursor-pointer sm:items-center",onClick:c,children:[(0,d.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,d.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,d.jsx)(g.default,{src:"/providers/copilot.png",alt:a.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:a=>{a.target.style.display="none"},loading:"lazy",decoding:"async"})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[(0,d.jsx)("h3",{className:"font-medium text-sm",children:a.name}),"configured"===W&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-green-500/10 text-green-600 dark:text-green-400 rounded-full",children:"Connected"}),"not_configured"===W&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-yellow-500/10 text-yellow-600 dark:text-yellow-400 rounded-full",children:"Not configured"}),"other"===W&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-blue-500/10 text-blue-600 dark:text-blue-400 rounded-full",children:"Other"})]}),(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:a.description})]})]}),(0,d.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${b?"rotate-180":""}`,children:"expand_more"})]}),b&&(0,d.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[z&&(0,d.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,d.jsx)("span",{children:"Checking Copilot config..."})]}),!z&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex items-start gap-3 p-3 bg-blue-500/10 border border-blue-500/30 rounded-lg",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-blue-500 text-lg",children:"info"}),(0,d.jsxs)("div",{className:"text-xs text-blue-700 dark:text-blue-300",children:[(0,d.jsxs)("p",{className:"font-medium",children:["Writes to ",(0,d.jsx)("code",{className:"px-1 bg-black/5 dark:bg-white/10 rounded",children:"chatLanguageModels.json"})]}),(0,d.jsx)("p",{className:"mt-0.5 opacity-80",children:"Reload VS Code after applying for changes to take effect."})]})]}),(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Select Endpoint"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)(h.A,{value:J||J||`${m}/v1`,onChange:K,requiresExternalUrl:a.requiresExternalUrl,tunnelEnabled:r,tunnelPublicUrl:s,tailscaleEnabled:t,tailscaleUrl:u,currentUrl:V})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"API Key"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)(j.A,{value:H,onChange:I,apiKeys:n,cloudEnabled:p})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr] sm:items-start sm:gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right pt-1",children:"Models"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px] mt-1.5",children:"arrow_forward"}),(0,d.jsxs)("div",{className:"flex-1 flex flex-col gap-2",children:[(0,d.jsx)("div",{className:"flex flex-wrap gap-1.5 min-h-[28px] px-2 py-1.5 bg-surface rounded border border-border",children:0===P.length?(0,d.jsx)("span",{className:"text-xs text-text-muted",children:"No models selected"}):P.map(a=>(0,d.jsxs)("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs bg-black/5 dark:bg-white/5 text-text-muted border border-transparent hover:border-border",children:[a,(0,d.jsx)("button",{onClick:b=>{b.stopPropagation(),Q(b=>b.filter(b=>b!==a))},className:"ml-0.5 hover:text-red-500",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"close"})})]},a))}),(0,d.jsx)("div",{children:(0,d.jsx)("button",{onClick:()=>S(!0),disabled:!o?.length,className:`px-2 py-1 rounded border text-xs transition-colors ${o?.length?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Add Model"})})]})]})]}),F&&(0,d.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===F.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===F.type?"check_circle":"error"}),(0,d.jsx)("span",{children:F.text})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,d.jsxs)(f.$n,{variant:"primary",size:"sm",onClick:Z,disabled:0===P.length,loading:B,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:$,disabled:!x?.has9Router,loading:D,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,d.jsxs)(f.$n,{variant:"ghost",size:"sm",onClick:()=>O(!0),disabled:0===P.length,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]})]})]})]}),R&&(0,d.jsx)(f.rq,{isOpen:R,onClose:()=>{S(!1),U(T.current)},onSelect:a=>{P.includes(a.value)||Q([...P,a.value])},onDeselect:a=>{Q(P.filter(b=>b!==a.value))},selectedModel:null,activeProviders:o,modelAliases:L,addedModelValues:P,closeOnSelect:!1,title:"Add Model for GitHub Copilot"}),(0,d.jsx)(f.uR,{isOpen:N,onClose:()=>O(!1),title:"GitHub Copilot - Manual Configuration",configs:(v=H&&H.trim()?H:p?"<API_KEY_FROM_DASHBOARD>":"sk_ezrouter",w=X(),[{filename:"~/Library/Application Support/Code/User/chatLanguageModels.json",content:JSON.stringify([{name:"9Router",vendor:"azure",apiKey:v,models:(P.length>0?P:["provider/model-id"]).map(a=>({id:a,name:a,url:`${w}/chat/completions#models.ai.azure.com`,toolCalling:!0,vision:!1,maxInputTokens:128e3,maxOutputTokens:16e3}))}],null,2)}])})]})}},24429:(a,b,c)=>{c.d(b,{A:()=>m});var d=c(48249),e=c(67484),f=c(50412),g=c(81220),h=c(52632),i=c(73725),j=c(31407),k=c(94589),l=c(78052);function m({tool:a,isExpanded:b,onToggle:c,baseUrl:n,apiKeys:o,activeProviders:p,cloudEnabled:q,initialStatus:r,tunnelEnabled:s,tunnelPublicUrl:t,tailscaleEnabled:u,tailscaleUrl:v}){let w,x,y,z,A,[B,C]=(0,e.useState)(r||null),[D,E]=(0,e.useState)(!1),[F,G]=(0,e.useState)(!1),[H,I]=(0,e.useState)(!1),[J,K]=(0,e.useState)(null),[L,M]=(0,e.useState)(!1),[N,O]=(0,e.useState)(""),[P,Q]=(0,e.useState)(""),[R,S]=(0,e.useState)(""),[T,U]=(0,e.useState)(!1),[V,W]=(0,e.useState)(!1),[X,Y]=(0,e.useState)({}),[Z,$]=(0,e.useState)(!1),[_,aa]=(0,e.useState)(""),[ab,ac]=(0,e.useState)([]),[ad,ae]=(0,e.useState)(""),af=(0,e.useRef)([]),ag=async a=>{try{let b=N&&N.trim()||q?N:"sk_ezrouter",c=a.includes(ad)?ad:a[0]||"";await fetch("/api/cli-tools/opencode-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:aj(),apiKey:b,models:a,activeModel:c,subagentModel:R})})}catch(a){console.log("Error saving models:",a)}},ah=B?.config?.provider?.["9router"]?.options?.baseURL||"",ai=(()=>{if(!B?.installed)return null;if(!B.config||!B.has9Router)return"not_configured";let a=B.config?.provider?.["9router"]?.options?.baseURL||"";return(0,l.Q)(a,{tunnelPublicUrl:t,tailscaleUrl:v})?"configured":"other"})(),aj=()=>{let a=_||n;return a.endsWith("/v1")?a:`${a}/v1`},ak=async()=>{E(!0);try{let a=await fetch("/api/cli-tools/opencode-settings"),b=await a.json();C(b)}catch(a){C({installed:!1,error:a.message})}finally{E(!1)}},al=async()=>{G(!0),K(null);try{let a=N&&N.trim()||q?N:"sk_ezrouter",b=await fetch("/api/cli-tools/opencode-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:aj(),apiKey:a,models:ab,activeModel:""===ad?"":ad||ab[0],subagentModel:R})}),c=await b.json();b.ok?((0,i.Xg)(aj(),{tunnelPublicUrl:t,tailscaleUrl:v}),K({type:"success",text:"Settings applied successfully!"}),ak()):K({type:"error",text:c.error||"Failed to apply settings"})}catch(a){K({type:"error",text:a.message})}finally{G(!1)}},am=async()=>{I(!0),K(null);try{let a=await fetch("/api/cli-tools/opencode-settings",{method:"DELETE"}),b=await a.json();a.ok?(K({type:"success",text:"Settings reset successfully!"}),Q(""),S(""),ac([]),ae(""),ak()):K({type:"error",text:b.error||"Failed to reset settings"})}catch(a){K({type:"error",text:a.message})}finally{I(!1)}};return(0,d.jsxs)(f.Zp,{padding:"xs",className:"overflow-hidden",children:[(0,d.jsxs)("div",{className:"flex items-start justify-between gap-3 hover:cursor-pointer sm:items-center",onClick:c,children:[(0,d.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,d.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,d.jsx)(g.default,{src:"/providers/opencode.png",alt:a.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:a=>{a.target.style.display="none"},loading:"lazy",decoding:"async"})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[(0,d.jsx)("h3",{className:"font-medium text-sm",children:a.name}),"configured"===ai&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-green-500/10 text-green-600 dark:text-green-400 rounded-full",children:"Connected"}),"not_configured"===ai&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-yellow-500/10 text-yellow-600 dark:text-yellow-400 rounded-full",children:"Not configured"}),"other"===ai&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-blue-500/10 text-blue-600 dark:text-blue-400 rounded-full",children:"Other"})]}),(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:a.description})]})]}),(0,d.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${b?"rotate-180":""}`,children:"expand_more"})]}),b&&(0,d.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[D&&(0,d.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,d.jsx)("span",{children:"Checking OpenCode CLI..."})]}),!D&&B&&!B.installed&&(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{className:"flex flex-col gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,d.jsxs)("div",{className:"flex items-start gap-3",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,d.jsxs)("div",{className:"flex-1",children:[(0,d.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:"OpenCode CLI not detected locally"}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"Manual configuration is still available if 9router is deployed on a remote server."})]})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2 pl-9",children:[(0,d.jsx)(k.A,{tool:"opencode",baseUrl:aj(),apiKey:N,model:ad||ab[0]||"",className:"!bg-yellow-500/20 !border-yellow-500/40 !text-yellow-700 dark:!text-yellow-300 hover:!bg-yellow-500/30"}),(0,d.jsxs)(f.$n,{variant:"secondary",size:"sm",onClick:()=>$(!0),className:"!bg-yellow-500/20 !border-yellow-500/40 !text-yellow-700 dark:!text-yellow-300 hover:!bg-yellow-500/30",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:"content_copy"}),"Manual Config"]}),(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:()=>M(!L),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:L?"expand_less":"help"}),L?"Hide":"How to Install"]})]})]}),L&&(0,d.jsxs)("div",{className:"p-4 bg-surface border border-border rounded-lg",children:[(0,d.jsx)("h4",{className:"font-medium mb-3",children:"Installation Guide"}),(0,d.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"text-text-muted mb-1",children:"macOS / Linux:"}),(0,d.jsx)("code",{className:"block px-3 py-2 bg-black/5 dark:bg-white/5 rounded font-mono text-xs",children:"npm install -g opencode-ai"})]}),(0,d.jsxs)("p",{className:"text-text-muted",children:["After installation, run ",(0,d.jsx)("code",{className:"px-1 bg-black/5 dark:bg-white/5 rounded",children:"opencode"})," to verify."]})]})]})]}),!D&&B?.installed&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Select Endpoint"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)(h.A,{value:_||_||`${n}/v1`,onChange:aa,requiresExternalUrl:a.requiresExternalUrl,tunnelEnabled:s,tunnelPublicUrl:t,tailscaleEnabled:u,tailscaleUrl:v,currentUrl:ah})]}),B?.config?.provider?.["9router"]?.options?.baseURL&&(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Current"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)("span",{className:"min-w-0 truncate rounded bg-surface/40 px-2 py-2 text-xs text-text-muted sm:py-1.5",children:B.config.provider["9router"].options.baseURL})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"API Key"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)(j.A,{value:N,onChange:O,apiKeys:o,cloudEnabled:q})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr] sm:items-start sm:gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right pt-1",children:"Models"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px] mt-1.5",children:"arrow_forward"}),(0,d.jsxs)("div",{className:"flex-1 flex flex-col gap-2",children:[(0,d.jsx)("div",{className:"flex flex-wrap gap-1.5 min-h-[28px] px-2 py-1.5 bg-surface rounded border border-border",children:0===ab.length?(0,d.jsx)("span",{className:"text-xs text-text-muted",children:"No models selected"}):ab.map(a=>(0,d.jsxs)("span",{onClick:async()=>{if(a===ad)try{(await fetch("/api/cli-tools/opencode-settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({clearActiveModel:!0})})).ok&&(ae(""),ak())}catch(a){console.log("Error clearing active model:",a)}else ae(a)},className:`inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs cursor-pointer transition-colors ${a===ad?"bg-primary/10 text-primary border border-primary":"bg-black/5 dark:bg-white/5 text-text-muted border border-transparent hover:border-border"}`,title:a===ad?"Click to clear active model":"Click to set as active",children:[a===ad&&(0,d.jsx)("span",{className:"material-symbols-outlined text-[10px]",children:"star"}),a,(0,d.jsx)("button",{onClick:async b=>{b.stopPropagation();try{if((await fetch(`/api/cli-tools/opencode-settings?model=${encodeURIComponent(a)}`,{method:"DELETE"})).ok){let b=ab.filter(b=>b!==a);ac(b),ad===a&&ae(""),ak()}}catch(a){console.log("Error removing model:",a)}},className:"ml-0.5 hover:text-red-500",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"close"})})]},a))}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsx)("button",{onClick:()=>U(!0),disabled:!p?.length,className:`px-2 py-1 rounded border text-xs transition-colors ${p?.length?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Add Model"}),(0,d.jsx)("span",{className:"text-xs text-text-muted",children:ab.length>0&&ad?(0,d.jsxs)(d.Fragment,{children:["Active: ",(0,d.jsx)("span",{className:"text-primary",children:ad})]}):ab.length>0?(0,d.jsx)("span",{className:"text-yellow-500",children:"Click a model to set/clear active"}):"Select models to add"})]})]})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Subagent Model"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)("input",{type:"text",value:R,onChange:a=>S(a.target.value),placeholder:P||"provider/model-id (defaults to main model)",className:"w-full min-w-0 px-2 py-2 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50 sm:py-1.5"}),(0,d.jsx)("button",{onClick:()=>W(!0),disabled:!p?.length,className:`w-full sm:w-auto rounded border px-2 py-2 text-xs transition-colors sm:py-1.5 whitespace-nowrap sm:shrink-0 ${p?.length?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select Model"}),R&&(0,d.jsx)("button",{onClick:()=>S(""),className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear (will use main model)",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})]}),J&&(0,d.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===J.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===J.type?"check_circle":"error"}),(0,d.jsx)("span",{children:J.text})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,d.jsxs)(f.$n,{variant:"primary",size:"sm",onClick:al,disabled:0===ab.length,loading:F,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:am,disabled:!B.has9Router,loading:H,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,d.jsxs)(f.$n,{variant:"ghost",size:"sm",onClick:()=>$(!0),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]}),(0,d.jsx)(k.A,{tool:"opencode",baseUrl:aj(),apiKey:N,model:ad||ab[0]||"",variant:"ghost"})]})]})]}),T&&(0,d.jsx)(f.rq,{isOpen:T,onClose:()=>{U(!1),ag(af.current)},onSelect:a=>{!ab.includes(a.value)&&(ac([...ab,a.value]),ad||ae(a.value))},onDeselect:a=>{let b=ab.filter(b=>b!==a.value);ac(b),ad===a.value&&ae(b[0]||"")},selectedModel:null,activeProviders:p,modelAliases:X,addedModelValues:ab,closeOnSelect:!1,title:"Add Model for OpenCode"}),V&&(0,d.jsx)(f.rq,{isOpen:V,onClose:()=>W(!1),onSelect:a=>{S(a.value),W(!1)},selectedModel:R,activeProviders:p,modelAliases:X,title:"Select Subagent Model for OpenCode"}),(0,d.jsx)(f.uR,{isOpen:Z,onClose:()=>$(!1),title:"OpenCode - Manual Configuration",configs:(w=N&&N.trim()?N:q?"<API_KEY_FROM_DASHBOARD>":"sk_ezrouter",x=ab.length>0?ab:["provider/model-id"],y=ad||ab[0]||x[0],z=R||y,A={},x.forEach(a=>{A[a]={name:a,modalities:{input:["text","image"],output:["text"]}}}),[{filename:"~/.config/opencode/opencode.json",content:JSON.stringify({provider:{"9router":{npm:"@ai-sdk/openai-compatible",options:{baseURL:aj(),apiKey:w},models:A}},model:`9router/${y}`,agent:{explorer:{description:"Fast explorer subagent for codebase exploration",mode:"subagent",model:`9router/${z}`}}},null,2)}])})]})}},31407:(a,b,c)=>{c.d(b,{A:()=>i});var d=c(48249),e=c(67484),f=c(73725);let g="__custom__",h="__save_key__";function i({value:a,onChange:b,apiKeys:c=[],cloudEnabled:j=!1,className:k=""}){let[l,m]=(0,e.useState)([]),[n,o]=(0,e.useState)(!1),[p,q]=(0,e.useState)(""),r=(0,e.useMemo)(()=>[...c.map(a=>({value:a.key,label:a.key})),...l.map(a=>({value:`saved:${a.name}`,label:a.key,url:a.key,saved:!0})),{value:g,label:"Custom...",url:""}],[c,l]),s=a?r.find(b=>b.value===a||b.url===a):null,t=s?s.value:n||a?g:r[0]?.value??g,u=n?p:a||"",v="string"==typeof t&&t.startsWith("saved:"),w=t===g,x=w&&(a||"").trim().length>0&&!c.some(b=>b.key===a);return 0!==c.length||0!==l.length||n||a?(0,d.jsxs)("div",{className:`flex flex-col gap-1.5 ${k}`,children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsxs)("select",{value:t,onChange:c=>{let d=c.target.value;if(d===h)return void(0,f.i5)((a||"").trim());if(d===g){o(!0),q(""),b("");return}o(!1),q("");let e=r.find(a=>a.value===d);e&&b(e.url??e.value)},className:"flex-1 min-w-0 px-2 py-2 bg-surface rounded text-xs border border-border focus:outline-none focus:ring-1 focus:ring-primary/50 sm:py-1.5",children:[r.map(a=>(0,d.jsx)("option",{value:a.value,children:a.label},a.value)),x&&(0,d.jsx)("option",{value:h,children:"+ Save current as..."})]}),v&&(0,d.jsx)("button",{type:"button",onClick:()=>{if(!v)return;(0,f.uZ)(t.slice(6)),o(!1),q("");let a=r.find(a=>a.value!==g&&a.value!==t);b(a?a.url??a.value:"")},className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors shrink-0",title:"Delete saved key",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"delete"})})]}),w&&(0,d.jsx)("input",{type:"text",value:u,onChange:a=>{let c=a.target.value;o(!0),q(c),b(c)},placeholder:"sk-...",className:"w-full min-w-0 px-2 py-2 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50 sm:py-1.5"})]}):(0,d.jsx)("span",{className:`min-w-0 rounded bg-surface/40 px-2 py-2 text-xs text-text-muted sm:py-1.5 ${k}`,children:j?"No API keys - Create one in Keys page":"sk_ezrouter (default)"})}},34851:(a,b,c)=>{c.d(b,{A:()=>q});var d=c(48249),e=c(67484),f=c(50412),g=c(29476),h=c(81220),i=c(52632),j=c(73725),k=c(31407),l=c(78052);let m="/api/cli-tools/grok-build-settings",n="9router",o=[{id:"general-purpose",label:"General-purpose",help:"Implementation, testing, and full-capability delegated tasks"},{id:"explore",label:"Explore",help:"Read-only codebase research and investigation"},{id:"plan",label:"Plan",help:"Architecture and implementation planning"}];function p({label:a,value:b,placeholder:c,onChange:e,onSelect:f,disabled:g,help:h}){return(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsxs)("div",{className:"sm:text-right",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-sm",children:a}),h&&(0,d.jsx)("p",{className:"mt-0.5 text-[10px] leading-tight text-text-muted",children:h})]}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsxs)("div",{className:"relative w-full min-w-0",children:[(0,d.jsx)("input",{type:"text",value:b,onChange:a=>e(a.target.value),placeholder:c,className:"w-full min-w-0 pl-2 pr-7 py-2 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50 sm:py-1.5"}),b&&(0,d.jsx)("button",{type:"button",onClick:()=>e(""),className:"absolute right-1 top-1/2 -translate-y-1/2 p-0.5 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear (inherit main model for subagents)",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]}),(0,d.jsx)("button",{type:"button",onClick:f,disabled:g,className:`w-full sm:w-auto rounded border px-2 py-2 text-xs transition-colors sm:py-1.5 whitespace-nowrap sm:shrink-0 ${!g?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select"})]})}function q({tool:a,isExpanded:b,onToggle:c,hasActiveProviders:r,apiKeys:s,activeProviders:t,cloudEnabled:u,initialStatus:v,tunnelEnabled:w,tunnelPublicUrl:x,tailscaleEnabled:y,tailscaleUrl:z}){let{getCaps:A}=(0,g.y)(),B=a=>A(a)?.contextWindow||null,C=v?.settings?.model?.model||"",D=Object.fromEntries(o.map(a=>[a.id,v?.settings?.subagentModels?.[a.id]?.model]).filter(([,a])=>!!a)),[E,F]=(0,e.useState)(v||null),[G,H]=(0,e.useState)(!1),[I,J]=(0,e.useState)(!1),[K,L]=(0,e.useState)(!1),[M,N]=(0,e.useState)(null),[O,P]=(0,e.useState)(s?.[0]?.key||""),[Q,R]=(0,e.useState)(C),[S,T]=(0,e.useState)(D),[U,V]=(0,e.useState)(null),[W,X]=(0,e.useState)({}),[Y,Z]=(0,e.useState)(!1),[$,_]=(0,e.useState)(""),aa=(0,e.useRef)(!!v),ab=E?.settings?.model,ac=ab?.base_url||"",ad=E?.installed?ab?.base_url?(0,l.Q)(ab.base_url,{tunnelPublicUrl:x,tailscaleUrl:z})?"configured":"other":"not_configured":null,ae=(0,e.useCallback)(a=>{let b=a?.settings?.model?.model||"",c=Object.fromEntries(o.map(b=>[b.id,a?.settings?.subagentModels?.[b.id]?.model]).filter(([,a])=>!!a));R(b),T(c)},[]);(0,e.useCallback)(async()=>{try{let a=await fetch("/api/models/alias"),b=await a.json();a.ok&&X(b.aliases||{})}catch(a){console.log("Error fetching model aliases:",a)}},[]);let af=(0,e.useCallback)(async({hydrate:a=!1}={})=>{H(!0);try{let b=await fetch(m),c=await b.json();F(c),aa.current=!0,a&&ae(c)}catch(a){F({installed:!1,error:a.message})}finally{H(!1)}},[ae]),ag=()=>{let a=$||"http://127.0.0.1:20126";return a.endsWith("/v1")?a:`${a}/v1`},ah=async()=>{J(!0),N(null);try{let a=O?.trim()||(s?.length>0?s[0].key:null)||(u?null:"sk_ezrouter"),b={};for(let a of o){let c=S[a.id]?.trim();c&&(b[a.id]={model:c,contextWindow:B(c)})}let c=await fetch(m,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:ag(),apiKey:a,model:Q,contextWindow:B(Q),subagentModels:b})}),d=await c.json();c.ok?((0,j.Xg)(ag(),{tunnelPublicUrl:x,tailscaleUrl:z}),N({type:"success",text:"Main and subagent models applied successfully!"}),af()):N({type:"error",text:d.error||"Failed to apply settings"})}catch(a){N({type:"error",text:a.message})}finally{J(!1)}},ai=async()=>{L(!0),N(null);try{let a=await fetch(m,{method:"DELETE"}),b=await a.json();a.ok?(N({type:"success",text:"Settings reset successfully!"}),R(""),T({}),af()):N({type:"error",text:b.error||"Failed to reset settings"})}catch(a){N({type:"error",text:a.message})}finally{L(!1)}};return(0,d.jsxs)(f.Zp,{padding:"xs",className:"overflow-hidden",children:[(0,d.jsxs)("div",{className:"flex items-start justify-between gap-3 hover:cursor-pointer sm:items-center",onClick:c,children:[(0,d.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,d.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,d.jsx)(h.default,{src:a.image||"/providers/grok-cli.png",alt:a.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:a=>{a.target.style.display="none"},loading:"lazy",decoding:"async"})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[(0,d.jsx)("h3",{className:"font-medium text-sm",children:a.name}),"configured"===ad&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-green-500/10 text-green-600 dark:text-green-400 rounded-full",children:"Connected"}),"not_configured"===ad&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-yellow-500/10 text-yellow-600 dark:text-yellow-400 rounded-full",children:"Not configured"}),"other"===ad&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-blue-500/10 text-blue-600 dark:text-blue-400 rounded-full",children:"Other"})]}),(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:a.description})]})]}),(0,d.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${b?"rotate-180":""}`,children:"expand_more"})]}),b&&(0,d.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[G&&(0,d.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,d.jsx)("span",{children:"Checking Grok Build..."})]}),!G&&E&&!E.installed&&(0,d.jsxs)("div",{className:"flex flex-col gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,d.jsxs)("div",{className:"flex items-start gap-3",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,d.jsxs)("div",{className:"flex-1",children:[(0,d.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:"Grok Build not detected locally"}),(0,d.jsx)("code",{className:"block mt-2 p-2 bg-black/20 rounded text-xs font-mono",children:"curl -fsSL https://x.ai/cli/install.sh | bash"})]})]}),(0,d.jsxs)(f.$n,{variant:"secondary",size:"sm",onClick:()=>Z(!0),className:"w-full sm:w-auto",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:"content_copy"}),"Manual Config"]})]}),!G&&E?.installed&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[a.notes?.length>0&&(0,d.jsx)("div",{className:"mb-2 flex flex-col gap-2",children:a.notes.map((a,b)=>(0,d.jsxs)("div",{className:`flex items-start gap-2 rounded p-2 text-xs ${"warning"===a.type?"bg-yellow-500/10 text-yellow-600 dark:text-yellow-400":"bg-blue-500/10 text-blue-600 dark:text-blue-400"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined mt-0.5 text-[14px]",children:"warning"===a.type?"warning":"info"}),(0,d.jsx)("span",{children:a.text})]},b))}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Select Endpoint"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)(i.A,{value:$||ag(),onChange:_,requiresExternalUrl:a.requiresExternalUrl,tunnelEnabled:w,tunnelPublicUrl:x,tailscaleEnabled:y,tailscaleUrl:z,currentUrl:ac})]}),ab?.base_url&&(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Current"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsxs)("span",{className:"min-w-0 truncate rounded bg-surface/40 px-2 py-2 text-xs text-text-muted sm:py-1.5",children:[ab.base_url," \xb7 ",ab.model,ab.context_window?` \xb7 ${(ab.context_window/1e3).toLocaleString()}K ctx`:""]})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"API Key"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)(k.A,{value:O,onChange:P,apiKeys:s,cloudEnabled:u})]}),(0,d.jsx)(p,{label:"Main Model",value:Q,onChange:R,placeholder:"provider/model-id",onSelect:()=>V("main"),disabled:!r}),(0,d.jsx)("div",{className:"my-1 border-t border-border pt-3",children:(0,d.jsxs)("div",{className:"mb-2 flex items-start gap-2",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-primary text-[16px]",children:"account_tree"}),(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"text-xs font-semibold text-text-main",children:"Subagent model overrides"}),(0,d.jsx)("p",{className:"text-[10px] text-text-muted",children:"Leave blank to inherit Main Model. Each override keeps its own context window."})]})]})}),o.map(a=>(0,d.jsx)(p,{label:a.label,help:a.help,value:S[a.id]||"",onChange:b=>T(c=>({...c,[a.id]:b})),placeholder:`${Q||"Main Model"} (inherit)`,onSelect:()=>V(a.id),disabled:!r},a.id))]}),M&&(0,d.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===M.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===M.type?"check_circle":"error"}),(0,d.jsx)("span",{children:M.text})]}),(0,d.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center gap-2",children:[(0,d.jsxs)(f.$n,{variant:"primary",size:"sm",onClick:ah,disabled:!Q,loading:I,className:"w-full sm:w-auto",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:ai,disabled:!E?.has9Router,loading:K,className:"w-full sm:w-auto",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,d.jsxs)(f.$n,{variant:"ghost",size:"sm",onClick:()=>Z(!0),className:"w-full sm:w-auto",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]})]})]})]}),U&&(0,d.jsx)(f.rq,{isOpen:!!U,onClose:()=>V(null),onSelect:a=>{"main"===U?R(a.value):U&&T(b=>({...b,[U]:a.value})),V(null)},selectedModel:"main"===U?Q:S[U]||"",activeProviders:t,modelAliases:W,title:"main"===U?"Select Main Model for Grok Build":`Select ${o.find(a=>a.id===U)?.label||"Subagent"} Model`}),(0,d.jsx)(f.uR,{isOpen:Y,onClose:()=>Z(!1),title:"Grok Build - Manual Configuration",configs:(()=>{let a=O?.trim()||(u?"<API_KEY_FROM_DASHBOARD>":"sk_ezrouter"),b=ag(),c=Q||"provider/model-id",d=[`[models]
|
|
1
|
+
"use strict";exports.id=7524,exports.ids=[7524],exports.modules={7765:(a,b,c)=>{c.d(b,{A:()=>o});var d=c(48249),e=c(67484),f=c(50412),g=c(81220),h=c(52632),i=c(73725),j=c(31407),k=c(94589),l=c(78052);let m=/\[1m\]$/i,n=[{label:"Default",value:""},{label:"200K",value:"198000"},{label:"300K",value:"298000"},{label:"500K",value:"498000"},{label:"700K",value:"698000"}];function o({tool:a,isExpanded:b,onToggle:c,activeProviders:p,modelMappings:q,onModelMappingChange:r,baseUrl:s,hasActiveProviders:t,apiKeys:u,cloudEnabled:v,initialStatus:w,tunnelEnabled:x,tunnelPublicUrl:y,tailscaleEnabled:z,tailscaleUrl:A}){let B,C,D,[E,F]=(0,e.useState)(w||null),[G,H]=(0,e.useState)(!1),[I,J]=(0,e.useState)(!1),[K,L]=(0,e.useState)(!1),[M,N]=(0,e.useState)(null),[O,P]=(0,e.useState)(!1),[Q,R]=(0,e.useState)(!1),[S,T]=(0,e.useState)(null),[U,V]=(0,e.useState)(""),[W,X]=(0,e.useState)({}),[Y,Z]=(0,e.useState)(!1),[$,_]=(0,e.useState)(""),[aa,ab]=(0,e.useState)(!1),[ac,ad]=(0,e.useState)(!1),[ae,af]=(0,e.useState)(""),[ag,ah]=(0,e.useState)(!1);(0,e.useRef)(!1);let ai=E?.settings?.env?.ANTHROPIC_BASE_URL||"",aj=(()=>{if(!E?.installed)return null;let a=E.settings?.env?.ANTHROPIC_BASE_URL;return a?(0,l.Q)(a,{tunnelPublicUrl:y,tailscaleUrl:A,cloudUrl:v?"https://ezrouter.golamrabbi.dev":null})?"configured":"other":"not_configured"})(),ak=async a=>{let b=a.target.checked;ab(b),await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({ccFilterNaming:b})}).catch(()=>{})},al=()=>{let a=$||s;return a.endsWith("/v1")?a:`${a}/v1`},am=async()=>{J(!0),N(null);try{let b={ANTHROPIC_BASE_URL:al()},c=U?.trim()||(u?.length>0?u[0].key:null)||(v?null:"sk_ezrouter");c&&(b.ANTHROPIC_AUTH_TOKEN=c),a.defaultModels.forEach(a=>{let c=q[a.alias];c&&a.envKey&&(b[a.envKey]=c)}),ae&&(b.CLAUDE_CODE_AUTO_COMPACT_WINDOW=ae);let d=await fetch("/api/cli-tools/claude-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({env:b,exaMcpEnabled:ac,autoCompactWindow:ae})}),e=await d.json();d.ok?((0,i.Xg)(al(),{tunnelPublicUrl:y,tailscaleUrl:A}),N({type:"success",text:"Settings applied successfully!"}),F(a=>({...a,hasBackup:!0,settings:{...a?.settings,env:b},exaMcpEnabled:ac}))):N({type:"error",text:e.error||"Failed to apply settings"})}catch(a){N({type:"error",text:a.message})}finally{J(!1)}},an=async()=>{L(!0),N(null);try{let b=await fetch("/api/cli-tools/claude-settings",{method:"DELETE"}),c=await b.json();b.ok?(N({type:"success",text:"Settings reset successfully!"}),a.defaultModels.forEach(a=>r(a.alias,a.defaultValue||"")),V(""),ad(!1),af(""),ah(!1)):N({type:"error",text:c.error||"Failed to reset settings"})}catch(a){N({type:"error",text:a.message})}finally{L(!1)}};return(0,d.jsxs)(f.Zp,{padding:"xs",className:"overflow-hidden",children:[(0,d.jsxs)("div",{className:"flex items-start justify-between gap-3 hover:cursor-pointer sm:items-center",onClick:c,children:[(0,d.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,d.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,d.jsx)(g.default,{src:"/providers/claude.png",alt:a.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:a=>{a.target.style.display="none"},loading:"lazy",decoding:"async"})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[(0,d.jsx)("h3",{className:"font-medium text-sm",children:a.name}),"configured"===aj&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-green-500/10 text-green-600 dark:text-green-400 rounded-full",children:"Connected"}),"not_configured"===aj&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-yellow-500/10 text-yellow-600 dark:text-yellow-400 rounded-full",children:"Not configured"}),"other"===aj&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-blue-500/10 text-blue-600 dark:text-blue-400 rounded-full",children:"Other"})]}),(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:a.description})]})]}),(0,d.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${b?"rotate-180":""}`,children:"expand_more"})]}),b&&(0,d.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[G&&(0,d.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,d.jsx)("span",{children:"Checking Claude CLI..."})]}),!G&&E&&!E.installed&&(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{className:"flex flex-col gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,d.jsxs)("div",{className:"flex items-start gap-3",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,d.jsxs)("div",{className:"flex-1",children:[(0,d.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:"Claude CLI not detected locally"}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"Manual configuration is still available if 9router is deployed on a remote server."})]})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2 pl-9",children:[(0,d.jsx)(k.A,{tool:"claude",baseUrl:al(),apiKey:U,model:q.sonnet||"",className:"!bg-yellow-500/20 !border-yellow-500/40 !text-yellow-700 dark:!text-yellow-300 hover:!bg-yellow-500/30"}),(0,d.jsxs)(f.$n,{variant:"secondary",size:"sm",onClick:()=>Z(!0),className:"!bg-yellow-500/20 !border-yellow-500/40 !text-yellow-700 dark:!text-yellow-300 hover:!bg-yellow-500/30",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:"content_copy"}),"Manual Config"]}),(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:()=>P(!O),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:O?"expand_less":"help"}),O?"Hide":"How to Install"]})]})]}),O&&(0,d.jsxs)("div",{className:"p-4 bg-surface border border-border rounded-lg",children:[(0,d.jsx)("h4",{className:"font-medium mb-3",children:"Installation Guide"}),(0,d.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"text-text-muted mb-1",children:"macOS / Linux / Windows:"}),(0,d.jsx)("code",{className:"block px-3 py-2 bg-black/5 dark:bg-white/5 rounded font-mono text-xs",children:"npm install -g @anthropic-ai/claude-code"})]}),(0,d.jsxs)("p",{className:"text-text-muted",children:["After installation, run ",(0,d.jsx)("code",{className:"px-1 bg-black/5 dark:bg-white/5 rounded",children:"claude"})," to verify."]})]})]})]}),!G&&E?.installed&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Select Endpoint"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)(h.A,{value:$||((B=$||s).endsWith("/v1")?B:`${B}/v1`),onChange:_,requiresExternalUrl:a.requiresExternalUrl,tunnelEnabled:x,tunnelPublicUrl:y,tailscaleEnabled:z,tailscaleUrl:A,currentUrl:ai})]}),E?.settings?.env?.ANTHROPIC_BASE_URL&&(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Current"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)("span",{className:"min-w-0 truncate rounded bg-surface/40 px-2 py-2 text-xs text-text-muted sm:py-1.5",children:E.settings.env.ANTHROPIC_BASE_URL})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"API Key"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)(j.A,{value:U,onChange:V,apiKeys:u,cloudEnabled:v})]}),a.defaultModels.map(a=>(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:a.name}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsxs)("div",{className:"relative w-full min-w-0",children:[(0,d.jsx)("input",{type:"text",value:q[a.alias]||"",onChange:b=>r(a.alias,b.target.value),placeholder:"provider/model-id",className:"w-full min-w-0 pl-2 pr-7 py-2 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50 sm:py-1.5"}),q[a.alias]&&(0,d.jsx)("button",{onClick:()=>r(a.alias,""),className:"absolute right-1 top-1/2 -translate-y-1/2 p-0.5 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]}),(0,d.jsx)("button",{onClick:()=>{T(a.alias),R(!0)},disabled:!t,className:`w-full sm:w-auto rounded border px-2 py-2 text-xs transition-colors sm:py-1.5 whitespace-nowrap sm:shrink-0 ${t?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select Model"})]},a.alias)),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Auto-compact"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)("select",{value:ae,onChange:a=>af(a.target.value),className:"w-full min-w-0 px-2 py-2 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50 sm:py-1.5",children:n.map(a=>(0,d.jsx)("option",{value:a.value,children:a.label},a.label))})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"1M context"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsxs)("label",{className:"flex items-center gap-1.5 cursor-pointer select-none",children:[(0,d.jsx)("input",{type:"checkbox",checked:ag,onChange:b=>{var c;ah(c=b.target.checked),a.defaultModels.forEach(a=>{let b=q[a.alias];b&&r(a.alias,((a,b)=>{let{model:c}=function(a){if("string"!=typeof a)return{model:a,contextMarker:null};let b=a.trim(),c=b.match(m);return c?{model:b.slice(0,-c[0].length),contextMarker:c[0].slice(1,-1).toLowerCase()}:{model:a,contextMarker:null}}(a);return b?`${c}[1m]`:c})(b,c))})},className:"w-3.5 h-3.5 accent-primary cursor-pointer"}),(0,d.jsx)("span",{className:"text-xs text-text-muted",children:"Append [1m] to the model name"}),(0,d.jsx)(f.m_,{text:"Claude Code otherwise assumes a 200K window, which clamps the auto-compact window above. Applied to every mapped model — only enable it for models that really accept 1M.",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px] cursor-help",children:"info"})})]})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Filter naming"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsxs)("label",{className:"flex items-center gap-1.5 cursor-pointer select-none",children:[(0,d.jsx)("input",{type:"checkbox",checked:aa,onChange:ak,className:"w-3.5 h-3.5 accent-primary cursor-pointer"}),(0,d.jsx)("span",{className:"text-xs text-text-muted",children:"Filter naming requests"}),(0,d.jsx)(f.m_,{text:"Intercepts Claude Code's topic-naming requests and returns a fake response locally, saving API tokens.",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px] cursor-help",children:"info"})})]})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Web Search"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsxs)("label",{className:"flex items-center gap-1.5 cursor-pointer select-none",children:[(0,d.jsx)("input",{type:"checkbox",checked:ac,onChange:a=>ad(a.target.checked),className:"w-3.5 h-3.5 accent-primary cursor-pointer"}),(0,d.jsx)("span",{className:"text-xs text-text-muted",children:"Exa MCP"}),(0,d.jsx)(f.m_,{text:"Injects Exa MCP into ~/.claude.json so non-Claude models gain web search. Restart Claude Code after Apply.",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px] cursor-help",children:"info"})})]})]})]}),M&&(0,d.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===M.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===M.type?"check_circle":"error"}),(0,d.jsx)("span",{children:M.text})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,d.jsxs)(f.$n,{variant:"primary",size:"sm",onClick:am,disabled:!t,loading:I,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:an,disabled:!E?.has9Router,loading:K,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,d.jsxs)(f.$n,{variant:"ghost",size:"sm",onClick:()=>Z(!0),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]}),(0,d.jsx)(k.A,{tool:"claude",baseUrl:al(),apiKey:U,model:q.sonnet||"",variant:"ghost"})]})]})]}),Q&&(0,d.jsx)(f.rq,{isOpen:Q,onClose:()=>R(!1),onSelect:a=>{S&&r(S,a.value)},selectedModel:S?q[S]:null,activeProviders:p,modelAliases:W,title:`Select model for ${S}`}),(0,d.jsx)(f.uR,{isOpen:Y,onClose:()=>Z(!1),title:"Claude CLI - Manual Configuration",configs:(C=U&&U.trim()?U:v?"<API_KEY_FROM_DASHBOARD>":"sk_ezrouter",D={ANTHROPIC_BASE_URL:al(),ANTHROPIC_AUTH_TOKEN:C},a.defaultModels.forEach(a=>{let b=q[a.alias];b&&a.envKey&&(D[a.envKey]=b)}),ae&&(D.CLAUDE_CODE_AUTO_COMPACT_WINDOW=ae),[{filename:"~/.claude/settings.json",content:JSON.stringify({hasCompletedOnboarding:!0,env:D},null,2)}])})]})}},9861:(a,b,c)=>{c.d(b,{A:()=>k});var d=c(48249),e=c(67484),f=c(50412),g=c(81220),h=c(52632),i=c(73725),j=c(31407);function k({tool:a,isExpanded:b,onToggle:c,baseUrl:l,apiKeys:m,activeProviders:n,cloudEnabled:o,initialStatus:p,tunnelEnabled:q,tunnelPublicUrl:r,tailscaleEnabled:s,tailscaleUrl:t}){let[u,v]=(0,e.useState)(p||null),[w,x]=(0,e.useState)(!1),[y,z]=(0,e.useState)(!1),[A,B]=(0,e.useState)(!1),[C,D]=(0,e.useState)(null),[E,F]=(0,e.useState)(!1),[G,H]=(0,e.useState)(""),[I,J]=(0,e.useState)(""),[K,L]=(0,e.useState)(!1),[M,N]=(0,e.useState)({}),[O,P]=(0,e.useState)(!1),[Q,R]=(0,e.useState)(""),S=u?.installed?u.has9Router?"configured":"not_configured":null,T=()=>{let a=Q||`${l}/v1`;return a.endsWith("/v1")?a:`${a}/v1`},U=async()=>{x(!0);try{let a=await fetch("/api/cli-tools/kilo-settings"),b=await a.json();v(b)}catch(a){v({installed:!1,error:a.message})}finally{x(!1)}},V=async()=>{z(!0),D(null);try{let a=G&&G.trim()||o?G:"sk_ezrouter",b=await fetch("/api/cli-tools/kilo-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:T(),apiKey:a,model:I})}),c=await b.json();b.ok?((0,i.Xg)(T(),{tunnelPublicUrl:r,tailscaleUrl:t}),D({type:"success",text:"Settings applied successfully!"}),U()):D({type:"error",text:c.error||"Failed to apply settings"})}catch(a){D({type:"error",text:a.message})}finally{z(!1)}},W=async()=>{B(!0),D(null);try{let a=await fetch("/api/cli-tools/kilo-settings",{method:"DELETE"}),b=await a.json();a.ok?(D({type:"success",text:"Settings reset successfully!"}),J(""),U()):D({type:"error",text:b.error||"Failed to reset settings"})}catch(a){D({type:"error",text:a.message})}finally{B(!1)}};return(0,d.jsxs)(f.Zp,{padding:"xs",className:"overflow-hidden",children:[(0,d.jsxs)("div",{className:"flex items-start justify-between gap-3 hover:cursor-pointer sm:items-center",onClick:c,children:[(0,d.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,d.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,d.jsx)(g.default,{src:"/providers/kilocode.png",alt:a.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:a=>{a.target.style.display="none"},loading:"lazy",decoding:"async"})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[(0,d.jsx)("h3",{className:"font-medium text-sm",children:a.name}),"configured"===S&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-green-500/10 text-green-600 dark:text-green-400 rounded-full",children:"Connected"}),"not_configured"===S&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-yellow-500/10 text-yellow-600 dark:text-yellow-400 rounded-full",children:"Not configured"})]}),(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:a.description})]})]}),(0,d.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${b?"rotate-180":""}`,children:"expand_more"})]}),b&&(0,d.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[w&&(0,d.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,d.jsx)("span",{children:"Checking Kilo Code..."})]}),!w&&u&&!u.installed&&(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{className:"flex flex-col gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,d.jsxs)("div",{className:"flex items-start gap-3",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,d.jsxs)("div",{className:"flex-1",children:[(0,d.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:"Kilo Code not detected locally"}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"Manual configuration is still available if 9router is deployed on a remote server."})]})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2 pl-9",children:[(0,d.jsxs)(f.$n,{variant:"secondary",size:"sm",onClick:()=>P(!0),className:"!bg-yellow-500/20 !border-yellow-500/40 !text-yellow-700 dark:!text-yellow-300 hover:!bg-yellow-500/30",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:"content_copy"}),"Manual Config"]}),(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:()=>F(!E),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:E?"expand_less":"help"}),E?"Hide":"How to Install"]})]})]}),E&&(0,d.jsxs)("div",{className:"p-4 bg-surface border border-border rounded-lg",children:[(0,d.jsx)("h4",{className:"font-medium mb-3",children:"Installation Guide"}),(0,d.jsxs)("p",{className:"text-sm text-text-muted",children:["Install Kilo Code from ",(0,d.jsx)("a",{className:"text-primary underline",href:"https://kilocode.ai",target:"_blank",rel:"noreferrer",children:"kilocode.ai"})," or VS Code extension marketplace."]})]})]}),!w&&u?.installed&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Select Endpoint"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)(h.A,{value:Q||Q||`${l}/v1`,onChange:R,requiresExternalUrl:a.requiresExternalUrl,tunnelEnabled:q,tunnelPublicUrl:r,tailscaleEnabled:s,tailscaleUrl:t})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"API Key"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)(j.A,{value:G,onChange:H,apiKeys:m,cloudEnabled:o})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Model"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsxs)("div",{className:"relative w-full min-w-0",children:[(0,d.jsx)("input",{type:"text",value:I,onChange:a=>J(a.target.value),placeholder:"provider/model-id",className:"w-full min-w-0 pl-2 pr-7 py-2 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50 sm:py-1.5"}),I&&(0,d.jsx)("button",{onClick:()=>J(""),className:"absolute right-1 top-1/2 -translate-y-1/2 p-0.5 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]}),(0,d.jsx)("button",{onClick:()=>L(!0),disabled:!n?.length,className:`w-full sm:w-auto rounded border px-2 py-2 text-xs transition-colors sm:py-1.5 whitespace-nowrap sm:shrink-0 ${n?.length?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select Model"})]})]}),C&&(0,d.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===C.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===C.type?"check_circle":"error"}),(0,d.jsx)("span",{children:C.text})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,d.jsxs)(f.$n,{variant:"primary",size:"sm",onClick:V,disabled:!G&&o&&m.length>0||!I,loading:y,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:W,disabled:A,loading:A,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,d.jsxs)(f.$n,{variant:"ghost",size:"sm",onClick:()=>P(!0),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]})]})]})]}),K&&(0,d.jsx)(f.rq,{isOpen:K,onClose:()=>L(!1),onSelect:a=>{J(a.value),L(!1)},selectedModel:I,activeProviders:n,modelAliases:M,title:"Select Model for Kilo Code"}),(0,d.jsx)(f.uR,{isOpen:O,onClose:()=>P(!1),title:"Kilo Code - Manual Configuration",configs:[{filename:"~/.local/share/kilo/auth.json",content:JSON.stringify({"openai-compatible":{type:"api-key",apiKey:G&&G.trim()?G:o?"<API_KEY_FROM_DASHBOARD>":"sk_ezrouter",baseUrl:T(),model:I||"provider/model-id"}},null,2)}]})]})}},17126:(a,b,c)=>{c.d(b,{A:()=>l});var d=c(48249),e=c(67484),f=c(50412),g=c(81220),h=c(52632),i=c(73725),j=c(31407),k=c(78052);function l({tool:a,isExpanded:b,onToggle:c,baseUrl:m,apiKeys:n,activeProviders:o,cloudEnabled:p,initialStatus:q,tunnelEnabled:r,tunnelPublicUrl:s,tailscaleEnabled:t,tailscaleUrl:u}){let v,w,[x,y]=(0,e.useState)(q||null),[z,A]=(0,e.useState)(!1),[B,C]=(0,e.useState)(!1),[D,E]=(0,e.useState)(!1),[F,G]=(0,e.useState)(null),[H,I]=(0,e.useState)(""),[J,K]=(0,e.useState)(""),[L,M]=(0,e.useState)({}),[N,O]=(0,e.useState)(!1),[P,Q]=(0,e.useState)([]),[R,S]=(0,e.useState)(!1),T=(0,e.useRef)([]),U=async a=>{try{let b=H&&H.trim()||p?H:"sk_ezrouter";await fetch("/api/cli-tools/copilot-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:X(),apiKey:b,models:a})})}catch(a){console.log("Error saving models:",a)}},V=x?.currentUrl||"",W=(()=>{if(!x)return null;if(!x.has9Router)return"not_configured";let a=x.currentUrl||"";return(0,k.Q)(a,{tunnelPublicUrl:s,tailscaleUrl:u})?"configured":"other"})(),X=()=>{let a=J||m;return a.endsWith("/v1")?a:`${a}/v1`},Y=async()=>{A(!0);try{let a=await fetch("/api/cli-tools/copilot-settings"),b=await a.json();y(b)}catch(a){y({error:a.message})}finally{A(!1)}},Z=async()=>{C(!0),G(null);try{let a=H&&H.trim()||p?H:"sk_ezrouter",b=await fetch("/api/cli-tools/copilot-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:X(),apiKey:a,models:P})}),c=await b.json();b.ok?((0,i.Xg)(X(),{tunnelPublicUrl:s,tailscaleUrl:u}),G({type:"success",text:c.message||"Settings applied! Reload VS Code."}),Y()):G({type:"error",text:c.error||"Failed to apply settings"})}catch(a){G({type:"error",text:a.message})}finally{C(!1)}},$=async()=>{E(!0),G(null);try{let a=await fetch("/api/cli-tools/copilot-settings",{method:"DELETE"}),b=await a.json();a.ok?(G({type:"success",text:"Settings reset successfully!"}),Q([]),Y()):G({type:"error",text:b.error||"Failed to reset settings"})}catch(a){G({type:"error",text:a.message})}finally{E(!1)}};return(0,d.jsxs)(f.Zp,{padding:"xs",className:"overflow-hidden",children:[(0,d.jsxs)("div",{className:"flex items-start justify-between gap-3 hover:cursor-pointer sm:items-center",onClick:c,children:[(0,d.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,d.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,d.jsx)(g.default,{src:"/providers/copilot.png",alt:a.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:a=>{a.target.style.display="none"},loading:"lazy",decoding:"async"})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[(0,d.jsx)("h3",{className:"font-medium text-sm",children:a.name}),"configured"===W&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-green-500/10 text-green-600 dark:text-green-400 rounded-full",children:"Connected"}),"not_configured"===W&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-yellow-500/10 text-yellow-600 dark:text-yellow-400 rounded-full",children:"Not configured"}),"other"===W&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-blue-500/10 text-blue-600 dark:text-blue-400 rounded-full",children:"Other"})]}),(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:a.description})]})]}),(0,d.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${b?"rotate-180":""}`,children:"expand_more"})]}),b&&(0,d.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[z&&(0,d.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,d.jsx)("span",{children:"Checking Copilot config..."})]}),!z&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex items-start gap-3 p-3 bg-blue-500/10 border border-blue-500/30 rounded-lg",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-blue-500 text-lg",children:"info"}),(0,d.jsxs)("div",{className:"text-xs text-blue-700 dark:text-blue-300",children:[(0,d.jsxs)("p",{className:"font-medium",children:["Writes to ",(0,d.jsx)("code",{className:"px-1 bg-black/5 dark:bg-white/10 rounded",children:"chatLanguageModels.json"})]}),(0,d.jsx)("p",{className:"mt-0.5 opacity-80",children:"Reload VS Code after applying for changes to take effect."})]})]}),(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Select Endpoint"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)(h.A,{value:J||J||`${m}/v1`,onChange:K,requiresExternalUrl:a.requiresExternalUrl,tunnelEnabled:r,tunnelPublicUrl:s,tailscaleEnabled:t,tailscaleUrl:u,currentUrl:V})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"API Key"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)(j.A,{value:H,onChange:I,apiKeys:n,cloudEnabled:p})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr] sm:items-start sm:gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right pt-1",children:"Models"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px] mt-1.5",children:"arrow_forward"}),(0,d.jsxs)("div",{className:"flex-1 flex flex-col gap-2",children:[(0,d.jsx)("div",{className:"flex flex-wrap gap-1.5 min-h-[28px] px-2 py-1.5 bg-surface rounded border border-border",children:0===P.length?(0,d.jsx)("span",{className:"text-xs text-text-muted",children:"No models selected"}):P.map(a=>(0,d.jsxs)("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs bg-black/5 dark:bg-white/5 text-text-muted border border-transparent hover:border-border",children:[a,(0,d.jsx)("button",{onClick:b=>{b.stopPropagation(),Q(b=>b.filter(b=>b!==a))},className:"ml-0.5 hover:text-red-500",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"close"})})]},a))}),(0,d.jsx)("div",{children:(0,d.jsx)("button",{onClick:()=>S(!0),disabled:!o?.length,className:`px-2 py-1 rounded border text-xs transition-colors ${o?.length?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Add Model"})})]})]})]}),F&&(0,d.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===F.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===F.type?"check_circle":"error"}),(0,d.jsx)("span",{children:F.text})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,d.jsxs)(f.$n,{variant:"primary",size:"sm",onClick:Z,disabled:0===P.length,loading:B,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:$,disabled:!x?.has9Router,loading:D,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,d.jsxs)(f.$n,{variant:"ghost",size:"sm",onClick:()=>O(!0),disabled:0===P.length,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]})]})]})]}),R&&(0,d.jsx)(f.rq,{isOpen:R,onClose:()=>{S(!1),U(T.current)},onSelect:a=>{P.includes(a.value)||Q([...P,a.value])},onDeselect:a=>{Q(P.filter(b=>b!==a.value))},selectedModel:null,activeProviders:o,modelAliases:L,addedModelValues:P,closeOnSelect:!1,title:"Add Model for GitHub Copilot"}),(0,d.jsx)(f.uR,{isOpen:N,onClose:()=>O(!1),title:"GitHub Copilot - Manual Configuration",configs:(v=H&&H.trim()?H:p?"<API_KEY_FROM_DASHBOARD>":"sk_ezrouter",w=X(),[{filename:"~/Library/Application Support/Code/User/chatLanguageModels.json",content:JSON.stringify([{name:"9Router",vendor:"azure",apiKey:v,models:(P.length>0?P:["provider/model-id"]).map(a=>({id:a,name:a,url:`${w}/chat/completions#models.ai.azure.com`,toolCalling:!0,vision:!1,maxInputTokens:128e3,maxOutputTokens:16e3}))}],null,2)}])})]})}},24429:(a,b,c)=>{c.d(b,{A:()=>m});var d=c(48249),e=c(67484),f=c(50412),g=c(81220),h=c(52632),i=c(73725),j=c(31407),k=c(94589),l=c(78052);function m({tool:a,isExpanded:b,onToggle:c,baseUrl:n,apiKeys:o,activeProviders:p,cloudEnabled:q,initialStatus:r,tunnelEnabled:s,tunnelPublicUrl:t,tailscaleEnabled:u,tailscaleUrl:v}){let w,x,y,z,A,[B,C]=(0,e.useState)(r||null),[D,E]=(0,e.useState)(!1),[F,G]=(0,e.useState)(!1),[H,I]=(0,e.useState)(!1),[J,K]=(0,e.useState)(null),[L,M]=(0,e.useState)(!1),[N,O]=(0,e.useState)(""),[P,Q]=(0,e.useState)(""),[R,S]=(0,e.useState)(""),[T,U]=(0,e.useState)(!1),[V,W]=(0,e.useState)(!1),[X,Y]=(0,e.useState)({}),[Z,$]=(0,e.useState)(!1),[_,aa]=(0,e.useState)(""),[ab,ac]=(0,e.useState)([]),[ad,ae]=(0,e.useState)(""),af=(0,e.useRef)([]),ag=async a=>{try{let b=N&&N.trim()||q?N:"sk_ezrouter",c=a.includes(ad)?ad:a[0]||"";await fetch("/api/cli-tools/opencode-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:aj(),apiKey:b,models:a,activeModel:c,subagentModel:R})})}catch(a){console.log("Error saving models:",a)}},ah=B?.config?.provider?.["9router"]?.options?.baseURL||"",ai=(()=>{if(!B?.installed)return null;if(!B.config||!B.has9Router)return"not_configured";let a=B.config?.provider?.["9router"]?.options?.baseURL||"";return(0,l.Q)(a,{tunnelPublicUrl:t,tailscaleUrl:v})?"configured":"other"})(),aj=()=>{let a=_||n;return a.endsWith("/v1")?a:`${a}/v1`},ak=async()=>{E(!0);try{let a=await fetch("/api/cli-tools/opencode-settings"),b=await a.json();C(b)}catch(a){C({installed:!1,error:a.message})}finally{E(!1)}},al=async()=>{G(!0),K(null);try{let a=N&&N.trim()||q?N:"sk_ezrouter",b=await fetch("/api/cli-tools/opencode-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:aj(),apiKey:a,models:ab,activeModel:""===ad?"":ad||ab[0],subagentModel:R})}),c=await b.json();b.ok?((0,i.Xg)(aj(),{tunnelPublicUrl:t,tailscaleUrl:v}),K({type:"success",text:"Settings applied successfully!"}),ak()):K({type:"error",text:c.error||"Failed to apply settings"})}catch(a){K({type:"error",text:a.message})}finally{G(!1)}},am=async()=>{I(!0),K(null);try{let a=await fetch("/api/cli-tools/opencode-settings",{method:"DELETE"}),b=await a.json();a.ok?(K({type:"success",text:"Settings reset successfully!"}),Q(""),S(""),ac([]),ae(""),ak()):K({type:"error",text:b.error||"Failed to reset settings"})}catch(a){K({type:"error",text:a.message})}finally{I(!1)}};return(0,d.jsxs)(f.Zp,{padding:"xs",className:"overflow-hidden",children:[(0,d.jsxs)("div",{className:"flex items-start justify-between gap-3 hover:cursor-pointer sm:items-center",onClick:c,children:[(0,d.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,d.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,d.jsx)(g.default,{src:"/providers/opencode.png",alt:a.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:a=>{a.target.style.display="none"},loading:"lazy",decoding:"async"})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[(0,d.jsx)("h3",{className:"font-medium text-sm",children:a.name}),"configured"===ai&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-green-500/10 text-green-600 dark:text-green-400 rounded-full",children:"Connected"}),"not_configured"===ai&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-yellow-500/10 text-yellow-600 dark:text-yellow-400 rounded-full",children:"Not configured"}),"other"===ai&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-blue-500/10 text-blue-600 dark:text-blue-400 rounded-full",children:"Other"})]}),(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:a.description})]})]}),(0,d.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${b?"rotate-180":""}`,children:"expand_more"})]}),b&&(0,d.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[D&&(0,d.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,d.jsx)("span",{children:"Checking OpenCode CLI..."})]}),!D&&B&&!B.installed&&(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{className:"flex flex-col gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,d.jsxs)("div",{className:"flex items-start gap-3",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,d.jsxs)("div",{className:"flex-1",children:[(0,d.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:"OpenCode CLI not detected locally"}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"Manual configuration is still available if 9router is deployed on a remote server."})]})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2 pl-9",children:[(0,d.jsx)(k.A,{tool:"opencode",baseUrl:aj(),apiKey:N,model:ad||ab[0]||"",className:"!bg-yellow-500/20 !border-yellow-500/40 !text-yellow-700 dark:!text-yellow-300 hover:!bg-yellow-500/30"}),(0,d.jsxs)(f.$n,{variant:"secondary",size:"sm",onClick:()=>$(!0),className:"!bg-yellow-500/20 !border-yellow-500/40 !text-yellow-700 dark:!text-yellow-300 hover:!bg-yellow-500/30",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:"content_copy"}),"Manual Config"]}),(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:()=>M(!L),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:L?"expand_less":"help"}),L?"Hide":"How to Install"]})]})]}),L&&(0,d.jsxs)("div",{className:"p-4 bg-surface border border-border rounded-lg",children:[(0,d.jsx)("h4",{className:"font-medium mb-3",children:"Installation Guide"}),(0,d.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"text-text-muted mb-1",children:"macOS / Linux:"}),(0,d.jsx)("code",{className:"block px-3 py-2 bg-black/5 dark:bg-white/5 rounded font-mono text-xs",children:"npm install -g opencode-ai"})]}),(0,d.jsxs)("p",{className:"text-text-muted",children:["After installation, run ",(0,d.jsx)("code",{className:"px-1 bg-black/5 dark:bg-white/5 rounded",children:"opencode"})," to verify."]})]})]})]}),!D&&B?.installed&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Select Endpoint"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)(h.A,{value:_||_||`${n}/v1`,onChange:aa,requiresExternalUrl:a.requiresExternalUrl,tunnelEnabled:s,tunnelPublicUrl:t,tailscaleEnabled:u,tailscaleUrl:v,currentUrl:ah})]}),B?.config?.provider?.["9router"]?.options?.baseURL&&(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Current"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)("span",{className:"min-w-0 truncate rounded bg-surface/40 px-2 py-2 text-xs text-text-muted sm:py-1.5",children:B.config.provider["9router"].options.baseURL})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"API Key"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)(j.A,{value:N,onChange:O,apiKeys:o,cloudEnabled:q})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr] sm:items-start sm:gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right pt-1",children:"Models"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px] mt-1.5",children:"arrow_forward"}),(0,d.jsxs)("div",{className:"flex-1 flex flex-col gap-2",children:[(0,d.jsx)("div",{className:"flex flex-wrap gap-1.5 min-h-[28px] px-2 py-1.5 bg-surface rounded border border-border",children:0===ab.length?(0,d.jsx)("span",{className:"text-xs text-text-muted",children:"No models selected"}):ab.map(a=>(0,d.jsxs)("span",{onClick:async()=>{if(a===ad)try{(await fetch("/api/cli-tools/opencode-settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({clearActiveModel:!0})})).ok&&(ae(""),ak())}catch(a){console.log("Error clearing active model:",a)}else ae(a)},className:`inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs cursor-pointer transition-colors ${a===ad?"bg-primary/10 text-primary border border-primary":"bg-black/5 dark:bg-white/5 text-text-muted border border-transparent hover:border-border"}`,title:a===ad?"Click to clear active model":"Click to set as active",children:[a===ad&&(0,d.jsx)("span",{className:"material-symbols-outlined text-[10px]",children:"star"}),a,(0,d.jsx)("button",{onClick:async b=>{b.stopPropagation();try{if((await fetch(`/api/cli-tools/opencode-settings?model=${encodeURIComponent(a)}`,{method:"DELETE"})).ok){let b=ab.filter(b=>b!==a);ac(b),ad===a&&ae(""),ak()}}catch(a){console.log("Error removing model:",a)}},className:"ml-0.5 hover:text-red-500",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"close"})})]},a))}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsx)("button",{onClick:()=>U(!0),disabled:!p?.length,className:`px-2 py-1 rounded border text-xs transition-colors ${p?.length?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Add Model"}),(0,d.jsx)("span",{className:"text-xs text-text-muted",children:ab.length>0&&ad?(0,d.jsxs)(d.Fragment,{children:["Active: ",(0,d.jsx)("span",{className:"text-primary",children:ad})]}):ab.length>0?(0,d.jsx)("span",{className:"text-yellow-500",children:"Click a model to set/clear active"}):"Select models to add"})]})]})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Subagent Model"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)("input",{type:"text",value:R,onChange:a=>S(a.target.value),placeholder:P||"provider/model-id (defaults to main model)",className:"w-full min-w-0 px-2 py-2 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50 sm:py-1.5"}),(0,d.jsx)("button",{onClick:()=>W(!0),disabled:!p?.length,className:`w-full sm:w-auto rounded border px-2 py-2 text-xs transition-colors sm:py-1.5 whitespace-nowrap sm:shrink-0 ${p?.length?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select Model"}),R&&(0,d.jsx)("button",{onClick:()=>S(""),className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear (will use main model)",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})]}),J&&(0,d.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===J.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===J.type?"check_circle":"error"}),(0,d.jsx)("span",{children:J.text})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,d.jsxs)(f.$n,{variant:"primary",size:"sm",onClick:al,disabled:0===ab.length,loading:F,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:am,disabled:!B.has9Router,loading:H,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,d.jsxs)(f.$n,{variant:"ghost",size:"sm",onClick:()=>$(!0),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]}),(0,d.jsx)(k.A,{tool:"opencode",baseUrl:aj(),apiKey:N,model:ad||ab[0]||"",variant:"ghost"})]})]})]}),T&&(0,d.jsx)(f.rq,{isOpen:T,onClose:()=>{U(!1),ag(af.current)},onSelect:a=>{!ab.includes(a.value)&&(ac([...ab,a.value]),ad||ae(a.value))},onDeselect:a=>{let b=ab.filter(b=>b!==a.value);ac(b),ad===a.value&&ae(b[0]||"")},selectedModel:null,activeProviders:p,modelAliases:X,addedModelValues:ab,closeOnSelect:!1,title:"Add Model for OpenCode"}),V&&(0,d.jsx)(f.rq,{isOpen:V,onClose:()=>W(!1),onSelect:a=>{S(a.value),W(!1)},selectedModel:R,activeProviders:p,modelAliases:X,title:"Select Subagent Model for OpenCode"}),(0,d.jsx)(f.uR,{isOpen:Z,onClose:()=>$(!1),title:"OpenCode - Manual Configuration",configs:(w=N&&N.trim()?N:q?"<API_KEY_FROM_DASHBOARD>":"sk_ezrouter",x=ab.length>0?ab:["provider/model-id"],y=ad||ab[0]||x[0],z=R||y,A={},x.forEach(a=>{A[a]={name:a,modalities:{input:["text","image"],output:["text"]}}}),[{filename:"~/.config/opencode/opencode.json",content:JSON.stringify({provider:{"9router":{npm:"@ai-sdk/openai-compatible",options:{baseURL:aj(),apiKey:w},models:A}},model:`9router/${y}`,agent:{explorer:{description:"Fast explorer subagent for codebase exploration",mode:"subagent",model:`9router/${z}`}}},null,2)}])})]})}},31407:(a,b,c)=>{c.d(b,{A:()=>i});var d=c(48249),e=c(67484),f=c(73725);let g="__custom__",h="__save_key__";function i({value:a,onChange:b,apiKeys:c=[],cloudEnabled:j=!1,className:k=""}){let[l,m]=(0,e.useState)([]),[n,o]=(0,e.useState)(!1),[p,q]=(0,e.useState)(""),r=(0,e.useMemo)(()=>[...c.map(a=>({value:a.key,label:a.key})),...l.map(a=>({value:`saved:${a.name}`,label:a.key,url:a.key,saved:!0})),{value:g,label:"Custom...",url:""}],[c,l]),s=a?r.find(b=>b.value===a||b.url===a):null,t=s?s.value:n||a?g:r[0]?.value??g,u=n?p:a||"",v="string"==typeof t&&t.startsWith("saved:"),w=t===g,x=w&&(a||"").trim().length>0&&!c.some(b=>b.key===a);return 0!==c.length||0!==l.length||n||a?(0,d.jsxs)("div",{className:`flex flex-col gap-1.5 ${k}`,children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsxs)("select",{value:t,onChange:c=>{let d=c.target.value;if(d===h)return void(0,f.i5)((a||"").trim());if(d===g){o(!0),q(""),b("");return}o(!1),q("");let e=r.find(a=>a.value===d);e&&b(e.url??e.value)},className:"flex-1 min-w-0 px-2 py-2 bg-surface rounded text-xs border border-border focus:outline-none focus:ring-1 focus:ring-primary/50 sm:py-1.5",children:[r.map(a=>(0,d.jsx)("option",{value:a.value,children:a.label},a.value)),x&&(0,d.jsx)("option",{value:h,children:"+ Save current as..."})]}),v&&(0,d.jsx)("button",{type:"button",onClick:()=>{if(!v)return;(0,f.uZ)(t.slice(6)),o(!1),q("");let a=r.find(a=>a.value!==g&&a.value!==t);b(a?a.url??a.value:"")},className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors shrink-0",title:"Delete saved key",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"delete"})})]}),w&&(0,d.jsx)("input",{type:"text",value:u,onChange:a=>{let c=a.target.value;o(!0),q(c),b(c)},placeholder:"sk-...",className:"w-full min-w-0 px-2 py-2 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50 sm:py-1.5"})]}):(0,d.jsx)("span",{className:`min-w-0 rounded bg-surface/40 px-2 py-2 text-xs text-text-muted sm:py-1.5 ${k}`,children:j?"No API keys - Create one in Keys page":"sk_ezrouter (default)"})}},34851:(a,b,c)=>{c.d(b,{A:()=>q});var d=c(48249),e=c(67484),f=c(50412),g=c(29476),h=c(81220),i=c(52632),j=c(73725),k=c(31407),l=c(78052);let m="/api/cli-tools/grok-build-settings",n="9router",o=[{id:"general-purpose",label:"General-purpose",help:"Implementation, testing, and full-capability delegated tasks"},{id:"explore",label:"Explore",help:"Read-only codebase research and investigation"},{id:"plan",label:"Plan",help:"Architecture and implementation planning"}];function p({label:a,value:b,placeholder:c,onChange:e,onSelect:f,disabled:g,help:h}){return(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsxs)("div",{className:"sm:text-right",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-sm",children:a}),h&&(0,d.jsx)("p",{className:"mt-0.5 text-[10px] leading-tight text-text-muted",children:h})]}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsxs)("div",{className:"relative w-full min-w-0",children:[(0,d.jsx)("input",{type:"text",value:b,onChange:a=>e(a.target.value),placeholder:c,className:"w-full min-w-0 pl-2 pr-7 py-2 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50 sm:py-1.5"}),b&&(0,d.jsx)("button",{type:"button",onClick:()=>e(""),className:"absolute right-1 top-1/2 -translate-y-1/2 p-0.5 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear (inherit main model for subagents)",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]}),(0,d.jsx)("button",{type:"button",onClick:f,disabled:g,className:`w-full sm:w-auto rounded border px-2 py-2 text-xs transition-colors sm:py-1.5 whitespace-nowrap sm:shrink-0 ${!g?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select"})]})}function q({tool:a,isExpanded:b,onToggle:c,hasActiveProviders:r,apiKeys:s,activeProviders:t,cloudEnabled:u,initialStatus:v,tunnelEnabled:w,tunnelPublicUrl:x,tailscaleEnabled:y,tailscaleUrl:z}){let{getCaps:A}=(0,g.y)(),B=a=>A(a)?.contextWindow||null,C=v?.settings?.model?.model||"",D=Object.fromEntries(o.map(a=>[a.id,v?.settings?.subagentModels?.[a.id]?.model]).filter(([,a])=>!!a)),[E,F]=(0,e.useState)(v||null),[G,H]=(0,e.useState)(!1),[I,J]=(0,e.useState)(!1),[K,L]=(0,e.useState)(!1),[M,N]=(0,e.useState)(null),[O,P]=(0,e.useState)(s?.[0]?.key||""),[Q,R]=(0,e.useState)(C),[S,T]=(0,e.useState)(D),[U,V]=(0,e.useState)(null),[W,X]=(0,e.useState)({}),[Y,Z]=(0,e.useState)(!1),[$,_]=(0,e.useState)(""),aa=(0,e.useRef)(!!v),ab=E?.settings?.model,ac=ab?.base_url||"",ad=E?.installed?ab?.base_url?(0,l.Q)(ab.base_url,{tunnelPublicUrl:x,tailscaleUrl:z})?"configured":"other":"not_configured":null,ae=(0,e.useCallback)(a=>{let b=a?.settings?.model?.model||"",c=Object.fromEntries(o.map(b=>[b.id,a?.settings?.subagentModels?.[b.id]?.model]).filter(([,a])=>!!a));R(b),T(c)},[]);(0,e.useCallback)(async()=>{try{let a=await fetch("/api/models/alias"),b=await a.json();a.ok&&X(b.aliases||{})}catch(a){console.log("Error fetching model aliases:",a)}},[]);let af=(0,e.useCallback)(async({hydrate:a=!1}={})=>{H(!0);try{let b=await fetch(m),c=await b.json();F(c),aa.current=!0,a&&ae(c)}catch(a){F({installed:!1,error:a.message})}finally{H(!1)}},[ae]),ag=()=>{let a=$||"http://127.0.0.1:20126";return a.endsWith("/v1")?a:`${a}/v1`},ah=async()=>{J(!0),N(null);try{let a=O?.trim()||(s?.length>0?s[0].key:null)||(u?null:"sk_ezrouter"),b={};for(let a of o){let c=S[a.id]?.trim();c&&(b[a.id]={model:c,contextWindow:B(c)})}let c=await fetch(m,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:ag(),apiKey:a,model:Q,contextWindow:B(Q),subagentModels:b})}),d=await c.json();c.ok?((0,j.Xg)(ag(),{tunnelPublicUrl:x,tailscaleUrl:z}),N({type:"success",text:"Main and subagent models applied successfully!"}),af()):N({type:"error",text:d.error||"Failed to apply settings"})}catch(a){N({type:"error",text:a.message})}finally{J(!1)}},ai=async()=>{L(!0),N(null);try{let a=await fetch(m,{method:"DELETE"}),b=await a.json();a.ok?(N({type:"success",text:"Settings reset successfully!"}),R(""),T({}),af()):N({type:"error",text:b.error||"Failed to reset settings"})}catch(a){N({type:"error",text:a.message})}finally{L(!1)}};return(0,d.jsxs)(f.Zp,{padding:"xs",className:"overflow-hidden",children:[(0,d.jsxs)("div",{className:"flex items-start justify-between gap-3 hover:cursor-pointer sm:items-center",onClick:c,children:[(0,d.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,d.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,d.jsx)(h.default,{src:a.image||"/providers/grok-cli.png",alt:a.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:a=>{a.target.style.display="none"},loading:"lazy",decoding:"async"})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[(0,d.jsx)("h3",{className:"font-medium text-sm",children:a.name}),"configured"===ad&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-green-500/10 text-green-600 dark:text-green-400 rounded-full",children:"Connected"}),"not_configured"===ad&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-yellow-500/10 text-yellow-600 dark:text-yellow-400 rounded-full",children:"Not configured"}),"other"===ad&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-blue-500/10 text-blue-600 dark:text-blue-400 rounded-full",children:"Other"})]}),(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:a.description})]})]}),(0,d.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${b?"rotate-180":""}`,children:"expand_more"})]}),b&&(0,d.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[G&&(0,d.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,d.jsx)("span",{children:"Checking Grok Build..."})]}),!G&&E&&!E.installed&&(0,d.jsxs)("div",{className:"flex flex-col gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,d.jsxs)("div",{className:"flex items-start gap-3",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,d.jsxs)("div",{className:"flex-1",children:[(0,d.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:"Grok Build not detected locally"}),(0,d.jsx)("code",{className:"block mt-2 p-2 bg-black/20 rounded text-xs font-mono",children:"curl -fsSL https://x.ai/cli/install.sh | bash"})]})]}),(0,d.jsxs)(f.$n,{variant:"secondary",size:"sm",onClick:()=>Z(!0),className:"w-full sm:w-auto",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:"content_copy"}),"Manual Config"]})]}),!G&&E?.installed&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[a.notes?.length>0&&(0,d.jsx)("div",{className:"mb-2 flex flex-col gap-2",children:a.notes.map((a,b)=>(0,d.jsxs)("div",{className:`flex items-start gap-2 rounded p-2 text-xs ${"warning"===a.type?"bg-yellow-500/10 text-yellow-600 dark:text-yellow-400":"bg-blue-500/10 text-blue-600 dark:text-blue-400"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined mt-0.5 text-[14px]",children:"warning"===a.type?"warning":"info"}),(0,d.jsx)("span",{children:a.text})]},b))}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Select Endpoint"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)(i.A,{value:$||ag(),onChange:_,requiresExternalUrl:a.requiresExternalUrl,tunnelEnabled:w,tunnelPublicUrl:x,tailscaleEnabled:y,tailscaleUrl:z,currentUrl:ac})]}),ab?.base_url&&(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Current"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsxs)("span",{className:"min-w-0 truncate rounded bg-surface/40 px-2 py-2 text-xs text-text-muted sm:py-1.5",children:[ab.base_url," \xb7 ",ab.model,ab.context_window?` \xb7 ${(ab.context_window/1e3).toLocaleString()}K ctx`:""]})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"API Key"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)(k.A,{value:O,onChange:P,apiKeys:s,cloudEnabled:u})]}),(0,d.jsx)(p,{label:"Main Model",value:Q,onChange:R,placeholder:"provider/model-id",onSelect:()=>V("main"),disabled:!r}),(0,d.jsx)("div",{className:"my-1 border-t border-border pt-3",children:(0,d.jsxs)("div",{className:"mb-2 flex items-start gap-2",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-primary text-[16px]",children:"account_tree"}),(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"text-xs font-semibold text-text-main",children:"Subagent model overrides"}),(0,d.jsx)("p",{className:"text-[10px] text-text-muted",children:"Leave blank to inherit Main Model. Each override keeps its own context window."})]})]})}),o.map(a=>(0,d.jsx)(p,{label:a.label,help:a.help,value:S[a.id]||"",onChange:b=>T(c=>({...c,[a.id]:b})),placeholder:`${Q||"Main Model"} (inherit)`,onSelect:()=>V(a.id),disabled:!r},a.id))]}),M&&(0,d.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===M.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===M.type?"check_circle":"error"}),(0,d.jsx)("span",{children:M.text})]}),(0,d.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center gap-2",children:[(0,d.jsxs)(f.$n,{variant:"primary",size:"sm",onClick:ah,disabled:!Q,loading:I,className:"w-full sm:w-auto",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:ai,disabled:!E?.has9Router,loading:K,className:"w-full sm:w-auto",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,d.jsxs)(f.$n,{variant:"ghost",size:"sm",onClick:()=>Z(!0),className:"w-full sm:w-auto",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]})]})]})]}),U&&(0,d.jsx)(f.rq,{isOpen:!!U,onClose:()=>V(null),onSelect:a=>{"main"===U?R(a.value):U&&T(b=>({...b,[U]:a.value})),V(null)},selectedModel:"main"===U?Q:S[U]||"",activeProviders:t,modelAliases:W,title:"main"===U?"Select Main Model for Grok Build":`Select ${o.find(a=>a.id===U)?.label||"Subagent"} Model`}),(0,d.jsx)(f.uR,{isOpen:Y,onClose:()=>Z(!1),title:"Grok Build - Manual Configuration",configs:(()=>{let a=O?.trim()||(u?"<API_KEY_FROM_DASHBOARD>":"sk_ezrouter"),b=ag(),c=Q||"provider/model-id",d=[`[models]
|
|
2
2
|
default = "${n}"`,`[model.${n}]
|
|
3
3
|
model = "${c}"
|
|
4
4
|
base_url = "${b}"
|
|
@@ -51,7 +51,7 @@ default_model = "${K||"cc/claude-opus-4-7"}"
|
|
|
51
51
|
requires_api_key = true
|
|
52
52
|
|
|
53
53
|
[[providers.9router.models]]
|
|
54
|
-
id = "${K||"cc/claude-opus-4-7"}"`},{filename:"~/.config/jcode/provider-9router.env",content:`JCODE_9ROUTER_API_KEY="${x}"`}])})]})}},61712:(a,b,c)=>{c.d(b,{A:()=>l});var d=c(48249),e=c(67484),f=c(50412),g=c(81220),h=c(52632),i=c(73725),j=c(31407),k=c(78052);function l({tool:a,isExpanded:b,onToggle:c,baseUrl:m,hasActiveProviders:n,apiKeys:o,activeProviders:p,cloudEnabled:q,initialStatus:r,tunnelEnabled:s,tunnelPublicUrl:t,tailscaleEnabled:u,tailscaleUrl:v}){let w,x,y,z,[A,B]=(0,e.useState)(r||null),[C,D]=(0,e.useState)(!1),[E,F]=(0,e.useState)(!1),[G,H]=(0,e.useState)(!1),[I,J]=(0,e.useState)(null),[K,L]=(0,e.useState)(""),[M,N]=(0,e.useState)([]),[O,P]=(0,e.useState)(""),[Q,R]=(0,e.useState)(!1),[S,T]=(0,e.useState)({}),[U,V]=(0,e.useState)(!1),[W,X]=(0,e.useState)(!1),[Y,Z]=(0,e.useState)("");(0,e.useRef)(!1);let $=A?.settings?.customModels?.find(a=>a.id?.startsWith("custom:9Router"))?.baseUrl||"",_=(()=>{if(!A?.installed)return null;let a=A.settings?.customModels?.find(a=>a.id?.startsWith("custom:9Router"));return a?(0,k.Q)(a.baseUrl,{tunnelPublicUrl:t,tailscaleUrl:v,cloudUrl:q?"https://ezrouter.golamrabbi.dev":null})?"configured":"other":"not_configured"})(),aa=async()=>{D(!0);try{let a=await fetch("/api/cli-tools/droid-settings"),b=await a.json();B(b)}catch(a){B({installed:!1,error:a.message})}finally{D(!1)}},ab=()=>{let a=Y||m;return a.endsWith("/v1")?a:`${a}/v1`},ac=()=>{let a=O.trim();!a||M.includes(a)||(N(b=>[...b,a]),P(""))},ad=async()=>{F(!0),J(null);try{let a=K?.trim()||(o?.length>0?o[0].key:null)||(q?null:"sk_ezrouter"),b=await fetch("/api/cli-tools/droid-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:ab(),apiKey:a,models:M,activeModel:M[0]||""})}),c=await b.json();b.ok?((0,i.Xg)(ab(),{tunnelPublicUrl:t,tailscaleUrl:v}),J({type:"success",text:"Settings applied successfully!"}),aa()):J({type:"error",text:c.error||"Failed to apply settings"})}catch(a){J({type:"error",text:a.message})}finally{F(!1)}},ae=async()=>{H(!0),J(null);try{let a=await fetch("/api/cli-tools/droid-settings",{method:"DELETE"}),b=await a.json();a.ok?(J({type:"success",text:"Settings reset successfully!"}),N([]),aa()):J({type:"error",text:b.error||"Failed to reset settings"})}catch(a){J({type:"error",text:a.message})}finally{H(!1)}};return(0,d.jsxs)(f.Zp,{padding:"xs",className:"overflow-hidden",children:[(0,d.jsxs)("div",{className:"flex items-start justify-between gap-3 hover:cursor-pointer sm:items-center",onClick:c,children:[(0,d.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,d.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,d.jsx)(g.default,{src:"/providers/droid.png",alt:a.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:a=>{a.target.style.display="none"},loading:"lazy",decoding:"async"})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[(0,d.jsx)("h3",{className:"font-medium text-sm",children:a.name}),"configured"===_&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-green-500/10 text-green-600 dark:text-green-400 rounded-full",children:"Connected"}),"not_configured"===_&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-yellow-500/10 text-yellow-600 dark:text-yellow-400 rounded-full",children:"Not configured"}),"other"===_&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-blue-500/10 text-blue-600 dark:text-blue-400 rounded-full",children:"Other"})]}),(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:a.description})]})]}),(0,d.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${b?"rotate-180":""}`,children:"expand_more"})]}),b&&(0,d.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[C&&(0,d.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,d.jsx)("span",{children:"Checking Factory Droid CLI..."})]}),!C&&A&&!A.installed&&(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{className:"flex flex-col gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,d.jsxs)("div",{className:"flex items-start gap-3",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,d.jsxs)("div",{className:"flex-1",children:[(0,d.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:"Factory Droid CLI not detected locally"}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"Manual configuration is still available if 9router is deployed on a remote server."})]})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2 pl-9",children:[(0,d.jsxs)(f.$n,{variant:"secondary",size:"sm",onClick:()=>V(!0),className:"!bg-yellow-500/20 !border-yellow-500/40 !text-yellow-700 dark:!text-yellow-300 hover:!bg-yellow-500/30",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:"content_copy"}),"Manual Config"]}),(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:()=>X(!W),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:W?"expand_less":"help"}),W?"Hide":"How to Install"]})]})]}),W&&(0,d.jsxs)("div",{className:"p-4 bg-surface border border-border rounded-lg",children:[(0,d.jsx)("h4",{className:"font-medium mb-3",children:"Installation Guide"}),(0,d.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"text-text-muted mb-1",children:"macOS / Linux / Windows:"}),(0,d.jsx)("code",{className:"block px-3 py-2 bg-black/5 dark:bg-white/5 rounded font-mono text-xs",children:"curl -fsSL https://app.factory.ai/cli | sh"})]}),(0,d.jsxs)("p",{className:"text-text-muted",children:["After installation, run ",(0,d.jsx)("code",{className:"px-1 bg-black/5 dark:bg-white/5 rounded",children:"droid"})," to verify."]})]})]})]}),!C&&A?.installed&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Select Endpoint"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)(h.A,{value:Y||((w=Y||m).endsWith("/v1")?w:`${w}/v1`),onChange:Z,requiresExternalUrl:a.requiresExternalUrl,tunnelEnabled:s,tunnelPublicUrl:t,tailscaleEnabled:u,tailscaleUrl:v,currentUrl:$})]}),A?.settings?.customModels?.find(a=>a.id?.startsWith("custom:9Router"))?.baseUrl&&(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Current"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)("span",{className:"min-w-0 truncate rounded bg-surface/40 px-2 py-2 text-xs text-text-muted sm:py-1.5",children:A.settings.customModels.find(a=>a.id?.startsWith("custom:9Router")).baseUrl})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"API Key"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)(j.A,{value:K,onChange:L,apiKeys:o,cloudEnabled:q})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsxs)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:["Models ",M.length>0&&(0,d.jsxs)("span",{className:"text-primary",children:["(",M.length,")"]})]}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsxs)("div",{className:"flex-1 flex flex-col gap-1",children:[M.length>0&&(0,d.jsx)("div",{className:"flex flex-col gap-0.5 mb-1",children:M.map(a=>(0,d.jsxs)("div",{className:"flex items-center gap-1.5 px-2 py-1 bg-bg-secondary rounded border border-border",children:[(0,d.jsx)("span",{className:"flex-1 text-xs font-mono truncate",children:a}),(0,d.jsx)("button",{onClick:()=>N(b=>b.filter(b=>b!==a)),className:"text-text-muted hover:text-red-500 transition-colors shrink-0",title:"Remove",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"close"})})]},a))}),(0,d.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,d.jsx)("input",{type:"text",value:O,onChange:a=>P(a.target.value),onKeyDown:a=>{"Enter"===a.key&&(a.preventDefault(),ac())},placeholder:"provider/model-id",className:"w-full min-w-0 px-2 py-2 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50 sm:py-1.5"}),(0,d.jsx)("button",{onClick:()=>R(!0),disabled:!n,className:`px-2 py-1.5 rounded border text-xs shrink-0 ${n?"bg-surface border-border hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select"}),(0,d.jsx)("button",{onClick:ac,disabled:!O.trim(),className:"px-2 py-1.5 rounded border bg-surface border-border hover:border-primary text-xs shrink-0 disabled:opacity-50",title:"Add model",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"add"})})]})]})]})]}),I&&(0,d.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===I.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===I.type?"check_circle":"error"}),(0,d.jsx)("span",{children:I.text})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,d.jsxs)(f.$n,{variant:"primary",size:"sm",onClick:ad,disabled:0===M.length,loading:E,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:ae,disabled:!A?.has9Router,loading:G,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,d.jsxs)(f.$n,{variant:"ghost",size:"sm",onClick:()=>V(!0),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]})]})]})]}),Q&&(0,d.jsx)(f.rq,{isOpen:Q,onClose:()=>R(!1),onSelect:a=>{!a.value||M.includes(a.value)||(N(b=>[...b,a.value]),R(!1))},selectedModel:null,activeProviders:p,modelAliases:S,title:"Select Model for Factory Droid"}),(0,d.jsx)(f.uR,{isOpen:U,onClose:()=>V(!1),title:"Factory Droid - Manual Configuration",configs:(x=K&&K.trim()?K:q?"<API_KEY_FROM_DASHBOARD>":"sk_ezrouter",y={customModels:M.map((a,b)=>({model:a,id:`custom:9Router-${b}`,index:b,baseUrl:ab(),apiKey:x,displayName:a,maxOutputTokens:131072,noImageSupport:!1,provider:"openai"}))},z="u">typeof navigator&&navigator.platform,[{filename:z?.toLowerCase().includes("win")?"%USERPROFILE%\\.factory\\settings.json":"~/.factory/settings.json",content:JSON.stringify(y,null,2)}])})]})}},61935:(a,b,c)=>{c.d(b,{A:()=>p});var d=c(48249),e=c(81220),f=c(67484),g=c(50412),h=c(31407),i=c(52632),j=c(78052);function k({tool:a,configStatus:b,isExpanded:c,onToggle:f}){return(0,d.jsxs)("div",{className:"flex items-start justify-between gap-3 hover:cursor-pointer sm:items-center",onClick:f,children:[(0,d.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,d.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,d.jsx)(e.default,{src:a.image||"/providers/pi.svg",alt:a.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:a=>{a.target.style.display="none"},loading:"lazy",decoding:"async"})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[(0,d.jsx)("h3",{className:"font-medium text-sm",children:a.name}),"configured"===b&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-green-500/10 text-green-600 dark:text-green-400 rounded-full",children:"Connected"}),"not_configured"===b&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-yellow-500/10 text-yellow-600 dark:text-yellow-400 rounded-full",children:"Not configured"}),"other"===b&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-blue-500/10 text-blue-600 dark:text-blue-400 rounded-full",children:"Other"})]}),(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:a.description})]})]}),(0,d.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${c?"rotate-180":""}`,children:"expand_more"})]})}function l({setShowManualConfigModal:a,showInstallGuide:b,setShowInstallGuide:c}){return(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{className:"flex flex-col gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,d.jsxs)("div",{className:"flex items-start gap-3",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,d.jsxs)("div",{className:"flex-1",children:[(0,d.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:"Pi CLI not detected locally"}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"Manual configuration is still available if 9router is deployed on a remote server."})]})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2 pl-9",children:[(0,d.jsxs)(g.$n,{variant:"secondary",size:"sm",onClick:()=>a(!0),className:"!bg-yellow-500/20 !border-yellow-500/40 !text-yellow-700 dark:!text-yellow-300 hover:!bg-yellow-500/30",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:"content_copy"}),"Manual Config"]}),(0,d.jsxs)(g.$n,{variant:"outline",size:"sm",onClick:()=>c(!b),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:b?"expand_less":"help"}),b?"Hide":"How to Install"]})]})]}),b&&(0,d.jsxs)("div",{className:"p-4 bg-surface border border-border rounded-lg",children:[(0,d.jsx)("h4",{className:"font-medium mb-3",children:"Installation Guide"}),(0,d.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"text-text-muted mb-1",children:"macOS / Linux:"}),(0,d.jsx)("code",{className:"block px-3 py-2 bg-black/5 dark:bg-white/5 rounded font-mono text-xs",children:"npm install -g @earendil-works/pi-coding-agent"})]}),(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"text-text-muted mb-1",children:"Alternative (curl):"}),(0,d.jsx)("code",{className:"block px-3 py-2 bg-black/5 dark:bg-white/5 rounded font-mono text-xs",children:"curl -fsSL https://pi.dev/install.sh | sh"})]}),(0,d.jsxs)("p",{className:"text-text-muted",children:["After installation, run"," ",(0,d.jsx)("code",{className:"px-1 bg-black/5 dark:bg-white/5 rounded",children:"pi"})," ","to verify."]})]})]})]})}function m({status:a,customBaseUrl:b,setCustomBaseUrl:c,getDisplayUrl:e,tool:f,tunnelEnabled:g,tunnelPublicUrl:j,tailscaleEnabled:k,tailscaleUrl:l,selectedApiKey:n,setSelectedApiKey:o,apiKeys:p,cloudEnabled:q,selectedModels:r,setSelectedModels:s,activeProviders:t,setModalOpen:u,checkStatus:v}){let w=async a=>{try{(await fetch(`/api/cli-tools/pi-settings?model=${encodeURIComponent(a)}`,{method:"DELETE"})).ok&&(s(b=>b.filter(b=>b!==a)),v())}catch(a){console.log("Error removing model:",a)}};return(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Select Endpoint"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)(i.A,{value:b||e(),onChange:c,requiresExternalUrl:f.requiresExternalUrl,tunnelEnabled:g,tunnelPublicUrl:j,tailscaleEnabled:k,tailscaleUrl:l})]}),a?.config?.providers?.["9router"]?.baseUrl&&(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Current"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)("span",{className:"min-w-0 truncate rounded bg-surface/40 px-2 py-2 text-xs text-text-muted sm:py-1.5",children:a.config.providers["9router"].baseUrl})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"API Key"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)(h.A,{value:n,onChange:o,apiKeys:p,cloudEnabled:q})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr] sm:items-start sm:gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right pt-1",children:"Models"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px] mt-1.5",children:"arrow_forward"}),(0,d.jsxs)("div",{className:"flex-1 flex flex-col gap-2",children:[(0,d.jsx)("div",{className:"flex flex-wrap gap-1.5 min-h-[28px] px-2 py-1.5 bg-surface rounded border border-border",children:0===r.length?(0,d.jsx)("span",{className:"text-xs text-text-muted",children:"No models selected"}):r.map(a=>(0,d.jsxs)("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs bg-black/5 dark:bg-white/5 text-text-muted border border-transparent",children:[a,(0,d.jsx)("button",{onClick:()=>w(a),className:"ml-0.5 hover:text-red-500",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"close"})})]},a))}),(0,d.jsx)("button",{onClick:()=>u(!0),disabled:!t?.length,className:`w-fit px-2 py-1 rounded border text-xs transition-colors ${t?.length?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Add Model"})]})]})]})}function n({message:a}){return a?(0,d.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===a.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===a.type?"check_circle":"error"}),(0,d.jsx)("span",{children:a.text})]}):null}function o({handleApply:a,selectedModels:b,applying:c,handleReset:e,status:f,restoring:h,setShowManualConfigModal:i}){return(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,d.jsxs)(g.$n,{variant:"primary",size:"sm",onClick:a,disabled:0===b.length,loading:c,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,d.jsxs)(g.$n,{variant:"outline",size:"sm",onClick:e,disabled:!f.has9Router,loading:h,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,d.jsxs)(g.$n,{variant:"ghost",size:"sm",onClick:()=>i(!0),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]})]})}function p({tool:a,isExpanded:b,onToggle:c,baseUrl:e,apiKeys:h,activeProviders:i,cloudEnabled:q,initialStatus:r,tunnelEnabled:s,tunnelPublicUrl:t,tailscaleEnabled:u,tailscaleUrl:v}){let w,x,[y,z]=(0,f.useState)(r||null),[A,B]=(0,f.useState)(!1),[C,D]=(0,f.useState)(!1),[E,F]=(0,f.useState)(!1),[G,H]=(0,f.useState)(null),[I,J]=(0,f.useState)(!1),[K,L]=(0,f.useState)(""),[M,N]=(0,f.useState)(!1),[O,P]=(0,f.useState)(!1),[Q,R]=(0,f.useState)(""),[S,T]=(0,f.useState)([]);(0,f.useRef)([]);let U=function(){let[a,b]=(0,f.useState)({});return a}(),V=(()=>{if(!y?.installed)return null;if(!y.config||!y.has9Router)return"not_configured";let a=y.config?.providers?.["9router"]?.baseUrl||"";return(0,j.Q)(a,{tunnelPublicUrl:t,tailscaleUrl:v})?"configured":"other"})(),W=()=>{let a=Q||e;return a.endsWith("/v1")?a:`${a}/v1`},X=async()=>{B(!0);try{let a=await fetch("/api/cli-tools/pi-settings"),b=await a.json();z(b)}catch(a){z({installed:!1,error:a.message})}finally{B(!1)}},Y=async()=>{D(!0),H(null);try{let a=K&&K.trim()||q?K:"sk_ezrouter",b=await fetch("/api/cli-tools/pi-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:W(),apiKey:a,models:S})}),c=await b.json();b.ok?(H({type:"success",text:"Settings applied successfully!"}),X()):H({type:"error",text:c.error||"Failed to apply settings"})}catch(a){H({type:"error",text:a.message})}finally{D(!1)}},Z=async()=>{F(!0),H(null);try{let a=await fetch("/api/cli-tools/pi-settings",{method:"DELETE"}),b=await a.json();a.ok?(H({type:"success",text:"Settings reset successfully!"}),T([]),X()):H({type:"error",text:b.error||"Failed to reset settings"})}catch(a){H({type:"error",text:a.message})}finally{F(!1)}};return(0,d.jsxs)(g.Zp,{padding:"xs",className:"overflow-hidden",children:[(0,d.jsx)(k,{tool:a,configStatus:V,isExpanded:b,onToggle:c}),b&&(0,d.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[A&&(0,d.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,d.jsx)("span",{children:"Checking Pi CLI..."})]}),!A&&y&&!y.installed&&(0,d.jsx)(l,{showManualConfigModal:O,setShowManualConfigModal:P,showInstallGuide:I,setShowInstallGuide:J}),!A&&y?.installed&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(m,{status:y,customBaseUrl:Q,setCustomBaseUrl:R,getDisplayUrl:()=>Q||`${e}/v1`,getEffectiveBaseUrl:W,tool:a,tunnelEnabled:s,tunnelPublicUrl:t,tailscaleEnabled:u,tailscaleUrl:v,selectedApiKey:K,setSelectedApiKey:L,apiKeys:h,cloudEnabled:q,selectedModels:S,setSelectedModels:T,activeProviders:i,setModalOpen:N,checkStatus:X}),(0,d.jsx)(n,{message:G}),(0,d.jsx)(o,{handleApply:Y,selectedModels:S,applying:C,handleReset:Z,status:y,restoring:E,setShowManualConfigModal:P})]})]}),M&&(0,d.jsx)(g.rq,{isOpen:M,onClose:()=>N(!1),onSelect:a=>{S.includes(a.value)||T([...S,a.value])},onDeselect:a=>{T(b=>b.filter(b=>b!==a.value))},selectedModel:null,activeProviders:i,modelAliases:U,addedModelValues:S,closeOnSelect:!1,title:"Add Model for Pi"}),(0,d.jsx)(g.uR,{isOpen:O,onClose:()=>P(!1),title:"Pi - Manual Configuration",configs:(w=K&&K.trim()?K:q?"<API_KEY_FROM_DASHBOARD>":"sk_ezrouter",x=S.length>0?S:["provider/model-id"],[{filename:"~/.pi/agent/models.json",content:JSON.stringify({providers:{"9router":{baseUrl:W(),api:"openai-completions",apiKey:w,models:x.map(a=>({id:a,input:["text","image"]}))}}},null,2)}])})]})}},62911:(a,b,c)=>{c.d(b,{dM:()=>e,wn:()=>d});let d={antigravity:{id:"antigravity",name:"Antigravity",image:"/providers/antigravity.png",color:"#4285F4",description:"Google Antigravity IDE with MITM",configType:"mitm",mitmDomain:"daily-cloudcode-pa.googleapis.com",modelAliases:["gemini-3.8-flash-high","gemini-3.8-flash-medium","gemini-3.8-flash-low","gemini-3.7-flash-high","gemini-3.7-flash-medium","gemini-3.7-flash-low","gemini-3.7-flash","gemini-3.6-flash-high","gemini-3.6-flash-medium","gemini-3.6-flash-low","gemini-3-flash-agent","gemini-3.1-pro-low","gemini-pro-agent","claude-sonnet-4-6","claude-opus-4-6-thinking","gpt-oss-120b-medium","gemini-3-flash"],defaultModels:[{id:"gemini-3.8-flash-high",name:"Gemini 3.8 Flash (High)",alias:"gemini-3.8-flash-high"},{id:"gemini-3.8-flash-medium",name:"Gemini 3.8 Flash (Medium)",alias:"gemini-3.8-flash-medium"},{id:"gemini-3.8-flash-low",name:"Gemini 3.8 Flash (Low)",alias:"gemini-3.8-flash-low"},{id:"gemini-3.7-flash-high",name:"Gemini 3.7 Flash (High)",alias:"gemini-3.7-flash-high"},{id:"gemini-3.7-flash-medium",name:"Gemini 3.7 Flash (Medium)",alias:"gemini-3.7-flash-medium"},{id:"gemini-3.7-flash-low",name:"Gemini 3.7 Flash (Low)",alias:"gemini-3.7-flash-low"},{id:"gemini-3.7-flash",name:"Gemini 3.7 Flash",alias:"gemini-3.7-flash",mandatory:!0},{id:"gemini-3.6-flash-high",name:"Gemini 3.6 Flash (High)",alias:"gemini-3.6-flash-high"},{id:"gemini-3.6-flash-medium",name:"Gemini 3.6 Flash (Medium)",alias:"gemini-3.6-flash-medium"},{id:"gemini-3.6-flash-low",name:"Gemini 3.6 Flash (Low)",alias:"gemini-3.6-flash-low"},{id:"gemini-3-flash-agent",name:"Gemini 3.5 Flash (High)",alias:"gemini-3-flash-agent"},{id:"gemini-3.1-pro-low",name:"Gemini 3.1 Pro (Low)",alias:"gemini-3.1-pro-low"},{id:"gemini-pro-agent",name:"Gemini 3.1 Pro (High)",alias:"gemini-pro-agent"},{id:"claude-sonnet-4-6",name:"Claude Sonnet 4.6 (Thinking)",alias:"claude-sonnet-4-6"},{id:"claude-opus-4-6-thinking",name:"Claude Opus 4.6 (Thinking)",alias:"claude-opus-4-6-thinking"},{id:"gpt-oss-120b-medium",name:"GPT-OSS 120B (Medium)",alias:"gpt-oss-120b-medium"},{id:"gemini-3-flash",name:"Gemini 3 Flash (Command)",alias:"gemini-3-flash"}]},copilot:{id:"copilot",name:"GitHub Copilot",image:"/providers/copilot.png",color:"#1F6FEB",description:"GitHub Copilot IDE with MITM",configType:"mitm",mitmDomain:"api.individual.githubcopilot.com",modelAliases:["gpt-5-mini","gpt-5.4-nano","claude-haiku-4.5","gpt-4o","gpt-4.1"],defaultModels:[{id:"gpt-5-mini",name:"GPT-5 mini",alias:"gpt-5-mini"},{id:"gpt-5.4-nano",name:"GPT-5.4 nano",alias:"gpt-5.4-nano"},{id:"claude-haiku-4.5",name:"Claude Haiku 4.5",alias:"claude-haiku-4.5"},{id:"gpt-4o",name:"GPT-4o",alias:"gpt-4o"},{id:"gpt-4.1",name:"GPT-4.1",alias:"gpt-4.1"}]},kiro:{id:"kiro",name:"Kiro",image:"/providers/kiro.png",color:"#FF6B00",description:"Kiro IDE with MITM",configType:"mitm",mitmDomain:"runtime.us-east-1.kiro.dev",defaultModels:[{id:"auto",name:"Auto (Kiro Agent)",alias:"auto"},{id:"claude-sonnet-5",name:"Claude Sonnet 5",alias:"claude-sonnet-5"},{id:"claude-sonnet-4.5",name:"Claude Sonnet 4.5",alias:"claude-sonnet-4.5"},{id:"claude-sonnet-4",name:"Claude Sonnet 4",alias:"claude-sonnet-4"},{id:"claude-haiku-4.5",name:"Claude Haiku 4.5",alias:"claude-haiku-4.5"},{id:"deepseek-3.2",name:"DeepSeek 3.2",alias:"deepseek-3.2"},{id:"minimax-m2.1",name:"MiniMax M2.1",alias:"minimax-m2.1"},{id:"gpt-5.6-sol",name:"GPT 5.6 Sol",alias:"gpt-5.6-sol",contextLength:272e3,rateMultiplier:2.4},{id:"gpt-5.6-terra",name:"GPT 5.6 Terra",alias:"gpt-5.6-terra",contextLength:272e3,rateMultiplier:1.2},{id:"gpt-5.6-luna",name:"GPT 5.6 Luna",alias:"gpt-5.6-luna",contextLength:272e3,rateMultiplier:.6},{id:"simple-task",name:"Qwen3 Coder Next",alias:"simple-task"}]}},e={claude:{id:"claude",name:"Claude Code",image:"/providers/claude.png",color:"#D97757",description:"Anthropic Claude Code CLI",configType:"env",envVars:{baseUrl:"ANTHROPIC_BASE_URL",model:"ANTHROPIC_MODEL",opusModel:"ANTHROPIC_DEFAULT_OPUS_MODEL",sonnetModel:"ANTHROPIC_DEFAULT_SONNET_MODEL",fableModel:"ANTHROPIC_DEFAULT_FABLE_MODEL",haikuModel:"ANTHROPIC_DEFAULT_HAIKU_MODEL"},modelAliases:["default","sonnet","opus","fable","haiku","opusplan"],settingsFile:"~/.claude/settings.json",defaultModels:[{id:"fable",name:"Claude Fable",alias:"fable",envKey:"ANTHROPIC_DEFAULT_FABLE_MODEL",defaultValue:"cc/claude-fable-5"},{id:"opus",name:"Claude Opus",alias:"opus",envKey:"ANTHROPIC_DEFAULT_OPUS_MODEL",defaultValue:"cc/claude-opus-4-8"},{id:"sonnet",name:"Claude Sonnet",alias:"sonnet",envKey:"ANTHROPIC_DEFAULT_SONNET_MODEL",defaultValue:"cc/claude-sonnet-5"},{id:"haiku",name:"Claude Haiku",alias:"haiku",envKey:"ANTHROPIC_DEFAULT_HAIKU_MODEL",defaultValue:"cc/claude-haiku-4-5-20251001"}]},openclaw:{id:"openclaw",name:"Open Claw",image:"/providers/openclaw.png",color:"#FF6B35",description:"Open Claw AI Assistant",configType:"custom"},codex:{id:"codex",name:"OpenAI Codex CLI / App",image:"/providers/codex.png",color:"#10A37F",description:"OpenAI Codex CLI",configType:"custom"},opencode:{id:"opencode",name:"OpenCode",image:"/providers/opencode.png",color:"#E87040",description:"OpenCode AI Terminal Assistant",configType:"custom"},cowork:{id:"cowork",name:"Claude Cowork",image:"/providers/claude.png",color:"#D97757",description:"Claude Desktop Cowork (third-party inference)",configType:"custom"},hermes:{id:"hermes",name:"Hermes Agent",image:"/providers/hermes.png",color:"#8B5CF6",description:"Nous Research self-improving AI agent",configType:"custom"},droid:{id:"droid",name:"Factory Droid",image:"/providers/droid.png",color:"#00D4FF",description:"Factory Droid AI Assistant",configType:"custom"},cursor:{id:"cursor",name:"Cursor",image:"/providers/cursor.png",color:"#000000",description:"Cursor AI Code Editor",configType:"guide",requiresExternalUrl:!0,notes:[{type:"warning",text:"Requires Cursor Pro account to use this feature."},{type:"cloudCheck",text:"Cursor routes requests through its own server, so local endpoint is not supported. Please enable Tunnel or Cloud Endpoint in Settings."}],guideSteps:[{step:1,title:"Open Settings",desc:"Go to Settings → Models"},{step:2,title:"Enable OpenAI API",desc:'Enable "OpenAI API key" option'},{step:3,title:"Base URL",value:"{{baseUrl}}",copyable:!0},{step:4,title:"API Key",type:"apiKeySelector"},{step:5,title:"Add Custom Model",desc:'Click "View All Model" → "Add Custom Model"'},{step:6,title:"Select Model",type:"modelSelector"}]},cline:{id:"cline",name:"Cline",image:"/providers/cline.png",color:"#00D1B2",description:"Cline AI Coding Assistant",configType:"custom"},kilo:{id:"kilo",name:"Kilo Code",image:"/providers/kilocode.png",color:"#FF6B6B",description:"Kilo Code AI Assistant",configType:"custom"},roo:{id:"roo",name:"Roo",image:"/providers/roo.png",color:"#FF6B6B",description:"Roo AI Assistant",configType:"guide",guideSteps:[{step:1,title:"Open Settings",desc:"Go to Roo Settings panel"},{step:2,title:"Select Provider",desc:"Choose API Provider → Ollama"},{step:3,title:"Base URL",value:"{{baseUrl}}",copyable:!0},{step:4,title:"API Key",type:"apiKeySelector"},{step:5,title:"Select Model",type:"modelSelector"}]},continue:{id:"continue",name:"Continue",image:"/providers/continue.png",color:"#7C3AED",description:"Continue AI Assistant",configType:"guide",guideSteps:[{step:1,title:"Open Config",desc:"Open Continue configuration file"},{step:2,title:"API Key",type:"apiKeySelector"},{step:3,title:"Select Model",type:"modelSelector"},{step:4,title:"Add Model Config",desc:"Add the following configuration to your models array:"}],codeBlock:{language:"json",code:`{
|
|
54
|
+
id = "${K||"cc/claude-opus-4-7"}"`},{filename:"~/.config/jcode/provider-9router.env",content:`JCODE_9ROUTER_API_KEY="${x}"`}])})]})}},61712:(a,b,c)=>{c.d(b,{A:()=>l});var d=c(48249),e=c(67484),f=c(50412),g=c(81220),h=c(52632),i=c(73725),j=c(31407),k=c(78052);function l({tool:a,isExpanded:b,onToggle:c,baseUrl:m,hasActiveProviders:n,apiKeys:o,activeProviders:p,cloudEnabled:q,initialStatus:r,tunnelEnabled:s,tunnelPublicUrl:t,tailscaleEnabled:u,tailscaleUrl:v}){let w,x,y,z,[A,B]=(0,e.useState)(r||null),[C,D]=(0,e.useState)(!1),[E,F]=(0,e.useState)(!1),[G,H]=(0,e.useState)(!1),[I,J]=(0,e.useState)(null),[K,L]=(0,e.useState)(""),[M,N]=(0,e.useState)([]),[O,P]=(0,e.useState)(""),[Q,R]=(0,e.useState)(!1),[S,T]=(0,e.useState)({}),[U,V]=(0,e.useState)(!1),[W,X]=(0,e.useState)(!1),[Y,Z]=(0,e.useState)("");(0,e.useRef)(!1);let $=A?.settings?.customModels?.find(a=>a.id?.startsWith("custom:9Router"))?.baseUrl||"",_=(()=>{if(!A?.installed)return null;let a=A.settings?.customModels?.find(a=>a.id?.startsWith("custom:9Router"));return a?(0,k.Q)(a.baseUrl,{tunnelPublicUrl:t,tailscaleUrl:v,cloudUrl:q?"https://ezrouter.golamrabbi.dev":null})?"configured":"other":"not_configured"})(),aa=async()=>{D(!0);try{let a=await fetch("/api/cli-tools/droid-settings"),b=await a.json();B(b)}catch(a){B({installed:!1,error:a.message})}finally{D(!1)}},ab=()=>{let a=Y||m;return a.endsWith("/v1")?a:`${a}/v1`},ac=()=>{let a=O.trim();!a||M.includes(a)||(N(b=>[...b,a]),P(""))},ad=async()=>{F(!0),J(null);try{let a=K?.trim()||(o?.length>0?o[0].key:null)||(q?null:"sk_ezrouter"),b=await fetch("/api/cli-tools/droid-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:ab(),apiKey:a,models:M,activeModel:M[0]||""})}),c=await b.json();b.ok?((0,i.Xg)(ab(),{tunnelPublicUrl:t,tailscaleUrl:v}),J({type:"success",text:"Settings applied successfully!"}),aa()):J({type:"error",text:c.error||"Failed to apply settings"})}catch(a){J({type:"error",text:a.message})}finally{F(!1)}},ae=async()=>{H(!0),J(null);try{let a=await fetch("/api/cli-tools/droid-settings",{method:"DELETE"}),b=await a.json();a.ok?(J({type:"success",text:"Settings reset successfully!"}),N([]),aa()):J({type:"error",text:b.error||"Failed to reset settings"})}catch(a){J({type:"error",text:a.message})}finally{H(!1)}};return(0,d.jsxs)(f.Zp,{padding:"xs",className:"overflow-hidden",children:[(0,d.jsxs)("div",{className:"flex items-start justify-between gap-3 hover:cursor-pointer sm:items-center",onClick:c,children:[(0,d.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,d.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,d.jsx)(g.default,{src:"/providers/droid.png",alt:a.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:a=>{a.target.style.display="none"},loading:"lazy",decoding:"async"})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[(0,d.jsx)("h3",{className:"font-medium text-sm",children:a.name}),"configured"===_&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-green-500/10 text-green-600 dark:text-green-400 rounded-full",children:"Connected"}),"not_configured"===_&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-yellow-500/10 text-yellow-600 dark:text-yellow-400 rounded-full",children:"Not configured"}),"other"===_&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-blue-500/10 text-blue-600 dark:text-blue-400 rounded-full",children:"Other"})]}),(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:a.description})]})]}),(0,d.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${b?"rotate-180":""}`,children:"expand_more"})]}),b&&(0,d.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[C&&(0,d.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,d.jsx)("span",{children:"Checking Factory Droid CLI..."})]}),!C&&A&&!A.installed&&(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{className:"flex flex-col gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,d.jsxs)("div",{className:"flex items-start gap-3",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,d.jsxs)("div",{className:"flex-1",children:[(0,d.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:"Factory Droid CLI not detected locally"}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"Manual configuration is still available if 9router is deployed on a remote server."})]})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2 pl-9",children:[(0,d.jsxs)(f.$n,{variant:"secondary",size:"sm",onClick:()=>V(!0),className:"!bg-yellow-500/20 !border-yellow-500/40 !text-yellow-700 dark:!text-yellow-300 hover:!bg-yellow-500/30",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:"content_copy"}),"Manual Config"]}),(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:()=>X(!W),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:W?"expand_less":"help"}),W?"Hide":"How to Install"]})]})]}),W&&(0,d.jsxs)("div",{className:"p-4 bg-surface border border-border rounded-lg",children:[(0,d.jsx)("h4",{className:"font-medium mb-3",children:"Installation Guide"}),(0,d.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"text-text-muted mb-1",children:"macOS / Linux / Windows:"}),(0,d.jsx)("code",{className:"block px-3 py-2 bg-black/5 dark:bg-white/5 rounded font-mono text-xs",children:"curl -fsSL https://app.factory.ai/cli | sh"})]}),(0,d.jsxs)("p",{className:"text-text-muted",children:["After installation, run ",(0,d.jsx)("code",{className:"px-1 bg-black/5 dark:bg-white/5 rounded",children:"droid"})," to verify."]})]})]})]}),!C&&A?.installed&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Select Endpoint"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)(h.A,{value:Y||((w=Y||m).endsWith("/v1")?w:`${w}/v1`),onChange:Z,requiresExternalUrl:a.requiresExternalUrl,tunnelEnabled:s,tunnelPublicUrl:t,tailscaleEnabled:u,tailscaleUrl:v,currentUrl:$})]}),A?.settings?.customModels?.find(a=>a.id?.startsWith("custom:9Router"))?.baseUrl&&(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Current"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)("span",{className:"min-w-0 truncate rounded bg-surface/40 px-2 py-2 text-xs text-text-muted sm:py-1.5",children:A.settings.customModels.find(a=>a.id?.startsWith("custom:9Router")).baseUrl})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"API Key"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)(j.A,{value:K,onChange:L,apiKeys:o,cloudEnabled:q})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsxs)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:["Models ",M.length>0&&(0,d.jsxs)("span",{className:"text-primary",children:["(",M.length,")"]})]}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsxs)("div",{className:"flex-1 flex flex-col gap-1",children:[M.length>0&&(0,d.jsx)("div",{className:"flex flex-col gap-0.5 mb-1",children:M.map(a=>(0,d.jsxs)("div",{className:"flex items-center gap-1.5 px-2 py-1 bg-bg-secondary rounded border border-border",children:[(0,d.jsx)("span",{className:"flex-1 text-xs font-mono truncate",children:a}),(0,d.jsx)("button",{onClick:()=>N(b=>b.filter(b=>b!==a)),className:"text-text-muted hover:text-red-500 transition-colors shrink-0",title:"Remove",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"close"})})]},a))}),(0,d.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,d.jsx)("input",{type:"text",value:O,onChange:a=>P(a.target.value),onKeyDown:a=>{"Enter"===a.key&&(a.preventDefault(),ac())},placeholder:"provider/model-id",className:"w-full min-w-0 px-2 py-2 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50 sm:py-1.5"}),(0,d.jsx)("button",{onClick:()=>R(!0),disabled:!n,className:`px-2 py-1.5 rounded border text-xs shrink-0 ${n?"bg-surface border-border hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select"}),(0,d.jsx)("button",{onClick:ac,disabled:!O.trim(),className:"px-2 py-1.5 rounded border bg-surface border-border hover:border-primary text-xs shrink-0 disabled:opacity-50",title:"Add model",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"add"})})]})]})]})]}),I&&(0,d.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===I.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===I.type?"check_circle":"error"}),(0,d.jsx)("span",{children:I.text})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,d.jsxs)(f.$n,{variant:"primary",size:"sm",onClick:ad,disabled:0===M.length,loading:E,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:ae,disabled:!A?.has9Router,loading:G,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,d.jsxs)(f.$n,{variant:"ghost",size:"sm",onClick:()=>V(!0),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]})]})]})]}),Q&&(0,d.jsx)(f.rq,{isOpen:Q,onClose:()=>R(!1),onSelect:a=>{!a.value||M.includes(a.value)||(N(b=>[...b,a.value]),R(!1))},selectedModel:null,activeProviders:p,modelAliases:S,title:"Select Model for Factory Droid"}),(0,d.jsx)(f.uR,{isOpen:U,onClose:()=>V(!1),title:"Factory Droid - Manual Configuration",configs:(x=K&&K.trim()?K:q?"<API_KEY_FROM_DASHBOARD>":"sk_ezrouter",y={customModels:M.map((a,b)=>({model:a,id:`custom:9Router-${b}`,index:b,baseUrl:ab(),apiKey:x,displayName:a,maxOutputTokens:131072,noImageSupport:!1,provider:"openai"}))},z="u">typeof navigator&&navigator.platform,[{filename:z?.toLowerCase().includes("win")?"%USERPROFILE%\\.factory\\settings.json":"~/.factory/settings.json",content:JSON.stringify(y,null,2)}])})]})}},61935:(a,b,c)=>{c.d(b,{A:()=>p});var d=c(48249),e=c(81220),f=c(67484),g=c(50412),h=c(31407),i=c(52632),j=c(78052);function k({tool:a,configStatus:b,isExpanded:c,onToggle:f}){return(0,d.jsxs)("div",{className:"flex items-start justify-between gap-3 hover:cursor-pointer sm:items-center",onClick:f,children:[(0,d.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,d.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,d.jsx)(e.default,{src:a.image||"/providers/pi.svg",alt:a.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:a=>{a.target.style.display="none"},loading:"lazy",decoding:"async"})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[(0,d.jsx)("h3",{className:"font-medium text-sm",children:a.name}),"configured"===b&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-green-500/10 text-green-600 dark:text-green-400 rounded-full",children:"Connected"}),"not_configured"===b&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-yellow-500/10 text-yellow-600 dark:text-yellow-400 rounded-full",children:"Not configured"}),"other"===b&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-blue-500/10 text-blue-600 dark:text-blue-400 rounded-full",children:"Other"})]}),(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:a.description})]})]}),(0,d.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${c?"rotate-180":""}`,children:"expand_more"})]})}function l({setShowManualConfigModal:a,showInstallGuide:b,setShowInstallGuide:c}){return(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{className:"flex flex-col gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,d.jsxs)("div",{className:"flex items-start gap-3",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,d.jsxs)("div",{className:"flex-1",children:[(0,d.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:"Pi CLI not detected locally"}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"Manual configuration is still available if 9router is deployed on a remote server."})]})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2 pl-9",children:[(0,d.jsxs)(g.$n,{variant:"secondary",size:"sm",onClick:()=>a(!0),className:"!bg-yellow-500/20 !border-yellow-500/40 !text-yellow-700 dark:!text-yellow-300 hover:!bg-yellow-500/30",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:"content_copy"}),"Manual Config"]}),(0,d.jsxs)(g.$n,{variant:"outline",size:"sm",onClick:()=>c(!b),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:b?"expand_less":"help"}),b?"Hide":"How to Install"]})]})]}),b&&(0,d.jsxs)("div",{className:"p-4 bg-surface border border-border rounded-lg",children:[(0,d.jsx)("h4",{className:"font-medium mb-3",children:"Installation Guide"}),(0,d.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"text-text-muted mb-1",children:"macOS / Linux:"}),(0,d.jsx)("code",{className:"block px-3 py-2 bg-black/5 dark:bg-white/5 rounded font-mono text-xs",children:"npm install -g @earendil-works/pi-coding-agent"})]}),(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"text-text-muted mb-1",children:"Alternative (curl):"}),(0,d.jsx)("code",{className:"block px-3 py-2 bg-black/5 dark:bg-white/5 rounded font-mono text-xs",children:"curl -fsSL https://pi.dev/install.sh | sh"})]}),(0,d.jsxs)("p",{className:"text-text-muted",children:["After installation, run"," ",(0,d.jsx)("code",{className:"px-1 bg-black/5 dark:bg-white/5 rounded",children:"pi"})," ","to verify."]})]})]})]})}function m({status:a,customBaseUrl:b,setCustomBaseUrl:c,getDisplayUrl:e,tool:f,tunnelEnabled:g,tunnelPublicUrl:j,tailscaleEnabled:k,tailscaleUrl:l,selectedApiKey:n,setSelectedApiKey:o,apiKeys:p,cloudEnabled:q,selectedModels:r,setSelectedModels:s,activeProviders:t,setModalOpen:u,checkStatus:v}){let w=async a=>{try{(await fetch(`/api/cli-tools/pi-settings?model=${encodeURIComponent(a)}`,{method:"DELETE"})).ok&&(s(b=>b.filter(b=>b!==a)),v())}catch(a){console.log("Error removing model:",a)}};return(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Select Endpoint"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)(i.A,{value:b||e(),onChange:c,requiresExternalUrl:f.requiresExternalUrl,tunnelEnabled:g,tunnelPublicUrl:j,tailscaleEnabled:k,tailscaleUrl:l})]}),a?.config?.providers?.["9router"]?.baseUrl&&(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Current"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)("span",{className:"min-w-0 truncate rounded bg-surface/40 px-2 py-2 text-xs text-text-muted sm:py-1.5",children:a.config.providers["9router"].baseUrl})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"API Key"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)(h.A,{value:n,onChange:o,apiKeys:p,cloudEnabled:q})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr] sm:items-start sm:gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right pt-1",children:"Models"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px] mt-1.5",children:"arrow_forward"}),(0,d.jsxs)("div",{className:"flex-1 flex flex-col gap-2",children:[(0,d.jsx)("div",{className:"flex flex-wrap gap-1.5 min-h-[28px] px-2 py-1.5 bg-surface rounded border border-border",children:0===r.length?(0,d.jsx)("span",{className:"text-xs text-text-muted",children:"No models selected"}):r.map(a=>(0,d.jsxs)("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs bg-black/5 dark:bg-white/5 text-text-muted border border-transparent",children:[a,(0,d.jsx)("button",{onClick:()=>w(a),className:"ml-0.5 hover:text-red-500",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"close"})})]},a))}),(0,d.jsx)("button",{onClick:()=>u(!0),disabled:!t?.length,className:`w-fit px-2 py-1 rounded border text-xs transition-colors ${t?.length?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Add Model"})]})]})]})}function n({message:a}){return a?(0,d.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===a.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===a.type?"check_circle":"error"}),(0,d.jsx)("span",{children:a.text})]}):null}function o({handleApply:a,selectedModels:b,applying:c,handleReset:e,status:f,restoring:h,setShowManualConfigModal:i}){return(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,d.jsxs)(g.$n,{variant:"primary",size:"sm",onClick:a,disabled:0===b.length,loading:c,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,d.jsxs)(g.$n,{variant:"outline",size:"sm",onClick:e,disabled:!f.has9Router,loading:h,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,d.jsxs)(g.$n,{variant:"ghost",size:"sm",onClick:()=>i(!0),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]})]})}function p({tool:a,isExpanded:b,onToggle:c,baseUrl:e,apiKeys:h,activeProviders:i,cloudEnabled:q,initialStatus:r,tunnelEnabled:s,tunnelPublicUrl:t,tailscaleEnabled:u,tailscaleUrl:v}){let w,x,[y,z]=(0,f.useState)(r||null),[A,B]=(0,f.useState)(!1),[C,D]=(0,f.useState)(!1),[E,F]=(0,f.useState)(!1),[G,H]=(0,f.useState)(null),[I,J]=(0,f.useState)(!1),[K,L]=(0,f.useState)(""),[M,N]=(0,f.useState)(!1),[O,P]=(0,f.useState)(!1),[Q,R]=(0,f.useState)(""),[S,T]=(0,f.useState)([]);(0,f.useRef)([]);let U=function(){let[a,b]=(0,f.useState)({});return a}(),V=(()=>{if(!y?.installed)return null;if(!y.config||!y.has9Router)return"not_configured";let a=y.config?.providers?.["9router"]?.baseUrl||"";return(0,j.Q)(a,{tunnelPublicUrl:t,tailscaleUrl:v})?"configured":"other"})(),W=()=>{let a=Q||e;return a.endsWith("/v1")?a:`${a}/v1`},X=async()=>{B(!0);try{let a=await fetch("/api/cli-tools/pi-settings"),b=await a.json();z(b)}catch(a){z({installed:!1,error:a.message})}finally{B(!1)}},Y=async()=>{D(!0),H(null);try{let a=K&&K.trim()||q?K:"sk_ezrouter",b=await fetch("/api/cli-tools/pi-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:W(),apiKey:a,models:S})}),c=await b.json();b.ok?(H({type:"success",text:"Settings applied successfully!"}),X()):H({type:"error",text:c.error||"Failed to apply settings"})}catch(a){H({type:"error",text:a.message})}finally{D(!1)}},Z=async()=>{F(!0),H(null);try{let a=await fetch("/api/cli-tools/pi-settings",{method:"DELETE"}),b=await a.json();a.ok?(H({type:"success",text:"Settings reset successfully!"}),T([]),X()):H({type:"error",text:b.error||"Failed to reset settings"})}catch(a){H({type:"error",text:a.message})}finally{F(!1)}};return(0,d.jsxs)(g.Zp,{padding:"xs",className:"overflow-hidden",children:[(0,d.jsx)(k,{tool:a,configStatus:V,isExpanded:b,onToggle:c}),b&&(0,d.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[A&&(0,d.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,d.jsx)("span",{children:"Checking Pi CLI..."})]}),!A&&y&&!y.installed&&(0,d.jsx)(l,{showManualConfigModal:O,setShowManualConfigModal:P,showInstallGuide:I,setShowInstallGuide:J}),!A&&y?.installed&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(m,{status:y,customBaseUrl:Q,setCustomBaseUrl:R,getDisplayUrl:()=>Q||`${e}/v1`,getEffectiveBaseUrl:W,tool:a,tunnelEnabled:s,tunnelPublicUrl:t,tailscaleEnabled:u,tailscaleUrl:v,selectedApiKey:K,setSelectedApiKey:L,apiKeys:h,cloudEnabled:q,selectedModels:S,setSelectedModels:T,activeProviders:i,setModalOpen:N,checkStatus:X}),(0,d.jsx)(n,{message:G}),(0,d.jsx)(o,{handleApply:Y,selectedModels:S,applying:C,handleReset:Z,status:y,restoring:E,setShowManualConfigModal:P})]})]}),M&&(0,d.jsx)(g.rq,{isOpen:M,onClose:()=>N(!1),onSelect:a=>{S.includes(a.value)||T([...S,a.value])},onDeselect:a=>{T(b=>b.filter(b=>b!==a.value))},selectedModel:null,activeProviders:i,modelAliases:U,addedModelValues:S,closeOnSelect:!1,title:"Add Model for Pi"}),(0,d.jsx)(g.uR,{isOpen:O,onClose:()=>P(!1),title:"Pi - Manual Configuration",configs:(w=K&&K.trim()?K:q?"<API_KEY_FROM_DASHBOARD>":"sk_ezrouter",x=S.length>0?S:["provider/model-id"],[{filename:"~/.pi/agent/models.json",content:JSON.stringify({providers:{"9router":{baseUrl:W(),api:"openai-completions",apiKey:w,models:x.map(a=>({id:a,input:["text","image"]}))}}},null,2)}])})]})}},62911:(a,b,c)=>{c.d(b,{dM:()=>e,wn:()=>d});let d={antigravity:{id:"antigravity",name:"Antigravity",image:"/providers/antigravity.png",color:"#4285F4",description:"Google Antigravity IDE with MITM",configType:"mitm",mitmDomain:"daily-cloudcode-pa.googleapis.com",modelAliases:["gemini-3.8-flash-high","gemini-3.8-flash-medium","gemini-3.8-flash-low","gemini-3.7-flash-high","gemini-3.7-flash-medium","gemini-3.7-flash-low","gemini-3.7-flash","gemini-3.6-flash-high","gemini-3.6-flash-medium","gemini-3.6-flash-low","gemini-3-flash-agent","gemini-3.1-pro-low","gemini-pro-agent","claude-sonnet-4-6","claude-opus-4-6-thinking","gpt-oss-120b-medium","gemini-3-flash"],defaultModels:[{id:"gemini-3.8-flash-high",name:"Gemini 3.8 Flash (High)",alias:"gemini-3.8-flash-high"},{id:"gemini-3.8-flash-medium",name:"Gemini 3.8 Flash (Medium)",alias:"gemini-3.8-flash-medium"},{id:"gemini-3.8-flash-low",name:"Gemini 3.8 Flash (Low)",alias:"gemini-3.8-flash-low"},{id:"gemini-3.7-flash-high",name:"Gemini 3.7 Flash (High)",alias:"gemini-3.7-flash-high"},{id:"gemini-3.7-flash-medium",name:"Gemini 3.7 Flash (Medium)",alias:"gemini-3.7-flash-medium"},{id:"gemini-3.7-flash-low",name:"Gemini 3.7 Flash (Low)",alias:"gemini-3.7-flash-low"},{id:"gemini-3.7-flash",name:"Gemini 3.7 Flash",alias:"gemini-3.7-flash",mandatory:!0},{id:"gemini-3.6-flash-high",name:"Gemini 3.6 Flash (High)",alias:"gemini-3.6-flash-high"},{id:"gemini-3.6-flash-medium",name:"Gemini 3.6 Flash (Medium)",alias:"gemini-3.6-flash-medium"},{id:"gemini-3.6-flash-low",name:"Gemini 3.6 Flash (Low)",alias:"gemini-3.6-flash-low"},{id:"gemini-3-flash-agent",name:"Gemini 3.5 Flash (High)",alias:"gemini-3-flash-agent"},{id:"gemini-3.1-pro-low",name:"Gemini 3.1 Pro (Low)",alias:"gemini-3.1-pro-low"},{id:"gemini-pro-agent",name:"Gemini 3.1 Pro (High)",alias:"gemini-pro-agent"},{id:"claude-sonnet-4-6",name:"Claude Sonnet 4.6 (Thinking)",alias:"claude-sonnet-4-6"},{id:"claude-opus-4-6-thinking",name:"Claude Opus 4.6 (Thinking)",alias:"claude-opus-4-6-thinking"},{id:"gpt-oss-120b-medium",name:"GPT-OSS 120B (Medium)",alias:"gpt-oss-120b-medium"},{id:"gemini-3-flash",name:"Gemini 3 Flash (Command)",alias:"gemini-3-flash"}]},copilot:{id:"copilot",name:"GitHub Copilot",image:"/providers/copilot.png",color:"#1F6FEB",description:"GitHub Copilot IDE with MITM",configType:"mitm",mitmDomain:"api.individual.githubcopilot.com",modelAliases:["gpt-5-mini","gpt-5.4-nano","claude-haiku-4.5","gpt-4o","gpt-4.1"],defaultModels:[{id:"gpt-5-mini",name:"GPT-5 mini",alias:"gpt-5-mini"},{id:"gpt-5.4-nano",name:"GPT-5.4 nano",alias:"gpt-5.4-nano"},{id:"claude-haiku-4.5",name:"Claude Haiku 4.5",alias:"claude-haiku-4.5"},{id:"gpt-4o",name:"GPT-4o",alias:"gpt-4o"},{id:"gpt-4.1",name:"GPT-4.1",alias:"gpt-4.1"}]},kiro:{id:"kiro",name:"Kiro",image:"/providers/kiro.png",color:"#FF6B00",description:"Kiro IDE with MITM",configType:"mitm",mitmDomain:"runtime.us-east-1.kiro.dev",defaultModels:[{id:"auto",name:"Auto (Kiro Agent)",alias:"auto"},{id:"claude-sonnet-5",name:"Claude Sonnet 5",alias:"claude-sonnet-5"},{id:"claude-sonnet-4.5",name:"Claude Sonnet 4.5",alias:"claude-sonnet-4.5"},{id:"claude-sonnet-4",name:"Claude Sonnet 4",alias:"claude-sonnet-4"},{id:"claude-haiku-4.5",name:"Claude Haiku 4.5",alias:"claude-haiku-4.5"},{id:"deepseek-3.2",name:"DeepSeek 3.2",alias:"deepseek-3.2"},{id:"minimax-m2.1",name:"MiniMax M2.1",alias:"minimax-m2.1"},{id:"gpt-5.6-sol",name:"GPT 5.6 Sol",alias:"gpt-5.6-sol",contextLength:272e3,rateMultiplier:2.4},{id:"gpt-5.6-terra",name:"GPT 5.6 Terra",alias:"gpt-5.6-terra",contextLength:272e3,rateMultiplier:1.2},{id:"gpt-5.6-luna",name:"GPT 5.6 Luna",alias:"gpt-5.6-luna",contextLength:272e3,rateMultiplier:.6},{id:"simple-task",name:"Qwen3 Coder Next",alias:"simple-task"}]}},e={claude:{id:"claude",name:"Claude Code",image:"/providers/claude.png",color:"#D97757",description:"Anthropic Claude Code CLI",configType:"env",envVars:{baseUrl:"ANTHROPIC_BASE_URL",model:"ANTHROPIC_MODEL",opusModel:"ANTHROPIC_DEFAULT_OPUS_MODEL",sonnetModel:"ANTHROPIC_DEFAULT_SONNET_MODEL",fableModel:"ANTHROPIC_DEFAULT_FABLE_MODEL",haikuModel:"ANTHROPIC_DEFAULT_HAIKU_MODEL"},modelAliases:["default","sonnet","opus","fable","haiku","opusplan"],settingsFile:"~/.claude/settings.json",defaultModels:[{id:"fable",name:"Claude Fable",alias:"fable",envKey:"ANTHROPIC_DEFAULT_FABLE_MODEL",defaultValue:"cc/claude-fable-5"},{id:"opus",name:"Claude Opus",alias:"opus",envKey:"ANTHROPIC_DEFAULT_OPUS_MODEL",defaultValue:"cc/claude-opus-4-8"},{id:"sonnet",name:"Claude Sonnet",alias:"sonnet",envKey:"ANTHROPIC_DEFAULT_SONNET_MODEL",defaultValue:"cc/claude-sonnet-5"},{id:"haiku",name:"Claude Haiku",alias:"haiku",envKey:"ANTHROPIC_DEFAULT_HAIKU_MODEL",defaultValue:"cc/claude-haiku-4-5-20251001"}]},openclaw:{id:"openclaw",name:"Open Claw",image:"/providers/openclaw.png",color:"#FF6B35",description:"Open Claw AI Assistant",configType:"custom"},codex:{id:"codex",name:"OpenAI Codex CLI / App",image:"/providers/codex.png",color:"#10A37F",description:"OpenAI Codex CLI",configType:"custom"},opencode:{id:"opencode",name:"OpenCode",image:"/providers/opencode.png",color:"#E87040",description:"OpenCode AI Terminal Assistant",configType:"custom"},cowork:{id:"cowork",name:"Claude Cowork",image:"/providers/claude.png",color:"#D97757",description:"Claude Desktop Cowork (third-party inference)",configType:"custom"},hermes:{id:"hermes",name:"Hermes Agent",image:"/providers/hermes.png",color:"#8B5CF6",description:"Nous Research self-improving AI agent",configType:"custom"},droid:{id:"droid",name:"Factory Droid",image:"/providers/droid.png",color:"#00D4FF",description:"Factory Droid AI Assistant",configType:"custom"},cursor:{id:"cursor",name:"Cursor",image:"/providers/cursor.png",color:"#000000",description:"Cursor AI Code Editor",configType:"guide",requiresExternalUrl:!0,notes:[{type:"warning",text:"Requires Cursor Pro account to use this feature."},{type:"cloudCheck",text:"Cursor routes requests through its own server, so local endpoint is not supported. Please enable Tunnel or Cloud Endpoint in Settings."}],guideSteps:[{step:1,title:"Open Settings",desc:"Go to Settings → Models"},{step:2,title:"Enable OpenAI API",desc:'Enable "OpenAI API key" option'},{step:3,title:"Base URL",value:"{{baseUrl}}",copyable:!0},{step:4,title:"API Key",type:"apiKeySelector"},{step:5,title:"Add Custom Model",desc:'Click "View All Model" → "Add Custom Model"'},{step:6,title:"Select Model",type:"modelSelector"}]},cline:{id:"cline",name:"Cline",image:"/providers/cline.png",color:"#5B9BD5",description:"Cline AI Coding Assistant",configType:"custom"},kilo:{id:"kilo",name:"Kilo Code",image:"/providers/kilocode.png",color:"#FF6B6B",description:"Kilo Code AI Assistant",configType:"custom"},roo:{id:"roo",name:"Roo",image:"/providers/roo.png",color:"#FF6B6B",description:"Roo AI Assistant",configType:"guide",guideSteps:[{step:1,title:"Open Settings",desc:"Go to Roo Settings panel"},{step:2,title:"Select Provider",desc:"Choose API Provider → Ollama"},{step:3,title:"Base URL",value:"{{baseUrl}}",copyable:!0},{step:4,title:"API Key",type:"apiKeySelector"},{step:5,title:"Select Model",type:"modelSelector"}]},continue:{id:"continue",name:"Continue",image:"/providers/continue.png",color:"#7C3AED",description:"Continue AI Assistant",configType:"guide",guideSteps:[{step:1,title:"Open Config",desc:"Open Continue configuration file"},{step:2,title:"API Key",type:"apiKeySelector"},{step:3,title:"Select Model",type:"modelSelector"},{step:4,title:"Add Model Config",desc:"Add the following configuration to your models array:"}],codeBlock:{language:"json",code:`{
|
|
55
55
|
"apiBase": "{{baseUrl}}",
|
|
56
56
|
"title": "{{model}}",
|
|
57
57
|
"model": "{{model}}",
|
|
@@ -77,7 +77,7 @@ amp --model "{{model}}"
|
|
|
77
77
|
base_url = "${X()}"
|
|
78
78
|
api_key = "${x}"
|
|
79
79
|
model = "${K||"provider/model-id"}"
|
|
80
|
-
`}])})]})}},69947:(a,b,c)=>{c.d(b,{A:()=>l});var d=c(48249),e=c(67484),f=c(50412),g=c(81220),h=c(52632),i=c(73725),j=c(31407),k=c(78052);function l({tool:a,isExpanded:b,onToggle:c,baseUrl:m,hasActiveProviders:n,apiKeys:o,activeProviders:p,cloudEnabled:q,initialStatus:r,tunnelEnabled:s,tunnelPublicUrl:t,tailscaleEnabled:u,tailscaleUrl:v}){let w,x,[y,z]=(0,e.useState)(r||null),[A,B]=(0,e.useState)(!1),[C,D]=(0,e.useState)(!1),[E,F]=(0,e.useState)(!1),[G,H]=(0,e.useState)(null),[I,J]=(0,e.useState)(""),[K,L]=(0,e.useState)(""),[M,N]=(0,e.useState)({}),[O,P]=(0,e.useState)(null),[Q,R]=(0,e.useState)(!1),[S,T]=(0,e.useState)({}),[U,V]=(0,e.useState)(!1),[W,X]=(0,e.useState)("");(0,e.useRef)(!1);let Y=y?.settings?.models?.providers?.["9router"]?.baseUrl||"",Z=(()=>{if(!y?.installed)return null;let a=y.settings?.models?.providers?.["9router"];return a?(0,k.Q)(a.baseUrl,{tunnelPublicUrl:t,tailscaleUrl:v})?"configured":"other":"not_configured"})(),$=async()=>{B(!0);try{let a=await fetch("/api/cli-tools/openclaw-settings"),b=await a.json();z(b)}catch(a){z({installed:!1,error:a.message})}finally{B(!1)}},_=()=>{let a=W||"http://127.0.0.1:20126";return a.endsWith("/v1")?a:`${a}/v1`},aa=async()=>{D(!0),H(null);try{let a=I?.trim()||(o?.length>0?o[0].key:null)||(q?null:"sk_ezrouter"),b=await fetch("/api/cli-tools/openclaw-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:_(),apiKey:a,model:K,agentModels:M})}),c=await b.json();b.ok?((0,i.Xg)(_(),{tunnelPublicUrl:t,tailscaleUrl:v}),H({type:"success",text:"Settings applied successfully!"}),$()):H({type:"error",text:c.error||"Failed to apply settings"})}catch(a){H({type:"error",text:a.message})}finally{D(!1)}},ab=async()=>{F(!0),H(null);try{let a=await fetch("/api/cli-tools/openclaw-settings",{method:"DELETE"}),b=await a.json();a.ok?(H({type:"success",text:"Settings reset successfully!"}),L(""),J(""),$()):H({type:"error",text:b.error||"Failed to reset settings"})}catch(a){H({type:"error",text:a.message})}finally{F(!1)}};return(0,d.jsxs)(f.Zp,{padding:"xs",className:"overflow-hidden",children:[(0,d.jsxs)("div",{className:"flex items-start justify-between gap-3 hover:cursor-pointer sm:items-center",onClick:c,children:[(0,d.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,d.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,d.jsx)(g.default,{src:"/providers/openclaw.png",alt:a.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:a=>{a.target.style.display="none"},loading:"lazy",decoding:"async"})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[(0,d.jsx)("h3",{className:"font-medium text-sm",children:a.name}),"configured"===Z&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-green-500/10 text-green-600 dark:text-green-400 rounded-full",children:"Connected"}),"not_configured"===Z&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-yellow-500/10 text-yellow-600 dark:text-yellow-400 rounded-full",children:"Not configured"}),"other"===Z&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-blue-500/10 text-blue-600 dark:text-blue-400 rounded-full",children:"Other"})]}),(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:a.description})]})]}),(0,d.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${b?"rotate-180":""}`,children:"expand_more"})]}),b&&(0,d.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[A&&(0,d.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,d.jsx)("span",{children:"Checking Open Claw CLI..."})]}),!A&&y&&!y.installed&&(0,d.jsx)("div",{className:"flex flex-col gap-4",children:(0,d.jsxs)("div",{className:"flex flex-col gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,d.jsxs)("div",{className:"flex items-start gap-3",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,d.jsxs)("div",{className:"flex-1",children:[(0,d.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:"Open Claw CLI not detected locally"}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"Manual configuration is still available if 9router is deployed on a remote server."})]})]}),(0,d.jsx)("div",{className:"flex items-center gap-2 pl-9",children:(0,d.jsxs)(f.$n,{variant:"secondary",size:"sm",onClick:()=>V(!0),className:"!bg-yellow-500/20 !border-yellow-500/40 !text-yellow-700 dark:!text-yellow-300 hover:!bg-yellow-500/30",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:"content_copy"}),"Manual Config"]})})]})}),!A&&y?.installed&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Select Endpoint"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)(h.A,{value:W||((w=W||"http://127.0.0.1:20126").endsWith("/v1")?w:`${w}/v1`),onChange:X,requiresExternalUrl:a.requiresExternalUrl,tunnelEnabled:s,tunnelPublicUrl:t,tailscaleEnabled:u,tailscaleUrl:v,currentUrl:Y})]}),y?.settings?.models?.providers?.["9router"]?.baseUrl&&(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Current"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)("span",{className:"min-w-0 truncate rounded bg-surface/40 px-2 py-2 text-xs text-text-muted sm:py-1.5",children:y.settings.models.providers["9router"].baseUrl})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"API Key"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)(j.A,{value:I,onChange:J,apiKeys:o,cloudEnabled:q})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Default Model"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsxs)("div",{className:"relative w-full min-w-0",children:[(0,d.jsx)("input",{type:"text",value:K,onChange:a=>L(a.target.value),placeholder:"provider/model-id",className:"w-full min-w-0 pl-2 pr-7 py-2 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50 sm:py-1.5"}),K&&(0,d.jsx)("button",{onClick:()=>L(""),className:"absolute right-1 top-1/2 -translate-y-1/2 p-0.5 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]}),(0,d.jsx)("button",{onClick:()=>{P(null),R(!0)},disabled:!n,className:`w-full sm:w-auto rounded border px-2 py-2 text-xs transition-colors sm:py-1.5 whitespace-nowrap sm:shrink-0 ${n?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select"})]}),(y.agents||[]).filter(a=>a.agentDir).map(a=>(0,d.jsxs)("div",{className:"flex items-center gap-2 pl-4",children:[(0,d.jsxs)("span",{className:"w-32 shrink-0 text-xs text-primary text-right truncate",title:a.name||a.id,children:["Agent ",a.name||a.id]}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsxs)("div",{className:"relative w-full min-w-0",children:[(0,d.jsx)("input",{type:"text",value:M[a.id]||"",onChange:b=>N(c=>({...c,[a.id]:b.target.value})),placeholder:`default (${K||"provider/model-id"})`,className:"w-full min-w-0 pl-2 pr-7 py-2 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50 sm:py-1.5"}),M[a.id]&&(0,d.jsx)("button",{onClick:()=>N(b=>({...b,[a.id]:""})),className:"absolute right-1 top-1/2 -translate-y-1/2 p-0.5 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]}),(0,d.jsx)("button",{onClick:()=>{P(a.id),R(!0)},disabled:!n,className:`w-full sm:w-auto rounded border px-2 py-2 text-xs transition-colors sm:py-1.5 whitespace-nowrap sm:shrink-0 ${n?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select"})]},a.id))]}),G&&(0,d.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===G.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===G.type?"check_circle":"error"}),(0,d.jsx)("span",{children:G.text})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,d.jsxs)(f.$n,{variant:"primary",size:"sm",onClick:aa,disabled:!K,loading:C,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:ab,disabled:!y?.has9Router,loading:E,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,d.jsxs)(f.$n,{variant:"ghost",size:"sm",onClick:()=>V(!0),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]})]})]})]}),Q&&(0,d.jsx)(f.rq,{isOpen:Q,onClose:()=>R(!1),onSelect:a=>{O?(N(b=>({...b,[O]:a.value})),P(null)):L(a.value),R(!1)},selectedModel:K,activeProviders:p,modelAliases:S,title:"Select Model for Open Claw"}),(0,d.jsx)(f.uR,{isOpen:U,onClose:()=>V(!1),title:"Open Claw - Manual Configuration",configs:(x=I&&I.trim()?I:q?"<API_KEY_FROM_DASHBOARD>":"sk_ezrouter",[{filename:"~/.openclaw/openclaw.json",content:JSON.stringify({agents:{defaults:{model:{primary:`9router/${K||"provider/model-id"}`}}},models:{providers:{"9router":{baseUrl:_(),apiKey:x,api:"openai-completions",models:[{id:K||"provider/model-id",name:(K||"provider/model-id").split("/").pop()}]}}}},null,2)}])})]})}},73725:(a,b,c)=>{c.d(b,{BC:()=>l,Cz:()=>n,GR:()=>f,S2:()=>m,XE:()=>i,Xg:()=>q,Xh:()=>k,hK:()=>j,i5:()=>o,uZ:()=>p});var d=c(12020);function e({storageKey:a,changeEvent:b,itemField:c,normalize:d=a=>a,defaultName:f=a=>a}){let g=()=>[],h=a=>{};return{read:g,subscribe:a=>()=>{},upsert:(a,b)=>{let e=d(a);if(!e)return null;let i=g(),j=i.find(a=>d(a[c])===e);if(j&&!b)return j.name;let k=(b||f(e)).trim();return k?(h([...i.filter(a=>a.name!==k&&d(a[c])!==e),{name:k,[c]:e}].sort((a,b)=>a.name.localeCompare(b.name))),k):null},remove:a=>h(g().filter(b=>b.name!==a))}}let f=a=>(a||"").replace(/\/+$/,""),g=e({storageKey:"9router.cliToolEndpointPresets",changeEvent:"9router:endpoint-presets-changed",itemField:"baseUrl",normalize:f,defaultName:a=>{try{return new URL(a).host}catch{return a}}}),h=e({storageKey:"9router.cliToolApiKeyPresets",changeEvent:"9router:api-key-presets-changed",itemField:"key"}),i=g.read,j=g.subscribe,k=g.upsert,l=g.remove,m=h.read,n=h.subscribe,o=h.upsert,p=h.remove;function q(a,{tunnelPublicUrl:b,tailscaleUrl:c,cloudUrl:e}={}){let g=f(a);return!g||[`http://127.0.0.1:${d.h0.appPort}`,b,c,e].filter(Boolean).flatMap(a=>[f(a),`${f(a)}/v1`]).includes(g)?null:k(g)}},76289:(a,b,c)=>{c.d(b,{A:()=>l});var d=c(48249),e=c(67484),f=c(50412),g=c(81220),h=c(52632),i=c(73725),j=c(31407),k=c(78052);function l({tool:a,isExpanded:b,onToggle:c,baseUrl:m,apiKeys:n,activeProviders:o,cloudEnabled:p,initialStatus:q,tunnelEnabled:r,tunnelPublicUrl:s,tailscaleEnabled:t,tailscaleUrl:u}){let v,w,[x,y]=(0,e.useState)(q||null),[z,A]=(0,e.useState)(!1),[B,C]=(0,e.useState)(!1),[D,E]=(0,e.useState)(!1),[F,G]=(0,e.useState)(null),[H,I]=(0,e.useState)(!1),[J,K]=(0,e.useState)(""),[L,M]=(0,e.useState)(""),[N,O]=(0,e.useState)(!1),[P,Q]=(0,e.useState)({}),[R,S]=(0,e.useState)(!1),[T,U]=(0,e.useState)(""),V=x?.settings?.openAiBaseUrl||"",W=(()=>{if(!x?.installed)return null;if(!x.has9Router)return"not_configured";let a=x.settings?.openAiBaseUrl||"";return(0,k.Q)(a,{tunnelPublicUrl:s,tailscaleUrl:u})?"configured":"other"})(),X=()=>{let a=T||`${m}/v1`;return a.endsWith("/v1")?a:`${a}/v1`},Y=async()=>{A(!0);try{let a=await fetch("/api/cli-tools/cline-settings"),b=await a.json();y(b)}catch(a){y({installed:!1,error:a.message})}finally{A(!1)}},Z=async()=>{C(!0),G(null);try{let a=J&&J.trim()||p?J:"sk_ezrouter",b=await fetch("/api/cli-tools/cline-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:X(),apiKey:a,model:L})}),c=await b.json();b.ok?((0,i.Xg)(X(),{tunnelPublicUrl:s,tailscaleUrl:u}),G({type:"success",text:"Settings applied successfully!"}),Y()):G({type:"error",text:c.error||"Failed to apply settings"})}catch(a){G({type:"error",text:a.message})}finally{C(!1)}},$=async()=>{E(!0),G(null);try{let a=await fetch("/api/cli-tools/cline-settings",{method:"DELETE"}),b=await a.json();a.ok?(G({type:"success",text:"Settings reset successfully!"}),M(""),Y()):G({type:"error",text:b.error||"Failed to reset settings"})}catch(a){G({type:"error",text:a.message})}finally{E(!1)}};return(0,d.jsxs)(f.Zp,{padding:"xs",className:"overflow-hidden",children:[(0,d.jsxs)("div",{className:"flex items-start justify-between gap-3 hover:cursor-pointer sm:items-center",onClick:c,children:[(0,d.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,d.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,d.jsx)(g.default,{src:"/providers/cline.png",alt:a.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:a=>{a.target.style.display="none"},loading:"lazy",decoding:"async"})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[(0,d.jsx)("h3",{className:"font-medium text-sm",children:a.name}),"configured"===W&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-green-500/10 text-green-600 dark:text-green-400 rounded-full",children:"Connected"}),"not_configured"===W&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-yellow-500/10 text-yellow-600 dark:text-yellow-400 rounded-full",children:"Not configured"}),"other"===W&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-blue-500/10 text-blue-600 dark:text-blue-400 rounded-full",children:"Other"})]}),(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:a.description})]})]}),(0,d.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${b?"rotate-180":""}`,children:"expand_more"})]}),b&&(0,d.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[z&&(0,d.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,d.jsx)("span",{children:"Checking Cline..."})]}),!z&&x&&!x.installed&&(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{className:"flex flex-col gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,d.jsxs)("div",{className:"flex items-start gap-3",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,d.jsxs)("div",{className:"flex-1",children:[(0,d.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:"Cline not detected locally"}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"Manual configuration is still available if 9router is deployed on a remote server."})]})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2 pl-9",children:[(0,d.jsxs)(f.$n,{variant:"secondary",size:"sm",onClick:()=>S(!0),className:"!bg-yellow-500/20 !border-yellow-500/40 !text-yellow-700 dark:!text-yellow-300 hover:!bg-yellow-500/30",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:"content_copy"}),"Manual Config"]}),(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:()=>I(!H),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:H?"expand_less":"help"}),H?"Hide":"How to Install"]})]})]}),H&&(0,d.jsxs)("div",{className:"p-4 bg-surface border border-border rounded-lg",children:[(0,d.jsx)("h4",{className:"font-medium mb-3",children:"Installation Guide"}),(0,d.jsx)("div",{className:"space-y-3 text-sm",children:(0,d.jsxs)("p",{className:"text-text-muted",children:["Install Cline VS Code extension or CLI from ",(0,d.jsx)("a",{className:"text-primary underline",href:"https://docs.cline.bot/",target:"_blank",rel:"noreferrer",children:"docs.cline.bot"}),"."]})})]})]}),!z&&x?.installed&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Select Endpoint"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)(h.A,{value:T||T||`${m}/v1`,onChange:U,requiresExternalUrl:a.requiresExternalUrl,tunnelEnabled:r,tunnelPublicUrl:s,tailscaleEnabled:t,tailscaleUrl:u,currentUrl:V})]}),x?.settings?.openAiBaseUrl&&(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Current"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)("span",{className:"min-w-0 truncate rounded bg-surface/40 px-2 py-2 text-xs text-text-muted sm:py-1.5",children:x.settings.openAiBaseUrl})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"API Key"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)(j.A,{value:J,onChange:K,apiKeys:n,cloudEnabled:p})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Model"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsxs)("div",{className:"relative w-full min-w-0",children:[(0,d.jsx)("input",{type:"text",value:L,onChange:a=>M(a.target.value),placeholder:"provider/model-id",className:"w-full min-w-0 pl-2 pr-7 py-2 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50 sm:py-1.5"}),L&&(0,d.jsx)("button",{onClick:()=>M(""),className:"absolute right-1 top-1/2 -translate-y-1/2 p-0.5 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]}),(0,d.jsx)("button",{onClick:()=>O(!0),disabled:!o?.length,className:`w-full sm:w-auto rounded border px-2 py-2 text-xs transition-colors sm:py-1.5 whitespace-nowrap sm:shrink-0 ${o?.length?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select Model"})]})]}),F&&(0,d.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===F.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===F.type?"check_circle":"error"}),(0,d.jsx)("span",{children:F.text})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,d.jsxs)(f.$n,{variant:"primary",size:"sm",onClick:Z,disabled:!J&&p&&n.length>0||!L,loading:B,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:$,disabled:D,loading:D,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,d.jsxs)(f.$n,{variant:"ghost",size:"sm",onClick:()=>S(!0),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]})]})]})]}),N&&(0,d.jsx)(f.rq,{isOpen:N,onClose:()=>O(!1),onSelect:a=>{M(a.value),O(!1)},selectedModel:L,activeProviders:o,modelAliases:P,title:"Select Model for Cline"}),(0,d.jsx)(f.uR,{isOpen:R,onClose:()=>S(!1),title:"Cline - Manual Configuration",configs:(v=J&&J.trim()?J:p?"<API_KEY_FROM_DASHBOARD>":"sk_ezrouter",[{filename:"~/.cline/data/globalState.json",content:JSON.stringify({actModeApiProvider:"openai",planModeApiProvider:"openai",openAiBaseUrl:(w=X()).endsWith("/v1")?w.slice(0,-3):w,openAiModelId:L||"provider/model-id",planModeOpenAiModelId:L||"provider/model-id"},null,2)},{filename:"~/.cline/data/secrets.json",content:JSON.stringify({openAiApiKey:v},null,2)}])})]})}},77950:(a,b,c)=>{c.d(b,{A:()=>n});var d=c(48249),e=c(67484),f=c(50412),g=c(81220),h=c(52632),i=c(73725),j=c(31407),k=c(94589),l=c(78052);let m=[{label:"Default",value:""},{label:"200K",value:"198000"},{label:"300K",value:"298000"},{label:"500K",value:"498000"},{label:"1M",value:"998000"}];function n({tool:a,isExpanded:b,onToggle:c,activeProviders:o,modelMappings:p,onModelMappingChange:q,baseUrl:r,hasActiveProviders:s,apiKeys:t,cloudEnabled:u,initialStatus:v,tunnelEnabled:w,tunnelPublicUrl:x,tailscaleEnabled:y,tailscaleUrl:z}){let A,B,C,[D,E]=(0,e.useState)(v||null),[F,G]=(0,e.useState)(!1),[H,I]=(0,e.useState)(!1),[J,K]=(0,e.useState)(!1),[L,M]=(0,e.useState)(null),[N,O]=(0,e.useState)(!1),[P,Q]=(0,e.useState)(!1),[R,S]=(0,e.useState)(null),[T,U]=(0,e.useState)(""),[V,W]=(0,e.useState)({}),[X,Y]=(0,e.useState)(!1),[Z,$]=(0,e.useState)(""),[_,aa]=(0,e.useState)(!1),[ab,ac]=(0,e.useState)(!1),[ad,ae]=(0,e.useState)("");(0,e.useRef)(!1);let af=D?.settings?.env?.ANTHROPIC_BASE_URL||"",ag=(()=>{if(!D?.installed)return null;let a=D.settings?.env?.ANTHROPIC_BASE_URL;return a?(0,l.Q)(a,{tunnelPublicUrl:x,tailscaleUrl:z,cloudUrl:u?"https://ezrouter.golamrabbi.dev":null})?"configured":"other":"not_configured"})(),ah=async a=>{let b=a.target.checked;aa(b),await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({ccFilterNaming:b})}).catch(()=>{})},ai=()=>{let a=Z||r;return a.endsWith("/v1")?a:`${a}/v1`},aj=async()=>{I(!0),M(null);try{let b={ANTHROPIC_BASE_URL:ai()},c=T?.trim()||(t?.length>0?t[0].key:null)||(u?null:"sk_ezrouter");c&&(b.ANTHROPIC_AUTH_TOKEN=c),a.defaultModels.forEach(a=>{let c=p[a.alias];c&&a.envKey&&(b[a.envKey]=c)}),ad&&(b.CLAUDE_CODE_MAX_CONTEXT_TOKENS=ad);let d=await fetch("/api/cli-tools/claude-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({env:b,exaMcpEnabled:ab,maxContextTokens:ad})}),e=await d.json();d.ok?((0,i.Xg)(ai(),{tunnelPublicUrl:x,tailscaleUrl:z}),M({type:"success",text:"Settings applied successfully!"}),E(a=>({...a,hasBackup:!0,settings:{...a?.settings,env:b},exaMcpEnabled:ab}))):M({type:"error",text:e.error||"Failed to apply settings"})}catch(a){M({type:"error",text:a.message})}finally{I(!1)}},ak=async()=>{K(!0),M(null);try{let b=await fetch("/api/cli-tools/claude-settings",{method:"DELETE"}),c=await b.json();b.ok?(M({type:"success",text:"Settings reset successfully!"}),a.defaultModels.forEach(a=>q(a.alias,a.defaultValue||"")),U(""),ac(!1),ae("")):M({type:"error",text:c.error||"Failed to reset settings"})}catch(a){M({type:"error",text:a.message})}finally{K(!1)}};return(0,d.jsxs)(f.Zp,{padding:"xs",className:"overflow-hidden",children:[(0,d.jsxs)("div",{className:"flex items-start justify-between gap-3 hover:cursor-pointer sm:items-center",onClick:c,children:[(0,d.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,d.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,d.jsx)(g.default,{src:"/providers/claude.png",alt:a.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:a=>{a.target.style.display="none"},loading:"lazy",decoding:"async"})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[(0,d.jsx)("h3",{className:"font-medium text-sm",children:a.name}),"configured"===ag&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-green-500/10 text-green-600 dark:text-green-400 rounded-full",children:"Connected"}),"not_configured"===ag&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-yellow-500/10 text-yellow-600 dark:text-yellow-400 rounded-full",children:"Not configured"}),"other"===ag&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-blue-500/10 text-blue-600 dark:text-blue-400 rounded-full",children:"Other"})]}),(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:a.description})]})]}),(0,d.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${b?"rotate-180":""}`,children:"expand_more"})]}),b&&(0,d.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[F&&(0,d.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,d.jsx)("span",{children:"Checking Claude CLI..."})]}),!F&&D&&!D.installed&&(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{className:"flex flex-col gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,d.jsxs)("div",{className:"flex items-start gap-3",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,d.jsxs)("div",{className:"flex-1",children:[(0,d.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:"Claude CLI not detected locally"}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"Manual configuration is still available if 9router is deployed on a remote server."})]})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2 pl-9",children:[(0,d.jsx)(k.A,{tool:"claude",baseUrl:ai(),apiKey:T,model:p.sonnet||"",className:"!bg-yellow-500/20 !border-yellow-500/40 !text-yellow-700 dark:!text-yellow-300 hover:!bg-yellow-500/30"}),(0,d.jsxs)(f.$n,{variant:"secondary",size:"sm",onClick:()=>Y(!0),className:"!bg-yellow-500/20 !border-yellow-500/40 !text-yellow-700 dark:!text-yellow-300 hover:!bg-yellow-500/30",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:"content_copy"}),"Manual Config"]}),(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:()=>O(!N),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:N?"expand_less":"help"}),N?"Hide":"How to Install"]})]})]}),N&&(0,d.jsxs)("div",{className:"p-4 bg-surface border border-border rounded-lg",children:[(0,d.jsx)("h4",{className:"font-medium mb-3",children:"Installation Guide"}),(0,d.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"text-text-muted mb-1",children:"macOS / Linux / Windows:"}),(0,d.jsx)("code",{className:"block px-3 py-2 bg-black/5 dark:bg-white/5 rounded font-mono text-xs",children:"npm install -g @anthropic-ai/claude-code"})]}),(0,d.jsxs)("p",{className:"text-text-muted",children:["After installation, run ",(0,d.jsx)("code",{className:"px-1 bg-black/5 dark:bg-white/5 rounded",children:"claude"})," to verify."]})]})]})]}),!F&&D?.installed&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Select Endpoint"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)(h.A,{value:Z||((A=Z||r).endsWith("/v1")?A:`${A}/v1`),onChange:$,requiresExternalUrl:a.requiresExternalUrl,tunnelEnabled:w,tunnelPublicUrl:x,tailscaleEnabled:y,tailscaleUrl:z,currentUrl:af})]}),D?.settings?.env?.ANTHROPIC_BASE_URL&&(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Current"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)("span",{className:"min-w-0 truncate rounded bg-surface/40 px-2 py-2 text-xs text-text-muted sm:py-1.5",children:D.settings.env.ANTHROPIC_BASE_URL})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"API Key"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)(j.A,{value:T,onChange:U,apiKeys:t,cloudEnabled:u})]}),a.defaultModels.map(a=>(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:a.name}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsxs)("div",{className:"relative w-full min-w-0",children:[(0,d.jsx)("input",{type:"text",value:p[a.alias]||"",onChange:b=>q(a.alias,b.target.value),placeholder:"provider/model-id",className:"w-full min-w-0 pl-2 pr-7 py-2 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50 sm:py-1.5"}),p[a.alias]&&(0,d.jsx)("button",{onClick:()=>q(a.alias,""),className:"absolute right-1 top-1/2 -translate-y-1/2 p-0.5 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]}),(0,d.jsx)("button",{onClick:()=>{S(a.alias),Q(!0)},disabled:!s,className:`w-full sm:w-auto rounded border px-2 py-2 text-xs transition-colors sm:py-1.5 whitespace-nowrap sm:shrink-0 ${s?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select Model"})]},a.alias)),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Context window"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)("select",{value:ad,onChange:a=>ae(a.target.value),className:"w-full min-w-0 px-2 py-2 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50 sm:py-1.5",children:m.map(a=>(0,d.jsx)("option",{value:a.value,children:a.label},a.label))})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Filter naming"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsxs)("label",{className:"flex items-center gap-1.5 cursor-pointer select-none",children:[(0,d.jsx)("input",{type:"checkbox",checked:_,onChange:ah,className:"w-3.5 h-3.5 accent-primary cursor-pointer"}),(0,d.jsx)("span",{className:"text-xs text-text-muted",children:"Filter naming requests"}),(0,d.jsx)(f.m_,{text:"Intercepts Claude Code's topic-naming requests and returns a fake response locally, saving API tokens.",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px] cursor-help",children:"info"})})]})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Web Search"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsxs)("label",{className:"flex items-center gap-1.5 cursor-pointer select-none",children:[(0,d.jsx)("input",{type:"checkbox",checked:ab,onChange:a=>ac(a.target.checked),className:"w-3.5 h-3.5 accent-primary cursor-pointer"}),(0,d.jsx)("span",{className:"text-xs text-text-muted",children:"Exa MCP"}),(0,d.jsx)(f.m_,{text:"Injects Exa MCP into ~/.claude.json so non-Claude models gain web search. Restart Claude Code after Apply.",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px] cursor-help",children:"info"})})]})]})]}),L&&(0,d.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===L.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===L.type?"check_circle":"error"}),(0,d.jsx)("span",{children:L.text})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,d.jsxs)(f.$n,{variant:"primary",size:"sm",onClick:aj,disabled:!s,loading:H,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:ak,disabled:!D?.has9Router,loading:J,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,d.jsxs)(f.$n,{variant:"ghost",size:"sm",onClick:()=>Y(!0),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]}),(0,d.jsx)(k.A,{tool:"claude",baseUrl:ai(),apiKey:T,model:p.sonnet||"",variant:"ghost"})]})]})]}),P&&(0,d.jsx)(f.rq,{isOpen:P,onClose:()=>Q(!1),onSelect:a=>{R&&q(R,a.value)},selectedModel:R?p[R]:null,activeProviders:o,modelAliases:V,title:`Select model for ${R}`}),(0,d.jsx)(f.uR,{isOpen:X,onClose:()=>Y(!1),title:"Claude CLI - Manual Configuration",configs:(B=T&&T.trim()?T:u?"<API_KEY_FROM_DASHBOARD>":"sk_ezrouter",C={ANTHROPIC_BASE_URL:ai(),ANTHROPIC_AUTH_TOKEN:B},a.defaultModels.forEach(a=>{let b=p[a.alias];b&&a.envKey&&(C[a.envKey]=b)}),ad&&(C.CLAUDE_CODE_MAX_CONTEXT_TOKENS=ad),[{filename:"~/.claude/settings.json",content:JSON.stringify({hasCompletedOnboarding:!0,env:C},null,2)}])})]})}},78052:(a,b,c)=>{c.d(b,{Q:()=>e});let d=a=>(a||"").replace(/\/+$/,"");function e(a,b={}){if(!a)return!1;let c=d(a),{tunnelPublicUrl:f,tailscaleUrl:g,cloudUrl:h}=b;return!!(/localhost|127\.0\.0\.1|0\.0\.0\.0/.test(c)||f&&c.startsWith(d(f))||g&&c.startsWith(d(g))||h&&c.startsWith(d(h)))}},94589:(a,b,c)=>{c.d(b,{A:()=>k});var d=c(48249),e=c(67484),f=c(50412),g=c(50377);let h=a=>`'${String(a).replaceAll("'","'\"'\"'")}'`,i=()=>()=>{},j=()=>{let a=navigator.userAgentData?.platform||navigator.platform||navigator.userAgent;return/win/i.test(a)?"windows":/mac/i.test(a)?"mac":"linux"};function k({tool:a,baseUrl:b,apiKey:c="",model:l="",variant:m="secondary",className:n=""}){let[o,p]=(0,e.useState)(!1),[q,r]=(0,e.useState)(!1),s=(0,e.useSyncExternalStore)(i,j,()=>"linux"),{copied:t,copy:u}=(0,g.C)(),v=async d=>{p(!0),r(!1);try{let e,f,g,i=await fetch("bat"===d?"/9router-connect.ps1":"/9router-connect.sh");if(!i.ok)throw Error("Failed to download installer");let j=await i.text(),k=b.endsWith("/v1")?b:`${b}/v1`;if("bat"===d){let b=a=>`'${String(a).replaceAll("'","''")}'`,d=l?` -Model ${b(l)}`:"",h=`$raw=[IO.File]::ReadAllText($env:NINEROUTER_INSTALLER); $marker='# 9ROUTER '+'POWERSHELL PAYLOAD'; $payload=$raw.Substring($raw.IndexOf($marker)+$marker.Length).TrimStart(); & ([ScriptBlock]::Create($payload)) -Tool ${b(a)} -BaseUrl ${b(k)} -ApiKey ${b(c)}${d}`;e=`@echo off\r
|
|
80
|
+
`}])})]})}},69947:(a,b,c)=>{c.d(b,{A:()=>l});var d=c(48249),e=c(67484),f=c(50412),g=c(81220),h=c(52632),i=c(73725),j=c(31407),k=c(78052);function l({tool:a,isExpanded:b,onToggle:c,baseUrl:m,hasActiveProviders:n,apiKeys:o,activeProviders:p,cloudEnabled:q,initialStatus:r,tunnelEnabled:s,tunnelPublicUrl:t,tailscaleEnabled:u,tailscaleUrl:v}){let w,x,[y,z]=(0,e.useState)(r||null),[A,B]=(0,e.useState)(!1),[C,D]=(0,e.useState)(!1),[E,F]=(0,e.useState)(!1),[G,H]=(0,e.useState)(null),[I,J]=(0,e.useState)(""),[K,L]=(0,e.useState)(""),[M,N]=(0,e.useState)({}),[O,P]=(0,e.useState)(null),[Q,R]=(0,e.useState)(!1),[S,T]=(0,e.useState)({}),[U,V]=(0,e.useState)(!1),[W,X]=(0,e.useState)("");(0,e.useRef)(!1);let Y=y?.settings?.models?.providers?.["9router"]?.baseUrl||"",Z=(()=>{if(!y?.installed)return null;let a=y.settings?.models?.providers?.["9router"];return a?(0,k.Q)(a.baseUrl,{tunnelPublicUrl:t,tailscaleUrl:v})?"configured":"other":"not_configured"})(),$=async()=>{B(!0);try{let a=await fetch("/api/cli-tools/openclaw-settings"),b=await a.json();z(b)}catch(a){z({installed:!1,error:a.message})}finally{B(!1)}},_=()=>{let a=W||"http://127.0.0.1:20126";return a.endsWith("/v1")?a:`${a}/v1`},aa=async()=>{D(!0),H(null);try{let a=I?.trim()||(o?.length>0?o[0].key:null)||(q?null:"sk_ezrouter"),b=await fetch("/api/cli-tools/openclaw-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:_(),apiKey:a,model:K,agentModels:M})}),c=await b.json();b.ok?((0,i.Xg)(_(),{tunnelPublicUrl:t,tailscaleUrl:v}),H({type:"success",text:"Settings applied successfully!"}),$()):H({type:"error",text:c.error||"Failed to apply settings"})}catch(a){H({type:"error",text:a.message})}finally{D(!1)}},ab=async()=>{F(!0),H(null);try{let a=await fetch("/api/cli-tools/openclaw-settings",{method:"DELETE"}),b=await a.json();a.ok?(H({type:"success",text:"Settings reset successfully!"}),L(""),J(""),$()):H({type:"error",text:b.error||"Failed to reset settings"})}catch(a){H({type:"error",text:a.message})}finally{F(!1)}};return(0,d.jsxs)(f.Zp,{padding:"xs",className:"overflow-hidden",children:[(0,d.jsxs)("div",{className:"flex items-start justify-between gap-3 hover:cursor-pointer sm:items-center",onClick:c,children:[(0,d.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,d.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,d.jsx)(g.default,{src:"/providers/openclaw.png",alt:a.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:a=>{a.target.style.display="none"},loading:"lazy",decoding:"async"})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[(0,d.jsx)("h3",{className:"font-medium text-sm",children:a.name}),"configured"===Z&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-green-500/10 text-green-600 dark:text-green-400 rounded-full",children:"Connected"}),"not_configured"===Z&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-yellow-500/10 text-yellow-600 dark:text-yellow-400 rounded-full",children:"Not configured"}),"other"===Z&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-blue-500/10 text-blue-600 dark:text-blue-400 rounded-full",children:"Other"})]}),(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:a.description})]})]}),(0,d.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${b?"rotate-180":""}`,children:"expand_more"})]}),b&&(0,d.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[A&&(0,d.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,d.jsx)("span",{children:"Checking Open Claw CLI..."})]}),!A&&y&&!y.installed&&(0,d.jsx)("div",{className:"flex flex-col gap-4",children:(0,d.jsxs)("div",{className:"flex flex-col gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,d.jsxs)("div",{className:"flex items-start gap-3",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,d.jsxs)("div",{className:"flex-1",children:[(0,d.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:"Open Claw CLI not detected locally"}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"Manual configuration is still available if 9router is deployed on a remote server."})]})]}),(0,d.jsx)("div",{className:"flex items-center gap-2 pl-9",children:(0,d.jsxs)(f.$n,{variant:"secondary",size:"sm",onClick:()=>V(!0),className:"!bg-yellow-500/20 !border-yellow-500/40 !text-yellow-700 dark:!text-yellow-300 hover:!bg-yellow-500/30",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:"content_copy"}),"Manual Config"]})})]})}),!A&&y?.installed&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Select Endpoint"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)(h.A,{value:W||((w=W||"http://127.0.0.1:20126").endsWith("/v1")?w:`${w}/v1`),onChange:X,requiresExternalUrl:a.requiresExternalUrl,tunnelEnabled:s,tunnelPublicUrl:t,tailscaleEnabled:u,tailscaleUrl:v,currentUrl:Y})]}),y?.settings?.models?.providers?.["9router"]?.baseUrl&&(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Current"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)("span",{className:"min-w-0 truncate rounded bg-surface/40 px-2 py-2 text-xs text-text-muted sm:py-1.5",children:y.settings.models.providers["9router"].baseUrl})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"API Key"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)(j.A,{value:I,onChange:J,apiKeys:o,cloudEnabled:q})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Default Model"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsxs)("div",{className:"relative w-full min-w-0",children:[(0,d.jsx)("input",{type:"text",value:K,onChange:a=>L(a.target.value),placeholder:"provider/model-id",className:"w-full min-w-0 pl-2 pr-7 py-2 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50 sm:py-1.5"}),K&&(0,d.jsx)("button",{onClick:()=>L(""),className:"absolute right-1 top-1/2 -translate-y-1/2 p-0.5 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]}),(0,d.jsx)("button",{onClick:()=>{P(null),R(!0)},disabled:!n,className:`w-full sm:w-auto rounded border px-2 py-2 text-xs transition-colors sm:py-1.5 whitespace-nowrap sm:shrink-0 ${n?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select"})]}),(y.agents||[]).filter(a=>a.agentDir).map(a=>(0,d.jsxs)("div",{className:"flex items-center gap-2 pl-4",children:[(0,d.jsxs)("span",{className:"w-32 shrink-0 text-xs text-primary text-right truncate",title:a.name||a.id,children:["Agent ",a.name||a.id]}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsxs)("div",{className:"relative w-full min-w-0",children:[(0,d.jsx)("input",{type:"text",value:M[a.id]||"",onChange:b=>N(c=>({...c,[a.id]:b.target.value})),placeholder:`default (${K||"provider/model-id"})`,className:"w-full min-w-0 pl-2 pr-7 py-2 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50 sm:py-1.5"}),M[a.id]&&(0,d.jsx)("button",{onClick:()=>N(b=>({...b,[a.id]:""})),className:"absolute right-1 top-1/2 -translate-y-1/2 p-0.5 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]}),(0,d.jsx)("button",{onClick:()=>{P(a.id),R(!0)},disabled:!n,className:`w-full sm:w-auto rounded border px-2 py-2 text-xs transition-colors sm:py-1.5 whitespace-nowrap sm:shrink-0 ${n?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select"})]},a.id))]}),G&&(0,d.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===G.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===G.type?"check_circle":"error"}),(0,d.jsx)("span",{children:G.text})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,d.jsxs)(f.$n,{variant:"primary",size:"sm",onClick:aa,disabled:!K,loading:C,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:ab,disabled:!y?.has9Router,loading:E,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,d.jsxs)(f.$n,{variant:"ghost",size:"sm",onClick:()=>V(!0),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]})]})]})]}),Q&&(0,d.jsx)(f.rq,{isOpen:Q,onClose:()=>R(!1),onSelect:a=>{O?(N(b=>({...b,[O]:a.value})),P(null)):L(a.value),R(!1)},selectedModel:K,activeProviders:p,modelAliases:S,title:"Select Model for Open Claw"}),(0,d.jsx)(f.uR,{isOpen:U,onClose:()=>V(!1),title:"Open Claw - Manual Configuration",configs:(x=I&&I.trim()?I:q?"<API_KEY_FROM_DASHBOARD>":"sk_ezrouter",[{filename:"~/.openclaw/openclaw.json",content:JSON.stringify({agents:{defaults:{model:{primary:`9router/${K||"provider/model-id"}`}}},models:{providers:{"9router":{baseUrl:_(),apiKey:x,api:"openai-completions",models:[{id:K||"provider/model-id",name:(K||"provider/model-id").split("/").pop()}]}}}},null,2)}])})]})}},73725:(a,b,c)=>{c.d(b,{BC:()=>l,Cz:()=>n,GR:()=>f,S2:()=>m,XE:()=>i,Xg:()=>q,Xh:()=>k,hK:()=>j,i5:()=>o,uZ:()=>p});var d=c(12020);function e({storageKey:a,changeEvent:b,itemField:c,normalize:d=a=>a,defaultName:f=a=>a}){let g=()=>[],h=a=>{};return{read:g,subscribe:a=>()=>{},upsert:(a,b)=>{let e=d(a);if(!e)return null;let i=g(),j=i.find(a=>d(a[c])===e);if(j&&!b)return j.name;let k=(b||f(e)).trim();return k?(h([...i.filter(a=>a.name!==k&&d(a[c])!==e),{name:k,[c]:e}].sort((a,b)=>a.name.localeCompare(b.name))),k):null},remove:a=>h(g().filter(b=>b.name!==a))}}let f=a=>(a||"").replace(/\/+$/,""),g=e({storageKey:"9router.cliToolEndpointPresets",changeEvent:"9router:endpoint-presets-changed",itemField:"baseUrl",normalize:f,defaultName:a=>{try{return new URL(a).host}catch{return a}}}),h=e({storageKey:"9router.cliToolApiKeyPresets",changeEvent:"9router:api-key-presets-changed",itemField:"key"}),i=g.read,j=g.subscribe,k=g.upsert,l=g.remove,m=h.read,n=h.subscribe,o=h.upsert,p=h.remove;function q(a,{tunnelPublicUrl:b,tailscaleUrl:c,cloudUrl:e}={}){let g=f(a);return!g||[`http://127.0.0.1:${d.h0.appPort}`,b,c,e].filter(Boolean).flatMap(a=>[f(a),`${f(a)}/v1`]).includes(g)?null:k(g)}},76289:(a,b,c)=>{c.d(b,{A:()=>l});var d=c(48249),e=c(67484),f=c(50412),g=c(81220),h=c(52632),i=c(73725),j=c(31407),k=c(78052);function l({tool:a,isExpanded:b,onToggle:c,baseUrl:m,apiKeys:n,activeProviders:o,cloudEnabled:p,initialStatus:q,tunnelEnabled:r,tunnelPublicUrl:s,tailscaleEnabled:t,tailscaleUrl:u}){let v,w,[x,y]=(0,e.useState)(q||null),[z,A]=(0,e.useState)(!1),[B,C]=(0,e.useState)(!1),[D,E]=(0,e.useState)(!1),[F,G]=(0,e.useState)(null),[H,I]=(0,e.useState)(!1),[J,K]=(0,e.useState)(""),[L,M]=(0,e.useState)(""),[N,O]=(0,e.useState)(!1),[P,Q]=(0,e.useState)({}),[R,S]=(0,e.useState)(!1),[T,U]=(0,e.useState)(""),V=x?.settings?.openAiBaseUrl||"",W=(()=>{if(!x?.installed)return null;if(!x.has9Router)return"not_configured";let a=x.settings?.openAiBaseUrl||"";return(0,k.Q)(a,{tunnelPublicUrl:s,tailscaleUrl:u})?"configured":"other"})(),X=()=>{let a=T||`${m}/v1`;return a.endsWith("/v1")?a:`${a}/v1`},Y=async()=>{A(!0);try{let a=await fetch("/api/cli-tools/cline-settings"),b=await a.json();y(b)}catch(a){y({installed:!1,error:a.message})}finally{A(!1)}},Z=async()=>{C(!0),G(null);try{let a=J&&J.trim()||p?J:"sk_ezrouter",b=await fetch("/api/cli-tools/cline-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:X(),apiKey:a,model:L})}),c=await b.json();b.ok?((0,i.Xg)(X(),{tunnelPublicUrl:s,tailscaleUrl:u}),G({type:"success",text:"Settings applied successfully!"}),Y()):G({type:"error",text:c.error||"Failed to apply settings"})}catch(a){G({type:"error",text:a.message})}finally{C(!1)}},$=async()=>{E(!0),G(null);try{let a=await fetch("/api/cli-tools/cline-settings",{method:"DELETE"}),b=await a.json();a.ok?(G({type:"success",text:"Settings reset successfully!"}),M(""),Y()):G({type:"error",text:b.error||"Failed to reset settings"})}catch(a){G({type:"error",text:a.message})}finally{E(!1)}};return(0,d.jsxs)(f.Zp,{padding:"xs",className:"overflow-hidden",children:[(0,d.jsxs)("div",{className:"flex items-start justify-between gap-3 hover:cursor-pointer sm:items-center",onClick:c,children:[(0,d.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,d.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,d.jsx)(g.default,{src:"/providers/cline.png",alt:a.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:a=>{a.target.style.display="none"},loading:"lazy",decoding:"async"})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[(0,d.jsx)("h3",{className:"font-medium text-sm",children:a.name}),"configured"===W&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-green-500/10 text-green-600 dark:text-green-400 rounded-full",children:"Connected"}),"not_configured"===W&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-yellow-500/10 text-yellow-600 dark:text-yellow-400 rounded-full",children:"Not configured"}),"other"===W&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-blue-500/10 text-blue-600 dark:text-blue-400 rounded-full",children:"Other"})]}),(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:a.description})]})]}),(0,d.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${b?"rotate-180":""}`,children:"expand_more"})]}),b&&(0,d.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[z&&(0,d.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,d.jsx)("span",{children:"Checking Cline..."})]}),!z&&x&&!x.installed&&(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{className:"flex flex-col gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,d.jsxs)("div",{className:"flex items-start gap-3",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,d.jsxs)("div",{className:"flex-1",children:[(0,d.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:"Cline not detected locally"}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"Manual configuration is still available if 9router is deployed on a remote server."})]})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2 pl-9",children:[(0,d.jsxs)(f.$n,{variant:"secondary",size:"sm",onClick:()=>S(!0),className:"!bg-yellow-500/20 !border-yellow-500/40 !text-yellow-700 dark:!text-yellow-300 hover:!bg-yellow-500/30",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:"content_copy"}),"Manual Config"]}),(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:()=>I(!H),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:H?"expand_less":"help"}),H?"Hide":"How to Install"]})]})]}),H&&(0,d.jsxs)("div",{className:"p-4 bg-surface border border-border rounded-lg",children:[(0,d.jsx)("h4",{className:"font-medium mb-3",children:"Installation Guide"}),(0,d.jsx)("div",{className:"space-y-3 text-sm",children:(0,d.jsxs)("p",{className:"text-text-muted",children:["Install Cline VS Code extension or CLI from ",(0,d.jsx)("a",{className:"text-primary underline",href:"https://docs.cline.bot/",target:"_blank",rel:"noreferrer",children:"docs.cline.bot"}),"."]})})]})]}),!z&&x?.installed&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Select Endpoint"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)(h.A,{value:T||T||`${m}/v1`,onChange:U,requiresExternalUrl:a.requiresExternalUrl,tunnelEnabled:r,tunnelPublicUrl:s,tailscaleEnabled:t,tailscaleUrl:u,currentUrl:V})]}),x?.settings?.openAiBaseUrl&&(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Current"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)("span",{className:"min-w-0 truncate rounded bg-surface/40 px-2 py-2 text-xs text-text-muted sm:py-1.5",children:x.settings.openAiBaseUrl})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"API Key"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)(j.A,{value:J,onChange:K,apiKeys:n,cloudEnabled:p})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Model"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsxs)("div",{className:"relative w-full min-w-0",children:[(0,d.jsx)("input",{type:"text",value:L,onChange:a=>M(a.target.value),placeholder:"provider/model-id",className:"w-full min-w-0 pl-2 pr-7 py-2 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50 sm:py-1.5"}),L&&(0,d.jsx)("button",{onClick:()=>M(""),className:"absolute right-1 top-1/2 -translate-y-1/2 p-0.5 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]}),(0,d.jsx)("button",{onClick:()=>O(!0),disabled:!o?.length,className:`w-full sm:w-auto rounded border px-2 py-2 text-xs transition-colors sm:py-1.5 whitespace-nowrap sm:shrink-0 ${o?.length?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select Model"})]})]}),F&&(0,d.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===F.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===F.type?"check_circle":"error"}),(0,d.jsx)("span",{children:F.text})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,d.jsxs)(f.$n,{variant:"primary",size:"sm",onClick:Z,disabled:!J&&p&&n.length>0||!L,loading:B,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:$,disabled:D,loading:D,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,d.jsxs)(f.$n,{variant:"ghost",size:"sm",onClick:()=>S(!0),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]})]})]})]}),N&&(0,d.jsx)(f.rq,{isOpen:N,onClose:()=>O(!1),onSelect:a=>{M(a.value),O(!1)},selectedModel:L,activeProviders:o,modelAliases:P,title:"Select Model for Cline"}),(0,d.jsx)(f.uR,{isOpen:R,onClose:()=>S(!1),title:"Cline - Manual Configuration",configs:(v=J&&J.trim()?J:p?"<API_KEY_FROM_DASHBOARD>":"sk_ezrouter",[{filename:"~/.cline/data/globalState.json",content:JSON.stringify({actModeApiProvider:"openai",planModeApiProvider:"openai",openAiBaseUrl:(w=X()).endsWith("/v1")?w.slice(0,-3):w,openAiModelId:L||"provider/model-id",planModeOpenAiModelId:L||"provider/model-id"},null,2)},{filename:"~/.cline/data/secrets.json",content:JSON.stringify({openAiApiKey:v},null,2)}])})]})}},78052:(a,b,c)=>{c.d(b,{Q:()=>e});let d=a=>(a||"").replace(/\/+$/,"");function e(a,b={}){if(!a)return!1;let c=d(a),{tunnelPublicUrl:f,tailscaleUrl:g,cloudUrl:h}=b;return!!(/localhost|127\.0\.0\.1|0\.0\.0\.0/.test(c)||f&&c.startsWith(d(f))||g&&c.startsWith(d(g))||h&&c.startsWith(d(h)))}},94589:(a,b,c)=>{c.d(b,{A:()=>k});var d=c(48249),e=c(67484),f=c(50412),g=c(50377);let h=a=>`'${String(a).replaceAll("'","'\"'\"'")}'`,i=()=>()=>{},j=()=>{let a=navigator.userAgentData?.platform||navigator.platform||navigator.userAgent;return/win/i.test(a)?"windows":/mac/i.test(a)?"mac":"linux"};function k({tool:a,baseUrl:b,apiKey:c="",model:l="",variant:m="secondary",className:n=""}){let[o,p]=(0,e.useState)(!1),[q,r]=(0,e.useState)(!1),s=(0,e.useSyncExternalStore)(i,j,()=>"linux"),{copied:t,copy:u}=(0,g.C)(),v=async d=>{p(!0),r(!1);try{let e,f,g,i=await fetch("bat"===d?"/9router-connect.ps1":"/9router-connect.sh");if(!i.ok)throw Error("Failed to download installer");let j=await i.text(),k=b.endsWith("/v1")?b:`${b}/v1`;if("bat"===d){let b=a=>`'${String(a).replaceAll("'","''")}'`,d=l?` -Model ${b(l)}`:"",h=`$raw=[IO.File]::ReadAllText($env:NINEROUTER_INSTALLER); $marker='# 9ROUTER '+'POWERSHELL PAYLOAD'; $payload=$raw.Substring($raw.IndexOf($marker)+$marker.Length).TrimStart(); & ([ScriptBlock]::Create($payload)) -Tool ${b(a)} -BaseUrl ${b(k)} -ApiKey ${b(c)}${d}`;e=`@echo off\r
|
|
81
81
|
setlocal\r
|
|
82
82
|
title 9Router ${a} Installer\r
|
|
83
83
|
set "NINEROUTER_INSTALLER=%~f0"\r
|