omniroute 0.1.0 → 0.3.0
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/README.md +65 -21
- package/app/.next/BUILD_ID +1 -1
- package/app/.next/app-path-routes-manifest.json +34 -16
- package/app/.next/build-manifest.json +4 -4
- package/app/.next/prerender-manifest.json +15 -15
- package/app/.next/required-server-files.json +3 -3
- package/app/.next/routes-manifest.json +110 -0
- package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/combos/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/endpoint/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/onboarding/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/onboarding/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/onboarding/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/profile/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/new/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/settings/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/settings/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/settings/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/settings/pricing/page.js +2 -0
- package/app/.next/server/app/(dashboard)/dashboard/settings/pricing/page.js.nft.json +1 -0
- package/app/.next/server/app/(dashboard)/dashboard/settings/pricing/page_client-reference-manifest.js +1 -0
- package/app/.next/server/app/(dashboard)/dashboard/translator/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/usage/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/_global-error/page.js +3 -3
- package/app/.next/server/app/_global-error/page.js.nft.json +1 -1
- package/app/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/_global-error.html +2 -2
- package/app/.next/server/app/_global-error.rsc +10 -9
- package/app/.next/server/app/_global-error.segments/_full.segment.rsc +10 -9
- package/app/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_index.segment.rsc +2 -1
- package/app/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/app/.next/server/app/_not-found/page.js +2 -2
- package/app/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/app/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/_not-found.html +1 -1
- package/app/.next/server/app/_not-found.rsc +16 -12
- package/app/.next/server/app/_not-found.segments/_full.segment.rsc +16 -12
- package/app/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/_not-found.segments/_index.segment.rsc +4 -3
- package/app/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +8 -4
- package/app/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/app/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/api/auth/login/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cache/stats/route.js +1 -0
- package/app/.next/server/app/api/cache/stats/route.js.nft.json +1 -0
- package/app/.next/server/app/api/cache/stats/route_client-reference-manifest.js +1 -0
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/alias/route.js +3 -3
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/alias/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/backups/route.js +1 -1
- package/app/.next/server/app/api/cli-tools/backups/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/claude-settings/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/claude-settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/cline-settings/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/cline-settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/codex-profiles/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/codex-profiles/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/codex-settings/route.js +1 -1
- package/app/.next/server/app/api/cli-tools/codex-settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/droid-settings/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/droid-settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/guide-settings/[toolId]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/kilo-settings/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/kilo-settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/openclaw-settings/route.js +1 -1
- package/app/.next/server/app/api/cli-tools/openclaw-settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/runtime/[toolId]/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/runtime/[toolId]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cloud/auth/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cloud/credentials/update/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cloud/model/resolve/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cloud/models/alias/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/combos/[id]/route.js +1 -1
- package/app/.next/server/app/api/combos/[id]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/combos/[id]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/combos/metrics/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/combos/route.js +1 -1
- package/app/.next/server/app/api/combos/route.js.nft.json +1 -1
- package/app/.next/server/app/api/combos/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/combos/test/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/compliance/audit-log/route.js +156 -0
- package/app/.next/server/app/api/compliance/audit-log/route.js.nft.json +1 -0
- package/app/.next/server/app/api/compliance/audit-log/route_client-reference-manifest.js +1 -0
- package/app/.next/server/app/api/db-backups/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/evals/[suiteId]/route.js +1 -0
- package/app/.next/server/app/api/evals/[suiteId]/route.js.nft.json +1 -0
- package/app/.next/server/app/api/evals/[suiteId]/route_client-reference-manifest.js +1 -0
- package/app/.next/server/app/api/evals/route.js +1 -0
- package/app/.next/server/app/api/evals/route.js.nft.json +1 -0
- package/app/.next/server/app/api/evals/route_client-reference-manifest.js +1 -0
- package/app/.next/server/app/api/fallback/chains/route.js +1 -0
- package/app/.next/server/app/api/fallback/chains/route.js.nft.json +1 -0
- package/app/.next/server/app/api/fallback/chains/route_client-reference-manifest.js +1 -0
- package/app/.next/server/app/api/init/route.js +1 -1
- package/app/.next/server/app/api/init/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/keys/[id]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/keys/route.js +1 -1
- package/app/.next/server/app/api/keys/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/models/alias/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/models/availability/route.js +1 -0
- package/app/.next/server/app/api/models/availability/route.js.nft.json +1 -0
- package/app/.next/server/app/api/models/availability/route_client-reference-manifest.js +1 -0
- package/app/.next/server/app/api/models/catalog/route.js +156 -1
- package/app/.next/server/app/api/models/catalog/route.js.nft.json +1 -1
- package/app/.next/server/app/api/models/catalog/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/models/route.js +1 -1
- package/app/.next/server/app/api/models/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/[provider]/[action]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/cursor/auto-import/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/cursor/import/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/kiro/auto-import/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/kiro/import/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/kiro/social-authorize/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/kiro/social-exchange/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/policies/route.js +1 -0
- package/app/.next/server/app/api/policies/route.js.nft.json +1 -0
- package/app/.next/server/app/api/policies/route_client-reference-manifest.js +1 -0
- package/app/.next/server/app/api/pricing/defaults/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/pricing/models/route.js +156 -0
- package/app/.next/server/app/api/pricing/models/route.js.nft.json +1 -0
- package/app/.next/server/app/api/pricing/models/route_client-reference-manifest.js +1 -0
- package/app/.next/server/app/api/pricing/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/provider-models/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/provider-nodes/[id]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/provider-nodes/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/provider-nodes/validate/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/providers/[id]/models/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/providers/[id]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/providers/[id]/test/route.js +1 -1
- package/app/.next/server/app/api/providers/[id]/test/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/providers/client/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/providers/route.js +1 -1
- package/app/.next/server/app/api/providers/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/providers/test-batch/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/providers/validate/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/rate-limit/route.js +2 -2
- package/app/.next/server/app/api/rate-limit/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/rate-limits/route.js +1 -0
- package/app/.next/server/app/api/rate-limits/route.js.nft.json +1 -0
- package/app/.next/server/app/api/rate-limits/route_client-reference-manifest.js +1 -0
- package/app/.next/server/app/api/resilience/reset/route.js +1 -0
- package/app/.next/server/app/api/resilience/reset/route.js.nft.json +1 -0
- package/app/.next/server/app/api/resilience/reset/route_client-reference-manifest.js +1 -0
- package/app/.next/server/app/api/resilience/route.js +156 -0
- package/app/.next/server/app/api/resilience/route.js.nft.json +1 -0
- package/app/.next/server/app/api/resilience/route_client-reference-manifest.js +1 -0
- package/app/.next/server/app/api/restart/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/sessions/route.js +1 -0
- package/app/.next/server/app/api/sessions/route.js.nft.json +1 -0
- package/app/.next/server/app/api/sessions/route_client-reference-manifest.js +1 -0
- package/app/.next/server/app/api/settings/combo-defaults/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/settings/ip-filter/route.js +1 -0
- package/app/.next/server/app/api/settings/ip-filter/route.js.nft.json +1 -0
- package/app/.next/server/app/api/settings/ip-filter/route_client-reference-manifest.js +1 -0
- package/app/.next/server/app/api/settings/proxy/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/settings/proxy/test/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/settings/require-login/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/settings/system-prompt/route.js +156 -0
- package/app/.next/server/app/api/settings/system-prompt/route.js.nft.json +1 -0
- package/app/.next/server/app/api/settings/system-prompt/route_client-reference-manifest.js +1 -0
- package/app/.next/server/app/api/settings/thinking-budget/route.js +156 -0
- package/app/.next/server/app/api/settings/thinking-budget/route.js.nft.json +1 -0
- package/app/.next/server/app/api/settings/thinking-budget/route_client-reference-manifest.js +1 -0
- package/app/.next/server/app/api/shutdown/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/storage/health/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/sync/cloud/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/sync/initialize/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/tags/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/telemetry/summary/route.js +1 -0
- package/app/.next/server/app/api/telemetry/summary/route.js.nft.json +1 -0
- package/app/.next/server/app/api/telemetry/summary/route_client-reference-manifest.js +1 -0
- package/app/.next/server/app/api/token-health/route.js +156 -0
- package/app/.next/server/app/api/token-health/route.js.nft.json +1 -0
- package/app/.next/server/app/api/token-health/route_client-reference-manifest.js +1 -0
- package/app/.next/server/app/api/translator/detect/route.js +1 -1
- package/app/.next/server/app/api/translator/detect/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/translator/history/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/translator/load/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/translator/save/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/translator/send/route.js +1 -156
- package/app/.next/server/app/api/translator/send/route.js.nft.json +1 -1
- package/app/.next/server/app/api/translator/send/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/translator/translate/route.js +2 -2
- package/app/.next/server/app/api/translator/translate/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/[connectionId]/route.js +1 -1
- package/app/.next/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/usage/[connectionId]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/analytics/route.js +1 -1
- package/app/.next/server/app/api/usage/analytics/route.js.nft.json +1 -1
- package/app/.next/server/app/api/usage/analytics/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/budget/route.js +1 -0
- package/app/.next/server/app/api/usage/budget/route.js.nft.json +1 -0
- package/app/.next/server/app/api/usage/budget/route_client-reference-manifest.js +1 -0
- package/app/.next/server/app/api/usage/call-logs/[id]/route.js +1 -1
- package/app/.next/server/app/api/usage/call-logs/[id]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/usage/call-logs/[id]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/call-logs/route.js +1 -1
- package/app/.next/server/app/api/usage/call-logs/route.js.nft.json +1 -1
- package/app/.next/server/app/api/usage/call-logs/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/history/route.js +1 -1
- package/app/.next/server/app/api/usage/history/route.js.nft.json +1 -1
- package/app/.next/server/app/api/usage/history/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/logs/route.js +1 -1
- package/app/.next/server/app/api/usage/logs/route.js.nft.json +1 -1
- package/app/.next/server/app/api/usage/logs/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/proxy-logs/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/request-logs/route.js +1 -1
- package/app/.next/server/app/api/usage/request-logs/route.js.nft.json +1 -1
- package/app/.next/server/app/api/usage/request-logs/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/api/chat/route.js +1 -1
- package/app/.next/server/app/api/v1/api/chat/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/api/chat/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/audio/speech/route.js +1 -156
- package/app/.next/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/audio/speech/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/audio/transcriptions/route.js +1 -156
- package/app/.next/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/audio/transcriptions/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/chat/completions/route.js +1 -1
- package/app/.next/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/chat/completions/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/embeddings/route.js +1 -1
- package/app/.next/server/app/api/v1/embeddings/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/embeddings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/images/generations/route.js +1 -1
- package/app/.next/server/app/api/v1/images/generations/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/images/generations/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/messages/count_tokens/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/messages/route.js +1 -1
- package/app/.next/server/app/api/v1/messages/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/messages/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/models/route.js +1 -1
- package/app/.next/server/app/api/v1/models/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/models/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/moderations/route.js +2 -2
- package/app/.next/server/app/api/v1/moderations/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/moderations/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/providers/[provider]/chat/completions/route.js +1 -1
- package/app/.next/server/app/api/v1/providers/[provider]/chat/completions/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/providers/[provider]/chat/completions/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/providers/[provider]/embeddings/route.js +156 -1
- package/app/.next/server/app/api/v1/providers/[provider]/embeddings/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/providers/[provider]/embeddings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/providers/[provider]/images/generations/route.js +1 -1
- package/app/.next/server/app/api/v1/providers/[provider]/images/generations/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/providers/[provider]/images/generations/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/rerank/route.js +2 -2
- package/app/.next/server/app/api/v1/rerank/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/rerank/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/responses/route.js +1 -1
- package/app/.next/server/app/api/v1/responses/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/responses/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1beta/models/[...path]/route.js +1 -1
- package/app/.next/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1beta/models/[...path]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1beta/models/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/callback/page.js +2 -2
- package/app/.next/server/app/callback/page.js.nft.json +1 -1
- package/app/.next/server/app/callback/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/callback.html +1 -1
- package/app/.next/server/app/callback.rsc +17 -16
- package/app/.next/server/app/callback.segments/_full.segment.rsc +17 -16
- package/app/.next/server/app/callback.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/callback.segments/_index.segment.rsc +4 -3
- package/app/.next/server/app/callback.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/callback.segments/callback.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/cli-tools.html +1 -1
- package/app/.next/server/app/dashboard/cli-tools.rsc +16 -15
- package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/cli-tools.segments/_full.segment.rsc +16 -15
- package/app/.next/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/cli-tools.segments/_index.segment.rsc +4 -3
- package/app/.next/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/combos.html +1 -1
- package/app/.next/server/app/dashboard/combos.rsc +18 -17
- package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/combos.segments/_full.segment.rsc +18 -17
- package/app/.next/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/combos.segments/_index.segment.rsc +4 -3
- package/app/.next/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/endpoint.html +1 -1
- package/app/.next/server/app/dashboard/endpoint.rsc +16 -15
- package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/endpoint.segments/_full.segment.rsc +16 -15
- package/app/.next/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/endpoint.segments/_index.segment.rsc +4 -3
- package/app/.next/server/app/dashboard/endpoint.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/onboarding.html +1 -1
- package/app/.next/server/app/dashboard/onboarding.rsc +18 -17
- package/app/.next/server/app/dashboard/onboarding.segments/!KGRhc2hib2FyZCk/dashboard/onboarding/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/onboarding.segments/!KGRhc2hib2FyZCk/dashboard/onboarding.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/onboarding.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/onboarding.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/onboarding.segments/_full.segment.rsc +18 -17
- package/app/.next/server/app/dashboard/onboarding.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/onboarding.segments/_index.segment.rsc +4 -3
- package/app/.next/server/app/dashboard/onboarding.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/profile.html +1 -1
- package/app/.next/server/app/dashboard/profile.rsc +15 -14
- package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/profile.segments/_full.segment.rsc +15 -14
- package/app/.next/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/profile.segments/_index.segment.rsc +4 -3
- package/app/.next/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/providers/new.html +1 -1
- package/app/.next/server/app/dashboard/providers/new.rsc +18 -17
- package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/providers/new.segments/_full.segment.rsc +18 -17
- package/app/.next/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/providers/new.segments/_index.segment.rsc +4 -3
- package/app/.next/server/app/dashboard/providers/new.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/providers.html +1 -1
- package/app/.next/server/app/dashboard/providers.rsc +18 -17
- package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/providers.segments/_full.segment.rsc +18 -17
- package/app/.next/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/providers.segments/_index.segment.rsc +4 -3
- package/app/.next/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/settings/pricing.html +1 -1
- package/app/.next/server/app/dashboard/settings/pricing.meta +6 -5
- package/app/.next/server/app/dashboard/settings/pricing.rsc +18 -16
- package/app/.next/server/app/dashboard/settings/pricing.segments/{dashboard → !KGRhc2hib2FyZCk/dashboard}/settings/pricing/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/settings/pricing.segments/{dashboard → !KGRhc2hib2FyZCk/dashboard}/settings/pricing.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/settings/pricing.segments/{dashboard → !KGRhc2hib2FyZCk/dashboard}/settings.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/settings/pricing.segments/{dashboard.segment.rsc → !KGRhc2hib2FyZCk/dashboard.segment.rsc} +1 -1
- package/app/.next/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk.segment.rsc +5 -0
- package/app/.next/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +18 -16
- package/app/.next/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +4 -3
- package/app/.next/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/settings.html +1 -1
- package/app/.next/server/app/dashboard/settings.rsc +18 -17
- package/app/.next/server/app/dashboard/settings.segments/!KGRhc2hib2FyZCk/dashboard/settings/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/settings.segments/!KGRhc2hib2FyZCk/dashboard/settings.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/settings.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/settings.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/settings.segments/_full.segment.rsc +18 -17
- package/app/.next/server/app/dashboard/settings.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/settings.segments/_index.segment.rsc +4 -3
- package/app/.next/server/app/dashboard/settings.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/translator.html +2 -2
- package/app/.next/server/app/dashboard/translator.rsc +15 -14
- package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/translator.segments/_full.segment.rsc +15 -14
- package/app/.next/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/translator.segments/_index.segment.rsc +4 -3
- package/app/.next/server/app/dashboard/translator.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/usage.html +2 -1
- package/app/.next/server/app/dashboard/usage.rsc +18 -17
- package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/usage.segments/_full.segment.rsc +18 -17
- package/app/.next/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/usage.segments/_index.segment.rsc +4 -3
- package/app/.next/server/app/dashboard/usage.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/docs/page.js +2 -2
- package/app/.next/server/app/docs/page.js.nft.json +1 -1
- package/app/.next/server/app/docs/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/docs.html +1 -1
- package/app/.next/server/app/docs.rsc +21 -24
- package/app/.next/server/app/docs.segments/_full.segment.rsc +21 -24
- package/app/.next/server/app/docs.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/docs.segments/_index.segment.rsc +4 -3
- package/app/.next/server/app/docs.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/docs.segments/docs/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/docs.segments/docs.segment.rsc +1 -1
- package/app/.next/server/app/index.html +1 -1
- package/app/.next/server/app/index.rsc +14 -13
- package/app/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/index.segments/_full.segment.rsc +14 -13
- package/app/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/index.segments/_index.segment.rsc +4 -3
- package/app/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/landing/page.js +2 -2
- package/app/.next/server/app/landing/page.js.nft.json +1 -1
- package/app/.next/server/app/landing/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/landing.html +1 -1
- package/app/.next/server/app/landing.rsc +17 -16
- package/app/.next/server/app/landing.segments/_full.segment.rsc +17 -16
- package/app/.next/server/app/landing.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/landing.segments/_index.segment.rsc +4 -3
- package/app/.next/server/app/landing.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/landing.segments/landing.segment.rsc +1 -1
- package/app/.next/server/app/login/page.js +2 -2
- package/app/.next/server/app/login/page.js.nft.json +1 -1
- package/app/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/login.html +1 -1
- package/app/.next/server/app/login.rsc +17 -16
- package/app/.next/server/app/login.segments/_full.segment.rsc +17 -16
- package/app/.next/server/app/login.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/login.segments/_index.segment.rsc +4 -3
- package/app/.next/server/app/login.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/login.segments/login.segment.rsc +1 -1
- package/app/.next/server/app/page.js +2 -2
- package/app/.next/server/app/page.js.nft.json +1 -1
- package/app/.next/server/app/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/privacy/page.js +2 -2
- package/app/.next/server/app/privacy/page.js.nft.json +1 -1
- package/app/.next/server/app/privacy/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/privacy.html +1 -1
- package/app/.next/server/app/privacy.rsc +22 -23
- package/app/.next/server/app/privacy.segments/_full.segment.rsc +22 -23
- package/app/.next/server/app/privacy.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/privacy.segments/_index.segment.rsc +4 -3
- package/app/.next/server/app/privacy.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/privacy.segments/privacy/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/privacy.segments/privacy.segment.rsc +1 -1
- package/app/.next/server/app/terms/page.js +2 -2
- package/app/.next/server/app/terms/page.js.nft.json +1 -1
- package/app/.next/server/app/terms/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/terms.html +1 -1
- package/app/.next/server/app/terms.rsc +7 -7
- package/app/.next/server/app/terms.segments/_full.segment.rsc +7 -7
- package/app/.next/server/app/terms.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/terms.segments/_index.segment.rsc +4 -3
- package/app/.next/server/app/terms.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/terms.segments/terms/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/terms.segments/terms.segment.rsc +1 -1
- package/app/.next/server/app-paths-manifest.json +34 -16
- package/app/.next/server/chunks/1228.js +1 -0
- package/app/.next/server/chunks/1362.js +1 -1
- package/app/.next/server/chunks/152.js +1 -0
- package/app/.next/server/chunks/{3919.js → 1969.js} +1 -1
- package/app/.next/server/chunks/2399.js +1 -0
- package/app/.next/server/chunks/3542.js +2 -2
- package/app/.next/server/chunks/3676.js +1 -0
- package/app/.next/server/chunks/4004.js +1 -0
- package/app/.next/server/chunks/{6937.js → 4412.js} +2 -2
- package/app/.next/server/chunks/4755.js +15 -1
- package/app/.next/server/chunks/{7132.js → 4832.js} +2 -2
- package/app/.next/server/chunks/5040.js +1 -0
- package/app/.next/server/chunks/5267.js +1 -0
- package/app/.next/server/chunks/5640.js +1 -1
- package/app/.next/server/chunks/7271.js +1 -0
- package/app/.next/server/chunks/7615.js +1 -1
- package/app/.next/server/chunks/7968.js +1 -1
- package/app/.next/server/chunks/8020.js +13 -0
- package/app/.next/server/chunks/8108.js +1 -1
- package/app/.next/server/chunks/8259.js +1 -1
- package/app/.next/server/chunks/8400.js +1 -1
- package/app/.next/server/chunks/867.js +1 -0
- package/app/.next/server/chunks/9328.js +156 -0
- package/app/.next/server/middleware-build-manifest.js +1 -1
- package/app/.next/server/middleware.js +2 -2
- package/app/.next/server/pages/404.html +1 -1
- package/app/.next/server/pages/500.html +2 -2
- package/app/.next/server/server-reference-manifest.js +1 -1
- package/app/.next/server/server-reference-manifest.json +1 -1
- package/app/.next/static/HcUrNktdfL89Ss5F7FHxP/_buildManifest.js +1 -0
- package/app/.next/static/chunks/1525-213a0aff01eb1c70.js +21 -0
- package/app/.next/static/chunks/{7896-81ec5010e89beaf8.js → 7896-5591822b8348e380.js} +1 -1
- package/app/.next/static/chunks/8013-04b90e92e614b5d9.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/cli-tools/{page-cef5a81883757c60.js → page-148b0ad18f6bec86.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/combos/page-28e46119138cf102.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/endpoint/page-ab8b870377087bc7.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/page-bc5764734a448526.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/profile/page-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/[id]/{page-b731afd377df1fa6.js → page-fb1fa9ae8a3af8c8.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/new/{page-3c6d0b7fade7dd73.js → page-4bd8ea64f2e8008b.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/page-fc3451fe77f856f1.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/settings/page-95b884cdbf859e56.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/settings/pricing/page-a22d14af518d5b43.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/translator/{page-b018be5904c4909c.js → page-c891465a1a2938d2.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/usage/page-7a0943932e7e5e51.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/layout-e84875e22efbf437.js +1 -0
- package/app/.next/static/chunks/app/_global-error/page-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/_not-found/page-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/auth/login/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/auth/logout/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/cache/stats/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/backups/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/claude-settings/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/cline-settings/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/codex-profiles/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/codex-settings/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/droid-settings/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/guide-settings/[toolId]/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/kilo-settings/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/openclaw-settings/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/runtime/[toolId]/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/cloud/auth/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/cloud/credentials/update/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/cloud/model/resolve/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/cloud/models/alias/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/combos/[id]/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/combos/metrics/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/combos/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/combos/test/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/compliance/audit-log/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/db-backups/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/evals/[suiteId]/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/evals/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/fallback/chains/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/init/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/keys/[id]/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/keys/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/models/alias/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/models/availability/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/models/catalog/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/models/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/[provider]/[action]/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/cursor/auto-import/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/cursor/import/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/kiro/auto-import/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/kiro/import/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/kiro/social-authorize/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/kiro/social-exchange/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/policies/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/pricing/defaults/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/pricing/models/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/pricing/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/provider-models/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/provider-nodes/[id]/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/provider-nodes/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/provider-nodes/validate/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/providers/[id]/models/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/providers/[id]/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/providers/[id]/test/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/providers/client/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/providers/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/providers/test-batch/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/providers/validate/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/rate-limit/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/rate-limits/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/resilience/reset/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/resilience/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/restart/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/sessions/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/settings/combo-defaults/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/settings/ip-filter/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/settings/proxy/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/settings/proxy/test/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/settings/require-login/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/settings/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/settings/system-prompt/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/settings/thinking-budget/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/shutdown/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/storage/health/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/sync/cloud/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/sync/initialize/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/tags/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/telemetry/summary/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/token-health/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/translator/detect/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/translator/history/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/translator/load/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/translator/save/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/translator/send/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/translator/translate/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/usage/[connectionId]/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/usage/analytics/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/usage/budget/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/usage/call-logs/[id]/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/usage/call-logs/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/usage/history/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/usage/logs/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/usage/proxy-logs/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/usage/request-logs/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/v1/api/chat/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/v1/audio/speech/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/v1/audio/transcriptions/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/v1/chat/completions/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/v1/embeddings/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/v1/images/generations/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/v1/messages/count_tokens/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/v1/messages/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/v1/models/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/v1/moderations/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/v1/providers/[provider]/chat/completions/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/v1/providers/[provider]/embeddings/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/v1/providers/[provider]/images/generations/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/v1/rerank/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/v1/responses/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/v1/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/v1beta/models/[...path]/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/api/v1beta/models/route-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/app/global-error-bbdc13af28c5aba1.js +1 -0
- package/app/.next/static/chunks/app/login/{page-6ae7a54603d39926.js → page-e99ed6a85e91ae7c.js} +1 -1
- package/app/.next/static/chunks/app/not-found-2ba4520c9df30430.js +1 -0
- package/app/.next/static/chunks/app/page-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/main-app-c9da11a8061df107.js +1 -0
- package/app/.next/static/chunks/next/dist/client/components/builtin/app-error-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/next/dist/client/components/builtin/forbidden-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/next/dist/client/components/builtin/unauthorized-329f30be723f33ce.js +1 -0
- package/app/.next/static/chunks/webpack-a2b6b20e2db553f5.js +1 -0
- package/app/.next/static/css/2862d4067eab20b2.css +1 -0
- package/app/package.json +9 -5
- package/app/server.js +1 -1
- package/app/src/shared/utils/apiKey.js +5 -1
- package/bin/reset-password.mjs +116 -0
- package/package.json +9 -5
- package/app/.next/server/app/dashboard/settings/pricing/page.js +0 -2
- package/app/.next/server/app/dashboard/settings/pricing/page.js.nft.json +0 -1
- package/app/.next/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +0 -1
- package/app/.next/server/chunks/1137.js +0 -1
- package/app/.next/server/chunks/2116.js +0 -1
- package/app/.next/server/chunks/2250.js +0 -1
- package/app/.next/server/chunks/351.js +0 -1
- package/app/.next/server/chunks/7471.js +0 -13
- package/app/.next/server/chunks/8152.js +0 -1
- package/app/.next/server/chunks/8668.js +0 -156
- package/app/.next/server/chunks/9188.js +0 -1
- package/app/.next/static/chunks/1525-92e9b6d0efa5de15.js +0 -7
- package/app/.next/static/chunks/7765-b6a02dccdc69da55.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/combos/page-82b1b6f14eca9957.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/endpoint/page-db18d6249d1949df.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/page-03ddcbc4fc0b6c18.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/profile/page-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/page-e5b8862ba1197935.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/settings/page-8e8021b6e227b5a9.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/usage/page-bd8e6146106d32af.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/layout-c26bba15e099e382.js +0 -1
- package/app/.next/static/chunks/app/_global-error/page-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/_not-found/page-a99a85b5268f1c54.js +0 -1
- package/app/.next/static/chunks/app/api/auth/login/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/auth/logout/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/backups/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/claude-settings/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/cline-settings/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/codex-profiles/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/codex-settings/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/droid-settings/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/guide-settings/[toolId]/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/kilo-settings/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/openclaw-settings/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/runtime/[toolId]/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/cloud/auth/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/cloud/credentials/update/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/cloud/model/resolve/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/cloud/models/alias/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/combos/[id]/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/combos/metrics/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/combos/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/combos/test/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/db-backups/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/init/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/keys/[id]/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/keys/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/models/alias/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/models/catalog/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/models/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/oauth/[provider]/[action]/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/oauth/cursor/auto-import/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/oauth/cursor/import/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/oauth/kiro/auto-import/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/oauth/kiro/import/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/oauth/kiro/social-authorize/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/oauth/kiro/social-exchange/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/pricing/defaults/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/pricing/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/provider-models/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/provider-nodes/[id]/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/provider-nodes/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/provider-nodes/validate/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/providers/[id]/models/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/providers/[id]/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/providers/[id]/test/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/providers/client/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/providers/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/providers/test-batch/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/providers/validate/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/rate-limit/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/restart/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/settings/combo-defaults/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/settings/proxy/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/settings/proxy/test/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/settings/require-login/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/settings/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/shutdown/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/storage/health/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/sync/cloud/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/sync/initialize/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/tags/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/translator/detect/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/translator/history/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/translator/load/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/translator/save/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/translator/send/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/translator/translate/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/usage/[connectionId]/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/usage/analytics/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/usage/call-logs/[id]/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/usage/call-logs/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/usage/history/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/usage/logs/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/usage/proxy-logs/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/usage/request-logs/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/v1/api/chat/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/v1/audio/speech/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/v1/audio/transcriptions/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/v1/chat/completions/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/v1/embeddings/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/v1/images/generations/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/v1/messages/count_tokens/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/v1/messages/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/v1/models/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/v1/moderations/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/v1/providers/[provider]/chat/completions/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/v1/providers/[provider]/embeddings/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/v1/providers/[provider]/images/generations/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/v1/rerank/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/v1/responses/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/v1/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/v1beta/models/[...path]/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/api/v1beta/models/route-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/app/dashboard/settings/pricing/page-878ee68a0303128f.js +0 -1
- package/app/.next/static/chunks/app/page-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/main-app-fbc16f70c595b197.js +0 -1
- package/app/.next/static/chunks/next/dist/client/components/builtin/app-error-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/next/dist/client/components/builtin/forbidden-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/next/dist/client/components/builtin/global-error-d91548a7b6ba5970.js +0 -1
- package/app/.next/static/chunks/next/dist/client/components/builtin/not-found-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/next/dist/client/components/builtin/unauthorized-529101fdcd1e3b30.js +0 -1
- package/app/.next/static/chunks/webpack-f742cb5c6c3130ec.js +0 -1
- package/app/.next/static/css/777d65a484db49a1.css +0 -1
- package/app/.next/static/l-F9C6gggjrUWKnAln0Wn/_buildManifest.js +0 -1
- /package/app/.next/static/{l-F9C6gggjrUWKnAln0Wn → HcUrNktdfL89Ss5F7FHxP}/_ssgManifest.js +0 -0
|
@@ -12,4 +12,4 @@ model_provider = "omniroute"
|
|
|
12
12
|
name = "OmniRoute"
|
|
13
13
|
base_url = "${ea()}"
|
|
14
14
|
wire_api = "responses"
|
|
15
|
-
`},{filename:"~/.codex/auth.json",content:JSON.stringify({OPENAI_API_KEY:p},null,2)}])})]})}let m=s(41463).env.NEXT_PUBLIC_CLOUD_URL;function p({tool:e,isExpanded:t,onToggle:s,baseUrl:n,hasActiveProviders:i,apiKeys:c,activeProviders:d,cloudEnabled:x}){let p,u,h,g,[y,f]=(0,l.useState)(null),[b,j]=(0,l.useState)(!1),[N,v]=(0,l.useState)(!1),[k,w]=(0,l.useState)(!1),[C,S]=(0,l.useState)(null),[_,O]=(0,l.useState)(""),[A,E]=(0,l.useState)(""),[I,P]=(0,l.useState)(!1),[$,L]=(0,l.useState)({}),[R,T]=(0,l.useState)(!1),[M,U]=(0,l.useState)(""),K=(0,l.useRef)(!1),[F,z]=(0,l.useState)([]),[D,B]=(0,l.useState)(!1),[H,J]=(0,l.useState)(null),q=!!(y?.installed&&y?.runnable),W=(()=>{if(!q)return null;let e=y.settings?.customModels?.find(e=>"custom:OmniRoute-0"===e.id);if(!e)return"not_configured";let t=e.baseUrl?.includes("localhost")||e.baseUrl?.includes("127.0.0.1"),s=x&&m&&e.baseUrl?.startsWith(m);return t||s?"configured":"other"})();(0,l.useEffect)(()=>{c?.length>0&&!_&&O(c[0].key)},[c,_]),(0,l.useEffect)(()=>{t&&!y&&(Z(),G(),Q())},[t,y]);let G=async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&L(t.aliases||{})}catch(e){console.log("Error fetching model aliases:",e)}};(0,l.useEffect)(()=>{if(y?.installed&&!K.current){K.current=!0;let e=y.settings?.customModels?.find(e=>"custom:OmniRoute-0"===e.id);e&&(e.model&&E(e.model),e.apiKey&&c?.some(t=>t.key===e.apiKey)&&O(e.apiKey))}},[y,c]);let Z=async()=>{j(!0);try{let e=await fetch("/api/cli-tools/droid-settings"),t=await e.json();f(t)}catch(e){f({installed:!1,error:e.message})}finally{j(!1)}},V=()=>{let e=M||n;return e.endsWith("/v1")?e:`${e}/v1`},X=async()=>{v(!0),S(null);try{let e=_?.trim()||(c?.length>0?c[0].key:null)||(x?null:"sk_omniroute"),t=await fetch("/api/cli-tools/droid-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:V(),apiKey:e,model:A})}),s=await t.json();t.ok?(S({type:"success",text:"Settings applied successfully!"}),Z()):S({type:"error",text:s.error||"Failed to apply settings"})}catch(e){S({type:"error",text:e.message})}finally{v(!1)}},Y=async()=>{w(!0),S(null);try{let e=await fetch("/api/cli-tools/droid-settings",{method:"DELETE"}),t=await e.json();e.ok?(S({type:"success",text:"Settings reset successfully!"}),E(""),O(""),Z()):S({type:"error",text:t.error||"Failed to reset settings"})}catch(e){S({type:"error",text:e.message})}finally{w(!1)}},Q=async()=>{try{let e=await fetch("/api/cli-tools/backups?tool=droid"),t=await e.json();e.ok&&z(t.backups||[])}catch(e){console.log("Error fetching backups:",e)}},ee=async e=>{J(e),S(null);try{let t=await fetch("/api/cli-tools/backups",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({tool:"droid",backupId:e})}),s=await t.json();t.ok?(S({type:"success",text:"Backup restored!"}),Z(),Q()):S({type:"error",text:s.error||"Failed to restore"})}catch(e){S({type:"error",text:e.message})}finally{J(null)}};return(0,a.jsxs)(r.Zp,{padding:"sm",className:"overflow-hidden",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:s,children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,a.jsx)(o.default,{src:"/providers/droid.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,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("h3",{className:"font-medium text-sm",children:e.name}),"configured"===W&&(0,a.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,a.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,a.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,a.jsx)("p",{className:"text-xs text-text-muted truncate",children:e.description})]})]}),(0,a.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${t?"rotate-180":""}`,children:"expand_more"})]}),t&&(0,a.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[b&&(0,a.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,a.jsx)("span",{children:"Checking Factory Droid CLI..."})]}),!b&&y&&!q&&(0,a.jsxs)("div",{className:"flex items-center gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:y.installed?"Factory Droid CLI not runnable":"Factory Droid CLI not installed"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:y.installed?`Factory Droid CLI was found but failed runtime healthcheck${y.reason?` (${y.reason})`:""}.`:"Please install Factory Droid CLI to use this feature."})]})]}),!b&&q&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[y?.settings?.customModels?.find(e=>"custom:OmniRoute-0"===e.id)?.baseUrl&&(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Current"}),(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,a.jsx)("span",{className:"flex-1 px-2 py-1.5 text-xs text-text-muted truncate",children:y.settings.customModels.find(e=>"custom:OmniRoute-0"===e.id).baseUrl})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Base URL"}),(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,a.jsx)("input",{type:"text",value:(p=M||n).endsWith("/v1")?p:`${p}/v1`,onChange:e=>U(e.target.value),placeholder:"https://.../v1",className:"flex-1 px-2 py-1.5 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"}),M&&M!==n&&(0,a.jsx)("button",{onClick:()=>U(""),className:"p-1 text-text-muted hover:text-primary rounded transition-colors",title:"Reset to default",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"restart_alt"})})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"API Key"}),(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),c.length>0?(0,a.jsx)("select",{value:_,onChange:e=>O(e.target.value),className:"flex-1 px-2 py-1.5 bg-surface rounded text-xs border border-border focus:outline-none focus:ring-1 focus:ring-primary/50",children:c.map(e=>(0,a.jsx)("option",{value:e.key,children:e.key},e.id))}):(0,a.jsx)("span",{className:"flex-1 text-xs text-text-muted px-2 py-1.5",children:x?"No API keys - Create one in Keys page":"sk_omniroute (default)"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Model"}),(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,a.jsx)("input",{type:"text",value:A,onChange:e=>E(e.target.value),placeholder:"provider/model-id",className:"flex-1 px-2 py-1.5 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"}),(0,a.jsx)("button",{onClick:()=>P(!0),disabled:!i,className:`px-2 py-1.5 rounded border text-xs transition-colors shrink-0 whitespace-nowrap ${i?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select Model"}),A&&(0,a.jsx)("button",{onClick:()=>E(""),className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})]}),C&&(0,a.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===C.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===C.type?"check_circle":"error"}),(0,a.jsx)("span",{children:C.text})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsxs)(r.$n,{variant:"primary",size:"sm",onClick:X,disabled:!A,loading:N,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,a.jsxs)(r.$n,{variant:"outline",size:"sm",onClick:Y,disabled:!y?.hasOmniRoute,loading:k,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,a.jsxs)(r.$n,{variant:"ghost",size:"sm",onClick:()=>T(!0),children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]}),(0,a.jsx)("div",{className:"flex-1"}),(0,a.jsxs)(r.$n,{variant:"ghost",size:"sm",onClick:()=>{B(!D),D||Q()},children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"history"}),"Backups",F.length>0&&` (${F.length})`]})]}),D&&(0,a.jsxs)("div",{className:"mt-2 p-3 bg-surface border border-border rounded-lg",children:[(0,a.jsxs)("h4",{className:"text-xs font-semibold text-text-main mb-2 flex items-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"history"}),"Config Backups"]}),0===F.length?(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"No backups yet. Backups are created automatically before each Apply or Reset."}):(0,a.jsx)("div",{className:"space-y-1.5",children:F.map(e=>(0,a.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1.5 bg-black/5 dark:bg-white/5 rounded text-xs",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"description"}),(0,a.jsx)("span",{className:"flex-1 truncate font-mono",title:e.id,children:e.id}),(0,a.jsx)("span",{className:"text-text-muted whitespace-nowrap",children:new Date(e.createdAt).toLocaleString()}),(0,a.jsx)("button",{onClick:()=>ee(e.id),disabled:H===e.id,className:"px-2 py-0.5 bg-primary/10 text-primary rounded text-[10px] font-medium hover:bg-primary/20 transition-colors disabled:opacity-50",children:H===e.id?"...":"Restore"})]},e.id))})]})]})]}),(0,a.jsx)(r.rq,{isOpen:I,onClose:()=>P(!1),onSelect:e=>{E(e.value),P(!1)},selectedModel:A,activeProviders:d,modelAliases:$,title:"Select Model for Factory Droid"}),(0,a.jsx)(r.uR,{isOpen:R,onClose:()=>T(!1),title:"Factory Droid - Manual Configuration",configs:(u=_&&_.trim()?_:x?"<API_KEY_FROM_DASHBOARD>":"sk_omniroute",h={customModels:[{model:A||"provider/model-id",id:"custom:OmniRoute-0",index:0,baseUrl:V(),apiKey:u,displayName:A||"provider/model-id",maxOutputTokens:131072,noImageSupport:!1,provider:"openai"}]},g="u">typeof navigator&&navigator.platform,[{filename:g?.toLowerCase().includes("win")?"%USERPROFILE%\\.factory\\settings.json":"~/.factory/settings.json",content:JSON.stringify(h,null,2)}])})]})}let u=s(41463).env.NEXT_PUBLIC_CLOUD_URL;function h({tool:e,isExpanded:t,onToggle:s,baseUrl:n,hasActiveProviders:i,apiKeys:c,activeProviders:d,cloudEnabled:x}){let m,p,[h,g]=(0,l.useState)(null),[y,f]=(0,l.useState)(!1),[b,j]=(0,l.useState)(!1),[N,v]=(0,l.useState)(!1),[k,w]=(0,l.useState)(null),[C,S]=(0,l.useState)(""),[_,O]=(0,l.useState)(""),[A,E]=(0,l.useState)(!1),[I,P]=(0,l.useState)({}),[$,L]=(0,l.useState)(!1),[R,T]=(0,l.useState)(""),M=(0,l.useRef)(!1),[U,K]=(0,l.useState)([]),[F,z]=(0,l.useState)(!1),[D,B]=(0,l.useState)(null),H=!!(h?.installed&&h?.runnable),J=(()=>{if(!H)return null;let e=h.settings?.models?.providers?.omniroute;if(!e)return"not_configured";let t=e.baseUrl?.includes("localhost")||e.baseUrl?.includes("127.0.0.1"),s=x&&u&&e.baseUrl?.startsWith(u);return t||s?"configured":"other"})();(0,l.useEffect)(()=>{c?.length>0&&!C&&S(c[0].key)},[c,C]),(0,l.useEffect)(()=>{t&&!h&&(W(),q(),X())},[t,h]);let q=async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&P(t.aliases||{})}catch(e){console.log("Error fetching model aliases:",e)}};(0,l.useEffect)(()=>{if(h?.installed&&!M.current){M.current=!0;let e=h.settings?.models?.providers?.omniroute;if(e){let t=h.settings?.agents?.defaults?.model?.primary;t&&O(t.replace("omniroute/","")),e.apiKey&&c?.some(t=>t.key===e.apiKey)&&S(e.apiKey)}}},[h,c]);let W=async()=>{f(!0);try{let e=await fetch("/api/cli-tools/openclaw-settings"),t=await e.json();g(t)}catch(e){g({installed:!1,error:e.message})}finally{f(!1)}},G=()=>{let e=R||n;return e.endsWith("/v1")?e:`${e}/v1`},Z=async()=>{j(!0),w(null);try{let e=C?.trim()||(c?.length>0?c[0].key:null)||(x?null:"sk_omniroute"),t=await fetch("/api/cli-tools/openclaw-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:G(),apiKey:e,model:_})}),s=await t.json();t.ok?(w({type:"success",text:"Settings applied successfully!"}),W()):w({type:"error",text:s.error||"Failed to apply settings"})}catch(e){w({type:"error",text:e.message})}finally{j(!1)}},V=async()=>{v(!0),w(null);try{let e=await fetch("/api/cli-tools/openclaw-settings",{method:"DELETE"}),t=await e.json();e.ok?(w({type:"success",text:"Settings reset successfully!"}),O(""),S(""),W()):w({type:"error",text:t.error||"Failed to reset settings"})}catch(e){w({type:"error",text:e.message})}finally{v(!1)}},X=async()=>{try{let e=await fetch("/api/cli-tools/backups?tool=openclaw"),t=await e.json();e.ok&&K(t.backups||[])}catch(e){console.log("Error fetching backups:",e)}},Y=async e=>{B(e),w(null);try{let t=await fetch("/api/cli-tools/backups",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({tool:"openclaw",backupId:e})}),s=await t.json();t.ok?(w({type:"success",text:"Backup restored!"}),W(),X()):w({type:"error",text:s.error||"Failed to restore"})}catch(e){w({type:"error",text:e.message})}finally{B(null)}};return(0,a.jsxs)(r.Zp,{padding:"sm",className:"overflow-hidden",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:s,children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,a.jsx)(o.default,{src:"/providers/openclaw.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,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("h3",{className:"font-medium text-sm",children:e.name}),"configured"===J&&(0,a.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,a.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,a.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,a.jsx)("p",{className:"text-xs text-text-muted truncate",children:e.description})]})]}),(0,a.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${t?"rotate-180":""}`,children:"expand_more"})]}),t&&(0,a.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[y&&(0,a.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,a.jsx)("span",{children:"Checking Open Claw CLI..."})]}),!y&&h&&!H&&(0,a.jsxs)("div",{className:"flex items-center gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:h.installed?"Open Claw CLI not runnable":"Open Claw CLI not installed"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:h.installed?`Open Claw CLI was found but failed runtime healthcheck${h.reason?` (${h.reason})`:""}.`:"Please install Open Claw CLI to use this feature."})]})]}),!y&&H&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[h?.settings?.models?.providers?.omniroute?.baseUrl&&(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Current"}),(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,a.jsx)("span",{className:"flex-1 px-2 py-1.5 text-xs text-text-muted truncate",children:h.settings.models.providers.omniroute.baseUrl})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Base URL"}),(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,a.jsx)("input",{type:"text",value:(m=R||n).endsWith("/v1")?m:`${m}/v1`,onChange:e=>T(e.target.value),placeholder:"https://.../v1",className:"flex-1 px-2 py-1.5 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"}),R&&R!==n&&(0,a.jsx)("button",{onClick:()=>T(""),className:"p-1 text-text-muted hover:text-primary rounded transition-colors",title:"Reset to default",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"restart_alt"})})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"API Key"}),(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),c.length>0?(0,a.jsx)("select",{value:C,onChange:e=>S(e.target.value),className:"flex-1 px-2 py-1.5 bg-surface rounded text-xs border border-border focus:outline-none focus:ring-1 focus:ring-primary/50",children:c.map(e=>(0,a.jsx)("option",{value:e.key,children:e.key},e.id))}):(0,a.jsx)("span",{className:"flex-1 text-xs text-text-muted px-2 py-1.5",children:x?"No API keys - Create one in Keys page":"sk_omniroute (default)"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Model"}),(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,a.jsx)("input",{type:"text",value:_,onChange:e=>O(e.target.value),placeholder:"provider/model-id",className:"flex-1 px-2 py-1.5 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"}),(0,a.jsx)("button",{onClick:()=>E(!0),disabled:!i,className:`px-2 py-1.5 rounded border text-xs transition-colors shrink-0 whitespace-nowrap ${i?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select Model"}),_&&(0,a.jsx)("button",{onClick:()=>O(""),className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})]}),k&&(0,a.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===k.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===k.type?"check_circle":"error"}),(0,a.jsx)("span",{children:k.text})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsxs)(r.$n,{variant:"primary",size:"sm",onClick:Z,disabled:!_,loading:b,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,a.jsxs)(r.$n,{variant:"outline",size:"sm",onClick:V,disabled:!h?.hasOmniRoute,loading:N,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,a.jsxs)(r.$n,{variant:"ghost",size:"sm",onClick:()=>L(!0),children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]}),(0,a.jsx)("div",{className:"flex-1"}),(0,a.jsxs)(r.$n,{variant:"ghost",size:"sm",onClick:()=>{z(!F),F||X()},children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"history"}),"Backups",U.length>0&&` (${U.length})`]})]}),F&&(0,a.jsxs)("div",{className:"mt-2 p-3 bg-surface border border-border rounded-lg",children:[(0,a.jsxs)("h4",{className:"text-xs font-semibold text-text-main mb-2 flex items-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"history"}),"Config Backups"]}),0===U.length?(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"No backups yet. Backups are created automatically before each Apply or Reset."}):(0,a.jsx)("div",{className:"space-y-1.5",children:U.map(e=>(0,a.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1.5 bg-black/5 dark:bg-white/5 rounded text-xs",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"description"}),(0,a.jsx)("span",{className:"flex-1 truncate font-mono",title:e.id,children:e.id}),(0,a.jsx)("span",{className:"text-text-muted whitespace-nowrap",children:new Date(e.createdAt).toLocaleString()}),(0,a.jsx)("button",{onClick:()=>Y(e.id),disabled:D===e.id,className:"px-2 py-0.5 bg-primary/10 text-primary rounded text-[10px] font-medium hover:bg-primary/20 transition-colors disabled:opacity-50",children:D===e.id?"...":"Restore"})]},e.id))})]})]})]}),(0,a.jsx)(r.rq,{isOpen:A,onClose:()=>E(!1),onSelect:e=>{O(e.value),E(!1)},selectedModel:_,activeProviders:d,modelAliases:I,title:"Select Model for Open Claw"}),(0,a.jsx)(r.uR,{isOpen:$,onClose:()=>L(!1),title:"Open Claw - Manual Configuration",configs:(p=C&&C.trim()?C:x?"<API_KEY_FROM_DASHBOARD>":"sk_omniroute",[{filename:"~/.openclaw/openclaw.json",content:JSON.stringify({agents:{defaults:{model:{primary:`omniroute/${_||"provider/model-id"}`}}},models:{providers:{omniroute:{baseUrl:G(),apiKey:p,api:"openai-completions",models:[{id:_||"provider/model-id",name:(_||"provider/model-id").split("/").pop()}]}}}},null,2)}])})]})}let g=s(41463).env.NEXT_PUBLIC_CLOUD_URL;function y({tool:e,isExpanded:t,onToggle:s,baseUrl:n,hasActiveProviders:i,apiKeys:c,activeProviders:d,cloudEnabled:x}){let[m,p]=(0,l.useState)(null),[u,h]=(0,l.useState)(!1),[y,f]=(0,l.useState)(!1),[b,j]=(0,l.useState)(!1),[N,v]=(0,l.useState)(null),[k,w]=(0,l.useState)(""),[C,S]=(0,l.useState)(""),[_,O]=(0,l.useState)(!1),[A,E]=(0,l.useState)({}),[I,P]=(0,l.useState)(!1),[$,L]=(0,l.useState)(""),R=(0,l.useRef)(!1),[T,M]=(0,l.useState)([]),[U,K]=(0,l.useState)(!1),[F,z]=(0,l.useState)(null),D=!!(m?.installed&&m?.runnable),B=(()=>{if(!D)return null;if(!m.hasOmniRoute)return"not_configured";let e=m.settings?.openAiBaseUrl||"",t=e.includes("localhost")||e.includes("127.0.0.1"),s=x&&g&&e.startsWith(g);return t||s?"configured":"other"})();(0,l.useEffect)(()=>{c?.length>0&&!k&&w(c[0].key)},[c,k]),(0,l.useEffect)(()=>{t&&!m&&(W(),H(),J())},[t,m]),(0,l.useEffect)(()=>{if(m?.settings&&!R.current){let e=m.settings.openAiModelId;e&&(S(e),R.current=!0)}},[m]);let H=async()=>{try{let e=await fetch("/api/models/alias");if(e.ok){let t=await e.json();E(t.aliases||{})}}catch{}},J=async()=>{try{let e=await fetch("/api/cli-tools/backups?toolId=cline");if(e.ok){let t=await e.json();M(t.backups||[])}}catch{}},q=async e=>{z(e);try{let t=await fetch("/api/cli-tools/backups",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({toolId:"cline",backupId:e})});if(t.ok)v({type:"success",text:"Backup restored! Reloading status..."}),await W(),await J();else{let e=await t.json();v({type:"error",text:e.error||"Failed to restore backup"})}}catch(e){v({type:"error",text:e.message})}finally{z(null)}},W=async()=>{h(!0);try{let e=await fetch("/api/cli-tools/cline-settings"),t=await e.json();p(t)}catch(e){p({error:e.message})}finally{h(!1)}},G=async()=>{f(!0),v(null);try{let e=$||n||"http://localhost:20128",t=e.endsWith("/v1")?e:`${e}/v1`,s=await fetch("/api/cli-tools/cline-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:t,apiKey:k||"sk_omniroute",model:C})}),a=await s.json();s.ok?(v({type:"success",text:a.message||"Applied!"}),await W(),await J()):v({type:"error",text:a.error||"Failed"})}catch(e){v({type:"error",text:e.message})}finally{f(!1)}},Z=async()=>{j(!0),v(null);try{let e=await fetch("/api/cli-tools/cline-settings",{method:"DELETE"}),t=await e.json();e.ok?(v({type:"success",text:t.message||"Reset!"}),S(""),R.current=!1,await W(),await J()):v({type:"error",text:t.error||"Failed"})}catch(e){v({type:"error",text:e.message})}finally{j(!1)}};return(0,a.jsxs)(r.Zp,{padding:"sm",className:"overflow-hidden",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:s,children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"size-8 rounded-lg flex items-center justify-center shrink-0",children:e.image?(0,a.jsx)(o.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,a.jsx)("span",{className:"material-symbols-outlined text-xl",style:{color:e.color},children:"terminal"})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("h3",{className:"font-medium text-sm",children:e.name}),(()=>{if(!D)return null;let e={configured:{class:"bg-green-500/10 text-green-600 dark:text-green-400",text:"Connected"},not_configured:{class:"bg-yellow-500/10 text-yellow-600 dark:text-yellow-400",text:"Not configured"},other:{class:"bg-blue-500/10 text-blue-600 dark:text-blue-400",text:"Custom config"}}[B];return e?(0,a.jsx)("span",{className:`px-1.5 py-0.5 text-[10px] font-medium rounded-full ${e.class}`,children:e.text}):null})()]}),(0,a.jsx)("p",{className:"text-xs text-text-muted truncate",children:e.description})]})]}),(0,a.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${t?"rotate-180":""}`,children:"expand_more"})]}),t&&(0,a.jsxs)("div",{className:"mt-6 pt-6 border-t border-border",children:[u&&(0,a.jsxs)("div",{className:"flex items-center gap-2 text-text-muted text-sm",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-base",children:"progress_activity"}),(0,a.jsx)("span",{children:"Checking Cline CLI..."})]}),m&&!u&&(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start gap-3 p-3 rounded-lg border bg-bg-secondary/50 border-border",children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-lg ${D?"text-green-500":"text-yellow-500"}`,children:D?"check_circle":"warning"}),(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:D?"Cline CLI detected and ready":m.installed?"Cline CLI installed but not runnable":"Cline CLI not detected"}),m.commandPath&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Binary:"," ",(0,a.jsx)("code",{className:"px-1 py-0.5 rounded bg-black/5 dark:bg-white/10",children:m.commandPath})]}),m.globalStatePath&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Config:"," ",(0,a.jsx)("code",{className:"px-1 py-0.5 rounded bg-black/5 dark:bg-white/10",children:m.globalStatePath})]})]})]}),D&&(0,a.jsxs)(a.Fragment,{children:["configured"===B&&(0,a.jsxs)("div",{className:"flex items-start gap-3 p-3 bg-green-500/10 border border-green-500/30 rounded-lg",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-green-500 text-lg",children:"check_circle"}),(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)("p",{className:"text-sm text-green-700 dark:text-green-300",children:"OmniRoute is configured as OpenAI-compatible provider"}),(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Provider: ",(0,a.jsx)("strong",{children:"openai"})," • Model:"," ",(0,a.jsx)("strong",{children:m.settings?.openAiModelId||"—"})]})]})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-sm text-text-muted",children:"Model"}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("input",{type:"text",value:C,onChange:e=>S(e.target.value),placeholder:"provider/model-id",className:"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,a.jsx)(r.$n,{variant:"outline",size:"sm",onClick:()=>O(!0),disabled:!i,children:"Select"}),(0,a.jsx)(r.$n,{variant:"ghost",size:"sm",onClick:()=>P(!0),children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"edit"})})]})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-sm text-text-muted",children:"API Key"}),c&&c.length>0?(0,a.jsx)("select",{value:k,onChange:e=>w(e.target.value),className:"px-3 py-2 bg-bg-secondary rounded-lg text-sm border border-border focus:outline-none focus:ring-1 focus:ring-primary/50",children:c.map(e=>(0,a.jsx)("option",{value:e.key,children:e.key},e.id))}):(0,a.jsx)("p",{className:"text-sm text-text-muted",children:x?"No API keys available":"Using default: sk_omniroute"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2 pt-2",children:[(0,a.jsxs)(r.$n,{variant:"primary",size:"sm",onClick:G,disabled:!C,loading:y,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"configured"===B?"Update Config":"Apply Config"]}),"configured"===B&&(0,a.jsxs)(r.$n,{variant:"outline",size:"sm",onClick:Z,loading:b,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restart_alt"}),"Reset"]})]}),N&&(0,a.jsxs)("div",{className:`flex items-center gap-2 px-3 py-2 rounded-lg text-sm ${"success"===N.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"success"===N.type?"check_circle":"error"}),(0,a.jsx)("span",{children:N.text})]}),(0,a.jsxs)("div",{className:"border-t border-border pt-3 mt-1",children:[(0,a.jsxs)("button",{onClick:()=>K(!U),className:"flex items-center gap-2 text-sm text-text-muted hover:text-text transition-colors",children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[16px] transition-transform ${U?"rotate-90":""}`,children:"chevron_right"}),(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"backup"}),"Backups ",T.length>0&&`(${T.length})`]}),U&&T.length>0&&(0,a.jsx)("div",{className:"mt-2 flex flex-col gap-1.5 pl-6",children:T.map(e=>(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2 p-2 rounded bg-bg-secondary/50 text-xs",children:[(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsx)("span",{className:"font-medium",children:e.originalFile}),(0,a.jsx)("span",{className:"text-text-muted",children:new Date(e.createdAt).toLocaleString()})]}),(0,a.jsx)(r.$n,{variant:"ghost",size:"sm",onClick:()=>q(e.id),loading:F===e.id,children:"Restore"})]},e.id))}),U&&0===T.length&&(0,a.jsx)("p",{className:"mt-2 pl-6 text-xs text-text-muted",children:"No backups available."})]})]})]})]}),(0,a.jsx)(r.rq,{isOpen:_,onClose:()=>O(!1),onSelect:e=>{S(e.value),O(!1)},selectedModel:C,activeProviders:d,title:"Select Model for Cline"}),(0,a.jsx)(r.uR,{isOpen:I,onClose:()=>P(!1),onApply:e=>{e.model&&S(e.model),e.apiKey&&w(e.apiKey),e.baseUrl&&L(e.baseUrl),P(!1)},currentConfig:{model:C,apiKey:k,baseUrl:$||n},title:"Cline Manual Configuration"})]})}function f({tool:e,isExpanded:t,onToggle:s,baseUrl:n,hasActiveProviders:i,apiKeys:c,activeProviders:d,cloudEnabled:x}){let[m,p]=(0,l.useState)(null),[u,h]=(0,l.useState)(!1),[g,y]=(0,l.useState)(!1),[f,b]=(0,l.useState)(!1),[j,N]=(0,l.useState)(null),[v,k]=(0,l.useState)(""),[w,C]=(0,l.useState)(""),[S,_]=(0,l.useState)(!1),[O,A]=(0,l.useState)({}),[E,I]=(0,l.useState)(!1),[P,$]=(0,l.useState)(""),L=(0,l.useRef)(!1),[R,T]=(0,l.useState)([]),[M,U]=(0,l.useState)(!1),[K,F]=(0,l.useState)(null),z=!!(m?.installed&&m?.runnable),D=z?m.hasOmniRoute?"configured":"not_configured":null;(0,l.useEffect)(()=>{c?.length>0&&!v&&k(c[0].key)},[c,v]),(0,l.useEffect)(()=>{t&&!m&&(q(),B(),H())},[t,m]);let B=async()=>{try{let e=await fetch("/api/models/alias");if(e.ok){let t=await e.json();A(t.aliases||{})}}catch{}},H=async()=>{try{let e=await fetch("/api/cli-tools/backups?toolId=kilo");if(e.ok){let t=await e.json();T(t.backups||[])}}catch{}},J=async e=>{F(e);try{let t=await fetch("/api/cli-tools/backups",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({toolId:"kilo",backupId:e})});if(t.ok)N({type:"success",text:"Backup restored! Reloading status..."}),await q(),await H();else{let e=await t.json();N({type:"error",text:e.error||"Failed to restore backup"})}}catch(e){N({type:"error",text:e.message})}finally{F(null)}},q=async()=>{h(!0);try{let e=await fetch("/api/cli-tools/kilo-settings"),t=await e.json();p(t)}catch(e){p({error:e.message})}finally{h(!1)}},W=async()=>{y(!0),N(null);try{let e=P||n||"http://localhost:20128",t=e.endsWith("/v1")?e:`${e}/v1`,s=await fetch("/api/cli-tools/kilo-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:t,apiKey:v||"sk_omniroute",model:w})}),a=await s.json();s.ok?(N({type:"success",text:a.message||"Applied!"}),await q(),await H()):N({type:"error",text:a.error||"Failed"})}catch(e){N({type:"error",text:e.message})}finally{y(!1)}},G=async()=>{b(!0),N(null);try{let e=await fetch("/api/cli-tools/kilo-settings",{method:"DELETE"}),t=await e.json();e.ok?(N({type:"success",text:t.message||"Reset!"}),C(""),L.current=!1,await q(),await H()):N({type:"error",text:t.error||"Failed"})}catch(e){N({type:"error",text:e.message})}finally{b(!1)}};return(0,a.jsxs)(r.Zp,{padding:"sm",className:"overflow-hidden",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:s,children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"size-8 rounded-lg flex items-center justify-center shrink-0",children:e.image?(0,a.jsx)(o.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,a.jsx)("span",{className:"material-symbols-outlined text-xl",style:{color:e.color},children:"terminal"})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("h3",{className:"font-medium text-sm",children:e.name}),(()=>{if(!z)return null;let e={configured:{class:"bg-green-500/10 text-green-600 dark:text-green-400",text:"Connected"},not_configured:{class:"bg-yellow-500/10 text-yellow-600 dark:text-yellow-400",text:"Not configured"}}[D];return e?(0,a.jsx)("span",{className:`px-1.5 py-0.5 text-[10px] font-medium rounded-full ${e.class}`,children:e.text}):null})()]}),(0,a.jsx)("p",{className:"text-xs text-text-muted truncate",children:e.description})]})]}),(0,a.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${t?"rotate-180":""}`,children:"expand_more"})]}),t&&(0,a.jsxs)("div",{className:"mt-6 pt-6 border-t border-border",children:[u&&(0,a.jsxs)("div",{className:"flex items-center gap-2 text-text-muted text-sm",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-base",children:"progress_activity"}),(0,a.jsx)("span",{children:"Checking Kilo Code CLI..."})]}),m&&!u&&(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start gap-3 p-3 rounded-lg border bg-bg-secondary/50 border-border",children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-lg ${z?"text-green-500":"text-yellow-500"}`,children:z?"check_circle":"warning"}),(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:z?"Kilo Code CLI detected and ready":m.installed?"Kilo Code CLI installed but not runnable":"Kilo Code CLI not detected"}),m.commandPath&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Binary:"," ",(0,a.jsx)("code",{className:"px-1 py-0.5 rounded bg-black/5 dark:bg-white/10",children:m.commandPath})]}),m.authPath&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Auth:"," ",(0,a.jsx)("code",{className:"px-1 py-0.5 rounded bg-black/5 dark:bg-white/10",children:m.authPath})]})]})]}),z&&(0,a.jsxs)(a.Fragment,{children:["configured"===D&&(0,a.jsxs)("div",{className:"flex items-start gap-3 p-3 bg-green-500/10 border border-green-500/30 rounded-lg",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-green-500 text-lg",children:"check_circle"}),(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)("p",{className:"text-sm text-green-700 dark:text-green-300",children:"OmniRoute is configured as OpenAI-compatible provider"}),(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Providers: ",(0,a.jsx)("strong",{children:m.settings?.auth?.join(", ")||"—"})]})]})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-sm text-text-muted",children:"Model"}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("input",{type:"text",value:w,onChange:e=>C(e.target.value),placeholder:"provider/model-id",className:"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,a.jsx)(r.$n,{variant:"outline",size:"sm",onClick:()=>_(!0),disabled:!i,children:"Select"}),(0,a.jsx)(r.$n,{variant:"ghost",size:"sm",onClick:()=>I(!0),children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"edit"})})]})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-sm text-text-muted",children:"API Key"}),c&&c.length>0?(0,a.jsx)("select",{value:v,onChange:e=>k(e.target.value),className:"px-3 py-2 bg-bg-secondary rounded-lg text-sm border border-border focus:outline-none focus:ring-1 focus:ring-primary/50",children:c.map(e=>(0,a.jsx)("option",{value:e.key,children:e.key},e.id))}):(0,a.jsx)("p",{className:"text-sm text-text-muted",children:x?"No API keys available":"Using default: sk_omniroute"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2 pt-2",children:[(0,a.jsxs)(r.$n,{variant:"primary",size:"sm",onClick:W,disabled:!w,loading:g,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"configured"===D?"Update Config":"Apply Config"]}),"configured"===D&&(0,a.jsxs)(r.$n,{variant:"outline",size:"sm",onClick:G,loading:f,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restart_alt"}),"Reset"]})]}),j&&(0,a.jsxs)("div",{className:`flex items-center gap-2 px-3 py-2 rounded-lg text-sm ${"success"===j.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"success"===j.type?"check_circle":"error"}),(0,a.jsx)("span",{children:j.text})]}),(0,a.jsxs)("div",{className:"border-t border-border pt-3 mt-1",children:[(0,a.jsxs)("button",{onClick:()=>U(!M),className:"flex items-center gap-2 text-sm text-text-muted hover:text-text transition-colors",children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[16px] transition-transform ${M?"rotate-90":""}`,children:"chevron_right"}),(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"backup"}),"Backups ",R.length>0&&`(${R.length})`]}),M&&R.length>0&&(0,a.jsx)("div",{className:"mt-2 flex flex-col gap-1.5 pl-6",children:R.map(e=>(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2 p-2 rounded bg-bg-secondary/50 text-xs",children:[(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsx)("span",{className:"font-medium",children:e.originalFile}),(0,a.jsx)("span",{className:"text-text-muted",children:new Date(e.createdAt).toLocaleString()})]}),(0,a.jsx)(r.$n,{variant:"ghost",size:"sm",onClick:()=>J(e.id),loading:K===e.id,children:"Restore"})]},e.id))}),M&&0===R.length&&(0,a.jsx)("p",{className:"mt-2 pl-6 text-xs text-text-muted",children:"No backups available."})]})]})]})]}),(0,a.jsx)(r.rq,{isOpen:S,onClose:()=>_(!1),onSelect:e=>{C(e.value),_(!1)},selectedModel:w,activeProviders:d,title:"Select Model for Kilo Code"}),(0,a.jsx)(r.uR,{isOpen:E,onClose:()=>I(!1),onApply:e=>{e.model&&C(e.model),e.apiKey&&k(e.apiKey),e.baseUrl&&$(e.baseUrl),I(!1)},currentConfig:{model:w,apiKey:v,baseUrl:P||n},title:"Kilo Code Manual Configuration"})]})}function b({toolId:e,tool:t,isExpanded:s,onToggle:n,baseUrl:i,apiKeys:c,activeProviders:d=[],cloudEnabled:x=!1}){let[m,p]=(0,l.useState)(null),[u,h]=(0,l.useState)(!1),[g,y]=(0,l.useState)(""),[f,b]=(0,l.useState)(null),[j,N]=(0,l.useState)(null),[v,k]=(0,l.useState)(!1),w=(0,l.useRef)(!1),[C,S]=(0,l.useState)(()=>c?.length>0?c[0].key:"");(0,l.useEffect)(()=>{let t=localStorage.getItem(`omniroute-cli-model-${e}`);t&&y(t);let s=localStorage.getItem(`omniroute-cli-key-${e}`);s&&c?.some(e=>e.key===s)&&S(s)},[e,c]);let _=(0,l.useCallback)(t=>{y(t),t?localStorage.setItem(`omniroute-cli-model-${e}`,t):localStorage.removeItem(`omniroute-cli-model-${e}`)},[e]),O=(0,l.useCallback)(t=>{S(t),t&&localStorage.setItem(`omniroute-cli-key-${e}`,t)},[e]);(0,l.useEffect)(()=>{!s||f||w.current||(w.current=!0,fetch(`/api/cli-tools/runtime/${e}`).then(e=>e.json()).then(e=>b(e)).catch(e=>b({error:e?.message||"runtime_check_failed"})))},[s,f,e]);let A=e=>{let t=C&&C.trim()?C:x?"your-api-key":"sk_omniroute",s=i||"http://localhost:20128",a=s.endsWith("/v1")?s:`${s}/v1`;return e.replace(/\{\{baseUrl\}\}/g,a).replace(/\{\{apiKey\}\}/g,t).replace(/\{\{model\}\}/g,g||"provider/model-id")},E=async(e,t)=>{await navigator.clipboard.writeText(A(e)),p(t),setTimeout(()=>p(null),2e3)},I=d.length>0,P=s&&null===f,$=async()=>{k(!0),N(null);try{let t=C&&C.trim()?C:x?"":"sk_omniroute",s=i||"http://localhost:20128",a=s.endsWith("/v1")?s:`${s}/v1`,l=await fetch(`/api/cli-tools/guide-settings/${e}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:a,apiKey:t,model:g})}),r=await l.json();l.ok?N({type:"success",text:r.message||"Configuration saved!"}):N({type:"error",text:r.error||"Failed to save"})}catch(e){N({type:"error",text:e.message})}finally{k(!1)}},L=["continue"].includes(e),R=()=>!t.requiresCloud||!!x;return(0,a.jsxs)(r.Zp,{padding:"sm",className:"overflow-hidden",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:n,children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"size-8 rounded-lg flex items-center justify-center shrink-0",children:t.image?(0,a.jsx)(o.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,a.jsx)("span",{className:"material-symbols-outlined text-xl",style:{color:t.color},children:t.icon}):(0,a.jsx)(o.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,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("h3",{className:"font-medium text-sm",children:t.name}),f&&!f.error&&(0,a.jsx)("span",{className:`px-1.5 py-0.5 text-[10px] font-medium rounded-full ${"not_required"===f.reason?"bg-blue-500/10 text-blue-600 dark:text-blue-400":f.installed&&f.runnable?"bg-green-500/10 text-green-600 dark:text-green-400":"bg-yellow-500/10 text-yellow-600 dark:text-yellow-400"}`,children:"not_required"===f.reason?"Guide":f.installed&&f.runnable?"Detected":"Not ready"})]}),(0,a.jsx)("p",{className:"text-xs text-text-muted truncate",children:t.description})]})]}),(0,a.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${s?"rotate-180":""}`,children:"expand_more"})]}),s&&(0,a.jsx)("div",{className:"mt-6 pt-6 border-t border-border",children:t.guideSteps?(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[P&&(0,a.jsxs)("div",{className:"flex items-center gap-2 text-text-muted text-sm",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-base",children:"progress_activity"}),(0,a.jsx)("span",{children:"Checking runtime..."})]}),!P&&f&&!f.error&&(0,a.jsxs)("div",{className:"flex items-start gap-3 p-3 bg-blue-500/10 border border-blue-500/30 rounded-lg",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-blue-500 text-lg",children:"not_required"===f.reason?"info":f.installed&&f.runnable?"check_circle":"warning"}),(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)("p",{className:"text-sm text-blue-700 dark:text-blue-300",children:"not_required"===f.reason?"Guide-only integration: no local binary required":f.installed&&f.runnable?"CLI runtime detected and healthy":f.installed?`CLI found but not runnable${f.reason?` (${f.reason})`:""}`:"CLI runtime not detected"}),f.commandPath&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Binary:"," ",(0,a.jsx)("code",{className:"px-1 py-0.5 rounded bg-black/5 dark:bg-white/10",children:f.commandPath})]}),f.configPath&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Config path:"," ",(0,a.jsx)("code",{className:"px-1 py-0.5 rounded bg-black/5 dark:bg-white/10",children:f.configPath})]})]})]}),!P&&f?.error&&(0,a.jsxs)("div",{className:"flex items-start gap-3 p-3 bg-red-500/10 border border-red-500/30 rounded-lg",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-red-500 text-lg",children:"error"}),(0,a.jsx)("p",{className:"text-sm text-red-600 dark:text-red-400",children:"Failed to check runtime status."})]}),t.notes&&0!==t.notes.length?(0,a.jsx)("div",{className:"flex flex-col gap-2 mb-4",children:t.notes.map((e,t)=>{if("cloudCheck"===e.type&&x)return null;let s="warning"===e.type,l="cloudCheck"===e.type&&!x,r="bg-blue-500/10 border-blue-500/30",n="text-blue-600 dark:text-blue-400",i="text-blue-500",o="info";return s?(r="bg-yellow-500/10 border-yellow-500/30",n="text-yellow-600 dark:text-yellow-400",i="text-yellow-500",o="warning"):l&&(r="bg-red-500/10 border-red-500/30",n="text-red-600 dark:text-red-400",i="text-red-500",o="error"),(0,a.jsxs)("div",{className:`flex items-start gap-3 p-3 rounded-lg border ${r}`,children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-lg ${i}`,children:o}),(0,a.jsx)("p",{className:`text-sm ${n}`,children:e.text})]},t)})}):null,R()&&t.guideSteps.map(e=>(0,a.jsxs)("div",{className:"flex items-start gap-4",children:[(0,a.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,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-text",children:e.title}),e.desc&&(0,a.jsx)("p",{className:"text-sm text-text-muted mt-0.5",children:e.desc}),"apiKeySelector"===e.type&&(0,a.jsx)("div",{className:"mt-2 flex items-center gap-2",children:c&&c.length>0?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("select",{value:C,onChange:e=>O(e.target.value),className:"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",children:c.map(e=>(0,a.jsx)("option",{value:e.key,children:e.key},e.id))}),(0,a.jsx)("button",{onClick:()=>E(C,"apiKey"),className:"shrink-0 px-3 py-2 bg-bg-secondary hover:bg-bg-tertiary rounded-lg border border-border transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-lg",children:"apiKey"===m?"check":"content_copy"})})]}):(0,a.jsx)("span",{className:"text-sm text-text-muted",children:x?"No API keys - Create one in Keys page":"sk_omniroute"})}),"modelSelector"===e.type&&(0,a.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[(0,a.jsx)("input",{type:"text",value:g,onChange:e=>_(e.target.value),placeholder:"provider/model-id",className:"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,a.jsx)("button",{onClick:()=>h(!0),disabled:!I,className:`shrink-0 px-3 py-2 rounded-lg border text-sm transition-colors ${I?"bg-bg-secondary border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select Model"}),g&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("button",{onClick:()=>E(g,"model"),className:"shrink-0 px-3 py-2 bg-bg-secondary hover:bg-bg-tertiary rounded-lg border border-border transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-lg",children:"model"===m?"check":"content_copy"})}),(0,a.jsx)("button",{onClick:()=>_(""),className:"p-2 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-lg",children:"close"})})]})]}),e.value&&(0,a.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[(0,a.jsx)("code",{className:"flex-1 px-3 py-2 bg-bg-secondary rounded-lg text-sm font-mono border border-border truncate",children:A(e.value)}),e.copyable&&(0,a.jsx)("button",{onClick:()=>E(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,a.jsx)("span",{className:"material-symbols-outlined text-lg",children:m===`${e.step}-${e.title}`?"check":"content_copy"})})]})]})]},e.step)),R()&&t.codeBlock&&(0,a.jsxs)("div",{className:"mt-2",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted uppercase tracking-wide",children:t.codeBlock.language}),(0,a.jsxs)("button",{onClick:()=>E(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,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"codeblock"===m?"check":"content_copy"}),"codeblock"===m?"Copied!":"Copy"]})]}),(0,a.jsx)("pre",{className:"p-4 bg-bg-secondary rounded-lg border border-border overflow-x-auto",children:(0,a.jsx)("code",{className:"text-sm font-mono whitespace-pre",children:A(t.codeBlock.code)})})]}),R()&&(0,a.jsxs)("div",{className:"mt-2",children:[j&&(0,a.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs mb-2 ${"success"===j.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===j.type?"check_circle":"error"}),(0,a.jsx)("span",{children:j.text})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[L&&(0,a.jsxs)(r.$n,{variant:"primary",size:"sm",onClick:$,disabled:!g,loading:v,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Save Config"]}),t.codeBlock&&(0,a.jsxs)(r.$n,{variant:L?"outline":"primary",size:"sm",onClick:()=>E(t.codeBlock.code,"codeblock"),children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"codeblock"===m?"check":"content_copy"}),"codeblock"===m?"Copied!":"Copy Config"]}),g&&(0,a.jsxs)("span",{className:"text-xs text-text-muted flex items-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-green-500",children:"check_circle"}),"Selection saved"]})]})]})]}):(0,a.jsx)("p",{className:"text-text-muted text-sm",children:"Coming soon..."})}),(0,a.jsx)(r.rq,{isOpen:u,onClose:()=>h(!1),onSelect:e=>{_(e.value)},selectedModel:g,activeProviders:d,title:"Select Model"})]})}function j({tool:e,isExpanded:t,onToggle:s,baseUrl:n,apiKeys:i,activeProviders:c,hasActiveProviders:d,cloudEnabled:x}){let[m,p]=(0,l.useState)(null),[u,h]=(0,l.useState)(!1),[g,y]=(0,l.useState)(!1),[f,b]=(0,l.useState)(""),[j,N]=(0,l.useState)(""),[v,k]=(0,l.useState)(null),[w,C]=(0,l.useState)({}),[S,_]=(0,l.useState)(!1),[O,A]=(0,l.useState)(null);(0,l.useEffect)(()=>{i?.length>0&&!j&&N(i[0].key)},[i,j]),(0,l.useEffect)(()=>{t&&!m&&(I(),E())},[t,m]);let E=async()=>{try{let e=await fetch("/api/cli-tools/antigravity-mitm/alias?tool=antigravity");if(e.ok){let t=(await e.json()).aliases||{};Object.keys(t).length>0&&C(t)}}catch(e){console.log("Error loading saved mappings:",e)}},I=async()=>{try{let e=await fetch("/api/cli-tools/antigravity-mitm");if(e.ok){let t=await e.json();p(t)}}catch(e){console.log("Error fetching status:",e),p({running:!1})}},P="u">typeof navigator&&navigator.userAgent?.includes("Windows"),$=async e=>{h(!0),k(null);try{let t=j?.trim()||(i?.length>0?i[0].key:null)||(x?null:"sk_omniroute"),s=await fetch("/api/cli-tools/antigravity-mitm",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiKey:t,sudoPassword:e})}),a=await s.json();s.ok?(k({type:"success",text:"MITM started"}),y(!1),b(""),I()):k({type:"error",text:a.error||"Failed to start"})}catch(e){k({type:"error",text:e.message})}finally{h(!1)}},L=async e=>{h(!0),k(null);try{let t=await fetch("/api/cli-tools/antigravity-mitm",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({sudoPassword:e})}),s=await t.json();t.ok?(k({type:"success",text:"MITM stopped"}),y(!1),b(""),I()):k({type:"error",text:s.error||"Failed to stop"})}catch(e){k({type:"error",text:e.message})}finally{h(!1)}},R=()=>{f.trim()?m?.running?L(f):$(f):k({type:"error",text:"Sudo password is required"})},T=(e,t)=>{C(s=>({...s,[e]:t}))},M=async()=>{h(!0),k(null);try{let e=await fetch("/api/cli-tools/antigravity-mitm/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({tool:"antigravity",mappings:w})});if(!e.ok){let t=await e.json();throw Error(t.error||"Failed to save mappings")}k({type:"success",text:"Mappings saved!"})}catch(e){k({type:"error",text:e.message})}finally{h(!1)}},U=m?.running;return(0,a.jsxs)(r.Zp,{padding:"sm",className:"overflow-hidden",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:s,children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,a.jsx)(o.default,{src:"/providers/antigravity.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,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("h3",{className:"font-medium text-sm",children:e.name}),U?(0,a.jsx)(r.Ex,{variant:"success",size:"sm",children:"Active"}):(0,a.jsx)(r.Ex,{variant:"default",size:"sm",children:"Inactive"})]}),(0,a.jsx)("p",{className:"text-xs text-text-muted truncate",children:e.description})]})]}),(0,a.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${t?"rotate-180":""}`,children:"expand_more"})]}),t&&(0,a.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[(0,a.jsx)("div",{className:"flex items-center gap-2",children:U?(0,a.jsxs)("button",{onClick:()=>{P||m?.hasCachedPassword?L(""):(y(!0),k(null))},disabled:u,className:"px-4 py-2 rounded-lg bg-red-500/10 border border-red-500/30 text-red-500 font-medium text-sm flex items-center gap-2 hover:bg-red-500/20 transition-colors disabled:opacity-50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"stop_circle"}),"Stop MITM"]}):(0,a.jsxs)("button",{onClick:()=>{P||m?.hasCachedPassword?$(""):(y(!0),k(null))},disabled:u||!d,className:"px-4 py-2 rounded-lg bg-primary/10 border border-primary/30 text-primary font-medium text-sm flex items-center gap-2 hover:bg-primary/20 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"play_circle"}),"Start MITM"]})}),v?.type==="error"&&(0,a.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1.5 rounded text-xs bg-red-500/10 text-red-600",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"error"}),(0,a.jsx)("span",{children:v.text})]}),U&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"API Key"}),(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),i.length>0?(0,a.jsx)("select",{value:j,onChange:e=>N(e.target.value),className:"flex-1 px-2 py-1.5 bg-surface rounded text-xs border border-border focus:outline-none focus:ring-1 focus:ring-primary/50",children:i.map(e=>(0,a.jsx)("option",{value:e.key,children:e.key},e.id))}):(0,a.jsx)("span",{className:"flex-1 text-xs text-text-muted px-2 py-1.5",children:x?"No API keys - Create one in Keys page":"sk_omniroute (default)"})]}),e.defaultModels.map(e=>(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:e.name}),(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,a.jsx)("input",{type:"text",value:w[e.alias]||"",onChange:t=>T(e.alias,t.target.value),placeholder:"provider/model-id",className:"flex-1 px-2 py-1.5 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"}),(0,a.jsx)("button",{onClick:()=>{A(e.alias),_(!0)},disabled:!d,className:`px-2 py-1.5 rounded border text-xs transition-colors shrink-0 whitespace-nowrap ${d?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select"}),w[e.alias]&&(0,a.jsx)("button",{onClick:()=>T(e.alias,""),className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]},e.alias)),(0,a.jsx)("div",{className:"flex items-center gap-2",children:(0,a.jsxs)(r.$n,{variant:"primary",size:"sm",onClick:M,disabled:u||0===Object.keys(w).length,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Save Mappings"]})})]}),!U&&(0,a.jsxs)("div",{className:"flex flex-col gap-1.5 px-1",children:[(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:[(0,a.jsx)("span",{className:"font-medium text-text-main",children:"How it works:"})," Intercepts Antigravity traffic via DNS redirect, letting you reroute models through OmniRoute."]}),(0,a.jsxs)("div",{className:"flex flex-col gap-0.5 text-[11px] text-text-muted",children:[(0,a.jsx)("span",{children:"1. Generates SSL cert & adds to system keychain"}),(0,a.jsxs)("span",{children:["2. Redirects"," ",(0,a.jsx)("code",{className:"text-[10px] bg-surface px-1 rounded",children:"daily-cloudcode-pa.googleapis.com"})," ","→ localhost"]}),(0,a.jsx)("span",{children:"3. Maps Antigravity models to any provider via OmniRoute"})]})]})]}),(0,a.jsx)(r.aF,{isOpen:g,onClose:()=>{y(!1),b(""),k(null)},title:"Sudo Password Required",size:"sm",children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start gap-3 p-3 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-yellow-500 text-[20px]",children:"warning"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Required for SSL certificate and DNS configuration"})]}),(0,a.jsx)(r.pd,{type:"password",placeholder:"Enter sudo password",value:f,onChange:e=>b(e.target.value),onKeyDown:e=>{"Enter"!==e.key||u||R()}}),v&&(0,a.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===v.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===v.type?"check_circle":"error"}),(0,a.jsx)("span",{children:v.text})]}),(0,a.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[(0,a.jsx)(r.$n,{variant:"ghost",size:"sm",onClick:()=>{y(!1),b(""),k(null)},disabled:u,children:"Cancel"}),(0,a.jsx)(r.$n,{variant:"primary",size:"sm",onClick:R,loading:u,children:"Confirm"})]})]})}),(0,a.jsx)(r.rq,{isOpen:S,onClose:()=>_(!1),onSelect:e=>{O&&C(t=>({...t,[O]:e.value}))},selectedModel:O?w[O]:null,activeProviders:c,title:`Select model for ${O}`})]})}s(41463).env.NEXT_PUBLIC_CLOUD_URL;let N=s(41463).env.NEXT_PUBLIC_CLOUD_URL;function v({machineId:e}){let t,s,o,[c,m]=(0,l.useState)([]),[u,g]=(0,l.useState)(!0),[v,k]=(0,l.useState)(null),[w,C]=(0,l.useState)({}),[S,_]=(0,l.useState)(!1),[O,A]=(0,l.useState)([]);(0,l.useEffect)(()=>{P(),E(),I()},[]);let E=async()=>{try{let e=await fetch("/api/settings");if(e.ok){let t=await e.json();_(t.cloudEnabled||!1)}}catch(e){console.log("Error loading cloud settings:",e)}},I=async()=>{try{let e=await fetch("/api/keys");if(e.ok){let t=await e.json();A(t.keys||[])}}catch(e){console.log("Error fetching API keys:",e)}},P=async()=>{try{let e=await fetch("/api/providers"),t=await e.json();e.ok&&m(t.connections||[])}catch(e){console.log("Error fetching connections:",e)}finally{g(!1)}},$=()=>c.filter(e=>!1!==e.isActive),L=(0,l.useCallback)((e,t,s)=>{C(a=>a[e]?.[t]===s?a:{...a,[e]:{...a[e],[t]:s}})},[]);if(u)return(0,a.jsx)("div",{className:"flex flex-col gap-6",children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)(r.Qv,{}),(0,a.jsx)(r.Qv,{}),(0,a.jsx)(r.Qv,{})]})});let R=(t=$(),s=[],o=new Set,t.forEach(e=>{let t=i.Xg[e.provider]||e.provider;(0,i.KC)(e.provider).forEach(a=>{let l=`${t}/${a.id}`;o.has(l)||(o.add(l),s.push({value:l,label:`${t}/${a.id}`,provider:e.provider,alias:t,connectionName:e.name,modelId:a.id}))})}),s).length>0;return(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[!R&&(0,a.jsx)(r.Zp,{className:"border-yellow-500/50 bg-yellow-500/5",children:(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:"No active providers"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Please add and connect providers first to configure CLI tools."})]})]})}),(0,a.jsx)("div",{className:"flex flex-col gap-4",children:Object.entries(n).map(([e,t])=>((e,t)=>{let s={tool:t,isExpanded:v===e,onToggle:()=>k(v===e?null:e),baseUrl:S&&N?N:window.location.origin,apiKeys:O};switch(e){case"claude":return(0,a.jsx)(d,{...s,activeProviders:$(),modelMappings:w[e]||{},onModelMappingChange:(t,s)=>L(e,t,s),hasActiveProviders:R,cloudEnabled:S},e);case"codex":return(0,a.jsx)(x,{...s,activeProviders:$(),cloudEnabled:S},e);case"droid":return(0,a.jsx)(p,{...s,activeProviders:$(),hasActiveProviders:R,cloudEnabled:S},e);case"openclaw":return(0,a.jsx)(h,{...s,activeProviders:$(),hasActiveProviders:R,cloudEnabled:S},e);case"antigravity":return(0,a.jsx)(j,{...s,activeProviders:$(),hasActiveProviders:R,cloudEnabled:S},e);case"cline":return(0,a.jsx)(y,{...s,activeProviders:$(),hasActiveProviders:R,cloudEnabled:S},e);case"kilo":return(0,a.jsx)(f,{...s,activeProviders:$(),hasActiveProviders:R,cloudEnabled:S},e);default:return(0,a.jsx)(b,{toolId:e,...s,activeProviders:$(),cloudEnabled:S},e)}})(e,t))})]})}},46556:(e,t,s)=>{Promise.resolve().then(s.bind(s,9958))}},e=>{e.O(0,[8500,600,7765,7896,1525,8441,3794,7358],()=>e(e.s=46556)),_N_E=e.O()}]);
|
|
15
|
+
`},{filename:"~/.codex/auth.json",content:JSON.stringify({OPENAI_API_KEY:p},null,2)}])})]})}let m=s(41463).env.NEXT_PUBLIC_CLOUD_URL;function p({tool:e,isExpanded:t,onToggle:s,baseUrl:n,hasActiveProviders:i,apiKeys:c,activeProviders:d,cloudEnabled:x}){let p,u,h,g,[y,f]=(0,l.useState)(null),[b,j]=(0,l.useState)(!1),[N,v]=(0,l.useState)(!1),[k,w]=(0,l.useState)(!1),[C,S]=(0,l.useState)(null),[_,O]=(0,l.useState)(""),[A,E]=(0,l.useState)(""),[I,P]=(0,l.useState)(!1),[$,L]=(0,l.useState)({}),[R,T]=(0,l.useState)(!1),[M,U]=(0,l.useState)(""),K=(0,l.useRef)(!1),[F,z]=(0,l.useState)([]),[D,B]=(0,l.useState)(!1),[H,J]=(0,l.useState)(null),q=!!(y?.installed&&y?.runnable),W=(()=>{if(!q)return null;let e=y.settings?.customModels?.find(e=>"custom:OmniRoute-0"===e.id);if(!e)return"not_configured";let t=e.baseUrl?.includes("localhost")||e.baseUrl?.includes("127.0.0.1"),s=x&&m&&e.baseUrl?.startsWith(m);return t||s?"configured":"other"})();(0,l.useEffect)(()=>{c?.length>0&&!_&&O(c[0].key)},[c,_]),(0,l.useEffect)(()=>{t&&!y&&(Z(),G(),Q())},[t,y]);let G=async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&L(t.aliases||{})}catch(e){console.log("Error fetching model aliases:",e)}};(0,l.useEffect)(()=>{if(y?.installed&&!K.current){K.current=!0;let e=y.settings?.customModels?.find(e=>"custom:OmniRoute-0"===e.id);e&&(e.model&&E(e.model),e.apiKey&&c?.some(t=>t.key===e.apiKey)&&O(e.apiKey))}},[y,c]);let Z=async()=>{j(!0);try{let e=await fetch("/api/cli-tools/droid-settings"),t=await e.json();f(t)}catch(e){f({installed:!1,error:e.message})}finally{j(!1)}},V=()=>{let e=M||n;return e.endsWith("/v1")?e:`${e}/v1`},X=async()=>{v(!0),S(null);try{let e=_?.trim()||(c?.length>0?c[0].key:null)||(x?null:"sk_omniroute"),t=await fetch("/api/cli-tools/droid-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:V(),apiKey:e,model:A})}),s=await t.json();t.ok?(S({type:"success",text:"Settings applied successfully!"}),Z()):S({type:"error",text:s.error||"Failed to apply settings"})}catch(e){S({type:"error",text:e.message})}finally{v(!1)}},Y=async()=>{w(!0),S(null);try{let e=await fetch("/api/cli-tools/droid-settings",{method:"DELETE"}),t=await e.json();e.ok?(S({type:"success",text:"Settings reset successfully!"}),E(""),O(""),Z()):S({type:"error",text:t.error||"Failed to reset settings"})}catch(e){S({type:"error",text:e.message})}finally{w(!1)}},Q=async()=>{try{let e=await fetch("/api/cli-tools/backups?tool=droid"),t=await e.json();e.ok&&z(t.backups||[])}catch(e){console.log("Error fetching backups:",e)}},ee=async e=>{J(e),S(null);try{let t=await fetch("/api/cli-tools/backups",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({tool:"droid",backupId:e})}),s=await t.json();t.ok?(S({type:"success",text:"Backup restored!"}),Z(),Q()):S({type:"error",text:s.error||"Failed to restore"})}catch(e){S({type:"error",text:e.message})}finally{J(null)}};return(0,a.jsxs)(r.Zp,{padding:"sm",className:"overflow-hidden",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:s,children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,a.jsx)(o.default,{src:"/providers/droid.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,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("h3",{className:"font-medium text-sm",children:e.name}),"configured"===W&&(0,a.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,a.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,a.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,a.jsx)("p",{className:"text-xs text-text-muted truncate",children:e.description})]})]}),(0,a.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${t?"rotate-180":""}`,children:"expand_more"})]}),t&&(0,a.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[b&&(0,a.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,a.jsx)("span",{children:"Checking Factory Droid CLI..."})]}),!b&&y&&!q&&(0,a.jsxs)("div",{className:"flex items-center gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:y.installed?"Factory Droid CLI not runnable":"Factory Droid CLI not installed"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:y.installed?`Factory Droid CLI was found but failed runtime healthcheck${y.reason?` (${y.reason})`:""}.`:"Please install Factory Droid CLI to use this feature."})]})]}),!b&&q&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[y?.settings?.customModels?.find(e=>"custom:OmniRoute-0"===e.id)?.baseUrl&&(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Current"}),(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,a.jsx)("span",{className:"flex-1 px-2 py-1.5 text-xs text-text-muted truncate",children:y.settings.customModels.find(e=>"custom:OmniRoute-0"===e.id).baseUrl})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Base URL"}),(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,a.jsx)("input",{type:"text",value:(p=M||n).endsWith("/v1")?p:`${p}/v1`,onChange:e=>U(e.target.value),placeholder:"https://.../v1",className:"flex-1 px-2 py-1.5 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"}),M&&M!==n&&(0,a.jsx)("button",{onClick:()=>U(""),className:"p-1 text-text-muted hover:text-primary rounded transition-colors",title:"Reset to default",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"restart_alt"})})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"API Key"}),(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),c.length>0?(0,a.jsx)("select",{value:_,onChange:e=>O(e.target.value),className:"flex-1 px-2 py-1.5 bg-surface rounded text-xs border border-border focus:outline-none focus:ring-1 focus:ring-primary/50",children:c.map(e=>(0,a.jsx)("option",{value:e.key,children:e.key},e.id))}):(0,a.jsx)("span",{className:"flex-1 text-xs text-text-muted px-2 py-1.5",children:x?"No API keys - Create one in Keys page":"sk_omniroute (default)"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Model"}),(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,a.jsx)("input",{type:"text",value:A,onChange:e=>E(e.target.value),placeholder:"provider/model-id",className:"flex-1 px-2 py-1.5 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"}),(0,a.jsx)("button",{onClick:()=>P(!0),disabled:!i,className:`px-2 py-1.5 rounded border text-xs transition-colors shrink-0 whitespace-nowrap ${i?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select Model"}),A&&(0,a.jsx)("button",{onClick:()=>E(""),className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})]}),C&&(0,a.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===C.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===C.type?"check_circle":"error"}),(0,a.jsx)("span",{children:C.text})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsxs)(r.$n,{variant:"primary",size:"sm",onClick:X,disabled:!A,loading:N,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,a.jsxs)(r.$n,{variant:"outline",size:"sm",onClick:Y,disabled:!y?.hasOmniRoute,loading:k,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,a.jsxs)(r.$n,{variant:"ghost",size:"sm",onClick:()=>T(!0),children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]}),(0,a.jsx)("div",{className:"flex-1"}),(0,a.jsxs)(r.$n,{variant:"ghost",size:"sm",onClick:()=>{B(!D),D||Q()},children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"history"}),"Backups",F.length>0&&` (${F.length})`]})]}),D&&(0,a.jsxs)("div",{className:"mt-2 p-3 bg-surface border border-border rounded-lg",children:[(0,a.jsxs)("h4",{className:"text-xs font-semibold text-text-main mb-2 flex items-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"history"}),"Config Backups"]}),0===F.length?(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"No backups yet. Backups are created automatically before each Apply or Reset."}):(0,a.jsx)("div",{className:"space-y-1.5",children:F.map(e=>(0,a.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1.5 bg-black/5 dark:bg-white/5 rounded text-xs",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"description"}),(0,a.jsx)("span",{className:"flex-1 truncate font-mono",title:e.id,children:e.id}),(0,a.jsx)("span",{className:"text-text-muted whitespace-nowrap",children:new Date(e.createdAt).toLocaleString()}),(0,a.jsx)("button",{onClick:()=>ee(e.id),disabled:H===e.id,className:"px-2 py-0.5 bg-primary/10 text-primary rounded text-[10px] font-medium hover:bg-primary/20 transition-colors disabled:opacity-50",children:H===e.id?"...":"Restore"})]},e.id))})]})]})]}),(0,a.jsx)(r.rq,{isOpen:I,onClose:()=>P(!1),onSelect:e=>{E(e.value),P(!1)},selectedModel:A,activeProviders:d,modelAliases:$,title:"Select Model for Factory Droid"}),(0,a.jsx)(r.uR,{isOpen:R,onClose:()=>T(!1),title:"Factory Droid - Manual Configuration",configs:(u=_&&_.trim()?_:x?"<API_KEY_FROM_DASHBOARD>":"sk_omniroute",h={customModels:[{model:A||"provider/model-id",id:"custom:OmniRoute-0",index:0,baseUrl:V(),apiKey:u,displayName:A||"provider/model-id",maxOutputTokens:131072,noImageSupport:!1,provider:"openai"}]},g="u">typeof navigator&&navigator.platform,[{filename:g?.toLowerCase().includes("win")?"%USERPROFILE%\\.factory\\settings.json":"~/.factory/settings.json",content:JSON.stringify(h,null,2)}])})]})}let u=s(41463).env.NEXT_PUBLIC_CLOUD_URL;function h({tool:e,isExpanded:t,onToggle:s,baseUrl:n,hasActiveProviders:i,apiKeys:c,activeProviders:d,cloudEnabled:x}){let m,p,[h,g]=(0,l.useState)(null),[y,f]=(0,l.useState)(!1),[b,j]=(0,l.useState)(!1),[N,v]=(0,l.useState)(!1),[k,w]=(0,l.useState)(null),[C,S]=(0,l.useState)(""),[_,O]=(0,l.useState)(""),[A,E]=(0,l.useState)(!1),[I,P]=(0,l.useState)({}),[$,L]=(0,l.useState)(!1),[R,T]=(0,l.useState)(""),M=(0,l.useRef)(!1),[U,K]=(0,l.useState)([]),[F,z]=(0,l.useState)(!1),[D,B]=(0,l.useState)(null),H=!!(h?.installed&&h?.runnable),J=(()=>{if(!H)return null;let e=h.settings?.models?.providers?.omniroute;if(!e)return"not_configured";let t=e.baseUrl?.includes("localhost")||e.baseUrl?.includes("127.0.0.1"),s=x&&u&&e.baseUrl?.startsWith(u);return t||s?"configured":"other"})();(0,l.useEffect)(()=>{c?.length>0&&!C&&S(c[0].key)},[c,C]),(0,l.useEffect)(()=>{t&&!h&&(W(),q(),X())},[t,h]);let q=async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&P(t.aliases||{})}catch(e){console.log("Error fetching model aliases:",e)}};(0,l.useEffect)(()=>{if(h?.installed&&!M.current){M.current=!0;let e=h.settings?.models?.providers?.omniroute;if(e){let t=h.settings?.agents?.defaults?.model?.primary;t&&O(t.replace("omniroute/","")),e.apiKey&&c?.some(t=>t.key===e.apiKey)&&S(e.apiKey)}}},[h,c]);let W=async()=>{f(!0);try{let e=await fetch("/api/cli-tools/openclaw-settings"),t=await e.json();g(t)}catch(e){g({installed:!1,error:e.message})}finally{f(!1)}},G=()=>{let e=R||n;return e.endsWith("/v1")?e:`${e}/v1`},Z=async()=>{j(!0),w(null);try{let e=C?.trim()||(c?.length>0?c[0].key:null)||(x?null:"sk_omniroute"),t=await fetch("/api/cli-tools/openclaw-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:G(),apiKey:e,model:_})}),s=await t.json();t.ok?(w({type:"success",text:"Settings applied successfully!"}),W()):w({type:"error",text:s.error||"Failed to apply settings"})}catch(e){w({type:"error",text:e.message})}finally{j(!1)}},V=async()=>{v(!0),w(null);try{let e=await fetch("/api/cli-tools/openclaw-settings",{method:"DELETE"}),t=await e.json();e.ok?(w({type:"success",text:"Settings reset successfully!"}),O(""),S(""),W()):w({type:"error",text:t.error||"Failed to reset settings"})}catch(e){w({type:"error",text:e.message})}finally{v(!1)}},X=async()=>{try{let e=await fetch("/api/cli-tools/backups?tool=openclaw"),t=await e.json();e.ok&&K(t.backups||[])}catch(e){console.log("Error fetching backups:",e)}},Y=async e=>{B(e),w(null);try{let t=await fetch("/api/cli-tools/backups",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({tool:"openclaw",backupId:e})}),s=await t.json();t.ok?(w({type:"success",text:"Backup restored!"}),W(),X()):w({type:"error",text:s.error||"Failed to restore"})}catch(e){w({type:"error",text:e.message})}finally{B(null)}};return(0,a.jsxs)(r.Zp,{padding:"sm",className:"overflow-hidden",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:s,children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,a.jsx)(o.default,{src:"/providers/openclaw.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,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("h3",{className:"font-medium text-sm",children:e.name}),"configured"===J&&(0,a.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,a.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,a.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,a.jsx)("p",{className:"text-xs text-text-muted truncate",children:e.description})]})]}),(0,a.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${t?"rotate-180":""}`,children:"expand_more"})]}),t&&(0,a.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[y&&(0,a.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,a.jsx)("span",{children:"Checking Open Claw CLI..."})]}),!y&&h&&!H&&(0,a.jsxs)("div",{className:"flex items-center gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:h.installed?"Open Claw CLI not runnable":"Open Claw CLI not installed"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:h.installed?`Open Claw CLI was found but failed runtime healthcheck${h.reason?` (${h.reason})`:""}.`:"Please install Open Claw CLI to use this feature."})]})]}),!y&&H&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[h?.settings?.models?.providers?.omniroute?.baseUrl&&(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Current"}),(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,a.jsx)("span",{className:"flex-1 px-2 py-1.5 text-xs text-text-muted truncate",children:h.settings.models.providers.omniroute.baseUrl})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Base URL"}),(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,a.jsx)("input",{type:"text",value:(m=R||n).endsWith("/v1")?m:`${m}/v1`,onChange:e=>T(e.target.value),placeholder:"https://.../v1",className:"flex-1 px-2 py-1.5 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"}),R&&R!==n&&(0,a.jsx)("button",{onClick:()=>T(""),className:"p-1 text-text-muted hover:text-primary rounded transition-colors",title:"Reset to default",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"restart_alt"})})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"API Key"}),(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),c.length>0?(0,a.jsx)("select",{value:C,onChange:e=>S(e.target.value),className:"flex-1 px-2 py-1.5 bg-surface rounded text-xs border border-border focus:outline-none focus:ring-1 focus:ring-primary/50",children:c.map(e=>(0,a.jsx)("option",{value:e.key,children:e.key},e.id))}):(0,a.jsx)("span",{className:"flex-1 text-xs text-text-muted px-2 py-1.5",children:x?"No API keys - Create one in Keys page":"sk_omniroute (default)"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Model"}),(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,a.jsx)("input",{type:"text",value:_,onChange:e=>O(e.target.value),placeholder:"provider/model-id",className:"flex-1 px-2 py-1.5 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"}),(0,a.jsx)("button",{onClick:()=>E(!0),disabled:!i,className:`px-2 py-1.5 rounded border text-xs transition-colors shrink-0 whitespace-nowrap ${i?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select Model"}),_&&(0,a.jsx)("button",{onClick:()=>O(""),className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})]}),k&&(0,a.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===k.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===k.type?"check_circle":"error"}),(0,a.jsx)("span",{children:k.text})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsxs)(r.$n,{variant:"primary",size:"sm",onClick:Z,disabled:!_,loading:b,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,a.jsxs)(r.$n,{variant:"outline",size:"sm",onClick:V,disabled:!h?.hasOmniRoute,loading:N,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,a.jsxs)(r.$n,{variant:"ghost",size:"sm",onClick:()=>L(!0),children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]}),(0,a.jsx)("div",{className:"flex-1"}),(0,a.jsxs)(r.$n,{variant:"ghost",size:"sm",onClick:()=>{z(!F),F||X()},children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"history"}),"Backups",U.length>0&&` (${U.length})`]})]}),F&&(0,a.jsxs)("div",{className:"mt-2 p-3 bg-surface border border-border rounded-lg",children:[(0,a.jsxs)("h4",{className:"text-xs font-semibold text-text-main mb-2 flex items-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"history"}),"Config Backups"]}),0===U.length?(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"No backups yet. Backups are created automatically before each Apply or Reset."}):(0,a.jsx)("div",{className:"space-y-1.5",children:U.map(e=>(0,a.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1.5 bg-black/5 dark:bg-white/5 rounded text-xs",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"description"}),(0,a.jsx)("span",{className:"flex-1 truncate font-mono",title:e.id,children:e.id}),(0,a.jsx)("span",{className:"text-text-muted whitespace-nowrap",children:new Date(e.createdAt).toLocaleString()}),(0,a.jsx)("button",{onClick:()=>Y(e.id),disabled:D===e.id,className:"px-2 py-0.5 bg-primary/10 text-primary rounded text-[10px] font-medium hover:bg-primary/20 transition-colors disabled:opacity-50",children:D===e.id?"...":"Restore"})]},e.id))})]})]})]}),(0,a.jsx)(r.rq,{isOpen:A,onClose:()=>E(!1),onSelect:e=>{O(e.value),E(!1)},selectedModel:_,activeProviders:d,modelAliases:I,title:"Select Model for Open Claw"}),(0,a.jsx)(r.uR,{isOpen:$,onClose:()=>L(!1),title:"Open Claw - Manual Configuration",configs:(p=C&&C.trim()?C:x?"<API_KEY_FROM_DASHBOARD>":"sk_omniroute",[{filename:"~/.openclaw/openclaw.json",content:JSON.stringify({agents:{defaults:{model:{primary:`omniroute/${_||"provider/model-id"}`}}},models:{providers:{omniroute:{baseUrl:G(),apiKey:p,api:"openai-completions",models:[{id:_||"provider/model-id",name:(_||"provider/model-id").split("/").pop()}]}}}},null,2)}])})]})}let g=s(41463).env.NEXT_PUBLIC_CLOUD_URL;function y({tool:e,isExpanded:t,onToggle:s,baseUrl:n,hasActiveProviders:i,apiKeys:c,activeProviders:d,cloudEnabled:x}){let[m,p]=(0,l.useState)(null),[u,h]=(0,l.useState)(!1),[y,f]=(0,l.useState)(!1),[b,j]=(0,l.useState)(!1),[N,v]=(0,l.useState)(null),[k,w]=(0,l.useState)(""),[C,S]=(0,l.useState)(""),[_,O]=(0,l.useState)(!1),[A,E]=(0,l.useState)({}),[I,P]=(0,l.useState)(!1),[$,L]=(0,l.useState)(""),R=(0,l.useRef)(!1),[T,M]=(0,l.useState)([]),[U,K]=(0,l.useState)(!1),[F,z]=(0,l.useState)(null),D=!!(m?.installed&&m?.runnable),B=(()=>{if(!D)return null;if(!m.hasOmniRoute)return"not_configured";let e=m.settings?.openAiBaseUrl||"",t=e.includes("localhost")||e.includes("127.0.0.1"),s=x&&g&&e.startsWith(g);return t||s?"configured":"other"})();(0,l.useEffect)(()=>{c?.length>0&&!k&&w(c[0].key)},[c,k]),(0,l.useEffect)(()=>{t&&!m&&(W(),H(),J())},[t,m]),(0,l.useEffect)(()=>{if(m?.settings&&!R.current){let e=m.settings.openAiModelId;e&&(S(e),R.current=!0)}},[m]);let H=async()=>{try{let e=await fetch("/api/models/alias");if(e.ok){let t=await e.json();E(t.aliases||{})}}catch{}},J=async()=>{try{let e=await fetch("/api/cli-tools/backups?toolId=cline");if(e.ok){let t=await e.json();M(t.backups||[])}}catch{}},q=async e=>{z(e);try{let t=await fetch("/api/cli-tools/backups",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({toolId:"cline",backupId:e})});if(t.ok)v({type:"success",text:"Backup restored! Reloading status..."}),await W(),await J();else{let e=await t.json();v({type:"error",text:e.error||"Failed to restore backup"})}}catch(e){v({type:"error",text:e.message})}finally{z(null)}},W=async()=>{h(!0);try{let e=await fetch("/api/cli-tools/cline-settings"),t=await e.json();p(t)}catch(e){p({error:e.message})}finally{h(!1)}},G=async()=>{f(!0),v(null);try{let e=$||n||"http://localhost:20128",t=e.endsWith("/v1")?e:`${e}/v1`,s=await fetch("/api/cli-tools/cline-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:t,apiKey:k||"sk_omniroute",model:C})}),a=await s.json();s.ok?(v({type:"success",text:a.message||"Applied!"}),await W(),await J()):v({type:"error",text:a.error||"Failed"})}catch(e){v({type:"error",text:e.message})}finally{f(!1)}},Z=async()=>{j(!0),v(null);try{let e=await fetch("/api/cli-tools/cline-settings",{method:"DELETE"}),t=await e.json();e.ok?(v({type:"success",text:t.message||"Reset!"}),S(""),R.current=!1,await W(),await J()):v({type:"error",text:t.error||"Failed"})}catch(e){v({type:"error",text:e.message})}finally{j(!1)}};return(0,a.jsxs)(r.Zp,{padding:"sm",className:"overflow-hidden",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:s,children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"size-8 rounded-lg flex items-center justify-center shrink-0",children:e.image?(0,a.jsx)(o.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,a.jsx)("span",{className:"material-symbols-outlined text-xl",style:{color:e.color},children:"terminal"})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("h3",{className:"font-medium text-sm",children:e.name}),(()=>{if(!D)return null;let e={configured:{class:"bg-green-500/10 text-green-600 dark:text-green-400",text:"Connected"},not_configured:{class:"bg-yellow-500/10 text-yellow-600 dark:text-yellow-400",text:"Not configured"},other:{class:"bg-blue-500/10 text-blue-600 dark:text-blue-400",text:"Custom config"}}[B];return e?(0,a.jsx)("span",{className:`px-1.5 py-0.5 text-[10px] font-medium rounded-full ${e.class}`,children:e.text}):null})()]}),(0,a.jsx)("p",{className:"text-xs text-text-muted truncate",children:e.description})]})]}),(0,a.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${t?"rotate-180":""}`,children:"expand_more"})]}),t&&(0,a.jsxs)("div",{className:"mt-6 pt-6 border-t border-border",children:[u&&(0,a.jsxs)("div",{className:"flex items-center gap-2 text-text-muted text-sm",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-base",children:"progress_activity"}),(0,a.jsx)("span",{children:"Checking Cline CLI..."})]}),m&&!u&&(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start gap-3 p-3 rounded-lg border bg-bg-secondary/50 border-border",children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-lg ${D?"text-green-500":"text-yellow-500"}`,children:D?"check_circle":"warning"}),(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:D?"Cline CLI detected and ready":m.installed?"Cline CLI installed but not runnable":"Cline CLI not detected"}),m.commandPath&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Binary:"," ",(0,a.jsx)("code",{className:"px-1 py-0.5 rounded bg-black/5 dark:bg-white/10",children:m.commandPath})]}),m.globalStatePath&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Config:"," ",(0,a.jsx)("code",{className:"px-1 py-0.5 rounded bg-black/5 dark:bg-white/10",children:m.globalStatePath})]})]})]}),D&&(0,a.jsxs)(a.Fragment,{children:["configured"===B&&(0,a.jsxs)("div",{className:"flex items-start gap-3 p-3 bg-green-500/10 border border-green-500/30 rounded-lg",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-green-500 text-lg",children:"check_circle"}),(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)("p",{className:"text-sm text-green-700 dark:text-green-300",children:"OmniRoute is configured as OpenAI-compatible provider"}),(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Provider: ",(0,a.jsx)("strong",{children:"openai"})," • Model:"," ",(0,a.jsx)("strong",{children:m.settings?.openAiModelId||"—"})]})]})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-sm text-text-muted",children:"Model"}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("input",{type:"text",value:C,onChange:e=>S(e.target.value),placeholder:"provider/model-id",className:"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,a.jsx)(r.$n,{variant:"outline",size:"sm",onClick:()=>O(!0),disabled:!i,children:"Select"}),(0,a.jsx)(r.$n,{variant:"ghost",size:"sm",onClick:()=>P(!0),children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"edit"})})]})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-sm text-text-muted",children:"API Key"}),c&&c.length>0?(0,a.jsx)("select",{value:k,onChange:e=>w(e.target.value),className:"px-3 py-2 bg-bg-secondary rounded-lg text-sm border border-border focus:outline-none focus:ring-1 focus:ring-primary/50",children:c.map(e=>(0,a.jsx)("option",{value:e.key,children:e.key},e.id))}):(0,a.jsx)("p",{className:"text-sm text-text-muted",children:x?"No API keys available":"Using default: sk_omniroute"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2 pt-2",children:[(0,a.jsxs)(r.$n,{variant:"primary",size:"sm",onClick:G,disabled:!C,loading:y,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"configured"===B?"Update Config":"Apply Config"]}),"configured"===B&&(0,a.jsxs)(r.$n,{variant:"outline",size:"sm",onClick:Z,loading:b,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restart_alt"}),"Reset"]})]}),N&&(0,a.jsxs)("div",{className:`flex items-center gap-2 px-3 py-2 rounded-lg text-sm ${"success"===N.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"success"===N.type?"check_circle":"error"}),(0,a.jsx)("span",{children:N.text})]}),(0,a.jsxs)("div",{className:"border-t border-border pt-3 mt-1",children:[(0,a.jsxs)("button",{onClick:()=>K(!U),className:"flex items-center gap-2 text-sm text-text-muted hover:text-text transition-colors",children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[16px] transition-transform ${U?"rotate-90":""}`,children:"chevron_right"}),(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"backup"}),"Backups ",T.length>0&&`(${T.length})`]}),U&&T.length>0&&(0,a.jsx)("div",{className:"mt-2 flex flex-col gap-1.5 pl-6",children:T.map(e=>(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2 p-2 rounded bg-bg-secondary/50 text-xs",children:[(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsx)("span",{className:"font-medium",children:e.originalFile}),(0,a.jsx)("span",{className:"text-text-muted",children:new Date(e.createdAt).toLocaleString()})]}),(0,a.jsx)(r.$n,{variant:"ghost",size:"sm",onClick:()=>q(e.id),loading:F===e.id,children:"Restore"})]},e.id))}),U&&0===T.length&&(0,a.jsx)("p",{className:"mt-2 pl-6 text-xs text-text-muted",children:"No backups available."})]})]})]})]}),(0,a.jsx)(r.rq,{isOpen:_,onClose:()=>O(!1),onSelect:e=>{S(e.value),O(!1)},selectedModel:C,activeProviders:d,title:"Select Model for Cline"}),(0,a.jsx)(r.uR,{isOpen:I,onClose:()=>P(!1),onApply:e=>{e.model&&S(e.model),e.apiKey&&w(e.apiKey),e.baseUrl&&L(e.baseUrl),P(!1)},currentConfig:{model:C,apiKey:k,baseUrl:$||n},title:"Cline Manual Configuration"})]})}function f({tool:e,isExpanded:t,onToggle:s,baseUrl:n,hasActiveProviders:i,apiKeys:c,activeProviders:d,cloudEnabled:x}){let[m,p]=(0,l.useState)(null),[u,h]=(0,l.useState)(!1),[g,y]=(0,l.useState)(!1),[f,b]=(0,l.useState)(!1),[j,N]=(0,l.useState)(null),[v,k]=(0,l.useState)(""),[w,C]=(0,l.useState)(""),[S,_]=(0,l.useState)(!1),[O,A]=(0,l.useState)({}),[E,I]=(0,l.useState)(!1),[P,$]=(0,l.useState)(""),L=(0,l.useRef)(!1),[R,T]=(0,l.useState)([]),[M,U]=(0,l.useState)(!1),[K,F]=(0,l.useState)(null),z=!!(m?.installed&&m?.runnable),D=z?m.hasOmniRoute?"configured":"not_configured":null;(0,l.useEffect)(()=>{c?.length>0&&!v&&k(c[0].key)},[c,v]),(0,l.useEffect)(()=>{t&&!m&&(q(),B(),H())},[t,m]);let B=async()=>{try{let e=await fetch("/api/models/alias");if(e.ok){let t=await e.json();A(t.aliases||{})}}catch{}},H=async()=>{try{let e=await fetch("/api/cli-tools/backups?toolId=kilo");if(e.ok){let t=await e.json();T(t.backups||[])}}catch{}},J=async e=>{F(e);try{let t=await fetch("/api/cli-tools/backups",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({toolId:"kilo",backupId:e})});if(t.ok)N({type:"success",text:"Backup restored! Reloading status..."}),await q(),await H();else{let e=await t.json();N({type:"error",text:e.error||"Failed to restore backup"})}}catch(e){N({type:"error",text:e.message})}finally{F(null)}},q=async()=>{h(!0);try{let e=await fetch("/api/cli-tools/kilo-settings"),t=await e.json();p(t)}catch(e){p({error:e.message})}finally{h(!1)}},W=async()=>{y(!0),N(null);try{let e=P||n||"http://localhost:20128",t=e.endsWith("/v1")?e:`${e}/v1`,s=await fetch("/api/cli-tools/kilo-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:t,apiKey:v||"sk_omniroute",model:w})}),a=await s.json();s.ok?(N({type:"success",text:a.message||"Applied!"}),await q(),await H()):N({type:"error",text:a.error||"Failed"})}catch(e){N({type:"error",text:e.message})}finally{y(!1)}},G=async()=>{b(!0),N(null);try{let e=await fetch("/api/cli-tools/kilo-settings",{method:"DELETE"}),t=await e.json();e.ok?(N({type:"success",text:t.message||"Reset!"}),C(""),L.current=!1,await q(),await H()):N({type:"error",text:t.error||"Failed"})}catch(e){N({type:"error",text:e.message})}finally{b(!1)}};return(0,a.jsxs)(r.Zp,{padding:"sm",className:"overflow-hidden",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:s,children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"size-8 rounded-lg flex items-center justify-center shrink-0",children:e.image?(0,a.jsx)(o.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,a.jsx)("span",{className:"material-symbols-outlined text-xl",style:{color:e.color},children:"terminal"})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("h3",{className:"font-medium text-sm",children:e.name}),(()=>{if(!z)return null;let e={configured:{class:"bg-green-500/10 text-green-600 dark:text-green-400",text:"Connected"},not_configured:{class:"bg-yellow-500/10 text-yellow-600 dark:text-yellow-400",text:"Not configured"}}[D];return e?(0,a.jsx)("span",{className:`px-1.5 py-0.5 text-[10px] font-medium rounded-full ${e.class}`,children:e.text}):null})()]}),(0,a.jsx)("p",{className:"text-xs text-text-muted truncate",children:e.description})]})]}),(0,a.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${t?"rotate-180":""}`,children:"expand_more"})]}),t&&(0,a.jsxs)("div",{className:"mt-6 pt-6 border-t border-border",children:[u&&(0,a.jsxs)("div",{className:"flex items-center gap-2 text-text-muted text-sm",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-base",children:"progress_activity"}),(0,a.jsx)("span",{children:"Checking Kilo Code CLI..."})]}),m&&!u&&(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start gap-3 p-3 rounded-lg border bg-bg-secondary/50 border-border",children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-lg ${z?"text-green-500":"text-yellow-500"}`,children:z?"check_circle":"warning"}),(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:z?"Kilo Code CLI detected and ready":m.installed?"Kilo Code CLI installed but not runnable":"Kilo Code CLI not detected"}),m.commandPath&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Binary:"," ",(0,a.jsx)("code",{className:"px-1 py-0.5 rounded bg-black/5 dark:bg-white/10",children:m.commandPath})]}),m.authPath&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Auth:"," ",(0,a.jsx)("code",{className:"px-1 py-0.5 rounded bg-black/5 dark:bg-white/10",children:m.authPath})]})]})]}),z&&(0,a.jsxs)(a.Fragment,{children:["configured"===D&&(0,a.jsxs)("div",{className:"flex items-start gap-3 p-3 bg-green-500/10 border border-green-500/30 rounded-lg",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-green-500 text-lg",children:"check_circle"}),(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)("p",{className:"text-sm text-green-700 dark:text-green-300",children:"OmniRoute is configured as OpenAI-compatible provider"}),(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Providers: ",(0,a.jsx)("strong",{children:m.settings?.auth?.join(", ")||"—"})]})]})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-sm text-text-muted",children:"Model"}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("input",{type:"text",value:w,onChange:e=>C(e.target.value),placeholder:"provider/model-id",className:"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,a.jsx)(r.$n,{variant:"outline",size:"sm",onClick:()=>_(!0),disabled:!i,children:"Select"}),(0,a.jsx)(r.$n,{variant:"ghost",size:"sm",onClick:()=>I(!0),children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"edit"})})]})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-sm text-text-muted",children:"API Key"}),c&&c.length>0?(0,a.jsx)("select",{value:v,onChange:e=>k(e.target.value),className:"px-3 py-2 bg-bg-secondary rounded-lg text-sm border border-border focus:outline-none focus:ring-1 focus:ring-primary/50",children:c.map(e=>(0,a.jsx)("option",{value:e.key,children:e.key},e.id))}):(0,a.jsx)("p",{className:"text-sm text-text-muted",children:x?"No API keys available":"Using default: sk_omniroute"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2 pt-2",children:[(0,a.jsxs)(r.$n,{variant:"primary",size:"sm",onClick:W,disabled:!w,loading:g,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"configured"===D?"Update Config":"Apply Config"]}),"configured"===D&&(0,a.jsxs)(r.$n,{variant:"outline",size:"sm",onClick:G,loading:f,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restart_alt"}),"Reset"]})]}),j&&(0,a.jsxs)("div",{className:`flex items-center gap-2 px-3 py-2 rounded-lg text-sm ${"success"===j.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"success"===j.type?"check_circle":"error"}),(0,a.jsx)("span",{children:j.text})]}),(0,a.jsxs)("div",{className:"border-t border-border pt-3 mt-1",children:[(0,a.jsxs)("button",{onClick:()=>U(!M),className:"flex items-center gap-2 text-sm text-text-muted hover:text-text transition-colors",children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[16px] transition-transform ${M?"rotate-90":""}`,children:"chevron_right"}),(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"backup"}),"Backups ",R.length>0&&`(${R.length})`]}),M&&R.length>0&&(0,a.jsx)("div",{className:"mt-2 flex flex-col gap-1.5 pl-6",children:R.map(e=>(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2 p-2 rounded bg-bg-secondary/50 text-xs",children:[(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsx)("span",{className:"font-medium",children:e.originalFile}),(0,a.jsx)("span",{className:"text-text-muted",children:new Date(e.createdAt).toLocaleString()})]}),(0,a.jsx)(r.$n,{variant:"ghost",size:"sm",onClick:()=>J(e.id),loading:K===e.id,children:"Restore"})]},e.id))}),M&&0===R.length&&(0,a.jsx)("p",{className:"mt-2 pl-6 text-xs text-text-muted",children:"No backups available."})]})]})]})]}),(0,a.jsx)(r.rq,{isOpen:S,onClose:()=>_(!1),onSelect:e=>{C(e.value),_(!1)},selectedModel:w,activeProviders:d,title:"Select Model for Kilo Code"}),(0,a.jsx)(r.uR,{isOpen:E,onClose:()=>I(!1),onApply:e=>{e.model&&C(e.model),e.apiKey&&k(e.apiKey),e.baseUrl&&$(e.baseUrl),I(!1)},currentConfig:{model:w,apiKey:v,baseUrl:P||n},title:"Kilo Code Manual Configuration"})]})}function b({toolId:e,tool:t,isExpanded:s,onToggle:n,baseUrl:i,apiKeys:c,activeProviders:d=[],cloudEnabled:x=!1}){let[m,p]=(0,l.useState)(null),[u,h]=(0,l.useState)(!1),[g,y]=(0,l.useState)(""),[f,b]=(0,l.useState)(null),[j,N]=(0,l.useState)(null),[v,k]=(0,l.useState)(!1),w=(0,l.useRef)(!1),[C,S]=(0,l.useState)(()=>c?.length>0?c[0].key:"");(0,l.useEffect)(()=>{let t=localStorage.getItem(`omniroute-cli-model-${e}`);t&&y(t);let s=localStorage.getItem(`omniroute-cli-key-${e}`);s&&c?.some(e=>e.key===s)&&S(s)},[e,c]);let _=(0,l.useCallback)(t=>{y(t),t?localStorage.setItem(`omniroute-cli-model-${e}`,t):localStorage.removeItem(`omniroute-cli-model-${e}`)},[e]),O=(0,l.useCallback)(t=>{S(t),t&&localStorage.setItem(`omniroute-cli-key-${e}`,t)},[e]);(0,l.useEffect)(()=>{!s||f||w.current||(w.current=!0,fetch(`/api/cli-tools/runtime/${e}`).then(e=>e.json()).then(e=>b(e)).catch(e=>b({error:e?.message||"runtime_check_failed"})))},[s,f,e]);let A=e=>{let t=C&&C.trim()?C:x?"your-api-key":"sk_omniroute",s=i||"http://localhost:20128",a=s.endsWith("/v1")?s:`${s}/v1`;return e.replace(/\{\{baseUrl\}\}/g,a).replace(/\{\{apiKey\}\}/g,t).replace(/\{\{model\}\}/g,g||"provider/model-id")},E=async(e,t)=>{await navigator.clipboard.writeText(A(e)),p(t),setTimeout(()=>p(null),2e3)},I=d.length>0,P=s&&null===f,$=async()=>{k(!0),N(null);try{let t=C&&C.trim()?C:x?"":"sk_omniroute",s=i||"http://localhost:20128",a=s.endsWith("/v1")?s:`${s}/v1`,l=await fetch(`/api/cli-tools/guide-settings/${e}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:a,apiKey:t,model:g})}),r=await l.json();l.ok?N({type:"success",text:r.message||"Configuration saved!"}):N({type:"error",text:r.error||"Failed to save"})}catch(e){N({type:"error",text:e.message})}finally{k(!1)}},L=["continue"].includes(e),R=()=>!t.requiresCloud||!!x;return(0,a.jsxs)(r.Zp,{padding:"sm",className:"overflow-hidden",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:n,children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"size-8 rounded-lg flex items-center justify-center shrink-0",children:t.image?(0,a.jsx)(o.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,a.jsx)("span",{className:"material-symbols-outlined text-xl",style:{color:t.color},children:t.icon}):(0,a.jsx)(o.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,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("h3",{className:"font-medium text-sm",children:t.name}),f&&!f.error&&(0,a.jsx)("span",{className:`px-1.5 py-0.5 text-[10px] font-medium rounded-full ${"not_required"===f.reason?"bg-blue-500/10 text-blue-600 dark:text-blue-400":f.installed&&f.runnable?"bg-green-500/10 text-green-600 dark:text-green-400":"bg-yellow-500/10 text-yellow-600 dark:text-yellow-400"}`,children:"not_required"===f.reason?"Guide":f.installed&&f.runnable?"Detected":"Not ready"})]}),(0,a.jsx)("p",{className:"text-xs text-text-muted truncate",children:t.description})]})]}),(0,a.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${s?"rotate-180":""}`,children:"expand_more"})]}),s&&(0,a.jsx)("div",{className:"mt-6 pt-6 border-t border-border",children:t.guideSteps?(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[P&&(0,a.jsxs)("div",{className:"flex items-center gap-2 text-text-muted text-sm",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-base",children:"progress_activity"}),(0,a.jsx)("span",{children:"Checking runtime..."})]}),!P&&f&&!f.error&&(0,a.jsxs)("div",{className:"flex items-start gap-3 p-3 bg-blue-500/10 border border-blue-500/30 rounded-lg",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-blue-500 text-lg",children:"not_required"===f.reason?"info":f.installed&&f.runnable?"check_circle":"warning"}),(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)("p",{className:"text-sm text-blue-700 dark:text-blue-300",children:"not_required"===f.reason?"Guide-only integration: no local binary required":f.installed&&f.runnable?"CLI runtime detected and healthy":f.installed?`CLI found but not runnable${f.reason?` (${f.reason})`:""}`:"CLI runtime not detected"}),f.commandPath&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Binary:"," ",(0,a.jsx)("code",{className:"px-1 py-0.5 rounded bg-black/5 dark:bg-white/10",children:f.commandPath})]}),f.configPath&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Config path:"," ",(0,a.jsx)("code",{className:"px-1 py-0.5 rounded bg-black/5 dark:bg-white/10",children:f.configPath})]})]})]}),!P&&f?.error&&(0,a.jsxs)("div",{className:"flex items-start gap-3 p-3 bg-red-500/10 border border-red-500/30 rounded-lg",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-red-500 text-lg",children:"error"}),(0,a.jsx)("p",{className:"text-sm text-red-600 dark:text-red-400",children:"Failed to check runtime status."})]}),t.notes&&0!==t.notes.length?(0,a.jsx)("div",{className:"flex flex-col gap-2 mb-4",children:t.notes.map((e,t)=>{if("cloudCheck"===e.type&&x)return null;let s="warning"===e.type,l="cloudCheck"===e.type&&!x,r="bg-blue-500/10 border-blue-500/30",n="text-blue-600 dark:text-blue-400",i="text-blue-500",o="info";return s?(r="bg-yellow-500/10 border-yellow-500/30",n="text-yellow-600 dark:text-yellow-400",i="text-yellow-500",o="warning"):l&&(r="bg-red-500/10 border-red-500/30",n="text-red-600 dark:text-red-400",i="text-red-500",o="error"),(0,a.jsxs)("div",{className:`flex items-start gap-3 p-3 rounded-lg border ${r}`,children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-lg ${i}`,children:o}),(0,a.jsx)("p",{className:`text-sm ${n}`,children:e.text})]},t)})}):null,R()&&t.guideSteps.map(e=>(0,a.jsxs)("div",{className:"flex items-start gap-4",children:[(0,a.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,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-text",children:e.title}),e.desc&&(0,a.jsx)("p",{className:"text-sm text-text-muted mt-0.5",children:e.desc}),"apiKeySelector"===e.type&&(0,a.jsx)("div",{className:"mt-2 flex items-center gap-2",children:c&&c.length>0?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("select",{value:C,onChange:e=>O(e.target.value),className:"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",children:c.map(e=>(0,a.jsx)("option",{value:e.key,children:e.key},e.id))}),(0,a.jsx)("button",{onClick:()=>E(C,"apiKey"),className:"shrink-0 px-3 py-2 bg-bg-secondary hover:bg-bg-tertiary rounded-lg border border-border transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-lg",children:"apiKey"===m?"check":"content_copy"})})]}):(0,a.jsx)("span",{className:"text-sm text-text-muted",children:x?"No API keys - Create one in Keys page":"sk_omniroute"})}),"modelSelector"===e.type&&(0,a.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[(0,a.jsx)("input",{type:"text",value:g,onChange:e=>_(e.target.value),placeholder:"provider/model-id",className:"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,a.jsx)("button",{onClick:()=>h(!0),disabled:!I,className:`shrink-0 px-3 py-2 rounded-lg border text-sm transition-colors ${I?"bg-bg-secondary border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select Model"}),g&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("button",{onClick:()=>E(g,"model"),className:"shrink-0 px-3 py-2 bg-bg-secondary hover:bg-bg-tertiary rounded-lg border border-border transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-lg",children:"model"===m?"check":"content_copy"})}),(0,a.jsx)("button",{onClick:()=>_(""),className:"p-2 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-lg",children:"close"})})]})]}),e.value&&(0,a.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[(0,a.jsx)("code",{className:"flex-1 px-3 py-2 bg-bg-secondary rounded-lg text-sm font-mono border border-border truncate",children:A(e.value)}),e.copyable&&(0,a.jsx)("button",{onClick:()=>E(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,a.jsx)("span",{className:"material-symbols-outlined text-lg",children:m===`${e.step}-${e.title}`?"check":"content_copy"})})]})]})]},e.step)),R()&&t.codeBlock&&(0,a.jsxs)("div",{className:"mt-2",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted uppercase tracking-wide",children:t.codeBlock.language}),(0,a.jsxs)("button",{onClick:()=>E(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,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"codeblock"===m?"check":"content_copy"}),"codeblock"===m?"Copied!":"Copy"]})]}),(0,a.jsx)("pre",{className:"p-4 bg-bg-secondary rounded-lg border border-border overflow-x-auto",children:(0,a.jsx)("code",{className:"text-sm font-mono whitespace-pre",children:A(t.codeBlock.code)})})]}),R()&&(0,a.jsxs)("div",{className:"mt-2",children:[j&&(0,a.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs mb-2 ${"success"===j.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===j.type?"check_circle":"error"}),(0,a.jsx)("span",{children:j.text})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[L&&(0,a.jsxs)(r.$n,{variant:"primary",size:"sm",onClick:$,disabled:!g,loading:v,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Save Config"]}),t.codeBlock&&(0,a.jsxs)(r.$n,{variant:L?"outline":"primary",size:"sm",onClick:()=>E(t.codeBlock.code,"codeblock"),children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"codeblock"===m?"check":"content_copy"}),"codeblock"===m?"Copied!":"Copy Config"]}),g&&(0,a.jsxs)("span",{className:"text-xs text-text-muted flex items-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-green-500",children:"check_circle"}),"Selection saved"]})]})]})]}):(0,a.jsx)("p",{className:"text-text-muted text-sm",children:"Coming soon..."})}),(0,a.jsx)(r.rq,{isOpen:u,onClose:()=>h(!1),onSelect:e=>{_(e.value)},selectedModel:g,activeProviders:d,title:"Select Model"})]})}function j({tool:e,isExpanded:t,onToggle:s,baseUrl:n,apiKeys:i,activeProviders:c,hasActiveProviders:d,cloudEnabled:x}){let[m,p]=(0,l.useState)(null),[u,h]=(0,l.useState)(!1),[g,y]=(0,l.useState)(!1),[f,b]=(0,l.useState)(""),[j,N]=(0,l.useState)(""),[v,k]=(0,l.useState)(null),[w,C]=(0,l.useState)({}),[S,_]=(0,l.useState)(!1),[O,A]=(0,l.useState)(null);(0,l.useEffect)(()=>{i?.length>0&&!j&&N(i[0].key)},[i,j]),(0,l.useEffect)(()=>{t&&!m&&(I(),E())},[t,m]);let E=async()=>{try{let e=await fetch("/api/cli-tools/antigravity-mitm/alias?tool=antigravity");if(e.ok){let t=(await e.json()).aliases||{};Object.keys(t).length>0&&C(t)}}catch(e){console.log("Error loading saved mappings:",e)}},I=async()=>{try{let e=await fetch("/api/cli-tools/antigravity-mitm");if(e.ok){let t=await e.json();p(t)}}catch(e){console.log("Error fetching status:",e),p({running:!1})}},P="u">typeof navigator&&navigator.userAgent?.includes("Windows"),$=async e=>{h(!0),k(null);try{let t=j?.trim()||(i?.length>0?i[0].key:null)||(x?null:"sk_omniroute"),s=await fetch("/api/cli-tools/antigravity-mitm",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiKey:t,sudoPassword:e})}),a=await s.json();s.ok?(k({type:"success",text:"MITM started"}),y(!1),b(""),I()):k({type:"error",text:a.error||"Failed to start"})}catch(e){k({type:"error",text:e.message})}finally{h(!1)}},L=async e=>{h(!0),k(null);try{let t=await fetch("/api/cli-tools/antigravity-mitm",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({sudoPassword:e})}),s=await t.json();t.ok?(k({type:"success",text:"MITM stopped"}),y(!1),b(""),I()):k({type:"error",text:s.error||"Failed to stop"})}catch(e){k({type:"error",text:e.message})}finally{h(!1)}},R=()=>{f.trim()?m?.running?L(f):$(f):k({type:"error",text:"Sudo password is required"})},T=(e,t)=>{C(s=>({...s,[e]:t}))},M=async()=>{h(!0),k(null);try{let e=await fetch("/api/cli-tools/antigravity-mitm/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({tool:"antigravity",mappings:w})});if(!e.ok){let t=await e.json();throw Error(t.error||"Failed to save mappings")}k({type:"success",text:"Mappings saved!"})}catch(e){k({type:"error",text:e.message})}finally{h(!1)}},U=m?.running;return(0,a.jsxs)(r.Zp,{padding:"sm",className:"overflow-hidden",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:s,children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,a.jsx)(o.default,{src:"/providers/antigravity.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,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("h3",{className:"font-medium text-sm",children:e.name}),U?(0,a.jsx)(r.Ex,{variant:"success",size:"sm",children:"Active"}):(0,a.jsx)(r.Ex,{variant:"default",size:"sm",children:"Inactive"})]}),(0,a.jsx)("p",{className:"text-xs text-text-muted truncate",children:e.description})]})]}),(0,a.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${t?"rotate-180":""}`,children:"expand_more"})]}),t&&(0,a.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[(0,a.jsx)("div",{className:"flex items-center gap-2",children:U?(0,a.jsxs)("button",{onClick:()=>{P||m?.hasCachedPassword?L(""):(y(!0),k(null))},disabled:u,className:"px-4 py-2 rounded-lg bg-red-500/10 border border-red-500/30 text-red-500 font-medium text-sm flex items-center gap-2 hover:bg-red-500/20 transition-colors disabled:opacity-50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"stop_circle"}),"Stop MITM"]}):(0,a.jsxs)("button",{onClick:()=>{P||m?.hasCachedPassword?$(""):(y(!0),k(null))},disabled:u||!d,className:"px-4 py-2 rounded-lg bg-primary/10 border border-primary/30 text-primary font-medium text-sm flex items-center gap-2 hover:bg-primary/20 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"play_circle"}),"Start MITM"]})}),v?.type==="error"&&(0,a.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1.5 rounded text-xs bg-red-500/10 text-red-600",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"error"}),(0,a.jsx)("span",{children:v.text})]}),U&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"API Key"}),(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),i.length>0?(0,a.jsx)("select",{value:j,onChange:e=>N(e.target.value),className:"flex-1 px-2 py-1.5 bg-surface rounded text-xs border border-border focus:outline-none focus:ring-1 focus:ring-primary/50",children:i.map(e=>(0,a.jsx)("option",{value:e.key,children:e.key},e.id))}):(0,a.jsx)("span",{className:"flex-1 text-xs text-text-muted px-2 py-1.5",children:x?"No API keys - Create one in Keys page":"sk_omniroute (default)"})]}),e.defaultModels.map(e=>(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:e.name}),(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,a.jsx)("input",{type:"text",value:w[e.alias]||"",onChange:t=>T(e.alias,t.target.value),placeholder:"provider/model-id",className:"flex-1 px-2 py-1.5 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"}),(0,a.jsx)("button",{onClick:()=>{A(e.alias),_(!0)},disabled:!d,className:`px-2 py-1.5 rounded border text-xs transition-colors shrink-0 whitespace-nowrap ${d?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select"}),w[e.alias]&&(0,a.jsx)("button",{onClick:()=>T(e.alias,""),className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]},e.alias)),(0,a.jsx)("div",{className:"flex items-center gap-2",children:(0,a.jsxs)(r.$n,{variant:"primary",size:"sm",onClick:M,disabled:u||0===Object.keys(w).length,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Save Mappings"]})})]}),!U&&(0,a.jsxs)("div",{className:"flex flex-col gap-1.5 px-1",children:[(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:[(0,a.jsx)("span",{className:"font-medium text-text-main",children:"How it works:"})," Intercepts Antigravity traffic via DNS redirect, letting you reroute models through OmniRoute."]}),(0,a.jsxs)("div",{className:"flex flex-col gap-0.5 text-[11px] text-text-muted",children:[(0,a.jsx)("span",{children:"1. Generates SSL cert & adds to system keychain"}),(0,a.jsxs)("span",{children:["2. Redirects"," ",(0,a.jsx)("code",{className:"text-[10px] bg-surface px-1 rounded",children:"daily-cloudcode-pa.googleapis.com"})," ","→ localhost"]}),(0,a.jsx)("span",{children:"3. Maps Antigravity models to any provider via OmniRoute"})]})]})]}),(0,a.jsx)(r.aF,{isOpen:g,onClose:()=>{y(!1),b(""),k(null)},title:"Sudo Password Required",size:"sm",children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start gap-3 p-3 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-yellow-500 text-[20px]",children:"warning"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Required for SSL certificate and DNS configuration"})]}),(0,a.jsx)(r.pd,{type:"password",placeholder:"Enter sudo password",value:f,onChange:e=>b(e.target.value),onKeyDown:e=>{"Enter"!==e.key||u||R()}}),v&&(0,a.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===v.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===v.type?"check_circle":"error"}),(0,a.jsx)("span",{children:v.text})]}),(0,a.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[(0,a.jsx)(r.$n,{variant:"ghost",size:"sm",onClick:()=>{y(!1),b(""),k(null)},disabled:u,children:"Cancel"}),(0,a.jsx)(r.$n,{variant:"primary",size:"sm",onClick:R,loading:u,children:"Confirm"})]})]})}),(0,a.jsx)(r.rq,{isOpen:S,onClose:()=>_(!1),onSelect:e=>{O&&C(t=>({...t,[O]:e.value}))},selectedModel:O?w[O]:null,activeProviders:c,title:`Select model for ${O}`})]})}s(41463).env.NEXT_PUBLIC_CLOUD_URL;let N=s(41463).env.NEXT_PUBLIC_CLOUD_URL;function v({machineId:e}){let t,s,o,[c,m]=(0,l.useState)([]),[u,g]=(0,l.useState)(!0),[v,k]=(0,l.useState)(null),[w,C]=(0,l.useState)({}),[S,_]=(0,l.useState)(!1),[O,A]=(0,l.useState)([]);(0,l.useEffect)(()=>{P(),E(),I()},[]);let E=async()=>{try{let e=await fetch("/api/settings");if(e.ok){let t=await e.json();_(t.cloudEnabled||!1)}}catch(e){console.log("Error loading cloud settings:",e)}},I=async()=>{try{let e=await fetch("/api/keys");if(e.ok){let t=await e.json();A(t.keys||[])}}catch(e){console.log("Error fetching API keys:",e)}},P=async()=>{try{let e=await fetch("/api/providers"),t=await e.json();e.ok&&m(t.connections||[])}catch(e){console.log("Error fetching connections:",e)}finally{g(!1)}},$=()=>c.filter(e=>!1!==e.isActive),L=(0,l.useCallback)((e,t,s)=>{C(a=>a[e]?.[t]===s?a:{...a,[e]:{...a[e],[t]:s}})},[]);if(u)return(0,a.jsx)("div",{className:"flex flex-col gap-6",children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)(r.Qv,{}),(0,a.jsx)(r.Qv,{}),(0,a.jsx)(r.Qv,{})]})});let R=(t=$(),s=[],o=new Set,t.forEach(e=>{let t=i.Xg[e.provider]||e.provider;(0,i.KC)(e.provider).forEach(a=>{let l=`${t}/${a.id}`;o.has(l)||(o.add(l),s.push({value:l,label:`${t}/${a.id}`,provider:e.provider,alias:t,connectionName:e.name,modelId:a.id}))})}),s).length>0;return(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[!R&&(0,a.jsx)(r.Zp,{className:"border-yellow-500/50 bg-yellow-500/5",children:(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:"No active providers"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Please add and connect providers first to configure CLI tools."})]})]})}),(0,a.jsx)("div",{className:"flex flex-col gap-4",children:Object.entries(n).map(([e,t])=>((e,t)=>{let s={tool:t,isExpanded:v===e,onToggle:()=>k(v===e?null:e),baseUrl:S&&N?N:window.location.origin,apiKeys:O};switch(e){case"claude":return(0,a.jsx)(d,{...s,activeProviders:$(),modelMappings:w[e]||{},onModelMappingChange:(t,s)=>L(e,t,s),hasActiveProviders:R,cloudEnabled:S},e);case"codex":return(0,a.jsx)(x,{...s,activeProviders:$(),cloudEnabled:S},e);case"droid":return(0,a.jsx)(p,{...s,activeProviders:$(),hasActiveProviders:R,cloudEnabled:S},e);case"openclaw":return(0,a.jsx)(h,{...s,activeProviders:$(),hasActiveProviders:R,cloudEnabled:S},e);case"antigravity":return(0,a.jsx)(j,{...s,activeProviders:$(),hasActiveProviders:R,cloudEnabled:S},e);case"cline":return(0,a.jsx)(y,{...s,activeProviders:$(),hasActiveProviders:R,cloudEnabled:S},e);case"kilo":return(0,a.jsx)(f,{...s,activeProviders:$(),hasActiveProviders:R,cloudEnabled:S},e);default:return(0,a.jsx)(b,{toolId:e,...s,activeProviders:$(),cloudEnabled:S},e)}})(e,t))})]})}},46556:(e,t,s)=>{Promise.resolve().then(s.bind(s,9958))}},e=>{e.O(0,[8500,600,8013,7896,1525,8441,3794,7358],()=>e(e.s=46556)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3649],{11313:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>c});var a=s(95155),r=s(12115),l=s(71525),i=s(26853),o=s(45567);let n=/^[a-zA-Z0-9_/.-]+$/;function d(e){return"string"==typeof e?{model:e,weight:0}:{model:e.model,weight:e.weight||0}}function c(){let[e,t]=(0,r.useState)([]),[s,n]=(0,r.useState)(!0),[d,c]=(0,r.useState)(!1),[p,h]=(0,r.useState)(null),[b,g]=(0,r.useState)([]),[f,y]=(0,r.useState)({}),[j,v]=(0,r.useState)(null),[N,k]=(0,r.useState)(null),{copied:w,copy:C}=(0,i.C)(),S=(0,o.i)(),[$,M]=(0,r.useState)(null),[T,_]=(0,r.useState)(null);(0,r.useEffect)(()=>{E(),fetch("/api/settings/proxy").then(e=>e.ok?e.json():null).then(e=>_(e)).catch(()=>{})},[]);let E=async()=>{try{let[e,s,a]=await Promise.all([fetch("/api/combos"),fetch("/api/providers"),fetch("/api/combos/metrics")]),r=await e.json(),l=await s.json(),i=await a.json();if(e.ok&&t(r.combos||[]),s.ok){let e=(l.connections||[]).filter(e=>"active"===e.testStatus||"success"===e.testStatus);g(e)}a.ok&&y(i.metrics||{})}catch(e){console.log("Error fetching data:",e)}finally{n(!1)}},P=async e=>{try{let t=await fetch("/api/combos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(t.ok)await E(),c(!1),S.success("Combo created successfully");else{let e=await t.json();S.error(e.error?.message||e.error||"Failed to create combo")}}catch(e){S.error("Error creating combo")}},D=async(e,t)=>{try{let s=await fetch(`/api/combos/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(s.ok)await E(),h(null),S.success("Combo updated successfully");else{let e=await s.json();S.error(e.error?.message||e.error||"Failed to update combo")}}catch(e){S.error("Error updating combo")}},O=async s=>{if(confirm("Delete this combo?"))try{(await fetch(`/api/combos/${s}`,{method:"DELETE"})).ok&&(t(e.filter(e=>e.id!==s)),S.success("Combo deleted"))}catch(e){S.error("Error deleting combo")}},R=async t=>{let s=t.name.replace(/-copy(-\d+)?$/,""),a=e.map(e=>e.name),r=`${s}-copy`,l=1;for(;a.includes(r);)l++,r=`${s}-copy-${l}`;let i={name:r,models:t.models,strategy:t.strategy||"priority",config:t.config||{}};await P(i)},q=async e=>{k(e.name),v(null);try{let t=await fetch("/api/combos/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboName:e.name})}),s=await t.json();v(s)}catch(e){v({error:"Test request failed"}),S.error("Test request failed")}};return s?(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsx)(l.Qv,{}),(0,a.jsx)(l.Qv,{})]}):(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"text-2xl font-semibold",children:"Combos"}),(0,a.jsx)("p",{className:"text-sm text-text-muted mt-1",children:"Create model combos with weighted routing and fallback support"})]}),(0,a.jsx)(l.$n,{icon:"add",onClick:()=>c(!0),children:"Create Combo"})]}),0===e.length?(0,a.jsx)(l.pp,{icon:"\uD83E\uDDE9",title:"No combos yet",description:"Create model combos with weighted routing and fallback support",actionLabel:"Create Combo",onAction:()=>c(!0)}):(0,a.jsx)("div",{className:"flex flex-col gap-4",children:e.map(e=>(0,a.jsx)(m,{combo:e,metrics:f[e.name],copied:w,onCopy:C,onEdit:()=>h(e),onDelete:()=>O(e.id),onDuplicate:()=>R(e),onTest:()=>q(e),testing:N===e.name,onProxy:()=>M(e),hasProxy:!!T?.combos?.[e.id]},e.id))}),j&&(0,a.jsx)(l.aF,{isOpen:!!j,onClose:()=>{v(null),k(null)},title:`Test Results — ${N}`,children:(0,a.jsx)(x,{results:j})}),(0,a.jsx)(u,{isOpen:d,onClose:()=>c(!1),onSave:P,activeProviders:b},"create"),(0,a.jsx)(u,{isOpen:!!p,combo:p,onClose:()=>h(null),onSave:e=>D(p.id,e),activeProviders:b},p?.id||"new"),$&&(0,a.jsx)(l.KN,{isOpen:!!$,onClose:()=>M(null),level:"combo",levelId:$.id,levelLabel:$.name})]})}function m({combo:e,metrics:t,copied:s,onCopy:r,onEdit:i,onDelete:o,onDuplicate:n,onTest:c,testing:m,onProxy:x,hasProxy:u}){let p=e.strategy||"priority",h=e.models||[];return(0,a.jsx)(l.Zp,{padding:"sm",className:"group",children:(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[(0,a.jsx)("div",{className:"size-8 rounded-lg bg-primary/10 flex items-center justify-center shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-primary text-[18px]",children:"layers"})}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("code",{className:"text-sm font-medium font-mono truncate",children:e.name}),(0,a.jsx)("span",{className:`text-[9px] uppercase font-semibold px-1.5 py-0.5 rounded-full ${"weighted"===p?"bg-amber-500/15 text-amber-600 dark:text-amber-400":"round-robin"===p?"bg-emerald-500/15 text-emerald-600 dark:text-emerald-400":"bg-blue-500/15 text-blue-600 dark:text-blue-400"}`,children:p}),u&&(0,a.jsxs)("span",{className:"text-[9px] uppercase font-semibold px-1.5 py-0.5 rounded-full bg-primary/15 text-primary flex items-center gap-0.5",title:"Proxy configured",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[11px]",children:"vpn_lock"}),"proxy"]}),(0,a.jsx)("button",{onClick:t=>{t.stopPropagation(),r(e.name,`combo-${e.id}`)},className:"p-0.5 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary transition-colors opacity-0 group-hover:opacity-100",title:"Copy combo name",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:s===`combo-${e.id}`?"check":"content_copy"})})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1 mt-0.5 flex-wrap",children:[0===h.length?(0,a.jsx)("span",{className:"text-xs text-text-muted italic",children:"No models"}):h.slice(0,3).map((e,t)=>{let{model:s,weight:r}=d(e);return(0,a.jsxs)("code",{className:"text-[10px] font-mono bg-black/5 dark:bg-white/5 px-1.5 py-0.5 rounded text-text-muted",children:[s,"weighted"===p&&r>0?` (${r}%)`:""]},t)}),h.length>3&&(0,a.jsxs)("span",{className:"text-[10px] text-text-muted",children:["+",h.length-3," more"]})]}),t&&(0,a.jsxs)("div",{className:"flex items-center gap-3 mt-1",children:[(0,a.jsxs)("span",{className:"text-[10px] text-text-muted",children:[(0,a.jsx)("span",{className:"text-emerald-500",children:t.totalSuccesses}),"/",t.totalRequests," reqs"]}),(0,a.jsxs)("span",{className:"text-[10px] text-text-muted",children:[t.successRate,"% success"]}),(0,a.jsxs)("span",{className:"text-[10px] text-text-muted",children:["~",t.avgLatencyMs,"ms"]}),t.fallbackRate>0&&(0,a.jsxs)("span",{className:"text-[10px] text-amber-500",children:[t.fallbackRate,"% fallback"]})]})]})]}),(0,a.jsxs)("div",{className:"flex gap-0.5 opacity-0 group-hover:opacity-100 transition-opacity shrink-0",children:[(0,a.jsx)("button",{onClick:c,disabled:m,className:"p-1.5 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-emerald-500 transition-colors",title:"Test combo",children:(0,a.jsx)("span",{className:`material-symbols-outlined text-[16px] ${m?"animate-spin":""}`,children:m?"progress_activity":"play_arrow"})}),(0,a.jsx)("button",{onClick:n,className:"p-1.5 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary transition-colors",title:"Duplicate",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"content_copy"})}),(0,a.jsx)("button",{onClick:x,className:"p-1.5 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary transition-colors",title:"Proxy configuration",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"vpn_lock"})}),(0,a.jsx)("button",{onClick:i,className:"p-1.5 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary transition-colors",title:"Edit",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"edit"})}),(0,a.jsx)("button",{onClick:o,className:"p-1.5 hover:bg-red-500/10 rounded text-red-500 transition-colors",title:"Delete",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"delete"})})]})]})})}function x({results:e}){return e.error?(0,a.jsxs)("div",{className:"flex items-center gap-2 text-red-500 text-sm",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"error"}),"string"==typeof e.error?e.error:JSON.stringify(e.error)]}):(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[e.resolvedBy&&(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-emerald-500 text-[18px]",children:"check_circle"}),(0,a.jsxs)("span",{children:["Resolved by:"," ",(0,a.jsx)("code",{className:"text-xs bg-emerald-500/10 text-emerald-600 dark:text-emerald-400 px-1.5 py-0.5 rounded",children:e.resolvedBy})]})]}),e.results?.map((e,t)=>(0,a.jsxs)("div",{className:"flex items-center gap-2 text-xs px-2 py-1.5 rounded bg-black/[0.02] dark:bg-white/[0.02]",children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[14px] ${"ok"===e.status?"text-emerald-500":"skipped"===e.status?"text-text-muted":"text-red-500"}`,children:"ok"===e.status?"check_circle":"skipped"===e.status?"skip_next":"error"}),(0,a.jsx)("code",{className:"font-mono flex-1",children:e.model}),void 0!==e.latencyMs&&(0,a.jsxs)("span",{className:"text-text-muted",children:[e.latencyMs,"ms"]}),(0,a.jsx)("span",{className:`text-[10px] uppercase font-medium ${"ok"===e.status?"text-emerald-500":"skipped"===e.status?"text-text-muted":"text-red-500"}`,children:e.status})]},t))]})}function u({isOpen:e,combo:t,onClose:s,onSave:i,activeProviders:o}){let[c,m]=(0,r.useState)(t?.name||""),[x,u]=(0,r.useState)(()=>(t?.models||[]).map(e=>d(e))),[h,b]=(0,r.useState)(t?.strategy||"priority"),[g,f]=(0,r.useState)(!1),[y,j]=(0,r.useState)(!1),[v,N]=(0,r.useState)(""),[k,w]=(0,r.useState)({}),[C,S]=(0,r.useState)([]),[$,M]=(0,r.useState)(!1),[T,_]=(0,r.useState)(t?.config||{}),[E,P]=(0,r.useState)(null),[D,O]=(0,r.useState)(null),R=async()=>{try{let[e,t]=await Promise.all([fetch("/api/models/alias"),fetch("/api/provider-nodes")]);if(!e.ok||!t.ok)throw Error(`Failed to fetch data: aliases=${e.status}, nodes=${t.status}`);let[s,a]=await Promise.all([e.json(),t.json()]);w(s.aliases||{}),S(a.nodes||[])}catch(e){console.error("Error fetching modal data:",e)}};(0,r.useEffect)(()=>{e&&R()},[e]);let q=e=>e.trim()?n.test(e)?(N(""),!0):(N("Only letters, numbers, -, _, / and . allowed"),!1):(N("Name is required"),!1),A=(0,r.useCallback)(e=>{let t=e.split("/");if(2!==t.length)return e;let[s,a]=t,r=C.find(e=>e.id===s);return r?`${r.name}/${a}`:e},[C]),F=e=>{e.target&&(e.target.style.opacity="1"),P(null),O(null)},L=async()=>{if(!q(c))return;j(!0);let e={name:c.trim(),models:"weighted"===h?x:x.map(e=>e.model),strategy:h},t={...T};"round-robin"===h&&(void 0!==T.concurrencyPerModel&&(t.concurrencyPerModel=T.concurrencyPerModel),void 0!==T.queueTimeoutMs&&(t.queueTimeoutMs=T.queueTimeoutMs)),Object.keys(t).length>0&&(e.config=t),await i(e),j(!1)},z=!!t;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(l.aF,{isOpen:e,onClose:s,title:z?"Edit Combo":"Create Combo",children:(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(l.pd,{label:"Combo Name",value:c,onChange:e=>{let t=e.target.value;m(t),t?q(t):N("")},placeholder:"my-combo",error:v}),(0,a.jsx)("p",{className:"text-[10px] text-text-muted mt-0.5",children:"Letters, numbers, -, _, / and . allowed"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Routing Strategy"}),(0,a.jsxs)("div",{className:"flex gap-1 p-0.5 bg-black/5 dark:bg-white/5 rounded-lg",children:[(0,a.jsxs)("button",{onClick:()=>b("priority"),className:`flex-1 py-1.5 px-3 rounded-md text-xs font-medium transition-all ${"priority"===h?"bg-white dark:bg-bg-main shadow-sm text-primary":"text-text-muted hover:text-text-main"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] align-middle mr-1",children:"sort"}),"Priority"]}),(0,a.jsxs)("button",{onClick:()=>b("weighted"),className:`flex-1 py-1.5 px-3 rounded-md text-xs font-medium transition-all ${"weighted"===h?"bg-white dark:bg-bg-main shadow-sm text-primary":"text-text-muted hover:text-text-main"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] align-middle mr-1",children:"percent"}),"Weighted"]}),(0,a.jsxs)("button",{onClick:()=>b("round-robin"),className:`flex-1 py-1.5 px-3 rounded-md text-xs font-medium transition-all ${"round-robin"===h?"bg-white dark:bg-bg-main shadow-sm text-primary":"text-text-muted hover:text-text-main"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] align-middle mr-1",children:"autorenew"}),"Round-Robin"]})]}),(0,a.jsx)("p",{className:"text-[10px] text-text-muted mt-0.5",children:"priority"===h?"Sequential fallback: tries model 1 first, then 2, etc.":"weighted"===h?"Distributes traffic by weight percentage with fallback":"Circular distribution: each request goes to the next model in rotation"})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-1.5",children:[(0,a.jsx)("label",{className:"text-sm font-medium",children:"Models"}),"weighted"===h&&x.length>1&&(0,a.jsx)("button",{onClick:()=>{let e=x.length;if(0===e)return;let t=Math.floor(100/e),s=100-t*e;u(x.map((e,a)=>({...e,weight:t+(0===a?s:0)})))},className:"text-[10px] text-primary hover:text-primary/80 transition-colors",children:"Auto-balance"})]}),0===x.length?(0,a.jsxs)("div",{className:"text-center py-4 border border-dashed border-black/10 dark:border-white/10 rounded-lg bg-black/[0.01] dark:bg-white/[0.01]",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-xl mb-1",children:"layers"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"No models added yet"})]}):(0,a.jsx)("div",{className:"flex flex-col gap-1 max-h-[240px] overflow-y-auto",children:x.map((e,t)=>(0,a.jsxs)("div",{draggable:!0,onDragStart:e=>{P(t),e.dataTransfer.effectAllowed="move",e.dataTransfer.setData("text/plain",t.toString()),e.target&&setTimeout(()=>e.target.style.opacity="0.5",0)},onDragEnd:F,onDragOver:e=>{e.preventDefault(),e.dataTransfer.dropEffect="move",O(t)},onDrop:e=>((e,t)=>{if(e.preventDefault(),null===E||E===t)return;let s=[...x],[a]=s.splice(E,1);s.splice(t,0,a),u(s),P(null),O(null)})(e,t),className:`group/item flex items-center gap-1.5 px-2 py-1.5 rounded-md transition-all cursor-grab active:cursor-grabbing ${D===t&&E!==t?"bg-primary/10 border border-primary/30":"bg-black/[0.02] dark:bg-white/[0.02] hover:bg-black/[0.04] dark:hover:bg-white/[0.04] border border-transparent"} ${E===t?"opacity-50":""}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted/40 cursor-grab shrink-0",children:"drag_indicator"}),(0,a.jsx)("span",{className:"text-[10px] font-medium text-text-muted w-3 text-center shrink-0",children:t+1}),(0,a.jsx)("div",{className:"flex-1 min-w-0 px-1 text-xs text-text-main truncate",children:A(e.model)}),"weighted"===h&&(0,a.jsxs)("div",{className:"flex items-center gap-0.5 shrink-0",children:[(0,a.jsx)("input",{type:"number",min:"0",max:"100",value:e.weight,onChange:e=>{var s;let a;return s=e.target.value,void((a=[...x])[t]={...a[t],weight:Math.max(0,Math.min(100,Number(s)||0))},u(a))},className:"w-10 text-[11px] text-center py-0.5 rounded border border-black/10 dark:border-white/10 bg-transparent focus:border-primary focus:outline-none"}),(0,a.jsx)("span",{className:"text-[10px] text-text-muted",children:"%"})]}),"priority"===h&&(0,a.jsxs)("div",{className:"flex items-center gap-0.5",children:[(0,a.jsx)("button",{onClick:()=>(e=>{if(0===e)return;let t=[...x];[t[e-1],t[e]]=[t[e],t[e-1]],u(t)})(t),disabled:0===t,className:`p-0.5 rounded ${0===t?"text-text-muted/20 cursor-not-allowed":"text-text-muted hover:text-primary hover:bg-black/5 dark:hover:bg-white/5"}`,title:"Move up",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"arrow_upward"})}),(0,a.jsx)("button",{onClick:()=>(e=>{if(e===x.length-1)return;let t=[...x];[t[e],t[e+1]]=[t[e+1],t[e]],u(t)})(t),disabled:t===x.length-1,className:`p-0.5 rounded ${t===x.length-1?"text-text-muted/20 cursor-not-allowed":"text-text-muted hover:text-primary hover:bg-black/5 dark:hover:bg-white/5"}`,title:"Move down",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"arrow_downward"})})]}),(0,a.jsx)("button",{onClick:()=>{u(x.filter((e,s)=>s!==t))},className:"p-0.5 hover:bg-red-500/10 rounded text-text-muted hover:text-red-500 transition-all",title:"Remove",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"close"})})]},`${e.model}-${t}`))}),"weighted"===h&&x.length>0&&(0,a.jsx)(p,{models:x}),(0,a.jsxs)("button",{onClick:()=>f(!0),className:"w-full mt-2 py-2 border border-dashed border-black/10 dark:border-white/10 rounded-lg text-xs text-text-muted hover:text-primary hover:border-primary/30 transition-colors flex items-center justify-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"add"}),"Add Model"]})]}),(0,a.jsxs)("button",{onClick:()=>M(!$),className:"flex items-center gap-1 text-xs text-text-muted hover:text-text-main transition-colors self-start",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:$?"expand_less":"expand_more"}),"Advanced Settings"]}),$&&(0,a.jsxs)("div",{className:"flex flex-col gap-2 p-3 bg-black/[0.02] dark:bg-white/[0.02] rounded-lg border border-black/5 dark:border-white/5",children:[(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-[10px] text-text-muted mb-0.5 block",children:"Max Retries"}),(0,a.jsx)("input",{type:"number",min:"0",max:"10",value:T.maxRetries??"",placeholder:"1",onChange:e=>_({...T,maxRetries:e.target.value?Number(e.target.value):void 0}),className:"w-full text-xs py-1.5 px-2 rounded border border-black/10 dark:border-white/10 bg-transparent focus:border-primary focus:outline-none"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-[10px] text-text-muted mb-0.5 block",children:"Retry Delay (ms)"}),(0,a.jsx)("input",{type:"number",min:"0",max:"60000",step:"500",value:T.retryDelayMs??"",placeholder:"2000",onChange:e=>_({...T,retryDelayMs:e.target.value?Number(e.target.value):void 0}),className:"w-full text-xs py-1.5 px-2 rounded border border-black/10 dark:border-white/10 bg-transparent focus:border-primary focus:outline-none"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-[10px] text-text-muted mb-0.5 block",children:"Timeout (ms)"}),(0,a.jsx)("input",{type:"number",min:"1000",max:"600000",step:"1000",value:T.timeoutMs??"",placeholder:"120000",onChange:e=>_({...T,timeoutMs:e.target.value?Number(e.target.value):void 0}),className:"w-full text-xs py-1.5 px-2 rounded border border-black/10 dark:border-white/10 bg-transparent focus:border-primary focus:outline-none"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("label",{className:"text-[10px] text-text-muted",children:"Healthcheck"}),(0,a.jsx)("input",{type:"checkbox",checked:!1!==T.healthCheckEnabled,onChange:e=>_({...T,healthCheckEnabled:e.target.checked}),className:"accent-primary"})]})]}),"round-robin"===h&&(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-2 pt-2 border-t border-black/5 dark:border-white/5",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-[10px] text-text-muted mb-0.5 block",children:"Concurrency / Model"}),(0,a.jsx)("input",{type:"number",min:"1",max:"20",value:T.concurrencyPerModel??"",placeholder:"3",onChange:e=>_({...T,concurrencyPerModel:e.target.value?Number(e.target.value):void 0}),className:"w-full text-xs py-1.5 px-2 rounded border border-black/10 dark:border-white/10 bg-transparent focus:border-primary focus:outline-none"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-[10px] text-text-muted mb-0.5 block",children:"Queue Timeout (ms)"}),(0,a.jsx)("input",{type:"number",min:"1000",max:"120000",step:"1000",value:T.queueTimeoutMs??"",placeholder:"30000",onChange:e=>_({...T,queueTimeoutMs:e.target.value?Number(e.target.value):void 0}),className:"w-full text-xs py-1.5 px-2 rounded border border-black/10 dark:border-white/10 bg-transparent focus:border-primary focus:outline-none"})]})]}),(0,a.jsx)("p",{className:"text-[10px] text-text-muted",children:"Leave empty to use global defaults. These override per-provider settings."})]}),(0,a.jsxs)("div",{className:"flex gap-2 pt-1",children:[(0,a.jsx)(l.$n,{onClick:s,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,a.jsx)(l.$n,{onClick:L,fullWidth:!0,size:"sm",disabled:!c.trim()||!!v||y,children:y?"Saving...":z?"Save":"Create"})]})]})}),(0,a.jsx)(l.rq,{isOpen:g,onClose:()=>f(!1),onSelect:e=>{x.find(t=>t.model===e.value)||u([...x,{model:e.value,weight:0}])},activeProviders:o,modelAliases:k,title:"Add Model to Combo"})]})}function p({models:e}){let t=e.reduce((e,t)=>e+(t.weight||0),0),s=100===t,r=["bg-blue-500","bg-emerald-500","bg-amber-500","bg-purple-500","bg-rose-500","bg-cyan-500","bg-orange-500","bg-indigo-500"];return(0,a.jsxs)("div",{className:"mt-1.5",children:[(0,a.jsx)("div",{className:"h-1.5 rounded-full bg-black/5 dark:bg-white/5 overflow-hidden flex",children:e.map((e,t)=>e.weight?(0,a.jsx)("div",{className:`${r[t%r.length]} transition-all duration-300`,style:{width:`${Math.min(e.weight,100)}%`}},t):null)}),(0,a.jsxs)("div",{className:"flex items-center justify-between mt-0.5",children:[(0,a.jsx)("div",{className:"flex gap-1",children:e.map((e,t)=>e.weight>0&&(0,a.jsxs)("span",{className:"flex items-center gap-0.5 text-[9px] text-text-muted",children:[(0,a.jsx)("span",{className:`inline-block w-1.5 h-1.5 rounded-full ${r[t%r.length]}`}),e.weight,"%"]},t))}),(0,a.jsxs)("span",{className:`text-[10px] font-medium ${s?"text-emerald-500":t>100?"text-red-500":"text-amber-500"}`,children:[t,"%",!s&&t>0&&" ≠ 100%"]})]})]})}},66618:(e,t,s)=>{Promise.resolve().then(s.bind(s,11313))}},e=>{e.O(0,[8500,600,8013,7896,1525,8441,3794,7358],()=>e(e.s=66618)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6099],{},_=>{_.O(0,[8500,600,8013,7896,1525,6941,8441,3794,7358],()=>_(_.s=86941)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6337],{},_=>{_.O(0,[8500,600,8013,7896,1525,6941,8441,3794,7358],()=>_(_.s=86941)),_N_E=_.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[174,204,335,449,516,552,747,748,853,907,931,992,1070,1097,1110,1288,1451,1512,1566,1624,1625,1666,1701,1860,1873,1910,1949,2121,2296,2310,2720,2797,3025,3038,3079,3102,3246,3254,3394,3461,3471,3472,3549,3954,4120,4286,4503,4612,4866,4890,4896,4901,5018,5045,5079,5107,5177,5211,5396,5466,5568,5677,5693,5696,5745,5922,6162,6217,6268,6392,6442,6479,6529,6580,6740,6819,6853,6988,7176,7241,7249,7295,7346,7429,7442,7457,7520,7545,7597,7758,7855,7899,8167,8207,8246,8406,8453,8489,8573,8648,8777,8809,8814,8870,8948,8974,8975,9027,9069,9088,9141,9214,9321,9389,9461,9492,9794,9998],{84441:()=>{}},_=>{_.O(0,[8441,3794,7358],()=>_(_.s=84441)),_N_E=_.O()}]);
|