omniroute 1.4.4 → 1.4.7

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 (725) hide show
  1. package/app/.env +110 -0
  2. package/app/.next/BUILD_ID +1 -1
  3. package/app/.next/app-path-routes-manifest.json +39 -39
  4. package/app/.next/build-manifest.json +3 -3
  5. package/app/.next/prerender-manifest.json +3 -3
  6. package/app/.next/required-server-files.json +4 -4
  7. package/app/.next/server/app/(dashboard)/dashboard/analytics/page.js +2 -2
  8. package/app/.next/server/app/(dashboard)/dashboard/analytics/page.js.nft.json +1 -1
  9. package/app/.next/server/app/(dashboard)/dashboard/analytics/page_client-reference-manifest.js +1 -1
  10. package/app/.next/server/app/(dashboard)/dashboard/api-manager/page.js +2 -2
  11. package/app/.next/server/app/(dashboard)/dashboard/api-manager/page.js.nft.json +1 -1
  12. package/app/.next/server/app/(dashboard)/dashboard/api-manager/page_client-reference-manifest.js +1 -1
  13. package/app/.next/server/app/(dashboard)/dashboard/audit-log/page.js +2 -2
  14. package/app/.next/server/app/(dashboard)/dashboard/audit-log/page.js.nft.json +1 -1
  15. package/app/.next/server/app/(dashboard)/dashboard/audit-log/page_client-reference-manifest.js +1 -1
  16. package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page.js +3 -3
  17. package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  18. package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  19. package/app/.next/server/app/(dashboard)/dashboard/combos/page.js +2 -2
  20. package/app/.next/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  21. package/app/.next/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  22. package/app/.next/server/app/(dashboard)/dashboard/costs/page.js +2 -2
  23. package/app/.next/server/app/(dashboard)/dashboard/costs/page.js.nft.json +1 -1
  24. package/app/.next/server/app/(dashboard)/dashboard/costs/page_client-reference-manifest.js +1 -1
  25. package/app/.next/server/app/(dashboard)/dashboard/endpoint/page.js +2 -2
  26. package/app/.next/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  27. package/app/.next/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  28. package/app/.next/server/app/(dashboard)/dashboard/health/page.js +2 -2
  29. package/app/.next/server/app/(dashboard)/dashboard/health/page.js.nft.json +1 -1
  30. package/app/.next/server/app/(dashboard)/dashboard/health/page_client-reference-manifest.js +1 -1
  31. package/app/.next/server/app/(dashboard)/dashboard/limits/page.js +2 -2
  32. package/app/.next/server/app/(dashboard)/dashboard/limits/page.js.nft.json +1 -1
  33. package/app/.next/server/app/(dashboard)/dashboard/limits/page_client-reference-manifest.js +1 -1
  34. package/app/.next/server/app/(dashboard)/dashboard/logs/page.js +2 -2
  35. package/app/.next/server/app/(dashboard)/dashboard/logs/page.js.nft.json +1 -1
  36. package/app/.next/server/app/(dashboard)/dashboard/logs/page_client-reference-manifest.js +1 -1
  37. package/app/.next/server/app/(dashboard)/dashboard/onboarding/page.js +2 -2
  38. package/app/.next/server/app/(dashboard)/dashboard/onboarding/page.js.nft.json +1 -1
  39. package/app/.next/server/app/(dashboard)/dashboard/onboarding/page_client-reference-manifest.js +1 -1
  40. package/app/.next/server/app/(dashboard)/dashboard/page.js +2 -2
  41. package/app/.next/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  42. package/app/.next/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  43. package/app/.next/server/app/(dashboard)/dashboard/profile/page.js +2 -2
  44. package/app/.next/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  45. package/app/.next/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  46. package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page.js +2 -2
  47. package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  48. package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  49. package/app/.next/server/app/(dashboard)/dashboard/providers/new/page.js +2 -2
  50. package/app/.next/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  51. package/app/.next/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  52. package/app/.next/server/app/(dashboard)/dashboard/providers/page.js +2 -2
  53. package/app/.next/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  54. package/app/.next/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  55. package/app/.next/server/app/(dashboard)/dashboard/settings/page.js +2 -2
  56. package/app/.next/server/app/(dashboard)/dashboard/settings/page.js.nft.json +1 -1
  57. package/app/.next/server/app/(dashboard)/dashboard/settings/page_client-reference-manifest.js +1 -1
  58. package/app/.next/server/app/(dashboard)/dashboard/settings/pricing/page.js +2 -2
  59. package/app/.next/server/app/(dashboard)/dashboard/settings/pricing/page.js.nft.json +1 -1
  60. package/app/.next/server/app/(dashboard)/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  61. package/app/.next/server/app/(dashboard)/dashboard/translator/page.js +3 -3
  62. package/app/.next/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  63. package/app/.next/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  64. package/app/.next/server/app/(dashboard)/dashboard/usage/page.js +2 -2
  65. package/app/.next/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  66. package/app/.next/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  67. package/app/.next/server/app/_global-error/page.js +3 -3
  68. package/app/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  69. package/app/.next/server/app/_global-error.html +2 -2
  70. package/app/.next/server/app/_global-error.rsc +4 -4
  71. package/app/.next/server/app/_global-error.segments/_full.segment.rsc +4 -4
  72. package/app/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  73. package/app/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  74. package/app/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  75. package/app/.next/server/app/_global-error.segments/_index.segment.rsc +3 -3
  76. package/app/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  77. package/app/.next/server/app/_not-found/page.js +2 -2
  78. package/app/.next/server/app/_not-found/page.js.nft.json +1 -1
  79. package/app/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  80. package/app/.next/server/app/_not-found.html +1 -1
  81. package/app/.next/server/app/_not-found.rsc +5 -5
  82. package/app/.next/server/app/_not-found.segments/_full.segment.rsc +5 -5
  83. package/app/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  84. package/app/.next/server/app/_not-found.segments/_index.segment.rsc +4 -4
  85. package/app/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
  86. package/app/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  87. package/app/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  88. package/app/.next/server/app/api/auth/login/route.js +1 -1
  89. package/app/.next/server/app/api/auth/login/route_client-reference-manifest.js +1 -1
  90. package/app/.next/server/app/api/auth/logout/route.js +1 -1
  91. package/app/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
  92. package/app/.next/server/app/api/auth/status/route.js +1 -1
  93. package/app/.next/server/app/api/auth/status/route_client-reference-manifest.js +1 -1
  94. package/app/.next/server/app/api/cache/route.js +1 -1
  95. package/app/.next/server/app/api/cache/route_client-reference-manifest.js +1 -1
  96. package/app/.next/server/app/api/cache/stats/route.js +1 -1
  97. package/app/.next/server/app/api/cache/stats/route_client-reference-manifest.js +1 -1
  98. package/app/.next/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
  99. package/app/.next/server/app/api/cli-tools/antigravity-mitm/alias/route_client-reference-manifest.js +1 -1
  100. package/app/.next/server/app/api/cli-tools/antigravity-mitm/route.js +3 -3
  101. package/app/.next/server/app/api/cli-tools/antigravity-mitm/route_client-reference-manifest.js +1 -1
  102. package/app/.next/server/app/api/cli-tools/backups/route.js +2 -2
  103. package/app/.next/server/app/api/cli-tools/backups/route_client-reference-manifest.js +1 -1
  104. package/app/.next/server/app/api/cli-tools/claude-settings/route.js +1 -1
  105. package/app/.next/server/app/api/cli-tools/claude-settings/route_client-reference-manifest.js +1 -1
  106. package/app/.next/server/app/api/cli-tools/cline-settings/route.js +2 -2
  107. package/app/.next/server/app/api/cli-tools/cline-settings/route_client-reference-manifest.js +1 -1
  108. package/app/.next/server/app/api/cli-tools/codex-profiles/route.js +2 -2
  109. package/app/.next/server/app/api/cli-tools/codex-profiles/route_client-reference-manifest.js +1 -1
  110. package/app/.next/server/app/api/cli-tools/codex-settings/route.js +1 -1
  111. package/app/.next/server/app/api/cli-tools/codex-settings/route_client-reference-manifest.js +1 -1
  112. package/app/.next/server/app/api/cli-tools/droid-settings/route.js +2 -2
  113. package/app/.next/server/app/api/cli-tools/droid-settings/route_client-reference-manifest.js +1 -1
  114. package/app/.next/server/app/api/cli-tools/guide-settings/[toolId]/route.js +1 -1
  115. package/app/.next/server/app/api/cli-tools/guide-settings/[toolId]/route_client-reference-manifest.js +1 -1
  116. package/app/.next/server/app/api/cli-tools/kilo-settings/route.js +2 -2
  117. package/app/.next/server/app/api/cli-tools/kilo-settings/route_client-reference-manifest.js +1 -1
  118. package/app/.next/server/app/api/cli-tools/openclaw-settings/route.js +1 -1
  119. package/app/.next/server/app/api/cli-tools/openclaw-settings/route_client-reference-manifest.js +1 -1
  120. package/app/.next/server/app/api/cli-tools/runtime/[toolId]/route.js +2 -2
  121. package/app/.next/server/app/api/cli-tools/runtime/[toolId]/route_client-reference-manifest.js +1 -1
  122. package/app/.next/server/app/api/cli-tools/status/route.js +2 -2
  123. package/app/.next/server/app/api/cli-tools/status/route_client-reference-manifest.js +1 -1
  124. package/app/.next/server/app/api/cloud/auth/route.js +1 -1
  125. package/app/.next/server/app/api/cloud/auth/route_client-reference-manifest.js +1 -1
  126. package/app/.next/server/app/api/cloud/credentials/update/route.js +1 -1
  127. package/app/.next/server/app/api/cloud/credentials/update/route_client-reference-manifest.js +1 -1
  128. package/app/.next/server/app/api/cloud/model/resolve/route.js +1 -1
  129. package/app/.next/server/app/api/cloud/model/resolve/route_client-reference-manifest.js +1 -1
  130. package/app/.next/server/app/api/cloud/models/alias/route.js +1 -1
  131. package/app/.next/server/app/api/cloud/models/alias/route_client-reference-manifest.js +1 -1
  132. package/app/.next/server/app/api/combos/[id]/route.js +1 -1
  133. package/app/.next/server/app/api/combos/[id]/route.js.nft.json +1 -1
  134. package/app/.next/server/app/api/combos/[id]/route_client-reference-manifest.js +1 -1
  135. package/app/.next/server/app/api/combos/metrics/route.js +1 -1
  136. package/app/.next/server/app/api/combos/metrics/route_client-reference-manifest.js +1 -1
  137. package/app/.next/server/app/api/combos/route.js +1 -1
  138. package/app/.next/server/app/api/combos/route.js.nft.json +1 -1
  139. package/app/.next/server/app/api/combos/route_client-reference-manifest.js +1 -1
  140. package/app/.next/server/app/api/combos/test/route.js +1 -1
  141. package/app/.next/server/app/api/combos/test/route_client-reference-manifest.js +1 -1
  142. package/app/.next/server/app/api/compliance/audit-log/route.js +1 -1
  143. package/app/.next/server/app/api/compliance/audit-log/route_client-reference-manifest.js +1 -1
  144. package/app/.next/server/app/api/db-backups/export/route.js +1 -1
  145. package/app/.next/server/app/api/db-backups/export/route_client-reference-manifest.js +1 -1
  146. package/app/.next/server/app/api/db-backups/exportAll/route.js +1 -1
  147. package/app/.next/server/app/api/db-backups/exportAll/route_client-reference-manifest.js +1 -1
  148. package/app/.next/server/app/api/db-backups/import/route.js +1 -1
  149. package/app/.next/server/app/api/db-backups/import/route_client-reference-manifest.js +1 -1
  150. package/app/.next/server/app/api/db-backups/route.js +1 -1
  151. package/app/.next/server/app/api/db-backups/route_client-reference-manifest.js +1 -1
  152. package/app/.next/server/app/api/evals/[suiteId]/route.js +1 -1
  153. package/app/.next/server/app/api/evals/[suiteId]/route_client-reference-manifest.js +1 -1
  154. package/app/.next/server/app/api/evals/route.js +1 -1
  155. package/app/.next/server/app/api/evals/route_client-reference-manifest.js +1 -1
  156. package/app/.next/server/app/api/fallback/chains/route.js +2 -2
  157. package/app/.next/server/app/api/fallback/chains/route_client-reference-manifest.js +1 -1
  158. package/app/.next/server/app/api/init/route.js +1 -1
  159. package/app/.next/server/app/api/init/route_client-reference-manifest.js +1 -1
  160. package/app/.next/server/app/api/keys/[id]/route.js +1 -1
  161. package/app/.next/server/app/api/keys/[id]/route_client-reference-manifest.js +1 -1
  162. package/app/.next/server/app/api/keys/route.js +1 -1
  163. package/app/.next/server/app/api/keys/route_client-reference-manifest.js +1 -1
  164. package/app/.next/server/app/api/logs/console/route.js +1 -1
  165. package/app/.next/server/app/api/logs/console/route.js.nft.json +1 -1
  166. package/app/.next/server/app/api/logs/console/route_client-reference-manifest.js +1 -1
  167. package/app/.next/server/app/api/models/alias/route.js +1 -1
  168. package/app/.next/server/app/api/models/alias/route_client-reference-manifest.js +1 -1
  169. package/app/.next/server/app/api/models/availability/route.js +1 -1
  170. package/app/.next/server/app/api/models/availability/route_client-reference-manifest.js +1 -1
  171. package/app/.next/server/app/api/models/catalog/route.js +2 -2
  172. package/app/.next/server/app/api/models/catalog/route_client-reference-manifest.js +1 -1
  173. package/app/.next/server/app/api/models/route.js +2 -2
  174. package/app/.next/server/app/api/models/route_client-reference-manifest.js +1 -1
  175. package/app/.next/server/app/api/monitoring/health/route.js +2 -2
  176. package/app/.next/server/app/api/monitoring/health/route_client-reference-manifest.js +1 -1
  177. package/app/.next/server/app/api/oauth/[provider]/[action]/route.js +2 -2
  178. package/app/.next/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  179. package/app/.next/server/app/api/oauth/[provider]/[action]/route_client-reference-manifest.js +1 -1
  180. package/app/.next/server/app/api/oauth/cursor/auto-import/route.js +1 -1
  181. package/app/.next/server/app/api/oauth/cursor/auto-import/route_client-reference-manifest.js +1 -1
  182. package/app/.next/server/app/api/oauth/cursor/import/route.js +1 -1
  183. package/app/.next/server/app/api/oauth/cursor/import/route_client-reference-manifest.js +1 -1
  184. package/app/.next/server/app/api/oauth/kiro/auto-import/route.js +1 -1
  185. package/app/.next/server/app/api/oauth/kiro/auto-import/route_client-reference-manifest.js +1 -1
  186. package/app/.next/server/app/api/oauth/kiro/import/route.js +1 -1
  187. package/app/.next/server/app/api/oauth/kiro/import/route_client-reference-manifest.js +1 -1
  188. package/app/.next/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  189. package/app/.next/server/app/api/oauth/kiro/social-authorize/route_client-reference-manifest.js +1 -1
  190. package/app/.next/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  191. package/app/.next/server/app/api/oauth/kiro/social-exchange/route_client-reference-manifest.js +1 -1
  192. package/app/.next/server/app/api/policies/route.js +2 -2
  193. package/app/.next/server/app/api/policies/route_client-reference-manifest.js +1 -1
  194. package/app/.next/server/app/api/pricing/defaults/route.js +1 -1
  195. package/app/.next/server/app/api/pricing/defaults/route_client-reference-manifest.js +1 -1
  196. package/app/.next/server/app/api/pricing/models/route.js +1 -1
  197. package/app/.next/server/app/api/pricing/models/route_client-reference-manifest.js +1 -1
  198. package/app/.next/server/app/api/pricing/route.js +1 -1
  199. package/app/.next/server/app/api/pricing/route_client-reference-manifest.js +1 -1
  200. package/app/.next/server/app/api/provider-metrics/route.js +2 -2
  201. package/app/.next/server/app/api/provider-metrics/route_client-reference-manifest.js +1 -1
  202. package/app/.next/server/app/api/provider-models/route.js +1 -1
  203. package/app/.next/server/app/api/provider-models/route_client-reference-manifest.js +1 -1
  204. package/app/.next/server/app/api/provider-nodes/[id]/route.js +1 -1
  205. package/app/.next/server/app/api/provider-nodes/[id]/route_client-reference-manifest.js +1 -1
  206. package/app/.next/server/app/api/provider-nodes/route.js +2 -2
  207. package/app/.next/server/app/api/provider-nodes/route_client-reference-manifest.js +1 -1
  208. package/app/.next/server/app/api/provider-nodes/validate/route.js +1 -1
  209. package/app/.next/server/app/api/provider-nodes/validate/route_client-reference-manifest.js +1 -1
  210. package/app/.next/server/app/api/providers/[id]/models/route.js +2 -2
  211. package/app/.next/server/app/api/providers/[id]/models/route_client-reference-manifest.js +1 -1
  212. package/app/.next/server/app/api/providers/[id]/route.js +1 -1
  213. package/app/.next/server/app/api/providers/[id]/route_client-reference-manifest.js +1 -1
  214. package/app/.next/server/app/api/providers/[id]/test/route.js +1 -1
  215. package/app/.next/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  216. package/app/.next/server/app/api/providers/[id]/test/route_client-reference-manifest.js +1 -1
  217. package/app/.next/server/app/api/providers/client/route.js +1 -1
  218. package/app/.next/server/app/api/providers/client/route_client-reference-manifest.js +1 -1
  219. package/app/.next/server/app/api/providers/route.js +2 -2
  220. package/app/.next/server/app/api/providers/route_client-reference-manifest.js +1 -1
  221. package/app/.next/server/app/api/providers/test-batch/route.js +1 -1
  222. package/app/.next/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  223. package/app/.next/server/app/api/providers/test-batch/route_client-reference-manifest.js +1 -1
  224. package/app/.next/server/app/api/providers/validate/route.js +1 -1
  225. package/app/.next/server/app/api/providers/validate/route_client-reference-manifest.js +1 -1
  226. package/app/.next/server/app/api/rate-limit/route.js +1 -1
  227. package/app/.next/server/app/api/rate-limit/route_client-reference-manifest.js +1 -1
  228. package/app/.next/server/app/api/rate-limits/route.js +1 -1
  229. package/app/.next/server/app/api/rate-limits/route_client-reference-manifest.js +1 -1
  230. package/app/.next/server/app/api/resilience/reset/route.js +1 -1
  231. package/app/.next/server/app/api/resilience/reset/route_client-reference-manifest.js +1 -1
  232. package/app/.next/server/app/api/resilience/route.js +1 -1
  233. package/app/.next/server/app/api/resilience/route_client-reference-manifest.js +1 -1
  234. package/app/.next/server/app/api/restart/route.js +1 -1
  235. package/app/.next/server/app/api/restart/route_client-reference-manifest.js +1 -1
  236. package/app/.next/server/app/api/sessions/route.js +1 -1
  237. package/app/.next/server/app/api/sessions/route_client-reference-manifest.js +1 -1
  238. package/app/.next/server/app/api/settings/combo-defaults/route.js +1 -1
  239. package/app/.next/server/app/api/settings/combo-defaults/route_client-reference-manifest.js +1 -1
  240. package/app/.next/server/app/api/settings/ip-filter/route.js +1 -1
  241. package/app/.next/server/app/api/settings/ip-filter/route_client-reference-manifest.js +1 -1
  242. package/app/.next/server/app/api/settings/proxy/route.js +1 -1
  243. package/app/.next/server/app/api/settings/proxy/route_client-reference-manifest.js +1 -1
  244. package/app/.next/server/app/api/settings/proxy/test/route.js +1 -1
  245. package/app/.next/server/app/api/settings/proxy/test/route_client-reference-manifest.js +1 -1
  246. package/app/.next/server/app/api/settings/require-login/route.js +1 -1
  247. package/app/.next/server/app/api/settings/require-login/route_client-reference-manifest.js +1 -1
  248. package/app/.next/server/app/api/settings/route.js +1 -1
  249. package/app/.next/server/app/api/settings/route_client-reference-manifest.js +1 -1
  250. package/app/.next/server/app/api/settings/system-prompt/route.js +1 -1
  251. package/app/.next/server/app/api/settings/system-prompt/route_client-reference-manifest.js +1 -1
  252. package/app/.next/server/app/api/settings/thinking-budget/route.js +1 -1
  253. package/app/.next/server/app/api/settings/thinking-budget/route_client-reference-manifest.js +1 -1
  254. package/app/.next/server/app/api/shutdown/route.js +1 -1
  255. package/app/.next/server/app/api/shutdown/route_client-reference-manifest.js +1 -1
  256. package/app/.next/server/app/api/storage/health/route.js +1 -1
  257. package/app/.next/server/app/api/storage/health/route_client-reference-manifest.js +1 -1
  258. package/app/.next/server/app/api/sync/cloud/route.js +1 -1
  259. package/app/.next/server/app/api/sync/cloud/route_client-reference-manifest.js +1 -1
  260. package/app/.next/server/app/api/sync/initialize/route.js +1 -1
  261. package/app/.next/server/app/api/sync/initialize/route_client-reference-manifest.js +1 -1
  262. package/app/.next/server/app/api/tags/route.js +1 -1
  263. package/app/.next/server/app/api/tags/route_client-reference-manifest.js +1 -1
  264. package/app/.next/server/app/api/telemetry/summary/route.js +1 -1
  265. package/app/.next/server/app/api/telemetry/summary/route_client-reference-manifest.js +1 -1
  266. package/app/.next/server/app/api/token-health/route.js +1 -1
  267. package/app/.next/server/app/api/token-health/route_client-reference-manifest.js +1 -1
  268. package/app/.next/server/app/api/translator/detect/route.js +1 -1
  269. package/app/.next/server/app/api/translator/detect/route_client-reference-manifest.js +1 -1
  270. package/app/.next/server/app/api/translator/history/route.js +1 -1
  271. package/app/.next/server/app/api/translator/history/route_client-reference-manifest.js +1 -1
  272. package/app/.next/server/app/api/translator/load/route.js +1 -1
  273. package/app/.next/server/app/api/translator/load/route_client-reference-manifest.js +1 -1
  274. package/app/.next/server/app/api/translator/save/route.js +1 -1
  275. package/app/.next/server/app/api/translator/save/route_client-reference-manifest.js +1 -1
  276. package/app/.next/server/app/api/translator/send/route.js +1 -1
  277. package/app/.next/server/app/api/translator/send/route_client-reference-manifest.js +1 -1
  278. package/app/.next/server/app/api/translator/translate/route.js +1 -1
  279. package/app/.next/server/app/api/translator/translate/route_client-reference-manifest.js +1 -1
  280. package/app/.next/server/app/api/usage/[connectionId]/route.js +1 -1
  281. package/app/.next/server/app/api/usage/[connectionId]/route_client-reference-manifest.js +1 -1
  282. package/app/.next/server/app/api/usage/analytics/route.js +1 -1
  283. package/app/.next/server/app/api/usage/analytics/route_client-reference-manifest.js +1 -1
  284. package/app/.next/server/app/api/usage/budget/route.js +2 -2
  285. package/app/.next/server/app/api/usage/budget/route_client-reference-manifest.js +1 -1
  286. package/app/.next/server/app/api/usage/call-logs/[id]/route.js +1 -1
  287. package/app/.next/server/app/api/usage/call-logs/[id]/route_client-reference-manifest.js +1 -1
  288. package/app/.next/server/app/api/usage/call-logs/route.js +1 -1
  289. package/app/.next/server/app/api/usage/call-logs/route_client-reference-manifest.js +1 -1
  290. package/app/.next/server/app/api/usage/history/route.js +1 -1
  291. package/app/.next/server/app/api/usage/history/route_client-reference-manifest.js +1 -1
  292. package/app/.next/server/app/api/usage/logs/route.js +1 -1
  293. package/app/.next/server/app/api/usage/logs/route_client-reference-manifest.js +1 -1
  294. package/app/.next/server/app/api/usage/proxy-logs/route.js +1 -1
  295. package/app/.next/server/app/api/usage/proxy-logs/route_client-reference-manifest.js +1 -1
  296. package/app/.next/server/app/api/usage/request-logs/route.js +1 -1
  297. package/app/.next/server/app/api/usage/request-logs/route_client-reference-manifest.js +1 -1
  298. package/app/.next/server/app/api/v1/api/chat/route.js +1 -1
  299. package/app/.next/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  300. package/app/.next/server/app/api/v1/api/chat/route_client-reference-manifest.js +1 -1
  301. package/app/.next/server/app/api/v1/audio/speech/route.js +1 -1
  302. package/app/.next/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  303. package/app/.next/server/app/api/v1/audio/speech/route_client-reference-manifest.js +1 -1
  304. package/app/.next/server/app/api/v1/audio/transcriptions/route.js +1 -1
  305. package/app/.next/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  306. package/app/.next/server/app/api/v1/audio/transcriptions/route_client-reference-manifest.js +1 -1
  307. package/app/.next/server/app/api/v1/chat/completions/route.js +1 -1
  308. package/app/.next/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  309. package/app/.next/server/app/api/v1/chat/completions/route_client-reference-manifest.js +1 -1
  310. package/app/.next/server/app/api/v1/embeddings/route.js +1 -1
  311. package/app/.next/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  312. package/app/.next/server/app/api/v1/embeddings/route_client-reference-manifest.js +1 -1
  313. package/app/.next/server/app/api/v1/images/generations/route.js +1 -1
  314. package/app/.next/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  315. package/app/.next/server/app/api/v1/images/generations/route_client-reference-manifest.js +1 -1
  316. package/app/.next/server/app/api/v1/messages/count_tokens/route.js +1 -1
  317. package/app/.next/server/app/api/v1/messages/count_tokens/route_client-reference-manifest.js +1 -1
  318. package/app/.next/server/app/api/v1/messages/route.js +1 -1
  319. package/app/.next/server/app/api/v1/messages/route.js.nft.json +1 -1
  320. package/app/.next/server/app/api/v1/messages/route_client-reference-manifest.js +1 -1
  321. package/app/.next/server/app/api/v1/models/route.js +2 -2
  322. package/app/.next/server/app/api/v1/models/route_client-reference-manifest.js +1 -1
  323. package/app/.next/server/app/api/v1/moderations/route.js +1 -1
  324. package/app/.next/server/app/api/v1/moderations/route.js.nft.json +1 -1
  325. package/app/.next/server/app/api/v1/moderations/route_client-reference-manifest.js +1 -1
  326. package/app/.next/server/app/api/v1/providers/[provider]/chat/completions/route.js +1 -1
  327. package/app/.next/server/app/api/v1/providers/[provider]/chat/completions/route.js.nft.json +1 -1
  328. package/app/.next/server/app/api/v1/providers/[provider]/chat/completions/route_client-reference-manifest.js +1 -1
  329. package/app/.next/server/app/api/v1/providers/[provider]/embeddings/route.js +1 -1
  330. package/app/.next/server/app/api/v1/providers/[provider]/embeddings/route.js.nft.json +1 -1
  331. package/app/.next/server/app/api/v1/providers/[provider]/embeddings/route_client-reference-manifest.js +1 -1
  332. package/app/.next/server/app/api/v1/providers/[provider]/images/generations/route.js +1 -1
  333. package/app/.next/server/app/api/v1/providers/[provider]/images/generations/route.js.nft.json +1 -1
  334. package/app/.next/server/app/api/v1/providers/[provider]/images/generations/route_client-reference-manifest.js +1 -1
  335. package/app/.next/server/app/api/v1/rerank/route.js +1 -1
  336. package/app/.next/server/app/api/v1/rerank/route.js.nft.json +1 -1
  337. package/app/.next/server/app/api/v1/rerank/route_client-reference-manifest.js +1 -1
  338. package/app/.next/server/app/api/v1/responses/route.js +1 -1
  339. package/app/.next/server/app/api/v1/responses/route.js.nft.json +1 -1
  340. package/app/.next/server/app/api/v1/responses/route_client-reference-manifest.js +1 -1
  341. package/app/.next/server/app/api/v1/route.js +1 -1
  342. package/app/.next/server/app/api/v1/route_client-reference-manifest.js +1 -1
  343. package/app/.next/server/app/api/v1beta/models/[...path]/route.js +1 -1
  344. package/app/.next/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  345. package/app/.next/server/app/api/v1beta/models/[...path]/route_client-reference-manifest.js +1 -1
  346. package/app/.next/server/app/api/v1beta/models/route.js +2 -2
  347. package/app/.next/server/app/api/v1beta/models/route_client-reference-manifest.js +1 -1
  348. package/app/.next/server/app/callback/page.js +2 -2
  349. package/app/.next/server/app/callback/page.js.nft.json +1 -1
  350. package/app/.next/server/app/callback/page_client-reference-manifest.js +1 -1
  351. package/app/.next/server/app/callback.html +1 -1
  352. package/app/.next/server/app/callback.rsc +6 -6
  353. package/app/.next/server/app/callback.segments/_full.segment.rsc +6 -6
  354. package/app/.next/server/app/callback.segments/_head.segment.rsc +1 -1
  355. package/app/.next/server/app/callback.segments/_index.segment.rsc +4 -4
  356. package/app/.next/server/app/callback.segments/_tree.segment.rsc +1 -1
  357. package/app/.next/server/app/callback.segments/callback/__PAGE__.segment.rsc +2 -2
  358. package/app/.next/server/app/callback.segments/callback.segment.rsc +1 -1
  359. package/app/.next/server/app/dashboard/analytics.html +2 -2
  360. package/app/.next/server/app/dashboard/analytics.rsc +8 -8
  361. package/app/.next/server/app/dashboard/analytics.segments/!KGRhc2hib2FyZCk/dashboard/analytics/__PAGE__.segment.rsc +2 -2
  362. package/app/.next/server/app/dashboard/analytics.segments/!KGRhc2hib2FyZCk/dashboard/analytics.segment.rsc +2 -2
  363. package/app/.next/server/app/dashboard/analytics.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  364. package/app/.next/server/app/dashboard/analytics.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  365. package/app/.next/server/app/dashboard/analytics.segments/_full.segment.rsc +8 -8
  366. package/app/.next/server/app/dashboard/analytics.segments/_head.segment.rsc +1 -1
  367. package/app/.next/server/app/dashboard/analytics.segments/_index.segment.rsc +4 -4
  368. package/app/.next/server/app/dashboard/analytics.segments/_tree.segment.rsc +1 -1
  369. package/app/.next/server/app/dashboard/api-manager.html +1 -1
  370. package/app/.next/server/app/dashboard/api-manager.rsc +7 -7
  371. package/app/.next/server/app/dashboard/api-manager.segments/!KGRhc2hib2FyZCk/dashboard/api-manager/__PAGE__.segment.rsc +2 -2
  372. package/app/.next/server/app/dashboard/api-manager.segments/!KGRhc2hib2FyZCk/dashboard/api-manager.segment.rsc +1 -1
  373. package/app/.next/server/app/dashboard/api-manager.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  374. package/app/.next/server/app/dashboard/api-manager.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  375. package/app/.next/server/app/dashboard/api-manager.segments/_full.segment.rsc +7 -7
  376. package/app/.next/server/app/dashboard/api-manager.segments/_head.segment.rsc +1 -1
  377. package/app/.next/server/app/dashboard/api-manager.segments/_index.segment.rsc +4 -4
  378. package/app/.next/server/app/dashboard/api-manager.segments/_tree.segment.rsc +1 -1
  379. package/app/.next/server/app/dashboard/audit-log.html +1 -1
  380. package/app/.next/server/app/dashboard/audit-log.rsc +7 -7
  381. package/app/.next/server/app/dashboard/audit-log.segments/!KGRhc2hib2FyZCk/dashboard/audit-log/__PAGE__.segment.rsc +2 -2
  382. package/app/.next/server/app/dashboard/audit-log.segments/!KGRhc2hib2FyZCk/dashboard/audit-log.segment.rsc +1 -1
  383. package/app/.next/server/app/dashboard/audit-log.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  384. package/app/.next/server/app/dashboard/audit-log.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  385. package/app/.next/server/app/dashboard/audit-log.segments/_full.segment.rsc +7 -7
  386. package/app/.next/server/app/dashboard/audit-log.segments/_head.segment.rsc +1 -1
  387. package/app/.next/server/app/dashboard/audit-log.segments/_index.segment.rsc +4 -4
  388. package/app/.next/server/app/dashboard/audit-log.segments/_tree.segment.rsc +1 -1
  389. package/app/.next/server/app/dashboard/cli-tools.html +1 -1
  390. package/app/.next/server/app/dashboard/cli-tools.rsc +8 -8
  391. package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
  392. package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
  393. package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  394. package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  395. package/app/.next/server/app/dashboard/cli-tools.segments/_full.segment.rsc +8 -8
  396. package/app/.next/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
  397. package/app/.next/server/app/dashboard/cli-tools.segments/_index.segment.rsc +4 -4
  398. package/app/.next/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +1 -1
  399. package/app/.next/server/app/dashboard/combos.html +1 -1
  400. package/app/.next/server/app/dashboard/combos.rsc +7 -7
  401. package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
  402. package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
  403. package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  404. package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  405. package/app/.next/server/app/dashboard/combos.segments/_full.segment.rsc +7 -7
  406. package/app/.next/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
  407. package/app/.next/server/app/dashboard/combos.segments/_index.segment.rsc +4 -4
  408. package/app/.next/server/app/dashboard/combos.segments/_tree.segment.rsc +1 -1
  409. package/app/.next/server/app/dashboard/costs.html +1 -1
  410. package/app/.next/server/app/dashboard/costs.rsc +7 -7
  411. package/app/.next/server/app/dashboard/costs.segments/!KGRhc2hib2FyZCk/dashboard/costs/__PAGE__.segment.rsc +2 -2
  412. package/app/.next/server/app/dashboard/costs.segments/!KGRhc2hib2FyZCk/dashboard/costs.segment.rsc +1 -1
  413. package/app/.next/server/app/dashboard/costs.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  414. package/app/.next/server/app/dashboard/costs.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  415. package/app/.next/server/app/dashboard/costs.segments/_full.segment.rsc +7 -7
  416. package/app/.next/server/app/dashboard/costs.segments/_head.segment.rsc +1 -1
  417. package/app/.next/server/app/dashboard/costs.segments/_index.segment.rsc +4 -4
  418. package/app/.next/server/app/dashboard/costs.segments/_tree.segment.rsc +1 -1
  419. package/app/.next/server/app/dashboard/endpoint.html +1 -1
  420. package/app/.next/server/app/dashboard/endpoint.rsc +8 -8
  421. package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
  422. package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
  423. package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  424. package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  425. package/app/.next/server/app/dashboard/endpoint.segments/_full.segment.rsc +8 -8
  426. package/app/.next/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
  427. package/app/.next/server/app/dashboard/endpoint.segments/_index.segment.rsc +4 -4
  428. package/app/.next/server/app/dashboard/endpoint.segments/_tree.segment.rsc +1 -1
  429. package/app/.next/server/app/dashboard/health.html +1 -1
  430. package/app/.next/server/app/dashboard/health.rsc +7 -7
  431. package/app/.next/server/app/dashboard/health.segments/!KGRhc2hib2FyZCk/dashboard/health/__PAGE__.segment.rsc +2 -2
  432. package/app/.next/server/app/dashboard/health.segments/!KGRhc2hib2FyZCk/dashboard/health.segment.rsc +1 -1
  433. package/app/.next/server/app/dashboard/health.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  434. package/app/.next/server/app/dashboard/health.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  435. package/app/.next/server/app/dashboard/health.segments/_full.segment.rsc +7 -7
  436. package/app/.next/server/app/dashboard/health.segments/_head.segment.rsc +1 -1
  437. package/app/.next/server/app/dashboard/health.segments/_index.segment.rsc +4 -4
  438. package/app/.next/server/app/dashboard/health.segments/_tree.segment.rsc +1 -1
  439. package/app/.next/server/app/dashboard/limits.html +2 -2
  440. package/app/.next/server/app/dashboard/limits.rsc +7 -7
  441. package/app/.next/server/app/dashboard/limits.segments/!KGRhc2hib2FyZCk/dashboard/limits/__PAGE__.segment.rsc +2 -2
  442. package/app/.next/server/app/dashboard/limits.segments/!KGRhc2hib2FyZCk/dashboard/limits.segment.rsc +1 -1
  443. package/app/.next/server/app/dashboard/limits.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  444. package/app/.next/server/app/dashboard/limits.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  445. package/app/.next/server/app/dashboard/limits.segments/_full.segment.rsc +7 -7
  446. package/app/.next/server/app/dashboard/limits.segments/_head.segment.rsc +1 -1
  447. package/app/.next/server/app/dashboard/limits.segments/_index.segment.rsc +4 -4
  448. package/app/.next/server/app/dashboard/limits.segments/_tree.segment.rsc +1 -1
  449. package/app/.next/server/app/dashboard/logs.html +1 -1
  450. package/app/.next/server/app/dashboard/logs.rsc +7 -7
  451. package/app/.next/server/app/dashboard/logs.segments/!KGRhc2hib2FyZCk/dashboard/logs/__PAGE__.segment.rsc +2 -2
  452. package/app/.next/server/app/dashboard/logs.segments/!KGRhc2hib2FyZCk/dashboard/logs.segment.rsc +1 -1
  453. package/app/.next/server/app/dashboard/logs.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  454. package/app/.next/server/app/dashboard/logs.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  455. package/app/.next/server/app/dashboard/logs.segments/_full.segment.rsc +7 -7
  456. package/app/.next/server/app/dashboard/logs.segments/_head.segment.rsc +1 -1
  457. package/app/.next/server/app/dashboard/logs.segments/_index.segment.rsc +4 -4
  458. package/app/.next/server/app/dashboard/logs.segments/_tree.segment.rsc +1 -1
  459. package/app/.next/server/app/dashboard/onboarding.html +1 -1
  460. package/app/.next/server/app/dashboard/onboarding.rsc +7 -7
  461. package/app/.next/server/app/dashboard/onboarding.segments/!KGRhc2hib2FyZCk/dashboard/onboarding/__PAGE__.segment.rsc +2 -2
  462. package/app/.next/server/app/dashboard/onboarding.segments/!KGRhc2hib2FyZCk/dashboard/onboarding.segment.rsc +1 -1
  463. package/app/.next/server/app/dashboard/onboarding.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  464. package/app/.next/server/app/dashboard/onboarding.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  465. package/app/.next/server/app/dashboard/onboarding.segments/_full.segment.rsc +7 -7
  466. package/app/.next/server/app/dashboard/onboarding.segments/_head.segment.rsc +1 -1
  467. package/app/.next/server/app/dashboard/onboarding.segments/_index.segment.rsc +4 -4
  468. package/app/.next/server/app/dashboard/onboarding.segments/_tree.segment.rsc +1 -1
  469. package/app/.next/server/app/dashboard/profile.html +1 -1
  470. package/app/.next/server/app/dashboard/profile.rsc +6 -6
  471. package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +1 -1
  472. package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
  473. package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  474. package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  475. package/app/.next/server/app/dashboard/profile.segments/_full.segment.rsc +6 -6
  476. package/app/.next/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
  477. package/app/.next/server/app/dashboard/profile.segments/_index.segment.rsc +4 -4
  478. package/app/.next/server/app/dashboard/profile.segments/_tree.segment.rsc +1 -1
  479. package/app/.next/server/app/dashboard/providers/new.html +2 -2
  480. package/app/.next/server/app/dashboard/providers/new.rsc +9 -9
  481. package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
  482. package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
  483. package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +3 -3
  484. package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  485. package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  486. package/app/.next/server/app/dashboard/providers/new.segments/_full.segment.rsc +9 -9
  487. package/app/.next/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
  488. package/app/.next/server/app/dashboard/providers/new.segments/_index.segment.rsc +4 -4
  489. package/app/.next/server/app/dashboard/providers/new.segments/_tree.segment.rsc +1 -1
  490. package/app/.next/server/app/dashboard/providers.html +2 -2
  491. package/app/.next/server/app/dashboard/providers.rsc +9 -9
  492. package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
  493. package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +3 -3
  494. package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  495. package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  496. package/app/.next/server/app/dashboard/providers.segments/_full.segment.rsc +9 -9
  497. package/app/.next/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
  498. package/app/.next/server/app/dashboard/providers.segments/_index.segment.rsc +4 -4
  499. package/app/.next/server/app/dashboard/providers.segments/_tree.segment.rsc +1 -1
  500. package/app/.next/server/app/dashboard/settings/pricing.html +2 -2
  501. package/app/.next/server/app/dashboard/settings/pricing.rsc +9 -9
  502. package/app/.next/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk/dashboard/settings/pricing/__PAGE__.segment.rsc +2 -2
  503. package/app/.next/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk/dashboard/settings/pricing.segment.rsc +1 -1
  504. package/app/.next/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk/dashboard/settings.segment.rsc +3 -3
  505. package/app/.next/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  506. package/app/.next/server/app/dashboard/settings/pricing.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  507. package/app/.next/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +9 -9
  508. package/app/.next/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  509. package/app/.next/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +4 -4
  510. package/app/.next/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +1 -1
  511. package/app/.next/server/app/dashboard/settings.html +1 -1
  512. package/app/.next/server/app/dashboard/settings.rsc +9 -9
  513. package/app/.next/server/app/dashboard/settings.segments/!KGRhc2hib2FyZCk/dashboard/settings/__PAGE__.segment.rsc +2 -2
  514. package/app/.next/server/app/dashboard/settings.segments/!KGRhc2hib2FyZCk/dashboard/settings.segment.rsc +3 -3
  515. package/app/.next/server/app/dashboard/settings.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  516. package/app/.next/server/app/dashboard/settings.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  517. package/app/.next/server/app/dashboard/settings.segments/_full.segment.rsc +9 -9
  518. package/app/.next/server/app/dashboard/settings.segments/_head.segment.rsc +1 -1
  519. package/app/.next/server/app/dashboard/settings.segments/_index.segment.rsc +4 -4
  520. package/app/.next/server/app/dashboard/settings.segments/_tree.segment.rsc +1 -1
  521. package/app/.next/server/app/dashboard/translator.html +2 -2
  522. package/app/.next/server/app/dashboard/translator.rsc +7 -7
  523. package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
  524. package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
  525. package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  526. package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  527. package/app/.next/server/app/dashboard/translator.segments/_full.segment.rsc +7 -7
  528. package/app/.next/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
  529. package/app/.next/server/app/dashboard/translator.segments/_index.segment.rsc +4 -4
  530. package/app/.next/server/app/dashboard/translator.segments/_tree.segment.rsc +1 -1
  531. package/app/.next/server/app/dashboard/usage.html +1 -1
  532. package/app/.next/server/app/dashboard/usage.rsc +7 -7
  533. package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
  534. package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
  535. package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  536. package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  537. package/app/.next/server/app/dashboard/usage.segments/_full.segment.rsc +7 -7
  538. package/app/.next/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
  539. package/app/.next/server/app/dashboard/usage.segments/_index.segment.rsc +4 -4
  540. package/app/.next/server/app/dashboard/usage.segments/_tree.segment.rsc +1 -1
  541. package/app/.next/server/app/docs/page.js +3 -3
  542. package/app/.next/server/app/docs/page.js.nft.json +1 -1
  543. package/app/.next/server/app/docs/page_client-reference-manifest.js +1 -1
  544. package/app/.next/server/app/docs.html +1 -1
  545. package/app/.next/server/app/docs.rsc +6 -6
  546. package/app/.next/server/app/docs.segments/_full.segment.rsc +6 -6
  547. package/app/.next/server/app/docs.segments/_head.segment.rsc +1 -1
  548. package/app/.next/server/app/docs.segments/_index.segment.rsc +4 -4
  549. package/app/.next/server/app/docs.segments/_tree.segment.rsc +1 -1
  550. package/app/.next/server/app/docs.segments/docs/__PAGE__.segment.rsc +2 -2
  551. package/app/.next/server/app/docs.segments/docs.segment.rsc +1 -1
  552. package/app/.next/server/app/forbidden/page.js +2 -2
  553. package/app/.next/server/app/forbidden/page.js.nft.json +1 -1
  554. package/app/.next/server/app/forbidden/page_client-reference-manifest.js +1 -1
  555. package/app/.next/server/app/forbidden.html +1 -1
  556. package/app/.next/server/app/forbidden.rsc +6 -6
  557. package/app/.next/server/app/forbidden.segments/_full.segment.rsc +6 -6
  558. package/app/.next/server/app/forbidden.segments/_head.segment.rsc +1 -1
  559. package/app/.next/server/app/forbidden.segments/_index.segment.rsc +4 -4
  560. package/app/.next/server/app/forbidden.segments/_tree.segment.rsc +1 -1
  561. package/app/.next/server/app/forbidden.segments/forbidden/__PAGE__.segment.rsc +2 -2
  562. package/app/.next/server/app/forbidden.segments/forbidden.segment.rsc +1 -1
  563. package/app/.next/server/app/forgot-password/page.js +2 -2
  564. package/app/.next/server/app/forgot-password/page.js.nft.json +1 -1
  565. package/app/.next/server/app/forgot-password/page_client-reference-manifest.js +1 -1
  566. package/app/.next/server/app/forgot-password.html +1 -1
  567. package/app/.next/server/app/forgot-password.rsc +6 -6
  568. package/app/.next/server/app/forgot-password.segments/_full.segment.rsc +6 -6
  569. package/app/.next/server/app/forgot-password.segments/_head.segment.rsc +1 -1
  570. package/app/.next/server/app/forgot-password.segments/_index.segment.rsc +4 -4
  571. package/app/.next/server/app/forgot-password.segments/_tree.segment.rsc +1 -1
  572. package/app/.next/server/app/forgot-password.segments/forgot-password/__PAGE__.segment.rsc +2 -2
  573. package/app/.next/server/app/forgot-password.segments/forgot-password.segment.rsc +1 -1
  574. package/app/.next/server/app/index.html +1 -1
  575. package/app/.next/server/app/index.rsc +5 -5
  576. package/app/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  577. package/app/.next/server/app/index.segments/_full.segment.rsc +5 -5
  578. package/app/.next/server/app/index.segments/_head.segment.rsc +1 -1
  579. package/app/.next/server/app/index.segments/_index.segment.rsc +4 -4
  580. package/app/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  581. package/app/.next/server/app/landing/page.js +2 -2
  582. package/app/.next/server/app/landing/page.js.nft.json +1 -1
  583. package/app/.next/server/app/landing/page_client-reference-manifest.js +1 -1
  584. package/app/.next/server/app/landing.html +1 -1
  585. package/app/.next/server/app/landing.rsc +6 -6
  586. package/app/.next/server/app/landing.segments/_full.segment.rsc +6 -6
  587. package/app/.next/server/app/landing.segments/_head.segment.rsc +1 -1
  588. package/app/.next/server/app/landing.segments/_index.segment.rsc +4 -4
  589. package/app/.next/server/app/landing.segments/_tree.segment.rsc +1 -1
  590. package/app/.next/server/app/landing.segments/landing/__PAGE__.segment.rsc +2 -2
  591. package/app/.next/server/app/landing.segments/landing.segment.rsc +1 -1
  592. package/app/.next/server/app/login/page.js +2 -2
  593. package/app/.next/server/app/login/page.js.nft.json +1 -1
  594. package/app/.next/server/app/login/page_client-reference-manifest.js +1 -1
  595. package/app/.next/server/app/login.html +1 -1
  596. package/app/.next/server/app/login.rsc +6 -6
  597. package/app/.next/server/app/login.segments/_full.segment.rsc +6 -6
  598. package/app/.next/server/app/login.segments/_head.segment.rsc +1 -1
  599. package/app/.next/server/app/login.segments/_index.segment.rsc +4 -4
  600. package/app/.next/server/app/login.segments/_tree.segment.rsc +1 -1
  601. package/app/.next/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  602. package/app/.next/server/app/login.segments/login.segment.rsc +1 -1
  603. package/app/.next/server/app/page.js +2 -2
  604. package/app/.next/server/app/page.js.nft.json +1 -1
  605. package/app/.next/server/app/page_client-reference-manifest.js +1 -1
  606. package/app/.next/server/app/privacy/page.js +2 -2
  607. package/app/.next/server/app/privacy/page.js.nft.json +1 -1
  608. package/app/.next/server/app/privacy/page_client-reference-manifest.js +1 -1
  609. package/app/.next/server/app/privacy.html +1 -1
  610. package/app/.next/server/app/privacy.rsc +6 -6
  611. package/app/.next/server/app/privacy.segments/_full.segment.rsc +6 -6
  612. package/app/.next/server/app/privacy.segments/_head.segment.rsc +1 -1
  613. package/app/.next/server/app/privacy.segments/_index.segment.rsc +4 -4
  614. package/app/.next/server/app/privacy.segments/_tree.segment.rsc +1 -1
  615. package/app/.next/server/app/privacy.segments/privacy/__PAGE__.segment.rsc +2 -2
  616. package/app/.next/server/app/privacy.segments/privacy.segment.rsc +1 -1
  617. package/app/.next/server/app/terms/page.js +2 -2
  618. package/app/.next/server/app/terms/page.js.nft.json +1 -1
  619. package/app/.next/server/app/terms/page_client-reference-manifest.js +1 -1
  620. package/app/.next/server/app/terms.html +1 -1
  621. package/app/.next/server/app/terms.rsc +6 -6
  622. package/app/.next/server/app/terms.segments/_full.segment.rsc +6 -6
  623. package/app/.next/server/app/terms.segments/_head.segment.rsc +1 -1
  624. package/app/.next/server/app/terms.segments/_index.segment.rsc +4 -4
  625. package/app/.next/server/app/terms.segments/_tree.segment.rsc +1 -1
  626. package/app/.next/server/app/terms.segments/terms/__PAGE__.segment.rsc +2 -2
  627. package/app/.next/server/app/terms.segments/terms.segment.rsc +1 -1
  628. package/app/.next/server/app-paths-manifest.json +39 -39
  629. package/app/.next/server/chunks/2180.js +1 -1
  630. package/app/.next/server/chunks/2767.js +10 -3
  631. package/app/.next/server/chunks/2901.js +2 -2
  632. package/app/.next/server/chunks/2910.js +1 -1
  633. package/app/.next/server/chunks/3447.js +1 -1
  634. package/app/.next/server/chunks/3596.js +1 -1
  635. package/app/.next/server/chunks/3699.js +1 -1
  636. package/app/.next/server/chunks/{1079.js → 3875.js} +3 -1
  637. package/app/.next/server/chunks/4488.js +1 -1
  638. package/app/.next/server/chunks/4555.js +2 -0
  639. package/app/.next/server/chunks/7109.js +8 -1
  640. package/app/.next/server/chunks/7544.js +1 -1
  641. package/app/.next/server/chunks/7669.js +1 -3
  642. package/app/.next/server/chunks/8020.js +3 -3
  643. package/app/.next/server/chunks/9340.js +1 -0
  644. package/app/.next/server/chunks/9342.js +1 -1
  645. package/app/.next/server/chunks/9548.js +1 -0
  646. package/app/.next/server/chunks/9824.js +2 -2
  647. package/app/.next/server/middleware-build-manifest.js +1 -1
  648. package/app/.next/server/middleware.js +3 -3
  649. package/app/.next/server/next-font-manifest.js +1 -1
  650. package/app/.next/server/next-font-manifest.json +1 -1
  651. package/app/.next/server/pages/404.html +1 -1
  652. package/app/.next/server/pages/500.html +2 -2
  653. package/app/.next/server/server-reference-manifest.js +1 -1
  654. package/app/.next/server/server-reference-manifest.json +1 -1
  655. package/app/.next/static/chunks/5846-2c4546bdeb7831c9.js +2 -0
  656. package/app/.next/static/chunks/{993-4cb24412f8681dc9.js → 993-752f870a62aaf876.js} +2 -2
  657. package/app/.next/static/chunks/app/(dashboard)/dashboard/analytics/loading-ce5214cdf489c9df.js +1 -0
  658. package/app/.next/static/chunks/app/(dashboard)/dashboard/analytics/{page-f8b57e41a1b6fce6.js → page-6344a09a1154d6dc.js} +1 -1
  659. package/app/.next/static/chunks/app/(dashboard)/dashboard/api-manager/page-3cd39fac822a566f.js +1 -0
  660. package/app/.next/static/chunks/app/(dashboard)/dashboard/audit-log/page-6ae6b46b8b9ee7cd.js +1 -0
  661. package/app/.next/static/chunks/app/(dashboard)/dashboard/cli-tools/page-8c9acf99ce223053.js +15 -0
  662. package/app/.next/static/chunks/app/(dashboard)/dashboard/combos/{page-f017a1a13b450ed3.js → page-857905019c595756.js} +1 -1
  663. package/app/.next/static/chunks/app/(dashboard)/dashboard/costs/{page-9495b294cfe54d73.js → page-5a82e1f5cca87cee.js} +1 -1
  664. package/app/.next/static/chunks/app/(dashboard)/dashboard/endpoint/page-d03f1918040e8465.js +1 -0
  665. package/app/.next/static/chunks/app/(dashboard)/dashboard/health/{page-58ea3e55f475ea7b.js → page-0169ca5192c1b893.js} +1 -1
  666. package/app/.next/static/chunks/app/(dashboard)/dashboard/limits/page-9d2db3ffd0cd5015.js +1 -0
  667. package/app/.next/static/chunks/app/(dashboard)/dashboard/logs/{page-88e667cb7ae99420.js → page-e14488a7109c0f13.js} +1 -1
  668. package/app/.next/static/chunks/app/(dashboard)/dashboard/onboarding/{page-19072ecdea202e4e.js → page-81203ee77efdd0cd.js} +1 -1
  669. package/app/.next/static/chunks/app/(dashboard)/dashboard/page-01aca3906b8c8ba7.js +1 -0
  670. package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-cb598848bd0a7e86.js +1 -0
  671. package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/{error-2f0177a2197dd556.js → error-f0730d6d62d02e82.js} +1 -1
  672. package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/{loading-99ab4d478260d53b.js → loading-59cbccd6d5185ca9.js} +1 -1
  673. package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/new/page-3ab9f92f47a73f63.js +1 -0
  674. package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/{page-7fec684a49291104.js → page-b2c004336791d971.js} +1 -1
  675. package/app/.next/static/chunks/app/(dashboard)/dashboard/settings/{error-e844916e39172c8b.js → error-cc85c3ff1f63aea6.js} +1 -1
  676. package/app/.next/static/chunks/app/(dashboard)/dashboard/settings/{loading-bb068659ee679ff4.js → loading-19fc771a287bcb4c.js} +1 -1
  677. package/app/.next/static/chunks/app/(dashboard)/dashboard/settings/page-1520c9997f0825c6.js +1 -0
  678. package/app/.next/static/chunks/app/(dashboard)/dashboard/settings/pricing/page-c2ad2471d6f91021.js +1 -0
  679. package/app/.next/static/chunks/app/(dashboard)/dashboard/translator/{page-775e1506821cac94.js → page-98cd4cff63d3f6ad.js} +1 -1
  680. package/app/.next/static/chunks/app/(dashboard)/dashboard/usage/{page-51a813eac9d71eed.js → page-bf5e1638364cc605.js} +1 -1
  681. package/app/.next/static/chunks/app/(dashboard)/{layout-cf710bbfb7c3ba11.js → layout-a51fdf255b9032e6.js} +1 -1
  682. package/app/.next/static/chunks/app/callback/{page-5c58a06902dd94ed.js → page-62842cc24b02df73.js} +1 -1
  683. package/app/.next/static/chunks/app/docs/page-806674e3087684d3.js +1 -0
  684. package/app/.next/static/chunks/app/{error-0d59fc4efafbc38c.js → error-f918d9961a2368d3.js} +1 -1
  685. package/app/.next/static/chunks/app/forbidden/page-ffdc570744f9c562.js +1 -0
  686. package/app/.next/static/chunks/app/forgot-password/page-8f9648bd3eecaa38.js +1 -0
  687. package/app/.next/static/chunks/app/global-error-504ff9093e2a997d.js +1 -0
  688. package/app/.next/static/chunks/app/landing/page-0de497612697b7a5.js +1 -0
  689. package/app/.next/static/chunks/app/layout-b2831c1c9ed30545.js +1 -0
  690. package/app/.next/static/chunks/app/login/{page-ca4dde4376ccd169.js → page-66d190ded7707ae3.js} +1 -1
  691. package/app/.next/static/chunks/app/not-found-11b712c853d93172.js +1 -0
  692. package/app/.next/static/chunks/app/privacy/page-806674e3087684d3.js +1 -0
  693. package/app/.next/static/chunks/app/terms/page-806674e3087684d3.js +1 -0
  694. package/app/.next/static/chunks/{main-app-c9da11a8061df107.js → main-app-ae230f6bf51a5edb.js} +1 -1
  695. package/app/logs/application/app.log +19725 -0
  696. package/app/package.json +1 -1
  697. package/app/server.js +1 -1
  698. package/package.json +1 -1
  699. package/app/.next/server/chunks/2760.js +0 -1
  700. package/app/.next/server/chunks/4168.js +0 -8
  701. package/app/.next/server/chunks/5248.js +0 -1
  702. package/app/.next/server/chunks/9979.js +0 -2
  703. package/app/.next/static/chunks/5846-1bd03fb1b4b4c154.js +0 -2
  704. package/app/.next/static/chunks/app/(dashboard)/dashboard/analytics/loading-6f1750506292c630.js +0 -1
  705. package/app/.next/static/chunks/app/(dashboard)/dashboard/api-manager/page-10e24238da560d00.js +0 -1
  706. package/app/.next/static/chunks/app/(dashboard)/dashboard/audit-log/page-c37f849e39b1bf02.js +0 -1
  707. package/app/.next/static/chunks/app/(dashboard)/dashboard/cli-tools/page-918d5f38d5cdbbc2.js +0 -15
  708. package/app/.next/static/chunks/app/(dashboard)/dashboard/endpoint/page-90f0a2f2cfc02a76.js +0 -1
  709. package/app/.next/static/chunks/app/(dashboard)/dashboard/limits/page-2a3cd7fd5ca34713.js +0 -1
  710. package/app/.next/static/chunks/app/(dashboard)/dashboard/page-d2651dc387e7fdfd.js +0 -1
  711. package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-56e8174ce9caec1b.js +0 -1
  712. package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/new/page-200bed170f9ee2b0.js +0 -1
  713. package/app/.next/static/chunks/app/(dashboard)/dashboard/settings/page-06d076294b449efb.js +0 -1
  714. package/app/.next/static/chunks/app/(dashboard)/dashboard/settings/pricing/page-1b3f14c99d3edf09.js +0 -1
  715. package/app/.next/static/chunks/app/docs/page-8f74097544a61b9d.js +0 -1
  716. package/app/.next/static/chunks/app/forbidden/page-86b6392f80a3ff69.js +0 -1
  717. package/app/.next/static/chunks/app/forgot-password/page-373672767bb0aae4.js +0 -1
  718. package/app/.next/static/chunks/app/global-error-41eef2a698918fc1.js +0 -1
  719. package/app/.next/static/chunks/app/landing/page-09741814aaca7548.js +0 -1
  720. package/app/.next/static/chunks/app/layout-3375493e8f9133db.js +0 -1
  721. package/app/.next/static/chunks/app/not-found-1dbd8c3e506fe00f.js +0 -1
  722. package/app/.next/static/chunks/app/privacy/page-8f74097544a61b9d.js +0 -1
  723. package/app/.next/static/chunks/app/terms/page-8f74097544a61b9d.js +0 -1
  724. /package/app/.next/static/{vSmFE3KrF-V4aQjNDtjwN → NQRiYUSKWLNu62D-HnLpL}/_buildManifest.js +0 -0
  725. /package/app/.next/static/{vSmFE3KrF-V4aQjNDtjwN → NQRiYUSKWLNu62D-HnLpL}/_ssgManifest.js +0 -0
@@ -1,15 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2326],{33782:(e,t,s)=>{Promise.resolve().then(s.bind(s,96758))},96758:(e,t,s)=>{"use strict";s.d(t,{default:()=>k});var a=s(95155),l=s(12115),r=s(40993);let i={claude:{id:"claude",name:"Claude Code",icon:"terminal",color:"#D97757",description:"Anthropic Claude Code CLI",configType:"env",envVars:{baseUrl:"ANTHROPIC_BASE_URL",model:"ANTHROPIC_MODEL",opusModel:"ANTHROPIC_DEFAULT_OPUS_MODEL",sonnetModel:"ANTHROPIC_DEFAULT_SONNET_MODEL",haikuModel:"ANTHROPIC_DEFAULT_HAIKU_MODEL"},modelAliases:["default","sonnet","opus","haiku","opusplan"],settingsFile:"~/.claude/settings.json",defaultModels:[{id:"opus",name:"Claude Opus",alias:"opus",envKey:"ANTHROPIC_DEFAULT_OPUS_MODEL",defaultValue:"cc/claude-opus-4-5-20251101"},{id:"sonnet",name:"Claude Sonnet",alias:"sonnet",envKey:"ANTHROPIC_DEFAULT_SONNET_MODEL",defaultValue:"cc/claude-sonnet-4-5-20250929"},{id:"haiku",name:"Claude Haiku",alias:"haiku",envKey:"ANTHROPIC_DEFAULT_HAIKU_MODEL",defaultValue:"cc/claude-haiku-4-5-20251001"}]},codex:{id:"codex",name:"OpenAI Codex CLI",image:"/providers/codex.png",color:"#10A37F",description:"OpenAI Codex CLI",configType:"custom"},droid:{id:"droid",name:"Factory Droid",image:"/providers/droid.png",color:"#00D4FF",description:"Factory Droid AI Assistant",configType:"custom"},openclaw:{id:"openclaw",name:"Open Claw",image:"/providers/openclaw.png",color:"#FF6B35",description:"Open Claw AI Assistant",configType:"custom"},cursor:{id:"cursor",name:"Cursor",image:"/providers/cursor.png",color:"#000000",description:"Cursor AI Code Editor",configType:"guide",requiresCloud:!0,notes:[{type:"warning",text:"Requires Cursor Pro account to use this feature."},{type:"cloudCheck",text:"Cursor routes requests through its own server, so local endpoint is not supported. Please enable Cloud Endpoint in Settings."}],guideSteps:[{step:1,title:"Open Settings",desc:"Go to Settings → Models"},{step:2,title:"Enable OpenAI API",desc:'Enable "OpenAI API key" option'},{step:3,title:"Base URL",value:"{{baseUrl}}",copyable:!0},{step:4,title:"API Key",type:"apiKeySelector"},{step:5,title:"Add Custom Model",desc:'Click "View All Model" → "Add Custom Model"'},{step:6,title:"Select Model",type:"modelSelector"}]},cline:{id:"cline",name:"Cline",image:"/providers/cline.png",color:"#00D1B2",description:"Cline AI Coding Assistant CLI",configType:"custom"},kilo:{id:"kilo",name:"Kilo Code",image:"/providers/kilocode.png",color:"#FF6B6B",description:"Kilo Code AI Assistant CLI",configType:"custom"},continue:{id:"continue",name:"Continue",image:"/providers/continue.png",color:"#7C3AED",description:"Continue AI Assistant",configType:"guide",guideSteps:[{step:1,title:"Open Config",desc:"Open Continue configuration file"},{step:2,title:"API Key",type:"apiKeySelector"},{step:3,title:"Select Model",type:"modelSelector"},{step:4,title:"Add Model Config",desc:"Add the following configuration to your models array:"}],codeBlock:{language:"json",code:`{
2
- "apiBase": "{{baseUrl}}",
3
- "title": "{{model}}",
4
- "model": "{{model}}",
5
- "provider": "openai",
6
- "apiKey": "{{apiKey}}"
7
- }`}},antigravity:{id:"antigravity",name:"Antigravity",image:"/providers/antigravity.png",color:"#4285F4",description:"Google Antigravity IDE with MITM",configType:"mitm",modelAliases:["claude-opus-4-5-thinking","claude-sonnet-4-5-thinking","claude-sonnet-4-5","gemini-3-pro-high"],defaultModels:[{id:"claude-opus-4-5-thinking",name:"Claude Opus 4.5 Thinking",alias:"claude-opus-4-5-thinking"},{id:"claude-sonnet-4-5-thinking",name:"Claude Sonnet 4.5 Thinking",alias:"claude-sonnet-4-5-thinking"},{id:"claude-sonnet-4-5",name:"Claude Sonnet 4.5",alias:"claude-sonnet-4-5"},{id:"gemini-3-pro-high",name:"Gemini 3 Pro High",alias:"gemini-3-pro-high"},{id:"gemini-3-flash",name:"Gemini 3 Flash",alias:"gemini-3-flash"}]}};var n=s(81135),o=s(5772);function c({effectiveConfigStatus:e,batchStatus:t,lastConfiguredAt:s=null}){let l=e||t?.configStatus||null,r={configured:{dotClass:"bg-green-500",badgeClass:"bg-green-500/10 text-green-600 dark:text-green-400",text:"Configured"},not_configured:{dotClass:"bg-yellow-500",badgeClass:"bg-yellow-500/10 text-yellow-600 dark:text-yellow-400",text:"Not configured"},not_installed:{dotClass:"bg-zinc-400 dark:bg-zinc-500",badgeClass:"bg-zinc-500/10 text-zinc-500 dark:text-zinc-400",text:"Not installed"},other:{dotClass:"bg-blue-500",badgeClass:"bg-blue-500/10 text-blue-600 dark:text-blue-400",text:"Custom"},unknown:{dotClass:"bg-zinc-400 dark:bg-zinc-500",badgeClass:"bg-zinc-500/10 text-zinc-500 dark:text-zinc-400",text:"Unknown"}},i=l?r[l]||r.unknown:null;return(0,a.jsxs)(a.Fragment,{children:[i&&(0,a.jsxs)("span",{className:`inline-flex items-center gap-1.5 px-2 py-0.5 text-[11px] font-medium rounded-full ${i.badgeClass}`,children:[(0,a.jsx)("span",{className:`size-1.5 rounded-full ${i.dotClass}`}),i.text]}),s?(0,a.jsxs)("span",{className:"inline-flex items-center gap-1 px-1.5 py-0.5 text-[10px] text-text-muted",title:`Last saved: ${new Date(s).toLocaleString()}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"schedule"}),function(e){let t=Date.now()-new Date(e).getTime();if(t<0)return"just now";let s=Math.floor(t/1e3);if(s<60)return"just now";let a=Math.floor(s/60);if(a<60)return`${a}m ago`;let l=Math.floor(a/60);if(l<24)return`${l}h ago`;let r=Math.floor(l/24);if(r<30)return`${r}d ago`;let i=Math.floor(r/30);return i<12?`${i}mo ago`:`${Math.floor(i/12)}y ago`}(s)]}):l&&"not_installed"!==l?(0,a.jsxs)("span",{className:"inline-flex items-center gap-1 px-1.5 py-0.5 text-[10px] text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"schedule"}),"Never"]}):null]})}let d=s(41463).env.NEXT_PUBLIC_CLOUD_URL;function x({tool:e,isExpanded:t,onToggle:s,activeProviders:i,modelMappings:n,onModelMappingChange:x,baseUrl:m,hasActiveProviders:u,apiKeys:p,cloudEnabled:h,batchStatus:g,lastConfiguredAt:f}){let y,b,j,[N,v]=(0,l.useState)(null),[k,w]=(0,l.useState)(!1),[C,S]=(0,l.useState)(!1),[_,A]=(0,l.useState)(!1),[O,E]=(0,l.useState)(null),[I,P]=(0,l.useState)(!1),[$,T]=(0,l.useState)(!1),[L,R]=(0,l.useState)(null),[M,z]=(0,l.useState)(""),[U,K]=(0,l.useState)({}),[F,D]=(0,l.useState)(!1),[B,H]=(0,l.useState)(""),J=(0,l.useRef)(!1),[q,W]=(0,l.useState)([]),[G,Z]=(0,l.useState)(!1),[V,X]=(0,l.useState)(null),Y=!!(N?.installed&&N?.runnable),Q=(()=>{if(!Y)return null;let e=N.settings?.env?.ANTHROPIC_BASE_URL;if(!e)return"not_configured";let t=e.includes("localhost")||e.includes("127.0.0.1"),s=h&&d&&e.startsWith(d);return t||s?"configured":"other"})()||g?.configStatus||null;(0,l.useEffect)(()=>{p?.length>0&&!M&&z(p[0].key)},[p,M]),(0,l.useEffect)(()=>{t&&!N&&(et(),ee(),er())},[t,N]);let ee=async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&K(t.aliases||{})}catch(e){console.log("Error fetching model aliases:",e)}};(0,l.useEffect)(()=>{if(N?.installed&&!J.current){J.current=!0;let t=N.settings?.env||{};e.defaultModels.forEach(e=>{if(e.envKey){let s=t[e.envKey]||e.defaultValue||"";s&&x(e.alias,s)}});let s=t.ANTHROPIC_AUTH_TOKEN;s&&p?.some(e=>e.key===s)&&z(s)}},[N,p,e.defaultModels,x]);let et=async()=>{w(!0);try{let e=await fetch("/api/cli-tools/claude-settings"),t=await e.json();v(t)}catch(e){v({installed:!1,error:e.message})}finally{w(!1)}},es=()=>{let e=B||m;return e.endsWith("/v1")?e:`${e}/v1`},ea=async()=>{S(!0),E(null);try{let t={ANTHROPIC_BASE_URL:es()},s=M?.trim()||(p?.length>0?p[0].key:null)||(h?null:"sk_omniroute");s&&(t.ANTHROPIC_AUTH_TOKEN=s),e.defaultModels.forEach(e=>{let s=n[e.alias];s&&e.envKey&&(t[e.envKey]=s)});let a=await fetch("/api/cli-tools/claude-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({env:t})}),l=await a.json();a.ok?(E({type:"success",text:"Settings applied successfully!"}),v(e=>({...e,hasBackup:!0,settings:{...e?.settings,env:t}}))):E({type:"error",text:l.error||"Failed to apply settings"})}catch(e){E({type:"error",text:e.message})}finally{S(!1)}},el=async()=>{A(!0),E(null);try{let t=await fetch("/api/cli-tools/claude-settings",{method:"DELETE"}),s=await t.json();t.ok?(E({type:"success",text:"Settings reset successfully!"}),e.defaultModels.forEach(e=>x(e.alias,e.defaultValue||"")),z("")):E({type:"error",text:s.error||"Failed to reset settings"})}catch(e){E({type:"error",text:e.message})}finally{A(!1)}},er=async()=>{try{let e=await fetch("/api/cli-tools/backups?tool=claude"),t=await e.json();e.ok&&W(t.backups||[])}catch(e){console.log("Error fetching backups:",e)}},ei=async e=>{X(e),E(null);try{let t=await fetch("/api/cli-tools/backups",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({tool:"claude",backupId:e})}),s=await t.json();t.ok?(E({type:"success",text:"Backup restored!"}),et(),er()):E({type:"error",text:s.error||"Failed to restore"})}catch(e){E({type:"error",text:e.message})}finally{X(null)}};return(0,a.jsxs)(r.Zp,{padding:"sm",className:"overflow-hidden",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:s,children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,a.jsx)(o.default,{src:"/providers/claude.png",alt:e.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:e=>{e.currentTarget.style.display="none"}})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("h3",{className:"font-medium text-sm",children:e.name}),(0,a.jsx)(c,{effectiveConfigStatus:Q,batchStatus:g,lastConfiguredAt:f})]}),(0,a.jsx)("p",{className:"text-xs text-text-muted truncate",children:e.description})]})]}),(0,a.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${t?"rotate-180":""}`,children:"expand_more"})]}),t&&(0,a.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[k&&(0,a.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,a.jsx)("span",{children:"Checking Claude CLI..."})]}),!k&&N&&!Y&&(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:N.installed?"Claude CLI not runnable":"Claude CLI not installed"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:N.installed?`Claude CLI was found but failed runtime healthcheck${N.reason?` (${N.reason})`:""}.`:"Please install Claude CLI to use this feature."})]}),(0,a.jsxs)(r.$n,{variant:"outline",size:"sm",onClick:()=>P(!I),children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:I?"expand_less":"help"}),I?"Hide":"How to Install"]})]}),I&&(0,a.jsxs)("div",{className:"p-4 bg-surface border border-border rounded-lg",children:[(0,a.jsx)("h4",{className:"font-medium mb-3",children:"Installation Guide"}),(0,a.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-text-muted mb-1",children:"macOS / Linux / Windows:"}),(0,a.jsx)("code",{className:"block px-3 py-2 bg-black/5 dark:bg-white/5 rounded font-mono text-xs",children:"npm install -g @anthropic-ai/claude-code"})]}),(0,a.jsxs)("p",{className:"text-text-muted",children:["After installation, run"," ",(0,a.jsx)("code",{className:"px-1 bg-black/5 dark:bg-white/5 rounded",children:"claude"})," to verify."]})]})]})]}),!k&&Y&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[N?.settings?.env?.ANTHROPIC_BASE_URL&&(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Current"}),(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,a.jsx)("span",{className:"flex-1 px-2 py-1.5 text-xs text-text-muted truncate",children:N.settings.env.ANTHROPIC_BASE_URL})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Base URL"}),(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,a.jsx)("input",{type:"text",value:(y=B||m).endsWith("/v1")?y:`${y}/v1`,onChange:e=>H(e.target.value),placeholder:"https://.../v1",className:"flex-1 px-2 py-1.5 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"}),B&&B!==m&&(0,a.jsx)("button",{onClick:()=>H(""),className:"p-1 text-text-muted hover:text-primary rounded transition-colors",title:"Reset to default",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"restart_alt"})})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"API Key"}),(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),p.length>0?(0,a.jsx)("select",{value:M,onChange:e=>z(e.target.value),className:"flex-1 px-2 py-1.5 bg-surface rounded text-xs border border-border focus:outline-none focus:ring-1 focus:ring-primary/50",children:p.map(e=>(0,a.jsx)("option",{value:e.key,children:e.key},e.id))}):(0,a.jsx)("span",{className:"flex-1 text-xs text-text-muted px-2 py-1.5",children:h?"No API keys - Create one in Keys page":"sk_omniroute (default)"})]}),e.defaultModels.map(e=>(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:e.name}),(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,a.jsx)("input",{type:"text",value:n[e.alias]||"",onChange:t=>x(e.alias,t.target.value),placeholder:"provider/model-id",className:"flex-1 px-2 py-1.5 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"}),(0,a.jsx)("button",{onClick:()=>{R(e.alias),T(!0)},disabled:!u,className:`px-2 py-1.5 rounded border text-xs transition-colors shrink-0 whitespace-nowrap ${u?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select Model"}),n[e.alias]&&(0,a.jsx)("button",{onClick:()=>x(e.alias,""),className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]},e.alias))]}),O&&(0,a.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===O.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===O.type?"check_circle":"error"}),(0,a.jsx)("span",{children:O.text})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsxs)(r.$n,{variant:"primary",size:"sm",onClick:ea,disabled:!u,loading:C,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,a.jsxs)(r.$n,{variant:"outline",size:"sm",onClick:el,disabled:!N?.hasOmniRoute,loading:_,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,a.jsxs)(r.$n,{variant:"ghost",size:"sm",onClick:()=>D(!0),children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]}),(0,a.jsx)("div",{className:"flex-1"}),(0,a.jsxs)(r.$n,{variant:"ghost",size:"sm",onClick:()=>{Z(!G),G||er()},children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"history"}),"Backups",q.length>0&&` (${q.length})`]})]}),G&&(0,a.jsxs)("div",{className:"mt-2 p-3 bg-surface border border-border rounded-lg",children:[(0,a.jsxs)("h4",{className:"text-xs font-semibold text-text-main mb-2 flex items-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"history"}),"Config Backups"]}),0===q.length?(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"No backups yet. Backups are created automatically before each Apply or Reset."}):(0,a.jsx)("div",{className:"space-y-1.5",children:q.map(e=>(0,a.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1.5 bg-black/5 dark:bg-white/5 rounded text-xs",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"description"}),(0,a.jsx)("span",{className:"flex-1 truncate font-mono",title:e.id,children:e.id}),(0,a.jsx)("span",{className:"text-text-muted whitespace-nowrap",children:new Date(e.createdAt).toLocaleString()}),(0,a.jsx)("button",{onClick:()=>ei(e.id),disabled:V===e.id,className:"px-2 py-0.5 bg-primary/10 text-primary rounded text-[10px] font-medium hover:bg-primary/20 transition-colors disabled:opacity-50",children:V===e.id?"...":"Restore"})]},e.id))})]})]})]}),(0,a.jsx)(r.rq,{isOpen:$,onClose:()=>T(!1),onSelect:e=>{L&&x(L,e.value)},selectedModel:L?n[L]:null,activeProviders:i,modelAliases:U,title:`Select model for ${L}`}),(0,a.jsx)(r.uR,{isOpen:F,onClose:()=>D(!1),title:"Claude CLI - Manual Configuration",configs:(b=M&&M.trim()?M:h?"<API_KEY_FROM_DASHBOARD>":"sk_omniroute",j={ANTHROPIC_BASE_URL:es(),ANTHROPIC_AUTH_TOKEN:b},e.defaultModels.forEach(e=>{let t=n[e.alias];t&&e.envKey&&(j[e.envKey]=t)}),[{filename:"~/.claude/settings.json",content:JSON.stringify({env:j},null,2)}])})]})}function m({tool:e,isExpanded:t,onToggle:s,baseUrl:i,apiKeys:n,activeProviders:d,cloudEnabled:x,batchStatus:m,lastConfiguredAt:u}){let p,h,g,[f,y]=(0,l.useState)(null),[b,j]=(0,l.useState)(!1),[N,v]=(0,l.useState)(!1),[k,w]=(0,l.useState)(!1),[C,S]=(0,l.useState)(null),[_,A]=(0,l.useState)(!1),[O,E]=(0,l.useState)(""),[I,P]=(0,l.useState)(""),[$,T]=(0,l.useState)(!1),[L,R]=(0,l.useState)({}),[M,z]=(0,l.useState)(!1),[U,K]=(0,l.useState)(""),[F,D]=(0,l.useState)([]),[B,H]=(0,l.useState)(!1),[J,q]=(0,l.useState)(""),[W,G]=(0,l.useState)(!1),[Z,V]=(0,l.useState)(null),[X,Y]=(0,l.useState)([]),[Q,ee]=(0,l.useState)(!1),[et,es]=(0,l.useState)(null),ea=!!(f?.installed&&f?.runnable);(0,l.useEffect)(()=>{n?.length>0&&!O&&E(n[0].key)},[n,O]),(0,l.useEffect)(()=>{t&&!f&&(en(),el(),ed(),ep())},[t,f]);let el=async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&R(t.aliases||{})}catch(e){console.log("Error fetching model aliases:",e)}};(0,l.useEffect)(()=>{if(f?.config){let e=f.config.match(/^model\s*=\s*"([^"]+)"/m);e&&P(e[1])}},[f]);let er=(ea?f.config?f.config.includes(i)||f.config.includes("localhost")||f.config.includes("127.0.0.1")?"configured":"other":"not_configured":null)||m?.configStatus||null,ei=()=>{let e=U||`${i}/v1`;return e.endsWith("/v1")?e:`${e}/v1`},en=async()=>{j(!0);try{let e=await fetch("/api/cli-tools/codex-settings"),t=await e.json();y(t)}catch(e){y({installed:!1,error:e.message})}finally{j(!1)}},eo=async()=>{v(!0),S(null);try{let e=O&&O.trim()||x?O:"sk_omniroute",t=await fetch("/api/cli-tools/codex-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:ei(),apiKey:e,model:I})}),s=await t.json();t.ok?(S({type:"success",text:"Settings applied successfully!"}),en()):S({type:"error",text:s.error||"Failed to apply settings"})}catch(e){S({type:"error",text:e.message})}finally{v(!1)}},ec=async()=>{w(!0),S(null);try{let e=await fetch("/api/cli-tools/codex-settings",{method:"DELETE"}),t=await e.json();e.ok?(S({type:"success",text:"Settings reset successfully!"}),P(""),en()):S({type:"error",text:t.error||"Failed to reset settings"})}catch(e){S({type:"error",text:e.message})}finally{w(!1)}},ed=async()=>{try{let e=await fetch("/api/cli-tools/codex-profiles"),t=await e.json();e.ok&&D(t.profiles||[])}catch(e){console.log("Error fetching profiles:",e)}},ex=async()=>{if(J.trim()){G(!0),S(null);try{let e=await fetch("/api/cli-tools/codex-profiles",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:J.trim()})}),t=await e.json();e.ok?(S({type:"success",text:`Profile "${J}" saved!`}),q(""),ed()):S({type:"error",text:t.error||"Failed to save profile"})}catch(e){S({type:"error",text:e.message})}finally{G(!1)}}},em=async e=>{V(e),S(null);try{let t=await fetch("/api/cli-tools/codex-profiles",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({profileId:e})}),s=await t.json();t.ok?(S({type:"success",text:s.message||"Profile activated!"}),en(),ep()):S({type:"error",text:s.error||"Failed to activate profile"})}catch(e){S({type:"error",text:e.message})}finally{V(null)}},eu=async e=>{try{(await fetch("/api/cli-tools/codex-profiles",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({profileId:e})})).ok&&ed()}catch(e){console.log("Error deleting profile:",e)}},ep=async()=>{try{let e=await fetch("/api/cli-tools/backups?tool=codex"),t=await e.json();e.ok&&Y(t.backups||[])}catch(e){console.log("Error fetching backups:",e)}},eh=async e=>{es(e),S(null);try{let t=await fetch("/api/cli-tools/backups",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({tool:"codex",backupId:e})}),s=await t.json();t.ok?(S({type:"success",text:"Backup restored!"}),en(),ep()):S({type:"error",text:s.error||"Failed to restore"})}catch(e){S({type:"error",text:e.message})}finally{es(null)}};return(0,a.jsxs)(r.Zp,{padding:"sm",className:"overflow-hidden",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:s,children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,a.jsx)(o.default,{src:"/providers/codex.png",alt:e.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:e=>{e.currentTarget.style.display="none"}})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("h3",{className:"font-medium text-sm",children:e.name}),(0,a.jsx)(c,{effectiveConfigStatus:er,batchStatus:m,lastConfiguredAt:u})]}),(0,a.jsx)("p",{className:"text-xs text-text-muted truncate",children:e.description})]})]}),(0,a.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${t?"rotate-180":""}`,children:"expand_more"})]}),t&&(0,a.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[b&&(0,a.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,a.jsx)("span",{children:"Checking Codex CLI..."})]}),!b&&f&&!ea&&(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:f.installed?"Codex CLI not runnable":"Codex CLI not installed"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:f.installed?`Codex CLI was found but failed runtime healthcheck${f.reason?` (${f.reason})`:""}.`:"Please install Codex CLI to use auto-apply feature."})]}),(0,a.jsxs)(r.$n,{variant:"outline",size:"sm",onClick:()=>A(!_),children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:_?"expand_less":"help"}),_?"Hide":"How to Install"]})]}),_&&(0,a.jsxs)("div",{className:"p-4 bg-surface border border-border rounded-lg",children:[(0,a.jsx)("h4",{className:"font-medium mb-3",children:"Installation Guide"}),(0,a.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-text-muted mb-1",children:"macOS / Linux / Windows:"}),(0,a.jsx)("code",{className:"block px-3 py-2 bg-black/5 dark:bg-white/5 rounded font-mono text-xs",children:"npm install -g @openai/codex"})]}),(0,a.jsxs)("p",{className:"text-text-muted",children:["After installation, run"," ",(0,a.jsx)("code",{className:"px-1 bg-black/5 dark:bg-white/5 rounded",children:"codex"})," to verify."]}),(0,a.jsx)("div",{className:"pt-2 border-t border-border",children:(0,a.jsxs)("p",{className:"text-text-muted text-xs",children:["Codex uses"," ",(0,a.jsx)("code",{className:"px-1 bg-black/5 dark:bg-white/5 rounded",children:"~/.codex/auth.json"})," ","with"," ",(0,a.jsx)("code",{className:"px-1 bg-black/5 dark:bg-white/5 rounded",children:"OPENAI_API_KEY"}),'. Click "Apply" to auto-configure.']})})]})]})]}),!b&&ea&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[f?.config&&((h=(p=f.config.match(/base_url\s*=\s*"([^"]+)"/))?p[1]:null)?(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Current"}),(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,a.jsx)("span",{className:"flex-1 px-2 py-1.5 text-xs text-text-muted truncate",children:h})]}):null),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Base URL"}),(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,a.jsx)("input",{type:"text",value:U||`${i}/v1`,onChange:e=>K(e.target.value),placeholder:"https://.../v1",className:"flex-1 px-2 py-1.5 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"}),U&&U!==`${i}/v1`&&(0,a.jsx)("button",{onClick:()=>K(""),className:"p-1 text-text-muted hover:text-primary rounded transition-colors",title:"Reset to default",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"restart_alt"})})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"API Key"}),(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),n.length>0?(0,a.jsx)("select",{value:O,onChange:e=>E(e.target.value),className:"flex-1 px-2 py-1.5 bg-surface rounded text-xs border border-border focus:outline-none focus:ring-1 focus:ring-primary/50",children:n.map(e=>(0,a.jsx)("option",{value:e.key,children:e.key},e.id))}):(0,a.jsx)("span",{className:"flex-1 text-xs text-text-muted px-2 py-1.5",children:x?"No API keys - Create one in Keys page":"sk_omniroute (default)"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Model"}),(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,a.jsx)("input",{type:"text",value:I,onChange:e=>P(e.target.value),placeholder:"provider/model-id",className:"flex-1 px-2 py-1.5 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"}),(0,a.jsx)("button",{onClick:()=>T(!0),disabled:!d?.length,className:`px-2 py-1.5 rounded border text-xs transition-colors shrink-0 whitespace-nowrap ${d?.length?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select Model"}),I&&(0,a.jsx)("button",{onClick:()=>P(""),className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})]}),C&&(0,a.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===C.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===C.type?"check_circle":"error"}),(0,a.jsx)("span",{children:C.text})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsxs)(r.$n,{variant:"primary",size:"sm",onClick:eo,disabled:!O||!I,loading:N,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,a.jsxs)(r.$n,{variant:"outline",size:"sm",onClick:ec,disabled:!f.hasOmniRoute,loading:k,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,a.jsxs)(r.$n,{variant:"ghost",size:"sm",onClick:()=>z(!0),children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]}),(0,a.jsx)("div",{className:"flex-1"}),(0,a.jsxs)(r.$n,{variant:"ghost",size:"sm",onClick:()=>{H(!B),B||ed()},children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"manage_accounts"}),"Profiles"]}),(0,a.jsxs)(r.$n,{variant:"ghost",size:"sm",onClick:()=>{ee(!Q),Q||ep()},children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"history"}),"Backups",X.length>0&&` (${X.length})`]})]}),B&&(0,a.jsxs)("div",{className:"mt-2 p-3 bg-surface border border-border rounded-lg",children:[(0,a.jsxs)("h4",{className:"text-xs font-semibold text-text-main mb-2 flex items-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"manage_accounts"}),"Saved Profiles"]}),0===F.length?(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"No profiles saved yet. Save current config as a profile below."}):(0,a.jsx)("div",{className:"space-y-1.5 mb-3",children:F.map(e=>(0,a.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1.5 bg-black/5 dark:bg-white/5 rounded text-xs",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"person"}),(0,a.jsx)("span",{className:"font-medium flex-1 truncate",children:e.name}),(0,a.jsx)("span",{className:"text-text-muted truncate max-w-[140px]",title:e.authLabel,children:e.authLabel}),(0,a.jsx)("button",{onClick:()=>em(e.id),disabled:Z===e.id,className:"px-2 py-0.5 bg-primary/10 text-primary rounded text-[10px] font-medium hover:bg-primary/20 transition-colors disabled:opacity-50",children:Z===e.id?"...":"Activate"}),(0,a.jsx)("button",{onClick:()=>eu(e.id),className:"p-0.5 text-text-muted hover:text-red-500 transition-colors",title:"Delete profile",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"delete"})})]},e.id))}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("input",{type:"text",value:J,onChange:e=>q(e.target.value),placeholder:"Profile name (e.g. Personal Account)",className:"flex-1 px-2 py-1.5 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50",onKeyDown:e=>"Enter"===e.key&&ex()}),(0,a.jsxs)(r.$n,{variant:"primary",size:"sm",onClick:ex,disabled:!J.trim(),loading:W,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Save Current"]})]})]}),Q&&(0,a.jsxs)("div",{className:"mt-2 p-3 bg-surface border border-border rounded-lg",children:[(0,a.jsxs)("h4",{className:"text-xs font-semibold text-text-main mb-2 flex items-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"history"}),"Config Backups"]}),0===X.length?(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"No backups yet. Backups are created automatically before each Apply or Reset."}):(0,a.jsx)("div",{className:"space-y-1.5",children:X.map(e=>(0,a.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1.5 bg-black/5 dark:bg-white/5 rounded text-xs",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"description"}),(0,a.jsx)("span",{className:"flex-1 truncate font-mono",title:e.id,children:e.id}),(0,a.jsx)("span",{className:"text-text-muted whitespace-nowrap",children:new Date(e.createdAt).toLocaleString()}),(0,a.jsx)("button",{onClick:()=>eh(e.id),disabled:et===e.id,className:"px-2 py-0.5 bg-primary/10 text-primary rounded text-[10px] font-medium hover:bg-primary/20 transition-colors disabled:opacity-50",children:et===e.id?"...":"Restore"})]},e.id))})]})]})]}),(0,a.jsx)(r.rq,{isOpen:$,onClose:()=>T(!1),onSelect:e=>{P(e.value),T(!1)},selectedModel:I,activeProviders:d,modelAliases:L,title:"Select Model for Codex"}),(0,a.jsx)(r.uR,{isOpen:M,onClose:()=>z(!1),title:"Codex CLI - Manual Configuration",configs:(g=O&&O.trim()?O:x?"<API_KEY_FROM_DASHBOARD>":"sk_omniroute",[{filename:"~/.codex/config.toml",content:`# OmniRoute Configuration for Codex CLI
8
- model = "${I}"
9
- model_provider = "omniroute"
10
-
11
- [model_providers.omniroute]
12
- name = "OmniRoute"
13
- base_url = "${ei()}"
14
- wire_api = "responses"
15
- `},{filename:"~/.codex/auth.json",content:JSON.stringify({OPENAI_API_KEY:g},null,2)}])})]})}let u=s(41463).env.NEXT_PUBLIC_CLOUD_URL;function p({tool:e,isExpanded:t,onToggle:s,baseUrl:i,hasActiveProviders:n,apiKeys:d,activeProviders:x,cloudEnabled:m,batchStatus:p,lastConfiguredAt:h}){let g,f,y,b,[j,N]=(0,l.useState)(null),[v,k]=(0,l.useState)(!1),[w,C]=(0,l.useState)(!1),[S,_]=(0,l.useState)(!1),[A,O]=(0,l.useState)(null),[E,I]=(0,l.useState)(""),[P,$]=(0,l.useState)(""),[T,L]=(0,l.useState)(!1),[R,M]=(0,l.useState)({}),[z,U]=(0,l.useState)(!1),[K,F]=(0,l.useState)(""),D=(0,l.useRef)(!1),[B,H]=(0,l.useState)([]),[J,q]=(0,l.useState)(!1),[W,G]=(0,l.useState)(null),Z=!!(j?.installed&&j?.runnable),V=(()=>{if(!Z)return null;let e=j.settings?.customModels?.find(e=>"custom:OmniRoute-0"===e.id);if(!e)return"not_configured";let t=e.baseUrl?.includes("localhost")||e.baseUrl?.includes("127.0.0.1"),s=m&&u&&e.baseUrl?.startsWith(u);return t||s?"configured":"other"})()||p?.configStatus||null;(0,l.useEffect)(()=>{d?.length>0&&!E&&I(d[0].key)},[d,E]),(0,l.useEffect)(()=>{t&&!j&&(Y(),X(),es())},[t,j]);let X=async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&M(t.aliases||{})}catch(e){console.log("Error fetching model aliases:",e)}};(0,l.useEffect)(()=>{if(j?.installed&&!D.current){D.current=!0;let e=j.settings?.customModels?.find(e=>"custom:OmniRoute-0"===e.id);e&&(e.model&&$(e.model),e.apiKey&&d?.some(t=>t.key===e.apiKey)&&I(e.apiKey))}},[j,d]);let Y=async()=>{k(!0);try{let e=await fetch("/api/cli-tools/droid-settings"),t=await e.json();N(t)}catch(e){N({installed:!1,error:e.message})}finally{k(!1)}},Q=()=>{let e=K||i;return e.endsWith("/v1")?e:`${e}/v1`},ee=async()=>{C(!0),O(null);try{let e=E?.trim()||(d?.length>0?d[0].key:null)||(m?null:"sk_omniroute"),t=await fetch("/api/cli-tools/droid-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:Q(),apiKey:e,model:P})}),s=await t.json();t.ok?(O({type:"success",text:"Settings applied successfully!"}),Y()):O({type:"error",text:s.error||"Failed to apply settings"})}catch(e){O({type:"error",text:e.message})}finally{C(!1)}},et=async()=>{_(!0),O(null);try{let e=await fetch("/api/cli-tools/droid-settings",{method:"DELETE"}),t=await e.json();e.ok?(O({type:"success",text:"Settings reset successfully!"}),$(""),I(""),Y()):O({type:"error",text:t.error||"Failed to reset settings"})}catch(e){O({type:"error",text:e.message})}finally{_(!1)}},es=async()=>{try{let e=await fetch("/api/cli-tools/backups?tool=droid"),t=await e.json();e.ok&&H(t.backups||[])}catch(e){console.log("Error fetching backups:",e)}},ea=async e=>{G(e),O(null);try{let t=await fetch("/api/cli-tools/backups",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({tool:"droid",backupId:e})}),s=await t.json();t.ok?(O({type:"success",text:"Backup restored!"}),Y(),es()):O({type:"error",text:s.error||"Failed to restore"})}catch(e){O({type:"error",text:e.message})}finally{G(null)}};return(0,a.jsxs)(r.Zp,{padding:"sm",className:"overflow-hidden",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:s,children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,a.jsx)(o.default,{src:"/providers/droid.png",alt:e.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:e=>{e.currentTarget.style.display="none"}})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("h3",{className:"font-medium text-sm",children:e.name}),(0,a.jsx)(c,{effectiveConfigStatus:V,batchStatus:p,lastConfiguredAt:h})]}),(0,a.jsx)("p",{className:"text-xs text-text-muted truncate",children:e.description})]})]}),(0,a.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${t?"rotate-180":""}`,children:"expand_more"})]}),t&&(0,a.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[v&&(0,a.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,a.jsx)("span",{children:"Checking Factory Droid CLI..."})]}),!v&&j&&!Z&&(0,a.jsxs)("div",{className:"flex items-center gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:j.installed?"Factory Droid CLI not runnable":"Factory Droid CLI not installed"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:j.installed?`Factory Droid CLI was found but failed runtime healthcheck${j.reason?` (${j.reason})`:""}.`:"Please install Factory Droid CLI to use this feature."})]})]}),!v&&Z&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[j?.settings?.customModels?.find(e=>"custom:OmniRoute-0"===e.id)?.baseUrl&&(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Current"}),(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,a.jsx)("span",{className:"flex-1 px-2 py-1.5 text-xs text-text-muted truncate",children:j.settings.customModels.find(e=>"custom:OmniRoute-0"===e.id).baseUrl})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Base URL"}),(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,a.jsx)("input",{type:"text",value:(g=K||i).endsWith("/v1")?g:`${g}/v1`,onChange:e=>F(e.target.value),placeholder:"https://.../v1",className:"flex-1 px-2 py-1.5 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"}),K&&K!==i&&(0,a.jsx)("button",{onClick:()=>F(""),className:"p-1 text-text-muted hover:text-primary rounded transition-colors",title:"Reset to default",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"restart_alt"})})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"API Key"}),(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),d.length>0?(0,a.jsx)("select",{value:E,onChange:e=>I(e.target.value),className:"flex-1 px-2 py-1.5 bg-surface rounded text-xs border border-border focus:outline-none focus:ring-1 focus:ring-primary/50",children:d.map(e=>(0,a.jsx)("option",{value:e.key,children:e.key},e.id))}):(0,a.jsx)("span",{className:"flex-1 text-xs text-text-muted px-2 py-1.5",children:m?"No API keys - Create one in Keys page":"sk_omniroute (default)"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Model"}),(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,a.jsx)("input",{type:"text",value:P,onChange:e=>$(e.target.value),placeholder:"provider/model-id",className:"flex-1 px-2 py-1.5 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"}),(0,a.jsx)("button",{onClick:()=>L(!0),disabled:!n,className:`px-2 py-1.5 rounded border text-xs transition-colors shrink-0 whitespace-nowrap ${n?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select Model"}),P&&(0,a.jsx)("button",{onClick:()=>$(""),className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})]}),A&&(0,a.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===A.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===A.type?"check_circle":"error"}),(0,a.jsx)("span",{children:A.text})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsxs)(r.$n,{variant:"primary",size:"sm",onClick:ee,disabled:!P,loading:w,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,a.jsxs)(r.$n,{variant:"outline",size:"sm",onClick:et,disabled:!j?.hasOmniRoute,loading:S,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,a.jsxs)(r.$n,{variant:"ghost",size:"sm",onClick:()=>U(!0),children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]}),(0,a.jsx)("div",{className:"flex-1"}),(0,a.jsxs)(r.$n,{variant:"ghost",size:"sm",onClick:()=>{q(!J),J||es()},children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"history"}),"Backups",B.length>0&&` (${B.length})`]})]}),J&&(0,a.jsxs)("div",{className:"mt-2 p-3 bg-surface border border-border rounded-lg",children:[(0,a.jsxs)("h4",{className:"text-xs font-semibold text-text-main mb-2 flex items-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"history"}),"Config Backups"]}),0===B.length?(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"No backups yet. Backups are created automatically before each Apply or Reset."}):(0,a.jsx)("div",{className:"space-y-1.5",children:B.map(e=>(0,a.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1.5 bg-black/5 dark:bg-white/5 rounded text-xs",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"description"}),(0,a.jsx)("span",{className:"flex-1 truncate font-mono",title:e.id,children:e.id}),(0,a.jsx)("span",{className:"text-text-muted whitespace-nowrap",children:new Date(e.createdAt).toLocaleString()}),(0,a.jsx)("button",{onClick:()=>ea(e.id),disabled:W===e.id,className:"px-2 py-0.5 bg-primary/10 text-primary rounded text-[10px] font-medium hover:bg-primary/20 transition-colors disabled:opacity-50",children:W===e.id?"...":"Restore"})]},e.id))})]})]})]}),(0,a.jsx)(r.rq,{isOpen:T,onClose:()=>L(!1),onSelect:e=>{$(e.value),L(!1)},selectedModel:P,activeProviders:x,modelAliases:R,title:"Select Model for Factory Droid"}),(0,a.jsx)(r.uR,{isOpen:z,onClose:()=>U(!1),title:"Factory Droid - Manual Configuration",configs:(f=E&&E.trim()?E:m?"<API_KEY_FROM_DASHBOARD>":"sk_omniroute",y={customModels:[{model:P||"provider/model-id",id:"custom:OmniRoute-0",index:0,baseUrl:Q(),apiKey:f,displayName:P||"provider/model-id",maxOutputTokens:131072,noImageSupport:!1,provider:"openai"}]},b="u">typeof navigator&&navigator.platform,[{filename:b?.toLowerCase().includes("win")?"%USERPROFILE%\\.factory\\settings.json":"~/.factory/settings.json",content:JSON.stringify(y,null,2)}])})]})}let h=s(41463).env.NEXT_PUBLIC_CLOUD_URL;function g({tool:e,isExpanded:t,onToggle:s,baseUrl:i,hasActiveProviders:n,apiKeys:d,activeProviders:x,cloudEnabled:m,batchStatus:u,lastConfiguredAt:p}){let g,f,[y,b]=(0,l.useState)(null),[j,N]=(0,l.useState)(!1),[v,k]=(0,l.useState)(!1),[w,C]=(0,l.useState)(!1),[S,_]=(0,l.useState)(null),[A,O]=(0,l.useState)(""),[E,I]=(0,l.useState)(""),[P,$]=(0,l.useState)(!1),[T,L]=(0,l.useState)({}),[R,M]=(0,l.useState)(!1),[z,U]=(0,l.useState)(""),K=(0,l.useRef)(!1),[F,D]=(0,l.useState)([]),[B,H]=(0,l.useState)(!1),[J,q]=(0,l.useState)(null),W=!!(y?.installed&&y?.runnable),G=(()=>{if(!W)return null;let e=y.settings?.models?.providers?.omniroute;if(!e)return"not_configured";let t=e.baseUrl?.includes("localhost")||e.baseUrl?.includes("127.0.0.1"),s=m&&h&&e.baseUrl?.startsWith(h);return t||s?"configured":"other"})()||u?.configStatus||null;(0,l.useEffect)(()=>{d?.length>0&&!A&&O(d[0].key)},[d,A]),(0,l.useEffect)(()=>{t&&!y&&(V(),Z(),ee())},[t,y]);let Z=async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&L(t.aliases||{})}catch(e){console.log("Error fetching model aliases:",e)}};(0,l.useEffect)(()=>{if(y?.installed&&!K.current){K.current=!0;let e=y.settings?.models?.providers?.omniroute;if(e){let t=y.settings?.agents?.defaults?.model?.primary;t&&I(t.replace("omniroute/","")),e.apiKey&&d?.some(t=>t.key===e.apiKey)&&O(e.apiKey)}}},[y,d]);let V=async()=>{N(!0);try{let e=await fetch("/api/cli-tools/openclaw-settings"),t=await e.json();b(t)}catch(e){b({installed:!1,error:e.message})}finally{N(!1)}},X=()=>{let e=z||i;return e.endsWith("/v1")?e:`${e}/v1`},Y=async()=>{k(!0),_(null);try{let e=A?.trim()||(d?.length>0?d[0].key:null)||(m?null:"sk_omniroute"),t=await fetch("/api/cli-tools/openclaw-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:X(),apiKey:e,model:E})}),s=await t.json();t.ok?(_({type:"success",text:"Settings applied successfully!"}),V()):_({type:"error",text:s.error||"Failed to apply settings"})}catch(e){_({type:"error",text:e.message})}finally{k(!1)}},Q=async()=>{C(!0),_(null);try{let e=await fetch("/api/cli-tools/openclaw-settings",{method:"DELETE"}),t=await e.json();e.ok?(_({type:"success",text:"Settings reset successfully!"}),I(""),O(""),V()):_({type:"error",text:t.error||"Failed to reset settings"})}catch(e){_({type:"error",text:e.message})}finally{C(!1)}},ee=async()=>{try{let e=await fetch("/api/cli-tools/backups?tool=openclaw"),t=await e.json();e.ok&&D(t.backups||[])}catch(e){console.log("Error fetching backups:",e)}},et=async e=>{q(e),_(null);try{let t=await fetch("/api/cli-tools/backups",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({tool:"openclaw",backupId:e})}),s=await t.json();t.ok?(_({type:"success",text:"Backup restored!"}),V(),ee()):_({type:"error",text:s.error||"Failed to restore"})}catch(e){_({type:"error",text:e.message})}finally{q(null)}};return(0,a.jsxs)(r.Zp,{padding:"sm",className:"overflow-hidden",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:s,children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,a.jsx)(o.default,{src:"/providers/openclaw.png",alt:e.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:e=>{e.currentTarget.style.display="none"}})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("h3",{className:"font-medium text-sm",children:e.name}),(0,a.jsx)(c,{effectiveConfigStatus:G,batchStatus:u,lastConfiguredAt:p})]}),(0,a.jsx)("p",{className:"text-xs text-text-muted truncate",children:e.description})]})]}),(0,a.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${t?"rotate-180":""}`,children:"expand_more"})]}),t&&(0,a.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[j&&(0,a.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,a.jsx)("span",{children:"Checking Open Claw CLI..."})]}),!j&&y&&!W&&(0,a.jsxs)("div",{className:"flex items-center gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:y.installed?"Open Claw CLI not runnable":"Open Claw CLI not installed"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:y.installed?`Open Claw CLI was found but failed runtime healthcheck${y.reason?` (${y.reason})`:""}.`:"Please install Open Claw CLI to use this feature."})]})]}),!j&&W&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[y?.settings?.models?.providers?.omniroute?.baseUrl&&(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Current"}),(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,a.jsx)("span",{className:"flex-1 px-2 py-1.5 text-xs text-text-muted truncate",children:y.settings.models.providers.omniroute.baseUrl})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Base URL"}),(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,a.jsx)("input",{type:"text",value:(g=z||i).endsWith("/v1")?g:`${g}/v1`,onChange:e=>U(e.target.value),placeholder:"https://.../v1",className:"flex-1 px-2 py-1.5 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"}),z&&z!==i&&(0,a.jsx)("button",{onClick:()=>U(""),className:"p-1 text-text-muted hover:text-primary rounded transition-colors",title:"Reset to default",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"restart_alt"})})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"API Key"}),(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),d.length>0?(0,a.jsx)("select",{value:A,onChange:e=>O(e.target.value),className:"flex-1 px-2 py-1.5 bg-surface rounded text-xs border border-border focus:outline-none focus:ring-1 focus:ring-primary/50",children:d.map(e=>(0,a.jsx)("option",{value:e.key,children:e.key},e.id))}):(0,a.jsx)("span",{className:"flex-1 text-xs text-text-muted px-2 py-1.5",children:m?"No API keys - Create one in Keys page":"sk_omniroute (default)"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Model"}),(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,a.jsx)("input",{type:"text",value:E,onChange:e=>I(e.target.value),placeholder:"provider/model-id",className:"flex-1 px-2 py-1.5 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"}),(0,a.jsx)("button",{onClick:()=>$(!0),disabled:!n,className:`px-2 py-1.5 rounded border text-xs transition-colors shrink-0 whitespace-nowrap ${n?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select Model"}),E&&(0,a.jsx)("button",{onClick:()=>I(""),className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})]}),S&&(0,a.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===S.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===S.type?"check_circle":"error"}),(0,a.jsx)("span",{children:S.text})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsxs)(r.$n,{variant:"primary",size:"sm",onClick:Y,disabled:!E,loading:v,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,a.jsxs)(r.$n,{variant:"outline",size:"sm",onClick:Q,disabled:!y?.hasOmniRoute,loading:w,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,a.jsxs)(r.$n,{variant:"ghost",size:"sm",onClick:()=>M(!0),children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]}),(0,a.jsx)("div",{className:"flex-1"}),(0,a.jsxs)(r.$n,{variant:"ghost",size:"sm",onClick:()=>{H(!B),B||ee()},children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"history"}),"Backups",F.length>0&&` (${F.length})`]})]}),B&&(0,a.jsxs)("div",{className:"mt-2 p-3 bg-surface border border-border rounded-lg",children:[(0,a.jsxs)("h4",{className:"text-xs font-semibold text-text-main mb-2 flex items-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"history"}),"Config Backups"]}),0===F.length?(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"No backups yet. Backups are created automatically before each Apply or Reset."}):(0,a.jsx)("div",{className:"space-y-1.5",children:F.map(e=>(0,a.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1.5 bg-black/5 dark:bg-white/5 rounded text-xs",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"description"}),(0,a.jsx)("span",{className:"flex-1 truncate font-mono",title:e.id,children:e.id}),(0,a.jsx)("span",{className:"text-text-muted whitespace-nowrap",children:new Date(e.createdAt).toLocaleString()}),(0,a.jsx)("button",{onClick:()=>et(e.id),disabled:J===e.id,className:"px-2 py-0.5 bg-primary/10 text-primary rounded text-[10px] font-medium hover:bg-primary/20 transition-colors disabled:opacity-50",children:J===e.id?"...":"Restore"})]},e.id))})]})]})]}),(0,a.jsx)(r.rq,{isOpen:P,onClose:()=>$(!1),onSelect:e=>{I(e.value),$(!1)},selectedModel:E,activeProviders:x,modelAliases:T,title:"Select Model for Open Claw"}),(0,a.jsx)(r.uR,{isOpen:R,onClose:()=>M(!1),title:"Open Claw - Manual Configuration",configs:(f=A&&A.trim()?A:m?"<API_KEY_FROM_DASHBOARD>":"sk_omniroute",[{filename:"~/.openclaw/openclaw.json",content:JSON.stringify({agents:{defaults:{model:{primary:`omniroute/${E||"provider/model-id"}`}}},models:{providers:{omniroute:{baseUrl:X(),apiKey:f,api:"openai-completions",models:[{id:E||"provider/model-id",name:(E||"provider/model-id").split("/").pop()}]}}}},null,2)}])})]})}let f=s(41463).env.NEXT_PUBLIC_CLOUD_URL;function y({tool:e,isExpanded:t,onToggle:s,baseUrl:i,hasActiveProviders:n,apiKeys:d,activeProviders:x,cloudEnabled:m,batchStatus:u,lastConfiguredAt:p}){let[h,g]=(0,l.useState)(null),[y,b]=(0,l.useState)(!1),[j,N]=(0,l.useState)(!1),[v,k]=(0,l.useState)(!1),[w,C]=(0,l.useState)(null),[S,_]=(0,l.useState)(""),[A,O]=(0,l.useState)(""),[E,I]=(0,l.useState)(!1),[P,$]=(0,l.useState)({}),[T,L]=(0,l.useState)(!1),[R,M]=(0,l.useState)(""),z=(0,l.useRef)(!1),[U,K]=(0,l.useState)([]),[F,D]=(0,l.useState)(!1),[B,H]=(0,l.useState)(null),J=!!(h?.installed&&h?.runnable),q=(()=>{if(!J)return null;if(!h.hasOmniRoute)return"not_configured";let e=h.settings?.openAiBaseUrl||"",t=e.includes("localhost")||e.includes("127.0.0.1"),s=m&&f&&e.startsWith(f);return t||s?"configured":"other"})(),W=q||u?.configStatus||null;(0,l.useEffect)(()=>{d?.length>0&&!S&&_(d[0].key)},[d,S]),(0,l.useEffect)(()=>{t&&!h&&(X(),G(),Z())},[t,h]),(0,l.useEffect)(()=>{if(h?.settings&&!z.current){let e=h.settings.openAiModelId;e&&(O(e),z.current=!0)}},[h]);let G=async()=>{try{let e=await fetch("/api/models/alias");if(e.ok){let t=await e.json();$(t.aliases||{})}}catch{}},Z=async()=>{try{let e=await fetch("/api/cli-tools/backups?tool=cline");if(e.ok){let t=await e.json();K(t.backups||[])}}catch{}},V=async e=>{H(e);try{let t=await fetch("/api/cli-tools/backups",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({tool:"cline",backupId:e})});if(t.ok)C({type:"success",text:"Backup restored! Reloading status..."}),await X(),await Z();else{let e=await t.json();C({type:"error",text:e.error||"Failed to restore backup"})}}catch(e){C({type:"error",text:e.message})}finally{H(null)}},X=async()=>{b(!0);try{let e=await fetch("/api/cli-tools/cline-settings"),t=await e.json();g(t)}catch(e){g({error:e.message})}finally{b(!1)}},Y=async()=>{N(!0),C(null);try{let e=R||i||"http://localhost:20128",t=e.endsWith("/v1")?e:`${e}/v1`,s=await fetch("/api/cli-tools/cline-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:t,apiKey:S||"sk_omniroute",model:A})}),a=await s.json();s.ok?(C({type:"success",text:a.message||"Applied!"}),await X(),await Z()):C({type:"error",text:a.error||"Failed"})}catch(e){C({type:"error",text:e.message})}finally{N(!1)}},Q=async()=>{k(!0),C(null);try{let e=await fetch("/api/cli-tools/cline-settings",{method:"DELETE"}),t=await e.json();e.ok?(C({type:"success",text:t.message||"Reset!"}),O(""),z.current=!1,await X(),await Z()):C({type:"error",text:t.error||"Failed"})}catch(e){C({type:"error",text:e.message})}finally{k(!1)}};return(0,a.jsxs)(r.Zp,{padding:"sm",className:"overflow-hidden",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:s,children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"size-8 rounded-lg flex items-center justify-center shrink-0",children:e.image?(0,a.jsx)(o.default,{src:e.image,alt:e.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:e=>{e.currentTarget.style.display="none"}}):(0,a.jsx)("span",{className:"material-symbols-outlined text-xl",style:{color:e.color},children:"terminal"})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("h3",{className:"font-medium text-sm",children:e.name}),(0,a.jsx)(c,{effectiveConfigStatus:W,batchStatus:u,lastConfiguredAt:p})]}),(0,a.jsx)("p",{className:"text-xs text-text-muted truncate",children:e.description})]})]}),(0,a.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${t?"rotate-180":""}`,children:"expand_more"})]}),t&&(0,a.jsxs)("div",{className:"mt-6 pt-6 border-t border-border",children:[y&&(0,a.jsxs)("div",{className:"flex items-center gap-2 text-text-muted text-sm",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-base",children:"progress_activity"}),(0,a.jsx)("span",{children:"Checking Cline CLI..."})]}),h&&!y&&(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start gap-3 p-3 rounded-lg border bg-bg-secondary/50 border-border",children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-lg ${J?"text-green-500":"text-yellow-500"}`,children:J?"check_circle":"warning"}),(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:J?"Cline CLI detected and ready":h.installed?"Cline CLI installed but not runnable":"Cline CLI not detected"}),h.commandPath&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Binary:"," ",(0,a.jsx)("code",{className:"px-1 py-0.5 rounded bg-black/5 dark:bg-white/10",children:h.commandPath})]}),h.globalStatePath&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Config:"," ",(0,a.jsx)("code",{className:"px-1 py-0.5 rounded bg-black/5 dark:bg-white/10",children:h.globalStatePath})]})]})]}),J&&(0,a.jsxs)(a.Fragment,{children:["configured"===q&&(0,a.jsxs)("div",{className:"flex items-start gap-3 p-3 bg-green-500/10 border border-green-500/30 rounded-lg",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-green-500 text-lg",children:"check_circle"}),(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)("p",{className:"text-sm text-green-700 dark:text-green-300",children:"OmniRoute is configured as OpenAI-compatible provider"}),(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Provider: ",(0,a.jsx)("strong",{children:"openai"})," • Model:"," ",(0,a.jsx)("strong",{children:h.settings?.openAiModelId||"—"})]})]})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-sm text-text-muted",children:"Model"}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("input",{type:"text",value:A,onChange:e=>O(e.target.value),placeholder:"provider/model-id",className:"flex-1 px-3 py-2 bg-bg-secondary rounded-lg text-sm border border-border focus:outline-none focus:ring-1 focus:ring-primary/50"}),(0,a.jsx)(r.$n,{variant:"outline",size:"sm",onClick:()=>I(!0),disabled:!n,children:"Select"}),(0,a.jsx)(r.$n,{variant:"ghost",size:"sm",onClick:()=>L(!0),children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"edit"})})]})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-sm text-text-muted",children:"API Key"}),d&&d.length>0?(0,a.jsx)("select",{value:S,onChange:e=>_(e.target.value),className:"px-3 py-2 bg-bg-secondary rounded-lg text-sm border border-border focus:outline-none focus:ring-1 focus:ring-primary/50",children:d.map(e=>(0,a.jsx)("option",{value:e.key,children:e.key},e.id))}):(0,a.jsx)("p",{className:"text-sm text-text-muted",children:m?"No API keys available":"Using default: sk_omniroute"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2 pt-2",children:[(0,a.jsxs)(r.$n,{variant:"primary",size:"sm",onClick:Y,disabled:!A,loading:j,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"configured"===q?"Update Config":"Apply Config"]}),"configured"===q&&(0,a.jsxs)(r.$n,{variant:"outline",size:"sm",onClick:Q,loading:v,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restart_alt"}),"Reset"]})]}),w&&(0,a.jsxs)("div",{className:`flex items-center gap-2 px-3 py-2 rounded-lg text-sm ${"success"===w.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"success"===w.type?"check_circle":"error"}),(0,a.jsx)("span",{children:w.text})]}),(0,a.jsxs)("div",{className:"border-t border-border pt-3 mt-1",children:[(0,a.jsxs)("button",{onClick:()=>D(!F),className:"flex items-center gap-2 text-sm text-text-muted hover:text-text transition-colors",children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[16px] transition-transform ${F?"rotate-90":""}`,children:"chevron_right"}),(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"backup"}),"Backups ",U.length>0&&`(${U.length})`]}),F&&U.length>0&&(0,a.jsx)("div",{className:"mt-2 flex flex-col gap-1.5 pl-6",children:U.map(e=>(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2 p-2 rounded bg-bg-secondary/50 text-xs",children:[(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsx)("span",{className:"font-medium",children:e.originalFile}),(0,a.jsx)("span",{className:"text-text-muted",children:new Date(e.createdAt).toLocaleString()})]}),(0,a.jsx)(r.$n,{variant:"ghost",size:"sm",onClick:()=>V(e.id),loading:B===e.id,children:"Restore"})]},e.id))}),F&&0===U.length&&(0,a.jsx)("p",{className:"mt-2 pl-6 text-xs text-text-muted",children:"No backups available."})]})]})]})]}),(0,a.jsx)(r.rq,{isOpen:E,onClose:()=>I(!1),onSelect:e=>{O(e.value),I(!1)},selectedModel:A,activeProviders:x,title:"Select Model for Cline"}),T&&(0,a.jsx)(r.uR,{isOpen:T,onClose:()=>L(!1),title:"Cline Manual Configuration",onApply:e=>{e.model&&O(e.model),e.apiKey&&_(e.apiKey),e.baseUrl&&M(e.baseUrl),L(!1)},currentConfig:{model:A,apiKey:S,baseUrl:R||i}})]})}function b({tool:e,isExpanded:t,onToggle:s,baseUrl:i,hasActiveProviders:n,apiKeys:d,activeProviders:x,cloudEnabled:m,batchStatus:u,lastConfiguredAt:p}){let[h,g]=(0,l.useState)(null),[f,y]=(0,l.useState)(!1),[b,j]=(0,l.useState)(!1),[N,v]=(0,l.useState)(!1),[k,w]=(0,l.useState)(null),[C,S]=(0,l.useState)(""),[_,A]=(0,l.useState)(""),[O,E]=(0,l.useState)(!1),[I,P]=(0,l.useState)({}),[$,T]=(0,l.useState)(!1),[L,R]=(0,l.useState)(""),M=(0,l.useRef)(!1),[z,U]=(0,l.useState)([]),[K,F]=(0,l.useState)(!1),[D,B]=(0,l.useState)(null),H=!!(h?.installed&&h?.runnable),J=H?h.hasOmniRoute?"configured":"not_configured":null,q=J||u?.configStatus||null;(0,l.useEffect)(()=>{d?.length>0&&!C&&S(d[0].key)},[d,C]),(0,l.useEffect)(()=>{t&&!h&&(V(),W(),G())},[t,h]);let W=async()=>{try{let e=await fetch("/api/models/alias");if(e.ok){let t=await e.json();P(t.aliases||{})}}catch{}},G=async()=>{try{let e=await fetch("/api/cli-tools/backups?tool=kilo");if(e.ok){let t=await e.json();U(t.backups||[])}}catch{}},Z=async e=>{B(e);try{let t=await fetch("/api/cli-tools/backups",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({tool:"kilo",backupId:e})});if(t.ok)w({type:"success",text:"Backup restored! Reloading status..."}),await V(),await G();else{let e=await t.json();w({type:"error",text:e.error||"Failed to restore backup"})}}catch(e){w({type:"error",text:e.message})}finally{B(null)}},V=async()=>{y(!0);try{let e=await fetch("/api/cli-tools/kilo-settings"),t=await e.json();g(t)}catch(e){g({error:e.message})}finally{y(!1)}},X=async()=>{j(!0),w(null);try{let e=L||i||"http://localhost:20128",t=e.endsWith("/v1")?e:`${e}/v1`,s=await fetch("/api/cli-tools/kilo-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:t,apiKey:C||"sk_omniroute",model:_})}),a=await s.json();s.ok?(w({type:"success",text:a.message||"Applied!"}),await V(),await G()):w({type:"error",text:a.error||"Failed"})}catch(e){w({type:"error",text:e.message})}finally{j(!1)}},Y=async()=>{v(!0),w(null);try{let e=await fetch("/api/cli-tools/kilo-settings",{method:"DELETE"}),t=await e.json();e.ok?(w({type:"success",text:t.message||"Reset!"}),A(""),M.current=!1,await V(),await G()):w({type:"error",text:t.error||"Failed"})}catch(e){w({type:"error",text:e.message})}finally{v(!1)}};return(0,a.jsxs)(r.Zp,{padding:"sm",className:"overflow-hidden",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:s,children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"size-8 rounded-lg flex items-center justify-center shrink-0",children:e.image?(0,a.jsx)(o.default,{src:e.image,alt:e.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:e=>{e.currentTarget.style.display="none"}}):(0,a.jsx)("span",{className:"material-symbols-outlined text-xl",style:{color:e.color},children:"terminal"})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("h3",{className:"font-medium text-sm",children:e.name}),(0,a.jsx)(c,{effectiveConfigStatus:q,batchStatus:u,lastConfiguredAt:p})]}),(0,a.jsx)("p",{className:"text-xs text-text-muted truncate",children:e.description})]})]}),(0,a.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${t?"rotate-180":""}`,children:"expand_more"})]}),t&&(0,a.jsxs)("div",{className:"mt-6 pt-6 border-t border-border",children:[f&&(0,a.jsxs)("div",{className:"flex items-center gap-2 text-text-muted text-sm",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-base",children:"progress_activity"}),(0,a.jsx)("span",{children:"Checking Kilo Code CLI..."})]}),h&&!f&&(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start gap-3 p-3 rounded-lg border bg-bg-secondary/50 border-border",children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-lg ${H?"text-green-500":"text-yellow-500"}`,children:H?"check_circle":"warning"}),(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:H?"Kilo Code CLI detected and ready":h.installed?"Kilo Code CLI installed but not runnable":"Kilo Code CLI not detected"}),h.commandPath&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Binary:"," ",(0,a.jsx)("code",{className:"px-1 py-0.5 rounded bg-black/5 dark:bg-white/10",children:h.commandPath})]}),h.authPath&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Auth:"," ",(0,a.jsx)("code",{className:"px-1 py-0.5 rounded bg-black/5 dark:bg-white/10",children:h.authPath})]})]})]}),H&&(0,a.jsxs)(a.Fragment,{children:["configured"===J&&(0,a.jsxs)("div",{className:"flex items-start gap-3 p-3 bg-green-500/10 border border-green-500/30 rounded-lg",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-green-500 text-lg",children:"check_circle"}),(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)("p",{className:"text-sm text-green-700 dark:text-green-300",children:"OmniRoute is configured as OpenAI-compatible provider"}),(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Providers: ",(0,a.jsx)("strong",{children:h.settings?.auth?.join(", ")||"—"})]})]})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-sm text-text-muted",children:"Model"}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("input",{type:"text",value:_,onChange:e=>A(e.target.value),placeholder:"provider/model-id",className:"flex-1 px-3 py-2 bg-bg-secondary rounded-lg text-sm border border-border focus:outline-none focus:ring-1 focus:ring-primary/50"}),(0,a.jsx)(r.$n,{variant:"outline",size:"sm",onClick:()=>E(!0),disabled:!n,children:"Select"}),(0,a.jsx)(r.$n,{variant:"ghost",size:"sm",onClick:()=>T(!0),children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"edit"})})]})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-sm text-text-muted",children:"API Key"}),d&&d.length>0?(0,a.jsx)("select",{value:C,onChange:e=>S(e.target.value),className:"px-3 py-2 bg-bg-secondary rounded-lg text-sm border border-border focus:outline-none focus:ring-1 focus:ring-primary/50",children:d.map(e=>(0,a.jsx)("option",{value:e.key,children:e.key},e.id))}):(0,a.jsx)("p",{className:"text-sm text-text-muted",children:m?"No API keys available":"Using default: sk_omniroute"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2 pt-2",children:[(0,a.jsxs)(r.$n,{variant:"primary",size:"sm",onClick:X,disabled:!_,loading:b,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"configured"===J?"Update Config":"Apply Config"]}),"configured"===J&&(0,a.jsxs)(r.$n,{variant:"outline",size:"sm",onClick:Y,loading:N,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restart_alt"}),"Reset"]})]}),k&&(0,a.jsxs)("div",{className:`flex items-center gap-2 px-3 py-2 rounded-lg text-sm ${"success"===k.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"success"===k.type?"check_circle":"error"}),(0,a.jsx)("span",{children:k.text})]}),(0,a.jsxs)("div",{className:"border-t border-border pt-3 mt-1",children:[(0,a.jsxs)("button",{onClick:()=>F(!K),className:"flex items-center gap-2 text-sm text-text-muted hover:text-text transition-colors",children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[16px] transition-transform ${K?"rotate-90":""}`,children:"chevron_right"}),(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"backup"}),"Backups ",z.length>0&&`(${z.length})`]}),K&&z.length>0&&(0,a.jsx)("div",{className:"mt-2 flex flex-col gap-1.5 pl-6",children:z.map(e=>(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2 p-2 rounded bg-bg-secondary/50 text-xs",children:[(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsx)("span",{className:"font-medium",children:e.originalFile}),(0,a.jsx)("span",{className:"text-text-muted",children:new Date(e.createdAt).toLocaleString()})]}),(0,a.jsx)(r.$n,{variant:"ghost",size:"sm",onClick:()=>Z(e.id),loading:D===e.id,children:"Restore"})]},e.id))}),K&&0===z.length&&(0,a.jsx)("p",{className:"mt-2 pl-6 text-xs text-text-muted",children:"No backups available."})]})]})]})]}),(0,a.jsx)(r.rq,{isOpen:O,onClose:()=>E(!1),onSelect:e=>{A(e.value),E(!1)},selectedModel:_,activeProviders:x,title:"Select Model for Kilo Code"}),$&&(0,a.jsx)(r.uR,{isOpen:$,onClose:()=>T(!1),title:"Kilo Code Manual Configuration",onApply:e=>{e.model&&A(e.model),e.apiKey&&S(e.apiKey),e.baseUrl&&R(e.baseUrl),T(!1)},currentConfig:{model:_,apiKey:C,baseUrl:L||i}})]})}function j({toolId:e,tool:t,isExpanded:s,onToggle:i,baseUrl:n,apiKeys:c,activeProviders:d=[],cloudEnabled:x=!1,batchStatus:m}){let u,p,h,[g,f]=(0,l.useState)(null),[y,b]=(0,l.useState)(!1),[j,N]=(0,l.useState)(""),[v,k]=(0,l.useState)(null),[w,C]=(0,l.useState)(null),[S,_]=(0,l.useState)(!1),A=(0,l.useRef)(!1),[O,E]=(0,l.useState)(()=>c?.length>0?c[0].key:"");(0,l.useEffect)(()=>{let t=localStorage.getItem(`omniroute-cli-model-${e}`);t&&N(t);let s=localStorage.getItem(`omniroute-cli-key-${e}`);s&&c?.some(e=>e.key===s)&&E(s)},[e,c]);let I=(0,l.useCallback)(t=>{N(t),t?localStorage.setItem(`omniroute-cli-model-${e}`,t):localStorage.removeItem(`omniroute-cli-model-${e}`)},[e]),P=(0,l.useCallback)(t=>{E(t),t&&localStorage.setItem(`omniroute-cli-key-${e}`,t)},[e]);(0,l.useEffect)(()=>{!s||v||A.current||(A.current=!0,fetch(`/api/cli-tools/runtime/${e}`).then(e=>e.json()).then(e=>k(e)).catch(e=>k({error:e?.message||"runtime_check_failed"})))},[s,v,e]);let $=e=>{let t=O&&O.trim()?O:x?"your-api-key":"sk_omniroute",s=n||"http://localhost:20128",a=s.endsWith("/v1")?s:`${s}/v1`;return e.replace(/\{\{baseUrl\}\}/g,a).replace(/\{\{apiKey\}\}/g,t).replace(/\{\{model\}\}/g,j||"provider/model-id")},T=async(e,t)=>{await navigator.clipboard.writeText($(e)),f(t),setTimeout(()=>f(null),2e3)},L=d.length>0,R=s&&null===v,M=async()=>{_(!0),C(null);try{let t=O&&O.trim()?O:x?"":"sk_omniroute",s=n||"http://localhost:20128",a=s.endsWith("/v1")?s:`${s}/v1`,l=await fetch(`/api/cli-tools/guide-settings/${e}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:a,apiKey:t,model:j})}),r=await l.json();l.ok?C({type:"success",text:r.message||"Configuration saved!"}):C({type:"error",text:r.error||"Failed to save"})}catch(e){C({type:"error",text:e.message})}finally{_(!1)}},z=["continue"].includes(e),U=()=>!t.requiresCloud||!!x;return(0,a.jsxs)(r.Zp,{padding:"sm",className:"overflow-hidden",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:i,children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"size-8 rounded-lg flex items-center justify-center shrink-0",children:t.image?(0,a.jsx)(o.default,{src:t.image,alt:t.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:e=>{e.currentTarget.style.display="none"}}):t.icon?(0,a.jsx)("span",{className:"material-symbols-outlined text-xl",style:{color:t.color},children:t.icon}):(0,a.jsx)(o.default,{src:`/providers/${e}.png`,alt:t.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:e=>{e.currentTarget.style.display="none"}})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("h3",{className:"font-medium text-sm",children:t.name}),(u=v?.reason==="not_required"||"guide"===t.configType,p=v?v.installed&&v.runnable:m?.installed&&m?.runnable,h=v?v.installed:m?.installed,u?(0,a.jsxs)("span",{className:"inline-flex items-center gap-1.5 px-2 py-0.5 text-[11px] font-medium rounded-full bg-blue-500/10 text-blue-600 dark:text-blue-400",children:[(0,a.jsx)("span",{className:"size-1.5 rounded-full bg-blue-500"}),"Guide"]}):p?(0,a.jsxs)("span",{className:"inline-flex items-center gap-1.5 px-2 py-0.5 text-[11px] font-medium rounded-full bg-green-500/10 text-green-600 dark:text-green-400",children:[(0,a.jsx)("span",{className:"size-1.5 rounded-full bg-green-500"}),"Detected"]}):!1===h&&(v||m)?(0,a.jsxs)("span",{className:"inline-flex items-center gap-1.5 px-2 py-0.5 text-[11px] font-medium rounded-full bg-zinc-500/10 text-zinc-500 dark:text-zinc-400",children:[(0,a.jsx)("span",{className:"size-1.5 rounded-full bg-zinc-400 dark:bg-zinc-500"}),"Not installed"]}):h&&!p&&(v||m)?(0,a.jsxs)("span",{className:"inline-flex items-center gap-1.5 px-2 py-0.5 text-[11px] font-medium rounded-full bg-yellow-500/10 text-yellow-600 dark:text-yellow-400",children:[(0,a.jsx)("span",{className:"size-1.5 rounded-full bg-yellow-500"}),"Not ready"]}):null)]}),(0,a.jsx)("p",{className:"text-xs text-text-muted truncate",children:t.description})]})]}),(0,a.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${s?"rotate-180":""}`,children:"expand_more"})]}),s&&(0,a.jsx)("div",{className:"mt-6 pt-6 border-t border-border",children:t.guideSteps?(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[R&&(0,a.jsxs)("div",{className:"flex items-center gap-2 text-text-muted text-sm",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-base",children:"progress_activity"}),(0,a.jsx)("span",{children:"Checking runtime..."})]}),!R&&v&&!v.error&&(0,a.jsxs)("div",{className:"flex items-start gap-3 p-3 bg-blue-500/10 border border-blue-500/30 rounded-lg",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-blue-500 text-lg",children:"not_required"===v.reason?"info":v.installed&&v.runnable?"check_circle":"warning"}),(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)("p",{className:"text-sm text-blue-700 dark:text-blue-300",children:"not_required"===v.reason?"Guide-only integration: no local binary required":v.installed&&v.runnable?"CLI runtime detected and healthy":v.installed?`CLI found but not runnable${v.reason?` (${v.reason})`:""}`:"CLI runtime not detected"}),v.commandPath&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Binary:"," ",(0,a.jsx)("code",{className:"px-1 py-0.5 rounded bg-black/5 dark:bg-white/10",children:v.commandPath})]}),v.configPath&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Config path:"," ",(0,a.jsx)("code",{className:"px-1 py-0.5 rounded bg-black/5 dark:bg-white/10",children:v.configPath})]})]})]}),!R&&v?.error&&(0,a.jsxs)("div",{className:"flex items-start gap-3 p-3 bg-red-500/10 border border-red-500/30 rounded-lg",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-red-500 text-lg",children:"error"}),(0,a.jsx)("p",{className:"text-sm text-red-600 dark:text-red-400",children:"Failed to check runtime status."})]}),t.notes&&0!==t.notes.length?(0,a.jsx)("div",{className:"flex flex-col gap-2 mb-4",children:t.notes.map((e,t)=>{if("cloudCheck"===e.type&&x)return null;let s="warning"===e.type,l="cloudCheck"===e.type&&!x,r="bg-blue-500/10 border-blue-500/30",i="text-blue-600 dark:text-blue-400",n="text-blue-500",o="info";return s?(r="bg-yellow-500/10 border-yellow-500/30",i="text-yellow-600 dark:text-yellow-400",n="text-yellow-500",o="warning"):l&&(r="bg-red-500/10 border-red-500/30",i="text-red-600 dark:text-red-400",n="text-red-500",o="error"),(0,a.jsxs)("div",{className:`flex items-start gap-3 p-3 rounded-lg border ${r}`,children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-lg ${n}`,children:o}),(0,a.jsx)("p",{className:`text-sm ${i}`,children:e.text})]},t)})}):null,U()&&t.guideSteps.map(e=>(0,a.jsxs)("div",{className:"flex items-start gap-4",children:[(0,a.jsx)("div",{className:"size-8 rounded-full flex items-center justify-center shrink-0 text-sm font-semibold text-white",style:{backgroundColor:t.color},children:e.step}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-text",children:e.title}),e.desc&&(0,a.jsx)("p",{className:"text-sm text-text-muted mt-0.5",children:e.desc}),"apiKeySelector"===e.type&&(0,a.jsx)("div",{className:"mt-2 flex items-center gap-2",children:c&&c.length>0?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("select",{value:O,onChange:e=>P(e.target.value),className:"flex-1 px-3 py-2 bg-bg-secondary rounded-lg text-sm border border-border focus:outline-none focus:ring-1 focus:ring-primary/50",children:c.map(e=>(0,a.jsx)("option",{value:e.key,children:e.key},e.id))}),(0,a.jsx)("button",{onClick:()=>T(O,"apiKey"),className:"shrink-0 px-3 py-2 bg-bg-secondary hover:bg-bg-tertiary rounded-lg border border-border transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-lg",children:"apiKey"===g?"check":"content_copy"})})]}):(0,a.jsx)("span",{className:"text-sm text-text-muted",children:x?"No API keys - Create one in Keys page":"sk_omniroute"})}),"modelSelector"===e.type&&(0,a.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[(0,a.jsx)("input",{type:"text",value:j,onChange:e=>I(e.target.value),placeholder:"provider/model-id",className:"flex-1 px-3 py-2 bg-bg-secondary rounded-lg text-sm border border-border focus:outline-none focus:ring-1 focus:ring-primary/50"}),(0,a.jsx)("button",{onClick:()=>b(!0),disabled:!L,className:`shrink-0 px-3 py-2 rounded-lg border text-sm transition-colors ${L?"bg-bg-secondary border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select Model"}),j&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("button",{onClick:()=>T(j,"model"),className:"shrink-0 px-3 py-2 bg-bg-secondary hover:bg-bg-tertiary rounded-lg border border-border transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-lg",children:"model"===g?"check":"content_copy"})}),(0,a.jsx)("button",{onClick:()=>I(""),className:"p-2 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-lg",children:"close"})})]})]}),e.value&&(0,a.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[(0,a.jsx)("code",{className:"flex-1 px-3 py-2 bg-bg-secondary rounded-lg text-sm font-mono border border-border truncate",children:$(e.value)}),e.copyable&&(0,a.jsx)("button",{onClick:()=>T(e.value,`${e.step}-${e.title}`),className:"shrink-0 px-3 py-2 bg-bg-secondary hover:bg-bg-tertiary rounded-lg border border-border transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-lg",children:g===`${e.step}-${e.title}`?"check":"content_copy"})})]})]})]},e.step)),U()&&t.codeBlock&&(0,a.jsxs)("div",{className:"mt-2",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted uppercase tracking-wide",children:t.codeBlock.language}),(0,a.jsxs)("button",{onClick:()=>T(t.codeBlock.code,"codeblock"),className:"flex items-center gap-1 px-2 py-1 text-xs bg-bg-secondary hover:bg-bg-tertiary rounded border border-border transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"codeblock"===g?"check":"content_copy"}),"codeblock"===g?"Copied!":"Copy"]})]}),(0,a.jsx)("pre",{className:"p-4 bg-bg-secondary rounded-lg border border-border overflow-x-auto",children:(0,a.jsx)("code",{className:"text-sm font-mono whitespace-pre",children:$(t.codeBlock.code)})})]}),U()&&(0,a.jsxs)("div",{className:"mt-2",children:[w&&(0,a.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs mb-2 ${"success"===w.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===w.type?"check_circle":"error"}),(0,a.jsx)("span",{children:w.text})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[z&&(0,a.jsxs)(r.$n,{variant:"primary",size:"sm",onClick:M,disabled:!j,loading:S,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Save Config"]}),t.codeBlock&&(0,a.jsxs)(r.$n,{variant:z?"outline":"primary",size:"sm",onClick:()=>T(t.codeBlock.code,"codeblock"),children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"codeblock"===g?"check":"content_copy"}),"codeblock"===g?"Copied!":"Copy Config"]}),j&&(0,a.jsxs)("span",{className:"text-xs text-text-muted flex items-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-green-500",children:"check_circle"}),"Selection saved"]})]})]})]}):(0,a.jsx)("p",{className:"text-text-muted text-sm",children:"Coming soon..."})}),(0,a.jsx)(r.rq,{isOpen:y,onClose:()=>b(!1),onSelect:e=>{I(e.value)},selectedModel:j,activeProviders:d,title:"Select Model"})]})}function N({tool:e,isExpanded:t,onToggle:s,baseUrl:i,apiKeys:n,activeProviders:c,hasActiveProviders:d,cloudEnabled:x}){let[m,u]=(0,l.useState)(null),[p,h]=(0,l.useState)(!1),[g,f]=(0,l.useState)(!1),[y,b]=(0,l.useState)(""),[j,N]=(0,l.useState)(""),[v,k]=(0,l.useState)(null),[w,C]=(0,l.useState)({}),[S,_]=(0,l.useState)(!1),[A,O]=(0,l.useState)(null);(0,l.useEffect)(()=>{n?.length>0&&!j&&N(n[0].key)},[n,j]),(0,l.useEffect)(()=>{t&&!m&&(I(),E())},[t,m]);let E=async()=>{try{let e=await fetch("/api/cli-tools/antigravity-mitm/alias?tool=antigravity");if(e.ok){let t=(await e.json()).aliases||{};Object.keys(t).length>0&&C(t)}}catch(e){console.log("Error loading saved mappings:",e)}},I=async()=>{try{let e=await fetch("/api/cli-tools/antigravity-mitm");if(e.ok){let t=await e.json();u(t)}}catch(e){console.log("Error fetching status:",e),u({running:!1})}},P="u">typeof navigator&&navigator.userAgent?.includes("Windows"),$=async e=>{h(!0),k(null);try{let t=j?.trim()||(n?.length>0?n[0].key:null)||(x?null:"sk_omniroute"),s=await fetch("/api/cli-tools/antigravity-mitm",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiKey:t,sudoPassword:e})}),a=await s.json();s.ok?(k({type:"success",text:"MITM started"}),f(!1),b(""),I()):k({type:"error",text:a.error||"Failed to start"})}catch(e){k({type:"error",text:e.message})}finally{h(!1)}},T=async e=>{h(!0),k(null);try{let t=await fetch("/api/cli-tools/antigravity-mitm",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({sudoPassword:e})}),s=await t.json();t.ok?(k({type:"success",text:"MITM stopped"}),f(!1),b(""),I()):k({type:"error",text:s.error||"Failed to stop"})}catch(e){k({type:"error",text:e.message})}finally{h(!1)}},L=()=>{y.trim()?m?.running?T(y):$(y):k({type:"error",text:"Sudo password is required"})},R=(e,t)=>{C(s=>({...s,[e]:t}))},M=async()=>{h(!0),k(null);try{let e=await fetch("/api/cli-tools/antigravity-mitm/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({tool:"antigravity",mappings:w})});if(!e.ok){let t=await e.json();throw Error(t.error||"Failed to save mappings")}k({type:"success",text:"Mappings saved!"})}catch(e){k({type:"error",text:e.message})}finally{h(!1)}},z=m?.running;return(0,a.jsxs)(r.Zp,{padding:"sm",className:"overflow-hidden",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:s,children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,a.jsx)(o.default,{src:"/providers/antigravity.png",alt:e.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:e=>{e.currentTarget.style.display="none"}})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("h3",{className:"font-medium text-sm",children:e.name}),z?(0,a.jsx)(r.Ex,{variant:"success",size:"sm",children:"Active"}):(0,a.jsx)(r.Ex,{variant:"default",size:"sm",children:"Inactive"})]}),(0,a.jsx)("p",{className:"text-xs text-text-muted truncate",children:e.description})]})]}),(0,a.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${t?"rotate-180":""}`,children:"expand_more"})]}),t&&(0,a.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[(0,a.jsx)("div",{className:"flex items-center gap-2",children:z?(0,a.jsxs)("button",{onClick:()=>{P||m?.hasCachedPassword?T(""):(f(!0),k(null))},disabled:p,className:"px-4 py-2 rounded-lg bg-red-500/10 border border-red-500/30 text-red-500 font-medium text-sm flex items-center gap-2 hover:bg-red-500/20 transition-colors disabled:opacity-50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"stop_circle"}),"Stop MITM"]}):(0,a.jsxs)("button",{onClick:()=>{P||m?.hasCachedPassword?$(""):(f(!0),k(null))},disabled:p||!d,className:"px-4 py-2 rounded-lg bg-primary/10 border border-primary/30 text-primary font-medium text-sm flex items-center gap-2 hover:bg-primary/20 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"play_circle"}),"Start MITM"]})}),v?.type==="error"&&(0,a.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1.5 rounded text-xs bg-red-500/10 text-red-600",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"error"}),(0,a.jsx)("span",{children:v.text})]}),z&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"API Key"}),(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),n.length>0?(0,a.jsx)("select",{value:j,onChange:e=>N(e.target.value),className:"flex-1 px-2 py-1.5 bg-surface rounded text-xs border border-border focus:outline-none focus:ring-1 focus:ring-primary/50",children:n.map(e=>(0,a.jsx)("option",{value:e.key,children:e.key},e.id))}):(0,a.jsx)("span",{className:"flex-1 text-xs text-text-muted px-2 py-1.5",children:x?"No API keys - Create one in Keys page":"sk_omniroute (default)"})]}),e.defaultModels.map(e=>(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:e.name}),(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,a.jsx)("input",{type:"text",value:w[e.alias]||"",onChange:t=>R(e.alias,t.target.value),placeholder:"provider/model-id",className:"flex-1 px-2 py-1.5 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"}),(0,a.jsx)("button",{onClick:()=>{O(e.alias),_(!0)},disabled:!d,className:`px-2 py-1.5 rounded border text-xs transition-colors shrink-0 whitespace-nowrap ${d?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select"}),w[e.alias]&&(0,a.jsx)("button",{onClick:()=>R(e.alias,""),className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]},e.alias)),(0,a.jsx)("div",{className:"flex items-center gap-2",children:(0,a.jsxs)(r.$n,{variant:"primary",size:"sm",onClick:M,disabled:p||0===Object.keys(w).length,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Save Mappings"]})})]}),!z&&(0,a.jsxs)("div",{className:"flex flex-col gap-1.5 px-1",children:[(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:[(0,a.jsx)("span",{className:"font-medium text-text-main",children:"How it works:"})," Intercepts Antigravity traffic via DNS redirect, letting you reroute models through OmniRoute."]}),(0,a.jsxs)("div",{className:"flex flex-col gap-0.5 text-[11px] text-text-muted",children:[(0,a.jsx)("span",{children:"1. Generates SSL cert & adds to system keychain"}),(0,a.jsxs)("span",{children:["2. Redirects"," ",(0,a.jsx)("code",{className:"text-[10px] bg-surface px-1 rounded",children:"daily-cloudcode-pa.googleapis.com"})," ","→ localhost"]}),(0,a.jsx)("span",{children:"3. Maps Antigravity models to any provider via OmniRoute"})]})]})]}),(0,a.jsx)(r.aF,{isOpen:g,onClose:()=>{f(!1),b(""),k(null)},title:"Sudo Password Required",size:"sm",children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start gap-3 p-3 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-yellow-500 text-[20px]",children:"warning"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Required for SSL certificate and DNS configuration"})]}),(0,a.jsx)(r.pd,{type:"password",placeholder:"Enter sudo password",value:y,onChange:e=>b(e.target.value),onKeyDown:e=>{"Enter"!==e.key||p||L()}}),v&&(0,a.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===v.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===v.type?"check_circle":"error"}),(0,a.jsx)("span",{children:v.text})]}),(0,a.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[(0,a.jsx)(r.$n,{variant:"ghost",size:"sm",onClick:()=>{f(!1),b(""),k(null)},disabled:p,children:"Cancel"}),(0,a.jsx)(r.$n,{variant:"primary",size:"sm",onClick:L,loading:p,children:"Confirm"})]})]})}),(0,a.jsx)(r.rq,{isOpen:S,onClose:()=>_(!1),onSelect:e=>{A&&C(t=>({...t,[A]:e.value}))},selectedModel:A?w[A]:null,activeProviders:c,title:`Select model for ${A}`})]})}s(41463).env.NEXT_PUBLIC_CLOUD_URL;let v=s(41463).env.NEXT_PUBLIC_CLOUD_URL;function k({machineId:e}){let t,s,o,[c,d]=(0,l.useState)([]),[u,h]=(0,l.useState)(!0),[f,k]=(0,l.useState)(null),[w,C]=(0,l.useState)({}),[S,_]=(0,l.useState)(!1),[A,O]=(0,l.useState)([]),[E,I]=(0,l.useState)({}),[P,$]=(0,l.useState)(!1);(0,l.useEffect)(()=>{M(),T(),L(),R()},[]);let T=async()=>{try{let e=await fetch("/api/settings");if(e.ok){let t=await e.json();_(t.cloudEnabled||!1)}}catch(e){console.log("Error loading cloud settings:",e)}},L=async()=>{try{let e=await fetch("/api/keys");if(e.ok){let t=await e.json();O(t.keys||[])}}catch(e){console.log("Error fetching API keys:",e)}},R=async()=>{try{let e=await fetch("/api/cli-tools/status");if(e.ok){let t=await e.json();I(t||{})}}catch(e){console.log("Error fetching CLI tool statuses:",e)}finally{$(!0)}},M=async()=>{try{let e=await fetch("/api/providers"),t=await e.json();e.ok&&d(t.connections||[])}catch(e){console.log("Error fetching connections:",e)}finally{h(!1)}},z=()=>c.filter(e=>!1!==e.isActive),U=(0,l.useCallback)((e,t,s)=>{C(a=>a[e]?.[t]===s?a:{...a,[e]:{...a[e],[t]:s}})},[]);if(u||!P)return(0,a.jsx)("div",{className:"flex flex-col gap-6",children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)(r.Qv,{}),(0,a.jsx)(r.Qv,{}),(0,a.jsx)(r.Qv,{})]})});let K=(t=z(),s=[],o=new Set,t.forEach(e=>{let t=n.Xg[e.provider]||e.provider;(0,n.KC)(e.provider).forEach(a=>{let l=`${t}/${a.id}`;o.has(l)||(o.add(l),s.push({value:l,label:`${t}/${a.id}`,provider:e.provider,alias:t,connectionName:e.name,modelId:a.id}))})}),s).length>0;return(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[!K&&(0,a.jsx)(r.Zp,{className:"border-yellow-500/50 bg-yellow-500/5",children:(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:"No active providers"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Please add and connect providers first to configure CLI tools."})]})]})}),(0,a.jsx)("div",{className:"flex flex-col gap-4",children:Object.entries(i).map(([e,t])=>((e,t)=>{let s={tool:t,isExpanded:f===e,onToggle:()=>k(f===e?null:e),baseUrl:S&&v?v:window.location.origin,apiKeys:A,batchStatus:E[e]||null,lastConfiguredAt:E[e]?.lastConfiguredAt||null};switch(e){case"claude":return(0,a.jsx)(x,{...s,activeProviders:z(),modelMappings:w[e]||{},onModelMappingChange:(t,s)=>U(e,t,s),hasActiveProviders:K,cloudEnabled:S},e);case"codex":return(0,a.jsx)(m,{...s,activeProviders:z(),cloudEnabled:S},e);case"droid":return(0,a.jsx)(p,{...s,activeProviders:z(),hasActiveProviders:K,cloudEnabled:S},e);case"openclaw":return(0,a.jsx)(g,{...s,activeProviders:z(),hasActiveProviders:K,cloudEnabled:S},e);case"antigravity":return(0,a.jsx)(N,{...s,activeProviders:z(),hasActiveProviders:K,cloudEnabled:S},e);case"cline":return(0,a.jsx)(y,{...s,activeProviders:z(),hasActiveProviders:K,cloudEnabled:S},e);case"kilo":return(0,a.jsx)(b,{...s,activeProviders:z(),hasActiveProviders:K,cloudEnabled:S},e);default:return(0,a.jsx)(j,{toolId:e,...s,activeProviders:z(),cloudEnabled:S},e)}})(e,t))})]})}}},e=>{e.O(0,[8500,9751,782,1149,5846,993,8441,3794,7358],()=>e(e.s=33782)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6099],{10373:(e,t,s)=>{Promise.resolve().then(s.bind(s,40877))},40877:(e,t,s)=>{"use strict";s.d(t,{default:()=>x});var r=s(95155),i=s(12115),a=s(14051),l=s.n(a),n=s(40993),o=s(30949),d=s(20909);let c=s(41463).env.NEXT_PUBLIC_CLOUD_URL,m=15e3;function x({machineId:e}){let[t,s]=(0,i.useState)([]),[a,l]=(0,i.useState)(!0),[x,g]=(0,i.useState)([]),[h,b]=(0,i.useState)(null),[y,f]=(0,i.useState)(!1),[j,v]=(0,i.useState)(!1),[N,w]=(0,i.useState)(!1),[C,k]=(0,i.useState)(!1),[S,_]=(0,i.useState)(null),[T,E]=(0,i.useState)(""),[$,R]=(0,i.useState)(!1),[q,A]=(0,i.useState)(null),{copied:O,copy:U}=(0,o.C)();(0,i.useEffect)(()=>{F(),D(),P()},[]);let P=async()=>{try{let e=await fetch("/v1/models");if(e.ok){let t=await e.json();g(t.data||[])}}catch(e){console.log("Error fetching models:",e)}},B=(0,i.useMemo)(()=>{let e=x.filter(e=>!e.type&&!e.parent),t=x.filter(e=>"embedding"===e.type&&!e.parent),s=x.filter(e=>"image"===e.type&&!e.parent),r=x.filter(e=>"rerank"===e.type&&!e.parent),i=x.filter(e=>"audio"===e.type&&"transcription"===e.subtype&&!e.parent);return{chat:e,embeddings:t,images:s,rerank:r,audioTranscription:i,audioSpeech:x.filter(e=>"audio"===e.type&&"speech"===e.subtype&&!e.parent),moderation:x.filter(e=>"moderation"===e.type&&!e.parent)}},[x]);(0,i.useMemo)(()=>Object.entries(d.Q2).map(([e,s])=>{let r=t.filter(t=>t.provider===e),i=r.filter(e=>!1!==e.isActive&&("active"===e.testStatus||"success"===e.testStatus||"unknown"===e.testStatus)).length,a=r.filter(e=>!1!==e.isActive&&("error"===e.testStatus||"expired"===e.testStatus||"unavailable"===e.testStatus)).length;return{id:e,provider:s,total:r.length,connected:i,errors:a}}),[t]);let I=async(e,t=m)=>{let s=new AbortController,r=setTimeout(()=>s.abort(),t);try{let t=await fetch("/api/sync/cloud",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:e}),signal:s.signal}),r=await t.json().catch(()=>({}));return{ok:t.ok,status:t.status,data:r}}catch(e){if(e?.name==="AbortError")return{ok:!1,status:408,data:{error:"Cloud request timeout"}};return{ok:!1,status:500,data:{error:e.message||"Cloud request failed"}}}finally{clearTimeout(r)}},D=async()=>{try{let e=await fetch("/api/settings");if(e.ok){let t=await e.json();f(t.cloudEnabled||!1)}}catch(e){console.log("Error loading cloud settings:",e)}},F=async()=>{try{let e=await fetch("/api/providers"),t=await e.json();e.ok&&s(t.connections||[])}catch(e){console.log("Error fetching data:",e)}finally{l(!1)}},M=e=>{e?v(!0):w(!0)};(0,i.useEffect)(()=>{if(S){let e=setTimeout(()=>_(null),5e3);return()=>clearTimeout(e)}},[S]);let W=()=>{globalThis.dispatchEvent(new Event("cloud-status-changed"))},z=async()=>{k(!0),R(!1),E("syncing");try{let{ok:e,status:t,data:s}=await I("enable");if(e)E("verifying"),await new Promise(e=>setTimeout(e,600)),f(!0),E("done"),R(!0),k(!1),W(),await new Promise(e=>setTimeout(e,1200)),v(!1),R(!1),s.verified?_({type:"success",message:"Cloud Proxy connected and verified!"}):_({type:"warning",message:s.verifyError?`Connected — verification pending: ${s.verifyError}`:"Connected — verification pending"}),s.createdKey&&await F(),await D();else{let e=s.error||"Failed to enable cloud";(502===t||408===t)&&(e="Could not reach cloud worker. Make sure the cloud service is running (npm run dev in /cloud)."),_({type:"error",message:e}),v(!1)}}catch(e){_({type:"error",message:e.message||"Connection failed"}),v(!1)}finally{k(!1),E("")}},L=async()=>{k(!0),E("syncing");try{await I("sync"),E("disabling");let{ok:e,data:t}=await I("disable");e?(f(!1),_({type:"success",message:"Cloud disabled successfully"}),w(!1),W(),await D()):_({type:"error",message:t.error||"Failed to disable cloud"})}catch(e){console.log("Error disabling cloud:",e),_({type:"error",message:"Failed to disable cloud"})}finally{k(!1),E("")}},[Q,G]=(0,i.useState)("/v1"),V=`${c}/v1`;if((0,i.useEffect)(()=>{G(`${window.location.origin}/v1`)},[]),a)return(0,r.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,r.jsx)(n.Qv,{}),(0,r.jsx)(n.Qv,{})]});let Z=y?V:Q;return(0,r.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,r.jsxs)(n.Zp,{className:"",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h2",{className:"text-lg font-semibold",children:"API Endpoint"}),(0,r.jsx)("p",{className:"text-sm text-text-muted",children:y?"Using Cloud Proxy":"Using Local Server"}),e&&(0,r.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:["Machine ID: ",e.slice(0,8),"..."]})]}),(0,r.jsx)("div",{className:"flex items-center gap-2",children:y?(0,r.jsx)(n.$n,{size:"sm",variant:"secondary",icon:"cloud_off",onClick:()=>M(!1),disabled:C,className:"bg-red-500/10! text-red-500! hover:bg-red-500/20! border-red-500/30!",children:"Disable Cloud"}):(0,r.jsx)(n.$n,{variant:"primary",icon:"cloud_upload",onClick:()=>M(!0),disabled:C,className:"bg-linear-to-r from-primary to-blue-500 hover:from-primary-hover hover:to-blue-600",children:"Enable Cloud"})})]}),S&&(0,r.jsxs)("div",{className:`flex items-center gap-2 px-4 py-2.5 rounded-lg mb-4 text-sm font-medium animate-in fade-in slide-in-from-top-2 duration-300 ${"success"===S.type?"bg-green-500/10 border border-green-500/30 text-green-400":"warning"===S.type?"bg-amber-500/10 border border-amber-500/30 text-amber-400":"bg-red-500/10 border border-red-500/30 text-red-400"}`,children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"success"===S.type?"check_circle":"warning"===S.type?"warning":"error"}),(0,r.jsx)("span",{className:"flex-1",children:S.message}),(0,r.jsx)("button",{onClick:()=>_(null),className:"p-0.5 hover:bg-white/10 rounded transition-colors",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"close"})})]}),(0,r.jsxs)("div",{className:"flex gap-2 mb-3",children:[(0,r.jsx)(n.pd,{value:Z,readOnly:!0,className:`flex-1 font-mono text-sm ${y?"animate-border-glow":""}`}),(0,r.jsx)(n.$n,{variant:"secondary",icon:"endpoint_url"===O?"check":"content_copy",onClick:()=>U(Z,"endpoint_url"),children:"endpoint_url"===O?"Copied!":"Copy"})]})]}),(0,r.jsxs)(n.Zp,{children:[(0,r.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,r.jsxs)("div",{children:[(0,r.jsx)("h2",{className:"text-lg font-semibold",children:"Available Endpoints"}),(0,r.jsxs)("p",{className:"text-sm text-text-muted",children:[Object.values(B).reduce((e,t)=>e+t.length,0)," models across"," ",[B.chat,B.embeddings,B.images,B.rerank,B.audioTranscription,B.audioSpeech,B.moderation].filter(e=>e.length>0).length," ","endpoints"]})]})}),(0,r.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,r.jsx)(u,{icon:"chat",iconColor:"text-blue-500",iconBg:"bg-blue-500/10",title:"Chat Completions",path:"/v1/chat/completions",description:"Streaming & non-streaming chat with all providers",models:B.chat,expanded:"chat"===h,onToggle:()=>b("chat"===h?null:"chat"),copy:U,copied:O,baseUrl:Z}),(0,r.jsx)(u,{icon:"data_array",iconColor:"text-emerald-500",iconBg:"bg-emerald-500/10",title:"Embeddings",path:"/v1/embeddings",description:"Text embeddings for search & RAG pipelines",models:B.embeddings,expanded:"embeddings"===h,onToggle:()=>b("embeddings"===h?null:"embeddings"),copy:U,copied:O,baseUrl:Z}),(0,r.jsx)(u,{icon:"image",iconColor:"text-purple-500",iconBg:"bg-purple-500/10",title:"Image Generation",path:"/v1/images/generations",description:"Generate images from text prompts",models:B.images,expanded:"images"===h,onToggle:()=>b("images"===h?null:"images"),copy:U,copied:O,baseUrl:Z}),(0,r.jsx)(u,{icon:"sort",iconColor:"text-amber-500",iconBg:"bg-amber-500/10",title:"Rerank",path:"/v1/rerank",description:"Rerank documents by relevance to a query",models:B.rerank,expanded:"rerank"===h,onToggle:()=>b("rerank"===h?null:"rerank"),copy:U,copied:O,baseUrl:Z}),(0,r.jsx)(u,{icon:"mic",iconColor:"text-rose-500",iconBg:"bg-rose-500/10",title:"Audio Transcription",path:"/v1/audio/transcriptions",description:"Transcribe audio files to text (Whisper)",models:B.audioTranscription,expanded:"audioTranscription"===h,onToggle:()=>b("audioTranscription"===h?null:"audioTranscription"),copy:U,copied:O,baseUrl:Z}),(0,r.jsx)(u,{icon:"record_voice_over",iconColor:"text-cyan-500",iconBg:"bg-cyan-500/10",title:"Text to Speech",path:"/v1/audio/speech",description:"Convert text to natural-sounding speech",models:B.audioSpeech,expanded:"audioSpeech"===h,onToggle:()=>b("audioSpeech"===h?null:"audioSpeech"),copy:U,copied:O,baseUrl:Z}),(0,r.jsx)(u,{icon:"shield",iconColor:"text-orange-500",iconBg:"bg-orange-500/10",title:"Moderations",path:"/v1/moderations",description:"Content moderation and safety classification",models:B.moderation,expanded:"moderation"===h,onToggle:()=>b("moderation"===h?null:"moderation"),copy:U,copied:O,baseUrl:Z})]})]}),!1,(0,r.jsx)(n.aF,{isOpen:j,title:"Enable Cloud Proxy",onClose:()=>v(!1),children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsxs)("div",{className:"bg-blue-50 dark:bg-blue-900/20 border border-blue-200 dark:border-blue-800 rounded-lg p-4",children:[(0,r.jsx)("p",{className:"text-sm text-blue-800 dark:text-blue-200 font-medium mb-2",children:"What you will get"}),(0,r.jsxs)("ul",{className:"text-sm text-blue-700 dark:text-blue-300 space-y-1",children:[(0,r.jsx)("li",{children:"• Access your API from anywhere in the world"}),(0,r.jsx)("li",{children:"• Share endpoint with your team easily"}),(0,r.jsx)("li",{children:"• No need to open ports or configure firewall"}),(0,r.jsx)("li",{children:"• Fast global edge network"})]})]}),(0,r.jsxs)("div",{className:"bg-yellow-50 dark:bg-yellow-900/20 border border-yellow-200 dark:border-yellow-800 rounded-lg p-4",children:[(0,r.jsx)("p",{className:"text-sm text-yellow-800 dark:text-yellow-200 font-medium mb-1",children:"Note"}),(0,r.jsxs)("ul",{className:"text-sm text-yellow-700 dark:text-yellow-300 space-y-1",children:[(0,r.jsx)("li",{children:"• Cloud will keep your auth session for 1 day. If not used, it will be automatically deleted."}),(0,r.jsx)("li",{children:"• Cloud is currently unstable with Claude Code OAuth in some cases."})]})]}),(C||$)&&(0,r.jsxs)("div",{className:`flex items-center gap-3 p-3 rounded-lg border transition-all duration-300 ${$?"bg-green-500/10 border-green-500/30":"bg-primary/10 border-primary/30"}`,children:[$?(0,r.jsx)("span",{className:"material-symbols-outlined text-green-500 text-xl",children:"check_circle"}):(0,r.jsx)("span",{className:"material-symbols-outlined animate-spin text-primary",children:"progress_activity"}),(0,r.jsx)("div",{className:"flex-1",children:(0,r.jsxs)("p",{className:`text-sm font-medium ${$?"text-green-500":"text-primary"}`,children:[$&&"Cloud Proxy connected!",!$&&"syncing"===T&&"Connecting to cloud...",!$&&"verifying"===T&&"Verifying connection..."]})})]}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(n.$n,{onClick:z,fullWidth:!0,disabled:C||$,children:C?(0,r.jsxs)("span",{className:"flex items-center gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),"syncing"===T?"Connecting...":"Verifying..."]}):$?(0,r.jsxs)("span",{className:"flex items-center gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-sm",children:"check"}),"Connected!"]}):"Enable Cloud"}),(0,r.jsx)(n.$n,{onClick:()=>v(!1),variant:"ghost",fullWidth:!0,disabled:C||$,children:"Cancel"})]})]})}),(0,r.jsx)(n.aF,{isOpen:N,title:"Disable Cloud Proxy",onClose:()=>!C&&w(!1),children:(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)("div",{className:"bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg p-4",children:(0,r.jsxs)("div",{className:"flex items-start gap-3",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-red-600 dark:text-red-400",children:"warning"}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-sm text-red-800 dark:text-red-200 font-medium mb-1",children:"Warning"}),(0,r.jsx)("p",{className:"text-sm text-red-700 dark:text-red-300",children:"All auth sessions will be deleted from cloud."})]})]})}),C&&(0,r.jsxs)("div",{className:"flex items-center gap-3 p-3 bg-primary/10 border border-primary/30 rounded-lg",children:[(0,r.jsx)("span",{className:"material-symbols-outlined animate-spin text-primary",children:"progress_activity"}),(0,r.jsx)("div",{className:"flex-1",children:(0,r.jsxs)("p",{className:"text-sm font-medium text-primary",children:["syncing"===T&&"Syncing latest data...","disabling"===T&&"Disabling cloud..."]})})]}),(0,r.jsx)("p",{className:"text-sm text-text-muted",children:"Are you sure you want to disable cloud proxy?"}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsx)(n.$n,{onClick:L,fullWidth:!0,disabled:C,className:"bg-red-500! hover:bg-red-600! text-white!",children:C?(0,r.jsxs)("span",{className:"flex items-center gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),"syncing"===T?"Syncing...":"Disabling..."]}):"Disable Cloud"}),(0,r.jsx)(n.$n,{onClick:()=>w(!1),variant:"ghost",fullWidth:!0,disabled:C,children:"Cancel"})]})]})}),q&&(0,r.jsx)(p,{provider:q,models:x,copy:U,copied:O,onClose:()=>A(null)})]})}function p({provider:e,models:t,copy:s,copied:a,onClose:l}){let o=e.provider.alias||e.id,d=(0,i.useMemo)(()=>t.filter(t=>!t.parent&&(t.owned_by===o||t.owned_by===e.id)),[t,o,e.id]),c=d.filter(e=>!e.type),m=d.filter(e=>"embedding"===e.type),x=d.filter(e=>"image"===e.type),p=(e,t,i)=>0===i.length?null:(0,r.jsxs)("div",{className:"mb-4",children:[(0,r.jsxs)("h4",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider mb-2 flex items-center gap-1.5",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-sm",children:t}),e," (",i.length,")"]}),(0,r.jsx)("div",{className:"flex flex-col gap-1",children:i.map(e=>{let t=`modal-${e.id}`;return(0,r.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg hover:bg-surface/60 group",children:[(0,r.jsx)("code",{className:"text-sm font-mono flex-1 truncate",children:e.id}),e.custom&&(0,r.jsx)("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-primary/10 text-primary",children:"custom"}),(0,r.jsx)("button",{onClick:()=>s(e.id,t),className:"p-1 hover:bg-sidebar rounded text-text-muted hover:text-primary opacity-0 group-hover:opacity-100 transition-opacity",title:"Copy model ID",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-sm",children:a===t?"check":"content_copy"})})]},e.id)})})]});return(0,r.jsx)(n.aF,{isOpen:!0,onClose:l,title:`${e.provider.name} — Models`,children:(0,r.jsx)("div",{className:"max-h-[60vh] overflow-y-auto",children:0===d.length?(0,r.jsx)("p",{className:"text-sm text-text-muted py-4 text-center",children:"No models available for this provider."}):(0,r.jsxs)(r.Fragment,{children:[p("Chat","chat",c),p("Embedding","data_array",m),p("Image","image",x)]})})})}function u({icon:e,iconColor:t,iconBg:s,title:a,path:l,description:n,models:o,expanded:c,onToggle:m,copy:x,copied:p,baseUrl:u}){let g=(0,i.useMemo)(()=>{let e={};for(let t of o){let s=t.owned_by||"unknown";e[s]||(e[s]=[]),e[s].push(t)}return Object.entries(e).sort((e,t)=>t[1].length-e[1].length)},[o]),h=e=>d.Q2[e]||(0,d.zt)(e),b=`endpoint_${l}`;return(0,r.jsxs)("div",{className:"border border-border rounded-lg overflow-hidden",children:[(0,r.jsxs)("button",{onClick:m,className:"w-full flex items-center gap-3 p-4 hover:bg-surface/50 transition-colors text-left",children:[(0,r.jsx)("div",{className:`flex items-center justify-center size-10 rounded-lg ${s} shrink-0`,children:(0,r.jsx)("span",{className:`material-symbols-outlined text-xl ${t}`,children:e})}),(0,r.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("span",{className:"font-semibold text-sm",children:a}),(0,r.jsxs)("span",{className:"text-xs px-2 py-0.5 rounded-full bg-surface text-text-muted font-medium",children:[o.length," ",1===o.length?"model":"models"]})]}),(0,r.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:n})]}),(0,r.jsx)("span",{className:`material-symbols-outlined text-text-muted text-lg transition-transform ${c?"rotate-180":""}`,children:"expand_more"})]}),c&&(0,r.jsxs)("div",{className:"border-t border-border px-4 pb-4",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 mt-3 mb-3",children:[(0,r.jsxs)("code",{className:"flex-1 text-xs font-mono text-text-muted bg-surface/80 px-3 py-1.5 rounded-lg truncate",children:[u.replace(/\/v1$/,""),l]}),(0,r.jsx)("button",{onClick:()=>x(`${u.replace(/\/v1$/,"")}${l}`,b),className:"p-1.5 hover:bg-surface rounded-lg text-text-muted hover:text-primary transition-colors shrink-0",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:p===b?"check":"content_copy"})})]}),(0,r.jsx)("div",{className:"flex flex-col gap-2",children:g.map(([e,t])=>(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,r.jsx)("div",{className:"size-2.5 rounded-full shrink-0",style:{backgroundColor:h(e)?.color||"#888"}}),(0,r.jsx)("span",{className:"text-xs font-semibold text-text-main",children:h(e)?.name||e}),(0,r.jsxs)("span",{className:"text-xs text-text-muted",children:["(",t.length,")"]})]}),(0,r.jsx)("div",{className:"ml-5 flex flex-wrap gap-1.5",children:t.map(e=>(0,r.jsx)("span",{className:"text-xs px-2 py-0.5 rounded-md bg-surface/80 text-text-muted font-mono",title:e.id,children:e.root||e.id.split("/").pop()},e.id))})]},e))})]})]})}x.propTypes={machineId:l().string.isRequired},p.propTypes={provider:l().object.isRequired,models:l().array.isRequired,copy:l().func.isRequired,copied:l().string,onClose:l().func.isRequired},u.propTypes={icon:l().string.isRequired,iconColor:l().string.isRequired,iconBg:l().string.isRequired,title:l().string.isRequired,path:l().string.isRequired,description:l().string.isRequired,models:l().array.isRequired,expanded:l().bool.isRequired,onToggle:l().func.isRequired,copy:l().func.isRequired,copied:l().string,baseUrl:l().string.isRequired}}},e=>{e.O(0,[8500,9751,782,1149,5846,993,8441,3794,7358],()=>e(e.s=10373)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1066],{39387:(e,t,s)=>{Promise.resolve().then(s.bind(s,73732))},73732:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>g});var a=s(95155),r=s(12115),l=s(40993),n=s(5772),i=s(35144);function c(e){let t="string"==typeof e?e.trim():"";if(!t)return{key:"unknown",label:"Unknown",variant:"default",rank:0,raw:null};let s=t.toUpperCase();return s.includes("ENTERPRISE")||s.includes("CORP")||s.includes("ORG")?{key:"enterprise",label:"Enterprise",variant:"info",rank:7,raw:t}:s.includes("TEAM")||s.includes("CHATGPTTEAM")?{key:"team",label:"Team",variant:"info",rank:6,raw:t}:s.includes("BUSINESS")||s.includes("STANDARD")||s.includes("BIZ")?{key:"business",label:"Business",variant:"warning",rank:5,raw:t}:s.includes("ULTRA")?{key:"ultra",label:"Ultra",variant:"success",rank:4,raw:t}:s.includes("PRO")||s.includes("PLUS")||s.includes("PREMIUM")||s.includes("PAID")?{key:"pro",label:"Pro",variant:"primary",rank:3,raw:t}:s.includes("FREE")||s.includes("INDIVIDUAL")||s.includes("BASIC")||s.includes("TRIAL")||s.includes("LEGACY")?{key:"free",label:"Free",variant:"default",rank:1,raw:t}:{key:"unknown",label:t.toLowerCase().split(/[\s_-]+/).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")||"Unknown",variant:"default",rank:0,raw:t}}var o=s(81060),d=s(80927),x=s(92542),u=s(20909);let m={antigravity:{label:"Antigravity",color:"#F59E0B"},github:{label:"GitHub Copilot",color:"#333"},kiro:{label:"Kiro AI",color:"#FF6B35"},codex:{label:"OpenAI Codex",color:"#10A37F"},claude:{label:"Claude Code",color:"#D97757"}},p=[{key:"all",label:"All"},{key:"enterprise",label:"Enterprise"},{key:"team",label:"Team"},{key:"business",label:"Business"},{key:"ultra",label:"Ultra"},{key:"pro",label:"Pro"},{key:"free",label:"Free"},{key:"unknown",label:"Unknown"}];function h(){let[e,t]=(0,r.useState)([]),[s,l]=(0,r.useState)({}),[h,f]=(0,r.useState)({}),[b,g]=(0,r.useState)({}),[j,y]=(0,r.useState)(!0),[v,N]=(0,r.useState)(null),[k,w]=(0,r.useState)(!1),[A,E]=(0,r.useState)(120),[C,I]=(0,r.useState)(!0),[S,q]=(0,r.useState)("all"),M=(0,r.useRef)(null),P=(0,r.useRef)(null),T=(0,r.useRef)({}),$=(0,r.useCallback)(async()=>{try{let e=await fetch("/api/providers/client");if(!e.ok)throw Error("Failed");let s=(await e.json()).connections||[];return t(s),s}catch{return t([]),[]}},[]),R=(0,r.useCallback)(async(e,t)=>{let s=Date.now();if(!(s-(T.current[e]||0)<3e4)){T.current[e]=s,f(t=>({...t,[e]:!0})),g(t=>({...t,[e]:null}));try{let s=await fetch(`/api/usage/${e}`);if(!s.ok){let t=(await s.json().catch(()=>({}))).error||s.statusText;if(404===s.status)return;if(401===s.status)return void l(s=>({...s,[e]:{quotas:[],message:t}}));throw Error(`HTTP ${s.status}: ${t}`)}let a=await s.json(),r=function(e,t){if(!t||"object"!=typeof t)return[];let s=[];try{switch(e.toLowerCase()){case"github":default:t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{s.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null})});break;case"antigravity":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{s.push({name:t.displayName||e,modelKey:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:t.remainingPercentage})});break;case"codex":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{s.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null})});break;case"kiro":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{s.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null})});break;case"claude":t.message?s.push({name:"error",used:0,total:0,resetAt:null,message:t.message}):t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{s.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null})})}}catch(t){return console.error(`Error parsing quota data for ${e}:`,t),[]}let a=(0,i.KC)(e);if(a.length>0){let e=new Map(a.map((e,t)=>[e.id,t]));s.sort((t,s)=>{let a=t.modelKey||t.name,r=s.modelKey||s.name;return(e.get(a)??999)-(e.get(r)??999)})}return s}(t,a);l(t=>({...t,[e]:{quotas:r,plan:a.plan||null,message:a.message||null,raw:a}}))}catch(t){g(s=>({...s,[e]:t.message||"Failed to fetch quota"}))}finally{f(t=>({...t,[e]:!1}))}}},[]),_=(0,r.useCallback)(async(e,t)=>{await R(e,t),N(new Date)},[R]),L=(0,r.useCallback)(async()=>{if(!k){w(!0),E(120);try{let e=(await $()).filter(e=>u.wb.includes(e.provider)&&"oauth"===e.authType);await Promise.all(e.map(e=>R(e.id,e.provider))),N(new Date)}catch(e){console.error("Error refreshing all:",e)}finally{w(!1)}}},[k,$,R]);(0,r.useEffect)(()=>{(async()=>{I(!0),await L(),I(!1)})()},[]),(0,r.useEffect)(()=>{if(!j){M.current&&clearInterval(M.current),P.current&&clearInterval(P.current);return}return M.current=setInterval(L,12e4),P.current=setInterval(()=>{E(e=>e<=1?120:e-1)},1e3),()=>{M.current&&clearInterval(M.current),P.current&&clearInterval(P.current)}},[j,L]),(0,r.useEffect)(()=>{let e=()=>{document.hidden?(M.current&&clearInterval(M.current),P.current&&clearInterval(P.current)):j&&(M.current=setInterval(L,12e4),P.current=setInterval(()=>{E(e=>e<=1?120:e-1)},1e3))};return document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)},[j,L]);let O=(0,r.useMemo)(()=>e.filter(e=>u.wb.includes(e.provider)&&"oauth"===e.authType),[e]),D=(0,r.useMemo)(()=>{let e={antigravity:1,github:2,codex:3,claude:4,kiro:5};return[...O].sort((t,s)=>(e[t.provider]||9)-(e[s.provider]||9))},[O]),U=(0,r.useMemo)(()=>{let e={};for(let t of D)e[t.id]=c(s[t.id]?.plan);return e},[D,s]),F=(0,r.useMemo)(()=>{let e={all:D.length,enterprise:0,team:0,business:0,ultra:0,pro:0,free:0,unknown:0};for(let t of D){let s=U[t.id]?.key||"unknown";e[s]=(e[s]||0)+1}return e},[D,U]),B=(0,r.useMemo)(()=>"all"===S?D:D.filter(e=>(U[e.id]?.key||"unknown")===S),[D,U,S]);return C?(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)(x.CardSkeleton,{}),(0,a.jsx)(x.CardSkeleton,{})]}):0===D.length?(0,a.jsx)(o.default,{padding:"lg",children:(0,a.jsxs)("div",{className:"text-center py-12",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[64px] opacity-15",children:"cloud_off"}),(0,a.jsx)("h3",{className:"mt-4 text-lg font-semibold text-text-main",children:"No Providers Connected"}),(0,a.jsx)("p",{className:"mt-2 text-sm text-text-muted max-w-[400px] mx-auto",children:"Connect to providers with OAuth to track your API quota limits and usage."})]})}):(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between flex-wrap gap-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold text-text-main m-0",children:"Provider Limits"}),(0,a.jsxs)("span",{className:"text-[13px] text-text-muted",children:[B.length," account",1!==B.length?"s":"",B.length!==D.length?` (filtered from ${D.length})`:""]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsxs)("button",{onClick:()=>y(e=>!e),className:"flex items-center gap-1.5 px-3 py-1.5 rounded-lg border border-white/[0.08] bg-transparent cursor-pointer text-text-main text-[13px]",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",style:{color:j?"#22c55e":"var(--text-muted)"},children:j?"toggle_on":"toggle_off"}),"Auto-refresh",j&&(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["(",A,"s)"]})]}),(0,a.jsxs)("button",{onClick:L,disabled:k,className:"flex items-center gap-1.5 px-3.5 py-1.5 rounded-lg bg-white/[0.06] border border-white/10 text-text-main text-[13px] disabled:opacity-50 disabled:cursor-not-allowed cursor-pointer",children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[16px] ${k?"animate-spin":""}`,children:"refresh"}),"Refresh All"]})]})]}),(0,a.jsx)("div",{className:"flex items-center gap-2 flex-wrap",children:p.map(e=>{if("all"!==e.key&&!F[e.key])return null;let t=S===e.key;return(0,a.jsxs)("button",{onClick:()=>q(e.key),className:"inline-flex items-center gap-1.5 px-2.5 py-1 rounded-full text-xs font-semibold cursor-pointer",style:{border:t?"1px solid var(--primary, #E54D5E)":"1px solid rgba(255,255,255,0.12)",background:t?"rgba(249,120,21,0.14)":"transparent",color:t?"var(--primary, #E54D5E)":"var(--text-muted)"},children:[(0,a.jsx)("span",{children:e.label}),(0,a.jsx)("span",{className:"opacity-85",children:F[e.key]||0})]},e.key)})}),(0,a.jsxs)("div",{className:"rounded-xl border border-white/[0.06] overflow-hidden bg-black/15",children:[(0,a.jsxs)("div",{className:"items-center px-4 py-2.5 border-b border-white/[0.06] text-[11px] font-semibold uppercase tracking-wider text-text-muted",style:{display:"grid",gridTemplateColumns:"280px 1fr 100px 48px"},children:[(0,a.jsx)("div",{children:"Account"}),(0,a.jsx)("div",{children:"Model Quotas"}),(0,a.jsx)("div",{className:"text-center",children:"Last Used"}),(0,a.jsx)("div",{className:"text-center",children:"Actions"})]}),B.map((e,t)=>{let r=s[e.id],l=h[e.id],i=b[e.id],o=m[e.provider]||{label:e.provider,color:"#666"},x=U[e.id]||c(null);return(0,a.jsxs)("div",{className:"items-center px-4 py-3.5 transition-[background] duration-150 hover:bg-white/[0.02]",style:{display:"grid",gridTemplateColumns:"280px 1fr 100px 48px",borderBottom:t<B.length-1?"1px solid rgba(255,255,255,0.04)":"none"},children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5 min-w-0",children:[(0,a.jsx)("div",{className:"w-8 h-8 rounded-lg flex items-center justify-center overflow-hidden shrink-0",children:(0,a.jsx)(n.default,{src:`/providers/${e.provider}.png`,alt:e.provider,width:32,height:32,className:"object-contain",sizes:"32px"})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("div",{className:"text-[13px] font-semibold text-text-main truncate",children:e.name||o.label}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5 mt-0.5",children:[(0,a.jsx)("span",{title:r?.plan?`Raw plan: ${r.plan}`:"No plan from provider",children:(0,a.jsx)(d.default,{variant:x.variant,size:"sm",dot:!0,children:x.label})}),(0,a.jsx)("span",{className:"text-[11px] text-text-muted",children:o.label})]})]})]}),(0,a.jsx)("div",{className:"flex flex-wrap gap-x-3 gap-y-1.5 pr-3",children:l?(0,a.jsxs)("div",{className:"flex items-center gap-1.5 text-text-muted text-xs",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-[14px]",children:"progress_activity"}),"Loading..."]}):i?(0,a.jsxs)("div",{className:"flex items-center gap-1.5 text-xs text-red-500",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"error"}),(0,a.jsx)("span",{className:"overflow-hidden text-ellipsis whitespace-nowrap max-w-[300px]",children:i})]}):r?.message&&(!r.quotas||0===r.quotas.length)?(0,a.jsx)("div",{className:"text-xs text-text-muted italic",children:r.message}):r?.quotas?.length>0?r.quotas.map((e,t)=>{var s,r,l;let n=void 0!==e.remainingPercentage?Math.round(e.remainingPercentage):(s=e.used,(r=e.total)&&0!==r?!s||s<0?100:s>=r?0:Math.round((r-s)/r*100):0),i=n>70?{bar:"#22c55e",text:"#22c55e",bg:"rgba(34,197,94,0.12)"}:n>=30?{bar:"#eab308",text:"#eab308",bg:"rgba(234,179,8,0.12)"}:{bar:"#ef4444",text:"#ef4444",bg:"rgba(239,68,68,0.12)"},c=function(e){if(!e)return null;try{let t=new Date(e)-new Date;if(t<=0)return null;let s=Math.floor(t/36e5),a=Math.floor(t%36e5/6e4);if(s>=24){let e=Math.floor(s/24);return`${e}d ${s%24}h`}return`${s}h ${a}m`}catch{return null}}(e.resetAt),o={"gemini-3-pro-high":"G3 Pro","gemini-3-pro-low":"G3 Pro Low","gemini-3-flash":"G3 Flash","gemini-2.5-flash":"G2.5 Flash","claude-opus-4-6-thinking":"Opus 4.6 Tk","claude-opus-4-5-thinking":"Opus 4.5 Tk","claude-opus-4-5":"Opus 4.5","claude-sonnet-4-5-thinking":"Sonnet 4.5 Tk","claude-sonnet-4-5":"Sonnet 4.5",chat:"Chat",completions:"Completions",premium_interactions:"Premium",session:"Session",weekly:"Weekly",agentic_request:"Agentic",agentic_request_freetrial:"Agentic (Trial)"}[l=e.name]||l;return(0,a.jsxs)("div",{className:"flex items-center gap-1.5 min-w-[200px] shrink-0",children:[(0,a.jsx)("span",{className:"text-[11px] font-semibold py-0.5 px-2 rounded whitespace-nowrap min-w-[60px] text-center",style:{background:i.bg,color:i.text},children:o}),c&&(0,a.jsxs)("span",{className:"text-[10px] text-text-muted whitespace-nowrap",children:["⏱ ",c]}),(0,a.jsx)("div",{className:"flex-1 h-1.5 rounded-sm bg-white/[0.06] min-w-[60px] overflow-hidden",children:(0,a.jsx)("div",{className:"h-full rounded-sm transition-[width] duration-300 ease-out",style:{width:`${Math.min(n,100)}%`,background:i.bar}})}),(0,a.jsxs)("span",{className:"text-[11px] font-semibold min-w-[32px] text-right",style:{color:i.text},children:[n,"%"]})]},t)}):(0,a.jsx)("div",{className:"text-xs text-text-muted italic",children:"No quota data"})}),(0,a.jsx)("div",{className:"text-center text-[11px] text-text-muted",children:v?(0,a.jsx)("span",{children:v.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}):"-"}),(0,a.jsx)("div",{className:"flex justify-center gap-0.5",children:(0,a.jsx)("button",{onClick:()=>_(e.id,e.provider),disabled:l,title:"Refresh quota",className:"p-1 rounded-md border-none bg-transparent cursor-pointer disabled:cursor-not-allowed disabled:opacity-30 opacity-60 hover:opacity-100 flex items-center justify-center transition-opacity duration-150",children:(0,a.jsx)("span",{className:`material-symbols-outlined text-[16px] text-text-muted ${l?"animate-spin":""}`,children:"refresh"})})})]},e.id)}),0===B.length&&(0,a.jsxs)("div",{className:"py-6 px-4 text-center text-text-muted text-[13px]",children:["No accounts found for tier filter"," ",(0,a.jsx)("strong",{children:p.find(e=>e.key===S)?.label||S}),"."]})]})]})}function f(){let[e,t]=(0,r.useState)({lockouts:[],cacheStats:null}),[s,n]=(0,r.useState)(!0),i=(0,r.useCallback)(async()=>{try{let e=await fetch("/api/rate-limits");e.ok&&t(await e.json())}catch{}finally{n(!1)}},[]);return(0,r.useEffect)(()=>{i();let e=setInterval(i,1e4);return()=>clearInterval(e)},[i]),(0,a.jsx)("div",{className:"flex flex-col gap-4",children:(0,a.jsxs)(l.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-orange-500/10 text-orange-500",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]","aria-hidden":"true",children:"lock_clock"})}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("h3",{className:"text-lg font-semibold",children:"Model Lockouts"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Per-model rate limit locks • Auto-refresh 10s"})]}),e.lockouts.length>0&&(0,a.jsxs)("span",{className:"px-2.5 py-1 rounded-full text-xs font-semibold bg-orange-500/10 text-orange-400 border border-orange-500/20",children:[e.lockouts.length," locked"]})]}),0===e.lockouts.length?(0,a.jsxs)("div",{className:"text-center py-6 text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[32px] mb-2 block opacity-40",children:"lock_open"}),(0,a.jsx)("p",{className:"text-sm",children:"No models currently locked"})]}):(0,a.jsx)("div",{className:"flex flex-col gap-2",children:e.lockouts.map((e,t)=>{var s;return(0,a.jsxs)("div",{className:"flex items-center justify-between px-3 py-2.5 rounded-lg bg-orange-500/5 border border-orange-500/15",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-orange-400",children:"lock"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:e.model}),(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Account:"," ",(0,a.jsx)("span",{className:"font-mono",children:e.accountId?.slice(0,12)||"N/A"}),e.reason&&(0,a.jsxs)(a.Fragment,{children:[" — ",e.reason]})]})]})]}),(0,a.jsxs)("span",{className:"text-xs font-mono tabular-nums text-orange-400",children:[(s=e.remainingMs)<1e3?`${s}ms`:s<6e4?`${Math.ceil(s/1e3)}s`:`${Math.ceil(s/6e4)}m`," left"]})]},t)})})]})})}function b(){let[e,t]=(0,r.useState)({count:0,sessions:[]}),[s,n]=(0,r.useState)(!0),i=(0,r.useCallback)(async()=>{try{let e=await fetch("/api/sessions");e.ok&&t(await e.json())}catch{}finally{n(!1)}},[]);return(0,r.useEffect)(()=>{i();let e=setInterval(i,5e3);return()=>clearInterval(e)},[i]),(0,a.jsxs)(l.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-5",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-cyan-500/10 text-cyan-500",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]","aria-hidden":"true",children:"fingerprint"})}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("h3",{className:"text-lg font-semibold",children:"Active Sessions"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Tracked via request fingerprinting • Auto-refresh 5s"})]}),(0,a.jsx)("div",{className:"flex items-center gap-2",children:(0,a.jsxs)("span",{className:"flex items-center gap-1.5 px-3 py-1.5 rounded-full bg-cyan-500/10 border border-cyan-500/20",children:[(0,a.jsx)("span",{className:"w-2 h-2 rounded-full bg-cyan-500 animate-pulse"}),(0,a.jsx)("span",{className:"text-sm font-semibold tabular-nums text-cyan-400",children:e.count})]})})]}),0===e.sessions.length?(0,a.jsxs)("div",{className:"text-center py-8 text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[40px] mb-2 block opacity-40",children:"fingerprint"}),(0,a.jsx)("p",{className:"text-sm",children:"No active sessions"}),(0,a.jsx)("p",{className:"text-xs mt-1",children:"Sessions appear as requests flow through the proxy"})]}):(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"w-full text-sm",children:[(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{className:"border-b border-border/30",children:[(0,a.jsx)("th",{className:"text-left py-2 px-3 text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Session"}),(0,a.jsx)("th",{className:"text-left py-2 px-3 text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Age"}),(0,a.jsx)("th",{className:"text-right py-2 px-3 text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Requests"}),(0,a.jsx)("th",{className:"text-left py-2 px-3 text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Connection"})]})}),(0,a.jsx)("tbody",{children:e.sessions.map(e=>{var t;return(0,a.jsxs)("tr",{className:"border-b border-border/10 hover:bg-surface/20 transition-colors",children:[(0,a.jsx)("td",{className:"py-2.5 px-3",children:(0,a.jsxs)("span",{className:"font-mono text-xs px-2 py-1 rounded bg-surface/40 text-text-muted",children:[e.sessionId.slice(0,12),"…"]})}),(0,a.jsx)("td",{className:"py-2.5 px-3 text-text-muted tabular-nums",children:(t=e.ageMs)<6e4?`${Math.floor(t/1e3)}s`:t<36e5?`${Math.floor(t/6e4)}m`:`${Math.floor(t/36e5)}h`}),(0,a.jsx)("td",{className:"py-2.5 px-3 text-right",children:(0,a.jsx)("span",{className:"font-semibold tabular-nums",children:e.requestCount})}),(0,a.jsx)("td",{className:"py-2.5 px-3",children:e.connectionId?(0,a.jsx)("span",{className:"text-xs font-mono text-cyan-400",children:e.connectionId.slice(0,10)}):(0,a.jsx)("span",{className:"text-text-muted/40",children:"—"})})]},e.sessionId)})})]})})]})}function g(){return(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsx)(r.Suspense,{fallback:(0,a.jsx)(l.Qv,{}),children:(0,a.jsx)(h,{})}),(0,a.jsx)(f,{}),(0,a.jsx)(b,{})]})}}},e=>{e.O(0,[8500,9751,782,1149,5846,993,8441,3794,7358],()=>e(e.s=39387)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6337],{7153:(e,s,t)=>{Promise.resolve().then(t.bind(t,49433))},49433:(e,s,t)=>{"use strict";t.d(s,{default:()=>p});var r=t(95155),l=t(12115),a=t(14051),i=t.n(a),n=t(5772),o=t(98500),d=t.n(o),c=t(73321),x=t(40993),m=t(20909),u=t(67671);function p({machineId:e}){let[s,t]=(0,l.useState)([]),[a,i]=(0,l.useState)([]),[n,o]=(0,l.useState)(!0),[c,u]=(0,l.useState)("/v1"),[p,f]=(0,l.useState)(null),[g,j]=(0,l.useState)({});(0,l.useEffect)(()=>{u(`${window.location.origin}/v1`)},[]);let v=(0,l.useCallback)(async()=>{try{let[e,s,r]=await Promise.all([fetch("/api/providers"),fetch("/api/models"),fetch("/api/provider-metrics")]);if(e.ok){let s=await e.json();t(s.connections||[])}if(s.ok){let e=await s.json();i(e.models||[])}if(r.ok){let e=await r.json();j(e.metrics||{})}}catch(e){console.log("Error fetching data:",e)}finally{o(!1)}},[]);(0,l.useEffect)(()=>{v()},[v]);let N=(0,l.useMemo)(()=>Object.entries(m.Q2).map(([e,t])=>{let r=s.filter(s=>s.provider===e),l=r.filter(e=>!1!==e.isActive&&("active"===e.testStatus||"success"===e.testStatus||"unknown"===e.testStatus)).length,i=r.filter(e=>!1!==e.isActive&&("error"===e.testStatus||"expired"===e.testStatus||"unavailable"===e.testStatus)).length,n=new Set([e,t.alias].filter(Boolean)),o=a.filter(e=>n.has(e.provider)),d=m.IS[e]?"free":m.zN[e]?"oauth":"apikey";return{id:e,provider:t,total:r.length,connected:l,errors:i,modelCount:o.length,authType:d}}),[s,a]),y=(0,l.useMemo)(()=>{if(!p)return[];let e=new Set([p.id,p.provider?.alias].filter(Boolean));return a.filter(s=>e.has(s.provider))},[p,a]);return n?(0,r.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,r.jsx)(x.Qv,{}),(0,r.jsx)(x.Qv,{})]}):(0,r.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,r.jsx)(x.Zp,{children:(0,r.jsxs)("div",{className:"flex flex-col gap-5",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h2",{className:"text-lg font-semibold",children:"Quick Start"}),(0,r.jsx)("p",{className:"text-sm text-text-muted",children:"Get up and running in 4 steps. Connect providers, route models, monitor everything."})]}),(0,r.jsxs)(d(),{href:"/docs",className:"hidden sm:inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium border border-border text-text-muted hover:text-text-main hover:bg-bg-subtle transition-colors",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"menu_book"}),"Full Docs"]})]}),(0,r.jsxs)("ol",{className:"grid grid-cols-1 md:grid-cols-2 gap-3 text-sm",children:[(0,r.jsxs)("li",{className:"rounded-lg border border-border bg-bg-subtle p-4 flex gap-3",children:[(0,r.jsx)("div",{className:"flex items-center justify-center size-8 rounded-lg bg-primary/10 text-primary shrink-0",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"key"})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"font-semibold",children:"1. Create API key"}),(0,r.jsxs)("p",{className:"text-text-muted mt-0.5",children:["Go to"," ",(0,r.jsx)(d(),{href:"/dashboard/endpoint",className:"text-primary hover:underline",children:"Endpoint"})," ","→ Registered Keys. Generate one key per environment."]})]})]}),(0,r.jsxs)("li",{className:"rounded-lg border border-border bg-bg-subtle p-4 flex gap-3",children:[(0,r.jsx)("div",{className:"flex items-center justify-center size-8 rounded-lg bg-green-500/10 text-green-500 shrink-0",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"dns"})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"font-semibold",children:"2. Connect providers"}),(0,r.jsxs)("p",{className:"text-text-muted mt-0.5",children:["Add accounts in"," ",(0,r.jsx)(d(),{href:"/dashboard/providers",className:"text-primary hover:underline",children:"Providers"}),". Supports OAuth, API Key, and free tiers."]})]})]}),(0,r.jsxs)("li",{className:"rounded-lg border border-border bg-bg-subtle p-4 flex gap-3",children:[(0,r.jsx)("div",{className:"flex items-center justify-center size-8 rounded-lg bg-blue-500/10 text-blue-500 shrink-0",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"link"})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"font-semibold",children:"3. Point your client"}),(0,r.jsxs)("p",{className:"text-text-muted mt-0.5",children:["Set base URL to"," ",(0,r.jsx)("code",{className:"px-1.5 py-0.5 rounded bg-surface text-xs font-mono",children:c})," ","in your IDE or API client."]})]})]}),(0,r.jsxs)("li",{className:"rounded-lg border border-border bg-bg-subtle p-4 flex gap-3",children:[(0,r.jsx)("div",{className:"flex items-center justify-center size-8 rounded-lg bg-amber-500/10 text-amber-500 shrink-0",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"analytics"})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"font-semibold",children:"4. Monitor & optimize"}),(0,r.jsxs)("p",{className:"text-text-muted mt-0.5",children:["Track tokens, cost and errors in"," ",(0,r.jsx)(d(),{href:"/dashboard/usage",className:"text-primary hover:underline",children:"Request Logs"})," ","and"," ",(0,r.jsx)(d(),{href:"/dashboard/analytics",className:"text-primary hover:underline",children:"Analytics"}),"."]})]})]})]}),(0,r.jsx)("div",{className:"flex flex-wrap gap-2",children:[{label:"Documentation",href:"/docs",icon:"menu_book"},{label:"Providers",href:"/dashboard/providers",icon:"dns"},{label:"Combos",href:"/dashboard/combos",icon:"layers"},{label:"Analytics",href:"/dashboard/analytics",icon:"analytics"},{label:"Health Monitor",href:"/dashboard/health",icon:"health_and_safety"},{label:"CLI Tools",href:"/dashboard/cli-tools",icon:"terminal"},{label:"Report issue",href:"https://github.com/diegosouzapw/OmniRoute/issues",external:!0,icon:"bug_report"}].map(e=>(0,r.jsxs)("a",{href:e.href,target:e.external?"_blank":void 0,rel:e.external?"noopener noreferrer":void 0,className:"inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium border border-border text-text-muted hover:text-text-main hover:bg-bg-subtle transition-colors",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:e.icon||(e.external?"open_in_new":"arrow_forward")}),e.label]},e.href))})]})}),(0,r.jsxs)(x.Zp,{children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h2",{className:"text-lg font-semibold",children:"Providers Overview"}),(0,r.jsxs)("p",{className:"text-sm text-text-muted",children:[N.filter(e=>e.total>0).length," configured of"," ",N.length," available providers"]})]}),(0,r.jsxs)("div",{className:"flex items-center gap-4",children:[(0,r.jsxs)("div",{className:"hidden sm:flex items-center gap-3 text-[11px] text-text-muted",children:[(0,r.jsxs)("span",{className:"flex items-center gap-1",children:[(0,r.jsx)("span",{className:"size-2 rounded-full bg-green-500"})," Free"]}),(0,r.jsxs)("span",{className:"flex items-center gap-1",children:[(0,r.jsx)("span",{className:"size-2 rounded-full bg-blue-500"})," OAuth"]}),(0,r.jsxs)("span",{className:"flex items-center gap-1",children:[(0,r.jsx)("span",{className:"size-2 rounded-full bg-amber-500"})," API Key"]})]}),(0,r.jsxs)(d(),{href:"/dashboard/providers",className:"inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium border border-border text-text-muted hover:text-text-main hover:bg-bg-subtle transition-colors",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"settings"}),"Manage"]})]})]}),(0,r.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-3",children:N.map(e=>(0,r.jsx)(h,{item:e,metrics:g[e.provider.alias]||g[e.id],onClick:()=>f(e)},e.id))})]}),p&&(0,r.jsx)(b,{provider:p,models:y,onClose:()=>f(null)})]})}function h({item:e,metrics:s,onClick:t}){let[a,i]=(0,l.useState)(!1),o=e.errors>0?"text-red-500":e.connected>0?"text-green-500":"text-text-muted",d={free:{color:"bg-green-500",label:"Free"},oauth:{color:"bg-blue-500",label:"OAuth"},apikey:{color:"bg-amber-500",label:"API Key"}},c=d[e.authType]||d.apikey;return(0,r.jsx)("button",{onClick:t,className:"border border-border rounded-lg p-3 hover:bg-surface/40 transition-colors text-left cursor-pointer w-full",children:(0,r.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,r.jsx)("div",{className:"size-8 rounded-lg flex items-center justify-center shrink-0",style:{backgroundColor:`${e.provider.color||"#888"}15`},children:a?(0,r.jsx)("span",{className:"text-[10px] font-bold",style:{color:e.provider.color||"#888"},children:e.provider.textIcon||e.provider.id.slice(0,2).toUpperCase()}):(0,r.jsx)(n.default,{src:`/providers/${e.provider.id}.png`,alt:e.provider.name,width:26,height:26,className:"object-contain rounded-lg",sizes:"26px",onError:()=>i(!0)})}),(0,r.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,r.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,r.jsx)("p",{className:"text-sm font-semibold truncate",children:e.provider.name}),(0,r.jsx)("span",{className:`size-2 rounded-full ${c.color} shrink-0`,title:c.label})]}),(0,r.jsx)("p",{className:`text-xs ${o}`,children:0===e.total?"Not configured":`${e.connected} active \xb7 ${e.errors} error`}),s&&s.totalRequests>0&&(0,r.jsxs)("div",{className:"flex items-center gap-2 mt-0.5",children:[(0,r.jsxs)("span",{className:"text-[10px] text-text-muted",children:[(0,r.jsx)("span",{className:"text-emerald-500",children:s.totalSuccesses}),"/",s.totalRequests," reqs"]}),(0,r.jsxs)("span",{className:"text-[10px] text-text-muted",children:[s.successRate,"%"]}),(0,r.jsxs)("span",{className:"text-[10px] text-text-muted",children:["~",s.avgLatencyMs,"ms"]})]})]}),(0,r.jsxs)("div",{className:"text-right shrink-0",children:[(0,r.jsx)("p",{className:"text-xs font-medium text-text-main",children:e.modelCount}),(0,r.jsx)("p",{className:"text-[10px] text-text-muted",children:"models"})]})]})})}function b({provider:e,models:s,onClose:t}){let[a,i]=(0,l.useState)(null),n=(0,u.i)(),o=(0,c.useRouter)(),d=e=>{t(),o.push(e)};return(0,r.jsx)(x.aF,{isOpen:!0,title:`${e.provider.name} — Models`,onClose:t,children:(0,r.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 text-sm text-text-muted",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"token"}),s.length," model",1!==s.length?"s":""," available",e.total>0&&(0,r.jsxs)("span",{className:"ml-auto text-xs text-green-500",children:["● ",e.connected," connection",1!==e.connected?"s":""," active"]})]}),0===s.length?(0,r.jsxs)("div",{className:"text-center py-6",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[32px] text-text-muted mb-2",children:"search_off"}),(0,r.jsx)("p",{className:"text-sm text-text-muted",children:"No models available for this provider."}),(0,r.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:["Configure a connection first in"," ",(0,r.jsx)("button",{onClick:()=>d("/dashboard/providers"),className:"text-primary hover:underline cursor-pointer",children:"Providers"})]})]}):(0,r.jsx)("div",{className:"flex flex-col gap-1 max-h-[400px] overflow-y-auto",children:s.map(e=>(0,r.jsxs)("div",{className:"flex items-center justify-between px-3 py-2 rounded-lg hover:bg-surface/50 transition-colors group",children:[(0,r.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,r.jsx)("p",{className:"font-mono text-sm text-text-main truncate",children:e.fullModel}),e.alias!==e.model&&(0,r.jsxs)("p",{className:"text-[10px] text-text-muted",children:["alias: ",e.alias]})]}),(0,r.jsx)("button",{onClick:()=>{var s;return s=e.fullModel,void(navigator.clipboard.writeText(s),i(s),n.success(`Copied: ${s}`),setTimeout(()=>i(null),2e3))},className:"shrink-0 ml-2 p-1.5 rounded-lg text-text-muted hover:text-text-main hover:bg-bg-subtle transition-colors opacity-0 group-hover:opacity-100",title:"Copy model name",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:a===e.fullModel?"check":"content_copy"})})]},e.fullModel))}),(0,r.jsxs)("div",{className:"flex gap-2 pt-2 border-t border-border",children:[(0,r.jsxs)(x.$n,{variant:"secondary",fullWidth:!0,size:"sm",onClick:()=>d(`/dashboard/providers/${e.id}`),className:"flex-1",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"settings"}),"Configure Provider"]}),(0,r.jsx)(x.$n,{variant:"ghost",size:"sm",onClick:t,children:"Close"})]})]})})}p.propTypes={machineId:i().string},h.propTypes={item:i().shape({id:i().string.isRequired,provider:i().shape({id:i().string.isRequired,name:i().string.isRequired,color:i().string,textIcon:i().string,alias:i().string}).isRequired,total:i().number.isRequired,connected:i().number.isRequired,errors:i().number.isRequired,modelCount:i().number.isRequired,authType:i().string.isRequired}).isRequired,metrics:i().shape({totalRequests:i().number,totalSuccesses:i().number,successRate:i().number,avgLatencyMs:i().number}),onClick:i().func.isRequired},b.propTypes={provider:i().object.isRequired,models:i().array.isRequired,onClose:i().func.isRequired}}},e=>{e.O(0,[8500,9751,782,1149,5846,993,8441,3794,7358],()=>e(e.s=7153)),_N_E=e.O()}]);