@jheavenknows/bluerouter 5.3.47 → 5.3.49

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.
Files changed (1052) hide show
  1. package/app/.next-cli-build/BUILD_ID +1 -1
  2. package/app/.next-cli-build/app-path-routes-manifest.json +7 -4
  3. package/app/.next-cli-build/build-manifest.json +2 -2
  4. package/app/.next-cli-build/prerender-manifest.json +59 -31
  5. package/app/.next-cli-build/routes-manifest.json +18 -0
  6. package/app/.next-cli-build/server/app/(dashboard)/dashboard/ai-power-index/page.js +1 -1
  7. package/app/.next-cli-build/server/app/(dashboard)/dashboard/ai-power-index/page_client-reference-manifest.js +1 -1
  8. package/app/.next-cli-build/server/app/(dashboard)/dashboard/analytics/page.js +1 -1
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/analytics/page_client-reference-manifest.js +1 -1
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/api-keys/page.js +2 -2
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/api-keys/page_client-reference-manifest.js +1 -1
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/audit-proxy/page.js +5 -0
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/audit-proxy/page.js.nft.json +1 -0
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/audit-proxy/page_client-reference-manifest.js +1 -0
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +1 -1
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +2 -2
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/model-profiles/page.js +1 -1
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/model-profiles/page_client-reference-manifest.js +1 -1
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +1 -1
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cluster/page.js +1 -1
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cluster/page_client-reference-manifest.js +1 -1
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +1 -1
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +1 -1
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +1 -1
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/local-ai-report/page.js +2 -2
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/local-ai-report/page_client-reference-manifest.js +1 -1
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +2 -2
  37. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  38. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +1 -1
  39. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +1 -1
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  42. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +1 -1
  43. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  44. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +1 -1
  45. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  46. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +1 -1
  47. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  48. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  49. package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalcloudprovider/page.js +1 -1
  50. package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalcloudprovider/page_client-reference-manifest.js +1 -1
  51. package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalcloudprovidermonitor/page.js +1 -1
  52. package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalcloudprovidermonitor/page_client-reference-manifest.js +1 -1
  53. package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalquota/page.js +1 -1
  54. package/app/.next-cli-build/server/app/(dashboard)/dashboard/personalquota/page_client-reference-manifest.js +1 -1
  55. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +1 -1
  56. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  57. package/app/.next-cli-build/server/app/(dashboard)/dashboard/prompt-logs/page.js +1 -1
  58. package/app/.next-cli-build/server/app/(dashboard)/dashboard/prompt-logs/page_client-reference-manifest.js +1 -1
  59. package/app/.next-cli-build/server/app/(dashboard)/dashboard/provider-health/page.js +1 -1
  60. package/app/.next-cli-build/server/app/(dashboard)/dashboard/provider-health/page_client-reference-manifest.js +1 -1
  61. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +1 -1
  62. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  63. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +1 -1
  64. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  65. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +1 -1
  66. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  67. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +1 -1
  68. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  69. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +1 -1
  70. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  71. package/app/.next-cli-build/server/app/(dashboard)/dashboard/resource-monitor/page.js +1 -1
  72. package/app/.next-cli-build/server/app/(dashboard)/dashboard/resource-monitor/page_client-reference-manifest.js +1 -1
  73. package/app/.next-cli-build/server/app/(dashboard)/dashboard/routing-topology/page.js +1 -1
  74. package/app/.next-cli-build/server/app/(dashboard)/dashboard/routing-topology/page_client-reference-manifest.js +1 -1
  75. package/app/.next-cli-build/server/app/(dashboard)/dashboard/settings/pricing/page.js +1 -1
  76. package/app/.next-cli-build/server/app/(dashboard)/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  77. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +1 -1
  78. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  79. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +1 -1
  80. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  81. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +1 -1
  82. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  83. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +1 -1
  84. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  85. package/app/.next-cli-build/server/app/_global-error/page.js +1 -1
  86. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  87. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  88. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  89. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  90. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  91. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  92. package/app/.next-cli-build/server/app/_not-found/page.js +1 -1
  93. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  94. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  95. package/app/.next-cli-build/server/app/_not-found.rsc +6 -6
  96. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +6 -6
  97. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +6 -6
  98. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  99. package/app/.next-cli-build/server/app/api/audit-proxy/ca/route.js +18 -0
  100. package/app/.next-cli-build/server/app/api/audit-proxy/ca/route.js.nft.json +1 -0
  101. package/app/.next-cli-build/server/app/api/audit-proxy/ca/route_client-reference-manifest.js +1 -0
  102. package/app/.next-cli-build/server/app/api/audit-proxy/route.js +38 -0
  103. package/app/.next-cli-build/server/app/api/audit-proxy/route.js.nft.json +1 -0
  104. package/app/.next-cli-build/server/app/api/audit-proxy/route_client-reference-manifest.js +1 -0
  105. package/app/.next-cli-build/server/app/api/auth/ldap/test/route.js +1 -1
  106. package/app/.next-cli-build/server/app/api/auth/ldap/test/route.js.nft.json +1 -1
  107. package/app/.next-cli-build/server/app/api/auth/ldap/users/route.js +1 -1
  108. package/app/.next-cli-build/server/app/api/auth/ldap/users/route.js.nft.json +1 -1
  109. package/app/.next-cli-build/server/app/api/auth/login/route.js +2 -2
  110. package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  111. package/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
  112. package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  113. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
  114. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  115. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
  116. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  117. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
  118. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  119. package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
  120. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  121. package/app/.next-cli-build/server/app/api/auth/view-mode/route.js +1 -1
  122. package/app/.next-cli-build/server/app/api/auth/view-mode/route.js.nft.json +1 -1
  123. package/app/.next-cli-build/server/app/api/branding/[asset]/route.js +1 -1
  124. package/app/.next-cli-build/server/app/api/branding/[asset]/route.js.nft.json +1 -1
  125. package/app/.next-cli-build/server/app/api/branding/route.js +1 -1
  126. package/app/.next-cli-build/server/app/api/branding/route.js.nft.json +1 -1
  127. package/app/.next-cli-build/server/app/api/branding/upload/route.js +1 -1
  128. package/app/.next-cli-build/server/app/api/branding/upload/route.js.nft.json +1 -1
  129. package/app/.next-cli-build/server/app/api/cli-model-profiles/cloud-models/route.js +1 -1
  130. package/app/.next-cli-build/server/app/api/cli-model-profiles/cloud-models/route.js.nft.json +1 -1
  131. package/app/.next-cli-build/server/app/api/cli-model-profiles/route.js +1 -1
  132. package/app/.next-cli-build/server/app/api/cli-model-profiles/route.js.nft.json +1 -1
  133. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +2 -2
  134. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  135. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
  136. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  137. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/autostart/route.js +1 -1
  138. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/autostart/route.js.nft.json +1 -1
  139. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/prompt-log-db/route.js +2 -2
  140. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/prompt-log-db/route.js.nft.json +1 -1
  141. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/root-ca/route.js +1 -1
  142. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/root-ca/route.js.nft.json +1 -1
  143. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  144. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  145. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
  146. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +1 -1
  147. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
  148. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +1 -1
  149. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  150. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +2 -2
  151. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +1 -1
  152. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -1
  153. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  154. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +2 -2
  155. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +2 -2
  156. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +2 -2
  157. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +2 -2
  158. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +1 -1
  159. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
  160. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +1 -1
  161. package/app/.next-cli-build/server/app/api/cli-tools/qwen-settings/route.js +1 -1
  162. package/app/.next-cli-build/server/app/api/cluster/config/route.js +1 -1
  163. package/app/.next-cli-build/server/app/api/cluster/config/route.js.nft.json +1 -1
  164. package/app/.next-cli-build/server/app/api/cluster/heartbeat/route.js +1 -1
  165. package/app/.next-cli-build/server/app/api/cluster/heartbeat/route.js.nft.json +1 -1
  166. package/app/.next-cli-build/server/app/api/cluster/peers/[id]/command/route.js +1 -1
  167. package/app/.next-cli-build/server/app/api/cluster/peers/[id]/command/route.js.nft.json +1 -1
  168. package/app/.next-cli-build/server/app/api/cluster/peers/[id]/route.js +1 -1
  169. package/app/.next-cli-build/server/app/api/cluster/peers/[id]/route.js.nft.json +1 -1
  170. package/app/.next-cli-build/server/app/api/cluster/peers/route.js +1 -1
  171. package/app/.next-cli-build/server/app/api/cluster/peers/route.js.nft.json +1 -1
  172. package/app/.next-cli-build/server/app/api/cluster/snapshot/route.js +2 -2
  173. package/app/.next-cli-build/server/app/api/cluster/snapshot/route.js.nft.json +1 -1
  174. package/app/.next-cli-build/server/app/api/cluster/sync/route.js +1 -1
  175. package/app/.next-cli-build/server/app/api/cluster/sync/route.js.nft.json +1 -1
  176. package/app/.next-cli-build/server/app/api/cluster/test/route.js +1 -1
  177. package/app/.next-cli-build/server/app/api/cluster/test/route.js.nft.json +1 -1
  178. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +2 -2
  179. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  180. package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  181. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  182. package/app/.next-cli-build/server/app/api/dashboard/ai-power-index/route.js +1 -1
  183. package/app/.next-cli-build/server/app/api/dashboard/ai-power-index/route.js.nft.json +1 -1
  184. package/app/.next-cli-build/server/app/api/dashboard/analytics/ai-models/route.js +1 -1
  185. package/app/.next-cli-build/server/app/api/dashboard/analytics/ai-models/route.js.nft.json +1 -1
  186. package/app/.next-cli-build/server/app/api/dashboard/analytics/analyze/route.js +1 -1
  187. package/app/.next-cli-build/server/app/api/dashboard/analytics/analyze/route.js.nft.json +1 -1
  188. package/app/.next-cli-build/server/app/api/dashboard/analytics/route.js +1 -1
  189. package/app/.next-cli-build/server/app/api/dashboard/analytics/route.js.nft.json +1 -1
  190. package/app/.next-cli-build/server/app/api/dashboard/combos/route.js +1 -1
  191. package/app/.next-cli-build/server/app/api/dashboard/combos/route.js.nft.json +1 -1
  192. package/app/.next-cli-build/server/app/api/dashboard/endpoint/route.js +1 -1
  193. package/app/.next-cli-build/server/app/api/dashboard/endpoint/route.js.nft.json +1 -1
  194. package/app/.next-cli-build/server/app/api/dashboard/local-ai-report/route.js +2 -2
  195. package/app/.next-cli-build/server/app/api/dashboard/local-ai-report/route.js.nft.json +1 -1
  196. package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/[id]/route.js +1 -1
  197. package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/[id]/route.js.nft.json +1 -1
  198. package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/options/route.js +1 -1
  199. package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/options/route.js.nft.json +1 -1
  200. package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/route.js +1 -1
  201. package/app/.next-cli-build/server/app/api/dashboard/prompt-logs/route.js.nft.json +1 -1
  202. package/app/.next-cli-build/server/app/api/dashboard/routing-topology/config/route.js +1 -1
  203. package/app/.next-cli-build/server/app/api/dashboard/routing-topology/config/route.js.nft.json +1 -1
  204. package/app/.next-cli-build/server/app/api/dashboard/routing-topology/live/route.js +1 -1
  205. package/app/.next-cli-build/server/app/api/dashboard/routing-topology/live/route.js.nft.json +1 -1
  206. package/app/.next-cli-build/server/app/api/dashboard/routing-topology/route.js +1 -1
  207. package/app/.next-cli-build/server/app/api/dashboard/routing-topology/route.js.nft.json +1 -1
  208. package/app/.next-cli-build/server/app/api/dashboard/token-saver/route.js +1 -1
  209. package/app/.next-cli-build/server/app/api/dashboard/token-saver/route.js.nft.json +1 -1
  210. package/app/.next-cli-build/server/app/api/health/route.js +1 -1
  211. package/app/.next-cli-build/server/app/api/init/route.js +1 -1
  212. package/app/.next-cli-build/server/app/api/keys/[id]/caveman-test/route.js +1 -1
  213. package/app/.next-cli-build/server/app/api/keys/[id]/caveman-test/route.js.nft.json +1 -1
  214. package/app/.next-cli-build/server/app/api/keys/[id]/rotate/route.js +1 -1
  215. package/app/.next-cli-build/server/app/api/keys/[id]/rotate/route.js.nft.json +1 -1
  216. package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  217. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  218. package/app/.next-cli-build/server/app/api/keys/route.js +2 -2
  219. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  220. package/app/.next-cli-build/server/app/api/locale/route.js +1 -1
  221. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +1 -1
  222. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  223. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +2 -2
  224. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  225. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  226. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  227. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  228. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  229. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  230. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  231. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  232. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  233. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
  234. package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  235. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  236. package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
  237. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  238. package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  239. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  240. package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
  241. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  242. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  243. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  244. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  245. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  246. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  247. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  248. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  249. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  250. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +2 -2
  251. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  252. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  253. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  254. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  255. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  256. package/app/.next-cli-build/server/app/api/oauth/grok-cli/device-code/route.js +1 -1
  257. package/app/.next-cli-build/server/app/api/oauth/grok-cli/device-code/route.js.nft.json +1 -1
  258. package/app/.next-cli-build/server/app/api/oauth/grok-cli/poll/route.js +1 -1
  259. package/app/.next-cli-build/server/app/api/oauth/grok-cli/poll/route.js.nft.json +1 -1
  260. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  261. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  262. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
  263. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  264. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  265. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  266. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  267. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  268. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/api-key-models/route.js +1 -1
  269. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/api-key-models/route.js.nft.json +1 -1
  270. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/import-models/route.js +1 -1
  271. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/import-models/route.js.nft.json +1 -1
  272. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/models/[...routeModel]/route.js +1 -1
  273. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/models/[...routeModel]/route.js.nft.json +1 -1
  274. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/move/route.js +1 -1
  275. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/move/route.js.nft.json +1 -1
  276. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/route.js +1 -1
  277. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/route.js.nft.json +1 -1
  278. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/usage/route.js +1 -1
  279. package/app/.next-cli-build/server/app/api/personal-cloud-providers/[id]/usage/route.js.nft.json +1 -1
  280. package/app/.next-cli-build/server/app/api/personal-cloud-providers/client/route.js +1 -1
  281. package/app/.next-cli-build/server/app/api/personal-cloud-providers/client/route.js.nft.json +1 -1
  282. package/app/.next-cli-build/server/app/api/personal-cloud-providers/monitor/route.js +1 -1
  283. package/app/.next-cli-build/server/app/api/personal-cloud-providers/monitor/route.js.nft.json +1 -1
  284. package/app/.next-cli-build/server/app/api/personal-cloud-providers/permissions/route.js +1 -1
  285. package/app/.next-cli-build/server/app/api/personal-cloud-providers/permissions/route.js.nft.json +1 -1
  286. package/app/.next-cli-build/server/app/api/personal-cloud-providers/route.js +1 -1
  287. package/app/.next-cli-build/server/app/api/personal-cloud-providers/route.js.nft.json +1 -1
  288. package/app/.next-cli-build/server/app/api/personal-cloud-providers/routing/route.js +1 -1
  289. package/app/.next-cli-build/server/app/api/personal-cloud-providers/routing/route.js.nft.json +1 -1
  290. package/app/.next-cli-build/server/app/api/personal-cloud-providers/shares/route.js +1 -1
  291. package/app/.next-cli-build/server/app/api/personal-cloud-providers/shares/route.js.nft.json +1 -1
  292. package/app/.next-cli-build/server/app/api/personal-cloud-providers/visibility/route.js +1 -1
  293. package/app/.next-cli-build/server/app/api/personal-cloud-providers/visibility/route.js.nft.json +1 -1
  294. package/app/.next-cli-build/server/app/api/pricing/catalog/route.js +2 -2
  295. package/app/.next-cli-build/server/app/api/pricing/catalog/route.js.nft.json +1 -1
  296. package/app/.next-cli-build/server/app/api/pricing/recalculate/route.js +1 -1
  297. package/app/.next-cli-build/server/app/api/pricing/recalculate/route.js.nft.json +1 -1
  298. package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  299. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  300. package/app/.next-cli-build/server/app/api/provider-health/route.js +1 -1
  301. package/app/.next-cli-build/server/app/api/provider-health/route.js.nft.json +1 -1
  302. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
  303. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  304. package/app/.next-cli-build/server/app/api/provider-nodes/openai-compatible/manage/route.js +1 -1
  305. package/app/.next-cli-build/server/app/api/provider-nodes/openai-compatible/manage/route.js.nft.json +1 -1
  306. package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  307. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  308. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
  309. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  310. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  311. package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  312. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  313. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  314. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  315. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  316. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  317. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  318. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  319. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
  320. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  321. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  322. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
  323. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  324. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  325. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  326. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  327. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
  328. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  329. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  330. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  331. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +2 -2
  332. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  333. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +2 -2
  334. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  335. package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
  336. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  337. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +2 -2
  338. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  339. package/app/.next-cli-build/server/app/api/resource-monitor/[id]/route.js +1 -1
  340. package/app/.next-cli-build/server/app/api/resource-monitor/[id]/route.js.nft.json +1 -1
  341. package/app/.next-cli-build/server/app/api/resource-monitor/ai-models/route.js +1 -1
  342. package/app/.next-cli-build/server/app/api/resource-monitor/ai-models/route.js.nft.json +1 -1
  343. package/app/.next-cli-build/server/app/api/resource-monitor/analyze/route.js +2 -2
  344. package/app/.next-cli-build/server/app/api/resource-monitor/analyze/route.js.nft.json +1 -1
  345. package/app/.next-cli-build/server/app/api/resource-monitor/history/route.js +2 -2
  346. package/app/.next-cli-build/server/app/api/resource-monitor/history/route.js.nft.json +1 -1
  347. package/app/.next-cli-build/server/app/api/resource-monitor/route.js +2 -2
  348. package/app/.next-cli-build/server/app/api/resource-monitor/route.js.nft.json +1 -1
  349. package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  350. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  351. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
  352. package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
  353. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  354. package/app/.next-cli-build/server/app/api/settings/route.js +2 -2
  355. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  356. package/app/.next-cli-build/server/app/api/shutdown/route.js +1 -1
  357. package/app/.next-cli-build/server/app/api/tags/route.js +1 -1
  358. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  359. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
  360. package/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
  361. package/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
  362. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  363. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  364. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  365. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  366. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
  367. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  368. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
  369. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  370. package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
  371. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  372. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
  373. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  374. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
  375. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  376. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
  377. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  378. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +2 -2
  379. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  380. package/app/.next-cli-build/server/app/api/tunnel/tailscale-login/route.js +1 -1
  381. package/app/.next-cli-build/server/app/api/tunnel/tailscale-login/route.js.nft.json +1 -1
  382. package/app/.next-cli-build/server/app/api/tunnel/tailscale-start-daemon/route.js +1 -1
  383. package/app/.next-cli-build/server/app/api/tunnel/tailscale-start-daemon/route.js.nft.json +1 -1
  384. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  385. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  386. package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  387. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  388. package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  389. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  390. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  391. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  392. package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  393. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  394. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  395. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  396. package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  397. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  398. package/app/.next-cli-build/server/app/api/usage/stream/route.js +2 -2
  399. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  400. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  401. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  402. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  403. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  404. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  405. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  406. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
  407. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  408. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  409. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  410. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  411. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +1 -1
  412. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  413. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
  414. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  415. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  416. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
  417. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  418. package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  419. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  420. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  421. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  422. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  423. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  424. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  425. package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  426. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  427. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  428. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  429. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  430. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  431. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  432. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  433. package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  434. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  435. package/app/.next-cli-build/server/app/api/version/restart/route.js +1 -1
  436. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  437. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  438. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  439. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  440. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  441. package/app/.next-cli-build/server/app/callback/page.js +1 -1
  442. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  443. package/app/.next-cli-build/server/app/callback.html +1 -1
  444. package/app/.next-cli-build/server/app/callback.rsc +6 -6
  445. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +6 -6
  446. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
  447. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +6 -6
  448. package/app/.next-cli-build/server/app/dashboard/ai-power-index.html +1 -1
  449. package/app/.next-cli-build/server/app/dashboard/ai-power-index.rsc +7 -7
  450. package/app/.next-cli-build/server/app/dashboard/ai-power-index.segments/!KGRhc2hib2FyZCk/dashboard/ai-power-index/__PAGE__.segment.rsc +7 -7
  451. package/app/.next-cli-build/server/app/dashboard/ai-power-index.segments/_full.segment.rsc +7 -7
  452. package/app/.next-cli-build/server/app/dashboard/ai-power-index.segments/_tree.segment.rsc +2 -2
  453. package/app/.next-cli-build/server/app/dashboard/api-keys.html +1 -1
  454. package/app/.next-cli-build/server/app/dashboard/api-keys.rsc +10 -10
  455. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/!KGRhc2hib2FyZCk/dashboard/api-keys/__PAGE__.segment.rsc +10 -10
  456. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/_full.segment.rsc +10 -10
  457. package/app/.next-cli-build/server/app/dashboard/api-keys.segments/_tree.segment.rsc +2 -2
  458. package/app/.next-cli-build/server/app/dashboard/audit-proxy.html +1 -0
  459. package/app/.next-cli-build/server/app/dashboard/audit-proxy.meta +36 -0
  460. package/app/.next-cli-build/server/app/dashboard/audit-proxy.rsc +25 -0
  461. package/app/.next-cli-build/server/app/dashboard/audit-proxy.segments/!KGRhc2hib2FyZCk/dashboard/audit-proxy/__PAGE__.segment.rsc +32 -0
  462. package/app/.next-cli-build/server/app/dashboard/audit-proxy.segments/_full.segment.rsc +25 -0
  463. package/app/.next-cli-build/server/app/dashboard/audit-proxy.segments/_tree.segment.rsc +4 -0
  464. package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  465. package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +8 -8
  466. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +8 -8
  467. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +8 -8
  468. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +2 -2
  469. package/app/.next-cli-build/server/app/dashboard/cli-tools/model-profiles.html +1 -1
  470. package/app/.next-cli-build/server/app/dashboard/cli-tools/model-profiles.rsc +8 -8
  471. package/app/.next-cli-build/server/app/dashboard/cli-tools/model-profiles.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/model-profiles/__PAGE__.segment.rsc +8 -8
  472. package/app/.next-cli-build/server/app/dashboard/cli-tools/model-profiles.segments/_full.segment.rsc +8 -8
  473. package/app/.next-cli-build/server/app/dashboard/cli-tools/model-profiles.segments/_tree.segment.rsc +2 -2
  474. package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  475. package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +8 -8
  476. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +8 -8
  477. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +8 -8
  478. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +2 -2
  479. package/app/.next-cli-build/server/app/dashboard/cluster.html +1 -1
  480. package/app/.next-cli-build/server/app/dashboard/cluster.rsc +7 -7
  481. package/app/.next-cli-build/server/app/dashboard/cluster.segments/!KGRhc2hib2FyZCk/dashboard/cluster/__PAGE__.segment.rsc +7 -7
  482. package/app/.next-cli-build/server/app/dashboard/cluster.segments/_full.segment.rsc +7 -7
  483. package/app/.next-cli-build/server/app/dashboard/cluster.segments/_tree.segment.rsc +2 -2
  484. package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  485. package/app/.next-cli-build/server/app/dashboard/combos.rsc +8 -8
  486. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +8 -8
  487. package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +8 -8
  488. package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -2
  489. package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  490. package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +8 -8
  491. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +8 -8
  492. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +8 -8
  493. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +2 -2
  494. package/app/.next-cli-build/server/app/dashboard/local-ai-report.html +1 -1
  495. package/app/.next-cli-build/server/app/dashboard/local-ai-report.rsc +7 -7
  496. package/app/.next-cli-build/server/app/dashboard/local-ai-report.segments/!KGRhc2hib2FyZCk/dashboard/local-ai-report/__PAGE__.segment.rsc +7 -7
  497. package/app/.next-cli-build/server/app/dashboard/local-ai-report.segments/_full.segment.rsc +7 -7
  498. package/app/.next-cli-build/server/app/dashboard/local-ai-report.segments/_tree.segment.rsc +2 -2
  499. package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  500. package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +8 -8
  501. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +8 -8
  502. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +8 -8
  503. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +2 -2
  504. package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  505. package/app/.next-cli-build/server/app/dashboard/mitm.rsc +8 -8
  506. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +8 -8
  507. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +8 -8
  508. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +2 -2
  509. package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  510. package/app/.next-cli-build/server/app/dashboard/profile.rsc +8 -8
  511. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +8 -8
  512. package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +8 -8
  513. package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -2
  514. package/app/.next-cli-build/server/app/dashboard/prompt-logs.html +1 -1
  515. package/app/.next-cli-build/server/app/dashboard/prompt-logs.rsc +7 -7
  516. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/!KGRhc2hib2FyZCk/dashboard/prompt-logs/__PAGE__.segment.rsc +7 -7
  517. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/_full.segment.rsc +7 -7
  518. package/app/.next-cli-build/server/app/dashboard/prompt-logs.segments/_tree.segment.rsc +2 -2
  519. package/app/.next-cli-build/server/app/dashboard/provider-health.html +1 -1
  520. package/app/.next-cli-build/server/app/dashboard/provider-health.rsc +7 -7
  521. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/!KGRhc2hib2FyZCk/dashboard/provider-health/__PAGE__.segment.rsc +7 -7
  522. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/_full.segment.rsc +7 -7
  523. package/app/.next-cli-build/server/app/dashboard/provider-health.segments/_tree.segment.rsc +2 -2
  524. package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  525. package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +8 -8
  526. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +8 -8
  527. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +8 -8
  528. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +2 -2
  529. package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  530. package/app/.next-cli-build/server/app/dashboard/providers.rsc +8 -8
  531. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +8 -8
  532. package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +8 -8
  533. package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -2
  534. package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  535. package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +8 -8
  536. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +8 -8
  537. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +8 -8
  538. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +2 -2
  539. package/app/.next-cli-build/server/app/dashboard/quota.html +1 -1
  540. package/app/.next-cli-build/server/app/dashboard/quota.rsc +9 -9
  541. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +9 -9
  542. package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +9 -9
  543. package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +2 -2
  544. package/app/.next-cli-build/server/app/dashboard/resource-monitor.html +1 -1
  545. package/app/.next-cli-build/server/app/dashboard/resource-monitor.rsc +7 -7
  546. package/app/.next-cli-build/server/app/dashboard/resource-monitor.segments/!KGRhc2hib2FyZCk/dashboard/resource-monitor/__PAGE__.segment.rsc +7 -7
  547. package/app/.next-cli-build/server/app/dashboard/resource-monitor.segments/_full.segment.rsc +7 -7
  548. package/app/.next-cli-build/server/app/dashboard/resource-monitor.segments/_tree.segment.rsc +2 -2
  549. package/app/.next-cli-build/server/app/dashboard/routing-topology.html +1 -1
  550. package/app/.next-cli-build/server/app/dashboard/routing-topology.rsc +7 -7
  551. package/app/.next-cli-build/server/app/dashboard/routing-topology.segments/!KGRhc2hib2FyZCk/dashboard/routing-topology/__PAGE__.segment.rsc +7 -7
  552. package/app/.next-cli-build/server/app/dashboard/routing-topology.segments/_full.segment.rsc +7 -7
  553. package/app/.next-cli-build/server/app/dashboard/routing-topology.segments/_tree.segment.rsc +2 -2
  554. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  555. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +7 -7
  556. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk/dashboard/settings/pricing/__PAGE__.segment.rsc +7 -7
  557. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +7 -7
  558. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
  559. package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
  560. package/app/.next-cli-build/server/app/dashboard/skills.rsc +8 -8
  561. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +8 -8
  562. package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +8 -8
  563. package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +2 -2
  564. package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
  565. package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +7 -7
  566. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +7 -7
  567. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +7 -7
  568. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +2 -2
  569. package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  570. package/app/.next-cli-build/server/app/dashboard/translator.rsc +8 -8
  571. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +8 -8
  572. package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +8 -8
  573. package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +2 -2
  574. package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  575. package/app/.next-cli-build/server/app/dashboard/usage.rsc +8 -8
  576. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +8 -8
  577. package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +8 -8
  578. package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +2 -2
  579. package/app/.next-cli-build/server/app/dashboard.html +1 -1
  580. package/app/.next-cli-build/server/app/dashboard.rsc +8 -8
  581. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +8 -8
  582. package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +8 -8
  583. package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +2 -2
  584. package/app/.next-cli-build/server/app/favicon.ico/route.js +1 -1
  585. package/app/.next-cli-build/server/app/index.html +1 -1
  586. package/app/.next-cli-build/server/app/index.rsc +6 -6
  587. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +6 -6
  588. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +6 -6
  589. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +2 -2
  590. package/app/.next-cli-build/server/app/landing/page.js +1 -1
  591. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  592. package/app/.next-cli-build/server/app/landing.html +1 -1
  593. package/app/.next-cli-build/server/app/landing.rsc +6 -6
  594. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +6 -6
  595. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
  596. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +6 -6
  597. package/app/.next-cli-build/server/app/login/page.js +1 -1
  598. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  599. package/app/.next-cli-build/server/app/login.html +1 -1
  600. package/app/.next-cli-build/server/app/login.rsc +7 -7
  601. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +7 -7
  602. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
  603. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +7 -7
  604. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js +2 -2
  605. package/app/.next-cli-build/server/app/page.js +1 -1
  606. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  607. package/app/.next-cli-build/server/app-paths-manifest.json +7 -4
  608. package/app/.next-cli-build/server/chunks/2566.js +2 -2
  609. package/app/.next-cli-build/server/chunks/4746.js +1 -1
  610. package/app/.next-cli-build/server/chunks/5210.js +3 -3
  611. package/app/.next-cli-build/server/chunks/6108.js +1 -1
  612. package/app/.next-cli-build/server/chunks/6328.js +1 -1
  613. package/app/.next-cli-build/server/chunks/6811.js +1 -1
  614. package/app/.next-cli-build/server/chunks/6992.js +1 -1
  615. package/app/.next-cli-build/server/chunks/7639.js +1 -1
  616. package/app/.next-cli-build/server/chunks/8352.js +2 -2
  617. package/app/.next-cli-build/server/chunks/8946.js +2 -2
  618. package/app/.next-cli-build/server/functions-config-manifest.json +2 -0
  619. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  620. package/app/.next-cli-build/server/middleware.js +1 -1
  621. package/app/.next-cli-build/server/pages/404.html +1 -1
  622. package/app/.next-cli-build/server/pages/500.html +1 -1
  623. package/app/.next-cli-build/server/prefetch-hints.json +24 -0
  624. package/app/.next-cli-build/static/L_h01kCNsdvHq-NfbF9cq/_buildManifest.js +1 -0
  625. package/app/.next-cli-build/static/chunks/{5263-7e4da67adf06eccf.js → 5263-4d0783ef24c50911.js} +1 -1
  626. package/app/.next-cli-build/static/chunks/7050-a706e6827db952b3.js +1 -0
  627. package/app/.next-cli-build/static/chunks/8500-01a63dafd809e317.js +1 -0
  628. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/api-keys/{page-653c30e1cfc826ad.js → page-a979b53a0e095564.js} +1 -1
  629. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/audit-proxy/page-3f3d666087630a55.js +5 -0
  630. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/basic-chat/{page-756885e39ef00c20.js → page-65c05edc9521c8fc.js} +1 -1
  631. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/{page-1b504e40c85200fe.js → page-0193441bced46de6.js} +1 -1
  632. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/model-profiles/{page-08c194e770f52b58.js → page-7844bf2031454b1c.js} +1 -1
  633. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/{page-5ee83aae55928333.js → page-fd337e41209f4b90.js} +1 -1
  634. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/{page-4639baaf9071ffff.js → page-7f613428dc68ec6e.js} +1 -1
  635. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/{page-c06fac9001a0ff2b.js → page-cc31ec395c8b0116.js} +1 -1
  636. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/{page-7e360930d0ecbe91.js → page-fb3cdf0c2e7742b6.js} +1 -1
  637. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/{page-5016b3d6e5295239.js → page-12700e16781ed896.js} +1 -1
  638. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/{page-82071dc65929d1a2.js → page-f1b6603d564d76e3.js} +1 -1
  639. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/combo/[id]/{page-db01b84cc209b4f9.js → page-50c464dc6ec10d2f.js} +1 -1
  640. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/web/{page-700b671f2e833c31.js → page-82923ad2695bf65f.js} +1 -1
  641. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/page-054e65328f040baf.js +1 -0
  642. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/{page-7e360930d0ecbe91.js → page-fb3cdf0c2e7742b6.js} +1 -1
  643. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/personalcloudprovider/{layout-83fbe505bfd1d46f.js → layout-b6944f78d9c0e80c.js} +1 -1
  644. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/personalcloudprovider/{page-2e31214e45dd5dd7.js → page-89759854090658c5.js} +1 -1
  645. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/personalcloudprovidermonitor/{page-8e723a2203914aed.js → page-ae4159241f66d5fa.js} +1 -1
  646. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/{page-007560f58f9ba8fd.js → page-6c370ee99bad6882.js} +1 -1
  647. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/{page-8619c99c9e76cc49.js → page-951afd9955093a68.js} +1 -1
  648. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/new/{page-c4bf38103d1317a3.js → page-b264785b8e695d7a.js} +1 -1
  649. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/{page-97e8bd5381f6b48c.js → page-983bcf0c76f9029e.js} +1 -1
  650. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/proxy-pools/{page-44cf1f0d3d57fab2.js → page-fafe439299f350bf.js} +1 -1
  651. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/{page-23ecefa1f8d06ab3.js → page-a05ac739ed8f8677.js} +1 -1
  652. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/{page-a96f92cdf7ccaa92.js → page-59d8a02c13292a77.js} +1 -1
  653. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/translator/{page-dc2a0d576213c24f.js → page-9eaf4a3d688f4243.js} +1 -1
  654. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/{page-e814d95a2e7f4fe2.js → page-b4ab0d22383a8303.js} +1 -1
  655. package/app/.next-cli-build/static/chunks/app/(dashboard)/{layout-bb6fdba0137a6272.js → layout-43b9cc22f69b564c.js} +1 -1
  656. package/app/.next-cli-build/static/chunks/app/_global-error/page-f5efd20f46cedab1.js +1 -0
  657. package/app/.next-cli-build/static/chunks/app/api/audit-proxy/ca/route-f5efd20f46cedab1.js +1 -0
  658. package/app/.next-cli-build/static/chunks/app/api/audit-proxy/route-f5efd20f46cedab1.js +1 -0
  659. package/app/.next-cli-build/static/chunks/app/api/auth/ldap/test/route-f5efd20f46cedab1.js +1 -0
  660. package/app/.next-cli-build/static/chunks/app/api/auth/ldap/users/route-f5efd20f46cedab1.js +1 -0
  661. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-f5efd20f46cedab1.js +1 -0
  662. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-f5efd20f46cedab1.js +1 -0
  663. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-f5efd20f46cedab1.js +1 -0
  664. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-f5efd20f46cedab1.js +1 -0
  665. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-f5efd20f46cedab1.js +1 -0
  666. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-f5efd20f46cedab1.js +1 -0
  667. package/app/.next-cli-build/static/chunks/app/api/auth/view-mode/route-f5efd20f46cedab1.js +1 -0
  668. package/app/.next-cli-build/static/chunks/app/api/branding/[asset]/route-f5efd20f46cedab1.js +1 -0
  669. package/app/.next-cli-build/static/chunks/app/api/branding/route-f5efd20f46cedab1.js +1 -0
  670. package/app/.next-cli-build/static/chunks/app/api/branding/upload/route-f5efd20f46cedab1.js +1 -0
  671. package/app/.next-cli-build/static/chunks/app/api/cli-model-profiles/cloud-models/route-f5efd20f46cedab1.js +1 -0
  672. package/app/.next-cli-build/static/chunks/app/api/cli-model-profiles/route-f5efd20f46cedab1.js +1 -0
  673. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-f5efd20f46cedab1.js +1 -0
  674. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-f5efd20f46cedab1.js +1 -0
  675. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/autostart/route-f5efd20f46cedab1.js +1 -0
  676. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/prompt-log-db/route-f5efd20f46cedab1.js +1 -0
  677. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/root-ca/route-f5efd20f46cedab1.js +1 -0
  678. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-f5efd20f46cedab1.js +1 -0
  679. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-f5efd20f46cedab1.js +1 -0
  680. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-f5efd20f46cedab1.js +1 -0
  681. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-f5efd20f46cedab1.js +1 -0
  682. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-f5efd20f46cedab1.js +1 -0
  683. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-f5efd20f46cedab1.js +1 -0
  684. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-f5efd20f46cedab1.js +1 -0
  685. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-f5efd20f46cedab1.js +1 -0
  686. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-f5efd20f46cedab1.js +1 -0
  687. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-f5efd20f46cedab1.js +1 -0
  688. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-f5efd20f46cedab1.js +1 -0
  689. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-f5efd20f46cedab1.js +1 -0
  690. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-f5efd20f46cedab1.js +1 -0
  691. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-f5efd20f46cedab1.js +1 -0
  692. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-f5efd20f46cedab1.js +1 -0
  693. package/app/.next-cli-build/static/chunks/app/api/cli-tools/qwen-settings/route-f5efd20f46cedab1.js +1 -0
  694. package/app/.next-cli-build/static/chunks/app/api/cluster/config/route-f5efd20f46cedab1.js +1 -0
  695. package/app/.next-cli-build/static/chunks/app/api/cluster/heartbeat/route-f5efd20f46cedab1.js +1 -0
  696. package/app/.next-cli-build/static/chunks/app/api/cluster/peers/[id]/command/route-f5efd20f46cedab1.js +1 -0
  697. package/app/.next-cli-build/static/chunks/app/api/cluster/peers/[id]/route-f5efd20f46cedab1.js +1 -0
  698. package/app/.next-cli-build/static/chunks/app/api/cluster/peers/route-f5efd20f46cedab1.js +1 -0
  699. package/app/.next-cli-build/static/chunks/app/api/cluster/snapshot/route-f5efd20f46cedab1.js +1 -0
  700. package/app/.next-cli-build/static/chunks/app/api/cluster/sync/route-f5efd20f46cedab1.js +1 -0
  701. package/app/.next-cli-build/static/chunks/app/api/cluster/test/route-f5efd20f46cedab1.js +1 -0
  702. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-f5efd20f46cedab1.js +1 -0
  703. package/app/.next-cli-build/static/chunks/app/api/combos/route-f5efd20f46cedab1.js +1 -0
  704. package/app/.next-cli-build/static/chunks/app/api/dashboard/ai-power-index/route-f5efd20f46cedab1.js +1 -0
  705. package/app/.next-cli-build/static/chunks/app/api/dashboard/analytics/ai-models/route-f5efd20f46cedab1.js +1 -0
  706. package/app/.next-cli-build/static/chunks/app/api/dashboard/analytics/analyze/route-f5efd20f46cedab1.js +1 -0
  707. package/app/.next-cli-build/static/chunks/app/api/dashboard/analytics/route-f5efd20f46cedab1.js +1 -0
  708. package/app/.next-cli-build/static/chunks/app/api/dashboard/combos/route-f5efd20f46cedab1.js +1 -0
  709. package/app/.next-cli-build/static/chunks/app/api/dashboard/endpoint/route-f5efd20f46cedab1.js +1 -0
  710. package/app/.next-cli-build/static/chunks/app/api/dashboard/local-ai-report/route-f5efd20f46cedab1.js +1 -0
  711. package/app/.next-cli-build/static/chunks/app/api/dashboard/prompt-logs/[id]/route-f5efd20f46cedab1.js +1 -0
  712. package/app/.next-cli-build/static/chunks/app/api/dashboard/prompt-logs/options/route-f5efd20f46cedab1.js +1 -0
  713. package/app/.next-cli-build/static/chunks/app/api/dashboard/prompt-logs/route-f5efd20f46cedab1.js +1 -0
  714. package/app/.next-cli-build/static/chunks/app/api/dashboard/routing-topology/config/route-f5efd20f46cedab1.js +1 -0
  715. package/app/.next-cli-build/static/chunks/app/api/dashboard/routing-topology/live/route-f5efd20f46cedab1.js +1 -0
  716. package/app/.next-cli-build/static/chunks/app/api/dashboard/routing-topology/route-f5efd20f46cedab1.js +1 -0
  717. package/app/.next-cli-build/static/chunks/app/api/dashboard/token-saver/route-f5efd20f46cedab1.js +1 -0
  718. package/app/.next-cli-build/static/chunks/app/api/health/route-f5efd20f46cedab1.js +1 -0
  719. package/app/.next-cli-build/static/chunks/app/api/init/route-f5efd20f46cedab1.js +1 -0
  720. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/caveman-test/route-f5efd20f46cedab1.js +1 -0
  721. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/rotate/route-f5efd20f46cedab1.js +1 -0
  722. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-f5efd20f46cedab1.js +1 -0
  723. package/app/.next-cli-build/static/chunks/app/api/keys/route-f5efd20f46cedab1.js +1 -0
  724. package/app/.next-cli-build/static/chunks/app/api/locale/route-f5efd20f46cedab1.js +1 -0
  725. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-f5efd20f46cedab1.js +1 -0
  726. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-f5efd20f46cedab1.js +1 -0
  727. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-f5efd20f46cedab1.js +1 -0
  728. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-f5efd20f46cedab1.js +1 -0
  729. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-f5efd20f46cedab1.js +1 -0
  730. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-f5efd20f46cedab1.js +1 -0
  731. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-f5efd20f46cedab1.js +1 -0
  732. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-f5efd20f46cedab1.js +1 -0
  733. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-f5efd20f46cedab1.js +1 -0
  734. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-f5efd20f46cedab1.js +1 -0
  735. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-f5efd20f46cedab1.js +1 -0
  736. package/app/.next-cli-build/static/chunks/app/api/models/route-f5efd20f46cedab1.js +1 -0
  737. package/app/.next-cli-build/static/chunks/app/api/models/test/route-f5efd20f46cedab1.js +1 -0
  738. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-f5efd20f46cedab1.js +1 -0
  739. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-f5efd20f46cedab1.js +1 -0
  740. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-f5efd20f46cedab1.js +1 -0
  741. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-f5efd20f46cedab1.js +1 -0
  742. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-f5efd20f46cedab1.js +1 -0
  743. package/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/device-code/route-f5efd20f46cedab1.js +1 -0
  744. package/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/poll/route-f5efd20f46cedab1.js +1 -0
  745. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-f5efd20f46cedab1.js +1 -0
  746. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-f5efd20f46cedab1.js +1 -0
  747. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-f5efd20f46cedab1.js +1 -0
  748. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-f5efd20f46cedab1.js +1 -0
  749. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-f5efd20f46cedab1.js +1 -0
  750. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/[id]/api-key-models/route-f5efd20f46cedab1.js +1 -0
  751. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/[id]/import-models/route-f5efd20f46cedab1.js +1 -0
  752. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/[id]/models/[...routeModel]/route-f5efd20f46cedab1.js +1 -0
  753. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/[id]/move/route-f5efd20f46cedab1.js +1 -0
  754. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/[id]/route-f5efd20f46cedab1.js +1 -0
  755. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/[id]/usage/route-f5efd20f46cedab1.js +1 -0
  756. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/client/route-f5efd20f46cedab1.js +1 -0
  757. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/monitor/route-f5efd20f46cedab1.js +1 -0
  758. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/permissions/route-f5efd20f46cedab1.js +1 -0
  759. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/route-f5efd20f46cedab1.js +1 -0
  760. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/routing/route-f5efd20f46cedab1.js +1 -0
  761. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/shares/route-f5efd20f46cedab1.js +1 -0
  762. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/visibility/route-f5efd20f46cedab1.js +1 -0
  763. package/app/.next-cli-build/static/chunks/app/api/pricing/catalog/route-f5efd20f46cedab1.js +1 -0
  764. package/app/.next-cli-build/static/chunks/app/api/pricing/recalculate/route-f5efd20f46cedab1.js +1 -0
  765. package/app/.next-cli-build/static/chunks/app/api/pricing/route-f5efd20f46cedab1.js +1 -0
  766. package/app/.next-cli-build/static/chunks/app/api/provider-health/route-f5efd20f46cedab1.js +1 -0
  767. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-f5efd20f46cedab1.js +1 -0
  768. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/openai-compatible/manage/route-f5efd20f46cedab1.js +1 -0
  769. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-f5efd20f46cedab1.js +1 -0
  770. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-f5efd20f46cedab1.js +1 -0
  771. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-f5efd20f46cedab1.js +1 -0
  772. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-f5efd20f46cedab1.js +1 -0
  773. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-f5efd20f46cedab1.js +1 -0
  774. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-f5efd20f46cedab1.js +1 -0
  775. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-f5efd20f46cedab1.js +1 -0
  776. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-f5efd20f46cedab1.js +1 -0
  777. package/app/.next-cli-build/static/chunks/app/api/providers/route-f5efd20f46cedab1.js +1 -0
  778. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-f5efd20f46cedab1.js +1 -0
  779. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-f5efd20f46cedab1.js +1 -0
  780. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-f5efd20f46cedab1.js +1 -0
  781. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-f5efd20f46cedab1.js +1 -0
  782. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-f5efd20f46cedab1.js +1 -0
  783. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-f5efd20f46cedab1.js +1 -0
  784. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-f5efd20f46cedab1.js +1 -0
  785. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-f5efd20f46cedab1.js +1 -0
  786. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-f5efd20f46cedab1.js +1 -0
  787. package/app/.next-cli-build/static/chunks/app/api/resource-monitor/[id]/route-f5efd20f46cedab1.js +1 -0
  788. package/app/.next-cli-build/static/chunks/app/api/resource-monitor/ai-models/route-f5efd20f46cedab1.js +1 -0
  789. package/app/.next-cli-build/static/chunks/app/api/resource-monitor/analyze/route-f5efd20f46cedab1.js +1 -0
  790. package/app/.next-cli-build/static/chunks/app/api/resource-monitor/history/route-f5efd20f46cedab1.js +1 -0
  791. package/app/.next-cli-build/static/chunks/app/api/resource-monitor/route-f5efd20f46cedab1.js +1 -0
  792. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-f5efd20f46cedab1.js +1 -0
  793. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-f5efd20f46cedab1.js +1 -0
  794. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-f5efd20f46cedab1.js +1 -0
  795. package/app/.next-cli-build/static/chunks/app/api/settings/route-f5efd20f46cedab1.js +1 -0
  796. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-f5efd20f46cedab1.js +1 -0
  797. package/app/.next-cli-build/static/chunks/app/api/tags/route-f5efd20f46cedab1.js +1 -0
  798. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-f5efd20f46cedab1.js +1 -0
  799. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-f5efd20f46cedab1.js +1 -0
  800. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-f5efd20f46cedab1.js +1 -0
  801. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-f5efd20f46cedab1.js +1 -0
  802. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-f5efd20f46cedab1.js +1 -0
  803. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-f5efd20f46cedab1.js +1 -0
  804. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-f5efd20f46cedab1.js +1 -0
  805. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-f5efd20f46cedab1.js +1 -0
  806. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-f5efd20f46cedab1.js +1 -0
  807. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-f5efd20f46cedab1.js +1 -0
  808. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-f5efd20f46cedab1.js +1 -0
  809. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-f5efd20f46cedab1.js +1 -0
  810. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-f5efd20f46cedab1.js +1 -0
  811. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-login/route-f5efd20f46cedab1.js +1 -0
  812. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-start-daemon/route-f5efd20f46cedab1.js +1 -0
  813. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-f5efd20f46cedab1.js +1 -0
  814. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-f5efd20f46cedab1.js +1 -0
  815. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-f5efd20f46cedab1.js +1 -0
  816. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-f5efd20f46cedab1.js +1 -0
  817. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-f5efd20f46cedab1.js +1 -0
  818. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-f5efd20f46cedab1.js +1 -0
  819. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-f5efd20f46cedab1.js +1 -0
  820. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-f5efd20f46cedab1.js +1 -0
  821. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-f5efd20f46cedab1.js +1 -0
  822. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-f5efd20f46cedab1.js +1 -0
  823. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-f5efd20f46cedab1.js +1 -0
  824. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-f5efd20f46cedab1.js +1 -0
  825. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-f5efd20f46cedab1.js +1 -0
  826. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-f5efd20f46cedab1.js +1 -0
  827. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-f5efd20f46cedab1.js +1 -0
  828. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-f5efd20f46cedab1.js +1 -0
  829. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-f5efd20f46cedab1.js +1 -0
  830. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-f5efd20f46cedab1.js +1 -0
  831. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-f5efd20f46cedab1.js +1 -0
  832. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-f5efd20f46cedab1.js +1 -0
  833. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-f5efd20f46cedab1.js +1 -0
  834. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-f5efd20f46cedab1.js +1 -0
  835. package/app/.next-cli-build/static/chunks/app/api/v1/route-f5efd20f46cedab1.js +1 -0
  836. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-f5efd20f46cedab1.js +1 -0
  837. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-f5efd20f46cedab1.js +1 -0
  838. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-f5efd20f46cedab1.js +1 -0
  839. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-f5efd20f46cedab1.js +1 -0
  840. package/app/.next-cli-build/static/chunks/app/api/version/restart/route-f5efd20f46cedab1.js +1 -0
  841. package/app/.next-cli-build/static/chunks/app/api/version/route-f5efd20f46cedab1.js +1 -0
  842. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-f5efd20f46cedab1.js +1 -0
  843. package/app/.next-cli-build/static/chunks/app/api/version/update/route-f5efd20f46cedab1.js +1 -0
  844. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-f5efd20f46cedab1.js +1 -0
  845. package/app/.next-cli-build/static/chunks/app/page-f5efd20f46cedab1.js +1 -0
  846. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-f5efd20f46cedab1.js +1 -0
  847. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-f5efd20f46cedab1.js +1 -0
  848. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-f5efd20f46cedab1.js +1 -0
  849. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-f5efd20f46cedab1.js +1 -0
  850. package/app/.next-cli-build/static/css/150584b47405f066.css +1 -0
  851. package/app/cli/.build-home/AppData/Roaming/bluerouter/db/backups/{upgrade-5.3.40-to-5.3.41-5.3.41-20260821-072821 → upgrade-5.3.46-to-5.3.47-5.3.47-20260822-172255}/data.sqlite +0 -0
  852. package/app/cli/.build-home/AppData/Roaming/bluerouter/db/data.sqlite +0 -0
  853. package/app/package.json +1 -1
  854. package/package.json +1 -1
  855. package/app/.next-cli-build/static/WzpaETe2CHJPwZBBssQBx/_buildManifest.js +0 -1
  856. package/app/.next-cli-build/static/chunks/1997-ec155690a9441b82.js +0 -1
  857. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/page-df910327664404cc.js +0 -1
  858. package/app/.next-cli-build/static/chunks/app/_global-error/page-1ae9897b4a00731e.js +0 -1
  859. package/app/.next-cli-build/static/chunks/app/api/auth/ldap/test/route-1ae9897b4a00731e.js +0 -1
  860. package/app/.next-cli-build/static/chunks/app/api/auth/ldap/users/route-1ae9897b4a00731e.js +0 -1
  861. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-1ae9897b4a00731e.js +0 -1
  862. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-1ae9897b4a00731e.js +0 -1
  863. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-1ae9897b4a00731e.js +0 -1
  864. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-1ae9897b4a00731e.js +0 -1
  865. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-1ae9897b4a00731e.js +0 -1
  866. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-1ae9897b4a00731e.js +0 -1
  867. package/app/.next-cli-build/static/chunks/app/api/auth/view-mode/route-1ae9897b4a00731e.js +0 -1
  868. package/app/.next-cli-build/static/chunks/app/api/branding/[asset]/route-1ae9897b4a00731e.js +0 -1
  869. package/app/.next-cli-build/static/chunks/app/api/branding/route-1ae9897b4a00731e.js +0 -1
  870. package/app/.next-cli-build/static/chunks/app/api/branding/upload/route-1ae9897b4a00731e.js +0 -1
  871. package/app/.next-cli-build/static/chunks/app/api/cli-model-profiles/cloud-models/route-1ae9897b4a00731e.js +0 -1
  872. package/app/.next-cli-build/static/chunks/app/api/cli-model-profiles/route-1ae9897b4a00731e.js +0 -1
  873. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-1ae9897b4a00731e.js +0 -1
  874. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-1ae9897b4a00731e.js +0 -1
  875. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/autostart/route-1ae9897b4a00731e.js +0 -1
  876. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/prompt-log-db/route-1ae9897b4a00731e.js +0 -1
  877. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/root-ca/route-1ae9897b4a00731e.js +0 -1
  878. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-1ae9897b4a00731e.js +0 -1
  879. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-1ae9897b4a00731e.js +0 -1
  880. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-1ae9897b4a00731e.js +0 -1
  881. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-1ae9897b4a00731e.js +0 -1
  882. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-1ae9897b4a00731e.js +0 -1
  883. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-1ae9897b4a00731e.js +0 -1
  884. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-1ae9897b4a00731e.js +0 -1
  885. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-1ae9897b4a00731e.js +0 -1
  886. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-1ae9897b4a00731e.js +0 -1
  887. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-1ae9897b4a00731e.js +0 -1
  888. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-1ae9897b4a00731e.js +0 -1
  889. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-1ae9897b4a00731e.js +0 -1
  890. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-1ae9897b4a00731e.js +0 -1
  891. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-1ae9897b4a00731e.js +0 -1
  892. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-1ae9897b4a00731e.js +0 -1
  893. package/app/.next-cli-build/static/chunks/app/api/cli-tools/qwen-settings/route-1ae9897b4a00731e.js +0 -1
  894. package/app/.next-cli-build/static/chunks/app/api/cluster/config/route-1ae9897b4a00731e.js +0 -1
  895. package/app/.next-cli-build/static/chunks/app/api/cluster/heartbeat/route-1ae9897b4a00731e.js +0 -1
  896. package/app/.next-cli-build/static/chunks/app/api/cluster/peers/[id]/command/route-1ae9897b4a00731e.js +0 -1
  897. package/app/.next-cli-build/static/chunks/app/api/cluster/peers/[id]/route-1ae9897b4a00731e.js +0 -1
  898. package/app/.next-cli-build/static/chunks/app/api/cluster/peers/route-1ae9897b4a00731e.js +0 -1
  899. package/app/.next-cli-build/static/chunks/app/api/cluster/snapshot/route-1ae9897b4a00731e.js +0 -1
  900. package/app/.next-cli-build/static/chunks/app/api/cluster/sync/route-1ae9897b4a00731e.js +0 -1
  901. package/app/.next-cli-build/static/chunks/app/api/cluster/test/route-1ae9897b4a00731e.js +0 -1
  902. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-1ae9897b4a00731e.js +0 -1
  903. package/app/.next-cli-build/static/chunks/app/api/combos/route-1ae9897b4a00731e.js +0 -1
  904. package/app/.next-cli-build/static/chunks/app/api/dashboard/ai-power-index/route-1ae9897b4a00731e.js +0 -1
  905. package/app/.next-cli-build/static/chunks/app/api/dashboard/analytics/ai-models/route-1ae9897b4a00731e.js +0 -1
  906. package/app/.next-cli-build/static/chunks/app/api/dashboard/analytics/analyze/route-1ae9897b4a00731e.js +0 -1
  907. package/app/.next-cli-build/static/chunks/app/api/dashboard/analytics/route-1ae9897b4a00731e.js +0 -1
  908. package/app/.next-cli-build/static/chunks/app/api/dashboard/combos/route-1ae9897b4a00731e.js +0 -1
  909. package/app/.next-cli-build/static/chunks/app/api/dashboard/endpoint/route-1ae9897b4a00731e.js +0 -1
  910. package/app/.next-cli-build/static/chunks/app/api/dashboard/local-ai-report/route-1ae9897b4a00731e.js +0 -1
  911. package/app/.next-cli-build/static/chunks/app/api/dashboard/prompt-logs/[id]/route-1ae9897b4a00731e.js +0 -1
  912. package/app/.next-cli-build/static/chunks/app/api/dashboard/prompt-logs/options/route-1ae9897b4a00731e.js +0 -1
  913. package/app/.next-cli-build/static/chunks/app/api/dashboard/prompt-logs/route-1ae9897b4a00731e.js +0 -1
  914. package/app/.next-cli-build/static/chunks/app/api/dashboard/routing-topology/config/route-1ae9897b4a00731e.js +0 -1
  915. package/app/.next-cli-build/static/chunks/app/api/dashboard/routing-topology/live/route-1ae9897b4a00731e.js +0 -1
  916. package/app/.next-cli-build/static/chunks/app/api/dashboard/routing-topology/route-1ae9897b4a00731e.js +0 -1
  917. package/app/.next-cli-build/static/chunks/app/api/dashboard/token-saver/route-1ae9897b4a00731e.js +0 -1
  918. package/app/.next-cli-build/static/chunks/app/api/health/route-1ae9897b4a00731e.js +0 -1
  919. package/app/.next-cli-build/static/chunks/app/api/init/route-1ae9897b4a00731e.js +0 -1
  920. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/caveman-test/route-1ae9897b4a00731e.js +0 -1
  921. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/rotate/route-1ae9897b4a00731e.js +0 -1
  922. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-1ae9897b4a00731e.js +0 -1
  923. package/app/.next-cli-build/static/chunks/app/api/keys/route-1ae9897b4a00731e.js +0 -1
  924. package/app/.next-cli-build/static/chunks/app/api/locale/route-1ae9897b4a00731e.js +0 -1
  925. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-1ae9897b4a00731e.js +0 -1
  926. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-1ae9897b4a00731e.js +0 -1
  927. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-1ae9897b4a00731e.js +0 -1
  928. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-1ae9897b4a00731e.js +0 -1
  929. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-1ae9897b4a00731e.js +0 -1
  930. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-1ae9897b4a00731e.js +0 -1
  931. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-1ae9897b4a00731e.js +0 -1
  932. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-1ae9897b4a00731e.js +0 -1
  933. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-1ae9897b4a00731e.js +0 -1
  934. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-1ae9897b4a00731e.js +0 -1
  935. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-1ae9897b4a00731e.js +0 -1
  936. package/app/.next-cli-build/static/chunks/app/api/models/route-1ae9897b4a00731e.js +0 -1
  937. package/app/.next-cli-build/static/chunks/app/api/models/test/route-1ae9897b4a00731e.js +0 -1
  938. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-1ae9897b4a00731e.js +0 -1
  939. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-1ae9897b4a00731e.js +0 -1
  940. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-1ae9897b4a00731e.js +0 -1
  941. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-1ae9897b4a00731e.js +0 -1
  942. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-1ae9897b4a00731e.js +0 -1
  943. package/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/device-code/route-1ae9897b4a00731e.js +0 -1
  944. package/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/poll/route-1ae9897b4a00731e.js +0 -1
  945. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-1ae9897b4a00731e.js +0 -1
  946. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-1ae9897b4a00731e.js +0 -1
  947. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-1ae9897b4a00731e.js +0 -1
  948. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-1ae9897b4a00731e.js +0 -1
  949. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-1ae9897b4a00731e.js +0 -1
  950. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/[id]/api-key-models/route-1ae9897b4a00731e.js +0 -1
  951. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/[id]/import-models/route-1ae9897b4a00731e.js +0 -1
  952. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/[id]/models/[...routeModel]/route-1ae9897b4a00731e.js +0 -1
  953. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/[id]/move/route-1ae9897b4a00731e.js +0 -1
  954. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/[id]/route-1ae9897b4a00731e.js +0 -1
  955. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/[id]/usage/route-1ae9897b4a00731e.js +0 -1
  956. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/client/route-1ae9897b4a00731e.js +0 -1
  957. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/monitor/route-1ae9897b4a00731e.js +0 -1
  958. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/permissions/route-1ae9897b4a00731e.js +0 -1
  959. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/route-1ae9897b4a00731e.js +0 -1
  960. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/routing/route-1ae9897b4a00731e.js +0 -1
  961. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/shares/route-1ae9897b4a00731e.js +0 -1
  962. package/app/.next-cli-build/static/chunks/app/api/personal-cloud-providers/visibility/route-1ae9897b4a00731e.js +0 -1
  963. package/app/.next-cli-build/static/chunks/app/api/pricing/catalog/route-1ae9897b4a00731e.js +0 -1
  964. package/app/.next-cli-build/static/chunks/app/api/pricing/recalculate/route-1ae9897b4a00731e.js +0 -1
  965. package/app/.next-cli-build/static/chunks/app/api/pricing/route-1ae9897b4a00731e.js +0 -1
  966. package/app/.next-cli-build/static/chunks/app/api/provider-health/route-1ae9897b4a00731e.js +0 -1
  967. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-1ae9897b4a00731e.js +0 -1
  968. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/openai-compatible/manage/route-1ae9897b4a00731e.js +0 -1
  969. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-1ae9897b4a00731e.js +0 -1
  970. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-1ae9897b4a00731e.js +0 -1
  971. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-1ae9897b4a00731e.js +0 -1
  972. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-1ae9897b4a00731e.js +0 -1
  973. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-1ae9897b4a00731e.js +0 -1
  974. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-1ae9897b4a00731e.js +0 -1
  975. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-1ae9897b4a00731e.js +0 -1
  976. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-1ae9897b4a00731e.js +0 -1
  977. package/app/.next-cli-build/static/chunks/app/api/providers/route-1ae9897b4a00731e.js +0 -1
  978. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-1ae9897b4a00731e.js +0 -1
  979. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-1ae9897b4a00731e.js +0 -1
  980. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-1ae9897b4a00731e.js +0 -1
  981. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-1ae9897b4a00731e.js +0 -1
  982. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-1ae9897b4a00731e.js +0 -1
  983. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-1ae9897b4a00731e.js +0 -1
  984. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-1ae9897b4a00731e.js +0 -1
  985. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-1ae9897b4a00731e.js +0 -1
  986. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-1ae9897b4a00731e.js +0 -1
  987. package/app/.next-cli-build/static/chunks/app/api/resource-monitor/[id]/route-1ae9897b4a00731e.js +0 -1
  988. package/app/.next-cli-build/static/chunks/app/api/resource-monitor/ai-models/route-1ae9897b4a00731e.js +0 -1
  989. package/app/.next-cli-build/static/chunks/app/api/resource-monitor/analyze/route-1ae9897b4a00731e.js +0 -1
  990. package/app/.next-cli-build/static/chunks/app/api/resource-monitor/history/route-1ae9897b4a00731e.js +0 -1
  991. package/app/.next-cli-build/static/chunks/app/api/resource-monitor/route-1ae9897b4a00731e.js +0 -1
  992. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-1ae9897b4a00731e.js +0 -1
  993. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-1ae9897b4a00731e.js +0 -1
  994. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-1ae9897b4a00731e.js +0 -1
  995. package/app/.next-cli-build/static/chunks/app/api/settings/route-1ae9897b4a00731e.js +0 -1
  996. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-1ae9897b4a00731e.js +0 -1
  997. package/app/.next-cli-build/static/chunks/app/api/tags/route-1ae9897b4a00731e.js +0 -1
  998. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-1ae9897b4a00731e.js +0 -1
  999. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-1ae9897b4a00731e.js +0 -1
  1000. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-1ae9897b4a00731e.js +0 -1
  1001. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-1ae9897b4a00731e.js +0 -1
  1002. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-1ae9897b4a00731e.js +0 -1
  1003. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-1ae9897b4a00731e.js +0 -1
  1004. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-1ae9897b4a00731e.js +0 -1
  1005. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-1ae9897b4a00731e.js +0 -1
  1006. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-1ae9897b4a00731e.js +0 -1
  1007. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-1ae9897b4a00731e.js +0 -1
  1008. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-1ae9897b4a00731e.js +0 -1
  1009. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-1ae9897b4a00731e.js +0 -1
  1010. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-1ae9897b4a00731e.js +0 -1
  1011. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-login/route-1ae9897b4a00731e.js +0 -1
  1012. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-start-daemon/route-1ae9897b4a00731e.js +0 -1
  1013. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-1ae9897b4a00731e.js +0 -1
  1014. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-1ae9897b4a00731e.js +0 -1
  1015. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-1ae9897b4a00731e.js +0 -1
  1016. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-1ae9897b4a00731e.js +0 -1
  1017. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-1ae9897b4a00731e.js +0 -1
  1018. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-1ae9897b4a00731e.js +0 -1
  1019. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-1ae9897b4a00731e.js +0 -1
  1020. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-1ae9897b4a00731e.js +0 -1
  1021. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-1ae9897b4a00731e.js +0 -1
  1022. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-1ae9897b4a00731e.js +0 -1
  1023. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-1ae9897b4a00731e.js +0 -1
  1024. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-1ae9897b4a00731e.js +0 -1
  1025. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-1ae9897b4a00731e.js +0 -1
  1026. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-1ae9897b4a00731e.js +0 -1
  1027. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-1ae9897b4a00731e.js +0 -1
  1028. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-1ae9897b4a00731e.js +0 -1
  1029. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-1ae9897b4a00731e.js +0 -1
  1030. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-1ae9897b4a00731e.js +0 -1
  1031. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-1ae9897b4a00731e.js +0 -1
  1032. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-1ae9897b4a00731e.js +0 -1
  1033. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-1ae9897b4a00731e.js +0 -1
  1034. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-1ae9897b4a00731e.js +0 -1
  1035. package/app/.next-cli-build/static/chunks/app/api/v1/route-1ae9897b4a00731e.js +0 -1
  1036. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-1ae9897b4a00731e.js +0 -1
  1037. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-1ae9897b4a00731e.js +0 -1
  1038. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-1ae9897b4a00731e.js +0 -1
  1039. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-1ae9897b4a00731e.js +0 -1
  1040. package/app/.next-cli-build/static/chunks/app/api/version/restart/route-1ae9897b4a00731e.js +0 -1
  1041. package/app/.next-cli-build/static/chunks/app/api/version/route-1ae9897b4a00731e.js +0 -1
  1042. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-1ae9897b4a00731e.js +0 -1
  1043. package/app/.next-cli-build/static/chunks/app/api/version/update/route-1ae9897b4a00731e.js +0 -1
  1044. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-1ae9897b4a00731e.js +0 -1
  1045. package/app/.next-cli-build/static/chunks/app/page-1ae9897b4a00731e.js +0 -1
  1046. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-1ae9897b4a00731e.js +0 -1
  1047. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-1ae9897b4a00731e.js +0 -1
  1048. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-1ae9897b4a00731e.js +0 -1
  1049. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-1ae9897b4a00731e.js +0 -1
  1050. package/app/.next-cli-build/static/css/b5abfe9c2085ba8e.css +0 -1
  1051. package/app/cli/.build-home/AppData/Roaming/bluerouter/db/backups/upgrade-5.3.41-to-5.3.43-5.3.43-20260822-131146/data.sqlite +0 -0
  1052. /package/app/.next-cli-build/static/{WzpaETe2CHJPwZBBssQBx → L_h01kCNsdvHq-NfbF9cq}/_ssgManifest.js +0 -0
@@ -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,9893,9959,1997,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,8991,3862,9893,9959,8500,7050,5564,5263,7033,5497,8441,3794,7358],()=>e(e.s=84578)),_N_E=e.O()}]);
@@ -0,0 +1,5 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5236],{31874:(e,t,s)=>{"use strict";s.d(t,{default:()=>m});var r=s(95155),a=s(12115),d=s(98500),n=s.n(d);let i=["api.anthropic.com","*.anthropic.com","claude.ai","*.claude.ai"],l=["api.openai.com","*.openai.com","chatgpt.com","*.chatgpt.com"];function o({ok:e,children:t}){return(0,r.jsxs)("span",{className:`inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-xs font-medium ${e?"border-green-500/30 bg-green-500/10 text-green-600 dark:text-green-400":"border-border bg-surface text-text-muted"}`,children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:e?"check_circle":"radio_button_unchecked"}),t]})}function c({label:e,hint:t,children:s}){return(0,r.jsxs)("label",{className:"grid gap-1.5",children:[(0,r.jsx)("span",{className:"text-sm font-semibold text-text-main",children:e}),s,t?(0,r.jsx)("span",{className:"text-[11px] leading-4 text-text-muted",children:t}):null]})}function x({label:e,description:t,checked:s,onChange:a,disabled:d=!1}){return(0,r.jsxs)("label",{className:"flex items-start justify-between gap-4 rounded-xl border border-border bg-background/50 p-3",children:[(0,r.jsxs)("span",{children:[(0,r.jsx)("span",{className:"block text-sm font-semibold text-text-main",children:e}),(0,r.jsx)("span",{className:"mt-0.5 block text-xs leading-5 text-text-muted",children:t})]}),(0,r.jsx)("input",{type:"checkbox",checked:s,onChange:e=>a(e.target.checked),disabled:d,className:"mt-1 h-4 w-4 accent-[var(--color-primary)]"})]})}function m(){let[e,t]=(0,a.useState)(null),[s,d]=(0,a.useState)(null),[m,p]=(0,a.useState)(""),[u,b]=(0,a.useState)(""),[h,g]=(0,a.useState)(""),[f,y]=(0,a.useState)(null),[j,N]=(0,a.useState)(""),v=(0,a.useCallback)(async(e=!0)=>{try{let r=await fetch("/api/audit-proxy?limit=50",{cache:"no-store"}),a=await r.json();if(!r.ok)throw Error(a.error||"Cannot load Audit Proxy");t(a),e&&s||d(a.config)}catch(e){b(e.message||"Cannot load Audit Proxy")}},[s]);(0,a.useEffect)(()=>{v(!1);let e=setInterval(()=>v(!0),5e3);return()=>clearInterval(e)},[]);let w=e?.status||{},k=w.rootCA||{},C=!0===w.running,S=(0,a.useMemo)(()=>s?s.clientProxyHost?s.clientProxyHost:s.bindHost&&!["0.0.0.0","::","127.0.0.1","::1"].includes(s.bindHost)?s.bindHost:C&&w.address?.address&&!["0.0.0.0","::","127.0.0.1","::1"].includes(w.address.address)?w.address.address:"<bluerouter-host>":"bluerouter",[s,C,w.address]),T=s?`http://${S}:${s.port}`:"",A=(e,t)=>d(s=>({...s,[e]:t})),P=(s?.allowedHosts||[]).join("\n"),R=async(e,t={})=>{p(e),b(""),g("");try{let s=await fetch("/api/audit-proxy",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:e,...t})}),r=await s.json().catch(()=>({}));if(!s.ok)throw Error(r.error||`${e} failed`);return"test"===e?(y(r.test),g(`Simulation passed ${r.test.passed}/${r.test.total} checks.`)):g("clear-logs"===e?"Audit log cleared.":`Audit Proxy ${e} completed.`),await v("restart"!==e&&"start"!==e),r}catch(t){return b(t.message||`${e} failed`),null}finally{p("")}},E=async()=>{p("save"),b(""),g("");try{let e=await fetch("/api/audit-proxy",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({config:s})}),t=await e.json();if(!e.ok)throw Error(t.error||"Save failed");d(t.config),g("Configuration saved."),await v(!0)}catch(e){b(e.message||"Save failed")}finally{p("")}},O=async()=>{p("ca"),b("");try{let e=await fetch("/api/audit-proxy/ca",{method:"POST"}),t=await e.json();if(!e.ok)throw Error(t.error||"CA generation failed");g("Root CA is ready."),await v(!0)}catch(e){b(e.message||"CA generation failed")}finally{p("")}},_=e=>{A("allowedHosts",[...new Set([...s?.allowedHosts||[],...e])])},H=async(e,t)=>{try{await navigator.clipboard.writeText(t),N(e),setTimeout(()=>N(""),1500)}catch{b("Clipboard access failed.")}};if(!s)return(0,r.jsx)("div",{className:"rounded-xl border border-border bg-surface p-5 text-sm text-text-muted",children:"Loading Enterprise AI Audit Proxy…"});let L=Math.round(Number(s.captureLimitBytes||0)/1024/1024*10)/10,I=["0.0.0.0","::"].includes(s.bindHost),$=`HTTPS_PROXY=${T}
2
+ HTTP_PROXY=${T}
3
+ NODE_EXTRA_CA_CERTS=/path/to/bluerouter-audit-root-ca.crt`,B=`HTTPS_PROXY=${T}
4
+ HTTP_PROXY=${T}
5
+ CODEX_CA_CERTIFICATE=/path/to/bluerouter-audit-root-ca.crt`;return(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)("div",{className:"flex flex-col gap-3 rounded-2xl border border-primary/20 bg-primary/5 p-4 sm:flex-row sm:items-start sm:justify-between",children:[(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary",children:"policy"}),(0,r.jsx)("h1",{className:"text-lg font-bold text-text-main",children:"Enterprise AI Audit Proxy"}),(0,r.jsx)(o,{ok:C,children:C?"Running":"Stopped"}),(0,r.jsx)(o,{ok:k.certExists,children:"Root CA"}),(0,r.jsx)(o,{ok:s.verifyUpstreamTls,children:"Verified upstream TLS"})]}),(0,r.jsx)("p",{className:"mt-2 max-w-4xl text-sm leading-6 text-text-muted",children:"Explicit HTTP CONNECT proxy for official Claude Code / Codex traffic. BlueRouter inspects and audits approved hosts, forwards the original provider/model/auth on the wire, and redacts credentials before persistence."})]}),(0,r.jsxs)(n(),{href:"/dashboard/mitm",className:"inline-flex items-center gap-1 text-xs font-medium text-primary hover:underline",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"arrow_back"})," AI Traffic Gateway"]})]}),u?(0,r.jsx)("div",{className:"rounded-xl border border-red-500/30 bg-red-500/10 px-4 py-3 text-sm text-red-600 dark:text-red-400",children:u}):null,h?(0,r.jsx)("div",{className:"rounded-xl border border-green-500/30 bg-green-500/10 px-4 py-3 text-sm text-green-600 dark:text-green-400",children:h}):null,I?(0,r.jsxs)("div",{className:"rounded-xl border border-amber-500/30 bg-amber-500/10 px-4 py-3 text-sm text-amber-700 dark:text-amber-300",children:[(0,r.jsx)("strong",{children:"LAN listener enabled."})," Restrict port ",s.port," with firewall/VLAN policy. This first version intentionally has no shared proxy credential, so it must not be exposed to the public Internet."]}):null,(0,r.jsxs)("div",{className:"grid gap-4 xl:grid-cols-[1.25fr_0.75fr]",children:[(0,r.jsxs)("section",{className:"rounded-2xl border border-border bg-surface p-4",children:[(0,r.jsxs)("div",{className:"mb-4 flex flex-wrap items-center justify-between gap-2",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h2",{className:"font-semibold text-text-main",children:"Proxy configuration"}),(0,r.jsx)("p",{className:"mt-1 text-xs text-text-muted",children:"All server-side setup is managed here. No proxy daemon CLI is required."})]}),(0,r.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,r.jsx)("button",{onClick:()=>_(i),disabled:C,className:"rounded-lg border border-border px-3 py-1.5 text-xs text-text-main hover:bg-background disabled:opacity-50",children:"+ Anthropic preset"}),(0,r.jsx)("button",{onClick:()=>_(l),disabled:C,className:"rounded-lg border border-border px-3 py-1.5 text-xs text-text-main hover:bg-background disabled:opacity-50",children:"+ OpenAI preset"})]})]}),(0,r.jsxs)("div",{className:"grid gap-4 md:grid-cols-2",children:[(0,r.jsx)(c,{label:"Bind address",hint:"127.0.0.1 = local only. Use 0.0.0.0 or a LAN IP when other workstations connect.",children:(0,r.jsx)("input",{value:s.bindHost,onChange:e=>A("bindHost",e.target.value),disabled:C,className:"rounded-lg border border-border bg-background px-3 py-2 text-sm text-text-main outline-none focus:border-primary disabled:opacity-60"})}),(0,r.jsx)(c,{label:"Proxy port",hint:"Default 3128; no root/admin privilege is required on this port.",children:(0,r.jsx)("input",{type:"number",min:"1",max:"65535",value:s.port,onChange:e=>A("port",Number(e.target.value)),disabled:C,className:"rounded-lg border border-border bg-background px-3 py-2 text-sm text-text-main outline-none focus:border-primary disabled:opacity-60"})}),(0,r.jsx)(c,{label:"Client proxy host",hint:"Hostname/IP that endpoint management or users will use. It does not change the listener.",children:(0,r.jsx)("input",{value:s.clientProxyHost||"",onChange:e=>A("clientProxyHost",e.target.value),disabled:C,placeholder:"bluerouter.example.local",className:"rounded-lg border border-border bg-background px-3 py-2 text-sm text-text-main outline-none focus:border-primary disabled:opacity-60"})}),(0,r.jsx)(c,{label:"Capture limit / request",hint:"Bodies are streamed immediately; only this bounded prefix is retained for audit.",children:(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("input",{type:"number",min:"0",max:"16",step:"0.5",value:L,onChange:e=>A("captureLimitBytes",Math.round(1024*Number(e.target.value)*1024)),disabled:C||!s.captureBodies,className:"min-w-0 flex-1 rounded-lg border border-border bg-background px-3 py-2 text-sm text-text-main outline-none focus:border-primary disabled:opacity-60"}),(0,r.jsx)("span",{className:"text-xs text-text-muted",children:"MB"})]})})]}),(0,r.jsxs)("div",{className:"mt-4 grid gap-3 md:grid-cols-2",children:[(0,r.jsx)(x,{label:"Pass through non-audited hosts",description:"Unknown CONNECT hosts are blind TCP tunnels. Useful for login/telemetry auxiliary domains; their TLS is not inspected.",checked:s.passthroughUnknown,onChange:e=>A("passthroughUnknown",e),disabled:C}),(0,r.jsx)(x,{label:"Capture request/response bodies",description:"Credentials are still redacted. Disable to retain metadata only.",checked:s.captureBodies,onChange:e=>A("captureBodies",e),disabled:C})]}),(0,r.jsxs)("div",{className:"mt-4 grid gap-4 md:grid-cols-[1fr_180px]",children:[(0,r.jsx)(c,{label:"TLS inspection allowlist",hint:"One hostname/wildcard per line. Only these hosts are decrypted and audited.",children:(0,r.jsx)("textarea",{rows:9,value:P,onChange:e=>A("allowedHosts",e.target.value.split(/\r?\n/).map(e=>e.trim()).filter(Boolean)),disabled:C,className:"rounded-lg border border-border bg-background px-3 py-2 font-mono text-xs text-text-main outline-none focus:border-primary disabled:opacity-60"})}),(0,r.jsxs)("div",{className:"grid content-start gap-4",children:[(0,r.jsx)(c,{label:"Retention",hint:"Expired entries are pruned from the local JSONL audit store.",children:(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("input",{type:"number",min:"1",max:"365",value:s.retentionDays,onChange:e=>A("retentionDays",Number(e.target.value)),disabled:C,className:"min-w-0 flex-1 rounded-lg border border-border bg-background px-3 py-2 text-sm text-text-main outline-none focus:border-primary disabled:opacity-60"}),(0,r.jsx)("span",{className:"text-xs text-text-muted",children:"days"})]})}),(0,r.jsxs)("div",{className:"rounded-xl border border-green-500/20 bg-green-500/5 p-3 text-xs leading-5 text-text-muted",children:[(0,r.jsx)("div",{className:"font-semibold text-green-600 dark:text-green-400",children:"Upstream TLS verification: enforced"}),"Provider certificates are always verified. The GUI cannot disable this safety control."]})]})]}),(0,r.jsxs)("div",{className:"mt-4 flex flex-wrap gap-2",children:[(0,r.jsx)("button",{onClick:E,disabled:!!m||C,className:"rounded-lg bg-primary px-4 py-2 text-sm font-semibold text-white disabled:opacity-50",children:"save"===m?"Saving…":"Save"}),C?(0,r.jsx)("button",{onClick:()=>R("stop"),disabled:!!m,className:"rounded-lg border border-red-500/30 bg-red-500/10 px-4 py-2 text-sm font-semibold text-red-500 disabled:opacity-50",children:"stop"===m?"Stopping…":"Stop Proxy"}):(0,r.jsx)("button",{onClick:()=>R("start",{config:s}),disabled:!!m,className:"rounded-lg border border-green-500/30 bg-green-500/10 px-4 py-2 text-sm font-semibold text-green-600 disabled:opacity-50",children:"start"===m?"Starting…":"Start Proxy"}),(0,r.jsx)("button",{onClick:()=>R("restart",{config:s}),disabled:!!m,className:"rounded-lg border border-border px-4 py-2 text-sm font-semibold text-text-main hover:bg-background disabled:opacity-50",children:"restart"===m?"Restarting…":"Save & Restart"}),(0,r.jsx)("button",{onClick:()=>R("test"),disabled:!!m,className:"rounded-lg border border-primary/30 bg-primary/10 px-4 py-2 text-sm font-semibold text-primary disabled:opacity-50",children:"test"===m?"Testing…":"Run Simulated Test"})]})]}),(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)("section",{className:"rounded-2xl border border-border bg-surface p-4",children:[(0,r.jsx)("h2",{className:"font-semibold text-text-main",children:"Root CA"}),(0,r.jsx)("p",{className:"mt-1 text-xs leading-5 text-text-muted",children:"Uses the same BlueRouter Root CA/dynamic leaf certificate engine as AI Traffic Gateway. The private key is never downloadable from this page."}),(0,r.jsxs)("div",{className:"mt-3 grid gap-2 text-xs",children:[(0,r.jsxs)("div",{className:"flex justify-between gap-3",children:[(0,r.jsx)("span",{className:"text-text-muted",children:"Status"}),(0,r.jsx)("span",{className:"font-medium text-text-main",children:k.certExists?"Ready":"Not generated"})]}),k.subject?(0,r.jsxs)("div",{className:"grid gap-1",children:[(0,r.jsx)("span",{className:"text-text-muted",children:"Subject"}),(0,r.jsx)("span",{className:"break-all font-mono text-[11px] text-text-main",children:k.subject})]}):null,k.fingerprint?(0,r.jsxs)("div",{className:"grid gap-1",children:[(0,r.jsx)("span",{className:"text-text-muted",children:"Public key fingerprint"}),(0,r.jsx)("span",{className:"break-all font-mono text-[11px] text-text-main",children:k.fingerprint})]}):null,k.notAfter?(0,r.jsxs)("div",{className:"flex justify-between gap-3",children:[(0,r.jsx)("span",{className:"text-text-muted",children:"Expires"}),(0,r.jsx)("span",{className:"text-text-main",children:new Date(k.notAfter).toLocaleString()})]}):null]}),(0,r.jsxs)("div",{className:"mt-4 flex flex-wrap gap-2",children:[(0,r.jsx)("button",{onClick:O,disabled:!!m||C,className:"rounded-lg border border-border px-3 py-2 text-xs font-semibold text-text-main hover:bg-background disabled:opacity-50",children:k.certExists?"Validate / Reuse CA":"Generate CA"}),(0,r.jsx)("a",{href:"/api/audit-proxy/ca?download=cert",className:`rounded-lg border border-primary/30 bg-primary/10 px-3 py-2 text-xs font-semibold text-primary ${!k.certExists?"pointer-events-none opacity-50":""}`,children:"Download Root CA"}),(0,r.jsx)(n(),{href:"/dashboard/mitm",className:"rounded-lg border border-border px-3 py-2 text-xs font-semibold text-text-main hover:bg-background",children:"Advanced CA management"})]})]}),(0,r.jsxs)("section",{className:"rounded-2xl border border-border bg-surface p-4",children:[(0,r.jsx)("h2",{className:"font-semibold text-text-main",children:"Client deployment values"}),(0,r.jsx)("p",{className:"mt-1 text-xs leading-5 text-text-muted",children:"OAuth remains on each user workstation/browser. Deploy these values through GPO, endpoint management, or the client’s managed settings; BlueRouter does not log in for users."}),(0,r.jsxs)("div",{className:"mt-3 grid gap-3",children:[(0,r.jsxs)("div",{className:"rounded-xl border border-border bg-background p-3",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,r.jsx)("span",{className:"text-xs font-semibold text-text-main",children:"Proxy URL"}),(0,r.jsx)("button",{onClick:()=>H("url",T),className:"text-xs text-primary",children:"url"===j?"Copied":"Copy"})]}),(0,r.jsx)("code",{className:"mt-1 block break-all text-xs text-text-muted",children:T})]}),(0,r.jsxs)("div",{className:"rounded-xl border border-border bg-background p-3",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,r.jsx)("span",{className:"text-xs font-semibold text-text-main",children:"Claude Code"}),(0,r.jsx)("button",{onClick:()=>H("claude",$),className:"text-xs text-primary",children:"claude"===j?"Copied":"Copy"})]}),(0,r.jsx)("pre",{className:"mt-2 overflow-x-auto whitespace-pre-wrap text-[11px] leading-5 text-text-muted",children:$})]}),(0,r.jsxs)("div",{className:"rounded-xl border border-border bg-background p-3",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,r.jsx)("span",{className:"text-xs font-semibold text-text-main",children:"Codex"}),(0,r.jsx)("button",{onClick:()=>H("codex",B),className:"text-xs text-primary",children:"codex"===j?"Copied":"Copy"})]}),(0,r.jsx)("pre",{className:"mt-2 overflow-x-auto whitespace-pre-wrap text-[11px] leading-5 text-text-muted",children:B})]})]})]})]})]}),f?(0,r.jsxs)("section",{className:`rounded-2xl border p-4 ${f.ok?"border-green-500/30 bg-green-500/5":"border-red-500/30 bg-red-500/5"}`,children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h2",{className:"font-semibold text-text-main",children:"Simulated end-to-end test"}),(0,r.jsx)("p",{className:"mt-1 text-xs text-text-muted",children:"Local throwaway TLS endpoints; no Anthropic/OpenAI credential or external API call is used."})]}),(0,r.jsxs)(o,{ok:f.ok,children:[f.passed,"/",f.total," passed \xb7 ",f.durationMs," ms"]})]}),(0,r.jsx)("div",{className:"mt-3 grid gap-2 md:grid-cols-2 xl:grid-cols-3",children:f.checks?.map(e=>(0,r.jsxs)("div",{className:"flex items-start gap-2 rounded-lg border border-border/70 bg-background/60 px-3 py-2 text-xs",children:[(0,r.jsx)("span",{className:`material-symbols-outlined text-[16px] ${e.ok?"text-green-500":"text-red-500"}`,children:e.ok?"check_circle":"error"}),(0,r.jsxs)("span",{children:[(0,r.jsx)("span",{className:"font-medium text-text-main",children:e.name}),e.detail?(0,r.jsx)("span",{className:"mt-0.5 block text-text-muted",children:e.detail}):null]})]},e.name))})]}):null,(0,r.jsxs)("section",{className:"rounded-2xl border border-border bg-surface p-4",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h2",{className:"font-semibold text-text-main",children:"Recent audit requests"}),(0,r.jsx)("p",{className:"mt-1 text-xs text-text-muted",children:"Credentials are redacted before JSONL persistence. Request/response capture is bounded by the configured limit."})]}),(0,r.jsx)("button",{onClick:()=>R("clear-logs"),disabled:!!m,className:"rounded-lg border border-border px-3 py-1.5 text-xs text-text-muted hover:bg-background disabled:opacity-50",children:"Clear logs"})]}),(0,r.jsx)("div",{className:"mt-3 overflow-x-auto",children:(0,r.jsxs)("table",{className:"w-full min-w-[900px] text-left text-xs",children:[(0,r.jsx)("thead",{className:"border-b border-border text-text-muted",children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{className:"px-2 py-2 font-medium",children:"Time"}),(0,r.jsx)("th",{className:"px-2 py-2 font-medium",children:"Client"}),(0,r.jsx)("th",{className:"px-2 py-2 font-medium",children:"Provider"}),(0,r.jsx)("th",{className:"px-2 py-2 font-medium",children:"Host"}),(0,r.jsx)("th",{className:"px-2 py-2 font-medium",children:"Model"}),(0,r.jsx)("th",{className:"px-2 py-2 font-medium",children:"Request"}),(0,r.jsx)("th",{className:"px-2 py-2 font-medium",children:"Status"}),(0,r.jsx)("th",{className:"px-2 py-2 font-medium",children:"Latency"})]})}),(0,r.jsxs)("tbody",{children:[(e?.events||[]).map(e=>(0,r.jsxs)("tr",{className:"border-b border-border/60 align-top text-text-main",children:[(0,r.jsx)("td",{className:"whitespace-nowrap px-2 py-2 text-text-muted",children:new Date(e.timestamp).toLocaleTimeString()}),(0,r.jsx)("td",{className:"px-2 py-2 font-mono text-[11px]",children:e.client?.ip||"-"}),(0,r.jsx)("td",{className:"px-2 py-2",children:e.provider||"-"}),(0,r.jsx)("td",{className:"px-2 py-2 font-mono text-[11px]",children:e.host||"-"}),(0,r.jsx)("td",{className:"px-2 py-2",children:e.model||"-"}),(0,r.jsx)("td",{className:"max-w-[280px] px-2 py-2",children:(0,r.jsxs)("details",{children:[(0,r.jsxs)("summary",{className:"cursor-pointer truncate",children:[e.method," ",e.path]}),(0,r.jsx)("pre",{className:"mt-2 max-h-64 overflow-auto whitespace-pre-wrap rounded-lg bg-background p-2 text-[10px] leading-4 text-text-muted",children:JSON.stringify({request:e.request,response:e.response,error:e.error},null,2)})]})}),(0,r.jsx)("td",{className:"px-2 py-2",children:e.status||"ERR"}),(0,r.jsxs)("td",{className:"whitespace-nowrap px-2 py-2",children:[e.durationMs??"-"," ms"]})]},e.id)),e?.events?.length?null:(0,r.jsx)("tr",{children:(0,r.jsx)("td",{colSpan:"8",className:"px-2 py-8 text-center text-text-muted",children:"No audited requests yet."})})]})]})})]})]})}},97157:(e,t,s)=>{Promise.resolve().then(s.bind(s,31874))}},e=>{e.O(0,[8500,8441,3794,7358],()=>e(e.s=97157)),_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,9893,9959,1997,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,[8991,3862,9893,9959,8500,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,[8991,3862,9893,9959,1997,5772,5564,5263,7033,5497,4525,8441,3794,7358],()=>e(e.s=22843)),_N_E=e.O()}]);
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,[8991,3862,9893,9959,8500,7050,5772,5564,5263,7033,5497,4525,8441,3794,7358],()=>e(e.s=22843)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4845],{9385:(e,t,l)=>{"use strict";l.d(t,{Ek:()=>h,FY:()=>b,H1:()=>p,O0:()=>n,Zn:()=>j,cL:()=>g,j5:()=>u,pA:()=>o,u1:()=>f});let o=["coder","fast","thinking"],r=["claude","codex"],a={claude:"claude/",codex:"codex/"},d={coder:{model:"",contextWindow:0},fast:{model:"",contextWindow:0},thinking:{model:"",contextWindow:0}},n={version:2,local:{enabled:!0,providerName:"Local AI",autoCompactPct:75,models:{coder:{model:"programmer",contextWindow:12e4},fast:{model:"programmer-fast",contextWindow:12e4},thinking:{model:"programmer",contextWindow:12e4}}},cloud:{claude:{enabled:!1,providerName:"Claude Code Cloud",models:d},codex:{enabled:!1,providerName:"Codex Cloud",models:d}}};function s(e,t=300){return String(e??"").trim().slice(0,t)}function c(e,t){let l=Number(e);return!Number.isFinite(l)||l<=0?t:Math.floor(l)}function i(e,t=75){let l=Number(e);return Number.isFinite(l)?Math.min(100,Math.max(1,Math.floor(l))):t}function m(e,t,{local:l}){let r=e&&"object"==typeof e&&!Array.isArray(e)?e:{},a=r.models&&"object"==typeof r.models&&!Array.isArray(r.models)?r.models:{},d={};for(let e of o)d[e]=function(e,t,{local:l}){let o=e&&"object"==typeof e&&!Array.isArray(e)?e:{};return{model:s(Object.prototype.hasOwnProperty.call(o,"model")?o.model:t.model),contextWindow:l?c(o.contextWindow,t.contextWindow||12e4):0}}(a[e],t.models[e],{local:l});let n={enabled:Object.prototype.hasOwnProperty.call(r,"enabled")?!0===r.enabled:t.enabled,providerName:s(Object.prototype.hasOwnProperty.call(r,"providerName")?r.providerName:t.providerName,80)||t.providerName,models:d};return l&&(n.autoCompactPct=i(r.autoCompactPct,t.autoCompactPct)),n}function x(e,t){if(!e||"object"!=typeof e||Array.isArray(e)||e.claude||e.codex)return null;let l=e.models&&"object"==typeof e.models&&!Array.isArray(e.models)?e.models:{},r=o.map(e=>s(l?.[e]?.model)).filter(Boolean),d=a[t];return d&&0!==r.length&&r.every(e=>e.startsWith(d))?e:null}function u(e={}){let t=e&&"object"==typeof e&&!Array.isArray(e)?e:{},l=t.cloud&&"object"==typeof t.cloud&&!Array.isArray(t.cloud)?t.cloud:{};return{version:2,local:m(t.local,n.local,{local:!0}),cloud:{claude:m(l.claude||x(l,"claude"),n.cloud.claude,{local:!1}),codex:m(l.codex||x(l,"codex"),n.cloud.codex,{local:!1})}}}function h(e,t){return r.includes(t)&&e?.cloud?.[t]||null}function p(e){return a[e]||""}function g(e,t,l=""){return s(e?.models?.[t]?.model)||l}function f(e,t,l=12e4){return c(e?.models?.[t]?.contextWindow,l)}function b(e){return[...new Set(o.map(t=>g(e,t)).filter(Boolean))]}function j(e){return Math.max(1,Math.floor(f(e,"coder")*i(e?.autoCompactPct)/100))}},59305:(e,t,l)=>{"use strict";l.d(t,{default:()=>b});var o=l(95155),r=l(98500),a=l.n(r),d=l(12115),n=l(35497),s=l(94027),c=l(9385);let i={coder:{label:"Coder",hint:"Model ch\xednh cho coding/generation."},fast:{label:"Fast",hint:"Model nhanh cho explorer/small/haiku profile."},thinking:{label:"Thinking",hint:"Model reasoning/opus/thinking profile."}},m={claude:{title:"Claude Code Cloud Settings",badge:"Claude Code",description:"D\xf9ng route model claude/. Catalog chỉ để gợi \xfd; admin kh\xf4ng cần c\xf3 Claude Personal Auth ri\xeang."},codex:{title:"Codex Cloud Settings",badge:"Codex",description:"D\xf9ng route model codex/. Catalog chỉ để gợi \xfd; admin kh\xf4ng cần c\xf3 Codex Personal Auth ri\xeang."}};function x(e){return JSON.parse(JSON.stringify((0,c.j5)(e)))}function u({role:e,value:t,contextWindow:l,onModelChange:r,onContextChange:a}){let d=i[e];return(0,o.jsxs)("div",{className:"rounded-xl border border-border bg-background p-3",children:[(0,o.jsxs)("div",{className:"mb-2",children:[(0,o.jsx)("div",{className:"text-sm font-medium text-text-main",children:d.label}),(0,o.jsx)("div",{className:"text-xs text-text-muted",children:d.hint})]}),(0,o.jsxs)("div",{className:"grid gap-3 sm:grid-cols-[minmax(0,1fr)_170px]",children:[(0,o.jsxs)("label",{children:[(0,o.jsx)("span",{className:"mb-1 block text-xs font-medium text-text-muted",children:"Local model ID / alias"}),(0,o.jsx)("input",{list:"cli-local-model-catalog",value:t||"",onChange:e=>r(e.target.value),placeholder:"coder"===e?"programmer":"fast"===e?"programmer-fast":"programmer-thinking",className:"w-full rounded-xl border border-border bg-surface px-3 py-2 font-mono text-sm text-text-main outline-none focus:border-primary"})]}),(0,o.jsxs)("label",{children:[(0,o.jsx)("span",{className:"mb-1 block text-xs font-medium text-text-muted",children:"Max context"}),(0,o.jsx)("input",{type:"number",min:"1",max:"10000000",value:l||"",onChange:e=>a(e.target.value),className:"w-full rounded-xl border border-border bg-surface px-3 py-2 text-sm text-text-main outline-none focus:border-primary"})]})]})]})}function h({profile:e,setProfiles:t}){let l=e=>t(t=>({...t,local:{...t.local,...e}})),r=(e,l)=>t(t=>({...t,local:{...t.local,models:{...t.local.models,[e]:{...t.local.models[e],...l}}}}));return(0,o.jsx)(n.Zp,{children:(0,o.jsxs)("div",{className:"space-y-4",children:[(0,o.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,o.jsxs)("div",{children:[(0,o.jsxs)("div",{className:"flex items-center gap-2",children:[(0,o.jsx)("span",{className:"rounded-full border border-border bg-surface px-2 py-1 text-[11px] font-medium uppercase tracking-wide text-text-muted",children:"Local"}),(0,o.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Shared Local AI Settings"})]}),(0,o.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"D\xf9ng chung cho Claude Code, Codex, OpenCode v\xe0 Qwen Code. Context/auto-compact chỉ sinh v\xe0o CLI config, kh\xf4ng đổi runtime routing."})]}),(0,o.jsxs)("label",{className:"inline-flex items-center gap-2 text-sm text-text-main",children:[(0,o.jsx)("input",{type:"checkbox",checked:!0===e.enabled,onChange:e=>l({enabled:e.target.checked}),className:"size-4"}),"Enabled"]})]}),(0,o.jsxs)("label",{className:"block",children:[(0,o.jsx)("span",{className:"mb-1 block text-xs font-medium text-text-muted",children:"T\xean profile hiển thị"}),(0,o.jsx)("input",{value:e.providerName||"",onChange:e=>l({providerName:e.target.value}),placeholder:"Local AI",className:"w-full rounded-xl border border-border bg-background px-3 py-2 text-sm text-text-main outline-none focus:border-primary"})]}),(0,o.jsx)("div",{className:"space-y-3",children:c.pA.map(t=>(0,o.jsx)(u,{role:t,value:e.models?.[t]?.model,contextWindow:e.models?.[t]?.contextWindow,onModelChange:e=>r(t,{model:e}),onContextChange:e=>r(t,{contextWindow:e})},t))}),(0,o.jsx)("div",{className:"rounded-xl border border-border bg-background p-3",children:(0,o.jsxs)("div",{className:"grid gap-3 sm:grid-cols-[180px_minmax(0,1fr)] sm:items-end",children:[(0,o.jsxs)("label",{children:[(0,o.jsx)("span",{className:"mb-1 block text-xs font-medium text-text-muted",children:"Auto compact %"}),(0,o.jsx)("input",{type:"number",min:"1",max:"100",value:e.autoCompactPct||75,onChange:e=>l({autoCompactPct:e.target.value}),className:"w-full rounded-xl border border-border bg-surface px-3 py-2 text-sm text-text-main outline-none focus:border-primary"})]}),(0,o.jsxs)("div",{className:"rounded-xl border border-border bg-surface px-3 py-2 text-sm text-text-muted",children:["Derived Codex compact limit: ",(0,o.jsx)("span",{className:"font-mono font-medium text-text-main",children:(0,c.Zn)(e).toLocaleString()})," tokens."]})]})})]})})}function p({tool:e,role:t,value:l,onChange:r}){let a=i[t],d=(0,c.H1)(e);return(0,o.jsxs)("label",{className:"block rounded-xl border border-border bg-background p-3",children:[(0,o.jsx)("span",{className:"block text-sm font-medium text-text-main",children:a.label}),(0,o.jsx)("span",{className:"mb-2 block text-xs text-text-muted",children:"coder"===t?`${a.hint} Nhập hoặc chọn model ${d}.`:`${a.hint} Để trống = d\xf9ng Coder.`}),(0,o.jsx)("input",{list:`cli-cloud-${e}-catalog`,value:l||"",onChange:e=>r(e.target.value),placeholder:"coder"===t?`${d}...`:"Để trống = d\xf9ng Coder",className:"w-full rounded-xl border border-border bg-surface px-3 py-2 font-mono text-sm text-text-main outline-none focus:border-primary"})]})}function g({tool:e,profile:t,options:l,catalogWarning:r,setProfiles:a}){let d=m[e],s=(0,c.H1)(e);return(0,o.jsx)(n.Zp,{children:(0,o.jsxs)("div",{className:"space-y-4",children:[(0,o.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,o.jsxs)("div",{children:[(0,o.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,o.jsx)("span",{className:"rounded-full border border-border bg-surface px-2 py-1 text-[11px] font-medium uppercase tracking-wide text-text-muted",children:"Cloud"}),(0,o.jsx)("span",{className:"rounded-full border border-primary/20 bg-primary/5 px-2 py-1 text-[11px] font-medium text-primary",children:d.badge}),(0,o.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:d.title})]}),(0,o.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:d.description})]}),(0,o.jsxs)("label",{className:"inline-flex items-center gap-2 text-sm text-text-main",children:[(0,o.jsx)("input",{type:"checkbox",checked:!0===t.enabled,onChange:t=>{let l;return l={enabled:t.target.checked},a(t=>({...t,cloud:{...t.cloud,[e]:{...t.cloud[e],...l}}}))},className:"size-4"}),"Enabled"]})]}),(0,o.jsxs)("div",{className:"rounded-xl border border-blue-500/20 bg-blue-500/5 p-3 text-xs text-text-muted",children:["C\xf3 ",l.length," model ",(0,o.jsx)("span",{className:"font-mono",children:s})," gợi \xfd từ catalog hệ thống + model đ\xe3 import của mọi Personal Cloud account. Admin c\xf3 thể nhập trực tiếp model ",(0,o.jsxs)("span",{className:"font-mono",children:[s,"..."]})," chưa c\xf3 trong danh s\xe1ch; kh\xf4ng phụ thuộc Personal Auth của ch\xednh admin."]}),r?(0,o.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:[r," Vẫn c\xf3 thể nhập model cloud thủ c\xf4ng đ\xfang prefix v\xe0 lưu settings."]}):null,(0,o.jsx)("div",{className:"space-y-3",children:c.pA.map(l=>(0,o.jsx)(p,{tool:e,role:l,value:t.models?.[l]?.model||"",onChange:t=>{let o;return o={model:t},a(t=>({...t,cloud:{...t.cloud,[e]:{...t.cloud[e],models:{...t.cloud[e].models,[l]:{...t.cloud[e].models[l],...o}}}}}))}},l))})]})})}function f({title:e,profile:t}){return(0,o.jsxs)("div",{className:"rounded-xl border border-border bg-background p-3 text-sm",children:[(0,o.jsxs)("div",{className:"font-medium text-text-main",children:[e," \xb7 ",t.providerName," \xb7 ",t.enabled?"enabled":"disabled"]}),(0,o.jsxs)("div",{className:"mt-2 space-y-1 font-mono text-xs text-text-muted",children:[(0,o.jsxs)("div",{children:["coder = ",t.models.coder.model||"—"]}),(0,o.jsxs)("div",{children:["fast = ",t.models.fast.model||"coder"]}),(0,o.jsxs)("div",{children:["thinking = ",t.models.thinking.model||"coder"]})]})]})}function b(){let[e,t]=(0,d.useState)(()=>x(c.O0)),[l,r]=(0,d.useState)([]),[i,u]=(0,d.useState)({claude:[],codex:[]}),[p,b]=(0,d.useState)(""),[j,N]=(0,d.useState)(!0),[v,y]=(0,d.useState)(!1),[C,k]=(0,d.useState)(""),[w,A]=(0,d.useState)(""),{isAdmin:S,isMonitorAdmin:P,canManageApiKeys:L}=(0,s.s)(),M=S||P||L;(0,d.useEffect)(()=>{let e=!1;return Promise.allSettled([fetch("/api/cli-model-profiles",{cache:"no-store"}).then(async e=>{let t=await e.json().catch(()=>({}));if(!e.ok)throw Error(t.error||"Kh\xf4ng tải được CLI Model Profiles");return t.profiles}),fetch("/api/models",{cache:"no-store"}).then(async e=>e.ok&&(await e.json().catch(()=>({}))).models||[]),fetch("/api/cli-model-profiles/cloud-models",{cache:"no-store"}).then(async e=>{let t=await e.json().catch(()=>({}));if(!e.ok)throw Error(t.error||"Kh\xf4ng tải được cloud model catalog");return t.models||{}})]).then(([l,o,a])=>{e||("fulfilled"===l.status?t(x(l.value)):A(l.reason?.message||"Kh\xf4ng tải được CLI Model Profiles"),"fulfilled"===o.status&&r(function(e){let t=[];for(let l of Array.isArray(e)?e:[])for(let e of[l?.fullModel,l?.alias,l?.model]){let l=String(e||"").trim();l&&t.push(l)}return[...new Set(t)].sort((e,t)=>e.localeCompare(t))}(o.value)),"fulfilled"===a.status?u(function(e){let t={claude:[],codex:[]};for(let l of Object.keys(t)){let o=(0,c.H1)(l);t[l]=[...new Set((Array.isArray(e?.[l])?e[l]:[]).map(e=>String(e||"").trim()).filter(e=>e.startsWith(o)))].sort((e,t)=>e.localeCompare(t))}return t}(a.value)):b(a.reason?.message||"Kh\xf4ng tải được cloud model catalog."),N(!1))}),()=>{e=!0}},[]);let I=(0,d.useMemo)(()=>(0,c.j5)(e),[e]),W=async()=>{if(M){y(!0),A(""),k("");try{let l=(()=>{for(let e of["claude","codex"]){let t=I.cloud[e];if(!t.enabled)continue;let l=(0,c.H1)(e);if(!String(t.models?.coder?.model||"").trim())return`${m[e].badge}: cần nhập Coder model.`;for(let o of c.pA){let r=String(t.models?.[o]?.model||"").trim();if(r&&!r.startsWith(l))return`${m[e].badge}: ${o} model phải bắt đầu bằng ${l}`}}return""})();if(l)throw Error(l);let o=await fetch("/api/cli-model-profiles",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({profiles:e})}),r=await o.json().catch(()=>({}));if(!o.ok)throw Error(r.error||"Kh\xf4ng lưu được CLI Model Profiles");t(x(r.profiles)),k("Đ\xe3 lưu. Cloud model mapping kh\xf4ng c\xf2n phụ thuộc Personal Auth của admin.")}catch(e){A(e.message||"Kh\xf4ng lưu được CLI Model Profiles")}finally{y(!1)}}};return j?(0,o.jsx)("div",{className:"rounded-2xl border border-dashed border-border p-8 text-center text-sm text-text-muted",children:"Đang tải CLI Model Settings..."}):M?(0,o.jsxs)("div",{className:"mx-auto w-full max-w-6xl space-y-5",children:[(0,o.jsx)("datalist",{id:"cli-local-model-catalog",children:l.map(e=>(0,o.jsx)("option",{value:e},e))}),(0,o.jsx)("datalist",{id:"cli-cloud-claude-catalog",children:i.claude.map(e=>(0,o.jsx)("option",{value:e},e))}),(0,o.jsx)("datalist",{id:"cli-cloud-codex-catalog",children:i.codex.map(e=>(0,o.jsx)("option",{value:e},e))}),(0,o.jsxs)("div",{className:"flex flex-col gap-3 lg:flex-row lg:items-start lg:justify-between",children:[(0,o.jsxs)("div",{children:[(0,o.jsxs)("div",{className:"flex items-center gap-2 text-sm text-text-muted",children:[(0,o.jsx)(a(),{href:"/dashboard/cli-tools",className:"hover:text-primary",children:"CLI Tools"}),(0,o.jsx)("span",{children:"/"}),(0,o.jsx)("span",{children:"Model Settings"})]}),(0,o.jsx)("h1",{className:"mt-1 text-2xl font-semibold text-text-main",children:"CLI Model Settings"}),(0,o.jsxs)("p",{className:"mt-1 max-w-4xl text-sm text-text-muted",children:["Local profile d\xf9ng chung cho 4 CLI. Cloud profile l\xe0 global admin setting: Claude Code chỉ d\xf9ng ",(0,o.jsx)("span",{className:"font-mono",children:"claude/"}),", Codex chỉ d\xf9ng ",(0,o.jsx)("span",{className:"font-mono",children:"codex/"}),". Việc cấu h\xecnh kh\xf4ng y\xeau cầu admin phải c\xf3 Personal Auth."]})]}),(0,o.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,o.jsx)(n.$n,{variant:"outline",onClick:()=>{t(x(c.O0)),k(""),A("")},children:"Reset form"}),(0,o.jsx)(n.$n,{onClick:W,disabled:v,children:v?"Đang lưu...":"Lưu settings"})]})]}),(0,o.jsx)("div",{className:"rounded-xl border border-blue-500/20 bg-blue-500/5 p-3 text-sm text-text-muted",children:"Setting n\xe0y chỉ sinh config/hướng dẫn CLI ở Dashboard. Kh\xf4ng thay đổi request handling, runtime model routing, provider routing, combo, circuit breaker hay load balancing."}),(0,o.jsxs)("div",{className:"rounded-xl border border-border bg-surface/50 p-3 text-xs text-text-muted",children:["Cloud catalog hiện gợi \xfd ",(0,o.jsxs)("span",{className:"font-medium text-text-main",children:[i.claude.length," model claude/"]})," v\xe0 ",(0,o.jsxs)("span",{className:"font-medium text-text-main",children:[i.codex.length," model codex/"]}),". Danh s\xe1ch được hợp nhất từ provider catalog + model đ\xe3 import tr\xean to\xe0n bộ Personal Cloud connections; đ\xe2y chỉ l\xe0 gợi \xfd, kh\xf4ng phải điều kiện để admin lưu mapping."]}),w?(0,o.jsx)("div",{className:"rounded-xl border border-red-500/30 bg-red-500/10 p-3 text-sm text-red-600",children:w}):null,C?(0,o.jsx)("div",{className:"rounded-xl border border-emerald-500/30 bg-emerald-500/10 p-3 text-sm text-emerald-700 dark:text-emerald-300",children:C}):null,(0,o.jsx)(h,{profile:e.local,setProfiles:t}),(0,o.jsxs)("div",{className:"grid gap-5 xl:grid-cols-2",children:[(0,o.jsx)(g,{tool:"claude",profile:e.cloud.claude,options:i.claude,catalogWarning:p,setProfiles:t}),(0,o.jsx)(g,{tool:"codex",profile:e.cloud.codex,options:i.codex,catalogWarning:p,setProfiles:t})]}),(0,o.jsx)(n.Zp,{children:(0,o.jsxs)("div",{className:"space-y-3",children:[(0,o.jsx)("h2",{className:"font-semibold text-text-main",children:"Preview resolved mapping"}),(0,o.jsxs)("div",{className:"grid gap-4 lg:grid-cols-3",children:[(0,o.jsx)(f,{title:"Local \xb7 all CLI",profile:I.local}),(0,o.jsx)(f,{title:"Cloud \xb7 Claude Code",profile:I.cloud.claude}),(0,o.jsx)(f,{title:"Cloud \xb7 Codex",profile:I.cloud.codex})]})]})})]}):(0,o.jsx)(n.Zp,{children:(0,o.jsxs)("div",{className:"space-y-3",children:[(0,o.jsx)("h1",{className:"text-xl font-semibold text-text-main",children:"CLI Model Settings"}),(0,o.jsx)("p",{className:"text-sm text-text-muted",children:"Chỉ admin/API-key admin được thay đổi CLI model mapping."}),(0,o.jsx)(a(),{href:"/dashboard/cli-tools",className:"text-sm font-medium text-primary hover:underline",children:"← Quay lại CLI Tools"})]})})}},91011:(e,t,l)=>{Promise.resolve().then(l.bind(l,59305))}},e=>{e.O(0,[8991,3862,9893,9959,1997,5564,5263,7033,5497,8441,3794,7358],()=>e(e.s=91011)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4845],{9385:(e,t,l)=>{"use strict";l.d(t,{Ek:()=>h,FY:()=>b,H1:()=>p,O0:()=>n,Zn:()=>j,cL:()=>g,j5:()=>u,pA:()=>o,u1:()=>f});let o=["coder","fast","thinking"],r=["claude","codex"],a={claude:"claude/",codex:"codex/"},d={coder:{model:"",contextWindow:0},fast:{model:"",contextWindow:0},thinking:{model:"",contextWindow:0}},n={version:2,local:{enabled:!0,providerName:"Local AI",autoCompactPct:75,models:{coder:{model:"programmer",contextWindow:12e4},fast:{model:"programmer-fast",contextWindow:12e4},thinking:{model:"programmer",contextWindow:12e4}}},cloud:{claude:{enabled:!1,providerName:"Claude Code Cloud",models:d},codex:{enabled:!1,providerName:"Codex Cloud",models:d}}};function s(e,t=300){return String(e??"").trim().slice(0,t)}function c(e,t){let l=Number(e);return!Number.isFinite(l)||l<=0?t:Math.floor(l)}function i(e,t=75){let l=Number(e);return Number.isFinite(l)?Math.min(100,Math.max(1,Math.floor(l))):t}function m(e,t,{local:l}){let r=e&&"object"==typeof e&&!Array.isArray(e)?e:{},a=r.models&&"object"==typeof r.models&&!Array.isArray(r.models)?r.models:{},d={};for(let e of o)d[e]=function(e,t,{local:l}){let o=e&&"object"==typeof e&&!Array.isArray(e)?e:{};return{model:s(Object.prototype.hasOwnProperty.call(o,"model")?o.model:t.model),contextWindow:l?c(o.contextWindow,t.contextWindow||12e4):0}}(a[e],t.models[e],{local:l});let n={enabled:Object.prototype.hasOwnProperty.call(r,"enabled")?!0===r.enabled:t.enabled,providerName:s(Object.prototype.hasOwnProperty.call(r,"providerName")?r.providerName:t.providerName,80)||t.providerName,models:d};return l&&(n.autoCompactPct=i(r.autoCompactPct,t.autoCompactPct)),n}function x(e,t){if(!e||"object"!=typeof e||Array.isArray(e)||e.claude||e.codex)return null;let l=e.models&&"object"==typeof e.models&&!Array.isArray(e.models)?e.models:{},r=o.map(e=>s(l?.[e]?.model)).filter(Boolean),d=a[t];return d&&0!==r.length&&r.every(e=>e.startsWith(d))?e:null}function u(e={}){let t=e&&"object"==typeof e&&!Array.isArray(e)?e:{},l=t.cloud&&"object"==typeof t.cloud&&!Array.isArray(t.cloud)?t.cloud:{};return{version:2,local:m(t.local,n.local,{local:!0}),cloud:{claude:m(l.claude||x(l,"claude"),n.cloud.claude,{local:!1}),codex:m(l.codex||x(l,"codex"),n.cloud.codex,{local:!1})}}}function h(e,t){return r.includes(t)&&e?.cloud?.[t]||null}function p(e){return a[e]||""}function g(e,t,l=""){return s(e?.models?.[t]?.model)||l}function f(e,t,l=12e4){return c(e?.models?.[t]?.contextWindow,l)}function b(e){return[...new Set(o.map(t=>g(e,t)).filter(Boolean))]}function j(e){return Math.max(1,Math.floor(f(e,"coder")*i(e?.autoCompactPct)/100))}},59305:(e,t,l)=>{"use strict";l.d(t,{default:()=>b});var o=l(95155),r=l(98500),a=l.n(r),d=l(12115),n=l(35497),s=l(94027),c=l(9385);let i={coder:{label:"Coder",hint:"Model ch\xednh cho coding/generation."},fast:{label:"Fast",hint:"Model nhanh cho explorer/small/haiku profile."},thinking:{label:"Thinking",hint:"Model reasoning/opus/thinking profile."}},m={claude:{title:"Claude Code Cloud Settings",badge:"Claude Code",description:"D\xf9ng route model claude/. Catalog chỉ để gợi \xfd; admin kh\xf4ng cần c\xf3 Claude Personal Auth ri\xeang."},codex:{title:"Codex Cloud Settings",badge:"Codex",description:"D\xf9ng route model codex/. Catalog chỉ để gợi \xfd; admin kh\xf4ng cần c\xf3 Codex Personal Auth ri\xeang."}};function x(e){return JSON.parse(JSON.stringify((0,c.j5)(e)))}function u({role:e,value:t,contextWindow:l,onModelChange:r,onContextChange:a}){let d=i[e];return(0,o.jsxs)("div",{className:"rounded-xl border border-border bg-background p-3",children:[(0,o.jsxs)("div",{className:"mb-2",children:[(0,o.jsx)("div",{className:"text-sm font-medium text-text-main",children:d.label}),(0,o.jsx)("div",{className:"text-xs text-text-muted",children:d.hint})]}),(0,o.jsxs)("div",{className:"grid gap-3 sm:grid-cols-[minmax(0,1fr)_170px]",children:[(0,o.jsxs)("label",{children:[(0,o.jsx)("span",{className:"mb-1 block text-xs font-medium text-text-muted",children:"Local model ID / alias"}),(0,o.jsx)("input",{list:"cli-local-model-catalog",value:t||"",onChange:e=>r(e.target.value),placeholder:"coder"===e?"programmer":"fast"===e?"programmer-fast":"programmer-thinking",className:"w-full rounded-xl border border-border bg-surface px-3 py-2 font-mono text-sm text-text-main outline-none focus:border-primary"})]}),(0,o.jsxs)("label",{children:[(0,o.jsx)("span",{className:"mb-1 block text-xs font-medium text-text-muted",children:"Max context"}),(0,o.jsx)("input",{type:"number",min:"1",max:"10000000",value:l||"",onChange:e=>a(e.target.value),className:"w-full rounded-xl border border-border bg-surface px-3 py-2 text-sm text-text-main outline-none focus:border-primary"})]})]})]})}function h({profile:e,setProfiles:t}){let l=e=>t(t=>({...t,local:{...t.local,...e}})),r=(e,l)=>t(t=>({...t,local:{...t.local,models:{...t.local.models,[e]:{...t.local.models[e],...l}}}}));return(0,o.jsx)(n.Zp,{children:(0,o.jsxs)("div",{className:"space-y-4",children:[(0,o.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,o.jsxs)("div",{children:[(0,o.jsxs)("div",{className:"flex items-center gap-2",children:[(0,o.jsx)("span",{className:"rounded-full border border-border bg-surface px-2 py-1 text-[11px] font-medium uppercase tracking-wide text-text-muted",children:"Local"}),(0,o.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Shared Local AI Settings"})]}),(0,o.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"D\xf9ng chung cho Claude Code, Codex, OpenCode v\xe0 Qwen Code. Context/auto-compact chỉ sinh v\xe0o CLI config, kh\xf4ng đổi runtime routing."})]}),(0,o.jsxs)("label",{className:"inline-flex items-center gap-2 text-sm text-text-main",children:[(0,o.jsx)("input",{type:"checkbox",checked:!0===e.enabled,onChange:e=>l({enabled:e.target.checked}),className:"size-4"}),"Enabled"]})]}),(0,o.jsxs)("label",{className:"block",children:[(0,o.jsx)("span",{className:"mb-1 block text-xs font-medium text-text-muted",children:"T\xean profile hiển thị"}),(0,o.jsx)("input",{value:e.providerName||"",onChange:e=>l({providerName:e.target.value}),placeholder:"Local AI",className:"w-full rounded-xl border border-border bg-background px-3 py-2 text-sm text-text-main outline-none focus:border-primary"})]}),(0,o.jsx)("div",{className:"space-y-3",children:c.pA.map(t=>(0,o.jsx)(u,{role:t,value:e.models?.[t]?.model,contextWindow:e.models?.[t]?.contextWindow,onModelChange:e=>r(t,{model:e}),onContextChange:e=>r(t,{contextWindow:e})},t))}),(0,o.jsx)("div",{className:"rounded-xl border border-border bg-background p-3",children:(0,o.jsxs)("div",{className:"grid gap-3 sm:grid-cols-[180px_minmax(0,1fr)] sm:items-end",children:[(0,o.jsxs)("label",{children:[(0,o.jsx)("span",{className:"mb-1 block text-xs font-medium text-text-muted",children:"Auto compact %"}),(0,o.jsx)("input",{type:"number",min:"1",max:"100",value:e.autoCompactPct||75,onChange:e=>l({autoCompactPct:e.target.value}),className:"w-full rounded-xl border border-border bg-surface px-3 py-2 text-sm text-text-main outline-none focus:border-primary"})]}),(0,o.jsxs)("div",{className:"rounded-xl border border-border bg-surface px-3 py-2 text-sm text-text-muted",children:["Derived Codex compact limit: ",(0,o.jsx)("span",{className:"font-mono font-medium text-text-main",children:(0,c.Zn)(e).toLocaleString()})," tokens."]})]})})]})})}function p({tool:e,role:t,value:l,onChange:r}){let a=i[t],d=(0,c.H1)(e);return(0,o.jsxs)("label",{className:"block rounded-xl border border-border bg-background p-3",children:[(0,o.jsx)("span",{className:"block text-sm font-medium text-text-main",children:a.label}),(0,o.jsx)("span",{className:"mb-2 block text-xs text-text-muted",children:"coder"===t?`${a.hint} Nhập hoặc chọn model ${d}.`:`${a.hint} Để trống = d\xf9ng Coder.`}),(0,o.jsx)("input",{list:`cli-cloud-${e}-catalog`,value:l||"",onChange:e=>r(e.target.value),placeholder:"coder"===t?`${d}...`:"Để trống = d\xf9ng Coder",className:"w-full rounded-xl border border-border bg-surface px-3 py-2 font-mono text-sm text-text-main outline-none focus:border-primary"})]})}function g({tool:e,profile:t,options:l,catalogWarning:r,setProfiles:a}){let d=m[e],s=(0,c.H1)(e);return(0,o.jsx)(n.Zp,{children:(0,o.jsxs)("div",{className:"space-y-4",children:[(0,o.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,o.jsxs)("div",{children:[(0,o.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,o.jsx)("span",{className:"rounded-full border border-border bg-surface px-2 py-1 text-[11px] font-medium uppercase tracking-wide text-text-muted",children:"Cloud"}),(0,o.jsx)("span",{className:"rounded-full border border-primary/20 bg-primary/5 px-2 py-1 text-[11px] font-medium text-primary",children:d.badge}),(0,o.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:d.title})]}),(0,o.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:d.description})]}),(0,o.jsxs)("label",{className:"inline-flex items-center gap-2 text-sm text-text-main",children:[(0,o.jsx)("input",{type:"checkbox",checked:!0===t.enabled,onChange:t=>{let l;return l={enabled:t.target.checked},a(t=>({...t,cloud:{...t.cloud,[e]:{...t.cloud[e],...l}}}))},className:"size-4"}),"Enabled"]})]}),(0,o.jsxs)("div",{className:"rounded-xl border border-blue-500/20 bg-blue-500/5 p-3 text-xs text-text-muted",children:["C\xf3 ",l.length," model ",(0,o.jsx)("span",{className:"font-mono",children:s})," gợi \xfd từ catalog hệ thống + model đ\xe3 import của mọi Personal Cloud account. Admin c\xf3 thể nhập trực tiếp model ",(0,o.jsxs)("span",{className:"font-mono",children:[s,"..."]})," chưa c\xf3 trong danh s\xe1ch; kh\xf4ng phụ thuộc Personal Auth của ch\xednh admin."]}),r?(0,o.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:[r," Vẫn c\xf3 thể nhập model cloud thủ c\xf4ng đ\xfang prefix v\xe0 lưu settings."]}):null,(0,o.jsx)("div",{className:"space-y-3",children:c.pA.map(l=>(0,o.jsx)(p,{tool:e,role:l,value:t.models?.[l]?.model||"",onChange:t=>{let o;return o={model:t},a(t=>({...t,cloud:{...t.cloud,[e]:{...t.cloud[e],models:{...t.cloud[e].models,[l]:{...t.cloud[e].models[l],...o}}}}}))}},l))})]})})}function f({title:e,profile:t}){return(0,o.jsxs)("div",{className:"rounded-xl border border-border bg-background p-3 text-sm",children:[(0,o.jsxs)("div",{className:"font-medium text-text-main",children:[e," \xb7 ",t.providerName," \xb7 ",t.enabled?"enabled":"disabled"]}),(0,o.jsxs)("div",{className:"mt-2 space-y-1 font-mono text-xs text-text-muted",children:[(0,o.jsxs)("div",{children:["coder = ",t.models.coder.model||"—"]}),(0,o.jsxs)("div",{children:["fast = ",t.models.fast.model||"coder"]}),(0,o.jsxs)("div",{children:["thinking = ",t.models.thinking.model||"coder"]})]})]})}function b(){let[e,t]=(0,d.useState)(()=>x(c.O0)),[l,r]=(0,d.useState)([]),[i,u]=(0,d.useState)({claude:[],codex:[]}),[p,b]=(0,d.useState)(""),[j,N]=(0,d.useState)(!0),[v,y]=(0,d.useState)(!1),[C,k]=(0,d.useState)(""),[w,A]=(0,d.useState)(""),{isAdmin:S,isMonitorAdmin:P,canManageApiKeys:L}=(0,s.s)(),M=S||P||L;(0,d.useEffect)(()=>{let e=!1;return Promise.allSettled([fetch("/api/cli-model-profiles",{cache:"no-store"}).then(async e=>{let t=await e.json().catch(()=>({}));if(!e.ok)throw Error(t.error||"Kh\xf4ng tải được CLI Model Profiles");return t.profiles}),fetch("/api/models",{cache:"no-store"}).then(async e=>e.ok&&(await e.json().catch(()=>({}))).models||[]),fetch("/api/cli-model-profiles/cloud-models",{cache:"no-store"}).then(async e=>{let t=await e.json().catch(()=>({}));if(!e.ok)throw Error(t.error||"Kh\xf4ng tải được cloud model catalog");return t.models||{}})]).then(([l,o,a])=>{e||("fulfilled"===l.status?t(x(l.value)):A(l.reason?.message||"Kh\xf4ng tải được CLI Model Profiles"),"fulfilled"===o.status&&r(function(e){let t=[];for(let l of Array.isArray(e)?e:[])for(let e of[l?.fullModel,l?.alias,l?.model]){let l=String(e||"").trim();l&&t.push(l)}return[...new Set(t)].sort((e,t)=>e.localeCompare(t))}(o.value)),"fulfilled"===a.status?u(function(e){let t={claude:[],codex:[]};for(let l of Object.keys(t)){let o=(0,c.H1)(l);t[l]=[...new Set((Array.isArray(e?.[l])?e[l]:[]).map(e=>String(e||"").trim()).filter(e=>e.startsWith(o)))].sort((e,t)=>e.localeCompare(t))}return t}(a.value)):b(a.reason?.message||"Kh\xf4ng tải được cloud model catalog."),N(!1))}),()=>{e=!0}},[]);let I=(0,d.useMemo)(()=>(0,c.j5)(e),[e]),W=async()=>{if(M){y(!0),A(""),k("");try{let l=(()=>{for(let e of["claude","codex"]){let t=I.cloud[e];if(!t.enabled)continue;let l=(0,c.H1)(e);if(!String(t.models?.coder?.model||"").trim())return`${m[e].badge}: cần nhập Coder model.`;for(let o of c.pA){let r=String(t.models?.[o]?.model||"").trim();if(r&&!r.startsWith(l))return`${m[e].badge}: ${o} model phải bắt đầu bằng ${l}`}}return""})();if(l)throw Error(l);let o=await fetch("/api/cli-model-profiles",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({profiles:e})}),r=await o.json().catch(()=>({}));if(!o.ok)throw Error(r.error||"Kh\xf4ng lưu được CLI Model Profiles");t(x(r.profiles)),k("Đ\xe3 lưu. Cloud model mapping kh\xf4ng c\xf2n phụ thuộc Personal Auth của admin.")}catch(e){A(e.message||"Kh\xf4ng lưu được CLI Model Profiles")}finally{y(!1)}}};return j?(0,o.jsx)("div",{className:"rounded-2xl border border-dashed border-border p-8 text-center text-sm text-text-muted",children:"Đang tải CLI Model Settings..."}):M?(0,o.jsxs)("div",{className:"mx-auto w-full max-w-6xl space-y-5",children:[(0,o.jsx)("datalist",{id:"cli-local-model-catalog",children:l.map(e=>(0,o.jsx)("option",{value:e},e))}),(0,o.jsx)("datalist",{id:"cli-cloud-claude-catalog",children:i.claude.map(e=>(0,o.jsx)("option",{value:e},e))}),(0,o.jsx)("datalist",{id:"cli-cloud-codex-catalog",children:i.codex.map(e=>(0,o.jsx)("option",{value:e},e))}),(0,o.jsxs)("div",{className:"flex flex-col gap-3 lg:flex-row lg:items-start lg:justify-between",children:[(0,o.jsxs)("div",{children:[(0,o.jsxs)("div",{className:"flex items-center gap-2 text-sm text-text-muted",children:[(0,o.jsx)(a(),{href:"/dashboard/cli-tools",className:"hover:text-primary",children:"CLI Tools"}),(0,o.jsx)("span",{children:"/"}),(0,o.jsx)("span",{children:"Model Settings"})]}),(0,o.jsx)("h1",{className:"mt-1 text-2xl font-semibold text-text-main",children:"CLI Model Settings"}),(0,o.jsxs)("p",{className:"mt-1 max-w-4xl text-sm text-text-muted",children:["Local profile d\xf9ng chung cho 4 CLI. Cloud profile l\xe0 global admin setting: Claude Code chỉ d\xf9ng ",(0,o.jsx)("span",{className:"font-mono",children:"claude/"}),", Codex chỉ d\xf9ng ",(0,o.jsx)("span",{className:"font-mono",children:"codex/"}),". Việc cấu h\xecnh kh\xf4ng y\xeau cầu admin phải c\xf3 Personal Auth."]})]}),(0,o.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,o.jsx)(n.$n,{variant:"outline",onClick:()=>{t(x(c.O0)),k(""),A("")},children:"Reset form"}),(0,o.jsx)(n.$n,{onClick:W,disabled:v,children:v?"Đang lưu...":"Lưu settings"})]})]}),(0,o.jsx)("div",{className:"rounded-xl border border-blue-500/20 bg-blue-500/5 p-3 text-sm text-text-muted",children:"Setting n\xe0y chỉ sinh config/hướng dẫn CLI ở Dashboard. Kh\xf4ng thay đổi request handling, runtime model routing, provider routing, combo, circuit breaker hay load balancing."}),(0,o.jsxs)("div",{className:"rounded-xl border border-border bg-surface/50 p-3 text-xs text-text-muted",children:["Cloud catalog hiện gợi \xfd ",(0,o.jsxs)("span",{className:"font-medium text-text-main",children:[i.claude.length," model claude/"]})," v\xe0 ",(0,o.jsxs)("span",{className:"font-medium text-text-main",children:[i.codex.length," model codex/"]}),". Danh s\xe1ch được hợp nhất từ provider catalog + model đ\xe3 import tr\xean to\xe0n bộ Personal Cloud connections; đ\xe2y chỉ l\xe0 gợi \xfd, kh\xf4ng phải điều kiện để admin lưu mapping."]}),w?(0,o.jsx)("div",{className:"rounded-xl border border-red-500/30 bg-red-500/10 p-3 text-sm text-red-600",children:w}):null,C?(0,o.jsx)("div",{className:"rounded-xl border border-emerald-500/30 bg-emerald-500/10 p-3 text-sm text-emerald-700 dark:text-emerald-300",children:C}):null,(0,o.jsx)(h,{profile:e.local,setProfiles:t}),(0,o.jsxs)("div",{className:"grid gap-5 xl:grid-cols-2",children:[(0,o.jsx)(g,{tool:"claude",profile:e.cloud.claude,options:i.claude,catalogWarning:p,setProfiles:t}),(0,o.jsx)(g,{tool:"codex",profile:e.cloud.codex,options:i.codex,catalogWarning:p,setProfiles:t})]}),(0,o.jsx)(n.Zp,{children:(0,o.jsxs)("div",{className:"space-y-3",children:[(0,o.jsx)("h2",{className:"font-semibold text-text-main",children:"Preview resolved mapping"}),(0,o.jsxs)("div",{className:"grid gap-4 lg:grid-cols-3",children:[(0,o.jsx)(f,{title:"Local \xb7 all CLI",profile:I.local}),(0,o.jsx)(f,{title:"Cloud \xb7 Claude Code",profile:I.cloud.claude}),(0,o.jsx)(f,{title:"Cloud \xb7 Codex",profile:I.cloud.codex})]})]})})]}):(0,o.jsx)(n.Zp,{children:(0,o.jsxs)("div",{className:"space-y-3",children:[(0,o.jsx)("h1",{className:"text-xl font-semibold text-text-main",children:"CLI Model Settings"}),(0,o.jsx)("p",{className:"text-sm text-text-muted",children:"Chỉ admin/API-key admin được thay đổi CLI model mapping."}),(0,o.jsx)(a(),{href:"/dashboard/cli-tools",className:"text-sm font-medium text-primary hover:underline",children:"← Quay lại CLI Tools"})]})})}},91011:(e,t,l)=>{Promise.resolve().then(l.bind(l,59305))}},e=>{e.O(0,[8991,3862,9893,9959,8500,7050,5564,5263,7033,5497,8441,3794,7358],()=>e(e.s=91011)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2326],{4987:(e,s,l)=>{Promise.resolve().then(l.bind(l,75882))},75882:(e,s,l)=>{"use strict";l.d(s,{default:()=>g});var t=l(95155),a=l(98500),r=l.n(a),i=l(12115),o=l(35497),n=l(94027),d=l(3534),c=l(61082),x=l(5772);function m({toolId:e,tool:s,status:l}){let a=l?l.installed?l.hasBluerouter?{label:"Connected",cls:"bg-green-500/10 text-green-600 dark:text-green-400"}:{label:"Not configured",cls:"bg-yellow-500/10 text-yellow-600 dark:text-yellow-400"}:{label:"Not installed",cls:"bg-red-500/10 text-red-600 dark:text-red-400"}:{label:"Unknown",cls:"bg-gray-500/10 text-gray-500"};return(0,t.jsx)(r(),{href:`/dashboard/cli-tools/${e}`,className:"block",children:(0,t.jsx)(o.Zp,{padding:"sm",className:"h-full overflow-hidden hover:border-primary/50 transition-colors cursor-pointer",children:(0,t.jsxs)("div",{className:"flex h-full flex-col gap-2",children:[(0,t.jsxs)("div",{className:"flex items-start gap-3",children:[(0,t.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:s.image?(0,t.jsx)(x.default,{src:s.image,alt:s.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:e=>{e.target.style.display="none"}}):s.icon?(0,t.jsx)("span",{className:"material-symbols-outlined text-[28px]",style:{color:s.color},children:s.icon}):null}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("h3",{className:"font-medium text-sm truncate",children:s.name}),(0,t.jsx)("span",{className:`inline-block mt-0.5 px-1.5 py-0.5 text-[10px] font-medium rounded-full ${a.cls}`,children:a.label})]}),(0,t.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px] shrink-0",children:"chevron_right"})]}),(0,t.jsx)("p",{className:"text-xs text-text-muted line-clamp-2",children:s.description})]})})})}function g({machineId:e}){let[s,l]=(0,i.useState)(!0),[a,x]=(0,i.useState)({}),{isAdmin:h,isMonitorAdmin:p,canManageApiKeys:u}=(0,n.s)();if((0,i.useEffect)(()=>{let e=!0;return(async()=>{try{let s=await fetch("/api/cli-tools/all-statuses");s.ok&&e&&x(await s.json())}catch(e){console.log("Error fetching tool statuses:",e)}finally{e&&l(!1)}})(),()=>{e=!1}},[]),s)return(0,t.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 sm:gap-4",children:[(0,t.jsx)(o.Qv,{}),(0,t.jsx)(o.Qv,{}),(0,t.jsx)(o.Qv,{}),(0,t.jsx)(o.Qv,{}),(0,t.jsx)(o.Qv,{}),(0,t.jsx)(o.Qv,{})]});let f=Object.entries(d.dM),j=Object.entries(d.wn);return(0,t.jsxs)("div",{className:"mx-auto flex w-full max-w-5xl flex-col gap-6 px-1 sm:px-0",children:[h||p||u?(0,t.jsxs)(r(),{href:"/dashboard/cli-tools/model-profiles",className:"group flex flex-col gap-3 rounded-2xl border border-primary/20 bg-primary/5 p-4 transition hover:border-primary/40 sm:flex-row sm:items-center sm:justify-between",children:[(0,t.jsxs)("div",{className:"flex items-start gap-3",children:[(0,t.jsx)("span",{className:"material-symbols-outlined rounded-xl border border-primary/20 bg-surface p-2 text-primary",children:"tune"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"font-semibold text-text-main",children:"CLI Model Settings"}),(0,t.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"Set Local model d\xf9ng chung; Claude Code v\xe0 Codex c\xf3 Cloud model global, kh\xf4ng phụ thuộc Personal Auth của admin."})]})]}),(0,t.jsx)("span",{className:"material-symbols-outlined text-text-muted transition group-hover:translate-x-0.5 group-hover:text-primary",children:"arrow_forward"})]}):null,(0,t.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 sm:gap-4",children:f.map(([e,s])=>(0,t.jsx)(m,{toolId:e,tool:s,status:a[e]},e))}),(0,t.jsxs)("div",{className:"flex flex-col gap-3 sm:gap-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 px-1",children:[(0,t.jsx)("span",{className:"material-symbols-outlined text-[18px] text-primary",children:"security"}),(0,t.jsx)("h2",{className:"text-sm font-semibold text-text-main",children:"MITM Tools"})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 sm:gap-4",children:j.map(([e,s])=>(0,t.jsx)(c.gY,{tool:s},e))})]})]})}}},e=>{e.O(0,[8991,3862,9893,9959,1997,5772,5564,5263,7033,5497,4525,8441,3794,7358],()=>e(e.s=4987)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2326],{4987:(e,s,l)=>{Promise.resolve().then(l.bind(l,75882))},75882:(e,s,l)=>{"use strict";l.d(s,{default:()=>g});var t=l(95155),a=l(98500),r=l.n(a),i=l(12115),o=l(35497),n=l(94027),d=l(3534),c=l(61082),x=l(5772);function m({toolId:e,tool:s,status:l}){let a=l?l.installed?l.hasBluerouter?{label:"Connected",cls:"bg-green-500/10 text-green-600 dark:text-green-400"}:{label:"Not configured",cls:"bg-yellow-500/10 text-yellow-600 dark:text-yellow-400"}:{label:"Not installed",cls:"bg-red-500/10 text-red-600 dark:text-red-400"}:{label:"Unknown",cls:"bg-gray-500/10 text-gray-500"};return(0,t.jsx)(r(),{href:`/dashboard/cli-tools/${e}`,className:"block",children:(0,t.jsx)(o.Zp,{padding:"sm",className:"h-full overflow-hidden hover:border-primary/50 transition-colors cursor-pointer",children:(0,t.jsxs)("div",{className:"flex h-full flex-col gap-2",children:[(0,t.jsxs)("div",{className:"flex items-start gap-3",children:[(0,t.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:s.image?(0,t.jsx)(x.default,{src:s.image,alt:s.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:e=>{e.target.style.display="none"}}):s.icon?(0,t.jsx)("span",{className:"material-symbols-outlined text-[28px]",style:{color:s.color},children:s.icon}):null}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("h3",{className:"font-medium text-sm truncate",children:s.name}),(0,t.jsx)("span",{className:`inline-block mt-0.5 px-1.5 py-0.5 text-[10px] font-medium rounded-full ${a.cls}`,children:a.label})]}),(0,t.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px] shrink-0",children:"chevron_right"})]}),(0,t.jsx)("p",{className:"text-xs text-text-muted line-clamp-2",children:s.description})]})})})}function g({machineId:e}){let[s,l]=(0,i.useState)(!0),[a,x]=(0,i.useState)({}),{isAdmin:h,isMonitorAdmin:p,canManageApiKeys:u}=(0,n.s)();if((0,i.useEffect)(()=>{let e=!0;return(async()=>{try{let s=await fetch("/api/cli-tools/all-statuses");s.ok&&e&&x(await s.json())}catch(e){console.log("Error fetching tool statuses:",e)}finally{e&&l(!1)}})(),()=>{e=!1}},[]),s)return(0,t.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 sm:gap-4",children:[(0,t.jsx)(o.Qv,{}),(0,t.jsx)(o.Qv,{}),(0,t.jsx)(o.Qv,{}),(0,t.jsx)(o.Qv,{}),(0,t.jsx)(o.Qv,{}),(0,t.jsx)(o.Qv,{})]});let f=Object.entries(d.dM),j=Object.entries(d.wn);return(0,t.jsxs)("div",{className:"mx-auto flex w-full max-w-5xl flex-col gap-6 px-1 sm:px-0",children:[h||p||u?(0,t.jsxs)(r(),{href:"/dashboard/cli-tools/model-profiles",className:"group flex flex-col gap-3 rounded-2xl border border-primary/20 bg-primary/5 p-4 transition hover:border-primary/40 sm:flex-row sm:items-center sm:justify-between",children:[(0,t.jsxs)("div",{className:"flex items-start gap-3",children:[(0,t.jsx)("span",{className:"material-symbols-outlined rounded-xl border border-primary/20 bg-surface p-2 text-primary",children:"tune"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"font-semibold text-text-main",children:"CLI Model Settings"}),(0,t.jsx)("p",{className:"mt-1 text-sm text-text-muted",children:"Set Local model d\xf9ng chung; Claude Code v\xe0 Codex c\xf3 Cloud model global, kh\xf4ng phụ thuộc Personal Auth của admin."})]})]}),(0,t.jsx)("span",{className:"material-symbols-outlined text-text-muted transition group-hover:translate-x-0.5 group-hover:text-primary",children:"arrow_forward"})]}):null,(0,t.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 sm:gap-4",children:f.map(([e,s])=>(0,t.jsx)(m,{toolId:e,tool:s,status:a[e]},e))}),(0,t.jsxs)("div",{className:"flex flex-col gap-3 sm:gap-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 px-1",children:[(0,t.jsx)("span",{className:"material-symbols-outlined text-[18px] text-primary",children:"security"}),(0,t.jsx)("h2",{className:"text-sm font-semibold text-text-main",children:"MITM Tools"})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 sm:gap-4",children:j.map(([e,s])=>(0,t.jsx)(c.gY,{tool:s},e))})]})]})}}},e=>{e.O(0,[8991,3862,9893,9959,8500,7050,5772,5564,5263,7033,5497,4525,8441,3794,7358],()=>e(e.s=4987)),_N_E=e.O()}]);