omniroute 2.0.0 → 2.0.2
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.ar.md +4 -3
- package/README.bg.md +4 -3
- package/README.da.md +4 -2
- package/README.de.md +3 -2
- package/README.es.md +1 -0
- package/README.fi.md +1 -0
- package/README.fr.md +1 -0
- package/README.he.md +9 -8
- package/README.hu.md +1 -0
- package/README.id.md +1 -0
- package/README.in.md +9 -8
- package/README.it.md +1 -0
- package/README.ja.md +3 -0
- package/README.ko.md +9 -8
- package/README.md +17 -16
- package/README.ms.md +9 -8
- package/README.nl.md +9 -8
- package/README.no.md +1 -0
- package/README.phi.md +2 -1
- package/README.pl.md +9 -8
- package/README.pt-BR.md +3 -2
- package/README.pt.md +1 -0
- package/README.ro.md +2 -0
- package/README.ru.md +1 -0
- package/README.sk.md +1 -0
- package/README.sv.md +1 -0
- package/README.th.md +1 -0
- package/README.uk-UA.md +1 -0
- package/README.vi.md +1 -0
- package/README.zh-CN.md +10 -9
- package/app/.env +122 -0
- package/app/.next/BUILD_ID +1 -1
- package/app/.next/app-path-routes-manifest.json +54 -54
- package/app/.next/build-manifest.json +3 -3
- package/app/.next/prerender-manifest.json +3 -3
- package/app/.next/required-server-files.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/a2a/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/a2a/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/a2a/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/analytics/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/analytics/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/analytics/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/api-manager/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/api-manager/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/api-manager/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/audit-log/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/audit-log/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/audit-log/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/auto-combo/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/auto-combo/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/auto-combo/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page.js +3 -3
- 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/costs/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/costs/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/costs/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/health/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/health/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/health/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/limits/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/limits/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/limits/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/logs/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/logs/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/logs/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/mcp/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/mcp/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/mcp/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/media/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/media/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/media/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 -2
- package/app/.next/server/app/(dashboard)/dashboard/settings/pricing/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/translator/page.js +3 -3
- 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/.well-known/agent.json/route.js +1 -1
- package/app/.next/server/app/.well-known/agent.json/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/400/page.js +2 -2
- package/app/.next/server/app/400/page.js.nft.json +1 -1
- package/app/.next/server/app/400/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/401/page.js +2 -2
- package/app/.next/server/app/401/page.js.nft.json +1 -1
- package/app/.next/server/app/401/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/403/page.js +2 -2
- package/app/.next/server/app/403/page.js.nft.json +1 -1
- package/app/.next/server/app/403/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/408/page.js +2 -2
- package/app/.next/server/app/408/page.js.nft.json +1 -1
- package/app/.next/server/app/408/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/429/page.js +2 -2
- package/app/.next/server/app/429/page.js.nft.json +1 -1
- package/app/.next/server/app/429/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/500/page.js +2 -2
- package/app/.next/server/app/500/page.js.nft.json +1 -1
- package/app/.next/server/app/500/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/502/page.js +2 -2
- package/app/.next/server/app/502/page.js.nft.json +1 -1
- package/app/.next/server/app/502/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/503/page.js +2 -2
- package/app/.next/server/app/503/page.js.nft.json +1 -1
- package/app/.next/server/app/503/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_client-reference-manifest.js +1 -1
- package/app/.next/server/app/_global-error.html +2 -2
- package/app/.next/server/app/_global-error.rsc +5 -5
- package/app/.next/server/app/_global-error.segments/_full.segment.rsc +5 -5
- 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 +4 -4
- 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/a2a/route.js +2 -2
- package/app/.next/server/app/a2a/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/a2a/status/route.js +1 -1
- package/app/.next/server/app/api/a2a/status/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/a2a/tasks/[id]/cancel/route.js +1 -1
- package/app/.next/server/app/api/a2a/tasks/[id]/cancel/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/a2a/tasks/[id]/route.js +1 -1
- package/app/.next/server/app/api/a2a/tasks/[id]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/a2a/tasks/route.js +1 -1
- package/app/.next/server/app/api/a2a/tasks/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/auth/login/route.js +1 -1
- package/app/.next/server/app/api/auth/login/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/auth/logout/route.js +1 -1
- package/app/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/auth/status/route.js +1 -1
- package/app/.next/server/app/api/auth/status/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cache/route.js +1 -1
- package/app/.next/server/app/api/cache/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cache/stats/route.js +1 -1
- package/app/.next/server/app/api/cache/stats/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
- 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 +3 -3
- 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 +2 -2
- 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.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/auto-order/route.js +1 -1
- package/app/.next/server/app/api/cli-tools/openclaw/auto-order/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/cli-tools/status/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/status/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cloud/auth/route.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.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.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.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_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/combos/auto/route.js +1 -1
- package/app/.next/server/app/api/combos/auto/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/combos/metrics/route.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_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/combos/test/route.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 +1 -1
- package/app/.next/server/app/api/compliance/audit-log/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/db-backups/export/route.js +1 -1
- package/app/.next/server/app/api/db-backups/export/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/db-backups/exportAll/route.js +1 -1
- package/app/.next/server/app/api/db-backups/exportAll/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/db-backups/import/route.js +1 -1
- package/app/.next/server/app/api/db-backups/import/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/db-backups/route.js +1 -1
- 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 -1
- package/app/.next/server/app/api/evals/[suiteId]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/evals/route.js +1 -1
- package/app/.next/server/app/api/evals/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/fallback/chains/route.js +2 -2
- package/app/.next/server/app/api/fallback/chains/route_client-reference-manifest.js +1 -1
- 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.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/logs/console/route.js +1 -1
- package/app/.next/server/app/api/logs/console/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/mcp/audit/route.js +2 -2
- package/app/.next/server/app/api/mcp/audit/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/mcp/audit/stats/route.js +2 -2
- package/app/.next/server/app/api/mcp/audit/stats/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/mcp/sse/route.js +1 -1
- package/app/.next/server/app/api/mcp/sse/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/mcp/status/route.js +1 -1
- package/app/.next/server/app/api/mcp/status/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/mcp/stream/route.js +1 -1
- package/app/.next/server/app/api/mcp/stream/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/mcp/tools/route.js +1 -1
- package/app/.next/server/app/api/mcp/tools/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/models/alias/route.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 -1
- package/app/.next/server/app/api/models/availability/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/models/catalog/route.js +2 -2
- package/app/.next/server/app/api/models/catalog/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/models/route.js +2 -2
- package/app/.next/server/app/api/models/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/monitoring/health/route.js +2 -2
- package/app/.next/server/app/api/monitoring/health/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/[provider]/[action]/route.js +2 -2
- 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.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.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.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.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.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.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 +2 -2
- package/app/.next/server/app/api/policies/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/pricing/defaults/route.js +1 -1
- 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 +1 -1
- package/app/.next/server/app/api/pricing/models/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/pricing/route.js +1 -1
- package/app/.next/server/app/api/pricing/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/provider-metrics/route.js +2 -2
- package/app/.next/server/app/api/provider-metrics/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/provider-models/route.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.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.js +2 -2
- 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.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.js +2 -2
- 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.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.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 +2 -2
- package/app/.next/server/app/api/providers/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/providers/test-batch/route.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.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 +1 -1
- 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 -1
- package/app/.next/server/app/api/rate-limits/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/resilience/reset/route.js +1 -1
- package/app/.next/server/app/api/resilience/reset/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/resilience/route.js +1 -1
- package/app/.next/server/app/api/resilience/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/restart/route.js +1 -1
- package/app/.next/server/app/api/restart/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/sessions/route.js +1 -1
- package/app/.next/server/app/api/sessions/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/settings/background-degradation/route.js +1 -1
- package/app/.next/server/app/api/settings/background-degradation/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/settings/combo-defaults/route.js +1 -1
- 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 -1
- package/app/.next/server/app/api/settings/ip-filter/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/settings/model-aliases/route.js +1 -1
- package/app/.next/server/app/api/settings/model-aliases/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/settings/proxy/route.js +1 -1
- 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.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.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.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 +1 -1
- package/app/.next/server/app/api/settings/system-prompt/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/settings/thinking-budget/route.js +1 -1
- package/app/.next/server/app/api/settings/thinking-budget/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/shutdown/route.js +1 -1
- package/app/.next/server/app/api/shutdown/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/storage/health/route.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.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.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.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 -1
- package/app/.next/server/app/api/telemetry/summary/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/token-health/route.js +1 -1
- package/app/.next/server/app/api/token-health/route_client-reference-manifest.js +1 -1
- 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.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.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.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 -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 +1 -1
- 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 +2 -2
- 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_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/budget/route.js +2 -2
- package/app/.next/server/app/api/usage/budget/route_client-reference-manifest.js +1 -1
- 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_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_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_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_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/proxy-logs/route.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/quota/route.js +1 -1
- package/app/.next/server/app/api/usage/quota/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_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_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/audio/speech/route.js +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 -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_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_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.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_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_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/moderations/route.js +1 -1
- package/app/.next/server/app/api/v1/moderations/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/music/generations/route.js +1 -1
- package/app/.next/server/app/api/v1/music/generations/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_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/providers/[provider]/embeddings/route.js +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 +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_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/route.js +1 -1
- package/app/.next/server/app/api/v1/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/videos/generations/route.js +1 -1
- package/app/.next/server/app/api/v1/videos/generations/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_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1beta/models/route.js +2 -2
- 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/docs/page.js +4 -4
- 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/forbidden/page.js +2 -2
- package/app/.next/server/app/forbidden/page.js.nft.json +1 -1
- package/app/.next/server/app/forbidden/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/forgot-password/page.js +2 -2
- package/app/.next/server/app/forgot-password/page.js.nft.json +1 -1
- package/app/.next/server/app/forgot-password/page_client-reference-manifest.js +1 -1
- 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/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/maintenance/page.js +2 -2
- package/app/.next/server/app/maintenance/page.js.nft.json +1 -1
- package/app/.next/server/app/maintenance/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/offline/page.js +2 -2
- package/app/.next/server/app/offline/page.js.nft.json +1 -1
- package/app/.next/server/app/offline/page_client-reference-manifest.js +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/status/page.js +2 -2
- package/app/.next/server/app/status/page.js.nft.json +1 -1
- package/app/.next/server/app/status/page_client-reference-manifest.js +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-paths-manifest.json +54 -54
- package/app/.next/server/chunks/1033.js +1 -1
- package/app/.next/server/chunks/1909.js +2 -0
- package/app/.next/server/chunks/2180.js +1 -1
- package/app/.next/server/chunks/2901.js +1 -1
- package/app/.next/server/chunks/2910.js +1 -1
- package/app/.next/server/chunks/3498.js +1 -1
- package/app/.next/server/chunks/3969.js +1 -1
- package/app/.next/server/chunks/4488.js +1 -1
- package/app/.next/server/chunks/4631.js +2 -2
- package/app/.next/server/chunks/7109.js +1 -1
- package/app/.next/server/chunks/7167.js +1 -0
- package/app/.next/server/chunks/7669.js +1 -1
- package/app/.next/server/chunks/8020.js +3 -3
- package/app/.next/server/chunks/8369.js +1 -1
- package/app/.next/server/chunks/9548.js +1 -1
- package/app/.next/server/instrumentation.js +1 -1
- package/app/.next/server/middleware-build-manifest.js +1 -1
- package/app/.next/server/middleware.js +3 -3
- package/app/.next/server/next-font-manifest.js +1 -1
- package/app/.next/server/next-font-manifest.json +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/chunks/{5846-c2071f4db5ecc3da.js → 5846-014698d5430bb218.js} +1 -1
- package/app/.next/static/chunks/{647-f42f77310d9d9936.js → 647-52d3e2e64d7de62e.js} +2 -2
- package/app/.next/static/chunks/app/(dashboard)/dashboard/a2a/page-ed1f5b1ae0e01c02.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/analytics/loading-6a2bb3ad980b05b9.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/analytics/{page-bef5c045e7eae657.js → page-6ab7701da3357bb9.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/api-manager/page-027b3eb09d2d46e0.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/audit-log/page-c9b98846b8479f3f.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/auto-combo/{page-8e609f4c9b26a901.js → page-851063ded34ab7a6.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/cli-tools/page-86acc32f9984a4e2.js +15 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/combos/page-ac5dcffbe54f77f9.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/costs/{page-7a233357dfbd2e05.js → page-8f6233f59f5277e9.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/endpoint/page-36f33de29eb978a1.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/health/{page-66ee4e631429e0d8.js → page-1e1eb2f79d606ab2.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/limits/page-e8a28e4cf62889bd.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/logs/{page-6e4bcb48b8731915.js → page-95e4b5e0bf023d76.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/mcp/page-d9b5c3282ec5d809.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/media/page-72b768421394b42c.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/onboarding/{page-d424641c7e428be9.js → page-5378e9473a20cd6a.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/page-40d20c1273f57206.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-350aed2e86512c23.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/{error-0400f175dd1372fa.js → error-a5ae03ba05400b04.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/loading-7deaa9f550841465.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/new/page-3ef302da4b756e50.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/{page-87f0d43ce6cca0cb.js → page-cd0feb6c545b8a49.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/settings/{error-c39d18f10fb7d3f6.js → error-ec9643134a96bbcd.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/settings/{loading-b5faf05c78a2cc54.js → loading-3519a633b514f31a.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/settings/{page-6b38a30bfddf3b89.js → page-cbaa4b638a583fe9.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/settings/pricing/{page-a4b8b03ffb39da1d.js → page-69eb8b0eb0e9de00.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/translator/{page-b29f17c4dc7d449f.js → page-8cc93e616925f0a0.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/usage/page-8c8f2d59d0cbb516.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/{layout-6d0afc53f5f2a538.js → layout-7ae0c66c22bee8a1.js} +1 -1
- package/app/.next/static/chunks/app/400/{page-3b77bf358909019a.js → page-3b9079ea400ca287.js} +1 -1
- package/app/.next/static/chunks/app/401/{page-3b77bf358909019a.js → page-3b9079ea400ca287.js} +1 -1
- package/app/.next/static/chunks/app/403/{page-3b77bf358909019a.js → page-3b9079ea400ca287.js} +1 -1
- package/app/.next/static/chunks/app/408/{page-3b77bf358909019a.js → page-3b9079ea400ca287.js} +1 -1
- package/app/.next/static/chunks/app/429/page-3b9079ea400ca287.js +1 -0
- package/app/.next/static/chunks/app/500/page-3b9079ea400ca287.js +1 -0
- package/app/.next/static/chunks/app/502/page-3b9079ea400ca287.js +1 -0
- package/app/.next/static/chunks/app/503/page-3b9079ea400ca287.js +1 -0
- package/app/.next/static/chunks/app/callback/{page-585a53f7dc6a30f1.js → page-0f0ebc0820dd18a5.js} +1 -1
- package/app/.next/static/chunks/app/docs/{page-9624e5fb8cabf7d8.js → page-dc88e0a01d291518.js} +1 -1
- package/app/.next/static/chunks/app/{error-f7f595c541537e63.js → error-32c03f14529d3920.js} +1 -1
- package/app/.next/static/chunks/app/forbidden/page-8d8e1709a1e32585.js +1 -0
- package/app/.next/static/chunks/app/forgot-password/page-d5c9b77748aa9deb.js +1 -0
- package/app/.next/static/chunks/app/global-error-5840b1caa830f2ec.js +1 -0
- package/app/.next/static/chunks/app/landing/page-75b0c988db383cfc.js +1 -0
- package/app/.next/static/chunks/app/{layout-108592eafb959363.js → layout-070972eb026af319.js} +1 -1
- package/app/.next/static/chunks/app/{loading-e063375d5b12a2f7.js → loading-da2f6e1471afc070.js} +1 -1
- package/app/.next/static/chunks/app/login/{page-cf6b82187b09a701.js → page-26d717c652d56032.js} +1 -1
- package/app/.next/static/chunks/app/maintenance/page-3b9079ea400ca287.js +1 -0
- package/app/.next/static/chunks/app/not-found-faf36d2a9a452506.js +1 -0
- package/app/.next/static/chunks/app/offline/page-bf68bf461af876a3.js +1 -0
- package/app/.next/static/chunks/app/privacy/{page-9624e5fb8cabf7d8.js → page-dc88e0a01d291518.js} +1 -1
- package/app/.next/static/chunks/app/status/page-29a433b40631ce12.js +1 -0
- package/app/.next/static/chunks/app/terms/{page-9624e5fb8cabf7d8.js → page-dc88e0a01d291518.js} +1 -1
- package/app/.next/static/chunks/{main-app-c9da11a8061df107.js → main-app-ae230f6bf51a5edb.js} +1 -1
- package/app/logs/application/app.log +1 -0
- package/app/package.json +1 -1
- package/app/server.js +1 -1
- package/package.json +1 -1
- package/app/.next/server/chunks/5248.js +0 -1
- package/app/.next/server/chunks/7889.js +0 -2
- package/app/.next/static/chunks/app/(dashboard)/dashboard/a2a/page-43d6fa6b75cca497.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/analytics/loading-49ae846d72948391.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/api-manager/page-16f886b3711a6a50.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/audit-log/page-e5bf8955e7b9a4f5.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/cli-tools/page-d1e5ed188e14c618.js +0 -15
- package/app/.next/static/chunks/app/(dashboard)/dashboard/combos/page-8d4d2f071d114b90.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/endpoint/page-7b1037d65eef97a8.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/limits/page-d5e0c556e2b32478.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/mcp/page-8e35334b9f393139.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/media/page-1d0ca9b5d3eaf7cd.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/page-d75ccdb976b36258.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-1abb3ea768844f2b.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/loading-9552383fd2e11282.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/new/page-d57908b59d4b482c.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/usage/page-9e20463252daf023.js +0 -1
- package/app/.next/static/chunks/app/429/page-3b77bf358909019a.js +0 -1
- package/app/.next/static/chunks/app/500/page-3b77bf358909019a.js +0 -1
- package/app/.next/static/chunks/app/502/page-3b77bf358909019a.js +0 -1
- package/app/.next/static/chunks/app/503/page-3b77bf358909019a.js +0 -1
- package/app/.next/static/chunks/app/forbidden/page-b33079c1573b0bfa.js +0 -1
- package/app/.next/static/chunks/app/forgot-password/page-90cd6259c75badfc.js +0 -1
- package/app/.next/static/chunks/app/global-error-1dfd1c91ad5199fe.js +0 -1
- package/app/.next/static/chunks/app/landing/page-9d540ab1716f8e3e.js +0 -1
- package/app/.next/static/chunks/app/maintenance/page-3b77bf358909019a.js +0 -1
- package/app/.next/static/chunks/app/not-found-511518956bcae7bc.js +0 -1
- package/app/.next/static/chunks/app/offline/page-9d6ea493783a0219.js +0 -1
- package/app/.next/static/chunks/app/status/page-4e5e9b5a513aa474.js +0 -1
- /package/app/.next/static/{i4hXorUJfOXsVFs23YXiR → GDoUzLvy4YDqhnGqUCiZ0}/_buildManifest.js +0 -0
- /package/app/.next/static/{i4hXorUJfOXsVFs23YXiR → GDoUzLvy4YDqhnGqUCiZ0}/_ssgManifest.js +0 -0
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"model": "{{model}}",
|
|
5
5
|
"provider": "openai",
|
|
6
6
|
"apiKey": "{{apiKey}}"
|
|
7
|
-
}`}},antigravity:{id:"antigravity",name:"Antigravity",image:"/providers/antigravity.png",color:"#4285F4",description:"Google Antigravity IDE with MITM",configType:"mitm",modelAliases:["claude-opus-4-6-thinking","claude-sonnet-4-6","gemini-3-flash","gpt-oss-120b-medium","gemini-3.1-pro-high","gemini-3.1-pro-low"],defaultModels:[{id:"gemini-3.1-pro-high",name:"Gemini 3.1 Pro High",alias:"gemini-3.1-pro-high"},{id:"gemini-3.1-pro-low",name:"Gemini 3.1 Pro Low",alias:"gemini-3.1-pro-low"},{id:"gemini-3-flash",name:"Gemini 3 Flash",alias:"gemini-3-flash"},{id:"claude-sonnet-4-6",name:"Claude Sonnet 4.6",alias:"claude-sonnet-4-6"},{id:"claude-opus-4-6-thinking",name:"Claude Opus 4.6 Thinking",alias:"claude-opus-4-6-thinking"},{id:"gpt-oss-120b-medium",name:"GPT OSS 120B Medium",alias:"gpt-oss-120b-medium"}]},copilot:{id:"copilot",name:"GitHub Copilot",image:"/providers/copilot.png",color:"#1F6FEB",description:"GitHub Copilot Chat — VS Code Extension",configType:"custom"}};var h=c(47825),i=c(81220),j=c(77360),k=c(89400);function l({effectiveConfigStatus:a,batchStatus:b,lastConfiguredAt:c=null}){let e=(0,j.c)("cliTools"),f=(0,k.Ym)(),g=a||b?.configStatus||null,h={configured:{dotClass:"bg-green-500",badgeClass:"bg-green-500/10 text-green-600 dark:text-green-400",text:e("configured")},not_configured:{dotClass:"bg-yellow-500",badgeClass:"bg-yellow-500/10 text-yellow-600 dark:text-yellow-400",text:e("notConfigured")},not_installed:{dotClass:"bg-zinc-400 dark:bg-zinc-500",badgeClass:"bg-zinc-500/10 text-zinc-500 dark:text-zinc-400",text:e("notInstalled")},other:{dotClass:"bg-blue-500",badgeClass:"bg-blue-500/10 text-blue-600 dark:text-blue-400",text:e("custom")},unknown:{dotClass:"bg-zinc-400 dark:bg-zinc-500",badgeClass:"bg-zinc-500/10 text-zinc-500 dark:text-zinc-400",text:e("unknown")}},i=g?h[g]||h.unknown:null;return(0,d.jsxs)(d.Fragment,{children:[i&&(0,d.jsxs)("span",{className:`inline-flex items-center gap-1.5 px-2 py-0.5 text-[11px] font-medium rounded-full ${i.badgeClass}`,children:[(0,d.jsx)("span",{className:`size-1.5 rounded-full ${i.dotClass}`}),i.text]}),c?(0,d.jsxs)("span",{className:"inline-flex items-center gap-1 px-1.5 py-0.5 text-[10px] text-text-muted",title:e("lastSavedAt",{date:new Date(c).toLocaleString(f)}),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"schedule"}),function(a,b){let c=Date.now()-new Date(a).getTime();if(c<0)return b("justNow");let d=Math.floor(c/1e3);if(d<60)return b("justNow");let e=Math.floor(d/60);if(e<60)return b("minutesAgoShort",{count:e});let f=Math.floor(e/60);if(f<24)return b("hoursAgoShort",{count:f});let g=Math.floor(f/24);if(g<30)return b("daysAgoShort",{count:g});let h=Math.floor(g/30);return h<12?b("monthsAgoShort",{count:h}):b("yearsAgoShort",{count:Math.floor(h/12)})}(c,e)]}):g&&"not_installed"!==g?(0,d.jsxs)("span",{className:"inline-flex items-center gap-1 px-1.5 py-0.5 text-[10px] text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"schedule"}),e("never")]}):null]})}let m=process.env.NEXT_PUBLIC_CLOUD_URL;function n({tool:a,isExpanded:b,onToggle:c,activeProviders:g,modelMappings:h,onModelMappingChange:k,baseUrl:n,hasActiveProviders:o,apiKeys:p,cloudEnabled:q,batchStatus:r,lastConfiguredAt:s}){let t,u,v,w=(0,j.c)("cliTools"),[x,y]=(0,e.useState)(null),[z,A]=(0,e.useState)(!1),[B,C]=(0,e.useState)(!1),[D,E]=(0,e.useState)(!1),[F,G]=(0,e.useState)(null),[H,I]=(0,e.useState)(!1),[J,K]=(0,e.useState)(!1),[L,M]=(0,e.useState)(null),[N,O]=(0,e.useState)(""),[P,Q]=(0,e.useState)({}),[R,S]=(0,e.useState)(!1),[T,U]=(0,e.useState)("");(0,e.useRef)(!1);let[V,W]=(0,e.useState)([]),[X,Y]=(0,e.useState)(!1),[Z,$]=(0,e.useState)(null),_=!!(x?.installed&&x?.runnable),aa=(()=>{if(!_)return null;let a=x.settings?.env?.ANTHROPIC_BASE_URL;if(!a)return"not_configured";let b=a.includes("localhost")||a.includes("127.0.0.1"),c=q&&m&&a.startsWith(m);return b||c?"configured":"other"})()||r?.configStatus||null,ab=async()=>{A(!0);try{let a=await fetch("/api/cli-tools/claude-settings"),b=await a.json();y(b)}catch(a){y({installed:!1,error:a.message})}finally{A(!1)}},ac=()=>{let a=T||n;return a.endsWith("/v1")?a:`${a}/v1`},ad=async()=>{C(!0),G(null);try{let b={ANTHROPIC_BASE_URL:ac()},c=N?.trim()||(p?.length>0?p[0].key:null)||(q?null:"sk_omniroute");c&&(b.ANTHROPIC_AUTH_TOKEN=c),a.defaultModels.forEach(a=>{let c=h[a.alias];c&&a.envKey&&(b[a.envKey]=c)});let d=await fetch("/api/cli-tools/claude-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({env:b})}),e=await d.json();d.ok?(G({type:"success",text:w("settingsApplied")}),y(a=>({...a,hasBackup:!0,settings:{...a?.settings,env:b}}))):G({type:"error",text:e.error||w("failedApplySettings")})}catch(a){G({type:"error",text:a.message})}finally{C(!1)}},ae=async()=>{E(!0),G(null);try{let b=await fetch("/api/cli-tools/claude-settings",{method:"DELETE"}),c=await b.json();b.ok?(G({type:"success",text:w("settingsReset")}),a.defaultModels.forEach(a=>k(a.alias,a.defaultValue||"")),O("")):G({type:"error",text:c.error||w("failedResetSettings")})}catch(a){G({type:"error",text:a.message})}finally{E(!1)}},af=async()=>{try{let a=await fetch("/api/cli-tools/backups?tool=claude"),b=await a.json();a.ok&&W(b.backups||[])}catch(a){console.log("Error fetching backups:",a)}},ag=async a=>{$(a),G(null);try{let b=await fetch("/api/cli-tools/backups",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({tool:"claude",backupId:a})}),c=await b.json();b.ok?(G({type:"success",text:w("backupRestored")}),ab(),af()):G({type:"error",text:c.error||w("failedRestore")})}catch(a){G({type:"error",text:a.message})}finally{$(null)}};return(0,d.jsxs)(f.Zp,{padding:"sm",className:"overflow-hidden",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:c,children:[(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,d.jsx)(i.default,{src:"/providers/claude.png",alt:a.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:a=>{a.currentTarget.style.display="none"}})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("h3",{className:"font-medium text-sm",children:a.name}),(0,d.jsx)(l,{effectiveConfigStatus:aa,batchStatus:r,lastConfiguredAt:s})]}),(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:w("toolDescriptions.claude")})]})]}),(0,d.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${b?"rotate-180":""}`,children:"expand_more"})]}),b&&(0,d.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[z&&(0,d.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,d.jsx)("span",{children:w("checkingCli",{tool:"Claude"})})]}),!z&&x&&!_&&(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{className:"flex items-center gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,d.jsxs)("div",{className:"flex-1",children:[(0,d.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:x.installed?w("cliNotRunnable",{tool:"Claude"}):w("cliNotInstalled",{tool:"Claude"})}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:x.installed?w("cliFoundFailedHealthcheck",{tool:"Claude",reason:x.reason?` (${x.reason})`:""}):w("installCliPrompt",{tool:"Claude"})})]}),(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:()=>I(!H),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:H?"expand_less":"help"}),H?w("hide"):w("howToInstall")]})]}),H&&(0,d.jsxs)("div",{className:"p-4 bg-surface border border-border rounded-lg",children:[(0,d.jsx)("h4",{className:"font-medium mb-3",children:w("installationGuide")}),(0,d.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"text-text-muted mb-1",children:w("platforms")}),(0,d.jsx)("code",{className:"block px-3 py-2 bg-black/5 dark:bg-white/5 rounded font-mono text-xs",children:"npm install -g @anthropic-ai/claude-code"})]}),(0,d.jsxs)("p",{className:"text-text-muted",children:[w("afterInstallationRun")," ",(0,d.jsx)("code",{className:"px-1 bg-black/5 dark:bg-white/5 rounded",children:"claude"})," ",w("toVerify")]})]})]})]}),!z&&_&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[x?.settings?.env?.ANTHROPIC_BASE_URL&&(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:w("current")}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("span",{className:"flex-1 px-2 py-1.5 text-xs text-text-muted truncate",children:x.settings.env.ANTHROPIC_BASE_URL})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:w("baseUrl")}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("input",{type:"text",value:(t=T||n).endsWith("/v1")?t:`${t}/v1`,onChange:a=>U(a.target.value),placeholder:w("baseUrlPlaceholder"),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"}),T&&T!==n&&(0,d.jsx)("button",{onClick:()=>U(""),className:"p-1 text-text-muted hover:text-primary rounded transition-colors",title:w("resetToDefault"),children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"restart_alt"})})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:w("apiKey")}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),p.length>0?(0,d.jsx)("select",{value:N,onChange:a=>O(a.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:p.map(a=>(0,d.jsx)("option",{value:a.key,children:a.key},a.id))}):(0,d.jsx)("span",{className:"flex-1 text-xs text-text-muted px-2 py-1.5",children:q?w("noApiKeysCreateOne"):w("defaultOmnirouteKey")})]}),a.defaultModels.map(a=>(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:a.name}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("input",{type:"text",value:h[a.alias]||"",onChange:b=>k(a.alias,b.target.value),placeholder:w("providerModelPlaceholder"),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,d.jsx)("button",{onClick:()=>{M(a.alias),K(!0)},disabled:!o,className:`px-2 py-1.5 rounded border text-xs transition-colors shrink-0 whitespace-nowrap ${o?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:w("selectModel")}),h[a.alias]&&(0,d.jsx)("button",{onClick:()=>k(a.alias,""),className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors",title:w("clear"),children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]},a.alias))]}),F&&(0,d.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===F.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===F.type?"check_circle":"error"}),(0,d.jsx)("span",{children:F.text})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsxs)(f.$n,{variant:"primary",size:"sm",onClick:ad,disabled:!o,loading:B,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),w("apply")]}),(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:ae,disabled:!x?.hasOmniRoute,loading:D,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),w("reset")]}),(0,d.jsxs)(f.$n,{variant:"ghost",size:"sm",onClick:()=>S(!0),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),w("manualConfig")]}),(0,d.jsx)("div",{className:"flex-1"}),(0,d.jsxs)(f.$n,{variant:"ghost",size:"sm",onClick:()=>{Y(!X),X||af()},children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"history"}),w("backups"),V.length>0&&` (${V.length})`]})]}),X&&(0,d.jsxs)("div",{className:"mt-2 p-3 bg-surface border border-border rounded-lg",children:[(0,d.jsxs)("h4",{className:"text-xs font-semibold text-text-main mb-2 flex items-center gap-1",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"history"}),w("configBackups")]}),0===V.length?(0,d.jsx)("p",{className:"text-xs text-text-muted",children:w("noBackupsYet")}):(0,d.jsx)("div",{className:"space-y-1.5",children:V.map(a=>(0,d.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,d.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"description"}),(0,d.jsx)("span",{className:"flex-1 truncate font-mono",title:a.id,children:a.id}),(0,d.jsx)("span",{className:"text-text-muted whitespace-nowrap",children:new Date(a.createdAt).toLocaleString()}),(0,d.jsx)("button",{onClick:()=>ag(a.id),disabled:Z===a.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:Z===a.id?"...":w("restore")})]},a.id))})]})]})]}),(0,d.jsx)(f.rq,{isOpen:J,onClose:()=>K(!1),onSelect:a=>{L&&k(L,a.value)},selectedModel:L?h[L]:null,activeProviders:g,modelAliases:P,title:w("selectModelForAlias",{alias:L||""})}),(0,d.jsx)(f.uR,{isOpen:R,onClose:()=>S(!1),title:w("claudeManualConfiguration"),configs:(u=N&&N.trim()?N:q?"<API_KEY_FROM_DASHBOARD>":"sk_omniroute",v={ANTHROPIC_BASE_URL:ac(),ANTHROPIC_AUTH_TOKEN:u},a.defaultModels.forEach(a=>{let b=h[a.alias];b&&a.envKey&&(v[a.envKey]=b)}),[{filename:"~/.claude/settings.json",content:JSON.stringify({env:v},null,2)}])})]})}function o({tool:a,isExpanded:b,onToggle:c,baseUrl:g,apiKeys:h,activeProviders:k,cloudEnabled:m,batchStatus:n,lastConfiguredAt:o}){let p,q,r,s=(0,j.c)("cliTools"),[t,u]=(0,e.useState)(null),[v,w]=(0,e.useState)(!1),[x,y]=(0,e.useState)(!1),[z,A]=(0,e.useState)(!1),[B,C]=(0,e.useState)(null),[D,E]=(0,e.useState)(!1),[F,G]=(0,e.useState)(""),[H,I]=(0,e.useState)(""),[J,K]=(0,e.useState)(!1),[L,M]=(0,e.useState)({}),[N,O]=(0,e.useState)(!1),[P,Q]=(0,e.useState)(""),[R,S]=(0,e.useState)([]),[T,U]=(0,e.useState)(!1),[V,W]=(0,e.useState)(""),[X,Y]=(0,e.useState)(!1),[Z,$]=(0,e.useState)(null),[_,aa]=(0,e.useState)([]),[ab,ac]=(0,e.useState)(!1),[ad,ae]=(0,e.useState)(null),af=!!(t?.installed&&t?.runnable),ag=(af?t.config?t.config.includes(g)||t.config.includes("localhost")||t.config.includes("127.0.0.1")?"configured":"other":"not_configured":null)||n?.configStatus||null,ah=()=>{let a=P||`${g}/v1`;return a.endsWith("/v1")?a:`${a}/v1`},ai=async()=>{w(!0);try{let a=await fetch("/api/cli-tools/codex-settings"),b=await a.json();u(b)}catch(a){u({installed:!1,error:a.message})}finally{w(!1)}},aj=async()=>{y(!0),C(null);try{let a=F&&F.trim()||m?F:"sk_omniroute",b=await fetch("/api/cli-tools/codex-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:ah(),apiKey:a,model:H})}),c=await b.json();b.ok?(C({type:"success",text:s("settingsApplied")}),ai()):C({type:"error",text:c.error||s("failedApplySettings")})}catch(a){C({type:"error",text:a.message})}finally{y(!1)}},ak=async()=>{A(!0),C(null);try{let a=await fetch("/api/cli-tools/codex-settings",{method:"DELETE"}),b=await a.json();a.ok?(C({type:"success",text:s("settingsReset")}),I(""),ai()):C({type:"error",text:b.error||s("failedResetSettings")})}catch(a){C({type:"error",text:a.message})}finally{A(!1)}},al=async()=>{try{let a=await fetch("/api/cli-tools/codex-profiles"),b=await a.json();a.ok&&S(b.profiles||[])}catch(a){console.log("Error fetching profiles:",a)}},am=async()=>{if(V.trim()){Y(!0),C(null);try{let a=await fetch("/api/cli-tools/codex-profiles",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:V.trim()})}),b=await a.json();a.ok?(C({type:"success",text:s("profileSaved",{name:V})}),W(""),al()):C({type:"error",text:b.error||s("failedSaveProfile")})}catch(a){C({type:"error",text:a.message})}finally{Y(!1)}}},an=async a=>{$(a),C(null);try{let b=await fetch("/api/cli-tools/codex-profiles",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({profileId:a})}),c=await b.json();b.ok?(C({type:"success",text:c.message||s("profileActivated")}),ai(),ap()):C({type:"error",text:c.error||s("failedActivateProfile")})}catch(a){C({type:"error",text:a.message})}finally{$(null)}},ao=async a=>{try{(await fetch("/api/cli-tools/codex-profiles",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({profileId:a})})).ok&&al()}catch(a){console.log("Error deleting profile:",a)}},ap=async()=>{try{let a=await fetch("/api/cli-tools/backups?tool=codex"),b=await a.json();a.ok&&aa(b.backups||[])}catch(a){console.log("Error fetching backups:",a)}},aq=async a=>{ae(a),C(null);try{let b=await fetch("/api/cli-tools/backups",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({tool:"codex",backupId:a})}),c=await b.json();b.ok?(C({type:"success",text:s("backupRestored")}),ai(),ap()):C({type:"error",text:c.error||s("failedRestore")})}catch(a){C({type:"error",text:a.message})}finally{ae(null)}};return(0,d.jsxs)(f.Zp,{padding:"sm",className:"overflow-hidden",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:c,children:[(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,d.jsx)(i.default,{src:"/providers/codex.png",alt:a.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:a=>{a.currentTarget.style.display="none"}})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("h3",{className:"font-medium text-sm",children:a.name}),(0,d.jsx)(l,{effectiveConfigStatus:ag,batchStatus:n,lastConfiguredAt:o})]}),(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:s("toolDescriptions.codex")})]})]}),(0,d.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${b?"rotate-180":""}`,children:"expand_more"})]}),b&&(0,d.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[v&&(0,d.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,d.jsx)("span",{children:s("checkingCli",{tool:"Codex"})})]}),!v&&t&&!af&&(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{className:"flex items-center gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,d.jsxs)("div",{className:"flex-1",children:[(0,d.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:t.installed?s("cliNotRunnable",{tool:"Codex"}):s("cliNotInstalled",{tool:"Codex"})}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:t.installed?s("cliFoundFailedHealthcheck",{tool:"Codex",reason:t.reason?` (${t.reason})`:""}):s("installCodexPrompt")})]}),(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:()=>E(!D),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:D?"expand_less":"help"}),D?s("hide"):s("howToInstall")]})]}),D&&(0,d.jsxs)("div",{className:"p-4 bg-surface border border-border rounded-lg",children:[(0,d.jsx)("h4",{className:"font-medium mb-3",children:s("installationGuide")}),(0,d.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"text-text-muted mb-1",children:s("platforms")}),(0,d.jsx)("code",{className:"block px-3 py-2 bg-black/5 dark:bg-white/5 rounded font-mono text-xs",children:"npm install -g @openai/codex"})]}),(0,d.jsxs)("p",{className:"text-text-muted",children:[s("afterInstallationRun")," ",(0,d.jsx)("code",{className:"px-1 bg-black/5 dark:bg-white/5 rounded",children:"codex"})," ",s("toVerify")]}),(0,d.jsx)("div",{className:"pt-2 border-t border-border",children:(0,d.jsxs)("p",{className:"text-text-muted text-xs",children:[s("codexAuthNotePrefix")," ",(0,d.jsx)("code",{className:"px-1 bg-black/5 dark:bg-white/5 rounded",children:"~/.codex/auth.json"})," ",s("codexAuthNoteMiddle")," ",(0,d.jsx)("code",{className:"px-1 bg-black/5 dark:bg-white/5 rounded",children:"OPENAI_API_KEY"}),". ",s("codexAuthNoteSuffix")]})})]})]})]}),!v&&af&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[t?.config&&((q=(p=t.config.match(/base_url\s*=\s*"([^"]+)"/))?p[1]:null)?(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:s("current")}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("span",{className:"flex-1 px-2 py-1.5 text-xs text-text-muted truncate",children:q})]}):null),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:s("baseUrl")}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("input",{type:"text",value:P||`${g}/v1`,onChange:a=>Q(a.target.value),placeholder:s("baseUrlPlaceholder"),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"}),P&&P!==`${g}/v1`&&(0,d.jsx)("button",{onClick:()=>Q(""),className:"p-1 text-text-muted hover:text-primary rounded transition-colors",title:s("resetToDefault"),children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"restart_alt"})})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:s("apiKey")}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),h.length>0?(0,d.jsx)("select",{value:F,onChange:a=>G(a.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:h.map(a=>(0,d.jsx)("option",{value:a.key,children:a.key},a.id))}):(0,d.jsx)("span",{className:"flex-1 text-xs text-text-muted px-2 py-1.5",children:m?s("noApiKeysCreateOne"):s("defaultOmnirouteKey")})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:s("model")}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("input",{type:"text",value:H,onChange:a=>I(a.target.value),placeholder:s("providerModelPlaceholder"),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,d.jsx)("button",{onClick:()=>K(!0),disabled:!k?.length,className:`px-2 py-1.5 rounded border text-xs transition-colors shrink-0 whitespace-nowrap ${k?.length?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:s("selectModel")}),H&&(0,d.jsx)("button",{onClick:()=>I(""),className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors",title:s("clear"),children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})]}),B&&(0,d.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===B.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===B.type?"check_circle":"error"}),(0,d.jsx)("span",{children:B.text})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsxs)(f.$n,{variant:"primary",size:"sm",onClick:aj,disabled:!F||!H,loading:x,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),s("apply")]}),(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:ak,disabled:!t.hasOmniRoute,loading:z,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),s("reset")]}),(0,d.jsxs)(f.$n,{variant:"ghost",size:"sm",onClick:()=>O(!0),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),s("manualConfig")]}),(0,d.jsx)("div",{className:"flex-1"}),(0,d.jsxs)(f.$n,{variant:"ghost",size:"sm",onClick:()=>{U(!T),T||al()},children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"manage_accounts"}),s("profiles")]}),(0,d.jsxs)(f.$n,{variant:"ghost",size:"sm",onClick:()=>{ac(!ab),ab||ap()},children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"history"}),s("backups"),_.length>0&&` (${_.length})`]})]}),T&&(0,d.jsxs)("div",{className:"mt-2 p-3 bg-surface border border-border rounded-lg",children:[(0,d.jsxs)("h4",{className:"text-xs font-semibold text-text-main mb-2 flex items-center gap-1",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"manage_accounts"}),s("savedProfiles")]}),0===R.length?(0,d.jsx)("p",{className:"text-xs text-text-muted",children:s("noProfilesYet")}):(0,d.jsx)("div",{className:"space-y-1.5 mb-3",children:R.map(a=>(0,d.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,d.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"person"}),(0,d.jsx)("span",{className:"font-medium flex-1 truncate",children:a.name}),(0,d.jsx)("span",{className:"text-text-muted truncate max-w-[140px]",title:a.authLabel,children:a.authLabel}),(0,d.jsx)("button",{onClick:()=>an(a.id),disabled:Z===a.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:Z===a.id?"...":s("activate")}),(0,d.jsx)("button",{onClick:()=>ao(a.id),className:"p-0.5 text-text-muted hover:text-red-500 transition-colors",title:s("deleteProfile"),children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"delete"})})]},a.id))}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("input",{type:"text",value:V,onChange:a=>W(a.target.value),placeholder:s("profileNamePlaceholder"),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",onKeyDown:a=>"Enter"===a.key&&am()}),(0,d.jsxs)(f.$n,{variant:"primary",size:"sm",onClick:am,disabled:!V.trim(),loading:X,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),s("saveCurrent")]})]})]}),ab&&(0,d.jsxs)("div",{className:"mt-2 p-3 bg-surface border border-border rounded-lg",children:[(0,d.jsxs)("h4",{className:"text-xs font-semibold text-text-main mb-2 flex items-center gap-1",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"history"}),s("configBackups")]}),0===_.length?(0,d.jsx)("p",{className:"text-xs text-text-muted",children:s("noBackupsYet")}):(0,d.jsx)("div",{className:"space-y-1.5",children:_.map(a=>(0,d.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,d.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"description"}),(0,d.jsx)("span",{className:"flex-1 truncate font-mono",title:a.id,children:a.id}),(0,d.jsx)("span",{className:"text-text-muted whitespace-nowrap",children:new Date(a.createdAt).toLocaleString()}),(0,d.jsx)("button",{onClick:()=>aq(a.id),disabled:ad===a.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:ad===a.id?"...":s("restore")})]},a.id))})]})]})]}),(0,d.jsx)(f.rq,{isOpen:J,onClose:()=>K(!1),onSelect:a=>{I(a.value),K(!1)},selectedModel:H,activeProviders:k,modelAliases:L,title:s("selectModelForTool",{tool:"Codex"})}),(0,d.jsx)(f.uR,{isOpen:N,onClose:()=>O(!1),title:s("codexManualConfiguration"),configs:(r=F&&F.trim()?F:m?"<API_KEY_FROM_DASHBOARD>":"sk_omniroute",[{filename:"~/.codex/config.toml",content:`# OmniRoute Configuration for Codex CLI
|
|
7
|
+
}`}},antigravity:{id:"antigravity",name:"Antigravity",image:"/providers/antigravity.png",color:"#4285F4",description:"Google Antigravity IDE with MITM",configType:"mitm",modelAliases:["claude-opus-4-6-thinking","claude-sonnet-4-6","gemini-3-flash","gpt-oss-120b-medium","gemini-3.1-pro-high","gemini-3.1-pro-low"],defaultModels:[{id:"gemini-3.1-pro-high",name:"Gemini 3.1 Pro High",alias:"gemini-3.1-pro-high"},{id:"gemini-3.1-pro-low",name:"Gemini 3.1 Pro Low",alias:"gemini-3.1-pro-low"},{id:"gemini-3-flash",name:"Gemini 3 Flash",alias:"gemini-3-flash"},{id:"claude-sonnet-4-6",name:"Claude Sonnet 4.6",alias:"claude-sonnet-4-6"},{id:"claude-opus-4-6-thinking",name:"Claude Opus 4.6 Thinking",alias:"claude-opus-4-6-thinking"},{id:"gpt-oss-120b-medium",name:"GPT OSS 120B Medium",alias:"gpt-oss-120b-medium"}]},copilot:{id:"copilot",name:"GitHub Copilot",image:"/providers/copilot.png",color:"#1F6FEB",description:"GitHub Copilot Chat — VS Code Extension",configType:"custom"}};var h=c(47825),i=c(81220),j=c(77360),k=c(89400);function l({effectiveConfigStatus:a,batchStatus:b,lastConfiguredAt:c=null}){let e=(0,j.c)("cliTools"),f=(0,k.Ym)(),g=a||b?.configStatus||null,h={configured:{dotClass:"bg-green-500",badgeClass:"bg-green-500/10 text-green-600 dark:text-green-400",text:e("configured")},not_configured:{dotClass:"bg-yellow-500",badgeClass:"bg-yellow-500/10 text-yellow-600 dark:text-yellow-400",text:e("notConfigured")},not_installed:{dotClass:"bg-zinc-400 dark:bg-zinc-500",badgeClass:"bg-zinc-500/10 text-zinc-500 dark:text-zinc-400",text:e("notInstalled")},other:{dotClass:"bg-blue-500",badgeClass:"bg-blue-500/10 text-blue-600 dark:text-blue-400",text:e("custom")},unknown:{dotClass:"bg-zinc-400 dark:bg-zinc-500",badgeClass:"bg-zinc-500/10 text-zinc-500 dark:text-zinc-400",text:e("unknown")}},i=g?h[g]||h.unknown:null;return(0,d.jsxs)(d.Fragment,{children:[i&&(0,d.jsxs)("span",{className:`inline-flex items-center gap-1.5 px-2 py-0.5 text-[11px] font-medium rounded-full ${i.badgeClass}`,children:[(0,d.jsx)("span",{className:`size-1.5 rounded-full ${i.dotClass}`}),i.text]}),c?(0,d.jsxs)("span",{className:"inline-flex items-center gap-1 px-1.5 py-0.5 text-[10px] text-text-muted",title:e("lastSavedAt",{date:new Date(c).toLocaleString(f)}),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"schedule"}),function(a,b){let c=Date.now()-new Date(a).getTime();if(c<0)return b("justNow");let d=Math.floor(c/1e3);if(d<60)return b("justNow");let e=Math.floor(d/60);if(e<60)return b("minutesAgoShort",{count:e});let f=Math.floor(e/60);if(f<24)return b("hoursAgoShort",{count:f});let g=Math.floor(f/24);if(g<30)return b("daysAgoShort",{count:g});let h=Math.floor(g/30);return h<12?b("monthsAgoShort",{count:h}):b("yearsAgoShort",{count:Math.floor(h/12)})}(c,e)]}):g&&"not_installed"!==g?(0,d.jsxs)("span",{className:"inline-flex items-center gap-1 px-1.5 py-0.5 text-[10px] text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"schedule"}),e("never")]}):null]})}let m="https://cloud.omniroute.online";function n({tool:a,isExpanded:b,onToggle:c,activeProviders:g,modelMappings:h,onModelMappingChange:k,baseUrl:n,hasActiveProviders:o,apiKeys:p,cloudEnabled:q,batchStatus:r,lastConfiguredAt:s}){let t,u,v,w=(0,j.c)("cliTools"),[x,y]=(0,e.useState)(null),[z,A]=(0,e.useState)(!1),[B,C]=(0,e.useState)(!1),[D,E]=(0,e.useState)(!1),[F,G]=(0,e.useState)(null),[H,I]=(0,e.useState)(!1),[J,K]=(0,e.useState)(!1),[L,M]=(0,e.useState)(null),[N,O]=(0,e.useState)(""),[P,Q]=(0,e.useState)({}),[R,S]=(0,e.useState)(!1),[T,U]=(0,e.useState)("");(0,e.useRef)(!1);let[V,W]=(0,e.useState)([]),[X,Y]=(0,e.useState)(!1),[Z,$]=(0,e.useState)(null),_=!!(x?.installed&&x?.runnable),aa=(()=>{if(!_)return null;let a=x.settings?.env?.ANTHROPIC_BASE_URL;if(!a)return"not_configured";let b=a.includes("localhost")||a.includes("127.0.0.1"),c=q&&m&&a.startsWith(m);return b||c?"configured":"other"})()||r?.configStatus||null,ab=async()=>{A(!0);try{let a=await fetch("/api/cli-tools/claude-settings"),b=await a.json();y(b)}catch(a){y({installed:!1,error:a.message})}finally{A(!1)}},ac=()=>{let a=T||n;return a.endsWith("/v1")?a:`${a}/v1`},ad=async()=>{C(!0),G(null);try{let b={ANTHROPIC_BASE_URL:ac()},c=N?.trim()||(p?.length>0?p[0].key:null)||(q?null:"sk_omniroute");c&&(b.ANTHROPIC_AUTH_TOKEN=c),a.defaultModels.forEach(a=>{let c=h[a.alias];c&&a.envKey&&(b[a.envKey]=c)});let d=await fetch("/api/cli-tools/claude-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({env:b})}),e=await d.json();d.ok?(G({type:"success",text:w("settingsApplied")}),y(a=>({...a,hasBackup:!0,settings:{...a?.settings,env:b}}))):G({type:"error",text:e.error||w("failedApplySettings")})}catch(a){G({type:"error",text:a.message})}finally{C(!1)}},ae=async()=>{E(!0),G(null);try{let b=await fetch("/api/cli-tools/claude-settings",{method:"DELETE"}),c=await b.json();b.ok?(G({type:"success",text:w("settingsReset")}),a.defaultModels.forEach(a=>k(a.alias,a.defaultValue||"")),O("")):G({type:"error",text:c.error||w("failedResetSettings")})}catch(a){G({type:"error",text:a.message})}finally{E(!1)}},af=async()=>{try{let a=await fetch("/api/cli-tools/backups?tool=claude"),b=await a.json();a.ok&&W(b.backups||[])}catch(a){console.log("Error fetching backups:",a)}},ag=async a=>{$(a),G(null);try{let b=await fetch("/api/cli-tools/backups",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({tool:"claude",backupId:a})}),c=await b.json();b.ok?(G({type:"success",text:w("backupRestored")}),ab(),af()):G({type:"error",text:c.error||w("failedRestore")})}catch(a){G({type:"error",text:a.message})}finally{$(null)}};return(0,d.jsxs)(f.Zp,{padding:"sm",className:"overflow-hidden",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:c,children:[(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,d.jsx)(i.default,{src:"/providers/claude.png",alt:a.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:a=>{a.currentTarget.style.display="none"}})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("h3",{className:"font-medium text-sm",children:a.name}),(0,d.jsx)(l,{effectiveConfigStatus:aa,batchStatus:r,lastConfiguredAt:s})]}),(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:w("toolDescriptions.claude")})]})]}),(0,d.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${b?"rotate-180":""}`,children:"expand_more"})]}),b&&(0,d.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[z&&(0,d.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,d.jsx)("span",{children:w("checkingCli",{tool:"Claude"})})]}),!z&&x&&!_&&(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{className:"flex items-center gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,d.jsxs)("div",{className:"flex-1",children:[(0,d.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:x.installed?w("cliNotRunnable",{tool:"Claude"}):w("cliNotInstalled",{tool:"Claude"})}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:x.installed?w("cliFoundFailedHealthcheck",{tool:"Claude",reason:x.reason?` (${x.reason})`:""}):w("installCliPrompt",{tool:"Claude"})})]}),(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:()=>I(!H),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:H?"expand_less":"help"}),H?w("hide"):w("howToInstall")]})]}),H&&(0,d.jsxs)("div",{className:"p-4 bg-surface border border-border rounded-lg",children:[(0,d.jsx)("h4",{className:"font-medium mb-3",children:w("installationGuide")}),(0,d.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"text-text-muted mb-1",children:w("platforms")}),(0,d.jsx)("code",{className:"block px-3 py-2 bg-black/5 dark:bg-white/5 rounded font-mono text-xs",children:"npm install -g @anthropic-ai/claude-code"})]}),(0,d.jsxs)("p",{className:"text-text-muted",children:[w("afterInstallationRun")," ",(0,d.jsx)("code",{className:"px-1 bg-black/5 dark:bg-white/5 rounded",children:"claude"})," ",w("toVerify")]})]})]})]}),!z&&_&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[x?.settings?.env?.ANTHROPIC_BASE_URL&&(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:w("current")}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("span",{className:"flex-1 px-2 py-1.5 text-xs text-text-muted truncate",children:x.settings.env.ANTHROPIC_BASE_URL})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:w("baseUrl")}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("input",{type:"text",value:(t=T||n).endsWith("/v1")?t:`${t}/v1`,onChange:a=>U(a.target.value),placeholder:w("baseUrlPlaceholder"),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"}),T&&T!==n&&(0,d.jsx)("button",{onClick:()=>U(""),className:"p-1 text-text-muted hover:text-primary rounded transition-colors",title:w("resetToDefault"),children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"restart_alt"})})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:w("apiKey")}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),p.length>0?(0,d.jsx)("select",{value:N,onChange:a=>O(a.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:p.map(a=>(0,d.jsx)("option",{value:a.key,children:a.key},a.id))}):(0,d.jsx)("span",{className:"flex-1 text-xs text-text-muted px-2 py-1.5",children:q?w("noApiKeysCreateOne"):w("defaultOmnirouteKey")})]}),a.defaultModels.map(a=>(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:a.name}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("input",{type:"text",value:h[a.alias]||"",onChange:b=>k(a.alias,b.target.value),placeholder:w("providerModelPlaceholder"),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,d.jsx)("button",{onClick:()=>{M(a.alias),K(!0)},disabled:!o,className:`px-2 py-1.5 rounded border text-xs transition-colors shrink-0 whitespace-nowrap ${o?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:w("selectModel")}),h[a.alias]&&(0,d.jsx)("button",{onClick:()=>k(a.alias,""),className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors",title:w("clear"),children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]},a.alias))]}),F&&(0,d.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===F.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===F.type?"check_circle":"error"}),(0,d.jsx)("span",{children:F.text})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsxs)(f.$n,{variant:"primary",size:"sm",onClick:ad,disabled:!o,loading:B,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),w("apply")]}),(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:ae,disabled:!x?.hasOmniRoute,loading:D,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),w("reset")]}),(0,d.jsxs)(f.$n,{variant:"ghost",size:"sm",onClick:()=>S(!0),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),w("manualConfig")]}),(0,d.jsx)("div",{className:"flex-1"}),(0,d.jsxs)(f.$n,{variant:"ghost",size:"sm",onClick:()=>{Y(!X),X||af()},children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"history"}),w("backups"),V.length>0&&` (${V.length})`]})]}),X&&(0,d.jsxs)("div",{className:"mt-2 p-3 bg-surface border border-border rounded-lg",children:[(0,d.jsxs)("h4",{className:"text-xs font-semibold text-text-main mb-2 flex items-center gap-1",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"history"}),w("configBackups")]}),0===V.length?(0,d.jsx)("p",{className:"text-xs text-text-muted",children:w("noBackupsYet")}):(0,d.jsx)("div",{className:"space-y-1.5",children:V.map(a=>(0,d.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,d.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"description"}),(0,d.jsx)("span",{className:"flex-1 truncate font-mono",title:a.id,children:a.id}),(0,d.jsx)("span",{className:"text-text-muted whitespace-nowrap",children:new Date(a.createdAt).toLocaleString()}),(0,d.jsx)("button",{onClick:()=>ag(a.id),disabled:Z===a.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:Z===a.id?"...":w("restore")})]},a.id))})]})]})]}),(0,d.jsx)(f.rq,{isOpen:J,onClose:()=>K(!1),onSelect:a=>{L&&k(L,a.value)},selectedModel:L?h[L]:null,activeProviders:g,modelAliases:P,title:w("selectModelForAlias",{alias:L||""})}),(0,d.jsx)(f.uR,{isOpen:R,onClose:()=>S(!1),title:w("claudeManualConfiguration"),configs:(u=N&&N.trim()?N:q?"<API_KEY_FROM_DASHBOARD>":"sk_omniroute",v={ANTHROPIC_BASE_URL:ac(),ANTHROPIC_AUTH_TOKEN:u},a.defaultModels.forEach(a=>{let b=h[a.alias];b&&a.envKey&&(v[a.envKey]=b)}),[{filename:"~/.claude/settings.json",content:JSON.stringify({env:v},null,2)}])})]})}function o({tool:a,isExpanded:b,onToggle:c,baseUrl:g,apiKeys:h,activeProviders:k,cloudEnabled:m,batchStatus:n,lastConfiguredAt:o}){let p,q,r,s=(0,j.c)("cliTools"),[t,u]=(0,e.useState)(null),[v,w]=(0,e.useState)(!1),[x,y]=(0,e.useState)(!1),[z,A]=(0,e.useState)(!1),[B,C]=(0,e.useState)(null),[D,E]=(0,e.useState)(!1),[F,G]=(0,e.useState)(""),[H,I]=(0,e.useState)(""),[J,K]=(0,e.useState)(!1),[L,M]=(0,e.useState)({}),[N,O]=(0,e.useState)(!1),[P,Q]=(0,e.useState)(""),[R,S]=(0,e.useState)([]),[T,U]=(0,e.useState)(!1),[V,W]=(0,e.useState)(""),[X,Y]=(0,e.useState)(!1),[Z,$]=(0,e.useState)(null),[_,aa]=(0,e.useState)([]),[ab,ac]=(0,e.useState)(!1),[ad,ae]=(0,e.useState)(null),af=!!(t?.installed&&t?.runnable),ag=(af?t.config?t.config.includes(g)||t.config.includes("localhost")||t.config.includes("127.0.0.1")?"configured":"other":"not_configured":null)||n?.configStatus||null,ah=()=>{let a=P||`${g}/v1`;return a.endsWith("/v1")?a:`${a}/v1`},ai=async()=>{w(!0);try{let a=await fetch("/api/cli-tools/codex-settings"),b=await a.json();u(b)}catch(a){u({installed:!1,error:a.message})}finally{w(!1)}},aj=async()=>{y(!0),C(null);try{let a=F&&F.trim()||m?F:"sk_omniroute",b=await fetch("/api/cli-tools/codex-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:ah(),apiKey:a,model:H})}),c=await b.json();b.ok?(C({type:"success",text:s("settingsApplied")}),ai()):C({type:"error",text:c.error||s("failedApplySettings")})}catch(a){C({type:"error",text:a.message})}finally{y(!1)}},ak=async()=>{A(!0),C(null);try{let a=await fetch("/api/cli-tools/codex-settings",{method:"DELETE"}),b=await a.json();a.ok?(C({type:"success",text:s("settingsReset")}),I(""),ai()):C({type:"error",text:b.error||s("failedResetSettings")})}catch(a){C({type:"error",text:a.message})}finally{A(!1)}},al=async()=>{try{let a=await fetch("/api/cli-tools/codex-profiles"),b=await a.json();a.ok&&S(b.profiles||[])}catch(a){console.log("Error fetching profiles:",a)}},am=async()=>{if(V.trim()){Y(!0),C(null);try{let a=await fetch("/api/cli-tools/codex-profiles",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:V.trim()})}),b=await a.json();a.ok?(C({type:"success",text:s("profileSaved",{name:V})}),W(""),al()):C({type:"error",text:b.error||s("failedSaveProfile")})}catch(a){C({type:"error",text:a.message})}finally{Y(!1)}}},an=async a=>{$(a),C(null);try{let b=await fetch("/api/cli-tools/codex-profiles",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({profileId:a})}),c=await b.json();b.ok?(C({type:"success",text:c.message||s("profileActivated")}),ai(),ap()):C({type:"error",text:c.error||s("failedActivateProfile")})}catch(a){C({type:"error",text:a.message})}finally{$(null)}},ao=async a=>{try{(await fetch("/api/cli-tools/codex-profiles",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({profileId:a})})).ok&&al()}catch(a){console.log("Error deleting profile:",a)}},ap=async()=>{try{let a=await fetch("/api/cli-tools/backups?tool=codex"),b=await a.json();a.ok&&aa(b.backups||[])}catch(a){console.log("Error fetching backups:",a)}},aq=async a=>{ae(a),C(null);try{let b=await fetch("/api/cli-tools/backups",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({tool:"codex",backupId:a})}),c=await b.json();b.ok?(C({type:"success",text:s("backupRestored")}),ai(),ap()):C({type:"error",text:c.error||s("failedRestore")})}catch(a){C({type:"error",text:a.message})}finally{ae(null)}};return(0,d.jsxs)(f.Zp,{padding:"sm",className:"overflow-hidden",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:c,children:[(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,d.jsx)(i.default,{src:"/providers/codex.png",alt:a.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:a=>{a.currentTarget.style.display="none"}})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("h3",{className:"font-medium text-sm",children:a.name}),(0,d.jsx)(l,{effectiveConfigStatus:ag,batchStatus:n,lastConfiguredAt:o})]}),(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:s("toolDescriptions.codex")})]})]}),(0,d.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${b?"rotate-180":""}`,children:"expand_more"})]}),b&&(0,d.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[v&&(0,d.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,d.jsx)("span",{children:s("checkingCli",{tool:"Codex"})})]}),!v&&t&&!af&&(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{className:"flex items-center gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,d.jsxs)("div",{className:"flex-1",children:[(0,d.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:t.installed?s("cliNotRunnable",{tool:"Codex"}):s("cliNotInstalled",{tool:"Codex"})}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:t.installed?s("cliFoundFailedHealthcheck",{tool:"Codex",reason:t.reason?` (${t.reason})`:""}):s("installCodexPrompt")})]}),(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:()=>E(!D),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:D?"expand_less":"help"}),D?s("hide"):s("howToInstall")]})]}),D&&(0,d.jsxs)("div",{className:"p-4 bg-surface border border-border rounded-lg",children:[(0,d.jsx)("h4",{className:"font-medium mb-3",children:s("installationGuide")}),(0,d.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"text-text-muted mb-1",children:s("platforms")}),(0,d.jsx)("code",{className:"block px-3 py-2 bg-black/5 dark:bg-white/5 rounded font-mono text-xs",children:"npm install -g @openai/codex"})]}),(0,d.jsxs)("p",{className:"text-text-muted",children:[s("afterInstallationRun")," ",(0,d.jsx)("code",{className:"px-1 bg-black/5 dark:bg-white/5 rounded",children:"codex"})," ",s("toVerify")]}),(0,d.jsx)("div",{className:"pt-2 border-t border-border",children:(0,d.jsxs)("p",{className:"text-text-muted text-xs",children:[s("codexAuthNotePrefix")," ",(0,d.jsx)("code",{className:"px-1 bg-black/5 dark:bg-white/5 rounded",children:"~/.codex/auth.json"})," ",s("codexAuthNoteMiddle")," ",(0,d.jsx)("code",{className:"px-1 bg-black/5 dark:bg-white/5 rounded",children:"OPENAI_API_KEY"}),". ",s("codexAuthNoteSuffix")]})})]})]})]}),!v&&af&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[t?.config&&((q=(p=t.config.match(/base_url\s*=\s*"([^"]+)"/))?p[1]:null)?(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:s("current")}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("span",{className:"flex-1 px-2 py-1.5 text-xs text-text-muted truncate",children:q})]}):null),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:s("baseUrl")}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("input",{type:"text",value:P||`${g}/v1`,onChange:a=>Q(a.target.value),placeholder:s("baseUrlPlaceholder"),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"}),P&&P!==`${g}/v1`&&(0,d.jsx)("button",{onClick:()=>Q(""),className:"p-1 text-text-muted hover:text-primary rounded transition-colors",title:s("resetToDefault"),children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"restart_alt"})})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:s("apiKey")}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),h.length>0?(0,d.jsx)("select",{value:F,onChange:a=>G(a.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:h.map(a=>(0,d.jsx)("option",{value:a.key,children:a.key},a.id))}):(0,d.jsx)("span",{className:"flex-1 text-xs text-text-muted px-2 py-1.5",children:m?s("noApiKeysCreateOne"):s("defaultOmnirouteKey")})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:s("model")}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("input",{type:"text",value:H,onChange:a=>I(a.target.value),placeholder:s("providerModelPlaceholder"),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,d.jsx)("button",{onClick:()=>K(!0),disabled:!k?.length,className:`px-2 py-1.5 rounded border text-xs transition-colors shrink-0 whitespace-nowrap ${k?.length?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:s("selectModel")}),H&&(0,d.jsx)("button",{onClick:()=>I(""),className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors",title:s("clear"),children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})]}),B&&(0,d.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===B.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===B.type?"check_circle":"error"}),(0,d.jsx)("span",{children:B.text})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsxs)(f.$n,{variant:"primary",size:"sm",onClick:aj,disabled:!F||!H,loading:x,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),s("apply")]}),(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:ak,disabled:!t.hasOmniRoute,loading:z,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),s("reset")]}),(0,d.jsxs)(f.$n,{variant:"ghost",size:"sm",onClick:()=>O(!0),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),s("manualConfig")]}),(0,d.jsx)("div",{className:"flex-1"}),(0,d.jsxs)(f.$n,{variant:"ghost",size:"sm",onClick:()=>{U(!T),T||al()},children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"manage_accounts"}),s("profiles")]}),(0,d.jsxs)(f.$n,{variant:"ghost",size:"sm",onClick:()=>{ac(!ab),ab||ap()},children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"history"}),s("backups"),_.length>0&&` (${_.length})`]})]}),T&&(0,d.jsxs)("div",{className:"mt-2 p-3 bg-surface border border-border rounded-lg",children:[(0,d.jsxs)("h4",{className:"text-xs font-semibold text-text-main mb-2 flex items-center gap-1",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"manage_accounts"}),s("savedProfiles")]}),0===R.length?(0,d.jsx)("p",{className:"text-xs text-text-muted",children:s("noProfilesYet")}):(0,d.jsx)("div",{className:"space-y-1.5 mb-3",children:R.map(a=>(0,d.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,d.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"person"}),(0,d.jsx)("span",{className:"font-medium flex-1 truncate",children:a.name}),(0,d.jsx)("span",{className:"text-text-muted truncate max-w-[140px]",title:a.authLabel,children:a.authLabel}),(0,d.jsx)("button",{onClick:()=>an(a.id),disabled:Z===a.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:Z===a.id?"...":s("activate")}),(0,d.jsx)("button",{onClick:()=>ao(a.id),className:"p-0.5 text-text-muted hover:text-red-500 transition-colors",title:s("deleteProfile"),children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"delete"})})]},a.id))}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("input",{type:"text",value:V,onChange:a=>W(a.target.value),placeholder:s("profileNamePlaceholder"),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",onKeyDown:a=>"Enter"===a.key&&am()}),(0,d.jsxs)(f.$n,{variant:"primary",size:"sm",onClick:am,disabled:!V.trim(),loading:X,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),s("saveCurrent")]})]})]}),ab&&(0,d.jsxs)("div",{className:"mt-2 p-3 bg-surface border border-border rounded-lg",children:[(0,d.jsxs)("h4",{className:"text-xs font-semibold text-text-main mb-2 flex items-center gap-1",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"history"}),s("configBackups")]}),0===_.length?(0,d.jsx)("p",{className:"text-xs text-text-muted",children:s("noBackupsYet")}):(0,d.jsx)("div",{className:"space-y-1.5",children:_.map(a=>(0,d.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,d.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"description"}),(0,d.jsx)("span",{className:"flex-1 truncate font-mono",title:a.id,children:a.id}),(0,d.jsx)("span",{className:"text-text-muted whitespace-nowrap",children:new Date(a.createdAt).toLocaleString()}),(0,d.jsx)("button",{onClick:()=>aq(a.id),disabled:ad===a.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:ad===a.id?"...":s("restore")})]},a.id))})]})]})]}),(0,d.jsx)(f.rq,{isOpen:J,onClose:()=>K(!1),onSelect:a=>{I(a.value),K(!1)},selectedModel:H,activeProviders:k,modelAliases:L,title:s("selectModelForTool",{tool:"Codex"})}),(0,d.jsx)(f.uR,{isOpen:N,onClose:()=>O(!1),title:s("codexManualConfiguration"),configs:(r=F&&F.trim()?F:m?"<API_KEY_FROM_DASHBOARD>":"sk_omniroute",[{filename:"~/.codex/config.toml",content:`# OmniRoute Configuration for Codex CLI
|
|
8
8
|
model = "${H}"
|
|
9
9
|
model_provider = "omniroute"
|
|
10
10
|
|
|
@@ -12,5 +12,5 @@ model_provider = "omniroute"
|
|
|
12
12
|
name = "OmniRoute"
|
|
13
13
|
base_url = "${ah()}"
|
|
14
14
|
wire_api = "responses"
|
|
15
|
-
`},{filename:"~/.codex/auth.json",content:JSON.stringify({OPENAI_API_KEY:r},null,2)}])})]})}let p=process.env.NEXT_PUBLIC_CLOUD_URL;function q({tool:a,isExpanded:b,onToggle:c,baseUrl:g,hasActiveProviders:h,apiKeys:k,activeProviders:m,cloudEnabled:n,batchStatus:o,lastConfiguredAt:q}){let r,s,t,u,v=(0,j.c)("cliTools"),[w,x]=(0,e.useState)(null),[y,z]=(0,e.useState)(!1),[A,B]=(0,e.useState)(!1),[C,D]=(0,e.useState)(!1),[E,F]=(0,e.useState)(null),[G,H]=(0,e.useState)(""),[I,J]=(0,e.useState)(""),[K,L]=(0,e.useState)(!1),[M,N]=(0,e.useState)({}),[O,P]=(0,e.useState)(!1),[Q,R]=(0,e.useState)("");(0,e.useRef)(!1);let[S,T]=(0,e.useState)([]),[U,V]=(0,e.useState)(!1),[W,X]=(0,e.useState)(null),Y=!!(w?.installed&&w?.runnable),Z=(()=>{if(!Y)return null;let a=w.settings?.customModels?.find(a=>"custom:OmniRoute-0"===a.id);if(!a)return"not_configured";let b=a.baseUrl?.includes("localhost")||a.baseUrl?.includes("127.0.0.1"),c=n&&p&&a.baseUrl?.startsWith(p);return b||c?"configured":"other"})()||o?.configStatus||null,$=async()=>{z(!0);try{let a=await fetch("/api/cli-tools/droid-settings"),b=await a.json();x(b)}catch(a){x({installed:!1,error:a.message})}finally{z(!1)}},_=()=>{let a=Q||g;return a.endsWith("/v1")?a:`${a}/v1`},aa=async()=>{B(!0),F(null);try{let a=G?.trim()||(k?.length>0?k[0].key:null)||(n?null:"sk_omniroute"),b=await fetch("/api/cli-tools/droid-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:_(),apiKey:a,model:I})}),c=await b.json();b.ok?(F({type:"success",text:v("settingsApplied")}),$()):F({type:"error",text:c.error||v("failedApplySettings")})}catch(a){F({type:"error",text:a.message})}finally{B(!1)}},ab=async()=>{D(!0),F(null);try{let a=await fetch("/api/cli-tools/droid-settings",{method:"DELETE"}),b=await a.json();a.ok?(F({type:"success",text:v("settingsReset")}),J(""),H(""),$()):F({type:"error",text:b.error||v("failedResetSettings")})}catch(a){F({type:"error",text:a.message})}finally{D(!1)}},ac=async()=>{try{let a=await fetch("/api/cli-tools/backups?tool=droid"),b=await a.json();a.ok&&T(b.backups||[])}catch(a){console.log("Error fetching backups:",a)}},ad=async a=>{X(a),F(null);try{let b=await fetch("/api/cli-tools/backups",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({tool:"droid",backupId:a})}),c=await b.json();b.ok?(F({type:"success",text:v("backupRestored")}),$(),ac()):F({type:"error",text:c.error||v("failedRestore")})}catch(a){F({type:"error",text:a.message})}finally{X(null)}};return(0,d.jsxs)(f.Zp,{padding:"sm",className:"overflow-hidden",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:c,children:[(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,d.jsx)(i.default,{src:"/providers/droid.png",alt:a.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:a=>{a.currentTarget.style.display="none"}})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("h3",{className:"font-medium text-sm",children:a.name}),(0,d.jsx)(l,{effectiveConfigStatus:Z,batchStatus:o,lastConfiguredAt:q})]}),(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:v("toolDescriptions.droid")})]})]}),(0,d.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${b?"rotate-180":""}`,children:"expand_more"})]}),b&&(0,d.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[y&&(0,d.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,d.jsx)("span",{children:v("checkingCli",{tool:"Factory Droid"})})]}),!y&&w&&!Y&&(0,d.jsxs)("div",{className:"flex items-center gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,d.jsxs)("div",{className:"flex-1",children:[(0,d.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:w.installed?v("cliNotRunnable",{tool:"Factory Droid"}):v("cliNotInstalled",{tool:"Factory Droid"})}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:w.installed?v("cliFoundFailedHealthcheck",{tool:"Factory Droid",reason:w.reason?` (${w.reason})`:""}):v("installCliPrompt",{tool:"Factory Droid"})})]})]}),!y&&Y&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[w?.settings?.customModels?.find(a=>"custom:OmniRoute-0"===a.id)?.baseUrl&&(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:v("current")}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("span",{className:"flex-1 px-2 py-1.5 text-xs text-text-muted truncate",children:w.settings.customModels.find(a=>"custom:OmniRoute-0"===a.id).baseUrl})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:v("baseUrl")}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("input",{type:"text",value:(r=Q||g).endsWith("/v1")?r:`${r}/v1`,onChange:a=>R(a.target.value),placeholder:v("baseUrlPlaceholder"),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"}),Q&&Q!==g&&(0,d.jsx)("button",{onClick:()=>R(""),className:"p-1 text-text-muted hover:text-primary rounded transition-colors",title:v("resetToDefault"),children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"restart_alt"})})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:v("apiKey")}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),k.length>0?(0,d.jsx)("select",{value:G,onChange:a=>H(a.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:k.map(a=>(0,d.jsx)("option",{value:a.key,children:a.key},a.id))}):(0,d.jsx)("span",{className:"flex-1 text-xs text-text-muted px-2 py-1.5",children:n?v("noApiKeysCreateOne"):v("defaultOmnirouteKey")})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:v("model")}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("input",{type:"text",value:I,onChange:a=>J(a.target.value),placeholder:v("providerModelPlaceholder"),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,d.jsx)("button",{onClick:()=>L(!0),disabled:!h,className:`px-2 py-1.5 rounded border text-xs transition-colors shrink-0 whitespace-nowrap ${h?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:v("selectModel")}),I&&(0,d.jsx)("button",{onClick:()=>J(""),className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors",title:v("clear"),children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})]}),E&&(0,d.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===E.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===E.type?"check_circle":"error"}),(0,d.jsx)("span",{children:E.text})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsxs)(f.$n,{variant:"primary",size:"sm",onClick:aa,disabled:!I,loading:A,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),v("apply")]}),(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:ab,disabled:!w?.hasOmniRoute,loading:C,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),v("reset")]}),(0,d.jsxs)(f.$n,{variant:"ghost",size:"sm",onClick:()=>P(!0),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),v("manualConfig")]}),(0,d.jsx)("div",{className:"flex-1"}),(0,d.jsxs)(f.$n,{variant:"ghost",size:"sm",onClick:()=>{V(!U),U||ac()},children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"history"}),v("backups"),S.length>0&&` (${S.length})`]})]}),U&&(0,d.jsxs)("div",{className:"mt-2 p-3 bg-surface border border-border rounded-lg",children:[(0,d.jsxs)("h4",{className:"text-xs font-semibold text-text-main mb-2 flex items-center gap-1",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"history"}),v("configBackups")]}),0===S.length?(0,d.jsx)("p",{className:"text-xs text-text-muted",children:v("noBackupsYet")}):(0,d.jsx)("div",{className:"space-y-1.5",children:S.map(a=>(0,d.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,d.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"description"}),(0,d.jsx)("span",{className:"flex-1 truncate font-mono",title:a.id,children:a.id}),(0,d.jsx)("span",{className:"text-text-muted whitespace-nowrap",children:new Date(a.createdAt).toLocaleString()}),(0,d.jsx)("button",{onClick:()=>ad(a.id),disabled:W===a.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:W===a.id?"...":v("restore")})]},a.id))})]})]})]}),(0,d.jsx)(f.rq,{isOpen:K,onClose:()=>L(!1),onSelect:a=>{J(a.value),L(!1)},selectedModel:I,activeProviders:m,modelAliases:M,title:v("selectModelForTool",{tool:"Factory Droid"})}),(0,d.jsx)(f.uR,{isOpen:O,onClose:()=>P(!1),title:v("droidManualConfiguration"),configs:(s=G&&G.trim()?G:n?"<API_KEY_FROM_DASHBOARD>":"sk_omniroute",t={customModels:[{model:I||"provider/model-id",id:"custom:OmniRoute-0",index:0,baseUrl:_(),apiKey:s,displayName:I||"provider/model-id",maxOutputTokens:131072,noImageSupport:!1,provider:"openai"}]},u="u">typeof navigator&&navigator.platform,[{filename:u?.toLowerCase().includes("win")?"%USERPROFILE%\\.factory\\settings.json":"~/.factory/settings.json",content:JSON.stringify(t,null,2)}])})]})}let r=process.env.NEXT_PUBLIC_CLOUD_URL;function s({tool:a,isExpanded:b,onToggle:c,baseUrl:g,hasActiveProviders:h,apiKeys:k,activeProviders:m,cloudEnabled:n,batchStatus:o,lastConfiguredAt:p}){let q,s,t=(0,j.c)("cliTools"),[u,v]=(0,e.useState)(null),[w,x]=(0,e.useState)(!1),[y,z]=(0,e.useState)(!1),[A,B]=(0,e.useState)(!1),[C,D]=(0,e.useState)(null),[E,F]=(0,e.useState)(""),[G,H]=(0,e.useState)(""),[I,J]=(0,e.useState)(!1),[K,L]=(0,e.useState)({}),[M,N]=(0,e.useState)(!1),[O,P]=(0,e.useState)("");(0,e.useRef)(!1);let[Q,R]=(0,e.useState)([]),[S,T]=(0,e.useState)(!1),[U,V]=(0,e.useState)(null),W=!!(u?.installed&&u?.runnable),X=(()=>{if(!W)return null;let a=u.settings?.models?.providers?.omniroute;if(!a)return"not_configured";let b=a.baseUrl?.includes("localhost")||a.baseUrl?.includes("127.0.0.1"),c=n&&r&&a.baseUrl?.startsWith(r);return b||c?"configured":"other"})()||o?.configStatus||null,Y=async()=>{x(!0);try{let a=await fetch("/api/cli-tools/openclaw-settings"),b=await a.json();v(b)}catch(a){v({installed:!1,error:a.message})}finally{x(!1)}},Z=()=>{let a=O||g;return a.endsWith("/v1")?a:`${a}/v1`},$=async()=>{z(!0),D(null);try{let a=E?.trim()||(k?.length>0?k[0].key:null)||(n?null:"sk_omniroute"),b=await fetch("/api/cli-tools/openclaw-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:Z(),apiKey:a,model:G})}),c=await b.json();b.ok?(D({type:"success",text:t("settingsApplied")}),Y()):D({type:"error",text:c.error||t("failedApplySettings")})}catch(a){D({type:"error",text:a.message})}finally{z(!1)}},_=async()=>{B(!0),D(null);try{let a=await fetch("/api/cli-tools/openclaw-settings",{method:"DELETE"}),b=await a.json();a.ok?(D({type:"success",text:t("settingsReset")}),H(""),F(""),Y()):D({type:"error",text:b.error||t("failedResetSettings")})}catch(a){D({type:"error",text:a.message})}finally{B(!1)}},aa=async()=>{try{let a=await fetch("/api/cli-tools/backups?tool=openclaw"),b=await a.json();a.ok&&R(b.backups||[])}catch(a){console.log("Error fetching backups:",a)}},ab=async a=>{V(a),D(null);try{let b=await fetch("/api/cli-tools/backups",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({tool:"openclaw",backupId:a})}),c=await b.json();b.ok?(D({type:"success",text:t("backupRestored")}),Y(),aa()):D({type:"error",text:c.error||t("failedRestore")})}catch(a){D({type:"error",text:a.message})}finally{V(null)}};return(0,d.jsxs)(f.Zp,{padding:"sm",className:"overflow-hidden",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:c,children:[(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,d.jsx)(i.default,{src:"/providers/openclaw.png",alt:a.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:a=>{a.currentTarget.style.display="none"}})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("h3",{className:"font-medium text-sm",children:a.name}),(0,d.jsx)(l,{effectiveConfigStatus:X,batchStatus:o,lastConfiguredAt:p})]}),(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:t("toolDescriptions.openclaw")})]})]}),(0,d.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${b?"rotate-180":""}`,children:"expand_more"})]}),b&&(0,d.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[w&&(0,d.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,d.jsx)("span",{children:t("checkingCli",{tool:"Open Claw"})})]}),!w&&u&&!W&&(0,d.jsxs)("div",{className:"flex items-center gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,d.jsxs)("div",{className:"flex-1",children:[(0,d.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:u.installed?t("cliNotRunnable",{tool:"Open Claw"}):t("cliNotInstalled",{tool:"Open Claw"})}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:u.installed?t("cliFoundFailedHealthcheck",{tool:"Open Claw",reason:u.reason?` (${u.reason})`:""}):t("installCliPrompt",{tool:"Open Claw"})})]})]}),!w&&W&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[u?.settings?.models?.providers?.omniroute?.baseUrl&&(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:t("current")}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("span",{className:"flex-1 px-2 py-1.5 text-xs text-text-muted truncate",children:u.settings.models.providers.omniroute.baseUrl})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:t("baseUrl")}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("input",{type:"text",value:(q=O||g).endsWith("/v1")?q:`${q}/v1`,onChange:a=>P(a.target.value),placeholder:t("baseUrlPlaceholder"),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"}),O&&O!==g&&(0,d.jsx)("button",{onClick:()=>P(""),className:"p-1 text-text-muted hover:text-primary rounded transition-colors",title:t("resetToDefault"),children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"restart_alt"})})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:t("apiKey")}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),k.length>0?(0,d.jsx)("select",{value:E,onChange:a=>F(a.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:k.map(a=>(0,d.jsx)("option",{value:a.key,children:a.key},a.id))}):(0,d.jsx)("span",{className:"flex-1 text-xs text-text-muted px-2 py-1.5",children:n?t("noApiKeysCreateOne"):t("defaultOmnirouteKey")})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:t("model")}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("input",{type:"text",value:G,onChange:a=>H(a.target.value),placeholder:t("providerModelPlaceholder"),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,d.jsx)("button",{onClick:()=>J(!0),disabled:!h,className:`px-2 py-1.5 rounded border text-xs transition-colors shrink-0 whitespace-nowrap ${h?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:t("selectModel")}),G&&(0,d.jsx)("button",{onClick:()=>H(""),className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors",title:t("clear"),children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})]}),C&&(0,d.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===C.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===C.type?"check_circle":"error"}),(0,d.jsx)("span",{children:C.text})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsxs)(f.$n,{variant:"primary",size:"sm",onClick:$,disabled:!G,loading:y,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),t("apply")]}),(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:_,disabled:!u?.hasOmniRoute,loading:A,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),t("reset")]}),(0,d.jsxs)(f.$n,{variant:"ghost",size:"sm",onClick:()=>N(!0),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),t("manualConfig")]}),(0,d.jsx)("div",{className:"flex-1"}),(0,d.jsxs)(f.$n,{variant:"ghost",size:"sm",onClick:()=>{T(!S),S||aa()},children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"history"}),t("backups"),Q.length>0&&` (${Q.length})`]})]}),S&&(0,d.jsxs)("div",{className:"mt-2 p-3 bg-surface border border-border rounded-lg",children:[(0,d.jsxs)("h4",{className:"text-xs font-semibold text-text-main mb-2 flex items-center gap-1",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"history"}),t("configBackups")]}),0===Q.length?(0,d.jsx)("p",{className:"text-xs text-text-muted",children:t("noBackupsYet")}):(0,d.jsx)("div",{className:"space-y-1.5",children:Q.map(a=>(0,d.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,d.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"description"}),(0,d.jsx)("span",{className:"flex-1 truncate font-mono",title:a.id,children:a.id}),(0,d.jsx)("span",{className:"text-text-muted whitespace-nowrap",children:new Date(a.createdAt).toLocaleString()}),(0,d.jsx)("button",{onClick:()=>ab(a.id),disabled:U===a.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:U===a.id?"...":t("restore")})]},a.id))})]})]})]}),(0,d.jsx)(f.rq,{isOpen:I,onClose:()=>J(!1),onSelect:a=>{H(a.value),J(!1)},selectedModel:G,activeProviders:m,modelAliases:K,title:t("selectModelForTool",{tool:"Open Claw"})}),(0,d.jsx)(f.uR,{isOpen:M,onClose:()=>N(!1),title:t("openClawManualConfiguration"),configs:(s=E&&E.trim()?E:n?"<API_KEY_FROM_DASHBOARD>":"sk_omniroute",[{filename:"~/.openclaw/openclaw.json",content:JSON.stringify({agents:{defaults:{model:{primary:`omniroute/${G||"provider/model-id"}`}}},models:{providers:{omniroute:{baseUrl:Z(),apiKey:s,api:"openai-completions",models:[{id:G||"provider/model-id",name:(G||"provider/model-id").split("/").pop()}]}}}},null,2)}])})]})}let t=process.env.NEXT_PUBLIC_CLOUD_URL;function u({tool:a,isExpanded:b,onToggle:c,baseUrl:g,hasActiveProviders:h,apiKeys:k,activeProviders:m,cloudEnabled:n,batchStatus:o,lastConfiguredAt:p}){let q=(0,j.c)("cliTools"),[r,s]=(0,e.useState)(null),[u,v]=(0,e.useState)(!1),[w,x]=(0,e.useState)(!1),[y,z]=(0,e.useState)(!1),[A,B]=(0,e.useState)(null),[C,D]=(0,e.useState)(""),[E,F]=(0,e.useState)(""),[G,H]=(0,e.useState)(!1),[I,J]=(0,e.useState)({}),[K,L]=(0,e.useState)(!1),[M,N]=(0,e.useState)(""),O=(0,e.useRef)(!1),[P,Q]=(0,e.useState)([]),[R,S]=(0,e.useState)(!1),[T,U]=(0,e.useState)(null),V=!!(r?.installed&&r?.runnable),W=(()=>{if(!V)return null;if(!r.hasOmniRoute)return"not_configured";let a=r.settings?.openAiBaseUrl||"",b=a.includes("localhost")||a.includes("127.0.0.1"),c=n&&t&&a.startsWith(t);return b||c?"configured":"other"})(),X=W||o?.configStatus||null,Y=async()=>{try{let a=await fetch("/api/cli-tools/backups?tool=cline");if(a.ok){let b=await a.json();Q(b.backups||[])}}catch{}},Z=async a=>{U(a);try{let b=await fetch("/api/cli-tools/backups",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({tool:"cline",backupId:a})});if(b.ok)B({type:"success",text:q("backupRestoredReloading")}),await $(),await Y();else{let a=await b.json();B({type:"error",text:a.error||q("failedRestoreBackup")})}}catch(a){B({type:"error",text:a.message})}finally{U(null)}},$=async()=>{v(!0);try{let a=await fetch("/api/cli-tools/cline-settings"),b=await a.json();s(b)}catch(a){s({error:a.message})}finally{v(!1)}},_=async()=>{x(!0),B(null);try{let a=M||g||"http://localhost:20128",b=a.endsWith("/v1")?a:`${a}/v1`,c=await fetch("/api/cli-tools/cline-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:b,apiKey:C||"sk_omniroute",model:E})}),d=await c.json();c.ok?(B({type:"success",text:d.message||q("applied")}),await $(),await Y()):B({type:"error",text:d.error||q("failed")})}catch(a){B({type:"error",text:a.message})}finally{x(!1)}},aa=async()=>{z(!0),B(null);try{let a=await fetch("/api/cli-tools/cline-settings",{method:"DELETE"}),b=await a.json();a.ok?(B({type:"success",text:b.message||q("resetDone")}),F(""),O.current=!1,await $(),await Y()):B({type:"error",text:b.error||q("failed")})}catch(a){B({type:"error",text:a.message})}finally{z(!1)}};return(0,d.jsxs)(f.Zp,{padding:"sm",className:"overflow-hidden",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:c,children:[(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("div",{className:"size-8 rounded-lg flex items-center justify-center shrink-0",children:a.image?(0,d.jsx)(i.default,{src:a.image,alt:a.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:a=>{a.currentTarget.style.display="none"}}):(0,d.jsx)("span",{className:"material-symbols-outlined text-xl",style:{color:a.color},children:"terminal"})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("h3",{className:"font-medium text-sm",children:a.name}),(0,d.jsx)(l,{effectiveConfigStatus:X,batchStatus:o,lastConfiguredAt:p})]}),(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:q("toolDescriptions.cline")})]})]}),(0,d.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${b?"rotate-180":""}`,children:"expand_more"})]}),b&&(0,d.jsxs)("div",{className:"mt-6 pt-6 border-t border-border",children:[u&&(0,d.jsxs)("div",{className:"flex items-center gap-2 text-text-muted text-sm",children:[(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin text-base",children:"progress_activity"}),(0,d.jsx)("span",{children:q("checkingCli",{tool:"Cline"})})]}),r&&!u&&(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{className:"flex items-start gap-3 p-3 rounded-lg border bg-bg-secondary/50 border-border",children:[(0,d.jsx)("span",{className:`material-symbols-outlined text-lg ${V?"text-green-500":"text-yellow-500"}`,children:V?"check_circle":"warning"}),(0,d.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,d.jsx)("p",{className:"text-sm font-medium",children:V?q("cliDetectedReady",{tool:"Cline"}):r.installed?q("cliNotRunnable",{tool:"Cline"}):q("cliNotDetected",{tool:"Cline"})}),r.commandPath&&(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:[q("binary"),":"," ",(0,d.jsx)("code",{className:"px-1 py-0.5 rounded bg-black/5 dark:bg-white/10",children:r.commandPath})]}),r.globalStatePath&&(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:[q("configPathShort"),":"," ",(0,d.jsx)("code",{className:"px-1 py-0.5 rounded bg-black/5 dark:bg-white/10",children:r.globalStatePath})]})]})]}),V&&(0,d.jsxs)(d.Fragment,{children:["configured"===W&&(0,d.jsxs)("div",{className:"flex items-start gap-3 p-3 bg-green-500/10 border border-green-500/30 rounded-lg",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-green-500 text-lg",children:"check_circle"}),(0,d.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,d.jsx)("p",{className:"text-sm text-green-700 dark:text-green-300",children:q("omnirouteConfiguredOpenAiCompatible")}),(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:[q("provider"),": ",(0,d.jsx)("strong",{children:"openai"})," • ",q("model"),":"," ",(0,d.jsx)("strong",{children:r.settings?.openAiModelId||"—"})]})]})]}),(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,d.jsx)("label",{className:"text-sm text-text-muted",children:q("model")}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("input",{type:"text",value:E,onChange:a=>F(a.target.value),placeholder:q("providerModelPlaceholder"),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,d.jsx)(f.$n,{variant:"outline",size:"sm",onClick:()=>H(!0),disabled:!h,children:q("select")}),(0,d.jsx)(f.$n,{variant:"ghost",size:"sm",onClick:()=>L(!0),children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"edit"})})]})]}),(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,d.jsx)("label",{className:"text-sm text-text-muted",children:q("apiKey")}),k&&k.length>0?(0,d.jsx)("select",{value:C,onChange:a=>D(a.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:k.map(a=>(0,d.jsx)("option",{value:a.key,children:a.key},a.id))}):(0,d.jsx)("p",{className:"text-sm text-text-muted",children:n?q("noApiKeysAvailable"):q("usingDefaultOmniroute")})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2 pt-2",children:[(0,d.jsxs)(f.$n,{variant:"primary",size:"sm",onClick:_,disabled:!E,loading:w,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"configured"===W?q("updateConfig"):q("applyConfig")]}),"configured"===W&&(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:aa,loading:y,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restart_alt"}),q("reset")]})]}),A&&(0,d.jsxs)("div",{className:`flex items-center gap-2 px-3 py-2 rounded-lg text-sm ${"success"===A.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"success"===A.type?"check_circle":"error"}),(0,d.jsx)("span",{children:A.text})]}),(0,d.jsxs)("div",{className:"border-t border-border pt-3 mt-1",children:[(0,d.jsxs)("button",{onClick:()=>S(!R),className:"flex items-center gap-2 text-sm text-text-muted hover:text-text transition-colors",children:[(0,d.jsx)("span",{className:`material-symbols-outlined text-[16px] transition-transform ${R?"rotate-90":""}`,children:"chevron_right"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"backup"}),q("backups")," ",P.length>0&&`(${P.length})`]}),R&&P.length>0&&(0,d.jsx)("div",{className:"mt-2 flex flex-col gap-1.5 pl-6",children:P.map(a=>(0,d.jsxs)("div",{className:"flex items-center justify-between gap-2 p-2 rounded bg-bg-secondary/50 text-xs",children:[(0,d.jsxs)("div",{className:"flex flex-col",children:[(0,d.jsx)("span",{className:"font-medium",children:a.originalFile}),(0,d.jsx)("span",{className:"text-text-muted",children:new Date(a.createdAt).toLocaleString()})]}),(0,d.jsx)(f.$n,{variant:"ghost",size:"sm",onClick:()=>Z(a.id),loading:T===a.id,children:q("restore")})]},a.id))}),R&&0===P.length&&(0,d.jsx)("p",{className:"mt-2 pl-6 text-xs text-text-muted",children:q("noBackupsAvailable")})]})]})]})]}),(0,d.jsx)(f.rq,{isOpen:G,onClose:()=>H(!1),onSelect:a=>{F(a.value),H(!1)},selectedModel:E,activeProviders:m,title:q("selectModelForTool",{tool:"Cline"})}),K&&(0,d.jsx)(f.uR,{isOpen:K,onClose:()=>L(!1),title:q("clineManualConfiguration"),...{onApply:a=>{a.model&&F(a.model),a.apiKey&&D(a.apiKey),a.baseUrl&&N(a.baseUrl),L(!1)},currentConfig:{model:E,apiKey:C,baseUrl:M||g}}})]})}function v({tool:a,isExpanded:b,onToggle:c,baseUrl:g,hasActiveProviders:h,apiKeys:k,activeProviders:m,cloudEnabled:n,batchStatus:o,lastConfiguredAt:p}){let q=(0,j.c)("cliTools"),[r,s]=(0,e.useState)(null),[t,u]=(0,e.useState)(!1),[v,w]=(0,e.useState)(!1),[x,y]=(0,e.useState)(!1),[z,A]=(0,e.useState)(null),[B,C]=(0,e.useState)(""),[D,E]=(0,e.useState)(""),[F,G]=(0,e.useState)(!1),[H,I]=(0,e.useState)({}),[J,K]=(0,e.useState)(!1),[L,M]=(0,e.useState)(""),N=(0,e.useRef)(!1),[O,P]=(0,e.useState)([]),[Q,R]=(0,e.useState)(!1),[S,T]=(0,e.useState)(null),U=!!(r?.installed&&r?.runnable),V=U?r.hasOmniRoute?"configured":"not_configured":null,W=V||o?.configStatus||null,X=async()=>{try{let a=await fetch("/api/cli-tools/backups?tool=kilo");if(a.ok){let b=await a.json();P(b.backups||[])}}catch{}},Y=async a=>{T(a);try{let b=await fetch("/api/cli-tools/backups",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({tool:"kilo",backupId:a})});if(b.ok)A({type:"success",text:q("backupRestoredReloading")}),await Z(),await X();else{let a=await b.json();A({type:"error",text:a.error||q("failedRestoreBackup")})}}catch(a){A({type:"error",text:a.message})}finally{T(null)}},Z=async()=>{u(!0);try{let a=await fetch("/api/cli-tools/kilo-settings"),b=await a.json();s(b)}catch(a){s({error:a.message})}finally{u(!1)}},$=async()=>{w(!0),A(null);try{let a=L||g||"http://localhost:20128",b=a.endsWith("/v1")?a:`${a}/v1`,c=await fetch("/api/cli-tools/kilo-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:b,apiKey:B||"sk_omniroute",model:D})}),d=await c.json();c.ok?(A({type:"success",text:d.message||q("applied")}),await Z(),await X()):A({type:"error",text:d.error||q("failed")})}catch(a){A({type:"error",text:a.message})}finally{w(!1)}},_=async()=>{y(!0),A(null);try{let a=await fetch("/api/cli-tools/kilo-settings",{method:"DELETE"}),b=await a.json();a.ok?(A({type:"success",text:b.message||q("resetDone")}),E(""),N.current=!1,await Z(),await X()):A({type:"error",text:b.error||q("failed")})}catch(a){A({type:"error",text:a.message})}finally{y(!1)}};return(0,d.jsxs)(f.Zp,{padding:"sm",className:"overflow-hidden",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:c,children:[(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("div",{className:"size-8 rounded-lg flex items-center justify-center shrink-0",children:a.image?(0,d.jsx)(i.default,{src:a.image,alt:a.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:a=>{a.currentTarget.style.display="none"}}):(0,d.jsx)("span",{className:"material-symbols-outlined text-xl",style:{color:a.color},children:"terminal"})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("h3",{className:"font-medium text-sm",children:a.name}),(0,d.jsx)(l,{effectiveConfigStatus:W,batchStatus:o,lastConfiguredAt:p})]}),(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:q("toolDescriptions.kilo")})]})]}),(0,d.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${b?"rotate-180":""}`,children:"expand_more"})]}),b&&(0,d.jsxs)("div",{className:"mt-6 pt-6 border-t border-border",children:[t&&(0,d.jsxs)("div",{className:"flex items-center gap-2 text-text-muted text-sm",children:[(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin text-base",children:"progress_activity"}),(0,d.jsx)("span",{children:q("checkingCli",{tool:"Kilo Code"})})]}),r&&!t&&(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{className:"flex items-start gap-3 p-3 rounded-lg border bg-bg-secondary/50 border-border",children:[(0,d.jsx)("span",{className:`material-symbols-outlined text-lg ${U?"text-green-500":"text-yellow-500"}`,children:U?"check_circle":"warning"}),(0,d.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,d.jsx)("p",{className:"text-sm font-medium",children:U?q("cliDetectedReady",{tool:"Kilo Code"}):r.installed?q("cliNotRunnable",{tool:"Kilo Code"}):q("cliNotDetected",{tool:"Kilo Code"})}),r.commandPath&&(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:[q("binary"),":"," ",(0,d.jsx)("code",{className:"px-1 py-0.5 rounded bg-black/5 dark:bg-white/10",children:r.commandPath})]}),r.authPath&&(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:[q("auth"),":"," ",(0,d.jsx)("code",{className:"px-1 py-0.5 rounded bg-black/5 dark:bg-white/10",children:r.authPath})]})]})]}),U&&(0,d.jsxs)(d.Fragment,{children:["configured"===V&&(0,d.jsxs)("div",{className:"flex items-start gap-3 p-3 bg-green-500/10 border border-green-500/30 rounded-lg",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-green-500 text-lg",children:"check_circle"}),(0,d.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,d.jsx)("p",{className:"text-sm text-green-700 dark:text-green-300",children:q("omnirouteConfiguredOpenAiCompatible")}),(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:[q("providers"),":"," ",(0,d.jsx)("strong",{children:r.settings?.auth?.join(", ")||"—"})]})]})]}),(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,d.jsx)("label",{className:"text-sm text-text-muted",children:q("model")}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("input",{type:"text",value:D,onChange:a=>E(a.target.value),placeholder:q("providerModelPlaceholder"),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,d.jsx)(f.$n,{variant:"outline",size:"sm",onClick:()=>G(!0),disabled:!h,children:q("select")}),(0,d.jsx)(f.$n,{variant:"ghost",size:"sm",onClick:()=>K(!0),children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"edit"})})]})]}),(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,d.jsx)("label",{className:"text-sm text-text-muted",children:q("apiKey")}),k&&k.length>0?(0,d.jsx)("select",{value:B,onChange:a=>C(a.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:k.map(a=>(0,d.jsx)("option",{value:a.key,children:a.key},a.id))}):(0,d.jsx)("p",{className:"text-sm text-text-muted",children:n?q("noApiKeysAvailable"):q("usingDefaultOmniroute")})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2 pt-2",children:[(0,d.jsxs)(f.$n,{variant:"primary",size:"sm",onClick:$,disabled:!D,loading:v,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"configured"===V?q("updateConfig"):q("applyConfig")]}),"configured"===V&&(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:_,loading:x,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restart_alt"}),q("reset")]})]}),z&&(0,d.jsxs)("div",{className:`flex items-center gap-2 px-3 py-2 rounded-lg text-sm ${"success"===z.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"success"===z.type?"check_circle":"error"}),(0,d.jsx)("span",{children:z.text})]}),(0,d.jsxs)("div",{className:"border-t border-border pt-3 mt-1",children:[(0,d.jsxs)("button",{onClick:()=>R(!Q),className:"flex items-center gap-2 text-sm text-text-muted hover:text-text transition-colors",children:[(0,d.jsx)("span",{className:`material-symbols-outlined text-[16px] transition-transform ${Q?"rotate-90":""}`,children:"chevron_right"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"backup"}),q("backups")," ",O.length>0&&`(${O.length})`]}),Q&&O.length>0&&(0,d.jsx)("div",{className:"mt-2 flex flex-col gap-1.5 pl-6",children:O.map(a=>(0,d.jsxs)("div",{className:"flex items-center justify-between gap-2 p-2 rounded bg-bg-secondary/50 text-xs",children:[(0,d.jsxs)("div",{className:"flex flex-col",children:[(0,d.jsx)("span",{className:"font-medium",children:a.originalFile}),(0,d.jsx)("span",{className:"text-text-muted",children:new Date(a.createdAt).toLocaleString()})]}),(0,d.jsx)(f.$n,{variant:"ghost",size:"sm",onClick:()=>Y(a.id),loading:S===a.id,children:q("restore")})]},a.id))}),Q&&0===O.length&&(0,d.jsx)("p",{className:"mt-2 pl-6 text-xs text-text-muted",children:q("noBackupsAvailable")})]})]})]})]}),(0,d.jsx)(f.rq,{isOpen:F,onClose:()=>G(!1),onSelect:a=>{E(a.value),G(!1)},selectedModel:D,activeProviders:m,title:q("selectModelForTool",{tool:"Kilo Code"})}),J&&(0,d.jsx)(f.uR,{isOpen:J,onClose:()=>K(!1),title:q("kiloManualConfiguration"),...{onApply:a=>{a.model&&E(a.model),a.apiKey&&C(a.apiKey),a.baseUrl&&M(a.baseUrl),K(!1)},currentConfig:{model:D,apiKey:B,baseUrl:L||g}}})]})}function w({toolId:a,tool:b,isExpanded:c,onToggle:g,baseUrl:h,apiKeys:k,activeProviders:l=[],cloudEnabled:m=!1,batchStatus:n}){let o,p,q,r=(0,j.c)("cliTools"),s=(0,e.useCallback)((a,b,c)=>{try{return r(a,c)}catch{return b}},[r]),[t,u]=(0,e.useState)(null),[v,w]=(0,e.useState)(!1),[x,y]=(0,e.useState)(""),[z,A]=(0,e.useState)(null),[B,C]=(0,e.useState)(null),[D,E]=(0,e.useState)(!1);(0,e.useRef)(!1);let[F,G]=(0,e.useState)(()=>k?.length>0?k[0].key:""),H=(0,e.useCallback)(b=>{y(b),b?localStorage.setItem(`omniroute-cli-model-${a}`,b):localStorage.removeItem(`omniroute-cli-model-${a}`)},[a]),I=(0,e.useCallback)(b=>{G(b),b&&localStorage.setItem(`omniroute-cli-key-${a}`,b)},[a]),J=a=>{let b=F&&F.trim()?F:m?r("yourApiKeyPlaceholder"):"sk_omniroute",c=h||"http://localhost:20128",d=c.endsWith("/v1")?c:`${c}/v1`;return a.replace(/\{\{baseUrl\}\}/g,d).replace(/\{\{apiKey\}\}/g,b).replace(/\{\{model\}\}/g,x||r("modelPlaceholder"))},K=async(a,b)=>{await navigator.clipboard.writeText(J(a)),u(b),setTimeout(()=>u(null),2e3)},L=l.length>0,M=c&&null===z,N=async()=>{E(!0),C(null);try{let b=F&&F.trim()?F:m?"":"sk_omniroute",c=h||"http://localhost:20128",d=c.endsWith("/v1")?c:`${c}/v1`,e=await fetch(`/api/cli-tools/guide-settings/${a}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:d,apiKey:b,model:x})}),f=await e.json();e.ok?C({type:"success",text:f.message||r("configurationSaved")}):C({type:"error",text:f.error||r("failedToSave")})}catch(a){C({type:"error",text:a.message})}finally{E(!1)}},O=["continue"].includes(a),P=()=>!b.requiresCloud||!!m;return(0,d.jsxs)(f.Zp,{padding:"sm",className:"overflow-hidden",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:g,children:[(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("div",{className:"size-8 rounded-lg flex items-center justify-center shrink-0",children:b.image?(0,d.jsx)(i.default,{src:b.image,alt:b.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:a=>{a.currentTarget.style.display="none"}}):b.icon?(0,d.jsx)("span",{className:"material-symbols-outlined text-xl",style:{color:b.color},children:b.icon}):(0,d.jsx)(i.default,{src:`/providers/${a}.png`,alt:b.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:a=>{a.currentTarget.style.display="none"}})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("h3",{className:"font-medium text-sm",children:b.name}),(o=z?.reason==="not_required"||"guide"===b.configType,p=z?z.installed&&z.runnable:n?.installed&&n?.runnable,q=z?z.installed:n?.installed,o?(0,d.jsxs)("span",{className:"inline-flex items-center gap-1.5 px-2 py-0.5 text-[11px] font-medium rounded-full bg-blue-500/10 text-blue-600 dark:text-blue-400",children:[(0,d.jsx)("span",{className:"size-1.5 rounded-full bg-blue-500"}),r("guide")]}):p?(0,d.jsxs)("span",{className:"inline-flex items-center gap-1.5 px-2 py-0.5 text-[11px] font-medium rounded-full bg-green-500/10 text-green-600 dark:text-green-400",children:[(0,d.jsx)("span",{className:"size-1.5 rounded-full bg-green-500"}),r("detected")]}):!1===q&&(z||n)?(0,d.jsxs)("span",{className:"inline-flex items-center gap-1.5 px-2 py-0.5 text-[11px] font-medium rounded-full bg-zinc-500/10 text-zinc-500 dark:text-zinc-400",children:[(0,d.jsx)("span",{className:"size-1.5 rounded-full bg-zinc-400 dark:bg-zinc-500"}),r("notInstalled")]}):q&&!p&&(z||n)?(0,d.jsxs)("span",{className:"inline-flex items-center gap-1.5 px-2 py-0.5 text-[11px] font-medium rounded-full bg-yellow-500/10 text-yellow-600 dark:text-yellow-400",children:[(0,d.jsx)("span",{className:"size-1.5 rounded-full bg-yellow-500"}),r("notReady")]}):null)]}),(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:s(`toolDescriptions.${a}`,b.description)})]})]}),(0,d.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${c?"rotate-180":""}`,children:"expand_more"})]}),c&&(0,d.jsx)("div",{className:"mt-6 pt-6 border-t border-border",children:b.guideSteps?(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[M&&(0,d.jsxs)("div",{className:"flex items-center gap-2 text-text-muted text-sm",children:[(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin text-base",children:"progress_activity"}),(0,d.jsx)("span",{children:r("checkingRuntime")})]}),!M&&z&&!z.error&&(0,d.jsxs)("div",{className:"flex items-start gap-3 p-3 bg-blue-500/10 border border-blue-500/30 rounded-lg",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-blue-500 text-lg",children:"not_required"===z.reason?"info":z.installed&&z.runnable?"check_circle":"warning"}),(0,d.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,d.jsx)("p",{className:"text-sm text-blue-700 dark:text-blue-300",children:"not_required"===z.reason?r("guideOnlyIntegration"):z.installed&&z.runnable?r("cliRuntimeDetected"):z.installed?r("cliFoundNotRunnable",{reason:z.reason?`: ${z.reason}`:""}):r("cliRuntimeNotDetected")}),z.commandPath&&(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:[r("binary"),":"," ",(0,d.jsx)("code",{className:"px-1 py-0.5 rounded bg-black/5 dark:bg-white/10",children:z.commandPath})]}),z.configPath&&(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:[r("configPath"),":"," ",(0,d.jsx)("code",{className:"px-1 py-0.5 rounded bg-black/5 dark:bg-white/10",children:z.configPath})]})]})]}),!M&&z?.error&&(0,d.jsxs)("div",{className:"flex items-start gap-3 p-3 bg-red-500/10 border border-red-500/30 rounded-lg",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-red-500 text-lg",children:"error"}),(0,d.jsx)("p",{className:"text-sm text-red-600 dark:text-red-400",children:r("failedCheckRuntimeStatus")})]}),b.notes&&0!==b.notes.length?(0,d.jsx)("div",{className:"flex flex-col gap-2 mb-4",children:b.notes.map((b,c)=>{if("cloudCheck"===b.type&&m)return null;let e="warning"===b.type,f="cloudCheck"===b.type&&!m,g="bg-blue-500/10 border-blue-500/30",h="text-blue-600 dark:text-blue-400",i="text-blue-500",j="info";return e?(g="bg-yellow-500/10 border-yellow-500/30",h="text-yellow-600 dark:text-yellow-400",i="text-yellow-500",j="warning"):f&&(g="bg-red-500/10 border-red-500/30",h="text-red-600 dark:text-red-400",i="text-red-500",j="error"),(0,d.jsxs)("div",{className:`flex items-start gap-3 p-3 rounded-lg border ${g}`,children:[(0,d.jsx)("span",{className:`material-symbols-outlined text-lg ${i}`,children:j}),(0,d.jsx)("p",{className:`text-sm ${h}`,children:s(`guides.${a}.notes.${c}`,b.text)})]},c)})}):null,P()&&b.guideSteps.map(c=>(0,d.jsxs)("div",{className:"flex items-start gap-4",children:[(0,d.jsx)("div",{className:"size-8 rounded-full flex items-center justify-center shrink-0 text-sm font-semibold text-white",style:{backgroundColor:b.color},children:c.step}),(0,d.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,d.jsx)("p",{className:"font-medium text-text",children:s(`guides.${a}.steps.${c.step}.title`,c.title)}),c.desc&&(0,d.jsx)("p",{className:"text-sm text-text-muted mt-0.5",children:s(`guides.${a}.steps.${c.step}.desc`,c.desc)}),"apiKeySelector"===c.type&&(0,d.jsx)("div",{className:"mt-2 flex items-center gap-2",children:k&&k.length>0?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("select",{value:F,onChange:a=>I(a.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:k.map(a=>(0,d.jsx)("option",{value:a.key,children:a.key},a.id))}),(0,d.jsx)("button",{onClick:()=>K(F,"apiKey"),className:"shrink-0 px-3 py-2 bg-bg-secondary hover:bg-bg-tertiary rounded-lg border border-border transition-colors",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-lg",children:"apiKey"===t?"check":"content_copy"})})]}):(0,d.jsx)("span",{className:"text-sm text-text-muted",children:m?r("noApiKeysCreateOne"):"sk_omniroute"})}),"modelSelector"===c.type&&(0,d.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[(0,d.jsx)("input",{type:"text",value:x,onChange:a=>H(a.target.value),placeholder:r("modelPlaceholder"),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,d.jsx)("button",{onClick:()=>w(!0),disabled:!L,className:`shrink-0 px-3 py-2 rounded-lg border text-sm transition-colors ${L?"bg-bg-secondary border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:r("selectModel")}),x&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("button",{onClick:()=>K(x,"model"),className:"shrink-0 px-3 py-2 bg-bg-secondary hover:bg-bg-tertiary rounded-lg border border-border transition-colors",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-lg",children:"model"===t?"check":"content_copy"})}),(0,d.jsx)("button",{onClick:()=>H(""),className:"p-2 text-text-muted hover:text-red-500 rounded transition-colors",title:r("clear"),children:(0,d.jsx)("span",{className:"material-symbols-outlined text-lg",children:"close"})})]})]}),c.value&&(0,d.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[(0,d.jsx)("code",{className:"flex-1 px-3 py-2 bg-bg-secondary rounded-lg text-sm font-mono border border-border truncate",children:J(c.value)}),c.copyable&&(0,d.jsx)("button",{onClick:()=>K(c.value,`${c.step}-${c.title}`),className:"shrink-0 px-3 py-2 bg-bg-secondary hover:bg-bg-tertiary rounded-lg border border-border transition-colors",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-lg",children:t===`${c.step}-${c.title}`?"check":"content_copy"})})]})]})]},c.step)),P()&&b.codeBlock&&(0,d.jsxs)("div",{className:"mt-2",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,d.jsx)("span",{className:"text-xs text-text-muted uppercase tracking-wide",children:b.codeBlock.language}),(0,d.jsxs)("button",{onClick:()=>K(b.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,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"codeblock"===t?"check":"content_copy"}),"codeblock"===t?r("copied"):r("copy")]})]}),(0,d.jsx)("pre",{className:"p-4 bg-bg-secondary rounded-lg border border-border overflow-x-auto",children:(0,d.jsx)("code",{className:"text-sm font-mono whitespace-pre",children:J(b.codeBlock.code)})})]}),P()&&(0,d.jsxs)("div",{className:"mt-2",children:[B&&(0,d.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs mb-2 ${"success"===B.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===B.type?"check_circle":"error"}),(0,d.jsx)("span",{children:B.text})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[O&&(0,d.jsxs)(f.$n,{variant:"primary",size:"sm",onClick:N,disabled:!x,loading:D,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),r("saveConfig")]}),b.codeBlock&&(0,d.jsxs)(f.$n,{variant:O?"outline":"primary",size:"sm",onClick:()=>K(b.codeBlock.code,"codeblock"),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"codeblock"===t?"check":"content_copy"}),"codeblock"===t?r("copied"):r("copyConfig")]}),x&&(0,d.jsxs)("span",{className:"text-xs text-text-muted flex items-center gap-1",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] text-green-500",children:"check_circle"}),r("selectionSaved")]})]})]})]}):(0,d.jsx)("p",{className:"text-text-muted text-sm",children:r("comingSoon")})}),(0,d.jsx)(f.rq,{isOpen:v,onClose:()=>w(!1),onSelect:a=>{H(a.value)},selectedModel:x,activeProviders:l,title:r("selectModel")})]})}function x({tool:a,isExpanded:b,onToggle:c,baseUrl:g,apiKeys:h,activeProviders:k,hasActiveProviders:l,cloudEnabled:m}){let n=(0,j.c)("cliTools"),[o,p]=(0,e.useState)(null),[q,r]=(0,e.useState)(!1),[s,t]=(0,e.useState)(!1),[u,v]=(0,e.useState)(""),[w,x]=(0,e.useState)(""),[y,z]=(0,e.useState)(null),[A,B]=(0,e.useState)({}),[C,D]=(0,e.useState)(!1),[E,F]=(0,e.useState)(null),G=async()=>{try{let a=await fetch("/api/cli-tools/antigravity-mitm");if(a.ok){let b=await a.json();p(b)}}catch(a){console.log("Error fetching status:",a),p({running:!1})}},H="u">typeof navigator&&navigator.userAgent?.includes("Windows"),I=async a=>{r(!0),z(null);try{let b=w?.trim()||(h?.length>0?h[0].key:null)||(m?null:"sk_omniroute"),c=await fetch("/api/cli-tools/antigravity-mitm",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiKey:b,sudoPassword:a})}),d=await c.json();c.ok?(z({type:"success",text:n("mitmStarted")}),t(!1),v(""),G()):z({type:"error",text:d.error||n("failedStart")})}catch(a){z({type:"error",text:a.message})}finally{r(!1)}},J=async a=>{r(!0),z(null);try{let b=await fetch("/api/cli-tools/antigravity-mitm",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({sudoPassword:a})}),c=await b.json();b.ok?(z({type:"success",text:n("mitmStopped")}),t(!1),v(""),G()):z({type:"error",text:c.error||n("failedStop")})}catch(a){z({type:"error",text:a.message})}finally{r(!1)}},K=()=>{u.trim()?o?.running?J(u):I(u):z({type:"error",text:n("sudoPasswordRequiredError")})},L=(a,b)=>{B(c=>({...c,[a]:b}))},M=async()=>{r(!0),z(null);try{let a=await fetch("/api/cli-tools/antigravity-mitm/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({tool:"antigravity",mappings:A})});if(!a.ok){let b=await a.json();throw Error(b.error||n("failedSaveMappings"))}z({type:"success",text:n("mappingsSaved")})}catch(a){z({type:"error",text:a.message})}finally{r(!1)}},N=o?.running;return(0,d.jsxs)(f.Zp,{padding:"sm",className:"overflow-hidden",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:c,children:[(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,d.jsx)(i.default,{src:"/providers/antigravity.png",alt:a.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:a=>{a.currentTarget.style.display="none"}})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("h3",{className:"font-medium text-sm",children:a.name}),N?(0,d.jsx)(f.Ex,{variant:"success",size:"sm",children:n("active")}):(0,d.jsx)(f.Ex,{variant:"default",size:"sm",children:n("inactive")})]}),(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:n("toolDescriptions.antigravity")})]})]}),(0,d.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${b?"rotate-180":""}`,children:"expand_more"})]}),b&&(0,d.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[(0,d.jsx)("div",{className:"flex items-center gap-2",children:N?(0,d.jsxs)("button",{onClick:()=>{H||o?.hasCachedPassword?J(""):(t(!0),z(null))},disabled:q,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,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"stop_circle"}),n("stopMitm")]}):(0,d.jsxs)("button",{onClick:()=>{H||o?.hasCachedPassword?I(""):(t(!0),z(null))},disabled:q||!l,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,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"play_circle"}),n("startMitm")]})}),y?.type==="error"&&(0,d.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,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"error"}),(0,d.jsx)("span",{children:y.text})]}),N&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:n("apiKey")}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),h.length>0?(0,d.jsx)("select",{value:w,onChange:a=>x(a.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:h.map(a=>(0,d.jsx)("option",{value:a.key,children:a.key},a.id))}):(0,d.jsx)("span",{className:"flex-1 text-xs text-text-muted px-2 py-1.5",children:m?n("noApiKeysCreateOne"):n("defaultOmnirouteKey")})]}),a.defaultModels.map(a=>(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:a.name}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("input",{type:"text",value:A[a.alias]||"",onChange:b=>L(a.alias,b.target.value),placeholder:n("modelPlaceholder"),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,d.jsx)("button",{onClick:()=>{F(a.alias),D(!0)},disabled:!l,className:`px-2 py-1.5 rounded border text-xs transition-colors shrink-0 whitespace-nowrap ${l?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:n("select")}),A[a.alias]&&(0,d.jsx)("button",{onClick:()=>L(a.alias,""),className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors",title:n("clear"),children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]},a.alias)),(0,d.jsx)("div",{className:"flex items-center gap-2",children:(0,d.jsxs)(f.$n,{variant:"primary",size:"sm",onClick:M,disabled:q||0===Object.keys(A).length,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),n("saveMappings")]})})]}),!N&&(0,d.jsxs)("div",{className:"flex flex-col gap-1.5 px-1",children:[(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:[(0,d.jsx)("span",{className:"font-medium text-text-main",children:n("howItWorks")})," ",n("antigravityHowWorksDesc")]}),(0,d.jsxs)("div",{className:"flex flex-col gap-0.5 text-[11px] text-text-muted",children:[(0,d.jsx)("span",{children:n("antigravityStep1")}),(0,d.jsxs)("span",{children:[n("antigravityStep2Prefix")," ",(0,d.jsx)("code",{className:"text-[10px] bg-surface px-1 rounded",children:"daily-cloudcode-pa.googleapis.com"})," ",n("antigravityStep2Suffix")]}),(0,d.jsx)("span",{children:n("antigravityStep3")})]})]})]}),(0,d.jsx)(f.aF,{isOpen:s,onClose:()=>{t(!1),v(""),z(null)},title:n("sudoPasswordRequiredTitle"),size:"sm",children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{className:"flex items-start gap-3 p-3 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-yellow-500 text-[20px]",children:"warning"}),(0,d.jsx)("p",{className:"text-xs text-text-muted",children:n("sudoPasswordHint")})]}),(0,d.jsx)(f.pd,{type:"password",placeholder:n("enterSudoPassword"),value:u,onChange:a=>v(a.target.value),onKeyDown:a=>{"Enter"!==a.key||q||K()}}),y&&(0,d.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===y.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===y.type?"check_circle":"error"}),(0,d.jsx)("span",{children:y.text})]}),(0,d.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[(0,d.jsx)(f.$n,{variant:"ghost",size:"sm",onClick:()=>{t(!1),v(""),z(null)},disabled:q,children:n("cancel")}),(0,d.jsx)(f.$n,{variant:"primary",size:"sm",onClick:K,loading:q,children:n("confirm")})]})]})}),(0,d.jsx)(f.rq,{isOpen:C,onClose:()=>D(!1),onSelect:a=>{E&&B(b=>({...b,[E]:a.value}))},selectedModel:E?A[E]:null,activeProviders:k,title:n("selectModelForAlias",{alias:E||""})})]})}function y({tool:a,isExpanded:b,onToggle:c,baseUrl:g,apiKeys:h,activeProviders:k=[],hasActiveProviders:l=!1,cloudEnabled:m=!1,batchStatus:n}){let o=(0,j.c)("cliTools"),[p,q]=(0,e.useState)(null),[r,s]=(0,e.useState)(()=>new Set),[t,u]=(0,e.useState)(()=>h?.length>0?h[0].key:""),[v,w]=(0,e.useState)(128e3),[x,y]=(0,e.useState)(16e3),[z,A]=(0,e.useState)(!0),[B,C]=(0,e.useState)(!1),[D,E]=(0,e.useState)([]),[F,G]=(0,e.useState)(!1),[H,I]=(0,e.useState)(""),J=H?D.filter(a=>a.label.toLowerCase().includes(H.toLowerCase())):D,K=()=>JSON.stringify({name:"OmniRoute",vendor:"azure",apiKey:"${input:chat.lm.secret.omniroute}",models:[...r].map(a=>({id:a,name:a,url:`${g}/v1/chat/completions#models.ai.azure.com`,toolCalling:z,vision:B,maxInputTokens:v,maxOutputTokens:x}))},null,2),L=async(a,b)=>{await navigator.clipboard.writeText(a),q(b),setTimeout(()=>q(null),2e3)};return(0,d.jsxs)(f.Zp,{padding:"sm",className:"overflow-hidden",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:c,children:[(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("div",{className:"size-8 rounded-lg flex items-center justify-center shrink-0",children:(0,d.jsx)(i.default,{src:a.image||"/providers/copilot.png",alt:a.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:a=>{a.currentTarget.style.display="none"}})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("h3",{className:"font-medium text-sm",children:a.name}),(0,d.jsxs)("span",{className:"inline-flex items-center gap-1.5 px-2 py-0.5 text-[11px] font-medium rounded-full bg-blue-500/10 text-blue-600 dark:text-blue-400",children:[(0,d.jsx)("span",{className:"size-1.5 rounded-full bg-blue-500"}),o("guide")]})]}),(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:a.description})]})]}),(0,d.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${b?"rotate-180":""}`,children:"expand_more"})]}),b&&(0,d.jsx)("div",{className:"mt-6 pt-6 border-t border-border",children:(0,d.jsxs)("div",{className:"flex flex-col gap-5",children:[(0,d.jsxs)("div",{className:"flex items-start gap-3 p-3 bg-blue-500/10 border border-blue-500/30 rounded-lg",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-blue-500 text-lg",children:"info"}),(0,d.jsxs)("div",{className:"text-sm text-blue-700 dark:text-blue-300",children:[(0,d.jsx)("p",{className:"font-medium",children:"GitHub Copilot Config Generator"}),(0,d.jsxs)("p",{className:"mt-1 text-xs opacity-80",children:["Generates the"," ",(0,d.jsx)("code",{className:"px-1 py-0.5 rounded bg-black/5 dark:bg-white/10",children:"chatLanguageModels.json"})," ","block for VS Code GitHub Copilot using the Azure vendor pattern. Select the models you want, then copy the JSON into your config file."]})]})]}),(0,d.jsxs)("div",{className:"flex items-start gap-3 p-3 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-yellow-500 text-lg",children:"warning"}),(0,d.jsxs)("p",{className:"text-xs text-yellow-600 dark:text-yellow-400",children:["This configuration uses the Azure vendor workaround for custom model lists. Tested with ",(0,d.jsx)("strong",{children:"VS Code ≥ 1.109"})," and"," ",(0,d.jsx)("strong",{children:"GitHub Copilot Chat ≥ v0.37"}),". Future extension updates may change this behavior."]})]}),m&&h?.length>0&&(0,d.jsxs)("div",{children:[(0,d.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,d.jsx)("div",{className:"size-6 rounded-full flex items-center justify-center text-xs font-semibold text-white",style:{backgroundColor:a.color},children:"1"}),(0,d.jsx)("span",{className:"font-medium text-sm",children:"API Key"})]}),(0,d.jsx)("select",{value:t,onChange:a=>{var b;u(b=a.target.value),b&&localStorage.setItem("omniroute-cli-key-copilot",b)},className:"w-full 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:h.map(a=>(0,d.jsx)("option",{value:a.key,children:a.key},a.id))})]}),(0,d.jsxs)("div",{children:[(0,d.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("div",{className:"size-6 rounded-full flex items-center justify-center text-xs font-semibold text-white",style:{backgroundColor:a.color},children:m&&h?.length>0?"2":"1"}),(0,d.jsxs)("span",{className:"font-medium text-sm",children:["Select Models (",r.size,"/",J.length,")"]})]}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)("button",{onClick:()=>{s(new Set(D.map(a=>a.value)))},className:"px-2 py-1 text-xs bg-bg-secondary hover:bg-bg-tertiary rounded border border-border transition-colors",children:"Select All"}),(0,d.jsx)("button",{onClick:()=>{s(new Set)},className:"px-2 py-1 text-xs bg-bg-secondary hover:bg-bg-tertiary rounded border border-border transition-colors",children:"Clear"})]})]}),(0,d.jsx)("div",{className:"mb-2",children:(0,d.jsx)("input",{type:"text",value:H,onChange:a=>I(a.target.value),placeholder:"Filter models...",className:"w-full px-3 py-1.5 bg-bg-secondary rounded-lg text-sm border border-border focus:outline-none focus:ring-1 focus:ring-primary/50"})}),F||0!==D.length?0===J.length&&0===D.length?(0,d.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-yellow-500 text-lg",children:"warning"}),(0,d.jsx)("p",{className:"text-sm text-yellow-600 dark:text-yellow-400",children:o("noActiveProviders")})]}):(0,d.jsx)("div",{className:"max-h-64 overflow-y-auto rounded-lg border border-border bg-bg-secondary",children:J.map(a=>(0,d.jsxs)("label",{className:"flex items-center gap-3 px-3 py-2 hover:bg-bg-tertiary cursor-pointer border-b border-border last:border-0 transition-colors",children:[(0,d.jsx)("input",{type:"checkbox",checked:r.has(a.value),onChange:()=>{var b;return b=a.value,void s(a=>{let c=new Set(a);return c.has(b)?c.delete(b):c.add(b),c})},className:"rounded border-border text-primary accent-[#1F6FEB]"}),(0,d.jsx)("span",{className:"text-sm font-mono truncate",children:a.label})]},a.value))}):(0,d.jsxs)("div",{className:"flex items-center gap-2 p-3 text-text-muted text-sm",children:[(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin text-base",children:"progress_activity"}),(0,d.jsx)("span",{children:"Loading models..."})]})]}),(0,d.jsxs)("details",{className:"group",children:[(0,d.jsxs)("summary",{className:"flex items-center gap-2 cursor-pointer text-sm text-text-muted hover:text-text-main transition-colors",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-base group-open:rotate-90 transition-transform",children:"chevron_right"}),"Advanced Options"]}),(0,d.jsxs)("div",{className:"mt-3 grid grid-cols-2 gap-3 pl-6",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("label",{className:"text-xs text-text-muted block mb-1",children:"Max Input Tokens"}),(0,d.jsx)("input",{type:"number",value:v,onChange:a=>w(Number(a.target.value)||128e3),className:"w-full px-3 py-1.5 bg-bg-secondary rounded-lg text-sm border border-border focus:outline-none focus:ring-1 focus:ring-primary/50"})]}),(0,d.jsxs)("div",{children:[(0,d.jsx)("label",{className:"text-xs text-text-muted block mb-1",children:"Max Output Tokens"}),(0,d.jsx)("input",{type:"number",value:x,onChange:a=>y(Number(a.target.value)||16e3),className:"w-full px-3 py-1.5 bg-bg-secondary rounded-lg text-sm border border-border focus:outline-none focus:ring-1 focus:ring-primary/50"})]}),(0,d.jsxs)("label",{className:"flex items-center gap-2 cursor-pointer",children:[(0,d.jsx)("input",{type:"checkbox",checked:z,onChange:a=>A(a.target.checked),className:"rounded border-border accent-[#1F6FEB]"}),(0,d.jsx)("span",{className:"text-sm",children:"Tool Calling"})]}),(0,d.jsxs)("label",{className:"flex items-center gap-2 cursor-pointer",children:[(0,d.jsx)("input",{type:"checkbox",checked:B,onChange:a=>C(a.target.checked),className:"rounded border-border accent-[#1F6FEB]"}),(0,d.jsx)("span",{className:"text-sm",children:"Vision"})]})]})]}),r.size>0&&(0,d.jsxs)("div",{children:[(0,d.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("div",{className:"size-6 rounded-full flex items-center justify-center text-xs font-semibold text-white",style:{backgroundColor:a.color},children:m&&h?.length>0?"3":"2"}),(0,d.jsxs)("span",{className:"font-medium text-sm",children:["Copy Config (",r.size," model",1!==r.size?"s":"",")"]})]}),(0,d.jsxs)(f.$n,{variant:"primary",size:"sm",onClick:()=>L(K(),"config"),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"config"===p?"check":"content_copy"}),o("config"===p?"copied":"copyConfig")]})]}),(0,d.jsx)("pre",{className:"p-4 bg-bg-secondary rounded-lg border border-border overflow-x-auto max-h-80",children:(0,d.jsx)("code",{className:"text-xs font-mono whitespace-pre text-text-main",children:K()})}),(0,d.jsxs)("div",{className:"mt-3 p-3 bg-bg-secondary rounded-lg border border-border",children:[(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:[(0,d.jsx)("span",{className:"font-medium text-text-main",children:"Paste into: "}),(0,d.jsx)("code",{className:"px-1 py-0.5 rounded bg-black/5 dark:bg-white/10",children:"~/.config/Code/User/chatLanguageModels.json"})]}),(0,d.jsx)("p",{className:"text-xs text-text-muted mt-1",children:"Then reload VS Code and set the API key in the input prompt."})]})]})]})})]})}process.env.NEXT_PUBLIC_CLOUD_URL;let z=process.env.NEXT_PUBLIC_CLOUD_URL;function A({machineId:a}){let b,c,i,k=(0,j.c)("cliTools"),[l,m]=(0,e.useState)([]),[p,r]=(0,e.useState)(!0),[t,A]=(0,e.useState)(null),[B,C]=(0,e.useState)({}),[D,E]=(0,e.useState)(!1),[F,G]=(0,e.useState)([]),[H,I]=(0,e.useState)({}),[J,K]=(0,e.useState)(!1),L=()=>l.filter(a=>!1!==a.isActive),M=(0,e.useCallback)((a,b,c)=>{C(d=>d[a]?.[b]===c?d:{...d,[a]:{...d[a],[b]:c}})},[]);if(p||!J)return(0,d.jsx)("div",{className:"flex flex-col gap-6",children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsx)(f.Qv,{}),(0,d.jsx)(f.Qv,{}),(0,d.jsx)(f.Qv,{})]})});let N=(b=L(),c=[],i=new Set,b.forEach(a=>{let b=h.Xg[a.provider]||a.provider;(0,h.KC)(a.provider).forEach(d=>{let e=`${b}/${d.id}`;i.has(e)||(i.add(e),c.push({value:e,label:`${b}/${d.id}`,provider:a.provider,alias:b,connectionName:a.name,modelId:d.id}))})}),c).length>0;return(0,d.jsxs)("div",{className:"flex flex-col gap-6",children:[!N&&(0,d.jsx)(f.Zp,{className:"border-yellow-500/50 bg-yellow-500/5",children:(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:k("noActiveProviders")}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:k("noActiveProvidersDesc")})]})]})}),(0,d.jsx)("div",{className:"flex flex-col gap-4",children:Object.entries(g).map(([a,b])=>((a,b)=>{let c={tool:b,isExpanded:t===a,onToggle:()=>A(t===a?null:a),baseUrl:D&&z?z:"http://localhost:20128",apiKeys:F,batchStatus:H[a]||null,lastConfiguredAt:H[a]?.lastConfiguredAt||null};switch(a){case"claude":return(0,d.jsx)(n,{...c,activeProviders:L(),modelMappings:B[a]||{},onModelMappingChange:(b,c)=>M(a,b,c),hasActiveProviders:N,cloudEnabled:D},a);case"codex":return(0,d.jsx)(o,{...c,activeProviders:L(),cloudEnabled:D},a);case"droid":return(0,d.jsx)(q,{...c,activeProviders:L(),hasActiveProviders:N,cloudEnabled:D},a);case"openclaw":return(0,d.jsx)(s,{...c,activeProviders:L(),hasActiveProviders:N,cloudEnabled:D},a);case"antigravity":return(0,d.jsx)(x,{...c,activeProviders:L(),hasActiveProviders:N,cloudEnabled:D},a);case"cline":return(0,d.jsx)(u,{...c,activeProviders:L(),hasActiveProviders:N,cloudEnabled:D},a);case"kilo":return(0,d.jsx)(v,{...c,activeProviders:L(),hasActiveProviders:N,cloudEnabled:D},a);case"copilot":return(0,d.jsx)(y,{...c,activeProviders:L(),hasActiveProviders:N,cloudEnabled:D},a);default:return(0,d.jsx)(w,{toolId:a,...c,activeProviders:L(),cloudEnabled:D},a)}})(a,b))})]})}},26713:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/is-bot")},28354:a=>{"use strict";a.exports=require("util")},29021:a=>{"use strict";a.exports=require("fs")},29186:(a,b,c)=>{Promise.resolve().then(c.bind(c,37308))},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},29824:(a,b,c)=>{"use strict";c.d(b,{Ex:()=>j.default,$n:()=>d.default,Zp:()=>g.default,Qv:()=>i.CardSkeleton,G9:()=>t.default,bQ:()=>x.default,pp:()=>v.default,Qn:()=>w.default,pd:()=>e.default,Mh:()=>s.default,uR:()=>n.default,aF:()=>h.default,rq:()=>m.default,LF:()=>l.default,KN:()=>q.default,Lo:()=>r.default,y7:()=>p.default,Iz:()=>u.default,l6:()=>f.default,lM:()=>k.default,cn:()=>o.default});var d=c(53156),e=c(29518),f=c(59256),g=c(2490),h=c(65953),i=c(22746);c(45567);var j=c(4355),k=c(65472);c(59869),c(75146),c(65892),c(42546),c(22245);var l=c(8744),m=c(29494),n=c(1237);c(82054);var o=c(62688),p=c(46230),q=c(56589),r=c(73979);c(98004);var s=c(41371);c(53140);var t=c(27309),u=c(86059);c(77088);var v=c(85974);c(18732);var w=c(67083);c(52198);var x=c(50818);c(47047),c(16116)},33873:a=>{"use strict";a.exports=require("path")},37308:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/home/runner/work/OmniRoute/OmniRoute/src/app/(dashboard)/dashboard/cli-tools/CLIToolsPageClient.tsx\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/home/runner/work/OmniRoute/OmniRoute/src/app/(dashboard)/dashboard/cli-tools/CLIToolsPageClient.tsx","default")},41025:a=>{"use strict";a.exports=require("next/dist/server/app-render/dynamic-access-async-storage.external.js")},43482:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>g});var d=c(5735),e=c(53048),f=c(37308);async function g(){let a=await (0,e.D1)();return(0,d.jsx)(f.default,{machineId:a})}},43954:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/interception-routes")},47338:(a,b,c)=>{Promise.resolve().then(c.bind(c,21116))},48161:a=>{"use strict";a.exports=require("node:os")},48942:(a,b,c)=>{"use strict";c.r(b),c.d(b,{GlobalError:()=>C.default,__next_app__:()=>K,handler:()=>M,routeModule:()=>L});var d=c(7553),e=c(84006),f=c(67798),g=c(34775),h=c(99373),i=c(73461),j=c(1020),k=c(26349),l=c(54365),m=c(16023),n=c(63747),o=c(24235),p=c(23938),q=c(261),r=c(66758),s=c(77243),t=c(26713),u=c(37527),v=c(22820),w=c(88216),x=c(47929),y=c(79551),z=c(89125),A=c(86439),B=c(77068),C=c(81227),D=c(61287),E=c(81494),F=c(70722),G=c(70753),H=c(43954),I={};for(let a in D)0>["default","GlobalError","__next_app__","routeModule","handler"].indexOf(a)&&(I[a]=()=>D[a]);c.d(b,I);let J={children:["",{children:["(dashboard)",{children:["dashboard",{children:["cli-tools",{children:["__PAGE__",{},{page:[()=>Promise.resolve().then(c.bind(c,43482)),"/home/runner/work/OmniRoute/OmniRoute/src/app/(dashboard)/dashboard/cli-tools/page.tsx"]}]},{}]},{}]},{layout:[()=>Promise.resolve().then(c.bind(c,6676)),"/home/runner/work/OmniRoute/OmniRoute/src/app/(dashboard)/layout.tsx"],forbidden:[()=>Promise.resolve().then(c.t.bind(c,45270,23)),"next/dist/client/components/builtin/forbidden.js"],unauthorized:[()=>Promise.resolve().then(c.t.bind(c,28193,23)),"next/dist/client/components/builtin/unauthorized.js"]}]},{layout:[()=>Promise.resolve().then(c.bind(c,76537)),"/home/runner/work/OmniRoute/OmniRoute/src/app/layout.tsx"],error:[()=>Promise.resolve().then(c.bind(c,64385)),"/home/runner/work/OmniRoute/OmniRoute/src/app/error.tsx"],loading:[()=>Promise.resolve().then(c.bind(c,95127)),"/home/runner/work/OmniRoute/OmniRoute/src/app/loading.tsx"],"global-error":[()=>Promise.resolve().then(c.bind(c,81227)),"/home/runner/work/OmniRoute/OmniRoute/src/app/global-error.tsx"],"not-found":[()=>Promise.resolve().then(c.bind(c,8979)),"/home/runner/work/OmniRoute/OmniRoute/src/app/not-found.tsx"],forbidden:[()=>Promise.resolve().then(c.t.bind(c,45270,23)),"next/dist/client/components/builtin/forbidden.js"],unauthorized:[()=>Promise.resolve().then(c.t.bind(c,28193,23)),"next/dist/client/components/builtin/unauthorized.js"]}]}.children,K={require:c,loadChunk:()=>Promise.resolve()},L=new d.AppPageRouteModule({definition:{kind:e.RouteKind.APP_PAGE,page:"/(dashboard)/dashboard/cli-tools/page",pathname:"/dashboard/cli-tools",bundlePath:"",filename:"",appPaths:[]},userland:{loaderTree:J},distDir:".next",relativeProjectDir:""});async function M(a,b,d){var I;L.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let N=!!(0,h.getRequestMeta)(a,"minimalMode"),O="/(dashboard)/dashboard/cli-tools/page";"/index"===O&&(O="/");let P=await L.prepare(a,b,{srcPage:O,multiZoneDraftMode:!1});if(!P)return b.statusCode=400,b.end("Bad Request"),null==d.waitUntil||d.waitUntil.call(d,Promise.resolve()),null;let{buildId:Q,query:R,params:S,pageIsDynamic:T,buildManifest:U,nextFontManifest:V,reactLoadableManifest:W,serverActionsManifest:X,clientReferenceManifest:Y,subresourceIntegrityManifest:Z,prerenderManifest:$,isDraftMode:_,resolvedPathname:aa,revalidateOnlyGenerated:ab,routerServerContext:ac,nextConfig:ad,parsedUrl:ae,interceptionRoutePatterns:af,deploymentId:ag}=P,ah=(0,q.normalizeAppPath)(O),{isOnDemandRevalidate:ai}=P,aj=ad.experimental.ppr&&!ad.cacheComponents&&(0,H.isInterceptionRouteAppPath)(aa)?null:L.match(aa,$),ak=!!$.routes[aa],al=a.headers["user-agent"]||"",am=(0,t.getBotType)(al),an=(0,p.isHtmlBotRequest)(a),ao=(0,h.getRequestMeta)(a,"isPrefetchRSCRequest")??"1"===a.headers[s.NEXT_ROUTER_PREFETCH_HEADER],ap=(0,h.getRequestMeta)(a,"isRSCRequest")??!!a.headers[s.RSC_HEADER],aq=(0,r.getIsPossibleServerAction)(a),ar=(0,m.checkIsAppPPREnabled)(ad.experimental.ppr);if(!(0,h.getRequestMeta)(a,"postponed")&&ar&&"1"===a.headers[x.NEXT_RESUME_HEADER]&&"POST"===a.method){let b=[];for await(let c of a)b.push(c);let c=Buffer.concat(b).toString("utf8");(0,h.addRequestMeta)(a,"postponed",c)}let as=ar&&(null==(I=$.routes[ah]??$.dynamicRoutes[ah])?void 0:I.renderingMode)==="PARTIALLY_STATIC",at=!1,au=!1,av=as?(0,h.getRequestMeta)(a,"postponed"):void 0,aw=as&&ap&&!ao;N&&(aw=aw&&!!av);let ax=(0,h.getRequestMeta)(a,"segmentPrefetchRSCRequest"),ay=(!an||!as)&&(!al||(0,p.shouldServeStreamingMetadata)(al,ad.htmlLimitedBots)),az=!!((aj||ak||$.routes[ah])&&!(an&&as)),aA=as&&!0===ad.cacheComponents,aB=!0===L.isDev||!az||"string"==typeof av||(aA&&(0,h.getRequestMeta)(a,"onCacheEntryV2")?aw&&!N:aw),aC=an&&as,aD=null;_||!az||aB||aq||av||aw||(aD=aa);let aE=aD;!aE&&L.isDev&&(aE=aa),L.isDev||_||!az||!ap||aw||(0,k.d)(a.headers);let aF={...D,tree:J,GlobalError:C.default,handler:M,routeModule:L,__next_app__:K};X&&Y&&(0,o.setManifestsSingleton)({page:O,clientReferenceManifest:Y,serverActionsManifest:X});let aG=a.method||"GET",aH=(0,g.getTracer)(),aI=aH.getActiveScopeSpan(),aJ=async()=>((null==ac?void 0:ac.render404)?await ac.render404(a,b,ae,!1):b.end("This page could not be found"),null);try{let f=L.getVaryHeader(aa,af);b.setHeader("Vary",f);let k=async(c,d)=>{let e=new l.NodeNextRequest(a),f=new l.NodeNextResponse(b);return L.render(e,f,d).finally(()=>{if(!c)return;c.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let a=aH.getRootSpanAttributes();if(!a)return;if(a.get("next.span_type")!==i.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${a.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let d=a.get("next.route");if(d){let a=`${aG} ${d}`;c.setAttributes({"next.route":d,"http.route":d,"next.span_name":a}),c.updateName(a)}else c.updateName(`${aG} ${O}`)})},m=(0,h.getRequestMeta)(a,"incrementalCache"),o=async({span:e,postponed:f,fallbackRouteParams:g,forceStaticRender:i})=>{let l={query:R,params:S,page:ah,sharedContext:{buildId:Q},serverComponentsHmrCache:(0,h.getRequestMeta)(a,"serverComponentsHmrCache"),fallbackRouteParams:g,renderOpts:{App:()=>null,Document:()=>null,pageConfig:{},ComponentMod:aF,Component:(0,j.T)(aF),params:S,routeModule:L,page:O,postponed:f,shouldWaitOnAllReady:aC,serveStreamingMetadata:ay,supportsDynamicResponse:"string"==typeof f||aB,buildManifest:U,nextFontManifest:V,reactLoadableManifest:W,subresourceIntegrityManifest:Z,setCacheStatus:null==ac?void 0:ac.setCacheStatus,setIsrStatus:null==ac?void 0:ac.setIsrStatus,setReactDebugChannel:null==ac?void 0:ac.setReactDebugChannel,sendErrorsToBrowser:null==ac?void 0:ac.sendErrorsToBrowser,dir:c(33873).join(process.cwd(),L.relativeProjectDir),isDraftMode:_,botType:am,isOnDemandRevalidate:ai,isPossibleServerAction:aq,assetPrefix:ad.assetPrefix,nextConfigOutput:ad.output,crossOrigin:ad.crossOrigin,trailingSlash:ad.trailingSlash,images:ad.images,previewProps:$.preview,deploymentId:ag,enableTainting:ad.experimental.taint,htmlLimitedBots:ad.htmlLimitedBots,reactMaxHeadersLength:ad.reactMaxHeadersLength,multiZoneDraftMode:!1,incrementalCache:m,cacheLifeProfiles:ad.cacheLife,basePath:ad.basePath,serverActions:ad.experimental.serverActions,...at||au?{nextExport:!0,supportsDynamicResponse:!1,isStaticGeneration:!0,isDebugDynamicAccesses:at}:{},cacheComponents:!!ad.cacheComponents,experimental:{isRoutePPREnabled:as,expireTime:ad.expireTime,staleTimes:ad.experimental.staleTimes,dynamicOnHover:!!ad.experimental.dynamicOnHover,inlineCss:!!ad.experimental.inlineCss,authInterrupts:!!ad.experimental.authInterrupts,clientTraceMetadata:ad.experimental.clientTraceMetadata||[],clientParamParsingOrigins:ad.experimental.clientParamParsingOrigins,maxPostponedStateSizeBytes:(0,B.parseMaxPostponedStateSize)(ad.experimental.maxPostponedStateSize)},waitUntil:d.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:()=>{},onInstrumentationRequestError:(b,c,d,e)=>L.onRequestError(a,b,d,e,ac),err:(0,h.getRequestMeta)(a,"invokeError"),dev:L.isDev}};at&&(l.renderOpts.nextExport=!0,l.renderOpts.supportsDynamicResponse=!1,l.renderOpts.isDebugDynamicAccesses=at),i&&(l.renderOpts.supportsDynamicResponse=!1);let n=await k(e,l),{metadata:o}=n,{cacheControl:p,headers:q={},fetchTags:r,fetchMetrics:s}=o;if(r&&(q[x.NEXT_CACHE_TAGS_HEADER]=r),a.fetchMetrics=s,az&&(null==p?void 0:p.revalidate)===0&&!L.isDev&&!as){let a=o.staticBailoutInfo,b=Object.defineProperty(Error(`Page changed from static to dynamic at runtime ${aa}${(null==a?void 0:a.description)?`, reason: ${a.description}`:""}
|
|
16
|
-
see more here https://nextjs.org/docs/messages/app-static-to-dynamic-error`),"__NEXT_ERROR_CODE",{value:"E132",enumerable:!1,configurable:!0});if(null==a?void 0:a.stack){let c=a.stack;b.stack=b.message+c.substring(c.indexOf("\n"))}throw b}return{value:{kind:u.CachedRouteKind.APP_PAGE,html:n,headers:q,rscData:o.flightData,postponed:o.postponed,status:o.statusCode,segmentData:o.segmentData},cacheControl:p}},p=async({hasResolved:c,previousCacheEntry:f,isRevalidating:g,span:i,forceStaticRender:j=!1})=>{let k,l=!1===L.isDev,q=c||b.writableEnded;if(ai&&ab&&!f&&!N)return(null==ac?void 0:ac.render404)?await ac.render404(a,b):(b.statusCode=404,b.end("This page could not be found")),null;if(aj&&(k=(0,v.parseFallbackField)(aj.fallback)),k===v.FallbackMode.PRERENDER&&(0,t.isBot)(al)&&(!as||an)&&(k=v.FallbackMode.BLOCKING_STATIC_RENDER),(null==f?void 0:f.isStale)===-1&&(ai=!0),ai&&(k!==v.FallbackMode.NOT_FOUND||f)&&(k=v.FallbackMode.BLOCKING_STATIC_RENDER),!N&&k!==v.FallbackMode.BLOCKING_STATIC_RENDER&&aE&&!q&&!_&&T&&(l||!ak)){if((l||aj)&&k===v.FallbackMode.NOT_FOUND){if(ad.experimental.adapterPath)return await aJ();throw new A.NoFallbackError}if(as&&(ad.cacheComponents?!aw:!ap)){let b=l&&"string"==typeof(null==aj?void 0:aj.fallback)?aj.fallback:ah,c=l&&(null==aj?void 0:aj.fallbackRouteParams)?(0,n.createOpaqueFallbackRouteParams)(aj.fallbackRouteParams):au?(0,n.getFallbackRouteParams)(ah,L):null,f=await L.handleResponse({cacheKey:b,req:a,nextConfig:ad,routeKind:e.RouteKind.APP_PAGE,isFallback:!0,prerenderManifest:$,isRoutePPREnabled:as,responseGenerator:async()=>o({span:i,postponed:void 0,fallbackRouteParams:c,forceStaticRender:!1}),waitUntil:d.waitUntil,isMinimalMode:N});if(null===f)return null;if(f)return delete f.cacheControl,f}}let r=ai||g||!av?void 0:av;if(aA&&!N&&m&&aw&&!j){let b=await m.get(aa,{kind:u.IncrementalCacheKind.APP_PAGE,isRoutePPREnabled:!0,isFallback:!1});b&&b.value&&b.value.kind===u.CachedRouteKind.APP_PAGE&&(r=b.value.postponed,b&&(-1===b.isStale||!0===b.isStale)&&(0,G.scheduleOnNextTick)(async()=>{let b=L.getResponseCache(a);try{await b.revalidate(aa,m,as,!1,a=>p({...a,forceStaticRender:!0}),null,c,d.waitUntil)}catch(a){console.error("Error revalidating the page in the background",a)}}))}if(at&&void 0!==r)return{cacheControl:{revalidate:1,expire:void 0},value:{kind:u.CachedRouteKind.PAGES,html:w.default.EMPTY,pageData:{},headers:void 0,status:void 0}};let s=l&&(null==aj?void 0:aj.fallbackRouteParams)&&(0,h.getRequestMeta)(a,"renderFallbackShell")?(0,n.createOpaqueFallbackRouteParams)(aj.fallbackRouteParams):au?(0,n.getFallbackRouteParams)(ah,L):null;return o({span:i,postponed:r,fallbackRouteParams:s,forceStaticRender:j})},q=async c=>{var f,g,i,j,k;let l,m=await L.handleResponse({cacheKey:aD,responseGenerator:a=>p({span:c,...a}),routeKind:e.RouteKind.APP_PAGE,isOnDemandRevalidate:ai,isRoutePPREnabled:as,req:a,nextConfig:ad,prerenderManifest:$,waitUntil:d.waitUntil,isMinimalMode:N});if(_&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate"),L.isDev&&b.setHeader("Cache-Control","no-store, must-revalidate"),!m){if(aD)throw Object.defineProperty(Error("invariant: cache entry required but not generated"),"__NEXT_ERROR_CODE",{value:"E62",enumerable:!1,configurable:!0});return null}if((null==(f=m.value)?void 0:f.kind)!==u.CachedRouteKind.APP_PAGE)throw Object.defineProperty(Error(`Invariant app-page handler received invalid cache entry ${null==(i=m.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E707",enumerable:!1,configurable:!0});let n="string"==typeof m.value.postponed;az&&!aw&&(!n||ao)&&(N||b.setHeader("x-nextjs-cache",ai?"REVALIDATED":m.isMiss?"MISS":m.isStale?"STALE":"HIT"),b.setHeader(s.NEXT_IS_PRERENDER_HEADER,"1"));let{value:q}=m;if(av)l={revalidate:0,expire:void 0};else if(aw)l={revalidate:0,expire:void 0};else if(!L.isDev)if(_)l={revalidate:0,expire:void 0};else if(az){if(m.cacheControl)if("number"==typeof m.cacheControl.revalidate){if(m.cacheControl.revalidate<1)throw Object.defineProperty(Error(`Invalid revalidate configuration provided: ${m.cacheControl.revalidate} < 1`),"__NEXT_ERROR_CODE",{value:"E22",enumerable:!1,configurable:!0});l={revalidate:m.cacheControl.revalidate,expire:(null==(j=m.cacheControl)?void 0:j.expire)??ad.expireTime}}else l={revalidate:x.CACHE_ONE_YEAR,expire:void 0}}else b.getHeader("Cache-Control")||(l={revalidate:0,expire:void 0});if(m.cacheControl=l,"string"==typeof ax&&(null==q?void 0:q.kind)===u.CachedRouteKind.APP_PAGE&&q.segmentData){b.setHeader(s.NEXT_DID_POSTPONE_HEADER,"2");let c=null==(k=q.headers)?void 0:k[x.NEXT_CACHE_TAGS_HEADER];N&&az&&c&&"string"==typeof c&&b.setHeader(x.NEXT_CACHE_TAGS_HEADER,c);let d=q.segmentData.get(ax);return void 0!==d?(0,z.sendRenderResult)({req:a,res:b,generateEtags:ad.generateEtags,poweredByHeader:ad.poweredByHeader,result:w.default.fromStatic(d,s.RSC_CONTENT_TYPE_HEADER),cacheControl:m.cacheControl}):(b.statusCode=204,(0,z.sendRenderResult)({req:a,res:b,generateEtags:ad.generateEtags,poweredByHeader:ad.poweredByHeader,result:w.default.EMPTY,cacheControl:m.cacheControl}))}let r=aA?(0,h.getRequestMeta)(a,"onCacheEntryV2")??(0,h.getRequestMeta)(a,"onCacheEntry"):(0,h.getRequestMeta)(a,"onCacheEntry");if(r&&await r(m,{url:(0,h.getRequestMeta)(a,"initURL")??a.url}))return null;if(q.headers){let a={...q.headers};for(let[c,d]of(N&&az||delete a[x.NEXT_CACHE_TAGS_HEADER],Object.entries(a)))if(void 0!==d)if(Array.isArray(d))for(let a of d)b.appendHeader(c,a);else"number"==typeof d&&(d=d.toString()),b.appendHeader(c,d)}let t=null==(g=q.headers)?void 0:g[x.NEXT_CACHE_TAGS_HEADER];if(N&&az&&t&&"string"==typeof t&&b.setHeader(x.NEXT_CACHE_TAGS_HEADER,t),!q.status||ap&&as||(b.statusCode=q.status),!N&&q.status&&E.RedirectStatusCode[q.status]&&ap&&(b.statusCode=200),n&&!aw&&b.setHeader(s.NEXT_DID_POSTPONE_HEADER,"1"),ap&&!_){if(void 0===q.rscData){if(q.html.contentType!==s.RSC_CONTENT_TYPE_HEADER)if(ad.cacheComponents)return b.statusCode=404,(0,z.sendRenderResult)({req:a,res:b,generateEtags:ad.generateEtags,poweredByHeader:ad.poweredByHeader,result:w.default.EMPTY,cacheControl:m.cacheControl});else throw Object.defineProperty(new F.InvariantError(`Expected RSC response, got ${q.html.contentType}`),"__NEXT_ERROR_CODE",{value:"E789",enumerable:!1,configurable:!0});return(0,z.sendRenderResult)({req:a,res:b,generateEtags:ad.generateEtags,poweredByHeader:ad.poweredByHeader,result:q.html,cacheControl:m.cacheControl})}return(0,z.sendRenderResult)({req:a,res:b,generateEtags:ad.generateEtags,poweredByHeader:ad.poweredByHeader,result:w.default.fromStatic(q.rscData,s.RSC_CONTENT_TYPE_HEADER),cacheControl:m.cacheControl})}let v=q.html;if(!n||N||ap)return(0,z.sendRenderResult)({req:a,res:b,generateEtags:ad.generateEtags,poweredByHeader:ad.poweredByHeader,result:v,cacheControl:m.cacheControl});if(at)return v.push(new ReadableStream({start(a){a.enqueue(y.ENCODED_TAGS.CLOSED.BODY_AND_HTML),a.close()}})),(0,z.sendRenderResult)({req:a,res:b,generateEtags:ad.generateEtags,poweredByHeader:ad.poweredByHeader,result:v,cacheControl:{revalidate:0,expire:void 0}});let A=new TransformStream;return v.push(A.readable),o({span:c,postponed:q.postponed,fallbackRouteParams:null,forceStaticRender:!1}).then(async a=>{var b,c;if(!a)throw Object.defineProperty(Error("Invariant: expected a result to be returned"),"__NEXT_ERROR_CODE",{value:"E463",enumerable:!1,configurable:!0});if((null==(b=a.value)?void 0:b.kind)!==u.CachedRouteKind.APP_PAGE)throw Object.defineProperty(Error(`Invariant: expected a page response, got ${null==(c=a.value)?void 0:c.kind}`),"__NEXT_ERROR_CODE",{value:"E305",enumerable:!1,configurable:!0});await a.value.html.pipeTo(A.writable)}).catch(a=>{A.writable.abort(a).catch(a=>{console.error("couldn't abort transformer",a)})}),(0,z.sendRenderResult)({req:a,res:b,generateEtags:ad.generateEtags,poweredByHeader:ad.poweredByHeader,result:v,cacheControl:{revalidate:0,expire:void 0}})};if(!aI)return await aH.withPropagatedContext(a.headers,()=>aH.trace(i.BaseServerSpan.handleRequest,{spanName:`${aG} ${O}`,kind:g.SpanKind.SERVER,attributes:{"http.method":aG,"http.target":a.url}},q));await q(aI)}catch(b){throw b instanceof A.NoFallbackError||await L.onRequestError(a,b,{routerKind:"App Router",routePath:O,routeType:"render",revalidateReason:(0,f.c)({isStaticGeneration:az,isOnDemandRevalidate:ai})},!1,ac),b}}},
|
|
15
|
+
`},{filename:"~/.codex/auth.json",content:JSON.stringify({OPENAI_API_KEY:r},null,2)}])})]})}let p="https://cloud.omniroute.online";function q({tool:a,isExpanded:b,onToggle:c,baseUrl:g,hasActiveProviders:h,apiKeys:k,activeProviders:m,cloudEnabled:n,batchStatus:o,lastConfiguredAt:q}){let r,s,t,u,v=(0,j.c)("cliTools"),[w,x]=(0,e.useState)(null),[y,z]=(0,e.useState)(!1),[A,B]=(0,e.useState)(!1),[C,D]=(0,e.useState)(!1),[E,F]=(0,e.useState)(null),[G,H]=(0,e.useState)(""),[I,J]=(0,e.useState)(""),[K,L]=(0,e.useState)(!1),[M,N]=(0,e.useState)({}),[O,P]=(0,e.useState)(!1),[Q,R]=(0,e.useState)("");(0,e.useRef)(!1);let[S,T]=(0,e.useState)([]),[U,V]=(0,e.useState)(!1),[W,X]=(0,e.useState)(null),Y=!!(w?.installed&&w?.runnable),Z=(()=>{if(!Y)return null;let a=w.settings?.customModels?.find(a=>"custom:OmniRoute-0"===a.id);if(!a)return"not_configured";let b=a.baseUrl?.includes("localhost")||a.baseUrl?.includes("127.0.0.1"),c=n&&p&&a.baseUrl?.startsWith(p);return b||c?"configured":"other"})()||o?.configStatus||null,$=async()=>{z(!0);try{let a=await fetch("/api/cli-tools/droid-settings"),b=await a.json();x(b)}catch(a){x({installed:!1,error:a.message})}finally{z(!1)}},_=()=>{let a=Q||g;return a.endsWith("/v1")?a:`${a}/v1`},aa=async()=>{B(!0),F(null);try{let a=G?.trim()||(k?.length>0?k[0].key:null)||(n?null:"sk_omniroute"),b=await fetch("/api/cli-tools/droid-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:_(),apiKey:a,model:I})}),c=await b.json();b.ok?(F({type:"success",text:v("settingsApplied")}),$()):F({type:"error",text:c.error||v("failedApplySettings")})}catch(a){F({type:"error",text:a.message})}finally{B(!1)}},ab=async()=>{D(!0),F(null);try{let a=await fetch("/api/cli-tools/droid-settings",{method:"DELETE"}),b=await a.json();a.ok?(F({type:"success",text:v("settingsReset")}),J(""),H(""),$()):F({type:"error",text:b.error||v("failedResetSettings")})}catch(a){F({type:"error",text:a.message})}finally{D(!1)}},ac=async()=>{try{let a=await fetch("/api/cli-tools/backups?tool=droid"),b=await a.json();a.ok&&T(b.backups||[])}catch(a){console.log("Error fetching backups:",a)}},ad=async a=>{X(a),F(null);try{let b=await fetch("/api/cli-tools/backups",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({tool:"droid",backupId:a})}),c=await b.json();b.ok?(F({type:"success",text:v("backupRestored")}),$(),ac()):F({type:"error",text:c.error||v("failedRestore")})}catch(a){F({type:"error",text:a.message})}finally{X(null)}};return(0,d.jsxs)(f.Zp,{padding:"sm",className:"overflow-hidden",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:c,children:[(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,d.jsx)(i.default,{src:"/providers/droid.png",alt:a.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:a=>{a.currentTarget.style.display="none"}})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("h3",{className:"font-medium text-sm",children:a.name}),(0,d.jsx)(l,{effectiveConfigStatus:Z,batchStatus:o,lastConfiguredAt:q})]}),(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:v("toolDescriptions.droid")})]})]}),(0,d.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${b?"rotate-180":""}`,children:"expand_more"})]}),b&&(0,d.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[y&&(0,d.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,d.jsx)("span",{children:v("checkingCli",{tool:"Factory Droid"})})]}),!y&&w&&!Y&&(0,d.jsxs)("div",{className:"flex items-center gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,d.jsxs)("div",{className:"flex-1",children:[(0,d.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:w.installed?v("cliNotRunnable",{tool:"Factory Droid"}):v("cliNotInstalled",{tool:"Factory Droid"})}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:w.installed?v("cliFoundFailedHealthcheck",{tool:"Factory Droid",reason:w.reason?` (${w.reason})`:""}):v("installCliPrompt",{tool:"Factory Droid"})})]})]}),!y&&Y&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[w?.settings?.customModels?.find(a=>"custom:OmniRoute-0"===a.id)?.baseUrl&&(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:v("current")}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("span",{className:"flex-1 px-2 py-1.5 text-xs text-text-muted truncate",children:w.settings.customModels.find(a=>"custom:OmniRoute-0"===a.id).baseUrl})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:v("baseUrl")}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("input",{type:"text",value:(r=Q||g).endsWith("/v1")?r:`${r}/v1`,onChange:a=>R(a.target.value),placeholder:v("baseUrlPlaceholder"),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"}),Q&&Q!==g&&(0,d.jsx)("button",{onClick:()=>R(""),className:"p-1 text-text-muted hover:text-primary rounded transition-colors",title:v("resetToDefault"),children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"restart_alt"})})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:v("apiKey")}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),k.length>0?(0,d.jsx)("select",{value:G,onChange:a=>H(a.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:k.map(a=>(0,d.jsx)("option",{value:a.key,children:a.key},a.id))}):(0,d.jsx)("span",{className:"flex-1 text-xs text-text-muted px-2 py-1.5",children:n?v("noApiKeysCreateOne"):v("defaultOmnirouteKey")})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:v("model")}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("input",{type:"text",value:I,onChange:a=>J(a.target.value),placeholder:v("providerModelPlaceholder"),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,d.jsx)("button",{onClick:()=>L(!0),disabled:!h,className:`px-2 py-1.5 rounded border text-xs transition-colors shrink-0 whitespace-nowrap ${h?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:v("selectModel")}),I&&(0,d.jsx)("button",{onClick:()=>J(""),className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors",title:v("clear"),children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})]}),E&&(0,d.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===E.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===E.type?"check_circle":"error"}),(0,d.jsx)("span",{children:E.text})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsxs)(f.$n,{variant:"primary",size:"sm",onClick:aa,disabled:!I,loading:A,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),v("apply")]}),(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:ab,disabled:!w?.hasOmniRoute,loading:C,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),v("reset")]}),(0,d.jsxs)(f.$n,{variant:"ghost",size:"sm",onClick:()=>P(!0),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),v("manualConfig")]}),(0,d.jsx)("div",{className:"flex-1"}),(0,d.jsxs)(f.$n,{variant:"ghost",size:"sm",onClick:()=>{V(!U),U||ac()},children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"history"}),v("backups"),S.length>0&&` (${S.length})`]})]}),U&&(0,d.jsxs)("div",{className:"mt-2 p-3 bg-surface border border-border rounded-lg",children:[(0,d.jsxs)("h4",{className:"text-xs font-semibold text-text-main mb-2 flex items-center gap-1",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"history"}),v("configBackups")]}),0===S.length?(0,d.jsx)("p",{className:"text-xs text-text-muted",children:v("noBackupsYet")}):(0,d.jsx)("div",{className:"space-y-1.5",children:S.map(a=>(0,d.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,d.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"description"}),(0,d.jsx)("span",{className:"flex-1 truncate font-mono",title:a.id,children:a.id}),(0,d.jsx)("span",{className:"text-text-muted whitespace-nowrap",children:new Date(a.createdAt).toLocaleString()}),(0,d.jsx)("button",{onClick:()=>ad(a.id),disabled:W===a.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:W===a.id?"...":v("restore")})]},a.id))})]})]})]}),(0,d.jsx)(f.rq,{isOpen:K,onClose:()=>L(!1),onSelect:a=>{J(a.value),L(!1)},selectedModel:I,activeProviders:m,modelAliases:M,title:v("selectModelForTool",{tool:"Factory Droid"})}),(0,d.jsx)(f.uR,{isOpen:O,onClose:()=>P(!1),title:v("droidManualConfiguration"),configs:(s=G&&G.trim()?G:n?"<API_KEY_FROM_DASHBOARD>":"sk_omniroute",t={customModels:[{model:I||"provider/model-id",id:"custom:OmniRoute-0",index:0,baseUrl:_(),apiKey:s,displayName:I||"provider/model-id",maxOutputTokens:131072,noImageSupport:!1,provider:"openai"}]},u="u">typeof navigator&&navigator.platform,[{filename:u?.toLowerCase().includes("win")?"%USERPROFILE%\\.factory\\settings.json":"~/.factory/settings.json",content:JSON.stringify(t,null,2)}])})]})}let r="https://cloud.omniroute.online";function s({tool:a,isExpanded:b,onToggle:c,baseUrl:g,hasActiveProviders:h,apiKeys:k,activeProviders:m,cloudEnabled:n,batchStatus:o,lastConfiguredAt:p}){let q,s,t=(0,j.c)("cliTools"),[u,v]=(0,e.useState)(null),[w,x]=(0,e.useState)(!1),[y,z]=(0,e.useState)(!1),[A,B]=(0,e.useState)(!1),[C,D]=(0,e.useState)(null),[E,F]=(0,e.useState)(""),[G,H]=(0,e.useState)(""),[I,J]=(0,e.useState)(!1),[K,L]=(0,e.useState)({}),[M,N]=(0,e.useState)(!1),[O,P]=(0,e.useState)("");(0,e.useRef)(!1);let[Q,R]=(0,e.useState)([]),[S,T]=(0,e.useState)(!1),[U,V]=(0,e.useState)(null),W=!!(u?.installed&&u?.runnable),X=(()=>{if(!W)return null;let a=u.settings?.models?.providers?.omniroute;if(!a)return"not_configured";let b=a.baseUrl?.includes("localhost")||a.baseUrl?.includes("127.0.0.1"),c=n&&r&&a.baseUrl?.startsWith(r);return b||c?"configured":"other"})()||o?.configStatus||null,Y=async()=>{x(!0);try{let a=await fetch("/api/cli-tools/openclaw-settings"),b=await a.json();v(b)}catch(a){v({installed:!1,error:a.message})}finally{x(!1)}},Z=()=>{let a=O||g;return a.endsWith("/v1")?a:`${a}/v1`},$=async()=>{z(!0),D(null);try{let a=E?.trim()||(k?.length>0?k[0].key:null)||(n?null:"sk_omniroute"),b=await fetch("/api/cli-tools/openclaw-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:Z(),apiKey:a,model:G})}),c=await b.json();b.ok?(D({type:"success",text:t("settingsApplied")}),Y()):D({type:"error",text:c.error||t("failedApplySettings")})}catch(a){D({type:"error",text:a.message})}finally{z(!1)}},_=async()=>{B(!0),D(null);try{let a=await fetch("/api/cli-tools/openclaw-settings",{method:"DELETE"}),b=await a.json();a.ok?(D({type:"success",text:t("settingsReset")}),H(""),F(""),Y()):D({type:"error",text:b.error||t("failedResetSettings")})}catch(a){D({type:"error",text:a.message})}finally{B(!1)}},aa=async()=>{try{let a=await fetch("/api/cli-tools/backups?tool=openclaw"),b=await a.json();a.ok&&R(b.backups||[])}catch(a){console.log("Error fetching backups:",a)}},ab=async a=>{V(a),D(null);try{let b=await fetch("/api/cli-tools/backups",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({tool:"openclaw",backupId:a})}),c=await b.json();b.ok?(D({type:"success",text:t("backupRestored")}),Y(),aa()):D({type:"error",text:c.error||t("failedRestore")})}catch(a){D({type:"error",text:a.message})}finally{V(null)}};return(0,d.jsxs)(f.Zp,{padding:"sm",className:"overflow-hidden",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:c,children:[(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,d.jsx)(i.default,{src:"/providers/openclaw.png",alt:a.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:a=>{a.currentTarget.style.display="none"}})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("h3",{className:"font-medium text-sm",children:a.name}),(0,d.jsx)(l,{effectiveConfigStatus:X,batchStatus:o,lastConfiguredAt:p})]}),(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:t("toolDescriptions.openclaw")})]})]}),(0,d.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${b?"rotate-180":""}`,children:"expand_more"})]}),b&&(0,d.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[w&&(0,d.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,d.jsx)("span",{children:t("checkingCli",{tool:"Open Claw"})})]}),!w&&u&&!W&&(0,d.jsxs)("div",{className:"flex items-center gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,d.jsxs)("div",{className:"flex-1",children:[(0,d.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:u.installed?t("cliNotRunnable",{tool:"Open Claw"}):t("cliNotInstalled",{tool:"Open Claw"})}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:u.installed?t("cliFoundFailedHealthcheck",{tool:"Open Claw",reason:u.reason?` (${u.reason})`:""}):t("installCliPrompt",{tool:"Open Claw"})})]})]}),!w&&W&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[u?.settings?.models?.providers?.omniroute?.baseUrl&&(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:t("current")}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("span",{className:"flex-1 px-2 py-1.5 text-xs text-text-muted truncate",children:u.settings.models.providers.omniroute.baseUrl})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:t("baseUrl")}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("input",{type:"text",value:(q=O||g).endsWith("/v1")?q:`${q}/v1`,onChange:a=>P(a.target.value),placeholder:t("baseUrlPlaceholder"),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"}),O&&O!==g&&(0,d.jsx)("button",{onClick:()=>P(""),className:"p-1 text-text-muted hover:text-primary rounded transition-colors",title:t("resetToDefault"),children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"restart_alt"})})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:t("apiKey")}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),k.length>0?(0,d.jsx)("select",{value:E,onChange:a=>F(a.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:k.map(a=>(0,d.jsx)("option",{value:a.key,children:a.key},a.id))}):(0,d.jsx)("span",{className:"flex-1 text-xs text-text-muted px-2 py-1.5",children:n?t("noApiKeysCreateOne"):t("defaultOmnirouteKey")})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:t("model")}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("input",{type:"text",value:G,onChange:a=>H(a.target.value),placeholder:t("providerModelPlaceholder"),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,d.jsx)("button",{onClick:()=>J(!0),disabled:!h,className:`px-2 py-1.5 rounded border text-xs transition-colors shrink-0 whitespace-nowrap ${h?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:t("selectModel")}),G&&(0,d.jsx)("button",{onClick:()=>H(""),className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors",title:t("clear"),children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})]}),C&&(0,d.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===C.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===C.type?"check_circle":"error"}),(0,d.jsx)("span",{children:C.text})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsxs)(f.$n,{variant:"primary",size:"sm",onClick:$,disabled:!G,loading:y,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),t("apply")]}),(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:_,disabled:!u?.hasOmniRoute,loading:A,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),t("reset")]}),(0,d.jsxs)(f.$n,{variant:"ghost",size:"sm",onClick:()=>N(!0),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),t("manualConfig")]}),(0,d.jsx)("div",{className:"flex-1"}),(0,d.jsxs)(f.$n,{variant:"ghost",size:"sm",onClick:()=>{T(!S),S||aa()},children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"history"}),t("backups"),Q.length>0&&` (${Q.length})`]})]}),S&&(0,d.jsxs)("div",{className:"mt-2 p-3 bg-surface border border-border rounded-lg",children:[(0,d.jsxs)("h4",{className:"text-xs font-semibold text-text-main mb-2 flex items-center gap-1",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"history"}),t("configBackups")]}),0===Q.length?(0,d.jsx)("p",{className:"text-xs text-text-muted",children:t("noBackupsYet")}):(0,d.jsx)("div",{className:"space-y-1.5",children:Q.map(a=>(0,d.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,d.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"description"}),(0,d.jsx)("span",{className:"flex-1 truncate font-mono",title:a.id,children:a.id}),(0,d.jsx)("span",{className:"text-text-muted whitespace-nowrap",children:new Date(a.createdAt).toLocaleString()}),(0,d.jsx)("button",{onClick:()=>ab(a.id),disabled:U===a.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:U===a.id?"...":t("restore")})]},a.id))})]})]})]}),(0,d.jsx)(f.rq,{isOpen:I,onClose:()=>J(!1),onSelect:a=>{H(a.value),J(!1)},selectedModel:G,activeProviders:m,modelAliases:K,title:t("selectModelForTool",{tool:"Open Claw"})}),(0,d.jsx)(f.uR,{isOpen:M,onClose:()=>N(!1),title:t("openClawManualConfiguration"),configs:(s=E&&E.trim()?E:n?"<API_KEY_FROM_DASHBOARD>":"sk_omniroute",[{filename:"~/.openclaw/openclaw.json",content:JSON.stringify({agents:{defaults:{model:{primary:`omniroute/${G||"provider/model-id"}`}}},models:{providers:{omniroute:{baseUrl:Z(),apiKey:s,api:"openai-completions",models:[{id:G||"provider/model-id",name:(G||"provider/model-id").split("/").pop()}]}}}},null,2)}])})]})}let t="https://cloud.omniroute.online";function u({tool:a,isExpanded:b,onToggle:c,baseUrl:g,hasActiveProviders:h,apiKeys:k,activeProviders:m,cloudEnabled:n,batchStatus:o,lastConfiguredAt:p}){let q=(0,j.c)("cliTools"),[r,s]=(0,e.useState)(null),[u,v]=(0,e.useState)(!1),[w,x]=(0,e.useState)(!1),[y,z]=(0,e.useState)(!1),[A,B]=(0,e.useState)(null),[C,D]=(0,e.useState)(""),[E,F]=(0,e.useState)(""),[G,H]=(0,e.useState)(!1),[I,J]=(0,e.useState)({}),[K,L]=(0,e.useState)(!1),[M,N]=(0,e.useState)(""),O=(0,e.useRef)(!1),[P,Q]=(0,e.useState)([]),[R,S]=(0,e.useState)(!1),[T,U]=(0,e.useState)(null),V=!!(r?.installed&&r?.runnable),W=(()=>{if(!V)return null;if(!r.hasOmniRoute)return"not_configured";let a=r.settings?.openAiBaseUrl||"",b=a.includes("localhost")||a.includes("127.0.0.1"),c=n&&t&&a.startsWith(t);return b||c?"configured":"other"})(),X=W||o?.configStatus||null,Y=async()=>{try{let a=await fetch("/api/cli-tools/backups?tool=cline");if(a.ok){let b=await a.json();Q(b.backups||[])}}catch{}},Z=async a=>{U(a);try{let b=await fetch("/api/cli-tools/backups",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({tool:"cline",backupId:a})});if(b.ok)B({type:"success",text:q("backupRestoredReloading")}),await $(),await Y();else{let a=await b.json();B({type:"error",text:a.error||q("failedRestoreBackup")})}}catch(a){B({type:"error",text:a.message})}finally{U(null)}},$=async()=>{v(!0);try{let a=await fetch("/api/cli-tools/cline-settings"),b=await a.json();s(b)}catch(a){s({error:a.message})}finally{v(!1)}},_=async()=>{x(!0),B(null);try{let a=M||g||"http://localhost:20128",b=a.endsWith("/v1")?a:`${a}/v1`,c=await fetch("/api/cli-tools/cline-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:b,apiKey:C||"sk_omniroute",model:E})}),d=await c.json();c.ok?(B({type:"success",text:d.message||q("applied")}),await $(),await Y()):B({type:"error",text:d.error||q("failed")})}catch(a){B({type:"error",text:a.message})}finally{x(!1)}},aa=async()=>{z(!0),B(null);try{let a=await fetch("/api/cli-tools/cline-settings",{method:"DELETE"}),b=await a.json();a.ok?(B({type:"success",text:b.message||q("resetDone")}),F(""),O.current=!1,await $(),await Y()):B({type:"error",text:b.error||q("failed")})}catch(a){B({type:"error",text:a.message})}finally{z(!1)}};return(0,d.jsxs)(f.Zp,{padding:"sm",className:"overflow-hidden",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:c,children:[(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("div",{className:"size-8 rounded-lg flex items-center justify-center shrink-0",children:a.image?(0,d.jsx)(i.default,{src:a.image,alt:a.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:a=>{a.currentTarget.style.display="none"}}):(0,d.jsx)("span",{className:"material-symbols-outlined text-xl",style:{color:a.color},children:"terminal"})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("h3",{className:"font-medium text-sm",children:a.name}),(0,d.jsx)(l,{effectiveConfigStatus:X,batchStatus:o,lastConfiguredAt:p})]}),(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:q("toolDescriptions.cline")})]})]}),(0,d.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${b?"rotate-180":""}`,children:"expand_more"})]}),b&&(0,d.jsxs)("div",{className:"mt-6 pt-6 border-t border-border",children:[u&&(0,d.jsxs)("div",{className:"flex items-center gap-2 text-text-muted text-sm",children:[(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin text-base",children:"progress_activity"}),(0,d.jsx)("span",{children:q("checkingCli",{tool:"Cline"})})]}),r&&!u&&(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{className:"flex items-start gap-3 p-3 rounded-lg border bg-bg-secondary/50 border-border",children:[(0,d.jsx)("span",{className:`material-symbols-outlined text-lg ${V?"text-green-500":"text-yellow-500"}`,children:V?"check_circle":"warning"}),(0,d.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,d.jsx)("p",{className:"text-sm font-medium",children:V?q("cliDetectedReady",{tool:"Cline"}):r.installed?q("cliNotRunnable",{tool:"Cline"}):q("cliNotDetected",{tool:"Cline"})}),r.commandPath&&(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:[q("binary"),":"," ",(0,d.jsx)("code",{className:"px-1 py-0.5 rounded bg-black/5 dark:bg-white/10",children:r.commandPath})]}),r.globalStatePath&&(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:[q("configPathShort"),":"," ",(0,d.jsx)("code",{className:"px-1 py-0.5 rounded bg-black/5 dark:bg-white/10",children:r.globalStatePath})]})]})]}),V&&(0,d.jsxs)(d.Fragment,{children:["configured"===W&&(0,d.jsxs)("div",{className:"flex items-start gap-3 p-3 bg-green-500/10 border border-green-500/30 rounded-lg",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-green-500 text-lg",children:"check_circle"}),(0,d.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,d.jsx)("p",{className:"text-sm text-green-700 dark:text-green-300",children:q("omnirouteConfiguredOpenAiCompatible")}),(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:[q("provider"),": ",(0,d.jsx)("strong",{children:"openai"})," • ",q("model"),":"," ",(0,d.jsx)("strong",{children:r.settings?.openAiModelId||"—"})]})]})]}),(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,d.jsx)("label",{className:"text-sm text-text-muted",children:q("model")}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("input",{type:"text",value:E,onChange:a=>F(a.target.value),placeholder:q("providerModelPlaceholder"),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,d.jsx)(f.$n,{variant:"outline",size:"sm",onClick:()=>H(!0),disabled:!h,children:q("select")}),(0,d.jsx)(f.$n,{variant:"ghost",size:"sm",onClick:()=>L(!0),children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"edit"})})]})]}),(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,d.jsx)("label",{className:"text-sm text-text-muted",children:q("apiKey")}),k&&k.length>0?(0,d.jsx)("select",{value:C,onChange:a=>D(a.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:k.map(a=>(0,d.jsx)("option",{value:a.key,children:a.key},a.id))}):(0,d.jsx)("p",{className:"text-sm text-text-muted",children:n?q("noApiKeysAvailable"):q("usingDefaultOmniroute")})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2 pt-2",children:[(0,d.jsxs)(f.$n,{variant:"primary",size:"sm",onClick:_,disabled:!E,loading:w,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"configured"===W?q("updateConfig"):q("applyConfig")]}),"configured"===W&&(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:aa,loading:y,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restart_alt"}),q("reset")]})]}),A&&(0,d.jsxs)("div",{className:`flex items-center gap-2 px-3 py-2 rounded-lg text-sm ${"success"===A.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"success"===A.type?"check_circle":"error"}),(0,d.jsx)("span",{children:A.text})]}),(0,d.jsxs)("div",{className:"border-t border-border pt-3 mt-1",children:[(0,d.jsxs)("button",{onClick:()=>S(!R),className:"flex items-center gap-2 text-sm text-text-muted hover:text-text transition-colors",children:[(0,d.jsx)("span",{className:`material-symbols-outlined text-[16px] transition-transform ${R?"rotate-90":""}`,children:"chevron_right"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"backup"}),q("backups")," ",P.length>0&&`(${P.length})`]}),R&&P.length>0&&(0,d.jsx)("div",{className:"mt-2 flex flex-col gap-1.5 pl-6",children:P.map(a=>(0,d.jsxs)("div",{className:"flex items-center justify-between gap-2 p-2 rounded bg-bg-secondary/50 text-xs",children:[(0,d.jsxs)("div",{className:"flex flex-col",children:[(0,d.jsx)("span",{className:"font-medium",children:a.originalFile}),(0,d.jsx)("span",{className:"text-text-muted",children:new Date(a.createdAt).toLocaleString()})]}),(0,d.jsx)(f.$n,{variant:"ghost",size:"sm",onClick:()=>Z(a.id),loading:T===a.id,children:q("restore")})]},a.id))}),R&&0===P.length&&(0,d.jsx)("p",{className:"mt-2 pl-6 text-xs text-text-muted",children:q("noBackupsAvailable")})]})]})]})]}),(0,d.jsx)(f.rq,{isOpen:G,onClose:()=>H(!1),onSelect:a=>{F(a.value),H(!1)},selectedModel:E,activeProviders:m,title:q("selectModelForTool",{tool:"Cline"})}),K&&(0,d.jsx)(f.uR,{isOpen:K,onClose:()=>L(!1),title:q("clineManualConfiguration"),...{onApply:a=>{a.model&&F(a.model),a.apiKey&&D(a.apiKey),a.baseUrl&&N(a.baseUrl),L(!1)},currentConfig:{model:E,apiKey:C,baseUrl:M||g}}})]})}function v({tool:a,isExpanded:b,onToggle:c,baseUrl:g,hasActiveProviders:h,apiKeys:k,activeProviders:m,cloudEnabled:n,batchStatus:o,lastConfiguredAt:p}){let q=(0,j.c)("cliTools"),[r,s]=(0,e.useState)(null),[t,u]=(0,e.useState)(!1),[v,w]=(0,e.useState)(!1),[x,y]=(0,e.useState)(!1),[z,A]=(0,e.useState)(null),[B,C]=(0,e.useState)(""),[D,E]=(0,e.useState)(""),[F,G]=(0,e.useState)(!1),[H,I]=(0,e.useState)({}),[J,K]=(0,e.useState)(!1),[L,M]=(0,e.useState)(""),N=(0,e.useRef)(!1),[O,P]=(0,e.useState)([]),[Q,R]=(0,e.useState)(!1),[S,T]=(0,e.useState)(null),U=!!(r?.installed&&r?.runnable),V=U?r.hasOmniRoute?"configured":"not_configured":null,W=V||o?.configStatus||null,X=async()=>{try{let a=await fetch("/api/cli-tools/backups?tool=kilo");if(a.ok){let b=await a.json();P(b.backups||[])}}catch{}},Y=async a=>{T(a);try{let b=await fetch("/api/cli-tools/backups",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({tool:"kilo",backupId:a})});if(b.ok)A({type:"success",text:q("backupRestoredReloading")}),await Z(),await X();else{let a=await b.json();A({type:"error",text:a.error||q("failedRestoreBackup")})}}catch(a){A({type:"error",text:a.message})}finally{T(null)}},Z=async()=>{u(!0);try{let a=await fetch("/api/cli-tools/kilo-settings"),b=await a.json();s(b)}catch(a){s({error:a.message})}finally{u(!1)}},$=async()=>{w(!0),A(null);try{let a=L||g||"http://localhost:20128",b=a.endsWith("/v1")?a:`${a}/v1`,c=await fetch("/api/cli-tools/kilo-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:b,apiKey:B||"sk_omniroute",model:D})}),d=await c.json();c.ok?(A({type:"success",text:d.message||q("applied")}),await Z(),await X()):A({type:"error",text:d.error||q("failed")})}catch(a){A({type:"error",text:a.message})}finally{w(!1)}},_=async()=>{y(!0),A(null);try{let a=await fetch("/api/cli-tools/kilo-settings",{method:"DELETE"}),b=await a.json();a.ok?(A({type:"success",text:b.message||q("resetDone")}),E(""),N.current=!1,await Z(),await X()):A({type:"error",text:b.error||q("failed")})}catch(a){A({type:"error",text:a.message})}finally{y(!1)}};return(0,d.jsxs)(f.Zp,{padding:"sm",className:"overflow-hidden",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:c,children:[(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("div",{className:"size-8 rounded-lg flex items-center justify-center shrink-0",children:a.image?(0,d.jsx)(i.default,{src:a.image,alt:a.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:a=>{a.currentTarget.style.display="none"}}):(0,d.jsx)("span",{className:"material-symbols-outlined text-xl",style:{color:a.color},children:"terminal"})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("h3",{className:"font-medium text-sm",children:a.name}),(0,d.jsx)(l,{effectiveConfigStatus:W,batchStatus:o,lastConfiguredAt:p})]}),(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:q("toolDescriptions.kilo")})]})]}),(0,d.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${b?"rotate-180":""}`,children:"expand_more"})]}),b&&(0,d.jsxs)("div",{className:"mt-6 pt-6 border-t border-border",children:[t&&(0,d.jsxs)("div",{className:"flex items-center gap-2 text-text-muted text-sm",children:[(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin text-base",children:"progress_activity"}),(0,d.jsx)("span",{children:q("checkingCli",{tool:"Kilo Code"})})]}),r&&!t&&(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{className:"flex items-start gap-3 p-3 rounded-lg border bg-bg-secondary/50 border-border",children:[(0,d.jsx)("span",{className:`material-symbols-outlined text-lg ${U?"text-green-500":"text-yellow-500"}`,children:U?"check_circle":"warning"}),(0,d.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,d.jsx)("p",{className:"text-sm font-medium",children:U?q("cliDetectedReady",{tool:"Kilo Code"}):r.installed?q("cliNotRunnable",{tool:"Kilo Code"}):q("cliNotDetected",{tool:"Kilo Code"})}),r.commandPath&&(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:[q("binary"),":"," ",(0,d.jsx)("code",{className:"px-1 py-0.5 rounded bg-black/5 dark:bg-white/10",children:r.commandPath})]}),r.authPath&&(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:[q("auth"),":"," ",(0,d.jsx)("code",{className:"px-1 py-0.5 rounded bg-black/5 dark:bg-white/10",children:r.authPath})]})]})]}),U&&(0,d.jsxs)(d.Fragment,{children:["configured"===V&&(0,d.jsxs)("div",{className:"flex items-start gap-3 p-3 bg-green-500/10 border border-green-500/30 rounded-lg",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-green-500 text-lg",children:"check_circle"}),(0,d.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,d.jsx)("p",{className:"text-sm text-green-700 dark:text-green-300",children:q("omnirouteConfiguredOpenAiCompatible")}),(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:[q("providers"),":"," ",(0,d.jsx)("strong",{children:r.settings?.auth?.join(", ")||"—"})]})]})]}),(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,d.jsx)("label",{className:"text-sm text-text-muted",children:q("model")}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("input",{type:"text",value:D,onChange:a=>E(a.target.value),placeholder:q("providerModelPlaceholder"),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,d.jsx)(f.$n,{variant:"outline",size:"sm",onClick:()=>G(!0),disabled:!h,children:q("select")}),(0,d.jsx)(f.$n,{variant:"ghost",size:"sm",onClick:()=>K(!0),children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"edit"})})]})]}),(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,d.jsx)("label",{className:"text-sm text-text-muted",children:q("apiKey")}),k&&k.length>0?(0,d.jsx)("select",{value:B,onChange:a=>C(a.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:k.map(a=>(0,d.jsx)("option",{value:a.key,children:a.key},a.id))}):(0,d.jsx)("p",{className:"text-sm text-text-muted",children:n?q("noApiKeysAvailable"):q("usingDefaultOmniroute")})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2 pt-2",children:[(0,d.jsxs)(f.$n,{variant:"primary",size:"sm",onClick:$,disabled:!D,loading:v,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"configured"===V?q("updateConfig"):q("applyConfig")]}),"configured"===V&&(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:_,loading:x,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restart_alt"}),q("reset")]})]}),z&&(0,d.jsxs)("div",{className:`flex items-center gap-2 px-3 py-2 rounded-lg text-sm ${"success"===z.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"success"===z.type?"check_circle":"error"}),(0,d.jsx)("span",{children:z.text})]}),(0,d.jsxs)("div",{className:"border-t border-border pt-3 mt-1",children:[(0,d.jsxs)("button",{onClick:()=>R(!Q),className:"flex items-center gap-2 text-sm text-text-muted hover:text-text transition-colors",children:[(0,d.jsx)("span",{className:`material-symbols-outlined text-[16px] transition-transform ${Q?"rotate-90":""}`,children:"chevron_right"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"backup"}),q("backups")," ",O.length>0&&`(${O.length})`]}),Q&&O.length>0&&(0,d.jsx)("div",{className:"mt-2 flex flex-col gap-1.5 pl-6",children:O.map(a=>(0,d.jsxs)("div",{className:"flex items-center justify-between gap-2 p-2 rounded bg-bg-secondary/50 text-xs",children:[(0,d.jsxs)("div",{className:"flex flex-col",children:[(0,d.jsx)("span",{className:"font-medium",children:a.originalFile}),(0,d.jsx)("span",{className:"text-text-muted",children:new Date(a.createdAt).toLocaleString()})]}),(0,d.jsx)(f.$n,{variant:"ghost",size:"sm",onClick:()=>Y(a.id),loading:S===a.id,children:q("restore")})]},a.id))}),Q&&0===O.length&&(0,d.jsx)("p",{className:"mt-2 pl-6 text-xs text-text-muted",children:q("noBackupsAvailable")})]})]})]})]}),(0,d.jsx)(f.rq,{isOpen:F,onClose:()=>G(!1),onSelect:a=>{E(a.value),G(!1)},selectedModel:D,activeProviders:m,title:q("selectModelForTool",{tool:"Kilo Code"})}),J&&(0,d.jsx)(f.uR,{isOpen:J,onClose:()=>K(!1),title:q("kiloManualConfiguration"),...{onApply:a=>{a.model&&E(a.model),a.apiKey&&C(a.apiKey),a.baseUrl&&M(a.baseUrl),K(!1)},currentConfig:{model:D,apiKey:B,baseUrl:L||g}}})]})}function w({toolId:a,tool:b,isExpanded:c,onToggle:g,baseUrl:h,apiKeys:k,activeProviders:l=[],cloudEnabled:m=!1,batchStatus:n}){let o,p,q,r=(0,j.c)("cliTools"),s=(0,e.useCallback)((a,b,c)=>{try{return r(a,c)}catch{return b}},[r]),[t,u]=(0,e.useState)(null),[v,w]=(0,e.useState)(!1),[x,y]=(0,e.useState)(""),[z,A]=(0,e.useState)(null),[B,C]=(0,e.useState)(null),[D,E]=(0,e.useState)(!1);(0,e.useRef)(!1);let[F,G]=(0,e.useState)(()=>k?.length>0?k[0].key:""),H=(0,e.useCallback)(b=>{y(b),b?localStorage.setItem(`omniroute-cli-model-${a}`,b):localStorage.removeItem(`omniroute-cli-model-${a}`)},[a]),I=(0,e.useCallback)(b=>{G(b),b&&localStorage.setItem(`omniroute-cli-key-${a}`,b)},[a]),J=a=>{let b=F&&F.trim()?F:m?r("yourApiKeyPlaceholder"):"sk_omniroute",c=h||"http://localhost:20128",d=c.endsWith("/v1")?c:`${c}/v1`;return a.replace(/\{\{baseUrl\}\}/g,d).replace(/\{\{apiKey\}\}/g,b).replace(/\{\{model\}\}/g,x||r("modelPlaceholder"))},K=async(a,b)=>{await navigator.clipboard.writeText(J(a)),u(b),setTimeout(()=>u(null),2e3)},L=l.length>0,M=c&&null===z,N=async()=>{E(!0),C(null);try{let b=F&&F.trim()?F:m?"":"sk_omniroute",c=h||"http://localhost:20128",d=c.endsWith("/v1")?c:`${c}/v1`,e=await fetch(`/api/cli-tools/guide-settings/${a}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:d,apiKey:b,model:x})}),f=await e.json();e.ok?C({type:"success",text:f.message||r("configurationSaved")}):C({type:"error",text:f.error||r("failedToSave")})}catch(a){C({type:"error",text:a.message})}finally{E(!1)}},O=["continue"].includes(a),P=()=>!b.requiresCloud||!!m;return(0,d.jsxs)(f.Zp,{padding:"sm",className:"overflow-hidden",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:g,children:[(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("div",{className:"size-8 rounded-lg flex items-center justify-center shrink-0",children:b.image?(0,d.jsx)(i.default,{src:b.image,alt:b.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:a=>{a.currentTarget.style.display="none"}}):b.icon?(0,d.jsx)("span",{className:"material-symbols-outlined text-xl",style:{color:b.color},children:b.icon}):(0,d.jsx)(i.default,{src:`/providers/${a}.png`,alt:b.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:a=>{a.currentTarget.style.display="none"}})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("h3",{className:"font-medium text-sm",children:b.name}),(o=z?.reason==="not_required"||"guide"===b.configType,p=z?z.installed&&z.runnable:n?.installed&&n?.runnable,q=z?z.installed:n?.installed,o?(0,d.jsxs)("span",{className:"inline-flex items-center gap-1.5 px-2 py-0.5 text-[11px] font-medium rounded-full bg-blue-500/10 text-blue-600 dark:text-blue-400",children:[(0,d.jsx)("span",{className:"size-1.5 rounded-full bg-blue-500"}),r("guide")]}):p?(0,d.jsxs)("span",{className:"inline-flex items-center gap-1.5 px-2 py-0.5 text-[11px] font-medium rounded-full bg-green-500/10 text-green-600 dark:text-green-400",children:[(0,d.jsx)("span",{className:"size-1.5 rounded-full bg-green-500"}),r("detected")]}):!1===q&&(z||n)?(0,d.jsxs)("span",{className:"inline-flex items-center gap-1.5 px-2 py-0.5 text-[11px] font-medium rounded-full bg-zinc-500/10 text-zinc-500 dark:text-zinc-400",children:[(0,d.jsx)("span",{className:"size-1.5 rounded-full bg-zinc-400 dark:bg-zinc-500"}),r("notInstalled")]}):q&&!p&&(z||n)?(0,d.jsxs)("span",{className:"inline-flex items-center gap-1.5 px-2 py-0.5 text-[11px] font-medium rounded-full bg-yellow-500/10 text-yellow-600 dark:text-yellow-400",children:[(0,d.jsx)("span",{className:"size-1.5 rounded-full bg-yellow-500"}),r("notReady")]}):null)]}),(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:s(`toolDescriptions.${a}`,b.description)})]})]}),(0,d.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${c?"rotate-180":""}`,children:"expand_more"})]}),c&&(0,d.jsx)("div",{className:"mt-6 pt-6 border-t border-border",children:b.guideSteps?(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[M&&(0,d.jsxs)("div",{className:"flex items-center gap-2 text-text-muted text-sm",children:[(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin text-base",children:"progress_activity"}),(0,d.jsx)("span",{children:r("checkingRuntime")})]}),!M&&z&&!z.error&&(0,d.jsxs)("div",{className:"flex items-start gap-3 p-3 bg-blue-500/10 border border-blue-500/30 rounded-lg",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-blue-500 text-lg",children:"not_required"===z.reason?"info":z.installed&&z.runnable?"check_circle":"warning"}),(0,d.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,d.jsx)("p",{className:"text-sm text-blue-700 dark:text-blue-300",children:"not_required"===z.reason?r("guideOnlyIntegration"):z.installed&&z.runnable?r("cliRuntimeDetected"):z.installed?r("cliFoundNotRunnable",{reason:z.reason?`: ${z.reason}`:""}):r("cliRuntimeNotDetected")}),z.commandPath&&(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:[r("binary"),":"," ",(0,d.jsx)("code",{className:"px-1 py-0.5 rounded bg-black/5 dark:bg-white/10",children:z.commandPath})]}),z.configPath&&(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:[r("configPath"),":"," ",(0,d.jsx)("code",{className:"px-1 py-0.5 rounded bg-black/5 dark:bg-white/10",children:z.configPath})]})]})]}),!M&&z?.error&&(0,d.jsxs)("div",{className:"flex items-start gap-3 p-3 bg-red-500/10 border border-red-500/30 rounded-lg",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-red-500 text-lg",children:"error"}),(0,d.jsx)("p",{className:"text-sm text-red-600 dark:text-red-400",children:r("failedCheckRuntimeStatus")})]}),b.notes&&0!==b.notes.length?(0,d.jsx)("div",{className:"flex flex-col gap-2 mb-4",children:b.notes.map((b,c)=>{if("cloudCheck"===b.type&&m)return null;let e="warning"===b.type,f="cloudCheck"===b.type&&!m,g="bg-blue-500/10 border-blue-500/30",h="text-blue-600 dark:text-blue-400",i="text-blue-500",j="info";return e?(g="bg-yellow-500/10 border-yellow-500/30",h="text-yellow-600 dark:text-yellow-400",i="text-yellow-500",j="warning"):f&&(g="bg-red-500/10 border-red-500/30",h="text-red-600 dark:text-red-400",i="text-red-500",j="error"),(0,d.jsxs)("div",{className:`flex items-start gap-3 p-3 rounded-lg border ${g}`,children:[(0,d.jsx)("span",{className:`material-symbols-outlined text-lg ${i}`,children:j}),(0,d.jsx)("p",{className:`text-sm ${h}`,children:s(`guides.${a}.notes.${c}`,b.text)})]},c)})}):null,P()&&b.guideSteps.map(c=>(0,d.jsxs)("div",{className:"flex items-start gap-4",children:[(0,d.jsx)("div",{className:"size-8 rounded-full flex items-center justify-center shrink-0 text-sm font-semibold text-white",style:{backgroundColor:b.color},children:c.step}),(0,d.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,d.jsx)("p",{className:"font-medium text-text",children:s(`guides.${a}.steps.${c.step}.title`,c.title)}),c.desc&&(0,d.jsx)("p",{className:"text-sm text-text-muted mt-0.5",children:s(`guides.${a}.steps.${c.step}.desc`,c.desc)}),"apiKeySelector"===c.type&&(0,d.jsx)("div",{className:"mt-2 flex items-center gap-2",children:k&&k.length>0?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("select",{value:F,onChange:a=>I(a.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:k.map(a=>(0,d.jsx)("option",{value:a.key,children:a.key},a.id))}),(0,d.jsx)("button",{onClick:()=>K(F,"apiKey"),className:"shrink-0 px-3 py-2 bg-bg-secondary hover:bg-bg-tertiary rounded-lg border border-border transition-colors",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-lg",children:"apiKey"===t?"check":"content_copy"})})]}):(0,d.jsx)("span",{className:"text-sm text-text-muted",children:m?r("noApiKeysCreateOne"):"sk_omniroute"})}),"modelSelector"===c.type&&(0,d.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[(0,d.jsx)("input",{type:"text",value:x,onChange:a=>H(a.target.value),placeholder:r("modelPlaceholder"),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,d.jsx)("button",{onClick:()=>w(!0),disabled:!L,className:`shrink-0 px-3 py-2 rounded-lg border text-sm transition-colors ${L?"bg-bg-secondary border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:r("selectModel")}),x&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("button",{onClick:()=>K(x,"model"),className:"shrink-0 px-3 py-2 bg-bg-secondary hover:bg-bg-tertiary rounded-lg border border-border transition-colors",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-lg",children:"model"===t?"check":"content_copy"})}),(0,d.jsx)("button",{onClick:()=>H(""),className:"p-2 text-text-muted hover:text-red-500 rounded transition-colors",title:r("clear"),children:(0,d.jsx)("span",{className:"material-symbols-outlined text-lg",children:"close"})})]})]}),c.value&&(0,d.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[(0,d.jsx)("code",{className:"flex-1 px-3 py-2 bg-bg-secondary rounded-lg text-sm font-mono border border-border truncate",children:J(c.value)}),c.copyable&&(0,d.jsx)("button",{onClick:()=>K(c.value,`${c.step}-${c.title}`),className:"shrink-0 px-3 py-2 bg-bg-secondary hover:bg-bg-tertiary rounded-lg border border-border transition-colors",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-lg",children:t===`${c.step}-${c.title}`?"check":"content_copy"})})]})]})]},c.step)),P()&&b.codeBlock&&(0,d.jsxs)("div",{className:"mt-2",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,d.jsx)("span",{className:"text-xs text-text-muted uppercase tracking-wide",children:b.codeBlock.language}),(0,d.jsxs)("button",{onClick:()=>K(b.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,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"codeblock"===t?"check":"content_copy"}),"codeblock"===t?r("copied"):r("copy")]})]}),(0,d.jsx)("pre",{className:"p-4 bg-bg-secondary rounded-lg border border-border overflow-x-auto",children:(0,d.jsx)("code",{className:"text-sm font-mono whitespace-pre",children:J(b.codeBlock.code)})})]}),P()&&(0,d.jsxs)("div",{className:"mt-2",children:[B&&(0,d.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs mb-2 ${"success"===B.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===B.type?"check_circle":"error"}),(0,d.jsx)("span",{children:B.text})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[O&&(0,d.jsxs)(f.$n,{variant:"primary",size:"sm",onClick:N,disabled:!x,loading:D,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),r("saveConfig")]}),b.codeBlock&&(0,d.jsxs)(f.$n,{variant:O?"outline":"primary",size:"sm",onClick:()=>K(b.codeBlock.code,"codeblock"),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"codeblock"===t?"check":"content_copy"}),"codeblock"===t?r("copied"):r("copyConfig")]}),x&&(0,d.jsxs)("span",{className:"text-xs text-text-muted flex items-center gap-1",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] text-green-500",children:"check_circle"}),r("selectionSaved")]})]})]})]}):(0,d.jsx)("p",{className:"text-text-muted text-sm",children:r("comingSoon")})}),(0,d.jsx)(f.rq,{isOpen:v,onClose:()=>w(!1),onSelect:a=>{H(a.value)},selectedModel:x,activeProviders:l,title:r("selectModel")})]})}function x({tool:a,isExpanded:b,onToggle:c,baseUrl:g,apiKeys:h,activeProviders:k,hasActiveProviders:l,cloudEnabled:m}){let n=(0,j.c)("cliTools"),[o,p]=(0,e.useState)(null),[q,r]=(0,e.useState)(!1),[s,t]=(0,e.useState)(!1),[u,v]=(0,e.useState)(""),[w,x]=(0,e.useState)(""),[y,z]=(0,e.useState)(null),[A,B]=(0,e.useState)({}),[C,D]=(0,e.useState)(!1),[E,F]=(0,e.useState)(null),G=async()=>{try{let a=await fetch("/api/cli-tools/antigravity-mitm");if(a.ok){let b=await a.json();p(b)}}catch(a){console.log("Error fetching status:",a),p({running:!1})}},H="u">typeof navigator&&navigator.userAgent?.includes("Windows"),I=async a=>{r(!0),z(null);try{let b=w?.trim()||(h?.length>0?h[0].key:null)||(m?null:"sk_omniroute"),c=await fetch("/api/cli-tools/antigravity-mitm",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiKey:b,sudoPassword:a})}),d=await c.json();c.ok?(z({type:"success",text:n("mitmStarted")}),t(!1),v(""),G()):z({type:"error",text:d.error||n("failedStart")})}catch(a){z({type:"error",text:a.message})}finally{r(!1)}},J=async a=>{r(!0),z(null);try{let b=await fetch("/api/cli-tools/antigravity-mitm",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({sudoPassword:a})}),c=await b.json();b.ok?(z({type:"success",text:n("mitmStopped")}),t(!1),v(""),G()):z({type:"error",text:c.error||n("failedStop")})}catch(a){z({type:"error",text:a.message})}finally{r(!1)}},K=()=>{u.trim()?o?.running?J(u):I(u):z({type:"error",text:n("sudoPasswordRequiredError")})},L=(a,b)=>{B(c=>({...c,[a]:b}))},M=async()=>{r(!0),z(null);try{let a=await fetch("/api/cli-tools/antigravity-mitm/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({tool:"antigravity",mappings:A})});if(!a.ok){let b=await a.json();throw Error(b.error||n("failedSaveMappings"))}z({type:"success",text:n("mappingsSaved")})}catch(a){z({type:"error",text:a.message})}finally{r(!1)}},N=o?.running;return(0,d.jsxs)(f.Zp,{padding:"sm",className:"overflow-hidden",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:c,children:[(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,d.jsx)(i.default,{src:"/providers/antigravity.png",alt:a.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:a=>{a.currentTarget.style.display="none"}})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("h3",{className:"font-medium text-sm",children:a.name}),N?(0,d.jsx)(f.Ex,{variant:"success",size:"sm",children:n("active")}):(0,d.jsx)(f.Ex,{variant:"default",size:"sm",children:n("inactive")})]}),(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:n("toolDescriptions.antigravity")})]})]}),(0,d.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${b?"rotate-180":""}`,children:"expand_more"})]}),b&&(0,d.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[(0,d.jsx)("div",{className:"flex items-center gap-2",children:N?(0,d.jsxs)("button",{onClick:()=>{H||o?.hasCachedPassword?J(""):(t(!0),z(null))},disabled:q,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,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"stop_circle"}),n("stopMitm")]}):(0,d.jsxs)("button",{onClick:()=>{H||o?.hasCachedPassword?I(""):(t(!0),z(null))},disabled:q||!l,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,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"play_circle"}),n("startMitm")]})}),y?.type==="error"&&(0,d.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,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"error"}),(0,d.jsx)("span",{children:y.text})]}),N&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:n("apiKey")}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),h.length>0?(0,d.jsx)("select",{value:w,onChange:a=>x(a.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:h.map(a=>(0,d.jsx)("option",{value:a.key,children:a.key},a.id))}):(0,d.jsx)("span",{className:"flex-1 text-xs text-text-muted px-2 py-1.5",children:m?n("noApiKeysCreateOne"):n("defaultOmnirouteKey")})]}),a.defaultModels.map(a=>(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:a.name}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("input",{type:"text",value:A[a.alias]||"",onChange:b=>L(a.alias,b.target.value),placeholder:n("modelPlaceholder"),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,d.jsx)("button",{onClick:()=>{F(a.alias),D(!0)},disabled:!l,className:`px-2 py-1.5 rounded border text-xs transition-colors shrink-0 whitespace-nowrap ${l?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:n("select")}),A[a.alias]&&(0,d.jsx)("button",{onClick:()=>L(a.alias,""),className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors",title:n("clear"),children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]},a.alias)),(0,d.jsx)("div",{className:"flex items-center gap-2",children:(0,d.jsxs)(f.$n,{variant:"primary",size:"sm",onClick:M,disabled:q||0===Object.keys(A).length,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),n("saveMappings")]})})]}),!N&&(0,d.jsxs)("div",{className:"flex flex-col gap-1.5 px-1",children:[(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:[(0,d.jsx)("span",{className:"font-medium text-text-main",children:n("howItWorks")})," ",n("antigravityHowWorksDesc")]}),(0,d.jsxs)("div",{className:"flex flex-col gap-0.5 text-[11px] text-text-muted",children:[(0,d.jsx)("span",{children:n("antigravityStep1")}),(0,d.jsxs)("span",{children:[n("antigravityStep2Prefix")," ",(0,d.jsx)("code",{className:"text-[10px] bg-surface px-1 rounded",children:"daily-cloudcode-pa.googleapis.com"})," ",n("antigravityStep2Suffix")]}),(0,d.jsx)("span",{children:n("antigravityStep3")})]})]})]}),(0,d.jsx)(f.aF,{isOpen:s,onClose:()=>{t(!1),v(""),z(null)},title:n("sudoPasswordRequiredTitle"),size:"sm",children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{className:"flex items-start gap-3 p-3 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-yellow-500 text-[20px]",children:"warning"}),(0,d.jsx)("p",{className:"text-xs text-text-muted",children:n("sudoPasswordHint")})]}),(0,d.jsx)(f.pd,{type:"password",placeholder:n("enterSudoPassword"),value:u,onChange:a=>v(a.target.value),onKeyDown:a=>{"Enter"!==a.key||q||K()}}),y&&(0,d.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===y.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===y.type?"check_circle":"error"}),(0,d.jsx)("span",{children:y.text})]}),(0,d.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[(0,d.jsx)(f.$n,{variant:"ghost",size:"sm",onClick:()=>{t(!1),v(""),z(null)},disabled:q,children:n("cancel")}),(0,d.jsx)(f.$n,{variant:"primary",size:"sm",onClick:K,loading:q,children:n("confirm")})]})]})}),(0,d.jsx)(f.rq,{isOpen:C,onClose:()=>D(!1),onSelect:a=>{E&&B(b=>({...b,[E]:a.value}))},selectedModel:E?A[E]:null,activeProviders:k,title:n("selectModelForAlias",{alias:E||""})})]})}function y({tool:a,isExpanded:b,onToggle:c,baseUrl:g,apiKeys:h,activeProviders:k=[],hasActiveProviders:l=!1,cloudEnabled:m=!1,batchStatus:n}){let o=(0,j.c)("cliTools"),[p,q]=(0,e.useState)(null),[r,s]=(0,e.useState)(()=>new Set),[t,u]=(0,e.useState)(()=>h?.length>0?h[0].key:""),[v,w]=(0,e.useState)(128e3),[x,y]=(0,e.useState)(16e3),[z,A]=(0,e.useState)(!0),[B,C]=(0,e.useState)(!1),[D,E]=(0,e.useState)([]),[F,G]=(0,e.useState)(!1),[H,I]=(0,e.useState)(""),J=H?D.filter(a=>a.label.toLowerCase().includes(H.toLowerCase())):D,K=()=>JSON.stringify({name:"OmniRoute",vendor:"azure",apiKey:"${input:chat.lm.secret.omniroute}",models:[...r].map(a=>({id:a,name:a,url:`${g}/v1/chat/completions#models.ai.azure.com`,toolCalling:z,vision:B,maxInputTokens:v,maxOutputTokens:x}))},null,2),L=async(a,b)=>{await navigator.clipboard.writeText(a),q(b),setTimeout(()=>q(null),2e3)};return(0,d.jsxs)(f.Zp,{padding:"sm",className:"overflow-hidden",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:c,children:[(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("div",{className:"size-8 rounded-lg flex items-center justify-center shrink-0",children:(0,d.jsx)(i.default,{src:a.image||"/providers/copilot.png",alt:a.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:a=>{a.currentTarget.style.display="none"}})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("h3",{className:"font-medium text-sm",children:a.name}),(0,d.jsxs)("span",{className:"inline-flex items-center gap-1.5 px-2 py-0.5 text-[11px] font-medium rounded-full bg-blue-500/10 text-blue-600 dark:text-blue-400",children:[(0,d.jsx)("span",{className:"size-1.5 rounded-full bg-blue-500"}),o("guide")]})]}),(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:a.description})]})]}),(0,d.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${b?"rotate-180":""}`,children:"expand_more"})]}),b&&(0,d.jsx)("div",{className:"mt-6 pt-6 border-t border-border",children:(0,d.jsxs)("div",{className:"flex flex-col gap-5",children:[(0,d.jsxs)("div",{className:"flex items-start gap-3 p-3 bg-blue-500/10 border border-blue-500/30 rounded-lg",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-blue-500 text-lg",children:"info"}),(0,d.jsxs)("div",{className:"text-sm text-blue-700 dark:text-blue-300",children:[(0,d.jsx)("p",{className:"font-medium",children:"GitHub Copilot Config Generator"}),(0,d.jsxs)("p",{className:"mt-1 text-xs opacity-80",children:["Generates the"," ",(0,d.jsx)("code",{className:"px-1 py-0.5 rounded bg-black/5 dark:bg-white/10",children:"chatLanguageModels.json"})," ","block for VS Code GitHub Copilot using the Azure vendor pattern. Select the models you want, then copy the JSON into your config file."]})]})]}),(0,d.jsxs)("div",{className:"flex items-start gap-3 p-3 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-yellow-500 text-lg",children:"warning"}),(0,d.jsxs)("p",{className:"text-xs text-yellow-600 dark:text-yellow-400",children:["This configuration uses the Azure vendor workaround for custom model lists. Tested with ",(0,d.jsx)("strong",{children:"VS Code ≥ 1.109"})," and"," ",(0,d.jsx)("strong",{children:"GitHub Copilot Chat ≥ v0.37"}),". Future extension updates may change this behavior."]})]}),m&&h?.length>0&&(0,d.jsxs)("div",{children:[(0,d.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,d.jsx)("div",{className:"size-6 rounded-full flex items-center justify-center text-xs font-semibold text-white",style:{backgroundColor:a.color},children:"1"}),(0,d.jsx)("span",{className:"font-medium text-sm",children:"API Key"})]}),(0,d.jsx)("select",{value:t,onChange:a=>{var b;u(b=a.target.value),b&&localStorage.setItem("omniroute-cli-key-copilot",b)},className:"w-full 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:h.map(a=>(0,d.jsx)("option",{value:a.key,children:a.key},a.id))})]}),(0,d.jsxs)("div",{children:[(0,d.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("div",{className:"size-6 rounded-full flex items-center justify-center text-xs font-semibold text-white",style:{backgroundColor:a.color},children:m&&h?.length>0?"2":"1"}),(0,d.jsxs)("span",{className:"font-medium text-sm",children:["Select Models (",r.size,"/",J.length,")"]})]}),(0,d.jsxs)("div",{className:"flex gap-2",children:[(0,d.jsx)("button",{onClick:()=>{s(new Set(D.map(a=>a.value)))},className:"px-2 py-1 text-xs bg-bg-secondary hover:bg-bg-tertiary rounded border border-border transition-colors",children:"Select All"}),(0,d.jsx)("button",{onClick:()=>{s(new Set)},className:"px-2 py-1 text-xs bg-bg-secondary hover:bg-bg-tertiary rounded border border-border transition-colors",children:"Clear"})]})]}),(0,d.jsx)("div",{className:"mb-2",children:(0,d.jsx)("input",{type:"text",value:H,onChange:a=>I(a.target.value),placeholder:"Filter models...",className:"w-full px-3 py-1.5 bg-bg-secondary rounded-lg text-sm border border-border focus:outline-none focus:ring-1 focus:ring-primary/50"})}),F||0!==D.length?0===J.length&&0===D.length?(0,d.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-yellow-500 text-lg",children:"warning"}),(0,d.jsx)("p",{className:"text-sm text-yellow-600 dark:text-yellow-400",children:o("noActiveProviders")})]}):(0,d.jsx)("div",{className:"max-h-64 overflow-y-auto rounded-lg border border-border bg-bg-secondary",children:J.map(a=>(0,d.jsxs)("label",{className:"flex items-center gap-3 px-3 py-2 hover:bg-bg-tertiary cursor-pointer border-b border-border last:border-0 transition-colors",children:[(0,d.jsx)("input",{type:"checkbox",checked:r.has(a.value),onChange:()=>{var b;return b=a.value,void s(a=>{let c=new Set(a);return c.has(b)?c.delete(b):c.add(b),c})},className:"rounded border-border text-primary accent-[#1F6FEB]"}),(0,d.jsx)("span",{className:"text-sm font-mono truncate",children:a.label})]},a.value))}):(0,d.jsxs)("div",{className:"flex items-center gap-2 p-3 text-text-muted text-sm",children:[(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin text-base",children:"progress_activity"}),(0,d.jsx)("span",{children:"Loading models..."})]})]}),(0,d.jsxs)("details",{className:"group",children:[(0,d.jsxs)("summary",{className:"flex items-center gap-2 cursor-pointer text-sm text-text-muted hover:text-text-main transition-colors",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-base group-open:rotate-90 transition-transform",children:"chevron_right"}),"Advanced Options"]}),(0,d.jsxs)("div",{className:"mt-3 grid grid-cols-2 gap-3 pl-6",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("label",{className:"text-xs text-text-muted block mb-1",children:"Max Input Tokens"}),(0,d.jsx)("input",{type:"number",value:v,onChange:a=>w(Number(a.target.value)||128e3),className:"w-full px-3 py-1.5 bg-bg-secondary rounded-lg text-sm border border-border focus:outline-none focus:ring-1 focus:ring-primary/50"})]}),(0,d.jsxs)("div",{children:[(0,d.jsx)("label",{className:"text-xs text-text-muted block mb-1",children:"Max Output Tokens"}),(0,d.jsx)("input",{type:"number",value:x,onChange:a=>y(Number(a.target.value)||16e3),className:"w-full px-3 py-1.5 bg-bg-secondary rounded-lg text-sm border border-border focus:outline-none focus:ring-1 focus:ring-primary/50"})]}),(0,d.jsxs)("label",{className:"flex items-center gap-2 cursor-pointer",children:[(0,d.jsx)("input",{type:"checkbox",checked:z,onChange:a=>A(a.target.checked),className:"rounded border-border accent-[#1F6FEB]"}),(0,d.jsx)("span",{className:"text-sm",children:"Tool Calling"})]}),(0,d.jsxs)("label",{className:"flex items-center gap-2 cursor-pointer",children:[(0,d.jsx)("input",{type:"checkbox",checked:B,onChange:a=>C(a.target.checked),className:"rounded border-border accent-[#1F6FEB]"}),(0,d.jsx)("span",{className:"text-sm",children:"Vision"})]})]})]}),r.size>0&&(0,d.jsxs)("div",{children:[(0,d.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("div",{className:"size-6 rounded-full flex items-center justify-center text-xs font-semibold text-white",style:{backgroundColor:a.color},children:m&&h?.length>0?"3":"2"}),(0,d.jsxs)("span",{className:"font-medium text-sm",children:["Copy Config (",r.size," model",1!==r.size?"s":"",")"]})]}),(0,d.jsxs)(f.$n,{variant:"primary",size:"sm",onClick:()=>L(K(),"config"),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"config"===p?"check":"content_copy"}),o("config"===p?"copied":"copyConfig")]})]}),(0,d.jsx)("pre",{className:"p-4 bg-bg-secondary rounded-lg border border-border overflow-x-auto max-h-80",children:(0,d.jsx)("code",{className:"text-xs font-mono whitespace-pre text-text-main",children:K()})}),(0,d.jsxs)("div",{className:"mt-3 p-3 bg-bg-secondary rounded-lg border border-border",children:[(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:[(0,d.jsx)("span",{className:"font-medium text-text-main",children:"Paste into: "}),(0,d.jsx)("code",{className:"px-1 py-0.5 rounded bg-black/5 dark:bg-white/10",children:"~/.config/Code/User/chatLanguageModels.json"})]}),(0,d.jsx)("p",{className:"text-xs text-text-muted mt-1",children:"Then reload VS Code and set the API key in the input prompt."})]})]})]})})]})}let z="https://cloud.omniroute.online";function A({machineId:a}){let b,c,i,k=(0,j.c)("cliTools"),[l,m]=(0,e.useState)([]),[p,r]=(0,e.useState)(!0),[t,A]=(0,e.useState)(null),[B,C]=(0,e.useState)({}),[D,E]=(0,e.useState)(!1),[F,G]=(0,e.useState)([]),[H,I]=(0,e.useState)({}),[J,K]=(0,e.useState)(!1),L=()=>l.filter(a=>!1!==a.isActive),M=(0,e.useCallback)((a,b,c)=>{C(d=>d[a]?.[b]===c?d:{...d,[a]:{...d[a],[b]:c}})},[]);if(p||!J)return(0,d.jsx)("div",{className:"flex flex-col gap-6",children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsx)(f.Qv,{}),(0,d.jsx)(f.Qv,{}),(0,d.jsx)(f.Qv,{})]})});let N=(b=L(),c=[],i=new Set,b.forEach(a=>{let b=h.Xg[a.provider]||a.provider;(0,h.KC)(a.provider).forEach(d=>{let e=`${b}/${d.id}`;i.has(e)||(i.add(e),c.push({value:e,label:`${b}/${d.id}`,provider:a.provider,alias:b,connectionName:a.name,modelId:d.id}))})}),c).length>0;return(0,d.jsxs)("div",{className:"flex flex-col gap-6",children:[!N&&(0,d.jsx)(f.Zp,{className:"border-yellow-500/50 bg-yellow-500/5",children:(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:k("noActiveProviders")}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:k("noActiveProvidersDesc")})]})]})}),(0,d.jsx)("div",{className:"flex flex-col gap-4",children:Object.entries(g).map(([a,b])=>((a,b)=>{let c={tool:b,isExpanded:t===a,onToggle:()=>A(t===a?null:a),baseUrl:D&&z?z:"http://localhost:20128",apiKeys:F,batchStatus:H[a]||null,lastConfiguredAt:H[a]?.lastConfiguredAt||null};switch(a){case"claude":return(0,d.jsx)(n,{...c,activeProviders:L(),modelMappings:B[a]||{},onModelMappingChange:(b,c)=>M(a,b,c),hasActiveProviders:N,cloudEnabled:D},a);case"codex":return(0,d.jsx)(o,{...c,activeProviders:L(),cloudEnabled:D},a);case"droid":return(0,d.jsx)(q,{...c,activeProviders:L(),hasActiveProviders:N,cloudEnabled:D},a);case"openclaw":return(0,d.jsx)(s,{...c,activeProviders:L(),hasActiveProviders:N,cloudEnabled:D},a);case"antigravity":return(0,d.jsx)(x,{...c,activeProviders:L(),hasActiveProviders:N,cloudEnabled:D},a);case"cline":return(0,d.jsx)(u,{...c,activeProviders:L(),hasActiveProviders:N,cloudEnabled:D},a);case"kilo":return(0,d.jsx)(v,{...c,activeProviders:L(),hasActiveProviders:N,cloudEnabled:D},a);case"copilot":return(0,d.jsx)(y,{...c,activeProviders:L(),hasActiveProviders:N,cloudEnabled:D},a);default:return(0,d.jsx)(w,{toolId:a,...c,activeProviders:L(),cloudEnabled:D},a)}})(a,b))})]})}},26713:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/is-bot")},28354:a=>{"use strict";a.exports=require("util")},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},29824:(a,b,c)=>{"use strict";c.d(b,{Ex:()=>j.default,$n:()=>d.default,Zp:()=>g.default,Qv:()=>i.CardSkeleton,G9:()=>t.default,bQ:()=>x.default,pp:()=>v.default,Qn:()=>w.default,pd:()=>e.default,Mh:()=>s.default,uR:()=>n.default,aF:()=>h.default,rq:()=>m.default,LF:()=>l.default,KN:()=>q.default,Lo:()=>r.default,y7:()=>p.default,Iz:()=>u.default,l6:()=>f.default,lM:()=>k.default,cn:()=>o.default});var d=c(53156),e=c(29518),f=c(59256),g=c(2490),h=c(65953),i=c(22746);c(45567);var j=c(4355),k=c(65472);c(59869),c(75146),c(65892),c(42546),c(22245);var l=c(8744),m=c(29494),n=c(1237);c(82054);var o=c(62688),p=c(46230),q=c(56589),r=c(73979);c(98004);var s=c(41371);c(53140);var t=c(27309),u=c(86059);c(77088);var v=c(85974);c(18732);var w=c(67083);c(52198);var x=c(50818);c(47047),c(16116)},33873:a=>{"use strict";a.exports=require("path")},37308:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/home/diegosouzapw/dev/proxys/9router/src/app/(dashboard)/dashboard/cli-tools/CLIToolsPageClient.tsx\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/home/diegosouzapw/dev/proxys/9router/src/app/(dashboard)/dashboard/cli-tools/CLIToolsPageClient.tsx","default")},41025:a=>{"use strict";a.exports=require("next/dist/server/app-render/dynamic-access-async-storage.external.js")},43482:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>g});var d=c(5735),e=c(53048),f=c(37308);async function g(){let a=await (0,e.D1)();return(0,d.jsx)(f.default,{machineId:a})}},43954:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/interception-routes")},46846:(a,b,c)=>{Promise.resolve().then(c.bind(c,21116))},48161:a=>{"use strict";a.exports=require("node:os")},53048:(a,b,c)=>{"use strict";c.d(b,{D1:()=>e});var d=c(90357);async function e(){return await (0,d.Xj)()}},55511:a=>{"use strict";a.exports=require("crypto")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},70722:a=>{"use strict";a.exports=require("next/dist/shared/lib/invariant-error")},73024:a=>{"use strict";a.exports=require("node:fs")},73136:a=>{"use strict";a.exports=require("node:url")},76760:a=>{"use strict";a.exports=require("node:path")},77068:a=>{"use strict";a.exports=require("next/dist/shared/lib/size-limit")},77598:a=>{"use strict";a.exports=require("node:crypto")},79646:a=>{"use strict";a.exports=require("child_process")},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},87550:a=>{"use strict";a.exports=require("better-sqlite3")},94638:(a,b,c)=>{"use strict";c.r(b),c.d(b,{GlobalError:()=>C.default,__next_app__:()=>K,handler:()=>M,routeModule:()=>L});var d=c(7553),e=c(84006),f=c(67798),g=c(34775),h=c(99373),i=c(73461),j=c(1020),k=c(26349),l=c(54365),m=c(16023),n=c(63747),o=c(24235),p=c(23938),q=c(261),r=c(66758),s=c(77243),t=c(26713),u=c(37527),v=c(22820),w=c(88216),x=c(47929),y=c(79551),z=c(89125),A=c(86439),B=c(77068),C=c(81227),D=c(61287),E=c(81494),F=c(70722),G=c(70753),H=c(43954),I={};for(let a in D)0>["default","GlobalError","__next_app__","routeModule","handler"].indexOf(a)&&(I[a]=()=>D[a]);c.d(b,I);let J={children:["",{children:["(dashboard)",{children:["dashboard",{children:["cli-tools",{children:["__PAGE__",{},{page:[()=>Promise.resolve().then(c.bind(c,43482)),"/home/diegosouzapw/dev/proxys/9router/src/app/(dashboard)/dashboard/cli-tools/page.tsx"]}]},{}]},{}]},{layout:[()=>Promise.resolve().then(c.bind(c,6676)),"/home/diegosouzapw/dev/proxys/9router/src/app/(dashboard)/layout.tsx"],forbidden:[()=>Promise.resolve().then(c.t.bind(c,45270,23)),"next/dist/client/components/builtin/forbidden.js"],unauthorized:[()=>Promise.resolve().then(c.t.bind(c,28193,23)),"next/dist/client/components/builtin/unauthorized.js"]}]},{layout:[()=>Promise.resolve().then(c.bind(c,76537)),"/home/diegosouzapw/dev/proxys/9router/src/app/layout.tsx"],error:[()=>Promise.resolve().then(c.bind(c,64385)),"/home/diegosouzapw/dev/proxys/9router/src/app/error.tsx"],loading:[()=>Promise.resolve().then(c.bind(c,95127)),"/home/diegosouzapw/dev/proxys/9router/src/app/loading.tsx"],"global-error":[()=>Promise.resolve().then(c.bind(c,81227)),"/home/diegosouzapw/dev/proxys/9router/src/app/global-error.tsx"],"not-found":[()=>Promise.resolve().then(c.bind(c,8979)),"/home/diegosouzapw/dev/proxys/9router/src/app/not-found.tsx"],forbidden:[()=>Promise.resolve().then(c.t.bind(c,45270,23)),"next/dist/client/components/builtin/forbidden.js"],unauthorized:[()=>Promise.resolve().then(c.t.bind(c,28193,23)),"next/dist/client/components/builtin/unauthorized.js"]}]}.children,K={require:c,loadChunk:()=>Promise.resolve()},L=new d.AppPageRouteModule({definition:{kind:e.RouteKind.APP_PAGE,page:"/(dashboard)/dashboard/cli-tools/page",pathname:"/dashboard/cli-tools",bundlePath:"",filename:"",appPaths:[]},userland:{loaderTree:J},distDir:".next",relativeProjectDir:""});async function M(a,b,d){var I;L.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let N=!!(0,h.getRequestMeta)(a,"minimalMode"),O="/(dashboard)/dashboard/cli-tools/page";"/index"===O&&(O="/");let P=await L.prepare(a,b,{srcPage:O,multiZoneDraftMode:!1});if(!P)return b.statusCode=400,b.end("Bad Request"),null==d.waitUntil||d.waitUntil.call(d,Promise.resolve()),null;let{buildId:Q,query:R,params:S,pageIsDynamic:T,buildManifest:U,nextFontManifest:V,reactLoadableManifest:W,serverActionsManifest:X,clientReferenceManifest:Y,subresourceIntegrityManifest:Z,prerenderManifest:$,isDraftMode:_,resolvedPathname:aa,revalidateOnlyGenerated:ab,routerServerContext:ac,nextConfig:ad,parsedUrl:ae,interceptionRoutePatterns:af,deploymentId:ag}=P,ah=(0,q.normalizeAppPath)(O),{isOnDemandRevalidate:ai}=P,aj=ad.experimental.ppr&&!ad.cacheComponents&&(0,H.isInterceptionRouteAppPath)(aa)?null:L.match(aa,$),ak=!!$.routes[aa],al=a.headers["user-agent"]||"",am=(0,t.getBotType)(al),an=(0,p.isHtmlBotRequest)(a),ao=(0,h.getRequestMeta)(a,"isPrefetchRSCRequest")??"1"===a.headers[s.NEXT_ROUTER_PREFETCH_HEADER],ap=(0,h.getRequestMeta)(a,"isRSCRequest")??!!a.headers[s.RSC_HEADER],aq=(0,r.getIsPossibleServerAction)(a),ar=(0,m.checkIsAppPPREnabled)(ad.experimental.ppr);if(!(0,h.getRequestMeta)(a,"postponed")&&ar&&"1"===a.headers[x.NEXT_RESUME_HEADER]&&"POST"===a.method){let b=[];for await(let c of a)b.push(c);let c=Buffer.concat(b).toString("utf8");(0,h.addRequestMeta)(a,"postponed",c)}let as=ar&&(null==(I=$.routes[ah]??$.dynamicRoutes[ah])?void 0:I.renderingMode)==="PARTIALLY_STATIC",at=!1,au=!1,av=as?(0,h.getRequestMeta)(a,"postponed"):void 0,aw=as&&ap&&!ao;N&&(aw=aw&&!!av);let ax=(0,h.getRequestMeta)(a,"segmentPrefetchRSCRequest"),ay=(!an||!as)&&(!al||(0,p.shouldServeStreamingMetadata)(al,ad.htmlLimitedBots)),az=!!((aj||ak||$.routes[ah])&&!(an&&as)),aA=as&&!0===ad.cacheComponents,aB=!0===L.isDev||!az||"string"==typeof av||(aA&&(0,h.getRequestMeta)(a,"onCacheEntryV2")?aw&&!N:aw),aC=an&&as,aD=null;_||!az||aB||aq||av||aw||(aD=aa);let aE=aD;!aE&&L.isDev&&(aE=aa),L.isDev||_||!az||!ap||aw||(0,k.d)(a.headers);let aF={...D,tree:J,GlobalError:C.default,handler:M,routeModule:L,__next_app__:K};X&&Y&&(0,o.setManifestsSingleton)({page:O,clientReferenceManifest:Y,serverActionsManifest:X});let aG=a.method||"GET",aH=(0,g.getTracer)(),aI=aH.getActiveScopeSpan(),aJ=async()=>((null==ac?void 0:ac.render404)?await ac.render404(a,b,ae,!1):b.end("This page could not be found"),null);try{let f=L.getVaryHeader(aa,af);b.setHeader("Vary",f);let k=async(c,d)=>{let e=new l.NodeNextRequest(a),f=new l.NodeNextResponse(b);return L.render(e,f,d).finally(()=>{if(!c)return;c.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let a=aH.getRootSpanAttributes();if(!a)return;if(a.get("next.span_type")!==i.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${a.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let d=a.get("next.route");if(d){let a=`${aG} ${d}`;c.setAttributes({"next.route":d,"http.route":d,"next.span_name":a}),c.updateName(a)}else c.updateName(`${aG} ${O}`)})},m=(0,h.getRequestMeta)(a,"incrementalCache"),o=async({span:e,postponed:f,fallbackRouteParams:g,forceStaticRender:i})=>{let l={query:R,params:S,page:ah,sharedContext:{buildId:Q},serverComponentsHmrCache:(0,h.getRequestMeta)(a,"serverComponentsHmrCache"),fallbackRouteParams:g,renderOpts:{App:()=>null,Document:()=>null,pageConfig:{},ComponentMod:aF,Component:(0,j.T)(aF),params:S,routeModule:L,page:O,postponed:f,shouldWaitOnAllReady:aC,serveStreamingMetadata:ay,supportsDynamicResponse:"string"==typeof f||aB,buildManifest:U,nextFontManifest:V,reactLoadableManifest:W,subresourceIntegrityManifest:Z,setCacheStatus:null==ac?void 0:ac.setCacheStatus,setIsrStatus:null==ac?void 0:ac.setIsrStatus,setReactDebugChannel:null==ac?void 0:ac.setReactDebugChannel,sendErrorsToBrowser:null==ac?void 0:ac.sendErrorsToBrowser,dir:c(33873).join(process.cwd(),L.relativeProjectDir),isDraftMode:_,botType:am,isOnDemandRevalidate:ai,isPossibleServerAction:aq,assetPrefix:ad.assetPrefix,nextConfigOutput:ad.output,crossOrigin:ad.crossOrigin,trailingSlash:ad.trailingSlash,images:ad.images,previewProps:$.preview,deploymentId:ag,enableTainting:ad.experimental.taint,htmlLimitedBots:ad.htmlLimitedBots,reactMaxHeadersLength:ad.reactMaxHeadersLength,multiZoneDraftMode:!1,incrementalCache:m,cacheLifeProfiles:ad.cacheLife,basePath:ad.basePath,serverActions:ad.experimental.serverActions,...at||au?{nextExport:!0,supportsDynamicResponse:!1,isStaticGeneration:!0,isDebugDynamicAccesses:at}:{},cacheComponents:!!ad.cacheComponents,experimental:{isRoutePPREnabled:as,expireTime:ad.expireTime,staleTimes:ad.experimental.staleTimes,dynamicOnHover:!!ad.experimental.dynamicOnHover,inlineCss:!!ad.experimental.inlineCss,authInterrupts:!!ad.experimental.authInterrupts,clientTraceMetadata:ad.experimental.clientTraceMetadata||[],clientParamParsingOrigins:ad.experimental.clientParamParsingOrigins,maxPostponedStateSizeBytes:(0,B.parseMaxPostponedStateSize)(ad.experimental.maxPostponedStateSize)},waitUntil:d.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:()=>{},onInstrumentationRequestError:(b,c,d,e)=>L.onRequestError(a,b,d,e,ac),err:(0,h.getRequestMeta)(a,"invokeError"),dev:L.isDev}};at&&(l.renderOpts.nextExport=!0,l.renderOpts.supportsDynamicResponse=!1,l.renderOpts.isDebugDynamicAccesses=at),i&&(l.renderOpts.supportsDynamicResponse=!1);let n=await k(e,l),{metadata:o}=n,{cacheControl:p,headers:q={},fetchTags:r,fetchMetrics:s}=o;if(r&&(q[x.NEXT_CACHE_TAGS_HEADER]=r),a.fetchMetrics=s,az&&(null==p?void 0:p.revalidate)===0&&!L.isDev&&!as){let a=o.staticBailoutInfo,b=Object.defineProperty(Error(`Page changed from static to dynamic at runtime ${aa}${(null==a?void 0:a.description)?`, reason: ${a.description}`:""}
|
|
16
|
+
see more here https://nextjs.org/docs/messages/app-static-to-dynamic-error`),"__NEXT_ERROR_CODE",{value:"E132",enumerable:!1,configurable:!0});if(null==a?void 0:a.stack){let c=a.stack;b.stack=b.message+c.substring(c.indexOf("\n"))}throw b}return{value:{kind:u.CachedRouteKind.APP_PAGE,html:n,headers:q,rscData:o.flightData,postponed:o.postponed,status:o.statusCode,segmentData:o.segmentData},cacheControl:p}},p=async({hasResolved:c,previousCacheEntry:f,isRevalidating:g,span:i,forceStaticRender:j=!1})=>{let k,l=!1===L.isDev,q=c||b.writableEnded;if(ai&&ab&&!f&&!N)return(null==ac?void 0:ac.render404)?await ac.render404(a,b):(b.statusCode=404,b.end("This page could not be found")),null;if(aj&&(k=(0,v.parseFallbackField)(aj.fallback)),k===v.FallbackMode.PRERENDER&&(0,t.isBot)(al)&&(!as||an)&&(k=v.FallbackMode.BLOCKING_STATIC_RENDER),(null==f?void 0:f.isStale)===-1&&(ai=!0),ai&&(k!==v.FallbackMode.NOT_FOUND||f)&&(k=v.FallbackMode.BLOCKING_STATIC_RENDER),!N&&k!==v.FallbackMode.BLOCKING_STATIC_RENDER&&aE&&!q&&!_&&T&&(l||!ak)){if((l||aj)&&k===v.FallbackMode.NOT_FOUND){if(ad.experimental.adapterPath)return await aJ();throw new A.NoFallbackError}if(as&&(ad.cacheComponents?!aw:!ap)){let b=l&&"string"==typeof(null==aj?void 0:aj.fallback)?aj.fallback:ah,c=l&&(null==aj?void 0:aj.fallbackRouteParams)?(0,n.createOpaqueFallbackRouteParams)(aj.fallbackRouteParams):au?(0,n.getFallbackRouteParams)(ah,L):null,f=await L.handleResponse({cacheKey:b,req:a,nextConfig:ad,routeKind:e.RouteKind.APP_PAGE,isFallback:!0,prerenderManifest:$,isRoutePPREnabled:as,responseGenerator:async()=>o({span:i,postponed:void 0,fallbackRouteParams:c,forceStaticRender:!1}),waitUntil:d.waitUntil,isMinimalMode:N});if(null===f)return null;if(f)return delete f.cacheControl,f}}let r=ai||g||!av?void 0:av;if(aA&&!N&&m&&aw&&!j){let b=await m.get(aa,{kind:u.IncrementalCacheKind.APP_PAGE,isRoutePPREnabled:!0,isFallback:!1});b&&b.value&&b.value.kind===u.CachedRouteKind.APP_PAGE&&(r=b.value.postponed,b&&(-1===b.isStale||!0===b.isStale)&&(0,G.scheduleOnNextTick)(async()=>{let b=L.getResponseCache(a);try{await b.revalidate(aa,m,as,!1,a=>p({...a,forceStaticRender:!0}),null,c,d.waitUntil)}catch(a){console.error("Error revalidating the page in the background",a)}}))}if(at&&void 0!==r)return{cacheControl:{revalidate:1,expire:void 0},value:{kind:u.CachedRouteKind.PAGES,html:w.default.EMPTY,pageData:{},headers:void 0,status:void 0}};let s=l&&(null==aj?void 0:aj.fallbackRouteParams)&&(0,h.getRequestMeta)(a,"renderFallbackShell")?(0,n.createOpaqueFallbackRouteParams)(aj.fallbackRouteParams):au?(0,n.getFallbackRouteParams)(ah,L):null;return o({span:i,postponed:r,fallbackRouteParams:s,forceStaticRender:j})},q=async c=>{var f,g,i,j,k;let l,m=await L.handleResponse({cacheKey:aD,responseGenerator:a=>p({span:c,...a}),routeKind:e.RouteKind.APP_PAGE,isOnDemandRevalidate:ai,isRoutePPREnabled:as,req:a,nextConfig:ad,prerenderManifest:$,waitUntil:d.waitUntil,isMinimalMode:N});if(_&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate"),L.isDev&&b.setHeader("Cache-Control","no-store, must-revalidate"),!m){if(aD)throw Object.defineProperty(Error("invariant: cache entry required but not generated"),"__NEXT_ERROR_CODE",{value:"E62",enumerable:!1,configurable:!0});return null}if((null==(f=m.value)?void 0:f.kind)!==u.CachedRouteKind.APP_PAGE)throw Object.defineProperty(Error(`Invariant app-page handler received invalid cache entry ${null==(i=m.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E707",enumerable:!1,configurable:!0});let n="string"==typeof m.value.postponed;az&&!aw&&(!n||ao)&&(N||b.setHeader("x-nextjs-cache",ai?"REVALIDATED":m.isMiss?"MISS":m.isStale?"STALE":"HIT"),b.setHeader(s.NEXT_IS_PRERENDER_HEADER,"1"));let{value:q}=m;if(av)l={revalidate:0,expire:void 0};else if(aw)l={revalidate:0,expire:void 0};else if(!L.isDev)if(_)l={revalidate:0,expire:void 0};else if(az){if(m.cacheControl)if("number"==typeof m.cacheControl.revalidate){if(m.cacheControl.revalidate<1)throw Object.defineProperty(Error(`Invalid revalidate configuration provided: ${m.cacheControl.revalidate} < 1`),"__NEXT_ERROR_CODE",{value:"E22",enumerable:!1,configurable:!0});l={revalidate:m.cacheControl.revalidate,expire:(null==(j=m.cacheControl)?void 0:j.expire)??ad.expireTime}}else l={revalidate:x.CACHE_ONE_YEAR,expire:void 0}}else b.getHeader("Cache-Control")||(l={revalidate:0,expire:void 0});if(m.cacheControl=l,"string"==typeof ax&&(null==q?void 0:q.kind)===u.CachedRouteKind.APP_PAGE&&q.segmentData){b.setHeader(s.NEXT_DID_POSTPONE_HEADER,"2");let c=null==(k=q.headers)?void 0:k[x.NEXT_CACHE_TAGS_HEADER];N&&az&&c&&"string"==typeof c&&b.setHeader(x.NEXT_CACHE_TAGS_HEADER,c);let d=q.segmentData.get(ax);return void 0!==d?(0,z.sendRenderResult)({req:a,res:b,generateEtags:ad.generateEtags,poweredByHeader:ad.poweredByHeader,result:w.default.fromStatic(d,s.RSC_CONTENT_TYPE_HEADER),cacheControl:m.cacheControl}):(b.statusCode=204,(0,z.sendRenderResult)({req:a,res:b,generateEtags:ad.generateEtags,poweredByHeader:ad.poweredByHeader,result:w.default.EMPTY,cacheControl:m.cacheControl}))}let r=aA?(0,h.getRequestMeta)(a,"onCacheEntryV2")??(0,h.getRequestMeta)(a,"onCacheEntry"):(0,h.getRequestMeta)(a,"onCacheEntry");if(r&&await r(m,{url:(0,h.getRequestMeta)(a,"initURL")??a.url}))return null;if(q.headers){let a={...q.headers};for(let[c,d]of(N&&az||delete a[x.NEXT_CACHE_TAGS_HEADER],Object.entries(a)))if(void 0!==d)if(Array.isArray(d))for(let a of d)b.appendHeader(c,a);else"number"==typeof d&&(d=d.toString()),b.appendHeader(c,d)}let t=null==(g=q.headers)?void 0:g[x.NEXT_CACHE_TAGS_HEADER];if(N&&az&&t&&"string"==typeof t&&b.setHeader(x.NEXT_CACHE_TAGS_HEADER,t),!q.status||ap&&as||(b.statusCode=q.status),!N&&q.status&&E.RedirectStatusCode[q.status]&&ap&&(b.statusCode=200),n&&!aw&&b.setHeader(s.NEXT_DID_POSTPONE_HEADER,"1"),ap&&!_){if(void 0===q.rscData){if(q.html.contentType!==s.RSC_CONTENT_TYPE_HEADER)if(ad.cacheComponents)return b.statusCode=404,(0,z.sendRenderResult)({req:a,res:b,generateEtags:ad.generateEtags,poweredByHeader:ad.poweredByHeader,result:w.default.EMPTY,cacheControl:m.cacheControl});else throw Object.defineProperty(new F.InvariantError(`Expected RSC response, got ${q.html.contentType}`),"__NEXT_ERROR_CODE",{value:"E789",enumerable:!1,configurable:!0});return(0,z.sendRenderResult)({req:a,res:b,generateEtags:ad.generateEtags,poweredByHeader:ad.poweredByHeader,result:q.html,cacheControl:m.cacheControl})}return(0,z.sendRenderResult)({req:a,res:b,generateEtags:ad.generateEtags,poweredByHeader:ad.poweredByHeader,result:w.default.fromStatic(q.rscData,s.RSC_CONTENT_TYPE_HEADER),cacheControl:m.cacheControl})}let v=q.html;if(!n||N||ap)return(0,z.sendRenderResult)({req:a,res:b,generateEtags:ad.generateEtags,poweredByHeader:ad.poweredByHeader,result:v,cacheControl:m.cacheControl});if(at)return v.push(new ReadableStream({start(a){a.enqueue(y.ENCODED_TAGS.CLOSED.BODY_AND_HTML),a.close()}})),(0,z.sendRenderResult)({req:a,res:b,generateEtags:ad.generateEtags,poweredByHeader:ad.poweredByHeader,result:v,cacheControl:{revalidate:0,expire:void 0}});let A=new TransformStream;return v.push(A.readable),o({span:c,postponed:q.postponed,fallbackRouteParams:null,forceStaticRender:!1}).then(async a=>{var b,c;if(!a)throw Object.defineProperty(Error("Invariant: expected a result to be returned"),"__NEXT_ERROR_CODE",{value:"E463",enumerable:!1,configurable:!0});if((null==(b=a.value)?void 0:b.kind)!==u.CachedRouteKind.APP_PAGE)throw Object.defineProperty(Error(`Invariant: expected a page response, got ${null==(c=a.value)?void 0:c.kind}`),"__NEXT_ERROR_CODE",{value:"E305",enumerable:!1,configurable:!0});await a.value.html.pipeTo(A.writable)}).catch(a=>{A.writable.abort(a).catch(a=>{console.error("couldn't abort transformer",a)})}),(0,z.sendRenderResult)({req:a,res:b,generateEtags:ad.generateEtags,poweredByHeader:ad.poweredByHeader,result:v,cacheControl:{revalidate:0,expire:void 0}})};if(!aI)return await aH.withPropagatedContext(a.headers,()=>aH.trace(i.BaseServerSpan.handleRequest,{spanName:`${aG} ${O}`,kind:g.SpanKind.SERVER,attributes:{"http.method":aG,"http.target":a.url}},q));await q(aI)}catch(b){throw b instanceof A.NoFallbackError||await L.onRequestError(a,b,{routerKind:"App Router",routePath:O,routeType:"render",revalidateReason:(0,f.c)({isStaticGeneration:az,isOnDemandRevalidate:ai})},!1,ac),b}}},99990:(a,b,c)=>{Promise.resolve().then(c.bind(c,37308))}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,595,5573,8020,3498,1465,438,2910,3596,9679,2901,2050,1909,4631,9548],()=>b(b.s=94638));module.exports=c})();
|