@jheavenknows/bluerouter 5.3.60 → 5.3.62
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/.next-cli-build/BUILD_ID +1 -1
- package/app/.next-cli-build/app-path-routes-manifest.json +13 -12
- package/app/.next-cli-build/build-manifest.json +3 -3
- package/app/.next-cli-build/prerender-manifest.json +1 -1
- package/app/.next-cli-build/routes-manifest.json +6 -0
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/ai-power-index/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/ai-power-index/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/ai-power-index/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/analytics/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/analytics/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/analytics/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/api-keys/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/api-keys/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/api-keys/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/audit-proxy/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/audit-proxy/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/audit-proxy/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/model-profiles/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/model-profiles/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/model-profiles/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cluster/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cluster/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cluster/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/local-ai-report/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/local-ai-report/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/local-ai-report/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/personal/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/personal/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/personal/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalcloudprovider/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalcloudprovider/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalcloudprovider/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalcloudprovidermonitor/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalcloudprovidermonitor/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalcloudprovidermonitor/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalquota/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalquota/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalquota/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/prompt-logs/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/prompt-logs/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/prompt-logs/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/provider-health/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/provider-health/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/provider-health/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/stt/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/stt/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/stt/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/tts/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/tts/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/tts/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/resource-monitor/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/resource-monitor/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/resource-monitor/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/routing-topology/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/routing-topology/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/routing-topology/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/settings/pricing/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/settings/pricing/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_global-error/page.js +1 -1
- package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_global-error.html +1 -1
- package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_not-found/page.js +1 -1
- package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_not-found.html +1 -1
- package/app/.next-cli-build/server/app/_not-found.rsc +6 -6
- package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/api/audit-proxy/ca/route.js +1 -1
- package/app/.next-cli-build/server/app/api/audit-proxy/ca/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/audit-proxy/route.js +2 -2
- package/app/.next-cli-build/server/app/api/audit-proxy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/ldap/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/ldap/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/ldap/users/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/ldap/users/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/login/route.js +2 -2
- package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/view-mode/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/view-mode/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/branding/[asset]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/branding/[asset]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/branding/route.js +1 -1
- package/app/.next-cli-build/server/app/api/branding/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/branding/upload/route.js +1 -1
- package/app/.next-cli-build/server/app/api/branding/upload/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-model-profiles/cloud-models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-model-profiles/cloud-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-model-profiles/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-model-profiles/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/autostart/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/autostart/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/prompt-log-db/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/prompt-log-db/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/root-ca/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/root-ca/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/qwen-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/qwen-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cluster/config/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cluster/config/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cluster/heartbeat/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cluster/heartbeat/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cluster/peers/[id]/command/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cluster/peers/[id]/command/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cluster/peers/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cluster/peers/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cluster/peers/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cluster/peers/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cluster/snapshot/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cluster/snapshot/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cluster/sync/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cluster/sync/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cluster/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cluster/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/combos/[id]/route.js +2 -2
- package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
- package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/dashboard/ai-power-index/route.js +1 -1
- package/app/.next-cli-build/server/app/api/dashboard/ai-power-index/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/dashboard/analytics/ai-models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/dashboard/analytics/ai-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/dashboard/analytics/analyze/route.js +2 -2
- package/app/.next-cli-build/server/app/api/dashboard/analytics/analyze/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/dashboard/analytics/route.js +1 -1
- package/app/.next-cli-build/server/app/api/dashboard/analytics/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/dashboard/combos/route.js +1 -1
- package/app/.next-cli-build/server/app/api/dashboard/combos/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/dashboard/endpoint/route.js +1 -1
- package/app/.next-cli-build/server/app/api/dashboard/endpoint/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/dashboard/local-ai-report/route.js +2 -2
- package/app/.next-cli-build/server/app/api/dashboard/local-ai-report/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/options/route.js +1 -1
- package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/options/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/route.js +1 -1
- package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/dashboard/routing-topology/config/route.js +1 -1
- package/app/.next-cli-build/server/app/api/dashboard/routing-topology/config/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/dashboard/routing-topology/live/route.js +1 -1
- package/app/.next-cli-build/server/app/api/dashboard/routing-topology/live/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/dashboard/routing-topology/route.js +1 -1
- package/app/.next-cli-build/server/app/api/dashboard/routing-topology/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/dashboard/token-saver/route.js +2 -2
- package/app/.next-cli-build/server/app/api/dashboard/token-saver/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/health/route.js +1 -1
- package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/init/route.js +1 -1
- package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/keys/[id]/caveman-test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/keys/[id]/caveman-test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/keys/[id]/rotate/route.js +1 -1
- package/app/.next-cli-build/server/app/api/keys/[id]/rotate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/keys/route.js +2 -2
- package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/locale/route.js +1 -1
- package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +1 -1
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +1 -1
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +2 -2
- package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/grok-cli/device-code/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/grok-cli/device-code/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/grok-cli/poll/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/grok-cli/poll/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/api-key-models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/api-key-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/import-models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/import-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/models/[...routeModel]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/models/[...routeModel]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/move/route.js +1 -1
- package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/move/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/usage/route.js +1 -1
- package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/usage/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/personal-cloud-providers/client/route.js +1 -1
- package/app/.next-cli-build/server/app/api/personal-cloud-providers/client/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/personal-cloud-providers/monitor/route.js +1 -1
- package/app/.next-cli-build/server/app/api/personal-cloud-providers/monitor/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/personal-cloud-providers/permissions/route.js +1 -1
- package/app/.next-cli-build/server/app/api/personal-cloud-providers/permissions/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/personal-cloud-providers/route.js +1 -1
- package/app/.next-cli-build/server/app/api/personal-cloud-providers/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/personal-cloud-providers/routing/route.js +1 -1
- package/app/.next-cli-build/server/app/api/personal-cloud-providers/routing/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/personal-cloud-providers/shares/route.js +1 -1
- package/app/.next-cli-build/server/app/api/personal-cloud-providers/shares/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/personal-cloud-providers/visibility/route.js +1 -1
- package/app/.next-cli-build/server/app/api/personal-cloud-providers/visibility/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pricing/catalog/route.js +2 -2
- package/app/.next-cli-build/server/app/api/pricing/catalog/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pricing/recalculate/route.js +1 -1
- package/app/.next-cli-build/server/app/api/pricing/recalculate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
- package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-health/route.js +1 -1
- package/app/.next-cli-build/server/app/api/provider-health/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/openai-compatible/manage/route.js +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/openai-compatible/manage/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +2 -2
- package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/resource-monitor/[id]/route.js +2 -2
- package/app/.next-cli-build/server/app/api/resource-monitor/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/resource-monitor/ai-models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/resource-monitor/ai-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/resource-monitor/analyze/route.js +2 -2
- package/app/.next-cli-build/server/app/api/resource-monitor/analyze/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/resource-monitor/history/route.js +2 -2
- package/app/.next-cli-build/server/app/api/resource-monitor/history/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/resource-monitor/route.js +3 -3
- package/app/.next-cli-build/server/app/api/resource-monitor/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
- package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
- package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/shutdown/route.js +1 -1
- package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tags/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
- package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-login/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-login/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-start-daemon/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-start-daemon/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/stream/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/version/restart/route.js +1 -1
- package/app/.next-cli-build/server/app/api/version/restart/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/version/route.js +1 -1
- package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
- package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
- package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/callback/page.js +1 -1
- package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/callback.html +1 -1
- package/app/.next-cli-build/server/app/callback.rsc +6 -6
- package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/ai-power-index.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/ai-power-index.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/ai-power-index.segments/!KGRhc2hib2FyZCk/dashboard/ai-power-index/__PAGE__.segment.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/ai-power-index.segments/_full.segment.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/ai-power-index.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/api-keys.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/api-keys.rsc +11 -11
- package/app/.next-cli-build/server/app/dashboard/api-keys.segments/!KGRhc2hib2FyZCk/dashboard/api-keys/__PAGE__.segment.rsc +11 -11
- package/app/.next-cli-build/server/app/dashboard/api-keys.segments/_full.segment.rsc +11 -11
- package/app/.next-cli-build/server/app/dashboard/api-keys.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/cli-tools/model-profiles.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools/model-profiles.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/cli-tools/model-profiles.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/model-profiles/__PAGE__.segment.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/cli-tools/model-profiles.segments/_full.segment.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/cli-tools/model-profiles.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/cluster.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/cluster.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/cluster.segments/!KGRhc2hib2FyZCk/dashboard/cluster/__PAGE__.segment.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/cluster.segments/_full.segment.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/cluster.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/combos.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/local-ai-report.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/local-ai-report.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/local-ai-report.segments/!KGRhc2hib2FyZCk/dashboard/local-ai-report/__PAGE__.segment.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/local-ai-report.segments/_full.segment.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/local-ai-report.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/logs.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/logs.rsc +22 -24
- package/app/.next-cli-build/server/app/dashboard/logs.segments/_full.segment.rsc +22 -24
- package/app/.next-cli-build/server/app/dashboard/logs.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/personal.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/personal.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/personal.segments/!KGRhc2hib2FyZCk/dashboard/personal/__PAGE__.segment.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/personal.segments/_full.segment.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/personal.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/profile.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/prompt-logs.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/prompt-logs.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/!KGRhc2hib2FyZCk/dashboard/prompt-logs/__PAGE__.segment.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/_full.segment.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/provider-health.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/provider-health.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/provider-health.segments/!KGRhc2hib2FyZCk/dashboard/provider-health/__PAGE__.segment.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/provider-health.segments/_full.segment.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/provider-health.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/providers/stt.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/stt.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/providers/stt.segments/!KGRhc2hib2FyZCk/dashboard/providers/stt/__PAGE__.segment.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/providers/stt.segments/_full.segment.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/providers/stt.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/providers/tts.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/tts.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/providers/tts.segments/!KGRhc2hib2FyZCk/dashboard/providers/tts/__PAGE__.segment.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/providers/tts.segments/_full.segment.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/providers/tts.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/quota.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/quota.rsc +10 -10
- package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +10 -10
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +10 -10
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/resource-monitor.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/resource-monitor.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/resource-monitor.segments/!KGRhc2hib2FyZCk/dashboard/resource-monitor/__PAGE__.segment.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/resource-monitor.segments/_full.segment.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/resource-monitor.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/routing-topology.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/routing-topology.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/routing-topology.segments/!KGRhc2hib2FyZCk/dashboard/routing-topology/__PAGE__.segment.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/routing-topology.segments/_full.segment.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/routing-topology.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk/dashboard/settings/pricing/__PAGE__.segment.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/translator.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/usage.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard.html +1 -1
- package/app/.next-cli-build/server/app/dashboard.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +9 -9
- package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/favicon.ico/route.js +1 -1
- package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/index.html +1 -1
- package/app/.next-cli-build/server/app/index.rsc +6 -6
- package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/landing/page.js +1 -1
- package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/landing.html +1 -1
- package/app/.next-cli-build/server/app/landing.rsc +6 -6
- package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/login/page.js +1 -1
- package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/login.html +1 -1
- package/app/.next-cli-build/server/app/login.rsc +7 -7
- package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/manifest.webmanifest/route.js +2 -2
- package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/page.js +1 -1
- package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app-paths-manifest.json +13 -12
- package/app/.next-cli-build/server/chunks/3767.js +1 -1
- package/app/.next-cli-build/server/chunks/3958.js +3 -3
- package/app/.next-cli-build/server/chunks/4594.js +1 -0
- package/app/.next-cli-build/server/chunks/4696.js +1 -1
- package/app/.next-cli-build/server/chunks/4746.js +1 -1
- package/app/.next-cli-build/server/chunks/4790.js +2 -2
- package/app/.next-cli-build/server/chunks/5210.js +9 -9
- package/app/.next-cli-build/server/chunks/541.js +1 -1
- package/app/.next-cli-build/server/chunks/607.js +1 -1
- package/app/.next-cli-build/server/chunks/6328.js +1 -1
- package/app/.next-cli-build/server/chunks/6811.js +1 -1
- package/app/.next-cli-build/server/chunks/6992.js +1 -1
- package/app/.next-cli-build/server/chunks/7142.js +1 -0
- package/app/.next-cli-build/server/chunks/7639.js +1 -1
- package/app/.next-cli-build/server/chunks/7812.js +1 -1
- package/app/.next-cli-build/server/chunks/8352.js +1 -1
- package/app/.next-cli-build/server/chunks/8640.js +2 -2
- package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
- package/app/.next-cli-build/server/pages/404.html +1 -1
- package/app/.next-cli-build/server/pages/500.html +1 -1
- package/app/.next-cli-build/static/OvJK_UdNOS0vJSr9JO4J4/_buildManifest.js +1 -0
- package/app/.next-cli-build/static/chunks/{5263-370057dd375df5fd.js → 5263-5edbd7b3aa9dfb9e.js} +1 -1
- package/app/.next-cli-build/static/chunks/{5497-e7a491e584d8e889.js → 5497-a3cadef0038fbc54.js} +2 -2
- package/app/.next-cli-build/static/chunks/{5478-b8434ac09db5465f.js → 9705-9912c0535c058c02.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/api-keys/{page-69abc960e895e371.js → page-8c2da5b95b0920e1.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/basic-chat/{page-b4d366816efccb83.js → page-08bcacabfb4016a8.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/{page-cf60b5c7ef98268e.js → page-a9ff54e851d2ee6b.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/model-profiles/{page-565eec37a6b1e43e.js → page-514941d4d89828f3.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/{page-4d03de73b87070b7.js → page-6af3a74f988fa9a3.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/{page-9125d5791390ecd1.js → page-b484d39ac1824239.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/page-20db329e00f2d625.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/{page-aaf1ae8b36169705.js → page-1abcaccf45c4d975.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/{page-9117c57680c9a427.js → page-9a1c2c9d6bc4319c.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/{providers/tts/page-cc5320ebd1a7e502.js → media-providers/[kind]/page-154eed6f10067283.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/combo/[id]/{page-c17bde6fb00334f8.js → page-2bcd21fc09c38461.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/web/{page-7910b58d0aedaa0f.js → page-c01afc3879e58b71.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/{page-1ec588c770711f10.js → page-b40045309a980f35.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/{page-aaf1ae8b36169705.js → page-1abcaccf45c4d975.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/personal/{page-41e959b6a32f2dcd.js → page-ebc28879d4aba11d.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/personalcloudprovider/{layout-e6352e14327c0403.js → layout-72251d3e2b178c64.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/personalcloudprovider/{page-b0752e76d649652c.js → page-89c84b2666538769.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/personalcloudprovidermonitor/{page-01cc90c62e5b5082.js → page-2366c1492c09d740.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/{page-f08bb6e259b2c163.js → page-99b518e5b6d81643.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/prompt-logs/page-a3741fba3051df50.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/{page-47131b1112d369af.js → page-d3d1b8d6916c6050.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/new/{page-a767336a177c4006.js → page-23d57f0cd3caa5a4.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/{page-96ab6806712c81a9.js → page-d278b9c2099a88c8.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/stt/{page-cc5320ebd1a7e502.js → page-154eed6f10067283.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/{media-providers/[kind]/page-cc5320ebd1a7e502.js → providers/tts/page-154eed6f10067283.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/proxy-pools/{page-905744d22c273a69.js → page-9a6e31f87d838029.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/{page-2fd66044b1fd1c69.js → page-d22d38cc4a97d13d.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/{page-5d3a88a800c01ca2.js → page-efedba92d6e02c82.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/translator/{page-8d752b6befd00f90.js → page-089032ee4ac431a5.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/{page-9fd8ba9f4423ea62.js → page-6f197758e96ec272.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/{layout-ff68f7f7cf22bcac.js → layout-e5f8b9540dd02062.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/_global-error/page-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/audit-proxy/ca/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/audit-proxy/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/ldap/test/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/ldap/users/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/login/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/status/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/view-mode/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/branding/[asset]/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/branding/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/branding/upload/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-model-profiles/cloud-models/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-model-profiles/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/autostart/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/prompt-log-db/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/root-ca/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/qwen-settings/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cluster/config/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cluster/heartbeat/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cluster/peers/[id]/command/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cluster/peers/[id]/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cluster/peers/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cluster/snapshot/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cluster/sync/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cluster/test/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/combos/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/dashboard/ai-power-index/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/dashboard/analytics/ai-models/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/dashboard/analytics/analyze/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/dashboard/analytics/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/dashboard/combos/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/dashboard/endpoint/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/dashboard/local-ai-report/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/dashboard/prompt-logs/[id]/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/dashboard/prompt-logs/options/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/dashboard/prompt-logs/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/dashboard/routing-topology/config/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/dashboard/routing-topology/live/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/dashboard/routing-topology/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/dashboard/token-saver/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/health/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/init/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/keys/[id]/caveman-test/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/keys/[id]/rotate/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/keys/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/locale/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/alias/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/availability/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/custom/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/test/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/device-code/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/poll/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/[id]/api-key-models/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/[id]/import-models/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/[id]/models/[...routeModel]/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/[id]/move/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/[id]/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/[id]/usage/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/client/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/monitor/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/permissions/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/routing/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/shares/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/visibility/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pricing/catalog/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pricing/recalculate/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pricing/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-health/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/openai-compatible/manage/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/client/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/resource-monitor/[id]/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/resource-monitor/ai-models/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/resource-monitor/analyze/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/resource-monitor/history/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/resource-monitor/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/database/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/shutdown/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tags/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/load/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/save/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/send/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-login/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-start-daemon/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/history/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/models/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/search/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/version/restart/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/version/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/version/update/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/app/page-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-a48c4c9356e97886.js +1 -0
- package/app/.next-cli-build/static/chunks/{webpack-e43d42d9ffe5099b.js → webpack-7223ab98c3aee1a6.js} +1 -1
- package/app/.next-cli-build/static/css/2efd59dd4cc5acfe.css +1 -0
- package/app/.next-cli-build/static/css/{6b035d23410f8c74.css → d235ea8456abe03c.css} +1 -1
- package/app/cli/.build-home/AppData/Roaming/bluerouter/db/backups/{upgrade-5.3.56-to-5.3.57-5.3.57-20260823-091335 → upgrade-5.3.58-to-5.3.59-5.3.59-20260823-093629}/data.sqlite +0 -0
- package/app/cli/.build-home/AppData/Roaming/bluerouter/db/backups/{upgrade-5.3.57-to-5.3.58-5.3.58-20260823-092724 → upgrade-5.3.59-to-5.3.60-5.3.60-20260823-094446}/data.sqlite +0 -0
- package/app/cli/.build-home/AppData/Roaming/bluerouter/db/backups/{upgrade-5.3.55-to-5.3.56-5.3.56-20260823-085719 → upgrade-5.3.59-to-5.3.60-5.3.60-20260823-094447}/data.sqlite +0 -0
- package/app/cli/.build-home/AppData/Roaming/bluerouter/db/data.sqlite +0 -0
- package/app/package.json +1 -1
- package/package.json +1 -1
- package/app/.next-cli-build/server/chunks/7859.js +0 -1
- package/app/.next-cli-build/static/-YTKQW02vkwwrrMAHMqfh/_buildManifest.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/page-46eb716c240403a9.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/prompt-logs/page-6b922c193b4831e7.js +0 -1
- package/app/.next-cli-build/static/chunks/app/_global-error/page-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/audit-proxy/ca/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/audit-proxy/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/ldap/test/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/ldap/users/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/login/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/status/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/view-mode/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/branding/[asset]/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/branding/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/branding/upload/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-model-profiles/cloud-models/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-model-profiles/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/autostart/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/prompt-log-db/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/root-ca/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/qwen-settings/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cluster/config/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cluster/heartbeat/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cluster/peers/[id]/command/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cluster/peers/[id]/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cluster/peers/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cluster/snapshot/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cluster/sync/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cluster/test/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/combos/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/dashboard/ai-power-index/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/dashboard/analytics/ai-models/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/dashboard/analytics/analyze/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/dashboard/analytics/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/dashboard/combos/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/dashboard/endpoint/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/dashboard/local-ai-report/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/dashboard/prompt-logs/[id]/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/dashboard/prompt-logs/options/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/dashboard/prompt-logs/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/dashboard/routing-topology/config/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/dashboard/routing-topology/live/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/dashboard/routing-topology/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/dashboard/token-saver/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/health/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/init/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/keys/[id]/caveman-test/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/keys/[id]/rotate/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/keys/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/locale/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/alias/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/availability/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/custom/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/test/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/device-code/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/poll/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/[id]/api-key-models/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/[id]/import-models/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/[id]/models/[...routeModel]/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/[id]/move/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/[id]/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/[id]/usage/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/client/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/monitor/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/permissions/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/routing/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/shares/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/visibility/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pricing/catalog/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pricing/recalculate/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pricing/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-health/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/openai-compatible/manage/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/client/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/resource-monitor/[id]/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/resource-monitor/ai-models/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/resource-monitor/analyze/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/resource-monitor/history/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/resource-monitor/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/database/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/shutdown/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tags/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/load/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/save/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/send/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-login/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-start-daemon/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/history/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/models/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/search/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/version/restart/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/version/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/version/update/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/app/page-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-61d53eae35c05114.js +0 -1
- package/app/.next-cli-build/static/css/ca15e2e7ae86ace9.css +0 -1
- /package/app/.next-cli-build/static/{-YTKQW02vkwwrrMAHMqfh → OvJK_UdNOS0vJSr9JO4J4}/_ssgManifest.js +0 -0
package/app/.next-cli-build/static/chunks/{5478-b8434ac09db5465f.js → 9705-9912c0535c058c02.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5478],{55478:(e,t,r)=>{r.d(t,{default:()=>z});var s=r(95155),a=r(12115);let o={client:"Client request",source:"Source request",openai:"OpenAI normalized",target:"Provider request",provider_response:"Provider response",error:"Error"},l={client:"bg-blue-500/10 text-blue-600 border-blue-500/20",source:"bg-cyan-500/10 text-cyan-600 border-cyan-500/20",openai:"bg-purple-500/10 text-purple-600 border-purple-500/20",target:"bg-orange-500/10 text-orange-600 border-orange-500/20",provider_response:"bg-green-500/10 text-green-600 border-green-500/20",error:"bg-red-500/10 text-red-600 border-red-500/20"};function n(e){if(!e)return"-";try{let t=function(e){if(!e)return"";if(e instanceof Date)return e.toISOString();let t=String(e).trim();if(!t)return"";let r=t.replace(" ","T");return/(?:Z|[+-]\d{2}:?\d{2})$/i.test(r)?r:`${r}Z`}(e),r=new Date(t);if(Number.isNaN(r.getTime()))return String(e);return r.toLocaleString("vi-VN",{timeZone:"Asia/Ho_Chi_Minh",day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})}catch{return e}}function d(e,t=240){let r=String(e||"").replace(/\s+/g," ").trim();return r.length>t?`${r.slice(0,t)}...`:r}function i(e){let t=String(e||"").trim();if(!t)return"";try{return new URL(t).hostname||""}catch{return t.replace(/^https?:\/\//,"").replace(/\/.*$/,"").replace(/:\d+$/,"")}}function c(e){return e?.provider_name||e?.provider_label||e?.provider_id||e?.provider||i(e?.provider_url)||i(e?.endpoint)||""}function x(e){return String(e||"").trim()}function m(e){let t=function(e={}){let t=x(c(e)).toLowerCase(),r=x(e.owner_user||e.ownerUser),s=x(e.account_email||e.accountEmail||e.email);if(!t||!r||!s||!function(e={}){let t=x(e?.display_model);return e?.isPersonalOAuth===!0||e?.is_personal_oauth===!0||e?.connection_scope==="personal"||e?.connectionScope==="personal"||e?.visibility==="private"||!!(e?.owner_user||e?.ownerUser)||/^[^/]+\/[^/]+@[^/]+\/[^/]+\//.test(t)}(e))return"";let a=x(e.model||e.rawModel||e.raw_model);if(!a){let t=x(e.display_model);if(t){let e=t.split("/").filter(Boolean);a=e[e.length-1]||""}}return a&&"-"!==a?(a.startsWith(`${t}/`)&&(a=a.slice(t.length+1)),`${r}/${s}/${t}/${a}`):""}(e);if(t)return t;if(e?.display_model)return e.display_model;let r=e?.model||"-",s=c(e);return!s||"-"===r||String(r).startsWith(`${s}/`)?r:`${s}/${r}`}function p(e){if(!e)return null;if("object"==typeof e)return e;try{return JSON.parse(e)}catch{return null}}function u({copied:e,onClick:t,label:r="Copy"}){return(0,s.jsx)("button",{type:"button",onClick:t,className:`rounded-xl border px-3 py-1.5 text-xs font-medium shadow-sm transition ${e?"border-emerald-500/30 bg-emerald-500/10 text-emerald-600":"border-zinc-200 bg-white text-zinc-900 hover:bg-zinc-50 dark:border-zinc-700 dark:bg-zinc-900 dark:text-zinc-100 dark:hover:bg-zinc-800"}`,children:e?"Đ\xe3 copy":r})}function b({value:e}){let t=p(e),r=t?JSON.stringify(t,null,2):String(e||"");return(0,s.jsx)("pre",{className:"max-h-[42vh] max-w-full overflow-auto whitespace-pre-wrap break-words rounded-2xl bg-zinc-950 p-4 text-xs leading-relaxed text-zinc-100 shadow-inner [overflow-wrap:anywhere]",children:r||"No JSON"})}function h({value:e,empty:t="No content"}){return(0,s.jsx)("pre",{className:"max-h-[42vh] max-w-full overflow-auto whitespace-pre-wrap break-words rounded-2xl border border-zinc-200 bg-white p-4 font-mono text-xs leading-relaxed text-zinc-950 shadow-sm [overflow-wrap:anywhere] dark:border-zinc-700 dark:bg-zinc-900 dark:text-zinc-100",children:e||t})}function g({label:e,value:t}){return(0,s.jsxs)("div",{className:"rounded-2xl border border-border bg-surface p-4 shadow-sm",children:[(0,s.jsx)("div",{className:"text-xs uppercase tracking-wide text-text-muted",children:e}),(0,s.jsx)("div",{className:"mt-1 text-2xl font-semibold text-text-main",children:t})]})}function f({stage:e}){let t=l[e]||"bg-surface text-text-main border-border";return(0,s.jsx)("span",{className:`inline-flex items-center rounded-full border px-2.5 py-1 text-xs font-medium ${t}`,children:o[e]||e||"-"})}function j({label:e,value:t}){return(0,s.jsxs)("div",{className:"rounded-2xl border border-zinc-200 bg-white p-3 shadow-sm dark:border-zinc-700 dark:bg-zinc-950",children:[(0,s.jsx)("div",{className:"text-[11px] font-semibold uppercase tracking-wide text-text-muted",children:e}),(0,s.jsx)("pre",{className:"mt-2 whitespace-pre-wrap break-words font-mono text-xs leading-relaxed text-text-main",children:t||"-"})]})}let N=["prompt","Prompt"],w=["request","Request JSON"],v=["response","Response text"],y=["responseJson","Response JSON"],_=["meta","Metadata"];function k(e){return"provider_response"===e?[v,y,_]:"client"===e||"source"===e||"openai"===e||"target"===e?[N,w,_]:[N,w,v,y,_]}function z(){let[e,t]=(0,a.useState)({keyword:"",model:"",stage:"",comboName:"",sourceTool:"",clientIp:"",sessionId:"",dateFrom:"",dateTo:"",limit:"50",offset:"0"}),[r,l]=(0,a.useState)([]),[i,x]=(0,a.useState)([]),[N,w]=(0,a.useState)([]),[v,y]=(0,a.useState)([]),[_,z]=(0,a.useState)(0),[S,C]=(0,a.useState)(null),[$,T]=(0,a.useState)(""),[I,E]=(0,a.useState)(""),[P,M]=(0,a.useState)(!1),[O,q]=(0,a.useState)(null),[J,D]=(0,a.useState)("prompt"),[F,L]=(0,a.useState)(""),[R,A]=(0,a.useState)(""),U=(0,a.useMemo)(()=>{let t=Number(e.limit||50);return Math.floor(Number(e.offset||0)/t)+1},[e.limit,e.offset]),H=(0,a.useCallback)(async()=>{M(!0),E(""),T("");try{let t=new URLSearchParams;Object.entries(e).forEach(([e,r])=>{String(r||"").trim()&&t.set(e,String(r).trim())});let r=await fetch(`/api/dashboard/prompt-logs?${t}`),s=await r.json();if(!r.ok)throw Error(s.error||"Failed to load prompt logs");l(s.rows||[]),x(s.models||[]),w(s.stages||[]),y(s.combos||[]),z(s.total||0),C(s.dbInfo||null),s.disabled&&T("Database prompt logging is disabled. Enable it in Dashboard -> MITM -> Prompt Log Database."),s.missing&&T("Prompt log database/table has no data yet, or the configured database is not initialized.")}catch(e){E(e.message||"Failed to load prompt logs")}finally{M(!1)}},[e]);(0,a.useEffect)(()=>{H()},[H]);let Z=e=>{t(t=>({...t,...e,offset:void 0!==e.offset?e.offset:"0"}))},B=async e=>{E("");try{var t;let r=await fetch(`/api/dashboard/prompt-logs/${encodeURIComponent(e)}`),s=await r.json();if(!r.ok)throw Error(s.error||"Failed to load detail");q(s.row),D((t=s.row?.stage,k(t)?.[0]?.[0]||"meta"))}catch(e){E(e.message||"Failed to load detail")}},V=async(e,t="copy")=>{let r=function(e){if(null==e||""===e)return"";if("string"==typeof e){let t=p(e);return t?JSON.stringify(t,null,2):e}if("object"==typeof e)try{return JSON.stringify(e,null,2)}catch{}return String(e)}(e);await navigator.clipboard.writeText(r),L(t),A("Đ\xe3 copy v\xe0o clipboard"),window.setTimeout(()=>{L(e=>e===t?"":e)},2200),window.setTimeout(()=>{A("")},2600)},W=async()=>{O?.id&&confirm("Delete this prompt log row?")&&(await fetch(`/api/dashboard/prompt-logs/${encodeURIComponent(O.id)}`,{method:"DELETE"})).ok&&(q(null),H())};return(0,a.useEffect)(()=>{if(!O)return;let e=k(O.stage);e.some(([e])=>e===J)||D(e[0]?.[0]||"meta")},[O,J]),(0,s.jsxs)("div",{className:"flex w-full max-w-none flex-col gap-5 p-3 md:p-4 lg:p-6",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-2 md:flex-row md:items-end md:justify-between",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h1",{className:"text-2xl font-semibold text-text-main",children:"Prompt Logs"}),(0,s.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"Search Copilot/MITM prompts across the currently configured prompt log database."})]}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,s.jsx)("a",{href:"/dashboard/mitm",className:"rounded-xl border border-border px-3 py-2 text-sm hover:bg-surface",children:"MITM Settings"}),(0,s.jsx)("button",{onClick:H,disabled:P,className:"rounded-xl bg-primary px-3 py-2 text-sm font-medium text-white disabled:opacity-50",children:P?"Loading...":"Refresh"})]})]}),$&&(0,s.jsx)("div",{className:"rounded-2xl border border-yellow-500/30 bg-yellow-500/10 p-4 text-sm text-yellow-700 dark:text-yellow-300",children:$}),I&&(0,s.jsx)("div",{className:"rounded-2xl border border-red-500/30 bg-red-500/10 p-4 text-sm text-red-500",children:I}),(0,s.jsxs)("div",{className:"grid gap-4 md:grid-cols-4",children:[(0,s.jsx)(g,{label:"Matching rows",value:_}),(0,s.jsx)(g,{label:"Loaded rows",value:r.length}),(0,s.jsx)(g,{label:"Page",value:U}),(0,s.jsx)(g,{label:"Database",value:S?.type||"-"})]}),S&&(0,s.jsxs)("div",{className:"rounded-2xl border border-border bg-surface p-3 text-xs text-text-muted",children:["DB: ",(0,s.jsx)("code",{children:S.type}),S.host?(0,s.jsxs)(s.Fragment,{children:[" ","\xb7 Host: ",(0,s.jsx)("code",{children:S.host})]}):null,S.database?(0,s.jsxs)(s.Fragment,{children:[" ","\xb7 Database: ",(0,s.jsx)("code",{children:S.database})]}):null]}),(0,s.jsx)("div",{className:"rounded-2xl border border-border bg-surface p-4 shadow-sm",children:(0,s.jsxs)("div",{className:"grid gap-3 md:grid-cols-4 xl:grid-cols-6",children:[(0,s.jsxs)("label",{className:"flex flex-col gap-1 text-xs",children:[(0,s.jsx)("span",{className:"text-text-muted",children:"Keyword"}),(0,s.jsx)("input",{value:e.keyword,onChange:e=>Z({keyword:e.target.value}),placeholder:"prompt, code, model, error...",className:"rounded-xl border border-border bg-background px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-primary/30"})]}),(0,s.jsxs)("label",{className:"flex flex-col gap-1 text-xs",children:[(0,s.jsx)("span",{className:"text-text-muted",children:"Model"}),(0,s.jsxs)("select",{value:e.model,onChange:e=>Z({model:e.target.value}),className:"rounded-xl border border-border bg-background px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-primary/30",children:[(0,s.jsx)("option",{value:"",children:"All models"}),i.map(e=>(0,s.jsx)("option",{value:e,children:e},e))]})]}),(0,s.jsxs)("label",{className:"flex flex-col gap-1 text-xs",children:[(0,s.jsx)("span",{className:"text-text-muted",children:"Stage"}),(0,s.jsxs)("select",{value:e.stage,onChange:e=>Z({stage:e.target.value}),className:"rounded-xl border border-border bg-background px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-primary/30",children:[(0,s.jsx)("option",{value:"",children:"All stages"}),N.map(e=>(0,s.jsx)("option",{value:e,children:o[e]||e},e))]})]}),(0,s.jsxs)("label",{className:"flex flex-col gap-1 text-xs",children:[(0,s.jsx)("span",{className:"text-text-muted",children:"Combo"}),(0,s.jsxs)("select",{value:e.comboName,onChange:e=>Z({comboName:e.target.value}),className:"rounded-xl border border-border bg-background px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-primary/30",children:[(0,s.jsx)("option",{value:"",children:"All combos"}),v.map(e=>(0,s.jsx)("option",{value:e,children:e},e))]})]}),(0,s.jsxs)("label",{className:"flex flex-col gap-1 text-xs",children:[(0,s.jsx)("span",{className:"text-text-muted",children:"Tool"}),(0,s.jsx)("input",{value:e.sourceTool,onChange:e=>Z({sourceTool:e.target.value}),placeholder:"copilot, antigravity...",className:"rounded-xl border border-border bg-background px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-primary/30"})]}),(0,s.jsxs)("label",{className:"flex flex-col gap-1 text-xs",children:[(0,s.jsx)("span",{className:"text-text-muted",children:"Client IP"}),(0,s.jsx)("input",{value:e.clientIp,onChange:e=>Z({clientIp:e.target.value}),placeholder:"172.16.253.1",className:"rounded-xl border border-border bg-background px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-primary/30"})]}),(0,s.jsxs)("label",{className:"flex flex-col gap-1 text-xs",children:[(0,s.jsx)("span",{className:"text-text-muted",children:"Session ID"}),(0,s.jsx)("input",{value:e.sessionId,onChange:e=>Z({sessionId:e.target.value}),placeholder:"session id",className:"rounded-xl border border-border bg-background px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-primary/30"})]}),(0,s.jsxs)("label",{className:"flex flex-col gap-1 text-xs",children:[(0,s.jsx)("span",{className:"text-text-muted",children:"From"}),(0,s.jsx)("input",{type:"datetime-local",value:e.dateFrom,onChange:e=>Z({dateFrom:e.target.value}),className:"rounded-xl border border-border bg-background px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-primary/30"})]}),(0,s.jsxs)("label",{className:"flex flex-col gap-1 text-xs",children:[(0,s.jsx)("span",{className:"text-text-muted",children:"To"}),(0,s.jsx)("input",{type:"datetime-local",value:e.dateTo,onChange:e=>Z({dateTo:e.target.value}),className:"rounded-xl border border-border bg-background px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-primary/30"})]}),(0,s.jsxs)("label",{className:"flex flex-col gap-1 text-xs",children:[(0,s.jsx)("span",{className:"text-text-muted",children:"Limit"}),(0,s.jsxs)("select",{value:e.limit,onChange:e=>Z({limit:e.target.value}),className:"rounded-xl border border-border bg-background px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-primary/30",children:[(0,s.jsx)("option",{value:"25",children:"25"}),(0,s.jsx)("option",{value:"50",children:"50"}),(0,s.jsx)("option",{value:"100",children:"100"}),(0,s.jsx)("option",{value:"200",children:"200"})]})]}),(0,s.jsxs)("div",{className:"flex items-end gap-2",children:[(0,s.jsx)("button",{onClick:()=>t({keyword:"",model:"",stage:"",comboName:"",sourceTool:"",clientIp:"",sessionId:"",dateFrom:"",dateTo:"",limit:"50",offset:"0"}),className:"rounded-xl border border-border px-3 py-2 text-sm hover:bg-background",children:"Reset"}),(0,s.jsx)("button",{onClick:H,className:"rounded-xl bg-primary px-3 py-2 text-sm font-medium text-white",children:"Search"})]})]})}),(0,s.jsxs)("div",{className:"overflow-hidden rounded-2xl border border-border bg-surface shadow-sm",children:[(0,s.jsx)("div",{className:"overflow-x-auto",children:(0,s.jsxs)("table",{className:"w-full min-w-[1400px] table-fixed text-left text-sm",children:[(0,s.jsxs)("colgroup",{children:[(0,s.jsx)("col",{className:"w-[9%]"}),(0,s.jsx)("col",{className:"w-[8%]"}),(0,s.jsx)("col",{className:"w-[8%]"}),(0,s.jsx)("col",{className:"w-[8%]"}),(0,s.jsx)("col",{className:"w-[9%]"}),(0,s.jsx)("col",{className:"w-[9%]"}),(0,s.jsx)("col",{className:"w-[9%]"}),(0,s.jsx)("col",{className:"w-[25%]"}),(0,s.jsx)("col",{className:"w-[12%]"}),(0,s.jsx)("col",{className:"w-[5%]"})]}),(0,s.jsx)("thead",{className:"border-b border-border bg-background/60 text-xs uppercase tracking-wide text-text-muted",children:(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{className:"px-4 py-3",children:"Time"}),(0,s.jsx)("th",{className:"px-4 py-3",children:"Stage"}),(0,s.jsx)("th",{className:"px-4 py-3",children:"Tool"}),(0,s.jsx)("th",{className:"px-4 py-3",children:"Client IP"}),(0,s.jsx)("th",{className:"px-4 py-3",children:"Model"}),(0,s.jsx)("th",{className:"px-4 py-3",children:"Combo"}),(0,s.jsx)("th",{className:"px-4 py-3",children:"Session"}),(0,s.jsx)("th",{className:"px-4 py-3",children:"Prompt/Response preview"}),(0,s.jsx)("th",{className:"px-4 py-3",children:"Status/Error"}),(0,s.jsx)("th",{className:"sticky right-0 z-20 bg-background/95 px-4 py-3 text-right shadow-[-8px_0_12px_-12px_rgba(0,0,0,0.45)]",children:"Action"})]})}),(0,s.jsxs)("tbody",{children:[0===r.length&&(0,s.jsx)("tr",{children:(0,s.jsx)("td",{colSpan:10,className:"px-4 py-10 text-center text-text-muted",children:"No prompt logs found."})}),r.map(e=>(0,s.jsxs)("tr",{className:"border-b border-border/70 hover:bg-background/50",children:[(0,s.jsx)("td",{className:"whitespace-nowrap px-4 py-3 text-xs text-text-muted align-top",children:n(e.created_at)}),(0,s.jsx)("td",{className:"px-4 py-3 align-top",children:(0,s.jsx)(f,{stage:e.stage})}),(0,s.jsx)("td",{className:"min-w-0 px-4 py-3 align-top",children:(0,s.jsx)("span",{className:"inline-flex max-w-full items-center truncate rounded-full border border-border bg-surface/70 px-2.5 py-1 text-xs font-medium text-text-main",children:e.source_tool_label||e.source_tool||e.source_format||"-"})}),(0,s.jsx)("td",{className:"min-w-0 truncate px-4 py-3 align-top font-mono text-xs text-text-muted",title:e.client_ip||"-",children:e.client_ip||"-"}),(0,s.jsx)("td",{className:"min-w-0 truncate px-4 py-3 align-top font-mono text-xs",title:m(e),children:m(e)}),(0,s.jsx)("td",{className:"min-w-0 truncate px-4 py-3 align-top font-mono text-xs text-text-muted",title:e.combo_name||"-",children:e.combo_name||"-"}),(0,s.jsx)("td",{className:"min-w-0 truncate px-4 py-3 align-top font-mono text-xs text-text-muted",title:e.session_id||"-",children:e.session_id||"-"}),(0,s.jsx)("td",{className:"max-w-0 px-4 py-3 align-top text-xs",children:(0,s.jsx)("div",{className:"max-h-24 overflow-hidden whitespace-normal break-words leading-relaxed [overflow-wrap:anywhere]",children:d(e?.stage==="provider_response"?e.response_preview||e.prompt_preview||"":e?.prompt_preview||e?.response_preview||"",620)||(0,s.jsx)("span",{className:"text-text-muted",children:"No prompt/response text"})})}),(0,s.jsx)("td",{className:"max-w-0 px-4 py-3 align-top text-xs",children:e.error_text?(0,s.jsx)("div",{className:"max-h-28 overflow-y-auto whitespace-pre-wrap break-words leading-relaxed text-red-500 [overflow-wrap:anywhere]",children:d(e.error_text,420)}):(0,s.jsx)("span",{className:e.status_code?"font-mono text-text-main":"text-text-muted",children:e.status_code||"-"})}),(0,s.jsx)("td",{className:"sticky right-0 z-10 bg-surface px-4 py-3 text-right align-top shadow-[-8px_0_12px_-12px_rgba(0,0,0,0.35)]",children:(0,s.jsx)("button",{onClick:()=>B(e.id),className:"rounded-lg bg-primary px-3 py-1.5 text-xs font-medium text-white",children:"View"})})]},e.id))]})]})}),(0,s.jsxs)("div",{className:"flex items-center justify-between border-t border-border p-3 text-sm",children:[(0,s.jsxs)("div",{className:"text-text-muted",children:["Showing ",r.length," of ",_,". Page ",U,"."]}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)("button",{onClick:()=>{let r=Number(e.limit||50),s=Number(e.offset||0);t(e=>({...e,offset:String(Math.max(0,s-r))}))},disabled:0>=Number(e.offset||0),className:"rounded-xl border border-border px-3 py-1.5 disabled:opacity-50",children:"Previous"}),(0,s.jsx)("button",{onClick:()=>{let r=Number(e.limit||50),s=Number(e.offset||0);s+r>=_||t(e=>({...e,offset:String(s+r)}))},disabled:Number(e.offset||0)+Number(e.limit||50)>=_,className:"rounded-xl border border-border px-3 py-1.5 disabled:opacity-50",children:"Next"})]})]})]}),O&&(0,s.jsx)("div",{className:"fixed inset-0 z-[99999] isolate flex items-start justify-center overflow-hidden bg-black/60 p-3 pt-8 md:p-5 md:pt-10",children:(0,s.jsxs)("div",{className:"relative z-[100000] flex h-[78vh] min-h-[520px] max-h-[760px] w-full max-w-[1080px] flex-col overflow-hidden rounded-3xl border border-zinc-200 bg-white shadow-2xl dark:border-zinc-700 dark:bg-zinc-950",children:[R&&(0,s.jsx)("div",{className:"absolute right-5 top-16 z-[100001] rounded-2xl border border-emerald-500/30 bg-emerald-500/10 px-4 py-2 text-sm font-medium text-emerald-600 shadow-lg backdrop-blur dark:bg-emerald-500/15",children:R}),(0,s.jsxs)("div",{className:"flex flex-none items-start justify-between gap-4 border-b border-zinc-200 bg-white px-3 py-2 dark:border-zinc-700 dark:bg-zinc-950",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Prompt Log Detail"}),(0,s.jsx)(f,{stage:O.stage})]}),(0,s.jsxs)("div",{className:"mt-1 truncate text-xs text-text-muted",children:[n(O.created_at)," \xb7 ",m(O)," \xb7"," ",O.session_id||"-"]})]}),(0,s.jsx)("button",{onClick:()=>q(null),className:"rounded-xl border border-zinc-200 bg-white px-3 py-2 text-sm font-medium text-zinc-900 shadow-sm hover:bg-zinc-50 dark:border-zinc-700 dark:bg-zinc-900 dark:text-zinc-100 dark:hover:bg-zinc-800",children:"Close"})]}),(0,s.jsxs)("div",{className:"grid min-h-0 flex-1 grid-cols-1 overflow-hidden bg-zinc-100 dark:bg-zinc-900 lg:grid-cols-[260px_minmax(0,1fr)]",children:[(0,s.jsx)("aside",{className:"min-h-0 overflow-y-auto border-b border-zinc-200 bg-zinc-100 p-3 dark:border-zinc-700 dark:bg-zinc-900 lg:border-b-0 lg:border-r",children:(0,s.jsxs)("div",{className:"grid gap-3",children:[(0,s.jsx)(j,{label:"ID",value:O.id}),(0,s.jsx)(j,{label:"Session",value:O.session_id}),(0,s.jsx)(j,{label:"Model",value:m(O)}),(0,s.jsx)(j,{label:"Combo",value:O.combo_name}),(0,s.jsx)(j,{label:"Provider",value:c(O)||O.provider_url||O.endpoint}),(0,s.jsx)(j,{label:"Source Tool",value:O.source_tool_label||O.source_tool||O.source_format}),(0,s.jsx)(j,{label:"Source Host",value:O.source_host}),(0,s.jsx)(j,{label:"Client IP",value:O.client_ip}),(0,s.jsx)(j,{label:"Client Port",value:O.client_port}),(0,s.jsx)(j,{label:"Client Host",value:O.client_host}),(0,s.jsx)(j,{label:"User Agent",value:O.client_user_agent}),(0,s.jsx)(j,{label:"Endpoint",value:O.endpoint||O.provider_url}),(0,s.jsx)(j,{label:"Source -> Target",value:`${O.source_format||"-"} -> ${O.target_format||"-"}`}),(0,s.jsx)(j,{label:"Status / Error",value:O.error_text||O.status_code||"-"}),(0,s.jsxs)("div",{className:"grid gap-2 pt-2",children:[(0,s.jsx)("button",{onClick:()=>V(O.extracted_prompt_text||O.prompt_text,"side-prompt"),className:`rounded-xl border px-3 py-2 text-sm font-medium shadow-sm transition ${"side-prompt"===F?"border-emerald-500/30 bg-emerald-500/10 text-emerald-600":"border-zinc-200 bg-white text-zinc-900 hover:bg-zinc-50 dark:border-zinc-700 dark:bg-zinc-900 dark:text-zinc-100 dark:hover:bg-zinc-800"}`,children:"side-prompt"===F?"Đ\xe3 copy":"Copy prompt"}),(0,s.jsx)("button",{onClick:()=>V(O.full_request_json,"side-request"),className:`rounded-xl border px-3 py-2 text-sm font-medium shadow-sm transition ${"side-request"===F?"border-emerald-500/30 bg-emerald-500/10 text-emerald-600":"border-zinc-200 bg-white text-zinc-900 hover:bg-zinc-50 dark:border-zinc-700 dark:bg-zinc-900 dark:text-zinc-100 dark:hover:bg-zinc-800"}`,children:"side-request"===F?"Đ\xe3 copy":"Copy request JSON"}),(0,s.jsx)("button",{onClick:()=>V(O.full_response_json,"side-response-json"),className:`rounded-xl border px-3 py-2 text-sm font-medium shadow-sm transition ${"side-response-json"===F?"border-emerald-500/30 bg-emerald-500/10 text-emerald-600":"border-zinc-200 bg-white text-zinc-900 hover:bg-zinc-50 dark:border-zinc-700 dark:bg-zinc-900 dark:text-zinc-100 dark:hover:bg-zinc-800"}`,children:"side-response-json"===F?"Đ\xe3 copy":"Copy response JSON"}),(0,s.jsx)("button",{onClick:W,className:"rounded-xl border border-red-500/40 bg-red-500/10 px-3 py-2 text-sm font-medium text-red-500 shadow-inner hover:bg-red-500/20",children:"Delete row"})]})]})}),(0,s.jsxs)("main",{className:"flex min-h-0 flex-col overflow-hidden bg-zinc-50 dark:bg-zinc-950",children:[(0,s.jsxs)("div",{className:"flex flex-none items-center gap-2 border-b border-zinc-200 bg-white px-3 py-2 dark:border-zinc-700 dark:bg-zinc-950",children:[(0,s.jsx)("div",{className:"flex min-w-0 flex-1 gap-2 overflow-x-auto",children:k(O.stage).map(([e,t])=>(0,s.jsx)("button",{onClick:()=>D(e),className:`whitespace-nowrap rounded-xl px-3 py-2 text-sm ${J===e?"bg-primary text-white shadow-sm":"border border-border bg-surface text-text-main hover:bg-background"}`,children:t},e))}),(0,s.jsx)(u,{copied:F===`tab-${J}`,label:"Copy tab",onClick:()=>V((()=>{if(!O)return"";switch(J){case"prompt":return O.extracted_prompt_text||O.prompt_text||"";case"request":return O.full_request_json||"";case"response":return O.extracted_response_text||O.response_text||"";case"responseJson":return O.full_response_json||"";case"meta":return O.meta_json||"";default:return""}})(),`tab-${J}`)})]}),(0,s.jsxs)("div",{className:"min-h-0 flex-1 overflow-y-auto bg-zinc-50 p-3 dark:bg-zinc-950",children:["prompt"===J&&(0,s.jsxs)("section",{children:[(0,s.jsx)("h3",{className:"mb-2 text-sm font-semibold text-text-main",children:"Extracted prompt text"}),(0,s.jsx)(h,{value:O.extracted_prompt_text||O.prompt_text,empty:"No prompt text"})]}),"request"===J&&(0,s.jsxs)("section",{children:[(0,s.jsx)("h3",{className:"mb-2 text-sm font-semibold text-text-main",children:"Full request JSON"}),(0,s.jsx)(b,{value:O.full_request_json})]}),"response"===J&&(0,s.jsxs)("section",{children:[(0,s.jsx)("h3",{className:"mb-2 text-sm font-semibold text-text-main",children:"Extracted response text"}),(0,s.jsx)(h,{value:O.extracted_response_text||O.response_text,empty:"No response text stored for this stage"})]}),"responseJson"===J&&(0,s.jsxs)("section",{children:[(0,s.jsx)("h3",{className:"mb-2 text-sm font-semibold text-text-main",children:"Full response JSON"}),(0,s.jsx)(b,{value:O.full_response_json})]}),"meta"===J&&(0,s.jsxs)("section",{children:[(0,s.jsx)("h3",{className:"mb-2 text-sm font-semibold text-text-main",children:"Metadata JSON"}),(0,s.jsx)(b,{value:O.meta_json})]})]})]})]})]})})]})}}}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9705],{55478:(e,t,r)=>{"use strict";r.d(t,{default:()=>z});var s=r(95155),a=r(12115);let o={client:"Client request",source:"Source request",openai:"OpenAI normalized",target:"Provider request",provider_response:"Provider response",error:"Error"},l={client:"bg-blue-500/10 text-blue-600 border-blue-500/20",source:"bg-cyan-500/10 text-cyan-600 border-cyan-500/20",openai:"bg-purple-500/10 text-purple-600 border-purple-500/20",target:"bg-orange-500/10 text-orange-600 border-orange-500/20",provider_response:"bg-green-500/10 text-green-600 border-green-500/20",error:"bg-red-500/10 text-red-600 border-red-500/20"};function n(e){if(!e)return"-";try{let t=function(e){if(!e)return"";if(e instanceof Date)return e.toISOString();let t=String(e).trim();if(!t)return"";let r=t.replace(" ","T");return/(?:Z|[+-]\d{2}:?\d{2})$/i.test(r)?r:`${r}Z`}(e),r=new Date(t);if(Number.isNaN(r.getTime()))return String(e);return r.toLocaleString("vi-VN",{timeZone:"Asia/Ho_Chi_Minh",day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})}catch{return e}}function d(e,t=240){let r=String(e||"").replace(/\s+/g," ").trim();return r.length>t?`${r.slice(0,t)}...`:r}function i(e){let t=String(e||"").trim();if(!t)return"";try{return new URL(t).hostname||""}catch{return t.replace(/^https?:\/\//,"").replace(/\/.*$/,"").replace(/:\d+$/,"")}}function c(e){return e?.provider_name||e?.provider_label||e?.provider_id||e?.provider||i(e?.provider_url)||i(e?.endpoint)||""}function x(e){return String(e||"").trim()}function m(e){let t=function(e={}){let t=x(c(e)).toLowerCase(),r=x(e.owner_user||e.ownerUser),s=x(e.account_email||e.accountEmail||e.email);if(!t||!r||!s||!function(e={}){let t=x(e?.display_model);return e?.isPersonalOAuth===!0||e?.is_personal_oauth===!0||e?.connection_scope==="personal"||e?.connectionScope==="personal"||e?.visibility==="private"||!!(e?.owner_user||e?.ownerUser)||/^[^/]+\/[^/]+@[^/]+\/[^/]+\//.test(t)}(e))return"";let a=x(e.model||e.rawModel||e.raw_model);if(!a){let t=x(e.display_model);if(t){let e=t.split("/").filter(Boolean);a=e[e.length-1]||""}}return a&&"-"!==a?(a.startsWith(`${t}/`)&&(a=a.slice(t.length+1)),`${r}/${s}/${t}/${a}`):""}(e);if(t)return t;if(e?.display_model)return e.display_model;let r=e?.model||"-",s=c(e);return!s||"-"===r||String(r).startsWith(`${s}/`)?r:`${s}/${r}`}function p(e){if(!e)return null;if("object"==typeof e)return e;try{return JSON.parse(e)}catch{return null}}function u({copied:e,onClick:t,label:r="Copy"}){return(0,s.jsx)("button",{type:"button",onClick:t,className:`rounded-xl border px-3 py-1.5 text-xs font-medium shadow-sm transition ${e?"border-emerald-500/30 bg-emerald-500/10 text-emerald-600":"border-zinc-200 bg-white text-zinc-900 hover:bg-zinc-50 dark:border-zinc-700 dark:bg-zinc-900 dark:text-zinc-100 dark:hover:bg-zinc-800"}`,children:e?"Đ\xe3 copy":r})}function b({value:e}){let t=p(e),r=t?JSON.stringify(t,null,2):String(e||"");return(0,s.jsx)("pre",{className:"max-h-[42vh] max-w-full overflow-auto whitespace-pre-wrap break-words rounded-2xl bg-zinc-950 p-4 text-xs leading-relaxed text-zinc-100 shadow-inner [overflow-wrap:anywhere]",children:r||"No JSON"})}function h({value:e,empty:t="No content"}){return(0,s.jsx)("pre",{className:"max-h-[42vh] max-w-full overflow-auto whitespace-pre-wrap break-words rounded-2xl border border-zinc-200 bg-white p-4 font-mono text-xs leading-relaxed text-zinc-950 shadow-sm [overflow-wrap:anywhere] dark:border-zinc-700 dark:bg-zinc-900 dark:text-zinc-100",children:e||t})}function g({label:e,value:t}){return(0,s.jsxs)("div",{className:"rounded-2xl border border-border bg-surface p-4 shadow-sm",children:[(0,s.jsx)("div",{className:"text-xs uppercase tracking-wide text-text-muted",children:e}),(0,s.jsx)("div",{className:"mt-1 text-2xl font-semibold text-text-main",children:t})]})}function f({stage:e}){let t=l[e]||"bg-surface text-text-main border-border";return(0,s.jsx)("span",{className:`inline-flex items-center rounded-full border px-2.5 py-1 text-xs font-medium ${t}`,children:o[e]||e||"-"})}function j({label:e,value:t}){return(0,s.jsxs)("div",{className:"rounded-2xl border border-zinc-200 bg-white p-3 shadow-sm dark:border-zinc-700 dark:bg-zinc-950",children:[(0,s.jsx)("div",{className:"text-[11px] font-semibold uppercase tracking-wide text-text-muted",children:e}),(0,s.jsx)("pre",{className:"mt-2 whitespace-pre-wrap break-words font-mono text-xs leading-relaxed text-text-main",children:t||"-"})]})}let N=["prompt","Prompt"],w=["request","Request JSON"],v=["response","Response text"],y=["responseJson","Response JSON"],_=["meta","Metadata"];function k(e){return"provider_response"===e?[v,y,_]:"client"===e||"source"===e||"openai"===e||"target"===e?[N,w,_]:[N,w,v,y,_]}function z(){let[e,t]=(0,a.useState)({keyword:"",model:"",stage:"",comboName:"",sourceTool:"",clientIp:"",sessionId:"",dateFrom:"",dateTo:"",limit:"50",offset:"0"}),[r,l]=(0,a.useState)([]),[i,x]=(0,a.useState)([]),[N,w]=(0,a.useState)([]),[v,y]=(0,a.useState)([]),[_,z]=(0,a.useState)(0),[S,C]=(0,a.useState)(null),[$,T]=(0,a.useState)(""),[I,P]=(0,a.useState)(""),[E,M]=(0,a.useState)(!1),[O,q]=(0,a.useState)(null),[J,D]=(0,a.useState)("prompt"),[F,L]=(0,a.useState)(""),[R,A]=(0,a.useState)(""),U=(0,a.useMemo)(()=>{let t=Number(e.limit||50);return Math.floor(Number(e.offset||0)/t)+1},[e.limit,e.offset]),H=(0,a.useCallback)(async()=>{M(!0),P(""),T("");try{let t=new URLSearchParams;Object.entries(e).forEach(([e,r])=>{String(r||"").trim()&&t.set(e,String(r).trim())});let r=await fetch(`/api/dashboard/prompt-logs?${t}`),s=await r.json();if(!r.ok)throw Error(s.error||"Failed to load prompt logs");l(s.rows||[]),x(s.models||[]),w(s.stages||[]),y(s.combos||[]),z(s.total||0),C(s.dbInfo||null),s.disabled&&T("Database prompt logging is disabled. Enable it in Dashboard -> MITM -> Prompt Log Database."),s.missing&&T("Prompt log database/table has no data yet, or the configured database is not initialized.")}catch(e){P(e.message||"Failed to load prompt logs")}finally{M(!1)}},[e]);(0,a.useEffect)(()=>{H()},[H]);let Z=e=>{t(t=>({...t,...e,offset:void 0!==e.offset?e.offset:"0"}))},B=async e=>{P("");try{var t;let r=await fetch(`/api/dashboard/prompt-logs/${encodeURIComponent(e)}`),s=await r.json();if(!r.ok)throw Error(s.error||"Failed to load detail");q(s.row),D((t=s.row?.stage,k(t)?.[0]?.[0]||"meta"))}catch(e){P(e.message||"Failed to load detail")}},V=async(e,t="copy")=>{let r=function(e){if(null==e||""===e)return"";if("string"==typeof e){let t=p(e);return t?JSON.stringify(t,null,2):e}if("object"==typeof e)try{return JSON.stringify(e,null,2)}catch{}return String(e)}(e);await navigator.clipboard.writeText(r),L(t),A("Đ\xe3 copy v\xe0o clipboard"),window.setTimeout(()=>{L(e=>e===t?"":e)},2200),window.setTimeout(()=>{A("")},2600)},W=async()=>{O?.id&&confirm("Delete this prompt log row?")&&(await fetch(`/api/dashboard/prompt-logs/${encodeURIComponent(O.id)}`,{method:"DELETE"})).ok&&(q(null),H())};return(0,a.useEffect)(()=>{if(!O)return;let e=k(O.stage);e.some(([e])=>e===J)||D(e[0]?.[0]||"meta")},[O,J]),(0,s.jsxs)("div",{className:"flex w-full max-w-none flex-col gap-5 p-3 md:p-4 lg:p-6",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-2 md:flex-row md:items-end md:justify-between",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h1",{className:"text-2xl font-semibold text-text-main",children:"Prompt Logs"}),(0,s.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"Search Copilot/MITM prompts across the currently configured prompt log database."})]}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,s.jsx)("a",{href:"/dashboard/mitm",className:"rounded-xl border border-border px-3 py-2 text-sm hover:bg-surface",children:"MITM Settings"}),(0,s.jsx)("button",{onClick:H,disabled:E,className:"rounded-xl bg-primary px-3 py-2 text-sm font-medium text-white disabled:opacity-50",children:E?"Loading...":"Refresh"})]})]}),$&&(0,s.jsx)("div",{className:"rounded-2xl border border-yellow-500/30 bg-yellow-500/10 p-4 text-sm text-yellow-700 dark:text-yellow-300",children:$}),I&&(0,s.jsx)("div",{className:"rounded-2xl border border-red-500/30 bg-red-500/10 p-4 text-sm text-red-500",children:I}),(0,s.jsxs)("div",{className:"grid gap-4 md:grid-cols-4",children:[(0,s.jsx)(g,{label:"Matching rows",value:_}),(0,s.jsx)(g,{label:"Loaded rows",value:r.length}),(0,s.jsx)(g,{label:"Page",value:U}),(0,s.jsx)(g,{label:"Database",value:S?.type||"-"})]}),S&&(0,s.jsxs)("div",{className:"rounded-2xl border border-border bg-surface p-3 text-xs text-text-muted",children:["DB: ",(0,s.jsx)("code",{children:S.type}),S.host?(0,s.jsxs)(s.Fragment,{children:[" ","\xb7 Host: ",(0,s.jsx)("code",{children:S.host})]}):null,S.database?(0,s.jsxs)(s.Fragment,{children:[" ","\xb7 Database: ",(0,s.jsx)("code",{children:S.database})]}):null]}),(0,s.jsx)("div",{className:"rounded-2xl border border-border bg-surface p-4 shadow-sm",children:(0,s.jsxs)("div",{className:"grid gap-3 md:grid-cols-4 xl:grid-cols-6",children:[(0,s.jsxs)("label",{className:"flex flex-col gap-1 text-xs",children:[(0,s.jsx)("span",{className:"text-text-muted",children:"Keyword"}),(0,s.jsx)("input",{value:e.keyword,onChange:e=>Z({keyword:e.target.value}),placeholder:"prompt, code, model, error...",className:"rounded-xl border border-border bg-background px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-primary/30"})]}),(0,s.jsxs)("label",{className:"flex flex-col gap-1 text-xs",children:[(0,s.jsx)("span",{className:"text-text-muted",children:"Model"}),(0,s.jsxs)("select",{value:e.model,onChange:e=>Z({model:e.target.value}),className:"rounded-xl border border-border bg-background px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-primary/30",children:[(0,s.jsx)("option",{value:"",children:"All models"}),i.map(e=>(0,s.jsx)("option",{value:e,children:e},e))]})]}),(0,s.jsxs)("label",{className:"flex flex-col gap-1 text-xs",children:[(0,s.jsx)("span",{className:"text-text-muted",children:"Stage"}),(0,s.jsxs)("select",{value:e.stage,onChange:e=>Z({stage:e.target.value}),className:"rounded-xl border border-border bg-background px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-primary/30",children:[(0,s.jsx)("option",{value:"",children:"All stages"}),N.map(e=>(0,s.jsx)("option",{value:e,children:o[e]||e},e))]})]}),(0,s.jsxs)("label",{className:"flex flex-col gap-1 text-xs",children:[(0,s.jsx)("span",{className:"text-text-muted",children:"Combo"}),(0,s.jsxs)("select",{value:e.comboName,onChange:e=>Z({comboName:e.target.value}),className:"rounded-xl border border-border bg-background px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-primary/30",children:[(0,s.jsx)("option",{value:"",children:"All combos"}),v.map(e=>(0,s.jsx)("option",{value:e,children:e},e))]})]}),(0,s.jsxs)("label",{className:"flex flex-col gap-1 text-xs",children:[(0,s.jsx)("span",{className:"text-text-muted",children:"Tool"}),(0,s.jsx)("input",{value:e.sourceTool,onChange:e=>Z({sourceTool:e.target.value}),placeholder:"copilot, antigravity...",className:"rounded-xl border border-border bg-background px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-primary/30"})]}),(0,s.jsxs)("label",{className:"flex flex-col gap-1 text-xs",children:[(0,s.jsx)("span",{className:"text-text-muted",children:"Client IP"}),(0,s.jsx)("input",{value:e.clientIp,onChange:e=>Z({clientIp:e.target.value}),placeholder:"172.16.253.1",className:"rounded-xl border border-border bg-background px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-primary/30"})]}),(0,s.jsxs)("label",{className:"flex flex-col gap-1 text-xs",children:[(0,s.jsx)("span",{className:"text-text-muted",children:"Session ID"}),(0,s.jsx)("input",{value:e.sessionId,onChange:e=>Z({sessionId:e.target.value}),placeholder:"session id",className:"rounded-xl border border-border bg-background px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-primary/30"})]}),(0,s.jsxs)("label",{className:"flex flex-col gap-1 text-xs",children:[(0,s.jsx)("span",{className:"text-text-muted",children:"From"}),(0,s.jsx)("input",{type:"datetime-local",value:e.dateFrom,onChange:e=>Z({dateFrom:e.target.value}),className:"rounded-xl border border-border bg-background px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-primary/30"})]}),(0,s.jsxs)("label",{className:"flex flex-col gap-1 text-xs",children:[(0,s.jsx)("span",{className:"text-text-muted",children:"To"}),(0,s.jsx)("input",{type:"datetime-local",value:e.dateTo,onChange:e=>Z({dateTo:e.target.value}),className:"rounded-xl border border-border bg-background px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-primary/30"})]}),(0,s.jsxs)("label",{className:"flex flex-col gap-1 text-xs",children:[(0,s.jsx)("span",{className:"text-text-muted",children:"Limit"}),(0,s.jsxs)("select",{value:e.limit,onChange:e=>Z({limit:e.target.value}),className:"rounded-xl border border-border bg-background px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-primary/30",children:[(0,s.jsx)("option",{value:"25",children:"25"}),(0,s.jsx)("option",{value:"50",children:"50"}),(0,s.jsx)("option",{value:"100",children:"100"}),(0,s.jsx)("option",{value:"200",children:"200"})]})]}),(0,s.jsxs)("div",{className:"flex items-end gap-2",children:[(0,s.jsx)("button",{onClick:()=>t({keyword:"",model:"",stage:"",comboName:"",sourceTool:"",clientIp:"",sessionId:"",dateFrom:"",dateTo:"",limit:"50",offset:"0"}),className:"rounded-xl border border-border px-3 py-2 text-sm hover:bg-background",children:"Reset"}),(0,s.jsx)("button",{onClick:H,className:"rounded-xl bg-primary px-3 py-2 text-sm font-medium text-white",children:"Search"})]})]})}),(0,s.jsxs)("div",{className:"overflow-hidden rounded-2xl border border-border bg-surface shadow-sm",children:[(0,s.jsx)("div",{className:"overflow-x-auto",children:(0,s.jsxs)("table",{className:"w-full min-w-[1400px] table-fixed text-left text-sm",children:[(0,s.jsxs)("colgroup",{children:[(0,s.jsx)("col",{className:"w-[9%]"}),(0,s.jsx)("col",{className:"w-[8%]"}),(0,s.jsx)("col",{className:"w-[8%]"}),(0,s.jsx)("col",{className:"w-[8%]"}),(0,s.jsx)("col",{className:"w-[9%]"}),(0,s.jsx)("col",{className:"w-[9%]"}),(0,s.jsx)("col",{className:"w-[9%]"}),(0,s.jsx)("col",{className:"w-[25%]"}),(0,s.jsx)("col",{className:"w-[12%]"}),(0,s.jsx)("col",{className:"w-[5%]"})]}),(0,s.jsx)("thead",{className:"border-b border-border bg-background/60 text-xs uppercase tracking-wide text-text-muted",children:(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{className:"px-4 py-3",children:"Time"}),(0,s.jsx)("th",{className:"px-4 py-3",children:"Stage"}),(0,s.jsx)("th",{className:"px-4 py-3",children:"Tool"}),(0,s.jsx)("th",{className:"px-4 py-3",children:"Client IP"}),(0,s.jsx)("th",{className:"px-4 py-3",children:"Model"}),(0,s.jsx)("th",{className:"px-4 py-3",children:"Combo"}),(0,s.jsx)("th",{className:"px-4 py-3",children:"Session"}),(0,s.jsx)("th",{className:"px-4 py-3",children:"Prompt/Response preview"}),(0,s.jsx)("th",{className:"px-4 py-3",children:"Status/Error"}),(0,s.jsx)("th",{className:"sticky right-0 z-20 bg-background/95 px-4 py-3 text-right shadow-[-8px_0_12px_-12px_rgba(0,0,0,0.45)]",children:"Action"})]})}),(0,s.jsxs)("tbody",{children:[0===r.length&&(0,s.jsx)("tr",{children:(0,s.jsx)("td",{colSpan:10,className:"px-4 py-10 text-center text-text-muted",children:"No prompt logs found."})}),r.map(e=>(0,s.jsxs)("tr",{className:"border-b border-border/70 hover:bg-background/50",children:[(0,s.jsx)("td",{className:"whitespace-nowrap px-4 py-3 text-xs text-text-muted align-top",children:n(e.created_at)}),(0,s.jsx)("td",{className:"px-4 py-3 align-top",children:(0,s.jsx)(f,{stage:e.stage})}),(0,s.jsx)("td",{className:"min-w-0 px-4 py-3 align-top",children:(0,s.jsx)("span",{className:"inline-flex max-w-full items-center truncate rounded-full border border-border bg-surface/70 px-2.5 py-1 text-xs font-medium text-text-main",children:e.source_tool_label||e.source_tool||e.source_format||"-"})}),(0,s.jsx)("td",{className:"min-w-0 truncate px-4 py-3 align-top font-mono text-xs text-text-muted",title:e.client_ip||"-",children:e.client_ip||"-"}),(0,s.jsx)("td",{className:"min-w-0 truncate px-4 py-3 align-top font-mono text-xs",title:m(e),children:m(e)}),(0,s.jsx)("td",{className:"min-w-0 truncate px-4 py-3 align-top font-mono text-xs text-text-muted",title:e.combo_name||"-",children:e.combo_name||"-"}),(0,s.jsx)("td",{className:"min-w-0 truncate px-4 py-3 align-top font-mono text-xs text-text-muted",title:e.session_id||"-",children:e.session_id||"-"}),(0,s.jsx)("td",{className:"max-w-0 px-4 py-3 align-top text-xs",children:(0,s.jsx)("div",{className:"max-h-24 overflow-hidden whitespace-normal break-words leading-relaxed [overflow-wrap:anywhere]",children:d(e?.stage==="provider_response"?e.response_preview||e.prompt_preview||"":e?.prompt_preview||e?.response_preview||"",620)||(0,s.jsx)("span",{className:"text-text-muted",children:"No prompt/response text"})})}),(0,s.jsx)("td",{className:"max-w-0 px-4 py-3 align-top text-xs",children:e.error_text?(0,s.jsx)("div",{className:"max-h-28 overflow-y-auto whitespace-pre-wrap break-words leading-relaxed text-red-500 [overflow-wrap:anywhere]",children:d(e.error_text,420)}):(0,s.jsx)("span",{className:e.status_code?"font-mono text-text-main":"text-text-muted",children:e.status_code||"-"})}),(0,s.jsx)("td",{className:"sticky right-0 z-10 bg-surface px-4 py-3 text-right align-top shadow-[-8px_0_12px_-12px_rgba(0,0,0,0.35)]",children:(0,s.jsx)("button",{onClick:()=>B(e.id),className:"rounded-lg bg-primary px-3 py-1.5 text-xs font-medium text-white",children:"View"})})]},e.id))]})]})}),(0,s.jsxs)("div",{className:"flex items-center justify-between border-t border-border p-3 text-sm",children:[(0,s.jsxs)("div",{className:"text-text-muted",children:["Showing ",r.length," of ",_,". Page ",U,"."]}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)("button",{onClick:()=>{let r=Number(e.limit||50),s=Number(e.offset||0);t(e=>({...e,offset:String(Math.max(0,s-r))}))},disabled:0>=Number(e.offset||0),className:"rounded-xl border border-border px-3 py-1.5 disabled:opacity-50",children:"Previous"}),(0,s.jsx)("button",{onClick:()=>{let r=Number(e.limit||50),s=Number(e.offset||0);s+r>=_||t(e=>({...e,offset:String(s+r)}))},disabled:Number(e.offset||0)+Number(e.limit||50)>=_,className:"rounded-xl border border-border px-3 py-1.5 disabled:opacity-50",children:"Next"})]})]})]}),O&&(0,s.jsx)("div",{className:"fixed inset-0 z-[99999] isolate flex items-start justify-center overflow-hidden bg-black/60 p-3 pt-8 md:p-5 md:pt-10",children:(0,s.jsxs)("div",{className:"relative z-[100000] flex h-[78vh] min-h-[520px] max-h-[760px] w-full max-w-[1080px] flex-col overflow-hidden rounded-3xl border border-zinc-200 bg-white shadow-2xl dark:border-zinc-700 dark:bg-zinc-950",children:[R&&(0,s.jsx)("div",{className:"absolute right-5 top-16 z-[100001] rounded-2xl border border-emerald-500/30 bg-emerald-500/10 px-4 py-2 text-sm font-medium text-emerald-600 shadow-lg backdrop-blur dark:bg-emerald-500/15",children:R}),(0,s.jsxs)("div",{className:"flex flex-none items-start justify-between gap-4 border-b border-zinc-200 bg-white px-3 py-2 dark:border-zinc-700 dark:bg-zinc-950",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Prompt Log Detail"}),(0,s.jsx)(f,{stage:O.stage})]}),(0,s.jsxs)("div",{className:"mt-1 truncate text-xs text-text-muted",children:[n(O.created_at)," \xb7 ",m(O)," \xb7"," ",O.session_id||"-"]})]}),(0,s.jsx)("button",{onClick:()=>q(null),className:"rounded-xl border border-zinc-200 bg-white px-3 py-2 text-sm font-medium text-zinc-900 shadow-sm hover:bg-zinc-50 dark:border-zinc-700 dark:bg-zinc-900 dark:text-zinc-100 dark:hover:bg-zinc-800",children:"Close"})]}),(0,s.jsxs)("div",{className:"grid min-h-0 flex-1 grid-cols-1 overflow-hidden bg-zinc-100 dark:bg-zinc-900 lg:grid-cols-[260px_minmax(0,1fr)]",children:[(0,s.jsx)("aside",{className:"min-h-0 overflow-y-auto border-b border-zinc-200 bg-zinc-100 p-3 dark:border-zinc-700 dark:bg-zinc-900 lg:border-b-0 lg:border-r",children:(0,s.jsxs)("div",{className:"grid gap-3",children:[(0,s.jsx)(j,{label:"ID",value:O.id}),(0,s.jsx)(j,{label:"Session",value:O.session_id}),(0,s.jsx)(j,{label:"Model",value:m(O)}),(0,s.jsx)(j,{label:"Combo",value:O.combo_name}),(0,s.jsx)(j,{label:"Provider",value:c(O)||O.provider_url||O.endpoint}),(0,s.jsx)(j,{label:"Source Tool",value:O.source_tool_label||O.source_tool||O.source_format}),(0,s.jsx)(j,{label:"Source Host",value:O.source_host}),(0,s.jsx)(j,{label:"Client IP",value:O.client_ip}),(0,s.jsx)(j,{label:"Client Port",value:O.client_port}),(0,s.jsx)(j,{label:"Client Host",value:O.client_host}),(0,s.jsx)(j,{label:"User Agent",value:O.client_user_agent}),(0,s.jsx)(j,{label:"Endpoint",value:O.endpoint||O.provider_url}),(0,s.jsx)(j,{label:"Source -> Target",value:`${O.source_format||"-"} -> ${O.target_format||"-"}`}),(0,s.jsx)(j,{label:"Status / Error",value:O.error_text||O.status_code||"-"}),(0,s.jsxs)("div",{className:"grid gap-2 pt-2",children:[(0,s.jsx)("button",{onClick:()=>V(O.extracted_prompt_text||O.prompt_text,"side-prompt"),className:`rounded-xl border px-3 py-2 text-sm font-medium shadow-sm transition ${"side-prompt"===F?"border-emerald-500/30 bg-emerald-500/10 text-emerald-600":"border-zinc-200 bg-white text-zinc-900 hover:bg-zinc-50 dark:border-zinc-700 dark:bg-zinc-900 dark:text-zinc-100 dark:hover:bg-zinc-800"}`,children:"side-prompt"===F?"Đ\xe3 copy":"Copy prompt"}),(0,s.jsx)("button",{onClick:()=>V(O.full_request_json,"side-request"),className:`rounded-xl border px-3 py-2 text-sm font-medium shadow-sm transition ${"side-request"===F?"border-emerald-500/30 bg-emerald-500/10 text-emerald-600":"border-zinc-200 bg-white text-zinc-900 hover:bg-zinc-50 dark:border-zinc-700 dark:bg-zinc-900 dark:text-zinc-100 dark:hover:bg-zinc-800"}`,children:"side-request"===F?"Đ\xe3 copy":"Copy request JSON"}),(0,s.jsx)("button",{onClick:()=>V(O.full_response_json,"side-response-json"),className:`rounded-xl border px-3 py-2 text-sm font-medium shadow-sm transition ${"side-response-json"===F?"border-emerald-500/30 bg-emerald-500/10 text-emerald-600":"border-zinc-200 bg-white text-zinc-900 hover:bg-zinc-50 dark:border-zinc-700 dark:bg-zinc-900 dark:text-zinc-100 dark:hover:bg-zinc-800"}`,children:"side-response-json"===F?"Đ\xe3 copy":"Copy response JSON"}),(0,s.jsx)("button",{onClick:W,className:"rounded-xl border border-red-500/40 bg-red-500/10 px-3 py-2 text-sm font-medium text-red-500 shadow-inner hover:bg-red-500/20",children:"Delete row"})]})]})}),(0,s.jsxs)("main",{className:"flex min-h-0 flex-col overflow-hidden bg-zinc-50 dark:bg-zinc-950",children:[(0,s.jsxs)("div",{className:"flex flex-none items-center gap-2 border-b border-zinc-200 bg-white px-3 py-2 dark:border-zinc-700 dark:bg-zinc-950",children:[(0,s.jsx)("div",{className:"flex min-w-0 flex-1 gap-2 overflow-x-auto",children:k(O.stage).map(([e,t])=>(0,s.jsx)("button",{onClick:()=>D(e),className:`whitespace-nowrap rounded-xl px-3 py-2 text-sm ${J===e?"bg-primary text-white shadow-sm":"border border-border bg-surface text-text-main hover:bg-background"}`,children:t},e))}),(0,s.jsx)(u,{copied:F===`tab-${J}`,label:"Copy tab",onClick:()=>V((()=>{if(!O)return"";switch(J){case"prompt":return O.extracted_prompt_text||O.prompt_text||"";case"request":return O.full_request_json||"";case"response":return O.extracted_response_text||O.response_text||"";case"responseJson":return O.full_response_json||"";case"meta":return O.meta_json||"";default:return""}})(),`tab-${J}`)})]}),(0,s.jsxs)("div",{className:"min-h-0 flex-1 overflow-y-auto bg-zinc-50 p-3 dark:bg-zinc-950",children:["prompt"===J&&(0,s.jsxs)("section",{children:[(0,s.jsx)("h3",{className:"mb-2 text-sm font-semibold text-text-main",children:"Extracted prompt text"}),(0,s.jsx)(h,{value:O.extracted_prompt_text||O.prompt_text,empty:"No prompt text"})]}),"request"===J&&(0,s.jsxs)("section",{children:[(0,s.jsx)("h3",{className:"mb-2 text-sm font-semibold text-text-main",children:"Full request JSON"}),(0,s.jsx)(b,{value:O.full_request_json})]}),"response"===J&&(0,s.jsxs)("section",{children:[(0,s.jsx)("h3",{className:"mb-2 text-sm font-semibold text-text-main",children:"Extracted response text"}),(0,s.jsx)(h,{value:O.extracted_response_text||O.response_text,empty:"No response text stored for this stage"})]}),"responseJson"===J&&(0,s.jsxs)("section",{children:[(0,s.jsx)("h3",{className:"mb-2 text-sm font-semibold text-text-main",children:"Full response JSON"}),(0,s.jsx)(b,{value:O.full_response_json})]}),"meta"===J&&(0,s.jsxs)("section",{children:[(0,s.jsx)("h3",{className:"mb-2 text-sm font-semibold text-text-main",children:"Metadata JSON"}),(0,s.jsx)(b,{value:O.meta_json})]})]})]})]})]})})]})}},79705:(e,t,r)=>{Promise.resolve().then(r.bind(r,55478))}}]);
|
|
@@ -36,4 +36,4 @@ wire_api = "responses"
|
|
|
36
36
|
[profiles.fast]
|
|
37
37
|
model = "${n||s||"programmer-fast"}"
|
|
38
38
|
model_provider = "bluerouter"`}({baseUrl:tF,codingModel:tZ.codingModel,fastModel:tZ.fastModel}):"",tX=td?['npm install -g @openai/codex\ncodex --version\nmkdir $env:USERPROFILE\\.codex -Force\n$utf8NoBom = New-Object System.Text.UTF8Encoding $false\n[System.IO.File]::WriteAllText("$env:USERPROFILE\\.codex\\config.toml", @\'',tQ,"'@, $utf8NoBom)",`$env:OPENAI_API_KEY = "${td.key}"`,`setx OPENAI_API_KEY "${td.key}"`,"cd D:\\path\\to\\your-project\ncodex"].join("\n"):"",t0=tm?m(tm,tU):{codingModel:tU||"YOUR_MODEL",fastModel:tU||"YOUR_MODEL"},t1=tm?function({baseUrl:e,apiKey:t,codingModel:n,fastModel:s}){let r=n||"programmer",l=s||r||"programmer-fast",a=e||"https://models-gateway.example.com/v1";return JSON.stringify({env:{OPENAI_API_KEY:t||"sk-xxxxx"},security:{auth:{selectedType:"openai"}},model:{name:r},modelProviders:{openai:[{id:r,name:r,envKey:"OPENAI_API_KEY",baseUrl:a,generationConfig:{timeout:12e4,maxRetries:2,contextWindowSize:12e4,samplingParams:{temperature:.2}}},{id:l,name:l,envKey:"OPENAI_API_KEY",baseUrl:a,generationConfig:{timeout:6e4,maxRetries:2,reasoning:!1,contextWindowSize:12e4,samplingParams:{temperature:.2,max_tokens:4096}}}]}},null,2)}({baseUrl:tK,apiKey:tm.key,codingModel:t0.codingModel,fastModel:t0.fastModel}):"",t2=tm?['npm install -g @qwen-code/qwen-code\nqwen --version\nmkdir $env:USERPROFILE\\.qwen -Force\n$utf8NoBom = New-Object System.Text.UTF8Encoding $false\n[System.IO.File]::WriteAllText("$env:USERPROFILE\\.qwen\\settings.json", @\'',t1,"'@, $utf8NoBom)",`$env:OPENAI_API_KEY = "${tm.key}"`,`$env:OPENAI_BASE_URL = "${tK}"`,`$env:OPENAI_MODEL = "${t0.codingModel}"`,`setx OPENAI_API_KEY "${tm.key}"`,`setx OPENAI_BASE_URL "${tK}"`,`setx OPENAI_MODEL "${t0.codingModel}"`,"cd D:\\path\\to\\your-project\nqwen"].join("\n"):"",t3=(0,r.useMemo)(()=>{let e=new Map;for(let t of B){let n=d(t.username||t.email||t.userPrincipalName||t.sAMAccountName);n&&e.set(n,{id:n,label:`${t.displayName||t.username||n}${t.email?` \xb7 ${t.email}`:""}`})}for(let t of h){let n=d(t.ownerUser||t.createdByUser);n&&!e.has(n)&&e.set(n,{id:n,label:n})}return t$&&!e.has(t$)&&e.set(t$,{id:t$,label:`${t$} (t\xf4i)`}),[...e.values()].sort((e,t)=>e.label.localeCompare(t.label))},[B,h,t$]),t5=(n=c(X),x=c(Z),!(n.length===x.length&&n.every((e,t)=>e===x[t]))),t4=J||!I.trim()||0===Z.length||t_,t8=!!tp||"all"!==tg,t7=async()=>{C(!0),S("");try{let e=new URLSearchParams;e.set("page",String(tj)),e.set("pageSize",String(tv)),tp&&e.set("q",tp),"all"!==tg&&e.set("status",tg);let t=await fetch(`/api/keys?${e.toString()}`,{cache:"no-store"}),n=await t.json().catch(()=>({}));if(!t.ok)throw Error(n.error||"Kh\xf4ng tải được danh s\xe1ch API keys");let s=n.keys||[],r=n.pagination||{page:tj,pageSize:tv,total:s.length,totalAll:s.length,totalPages:1,search:tp,status:tg};if(0===s.length&&Number(r.total||0)>0&&tj>1)return void ty(Math.max(1,Number(r.totalPages||1)));let l=c(n.apiKeyDefaultModels||(n.apiKeyDefaultModel?[n.apiKeyDefaultModel]:[]));p(s),tw(r),eV(n.apiKeyTotal??r.totalAll??r.total??s.length);let a=g(n.apiKeyDefaultPolicy||o,o);Q(l),ee(l),er(a),ea(a),eH(n.apiKeyLimit??5),eY(n.apiKeyCount??r.totalAll??s.length),"number"==typeof n.globalApiKeyLimit&&n.globalApiKeyLimit>0&&(eQ(n.globalApiKeyLimit),e0(String(n.globalApiKeyLimit))),n.apiKeyLimitOverrides&&"object"==typeof n.apiKeyLimitOverrides&&e5(n.apiKeyLimitOverrides),eq(!0===n.globalCavemanEnabled),ez(n.globalCavemanLevel||"full")}catch(e){S(e.message||"Kh\xf4ng tải được danh s\xe1ch API keys")}finally{C(!1)}};(0,r.useEffect)(()=>{tn(window.location.origin)},[]),(0,r.useEffect)(()=>{let e=setTimeout(()=>{ty(1),tb(tu.trim())},350);return()=>clearTimeout(e)},[tu]),(0,r.useEffect)(()=>{t7()},[tj,tv,tp,tg]),(0,r.useEffect)(()=>{let e=!1,t=async()=>{try{let t=await fetch("/api/keys?page=1&pageSize=1",{cache:"no-store"}),n=await t.json().catch(()=>({}));if(!t.ok||e)return;eq(!0===n.globalCavemanEnabled),ez(n.globalCavemanLevel||"full")}catch{}},n=()=>t(),s=()=>{"visible"===document.visibilityState&&t()};window.addEventListener("focus",n),document.addEventListener("visibilitychange",s);let r=window.setInterval(t,3e4);return()=>{e=!0,window.removeEventListener("focus",n),document.removeEventListener("visibilitychange",s),window.clearInterval(r)}},[]),(0,r.useEffect)(()=>{!L&&t$&&M(t$)},[t$,L]);let t9=async()=>{if(!eg&&!ej){ey(!0);try{let[e,t,n]=await Promise.allSettled([tI?fetch("/api/providers",{cache:"no-store"}):Promise.resolve(null),fetch("/api/personal-cloud-providers",{cache:"no-store"}),fetch("/api/models/alias",{cache:"no-store"})]),s=[],r=[];if("fulfilled"===e.status&&e.value?.ok){let t=await e.value.json().catch(()=>({}));s.push(...t.connections||[])}if("fulfilled"===t.status&&t.value.ok){let e=await t.value.json().catch(()=>({}));r.push(...e.connections||[])}if(eh(tI?[...s,...r]:r),"fulfilled"===n.status&&n.value.ok){let e=await n.value.json().catch(()=>({}));eb(e.aliases||{})}ef(!0)}catch{}finally{ey(!1)}}},t6=async(e=W)=>{if(tI){Y(!0);try{let t=await fetch(`/api/auth/ldap/users?q=${encodeURIComponent(e||"")}`,{cache:"no-store"}),n=await t.json().catch(()=>({}));t.ok&&z(n.users||[])}catch{}finally{Y(!1)}}},ne=async()=>{if(tI&&0!==X.length){en(!0),S("");try{let e=await fetch("/api/keys",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiKeyDefaultModels:X})}),t=await e.json().catch(()=>({}));if(!e.ok)throw Error(t.error||"Kh\xf4ng lưu được default models");let n=c(t.apiKeyDefaultModels||(t.apiKeyDefaultModel?[t.apiKeyDefaultModel]:[])),s=g(t.apiKeyDefaultPolicy||o,o);Q(n),ee(n),er(s),ea(s)}catch(e){S(e.message||"Kh\xf4ng lưu được default models")}finally{en(!1)}}},nt=e=>{"number"==typeof e?.globalApiKeyLimit&&e.globalApiKeyLimit>0&&(eQ(e.globalApiKeyLimit),e0(String(e.globalApiKeyLimit))),e?.apiKeyLimitOverrides&&"object"==typeof e.apiKeyLimitOverrides&&e5(e.apiKeyLimitOverrides)},nn=async()=>{if(!tI)return;let e=Number.parseInt(eX,10);if(!Number.isFinite(e)||e<=0)return void S("Giới hạn global phải l\xe0 số nguy\xean dương.");e2(!0),S("");try{let t=await fetch("/api/keys",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({userApiKeyLimit:e})}),n=await t.json().catch(()=>({}));if(!t.ok)throw Error(n.error||"Kh\xf4ng lưu được global API key limit");nt(n)}catch(e){S(e.message||"Kh\xf4ng lưu được global API key limit")}finally{e2(!1)}},ns=async e=>{if(!tI)return!1;te(!0),S("");try{let t=await fetch("/api/keys",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({userApiKeyLimitOverrides:e})}),n=await t.json().catch(()=>({}));if(!t.ok)throw Error(n.error||"Kh\xf4ng lưu được per-user override");return nt(n),!0}catch(e){return S(e.message||"Kh\xf4ng lưu được per-user override"),!1}finally{te(!1)}},nr=async()=>{let e=d(e4),t=Number.parseInt(e7,10);if(!e)return void S("Nhập username/email cần override.");if(!Number.isFinite(t)||t<=0)return void S("Giới hạn per-user phải l\xe0 số nguy\xean dương.");let n={...e3,[e]:t};await ns(n)&&(e8(""),e9(""))},nl=async e=>{let t={...e3};delete t[e],await ns(t)},na=async e=>{if(!tI)return;let t=g(e,o);eo(!0),S("");try{let e=await fetch("/api/keys",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiKeyDefaultPolicy:t})}),n=await e.json().catch(()=>({}));if(!e.ok)throw Error(n.error||"Kh\xf4ng lưu được default policy");let s=g(n.apiKeyDefaultPolicy||t,o);er(s),ea(s),ec(!1)}catch(e){S(e.message||"Kh\xf4ng lưu được default policy")}finally{eo(!1)}},ni=async()=>{if(I.trim()){if(0===Z.length)return void S("Admin cần cấu h\xecnh default models trước khi tạo API key.");if(t_)return void S(`Mỗi user chỉ được tạo tối đa ${tE} API keys.
|
|
39
|
-
C\xf3 thể d\xf9ng n\xfat Đổi key để xoay sang key mới m\xe0 kh\xf4ng cần x\xf3a/tạo lại.`);V(!0),S("");try{let e=tI?d(_||L||t$):void 0,t=await fetch("/api/keys",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:I.trim(),ownerUser:e})}),n=await t.json().catch(()=>({}));if(!t.ok)throw Error(n.error||"Kh\xf4ng tạo được API key");U(n.key),E(""),F(""),$(!1),ty(1),await t7()}catch(e){S(e.message||"Kh\xf4ng tạo được API key")}finally{V(!1)}}},no=async(e,t)=>{let n=await fetch(`/api/keys/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}),s=await n.json().catch(()=>({}));return n.ok?(await t7(),!0):(S(s.error||"Kh\xf4ng cập nhật được API key"),!1)},nd=async()=>{if(!ev)return;let e=c(ek);if(0===e.length)return void S("H\xe3y chọn \xedt nhất một model trước khi lưu quyền truy cập API key.");eA(!0),S("");try{await no(ev.id,{allowedModels:e})&&(eN(null),ew([]))}finally{eA(!1)}},nc=async e=>{if(eP){eE(!0),S("");try{await no(eP.id,{limits:g(e)})&&(eS(null),e$(o))}finally{eE(!1)}}},nm=async()=>{if(eP){eE(!0),S("");try{await no(eP.id,{limits:{}})&&(eS(null),e$(o))}finally{eE(!1)}}},nx=async e=>{if(!eL)return!1;eU(!0),S("");try{let t=await fetch(`/api/keys/${eL.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),n=await t.json().catch(()=>({}));if(!t.ok)throw Error(n.error||"Kh\xf4ng lưu được cấu h\xecnh Caveman");return await t7(),eT(null),!0}catch(t){let e=t?.message||"Kh\xf4ng lưu được cấu h\xecnh Caveman";throw S(e),Error(e)}finally{eU(!1)}};return(0,s.jsxs)("div",{className:"space-y-6",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-3 lg:flex-row lg:items-center lg:justify-between",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h1",{className:"text-2xl font-semibold text-text-main",children:"Quản l\xfd API Keys"}),(0,s.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:tI?"Bảng quản trị API key c\xf3 t\xecm kiếm, lọc trạng th\xe1i v\xe0 ph\xe2n trang để kh\xf4ng render qu\xe1 nhiều key c\xf9ng l\xfac.":`Bạn c\xf3 thể quản l\xfd API key của t\xe0i khoản m\xecnh. Mỗi user thường sở hữu tối đa ${tE} API keys. D\xf9ng n\xfat Đổi key để xoay sang key mới m\xe0 kh\xf4ng cần x\xf3a/tạo lại.`})]}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,s.jsx)(l.$n,{variant:"outline",onClick:t7,disabled:y,children:y?"Đang tải...":"Refresh"}),(0,s.jsx)(l.$n,{onClick:()=>{$(!0),!L&&t$&&M(t$)},disabled:t_,children:"Tạo API Key"})]})]}),A?(0,s.jsx)("div",{className:"rounded-xl border border-red-500/30 bg-red-500/10 p-3 text-sm text-red-600 whitespace-pre-line",children:A}):null,(0,s.jsxs)("div",{className:"grid gap-3 md:grid-cols-3",children:[(0,s.jsx)(k,{label:"Tổng API keys",value:tT,hint:tI?"To\xe0n hệ thống":`${tL}/${tE} key của bạn`}),(0,s.jsx)(k,{label:"Đang hiển thị",value:tM,hint:t8?"Theo bộ lọc hiện tại":"Kh\xf4ng filter"}),(0,s.jsx)(k,{label:"Page size",value:tv,hint:"Chỉ tải số d\xf2ng của trang hiện tại"})]}),tI?null:(0,s.jsx)(l.Zp,{children:(0,s.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"font-medium",children:"Giới hạn API key theo user"}),(0,s.jsxs)("p",{className:"text-sm text-text-muted",children:["T\xe0i khoản của bạn đang c\xf3 ",tL,"/",tE," API keys. Key bị disabled vẫn được t\xednh v\xe0o giới hạn."]})]}),(0,s.jsx)("span",{className:"rounded-full border border-border bg-surface px-3 py-1 text-sm",children:t_?"Đ\xe3 đạt giới hạn":"C\xf2n c\xf3 thể tạo th\xeam"})]})}),(0,s.jsxs)("div",{className:"grid gap-4 xl:grid-cols-2",children:[(0,s.jsx)(l.Zp,{children:(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"font-medium",children:"Default models cho API key mới"}),(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"API key mới sẽ mặc định được d\xf9ng c\xe1c model n\xe0y. Cần cấu h\xecnh \xedt nhất một default model trước khi tạo API key."})]}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[Z.length>0?(0,s.jsx)(f,{models:Z,emptyLabel:"Chưa cấu h\xecnh default models"}):(0,s.jsx)("span",{className:"text-sm text-red-600",children:"Chưa cấu h\xecnh default models"}),tI?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(l.$n,{variant:"outline",size:"sm",onClick:()=>{ex(!0),t9()},children:X.length>0?`Đ\xe3 chọn ${X.length} model`:"Chọn default models..."}),(0,s.jsx)(l.$n,{size:"sm",onClick:ne,disabled:!t5||et||0===X.length,children:et?"Đang lưu...":"Lưu"})]}):null]}),tI?(0,s.jsx)("p",{className:"text-xs text-text-muted",children:ej?"Đang tải danh s\xe1ch model...":"Danh s\xe1ch model chỉ tải khi mở bộ chọn để trang load nhanh hơn."}):null]})}),(0,s.jsx)(l.Zp,{children:(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"font-medium",children:"Default policy cho API key mới"}),(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"Policy n\xe0y được tự động g\xe1n cho key mới. Policy ri\xeang từng key vẫn c\xf3 thể override sau khi tạo."})]}),tI?(0,s.jsx)(l.$n,{variant:"outline",size:"sm",onClick:()=>{ea(g(es||o,o)),ec(!0)},children:"Chỉnh default policy"}):null]}),(0,s.jsx)(j,{limits:es,showThinking:tI,showOutputLimit:tI})]})})]}),tI?(0,s.jsx)(l.Zp,{children:(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"font-medium",children:"Giới hạn số API key cho mỗi user"}),(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"Global default \xe1p dụng cho mọi user thường. Per-user override sẽ ghi đ\xe8 global cho user cụ thể (nhập 0 hoặc bấm X\xf3a để bỏ override v\xe0 quay lại global)."})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-end",children:[(0,s.jsxs)("label",{className:"flex-1",children:[(0,s.jsx)("span",{className:"mb-1 block text-xs font-medium text-text-muted",children:"Global default (\xe1p dụng cho user kh\xf4ng c\xf3 override)"}),(0,s.jsx)("input",{type:"number",min:"1",value:eX,onChange:e=>e0(e.target.value),className:"w-full rounded-xl border border-border bg-background px-3 py-2 text-sm outline-none focus:border-primary"})]}),(0,s.jsx)(l.$n,{onClick:nn,disabled:e1||Number.parseInt(eX,10)===eZ,children:e1?"Đang lưu...":"Lưu global"})]}),(0,s.jsxs)("div",{className:"rounded-xl border border-border p-3",children:[(0,s.jsx)("div",{className:"text-sm font-medium",children:"Per-user override"}),(0,s.jsx)("p",{className:"mt-1 text-xs text-text-muted",children:"Ghi đ\xe8 global cho user cụ thể. Override sẽ \xe1p dụng lu\xf4n cả cho key hiện c\xf3 (chặn tạo key mới nếu vượt)."}),(0,s.jsxs)("div",{className:"mt-3 flex flex-col gap-2 sm:flex-row",children:[(0,s.jsx)("input",{value:e4,onChange:e=>e8(e.target.value),placeholder:"username hoặc email",className:"min-w-0 flex-1 rounded-xl border border-border bg-background px-3 py-2 text-sm outline-none focus:border-primary"}),(0,s.jsx)("input",{type:"number",min:"1",value:e7,onChange:e=>e9(e.target.value),placeholder:"Giới hạn key",className:"w-full rounded-xl border border-border bg-background px-3 py-2 text-sm outline-none focus:border-primary sm:w-40"}),(0,s.jsx)(l.$n,{onClick:nr,disabled:e6,children:e6?"Đang lưu...":"Th\xeam / Cập nhật"})]}),0===Object.keys(e3).length?(0,s.jsxs)("div",{className:"mt-3 rounded-xl border border-dashed border-border bg-surface p-3 text-xs text-text-muted",children:["Chưa c\xf3 user n\xe0o được override. Global = ",eZ," key."]}):(0,s.jsx)("div",{className:"mt-3 overflow-hidden rounded-xl border border-border",children:(0,s.jsxs)("table",{className:"min-w-full text-sm",children:[(0,s.jsx)("thead",{className:"bg-surface text-xs text-text-muted",children:(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{className:"px-3 py-2 text-left font-medium",children:"User"}),(0,s.jsx)("th",{className:"px-3 py-2 text-left font-medium",children:"Giới hạn"}),(0,s.jsx)("th",{className:"px-3 py-2 text-right font-medium",children:"H\xe0nh động"})]})}),(0,s.jsx)("tbody",{children:Object.entries(e3).sort(([e],[t])=>e.localeCompare(t)).map(([e,t])=>(0,s.jsxs)("tr",{className:"border-t border-border",children:[(0,s.jsx)("td",{className:"px-3 py-2 font-mono text-xs",children:e}),(0,s.jsx)("td",{className:"px-3 py-2",children:t}),(0,s.jsx)("td",{className:"px-3 py-2 text-right",children:(0,s.jsx)(l.$n,{size:"sm",variant:"ghost",disabled:e6,onClick:()=>nl(e),children:"X\xf3a"})})]},e))})]})})]})]})}):null,(0,s.jsx)(l.Zp,{children:(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"font-medium",children:"Th\xf4ng tin API endpoint"}),(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"D\xf9ng API key b\xean dưới để gọi gateway theo chuẩn OpenAI-compatible. Endpoint lấy theo domain hiện tại của dashboard."})]}),(0,s.jsxs)("div",{className:"grid gap-3 md:grid-cols-2",children:[(0,s.jsxs)("div",{className:"rounded-xl border border-border bg-surface p-3",children:[(0,s.jsx)("div",{className:"text-xs text-text-muted",children:"Base URL"}),(0,s.jsx)("div",{className:"mt-1 break-all font-mono text-sm",children:tK})]}),(0,s.jsxs)("div",{className:"rounded-xl border border-border bg-surface p-3",children:[(0,s.jsx)("div",{className:"text-xs text-text-muted",children:"Chat Completions"}),(0,s.jsx)("div",{className:"mt-1 break-all font-mono text-sm",children:tR})]})]}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,s.jsx)(l.$n,{variant:"outline",size:"sm",onClick:()=>tA(tK,"api-base-url"),children:"api-base-url"===tC?"Đ\xe3 copy Base URL":"Copy Base URL"}),(0,s.jsx)(l.$n,{variant:"outline",size:"sm",onClick:()=>tA(tR,"api-chat-endpoint"),children:"api-chat-endpoint"===tC?"Đ\xe3 copy Endpoint":"Copy Endpoint"})]})]})}),R?(0,s.jsx)(l.Zp,{children:(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsx)("h3",{className:"font-medium",children:"Đ\xe3 tạo API key"}),(0,s.jsx)("pre",{className:"overflow-auto rounded-xl border border-border bg-surface p-3 text-sm",children:R}),(0,s.jsxs)("div",{className:"text-sm text-text-muted",children:["H\xe3y copy ngay. Key mới mặc định được d\xf9ng default models v\xe0 default policy đang cấu h\xecnh trong Dashboard, trừ khi admin chỉnh quyền model/policy.",(0,s.jsx)(f,{models:Z,emptyLabel:"default models"})]}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(l.$n,{size:"sm",onClick:()=>tA(R,"created"),children:"created"===tC?"Đ\xe3 copy":"Copy"}),(0,s.jsx)(l.$n,{size:"sm",variant:"ghost",onClick:()=>U(""),children:"Đ\xf3ng"})]})]})}):null,(0,s.jsx)(l.Zp,{children:(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-3 xl:flex-row xl:items-end xl:justify-between",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"text-lg font-semibold text-text-main",children:"Danh s\xe1ch API keys"}),(0,s.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"T\xecm theo t\xean key, owner, model, id hoặc một phần API key. Backend chỉ trả về page hiện tại."})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center",children:[(0,s.jsx)("input",{value:tu,onChange:e=>th(e.target.value),placeholder:"T\xecm API key, owner, model...",className:"w-full rounded-xl border border-border bg-background px-3 py-2 text-sm text-text-main outline-none focus:border-primary sm:w-80"}),(0,s.jsxs)("select",{value:tg,onChange:e=>{tf(e.target.value),ty(1)},className:"rounded-xl border border-border bg-background px-3 py-2 text-sm text-text-main outline-none focus:border-primary",children:[(0,s.jsx)("option",{value:"all",children:"Tất cả trạng th\xe1i"}),(0,s.jsx)("option",{value:"active",children:"Chỉ key đang bật"}),(0,s.jsx)("option",{value:"inactive",children:"Chỉ key đ\xe3 tắt"})]}),t8?(0,s.jsx)(l.$n,{variant:"outline",size:"sm",onClick:()=>{th(""),tb(""),tf("all"),ty(1)},children:"X\xf3a lọc"}):null]})]}),y?(0,s.jsx)("div",{className:"rounded-2xl border border-dashed border-border p-8 text-center text-sm text-text-muted",children:"Đang tải API keys..."}):0===h.length?(0,s.jsx)("div",{className:"rounded-2xl border border-dashed border-border p-8 text-center text-sm text-text-muted",children:t8?"Kh\xf4ng t\xecm thấy API key ph\xf9 hợp bộ lọc.":"Chưa c\xf3 API key n\xe0o."}):(0,s.jsx)(K,{keys:h,copied:tC,copy:tA,isAdmin:tI,globalCavemanEnabled:eD,globalCavemanLevel:eB,onToggleActive:(e,t)=>no(e,{isActive:t}),onApiTest:tr,onClaudeSettings:ta,onOpenCodeSettings:to,onCodexSettings:tc,onQwenSettings:tx,onRename:(e,t)=>{let n=prompt("T\xean API key mới",t||"");n?.trim()&&no(e,{name:n.trim()})},onRotate:e=>{e?.id&&q({title:"Đổi API key",message:"Hệ thống sẽ tạo chuỗi API key mới cho record n\xe0y v\xe0 giữ nguy\xean t\xean, owner, model, policy. Key cũ sẽ hết hiệu lực ngay sau khi đổi.",onConfirm:async()=>{q(null),S("");let t=await fetch(`/api/keys/${e.id}/rotate`,{method:"POST"}),n=await t.json().catch(()=>({}));if(!t.ok)return void S(n.error||"Kh\xf4ng đổi được API key");let s=n.rotatedKey||n.key?.key||"";s&&U(s),await t7()}})},onEditModels:e=>{eN(e),ew(c(e.allowedModels)),t9()},onEditPolicy:e=>{tI&&(eS(e),e$(b(e.limits)?g(e.limits):o))},onEditCaveman:eT,onShowCavemanInfo:e_,onCavemanTest:eF,onAssignOwner:(e,t)=>{if(!tI)return;let n=prompt("G\xe1n owner username/email",t||t$||"");null!==n&&no(e,{ownerUser:d(n)})},onDelete:e=>{q({title:"X\xf3a API Key",message:"Bạn chắc chắn muốn x\xf3a API key n\xe0y? Thao t\xe1c n\xe0y kh\xf4ng thể ho\xe0n t\xe1c.",onConfirm:async()=>{q(null),(await fetch(`/api/keys/${e}`,{method:"DELETE"})).ok&&await t7()}})}}),(0,s.jsx)(w,{pagination:tk,pageSize:tv,onPageChange:ty,onPageSizeChange:e=>{tN(e),ty(1)},loading:y})]})}),(0,s.jsx)(l.aF,{isOpen:O,onClose:()=>$(!1),title:"Tạo API Key",size:"lg",children:(0,s.jsxs)("div",{className:"space-y-4",children:[0===Z.length?(0,s.jsx)("div",{className:"rounded-xl border border-red-500/30 bg-red-500/10 p-3 text-sm text-red-600",children:"Admin cần cấu h\xecnh default models trước khi tạo API key."}):t_?(0,s.jsxs)("div",{className:"rounded-xl border border-red-500/30 bg-red-500/10 p-3 text-sm text-red-600",children:["Bạn đ\xe3 đạt giới hạn ",tE," API keys. H\xe3y x\xf3a bớt key cũ trước khi tạo key mới."]}):(0,s.jsxs)("div",{className:"text-sm text-text-muted",children:["Key n\xe0y sẽ được tạo với quyền d\xf9ng default models v\xe0 default policy đang cấu h\xecnh trong Dashboard.",(0,s.jsx)(f,{models:Z})]}),(0,s.jsxs)("label",{className:"block",children:[(0,s.jsx)("span",{className:"mb-1 block text-xs font-medium text-text-muted",children:"T\xean API key"}),(0,s.jsx)("input",{value:I,onChange:e=>E(e.target.value),placeholder:"VD: VSCode, LibreChat, team-user",className:"w-full rounded-xl border border-border bg-background px-3 py-2 text-sm outline-none focus:border-primary"})]}),tI?(0,s.jsxs)("div",{className:"space-y-3 rounded-xl border border-border p-3",children:[(0,s.jsx)("div",{className:"text-sm font-medium",children:"Owner user"}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)("input",{value:W,onChange:e=>H(e.target.value),placeholder:"Nhập từ kh\xf3a rồi bấm Tải",className:"min-w-0 flex-1 rounded-xl border border-border bg-background px-3 py-2 text-sm outline-none focus:border-primary"}),(0,s.jsx)(l.$n,{variant:"outline",onClick:()=>t6(W),disabled:G,children:G?"Đang tải":"Tải LDAP"})]}),(0,s.jsxs)("select",{value:L,onChange:e=>M(e.target.value),className:"w-full rounded-xl border border-border bg-background px-3 py-2 text-sm text-text-main outline-none focus:border-primary",children:[(0,s.jsxs)("option",{value:t$||"",children:["G\xe1n cho t\xf4i (",t$||"local",")"]}),t3.map(e=>(0,s.jsx)("option",{value:e.id,children:e.label},e.id))]}),(0,s.jsx)("input",{value:_,onChange:e=>F(e.target.value),placeholder:"username hoặc email, kh\xf4ng bắt buộc",className:"w-full rounded-xl border border-border bg-background px-3 py-2 text-sm outline-none focus:border-primary"}),(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"LDAP kh\xf4ng tự tải khi mở trang để giảm thời gian load. C\xf3 thể nhập owner thủ c\xf4ng hoặc nhập từ kh\xf3a rồi bấm Tải LDAP."})]}):(0,s.jsxs)("p",{className:"rounded-xl border border-border bg-surface p-3 text-sm text-text-muted",children:["Owner: ",t$||"user hiện tại"]}),(0,s.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,s.jsx)(l.$n,{variant:"ghost",onClick:()=>$(!1),children:"Hủy"}),(0,s.jsx)(l.$n,{onClick:ni,disabled:t4,children:J?"Đang tạo...":"Tạo"})]})]})}),(0,s.jsx)(l.aF,{isOpen:!!ts,onClose:()=>tr(null),title:"API Test bằng curl Windows",size:"xl",children:(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"Lệnh dưới đ\xe2y gọi thử endpoint Chat Completions bằng API key đang chọn v\xe0 đ\xe3 nh\xfang sẵn Bearer token."}),(0,s.jsxs)("div",{className:"grid gap-3 md:grid-cols-3",children:[(0,s.jsxs)("div",{className:"rounded-xl border border-border bg-surface p-3",children:[(0,s.jsx)("div",{className:"text-xs text-text-muted",children:"API Key"}),(0,s.jsx)("div",{className:"mt-1 text-sm",children:ts?.name||"API Key"})]}),(0,s.jsxs)("div",{className:"rounded-xl border border-border bg-surface p-3",children:[(0,s.jsx)("div",{className:"text-xs text-text-muted",children:"Endpoint"}),(0,s.jsx)("div",{className:"mt-1 break-all font-mono text-sm",children:tR})]}),(0,s.jsxs)("div",{className:"rounded-xl border border-border bg-surface p-3",children:[(0,s.jsx)("div",{className:"text-xs text-text-muted",children:"Model test"}),(0,s.jsx)("div",{className:"mt-1 break-all font-mono text-sm",children:tD})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"mb-1 text-xs font-medium text-text-muted",children:"Lệnh curl cho Windows CMD"}),(0,s.jsx)("pre",{className:"overflow-auto rounded-xl border border-border bg-surface p-3 text-xs",children:tz})]}),(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"D\xe1n lệnh v\xe0o CMD hoặc Windows Terminal để test nhanh. Nếu domain dashboard chạy sau reverse proxy, endpoint sẽ d\xf9ng đ\xfang domain đang mở tr\xean tr\xecnh duyệt."}),(0,s.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,s.jsx)(l.$n,{variant:"ghost",onClick:()=>tr(null),children:"Đ\xf3ng"}),(0,s.jsx)(l.$n,{onClick:()=>tA(tz,`api-test-curl-${ts?.id||"current"}`),children:tC===`api-test-curl-${ts?.id||"current"}`?"Đ\xe3 copy":"Copy lệnh curl"})]})]})}),(0,s.jsx)(l.aF,{isOpen:!!tl,onClose:()=>ta(null),title:"Claude Code Settings",size:"xl",children:(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("p",{className:"text-sm text-text-muted",children:["Copy nội dung JSON dưới đ\xe2y v\xe0o file ",(0,s.jsx)("span",{className:"font-mono",children:"%USERPROFILE%\\.claude\\settings.json"})," để Claude Code gọi qua gateway n\xe0y. Model coding d\xf9ng ",(0,s.jsx)("span",{className:"font-mono",children:tW.codingModel}),"; model fast d\xf9ng ",(0,s.jsx)("span",{className:"font-mono",children:tW.fastModel}),"."]}),(0,s.jsxs)("div",{className:"grid gap-3 md:grid-cols-3",children:[(0,s.jsxs)("div",{className:"rounded-xl border border-border bg-surface p-3",children:[(0,s.jsx)("div",{className:"text-xs text-text-muted",children:"API Key"}),(0,s.jsx)("div",{className:"mt-1 text-sm",children:tl?.name||"API Key"})]}),(0,s.jsxs)("div",{className:"rounded-xl border border-border bg-surface p-3",children:[(0,s.jsx)("div",{className:"text-xs text-text-muted",children:"Base URL"}),(0,s.jsx)("div",{className:"mt-1 break-all font-mono text-sm",children:tK})]}),(0,s.jsxs)("div",{className:"rounded-xl border border-border bg-surface p-3",children:[(0,s.jsx)("div",{className:"text-xs text-text-muted",children:"Model"}),(0,s.jsx)("div",{className:"mt-1 break-all font-mono text-sm",children:tW.codingModel})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"mb-1 text-xs font-medium text-text-muted",children:"settings.json"}),(0,s.jsx)("pre",{className:"max-h-[420px] overflow-auto rounded-xl border border-border bg-surface p-3 text-xs",children:tH})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"mb-1 text-xs font-medium text-text-muted",children:"C\xe0i v\xe0 chạy Claude Code CLI tr\xean Windows"}),(0,s.jsx)("pre",{className:"overflow-auto rounded-xl border border-border bg-surface p-3 text-xs",children:tG})]}),(0,s.jsx)("div",{className:"rounded-xl border border-amber-500/30 bg-amber-500/10 p-3 text-xs text-amber-700 dark:text-amber-300",children:"Lưu \xfd: 2 d\xf2ng auto-compact/context window đ\xe3 được comment sẵn; chỉ uncomment khi d\xf9ng local model. Nếu c\xe0i bằng npm th\xec m\xe1y cần c\xe0i Node.js trước. Chạy Claude Code trong thư mục project, kh\xf4ng chạy trong C:\\WINDOWS\\system32. Nếu d\xf9ng model fast ri\xeang như programmer-fast th\xec API key n\xe0y cũng phải được ph\xe9p d\xf9ng model đ\xf3 trong cột Model."}),(0,s.jsxs)("div",{className:"flex flex-wrap justify-end gap-2",children:[(0,s.jsx)(l.$n,{variant:"ghost",onClick:()=>ta(null),children:"Đ\xf3ng"}),(0,s.jsx)(l.$n,{variant:"outline",onClick:()=>tA(tG,`claude-code-help-${tl?.id||"current"}`),children:tC===`claude-code-help-${tl?.id||"current"}`?"Đ\xe3 copy hướng dẫn":"Copy hướng dẫn"}),(0,s.jsx)(l.$n,{onClick:()=>tA(tH,`claude-code-settings-${tl?.id||"current"}`),children:tC===`claude-code-settings-${tl?.id||"current"}`?"Đ\xe3 copy settings":"Copy settings.json"})]})]})}),(0,s.jsx)(l.aF,{isOpen:!!ti,onClose:()=>to(null),title:"OpenCode Settings",size:"xl",children:(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("p",{className:"text-sm text-text-muted",children:["Copy JSON dưới đ\xe2y v\xe0o file ",(0,s.jsx)("span",{className:"font-mono",children:"%APPDATA%\\opencode\\opencode.json"})," hoặc ",(0,s.jsx)("span",{className:"font-mono",children:"opencode.json"})," trong project. Model ch\xednh d\xf9ng ",(0,s.jsx)("span",{className:"font-mono",children:tY.codingModel}),"; explorer/fast d\xf9ng ",(0,s.jsx)("span",{className:"font-mono",children:tY.fastModel}),"."]}),(0,s.jsxs)("div",{className:"grid gap-3 md:grid-cols-4",children:[(0,s.jsxs)("div",{className:"rounded-xl border border-border bg-surface p-3",children:[(0,s.jsx)("div",{className:"text-xs text-text-muted",children:"API Key"}),(0,s.jsx)("div",{className:"mt-1 text-sm",children:ti?.name||"API Key"})]}),(0,s.jsxs)("div",{className:"rounded-xl border border-border bg-surface p-3",children:[(0,s.jsx)("div",{className:"text-xs text-text-muted",children:"Base URL"}),(0,s.jsx)("div",{className:"mt-1 break-all font-mono text-sm",children:tK})]}),(0,s.jsxs)("div",{className:"rounded-xl border border-border bg-surface p-3",children:[(0,s.jsx)("div",{className:"text-xs text-text-muted",children:"Model ch\xednh"}),(0,s.jsx)("div",{className:"mt-1 break-all font-mono text-sm",children:tY.codingModel})]}),(0,s.jsxs)("div",{className:"rounded-xl border border-border bg-surface p-3",children:[(0,s.jsx)("div",{className:"text-xs text-text-muted",children:"Model fast"}),(0,s.jsx)("div",{className:"mt-1 break-all font-mono text-sm",children:tY.fastModel})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"mb-1 text-xs font-medium text-text-muted",children:"opencode.json"}),(0,s.jsx)("pre",{className:"max-h-[420px] overflow-auto rounded-xl border border-border bg-surface p-3 text-xs",children:tJ})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"mb-1 text-xs font-medium text-text-muted",children:"C\xe0i v\xe0 chạy OpenCode tr\xean Windows PowerShell"}),(0,s.jsx)("pre",{className:"overflow-auto rounded-xl border border-border bg-surface p-3 text-xs",children:tV})]}),(0,s.jsxs)("div",{className:"rounded-xl border border-amber-500/30 bg-amber-500/10 p-3 text-xs text-amber-700 dark:text-amber-300",children:["Lưu \xfd: API key n\xe0y cần được ph\xe9p gọi cả ",tY.codingModel," v\xe0 ",tY.fastModel,". Nếu OpenCode đang d\xf9ng đường dẫn config kh\xe1c, c\xf3 thể đặt file opencode.json ngay trong thư mục project."]}),(0,s.jsxs)("div",{className:"flex flex-wrap justify-end gap-2",children:[(0,s.jsx)(l.$n,{variant:"ghost",onClick:()=>to(null),children:"Đ\xf3ng"}),(0,s.jsx)(l.$n,{variant:"outline",onClick:()=>tA(tV,`opencode-help-${ti?.id||"current"}`),children:tC===`opencode-help-${ti?.id||"current"}`?"Đ\xe3 copy hướng dẫn":"Copy hướng dẫn"}),(0,s.jsx)(l.$n,{onClick:()=>tA(tJ,`opencode-settings-${ti?.id||"current"}`),children:tC===`opencode-settings-${ti?.id||"current"}`?"Đ\xe3 copy settings":"Copy opencode.json"})]})]})}),(0,s.jsx)(l.aF,{isOpen:!!td,onClose:()=>tc(null),title:"Codex Settings",size:"xl",children:(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("p",{className:"text-sm text-text-muted",children:["Copy TOML dưới đ\xe2y v\xe0o file ",(0,s.jsx)("span",{className:"font-mono",children:"%USERPROFILE%\\.codex\\config.toml"}),". API key được set bằng biến m\xf4i trường ",(0,s.jsx)("span",{className:"font-mono",children:"OPENAI_API_KEY"}),". Model ch\xednh d\xf9ng ",(0,s.jsx)("span",{className:"font-mono",children:tZ.codingModel}),"; profile fast d\xf9ng ",(0,s.jsx)("span",{className:"font-mono",children:tZ.fastModel}),"."]}),(0,s.jsxs)("div",{className:"grid gap-3 md:grid-cols-3",children:[(0,s.jsxs)("div",{className:"rounded-xl border border-border bg-surface p-3",children:[(0,s.jsx)("div",{className:"text-xs text-text-muted",children:"API Key"}),(0,s.jsx)("div",{className:"mt-1 text-sm",children:td?.name||"API Key"})]}),(0,s.jsxs)("div",{className:"rounded-xl border border-border bg-surface p-3",children:[(0,s.jsx)("div",{className:"text-xs text-text-muted",children:"Base URL"}),(0,s.jsx)("div",{className:"mt-1 break-all font-mono text-sm",children:tK})]}),(0,s.jsxs)("div",{className:"rounded-xl border border-border bg-surface p-3",children:[(0,s.jsx)("div",{className:"text-xs text-text-muted",children:"Model"}),(0,s.jsx)("div",{className:"mt-1 break-all font-mono text-sm",children:tZ.codingModel})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"mb-1 text-xs font-medium text-text-muted",children:"config.toml"}),(0,s.jsx)("pre",{className:"max-h-[420px] overflow-auto rounded-xl border border-border bg-surface p-3 text-xs",children:tQ})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"mb-1 text-xs font-medium text-text-muted",children:"C\xe0i v\xe0 chạy Codex tr\xean Windows PowerShell"}),(0,s.jsx)("pre",{className:"overflow-auto rounded-xl border border-border bg-surface p-3 text-xs",children:tX})]}),(0,s.jsx)("div",{className:"rounded-xl border border-amber-500/30 bg-amber-500/10 p-3 text-xs text-amber-700 dark:text-amber-300",children:"Lưu \xfd: c\xe1c d\xf2ng context window v\xe0 auto-compact đ\xe3 được comment sẵn; chỉ uncomment khi d\xf9ng local model. Nếu c\xe0i bằng npm th\xec m\xe1y cần c\xe0i Node.js trước. Hướng dẫn đ\xe3 tự tạo config.toml v\xe0 set biến m\xf4i trường cho phi\xean PowerShell hiện tại; setx chỉ lưu lại cho terminal mở sau. Codex d\xf9ng OpenAI-compatible endpoint của BlueRouter."}),(0,s.jsxs)("div",{className:"flex flex-wrap justify-end gap-2",children:[(0,s.jsx)(l.$n,{variant:"ghost",onClick:()=>tc(null),children:"Đ\xf3ng"}),(0,s.jsx)(l.$n,{variant:"outline",onClick:()=>tA(tX,`codex-help-${td?.id||"current"}`),children:tC===`codex-help-${td?.id||"current"}`?"Đ\xe3 copy hướng dẫn":"Copy hướng dẫn"}),(0,s.jsx)(l.$n,{onClick:()=>tA(tQ,`codex-settings-${td?.id||"current"}`),children:tC===`codex-settings-${td?.id||"current"}`?"Đ\xe3 copy settings":"Copy config.toml"})]})]})}),(0,s.jsx)(l.aF,{isOpen:!!tm,onClose:()=>tx(null),title:"Qwen Code Settings",size:"xl",children:(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("p",{className:"text-sm text-text-muted",children:["Copy JSON dưới đ\xe2y v\xe0o file ",(0,s.jsx)("span",{className:"font-mono",children:"%USERPROFILE%\\.qwen\\settings.json"})," để Qwen Code gọi qua OpenAI-compatible endpoint của BlueRouter. Model ch\xednh d\xf9ng ",(0,s.jsx)("span",{className:"font-mono",children:t0.codingModel}),"; model fast d\xf9ng ",(0,s.jsx)("span",{className:"font-mono",children:t0.fastModel}),"."]}),(0,s.jsxs)("div",{className:"grid gap-3 md:grid-cols-3",children:[(0,s.jsxs)("div",{className:"rounded-xl border border-border bg-surface p-3",children:[(0,s.jsx)("div",{className:"text-xs text-text-muted",children:"API Key"}),(0,s.jsx)("div",{className:"mt-1 text-sm",children:tm?.name||"API Key"})]}),(0,s.jsxs)("div",{className:"rounded-xl border border-border bg-surface p-3",children:[(0,s.jsx)("div",{className:"text-xs text-text-muted",children:"Base URL"}),(0,s.jsx)("div",{className:"mt-1 break-all font-mono text-sm",children:tK})]}),(0,s.jsxs)("div",{className:"rounded-xl border border-border bg-surface p-3",children:[(0,s.jsx)("div",{className:"text-xs text-text-muted",children:"Model"}),(0,s.jsx)("div",{className:"mt-1 break-all font-mono text-sm",children:t0.codingModel})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"mb-1 text-xs font-medium text-text-muted",children:"settings.json"}),(0,s.jsx)("pre",{className:"max-h-[420px] overflow-auto rounded-xl border border-border bg-surface p-3 text-xs",children:t1})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"mb-1 text-xs font-medium text-text-muted",children:"C\xe0i v\xe0 chạy Qwen Code tr\xean Windows PowerShell"}),(0,s.jsx)("pre",{className:"overflow-auto rounded-xl border border-border bg-surface p-3 text-xs",children:t2})]}),(0,s.jsx)("div",{className:"rounded-xl border border-amber-500/30 bg-amber-500/10 p-3 text-xs text-amber-700 dark:text-amber-300",children:"Lưu \xfd: hướng dẫn đ\xe3 tự tạo settings.json hợp lệ v\xe0 set biến m\xf4i trường cho phi\xean PowerShell hiện tại. setx chỉ lưu lại cho terminal mở sau. Qwen Code hỗ trợ OpenAI-compatible provider n\xean d\xf9ng tốt với BlueRouter."}),(0,s.jsxs)("div",{className:"flex flex-wrap justify-end gap-2",children:[(0,s.jsx)(l.$n,{variant:"ghost",onClick:()=>tx(null),children:"Đ\xf3ng"}),(0,s.jsx)(l.$n,{variant:"outline",onClick:()=>tA(t2,`qwen-code-help-${tm?.id||"current"}`),children:tC===`qwen-code-help-${tm?.id||"current"}`?"Đ\xe3 copy hướng dẫn":"Copy hướng dẫn"}),(0,s.jsx)(l.$n,{onClick:()=>tA(t1,`qwen-code-settings-${tm?.id||"current"}`),children:tC===`qwen-code-settings-${tm?.id||"current"}`?"Đ\xe3 copy settings":"Copy settings.json"})]})]})}),(0,s.jsx)(T,{apiKey:eK,fallbackModels:Z,onClose:()=>eF(null)}),(0,s.jsx)(P,{apiKey:eL,globalEnabled:eD,globalLevel:eB,onClose:()=>eT(null),onSave:nx,saving:eR}),(0,s.jsx)(P,{apiKey:eM,globalEnabled:eD,globalLevel:eB,onClose:()=>e_(null),onSave:()=>{},saving:!1,infoOnly:!0}),(0,s.jsx)(N,{open:!!ev,keyName:ev?.name,models:ek,setModels:ew,activeProviders:eu,modelAliases:ep,onClose:()=>{eN(null),ew([])},onSave:nd,saving:eC,personalOnly:!tI,extraModels:Z}),(0,s.jsx)(v,{isOpen:ed,keyName:"Default cho API key mới",policy:el,setPolicy:ea,onClose:()=>{ec(!1),ea(es||o)},onSave:na,saving:ei}),(0,s.jsx)(v,{isOpen:!!eP,keyName:eP?.name,policy:eO,setPolicy:e$,onClose:()=>{eS(null),e$(o)},onSave:nc,onClear:nm,saving:eI}),(0,s.jsx)(l.rq,{isOpen:em,onClose:()=>ex(!1),onSelect:e=>{let t=String(e?.value||e?.name||e||"").trim();t&&ee(e=>c([...e,t]))},onDeselect:e=>{let t=String(e?.value||e?.name||e||"").trim();t&&ee(e=>c(e).filter(e=>e!==t))},activeProviders:eu,modelAliases:ep,title:"Chọn default models cho API key",addedModelValues:X,closeOnSelect:!1}),D?(0,s.jsx)(l.uo,{isOpen:!!D,onClose:()=>q(null),onConfirm:D.onConfirm,title:D.title,message:D.message,confirmText:"X\xf3a",cancelText:"Hủy",variant:"danger"}):null]})}},61771:(e,t,n)=>{"use strict";n.d(t,{default:()=>o});var s=n(95155),r=n(12115),l=n(35497),a=n(94027);let i="api-keys-bulk-default-models-result";function o(){let[e,t]=(0,r.useState)(!1),[n,o]=(0,r.useState)(!1),[d,c]=(0,r.useState)(""),[m,x]=(0,r.useState)(""),{isAdmin:u}=(0,a.s)();if((0,r.useEffect)(()=>{let e=window.sessionStorage.getItem(i);e&&(window.sessionStorage.removeItem(i),c(e))},[]),!u)return null;let h=async()=>{t(!1),o(!0),c(""),x("");try{let e=await fetch("/api/keys",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({applyDefaultModelsToExistingKeys:!0})}),t=await e.json().catch(()=>({}));if(!e.ok)throw Error(t.error||"Kh\xf4ng th\xeam được default models v\xe0o API key hiện c\xf3");let n=t.apiKeyDefaultModelsApplied||{},s=Number(n.updated||0),r=Number(n.unchanged||0),l=Number(n.legacyFullAccessSkipped||0),a=`Đ\xe3 bổ sung default models cho ${s} API key. ${r} key đ\xe3 c\xf3 đủ model; ${l} key Legacy full access được giữ nguy\xean.`;window.sessionStorage.setItem(i,a),window.location.reload()}catch(e){x(e?.message||"Kh\xf4ng th\xeam được default models v\xe0o API key hiện c\xf3")}finally{o(!1)}};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"mb-4 flex flex-col gap-2 rounded-2xl border border-border bg-surface/50 p-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsxs)("div",{className:"min-w-0 text-sm",children:[(0,s.jsx)("div",{className:"font-medium text-text-main",children:"\xc1p Default models cho API key hiện c\xf3"}),(0,s.jsx)("div",{className:"text-xs text-text-muted",children:"Chỉ th\xeam model c\xf2n thiếu; kh\xf4ng x\xf3a model đ\xe3 g\xe1n v\xe0 kh\xf4ng thu hẹp quyền của key Legacy full access."}),d?(0,s.jsx)("div",{className:"mt-1 text-xs text-emerald-700 dark:text-emerald-300",children:d}):null,m?(0,s.jsx)("div",{className:"mt-1 text-xs text-red-600",children:m}):null]}),(0,s.jsx)(l.$n,{size:"sm",variant:"outline",onClick:()=>t(!0),disabled:n,children:n?"Đang th\xeam...":"Th\xeam Default models v\xe0o tất cả API key"})]}),(0,s.jsx)(l.uo,{isOpen:e,onClose:()=>!n&&t(!1),onConfirm:h,title:"Th\xeam Default models v\xe0o tất cả API key?",message:"Hệ thống sẽ th\xeam c\xe1c Default models đ\xe3 lưu v\xe0o mọi API key c\xf3 danh s\xe1ch model giới hạn. Model đ\xe3 g\xe1n sẵn vẫn được giữ nguy\xean. API key Legacy full access sẽ kh\xf4ng bị thay đổi để tr\xe1nh v\xf4 t\xecnh thu hẹp quyền truy cập.",confirmText:"Th\xeam v\xe0o tất cả",cancelText:"Hủy"})]})}},72143:()=>{},84578:(e,t,n)=>{Promise.resolve().then(n.t.bind(n,72143,23)),Promise.resolve().then(n.bind(n,56484)),Promise.resolve().then(n.bind(n,61771)),Promise.resolve().then(n.bind(n,9944))}},e=>{e.O(0,[646,8991,3862,8500,9893,9959,7050,5564,5263,7033,5497,8441,3794,7358],()=>e(e.s=84578)),_N_E=e.O()}]);
|
|
39
|
+
C\xf3 thể d\xf9ng n\xfat Đổi key để xoay sang key mới m\xe0 kh\xf4ng cần x\xf3a/tạo lại.`);V(!0),S("");try{let e=tI?d(_||L||t$):void 0,t=await fetch("/api/keys",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:I.trim(),ownerUser:e})}),n=await t.json().catch(()=>({}));if(!t.ok)throw Error(n.error||"Kh\xf4ng tạo được API key");U(n.key),E(""),F(""),$(!1),ty(1),await t7()}catch(e){S(e.message||"Kh\xf4ng tạo được API key")}finally{V(!1)}}},no=async(e,t)=>{let n=await fetch(`/api/keys/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}),s=await n.json().catch(()=>({}));return n.ok?(await t7(),!0):(S(s.error||"Kh\xf4ng cập nhật được API key"),!1)},nd=async()=>{if(!ev)return;let e=c(ek);if(0===e.length)return void S("H\xe3y chọn \xedt nhất một model trước khi lưu quyền truy cập API key.");eA(!0),S("");try{await no(ev.id,{allowedModels:e})&&(eN(null),ew([]))}finally{eA(!1)}},nc=async e=>{if(eP){eE(!0),S("");try{await no(eP.id,{limits:g(e)})&&(eS(null),e$(o))}finally{eE(!1)}}},nm=async()=>{if(eP){eE(!0),S("");try{await no(eP.id,{limits:{}})&&(eS(null),e$(o))}finally{eE(!1)}}},nx=async e=>{if(!eL)return!1;eU(!0),S("");try{let t=await fetch(`/api/keys/${eL.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),n=await t.json().catch(()=>({}));if(!t.ok)throw Error(n.error||"Kh\xf4ng lưu được cấu h\xecnh Caveman");return await t7(),eT(null),!0}catch(t){let e=t?.message||"Kh\xf4ng lưu được cấu h\xecnh Caveman";throw S(e),Error(e)}finally{eU(!1)}};return(0,s.jsxs)("div",{className:"space-y-6",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-3 lg:flex-row lg:items-center lg:justify-between",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h1",{className:"text-2xl font-semibold text-text-main",children:"Quản l\xfd API Keys"}),(0,s.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:tI?"Bảng quản trị API key c\xf3 t\xecm kiếm, lọc trạng th\xe1i v\xe0 ph\xe2n trang để kh\xf4ng render qu\xe1 nhiều key c\xf9ng l\xfac.":`Bạn c\xf3 thể quản l\xfd API key của t\xe0i khoản m\xecnh. Mỗi user thường sở hữu tối đa ${tE} API keys. D\xf9ng n\xfat Đổi key để xoay sang key mới m\xe0 kh\xf4ng cần x\xf3a/tạo lại.`})]}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,s.jsx)(l.$n,{variant:"outline",onClick:t7,disabled:y,children:y?"Đang tải...":"Refresh"}),(0,s.jsx)(l.$n,{onClick:()=>{$(!0),!L&&t$&&M(t$)},disabled:t_,children:"Tạo API Key"})]})]}),A?(0,s.jsx)("div",{className:"rounded-xl border border-red-500/30 bg-red-500/10 p-3 text-sm text-red-600 whitespace-pre-line",children:A}):null,(0,s.jsxs)("div",{className:"grid gap-3 md:grid-cols-3",children:[(0,s.jsx)(k,{label:"Tổng API keys",value:tT,hint:tI?"To\xe0n hệ thống":`${tL}/${tE} key của bạn`}),(0,s.jsx)(k,{label:"Đang hiển thị",value:tM,hint:t8?"Theo bộ lọc hiện tại":"Kh\xf4ng filter"}),(0,s.jsx)(k,{label:"Page size",value:tv,hint:"Chỉ tải số d\xf2ng của trang hiện tại"})]}),tI?null:(0,s.jsx)(l.Zp,{children:(0,s.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"font-medium",children:"Giới hạn API key theo user"}),(0,s.jsxs)("p",{className:"text-sm text-text-muted",children:["T\xe0i khoản của bạn đang c\xf3 ",tL,"/",tE," API keys. Key bị disabled vẫn được t\xednh v\xe0o giới hạn."]})]}),(0,s.jsx)("span",{className:"rounded-full border border-border bg-surface px-3 py-1 text-sm",children:t_?"Đ\xe3 đạt giới hạn":"C\xf2n c\xf3 thể tạo th\xeam"})]})}),(0,s.jsxs)("div",{className:"grid gap-4 xl:grid-cols-2",children:[(0,s.jsx)(l.Zp,{children:(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"font-medium",children:"Default models cho API key mới"}),(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"API key mới sẽ mặc định được d\xf9ng c\xe1c model n\xe0y. Cần cấu h\xecnh \xedt nhất một default model trước khi tạo API key."})]}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[Z.length>0?(0,s.jsx)(f,{models:Z,emptyLabel:"Chưa cấu h\xecnh default models"}):(0,s.jsx)("span",{className:"text-sm text-red-600",children:"Chưa cấu h\xecnh default models"}),tI?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(l.$n,{variant:"outline",size:"sm",onClick:()=>{ex(!0),t9()},children:X.length>0?`Đ\xe3 chọn ${X.length} model`:"Chọn default models..."}),(0,s.jsx)(l.$n,{size:"sm",onClick:ne,disabled:!t5||et||0===X.length,children:et?"Đang lưu...":"Lưu"})]}):null]}),tI?(0,s.jsx)("p",{className:"text-xs text-text-muted",children:ej?"Đang tải danh s\xe1ch model...":"Danh s\xe1ch model chỉ tải khi mở bộ chọn để trang load nhanh hơn."}):null]})}),(0,s.jsx)(l.Zp,{children:(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"font-medium",children:"Default policy cho API key mới"}),(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"Policy n\xe0y được tự động g\xe1n cho key mới. Policy ri\xeang từng key vẫn c\xf3 thể override sau khi tạo."})]}),tI?(0,s.jsx)(l.$n,{variant:"outline",size:"sm",onClick:()=>{ea(g(es||o,o)),ec(!0)},children:"Chỉnh default policy"}):null]}),(0,s.jsx)(j,{limits:es,showThinking:tI,showOutputLimit:tI})]})})]}),tI?(0,s.jsx)(l.Zp,{children:(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"font-medium",children:"Giới hạn số API key cho mỗi user"}),(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"Global default \xe1p dụng cho mọi user thường. Per-user override sẽ ghi đ\xe8 global cho user cụ thể (nhập 0 hoặc bấm X\xf3a để bỏ override v\xe0 quay lại global)."})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-end",children:[(0,s.jsxs)("label",{className:"flex-1",children:[(0,s.jsx)("span",{className:"mb-1 block text-xs font-medium text-text-muted",children:"Global default (\xe1p dụng cho user kh\xf4ng c\xf3 override)"}),(0,s.jsx)("input",{type:"number",min:"1",value:eX,onChange:e=>e0(e.target.value),className:"w-full rounded-xl border border-border bg-background px-3 py-2 text-sm outline-none focus:border-primary"})]}),(0,s.jsx)(l.$n,{onClick:nn,disabled:e1||Number.parseInt(eX,10)===eZ,children:e1?"Đang lưu...":"Lưu global"})]}),(0,s.jsxs)("div",{className:"rounded-xl border border-border p-3",children:[(0,s.jsx)("div",{className:"text-sm font-medium",children:"Per-user override"}),(0,s.jsx)("p",{className:"mt-1 text-xs text-text-muted",children:"Ghi đ\xe8 global cho user cụ thể. Override sẽ \xe1p dụng lu\xf4n cả cho key hiện c\xf3 (chặn tạo key mới nếu vượt)."}),(0,s.jsxs)("div",{className:"mt-3 flex flex-col gap-2 sm:flex-row",children:[(0,s.jsx)("input",{value:e4,onChange:e=>e8(e.target.value),placeholder:"username hoặc email",className:"min-w-0 flex-1 rounded-xl border border-border bg-background px-3 py-2 text-sm outline-none focus:border-primary"}),(0,s.jsx)("input",{type:"number",min:"1",value:e7,onChange:e=>e9(e.target.value),placeholder:"Giới hạn key",className:"w-full rounded-xl border border-border bg-background px-3 py-2 text-sm outline-none focus:border-primary sm:w-40"}),(0,s.jsx)(l.$n,{onClick:nr,disabled:e6,children:e6?"Đang lưu...":"Th\xeam / Cập nhật"})]}),0===Object.keys(e3).length?(0,s.jsxs)("div",{className:"mt-3 rounded-xl border border-dashed border-border bg-surface p-3 text-xs text-text-muted",children:["Chưa c\xf3 user n\xe0o được override. Global = ",eZ," key."]}):(0,s.jsx)("div",{className:"mt-3 overflow-hidden rounded-xl border border-border",children:(0,s.jsxs)("table",{className:"min-w-full text-sm",children:[(0,s.jsx)("thead",{className:"bg-surface text-xs text-text-muted",children:(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{className:"px-3 py-2 text-left font-medium",children:"User"}),(0,s.jsx)("th",{className:"px-3 py-2 text-left font-medium",children:"Giới hạn"}),(0,s.jsx)("th",{className:"px-3 py-2 text-right font-medium",children:"H\xe0nh động"})]})}),(0,s.jsx)("tbody",{children:Object.entries(e3).sort(([e],[t])=>e.localeCompare(t)).map(([e,t])=>(0,s.jsxs)("tr",{className:"border-t border-border",children:[(0,s.jsx)("td",{className:"px-3 py-2 font-mono text-xs",children:e}),(0,s.jsx)("td",{className:"px-3 py-2",children:t}),(0,s.jsx)("td",{className:"px-3 py-2 text-right",children:(0,s.jsx)(l.$n,{size:"sm",variant:"ghost",disabled:e6,onClick:()=>nl(e),children:"X\xf3a"})})]},e))})]})})]})]})}):null,(0,s.jsx)(l.Zp,{children:(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"font-medium",children:"Th\xf4ng tin API endpoint"}),(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"D\xf9ng API key b\xean dưới để gọi gateway theo chuẩn OpenAI-compatible. Endpoint lấy theo domain hiện tại của dashboard."})]}),(0,s.jsxs)("div",{className:"grid gap-3 md:grid-cols-2",children:[(0,s.jsxs)("div",{className:"rounded-xl border border-border bg-surface p-3",children:[(0,s.jsx)("div",{className:"text-xs text-text-muted",children:"Base URL"}),(0,s.jsx)("div",{className:"mt-1 break-all font-mono text-sm",children:tK})]}),(0,s.jsxs)("div",{className:"rounded-xl border border-border bg-surface p-3",children:[(0,s.jsx)("div",{className:"text-xs text-text-muted",children:"Chat Completions"}),(0,s.jsx)("div",{className:"mt-1 break-all font-mono text-sm",children:tR})]})]}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,s.jsx)(l.$n,{variant:"outline",size:"sm",onClick:()=>tA(tK,"api-base-url"),children:"api-base-url"===tC?"Đ\xe3 copy Base URL":"Copy Base URL"}),(0,s.jsx)(l.$n,{variant:"outline",size:"sm",onClick:()=>tA(tR,"api-chat-endpoint"),children:"api-chat-endpoint"===tC?"Đ\xe3 copy Endpoint":"Copy Endpoint"})]})]})}),R?(0,s.jsx)(l.Zp,{children:(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsx)("h3",{className:"font-medium",children:"Đ\xe3 tạo API key"}),(0,s.jsx)("pre",{className:"overflow-auto rounded-xl border border-border bg-surface p-3 text-sm",children:R}),(0,s.jsxs)("div",{className:"text-sm text-text-muted",children:["H\xe3y copy ngay. Key mới mặc định được d\xf9ng default models v\xe0 default policy đang cấu h\xecnh trong Dashboard, trừ khi admin chỉnh quyền model/policy.",(0,s.jsx)(f,{models:Z,emptyLabel:"default models"})]}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(l.$n,{size:"sm",onClick:()=>tA(R,"created"),children:"created"===tC?"Đ\xe3 copy":"Copy"}),(0,s.jsx)(l.$n,{size:"sm",variant:"ghost",onClick:()=>U(""),children:"Đ\xf3ng"})]})]})}):null,(0,s.jsx)(l.Zp,{children:(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-3 xl:flex-row xl:items-end xl:justify-between",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"text-lg font-semibold text-text-main",children:"Danh s\xe1ch API keys"}),(0,s.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"T\xecm theo t\xean key, owner, model, id hoặc một phần API key. Backend chỉ trả về page hiện tại."})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center",children:[(0,s.jsx)("input",{value:tu,onChange:e=>th(e.target.value),placeholder:"T\xecm API key, owner, model...",className:"w-full rounded-xl border border-border bg-background px-3 py-2 text-sm text-text-main outline-none focus:border-primary sm:w-80"}),(0,s.jsxs)("select",{value:tg,onChange:e=>{tf(e.target.value),ty(1)},className:"rounded-xl border border-border bg-background px-3 py-2 text-sm text-text-main outline-none focus:border-primary",children:[(0,s.jsx)("option",{value:"all",children:"Tất cả trạng th\xe1i"}),(0,s.jsx)("option",{value:"active",children:"Chỉ key đang bật"}),(0,s.jsx)("option",{value:"inactive",children:"Chỉ key đ\xe3 tắt"})]}),t8?(0,s.jsx)(l.$n,{variant:"outline",size:"sm",onClick:()=>{th(""),tb(""),tf("all"),ty(1)},children:"X\xf3a lọc"}):null]})]}),y?(0,s.jsx)("div",{className:"rounded-2xl border border-dashed border-border p-8 text-center text-sm text-text-muted",children:"Đang tải API keys..."}):0===h.length?(0,s.jsx)("div",{className:"rounded-2xl border border-dashed border-border p-8 text-center text-sm text-text-muted",children:t8?"Kh\xf4ng t\xecm thấy API key ph\xf9 hợp bộ lọc.":"Chưa c\xf3 API key n\xe0o."}):(0,s.jsx)(K,{keys:h,copied:tC,copy:tA,isAdmin:tI,globalCavemanEnabled:eD,globalCavemanLevel:eB,onToggleActive:(e,t)=>no(e,{isActive:t}),onApiTest:tr,onClaudeSettings:ta,onOpenCodeSettings:to,onCodexSettings:tc,onQwenSettings:tx,onRename:(e,t)=>{let n=prompt("T\xean API key mới",t||"");n?.trim()&&no(e,{name:n.trim()})},onRotate:e=>{e?.id&&q({title:"Đổi API key",message:"Hệ thống sẽ tạo chuỗi API key mới cho record n\xe0y v\xe0 giữ nguy\xean t\xean, owner, model, policy. Key cũ sẽ hết hiệu lực ngay sau khi đổi.",onConfirm:async()=>{q(null),S("");let t=await fetch(`/api/keys/${e.id}/rotate`,{method:"POST"}),n=await t.json().catch(()=>({}));if(!t.ok)return void S(n.error||"Kh\xf4ng đổi được API key");let s=n.rotatedKey||n.key?.key||"";s&&U(s),await t7()}})},onEditModels:e=>{eN(e),ew(c(e.allowedModels)),t9()},onEditPolicy:e=>{tI&&(eS(e),e$(b(e.limits)?g(e.limits):o))},onEditCaveman:eT,onShowCavemanInfo:e_,onCavemanTest:eF,onAssignOwner:(e,t)=>{if(!tI)return;let n=prompt("G\xe1n owner username/email",t||t$||"");null!==n&&no(e,{ownerUser:d(n)})},onDelete:e=>{q({title:"X\xf3a API Key",message:"Bạn chắc chắn muốn x\xf3a API key n\xe0y? Thao t\xe1c n\xe0y kh\xf4ng thể ho\xe0n t\xe1c.",onConfirm:async()=>{q(null),(await fetch(`/api/keys/${e}`,{method:"DELETE"})).ok&&await t7()}})}}),(0,s.jsx)(w,{pagination:tk,pageSize:tv,onPageChange:ty,onPageSizeChange:e=>{tN(e),ty(1)},loading:y})]})}),(0,s.jsx)(l.aF,{isOpen:O,onClose:()=>$(!1),title:"Tạo API Key",size:"lg",children:(0,s.jsxs)("div",{className:"space-y-4",children:[0===Z.length?(0,s.jsx)("div",{className:"rounded-xl border border-red-500/30 bg-red-500/10 p-3 text-sm text-red-600",children:"Admin cần cấu h\xecnh default models trước khi tạo API key."}):t_?(0,s.jsxs)("div",{className:"rounded-xl border border-red-500/30 bg-red-500/10 p-3 text-sm text-red-600",children:["Bạn đ\xe3 đạt giới hạn ",tE," API keys. H\xe3y x\xf3a bớt key cũ trước khi tạo key mới."]}):(0,s.jsxs)("div",{className:"text-sm text-text-muted",children:["Key n\xe0y sẽ được tạo với quyền d\xf9ng default models v\xe0 default policy đang cấu h\xecnh trong Dashboard.",(0,s.jsx)(f,{models:Z})]}),(0,s.jsxs)("label",{className:"block",children:[(0,s.jsx)("span",{className:"mb-1 block text-xs font-medium text-text-muted",children:"T\xean API key"}),(0,s.jsx)("input",{value:I,onChange:e=>E(e.target.value),placeholder:"VD: VSCode, LibreChat, team-user",className:"w-full rounded-xl border border-border bg-background px-3 py-2 text-sm outline-none focus:border-primary"})]}),tI?(0,s.jsxs)("div",{className:"space-y-3 rounded-xl border border-border p-3",children:[(0,s.jsx)("div",{className:"text-sm font-medium",children:"Owner user"}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)("input",{value:W,onChange:e=>H(e.target.value),placeholder:"Nhập từ kh\xf3a rồi bấm Tải",className:"min-w-0 flex-1 rounded-xl border border-border bg-background px-3 py-2 text-sm outline-none focus:border-primary"}),(0,s.jsx)(l.$n,{variant:"outline",onClick:()=>t6(W),disabled:G,children:G?"Đang tải":"Tải LDAP"})]}),(0,s.jsxs)("select",{value:L,onChange:e=>M(e.target.value),className:"w-full rounded-xl border border-border bg-background px-3 py-2 text-sm text-text-main outline-none focus:border-primary",children:[(0,s.jsxs)("option",{value:t$||"",children:["G\xe1n cho t\xf4i (",t$||"local",")"]}),t3.map(e=>(0,s.jsx)("option",{value:e.id,children:e.label},e.id))]}),(0,s.jsx)("input",{value:_,onChange:e=>F(e.target.value),placeholder:"username hoặc email, kh\xf4ng bắt buộc",className:"w-full rounded-xl border border-border bg-background px-3 py-2 text-sm outline-none focus:border-primary"}),(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"LDAP kh\xf4ng tự tải khi mở trang để giảm thời gian load. C\xf3 thể nhập owner thủ c\xf4ng hoặc nhập từ kh\xf3a rồi bấm Tải LDAP."})]}):(0,s.jsxs)("p",{className:"rounded-xl border border-border bg-surface p-3 text-sm text-text-muted",children:["Owner: ",t$||"user hiện tại"]}),(0,s.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,s.jsx)(l.$n,{variant:"ghost",onClick:()=>$(!1),children:"Hủy"}),(0,s.jsx)(l.$n,{onClick:ni,disabled:t4,children:J?"Đang tạo...":"Tạo"})]})]})}),(0,s.jsx)(l.aF,{isOpen:!!ts,onClose:()=>tr(null),title:"API Test bằng curl Windows",size:"xl",children:(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"Lệnh dưới đ\xe2y gọi thử endpoint Chat Completions bằng API key đang chọn v\xe0 đ\xe3 nh\xfang sẵn Bearer token."}),(0,s.jsxs)("div",{className:"grid gap-3 md:grid-cols-3",children:[(0,s.jsxs)("div",{className:"rounded-xl border border-border bg-surface p-3",children:[(0,s.jsx)("div",{className:"text-xs text-text-muted",children:"API Key"}),(0,s.jsx)("div",{className:"mt-1 text-sm",children:ts?.name||"API Key"})]}),(0,s.jsxs)("div",{className:"rounded-xl border border-border bg-surface p-3",children:[(0,s.jsx)("div",{className:"text-xs text-text-muted",children:"Endpoint"}),(0,s.jsx)("div",{className:"mt-1 break-all font-mono text-sm",children:tR})]}),(0,s.jsxs)("div",{className:"rounded-xl border border-border bg-surface p-3",children:[(0,s.jsx)("div",{className:"text-xs text-text-muted",children:"Model test"}),(0,s.jsx)("div",{className:"mt-1 break-all font-mono text-sm",children:tD})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"mb-1 text-xs font-medium text-text-muted",children:"Lệnh curl cho Windows CMD"}),(0,s.jsx)("pre",{className:"overflow-auto rounded-xl border border-border bg-surface p-3 text-xs",children:tz})]}),(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"D\xe1n lệnh v\xe0o CMD hoặc Windows Terminal để test nhanh. Nếu domain dashboard chạy sau reverse proxy, endpoint sẽ d\xf9ng đ\xfang domain đang mở tr\xean tr\xecnh duyệt."}),(0,s.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,s.jsx)(l.$n,{variant:"ghost",onClick:()=>tr(null),children:"Đ\xf3ng"}),(0,s.jsx)(l.$n,{onClick:()=>tA(tz,`api-test-curl-${ts?.id||"current"}`),children:tC===`api-test-curl-${ts?.id||"current"}`?"Đ\xe3 copy":"Copy lệnh curl"})]})]})}),(0,s.jsx)(l.aF,{isOpen:!!tl,onClose:()=>ta(null),title:"Claude Code Settings",size:"xl",children:(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("p",{className:"text-sm text-text-muted",children:["Copy nội dung JSON dưới đ\xe2y v\xe0o file ",(0,s.jsx)("span",{className:"font-mono",children:"%USERPROFILE%\\.claude\\settings.json"})," để Claude Code gọi qua gateway n\xe0y. Model coding d\xf9ng ",(0,s.jsx)("span",{className:"font-mono",children:tW.codingModel}),"; model fast d\xf9ng ",(0,s.jsx)("span",{className:"font-mono",children:tW.fastModel}),"."]}),(0,s.jsxs)("div",{className:"grid gap-3 md:grid-cols-3",children:[(0,s.jsxs)("div",{className:"rounded-xl border border-border bg-surface p-3",children:[(0,s.jsx)("div",{className:"text-xs text-text-muted",children:"API Key"}),(0,s.jsx)("div",{className:"mt-1 text-sm",children:tl?.name||"API Key"})]}),(0,s.jsxs)("div",{className:"rounded-xl border border-border bg-surface p-3",children:[(0,s.jsx)("div",{className:"text-xs text-text-muted",children:"Base URL"}),(0,s.jsx)("div",{className:"mt-1 break-all font-mono text-sm",children:tK})]}),(0,s.jsxs)("div",{className:"rounded-xl border border-border bg-surface p-3",children:[(0,s.jsx)("div",{className:"text-xs text-text-muted",children:"Model"}),(0,s.jsx)("div",{className:"mt-1 break-all font-mono text-sm",children:tW.codingModel})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"mb-1 text-xs font-medium text-text-muted",children:"settings.json"}),(0,s.jsx)("pre",{className:"max-h-[420px] overflow-auto rounded-xl border border-border bg-surface p-3 text-xs",children:tH})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"mb-1 text-xs font-medium text-text-muted",children:"C\xe0i v\xe0 chạy Claude Code CLI tr\xean Windows"}),(0,s.jsx)("pre",{className:"overflow-auto rounded-xl border border-border bg-surface p-3 text-xs",children:tG})]}),(0,s.jsx)("div",{className:"rounded-xl border border-amber-500/30 bg-amber-500/10 p-3 text-xs text-amber-700 dark:text-amber-300",children:"Lưu \xfd: 2 d\xf2ng auto-compact/context window đ\xe3 được comment sẵn; chỉ uncomment khi d\xf9ng local model. Nếu c\xe0i bằng npm th\xec m\xe1y cần c\xe0i Node.js trước. Chạy Claude Code trong thư mục project, kh\xf4ng chạy trong C:\\WINDOWS\\system32. Nếu d\xf9ng model fast ri\xeang như programmer-fast th\xec API key n\xe0y cũng phải được ph\xe9p d\xf9ng model đ\xf3 trong cột Model."}),(0,s.jsxs)("div",{className:"flex flex-wrap justify-end gap-2",children:[(0,s.jsx)(l.$n,{variant:"ghost",onClick:()=>ta(null),children:"Đ\xf3ng"}),(0,s.jsx)(l.$n,{variant:"outline",onClick:()=>tA(tG,`claude-code-help-${tl?.id||"current"}`),children:tC===`claude-code-help-${tl?.id||"current"}`?"Đ\xe3 copy hướng dẫn":"Copy hướng dẫn"}),(0,s.jsx)(l.$n,{onClick:()=>tA(tH,`claude-code-settings-${tl?.id||"current"}`),children:tC===`claude-code-settings-${tl?.id||"current"}`?"Đ\xe3 copy settings":"Copy settings.json"})]})]})}),(0,s.jsx)(l.aF,{isOpen:!!ti,onClose:()=>to(null),title:"OpenCode Settings",size:"xl",children:(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("p",{className:"text-sm text-text-muted",children:["Copy JSON dưới đ\xe2y v\xe0o file ",(0,s.jsx)("span",{className:"font-mono",children:"%APPDATA%\\opencode\\opencode.json"})," hoặc ",(0,s.jsx)("span",{className:"font-mono",children:"opencode.json"})," trong project. Model ch\xednh d\xf9ng ",(0,s.jsx)("span",{className:"font-mono",children:tY.codingModel}),"; explorer/fast d\xf9ng ",(0,s.jsx)("span",{className:"font-mono",children:tY.fastModel}),"."]}),(0,s.jsxs)("div",{className:"grid gap-3 md:grid-cols-4",children:[(0,s.jsxs)("div",{className:"rounded-xl border border-border bg-surface p-3",children:[(0,s.jsx)("div",{className:"text-xs text-text-muted",children:"API Key"}),(0,s.jsx)("div",{className:"mt-1 text-sm",children:ti?.name||"API Key"})]}),(0,s.jsxs)("div",{className:"rounded-xl border border-border bg-surface p-3",children:[(0,s.jsx)("div",{className:"text-xs text-text-muted",children:"Base URL"}),(0,s.jsx)("div",{className:"mt-1 break-all font-mono text-sm",children:tK})]}),(0,s.jsxs)("div",{className:"rounded-xl border border-border bg-surface p-3",children:[(0,s.jsx)("div",{className:"text-xs text-text-muted",children:"Model ch\xednh"}),(0,s.jsx)("div",{className:"mt-1 break-all font-mono text-sm",children:tY.codingModel})]}),(0,s.jsxs)("div",{className:"rounded-xl border border-border bg-surface p-3",children:[(0,s.jsx)("div",{className:"text-xs text-text-muted",children:"Model fast"}),(0,s.jsx)("div",{className:"mt-1 break-all font-mono text-sm",children:tY.fastModel})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"mb-1 text-xs font-medium text-text-muted",children:"opencode.json"}),(0,s.jsx)("pre",{className:"max-h-[420px] overflow-auto rounded-xl border border-border bg-surface p-3 text-xs",children:tJ})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"mb-1 text-xs font-medium text-text-muted",children:"C\xe0i v\xe0 chạy OpenCode tr\xean Windows PowerShell"}),(0,s.jsx)("pre",{className:"overflow-auto rounded-xl border border-border bg-surface p-3 text-xs",children:tV})]}),(0,s.jsxs)("div",{className:"rounded-xl border border-amber-500/30 bg-amber-500/10 p-3 text-xs text-amber-700 dark:text-amber-300",children:["Lưu \xfd: API key n\xe0y cần được ph\xe9p gọi cả ",tY.codingModel," v\xe0 ",tY.fastModel,". Nếu OpenCode đang d\xf9ng đường dẫn config kh\xe1c, c\xf3 thể đặt file opencode.json ngay trong thư mục project."]}),(0,s.jsxs)("div",{className:"flex flex-wrap justify-end gap-2",children:[(0,s.jsx)(l.$n,{variant:"ghost",onClick:()=>to(null),children:"Đ\xf3ng"}),(0,s.jsx)(l.$n,{variant:"outline",onClick:()=>tA(tV,`opencode-help-${ti?.id||"current"}`),children:tC===`opencode-help-${ti?.id||"current"}`?"Đ\xe3 copy hướng dẫn":"Copy hướng dẫn"}),(0,s.jsx)(l.$n,{onClick:()=>tA(tJ,`opencode-settings-${ti?.id||"current"}`),children:tC===`opencode-settings-${ti?.id||"current"}`?"Đ\xe3 copy settings":"Copy opencode.json"})]})]})}),(0,s.jsx)(l.aF,{isOpen:!!td,onClose:()=>tc(null),title:"Codex Settings",size:"xl",children:(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("p",{className:"text-sm text-text-muted",children:["Copy TOML dưới đ\xe2y v\xe0o file ",(0,s.jsx)("span",{className:"font-mono",children:"%USERPROFILE%\\.codex\\config.toml"}),". API key được set bằng biến m\xf4i trường ",(0,s.jsx)("span",{className:"font-mono",children:"OPENAI_API_KEY"}),". Model ch\xednh d\xf9ng ",(0,s.jsx)("span",{className:"font-mono",children:tZ.codingModel}),"; profile fast d\xf9ng ",(0,s.jsx)("span",{className:"font-mono",children:tZ.fastModel}),"."]}),(0,s.jsxs)("div",{className:"grid gap-3 md:grid-cols-3",children:[(0,s.jsxs)("div",{className:"rounded-xl border border-border bg-surface p-3",children:[(0,s.jsx)("div",{className:"text-xs text-text-muted",children:"API Key"}),(0,s.jsx)("div",{className:"mt-1 text-sm",children:td?.name||"API Key"})]}),(0,s.jsxs)("div",{className:"rounded-xl border border-border bg-surface p-3",children:[(0,s.jsx)("div",{className:"text-xs text-text-muted",children:"Base URL"}),(0,s.jsx)("div",{className:"mt-1 break-all font-mono text-sm",children:tK})]}),(0,s.jsxs)("div",{className:"rounded-xl border border-border bg-surface p-3",children:[(0,s.jsx)("div",{className:"text-xs text-text-muted",children:"Model"}),(0,s.jsx)("div",{className:"mt-1 break-all font-mono text-sm",children:tZ.codingModel})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"mb-1 text-xs font-medium text-text-muted",children:"config.toml"}),(0,s.jsx)("pre",{className:"max-h-[420px] overflow-auto rounded-xl border border-border bg-surface p-3 text-xs",children:tQ})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"mb-1 text-xs font-medium text-text-muted",children:"C\xe0i v\xe0 chạy Codex tr\xean Windows PowerShell"}),(0,s.jsx)("pre",{className:"overflow-auto rounded-xl border border-border bg-surface p-3 text-xs",children:tX})]}),(0,s.jsx)("div",{className:"rounded-xl border border-amber-500/30 bg-amber-500/10 p-3 text-xs text-amber-700 dark:text-amber-300",children:"Lưu \xfd: c\xe1c d\xf2ng context window v\xe0 auto-compact đ\xe3 được comment sẵn; chỉ uncomment khi d\xf9ng local model. Nếu c\xe0i bằng npm th\xec m\xe1y cần c\xe0i Node.js trước. Hướng dẫn đ\xe3 tự tạo config.toml v\xe0 set biến m\xf4i trường cho phi\xean PowerShell hiện tại; setx chỉ lưu lại cho terminal mở sau. Codex d\xf9ng OpenAI-compatible endpoint của BlueRouter."}),(0,s.jsxs)("div",{className:"flex flex-wrap justify-end gap-2",children:[(0,s.jsx)(l.$n,{variant:"ghost",onClick:()=>tc(null),children:"Đ\xf3ng"}),(0,s.jsx)(l.$n,{variant:"outline",onClick:()=>tA(tX,`codex-help-${td?.id||"current"}`),children:tC===`codex-help-${td?.id||"current"}`?"Đ\xe3 copy hướng dẫn":"Copy hướng dẫn"}),(0,s.jsx)(l.$n,{onClick:()=>tA(tQ,`codex-settings-${td?.id||"current"}`),children:tC===`codex-settings-${td?.id||"current"}`?"Đ\xe3 copy settings":"Copy config.toml"})]})]})}),(0,s.jsx)(l.aF,{isOpen:!!tm,onClose:()=>tx(null),title:"Qwen Code Settings",size:"xl",children:(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("p",{className:"text-sm text-text-muted",children:["Copy JSON dưới đ\xe2y v\xe0o file ",(0,s.jsx)("span",{className:"font-mono",children:"%USERPROFILE%\\.qwen\\settings.json"})," để Qwen Code gọi qua OpenAI-compatible endpoint của BlueRouter. Model ch\xednh d\xf9ng ",(0,s.jsx)("span",{className:"font-mono",children:t0.codingModel}),"; model fast d\xf9ng ",(0,s.jsx)("span",{className:"font-mono",children:t0.fastModel}),"."]}),(0,s.jsxs)("div",{className:"grid gap-3 md:grid-cols-3",children:[(0,s.jsxs)("div",{className:"rounded-xl border border-border bg-surface p-3",children:[(0,s.jsx)("div",{className:"text-xs text-text-muted",children:"API Key"}),(0,s.jsx)("div",{className:"mt-1 text-sm",children:tm?.name||"API Key"})]}),(0,s.jsxs)("div",{className:"rounded-xl border border-border bg-surface p-3",children:[(0,s.jsx)("div",{className:"text-xs text-text-muted",children:"Base URL"}),(0,s.jsx)("div",{className:"mt-1 break-all font-mono text-sm",children:tK})]}),(0,s.jsxs)("div",{className:"rounded-xl border border-border bg-surface p-3",children:[(0,s.jsx)("div",{className:"text-xs text-text-muted",children:"Model"}),(0,s.jsx)("div",{className:"mt-1 break-all font-mono text-sm",children:t0.codingModel})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"mb-1 text-xs font-medium text-text-muted",children:"settings.json"}),(0,s.jsx)("pre",{className:"max-h-[420px] overflow-auto rounded-xl border border-border bg-surface p-3 text-xs",children:t1})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"mb-1 text-xs font-medium text-text-muted",children:"C\xe0i v\xe0 chạy Qwen Code tr\xean Windows PowerShell"}),(0,s.jsx)("pre",{className:"overflow-auto rounded-xl border border-border bg-surface p-3 text-xs",children:t2})]}),(0,s.jsx)("div",{className:"rounded-xl border border-amber-500/30 bg-amber-500/10 p-3 text-xs text-amber-700 dark:text-amber-300",children:"Lưu \xfd: hướng dẫn đ\xe3 tự tạo settings.json hợp lệ v\xe0 set biến m\xf4i trường cho phi\xean PowerShell hiện tại. setx chỉ lưu lại cho terminal mở sau. Qwen Code hỗ trợ OpenAI-compatible provider n\xean d\xf9ng tốt với BlueRouter."}),(0,s.jsxs)("div",{className:"flex flex-wrap justify-end gap-2",children:[(0,s.jsx)(l.$n,{variant:"ghost",onClick:()=>tx(null),children:"Đ\xf3ng"}),(0,s.jsx)(l.$n,{variant:"outline",onClick:()=>tA(t2,`qwen-code-help-${tm?.id||"current"}`),children:tC===`qwen-code-help-${tm?.id||"current"}`?"Đ\xe3 copy hướng dẫn":"Copy hướng dẫn"}),(0,s.jsx)(l.$n,{onClick:()=>tA(t1,`qwen-code-settings-${tm?.id||"current"}`),children:tC===`qwen-code-settings-${tm?.id||"current"}`?"Đ\xe3 copy settings":"Copy settings.json"})]})]})}),(0,s.jsx)(T,{apiKey:eK,fallbackModels:Z,onClose:()=>eF(null)}),(0,s.jsx)(P,{apiKey:eL,globalEnabled:eD,globalLevel:eB,onClose:()=>eT(null),onSave:nx,saving:eR}),(0,s.jsx)(P,{apiKey:eM,globalEnabled:eD,globalLevel:eB,onClose:()=>e_(null),onSave:()=>{},saving:!1,infoOnly:!0}),(0,s.jsx)(N,{open:!!ev,keyName:ev?.name,models:ek,setModels:ew,activeProviders:eu,modelAliases:ep,onClose:()=>{eN(null),ew([])},onSave:nd,saving:eC,personalOnly:!tI,extraModels:Z}),(0,s.jsx)(v,{isOpen:ed,keyName:"Default cho API key mới",policy:el,setPolicy:ea,onClose:()=>{ec(!1),ea(es||o)},onSave:na,saving:ei}),(0,s.jsx)(v,{isOpen:!!eP,keyName:eP?.name,policy:eO,setPolicy:e$,onClose:()=>{eS(null),e$(o)},onSave:nc,onClear:nm,saving:eI}),(0,s.jsx)(l.rq,{isOpen:em,onClose:()=>ex(!1),onSelect:e=>{let t=String(e?.value||e?.name||e||"").trim();t&&ee(e=>c([...e,t]))},onDeselect:e=>{let t=String(e?.value||e?.name||e||"").trim();t&&ee(e=>c(e).filter(e=>e!==t))},activeProviders:eu,modelAliases:ep,title:"Chọn default models cho API key",addedModelValues:X,closeOnSelect:!1}),D?(0,s.jsx)(l.uo,{isOpen:!!D,onClose:()=>q(null),onConfirm:D.onConfirm,title:D.title,message:D.message,confirmText:"X\xf3a",cancelText:"Hủy",variant:"danger"}):null]})}},61771:(e,t,n)=>{"use strict";n.d(t,{default:()=>o});var s=n(95155),r=n(12115),l=n(35497),a=n(94027);let i="api-keys-bulk-default-models-result";function o(){let[e,t]=(0,r.useState)(!1),[n,o]=(0,r.useState)(!1),[d,c]=(0,r.useState)(""),[m,x]=(0,r.useState)(""),{isAdmin:u}=(0,a.s)();if((0,r.useEffect)(()=>{let e=window.sessionStorage.getItem(i);e&&(window.sessionStorage.removeItem(i),c(e))},[]),!u)return null;let h=async()=>{t(!1),o(!0),c(""),x("");try{let e=await fetch("/api/keys",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({applyDefaultModelsToExistingKeys:!0})}),t=await e.json().catch(()=>({}));if(!e.ok)throw Error(t.error||"Kh\xf4ng th\xeam được default models v\xe0o API key hiện c\xf3");let n=t.apiKeyDefaultModelsApplied||{},s=Number(n.updated||0),r=Number(n.unchanged||0),l=Number(n.legacyFullAccessSkipped||0),a=`Đ\xe3 bổ sung default models cho ${s} API key. ${r} key đ\xe3 c\xf3 đủ model; ${l} key Legacy full access được giữ nguy\xean.`;window.sessionStorage.setItem(i,a),window.location.reload()}catch(e){x(e?.message||"Kh\xf4ng th\xeam được default models v\xe0o API key hiện c\xf3")}finally{o(!1)}};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"mb-4 flex flex-col gap-2 rounded-2xl border border-border bg-surface/50 p-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsxs)("div",{className:"min-w-0 text-sm",children:[(0,s.jsx)("div",{className:"font-medium text-text-main",children:"\xc1p Default models cho API key hiện c\xf3"}),(0,s.jsx)("div",{className:"text-xs text-text-muted",children:"Chỉ th\xeam model c\xf2n thiếu; kh\xf4ng x\xf3a model đ\xe3 g\xe1n v\xe0 kh\xf4ng thu hẹp quyền của key Legacy full access."}),d?(0,s.jsx)("div",{className:"mt-1 text-xs text-emerald-700 dark:text-emerald-300",children:d}):null,m?(0,s.jsx)("div",{className:"mt-1 text-xs text-red-600",children:m}):null]}),(0,s.jsx)(l.$n,{size:"sm",variant:"outline",onClick:()=>t(!0),disabled:n,children:n?"Đang th\xeam...":"Th\xeam Default models v\xe0o tất cả API key"})]}),(0,s.jsx)(l.uo,{isOpen:e,onClose:()=>!n&&t(!1),onConfirm:h,title:"Th\xeam Default models v\xe0o tất cả API key?",message:"Hệ thống sẽ th\xeam c\xe1c Default models đ\xe3 lưu v\xe0o mọi API key c\xf3 danh s\xe1ch model giới hạn. Model đ\xe3 g\xe1n sẵn vẫn được giữ nguy\xean. API key Legacy full access sẽ kh\xf4ng bị thay đổi để tr\xe1nh v\xf4 t\xecnh thu hẹp quyền truy cập.",confirmText:"Th\xeam v\xe0o tất cả",cancelText:"Hủy"})]})}},72143:()=>{},84578:(e,t,n)=>{Promise.resolve().then(n.t.bind(n,72143,23)),Promise.resolve().then(n.bind(n,56484)),Promise.resolve().then(n.bind(n,61771)),Promise.resolve().then(n.bind(n,9944))}},e=>{e.O(0,[646,6373,3862,8500,9893,9959,7050,5564,5263,7033,5497,8441,3794,7358],()=>e(e.s=84578)),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4465],{35911:(e,t,r)=>{Promise.resolve().then(r.bind(r,88512))},88512:(e,t,r)=>{"use strict";r.d(t,{default:()=>g});var s=r(95155),a=r(12115),i=r(35497),l=r(28777),n=r(52679);let o="basic-chat.sessions",d="basic-chat.activeSessionId",c="basic-chat.activeProviderId",m="basic-chat.draft";function u(){return globalThis.crypto?.randomUUID?globalThis.crypto.randomUUID():`chat_${Date.now()}_${Math.random().toString(16).slice(2)}`}function p(e){if("string"==typeof e)return e;if(null==e)return"";if(Array.isArray(e))return e.map(p).filter(Boolean).join(" ");if("object"==typeof e){if("string"==typeof e.message)return e.message;if("string"==typeof e.error)return e.error;try{return JSON.stringify(e)}catch{}}return String(e)}function h(e=""){let t=p(e).replace(/\s+/g," ").trim();return t?t.length>52?`${t.slice(0,52).trimEnd()}…`:t:"New chat"}async function x(e){return await new Promise((t,r)=>{let s=new FileReader;s.onload=()=>t(String(s.result||"")),s.onerror=()=>r(s.error||Error("Failed to read file")),s.readAsDataURL(e)})}function f(e){return e?.name||function(e=""){return String(e).replace(/[-_]/g," ").replace(/\b\w/g,e=>e.toUpperCase()).trim()||"Unknown"}(e?.provider||e?.id||"provider")}function g(){let[e,t]=(0,a.useState)([]),[r,g]=(0,a.useState)(!0),[w,v]=(0,a.useState)(""),[b,N]=(0,a.useState)(()=>{try{let e=function(e,t){try{return JSON.parse(e)}catch{return t}}(globalThis.localStorage.getItem(o),[]);return Array.isArray(e)?e.map(e=>({...e,messages:Array.isArray(e.messages)?e.messages:[]})):[]}catch{return[]}}),[y,j]=(0,a.useState)(()=>globalThis.localStorage.getItem(d)||""),[S,I]=(0,a.useState)(()=>globalThis.localStorage.getItem(c)||""),[A,k]=(0,a.useState)(""),[D,O]=(0,a.useState)(()=>globalThis.localStorage.getItem(m)||""),[$,C]=(0,a.useState)([]),[_,M]=(0,a.useState)(!1),[E,T]=(0,a.useState)(""),[U,R]=(0,a.useState)(""),[z,q]=(0,a.useState)(!1),[P,J]=(0,a.useState)(!1),[B,F]=(0,a.useState)(!1),K=(0,a.useRef)(null),L=(0,a.useRef)(null),W=(0,a.useRef)(!1),H=(0,a.useRef)(null),Y=(0,a.useRef)(null);(0,a.useEffect)(()=>{q(!0)},[]),(0,a.useEffect)(()=>{let e=!1;return async function(){g(!0),v("");try{let r=await fetch("/api/providers",{cache:"no-store"}),s=await r.json().catch(()=>({})),a=Array.isArray(s.connections)?s.connections.filter(e=>e?.isActive!==!1):[];if(0===a.length){e||(t([]),v("No providers connected yet."));return}let i=new Map;for(let e of a){let t=e.provider||e.id,r=f(e),s=(0,n.mq)(t)?"openai-compatible":(0,n.gb)(t)?"anthropic-compatible":t;i.has(t)||i.set(t,{providerId:t,providerName:r,providerType:s,connections:[],models:[]});let a=i.get(t);a.providerName=a.providerName||r,a.providerType=a.providerType||s,a.connections.push(e);let o=(0,l.KC)(t).map(t=>t?.id?{id:`${e.provider}/${t.id}`,requestModel:`${e.provider}/${t.id}`,name:t.name||t.id,providerId:e.provider,providerName:f(e),source:"static"}:null).filter(Boolean);a.models.push(...o)}for(let e of(await Promise.all(a.map(async e=>{try{let t=await fetch(`/api/providers/${e.id}/models`,{cache:"no-store"}),r=await t.json().catch(()=>({}));if(!t.ok)return{connection:e,models:[]};let s=(Array.isArray(r?.models)?r.models:Array.isArray(r?.data)?r.data:Array.isArray(r?.results)?r.results:Array.isArray(r)?r:[]).map(t=>(function(e,t){let r="string"==typeof e?e:e?.id||e?.name||e?.model||"";if(!r)return null;let s="string"==typeof e?e:e?.name||e?.displayName||r,a=r;return((0,n.mq)(t.provider)||(0,n.gb)(t.provider))&&!r.includes("/")&&(a=`${t.provider}/${r}`),{id:a,requestModel:a,name:s,providerId:t.provider,providerName:f(t),source:"live"}})(t,e)).filter(Boolean);return{connection:e,models:s}}catch{return{connection:e,models:[]}}})))){let t=e.connection.provider||e.connection.id,r=i.get(t);r&&r.models.push(...e.models)}let o=Array.from(i.values()).map(e=>({...e,models:(function(e){let t=new Map;for(let r of e)r?.id&&(t.has(r.id)||t.set(r.id,r));return Array.from(t.values())})(e.models).sort((e,t)=>e.name.localeCompare(t.name))})).filter(e=>e.models.length>0).sort((e,t)=>e.providerName.localeCompare(t.providerName));e||(t(o),0===o.length&&v("Providers connected but no models available."))}catch(r){e||(v(p(r?.message)||"Failed to load providers/models."),t([]))}finally{e||g(!1)}}(),()=>{e=!0}},[]),(0,a.useEffect)(()=>{let e=e=>{H.current&&!H.current.contains(e.target)&&J(!1),Y.current&&!Y.current.contains(e.target)&&F(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]);let G=(0,a.useMemo)(()=>{let t=new Map;for(let r of e)for(let e of r.models)t.set(e.id,{...e,providerId:r.providerId,providerName:r.providerName});return t},[e]),Q=(0,a.useMemo)(()=>e.find(e=>e.providerId===S)||e[0]||null,[e,S]),V=(0,a.useMemo)(()=>{if(A&&G.has(A))return G.get(A);if(y){let e=b.find(e=>e.id===y);if(e?.modelId&&G.has(e.modelId))return G.get(e.modelId)}return Q?.models?.[0]||null},[A,G,Q,b,y]),X=(0,a.useMemo)(()=>b.find(e=>e.id===y)||null,[b,y]),Z=X?.messages||[],ee=(0,a.useMemo)(()=>[...b].sort((e,t)=>new Date(t.updatedAt).getTime()-new Date(e.updatedAt).getTime()),[b]),et=!_&&!!V&&(D.trim().length>0||$.length>0);(0,a.useEffect)(()=>{if(z)try{globalThis.localStorage.setItem(o,JSON.stringify(b)),globalThis.localStorage.setItem(d,y),globalThis.localStorage.setItem(c,S),globalThis.localStorage.setItem(m,D)}catch{}},[z,b,y,S,D]),(0,a.useEffect)(()=>{if(!z||r||W.current||0===e.length)return;let t=e.find(e=>e.providerId===S)||e[0],s=A&&G.has(A)?G.get(A):t.models[0];if(b.length>0){let e=b.find(e=>e.id===y)||b[0],r=e?.modelId&&G.has(e.modelId)?G.get(e.modelId):s;W.current=!0,j(e.id),I(r?.providerId||t.providerId),k(r?.id||s.id);return}let a={id:u(),title:"New chat",providerId:t.providerId,providerName:t.providerName,modelId:s.id,modelName:s.name,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),messages:[]};W.current=!0,N([a]),j(a.id),I(t.providerId),k(s.id)},[z,r,e,G,b,y,S,A]);let er=(e,t)=>{N(r=>r.map(r=>r.id===e?t({...r,messages:Array.isArray(r.messages)?r.messages.map(e=>({...e})):[]}):r))},es=e=>e?{id:u(),title:"New chat",providerId:e.providerId,providerName:e.providerName,modelId:e.id,modelName:e.name,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),messages:[]}:null,ea=async e=>{let t=Array.from(e.target.files||[]);if(0===t.length)return;let r=t.filter(e=>e.type.startsWith("image/"));if(0===r.length){e.target.value="";return}let s=await Promise.all(r.map(async e=>({id:u(),name:e.name,type:e.type,size:e.size,dataUrl:await x(e)})));C(e=>[...e,...s]),e.target.value=""},ei=async()=>{let e=V||Q?.models?.[0]||null;if(!e)return;let t=D.trim();if(!t&&0===$.length)return;let r=y,s=b.find(e=>e.id===r);if(!s){if(!(s=es(e)))return;r=s.id,N(e=>[s,...e]),j(r)}let a={id:u(),role:"user",content:t,attachments:$.map(e=>({id:e.id,name:e.name,type:e.type,dataUrl:e.dataUrl})),createdAt:new Date().toISOString()},i=u(),l={id:i,role:"assistant",content:"",createdAt:new Date().toISOString(),status:"streaming"},n=[...s.messages||[],a,l];N(s=>s.map(s=>s.id===r?{...s,providerId:e.providerId,providerName:e.providerName,modelId:e.id,modelName:e.name,messages:n,updatedAt:new Date().toISOString(),title:"New chat"===s.title?h(t):s.title}:s)),O(""),C([]),M(!0),T(i),R(""),L.current?.abort(),L.current=new AbortController;let o=n.filter(e=>"assistant"!==e.role||e.id!==i).map(e=>({role:e.role,content:"user"===e.role?function(e){let t=p(e.content).trim(),r=Array.isArray(e.attachments)?e.attachments:[];if(0===r.length)return t;let s=[];for(let e of(t&&s.push({type:"text",text:t}),r))e?.dataUrl&&s.push({type:"image_url",image_url:{url:e.dataUrl}});return s.length>0?s:t}(e):e.content}));try{var d;let s,a=await fetch("/api/dashboard/chat/completions",{method:"POST",headers:{"Content-Type":"application/json",Accept:"text/event-stream"},body:JSON.stringify({model:e.requestModel||e.id,messages:o,stream:!0}),signal:L.current.signal});if(!a.ok){let e=await a.json().catch(()=>({}));throw Error(p(e.error||e.message||`Request failed (${a.status})`))}let l=a.body?.getReader();if(!l){let e=await a.json().catch(()=>({})),t=p(e?.choices?.[0]?.message?.content||e?.output_text||e?.error||e?.message||"");er(r,e=>({...e,messages:e.messages.map(e=>e.id===i?{...e,content:t,status:"done"}:e),updatedAt:new Date().toISOString()}));return}let n=new TextDecoder,c="",m="";for(;;){let{value:e,done:t}=await l.read();if(t)break;let s=(c+=n.decode(e,{stream:!0})).split(/\r?\n/);for(let e of(c=s.pop()||"",s)){let t=e.trim();if(!t.startsWith("data:"))continue;let s=t.slice(5).trim();if(s&&"[DONE]"!==s)try{let e=JSON.parse(s),t=function(e){if(!e||"object"!=typeof e)return"";let t=e.choices?.[0];return[(t?.delta||{}).content,t?.message?.content,e.output_text,e.text].map(p).filter(Boolean)[0]||""}(e);if(!t)continue;m+=t,R(m),er(r,e=>({...e,messages:e.messages.map(e=>e.id===i?{...e,content:m,status:"streaming"}:e),updatedAt:new Date().toISOString()}))}catch{}}}er(r,e=>({...e,messages:e.messages.map(e=>e.id===i?{...e,content:m||e.content,status:"done"}:e),updatedAt:new Date().toISOString()})),d=r,s=h(t),er(d,e=>({...e,title:"New chat"===e.title?s:e.title,updatedAt:new Date().toISOString()}))}catch(e){if("AbortError"!==e.name){let t=p(e?.message||e);er(r,e=>({...e,messages:e.messages.map(e=>e.id===i?{...e,content:e.content||`Error: ${t}`,status:"error"}:e),updatedAt:new Date().toISOString()})),v(t||"Failed to send message.")}}finally{M(!1),T(""),R(""),L.current=null}},el=V?`${V.name}`:"Select model",en=V?V.requestModel:"Choose from connected providers";return(0,s.jsx)("div",{className:"relative flex-1 flex flex-col h-full min-h-0 min-w-0 bg-[#212121] text-white overflow-hidden",children:(0,s.jsxs)("div",{className:"relative mx-auto flex flex-1 h-full min-h-0 w-full max-w-4xl flex-col",children:[(0,s.jsxs)("div",{className:"flex shrink-0 items-center justify-between gap-3 px-4 py-3 lg:px-6",children:[(0,s.jsxs)("div",{ref:H,className:"relative",children:[(0,s.jsx)("button",{type:"button",onClick:()=>J(e=>!e),className:"flex items-center gap-3 rounded-2xl border border-white/10 bg-white/5 px-4 py-3 text-left transition hover:bg-white/8",children:(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"text-sm font-semibold text-white",children:el}),(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px] text-white/70",children:"expand_more"})]}),(0,s.jsx)("p",{className:"truncate text-xs text-white/55",children:en})]})}),P?(0,s.jsxs)("div",{className:"absolute left-0 top-[calc(100%+10px)] z-30 w-[min(520px,calc(100vw-2rem))] overflow-hidden rounded-[20px] border border-white/10 bg-[#262626] shadow-2xl shadow-black/50",children:[(0,s.jsxs)("div",{className:"border-b border-white/10 px-4 py-3",children:[(0,s.jsx)("p",{className:"text-xs uppercase tracking-[0.22em] text-white/45",children:"Models"}),(0,s.jsx)("p",{className:"text-sm text-white/75",children:"Only from connected providers"})]}),(0,s.jsx)("div",{className:"max-h-[60vh] overflow-y-auto p-2 custom-scrollbar",children:e.map(e=>(0,s.jsxs)("div",{className:"mb-2 rounded-[16px] border border-white/10 bg-black/20 p-2",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between px-2 py-2",children:[(0,s.jsx)("p",{className:"text-sm font-semibold text-white",children:e.providerName}),(0,s.jsx)(i.Ex,{size:"sm",variant:"default",children:e.models.length})]}),(0,s.jsx)("div",{className:"grid gap-2 sm:grid-cols-2",children:e.models.map(e=>{let t=e.id===A;return(0,s.jsx)("button",{type:"button",onClick:()=>(e=>{let t=G.get(e);if(!t)return;let r=b.find(e=>e.id===y);if(r&&r.messages.length>0){let e=es(t);if(!e)return;N(t=>[e,...t]),j(e.id)}else if(r)N(e=>e.map(e=>e.id===r.id?{...e,providerId:t.providerId,providerName:t.providerName,modelId:t.id,modelName:t.name}:e)),j(r.id);else{let e=es(t);if(!e)return;N(t=>[e,...t]),j(e.id)}I(t.providerId),k(t.id),J(!1)})(e.id),className:`rounded-[14px] border px-3 py-3 text-left transition ${t?"border-blue-400/40 bg-blue-500/15":"border-white/10 bg-white/5 hover:bg-white/8"}`,children:(0,s.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("p",{className:"truncate text-sm font-medium text-white",children:e.name}),(0,s.jsx)("p",{className:"truncate text-[11px] text-white/45",children:e.requestModel})]}),t?(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px] text-blue-300",children:"check_circle"}):null]})},e.id)})})]},e.providerId))})]}):null]}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("button",{type:"button",onClick:()=>F(e=>!e),className:"rounded-2xl border border-white/10 bg-white/5 px-4 py-3 text-sm text-white/80 transition hover:bg-white/8",children:"History"}),(0,s.jsx)(i.$n,{variant:"ghost",size:"sm",icon:"delete",onClick:()=>{if(!y)return;let e=b.filter(e=>e.id!==y),t=e[0]||null;N(e),t?(j(t.id),I(t.providerId),k(t.modelId)):(j(""),I(""),k(""))},disabled:!y||0===b.length,children:"Clear"})]})]}),B?(0,s.jsxs)("div",{ref:Y,className:"absolute right-4 top-[72px] z-20 w-[min(360px,calc(100vw-2rem))] rounded-[20px] border border-white/10 bg-[#262626] p-2 shadow-2xl shadow-black/50 lg:right-6",children:[(0,s.jsx)("div",{className:"px-3 py-2",children:(0,s.jsx)("p",{className:"text-xs uppercase tracking-[0.22em] text-white/45",children:"Recent chats"})}),(0,s.jsx)("div",{className:"max-h-[48vh] space-y-2 overflow-y-auto p-1 custom-scrollbar",children:0===ee.length?(0,s.jsx)("div",{className:"rounded-[16px] border border-dashed border-white/10 bg-white/5 p-4 text-sm text-white/55",children:"No conversations yet."}):ee.map(e=>{let t=e.id===y,r=[...e.messages||[]].reverse().find(e=>"user"===e.role)||e.messages?.[0];return(0,s.jsx)("button",{type:"button",onClick:()=>{var t;let r;return t=e.id,void((r=b.find(e=>e.id===t))&&(j(t),I(r.providerId||S),k(r.modelId||A),F(!1)))},className:`w-full rounded-[16px] border px-3 py-3 text-left transition ${t?"border-blue-400/40 bg-blue-500/15":"border-white/10 bg-white/5 hover:bg-white/8"}`,children:(0,s.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsx)("p",{className:"truncate text-sm font-medium text-white",children:e.title}),(0,s.jsx)("p",{className:"mt-1 truncate text-xs text-white/50",children:p(r?.content)||"Empty chat"})]}),(0,s.jsx)("span",{className:"text-[10px] text-white/40 shrink-0",children:function(e){if(!e)return"Now";let t=new Date(e).getTime();if(Number.isNaN(t))return"Now";let r=Math.max(1,Math.round((Date.now()-t)/6e4));if(r<60)return`${r}m`;let s=Math.round(r/60);return s<24?`${s}h`:`${Math.round(s/24)}d`}(e.updatedAt)})]})},e.id)})})]}):null,w?(0,s.jsx)("div",{className:"mt-4 rounded-[18px] border border-rose-500/20 bg-rose-500/10 px-4 py-3 text-rose-100",children:(0,s.jsxs)("div",{className:"flex items-start gap-3",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"error"}),(0,s.jsx)("p",{className:"text-sm leading-6",children:w})]})}):null,(0,s.jsxs)("div",{className:"flex flex-1 flex-col min-h-0",children:[(0,s.jsxs)("div",{className:"flex-1 overflow-y-auto py-4 custom-scrollbar",children:[0===Z.length?(0,s.jsx)("div",{className:"flex min-h-[50vh] items-center justify-center px-4 text-center",children:(0,s.jsxs)("div",{className:"max-w-xl space-y-4",children:[(0,s.jsx)("div",{className:"mx-auto flex size-16 items-center justify-center rounded-[20px] border border-white/10 bg-white/5 text-white/80",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[30px]",children:"chat"})}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("h2",{className:"text-2xl font-semibold text-white",children:"Start a conversation"}),(0,s.jsx)("p",{className:"text-sm leading-6 text-white/60",children:"Simple chat interface to interact with any AI model from connected providers. Select a model and start chatting!"})]})]})}):null,(0,s.jsx)("div",{className:"mx-auto flex w-full max-w-3xl flex-col gap-4 px-4",children:Z.map(e=>{let t="user"===e.role,r="assistant"===e.role,a=r&&e.id===E&&"streaming"===e.status,i=p(e.content)||(r?U:"");return(0,s.jsx)("div",{className:`flex w-full ${t?"justify-end":"justify-start"} mb-6`,children:(0,s.jsxs)("div",{className:`max-w-[min(88%,42rem)] ${t?"rounded-3xl bg-[#2f2f2f] px-5 py-3.5 text-white":"text-white/90"}`,children:[(0,s.jsx)("div",{className:"mb-1 flex items-center justify-between gap-3",children:(0,s.jsx)("span",{className:"text-xs font-semibold",children:t?"You":V?.name||"Assistant"})}),e.attachments?.length?(0,s.jsx)("div",{className:"mb-3 grid grid-cols-2 gap-2 sm:grid-cols-3 mt-2",children:e.attachments.map(e=>(0,s.jsx)("a",{href:e.dataUrl,target:"_blank",rel:"noreferrer",className:"overflow-hidden rounded-[18px] border border-white/10 bg-black/20",children:(0,s.jsx)("img",{src:e.dataUrl,alt:e.name,className:"h-28 w-full object-cover"})},e.id))}):null,(0,s.jsxs)("div",{className:"whitespace-pre-wrap break-words text-[15px] leading-7",children:[i,r&&a&&!U?(0,s.jsx)("span",{className:"inline-block animate-pulse",children:"▋"}):null]})]})},e.id)})})]}),(0,s.jsxs)("div",{className:"shrink-0 pt-2",children:[$.length>0?(0,s.jsx)("div",{className:"mx-auto mb-3 flex w-full max-w-3xl flex-wrap gap-2 px-4",children:$.map(e=>(0,s.jsxs)("div",{className:"flex items-center gap-2 rounded-full border border-white/10 bg-white/5 px-3 py-2",children:[(0,s.jsx)("span",{className:"text-xs text-white/80 max-w-[12rem] truncate",children:e.name}),(0,s.jsx)("button",{type:"button",onClick:()=>{var t;return t=e.id,void C(e=>e.filter(e=>e.id!==t))},className:"text-white/55 hover:text-white","aria-label":"Remove attachment",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"close"})})]},e.id))}):null,(0,s.jsx)("div",{className:"mx-auto w-full max-w-3xl px-4 pb-2",children:(0,s.jsxs)("div",{className:"rounded-[26px] bg-[#2f2f2f] px-3 pt-3 pb-2 shadow-[0_0_15px_rgba(0,0,0,0.10)] ring-1 ring-white/5",children:[(0,s.jsx)("textarea",{value:D,onChange:e=>O(e.target.value),onKeyDown:e=>{"Enter"===e.key&&!e.shiftKey&&(e.preventDefault(),et&&ei())},placeholder:"Message AI",rows:1,className:"w-full resize-none bg-transparent px-2 text-[15px] leading-6 text-white outline-none placeholder:text-white/40 custom-scrollbar max-h-[25vh] overflow-y-auto"}),(0,s.jsxs)("div",{className:"mt-2 flex items-center justify-between gap-3",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("button",{type:"button",onClick:()=>K.current?.click(),disabled:!V||r,className:"p-2 text-white/50 hover:text-white transition rounded-full hover:bg-white/5",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"attach_file"})}),(0,s.jsx)("input",{ref:K,type:"file",accept:"image/*",multiple:!0,className:"hidden",onChange:ea}),(0,s.jsx)("span",{className:"text-xs font-medium text-white/30 truncate max-w-[120px]",children:V?V.name:"No model"})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[_?(0,s.jsx)("button",{type:"button",onClick:()=>{L.current?.abort()},className:"p-2 text-white bg-white/10 hover:bg-white/20 transition rounded-full h-8 w-8 flex items-center justify-center",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"stop"})}):null,(0,s.jsx)("button",{onClick:ei,disabled:!et,className:`h-8 w-8 rounded-full flex items-center justify-center transition ${et?"bg-white text-black hover:opacity-90":"bg-white/10 text-white/30 cursor-not-allowed"}`,children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"arrow_upward"})})]})]})]})})]}),(0,s.jsx)("p",{className:"mx-auto mt-2 max-w-3xl px-4 pb-4 text-center text-[11px] text-white/30",children:"Model list is filtered from connected providers."})]})]})})}}},e=>{e.O(0,[8991,3862,8500,9893,9959,7050,5564,5263,7033,5497,8441,3794,7358],()=>e(e.s=35911)),_N_E=e.O()}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4465],{35911:(e,t,r)=>{Promise.resolve().then(r.bind(r,88512))},88512:(e,t,r)=>{"use strict";r.d(t,{default:()=>g});var s=r(95155),a=r(12115),i=r(35497),l=r(28777),n=r(52679);let o="basic-chat.sessions",d="basic-chat.activeSessionId",c="basic-chat.activeProviderId",m="basic-chat.draft";function u(){return globalThis.crypto?.randomUUID?globalThis.crypto.randomUUID():`chat_${Date.now()}_${Math.random().toString(16).slice(2)}`}function p(e){if("string"==typeof e)return e;if(null==e)return"";if(Array.isArray(e))return e.map(p).filter(Boolean).join(" ");if("object"==typeof e){if("string"==typeof e.message)return e.message;if("string"==typeof e.error)return e.error;try{return JSON.stringify(e)}catch{}}return String(e)}function h(e=""){let t=p(e).replace(/\s+/g," ").trim();return t?t.length>52?`${t.slice(0,52).trimEnd()}…`:t:"New chat"}async function x(e){return await new Promise((t,r)=>{let s=new FileReader;s.onload=()=>t(String(s.result||"")),s.onerror=()=>r(s.error||Error("Failed to read file")),s.readAsDataURL(e)})}function f(e){return e?.name||function(e=""){return String(e).replace(/[-_]/g," ").replace(/\b\w/g,e=>e.toUpperCase()).trim()||"Unknown"}(e?.provider||e?.id||"provider")}function g(){let[e,t]=(0,a.useState)([]),[r,g]=(0,a.useState)(!0),[w,v]=(0,a.useState)(""),[b,N]=(0,a.useState)(()=>{try{let e=function(e,t){try{return JSON.parse(e)}catch{return t}}(globalThis.localStorage.getItem(o),[]);return Array.isArray(e)?e.map(e=>({...e,messages:Array.isArray(e.messages)?e.messages:[]})):[]}catch{return[]}}),[y,j]=(0,a.useState)(()=>globalThis.localStorage.getItem(d)||""),[S,I]=(0,a.useState)(()=>globalThis.localStorage.getItem(c)||""),[A,k]=(0,a.useState)(""),[D,O]=(0,a.useState)(()=>globalThis.localStorage.getItem(m)||""),[$,C]=(0,a.useState)([]),[_,M]=(0,a.useState)(!1),[E,T]=(0,a.useState)(""),[U,R]=(0,a.useState)(""),[z,q]=(0,a.useState)(!1),[P,J]=(0,a.useState)(!1),[B,F]=(0,a.useState)(!1),K=(0,a.useRef)(null),L=(0,a.useRef)(null),W=(0,a.useRef)(!1),H=(0,a.useRef)(null),Y=(0,a.useRef)(null);(0,a.useEffect)(()=>{q(!0)},[]),(0,a.useEffect)(()=>{let e=!1;return async function(){g(!0),v("");try{let r=await fetch("/api/providers",{cache:"no-store"}),s=await r.json().catch(()=>({})),a=Array.isArray(s.connections)?s.connections.filter(e=>e?.isActive!==!1):[];if(0===a.length){e||(t([]),v("No providers connected yet."));return}let i=new Map;for(let e of a){let t=e.provider||e.id,r=f(e),s=(0,n.mq)(t)?"openai-compatible":(0,n.gb)(t)?"anthropic-compatible":t;i.has(t)||i.set(t,{providerId:t,providerName:r,providerType:s,connections:[],models:[]});let a=i.get(t);a.providerName=a.providerName||r,a.providerType=a.providerType||s,a.connections.push(e);let o=(0,l.KC)(t).map(t=>t?.id?{id:`${e.provider}/${t.id}`,requestModel:`${e.provider}/${t.id}`,name:t.name||t.id,providerId:e.provider,providerName:f(e),source:"static"}:null).filter(Boolean);a.models.push(...o)}for(let e of(await Promise.all(a.map(async e=>{try{let t=await fetch(`/api/providers/${e.id}/models`,{cache:"no-store"}),r=await t.json().catch(()=>({}));if(!t.ok)return{connection:e,models:[]};let s=(Array.isArray(r?.models)?r.models:Array.isArray(r?.data)?r.data:Array.isArray(r?.results)?r.results:Array.isArray(r)?r:[]).map(t=>(function(e,t){let r="string"==typeof e?e:e?.id||e?.name||e?.model||"";if(!r)return null;let s="string"==typeof e?e:e?.name||e?.displayName||r,a=r;return((0,n.mq)(t.provider)||(0,n.gb)(t.provider))&&!r.includes("/")&&(a=`${t.provider}/${r}`),{id:a,requestModel:a,name:s,providerId:t.provider,providerName:f(t),source:"live"}})(t,e)).filter(Boolean);return{connection:e,models:s}}catch{return{connection:e,models:[]}}})))){let t=e.connection.provider||e.connection.id,r=i.get(t);r&&r.models.push(...e.models)}let o=Array.from(i.values()).map(e=>({...e,models:(function(e){let t=new Map;for(let r of e)r?.id&&(t.has(r.id)||t.set(r.id,r));return Array.from(t.values())})(e.models).sort((e,t)=>e.name.localeCompare(t.name))})).filter(e=>e.models.length>0).sort((e,t)=>e.providerName.localeCompare(t.providerName));e||(t(o),0===o.length&&v("Providers connected but no models available."))}catch(r){e||(v(p(r?.message)||"Failed to load providers/models."),t([]))}finally{e||g(!1)}}(),()=>{e=!0}},[]),(0,a.useEffect)(()=>{let e=e=>{H.current&&!H.current.contains(e.target)&&J(!1),Y.current&&!Y.current.contains(e.target)&&F(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]);let G=(0,a.useMemo)(()=>{let t=new Map;for(let r of e)for(let e of r.models)t.set(e.id,{...e,providerId:r.providerId,providerName:r.providerName});return t},[e]),Q=(0,a.useMemo)(()=>e.find(e=>e.providerId===S)||e[0]||null,[e,S]),V=(0,a.useMemo)(()=>{if(A&&G.has(A))return G.get(A);if(y){let e=b.find(e=>e.id===y);if(e?.modelId&&G.has(e.modelId))return G.get(e.modelId)}return Q?.models?.[0]||null},[A,G,Q,b,y]),X=(0,a.useMemo)(()=>b.find(e=>e.id===y)||null,[b,y]),Z=X?.messages||[],ee=(0,a.useMemo)(()=>[...b].sort((e,t)=>new Date(t.updatedAt).getTime()-new Date(e.updatedAt).getTime()),[b]),et=!_&&!!V&&(D.trim().length>0||$.length>0);(0,a.useEffect)(()=>{if(z)try{globalThis.localStorage.setItem(o,JSON.stringify(b)),globalThis.localStorage.setItem(d,y),globalThis.localStorage.setItem(c,S),globalThis.localStorage.setItem(m,D)}catch{}},[z,b,y,S,D]),(0,a.useEffect)(()=>{if(!z||r||W.current||0===e.length)return;let t=e.find(e=>e.providerId===S)||e[0],s=A&&G.has(A)?G.get(A):t.models[0];if(b.length>0){let e=b.find(e=>e.id===y)||b[0],r=e?.modelId&&G.has(e.modelId)?G.get(e.modelId):s;W.current=!0,j(e.id),I(r?.providerId||t.providerId),k(r?.id||s.id);return}let a={id:u(),title:"New chat",providerId:t.providerId,providerName:t.providerName,modelId:s.id,modelName:s.name,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),messages:[]};W.current=!0,N([a]),j(a.id),I(t.providerId),k(s.id)},[z,r,e,G,b,y,S,A]);let er=(e,t)=>{N(r=>r.map(r=>r.id===e?t({...r,messages:Array.isArray(r.messages)?r.messages.map(e=>({...e})):[]}):r))},es=e=>e?{id:u(),title:"New chat",providerId:e.providerId,providerName:e.providerName,modelId:e.id,modelName:e.name,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),messages:[]}:null,ea=async e=>{let t=Array.from(e.target.files||[]);if(0===t.length)return;let r=t.filter(e=>e.type.startsWith("image/"));if(0===r.length){e.target.value="";return}let s=await Promise.all(r.map(async e=>({id:u(),name:e.name,type:e.type,size:e.size,dataUrl:await x(e)})));C(e=>[...e,...s]),e.target.value=""},ei=async()=>{let e=V||Q?.models?.[0]||null;if(!e)return;let t=D.trim();if(!t&&0===$.length)return;let r=y,s=b.find(e=>e.id===r);if(!s){if(!(s=es(e)))return;r=s.id,N(e=>[s,...e]),j(r)}let a={id:u(),role:"user",content:t,attachments:$.map(e=>({id:e.id,name:e.name,type:e.type,dataUrl:e.dataUrl})),createdAt:new Date().toISOString()},i=u(),l={id:i,role:"assistant",content:"",createdAt:new Date().toISOString(),status:"streaming"},n=[...s.messages||[],a,l];N(s=>s.map(s=>s.id===r?{...s,providerId:e.providerId,providerName:e.providerName,modelId:e.id,modelName:e.name,messages:n,updatedAt:new Date().toISOString(),title:"New chat"===s.title?h(t):s.title}:s)),O(""),C([]),M(!0),T(i),R(""),L.current?.abort(),L.current=new AbortController;let o=n.filter(e=>"assistant"!==e.role||e.id!==i).map(e=>({role:e.role,content:"user"===e.role?function(e){let t=p(e.content).trim(),r=Array.isArray(e.attachments)?e.attachments:[];if(0===r.length)return t;let s=[];for(let e of(t&&s.push({type:"text",text:t}),r))e?.dataUrl&&s.push({type:"image_url",image_url:{url:e.dataUrl}});return s.length>0?s:t}(e):e.content}));try{var d;let s,a=await fetch("/api/dashboard/chat/completions",{method:"POST",headers:{"Content-Type":"application/json",Accept:"text/event-stream"},body:JSON.stringify({model:e.requestModel||e.id,messages:o,stream:!0}),signal:L.current.signal});if(!a.ok){let e=await a.json().catch(()=>({}));throw Error(p(e.error||e.message||`Request failed (${a.status})`))}let l=a.body?.getReader();if(!l){let e=await a.json().catch(()=>({})),t=p(e?.choices?.[0]?.message?.content||e?.output_text||e?.error||e?.message||"");er(r,e=>({...e,messages:e.messages.map(e=>e.id===i?{...e,content:t,status:"done"}:e),updatedAt:new Date().toISOString()}));return}let n=new TextDecoder,c="",m="";for(;;){let{value:e,done:t}=await l.read();if(t)break;let s=(c+=n.decode(e,{stream:!0})).split(/\r?\n/);for(let e of(c=s.pop()||"",s)){let t=e.trim();if(!t.startsWith("data:"))continue;let s=t.slice(5).trim();if(s&&"[DONE]"!==s)try{let e=JSON.parse(s),t=function(e){if(!e||"object"!=typeof e)return"";let t=e.choices?.[0];return[(t?.delta||{}).content,t?.message?.content,e.output_text,e.text].map(p).filter(Boolean)[0]||""}(e);if(!t)continue;m+=t,R(m),er(r,e=>({...e,messages:e.messages.map(e=>e.id===i?{...e,content:m,status:"streaming"}:e),updatedAt:new Date().toISOString()}))}catch{}}}er(r,e=>({...e,messages:e.messages.map(e=>e.id===i?{...e,content:m||e.content,status:"done"}:e),updatedAt:new Date().toISOString()})),d=r,s=h(t),er(d,e=>({...e,title:"New chat"===e.title?s:e.title,updatedAt:new Date().toISOString()}))}catch(e){if("AbortError"!==e.name){let t=p(e?.message||e);er(r,e=>({...e,messages:e.messages.map(e=>e.id===i?{...e,content:e.content||`Error: ${t}`,status:"error"}:e),updatedAt:new Date().toISOString()})),v(t||"Failed to send message.")}}finally{M(!1),T(""),R(""),L.current=null}},el=V?`${V.name}`:"Select model",en=V?V.requestModel:"Choose from connected providers";return(0,s.jsx)("div",{className:"relative flex-1 flex flex-col h-full min-h-0 min-w-0 bg-[#212121] text-white overflow-hidden",children:(0,s.jsxs)("div",{className:"relative mx-auto flex flex-1 h-full min-h-0 w-full max-w-4xl flex-col",children:[(0,s.jsxs)("div",{className:"flex shrink-0 items-center justify-between gap-3 px-4 py-3 lg:px-6",children:[(0,s.jsxs)("div",{ref:H,className:"relative",children:[(0,s.jsx)("button",{type:"button",onClick:()=>J(e=>!e),className:"flex items-center gap-3 rounded-2xl border border-white/10 bg-white/5 px-4 py-3 text-left transition hover:bg-white/8",children:(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"text-sm font-semibold text-white",children:el}),(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px] text-white/70",children:"expand_more"})]}),(0,s.jsx)("p",{className:"truncate text-xs text-white/55",children:en})]})}),P?(0,s.jsxs)("div",{className:"absolute left-0 top-[calc(100%+10px)] z-30 w-[min(520px,calc(100vw-2rem))] overflow-hidden rounded-[20px] border border-white/10 bg-[#262626] shadow-2xl shadow-black/50",children:[(0,s.jsxs)("div",{className:"border-b border-white/10 px-4 py-3",children:[(0,s.jsx)("p",{className:"text-xs uppercase tracking-[0.22em] text-white/45",children:"Models"}),(0,s.jsx)("p",{className:"text-sm text-white/75",children:"Only from connected providers"})]}),(0,s.jsx)("div",{className:"max-h-[60vh] overflow-y-auto p-2 custom-scrollbar",children:e.map(e=>(0,s.jsxs)("div",{className:"mb-2 rounded-[16px] border border-white/10 bg-black/20 p-2",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between px-2 py-2",children:[(0,s.jsx)("p",{className:"text-sm font-semibold text-white",children:e.providerName}),(0,s.jsx)(i.Ex,{size:"sm",variant:"default",children:e.models.length})]}),(0,s.jsx)("div",{className:"grid gap-2 sm:grid-cols-2",children:e.models.map(e=>{let t=e.id===A;return(0,s.jsx)("button",{type:"button",onClick:()=>(e=>{let t=G.get(e);if(!t)return;let r=b.find(e=>e.id===y);if(r&&r.messages.length>0){let e=es(t);if(!e)return;N(t=>[e,...t]),j(e.id)}else if(r)N(e=>e.map(e=>e.id===r.id?{...e,providerId:t.providerId,providerName:t.providerName,modelId:t.id,modelName:t.name}:e)),j(r.id);else{let e=es(t);if(!e)return;N(t=>[e,...t]),j(e.id)}I(t.providerId),k(t.id),J(!1)})(e.id),className:`rounded-[14px] border px-3 py-3 text-left transition ${t?"border-blue-400/40 bg-blue-500/15":"border-white/10 bg-white/5 hover:bg-white/8"}`,children:(0,s.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("p",{className:"truncate text-sm font-medium text-white",children:e.name}),(0,s.jsx)("p",{className:"truncate text-[11px] text-white/45",children:e.requestModel})]}),t?(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px] text-blue-300",children:"check_circle"}):null]})},e.id)})})]},e.providerId))})]}):null]}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("button",{type:"button",onClick:()=>F(e=>!e),className:"rounded-2xl border border-white/10 bg-white/5 px-4 py-3 text-sm text-white/80 transition hover:bg-white/8",children:"History"}),(0,s.jsx)(i.$n,{variant:"ghost",size:"sm",icon:"delete",onClick:()=>{if(!y)return;let e=b.filter(e=>e.id!==y),t=e[0]||null;N(e),t?(j(t.id),I(t.providerId),k(t.modelId)):(j(""),I(""),k(""))},disabled:!y||0===b.length,children:"Clear"})]})]}),B?(0,s.jsxs)("div",{ref:Y,className:"absolute right-4 top-[72px] z-20 w-[min(360px,calc(100vw-2rem))] rounded-[20px] border border-white/10 bg-[#262626] p-2 shadow-2xl shadow-black/50 lg:right-6",children:[(0,s.jsx)("div",{className:"px-3 py-2",children:(0,s.jsx)("p",{className:"text-xs uppercase tracking-[0.22em] text-white/45",children:"Recent chats"})}),(0,s.jsx)("div",{className:"max-h-[48vh] space-y-2 overflow-y-auto p-1 custom-scrollbar",children:0===ee.length?(0,s.jsx)("div",{className:"rounded-[16px] border border-dashed border-white/10 bg-white/5 p-4 text-sm text-white/55",children:"No conversations yet."}):ee.map(e=>{let t=e.id===y,r=[...e.messages||[]].reverse().find(e=>"user"===e.role)||e.messages?.[0];return(0,s.jsx)("button",{type:"button",onClick:()=>{var t;let r;return t=e.id,void((r=b.find(e=>e.id===t))&&(j(t),I(r.providerId||S),k(r.modelId||A),F(!1)))},className:`w-full rounded-[16px] border px-3 py-3 text-left transition ${t?"border-blue-400/40 bg-blue-500/15":"border-white/10 bg-white/5 hover:bg-white/8"}`,children:(0,s.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsx)("p",{className:"truncate text-sm font-medium text-white",children:e.title}),(0,s.jsx)("p",{className:"mt-1 truncate text-xs text-white/50",children:p(r?.content)||"Empty chat"})]}),(0,s.jsx)("span",{className:"text-[10px] text-white/40 shrink-0",children:function(e){if(!e)return"Now";let t=new Date(e).getTime();if(Number.isNaN(t))return"Now";let r=Math.max(1,Math.round((Date.now()-t)/6e4));if(r<60)return`${r}m`;let s=Math.round(r/60);return s<24?`${s}h`:`${Math.round(s/24)}d`}(e.updatedAt)})]})},e.id)})})]}):null,w?(0,s.jsx)("div",{className:"mt-4 rounded-[18px] border border-rose-500/20 bg-rose-500/10 px-4 py-3 text-rose-100",children:(0,s.jsxs)("div",{className:"flex items-start gap-3",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"error"}),(0,s.jsx)("p",{className:"text-sm leading-6",children:w})]})}):null,(0,s.jsxs)("div",{className:"flex flex-1 flex-col min-h-0",children:[(0,s.jsxs)("div",{className:"flex-1 overflow-y-auto py-4 custom-scrollbar",children:[0===Z.length?(0,s.jsx)("div",{className:"flex min-h-[50vh] items-center justify-center px-4 text-center",children:(0,s.jsxs)("div",{className:"max-w-xl space-y-4",children:[(0,s.jsx)("div",{className:"mx-auto flex size-16 items-center justify-center rounded-[20px] border border-white/10 bg-white/5 text-white/80",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[30px]",children:"chat"})}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("h2",{className:"text-2xl font-semibold text-white",children:"Start a conversation"}),(0,s.jsx)("p",{className:"text-sm leading-6 text-white/60",children:"Simple chat interface to interact with any AI model from connected providers. Select a model and start chatting!"})]})]})}):null,(0,s.jsx)("div",{className:"mx-auto flex w-full max-w-3xl flex-col gap-4 px-4",children:Z.map(e=>{let t="user"===e.role,r="assistant"===e.role,a=r&&e.id===E&&"streaming"===e.status,i=p(e.content)||(r?U:"");return(0,s.jsx)("div",{className:`flex w-full ${t?"justify-end":"justify-start"} mb-6`,children:(0,s.jsxs)("div",{className:`max-w-[min(88%,42rem)] ${t?"rounded-3xl bg-[#2f2f2f] px-5 py-3.5 text-white":"text-white/90"}`,children:[(0,s.jsx)("div",{className:"mb-1 flex items-center justify-between gap-3",children:(0,s.jsx)("span",{className:"text-xs font-semibold",children:t?"You":V?.name||"Assistant"})}),e.attachments?.length?(0,s.jsx)("div",{className:"mb-3 grid grid-cols-2 gap-2 sm:grid-cols-3 mt-2",children:e.attachments.map(e=>(0,s.jsx)("a",{href:e.dataUrl,target:"_blank",rel:"noreferrer",className:"overflow-hidden rounded-[18px] border border-white/10 bg-black/20",children:(0,s.jsx)("img",{src:e.dataUrl,alt:e.name,className:"h-28 w-full object-cover"})},e.id))}):null,(0,s.jsxs)("div",{className:"whitespace-pre-wrap break-words text-[15px] leading-7",children:[i,r&&a&&!U?(0,s.jsx)("span",{className:"inline-block animate-pulse",children:"▋"}):null]})]})},e.id)})})]}),(0,s.jsxs)("div",{className:"shrink-0 pt-2",children:[$.length>0?(0,s.jsx)("div",{className:"mx-auto mb-3 flex w-full max-w-3xl flex-wrap gap-2 px-4",children:$.map(e=>(0,s.jsxs)("div",{className:"flex items-center gap-2 rounded-full border border-white/10 bg-white/5 px-3 py-2",children:[(0,s.jsx)("span",{className:"text-xs text-white/80 max-w-[12rem] truncate",children:e.name}),(0,s.jsx)("button",{type:"button",onClick:()=>{var t;return t=e.id,void C(e=>e.filter(e=>e.id!==t))},className:"text-white/55 hover:text-white","aria-label":"Remove attachment",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"close"})})]},e.id))}):null,(0,s.jsx)("div",{className:"mx-auto w-full max-w-3xl px-4 pb-2",children:(0,s.jsxs)("div",{className:"rounded-[26px] bg-[#2f2f2f] px-3 pt-3 pb-2 shadow-[0_0_15px_rgba(0,0,0,0.10)] ring-1 ring-white/5",children:[(0,s.jsx)("textarea",{value:D,onChange:e=>O(e.target.value),onKeyDown:e=>{"Enter"===e.key&&!e.shiftKey&&(e.preventDefault(),et&&ei())},placeholder:"Message AI",rows:1,className:"w-full resize-none bg-transparent px-2 text-[15px] leading-6 text-white outline-none placeholder:text-white/40 custom-scrollbar max-h-[25vh] overflow-y-auto"}),(0,s.jsxs)("div",{className:"mt-2 flex items-center justify-between gap-3",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("button",{type:"button",onClick:()=>K.current?.click(),disabled:!V||r,className:"p-2 text-white/50 hover:text-white transition rounded-full hover:bg-white/5",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"attach_file"})}),(0,s.jsx)("input",{ref:K,type:"file",accept:"image/*",multiple:!0,className:"hidden",onChange:ea}),(0,s.jsx)("span",{className:"text-xs font-medium text-white/30 truncate max-w-[120px]",children:V?V.name:"No model"})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[_?(0,s.jsx)("button",{type:"button",onClick:()=>{L.current?.abort()},className:"p-2 text-white bg-white/10 hover:bg-white/20 transition rounded-full h-8 w-8 flex items-center justify-center",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"stop"})}):null,(0,s.jsx)("button",{onClick:ei,disabled:!et,className:`h-8 w-8 rounded-full flex items-center justify-center transition ${et?"bg-white text-black hover:opacity-90":"bg-white/10 text-white/30 cursor-not-allowed"}`,children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"arrow_upward"})})]})]})]})})]}),(0,s.jsx)("p",{className:"mx-auto mt-2 max-w-3xl px-4 pb-4 text-center text-[11px] text-white/30",children:"Model list is filtered from connected providers."})]})]})})}}},e=>{e.O(0,[6373,3862,8500,9893,9959,7050,5564,5263,7033,5497,8441,3794,7358],()=>e(e.s=35911)),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3554],{22843:(e,t,a)=>{Promise.resolve().then(a.bind(a,85309))},85309:(e,t,a)=>{"use strict";a.d(t,{default:()=>v});var s=a(95155),l=a(12115),r=a(98500),i=a.n(r),n=a(35497),c=a(3534),o=a(28777),d=a(61082);let u=a(41463).env.NEXT_PUBLIC_CLOUD_URL;function v({toolId:e,machineId:t}){let a=c.dM[e],[r,x]=(0,l.useState)([]),[h,b]=(0,l.useState)(!0),[p,f]=(0,l.useState)({}),[m,E]=(0,l.useState)(!1),[j,P]=(0,l.useState)(!1),[w,k]=(0,l.useState)(""),[g,N]=(0,l.useState)(!1),[S,_]=(0,l.useState)(""),[A,U]=(0,l.useState)([]);(0,l.useEffect)(()=>{let e=!0;return(async()=>{try{let[t,a,s,l]=await Promise.all([fetch("/api/providers"),fetch("/api/settings"),fetch("/api/tunnel/status"),fetch("/api/keys")]);if(!e)return;if(t.ok){let e=await t.json();x(e.connections||[])}if(a.ok){let e=await a.json();E(e.cloudEnabled||!1)}if(s.ok){let e=await s.json();P(!!(e.tunnel?.enabled||e.tunnel?.settingsEnabled)),k(e.tunnel?.publicUrl||""),N(!!(e.tailscale?.enabled||e.tailscale?.settingsEnabled)),_(e.tailscale?.tunnelUrl||"")}if(l.ok){let e=await l.json();U(e.keys||[])}}catch(e){console.log("Error loading tool data:",e)}finally{e&&b(!1)}})(),()=>{e=!1}},[]);let y=()=>r.filter(e=>!1!==e.isActive),C=(0,l.useCallback)((e,t,a)=>{f(s=>s[e]?.[t]===a?s:{...s,[e]:{...s[e],[t]:a}})},[]);return(0,s.jsxs)("div",{className:"mx-auto flex w-full max-w-5xl flex-col gap-4 px-1 sm:px-0",children:[(0,s.jsxs)(i(),{href:"/dashboard/cli-tools",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary w-fit",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"arrow_back"}),"Back to CLI Tools"]}),(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsx)("h1",{className:"text-xl font-semibold text-text-main sm:text-2xl",children:a.name}),(0,s.jsx)("p",{className:"text-sm text-text-muted",children:a.description})]}),h?(0,s.jsx)(n.Qv,{}):(()=>{let t,l,r,i=(t=y(),l=[],r=new Set,t.forEach(e=>{let t=o.Xg[e.provider]||e.provider;(0,o.KC)(e.provider).forEach(a=>{let s=`${t}/${a.id}`;r.has(s)||(r.add(s),l.push({value:s,label:`${t}/${a.id}`,provider:e.provider,alias:t,connectionName:e.name,modelId:a.id}))})}),l).length>0,n={tool:a,isExpanded:!0,onToggle:()=>{},baseUrl:j&&w?w:m&&u?u:window.location.origin,apiKeys:A,tunnelEnabled:j,tunnelPublicUrl:w,tailscaleEnabled:g,tailscaleUrl:S};switch(e){case"claude":return(0,s.jsx)(d.Tk,{...n,activeProviders:y(),modelMappings:p[e]||{},onModelMappingChange:(t,a)=>C(e,t,a),hasActiveProviders:i,cloudEnabled:m});case"codex":return(0,s.jsx)(d.Ah,{...n,activeProviders:y(),cloudEnabled:m});case"opencode":return(0,s.jsx)(d.qO,{...n,activeProviders:y(),cloudEnabled:m});case"cowork":return(0,s.jsx)(d.Q6,{...n,activeProviders:y(),hasActiveProviders:i,cloudEnabled:m,cloudUrl:u,tunnelEnabled:j,tunnelPublicUrl:w,tailscaleEnabled:g,tailscaleUrl:S});case"droid":return(0,s.jsx)(d.ZM,{...n,activeProviders:y(),hasActiveProviders:i,cloudEnabled:m});case"openclaw":return(0,s.jsx)(d.yZ,{...n,activeProviders:y(),hasActiveProviders:i,cloudEnabled:m});case"hermes":return(0,s.jsx)(d.RF,{...n,activeProviders:y(),hasActiveProviders:i,cloudEnabled:m});case"copilot":return(0,s.jsx)(d.h1,{...n,activeProviders:y(),cloudEnabled:m});case"cline":return(0,s.jsx)(d.aG,{...n,activeProviders:y(),cloudEnabled:m});case"kilo":return(0,s.jsx)(d.c9,{...n,activeProviders:y(),cloudEnabled:m});case"qwen":return(0,s.jsx)(d.aV,{...n,activeProviders:y(),cloudEnabled:m});case"deepseek-tui":return(0,s.jsx)(d.lF,{...n,activeProviders:y(),hasActiveProviders:i,cloudEnabled:m});case"jcode":return(0,s.jsx)(d.mW,{...n,activeProviders:y(),hasActiveProviders:i,cloudEnabled:m});default:return(0,s.jsx)(d.a7,{toolId:e,...n,activeProviders:y(),cloudEnabled:m,tunnelEnabled:j})}})()]})}}},e=>{e.O(0,[
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3554],{22843:(e,t,a)=>{Promise.resolve().then(a.bind(a,85309))},85309:(e,t,a)=>{"use strict";a.d(t,{default:()=>v});var s=a(95155),l=a(12115),r=a(98500),i=a.n(r),n=a(35497),c=a(3534),o=a(28777),d=a(61082);let u=a(41463).env.NEXT_PUBLIC_CLOUD_URL;function v({toolId:e,machineId:t}){let a=c.dM[e],[r,x]=(0,l.useState)([]),[h,b]=(0,l.useState)(!0),[p,f]=(0,l.useState)({}),[m,E]=(0,l.useState)(!1),[j,P]=(0,l.useState)(!1),[w,k]=(0,l.useState)(""),[g,N]=(0,l.useState)(!1),[S,_]=(0,l.useState)(""),[A,U]=(0,l.useState)([]);(0,l.useEffect)(()=>{let e=!0;return(async()=>{try{let[t,a,s,l]=await Promise.all([fetch("/api/providers"),fetch("/api/settings"),fetch("/api/tunnel/status"),fetch("/api/keys")]);if(!e)return;if(t.ok){let e=await t.json();x(e.connections||[])}if(a.ok){let e=await a.json();E(e.cloudEnabled||!1)}if(s.ok){let e=await s.json();P(!!(e.tunnel?.enabled||e.tunnel?.settingsEnabled)),k(e.tunnel?.publicUrl||""),N(!!(e.tailscale?.enabled||e.tailscale?.settingsEnabled)),_(e.tailscale?.tunnelUrl||"")}if(l.ok){let e=await l.json();U(e.keys||[])}}catch(e){console.log("Error loading tool data:",e)}finally{e&&b(!1)}})(),()=>{e=!1}},[]);let y=()=>r.filter(e=>!1!==e.isActive),C=(0,l.useCallback)((e,t,a)=>{f(s=>s[e]?.[t]===a?s:{...s,[e]:{...s[e],[t]:a}})},[]);return(0,s.jsxs)("div",{className:"mx-auto flex w-full max-w-5xl flex-col gap-4 px-1 sm:px-0",children:[(0,s.jsxs)(i(),{href:"/dashboard/cli-tools",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary w-fit",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"arrow_back"}),"Back to CLI Tools"]}),(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsx)("h1",{className:"text-xl font-semibold text-text-main sm:text-2xl",children:a.name}),(0,s.jsx)("p",{className:"text-sm text-text-muted",children:a.description})]}),h?(0,s.jsx)(n.Qv,{}):(()=>{let t,l,r,i=(t=y(),l=[],r=new Set,t.forEach(e=>{let t=o.Xg[e.provider]||e.provider;(0,o.KC)(e.provider).forEach(a=>{let s=`${t}/${a.id}`;r.has(s)||(r.add(s),l.push({value:s,label:`${t}/${a.id}`,provider:e.provider,alias:t,connectionName:e.name,modelId:a.id}))})}),l).length>0,n={tool:a,isExpanded:!0,onToggle:()=>{},baseUrl:j&&w?w:m&&u?u:window.location.origin,apiKeys:A,tunnelEnabled:j,tunnelPublicUrl:w,tailscaleEnabled:g,tailscaleUrl:S};switch(e){case"claude":return(0,s.jsx)(d.Tk,{...n,activeProviders:y(),modelMappings:p[e]||{},onModelMappingChange:(t,a)=>C(e,t,a),hasActiveProviders:i,cloudEnabled:m});case"codex":return(0,s.jsx)(d.Ah,{...n,activeProviders:y(),cloudEnabled:m});case"opencode":return(0,s.jsx)(d.qO,{...n,activeProviders:y(),cloudEnabled:m});case"cowork":return(0,s.jsx)(d.Q6,{...n,activeProviders:y(),hasActiveProviders:i,cloudEnabled:m,cloudUrl:u,tunnelEnabled:j,tunnelPublicUrl:w,tailscaleEnabled:g,tailscaleUrl:S});case"droid":return(0,s.jsx)(d.ZM,{...n,activeProviders:y(),hasActiveProviders:i,cloudEnabled:m});case"openclaw":return(0,s.jsx)(d.yZ,{...n,activeProviders:y(),hasActiveProviders:i,cloudEnabled:m});case"hermes":return(0,s.jsx)(d.RF,{...n,activeProviders:y(),hasActiveProviders:i,cloudEnabled:m});case"copilot":return(0,s.jsx)(d.h1,{...n,activeProviders:y(),cloudEnabled:m});case"cline":return(0,s.jsx)(d.aG,{...n,activeProviders:y(),cloudEnabled:m});case"kilo":return(0,s.jsx)(d.c9,{...n,activeProviders:y(),cloudEnabled:m});case"qwen":return(0,s.jsx)(d.aV,{...n,activeProviders:y(),cloudEnabled:m});case"deepseek-tui":return(0,s.jsx)(d.lF,{...n,activeProviders:y(),hasActiveProviders:i,cloudEnabled:m});case"jcode":return(0,s.jsx)(d.mW,{...n,activeProviders:y(),hasActiveProviders:i,cloudEnabled:m});default:return(0,s.jsx)(d.a7,{toolId:e,...n,activeProviders:y(),cloudEnabled:m,tunnelEnabled:j})}})()]})}}},e=>{e.O(0,[6373,3862,8500,9893,9959,7050,5772,5564,5263,7033,5497,4525,8441,3794,7358],()=>e(e.s=22843)),_N_E=e.O()}]);
|