empyr-path 0.4.71 → 0.4.73
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 +11 -7
- package/app/.next-cli-build/build-manifest.json +3 -3
- package/app/.next-cli-build/prerender-manifest.json +24 -0
- package/app/.next-cli-build/routes-manifest.json +26 -0
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/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 +3 -3
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +4 -4
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/users/page.js +2 -0
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/users/page.js.nft.json +1 -0
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/users/page_client-reference-manifest.js +1 -0
- package/app/.next-cli-build/server/app/_global-error/page.js +3 -3
- package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_global-error.html +1 -1
- package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_not-found/page.js +2 -2
- package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_not-found.html +1 -1
- package/app/.next-cli-build/server/app/_not-found.rsc +6 -5
- package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +6 -5
- 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 +5 -5
- 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 +4 -3
- 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/register/route.js +1 -0
- package/app/.next-cli-build/server/app/api/auth/register/route.js.nft.json +1 -0
- package/app/.next-cli-build/server/app/api/auth/register/route_client-reference-manifest.js +1 -0
- package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +3 -3
- 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 +1 -1
- 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 +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +1 -1
- 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/combos/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
- package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/health/route.js +1 -1
- package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/init/route.js +1 -1
- package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
- package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/locale/route.js +1 -1
- package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +1 -1
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +1 -1
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +2 -2
- package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
- package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +2 -2
- package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +2 -2
- package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +2 -2
- package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
- package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
- package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/shutdown/route.js +1 -1
- package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tags/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
- package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +1 -1
- 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]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/stream/route.js +2 -2
- package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/users/[id]/route.js +1 -0
- package/app/.next-cli-build/server/app/api/users/[id]/route.js.nft.json +1 -0
- package/app/.next-cli-build/server/app/api/users/[id]/route_client-reference-manifest.js +1 -0
- package/app/.next-cli-build/server/app/api/users/route.js +1 -0
- package/app/.next-cli-build/server/app/api/users/route.js.nft.json +1 -0
- package/app/.next-cli-build/server/app/api/users/route_client-reference-manifest.js +1 -0
- package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +2 -2
- package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/version/route.js +1 -1
- package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
- package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
- package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/callback/page.js +2 -2
- package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/callback.html +1 -1
- package/app/.next-cli-build/server/app/callback.rsc +6 -5
- package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +6 -5
- 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 +5 -5
- package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +4 -3
- 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 +8 -7
- 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 +8 -7
- 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 +5 -5
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +4 -3
- package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +12 -10
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +6 -5
- 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 +12 -10
- 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 +5 -5
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +4 -3
- package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/combos.rsc +8 -7
- 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 +8 -7
- 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 +5 -5
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +4 -3
- package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +12 -10
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +6 -5
- 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 +12 -10
- 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 +5 -5
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +4 -3
- 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 +8 -7
- 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 +8 -7
- 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 +5 -5
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +4 -3
- package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.rsc +20 -18
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +6 -5
- 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 +20 -18
- 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 +5 -5
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +4 -3
- package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/profile.rsc +8 -7
- 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 +8 -7
- 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 +5 -5
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +4 -3
- package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +8 -7
- 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 +8 -7
- 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 +5 -5
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +4 -3
- package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers.rsc +8 -7
- 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 +8 -7
- 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 +5 -5
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +4 -3
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +8 -7
- 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 +8 -7
- 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 +5 -5
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +4 -3
- package/app/.next-cli-build/server/app/dashboard/quota.html +2 -2
- package/app/.next-cli-build/server/app/dashboard/quota.rsc +21 -19
- package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +7 -6
- 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 +21 -19
- 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 +5 -5
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +4 -3
- package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +2 -2
- package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +7 -6
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +7 -6
- 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 +5 -5
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +4 -3
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.rsc +8 -7
- 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 +8 -7
- 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 +5 -5
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +4 -3
- package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/translator.rsc +8 -7
- 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 +8 -7
- 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 +5 -5
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +4 -3
- package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/usage.rsc +8 -7
- 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 +8 -7
- 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 +5 -5
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +4 -3
- package/app/.next-cli-build/server/app/dashboard/users.html +1 -0
- package/app/.next-cli-build/server/app/dashboard/users.meta +17 -0
- package/app/.next-cli-build/server/app/dashboard/users.rsc +24 -0
- package/app/.next-cli-build/server/app/dashboard/users.segments/!KGRhc2hib2FyZCk/dashboard/users/__PAGE__.segment.rsc +6 -0
- package/app/.next-cli-build/server/app/dashboard/users.segments/!KGRhc2hib2FyZCk/dashboard/users.segment.rsc +5 -0
- package/app/.next-cli-build/server/app/dashboard/users.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +5 -0
- package/app/.next-cli-build/server/app/dashboard/users.segments/!KGRhc2hib2FyZCk.segment.rsc +6 -0
- package/app/.next-cli-build/server/app/dashboard/users.segments/_full.segment.rsc +24 -0
- package/app/.next-cli-build/server/app/dashboard/users.segments/_head.segment.rsc +6 -0
- package/app/.next-cli-build/server/app/dashboard/users.segments/_index.segment.rsc +8 -0
- package/app/.next-cli-build/server/app/dashboard/users.segments/_tree.segment.rsc +6 -0
- package/app/.next-cli-build/server/app/dashboard.html +1 -1
- package/app/.next-cli-build/server/app/dashboard.rsc +8 -7
- 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 +8 -7
- 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 +5 -5
- package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +4 -3
- package/app/.next-cli-build/server/app/favicon.ico/route.js +1 -1
- package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/index.html +1 -1
- package/app/.next-cli-build/server/app/index.rsc +6 -5
- package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +6 -5
- 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 +5 -5
- package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +4 -3
- package/app/.next-cli-build/server/app/landing/page.js +2 -2
- package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/landing.html +1 -1
- package/app/.next-cli-build/server/app/landing.rsc +6 -5
- package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +6 -5
- 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 +5 -5
- package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +4 -3
- package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/login/page.js +2 -2
- package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/login.html +1 -1
- package/app/.next-cli-build/server/app/login.rsc +7 -7
- package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -3
- 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 +11 -7
- package/app/.next-cli-build/server/chunks/1749.js +1 -1
- package/app/.next-cli-build/server/chunks/{4013.js → 2391.js} +1 -1
- package/app/.next-cli-build/server/chunks/2409.js +1 -1
- package/app/.next-cli-build/server/chunks/{5221.js → 2437.js} +1 -1
- package/app/.next-cli-build/server/chunks/2722.js +1 -1
- package/app/.next-cli-build/server/chunks/3104.js +2 -2
- package/app/.next-cli-build/server/chunks/3110.js +16 -10
- package/app/.next-cli-build/server/chunks/3535.js +1 -0
- package/app/.next-cli-build/server/chunks/3588.js +1 -1
- package/app/.next-cli-build/server/chunks/3593.js +1 -1
- package/app/.next-cli-build/server/chunks/3781.js +7 -0
- package/app/.next-cli-build/server/chunks/4055.js +1 -1
- package/app/.next-cli-build/server/chunks/4177.js +1 -1
- package/app/.next-cli-build/server/chunks/4306.js +1 -0
- package/app/.next-cli-build/server/chunks/4404.js +1 -1
- package/app/.next-cli-build/server/chunks/4739.js +1 -1
- package/app/.next-cli-build/server/chunks/4780.js +1 -1
- package/app/.next-cli-build/server/chunks/4884.js +1 -1
- package/app/.next-cli-build/server/chunks/507.js +1 -1
- package/app/.next-cli-build/server/chunks/5217.js +2 -2
- package/app/.next-cli-build/server/chunks/5258.js +1 -1
- package/app/.next-cli-build/server/chunks/5681.js +1 -1
- package/app/.next-cli-build/server/chunks/6329.js +1 -0
- package/app/.next-cli-build/server/chunks/6811.js +1 -1
- package/app/.next-cli-build/server/chunks/698.js +1 -1
- package/app/.next-cli-build/server/chunks/7568.js +1 -0
- package/app/.next-cli-build/server/chunks/7623.js +1 -1
- package/app/.next-cli-build/server/chunks/{318.js → 7937.js} +1 -1
- package/app/.next-cli-build/server/chunks/7965.js +1 -1
- package/app/.next-cli-build/server/chunks/8520.js +1 -1
- package/app/.next-cli-build/server/chunks/8540.js +1 -0
- package/app/.next-cli-build/server/chunks/8590.js +1 -0
- package/app/.next-cli-build/server/chunks/8895.js +2 -2
- package/app/.next-cli-build/server/chunks/9807.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/next-font-manifest.js +1 -1
- package/app/.next-cli-build/server/next-font-manifest.json +1 -1
- package/app/.next-cli-build/server/pages/404.html +1 -1
- package/app/.next-cli-build/server/pages/500.html +1 -1
- package/app/.next-cli-build/static/chunks/1321-c3eb6e9aa44b8136.js +1 -0
- package/app/.next-cli-build/static/chunks/5497-c2f356a9b428ac86.js +7 -0
- package/app/.next-cli-build/static/chunks/5907-b6bcdf2a4a25a3b8.js +1 -0
- package/app/.next-cli-build/static/chunks/{6069-ab59ce65effa2700.js → 6069-969bb675f612a35c.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/page-51522d715f4bacd1.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-72dae7c05c70c7cb.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/page-c67de5786afc3dbb.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-e1d8a02189c8c861.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/page-34c131ab7dd4565e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-5099e548497b1b43.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-89a30e2b77c1f1a8.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-adbd2a7e2de254c9.js +3 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-3eb0a8df359ffb39.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/proxy-pools/page-12ce13ef05d1aac7.js +4 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-2045a758894ef457.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/page-4576ae5ee0bfdf47.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/translator/page-aab39f201ba85a27.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/page-80ecdcb88766cf57.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/users/page-911f7d7e6893aba0.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/{layout-8a9237599caef70b.js → layout-b224c7522cd9b9d9.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/_global-error/page-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/login/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/register/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/status/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/combos/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/health/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/init/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/keys/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/locale/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/alias/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/availability/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/custom/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/test/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pricing/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/client/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/database/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/shutdown/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tags/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/load/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/save/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/send/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/history/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/users/[id]/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/users/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/models/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/search/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/version/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/version/update/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/dashboard/settings/pricing/page-7ed1a13a42ec2488.js +1 -0
- package/app/.next-cli-build/static/chunks/app/layout-bf12368c3d76fa59.js +1 -0
- package/app/.next-cli-build/static/chunks/app/login/page-ad298d07b8c3998e.js +1 -0
- package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/page-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-4ddb3e75ddf90c7a.js +1 -0
- package/app/.next-cli-build/static/chunks/{webpack-f482ccef6733ebcc.js → webpack-bf625b573599cefc.js} +1 -1
- package/app/.next-cli-build/static/css/0269f99a8d602835.css +1 -0
- package/app/.next-cli-build/static/css/fa4799b7efe6b5ea.css +1 -0
- package/app/.next-cli-build/static/media/13971731025ec697-s.p.woff2 +0 -0
- package/app/.next-cli-build/static/media/7ab938503e4547a1-s.woff2 +0 -0
- package/app/.next-cli-build/static/xLSfOaZFKRJcH_XvDjPSb/_buildManifest.js +1 -0
- package/app/cli/.build-home/.9router/db/backups/upgrade-0.4.71-to-0.4.73-0.4.73-20260613-125219/data.sqlite +0 -0
- package/app/cli/.build-home/.9router/db/data.sqlite +0 -0
- package/app/package.json +1 -1
- package/app/public/icons/Logo.png +0 -0
- package/app/public/icons/icon-192.png +0 -0
- package/app/public/icons/icon-512.png +0 -0
- package/app/public/providers/bai.png +0 -0
- package/app/public/providers/canopywave.png +0 -0
- package/app/public/providers/codebuddy.png +0 -0
- package/app/public/providers/morph.png +0 -0
- package/app/public/providers/qiniu.png +0 -0
- package/app/public/providers/routeway.png +0 -0
- package/app/public/providers/swiftrouter.png +0 -0
- package/app/public/providers/xiaomi-mimo-plan-sgp.png +0 -0
- package/cli.js +16 -0
- package/package.json +1 -1
- package/src/cli/api/client.js +25 -1
- package/src/cli/commands/admin.js +170 -0
- package/app/.next-cli-build/server/chunks/1260.js +0 -1
- package/app/.next-cli-build/server/chunks/412.js +0 -7
- package/app/.next-cli-build/server/chunks/42.js +0 -1
- package/app/.next-cli-build/server/chunks/595.js +0 -1
- package/app/.next-cli-build/server/chunks/6446.js +0 -1
- package/app/.next-cli-build/server/chunks/6980.js +0 -3
- package/app/.next-cli-build/server/chunks/7061.js +0 -1
- package/app/.next-cli-build/server/chunks/7532.js +0 -1
- package/app/.next-cli-build/static/chunks/1321-34d056ab60063097.js +0 -1
- package/app/.next-cli-build/static/chunks/334-5fe416d12185ebdf.js +0 -3
- package/app/.next-cli-build/static/chunks/5497-7ed8c19e2856c14a.js +0 -7
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/page-d82b229ad3d370c6.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-8b21af4bccd9df9d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/page-c939dcc7adb63878.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-d1e9f6fb258f248c.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/page-00b61d0a50b13c7e.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-c29598c93bf8be4f.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-135df9db11e669bb.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-d8898f7428b1414a.js +0 -3
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-f5b0d232c8c671ae.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/proxy-pools/page-1303b6a34844dcb7.js +0 -4
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-b78e56e00c42f2c1.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/page-9bd82b19d22062aa.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/translator/page-e799349e158322fc.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/page-4d51824e5e28fa9d.js +0 -1
- package/app/.next-cli-build/static/chunks/app/_global-error/page-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/login/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/status/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/combos/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/health/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/init/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/keys/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/locale/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/alias/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/availability/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/custom/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/test/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pricing/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/client/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/database/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/shutdown/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tags/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/load/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/save/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/send/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/history/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/models/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/search/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/version/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/version/update/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/dashboard/settings/pricing/page-9287c6a07e263252.js +0 -1
- package/app/.next-cli-build/static/chunks/app/layout-4a9338d3a11fb1ec.js +0 -1
- package/app/.next-cli-build/static/chunks/app/login/page-abae3c367c6b3d37.js +0 -1
- package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/app/page-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-ac916ca15888ac18.js +0 -1
- package/app/.next-cli-build/static/css/64d7624ad2e95249.css +0 -1
- package/app/.next-cli-build/static/css/7a3e1568f247f3d0.css +0 -1
- package/app/.next-cli-build/static/yRDoXhHsf4yF00gzQXPb1/_buildManifest.js +0 -1
- /package/app/.next-cli-build/static/{yRDoXhHsf4yF00gzQXPb1 → xLSfOaZFKRJcH_XvDjPSb}/_ssgManifest.js +0 -0
- /package/app/public/icons/{icon-512.svg → icon-5121.svg} +0 -0
- /package/app/public/icons/{icon-192.svg → icon-5122..svg} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5907],{95907:(e,t,s)=>{s.d(t,{default:()=>p});var a=s(95155),l=s(12115),n=s(14051),i=s.n(n),r=s(35497),c=s(11059),o=s(73006);let d=["zh-CN","zh-TW"],x=[{icon:"public",title:"Access Anywhere",desc:"Use your API from any network"},{icon:"group",title:"Share Endpoint",desc:"Share URL with team members"},{icon:"code",title:"Use in Cursor/Cline",desc:"Connect AI tools remotely"},{icon:"lock",title:"Encrypted",desc:"End-to-end TLS via Cloudflare"}];async function h(e){if(!e)return!1;try{return(await fetch(`${e}/api/health`,{mode:"cors",cache:"no-store",signal:AbortSignal.timeout(5e3)})).ok}catch{return!1}}async function m(...e){let t=e.filter(Boolean).map(h);return!!t.length&&new Promise(e=>{let s=t.length;t.forEach(t=>t.then(t=>{t?e(!0):0==--s&&e(!1)}))})}let u=[{id:"lite",label:"Lite",desc:"Drop filler, keep grammar"},{id:"full",label:"Full",desc:"Drop articles, fragments OK"},{id:"ultra",label:"Ultra",desc:"Telegraphic, max compression"},{id:"wenyan-lite",label:"文 Lite",desc:"Classical Chinese, light compression",wenyan:!0},{id:"wenyan",label:"文 Full",desc:"Maximum 文言文, 80-90% reduction",wenyan:!0},{id:"wenyan-ultra",label:"文 Ultra",desc:"Extreme classical compression",wenyan:!0}];function p({machineId:e}){let[t,s]=(0,l.useState)([]),[n,i]=(0,l.useState)(!0),[j,v]=(0,l.useState)(!1),[N,k]=(0,l.useState)(""),[C,S]=(0,l.useState)(null),[T,E]=(0,l.useState)(null),[_,$]=(0,l.useState)(!1),[P,A]=(0,l.useState)(!0),[U,R]=(0,l.useState)(!0),[O,D]=(0,l.useState)(!1),[I,L]=(0,l.useState)(!0),[W,q]=(0,l.useState)(!1),[F,z]=(0,l.useState)("full"),[K,J]=(0,l.useState)("en"),[H,B]=(0,l.useState)(!0),[M,Q]=(0,l.useState)(!1),[V,G]=(0,l.useState)(!1),[X,Y]=(0,l.useState)(""),[Z,ee]=(0,l.useState)(""),[et,es]=(0,l.useState)(!1),[ea,el]=(0,l.useState)(""),[en,ei]=(0,l.useState)(null),[er,ec]=(0,l.useState)(!1),[eo,ed]=(0,l.useState)(!1),[ex,eh]=(0,l.useState)(!1),[em,eu]=(0,l.useState)(!1),[ep,eb]=(0,l.useState)(""),[ef,eg]=(0,l.useState)(!1),[ew,ey]=(0,l.useState)(""),[ej,ev]=(0,l.useState)(null),[eN,ek]=(0,l.useState)(""),[eC,eS]=(0,l.useState)(""),[eT,eE]=(0,l.useState)(null),[e_,e$]=(0,l.useState)(!1),[eP,eA]=(0,l.useState)([]),[eU,eR]=(0,l.useState)(""),[eO,eD]=(0,l.useState)(!1),[eI,eL]=(0,l.useState)(!1),[eW,eq]=(0,l.useState)(!1),eF=(0,l.useRef)(null),ez=(0,l.useRef)(0),eK=(0,l.useRef)(0),eJ=(0,l.useRef)(!1),eH=(0,l.useRef)(!1),eB=(0,l.useRef)(!1),eM=(0,l.useRef)(!1),[eQ,eV]=(0,l.useState)(!1),[eG,eX]=(0,l.useState)(!1),[eY,eZ]=(0,l.useState)(new Set),[e0,e1]=(0,l.useState)(!1);(0,l.useEffect)(()=>{e1(!["localhost","127.0.0.1","::1"].includes(window.location.hostname))},[]),(0,l.useEffect)(()=>(J((0,o.kk)()),(0,o.oQ)(()=>J((0,o.kk)()))),[]);let e5=d.includes(K),e2=e5?u:u.filter(e=>!e.wenyan);(0,l.useEffect)(()=>{let e=u.find(e=>e.id===F);e?.wenyan&&!e5&&(z("ultra"),tl({cavemanLevel:"ultra"}))},[e5,F]);let{copied:e3,copy:e4}=(0,c.C)(),e6=!P||!U,e7=P?"Change the default dashboard password before activating the tunnel.":'Enable "Require login" and set a custom password before activating the tunnel.';(0,l.useEffect)(()=>{eF.current&&(eF.current.scrollTop=eF.current.scrollHeight)},[eP]),(0,l.useEffect)(()=>{tn(),te()},[]),(0,l.useEffect)(()=>{if(!(M||ex))return;let e=!M||V,t=!ex||em,s=()=>{document.hidden||e8()};if(document.addEventListener("visibilitychange",s),e&&t)return()=>document.removeEventListener("visibilitychange",s);let a=setInterval(()=>{document.hidden||e8()},5e3);return()=>{clearInterval(a),document.removeEventListener("visibilitychange",s)}},[M,ex,V,em]),(0,l.useEffect)(()=>{let e=async()=>{if(!document.hidden){if(M&&(X||Z)){let e=await m(Z,X);eJ.current=e,e?(ez.current=0,G(!0),eB.current||(eB.current=!0,eV(!0))):(ez.current+=1,ez.current>=5&&G(!1))}else eJ.current=!1;if(ex&&ep){let e=await h(ep);eH.current=e,e?(eK.current=0,eu(!0),eM.current||(eM.current=!0,eX(!0))):(eK.current+=1,eK.current>=5&&eu(!1))}else eH.current=!1}};if(!(M&&(X||Z)||ex&&ep))return;e();let t=!ex||em;if((!M||V)&&t)return;let s=setInterval(e,1e4);return()=>clearInterval(s)},[M,X,Z,ex,ep,V,em]);let e9=(0,l.useCallback)((e,t,s,a,l,n)=>{t.current?(s.current=0,a(!0),l.current||(l.current=!0,n(!0))):(s.current+=1,s.current>=5&&a(!1))},[]),e8=async()=>{try{let e=await fetch("/api/tunnel/status",{cache:"no-store"});if(!e.ok)return;let t=await e.json(),s=t.tunnel?.settingsEnabled??t.tunnel?.enabled??!1,a=t.tunnel?.tunnelUrl||"";Y(a),ee(t.tunnel?.publicUrl||""),Q(s),e9(null,eJ,ez,G,eB,eV);let l=t.tailscale?.settingsEnabled??t.tailscale?.enabled??!1,n=t.tailscale?.tunnelUrl||"";eb(n),eh(l),e9(null,eH,eK,eu,eM,eX)}catch{}},te=async()=>{B(!0);try{let[e,t]=await Promise.all([fetch("/api/settings"),fetch("/api/tunnel/status",{cache:"no-store"})]);if(e.ok){let t=await e.json();$(t.requireApiKey||!1),A(!1!==t.requireLogin),R(t.hasPassword||!1),D(t.tunnelDashboardAccess||!1),L(!1!==t.rtkEnabled),q(!!t.cavemanEnabled),z(t.cavemanLevel||"full")}if(t.ok){let e=await t.json(),s=e.tunnel?.settingsEnabled??e.tunnel?.enabled??!1,a=e.tunnel?.tunnelUrl||"";Y(a),ee(e.tunnel?.publicUrl||""),Q(s),e9(null,eJ,ez,G,eB,eV);let l=e.tailscale?.settingsEnabled??e.tailscale?.enabled??!1,n=e.tailscale?.tunnelUrl||"";eb(n),eh(l),e9(null,eH,eK,eu,eM,eX)}}catch(e){console.log("Error loading settings:",e)}finally{B(!1)}},tt=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({tunnelDashboardAccess:e})})).ok&&D(e)}catch(e){console.log("Error updating tunnelDashboardAccess:",e)}},ts=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({requireApiKey:e})})).ok&&$(e)}catch(e){console.log("Error updating requireApiKey:",e)}},ta=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({rtkEnabled:e})})).ok&&L(e)}catch(e){console.log("Error updating rtkEnabled:",e)}},tl=async e=>{try{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}catch(e){console.log("Error updating setting:",e)}},tn=async()=>{try{let e=await fetch("/api/keys"),t=await e.json();e.ok&&s(t.keys||[])}catch(e){console.log("Error fetching data:",e)}finally{i(!1)}},ti=async(...e)=>{es(!0),el("Waiting for tunnel ready...");let t=e.filter(Boolean).map(e=>`${e}/api/health`),s=Date.now();for(;Date.now()-s<3e5;){if(await new Promise(e=>setTimeout(e,2e3)),await Promise.any(t.map(async e=>{if((await fetch(e,{mode:"cors",cache:"no-store"})).ok)return!0;throw Error("not ready")})).catch(()=>!1))return Q(!0),es(!1),el(""),!0;if((Date.now()-s)%1e4<2e3)try{let e=await fetch("/api/tunnel/status");if(e.ok){let t=await e.json();if(!t.tunnel?.enabled)return ei({type:"error",message:"Tunnel process stopped unexpectedly."}),es(!1),el(""),!1}}catch{}}return ei({type:"error",message:"Tunnel created but not reachable. Please try again."}),es(!1),el(""),!1},tr=async()=>{ec(!1),es(!0),ei(null),el("Creating tunnel...");let e=!0;(async()=>{for(;e;){try{let t=await fetch("/api/tunnel/status");if(t.ok){let s=await t.json();s.download?.downloading?el(`Downloading cloudflared... ${s.download.progress}%`):e&&el("Creating tunnel...")}}catch{}await new Promise(e=>setTimeout(e,1e3))}})();try{let t=await fetch("/api/tunnel/enable",{method:"POST"});e=!1;let s=await t.json();if(!t.ok)return void ei({type:"error",message:s.error||"Failed to enable tunnel"});let a=s.tunnelUrl;if(!a)return void ei({type:"error",message:"No tunnel URL returned"});Y(a),ee(s.publicUrl||""),await ti(s.publicUrl,a)}catch(e){ei({type:"error",message:e.message})}finally{e=!1,es(!1),el("")}},tc=async()=>{es(!0),ei(null);try{let e=await fetch("/api/tunnel/disable",{method:"POST"}),t=await e.json();e.ok?(Q(!1),Y(""),ed(!1),ei({type:"success",message:"Tunnel disabled"})):ei({type:"error",message:t.error||"Failed to disable tunnel"})}catch(e){ei({type:"error",message:e.message})}finally{es(!1)}},to=async()=>{eE(null);try{let e=await fetch("/api/tunnel/tailscale-check");if(e.ok){let t=await e.json();return eE(t.installed),t}}catch{}return eE(!1),{installed:!1}},td=async()=>{e$(!0),ev(null),eA([]);try{let e=await fetch("/api/tunnel/tailscale-install",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sudoPassword:eU})});eR("");let t=e.body.getReader(),s=new TextDecoder,a="";for(;;){let{done:e,value:l}=await t.read();if(e)break;let n=(a+=s.decode(l,{stream:!0})).split("\n\n");for(let e of(a=n.pop()||"",n)){let t=e.split("\n"),s="progress",a=null;for(let e of t)if(e.startsWith("event: ")&&(s=e.slice(7).trim()),e.startsWith("data: "))try{a=JSON.parse(e.slice(6))}catch{}if(a)if("progress"===s)eA(e=>[...e.slice(-50),a.message]);else if("done"===s){eE(!0),e$(!1),eL(!1),tu();return}else"error"===s&&ev({type:"error",message:a.error||"Install failed"})}}}catch(e){ev({type:"error",message:e.message})}finally{e$(!1)}},tx=async e=>{ey("Waiting for Tailscale ready...");let t=`${e}/api/health`,s=Date.now();for(;Date.now()-s<3e5;){await new Promise(e=>setTimeout(e,2e3));try{let e=await fetch(t,{mode:"no-cors",cache:"no-store"});if(e.ok||"opaque"===e.type)return!0}catch{}}return!1},th=(e,t)=>{ek(e),eS(t)},tm=()=>{ek(""),eS("")},tu=async()=>{eL(!1),eD(!0),eg(!0),ev(null),ey("Connecting..."),tm();try{let e=await fetch("/api/tunnel/tailscale-enable",{method:"POST"}),t=await e.json();if(e.ok&&t.success){eb(t.tunnelUrl||"");let e=await tx(t.tunnelUrl);eh(!0),ev(e?null:{type:"warning",message:"Connected but not reachable yet."});return}if(t.needsLogin&&t.authUrl){th(t.authUrl,"Open Login Page"),ey('Login required — click "Open Login Page" to continue');for(let e=0;e<40;e++){await new Promise(e=>setTimeout(e,3e3));try{let e=await fetch("/api/tunnel/tailscale-check");if(e.ok&&(await e.json()).loggedIn){tm(),ey("Starting funnel...");let e=await fetch("/api/tunnel/tailscale-enable",{method:"POST"}),t=await e.json();if(e.ok&&t.success){eb(t.tunnelUrl||"");let e=await tx(t.tunnelUrl);eh(!0),ev(e?null:{type:"warning",message:"Connected but not reachable yet."})}else t.funnelNotEnabled&&t.enableUrl?await tp(t.enableUrl):ev({type:"error",message:t.error||"Failed to start funnel"});return}}catch{}}tm(),ev({type:"error",message:"Login timed out. Please try again."});return}if(t.funnelNotEnabled&&t.enableUrl)return void await tp(t.enableUrl);ev({type:"error",message:t.error||"Failed to connect"})}catch(e){ev({type:"error",message:e.message})}finally{eg(!1),eD(!1),ey(""),tm()}},tp=async e=>{th(e,"Open Funnel Settings"),ey('Click "Open Funnel Settings" to enable Funnel...');for(let e=0;e<40;e++){await new Promise(e=>setTimeout(e,3e3));try{let e=await fetch("/api/tunnel/tailscale-enable",{method:"POST"}),t=await e.json();if(e.ok&&t.success){tm(),eb(t.tunnelUrl||"");let e=await tx(t.tunnelUrl);eh(!0),ev(e?null:{type:"warning",message:"Connected but not reachable yet."});return}if(t.funnelNotEnabled)continue;if(t.error){tm(),ev({type:"error",message:t.error});return}}catch{}}tm(),ev({type:"error",message:"Timed out waiting for Funnel to be enabled."})},tb=async()=>{eg(!0),ev(null);try{let e=await fetch("/api/tunnel/tailscale-disable",{method:"POST"}),t=await e.json();e.ok?(eh(!1),eb(""),eq(!1),ev({type:"success",message:"Tailscale disabled"})):ev({type:"error",message:t.error||"Failed to disable Tailscale"})}catch(e){ev({type:"error",message:e.message})}finally{eg(!1)}},tf=async()=>{ev(null),eA([]);let e=await to();e?.installed&&e?.hasCachedPassword?tu():eL(!0)},tg=async()=>{if(N.trim())try{let e=await fetch("/api/keys",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:N})}),t=await e.json();e.ok&&(S(t.key),await tn(),k(""),v(!1))}catch(e){console.log("Error creating key:",e)}},tw=async e=>{E({title:"Delete API Key",message:"Delete this API key?",onConfirm:async()=>{E(null);try{(await fetch(`/api/keys/${e}`,{method:"DELETE"})).ok&&(s(t.filter(t=>t.id!==e)),eZ(t=>{let s=new Set(t);return s.delete(e),s}))}catch(e){console.log("Error deleting key:",e)}}})},ty=async(e,t)=>{try{(await fetch(`/api/keys/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&s(s=>s.map(s=>s.id===e?{...s,isActive:t}:s))}catch(e){console.log("Error toggling key:",e)}},[tj,tv]=(0,l.useState)("/v1");return((0,l.useEffect)(()=>{tv(`${window.location.origin}/v1`)},[]),n)?(0,a.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,a.jsx)(r.Qv,{}),(0,a.jsx)(r.Qv,{})]}):(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-6 xl:grid-cols-2",children:[(0,a.jsxs)("div",{"data-section":"coral",className:"rounded-hero bg-[#1c1c1c] border border-white/[0.06] p-7 sm:p-8 text-white flex flex-col",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3.5 mb-7",children:[(0,a.jsx)("span",{className:"inline-flex items-center justify-center size-11 rounded-xl section-mark border border-white/20",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[22px]",children:"api"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold tracking-tight",children:"API Endpoint"}),(0,a.jsx)("p",{className:"text-[13px] text-white/40 mt-0.5",children:"Connect agents to every model"})]})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 flex-1",children:[(0,a.jsxs)("div",{className:"rounded-2xl bg-white/[0.03] border border-white/[0.06] p-4",children:[(0,a.jsx)("div",{className:"flex items-center justify-between mb-3",children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-white/50",children:"computer"}),(0,a.jsx)("span",{className:"text-[13px] font-medium text-white/70",children:"Apps URL"})]})}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("div",{className:"flex-1 min-w-0 rounded-[10px] bg-white/5 border border-white/10 px-3 py-2 font-mono text-[13px] text-white/80 truncate",children:tj}),(0,a.jsx)(g,{onClick:()=>e4(tj,"local_url"),icon:"local_url"===e3?"check":"content_copy",title:"Copy URL",small:!0})]})]}),(0,a.jsxs)("div",{className:"rounded-2xl bg-white/[0.03] border border-white/[0.06] p-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-white/50",children:"cloud"}),(0,a.jsx)("span",{className:"text-[13px] font-medium text-white/70",children:"Tunnel"})]}),M&&(0,a.jsxs)("span",{className:`flex items-center gap-1 text-[11px] font-medium ${V?"text-green-400":"text-amber-400"}`,children:[(0,a.jsx)("span",{className:`size-1.5 rounded-full ${V?"bg-green-400":"bg-amber-400 animate-pulse"}`}),V?"Active":eQ?"Reconnecting":"Checking"]})]}),M&&!et&&V?(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0 rounded-[10px] bg-white/5 border border-white/10 px-3 py-2 font-mono text-[13px] text-white/80 truncate",children:[Z||X,"/v1"]}),(0,a.jsx)(g,{onClick:()=>e4(`${Z||X}/v1`,"tunnel_url"),icon:"tunnel_url"===e3?"check":"content_copy",title:"Copy URL",small:!0}),(0,a.jsx)(g,{onClick:()=>ed(!0),icon:"power_settings_new",title:"Disable",danger:!0,small:!0})]}):!M||et||V?et?(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-2 rounded-[10px] bg-white/5 border border-white/10 text-[13px] text-white/50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-[14px]",children:"progress_activity"}),ea||"Creating..."]}),(0,a.jsx)(g,{onClick:()=>{es(!1),el("")},icon:"power_settings_new",title:"Stop",danger:!0,small:!0})]}):en?.type==="error"?(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("p",{className:"text-[12px] text-red-300",children:en.message}),(0,a.jsx)(r.$n,{size:"sm",icon:"cloud_upload",className:"bg-white/10 border border-white/15 text-white hover:bg-white/15",onClick:()=>ec(!0),children:"Enable"})]}):H?(0,a.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-[10px] bg-white/5 border border-white/10 text-[13px] text-white/50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-[14px]",children:"progress_activity"}),"Checking..."]}):(0,a.jsx)(r.$n,{size:"sm",icon:"cloud_upload",onClick:()=>{e6?ei({type:"error",message:`Security required: ${e7}`}):_?ec(!0):ei({type:"error",message:'Enable "Require API key" before activating the tunnel.'})},className:"bg-white/10 border border-white/15 text-white hover:bg-white/15 w-full",children:"Enable Tunnel"}):(0,a.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-[10px] border border-amber-400/20 bg-amber-400/5 text-[13px] text-amber-300",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-[14px]",children:"progress_activity"}),eQ?"Reconnecting...":"Checking..."]})]}),(0,a.jsxs)("div",{className:"rounded-2xl bg-white/[0.03] border border-white/[0.06] p-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-white/50",children:"vpn_lock"}),(0,a.jsx)("span",{className:"text-[13px] font-medium text-white/70",children:"Tailscale"})]}),ex&&(0,a.jsxs)("span",{className:`flex items-center gap-1 text-[11px] font-medium ${em?"text-green-400":"text-amber-400"}`,children:[(0,a.jsx)("span",{className:`size-1.5 rounded-full ${em?"bg-green-400":"bg-amber-400 animate-pulse"}`}),em?"Active":eG?"Reconnecting":"Checking"]})]}),ex&&!ef&&em?(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0 rounded-[10px] bg-white/5 border border-white/10 px-3 py-2 font-mono text-[13px] text-white/80 truncate",children:[ep,"/v1"]}),(0,a.jsx)(g,{onClick:()=>e4(`${ep}/v1`,"ts_url"),icon:"ts_url"===e3?"check":"content_copy",title:"Copy URL",small:!0}),(0,a.jsx)(g,{onClick:()=>eq(!0),icon:"power_settings_new",title:"Disable",danger:!0,small:!0})]}):!ex||ef||em?ef||eO?(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-2 rounded-[10px] bg-white/5 border border-white/10 text-[13px] text-white/50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-[14px]",children:"progress_activity"}),ew||"Connecting..."]}),eN&&(0,a.jsx)(r.$n,{size:"sm",icon:"open_in_new",className:"bg-white/10 border border-white/15 text-white hover:bg-white/15",onClick:()=>window.open(eN,"tailscale_auth","width=600,height=700,noopener,noreferrer"),children:eC||"Login"}),(0,a.jsx)(g,{onClick:()=>{eg(!1),eD(!1),ey(""),tm()},icon:"power_settings_new",title:"Stop",danger:!0,small:!0})]}):ej?.type==="error"?(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("p",{className:"text-[12px] text-red-300",children:ej.message}),(0,a.jsx)(r.$n,{size:"sm",icon:"vpn_lock",className:"bg-white/10 border border-white/15 text-white hover:bg-white/15",onClick:tf,children:"Enable"})]}):(0,a.jsx)(r.$n,{size:"sm",icon:"vpn_lock",onClick:()=>{e6?ev({type:"error",message:`Security required: ${e7}`}):tf()},className:"bg-gradient-to-r from-indigo-500 to-purple-500 hover:from-indigo-600 hover:to-purple-600 text-white border-0 w-full",children:"Enable Tailscale"}):(0,a.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-[10px] border border-amber-400/20 bg-amber-400/5 text-[13px] text-amber-300",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-[14px]",children:"progress_activity"}),eG?"Reconnecting...":"Checking..."]})]})]}),e6&&!M&&!ex&&(0,a.jsx)("div",{className:"mt-5",children:(0,a.jsx)(y,{message:e7,action:{label:"Open settings",href:"/dashboard/profile"},dark:!0})}),(M||ex)&&(0,a.jsxs)("div",{className:"mt-5 flex flex-col gap-2",children:[!_&&(0,a.jsx)(y,{dark:!0,message:"Require API key is disabled — your endpoint is publicly accessible without authentication.",action:{label:"Enable",href:"#require-api-key"}}),(!P||!U)&&(0,a.jsx)(y,{dark:!0,message:P?"Dashboard uses the default password — change it in Profile settings.":"Require login is disabled — anyone can access your dashboard via tunnel.",action:{label:P?"Change password":"Enable",href:"/dashboard/profile"}})]}),(M||ex)&&(0,a.jsxs)("div",{className:"mt-5 pt-4 border-t border-white/[0.06] flex items-center gap-3",children:[(0,a.jsx)(w,{checked:O,onChange:()=>tt(!O)}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("p",{className:"text-[13px] text-white/60",children:"Allow dashboard access via tunnel"}),(0,a.jsx)(f,{text:"When enabled, the dashboard can be accessed through your tunnel or Tailscale URL (login still required). When disabled, dashboard access via tunnel/Tailscale is completely blocked."})]})]})]}),(0,a.jsxs)("div",{id:"rtk","data-section":"coral",className:"rounded-hero bg-[#1c1c1c] border border-white/[0.06] p-7 sm:p-8 text-white flex flex-col",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3.5 mb-7",children:[(0,a.jsx)("span",{className:"inline-flex items-center justify-center size-11 rounded-xl section-mark border border-white/20",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[22px]",children:"bolt"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold tracking-tight",children:"Token Saver"}),(0,a.jsx)("p",{className:"text-[13px] text-white/40 mt-0.5",children:"Reduce token usage"})]})]}),(0,a.jsx)("div",{className:"rounded-2xl bg-white/[0.03] border border-white/[0.06] p-5 mb-4",children:(0,a.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("p",{className:"text-[14px] font-medium text-white/90",children:"Compress tool output"}),(0,a.jsx)("span",{className:"px-1.5 py-0.5 rounded text-[10px] font-semibold bg-brand-coral-mm/15 text-brand-coral-mm",children:"RTK"})]}),(0,a.jsx)("p",{className:"text-[12px] text-white/35 mt-1.5 leading-relaxed",children:"git / grep / ls / tree / logs → 60-90% fewer input tokens"}),(0,a.jsxs)("a",{href:"https://github.com/rtk-ai/rtk",target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 text-[11px] text-white/25 hover:text-white/50 mt-2 transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"open_in_new"}),"github.com/rtk-ai/rtk"]})]}),(0,a.jsx)(w,{checked:I,onChange:()=>ta(!I)})]})}),(0,a.jsxs)("div",{className:"rounded-2xl bg-white/[0.03] border border-white/[0.06] p-5",children:[(0,a.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("p",{className:"text-[14px] font-medium text-white/90",children:"Compress LLM output"}),(0,a.jsx)("span",{className:"px-1.5 py-0.5 rounded text-[10px] font-semibold bg-brand-purple/15 text-brand-purple",children:"Caveman"})]}),(0,a.jsx)("p",{className:"text-[12px] text-white/35 mt-1.5 leading-relaxed",children:"Terse system prompt → ~65% fewer output tokens"}),(0,a.jsxs)("a",{href:"https://github.com/JuliusBrussee/caveman",target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 text-[11px] text-white/25 hover:text-white/50 mt-2 transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"open_in_new"}),"github.com/.../caveman"]})]}),(0,a.jsx)(w,{checked:W,onChange:()=>{var e;q(e=!W),tl({cavemanEnabled:e})}})]}),W&&(0,a.jsxs)("div",{className:"mt-4 pt-4 border-t border-white/[0.06]",children:[(0,a.jsx)("p",{className:"text-[11px] font-semibold text-white/40 uppercase tracking-wider mb-2.5",children:"Compression level"}),(0,a.jsx)("div",{className:"flex items-center gap-1.5",children:e2.map(e=>(0,a.jsx)("button",{onClick:()=>{var t;z(t=e.id),tl({cavemanLevel:t})},className:`px-3 py-1.5 rounded-full text-[11px] font-semibold border transition-colors ${F===e.id?"bg-white text-[#1c1c1c] border-white":"bg-transparent border-white/10 text-white/40 hover:bg-white/5 hover:text-white/70"}`,title:e.desc,children:e.label},e.id))}),(0,a.jsx)("p",{className:"text-[11px] text-white/30 mt-2.5",children:u.find(e=>e.id===F)?.desc})]})]}),(0,a.jsx)("div",{className:"flex-1"})]}),(0,a.jsxs)("div",{id:"require-api-key","data-section":"coral",className:"xl:col-span-2 rounded-hero bg-[#1c1c1c] border border-white/[0.06] p-7 sm:p-8 text-white flex flex-col",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-7",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3.5",children:[(0,a.jsx)("span",{className:"inline-flex items-center justify-center size-11 rounded-xl section-mark border border-white/20",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[22px]",children:"vpn_key"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold tracking-tight",children:"API Keys"}),(0,a.jsx)("p",{className:"text-[13px] text-white/40 mt-0.5",children:"Authenticate requests"})]})]}),(0,a.jsx)(r.$n,{size:"sm",icon:"add",className:"bg-white text-[#1c1c1c] hover:bg-white/90 border-0 font-semibold",onClick:()=>v(!0),children:"Create Key"})]}),(0,a.jsx)("div",{className:"rounded-2xl bg-white/[0.03] border border-white/[0.06] px-4 py-3.5 mb-5",children:(0,a.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("p",{className:"text-[14px] font-medium text-white/90",children:"Require API key"}),(0,a.jsx)("p",{className:"text-[12px] text-white/35 mt-0.5",children:"Reject unauthenticated requests"})]}),(0,a.jsx)(w,{checked:_,onChange:()=>ts(!_)})]})}),e0&&!_&&(0,a.jsx)("div",{className:"mb-4",children:(0,a.jsx)(y,{dark:!0,message:"Endpoint is exposed without an API key."})}),0===t.length?(0,a.jsxs)("div",{className:"flex-1 flex flex-col items-center justify-center py-10",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[40px] text-white/15 mb-3",children:"vpn_key_off"}),(0,a.jsx)("p",{className:"text-white/70 font-medium mb-1",children:"No API keys yet"}),(0,a.jsx)("p",{className:"text-[13px] text-white/35 mb-5",children:"Create your first key to get started"}),(0,a.jsx)(r.$n,{icon:"add",className:"bg-white text-[#1c1c1c] hover:bg-white/90 border-0 font-semibold",onClick:()=>v(!0),children:"Create Key"})]}):(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full",children:[(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{className:"border-b border-white/[0.08]",children:[(0,a.jsx)("th",{className:"text-left text-[11px] font-semibold text-white/40 uppercase tracking-wider pb-3 pr-4",children:"Token Name"}),(0,a.jsx)("th",{className:"text-left text-[11px] font-semibold text-white/40 uppercase tracking-wider pb-3 pr-4",children:"Token"}),(0,a.jsx)("th",{className:"text-right text-[11px] font-semibold text-white/40 uppercase tracking-wider pb-3",children:"Action"})]})}),(0,a.jsx)("tbody",{children:t.map(e=>(0,a.jsxs)("tr",{className:`group border-b border-white/[0.04] last:border-b-0 ${!1===e.isActive?"opacity-40":""}`,children:[(0,a.jsx)("td",{className:"py-3.5 pr-4",children:(0,a.jsx)("p",{className:"text-[13px] font-semibold text-white/90",children:e.name})}),(0,a.jsx)("td",{className:"py-3.5 pr-4",children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("code",{className:"text-[11px] text-white/35 font-mono select-all",children:eY.has(e.id)?e.key:e.key.slice(0,5)+"*".repeat(Math.max(0,e.key.length-5))}),(0,a.jsx)(g,{icon:eY.has(e.id)?"visibility_off":"visibility",onClick:()=>{var t;return t=e.id,void eZ(e=>{let s=new Set(e);return s.has(t)?s.delete(t):s.add(t),s})},title:eY.has(e.id)?"Hide":"Show",small:!0}),(0,a.jsx)(g,{icon:e3===e.id?"check":"content_copy",onClick:()=>e4(e.key,e.id),title:"Copy key",small:!0})]})}),(0,a.jsx)("td",{className:"py-3.5 text-right",children:(0,a.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>{let t=!(e.isActive??!0);e.isActive&&!t?E({title:"Pause API Key",message:`Pause "${e.name}"? It will stop working but can be resumed.`,onConfirm:async()=>{E(null),ty(e.id,t)}}):ty(e.id,t)},className:`cursor-pointer inline-flex items-center gap-1.5 px-3 py-1.5 rounded-full text-[11px] font-semibold border transition-colors ${e.isActive??!0?"bg-green-500/10 border-green-500/20 text-green-400 hover:bg-green-500/15":"bg-white/5 border-white/10 text-white/40 hover:bg-white/10"}`,title:e.isActive??!0?"Pause key":"Resume key",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:e.isActive??!0?"play_circle":"pause_circle"}),e.isActive??!0?"Active":"Inactive"]}),(0,a.jsxs)("button",{type:"button",onClick:()=>tw(e.id),className:"cursor-pointer inline-flex items-center gap-1.5 px-3 py-1.5 rounded-full text-[11px] font-semibold border border-red-500/20 bg-red-500/10 text-red-400 hover:bg-red-500/15 transition-colors",title:"Delete",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"delete"}),"Delete"]})]})})]},e.id))})]})})]}),(0,a.jsx)(r.aF,{isOpen:j,title:"Create API Key",onClose:()=>{v(!1),k("")},children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)("input",{value:N,onChange:e=>k(e.target.value),placeholder:"Production Key",className:"w-full py-2.5 px-3 text-sm text-[#f5f5f5] bg-[#1f1f1f] rounded-[10px] border border-white/10 placeholder:text-white/30 focus:outline-none focus:border-white/30 transition-colors text-[16px] sm:text-sm"}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(r.$n,{onClick:tg,fullWidth:!0,disabled:!N.trim(),children:"Create"}),(0,a.jsx)(r.$n,{onClick:()=>{v(!1),k("")},variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}),(0,a.jsx)(r.aF,{isOpen:!!C,title:"API Key Created",onClose:()=>S(null),children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"bg-amber-500/10 border border-amber-500/20 rounded-lg p-4",children:[(0,a.jsx)("p",{className:"text-sm text-amber-300 mb-2 font-medium",children:"Save this key now!"}),(0,a.jsx)("p",{className:"text-sm text-amber-200/70",children:"This is the only time you will see this key. Store it securely."})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)("input",{value:C||"",readOnly:!0,className:"flex-1 py-2.5 px-3 text-sm text-[#f5f5f5] bg-[#1f1f1f] rounded-[10px] border border-white/10 font-mono focus:outline-none text-[16px] sm:text-sm"}),(0,a.jsx)(r.$n,{variant:"secondary",icon:"created_key"===e3?"check":"content_copy",onClick:()=>e4(C,"created_key"),children:"created_key"===e3?"Copied!":"Copy"})]}),(0,a.jsx)(r.$n,{onClick:()=>S(null),fullWidth:!0,children:"Done"})]})}),(0,a.jsx)(r.aF,{isOpen:er,title:"Enable Tunnel",onClose:()=>ec(!1),children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)("div",{className:"bg-white/5 border border-white/10 rounded-lg p-4",children:(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-white/70",children:"cloud_upload"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm text-white/90 font-medium mb-1",children:"Cloudflare Tunnel"}),(0,a.jsx)("p",{className:"text-sm text-white/50",children:"Expose your local 9Router to the internet. No port forwarding, no static IP needed."})]})]})}),(0,a.jsx)("div",{className:"grid grid-cols-2 gap-3",children:x.map(e=>(0,a.jsxs)("div",{className:"flex flex-col items-center text-center p-3 rounded-lg bg-white/5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-xl text-white/70 mb-1",children:e.icon}),(0,a.jsx)("p",{className:"text-xs font-semibold text-white/90",children:e.title}),(0,a.jsx)("p",{className:"text-xs text-white/40",children:e.desc})]},e.title))}),(0,a.jsx)("p",{className:"text-xs text-white/40",children:"Requires outbound port 7844 (TCP/UDP). Connection may take 10-30s."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(r.$n,{onClick:tr,fullWidth:!0,children:"Start Tunnel"}),(0,a.jsx)(r.$n,{onClick:()=>ec(!1),variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}),(0,a.jsx)(r.aF,{isOpen:eo,title:"Disable Tunnel",onClose:()=>!et&&ed(!1),children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)("p",{className:"text-sm text-white/50",children:"The Cloudflare tunnel will be disconnected. Remote access via tunnel URL will stop working."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(r.$n,{onClick:tc,fullWidth:!0,disabled:et,variant:"danger",children:et?"Disabling...":"Disable"}),(0,a.jsx)(r.$n,{onClick:()=>ed(!1),variant:"ghost",fullWidth:!0,disabled:et,children:"Cancel"})]})]})}),(0,a.jsx)(r.aF,{isOpen:eI,title:"Tailscale Funnel",onClose:()=>{e_||(eL(!1),eR(""),ev(null))},children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[null===eT&&(0,a.jsxs)("p",{className:"text-sm text-white/50 flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"})," ","Checking..."]}),!1===eT&&!e_&&(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsx)("p",{className:"text-sm text-white/50",children:"Tailscale is not installed. Install it to enable Funnel."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(r.$n,{onClick:td,fullWidth:!0,children:"Install Tailscale"}),(0,a.jsx)(r.$n,{onClick:()=>eL(!1),variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),e_&&(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm text-white/50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"})," ","Installing Tailscale..."]}),eP.length>0&&(0,a.jsx)("div",{ref:eF,className:"bg-black/30 rounded p-2 max-h-40 overflow-y-auto font-mono text-xs text-white/50",children:eP.map((e,t)=>(0,a.jsx)("div",{children:e},t))})]}),!0===eT&&!e_&&(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm text-green-400",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"check_circle"})," ","Tailscale installed"]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(r.$n,{onClick:()=>tu(),fullWidth:!0,children:"Connect"}),(0,a.jsx)(r.$n,{onClick:()=>eL(!1),variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),ej&&(0,a.jsx)(b,{status:ej})]})}),(0,a.jsx)(r.aF,{isOpen:eW,title:"Disable Tailscale",onClose:()=>!ef&&eq(!1),children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)("p",{className:"text-sm text-white/50",children:"Tailscale Funnel will be stopped. Remote access via Tailscale URL will stop working."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(r.$n,{onClick:tb,fullWidth:!0,disabled:ef,variant:"danger",children:ef?"Disabling...":"Disable"}),(0,a.jsx)(r.$n,{onClick:()=>eq(!1),variant:"ghost",fullWidth:!0,disabled:ef,children:"Cancel"})]})]})}),(0,a.jsx)(r.uo,{isOpen:!!T,onClose:()=>E(null),onConfirm:T?.onConfirm,title:T?.title||"Confirm",message:T?.message,variant:"danger"})]})}function b({status:e,className:t=""}){return(0,a.jsx)("div",{className:`p-2 rounded text-sm ${t} ${"success"===e.type?"bg-green-500/10 text-green-600 dark:text-green-400":"warning"===e.type?"bg-yellow-500/10 text-yellow-600 dark:text-yellow-400":"info"===e.type?"bg-blue-500/10 text-blue-600 dark:text-blue-400":"bg-red-500/10 text-red-600 dark:text-red-400"}`,children:e.message.split(/(https?:\/\/[^\s]+)/g).map((e,t)=>/^https?:\/\//.test(e)?(0,a.jsx)("a",{href:e,target:"_blank",rel:"noreferrer",className:"underline font-medium",children:e},t):e)})}function f({text:e}){return(0,a.jsxs)("span",{className:"relative group inline-flex items-center",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-white/35 cursor-help",children:"help"}),(0,a.jsx)("span",{className:"pointer-events-none absolute left-5 top-1/2 -translate-y-1/2 z-50 w-64 rounded-lg bg-[#111] border border-white/10 text-white/80 text-xs px-2.5 py-1.5 opacity-0 group-hover:opacity-100 transition-opacity shadow-lg",children:e})]})}function g({icon:e,onClick:t,title:s,danger:l,small:n}){return(0,a.jsx)("button",{onClick:t,title:s,className:`inline-flex items-center justify-center rounded-full transition-colors shrink-0 ${n?"size-7":"size-9"} ${l?"hover:bg-red-400/10 text-red-400/70 hover:text-red-400":"hover:bg-white/10 text-white/50 hover:text-white/90"}`,children:(0,a.jsx)("span",{className:`material-symbols-outlined ${n?"text-[14px]":"text-[18px]"}`,children:e})})}function w({checked:e,onChange:t,size:s="md",title:l}){let n={sm:{track:"w-8 h-4",thumb:"size-3",translate:"translate-x-4"},md:{track:"w-11 h-6",thumb:"size-5",translate:"translate-x-5"}},i=n[s]||n.md;return(0,a.jsx)("button",{type:"button",role:"switch","aria-checked":e,title:l,onClick:()=>t&&t(!e),className:`relative inline-flex shrink-0 cursor-pointer rounded-full transition-colors duration-200 ${e?"bg-white":"bg-white/15"} ${i.track}`,children:(0,a.jsx)("span",{className:`pointer-events-none inline-block rounded-full shadow-sm transform transition duration-200 ${e?i.translate:"translate-x-0.5"} ${i.thumb} mt-0.5 ${e?"bg-[#1c1c1c]":"bg-white/80"}`})})}function y({message:e,action:t,dark:s}){return(0,a.jsxs)("div",{className:`flex items-center gap-2 px-3 py-2.5 rounded-xl border text-xs ${s?"bg-amber-400/5 border-amber-400/15 text-amber-300":"bg-amber-500/10 border-amber-500/20 text-amber-700 dark:text-amber-400"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] shrink-0",children:"warning"}),(0,a.jsx)("p",{className:"flex-1",children:e}),t&&(0,a.jsx)("a",{href:t.href,className:"font-medium underline shrink-0 hover:opacity-80",onClick:t.href.startsWith("#")?e=>{e.preventDefault(),document.getElementById(t.href.slice(1))?.scrollIntoView({behavior:"smooth"})}:void 0,children:t.label})]})}p.propTypes={machineId:i().string.isRequired}}}]);
|
package/app/.next-cli-build/static/chunks/{6069-ab59ce65effa2700.js → 6069-969bb675f612a35c.js}
RENAMED
|
@@ -36,7 +36,7 @@ model = "${w}"
|
|
|
36
36
|
provider: "custom"
|
|
37
37
|
base_url: "${V()}"
|
|
38
38
|
`},{filename:"~/.hermes/.env",content:`OPENAI_API_KEY=${j}
|
|
39
|
-
`}])})]})}var w=s(11059);function k({toolId:e,tool:t,isExpanded:s,onToggle:n,baseUrl:o,apiKeys:d,activeProviders:c=[],cloudEnabled:m=!1,tunnelEnabled:x=!1}){let[p,h]=(0,a.useState)(null),[g,f]=(0,a.useState)(!1),[y,b]=(0,a.useState)(""),[j,N]=(0,a.useState)(()=>d?.length>0?d[0].key:""),v=e=>{let t=j&&j.trim()?j:m?"your-api-key":"sk_9router",s=o||"http://localhost:20128",l=s.endsWith("/v1")?s:`${s}/v1`;return e.replace(/\{\{baseUrl\}\}/g,l).replace(/\{\{apiKey\}\}/g,t).replace(/\{\{model\}\}/g,y||"provider/model-id")},{copy:C}=(0,w.C)(),_=async(e,t)=>{await C(v(e),`toolcard-${t}`),h(t),setTimeout(()=>h(null),2e3)},S=c.length>0,E=()=>(!t.requiresExternalUrl||!!m||!!x)&&(!t.requiresCloud||!!m);return(0,l.jsxs)(r.Zp,{padding:"xs",className:"overflow-hidden overflow-x-hidden",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:n,children:[(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[(0,l.jsx)("div",{className:"size-8 rounded-lg flex items-center justify-center shrink-0",children:t.image?(0,l.jsx)(i.default,{src:t.image,alt:t.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:e=>{e.target.style.display="none"}}):t.icon?(0,l.jsx)("span",{className:"material-symbols-outlined text-xl",style:{color:t.color},children:t.icon}):(0,l.jsx)(i.default,{src:`/providers/${e}.png`,alt:t.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:e=>{e.target.style.display="none"}})}),(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsx)("h3",{className:"font-medium text-sm",children:t.name}),(0,l.jsx)("p",{className:"text-xs text-text-muted truncate",children:t.description})]})]}),(0,l.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${s?"rotate-180":""}`,children:"expand_more"})]}),s&&(0,l.jsx)("div",{className:"mt-6 pt-6 border-t border-border",children:t.guideSteps?(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[t.notes&&0!==t.notes.length?(0,l.jsx)("div",{className:"flex flex-col gap-2 mb-4",children:t.notes.map((e,t)=>{if("cloudCheck"===e.type&&(m||x))return null;let s="warning"===e.type,a="cloudCheck"===e.type&&!m&&!x,r="bg-blue-500/10 border-blue-500/30",i="text-blue-600 dark:text-blue-400",n="text-blue-500",o="info";return s?(r="bg-yellow-500/10 border-yellow-500/30",i="text-yellow-600 dark:text-yellow-400",n="text-yellow-500",o="warning"):a&&(r="bg-red-500/10 border-red-500/30",i="text-red-600 dark:text-red-400",n="text-red-500",o="error"),(0,l.jsxs)("div",{className:`flex items-start gap-3 p-3 rounded-lg border ${r}`,children:[(0,l.jsx)("span",{className:`material-symbols-outlined text-lg ${n}`,children:o}),(0,l.jsx)("p",{className:`text-sm ${i}`,children:e.text})]},t)})}):null,E()&&t.guideSteps.map(e=>(0,l.jsxs)("div",{className:"flex items-start gap-4",children:[(0,l.jsx)("div",{className:"size-8 rounded-full flex items-center justify-center shrink-0 text-sm font-semibold text-white",style:{backgroundColor:t.color},children:e.step}),(0,l.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,l.jsx)("p",{className:"font-medium text-text",children:e.title}),e.desc&&(0,l.jsx)("p",{className:"text-sm text-text-muted mt-0.5",children:e.desc}),"apiKeySelector"===e.type&&(0,l.jsx)("div",{className:"mt-2 flex flex-col sm:flex-row sm:items-center gap-2",children:(0,l.jsx)(u,{value:j,onChange:N,apiKeys:d,cloudEnabled:m,className:"flex-1"})}),"modelSelector"===e.type&&(0,l.jsxs)("div",{className:"mt-2 flex flex-col sm:flex-row sm:items-center gap-2",children:[(0,l.jsx)("input",{type:"text",value:y,onChange:e=>b(e.target.value),placeholder:"provider/model-id",className:"w-full sm:w-auto flex-1 px-3 py-2 bg-bg-secondary rounded-lg text-sm border border-border focus:outline-none focus:ring-1 focus:ring-primary/50"}),(0,l.jsx)("button",{onClick:()=>f(!0),disabled:!S,className:`shrink-0 px-3 py-2 rounded-lg border text-sm transition-colors ${S?"bg-bg-secondary border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select Model"}),y&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("button",{onClick:()=>_(y,"model"),className:"shrink-0 px-3 py-2 bg-bg-secondary hover:bg-bg-tertiary rounded-lg border border-border transition-colors",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-lg",children:"model"===p?"check":"content_copy"})}),(0,l.jsx)("button",{onClick:()=>b(""),className:"p-2 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-lg",children:"close"})})]})]}),e.value&&(0,l.jsxs)("div",{className:"mt-2 flex flex-col sm:flex-row sm:items-center gap-2",children:[(0,l.jsx)("code",{className:"w-full sm:w-auto flex-1 px-3 py-2 bg-bg-secondary rounded-lg text-sm font-mono border border-border truncate",children:v(e.value)}),e.copyable&&(0,l.jsx)("button",{onClick:()=>_(e.value,`${e.step}-${e.title}`),className:"shrink-0 px-3 py-2 bg-bg-secondary hover:bg-bg-tertiary rounded-lg border border-border transition-colors",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-lg",children:p===`${e.step}-${e.title}`?"check":"content_copy"})})]})]})]},e.step)),E()&&t.codeBlock&&(0,l.jsxs)("div",{className:"mt-2",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,l.jsx)("span",{className:"text-xs text-text-muted uppercase tracking-wide",children:t.codeBlock.language}),(0,l.jsxs)("button",{onClick:()=>_(t.codeBlock.code,"codeblock"),className:"flex items-center gap-1 px-2 py-1 text-xs bg-bg-secondary hover:bg-bg-tertiary rounded border border-border transition-colors",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-sm",children:"codeblock"===p?"check":"content_copy"}),"codeblock"===p?"Copied!":"Copy"]})]}),(0,l.jsx)("pre",{className:"p-4 bg-bg-secondary rounded-lg border border-border overflow-x-auto",children:(0,l.jsx)("code",{className:"text-sm font-mono whitespace-pre",children:v(t.codeBlock.code)})})]})]}):(0,l.jsx)("p",{className:"text-text-muted text-sm",children:"Coming soon..."})}),(0,l.jsx)(r.rq,{isOpen:g,onClose:()=>f(!1),onSelect:e=>{b(e.value)},selectedModel:y,activeProviders:c,title:"Select Model"})]})}function C({tool:e,isExpanded:t,onToggle:s,baseUrl:n,apiKeys:o,activeProviders:d,cloudEnabled:c,initialStatus:m,tunnelEnabled:p,tunnelPublicUrl:h,tailscaleEnabled:f,tailscaleUrl:y}){let b,j,N,v,w,[k,_]=(0,a.useState)(m||null),[S,E]=(0,a.useState)(!1),[A,O]=(0,a.useState)(!1),[M,P]=(0,a.useState)(!1),[$,I]=(0,a.useState)(null),[R,U]=(0,a.useState)(!1),[T,K]=(0,a.useState)(""),[z,D]=(0,a.useState)(""),[F,L]=(0,a.useState)(""),[q,H]=(0,a.useState)(!1),[B,W]=(0,a.useState)(!1),[J,G]=(0,a.useState)({}),[V,Y]=(0,a.useState)(!1),[Z,Q]=(0,a.useState)(""),[X,ee]=(0,a.useState)([]),[et,es]=(0,a.useState)(""),el=(0,a.useRef)([]);(0,a.useEffect)(()=>{el.current=X},[X]),(0,a.useEffect)(()=>{o?.length>0&&!T&&K(o[0].key)},[o,T]),(0,a.useEffect)(()=>{m&&_(m)},[m]),(0,a.useEffect)(()=>{t&&!k&&(eo(),ea()),t&&ea()},[t]),(0,a.useEffect)(()=>{k?.opencode?.models&&ee(k.opencode.models),k?.opencode?.activeModel&&es(k.opencode.activeModel),k?.config?.agent?.explorer?.model?.startsWith("9router/")&&L(k.config.agent.explorer.model.replace("9router/",""))},[k]);let ea=async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&G(t.aliases||{})}catch(e){console.log("Error fetching model aliases:",e)}},er=async e=>{try{let t=T&&T.trim()||c?T:"sk_9router",s=e.includes(et)?et:e[0]||"";await fetch("/api/cli-tools/opencode-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:en(),apiKey:t,models:e,activeModel:s,subagentModel:F})})}catch(e){console.log("Error saving models:",e)}},ei=k?.installed?k.config&&k.has9Router?g(k.config?.provider?.["9router"]?.options?.baseURL||"",{tunnelPublicUrl:h,tailscaleUrl:y})?"configured":"other":"not_configured":null,en=()=>{let e=Z||n;return e.endsWith("/v1")?e:`${e}/v1`},eo=async()=>{E(!0);try{let e=await fetch("/api/cli-tools/opencode-settings"),t=await e.json();_(t)}catch(e){_({installed:!1,error:e.message})}finally{E(!1)}},ed=async()=>{O(!0),I(null);try{let e=T&&T.trim()||c?T:"sk_9router",t=await fetch("/api/cli-tools/opencode-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:en(),apiKey:e,models:X,activeModel:""===et?"":et||X[0],subagentModel:F})}),s=await t.json();t.ok?(I({type:"success",text:"Settings applied successfully!"}),eo()):I({type:"error",text:s.error||"Failed to apply settings"})}catch(e){I({type:"error",text:e.message})}finally{O(!1)}},ec=async()=>{P(!0),I(null);try{let e=await fetch("/api/cli-tools/opencode-settings",{method:"DELETE"}),t=await e.json();e.ok?(I({type:"success",text:"Settings reset successfully!"}),D(""),L(""),ee([]),es(""),eo()):I({type:"error",text:t.error||"Failed to reset settings"})}catch(e){I({type:"error",text:e.message})}finally{P(!1)}};return(0,l.jsxs)(r.Zp,{padding:"xs",className:"overflow-hidden",children:[(0,l.jsxs)("div",{className:"flex items-start justify-between gap-3 hover:cursor-pointer sm:items-center",onClick:s,children:[(0,l.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,l.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,l.jsx)(i.default,{src:"/providers/opencode.png",alt:e.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:e=>{e.target.style.display="none"}})}),(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[(0,l.jsx)("h3",{className:"font-medium text-sm",children:e.name}),"configured"===ei&&(0,l.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"===ei&&(0,l.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"===ei&&(0,l.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,l.jsx)("p",{className:"text-xs text-text-muted truncate",children:e.description})]})]}),(0,l.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${t?"rotate-180":""}`,children:"expand_more"})]}),t&&(0,l.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[S&&(0,l.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,l.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,l.jsx)("span",{children:"Checking OpenCode CLI..."})]}),!S&&k&&!k.installed&&(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsxs)("div",{className:"flex flex-col gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,l.jsxs)("div",{className:"flex items-start gap-3",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,l.jsxs)("div",{className:"flex-1",children:[(0,l.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:"OpenCode CLI not detected locally"}),(0,l.jsx)("p",{className:"text-sm text-text-muted",children:"Manual configuration is still available if 9router is deployed on a remote server."})]})]}),(0,l.jsxs)("div",{className:"flex items-center gap-2 pl-9",children:[(0,l.jsxs)(r.$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,l.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:"content_copy"}),"Manual Config"]}),(0,l.jsxs)(r.$n,{variant:"outline",size:"sm",onClick:()=>U(!R),children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:R?"expand_less":"help"}),R?"Hide":"How to Install"]})]})]}),R&&(0,l.jsxs)("div",{className:"p-4 bg-surface border border-border rounded-lg",children:[(0,l.jsx)("h4",{className:"font-medium mb-3",children:"Installation Guide"}),(0,l.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{className:"text-text-muted mb-1",children:"macOS / Linux:"}),(0,l.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,l.jsxs)("p",{className:"text-text-muted",children:["After installation, run ",(0,l.jsx)("code",{className:"px-1 bg-black/5 dark:bg-white/5 rounded",children:"opencode"})," to verify."]})]})]})]}),!S&&k?.installed&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr] sm:items-center sm:gap-2",children:[(0,l.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Select Endpoint"}),(0,l.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,l.jsx)(x,{value:Z||Z||`${n}/v1`,onChange:Q,requiresExternalUrl:e.requiresExternalUrl,tunnelEnabled:p,tunnelPublicUrl:h,tailscaleEnabled:f,tailscaleUrl:y})]}),k?.config?.provider?.["9router"]?.options?.baseURL&&(0,l.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,l.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Current"}),(0,l.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,l.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:k.config.provider["9router"].options.baseURL})]}),(0,l.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,l.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"API Key"}),(0,l.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,l.jsx)(u,{value:T,onChange:K,apiKeys:o,cloudEnabled:c})]}),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr] sm:items-start sm:gap-2",children:[(0,l.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right pt-1",children:"Models"}),(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px] mt-1.5",children:"arrow_forward"}),(0,l.jsxs)("div",{className:"flex-1 flex flex-col gap-2",children:[(0,l.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===X.length?(0,l.jsx)("span",{className:"text-xs text-text-muted",children:"No models selected"}):X.map(e=>(0,l.jsxs)("span",{onClick:async()=>{if(e===et)try{(await fetch("/api/cli-tools/opencode-settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({clearActiveModel:!0})})).ok&&(es(""),eo())}catch(e){console.log("Error clearing active model:",e)}else es(e)},className:`inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs cursor-pointer transition-colors ${e===et?"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:e===et?"Click to clear active model":"Click to set as active",children:[e===et&&(0,l.jsx)("span",{className:"material-symbols-outlined text-[10px]",children:"star"}),e,(0,l.jsx)("button",{onClick:async t=>{t.stopPropagation();try{if((await fetch(`/api/cli-tools/opencode-settings?model=${encodeURIComponent(e)}`,{method:"DELETE"})).ok){let t=X.filter(t=>t!==e);ee(t),et===e&&es(""),eo()}}catch(e){console.log("Error removing model:",e)}},className:"ml-0.5 hover:text-red-500",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"close"})})]},e))}),(0,l.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,l.jsx)("button",{onClick:()=>H(!0),disabled:!d?.length,className:`px-2 py-1 rounded border text-xs transition-colors ${d?.length?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Add Model"}),(0,l.jsx)("span",{className:"text-xs text-text-muted",children:X.length>0&&et?(0,l.jsxs)(l.Fragment,{children:["Active: ",(0,l.jsx)("span",{className:"text-primary",children:et})]}):X.length>0?(0,l.jsx)("span",{className:"text-yellow-500",children:"Click a model to set/clear active"}):"Select models to add"})]})]})]}),(0,l.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,l.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Subagent Model"}),(0,l.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,l.jsx)("input",{type:"text",value:F,onChange:e=>L(e.target.value),placeholder:z||"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,l.jsx)("button",{onClick:()=>W(!0),disabled:!d?.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 ${d?.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,l.jsx)("button",{onClick:()=>L(""),className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear (will use main model)",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})]}),$&&(0,l.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===$.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===$.type?"check_circle":"error"}),(0,l.jsx)("span",{children:$.text})]}),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,l.jsxs)(r.$n,{variant:"primary",size:"sm",onClick:ed,disabled:0===X.length,loading:A,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,l.jsxs)(r.$n,{variant:"outline",size:"sm",onClick:ec,disabled:!k.has9Router,loading:M,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,l.jsxs)(r.$n,{variant:"ghost",size:"sm",onClick:()=>Y(!0),children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]})]})]})]}),(0,l.jsx)(r.rq,{isOpen:q,onClose:()=>{H(!1),er(el.current)},onSelect:e=>{!X.includes(e.value)&&(ee([...X,e.value]),et||es(e.value))},onDeselect:e=>{let t=X.filter(t=>t!==e.value);ee(t),et===e.value&&es(t[0]||"")},selectedModel:null,activeProviders:d,modelAliases:J,addedModelValues:X,closeOnSelect:!1,title:"Add Model for OpenCode"}),(0,l.jsx)(r.rq,{isOpen:B,onClose:()=>W(!1),onSelect:e=>{L(e.value),W(!1)},selectedModel:F,activeProviders:d,modelAliases:J,title:"Select Subagent Model for OpenCode"}),(0,l.jsx)(r.uR,{isOpen:V,onClose:()=>Y(!1),title:"OpenCode - Manual Configuration",configs:(b=T&&T.trim()?T:c?"<API_KEY_FROM_DASHBOARD>":"sk_9router",j=X.length>0?X:["provider/model-id"],N=et||X[0]||j[0],v=F||N,w={},j.forEach(e=>{w[e]={name:e,modalities:{input:["text","image"],output:["text"]}}}),[{filename:"~/.config/opencode/opencode.json",content:JSON.stringify({provider:{"9router":{npm:"@ai-sdk/openai-compatible",options:{baseURL:en(),apiKey:b},models:w}},model:`9router/${N}`,agent:{explorer:{description:"Fast explorer subagent for codebase exploration",mode:"subagent",model:`9router/${v}`}}},null,2)}])})]})}let _="/api/cli-tools/cowork-settings",S=e=>(e||"").replace(/\/v1\/?$/,"");function E({tool:e,isExpanded:t,onToggle:s,baseUrl:n,apiKeys:o,activeProviders:d,hasActiveProviders:c,cloudEnabled:m,cloudUrl:p,tunnelEnabled:h,tunnelPublicUrl:g,tailscaleEnabled:f,tailscaleUrl:y,initialStatus:b}){let j,N,v,w,[k,C]=(0,a.useState)(b||null),[A,O]=(0,a.useState)(!1),[M,P]=(0,a.useState)(!1),[$,I]=(0,a.useState)(!1),[R,U]=(0,a.useState)(null),[T,K]=(0,a.useState)(""),[z,D]=(0,a.useState)([]),[F,L]=(0,a.useState)(!1),[q,H]=(0,a.useState)(""),[B,W]=(0,a.useState)([]),[J,G]=(0,a.useState)([]),[V,Y]=(0,a.useState)([]),[Z,Q]=(0,a.useState)({}),[X,ee]=(0,a.useState)(!1),[et,es]=(0,a.useState)(!1),[el,ea]=(0,a.useState)(!1),[er,ei]=(0,a.useState)(!1),[en,eo]=(0,a.useState)({type:"url",name:"",url:"",command:"",args:""});(0,a.useEffect)(()=>{o?.length>0&&!T&&K(o[0].key)},[o,T]),(0,a.useEffect)(()=>{b&&C(b)},[b]),(0,a.useEffect)(()=>{t&&!k&&ed()},[t]),(0,a.useEffect)(()=>{t&&fetch("/api/models/alias").then(e=>e.ok?e.json():null).then(e=>{e&&Q(e.aliases||{})}).catch(()=>{})},[t]),(0,a.useEffect)(()=>{k?.cowork?.models?.length&&D(k.cowork.models),k?.cowork?.baseUrl&&!q&&H(S(k.cowork.baseUrl)),Array.isArray(k?.cowork?.plugins)&&k.cowork.plugins.length>0?W(k.cowork.plugins):0===B.length&&Array.isArray(k?.defaultPlugins)&&W(k.defaultPlugins),Array.isArray(k?.cowork?.localPlugins)&&G(k.cowork.localPlugins),Array.isArray(k?.cowork?.customPlugins)&&k.cowork.customPlugins.length>0&&Y(k.cowork.customPlugins)},[k]);let ed=async()=>{O(!0);try{let e=await fetch(_),t=await e.json();C(t)}catch(e){C({installed:!1,error:e.message})}finally{O(!1)}},ec=()=>{let e;return(e=(q||"").replace(/\/+$/,""))?/\/v1$/.test(e)?e:`${e}/v1`:""},em=k?.installed?k?.cowork?.baseUrl?k.has9Router?"configured":"other":"not_configured":null,ex=async()=>{U(null);let e=ec();if(0===z.length)return void U({type:"error",text:"Please select at least one model"});P(!0);try{let t=T?.trim()||(o?.length>0?o[0].key:null)||(m?null:"sk_9router"),s=await fetch(_,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:e,apiKey:t,models:z,plugins:B,localPlugins:J,customPlugins:V})}),l=await s.json();s.ok?(U({type:"success",text:"Settings applied. Quit & reopen Claude Desktop to load."}),ed()):U({type:"error",text:l.error||"Failed to apply settings"})}catch(e){U({type:"error",text:e.message})}finally{P(!1)}},ep=async({name:e,models:t})=>{try{let s=await fetch("/api/combos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e,models:t})});if(!s.ok){let e=await s.json();U({type:"error",text:e.error||"Failed to create combo"});return}z.includes(e)||D([...z,e]),ee(!1),U({type:"success",text:`Combo "${e}" created and added.`})}catch(e){U({type:"error",text:e.message})}},eu=e=>{let t=e?.value||e?.name||e;D(e=>e.filter(e=>e!==t))},eh=async()=>{I(!0),U(null);try{let e=await fetch(_,{method:"DELETE"}),t=await e.json();e.ok?(U({type:"success",text:"Settings reset successfully"}),D([]),W(k?.defaultPlugins||[]),G([]),Y([]),ed()):U({type:"error",text:t.error||"Failed to reset"})}catch(e){U({type:"error",text:e.message})}finally{I(!1)}};return(0,l.jsxs)(r.Zp,{padding:"xs",className:"overflow-hidden",children:[(0,l.jsxs)("div",{className:"flex items-start justify-between gap-3 hover:cursor-pointer sm:items-center",onClick:s,children:[(0,l.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,l.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,l.jsx)(i.default,{src:e.image,alt:e.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:e=>{e.target.style.display="none"}})}),(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[(0,l.jsx)("h3",{className:"font-medium text-sm",children:e.name}),"configured"===em&&(0,l.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"===em&&(0,l.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"===em&&(0,l.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,l.jsx)("p",{className:"text-xs text-text-muted truncate",children:e.description})]})]}),(0,l.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${t?"rotate-180":""}`,children:"expand_more"})]}),t&&(0,l.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[A&&(0,l.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,l.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,l.jsx)("span",{children:"Checking Claude Cowork..."})]}),!A&&k&&!k.installed&&(0,l.jsxs)("div",{className:"flex flex-col gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,l.jsxs)("div",{className:"flex items-start gap-3",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,l.jsxs)("div",{className:"flex-1",children:[(0,l.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:"Claude Desktop (Cowork mode) not detected"}),(0,l.jsx)("p",{className:"text-sm text-text-muted",children:"Open Claude Desktop → Help → Troubleshooting → Enable Developer mode → Configure third-party inference, then return here."})]})]}),(0,l.jsx)("div",{className:"pl-9",children:(0,l.jsxs)(r.$n,{variant:"secondary",size:"sm",onClick:()=>L(!0),className:"!bg-yellow-500/20 !border-yellow-500/40 !text-yellow-700 dark:!text-yellow-300 hover:!bg-yellow-500/30",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:"content_copy"}),"Manual Config"]})})]}),!A&&k?.installed&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr] sm:items-center sm:gap-2",children:[(0,l.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Select Endpoint"}),(0,l.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,l.jsx)(x,{value:ec(),onChange:e=>H(S(e)),tunnelEnabled:h,tunnelPublicUrl:g,tailscaleEnabled:f,tailscaleUrl:y,cloudEnabled:m,cloudUrl:p})]}),k?.cowork?.baseUrl&&(0,l.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,l.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Current"}),(0,l.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,l.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:k.cowork.baseUrl})]}),(0,l.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,l.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"API Key"}),(0,l.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,l.jsx)(u,{value:T,onChange:K,apiKeys:o,cloudEnabled:m})]}),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr] sm:items-center sm:gap-2",children:[(0,l.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Models"}),(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,l.jsxs)("div",{className:"flex-1 flex items-center gap-2",children:[(0,l.jsx)("div",{className:"flex-1 flex flex-wrap gap-1.5 min-h-[28px] px-2 py-1.5 bg-surface rounded border border-border",children:0===z.length?(0,l.jsx)("span",{className:"text-xs text-text-muted",children:"No models selected"}):z.map(e=>(0,l.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:[e,(0,l.jsx)("button",{onClick:()=>eu(e),className:"ml-0.5 hover:text-red-500",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"close"})})]},e))}),(0,l.jsx)("button",{onClick:()=>ee(!0),disabled:!c,className:`shrink-0 px-2 py-1.5 rounded border text-xs whitespace-nowrap transition-colors ${c?"bg-primary/10 border-primary/40 text-primary hover:bg-primary/20 cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"+ Combo"})]})]}),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr] sm:items-start sm:gap-2",children:[(0,l.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right pt-2",children:"MCP"}),(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px] mt-2",children:"arrow_forward"}),(0,l.jsxs)("div",{className:"flex-1 flex flex-col gap-1",children:[B.filter(e=>"exa"!==e.name).map(e=>(0,l.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 bg-surface rounded border border-border",children:[(0,l.jsx)("span",{className:"text-xs font-medium min-w-0 truncate flex-shrink-0",children:e.title||e.name}),e.oauth&&(0,l.jsx)("span",{className:"text-[8px] text-amber-600 shrink-0",children:"OAuth"}),(0,l.jsxs)("div",{className:"flex-1 flex flex-wrap gap-1 overflow-hidden",style:{maxHeight:"1.5rem"},children:[Array.isArray(e.toolNames)&&e.toolNames.slice(0,6).map(e=>(0,l.jsx)("span",{className:"text-[9px] px-1 py-0.5 rounded bg-black/5 dark:bg-white/5 text-text-muted whitespace-nowrap",children:e},e)),Array.isArray(e.toolNames)&&e.toolNames.length>6&&(0,l.jsxs)("span",{className:"text-[9px] px-1 py-0.5 rounded bg-black/5 dark:bg-white/5 text-text-muted whitespace-nowrap",children:["+",e.toolNames.length-6]})]}),(0,l.jsx)("button",{onClick:()=>{var t;return t=e.name,void W(B.filter(e=>e.name!==t))},className:"shrink-0 hover:text-red-500 ml-auto",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"close"})})]},e.name)),V.map(e=>(0,l.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 bg-surface rounded border border-border",children:[(0,l.jsx)("span",{className:"text-xs font-medium min-w-0 truncate flex-shrink-0",children:e.name}),(0,l.jsx)("span",{className:"text-[8px] px-1 py-0.5 rounded bg-blue-500/10 text-blue-500 shrink-0",children:"custom"}),(0,l.jsx)("span",{className:"flex-1 text-[9px] text-text-muted truncate",children:e.url||e.command}),(0,l.jsx)("button",{onClick:()=>Y(V.filter(t=>t.name!==e.name)),className:"shrink-0 hover:text-red-500 ml-auto",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"close"})})]},e.name)),0===B.filter(e=>"exa"!==e.name).length&&0===V.length&&(0,l.jsx)("div",{className:"px-2 py-1.5 bg-surface rounded border border-border text-xs text-text-muted",children:"No MCPs added"}),(0,l.jsxs)("div",{className:"flex items-center gap-2 mt-0.5",children:[(0,l.jsx)("button",{onClick:()=>ea(!0),className:"px-2 py-1 rounded border text-xs bg-primary/10 border-primary/40 text-primary hover:bg-primary/20 cursor-pointer whitespace-nowrap",children:"+ Browse"}),(0,l.jsx)("button",{onClick:()=>{eo({type:"url",name:"",url:"",command:"",args:""}),ei(!0)},className:"px-2 py-1 rounded border text-xs bg-surface border-border text-text-muted hover:border-primary hover:text-primary cursor-pointer whitespace-nowrap",children:"+ Custom"}),(0,l.jsx)("a",{href:"https://mcp.so",target:"_blank",rel:"noopener noreferrer",className:"text-[10px] text-text-muted hover:text-primary underline ml-auto",children:"Find MCPs →"})]})]})]}),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr] sm:items-start sm:gap-2",children:[(0,l.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right pt-1",children:"Tools"}),(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px] mt-1.5",children:"arrow_forward"}),(0,l.jsxs)("div",{className:"flex-1 flex flex-col gap-1.5",children:[(j=B.some(e=>"exa"===e.name),N=(k?.defaultPlugins||[]).find(e=>"exa"===e.name),(0,l.jsxs)("label",{className:"flex items-start gap-2 cursor-pointer px-2 py-1.5 bg-surface rounded border border-border",children:[(0,l.jsx)("input",{type:"checkbox",checked:j,onChange:e=>{e.target.checked&&N?W([...B.filter(e=>"exa"!==e.name),N]):W(B.filter(e=>"exa"!==e.name))},className:"mt-0.5"}),(0,l.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,l.jsx)("div",{className:"text-xs font-medium",children:"Web Search & Fetch (Exa)"}),(0,l.jsx)("p",{className:"text-[10px] text-text-muted leading-snug",children:"Replaces built-in WebSearch/WebFetch. Auto-strips duplicates from tool list."})]})]})),(()=>{let e=(k?.localStdioPlugins||[]).find(e=>"browsermcp"===e.name);if(!e)return null;let t=J.includes("browsermcp");return(0,l.jsxs)("label",{className:"flex items-start gap-2 cursor-pointer px-2 py-1.5 bg-surface rounded border border-border",children:[(0,l.jsx)("input",{type:"checkbox",checked:t,onChange:e=>G(e.target.checked?[...J,"browsermcp"]:J.filter(e=>"browsermcp"!==e)),className:"mt-0.5"}),(0,l.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,l.jsx)("div",{className:"text-xs font-medium",children:"Browser Control (Browser MCP)"}),(0,l.jsxs)("p",{className:"text-[10px] text-text-muted leading-snug",children:["Controls your running Chrome. Auto-strips Cowork's built-in browser tools."," ",(0,l.jsx)("a",{href:e.extensionUrl,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:"Install Chrome extension"})]})]})]})})()]})]}),Array.isArray(k?.localStdioPlugins)&&k.localStdioPlugins.filter(e=>"browsermcp"!==e.name).length>0&&(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr] sm:items-start sm:gap-2",children:[(0,l.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right pt-1",children:"Local Plugins"}),(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px] mt-1.5",children:"arrow_forward"}),(0,l.jsxs)("div",{className:"flex-1 flex flex-col gap-2",children:[(0,l.jsx)("div",{className:"flex flex-col gap-1.5 px-2 py-1.5 bg-surface rounded border border-border",children:k.localStdioPlugins.filter(e=>"browsermcp"!==e.name).map(e=>{let t=J.includes(e.name);return(0,l.jsxs)("label",{className:"flex items-start gap-2 cursor-pointer",children:[(0,l.jsx)("input",{type:"checkbox",checked:t,onChange:t=>G(t.target.checked?[...J,e.name]:J.filter(t=>t!==e.name)),className:"mt-0.5"}),(0,l.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,l.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[(0,l.jsx)("span",{className:"text-xs font-medium",children:e.title}),(0,l.jsx)("span",{className:"text-[8px] text-amber-600",children:"stdio"})]}),(0,l.jsx)("p",{className:"text-[10px] text-text-muted leading-snug",children:e.description}),e.extensionUrl&&(0,l.jsx)("a",{href:e.extensionUrl,target:"_blank",rel:"noopener noreferrer",className:"text-[10px] text-primary underline",children:"Install Chrome extension"})]})]},e.name)})}),(0,l.jsxs)("p",{className:"text-[10px] text-text-muted leading-snug",children:["⚠️ Local plugins run as subprocess via ",(0,l.jsx)("code",{className:"px-1 py-0.5 rounded bg-black/5 dark:bg-white/5",children:"npx"}),". Requires Node.js installed."]})]})]})]}),R&&(0,l.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===R.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===R.type?"check_circle":"error"}),(0,l.jsx)("span",{children:R.text})]}),(0,l.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center gap-2",children:[(0,l.jsxs)(r.$n,{variant:"primary",size:"sm",onClick:ex,disabled:0===z.length,loading:M,className:"w-full sm:w-auto",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,l.jsxs)(r.$n,{variant:"outline",size:"sm",onClick:eh,disabled:!k.has9Router,loading:$,className:"w-full sm:w-auto",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,l.jsxs)(r.$n,{variant:"ghost",size:"sm",onClick:()=>L(!0),className:"w-full sm:w-auto",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]})]})]})]}),(0,l.jsx)(r.uR,{isOpen:F,onClose:()=>L(!1),title:"Claude Cowork - Manual Configuration",configs:(v=T&&T.trim()?T:m?"<API_KEY_FROM_DASHBOARD>":"sk_9router",w=z.length>0?z:["provider/model-id"],[{filename:"~/Library/Application Support/Claude-3p/configLibrary/<appliedId>.json",content:JSON.stringify({inferenceProvider:"gateway",inferenceGatewayBaseUrl:ec()||"https://your-public-host/v1",inferenceGatewayApiKey:v,inferenceModels:w.map(e=>({name:e}))},null,2)}])}),(0,l.jsx)(r.CK,{isOpen:X,combo:null,onClose:()=>ee(!1),onSave:ep,activeProviders:d,forcePrefix:"claude-",title:"Create Cowork Combo"}),(0,l.jsx)(r.rq,{isOpen:et,onClose:()=>es(!1),onSelect:e=>{let t=e?.value||e?.name||e;!t||z.includes(t)||D(e=>[...e,t])},onDeselect:eu,activeProviders:d,modelAliases:Z,title:"Select Cowork Model",addedModelValues:z,closeOnSelect:!1}),(0,l.jsx)(r.Nf,{isOpen:el,onClose:()=>ea(!1),onAdd:e=>{B.some(t=>t.name===e.name)||W([...B,e])},addedNames:B.map(e=>e.name)}),er&&(0,l.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40",onClick:()=>ei(!1),children:(0,l.jsxs)("div",{className:"bg-surface border border-border rounded-xl shadow-xl w-full max-w-sm mx-4 p-5 flex flex-col gap-4",onClick:e=>e.stopPropagation(),children:[(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsx)("h3",{className:"font-semibold text-sm",children:"Add Custom MCP"}),(0,l.jsx)("button",{onClick:()=>ei(!1),className:"text-text-muted hover:text-text-main",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"close"})})]}),(0,l.jsxs)("div",{className:"flex gap-2",children:[(0,l.jsx)("button",{onClick:()=>eo(e=>({...e,type:"url"})),className:`flex-1 py-1.5 rounded border text-xs font-medium transition-colors ${"url"===en.type?"bg-primary/10 border-primary/40 text-primary":"border-border text-text-muted hover:border-primary/40"}`,children:"URL (SSE)"}),(0,l.jsx)("button",{onClick:()=>eo(e=>({...e,type:"cmd"})),className:`flex-1 py-1.5 rounded border text-xs font-medium transition-colors ${"cmd"===en.type?"bg-primary/10 border-primary/40 text-primary":"border-border text-text-muted hover:border-primary/40"}`,children:"Command (stdio)"})]}),(0,l.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,l.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,l.jsx)("label",{className:"text-[11px] text-text-muted font-medium",children:"Name"}),(0,l.jsx)("input",{type:"text",placeholder:"my-mcp",value:en.name,onChange:e=>eo(t=>({...t,name:e.target.value.replace(/\s+/g,"-").toLowerCase()})),className:"px-2 py-1.5 rounded border border-border bg-surface text-xs outline-none focus:border-primary"})]}),"url"===en.type?(0,l.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,l.jsx)("label",{className:"text-[11px] text-text-muted font-medium",children:"SSE URL"}),(0,l.jsx)("input",{type:"text",placeholder:"https://your-mcp-server.com/sse",value:en.url,onChange:e=>eo(t=>({...t,url:e.target.value})),className:"px-2 py-1.5 rounded border border-border bg-surface text-xs outline-none focus:border-primary"})]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,l.jsx)("label",{className:"text-[11px] text-text-muted font-medium",children:"Command"}),(0,l.jsx)("input",{type:"text",placeholder:"npx",value:en.command,onChange:e=>eo(t=>({...t,command:e.target.value})),className:"px-2 py-1.5 rounded border border-border bg-surface text-xs outline-none focus:border-primary"})]}),(0,l.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,l.jsxs)("label",{className:"text-[11px] text-text-muted font-medium",children:["Args ",(0,l.jsx)("span",{className:"font-normal",children:"(comma-separated)"})]}),(0,l.jsx)("input",{type:"text",placeholder:"-y, @some/mcp-package",value:en.args,onChange:e=>eo(t=>({...t,args:e.target.value})),className:"px-2 py-1.5 rounded border border-border bg-surface text-xs outline-none focus:border-primary"})]})]})]}),(0,l.jsxs)("div",{className:"flex gap-2 justify-end",children:[(0,l.jsx)("button",{onClick:()=>ei(!1),className:"px-3 py-1.5 rounded border border-border text-xs text-text-muted hover:bg-surface cursor-pointer",children:"Cancel"}),(0,l.jsx)("button",{onClick:()=>{let e=en.name.trim();if(e){if("url"===en.type){if(!en.url.trim())return;Y(t=>[...t.filter(t=>t.name!==e),{name:e,url:en.url.trim(),transport:"sse",custom:!0}])}else{if(!en.command.trim())return;let t=en.args.split(",").map(e=>e.trim()).filter(Boolean);Y(s=>[...s.filter(t=>t.name!==e),{name:e,command:en.command.trim(),args:t,custom:!0}])}ei(!1)}},className:"px-3 py-1.5 rounded bg-primary text-white text-xs font-medium hover:opacity-90 cursor-pointer",children:"Add"})]})]})})]})}function A({tool:e,isExpanded:t,onToggle:s,baseUrl:n,apiKeys:o,activeProviders:d,cloudEnabled:c,initialStatus:m,tunnelEnabled:p,tunnelPublicUrl:h,tailscaleEnabled:f,tailscaleUrl:y}){let b,j,[N,v]=(0,a.useState)(m||null),[w,k]=(0,a.useState)(!1),[C,_]=(0,a.useState)(!1),[S,E]=(0,a.useState)(!1),[O,M]=(0,a.useState)(null),[P,$]=(0,a.useState)(""),[I,R]=(0,a.useState)(""),[U,T]=(0,a.useState)({}),[K,z]=(0,a.useState)(!1),[D,F]=(0,a.useState)([]),[L,q]=(0,a.useState)(!1),H=(0,a.useRef)([]);(0,a.useEffect)(()=>{H.current=D},[D]),(0,a.useEffect)(()=>{o?.length>0&&!P&&$(o[0].key)},[o,P]),(0,a.useEffect)(()=>{m&&v(m)},[m]),(0,a.useEffect)(()=>{t&&!N&&(V(),B()),t&&B()},[t]),(0,a.useEffect)(()=>{if(N?.config&&Array.isArray(N.config)&&0===D.length){let e=N.config.find(e=>"9Router"===e.name);e?.models?.length>0&&F(e.models.map(e=>e.id))}},[N]);let B=async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&T(t.aliases||{})}catch(e){console.log("Error fetching model aliases:",e)}},W=async e=>{try{let t=P&&P.trim()||c?P:"sk_9router";await fetch("/api/cli-tools/copilot-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:G(),apiKey:t,models:e})})}catch(e){console.log("Error saving models:",e)}},J=N?N.has9Router?g(N.currentUrl||"",{tunnelPublicUrl:h,tailscaleUrl:y})?"configured":"other":"not_configured":null,G=()=>{let e=I||n;return e.endsWith("/v1")?e:`${e}/v1`},V=async()=>{k(!0);try{let e=await fetch("/api/cli-tools/copilot-settings"),t=await e.json();v(t)}catch(e){v({error:e.message})}finally{k(!1)}},Y=async()=>{_(!0),M(null);try{let e=P&&P.trim()||c?P:"sk_9router",t=await fetch("/api/cli-tools/copilot-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:G(),apiKey:e,models:D})}),s=await t.json();t.ok?(M({type:"success",text:s.message||"Settings applied! Reload VS Code."}),V()):M({type:"error",text:s.error||"Failed to apply settings"})}catch(e){M({type:"error",text:e.message})}finally{_(!1)}},Z=async()=>{E(!0),M(null);try{let e=await fetch("/api/cli-tools/copilot-settings",{method:"DELETE"}),t=await e.json();e.ok?(M({type:"success",text:"Settings reset successfully!"}),F([]),V()):M({type:"error",text:t.error||"Failed to reset settings"})}catch(e){M({type:"error",text:e.message})}finally{E(!1)}};return(0,l.jsxs)(r.Zp,{padding:"xs",className:"overflow-hidden",children:[(0,l.jsxs)("div",{className:"flex items-start justify-between gap-3 hover:cursor-pointer sm:items-center",onClick:s,children:[(0,l.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,l.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,l.jsx)(i.default,{src:"/providers/copilot.png",alt:e.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:e=>{e.target.style.display="none"}})}),(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[(0,l.jsx)("h3",{className:"font-medium text-sm",children:e.name}),"configured"===J&&(0,l.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"===J&&(0,l.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"===J&&(0,l.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,l.jsx)("p",{className:"text-xs text-text-muted truncate",children:e.description})]})]}),(0,l.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${t?"rotate-180":""}`,children:"expand_more"})]}),t&&(0,l.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[w&&(0,l.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,l.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,l.jsx)("span",{children:"Checking Copilot config..."})]}),!w&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"flex items-start gap-3 p-3 bg-blue-500/10 border border-blue-500/30 rounded-lg",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-blue-500 text-lg",children:"info"}),(0,l.jsxs)("div",{className:"text-xs text-blue-700 dark:text-blue-300",children:[(0,l.jsxs)("p",{className:"font-medium",children:["Writes to ",(0,l.jsx)("code",{className:"px-1 bg-black/5 dark:bg-white/10 rounded",children:"chatLanguageModels.json"})]}),(0,l.jsx)("p",{className:"mt-0.5 opacity-80",children:"Reload VS Code after applying for changes to take effect."})]})]}),(0,l.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr] sm:items-center sm:gap-2",children:[(0,l.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Select Endpoint"}),(0,l.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,l.jsx)(x,{value:I||I||`${n}/v1`,onChange:R,requiresExternalUrl:e.requiresExternalUrl,tunnelEnabled:p,tunnelPublicUrl:h,tailscaleEnabled:f,tailscaleUrl:y})]}),(0,l.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,l.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"API Key"}),(0,l.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,l.jsx)(u,{value:P,onChange:$,apiKeys:o,cloudEnabled:c})]}),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr] sm:items-start sm:gap-2",children:[(0,l.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right pt-1",children:"Models"}),(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px] mt-1.5",children:"arrow_forward"}),(0,l.jsxs)("div",{className:"flex-1 flex flex-col gap-2",children:[(0,l.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===D.length?(0,l.jsx)("span",{className:"text-xs text-text-muted",children:"No models selected"}):D.map(e=>(0,l.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:[e,(0,l.jsx)("button",{onClick:t=>{t.stopPropagation(),F(t=>t.filter(t=>t!==e))},className:"ml-0.5 hover:text-red-500",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"close"})})]},e))}),(0,l.jsx)("div",{children:(0,l.jsx)("button",{onClick:()=>q(!0),disabled:!d?.length,className:`px-2 py-1 rounded border text-xs transition-colors ${d?.length?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Add Model"})})]})]})]}),O&&(0,l.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===O.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===O.type?"check_circle":"error"}),(0,l.jsx)("span",{children:O.text})]}),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,l.jsxs)(r.$n,{variant:"primary",size:"sm",onClick:Y,disabled:0===D.length,loading:C,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,l.jsxs)(r.$n,{variant:"outline",size:"sm",onClick:Z,disabled:!N?.has9Router,loading:S,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,l.jsxs)(r.$n,{variant:"ghost",size:"sm",onClick:()=>z(!0),disabled:0===D.length,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]})]})]})]}),(0,l.jsx)(r.rq,{isOpen:L,onClose:()=>{q(!1),W(H.current)},onSelect:e=>{D.includes(e.value)||F([...D,e.value])},onDeselect:e=>{F(D.filter(t=>t!==e.value))},selectedModel:null,activeProviders:d,modelAliases:U,addedModelValues:D,closeOnSelect:!1,title:"Add Model for GitHub Copilot"}),(0,l.jsx)(r.uR,{isOpen:K,onClose:()=>z(!1),title:"GitHub Copilot - Manual Configuration",configs:(b=P&&P.trim()?P:c?"<API_KEY_FROM_DASHBOARD>":"sk_9router",j=G(),[{filename:"~/Library/Application Support/Code/User/chatLanguageModels.json",content:JSON.stringify([{name:"9Router",vendor:"azure",apiKey:b,models:(D.length>0?D:["provider/model-id"]).map(e=>({id:e,name:e,url:`${j}/chat/completions#models.ai.azure.com`,toolCalling:!0,vision:!1,maxInputTokens:128e3,maxOutputTokens:16e3}))}],null,2)}])})]})}function O({tool:e,isExpanded:t,onToggle:s,baseUrl:n,apiKeys:o,activeProviders:d,cloudEnabled:c,initialStatus:m,tunnelEnabled:p,tunnelPublicUrl:h,tailscaleEnabled:f,tailscaleUrl:y}){let b,j,[N,v]=(0,a.useState)(m||null),[w,k]=(0,a.useState)(!1),[C,_]=(0,a.useState)(!1),[S,E]=(0,a.useState)(!1),[A,M]=(0,a.useState)(null),[P,$]=(0,a.useState)(!1),[I,R]=(0,a.useState)(""),[U,T]=(0,a.useState)(""),[K,z]=(0,a.useState)(!1),[D,F]=(0,a.useState)({}),[L,q]=(0,a.useState)(!1),[H,B]=(0,a.useState)("");(0,a.useEffect)(()=>{o?.length>0&&!I&&R(o[0].key)},[o,I]),(0,a.useEffect)(()=>{m&&v(m)},[m]),(0,a.useEffect)(()=>{t&&!N&&(V(),W()),t&&W()},[t]),(0,a.useEffect)(()=>{N?.settings?.openAiModelId&&T(N.settings.openAiModelId)},[N]);let W=async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&F(t.aliases||{})}catch(e){console.log("Error fetching model aliases:",e)}},J=N?.installed?N.has9Router?g(N.settings?.openAiBaseUrl||"",{tunnelPublicUrl:h,tailscaleUrl:y})?"configured":"other":"not_configured":null,G=()=>{let e=H||`${n}/v1`;return e.endsWith("/v1")?e:`${e}/v1`},V=async()=>{k(!0);try{let e=await fetch("/api/cli-tools/cline-settings"),t=await e.json();v(t)}catch(e){v({installed:!1,error:e.message})}finally{k(!1)}},Y=async()=>{_(!0),M(null);try{let e=I&&I.trim()||c?I:"sk_9router",t=await fetch("/api/cli-tools/cline-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:G(),apiKey:e,model:U})}),s=await t.json();t.ok?(M({type:"success",text:"Settings applied successfully!"}),V()):M({type:"error",text:s.error||"Failed to apply settings"})}catch(e){M({type:"error",text:e.message})}finally{_(!1)}},Z=async()=>{E(!0),M(null);try{let e=await fetch("/api/cli-tools/cline-settings",{method:"DELETE"}),t=await e.json();e.ok?(M({type:"success",text:"Settings reset successfully!"}),T(""),V()):M({type:"error",text:t.error||"Failed to reset settings"})}catch(e){M({type:"error",text:e.message})}finally{E(!1)}};return(0,l.jsxs)(r.Zp,{padding:"xs",className:"overflow-hidden",children:[(0,l.jsxs)("div",{className:"flex items-start justify-between gap-3 hover:cursor-pointer sm:items-center",onClick:s,children:[(0,l.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,l.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,l.jsx)(i.default,{src:"/providers/cline.png",alt:e.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:e=>{e.target.style.display="none"}})}),(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[(0,l.jsx)("h3",{className:"font-medium text-sm",children:e.name}),"configured"===J&&(0,l.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"===J&&(0,l.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"===J&&(0,l.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,l.jsx)("p",{className:"text-xs text-text-muted truncate",children:e.description})]})]}),(0,l.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${t?"rotate-180":""}`,children:"expand_more"})]}),t&&(0,l.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[w&&(0,l.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,l.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,l.jsx)("span",{children:"Checking Cline..."})]}),!w&&N&&!N.installed&&(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsxs)("div",{className:"flex flex-col gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,l.jsxs)("div",{className:"flex items-start gap-3",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,l.jsxs)("div",{className:"flex-1",children:[(0,l.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:"Cline not detected locally"}),(0,l.jsx)("p",{className:"text-sm text-text-muted",children:"Manual configuration is still available if 9router is deployed on a remote server."})]})]}),(0,l.jsxs)("div",{className:"flex items-center gap-2 pl-9",children:[(0,l.jsxs)(r.$n,{variant:"secondary",size:"sm",onClick:()=>q(!0),className:"!bg-yellow-500/20 !border-yellow-500/40 !text-yellow-700 dark:!text-yellow-300 hover:!bg-yellow-500/30",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:"content_copy"}),"Manual Config"]}),(0,l.jsxs)(r.$n,{variant:"outline",size:"sm",onClick:()=>$(!P),children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:P?"expand_less":"help"}),P?"Hide":"How to Install"]})]})]}),P&&(0,l.jsxs)("div",{className:"p-4 bg-surface border border-border rounded-lg",children:[(0,l.jsx)("h4",{className:"font-medium mb-3",children:"Installation Guide"}),(0,l.jsx)("div",{className:"space-y-3 text-sm",children:(0,l.jsxs)("p",{className:"text-text-muted",children:["Install Cline VS Code extension or CLI from ",(0,l.jsx)("a",{className:"text-primary underline",href:"https://docs.cline.bot/",target:"_blank",rel:"noreferrer",children:"docs.cline.bot"}),"."]})})]})]}),!w&&N?.installed&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr] sm:items-center sm:gap-2",children:[(0,l.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Select Endpoint"}),(0,l.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,l.jsx)(x,{value:H||H||`${n}/v1`,onChange:B,requiresExternalUrl:e.requiresExternalUrl,tunnelEnabled:p,tunnelPublicUrl:h,tailscaleEnabled:f,tailscaleUrl:y})]}),N?.settings?.openAiBaseUrl&&(0,l.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,l.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Current"}),(0,l.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,l.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:N.settings.openAiBaseUrl})]}),(0,l.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,l.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"API Key"}),(0,l.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,l.jsx)(u,{value:I,onChange:R,apiKeys:o,cloudEnabled:c})]}),(0,l.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,l.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Model"}),(0,l.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,l.jsxs)("div",{className:"relative w-full min-w-0",children:[(0,l.jsx)("input",{type:"text",value:U,onChange:e=>T(e.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"}),U&&(0,l.jsx)("button",{onClick:()=>T(""),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,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]}),(0,l.jsx)("button",{onClick:()=>z(!0),disabled:!d?.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 ${d?.length?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select Model"})]})]}),A&&(0,l.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,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===A.type?"check_circle":"error"}),(0,l.jsx)("span",{children:A.text})]}),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,l.jsxs)(r.$n,{variant:"primary",size:"sm",onClick:Y,disabled:!I&&c&&o.length>0||!U,loading:C,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,l.jsxs)(r.$n,{variant:"outline",size:"sm",onClick:Z,disabled:S,loading:S,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,l.jsxs)(r.$n,{variant:"ghost",size:"sm",onClick:()=>q(!0),children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]})]})]})]}),(0,l.jsx)(r.rq,{isOpen:K,onClose:()=>z(!1),onSelect:e=>{T(e.value),z(!1)},selectedModel:U,activeProviders:d,modelAliases:D,title:"Select Model for Cline"}),(0,l.jsx)(r.uR,{isOpen:L,onClose:()=>q(!1),title:"Cline - Manual Configuration",configs:(b=I&&I.trim()?I:c?"<API_KEY_FROM_DASHBOARD>":"sk_9router",[{filename:"~/.cline/data/globalState.json",content:JSON.stringify({actModeApiProvider:"openai",planModeApiProvider:"openai",openAiBaseUrl:(j=G()).endsWith("/v1")?j.slice(0,-3):j,openAiModelId:U||"provider/model-id",planModeOpenAiModelId:U||"provider/model-id"},null,2)},{filename:"~/.cline/data/secrets.json",content:JSON.stringify({openAiApiKey:b},null,2)}])})]})}function M({tool:e,isExpanded:t,onToggle:s,baseUrl:n,apiKeys:o,activeProviders:d,cloudEnabled:c,initialStatus:m,tunnelEnabled:p,tunnelPublicUrl:h,tailscaleEnabled:g,tailscaleUrl:f}){let[y,b]=(0,a.useState)(m||null),[j,N]=(0,a.useState)(!1),[v,w]=(0,a.useState)(!1),[k,C]=(0,a.useState)(!1),[_,S]=(0,a.useState)(null),[E,A]=(0,a.useState)(!1),[O,P]=(0,a.useState)(""),[$,I]=(0,a.useState)(""),[R,U]=(0,a.useState)(!1),[T,K]=(0,a.useState)({}),[z,D]=(0,a.useState)(!1),[F,L]=(0,a.useState)("");(0,a.useEffect)(()=>{o?.length>0&&!O&&P(o[0].key)},[o,O]),(0,a.useEffect)(()=>{m&&b(m)},[m]),(0,a.useEffect)(()=>{t&&!y&&(W(),q()),t&&q()},[t]);let q=async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&K(t.aliases||{})}catch(e){console.log("Error fetching model aliases:",e)}},H=y?.installed?y.has9Router?"configured":"not_configured":null,B=()=>{let e=F||`${n}/v1`;return e.endsWith("/v1")?e:`${e}/v1`},W=async()=>{N(!0);try{let e=await fetch("/api/cli-tools/kilo-settings"),t=await e.json();b(t)}catch(e){b({installed:!1,error:e.message})}finally{N(!1)}},J=async()=>{w(!0),S(null);try{let e=O&&O.trim()||c?O:"sk_9router",t=await fetch("/api/cli-tools/kilo-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:B(),apiKey:e,model:$})}),s=await t.json();t.ok?(S({type:"success",text:"Settings applied successfully!"}),W()):S({type:"error",text:s.error||"Failed to apply settings"})}catch(e){S({type:"error",text:e.message})}finally{w(!1)}},G=async()=>{C(!0),S(null);try{let e=await fetch("/api/cli-tools/kilo-settings",{method:"DELETE"}),t=await e.json();e.ok?(S({type:"success",text:"Settings reset successfully!"}),I(""),W()):S({type:"error",text:t.error||"Failed to reset settings"})}catch(e){S({type:"error",text:e.message})}finally{C(!1)}};return(0,l.jsxs)(r.Zp,{padding:"xs",className:"overflow-hidden",children:[(0,l.jsxs)("div",{className:"flex items-start justify-between gap-3 hover:cursor-pointer sm:items-center",onClick:s,children:[(0,l.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,l.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,l.jsx)(i.default,{src:"/providers/kilocode.png",alt:e.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:e=>{e.target.style.display="none"}})}),(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[(0,l.jsx)("h3",{className:"font-medium text-sm",children:e.name}),"configured"===H&&(0,l.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"===H&&(0,l.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,l.jsx)("p",{className:"text-xs text-text-muted truncate",children:e.description})]})]}),(0,l.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${t?"rotate-180":""}`,children:"expand_more"})]}),t&&(0,l.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[j&&(0,l.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,l.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,l.jsx)("span",{children:"Checking Kilo Code..."})]}),!j&&y&&!y.installed&&(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsxs)("div",{className:"flex flex-col gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,l.jsxs)("div",{className:"flex items-start gap-3",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,l.jsxs)("div",{className:"flex-1",children:[(0,l.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:"Kilo Code not detected locally"}),(0,l.jsx)("p",{className:"text-sm text-text-muted",children:"Manual configuration is still available if 9router is deployed on a remote server."})]})]}),(0,l.jsxs)("div",{className:"flex items-center gap-2 pl-9",children:[(0,l.jsxs)(r.$n,{variant:"secondary",size:"sm",onClick:()=>D(!0),className:"!bg-yellow-500/20 !border-yellow-500/40 !text-yellow-700 dark:!text-yellow-300 hover:!bg-yellow-500/30",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:"content_copy"}),"Manual Config"]}),(0,l.jsxs)(r.$n,{variant:"outline",size:"sm",onClick:()=>A(!E),children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:E?"expand_less":"help"}),E?"Hide":"How to Install"]})]})]}),E&&(0,l.jsxs)("div",{className:"p-4 bg-surface border border-border rounded-lg",children:[(0,l.jsx)("h4",{className:"font-medium mb-3",children:"Installation Guide"}),(0,l.jsxs)("p",{className:"text-sm text-text-muted",children:["Install Kilo Code from ",(0,l.jsx)("a",{className:"text-primary underline",href:"https://kilocode.ai",target:"_blank",rel:"noreferrer",children:"kilocode.ai"})," or VS Code extension marketplace."]})]})]}),!j&&y?.installed&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr] sm:items-center sm:gap-2",children:[(0,l.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Select Endpoint"}),(0,l.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,l.jsx)(x,{value:F||F||`${n}/v1`,onChange:L,requiresExternalUrl:e.requiresExternalUrl,tunnelEnabled:p,tunnelPublicUrl:h,tailscaleEnabled:g,tailscaleUrl:f})]}),(0,l.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,l.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"API Key"}),(0,l.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,l.jsx)(u,{value:O,onChange:P,apiKeys:o,cloudEnabled:c})]}),(0,l.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,l.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Model"}),(0,l.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,l.jsxs)("div",{className:"relative w-full min-w-0",children:[(0,l.jsx)("input",{type:"text",value:$,onChange:e=>I(e.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"}),$&&(0,l.jsx)("button",{onClick:()=>I(""),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,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]}),(0,l.jsx)("button",{onClick:()=>U(!0),disabled:!d?.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 ${d?.length?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select Model"})]})]}),_&&(0,l.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===_.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===_.type?"check_circle":"error"}),(0,l.jsx)("span",{children:_.text})]}),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,l.jsxs)(r.$n,{variant:"primary",size:"sm",onClick:J,disabled:!O&&c&&o.length>0||!$,loading:v,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,l.jsxs)(r.$n,{variant:"outline",size:"sm",onClick:G,disabled:k,loading:k,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,l.jsxs)(r.$n,{variant:"ghost",size:"sm",onClick:()=>D(!0),children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]})]})]})]}),(0,l.jsx)(r.rq,{isOpen:R,onClose:()=>U(!1),onSelect:e=>{I(e.value),U(!1)},selectedModel:$,activeProviders:d,modelAliases:T,title:"Select Model for Kilo Code"}),(0,l.jsx)(r.uR,{isOpen:z,onClose:()=>D(!1),title:"Kilo Code - Manual Configuration",configs:[{filename:"~/.local/share/kilo/auth.json",content:JSON.stringify({"openai-compatible":{type:"api-key",apiKey:O&&O.trim()?O:c?"<API_KEY_FROM_DASHBOARD>":"sk_9router",baseUrl:B(),model:$||"provider/model-id"}},null,2)}]})]})}let P="/api/cli-tools/deepseek-tui-settings";function $({tool:e,isExpanded:t,onToggle:s,baseUrl:n,hasActiveProviders:o,apiKeys:d,activeProviders:c,cloudEnabled:m,initialStatus:p,tunnelEnabled:h,tunnelPublicUrl:f,tailscaleEnabled:y,tailscaleUrl:b}){let j,[N,v]=(0,a.useState)(p||null),[w,k]=(0,a.useState)(!1),[C,_]=(0,a.useState)(!1),[S,E]=(0,a.useState)(!1),[A,O]=(0,a.useState)(null),[M,I]=(0,a.useState)(""),[R,U]=(0,a.useState)(""),[T,K]=(0,a.useState)(!1),[z,D]=(0,a.useState)({}),[F,L]=(0,a.useState)(!1),[q,H]=(0,a.useState)(""),B=(0,a.useRef)(!1),W=(()=>{if(!N?.installed)return null;let e=N.settings?.["providers.openai"];return e?.base_url?g(e.base_url,{tunnelPublicUrl:f,tailscaleUrl:b})?"configured":"other":"not_configured"})();(0,a.useEffect)(()=>{d?.length>0&&!M&&I(d[0].key)},[d,M]),(0,a.useEffect)(()=>{p&&v(p)},[p]),(0,a.useEffect)(()=>{t&&!N&&(G(),J()),t&&J()},[t]);let J=async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&D(t.aliases||{})}catch(e){console.log("Error fetching model aliases:",e)}};(0,a.useEffect)(()=>{if(N?.installed&&!B.current){B.current=!0;let e=N.settings?.["providers.openai"];e?.model&&U(e.model)}},[N]);let G=async()=>{k(!0);try{let e=await fetch(P),t=await e.json();v(t)}catch(e){v({installed:!1,error:e.message})}finally{k(!1)}},V=()=>{let e=q||window.location.origin.replace("://localhost","://127.0.0.1");return e.endsWith("/v1")?e:`${e}/v1`},Y=async()=>{_(!0),O(null);try{let e=M?.trim()||(d?.length>0?d[0].key:null)||(m?null:"sk_9router"),t=await fetch(P,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:V(),apiKey:e,model:R})}),s=await t.json();t.ok?(O({type:"success",text:"Settings applied successfully!"}),G()):O({type:"error",text:s.error||"Failed to apply settings"})}catch(e){O({type:"error",text:e.message})}finally{_(!1)}},Z=async()=>{E(!0),O(null);try{let e=await fetch(P,{method:"DELETE"}),t=await e.json();e.ok?(O({type:"success",text:"Settings reset successfully!"}),U(""),G()):O({type:"error",text:t.error||"Failed to reset settings"})}catch(e){O({type:"error",text:e.message})}finally{E(!1)}};return(0,l.jsxs)(r.Zp,{padding:"xs",className:"overflow-hidden",children:[(0,l.jsxs)("div",{className:"flex items-start justify-between gap-3 hover:cursor-pointer sm:items-center",onClick:s,children:[(0,l.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,l.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,l.jsx)(i.default,{src:e.image||"/providers/deepseek-tui.png",alt:e.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:e=>{e.target.style.display="none"}})}),(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[(0,l.jsx)("h3",{className:"font-medium text-sm",children:e.name}),"configured"===W&&(0,l.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,l.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,l.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,l.jsx)("p",{className:"text-xs text-text-muted truncate",children:e.description})]})]}),(0,l.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${t?"rotate-180":""}`,children:"expand_more"})]}),t&&(0,l.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[w&&(0,l.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,l.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,l.jsx)("span",{children:"Checking DeepSeek TUI..."})]}),!w&&N&&!N.installed&&(0,l.jsx)("div",{className:"flex flex-col gap-4",children:(0,l.jsxs)("div",{className:"flex flex-col gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,l.jsxs)("div",{className:"flex items-start gap-3",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,l.jsxs)("div",{className:"flex-1",children:[(0,l.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:"DeepSeek TUI not detected locally"}),(0,l.jsx)("p",{className:"text-sm text-text-muted mt-1",children:"Install via npm:"}),(0,l.jsx)("code",{className:"block mt-2 p-2 bg-black/20 rounded text-xs font-mono",children:"npm install -g deepseek-tui"}),(0,l.jsx)("p",{className:"text-sm text-text-muted mt-2",children:"Manual configuration is still available if 9router is deployed on a remote server."})]})]}),(0,l.jsx)("div",{className:"flex items-center gap-2 pl-9",children:(0,l.jsxs)(r.$n,{variant:"secondary",size:"sm",onClick:()=>L(!0),className:"!bg-yellow-500/20 !border-yellow-500/40 !text-yellow-700 dark:!text-yellow-300 hover:!bg-yellow-500/30",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:"content_copy"}),"Manual Config"]})})]})}),!w&&N?.installed&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"flex flex-col gap-2",children:[e.notes&&e.notes.length>0&&(0,l.jsx)("div",{className:"flex flex-col gap-2 mb-2",children:e.notes.map((e,t)=>(0,l.jsxs)("div",{className:`flex items-start gap-2 p-2 rounded text-xs ${"warning"===e.type?"bg-yellow-500/10 text-yellow-600 dark:text-yellow-400":"error"===e.type?"bg-red-500/10 text-red-600 dark:text-red-400":"bg-blue-500/10 text-blue-600 dark:text-blue-400"}`,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mt-0.5",children:"warning"===e.type?"warning":"error"===e.type?"error":"info"}),(0,l.jsx)("span",{children:e.text})]},t))}),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr] sm:items-center sm:gap-2",children:[(0,l.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Select Endpoint"}),(0,l.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,l.jsx)(x,{value:q||V(),onChange:H,requiresExternalUrl:e.requiresExternalUrl,tunnelEnabled:h,tunnelPublicUrl:f,tailscaleEnabled:y,tailscaleUrl:b})]}),N?.settings?.["providers.openai"]?.base_url&&(0,l.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,l.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Current"}),(0,l.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,l.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:N.settings["providers.openai"].base_url})]}),(0,l.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,l.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"API Key"}),(0,l.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,l.jsx)(u,{value:M,onChange:I,apiKeys:d,cloudEnabled:m})]}),(0,l.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,l.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Default Model"}),(0,l.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,l.jsxs)("div",{className:"relative w-full min-w-0",children:[(0,l.jsx)("input",{type:"text",value:R,onChange:e=>U(e.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"}),R&&(0,l.jsx)("button",{onClick:()=>U(""),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,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]}),(0,l.jsx)("button",{onClick:()=>K(!0),disabled:!o,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?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select"})]})]}),A&&(0,l.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,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===A.type?"check_circle":"error"}),(0,l.jsx)("span",{children:A.text})]}),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,l.jsxs)(r.$n,{variant:"primary",size:"sm",onClick:Y,disabled:!R,loading:C,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,l.jsxs)(r.$n,{variant:"outline",size:"sm",onClick:Z,disabled:!N?.has9Router,loading:S,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,l.jsxs)(r.$n,{variant:"ghost",size:"sm",onClick:()=>L(!0),children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]})]})]})]}),(0,l.jsx)(r.rq,{isOpen:T,onClose:()=>K(!1),onSelect:e=>{U(e.value),K(!1)},selectedModel:R,activeProviders:c,modelAliases:z,title:"Select Model for DeepSeek TUI"}),(0,l.jsx)(r.uR,{isOpen:F,onClose:()=>L(!1),title:"DeepSeek TUI - Manual Configuration",configs:(j=M&&M.trim()?M:m?"<API_KEY_FROM_DASHBOARD>":"sk_9router",[{filename:"~/.deepseek/config.toml",content:`[providers.openai]
|
|
39
|
+
`}])})]})}var w=s(11059);function k({toolId:e,tool:t,isExpanded:s,onToggle:n,baseUrl:o,apiKeys:d,activeProviders:c=[],cloudEnabled:m=!1,tunnelEnabled:x=!1}){let[p,h]=(0,a.useState)(null),[g,f]=(0,a.useState)(!1),[y,b]=(0,a.useState)(""),[j,N]=(0,a.useState)(()=>d?.length>0?d[0].key:""),v=e=>{let t=j&&j.trim()?j:m?"your-api-key":"sk_9router",s=o||"http://localhost:20128",l=s.endsWith("/v1")?s:`${s}/v1`;return e.replace(/\{\{baseUrl\}\}/g,l).replace(/\{\{apiKey\}\}/g,t).replace(/\{\{model\}\}/g,y||"provider/model-id")},{copy:C}=(0,w.C)(),_=async(e,t)=>{await C(v(e),`toolcard-${t}`),h(t),setTimeout(()=>h(null),2e3)},S=c.length>0,E=()=>(!t.requiresExternalUrl||!!m||!!x)&&(!t.requiresCloud||!!m);return(0,l.jsxs)(r.Zp,{padding:"xs",className:"overflow-hidden overflow-x-hidden",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:n,children:[(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[(0,l.jsx)("div",{className:"size-8 rounded-lg flex items-center justify-center shrink-0",children:t.image?(0,l.jsx)(i.default,{src:t.image,alt:t.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:e=>{e.target.style.display="none"}}):t.icon?(0,l.jsx)("span",{className:"material-symbols-outlined text-xl",style:{color:t.color},children:t.icon}):(0,l.jsx)(i.default,{src:`/providers/${e}.png`,alt:t.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:e=>{e.target.style.display="none"}})}),(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsx)("h3",{className:"font-medium text-sm",children:t.name}),(0,l.jsx)("p",{className:"text-xs text-text-muted truncate",children:t.description})]})]}),(0,l.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${s?"rotate-180":""}`,children:"expand_more"})]}),s&&(0,l.jsx)("div",{className:"mt-6 pt-6 border-t border-border",children:t.guideSteps?(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[t.notes&&0!==t.notes.length?(0,l.jsx)("div",{className:"flex flex-col gap-2 mb-4",children:t.notes.map((e,t)=>{if("cloudCheck"===e.type&&(m||x))return null;let s="warning"===e.type,a="cloudCheck"===e.type&&!m&&!x,r="bg-blue-500/10 border-blue-500/30",i="text-blue-600 dark:text-blue-400",n="text-blue-500",o="info";return s?(r="bg-yellow-500/10 border-yellow-500/30",i="text-yellow-600 dark:text-yellow-400",n="text-yellow-500",o="warning"):a&&(r="bg-red-500/10 border-red-500/30",i="text-red-600 dark:text-red-400",n="text-red-500",o="error"),(0,l.jsxs)("div",{className:`flex items-start gap-3 p-3 rounded-lg border ${r}`,children:[(0,l.jsx)("span",{className:`material-symbols-outlined text-lg ${n}`,children:o}),(0,l.jsx)("p",{className:`text-sm ${i}`,children:e.text})]},t)})}):null,E()&&t.guideSteps.map(e=>(0,l.jsxs)("div",{className:"flex items-start gap-4",children:[(0,l.jsx)("div",{className:"size-8 rounded-full flex items-center justify-center shrink-0 text-sm font-semibold text-white",style:{backgroundColor:t.color},children:e.step}),(0,l.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,l.jsx)("p",{className:"font-medium text-text-main",children:e.title}),e.desc&&(0,l.jsx)("p",{className:"text-sm text-text-muted mt-0.5",children:e.desc}),"apiKeySelector"===e.type&&(0,l.jsx)("div",{className:"mt-2 flex flex-col sm:flex-row sm:items-center gap-2",children:(0,l.jsx)(u,{value:j,onChange:N,apiKeys:d,cloudEnabled:m,className:"flex-1"})}),"modelSelector"===e.type&&(0,l.jsxs)("div",{className:"mt-2 flex flex-col sm:flex-row sm:items-center gap-2",children:[(0,l.jsx)("input",{type:"text",value:y,onChange:e=>b(e.target.value),placeholder:"provider/model-id",className:"w-full sm:w-auto flex-1 px-3 py-2 bg-bg-secondary rounded-lg text-sm border border-border focus:outline-none focus:ring-1 focus:ring-primary/50"}),(0,l.jsx)("button",{onClick:()=>f(!0),disabled:!S,className:`shrink-0 px-3 py-2 rounded-lg border text-sm transition-colors ${S?"bg-bg-secondary border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select Model"}),y&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("button",{onClick:()=>_(y,"model"),className:"shrink-0 px-3 py-2 bg-bg-secondary hover:bg-bg-tertiary rounded-lg border border-border transition-colors",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-lg",children:"model"===p?"check":"content_copy"})}),(0,l.jsx)("button",{onClick:()=>b(""),className:"p-2 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-lg",children:"close"})})]})]}),e.value&&(0,l.jsxs)("div",{className:"mt-2 flex flex-col sm:flex-row sm:items-center gap-2",children:[(0,l.jsx)("code",{className:"w-full sm:w-auto flex-1 px-3 py-2 bg-bg-secondary rounded-lg text-sm font-mono border border-border truncate",children:v(e.value)}),e.copyable&&(0,l.jsx)("button",{onClick:()=>_(e.value,`${e.step}-${e.title}`),className:"shrink-0 px-3 py-2 bg-bg-secondary hover:bg-bg-tertiary rounded-lg border border-border transition-colors",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-lg",children:p===`${e.step}-${e.title}`?"check":"content_copy"})})]})]})]},e.step)),E()&&t.codeBlock&&(0,l.jsxs)("div",{className:"mt-2",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,l.jsx)("span",{className:"text-xs text-text-muted uppercase tracking-wide",children:t.codeBlock.language}),(0,l.jsxs)("button",{onClick:()=>_(t.codeBlock.code,"codeblock"),className:"flex items-center gap-1 px-2 py-1 text-xs bg-bg-secondary hover:bg-bg-tertiary rounded border border-border transition-colors",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-sm",children:"codeblock"===p?"check":"content_copy"}),"codeblock"===p?"Copied!":"Copy"]})]}),(0,l.jsx)("pre",{className:"p-4 bg-bg-secondary rounded-lg border border-border overflow-x-auto",children:(0,l.jsx)("code",{className:"text-sm font-mono whitespace-pre",children:v(t.codeBlock.code)})})]})]}):(0,l.jsx)("p",{className:"text-text-muted text-sm",children:"Coming soon..."})}),(0,l.jsx)(r.rq,{isOpen:g,onClose:()=>f(!1),onSelect:e=>{b(e.value)},selectedModel:y,activeProviders:c,title:"Select Model"})]})}function C({tool:e,isExpanded:t,onToggle:s,baseUrl:n,apiKeys:o,activeProviders:d,cloudEnabled:c,initialStatus:m,tunnelEnabled:p,tunnelPublicUrl:h,tailscaleEnabled:f,tailscaleUrl:y}){let b,j,N,v,w,[k,_]=(0,a.useState)(m||null),[S,E]=(0,a.useState)(!1),[A,O]=(0,a.useState)(!1),[M,P]=(0,a.useState)(!1),[$,I]=(0,a.useState)(null),[R,U]=(0,a.useState)(!1),[T,K]=(0,a.useState)(""),[z,D]=(0,a.useState)(""),[F,L]=(0,a.useState)(""),[q,H]=(0,a.useState)(!1),[B,W]=(0,a.useState)(!1),[J,G]=(0,a.useState)({}),[V,Y]=(0,a.useState)(!1),[Z,Q]=(0,a.useState)(""),[X,ee]=(0,a.useState)([]),[et,es]=(0,a.useState)(""),el=(0,a.useRef)([]);(0,a.useEffect)(()=>{el.current=X},[X]),(0,a.useEffect)(()=>{o?.length>0&&!T&&K(o[0].key)},[o,T]),(0,a.useEffect)(()=>{m&&_(m)},[m]),(0,a.useEffect)(()=>{t&&!k&&(eo(),ea()),t&&ea()},[t]),(0,a.useEffect)(()=>{k?.opencode?.models&&ee(k.opencode.models),k?.opencode?.activeModel&&es(k.opencode.activeModel),k?.config?.agent?.explorer?.model?.startsWith("9router/")&&L(k.config.agent.explorer.model.replace("9router/",""))},[k]);let ea=async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&G(t.aliases||{})}catch(e){console.log("Error fetching model aliases:",e)}},er=async e=>{try{let t=T&&T.trim()||c?T:"sk_9router",s=e.includes(et)?et:e[0]||"";await fetch("/api/cli-tools/opencode-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:en(),apiKey:t,models:e,activeModel:s,subagentModel:F})})}catch(e){console.log("Error saving models:",e)}},ei=k?.installed?k.config&&k.has9Router?g(k.config?.provider?.["9router"]?.options?.baseURL||"",{tunnelPublicUrl:h,tailscaleUrl:y})?"configured":"other":"not_configured":null,en=()=>{let e=Z||n;return e.endsWith("/v1")?e:`${e}/v1`},eo=async()=>{E(!0);try{let e=await fetch("/api/cli-tools/opencode-settings"),t=await e.json();_(t)}catch(e){_({installed:!1,error:e.message})}finally{E(!1)}},ed=async()=>{O(!0),I(null);try{let e=T&&T.trim()||c?T:"sk_9router",t=await fetch("/api/cli-tools/opencode-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:en(),apiKey:e,models:X,activeModel:""===et?"":et||X[0],subagentModel:F})}),s=await t.json();t.ok?(I({type:"success",text:"Settings applied successfully!"}),eo()):I({type:"error",text:s.error||"Failed to apply settings"})}catch(e){I({type:"error",text:e.message})}finally{O(!1)}},ec=async()=>{P(!0),I(null);try{let e=await fetch("/api/cli-tools/opencode-settings",{method:"DELETE"}),t=await e.json();e.ok?(I({type:"success",text:"Settings reset successfully!"}),D(""),L(""),ee([]),es(""),eo()):I({type:"error",text:t.error||"Failed to reset settings"})}catch(e){I({type:"error",text:e.message})}finally{P(!1)}};return(0,l.jsxs)(r.Zp,{padding:"xs",className:"overflow-hidden",children:[(0,l.jsxs)("div",{className:"flex items-start justify-between gap-3 hover:cursor-pointer sm:items-center",onClick:s,children:[(0,l.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,l.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,l.jsx)(i.default,{src:"/providers/opencode.png",alt:e.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:e=>{e.target.style.display="none"}})}),(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[(0,l.jsx)("h3",{className:"font-medium text-sm",children:e.name}),"configured"===ei&&(0,l.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"===ei&&(0,l.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"===ei&&(0,l.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,l.jsx)("p",{className:"text-xs text-text-muted truncate",children:e.description})]})]}),(0,l.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${t?"rotate-180":""}`,children:"expand_more"})]}),t&&(0,l.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[S&&(0,l.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,l.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,l.jsx)("span",{children:"Checking OpenCode CLI..."})]}),!S&&k&&!k.installed&&(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsxs)("div",{className:"flex flex-col gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,l.jsxs)("div",{className:"flex items-start gap-3",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,l.jsxs)("div",{className:"flex-1",children:[(0,l.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:"OpenCode CLI not detected locally"}),(0,l.jsx)("p",{className:"text-sm text-text-muted",children:"Manual configuration is still available if 9router is deployed on a remote server."})]})]}),(0,l.jsxs)("div",{className:"flex items-center gap-2 pl-9",children:[(0,l.jsxs)(r.$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,l.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:"content_copy"}),"Manual Config"]}),(0,l.jsxs)(r.$n,{variant:"outline",size:"sm",onClick:()=>U(!R),children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:R?"expand_less":"help"}),R?"Hide":"How to Install"]})]})]}),R&&(0,l.jsxs)("div",{className:"p-4 bg-surface border border-border rounded-lg",children:[(0,l.jsx)("h4",{className:"font-medium mb-3",children:"Installation Guide"}),(0,l.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{className:"text-text-muted mb-1",children:"macOS / Linux:"}),(0,l.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,l.jsxs)("p",{className:"text-text-muted",children:["After installation, run ",(0,l.jsx)("code",{className:"px-1 bg-black/5 dark:bg-white/5 rounded",children:"opencode"})," to verify."]})]})]})]}),!S&&k?.installed&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr] sm:items-center sm:gap-2",children:[(0,l.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Select Endpoint"}),(0,l.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,l.jsx)(x,{value:Z||Z||`${n}/v1`,onChange:Q,requiresExternalUrl:e.requiresExternalUrl,tunnelEnabled:p,tunnelPublicUrl:h,tailscaleEnabled:f,tailscaleUrl:y})]}),k?.config?.provider?.["9router"]?.options?.baseURL&&(0,l.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,l.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Current"}),(0,l.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,l.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:k.config.provider["9router"].options.baseURL})]}),(0,l.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,l.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"API Key"}),(0,l.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,l.jsx)(u,{value:T,onChange:K,apiKeys:o,cloudEnabled:c})]}),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr] sm:items-start sm:gap-2",children:[(0,l.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right pt-1",children:"Models"}),(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px] mt-1.5",children:"arrow_forward"}),(0,l.jsxs)("div",{className:"flex-1 flex flex-col gap-2",children:[(0,l.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===X.length?(0,l.jsx)("span",{className:"text-xs text-text-muted",children:"No models selected"}):X.map(e=>(0,l.jsxs)("span",{onClick:async()=>{if(e===et)try{(await fetch("/api/cli-tools/opencode-settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({clearActiveModel:!0})})).ok&&(es(""),eo())}catch(e){console.log("Error clearing active model:",e)}else es(e)},className:`inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs cursor-pointer transition-colors ${e===et?"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:e===et?"Click to clear active model":"Click to set as active",children:[e===et&&(0,l.jsx)("span",{className:"material-symbols-outlined text-[10px]",children:"star"}),e,(0,l.jsx)("button",{onClick:async t=>{t.stopPropagation();try{if((await fetch(`/api/cli-tools/opencode-settings?model=${encodeURIComponent(e)}`,{method:"DELETE"})).ok){let t=X.filter(t=>t!==e);ee(t),et===e&&es(""),eo()}}catch(e){console.log("Error removing model:",e)}},className:"ml-0.5 hover:text-red-500",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"close"})})]},e))}),(0,l.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,l.jsx)("button",{onClick:()=>H(!0),disabled:!d?.length,className:`px-2 py-1 rounded border text-xs transition-colors ${d?.length?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Add Model"}),(0,l.jsx)("span",{className:"text-xs text-text-muted",children:X.length>0&&et?(0,l.jsxs)(l.Fragment,{children:["Active: ",(0,l.jsx)("span",{className:"text-primary",children:et})]}):X.length>0?(0,l.jsx)("span",{className:"text-yellow-500",children:"Click a model to set/clear active"}):"Select models to add"})]})]})]}),(0,l.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,l.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Subagent Model"}),(0,l.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,l.jsx)("input",{type:"text",value:F,onChange:e=>L(e.target.value),placeholder:z||"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,l.jsx)("button",{onClick:()=>W(!0),disabled:!d?.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 ${d?.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,l.jsx)("button",{onClick:()=>L(""),className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear (will use main model)",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})]}),$&&(0,l.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===$.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===$.type?"check_circle":"error"}),(0,l.jsx)("span",{children:$.text})]}),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,l.jsxs)(r.$n,{variant:"primary",size:"sm",onClick:ed,disabled:0===X.length,loading:A,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,l.jsxs)(r.$n,{variant:"outline",size:"sm",onClick:ec,disabled:!k.has9Router,loading:M,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,l.jsxs)(r.$n,{variant:"ghost",size:"sm",onClick:()=>Y(!0),children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]})]})]})]}),(0,l.jsx)(r.rq,{isOpen:q,onClose:()=>{H(!1),er(el.current)},onSelect:e=>{!X.includes(e.value)&&(ee([...X,e.value]),et||es(e.value))},onDeselect:e=>{let t=X.filter(t=>t!==e.value);ee(t),et===e.value&&es(t[0]||"")},selectedModel:null,activeProviders:d,modelAliases:J,addedModelValues:X,closeOnSelect:!1,title:"Add Model for OpenCode"}),(0,l.jsx)(r.rq,{isOpen:B,onClose:()=>W(!1),onSelect:e=>{L(e.value),W(!1)},selectedModel:F,activeProviders:d,modelAliases:J,title:"Select Subagent Model for OpenCode"}),(0,l.jsx)(r.uR,{isOpen:V,onClose:()=>Y(!1),title:"OpenCode - Manual Configuration",configs:(b=T&&T.trim()?T:c?"<API_KEY_FROM_DASHBOARD>":"sk_9router",j=X.length>0?X:["provider/model-id"],N=et||X[0]||j[0],v=F||N,w={},j.forEach(e=>{w[e]={name:e,modalities:{input:["text","image"],output:["text"]}}}),[{filename:"~/.config/opencode/opencode.json",content:JSON.stringify({provider:{"9router":{npm:"@ai-sdk/openai-compatible",options:{baseURL:en(),apiKey:b},models:w}},model:`9router/${N}`,agent:{explorer:{description:"Fast explorer subagent for codebase exploration",mode:"subagent",model:`9router/${v}`}}},null,2)}])})]})}let _="/api/cli-tools/cowork-settings",S=e=>(e||"").replace(/\/v1\/?$/,"");function E({tool:e,isExpanded:t,onToggle:s,baseUrl:n,apiKeys:o,activeProviders:d,hasActiveProviders:c,cloudEnabled:m,cloudUrl:p,tunnelEnabled:h,tunnelPublicUrl:g,tailscaleEnabled:f,tailscaleUrl:y,initialStatus:b}){let j,N,v,w,[k,C]=(0,a.useState)(b||null),[A,O]=(0,a.useState)(!1),[M,P]=(0,a.useState)(!1),[$,I]=(0,a.useState)(!1),[R,U]=(0,a.useState)(null),[T,K]=(0,a.useState)(""),[z,D]=(0,a.useState)([]),[F,L]=(0,a.useState)(!1),[q,H]=(0,a.useState)(""),[B,W]=(0,a.useState)([]),[J,G]=(0,a.useState)([]),[V,Y]=(0,a.useState)([]),[Z,Q]=(0,a.useState)({}),[X,ee]=(0,a.useState)(!1),[et,es]=(0,a.useState)(!1),[el,ea]=(0,a.useState)(!1),[er,ei]=(0,a.useState)(!1),[en,eo]=(0,a.useState)({type:"url",name:"",url:"",command:"",args:""});(0,a.useEffect)(()=>{o?.length>0&&!T&&K(o[0].key)},[o,T]),(0,a.useEffect)(()=>{b&&C(b)},[b]),(0,a.useEffect)(()=>{t&&!k&&ed()},[t]),(0,a.useEffect)(()=>{t&&fetch("/api/models/alias").then(e=>e.ok?e.json():null).then(e=>{e&&Q(e.aliases||{})}).catch(()=>{})},[t]),(0,a.useEffect)(()=>{k?.cowork?.models?.length&&D(k.cowork.models),k?.cowork?.baseUrl&&!q&&H(S(k.cowork.baseUrl)),Array.isArray(k?.cowork?.plugins)&&k.cowork.plugins.length>0?W(k.cowork.plugins):0===B.length&&Array.isArray(k?.defaultPlugins)&&W(k.defaultPlugins),Array.isArray(k?.cowork?.localPlugins)&&G(k.cowork.localPlugins),Array.isArray(k?.cowork?.customPlugins)&&k.cowork.customPlugins.length>0&&Y(k.cowork.customPlugins)},[k]);let ed=async()=>{O(!0);try{let e=await fetch(_),t=await e.json();C(t)}catch(e){C({installed:!1,error:e.message})}finally{O(!1)}},ec=()=>{let e;return(e=(q||"").replace(/\/+$/,""))?/\/v1$/.test(e)?e:`${e}/v1`:""},em=k?.installed?k?.cowork?.baseUrl?k.has9Router?"configured":"other":"not_configured":null,ex=async()=>{U(null);let e=ec();if(0===z.length)return void U({type:"error",text:"Please select at least one model"});P(!0);try{let t=T?.trim()||(o?.length>0?o[0].key:null)||(m?null:"sk_9router"),s=await fetch(_,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:e,apiKey:t,models:z,plugins:B,localPlugins:J,customPlugins:V})}),l=await s.json();s.ok?(U({type:"success",text:"Settings applied. Quit & reopen Claude Desktop to load."}),ed()):U({type:"error",text:l.error||"Failed to apply settings"})}catch(e){U({type:"error",text:e.message})}finally{P(!1)}},ep=async({name:e,models:t})=>{try{let s=await fetch("/api/combos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e,models:t})});if(!s.ok){let e=await s.json();U({type:"error",text:e.error||"Failed to create combo"});return}z.includes(e)||D([...z,e]),ee(!1),U({type:"success",text:`Combo "${e}" created and added.`})}catch(e){U({type:"error",text:e.message})}},eu=e=>{let t=e?.value||e?.name||e;D(e=>e.filter(e=>e!==t))},eh=async()=>{I(!0),U(null);try{let e=await fetch(_,{method:"DELETE"}),t=await e.json();e.ok?(U({type:"success",text:"Settings reset successfully"}),D([]),W(k?.defaultPlugins||[]),G([]),Y([]),ed()):U({type:"error",text:t.error||"Failed to reset"})}catch(e){U({type:"error",text:e.message})}finally{I(!1)}};return(0,l.jsxs)(r.Zp,{padding:"xs",className:"overflow-hidden",children:[(0,l.jsxs)("div",{className:"flex items-start justify-between gap-3 hover:cursor-pointer sm:items-center",onClick:s,children:[(0,l.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,l.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,l.jsx)(i.default,{src:e.image,alt:e.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:e=>{e.target.style.display="none"}})}),(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[(0,l.jsx)("h3",{className:"font-medium text-sm",children:e.name}),"configured"===em&&(0,l.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"===em&&(0,l.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"===em&&(0,l.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,l.jsx)("p",{className:"text-xs text-text-muted truncate",children:e.description})]})]}),(0,l.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${t?"rotate-180":""}`,children:"expand_more"})]}),t&&(0,l.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[A&&(0,l.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,l.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,l.jsx)("span",{children:"Checking Claude Cowork..."})]}),!A&&k&&!k.installed&&(0,l.jsxs)("div",{className:"flex flex-col gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,l.jsxs)("div",{className:"flex items-start gap-3",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,l.jsxs)("div",{className:"flex-1",children:[(0,l.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:"Claude Desktop (Cowork mode) not detected"}),(0,l.jsx)("p",{className:"text-sm text-text-muted",children:"Open Claude Desktop → Help → Troubleshooting → Enable Developer mode → Configure third-party inference, then return here."})]})]}),(0,l.jsx)("div",{className:"pl-9",children:(0,l.jsxs)(r.$n,{variant:"secondary",size:"sm",onClick:()=>L(!0),className:"!bg-yellow-500/20 !border-yellow-500/40 !text-yellow-700 dark:!text-yellow-300 hover:!bg-yellow-500/30",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:"content_copy"}),"Manual Config"]})})]}),!A&&k?.installed&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr] sm:items-center sm:gap-2",children:[(0,l.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Select Endpoint"}),(0,l.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,l.jsx)(x,{value:ec(),onChange:e=>H(S(e)),tunnelEnabled:h,tunnelPublicUrl:g,tailscaleEnabled:f,tailscaleUrl:y,cloudEnabled:m,cloudUrl:p})]}),k?.cowork?.baseUrl&&(0,l.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,l.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Current"}),(0,l.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,l.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:k.cowork.baseUrl})]}),(0,l.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,l.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"API Key"}),(0,l.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,l.jsx)(u,{value:T,onChange:K,apiKeys:o,cloudEnabled:m})]}),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr] sm:items-center sm:gap-2",children:[(0,l.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Models"}),(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,l.jsxs)("div",{className:"flex-1 flex items-center gap-2",children:[(0,l.jsx)("div",{className:"flex-1 flex flex-wrap gap-1.5 min-h-[28px] px-2 py-1.5 bg-surface rounded border border-border",children:0===z.length?(0,l.jsx)("span",{className:"text-xs text-text-muted",children:"No models selected"}):z.map(e=>(0,l.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:[e,(0,l.jsx)("button",{onClick:()=>eu(e),className:"ml-0.5 hover:text-red-500",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"close"})})]},e))}),(0,l.jsx)("button",{onClick:()=>ee(!0),disabled:!c,className:`shrink-0 px-2 py-1.5 rounded border text-xs whitespace-nowrap transition-colors ${c?"bg-primary/10 border-primary/40 text-primary hover:bg-primary/20 cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"+ Combo"})]})]}),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr] sm:items-start sm:gap-2",children:[(0,l.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right pt-2",children:"MCP"}),(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px] mt-2",children:"arrow_forward"}),(0,l.jsxs)("div",{className:"flex-1 flex flex-col gap-1",children:[B.filter(e=>"exa"!==e.name).map(e=>(0,l.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 bg-surface rounded border border-border",children:[(0,l.jsx)("span",{className:"text-xs font-medium min-w-0 truncate flex-shrink-0",children:e.title||e.name}),e.oauth&&(0,l.jsx)("span",{className:"text-[8px] text-amber-600 shrink-0",children:"OAuth"}),(0,l.jsxs)("div",{className:"flex-1 flex flex-wrap gap-1 overflow-hidden",style:{maxHeight:"1.5rem"},children:[Array.isArray(e.toolNames)&&e.toolNames.slice(0,6).map(e=>(0,l.jsx)("span",{className:"text-[9px] px-1 py-0.5 rounded bg-black/5 dark:bg-white/5 text-text-muted whitespace-nowrap",children:e},e)),Array.isArray(e.toolNames)&&e.toolNames.length>6&&(0,l.jsxs)("span",{className:"text-[9px] px-1 py-0.5 rounded bg-black/5 dark:bg-white/5 text-text-muted whitespace-nowrap",children:["+",e.toolNames.length-6]})]}),(0,l.jsx)("button",{onClick:()=>{var t;return t=e.name,void W(B.filter(e=>e.name!==t))},className:"shrink-0 hover:text-red-500 ml-auto",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"close"})})]},e.name)),V.map(e=>(0,l.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 bg-surface rounded border border-border",children:[(0,l.jsx)("span",{className:"text-xs font-medium min-w-0 truncate flex-shrink-0",children:e.name}),(0,l.jsx)("span",{className:"text-[8px] px-1 py-0.5 rounded bg-blue-500/10 text-blue-500 shrink-0",children:"custom"}),(0,l.jsx)("span",{className:"flex-1 text-[9px] text-text-muted truncate",children:e.url||e.command}),(0,l.jsx)("button",{onClick:()=>Y(V.filter(t=>t.name!==e.name)),className:"shrink-0 hover:text-red-500 ml-auto",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"close"})})]},e.name)),0===B.filter(e=>"exa"!==e.name).length&&0===V.length&&(0,l.jsx)("div",{className:"px-2 py-1.5 bg-surface rounded border border-border text-xs text-text-muted",children:"No MCPs added"}),(0,l.jsxs)("div",{className:"flex items-center gap-2 mt-0.5",children:[(0,l.jsx)("button",{onClick:()=>ea(!0),className:"px-2 py-1 rounded border text-xs bg-primary/10 border-primary/40 text-primary hover:bg-primary/20 cursor-pointer whitespace-nowrap",children:"+ Browse"}),(0,l.jsx)("button",{onClick:()=>{eo({type:"url",name:"",url:"",command:"",args:""}),ei(!0)},className:"px-2 py-1 rounded border text-xs bg-surface border-border text-text-muted hover:border-primary hover:text-primary cursor-pointer whitespace-nowrap",children:"+ Custom"}),(0,l.jsx)("a",{href:"https://mcp.so",target:"_blank",rel:"noopener noreferrer",className:"text-[10px] text-text-muted hover:text-primary underline ml-auto",children:"Find MCPs →"})]})]})]}),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr] sm:items-start sm:gap-2",children:[(0,l.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right pt-1",children:"Tools"}),(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px] mt-1.5",children:"arrow_forward"}),(0,l.jsxs)("div",{className:"flex-1 flex flex-col gap-1.5",children:[(j=B.some(e=>"exa"===e.name),N=(k?.defaultPlugins||[]).find(e=>"exa"===e.name),(0,l.jsxs)("label",{className:"flex items-start gap-2 cursor-pointer px-2 py-1.5 bg-surface rounded border border-border",children:[(0,l.jsx)("input",{type:"checkbox",checked:j,onChange:e=>{e.target.checked&&N?W([...B.filter(e=>"exa"!==e.name),N]):W(B.filter(e=>"exa"!==e.name))},className:"mt-0.5"}),(0,l.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,l.jsx)("div",{className:"text-xs font-medium",children:"Web Search & Fetch (Exa)"}),(0,l.jsx)("p",{className:"text-[10px] text-text-muted leading-snug",children:"Replaces built-in WebSearch/WebFetch. Auto-strips duplicates from tool list."})]})]})),(()=>{let e=(k?.localStdioPlugins||[]).find(e=>"browsermcp"===e.name);if(!e)return null;let t=J.includes("browsermcp");return(0,l.jsxs)("label",{className:"flex items-start gap-2 cursor-pointer px-2 py-1.5 bg-surface rounded border border-border",children:[(0,l.jsx)("input",{type:"checkbox",checked:t,onChange:e=>G(e.target.checked?[...J,"browsermcp"]:J.filter(e=>"browsermcp"!==e)),className:"mt-0.5"}),(0,l.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,l.jsx)("div",{className:"text-xs font-medium",children:"Browser Control (Browser MCP)"}),(0,l.jsxs)("p",{className:"text-[10px] text-text-muted leading-snug",children:["Controls your running Chrome. Auto-strips Cowork's built-in browser tools."," ",(0,l.jsx)("a",{href:e.extensionUrl,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:"Install Chrome extension"})]})]})]})})()]})]}),Array.isArray(k?.localStdioPlugins)&&k.localStdioPlugins.filter(e=>"browsermcp"!==e.name).length>0&&(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr] sm:items-start sm:gap-2",children:[(0,l.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right pt-1",children:"Local Plugins"}),(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px] mt-1.5",children:"arrow_forward"}),(0,l.jsxs)("div",{className:"flex-1 flex flex-col gap-2",children:[(0,l.jsx)("div",{className:"flex flex-col gap-1.5 px-2 py-1.5 bg-surface rounded border border-border",children:k.localStdioPlugins.filter(e=>"browsermcp"!==e.name).map(e=>{let t=J.includes(e.name);return(0,l.jsxs)("label",{className:"flex items-start gap-2 cursor-pointer",children:[(0,l.jsx)("input",{type:"checkbox",checked:t,onChange:t=>G(t.target.checked?[...J,e.name]:J.filter(t=>t!==e.name)),className:"mt-0.5"}),(0,l.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,l.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[(0,l.jsx)("span",{className:"text-xs font-medium",children:e.title}),(0,l.jsx)("span",{className:"text-[8px] text-amber-600",children:"stdio"})]}),(0,l.jsx)("p",{className:"text-[10px] text-text-muted leading-snug",children:e.description}),e.extensionUrl&&(0,l.jsx)("a",{href:e.extensionUrl,target:"_blank",rel:"noopener noreferrer",className:"text-[10px] text-primary underline",children:"Install Chrome extension"})]})]},e.name)})}),(0,l.jsxs)("p",{className:"text-[10px] text-text-muted leading-snug",children:["⚠️ Local plugins run as subprocess via ",(0,l.jsx)("code",{className:"px-1 py-0.5 rounded bg-black/5 dark:bg-white/5",children:"npx"}),". Requires Node.js installed."]})]})]})]}),R&&(0,l.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===R.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===R.type?"check_circle":"error"}),(0,l.jsx)("span",{children:R.text})]}),(0,l.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center gap-2",children:[(0,l.jsxs)(r.$n,{variant:"primary",size:"sm",onClick:ex,disabled:0===z.length,loading:M,className:"w-full sm:w-auto",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,l.jsxs)(r.$n,{variant:"outline",size:"sm",onClick:eh,disabled:!k.has9Router,loading:$,className:"w-full sm:w-auto",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,l.jsxs)(r.$n,{variant:"ghost",size:"sm",onClick:()=>L(!0),className:"w-full sm:w-auto",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]})]})]})]}),(0,l.jsx)(r.uR,{isOpen:F,onClose:()=>L(!1),title:"Claude Cowork - Manual Configuration",configs:(v=T&&T.trim()?T:m?"<API_KEY_FROM_DASHBOARD>":"sk_9router",w=z.length>0?z:["provider/model-id"],[{filename:"~/Library/Application Support/Claude-3p/configLibrary/<appliedId>.json",content:JSON.stringify({inferenceProvider:"gateway",inferenceGatewayBaseUrl:ec()||"https://your-public-host/v1",inferenceGatewayApiKey:v,inferenceModels:w.map(e=>({name:e}))},null,2)}])}),(0,l.jsx)(r.CK,{isOpen:X,combo:null,onClose:()=>ee(!1),onSave:ep,activeProviders:d,forcePrefix:"claude-",title:"Create Cowork Combo"}),(0,l.jsx)(r.rq,{isOpen:et,onClose:()=>es(!1),onSelect:e=>{let t=e?.value||e?.name||e;!t||z.includes(t)||D(e=>[...e,t])},onDeselect:eu,activeProviders:d,modelAliases:Z,title:"Select Cowork Model",addedModelValues:z,closeOnSelect:!1}),(0,l.jsx)(r.Nf,{isOpen:el,onClose:()=>ea(!1),onAdd:e=>{B.some(t=>t.name===e.name)||W([...B,e])},addedNames:B.map(e=>e.name)}),er&&(0,l.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40",onClick:()=>ei(!1),children:(0,l.jsxs)("div",{className:"bg-surface border border-border rounded-xl shadow-xl w-full max-w-sm mx-4 p-5 flex flex-col gap-4",onClick:e=>e.stopPropagation(),children:[(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsx)("h3",{className:"font-semibold text-sm",children:"Add Custom MCP"}),(0,l.jsx)("button",{onClick:()=>ei(!1),className:"text-text-muted hover:text-text-main",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"close"})})]}),(0,l.jsxs)("div",{className:"flex gap-2",children:[(0,l.jsx)("button",{onClick:()=>eo(e=>({...e,type:"url"})),className:`flex-1 py-1.5 rounded border text-xs font-medium transition-colors ${"url"===en.type?"bg-primary/10 border-primary/40 text-primary":"border-border text-text-muted hover:border-primary/40"}`,children:"URL (SSE)"}),(0,l.jsx)("button",{onClick:()=>eo(e=>({...e,type:"cmd"})),className:`flex-1 py-1.5 rounded border text-xs font-medium transition-colors ${"cmd"===en.type?"bg-primary/10 border-primary/40 text-primary":"border-border text-text-muted hover:border-primary/40"}`,children:"Command (stdio)"})]}),(0,l.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,l.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,l.jsx)("label",{className:"text-[11px] text-text-muted font-medium",children:"Name"}),(0,l.jsx)("input",{type:"text",placeholder:"my-mcp",value:en.name,onChange:e=>eo(t=>({...t,name:e.target.value.replace(/\s+/g,"-").toLowerCase()})),className:"px-2 py-1.5 rounded border border-border bg-surface text-xs outline-none focus:border-primary"})]}),"url"===en.type?(0,l.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,l.jsx)("label",{className:"text-[11px] text-text-muted font-medium",children:"SSE URL"}),(0,l.jsx)("input",{type:"text",placeholder:"https://your-mcp-server.com/sse",value:en.url,onChange:e=>eo(t=>({...t,url:e.target.value})),className:"px-2 py-1.5 rounded border border-border bg-surface text-xs outline-none focus:border-primary"})]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,l.jsx)("label",{className:"text-[11px] text-text-muted font-medium",children:"Command"}),(0,l.jsx)("input",{type:"text",placeholder:"npx",value:en.command,onChange:e=>eo(t=>({...t,command:e.target.value})),className:"px-2 py-1.5 rounded border border-border bg-surface text-xs outline-none focus:border-primary"})]}),(0,l.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,l.jsxs)("label",{className:"text-[11px] text-text-muted font-medium",children:["Args ",(0,l.jsx)("span",{className:"font-normal",children:"(comma-separated)"})]}),(0,l.jsx)("input",{type:"text",placeholder:"-y, @some/mcp-package",value:en.args,onChange:e=>eo(t=>({...t,args:e.target.value})),className:"px-2 py-1.5 rounded border border-border bg-surface text-xs outline-none focus:border-primary"})]})]})]}),(0,l.jsxs)("div",{className:"flex gap-2 justify-end",children:[(0,l.jsx)("button",{onClick:()=>ei(!1),className:"px-3 py-1.5 rounded border border-border text-xs text-text-muted hover:bg-surface cursor-pointer",children:"Cancel"}),(0,l.jsx)("button",{onClick:()=>{let e=en.name.trim();if(e){if("url"===en.type){if(!en.url.trim())return;Y(t=>[...t.filter(t=>t.name!==e),{name:e,url:en.url.trim(),transport:"sse",custom:!0}])}else{if(!en.command.trim())return;let t=en.args.split(",").map(e=>e.trim()).filter(Boolean);Y(s=>[...s.filter(t=>t.name!==e),{name:e,command:en.command.trim(),args:t,custom:!0}])}ei(!1)}},className:"px-3 py-1.5 rounded bg-primary text-white text-xs font-medium hover:opacity-90 cursor-pointer",children:"Add"})]})]})})]})}function A({tool:e,isExpanded:t,onToggle:s,baseUrl:n,apiKeys:o,activeProviders:d,cloudEnabled:c,initialStatus:m,tunnelEnabled:p,tunnelPublicUrl:h,tailscaleEnabled:f,tailscaleUrl:y}){let b,j,[N,v]=(0,a.useState)(m||null),[w,k]=(0,a.useState)(!1),[C,_]=(0,a.useState)(!1),[S,E]=(0,a.useState)(!1),[O,M]=(0,a.useState)(null),[P,$]=(0,a.useState)(""),[I,R]=(0,a.useState)(""),[U,T]=(0,a.useState)({}),[K,z]=(0,a.useState)(!1),[D,F]=(0,a.useState)([]),[L,q]=(0,a.useState)(!1),H=(0,a.useRef)([]);(0,a.useEffect)(()=>{H.current=D},[D]),(0,a.useEffect)(()=>{o?.length>0&&!P&&$(o[0].key)},[o,P]),(0,a.useEffect)(()=>{m&&v(m)},[m]),(0,a.useEffect)(()=>{t&&!N&&(V(),B()),t&&B()},[t]),(0,a.useEffect)(()=>{if(N?.config&&Array.isArray(N.config)&&0===D.length){let e=N.config.find(e=>"9Router"===e.name);e?.models?.length>0&&F(e.models.map(e=>e.id))}},[N]);let B=async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&T(t.aliases||{})}catch(e){console.log("Error fetching model aliases:",e)}},W=async e=>{try{let t=P&&P.trim()||c?P:"sk_9router";await fetch("/api/cli-tools/copilot-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:G(),apiKey:t,models:e})})}catch(e){console.log("Error saving models:",e)}},J=N?N.has9Router?g(N.currentUrl||"",{tunnelPublicUrl:h,tailscaleUrl:y})?"configured":"other":"not_configured":null,G=()=>{let e=I||n;return e.endsWith("/v1")?e:`${e}/v1`},V=async()=>{k(!0);try{let e=await fetch("/api/cli-tools/copilot-settings"),t=await e.json();v(t)}catch(e){v({error:e.message})}finally{k(!1)}},Y=async()=>{_(!0),M(null);try{let e=P&&P.trim()||c?P:"sk_9router",t=await fetch("/api/cli-tools/copilot-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:G(),apiKey:e,models:D})}),s=await t.json();t.ok?(M({type:"success",text:s.message||"Settings applied! Reload VS Code."}),V()):M({type:"error",text:s.error||"Failed to apply settings"})}catch(e){M({type:"error",text:e.message})}finally{_(!1)}},Z=async()=>{E(!0),M(null);try{let e=await fetch("/api/cli-tools/copilot-settings",{method:"DELETE"}),t=await e.json();e.ok?(M({type:"success",text:"Settings reset successfully!"}),F([]),V()):M({type:"error",text:t.error||"Failed to reset settings"})}catch(e){M({type:"error",text:e.message})}finally{E(!1)}};return(0,l.jsxs)(r.Zp,{padding:"xs",className:"overflow-hidden",children:[(0,l.jsxs)("div",{className:"flex items-start justify-between gap-3 hover:cursor-pointer sm:items-center",onClick:s,children:[(0,l.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,l.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,l.jsx)(i.default,{src:"/providers/copilot.png",alt:e.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:e=>{e.target.style.display="none"}})}),(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[(0,l.jsx)("h3",{className:"font-medium text-sm",children:e.name}),"configured"===J&&(0,l.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"===J&&(0,l.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"===J&&(0,l.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,l.jsx)("p",{className:"text-xs text-text-muted truncate",children:e.description})]})]}),(0,l.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${t?"rotate-180":""}`,children:"expand_more"})]}),t&&(0,l.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[w&&(0,l.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,l.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,l.jsx)("span",{children:"Checking Copilot config..."})]}),!w&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"flex items-start gap-3 p-3 bg-blue-500/10 border border-blue-500/30 rounded-lg",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-blue-500 text-lg",children:"info"}),(0,l.jsxs)("div",{className:"text-xs text-blue-700 dark:text-blue-300",children:[(0,l.jsxs)("p",{className:"font-medium",children:["Writes to ",(0,l.jsx)("code",{className:"px-1 bg-black/5 dark:bg-white/10 rounded",children:"chatLanguageModels.json"})]}),(0,l.jsx)("p",{className:"mt-0.5 opacity-80",children:"Reload VS Code after applying for changes to take effect."})]})]}),(0,l.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr] sm:items-center sm:gap-2",children:[(0,l.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Select Endpoint"}),(0,l.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,l.jsx)(x,{value:I||I||`${n}/v1`,onChange:R,requiresExternalUrl:e.requiresExternalUrl,tunnelEnabled:p,tunnelPublicUrl:h,tailscaleEnabled:f,tailscaleUrl:y})]}),(0,l.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,l.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"API Key"}),(0,l.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,l.jsx)(u,{value:P,onChange:$,apiKeys:o,cloudEnabled:c})]}),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr] sm:items-start sm:gap-2",children:[(0,l.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right pt-1",children:"Models"}),(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px] mt-1.5",children:"arrow_forward"}),(0,l.jsxs)("div",{className:"flex-1 flex flex-col gap-2",children:[(0,l.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===D.length?(0,l.jsx)("span",{className:"text-xs text-text-muted",children:"No models selected"}):D.map(e=>(0,l.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:[e,(0,l.jsx)("button",{onClick:t=>{t.stopPropagation(),F(t=>t.filter(t=>t!==e))},className:"ml-0.5 hover:text-red-500",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"close"})})]},e))}),(0,l.jsx)("div",{children:(0,l.jsx)("button",{onClick:()=>q(!0),disabled:!d?.length,className:`px-2 py-1 rounded border text-xs transition-colors ${d?.length?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Add Model"})})]})]})]}),O&&(0,l.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===O.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===O.type?"check_circle":"error"}),(0,l.jsx)("span",{children:O.text})]}),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,l.jsxs)(r.$n,{variant:"primary",size:"sm",onClick:Y,disabled:0===D.length,loading:C,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,l.jsxs)(r.$n,{variant:"outline",size:"sm",onClick:Z,disabled:!N?.has9Router,loading:S,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,l.jsxs)(r.$n,{variant:"ghost",size:"sm",onClick:()=>z(!0),disabled:0===D.length,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]})]})]})]}),(0,l.jsx)(r.rq,{isOpen:L,onClose:()=>{q(!1),W(H.current)},onSelect:e=>{D.includes(e.value)||F([...D,e.value])},onDeselect:e=>{F(D.filter(t=>t!==e.value))},selectedModel:null,activeProviders:d,modelAliases:U,addedModelValues:D,closeOnSelect:!1,title:"Add Model for GitHub Copilot"}),(0,l.jsx)(r.uR,{isOpen:K,onClose:()=>z(!1),title:"GitHub Copilot - Manual Configuration",configs:(b=P&&P.trim()?P:c?"<API_KEY_FROM_DASHBOARD>":"sk_9router",j=G(),[{filename:"~/Library/Application Support/Code/User/chatLanguageModels.json",content:JSON.stringify([{name:"9Router",vendor:"azure",apiKey:b,models:(D.length>0?D:["provider/model-id"]).map(e=>({id:e,name:e,url:`${j}/chat/completions#models.ai.azure.com`,toolCalling:!0,vision:!1,maxInputTokens:128e3,maxOutputTokens:16e3}))}],null,2)}])})]})}function O({tool:e,isExpanded:t,onToggle:s,baseUrl:n,apiKeys:o,activeProviders:d,cloudEnabled:c,initialStatus:m,tunnelEnabled:p,tunnelPublicUrl:h,tailscaleEnabled:f,tailscaleUrl:y}){let b,j,[N,v]=(0,a.useState)(m||null),[w,k]=(0,a.useState)(!1),[C,_]=(0,a.useState)(!1),[S,E]=(0,a.useState)(!1),[A,M]=(0,a.useState)(null),[P,$]=(0,a.useState)(!1),[I,R]=(0,a.useState)(""),[U,T]=(0,a.useState)(""),[K,z]=(0,a.useState)(!1),[D,F]=(0,a.useState)({}),[L,q]=(0,a.useState)(!1),[H,B]=(0,a.useState)("");(0,a.useEffect)(()=>{o?.length>0&&!I&&R(o[0].key)},[o,I]),(0,a.useEffect)(()=>{m&&v(m)},[m]),(0,a.useEffect)(()=>{t&&!N&&(V(),W()),t&&W()},[t]),(0,a.useEffect)(()=>{N?.settings?.openAiModelId&&T(N.settings.openAiModelId)},[N]);let W=async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&F(t.aliases||{})}catch(e){console.log("Error fetching model aliases:",e)}},J=N?.installed?N.has9Router?g(N.settings?.openAiBaseUrl||"",{tunnelPublicUrl:h,tailscaleUrl:y})?"configured":"other":"not_configured":null,G=()=>{let e=H||`${n}/v1`;return e.endsWith("/v1")?e:`${e}/v1`},V=async()=>{k(!0);try{let e=await fetch("/api/cli-tools/cline-settings"),t=await e.json();v(t)}catch(e){v({installed:!1,error:e.message})}finally{k(!1)}},Y=async()=>{_(!0),M(null);try{let e=I&&I.trim()||c?I:"sk_9router",t=await fetch("/api/cli-tools/cline-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:G(),apiKey:e,model:U})}),s=await t.json();t.ok?(M({type:"success",text:"Settings applied successfully!"}),V()):M({type:"error",text:s.error||"Failed to apply settings"})}catch(e){M({type:"error",text:e.message})}finally{_(!1)}},Z=async()=>{E(!0),M(null);try{let e=await fetch("/api/cli-tools/cline-settings",{method:"DELETE"}),t=await e.json();e.ok?(M({type:"success",text:"Settings reset successfully!"}),T(""),V()):M({type:"error",text:t.error||"Failed to reset settings"})}catch(e){M({type:"error",text:e.message})}finally{E(!1)}};return(0,l.jsxs)(r.Zp,{padding:"xs",className:"overflow-hidden",children:[(0,l.jsxs)("div",{className:"flex items-start justify-between gap-3 hover:cursor-pointer sm:items-center",onClick:s,children:[(0,l.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,l.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,l.jsx)(i.default,{src:"/providers/cline.png",alt:e.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:e=>{e.target.style.display="none"}})}),(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[(0,l.jsx)("h3",{className:"font-medium text-sm",children:e.name}),"configured"===J&&(0,l.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"===J&&(0,l.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"===J&&(0,l.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,l.jsx)("p",{className:"text-xs text-text-muted truncate",children:e.description})]})]}),(0,l.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${t?"rotate-180":""}`,children:"expand_more"})]}),t&&(0,l.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[w&&(0,l.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,l.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,l.jsx)("span",{children:"Checking Cline..."})]}),!w&&N&&!N.installed&&(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsxs)("div",{className:"flex flex-col gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,l.jsxs)("div",{className:"flex items-start gap-3",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,l.jsxs)("div",{className:"flex-1",children:[(0,l.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:"Cline not detected locally"}),(0,l.jsx)("p",{className:"text-sm text-text-muted",children:"Manual configuration is still available if 9router is deployed on a remote server."})]})]}),(0,l.jsxs)("div",{className:"flex items-center gap-2 pl-9",children:[(0,l.jsxs)(r.$n,{variant:"secondary",size:"sm",onClick:()=>q(!0),className:"!bg-yellow-500/20 !border-yellow-500/40 !text-yellow-700 dark:!text-yellow-300 hover:!bg-yellow-500/30",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:"content_copy"}),"Manual Config"]}),(0,l.jsxs)(r.$n,{variant:"outline",size:"sm",onClick:()=>$(!P),children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:P?"expand_less":"help"}),P?"Hide":"How to Install"]})]})]}),P&&(0,l.jsxs)("div",{className:"p-4 bg-surface border border-border rounded-lg",children:[(0,l.jsx)("h4",{className:"font-medium mb-3",children:"Installation Guide"}),(0,l.jsx)("div",{className:"space-y-3 text-sm",children:(0,l.jsxs)("p",{className:"text-text-muted",children:["Install Cline VS Code extension or CLI from ",(0,l.jsx)("a",{className:"text-primary underline",href:"https://docs.cline.bot/",target:"_blank",rel:"noreferrer",children:"docs.cline.bot"}),"."]})})]})]}),!w&&N?.installed&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr] sm:items-center sm:gap-2",children:[(0,l.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Select Endpoint"}),(0,l.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,l.jsx)(x,{value:H||H||`${n}/v1`,onChange:B,requiresExternalUrl:e.requiresExternalUrl,tunnelEnabled:p,tunnelPublicUrl:h,tailscaleEnabled:f,tailscaleUrl:y})]}),N?.settings?.openAiBaseUrl&&(0,l.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,l.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Current"}),(0,l.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,l.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:N.settings.openAiBaseUrl})]}),(0,l.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,l.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"API Key"}),(0,l.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,l.jsx)(u,{value:I,onChange:R,apiKeys:o,cloudEnabled:c})]}),(0,l.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,l.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Model"}),(0,l.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,l.jsxs)("div",{className:"relative w-full min-w-0",children:[(0,l.jsx)("input",{type:"text",value:U,onChange:e=>T(e.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"}),U&&(0,l.jsx)("button",{onClick:()=>T(""),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,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]}),(0,l.jsx)("button",{onClick:()=>z(!0),disabled:!d?.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 ${d?.length?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select Model"})]})]}),A&&(0,l.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,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===A.type?"check_circle":"error"}),(0,l.jsx)("span",{children:A.text})]}),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,l.jsxs)(r.$n,{variant:"primary",size:"sm",onClick:Y,disabled:!I&&c&&o.length>0||!U,loading:C,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,l.jsxs)(r.$n,{variant:"outline",size:"sm",onClick:Z,disabled:S,loading:S,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,l.jsxs)(r.$n,{variant:"ghost",size:"sm",onClick:()=>q(!0),children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]})]})]})]}),(0,l.jsx)(r.rq,{isOpen:K,onClose:()=>z(!1),onSelect:e=>{T(e.value),z(!1)},selectedModel:U,activeProviders:d,modelAliases:D,title:"Select Model for Cline"}),(0,l.jsx)(r.uR,{isOpen:L,onClose:()=>q(!1),title:"Cline - Manual Configuration",configs:(b=I&&I.trim()?I:c?"<API_KEY_FROM_DASHBOARD>":"sk_9router",[{filename:"~/.cline/data/globalState.json",content:JSON.stringify({actModeApiProvider:"openai",planModeApiProvider:"openai",openAiBaseUrl:(j=G()).endsWith("/v1")?j.slice(0,-3):j,openAiModelId:U||"provider/model-id",planModeOpenAiModelId:U||"provider/model-id"},null,2)},{filename:"~/.cline/data/secrets.json",content:JSON.stringify({openAiApiKey:b},null,2)}])})]})}function M({tool:e,isExpanded:t,onToggle:s,baseUrl:n,apiKeys:o,activeProviders:d,cloudEnabled:c,initialStatus:m,tunnelEnabled:p,tunnelPublicUrl:h,tailscaleEnabled:g,tailscaleUrl:f}){let[y,b]=(0,a.useState)(m||null),[j,N]=(0,a.useState)(!1),[v,w]=(0,a.useState)(!1),[k,C]=(0,a.useState)(!1),[_,S]=(0,a.useState)(null),[E,A]=(0,a.useState)(!1),[O,P]=(0,a.useState)(""),[$,I]=(0,a.useState)(""),[R,U]=(0,a.useState)(!1),[T,K]=(0,a.useState)({}),[z,D]=(0,a.useState)(!1),[F,L]=(0,a.useState)("");(0,a.useEffect)(()=>{o?.length>0&&!O&&P(o[0].key)},[o,O]),(0,a.useEffect)(()=>{m&&b(m)},[m]),(0,a.useEffect)(()=>{t&&!y&&(W(),q()),t&&q()},[t]);let q=async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&K(t.aliases||{})}catch(e){console.log("Error fetching model aliases:",e)}},H=y?.installed?y.has9Router?"configured":"not_configured":null,B=()=>{let e=F||`${n}/v1`;return e.endsWith("/v1")?e:`${e}/v1`},W=async()=>{N(!0);try{let e=await fetch("/api/cli-tools/kilo-settings"),t=await e.json();b(t)}catch(e){b({installed:!1,error:e.message})}finally{N(!1)}},J=async()=>{w(!0),S(null);try{let e=O&&O.trim()||c?O:"sk_9router",t=await fetch("/api/cli-tools/kilo-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:B(),apiKey:e,model:$})}),s=await t.json();t.ok?(S({type:"success",text:"Settings applied successfully!"}),W()):S({type:"error",text:s.error||"Failed to apply settings"})}catch(e){S({type:"error",text:e.message})}finally{w(!1)}},G=async()=>{C(!0),S(null);try{let e=await fetch("/api/cli-tools/kilo-settings",{method:"DELETE"}),t=await e.json();e.ok?(S({type:"success",text:"Settings reset successfully!"}),I(""),W()):S({type:"error",text:t.error||"Failed to reset settings"})}catch(e){S({type:"error",text:e.message})}finally{C(!1)}};return(0,l.jsxs)(r.Zp,{padding:"xs",className:"overflow-hidden",children:[(0,l.jsxs)("div",{className:"flex items-start justify-between gap-3 hover:cursor-pointer sm:items-center",onClick:s,children:[(0,l.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,l.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,l.jsx)(i.default,{src:"/providers/kilocode.png",alt:e.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:e=>{e.target.style.display="none"}})}),(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[(0,l.jsx)("h3",{className:"font-medium text-sm",children:e.name}),"configured"===H&&(0,l.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"===H&&(0,l.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,l.jsx)("p",{className:"text-xs text-text-muted truncate",children:e.description})]})]}),(0,l.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${t?"rotate-180":""}`,children:"expand_more"})]}),t&&(0,l.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[j&&(0,l.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,l.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,l.jsx)("span",{children:"Checking Kilo Code..."})]}),!j&&y&&!y.installed&&(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsxs)("div",{className:"flex flex-col gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,l.jsxs)("div",{className:"flex items-start gap-3",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,l.jsxs)("div",{className:"flex-1",children:[(0,l.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:"Kilo Code not detected locally"}),(0,l.jsx)("p",{className:"text-sm text-text-muted",children:"Manual configuration is still available if 9router is deployed on a remote server."})]})]}),(0,l.jsxs)("div",{className:"flex items-center gap-2 pl-9",children:[(0,l.jsxs)(r.$n,{variant:"secondary",size:"sm",onClick:()=>D(!0),className:"!bg-yellow-500/20 !border-yellow-500/40 !text-yellow-700 dark:!text-yellow-300 hover:!bg-yellow-500/30",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:"content_copy"}),"Manual Config"]}),(0,l.jsxs)(r.$n,{variant:"outline",size:"sm",onClick:()=>A(!E),children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:E?"expand_less":"help"}),E?"Hide":"How to Install"]})]})]}),E&&(0,l.jsxs)("div",{className:"p-4 bg-surface border border-border rounded-lg",children:[(0,l.jsx)("h4",{className:"font-medium mb-3",children:"Installation Guide"}),(0,l.jsxs)("p",{className:"text-sm text-text-muted",children:["Install Kilo Code from ",(0,l.jsx)("a",{className:"text-primary underline",href:"https://kilocode.ai",target:"_blank",rel:"noreferrer",children:"kilocode.ai"})," or VS Code extension marketplace."]})]})]}),!j&&y?.installed&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr] sm:items-center sm:gap-2",children:[(0,l.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Select Endpoint"}),(0,l.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,l.jsx)(x,{value:F||F||`${n}/v1`,onChange:L,requiresExternalUrl:e.requiresExternalUrl,tunnelEnabled:p,tunnelPublicUrl:h,tailscaleEnabled:g,tailscaleUrl:f})]}),(0,l.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,l.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"API Key"}),(0,l.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,l.jsx)(u,{value:O,onChange:P,apiKeys:o,cloudEnabled:c})]}),(0,l.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,l.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Model"}),(0,l.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,l.jsxs)("div",{className:"relative w-full min-w-0",children:[(0,l.jsx)("input",{type:"text",value:$,onChange:e=>I(e.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"}),$&&(0,l.jsx)("button",{onClick:()=>I(""),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,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]}),(0,l.jsx)("button",{onClick:()=>U(!0),disabled:!d?.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 ${d?.length?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select Model"})]})]}),_&&(0,l.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===_.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===_.type?"check_circle":"error"}),(0,l.jsx)("span",{children:_.text})]}),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,l.jsxs)(r.$n,{variant:"primary",size:"sm",onClick:J,disabled:!O&&c&&o.length>0||!$,loading:v,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,l.jsxs)(r.$n,{variant:"outline",size:"sm",onClick:G,disabled:k,loading:k,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,l.jsxs)(r.$n,{variant:"ghost",size:"sm",onClick:()=>D(!0),children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]})]})]})]}),(0,l.jsx)(r.rq,{isOpen:R,onClose:()=>U(!1),onSelect:e=>{I(e.value),U(!1)},selectedModel:$,activeProviders:d,modelAliases:T,title:"Select Model for Kilo Code"}),(0,l.jsx)(r.uR,{isOpen:z,onClose:()=>D(!1),title:"Kilo Code - Manual Configuration",configs:[{filename:"~/.local/share/kilo/auth.json",content:JSON.stringify({"openai-compatible":{type:"api-key",apiKey:O&&O.trim()?O:c?"<API_KEY_FROM_DASHBOARD>":"sk_9router",baseUrl:B(),model:$||"provider/model-id"}},null,2)}]})]})}let P="/api/cli-tools/deepseek-tui-settings";function $({tool:e,isExpanded:t,onToggle:s,baseUrl:n,hasActiveProviders:o,apiKeys:d,activeProviders:c,cloudEnabled:m,initialStatus:p,tunnelEnabled:h,tunnelPublicUrl:f,tailscaleEnabled:y,tailscaleUrl:b}){let j,[N,v]=(0,a.useState)(p||null),[w,k]=(0,a.useState)(!1),[C,_]=(0,a.useState)(!1),[S,E]=(0,a.useState)(!1),[A,O]=(0,a.useState)(null),[M,I]=(0,a.useState)(""),[R,U]=(0,a.useState)(""),[T,K]=(0,a.useState)(!1),[z,D]=(0,a.useState)({}),[F,L]=(0,a.useState)(!1),[q,H]=(0,a.useState)(""),B=(0,a.useRef)(!1),W=(()=>{if(!N?.installed)return null;let e=N.settings?.["providers.openai"];return e?.base_url?g(e.base_url,{tunnelPublicUrl:f,tailscaleUrl:b})?"configured":"other":"not_configured"})();(0,a.useEffect)(()=>{d?.length>0&&!M&&I(d[0].key)},[d,M]),(0,a.useEffect)(()=>{p&&v(p)},[p]),(0,a.useEffect)(()=>{t&&!N&&(G(),J()),t&&J()},[t]);let J=async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&D(t.aliases||{})}catch(e){console.log("Error fetching model aliases:",e)}};(0,a.useEffect)(()=>{if(N?.installed&&!B.current){B.current=!0;let e=N.settings?.["providers.openai"];e?.model&&U(e.model)}},[N]);let G=async()=>{k(!0);try{let e=await fetch(P),t=await e.json();v(t)}catch(e){v({installed:!1,error:e.message})}finally{k(!1)}},V=()=>{let e=q||window.location.origin.replace("://localhost","://127.0.0.1");return e.endsWith("/v1")?e:`${e}/v1`},Y=async()=>{_(!0),O(null);try{let e=M?.trim()||(d?.length>0?d[0].key:null)||(m?null:"sk_9router"),t=await fetch(P,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:V(),apiKey:e,model:R})}),s=await t.json();t.ok?(O({type:"success",text:"Settings applied successfully!"}),G()):O({type:"error",text:s.error||"Failed to apply settings"})}catch(e){O({type:"error",text:e.message})}finally{_(!1)}},Z=async()=>{E(!0),O(null);try{let e=await fetch(P,{method:"DELETE"}),t=await e.json();e.ok?(O({type:"success",text:"Settings reset successfully!"}),U(""),G()):O({type:"error",text:t.error||"Failed to reset settings"})}catch(e){O({type:"error",text:e.message})}finally{E(!1)}};return(0,l.jsxs)(r.Zp,{padding:"xs",className:"overflow-hidden",children:[(0,l.jsxs)("div",{className:"flex items-start justify-between gap-3 hover:cursor-pointer sm:items-center",onClick:s,children:[(0,l.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,l.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,l.jsx)(i.default,{src:e.image||"/providers/deepseek-tui.png",alt:e.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:e=>{e.target.style.display="none"}})}),(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[(0,l.jsx)("h3",{className:"font-medium text-sm",children:e.name}),"configured"===W&&(0,l.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,l.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,l.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,l.jsx)("p",{className:"text-xs text-text-muted truncate",children:e.description})]})]}),(0,l.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${t?"rotate-180":""}`,children:"expand_more"})]}),t&&(0,l.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[w&&(0,l.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,l.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,l.jsx)("span",{children:"Checking DeepSeek TUI..."})]}),!w&&N&&!N.installed&&(0,l.jsx)("div",{className:"flex flex-col gap-4",children:(0,l.jsxs)("div",{className:"flex flex-col gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,l.jsxs)("div",{className:"flex items-start gap-3",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,l.jsxs)("div",{className:"flex-1",children:[(0,l.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:"DeepSeek TUI not detected locally"}),(0,l.jsx)("p",{className:"text-sm text-text-muted mt-1",children:"Install via npm:"}),(0,l.jsx)("code",{className:"block mt-2 p-2 bg-black/20 rounded text-xs font-mono",children:"npm install -g deepseek-tui"}),(0,l.jsx)("p",{className:"text-sm text-text-muted mt-2",children:"Manual configuration is still available if 9router is deployed on a remote server."})]})]}),(0,l.jsx)("div",{className:"flex items-center gap-2 pl-9",children:(0,l.jsxs)(r.$n,{variant:"secondary",size:"sm",onClick:()=>L(!0),className:"!bg-yellow-500/20 !border-yellow-500/40 !text-yellow-700 dark:!text-yellow-300 hover:!bg-yellow-500/30",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:"content_copy"}),"Manual Config"]})})]})}),!w&&N?.installed&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"flex flex-col gap-2",children:[e.notes&&e.notes.length>0&&(0,l.jsx)("div",{className:"flex flex-col gap-2 mb-2",children:e.notes.map((e,t)=>(0,l.jsxs)("div",{className:`flex items-start gap-2 p-2 rounded text-xs ${"warning"===e.type?"bg-yellow-500/10 text-yellow-600 dark:text-yellow-400":"error"===e.type?"bg-red-500/10 text-red-600 dark:text-red-400":"bg-blue-500/10 text-blue-600 dark:text-blue-400"}`,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mt-0.5",children:"warning"===e.type?"warning":"error"===e.type?"error":"info"}),(0,l.jsx)("span",{children:e.text})]},t))}),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr] sm:items-center sm:gap-2",children:[(0,l.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Select Endpoint"}),(0,l.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,l.jsx)(x,{value:q||V(),onChange:H,requiresExternalUrl:e.requiresExternalUrl,tunnelEnabled:h,tunnelPublicUrl:f,tailscaleEnabled:y,tailscaleUrl:b})]}),N?.settings?.["providers.openai"]?.base_url&&(0,l.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,l.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Current"}),(0,l.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,l.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:N.settings["providers.openai"].base_url})]}),(0,l.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,l.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"API Key"}),(0,l.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,l.jsx)(u,{value:M,onChange:I,apiKeys:d,cloudEnabled:m})]}),(0,l.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,l.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Default Model"}),(0,l.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,l.jsxs)("div",{className:"relative w-full min-w-0",children:[(0,l.jsx)("input",{type:"text",value:R,onChange:e=>U(e.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"}),R&&(0,l.jsx)("button",{onClick:()=>U(""),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,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]}),(0,l.jsx)("button",{onClick:()=>K(!0),disabled:!o,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?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select"})]})]}),A&&(0,l.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,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===A.type?"check_circle":"error"}),(0,l.jsx)("span",{children:A.text})]}),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,l.jsxs)(r.$n,{variant:"primary",size:"sm",onClick:Y,disabled:!R,loading:C,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,l.jsxs)(r.$n,{variant:"outline",size:"sm",onClick:Z,disabled:!N?.has9Router,loading:S,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,l.jsxs)(r.$n,{variant:"ghost",size:"sm",onClick:()=>L(!0),children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]})]})]})]}),(0,l.jsx)(r.rq,{isOpen:T,onClose:()=>K(!1),onSelect:e=>{U(e.value),K(!1)},selectedModel:R,activeProviders:c,modelAliases:z,title:"Select Model for DeepSeek TUI"}),(0,l.jsx)(r.uR,{isOpen:F,onClose:()=>L(!1),title:"DeepSeek TUI - Manual Configuration",configs:(j=M&&M.trim()?M:m?"<API_KEY_FROM_DASHBOARD>":"sk_9router",[{filename:"~/.deepseek/config.toml",content:`[providers.openai]
|
|
40
40
|
base_url = "${V()}"
|
|
41
41
|
api_key = "${j}"
|
|
42
42
|
model = "${R||"provider/model-id"}"
|