omniroute 1.7.2 → 1.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.ar.md +4 -0
- package/README.bg.md +4 -0
- package/README.da.md +4 -0
- package/README.de.md +13 -9
- package/README.es.md +13 -9
- package/README.fi.md +4 -0
- package/README.fr.md +13 -9
- package/README.he.md +29 -25
- package/README.hu.md +4 -0
- package/README.id.md +4 -0
- package/README.in.md +4 -0
- package/README.it.md +13 -9
- package/README.ja.md +4 -0
- package/README.ko.md +29 -25
- package/README.md +45 -0
- package/README.ms.md +4 -0
- package/README.nl.md +4 -0
- package/README.no.md +4 -0
- package/README.phi.md +4 -0
- package/README.pl.md +4 -0
- package/README.pt-BR.md +29 -25
- package/README.pt.md +4 -0
- package/README.ro.md +4 -0
- package/README.ru.md +13 -9
- package/README.sk.md +4 -0
- package/README.sv.md +4 -0
- package/README.th.md +16 -12
- package/README.uk-UA.md +4 -0
- package/README.vi.md +4 -0
- package/README.zh-CN.md +26 -22
- package/app/.env +122 -0
- package/app/.next/BUILD_ID +1 -1
- package/app/.next/app-path-routes-manifest.json +30 -28
- 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/routes-manifest.json +12 -0
- 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/cli-tools/page.js +3 -3
- package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/combos/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/costs/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/costs/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/costs/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/endpoint/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/health/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/health/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/health/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/limits/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/limits/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/limits/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/logs/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/logs/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/logs/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/media/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/media/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/media/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/onboarding/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/onboarding/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/onboarding/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/profile/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/new/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/settings/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/settings/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/settings/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/settings/pricing/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/settings/pricing/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/translator/page.js +3 -3
- package/app/.next/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/usage/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/_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 +4 -4
- package/app/.next/server/app/_global-error.segments/_full.segment.rsc +4 -4
- 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 +3 -3
- 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/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_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cache/route.js +1 -1
- package/app/.next/server/app/api/cache/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cache/stats/route.js +1 -1
- package/app/.next/server/app/api/cache/stats/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/alias/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/backups/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/backups/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/claude-settings/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/claude-settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/cline-settings/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/cline-settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/codex-profiles/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/codex-profiles/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/codex-settings/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/codex-settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/droid-settings/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/droid-settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/guide-settings/[toolId]/route.js +1 -1
- package/app/.next/server/app/api/cli-tools/guide-settings/[toolId]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/kilo-settings/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/kilo-settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/openclaw-settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/runtime/[toolId]/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/runtime/[toolId]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/status/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/status/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cloud/auth/route.js +1 -1
- package/app/.next/server/app/api/cloud/auth/route.js.nft.json +1 -1
- package/app/.next/server/app/api/cloud/auth/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cloud/credentials/update/route.js +1 -1
- package/app/.next/server/app/api/cloud/credentials/update/route.js.nft.json +1 -1
- package/app/.next/server/app/api/cloud/credentials/update/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cloud/model/resolve/route.js +1 -1
- package/app/.next/server/app/api/cloud/model/resolve/route.js.nft.json +1 -1
- package/app/.next/server/app/api/cloud/model/resolve/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cloud/models/alias/route.js +1 -1
- package/app/.next/server/app/api/cloud/models/alias/route.js.nft.json +1 -1
- package/app/.next/server/app/api/cloud/models/alias/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/combos/[id]/route.js +1 -1
- package/app/.next/server/app/api/combos/[id]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/combos/[id]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/combos/metrics/route.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_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/db-backups/export/route.js +1 -1
- package/app/.next/server/app/api/db-backups/export/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/db-backups/exportAll/route.js +1 -1
- package/app/.next/server/app/api/db-backups/exportAll/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/db-backups/import/route.js +1 -1
- package/app/.next/server/app/api/db-backups/import/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/db-backups/route.js +1 -1
- package/app/.next/server/app/api/db-backups/route.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_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/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/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 +2 -2
- package/app/.next/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/oauth/[provider]/[action]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/cursor/auto-import/route.js +1 -1
- package/app/.next/server/app/api/oauth/cursor/auto-import/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/cursor/import/route.js +1 -1
- package/app/.next/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
- package/app/.next/server/app/api/oauth/cursor/import/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/kiro/auto-import/route.js +1 -1
- package/app/.next/server/app/api/oauth/kiro/auto-import/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/kiro/import/route.js +1 -1
- package/app/.next/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
- package/app/.next/server/app/api/oauth/kiro/import/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/kiro/social-authorize/route.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_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_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_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 -0
- package/app/.next/server/app/api/settings/background-degradation/route.js.nft.json +1 -0
- package/app/.next/server/app/api/settings/background-degradation/route_client-reference-manifest.js +1 -0
- 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 -0
- package/app/.next/server/app/api/settings/model-aliases/route.js.nft.json +1 -0
- package/app/.next/server/app/api/settings/model-aliases/route_client-reference-manifest.js +1 -0
- 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 -1
- package/app/.next/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
- package/app/.next/server/app/api/usage/[connectionId]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/analytics/route.js +1 -1
- package/app/.next/server/app/api/usage/analytics/route.js.nft.json +1 -1
- package/app/.next/server/app/api/usage/analytics/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/budget/route.js +2 -2
- package/app/.next/server/app/api/usage/budget/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/call-logs/[id]/route.js +1 -1
- package/app/.next/server/app/api/usage/call-logs/[id]/route.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_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 +2 -2
- package/app/.next/server/app/api/v1/models/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/models/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/moderations/route.js +1 -1
- package/app/.next/server/app/api/v1/moderations/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/moderations/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/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_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 +2 -2
- package/app/.next/server/app/api/v1beta/models/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/callback/page.js +2 -2
- package/app/.next/server/app/callback/page.js.nft.json +1 -1
- package/app/.next/server/app/callback/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/docs/page.js +3 -3
- 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/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/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 +30 -28
- package/app/.next/server/chunks/1248.js +1 -1
- package/app/.next/server/chunks/1308.js +1 -1
- package/app/.next/server/chunks/1526.js +1 -1
- package/app/.next/server/chunks/1584.js +1 -1
- package/app/.next/server/chunks/1623.js +1 -1
- package/app/.next/server/chunks/1880.js +1 -1
- package/app/.next/server/chunks/1960.js +1 -1
- package/app/.next/server/chunks/1990.js +1 -1
- package/app/.next/server/chunks/2180.js +1 -1
- package/app/.next/server/chunks/2214.js +1 -1
- package/app/.next/server/chunks/2372.js +1 -1
- package/app/.next/server/chunks/2594.js +1 -1
- package/app/.next/server/chunks/2767.js +1 -1
- package/app/.next/server/chunks/2901.js +2 -2
- package/app/.next/server/chunks/2910.js +1 -1
- package/app/.next/server/chunks/3371.js +1 -1
- package/app/.next/server/chunks/3447.js +1 -1
- package/app/.next/server/chunks/3498.js +1 -1
- package/app/.next/server/chunks/3596.js +1 -1
- package/app/.next/server/chunks/3801.js +2 -0
- package/app/.next/server/chunks/3911.js +1 -1
- package/app/.next/server/chunks/4488.js +1 -1
- package/app/.next/server/chunks/4568.js +1 -1
- package/app/.next/server/chunks/496.js +1 -1
- package/app/.next/server/chunks/5047.js +1 -1
- package/app/.next/server/chunks/5094.js +1 -1
- package/app/.next/server/chunks/5097.js +1 -1
- package/app/.next/server/chunks/5521.js +1 -1
- package/app/.next/server/chunks/5945.js +1 -1
- package/app/.next/server/chunks/6118.js +1 -1
- package/app/.next/server/chunks/6930.js +1 -1
- package/app/.next/server/chunks/7011.js +1 -1
- package/app/.next/server/chunks/708.js +1 -1
- package/app/.next/server/chunks/7109.js +1 -1
- package/app/.next/server/chunks/7230.js +2 -2
- package/app/.next/server/chunks/7650.js +1 -1
- package/app/.next/server/chunks/8020.js +3 -3
- package/app/.next/server/chunks/8220.js +1 -1
- package/app/.next/server/chunks/8464.js +1 -1
- package/app/.next/server/chunks/8706.js +1 -1
- package/app/.next/server/chunks/8976.js +1 -1
- package/app/.next/server/chunks/9119.js +1 -1
- package/app/.next/server/chunks/944.js +1 -1
- package/app/.next/server/chunks/9548.js +1 -0
- package/app/.next/server/chunks/9679.js +1 -0
- package/app/.next/server/chunks/9824.js +2 -2
- package/app/.next/server/chunks/9837.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/a624rqqXG_QtNPqv8ZMWa/_buildManifest.js +1 -0
- package/app/.next/static/chunks/5846-1dad4fadf761e0d8.js +2 -0
- package/app/.next/static/chunks/{993-035473765d7d1871.js → 993-9f36b0b069ca090e.js} +2 -2
- package/app/.next/static/chunks/app/(dashboard)/dashboard/analytics/loading-ce5214cdf489c9df.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/analytics/{page-52f76c7c91444ec2.js → page-20786f2c7fdbab57.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/api-manager/page-12d772841a253032.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/audit-log/page-c9b98846b8479f3f.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/cli-tools/page-5e34630a5dc32825.js +15 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/combos/{page-3dce7fccfcf177dd.js → page-85a3e6a423aceded.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/costs/{page-3ed2a7685adf9b91.js → page-cdb8071441476da9.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/endpoint/page-588b8bc3c4e631e0.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/health/{page-9a6519bf1468f16e.js → page-b480b3cb318782d7.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/limits/page-0ae1d6cc5fc4671f.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/logs/{page-833d24f322a20f5a.js → page-ffdc1dcf074c7528.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/media/page-72b768421394b42c.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/onboarding/{page-d424641c7e428be9.js → page-5378e9473a20cd6a.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/page-5c87e49261a22fd5.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/profile/page-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-b38f2d03bae8166a.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/{error-2f0177a2197dd556.js → error-f0730d6d62d02e82.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/{loading-99ab4d478260d53b.js → loading-59cbccd6d5185ca9.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/new/page-a7fb36872be60fe0.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/{page-1f022385b812b987.js → page-40dc5ac82df708e9.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/settings/{error-e844916e39172c8b.js → error-cc85c3ff1f63aea6.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/settings/{loading-bb068659ee679ff4.js → loading-19fc771a287bcb4c.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/settings/page-1550a2460948273c.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/settings/pricing/{page-f10a8d4bb8236913.js → page-cbe9b21b62bbc2bd.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/translator/{page-83b07523f81d6282.js → page-534e13a69cb60a4f.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/usage/{page-9cc99ab874fc36e7.js → page-86a076d820931a30.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/{layout-00d5d56af65098a9.js → layout-16302e54f9ef3d0e.js} +1 -1
- package/app/.next/static/chunks/app/_global-error/page-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/_not-found/page-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/auth/login/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/auth/logout/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/auth/status/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/cache/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/cache/stats/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/backups/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/claude-settings/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/cline-settings/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/codex-profiles/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/codex-settings/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/droid-settings/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/guide-settings/[toolId]/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/kilo-settings/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/openclaw-settings/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/runtime/[toolId]/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/cli-tools/status/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/cloud/auth/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/cloud/credentials/update/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/cloud/model/resolve/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/cloud/models/alias/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/combos/[id]/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/combos/metrics/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/combos/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/combos/test/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/compliance/audit-log/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/db-backups/export/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/db-backups/exportAll/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/db-backups/import/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/db-backups/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/evals/[suiteId]/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/evals/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/fallback/chains/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/init/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/keys/[id]/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/keys/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/logs/console/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/models/alias/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/models/availability/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/models/catalog/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/models/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/monitoring/health/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/[provider]/[action]/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/cursor/auto-import/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/cursor/import/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/kiro/auto-import/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/kiro/import/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/kiro/social-authorize/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/oauth/kiro/social-exchange/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/policies/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/pricing/defaults/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/pricing/models/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/pricing/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/provider-metrics/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/provider-models/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/provider-nodes/[id]/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/provider-nodes/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/provider-nodes/validate/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/providers/[id]/models/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/providers/[id]/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/providers/[id]/test/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/providers/client/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/providers/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/providers/test-batch/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/providers/validate/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/rate-limit/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/rate-limits/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/resilience/reset/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/resilience/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/restart/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/sessions/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/settings/background-degradation/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/settings/combo-defaults/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/settings/ip-filter/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/settings/model-aliases/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/settings/proxy/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/settings/proxy/test/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/settings/require-login/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/settings/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/settings/system-prompt/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/settings/thinking-budget/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/shutdown/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/storage/health/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/sync/cloud/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/sync/initialize/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/tags/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/telemetry/summary/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/token-health/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/translator/detect/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/translator/history/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/translator/load/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/translator/save/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/translator/send/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/translator/translate/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/usage/[connectionId]/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/usage/analytics/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/usage/budget/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/usage/call-logs/[id]/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/usage/call-logs/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/usage/history/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/usage/logs/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/usage/proxy-logs/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/usage/request-logs/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/v1/api/chat/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/v1/audio/speech/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/v1/audio/transcriptions/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/v1/chat/completions/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/v1/embeddings/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/v1/images/generations/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/v1/messages/count_tokens/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/v1/messages/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/v1/models/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/v1/moderations/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/v1/music/generations/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/v1/providers/[provider]/chat/completions/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/v1/providers/[provider]/embeddings/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/v1/providers/[provider]/images/generations/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/v1/rerank/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/v1/responses/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/v1/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/v1/videos/generations/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/v1beta/models/[...path]/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/api/v1beta/models/route-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/callback/{page-585a53f7dc6a30f1.js → page-0f0ebc0820dd18a5.js} +1 -1
- package/app/.next/static/chunks/app/docs/{page-2fe9dcbeb3f738c0.js → page-3658b3f15df3a19e.js} +1 -1
- package/app/.next/static/chunks/app/{error-0d59fc4efafbc38c.js → error-f918d9961a2368d3.js} +1 -1
- package/app/.next/static/chunks/app/forbidden/page-77657dfa95e61cd8.js +1 -0
- package/app/.next/static/chunks/app/forgot-password/page-be3bacc125c30a6b.js +1 -0
- package/app/.next/static/chunks/app/global-error-504ff9093e2a997d.js +1 -0
- package/app/.next/static/chunks/app/landing/page-75b0c988db383cfc.js +1 -0
- package/app/.next/static/chunks/app/{layout-108592eafb959363.js → layout-070972eb026af319.js} +1 -1
- package/app/.next/static/chunks/app/login/{page-121c612ee459e7c2.js → page-6c769465e407368f.js} +1 -1
- package/app/.next/static/chunks/app/not-found-11b712c853d93172.js +1 -0
- package/app/.next/static/chunks/app/page-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/app/privacy/{page-2fe9dcbeb3f738c0.js → page-3658b3f15df3a19e.js} +1 -1
- package/app/.next/static/chunks/app/terms/{page-2fe9dcbeb3f738c0.js → page-3658b3f15df3a19e.js} +1 -1
- package/app/.next/static/chunks/{main-app-c9da11a8061df107.js → main-app-ae230f6bf51a5edb.js} +1 -1
- package/app/.next/static/chunks/next/dist/client/components/builtin/app-error-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/next/dist/client/components/builtin/forbidden-6301a4ed902b878a.js +1 -0
- package/app/.next/static/chunks/next/dist/client/components/builtin/unauthorized-6301a4ed902b878a.js +1 -0
- package/app/.next/static/css/bcd1741aee9d39ab.css +1 -0
- package/app/package.json +1 -1
- package/app/server.js +1 -1
- package/package.json +1 -1
- package/app/.next/server/chunks/5248.js +0 -1
- package/app/.next/server/chunks/5393.js +0 -2
- package/app/.next/static/chunks/5846-9e0f1f3afcbfb08c.js +0 -2
- package/app/.next/static/chunks/app/(dashboard)/dashboard/analytics/loading-6f1750506292c630.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/api-manager/page-1dd4d0c348a7b0a6.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/audit-log/page-e5bf8955e7b9a4f5.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/cli-tools/page-77ab26722f5c56c7.js +0 -15
- package/app/.next/static/chunks/app/(dashboard)/dashboard/endpoint/page-1420c3ca376f1585.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/limits/page-f4a2d6d07df5ddc4.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/media/page-1d0ca9b5d3eaf7cd.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/page-388840686801f3f5.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/profile/page-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-9c8ffb212f855704.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/new/page-31cdb6e15134d8c2.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/settings/page-1393d4935fc087cf.js +0 -1
- package/app/.next/static/chunks/app/_global-error/page-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/_not-found/page-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/auth/login/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/auth/logout/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/auth/status/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/cache/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/cache/stats/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/backups/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/claude-settings/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/cline-settings/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/codex-profiles/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/codex-settings/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/droid-settings/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/guide-settings/[toolId]/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/kilo-settings/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/openclaw-settings/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/runtime/[toolId]/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/cli-tools/status/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/cloud/auth/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/cloud/credentials/update/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/cloud/model/resolve/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/cloud/models/alias/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/combos/[id]/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/combos/metrics/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/combos/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/combos/test/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/compliance/audit-log/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/db-backups/export/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/db-backups/exportAll/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/db-backups/import/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/db-backups/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/evals/[suiteId]/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/evals/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/fallback/chains/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/init/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/keys/[id]/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/keys/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/logs/console/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/models/alias/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/models/availability/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/models/catalog/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/models/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/monitoring/health/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/oauth/[provider]/[action]/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/oauth/cursor/auto-import/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/oauth/cursor/import/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/oauth/kiro/auto-import/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/oauth/kiro/import/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/oauth/kiro/social-authorize/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/oauth/kiro/social-exchange/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/policies/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/pricing/defaults/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/pricing/models/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/pricing/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/provider-metrics/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/provider-models/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/provider-nodes/[id]/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/provider-nodes/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/provider-nodes/validate/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/providers/[id]/models/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/providers/[id]/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/providers/[id]/test/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/providers/client/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/providers/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/providers/test-batch/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/providers/validate/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/rate-limit/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/rate-limits/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/resilience/reset/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/resilience/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/restart/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/sessions/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/settings/combo-defaults/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/settings/ip-filter/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/settings/proxy/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/settings/proxy/test/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/settings/require-login/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/settings/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/settings/system-prompt/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/settings/thinking-budget/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/shutdown/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/storage/health/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/sync/cloud/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/sync/initialize/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/tags/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/telemetry/summary/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/token-health/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/translator/detect/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/translator/history/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/translator/load/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/translator/save/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/translator/send/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/translator/translate/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/usage/[connectionId]/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/usage/analytics/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/usage/budget/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/usage/call-logs/[id]/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/usage/call-logs/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/usage/history/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/usage/logs/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/usage/proxy-logs/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/usage/request-logs/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/v1/api/chat/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/v1/audio/speech/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/v1/audio/transcriptions/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/v1/chat/completions/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/v1/embeddings/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/v1/images/generations/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/v1/messages/count_tokens/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/v1/messages/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/v1/models/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/v1/moderations/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/v1/music/generations/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/v1/providers/[provider]/chat/completions/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/v1/providers/[provider]/embeddings/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/v1/providers/[provider]/images/generations/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/v1/rerank/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/v1/responses/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/v1/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/v1/videos/generations/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/v1beta/models/[...path]/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/api/v1beta/models/route-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/app/forbidden/page-df886dfa2d5bd9fa.js +0 -1
- package/app/.next/static/chunks/app/forgot-password/page-2a495f0b0c653ab4.js +0 -1
- package/app/.next/static/chunks/app/global-error-41eef2a698918fc1.js +0 -1
- package/app/.next/static/chunks/app/landing/page-9d540ab1716f8e3e.js +0 -1
- package/app/.next/static/chunks/app/not-found-1dbd8c3e506fe00f.js +0 -1
- package/app/.next/static/chunks/app/page-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/next/dist/client/components/builtin/app-error-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/next/dist/client/components/builtin/forbidden-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/chunks/next/dist/client/components/builtin/unauthorized-cab2fb7f592d3c36.js +0 -1
- package/app/.next/static/css/b77490a14619ffbb.css +0 -1
- package/app/.next/static/ozfkuTtQLl3_rnlOdkSZi/_buildManifest.js +0 -1
- /package/app/.next/static/{ozfkuTtQLl3_rnlOdkSZi → a624rqqXG_QtNPqv8ZMWa}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3649],{2729:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>m});var s=a(95155),r=a(12115),l=a(40993),i=a(30949),o=a(67671),n=a(50910);let d=/^[a-zA-Z0-9_/.-]+$/;function c(e){return"string"==typeof e?{model:e,weight:0}:{model:e.model,weight:e.weight||0}}function m(){let e=(0,n.c)("combos");(0,n.c)("common");let[t,a]=(0,r.useState)([]),[d,c]=(0,r.useState)(!0),[m,h]=(0,r.useState)(!1),[b,g]=(0,r.useState)(null),[f,y]=(0,r.useState)([]),[v,j]=(0,r.useState)({}),[N,k]=(0,r.useState)(null),[w,C]=(0,r.useState)(null),{copied:S,copy:$}=(0,i.C)(),M=(0,o.i)(),[T,P]=(0,r.useState)(null),[_,O]=(0,r.useState)(null),[D,E]=(0,r.useState)([]);(0,r.useEffect)(()=>{R(),fetch("/api/settings/proxy").then(e=>e.ok?e.json():null).then(e=>O(e)).catch(()=>{})},[]);let R=async()=>{try{let[e,t,s,r]=await Promise.all([fetch("/api/combos"),fetch("/api/providers"),fetch("/api/combos/metrics"),fetch("/api/provider-nodes")]),l=await e.json(),i=await t.json(),o=await s.json(),n=r.ok?await r.json():{nodes:[]};if(e.ok&&a(l.combos||[]),t.ok){let e=(i.connections||[]).filter(e=>"active"===e.testStatus||"success"===e.testStatus);y(e)}s.ok&&j(o.metrics||{}),E(n.nodes||[])}catch(e){console.log("Error fetching data:",e)}finally{c(!1)}},q=async t=>{try{let a=await fetch("/api/combos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(a.ok)await R(),h(!1),M.success(e("comboCreated"));else{let t=await a.json();M.error(t.error?.message||t.error||e("failedCreate"))}}catch(t){M.error(e("errorCreating"))}},A=async(t,a)=>{try{let s=await fetch(`/api/combos/${t}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)});if(s.ok)await R(),g(null),M.success(e("comboUpdated"));else{let t=await s.json();M.error(t.error?.message||t.error||e("failedUpdate"))}}catch(t){M.error(e("errorUpdating"))}},z=async s=>{if(confirm(e("deleteConfirm")))try{(await fetch(`/api/combos/${s}`,{method:"DELETE"})).ok&&(a(t.filter(e=>e.id!==s)),M.success(e("comboDeleted")))}catch(t){M.error(e("errorDeleting"))}},U=async e=>{let a=e.name.replace(/-copy(-\d+)?$/,""),s=t.map(e=>e.name),r=`${a}-copy`,l=1;for(;s.includes(r);)l++,r=`${a}-copy-${l}`;let i={name:r,models:e.models,strategy:e.strategy||"priority",config:e.config||{}};await q(i)},F=async t=>{C(t.name),k(null);try{let e=await fetch("/api/combos/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboName:t.name})}),a=await e.json();k(a)}catch(t){k({error:e("testFailed")}),M.error(e("testFailed"))}},J=async t=>{let s=!1===t.isActive;a(e=>e.map(e=>e.id===t.id?{...e,isActive:s}:e));try{await fetch(`/api/combos/${t.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:s})})}catch(r){a(e=>e.map(e=>e.id===t.id?{...e,isActive:!s}:e)),M.error(e("failedToggle"))}};return d?(0,s.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,s.jsx)(l.Qv,{}),(0,s.jsx)(l.Qv,{})]}):(0,s.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h1",{className:"text-2xl font-semibold",children:e("title")}),(0,s.jsx)("p",{className:"text-sm text-text-muted mt-1",children:e("description")})]}),(0,s.jsx)(l.$n,{icon:"add",onClick:()=>h(!0),children:e("createCombo")})]}),0===t.length?(0,s.jsx)(l.pp,{icon:"\uD83E\uDDE9",title:e("noCombosYet"),description:e("description"),actionLabel:e("createCombo"),onAction:()=>h(!0)}):(0,s.jsx)("div",{className:"flex flex-col gap-4",children:t.map(e=>(0,s.jsx)(x,{combo:e,metrics:v[e.name],providerNodes:D,copied:S,onCopy:$,onEdit:()=>g(e),onDelete:()=>z(e.id),onDuplicate:()=>U(e),onTest:()=>F(e),testing:w===e.name,onProxy:()=>P(e),hasProxy:!!_?.combos?.[e.id],onToggle:()=>J(e)},e.id))}),N&&(0,s.jsx)(l.aF,{isOpen:!!N,onClose:()=>{k(null),C(null)},title:e("testResults",{name:w}),children:(0,s.jsx)(u,{results:N})}),(0,s.jsx)(p,{isOpen:m,onClose:()=>h(!1),onSave:q,activeProviders:f,combo:null},"create"),(0,s.jsx)(p,{isOpen:!!b,combo:b,onClose:()=>g(null),onSave:e=>A(b.id,e),activeProviders:f},b?.id||"new"),T&&(0,s.jsx)(l.KN,{isOpen:!!T,onClose:()=>P(null),level:"combo",levelId:T.id,levelLabel:T.name})]})}function x({combo:e,metrics:t,copied:a,onCopy:r,onEdit:i,onDelete:o,onDuplicate:d,onTest:m,testing:x,onProxy:u,hasProxy:p,onToggle:h,providerNodes:b}){let g=e.strategy||"priority",f=e.models||[],y=!1===e.isActive,v=(0,n.c)("combos"),j=(0,n.c)("common");return(0,s.jsx)(l.Zp,{padding:"sm",className:`group ${y?"opacity-50":""}`,children:(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[(0,s.jsx)("div",{className:"size-8 rounded-lg bg-primary/10 flex items-center justify-center shrink-0",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-primary text-[18px]",children:"layers"})}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("code",{className:"text-sm font-medium font-mono truncate",children:e.name}),(0,s.jsx)("span",{className:`text-[9px] uppercase font-semibold px-1.5 py-0.5 rounded-full ${"weighted"===g?"bg-amber-500/15 text-amber-600 dark:text-amber-400":"round-robin"===g?"bg-emerald-500/15 text-emerald-600 dark:text-emerald-400":"random"===g?"bg-purple-500/15 text-purple-600 dark:text-purple-400":"least-used"===g?"bg-cyan-500/15 text-cyan-600 dark:text-cyan-400":"cost-optimized"===g?"bg-teal-500/15 text-teal-600 dark:text-teal-400":"bg-blue-500/15 text-blue-600 dark:text-blue-400"}`,children:g}),p&&(0,s.jsxs)("span",{className:"text-[9px] uppercase font-semibold px-1.5 py-0.5 rounded-full bg-primary/15 text-primary flex items-center gap-0.5",title:v("proxyConfigured"),children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[11px]",children:"vpn_lock"}),"proxy"]}),(0,s.jsx)("button",{onClick:t=>{t.stopPropagation(),r(e.name,`combo-${e.id}`)},className:"p-0.5 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary transition-colors opacity-0 group-hover:opacity-100",title:v("copyComboName"),children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:a===`combo-${e.id}`?"check":"content_copy"})})]}),(0,s.jsxs)("div",{className:"flex items-center gap-1 mt-0.5 flex-wrap",children:[0===f.length?(0,s.jsx)("span",{className:"text-xs text-text-muted italic",children:v("noModels")}):f.slice(0,3).map((e,t)=>{let{model:a,weight:r}=c(e);return(0,s.jsxs)("code",{className:"text-[10px] font-mono bg-black/5 dark:bg-white/5 px-1.5 py-0.5 rounded text-text-muted",children:[(e=>{let t=e.split("/");if(2!==t.length)return e;let[a,s]=t,r=(b||[]).find(e=>e.id===a||e.prefix===a);return r?`${r.name}/${s}`:e})(a),"weighted"===g&&r>0?` (${r}%)`:""]},t)}),f.length>3&&(0,s.jsx)("span",{className:"text-[10px] text-text-muted",children:v("more",{count:f.length-3})})]}),t&&(0,s.jsxs)("div",{className:"flex items-center gap-3 mt-1",children:[(0,s.jsxs)("span",{className:"text-[10px] text-text-muted",children:[(0,s.jsx)("span",{className:"text-emerald-500",children:t.totalSuccesses}),"/",t.totalRequests," ",v("reqs")]}),(0,s.jsxs)("span",{className:"text-[10px] text-text-muted",children:[t.successRate,"% ",v("success")]}),(0,s.jsxs)("span",{className:"text-[10px] text-text-muted",children:["~",t.avgLatencyMs,"ms"]}),t.fallbackRate>0&&(0,s.jsxs)("span",{className:"text-[10px] text-amber-500",children:[t.fallbackRate,"% fallback"]})]})]})]}),(0,s.jsxs)("div",{className:"flex items-center gap-1.5 shrink-0 ml-2",children:[(0,s.jsx)(l.lM,{size:"sm",checked:!y,onChange:h,title:v(y?"enableCombo":"disableCombo")}),(0,s.jsxs)("div",{className:"flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:[(0,s.jsx)("button",{onClick:m,disabled:x,className:"p-1.5 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-emerald-500 transition-colors",title:v("testCombo"),children:(0,s.jsx)("span",{className:`material-symbols-outlined text-[16px] ${x?"animate-spin":""}`,children:x?"progress_activity":"play_arrow"})}),(0,s.jsx)("button",{onClick:d,className:"p-1.5 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary transition-colors",title:v("duplicate"),children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"content_copy"})}),(0,s.jsx)("button",{onClick:u,className:"p-1.5 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary transition-colors",title:v("proxyConfig"),children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"vpn_lock"})}),(0,s.jsx)("button",{onClick:i,className:"p-1.5 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary transition-colors",title:j("edit"),children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"edit"})}),(0,s.jsx)("button",{onClick:o,className:"p-1.5 hover:bg-red-500/10 rounded text-red-500 transition-colors",title:j("delete"),children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"delete"})})]})]})]})})}function u({results:e}){return e.error?(0,s.jsxs)("div",{className:"flex items-center gap-2 text-red-500 text-sm",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"error"}),"string"==typeof e.error?e.error:JSON.stringify(e.error)]}):(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[e.resolvedBy&&(0,s.jsxs)("div",{className:"flex items-center gap-2 text-sm",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-emerald-500 text-[18px]",children:"check_circle"}),(0,s.jsxs)("span",{children:["Resolved by:"," ",(0,s.jsx)("code",{className:"text-xs bg-emerald-500/10 text-emerald-600 dark:text-emerald-400 px-1.5 py-0.5 rounded",children:e.resolvedBy})]})]}),e.results?.map((e,t)=>(0,s.jsxs)("div",{className:"flex items-center gap-2 text-xs px-2 py-1.5 rounded bg-black/[0.02] dark:bg-white/[0.02]",children:[(0,s.jsx)("span",{className:`material-symbols-outlined text-[14px] ${"ok"===e.status?"text-emerald-500":"skipped"===e.status?"text-text-muted":"text-red-500"}`,children:"ok"===e.status?"check_circle":"skipped"===e.status?"skip_next":"error"}),(0,s.jsx)("code",{className:"font-mono flex-1",children:e.model}),void 0!==e.latencyMs&&(0,s.jsxs)("span",{className:"text-text-muted",children:[e.latencyMs,"ms"]}),(0,s.jsx)("span",{className:`text-[10px] uppercase font-medium ${"ok"===e.status?"text-emerald-500":"skipped"===e.status?"text-text-muted":"text-red-500"}`,children:e.status})]},t))]})}function p({isOpen:e,combo:t,onClose:a,onSave:i,activeProviders:o}){let m=(0,n.c)("combos"),x=(0,n.c)("common"),[u,p]=(0,r.useState)(t?.name||""),[b,g]=(0,r.useState)(()=>(t?.models||[]).map(e=>c(e))),[f,y]=(0,r.useState)(t?.strategy||"priority"),[v,j]=(0,r.useState)(!1),[N,k]=(0,r.useState)(!1),[w,C]=(0,r.useState)(""),[S,$]=(0,r.useState)({}),[M,T]=(0,r.useState)([]),[P,_]=(0,r.useState)(!1),[O,D]=(0,r.useState)(t?.config||{}),[E,R]=(0,r.useState)(null),[q,A]=(0,r.useState)(null),z=async()=>{try{let[e,t]=await Promise.all([fetch("/api/models/alias"),fetch("/api/provider-nodes")]);if(!e.ok||!t.ok)throw Error(`Failed to fetch data: aliases=${e.status}, nodes=${t.status}`);let[a,s]=await Promise.all([e.json(),t.json()]);$(a.aliases||{}),T(s.nodes||[])}catch(e){console.error("Error fetching modal data:",e)}};(0,r.useEffect)(()=>{e&&z()},[e]);let U=e=>e.trim()?d.test(e)?(C(""),!0):(C(m("nameInvalid")),!1):(C(m("nameRequired")),!1),F=(0,r.useCallback)(e=>{let t=e.split("/");if(2!==t.length)return e;let[a,s]=t,r=M.find(e=>e.id===a||e.prefix===a);return r?`${r.name}/${s}`:e},[M]),J=e=>{e.target&&(e.currentTarget.style.opacity="1"),R(null),A(null)},L=async()=>{if(!U(u))return;k(!0);let e={name:u.trim(),models:"weighted"===f?b:b.map(e=>e.model),strategy:f},t={...O};"round-robin"===f&&(void 0!==O.concurrencyPerModel&&(t.concurrencyPerModel=O.concurrencyPerModel),void 0!==O.queueTimeoutMs&&(t.queueTimeoutMs=O.queueTimeoutMs)),Object.keys(t).length>0&&(e.config=t),await i(e),k(!1)},B=!!t;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(l.aF,{isOpen:e,onClose:a,title:B?m("editCombo"):m("createCombo"),children:(0,s.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(l.pd,{label:m("comboName"),value:u,onChange:e=>{let t=e.target.value;p(t),t?U(t):C("")},placeholder:m("comboNamePlaceholder"),error:w}),(0,s.jsx)("p",{className:"text-[10px] text-text-muted mt-0.5",children:m("nameHint")})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:m("routingStrategy")}),(0,s.jsx)("div",{className:"grid grid-cols-3 gap-1 p-0.5 bg-black/5 dark:bg-white/5 rounded-lg",children:[{value:"priority",label:"Priority",icon:"sort"},{value:"weighted",label:"Weighted",icon:"percent"},{value:"round-robin",label:"Round-Robin",icon:"autorenew"},{value:"random",label:"Random",icon:"shuffle"},{value:"least-used",label:"Least-Used",icon:"low_priority"},{value:"cost-optimized",label:"Cost-Opt",icon:"savings"}].map(e=>(0,s.jsxs)("button",{onClick:()=>y(e.value),className:`py-1.5 px-2 rounded-md text-xs font-medium transition-all ${f===e.value?"bg-white dark:bg-bg-main shadow-sm text-primary":"text-text-muted hover:text-text-main"}`,children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px] align-middle mr-0.5",children:e.icon}),e.label]},e.value))}),(0,s.jsx)("p",{className:"text-[10px] text-text-muted mt-0.5",children:{priority:"Sequential fallback: tries model 1 first, then 2, etc.",weighted:"Distributes traffic by weight percentage with fallback","round-robin":"Circular distribution: each request goes to the next model in rotation",random:"Uniform random selection, then fallback to remaining models","least-used":"Picks the model with fewest requests, balancing load over time","cost-optimized":"Routes to the cheapest model first based on pricing"}[f]})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-1.5",children:[(0,s.jsx)("label",{className:"text-sm font-medium",children:m("models")}),"weighted"===f&&b.length>1&&(0,s.jsx)("button",{onClick:()=>{let e=b.length;if(0===e)return;let t=Math.floor(100/e),a=100-t*e;g(b.map((e,s)=>({...e,weight:t+(0===s?a:0)})))},className:"text-[10px] text-primary hover:text-primary/80 transition-colors",children:m("autoBalance")})]}),0===b.length?(0,s.jsxs)("div",{className:"text-center py-4 border border-dashed border-black/10 dark:border-white/10 rounded-lg bg-black/[0.01] dark:bg-white/[0.01]",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-text-muted text-xl mb-1",children:"layers"}),(0,s.jsx)("p",{className:"text-xs text-text-muted",children:m("noModelsYet")})]}):(0,s.jsx)("div",{className:"flex flex-col gap-1 max-h-[240px] overflow-y-auto",children:b.map((e,t)=>(0,s.jsxs)("div",{draggable:!0,onDragStart:e=>{R(t),e.dataTransfer.effectAllowed="move",e.dataTransfer.setData("text/plain",t.toString()),e.target&&setTimeout(()=>e.currentTarget.style.opacity="0.5",0)},onDragEnd:J,onDragOver:e=>{e.preventDefault(),e.dataTransfer.dropEffect="move",A(t)},onDrop:e=>((e,t)=>{if(e.preventDefault(),null===E||E===t)return;let a=[...b],[s]=a.splice(E,1);a.splice(t,0,s),g(a),R(null),A(null)})(e,t),className:`group/item flex items-center gap-1.5 px-2 py-1.5 rounded-md transition-all cursor-grab active:cursor-grabbing ${q===t&&E!==t?"bg-primary/10 border border-primary/30":"bg-black/[0.02] dark:bg-white/[0.02] hover:bg-black/[0.04] dark:hover:bg-white/[0.04] border border-transparent"} ${E===t?"opacity-50":""}`,children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted/40 cursor-grab shrink-0",children:"drag_indicator"}),(0,s.jsx)("span",{className:"text-[10px] font-medium text-text-muted w-3 text-center shrink-0",children:t+1}),(0,s.jsx)("div",{className:"flex-1 min-w-0 px-1 text-xs text-text-main truncate",children:F(e.model)}),"weighted"===f&&(0,s.jsxs)("div",{className:"flex items-center gap-0.5 shrink-0",children:[(0,s.jsx)("input",{type:"number",min:"0",max:"100",value:e.weight,onChange:e=>{var a;let s;return a=e.target.value,void((s=[...b])[t]={...s[t],weight:Math.max(0,Math.min(100,Number(a)||0))},g(s))},className:"w-10 text-[11px] text-center py-0.5 rounded border border-black/10 dark:border-white/10 bg-transparent focus:border-primary focus:outline-none"}),(0,s.jsx)("span",{className:"text-[10px] text-text-muted",children:"%"})]}),"priority"===f&&(0,s.jsxs)("div",{className:"flex items-center gap-0.5",children:[(0,s.jsx)("button",{onClick:()=>(e=>{if(0===e)return;let t=[...b];[t[e-1],t[e]]=[t[e],t[e-1]],g(t)})(t),disabled:0===t,className:`p-0.5 rounded ${0===t?"text-text-muted/20 cursor-not-allowed":"text-text-muted hover:text-primary hover:bg-black/5 dark:hover:bg-white/5"}`,title:m("moveUp"),children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"arrow_upward"})}),(0,s.jsx)("button",{onClick:()=>(e=>{if(e===b.length-1)return;let t=[...b];[t[e],t[e+1]]=[t[e+1],t[e]],g(t)})(t),disabled:t===b.length-1,className:`p-0.5 rounded ${t===b.length-1?"text-text-muted/20 cursor-not-allowed":"text-text-muted hover:text-primary hover:bg-black/5 dark:hover:bg-white/5"}`,title:m("moveDown"),children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"arrow_downward"})})]}),(0,s.jsx)("button",{onClick:()=>{g(b.filter((e,a)=>a!==t))},className:"p-0.5 hover:bg-red-500/10 rounded text-text-muted hover:text-red-500 transition-all",title:m("removeModel"),children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"close"})})]},`${e.model}-${t}`))}),"weighted"===f&&b.length>0&&(0,s.jsx)(h,{models:b}),(0,s.jsxs)("button",{onClick:()=>j(!0),className:"w-full mt-2 py-2 border border-dashed border-black/10 dark:border-white/10 rounded-lg text-xs text-text-muted hover:text-primary hover:border-primary/30 transition-colors flex items-center justify-center gap-1",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"add"}),m("addModel")]})]}),(0,s.jsxs)("button",{onClick:()=>_(!P),className:"flex items-center gap-1 text-xs text-text-muted hover:text-text-main transition-colors self-start",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:P?"expand_less":"expand_more"}),m("advancedSettings")]}),P&&(0,s.jsxs)("div",{className:"flex flex-col gap-2 p-3 bg-black/[0.02] dark:bg-white/[0.02] rounded-lg border border-black/5 dark:border-white/5",children:[(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"text-[10px] text-text-muted mb-0.5 block",children:m("maxRetries")}),(0,s.jsx)("input",{type:"number",min:"0",max:"10",value:O.maxRetries??"",placeholder:"1",onChange:e=>D({...O,maxRetries:e.target.value?Number(e.target.value):void 0}),className:"w-full text-xs py-1.5 px-2 rounded border border-black/10 dark:border-white/10 bg-transparent focus:border-primary focus:outline-none"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"text-[10px] text-text-muted mb-0.5 block",children:m("retryDelay")}),(0,s.jsx)("input",{type:"number",min:"0",max:"60000",step:"500",value:O.retryDelayMs??"",placeholder:"2000",onChange:e=>D({...O,retryDelayMs:e.target.value?Number(e.target.value):void 0}),className:"w-full text-xs py-1.5 px-2 rounded border border-black/10 dark:border-white/10 bg-transparent focus:border-primary focus:outline-none"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"text-[10px] text-text-muted mb-0.5 block",children:m("timeout")}),(0,s.jsx)("input",{type:"number",min:"1000",max:"600000",step:"1000",value:O.timeoutMs??"",placeholder:"120000",onChange:e=>D({...O,timeoutMs:e.target.value?Number(e.target.value):void 0}),className:"w-full text-xs py-1.5 px-2 rounded border border-black/10 dark:border-white/10 bg-transparent focus:border-primary focus:outline-none"})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("label",{className:"text-[10px] text-text-muted",children:m("healthcheck")}),(0,s.jsx)("input",{type:"checkbox",checked:!1!==O.healthCheckEnabled,onChange:e=>D({...O,healthCheckEnabled:e.target.checked}),className:"accent-primary"})]})]}),"round-robin"===f&&(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-2 pt-2 border-t border-black/5 dark:border-white/5",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"text-[10px] text-text-muted mb-0.5 block",children:m("concurrencyPerModel")}),(0,s.jsx)("input",{type:"number",min:"1",max:"20",value:O.concurrencyPerModel??"",placeholder:"3",onChange:e=>D({...O,concurrencyPerModel:e.target.value?Number(e.target.value):void 0}),className:"w-full text-xs py-1.5 px-2 rounded border border-black/10 dark:border-white/10 bg-transparent focus:border-primary focus:outline-none"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"text-[10px] text-text-muted mb-0.5 block",children:m("queueTimeout")}),(0,s.jsx)("input",{type:"number",min:"1000",max:"120000",step:"1000",value:O.queueTimeoutMs??"",placeholder:"30000",onChange:e=>D({...O,queueTimeoutMs:e.target.value?Number(e.target.value):void 0}),className:"w-full text-xs py-1.5 px-2 rounded border border-black/10 dark:border-white/10 bg-transparent focus:border-primary focus:outline-none"})]})]}),(0,s.jsx)("p",{className:"text-[10px] text-text-muted",children:m("advancedHint")})]}),(0,s.jsxs)("div",{className:"flex gap-2 pt-1",children:[(0,s.jsx)(l.$n,{onClick:a,variant:"ghost",fullWidth:!0,size:"sm",children:x("cancel")}),(0,s.jsx)(l.$n,{onClick:L,fullWidth:!0,size:"sm",disabled:!u.trim()||!!w||N,children:N?m("saving"):B?x("save"):m("createCombo")})]})]})}),(0,s.jsx)(l.rq,{isOpen:v,onClose:()=>j(!1),onSelect:e=>{b.find(t=>t.model===e.value)||g([...b,{model:e.value,weight:0}])},activeProviders:o,modelAliases:S,title:m("addModelToCombo"),selectedModel:null})]})}function h({models:e}){let t=e.reduce((e,t)=>e+(t.weight||0),0),a=100===t,r=["bg-blue-500","bg-emerald-500","bg-amber-500","bg-purple-500","bg-rose-500","bg-cyan-500","bg-orange-500","bg-indigo-500"];return(0,s.jsxs)("div",{className:"mt-1.5",children:[(0,s.jsx)("div",{className:"h-1.5 rounded-full bg-black/5 dark:bg-white/5 overflow-hidden flex",children:e.map((e,t)=>e.weight?(0,s.jsx)("div",{className:`${r[t%r.length]} transition-all duration-300`,style:{width:`${Math.min(e.weight,100)}%`}},t):null)}),(0,s.jsxs)("div",{className:"flex items-center justify-between mt-0.5",children:[(0,s.jsx)("div",{className:"flex gap-1",children:e.map((e,t)=>e.weight>0&&(0,s.jsxs)("span",{className:"flex items-center gap-0.5 text-[9px] text-text-muted",children:[(0,s.jsx)("span",{className:`inline-block w-1.5 h-1.5 rounded-full ${r[t%r.length]}`}),e.weight,"%"]},t))}),(0,s.jsxs)("span",{className:`text-[10px] font-medium ${a?"text-emerald-500":t>100?"text-red-500":"text-amber-500"}`,children:[t,"%",!a&&t>0&&" ≠ 100%"]})]})]})}},7762:(e,t,a)=>{Promise.resolve().then(a.bind(a,2729))}},e=>{e.O(0,[3418,8500,9751,8055,1149,5846,993,8441,3794,7358],()=>e(e.s=7762)),_N_E=e.O()}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3649],{2729:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>m});var s=a(95155),r=a(12115),l=a(40993),i=a(30949),o=a(67671),n=a(50910);let d=/^[a-zA-Z0-9_/.-]+$/;function c(e){return"string"==typeof e?{model:e,weight:0}:{model:e.model,weight:e.weight||0}}function m(){let e=(0,n.c)("combos");(0,n.c)("common");let[t,a]=(0,r.useState)([]),[d,c]=(0,r.useState)(!0),[m,h]=(0,r.useState)(!1),[b,g]=(0,r.useState)(null),[f,y]=(0,r.useState)([]),[v,j]=(0,r.useState)({}),[N,k]=(0,r.useState)(null),[w,C]=(0,r.useState)(null),{copied:S,copy:$}=(0,i.C)(),M=(0,o.i)(),[T,P]=(0,r.useState)(null),[_,O]=(0,r.useState)(null),[D,E]=(0,r.useState)([]);(0,r.useEffect)(()=>{R(),fetch("/api/settings/proxy").then(e=>e.ok?e.json():null).then(e=>O(e)).catch(()=>{})},[]);let R=async()=>{try{let[e,t,s,r]=await Promise.all([fetch("/api/combos"),fetch("/api/providers"),fetch("/api/combos/metrics"),fetch("/api/provider-nodes")]),l=await e.json(),i=await t.json(),o=await s.json(),n=r.ok?await r.json():{nodes:[]};if(e.ok&&a(l.combos||[]),t.ok){let e=(i.connections||[]).filter(e=>"active"===e.testStatus||"success"===e.testStatus);y(e)}s.ok&&j(o.metrics||{}),E(n.nodes||[])}catch(e){console.log("Error fetching data:",e)}finally{c(!1)}},q=async t=>{try{let a=await fetch("/api/combos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(a.ok)await R(),h(!1),M.success(e("comboCreated"));else{let t=await a.json();M.error(t.error?.message||t.error||e("failedCreate"))}}catch(t){M.error(e("errorCreating"))}},A=async(t,a)=>{try{let s=await fetch(`/api/combos/${t}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)});if(s.ok)await R(),g(null),M.success(e("comboUpdated"));else{let t=await s.json();M.error(t.error?.message||t.error||e("failedUpdate"))}}catch(t){M.error(e("errorUpdating"))}},z=async s=>{if(confirm(e("deleteConfirm")))try{(await fetch(`/api/combos/${s}`,{method:"DELETE"})).ok&&(a(t.filter(e=>e.id!==s)),M.success(e("comboDeleted")))}catch(t){M.error(e("errorDeleting"))}},U=async e=>{let a=e.name.replace(/-copy(-\d+)?$/,""),s=t.map(e=>e.name),r=`${a}-copy`,l=1;for(;s.includes(r);)l++,r=`${a}-copy-${l}`;let i={name:r,models:e.models,strategy:e.strategy||"priority",config:e.config||{}};await q(i)},F=async t=>{C(t.name),k(null);try{let e=await fetch("/api/combos/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboName:t.name})}),a=await e.json();k(a)}catch(t){k({error:e("testFailed")}),M.error(e("testFailed"))}},J=async t=>{let s=!1===t.isActive;a(e=>e.map(e=>e.id===t.id?{...e,isActive:s}:e));try{await fetch(`/api/combos/${t.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:s})})}catch(r){a(e=>e.map(e=>e.id===t.id?{...e,isActive:!s}:e)),M.error(e("failedToggle"))}};return d?(0,s.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,s.jsx)(l.Qv,{}),(0,s.jsx)(l.Qv,{})]}):(0,s.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h1",{className:"text-2xl font-semibold",children:e("title")}),(0,s.jsx)("p",{className:"text-sm text-text-muted mt-1",children:e("description")})]}),(0,s.jsx)(l.$n,{icon:"add",onClick:()=>h(!0),children:e("createCombo")})]}),0===t.length?(0,s.jsx)(l.pp,{icon:"\uD83E\uDDE9",title:e("noCombosYet"),description:e("description"),actionLabel:e("createCombo"),onAction:()=>h(!0)}):(0,s.jsx)("div",{className:"flex flex-col gap-4",children:t.map(e=>(0,s.jsx)(x,{combo:e,metrics:v[e.name],providerNodes:D,copied:S,onCopy:$,onEdit:()=>g(e),onDelete:()=>z(e.id),onDuplicate:()=>U(e),onTest:()=>F(e),testing:w===e.name,onProxy:()=>P(e),hasProxy:!!_?.combos?.[e.id],onToggle:()=>J(e)},e.id))}),N&&(0,s.jsx)(l.aF,{isOpen:!!N,onClose:()=>{k(null),C(null)},title:e("testResults",{name:w}),children:(0,s.jsx)(u,{results:N})}),(0,s.jsx)(p,{isOpen:m,onClose:()=>h(!1),onSave:q,activeProviders:f,combo:null},"create"),(0,s.jsx)(p,{isOpen:!!b,combo:b,onClose:()=>g(null),onSave:e=>A(b.id,e),activeProviders:f},b?.id||"new"),T&&(0,s.jsx)(l.KN,{isOpen:!!T,onClose:()=>P(null),level:"combo",levelId:T.id,levelLabel:T.name})]})}function x({combo:e,metrics:t,copied:a,onCopy:r,onEdit:i,onDelete:o,onDuplicate:d,onTest:m,testing:x,onProxy:u,hasProxy:p,onToggle:h,providerNodes:b}){let g=e.strategy||"priority",f=e.models||[],y=!1===e.isActive,v=(0,n.c)("combos"),j=(0,n.c)("common");return(0,s.jsx)(l.Zp,{padding:"sm",className:`group ${y?"opacity-50":""}`,children:(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[(0,s.jsx)("div",{className:"size-8 rounded-lg bg-primary/10 flex items-center justify-center shrink-0",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-primary text-[18px]",children:"layers"})}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("code",{className:"text-sm font-medium font-mono truncate",children:e.name}),(0,s.jsx)("span",{className:`text-[9px] uppercase font-semibold px-1.5 py-0.5 rounded-full ${"weighted"===g?"bg-amber-500/15 text-amber-600 dark:text-amber-400":"round-robin"===g?"bg-emerald-500/15 text-emerald-600 dark:text-emerald-400":"random"===g?"bg-purple-500/15 text-purple-600 dark:text-purple-400":"least-used"===g?"bg-cyan-500/15 text-cyan-600 dark:text-cyan-400":"cost-optimized"===g?"bg-teal-500/15 text-teal-600 dark:text-teal-400":"bg-blue-500/15 text-blue-600 dark:text-blue-400"}`,children:g}),p&&(0,s.jsxs)("span",{className:"text-[9px] uppercase font-semibold px-1.5 py-0.5 rounded-full bg-primary/15 text-primary flex items-center gap-0.5",title:v("proxyConfigured"),children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[11px]",children:"vpn_lock"}),"proxy"]}),(0,s.jsx)("button",{onClick:t=>{t.stopPropagation(),r(e.name,`combo-${e.id}`)},className:"p-0.5 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary transition-colors opacity-0 group-hover:opacity-100",title:v("copyComboName"),children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:a===`combo-${e.id}`?"check":"content_copy"})})]}),(0,s.jsxs)("div",{className:"flex items-center gap-1 mt-0.5 flex-wrap",children:[0===f.length?(0,s.jsx)("span",{className:"text-xs text-text-muted italic",children:v("noModels")}):f.slice(0,3).map((e,t)=>{let{model:a,weight:r}=c(e);return(0,s.jsxs)("code",{className:"text-[10px] font-mono bg-black/5 dark:bg-white/5 px-1.5 py-0.5 rounded text-text-muted",children:[(e=>{let t=e.split("/");if(2!==t.length)return e;let[a,s]=t,r=(b||[]).find(e=>e.id===a||e.prefix===a);return r?`${r.name}/${s}`:e})(a),"weighted"===g&&r>0?` (${r}%)`:""]},t)}),f.length>3&&(0,s.jsx)("span",{className:"text-[10px] text-text-muted",children:v("more",{count:f.length-3})})]}),t&&(0,s.jsxs)("div",{className:"flex items-center gap-3 mt-1",children:[(0,s.jsxs)("span",{className:"text-[10px] text-text-muted",children:[(0,s.jsx)("span",{className:"text-emerald-500",children:t.totalSuccesses}),"/",t.totalRequests," ",v("reqs")]}),(0,s.jsxs)("span",{className:"text-[10px] text-text-muted",children:[t.successRate,"% ",v("success")]}),(0,s.jsxs)("span",{className:"text-[10px] text-text-muted",children:["~",t.avgLatencyMs,"ms"]}),t.fallbackRate>0&&(0,s.jsxs)("span",{className:"text-[10px] text-amber-500",children:[t.fallbackRate,"% fallback"]})]})]})]}),(0,s.jsxs)("div",{className:"flex items-center gap-1.5 shrink-0 ml-2",children:[(0,s.jsx)(l.lM,{size:"sm",checked:!y,onChange:h,title:v(y?"enableCombo":"disableCombo")}),(0,s.jsxs)("div",{className:"flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:[(0,s.jsx)("button",{onClick:m,disabled:x,className:"p-1.5 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-emerald-500 transition-colors",title:v("testCombo"),children:(0,s.jsx)("span",{className:`material-symbols-outlined text-[16px] ${x?"animate-spin":""}`,children:x?"progress_activity":"play_arrow"})}),(0,s.jsx)("button",{onClick:d,className:"p-1.5 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary transition-colors",title:v("duplicate"),children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"content_copy"})}),(0,s.jsx)("button",{onClick:u,className:"p-1.5 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary transition-colors",title:v("proxyConfig"),children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"vpn_lock"})}),(0,s.jsx)("button",{onClick:i,className:"p-1.5 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary transition-colors",title:j("edit"),children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"edit"})}),(0,s.jsx)("button",{onClick:o,className:"p-1.5 hover:bg-red-500/10 rounded text-red-500 transition-colors",title:j("delete"),children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"delete"})})]})]})]})})}function u({results:e}){return e.error?(0,s.jsxs)("div",{className:"flex items-center gap-2 text-red-500 text-sm",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"error"}),"string"==typeof e.error?e.error:JSON.stringify(e.error)]}):(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[e.resolvedBy&&(0,s.jsxs)("div",{className:"flex items-center gap-2 text-sm",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-emerald-500 text-[18px]",children:"check_circle"}),(0,s.jsxs)("span",{children:["Resolved by:"," ",(0,s.jsx)("code",{className:"text-xs bg-emerald-500/10 text-emerald-600 dark:text-emerald-400 px-1.5 py-0.5 rounded",children:e.resolvedBy})]})]}),e.results?.map((e,t)=>(0,s.jsxs)("div",{className:"flex items-center gap-2 text-xs px-2 py-1.5 rounded bg-black/[0.02] dark:bg-white/[0.02]",children:[(0,s.jsx)("span",{className:`material-symbols-outlined text-[14px] ${"ok"===e.status?"text-emerald-500":"skipped"===e.status?"text-text-muted":"text-red-500"}`,children:"ok"===e.status?"check_circle":"skipped"===e.status?"skip_next":"error"}),(0,s.jsx)("code",{className:"font-mono flex-1",children:e.model}),void 0!==e.latencyMs&&(0,s.jsxs)("span",{className:"text-text-muted",children:[e.latencyMs,"ms"]}),(0,s.jsx)("span",{className:`text-[10px] uppercase font-medium ${"ok"===e.status?"text-emerald-500":"skipped"===e.status?"text-text-muted":"text-red-500"}`,children:e.status})]},t))]})}function p({isOpen:e,combo:t,onClose:a,onSave:i,activeProviders:o}){let m=(0,n.c)("combos"),x=(0,n.c)("common"),[u,p]=(0,r.useState)(t?.name||""),[b,g]=(0,r.useState)(()=>(t?.models||[]).map(e=>c(e))),[f,y]=(0,r.useState)(t?.strategy||"priority"),[v,j]=(0,r.useState)(!1),[N,k]=(0,r.useState)(!1),[w,C]=(0,r.useState)(""),[S,$]=(0,r.useState)({}),[M,T]=(0,r.useState)([]),[P,_]=(0,r.useState)(!1),[O,D]=(0,r.useState)(t?.config||{}),[E,R]=(0,r.useState)(null),[q,A]=(0,r.useState)(null),z=async()=>{try{let[e,t]=await Promise.all([fetch("/api/models/alias"),fetch("/api/provider-nodes")]);if(!e.ok||!t.ok)throw Error(`Failed to fetch data: aliases=${e.status}, nodes=${t.status}`);let[a,s]=await Promise.all([e.json(),t.json()]);$(a.aliases||{}),T(s.nodes||[])}catch(e){console.error("Error fetching modal data:",e)}};(0,r.useEffect)(()=>{e&&z()},[e]);let U=e=>e.trim()?d.test(e)?(C(""),!0):(C(m("nameInvalid")),!1):(C(m("nameRequired")),!1),F=(0,r.useCallback)(e=>{let t=e.split("/");if(2!==t.length)return e;let[a,s]=t,r=M.find(e=>e.id===a||e.prefix===a);return r?`${r.name}/${s}`:e},[M]),J=e=>{e.target&&(e.currentTarget.style.opacity="1"),R(null),A(null)},L=async()=>{if(!U(u))return;k(!0);let e={name:u.trim(),models:"weighted"===f?b:b.map(e=>e.model),strategy:f},t={...O};"round-robin"===f&&(void 0!==O.concurrencyPerModel&&(t.concurrencyPerModel=O.concurrencyPerModel),void 0!==O.queueTimeoutMs&&(t.queueTimeoutMs=O.queueTimeoutMs)),Object.keys(t).length>0&&(e.config=t),await i(e),k(!1)},B=!!t;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(l.aF,{isOpen:e,onClose:a,title:B?m("editCombo"):m("createCombo"),children:(0,s.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)(l.pd,{label:m("comboName"),value:u,onChange:e=>{let t=e.target.value;p(t),t?U(t):C("")},placeholder:m("comboNamePlaceholder"),error:w}),(0,s.jsx)("p",{className:"text-[10px] text-text-muted mt-0.5",children:m("nameHint")})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:m("routingStrategy")}),(0,s.jsx)("div",{className:"grid grid-cols-3 gap-1 p-0.5 bg-black/5 dark:bg-white/5 rounded-lg",children:[{value:"priority",label:"Priority",icon:"sort"},{value:"weighted",label:"Weighted",icon:"percent"},{value:"round-robin",label:"Round-Robin",icon:"autorenew"},{value:"random",label:"Random",icon:"shuffle"},{value:"least-used",label:"Least-Used",icon:"low_priority"},{value:"cost-optimized",label:"Cost-Opt",icon:"savings"}].map(e=>(0,s.jsxs)("button",{onClick:()=>y(e.value),className:`py-1.5 px-2 rounded-md text-xs font-medium transition-all ${f===e.value?"bg-white dark:bg-bg-main shadow-sm text-primary":"text-text-muted hover:text-text-main"}`,children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px] align-middle mr-0.5",children:e.icon}),e.label]},e.value))}),(0,s.jsx)("p",{className:"text-[10px] text-text-muted mt-0.5",children:{priority:"Sequential fallback: tries model 1 first, then 2, etc.",weighted:"Distributes traffic by weight percentage with fallback","round-robin":"Circular distribution: each request goes to the next model in rotation",random:"Uniform random selection, then fallback to remaining models","least-used":"Picks the model with fewest requests, balancing load over time","cost-optimized":"Routes to the cheapest model first based on pricing"}[f]})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-1.5",children:[(0,s.jsx)("label",{className:"text-sm font-medium",children:m("models")}),"weighted"===f&&b.length>1&&(0,s.jsx)("button",{onClick:()=>{let e=b.length;if(0===e)return;let t=Math.floor(100/e),a=100-t*e;g(b.map((e,s)=>({...e,weight:t+(0===s?a:0)})))},className:"text-[10px] text-primary hover:text-primary/80 transition-colors",children:m("autoBalance")})]}),0===b.length?(0,s.jsxs)("div",{className:"text-center py-4 border border-dashed border-black/10 dark:border-white/10 rounded-lg bg-black/[0.01] dark:bg-white/[0.01]",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-text-muted text-xl mb-1",children:"layers"}),(0,s.jsx)("p",{className:"text-xs text-text-muted",children:m("noModelsYet")})]}):(0,s.jsx)("div",{className:"flex flex-col gap-1 max-h-[240px] overflow-y-auto",children:b.map((e,t)=>(0,s.jsxs)("div",{draggable:!0,onDragStart:e=>{R(t),e.dataTransfer.effectAllowed="move",e.dataTransfer.setData("text/plain",t.toString()),e.target&&setTimeout(()=>e.currentTarget.style.opacity="0.5",0)},onDragEnd:J,onDragOver:e=>{e.preventDefault(),e.dataTransfer.dropEffect="move",A(t)},onDrop:e=>((e,t)=>{if(e.preventDefault(),null===E||E===t)return;let a=[...b],[s]=a.splice(E,1);a.splice(t,0,s),g(a),R(null),A(null)})(e,t),className:`group/item flex items-center gap-1.5 px-2 py-1.5 rounded-md transition-all cursor-grab active:cursor-grabbing ${q===t&&E!==t?"bg-primary/10 border border-primary/30":"bg-black/[0.02] dark:bg-white/[0.02] hover:bg-black/[0.04] dark:hover:bg-white/[0.04] border border-transparent"} ${E===t?"opacity-50":""}`,children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted/40 cursor-grab shrink-0",children:"drag_indicator"}),(0,s.jsx)("span",{className:"text-[10px] font-medium text-text-muted w-3 text-center shrink-0",children:t+1}),(0,s.jsx)("div",{className:"flex-1 min-w-0 px-1 text-xs text-text-main truncate",children:F(e.model)}),"weighted"===f&&(0,s.jsxs)("div",{className:"flex items-center gap-0.5 shrink-0",children:[(0,s.jsx)("input",{type:"number",min:"0",max:"100",value:e.weight,onChange:e=>{var a;let s;return a=e.target.value,void((s=[...b])[t]={...s[t],weight:Math.max(0,Math.min(100,Number(a)||0))},g(s))},className:"w-10 text-[11px] text-center py-0.5 rounded border border-black/10 dark:border-white/10 bg-transparent focus:border-primary focus:outline-none"}),(0,s.jsx)("span",{className:"text-[10px] text-text-muted",children:"%"})]}),"priority"===f&&(0,s.jsxs)("div",{className:"flex items-center gap-0.5",children:[(0,s.jsx)("button",{onClick:()=>(e=>{if(0===e)return;let t=[...b];[t[e-1],t[e]]=[t[e],t[e-1]],g(t)})(t),disabled:0===t,className:`p-0.5 rounded ${0===t?"text-text-muted/20 cursor-not-allowed":"text-text-muted hover:text-primary hover:bg-black/5 dark:hover:bg-white/5"}`,title:m("moveUp"),children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"arrow_upward"})}),(0,s.jsx)("button",{onClick:()=>(e=>{if(e===b.length-1)return;let t=[...b];[t[e],t[e+1]]=[t[e+1],t[e]],g(t)})(t),disabled:t===b.length-1,className:`p-0.5 rounded ${t===b.length-1?"text-text-muted/20 cursor-not-allowed":"text-text-muted hover:text-primary hover:bg-black/5 dark:hover:bg-white/5"}`,title:m("moveDown"),children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"arrow_downward"})})]}),(0,s.jsx)("button",{onClick:()=>{g(b.filter((e,a)=>a!==t))},className:"p-0.5 hover:bg-red-500/10 rounded text-text-muted hover:text-red-500 transition-all",title:m("removeModel"),children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"close"})})]},`${e.model}-${t}`))}),"weighted"===f&&b.length>0&&(0,s.jsx)(h,{models:b}),(0,s.jsxs)("button",{onClick:()=>j(!0),className:"w-full mt-2 py-2 border border-dashed border-black/10 dark:border-white/10 rounded-lg text-xs text-text-muted hover:text-primary hover:border-primary/30 transition-colors flex items-center justify-center gap-1",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"add"}),m("addModel")]})]}),(0,s.jsxs)("button",{onClick:()=>_(!P),className:"flex items-center gap-1 text-xs text-text-muted hover:text-text-main transition-colors self-start",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:P?"expand_less":"expand_more"}),m("advancedSettings")]}),P&&(0,s.jsxs)("div",{className:"flex flex-col gap-2 p-3 bg-black/[0.02] dark:bg-white/[0.02] rounded-lg border border-black/5 dark:border-white/5",children:[(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"text-[10px] text-text-muted mb-0.5 block",children:m("maxRetries")}),(0,s.jsx)("input",{type:"number",min:"0",max:"10",value:O.maxRetries??"",placeholder:"1",onChange:e=>D({...O,maxRetries:e.target.value?Number(e.target.value):void 0}),className:"w-full text-xs py-1.5 px-2 rounded border border-black/10 dark:border-white/10 bg-transparent focus:border-primary focus:outline-none"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"text-[10px] text-text-muted mb-0.5 block",children:m("retryDelay")}),(0,s.jsx)("input",{type:"number",min:"0",max:"60000",step:"500",value:O.retryDelayMs??"",placeholder:"2000",onChange:e=>D({...O,retryDelayMs:e.target.value?Number(e.target.value):void 0}),className:"w-full text-xs py-1.5 px-2 rounded border border-black/10 dark:border-white/10 bg-transparent focus:border-primary focus:outline-none"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"text-[10px] text-text-muted mb-0.5 block",children:m("timeout")}),(0,s.jsx)("input",{type:"number",min:"1000",max:"600000",step:"1000",value:O.timeoutMs??"",placeholder:"120000",onChange:e=>D({...O,timeoutMs:e.target.value?Number(e.target.value):void 0}),className:"w-full text-xs py-1.5 px-2 rounded border border-black/10 dark:border-white/10 bg-transparent focus:border-primary focus:outline-none"})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("label",{className:"text-[10px] text-text-muted",children:m("healthcheck")}),(0,s.jsx)("input",{type:"checkbox",checked:!1!==O.healthCheckEnabled,onChange:e=>D({...O,healthCheckEnabled:e.target.checked}),className:"accent-primary"})]})]}),"round-robin"===f&&(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-2 pt-2 border-t border-black/5 dark:border-white/5",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"text-[10px] text-text-muted mb-0.5 block",children:m("concurrencyPerModel")}),(0,s.jsx)("input",{type:"number",min:"1",max:"20",value:O.concurrencyPerModel??"",placeholder:"3",onChange:e=>D({...O,concurrencyPerModel:e.target.value?Number(e.target.value):void 0}),className:"w-full text-xs py-1.5 px-2 rounded border border-black/10 dark:border-white/10 bg-transparent focus:border-primary focus:outline-none"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"text-[10px] text-text-muted mb-0.5 block",children:m("queueTimeout")}),(0,s.jsx)("input",{type:"number",min:"1000",max:"120000",step:"1000",value:O.queueTimeoutMs??"",placeholder:"30000",onChange:e=>D({...O,queueTimeoutMs:e.target.value?Number(e.target.value):void 0}),className:"w-full text-xs py-1.5 px-2 rounded border border-black/10 dark:border-white/10 bg-transparent focus:border-primary focus:outline-none"})]})]}),(0,s.jsx)("p",{className:"text-[10px] text-text-muted",children:m("advancedHint")})]}),(0,s.jsxs)("div",{className:"flex gap-2 pt-1",children:[(0,s.jsx)(l.$n,{onClick:a,variant:"ghost",fullWidth:!0,size:"sm",children:x("cancel")}),(0,s.jsx)(l.$n,{onClick:L,fullWidth:!0,size:"sm",disabled:!u.trim()||!!w||N,children:N?m("saving"):B?x("save"):m("createCombo")})]})]})}),(0,s.jsx)(l.rq,{isOpen:v,onClose:()=>j(!1),onSelect:e=>{b.find(t=>t.model===e.value)||g([...b,{model:e.value,weight:0}])},activeProviders:o,modelAliases:S,title:m("addModelToCombo"),selectedModel:null})]})}function h({models:e}){let t=e.reduce((e,t)=>e+(t.weight||0),0),a=100===t,r=["bg-blue-500","bg-emerald-500","bg-amber-500","bg-purple-500","bg-rose-500","bg-cyan-500","bg-orange-500","bg-indigo-500"];return(0,s.jsxs)("div",{className:"mt-1.5",children:[(0,s.jsx)("div",{className:"h-1.5 rounded-full bg-black/5 dark:bg-white/5 overflow-hidden flex",children:e.map((e,t)=>e.weight?(0,s.jsx)("div",{className:`${r[t%r.length]} transition-all duration-300`,style:{width:`${Math.min(e.weight,100)}%`}},t):null)}),(0,s.jsxs)("div",{className:"flex items-center justify-between mt-0.5",children:[(0,s.jsx)("div",{className:"flex gap-1",children:e.map((e,t)=>e.weight>0&&(0,s.jsxs)("span",{className:"flex items-center gap-0.5 text-[9px] text-text-muted",children:[(0,s.jsx)("span",{className:`inline-block w-1.5 h-1.5 rounded-full ${r[t%r.length]}`}),e.weight,"%"]},t))}),(0,s.jsxs)("span",{className:`text-[10px] font-medium ${a?"text-emerald-500":t>100?"text-red-500":"text-amber-500"}`,children:[t,"%",!a&&t>0&&" ≠ 100%"]})]})]})}},93062:(e,t,a)=>{Promise.resolve().then(a.bind(a,2729))}},e=>{e.O(0,[3418,8500,9751,8055,1149,5846,993,8441,3794,7358],()=>e(e.s=93062)),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3700],{14031:(e,t,s)=>{Promise.resolve().then(s.bind(s,70595))},70595:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>g});var a=s(95155),l=s(12115),i=s(40993),r=s(50910),n=s(33418),d=s(67671);function o({value:e,max:t,warningAt:s=.8,formatCurrency:l}){let i=t>0?Math.min(e/t*100,100):0,r=t>0?e/t:0;return(0,a.jsxs)("div",{className:"w-full",children:[(0,a.jsxs)("div",{className:"flex justify-between text-xs mb-1",children:[(0,a.jsx)("span",{className:"text-text-muted",children:l(e)}),(0,a.jsx)("span",{className:"text-text-muted",children:l(t)})]}),(0,a.jsx)("div",{className:"w-full h-2 rounded-full bg-surface/50 overflow-hidden",children:(0,a.jsx)("div",{className:"h-full rounded-full transition-all duration-500",style:{width:`${i}%`,backgroundColor:r>=1?"#ef4444":r>=s?"#f59e0b":"#22c55e"}})})]})}function c(){let e=(0,r.c)("usage"),t=(0,n.Ym)(),[s,c]=(0,l.useState)([]),[m,x]=(0,l.useState)(null),[u,p]=(0,l.useState)(null),[h,g]=(0,l.useState)(!0),[b,y]=(0,l.useState)(!1),[f,j]=(0,l.useState)({dailyLimitUsd:"",monthlyLimitUsd:"",warningThreshold:"80"}),v=(0,d.i)(),N=e=>new Intl.NumberFormat(t,{style:"currency",currency:"USD",minimumFractionDigits:2,maximumFractionDigits:2}).format(Number(e||0));(0,l.useEffect)(()=>{fetch("/api/keys").then(e=>e.json()).then(e=>{let t=Array.isArray(e)?e:e.keys||[];c(t),t.length>0&&x(t[0].id),g(!1)}).catch(()=>g(!1))},[]);let w=(0,l.useCallback)(async()=>{if(m)try{let e=await fetch(`/api/usage/budget?apiKeyId=${m}`);if(e.ok){let t=await e.json();p(t),t.dailyLimitUsd&&j(e=>({...e,dailyLimitUsd:String(t.dailyLimitUsd)})),t.monthlyLimitUsd&&j(e=>({...e,monthlyLimitUsd:String(t.monthlyLimitUsd)})),t.warningThreshold&&j(e=>({...e,warningThreshold:String(t.warningThreshold)}))}}catch{}},[m]);(0,l.useEffect)(()=>{w()},[w]);let C=async()=>{y(!0);try{(await fetch("/api/usage/budget",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiKeyId:m,dailyLimitUsd:f.dailyLimitUsd?parseFloat(f.dailyLimitUsd):null,monthlyLimitUsd:f.monthlyLimitUsd?parseFloat(f.monthlyLimitUsd):null,warningThreshold:parseInt(f.warningThreshold)||80})})).ok?(v.success(e("budgetSaved")),await w()):v.error(e("budgetSaveFailed"))}catch{v.error(e("budgetSaveFailed"))}finally{y(!1)}};if(h)return(0,a.jsxs)("div",{className:"flex items-center gap-2 text-text-muted p-8 animate-pulse",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]","aria-hidden":"true",children:"account_balance_wallet"}),e("loadingBudgetData")]});if(0===s.length)return(0,a.jsx)(i.pp,{icon:"vpn_key",title:e("noApiKeysTitle"),description:e("noApiKeysDescription")});let k=u?.dailyLimitUsd||parseFloat(f.dailyLimitUsd)||0,L=u?.monthlyLimitUsd||parseFloat(f.monthlyLimitUsd)||0,S=u?.totalCostToday||0,U=u?.totalCostMonth||0,T=(parseInt(f.warningThreshold)||80)/100;return(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsxs)(i.Zp,{className:"p-6",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-emerald-500/10 text-emerald-500",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]","aria-hidden":"true",children:"account_balance_wallet"})}),(0,a.jsx)("h3",{className:"text-lg font-semibold",children:e("budgetManagement")})]}),(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsx)("label",{className:"text-sm text-text-muted mb-1 block",children:e("apiKey")}),(0,a.jsx)("select",{value:m||"",onChange:e=>x(e.target.value),className:"w-full md:w-auto px-3 py-2 rounded-lg border border-border/50 bg-surface/30 text-text-main text-sm focus:outline-none focus:ring-1 focus:ring-primary",children:s.map(e=>(0,a.jsxs)("option",{value:e.id,children:[e.name||e.id," ",e.provider?`(${e.provider})`:""]},e.id))})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mb-6",children:[(0,a.jsxs)("div",{className:"p-4 rounded-lg border border-border/30 bg-surface/20",children:[(0,a.jsx)("p",{className:"text-sm text-text-muted mb-2",children:e("todaysSpend")}),(0,a.jsx)("p",{className:"text-2xl font-bold text-text-main",children:N(S)}),k>0&&(0,a.jsx)(o,{value:S,max:k,warningAt:T,formatCurrency:N})]}),(0,a.jsxs)("div",{className:"p-4 rounded-lg border border-border/30 bg-surface/20",children:[(0,a.jsx)("p",{className:"text-sm text-text-muted mb-2",children:e("thisMonth")}),(0,a.jsx)("p",{className:"text-2xl font-bold text-text-main",children:N(U)}),L>0&&(0,a.jsx)(o,{value:U,max:L,warningAt:T,formatCurrency:N})]})]}),(0,a.jsxs)("div",{className:"border-t border-border/30 pt-4",children:[(0,a.jsx)("p",{className:"text-sm font-medium mb-3",children:e("setLimits")}),(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4 mb-4",children:[(0,a.jsx)(i.pd,{label:e("dailyLimitUsd"),type:"number",step:"0.01",min:"0",placeholder:e("dailyLimitPlaceholder"),value:f.dailyLimitUsd,onChange:e=>j({...f,dailyLimitUsd:e.target.value})}),(0,a.jsx)(i.pd,{label:e("monthlyLimitUsd"),type:"number",step:"0.01",min:"0",placeholder:e("monthlyLimitPlaceholder"),value:f.monthlyLimitUsd,onChange:e=>j({...f,monthlyLimitUsd:e.target.value})}),(0,a.jsx)(i.pd,{label:e("warningThresholdPercent"),type:"number",min:"1",max:"100",placeholder:e("warningThresholdPlaceholder"),value:f.warningThreshold,onChange:e=>j({...f,warningThreshold:e.target.value})})]}),(0,a.jsx)(i.$n,{variant:"primary",onClick:C,loading:b,children:e("saveLimits")})]})]}),u?.budgetCheck&&(0,a.jsx)(i.Zp,{className:"p-4",children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]","aria-hidden":"true",style:{color:u.budgetCheck.allowed?"#22c55e":"#ef4444"},children:u.budgetCheck.allowed?"check_circle":"block"}),(0,a.jsx)("span",{className:"text-sm",children:u.budgetCheck.allowed?e("budgetOk",{remaining:N(u.budgetCheck.remaining||0)}):e("budgetExceeded")})]})})]})}let m=["input","output","cached","reasoning","cache_creation"],x={input:"input",output:"output",cached:"cached",reasoning:"reasoning",cache_creation:"cacheCreation"};function u(){let[e,t]=(0,l.useState)({}),[s,n]=(0,l.useState)({}),[d,o]=(0,l.useState)(!0),[c,m]=(0,l.useState)(!1),[x,u]=(0,l.useState)(""),[h,g]=(0,l.useState)(null),[b,y]=(0,l.useState)(new Set),[f,j]=(0,l.useState)(""),[v,N]=(0,l.useState)(new Set),w=(0,r.c)("settings");(0,l.useEffect)(()=>{C()},[]);let C=async()=>{o(!0);try{let[e,s]=await Promise.all([fetch("/api/pricing/models"),fetch("/api/pricing")]);e.ok&&t(await e.json()),s.ok&&n(await s.json())}catch(e){console.error("Failed to load pricing data:",e)}finally{o(!1)}},k=(0,l.useMemo)(()=>Object.entries(e).map(([e,t])=>({alias:e,...t,pricedModels:s[e]?Object.keys(s[e]).length:0})).sort((e,t)=>t.modelCount-e.modelCount),[e,s]),L=(0,l.useMemo)(()=>{if(!f.trim())return k;let e=f.toLowerCase();return k.filter(t=>t.alias.toLowerCase().includes(e)||t.id.toLowerCase().includes(e)||t.models.some(t=>t.id.toLowerCase().includes(e)||t.name.toLowerCase().includes(e)))},[k,f]),S=(0,l.useMemo)(()=>{let e=k.reduce((e,t)=>e+t.modelCount,0),t=Object.values(s).reduce((e,t)=>e+Object.keys(t).length,0);return{providers:k.length,totalModels:e,pricedCount:t}},[k,s]),U=(0,l.useCallback)(e=>{y(t=>{let s=new Set(t);return s.has(e)?s.delete(e):s.add(e),s})},[]),T=(0,l.useCallback)((e,t,s,a)=>{let l=parseFloat(a);isNaN(l)||l<0||(n(a=>{let i={...a};return i[e]||(i[e]={}),i[e][t]||(i[e][t]={input:0,output:0,cached:0,reasoning:0,cache_creation:0}),i[e][t]={...i[e][t],[s]:l},i}),N(t=>new Set(t).add(e)))},[]),P=(0,l.useCallback)(async e=>{m(!0),u("");try{let t=s[e]||{},a=await fetch("/api/pricing",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({[e]:t})});if(a.ok)u(`✅ ${e.toUpperCase()} ${w("saved")}`),N(t=>{let s=new Set(t);return s.delete(e),s}),setTimeout(()=>u(""),3e3);else{let e=await a.json();u(`❌ ${w("errorOccurred")}: ${e.error}`)}}catch(e){u(`❌ ${w("saveFailed")}: ${e.message}`)}finally{m(!1)}},[s,w]),$=(0,l.useCallback)(async e=>{if(confirm(w("resetPricingConfirm",{provider:e.toUpperCase()})))try{let t=await fetch(`/api/pricing?provider=${e}`,{method:"DELETE"});if(t.ok){let s=await t.json();n(s),u(`🔄 ${e.toUpperCase()} ${w("resetDefaults")}`),N(t=>{let s=new Set(t);return s.delete(e),s}),setTimeout(()=>u(""),3e3)}}catch(e){u(`❌ ${w("resetFailed")}: ${e.message}`)}},[w]),D=(0,l.useCallback)(e=>{g(t=>t===e?null:e)},[]),_=(0,l.useMemo)(()=>h?L.filter(e=>e.alias===h):L,[L,h]);return d?(0,a.jsx)("div",{className:"flex items-center justify-center py-16",children:(0,a.jsx)("div",{className:"text-text-muted animate-pulse",children:w("loadingPricing")})}):(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start justify-between flex-wrap gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-xl font-bold",children:w("modelPricing")}),(0,a.jsx)("p",{className:"text-text-muted text-sm mt-1",children:w("modelPricingDesc")})]}),(0,a.jsxs)("div",{className:"flex gap-3 text-sm",children:[(0,a.jsxs)("div",{className:"bg-bg-subtle rounded-lg px-3 py-2 text-center",children:[(0,a.jsx)("div",{className:"text-text-muted text-xs font-semibold",children:w("providers")}),(0,a.jsx)("div",{className:"text-lg font-bold",children:S.providers})]}),(0,a.jsxs)("div",{className:"bg-bg-subtle rounded-lg px-3 py-2 text-center",children:[(0,a.jsx)("div",{className:"text-text-muted text-xs font-semibold",children:w("registry")}),(0,a.jsx)("div",{className:"text-lg font-bold",children:S.totalModels})]}),(0,a.jsxs)("div",{className:"bg-bg-subtle rounded-lg px-3 py-2 text-center",children:[(0,a.jsx)("div",{className:"text-text-muted text-xs font-semibold",children:w("priced")}),(0,a.jsx)("div",{className:"text-lg font-bold text-success",children:S.pricedCount})]})]})]}),x&&(0,a.jsx)("div",{className:"px-3 py-2 rounded-lg bg-bg-subtle border border-border text-sm",children:x}),(0,a.jsxs)("div",{className:"flex gap-3 items-center flex-wrap",children:[(0,a.jsxs)("div",{className:"relative flex-1 min-w-[200px]",children:[(0,a.jsx)("span",{className:"material-symbols-outlined absolute left-3 top-1/2 -translate-y-1/2 text-text-muted text-lg",children:"search"}),(0,a.jsx)("input",{type:"text",placeholder:w("searchProvidersModels"),value:f,onChange:e=>j(e.target.value),className:"w-full pl-10 pr-3 py-2 bg-bg-base border border-border rounded-lg focus:outline-none focus:border-primary text-sm"})]}),h&&(0,a.jsxs)("button",{onClick:()=>g(null),className:"px-3 py-2 text-xs bg-primary/10 text-primary border border-primary/20 rounded-lg hover:bg-primary/20 transition-colors flex items-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"}),h.toUpperCase()," — ",w("showAll")]})]}),(0,a.jsx)("div",{className:"flex flex-wrap gap-1.5",children:k.map(e=>(0,a.jsxs)("button",{onClick:()=>D(e.alias),className:`px-2.5 py-1 rounded-md text-xs font-medium transition-all ${h===e.alias?"bg-primary text-white shadow-sm":v.has(e.alias)?"bg-yellow-500/15 text-yellow-400 border border-yellow-500/30":"bg-bg-subtle text-text-muted hover:bg-bg-hover border border-transparent"}`,children:[e.alias.toUpperCase()," ",(0,a.jsxs)("span",{className:"opacity-60",children:["(",e.modelCount,")"]})]},e.alias))}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[_.map(e=>(0,a.jsx)(p,{provider:e,pricingData:s[e.alias]||{},isExpanded:b.has(e.alias),isEdited:v.has(e.alias),onToggle:()=>U(e.alias),onPricingChange:(t,s,a)=>T(e.alias,t,s,a),onSave:()=>P(e.alias),onReset:()=>$(e.alias),saving:c},e.alias)),0===_.length&&(0,a.jsx)("div",{className:"text-center py-12 text-text-muted",children:w("noProvidersMatch")})]}),(0,a.jsxs)(i.Zp,{className:"p-4 mt-2",children:[(0,a.jsxs)("h3",{className:"text-sm font-semibold mb-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm align-middle mr-1",children:"info"}),w("howPricingWorks")]}),(0,a.jsxs)("div",{className:"text-xs text-text-muted space-y-1",children:[(0,a.jsxs)("p",{children:[w("pricingDescInput")," • ",w("pricingDescOutput")," • ",w("pricingDescCached")," •"," ",w("pricingDescReasoning")," • ",w("pricingDescCacheWrite")]}),(0,a.jsx)("p",{children:w("pricingDescFormula")})]})]})]})}function p({provider:e,pricingData:t,isExpanded:s,isEdited:l,onToggle:i,onPricingChange:n,onSave:d,onReset:o,saving:c}){let u=(0,r.c)("settings"),p=(0,r.c)(),g=Object.keys(t).length,b="oauth"===e.authType?p("providers.oauthLabel"):"apikey"===e.authType?p("providers.apiKeyLabel"):e.authType;return(0,a.jsxs)("div",{className:`border rounded-lg overflow-hidden transition-colors ${l?"border-yellow-500/40 bg-yellow-500/5":"border-border"}`,children:[(0,a.jsxs)("button",{onClick:i,className:"w-full flex items-center justify-between px-4 py-3 hover:bg-bg-hover/50 transition-colors text-left",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-lg transition-transform ${s?"rotate-90":""}`,children:"chevron_right"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"font-semibold text-sm",children:e.id.charAt(0).toUpperCase()+e.id.slice(1)}),(0,a.jsxs)("span",{className:"text-text-muted text-xs ml-2",children:["(",e.alias.toUpperCase(),")"]})]}),(0,a.jsx)("span",{className:"px-1.5 py-0.5 bg-bg-subtle text-text-muted text-[10px] rounded uppercase font-semibold",children:b}),(0,a.jsx)("span",{className:"px-1.5 py-0.5 bg-bg-subtle text-text-muted text-[10px] rounded uppercase font-semibold",children:e.format})]}),(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[l&&(0,a.jsx)("span",{className:"text-yellow-500 text-xs font-medium",children:u("unsaved")}),(0,a.jsxs)("span",{className:"text-text-muted text-xs",children:[g,"/",e.modelCount," ",u("withPricing")]}),(0,a.jsx)("div",{className:"w-16 h-1.5 bg-bg-subtle rounded-full overflow-hidden",children:(0,a.jsx)("div",{className:"h-full bg-primary rounded-full transition-all",style:{width:`${e.modelCount>0?Math.round(g/e.modelCount*100):0}%`}})})]})]}),s&&(0,a.jsxs)("div",{className:"border-t border-border",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between px-4 py-2 bg-bg-subtle/50",children:[(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:[e.modelCount," ",u("models")," • ",g," ",u("withPricing")]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("button",{onClick:e=>{e.stopPropagation(),o()},className:"px-2.5 py-1 text-[11px] text-red-400 hover:bg-red-500/10 rounded border border-red-500/20 transition-colors",children:u("resetDefaults")}),(0,a.jsx)("button",{onClick:e=>{e.stopPropagation(),d()},disabled:c||!l,className:"px-2.5 py-1 text-[11px] bg-primary text-white rounded hover:bg-primary/90 transition-colors disabled:opacity-40",children:c?u("saving"):u("saveProvider")})]})]}),(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full text-sm",children:[(0,a.jsx)("thead",{className:"text-[11px] text-text-muted uppercase bg-bg-subtle/30",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"px-4 py-2 text-left font-semibold",children:u("model")}),m.map(e=>(0,a.jsx)("th",{className:"px-2 py-2 text-right font-semibold w-24",children:u(x[e])},e))]})}),(0,a.jsx)("tbody",{className:"divide-y divide-border/50",children:e.models.map(e=>(0,a.jsx)(h,{model:e,pricing:t[e.id],onPricingChange:(t,s)=>n(e.id,t,s)},e.id))})]})})]})]})}function h({model:e,pricing:t,onPricingChange:s}){let l=(0,r.c)("settings"),i=t&&Object.values(t).some(e=>e>0);return(0,a.jsxs)("tr",{className:"hover:bg-bg-hover/30 group",children:[(0,a.jsx)("td",{className:"px-4 py-1.5",children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:`w-1.5 h-1.5 rounded-full ${i?"bg-success":"bg-text-muted/30"}`}),(0,a.jsx)("span",{className:"font-medium text-xs",children:e.name}),e.custom&&(0,a.jsx)("span",{className:"px-1 py-0.5 text-[8px] font-bold bg-blue-500/15 text-blue-400 border border-blue-500/20 rounded uppercase",children:l("custom")}),(0,a.jsx)("span",{className:"text-text-muted text-[10px] opacity-0 group-hover:opacity-100 transition-opacity",children:e.id})]})}),m.map(e=>(0,a.jsx)("td",{className:"px-2 py-1.5",children:(0,a.jsx)("input",{type:"number",step:"0.01",min:"0",value:t?.[e]||0,onChange:t=>s(e,t.target.value),className:"w-full px-2 py-1 text-right text-xs bg-transparent border border-transparent hover:border-border focus:border-primary focus:bg-bg-base rounded transition-colors outline-none tabular-nums"})},e))]})}function g(){let[e,t]=(0,l.useState)("budget"),s=(0,r.c)("costs"),n=(0,r.c)("settings");return(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsx)(i.Iz,{options:[{value:"budget",label:s("budget")},{value:"pricing",label:n("pricing")}],value:e,onChange:t}),"budget"===e&&(0,a.jsx)(c,{}),"pricing"===e&&(0,a.jsx)(u,{})]})}}},e=>{e.O(0,[3418,8500,9751,8055,1149,5846,993,8441,3794,7358],()=>e(e.s=14031)),_N_E=e.O()}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3700],{40851:(e,t,s)=>{Promise.resolve().then(s.bind(s,70595))},70595:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>g});var a=s(95155),l=s(12115),i=s(40993),r=s(50910),n=s(33418),d=s(67671);function o({value:e,max:t,warningAt:s=.8,formatCurrency:l}){let i=t>0?Math.min(e/t*100,100):0,r=t>0?e/t:0;return(0,a.jsxs)("div",{className:"w-full",children:[(0,a.jsxs)("div",{className:"flex justify-between text-xs mb-1",children:[(0,a.jsx)("span",{className:"text-text-muted",children:l(e)}),(0,a.jsx)("span",{className:"text-text-muted",children:l(t)})]}),(0,a.jsx)("div",{className:"w-full h-2 rounded-full bg-surface/50 overflow-hidden",children:(0,a.jsx)("div",{className:"h-full rounded-full transition-all duration-500",style:{width:`${i}%`,backgroundColor:r>=1?"#ef4444":r>=s?"#f59e0b":"#22c55e"}})})]})}function c(){let e=(0,r.c)("usage"),t=(0,n.Ym)(),[s,c]=(0,l.useState)([]),[m,x]=(0,l.useState)(null),[u,p]=(0,l.useState)(null),[h,g]=(0,l.useState)(!0),[b,y]=(0,l.useState)(!1),[f,j]=(0,l.useState)({dailyLimitUsd:"",monthlyLimitUsd:"",warningThreshold:"80"}),v=(0,d.i)(),N=e=>new Intl.NumberFormat(t,{style:"currency",currency:"USD",minimumFractionDigits:2,maximumFractionDigits:2}).format(Number(e||0));(0,l.useEffect)(()=>{fetch("/api/keys").then(e=>e.json()).then(e=>{let t=Array.isArray(e)?e:e.keys||[];c(t),t.length>0&&x(t[0].id),g(!1)}).catch(()=>g(!1))},[]);let w=(0,l.useCallback)(async()=>{if(m)try{let e=await fetch(`/api/usage/budget?apiKeyId=${m}`);if(e.ok){let t=await e.json();p(t),t.dailyLimitUsd&&j(e=>({...e,dailyLimitUsd:String(t.dailyLimitUsd)})),t.monthlyLimitUsd&&j(e=>({...e,monthlyLimitUsd:String(t.monthlyLimitUsd)})),t.warningThreshold&&j(e=>({...e,warningThreshold:String(t.warningThreshold)}))}}catch{}},[m]);(0,l.useEffect)(()=>{w()},[w]);let C=async()=>{y(!0);try{(await fetch("/api/usage/budget",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiKeyId:m,dailyLimitUsd:f.dailyLimitUsd?parseFloat(f.dailyLimitUsd):null,monthlyLimitUsd:f.monthlyLimitUsd?parseFloat(f.monthlyLimitUsd):null,warningThreshold:parseInt(f.warningThreshold)||80})})).ok?(v.success(e("budgetSaved")),await w()):v.error(e("budgetSaveFailed"))}catch{v.error(e("budgetSaveFailed"))}finally{y(!1)}};if(h)return(0,a.jsxs)("div",{className:"flex items-center gap-2 text-text-muted p-8 animate-pulse",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]","aria-hidden":"true",children:"account_balance_wallet"}),e("loadingBudgetData")]});if(0===s.length)return(0,a.jsx)(i.pp,{icon:"vpn_key",title:e("noApiKeysTitle"),description:e("noApiKeysDescription")});let k=u?.dailyLimitUsd||parseFloat(f.dailyLimitUsd)||0,L=u?.monthlyLimitUsd||parseFloat(f.monthlyLimitUsd)||0,S=u?.totalCostToday||0,U=u?.totalCostMonth||0,T=(parseInt(f.warningThreshold)||80)/100;return(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsxs)(i.Zp,{className:"p-6",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-emerald-500/10 text-emerald-500",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]","aria-hidden":"true",children:"account_balance_wallet"})}),(0,a.jsx)("h3",{className:"text-lg font-semibold",children:e("budgetManagement")})]}),(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsx)("label",{className:"text-sm text-text-muted mb-1 block",children:e("apiKey")}),(0,a.jsx)("select",{value:m||"",onChange:e=>x(e.target.value),className:"w-full md:w-auto px-3 py-2 rounded-lg border border-border/50 bg-surface/30 text-text-main text-sm focus:outline-none focus:ring-1 focus:ring-primary",children:s.map(e=>(0,a.jsxs)("option",{value:e.id,children:[e.name||e.id," ",e.provider?`(${e.provider})`:""]},e.id))})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mb-6",children:[(0,a.jsxs)("div",{className:"p-4 rounded-lg border border-border/30 bg-surface/20",children:[(0,a.jsx)("p",{className:"text-sm text-text-muted mb-2",children:e("todaysSpend")}),(0,a.jsx)("p",{className:"text-2xl font-bold text-text-main",children:N(S)}),k>0&&(0,a.jsx)(o,{value:S,max:k,warningAt:T,formatCurrency:N})]}),(0,a.jsxs)("div",{className:"p-4 rounded-lg border border-border/30 bg-surface/20",children:[(0,a.jsx)("p",{className:"text-sm text-text-muted mb-2",children:e("thisMonth")}),(0,a.jsx)("p",{className:"text-2xl font-bold text-text-main",children:N(U)}),L>0&&(0,a.jsx)(o,{value:U,max:L,warningAt:T,formatCurrency:N})]})]}),(0,a.jsxs)("div",{className:"border-t border-border/30 pt-4",children:[(0,a.jsx)("p",{className:"text-sm font-medium mb-3",children:e("setLimits")}),(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4 mb-4",children:[(0,a.jsx)(i.pd,{label:e("dailyLimitUsd"),type:"number",step:"0.01",min:"0",placeholder:e("dailyLimitPlaceholder"),value:f.dailyLimitUsd,onChange:e=>j({...f,dailyLimitUsd:e.target.value})}),(0,a.jsx)(i.pd,{label:e("monthlyLimitUsd"),type:"number",step:"0.01",min:"0",placeholder:e("monthlyLimitPlaceholder"),value:f.monthlyLimitUsd,onChange:e=>j({...f,monthlyLimitUsd:e.target.value})}),(0,a.jsx)(i.pd,{label:e("warningThresholdPercent"),type:"number",min:"1",max:"100",placeholder:e("warningThresholdPlaceholder"),value:f.warningThreshold,onChange:e=>j({...f,warningThreshold:e.target.value})})]}),(0,a.jsx)(i.$n,{variant:"primary",onClick:C,loading:b,children:e("saveLimits")})]})]}),u?.budgetCheck&&(0,a.jsx)(i.Zp,{className:"p-4",children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]","aria-hidden":"true",style:{color:u.budgetCheck.allowed?"#22c55e":"#ef4444"},children:u.budgetCheck.allowed?"check_circle":"block"}),(0,a.jsx)("span",{className:"text-sm",children:u.budgetCheck.allowed?e("budgetOk",{remaining:N(u.budgetCheck.remaining||0)}):e("budgetExceeded")})]})})]})}let m=["input","output","cached","reasoning","cache_creation"],x={input:"input",output:"output",cached:"cached",reasoning:"reasoning",cache_creation:"cacheCreation"};function u(){let[e,t]=(0,l.useState)({}),[s,n]=(0,l.useState)({}),[d,o]=(0,l.useState)(!0),[c,m]=(0,l.useState)(!1),[x,u]=(0,l.useState)(""),[h,g]=(0,l.useState)(null),[b,y]=(0,l.useState)(new Set),[f,j]=(0,l.useState)(""),[v,N]=(0,l.useState)(new Set),w=(0,r.c)("settings");(0,l.useEffect)(()=>{C()},[]);let C=async()=>{o(!0);try{let[e,s]=await Promise.all([fetch("/api/pricing/models"),fetch("/api/pricing")]);e.ok&&t(await e.json()),s.ok&&n(await s.json())}catch(e){console.error("Failed to load pricing data:",e)}finally{o(!1)}},k=(0,l.useMemo)(()=>Object.entries(e).map(([e,t])=>({alias:e,...t,pricedModels:s[e]?Object.keys(s[e]).length:0})).sort((e,t)=>t.modelCount-e.modelCount),[e,s]),L=(0,l.useMemo)(()=>{if(!f.trim())return k;let e=f.toLowerCase();return k.filter(t=>t.alias.toLowerCase().includes(e)||t.id.toLowerCase().includes(e)||t.models.some(t=>t.id.toLowerCase().includes(e)||t.name.toLowerCase().includes(e)))},[k,f]),S=(0,l.useMemo)(()=>{let e=k.reduce((e,t)=>e+t.modelCount,0),t=Object.values(s).reduce((e,t)=>e+Object.keys(t).length,0);return{providers:k.length,totalModels:e,pricedCount:t}},[k,s]),U=(0,l.useCallback)(e=>{y(t=>{let s=new Set(t);return s.has(e)?s.delete(e):s.add(e),s})},[]),T=(0,l.useCallback)((e,t,s,a)=>{let l=parseFloat(a);isNaN(l)||l<0||(n(a=>{let i={...a};return i[e]||(i[e]={}),i[e][t]||(i[e][t]={input:0,output:0,cached:0,reasoning:0,cache_creation:0}),i[e][t]={...i[e][t],[s]:l},i}),N(t=>new Set(t).add(e)))},[]),P=(0,l.useCallback)(async e=>{m(!0),u("");try{let t=s[e]||{},a=await fetch("/api/pricing",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({[e]:t})});if(a.ok)u(`✅ ${e.toUpperCase()} ${w("saved")}`),N(t=>{let s=new Set(t);return s.delete(e),s}),setTimeout(()=>u(""),3e3);else{let e=await a.json();u(`❌ ${w("errorOccurred")}: ${e.error}`)}}catch(e){u(`❌ ${w("saveFailed")}: ${e.message}`)}finally{m(!1)}},[s,w]),$=(0,l.useCallback)(async e=>{if(confirm(w("resetPricingConfirm",{provider:e.toUpperCase()})))try{let t=await fetch(`/api/pricing?provider=${e}`,{method:"DELETE"});if(t.ok){let s=await t.json();n(s),u(`🔄 ${e.toUpperCase()} ${w("resetDefaults")}`),N(t=>{let s=new Set(t);return s.delete(e),s}),setTimeout(()=>u(""),3e3)}}catch(e){u(`❌ ${w("resetFailed")}: ${e.message}`)}},[w]),D=(0,l.useCallback)(e=>{g(t=>t===e?null:e)},[]),_=(0,l.useMemo)(()=>h?L.filter(e=>e.alias===h):L,[L,h]);return d?(0,a.jsx)("div",{className:"flex items-center justify-center py-16",children:(0,a.jsx)("div",{className:"text-text-muted animate-pulse",children:w("loadingPricing")})}):(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start justify-between flex-wrap gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-xl font-bold",children:w("modelPricing")}),(0,a.jsx)("p",{className:"text-text-muted text-sm mt-1",children:w("modelPricingDesc")})]}),(0,a.jsxs)("div",{className:"flex gap-3 text-sm",children:[(0,a.jsxs)("div",{className:"bg-bg-subtle rounded-lg px-3 py-2 text-center",children:[(0,a.jsx)("div",{className:"text-text-muted text-xs font-semibold",children:w("providers")}),(0,a.jsx)("div",{className:"text-lg font-bold",children:S.providers})]}),(0,a.jsxs)("div",{className:"bg-bg-subtle rounded-lg px-3 py-2 text-center",children:[(0,a.jsx)("div",{className:"text-text-muted text-xs font-semibold",children:w("registry")}),(0,a.jsx)("div",{className:"text-lg font-bold",children:S.totalModels})]}),(0,a.jsxs)("div",{className:"bg-bg-subtle rounded-lg px-3 py-2 text-center",children:[(0,a.jsx)("div",{className:"text-text-muted text-xs font-semibold",children:w("priced")}),(0,a.jsx)("div",{className:"text-lg font-bold text-success",children:S.pricedCount})]})]})]}),x&&(0,a.jsx)("div",{className:"px-3 py-2 rounded-lg bg-bg-subtle border border-border text-sm",children:x}),(0,a.jsxs)("div",{className:"flex gap-3 items-center flex-wrap",children:[(0,a.jsxs)("div",{className:"relative flex-1 min-w-[200px]",children:[(0,a.jsx)("span",{className:"material-symbols-outlined absolute left-3 top-1/2 -translate-y-1/2 text-text-muted text-lg",children:"search"}),(0,a.jsx)("input",{type:"text",placeholder:w("searchProvidersModels"),value:f,onChange:e=>j(e.target.value),className:"w-full pl-10 pr-3 py-2 bg-bg-base border border-border rounded-lg focus:outline-none focus:border-primary text-sm"})]}),h&&(0,a.jsxs)("button",{onClick:()=>g(null),className:"px-3 py-2 text-xs bg-primary/10 text-primary border border-primary/20 rounded-lg hover:bg-primary/20 transition-colors flex items-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"}),h.toUpperCase()," — ",w("showAll")]})]}),(0,a.jsx)("div",{className:"flex flex-wrap gap-1.5",children:k.map(e=>(0,a.jsxs)("button",{onClick:()=>D(e.alias),className:`px-2.5 py-1 rounded-md text-xs font-medium transition-all ${h===e.alias?"bg-primary text-white shadow-sm":v.has(e.alias)?"bg-yellow-500/15 text-yellow-400 border border-yellow-500/30":"bg-bg-subtle text-text-muted hover:bg-bg-hover border border-transparent"}`,children:[e.alias.toUpperCase()," ",(0,a.jsxs)("span",{className:"opacity-60",children:["(",e.modelCount,")"]})]},e.alias))}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[_.map(e=>(0,a.jsx)(p,{provider:e,pricingData:s[e.alias]||{},isExpanded:b.has(e.alias),isEdited:v.has(e.alias),onToggle:()=>U(e.alias),onPricingChange:(t,s,a)=>T(e.alias,t,s,a),onSave:()=>P(e.alias),onReset:()=>$(e.alias),saving:c},e.alias)),0===_.length&&(0,a.jsx)("div",{className:"text-center py-12 text-text-muted",children:w("noProvidersMatch")})]}),(0,a.jsxs)(i.Zp,{className:"p-4 mt-2",children:[(0,a.jsxs)("h3",{className:"text-sm font-semibold mb-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm align-middle mr-1",children:"info"}),w("howPricingWorks")]}),(0,a.jsxs)("div",{className:"text-xs text-text-muted space-y-1",children:[(0,a.jsxs)("p",{children:[w("pricingDescInput")," • ",w("pricingDescOutput")," • ",w("pricingDescCached")," •"," ",w("pricingDescReasoning")," • ",w("pricingDescCacheWrite")]}),(0,a.jsx)("p",{children:w("pricingDescFormula")})]})]})]})}function p({provider:e,pricingData:t,isExpanded:s,isEdited:l,onToggle:i,onPricingChange:n,onSave:d,onReset:o,saving:c}){let u=(0,r.c)("settings"),p=(0,r.c)(),g=Object.keys(t).length,b="oauth"===e.authType?p("providers.oauthLabel"):"apikey"===e.authType?p("providers.apiKeyLabel"):e.authType;return(0,a.jsxs)("div",{className:`border rounded-lg overflow-hidden transition-colors ${l?"border-yellow-500/40 bg-yellow-500/5":"border-border"}`,children:[(0,a.jsxs)("button",{onClick:i,className:"w-full flex items-center justify-between px-4 py-3 hover:bg-bg-hover/50 transition-colors text-left",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-lg transition-transform ${s?"rotate-90":""}`,children:"chevron_right"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"font-semibold text-sm",children:e.id.charAt(0).toUpperCase()+e.id.slice(1)}),(0,a.jsxs)("span",{className:"text-text-muted text-xs ml-2",children:["(",e.alias.toUpperCase(),")"]})]}),(0,a.jsx)("span",{className:"px-1.5 py-0.5 bg-bg-subtle text-text-muted text-[10px] rounded uppercase font-semibold",children:b}),(0,a.jsx)("span",{className:"px-1.5 py-0.5 bg-bg-subtle text-text-muted text-[10px] rounded uppercase font-semibold",children:e.format})]}),(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[l&&(0,a.jsx)("span",{className:"text-yellow-500 text-xs font-medium",children:u("unsaved")}),(0,a.jsxs)("span",{className:"text-text-muted text-xs",children:[g,"/",e.modelCount," ",u("withPricing")]}),(0,a.jsx)("div",{className:"w-16 h-1.5 bg-bg-subtle rounded-full overflow-hidden",children:(0,a.jsx)("div",{className:"h-full bg-primary rounded-full transition-all",style:{width:`${e.modelCount>0?Math.round(g/e.modelCount*100):0}%`}})})]})]}),s&&(0,a.jsxs)("div",{className:"border-t border-border",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between px-4 py-2 bg-bg-subtle/50",children:[(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:[e.modelCount," ",u("models")," • ",g," ",u("withPricing")]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("button",{onClick:e=>{e.stopPropagation(),o()},className:"px-2.5 py-1 text-[11px] text-red-400 hover:bg-red-500/10 rounded border border-red-500/20 transition-colors",children:u("resetDefaults")}),(0,a.jsx)("button",{onClick:e=>{e.stopPropagation(),d()},disabled:c||!l,className:"px-2.5 py-1 text-[11px] bg-primary text-white rounded hover:bg-primary/90 transition-colors disabled:opacity-40",children:c?u("saving"):u("saveProvider")})]})]}),(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full text-sm",children:[(0,a.jsx)("thead",{className:"text-[11px] text-text-muted uppercase bg-bg-subtle/30",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"px-4 py-2 text-left font-semibold",children:u("model")}),m.map(e=>(0,a.jsx)("th",{className:"px-2 py-2 text-right font-semibold w-24",children:u(x[e])},e))]})}),(0,a.jsx)("tbody",{className:"divide-y divide-border/50",children:e.models.map(e=>(0,a.jsx)(h,{model:e,pricing:t[e.id],onPricingChange:(t,s)=>n(e.id,t,s)},e.id))})]})})]})]})}function h({model:e,pricing:t,onPricingChange:s}){let l=(0,r.c)("settings"),i=t&&Object.values(t).some(e=>e>0);return(0,a.jsxs)("tr",{className:"hover:bg-bg-hover/30 group",children:[(0,a.jsx)("td",{className:"px-4 py-1.5",children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:`w-1.5 h-1.5 rounded-full ${i?"bg-success":"bg-text-muted/30"}`}),(0,a.jsx)("span",{className:"font-medium text-xs",children:e.name}),e.custom&&(0,a.jsx)("span",{className:"px-1 py-0.5 text-[8px] font-bold bg-blue-500/15 text-blue-400 border border-blue-500/20 rounded uppercase",children:l("custom")}),(0,a.jsx)("span",{className:"text-text-muted text-[10px] opacity-0 group-hover:opacity-100 transition-opacity",children:e.id})]})}),m.map(e=>(0,a.jsx)("td",{className:"px-2 py-1.5",children:(0,a.jsx)("input",{type:"number",step:"0.01",min:"0",value:t?.[e]||0,onChange:t=>s(e,t.target.value),className:"w-full px-2 py-1 text-right text-xs bg-transparent border border-transparent hover:border-border focus:border-primary focus:bg-bg-base rounded transition-colors outline-none tabular-nums"})},e))]})}function g(){let[e,t]=(0,l.useState)("budget"),s=(0,r.c)("costs"),n=(0,r.c)("settings");return(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsx)(i.Iz,{options:[{value:"budget",label:s("budget")},{value:"pricing",label:n("pricing")}],value:e,onChange:t}),"budget"===e&&(0,a.jsx)(c,{}),"pricing"===e&&(0,a.jsx)(u,{})]})}}},e=>{e.O(0,[3418,8500,9751,8055,1149,5846,993,8441,3794,7358],()=>e(e.s=40851)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6099],{33049:(e,s,t)=>{Promise.resolve().then(t.bind(t,40877))},40877:(e,s,t)=>{"use strict";t.d(s,{default:()=>x});var i=t(95155),r=t(12115),l=t(14051),a=t.n(l),n=t(40993),o=t(30949),d=t(20909),c=t(50910);let m=15e3;function x({machineId:e}){let s=(0,c.c)("endpoint"),t=(0,c.c)("common"),[l,a]=(0,r.useState)([]),[x,g]=(0,r.useState)(!0),[h,b]=(0,r.useState)([]),[f,y]=(0,r.useState)(null),[j,v]=(0,r.useState)(!1),[N,k]=(0,r.useState)(!1),[w,C]=(0,r.useState)(!1),[T,S]=(0,r.useState)(!1),[_,$]=(0,r.useState)(null),[E,R]=(0,r.useState)(""),[q,B]=(0,r.useState)(!1),[M,U]=(0,r.useState)(null),{copied:D,copy:O}=(0,o.C)();(0,r.useEffect)(()=>{I(),W(),P()},[]);let P=async()=>{try{let e=await fetch("/v1/models");if(e.ok){let s=await e.json();b(s.data||[])}}catch(e){console.log("Error fetching models:",e)}},A=(0,r.useMemo)(()=>{let e=h.filter(e=>!e.type&&!e.parent),s=h.filter(e=>"embedding"===e.type&&!e.parent),t=h.filter(e=>"image"===e.type&&!e.parent),i=h.filter(e=>"rerank"===e.type&&!e.parent),r=h.filter(e=>"audio"===e.type&&"transcription"===e.subtype&&!e.parent);return{chat:e,embeddings:s,images:t,rerank:i,audioTranscription:r,audioSpeech:h.filter(e=>"audio"===e.type&&"speech"===e.subtype&&!e.parent),moderation:h.filter(e=>"moderation"===e.type&&!e.parent)}},[h]);(0,r.useMemo)(()=>Object.entries(d.Q2).map(([e,s])=>{let t=l.filter(s=>s.provider===e),i=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;return{id:e,provider:s,total:t.length,connected:i,errors:r}}),[l]);let F=async(e,t=m)=>{let i=new AbortController,r=setTimeout(()=>i.abort(),t);try{let s=await fetch("/api/sync/cloud",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:e}),signal:i.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(r)}},W=async()=>{try{let e=await fetch("/api/settings");if(e.ok){let s=await e.json();v(s.cloudEnabled||!1)}}catch(e){console.log("Error loading cloud settings:",e)}},I=async()=>{try{let e=await fetch("/api/providers"),s=await e.json();e.ok&&a(s.connections||[])}catch(e){console.log("Error fetching data:",e)}finally{g(!1)}},z=e=>{e?k(!0):C(!0)};(0,r.useEffect)(()=>{if(_){let e=setTimeout(()=>$(null),5e3);return()=>clearTimeout(e)}},[_]);let Q=()=>{globalThis.dispatchEvent(new Event("cloud-status-changed"))},L=async()=>{S(!0),B(!1),R("syncing");try{let{ok:e,status:t,data:i}=await F("enable");if(e)R("verifying"),await new Promise(e=>setTimeout(e,600)),v(!0),R("done"),B(!0),S(!1),Q(),await new Promise(e=>setTimeout(e,1200)),k(!1),B(!1),i.verified?$({type:"success",message:s("cloudConnectedVerified")}):$({type:"warning",message:i.verifyError?s("connectedVerificationPendingWithError",{error:i.verifyError}):s("connectedVerificationPending")}),i.createdKey&&await I(),await W();else{let e=i.error||s("failedEnable");(502===t||408===t)&&(e=s("cloudWorkerUnreachable")),$({type:"error",message:e}),k(!1)}}catch(e){$({type:"error",message:e.message||s("connectionFailed")}),k(!1)}finally{S(!1),R("")}},V=async()=>{S(!0),R("syncing");try{await F("sync"),R("disabling");let{ok:e,data:t}=await F("disable");e?(v(!1),$({type:"success",message:s("cloudDisabledSuccess")}),C(!1),Q(),await W()):$({type:"error",message:t.error||s("failedDisable")})}catch(e){console.log("Error disabling cloud:",e),$({type:"error",message:s("failedDisable")})}finally{S(!1),R("")}},[G,Z]=(0,r.useState)("/v1");if((0,r.useEffect)(()=>{Z(`${window.location.origin}/v1`)},[]),x)return(0,i.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,i.jsx)(n.Qv,{}),(0,i.jsx)(n.Qv,{})]});let J=j?"https://cloud.omniroute.online/v1":G;return(0,i.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,i.jsxs)(n.Zp,{className:"",children:[(0,i.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,i.jsxs)("div",{children:[(0,i.jsx)("h2",{className:"text-lg font-semibold",children:s("title")}),(0,i.jsx)("p",{className:"text-sm text-text-muted",children:j?s("usingCloudProxy"):s("usingLocalServer")}),e&&(0,i.jsx)("p",{className:"text-xs text-text-muted mt-1",children:s("machineId",{id:e.slice(0,8)})})]}),(0,i.jsx)("div",{className:"flex items-center gap-2",children:j?(0,i.jsx)(n.$n,{size:"sm",variant:"secondary",icon:"cloud_off",onClick:()=>z(!1),disabled:T,className:"bg-red-500/10! text-red-500! hover:bg-red-500/20! border-red-500/30!",children:s("disableCloud")}):(0,i.jsx)(n.$n,{variant:"primary",icon:"cloud_upload",onClick:()=>z(!0),disabled:T,className:"bg-linear-to-r from-primary to-blue-500 hover:from-primary-hover hover:to-blue-600",children:s("enableCloud")})})]}),_&&(0,i.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"===_.type?"bg-green-500/10 border border-green-500/30 text-green-400":"warning"===_.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,i.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"success"===_.type?"check_circle":"warning"===_.type?"warning":"error"}),(0,i.jsx)("span",{className:"flex-1",children:_.message}),(0,i.jsx)("button",{onClick:()=>$(null),className:"p-0.5 hover:bg-white/10 rounded transition-colors",children:(0,i.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"close"})})]}),(0,i.jsxs)("div",{className:"flex gap-2 mb-3",children:[(0,i.jsx)(n.pd,{value:J,readOnly:!0,className:`flex-1 font-mono text-sm ${j?"animate-border-glow":""}`}),(0,i.jsx)(n.$n,{variant:"secondary",icon:"endpoint_url"===D?"check":"content_copy",onClick:()=>O(J,"endpoint_url"),children:t("endpoint_url"===D?"copied":"copy")})]})]}),(0,i.jsxs)(n.Zp,{children:[(0,i.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,i.jsxs)("div",{children:[(0,i.jsx)("h2",{className:"text-lg font-semibold",children:s("available")}),(0,i.jsx)("p",{className:"text-sm text-text-muted",children:s("modelsAcrossEndpoints",{models:Object.values(A).reduce((e,s)=>e+s.length,0),endpoints:[A.chat,A.embeddings,A.images,A.rerank,A.audioTranscription,A.audioSpeech,A.moderation].filter(e=>e.length>0).length+2})})]})}),(0,i.jsxs)("div",{className:"mb-6",children:[(0,i.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-sm text-primary",children:"hub"}),(0,i.jsx)("h3",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:s("categoryCore")||"Core APIs"}),(0,i.jsx)("div",{className:"flex-1 h-px bg-border/50"})]}),(0,i.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,i.jsx)(u,{icon:"chat",iconColor:"text-blue-500",iconBg:"bg-blue-500/10",title:s("chatCompletions"),path:"/v1/chat/completions",description:s("chatDesc"),models:A.chat,expanded:"chat"===f,onToggle:()=>y("chat"===f?null:"chat"),copy:O,copied:D,baseUrl:J}),(0,i.jsx)(u,{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:A.chat,expanded:"responses"===f,onToggle:()=>y("responses"===f?null:"responses"),copy:O,copied:D,baseUrl:J})]})]}),(0,i.jsxs)("div",{className:"mb-6",children:[(0,i.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-sm text-purple-400",children:"perm_media"}),(0,i.jsx)("h3",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:s("categoryMedia")||"Media & Multi-Modal"}),(0,i.jsx)("div",{className:"flex-1 h-px bg-border/50"})]}),(0,i.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,i.jsx)(u,{icon:"data_array",iconColor:"text-emerald-500",iconBg:"bg-emerald-500/10",title:s("embeddings"),path:"/v1/embeddings",description:s("embeddingsDesc"),models:A.embeddings,expanded:"embeddings"===f,onToggle:()=>y("embeddings"===f?null:"embeddings"),copy:O,copied:D,baseUrl:J}),(0,i.jsx)(u,{icon:"image",iconColor:"text-purple-500",iconBg:"bg-purple-500/10",title:s("imageGeneration"),path:"/v1/images/generations",description:s("imageDesc"),models:A.images,expanded:"images"===f,onToggle:()=>y("images"===f?null:"images"),copy:O,copied:D,baseUrl:J}),(0,i.jsx)(u,{icon:"mic",iconColor:"text-rose-500",iconBg:"bg-rose-500/10",title:s("audioTranscription"),path:"/v1/audio/transcriptions",description:s("audioTranscriptionDesc"),models:A.audioTranscription,expanded:"audioTranscription"===f,onToggle:()=>y("audioTranscription"===f?null:"audioTranscription"),copy:O,copied:D,baseUrl:J}),(0,i.jsx)(u,{icon:"record_voice_over",iconColor:"text-cyan-500",iconBg:"bg-cyan-500/10",title:s("textToSpeech"),path:"/v1/audio/speech",description:s("textToSpeechDesc"),models:A.audioSpeech,expanded:"audioSpeech"===f,onToggle:()=>y("audioSpeech"===f?null:"audioSpeech"),copy:O,copied:D,baseUrl:J})]})]}),(0,i.jsxs)("div",{children:[(0,i.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-sm text-amber-400",children:"build"}),(0,i.jsx)("h3",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:s("categoryUtility")||"Utility & Management"}),(0,i.jsx)("div",{className:"flex-1 h-px bg-border/50"})]}),(0,i.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,i.jsx)(u,{icon:"sort",iconColor:"text-amber-500",iconBg:"bg-amber-500/10",title:s("rerank"),path:"/v1/rerank",description:s("rerankDesc"),models:A.rerank,expanded:"rerank"===f,onToggle:()=>y("rerank"===f?null:"rerank"),copy:O,copied:D,baseUrl:J}),(0,i.jsx)(u,{icon:"shield",iconColor:"text-orange-500",iconBg:"bg-orange-500/10",title:s("moderations"),path:"/v1/moderations",description:s("moderationsDesc"),models:A.moderation,expanded:"moderation"===f,onToggle:()=>y("moderation"===f?null:"moderation"),copy:O,copied:D,baseUrl:J}),(0,i.jsx)(u,{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"===f,onToggle:()=>y("models"===f?null:"models"),copy:O,copied:D,baseUrl:J})]})]})]}),(0,i.jsx)(n.aF,{isOpen:N,title:s("enableCloudTitle"),onClose:()=>k(!1),children:(0,i.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,i.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,i.jsx)("p",{className:"text-sm text-blue-800 dark:text-blue-200 font-medium mb-2",children:s("whatYouGet")}),(0,i.jsxs)("ul",{className:"text-sm text-blue-700 dark:text-blue-300 space-y-1",children:[(0,i.jsxs)("li",{children:["• ",s("cloudBenefitAccess")]}),(0,i.jsxs)("li",{children:["• ",s("cloudBenefitShare")]}),(0,i.jsxs)("li",{children:["• ",s("cloudBenefitPorts")]}),(0,i.jsxs)("li",{children:["• ",s("cloudBenefitEdge")]})]})]}),(0,i.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,i.jsx)("p",{className:"text-sm text-yellow-800 dark:text-yellow-200 font-medium mb-1",children:t("note")}),(0,i.jsxs)("ul",{className:"text-sm text-yellow-700 dark:text-yellow-300 space-y-1",children:[(0,i.jsxs)("li",{children:["• ",s("cloudSessionNote")]}),(0,i.jsxs)("li",{children:["• ",s("cloudUnstableNote")]})]})]}),(T||q)&&(0,i.jsxs)("div",{className:`flex items-center gap-3 p-3 rounded-lg border transition-all duration-300 ${q?"bg-green-500/10 border-green-500/30":"bg-primary/10 border-primary/30"}`,children:[q?(0,i.jsx)("span",{className:"material-symbols-outlined text-green-500 text-xl",children:"check_circle"}):(0,i.jsx)("span",{className:"material-symbols-outlined animate-spin text-primary",children:"progress_activity"}),(0,i.jsx)("div",{className:"flex-1",children:(0,i.jsxs)("p",{className:`text-sm font-medium ${q?"text-green-500":"text-primary"}`,children:[q&&s("cloudConnected"),!q&&"syncing"===E&&s("connectingToCloud"),!q&&"verifying"===E&&s("verifyingConnection")]})})]}),(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)(n.$n,{onClick:L,fullWidth:!0,disabled:T||q,children:T?(0,i.jsxs)("span",{className:"flex items-center gap-2",children:[(0,i.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),"syncing"===E?s("connecting"):s("verifying")]}):q?(0,i.jsxs)("span",{className:"flex items-center gap-2",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-sm",children:"check"}),s("connected")]}):s("enableCloud")}),(0,i.jsx)(n.$n,{onClick:()=>k(!1),variant:"ghost",fullWidth:!0,disabled:T||q,children:t("cancel")})]})]})}),(0,i.jsx)(n.aF,{isOpen:w,title:s("disableCloudTitle"),onClose:()=>!T&&C(!1),children:(0,i.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,i.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,i.jsxs)("div",{className:"flex items-start gap-3",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-red-600 dark:text-red-400",children:"warning"}),(0,i.jsxs)("div",{children:[(0,i.jsx)("p",{className:"text-sm text-red-800 dark:text-red-200 font-medium mb-1",children:t("warning")}),(0,i.jsx)("p",{className:"text-sm text-red-700 dark:text-red-300",children:s("disableWarning")})]})]})}),T&&(0,i.jsxs)("div",{className:"flex items-center gap-3 p-3 bg-primary/10 border border-primary/30 rounded-lg",children:[(0,i.jsx)("span",{className:"material-symbols-outlined animate-spin text-primary",children:"progress_activity"}),(0,i.jsx)("div",{className:"flex-1",children:(0,i.jsxs)("p",{className:"text-sm font-medium text-primary",children:["syncing"===E&&s("syncingData"),"disabling"===E&&s("disablingCloud")]})})]}),(0,i.jsx)("p",{className:"text-sm text-text-muted",children:s("disableConfirm")}),(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)(n.$n,{onClick:V,fullWidth:!0,disabled:T,className:"bg-red-500! hover:bg-red-600! text-white!",children:T?(0,i.jsxs)("span",{className:"flex items-center gap-2",children:[(0,i.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),"syncing"===E?s("syncing"):s("disabling")]}):s("disableCloud")}),(0,i.jsx)(n.$n,{onClick:()=>C(!1),variant:"ghost",fullWidth:!0,disabled:T,children:t("cancel")})]})]})}),M&&(0,i.jsx)(p,{provider:M,models:h,copy:O,copied:D,onClose:()=>U(null)})]})}function p({provider:e,models:s,copy:t,copied:l,onClose:a}){let o=(0,c.c)("endpoint"),d=(0,c.c)("common"),m=e.provider.alias||e.id,x=(0,r.useMemo)(()=>s.filter(s=>!s.parent&&(s.owned_by===m||s.owned_by===e.id)),[s,m,e.id]),p=x.filter(e=>!e.type),u=x.filter(e=>"embedding"===e.type),g=x.filter(e=>"image"===e.type),h=(e,s,r)=>0===r.length?null:(0,i.jsxs)("div",{className:"mb-4",children:[(0,i.jsxs)("h4",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider mb-2 flex items-center gap-1.5",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-sm",children:s}),e," (",r.length,")"]}),(0,i.jsx)("div",{className:"flex flex-col gap-1",children:r.map(e=>{let s=`modal-${e.id}`;return(0,i.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg hover:bg-surface/60 group",children:[(0,i.jsx)("code",{className:"text-sm font-mono flex-1 truncate",children:e.id}),e.custom&&(0,i.jsx)("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-primary/10 text-primary",children:o("custom")}),(0,i.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:d("copy"),children:(0,i.jsx)("span",{className:"material-symbols-outlined text-sm",children:l===s?"check":"content_copy"})})]},e.id)})})]});return(0,i.jsx)(n.aF,{isOpen:!0,onClose:a,title:o("providerModelsTitle",{provider:e.provider.name}),children:(0,i.jsx)("div",{className:"max-h-[60vh] overflow-y-auto",children:0===x.length?(0,i.jsx)("p",{className:"text-sm text-text-muted py-4 text-center",children:o("noModelsForProvider")}):(0,i.jsxs)(i.Fragment,{children:[h(o("chat"),"chat",p),h(o("embedding"),"data_array",u),h(o("image"),"image",g)]})})})}function u({icon:e,iconColor:s,iconBg:t,title:l,path:a,description:n,models:o,expanded:m,onToggle:x,copy:p,copied:u,baseUrl:g}){let h=(0,c.c)("endpoint"),b=(0,r.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=>d.Q2[e]||(0,d.zt)(e),y=`endpoint_${a}`;return(0,i.jsxs)("div",{className:"border border-border rounded-lg overflow-hidden",children:[(0,i.jsxs)("button",{onClick:x,className:"w-full flex items-center gap-3 p-4 hover:bg-surface/50 transition-colors text-left",children:[(0,i.jsx)("div",{className:`flex items-center justify-center size-10 rounded-lg ${t} shrink-0`,children:(0,i.jsx)("span",{className:`material-symbols-outlined text-xl ${s}`,children:e})}),(0,i.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,i.jsxs)("div",{className:"flex items-center gap-2",children:[(0,i.jsx)("span",{className:"font-semibold text-sm",children:l}),(0,i.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,i.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:n})]}),(0,i.jsx)("span",{className:`material-symbols-outlined text-text-muted text-lg transition-transform ${m?"rotate-180":""}`,children:"expand_more"})]}),m&&(0,i.jsxs)("div",{className:"border-t border-border px-4 pb-4",children:[(0,i.jsxs)("div",{className:"flex items-center gap-2 mt-3 mb-3",children:[(0,i.jsxs)("code",{className:"flex-1 text-xs font-mono text-text-muted bg-surface/80 px-3 py-1.5 rounded-lg truncate",children:[g.replace(/\/v1$/,""),a]}),(0,i.jsx)("button",{onClick:()=>p(`${g.replace(/\/v1$/,"")}${a}`,y),className:"p-1.5 hover:bg-surface rounded-lg text-text-muted hover:text-primary transition-colors shrink-0",children:(0,i.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:u===y?"check":"content_copy"})})]}),(0,i.jsx)("div",{className:"flex flex-col gap-2",children:b.map(([e,s])=>(0,i.jsxs)("div",{children:[(0,i.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,i.jsx)("div",{className:"size-2.5 rounded-full shrink-0",style:{backgroundColor:f(e)?.color||"#888"}}),(0,i.jsx)("span",{className:"text-xs font-semibold text-text-main",children:f(e)?.name||e}),(0,i.jsxs)("span",{className:"text-xs text-text-muted",children:["(",s.length,")"]})]}),(0,i.jsx)("div",{className:"ml-5 flex flex-wrap gap-1.5",children:s.map(e=>(0,i.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))})]})]})}x.propTypes={machineId:a().string.isRequired},p.propTypes={provider:a().object.isRequired,models:a().array.isRequired,copy:a().func.isRequired,copied:a().string,onClose:a().func.isRequired},u.propTypes={icon:a().string.isRequired,iconColor:a().string.isRequired,iconBg:a().string.isRequired,title:a().string.isRequired,path:a().string.isRequired,description:a().string.isRequired,models:a().array.isRequired,expanded:a().bool.isRequired,onToggle:a().func.isRequired,copy:a().func.isRequired,copied:a().string,baseUrl:a().string.isRequired}}},e=>{e.O(0,[3418,8500,9751,8055,1149,5846,993,8441,3794,7358],()=>e(e.s=33049)),_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:()=>d});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 x={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 d(){var e;let t,s,d,m,o,u,h=(0,i.c)("health"),p=(0,i.c)("common"),j=(0,i.c)("providers"),[b,g]=(0,l.useState)(null),[N,f]=(0,l.useState)(null),[y,v]=(0,l.useState)(null),[w,$]=(0,l.useState)(null),[C,k]=(0,l.useState)(null),[S,E]=(0,l.useState)(null),[D,L]=(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();g(t),f(null),v(new Date)}catch(e){f(e.message)}},[]),_=(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(),_();let e=setInterval(()=>{O(),_()},15e3);return()=>clearInterval(e)},[O,_]);let z=async()=>{if(confirm(h("resetConfirm"))){L(!0);try{let e=await fetch("/api/monitoring/health",{method:"DELETE"});if(!e.ok)throw Error(`HTTP ${e.status}`);await O(),await _()}catch(e){console.error("Failed to reset health:",e)}finally{L(!1)}}},F=e=>null!=e?h("millisecondsShort",{value:Math.round(e)}):h("notAvailable");if(!b&&!N)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:h("loadingHealth")})]})});if(N&&!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:h("failedToLoad",{error:N})}),(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:h("retry")})]})});let{system:P,providerHealth:T,rateLimitStatus:Z,lockouts:q}=b,A=Object.entries(T||{}),H=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:h("title")}),(0,a.jsx)("p",{className:"text-sm text-text-muted mt-1",children:h("description")})]}),(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[y&&(0,a.jsx)("span",{className:"text-xs text-text-muted",children:h("updatedAt",{time:y.toLocaleTimeString()})}),(0,a.jsx)("button",{onClick:()=>{O(),_()},className:"p-2 rounded-lg bg-surface hover:bg-surface/80 text-text-muted hover:text-text-main transition-colors",title:p("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?h("allOperational"):h("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:h("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),d=Math.floor(e%3600/60),t>0?`${t}d ${s}h ${d}m`:s>0?`${s}h ${d}m`:`${d}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:h("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:h("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:h("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:[h("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:h("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:h("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"}),h("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:h("latencyP50")}),(0,a.jsx)("span",{className:"font-mono",children:F(w.p50)})]}),(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsx)("span",{className:"text-text-muted",children:h("latencyP95")}),(0,a.jsx)("span",{className:"font-mono",children:F(w.p95)})]}),(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsx)("span",{className:"text-text-muted",children:h("latencyP99")}),(0,a.jsx)("span",{className:"font-mono",children:F(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:h("totalRequests")}),(0,a.jsx)("span",{className:"font-mono",children:w.totalRequests??0})]})]}):(0,a.jsx)("p",{className:"text-sm text-text-muted",children:h("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"}),h("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:h("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:h("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:h("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:h("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"}),h("signatureCache")]}),S?(0,a.jsx)("div",{className:"grid grid-cols-2 gap-2",children:[{label:h("signatureDefaults"),value:S.defaultCount,color:"text-text-muted"},{label:h("signatureTool"),value:`${S.tool.entries}/${S.tool.patterns}`,color:"text-blue-400"},{label:h("signatureFamily"),value:`${S.family.entries}/${S.family.patterns}`,color:"text-purple-400"},{label:h("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:h("noDataYet")})]})]}),(0,a.jsxs)(r.Zp,{className:"p-5",role:"region","aria-label":h("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"}),h("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:D,className:`flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-semibold transition-all ${D?"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:h("resetAllTitle"),children:D?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] animate-spin",children:"progress_activity"}),h("resetting")]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"restart_alt"}),h("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"})," ",h("healthy")]}),(0,a.jsxs)("span",{className:"flex items-center gap-1",children:[(0,a.jsx)("span",{className:"size-2 rounded-full bg-amber-500"})," ",h("recovering")]}),(0,a.jsxs)("span",{className:"flex items-center gap-1",children:[(0,a.jsx)("span",{className:"size-2 rounded-full bg-red-500"})," ",h("down")]})]})]})]}),0===A.length?(0,a.jsx)("p",{className:"text-sm text-text-muted text-center py-4",children:h("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:h("issuesLabel")}),m.map(([e,t])=>{let s=x[t.state]||x.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:h(s.labelKey)})]}),(0,a.jsxs)("div",{className:"text-xs text-text-muted mt-0.5",children:[1===t.failures?h("failures",{count:t.failures}):h("failuresPlural",{count:t.failures}),t.lastFailure&&(0,a.jsxs)("span",{className:"ml-2",children:["\xb7 ",h("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:h("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"}),h("rateLimitStatus")]}),(0,a.jsx)("span",{className:"text-xs text-text-muted",children:1===u.length?h("activeLimiters",{count:u.length}):h("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?h("queued"):i?p("active"):h("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"}),h("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"}),h("runningCount",{count:n.running||0})]})]})]},e)})})]})),H.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"}),h("activeLockouts")]}),(0,a.jsx)("div",{className:"space-y-2",children:H.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:h("until",{time:new Date(t.until).toLocaleTimeString()})})]},e))})]})]})}},39449:(e,t,s)=>{Promise.resolve().then(s.bind(s,32424))}},e=>{e.O(0,[3418,8500,9751,8055,1149,5846,993,8441,3794,7358],()=>e(e.s=39449)),_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:()=>d});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 x={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 d(){var e;let t,s,d,m,o,u,h=(0,i.c)("health"),p=(0,i.c)("common"),j=(0,i.c)("providers"),[b,g]=(0,l.useState)(null),[N,f]=(0,l.useState)(null),[y,v]=(0,l.useState)(null),[w,$]=(0,l.useState)(null),[C,k]=(0,l.useState)(null),[S,E]=(0,l.useState)(null),[D,L]=(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();g(t),f(null),v(new Date)}catch(e){f(e.message)}},[]),_=(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(),_();let e=setInterval(()=>{O(),_()},15e3);return()=>clearInterval(e)},[O,_]);let z=async()=>{if(confirm(h("resetConfirm"))){L(!0);try{let e=await fetch("/api/monitoring/health",{method:"DELETE"});if(!e.ok)throw Error(`HTTP ${e.status}`);await O(),await _()}catch(e){console.error("Failed to reset health:",e)}finally{L(!1)}}},F=e=>null!=e?h("millisecondsShort",{value:Math.round(e)}):h("notAvailable");if(!b&&!N)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:h("loadingHealth")})]})});if(N&&!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:h("failedToLoad",{error:N})}),(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:h("retry")})]})});let{system:P,providerHealth:T,rateLimitStatus:Z,lockouts:q}=b,A=Object.entries(T||{}),H=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:h("title")}),(0,a.jsx)("p",{className:"text-sm text-text-muted mt-1",children:h("description")})]}),(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[y&&(0,a.jsx)("span",{className:"text-xs text-text-muted",children:h("updatedAt",{time:y.toLocaleTimeString()})}),(0,a.jsx)("button",{onClick:()=>{O(),_()},className:"p-2 rounded-lg bg-surface hover:bg-surface/80 text-text-muted hover:text-text-main transition-colors",title:p("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?h("allOperational"):h("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:h("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),d=Math.floor(e%3600/60),t>0?`${t}d ${s}h ${d}m`:s>0?`${s}h ${d}m`:`${d}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:h("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:h("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:h("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:[h("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:h("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:h("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"}),h("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:h("latencyP50")}),(0,a.jsx)("span",{className:"font-mono",children:F(w.p50)})]}),(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsx)("span",{className:"text-text-muted",children:h("latencyP95")}),(0,a.jsx)("span",{className:"font-mono",children:F(w.p95)})]}),(0,a.jsxs)("div",{className:"flex justify-between",children:[(0,a.jsx)("span",{className:"text-text-muted",children:h("latencyP99")}),(0,a.jsx)("span",{className:"font-mono",children:F(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:h("totalRequests")}),(0,a.jsx)("span",{className:"font-mono",children:w.totalRequests??0})]})]}):(0,a.jsx)("p",{className:"text-sm text-text-muted",children:h("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"}),h("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:h("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:h("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:h("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:h("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"}),h("signatureCache")]}),S?(0,a.jsx)("div",{className:"grid grid-cols-2 gap-2",children:[{label:h("signatureDefaults"),value:S.defaultCount,color:"text-text-muted"},{label:h("signatureTool"),value:`${S.tool.entries}/${S.tool.patterns}`,color:"text-blue-400"},{label:h("signatureFamily"),value:`${S.family.entries}/${S.family.patterns}`,color:"text-purple-400"},{label:h("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:h("noDataYet")})]})]}),(0,a.jsxs)(r.Zp,{className:"p-5",role:"region","aria-label":h("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"}),h("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:D,className:`flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-semibold transition-all ${D?"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:h("resetAllTitle"),children:D?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] animate-spin",children:"progress_activity"}),h("resetting")]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"restart_alt"}),h("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"})," ",h("healthy")]}),(0,a.jsxs)("span",{className:"flex items-center gap-1",children:[(0,a.jsx)("span",{className:"size-2 rounded-full bg-amber-500"})," ",h("recovering")]}),(0,a.jsxs)("span",{className:"flex items-center gap-1",children:[(0,a.jsx)("span",{className:"size-2 rounded-full bg-red-500"})," ",h("down")]})]})]})]}),0===A.length?(0,a.jsx)("p",{className:"text-sm text-text-muted text-center py-4",children:h("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:h("issuesLabel")}),m.map(([e,t])=>{let s=x[t.state]||x.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:h(s.labelKey)})]}),(0,a.jsxs)("div",{className:"text-xs text-text-muted mt-0.5",children:[1===t.failures?h("failures",{count:t.failures}):h("failuresPlural",{count:t.failures}),t.lastFailure&&(0,a.jsxs)("span",{className:"ml-2",children:["\xb7 ",h("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:h("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"}),h("rateLimitStatus")]}),(0,a.jsx)("span",{className:"text-xs text-text-muted",children:1===u.length?h("activeLimiters",{count:u.length}):h("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?h("queued"):i?p("active"):h("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"}),h("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"}),h("runningCount",{count:n.running||0})]})]})]},e)})})]})),H.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"}),h("activeLockouts")]}),(0,a.jsx)("div",{className:"space-y-2",children:H.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:h("until",{time:new Date(t.until).toLocaleTimeString()})})]},e))})]})]})}},90477:(e,t,s)=>{Promise.resolve().then(s.bind(s,32424))}},e=>{e.O(0,[3418,8500,9751,8055,1149,5846,993,8441,3794,7358],()=>e(e.s=90477)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1066],{73732:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>y});var a=s(95155),r=s(12115),l=s(40993),n=s(50910),i=s(5772),c=s(35144);function o(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 d=s(81060),u=s(80927),x=s(92542),m=s(20909);let p={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"}},h=[{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 f(){let e=(0,n.c)("usage"),[t,s]=(0,r.useState)([]),[l,f]=(0,r.useState)({}),[b,g]=(0,r.useState)({}),[y,j]=(0,r.useState)({}),[v,k]=(0,r.useState)(!0),[N,w]=(0,r.useState)(null),[S,E]=(0,r.useState)(!1),[A,C]=(0,r.useState)(120),[I,M]=(0,r.useState)(!0),[P,T]=(0,r.useState)("all"),q=(0,r.useRef)(null),F=(0,r.useRef)(null),_=(0,r.useRef)({}),K=(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([]),[]}},[]),L=(0,r.useCallback)(async(e,t)=>{let s=Date.now();if(!(s-(_.current[e]||0)<3e4)){_.current[e]=s,g(t=>({...t,[e]:!0})),j(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 f(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: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})})}}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);f(t=>({...t,[e]:{quotas:r,plan:a.plan||null,message:a.message||null,raw:a}}))}catch(t){j(s=>({...s,[e]:t.message||"Failed to fetch quota"}))}finally{g(t=>({...t,[e]:!1}))}}},[]),R=(0,r.useCallback)(async(e,t)=>{await L(e,t),w(new Date)},[L]),D=(0,r.useCallback)(async()=>{if(!S){E(!0),C(120);try{let e=(await K()).filter(e=>m.wb.includes(e.provider)&&"oauth"===e.authType);await Promise.all(e.map(e=>L(e.id,e.provider))),w(new Date)}catch(e){console.error("Error refreshing all:",e)}finally{E(!1)}}},[S,K,L]);(0,r.useEffect)(()=>{(async()=>{M(!0),await D(),M(!1)})()},[]),(0,r.useEffect)(()=>{if(!v){q.current&&clearInterval(q.current),F.current&&clearInterval(F.current);return}return q.current=setInterval(D,12e4),F.current=setInterval(()=>{C(e=>e<=1?120:e-1)},1e3),()=>{q.current&&clearInterval(q.current),F.current&&clearInterval(F.current)}},[v,D]),(0,r.useEffect)(()=>{let e=()=>{document.hidden?(q.current&&clearInterval(q.current),F.current&&clearInterval(F.current)):v&&(q.current=setInterval(D,12e4),F.current=setInterval(()=>{C(e=>e<=1?120:e-1)},1e3))};return document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)},[v,D]);let O=(0,r.useMemo)(()=>t.filter(e=>m.wb.includes(e.provider)&&"oauth"===e.authType),[t]),U=(0,r.useMemo)(()=>{let e={antigravity:1,github:2,codex:3,claude:4,kiro:5};return[...O].sort((t,s)=>(e[t.provider]||9)-(e[s.provider]||9))},[O]),$=(0,r.useMemo)(()=>{let e={};for(let t of U)e[t.id]=o(l[t.id]?.plan);return e},[U,l]),B=(0,r.useMemo)(()=>{let e={all:U.length,enterprise:0,team:0,business:0,ultra:0,pro:0,free:0,unknown:0};for(let t of U){let s=$[t.id]?.key||"unknown";e[s]=(e[s]||0)+1}return e},[U,$]),G=(0,r.useMemo)(()=>"all"===P?U:U.filter(e=>($[e.id]?.key||"unknown")===P),[U,$,P]);return I?(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)(x.CardSkeleton,{}),(0,a.jsx)(x.CardSkeleton,{})]}):0===U.length?(0,a.jsx)(d.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:G.length}),G.length!==U.length&&` ${e("filteredFromCount",{count:U.length})}`]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsxs)("button",{onClick:()=>k(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:v?"#22c55e":"var(--text-muted)"},children:v?"toggle_on":"toggle_off"}),e("autoRefresh"),v&&(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["(",A,"s)"]})]}),(0,a.jsxs)("button",{onClick:D,disabled:S,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] ${S?"animate-spin":""}`,children:"refresh"}),e("refreshAll")]})]})]}),(0,a.jsx)("div",{className:"flex items-center gap-2 flex-wrap",children:h.map(t=>{if("all"!==t.key&&!B[t.key])return null;let s=P===t.key;return(0,a.jsxs)("button",{onClick:()=>T(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:B[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")})]}),G.map((t,s)=>{let r=l[t.id],n=b[t.id],c=y[t.id],d=p[t.provider]||{label:t.provider,color:"#666"},x=$[t.id]||o(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<G.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||d.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)(u.default,{variant:x.variant,size:"sm",dot:!0,children:x.label})}),(0,a.jsx)("span",{className:"text-[11px] text-text-muted",children:d.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:N?(0,a.jsx)("span",{children:N.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}):"-"}),(0,a.jsx)("div",{className:"flex justify-center gap-0.5",children:(0,a.jsx)("button",{onClick:()=>R(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===G.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(h.find(e=>e.key===P)?.labelKey||"tierUnknown")}),"."]})]})]})}function b(){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 g(){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 y(){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)(f,{})}),(0,a.jsx)(b,{}),(0,a.jsx)(g,{})]})}},86879:(e,t,s)=>{Promise.resolve().then(s.bind(s,73732))}},e=>{e.O(0,[3418,8500,9751,8055,1149,5846,993,8441,3794,7358],()=>e(e.s=86879)),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8013],{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,[3418,8500,9751,8055,1149,5846,993,8441,3794,7358],()=>e(e.s=53586)),_N_E=e.O()}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8013],{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,[3418,8500,9751,8055,1149,5846,993,8441,3794,7358],()=>e(e.s=56646)),_N_E=e.O()}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1606],{20433:(e,t,s)=>{Promise.resolve().then(s.bind(s,38701))},38701:(e,t,s)=>{"use strict";s.d(t,{default:()=>n});var a=s(95155),r=s(12115),l=s(50910);let i={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"}};function n(){let e=(0,l.c)("media"),[t,s]=(0,r.useState)("image"),[n,o]=(0,r.useState)(""),[d,c]=(0,r.useState)(""),[m,x]=(0,r.useState)([]),[u,p]=(0,r.useState)(!1),[h,b]=(0,r.useState)(!1),[g,f]=(0,r.useState)(null),[j,y]=(0,r.useState)(null),N=async e=>{b(!0);try{let t=await fetch(i[e].endpoint);if(t.ok){let e=(await t.json()).data||[];x(e),e.length>0&&c(e[0].id)}}catch{x([])}b(!1)},v=async()=>{if(n.trim()){p(!0),y(null),f(null);try{let e=i[t],s=await fetch(e.endpoint,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:d||void 0,prompt:n.trim(),..."image"===t?{size:"1024x1024",n:1}:{}})});if(!s.ok){let e=await s.json().catch(()=>({}));throw Error(e?.error?.message||`Generation failed (${s.status})`)}let a=await s.json();f({type:t,data:a,timestamp:Date.now()})}catch(e){y(e.message||"Generation failed")}p(!1)}};(0,r.useState)(()=>{N("image")});let w=i[t];return(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"text-2xl font-bold text-text-main",children:e("title")}),(0,a.jsx)("p",{className:"text-text-muted text-sm mt-1",children:e("subtitle")})]}),(0,a.jsx)("div",{className:"flex gap-2 p-1 bg-surface/50 rounded-xl border border-black/5 dark:border-white/5",children:Object.keys(i).map(e=>{let r=i[e],l=e===t;return(0,a.jsxs)("button",{onClick:()=>{s(e),o(""),f(null),y(null),N(e)},className:`flex-1 flex items-center justify-center gap-2 px-4 py-2.5 rounded-lg text-sm font-medium transition-all ${l?"bg-primary/10 text-primary shadow-sm border border-primary/20":"text-text-muted hover:text-text-main hover:bg-surface/80"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:r.icon}),r.label]},e)})}),(0,a.jsxs)("div",{className:"bg-surface/30 rounded-xl border border-black/5 dark:border-white/5 p-6 space-y-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-text-main mb-2",children:e("model")}),h?(0,a.jsxs)("div",{className:"flex items-center gap-2 text-text-muted text-sm",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-[16px]",children:"progress_activity"}),e("loadingModels")]}):m.length>0?(0,a.jsx)("select",{value:d,onChange:e=>c(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:m.map(e=>(0,a.jsx)("option",{value:e.id,children:e.id},e.id))}):(0,a.jsx)("p",{className:"text-text-muted text-sm",children:e("noModels")})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-text-main mb-2",children:e("prompt")}),(0,a.jsx)("textarea",{rows:3,value:n,onChange:e=>o(e.target.value),placeholder:w.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,a.jsx)("button",{onClick:v,disabled:u||!n.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 ${w.color} ${u||!n.trim()?"opacity-50 cursor-not-allowed":"hover:opacity-90 hover:shadow-lg"}`,children:u?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-[18px]",children:"progress_activity"}),e("generating")]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"auto_awesome"}),e("generate")," ",w.label]})})]}),j&&(0,a.jsxs)("div",{className:"bg-red-500/10 border border-red-500/20 rounded-xl p-4 flex items-start gap-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-red-500 text-[20px] mt-0.5",children:"error"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-medium text-red-500",children:e("error")}),(0,a.jsx)("p",{className:"text-sm text-text-muted mt-1",children:j})]})]}),g&&(0,a.jsxs)("div",{className:"bg-surface/30 rounded-xl border border-black/5 dark:border-white/5 p-6",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-4",children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[20px] bg-gradient-to-r ${w.color} bg-clip-text text-transparent`,children:w.icon}),(0,a.jsx)("h3",{className:"text-sm font-medium text-text-main",children:e("result")}),(0,a.jsx)("span",{className:"text-xs text-text-muted ml-auto",children:new Date(g.timestamp).toLocaleTimeString()})]}),(0,a.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,a.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:Object.keys(i).map(t=>{let s=i[t];return(0,a.jsxs)("div",{className:"bg-surface/30 rounded-xl border border-black/5 dark:border-white/5 p-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,a.jsx)("div",{className:`flex items-center justify-center size-8 rounded-lg bg-gradient-to-r ${s.color}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-white text-[16px]",children:s.icon})}),(0,a.jsx)("span",{className:"text-sm font-medium text-text-main",children:s.label})]}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:e(`${t}Description`)}),(0,a.jsxs)("code",{className:"block mt-2 text-xs text-primary/70 bg-primary/5 rounded px-2 py-1",children:["POST ",s.endpoint]})]},t)})})]})}},50910:(e,t,s)=>{"use strict";s.d(t,{c:()=>l});var a=s(33418);function r(e,t){return(...e)=>{try{return t(...e)}catch{throw Error(void 0)}}}let l=r(0,a.c3);r(0,a.kc)}},e=>{e.O(0,[3418,8441,3794,7358],()=>e(e.s=20433)),_N_E=e.O()}]);
|