omniroute 2.1.2 → 2.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/.next/BUILD_ID +1 -1
- package/app/.next/app-path-routes-manifest.json +46 -46
- package/app/.next/build-manifest.json +3 -3
- package/app/.next/prerender-manifest.json +3 -3
- package/app/.next/required-server-files.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/a2a/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/a2a/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/a2a/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/agents/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/agents/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/agents/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/analytics/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/analytics/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/analytics/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/api-manager/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/api-manager/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/api-manager/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/audit-log/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/audit-log/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/audit-log/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/auto-combo/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/auto-combo/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/auto-combo/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page.js +4 -4
- package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/combos/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/costs/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/costs/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/costs/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/endpoint/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/health/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/health/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/health/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/limits/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/limits/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/limits/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/logs/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/logs/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/logs/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/mcp/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/mcp/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/mcp/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/media/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/media/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/media/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/onboarding/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/onboarding/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/onboarding/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/playground/page.js +3 -3
- package/app/.next/server/app/(dashboard)/dashboard/playground/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/playground/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/profile/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/new/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/settings/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/settings/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/settings/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/settings/pricing/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/settings/pricing/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/translator/page.js +3 -3
- package/app/.next/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/usage/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/.well-known/agent.json/route.js +1 -1
- package/app/.next/server/app/.well-known/agent.json/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/400/page.js +2 -2
- package/app/.next/server/app/400/page.js.nft.json +1 -1
- package/app/.next/server/app/400/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/401/page.js +2 -2
- package/app/.next/server/app/401/page.js.nft.json +1 -1
- package/app/.next/server/app/401/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/403/page.js +2 -2
- package/app/.next/server/app/403/page.js.nft.json +1 -1
- package/app/.next/server/app/403/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/408/page.js +2 -2
- package/app/.next/server/app/408/page.js.nft.json +1 -1
- package/app/.next/server/app/408/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/429/page.js +2 -2
- package/app/.next/server/app/429/page.js.nft.json +1 -1
- package/app/.next/server/app/429/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/500/page.js +2 -2
- package/app/.next/server/app/500/page.js.nft.json +1 -1
- package/app/.next/server/app/500/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/502/page.js +2 -2
- package/app/.next/server/app/502/page.js.nft.json +1 -1
- package/app/.next/server/app/502/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/503/page.js +2 -2
- package/app/.next/server/app/503/page.js.nft.json +1 -1
- package/app/.next/server/app/503/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/_global-error/page.js +3 -3
- package/app/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/_global-error.html +2 -2
- package/app/.next/server/app/_global-error.rsc +5 -5
- package/app/.next/server/app/_global-error.segments/_full.segment.rsc +5 -5
- package/app/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/app/.next/server/app/_not-found/page.js +2 -2
- package/app/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/app/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/a2a/route.js +2 -2
- package/app/.next/server/app/a2a/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/a2a/status/route.js +1 -1
- package/app/.next/server/app/api/a2a/status/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/a2a/tasks/[id]/cancel/route.js +1 -1
- package/app/.next/server/app/api/a2a/tasks/[id]/cancel/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/a2a/tasks/[id]/route.js +1 -1
- package/app/.next/server/app/api/a2a/tasks/[id]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/a2a/tasks/route.js +1 -1
- package/app/.next/server/app/api/a2a/tasks/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/acp/agents/route.js +1 -1
- package/app/.next/server/app/api/acp/agents/route.js.nft.json +1 -1
- package/app/.next/server/app/api/acp/agents/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/auth/login/route.js +1 -1
- package/app/.next/server/app/api/auth/login/route.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.js +1 -1
- package/app/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/auth/status/route.js +1 -1
- package/app/.next/server/app/api/auth/status/route.js.nft.json +1 -1
- package/app/.next/server/app/api/auth/status/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cache/route.js +1 -1
- package/app/.next/server/app/api/cache/route.js.nft.json +1 -1
- package/app/.next/server/app/api/cache/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cache/stats/route.js +1 -1
- package/app/.next/server/app/api/cache/stats/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/alias/route.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 +1 -1
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/backups/route.js +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.js.nft.json +1 -1
- 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.js.nft.json +1 -1
- package/app/.next/server/app/api/cli-tools/cline-settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/codex-profiles/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/codex-profiles/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/codex-settings/route.js +1 -1
- package/app/.next/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
- package/app/.next/server/app/api/cli-tools/codex-settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/droid-settings/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
- package/app/.next/server/app/api/cli-tools/droid-settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/guide-settings/[toolId]/route.js +1 -1
- package/app/.next/server/app/api/cli-tools/guide-settings/[toolId]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/kilo-settings/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
- package/app/.next/server/app/api/cli-tools/kilo-settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/openclaw/auto-order/route.js +1 -1
- package/app/.next/server/app/api/cli-tools/openclaw/auto-order/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
- package/app/.next/server/app/api/cli-tools/openclaw-settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/runtime/[toolId]/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/runtime/[toolId]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/status/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/status/route.js.nft.json +1 -1
- package/app/.next/server/app/api/cli-tools/status/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cloud/auth/route.js +1 -1
- package/app/.next/server/app/api/cloud/auth/route.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/auto/route.js +1 -1
- package/app/.next/server/app/api/combos/auto/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/combos/metrics/route.js +1 -1
- package/app/.next/server/app/api/combos/metrics/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/combos/route.js +1 -1
- package/app/.next/server/app/api/combos/route.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.js +1 -1
- package/app/.next/server/app/api/compliance/audit-log/route.js.nft.json +1 -1
- package/app/.next/server/app/api/compliance/audit-log/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/db-backups/export/route.js +1 -1
- package/app/.next/server/app/api/db-backups/export/route.js.nft.json +1 -1
- package/app/.next/server/app/api/db-backups/export/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/db-backups/exportAll/route.js +1 -1
- package/app/.next/server/app/api/db-backups/exportAll/route.js.nft.json +1 -1
- package/app/.next/server/app/api/db-backups/exportAll/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/db-backups/import/route.js +1 -1
- package/app/.next/server/app/api/db-backups/import/route.js.nft.json +1 -1
- package/app/.next/server/app/api/db-backups/import/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/db-backups/route.js +1 -1
- package/app/.next/server/app/api/db-backups/route.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.js +2 -2
- package/app/.next/server/app/api/fallback/chains/route.js.nft.json +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/logs/console/route.js +1 -1
- package/app/.next/server/app/api/logs/console/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/mcp/audit/route.js +2 -2
- package/app/.next/server/app/api/mcp/audit/route.js.nft.json +1 -1
- package/app/.next/server/app/api/mcp/audit/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/mcp/audit/stats/route.js +2 -2
- package/app/.next/server/app/api/mcp/audit/stats/route.js.nft.json +1 -1
- package/app/.next/server/app/api/mcp/audit/stats/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/mcp/sse/route.js +1 -1
- package/app/.next/server/app/api/mcp/sse/route.js.nft.json +1 -1
- package/app/.next/server/app/api/mcp/sse/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/mcp/status/route.js +1 -1
- package/app/.next/server/app/api/mcp/status/route.js.nft.json +1 -1
- package/app/.next/server/app/api/mcp/status/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/mcp/stream/route.js +1 -1
- package/app/.next/server/app/api/mcp/stream/route.js.nft.json +1 -1
- package/app/.next/server/app/api/mcp/stream/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/mcp/tools/route.js +1 -1
- package/app/.next/server/app/api/mcp/tools/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/models/alias/route.js +1 -1
- package/app/.next/server/app/api/models/alias/route.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.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/openrouter-catalog/route.js +1 -1
- package/app/.next/server/app/api/models/openrouter-catalog/route.js.nft.json +1 -1
- package/app/.next/server/app/api/models/openrouter-catalog/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/models/route.js +2 -2
- package/app/.next/server/app/api/models/route.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 +2 -2
- 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 +1 -1
- 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.js +1 -1
- package/app/.next/server/app/api/oauth/cursor/auto-import/route.js.nft.json +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.js +1 -1
- package/app/.next/server/app/api/oauth/kiro/auto-import/route.js.nft.json +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.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.js +2 -2
- package/app/.next/server/app/api/policies/route.js.nft.json +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.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 +2 -2
- package/app/.next/server/app/api/provider-metrics/route.js.nft.json +1 -1
- package/app/.next/server/app/api/provider-metrics/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/provider-models/route.js +1 -1
- package/app/.next/server/app/api/provider-models/route.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 +2 -2
- 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.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 +2 -2
- 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.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.js +1 -1
- package/app/.next/server/app/api/resilience/reset/route.js.nft.json +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.js +1 -1
- package/app/.next/server/app/api/restart/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/sessions/route.js +1 -1
- package/app/.next/server/app/api/sessions/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/settings/background-degradation/route.js +1 -1
- package/app/.next/server/app/api/settings/background-degradation/route.js.nft.json +1 -1
- package/app/.next/server/app/api/settings/background-degradation/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/settings/combo-defaults/route.js +1 -1
- package/app/.next/server/app/api/settings/combo-defaults/route.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.js +1 -1
- package/app/.next/server/app/api/settings/ip-filter/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/settings/model-aliases/route.js +1 -1
- package/app/.next/server/app/api/settings/model-aliases/route.js.nft.json +1 -1
- package/app/.next/server/app/api/settings/model-aliases/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/settings/proxy/route.js +1 -1
- package/app/.next/server/app/api/settings/proxy/route.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.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.js +1 -1
- package/app/.next/server/app/api/shutdown/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/storage/health/route.js +1 -1
- package/app/.next/server/app/api/storage/health/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/sync/cloud/route.js +1 -1
- package/app/.next/server/app/api/sync/cloud/route.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.js +1 -1
- package/app/.next/server/app/api/tags/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/telemetry/summary/route.js +1 -1
- package/app/.next/server/app/api/telemetry/summary/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/token-health/route.js +1 -1
- package/app/.next/server/app/api/token-health/route.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.js +1 -1
- package/app/.next/server/app/api/translator/detect/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/translator/history/route.js +1 -1
- package/app/.next/server/app/api/translator/history/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/translator/load/route.js +1 -1
- package/app/.next/server/app/api/translator/load/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/translator/save/route.js +1 -1
- package/app/.next/server/app/api/translator/save/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/translator/send/route.js +1 -1
- package/app/.next/server/app/api/translator/send/route.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 -2
- package/app/.next/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/usage/[connectionId]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/analytics/route.js +1 -1
- package/app/.next/server/app/api/usage/analytics/route.js.nft.json +1 -1
- package/app/.next/server/app/api/usage/analytics/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/budget/route.js +2 -2
- package/app/.next/server/app/api/usage/budget/route.js.nft.json +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 +1 -1
- package/app/.next/server/app/api/usage/call-logs/[id]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/usage/call-logs/[id]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/call-logs/route.js +1 -1
- package/app/.next/server/app/api/usage/call-logs/route.js.nft.json +1 -1
- package/app/.next/server/app/api/usage/call-logs/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/history/route.js +1 -1
- package/app/.next/server/app/api/usage/history/route.js.nft.json +1 -1
- package/app/.next/server/app/api/usage/history/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/logs/route.js +1 -1
- package/app/.next/server/app/api/usage/logs/route.js.nft.json +1 -1
- package/app/.next/server/app/api/usage/logs/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/proxy-logs/route.js +1 -1
- package/app/.next/server/app/api/usage/proxy-logs/route.js.nft.json +1 -1
- package/app/.next/server/app/api/usage/proxy-logs/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/quota/route.js +1 -1
- package/app/.next/server/app/api/usage/quota/route.js.nft.json +1 -1
- package/app/.next/server/app/api/usage/quota/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/request-logs/route.js +1 -1
- package/app/.next/server/app/api/usage/request-logs/route.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.js +1 -1
- package/app/.next/server/app/api/v1/messages/count_tokens/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/messages/route.js +1 -1
- package/app/.next/server/app/api/v1/messages/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/messages/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/models/route.js +1 -1
- package/app/.next/server/app/api/v1/models/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/models/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/moderations/route.js +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/music/generations/route.js +1 -1
- package/app/.next/server/app/api/v1/music/generations/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/music/generations/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/providers/[provider]/chat/completions/route.js +1 -1
- package/app/.next/server/app/api/v1/providers/[provider]/chat/completions/route.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.js +1 -1
- package/app/.next/server/app/api/v1/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/videos/generations/route.js +1 -1
- package/app/.next/server/app/api/v1/videos/generations/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/videos/generations/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1beta/models/[...path]/route.js +1 -1
- package/app/.next/server/app/api/v1beta/models/[...path]/route.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.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/docs/page.js +4 -4
- package/app/.next/server/app/docs/page.js.nft.json +1 -1
- package/app/.next/server/app/docs/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/forbidden/page.js +2 -2
- package/app/.next/server/app/forbidden/page.js.nft.json +1 -1
- package/app/.next/server/app/forbidden/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/forgot-password/page.js +2 -2
- package/app/.next/server/app/forgot-password/page.js.nft.json +1 -1
- package/app/.next/server/app/forgot-password/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/landing/page.js +2 -2
- package/app/.next/server/app/landing/page.js.nft.json +1 -1
- package/app/.next/server/app/landing/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/login/page.js +2 -2
- package/app/.next/server/app/login/page.js.nft.json +1 -1
- package/app/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/maintenance/page.js +2 -2
- package/app/.next/server/app/maintenance/page.js.nft.json +1 -1
- package/app/.next/server/app/maintenance/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/offline/page.js +2 -2
- package/app/.next/server/app/offline/page.js.nft.json +1 -1
- package/app/.next/server/app/offline/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/page.js +2 -2
- package/app/.next/server/app/page.js.nft.json +1 -1
- package/app/.next/server/app/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/privacy/page.js +2 -2
- package/app/.next/server/app/privacy/page.js.nft.json +1 -1
- package/app/.next/server/app/privacy/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/status/page.js +2 -2
- package/app/.next/server/app/status/page.js.nft.json +1 -1
- package/app/.next/server/app/status/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/terms/page.js +2 -2
- package/app/.next/server/app/terms/page.js.nft.json +1 -1
- package/app/.next/server/app/terms/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app-paths-manifest.json +46 -46
- package/app/.next/server/chunks/1960.js +1 -1
- package/app/.next/server/chunks/2050.js +1 -1
- package/app/.next/server/chunks/2767.js +2 -2
- package/app/.next/server/chunks/2910.js +1 -1
- package/app/.next/server/chunks/3061.js +2 -2
- package/app/.next/server/chunks/3366.js +1 -0
- package/app/.next/server/chunks/3648.js +2 -2
- package/app/.next/server/chunks/438.js +1 -1
- package/app/.next/server/chunks/4488.js +1 -1
- package/app/.next/server/chunks/5248.js +1 -0
- package/app/.next/server/chunks/5419.js +1 -1
- package/app/.next/server/chunks/6184.js +1 -0
- package/app/.next/server/chunks/6743.js +1 -1
- package/app/.next/server/chunks/7109.js +1 -1
- package/app/.next/server/chunks/7544.js +8 -6
- package/app/.next/server/chunks/7889.js +2 -0
- package/app/.next/server/chunks/8020.js +3 -3
- package/app/.next/server/chunks/8252.js +1 -1
- package/app/.next/server/chunks/8369.js +1 -1
- package/app/.next/server/chunks/8429.js +1 -1
- package/app/.next/server/chunks/8907.js +1 -1
- package/app/.next/server/chunks/9548.js +1 -1
- package/app/.next/server/chunks/9631.js +13 -0
- package/app/.next/server/chunks/9679.js +1 -1
- package/app/.next/server/chunks/9704.js +1 -1
- package/app/.next/server/middleware-build-manifest.js +1 -1
- package/app/.next/server/middleware.js +3 -3
- package/app/.next/server/next-font-manifest.js +1 -1
- package/app/.next/server/next-font-manifest.json +1 -1
- package/app/.next/server/pages/500.html +2 -2
- package/app/.next/server/server-reference-manifest.js +1 -1
- package/app/.next/server/server-reference-manifest.json +1 -1
- package/app/.next/static/chunks/1149-2a1a69d288a31ae5.js +1 -0
- package/app/.next/static/chunks/5846-15bfcc3b3b045982.js +2 -0
- package/app/.next/static/chunks/{647-b834a711585a924d.js → 647-f03a498577a57cbc.js} +2 -2
- package/app/.next/static/chunks/app/(dashboard)/dashboard/a2a/page-43d6fa6b75cca497.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/agents/{page-4ec5a1458c077143.js → page-31a14de3e374fe92.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/analytics/loading-49ae846d72948391.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/analytics/{page-6ab7701da3357bb9.js → page-bef5c045e7eae657.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/api-manager/page-16f886b3711a6a50.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/audit-log/page-e5bf8955e7b9a4f5.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/auto-combo/{page-851063ded34ab7a6.js → page-8e609f4c9b26a901.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/cli-tools/page-c4700101a54c8b28.js +15 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/combos/page-8d4d2f071d114b90.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/costs/{page-8f6233f59f5277e9.js → page-7a233357dfbd2e05.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/endpoint/page-7b1037d65eef97a8.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/health/{page-1e1eb2f79d606ab2.js → page-66ee4e631429e0d8.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/limits/page-c979e11de71281de.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/logs/{page-95e4b5e0bf023d76.js → page-6e4bcb48b8731915.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/mcp/page-8e35334b9f393139.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/media/page-fc10371ce5bdbce6.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/onboarding/{page-5378e9473a20cd6a.js → page-d424641c7e428be9.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/page-d75ccdb976b36258.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/playground/{page-447998e91a92c56d.js → page-7a6b51b059e68468.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-3c3feb78cfbe855c.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/{error-a5ae03ba05400b04.js → error-0400f175dd1372fa.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/loading-9552383fd2e11282.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/new/page-d57908b59d4b482c.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/{page-e8b8cb84b421b676.js → page-a3b2395f513e893f.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/settings/{error-ec9643134a96bbcd.js → error-c39d18f10fb7d3f6.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/settings/{loading-3519a633b514f31a.js → loading-b5faf05c78a2cc54.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/settings/{page-cbaa4b638a583fe9.js → page-6b38a30bfddf3b89.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/settings/pricing/{page-69eb8b0eb0e9de00.js → page-a4b8b03ffb39da1d.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/translator/{page-10c186a0db5fde20.js → page-9168bf910743b2f5.js} +2 -2
- package/app/.next/static/chunks/app/(dashboard)/dashboard/usage/page-9e20463252daf023.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/{layout-7ae0c66c22bee8a1.js → layout-6d0afc53f5f2a538.js} +1 -1
- package/app/.next/static/chunks/app/400/{page-3b9079ea400ca287.js → page-3b77bf358909019a.js} +1 -1
- package/app/.next/static/chunks/app/401/{page-3b9079ea400ca287.js → page-3b77bf358909019a.js} +1 -1
- package/app/.next/static/chunks/app/403/{page-3b9079ea400ca287.js → page-3b77bf358909019a.js} +1 -1
- package/app/.next/static/chunks/app/408/{page-3b9079ea400ca287.js → page-3b77bf358909019a.js} +1 -1
- package/app/.next/static/chunks/app/429/page-3b77bf358909019a.js +1 -0
- package/app/.next/static/chunks/app/500/page-3b77bf358909019a.js +1 -0
- package/app/.next/static/chunks/app/502/page-3b77bf358909019a.js +1 -0
- package/app/.next/static/chunks/app/503/page-3b77bf358909019a.js +1 -0
- package/app/.next/static/chunks/app/callback/{page-0f0ebc0820dd18a5.js → page-585a53f7dc6a30f1.js} +1 -1
- package/app/.next/static/chunks/app/docs/{page-dc88e0a01d291518.js → page-9624e5fb8cabf7d8.js} +1 -1
- package/app/.next/static/chunks/app/{error-32c03f14529d3920.js → error-f7f595c541537e63.js} +1 -1
- package/app/.next/static/chunks/app/forbidden/page-b33079c1573b0bfa.js +1 -0
- package/app/.next/static/chunks/app/forgot-password/page-90cd6259c75badfc.js +1 -0
- package/app/.next/static/chunks/app/global-error-1dfd1c91ad5199fe.js +1 -0
- package/app/.next/static/chunks/app/landing/page-9d540ab1716f8e3e.js +1 -0
- package/app/.next/static/chunks/app/{layout-070972eb026af319.js → layout-108592eafb959363.js} +1 -1
- package/app/.next/static/chunks/app/{loading-da2f6e1471afc070.js → loading-e063375d5b12a2f7.js} +1 -1
- package/app/.next/static/chunks/app/login/{page-26d717c652d56032.js → page-cf6b82187b09a701.js} +1 -1
- package/app/.next/static/chunks/app/maintenance/page-3b77bf358909019a.js +1 -0
- package/app/.next/static/chunks/app/not-found-511518956bcae7bc.js +1 -0
- package/app/.next/static/chunks/app/offline/page-9d6ea493783a0219.js +1 -0
- package/app/.next/static/chunks/app/privacy/{page-dc88e0a01d291518.js → page-9624e5fb8cabf7d8.js} +1 -1
- package/app/.next/static/chunks/app/status/page-4e5e9b5a513aa474.js +1 -0
- package/app/.next/static/chunks/app/terms/{page-dc88e0a01d291518.js → page-9624e5fb8cabf7d8.js} +1 -1
- package/app/.next/static/chunks/{main-app-ae230f6bf51a5edb.js → main-app-c9da11a8061df107.js} +1 -1
- package/app/node_modules/@swc/helpers/package.json +228 -5
- package/app/package.json +6 -2
- package/app/server.js +1 -1
- package/app/src/mitm/server.ts +17 -3
- package/package.json +6 -2
- package/app/.env +0 -122
- package/app/.next/server/chunks/1909.js +0 -2
- package/app/.next/server/chunks/359.js +0 -1
- package/app/.next/server/chunks/4133.js +0 -1
- package/app/.next/server/chunks/7167.js +0 -1
- package/app/.next/server/chunks/9854.js +0 -9
- package/app/.next/static/chunks/1149-fefe7f95f0e9842f.js +0 -1
- package/app/.next/static/chunks/5846-d3aa3ba9dd16fa55.js +0 -2
- package/app/.next/static/chunks/app/(dashboard)/dashboard/a2a/page-ed1f5b1ae0e01c02.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/analytics/loading-6a2bb3ad980b05b9.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/api-manager/page-027b3eb09d2d46e0.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/audit-log/page-c9b98846b8479f3f.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/cli-tools/page-ad968920ad7029fd.js +0 -15
- package/app/.next/static/chunks/app/(dashboard)/dashboard/combos/page-ac5dcffbe54f77f9.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/endpoint/page-36f33de29eb978a1.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/limits/page-65334129a8e63369.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/mcp/page-d9b5c3282ec5d809.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/media/page-adb79ef07d8dd6c5.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/page-40d20c1273f57206.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-350aed2e86512c23.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/loading-7deaa9f550841465.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/new/page-3ef302da4b756e50.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/usage/page-8c8f2d59d0cbb516.js +0 -1
- package/app/.next/static/chunks/app/429/page-3b9079ea400ca287.js +0 -1
- package/app/.next/static/chunks/app/500/page-3b9079ea400ca287.js +0 -1
- package/app/.next/static/chunks/app/502/page-3b9079ea400ca287.js +0 -1
- package/app/.next/static/chunks/app/503/page-3b9079ea400ca287.js +0 -1
- package/app/.next/static/chunks/app/forbidden/page-8d8e1709a1e32585.js +0 -1
- package/app/.next/static/chunks/app/forgot-password/page-d5c9b77748aa9deb.js +0 -1
- package/app/.next/static/chunks/app/global-error-5840b1caa830f2ec.js +0 -1
- package/app/.next/static/chunks/app/landing/page-75b0c988db383cfc.js +0 -1
- package/app/.next/static/chunks/app/maintenance/page-3b9079ea400ca287.js +0 -1
- package/app/.next/static/chunks/app/not-found-faf36d2a9a452506.js +0 -1
- package/app/.next/static/chunks/app/offline/page-bf68bf461af876a3.js +0 -1
- package/app/.next/static/chunks/app/status/page-29a433b40631ce12.js +0 -1
- package/app/node_modules/better-sqlite3/build/Release/better_sqlite3.node +0 -0
- /package/app/.next/static/{xYoMYiq2lWi73ieYn-e4s → QcfAPzrFrahcOIJTqWlXo}/_buildManifest.js +0 -0
- /package/app/.next/static/{xYoMYiq2lWi73ieYn-e4s → QcfAPzrFrahcOIJTqWlXo}/_ssgManifest.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6099],{21583:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>k});var a=t(95155),l=t(12115),r=t(40993),i=t(14051),n=t.n(i),o=t(98500),c=t.n(o),d=t(30949),m=t(20909),x=t(50910);let p=t(41463).env.NEXT_PUBLIC_CLOUD_URL||null,u=15e3;function b({machineId:e}){let s=(0,x.c)("endpoint"),t=(0,x.c)("common"),[i,n]=(0,l.useState)(!0),[o,m]=(0,l.useState)([]),[b,f]=(0,l.useState)(null),[j,y]=(0,l.useState)(!1),[v,N]=(0,l.useState)(!1),[k,w]=(0,l.useState)(!1),[C,S]=(0,l.useState)(!1),[T,_]=(0,l.useState)(null),[A,P]=(0,l.useState)(""),[E,$]=(0,l.useState)(!1),[R,D]=(0,l.useState)(null),[M,O]=(0,l.useState)(p),[q,I]=(0,l.useState)("api"),[U,B]=(0,l.useState)(null),[Q,L]=(0,l.useState)(null),{copied:F,copy:z}=(0,d.C)();(0,l.useEffect)(()=>{Promise.allSettled([V(),W(),Z()]).finally(()=>{n(!1)})},[]);let W=async()=>{try{let e=await fetch("/v1/models");if(e.ok){let s=await e.json();m(s.data||[])}}catch(e){console.log("Error fetching models:",e)}},Z=async()=>{try{let[e,s]=await Promise.allSettled([fetch("/api/mcp/status"),fetch("/api/a2a/status")]);"fulfilled"===e.status&&e.value.ok&&B(await e.value.json()),"fulfilled"===s.status&&s.value.ok&&L(await s.value.json())}catch{}},H=(0,l.useMemo)(()=>{let e=o.filter(e=>!e.type&&!e.parent),s=o.filter(e=>"embedding"===e.type&&!e.parent),t=o.filter(e=>"image"===e.type&&!e.parent),a=o.filter(e=>"rerank"===e.type&&!e.parent),l=o.filter(e=>"audio"===e.type&&"transcription"===e.subtype&&!e.parent);return{chat:e,embeddings:s,images:t,rerank:a,audioTranscription:l,audioSpeech:o.filter(e=>"audio"===e.type&&"speech"===e.subtype&&!e.parent),moderation:o.filter(e=>"moderation"===e.type&&!e.parent)}},[o]),J=async(e,t=u)=>{let a=new AbortController,l=setTimeout(()=>a.abort(),t);try{let s=await fetch("/api/sync/cloud",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:e}),signal:a.signal}),t=await s.json().catch(()=>({}));return{ok:s.ok,status:s.status,data:t}}catch(e){if(e?.name==="AbortError")return{ok:!1,status:408,data:{error:s("cloudRequestTimeout")}};return{ok:!1,status:500,data:{error:e.message||s("cloudRequestFailed")}}}finally{clearTimeout(l)}},V=async()=>{try{let e=await fetch("/api/settings");if(e.ok){let s=await e.json();y(s.cloudEnabled||!1)}}catch(e){console.log("Error loading cloud settings:",e)}},X=e=>{e?N(!0):w(!0)};(0,l.useEffect)(()=>{if(T){let e=setTimeout(()=>_(null),5e3);return()=>clearTimeout(e)}},[T]),(0,l.useEffect)(()=>{let e=setInterval(Z,3e4);return()=>clearInterval(e)},[]);let G=()=>{globalThis.dispatchEvent(new Event("cloud-status-changed"))},Y=async()=>{S(!0),$(!1),P("syncing");try{let{ok:e,status:t,data:a}=await J("enable");if(e)P("verifying"),await new Promise(e=>setTimeout(e,600)),y(!0),P("done"),$(!0),S(!1),G(),await new Promise(e=>setTimeout(e,1200)),N(!1),$(!1),a.verified?_({type:"success",message:s("cloudConnectedVerified")}):_({type:"warning",message:a.verifyError?s("connectedVerificationPendingWithError",{error:a.verifyError}):s("connectedVerificationPending")}),a.cloudUrl&&O(a.cloudUrl),await V();else{let e=a.error||s("failedEnable");(502===t||408===t)&&(e=s("cloudWorkerUnreachable")),_({type:"error",message:e}),N(!1)}}catch(e){_({type:"error",message:e.message||s("connectionFailed")}),N(!1)}finally{S(!1),P("")}},K=async()=>{S(!0),P("syncing");try{await J("sync"),P("disabling");let{ok:e,data:t}=await J("disable");e?(y(!1),_({type:"success",message:s("cloudDisabledSuccess")}),w(!1),G(),await V()):_({type:"error",message:t.error||s("failedDisable")})}catch(e){console.log("Error disabling cloud:",e),_({type:"error",message:s("failedDisable")})}finally{S(!1),P("")}},[ee,es]=(0,l.useState)("/v1"),et=M?`${M}/v1`:null;if((0,l.useEffect)(()=>{es(`${window.location.origin}/v1`)},[]),i)return(0,a.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,a.jsx)(r.Qv,{}),(0,a.jsx)(r.Qv,{})]});let ea=j&&et?et:ee,el=!!U?.online,er=Q?.status==="ok",ei=Number(U?.heartbeat?.toolCount||0),en=Number(Q?.tasks?.activeStreams||0);return(0,a.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,a.jsxs)(r.Zp,{className:"",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:s("title")}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:j?s("usingCloudProxy"):s("usingLocalServer")}),e&&(0,a.jsx)("p",{className:"text-xs text-text-muted mt-1",children:s("machineId",{id:e.slice(0,8)})})]}),(0,a.jsx)("div",{className:"flex items-center gap-2",children:j?(0,a.jsx)(r.$n,{size:"sm",variant:"secondary",icon:"cloud_off",onClick:()=>X(!1),disabled:C,className:"bg-red-500/10! text-red-500! hover:bg-red-500/20! border-red-500/30!",children:s("disableCloud")}):(0,a.jsx)(r.$n,{variant:"primary",icon:"cloud_upload",onClick:()=>X(!0),disabled:C,className:"bg-linear-to-r from-primary to-blue-500 hover:from-primary-hover hover:to-blue-600",children:s("enableCloud")})})]}),T&&(0,a.jsxs)("div",{className:`flex items-center gap-2 px-4 py-2.5 rounded-lg mb-4 text-sm font-medium animate-in fade-in slide-in-from-top-2 duration-300 ${"success"===T.type?"bg-green-500/10 border border-green-500/30 text-green-400":"warning"===T.type?"bg-amber-500/10 border border-amber-500/30 text-amber-400":"bg-red-500/10 border border-red-500/30 text-red-400"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"success"===T.type?"check_circle":"warning"===T.type?"warning":"error"}),(0,a.jsx)("span",{className:"flex-1",children:T.message}),(0,a.jsx)("button",{onClick:()=>_(null),className:"p-0.5 hover:bg-white/10 rounded transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"close"})})]}),(0,a.jsxs)("div",{className:"flex gap-2 mb-3",children:[(0,a.jsx)(r.pd,{value:ea,readOnly:!0,className:`flex-1 font-mono text-sm ${j?"animate-border-glow":""}`}),(0,a.jsx)(r.$n,{variant:"secondary",icon:"endpoint_url"===F?"check":"content_copy",onClick:()=>z(ea,"endpoint_url"),children:t("endpoint_url"===F?"copied":"copy")})]})]}),(0,a.jsx)(r.Zp,{children:(0,a.jsxs)("div",{className:"flex flex-wrap gap-3 items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:s("sectionTitle")||"Integration Surface"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:s("sectionDescription")||"OpenAI-compatible APIs and operational protocol endpoints"})]}),(0,a.jsx)(r.Iz,{options:[{value:"api",label:s("tabApis")||"OpenAI-compatible APIs",icon:"api"},{value:"protocols",label:s("tabProtocols")||"Protocols",icon:"hub"}],value:q,onChange:I,"aria-label":s("tabsAria")||"Endpoint sections"})]})}),"api"===q?(0,a.jsxs)(r.Zp,{children:[(0,a.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:s("available")}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:s("modelsAcrossEndpoints",{models:Object.values(H).reduce((e,s)=>e+s.length,0),endpoints:[H.chat,H.embeddings,H.images,H.rerank,H.audioTranscription,H.audioSpeech,H.moderation].filter(e=>e.length>0).length+2})})]})}),(0,a.jsxs)("div",{className:"mb-6",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm text-primary",children:"hub"}),(0,a.jsx)("h3",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:s("categoryCore")||"Core APIs"}),(0,a.jsx)("div",{className:"flex-1 h-px bg-border/50"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsx)(g,{icon:"chat",iconColor:"text-blue-500",iconBg:"bg-blue-500/10",title:s("chatCompletions"),path:"/v1/chat/completions",description:s("chatDesc"),models:H.chat,expanded:"chat"===b,onToggle:()=>f("chat"===b?null:"chat"),copy:z,copied:F,baseUrl:ea}),(0,a.jsx)(g,{icon:"code",iconColor:"text-indigo-500",iconBg:"bg-indigo-500/10",title:s("responses")||"Responses API",path:"/v1/responses",description:s("responsesDesc")||"OpenAI Responses API for Codex and advanced agentic workflows",models:H.chat,expanded:"responses"===b,onToggle:()=>f("responses"===b?null:"responses"),copy:z,copied:F,baseUrl:ea})]})]}),(0,a.jsxs)("div",{className:"mb-6",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm text-purple-400",children:"perm_media"}),(0,a.jsx)("h3",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:s("categoryMedia")||"Media & Multi-Modal"}),(0,a.jsx)("div",{className:"flex-1 h-px bg-border/50"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsx)(g,{icon:"data_array",iconColor:"text-emerald-500",iconBg:"bg-emerald-500/10",title:s("embeddings"),path:"/v1/embeddings",description:s("embeddingsDesc"),models:H.embeddings,expanded:"embeddings"===b,onToggle:()=>f("embeddings"===b?null:"embeddings"),copy:z,copied:F,baseUrl:ea}),(0,a.jsx)(g,{icon:"image",iconColor:"text-purple-500",iconBg:"bg-purple-500/10",title:s("imageGeneration"),path:"/v1/images/generations",description:s("imageDesc"),models:H.images,expanded:"images"===b,onToggle:()=>f("images"===b?null:"images"),copy:z,copied:F,baseUrl:ea}),(0,a.jsx)(g,{icon:"mic",iconColor:"text-rose-500",iconBg:"bg-rose-500/10",title:s("audioTranscription"),path:"/v1/audio/transcriptions",description:s("audioTranscriptionDesc"),models:H.audioTranscription,expanded:"audioTranscription"===b,onToggle:()=>f("audioTranscription"===b?null:"audioTranscription"),copy:z,copied:F,baseUrl:ea}),(0,a.jsx)(g,{icon:"record_voice_over",iconColor:"text-cyan-500",iconBg:"bg-cyan-500/10",title:s("textToSpeech"),path:"/v1/audio/speech",description:s("textToSpeechDesc"),models:H.audioSpeech,expanded:"audioSpeech"===b,onToggle:()=>f("audioSpeech"===b?null:"audioSpeech"),copy:z,copied:F,baseUrl:ea})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm text-amber-400",children:"build"}),(0,a.jsx)("h3",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:s("categoryUtility")||"Utility & Management"}),(0,a.jsx)("div",{className:"flex-1 h-px bg-border/50"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsx)(g,{icon:"sort",iconColor:"text-amber-500",iconBg:"bg-amber-500/10",title:s("rerank"),path:"/v1/rerank",description:s("rerankDesc"),models:H.rerank,expanded:"rerank"===b,onToggle:()=>f("rerank"===b?null:"rerank"),copy:z,copied:F,baseUrl:ea}),(0,a.jsx)(g,{icon:"shield",iconColor:"text-orange-500",iconBg:"bg-orange-500/10",title:s("moderations"),path:"/v1/moderations",description:s("moderationsDesc"),models:H.moderation,expanded:"moderation"===b,onToggle:()=>f("moderation"===b?null:"moderation"),copy:z,copied:F,baseUrl:ea}),(0,a.jsx)(g,{icon:"list",iconColor:"text-teal-500",iconBg:"bg-teal-500/10",title:s("listModels")||"List Models",path:"/v1/models",description:s("listModelsDesc")||"List all available models across all connected providers",models:[],expanded:"models"===b,onToggle:()=>f("models"===b?null:"models"),copy:z,copied:F,baseUrl:ea})]})]})]}):(0,a.jsx)(r.Zp,{children:(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:s("protocolsTitle")||"Protocols"}),(0,a.jsx)("p",{className:"text-sm text-text-muted mt-1",children:s("protocolsDescription")||"MCP and A2A are first-class endpoints with dedicated observability and controls."})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{className:"rounded-xl border border-border p-4 bg-bg-subtle",children:[(0,a.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("h3",{className:"font-semibold flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary text-[18px]",children:"hub"}),s("mcpCardTitle")||"MCP Server"]}),(0,a.jsx)("p",{className:"text-xs text-text-muted mt-1",children:s("mcpCardDescription")||"Model Context Protocol over stdio"})]}),(0,a.jsx)("span",{className:`text-xs px-2 py-1 rounded-full font-semibold ${el?"bg-green-500/15 text-green-500":"bg-red-500/15 text-red-500"}`,children:t(el?"active":"inactive")})]}),(0,a.jsxs)("div",{className:"mt-3 text-xs text-text-muted space-y-1",children:[(0,a.jsxs)("p",{children:[s("protocolToolsLabel")||"Tools",":"," ",(0,a.jsx)("span",{className:"text-text-main font-semibold",children:ei||16})]}),(0,a.jsxs)("p",{children:[s("protocolLastActivity")||"Last activity",":"," ",(0,a.jsx)("span",{className:"text-text-main",children:U?.activity?.lastCallAt?new Date(U.activity.lastCallAt).toLocaleString():"—"})]})]}),(0,a.jsxs)("div",{className:"mt-3 rounded-lg bg-bg p-3 border border-border/70",children:[(0,a.jsx)("p",{className:"text-xs font-semibold mb-1",children:s("quickStart")||"Quick Start"}),(0,a.jsx)("code",{className:"text-xs font-mono break-all",children:"omniroute --mcp"})]}),(0,a.jsx)("div",{className:"mt-3",children:(0,a.jsxs)(c(),{href:"/dashboard/mcp",className:"text-sm text-primary hover:text-primary-hover transition-colors",children:[s("openMcpDashboard")||"Open MCP management"," →"]})})]}),(0,a.jsxs)("div",{className:"rounded-xl border border-border p-4 bg-bg-subtle",children:[(0,a.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("h3",{className:"font-semibold flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary text-[18px]",children:"group_work"}),s("a2aCardTitle")||"A2A Server"]}),(0,a.jsx)("p",{className:"text-xs text-text-muted mt-1",children:s("a2aCardDescription")||"Agent2Agent JSON-RPC endpoint"})]}),(0,a.jsx)("span",{className:`text-xs px-2 py-1 rounded-full font-semibold ${er?"bg-green-500/15 text-green-500":"bg-red-500/15 text-red-500"}`,children:t(er?"active":"inactive")})]}),(0,a.jsxs)("div",{className:"mt-3 text-xs text-text-muted space-y-1",children:[(0,a.jsxs)("p",{children:[s("protocolTasksLabel")||"Tasks",":"," ",(0,a.jsx)("span",{className:"text-text-main font-semibold",children:Q?.tasks?.total||0})]}),(0,a.jsxs)("p",{children:[s("protocolActiveStreamsLabel")||"Active streams",":"," ",(0,a.jsx)("span",{className:"text-text-main font-semibold",children:en})]})]}),(0,a.jsxs)("div",{className:"mt-3 rounded-lg bg-bg p-3 border border-border/70",children:[(0,a.jsx)("p",{className:"text-xs font-semibold mb-1",children:s("quickStart")||"Quick Start"}),(0,a.jsxs)("code",{className:"text-xs font-mono break-all",children:[ee.replace(/\/v1$/,""),"/a2a"]})]}),(0,a.jsx)("div",{className:"mt-3",children:(0,a.jsxs)(c(),{href:"/dashboard/a2a",className:"text-sm text-primary hover:text-primary-hover transition-colors",children:[s("openA2aDashboard")||"Open A2A management"," →"]})})]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{className:"rounded-xl border border-border p-4 bg-bg-subtle",children:[(0,a.jsx)("h4",{className:"font-semibold mb-2",children:s("mcpQuickStartTitle")||"MCP Quick Start"}),(0,a.jsxs)("ol",{className:"text-sm text-text-muted space-y-1 list-decimal list-inside",children:[(0,a.jsx)("li",{children:s("mcpQuickStartStep1")||"Run the MCP server via `omniroute --mcp`."}),(0,a.jsx)("li",{children:s("mcpQuickStartStep2")||"Configure your MCP client to connect over stdio transport."}),(0,a.jsx)("li",{children:s("mcpQuickStartStep3")||"Invoke tools such as `omniroute_get_health` and `omniroute_list_combos`."})]})]}),(0,a.jsxs)("div",{className:"rounded-xl border border-border p-4 bg-bg-subtle",children:[(0,a.jsx)("h4",{className:"font-semibold mb-2",children:s("a2aQuickStartTitle")||"A2A Quick Start"}),(0,a.jsxs)("ol",{className:"text-sm text-text-muted space-y-1 list-decimal list-inside",children:[(0,a.jsx)("li",{children:s("a2aQuickStartStep1")||"Discover the agent card at `/.well-known/agent.json`."}),(0,a.jsx)("li",{children:s("a2aQuickStartStep2")||"Send JSON-RPC requests to `POST /a2a` using `message/send` or `message/stream`."}),(0,a.jsx)("li",{children:s("a2aQuickStartStep3")||"Track and control tasks using `tasks/get` and `tasks/cancel`."})]})]})]})]})}),(0,a.jsx)(r.aF,{isOpen:v,title:s("enableCloudTitle"),onClose:()=>N(!1),children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"bg-blue-50 dark:bg-blue-900/20 border border-blue-200 dark:border-blue-800 rounded-lg p-4",children:[(0,a.jsx)("p",{className:"text-sm text-blue-800 dark:text-blue-200 font-medium mb-2",children:s("whatYouGet")}),(0,a.jsxs)("ul",{className:"text-sm text-blue-700 dark:text-blue-300 space-y-1",children:[(0,a.jsxs)("li",{children:["• ",s("cloudBenefitAccess")]}),(0,a.jsxs)("li",{children:["• ",s("cloudBenefitShare")]}),(0,a.jsxs)("li",{children:["• ",s("cloudBenefitPorts")]}),(0,a.jsxs)("li",{children:["• ",s("cloudBenefitEdge")]})]})]}),(0,a.jsxs)("div",{className:"bg-yellow-50 dark:bg-yellow-900/20 border border-yellow-200 dark:border-yellow-800 rounded-lg p-4",children:[(0,a.jsx)("p",{className:"text-sm text-yellow-800 dark:text-yellow-200 font-medium mb-1",children:t("note")}),(0,a.jsxs)("ul",{className:"text-sm text-yellow-700 dark:text-yellow-300 space-y-1",children:[(0,a.jsxs)("li",{children:["• ",s("cloudSessionNote")]}),(0,a.jsxs)("li",{children:["• ",s("cloudUnstableNote")]})]})]}),(C||E)&&(0,a.jsxs)("div",{className:`flex items-center gap-3 p-3 rounded-lg border transition-all duration-300 ${E?"bg-green-500/10 border-green-500/30":"bg-primary/10 border-primary/30"}`,children:[E?(0,a.jsx)("span",{className:"material-symbols-outlined text-green-500 text-xl",children:"check_circle"}):(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-primary",children:"progress_activity"}),(0,a.jsx)("div",{className:"flex-1",children:(0,a.jsxs)("p",{className:`text-sm font-medium ${E?"text-green-500":"text-primary"}`,children:[E&&s("cloudConnected"),!E&&"syncing"===A&&s("connectingToCloud"),!E&&"verifying"===A&&s("verifyingConnection")]})})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(r.$n,{onClick:Y,fullWidth:!0,disabled:C||E,children:C?(0,a.jsxs)("span",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),"syncing"===A?s("connecting"):s("verifying")]}):E?(0,a.jsxs)("span",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"check"}),s("connected")]}):s("enableCloud")}),(0,a.jsx)(r.$n,{onClick:()=>N(!1),variant:"ghost",fullWidth:!0,disabled:C||E,children:t("cancel")})]})]})}),(0,a.jsx)(r.aF,{isOpen:k,title:s("disableCloudTitle"),onClose:()=>!C&&w(!1),children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)("div",{className:"bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg p-4",children:(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-red-600 dark:text-red-400",children:"warning"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm text-red-800 dark:text-red-200 font-medium mb-1",children:t("warning")}),(0,a.jsx)("p",{className:"text-sm text-red-700 dark:text-red-300",children:s("disableWarning")})]})]})}),C&&(0,a.jsxs)("div",{className:"flex items-center gap-3 p-3 bg-primary/10 border border-primary/30 rounded-lg",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-primary",children:"progress_activity"}),(0,a.jsx)("div",{className:"flex-1",children:(0,a.jsxs)("p",{className:"text-sm font-medium text-primary",children:["syncing"===A&&s("syncingData"),"disabling"===A&&s("disablingCloud")]})})]}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:s("disableConfirm")}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(r.$n,{onClick:K,fullWidth:!0,disabled:C,className:"bg-red-500! hover:bg-red-600! text-white!",children:C?(0,a.jsxs)("span",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),"syncing"===A?s("syncing"):s("disabling")]}):s("disableCloud")}),(0,a.jsx)(r.$n,{onClick:()=>w(!1),variant:"ghost",fullWidth:!0,disabled:C,children:t("cancel")})]})]})}),R&&(0,a.jsx)(h,{provider:R,models:o,copy:z,copied:F,onClose:()=>D(null)})]})}function h({provider:e,models:s,copy:t,copied:i,onClose:n}){let o=(0,x.c)("endpoint"),c=(0,x.c)("common"),d=e.provider.alias||e.id,m=(0,l.useMemo)(()=>s.filter(s=>!s.parent&&(s.owned_by===d||s.owned_by===e.id)),[s,d,e.id]),p=m.filter(e=>!e.type),u=m.filter(e=>"embedding"===e.type),b=m.filter(e=>"image"===e.type),h=(e,s,l)=>0===l.length?null:(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsxs)("h4",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider mb-2 flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:s}),e," (",l.length,")"]}),(0,a.jsx)("div",{className:"flex flex-col gap-1",children:l.map(e=>{let s=`modal-${e.id}`;return(0,a.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg hover:bg-surface/60 group",children:[(0,a.jsx)("code",{className:"text-sm font-mono flex-1 truncate",children:e.id}),e.custom&&(0,a.jsx)("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-primary/10 text-primary",children:o("custom")}),(0,a.jsx)("button",{onClick:()=>t(e.id,s),className:"p-1 hover:bg-sidebar rounded text-text-muted hover:text-primary opacity-0 group-hover:opacity-100 transition-opacity",title:c("copy"),children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:i===s?"check":"content_copy"})})]},e.id)})})]});return(0,a.jsx)(r.aF,{isOpen:!0,onClose:n,title:o("providerModelsTitle",{provider:e.provider.name}),children:(0,a.jsx)("div",{className:"max-h-[60vh] overflow-y-auto",children:0===m.length?(0,a.jsx)("p",{className:"text-sm text-text-muted py-4 text-center",children:o("noModelsForProvider")}):(0,a.jsxs)(a.Fragment,{children:[h(o("chat"),"chat",p),h(o("embedding"),"data_array",u),h(o("image"),"image",b)]})})})}function g({icon:e,iconColor:s,iconBg:t,title:r,path:i,description:n,models:o,expanded:c,onToggle:d,copy:p,copied:u,baseUrl:b}){let h=(0,x.c)("endpoint"),g=(0,l.useMemo)(()=>{let e={};for(let s of o){let t=s.owned_by||"unknown";e[t]||(e[t]=[]),e[t].push(s)}return Object.entries(e).sort((e,s)=>s[1].length-e[1].length)},[o]),f=e=>m.Q2[e]||(0,m.zt)(e),j=`endpoint_${i}`;return(0,a.jsxs)("div",{className:"border border-border rounded-lg overflow-hidden",children:[(0,a.jsxs)("button",{onClick:d,className:"w-full flex items-center gap-3 p-4 hover:bg-surface/50 transition-colors text-left",children:[(0,a.jsx)("div",{className:`flex items-center justify-center size-10 rounded-lg ${t} shrink-0`,children:(0,a.jsx)("span",{className:`material-symbols-outlined text-xl ${s}`,children:e})}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"font-semibold text-sm",children:r}),(0,a.jsx)("span",{className:"text-xs px-2 py-0.5 rounded-full bg-surface text-text-muted font-medium",children:h("modelsCount",{count:o.length})})]}),(0,a.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:n})]}),(0,a.jsx)("span",{className:`material-symbols-outlined text-text-muted text-lg transition-transform ${c?"rotate-180":""}`,children:"expand_more"})]}),c&&(0,a.jsxs)("div",{className:"border-t border-border px-4 pb-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mt-3 mb-3",children:[(0,a.jsxs)("code",{className:"flex-1 text-xs font-mono text-text-muted bg-surface/80 px-3 py-1.5 rounded-lg truncate",children:[b.replace(/\/v1$/,""),i]}),(0,a.jsx)("button",{onClick:()=>p(`${b.replace(/\/v1$/,"")}${i}`,j),className:"p-1.5 hover:bg-surface rounded-lg text-text-muted hover:text-primary transition-colors shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:u===j?"check":"content_copy"})})]}),(0,a.jsx)("div",{className:"flex flex-col gap-2",children:g.map(([e,s])=>(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,a.jsx)("div",{className:"size-2.5 rounded-full shrink-0",style:{backgroundColor:f(e)?.color||"#888"}}),(0,a.jsx)("span",{className:"text-xs font-semibold text-text-main",children:f(e)?.name||e}),(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["(",s.length,")"]})]}),(0,a.jsx)("div",{className:"ml-5 flex flex-wrap gap-1.5",children:s.map(e=>(0,a.jsx)("span",{className:"text-xs px-2 py-0.5 rounded-md bg-surface/80 text-text-muted font-mono",title:e.id,children:e.root||e.id.split("/").pop()},e.id))})]},e))})]})]})}b.propTypes={machineId:n().string.isRequired},h.propTypes={provider:n().object.isRequired,models:n().array.isRequired,copy:n().func.isRequired,copied:n().string,onClose:n().func.isRequired},g.propTypes={icon:n().string.isRequired,iconColor:n().string.isRequired,iconBg:n().string.isRequired,title:n().string.isRequired,path:n().string.isRequired,description:n().string.isRequired,models:n().array.isRequired,expanded:n().bool.isRequired,onToggle:n().func.isRequired,copy:n().func.isRequired,copied:n().string,baseUrl:n().string.isRequired};var f=t(24726),j=t(14816);function y(){let e=(0,x.c)("endpoints");return(0,a.jsxs)("div",{className:"p-6 max-w-5xl mx-auto space-y-6",children:[(0,a.jsxs)(r.Zp,{className:"p-8 text-center space-y-4",children:[(0,a.jsx)("div",{className:"flex items-center justify-center size-16 rounded-2xl bg-primary/10 text-primary mx-auto",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[32px]",children:"code"})}),(0,a.jsx)("h2",{className:"text-xl font-semibold",children:e("apiEndpointsTitle")}),(0,a.jsx)("p",{className:"text-sm text-text-muted max-w-md mx-auto",children:e("apiEndpointsDescription")}),(0,a.jsxs)("div",{className:"inline-flex items-center gap-2 px-4 py-2 rounded-full bg-amber-500/10 text-amber-500 text-sm font-medium",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"construction"}),e("comingSoon")]})]}),(0,a.jsxs)(r.Zp,{className:"p-5",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold mb-3",children:e("plannedFeatures")}),(0,a.jsxs)("ul",{className:"space-y-2 text-sm text-text-muted",children:[(0,a.jsxs)("li",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-primary",children:"check_circle"}),e("featureRestApi")]}),(0,a.jsxs)("li",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-primary",children:"check_circle"}),e("featureWebhooks")]}),(0,a.jsxs)("li",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-primary",children:"check_circle"}),e("featureSwagger")]}),(0,a.jsxs)("li",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-primary",children:"check_circle"}),e("featureAuth")]})]})]})]})}function v({label:e,status:s,enabled:t,onToggle:l,toggling:r}){return(0,a.jsxs)("div",{className:"flex items-center gap-3 ml-auto",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5 px-2.5 py-1 rounded-full text-xs font-medium border",style:{borderColor:s.loading?"var(--color-border)":s.online?"rgba(34,197,94,0.3)":"rgba(239,68,68,0.3)",background:s.loading?"transparent":s.online?"rgba(34,197,94,0.1)":"rgba(239,68,68,0.1)",color:s.loading?"var(--color-text-muted)":s.online?"rgb(34,197,94)":"rgb(239,68,68)"},children:[(0,a.jsx)("span",{className:"inline-block w-2 h-2 rounded-full",style:{background:s.loading?"var(--color-text-muted)":s.online?"rgb(34,197,94)":"rgb(239,68,68)",animation:s.online?"pulse 2s infinite":"none"}}),s.loading?"...":s.online?"Online":"Offline"]}),(0,a.jsx)("button",{onClick:l,disabled:r,className:"relative inline-flex items-center h-7 w-[52px] rounded-full transition-all duration-300 focus:outline-none border",style:{background:t?"rgb(34,197,94)":"var(--color-bg-tertiary)",borderColor:t?"rgba(34,197,94,0.5)":"var(--color-border)",opacity:r?.6:1,cursor:r?"wait":"pointer"},title:t?`Disable ${e}`:`Enable ${e}`,children:(0,a.jsx)("span",{className:"inline-block w-5 h-5 rounded-full shadow-md transition-all duration-300",style:{transform:t?"translateX(26px)":"translateX(3px)",background:t?"#fff":"var(--color-text-muted)"}})}),(0,a.jsx)("span",{className:"text-xs font-medium min-w-[24px]",style:{color:t?"rgb(34,197,94)":"var(--color-text-muted)"},children:r?"...":t?"ON":"OFF"})]})}function N({value:e,onChange:s,disabled:t,baseUrl:l}){let r={stdio:"omniroute --mcp",sse:`${l}/api/mcp/sse`,"streamable-http":`${l}/api/mcp/stream`};return(0,a.jsxs)("div",{className:"rounded-lg border p-4 mt-3",style:{borderColor:"var(--color-border)",background:"var(--color-bg-secondary)"},children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,a.jsx)("span",{className:"material-symbols-rounded text-base",style:{color:"var(--color-primary)"},children:"swap_horiz"}),(0,a.jsx)("span",{className:"text-sm font-medium",style:{color:"var(--color-text)"},children:"Transport Mode"})]}),(0,a.jsx)("div",{className:"flex gap-2 flex-wrap",children:[{value:"stdio",label:"stdio",desc:"Local — IDE spawns process via omniroute --mcp"},{value:"sse",label:"SSE",desc:"Remote — Server-Sent Events over HTTP"},{value:"streamable-http",label:"Streamable HTTP",desc:"Remote — Modern bidirectional HTTP"}].map(l=>(0,a.jsxs)("button",{onClick:()=>s(l.value),disabled:t,className:"flex flex-col items-start px-4 py-2.5 rounded-lg border transition-all duration-200 text-left",style:{borderColor:e===l.value?"var(--color-primary)":"var(--color-border)",background:e===l.value?"rgba(var(--color-primary-rgb, 99,102,241), 0.1)":"transparent",opacity:t?.5:1,cursor:t?"wait":"pointer"},children:[(0,a.jsx)("span",{className:"text-sm font-semibold",style:{color:e===l.value?"var(--color-primary)":"var(--color-text)"},children:l.label}),(0,a.jsx)("span",{className:"text-xs mt-0.5",style:{color:"var(--color-text-muted)"},children:l.desc})]},l.value))}),(0,a.jsxs)("div",{className:"mt-3 rounded-md px-3 py-2 flex items-center gap-2",style:{background:"var(--color-bg-tertiary)"},children:[(0,a.jsx)("span",{className:"material-symbols-rounded text-sm",style:{color:"var(--color-text-muted)"},children:"stdio"===e?"terminal":"link"}),(0,a.jsx)("code",{className:"text-xs break-all",style:{color:"var(--color-text-muted)"},children:r[e]}),"stdio"!==e&&(0,a.jsx)("button",{className:"ml-auto text-xs px-2 py-0.5 rounded border hover:opacity-80 transition-opacity",style:{borderColor:"var(--color-border)",color:"var(--color-text-muted)"},onClick:()=>void navigator.clipboard.writeText(r[e]),title:"Copy URL",children:"Copy"})]})]})}function k(){let[e,s]=(0,l.useState)("endpoint-proxy"),t=(0,x.c)("endpoints"),[i,n]=(0,l.useState)({online:!1,loading:!0}),[o,c]=(0,l.useState)({online:!1,loading:!0}),[d,m]=(0,l.useState)(!1),[p,u]=(0,l.useState)(!1),[h,g]=(0,l.useState)(!1),[k,w]=(0,l.useState)(!1),[C,S]=(0,l.useState)("stdio"),[T,_]=(0,l.useState)(!1),[A,P]=(0,l.useState)("");(0,l.useEffect)(()=>{P(`${window.location.protocol}//${window.location.host}`)},[]),(0,l.useEffect)(()=>{(async()=>{try{let e=await fetch("/api/settings");if(e.ok){let s=await e.json();m(!!s.mcpEnabled),u(!!s.a2aEnabled),S(s.mcpTransport||"stdio")}}catch{}})()},[]);let E=(0,l.useCallback)(async e=>fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),[]),$=(0,l.useCallback)(async e=>{let s="mcp"===e?g:w,t=!("mcp"===e?d:p);s(!0);try{(await E({["mcp"===e?"mcpEnabled":"a2aEnabled"]:t})).ok&&("mcp"===e?m:u)(t)}catch{}finally{s(!1)}},[d,p,E]),R=(0,l.useCallback)(async e=>{_(!0);try{(await E({mcpTransport:e})).ok&&S(e)}catch{}finally{_(!1)}},[E]),D=(0,l.useCallback)(async()=>{n(e=>({...e,loading:!0}));try{let e=await fetch("/api/mcp/status");if(e.ok){let s=await e.json();n({online:!!s.online,loading:!1})}else n({online:!1,loading:!1})}catch{n({online:!1,loading:!1})}},[]),M=(0,l.useCallback)(async()=>{c(e=>({...e,loading:!0}));try{let e=await fetch("/api/a2a/status");if(e.ok){let s=await e.json();c({online:"ok"===s.status,loading:!1})}else c({online:!1,loading:!1})}catch{c({online:!1,loading:!1})}},[]);return(0,l.useEffect)(()=>{let e=()=>{D(),M()};e();let s=setInterval(e,3e4);return()=>clearInterval(s)},[D,M]),(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,a.jsx)(r.Iz,{options:[{value:"endpoint-proxy",label:t("tabProxy"),icon:"api"},{value:"mcp",label:"MCP",icon:"hub"},{value:"a2a",label:"A2A",icon:"group_work"},{value:"api-endpoints",label:t("tabApiEndpoints"),icon:"code"}],value:e,onChange:s}),"mcp"===e&&(0,a.jsx)(v,{label:"MCP",status:i,enabled:d,onToggle:()=>void $("mcp"),toggling:h}),"a2a"===e&&(0,a.jsx)(v,{label:"A2A",status:o,enabled:p,onToggle:()=>void $("a2a"),toggling:k})]}),"mcp"===e&&d&&(0,a.jsx)(N,{value:C,onChange:e=>void R(e),disabled:T,baseUrl:A}),"endpoint-proxy"===e&&(0,a.jsx)(b,{machineId:""}),"mcp"===e&&(0,a.jsx)(f.default,{}),"a2a"===e&&(0,a.jsx)(j.default,{}),"api-endpoints"===e&&(0,a.jsx)(y,{})]})}},94388:(e,s,t)=>{Promise.resolve().then(t.bind(t,21583))}},e=>{e.O(0,[8500,3418,9751,8055,1149,5846,647,4726,4816,8441,3794,7358],()=>e(e.s=94388)),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8192],{32424:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>x});var a=s(95155),l=s(12115),r=s(40993),n=s(20909),i=s(50910);function c(e){return e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} KB`:`${(e/1048576).toFixed(1)} MB`}let d={CLOSED:{bg:"bg-green-500/10",text:"text-green-500",labelKey:"healthy"},OPEN:{bg:"bg-red-500/10",text:"text-red-500",labelKey:"down"},HALF_OPEN:{bg:"bg-amber-500/10",text:"text-amber-500",labelKey:"recovering"}};function x(){var e;let t,s,x,m,o,u,p=(0,i.c)("health"),h=(0,i.c)("common"),j=(0,i.c)("providers"),[b,f]=(0,l.useState)(null),[g,N]=(0,l.useState)(null),[v,y]=(0,l.useState)(null),[w,$]=(0,l.useState)(null),[C,k]=(0,l.useState)(null),[S,E]=(0,l.useState)(null),[L,D]=(0,l.useState)(!1),O=(0,l.useCallback)(async()=>{try{let e=await fetch("/api/monitoring/health");if(!e.ok)throw Error(`HTTP ${e.status}`);let t=await e.json();f(t),N(null),y(new Date)}catch(e){N(e.message)}},[]),F=(0,l.useCallback)(async()=>{let e=await Promise.allSettled([fetch("/api/telemetry/summary").then(e=>e.json()),fetch("/api/cache/stats").then(e=>e.json()),fetch("/api/rate-limits").then(e=>e.json())]);"fulfilled"===e[0].status&&$(e[0].value),"fulfilled"===e[1].status&&k(e[1].value),"fulfilled"===e[2].status&&e[2].value.cacheStats&&E(e[2].value.cacheStats)},[]);(0,l.useEffect)(()=>{O(),F();let e=setInterval(()=>{O(),F()},15e3);return()=>clearInterval(e)},[O,F]);let z=async()=>{if(confirm(p("resetConfirm"))){D(!0);try{let e=await fetch("/api/monitoring/health",{method:"DELETE"});if(!e.ok)throw Error(`HTTP ${e.status}`);await O(),await F()}catch(e){console.error("Failed to reset health:",e)}finally{D(!1)}}},_=e=>null!=e?p("millisecondsShort",{value:Math.round(e)}):p("notAvailable");if(!b&&!g)return(0,a.jsx)("div",{className:"p-6 flex items-center justify-center min-h-[400px]",children:(0,a.jsxs)("div",{className:"text-center",children:[(0,a.jsx)("div",{className:"inline-block animate-spin rounded-full h-8 w-8 border-b-2 border-primary"}),(0,a.jsx)("p",{className:"text-text-muted mt-4",children:p("loadingHealth")})]})});if(g&&!b)return(0,a.jsx)("div",{className:"p-6",children:(0,a.jsxs)("div",{className:"bg-red-500/10 border border-red-500/30 rounded-xl p-6 text-center",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-red-500 text-[32px] mb-2",children:"error"}),(0,a.jsx)("p",{className:"text-red-400",children:p("failedToLoad",{error:g})}),(0,a.jsx)("button",{onClick:O,className:"mt-4 px-4 py-2 rounded-lg bg-primary/10 text-primary text-sm hover:bg-primary/20 transition-colors",children:p("retry")})]})});let{system:P,providerHealth:T,rateLimitStatus:Z,lockouts:q}=b,A=Object.entries(T||{}),M=Object.entries(q||{});return(0,a.jsxs)("div",{className:"p-6 space-y-6 max-w-6xl mx-auto",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"text-2xl font-bold text-text-main",children:p("title")}),(0,a.jsx)("p",{className:"text-sm text-text-muted mt-1",children:p("description")})]}),(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[v&&(0,a.jsx)("span",{className:"text-xs text-text-muted",children:p("updatedAt",{time:v.toLocaleTimeString()})}),(0,a.jsx)("button",{onClick:()=>{O(),F()},className:"p-2 rounded-lg bg-surface hover:bg-surface/80 text-text-muted hover:text-text-main transition-colors",title:h("refresh"),children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"refresh"})})]})]}),(0,a.jsxs)("div",{role:"status","aria-live":"polite",className:`rounded-xl p-4 flex items-center gap-3 ${"healthy"===b.status?"bg-green-500/10 border border-green-500/20":"bg-red-500/10 border border-red-500/20"}`,children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[24px] ${"healthy"===b.status?"text-green-500":"text-red-500"}`,children:"healthy"===b.status?"check_circle":"error"}),(0,a.jsx)("span",{className:"healthy"===b.status?"text-green-400":"text-red-400",children:"healthy"===b.status?p("allOperational"):p("issuesDetected")})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",children:[(0,a.jsxs)(r.Zp,{className:"p-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-2",children:[(0,a.jsx)("div",{className:"flex items-center justify-center size-8 rounded-lg bg-primary/10 text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"timer"})}),(0,a.jsx)("span",{className:"text-sm text-text-muted",children:p("uptime")})]}),(0,a.jsx)("p",{className:"text-xl font-semibold text-text-main",children:(t=Math.floor((e=P.uptime)/86400),s=Math.floor(e%86400/3600),x=Math.floor(e%3600/60),t>0?`${t}d ${s}h ${x}m`:s>0?`${s}h ${x}m`:`${x}m`)})]}),(0,a.jsxs)(r.Zp,{className:"p-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-2",children:[(0,a.jsx)("div",{className:"flex items-center justify-center size-8 rounded-lg bg-blue-500/10 text-blue-500",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"info"})}),(0,a.jsx)("span",{className:"text-sm text-text-muted",children:p("version")})]}),(0,a.jsxs)("p",{className:"text-xl font-semibold text-text-main",children:["v",P.version]}),(0,a.jsx)("p",{className:"text-xs text-text-muted mt-1",children:p("nodeVersion",{version:P.nodeVersion})})]}),(0,a.jsxs)(r.Zp,{className:"p-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-2",children:[(0,a.jsx)("div",{className:"flex items-center justify-center size-8 rounded-lg bg-purple-500/10 text-purple-500",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"memory"})}),(0,a.jsx)("span",{className:"text-sm text-text-muted",children:p("memoryRss")})]}),(0,a.jsx)("p",{className:"text-xl font-semibold text-text-main",children:c(P.memoryUsage?.rss||0)}),(0,a.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:[p("heap"),": ",c(P.memoryUsage?.heapUsed||0)," /"," ",c(P.memoryUsage?.heapTotal||0)]})]}),(0,a.jsxs)(r.Zp,{className:"p-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-2",children:[(0,a.jsx)("div",{className:"flex items-center justify-center size-8 rounded-lg bg-amber-500/10 text-amber-500",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"dns"})}),(0,a.jsx)("span",{className:"text-sm text-text-muted",children:p("providers")})]}),(0,a.jsx)("p",{className:"text-xl font-semibold text-text-main",children:A.length}),(0,a.jsx)("p",{className:"text-xs text-text-muted mt-1",children:p("healthyCount",{count:A.filter(([,e])=>"CLOSED"===e.state).length})})]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[(0,a.jsxs)(r.Zp,{className:"p-4",children:[(0,a.jsxs)("h3",{className:"text-sm font-semibold text-text-muted mb-3 flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"speed"}),p("latency")]}),w?(0,a.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsx)("span",{className:"text-text-muted",children:p("latencyP50")}),(0,a.jsx)("span",{className:"font-mono",children:_(w.p50)})]}),(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsx)("span",{className:"text-text-muted",children:p("latencyP95")}),(0,a.jsx)("span",{className:"font-mono",children:_(w.p95)})]}),(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsx)("span",{className:"text-text-muted",children:p("latencyP99")}),(0,a.jsx)("span",{className:"font-mono",children:_(w.p99)})]}),(0,a.jsxs)("div",{className:"flex justify-between border-t border-border pt-2 mt-2",children:[(0,a.jsx)("span",{className:"text-text-muted",children:p("totalRequests")}),(0,a.jsx)("span",{className:"font-mono",children:w.totalRequests??0})]})]}):(0,a.jsx)("p",{className:"text-sm text-text-muted",children:p("noDataYet")})]}),(0,a.jsxs)(r.Zp,{className:"p-4",children:[(0,a.jsxs)("h3",{className:"text-sm font-semibold text-text-muted mb-3 flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"cached"}),p("promptCache")]}),C?(0,a.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsx)("span",{className:"text-text-muted",children:p("entries")}),(0,a.jsxs)("span",{className:"font-mono",children:[C.size,"/",C.maxSize]})]}),(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsx)("span",{className:"text-text-muted",children:p("hitRate")}),(0,a.jsxs)("span",{className:"font-mono",children:[C.hitRate?.toFixed(1)??0,"%"]})]}),(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsx)("span",{className:"text-text-muted",children:p("hitsMisses")}),(0,a.jsxs)("span",{className:"font-mono",children:[C.hits??0," / ",C.misses??0]})]})]}):(0,a.jsx)("p",{className:"text-sm text-text-muted",children:p("noDataYet")})]}),(0,a.jsxs)(r.Zp,{className:"p-4",children:[(0,a.jsxs)("h3",{className:"text-sm font-semibold text-text-muted mb-3 flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"database"}),p("signatureCache")]}),S?(0,a.jsx)("div",{className:"grid grid-cols-2 gap-2",children:[{label:p("signatureDefaults"),value:S.defaultCount,color:"text-text-muted"},{label:p("signatureTool"),value:`${S.tool.entries}/${S.tool.patterns}`,color:"text-blue-400"},{label:p("signatureFamily"),value:`${S.family.entries}/${S.family.patterns}`,color:"text-purple-400"},{label:p("signatureSession"),value:`${S.session.entries}/${S.session.patterns}`,color:"text-cyan-400"}].map(({label:e,value:t,color:s})=>(0,a.jsxs)("div",{className:"text-center p-2 rounded-lg bg-surface/30 border border-border/30",children:[(0,a.jsx)("p",{className:`text-lg font-bold tabular-nums ${s}`,children:t}),(0,a.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:e})]},e))}):(0,a.jsx)("p",{className:"text-sm text-text-muted",children:p("noDataYet")})]})]}),(0,a.jsxs)(r.Zp,{className:"p-5",role:"region","aria-label":p("providerHealthStatusAria"),children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,a.jsxs)("h2",{className:"text-lg font-semibold text-text-main flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px] text-primary",children:"health_and_safety"}),p("providerHealth")]}),(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[A.some(([,e])=>"CLOSED"!==e.state)&&(0,a.jsx)("button",{onClick:z,disabled:L,className:`flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-semibold transition-all ${L?"bg-surface/50 text-text-muted cursor-wait":"bg-red-500/10 text-red-400 hover:bg-red-500/20 hover:text-red-300 border border-red-500/20"}`,title:p("resetAllTitle"),children:L?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] animate-spin",children:"progress_activity"}),p("resetting")]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"restart_alt"}),p("resetAll")]})}),A.length>0&&(0,a.jsxs)("div",{className:"flex items-center gap-3 text-xs text-text-muted",children:[(0,a.jsxs)("span",{className:"flex items-center gap-1",children:[(0,a.jsx)("span",{className:"size-2 rounded-full bg-green-500"})," ",p("healthy")]}),(0,a.jsxs)("span",{className:"flex items-center gap-1",children:[(0,a.jsx)("span",{className:"size-2 rounded-full bg-amber-500"})," ",p("recovering")]}),(0,a.jsxs)("span",{className:"flex items-center gap-1",children:[(0,a.jsx)("span",{className:"size-2 rounded-full bg-red-500"})," ",p("down")]})]})]})]}),0===A.length?(0,a.jsx)("p",{className:"text-sm text-text-muted text-center py-4",children:p("noCBData")}):(m=A.filter(([,e])=>"CLOSED"!==e.state),o=A.filter(([,e])=>"CLOSED"===e.state),(0,a.jsxs)("div",{className:"space-y-4",children:[m.length>0&&(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("p",{className:"text-xs font-medium text-red-400 uppercase tracking-wide",children:p("issuesLabel")}),m.map(([e,t])=>{let s=d[t.state]||d.OPEN,l=n.Q2[e],r=l?.name||e;return(0,a.jsxs)("div",{className:`rounded-lg p-3 ${s.bg} border border-white/5 flex items-center gap-3`,children:[(0,a.jsx)("div",{className:"size-8 rounded-lg flex items-center justify-center shrink-0 text-xs font-bold",style:{backgroundColor:`${l?.color||"#888"}15`,color:l?.color||"#888"},children:l?.textIcon||e.slice(0,2).toUpperCase()}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-sm font-medium text-text-main truncate",children:r}),(0,a.jsx)("span",{className:`text-xs font-semibold px-1.5 py-0.5 rounded ${s.bg} ${s.text}`,children:p(s.labelKey)})]}),(0,a.jsxs)("div",{className:"text-xs text-text-muted mt-0.5",children:[1===t.failures?p("failures",{count:t.failures}):p("failuresPlural",{count:t.failures}),t.lastFailure&&(0,a.jsxs)("span",{className:"ml-2",children:["\xb7 ",p("lastFailure"),":"," ",new Date(t.lastFailure).toLocaleTimeString()]})]})]})]},e)})]}),o.length>0&&(0,a.jsxs)("div",{children:[m.length>0&&(0,a.jsx)("p",{className:"text-xs font-medium text-green-400 uppercase tracking-wide mb-2",children:p("operational")}),(0,a.jsx)("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5 gap-2",children:o.map(([e])=>{let t=n.Q2[e],s=t?.name||e;return(0,a.jsxs)("div",{className:"rounded-lg p-2.5 bg-green-500/5 border border-white/5 flex items-center gap-2",children:[(0,a.jsx)("span",{className:"size-2 rounded-full bg-green-500 shrink-0"}),(0,a.jsx)("span",{className:"text-xs font-medium text-text-main truncate",title:s,children:s})]},e)})})]})]}))]}),Z&&Object.keys(Z).length>0&&((u=Object.entries(Z).map(([e,t])=>({key:e,...(e=>{let t,s=e.split(":"),a=s[0],l=s[1]||"",r=s.slice(2).join(":")||null,i=n.Q2[a];if(a.startsWith("openai-compatible-")){let e=a.replace("openai-compatible-","");t=j("openaiCompatibleName"),i={color:"#10A37F",textIcon:"OC"},e.length>12?t+=` (${e.slice(0,8)}…)`:e&&(t+=` (${e})`)}else if(a.startsWith("anthropic-compatible-")){let e=a.replace("anthropic-compatible-","");t=j("anthropicCompatibleName"),i={color:"#D97757",textIcon:"AC"},e.length>12?t+=` (${e.slice(0,8)}…)`:e&&(t+=` (${e})`)}else t=i?.name||a;return{providerId:a,displayName:t,providerInfo:i,connectionId:l,model:r}})(e),status:t}))).sort((e,t)=>{let s=(e.status.queued||0)+(e.status.running||0),a=(t.status.queued||0)+(t.status.running||0);return s!==a?a-s:e.displayName.localeCompare(t.displayName)}),(0,a.jsxs)(r.Zp,{className:"p-5",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,a.jsxs)("h2",{className:"text-lg font-semibold text-text-main flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px] text-amber-500",children:"speed"}),p("rateLimitStatus")]}),(0,a.jsx)("span",{className:"text-xs text-text-muted",children:1===u.length?p("activeLimiters",{count:u.length}):p("activeLimitersPlural",{count:u.length})})]}),(0,a.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3",children:u.map(({key:e,displayName:t,providerInfo:s,connectionId:l,model:r,status:n})=>{let i=(n.queued||0)+(n.running||0)>0,c=(n.queued||0)>0;return(0,a.jsxs)("div",{className:`rounded-lg p-3 border transition-colors ${c?"bg-amber-500/5 border-amber-500/20":i?"bg-blue-500/5 border-blue-500/15":"bg-surface/30 border-white/5"}`,title:e,children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 mb-2",children:[(0,a.jsx)("div",{className:"size-7 rounded-md flex items-center justify-center shrink-0 text-[10px] font-bold",style:{backgroundColor:`${s?.color||"#888"}15`,color:s?.color||"#888"},children:s?.textIcon||t.slice(0,2).toUpperCase()}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium text-text-main truncate",children:t}),l&&(0,a.jsxs)("p",{className:"text-[10px] text-text-muted font-mono truncate",children:[l.length>12?l.slice(0,8)+"…":l,r&&(0,a.jsxs)("span",{className:"ml-1 text-text-muted/60",children:["\xb7 ",r]})]})]}),(0,a.jsx)("span",{className:`inline-flex items-center px-1.5 py-0.5 rounded text-[10px] font-semibold ${c?"bg-amber-500/15 text-amber-400":i?"bg-blue-500/15 text-blue-400":"bg-green-500/10 text-green-400"}`,children:c?p("queued"):i?h("active"):p("ok")})]}),(0,a.jsxs)("div",{className:"flex items-center gap-3 text-[11px] text-text-muted",children:[(0,a.jsxs)("span",{className:"flex items-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"schedule"}),p("queuedCount",{count:n.queued||0})]}),(0,a.jsxs)("span",{className:"flex items-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"play_arrow"}),p("runningCount",{count:n.running||0})]})]})]},e)})})]})),M.length>0&&(0,a.jsxs)(r.Zp,{className:"p-5",children:[(0,a.jsxs)("h2",{className:"text-lg font-semibold text-text-main mb-4 flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px] text-red-500",children:"lock"}),p("activeLockouts")]}),(0,a.jsx)("div",{className:"space-y-2",children:M.map(([e,t])=>(0,a.jsxs)("div",{className:"rounded-lg p-3 bg-red-500/5 border border-red-500/10 flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-sm font-medium text-text-main",children:e}),t.reason&&(0,a.jsxs)("span",{className:"text-xs text-text-muted ml-2",children:["(",t.reason,")"]})]}),t.until&&(0,a.jsx)("span",{className:"text-xs text-red-400",children:p("until",{time:new Date(t.until).toLocaleTimeString()})})]},e))})]})]})}},40993:(e,t,s)=>{"use strict";s.d(t,{Ex:()=>d.default,$n:()=>a.default,Zp:()=>n.default,Qv:()=>c.CardSkeleton,G9:()=>g.default,bQ:()=>w.default,pp:()=>v.default,Qn:()=>y.default,pd:()=>l.default,Mh:()=>f.default,uR:()=>u.default,aF:()=>i.default,rq:()=>o.default,LF:()=>m.default,KN:()=>j.default,Lo:()=>b.default,y7:()=>h.default,Iz:()=>N.default,l6:()=>r.default,lM:()=>x.default,cn:()=>p.default});var a=s(35806),l=s(34422),r=s(42994),n=s(81060),i=s(71361),c=s(92542);s(17705);var d=s(80927),x=s(19790);s(6261),s(55846),s(34243),s(89938),s(99023);var m=s(80178),o=s(85444),u=s(91961);s(25112);var p=s(45624),h=s(37415),j=s(48643),b=s(8287);s(1652);var f=s(92701);s(18150);var g=s(71689),N=s(33709);s(76332);var v=s(66200);s(61580);var y=s(51503);s(54128);var w=s(44638);s(21720),s(97050)},90477:(e,t,s)=>{Promise.resolve().then(s.bind(s,32424))}},e=>{e.O(0,[8500,3418,9751,8055,1149,5846,647,8441,3794,7358],()=>e(e.s=90477)),_N_E=e.O()}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8192],{32424:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>x});var a=s(95155),l=s(12115),r=s(40993),n=s(20909),i=s(50910);function c(e){return e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} KB`:`${(e/1048576).toFixed(1)} MB`}let d={CLOSED:{bg:"bg-green-500/10",text:"text-green-500",labelKey:"healthy"},OPEN:{bg:"bg-red-500/10",text:"text-red-500",labelKey:"down"},HALF_OPEN:{bg:"bg-amber-500/10",text:"text-amber-500",labelKey:"recovering"}};function x(){var e;let t,s,x,m,o,u,p=(0,i.c)("health"),h=(0,i.c)("common"),j=(0,i.c)("providers"),[b,f]=(0,l.useState)(null),[g,N]=(0,l.useState)(null),[v,y]=(0,l.useState)(null),[w,$]=(0,l.useState)(null),[C,k]=(0,l.useState)(null),[S,E]=(0,l.useState)(null),[L,D]=(0,l.useState)(!1),O=(0,l.useCallback)(async()=>{try{let e=await fetch("/api/monitoring/health");if(!e.ok)throw Error(`HTTP ${e.status}`);let t=await e.json();f(t),N(null),y(new Date)}catch(e){N(e.message)}},[]),F=(0,l.useCallback)(async()=>{let e=await Promise.allSettled([fetch("/api/telemetry/summary").then(e=>e.json()),fetch("/api/cache/stats").then(e=>e.json()),fetch("/api/rate-limits").then(e=>e.json())]);"fulfilled"===e[0].status&&$(e[0].value),"fulfilled"===e[1].status&&k(e[1].value),"fulfilled"===e[2].status&&e[2].value.cacheStats&&E(e[2].value.cacheStats)},[]);(0,l.useEffect)(()=>{O(),F();let e=setInterval(()=>{O(),F()},15e3);return()=>clearInterval(e)},[O,F]);let z=async()=>{if(confirm(p("resetConfirm"))){D(!0);try{let e=await fetch("/api/monitoring/health",{method:"DELETE"});if(!e.ok)throw Error(`HTTP ${e.status}`);await O(),await F()}catch(e){console.error("Failed to reset health:",e)}finally{D(!1)}}},_=e=>null!=e?p("millisecondsShort",{value:Math.round(e)}):p("notAvailable");if(!b&&!g)return(0,a.jsx)("div",{className:"p-6 flex items-center justify-center min-h-[400px]",children:(0,a.jsxs)("div",{className:"text-center",children:[(0,a.jsx)("div",{className:"inline-block animate-spin rounded-full h-8 w-8 border-b-2 border-primary"}),(0,a.jsx)("p",{className:"text-text-muted mt-4",children:p("loadingHealth")})]})});if(g&&!b)return(0,a.jsx)("div",{className:"p-6",children:(0,a.jsxs)("div",{className:"bg-red-500/10 border border-red-500/30 rounded-xl p-6 text-center",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-red-500 text-[32px] mb-2",children:"error"}),(0,a.jsx)("p",{className:"text-red-400",children:p("failedToLoad",{error:g})}),(0,a.jsx)("button",{onClick:O,className:"mt-4 px-4 py-2 rounded-lg bg-primary/10 text-primary text-sm hover:bg-primary/20 transition-colors",children:p("retry")})]})});let{system:P,providerHealth:T,rateLimitStatus:Z,lockouts:q}=b,A=Object.entries(T||{}),M=Object.entries(q||{});return(0,a.jsxs)("div",{className:"p-6 space-y-6 max-w-6xl mx-auto",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"text-2xl font-bold text-text-main",children:p("title")}),(0,a.jsx)("p",{className:"text-sm text-text-muted mt-1",children:p("description")})]}),(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[v&&(0,a.jsx)("span",{className:"text-xs text-text-muted",children:p("updatedAt",{time:v.toLocaleTimeString()})}),(0,a.jsx)("button",{onClick:()=>{O(),F()},className:"p-2 rounded-lg bg-surface hover:bg-surface/80 text-text-muted hover:text-text-main transition-colors",title:h("refresh"),children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"refresh"})})]})]}),(0,a.jsxs)("div",{role:"status","aria-live":"polite",className:`rounded-xl p-4 flex items-center gap-3 ${"healthy"===b.status?"bg-green-500/10 border border-green-500/20":"bg-red-500/10 border border-red-500/20"}`,children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[24px] ${"healthy"===b.status?"text-green-500":"text-red-500"}`,children:"healthy"===b.status?"check_circle":"error"}),(0,a.jsx)("span",{className:"healthy"===b.status?"text-green-400":"text-red-400",children:"healthy"===b.status?p("allOperational"):p("issuesDetected")})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",children:[(0,a.jsxs)(r.Zp,{className:"p-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-2",children:[(0,a.jsx)("div",{className:"flex items-center justify-center size-8 rounded-lg bg-primary/10 text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"timer"})}),(0,a.jsx)("span",{className:"text-sm text-text-muted",children:p("uptime")})]}),(0,a.jsx)("p",{className:"text-xl font-semibold text-text-main",children:(t=Math.floor((e=P.uptime)/86400),s=Math.floor(e%86400/3600),x=Math.floor(e%3600/60),t>0?`${t}d ${s}h ${x}m`:s>0?`${s}h ${x}m`:`${x}m`)})]}),(0,a.jsxs)(r.Zp,{className:"p-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-2",children:[(0,a.jsx)("div",{className:"flex items-center justify-center size-8 rounded-lg bg-blue-500/10 text-blue-500",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"info"})}),(0,a.jsx)("span",{className:"text-sm text-text-muted",children:p("version")})]}),(0,a.jsxs)("p",{className:"text-xl font-semibold text-text-main",children:["v",P.version]}),(0,a.jsx)("p",{className:"text-xs text-text-muted mt-1",children:p("nodeVersion",{version:P.nodeVersion})})]}),(0,a.jsxs)(r.Zp,{className:"p-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-2",children:[(0,a.jsx)("div",{className:"flex items-center justify-center size-8 rounded-lg bg-purple-500/10 text-purple-500",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"memory"})}),(0,a.jsx)("span",{className:"text-sm text-text-muted",children:p("memoryRss")})]}),(0,a.jsx)("p",{className:"text-xl font-semibold text-text-main",children:c(P.memoryUsage?.rss||0)}),(0,a.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:[p("heap"),": ",c(P.memoryUsage?.heapUsed||0)," /"," ",c(P.memoryUsage?.heapTotal||0)]})]}),(0,a.jsxs)(r.Zp,{className:"p-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-2",children:[(0,a.jsx)("div",{className:"flex items-center justify-center size-8 rounded-lg bg-amber-500/10 text-amber-500",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"dns"})}),(0,a.jsx)("span",{className:"text-sm text-text-muted",children:p("providers")})]}),(0,a.jsx)("p",{className:"text-xl font-semibold text-text-main",children:A.length}),(0,a.jsx)("p",{className:"text-xs text-text-muted mt-1",children:p("healthyCount",{count:A.filter(([,e])=>"CLOSED"===e.state).length})})]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[(0,a.jsxs)(r.Zp,{className:"p-4",children:[(0,a.jsxs)("h3",{className:"text-sm font-semibold text-text-muted mb-3 flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"speed"}),p("latency")]}),w?(0,a.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsx)("span",{className:"text-text-muted",children:p("latencyP50")}),(0,a.jsx)("span",{className:"font-mono",children:_(w.p50)})]}),(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsx)("span",{className:"text-text-muted",children:p("latencyP95")}),(0,a.jsx)("span",{className:"font-mono",children:_(w.p95)})]}),(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsx)("span",{className:"text-text-muted",children:p("latencyP99")}),(0,a.jsx)("span",{className:"font-mono",children:_(w.p99)})]}),(0,a.jsxs)("div",{className:"flex justify-between border-t border-border pt-2 mt-2",children:[(0,a.jsx)("span",{className:"text-text-muted",children:p("totalRequests")}),(0,a.jsx)("span",{className:"font-mono",children:w.totalRequests??0})]})]}):(0,a.jsx)("p",{className:"text-sm text-text-muted",children:p("noDataYet")})]}),(0,a.jsxs)(r.Zp,{className:"p-4",children:[(0,a.jsxs)("h3",{className:"text-sm font-semibold text-text-muted mb-3 flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"cached"}),p("promptCache")]}),C?(0,a.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsx)("span",{className:"text-text-muted",children:p("entries")}),(0,a.jsxs)("span",{className:"font-mono",children:[C.size,"/",C.maxSize]})]}),(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsx)("span",{className:"text-text-muted",children:p("hitRate")}),(0,a.jsxs)("span",{className:"font-mono",children:[C.hitRate?.toFixed(1)??0,"%"]})]}),(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsx)("span",{className:"text-text-muted",children:p("hitsMisses")}),(0,a.jsxs)("span",{className:"font-mono",children:[C.hits??0," / ",C.misses??0]})]})]}):(0,a.jsx)("p",{className:"text-sm text-text-muted",children:p("noDataYet")})]}),(0,a.jsxs)(r.Zp,{className:"p-4",children:[(0,a.jsxs)("h3",{className:"text-sm font-semibold text-text-muted mb-3 flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"database"}),p("signatureCache")]}),S?(0,a.jsx)("div",{className:"grid grid-cols-2 gap-2",children:[{label:p("signatureDefaults"),value:S.defaultCount,color:"text-text-muted"},{label:p("signatureTool"),value:`${S.tool.entries}/${S.tool.patterns}`,color:"text-blue-400"},{label:p("signatureFamily"),value:`${S.family.entries}/${S.family.patterns}`,color:"text-purple-400"},{label:p("signatureSession"),value:`${S.session.entries}/${S.session.patterns}`,color:"text-cyan-400"}].map(({label:e,value:t,color:s})=>(0,a.jsxs)("div",{className:"text-center p-2 rounded-lg bg-surface/30 border border-border/30",children:[(0,a.jsx)("p",{className:`text-lg font-bold tabular-nums ${s}`,children:t}),(0,a.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:e})]},e))}):(0,a.jsx)("p",{className:"text-sm text-text-muted",children:p("noDataYet")})]})]}),(0,a.jsxs)(r.Zp,{className:"p-5",role:"region","aria-label":p("providerHealthStatusAria"),children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,a.jsxs)("h2",{className:"text-lg font-semibold text-text-main flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px] text-primary",children:"health_and_safety"}),p("providerHealth")]}),(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[A.some(([,e])=>"CLOSED"!==e.state)&&(0,a.jsx)("button",{onClick:z,disabled:L,className:`flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-semibold transition-all ${L?"bg-surface/50 text-text-muted cursor-wait":"bg-red-500/10 text-red-400 hover:bg-red-500/20 hover:text-red-300 border border-red-500/20"}`,title:p("resetAllTitle"),children:L?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] animate-spin",children:"progress_activity"}),p("resetting")]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"restart_alt"}),p("resetAll")]})}),A.length>0&&(0,a.jsxs)("div",{className:"flex items-center gap-3 text-xs text-text-muted",children:[(0,a.jsxs)("span",{className:"flex items-center gap-1",children:[(0,a.jsx)("span",{className:"size-2 rounded-full bg-green-500"})," ",p("healthy")]}),(0,a.jsxs)("span",{className:"flex items-center gap-1",children:[(0,a.jsx)("span",{className:"size-2 rounded-full bg-amber-500"})," ",p("recovering")]}),(0,a.jsxs)("span",{className:"flex items-center gap-1",children:[(0,a.jsx)("span",{className:"size-2 rounded-full bg-red-500"})," ",p("down")]})]})]})]}),0===A.length?(0,a.jsx)("p",{className:"text-sm text-text-muted text-center py-4",children:p("noCBData")}):(m=A.filter(([,e])=>"CLOSED"!==e.state),o=A.filter(([,e])=>"CLOSED"===e.state),(0,a.jsxs)("div",{className:"space-y-4",children:[m.length>0&&(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("p",{className:"text-xs font-medium text-red-400 uppercase tracking-wide",children:p("issuesLabel")}),m.map(([e,t])=>{let s=d[t.state]||d.OPEN,l=n.Q2[e],r=l?.name||e;return(0,a.jsxs)("div",{className:`rounded-lg p-3 ${s.bg} border border-white/5 flex items-center gap-3`,children:[(0,a.jsx)("div",{className:"size-8 rounded-lg flex items-center justify-center shrink-0 text-xs font-bold",style:{backgroundColor:`${l?.color||"#888"}15`,color:l?.color||"#888"},children:l?.textIcon||e.slice(0,2).toUpperCase()}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-sm font-medium text-text-main truncate",children:r}),(0,a.jsx)("span",{className:`text-xs font-semibold px-1.5 py-0.5 rounded ${s.bg} ${s.text}`,children:p(s.labelKey)})]}),(0,a.jsxs)("div",{className:"text-xs text-text-muted mt-0.5",children:[1===t.failures?p("failures",{count:t.failures}):p("failuresPlural",{count:t.failures}),t.lastFailure&&(0,a.jsxs)("span",{className:"ml-2",children:["\xb7 ",p("lastFailure"),":"," ",new Date(t.lastFailure).toLocaleTimeString()]})]})]})]},e)})]}),o.length>0&&(0,a.jsxs)("div",{children:[m.length>0&&(0,a.jsx)("p",{className:"text-xs font-medium text-green-400 uppercase tracking-wide mb-2",children:p("operational")}),(0,a.jsx)("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5 gap-2",children:o.map(([e])=>{let t=n.Q2[e],s=t?.name||e;return(0,a.jsxs)("div",{className:"rounded-lg p-2.5 bg-green-500/5 border border-white/5 flex items-center gap-2",children:[(0,a.jsx)("span",{className:"size-2 rounded-full bg-green-500 shrink-0"}),(0,a.jsx)("span",{className:"text-xs font-medium text-text-main truncate",title:s,children:s})]},e)})})]})]}))]}),Z&&Object.keys(Z).length>0&&((u=Object.entries(Z).map(([e,t])=>({key:e,...(e=>{let t,s=e.split(":"),a=s[0],l=s[1]||"",r=s.slice(2).join(":")||null,i=n.Q2[a];if(a.startsWith("openai-compatible-")){let e=a.replace("openai-compatible-","");t=j("openaiCompatibleName"),i={color:"#10A37F",textIcon:"OC"},e.length>12?t+=` (${e.slice(0,8)}…)`:e&&(t+=` (${e})`)}else if(a.startsWith("anthropic-compatible-")){let e=a.replace("anthropic-compatible-","");t=j("anthropicCompatibleName"),i={color:"#D97757",textIcon:"AC"},e.length>12?t+=` (${e.slice(0,8)}…)`:e&&(t+=` (${e})`)}else t=i?.name||a;return{providerId:a,displayName:t,providerInfo:i,connectionId:l,model:r}})(e),status:t}))).sort((e,t)=>{let s=(e.status.queued||0)+(e.status.running||0),a=(t.status.queued||0)+(t.status.running||0);return s!==a?a-s:e.displayName.localeCompare(t.displayName)}),(0,a.jsxs)(r.Zp,{className:"p-5",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,a.jsxs)("h2",{className:"text-lg font-semibold text-text-main flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px] text-amber-500",children:"speed"}),p("rateLimitStatus")]}),(0,a.jsx)("span",{className:"text-xs text-text-muted",children:1===u.length?p("activeLimiters",{count:u.length}):p("activeLimitersPlural",{count:u.length})})]}),(0,a.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3",children:u.map(({key:e,displayName:t,providerInfo:s,connectionId:l,model:r,status:n})=>{let i=(n.queued||0)+(n.running||0)>0,c=(n.queued||0)>0;return(0,a.jsxs)("div",{className:`rounded-lg p-3 border transition-colors ${c?"bg-amber-500/5 border-amber-500/20":i?"bg-blue-500/5 border-blue-500/15":"bg-surface/30 border-white/5"}`,title:e,children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 mb-2",children:[(0,a.jsx)("div",{className:"size-7 rounded-md flex items-center justify-center shrink-0 text-[10px] font-bold",style:{backgroundColor:`${s?.color||"#888"}15`,color:s?.color||"#888"},children:s?.textIcon||t.slice(0,2).toUpperCase()}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium text-text-main truncate",children:t}),l&&(0,a.jsxs)("p",{className:"text-[10px] text-text-muted font-mono truncate",children:[l.length>12?l.slice(0,8)+"…":l,r&&(0,a.jsxs)("span",{className:"ml-1 text-text-muted/60",children:["\xb7 ",r]})]})]}),(0,a.jsx)("span",{className:`inline-flex items-center px-1.5 py-0.5 rounded text-[10px] font-semibold ${c?"bg-amber-500/15 text-amber-400":i?"bg-blue-500/15 text-blue-400":"bg-green-500/10 text-green-400"}`,children:c?p("queued"):i?h("active"):p("ok")})]}),(0,a.jsxs)("div",{className:"flex items-center gap-3 text-[11px] text-text-muted",children:[(0,a.jsxs)("span",{className:"flex items-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"schedule"}),p("queuedCount",{count:n.queued||0})]}),(0,a.jsxs)("span",{className:"flex items-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"play_arrow"}),p("runningCount",{count:n.running||0})]})]})]},e)})})]})),M.length>0&&(0,a.jsxs)(r.Zp,{className:"p-5",children:[(0,a.jsxs)("h2",{className:"text-lg font-semibold text-text-main mb-4 flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px] text-red-500",children:"lock"}),p("activeLockouts")]}),(0,a.jsx)("div",{className:"space-y-2",children:M.map(([e,t])=>(0,a.jsxs)("div",{className:"rounded-lg p-3 bg-red-500/5 border border-red-500/10 flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-sm font-medium text-text-main",children:e}),t.reason&&(0,a.jsxs)("span",{className:"text-xs text-text-muted ml-2",children:["(",t.reason,")"]})]}),t.until&&(0,a.jsx)("span",{className:"text-xs text-red-400",children:p("until",{time:new Date(t.until).toLocaleTimeString()})})]},e))})]})]})}},39449:(e,t,s)=>{Promise.resolve().then(s.bind(s,32424))},40993:(e,t,s)=>{"use strict";s.d(t,{Ex:()=>d.default,$n:()=>a.default,Zp:()=>n.default,Qv:()=>c.CardSkeleton,G9:()=>g.default,bQ:()=>w.default,pp:()=>v.default,Qn:()=>y.default,pd:()=>l.default,Mh:()=>f.default,uR:()=>u.default,aF:()=>i.default,rq:()=>o.default,LF:()=>m.default,KN:()=>j.default,Lo:()=>b.default,y7:()=>h.default,Iz:()=>N.default,l6:()=>r.default,lM:()=>x.default,cn:()=>p.default});var a=s(35806),l=s(34422),r=s(42994),n=s(81060),i=s(71361),c=s(92542);s(17705);var d=s(80927),x=s(19790);s(6261),s(55846),s(34243),s(89938),s(99023);var m=s(80178),o=s(85444),u=s(91961);s(25112);var p=s(45624),h=s(37415),j=s(48643),b=s(8287);s(1652);var f=s(92701);s(18150);var g=s(71689),N=s(33709);s(76332);var v=s(66200);s(61580);var y=s(51503);s(54128);var w=s(44638);s(21720),s(97050)}},e=>{e.O(0,[8500,3418,9751,8055,1149,5846,647,8441,3794,7358],()=>e(e.s=39449)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1066],{39387:(e,t,s)=>{Promise.resolve().then(s.bind(s,73732))},40993:(e,t,s)=>{"use strict";s.d(t,{Ex:()=>o.default,$n:()=>a.default,Zp:()=>n.default,Qv:()=>c.CardSkeleton,G9:()=>y.default,bQ:()=>N.default,pp:()=>v.default,Qn:()=>k.default,pd:()=>r.default,Mh:()=>g.default,uR:()=>m.default,aF:()=>i.default,rq:()=>x.default,LF:()=>u.default,KN:()=>f.default,Lo:()=>b.default,y7:()=>h.default,Iz:()=>j.default,l6:()=>l.default,lM:()=>d.default,cn:()=>p.default});var a=s(35806),r=s(34422),l=s(42994),n=s(81060),i=s(71361),c=s(92542);s(17705);var o=s(80927),d=s(19790);s(6261),s(55846),s(34243),s(89938),s(99023);var u=s(80178),x=s(85444),m=s(91961);s(25112);var p=s(45624),h=s(37415),f=s(48643),b=s(8287);s(1652);var g=s(92701);s(18150);var y=s(71689),j=s(33709);s(76332);var v=s(66200);s(61580);var k=s(51503);s(54128);var N=s(44638);s(21720),s(97050)},73732:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>j});var a=s(95155),r=s(12115),l=s(40993),n=s(50910),i=s(5772),c=s(35144),o=s(8898);function d(e){let t="string"==typeof e?e.trim():"";if(!t)return{key:"unknown",label:"Unknown",variant:"default",rank:0,raw:null};let s=t.toUpperCase();return s.includes("ENTERPRISE")||s.includes("CORP")||s.includes("ORG")?{key:"enterprise",label:"Enterprise",variant:"info",rank:7,raw:t}:s.includes("TEAM")||s.includes("CHATGPTTEAM")?{key:"team",label:"Team",variant:"info",rank:6,raw:t}:s.includes("BUSINESS")||s.includes("STANDARD")||s.includes("BIZ")?{key:"business",label:"Business",variant:"warning",rank:5,raw:t}:s.includes("ULTRA")?{key:"ultra",label:"Ultra",variant:"success",rank:4,raw:t}:s.includes("PRO")||s.includes("PREMIUM")?{key:"pro",label:"Pro",variant:"primary",rank:3,raw:t}:s.includes("PLUS")||s.includes("PAID")?{key:"plus",label:"Plus",variant:"secondary",rank:2,raw:t}:s.includes("FREE")||s.includes("INDIVIDUAL")||s.includes("BASIC")||s.includes("TRIAL")||s.includes("LEGACY")?{key:"free",label:"Free",variant:"default",rank:1,raw:t}:{key:"unknown",label:t.toLowerCase().split(/[\s_-]+/).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")||"Unknown",variant:"default",rank:0,raw:t}}var u=s(81060),x=s(80927),m=s(92542),p=s(20909);let h={antigravity:{label:"Antigravity",color:"#F59E0B"},github:{label:"GitHub Copilot",color:"#333"},kiro:{label:"Kiro AI",color:"#FF6B35"},codex:{label:"OpenAI Codex",color:"#10A37F"},claude:{label:"Claude Code",color:"#D97757"},"kimi-coding":{label:"Kimi Coding",color:"#1E3A8A"}},f=[{key:"all",labelKey:"tierAll"},{key:"enterprise",labelKey:"tierEnterprise"},{key:"team",labelKey:"tierTeam"},{key:"business",labelKey:"tierBusiness"},{key:"ultra",labelKey:"tierUltra"},{key:"pro",labelKey:"tierPro"},{key:"plus",labelKey:"tierPlus"},{key:"free",labelKey:"tierFree"},{key:"unknown",labelKey:"tierUnknown"}];function b(){let e=(0,n.c)("usage"),[t,s]=(0,r.useState)([]),[l,b]=(0,r.useState)({}),[g,y]=(0,r.useState)({}),[j,v]=(0,r.useState)({}),[k,N]=(0,r.useState)(!0),[w,S]=(0,r.useState)(null),[E,A]=(0,r.useState)(!1),[C,I]=(0,r.useState)(120),[M,P]=(0,r.useState)(!0),[T,q]=(0,r.useState)("all"),F=(0,r.useRef)(null),K=(0,r.useRef)(null),L=(0,r.useRef)({}),_=(0,r.useCallback)(async()=>{try{let e=await fetch("/api/providers/client");if(!e.ok)throw Error("Failed");let t=(await e.json()).connections||[];return s(t),t}catch{return s([]),[]}},[]),R=(0,r.useCallback)(async(e,t)=>{let s=Date.now();if(!(s-(L.current[e]||0)<3e4)){L.current[e]=s,y(t=>({...t,[e]:!0})),v(t=>({...t,[e]:null}));try{let s=await fetch(`/api/usage/${e}`);if(!s.ok){let t=(await s.json().catch(()=>({}))).error||s.statusText;if(404===s.status)return;if(401===s.status)return void b(s=>({...s,[e]:{quotas:[],message:t}}));throw Error(`HTTP ${s.status}: ${t}`)}let a=await s.json(),r=function(e,t){if(!t||"object"!=typeof t)return[];let s=[];try{switch(e.toLowerCase()){case"github":default:t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{s.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null})});break;case"antigravity":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{s.push({name:t.displayName||e,modelKey:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:(0,o.Q1)(t.remainingPercentage)})});break;case"codex":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{s.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null})});break;case"kiro":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{s.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null})});break;case"claude":t.message?s.push({name:"error",used:0,total:0,resetAt:null,message:t.message}):t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{s.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:(0,o.Q1)(t.remainingPercentage)})})}}catch(t){return console.error(`Error parsing quota data for ${e}:`,t),[]}let a=(0,c.KC)(e);if(a.length>0){let e=new Map(a.map((e,t)=>[e.id,t]));s.sort((t,s)=>{let a=t.modelKey||t.name,r=s.modelKey||s.name;return(e.get(a)??999)-(e.get(r)??999)})}return s}(t,a);b(t=>({...t,[e]:{quotas:r,plan:a.plan||null,message:a.message||null,raw:a}}))}catch(t){v(s=>({...s,[e]:t.message||"Failed to fetch quota"}))}finally{y(t=>({...t,[e]:!1}))}}},[]),D=(0,r.useCallback)(async(e,t)=>{await R(e,t),S(new Date)},[R]),O=(0,r.useCallback)(async()=>{if(!E){A(!0),I(120);try{let e=(await _()).filter(e=>p.wb.includes(e.provider)&&"oauth"===e.authType);await Promise.all(e.map(e=>R(e.id,e.provider))),S(new Date)}catch(e){console.error("Error refreshing all:",e)}finally{A(!1)}}},[E,_,R]);(0,r.useEffect)(()=>{(async()=>{P(!0),await O(),P(!1)})()},[]),(0,r.useEffect)(()=>{if(!k){F.current&&clearInterval(F.current),K.current&&clearInterval(K.current);return}return F.current=setInterval(O,12e4),K.current=setInterval(()=>{I(e=>e<=1?120:e-1)},1e3),()=>{F.current&&clearInterval(F.current),K.current&&clearInterval(K.current)}},[k,O]),(0,r.useEffect)(()=>{let e=()=>{document.hidden?(F.current&&clearInterval(F.current),K.current&&clearInterval(K.current)):k&&(F.current=setInterval(O,12e4),K.current=setInterval(()=>{I(e=>e<=1?120:e-1)},1e3))};return document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)},[k,O]);let U=(0,r.useMemo)(()=>t.filter(e=>p.wb.includes(e.provider)&&"oauth"===e.authType),[t]),$=(0,r.useMemo)(()=>{let e={antigravity:1,github:2,codex:3,claude:4,kiro:5,"kimi-coding":6};return[...U].sort((t,s)=>(e[t.provider]||9)-(e[s.provider]||9))},[U]),Q=(0,r.useMemo)(()=>{let e={};for(let t of $)e[t.id]=d(l[t.id]?.plan);return e},[$,l]),G=(0,r.useMemo)(()=>{let e={all:$.length,enterprise:0,team:0,business:0,ultra:0,pro:0,free:0,unknown:0};for(let t of $){let s=Q[t.id]?.key||"unknown";e[s]=(e[s]||0)+1}return e},[$,Q]),B=(0,r.useMemo)(()=>"all"===T?$:$.filter(e=>(Q[e.id]?.key||"unknown")===T),[$,Q,T]);return M?(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)(m.CardSkeleton,{}),(0,a.jsx)(m.CardSkeleton,{})]}):0===$.length?(0,a.jsx)(u.default,{padding:"lg",children:(0,a.jsxs)("div",{className:"text-center py-12",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[64px] opacity-15",children:"cloud_off"}),(0,a.jsx)("h3",{className:"mt-4 text-lg font-semibold text-text-main",children:e("noProviders")}),(0,a.jsx)("p",{className:"mt-2 text-sm text-text-muted max-w-[400px] mx-auto",children:e("connectProvidersForQuota")})]})}):(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between flex-wrap gap-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold text-text-main m-0",children:e("providerLimits")}),(0,a.jsxs)("span",{className:"text-[13px] text-text-muted",children:[e("accountsCount",{count:B.length}),B.length!==$.length&&` ${e("filteredFromCount",{count:$.length})}`]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsxs)("button",{onClick:()=>N(e=>!e),className:"flex items-center gap-1.5 px-3 py-1.5 rounded-lg border border-white/[0.08] bg-transparent cursor-pointer text-text-main text-[13px]",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",style:{color:k?"#22c55e":"var(--text-muted)"},children:k?"toggle_on":"toggle_off"}),e("autoRefresh"),k&&(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["(",C,"s)"]})]}),(0,a.jsxs)("button",{onClick:O,disabled:E,className:"flex items-center gap-1.5 px-3.5 py-1.5 rounded-lg bg-white/[0.06] border border-white/10 text-text-main text-[13px] disabled:opacity-50 disabled:cursor-not-allowed cursor-pointer",children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[16px] ${E?"animate-spin":""}`,children:"refresh"}),e("refreshAll")]})]})]}),(0,a.jsx)("div",{className:"flex items-center gap-2 flex-wrap",children:f.map(t=>{if("all"!==t.key&&!G[t.key])return null;let s=T===t.key;return(0,a.jsxs)("button",{onClick:()=>q(t.key),className:"inline-flex items-center gap-1.5 px-2.5 py-1 rounded-full text-xs font-semibold cursor-pointer",style:{border:s?"1px solid var(--primary, #E54D5E)":"1px solid rgba(255,255,255,0.12)",background:s?"rgba(249,120,21,0.14)":"transparent",color:s?"var(--primary, #E54D5E)":"var(--text-muted)"},children:[(0,a.jsx)("span",{children:e(t.labelKey)}),(0,a.jsx)("span",{className:"opacity-85",children:G[t.key]||0})]},t.key)})}),(0,a.jsxs)("div",{className:"rounded-xl border border-white/[0.06] overflow-hidden bg-black/15",children:[(0,a.jsxs)("div",{className:"items-center px-4 py-2.5 border-b border-white/[0.06] text-[11px] font-semibold uppercase tracking-wider text-text-muted",style:{display:"grid",gridTemplateColumns:"280px 1fr 100px 48px"},children:[(0,a.jsx)("div",{children:e("account")}),(0,a.jsx)("div",{children:e("modelQuotas")}),(0,a.jsx)("div",{className:"text-center",children:e("lastUsed")}),(0,a.jsx)("div",{className:"text-center",children:e("actions")})]}),B.map((t,s)=>{let r=l[t.id],n=g[t.id],c=j[t.id],o=h[t.provider]||{label:t.provider,color:"#666"},u=Q[t.id]||d(null);return(0,a.jsxs)("div",{className:"items-center px-4 py-3.5 transition-[background] duration-150 hover:bg-white/[0.02]",style:{display:"grid",gridTemplateColumns:"280px 1fr 100px 48px",borderBottom:s<B.length-1?"1px solid rgba(255,255,255,0.04)":"none"},children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 min-w-0",children:[(0,a.jsx)("div",{className:"w-8 h-8 rounded-lg flex items-center justify-center overflow-hidden shrink-0",children:(0,a.jsx)(i.default,{src:`/providers/${t.provider}.png`,alt:t.provider,width:32,height:32,className:"object-contain",sizes:"32px"})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("div",{className:"text-[13px] font-semibold text-text-main truncate",children:t.name||o.label}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5 mt-0.5",children:[(0,a.jsx)("span",{title:r?.plan?e("rawPlanWithValue",{plan:r.plan}):e("noPlanFromProvider"),children:(0,a.jsx)(x.default,{variant:u.variant,size:"sm",dot:!0,children:u.label})}),(0,a.jsx)("span",{className:"text-[11px] text-text-muted",children:o.label})]})]})]}),(0,a.jsx)("div",{className:"flex flex-wrap gap-x-3 gap-y-1.5 pr-3",children:n?(0,a.jsxs)("div",{className:"flex items-center gap-1.5 text-text-muted text-xs",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-[14px]",children:"progress_activity"}),e("loadingQuotas")]}):c?(0,a.jsxs)("div",{className:"flex items-center gap-1.5 text-xs text-red-500",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"error"}),(0,a.jsx)("span",{className:"overflow-hidden text-ellipsis whitespace-nowrap max-w-[300px]",children:c})]}):r?.message&&(!r.quotas||0===r.quotas.length)?(0,a.jsx)("div",{className:"text-xs text-text-muted italic",children:r.message}):r?.quotas?.length>0?r.quotas.map((e,t)=>{var s,r,l;let n=void 0!==e.remainingPercentage?Math.round(e.remainingPercentage):(s=e.used,(r=e.total)&&0!==r?!s||s<0?100:s>=r?0:Math.round((r-s)/r*100):0),i=n>70?{bar:"#22c55e",text:"#22c55e",bg:"rgba(34,197,94,0.12)"}:n>=30?{bar:"#eab308",text:"#eab308",bg:"rgba(234,179,8,0.12)"}:{bar:"#ef4444",text:"#ef4444",bg:"rgba(239,68,68,0.12)"},c=function(e){if(!e)return null;try{let t=new Date(e)-new Date;if(t<=0)return null;let s=Math.floor(t/36e5),a=Math.floor(t%36e5/6e4);if(s>=24){let e=Math.floor(s/24);return`${e}d ${s%24}h`}return`${s}h ${a}m`}catch{return null}}(e.resetAt),o={"gemini-3-pro-high":"G3 Pro","gemini-3-pro-low":"G3 Pro Low","gemini-3-flash":"G3 Flash","gemini-2.5-flash":"G2.5 Flash","claude-opus-4-6-thinking":"Opus 4.6 Tk","claude-opus-4-5-thinking":"Opus 4.5 Tk","claude-opus-4-5":"Opus 4.5","claude-sonnet-4-5-thinking":"Sonnet 4.5 Tk","claude-sonnet-4-5":"Sonnet 4.5",chat:"Chat",completions:"Completions",premium_interactions:"Premium",session:"Session",weekly:"Weekly",agentic_request:"Agentic",agentic_request_freetrial:"Agentic (Trial)"}[l=e.name]||l;return(0,a.jsxs)("div",{className:"flex items-center gap-1.5 min-w-[200px] shrink-0",children:[(0,a.jsx)("span",{className:"text-[11px] font-semibold py-0.5 px-2 rounded whitespace-nowrap min-w-[60px] text-center",style:{background:i.bg,color:i.text},children:o}),c&&(0,a.jsxs)("span",{className:"text-[10px] text-text-muted whitespace-nowrap",children:["⏱ ",c]}),(0,a.jsx)("div",{className:"flex-1 h-1.5 rounded-sm bg-white/[0.06] min-w-[60px] overflow-hidden",children:(0,a.jsx)("div",{className:"h-full rounded-sm transition-[width] duration-300 ease-out",style:{width:`${Math.min(n,100)}%`,background:i.bar}})}),(0,a.jsxs)("span",{className:"text-[11px] font-semibold min-w-[32px] text-right",style:{color:i.text},children:[n,"%"]})]},t)}):(0,a.jsx)("div",{className:"text-xs text-text-muted italic",children:e("noQuotaData")})}),(0,a.jsx)("div",{className:"text-center text-[11px] text-text-muted",children:w?(0,a.jsx)("span",{children:w.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}):"-"}),(0,a.jsx)("div",{className:"flex justify-center gap-0.5",children:(0,a.jsx)("button",{onClick:()=>D(t.id,t.provider),disabled:n,title:e("refreshQuota"),className:"p-1 rounded-md border-none bg-transparent cursor-pointer disabled:cursor-not-allowed disabled:opacity-30 opacity-60 hover:opacity-100 flex items-center justify-center transition-opacity duration-150",children:(0,a.jsx)("span",{className:`material-symbols-outlined text-[16px] text-text-muted ${n?"animate-spin":""}`,children:"refresh"})})})]},t.id)}),0===B.length&&(0,a.jsxs)("div",{className:"py-6 px-4 text-center text-text-muted text-[13px]",children:[e("noAccountsForTierFilter")," ",(0,a.jsx)("strong",{children:e(f.find(e=>e.key===T)?.labelKey||"tierUnknown")}),"."]})]})]})}function g(){let e=(0,n.c)("usage"),t=(0,n.c)("common"),[s,i]=(0,r.useState)({lockouts:[],cacheStats:null}),[c,o]=(0,r.useState)(!0),d=(0,r.useCallback)(async()=>{try{let e=await fetch("/api/rate-limits");e.ok&&i(await e.json())}catch{}finally{o(!1)}},[]);return(0,r.useEffect)(()=>{d();let e=setInterval(d,1e4);return()=>clearInterval(e)},[d]),(0,a.jsx)("div",{className:"flex flex-col gap-4",children:(0,a.jsxs)(l.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-orange-500/10 text-orange-500",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]","aria-hidden":"true",children:"lock_clock"})}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("h3",{className:"text-lg font-semibold",children:e("modelLockouts")}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:e("lockoutsAutoRefreshHint")})]}),s.lockouts.length>0&&(0,a.jsx)("span",{className:"px-2.5 py-1 rounded-full text-xs font-semibold bg-orange-500/10 text-orange-400 border border-orange-500/20",children:e("lockedCount",{count:s.lockouts.length})})]}),0===s.lockouts.length?(0,a.jsxs)("div",{className:"text-center py-6 text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[32px] mb-2 block opacity-40","aria-hidden":"true",children:"lock_open"}),(0,a.jsx)("p",{className:"text-sm",children:e("noLockouts")})]}):(0,a.jsx)("div",{className:"flex flex-col gap-2",children:s.lockouts.map((s,r)=>{var l;return(0,a.jsxs)("div",{className:"flex items-center justify-between px-3 py-2.5 rounded-lg bg-orange-500/5 border border-orange-500/15",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-orange-400","aria-hidden":"true",children:"lock"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:s.model}),(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:[e("account"),":"," ",(0,a.jsx)("span",{className:"font-mono",children:s.accountId?.slice(0,12)||t("none")}),s.reason&&(0,a.jsxs)(a.Fragment,{children:[e("reasonSeparator"),s.reason]})]})]})]}),(0,a.jsx)("span",{className:"text-xs font-mono tabular-nums text-orange-400",children:e("timeLeft",{time:(l=s.remainingMs)<1e3?e("durationMillisecondsShort",{value:l}):l<6e4?e("durationSecondsShort",{value:Math.ceil(l/1e3)}):e("durationMinutesShort",{value:Math.ceil(l/6e4)})})})]},r)})})]})})}function y(){let e=(0,n.c)("usage"),[t,s]=(0,r.useState)({count:0,sessions:[]}),[i,c]=(0,r.useState)(!0),o=(0,r.useCallback)(async()=>{try{let e=await fetch("/api/sessions");e.ok&&s(await e.json())}catch{}finally{c(!1)}},[]);return(0,r.useEffect)(()=>{o();let e=setInterval(o,5e3);return()=>clearInterval(e)},[o]),(0,a.jsxs)(l.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-5",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-cyan-500/10 text-cyan-500",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]","aria-hidden":"true",children:"fingerprint"})}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("h3",{className:"text-lg font-semibold",children:e("activeSessions")}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:e("sessionsTrackedHint")})]}),(0,a.jsx)("div",{className:"flex items-center gap-2",children:(0,a.jsxs)("span",{className:"flex items-center gap-1.5 px-3 py-1.5 rounded-full bg-cyan-500/10 border border-cyan-500/20",children:[(0,a.jsx)("span",{className:"w-2 h-2 rounded-full bg-cyan-500 animate-pulse"}),(0,a.jsx)("span",{className:"text-sm font-semibold tabular-nums text-cyan-400",children:t.count})]})})]}),0===t.sessions.length?(0,a.jsxs)("div",{className:"text-center py-8 text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[40px] mb-2 block opacity-40","aria-hidden":"true",children:"fingerprint"}),(0,a.jsx)("p",{className:"text-sm",children:e("noSessions")}),(0,a.jsx)("p",{className:"text-xs mt-1",children:e("sessionsHint")})]}):(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full text-sm",children:[(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{className:"border-b border-border/30",children:[(0,a.jsx)("th",{className:"text-left py-2 px-3 text-xs font-semibold text-text-muted uppercase tracking-wider",children:e("session")}),(0,a.jsx)("th",{className:"text-left py-2 px-3 text-xs font-semibold text-text-muted uppercase tracking-wider",children:e("age")}),(0,a.jsx)("th",{className:"text-right py-2 px-3 text-xs font-semibold text-text-muted uppercase tracking-wider",children:e("requests")}),(0,a.jsx)("th",{className:"text-left py-2 px-3 text-xs font-semibold text-text-muted uppercase tracking-wider",children:e("connection")})]})}),(0,a.jsx)("tbody",{children:t.sessions.map(t=>{var s;return(0,a.jsxs)("tr",{className:"border-b border-border/10 hover:bg-surface/20 transition-colors",children:[(0,a.jsx)("td",{className:"py-2.5 px-3",children:(0,a.jsxs)("span",{className:"font-mono text-xs px-2 py-1 rounded bg-surface/40 text-text-muted",children:[t.sessionId.slice(0,12),"…"]})}),(0,a.jsx)("td",{className:"py-2.5 px-3 text-text-muted tabular-nums",children:(s=t.ageMs)<6e4?e("durationSecondsShort",{value:Math.floor(s/1e3)}):s<36e5?e("durationMinutesShort",{value:Math.floor(s/6e4)}):e("durationHoursShort",{value:Math.floor(s/36e5)})}),(0,a.jsx)("td",{className:"py-2.5 px-3 text-right",children:(0,a.jsx)("span",{className:"font-semibold tabular-nums",children:t.requestCount})}),(0,a.jsx)("td",{className:"py-2.5 px-3",children:t.connectionId?(0,a.jsx)("span",{className:"text-xs font-mono text-cyan-400",children:t.connectionId.slice(0,10)}):(0,a.jsx)("span",{className:"text-text-muted/40",children:e("notAvailableSymbol")})})]},t.sessionId)})})]})})]})}function j(){return(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsx)(r.Suspense,{fallback:(0,a.jsx)(l.Qv,{}),children:(0,a.jsx)(b,{})}),(0,a.jsx)(g,{}),(0,a.jsx)(y,{})]})}}},e=>{e.O(0,[8500,3418,9751,8055,1149,5846,647,8441,3794,7358],()=>e(e.s=39387)),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8013],{40993:(e,t,r)=>{"use strict";r.d(t,{Ex:()=>i.default,$n:()=>l.default,Zp:()=>s.default,Qv:()=>c.CardSkeleton,G9:()=>f.default,bQ:()=>w.default,pp:()=>j.default,Qn:()=>N.default,pd:()=>a.default,Mh:()=>v.default,uR:()=>m.default,aF:()=>n.default,rq:()=>u.default,LF:()=>x.default,KN:()=>g.default,Lo:()=>h.default,y7:()=>b.default,Iz:()=>y.default,l6:()=>o.default,lM:()=>d.default,cn:()=>p.default});var l=r(35806),a=r(34422),o=r(42994),s=r(81060),n=r(71361),c=r(92542);r(17705);var i=r(80927),d=r(19790);r(6261),r(55846),r(34243),r(89938),r(99023);var x=r(80178),u=r(85444),m=r(91961);r(25112);var p=r(45624),b=r(37415),g=r(48643),h=r(8287);r(1652);var v=r(92701);r(18150);var f=r(71689),y=r(33709);r(76332);var j=r(66200);r(61580);var N=r(51503);r(54128);var w=r(44638);r(21720),r(97050)},56646:(e,t,r)=>{Promise.resolve().then(r.bind(r,58802))},58802:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>x});var l=r(95155),a=r(12115),o=r(40993),s=r(50910);let n={debug:"text-gray-400",trace:"text-gray-500",info:"text-cyan-400",warn:"text-yellow-400",error:"text-red-400",fatal:"text-fuchsia-400"},c={debug:"bg-gray-500/10 border-gray-500/20",trace:"bg-gray-500/10 border-gray-500/20",info:"bg-cyan-500/10 border-cyan-500/20",warn:"bg-yellow-500/10 border-yellow-500/20",error:"bg-red-500/10 border-red-500/20",fatal:"bg-fuchsia-500/10 border-fuchsia-500/20"};function i(){let e=(0,s.c)("loggers"),[t,r]=(0,a.useState)([]),[o,i]=(0,a.useState)(!0),[d,x]=(0,a.useState)(null),[u,m]=(0,a.useState)("all"),[p,b]=(0,a.useState)(""),[g,h]=(0,a.useState)(!0),[v,f]=(0,a.useState)(null),[y,j]=(0,a.useState)(null),N=(0,a.useRef)(null),w=(0,a.useCallback)(async()=>{try{let e=new URLSearchParams;"all"!==u&&e.set("level",u),e.set("limit","500");let t=await fetch(`/api/logs/console?${e.toString()}`);if(!t.ok)throw Error(`HTTP ${t.status}`);let l=await t.json();r(l),f(new Date),x(null)}catch(e){x(e.message||"Failed to fetch logs")}finally{i(!1)}},[u]);(0,a.useEffect)(()=>{w();let e=setInterval(w,5e3);return()=>clearInterval(e)},[w]),(0,a.useEffect)(()=>{g&&N.current&&(N.current.scrollTop=N.current.scrollHeight)},[t,g]);let S=p?t.filter(e=>JSON.stringify(e).toLowerCase().includes(p.toLowerCase())):t;return(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsxs)("div",{className:"flex flex-wrap items-center gap-3 p-4 rounded-xl bg-[var(--color-surface)] border border-[var(--color-border)]",children:[(0,l.jsxs)("select",{value:u,onChange:e=>m(e.target.value),"aria-label":"Filter by log level",className:"px-3 py-2 rounded-lg text-sm bg-[var(--color-bg)] border border-[var(--color-border)] text-[var(--color-text-main)] focus:outline-2 focus:outline-[var(--color-accent)]",children:[(0,l.jsx)("option",{value:"all",children:e("allLevels")}),(0,l.jsx)("option",{value:"debug",children:"Debug+"}),(0,l.jsx)("option",{value:"info",children:"Info+"}),(0,l.jsx)("option",{value:"warn",children:"Warn+"}),(0,l.jsx)("option",{value:"error",children:"Error+"})]}),(0,l.jsx)("input",{type:"text",placeholder:"Search logs...",value:p,onChange:e=>b(e.target.value),"aria-label":"Search log entries",className:"flex-1 min-w-[200px] px-3 py-2 rounded-lg text-sm bg-[var(--color-bg)] border border-[var(--color-border)] text-[var(--color-text-main)] placeholder:text-[var(--color-text-muted)] focus:outline-2 focus:outline-[var(--color-accent)]"}),(0,l.jsxs)("button",{onClick:()=>h(!g),title:g?"Disable auto-scroll":"Enable auto-scroll",className:`px-3 py-2 rounded-lg text-sm font-medium border transition-colors ${g?"bg-cyan-500/15 text-cyan-400 border-cyan-500/30":"bg-[var(--color-bg)] text-[var(--color-text-muted)] border-[var(--color-border)]"}`,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[16px] align-middle mr-1",children:g?"vertical_align_bottom":"lock"}),"Auto-scroll"]}),(0,l.jsx)("button",{onClick:w,disabled:o,className:"px-3 py-2 rounded-lg text-sm font-medium bg-[var(--color-bg)] border border-[var(--color-border)] text-[var(--color-text-main)] hover:bg-[var(--color-bg-alt)] disabled:opacity-50 transition-colors",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[16px] align-middle",children:"refresh"})}),(0,l.jsxs)("div",{className:"flex items-center gap-2 ml-auto text-xs text-[var(--color-text-muted)]",children:[(0,l.jsx)("span",{className:"inline-block w-2 h-2 rounded-full bg-green-500 animate-pulse"}),(0,l.jsxs)("span",{children:[S.length," entries"]}),(0,l.jsx)("span",{className:"text-[var(--color-text-muted)]/50",children:"•"}),(0,l.jsx)("span",{children:"Last 1h"}),v&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("span",{className:"text-[var(--color-text-muted)]/50",children:"•"}),(0,l.jsxs)("span",{children:["Updated ",v.toLocaleTimeString()]})]})]})]}),d&&(0,l.jsxs)("div",{className:"p-4 rounded-lg bg-red-500/10 border border-red-500/30 text-red-400 text-sm",role:"alert",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[16px] align-middle mr-2",children:"error"}),d,(0,l.jsx)("span",{className:"text-xs ml-2 opacity-70",children:"— Make sure the application is writing logs to file (LOG_TO_FILE=true)"})]}),(0,l.jsxs)("div",{ref:N,className:"rounded-xl border border-[var(--color-border)] bg-[#0d1117] overflow-auto font-mono text-xs leading-relaxed",style:{maxHeight:"calc(100vh - 340px)",minHeight:"400px"},role:"log","aria-label":"Application console logs","aria-live":"polite",children:[(0,l.jsxs)("div",{className:"sticky top-0 z-10 px-4 py-2 bg-[#161b22] border-b border-[#30363d] flex items-center gap-2",children:[(0,l.jsx)("div",{className:"w-3 h-3 rounded-full bg-[#FF5F56]"}),(0,l.jsx)("div",{className:"w-3 h-3 rounded-full bg-[#FFBD2E]"}),(0,l.jsx)("div",{className:"w-3 h-3 rounded-full bg-[#27C93F]"}),(0,l.jsx)("span",{className:"ml-3 text-[#8b949e] text-[11px]",children:"OmniRoute — Application Console"})]}),(0,l.jsxs)("div",{className:"p-3 space-y-px",children:[0!==S.length||o?S.map((e,t)=>{let r=(e.level||"info").toLowerCase(),a=n[r]||n.info,o=c[r]||"",s=e.component||e.module||"",i=e.msg||e.message||"";return(0,l.jsxs)("div",{className:`group flex items-start gap-2 px-2 py-1 rounded hover:bg-white/5 transition-colors ${"error"===r||"fatal"===r?"bg-red-500/5":""}`,children:[(0,l.jsx)("span",{className:"text-[#484f58] whitespace-nowrap shrink-0 select-none",children:(e=>{try{return new Date(e).toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit",fractionalSecondDigits:3})}catch{return e}})(e.timestamp)}),(0,l.jsx)("span",{className:`inline-block px-1.5 py-0 rounded text-[10px] font-semibold uppercase border shrink-0 ${a} ${o}`,children:r.padEnd(5)}),s&&(0,l.jsxs)("span",{className:"text-purple-400/80 shrink-0",children:["[",s,"]"]}),(0,l.jsxs)("span",{className:"text-[#c9d1d9] flex-1 break-all",children:[i,e.correlationId&&(0,l.jsxs)("span",{className:"text-[#484f58] ml-2",children:["cid:",e.correlationId.slice(0,8)]})]}),(0,l.jsx)("button",{onClick:()=>{let r;return r=JSON.stringify(e,null,2),void navigator.clipboard.writeText(r).then(()=>{j(t),setTimeout(()=>j(null),2e3)})},title:"Copy log entry",className:"opacity-0 group-hover:opacity-100 transition-opacity shrink-0 text-[#8b949e] hover:text-white",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:y===t?"check":"content_copy"})})]},t)}):(0,l.jsxs)("div",{className:"text-[#8b949e] text-center py-12",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[40px] block mb-2 opacity-30",children:"terminal"}),(0,l.jsx)("p",{children:e("noLogEntries")}),(0,l.jsx)("p",{className:"text-[10px] mt-1 opacity-60",children:"Ensure LOG_TO_FILE=true is set in your .env file"})]}),o&&0===S.length&&(0,l.jsxs)("div",{className:"text-[#8b949e] text-center py-12",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[24px] animate-spin block mb-2",children:"progress_activity"}),"Loading logs..."]})]})]})]})}function d(){let[e,t]=(0,a.useState)([]),[r,o]=(0,a.useState)(!0),[n,c]=(0,a.useState)(null),[i,d]=(0,a.useState)(""),[x,u]=(0,a.useState)(""),[m,p]=(0,a.useState)(0),[b,g]=(0,a.useState)(!1),h=(0,s.c)("logs"),v=(0,a.useCallback)(async()=>{o(!0),c(null);try{let e=new URLSearchParams;i&&e.set("action",i),x&&e.set("actor",x),e.set("limit",String(26)),e.set("offset",String(m));let r=await fetch(`/api/compliance/audit-log?${e.toString()}`);if(!r.ok)throw Error(h("failedFetchAuditLog"));let l=await r.json();g(l.length>25),t(l.slice(0,25))}catch(e){c(e.message||h("failedFetchAuditLog"))}finally{o(!1)}},[i,x,m,h]);(0,a.useEffect)(()=>{v()},[v]);let f=()=>{p(0),v()};return(0,l.jsxs)("div",{className:"space-y-6",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("h2",{className:"text-xl font-bold text-[var(--color-text-main)]",children:h("auditLog")}),(0,l.jsx)("p",{className:"text-sm text-[var(--color-text-muted)] mt-1",children:h("auditLogDesc")})]}),(0,l.jsx)("button",{onClick:v,disabled:r,"aria-label":h("refreshAuditLogAria"),className:"px-4 py-2 rounded-lg text-sm font-medium bg-[var(--color-surface)] border border-[var(--color-border)] text-[var(--color-text-main)] hover:bg-[var(--color-bg-alt)] transition-colors disabled:opacity-50",children:r?h("loading"):h("refresh")})]}),(0,l.jsxs)("div",{className:"flex flex-wrap gap-3 p-4 rounded-xl bg-[var(--color-surface)] border border-[var(--color-border)]",role:"search","aria-label":h("filterEntriesAria"),children:[(0,l.jsx)("input",{type:"text",placeholder:h("filterByAction"),value:i,onChange:e=>d(e.target.value),onKeyDown:e=>"Enter"===e.key&&f(),"aria-label":h("filterByActionTypeAria"),className:"flex-1 min-w-[180px] px-3 py-2 rounded-lg text-sm bg-[var(--color-bg)] border border-[var(--color-border)] text-[var(--color-text-main)] placeholder:text-[var(--color-text-muted)] focus:outline-2 focus:outline-[var(--color-accent)]"}),(0,l.jsx)("input",{type:"text",placeholder:h("filterByActor"),value:x,onChange:e=>u(e.target.value),onKeyDown:e=>"Enter"===e.key&&f(),"aria-label":h("filterByActorAria"),className:"flex-1 min-w-[180px] px-3 py-2 rounded-lg text-sm bg-[var(--color-bg)] border border-[var(--color-border)] text-[var(--color-text-main)] placeholder:text-[var(--color-text-muted)] focus:outline-2 focus:outline-[var(--color-accent)]"}),(0,l.jsx)("button",{onClick:f,className:"px-4 py-2 rounded-lg text-sm font-medium bg-[var(--color-accent)] text-white hover:bg-[var(--color-accent-hover)] transition-colors focus:outline-2 focus:outline-offset-2 focus:outline-[var(--color-accent)]",children:h("search")})]}),n&&(0,l.jsx)("div",{className:"p-4 rounded-lg bg-red-500/10 border border-red-500/30 text-red-400 text-sm",role:"alert",children:n}),(0,l.jsx)("div",{className:"overflow-x-auto rounded-xl border border-[var(--color-border)]",children:(0,l.jsxs)("table",{className:"w-full text-sm",role:"table","aria-label":h("tableAria"),children:[(0,l.jsx)("thead",{children:(0,l.jsxs)("tr",{className:"bg-[var(--color-bg-alt)] border-b border-[var(--color-border)]",children:[(0,l.jsx)("th",{className:"text-left px-4 py-3 font-medium text-[var(--color-text-muted)]",children:h("timestamp")}),(0,l.jsx)("th",{className:"text-left px-4 py-3 font-medium text-[var(--color-text-muted)]",children:h("action")}),(0,l.jsx)("th",{className:"text-left px-4 py-3 font-medium text-[var(--color-text-muted)]",children:h("actor")}),(0,l.jsx)("th",{className:"text-left px-4 py-3 font-medium text-[var(--color-text-muted)]",children:h("target")}),(0,l.jsx)("th",{className:"text-left px-4 py-3 font-medium text-[var(--color-text-muted)]",children:h("details")}),(0,l.jsx)("th",{className:"text-left px-4 py-3 font-medium text-[var(--color-text-muted)]",children:h("ipAddress")})]})}),(0,l.jsx)("tbody",{children:0!==e.length||r?e.map(e=>{var t;return(0,l.jsxs)("tr",{className:"border-b border-[var(--color-border)] hover:bg-[var(--color-bg-alt)] transition-colors",children:[(0,l.jsx)("td",{className:"px-4 py-3 whitespace-nowrap text-[var(--color-text-muted)] font-mono text-xs",children:(e=>{try{return new Date(e).toLocaleString()}catch{return e}})(e.timestamp)}),(0,l.jsx)("td",{className:"px-4 py-3",children:(0,l.jsx)("span",{className:`inline-block px-2 py-0.5 rounded-md text-xs font-medium border ${(t=e.action).includes("delete")||t.includes("remove")?"bg-red-500/15 text-red-400 border-red-500/20":t.includes("create")||t.includes("add")?"bg-green-500/15 text-green-400 border-green-500/20":t.includes("update")||t.includes("change")?"bg-blue-500/15 text-blue-400 border-blue-500/20":t.includes("login")||t.includes("auth")?"bg-purple-500/15 text-purple-400 border-purple-500/20":"bg-gray-500/15 text-gray-400 border-gray-500/20"}`,children:e.action})}),(0,l.jsx)("td",{className:"px-4 py-3 text-[var(--color-text-main)]",children:e.actor}),(0,l.jsx)("td",{className:"px-4 py-3 text-[var(--color-text-muted)] max-w-[200px] truncate",children:e.target||h("notAvailable")}),(0,l.jsx)("td",{className:"px-4 py-3 text-[var(--color-text-muted)] max-w-[300px] truncate font-mono text-xs",children:e.details?JSON.stringify(e.details):h("notAvailable")}),(0,l.jsx)("td",{className:"px-4 py-3 text-[var(--color-text-muted)] font-mono text-xs whitespace-nowrap",children:e.ip_address||h("notAvailable")})]},e.id)}):(0,l.jsx)("tr",{children:(0,l.jsx)("td",{colSpan:6,className:"px-4 py-8 text-center text-[var(--color-text-muted)]",children:h("noEntries")})})})]})}),(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsx)("p",{className:"text-xs text-[var(--color-text-muted)]",children:h("showing",{count:e.length,offset:m})}),(0,l.jsxs)("div",{className:"flex gap-2",children:[(0,l.jsxs)("button",{onClick:()=>p(Math.max(0,m-25)),disabled:0===m,className:"px-3 py-1.5 rounded-lg text-xs font-medium bg-[var(--color-surface)] border border-[var(--color-border)] text-[var(--color-text-main)] hover:bg-[var(--color-bg-alt)] disabled:opacity-30 transition-colors",children:["← ",h("previous")]}),(0,l.jsxs)("button",{onClick:()=>p(m+25),disabled:!b,className:"px-3 py-1.5 rounded-lg text-xs font-medium bg-[var(--color-surface)] border border-[var(--color-border)] text-[var(--color-text-main)] hover:bg-[var(--color-bg-alt)] disabled:opacity-30 transition-colors",children:[h("next")," →"]})]})]})]})}function x(){let[e,t]=(0,a.useState)("request-logs"),r=(0,s.c)("logs");return(0,l.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,l.jsx)(o.Iz,{options:[{value:"request-logs",label:r("requestLogs")},{value:"proxy-logs",label:r("proxyLogs")},{value:"audit-logs",label:r("auditLog")},{value:"console",label:r("console")}],value:e,onChange:t}),"request-logs"===e&&(0,l.jsx)(o.y7,{}),"proxy-logs"===e&&(0,l.jsx)(o.Lo,{}),"audit-logs"===e&&(0,l.jsx)(d,{}),"console"===e&&(0,l.jsx)(i,{})]})}}},e=>{e.O(0,[8500,3418,9751,8055,1149,5846,647,8441,3794,7358],()=>e(e.s=56646)),_N_E=e.O()}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8013],{40993:(e,t,r)=>{"use strict";r.d(t,{Ex:()=>i.default,$n:()=>l.default,Zp:()=>s.default,Qv:()=>c.CardSkeleton,G9:()=>f.default,bQ:()=>w.default,pp:()=>j.default,Qn:()=>N.default,pd:()=>a.default,Mh:()=>v.default,uR:()=>m.default,aF:()=>n.default,rq:()=>u.default,LF:()=>x.default,KN:()=>g.default,Lo:()=>h.default,y7:()=>b.default,Iz:()=>y.default,l6:()=>o.default,lM:()=>d.default,cn:()=>p.default});var l=r(35806),a=r(34422),o=r(42994),s=r(81060),n=r(71361),c=r(92542);r(17705);var i=r(80927),d=r(19790);r(6261),r(55846),r(34243),r(89938),r(99023);var x=r(80178),u=r(85444),m=r(91961);r(25112);var p=r(45624),b=r(37415),g=r(48643),h=r(8287);r(1652);var v=r(92701);r(18150);var f=r(71689),y=r(33709);r(76332);var j=r(66200);r(61580);var N=r(51503);r(54128);var w=r(44638);r(21720),r(97050)},53586:(e,t,r)=>{Promise.resolve().then(r.bind(r,58802))},58802:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>x});var l=r(95155),a=r(12115),o=r(40993),s=r(50910);let n={debug:"text-gray-400",trace:"text-gray-500",info:"text-cyan-400",warn:"text-yellow-400",error:"text-red-400",fatal:"text-fuchsia-400"},c={debug:"bg-gray-500/10 border-gray-500/20",trace:"bg-gray-500/10 border-gray-500/20",info:"bg-cyan-500/10 border-cyan-500/20",warn:"bg-yellow-500/10 border-yellow-500/20",error:"bg-red-500/10 border-red-500/20",fatal:"bg-fuchsia-500/10 border-fuchsia-500/20"};function i(){let e=(0,s.c)("loggers"),[t,r]=(0,a.useState)([]),[o,i]=(0,a.useState)(!0),[d,x]=(0,a.useState)(null),[u,m]=(0,a.useState)("all"),[p,b]=(0,a.useState)(""),[g,h]=(0,a.useState)(!0),[v,f]=(0,a.useState)(null),[y,j]=(0,a.useState)(null),N=(0,a.useRef)(null),w=(0,a.useCallback)(async()=>{try{let e=new URLSearchParams;"all"!==u&&e.set("level",u),e.set("limit","500");let t=await fetch(`/api/logs/console?${e.toString()}`);if(!t.ok)throw Error(`HTTP ${t.status}`);let l=await t.json();r(l),f(new Date),x(null)}catch(e){x(e.message||"Failed to fetch logs")}finally{i(!1)}},[u]);(0,a.useEffect)(()=>{w();let e=setInterval(w,5e3);return()=>clearInterval(e)},[w]),(0,a.useEffect)(()=>{g&&N.current&&(N.current.scrollTop=N.current.scrollHeight)},[t,g]);let S=p?t.filter(e=>JSON.stringify(e).toLowerCase().includes(p.toLowerCase())):t;return(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsxs)("div",{className:"flex flex-wrap items-center gap-3 p-4 rounded-xl bg-[var(--color-surface)] border border-[var(--color-border)]",children:[(0,l.jsxs)("select",{value:u,onChange:e=>m(e.target.value),"aria-label":"Filter by log level",className:"px-3 py-2 rounded-lg text-sm bg-[var(--color-bg)] border border-[var(--color-border)] text-[var(--color-text-main)] focus:outline-2 focus:outline-[var(--color-accent)]",children:[(0,l.jsx)("option",{value:"all",children:e("allLevels")}),(0,l.jsx)("option",{value:"debug",children:"Debug+"}),(0,l.jsx)("option",{value:"info",children:"Info+"}),(0,l.jsx)("option",{value:"warn",children:"Warn+"}),(0,l.jsx)("option",{value:"error",children:"Error+"})]}),(0,l.jsx)("input",{type:"text",placeholder:"Search logs...",value:p,onChange:e=>b(e.target.value),"aria-label":"Search log entries",className:"flex-1 min-w-[200px] px-3 py-2 rounded-lg text-sm bg-[var(--color-bg)] border border-[var(--color-border)] text-[var(--color-text-main)] placeholder:text-[var(--color-text-muted)] focus:outline-2 focus:outline-[var(--color-accent)]"}),(0,l.jsxs)("button",{onClick:()=>h(!g),title:g?"Disable auto-scroll":"Enable auto-scroll",className:`px-3 py-2 rounded-lg text-sm font-medium border transition-colors ${g?"bg-cyan-500/15 text-cyan-400 border-cyan-500/30":"bg-[var(--color-bg)] text-[var(--color-text-muted)] border-[var(--color-border)]"}`,children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[16px] align-middle mr-1",children:g?"vertical_align_bottom":"lock"}),"Auto-scroll"]}),(0,l.jsx)("button",{onClick:w,disabled:o,className:"px-3 py-2 rounded-lg text-sm font-medium bg-[var(--color-bg)] border border-[var(--color-border)] text-[var(--color-text-main)] hover:bg-[var(--color-bg-alt)] disabled:opacity-50 transition-colors",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[16px] align-middle",children:"refresh"})}),(0,l.jsxs)("div",{className:"flex items-center gap-2 ml-auto text-xs text-[var(--color-text-muted)]",children:[(0,l.jsx)("span",{className:"inline-block w-2 h-2 rounded-full bg-green-500 animate-pulse"}),(0,l.jsxs)("span",{children:[S.length," entries"]}),(0,l.jsx)("span",{className:"text-[var(--color-text-muted)]/50",children:"•"}),(0,l.jsx)("span",{children:"Last 1h"}),v&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("span",{className:"text-[var(--color-text-muted)]/50",children:"•"}),(0,l.jsxs)("span",{children:["Updated ",v.toLocaleTimeString()]})]})]})]}),d&&(0,l.jsxs)("div",{className:"p-4 rounded-lg bg-red-500/10 border border-red-500/30 text-red-400 text-sm",role:"alert",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[16px] align-middle mr-2",children:"error"}),d,(0,l.jsx)("span",{className:"text-xs ml-2 opacity-70",children:"— Make sure the application is writing logs to file (LOG_TO_FILE=true)"})]}),(0,l.jsxs)("div",{ref:N,className:"rounded-xl border border-[var(--color-border)] bg-[#0d1117] overflow-auto font-mono text-xs leading-relaxed",style:{maxHeight:"calc(100vh - 340px)",minHeight:"400px"},role:"log","aria-label":"Application console logs","aria-live":"polite",children:[(0,l.jsxs)("div",{className:"sticky top-0 z-10 px-4 py-2 bg-[#161b22] border-b border-[#30363d] flex items-center gap-2",children:[(0,l.jsx)("div",{className:"w-3 h-3 rounded-full bg-[#FF5F56]"}),(0,l.jsx)("div",{className:"w-3 h-3 rounded-full bg-[#FFBD2E]"}),(0,l.jsx)("div",{className:"w-3 h-3 rounded-full bg-[#27C93F]"}),(0,l.jsx)("span",{className:"ml-3 text-[#8b949e] text-[11px]",children:"OmniRoute — Application Console"})]}),(0,l.jsxs)("div",{className:"p-3 space-y-px",children:[0!==S.length||o?S.map((e,t)=>{let r=(e.level||"info").toLowerCase(),a=n[r]||n.info,o=c[r]||"",s=e.component||e.module||"",i=e.msg||e.message||"";return(0,l.jsxs)("div",{className:`group flex items-start gap-2 px-2 py-1 rounded hover:bg-white/5 transition-colors ${"error"===r||"fatal"===r?"bg-red-500/5":""}`,children:[(0,l.jsx)("span",{className:"text-[#484f58] whitespace-nowrap shrink-0 select-none",children:(e=>{try{return new Date(e).toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit",fractionalSecondDigits:3})}catch{return e}})(e.timestamp)}),(0,l.jsx)("span",{className:`inline-block px-1.5 py-0 rounded text-[10px] font-semibold uppercase border shrink-0 ${a} ${o}`,children:r.padEnd(5)}),s&&(0,l.jsxs)("span",{className:"text-purple-400/80 shrink-0",children:["[",s,"]"]}),(0,l.jsxs)("span",{className:"text-[#c9d1d9] flex-1 break-all",children:[i,e.correlationId&&(0,l.jsxs)("span",{className:"text-[#484f58] ml-2",children:["cid:",e.correlationId.slice(0,8)]})]}),(0,l.jsx)("button",{onClick:()=>{let r;return r=JSON.stringify(e,null,2),void navigator.clipboard.writeText(r).then(()=>{j(t),setTimeout(()=>j(null),2e3)})},title:"Copy log entry",className:"opacity-0 group-hover:opacity-100 transition-opacity shrink-0 text-[#8b949e] hover:text-white",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:y===t?"check":"content_copy"})})]},t)}):(0,l.jsxs)("div",{className:"text-[#8b949e] text-center py-12",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[40px] block mb-2 opacity-30",children:"terminal"}),(0,l.jsx)("p",{children:e("noLogEntries")}),(0,l.jsx)("p",{className:"text-[10px] mt-1 opacity-60",children:"Ensure LOG_TO_FILE=true is set in your .env file"})]}),o&&0===S.length&&(0,l.jsxs)("div",{className:"text-[#8b949e] text-center py-12",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[24px] animate-spin block mb-2",children:"progress_activity"}),"Loading logs..."]})]})]})]})}function d(){let[e,t]=(0,a.useState)([]),[r,o]=(0,a.useState)(!0),[n,c]=(0,a.useState)(null),[i,d]=(0,a.useState)(""),[x,u]=(0,a.useState)(""),[m,p]=(0,a.useState)(0),[b,g]=(0,a.useState)(!1),h=(0,s.c)("logs"),v=(0,a.useCallback)(async()=>{o(!0),c(null);try{let e=new URLSearchParams;i&&e.set("action",i),x&&e.set("actor",x),e.set("limit",String(26)),e.set("offset",String(m));let r=await fetch(`/api/compliance/audit-log?${e.toString()}`);if(!r.ok)throw Error(h("failedFetchAuditLog"));let l=await r.json();g(l.length>25),t(l.slice(0,25))}catch(e){c(e.message||h("failedFetchAuditLog"))}finally{o(!1)}},[i,x,m,h]);(0,a.useEffect)(()=>{v()},[v]);let f=()=>{p(0),v()};return(0,l.jsxs)("div",{className:"space-y-6",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("h2",{className:"text-xl font-bold text-[var(--color-text-main)]",children:h("auditLog")}),(0,l.jsx)("p",{className:"text-sm text-[var(--color-text-muted)] mt-1",children:h("auditLogDesc")})]}),(0,l.jsx)("button",{onClick:v,disabled:r,"aria-label":h("refreshAuditLogAria"),className:"px-4 py-2 rounded-lg text-sm font-medium bg-[var(--color-surface)] border border-[var(--color-border)] text-[var(--color-text-main)] hover:bg-[var(--color-bg-alt)] transition-colors disabled:opacity-50",children:r?h("loading"):h("refresh")})]}),(0,l.jsxs)("div",{className:"flex flex-wrap gap-3 p-4 rounded-xl bg-[var(--color-surface)] border border-[var(--color-border)]",role:"search","aria-label":h("filterEntriesAria"),children:[(0,l.jsx)("input",{type:"text",placeholder:h("filterByAction"),value:i,onChange:e=>d(e.target.value),onKeyDown:e=>"Enter"===e.key&&f(),"aria-label":h("filterByActionTypeAria"),className:"flex-1 min-w-[180px] px-3 py-2 rounded-lg text-sm bg-[var(--color-bg)] border border-[var(--color-border)] text-[var(--color-text-main)] placeholder:text-[var(--color-text-muted)] focus:outline-2 focus:outline-[var(--color-accent)]"}),(0,l.jsx)("input",{type:"text",placeholder:h("filterByActor"),value:x,onChange:e=>u(e.target.value),onKeyDown:e=>"Enter"===e.key&&f(),"aria-label":h("filterByActorAria"),className:"flex-1 min-w-[180px] px-3 py-2 rounded-lg text-sm bg-[var(--color-bg)] border border-[var(--color-border)] text-[var(--color-text-main)] placeholder:text-[var(--color-text-muted)] focus:outline-2 focus:outline-[var(--color-accent)]"}),(0,l.jsx)("button",{onClick:f,className:"px-4 py-2 rounded-lg text-sm font-medium bg-[var(--color-accent)] text-white hover:bg-[var(--color-accent-hover)] transition-colors focus:outline-2 focus:outline-offset-2 focus:outline-[var(--color-accent)]",children:h("search")})]}),n&&(0,l.jsx)("div",{className:"p-4 rounded-lg bg-red-500/10 border border-red-500/30 text-red-400 text-sm",role:"alert",children:n}),(0,l.jsx)("div",{className:"overflow-x-auto rounded-xl border border-[var(--color-border)]",children:(0,l.jsxs)("table",{className:"w-full text-sm",role:"table","aria-label":h("tableAria"),children:[(0,l.jsx)("thead",{children:(0,l.jsxs)("tr",{className:"bg-[var(--color-bg-alt)] border-b border-[var(--color-border)]",children:[(0,l.jsx)("th",{className:"text-left px-4 py-3 font-medium text-[var(--color-text-muted)]",children:h("timestamp")}),(0,l.jsx)("th",{className:"text-left px-4 py-3 font-medium text-[var(--color-text-muted)]",children:h("action")}),(0,l.jsx)("th",{className:"text-left px-4 py-3 font-medium text-[var(--color-text-muted)]",children:h("actor")}),(0,l.jsx)("th",{className:"text-left px-4 py-3 font-medium text-[var(--color-text-muted)]",children:h("target")}),(0,l.jsx)("th",{className:"text-left px-4 py-3 font-medium text-[var(--color-text-muted)]",children:h("details")}),(0,l.jsx)("th",{className:"text-left px-4 py-3 font-medium text-[var(--color-text-muted)]",children:h("ipAddress")})]})}),(0,l.jsx)("tbody",{children:0!==e.length||r?e.map(e=>{var t;return(0,l.jsxs)("tr",{className:"border-b border-[var(--color-border)] hover:bg-[var(--color-bg-alt)] transition-colors",children:[(0,l.jsx)("td",{className:"px-4 py-3 whitespace-nowrap text-[var(--color-text-muted)] font-mono text-xs",children:(e=>{try{return new Date(e).toLocaleString()}catch{return e}})(e.timestamp)}),(0,l.jsx)("td",{className:"px-4 py-3",children:(0,l.jsx)("span",{className:`inline-block px-2 py-0.5 rounded-md text-xs font-medium border ${(t=e.action).includes("delete")||t.includes("remove")?"bg-red-500/15 text-red-400 border-red-500/20":t.includes("create")||t.includes("add")?"bg-green-500/15 text-green-400 border-green-500/20":t.includes("update")||t.includes("change")?"bg-blue-500/15 text-blue-400 border-blue-500/20":t.includes("login")||t.includes("auth")?"bg-purple-500/15 text-purple-400 border-purple-500/20":"bg-gray-500/15 text-gray-400 border-gray-500/20"}`,children:e.action})}),(0,l.jsx)("td",{className:"px-4 py-3 text-[var(--color-text-main)]",children:e.actor}),(0,l.jsx)("td",{className:"px-4 py-3 text-[var(--color-text-muted)] max-w-[200px] truncate",children:e.target||h("notAvailable")}),(0,l.jsx)("td",{className:"px-4 py-3 text-[var(--color-text-muted)] max-w-[300px] truncate font-mono text-xs",children:e.details?JSON.stringify(e.details):h("notAvailable")}),(0,l.jsx)("td",{className:"px-4 py-3 text-[var(--color-text-muted)] font-mono text-xs whitespace-nowrap",children:e.ip_address||h("notAvailable")})]},e.id)}):(0,l.jsx)("tr",{children:(0,l.jsx)("td",{colSpan:6,className:"px-4 py-8 text-center text-[var(--color-text-muted)]",children:h("noEntries")})})})]})}),(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsx)("p",{className:"text-xs text-[var(--color-text-muted)]",children:h("showing",{count:e.length,offset:m})}),(0,l.jsxs)("div",{className:"flex gap-2",children:[(0,l.jsxs)("button",{onClick:()=>p(Math.max(0,m-25)),disabled:0===m,className:"px-3 py-1.5 rounded-lg text-xs font-medium bg-[var(--color-surface)] border border-[var(--color-border)] text-[var(--color-text-main)] hover:bg-[var(--color-bg-alt)] disabled:opacity-30 transition-colors",children:["← ",h("previous")]}),(0,l.jsxs)("button",{onClick:()=>p(m+25),disabled:!b,className:"px-3 py-1.5 rounded-lg text-xs font-medium bg-[var(--color-surface)] border border-[var(--color-border)] text-[var(--color-text-main)] hover:bg-[var(--color-bg-alt)] disabled:opacity-30 transition-colors",children:[h("next")," →"]})]})]})]})}function x(){let[e,t]=(0,a.useState)("request-logs"),r=(0,s.c)("logs");return(0,l.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,l.jsx)(o.Iz,{options:[{value:"request-logs",label:r("requestLogs")},{value:"proxy-logs",label:r("proxyLogs")},{value:"audit-logs",label:r("auditLog")},{value:"console",label:r("console")}],value:e,onChange:t}),"request-logs"===e&&(0,l.jsx)(o.y7,{}),"proxy-logs"===e&&(0,l.jsx)(o.Lo,{}),"audit-logs"===e&&(0,l.jsx)(d,{}),"console"===e&&(0,l.jsx)(i,{})]})}}},e=>{e.O(0,[8500,3418,9751,8055,1149,5846,647,8441,3794,7358],()=>e(e.s=53586)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3542],{4333:(e,s,_)=>{Promise.resolve().then(_.bind(_,24726))}},e=>{e.O(0,[8500,3418,9751,8055,1149,5846,647,4726,8441,3794,7358],()=>e(e.s=4333)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1606],{38701:(e,a,i)=>{"use strict";i.d(a,{default:()=>c});var t=i(95155),l=i(12115),n=i(50910);let r={image:{icon:"image",endpoint:"/api/v1/images/generations",label:"Image Generation",placeholder:"A serene landscape with mountains at sunset...",color:"from-purple-500 to-pink-500"},video:{icon:"videocam",endpoint:"/api/v1/videos/generations",label:"Video Generation",placeholder:"A timelapse of a flower blooming...",color:"from-blue-500 to-cyan-500"},music:{icon:"music_note",endpoint:"/api/v1/music/generations",label:"Music Generation",placeholder:"Upbeat electronic music with synth pads...",color:"from-orange-500 to-yellow-500"},speech:{icon:"record_voice_over",endpoint:"/api/v1/audio/speech",label:"Text to Speech",placeholder:"Hello! Welcome to OmniRoute, your intelligent AI gateway...",color:"from-green-500 to-teal-500",textLabel:"Text"},transcription:{icon:"mic",endpoint:"/api/v1/audio/transcriptions",label:"Transcription",placeholder:"Upload an audio file to transcribe...",color:"from-indigo-500 to-blue-500"}},s={image:[{id:"openai",name:"OpenAI",models:[{id:"openai/dall-e-3",name:"DALL-E 3"},{id:"openai/dall-e-2",name:"DALL-E 2"}]},{id:"xai",name:"xAI (Grok)",models:[{id:"xai/grok-2-image",name:"Grok 2 Image"}]},{id:"together",name:"Together AI",models:[{id:"together/stable-diffusion-xl",name:"SDXL"},{id:"together/FLUX.1-schnell-Free",name:"FLUX.1 Schnell"}]},{id:"fireworks",name:"Fireworks AI",models:[{id:"fireworks/stable-diffusion-xl-1024-v1-0",name:"SDXL 1024"},{id:"fireworks/flux-1-dev-fp8",name:"FLUX.1 Dev"}]},{id:"nebius",name:"Nebius AI",models:[{id:"nebius/flux-dev",name:"FLUX Dev"},{id:"nebius/sdxl",name:"SDXL"}]},{id:"hyperbolic",name:"Hyperbolic",models:[{id:"hyperbolic/SDXL1.0-base",name:"SDXL Base"},{id:"hyperbolic/stable-diffusion-2",name:"SD 2"}]},{id:"nanobanana",name:"NanoBanana",models:[{id:"nanobanana/flux-schnell",name:"FLUX Schnell"}]},{id:"sdwebui",name:"SD WebUI",models:[{id:"sdwebui/sd_xl_base_1.0",name:"SDXL Base (Local)"}]},{id:"comfyui",name:"ComfyUI",models:[{id:"comfyui/flux-dev",name:"FLUX Dev (Local)"},{id:"comfyui/sdxl",name:"SDXL (Local)"}]}],video:[{id:"comfyui",name:"ComfyUI",models:[{id:"comfyui/animatediff",name:"AnimateDiff"},{id:"comfyui/svd",name:"Stable Video Diffusion"}]},{id:"sdwebui",name:"SD WebUI",models:[{id:"sdwebui/animatediff",name:"AnimateDiff (Local)"}]}],music:[{id:"comfyui",name:"ComfyUI",models:[{id:"comfyui/stable-audio",name:"Stable Audio Open"},{id:"comfyui/musicgen",name:"MusicGen"}]}],speech:[{id:"openai",name:"OpenAI",models:[{id:"openai/tts-1",name:"TTS-1"},{id:"openai/tts-1-hd",name:"TTS-1 HD"},{id:"openai/gpt-4o-mini-tts",name:"GPT-4o Mini TTS"}]},{id:"elevenlabs",name:"ElevenLabs",models:[{id:"elevenlabs/eleven_multilingual_v2",name:"Eleven Multilingual v2"},{id:"elevenlabs/eleven_turbo_v2_5",name:"Eleven Turbo v2.5"}]},{id:"deepgram",name:"Deepgram",models:[{id:"deepgram/aura-asteria-en",name:"Aura Asteria (EN)"},{id:"deepgram/aura-luna-en",name:"Aura Luna (EN)"},{id:"deepgram/aura-stella-en",name:"Aura Stella (EN)"}]},{id:"hyperbolic",name:"Hyperbolic",models:[{id:"hyperbolic/melo-tts",name:"Melo TTS"}]},{id:"nvidia",name:"NVIDIA NIM",models:[{id:"nvidia/fastpitch",name:"FastPitch"},{id:"nvidia/tacotron2",name:"Tacotron2"}]},{id:"inworld",name:"Inworld",models:[{id:"inworld/inworld-tts-1.5-max",name:"Inworld TTS Max"},{id:"inworld/inworld-tts-1.5-mini",name:"Inworld TTS Mini"}]},{id:"cartesia",name:"Cartesia",models:[{id:"cartesia/sonic-2",name:"Sonic 2"},{id:"cartesia/sonic-3",name:"Sonic 3"}]},{id:"playht",name:"PlayHT",models:[{id:"playht/PlayDialog",name:"PlayDialog"},{id:"playht/Play3.0-mini",name:"Play3.0 Mini"}]},{id:"huggingface",name:"HuggingFace",models:[{id:"huggingface/espnet/kan-bayashi_ljspeech_vits",name:"VITS LJSpeech"}]},{id:"qwen",name:"Qwen",models:[{id:"qwen/qwen3-tts",name:"Qwen3 TTS"}]}],transcription:[{id:"openai",name:"OpenAI",models:[{id:"openai/whisper-1",name:"Whisper 1"},{id:"openai/gpt-4o-transcription",name:"GPT-4o Transcription"}]},{id:"groq",name:"Groq",models:[{id:"groq/whisper-large-v3",name:"Whisper Large v3"},{id:"groq/whisper-large-v3-turbo",name:"Whisper Turbo"}]},{id:"deepgram",name:"Deepgram",models:[{id:"deepgram/nova-3",name:"Nova 3"},{id:"deepgram/nova-2",name:"Nova 2"}]},{id:"assemblyai",name:"AssemblyAI",models:[{id:"assemblyai/universal-3-pro",name:"Universal 3 Pro"},{id:"assemblyai/universal-2",name:"Universal 2"}]},{id:"nvidia",name:"NVIDIA NIM",models:[{id:"nvidia/nvidia/parakeet-ctc-1.1b-asr",name:"Parakeet CTC 1.1B"}]},{id:"huggingface",name:"HuggingFace",models:[{id:"huggingface/openai/whisper-large-v3",name:"Whisper Large v3 (HF)"}]},{id:"qwen",name:"Qwen",models:[{id:"qwen/qwen3-asr",name:"Qwen3 ASR"}]}]},o={default:[{id:"alloy",label:"Alloy"},{id:"echo",label:"Echo"},{id:"fable",label:"Fable"},{id:"onyx",label:"Onyx"},{id:"nova",label:"Nova"},{id:"shimmer",label:"Shimmer"}],elevenlabs:[{id:"21m00Tcm4TlvDq8ikWAM",label:"Rachel (EN)"},{id:"AZnzlk1XvdvUeBnXmlld",label:"Domi (EN)"},{id:"EXAVITQu4vr4xnSDxMaL",label:"Bella (EN)"},{id:"ErXwobaYiN019PkySvjV",label:"Antoni (EN)"},{id:"MF3mGyEYCl7XYWbV9V6O",label:"Elli (EN)"},{id:"TxGEqnHWrfWFTfGW9XjX",label:"Josh (EN)"},{id:"VR6AewLTigWG4xSOukaG",label:"Arnold (EN)"},{id:"pNInz6obpgDQGcFmaJgB",label:"Adam (EN)"},{id:"yoZ06aMxZJJ28mfd3POQ",label:"Sam (EN)"}],cartesia:[{id:"a0e99841-438c-4a64-b679-ae501e7d6091",label:"Barbershop Man"},{id:"694f9389-aac1-45b6-b726-9d9369183238",label:"Friendly Reading Man"},{id:"b7d50908-b17c-442d-ad8d-810c63997ed9",label:"California Girl"}],deepgram:[{id:"aura-asteria-en",label:"Asteria (EN)"},{id:"aura-luna-en",label:"Luna (EN)"},{id:"aura-stella-en",label:"Stella (EN)"},{id:"aura-zeus-en",label:"Zeus (EN)"},{id:"aura-orion-en",label:"Orion (EN)"}],inworld:[{id:"Eva",label:"Eva (EN)"},{id:"Marcus",label:"Marcus (EN)"}]},d=["mp3","wav","opus","flac","pcm"];function m(e){return o[e]??o.default}function c(){let e=(0,n.c)("media"),[a,i]=(0,l.useState)("image"),[o,c]=(0,l.useState)(""),[u,p]=(0,l.useState)(""),[x,b]=(0,l.useState)(""),[h,f]=(0,l.useState)(!1),[g,v]=(0,l.useState)(null),[y,w]=(0,l.useState)(null),[N,j]=(0,l.useState)("alloy"),[S,k]=(0,l.useState)("mp3"),[T,E]=(0,l.useState)(null),A=s[a]??[],D=A.find(e=>e.id===u)?.models??[],[L,I]=(0,l.useState)(!1);if(!L){I(!0);let e=(s.image??[])[0];p(e?.id??""),b(e?.models[0]?.id??"")}let F=async()=>{f(!0),w(null),v(null);try{let e=r[a];if("speech"===a){if(!o.trim()){w("Please enter text to synthesize."),f(!1);return}let a=await fetch(e.endpoint,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:x,input:o.trim(),voice:N,response_format:S})});if(!a.ok){let e=await a.json().catch(()=>({}));throw Error(e?.error?.message||`TTS failed (${a.status})`)}let i=await a.blob(),t=URL.createObjectURL(i);v({type:"speech",data:{format:S},timestamp:Date.now(),audioUrl:t}),f(!1);return}if("transcription"===a){if(!T){w("Please select an audio file to transcribe."),f(!1);return}let a=new FormData;a.append("file",T),a.append("model",x);let i=await fetch(e.endpoint,{method:"POST",body:a});if(!i.ok){let e=await i.json().catch(()=>({}));throw Error(e?.error?.message||`Transcription failed (${i.status})`)}let t=await i.json();v({type:"transcription",data:t,timestamp:Date.now()}),f(!1);return}if(!o.trim()){w("Please enter a prompt."),f(!1);return}let i=await fetch(e.endpoint,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:x,prompt:o.trim(),..."image"===a?{size:"1024x1024",n:1}:{}})});if(!i.ok){let e=await i.json().catch(()=>({}));throw Error(e?.error?.message||`Generation failed (${i.status})`)}let t=await i.json();v({type:a,data:t,timestamp:Date.now()})}catch(e){w(e.message||"Generation failed")}f(!1)},P=r[a],_=m(u);return(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h1",{className:"text-2xl font-bold text-text-main",children:e("title")}),(0,t.jsx)("p",{className:"text-text-muted text-sm mt-1",children:e("subtitle")})]}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 p-1 bg-surface/50 rounded-xl border border-black/5 dark:border-white/5",children:Object.keys(r).map(e=>{let l=r[e],n=e===a;return(0,t.jsxs)("button",{onClick:()=>{let a;return i(e),c(""),v(null),w(null),E(null),a=(s[e]??[])[0],void(p(a?.id??""),b(a?.models[0]?.id??""),"speech"===e&&j(m(a?.id??"")[0]?.id??"alloy"))},className:`flex-1 min-w-[110px] flex items-center justify-center gap-2 px-4 py-2.5 rounded-lg text-sm font-medium transition-all ${n?"bg-primary/10 text-primary shadow-sm border border-primary/20":"text-text-muted hover:text-text-main hover:bg-surface/80"}`,children:[(0,t.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:l.icon}),l.label]},e)})}),(0,t.jsxs)("div",{className:"bg-surface/30 rounded-xl border border-black/5 dark:border-white/5 p-6 space-y-4",children:[(0,t.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-text-main mb-2",children:"Provider"}),(0,t.jsx)("select",{value:u,onChange:e=>{var i;let t;return p(i=e.target.value),t=s[a]?.find(e=>e.id===i)?.models??[],void(b(t[0]?.id??""),"speech"===a&&j(m(i)[0]?.id??"alloy"))},className:"w-full px-3 py-2 rounded-lg bg-surface border border-black/10 dark:border-white/10 text-text-main text-sm focus:outline-none focus:ring-2 focus:ring-primary/30",children:A.map(e=>(0,t.jsx)("option",{value:e.id,children:e.name},e.id))})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-text-main mb-2",children:e("model")}),(0,t.jsx)("select",{value:x,onChange:e=>b(e.target.value),className:"w-full px-3 py-2 rounded-lg bg-surface border border-black/10 dark:border-white/10 text-text-main text-sm focus:outline-none focus:ring-2 focus:ring-primary/30",children:D.map(e=>(0,t.jsx)("option",{value:e.id,children:e.name},e.id))})]})]}),"speech"===a&&(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-text-main mb-2",children:"Voice"}),(0,t.jsx)("select",{value:N,onChange:e=>j(e.target.value),className:"w-full px-3 py-2 rounded-lg bg-surface border border-black/10 dark:border-white/10 text-text-main text-sm focus:outline-none focus:ring-2 focus:ring-primary/30",children:_.map(e=>(0,t.jsx)("option",{value:e.id,children:e.label},e.id))})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-text-main mb-2",children:"Format"}),(0,t.jsx)("select",{value:S,onChange:e=>k(e.target.value),className:"w-full px-3 py-2 rounded-lg bg-surface border border-black/10 dark:border-white/10 text-text-main text-sm focus:outline-none focus:ring-2 focus:ring-primary/30",children:d.map(e=>(0,t.jsx)("option",{value:e,children:e},e))})]})]}),"transcription"===a?(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-text-main mb-2",children:"Audio File"}),(0,t.jsx)("input",{type:"file",accept:"audio/*,video/*",onChange:e=>E(e.target.files?.[0]??null),className:"w-full px-3 py-2 rounded-lg bg-surface border border-black/10 dark:border-white/10 text-text-main text-sm focus:outline-none focus:ring-2 focus:ring-primary/30 file:mr-3 file:py-1 file:px-3 file:rounded file:border-0 file:bg-primary/10 file:text-primary file:text-sm"}),T&&(0,t.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:[T.name," (",(T.size/1024).toFixed(0)," KB)"]})]}):(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-sm font-medium text-text-main mb-2",children:"speech"===a?"Text":e("prompt")}),(0,t.jsx)("textarea",{rows:3,value:o,onChange:e=>c(e.target.value),placeholder:P.placeholder,className:"w-full px-3 py-2 rounded-lg bg-surface border border-black/10 dark:border-white/10 text-text-main text-sm placeholder:text-text-muted/50 focus:outline-none focus:ring-2 focus:ring-primary/30 resize-none"})]}),(0,t.jsx)("button",{onClick:F,disabled:h||("transcription"===a?!T:!o.trim()),className:`w-full flex items-center justify-center gap-2 px-4 py-3 rounded-lg text-white font-medium transition-all bg-gradient-to-r ${P.color} ${h||("transcription"===a?!T:!o.trim())?"opacity-50 cursor-not-allowed":"hover:opacity-90 hover:shadow-lg"}`,children:h?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"material-symbols-outlined animate-spin text-[18px]",children:"progress_activity"}),"speech"===a?"Synthesizing...":"transcription"===a?"Transcribing...":e("generating")]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"speech"===a?"volume_up":"transcription"===a?"mic":"auto_awesome"}),"speech"===a?"Synthesize Speech":"transcription"===a?"Transcribe Audio":`${e("generate")} ${P.label}`]})})]}),y&&(0,t.jsxs)("div",{className:"bg-red-500/10 border border-red-500/20 rounded-xl p-4 flex items-start gap-3",children:[(0,t.jsx)("span",{className:"material-symbols-outlined text-red-500 text-[20px] mt-0.5",children:"error"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-sm font-medium text-red-500",children:e("error")}),(0,t.jsx)("p",{className:"text-sm text-text-muted mt-1",children:y})]})]}),g&&(0,t.jsxs)("div",{className:"bg-surface/30 rounded-xl border border-black/5 dark:border-white/5 p-6",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-4",children:[(0,t.jsx)("span",{className:`material-symbols-outlined text-[20px] bg-gradient-to-r ${P.color} bg-clip-text text-transparent`,children:P.icon}),(0,t.jsx)("h3",{className:"text-sm font-medium text-text-main",children:e("result")}),(0,t.jsx)("span",{className:"text-xs text-text-muted ml-auto",children:new Date(g.timestamp).toLocaleTimeString()})]}),"speech"===g.type&&g.audioUrl?(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)("audio",{controls:!0,src:g.audioUrl,className:"w-full rounded-lg",autoPlay:!0}),(0,t.jsxs)("a",{href:g.audioUrl,download:`speech.${g.data?.format||"mp3"}`,className:"inline-flex items-center gap-2 text-sm text-primary hover:underline",children:[(0,t.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"download"}),"Download ",g.data?.format?.toUpperCase()||"MP3"]})]}):(0,t.jsx)("pre",{className:"bg-surface rounded-lg p-4 text-xs text-text-muted overflow-auto max-h-96 custom-scrollbar",children:JSON.stringify(g.data,null,2)})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-5 gap-4",children:Object.keys(r).map(e=>{let a=r[e],i=s[e]?.length??0;return(0,t.jsxs)("div",{className:"bg-surface/30 rounded-xl border border-black/5 dark:border-white/5 p-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,t.jsx)("div",{className:`flex items-center justify-center size-8 rounded-lg bg-gradient-to-r ${a.color}`,children:(0,t.jsx)("span",{className:"material-symbols-outlined text-white text-[16px]",children:a.icon})}),(0,t.jsx)("span",{className:"text-sm font-medium text-text-main",children:a.label})]}),(0,t.jsxs)("p",{className:"text-xs text-text-muted",children:[i," providers"]}),(0,t.jsxs)("code",{className:"block mt-2 text-xs text-primary/70 bg-primary/5 rounded px-2 py-1",children:["POST ",a.endpoint]})]},e)})})]})}},50910:(e,a,i)=>{"use strict";i.d(a,{c:()=>n});var t=i(33418);function l(e,a){return(...e)=>{try{return a(...e)}catch{throw Error(void 0)}}}let n=l(0,t.c3);l(0,t.kc)},79021:(e,a,i)=>{Promise.resolve().then(i.bind(i,38701))}},e=>{e.O(0,[3418,8441,3794,7358],()=>e(e.s=79021)),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9971],{4051:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>d});var r=s(95155),i=s(12115),a=s(73321),n=s(50910);let o=["welcome","security","provider","test","done"],c=["waving_hand","lock","dns","play_circle","check_circle"],l=[{id:"openai",name:"OpenAI",color:"#10A37F"},{id:"anthropic",name:"Anthropic",color:"#D97757"},{id:"google",name:"Google AI",color:"#4285F4"},{id:"openrouter",name:"OpenRouter",color:"#6B21A8"},{id:"groq",name:"Groq",color:"#F55036"},{id:"mistral",name:"Mistral",color:"#FF7000"}];function d(){let e=(0,a.useRouter)(),t=(0,n.c)("onboarding"),s=(0,n.c)("common"),[d,m]=(0,i.useState)(0),[x,p]=(0,i.useState)(!0),[u,h]=(0,i.useState)("http://localhost:20128/api/v1"),[g,b]=(0,i.useState)(""),[y,f]=(0,i.useState)(""),[j,v]=(0,i.useState)(!1),[w,N]=(0,i.useState)(null),[k,C]=(0,i.useState)(""),[P,S]=(0,i.useState)(""),[_,O]=(0,i.useState)(""),[T,A]=(0,i.useState)("idle"),[E,F]=(0,i.useState)("");(0,i.useEffect)(()=>{(async()=>{try{let s=await fetch("/api/settings");if(s.ok){var t;let r,i,a=await s.json();if(t=a?.apiPort,r=window.location.protocol,i=window.location.hostname,h(`${r}//${i}:${t||20128}/api/v1`),a.setupComplete)return void e.replace("/dashboard")}}catch{}p(!1)})()},[e]);let $=o.map((e,s)=>({id:e,title:t("done"===e?"ready":e),icon:c[s]})),q=$[d],D=d===$.length-1,R=()=>{d<$.length-1&&m(d+1)},[J,K]=(0,i.useState)(""),M=async()=>{if(j)return void R();if(g===y){K("");try{let e=await fetch("/api/settings/require-login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({requireLogin:!0,password:g})});if(!e.ok){let s=await e.json().catch(()=>({}));K(s.error||t("failedSetPassword"));return}R()}catch{K(t("connectionError"))}}},z=async()=>{if(w&&P){K("");try{let e=l.find(e=>e.id===w),s=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:w,name:_||e?.name||w,url:k||({openai:"https://api.openai.com",anthropic:"https://api.anthropic.com",google:"https://generativelanguage.googleapis.com",openrouter:"https://openrouter.ai/api",groq:"https://api.groq.com/openai",mistral:"https://api.mistral.ai"})[w]||"",apiKey:P,isActive:!0})});if(!s.ok){let e=await s.json().catch(()=>({}));K(e.error||t("failedAddProvider"));return}R()}catch{K(t("connectionError"))}}},G=async()=>{A("testing"),F(t("testingConnection"));try{let e=await fetch("/api/providers");if(!e.ok)throw Error("Failed to fetch");let s=await e.json(),r=s.connections?.[0];if(!r){A("error"),F(t("noProviderFound"));return}let i=await fetch(`/api/providers/${r.id}/test`,{method:"POST"});if(i.ok)A("success"),F(t("connectionSuccessful"));else{let e=await i.json().catch(()=>({}));A("error"),F(e.error||t("testFailed"))}}catch{A("error"),F(t("couldNotTest"))}},I=async()=>{try{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({setupComplete:!0})})}catch{}e.push("/dashboard")};return x?(0,r.jsx)("div",{className:"min-h-screen flex items-center justify-center bg-bg",children:(0,r.jsx)("div",{className:"animate-pulse text-text-muted",children:s("loading")})}):(0,r.jsx)("div",{className:"min-h-screen flex items-center justify-center bg-bg p-4",children:(0,r.jsxs)("div",{className:"w-full max-w-lg",children:[(0,r.jsx)("div",{className:"flex items-center justify-center gap-2 mb-8",children:$.map((e,t)=>(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("div",{className:`w-8 h-8 rounded-full flex items-center justify-center text-sm font-semibold transition-all duration-300 ${t<d?"bg-green-500/20 text-green-400":t===d?"bg-primary/20 text-primary ring-2 ring-primary/40":"bg-white/5 text-text-muted"}`,children:t<d?(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"check"}):t+1}),t<$.length-1&&(0,r.jsx)("div",{className:`w-8 h-0.5 rounded-full transition-colors ${t<d?"bg-green-500/40":"bg-white/10"}`})]},e.id))}),(0,r.jsxs)("div",{className:"bg-surface rounded-2xl border border-white/[0.06] p-8 shadow-xl",children:[(0,r.jsxs)("div",{className:"text-center mb-6",children:[(0,r.jsx)("span",{className:`material-symbols-outlined text-[48px] mb-3 block ${"done"===q.id?"text-green-400":"text-primary"}`,children:q.icon}),(0,r.jsx)("h2",{className:"text-2xl font-bold text-text-main mb-1",children:q.title})]}),(0,r.jsxs)("div",{className:"min-h-[200px]",children:["welcome"===q.id&&(0,r.jsxs)("div",{className:"text-center space-y-4",children:[(0,r.jsx)("p",{className:"text-text-muted",children:t("welcomeDesc")}),(0,r.jsx)("div",{className:"grid grid-cols-3 gap-3 mt-6",children:[{icon:"swap_horiz",label:t("multiProvider")},{icon:"monitoring",label:t("usageTracking")},{icon:"shield",label:t("apiKeyMgmt")}].map(e=>(0,r.jsxs)("div",{className:"bg-white/[0.03] rounded-xl p-3 text-center border border-white/[0.06]",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary text-[24px] mb-1 block",children:e.icon}),(0,r.jsx)("span",{className:"text-xs text-text-muted",children:e.label})]},e.icon))})]}),"security"===q.id&&(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)("p",{className:"text-sm text-text-muted text-center",children:t("securityDesc")}),(0,r.jsxs)("label",{className:"flex items-center gap-2 cursor-pointer text-sm text-text-muted",children:[(0,r.jsx)("input",{type:"checkbox",checked:j,onChange:e=>v(e.target.checked),className:"accent-primary"}),t("skipPassword")]}),!j&&(0,r.jsxs)("div",{className:"space-y-3",children:[(0,r.jsx)("input",{type:"password",placeholder:t("enterPassword"),value:g,onChange:e=>b(e.target.value),className:"w-full px-4 py-2.5 bg-white/[0.04] border border-white/10 rounded-lg text-text-main text-sm placeholder:text-text-muted/50 focus:outline-none focus:ring-2 focus:ring-primary/40"}),(0,r.jsx)("input",{type:"password",placeholder:t("confirmPasswordPlaceholder"),value:y,onChange:e=>f(e.target.value),className:"w-full px-4 py-2.5 bg-white/[0.04] border border-white/10 rounded-lg text-text-main text-sm placeholder:text-text-muted/50 focus:outline-none focus:ring-2 focus:ring-primary/40"}),g&&y&&g!==y&&(0,r.jsx)("p",{className:"text-xs text-red-400",children:t("passwordsMismatch")})]})]}),"provider"===q.id&&(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)("p",{className:"text-sm text-text-muted text-center",children:t("providerDesc")}),(0,r.jsx)("div",{className:"grid grid-cols-3 gap-2",children:l.map(e=>(0,r.jsx)("button",{onClick:()=>{N(e.id),O(e.name)},className:`p-3 rounded-xl border text-center text-xs font-medium transition-all cursor-pointer ${w===e.id?"border-primary/60 bg-primary/10 text-primary":"border-white/10 bg-white/[0.03] text-text-muted hover:border-white/20"}`,children:e.name},e.id))}),w&&(0,r.jsxs)("div",{className:"space-y-3 mt-4",children:[(0,r.jsx)("input",{type:"password",placeholder:t("apiKeyRequired"),value:P,onChange:e=>S(e.target.value),className:"w-full px-4 py-2.5 bg-white/[0.04] border border-white/10 rounded-lg text-text-main text-sm placeholder:text-text-muted/50 focus:outline-none focus:ring-2 focus:ring-primary/40"}),(0,r.jsx)("input",{type:"text",placeholder:t("customUrlOptional"),value:k,onChange:e=>C(e.target.value),className:"w-full px-4 py-2.5 bg-white/[0.04] border border-white/10 rounded-lg text-text-main text-sm placeholder:text-text-muted/50 focus:outline-none focus:ring-2 focus:ring-primary/40"})]})]}),"test"===q.id&&(0,r.jsxs)("div",{className:"text-center space-y-4",children:[(0,r.jsx)("p",{className:"text-sm text-text-muted",children:t("testDesc")}),"idle"===T&&(0,r.jsx)("button",{onClick:G,className:"px-6 py-2.5 bg-primary rounded-lg text-white font-medium text-sm hover:bg-primary/90 transition-colors cursor-pointer",children:t("runTest")}),"testing"===T&&(0,r.jsxs)("div",{className:"flex items-center justify-center gap-2 text-text-muted",children:[(0,r.jsx)("span",{className:"material-symbols-outlined animate-spin text-[20px]",children:"progress_activity"}),(0,r.jsx)("span",{className:"text-sm",children:E})]}),"success"===T&&(0,r.jsxs)("div",{className:"flex items-center justify-center gap-2 text-green-400",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"check_circle"}),(0,r.jsx)("span",{className:"text-sm",children:E})]}),"error"===T&&(0,r.jsxs)("div",{className:"space-y-3",children:[(0,r.jsxs)("div",{className:"flex items-center justify-center gap-2 text-amber-400",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"warning"}),(0,r.jsx)("span",{className:"text-sm",children:E})]}),(0,r.jsx)("button",{onClick:G,className:"text-xs text-text-muted underline cursor-pointer",children:t("retry")})]})]}),"done"===q.id&&(0,r.jsxs)("div",{className:"text-center space-y-4",children:[(0,r.jsx)("p",{className:"text-text-muted",children:t("doneDesc")}),(0,r.jsxs)("div",{className:"bg-white/[0.03] rounded-xl p-4 border border-white/[0.06] text-left",children:[(0,r.jsx)("p",{className:"text-xs text-text-muted mb-2 font-medium",children:t("yourEndpoint")}),(0,r.jsx)("code",{className:"text-sm text-primary",children:u})]})]})]}),(0,r.jsxs)("div",{className:"flex items-center justify-between mt-8 pt-6 border-t border-white/[0.06]",children:[(0,r.jsx)("div",{children:d>0&&!D&&(0,r.jsx)("button",{onClick:()=>{d>0&&m(d-1)},className:"px-4 py-2 text-sm text-text-muted hover:text-text-main transition-colors cursor-pointer",children:s("back")})}),(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[!D&&d>0&&(0,r.jsx)("button",{onClick:R,className:"px-4 py-2 text-sm text-text-muted hover:text-text-main transition-colors cursor-pointer",children:t("skip")}),"welcome"===q.id&&(0,r.jsx)("button",{onClick:R,className:"px-6 py-2.5 bg-primary rounded-lg text-white font-medium text-sm hover:bg-primary/90 transition-colors cursor-pointer",children:t("getStarted")}),"security"===q.id&&(0,r.jsx)("button",{onClick:M,disabled:!j&&(!g||g!==y),className:"px-6 py-2.5 bg-primary rounded-lg text-white font-medium text-sm hover:bg-primary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed cursor-pointer",children:j?t("skipAndContinue"):t("setPassword")}),"provider"===q.id&&(0,r.jsx)("button",{onClick:z,disabled:!w||!P,className:"px-6 py-2.5 bg-primary rounded-lg text-white font-medium text-sm hover:bg-primary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed cursor-pointer",children:t("addProvider")}),"test"===q.id&&(0,r.jsx)("button",{onClick:R,className:"px-6 py-2.5 bg-primary rounded-lg text-white font-medium text-sm hover:bg-primary/90 transition-colors cursor-pointer",children:"success"===T?t("continue"):t("skip")}),D&&(0,r.jsx)("button",{onClick:I,className:"px-6 py-2.5 bg-green-500 rounded-lg text-white font-medium text-sm hover:bg-green-500/90 transition-colors cursor-pointer",children:t("goToDashboard")})]})]})]}),!D&&(0,r.jsx)("div",{className:"text-center mt-4",children:(0,r.jsx)("button",{onClick:I,className:"text-xs text-text-muted/60 hover:text-text-muted transition-colors cursor-pointer",children:t("skipWizard")})})]})})}},12916:(e,t,s)=>{Promise.resolve().then(s.bind(s,4051))},50910:(e,t,s)=>{"use strict";s.d(t,{c:()=>a});var r=s(33418);function i(e,t){return(...e)=>{try{return t(...e)}catch{throw Error(void 0)}}}let a=i(0,r.c3);i(0,r.kc)},73321:(e,t,s)=>{"use strict";var r=s(74645);s.o(r,"useParams")&&s.d(t,{useParams:function(){return r.useParams}}),s.o(r,"usePathname")&&s.d(t,{usePathname:function(){return r.usePathname}}),s.o(r,"useRouter")&&s.d(t,{useRouter:function(){return r.useRouter}}),s.o(r,"useSearchParams")&&s.d(t,{useSearchParams:function(){return r.useSearchParams}})}},e=>{e.O(0,[3418,8441,3794,7358],()=>e(e.s=12916)),_N_E=e.O()}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9971],{4051:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>d});var r=s(95155),i=s(12115),a=s(73321),n=s(50910);let o=["welcome","security","provider","test","done"],c=["waving_hand","lock","dns","play_circle","check_circle"],l=[{id:"openai",name:"OpenAI",color:"#10A37F"},{id:"anthropic",name:"Anthropic",color:"#D97757"},{id:"google",name:"Google AI",color:"#4285F4"},{id:"openrouter",name:"OpenRouter",color:"#6B21A8"},{id:"groq",name:"Groq",color:"#F55036"},{id:"mistral",name:"Mistral",color:"#FF7000"}];function d(){let e=(0,a.useRouter)(),t=(0,n.c)("onboarding"),s=(0,n.c)("common"),[d,m]=(0,i.useState)(0),[x,p]=(0,i.useState)(!0),[u,h]=(0,i.useState)("http://localhost:20128/api/v1"),[g,b]=(0,i.useState)(""),[y,f]=(0,i.useState)(""),[j,v]=(0,i.useState)(!1),[w,N]=(0,i.useState)(null),[k,C]=(0,i.useState)(""),[P,S]=(0,i.useState)(""),[_,O]=(0,i.useState)(""),[T,A]=(0,i.useState)("idle"),[E,F]=(0,i.useState)("");(0,i.useEffect)(()=>{(async()=>{try{let s=await fetch("/api/settings");if(s.ok){var t;let r,i,a=await s.json();if(t=a?.apiPort,r=window.location.protocol,i=window.location.hostname,h(`${r}//${i}:${t||20128}/api/v1`),a.setupComplete)return void e.replace("/dashboard")}}catch{}p(!1)})()},[e]);let $=o.map((e,s)=>({id:e,title:t("done"===e?"ready":e),icon:c[s]})),q=$[d],D=d===$.length-1,R=()=>{d<$.length-1&&m(d+1)},[J,K]=(0,i.useState)(""),M=async()=>{if(j)return void R();if(g===y){K("");try{let e=await fetch("/api/settings/require-login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({requireLogin:!0,password:g})});if(!e.ok){let s=await e.json().catch(()=>({}));K(s.error||t("failedSetPassword"));return}R()}catch{K(t("connectionError"))}}},z=async()=>{if(w&&P){K("");try{let e=l.find(e=>e.id===w),s=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:w,name:_||e?.name||w,url:k||({openai:"https://api.openai.com",anthropic:"https://api.anthropic.com",google:"https://generativelanguage.googleapis.com",openrouter:"https://openrouter.ai/api",groq:"https://api.groq.com/openai",mistral:"https://api.mistral.ai"})[w]||"",apiKey:P,isActive:!0})});if(!s.ok){let e=await s.json().catch(()=>({}));K(e.error||t("failedAddProvider"));return}R()}catch{K(t("connectionError"))}}},G=async()=>{A("testing"),F(t("testingConnection"));try{let e=await fetch("/api/providers");if(!e.ok)throw Error("Failed to fetch");let s=await e.json(),r=s.connections?.[0];if(!r){A("error"),F(t("noProviderFound"));return}let i=await fetch(`/api/providers/${r.id}/test`,{method:"POST"});if(i.ok)A("success"),F(t("connectionSuccessful"));else{let e=await i.json().catch(()=>({}));A("error"),F(e.error||t("testFailed"))}}catch{A("error"),F(t("couldNotTest"))}},I=async()=>{try{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({setupComplete:!0})})}catch{}e.push("/dashboard")};return x?(0,r.jsx)("div",{className:"min-h-screen flex items-center justify-center bg-bg",children:(0,r.jsx)("div",{className:"animate-pulse text-text-muted",children:s("loading")})}):(0,r.jsx)("div",{className:"min-h-screen flex items-center justify-center bg-bg p-4",children:(0,r.jsxs)("div",{className:"w-full max-w-lg",children:[(0,r.jsx)("div",{className:"flex items-center justify-center gap-2 mb-8",children:$.map((e,t)=>(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("div",{className:`w-8 h-8 rounded-full flex items-center justify-center text-sm font-semibold transition-all duration-300 ${t<d?"bg-green-500/20 text-green-400":t===d?"bg-primary/20 text-primary ring-2 ring-primary/40":"bg-white/5 text-text-muted"}`,children:t<d?(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"check"}):t+1}),t<$.length-1&&(0,r.jsx)("div",{className:`w-8 h-0.5 rounded-full transition-colors ${t<d?"bg-green-500/40":"bg-white/10"}`})]},e.id))}),(0,r.jsxs)("div",{className:"bg-surface rounded-2xl border border-white/[0.06] p-8 shadow-xl",children:[(0,r.jsxs)("div",{className:"text-center mb-6",children:[(0,r.jsx)("span",{className:`material-symbols-outlined text-[48px] mb-3 block ${"done"===q.id?"text-green-400":"text-primary"}`,children:q.icon}),(0,r.jsx)("h2",{className:"text-2xl font-bold text-text-main mb-1",children:q.title})]}),(0,r.jsxs)("div",{className:"min-h-[200px]",children:["welcome"===q.id&&(0,r.jsxs)("div",{className:"text-center space-y-4",children:[(0,r.jsx)("p",{className:"text-text-muted",children:t("welcomeDesc")}),(0,r.jsx)("div",{className:"grid grid-cols-3 gap-3 mt-6",children:[{icon:"swap_horiz",label:t("multiProvider")},{icon:"monitoring",label:t("usageTracking")},{icon:"shield",label:t("apiKeyMgmt")}].map(e=>(0,r.jsxs)("div",{className:"bg-white/[0.03] rounded-xl p-3 text-center border border-white/[0.06]",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary text-[24px] mb-1 block",children:e.icon}),(0,r.jsx)("span",{className:"text-xs text-text-muted",children:e.label})]},e.icon))})]}),"security"===q.id&&(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)("p",{className:"text-sm text-text-muted text-center",children:t("securityDesc")}),(0,r.jsxs)("label",{className:"flex items-center gap-2 cursor-pointer text-sm text-text-muted",children:[(0,r.jsx)("input",{type:"checkbox",checked:j,onChange:e=>v(e.target.checked),className:"accent-primary"}),t("skipPassword")]}),!j&&(0,r.jsxs)("div",{className:"space-y-3",children:[(0,r.jsx)("input",{type:"password",placeholder:t("enterPassword"),value:g,onChange:e=>b(e.target.value),className:"w-full px-4 py-2.5 bg-white/[0.04] border border-white/10 rounded-lg text-text-main text-sm placeholder:text-text-muted/50 focus:outline-none focus:ring-2 focus:ring-primary/40"}),(0,r.jsx)("input",{type:"password",placeholder:t("confirmPasswordPlaceholder"),value:y,onChange:e=>f(e.target.value),className:"w-full px-4 py-2.5 bg-white/[0.04] border border-white/10 rounded-lg text-text-main text-sm placeholder:text-text-muted/50 focus:outline-none focus:ring-2 focus:ring-primary/40"}),g&&y&&g!==y&&(0,r.jsx)("p",{className:"text-xs text-red-400",children:t("passwordsMismatch")})]})]}),"provider"===q.id&&(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)("p",{className:"text-sm text-text-muted text-center",children:t("providerDesc")}),(0,r.jsx)("div",{className:"grid grid-cols-3 gap-2",children:l.map(e=>(0,r.jsx)("button",{onClick:()=>{N(e.id),O(e.name)},className:`p-3 rounded-xl border text-center text-xs font-medium transition-all cursor-pointer ${w===e.id?"border-primary/60 bg-primary/10 text-primary":"border-white/10 bg-white/[0.03] text-text-muted hover:border-white/20"}`,children:e.name},e.id))}),w&&(0,r.jsxs)("div",{className:"space-y-3 mt-4",children:[(0,r.jsx)("input",{type:"password",placeholder:t("apiKeyRequired"),value:P,onChange:e=>S(e.target.value),className:"w-full px-4 py-2.5 bg-white/[0.04] border border-white/10 rounded-lg text-text-main text-sm placeholder:text-text-muted/50 focus:outline-none focus:ring-2 focus:ring-primary/40"}),(0,r.jsx)("input",{type:"text",placeholder:t("customUrlOptional"),value:k,onChange:e=>C(e.target.value),className:"w-full px-4 py-2.5 bg-white/[0.04] border border-white/10 rounded-lg text-text-main text-sm placeholder:text-text-muted/50 focus:outline-none focus:ring-2 focus:ring-primary/40"})]})]}),"test"===q.id&&(0,r.jsxs)("div",{className:"text-center space-y-4",children:[(0,r.jsx)("p",{className:"text-sm text-text-muted",children:t("testDesc")}),"idle"===T&&(0,r.jsx)("button",{onClick:G,className:"px-6 py-2.5 bg-primary rounded-lg text-white font-medium text-sm hover:bg-primary/90 transition-colors cursor-pointer",children:t("runTest")}),"testing"===T&&(0,r.jsxs)("div",{className:"flex items-center justify-center gap-2 text-text-muted",children:[(0,r.jsx)("span",{className:"material-symbols-outlined animate-spin text-[20px]",children:"progress_activity"}),(0,r.jsx)("span",{className:"text-sm",children:E})]}),"success"===T&&(0,r.jsxs)("div",{className:"flex items-center justify-center gap-2 text-green-400",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"check_circle"}),(0,r.jsx)("span",{className:"text-sm",children:E})]}),"error"===T&&(0,r.jsxs)("div",{className:"space-y-3",children:[(0,r.jsxs)("div",{className:"flex items-center justify-center gap-2 text-amber-400",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"warning"}),(0,r.jsx)("span",{className:"text-sm",children:E})]}),(0,r.jsx)("button",{onClick:G,className:"text-xs text-text-muted underline cursor-pointer",children:t("retry")})]})]}),"done"===q.id&&(0,r.jsxs)("div",{className:"text-center space-y-4",children:[(0,r.jsx)("p",{className:"text-text-muted",children:t("doneDesc")}),(0,r.jsxs)("div",{className:"bg-white/[0.03] rounded-xl p-4 border border-white/[0.06] text-left",children:[(0,r.jsx)("p",{className:"text-xs text-text-muted mb-2 font-medium",children:t("yourEndpoint")}),(0,r.jsx)("code",{className:"text-sm text-primary",children:u})]})]})]}),(0,r.jsxs)("div",{className:"flex items-center justify-between mt-8 pt-6 border-t border-white/[0.06]",children:[(0,r.jsx)("div",{children:d>0&&!D&&(0,r.jsx)("button",{onClick:()=>{d>0&&m(d-1)},className:"px-4 py-2 text-sm text-text-muted hover:text-text-main transition-colors cursor-pointer",children:s("back")})}),(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[!D&&d>0&&(0,r.jsx)("button",{onClick:R,className:"px-4 py-2 text-sm text-text-muted hover:text-text-main transition-colors cursor-pointer",children:t("skip")}),"welcome"===q.id&&(0,r.jsx)("button",{onClick:R,className:"px-6 py-2.5 bg-primary rounded-lg text-white font-medium text-sm hover:bg-primary/90 transition-colors cursor-pointer",children:t("getStarted")}),"security"===q.id&&(0,r.jsx)("button",{onClick:M,disabled:!j&&(!g||g!==y),className:"px-6 py-2.5 bg-primary rounded-lg text-white font-medium text-sm hover:bg-primary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed cursor-pointer",children:j?t("skipAndContinue"):t("setPassword")}),"provider"===q.id&&(0,r.jsx)("button",{onClick:z,disabled:!w||!P,className:"px-6 py-2.5 bg-primary rounded-lg text-white font-medium text-sm hover:bg-primary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed cursor-pointer",children:t("addProvider")}),"test"===q.id&&(0,r.jsx)("button",{onClick:R,className:"px-6 py-2.5 bg-primary rounded-lg text-white font-medium text-sm hover:bg-primary/90 transition-colors cursor-pointer",children:"success"===T?t("continue"):t("skip")}),D&&(0,r.jsx)("button",{onClick:I,className:"px-6 py-2.5 bg-green-500 rounded-lg text-white font-medium text-sm hover:bg-green-500/90 transition-colors cursor-pointer",children:t("goToDashboard")})]})]})]}),!D&&(0,r.jsx)("div",{className:"text-center mt-4",children:(0,r.jsx)("button",{onClick:I,className:"text-xs text-text-muted/60 hover:text-text-muted transition-colors cursor-pointer",children:t("skipWizard")})})]})})}},50910:(e,t,s)=>{"use strict";s.d(t,{c:()=>a});var r=s(33418);function i(e,t){return(...e)=>{try{return t(...e)}catch{throw Error(void 0)}}}let a=i(0,r.c3);i(0,r.kc)},73321:(e,t,s)=>{"use strict";var r=s(74645);s.o(r,"useParams")&&s.d(t,{useParams:function(){return r.useParams}}),s.o(r,"usePathname")&&s.d(t,{usePathname:function(){return r.usePathname}}),s.o(r,"useRouter")&&s.d(t,{useRouter:function(){return r.useRouter}}),s.o(r,"useSearchParams")&&s.d(t,{useSearchParams:function(){return r.useSearchParams}})},89848:(e,t,s)=>{Promise.resolve().then(s.bind(s,4051))}},e=>{e.O(0,[3418,8441,3794,7358],()=>e(e.s=89848)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6337],{7153:(e,s,t)=>{Promise.resolve().then(t.bind(t,49433))},40993:(e,s,t)=>{"use strict";t.d(s,{Ex:()=>o.default,$n:()=>l.default,Zp:()=>i.default,Qv:()=>d.CardSkeleton,G9:()=>v.default,bQ:()=>k.default,pp:()=>N.default,Qn:()=>y.default,pd:()=>r.default,Mh:()=>g.default,uR:()=>u.default,aF:()=>n.default,rq:()=>m.default,LF:()=>x.default,KN:()=>f.default,Lo:()=>b.default,y7:()=>h.default,Iz:()=>j.default,l6:()=>a.default,lM:()=>c.default,cn:()=>p.default});var l=t(35806),r=t(34422),a=t(42994),i=t(81060),n=t(71361),d=t(92542);t(17705);var o=t(80927),c=t(19790);t(6261),t(55846),t(34243),t(89938),t(99023);var x=t(80178),m=t(85444),u=t(91961);t(25112);var p=t(45624),h=t(37415),f=t(48643),b=t(8287);t(1652);var g=t(92701);t(18150);var v=t(71689),j=t(33709);t(76332);var N=t(66200);t(61580);var y=t(51503);t(54128);var k=t(44638);t(21720),t(97050)},49433:(e,s,t)=>{"use strict";t.d(s,{default:()=>h});var l=t(95155),r=t(50910),a=t(12115),i=t(14051),n=t.n(i),d=t(5772),o=t(98500),c=t.n(o),x=t(73321),m=t(40993),u=t(20909),p=t(67671);function h({machineId:e}){let s=(0,r.c)("home"),t=(0,r.c)("common"),i=(0,r.c)("sidebar"),[n,d]=(0,a.useState)([]),[o,x]=(0,a.useState)([]),[p,h]=(0,a.useState)(!0),[g,v]=(0,a.useState)("/v1"),[j,N]=(0,a.useState)(null),[y,k]=(0,a.useState)({});(0,a.useEffect)(()=>{v(`${window.location.origin}/v1`)},[]);let w=(0,a.useCallback)(async()=>{try{let[e,s,t]=await Promise.all([fetch("/api/providers"),fetch("/api/models"),fetch("/api/provider-metrics")]);if(e.ok){let s=await e.json();d(s.connections||[])}if(s.ok){let e=await s.json();x(e.models||[])}if(t.ok){let e=await t.json();k(e.metrics||{})}}catch(e){console.log("Error fetching data:",e)}finally{h(!1)}},[]);(0,a.useEffect)(()=>{w()},[w]);let S=(0,a.useMemo)(()=>Object.entries(u.Q2).map(([e,s])=>{let t=n.filter(s=>s.provider===e),l=t.filter(e=>!1!==e.isActive&&("active"===e.testStatus||"success"===e.testStatus||"unknown"===e.testStatus)).length,r=t.filter(e=>!1!==e.isActive&&("error"===e.testStatus||"expired"===e.testStatus||"unavailable"===e.testStatus)).length,a=new Set([e,s.alias].filter(Boolean)),i=o.filter(e=>a.has(e.provider)),d=u.IS[e]?"free":u.zN[e]?"oauth":"apikey";return{id:e,provider:s,total:t.length,connected:l,errors:r,modelCount:i.length,authType:d}}),[n,o]),R=(0,a.useMemo)(()=>{if(!j)return[];let e=new Set([j.id,j.provider?.alias].filter(Boolean));return o.filter(s=>e.has(s.provider))},[j,o]),q=[{label:s("documentation"),href:"/docs",icon:"menu_book"},{label:i("providers"),href:"/dashboard/providers",icon:"dns"},{label:i("combos"),href:"/dashboard/combos",icon:"layers"},{label:i("analytics"),href:"/dashboard/analytics",icon:"analytics"},{label:s("healthMonitor"),href:"/dashboard/health",icon:"health_and_safety"},{label:i("cliTools"),href:"/dashboard/cli-tools",icon:"terminal"},{label:s("reportIssue"),href:"https://github.com/diegosouzapw/OmniRoute/issues",external:!0,icon:"bug_report"}];return p?(0,l.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,l.jsx)(m.Qv,{}),(0,l.jsx)(m.Qv,{})]}):(0,l.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,l.jsx)(m.Zp,{children:(0,l.jsxs)("div",{className:"flex flex-col gap-5",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("h2",{className:"text-lg font-semibold",children:s("quickStart")}),(0,l.jsx)("p",{className:"text-sm text-text-muted",children:s("quickStartDesc")})]}),(0,l.jsxs)(c(),{href:"/docs",className:"hidden sm:inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium border border-border text-text-muted hover:text-text-main hover:bg-bg-subtle transition-colors",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"menu_book"}),s("fullDocs")]})]}),(0,l.jsxs)("ol",{className:"grid grid-cols-1 md:grid-cols-2 gap-3 text-sm",children:[(0,l.jsxs)("li",{className:"rounded-lg border border-border bg-bg-subtle p-4 flex gap-3",children:[(0,l.jsx)("div",{className:"flex items-center justify-center size-8 rounded-lg bg-primary/10 text-primary shrink-0",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"key"})}),(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"font-semibold",children:s("step1Title")}),(0,l.jsx)("p",{className:"text-text-muted mt-0.5",children:s.rich("step1Desc",{endpoint:e=>(0,l.jsx)(c(),{href:"/dashboard/endpoint",className:"text-primary hover:underline",children:e})})})]})]}),(0,l.jsxs)("li",{className:"rounded-lg border border-border bg-bg-subtle p-4 flex gap-3",children:[(0,l.jsx)("div",{className:"flex items-center justify-center size-8 rounded-lg bg-green-500/10 text-green-500 shrink-0",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"dns"})}),(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"font-semibold",children:s("step2Title")}),(0,l.jsx)("p",{className:"text-text-muted mt-0.5",children:s.rich("step2Desc",{providers:e=>(0,l.jsx)(c(),{href:"/dashboard/providers",className:"text-primary hover:underline",children:e})})})]})]}),(0,l.jsxs)("li",{className:"rounded-lg border border-border bg-bg-subtle p-4 flex gap-3",children:[(0,l.jsx)("div",{className:"flex items-center justify-center size-8 rounded-lg bg-blue-500/10 text-blue-500 shrink-0",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"link"})}),(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"font-semibold",children:s("step3Title")}),(0,l.jsx)("p",{className:"text-text-muted mt-0.5",children:s("step3Desc",{url:g})})]})]}),(0,l.jsxs)("li",{className:"rounded-lg border border-border bg-bg-subtle p-4 flex gap-3",children:[(0,l.jsx)("div",{className:"flex items-center justify-center size-8 rounded-lg bg-amber-500/10 text-amber-500 shrink-0",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"analytics"})}),(0,l.jsxs)("div",{children:[(0,l.jsx)("span",{className:"font-semibold",children:s("step4Title")}),(0,l.jsx)("p",{className:"text-text-muted mt-0.5",children:s.rich("step4Desc",{logs:e=>(0,l.jsx)(c(),{href:"/dashboard/usage",className:"text-primary hover:underline",children:e}),analytics:e=>(0,l.jsx)(c(),{href:"/dashboard/analytics",className:"text-primary hover:underline",children:e})})})]})]})]}),(0,l.jsx)("div",{className:"flex flex-wrap gap-2",children:q.map(e=>(0,l.jsxs)("a",{href:e.href,target:e.external?"_blank":void 0,rel:e.external?"noopener noreferrer":void 0,className:"inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium border border-border text-text-muted hover:text-text-main hover:bg-bg-subtle transition-colors",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:e.icon||(e.external?"open_in_new":"arrow_forward")}),e.label]},e.href))})]})}),(0,l.jsxs)(m.Zp,{children:[(0,l.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("h2",{className:"text-lg font-semibold",children:s("providersOverview")}),(0,l.jsx)("p",{className:"text-sm text-text-muted",children:s("configuredOf",{configured:S.filter(e=>e.total>0).length,total:S.length})})]}),(0,l.jsxs)("div",{className:"flex items-center gap-4",children:[(0,l.jsxs)("div",{className:"hidden sm:flex items-center gap-3 text-[11px] text-text-muted",children:[(0,l.jsxs)("span",{className:"flex items-center gap-1",children:[(0,l.jsx)("span",{className:"size-2 rounded-full bg-green-500"})," ",t("free")]}),(0,l.jsxs)("span",{className:"flex items-center gap-1",children:[(0,l.jsx)("span",{className:"size-2 rounded-full bg-blue-500"})," ",s("oauthLabel")]}),(0,l.jsxs)("span",{className:"flex items-center gap-1",children:[(0,l.jsx)("span",{className:"size-2 rounded-full bg-amber-500"})," ",s("apiKeyLabel")]})]}),(0,l.jsxs)(c(),{href:"/dashboard/providers",className:"inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium border border-border text-text-muted hover:text-text-main hover:bg-bg-subtle transition-colors",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"settings"}),t("manage")]})]})]}),(0,l.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-3",children:S.map(e=>(0,l.jsx)(f,{item:e,metrics:y[e.provider.alias]||y[e.id],onClick:()=>N(e)},e.id))})]}),j&&(0,l.jsx)(b,{provider:j,models:R,onClose:()=>N(null)})]})}function f({item:e,metrics:s,onClick:t}){let[i,n]=(0,a.useState)(!1),o=(0,r.c)("home"),c=(0,r.c)("common"),x=e.errors>0?"text-red-500":e.connected>0?"text-green-500":"text-text-muted",m={free:{color:"bg-green-500",label:c("free")},oauth:{color:"bg-blue-500",label:o("oauthLabel")},apikey:{color:"bg-amber-500",label:o("apiKeyLabel")}},u=m[e.authType]||m.apikey;return(0,l.jsx)("button",{onClick:t,className:"border border-border rounded-lg p-3 hover:bg-surface/40 transition-colors text-left cursor-pointer w-full",children:(0,l.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,l.jsx)("div",{className:"size-8 rounded-lg flex items-center justify-center shrink-0",style:{backgroundColor:`${e.provider.color||"#888"}15`},children:i?(0,l.jsx)("span",{className:"text-[10px] font-bold",style:{color:e.provider.color||"#888"},children:e.provider.textIcon||e.provider.id.slice(0,2).toUpperCase()}):(0,l.jsx)(d.default,{src:`/providers/${e.provider.id}.png`,alt:e.provider.name,width:26,height:26,className:"object-contain rounded-lg",sizes:"26px",onError:()=>n(!0)})}),(0,l.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,l.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,l.jsx)("p",{className:"text-sm font-semibold truncate",children:e.provider.name}),(0,l.jsx)("span",{className:`size-2 rounded-full ${u.color} shrink-0`,title:u.label})]}),(0,l.jsx)("p",{className:`text-xs ${x}`,children:0===e.total?c("notConfigured"):o("activeError",{active:e.connected,errors:e.errors})}),s&&s.totalRequests>0&&(0,l.jsxs)("div",{className:"flex items-center gap-2 mt-0.5",children:[(0,l.jsxs)("span",{className:"text-[10px] text-text-muted",children:[(0,l.jsx)("span",{className:"text-emerald-500",children:s.totalSuccesses}),"/",o("requestsShort",{count:s.totalRequests})]}),(0,l.jsxs)("span",{className:"text-[10px] text-text-muted",children:[s.successRate,"%"]}),(0,l.jsxs)("span",{className:"text-[10px] text-text-muted",children:["~",s.avgLatencyMs,"ms"]})]})]}),(0,l.jsxs)("div",{className:"text-right shrink-0",children:[(0,l.jsx)("p",{className:"text-xs font-medium text-text-main",children:e.modelCount}),(0,l.jsx)("p",{className:"text-[10px] text-text-muted",children:c("models")})]})]})})}function b({provider:e,models:s,onClose:t}){let[i,n]=(0,a.useState)(null),d=(0,p.i)(),o=(0,x.useRouter)(),c=(0,r.c)("home"),u=(0,r.c)("common"),h=(0,r.c)("sidebar");return(0,l.jsx)(m.aF,{isOpen:!0,title:c("providerModelsTitle",{provider:e.provider.name}),onClose:t,children:(0,l.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2 text-sm text-text-muted",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"token"}),1===s.length?c("modelAvailable",{count:s.length}):c("modelsAvailable",{count:s.length}),e.total>0&&(0,l.jsxs)("span",{className:"ml-auto text-xs text-green-500",children:["●"," ",1===e.connected?c("connectionsActive",{count:e.connected}):c("connectionsActivePlural",{count:e.connected})]})]}),0===s.length?(0,l.jsxs)("div",{className:"text-center py-6",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[32px] text-text-muted mb-2",children:"search_off"}),(0,l.jsx)("p",{className:"text-sm text-text-muted",children:c("noModelsAvailable")}),(0,l.jsx)("p",{className:"text-xs text-text-muted mt-1",children:c("configureFirst",{providers:h("providers")})})]}):(0,l.jsx)("div",{className:"flex flex-col gap-1 max-h-[400px] overflow-y-auto",children:s.map(e=>(0,l.jsxs)("div",{className:"flex items-center justify-between px-3 py-2 rounded-lg hover:bg-surface/50 transition-colors group",children:[(0,l.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,l.jsx)("p",{className:"font-mono text-sm text-text-main truncate",children:e.fullModel}),e.alias!==e.model&&(0,l.jsxs)("p",{className:"text-[10px] text-text-muted",children:[c("aliasLabel"),": ",e.alias]})]}),(0,l.jsx)("button",{onClick:()=>{var s;return s=e.fullModel,void(navigator.clipboard.writeText(s),n(s),d.success(c("copiedModel",{model:s})),setTimeout(()=>n(null),2e3))},className:"shrink-0 ml-2 p-1.5 rounded-lg text-text-muted hover:text-text-main hover:bg-bg-subtle transition-colors opacity-0 group-hover:opacity-100",title:c("copyModelName"),children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:i===e.fullModel?"check":"content_copy"})})]},e.fullModel))}),(0,l.jsxs)("div",{className:"flex gap-2 pt-2 border-t border-border",children:[(0,l.jsxs)(m.$n,{variant:"secondary",fullWidth:!0,size:"sm",onClick:()=>{var s;return s=`/dashboard/providers/${e.id}`,void(t(),o.push(s))},className:"flex-1",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"settings"}),c("configureProvider")]}),(0,l.jsx)(m.$n,{variant:"ghost",size:"sm",onClick:t,children:u("close")})]})]})})}h.propTypes={machineId:n().string},f.propTypes={item:n().shape({id:n().string.isRequired,provider:n().shape({id:n().string.isRequired,name:n().string.isRequired,color:n().string,textIcon:n().string,alias:n().string}).isRequired,total:n().number.isRequired,connected:n().number.isRequired,errors:n().number.isRequired,modelCount:n().number.isRequired,authType:n().string.isRequired}).isRequired,metrics:n().shape({totalRequests:n().number,totalSuccesses:n().number,successRate:n().number,avgLatencyMs:n().number}),onClick:n().func.isRequired},b.propTypes={provider:n().object.isRequired,models:n().array.isRequired,onClose:n().func.isRequired}}},e=>{e.O(0,[8500,3418,9751,8055,1149,5846,647,8441,3794,7358],()=>e(e.s=7153)),_N_E=e.O()}]);
|