omniroute 0.5.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +50 -1
- package/app/.next/BUILD_ID +1 -1
- package/app/.next/app-path-routes-manifest.json +33 -31
- package/app/.next/build-manifest.json +2 -2
- package/app/.next/prerender-manifest.json +27 -32
- package/app/.next/routes-manifest.json +18 -6
- 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/cli-tools/page.js +6 -6
- 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 -0
- package/app/.next/server/app/(dashboard)/dashboard/costs/page.js.nft.json +1 -0
- package/app/.next/server/app/(dashboard)/dashboard/costs/page_client-reference-manifest.js +1 -0
- 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/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/_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 +1 -1
- package/app/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- 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 +1 -1
- package/app/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/app/.next/server/app/_not-found/page.js +2 -2
- package/app/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/app/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/_not-found.html +1 -1
- package/app/.next/server/app/_not-found.rsc +4 -4
- package/app/.next/server/app/_not-found.segments/_full.segment.rsc +4 -4
- package/app/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/_not-found.segments/_index.segment.rsc +3 -3
- package/app/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/app/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/api/auth/login/route.js +1 -1
- package/app/.next/server/app/api/auth/login/route.js.nft.json +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_client-reference-manifest.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_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.js.nft.json +1 -1
- 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 +2 -2
- 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 +2 -2
- package/app/.next/server/app/api/cli-tools/codex-settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/droid-settings/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/droid-settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/guide-settings/[toolId]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/kilo-settings/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/kilo-settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
- 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 -0
- package/app/.next/server/app/api/cli-tools/status/route.js.nft.json +1 -0
- package/app/.next/server/app/api/cli-tools/status/route_client-reference-manifest.js +1 -0
- package/app/.next/server/app/api/cloud/auth/route.js +1 -1
- package/app/.next/server/app/api/cloud/auth/route.js.nft.json +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.js.nft.json +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.js.nft.json +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.js.nft.json +1 -1
- package/app/.next/server/app/api/cloud/models/alias/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/combos/[id]/route.js +1 -1
- package/app/.next/server/app/api/combos/[id]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/combos/[id]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/combos/metrics/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/combos/route.js +1 -1
- package/app/.next/server/app/api/combos/route.js.nft.json +1 -1
- package/app/.next/server/app/api/combos/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/combos/test/route.js +1 -1
- package/app/.next/server/app/api/combos/test/route.js.nft.json +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_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.js.nft.json +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_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.js.nft.json +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.js.nft.json +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.js.nft.json +1 -1
- package/app/.next/server/app/api/keys/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/models/alias/route.js +1 -1
- package/app/.next/server/app/api/models/alias/route.js.nft.json +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_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.js.nft.json +1 -1
- package/app/.next/server/app/api/models/catalog/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/models/route.js +1 -1
- package/app/.next/server/app/api/models/route.js.nft.json +1 -1
- package/app/.next/server/app/api/models/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/monitoring/health/route.js +1 -1
- package/app/.next/server/app/api/monitoring/health/route.js.nft.json +1 -1
- 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.js.nft.json +1 -1
- package/app/.next/server/app/api/oauth/[provider]/[action]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/cursor/auto-import/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/cursor/import/route.js +1 -1
- package/app/.next/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
- package/app/.next/server/app/api/oauth/cursor/import/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/kiro/auto-import/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/kiro/import/route.js +1 -1
- package/app/.next/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
- package/app/.next/server/app/api/oauth/kiro/import/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/kiro/social-authorize/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
- package/app/.next/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +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_client-reference-manifest.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.js.nft.json +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.js.nft.json +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 +8 -0
- package/app/.next/server/app/api/provider-metrics/route.js.nft.json +1 -0
- package/app/.next/server/app/api/provider-metrics/route_client-reference-manifest.js +1 -0
- package/app/.next/server/app/api/provider-models/route.js +1 -1
- package/app/.next/server/app/api/provider-models/route.js.nft.json +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.js.nft.json +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 +1 -1
- package/app/.next/server/app/api/provider-nodes/route.js.nft.json +1 -1
- package/app/.next/server/app/api/provider-nodes/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/provider-nodes/validate/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/providers/[id]/models/route.js +2 -2
- package/app/.next/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
- package/app/.next/server/app/api/providers/[id]/models/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/providers/[id]/route.js +1 -1
- package/app/.next/server/app/api/providers/[id]/route.js.nft.json +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.js.nft.json +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.js.nft.json +1 -1
- package/app/.next/server/app/api/providers/client/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/providers/route.js +1 -1
- package/app/.next/server/app/api/providers/route.js.nft.json +1 -1
- package/app/.next/server/app/api/providers/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/providers/test-batch/route.js +1 -1
- package/app/.next/server/app/api/providers/test-batch/route.js.nft.json +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.js.nft.json +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_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.js.nft.json +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_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.js.nft.json +1 -1
- package/app/.next/server/app/api/resilience/route_client-reference-manifest.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_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.js.nft.json +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_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.js.nft.json +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_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.js.nft.json +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.js.nft.json +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.js.nft.json +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.js.nft.json +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_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/storage/health/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/sync/cloud/route.js +1 -1
- package/app/.next/server/app/api/sync/cloud/route.js.nft.json +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.js.nft.json +1 -1
- package/app/.next/server/app/api/sync/initialize/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/tags/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/telemetry/summary/route_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.js.nft.json +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_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/translator/history/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/translator/load/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/translator/save/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/translator/send/route.js +1 -1
- package/app/.next/server/app/api/translator/send/route.js.nft.json +1 -1
- package/app/.next/server/app/api/translator/send/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/translator/translate/route.js +1 -1
- package/app/.next/server/app/api/translator/translate/route.js.nft.json +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 +1 -1
- package/app/.next/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/usage/[connectionId]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/analytics/route.js +1 -1
- package/app/.next/server/app/api/usage/analytics/route.js.nft.json +1 -1
- package/app/.next/server/app/api/usage/analytics/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/budget/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/call-logs/[id]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/usage/call-logs/[id]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/call-logs/route.js.nft.json +1 -1
- package/app/.next/server/app/api/usage/call-logs/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/history/route.js.nft.json +1 -1
- package/app/.next/server/app/api/usage/history/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/logs/route.js.nft.json +1 -1
- package/app/.next/server/app/api/usage/logs/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/proxy-logs/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/request-logs/route.js.nft.json +1 -1
- package/app/.next/server/app/api/usage/request-logs/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/api/chat/route.js +1 -1
- package/app/.next/server/app/api/v1/api/chat/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/api/chat/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/audio/speech/route.js +1 -1
- package/app/.next/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/audio/speech/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/audio/transcriptions/route.js +1 -1
- package/app/.next/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/audio/transcriptions/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/chat/completions/route.js +1 -1
- package/app/.next/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/chat/completions/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/embeddings/route.js +1 -1
- package/app/.next/server/app/api/v1/embeddings/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/embeddings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/images/generations/route.js +1 -1
- package/app/.next/server/app/api/v1/images/generations/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/images/generations/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/messages/count_tokens/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/messages/route.js +1 -1
- package/app/.next/server/app/api/v1/messages/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/messages/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/models/route.js +2 -2
- package/app/.next/server/app/api/v1/models/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/models/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/moderations/route.js +1 -1
- package/app/.next/server/app/api/v1/moderations/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/moderations/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/providers/[provider]/chat/completions/route.js +1 -1
- package/app/.next/server/app/api/v1/providers/[provider]/chat/completions/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/providers/[provider]/chat/completions/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/providers/[provider]/embeddings/route.js +1 -1
- package/app/.next/server/app/api/v1/providers/[provider]/embeddings/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/providers/[provider]/embeddings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/providers/[provider]/images/generations/route.js +1 -1
- package/app/.next/server/app/api/v1/providers/[provider]/images/generations/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/providers/[provider]/images/generations/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/rerank/route.js +1 -1
- package/app/.next/server/app/api/v1/rerank/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/rerank/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/responses/route.js +1 -1
- package/app/.next/server/app/api/v1/responses/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/responses/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1beta/models/[...path]/route.js +1 -1
- package/app/.next/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1beta/models/[...path]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1beta/models/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/callback/page.js +2 -2
- package/app/.next/server/app/callback/page.js.nft.json +1 -1
- package/app/.next/server/app/callback/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/callback.html +1 -1
- package/app/.next/server/app/callback.rsc +4 -4
- package/app/.next/server/app/callback.segments/_full.segment.rsc +4 -4
- package/app/.next/server/app/callback.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/callback.segments/_index.segment.rsc +3 -3
- package/app/.next/server/app/callback.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/callback.segments/callback.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/analytics.html +1 -1
- package/app/.next/server/app/dashboard/analytics.rsc +6 -6
- package/app/.next/server/app/dashboard/analytics.segments/!KGRhc2hib2FyZCk/dashboard/analytics/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/analytics.segments/!KGRhc2hib2FyZCk/dashboard/analytics.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/analytics.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/analytics.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/analytics.segments/_full.segment.rsc +6 -6
- package/app/.next/server/app/dashboard/analytics.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/analytics.segments/_index.segment.rsc +3 -3
- package/app/.next/server/app/dashboard/analytics.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/cli-tools.html +1 -1
- package/app/.next/server/app/dashboard/cli-tools.rsc +6 -6
- package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/cli-tools.segments/_full.segment.rsc +6 -6
- package/app/.next/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/cli-tools.segments/_index.segment.rsc +3 -3
- package/app/.next/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/combos.html +1 -1
- package/app/.next/server/app/dashboard/combos.rsc +6 -6
- package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/combos.segments/_full.segment.rsc +6 -6
- package/app/.next/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/combos.segments/_index.segment.rsc +3 -3
- package/app/.next/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/costs.html +1 -0
- package/app/.next/server/app/dashboard/costs.meta +17 -0
- package/app/.next/server/app/dashboard/costs.rsc +24 -0
- package/app/.next/server/app/dashboard/costs.segments/!KGRhc2hib2FyZCk/dashboard/costs/__PAGE__.segment.rsc +9 -0
- package/app/.next/server/app/dashboard/costs.segments/!KGRhc2hib2FyZCk/dashboard/costs.segment.rsc +4 -0
- package/app/.next/server/app/dashboard/costs.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +4 -0
- package/app/.next/server/app/dashboard/costs.segments/!KGRhc2hib2FyZCk.segment.rsc +5 -0
- package/app/.next/server/app/dashboard/costs.segments/_full.segment.rsc +24 -0
- package/app/.next/server/app/dashboard/costs.segments/_head.segment.rsc +6 -0
- package/app/.next/server/app/dashboard/costs.segments/_index.segment.rsc +9 -0
- package/app/.next/server/app/dashboard/costs.segments/_tree.segment.rsc +5 -0
- package/app/.next/server/app/dashboard/endpoint.html +1 -1
- package/app/.next/server/app/dashboard/endpoint.rsc +6 -6
- package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/endpoint.segments/_full.segment.rsc +6 -6
- package/app/.next/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/endpoint.segments/_index.segment.rsc +3 -3
- package/app/.next/server/app/dashboard/endpoint.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/health.html +1 -1
- package/app/.next/server/app/dashboard/health.rsc +6 -6
- package/app/.next/server/app/dashboard/health.segments/!KGRhc2hib2FyZCk/dashboard/health/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/health.segments/!KGRhc2hib2FyZCk/dashboard/health.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/health.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/health.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/health.segments/_full.segment.rsc +6 -6
- package/app/.next/server/app/dashboard/health.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/health.segments/_index.segment.rsc +3 -3
- package/app/.next/server/app/dashboard/health.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/onboarding.html +1 -1
- package/app/.next/server/app/dashboard/onboarding.rsc +5 -5
- package/app/.next/server/app/dashboard/onboarding.segments/!KGRhc2hib2FyZCk/dashboard/onboarding/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/onboarding.segments/!KGRhc2hib2FyZCk/dashboard/onboarding.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/onboarding.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/onboarding.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/onboarding.segments/_full.segment.rsc +5 -5
- package/app/.next/server/app/dashboard/onboarding.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/onboarding.segments/_index.segment.rsc +3 -3
- package/app/.next/server/app/dashboard/onboarding.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/profile.html +1 -1
- package/app/.next/server/app/dashboard/profile.rsc +5 -5
- package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/profile.segments/_full.segment.rsc +5 -5
- package/app/.next/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/profile.segments/_index.segment.rsc +3 -3
- package/app/.next/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/providers/new.html +1 -1
- package/app/.next/server/app/dashboard/providers/new.rsc +6 -6
- package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/providers/new.segments/_full.segment.rsc +6 -6
- package/app/.next/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/providers/new.segments/_index.segment.rsc +3 -3
- package/app/.next/server/app/dashboard/providers/new.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/providers.html +1 -1
- package/app/.next/server/app/dashboard/providers.rsc +6 -6
- package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/providers.segments/_full.segment.rsc +6 -6
- package/app/.next/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/providers.segments/_index.segment.rsc +3 -3
- package/app/.next/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/settings/pricing.html +1 -1
- package/app/.next/server/app/dashboard/settings/pricing.rsc +5 -5
- package/app/.next/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk/dashboard/settings/pricing.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk/dashboard/settings.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +5 -5
- package/app/.next/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +3 -3
- package/app/.next/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/settings.html +1 -1
- package/app/.next/server/app/dashboard/settings.rsc +6 -6
- package/app/.next/server/app/dashboard/settings.segments/!KGRhc2hib2FyZCk/dashboard/settings/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/settings.segments/!KGRhc2hib2FyZCk/dashboard/settings.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/settings.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/settings.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/settings.segments/_full.segment.rsc +6 -6
- package/app/.next/server/app/dashboard/settings.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/settings.segments/_index.segment.rsc +3 -3
- package/app/.next/server/app/dashboard/settings.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/translator.html +2 -2
- package/app/.next/server/app/dashboard/translator.rsc +6 -6
- package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/translator.segments/_full.segment.rsc +6 -6
- package/app/.next/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/translator.segments/_index.segment.rsc +3 -3
- package/app/.next/server/app/dashboard/translator.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/usage.html +1 -2
- package/app/.next/server/app/dashboard/usage.rsc +6 -6
- package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/usage.segments/_full.segment.rsc +6 -6
- package/app/.next/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/usage.segments/_index.segment.rsc +3 -3
- package/app/.next/server/app/dashboard/usage.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/docs/page.js +2 -2
- package/app/.next/server/app/docs/page.js.nft.json +1 -1
- package/app/.next/server/app/docs/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/docs.html +1 -1
- package/app/.next/server/app/docs.rsc +79 -20
- package/app/.next/server/app/docs.segments/_full.segment.rsc +79 -20
- package/app/.next/server/app/docs.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/docs.segments/_index.segment.rsc +3 -3
- package/app/.next/server/app/docs.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/docs.segments/docs/__PAGE__.segment.rsc +65 -9
- package/app/.next/server/app/docs.segments/docs.segment.rsc +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/forbidden.html +1 -1
- package/app/.next/server/app/forbidden.rsc +4 -4
- package/app/.next/server/app/forbidden.segments/_full.segment.rsc +4 -4
- package/app/.next/server/app/forbidden.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/forbidden.segments/_index.segment.rsc +3 -3
- package/app/.next/server/app/forbidden.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/forbidden.segments/forbidden/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/forbidden.segments/forbidden.segment.rsc +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/forgot-password.html +1 -1
- package/app/.next/server/app/forgot-password.rsc +5 -5
- package/app/.next/server/app/forgot-password.segments/_full.segment.rsc +5 -5
- package/app/.next/server/app/forgot-password.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/forgot-password.segments/_index.segment.rsc +3 -3
- package/app/.next/server/app/forgot-password.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/forgot-password.segments/forgot-password/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/forgot-password.segments/forgot-password.segment.rsc +1 -1
- package/app/.next/server/app/index.html +1 -1
- package/app/.next/server/app/index.rsc +4 -4
- package/app/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/index.segments/_full.segment.rsc +4 -4
- package/app/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/index.segments/_index.segment.rsc +3 -3
- package/app/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/landing/page.js +2 -2
- package/app/.next/server/app/landing/page.js.nft.json +1 -1
- package/app/.next/server/app/landing/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/landing.html +1 -1
- package/app/.next/server/app/landing.rsc +5 -5
- package/app/.next/server/app/landing.segments/_full.segment.rsc +5 -5
- package/app/.next/server/app/landing.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/landing.segments/_index.segment.rsc +3 -3
- package/app/.next/server/app/landing.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/landing.segments/landing/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/landing.segments/landing.segment.rsc +1 -1
- package/app/.next/server/app/login/page.js +2 -2
- package/app/.next/server/app/login/page.js.nft.json +1 -1
- package/app/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/login.html +1 -1
- package/app/.next/server/app/login.rsc +5 -5
- package/app/.next/server/app/login.segments/_full.segment.rsc +5 -5
- package/app/.next/server/app/login.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/login.segments/_index.segment.rsc +3 -3
- package/app/.next/server/app/login.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/login.segments/login.segment.rsc +1 -1
- package/app/.next/server/app/page.js +2 -2
- package/app/.next/server/app/page.js.nft.json +1 -1
- package/app/.next/server/app/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/privacy/page.js +2 -2
- package/app/.next/server/app/privacy/page.js.nft.json +1 -1
- package/app/.next/server/app/privacy/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/privacy.html +1 -1
- package/app/.next/server/app/privacy.rsc +4 -4
- package/app/.next/server/app/privacy.segments/_full.segment.rsc +4 -4
- package/app/.next/server/app/privacy.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/privacy.segments/_index.segment.rsc +3 -3
- package/app/.next/server/app/privacy.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/privacy.segments/privacy/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/privacy.segments/privacy.segment.rsc +1 -1
- package/app/.next/server/app/terms/page.js +2 -2
- package/app/.next/server/app/terms/page.js.nft.json +1 -1
- package/app/.next/server/app/terms/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/terms.html +1 -1
- package/app/.next/server/app/terms.rsc +5 -5
- package/app/.next/server/app/terms.segments/_full.segment.rsc +5 -5
- package/app/.next/server/app/terms.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/terms.segments/_index.segment.rsc +3 -3
- package/app/.next/server/app/terms.segments/_tree.segment.rsc +2 -2
- package/app/.next/server/app/terms.segments/terms/__PAGE__.segment.rsc +4 -3
- package/app/.next/server/app/terms.segments/terms.segment.rsc +1 -1
- package/app/.next/server/app-paths-manifest.json +33 -31
- package/app/.next/server/chunks/1099.js +37 -0
- package/app/.next/server/chunks/2951.js +1 -0
- package/app/.next/server/chunks/3994.js +3 -0
- package/app/.next/server/chunks/4004.js +1 -1
- package/app/.next/server/chunks/4755.js +3 -3
- package/app/.next/server/chunks/4832.js +2 -2
- package/app/.next/server/chunks/5040.js +1 -1
- package/app/.next/server/chunks/651.js +46 -0
- package/app/.next/server/chunks/7615.js +1 -1
- package/app/.next/server/chunks/7968.js +1 -1
- package/app/.next/server/chunks/{3676.js → 8757.js} +2 -2
- package/app/.next/server/pages/404.html +1 -1
- package/app/.next/server/pages/500.html +2 -2
- package/app/.next/server/server-reference-manifest.js +1 -1
- package/app/.next/server/server-reference-manifest.json +1 -1
- package/app/.next/static/-4iz0aT4gr0pcgbKDy3mR/_buildManifest.js +1 -0
- package/app/.next/static/chunks/{1525-886426e50105474d.js → 1525-5a69ef0a1ac4f962.js} +2 -2
- package/app/.next/static/chunks/7013-718042994c9127fa.js +1 -0
- package/app/.next/static/chunks/782-5e138760b7f7bf48.js +3 -0
- package/app/.next/static/chunks/{7896-42bb02212fd79c37.js → 7896-9a0909a92a983a09.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/analytics/page-a04417ebc8cf8378.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/cli-tools/page-a0d59a10c0c8cf03.js +15 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/combos/{page-bdb5be890b523066.js → page-0ec8339a5e63e29b.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/costs/page-38d9a3dbd2b14ce0.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/endpoint/page-9f316bbfedf248e3.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/health/page-1c7f51c61cd1e699.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/page-b7f4f0bd54a35446.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/profile/page-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-0a52b0b6a790afd5.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/new/{page-9667287d75830fd5.js → page-8d7182afc4e86131.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/page-8ecd49c8dede42af.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/settings/page-9460e0e29ba0ca7d.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/translator/page-2889507d608ace80.js +4 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/usage/page-016d44203ff299ac.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/{layout-b6fc79d0628b97e3.js → layout-5cca2595e89e770c.js} +1 -1
- package/app/.next/static/chunks/app/_global-error/page-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/_not-found/page-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/auth/login/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/auth/logout/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/cache/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/cache/stats/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/backups/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/claude-settings/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/cline-settings/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/codex-profiles/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/codex-settings/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/droid-settings/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/guide-settings/[toolId]/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/kilo-settings/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/openclaw-settings/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/runtime/[toolId]/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/status/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/cloud/auth/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/cloud/credentials/update/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/cloud/model/resolve/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/cloud/models/alias/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/combos/[id]/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/combos/metrics/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/combos/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/combos/test/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/compliance/audit-log/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/db-backups/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/evals/[suiteId]/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/evals/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/fallback/chains/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/init/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/keys/[id]/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/keys/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/models/alias/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/models/availability/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/models/catalog/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/models/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/monitoring/health/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/[provider]/[action]/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/cursor/auto-import/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/cursor/import/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/kiro/auto-import/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/kiro/import/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/kiro/social-authorize/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/kiro/social-exchange/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/policies/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/pricing/defaults/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/pricing/models/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/pricing/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/provider-metrics/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/provider-models/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/provider-nodes/[id]/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/provider-nodes/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/provider-nodes/validate/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/providers/[id]/models/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/providers/[id]/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/providers/[id]/test/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/providers/client/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/providers/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/providers/test-batch/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/providers/validate/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/rate-limit/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/rate-limits/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/resilience/reset/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/resilience/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/restart/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/sessions/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/settings/combo-defaults/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/settings/ip-filter/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/settings/proxy/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/settings/proxy/test/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/settings/require-login/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/settings/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/settings/system-prompt/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/settings/thinking-budget/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/shutdown/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/storage/health/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/sync/cloud/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/sync/initialize/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/tags/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/telemetry/summary/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/token-health/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/translator/detect/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/translator/history/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/translator/load/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/translator/save/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/translator/send/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/translator/translate/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/usage/[connectionId]/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/usage/analytics/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/usage/budget/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/usage/call-logs/[id]/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/usage/call-logs/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/usage/history/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/usage/logs/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/usage/proxy-logs/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/usage/request-logs/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/v1/api/chat/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/v1/audio/speech/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/v1/audio/transcriptions/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/v1/chat/completions/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/v1/embeddings/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/v1/images/generations/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/v1/messages/count_tokens/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/v1/messages/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/v1/models/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/v1/moderations/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/v1/providers/[provider]/chat/completions/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/v1/providers/[provider]/embeddings/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/v1/providers/[provider]/images/generations/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/v1/rerank/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/v1/responses/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/v1/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/v1beta/models/[...path]/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/api/v1beta/models/route-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/app/forgot-password/{page-9c116a597f3df4d1.js → page-9cf548e06e388c72.js} +1 -1
- package/app/.next/static/chunks/app/landing/page-24ee8d70cde143a9.js +1 -0
- package/app/.next/static/chunks/app/login/{page-93ac51059ef434b7.js → page-1fe2fbac3d005b28.js} +1 -1
- package/app/.next/static/chunks/app/page-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/next/dist/client/components/builtin/app-error-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/next/dist/client/components/builtin/forbidden-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/chunks/next/dist/client/components/builtin/unauthorized-9dc1eebb90668f5a.js +1 -0
- package/app/.next/static/css/bd676ecee93f7aaf.css +1 -0
- package/app/package.json +1 -1
- package/app/public/apple-touch-icon.svg +26 -0
- package/app/public/favicon.svg +18 -4
- package/app/public/icon-192.svg +25 -0
- package/package.json +1 -1
- package/app/.next/server/app/favicon.ico/route.js +0 -1
- package/app/.next/server/app/favicon.ico/route.js.nft.json +0 -1
- package/app/.next/server/app/favicon.ico.body +0 -0
- package/app/.next/server/app/favicon.ico.meta +0 -1
- package/app/.next/server/chunks/216.js +0 -37
- package/app/.next/server/chunks/4352.js +0 -46
- package/app/.next/server/chunks/4822.js +0 -3
- package/app/.next/server/chunks/867.js +0 -1
- package/app/.next/static/chunks/3191-0bbb8ebd1bd32d1d.js +0 -1
- package/app/.next/static/chunks/600-84211b75b24af21c.js +0 -3
- package/app/.next/static/chunks/app/(dashboard)/dashboard/analytics/page-7a3dc7db5858bb3b.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/cli-tools/page-4cec40aa933b932e.js +0 -15
- package/app/.next/static/chunks/app/(dashboard)/dashboard/endpoint/page-c08e4e402bafcf57.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/health/page-f2287385af528be2.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/page-47808673eb1f72ec.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/profile/page-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-958706ed6aa9d18b.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/page-2af3523f530f984a.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/settings/page-a94b8f5327b8392c.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/translator/page-6190920e7526556c.js +0 -4
- package/app/.next/static/chunks/app/(dashboard)/dashboard/usage/page-32e5d24d60a03c23.js +0 -1
- package/app/.next/static/chunks/app/_global-error/page-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/_not-found/page-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/auth/login/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/auth/logout/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/cache/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/cache/stats/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/backups/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/claude-settings/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/cline-settings/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/codex-profiles/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/codex-settings/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/droid-settings/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/guide-settings/[toolId]/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/kilo-settings/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/openclaw-settings/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/runtime/[toolId]/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/cloud/auth/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/cloud/credentials/update/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/cloud/model/resolve/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/cloud/models/alias/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/combos/[id]/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/combos/metrics/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/combos/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/combos/test/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/compliance/audit-log/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/db-backups/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/evals/[suiteId]/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/evals/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/fallback/chains/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/init/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/keys/[id]/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/keys/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/models/alias/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/models/availability/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/models/catalog/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/models/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/monitoring/health/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/oauth/[provider]/[action]/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/oauth/cursor/auto-import/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/oauth/cursor/import/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/oauth/kiro/auto-import/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/oauth/kiro/import/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/oauth/kiro/social-authorize/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/oauth/kiro/social-exchange/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/policies/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/pricing/defaults/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/pricing/models/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/pricing/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/provider-models/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/provider-nodes/[id]/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/provider-nodes/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/provider-nodes/validate/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/providers/[id]/models/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/providers/[id]/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/providers/[id]/test/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/providers/client/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/providers/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/providers/test-batch/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/providers/validate/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/rate-limit/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/rate-limits/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/resilience/reset/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/resilience/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/restart/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/sessions/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/settings/combo-defaults/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/settings/ip-filter/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/settings/proxy/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/settings/proxy/test/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/settings/require-login/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/settings/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/settings/system-prompt/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/settings/thinking-budget/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/shutdown/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/storage/health/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/sync/cloud/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/sync/initialize/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/tags/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/telemetry/summary/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/token-health/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/translator/detect/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/translator/history/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/translator/load/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/translator/save/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/translator/send/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/translator/translate/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/usage/[connectionId]/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/usage/analytics/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/usage/budget/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/usage/call-logs/[id]/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/usage/call-logs/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/usage/history/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/usage/logs/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/usage/proxy-logs/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/usage/request-logs/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/v1/api/chat/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/v1/audio/speech/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/v1/audio/transcriptions/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/v1/chat/completions/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/v1/embeddings/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/v1/images/generations/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/v1/messages/count_tokens/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/v1/messages/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/v1/models/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/v1/moderations/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/v1/providers/[provider]/chat/completions/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/v1/providers/[provider]/embeddings/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/v1/providers/[provider]/images/generations/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/v1/rerank/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/v1/responses/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/v1/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/v1beta/models/[...path]/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/api/v1beta/models/route-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/app/landing/page-174931045e0028b2.js +0 -1
- package/app/.next/static/chunks/app/page-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/next/dist/client/components/builtin/app-error-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/next/dist/client/components/builtin/forbidden-c02303813bcb9777.js +0 -1
- package/app/.next/static/chunks/next/dist/client/components/builtin/unauthorized-c02303813bcb9777.js +0 -1
- package/app/.next/static/css/61fcae3369881104.css +0 -1
- package/app/.next/static/sTDitYd6vQZvJjlRJcZVe/_buildManifest.js +0 -1
- /package/app/.next/static/{sTDitYd6vQZvJjlRJcZVe → -4iz0aT4gr0pcgbKDy3mR}/_ssgManifest.js +0 -0
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
(()=>{var a={};a.id=2326,a.ids=[2326],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},12506:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>g});var d=c(5735),e=c(74864),f=c(27708);async function g(){let a=await (0,e.D1)();return(0,d.jsx)(f.default,{machineId:a})}},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},23271:(a,b,c)=>{"use strict";c.d(b,{default:()=>w});var d=c(48249),e=c(67484),f=c(64755);let g={claude:{id:"claude",name:"Claude Code",icon:"terminal",color:"#D97757",description:"Anthropic Claude Code CLI",configType:"env",envVars:{baseUrl:"ANTHROPIC_BASE_URL",model:"ANTHROPIC_MODEL",opusModel:"ANTHROPIC_DEFAULT_OPUS_MODEL",sonnetModel:"ANTHROPIC_DEFAULT_SONNET_MODEL",haikuModel:"ANTHROPIC_DEFAULT_HAIKU_MODEL"},modelAliases:["default","sonnet","opus","haiku","opusplan"],settingsFile:"~/.claude/settings.json",defaultModels:[{id:"opus",name:"Claude Opus",alias:"opus",envKey:"ANTHROPIC_DEFAULT_OPUS_MODEL",defaultValue:"cc/claude-opus-4-5-20251101"},{id:"sonnet",name:"Claude Sonnet",alias:"sonnet",envKey:"ANTHROPIC_DEFAULT_SONNET_MODEL",defaultValue:"cc/claude-sonnet-4-5-20250929"},{id:"haiku",name:"Claude Haiku",alias:"haiku",envKey:"ANTHROPIC_DEFAULT_HAIKU_MODEL",defaultValue:"cc/claude-haiku-4-5-20251001"}]},codex:{id:"codex",name:"OpenAI Codex CLI",image:"/providers/codex.png",color:"#10A37F",description:"OpenAI Codex CLI",configType:"custom"},droid:{id:"droid",name:"Factory Droid",image:"/providers/droid.png",color:"#00D4FF",description:"Factory Droid AI Assistant",configType:"custom"},openclaw:{id:"openclaw",name:"Open Claw",image:"/providers/openclaw.png",color:"#FF6B35",description:"Open Claw AI Assistant",configType:"custom"},cursor:{id:"cursor",name:"Cursor",image:"/providers/cursor.png",color:"#000000",description:"Cursor AI Code Editor",configType:"guide",requiresCloud:!0,notes:[{type:"warning",text:"Requires Cursor Pro account to use this feature."},{type:"cloudCheck",text:"Cursor routes requests through its own server, so local endpoint is not supported. Please enable Cloud Endpoint in Settings."}],guideSteps:[{step:1,title:"Open Settings",desc:"Go to Settings → Models"},{step:2,title:"Enable OpenAI API",desc:'Enable "OpenAI API key" option'},{step:3,title:"Base URL",value:"{{baseUrl}}",copyable:!0},{step:4,title:"API Key",type:"apiKeySelector"},{step:5,title:"Add Custom Model",desc:'Click "View All Model" → "Add Custom Model"'},{step:6,title:"Select Model",type:"modelSelector"}]},cline:{id:"cline",name:"Cline",image:"/providers/cline.png",color:"#00D1B2",description:"Cline AI Coding Assistant CLI",configType:"custom"},kilo:{id:"kilo",name:"Kilo Code",image:"/providers/kilocode.png",color:"#FF6B6B",description:"Kilo Code AI Assistant CLI",configType:"custom"},continue:{id:"continue",name:"Continue",image:"/providers/continue.png",color:"#7C3AED",description:"Continue AI Assistant",configType:"guide",guideSteps:[{step:1,title:"Open Config",desc:"Open Continue configuration file"},{step:2,title:"API Key",type:"apiKeySelector"},{step:3,title:"Select Model",type:"modelSelector"},{step:4,title:"Add Model Config",desc:"Add the following configuration to your models array:"}],codeBlock:{language:"json",code:`{
|
|
1
|
+
(()=>{var a={};a.id=2326,a.ids=[2326],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},12506:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>g});var d=c(5735),e=c(74864),f=c(27708);async function g(){let a=await (0,e.D1)();return(0,d.jsx)(f.default,{machineId:a})}},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},26713:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/is-bot")},27708:(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.js\" 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.js","default")},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")},33873:a=>{"use strict";a.exports=require("path")},41025:a=>{"use strict";a.exports=require("next/dist/server/app-render/dynamic-access-async-storage.external.js")},43954:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/interception-routes")},48161:a=>{"use strict";a.exports=require("node:os")},55511:a=>{"use strict";a.exports=require("crypto")},59316:(a,b,c)=>{Promise.resolve().then(c.bind(c,92754))},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")},74864:(a,b,c)=>{"use strict";c.d(b,{D1:()=>e});var d=c(22513);async function e(){return await (0,d.Xj)()}},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")},91838:(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(56037),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,12506)),"/home/runner/work/OmniRoute/OmniRoute/src/app/(dashboard)/dashboard/cli-tools/page.js"]}]},{}]},{}]},{layout:[()=>Promise.resolve().then(c.bind(c,68010)),"/home/runner/work/OmniRoute/OmniRoute/src/app/(dashboard)/layout.js"],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,20651)),"/home/runner/work/OmniRoute/OmniRoute/src/app/layout.js"],"global-error":[()=>Promise.resolve().then(c.bind(c,56037)),"/home/runner/work/OmniRoute/OmniRoute/src/app/global-error.js"],"not-found":[()=>Promise.resolve().then(c.bind(c,71569)),"/home/runner/work/OmniRoute/OmniRoute/src/app/not-found.js"],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}`:""}
|
|
2
|
+
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}}},92754:(a,b,c)=>{"use strict";c.d(b,{default:()=>x});var d=c(48249),e=c(67484),f=c(64755);let g={claude:{id:"claude",name:"Claude Code",icon:"terminal",color:"#D97757",description:"Anthropic Claude Code CLI",configType:"env",envVars:{baseUrl:"ANTHROPIC_BASE_URL",model:"ANTHROPIC_MODEL",opusModel:"ANTHROPIC_DEFAULT_OPUS_MODEL",sonnetModel:"ANTHROPIC_DEFAULT_SONNET_MODEL",haikuModel:"ANTHROPIC_DEFAULT_HAIKU_MODEL"},modelAliases:["default","sonnet","opus","haiku","opusplan"],settingsFile:"~/.claude/settings.json",defaultModels:[{id:"opus",name:"Claude Opus",alias:"opus",envKey:"ANTHROPIC_DEFAULT_OPUS_MODEL",defaultValue:"cc/claude-opus-4-5-20251101"},{id:"sonnet",name:"Claude Sonnet",alias:"sonnet",envKey:"ANTHROPIC_DEFAULT_SONNET_MODEL",defaultValue:"cc/claude-sonnet-4-5-20250929"},{id:"haiku",name:"Claude Haiku",alias:"haiku",envKey:"ANTHROPIC_DEFAULT_HAIKU_MODEL",defaultValue:"cc/claude-haiku-4-5-20251001"}]},codex:{id:"codex",name:"OpenAI Codex CLI",image:"/providers/codex.png",color:"#10A37F",description:"OpenAI Codex CLI",configType:"custom"},droid:{id:"droid",name:"Factory Droid",image:"/providers/droid.png",color:"#00D4FF",description:"Factory Droid AI Assistant",configType:"custom"},openclaw:{id:"openclaw",name:"Open Claw",image:"/providers/openclaw.png",color:"#FF6B35",description:"Open Claw AI Assistant",configType:"custom"},cursor:{id:"cursor",name:"Cursor",image:"/providers/cursor.png",color:"#000000",description:"Cursor AI Code Editor",configType:"guide",requiresCloud:!0,notes:[{type:"warning",text:"Requires Cursor Pro account to use this feature."},{type:"cloudCheck",text:"Cursor routes requests through its own server, so local endpoint is not supported. Please enable Cloud Endpoint in Settings."}],guideSteps:[{step:1,title:"Open Settings",desc:"Go to Settings → Models"},{step:2,title:"Enable OpenAI API",desc:'Enable "OpenAI API key" option'},{step:3,title:"Base URL",value:"{{baseUrl}}",copyable:!0},{step:4,title:"API Key",type:"apiKeySelector"},{step:5,title:"Add Custom Model",desc:'Click "View All Model" → "Add Custom Model"'},{step:6,title:"Select Model",type:"modelSelector"}]},cline:{id:"cline",name:"Cline",image:"/providers/cline.png",color:"#00D1B2",description:"Cline AI Coding Assistant CLI",configType:"custom"},kilo:{id:"kilo",name:"Kilo Code",image:"/providers/kilocode.png",color:"#FF6B6B",description:"Kilo Code AI Assistant CLI",configType:"custom"},continue:{id:"continue",name:"Continue",image:"/providers/continue.png",color:"#7C3AED",description:"Continue AI Assistant",configType:"guide",guideSteps:[{step:1,title:"Open Config",desc:"Open Continue configuration file"},{step:2,title:"API Key",type:"apiKeySelector"},{step:3,title:"Select Model",type:"modelSelector"},{step:4,title:"Add Model Config",desc:"Add the following configuration to your models array:"}],codeBlock:{language:"json",code:`{
|
|
2
3
|
"apiBase": "{{baseUrl}}",
|
|
3
4
|
"title": "{{model}}",
|
|
4
5
|
"model": "{{model}}",
|
|
5
6
|
"provider": "openai",
|
|
6
7
|
"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-5-thinking","claude-sonnet-4-5-thinking","claude-sonnet-4-5","gemini-3-pro-high"],defaultModels:[{id:"claude-opus-4-5-thinking",name:"Claude Opus 4.5 Thinking",alias:"claude-opus-4-5-thinking"},{id:"claude-sonnet-4-5-thinking",name:"Claude Sonnet 4.5 Thinking",alias:"claude-sonnet-4-5-thinking"},{id:"claude-sonnet-4-5",name:"Claude Sonnet 4.5",alias:"claude-sonnet-4-5"},{id:"gemini-3-pro-high",name:"Gemini 3 Pro High",alias:"gemini-3-pro-high"},{id:"gemini-3-flash",name:"Gemini 3 Flash",alias:"gemini-3-flash"}]}};var h=c(15637),i=c(81220);let j=process.env.NEXT_PUBLIC_CLOUD_URL;function k({tool:a,isExpanded:b,onToggle:c,activeProviders:g,modelMappings:h,onModelMappingChange:k,baseUrl:l,hasActiveProviders:m,apiKeys:n,cloudEnabled:o}){let p,q,r,[s,t]=(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)(!1),[E,F]=(0,e.useState)(!1),[G,H]=(0,e.useState)(null),[I,J]=(0,e.useState)(""),[K,L]=(0,e.useState)({}),[M,N]=(0,e.useState)(!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=!!(s?.installed&&s?.runnable),X=(()=>{if(!W)return null;let a=s.settings?.env?.ANTHROPIC_BASE_URL;if(!a)return"not_configured";let b=a.includes("localhost")||a.includes("127.0.0.1"),c=o&&j&&a.startsWith(j);return b||c?"configured":"other"})(),Y=async()=>{v(!0);try{let a=await fetch("/api/cli-tools/claude-settings"),b=await a.json();t(b)}catch(a){t({installed:!1,error:a.message})}finally{v(!1)}},Z=()=>{let a=O||l;return a.endsWith("/v1")?a:`${a}/v1`},$=async()=>{x(!0),B(null);try{let b={ANTHROPIC_BASE_URL:Z()},c=I?.trim()||(n?.length>0?n[0].key:null)||(o?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?(B({type:"success",text:"Settings applied successfully!"}),t(a=>({...a,hasBackup:!0,settings:{...a?.settings,env:b}}))):B({type:"error",text:e.error||"Failed to apply settings"})}catch(a){B({type:"error",text:a.message})}finally{x(!1)}},_=async()=>{z(!0),B(null);try{let b=await fetch("/api/cli-tools/claude-settings",{method:"DELETE"}),c=await b.json();b.ok?(B({type:"success",text:"Settings reset successfully!"}),a.defaultModels.forEach(a=>k(a.alias,a.defaultValue||"")),J("")):B({type:"error",text:c.error||"Failed to reset settings"})}catch(a){B({type:"error",text:a.message})}finally{z(!1)}},aa=async()=>{try{let a=await fetch("/api/cli-tools/backups?tool=claude"),b=await a.json();a.ok&&R(b.backups||[])}catch(a){console.log("Error fetching backups:",a)}},ab=async a=>{V(a),B(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?(B({type:"success",text:"Backup restored!"}),Y(),aa()):B({type:"error",text:c.error||"Failed to restore"})}catch(a){B({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/claude.png",alt:a.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:a=>{a.target.style.display="none"}})}),(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}),"configured"===X&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-green-500/10 text-green-600 dark:text-green-400 rounded-full",children:"Connected"}),"not_configured"===X&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-yellow-500/10 text-yellow-600 dark:text-yellow-400 rounded-full",children:"Not configured"}),"other"===X&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-blue-500/10 text-blue-600 dark:text-blue-400 rounded-full",children:"Other"})]}),(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:a.description})]})]}),(0,d.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${b?"rotate-180":""}`,children:"expand_more"})]}),b&&(0,d.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[u&&(0,d.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,d.jsx)("span",{children:"Checking Claude CLI..."})]}),!u&&s&&!W&&(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:s.installed?"Claude CLI not runnable":"Claude CLI not installed"}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:s.installed?`Claude CLI was found but failed runtime healthcheck${s.reason?` (${s.reason})`:""}.`:"Please install Claude CLI to use this feature."})]}),(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:()=>D(!C),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:C?"expand_less":"help"}),C?"Hide":"How to Install"]})]}),C&&(0,d.jsxs)("div",{className:"p-4 bg-surface border border-border rounded-lg",children:[(0,d.jsx)("h4",{className:"font-medium mb-3",children:"Installation Guide"}),(0,d.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"text-text-muted mb-1",children:"macOS / Linux / Windows:"}),(0,d.jsx)("code",{className:"block px-3 py-2 bg-black/5 dark:bg-white/5 rounded font-mono text-xs",children:"npm install -g @anthropic-ai/claude-code"})]}),(0,d.jsxs)("p",{className:"text-text-muted",children:["After installation, run"," ",(0,d.jsx)("code",{className:"px-1 bg-black/5 dark:bg-white/5 rounded",children:"claude"})," to verify."]})]})]})]}),!u&&W&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[s?.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:"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:s.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:"Base URL"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("input",{type:"text",value:(p=O||l).endsWith("/v1")?p:`${p}/v1`,onChange:a=>P(a.target.value),placeholder:"https://.../v1",className:"flex-1 px-2 py-1.5 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"}),O&&O!==l&&(0,d.jsx)("button",{onClick:()=>P(""),className:"p-1 text-text-muted hover:text-primary rounded transition-colors",title:"Reset to default",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:"API Key"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),n.length>0?(0,d.jsx)("select",{value:I,onChange:a=>J(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:n.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:o?"No API keys - Create one in Keys page":"sk_omniroute (default)"})]}),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:"provider/model-id",className:"flex-1 px-2 py-1.5 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"}),(0,d.jsx)("button",{onClick:()=>{H(a.alias),F(!0)},disabled:!m,className:`px-2 py-1.5 rounded border text-xs transition-colors shrink-0 whitespace-nowrap ${m?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select Model"}),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:"Clear",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]},a.alias))]}),A&&(0,d.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===A.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===A.type?"check_circle":"error"}),(0,d.jsx)("span",{children:A.text})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsxs)(f.$n,{variant:"primary",size:"sm",onClick:$,disabled:!m,loading:w,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:_,disabled:!s?.hasOmniRoute,loading:y,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,d.jsxs)(f.$n,{variant:"ghost",size:"sm",onClick:()=>N(!0),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]}),(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"}),"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"}),"Config Backups"]}),0===Q.length?(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"No backups yet. Backups are created automatically before each Apply or Reset."}):(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?"...":"Restore"})]},a.id))})]})]})]}),(0,d.jsx)(f.rq,{isOpen:E,onClose:()=>F(!1),onSelect:a=>{G&&k(G,a.value)},selectedModel:G?h[G]:null,activeProviders:g,modelAliases:K,title:`Select model for ${G}`}),(0,d.jsx)(f.uR,{isOpen:M,onClose:()=>N(!1),title:"Claude CLI - Manual Configuration",configs:(q=I&&I.trim()?I:o?"<API_KEY_FROM_DASHBOARD>":"sk_omniroute",r={ANTHROPIC_BASE_URL:Z(),ANTHROPIC_AUTH_TOKEN:q},a.defaultModels.forEach(a=>{let b=h[a.alias];b&&a.envKey&&(r[a.envKey]=b)}),[{filename:"~/.claude/settings.json",content:JSON.stringify({env:r},null,2)}])})]})}function l({tool:a,isExpanded:b,onToggle:c,baseUrl:g,apiKeys:h,activeProviders:j,cloudEnabled:k}){let l,m,n,[o,p]=(0,e.useState)(null),[q,r]=(0,e.useState)(!1),[s,t]=(0,e.useState)(!1),[u,v]=(0,e.useState)(!1),[w,x]=(0,e.useState)(null),[y,z]=(0,e.useState)(!1),[A,B]=(0,e.useState)(""),[C,D]=(0,e.useState)(""),[E,F]=(0,e.useState)(!1),[G,H]=(0,e.useState)({}),[I,J]=(0,e.useState)(!1),[K,L]=(0,e.useState)(""),[M,N]=(0,e.useState)([]),[O,P]=(0,e.useState)(!1),[Q,R]=(0,e.useState)(""),[S,T]=(0,e.useState)(!1),[U,V]=(0,e.useState)(null),[W,X]=(0,e.useState)([]),[Y,Z]=(0,e.useState)(!1),[$,_]=(0,e.useState)(null),aa=!!(o?.installed&&o?.runnable),ab=aa?o.config?o.config.includes(g)||o.config.includes("localhost")||o.config.includes("127.0.0.1")?"configured":"other":"not_configured":null,ac=()=>{let a=K||`${g}/v1`;return a.endsWith("/v1")?a:`${a}/v1`},ad=async()=>{r(!0);try{let a=await fetch("/api/cli-tools/codex-settings"),b=await a.json();p(b)}catch(a){p({installed:!1,error:a.message})}finally{r(!1)}},ae=async()=>{t(!0),x(null);try{let a=A&&A.trim()||k?A:"sk_omniroute",b=await fetch("/api/cli-tools/codex-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:ac(),apiKey:a,model:C})}),c=await b.json();b.ok?(x({type:"success",text:"Settings applied successfully!"}),ad()):x({type:"error",text:c.error||"Failed to apply settings"})}catch(a){x({type:"error",text:a.message})}finally{t(!1)}},af=async()=>{v(!0),x(null);try{let a=await fetch("/api/cli-tools/codex-settings",{method:"DELETE"}),b=await a.json();a.ok?(x({type:"success",text:"Settings reset successfully!"}),D(""),ad()):x({type:"error",text:b.error||"Failed to reset settings"})}catch(a){x({type:"error",text:a.message})}finally{v(!1)}},ag=async()=>{try{let a=await fetch("/api/cli-tools/codex-profiles"),b=await a.json();a.ok&&N(b.profiles||[])}catch(a){console.log("Error fetching profiles:",a)}},ah=async()=>{if(Q.trim()){T(!0),x(null);try{let a=await fetch("/api/cli-tools/codex-profiles",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:Q.trim()})}),b=await a.json();a.ok?(x({type:"success",text:`Profile "${Q}" saved!`}),R(""),ag()):x({type:"error",text:b.error||"Failed to save profile"})}catch(a){x({type:"error",text:a.message})}finally{T(!1)}}},ai=async a=>{V(a),x(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?(x({type:"success",text:c.message||"Profile activated!"}),ad(),ak()):x({type:"error",text:c.error||"Failed to activate profile"})}catch(a){x({type:"error",text:a.message})}finally{V(null)}},aj=async a=>{try{(await fetch("/api/cli-tools/codex-profiles",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({profileId:a})})).ok&&ag()}catch(a){console.log("Error deleting profile:",a)}},ak=async()=>{try{let a=await fetch("/api/cli-tools/backups?tool=codex"),b=await a.json();a.ok&&X(b.backups||[])}catch(a){console.log("Error fetching backups:",a)}},al=async a=>{_(a),x(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?(x({type:"success",text:"Backup restored!"}),ad(),ak()):x({type:"error",text:c.error||"Failed to restore"})}catch(a){x({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/codex.png",alt:a.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:a=>{a.target.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}),"configured"===ab&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-green-500/10 text-green-600 dark:text-green-400 rounded-full",children:"Connected"}),"not_configured"===ab&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-yellow-500/10 text-yellow-600 dark:text-yellow-400 rounded-full",children:"Not configured"}),"other"===ab&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-blue-500/10 text-blue-600 dark:text-blue-400 rounded-full",children:"Other"})]}),(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:a.description})]})]}),(0,d.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${b?"rotate-180":""}`,children:"expand_more"})]}),b&&(0,d.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[q&&(0,d.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,d.jsx)("span",{children:"Checking Codex CLI..."})]}),!q&&o&&!aa&&(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:o.installed?"Codex CLI not runnable":"Codex CLI not installed"}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:o.installed?`Codex CLI was found but failed runtime healthcheck${o.reason?` (${o.reason})`:""}.`:"Please install Codex CLI to use auto-apply feature."})]}),(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:()=>z(!y),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:y?"expand_less":"help"}),y?"Hide":"How to Install"]})]}),y&&(0,d.jsxs)("div",{className:"p-4 bg-surface border border-border rounded-lg",children:[(0,d.jsx)("h4",{className:"font-medium mb-3",children:"Installation Guide"}),(0,d.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"text-text-muted mb-1",children:"macOS / Linux / Windows:"}),(0,d.jsx)("code",{className:"block px-3 py-2 bg-black/5 dark:bg-white/5 rounded font-mono text-xs",children:"npm install -g @openai/codex"})]}),(0,d.jsxs)("p",{className:"text-text-muted",children:["After installation, run"," ",(0,d.jsx)("code",{className:"px-1 bg-black/5 dark:bg-white/5 rounded",children:"codex"})," to verify."]}),(0,d.jsx)("div",{className:"pt-2 border-t border-border",children:(0,d.jsxs)("p",{className:"text-text-muted text-xs",children:["Codex uses"," ",(0,d.jsx)("code",{className:"px-1 bg-black/5 dark:bg-white/5 rounded",children:"~/.codex/auth.json"})," ","with"," ",(0,d.jsx)("code",{className:"px-1 bg-black/5 dark:bg-white/5 rounded",children:"OPENAI_API_KEY"}),'. Click "Apply" to auto-configure.']})})]})]})]}),!q&&aa&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[o?.config&&((m=(l=o.config.match(/base_url\s*=\s*"([^"]+)"/))?l[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:"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:m})]}):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:"Base URL"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("input",{type:"text",value:K||`${g}/v1`,onChange:a=>L(a.target.value),placeholder:"https://.../v1",className:"flex-1 px-2 py-1.5 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"}),K&&K!==`${g}/v1`&&(0,d.jsx)("button",{onClick:()=>L(""),className:"p-1 text-text-muted hover:text-primary rounded transition-colors",title:"Reset to default",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:"API Key"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),h.length>0?(0,d.jsx)("select",{value:A,onChange:a=>B(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:k?"No API keys - Create one in Keys page":"sk_omniroute (default)"})]}),(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:"Model"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("input",{type:"text",value:C,onChange:a=>D(a.target.value),placeholder:"provider/model-id",className:"flex-1 px-2 py-1.5 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"}),(0,d.jsx)("button",{onClick:()=>F(!0),disabled:!j?.length,className:`px-2 py-1.5 rounded border text-xs transition-colors shrink-0 whitespace-nowrap ${j?.length?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select Model"}),C&&(0,d.jsx)("button",{onClick:()=>D(""),className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})]}),w&&(0,d.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===w.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"===w.type?"check_circle":"error"}),(0,d.jsx)("span",{children:w.text})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsxs)(f.$n,{variant:"primary",size:"sm",onClick:ae,disabled:!A||!C,loading:s,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:af,disabled:!o.hasOmniRoute,loading:u,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,d.jsxs)(f.$n,{variant:"ghost",size:"sm",onClick:()=>J(!0),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]}),(0,d.jsx)("div",{className:"flex-1"}),(0,d.jsxs)(f.$n,{variant:"ghost",size:"sm",onClick:()=>{P(!O),O||ag()},children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"manage_accounts"}),"Profiles"]}),(0,d.jsxs)(f.$n,{variant:"ghost",size:"sm",onClick:()=>{Z(!Y),Y||ak()},children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"history"}),"Backups",W.length>0&&` (${W.length})`]})]}),O&&(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"}),"Saved Profiles"]}),0===M.length?(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"No profiles saved yet. Save current config as a profile below."}):(0,d.jsx)("div",{className:"space-y-1.5 mb-3",children:M.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:()=>ai(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?"...":"Activate"}),(0,d.jsx)("button",{onClick:()=>aj(a.id),className:"p-0.5 text-text-muted hover:text-red-500 transition-colors",title:"Delete profile",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:Q,onChange:a=>R(a.target.value),placeholder:"Profile name (e.g. Personal Account)",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&&ah()}),(0,d.jsxs)(f.$n,{variant:"primary",size:"sm",onClick:ah,disabled:!Q.trim(),loading:S,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Save Current"]})]})]}),Y&&(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"}),"Config Backups"]}),0===W.length?(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"No backups yet. Backups are created automatically before each Apply or Reset."}):(0,d.jsx)("div",{className:"space-y-1.5",children:W.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:()=>al(a.id),disabled:$===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:$===a.id?"...":"Restore"})]},a.id))})]})]})]}),(0,d.jsx)(f.rq,{isOpen:E,onClose:()=>F(!1),onSelect:a=>{D(a.value),F(!1)},selectedModel:C,activeProviders:j,modelAliases:G,title:"Select Model for Codex"}),(0,d.jsx)(f.uR,{isOpen:I,onClose:()=>J(!1),title:"Codex CLI - Manual Configuration",configs:(n=A&&A.trim()?A:k?"<API_KEY_FROM_DASHBOARD>":"sk_omniroute",[{filename:"~/.codex/config.toml",content:`# OmniRoute Configuration for Codex CLI
|
|
8
|
-
model = "${
|
|
8
|
+
}`}},antigravity:{id:"antigravity",name:"Antigravity",image:"/providers/antigravity.png",color:"#4285F4",description:"Google Antigravity IDE with MITM",configType:"mitm",modelAliases:["claude-opus-4-5-thinking","claude-sonnet-4-5-thinking","claude-sonnet-4-5","gemini-3-pro-high"],defaultModels:[{id:"claude-opus-4-5-thinking",name:"Claude Opus 4.5 Thinking",alias:"claude-opus-4-5-thinking"},{id:"claude-sonnet-4-5-thinking",name:"Claude Sonnet 4.5 Thinking",alias:"claude-sonnet-4-5-thinking"},{id:"claude-sonnet-4-5",name:"Claude Sonnet 4.5",alias:"claude-sonnet-4-5"},{id:"gemini-3-pro-high",name:"Gemini 3 Pro High",alias:"gemini-3-pro-high"},{id:"gemini-3-flash",name:"Gemini 3 Flash",alias:"gemini-3-flash"}]}};var h=c(15637),i=c(81220);function j({effectiveConfigStatus:a,batchStatus:b}){let c=a||b?.configStatus||null;if(!c)return null;let e={configured:{dotClass:"bg-green-500",badgeClass:"bg-green-500/10 text-green-600 dark:text-green-400",text:"Configured"},not_configured:{dotClass:"bg-yellow-500",badgeClass:"bg-yellow-500/10 text-yellow-600 dark:text-yellow-400",text:"Not configured"},not_installed:{dotClass:"bg-zinc-400 dark:bg-zinc-500",badgeClass:"bg-zinc-500/10 text-zinc-500 dark:text-zinc-400",text:"Not installed"},other:{dotClass:"bg-blue-500",badgeClass:"bg-blue-500/10 text-blue-600 dark:text-blue-400",text:"Custom"},unknown:{dotClass:"bg-zinc-400 dark:bg-zinc-500",badgeClass:"bg-zinc-500/10 text-zinc-500 dark:text-zinc-400",text:"Unknown"}},f=e[c]||e.unknown;return(0,d.jsxs)("span",{className:`inline-flex items-center gap-1.5 px-2 py-0.5 text-[11px] font-medium rounded-full ${f.badgeClass}`,children:[(0,d.jsx)("span",{className:`size-1.5 rounded-full ${f.dotClass}`}),f.text]})}let k=process.env.NEXT_PUBLIC_CLOUD_URL;function l({tool:a,isExpanded:b,onToggle:c,activeProviders:g,modelMappings:h,onModelMappingChange:l,baseUrl:m,hasActiveProviders:n,apiKeys:o,cloudEnabled:p,batchStatus:q}){let r,s,t,[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)(!1),[G,H]=(0,e.useState)(!1),[I,J]=(0,e.useState)(null),[K,L]=(0,e.useState)(""),[M,N]=(0,e.useState)({}),[O,P]=(0,e.useState)(!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=!!(u?.installed&&u?.runnable),Z=(()=>{if(!Y)return null;let a=u.settings?.env?.ANTHROPIC_BASE_URL;if(!a)return"not_configured";let b=a.includes("localhost")||a.includes("127.0.0.1"),c=p&&k&&a.startsWith(k);return b||c?"configured":"other"})()||q?.configStatus||null,$=async()=>{x(!0);try{let a=await fetch("/api/cli-tools/claude-settings"),b=await a.json();v(b)}catch(a){v({installed:!1,error:a.message})}finally{x(!1)}},_=()=>{let a=Q||m;return a.endsWith("/v1")?a:`${a}/v1`},aa=async()=>{z(!0),D(null);try{let b={ANTHROPIC_BASE_URL:_()},c=K?.trim()||(o?.length>0?o[0].key:null)||(p?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?(D({type:"success",text:"Settings applied successfully!"}),v(a=>({...a,hasBackup:!0,settings:{...a?.settings,env:b}}))):D({type:"error",text:e.error||"Failed to apply settings"})}catch(a){D({type:"error",text:a.message})}finally{z(!1)}},ab=async()=>{B(!0),D(null);try{let b=await fetch("/api/cli-tools/claude-settings",{method:"DELETE"}),c=await b.json();b.ok?(D({type:"success",text:"Settings reset successfully!"}),a.defaultModels.forEach(a=>l(a.alias,a.defaultValue||"")),L("")):D({type:"error",text:c.error||"Failed to reset settings"})}catch(a){D({type:"error",text:a.message})}finally{B(!1)}},ac=async()=>{try{let a=await fetch("/api/cli-tools/backups?tool=claude"),b=await a.json();a.ok&&T(b.backups||[])}catch(a){console.log("Error fetching backups:",a)}},ad=async a=>{X(a),D(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?(D({type:"success",text:"Backup restored!"}),$(),ac()):D({type:"error",text:c.error||"Failed to restore"})}catch(a){D({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/claude.png",alt:a.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:a=>{a.target.style.display="none"}})}),(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)(j,{effectiveConfigStatus:Z,batchStatus:q})]}),(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:a.description})]})]}),(0,d.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${b?"rotate-180":""}`,children:"expand_more"})]}),b&&(0,d.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[w&&(0,d.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,d.jsx)("span",{children:"Checking Claude CLI..."})]}),!w&&u&&!Y&&(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:u.installed?"Claude CLI not runnable":"Claude CLI not installed"}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:u.installed?`Claude CLI was found but failed runtime healthcheck${u.reason?` (${u.reason})`:""}.`:"Please install Claude CLI to use this feature."})]}),(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:()=>F(!E),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:E?"expand_less":"help"}),E?"Hide":"How to Install"]})]}),E&&(0,d.jsxs)("div",{className:"p-4 bg-surface border border-border rounded-lg",children:[(0,d.jsx)("h4",{className:"font-medium mb-3",children:"Installation Guide"}),(0,d.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"text-text-muted mb-1",children:"macOS / Linux / Windows:"}),(0,d.jsx)("code",{className:"block px-3 py-2 bg-black/5 dark:bg-white/5 rounded font-mono text-xs",children:"npm install -g @anthropic-ai/claude-code"})]}),(0,d.jsxs)("p",{className:"text-text-muted",children:["After installation, run"," ",(0,d.jsx)("code",{className:"px-1 bg-black/5 dark:bg-white/5 rounded",children:"claude"})," to verify."]})]})]})]}),!w&&Y&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[u?.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:"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.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:"Base URL"}),(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||m).endsWith("/v1")?r:`${r}/v1`,onChange:a=>R(a.target.value),placeholder:"https://.../v1",className:"flex-1 px-2 py-1.5 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"}),Q&&Q!==m&&(0,d.jsx)("button",{onClick:()=>R(""),className:"p-1 text-text-muted hover:text-primary rounded transition-colors",title:"Reset to default",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:"API Key"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),o.length>0?(0,d.jsx)("select",{value:K,onChange:a=>L(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:o.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:p?"No API keys - Create one in Keys page":"sk_omniroute (default)"})]}),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=>l(a.alias,b.target.value),placeholder:"provider/model-id",className:"flex-1 px-2 py-1.5 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"}),(0,d.jsx)("button",{onClick:()=>{J(a.alias),H(!0)},disabled:!n,className:`px-2 py-1.5 rounded border text-xs transition-colors shrink-0 whitespace-nowrap ${n?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select Model"}),h[a.alias]&&(0,d.jsx)("button",{onClick:()=>l(a.alias,""),className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]},a.alias))]}),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:aa,disabled:!n,loading:y,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:ab,disabled:!u?.hasOmniRoute,loading:A,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,d.jsxs)(f.$n,{variant:"ghost",size:"sm",onClick:()=>P(!0),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]}),(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"}),"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"}),"Config Backups"]}),0===S.length?(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"No backups yet. Backups are created automatically before each Apply or Reset."}):(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?"...":"Restore"})]},a.id))})]})]})]}),(0,d.jsx)(f.rq,{isOpen:G,onClose:()=>H(!1),onSelect:a=>{I&&l(I,a.value)},selectedModel:I?h[I]:null,activeProviders:g,modelAliases:M,title:`Select model for ${I}`}),(0,d.jsx)(f.uR,{isOpen:O,onClose:()=>P(!1),title:"Claude CLI - Manual Configuration",configs:(s=K&&K.trim()?K:p?"<API_KEY_FROM_DASHBOARD>":"sk_omniroute",t={ANTHROPIC_BASE_URL:_(),ANTHROPIC_AUTH_TOKEN:s},a.defaultModels.forEach(a=>{let b=h[a.alias];b&&a.envKey&&(t[a.envKey]=b)}),[{filename:"~/.claude/settings.json",content:JSON.stringify({env:t},null,2)}])})]})}function m({tool:a,isExpanded:b,onToggle:c,baseUrl:g,apiKeys:h,activeProviders:k,cloudEnabled:l,batchStatus:m}){let n,o,p,[q,r]=(0,e.useState)(null),[s,t]=(0,e.useState)(!1),[u,v]=(0,e.useState)(!1),[w,x]=(0,e.useState)(!1),[y,z]=(0,e.useState)(null),[A,B]=(0,e.useState)(!1),[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,P]=(0,e.useState)([]),[Q,R]=(0,e.useState)(!1),[S,T]=(0,e.useState)(""),[U,V]=(0,e.useState)(!1),[W,X]=(0,e.useState)(null),[Y,Z]=(0,e.useState)([]),[$,_]=(0,e.useState)(!1),[aa,ab]=(0,e.useState)(null),ac=!!(q?.installed&&q?.runnable),ad=(ac?q.config?q.config.includes(g)||q.config.includes("localhost")||q.config.includes("127.0.0.1")?"configured":"other":"not_configured":null)||m?.configStatus||null,ae=()=>{let a=M||`${g}/v1`;return a.endsWith("/v1")?a:`${a}/v1`},af=async()=>{t(!0);try{let a=await fetch("/api/cli-tools/codex-settings"),b=await a.json();r(b)}catch(a){r({installed:!1,error:a.message})}finally{t(!1)}},ag=async()=>{v(!0),z(null);try{let a=C&&C.trim()||l?C:"sk_omniroute",b=await fetch("/api/cli-tools/codex-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:ae(),apiKey:a,model:E})}),c=await b.json();b.ok?(z({type:"success",text:"Settings applied successfully!"}),af()):z({type:"error",text:c.error||"Failed to apply settings"})}catch(a){z({type:"error",text:a.message})}finally{v(!1)}},ah=async()=>{x(!0),z(null);try{let a=await fetch("/api/cli-tools/codex-settings",{method:"DELETE"}),b=await a.json();a.ok?(z({type:"success",text:"Settings reset successfully!"}),F(""),af()):z({type:"error",text:b.error||"Failed to reset settings"})}catch(a){z({type:"error",text:a.message})}finally{x(!1)}},ai=async()=>{try{let a=await fetch("/api/cli-tools/codex-profiles"),b=await a.json();a.ok&&P(b.profiles||[])}catch(a){console.log("Error fetching profiles:",a)}},aj=async()=>{if(S.trim()){V(!0),z(null);try{let a=await fetch("/api/cli-tools/codex-profiles",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:S.trim()})}),b=await a.json();a.ok?(z({type:"success",text:`Profile "${S}" saved!`}),T(""),ai()):z({type:"error",text:b.error||"Failed to save profile"})}catch(a){z({type:"error",text:a.message})}finally{V(!1)}}},ak=async a=>{X(a),z(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?(z({type:"success",text:c.message||"Profile activated!"}),af(),am()):z({type:"error",text:c.error||"Failed to activate profile"})}catch(a){z({type:"error",text:a.message})}finally{X(null)}},al=async a=>{try{(await fetch("/api/cli-tools/codex-profiles",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({profileId:a})})).ok&&ai()}catch(a){console.log("Error deleting profile:",a)}},am=async()=>{try{let a=await fetch("/api/cli-tools/backups?tool=codex"),b=await a.json();a.ok&&Z(b.backups||[])}catch(a){console.log("Error fetching backups:",a)}},an=async a=>{ab(a),z(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?(z({type:"success",text:"Backup restored!"}),af(),am()):z({type:"error",text:c.error||"Failed to restore"})}catch(a){z({type:"error",text:a.message})}finally{ab(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.target.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)(j,{effectiveConfigStatus:ad,batchStatus:m})]}),(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:a.description})]})]}),(0,d.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${b?"rotate-180":""}`,children:"expand_more"})]}),b&&(0,d.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[s&&(0,d.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,d.jsx)("span",{children:"Checking Codex CLI..."})]}),!s&&q&&!ac&&(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:q.installed?"Codex CLI not runnable":"Codex CLI not installed"}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:q.installed?`Codex CLI was found but failed runtime healthcheck${q.reason?` (${q.reason})`:""}.`:"Please install Codex CLI to use auto-apply feature."})]}),(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:()=>B(!A),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:A?"expand_less":"help"}),A?"Hide":"How to Install"]})]}),A&&(0,d.jsxs)("div",{className:"p-4 bg-surface border border-border rounded-lg",children:[(0,d.jsx)("h4",{className:"font-medium mb-3",children:"Installation Guide"}),(0,d.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"text-text-muted mb-1",children:"macOS / Linux / Windows:"}),(0,d.jsx)("code",{className:"block px-3 py-2 bg-black/5 dark:bg-white/5 rounded font-mono text-xs",children:"npm install -g @openai/codex"})]}),(0,d.jsxs)("p",{className:"text-text-muted",children:["After installation, run"," ",(0,d.jsx)("code",{className:"px-1 bg-black/5 dark:bg-white/5 rounded",children:"codex"})," to verify."]}),(0,d.jsx)("div",{className:"pt-2 border-t border-border",children:(0,d.jsxs)("p",{className:"text-text-muted text-xs",children:["Codex uses"," ",(0,d.jsx)("code",{className:"px-1 bg-black/5 dark:bg-white/5 rounded",children:"~/.codex/auth.json"})," ","with"," ",(0,d.jsx)("code",{className:"px-1 bg-black/5 dark:bg-white/5 rounded",children:"OPENAI_API_KEY"}),'. Click "Apply" to auto-configure.']})})]})]})]}),!s&&ac&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[q?.config&&((o=(n=q.config.match(/base_url\s*=\s*"([^"]+)"/))?n[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:"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:o})]}):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:"Base URL"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("input",{type:"text",value:M||`${g}/v1`,onChange:a=>N(a.target.value),placeholder:"https://.../v1",className:"flex-1 px-2 py-1.5 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"}),M&&M!==`${g}/v1`&&(0,d.jsx)("button",{onClick:()=>N(""),className:"p-1 text-text-muted hover:text-primary rounded transition-colors",title:"Reset to default",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:"API Key"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),h.length>0?(0,d.jsx)("select",{value:C,onChange:a=>D(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:l?"No API keys - Create one in Keys page":"sk_omniroute (default)"})]}),(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:"Model"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("input",{type:"text",value:E,onChange:a=>F(a.target.value),placeholder:"provider/model-id",className:"flex-1 px-2 py-1.5 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"}),(0,d.jsx)("button",{onClick:()=>H(!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:"Select Model"}),E&&(0,d.jsx)("button",{onClick:()=>F(""),className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})]}),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 gap-2",children:[(0,d.jsxs)(f.$n,{variant:"primary",size:"sm",onClick:ag,disabled:!C||!E,loading:u,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:ah,disabled:!q.hasOmniRoute,loading:w,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,d.jsxs)(f.$n,{variant:"ghost",size:"sm",onClick:()=>L(!0),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]}),(0,d.jsx)("div",{className:"flex-1"}),(0,d.jsxs)(f.$n,{variant:"ghost",size:"sm",onClick:()=>{R(!Q),Q||ai()},children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"manage_accounts"}),"Profiles"]}),(0,d.jsxs)(f.$n,{variant:"ghost",size:"sm",onClick:()=>{_(!$),$||am()},children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"history"}),"Backups",Y.length>0&&` (${Y.length})`]})]}),Q&&(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"}),"Saved Profiles"]}),0===O.length?(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"No profiles saved yet. Save current config as a profile below."}):(0,d.jsx)("div",{className:"space-y-1.5 mb-3",children:O.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:()=>ak(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?"...":"Activate"}),(0,d.jsx)("button",{onClick:()=>al(a.id),className:"p-0.5 text-text-muted hover:text-red-500 transition-colors",title:"Delete profile",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:S,onChange:a=>T(a.target.value),placeholder:"Profile name (e.g. Personal Account)",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&&aj()}),(0,d.jsxs)(f.$n,{variant:"primary",size:"sm",onClick:aj,disabled:!S.trim(),loading:U,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Save Current"]})]})]}),$&&(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"}),"Config Backups"]}),0===Y.length?(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"No backups yet. Backups are created automatically before each Apply or Reset."}):(0,d.jsx)("div",{className:"space-y-1.5",children:Y.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:()=>an(a.id),disabled:aa===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:aa===a.id?"...":"Restore"})]},a.id))})]})]})]}),(0,d.jsx)(f.rq,{isOpen:G,onClose:()=>H(!1),onSelect:a=>{F(a.value),H(!1)},selectedModel:E,activeProviders:k,modelAliases:I,title:"Select Model for Codex"}),(0,d.jsx)(f.uR,{isOpen:K,onClose:()=>L(!1),title:"Codex CLI - Manual Configuration",configs:(p=C&&C.trim()?C:l?"<API_KEY_FROM_DASHBOARD>":"sk_omniroute",[{filename:"~/.codex/config.toml",content:`# OmniRoute Configuration for Codex CLI
|
|
9
|
+
model = "${E}"
|
|
9
10
|
model_provider = "omniroute"
|
|
10
11
|
|
|
11
12
|
[model_providers.omniroute]
|
|
12
13
|
name = "OmniRoute"
|
|
13
|
-
base_url = "${
|
|
14
|
+
base_url = "${ae()}"
|
|
14
15
|
wire_api = "responses"
|
|
15
|
-
`},{filename:"~/.codex/auth.json",content:JSON.stringify({OPENAI_API_KEY:n},null,2)}])})]})}let m=process.env.NEXT_PUBLIC_CLOUD_URL;function n({tool:a,isExpanded:b,onToggle:c,baseUrl:g,hasActiveProviders:h,apiKeys:j,activeProviders:k,cloudEnabled:l}){let n,o,p,q,[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)("");(0,e.useRef)(!1);let[N,O]=(0,e.useState)([]),[P,Q]=(0,e.useState)(!1),[R,S]=(0,e.useState)(null),T=!!(r?.installed&&r?.runnable),U=(()=>{if(!T)return null;let a=r.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=l&&m&&a.baseUrl?.startsWith(m);return b||c?"configured":"other"})(),V=async()=>{u(!0);try{let a=await fetch("/api/cli-tools/droid-settings"),b=await a.json();s(b)}catch(a){s({installed:!1,error:a.message})}finally{u(!1)}},W=()=>{let a=L||g;return a.endsWith("/v1")?a:`${a}/v1`},X=async()=>{w(!0),A(null);try{let a=B?.trim()||(j?.length>0?j[0].key:null)||(l?null:"sk_omniroute"),b=await fetch("/api/cli-tools/droid-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:W(),apiKey:a,model:D})}),c=await b.json();b.ok?(A({type:"success",text:"Settings applied successfully!"}),V()):A({type:"error",text:c.error||"Failed to apply settings"})}catch(a){A({type:"error",text:a.message})}finally{w(!1)}},Y=async()=>{y(!0),A(null);try{let a=await fetch("/api/cli-tools/droid-settings",{method:"DELETE"}),b=await a.json();a.ok?(A({type:"success",text:"Settings reset successfully!"}),E(""),C(""),V()):A({type:"error",text:b.error||"Failed to reset settings"})}catch(a){A({type:"error",text:a.message})}finally{y(!1)}},Z=async()=>{try{let a=await fetch("/api/cli-tools/backups?tool=droid"),b=await a.json();a.ok&&O(b.backups||[])}catch(a){console.log("Error fetching backups:",a)}},$=async a=>{S(a),A(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?(A({type:"success",text:"Backup restored!"}),V(),Z()):A({type:"error",text:c.error||"Failed to restore"})}catch(a){A({type:"error",text:a.message})}finally{S(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.target.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}),"configured"===U&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-green-500/10 text-green-600 dark:text-green-400 rounded-full",children:"Connected"}),"not_configured"===U&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-yellow-500/10 text-yellow-600 dark:text-yellow-400 rounded-full",children:"Not configured"}),"other"===U&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-blue-500/10 text-blue-600 dark:text-blue-400 rounded-full",children:"Other"})]}),(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:a.description})]})]}),(0,d.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${b?"rotate-180":""}`,children:"expand_more"})]}),b&&(0,d.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[t&&(0,d.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,d.jsx)("span",{children:"Checking Factory Droid CLI..."})]}),!t&&r&&!T&&(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:r.installed?"Factory Droid CLI not runnable":"Factory Droid CLI not installed"}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:r.installed?`Factory Droid CLI was found but failed runtime healthcheck${r.reason?` (${r.reason})`:""}.`:"Please install Factory Droid CLI to use this feature."})]})]}),!t&&T&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[r?.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:"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:r.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:"Base URL"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("input",{type:"text",value:(n=L||g).endsWith("/v1")?n:`${n}/v1`,onChange:a=>M(a.target.value),placeholder:"https://.../v1",className:"flex-1 px-2 py-1.5 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"}),L&&L!==g&&(0,d.jsx)("button",{onClick:()=>M(""),className:"p-1 text-text-muted hover:text-primary rounded transition-colors",title:"Reset to default",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:"API Key"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),j.length>0?(0,d.jsx)("select",{value:B,onChange:a=>C(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:j.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:l?"No API keys - Create one in Keys page":"sk_omniroute (default)"})]}),(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:"Model"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("input",{type:"text",value:D,onChange:a=>E(a.target.value),placeholder:"provider/model-id",className:"flex-1 px-2 py-1.5 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"}),(0,d.jsx)("button",{onClick:()=>G(!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:"Select Model"}),D&&(0,d.jsx)("button",{onClick:()=>E(""),className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})]}),z&&(0,d.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"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-[14px]",children:"success"===z.type?"check_circle":"error"}),(0,d.jsx)("span",{children:z.text})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsxs)(f.$n,{variant:"primary",size:"sm",onClick:X,disabled:!D,loading:v,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:Y,disabled:!r?.hasOmniRoute,loading:x,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,d.jsxs)(f.$n,{variant:"ghost",size:"sm",onClick:()=>K(!0),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]}),(0,d.jsx)("div",{className:"flex-1"}),(0,d.jsxs)(f.$n,{variant:"ghost",size:"sm",onClick:()=>{Q(!P),P||Z()},children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"history"}),"Backups",N.length>0&&` (${N.length})`]})]}),P&&(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"}),"Config Backups"]}),0===N.length?(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"No backups yet. Backups are created automatically before each Apply or Reset."}):(0,d.jsx)("div",{className:"space-y-1.5",children:N.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:()=>$(a.id),disabled:R===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:R===a.id?"...":"Restore"})]},a.id))})]})]})]}),(0,d.jsx)(f.rq,{isOpen:F,onClose:()=>G(!1),onSelect:a=>{E(a.value),G(!1)},selectedModel:D,activeProviders:k,modelAliases:H,title:"Select Model for Factory Droid"}),(0,d.jsx)(f.uR,{isOpen:J,onClose:()=>K(!1),title:"Factory Droid - Manual Configuration",configs:(o=B&&B.trim()?B:l?"<API_KEY_FROM_DASHBOARD>":"sk_omniroute",p={customModels:[{model:D||"provider/model-id",id:"custom:OmniRoute-0",index:0,baseUrl:W(),apiKey:o,displayName:D||"provider/model-id",maxOutputTokens:131072,noImageSupport:!1,provider:"openai"}]},q="u">typeof navigator&&navigator.platform,[{filename:q?.toLowerCase().includes("win")?"%USERPROFILE%\\.factory\\settings.json":"~/.factory/settings.json",content:JSON.stringify(p,null,2)}])})]})}let o=process.env.NEXT_PUBLIC_CLOUD_URL;function p({tool:a,isExpanded:b,onToggle:c,baseUrl:g,hasActiveProviders:h,apiKeys:j,activeProviders:k,cloudEnabled:l}){let m,n,[p,q]=(0,e.useState)(null),[r,s]=(0,e.useState)(!1),[t,u]=(0,e.useState)(!1),[v,w]=(0,e.useState)(!1),[x,y]=(0,e.useState)(null),[z,A]=(0,e.useState)(""),[B,C]=(0,e.useState)(""),[D,E]=(0,e.useState)(!1),[F,G]=(0,e.useState)({}),[H,I]=(0,e.useState)(!1),[J,K]=(0,e.useState)("");(0,e.useRef)(!1);let[L,M]=(0,e.useState)([]),[N,O]=(0,e.useState)(!1),[P,Q]=(0,e.useState)(null),R=!!(p?.installed&&p?.runnable),S=(()=>{if(!R)return null;let a=p.settings?.models?.providers?.omniroute;if(!a)return"not_configured";let b=a.baseUrl?.includes("localhost")||a.baseUrl?.includes("127.0.0.1"),c=l&&o&&a.baseUrl?.startsWith(o);return b||c?"configured":"other"})(),T=async()=>{s(!0);try{let a=await fetch("/api/cli-tools/openclaw-settings"),b=await a.json();q(b)}catch(a){q({installed:!1,error:a.message})}finally{s(!1)}},U=()=>{let a=J||g;return a.endsWith("/v1")?a:`${a}/v1`},V=async()=>{u(!0),y(null);try{let a=z?.trim()||(j?.length>0?j[0].key:null)||(l?null:"sk_omniroute"),b=await fetch("/api/cli-tools/openclaw-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:U(),apiKey:a,model:B})}),c=await b.json();b.ok?(y({type:"success",text:"Settings applied successfully!"}),T()):y({type:"error",text:c.error||"Failed to apply settings"})}catch(a){y({type:"error",text:a.message})}finally{u(!1)}},W=async()=>{w(!0),y(null);try{let a=await fetch("/api/cli-tools/openclaw-settings",{method:"DELETE"}),b=await a.json();a.ok?(y({type:"success",text:"Settings reset successfully!"}),C(""),A(""),T()):y({type:"error",text:b.error||"Failed to reset settings"})}catch(a){y({type:"error",text:a.message})}finally{w(!1)}},X=async()=>{try{let a=await fetch("/api/cli-tools/backups?tool=openclaw"),b=await a.json();a.ok&&M(b.backups||[])}catch(a){console.log("Error fetching backups:",a)}},Y=async a=>{Q(a),y(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?(y({type:"success",text:"Backup restored!"}),T(),X()):y({type:"error",text:c.error||"Failed to restore"})}catch(a){y({type:"error",text:a.message})}finally{Q(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.target.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}),"configured"===S&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-green-500/10 text-green-600 dark:text-green-400 rounded-full",children:"Connected"}),"not_configured"===S&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-yellow-500/10 text-yellow-600 dark:text-yellow-400 rounded-full",children:"Not configured"}),"other"===S&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-blue-500/10 text-blue-600 dark:text-blue-400 rounded-full",children:"Other"})]}),(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:a.description})]})]}),(0,d.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${b?"rotate-180":""}`,children:"expand_more"})]}),b&&(0,d.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[r&&(0,d.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,d.jsx)("span",{children:"Checking Open Claw CLI..."})]}),!r&&p&&!R&&(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:p.installed?"Open Claw CLI not runnable":"Open Claw CLI not installed"}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:p.installed?`Open Claw CLI was found but failed runtime healthcheck${p.reason?` (${p.reason})`:""}.`:"Please install Open Claw CLI to use this feature."})]})]}),!r&&R&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[p?.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:"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:p.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:"Base URL"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("input",{type:"text",value:(m=J||g).endsWith("/v1")?m:`${m}/v1`,onChange:a=>K(a.target.value),placeholder:"https://.../v1",className:"flex-1 px-2 py-1.5 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"}),J&&J!==g&&(0,d.jsx)("button",{onClick:()=>K(""),className:"p-1 text-text-muted hover:text-primary rounded transition-colors",title:"Reset to default",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:"API Key"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),j.length>0?(0,d.jsx)("select",{value:z,onChange:a=>A(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:j.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:l?"No API keys - Create one in Keys page":"sk_omniroute (default)"})]}),(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:"Model"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("input",{type:"text",value:B,onChange:a=>C(a.target.value),placeholder:"provider/model-id",className:"flex-1 px-2 py-1.5 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"}),(0,d.jsx)("button",{onClick:()=>E(!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:"Select Model"}),B&&(0,d.jsx)("button",{onClick:()=>C(""),className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})]}),x&&(0,d.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===x.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"===x.type?"check_circle":"error"}),(0,d.jsx)("span",{children:x.text})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsxs)(f.$n,{variant:"primary",size:"sm",onClick:V,disabled:!B,loading:t,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:W,disabled:!p?.hasOmniRoute,loading:v,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,d.jsxs)(f.$n,{variant:"ghost",size:"sm",onClick:()=>I(!0),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]}),(0,d.jsx)("div",{className:"flex-1"}),(0,d.jsxs)(f.$n,{variant:"ghost",size:"sm",onClick:()=>{O(!N),N||X()},children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"history"}),"Backups",L.length>0&&` (${L.length})`]})]}),N&&(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"}),"Config Backups"]}),0===L.length?(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"No backups yet. Backups are created automatically before each Apply or Reset."}):(0,d.jsx)("div",{className:"space-y-1.5",children:L.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:()=>Y(a.id),disabled:P===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:P===a.id?"...":"Restore"})]},a.id))})]})]})]}),(0,d.jsx)(f.rq,{isOpen:D,onClose:()=>E(!1),onSelect:a=>{C(a.value),E(!1)},selectedModel:B,activeProviders:k,modelAliases:F,title:"Select Model for Open Claw"}),(0,d.jsx)(f.uR,{isOpen:H,onClose:()=>I(!1),title:"Open Claw - Manual Configuration",configs:(n=z&&z.trim()?z:l?"<API_KEY_FROM_DASHBOARD>":"sk_omniroute",[{filename:"~/.openclaw/openclaw.json",content:JSON.stringify({agents:{defaults:{model:{primary:`omniroute/${B||"provider/model-id"}`}}},models:{providers:{omniroute:{baseUrl:U(),apiKey:n,api:"openai-completions",models:[{id:B||"provider/model-id",name:(B||"provider/model-id").split("/").pop()}]}}}},null,2)}])})]})}let q=process.env.NEXT_PUBLIC_CLOUD_URL;function r({tool:a,isExpanded:b,onToggle:c,baseUrl:g,hasActiveProviders:h,apiKeys:j,activeProviders:k,cloudEnabled:l}){let[m,n]=(0,e.useState)(null),[o,p]=(0,e.useState)(!1),[r,s]=(0,e.useState)(!1),[t,u]=(0,e.useState)(!1),[v,w]=(0,e.useState)(null),[x,y]=(0,e.useState)(""),[z,A]=(0,e.useState)(""),[B,C]=(0,e.useState)(!1),[D,E]=(0,e.useState)({}),[F,G]=(0,e.useState)(!1),[H,I]=(0,e.useState)(""),J=(0,e.useRef)(!1),[K,L]=(0,e.useState)([]),[M,N]=(0,e.useState)(!1),[O,P]=(0,e.useState)(null),Q=!!(m?.installed&&m?.runnable),R=(()=>{if(!Q)return null;if(!m.hasOmniRoute)return"not_configured";let a=m.settings?.openAiBaseUrl||"",b=a.includes("localhost")||a.includes("127.0.0.1"),c=l&&q&&a.startsWith(q);return b||c?"configured":"other"})(),S=async()=>{try{let a=await fetch("/api/cli-tools/backups?toolId=cline");if(a.ok){let b=await a.json();L(b.backups||[])}}catch{}},T=async a=>{P(a);try{let b=await fetch("/api/cli-tools/backups",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({toolId:"cline",backupId:a})});if(b.ok)w({type:"success",text:"Backup restored! Reloading status..."}),await U(),await S();else{let a=await b.json();w({type:"error",text:a.error||"Failed to restore backup"})}}catch(a){w({type:"error",text:a.message})}finally{P(null)}},U=async()=>{p(!0);try{let a=await fetch("/api/cli-tools/cline-settings"),b=await a.json();n(b)}catch(a){n({error:a.message})}finally{p(!1)}},V=async()=>{s(!0),w(null);try{let a=H||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:x||"sk_omniroute",model:z})}),d=await c.json();c.ok?(w({type:"success",text:d.message||"Applied!"}),await U(),await S()):w({type:"error",text:d.error||"Failed"})}catch(a){w({type:"error",text:a.message})}finally{s(!1)}},W=async()=>{u(!0),w(null);try{let a=await fetch("/api/cli-tools/cline-settings",{method:"DELETE"}),b=await a.json();a.ok?(w({type:"success",text:b.message||"Reset!"}),A(""),J.current=!1,await U(),await S()):w({type:"error",text:b.error||"Failed"})}catch(a){w({type:"error",text:a.message})}finally{u(!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.target.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}),(()=>{if(!Q)return null;let a={configured:{class:"bg-green-500/10 text-green-600 dark:text-green-400",text:"Connected"},not_configured:{class:"bg-yellow-500/10 text-yellow-600 dark:text-yellow-400",text:"Not configured"},other:{class:"bg-blue-500/10 text-blue-600 dark:text-blue-400",text:"Custom config"}}[R];return a?(0,d.jsx)("span",{className:`px-1.5 py-0.5 text-[10px] font-medium rounded-full ${a.class}`,children:a.text}):null})()]}),(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:a.description})]})]}),(0,d.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${b?"rotate-180":""}`,children:"expand_more"})]}),b&&(0,d.jsxs)("div",{className:"mt-6 pt-6 border-t border-border",children:[o&&(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:"Checking Cline CLI..."})]}),m&&!o&&(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 ${Q?"text-green-500":"text-yellow-500"}`,children:Q?"check_circle":"warning"}),(0,d.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,d.jsx)("p",{className:"text-sm font-medium",children:Q?"Cline CLI detected and ready":m.installed?"Cline CLI installed but not runnable":"Cline CLI not detected"}),m.commandPath&&(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:["Binary:"," ",(0,d.jsx)("code",{className:"px-1 py-0.5 rounded bg-black/5 dark:bg-white/10",children:m.commandPath})]}),m.globalStatePath&&(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:["Config:"," ",(0,d.jsx)("code",{className:"px-1 py-0.5 rounded bg-black/5 dark:bg-white/10",children:m.globalStatePath})]})]})]}),Q&&(0,d.jsxs)(d.Fragment,{children:["configured"===R&&(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:"OmniRoute is configured as OpenAI-compatible provider"}),(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:["Provider: ",(0,d.jsx)("strong",{children:"openai"})," • Model:"," ",(0,d.jsx)("strong",{children:m.settings?.openAiModelId||"—"})]})]})]}),(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,d.jsx)("label",{className:"text-sm text-text-muted",children:"Model"}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("input",{type:"text",value:z,onChange:a=>A(a.target.value),placeholder:"provider/model-id",className:"flex-1 px-3 py-2 bg-bg-secondary rounded-lg text-sm border border-border focus:outline-none focus:ring-1 focus:ring-primary/50"}),(0,d.jsx)(f.$n,{variant:"outline",size:"sm",onClick:()=>C(!0),disabled:!h,children:"Select"}),(0,d.jsx)(f.$n,{variant:"ghost",size:"sm",onClick:()=>G(!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:"API Key"}),j&&j.length>0?(0,d.jsx)("select",{value:x,onChange:a=>y(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:j.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:l?"No API keys available":"Using default: sk_omniroute"})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2 pt-2",children:[(0,d.jsxs)(f.$n,{variant:"primary",size:"sm",onClick:V,disabled:!z,loading:r,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"configured"===R?"Update Config":"Apply Config"]}),"configured"===R&&(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:W,loading:t,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restart_alt"}),"Reset"]})]}),v&&(0,d.jsxs)("div",{className:`flex items-center gap-2 px-3 py-2 rounded-lg text-sm ${"success"===v.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"===v.type?"check_circle":"error"}),(0,d.jsx)("span",{children:v.text})]}),(0,d.jsxs)("div",{className:"border-t border-border pt-3 mt-1",children:[(0,d.jsxs)("button",{onClick:()=>N(!M),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 ${M?"rotate-90":""}`,children:"chevron_right"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"backup"}),"Backups ",K.length>0&&`(${K.length})`]}),M&&K.length>0&&(0,d.jsx)("div",{className:"mt-2 flex flex-col gap-1.5 pl-6",children:K.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:()=>T(a.id),loading:O===a.id,children:"Restore"})]},a.id))}),M&&0===K.length&&(0,d.jsx)("p",{className:"mt-2 pl-6 text-xs text-text-muted",children:"No backups available."})]})]})]})]}),(0,d.jsx)(f.rq,{isOpen:B,onClose:()=>C(!1),onSelect:a=>{A(a.value),C(!1)},selectedModel:z,activeProviders:k,title:"Select Model for Cline"}),(0,d.jsx)(f.uR,{isOpen:F,onClose:()=>G(!1),onApply:a=>{a.model&&A(a.model),a.apiKey&&y(a.apiKey),a.baseUrl&&I(a.baseUrl),G(!1)},currentConfig:{model:z,apiKey:x,baseUrl:H||g},title:"Cline Manual Configuration"})]})}function s({tool:a,isExpanded:b,onToggle:c,baseUrl:g,hasActiveProviders:h,apiKeys:j,activeProviders:k,cloudEnabled:l}){let[m,n]=(0,e.useState)(null),[o,p]=(0,e.useState)(!1),[q,r]=(0,e.useState)(!1),[s,t]=(0,e.useState)(!1),[u,v]=(0,e.useState)(null),[w,x]=(0,e.useState)(""),[y,z]=(0,e.useState)(""),[A,B]=(0,e.useState)(!1),[C,D]=(0,e.useState)({}),[E,F]=(0,e.useState)(!1),[G,H]=(0,e.useState)(""),I=(0,e.useRef)(!1),[J,K]=(0,e.useState)([]),[L,M]=(0,e.useState)(!1),[N,O]=(0,e.useState)(null),P=!!(m?.installed&&m?.runnable),Q=P?m.hasOmniRoute?"configured":"not_configured":null,R=async()=>{try{let a=await fetch("/api/cli-tools/backups?toolId=kilo");if(a.ok){let b=await a.json();K(b.backups||[])}}catch{}},S=async a=>{O(a);try{let b=await fetch("/api/cli-tools/backups",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({toolId:"kilo",backupId:a})});if(b.ok)v({type:"success",text:"Backup restored! Reloading status..."}),await T(),await R();else{let a=await b.json();v({type:"error",text:a.error||"Failed to restore backup"})}}catch(a){v({type:"error",text:a.message})}finally{O(null)}},T=async()=>{p(!0);try{let a=await fetch("/api/cli-tools/kilo-settings"),b=await a.json();n(b)}catch(a){n({error:a.message})}finally{p(!1)}},U=async()=>{r(!0),v(null);try{let a=G||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:w||"sk_omniroute",model:y})}),d=await c.json();c.ok?(v({type:"success",text:d.message||"Applied!"}),await T(),await R()):v({type:"error",text:d.error||"Failed"})}catch(a){v({type:"error",text:a.message})}finally{r(!1)}},V=async()=>{t(!0),v(null);try{let a=await fetch("/api/cli-tools/kilo-settings",{method:"DELETE"}),b=await a.json();a.ok?(v({type:"success",text:b.message||"Reset!"}),z(""),I.current=!1,await T(),await R()):v({type:"error",text:b.error||"Failed"})}catch(a){v({type:"error",text:a.message})}finally{t(!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.target.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}),(()=>{if(!P)return null;let a={configured:{class:"bg-green-500/10 text-green-600 dark:text-green-400",text:"Connected"},not_configured:{class:"bg-yellow-500/10 text-yellow-600 dark:text-yellow-400",text:"Not configured"}}[Q];return a?(0,d.jsx)("span",{className:`px-1.5 py-0.5 text-[10px] font-medium rounded-full ${a.class}`,children:a.text}):null})()]}),(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:a.description})]})]}),(0,d.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${b?"rotate-180":""}`,children:"expand_more"})]}),b&&(0,d.jsxs)("div",{className:"mt-6 pt-6 border-t border-border",children:[o&&(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:"Checking Kilo Code CLI..."})]}),m&&!o&&(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 ${P?"text-green-500":"text-yellow-500"}`,children:P?"check_circle":"warning"}),(0,d.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,d.jsx)("p",{className:"text-sm font-medium",children:P?"Kilo Code CLI detected and ready":m.installed?"Kilo Code CLI installed but not runnable":"Kilo Code CLI not detected"}),m.commandPath&&(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:["Binary:"," ",(0,d.jsx)("code",{className:"px-1 py-0.5 rounded bg-black/5 dark:bg-white/10",children:m.commandPath})]}),m.authPath&&(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:["Auth:"," ",(0,d.jsx)("code",{className:"px-1 py-0.5 rounded bg-black/5 dark:bg-white/10",children:m.authPath})]})]})]}),P&&(0,d.jsxs)(d.Fragment,{children:["configured"===Q&&(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:"OmniRoute is configured as OpenAI-compatible provider"}),(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:["Providers: ",(0,d.jsx)("strong",{children:m.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:"Model"}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("input",{type:"text",value:y,onChange:a=>z(a.target.value),placeholder:"provider/model-id",className:"flex-1 px-3 py-2 bg-bg-secondary rounded-lg text-sm border border-border focus:outline-none focus:ring-1 focus:ring-primary/50"}),(0,d.jsx)(f.$n,{variant:"outline",size:"sm",onClick:()=>B(!0),disabled:!h,children:"Select"}),(0,d.jsx)(f.$n,{variant:"ghost",size:"sm",onClick:()=>F(!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:"API Key"}),j&&j.length>0?(0,d.jsx)("select",{value:w,onChange:a=>x(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:j.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:l?"No API keys available":"Using default: sk_omniroute"})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2 pt-2",children:[(0,d.jsxs)(f.$n,{variant:"primary",size:"sm",onClick:U,disabled:!y,loading:q,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"configured"===Q?"Update Config":"Apply Config"]}),"configured"===Q&&(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:V,loading:s,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restart_alt"}),"Reset"]})]}),u&&(0,d.jsxs)("div",{className:`flex items-center gap-2 px-3 py-2 rounded-lg text-sm ${"success"===u.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"===u.type?"check_circle":"error"}),(0,d.jsx)("span",{children:u.text})]}),(0,d.jsxs)("div",{className:"border-t border-border pt-3 mt-1",children:[(0,d.jsxs)("button",{onClick:()=>M(!L),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 ${L?"rotate-90":""}`,children:"chevron_right"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"backup"}),"Backups ",J.length>0&&`(${J.length})`]}),L&&J.length>0&&(0,d.jsx)("div",{className:"mt-2 flex flex-col gap-1.5 pl-6",children:J.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:()=>S(a.id),loading:N===a.id,children:"Restore"})]},a.id))}),L&&0===J.length&&(0,d.jsx)("p",{className:"mt-2 pl-6 text-xs text-text-muted",children:"No backups available."})]})]})]})]}),(0,d.jsx)(f.rq,{isOpen:A,onClose:()=>B(!1),onSelect:a=>{z(a.value),B(!1)},selectedModel:y,activeProviders:k,title:"Select Model for Kilo Code"}),(0,d.jsx)(f.uR,{isOpen:E,onClose:()=>F(!1),onApply:a=>{a.model&&z(a.model),a.apiKey&&x(a.apiKey),a.baseUrl&&H(a.baseUrl),F(!1)},currentConfig:{model:y,apiKey:w,baseUrl:G||g},title:"Kilo Code Manual Configuration"})]})}function t({toolId:a,tool:b,isExpanded:c,onToggle:g,baseUrl:h,apiKeys:j,activeProviders:k=[],cloudEnabled:l=!1}){let[m,n]=(0,e.useState)(null),[o,p]=(0,e.useState)(!1),[q,r]=(0,e.useState)(""),[s,t]=(0,e.useState)(null),[u,v]=(0,e.useState)(null),[w,x]=(0,e.useState)(!1);(0,e.useRef)(!1);let[y,z]=(0,e.useState)(()=>j?.length>0?j[0].key:""),A=(0,e.useCallback)(b=>{r(b),b?localStorage.setItem(`omniroute-cli-model-${a}`,b):localStorage.removeItem(`omniroute-cli-model-${a}`)},[a]),B=(0,e.useCallback)(b=>{z(b),b&&localStorage.setItem(`omniroute-cli-key-${a}`,b)},[a]),C=a=>{let b=y&&y.trim()?y:l?"your-api-key":"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,q||"provider/model-id")},D=async(a,b)=>{await navigator.clipboard.writeText(C(a)),n(b),setTimeout(()=>n(null),2e3)},E=k.length>0,F=c&&null===s,G=async()=>{x(!0),v(null);try{let b=y&&y.trim()?y:l?"":"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:q})}),f=await e.json();e.ok?v({type:"success",text:f.message||"Configuration saved!"}):v({type:"error",text:f.error||"Failed to save"})}catch(a){v({type:"error",text:a.message})}finally{x(!1)}},H=["continue"].includes(a),I=()=>!b.requiresCloud||!!l;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.target.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.target.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}),s&&!s.error&&(0,d.jsx)("span",{className:`px-1.5 py-0.5 text-[10px] font-medium rounded-full ${"not_required"===s.reason?"bg-blue-500/10 text-blue-600 dark:text-blue-400":s.installed&&s.runnable?"bg-green-500/10 text-green-600 dark:text-green-400":"bg-yellow-500/10 text-yellow-600 dark:text-yellow-400"}`,children:"not_required"===s.reason?"Guide":s.installed&&s.runnable?"Detected":"Not ready"})]}),(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children: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:[F&&(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:"Checking runtime..."})]}),!F&&s&&!s.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"===s.reason?"info":s.installed&&s.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"===s.reason?"Guide-only integration: no local binary required":s.installed&&s.runnable?"CLI runtime detected and healthy":s.installed?`CLI found but not runnable${s.reason?` (${s.reason})`:""}`:"CLI runtime not detected"}),s.commandPath&&(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:["Binary:"," ",(0,d.jsx)("code",{className:"px-1 py-0.5 rounded bg-black/5 dark:bg-white/10",children:s.commandPath})]}),s.configPath&&(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:["Config path:"," ",(0,d.jsx)("code",{className:"px-1 py-0.5 rounded bg-black/5 dark:bg-white/10",children:s.configPath})]})]})]}),!F&&s?.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:"Failed to check runtime status."})]}),b.notes&&0!==b.notes.length?(0,d.jsx)("div",{className:"flex flex-col gap-2 mb-4",children:b.notes.map((a,b)=>{if("cloudCheck"===a.type&&l)return null;let c="warning"===a.type,e="cloudCheck"===a.type&&!l,f="bg-blue-500/10 border-blue-500/30",g="text-blue-600 dark:text-blue-400",h="text-blue-500",i="info";return c?(f="bg-yellow-500/10 border-yellow-500/30",g="text-yellow-600 dark:text-yellow-400",h="text-yellow-500",i="warning"):e&&(f="bg-red-500/10 border-red-500/30",g="text-red-600 dark:text-red-400",h="text-red-500",i="error"),(0,d.jsxs)("div",{className:`flex items-start gap-3 p-3 rounded-lg border ${f}`,children:[(0,d.jsx)("span",{className:`material-symbols-outlined text-lg ${h}`,children:i}),(0,d.jsx)("p",{className:`text-sm ${g}`,children:a.text})]},b)})}):null,I()&&b.guideSteps.map(a=>(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:a.step}),(0,d.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,d.jsx)("p",{className:"font-medium text-text",children:a.title}),a.desc&&(0,d.jsx)("p",{className:"text-sm text-text-muted mt-0.5",children:a.desc}),"apiKeySelector"===a.type&&(0,d.jsx)("div",{className:"mt-2 flex items-center gap-2",children:j&&j.length>0?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("select",{value:y,onChange:a=>B(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:j.map(a=>(0,d.jsx)("option",{value:a.key,children:a.key},a.id))}),(0,d.jsx)("button",{onClick:()=>D(y,"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"===m?"check":"content_copy"})})]}):(0,d.jsx)("span",{className:"text-sm text-text-muted",children:l?"No API keys - Create one in Keys page":"sk_omniroute"})}),"modelSelector"===a.type&&(0,d.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[(0,d.jsx)("input",{type:"text",value:q,onChange:a=>A(a.target.value),placeholder:"provider/model-id",className:"flex-1 px-3 py-2 bg-bg-secondary rounded-lg text-sm border border-border focus:outline-none focus:ring-1 focus:ring-primary/50"}),(0,d.jsx)("button",{onClick:()=>p(!0),disabled:!E,className:`shrink-0 px-3 py-2 rounded-lg border text-sm transition-colors ${E?"bg-bg-secondary border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select Model"}),q&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("button",{onClick:()=>D(q,"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"===m?"check":"content_copy"})}),(0,d.jsx)("button",{onClick:()=>A(""),className:"p-2 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-lg",children:"close"})})]})]}),a.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:C(a.value)}),a.copyable&&(0,d.jsx)("button",{onClick:()=>D(a.value,`${a.step}-${a.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:m===`${a.step}-${a.title}`?"check":"content_copy"})})]})]})]},a.step)),I()&&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:()=>D(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"===m?"check":"content_copy"}),"codeblock"===m?"Copied!":"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:C(b.codeBlock.code)})})]}),I()&&(0,d.jsxs)("div",{className:"mt-2",children:[u&&(0,d.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs mb-2 ${"success"===u.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"===u.type?"check_circle":"error"}),(0,d.jsx)("span",{children:u.text})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[H&&(0,d.jsxs)(f.$n,{variant:"primary",size:"sm",onClick:G,disabled:!q,loading:w,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Save Config"]}),b.codeBlock&&(0,d.jsxs)(f.$n,{variant:H?"outline":"primary",size:"sm",onClick:()=>D(b.codeBlock.code,"codeblock"),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"codeblock"===m?"check":"content_copy"}),"codeblock"===m?"Copied!":"Copy Config"]}),q&&(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"}),"Selection saved"]})]})]})]}):(0,d.jsx)("p",{className:"text-text-muted text-sm",children:"Coming soon..."})}),(0,d.jsx)(f.rq,{isOpen:o,onClose:()=>p(!1),onSelect:a=>{A(a.value)},selectedModel:q,activeProviders:k,title:"Select Model"})]})}function u({tool:a,isExpanded:b,onToggle:c,baseUrl:g,apiKeys:h,activeProviders:j,hasActiveProviders:k,cloudEnabled:l}){let[m,n]=(0,e.useState)(null),[o,p]=(0,e.useState)(!1),[q,r]=(0,e.useState)(!1),[s,t]=(0,e.useState)(""),[u,v]=(0,e.useState)(""),[w,x]=(0,e.useState)(null),[y,z]=(0,e.useState)({}),[A,B]=(0,e.useState)(!1),[C,D]=(0,e.useState)(null),E=async()=>{try{let a=await fetch("/api/cli-tools/antigravity-mitm");if(a.ok){let b=await a.json();n(b)}}catch(a){console.log("Error fetching status:",a),n({running:!1})}},F="u">typeof navigator&&navigator.userAgent?.includes("Windows"),G=async a=>{p(!0),x(null);try{let b=u?.trim()||(h?.length>0?h[0].key:null)||(l?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?(x({type:"success",text:"MITM started"}),r(!1),t(""),E()):x({type:"error",text:d.error||"Failed to start"})}catch(a){x({type:"error",text:a.message})}finally{p(!1)}},H=async a=>{p(!0),x(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?(x({type:"success",text:"MITM stopped"}),r(!1),t(""),E()):x({type:"error",text:c.error||"Failed to stop"})}catch(a){x({type:"error",text:a.message})}finally{p(!1)}},I=()=>{s.trim()?m?.running?H(s):G(s):x({type:"error",text:"Sudo password is required"})},J=(a,b)=>{z(c=>({...c,[a]:b}))},K=async()=>{p(!0),x(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:y})});if(!a.ok){let b=await a.json();throw Error(b.error||"Failed to save mappings")}x({type:"success",text:"Mappings saved!"})}catch(a){x({type:"error",text:a.message})}finally{p(!1)}},L=m?.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.target.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}),L?(0,d.jsx)(f.Ex,{variant:"success",size:"sm",children:"Active"}):(0,d.jsx)(f.Ex,{variant:"default",size:"sm",children:"Inactive"})]}),(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:a.description})]})]}),(0,d.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${b?"rotate-180":""}`,children:"expand_more"})]}),b&&(0,d.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[(0,d.jsx)("div",{className:"flex items-center gap-2",children:L?(0,d.jsxs)("button",{onClick:()=>{F||m?.hasCachedPassword?H(""):(r(!0),x(null))},disabled:o,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"}),"Stop MITM"]}):(0,d.jsxs)("button",{onClick:()=>{F||m?.hasCachedPassword?G(""):(r(!0),x(null))},disabled:o||!k,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"}),"Start MITM"]})}),w?.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:w.text})]}),L&&(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:"API Key"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),h.length>0?(0,d.jsx)("select",{value:u,onChange:a=>v(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:l?"No API keys - Create one in Keys page":"sk_omniroute (default)"})]}),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:y[a.alias]||"",onChange:b=>J(a.alias,b.target.value),placeholder:"provider/model-id",className:"flex-1 px-2 py-1.5 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"}),(0,d.jsx)("button",{onClick:()=>{D(a.alias),B(!0)},disabled:!k,className:`px-2 py-1.5 rounded border text-xs transition-colors shrink-0 whitespace-nowrap ${k?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select"}),y[a.alias]&&(0,d.jsx)("button",{onClick:()=>J(a.alias,""),className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]},a.alias)),(0,d.jsx)("div",{className:"flex items-center gap-2",children:(0,d.jsxs)(f.$n,{variant:"primary",size:"sm",onClick:K,disabled:o||0===Object.keys(y).length,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Save Mappings"]})})]}),!L&&(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:"How it works:"})," Intercepts Antigravity traffic via DNS redirect, letting you reroute models through OmniRoute."]}),(0,d.jsxs)("div",{className:"flex flex-col gap-0.5 text-[11px] text-text-muted",children:[(0,d.jsx)("span",{children:"1. Generates SSL cert & adds to system keychain"}),(0,d.jsxs)("span",{children:["2. Redirects"," ",(0,d.jsx)("code",{className:"text-[10px] bg-surface px-1 rounded",children:"daily-cloudcode-pa.googleapis.com"})," ","→ localhost"]}),(0,d.jsx)("span",{children:"3. Maps Antigravity models to any provider via OmniRoute"})]})]})]}),(0,d.jsx)(f.aF,{isOpen:q,onClose:()=>{r(!1),t(""),x(null)},title:"Sudo Password Required",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:"Required for SSL certificate and DNS configuration"})]}),(0,d.jsx)(f.pd,{type:"password",placeholder:"Enter sudo password",value:s,onChange:a=>t(a.target.value),onKeyDown:a=>{"Enter"!==a.key||o||I()}}),w&&(0,d.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===w.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"===w.type?"check_circle":"error"}),(0,d.jsx)("span",{children:w.text})]}),(0,d.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[(0,d.jsx)(f.$n,{variant:"ghost",size:"sm",onClick:()=>{r(!1),t(""),x(null)},disabled:o,children:"Cancel"}),(0,d.jsx)(f.$n,{variant:"primary",size:"sm",onClick:I,loading:o,children:"Confirm"})]})]})}),(0,d.jsx)(f.rq,{isOpen:A,onClose:()=>B(!1),onSelect:a=>{C&&z(b=>({...b,[C]:a.value}))},selectedModel:C?y[C]:null,activeProviders:j,title:`Select model for ${C}`})]})}process.env.NEXT_PUBLIC_CLOUD_URL;let v=process.env.NEXT_PUBLIC_CLOUD_URL;function w({machineId:a}){let b,c,i,[j,m]=(0,e.useState)([]),[o,q]=(0,e.useState)(!0),[w,x]=(0,e.useState)(null),[y,z]=(0,e.useState)({}),[A,B]=(0,e.useState)(!1),[C,D]=(0,e.useState)([]),E=()=>j.filter(a=>!1!==a.isActive),F=(0,e.useCallback)((a,b,c)=>{z(d=>d[a]?.[b]===c?d:{...d,[a]:{...d[a],[b]:c}})},[]);if(o)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 G=(b=E(),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:[!G&&(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:"No active providers"}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"Please add and connect providers first to configure CLI tools."})]})]})}),(0,d.jsx)("div",{className:"flex flex-col gap-4",children:Object.entries(g).map(([a,b])=>((a,b)=>{let c={tool:b,isExpanded:w===a,onToggle:()=>x(w===a?null:a),baseUrl:A&&v?v:"http://localhost:20128",apiKeys:C};switch(a){case"claude":return(0,d.jsx)(k,{...c,activeProviders:E(),modelMappings:y[a]||{},onModelMappingChange:(b,c)=>F(a,b,c),hasActiveProviders:G,cloudEnabled:A},a);case"codex":return(0,d.jsx)(l,{...c,activeProviders:E(),cloudEnabled:A},a);case"droid":return(0,d.jsx)(n,{...c,activeProviders:E(),hasActiveProviders:G,cloudEnabled:A},a);case"openclaw":return(0,d.jsx)(p,{...c,activeProviders:E(),hasActiveProviders:G,cloudEnabled:A},a);case"antigravity":return(0,d.jsx)(u,{...c,activeProviders:E(),hasActiveProviders:G,cloudEnabled:A},a);case"cline":return(0,d.jsx)(r,{...c,activeProviders:E(),hasActiveProviders:G,cloudEnabled:A},a);case"kilo":return(0,d.jsx)(s,{...c,activeProviders:E(),hasActiveProviders:G,cloudEnabled:A},a);default:return(0,d.jsx)(t,{toolId:a,...c,activeProviders:E(),cloudEnabled:A},a)}})(a,b))})]})}},26713:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/is-bot")},27708:(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.js\" 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.js","default")},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")},33873:a=>{"use strict";a.exports=require("path")},41025:a=>{"use strict";a.exports=require("next/dist/server/app-render/dynamic-access-async-storage.external.js")},43954:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/interception-routes")},48161:a=>{"use strict";a.exports=require("node:os")},55511:a=>{"use strict";a.exports=require("crypto")},59316:(a,b,c)=>{Promise.resolve().then(c.bind(c,23271))},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")},74864:(a,b,c)=>{"use strict";c.d(b,{D1:()=>e});var d=c(22513);async function e(){return await (0,d.Xj)()}},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")},91838:(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(56037),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,12506)),"/home/runner/work/OmniRoute/OmniRoute/src/app/(dashboard)/dashboard/cli-tools/page.js"]}]},{}]},{}]},{layout:[()=>Promise.resolve().then(c.bind(c,68010)),"/home/runner/work/OmniRoute/OmniRoute/src/app/(dashboard)/layout.js"],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"],metadata:{icon:[async a=>(await Promise.resolve().then(c.bind(c,70440))).default(a)],apple:[],openGraph:[],twitter:[],manifest:void 0}}]},{layout:[()=>Promise.resolve().then(c.bind(c,20651)),"/home/runner/work/OmniRoute/OmniRoute/src/app/layout.js"],"global-error":[()=>Promise.resolve().then(c.bind(c,56037)),"/home/runner/work/OmniRoute/OmniRoute/src/app/global-error.js"],"not-found":[()=>Promise.resolve().then(c.bind(c,71569)),"/home/runner/work/OmniRoute/OmniRoute/src/app/not-found.js"],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"],metadata:{icon:[async a=>(await Promise.resolve().then(c.bind(c,70440))).default(a)],apple:[],openGraph:[],twitter:[],manifest:void 0}}]}.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}}},99636:(a,b,c)=>{Promise.resolve().then(c.bind(c,27708))}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,595,8020,216,4822,867,4469,8108,4352,5727,3676,4755,152],()=>b(b.s=91838));module.exports=c})();
|
|
16
|
+
`},{filename:"~/.codex/auth.json",content:JSON.stringify({OPENAI_API_KEY:p},null,2)}])})]})}let n=process.env.NEXT_PUBLIC_CLOUD_URL;function o({tool:a,isExpanded:b,onToggle:c,baseUrl:g,hasActiveProviders:h,apiKeys:k,activeProviders:l,cloudEnabled:m,batchStatus:o}){let p,q,r,s,[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)(""),[F,G]=(0,e.useState)(""),[H,I]=(0,e.useState)(!1),[J,K]=(0,e.useState)({}),[L,M]=(0,e.useState)(!1),[N,O]=(0,e.useState)("");(0,e.useRef)(!1);let[P,Q]=(0,e.useState)([]),[R,S]=(0,e.useState)(!1),[T,U]=(0,e.useState)(null),V=!!(t?.installed&&t?.runnable),W=(()=>{if(!V)return null;let a=t.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=m&&n&&a.baseUrl?.startsWith(n);return b||c?"configured":"other"})()||o?.configStatus||null,X=async()=>{w(!0);try{let a=await fetch("/api/cli-tools/droid-settings"),b=await a.json();u(b)}catch(a){u({installed:!1,error:a.message})}finally{w(!1)}},Y=()=>{let a=N||g;return a.endsWith("/v1")?a:`${a}/v1`},Z=async()=>{y(!0),C(null);try{let a=D?.trim()||(k?.length>0?k[0].key:null)||(m?null:"sk_omniroute"),b=await fetch("/api/cli-tools/droid-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:Y(),apiKey:a,model:F})}),c=await b.json();b.ok?(C({type:"success",text:"Settings applied successfully!"}),X()):C({type:"error",text:c.error||"Failed to apply settings"})}catch(a){C({type:"error",text:a.message})}finally{y(!1)}},$=async()=>{A(!0),C(null);try{let a=await fetch("/api/cli-tools/droid-settings",{method:"DELETE"}),b=await a.json();a.ok?(C({type:"success",text:"Settings reset successfully!"}),G(""),E(""),X()):C({type:"error",text:b.error||"Failed to reset settings"})}catch(a){C({type:"error",text:a.message})}finally{A(!1)}},_=async()=>{try{let a=await fetch("/api/cli-tools/backups?tool=droid"),b=await a.json();a.ok&&Q(b.backups||[])}catch(a){console.log("Error fetching backups:",a)}},aa=async a=>{U(a),C(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?(C({type:"success",text:"Backup restored!"}),X(),_()):C({type:"error",text:c.error||"Failed to restore"})}catch(a){C({type:"error",text:a.message})}finally{U(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.target.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)(j,{effectiveConfigStatus:W,batchStatus:o})]}),(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:a.description})]})]}),(0,d.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${b?"rotate-180":""}`,children:"expand_more"})]}),b&&(0,d.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[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:"Checking Factory Droid CLI..."})]}),!v&&t&&!V&&(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?"Factory Droid CLI not runnable":"Factory Droid CLI not installed"}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:t.installed?`Factory Droid CLI was found but failed runtime healthcheck${t.reason?` (${t.reason})`:""}.`:"Please install Factory Droid CLI to use this feature."})]})]}),!v&&V&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[t?.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:"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:t.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:"Base URL"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("input",{type:"text",value:(p=N||g).endsWith("/v1")?p:`${p}/v1`,onChange:a=>O(a.target.value),placeholder:"https://.../v1",className:"flex-1 px-2 py-1.5 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"}),N&&N!==g&&(0,d.jsx)("button",{onClick:()=>O(""),className:"p-1 text-text-muted hover:text-primary rounded transition-colors",title:"Reset to default",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:"API Key"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),k.length>0?(0,d.jsx)("select",{value:D,onChange:a=>E(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:m?"No API keys - Create one in Keys page":"sk_omniroute (default)"})]}),(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:"Model"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("input",{type:"text",value:F,onChange:a=>G(a.target.value),placeholder:"provider/model-id",className:"flex-1 px-2 py-1.5 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"}),(0,d.jsx)("button",{onClick:()=>I(!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:"Select Model"}),F&&(0,d.jsx)("button",{onClick:()=>G(""),className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})]}),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:Z,disabled:!F,loading:x,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:$,disabled:!t?.hasOmniRoute,loading:z,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,d.jsxs)(f.$n,{variant:"ghost",size:"sm",onClick:()=>M(!0),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]}),(0,d.jsx)("div",{className:"flex-1"}),(0,d.jsxs)(f.$n,{variant:"ghost",size:"sm",onClick:()=>{S(!R),R||_()},children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"history"}),"Backups",P.length>0&&` (${P.length})`]})]}),R&&(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"}),"Config Backups"]}),0===P.length?(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"No backups yet. Backups are created automatically before each Apply or Reset."}):(0,d.jsx)("div",{className:"space-y-1.5",children:P.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:()=>aa(a.id),disabled:T===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:T===a.id?"...":"Restore"})]},a.id))})]})]})]}),(0,d.jsx)(f.rq,{isOpen:H,onClose:()=>I(!1),onSelect:a=>{G(a.value),I(!1)},selectedModel:F,activeProviders:l,modelAliases:J,title:"Select Model for Factory Droid"}),(0,d.jsx)(f.uR,{isOpen:L,onClose:()=>M(!1),title:"Factory Droid - Manual Configuration",configs:(q=D&&D.trim()?D:m?"<API_KEY_FROM_DASHBOARD>":"sk_omniroute",r={customModels:[{model:F||"provider/model-id",id:"custom:OmniRoute-0",index:0,baseUrl:Y(),apiKey:q,displayName:F||"provider/model-id",maxOutputTokens:131072,noImageSupport:!1,provider:"openai"}]},s="u">typeof navigator&&navigator.platform,[{filename:s?.toLowerCase().includes("win")?"%USERPROFILE%\\.factory\\settings.json":"~/.factory/settings.json",content:JSON.stringify(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:l,cloudEnabled:m,batchStatus:n}){let o,q,[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)("");(0,e.useRef)(!1);let[N,O]=(0,e.useState)([]),[P,Q]=(0,e.useState)(!1),[R,S]=(0,e.useState)(null),T=!!(r?.installed&&r?.runnable),U=(()=>{if(!T)return null;let a=r.settings?.models?.providers?.omniroute;if(!a)return"not_configured";let b=a.baseUrl?.includes("localhost")||a.baseUrl?.includes("127.0.0.1"),c=m&&p&&a.baseUrl?.startsWith(p);return b||c?"configured":"other"})()||n?.configStatus||null,V=async()=>{u(!0);try{let a=await fetch("/api/cli-tools/openclaw-settings"),b=await a.json();s(b)}catch(a){s({installed:!1,error:a.message})}finally{u(!1)}},W=()=>{let a=L||g;return a.endsWith("/v1")?a:`${a}/v1`},X=async()=>{w(!0),A(null);try{let a=B?.trim()||(k?.length>0?k[0].key:null)||(m?null:"sk_omniroute"),b=await fetch("/api/cli-tools/openclaw-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:W(),apiKey:a,model:D})}),c=await b.json();b.ok?(A({type:"success",text:"Settings applied successfully!"}),V()):A({type:"error",text:c.error||"Failed to apply settings"})}catch(a){A({type:"error",text:a.message})}finally{w(!1)}},Y=async()=>{y(!0),A(null);try{let a=await fetch("/api/cli-tools/openclaw-settings",{method:"DELETE"}),b=await a.json();a.ok?(A({type:"success",text:"Settings reset successfully!"}),E(""),C(""),V()):A({type:"error",text:b.error||"Failed to reset settings"})}catch(a){A({type:"error",text:a.message})}finally{y(!1)}},Z=async()=>{try{let a=await fetch("/api/cli-tools/backups?tool=openclaw"),b=await a.json();a.ok&&O(b.backups||[])}catch(a){console.log("Error fetching backups:",a)}},$=async a=>{S(a),A(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?(A({type:"success",text:"Backup restored!"}),V(),Z()):A({type:"error",text:c.error||"Failed to restore"})}catch(a){A({type:"error",text:a.message})}finally{S(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.target.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)(j,{effectiveConfigStatus:U,batchStatus:n})]}),(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:a.description})]})]}),(0,d.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${b?"rotate-180":""}`,children:"expand_more"})]}),b&&(0,d.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[t&&(0,d.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,d.jsx)("span",{children:"Checking Open Claw CLI..."})]}),!t&&r&&!T&&(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:r.installed?"Open Claw CLI not runnable":"Open Claw CLI not installed"}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:r.installed?`Open Claw CLI was found but failed runtime healthcheck${r.reason?` (${r.reason})`:""}.`:"Please install Open Claw CLI to use this feature."})]})]}),!t&&T&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[r?.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:"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:r.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:"Base URL"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("input",{type:"text",value:(o=L||g).endsWith("/v1")?o:`${o}/v1`,onChange:a=>M(a.target.value),placeholder:"https://.../v1",className:"flex-1 px-2 py-1.5 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"}),L&&L!==g&&(0,d.jsx)("button",{onClick:()=>M(""),className:"p-1 text-text-muted hover:text-primary rounded transition-colors",title:"Reset to default",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:"API Key"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),k.length>0?(0,d.jsx)("select",{value:B,onChange:a=>C(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:m?"No API keys - Create one in Keys page":"sk_omniroute (default)"})]}),(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:"Model"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("input",{type:"text",value:D,onChange:a=>E(a.target.value),placeholder:"provider/model-id",className:"flex-1 px-2 py-1.5 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"}),(0,d.jsx)("button",{onClick:()=>G(!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:"Select Model"}),D&&(0,d.jsx)("button",{onClick:()=>E(""),className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})]}),z&&(0,d.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"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-[14px]",children:"success"===z.type?"check_circle":"error"}),(0,d.jsx)("span",{children:z.text})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsxs)(f.$n,{variant:"primary",size:"sm",onClick:X,disabled:!D,loading:v,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:Y,disabled:!r?.hasOmniRoute,loading:x,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,d.jsxs)(f.$n,{variant:"ghost",size:"sm",onClick:()=>K(!0),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]}),(0,d.jsx)("div",{className:"flex-1"}),(0,d.jsxs)(f.$n,{variant:"ghost",size:"sm",onClick:()=>{Q(!P),P||Z()},children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"history"}),"Backups",N.length>0&&` (${N.length})`]})]}),P&&(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"}),"Config Backups"]}),0===N.length?(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"No backups yet. Backups are created automatically before each Apply or Reset."}):(0,d.jsx)("div",{className:"space-y-1.5",children:N.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:()=>$(a.id),disabled:R===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:R===a.id?"...":"Restore"})]},a.id))})]})]})]}),(0,d.jsx)(f.rq,{isOpen:F,onClose:()=>G(!1),onSelect:a=>{E(a.value),G(!1)},selectedModel:D,activeProviders:l,modelAliases:H,title:"Select Model for Open Claw"}),(0,d.jsx)(f.uR,{isOpen:J,onClose:()=>K(!1),title:"Open Claw - Manual Configuration",configs:(q=B&&B.trim()?B:m?"<API_KEY_FROM_DASHBOARD>":"sk_omniroute",[{filename:"~/.openclaw/openclaw.json",content:JSON.stringify({agents:{defaults:{model:{primary:`omniroute/${D||"provider/model-id"}`}}},models:{providers:{omniroute:{baseUrl:W(),apiKey:q,api:"openai-completions",models:[{id:D||"provider/model-id",name:(D||"provider/model-id").split("/").pop()}]}}}},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:l,cloudEnabled:m,batchStatus:n}){let[o,p]=(0,e.useState)(null),[q,s]=(0,e.useState)(!1),[t,u]=(0,e.useState)(!1),[v,w]=(0,e.useState)(!1),[x,y]=(0,e.useState)(null),[z,A]=(0,e.useState)(""),[B,C]=(0,e.useState)(""),[D,E]=(0,e.useState)(!1),[F,G]=(0,e.useState)({}),[H,I]=(0,e.useState)(!1),[J,K]=(0,e.useState)(""),L=(0,e.useRef)(!1),[M,N]=(0,e.useState)([]),[O,P]=(0,e.useState)(!1),[Q,R]=(0,e.useState)(null),S=!!(o?.installed&&o?.runnable),T=(()=>{if(!S)return null;if(!o.hasOmniRoute)return"not_configured";let a=o.settings?.openAiBaseUrl||"",b=a.includes("localhost")||a.includes("127.0.0.1"),c=m&&r&&a.startsWith(r);return b||c?"configured":"other"})(),U=T||n?.configStatus||null,V=async()=>{try{let a=await fetch("/api/cli-tools/backups?tool=cline");if(a.ok){let b=await a.json();N(b.backups||[])}}catch{}},W=async a=>{R(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)y({type:"success",text:"Backup restored! Reloading status..."}),await X(),await V();else{let a=await b.json();y({type:"error",text:a.error||"Failed to restore backup"})}}catch(a){y({type:"error",text:a.message})}finally{R(null)}},X=async()=>{s(!0);try{let a=await fetch("/api/cli-tools/cline-settings"),b=await a.json();p(b)}catch(a){p({error:a.message})}finally{s(!1)}},Y=async()=>{u(!0),y(null);try{let a=J||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:z||"sk_omniroute",model:B})}),d=await c.json();c.ok?(y({type:"success",text:d.message||"Applied!"}),await X(),await V()):y({type:"error",text:d.error||"Failed"})}catch(a){y({type:"error",text:a.message})}finally{u(!1)}},Z=async()=>{w(!0),y(null);try{let a=await fetch("/api/cli-tools/cline-settings",{method:"DELETE"}),b=await a.json();a.ok?(y({type:"success",text:b.message||"Reset!"}),C(""),L.current=!1,await X(),await V()):y({type:"error",text:b.error||"Failed"})}catch(a){y({type:"error",text:a.message})}finally{w(!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.target.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)(j,{effectiveConfigStatus:U,batchStatus:n})]}),(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:a.description})]})]}),(0,d.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${b?"rotate-180":""}`,children:"expand_more"})]}),b&&(0,d.jsxs)("div",{className:"mt-6 pt-6 border-t border-border",children:[q&&(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:"Checking Cline CLI..."})]}),o&&!q&&(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 ${S?"text-green-500":"text-yellow-500"}`,children:S?"check_circle":"warning"}),(0,d.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,d.jsx)("p",{className:"text-sm font-medium",children:S?"Cline CLI detected and ready":o.installed?"Cline CLI installed but not runnable":"Cline CLI not detected"}),o.commandPath&&(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:["Binary:"," ",(0,d.jsx)("code",{className:"px-1 py-0.5 rounded bg-black/5 dark:bg-white/10",children:o.commandPath})]}),o.globalStatePath&&(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:["Config:"," ",(0,d.jsx)("code",{className:"px-1 py-0.5 rounded bg-black/5 dark:bg-white/10",children:o.globalStatePath})]})]})]}),S&&(0,d.jsxs)(d.Fragment,{children:["configured"===T&&(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:"OmniRoute is configured as OpenAI-compatible provider"}),(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:["Provider: ",(0,d.jsx)("strong",{children:"openai"})," • Model:"," ",(0,d.jsx)("strong",{children:o.settings?.openAiModelId||"—"})]})]})]}),(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,d.jsx)("label",{className:"text-sm text-text-muted",children:"Model"}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("input",{type:"text",value:B,onChange:a=>C(a.target.value),placeholder:"provider/model-id",className:"flex-1 px-3 py-2 bg-bg-secondary rounded-lg text-sm border border-border focus:outline-none focus:ring-1 focus:ring-primary/50"}),(0,d.jsx)(f.$n,{variant:"outline",size:"sm",onClick:()=>E(!0),disabled:!h,children:"Select"}),(0,d.jsx)(f.$n,{variant:"ghost",size:"sm",onClick:()=>I(!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:"API Key"}),k&&k.length>0?(0,d.jsx)("select",{value:z,onChange:a=>A(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:m?"No API keys available":"Using default: sk_omniroute"})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2 pt-2",children:[(0,d.jsxs)(f.$n,{variant:"primary",size:"sm",onClick:Y,disabled:!B,loading:t,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"configured"===T?"Update Config":"Apply Config"]}),"configured"===T&&(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:Z,loading:v,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restart_alt"}),"Reset"]})]}),x&&(0,d.jsxs)("div",{className:`flex items-center gap-2 px-3 py-2 rounded-lg text-sm ${"success"===x.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"===x.type?"check_circle":"error"}),(0,d.jsx)("span",{children:x.text})]}),(0,d.jsxs)("div",{className:"border-t border-border pt-3 mt-1",children:[(0,d.jsxs)("button",{onClick:()=>P(!O),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 ${O?"rotate-90":""}`,children:"chevron_right"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"backup"}),"Backups ",M.length>0&&`(${M.length})`]}),O&&M.length>0&&(0,d.jsx)("div",{className:"mt-2 flex flex-col gap-1.5 pl-6",children:M.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:()=>W(a.id),loading:Q===a.id,children:"Restore"})]},a.id))}),O&&0===M.length&&(0,d.jsx)("p",{className:"mt-2 pl-6 text-xs text-text-muted",children:"No backups available."})]})]})]})]}),(0,d.jsx)(f.rq,{isOpen:D,onClose:()=>E(!1),onSelect:a=>{C(a.value),E(!1)},selectedModel:B,activeProviders:l,title:"Select Model for Cline"}),(0,d.jsx)(f.uR,{isOpen:H,onClose:()=>I(!1),onApply:a=>{a.model&&C(a.model),a.apiKey&&A(a.apiKey),a.baseUrl&&K(a.baseUrl),I(!1)},currentConfig:{model:B,apiKey:z,baseUrl:J||g},title:"Cline Manual Configuration"})]})}function t({tool:a,isExpanded:b,onToggle:c,baseUrl:g,hasActiveProviders:h,apiKeys:k,activeProviders:l,cloudEnabled:m,batchStatus:n}){let[o,p]=(0,e.useState)(null),[q,r]=(0,e.useState)(!1),[s,t]=(0,e.useState)(!1),[u,v]=(0,e.useState)(!1),[w,x]=(0,e.useState)(null),[y,z]=(0,e.useState)(""),[A,B]=(0,e.useState)(""),[C,D]=(0,e.useState)(!1),[E,F]=(0,e.useState)({}),[G,H]=(0,e.useState)(!1),[I,J]=(0,e.useState)(""),K=(0,e.useRef)(!1),[L,M]=(0,e.useState)([]),[N,O]=(0,e.useState)(!1),[P,Q]=(0,e.useState)(null),R=!!(o?.installed&&o?.runnable),S=R?o.hasOmniRoute?"configured":"not_configured":null,T=S||n?.configStatus||null,U=async()=>{try{let a=await fetch("/api/cli-tools/backups?tool=kilo");if(a.ok){let b=await a.json();M(b.backups||[])}}catch{}},V=async a=>{Q(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)x({type:"success",text:"Backup restored! Reloading status..."}),await W(),await U();else{let a=await b.json();x({type:"error",text:a.error||"Failed to restore backup"})}}catch(a){x({type:"error",text:a.message})}finally{Q(null)}},W=async()=>{r(!0);try{let a=await fetch("/api/cli-tools/kilo-settings"),b=await a.json();p(b)}catch(a){p({error:a.message})}finally{r(!1)}},X=async()=>{t(!0),x(null);try{let a=I||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:y||"sk_omniroute",model:A})}),d=await c.json();c.ok?(x({type:"success",text:d.message||"Applied!"}),await W(),await U()):x({type:"error",text:d.error||"Failed"})}catch(a){x({type:"error",text:a.message})}finally{t(!1)}},Y=async()=>{v(!0),x(null);try{let a=await fetch("/api/cli-tools/kilo-settings",{method:"DELETE"}),b=await a.json();a.ok?(x({type:"success",text:b.message||"Reset!"}),B(""),K.current=!1,await W(),await U()):x({type:"error",text:b.error||"Failed"})}catch(a){x({type:"error",text:a.message})}finally{v(!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.target.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)(j,{effectiveConfigStatus:T,batchStatus:n})]}),(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:a.description})]})]}),(0,d.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${b?"rotate-180":""}`,children:"expand_more"})]}),b&&(0,d.jsxs)("div",{className:"mt-6 pt-6 border-t border-border",children:[q&&(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:"Checking Kilo Code CLI..."})]}),o&&!q&&(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 ${R?"text-green-500":"text-yellow-500"}`,children:R?"check_circle":"warning"}),(0,d.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,d.jsx)("p",{className:"text-sm font-medium",children:R?"Kilo Code CLI detected and ready":o.installed?"Kilo Code CLI installed but not runnable":"Kilo Code CLI not detected"}),o.commandPath&&(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:["Binary:"," ",(0,d.jsx)("code",{className:"px-1 py-0.5 rounded bg-black/5 dark:bg-white/10",children:o.commandPath})]}),o.authPath&&(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:["Auth:"," ",(0,d.jsx)("code",{className:"px-1 py-0.5 rounded bg-black/5 dark:bg-white/10",children:o.authPath})]})]})]}),R&&(0,d.jsxs)(d.Fragment,{children:["configured"===S&&(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:"OmniRoute is configured as OpenAI-compatible provider"}),(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:["Providers: ",(0,d.jsx)("strong",{children:o.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:"Model"}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("input",{type:"text",value:A,onChange:a=>B(a.target.value),placeholder:"provider/model-id",className:"flex-1 px-3 py-2 bg-bg-secondary rounded-lg text-sm border border-border focus:outline-none focus:ring-1 focus:ring-primary/50"}),(0,d.jsx)(f.$n,{variant:"outline",size:"sm",onClick:()=>D(!0),disabled:!h,children:"Select"}),(0,d.jsx)(f.$n,{variant:"ghost",size:"sm",onClick:()=>H(!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:"API Key"}),k&&k.length>0?(0,d.jsx)("select",{value:y,onChange:a=>z(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:m?"No API keys available":"Using default: sk_omniroute"})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2 pt-2",children:[(0,d.jsxs)(f.$n,{variant:"primary",size:"sm",onClick:X,disabled:!A,loading:s,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"configured"===S?"Update Config":"Apply Config"]}),"configured"===S&&(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:Y,loading:u,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restart_alt"}),"Reset"]})]}),w&&(0,d.jsxs)("div",{className:`flex items-center gap-2 px-3 py-2 rounded-lg text-sm ${"success"===w.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"===w.type?"check_circle":"error"}),(0,d.jsx)("span",{children:w.text})]}),(0,d.jsxs)("div",{className:"border-t border-border pt-3 mt-1",children:[(0,d.jsxs)("button",{onClick:()=>O(!N),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 ${N?"rotate-90":""}`,children:"chevron_right"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"backup"}),"Backups ",L.length>0&&`(${L.length})`]}),N&&L.length>0&&(0,d.jsx)("div",{className:"mt-2 flex flex-col gap-1.5 pl-6",children:L.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:()=>V(a.id),loading:P===a.id,children:"Restore"})]},a.id))}),N&&0===L.length&&(0,d.jsx)("p",{className:"mt-2 pl-6 text-xs text-text-muted",children:"No backups available."})]})]})]})]}),(0,d.jsx)(f.rq,{isOpen:C,onClose:()=>D(!1),onSelect:a=>{B(a.value),D(!1)},selectedModel:A,activeProviders:l,title:"Select Model for Kilo Code"}),(0,d.jsx)(f.uR,{isOpen:G,onClose:()=>H(!1),onApply:a=>{a.model&&B(a.model),a.apiKey&&z(a.apiKey),a.baseUrl&&J(a.baseUrl),H(!1)},currentConfig:{model:A,apiKey:y,baseUrl:I||g},title:"Kilo Code Manual Configuration"})]})}function u({toolId:a,tool:b,isExpanded:c,onToggle:g,baseUrl:h,apiKeys:j,activeProviders:k=[],cloudEnabled:l=!1,batchStatus:m}){let n,o,p,[q,r]=(0,e.useState)(null),[s,t]=(0,e.useState)(!1),[u,v]=(0,e.useState)(""),[w,x]=(0,e.useState)(null),[y,z]=(0,e.useState)(null),[A,B]=(0,e.useState)(!1);(0,e.useRef)(!1);let[C,D]=(0,e.useState)(()=>j?.length>0?j[0].key:""),E=(0,e.useCallback)(b=>{v(b),b?localStorage.setItem(`omniroute-cli-model-${a}`,b):localStorage.removeItem(`omniroute-cli-model-${a}`)},[a]),F=(0,e.useCallback)(b=>{D(b),b&&localStorage.setItem(`omniroute-cli-key-${a}`,b)},[a]),G=a=>{let b=C&&C.trim()?C:l?"your-api-key":"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,u||"provider/model-id")},H=async(a,b)=>{await navigator.clipboard.writeText(G(a)),r(b),setTimeout(()=>r(null),2e3)},I=k.length>0,J=c&&null===w,K=async()=>{B(!0),z(null);try{let b=C&&C.trim()?C:l?"":"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:u})}),f=await e.json();e.ok?z({type:"success",text:f.message||"Configuration saved!"}):z({type:"error",text:f.error||"Failed to save"})}catch(a){z({type:"error",text:a.message})}finally{B(!1)}},L=["continue"].includes(a),M=()=>!b.requiresCloud||!!l;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.target.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.target.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}),(n=w?.reason==="not_required"||"guide"===b.configType,o=w?w.installed&&w.runnable:m?.installed&&m?.runnable,p=w?w.installed:m?.installed,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-blue-500/10 text-blue-600 dark:text-blue-400",children:[(0,d.jsx)("span",{className:"size-1.5 rounded-full bg-blue-500"}),"Guide"]}):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-green-500/10 text-green-600 dark:text-green-400",children:[(0,d.jsx)("span",{className:"size-1.5 rounded-full bg-green-500"}),"Detected"]}):!1===p&&(w||m)?(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"}),"Not installed"]}):p&&!o&&(w||m)?(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"}),"Not ready"]}):null)]}),(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children: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:[J&&(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:"Checking runtime..."})]}),!J&&w&&!w.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"===w.reason?"info":w.installed&&w.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"===w.reason?"Guide-only integration: no local binary required":w.installed&&w.runnable?"CLI runtime detected and healthy":w.installed?`CLI found but not runnable${w.reason?` (${w.reason})`:""}`:"CLI runtime not detected"}),w.commandPath&&(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:["Binary:"," ",(0,d.jsx)("code",{className:"px-1 py-0.5 rounded bg-black/5 dark:bg-white/10",children:w.commandPath})]}),w.configPath&&(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:["Config path:"," ",(0,d.jsx)("code",{className:"px-1 py-0.5 rounded bg-black/5 dark:bg-white/10",children:w.configPath})]})]})]}),!J&&w?.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:"Failed to check runtime status."})]}),b.notes&&0!==b.notes.length?(0,d.jsx)("div",{className:"flex flex-col gap-2 mb-4",children:b.notes.map((a,b)=>{if("cloudCheck"===a.type&&l)return null;let c="warning"===a.type,e="cloudCheck"===a.type&&!l,f="bg-blue-500/10 border-blue-500/30",g="text-blue-600 dark:text-blue-400",h="text-blue-500",i="info";return c?(f="bg-yellow-500/10 border-yellow-500/30",g="text-yellow-600 dark:text-yellow-400",h="text-yellow-500",i="warning"):e&&(f="bg-red-500/10 border-red-500/30",g="text-red-600 dark:text-red-400",h="text-red-500",i="error"),(0,d.jsxs)("div",{className:`flex items-start gap-3 p-3 rounded-lg border ${f}`,children:[(0,d.jsx)("span",{className:`material-symbols-outlined text-lg ${h}`,children:i}),(0,d.jsx)("p",{className:`text-sm ${g}`,children:a.text})]},b)})}):null,M()&&b.guideSteps.map(a=>(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:a.step}),(0,d.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,d.jsx)("p",{className:"font-medium text-text",children:a.title}),a.desc&&(0,d.jsx)("p",{className:"text-sm text-text-muted mt-0.5",children:a.desc}),"apiKeySelector"===a.type&&(0,d.jsx)("div",{className:"mt-2 flex items-center gap-2",children:j&&j.length>0?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("select",{value:C,onChange:a=>F(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:j.map(a=>(0,d.jsx)("option",{value:a.key,children:a.key},a.id))}),(0,d.jsx)("button",{onClick:()=>H(C,"apiKey"),className:"shrink-0 px-3 py-2 bg-bg-secondary hover:bg-bg-tertiary rounded-lg border border-border transition-colors",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-lg",children:"apiKey"===q?"check":"content_copy"})})]}):(0,d.jsx)("span",{className:"text-sm text-text-muted",children:l?"No API keys - Create one in Keys page":"sk_omniroute"})}),"modelSelector"===a.type&&(0,d.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[(0,d.jsx)("input",{type:"text",value:u,onChange:a=>E(a.target.value),placeholder:"provider/model-id",className:"flex-1 px-3 py-2 bg-bg-secondary rounded-lg text-sm border border-border focus:outline-none focus:ring-1 focus:ring-primary/50"}),(0,d.jsx)("button",{onClick:()=>t(!0),disabled:!I,className:`shrink-0 px-3 py-2 rounded-lg border text-sm transition-colors ${I?"bg-bg-secondary border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select Model"}),u&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("button",{onClick:()=>H(u,"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"===q?"check":"content_copy"})}),(0,d.jsx)("button",{onClick:()=>E(""),className:"p-2 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-lg",children:"close"})})]})]}),a.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:G(a.value)}),a.copyable&&(0,d.jsx)("button",{onClick:()=>H(a.value,`${a.step}-${a.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:q===`${a.step}-${a.title}`?"check":"content_copy"})})]})]})]},a.step)),M()&&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:()=>H(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"===q?"check":"content_copy"}),"codeblock"===q?"Copied!":"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:G(b.codeBlock.code)})})]}),M()&&(0,d.jsxs)("div",{className:"mt-2",children:[y&&(0,d.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs mb-2 ${"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 gap-2",children:[L&&(0,d.jsxs)(f.$n,{variant:"primary",size:"sm",onClick:K,disabled:!u,loading:A,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Save Config"]}),b.codeBlock&&(0,d.jsxs)(f.$n,{variant:L?"outline":"primary",size:"sm",onClick:()=>H(b.codeBlock.code,"codeblock"),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"codeblock"===q?"check":"content_copy"}),"codeblock"===q?"Copied!":"Copy Config"]}),u&&(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"}),"Selection saved"]})]})]})]}):(0,d.jsx)("p",{className:"text-text-muted text-sm",children:"Coming soon..."})}),(0,d.jsx)(f.rq,{isOpen:s,onClose:()=>t(!1),onSelect:a=>{E(a.value)},selectedModel:u,activeProviders:k,title:"Select Model"})]})}function v({tool:a,isExpanded:b,onToggle:c,baseUrl:g,apiKeys:h,activeProviders:j,hasActiveProviders:k,cloudEnabled:l}){let[m,n]=(0,e.useState)(null),[o,p]=(0,e.useState)(!1),[q,r]=(0,e.useState)(!1),[s,t]=(0,e.useState)(""),[u,v]=(0,e.useState)(""),[w,x]=(0,e.useState)(null),[y,z]=(0,e.useState)({}),[A,B]=(0,e.useState)(!1),[C,D]=(0,e.useState)(null),E=async()=>{try{let a=await fetch("/api/cli-tools/antigravity-mitm");if(a.ok){let b=await a.json();n(b)}}catch(a){console.log("Error fetching status:",a),n({running:!1})}},F="u">typeof navigator&&navigator.userAgent?.includes("Windows"),G=async a=>{p(!0),x(null);try{let b=u?.trim()||(h?.length>0?h[0].key:null)||(l?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?(x({type:"success",text:"MITM started"}),r(!1),t(""),E()):x({type:"error",text:d.error||"Failed to start"})}catch(a){x({type:"error",text:a.message})}finally{p(!1)}},H=async a=>{p(!0),x(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?(x({type:"success",text:"MITM stopped"}),r(!1),t(""),E()):x({type:"error",text:c.error||"Failed to stop"})}catch(a){x({type:"error",text:a.message})}finally{p(!1)}},I=()=>{s.trim()?m?.running?H(s):G(s):x({type:"error",text:"Sudo password is required"})},J=(a,b)=>{z(c=>({...c,[a]:b}))},K=async()=>{p(!0),x(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:y})});if(!a.ok){let b=await a.json();throw Error(b.error||"Failed to save mappings")}x({type:"success",text:"Mappings saved!"})}catch(a){x({type:"error",text:a.message})}finally{p(!1)}},L=m?.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.target.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}),L?(0,d.jsx)(f.Ex,{variant:"success",size:"sm",children:"Active"}):(0,d.jsx)(f.Ex,{variant:"default",size:"sm",children:"Inactive"})]}),(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:a.description})]})]}),(0,d.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${b?"rotate-180":""}`,children:"expand_more"})]}),b&&(0,d.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[(0,d.jsx)("div",{className:"flex items-center gap-2",children:L?(0,d.jsxs)("button",{onClick:()=>{F||m?.hasCachedPassword?H(""):(r(!0),x(null))},disabled:o,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"}),"Stop MITM"]}):(0,d.jsxs)("button",{onClick:()=>{F||m?.hasCachedPassword?G(""):(r(!0),x(null))},disabled:o||!k,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"}),"Start MITM"]})}),w?.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:w.text})]}),L&&(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:"API Key"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),h.length>0?(0,d.jsx)("select",{value:u,onChange:a=>v(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:l?"No API keys - Create one in Keys page":"sk_omniroute (default)"})]}),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:y[a.alias]||"",onChange:b=>J(a.alias,b.target.value),placeholder:"provider/model-id",className:"flex-1 px-2 py-1.5 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"}),(0,d.jsx)("button",{onClick:()=>{D(a.alias),B(!0)},disabled:!k,className:`px-2 py-1.5 rounded border text-xs transition-colors shrink-0 whitespace-nowrap ${k?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select"}),y[a.alias]&&(0,d.jsx)("button",{onClick:()=>J(a.alias,""),className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]},a.alias)),(0,d.jsx)("div",{className:"flex items-center gap-2",children:(0,d.jsxs)(f.$n,{variant:"primary",size:"sm",onClick:K,disabled:o||0===Object.keys(y).length,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Save Mappings"]})})]}),!L&&(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:"How it works:"})," Intercepts Antigravity traffic via DNS redirect, letting you reroute models through OmniRoute."]}),(0,d.jsxs)("div",{className:"flex flex-col gap-0.5 text-[11px] text-text-muted",children:[(0,d.jsx)("span",{children:"1. Generates SSL cert & adds to system keychain"}),(0,d.jsxs)("span",{children:["2. Redirects"," ",(0,d.jsx)("code",{className:"text-[10px] bg-surface px-1 rounded",children:"daily-cloudcode-pa.googleapis.com"})," ","→ localhost"]}),(0,d.jsx)("span",{children:"3. Maps Antigravity models to any provider via OmniRoute"})]})]})]}),(0,d.jsx)(f.aF,{isOpen:q,onClose:()=>{r(!1),t(""),x(null)},title:"Sudo Password Required",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:"Required for SSL certificate and DNS configuration"})]}),(0,d.jsx)(f.pd,{type:"password",placeholder:"Enter sudo password",value:s,onChange:a=>t(a.target.value),onKeyDown:a=>{"Enter"!==a.key||o||I()}}),w&&(0,d.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===w.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"===w.type?"check_circle":"error"}),(0,d.jsx)("span",{children:w.text})]}),(0,d.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[(0,d.jsx)(f.$n,{variant:"ghost",size:"sm",onClick:()=>{r(!1),t(""),x(null)},disabled:o,children:"Cancel"}),(0,d.jsx)(f.$n,{variant:"primary",size:"sm",onClick:I,loading:o,children:"Confirm"})]})]})}),(0,d.jsx)(f.rq,{isOpen:A,onClose:()=>B(!1),onSelect:a=>{C&&z(b=>({...b,[C]:a.value}))},selectedModel:C?y[C]:null,activeProviders:j,title:`Select model for ${C}`})]})}process.env.NEXT_PUBLIC_CLOUD_URL;let w=process.env.NEXT_PUBLIC_CLOUD_URL;function x({machineId:a}){let b,c,i,[j,k]=(0,e.useState)([]),[n,p]=(0,e.useState)(!0),[r,x]=(0,e.useState)(null),[y,z]=(0,e.useState)({}),[A,B]=(0,e.useState)(!1),[C,D]=(0,e.useState)([]),[E,F]=(0,e.useState)({}),G=()=>j.filter(a=>!1!==a.isActive),H=(0,e.useCallback)((a,b,c)=>{z(d=>d[a]?.[b]===c?d:{...d,[a]:{...d[a],[b]:c}})},[]);if(n)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 I=(b=G(),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:[!I&&(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:"No active providers"}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"Please add and connect providers first to configure CLI tools."})]})]})}),(0,d.jsx)("div",{className:"flex flex-col gap-4",children:Object.entries(g).map(([a,b])=>((a,b)=>{let c={tool:b,isExpanded:r===a,onToggle:()=>x(r===a?null:a),baseUrl:A&&w?w:"http://localhost:20128",apiKeys:C,batchStatus:E[a]||null};switch(a){case"claude":return(0,d.jsx)(l,{...c,activeProviders:G(),modelMappings:y[a]||{},onModelMappingChange:(b,c)=>H(a,b,c),hasActiveProviders:I,cloudEnabled:A},a);case"codex":return(0,d.jsx)(m,{...c,activeProviders:G(),cloudEnabled:A},a);case"droid":return(0,d.jsx)(o,{...c,activeProviders:G(),hasActiveProviders:I,cloudEnabled:A},a);case"openclaw":return(0,d.jsx)(q,{...c,activeProviders:G(),hasActiveProviders:I,cloudEnabled:A},a);case"antigravity":return(0,d.jsx)(v,{...c,activeProviders:G(),hasActiveProviders:I,cloudEnabled:A},a);case"cline":return(0,d.jsx)(s,{...c,activeProviders:G(),hasActiveProviders:I,cloudEnabled:A},a);case"kilo":return(0,d.jsx)(t,{...c,activeProviders:G(),hasActiveProviders:I,cloudEnabled:A},a);default:return(0,d.jsx)(u,{toolId:a,...c,activeProviders:G(),cloudEnabled:A},a)}})(a,b))})]})}},99636:(a,b,c)=>{Promise.resolve().then(c.bind(c,27708))}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,595,8020,1099,3994,2951,4469,8108,651,5727,8757,4755,152],()=>b(b.s=91838));module.exports=c})();
|