@rsalmn/extremerouter 0.8.5 → 0.8.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 (1221) hide show
  1. package/README.id.md +130 -0
  2. package/README.md +73 -32
  3. package/README.zh-CN.md +130 -0
  4. package/app/.next-cli-build/BUILD_ID +1 -1
  5. package/app/.next-cli-build/app-path-routes-manifest.json +31 -14
  6. package/app/.next-cli-build/build-manifest.json +2 -2
  7. package/app/.next-cli-build/prerender-manifest.json +3 -3
  8. package/app/.next-cli-build/routes-manifest.json +106 -0
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/alerts/page.js +2 -2
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/alerts/page.js.nft.json +1 -1
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/alerts/page_client-reference-manifest.js +1 -1
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +2 -2
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +3 -3
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +2 -2
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +3 -3
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +2 -2
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +2 -2
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/health/page.js +2 -2
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/health/page.js.nft.json +1 -1
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/health/page_client-reference-manifest.js +1 -1
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +2 -2
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +2 -2
  37. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  38. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  39. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +3 -3
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  42. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/page.js +2 -2
  43. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/page.js.nft.json +1 -1
  44. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/page_client-reference-manifest.js +1 -1
  45. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +2 -2
  46. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  47. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  48. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +2 -2
  49. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  50. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  51. package/app/.next-cli-build/server/app/(dashboard)/dashboard/overview/page.js +2 -2
  52. package/app/.next-cli-build/server/app/(dashboard)/dashboard/overview/page.js.nft.json +1 -1
  53. package/app/.next-cli-build/server/app/(dashboard)/dashboard/overview/page_client-reference-manifest.js +1 -1
  54. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +2 -2
  55. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  56. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  57. package/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page.js +2 -2
  58. package/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page.js.nft.json +1 -1
  59. package/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page_client-reference-manifest.js +1 -1
  60. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +2 -2
  61. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  62. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  63. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +4 -4
  64. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  65. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  66. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +2 -2
  67. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  68. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  69. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +2 -2
  70. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  71. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  72. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +3 -3
  73. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  74. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  75. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +2 -2
  76. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  77. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  78. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +2 -2
  79. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  80. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  81. package/app/.next-cli-build/server/app/(dashboard)/dashboard/smart-routing/page.js +2 -0
  82. package/app/.next-cli-build/server/app/(dashboard)/dashboard/smart-routing/page.js.nft.json +1 -0
  83. package/app/.next-cli-build/server/app/(dashboard)/dashboard/smart-routing/page_client-reference-manifest.js +1 -0
  84. package/app/.next-cli-build/server/app/(dashboard)/dashboard/swarm/page.js +2 -2
  85. package/app/.next-cli-build/server/app/(dashboard)/dashboard/swarm/page.js.nft.json +1 -1
  86. package/app/.next-cli-build/server/app/(dashboard)/dashboard/swarm/page_client-reference-manifest.js +1 -1
  87. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +2 -2
  88. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
  89. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  90. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +2 -2
  91. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  92. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  93. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +2 -2
  94. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  95. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  96. package/app/.next-cli-build/server/app/_global-error/page.js +3 -3
  97. package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  98. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  99. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  100. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  101. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  102. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  103. package/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  104. package/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
  105. package/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
  106. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  107. package/app/.next-cli-build/server/app/_not-found/page.js +2 -2
  108. package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  109. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  110. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  111. package/app/.next-cli-build/server/app/_not-found.rsc +6 -6
  112. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +6 -6
  113. package/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
  114. package/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +6 -6
  115. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  116. package/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  117. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  118. package/app/.next-cli-build/server/app/api/alerts/test/route.js +2 -2
  119. package/app/.next-cli-build/server/app/api/alerts/test/route.js.nft.json +1 -1
  120. package/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
  121. package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  122. package/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
  123. package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  124. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
  125. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  126. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
  127. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  128. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
  129. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  130. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js +1 -1
  131. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -1
  132. package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
  133. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  134. package/app/.next-cli-build/server/app/api/breaker/route.js +1 -1
  135. package/app/.next-cli-build/server/app/api/breaker/route.js.nft.json +1 -1
  136. package/app/.next-cli-build/server/app/api/cache/route.js +1 -1
  137. package/app/.next-cli-build/server/app/api/cache/route.js.nft.json +1 -1
  138. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +9 -11
  139. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  140. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
  141. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  142. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  143. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  144. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +5 -2
  145. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  146. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +5 -2
  147. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  148. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +4 -1
  149. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  150. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +5 -2
  151. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  152. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +2 -2
  153. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  154. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +2 -2
  155. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  156. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +2 -2
  157. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  158. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +7 -4
  159. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  160. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +5 -2
  161. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  162. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +10 -9
  163. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  164. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +5 -2
  165. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  166. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +5 -2
  167. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  168. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +5 -2
  169. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  170. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +5 -2
  171. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  172. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  173. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  174. package/app/.next-cli-build/server/app/api/combos/lab/route.js +1 -0
  175. package/app/.next-cli-build/server/app/api/combos/lab/route.js.nft.json +1 -0
  176. package/app/.next-cli-build/server/app/api/combos/lab/route_client-reference-manifest.js +1 -0
  177. package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  178. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  179. package/app/.next-cli-build/server/app/api/combos/simulate/route.js +1 -0
  180. package/app/.next-cli-build/server/app/api/combos/simulate/route.js.nft.json +1 -0
  181. package/app/.next-cli-build/server/app/api/combos/simulate/route_client-reference-manifest.js +1 -0
  182. package/app/.next-cli-build/server/app/api/combos/validate-roles/route.js +1 -1
  183. package/app/.next-cli-build/server/app/api/combos/validate-roles/route.js.nft.json +1 -1
  184. package/app/.next-cli-build/server/app/api/dashboard/stream/route.js +2 -2
  185. package/app/.next-cli-build/server/app/api/dashboard/stream/route.js.nft.json +1 -1
  186. package/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -1
  187. package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
  188. package/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -1
  189. package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
  190. package/app/.next-cli-build/server/app/api/headroom/stop/route.js +2 -2
  191. package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
  192. package/app/.next-cli-build/server/app/api/health/overview/route.js +1 -0
  193. package/app/.next-cli-build/server/app/api/health/overview/route.js.nft.json +1 -0
  194. package/app/.next-cli-build/server/app/api/health/overview/route_client-reference-manifest.js +1 -0
  195. package/app/.next-cli-build/server/app/api/health/providers/route.js +1 -1
  196. package/app/.next-cli-build/server/app/api/health/providers/route.js.nft.json +1 -1
  197. package/app/.next-cli-build/server/app/api/health/route.js +1 -1
  198. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  199. package/app/.next-cli-build/server/app/api/health/stream/route.js +2 -2
  200. package/app/.next-cli-build/server/app/api/health/stream/route.js.nft.json +1 -1
  201. package/app/.next-cli-build/server/app/api/init/route.js +1 -1
  202. package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  203. package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  204. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  205. package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
  206. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  207. package/app/.next-cli-build/server/app/api/locale/route.js +1 -1
  208. package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  209. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +1 -1
  210. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  211. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +5 -5
  212. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  213. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  214. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  215. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  216. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  217. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  218. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  219. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  220. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  221. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
  222. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  223. package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  224. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  225. package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
  226. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  227. package/app/.next-cli-build/server/app/api/models/catalog-sync/route.js +1 -0
  228. package/app/.next-cli-build/server/app/api/models/catalog-sync/route.js.nft.json +1 -0
  229. package/app/.next-cli-build/server/app/api/models/catalog-sync/route_client-reference-manifest.js +1 -0
  230. package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  231. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  232. package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
  233. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  234. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  235. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  236. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  237. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  238. package/app/.next-cli-build/server/app/api/oauth/1min/import/route.js +1 -1
  239. package/app/.next-cli-build/server/app/api/oauth/1min/import/route.js.nft.json +1 -1
  240. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  241. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  242. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
  243. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
  244. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  245. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  246. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +2 -2
  247. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  248. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  249. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  250. package/app/.next-cli-build/server/app/api/oauth/freebuff/import/route.js +1 -0
  251. package/app/.next-cli-build/server/app/api/oauth/freebuff/import/route.js.nft.json +1 -0
  252. package/app/.next-cli-build/server/app/api/oauth/freebuff/import/route_client-reference-manifest.js +1 -0
  253. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  254. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  255. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  256. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  257. package/app/.next-cli-build/server/app/api/oauth/kimi-desktop/auto-import/route.js +1 -1
  258. package/app/.next-cli-build/server/app/api/oauth/kimi-desktop/auto-import/route.js.nft.json +1 -1
  259. package/app/.next-cli-build/server/app/api/oauth/kimi-desktop/import/route.js +1 -1
  260. package/app/.next-cli-build/server/app/api/oauth/kimi-desktop/import/route.js.nft.json +1 -1
  261. package/app/.next-cli-build/server/app/api/oauth/kimi-desktop/quota/route.js +1 -1
  262. package/app/.next-cli-build/server/app/api/oauth/kimi-desktop/quota/route.js.nft.json +1 -1
  263. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
  264. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
  265. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
  266. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  267. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  268. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  269. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js +1 -1
  270. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
  271. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  272. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  273. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  274. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  275. package/app/.next-cli-build/server/app/api/oauth/qwen/import/route.js +1 -1
  276. package/app/.next-cli-build/server/app/api/oauth/qwen/import/route.js.nft.json +1 -1
  277. package/app/.next-cli-build/server/app/api/oauth/wp-studio/import/route.js +1 -1
  278. package/app/.next-cli-build/server/app/api/oauth/wp-studio/import/route.js.nft.json +1 -1
  279. package/app/.next-cli-build/server/app/api/oauth/zcode/import/route.js +1 -0
  280. package/app/.next-cli-build/server/app/api/oauth/zcode/import/route.js.nft.json +1 -0
  281. package/app/.next-cli-build/server/app/api/oauth/zcode/import/route_client-reference-manifest.js +1 -0
  282. package/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js +2 -2
  283. package/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js.nft.json +1 -1
  284. package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js +1 -1
  285. package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js.nft.json +1 -1
  286. package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  287. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  288. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
  289. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  290. package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  291. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  292. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
  293. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  294. package/app/.next-cli-build/server/app/api/providers/[id]/agnes-profile/route.js +1 -1
  295. package/app/.next-cli-build/server/app/api/providers/[id]/agnes-profile/route.js.nft.json +1 -1
  296. package/app/.next-cli-build/server/app/api/providers/[id]/felo-profile/route.js +3 -0
  297. package/app/.next-cli-build/server/app/api/providers/[id]/felo-profile/route.js.nft.json +1 -0
  298. package/app/.next-cli-build/server/app/api/providers/[id]/felo-profile/route_client-reference-manifest.js +1 -0
  299. package/app/.next-cli-build/server/app/api/providers/[id]/freebuff-profile/route.js +1 -1
  300. package/app/.next-cli-build/server/app/api/providers/[id]/freebuff-profile/route.js.nft.json +1 -1
  301. package/app/.next-cli-build/server/app/api/providers/[id]/health-timeline/route.js +1 -1
  302. package/app/.next-cli-build/server/app/api/providers/[id]/health-timeline/route.js.nft.json +1 -1
  303. package/app/.next-cli-build/server/app/api/providers/[id]/inxora-profile/route.js +1 -1
  304. package/app/.next-cli-build/server/app/api/providers/[id]/inxora-profile/route.js.nft.json +1 -1
  305. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +3 -1
  306. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  307. package/app/.next-cli-build/server/app/api/providers/[id]/onemin-api-profile/route.js +1 -1
  308. package/app/.next-cli-build/server/app/api/providers/[id]/onemin-api-profile/route.js.nft.json +1 -1
  309. package/app/.next-cli-build/server/app/api/providers/[id]/onemin-profile/route.js +1 -1
  310. package/app/.next-cli-build/server/app/api/providers/[id]/onemin-profile/route.js.nft.json +1 -1
  311. package/app/.next-cli-build/server/app/api/providers/[id]/qwencloud-profile/route.js +1 -1
  312. package/app/.next-cli-build/server/app/api/providers/[id]/qwencloud-profile/route.js.nft.json +1 -1
  313. package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  314. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  315. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  316. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  317. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  318. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  319. package/app/.next-cli-build/server/app/api/providers/[id]/v0-profile/route.js +1 -1
  320. package/app/.next-cli-build/server/app/api/providers/[id]/v0-profile/route.js.nft.json +1 -1
  321. package/app/.next-cli-build/server/app/api/providers/[id]/vault-pool/route.js +1 -1
  322. package/app/.next-cli-build/server/app/api/providers/[id]/vault-pool/route.js.nft.json +1 -1
  323. package/app/.next-cli-build/server/app/api/providers/[id]/zai-profile/route.js +1 -0
  324. package/app/.next-cli-build/server/app/api/providers/[id]/zai-profile/route.js.nft.json +1 -0
  325. package/app/.next-cli-build/server/app/api/providers/[id]/zai-profile/route_client-reference-manifest.js +1 -0
  326. package/app/.next-cli-build/server/app/api/providers/[id]/zenmux-plans/route.js +1 -1
  327. package/app/.next-cli-build/server/app/api/providers/[id]/zenmux-plans/route.js.nft.json +1 -1
  328. package/app/.next-cli-build/server/app/api/providers/capture/launch/route.js +1 -0
  329. package/app/.next-cli-build/server/app/api/providers/capture/launch/route.js.nft.json +1 -0
  330. package/app/.next-cli-build/server/app/api/providers/capture/launch/route_client-reference-manifest.js +1 -0
  331. package/app/.next-cli-build/server/app/api/providers/capture/route.js +1 -0
  332. package/app/.next-cli-build/server/app/api/providers/capture/route.js.nft.json +1 -0
  333. package/app/.next-cli-build/server/app/api/providers/capture/route_client-reference-manifest.js +1 -0
  334. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  335. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  336. package/app/.next-cli-build/server/app/api/providers/felo-capture/launch/route.js +1 -0
  337. package/app/.next-cli-build/server/app/api/providers/felo-capture/launch/route.js.nft.json +1 -0
  338. package/app/.next-cli-build/server/app/api/providers/felo-capture/launch/route_client-reference-manifest.js +1 -0
  339. package/app/.next-cli-build/server/app/api/providers/felo-capture/route.js +1 -0
  340. package/app/.next-cli-build/server/app/api/providers/felo-capture/route.js.nft.json +1 -0
  341. package/app/.next-cli-build/server/app/api/providers/felo-capture/route_client-reference-manifest.js +1 -0
  342. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
  343. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  344. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  345. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  346. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
  347. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  348. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  349. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  350. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  351. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  352. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
  353. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  354. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  355. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  356. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +2 -2
  357. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  358. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +2 -2
  359. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  360. package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
  361. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  362. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +2 -2
  363. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  364. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js +2 -2
  365. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
  366. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js +1 -1
  367. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
  368. package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  369. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  370. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
  371. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  372. package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
  373. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  374. package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  375. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  376. package/app/.next-cli-build/server/app/api/shutdown/route.js +1 -1
  377. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  378. package/app/.next-cli-build/server/app/api/smart-routing/active/route.js +1 -0
  379. package/app/.next-cli-build/server/app/api/smart-routing/active/route.js.nft.json +1 -0
  380. package/app/.next-cli-build/server/app/api/smart-routing/active/route_client-reference-manifest.js +1 -0
  381. package/app/.next-cli-build/server/app/api/smart-routing/history/route.js +17 -0
  382. package/app/.next-cli-build/server/app/api/smart-routing/history/route.js.nft.json +1 -0
  383. package/app/.next-cli-build/server/app/api/smart-routing/history/route_client-reference-manifest.js +1 -0
  384. package/app/.next-cli-build/server/app/api/smart-routing/lab/route.js +16 -0
  385. package/app/.next-cli-build/server/app/api/smart-routing/lab/route.js.nft.json +1 -0
  386. package/app/.next-cli-build/server/app/api/smart-routing/lab/route_client-reference-manifest.js +1 -0
  387. package/app/.next-cli-build/server/app/api/smart-routing/stream/route.js +7 -0
  388. package/app/.next-cli-build/server/app/api/smart-routing/stream/route.js.nft.json +1 -0
  389. package/app/.next-cli-build/server/app/api/smart-routing/stream/route_client-reference-manifest.js +1 -0
  390. package/app/.next-cli-build/server/app/api/swarm/active/route.js +1 -1
  391. package/app/.next-cli-build/server/app/api/swarm/active/route.js.nft.json +1 -1
  392. package/app/.next-cli-build/server/app/api/swarm/stream/route.js +4 -2
  393. package/app/.next-cli-build/server/app/api/swarm/stream/route.js.nft.json +1 -1
  394. package/app/.next-cli-build/server/app/api/tags/route.js +1 -1
  395. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  396. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  397. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  398. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
  399. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  400. package/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
  401. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  402. package/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
  403. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  404. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  405. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  406. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  407. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  408. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
  409. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  410. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
  411. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  412. package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
  413. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  414. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
  415. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  416. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
  417. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  418. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
  419. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  420. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +2 -2
  421. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  422. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
  423. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
  424. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  425. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  426. package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  427. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  428. package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  429. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  430. package/app/.next-cli-build/server/app/api/usage/leaderboard/route.js +1 -1
  431. package/app/.next-cli-build/server/app/api/usage/leaderboard/route.js.nft.json +1 -1
  432. package/app/.next-cli-build/server/app/api/usage/logs/route.js +1 -1
  433. package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
  434. package/app/.next-cli-build/server/app/api/usage/meta/route.js +1 -1
  435. package/app/.next-cli-build/server/app/api/usage/meta/route.js.nft.json +1 -1
  436. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  437. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  438. package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  439. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  440. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  441. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  442. package/app/.next-cli-build/server/app/api/usage/retry-stats/route.js +1 -1
  443. package/app/.next-cli-build/server/app/api/usage/retry-stats/route.js.nft.json +1 -1
  444. package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  445. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  446. package/app/.next-cli-build/server/app/api/usage/stream/route.js +2 -2
  447. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  448. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  449. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  450. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  451. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  452. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  453. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  454. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
  455. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  456. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  457. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  458. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  459. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  460. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +1 -1
  461. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  462. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
  463. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  464. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  465. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  466. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
  467. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  468. package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  469. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  470. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  471. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  472. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  473. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  474. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  475. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  476. package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  477. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  478. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  479. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  480. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  481. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  482. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  483. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  484. package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  485. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  486. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  487. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  488. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  489. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  490. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  491. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  492. package/app/.next-cli-build/server/app/callback/page.js +2 -2
  493. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  494. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  495. package/app/.next-cli-build/server/app/callback.html +1 -1
  496. package/app/.next-cli-build/server/app/callback.rsc +6 -6
  497. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +6 -6
  498. package/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
  499. package/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +6 -6
  500. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
  501. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
  502. package/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
  503. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +2 -2
  504. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  505. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  506. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  507. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +7 -7
  508. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +7 -7
  509. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  510. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +6 -6
  511. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
  512. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +2 -2
  513. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
  514. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
  515. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
  516. package/app/.next-cli-build/server/app/favicon.ico/route.js +1 -1
  517. package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
  518. package/app/.next-cli-build/server/app/index.html +1 -1
  519. package/app/.next-cli-build/server/app/index.rsc +6 -6
  520. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  521. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +6 -6
  522. package/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
  523. package/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +6 -6
  524. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +2 -2
  525. package/app/.next-cli-build/server/app/landing/page.js +2 -2
  526. package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  527. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  528. package/app/.next-cli-build/server/app/landing.html +1 -1
  529. package/app/.next-cli-build/server/app/landing.rsc +6 -6
  530. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +6 -6
  531. package/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
  532. package/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +6 -6
  533. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
  534. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
  535. package/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
  536. package/app/.next-cli-build/server/app/login/page.js +2 -2
  537. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  538. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  539. package/app/.next-cli-build/server/app/login.html +1 -1
  540. package/app/.next-cli-build/server/app/login.rsc +7 -7
  541. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +7 -7
  542. package/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
  543. package/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +6 -6
  544. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
  545. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  546. package/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
  547. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js +2 -2
  548. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  549. package/app/.next-cli-build/server/app/page.js +2 -2
  550. package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  551. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  552. package/app/.next-cli-build/server/app-paths-manifest.json +31 -14
  553. package/app/.next-cli-build/server/chunks/1194.js +1 -1
  554. package/app/.next-cli-build/server/chunks/1241.js +1 -1
  555. package/app/.next-cli-build/server/chunks/1350.js +5 -2
  556. package/app/.next-cli-build/server/chunks/1411.js +9 -0
  557. package/app/.next-cli-build/server/chunks/1429.js +1 -1
  558. package/app/.next-cli-build/server/chunks/1719.js +1 -1
  559. package/app/.next-cli-build/server/chunks/1891.js +1 -1
  560. package/app/.next-cli-build/server/chunks/212.js +1 -1
  561. package/app/.next-cli-build/server/chunks/2409.js +1 -1
  562. package/app/.next-cli-build/server/chunks/3520.js +1 -0
  563. package/app/.next-cli-build/server/chunks/3535.js +1 -1
  564. package/app/.next-cli-build/server/chunks/3552.js +1 -0
  565. package/app/.next-cli-build/server/chunks/3593.js +1 -1
  566. package/app/.next-cli-build/server/chunks/{8873.js → 3735.js} +1 -1
  567. package/app/.next-cli-build/server/chunks/3841.js +1 -0
  568. package/app/.next-cli-build/server/chunks/4046.js +1 -1
  569. package/app/.next-cli-build/server/chunks/4109.js +4 -0
  570. package/app/.next-cli-build/server/chunks/412.js +5 -5
  571. package/app/.next-cli-build/server/chunks/4502.js +16 -0
  572. package/app/.next-cli-build/server/chunks/4739.js +1 -1
  573. package/app/.next-cli-build/server/chunks/4780.js +1 -1
  574. package/app/.next-cli-build/server/chunks/4957.js +1 -0
  575. package/app/.next-cli-build/server/chunks/5050.js +2 -0
  576. package/app/.next-cli-build/server/chunks/507.js +1 -1
  577. package/app/.next-cli-build/server/chunks/5253.js +17 -0
  578. package/app/.next-cli-build/server/chunks/5258.js +1 -1
  579. package/app/.next-cli-build/server/chunks/5330.js +37 -28
  580. package/app/.next-cli-build/server/chunks/5473.js +9 -0
  581. package/app/.next-cli-build/server/chunks/5604.js +13 -0
  582. package/app/.next-cli-build/server/chunks/5612.js +1 -1
  583. package/app/.next-cli-build/server/chunks/5615.js +1 -1
  584. package/app/.next-cli-build/server/chunks/5628.js +1 -1
  585. package/app/.next-cli-build/server/chunks/5699.js +1 -1
  586. package/app/.next-cli-build/server/chunks/5961.js +1 -1
  587. package/app/.next-cli-build/server/chunks/6182.js +1 -1
  588. package/app/.next-cli-build/server/chunks/6488.js +1 -0
  589. package/app/.next-cli-build/server/chunks/6630.js +1 -1
  590. package/app/.next-cli-build/server/chunks/6777.js +1 -1
  591. package/app/.next-cli-build/server/chunks/6878.js +1 -0
  592. package/app/.next-cli-build/server/chunks/698.js +1 -1
  593. package/app/.next-cli-build/server/chunks/7016.js +3 -0
  594. package/app/.next-cli-build/server/chunks/7410.js +1 -1
  595. package/app/.next-cli-build/server/chunks/7765.js +13 -0
  596. package/app/.next-cli-build/server/chunks/7815.js +1 -0
  597. package/app/.next-cli-build/server/chunks/7965.js +1 -1
  598. package/app/.next-cli-build/server/chunks/8048.js +1 -0
  599. package/app/.next-cli-build/server/chunks/809.js +1 -0
  600. package/app/.next-cli-build/server/chunks/8238.js +1 -1
  601. package/app/.next-cli-build/server/chunks/8266.js +1 -0
  602. package/app/.next-cli-build/server/chunks/8271.js +1 -1
  603. package/app/.next-cli-build/server/chunks/8520.js +1 -1
  604. package/app/.next-cli-build/server/chunks/8802.js +2 -2
  605. package/app/.next-cli-build/server/chunks/885.js +17 -13
  606. package/app/.next-cli-build/server/chunks/8895.js +6 -6
  607. package/app/.next-cli-build/server/chunks/9365.js +9 -0
  608. package/app/.next-cli-build/server/chunks/9609.js +1 -1
  609. package/app/.next-cli-build/server/chunks/9903.js +2 -2
  610. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  611. package/app/.next-cli-build/server/middleware.js +5 -5
  612. package/app/.next-cli-build/server/pages/404.html +1 -1
  613. package/app/.next-cli-build/server/pages/500.html +1 -1
  614. package/app/.next-cli-build/server/server-reference-manifest.js +1 -1
  615. package/app/.next-cli-build/server/server-reference-manifest.json +1 -1
  616. package/app/.next-cli-build/static/BmLJ5bmQbpsF-jvZIwr9t/_buildManifest.js +1 -0
  617. package/app/.next-cli-build/static/chunks/1321-184fe0dd34faf680.js +1 -0
  618. package/app/.next-cli-build/static/chunks/2563-a547c8ef699e1791.js +1 -0
  619. package/app/.next-cli-build/static/chunks/5497-9caed03337b37e47.js +7 -0
  620. package/app/.next-cli-build/static/chunks/705-eaa2de0fd5964be4.js +1 -0
  621. package/app/.next-cli-build/static/chunks/{9622-fcd7c93a94eaa38f.js → 9622-d0f22be4f1ef8011.js} +6 -6
  622. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/alerts/{page-c263cd784e69e6f1.js → page-3527fe022102a692.js} +1 -1
  623. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/basic-chat/page-fe59538aa4add719.js +1 -0
  624. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/{page-3c3074cf3f61df46.js → page-1849f671db0f9fe9.js} +1 -1
  625. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/{page-f7cdc992cb310077.js → page-0e903eb34158c8a8.js} +1 -1
  626. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-8406e79b31e512bb.js +3 -0
  627. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/page-81ef4c324f201832.js +1 -0
  628. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-72670cb4cac6b97d.js +1 -0
  629. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/health/page-d71cb9f910cb5d13.js +1 -0
  630. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/{page-7d472b122fb182f0.js → page-94341b277cf27462.js} +1 -1
  631. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/{page-83272baae17d38f1.js → page-558f5601f8df1d4d.js} +1 -1
  632. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/combo/[id]/{page-f36e5ac11783fd1e.js → page-6effc5c0f2b1d72e.js} +1 -1
  633. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/{page-4069e1d40a3c70a6.js → page-05b05e6f6136829d.js} +1 -1
  634. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/web/{page-e794909abbc7a09a.js → page-95375c7b40f99306.js} +1 -1
  635. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/{page-1d972fd3baee7474.js → page-4549c187375b9192.js} +1 -1
  636. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/overview/{page-839ed70e115af9c9.js → page-bb459e518dfa9f70.js} +1 -1
  637. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-cc5141ff81040e89.js +1 -0
  638. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/playground/page-625485e32264e15b.js +1 -0
  639. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-09b1b5beae8435cd.js +1 -0
  640. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-776433cfd87f123a.js +10 -0
  641. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/new/{page-bcf9d97ab4dc20d9.js → page-1f67fe5d69805df2.js} +1 -1
  642. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-5d9d7d47216375ea.js +1 -0
  643. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/proxy-pools/{page-58d8d0fa5523ff95.js → page-c561cab29785310a.js} +1 -1
  644. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-140fef4b235b4792.js +1 -0
  645. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/{page-a8b151d5ae9004ea.js → page-acf6cde3210c179a.js} +1 -1
  646. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/smart-routing/page-5c8e7b3b71579268.js +1 -0
  647. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/swarm/page-6cda956597418bd9.js +1 -0
  648. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/{page-d57c129c03c9cb36.js → page-c3ae0ab7f0d0634d.js} +1 -1
  649. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/translator/{page-61d162d7a7f88a11.js → page-cb12854a23416b01.js} +1 -1
  650. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/page-55b0738c2d201462.js +1 -0
  651. package/app/.next-cli-build/static/chunks/app/(dashboard)/layout-66efb163e888cd6b.js +1 -0
  652. package/app/.next-cli-build/static/chunks/app/_global-error/page-bf747ebfcd7e601c.js +1 -0
  653. package/app/.next-cli-build/static/chunks/app/api/alerts/test/route-bf747ebfcd7e601c.js +1 -0
  654. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-bf747ebfcd7e601c.js +1 -0
  655. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-bf747ebfcd7e601c.js +1 -0
  656. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-bf747ebfcd7e601c.js +1 -0
  657. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-bf747ebfcd7e601c.js +1 -0
  658. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-bf747ebfcd7e601c.js +1 -0
  659. package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-bf747ebfcd7e601c.js +1 -0
  660. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-bf747ebfcd7e601c.js +1 -0
  661. package/app/.next-cli-build/static/chunks/app/api/breaker/route-bf747ebfcd7e601c.js +1 -0
  662. package/app/.next-cli-build/static/chunks/app/api/cache/route-bf747ebfcd7e601c.js +1 -0
  663. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-bf747ebfcd7e601c.js +1 -0
  664. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-bf747ebfcd7e601c.js +1 -0
  665. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-bf747ebfcd7e601c.js +1 -0
  666. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-bf747ebfcd7e601c.js +1 -0
  667. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-bf747ebfcd7e601c.js +1 -0
  668. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-bf747ebfcd7e601c.js +1 -0
  669. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-bf747ebfcd7e601c.js +1 -0
  670. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-bf747ebfcd7e601c.js +1 -0
  671. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-bf747ebfcd7e601c.js +1 -0
  672. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-bf747ebfcd7e601c.js +1 -0
  673. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-bf747ebfcd7e601c.js +1 -0
  674. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-bf747ebfcd7e601c.js +1 -0
  675. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-bf747ebfcd7e601c.js +1 -0
  676. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-bf747ebfcd7e601c.js +1 -0
  677. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-bf747ebfcd7e601c.js +1 -0
  678. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-bf747ebfcd7e601c.js +1 -0
  679. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-bf747ebfcd7e601c.js +1 -0
  680. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-bf747ebfcd7e601c.js +1 -0
  681. package/app/.next-cli-build/static/chunks/app/api/combos/lab/route-bf747ebfcd7e601c.js +1 -0
  682. package/app/.next-cli-build/static/chunks/app/api/combos/route-bf747ebfcd7e601c.js +1 -0
  683. package/app/.next-cli-build/static/chunks/app/api/combos/simulate/route-bf747ebfcd7e601c.js +1 -0
  684. package/app/.next-cli-build/static/chunks/app/api/combos/validate-roles/route-bf747ebfcd7e601c.js +1 -0
  685. package/app/.next-cli-build/static/chunks/app/api/dashboard/stream/route-bf747ebfcd7e601c.js +1 -0
  686. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-bf747ebfcd7e601c.js +1 -0
  687. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-bf747ebfcd7e601c.js +1 -0
  688. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-bf747ebfcd7e601c.js +1 -0
  689. package/app/.next-cli-build/static/chunks/app/api/health/overview/route-bf747ebfcd7e601c.js +1 -0
  690. package/app/.next-cli-build/static/chunks/app/api/health/providers/route-bf747ebfcd7e601c.js +1 -0
  691. package/app/.next-cli-build/static/chunks/app/api/health/route-bf747ebfcd7e601c.js +1 -0
  692. package/app/.next-cli-build/static/chunks/app/api/health/stream/route-bf747ebfcd7e601c.js +1 -0
  693. package/app/.next-cli-build/static/chunks/app/api/init/route-bf747ebfcd7e601c.js +1 -0
  694. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-bf747ebfcd7e601c.js +1 -0
  695. package/app/.next-cli-build/static/chunks/app/api/keys/route-bf747ebfcd7e601c.js +1 -0
  696. package/app/.next-cli-build/static/chunks/app/api/locale/route-bf747ebfcd7e601c.js +1 -0
  697. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-bf747ebfcd7e601c.js +1 -0
  698. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-bf747ebfcd7e601c.js +1 -0
  699. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-bf747ebfcd7e601c.js +1 -0
  700. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-bf747ebfcd7e601c.js +1 -0
  701. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-bf747ebfcd7e601c.js +1 -0
  702. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-bf747ebfcd7e601c.js +1 -0
  703. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-bf747ebfcd7e601c.js +1 -0
  704. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-bf747ebfcd7e601c.js +1 -0
  705. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-bf747ebfcd7e601c.js +1 -0
  706. package/app/.next-cli-build/static/chunks/app/api/models/catalog-sync/route-bf747ebfcd7e601c.js +1 -0
  707. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-bf747ebfcd7e601c.js +1 -0
  708. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-bf747ebfcd7e601c.js +1 -0
  709. package/app/.next-cli-build/static/chunks/app/api/models/route-bf747ebfcd7e601c.js +1 -0
  710. package/app/.next-cli-build/static/chunks/app/api/models/test/route-bf747ebfcd7e601c.js +1 -0
  711. package/app/.next-cli-build/static/chunks/app/api/oauth/1min/import/route-bf747ebfcd7e601c.js +1 -0
  712. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-bf747ebfcd7e601c.js +1 -0
  713. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-bf747ebfcd7e601c.js +1 -0
  714. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-bf747ebfcd7e601c.js +1 -0
  715. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-bf747ebfcd7e601c.js +1 -0
  716. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-bf747ebfcd7e601c.js +1 -0
  717. package/app/.next-cli-build/static/chunks/app/api/oauth/freebuff/import/route-bf747ebfcd7e601c.js +1 -0
  718. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-bf747ebfcd7e601c.js +1 -0
  719. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-bf747ebfcd7e601c.js +1 -0
  720. package/app/.next-cli-build/static/chunks/app/api/oauth/kimi-desktop/auto-import/route-bf747ebfcd7e601c.js +1 -0
  721. package/app/.next-cli-build/static/chunks/app/api/oauth/kimi-desktop/import/route-bf747ebfcd7e601c.js +1 -0
  722. package/app/.next-cli-build/static/chunks/app/api/oauth/kimi-desktop/quota/route-bf747ebfcd7e601c.js +1 -0
  723. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-bf747ebfcd7e601c.js +1 -0
  724. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-bf747ebfcd7e601c.js +1 -0
  725. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-bf747ebfcd7e601c.js +1 -0
  726. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-bf747ebfcd7e601c.js +1 -0
  727. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-bf747ebfcd7e601c.js +1 -0
  728. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-bf747ebfcd7e601c.js +1 -0
  729. package/app/.next-cli-build/static/chunks/app/api/oauth/qwen/import/route-bf747ebfcd7e601c.js +1 -0
  730. package/app/.next-cli-build/static/chunks/app/api/oauth/wp-studio/import/route-bf747ebfcd7e601c.js +1 -0
  731. package/app/.next-cli-build/static/chunks/app/api/oauth/zcode/import/route-bf747ebfcd7e601c.js +1 -0
  732. package/app/.next-cli-build/static/chunks/app/api/oauth/zed/auto-import/route-bf747ebfcd7e601c.js +1 -0
  733. package/app/.next-cli-build/static/chunks/app/api/oauth/zed/import/route-bf747ebfcd7e601c.js +1 -0
  734. package/app/.next-cli-build/static/chunks/app/api/pricing/route-bf747ebfcd7e601c.js +1 -0
  735. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-bf747ebfcd7e601c.js +1 -0
  736. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-bf747ebfcd7e601c.js +1 -0
  737. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-bf747ebfcd7e601c.js +1 -0
  738. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/agnes-profile/route-bf747ebfcd7e601c.js +1 -0
  739. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/felo-profile/route-bf747ebfcd7e601c.js +1 -0
  740. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/freebuff-profile/route-bf747ebfcd7e601c.js +1 -0
  741. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/health-timeline/route-bf747ebfcd7e601c.js +1 -0
  742. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/inxora-profile/route-bf747ebfcd7e601c.js +1 -0
  743. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-bf747ebfcd7e601c.js +1 -0
  744. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/onemin-api-profile/route-bf747ebfcd7e601c.js +1 -0
  745. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/onemin-profile/route-bf747ebfcd7e601c.js +1 -0
  746. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/qwencloud-profile/route-bf747ebfcd7e601c.js +1 -0
  747. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-bf747ebfcd7e601c.js +1 -0
  748. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-bf747ebfcd7e601c.js +1 -0
  749. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-bf747ebfcd7e601c.js +1 -0
  750. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/v0-profile/route-bf747ebfcd7e601c.js +1 -0
  751. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/vault-pool/route-bf747ebfcd7e601c.js +1 -0
  752. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/zai-profile/route-bf747ebfcd7e601c.js +1 -0
  753. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/zenmux-plans/route-bf747ebfcd7e601c.js +1 -0
  754. package/app/.next-cli-build/static/chunks/app/api/providers/capture/launch/route-bf747ebfcd7e601c.js +1 -0
  755. package/app/.next-cli-build/static/chunks/app/api/providers/capture/route-bf747ebfcd7e601c.js +1 -0
  756. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-bf747ebfcd7e601c.js +1 -0
  757. package/app/.next-cli-build/static/chunks/app/api/providers/felo-capture/launch/route-bf747ebfcd7e601c.js +1 -0
  758. package/app/.next-cli-build/static/chunks/app/api/providers/felo-capture/route-bf747ebfcd7e601c.js +1 -0
  759. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-bf747ebfcd7e601c.js +1 -0
  760. package/app/.next-cli-build/static/chunks/app/api/providers/route-bf747ebfcd7e601c.js +1 -0
  761. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-bf747ebfcd7e601c.js +1 -0
  762. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-bf747ebfcd7e601c.js +1 -0
  763. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-bf747ebfcd7e601c.js +1 -0
  764. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-bf747ebfcd7e601c.js +1 -0
  765. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-bf747ebfcd7e601c.js +1 -0
  766. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-bf747ebfcd7e601c.js +1 -0
  767. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-bf747ebfcd7e601c.js +1 -0
  768. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-bf747ebfcd7e601c.js +1 -0
  769. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-bf747ebfcd7e601c.js +1 -0
  770. package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-bf747ebfcd7e601c.js +1 -0
  771. package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-bf747ebfcd7e601c.js +1 -0
  772. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-bf747ebfcd7e601c.js +1 -0
  773. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-bf747ebfcd7e601c.js +1 -0
  774. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-bf747ebfcd7e601c.js +1 -0
  775. package/app/.next-cli-build/static/chunks/app/api/settings/route-bf747ebfcd7e601c.js +1 -0
  776. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-bf747ebfcd7e601c.js +1 -0
  777. package/app/.next-cli-build/static/chunks/app/api/smart-routing/active/route-bf747ebfcd7e601c.js +1 -0
  778. package/app/.next-cli-build/static/chunks/app/api/smart-routing/history/route-bf747ebfcd7e601c.js +1 -0
  779. package/app/.next-cli-build/static/chunks/app/api/smart-routing/lab/route-bf747ebfcd7e601c.js +1 -0
  780. package/app/.next-cli-build/static/chunks/app/api/smart-routing/stream/route-bf747ebfcd7e601c.js +1 -0
  781. package/app/.next-cli-build/static/chunks/app/api/swarm/active/route-bf747ebfcd7e601c.js +1 -0
  782. package/app/.next-cli-build/static/chunks/app/api/swarm/stream/route-bf747ebfcd7e601c.js +1 -0
  783. package/app/.next-cli-build/static/chunks/app/api/tags/route-bf747ebfcd7e601c.js +1 -0
  784. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-bf747ebfcd7e601c.js +1 -0
  785. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-bf747ebfcd7e601c.js +1 -0
  786. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-bf747ebfcd7e601c.js +1 -0
  787. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-bf747ebfcd7e601c.js +1 -0
  788. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-bf747ebfcd7e601c.js +1 -0
  789. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-bf747ebfcd7e601c.js +1 -0
  790. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-bf747ebfcd7e601c.js +1 -0
  791. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-bf747ebfcd7e601c.js +1 -0
  792. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-bf747ebfcd7e601c.js +1 -0
  793. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-bf747ebfcd7e601c.js +1 -0
  794. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-bf747ebfcd7e601c.js +1 -0
  795. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-bf747ebfcd7e601c.js +1 -0
  796. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-bf747ebfcd7e601c.js +1 -0
  797. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-bf747ebfcd7e601c.js +1 -0
  798. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-bf747ebfcd7e601c.js +1 -0
  799. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-bf747ebfcd7e601c.js +1 -0
  800. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-bf747ebfcd7e601c.js +1 -0
  801. package/app/.next-cli-build/static/chunks/app/api/usage/leaderboard/route-bf747ebfcd7e601c.js +1 -0
  802. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-bf747ebfcd7e601c.js +1 -0
  803. package/app/.next-cli-build/static/chunks/app/api/usage/meta/route-bf747ebfcd7e601c.js +1 -0
  804. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-bf747ebfcd7e601c.js +1 -0
  805. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-bf747ebfcd7e601c.js +1 -0
  806. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-bf747ebfcd7e601c.js +1 -0
  807. package/app/.next-cli-build/static/chunks/app/api/usage/retry-stats/route-bf747ebfcd7e601c.js +1 -0
  808. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-bf747ebfcd7e601c.js +1 -0
  809. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-bf747ebfcd7e601c.js +1 -0
  810. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-bf747ebfcd7e601c.js +1 -0
  811. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-bf747ebfcd7e601c.js +1 -0
  812. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-bf747ebfcd7e601c.js +1 -0
  813. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-bf747ebfcd7e601c.js +1 -0
  814. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-bf747ebfcd7e601c.js +1 -0
  815. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-bf747ebfcd7e601c.js +1 -0
  816. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-bf747ebfcd7e601c.js +1 -0
  817. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-bf747ebfcd7e601c.js +1 -0
  818. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-bf747ebfcd7e601c.js +1 -0
  819. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-bf747ebfcd7e601c.js +1 -0
  820. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-bf747ebfcd7e601c.js +1 -0
  821. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-bf747ebfcd7e601c.js +1 -0
  822. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-bf747ebfcd7e601c.js +1 -0
  823. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-bf747ebfcd7e601c.js +1 -0
  824. package/app/.next-cli-build/static/chunks/app/api/v1/route-bf747ebfcd7e601c.js +1 -0
  825. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-bf747ebfcd7e601c.js +1 -0
  826. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-bf747ebfcd7e601c.js +1 -0
  827. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-bf747ebfcd7e601c.js +1 -0
  828. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-bf747ebfcd7e601c.js +1 -0
  829. package/app/.next-cli-build/static/chunks/app/api/version/route-bf747ebfcd7e601c.js +1 -0
  830. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-bf747ebfcd7e601c.js +1 -0
  831. package/app/.next-cli-build/static/chunks/app/api/version/update/route-bf747ebfcd7e601c.js +1 -0
  832. package/app/.next-cli-build/static/chunks/app/dashboard/settings/pricing/page-baf12d16760e9b90.js +1 -0
  833. package/app/.next-cli-build/static/chunks/app/{layout-10bff7b57a2a3c2c.js → layout-155acd4a482252b8.js} +1 -1
  834. package/app/.next-cli-build/static/chunks/app/login/{page-32ab5d7c75651107.js → page-089f2be5081e9c05.js} +1 -1
  835. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-bf747ebfcd7e601c.js +1 -0
  836. package/app/.next-cli-build/static/chunks/app/page-bf747ebfcd7e601c.js +1 -0
  837. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-bf747ebfcd7e601c.js +1 -0
  838. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-bf747ebfcd7e601c.js +1 -0
  839. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-bf747ebfcd7e601c.js +1 -0
  840. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-bf747ebfcd7e601c.js +1 -0
  841. package/app/.next-cli-build/static/css/8a8ea9ee79a01730.css +1 -0
  842. package/app/node_modules/playwright-core/browsers.json +75 -0
  843. package/app/node_modules/playwright-core/index.js +17 -0
  844. package/app/node_modules/playwright-core/index.mjs +28 -0
  845. package/app/node_modules/playwright-core/lib/bootstrap.js +88 -0
  846. package/app/node_modules/playwright-core/lib/coreBundle.js +74830 -0
  847. package/app/node_modules/playwright-core/lib/utilsBundle.js +90764 -0
  848. package/app/node_modules/playwright-core/package.json +34 -0
  849. package/app/package.json +2 -5
  850. package/app/public/providers/ai21.png +0 -0
  851. package/app/public/providers/aihorde.png +0 -0
  852. package/app/public/providers/aimlapi.png +0 -0
  853. package/app/public/providers/ainative.png +0 -0
  854. package/app/public/providers/aion.png +0 -0
  855. package/app/public/providers/alibaba-cn.svg +1 -11
  856. package/app/public/providers/alibaba.svg +1 -11
  857. package/app/public/providers/alitp-intl.svg +1 -0
  858. package/app/public/providers/anyapi.png +0 -0
  859. package/app/public/providers/arcee-ai.png +0 -0
  860. package/app/public/providers/auriko.svg +61 -0
  861. package/app/public/providers/azure-ai.svg +23 -0
  862. package/app/public/providers/bai.png +0 -0
  863. package/app/public/providers/baseten.png +0 -0
  864. package/app/public/providers/bazaarlink.svg +8 -0
  865. package/app/public/providers/blackbox-web.png +0 -0
  866. package/app/public/providers/bluesminds.png +0 -0
  867. package/app/public/providers/bytez.png +0 -0
  868. package/app/public/providers/charm-hyper.png +0 -0
  869. package/app/public/providers/chat-oripe.svg +4 -0
  870. package/app/public/providers/chatanywhere.svg +1 -0
  871. package/app/public/providers/cheaperinference.png +0 -0
  872. package/app/public/providers/chenzk.png +0 -0
  873. package/app/public/providers/clarifai.svg +1 -0
  874. package/app/public/providers/cloudcode-one.svg +13 -0
  875. package/app/public/providers/conol-web.png +0 -0
  876. package/app/public/providers/crof.png +0 -0
  877. package/app/public/providers/dahl.png +0 -0
  878. package/app/public/providers/datarobot.png +0 -0
  879. package/app/public/providers/dgrid.png +0 -0
  880. package/app/public/providers/digitalocean.svg +1 -0
  881. package/app/public/providers/dit.svg +10 -0
  882. package/app/public/providers/docker-model-runner.svg +1 -0
  883. package/app/public/providers/duckduckgo-web.svg +1 -7
  884. package/app/public/providers/dxnt.svg +10 -0
  885. package/app/public/providers/electronhub.svg +4 -0
  886. package/app/public/providers/empower.svg +4 -0
  887. package/app/public/providers/factory.svg +4 -0
  888. package/app/public/providers/fastrouter.svg +4 -0
  889. package/app/public/providers/felo-web.svg +50 -0
  890. package/app/public/providers/fireworks.svg +3 -0
  891. package/app/public/providers/fishaudio.svg +1 -0
  892. package/app/public/providers/free-ai.svg +4 -0
  893. package/app/public/providers/freeaiapikey.svg +4 -0
  894. package/app/public/providers/freebuff.svg +6 -0
  895. package/app/public/providers/freeinference.svg +4 -0
  896. package/app/public/providers/freemodel-dev.svg +4 -0
  897. package/app/public/providers/freetheai.svg +4 -0
  898. package/app/public/providers/friendliai.svg +4 -0
  899. package/app/public/providers/g4f-gemini.png +0 -0
  900. package/app/public/providers/g4f-groq.png +0 -0
  901. package/app/public/providers/g4f-nvidia.png +0 -0
  902. package/app/public/providers/g4f-ollama.png +0 -0
  903. package/app/public/providers/g4f-pollinations.svg +9 -0
  904. package/app/public/providers/gemini-business.svg +1 -0
  905. package/app/public/providers/getgoapi.svg +4 -0
  906. package/app/public/providers/gitlab.png +0 -0
  907. package/app/public/providers/gitlab.svg +1 -0
  908. package/app/public/providers/gitlawb-gmi.svg +4 -0
  909. package/app/public/providers/gitlawb.svg +4 -0
  910. package/app/public/providers/gladia.svg +1 -0
  911. package/app/public/providers/hackclub.png +0 -0
  912. package/app/public/providers/hailuo-web.svg +1 -0
  913. package/app/public/providers/helixmind.svg +4 -0
  914. package/app/public/providers/heroku.svg +16 -0
  915. package/app/public/providers/huggingchat.svg +1 -9
  916. package/app/public/providers/hyperagent.svg +1 -0
  917. package/app/public/providers/inception.svg +4 -0
  918. package/app/public/providers/inference-net.svg +4 -0
  919. package/app/public/providers/inner-ai.svg +1 -0
  920. package/app/public/providers/kenari.svg +4 -0
  921. package/app/public/providers/kilo-gateway.svg +4 -0
  922. package/app/public/providers/kimi-desktop.svg +1 -9
  923. package/app/public/providers/kimi-web.svg +1 -8
  924. package/app/public/providers/lambda-ai.svg +4 -0
  925. package/app/public/providers/laozhang.svg +4 -0
  926. package/app/public/providers/lemonade.svg +1 -0
  927. package/app/public/providers/liquid.svg +4 -0
  928. package/app/public/providers/literouter.svg +4 -0
  929. package/app/public/providers/llama-cpp.svg +1 -0
  930. package/app/public/providers/llamafile.svg +1 -0
  931. package/app/public/providers/llamagate.svg +4 -0
  932. package/app/public/providers/llm-kiwi.svg +4 -0
  933. package/app/public/providers/llm7.png +0 -0
  934. package/app/public/providers/llmgateway.svg +4 -0
  935. package/app/public/providers/lm-studio.svg +1 -0
  936. package/app/public/providers/maritalk.svg +4 -0
  937. package/app/public/providers/meganova-ai.svg +4 -0
  938. package/app/public/providers/meta-ai.svg +68 -0
  939. package/app/public/providers/meta-llama.svg +1 -0
  940. package/app/public/providers/mimocode.png +0 -0
  941. package/app/public/providers/mixlayer.svg +4 -0
  942. package/app/public/providers/mnn-ai.svg +4 -0
  943. package/app/public/providers/modal.svg +1 -0
  944. package/app/public/providers/modelscope.svg +1 -0
  945. package/app/public/providers/morph.svg +4 -0
  946. package/app/public/providers/naga-ac.svg +4 -0
  947. package/app/public/providers/naga-ai.svg +4 -0
  948. package/app/public/providers/nanogpt.svg +4 -0
  949. package/app/public/providers/nara.svg +4 -0
  950. package/app/public/providers/navy.svg +4 -0
  951. package/app/public/providers/notion-web.svg +1 -0
  952. package/app/public/providers/nous-research.svg +4 -0
  953. package/app/public/providers/nscale.svg +4 -0
  954. package/app/public/providers/nube.svg +4 -0
  955. package/app/public/providers/oci.svg +20 -0
  956. package/app/public/providers/ofoxai.svg +4 -0
  957. package/app/public/providers/ollama-cloud.svg +1 -0
  958. package/app/public/providers/oobabooga.svg +1 -0
  959. package/app/public/providers/openadapter.svg +4 -0
  960. package/app/public/providers/opencode-zen.svg +4 -0
  961. package/app/public/providers/openference-api.svg +4 -0
  962. package/app/public/providers/orcarouter.png +0 -0
  963. package/app/public/providers/ovhcloud.svg +1 -0
  964. package/app/public/providers/perplexity-agent.svg +1 -13
  965. package/app/public/providers/piapi.svg +4 -0
  966. package/app/public/providers/pioneer.svg +4 -0
  967. package/app/public/providers/poe-web.svg +1 -8
  968. package/app/public/providers/poixe-ai.svg +4 -0
  969. package/app/public/providers/poolside.svg +4 -0
  970. package/app/public/providers/predibase.svg +4 -0
  971. package/app/public/providers/publicai.svg +4 -0
  972. package/app/public/providers/qiniu.svg +4 -0
  973. package/app/public/providers/qwen-cloud.svg +1 -1
  974. package/app/public/providers/qwen-web.svg +1 -6
  975. package/app/public/providers/qwencloud.svg +1 -6
  976. package/app/public/providers/regolo.svg +4 -0
  977. package/app/public/providers/reka.svg +4 -0
  978. package/app/public/providers/requesty.svg +4 -0
  979. package/app/public/providers/rev-ai.svg +1 -0
  980. package/app/public/providers/routeway.svg +4 -0
  981. package/app/public/providers/sambanova.svg +4 -0
  982. package/app/public/providers/sap.svg +1 -0
  983. package/app/public/providers/scaleway.svg +1 -0
  984. package/app/public/providers/snowflake.svg +1 -0
  985. package/app/public/providers/soniox.svg +1 -0
  986. package/app/public/providers/speechmatics.svg +1 -0
  987. package/app/public/providers/speka.svg +4 -0
  988. package/app/public/providers/sumopod.svg +4 -0
  989. package/app/public/providers/synthetic.svg +4 -0
  990. package/app/public/providers/tencent-aistudio-web.png +0 -0
  991. package/app/public/providers/thebai.svg +4 -0
  992. package/app/public/providers/theoldllm.png +0 -0
  993. package/app/public/providers/tokenreply.svg +4 -0
  994. package/app/public/providers/triton.svg +1 -0
  995. package/app/public/providers/uncloseai.png +0 -0
  996. package/app/public/providers/unorouter.svg +4 -0
  997. package/app/public/providers/upstage.svg +4 -0
  998. package/app/public/providers/vllm.svg +1 -0
  999. package/app/public/providers/void-ai.svg +4 -0
  1000. package/app/public/providers/wafer.svg +4 -0
  1001. package/app/public/providers/wandb.svg +1 -0
  1002. package/app/public/providers/watsonx.svg +51 -0
  1003. package/app/public/providers/writer.svg +4 -0
  1004. package/app/public/providers/x5lab.svg +4 -0
  1005. package/app/public/providers/xinference.svg +1 -0
  1006. package/app/public/providers/yolo-auto.svg +4 -0
  1007. package/app/public/providers/zai-web.svg +1 -0
  1008. package/app/public/providers/zcode.png +0 -0
  1009. package/app/public/providers/zerolimitai.svg +4 -0
  1010. package/app/public/providers/zylo-api.svg +4 -0
  1011. package/app/src/lib/db/migrate.js +6 -3
  1012. package/app/src/mitm/server.js +2 -2
  1013. package/package.json +3 -1
  1014. package/src/cli/menus/providers.js +6 -0
  1015. package/app/.next-cli-build/server/chunks/2231.js +0 -1
  1016. package/app/.next-cli-build/server/chunks/422.js +0 -9
  1017. package/app/.next-cli-build/server/chunks/5102.js +0 -1
  1018. package/app/.next-cli-build/server/chunks/6070.js +0 -1
  1019. package/app/.next-cli-build/server/chunks/6306.js +0 -1
  1020. package/app/.next-cli-build/server/chunks/6560.js +0 -1
  1021. package/app/.next-cli-build/server/chunks/7187.js +0 -1
  1022. package/app/.next-cli-build/server/chunks/7218.js +0 -1
  1023. package/app/.next-cli-build/server/chunks/7872.js +0 -1
  1024. package/app/.next-cli-build/server/chunks/874.js +0 -9
  1025. package/app/.next-cli-build/server/chunks/8955.js +0 -16
  1026. package/app/.next-cli-build/server/chunks/9422.js +0 -13
  1027. package/app/.next-cli-build/server/chunks/9703.js +0 -14
  1028. package/app/.next-cli-build/static/7zgJjF0BTyl0D0ZYIuDWj/_buildManifest.js +0 -1
  1029. package/app/.next-cli-build/static/chunks/1321-3b1aef2827d68b60.js +0 -1
  1030. package/app/.next-cli-build/static/chunks/5497-51105899e4e24c89.js +0 -7
  1031. package/app/.next-cli-build/static/chunks/705-6dadbd8815279945.js +0 -1
  1032. package/app/.next-cli-build/static/chunks/8105-76bf5c11dd3bc8ce.js +0 -1
  1033. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/basic-chat/page-ecd3a85a40e51c66.js +0 -1
  1034. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-b4a78d784383253c.js +0 -3
  1035. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/page-959b3ee3c662de33.js +0 -1
  1036. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-5689c88f2746c37a.js +0 -1
  1037. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/health/page-133cf1aa2ce53c87.js +0 -1
  1038. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-7325c65533e4cf60.js +0 -1
  1039. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/playground/page-e7ba910803086460.js +0 -1
  1040. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-0f877a8a2550a1ea.js +0 -1
  1041. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-6b500acebeff856b.js +0 -10
  1042. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-5b11b61863963cad.js +0 -1
  1043. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-c02ccb0fd35970d1.js +0 -1
  1044. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/swarm/page-594a59006196a03a.js +0 -1
  1045. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/page-483f01fd35d212f5.js +0 -1
  1046. package/app/.next-cli-build/static/chunks/app/(dashboard)/layout-0a63db83d5e05667.js +0 -1
  1047. package/app/.next-cli-build/static/chunks/app/_global-error/page-158df2528a1edacc.js +0 -1
  1048. package/app/.next-cli-build/static/chunks/app/api/alerts/test/route-158df2528a1edacc.js +0 -1
  1049. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-158df2528a1edacc.js +0 -1
  1050. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-158df2528a1edacc.js +0 -1
  1051. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-158df2528a1edacc.js +0 -1
  1052. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-158df2528a1edacc.js +0 -1
  1053. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-158df2528a1edacc.js +0 -1
  1054. package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-158df2528a1edacc.js +0 -1
  1055. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-158df2528a1edacc.js +0 -1
  1056. package/app/.next-cli-build/static/chunks/app/api/breaker/route-158df2528a1edacc.js +0 -1
  1057. package/app/.next-cli-build/static/chunks/app/api/cache/route-158df2528a1edacc.js +0 -1
  1058. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-158df2528a1edacc.js +0 -1
  1059. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-158df2528a1edacc.js +0 -1
  1060. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-158df2528a1edacc.js +0 -1
  1061. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-158df2528a1edacc.js +0 -1
  1062. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-158df2528a1edacc.js +0 -1
  1063. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-158df2528a1edacc.js +0 -1
  1064. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-158df2528a1edacc.js +0 -1
  1065. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-158df2528a1edacc.js +0 -1
  1066. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-158df2528a1edacc.js +0 -1
  1067. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-158df2528a1edacc.js +0 -1
  1068. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-158df2528a1edacc.js +0 -1
  1069. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-158df2528a1edacc.js +0 -1
  1070. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-158df2528a1edacc.js +0 -1
  1071. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-158df2528a1edacc.js +0 -1
  1072. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-158df2528a1edacc.js +0 -1
  1073. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-158df2528a1edacc.js +0 -1
  1074. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-158df2528a1edacc.js +0 -1
  1075. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-158df2528a1edacc.js +0 -1
  1076. package/app/.next-cli-build/static/chunks/app/api/combos/route-158df2528a1edacc.js +0 -1
  1077. package/app/.next-cli-build/static/chunks/app/api/combos/validate-roles/route-158df2528a1edacc.js +0 -1
  1078. package/app/.next-cli-build/static/chunks/app/api/dashboard/stream/route-158df2528a1edacc.js +0 -1
  1079. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-158df2528a1edacc.js +0 -1
  1080. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-158df2528a1edacc.js +0 -1
  1081. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-158df2528a1edacc.js +0 -1
  1082. package/app/.next-cli-build/static/chunks/app/api/health/providers/route-158df2528a1edacc.js +0 -1
  1083. package/app/.next-cli-build/static/chunks/app/api/health/route-158df2528a1edacc.js +0 -1
  1084. package/app/.next-cli-build/static/chunks/app/api/health/stream/route-158df2528a1edacc.js +0 -1
  1085. package/app/.next-cli-build/static/chunks/app/api/init/route-158df2528a1edacc.js +0 -1
  1086. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-158df2528a1edacc.js +0 -1
  1087. package/app/.next-cli-build/static/chunks/app/api/keys/route-158df2528a1edacc.js +0 -1
  1088. package/app/.next-cli-build/static/chunks/app/api/locale/route-158df2528a1edacc.js +0 -1
  1089. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-158df2528a1edacc.js +0 -1
  1090. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-158df2528a1edacc.js +0 -1
  1091. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-158df2528a1edacc.js +0 -1
  1092. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-158df2528a1edacc.js +0 -1
  1093. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-158df2528a1edacc.js +0 -1
  1094. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-158df2528a1edacc.js +0 -1
  1095. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-158df2528a1edacc.js +0 -1
  1096. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-158df2528a1edacc.js +0 -1
  1097. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-158df2528a1edacc.js +0 -1
  1098. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-158df2528a1edacc.js +0 -1
  1099. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-158df2528a1edacc.js +0 -1
  1100. package/app/.next-cli-build/static/chunks/app/api/models/route-158df2528a1edacc.js +0 -1
  1101. package/app/.next-cli-build/static/chunks/app/api/models/test/route-158df2528a1edacc.js +0 -1
  1102. package/app/.next-cli-build/static/chunks/app/api/oauth/1min/import/route-158df2528a1edacc.js +0 -1
  1103. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-158df2528a1edacc.js +0 -1
  1104. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-158df2528a1edacc.js +0 -1
  1105. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-158df2528a1edacc.js +0 -1
  1106. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-158df2528a1edacc.js +0 -1
  1107. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-158df2528a1edacc.js +0 -1
  1108. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-158df2528a1edacc.js +0 -1
  1109. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-158df2528a1edacc.js +0 -1
  1110. package/app/.next-cli-build/static/chunks/app/api/oauth/kimi-desktop/auto-import/route-158df2528a1edacc.js +0 -1
  1111. package/app/.next-cli-build/static/chunks/app/api/oauth/kimi-desktop/import/route-158df2528a1edacc.js +0 -1
  1112. package/app/.next-cli-build/static/chunks/app/api/oauth/kimi-desktop/quota/route-158df2528a1edacc.js +0 -1
  1113. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-158df2528a1edacc.js +0 -1
  1114. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-158df2528a1edacc.js +0 -1
  1115. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-158df2528a1edacc.js +0 -1
  1116. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-158df2528a1edacc.js +0 -1
  1117. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-158df2528a1edacc.js +0 -1
  1118. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-158df2528a1edacc.js +0 -1
  1119. package/app/.next-cli-build/static/chunks/app/api/oauth/qwen/import/route-158df2528a1edacc.js +0 -1
  1120. package/app/.next-cli-build/static/chunks/app/api/oauth/wp-studio/import/route-158df2528a1edacc.js +0 -1
  1121. package/app/.next-cli-build/static/chunks/app/api/oauth/zed/auto-import/route-158df2528a1edacc.js +0 -1
  1122. package/app/.next-cli-build/static/chunks/app/api/oauth/zed/import/route-158df2528a1edacc.js +0 -1
  1123. package/app/.next-cli-build/static/chunks/app/api/pricing/route-158df2528a1edacc.js +0 -1
  1124. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-158df2528a1edacc.js +0 -1
  1125. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-158df2528a1edacc.js +0 -1
  1126. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-158df2528a1edacc.js +0 -1
  1127. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/agnes-profile/route-158df2528a1edacc.js +0 -1
  1128. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/freebuff-profile/route-158df2528a1edacc.js +0 -1
  1129. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/health-timeline/route-158df2528a1edacc.js +0 -1
  1130. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/inxora-profile/route-158df2528a1edacc.js +0 -1
  1131. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-158df2528a1edacc.js +0 -1
  1132. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/onemin-api-profile/route-158df2528a1edacc.js +0 -1
  1133. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/onemin-profile/route-158df2528a1edacc.js +0 -1
  1134. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/qwencloud-profile/route-158df2528a1edacc.js +0 -1
  1135. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-158df2528a1edacc.js +0 -1
  1136. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-158df2528a1edacc.js +0 -1
  1137. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-158df2528a1edacc.js +0 -1
  1138. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/v0-profile/route-158df2528a1edacc.js +0 -1
  1139. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/vault-pool/route-158df2528a1edacc.js +0 -1
  1140. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/zenmux-plans/route-158df2528a1edacc.js +0 -1
  1141. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-158df2528a1edacc.js +0 -1
  1142. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-158df2528a1edacc.js +0 -1
  1143. package/app/.next-cli-build/static/chunks/app/api/providers/route-158df2528a1edacc.js +0 -1
  1144. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-158df2528a1edacc.js +0 -1
  1145. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-158df2528a1edacc.js +0 -1
  1146. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-158df2528a1edacc.js +0 -1
  1147. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-158df2528a1edacc.js +0 -1
  1148. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-158df2528a1edacc.js +0 -1
  1149. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-158df2528a1edacc.js +0 -1
  1150. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-158df2528a1edacc.js +0 -1
  1151. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-158df2528a1edacc.js +0 -1
  1152. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-158df2528a1edacc.js +0 -1
  1153. package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-158df2528a1edacc.js +0 -1
  1154. package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-158df2528a1edacc.js +0 -1
  1155. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-158df2528a1edacc.js +0 -1
  1156. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-158df2528a1edacc.js +0 -1
  1157. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-158df2528a1edacc.js +0 -1
  1158. package/app/.next-cli-build/static/chunks/app/api/settings/route-158df2528a1edacc.js +0 -1
  1159. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-158df2528a1edacc.js +0 -1
  1160. package/app/.next-cli-build/static/chunks/app/api/swarm/active/route-158df2528a1edacc.js +0 -1
  1161. package/app/.next-cli-build/static/chunks/app/api/swarm/stream/route-158df2528a1edacc.js +0 -1
  1162. package/app/.next-cli-build/static/chunks/app/api/tags/route-158df2528a1edacc.js +0 -1
  1163. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-158df2528a1edacc.js +0 -1
  1164. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-158df2528a1edacc.js +0 -1
  1165. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-158df2528a1edacc.js +0 -1
  1166. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-158df2528a1edacc.js +0 -1
  1167. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-158df2528a1edacc.js +0 -1
  1168. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-158df2528a1edacc.js +0 -1
  1169. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-158df2528a1edacc.js +0 -1
  1170. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-158df2528a1edacc.js +0 -1
  1171. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-158df2528a1edacc.js +0 -1
  1172. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-158df2528a1edacc.js +0 -1
  1173. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-158df2528a1edacc.js +0 -1
  1174. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-158df2528a1edacc.js +0 -1
  1175. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-158df2528a1edacc.js +0 -1
  1176. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-158df2528a1edacc.js +0 -1
  1177. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-158df2528a1edacc.js +0 -1
  1178. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-158df2528a1edacc.js +0 -1
  1179. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-158df2528a1edacc.js +0 -1
  1180. package/app/.next-cli-build/static/chunks/app/api/usage/leaderboard/route-158df2528a1edacc.js +0 -1
  1181. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-158df2528a1edacc.js +0 -1
  1182. package/app/.next-cli-build/static/chunks/app/api/usage/meta/route-158df2528a1edacc.js +0 -1
  1183. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-158df2528a1edacc.js +0 -1
  1184. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-158df2528a1edacc.js +0 -1
  1185. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-158df2528a1edacc.js +0 -1
  1186. package/app/.next-cli-build/static/chunks/app/api/usage/retry-stats/route-158df2528a1edacc.js +0 -1
  1187. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-158df2528a1edacc.js +0 -1
  1188. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-158df2528a1edacc.js +0 -1
  1189. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-158df2528a1edacc.js +0 -1
  1190. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-158df2528a1edacc.js +0 -1
  1191. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-158df2528a1edacc.js +0 -1
  1192. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-158df2528a1edacc.js +0 -1
  1193. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-158df2528a1edacc.js +0 -1
  1194. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-158df2528a1edacc.js +0 -1
  1195. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-158df2528a1edacc.js +0 -1
  1196. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-158df2528a1edacc.js +0 -1
  1197. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-158df2528a1edacc.js +0 -1
  1198. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-158df2528a1edacc.js +0 -1
  1199. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-158df2528a1edacc.js +0 -1
  1200. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-158df2528a1edacc.js +0 -1
  1201. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-158df2528a1edacc.js +0 -1
  1202. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-158df2528a1edacc.js +0 -1
  1203. package/app/.next-cli-build/static/chunks/app/api/v1/route-158df2528a1edacc.js +0 -1
  1204. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-158df2528a1edacc.js +0 -1
  1205. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-158df2528a1edacc.js +0 -1
  1206. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-158df2528a1edacc.js +0 -1
  1207. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-158df2528a1edacc.js +0 -1
  1208. package/app/.next-cli-build/static/chunks/app/api/version/route-158df2528a1edacc.js +0 -1
  1209. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-158df2528a1edacc.js +0 -1
  1210. package/app/.next-cli-build/static/chunks/app/api/version/update/route-158df2528a1edacc.js +0 -1
  1211. package/app/.next-cli-build/static/chunks/app/dashboard/settings/pricing/page-bb9f307074c5c23a.js +0 -1
  1212. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-158df2528a1edacc.js +0 -1
  1213. package/app/.next-cli-build/static/chunks/app/page-158df2528a1edacc.js +0 -1
  1214. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-158df2528a1edacc.js +0 -1
  1215. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-158df2528a1edacc.js +0 -1
  1216. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-158df2528a1edacc.js +0 -1
  1217. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-158df2528a1edacc.js +0 -1
  1218. package/app/.next-cli-build/static/css/b7a8bd59db43d15e.css +0 -1
  1219. package/app/public/providers/blackbox-web.svg +0 -6
  1220. package/app/public/providers/chatglm-cn.svg +0 -7
  1221. /package/app/.next-cli-build/static/{7zgJjF0BTyl0D0ZYIuDWj → BmLJ5bmQbpsF-jvZIwr9t}/_ssgManifest.js +0 -0
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3826],{15670:(e,t,r)=>{"use strict";r.d(t,{default:()=>R});var a=r(95155),i=r(54960),s=r(84588),n=r(35497),l=r(70778);let o="quotaCacheData",d="quotaAutoRefresh",c=[10,20,50,100],u=[{value:"all",label:"All accounts"},{value:"active",label:"Active"},{value:"inactive",label:"Turned off"}],m=[{value:"default",label:"Default quota order"},{value:"remaining-asc",label:"% quota: low to high"},{value:"remaining-desc",label:"% quota: high to low"}];function x(e){return e.name?.trim()||e.email?.trim()||e.displayName?.trim()||null}function p(e,t){let r=t[e.id]?.quotas?.[0];return r&&"number"==typeof r.remaining?r.remaining:1/0}function h(e){let t={};return e.forEach(e=>{t[e.id]=!0}),t}function b(e,t){let r=new Set(t.map(e=>e.id));return Object.fromEntries(Object.entries(e).filter(([e])=>r.has(e)))}async function g(e,t){return await e(t)}function f(){try{let e=window.localStorage.getItem(o);return e?JSON.parse(e):{}}catch(e){return console.error("Error reading quota cache:",e),{}}}function y(e,t){try{let r=f();r[e]={...t,cachedAt:new Date().toISOString()},window.localStorage.setItem(o,JSON.stringify(r))}catch(e){console.error("Error writing quota cache:",e)}}function v(e,t){return t&&0!==t?!e||e<0?100:e>=t?0:Math.round((t-e)/t*100):0}let j={"builder-id":"AWS Builder ID",idc:"IAM Identity Center",google:"Google",github:"GitHub",imported:"Imported Token",api_key:"API Key"},w={claude:"claudeAutoPing",codex:"codexAutoPing"},k={claude:"When your 5h quota runs out, auto-sends a request the moment it resets so a new window starts right away.",codex:"Auto-starts the next 5h Codex window after reset by sending a tiny gpt-5.5 request. Consumes a small amount of quota."};function N(e){return e.name?.trim()&&e.email?.trim()&&e.name.trim()!==e.email.trim()?e.email.trim():e.name?.trim()&&e.displayName?.trim()&&e.name.trim()!==e.displayName.trim()?e.displayName.trim():null}function C(e){let t=e.providerSpecificData?.region;if(t)return t;let r=e.providerSpecificData?.profileArn;return("string"==typeof r?r.split(":")[3]:"")||""}function S(e){if(!e)return"N/A";let t=new Date(e);return Number.isFinite(t.getTime())?t.toLocaleString(void 0,{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"}):"N/A"}var A=r(12115),P=r(88105),$=r(57250),q=r(8247);function E({providerFilter:e,providerOptions:t,providerMenuOpen:r,onToggleMenu:i,onSelectProvider:s}){let n="all"===e?"All providers":e;return(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsxs)("button",{type:"button",onClick:i,className:"flex h-8 items-center justify-between gap-1 rounded-lg border border-border bg-black/[0.02] px-2 text-xs text-text-primary transition-colors hover:bg-surface-2 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-haspopup":"menu","aria-expanded":r,title:"Filter quota providers",children:[(0,a.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5",children:["all"===e?(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"apps"}):(0,a.jsx)($.A,{src:(0,q.k)(e),alt:e,size:18,className:"size-[18px] rounded object-contain",fallbackText:e.slice(0,2).toUpperCase()}),(0,a.jsx)("span",{className:"truncate capitalize hidden lg:inline",children:n})]}),(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted",children:"expand_more"})]}),r&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("button",{type:"button",className:"fixed inset-0 z-30 bg-transparent","aria-label":"Close provider filter",onClick:i}),(0,a.jsxs)("div",{className:"absolute left-0 z-40 mt-2 w-64 overflow-hidden rounded-2xl border border-border bg-surface/95 p-1.5 shadow-xl shadow-black/10 backdrop-blur dark:border-white/10 dark:bg-surface/95 sm:w-72",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>s("all"),className:`flex w-full items-center gap-3 rounded-xl px-3 py-2.5 text-left text-sm transition-colors ${"all"===e?"bg-primary/10 text-primary":"text-text-primary hover:hover:bg-surface-3"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[22px]",children:"apps"}),(0,a.jsx)("span",{className:"font-medium",children:"All providers"}),"all"===e&&(0,a.jsx)("span",{className:"material-symbols-outlined ml-auto text-[20px]",children:"check"})]}),(0,a.jsx)("div",{className:"my-1 h-px bg-black/10 dark:bg-white/10"}),(0,a.jsx)("div",{className:"max-h-72 overflow-y-auto pr-1",children:t.map(t=>(0,a.jsxs)("button",{type:"button",onClick:()=>s(t),className:`flex w-full items-center gap-3 rounded-xl px-3 py-2.5 text-left text-sm transition-colors ${e===t?"bg-primary/10 text-primary":"text-text-primary hover:hover:bg-surface-3"}`,children:[(0,a.jsx)($.A,{src:(0,q.k)(t),alt:t,size:24,className:"size-6 rounded-md object-contain",fallbackText:t.slice(0,2).toUpperCase()}),(0,a.jsx)("span",{className:"font-medium capitalize",children:t}),e===t&&(0,a.jsx)("span",{className:"material-symbols-outlined ml-auto text-[20px]",children:"check"})]},t))})]})]})]})}function T({providerFilter:e,providerOptions:t,providerMenuOpen:r,onToggleProviderMenu:i,onSelectProvider:s,accountFilter:n,onAccountFilterChange:l,quotaSortMode:o,onQuotaSortModeChange:d,expiringFirst:c,onToggleExpiringFirst:x,autoRefresh:p,onToggleAutoRefresh:h,countdown:b,bulkToggling:g,onDisableDepleted:f,onEnableAvailable:y,refreshingAll:v,onRefreshAll:j}){return(0,a.jsx)("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-end",children:(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[(0,a.jsx)(E,{providerFilter:e,providerOptions:t,providerMenuOpen:r,onToggleMenu:i,onSelectProvider:s}),(0,a.jsx)("select",{value:n,onChange:e=>l(e.target.value),className:"h-8 rounded-lg border border-border bg-black/[0.02] px-2 text-xs text-text-primary outline-none transition-colors hover:bg-surface-2 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-label":"Filter accounts by status",children:u.map(e=>(0,a.jsx)("option",{value:e.value,children:e.label},e.value))}),"codex"===e&&(0,a.jsx)("select",{value:o,onChange:e=>d(e.target.value),className:"h-8 rounded-lg border border-border bg-black/[0.02] px-2 text-xs text-text-primary outline-none transition-colors hover:bg-surface-2 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-label":"Sort Codex quotas by remaining",children:m.map(e=>(0,a.jsx)("option",{value:e.value,children:e.label},e.value))}),(0,a.jsxs)("button",{type:"button",onClick:x,"aria-pressed":c,className:`flex h-8 shrink-0 items-center gap-1 rounded-lg border px-2 text-xs transition-colors ${c?"border-amber-500/40 bg-warning/10 text-warning":"border-border text-text-primary hover:bg-surface-2 dark:border-white/10 dark:hover:bg-white/5"}`,title:"Sort accounts by earliest quota reset time",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"hourglass_top"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:"Expiring first"})]}),(0,a.jsxs)("button",{type:"button",onClick:f,disabled:g,className:"flex h-8 shrink-0 items-center gap-1 rounded-lg border border-red-500/30 px-2 text-xs text-danger transition-colors hover:bg-danger/10 disabled:opacity-50",title:"Disable connections with depleted quota on the current page",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"block"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:"Turn off Empty"})]}),(0,a.jsxs)("button",{type:"button",onClick:y,disabled:g,className:"flex h-8 shrink-0 items-center gap-1 rounded-lg border border-emerald-500/30 px-2 text-xs text-emerald-500 transition-colors hover:bg-emerald-500/10 disabled:opacity-50",title:"Enable connections that still have quota on the current page",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"check_circle"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:"Turn on Available"})]}),(0,a.jsxs)("button",{onClick:h,className:"flex h-8 shrink-0 items-center gap-1 rounded-lg border border-border px-2 text-xs transition-colors hover:bg-surface-2 dark:border-white/10 dark:hover:bg-white/5",title:p?"Disable auto-refresh":"Enable auto-refresh",children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[14px] ${p?"text-primary":"text-text-muted"}`,children:p?"toggle_on":"toggle_off"}),(0,a.jsx)("span",{className:"hidden text-text-primary sm:inline",children:"Auto-refresh"}),p&&(0,a.jsxs)("span",{className:"text-[10px] text-text-muted tabular-nums",children:["(",b,"s)"]})]}),(0,a.jsx)("button",{type:"button",onClick:()=>j(!0),disabled:v,className:"flex h-8 shrink-0 items-center gap-1 rounded-lg border border-border px-2 text-xs text-text-primary transition-colors hover:bg-surface-2 dark:border-white/10 dark:hover:bg-white/5 disabled:opacity-50",title:"Refresh all",children:(0,a.jsx)("span",{className:`material-symbols-outlined text-[14px] ${v?"animate-spin":""}`,children:"refresh"})})]})})}var D=r(98542),M=r(97677),O=r(11059);function I({quotas:e=[],compact:t=!1,sortMode:r="default",showSortLabel:i=!1}){let[s,n]=(0,A.useState)(1),l=(0,A.useMemo)(()=>e.map((e,t)=>({...e,index:t,remaining:e?.remaining!==void 0?Math.max(0,Math.round(e.remaining)):e?.remainingPercentage!==void 0?Math.round(e.remainingPercentage):v(e?.used,e?.total)})),[e]),o=(0,A.useMemo)(()=>"remaining-asc"===r?[...l].sort((e,t)=>e.remaining-t.remaining||e.name.localeCompare(t.name)):"remaining-desc"===r?[...l].sort((e,t)=>t.remaining-e.remaining||e.name.localeCompare(t.name)):l,[l,r]),d=Math.max(1,Math.ceil(o.length/10));if((0,A.useEffect)(()=>{n(1)},[r,e]),(0,A.useEffect)(()=>{n(e=>Math.min(e,d))},[d]),!e||0===e.length)return null;let c=o.slice((s-1)*10,10*s),u=0===o.length?0:(s-1)*10+1,m=Math.min(10*s,o.length),x=t?"py-1 px-1.5":"py-2 px-3",p=t?"text-[11px]":"text-sm",h=t?"text-[11px]":"text-sm",b=t?"text-[10px] leading-tight":"text-xs";return(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsxs)("div",{className:"text-[10px] text-text-muted",children:[o.length," quota",o.length>1?"s":""]}),i&&(0,a.jsx)("div",{className:"rounded-md border border-black/10 bg-black/[0.02] px-2 py-1 text-[10px] text-text-muted dark:border-white/10 dark:bg-white/[0.03]",children:"Sorted by account remaining"})]}),(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsx)("table",{className:"w-full table-fixed text-left",children:(0,a.jsx)("tbody",{children:c.map(e=>{var r;let i=!0===e.unlimited,s=(r=e.remaining)>70?{text:"text-green-600 dark:text-green-400",bg:"bg-green-500",bgLight:"bg-green-500/10",emoji:"\uD83D\uDFE2"}:r>=30?{text:"text-yellow-600 dark:text-yellow-400",bg:"bg-yellow-500",bgLight:"bg-yellow-500/10",emoji:"\uD83D\uDFE1"}:{text:"text-red-600 dark:text-red-400",bg:"bg-red-500",bgLight:"bg-red-500/10",emoji:"\uD83D\uDD34"},n=function(e){if(!e)return"-";try{let t="string"==typeof e?new Date(e):e,r=new Date,a=t-r;if(a<=0)return"-";let i=Math.ceil(a/6e4);if(i<60)return`${i}m`;let s=Math.floor(i/60),n=i%60;if(s<24)return`${s}h ${n}m`;let l=Math.floor(s/24);return`${l}d ${s%24}h ${n}m`}catch(e){return"-"}}(e.resetAt),l=function(e){if(!e)return null;try{let t=new Date(e),r=new Date,a=new Date(r.getFullYear(),r.getMonth(),r.getDate()),i=new Date(a);i.setDate(i.getDate()+1);let s="";s=t>=a&&t<i?"Today":t>=i&&t<new Date(i.getTime()+864e5)?"Tomorrow":t.toLocaleDateString("en-US",{month:"short",day:"numeric"});let n=t.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});return`${s}, ${n}`}catch{return null}}(e.resetAt),o=!1!==e.recurring?`in ${n}`:`expires in ${n}`;return(0,a.jsxs)("tr",{className:"border-b border-black/5 dark:border-white/5 hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors",children:[(0,a.jsx)("td",{className:`${x} w-[30%]`,children:(0,a.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0",children:[(0,a.jsx)("span",{className:"text-[10px] shrink-0",children:s.emoji}),(0,a.jsx)("span",{className:`${p} font-medium text-text-primary truncate`,children:e.name})]})}),(0,a.jsx)("td",{className:`${x} w-[45%]`,children:i?(0,a.jsxs)("div",{className:`flex items-center justify-between ${t?"text-[10px]":"text-xs"}`,children:[(0,a.jsxs)("span",{className:"text-text-muted",title:`${e.used.toLocaleString()} used \xb7 Unlimited`,children:[e.used.toLocaleString()," used \xb7 Unlimited"]}),(0,a.jsx)("span",{className:"font-medium text-green-600 dark:text-green-400",children:"Unlimited"})]}):(0,a.jsxs)("div",{className:t?"space-y-1":"space-y-1.5",children:[(0,a.jsx)("div",{className:`${t?"h-1":"h-1.5"} rounded-full overflow-hidden border ${s.bgLight} ${0===e.remaining?"border-black/10 dark:border-white/10":"border-transparent"}`,children:(0,a.jsx)("div",{className:`h-full transition-all duration-300 ${s.bg}`,style:{width:`${Math.min(e.remaining,100)}%`}})}),(0,a.jsxs)("div",{className:`flex items-center justify-between ${t?"text-[10px]":"text-xs"}`,children:[(0,a.jsxs)("span",{className:"text-text-muted",children:[e.used.toLocaleString()," / ",e.total>0?e.total.toLocaleString():"∞"]}),(0,a.jsxs)("span",{className:`font-medium ${s.text}`,children:[e.remaining,"%"]})]})]})}),(0,a.jsx)("td",{className:`${x} w-[25%]`,children:"-"!==n||l?t?(0,a.jsx)("div",{className:`${h} text-text-primary font-medium truncate`,title:l||"",children:"-"!==n?o:l}):(0,a.jsxs)("div",{className:"space-y-0.5",children:["-"!==n&&(0,a.jsx)("div",{className:`${h} text-text-primary font-medium`,children:o}),l&&(0,a.jsx)("div",{className:`${b} text-text-muted`,children:l})]}):(0,a.jsx)("div",{className:`${h} text-text-muted italic`,children:"N/A"})})]},`${e.name}-${e.index}`)})})})}),d>1&&(0,a.jsxs)("div",{className:"rounded-md border border-black/10 bg-black/[0.02] px-2 py-1.5 dark:border-white/10 dark:bg-white/[0.03]",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2 text-[10px] text-text-muted",children:[(0,a.jsxs)("span",{children:["Showing ",u,"-",m," of ",o.length]}),(0,a.jsxs)("span",{children:["Page ",s," / ",d]})]}),(0,a.jsxs)("div",{className:"mt-1.5 flex items-center justify-end gap-1",children:[(0,a.jsx)("button",{type:"button",onClick:()=>n(e=>Math.max(1,e-1)),disabled:1===s,className:"flex h-6 items-center rounded-md border border-black/10 px-2 text-[10px] text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5",children:"Prev"}),(0,a.jsx)("button",{type:"button",onClick:()=>n(e=>Math.min(d,e+1)),disabled:s===d,className:"flex h-6 items-center rounded-md border border-black/10 px-2 text-[10px] text-text-primary transition-colors hover:bg-black/5 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5",children:"Next"})]})]})]})}function F({conn:e,quota:t,isLoading:r,error:i,autoPingMaps:n,quotaSortMode:l,resettingLimitId:o,deletingId:d,togglingId:c,onRefresh:u,onEdit:m,onDelete:p,onToggleActive:h,onRequestReset:b,onViewResetCredits:g,onToggleAutoPing:f}){let y,v,S,{copied:A,copy:P}=(0,O.C)(),E=!1===e.isActive,T="codex"===e.provider,_=Number.isFinite(v="number"==typeof(y=t?.raw?.resetCredits?.availableCount)?y:Number(y))?Math.max(0,v):0,L=o===e.id,z=d===e.id||c===e.id||L;return(0,a.jsxs)(s.default,{padding:"none",className:`min-w-0 ${E?"opacity-60":""}`,children:[(0,a.jsx)("div",{className:"px-3 py-2 border-b border-border",children:(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,a.jsx)("div",{className:"w-8 h-8 shrink-0 rounded-md flex items-center justify-center overflow-hidden",children:(0,a.jsx)($.A,{src:(0,q.k)(e.provider),alt:e.provider,size:32,className:"object-contain",fallbackText:e.provider?.slice(0,2).toUpperCase()||"PR"})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold text-text-primary capitalize truncate",children:e.provider}),x(e)?(0,a.jsx)("p",{className:"text-xs text-text-muted truncate",children:x(e)}):null,N(e)?(0,a.jsx)("p",{className:"text-[11px] text-text-muted/80 truncate",children:N(e)}):null,"kiro"===e.provider&&(0,a.jsxs)("div",{className:"mt-1 flex flex-wrap items-center gap-1",children:[(0,a.jsx)("span",{className:"rounded-full bg-brand-500/10 px-2 py-0.5 text-[10px] font-semibold text-brand-600 dark:text-brand-300",children:(S=e.providerSpecificData?.authMethod)&&j[S]?j[S]:"api_key"===e.authType?"API Key":"OAuth"}),C(e)&&(0,a.jsx)("span",{className:"rounded-full bg-info/10 px-2 py-0.5 text-[10px] font-semibold text-info",children:C(e)}),(0,a.jsx)("span",{className:`rounded-full px-2 py-0.5 text-[10px] font-semibold ${E?"bg-surface-2 text-text-muted":"active"===e.testStatus||"success"===e.testStatus?"bg-green-500/10 text-success":"error"===e.testStatus||"expired"===e.testStatus||"unavailable"===e.testStatus?"bg-red-500/10 text-danger":"bg-surface-2 text-text-muted"}`,children:E?"disabled":e.testStatus||"unknown"}),e.providerSpecificData?.profileArn&&(0,a.jsxs)("button",{type:"button",onClick:()=>P(e.providerSpecificData.profileArn,e.id),title:e.providerSpecificData.profileArn,className:"inline-flex max-w-full items-center gap-1 rounded-full border border-border-subtle px-2 py-0.5 text-[10px] text-text-muted transition-colors hover:text-primary",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:A===e.id?"check":"content_copy"}),(0,a.jsx)("code",{className:"truncate font-mono",children:e.providerSpecificData.profileArn})]})]})]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1 shrink-0",children:[T&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(M.default,{text:_>0?`Use one Codex reset credit. Available: ${_}`:"No Codex reset credits available",children:(0,a.jsxs)("button",{type:"button",onClick:()=>b(e,_),disabled:_<=0||r||z,"aria-label":_>0?`Use one Codex reset credit. ${_} available.`:"No Codex reset credits available",className:`flex h-8 min-w-10 items-center justify-center gap-1 rounded-lg border px-2 text-[11px] font-medium tabular-nums transition-colors focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary/60 disabled:cursor-not-allowed disabled:opacity-60 ${_>0?"border-primary/30 bg-primary/5 text-primary hover:bg-primary/10":"border-border bg-black/[0.02] text-text-muted dark:border-white/10 dark:bg-white/[0.03]"}`,children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[15px] ${L?"animate-spin":""}`,children:L?"progress_activity":"restart_alt"}),(0,a.jsx)("span",{children:_})]})}),(0,a.jsx)(M.default,{text:"View Codex reset credit expiry",children:(0,a.jsx)("button",{type:"button",onClick:()=>g(e),disabled:r||z,"aria-label":"View Codex reset credit expiry",className:"flex h-8 w-8 items-center justify-center rounded-lg border border-border text-text-muted transition-colors hover:bg-surface-2 hover:text-primary disabled:cursor-not-allowed disabled:opacity-50 dark:border-white/10 dark:hover:bg-white/5",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[17px]",children:"schedule"})})})]}),w[e.provider]&&"oauth"===e.authType&&(0,a.jsx)(M.default,{text:k[e.provider],children:(0,a.jsx)("button",{type:"button",onClick:()=>f(e.id,e.provider,n[e.provider]?.[e.id]!==!0),"aria-label":"Toggle auto-ping",className:`flex h-8 w-8 items-center justify-center rounded-lg transition-colors hover:hover:bg-surface-3 ${n[e.provider]?.[e.id]===!0?"text-primary":"text-text-muted"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"bolt"})})}),(0,a.jsx)(M.default,{text:"Refresh quota",children:(0,a.jsx)("button",{type:"button",onClick:()=>u(e.id,e.provider),disabled:r||z,"aria-label":"Refresh quota",className:"flex h-8 w-8 items-center justify-center rounded-lg hover:hover:bg-surface-3 transition-colors disabled:opacity-50",children:(0,a.jsx)("span",{className:`material-symbols-outlined text-[18px] text-text-muted ${r?"animate-spin":""}`,children:"refresh"})})}),(0,a.jsx)(M.default,{text:"Edit connection",children:(0,a.jsx)("button",{type:"button",onClick:()=>m(e),disabled:z,"aria-label":"Edit connection",className:"flex h-8 w-8 items-center justify-center rounded-lg hover:hover:bg-surface-3 text-text-muted hover:text-primary transition-colors disabled:opacity-50",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"})})}),(0,a.jsx)(M.default,{text:"Delete connection",children:(0,a.jsx)("button",{type:"button",onClick:()=>p(e.id),disabled:z,"aria-label":"Delete connection",className:"flex h-8 w-8 items-center justify-center rounded-lg hover:bg-danger/10 text-danger transition-colors disabled:opacity-50",children:(0,a.jsx)("span",{className:`material-symbols-outlined text-[18px] ${d===e.id?"animate-pulse":""}`,children:"delete"})})}),(0,a.jsx)("div",{className:"inline-flex items-center pl-0.5",title:e.isActive??!0?"Disable connection":"Enable connection",children:(0,a.jsx)(D.default,{size:"sm",checked:e.isActive??!0,disabled:z,onChange:t=>h(e.id,t)})})]})]})}),(0,a.jsx)("div",{className:"px-2 py-1.5",children:r?(0,a.jsx)("div",{className:"text-center py-5 text-text-muted",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[28px] animate-spin",children:"progress_activity"})}):i?(0,a.jsxs)("div",{className:"text-center py-5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[28px] text-danger",children:"error"}),(0,a.jsx)("p",{className:"mt-1.5 text-xs text-text-muted",children:i})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(I,{quotas:t?.quotas,compact:!0,sortMode:"default",showSortLabel:"codex"===e.provider&&"default"!==l}),t?.message&&(0,a.jsx)("p",{className:"mt-2 px-1 text-[10px] leading-relaxed text-text-muted",children:t.message})]})})]})}function _({pagination:e,pageSize:t,customPageSizeInput:r,connectionsLoading:i,refreshingAll:s,connectionsPageSummary:n,setPage:l,onPageSizeSelect:o,onCustomPageSizeInputChange:d,onCommitCustomPageSize:u}){let m=!c.includes(t);return(0,a.jsx)("div",{className:"rounded-xl border border-border bg-black/[0.02] px-3 py-2 dark:border-white/10 dark:bg-white/[0.03]",children:(0,a.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted",children:n}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsxs)("select",{value:m?"custom":String(t),onChange:e=>o(e.target.value),className:"h-8 rounded-lg border border-border bg-black/[0.02] px-2 text-xs text-text-primary outline-none transition-colors hover:bg-surface-2 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-label":"Accounts per page",children:[c.map(e=>(0,a.jsxs)("option",{value:String(e),children:[e," / page"]},e)),(0,a.jsx)("option",{value:"custom",children:"Custom"})]}),(0,a.jsx)("input",{type:"number",min:"1",max:String(500),inputMode:"numeric",value:r,onChange:e=>d(e.target.value),onBlur:u,onKeyDown:e=>{"Enter"===e.key&&u()},className:"h-8 w-20 rounded-lg border border-border bg-black/[0.02] px-2 text-xs text-text-primary outline-none transition-colors hover:bg-surface-2 dark:border-white/10 dark:bg-white/[0.03] dark:hover:bg-white/10","aria-label":"Custom accounts per page",placeholder:"Custom"}),(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["Page ",e.page," / ",e.totalPages]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("button",{type:"button",onClick:()=>l(1),disabled:e.page<=1||i||s,className:"flex h-8 items-center rounded-lg border border-border px-3 text-xs text-text-primary transition-colors hover:bg-surface-2 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5",children:"First Page"}),(0,a.jsx)("button",{type:"button",onClick:()=>l(e=>Math.max(1,e-1)),disabled:e.page<=1||i||s,className:"flex h-8 w-8 items-center justify-center rounded-lg border border-border text-text-primary transition-colors hover:bg-surface-2 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5","aria-label":"Previous accounts page",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"chevron_left"})}),(0,a.jsx)("button",{type:"button",onClick:()=>l(t=>Math.min(e.totalPages,t+1)),disabled:e.page>=e.totalPages||i||s,className:"flex h-8 w-8 items-center justify-center rounded-lg border border-border text-text-primary transition-colors hover:bg-surface-2 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5","aria-label":"Next accounts page",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"chevron_right"})}),(0,a.jsx)("button",{type:"button",onClick:()=>l(e.totalPages),disabled:e.page>=e.totalPages||i||s,className:"flex h-8 items-center rounded-lg border border-border px-3 text-xs text-text-primary transition-colors hover:bg-surface-2 disabled:cursor-not-allowed disabled:opacity-40 dark:border-white/10 dark:hover:bg-white/5",children:"Last Page"})]})]})})}function L({state:e,onClose:t}){return e?(0,a.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 px-4 backdrop-blur-sm",children:(0,a.jsxs)("div",{className:"w-full max-w-2xl overflow-hidden rounded-2xl border border-black/15 bg-white shadow-2xl ring-1 ring-black/10 dark:border-white/15 dark:bg-surface dark:ring-white/10",children:[(0,a.jsxs)("div",{className:"flex items-start justify-between gap-3 border-b border-border bg-black/[0.03] px-4 py-3 dark:border-white/10 dark:bg-white/[0.04]",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("h3",{className:"text-base font-semibold text-text-primary",children:"Codex Reset Credit Expiry"}),(0,a.jsx)("p",{className:"mt-0.5 truncate text-xs text-text-muted",children:x(e.connection)||"Codex account"})]}),(0,a.jsx)("button",{type:"button",onClick:t,className:"flex h-8 w-8 items-center justify-center rounded-lg text-text-muted transition-colors hover:bg-surface-2 hover:text-text-primary dark:hover:bg-white/5","aria-label":"Close reset credit expiry modal",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"close"})})]}),(0,a.jsx)("div",{className:"max-h-[70vh] overflow-auto bg-white p-4 dark:bg-surface",children:e.loading?(0,a.jsxs)("div",{className:"flex items-center justify-center gap-2 py-10 text-sm text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-[20px]",children:"progress_activity"}),"Loading reset credits..."]}):e.error?(0,a.jsx)("div",{className:"rounded-xl border border-red-500/20 bg-red-500/10 px-3 py-2 text-sm text-red-600 dark:text-red-300",children:e.error}):e.data?.credits?.length?(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between rounded-xl border border-border bg-black/[0.02] px-3 py-2 text-xs text-text-muted dark:border-white/10 dark:bg-white/[0.03]",children:[(0,a.jsxs)("span",{children:[e.data.credits.length," reset credit",1===e.data.credits.length?"":"s"]}),(0,a.jsxs)("span",{children:[e.data.availableCount??0," available"]})]}),(0,a.jsx)("div",{className:"overflow-x-auto rounded-xl border border-border",children:(0,a.jsxs)("table",{className:"w-full min-w-[560px] text-left text-sm",children:[(0,a.jsx)("thead",{className:"bg-black/[0.03] text-xs uppercase tracking-wide text-text-muted dark:bg-white/[0.04]",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"px-3 py-2 font-medium",children:"Status"}),(0,a.jsx)("th",{className:"px-3 py-2 font-medium",children:"Granted At"}),(0,a.jsx)("th",{className:"px-3 py-2 font-medium",children:"Expires At"}),(0,a.jsx)("th",{className:"px-3 py-2 font-medium",children:"Remaining"})]})}),(0,a.jsx)("tbody",{children:e.data.credits.map((e,t)=>(0,a.jsxs)("tr",{className:"border-t border-border-subtle",children:[(0,a.jsx)("td",{className:"px-3 py-2",children:(0,a.jsx)("span",{className:"rounded-full bg-primary/10 px-2 py-0.5 text-xs font-medium text-primary",children:e.status||"unknown"})}),(0,a.jsx)("td",{className:"px-3 py-2 text-text-muted",children:S(e.grantedAt)}),(0,a.jsx)("td",{className:"px-3 py-2 text-text-primary",children:S(e.expiresAt)}),(0,a.jsx)("td",{className:"px-3 py-2 font-medium text-text-primary",children:function(e){if(!e)return"N/A";let t=new Date(e).getTime()-Date.now();if(!Number.isFinite(t))return"N/A";if(t<=0)return"Expired";let r=Math.ceil(t/36e5),a=Math.floor(r/24),i=r%24;return a>0?`${a}d ${i}h`:`${i}h`}(e.expiresAt)})]},`${e.status}-${e.expiresAt||t}`))})]})})]}):(0,a.jsx)("div",{className:"rounded-xl border border-border bg-black/[0.02] px-3 py-8 text-center text-sm text-text-muted dark:border-white/10 dark:bg-white/[0.03]",children:"No reset credit details returned for this account."})})]})}):null}function z({icon:e,title:t,description:r}){return(0,a.jsx)(s.default,{padding:"lg",children:(0,a.jsxs)("div",{className:"text-center py-12",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[64px] text-text-muted opacity-20",children:e}),(0,a.jsx)("h3",{className:"mt-4 text-lg font-semibold text-text-primary",children:t}),(0,a.jsx)("p",{className:"mt-2 text-sm text-text-muted max-w-md mx-auto",children:r})]})})}function R(){let{quotaData:e,loading:t,errors:r,autoRefresh:s,autoPingMaps:u,refreshingAll:m,countdown:j,connectionsLoading:w,deletingId:k,togglingId:N,resettingLimitId:C,resetConfirmState:S,resetCreditsState:$,showEditModal:q,selectedConnection:E,proxyPools:D,providerFilter:M,providerOptions:O,accountFilter:I,quotaSortMode:R,expiringFirst:U,providerMenuOpen:K,bulkToggling:J,page:G,pageSize:H,customPageSizeInput:V,pagination:B,setAutoRefresh:Q,setResetConfirmState:W,setResetCreditsState:Y,setShowEditModal:X,setSelectedConnection:Z,setProviderFilter:ee,setProviderMenuOpen:et,setAccountFilter:er,setQuotaSortMode:ea,setExpiringFirst:ei,setPage:es,setPageSize:en,setCustomPageSizeInput:el,refreshProvider:eo,handleResetCodexLimit:ed,handleViewCodexResetCredits:ec,handleDeleteConnection:eu,handleToggleConnectionActive:em,handleUpdateConnection:ex,refreshAll:ep,toggleAutoPing:eh,handleDisableDepleted:eb,handleEnableAvailable:eg,sortedConnections:ef,hasEligibleConnections:ey,hasVisibleConnections:ev,emptyState:ej,connectionsPageSummary:ew}=function(){let[e,t]=(0,A.useState)([]),[r,a]=(0,A.useState)({}),[i,s]=(0,A.useState)({}),[n,u]=(0,A.useState)({}),[m,j]=(0,A.useState)(!0),[w,k]=(0,A.useState)({claude:{},codex:{}}),[N,C]=(0,A.useState)(null),[S,$]=(0,A.useState)(!1),[q,E]=(0,A.useState)(!1),[T,D]=(0,A.useState)(60),[M,O]=(0,A.useState)(!0),[I,F]=(0,A.useState)(null),[_,L]=(0,A.useState)(null),[z,R]=(0,A.useState)(null),[U,K]=(0,A.useState)(null),[J,G]=(0,A.useState)(null),[H,V]=(0,A.useState)(!1),[B,Q]=(0,A.useState)(null),[W,Y]=(0,A.useState)([]),[X,Z]=(0,A.useState)("all"),[ee,et]=(0,A.useState)([]),[er,ea]=(0,A.useState)("all"),[ei,es]=(0,A.useState)("default"),[en,el]=(0,A.useState)(!1),[eo,ed]=(0,A.useState)(!1),[ec,eu]=(0,A.useState)(!1),[em,ex]=(0,A.useState)(1),[ep,eh]=(0,A.useState)(20),[eb,eg]=(0,A.useState)(String(20)),[ef,ey]=(0,A.useState)({page:1,pageSize:20,total:0,totalPages:1}),[ev,ej]=(0,A.useState)({eligibleConnections:0,providerFilteredConnections:0}),ew=(0,A.useRef)(null),ek=(0,A.useRef)(null),eN=(0,A.useRef)(0),eC=(0,A.useCallback)(async(e=em)=>{try{var r,a;let i=new URLSearchParams({page:String(e),pageSize:String(ep),accountStatus:er,sort:"priority"});"all"!==X&&i.set("provider",X);let s=await fetch(`/api/providers/client?${i.toString()}`);if(!s.ok)throw Error("Failed to fetch connections");let n=await s.json(),l=n.connections||[],o=(r=n.pagination,r||{page:1,pageSize:ep,total:0,totalPages:1}),d=function(e,t=0){return e||{eligibleConnections:t,providerFilteredConnections:t}}(n.totals,l.length);return t(l),et(n.providerOptions||[]),ey(o),ej(d),ex((a=n.pagination,a?.page||e)),l}catch(e){return console.error("Error fetching connections:",e),t([]),et([]),ey({page:1,pageSize:ep,total:0,totalPages:1}),ej({eligibleConnections:0,providerFilteredConnections:0}),[]}},[er,en,em,ep,X]),eS=(0,A.useCallback)(async(e,t)=>{s(t=>({...t,[e]:!0})),u(t=>({...t,[e]:null}));try{console.log(`[ProviderLimits] Fetching quota for ${t} (${e})`);let r=await fetch(`/api/usage/${e}`);if(!r.ok){let i=(await r.json().catch(()=>({}))).error||r.statusText;if(404===r.status)return void console.warn(`[ProviderLimits] Connection not found for ${t}, skipping`);if(401===r.status){console.warn(`[ProviderLimits] Auth error for ${t}:`,i);let r={quotas:[],message:i};a(t=>({...t,[e]:r})),y(e,r);return}throw Error(`HTTP ${r.status}: ${i}`)}let i=await r.json();console.log(`[ProviderLimits] Got quota for ${t}:`,i);let s=i??{},n={quotas:function(e,t){if(!t||"object"!=typeof t)return[];let r=[];try{switch(e.toLowerCase()){case"github":default:t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null})});break;case"antigravity":if(t.quotas){let e=new Map(["claude-sonnet-4-6","claude-opus-4-6-thinking","gpt-oss-120b-medium","gemini-family"].map((e,t)=>[e,t]));Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:t.displayName||e,modelKey:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:t.remainingPercentage})}),r.sort((t,r)=>{let a=e.get(t.modelKey)??999,i=e.get(r.modelKey)??999;return a-i})}break;case"codex":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,remaining:t.remaining,resetAt:t.resetAt||null})});break;case"kiro":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null})});break;case"qoder":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{("organization"!==e||t&&0!==(Number(t.total)||0))&&r.push({name:"user"===e?"Personal":"organization"===e?"Organization":e,used:t.used||0,total:t.total||0,unit:t.unit,resetAt:t.resetAt||null})});break;case"claude":t.message?r.push({name:"error",used:0,total:0,resetAt:null,message:t.message}):t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null})});break;case"vercel-ai-gateway":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:t.remainingPercentage})});break;case"codebuddy-cn":case"codebuddy-intl":case"workbuddy":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,recurring:!1!==t.recurring})});break;case"xai":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,remaining:t.remaining,remainingPercentage:t.remainingPercentage,resetAt:t.resetAt||null,recurring:!1,unlimited:!0===t.unlimited})}),0===r.length&&t.plan&&r.push({name:`${t.plan} (subscription)`,used:0,total:0,remainingPercentage:null,resetAt:null,recurring:!1,unlimited:!0});break;case"tokenrouter":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,remaining:t.remaining,remainingPercentage:t.remainingPercentage,resetAt:t.resetAt||null,recurring:!1,unlimited:!1})});break;case"cline":case"clinepass":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,remaining:t.remainingPercentage,remainingPercentage:t.remainingPercentage,resetAt:t.resetAt||null,recurring:!0,unlimited:!1})});break;case"infron":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,remaining:t.remaining,remainingPercentage:t.remainingPercentage,resetAt:t.resetAt||null,recurring:!1,unlimited:!1})});break;case"grok-web":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,remaining:t.remaining,remainingPercentage:t.remainingPercentage,resetAt:t.resetAt||null,recurring:!0,unlimited:!1})});break;case"kimi-desktop":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:t.name||("subscription"===e?"Subscription":e),used:t.used||0,total:t.total||0,remainingPercentage:t.remainingPercentage,resetAt:t.resetAt||null,unit:t.unit,recurring:!1!==t.recurring,unlimited:!1})});break;case"kimchi":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,remaining:t.remaining,remainingPercentage:t.remainingPercentage,resetAt:t.resetAt||null,unit:t.unit,recurring:!1!==t.recurring,unlimited:!0===t.unlimited})}),0===r.length&&t.plan&&r.push({name:`${t.plan} (subscription)`,used:0,total:0,remainingPercentage:null,resetAt:null,unlimited:!0});break;case"zed":t.quotas&&Object.entries(t.quotas).forEach(([e,t])=>{r.push({name:e,used:t.used||0,total:t.total||0,resetAt:t.resetAt||null,remainingPercentage:t.remainingPercentage,unlimited:t.unlimited})})}}catch(t){return console.error(`Error parsing quota data for ${e}:`,t),[]}if("antigravity"!==e){let t=(0,l.KC)(e);if(t.length>0){let e=new Map(t.map((e,t)=>[e.id,t]));r.sort((t,r)=>{let a=t.modelKey||t.name,i=r.modelKey||r.name;return(e.get(a)??999)-(e.get(i)??999)})}}return r}(t,s),plan:s.plan||null,message:s.message||null,raw:i};a(t=>({...t,[e]:n})),y(e,n)}catch(r){console.error(`[ProviderLimits] Error fetching quota for ${t} (${e}):`,r),u(t=>({...t,[e]:r.message||"Failed to fetch quota"}))}finally{s(t=>({...t,[e]:!1}))}},[]),eA=(0,A.useCallback)(async(e,t)=>{await eS(e,t),C(new Date)},[eS]),eP=(0,A.useCallback)(async(e,t)=>{if("codex"===t&&!z){R(e),u(t=>({...t,[e]:null}));try{let r=await fetch(`/api/usage/${e}/codex-reset-credits`,{method:"POST"}),a=await r.json().catch(()=>({}));if(!r.ok)throw Error(a.message||a.error||a.code||"Failed to reset Codex limit");await eS(e,t),C(new Date)}catch(t){u(r=>({...r,[e]:t.message||"Failed to reset Codex limit"}))}finally{R(null)}}},[eS,z]),e$=(0,A.useCallback)(async e=>{G({connection:e,loading:!0,error:null,data:null});try{let t=await fetch(`/api/usage/${e.id}/codex-reset-credits`,{cache:"no-store"}),r=await t.json().catch(()=>({}));if(!t.ok)throw Error(r.error||r.message||"Failed to load Codex reset credits");let a=Array.isArray(r.credits)?[...r.credits]:[];a.sort((e,t)=>{let r=e.expiresAt?new Date(e.expiresAt).getTime():1/0,a=t.expiresAt?new Date(t.expiresAt).getTime():1/0;return r-a}),G({connection:e,loading:!1,error:null,data:{...r,credits:a}})}catch(t){G({connection:e,loading:!1,error:t.message||"Failed to load Codex reset credits",data:null})}},[]),eq=(0,A.useCallback)(async e=>{if(confirm("Delete this connection?")){F(e);try{if((await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok){a(t=>{let r={...t};return delete r[e],r}),s(t=>{let r={...t};return delete r[e],r}),u(t=>{let r={...t};return delete r[e],r});try{let t=f();t[e]&&(delete t[e],window.localStorage.setItem(o,JSON.stringify(t)))}catch(e){console.error("Error deleting cache entry:",e)}await g(eC,em)}}catch(e){console.error("Error deleting connection:",e)}finally{F(null)}}},[eC,em]),eE=(0,A.useCallback)(async(e,t)=>{L(e);try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&(a(e=>({...e})),await g(eC,em))}catch(e){console.error("Error updating connection status:",e)}finally{L(null)}},[eC,em]),eT=(0,A.useCallback)(async e=>{if(!B?.id)return;let t=B.id,r=B.provider;try{(await fetch(`/api/providers/${t}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await eC(),V(!1),Q(null),P.wb.includes(r)&&await eS(t,r))}catch(e){console.error("Error saving connection:",e)}},[B,eC,eS]);(0,A.useEffect)(()=>{let e=!1;return fetch("/api/proxy-pools?isActive=true",{cache:"no-store"}).then(e=>e.json()).then(t=>{!e&&t?.proxyPools&&Y(t.proxyPools)}).catch(()=>{}),()=>{e=!0}},[]);let eD=(0,A.useCallback)(async(e=!1)=>{if(q)return;E(!0),D(60);let t=eN.current+=1,r=Math.round(3);try{let i=await eC(em);s(h(i)),u(e=>b(e,i)),a(e=>b(e,i)),await Promise.all(i.filter(a=>e||"claude"!==a.provider||t%r==0).map(e=>eS(e.id,e.provider))),C(new Date)}catch(e){console.error("Error refreshing all providers:",e)}finally{E(!1)}},[q,eC,eS,em]);(0,A.useEffect)(()=>{(async()=>{O(!0);let e=await eC(em);O(!1),s(h(e)),u(t=>b(t,e)),a(t=>b(t,e)),await Promise.all(e.map(e=>eS(e.id,e.provider))),C(new Date)})()},[eC,eS,em]),(0,A.useEffect)(()=>{let e=window.localStorage.getItem(d);j(null===e||"true"===e),$(!0)},[]),(0,A.useEffect)(()=>{S&&window.localStorage.setItem(d,String(m))},[m,S]),(0,A.useEffect)(()=>{fetch("/api/settings",{cache:"no-store"}).then(e=>e.ok?e.json():{}).then(e=>k({claude:e?.claudeAutoPing?.connections||{},codex:e?.codexAutoPing?.connections||{}})).catch(()=>{})},[]);let eM=(0,A.useCallback)(async(e,t,r)=>{let a=AUTO_PING_SETTINGS_KEYS[t];if(!a)return;let i={...w[t]||{},[e]:r};k({...w,[t]:i});try{let e=await fetch("/api/settings",{cache:"no-store"}),t={...(e.ok?await e.json():{})[a]||{},connections:i};await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({[a]:t})})}catch{k(w)}},[w]);(0,A.useEffect)(()=>{if(!S||!m){ew.current&&(clearInterval(ew.current),ew.current=null),ek.current&&(clearInterval(ek.current),ek.current=null);return}return ew.current=setInterval(()=>{eD()},6e4),ek.current=setInterval(()=>{D(e=>e<=1?60:e-1)},1e3),()=>{ew.current&&clearInterval(ew.current),ek.current&&clearInterval(ek.current)}},[m,eD,S]),(0,A.useEffect)(()=>{let e=()=>{document.hidden?(ew.current&&(clearInterval(ew.current),ew.current=null),ek.current&&(clearInterval(ek.current),ek.current=null)):m&&S&&(ew.current=setInterval(()=>eD(),6e4),ek.current=setInterval(()=>{D(e=>e<=1?60:e-1)},1e3))};return document.addEventListener("visibilitychange",e),()=>{document.removeEventListener("visibilitychange",e)}},[m,eD,S]);let eO=(0,A.useMemo)(()=>(function(e,t,r,a,i){if("codex"===a&&"default"!==i)return[...e].sort((e,r)=>{let a=p(e,t),s=p(r,t),n="remaining-asc"===i?a-s:s-a;return 0!==n?n:(x(e)||"").localeCompare(x(r)||"")});if(!r)return e;let s=e=>{let r=(t[e.id]?.quotas||[]).map(e=>e.resetAt?new Date(e.resetAt).getTime():1/0).filter(e=>Number.isFinite(e));return r.length>0?Math.min(...r):1/0};return[...e].sort((e,t)=>{let r=s(e)-s(t);return 0!==r?r:(e.provider||"").localeCompare(t.provider||"")||(x(e)||"").localeCompare(x(t)||"")})})(e,r,en,X,ei),[e,r,en,X,ei]),eI=e=>{let t=r[e.id]?.quotas;return!!t?.length&&t.some(e=>!!e.total&&!(e.total<=0)&&5>=v(e.used,e.total))},eF=(0,A.useCallback)(async(e,t)=>{if(e.length&&!ec){eu(!0);try{await Promise.all(e.map(e=>fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})}))),await g(eC,em)}catch(e){console.error("Error bulk toggling connections:",e)}finally{eu(!1)}}},[ec,eC,em]),e_="all"===X?"All providers":X,eL=ev.eligibleConnections>0,ez=eO.length>0,eR=ev.eligibleConnections?ev.providerFilteredConnections?{icon:"filter_alt_off",title:"No Accounts On This Page",description:"Try moving to another page or refreshing the current filters."}:{icon:"filter_alt_off",title:"No Accounts Match Current Filters",description:"all"===X?"Try changing the account status filter to see more quota trackers.":`No ${"inactive"===er?"turned off":"active"===er?"active":"matching"} accounts found for ${X}.`}:{icon:"cloud_off",title:"No Providers Connected",description:"Connect to providers with OAuth to track your API quota limits and usage."},eU=function(e){var t;let{start:r,end:a}=(t=e).total?{start:(t.page-1)*t.pageSize+1,end:Math.min(t.page*t.pageSize,t.total)}:{start:0,end:0};return`Showing ${r}-${a} of ${e.total}`}(ef),eK=!c.includes(ep),eJ=eK?`Custom: ${ep} / page`:`${ep} / page`;return{connections:e,quotaData:r,loading:i,errors:n,autoRefresh:m,autoPingMaps:w,lastUpdated:N,hasHydratedAutoRefresh:S,refreshingAll:q,countdown:T,connectionsLoading:M,deletingId:I,togglingId:_,resettingLimitId:z,resetConfirmState:U,resetCreditsState:J,showEditModal:H,selectedConnection:B,proxyPools:W,providerFilter:X,providerOptions:ee,accountFilter:er,quotaSortMode:ei,expiringFirst:en,providerMenuOpen:eo,bulkToggling:ec,page:em,pageSize:ep,customPageSizeInput:eb,pagination:ef,totals:ev,setAutoRefresh:j,setResetConfirmState:K,setResetCreditsState:G,setShowEditModal:V,setSelectedConnection:Q,setProviderFilter:Z,setProviderMenuOpen:ed,setAccountFilter:ea,setQuotaSortMode:es,setExpiringFirst:el,setPage:ex,setPageSize:eh,setCustomPageSizeInput:eg,refreshProvider:eA,handleResetCodexLimit:eP,handleViewCodexResetCredits:e$,handleDeleteConnection:eq,handleToggleConnectionActive:eE,handleUpdateConnection:eT,refreshAll:eD,toggleAutoPing:eM,handleDisableDepleted:()=>{eF(eO.filter(e=>(e.isActive??!0)&&eI(e)).map(e=>e.id),!1)},handleEnableAvailable:()=>{eF(eO.filter(e=>!(e.isActive??!0)&&!eI(e)).map(e=>e.id),!0)},sortedConnections:eO,isConnectionDepleted:eI,selectedProviderLabel:e_,hasEligibleConnections:eL,hasVisibleConnections:ez,emptyState:eR,connectionsPageSummary:eU,isCustomPageSize:eK,pageSizeLabel:eJ}}();return w||ey?w||ev?(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsx)(i.default,{title:"Quota",description:"Capacity, resets, and account availability",icon:"data_usage"}),(0,a.jsx)(T,{providerFilter:M,providerOptions:O,providerMenuOpen:K,onToggleProviderMenu:()=>et(e=>!e),onSelectProvider:e=>{M!==e&&es(1),ee(e),et(!1)},accountFilter:I,onAccountFilterChange:e=>{I!==e&&es(1),er(e)},quotaSortMode:R,onQuotaSortModeChange:ea,expiringFirst:U,onToggleExpiringFirst:()=>ei(e=>!e),autoRefresh:s,onToggleAutoRefresh:()=>Q(e=>!e),countdown:j,bulkToggling:J,onDisableDepleted:eb,onEnableAvailable:eg,refreshingAll:m,onRefreshAll:ep}),U&&(0,a.jsx)("div",{className:"rounded-xl border border-amber-500/20 bg-warning/10 px-3 py-2 text-xs text-amber-700 dark:text-amber-300",children:"Expiring-first currently reorders accounts inside the current page. Cross-page ordering still follows backend pagination."}),(0,a.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:ef.map(i=>(0,a.jsx)(F,{conn:i,quota:e[i.id],isLoading:t[i.id],error:r[i.id],autoPingMaps:u,quotaSortMode:R,resettingLimitId:C,deletingId:k,togglingId:N,onRefresh:eo,onEdit:e=>{Z(e),X(!0)},onDelete:eu,onToggleActive:em,onRequestReset:(e,t)=>W({connection:e,resetCreditCount:t}),onViewResetCredits:ec,onToggleAutoPing:eh},i.id))}),(0,a.jsx)(_,{pagination:B,pageSize:H,customPageSizeInput:V,connectionsLoading:w,refreshingAll:m,connectionsPageSummary:ew,setPage:es,onPageSizeSelect:e=>{if("custom"===e)return;let t=Number.parseInt(e,10);Number.isFinite(t)&&(es(1),en(t),el(String(t)))},onCustomPageSizeInputChange:el,onCommitCustomPageSize:()=>{let e=Number.parseInt(V,10);if(!Number.isFinite(e))return void el(String(H));let t=Math.min(500,Math.max(1,e));es(1),en(t),el(String(t))}}),(0,a.jsx)(n.uo,{isOpen:!!S,onClose:()=>{C||W(null)},onConfirm:async()=>{let e=S?.connection;e&&(await ed(e.id,e.provider),W(null))},title:"Reset Codex limit?",message:`Use 1 Codex reset credit for ${x(S?.connection||{})||"this account"}. This cannot be undone. Remaining credits: ${S?.resetCreditCount??0}.`,confirmText:"Reset limit",cancelText:"Cancel",variant:"danger",loading:!!C}),(0,a.jsx)(L,{state:$,onClose:()=>Y(null)}),(0,a.jsx)(n.wI,{isOpen:q,connection:E,proxyPools:D,onSave:ex,onClose:()=>{X(!1),Z(null)}})]}):(0,a.jsx)(z,{icon:ej.icon,title:ej.title,description:ej.description}):(0,a.jsx)(z,{icon:"cloud_off",title:"No Providers Connected",description:"Connect to providers with OAuth to track your API quota limits and usage."})}},96133:(e,t,r)=>{Promise.resolve().then(r.bind(r,15670)),Promise.resolve().then(r.bind(r,25086))}},e=>{e.O(0,[27,2563,705,1321,5497,8441,3794,7358],()=>e(e.s=96133)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9516],{25023:(e,t,i)=>{Promise.resolve().then(i.bind(i,64082))},64082:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>b});var s=i(95155),r=i(35497),n=i(11059);let a="rsalmn/extremerouter",o="master",l="skills",c=`https://github.com/${a}`,d=`https://raw.githubusercontent.com/${a}/refs/heads/${o}/${l}`,m=`https://github.com/${a}/blob/${o}/${l}`,x=[{id:"@rsalmn/extremerouter",name:"ExtremeRouter (Entry)",description:"Setup + index of all capabilities. Start here — covers base URL, auth, model discovery, and links to every capability skill.",endpoint:null,icon:"hub",isEntry:!0},{id:"extremerouter-chat",name:"Chat",description:"Chat / code-gen via OpenAI or Anthropic format with streaming.",endpoint:"/v1/chat/completions",icon:"chat"},{id:"extremerouter-image",name:"Image Generation",description:"Text-to-image via DALL-E, Imagen, FLUX, MiniMax, SDWebUI…",endpoint:"/v1/images/generations",icon:"image"},{id:"extremerouter-tts",name:"Text-to-Speech",description:"OpenAI / ElevenLabs / Edge / Google / Deepgram voices.",endpoint:"/v1/audio/speech",icon:"record_voice_over"},{id:"extremerouter-stt",name:"Speech-to-Text",description:"Transcribe audio via OpenAI Whisper, Groq, Gemini, Deepgram, AssemblyAI…",endpoint:"/v1/audio/transcriptions",icon:"mic"},{id:"extremerouter-embeddings",name:"Embeddings",description:"Vectors for RAG / semantic search via OpenAI, Gemini, Mistral…",endpoint:"/v1/embeddings",icon:"scatter_plot"},{id:"extremerouter-web-search",name:"Web Search",description:"Tavily / Exa / Brave / Serper / SearXNG / Google PSE / You.com.",endpoint:"/v1/search",icon:"search"},{id:"extremerouter-web-fetch",name:"Web Fetch",description:"URL → markdown / text / HTML via Firecrawl, Jina, Tavily, Exa.",endpoint:"/v1/web/fetch",icon:"language"}];function p(e){return`${d}/${e}/SKILL.md`}function h({value:e,label:t="Copy link"}){let{copied:i,copy:r}=(0,n.C)(2e3);return(0,s.jsxs)("button",{onClick:()=>r(e),className:"px-2 py-1 rounded-md bg-primary text-white text-[11px] font-medium hover:bg-primary/90 transition-colors cursor-pointer shrink-0 inline-flex items-center gap-1",title:e,children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:i?"check":"content_copy"}),i?"Copied!":t]})}function u({skill:e}){var t;let i=p(e.id);return(0,s.jsxs)("div",{className:`flex items-start gap-3 p-4 rounded-[14px] border shadow-[var(--shadow-soft)] transition-colors ${e.isEntry?"border-brand-500/40 bg-brand-500/5":"border-border-subtle bg-surface hover:bg-surface-2"}`,children:[(0,s.jsx)("div",{className:`size-9 rounded-lg flex items-center justify-center shrink-0 ${e.isEntry?"bg-primary text-white":"bg-primary/10 text-primary"}`,children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:e.icon})}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,s.jsx)("h3",{className:"font-semibold text-sm text-text-main",children:e.name}),e.isEntry&&(0,s.jsx)(r.Ex,{variant:"primary",size:"sm",children:"START HERE"}),e.endpoint&&(0,s.jsx)(r.Ex,{variant:"default",size:"sm",children:(0,s.jsx)("code",{className:"text-[10px]",children:e.endpoint})})]}),(0,s.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:e.description}),(0,s.jsxs)("a",{href:(t=e.id,`${m}/${t}/SKILL.md`),target:"_blank",rel:"noreferrer",className:"text-[11px] text-text-muted hover:text-primary mt-1 inline-flex items-center gap-1 break-all",children:[i,(0,s.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"open_in_new"})]})]}),(0,s.jsx)(h,{value:i})]})}function b(){return(0,s.jsxs)("div",{className:"mx-auto max-w-4xl space-y-6",children:[(0,s.jsx)(r.zY,{title:"Skills",description:"Reusable agent skills and install links",icon:"extension"}),(0,s.jsxs)(r.Zp,{padding:"md",children:[(0,s.jsx)("div",{className:"text-xs text-text-muted mb-2",children:"Paste this to your AI:"}),(0,s.jsxs)("div",{className:"px-3 py-2 rounded bg-surface-2 font-mono text-[12px] text-text-main",children:["Read this skill and use it: ",p("@rsalmn/extremerouter")]})]}),(0,s.jsx)("div",{className:"space-y-2",children:x.map(e=>(0,s.jsx)(u,{skill:e},e.id))}),(0,s.jsx)(r.Zp,{padding:"md",children:(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3 flex-wrap",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-text-main",children:"More on GitHub"}),(0,s.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:"Browse source, README, and examples."})]}),(0,s.jsxs)("a",{href:`${c}/tree/master/skills`,target:"_blank",rel:"noreferrer",className:"text-sm text-primary hover:underline inline-flex items-center gap-1",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"open_in_new"}),"View on GitHub"]})]})})]})}}},e=>{e.O(0,[27,8105,705,1321,5497,8441,3794,7358],()=>e(e.s=25023)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9516],{25023:(e,t,i)=>{Promise.resolve().then(i.bind(i,64082))},64082:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>b});var s=i(95155),r=i(35497),n=i(11059);let a="rsalmn/extremerouter",o="master",l="skills",c=`https://github.com/${a}`,d=`https://raw.githubusercontent.com/${a}/refs/heads/${o}/${l}`,m=`https://github.com/${a}/blob/${o}/${l}`,x=[{id:"@rsalmn/extremerouter",name:"ExtremeRouter (Entry)",description:"Setup + index of all capabilities. Start here — covers base URL, auth, model discovery, and links to every capability skill.",endpoint:null,icon:"hub",isEntry:!0},{id:"extremerouter-chat",name:"Chat",description:"Chat / code-gen via OpenAI or Anthropic format with streaming.",endpoint:"/v1/chat/completions",icon:"chat"},{id:"extremerouter-image",name:"Image Generation",description:"Text-to-image via DALL-E, Imagen, FLUX, MiniMax, SDWebUI…",endpoint:"/v1/images/generations",icon:"image"},{id:"extremerouter-tts",name:"Text-to-Speech",description:"OpenAI / ElevenLabs / Edge / Google / Deepgram voices.",endpoint:"/v1/audio/speech",icon:"record_voice_over"},{id:"extremerouter-stt",name:"Speech-to-Text",description:"Transcribe audio via OpenAI Whisper, Groq, Gemini, Deepgram, AssemblyAI…",endpoint:"/v1/audio/transcriptions",icon:"mic"},{id:"extremerouter-embeddings",name:"Embeddings",description:"Vectors for RAG / semantic search via OpenAI, Gemini, Mistral…",endpoint:"/v1/embeddings",icon:"scatter_plot"},{id:"extremerouter-web-search",name:"Web Search",description:"Tavily / Exa / Brave / Serper / SearXNG / Google PSE / You.com.",endpoint:"/v1/search",icon:"search"},{id:"extremerouter-web-fetch",name:"Web Fetch",description:"URL → markdown / text / HTML via Firecrawl, Jina, Tavily, Exa.",endpoint:"/v1/web/fetch",icon:"language"}];function p(e){return`${d}/${e}/SKILL.md`}function h({value:e,label:t="Copy link"}){let{copied:i,copy:r}=(0,n.C)(2e3);return(0,s.jsxs)("button",{onClick:()=>r(e),className:"px-2 py-1 rounded-md bg-primary text-white text-[11px] font-medium hover:bg-primary/90 transition-colors cursor-pointer shrink-0 inline-flex items-center gap-1",title:e,children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:i?"check":"content_copy"}),i?"Copied!":t]})}function u({skill:e}){var t;let i=p(e.id);return(0,s.jsxs)("div",{className:`flex items-start gap-3 p-4 rounded-[14px] border shadow-[var(--shadow-soft)] transition-colors ${e.isEntry?"border-brand-500/40 bg-brand-500/5":"border-border-subtle bg-surface hover:bg-surface-2"}`,children:[(0,s.jsx)("div",{className:`size-9 rounded-lg flex items-center justify-center shrink-0 ${e.isEntry?"bg-primary text-white":"bg-primary/10 text-primary"}`,children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:e.icon})}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,s.jsx)("h3",{className:"font-semibold text-sm text-text-main",children:e.name}),e.isEntry&&(0,s.jsx)(r.Ex,{variant:"primary",size:"sm",children:"START HERE"}),e.endpoint&&(0,s.jsx)(r.Ex,{variant:"default",size:"sm",children:(0,s.jsx)("code",{className:"text-[10px]",children:e.endpoint})})]}),(0,s.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:e.description}),(0,s.jsxs)("a",{href:(t=e.id,`${m}/${t}/SKILL.md`),target:"_blank",rel:"noreferrer",className:"text-[11px] text-text-muted hover:text-primary mt-1 inline-flex items-center gap-1 break-all",children:[i,(0,s.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"open_in_new"})]})]}),(0,s.jsx)(h,{value:i})]})}function b(){return(0,s.jsxs)("div",{className:"mx-auto max-w-4xl space-y-6",children:[(0,s.jsx)(r.zY,{title:"Skills",description:"Reusable agent skills and install links",icon:"extension"}),(0,s.jsxs)(r.Zp,{padding:"md",children:[(0,s.jsx)("div",{className:"text-xs text-text-muted mb-2",children:"Paste this to your AI:"}),(0,s.jsxs)("div",{className:"px-3 py-2 rounded bg-surface-2 font-mono text-[12px] text-text-main",children:["Read this skill and use it: ",p("@rsalmn/extremerouter")]})]}),(0,s.jsx)("div",{className:"space-y-2",children:x.map(e=>(0,s.jsx)(u,{skill:e},e.id))}),(0,s.jsx)(r.Zp,{padding:"md",children:(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3 flex-wrap",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"text-sm font-semibold text-text-main",children:"More on GitHub"}),(0,s.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:"Browse source, README, and examples."})]}),(0,s.jsxs)("a",{href:`${c}/tree/master/skills`,target:"_blank",rel:"noreferrer",className:"text-sm text-primary hover:underline inline-flex items-center gap-1",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"open_in_new"}),"View on GitHub"]})]})})]})}}},e=>{e.O(0,[27,2563,705,1321,5497,8441,3794,7358],()=>e(e.s=25023)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1372],{16688:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>q,dynamic:()=>A});var r=s(95155),a=s(12115),l=s(54960),n=s(56061),i=s(99312),o=s(31474);let d={tool_calling:{label:"Tool Calling",variant:"cyan",icon:"construction",desc:"tools / tool_choice / functions detected → routed only to tool-capable non-cookie models"},tool_calling_pool_empty_fallback:{label:"Tool Pool Empty",variant:"warning",icon:"construction",desc:"no tool-capable member in combo → used the full pool with a warning"},research_cookie_primary:{label:"Research → Cookie Pool",variant:"info",icon:"travel_explore",desc:"research intent → cookie providers tried first, normal pool as fallback"},research_cookie_pool_empty:{label:"Research (No Cookies)",variant:"warning",icon:"travel_explore",desc:"research intent but no cookie provider in combo → default order"},general:{label:"General",variant:"default",icon:"route",desc:"no tool-calling, no research intent → default fallback chain"}},c={keyword:"keyword match",url:"URL detected",none:"no signal",empty:"empty prompt"};function x(e){return"done"===e?"success":"running"===e?"info":"error"===e?"error":"default"}function m(e){return"done"===e?"Done":"running"===e?"Routing…":"error"===e?"Error":"Pending"}function u(e){return e||0===e?e<1e3?`${e}ms`:`${(e/1e3).toFixed(1)}s`:"—"}function p(e){if(!e)return null;let t=c[e.signal]||e.signal||"no signal",s=Number.isFinite(e.confidence)?Math.round(100*e.confidence):null;return"classifier"===e.source?`classifier ${e.classifierModel||"?"} → ${e.intent} (heuristic: ${t}${null!=s?`, ${s}%`:""})`:`${t}${null!=s?` (${s}% confidence)`:""} → ${e.intent}`}function h({model:e,index:t,blocked:s=!1,muted:a=!1,risk:l=!1}){return(0,r.jsxs)("div",{title:l?`${e} fails frequently in production (30d)`:void 0,className:(0,o.cn)("flex items-center gap-2 rounded-md border px-2.5 py-1.5 font-mono text-xs",s?"border-danger/30 bg-danger/5 text-text-muted line-through decoration-danger/60":a?"border-border-subtle bg-surface-2 text-text-subtle":l?"border-danger/30 bg-danger/5 text-danger":"border-border-subtle bg-surface-2 text-text-muted"),children:[null!=t&&(0,r.jsxs)("span",{className:"text-[10px] text-text-subtle",children:["#",t]}),(0,r.jsx)("span",{className:"truncate max-w-[200px]",children:e}),s&&(0,r.jsx)("span",{className:"material-symbols-outlined text-[13px] text-danger",children:"block"}),l&&(0,r.jsx)("span",{className:"material-symbols-outlined text-[13px] text-danger",children:"warning"})]})}function b({routing:e,servedModel:t,pendingLabel:s="Resolving routing decision…"}){if(!e)return(0,r.jsxs)("div",{className:"flex items-center gap-2 px-4 py-3 text-xs text-text-muted",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px] animate-spin",children:"progress_activity"}),s]});let a=d[e.reason]||d.general;return(0,r.jsxs)("div",{className:"flex flex-col gap-3 px-4 py-3",children:[(0,r.jsxs)("div",{className:"flex items-start gap-2.5",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px] text-text-subtle",children:a.icon}),(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,r.jsx)(n.default,{variant:a.variant,size:"sm",children:a.label}),e.intent&&(0,r.jsx)("span",{className:"text-[11px] text-text-subtle",children:p(e.intent)})]}),(0,r.jsx)("p",{className:"mt-1 text-xs text-text-muted",children:a.desc})]})]}),e.order?.length>0&&(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"mb-1.5 text-[11px] font-semibold uppercase tracking-wide text-text-muted",children:["Selected pool ",(0,r.jsx)("span",{className:"font-normal normal-case",children:"(fallback order)"})]}),(0,r.jsx)("div",{className:"flex flex-wrap gap-2",children:e.order.map((e,t)=>(0,r.jsx)(h,{model:e,index:t+1},t))})]}),"research_cookie_primary"===e.reason&&(0,r.jsxs)("div",{className:"grid gap-2 sm:grid-cols-2",children:[e.cookiePool?.length>0&&(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"mb-1.5 text-[11px] font-semibold uppercase tracking-wide text-text-muted",children:"Cookie pool (first)"}),(0,r.jsx)("div",{className:"flex flex-wrap gap-2",children:e.cookiePool.map((e,t)=>(0,r.jsx)(h,{model:e},t))})]}),e.normalPool?.length>0&&(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"mb-1.5 text-[11px] font-semibold uppercase tracking-wide text-text-muted",children:"Normal pool (fallback)"}),(0,r.jsx)("div",{className:"flex flex-wrap gap-2",children:e.normalPool.map((e,t)=>(0,r.jsx)(h,{model:e,muted:!0},t))})]})]}),e.excludedCookies?.length>0&&(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"mb-1.5 text-[11px] font-semibold uppercase tracking-wide text-text-muted",children:["Excluded cookie providers ",(0,r.jsx)("span",{className:"font-normal normal-case",children:"(no tool calling)"})]}),(0,r.jsx)("div",{className:"flex flex-wrap gap-2",children:e.excludedCookies.map((e,t)=>(0,r.jsx)(h,{model:e,blocked:!0},t))})]}),t&&(0,r.jsxs)("div",{className:"flex items-center gap-2 border-t border-border-subtle pt-2.5",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px] text-success",children:"check_circle"}),(0,r.jsx)("span",{className:"text-xs text-text-muted",children:"Served by"}),(0,r.jsx)("span",{className:"truncate font-mono text-xs font-medium text-text-main",children:t})]})]})}function g(){let[e,t]=(0,a.useState)([]),[s,l]=(0,a.useState)(!1),[,d]=(0,a.useState)(0);(0,a.useEffect)(()=>{let e=new EventSource("/api/smart-routing/stream");return e.onopen=()=>l(!0),e.onerror=()=>l(!1),e.onmessage=e=>{try{let s=JSON.parse(e.data);t(e=>"snapshot"===s.type&&Array.isArray(s.runs)?s.runs:s.runId?"smart:start"===s.type?[{runId:s.runId,comboName:s.comboName,promptPreview:s.promptPreview,routing:null,servedModel:null,status:"running",error:null,startedAt:Date.now(),totalDurationMs:null},...e].slice(0,50):e.map(e=>{if(e.runId!==s.runId)return e;let t={...e};return"smart:route"===s.type?t.routing=s.routing:"smart:served"===s.type?t.servedModel=s.servedModel:"smart:complete"===s.type?(t.status="done",t.totalDurationMs=s.totalDurationMs):"smart:error"===s.type&&(t.status="error",t.error=s.error,t.totalDurationMs=s.totalDurationMs),t}):e)}catch{}},()=>e.close()},[]),(0,a.useEffect)(()=>{let e=setInterval(()=>d(e=>e+1),3e4);return()=>clearInterval(e)},[]);let c=e.filter(e=>"running"===e.status),x=e.filter(e=>"running"!==e.status);return(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",{className:"flex items-center gap-2 text-sm text-text-muted",children:[(0,r.jsx)("span",{className:(0,o.cn)("size-2 rounded-full",s?"bg-success animate-pulse":"bg-danger")}),s?"Live":"Reconnecting…"]}),c.length>0&&(0,r.jsxs)(n.default,{variant:"info",dot:!0,children:[c.length," active run",c.length>1?"s":""]})]}),0===e.length?(0,r.jsx)(i.default,{icon:"alt_route",title:"No smart-routing runs yet",description:"Routing decisions will appear here in real time. Send a request to a combo with the 'Smart Routing' strategy to see the reason, selected pool and excluded cookie providers per request."}):(0,r.jsxs)(r.Fragment,{children:[c.length>0&&(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)("h3",{className:"text-xs font-semibold uppercase tracking-wide text-text-muted",children:"Active"}),c.map(e=>(0,r.jsx)(f,{run:e,expanded:!0},e.runId))]}),x.length>0&&(0,r.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,r.jsx)("h3",{className:"text-xs font-semibold uppercase tracking-wide text-text-muted",children:"Recent"}),x.slice(0,10).map(e=>(0,r.jsx)(f,{run:e},e.runId))]})]})]})}function f({run:e,expanded:t=!1}){return(0,r.jsxs)("div",{className:(0,o.cn)("rounded-panel border bg-panel shadow-[var(--shadow-soft)]","error"===e.status?"border-danger/30":"border-border-subtle"),children:[(0,r.jsxs)("div",{className:"flex items-center justify-between gap-3 border-b border-border-subtle px-4 py-3",children:[(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,r.jsx)(n.default,{variant:x(e.status),dot:!0,size:"sm",children:m(e.status)}),(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("div",{className:"truncate font-mono text-sm font-medium text-text-main",children:e.comboName||"smart-routing"}),(0,r.jsx)("div",{className:"truncate text-xs text-text-muted",children:function(e){if(!e)return"—";let t=Date.now()-e;return t<5e3?"just now":t<6e4?`${Math.floor(t/1e3)}s ago`:t<36e5?`${Math.floor(t/6e4)}m ago`:new Date(e).toLocaleTimeString()}(e.startedAt)})]})]}),(0,r.jsxs)("div",{className:"flex shrink-0 items-center gap-3 text-xs text-text-muted",children:[e.totalDurationMs&&(0,r.jsx)("span",{className:"font-mono",children:u(e.totalDurationMs)}),e.routing?.order?.length>0&&(0,r.jsxs)("span",{className:"flex items-center gap-1",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"alt_route"}),e.routing.order.length," pool"]})]})]}),e.promptPreview&&(0,r.jsx)("div",{className:"border-b border-border-subtle px-4 py-2",children:(0,r.jsx)("p",{className:"truncate text-xs text-text-muted",children:e.promptPreview})}),(0,r.jsx)(b,{routing:e.routing,servedModel:e.servedModel}),"error"===e.status&&e.error&&(0,r.jsx)("div",{className:"border-t border-danger/20 bg-danger/5 px-4 py-2",children:(0,r.jsx)("p",{className:"text-xs text-danger",children:e.error})})]})}var j=s(84588),N=s(92542);async function v(e){let t=null;try{t=await e.json()}catch{let s=await e.text().catch(()=>"");t=s?{error:s.slice(0,300)}:null}if(!e.ok)throw Error(t?.error||`Request failed with status ${e.status}`);return t}let y={fallback:{label:"Fallback",icon:"format_list_numbered",desc:"Plain ordered chain — member 1 first, then 2, … until one answers.",variant:"default"},"smart-routing":{label:"Smart Routing",icon:"alt_route",desc:"Tool-calling → API models only \xb7 Research → cookie pool first \xb7 else default chain.",variant:"info"},swarm:{label:"Hierarchical Swarm",icon:"hub",desc:"Gatekeeper triage → manager strategy → parallel workers → staff audit → manager synthesis.",variant:"primary"}},w=new Set(["tool_calling","tool_calling_pool_empty_fallback"]);function k(e){return null!=e&&Number.isFinite(e)?0===e?"$0":e<.001?`$${e.toPrecision(2)}`:`$${e.toFixed(4).replace(/\.?0+$/,"")}`:"—"}function S(e){return e?e.min===e.max?`${e.min}`:`${e.min}–${e.max}`:"—"}let C={served:{label:"✓ Matched",variant:"success"},different:{label:"Different",variant:"warning"},failed:{label:"No answer",variant:"error"},no_data:{label:"No data",variant:null}};function _({entry:e}){if(!e)return null;let t=C[e.match]||C.no_data;return t.variant?(0,r.jsx)(n.default,{variant:t.variant,size:"sm",children:t.label}):(0,r.jsx)("span",{className:"text-xs text-text-subtle",children:"No data"})}function M({compareRun:e,onRunConsumed:t}){let[s,l]=(0,a.useState)([]),[n,i]=(0,a.useState)(""),[d,c]=(0,a.useState)(""),[x,m]=(0,a.useState)(!1),[u,p]=(0,a.useState)(1e3),[h,b]=(0,a.useState)(["fallback","smart-routing","swarm"]),[g,f]=(0,a.useState)(null),[k,S]=(0,a.useState)(!1),[C,_]=(0,a.useState)(null),[P,z]=(0,a.useState)(null),D=(0,a.useRef)(null),I=(0,a.useRef)(e);(0,a.useEffect)(()=>{let e=!1;return fetch("/api/smart-routing/history?pageSize=50").then(v).then(t=>{e||l(t.runs||[])}).catch(()=>{}),()=>{e=!0}},[]);let $=(0,a.useCallback)(e=>{e&&(i(e.runId),c(e.lastUserMessage||e.promptPreview||""),m(w.has(e.routing?.reason)))},[]),F=(0,a.useCallback)(async(e,t={})=>{let s=void 0!==t.prompt?t.prompt:e?e.lastUserMessage||e.promptPreview||"":d,r=void 0!==t.hadTools?t.hadTools:e?w.has(e.routing?.reason):x,a=h.filter(e=>y[e]);if(0===a.length)return void _("Select at least one strategy to compare");if(!s.trim())return void _("Enter a prompt (or pick a request from history)");S(!0),_(null),D.current={prompt:s,hadTools:r,inputTokens:u,runId:e?.runId||null};try{let t=await fetch("/api/smart-routing/lab",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({runId:e?.runId||null,prompt:s,hadTools:r,strategies:a,inputTokens:u})}),l=await v(t);f(l)}catch(e){console.error("Lab comparison failed:",e),_(e?.message||"Lab comparison failed — server unreachable"),f(null)}finally{S(!1)}},[d,x,u,h]);return(0,a.useEffect)(()=>{e&&e.runId!==I.current?.runId&&(I.current=e,$(e),F(e),t?.())},[e,$,F,t]),(0,r.jsxs)(j.default,{padding:"lg",children:[(0,r.jsxs)("div",{className:"mb-4 flex items-center gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px] text-primary",children:"science"}),(0,r.jsx)("h2",{className:"text-base font-semibold text-text-main",children:"A/B Lab — Strategy Comparison"}),(0,r.jsx)("span",{className:"text-xs text-text-muted",children:"Simulate fallback vs smart-routing vs swarm on the same request"})]}),(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-[280px_1fr]",children:[(0,r.jsxs)("div",{className:"flex min-w-0 flex-col gap-2",children:[(0,r.jsx)("label",{htmlFor:"lab-run-picker",className:"text-sm font-medium text-text-main",children:"Request from history"}),(0,r.jsxs)("select",{id:"lab-run-picker",value:n,onChange:e=>{var t;let r;return i(t=e.target.value),void((r=s.find(e=>e.runId===t))&&($(r),F(r)))},className:"h-9 w-full cursor-pointer rounded-lg border border-border bg-surface-2 px-3 text-sm text-text-main focus:outline-none focus:ring-2 focus:ring-primary/20",children:[(0,r.jsx)("option",{value:"",children:"— select a past request —"}),s.map(e=>(0,r.jsxs)("option",{value:e.runId,children:[e.comboName||"unknown combo"," \xb7 ",(e.promptPreview||"").slice(0,60)||"no preview"]},e.runId))]}),0===s.length&&(0,r.jsx)("p",{className:"text-xs text-text-muted",children:"No history yet — type a prompt below instead."})]}),(0,r.jsxs)("div",{className:"flex min-w-0 flex-col gap-2",children:[(0,r.jsx)("label",{htmlFor:"lab-prompt",className:"text-sm font-medium text-text-main",children:"Prompt (editable)"}),(0,r.jsx)("textarea",{id:"lab-prompt",value:d,onChange:e=>c(e.target.value),rows:2,placeholder:"e.g. research the latest AI trends and cite sources…",className:"w-full resize-y rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm text-text-main focus:outline-none focus:ring-2 focus:ring-primary/20"})]})]}),(0,r.jsxs)("div",{className:"mt-4 flex flex-wrap items-end gap-x-8 gap-y-3",children:[(0,r.jsxs)("label",{className:"flex cursor-pointer items-center gap-2 text-sm text-text-main",children:[(0,r.jsx)("input",{type:"checkbox",checked:x,onChange:e=>m(e.target.checked),className:"h-4 w-4 accent-primary"}),"Simulate tool-calling request (tools[])"]}),(0,r.jsxs)("label",{className:"flex items-center gap-2 text-sm text-text-main",children:["Input tokens",(0,r.jsx)("input",{type:"number",min:1,value:u,onChange:e=>p(Math.max(1,Number(e.target.value)||1)),className:"h-9 w-24 rounded-lg border border-border bg-surface-2 px-3 text-sm text-text-main focus:outline-none focus:ring-2 focus:ring-primary/20"})]}),(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,r.jsx)("span",{className:"text-sm font-medium text-text-main",children:"Strategies:"}),Object.entries(y).map(([e,t])=>(0,r.jsxs)("button",{type:"button",onClick:()=>{b(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},className:(0,o.cn)("flex items-center gap-1.5 rounded-full border px-3 py-1.5 text-xs font-medium transition-colors",h.includes(e)?"border-primary/40 bg-primary/10 text-primary":"border-border bg-surface-2 text-text-muted hover:border-border-subtle"),children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:t.icon}),t.label]},e))]}),(0,r.jsx)(N.default,{onClick:()=>F(null),disabled:k,className:"ml-auto",children:k?"Comparing…":"Run Comparison"})]}),C&&(0,r.jsx)("div",{className:"mt-4 rounded-lg border border-danger/20 bg-danger/5 px-3 py-2 text-sm text-danger",children:C}),g&&!k&&(0,r.jsx)(R,{result:g,expanded:P,onToggle:z,ran:D.current})]})}function R({result:e,expanded:t,onToggle:s,ran:a}){let l=e.strategies||[];if(0===l.length)return null;let i=l.some(e=>e.reason?.startsWith("research")),c=e.reality||null,p=e.atRiskModels||[],b=Object.entries(e.reliability||{});return(0,r.jsxs)("div",{className:"mt-6 flex flex-col gap-4",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1 rounded-lg border border-border-subtle bg-surface-2/50 px-3 py-2 text-xs text-text-muted",children:[(0,r.jsxs)("span",{className:"max-w-[420px] truncate font-mono text-text-main",children:["“",a?.prompt||e.request?.prompt||"","”"]}),e.comboName&&(0,r.jsxs)("span",{children:["combo: ",(0,r.jsx)("span",{className:"font-mono text-text-main",children:e.comboName})]}),(0,r.jsxs)("span",{children:[e.memberCount," members"]}),(0,r.jsx)("span",{children:e.request?.hadTools?"tools: yes":"tools: no"}),(0,r.jsxs)("span",{children:[e.assumptions?.inputTokens," tok/call"]}),e.originalReason&&(0,r.jsxs)("span",{children:["original: ",(0,r.jsx)(n.default,{variant:d[e.originalReason]?.variant||"default",size:"sm",children:d[e.originalReason]?.label||e.originalReason})]})]}),(0,r.jsx)("div",{className:"overflow-x-auto rounded-lg border border-border-subtle",children:(0,r.jsxs)("table",{className:"w-full min-w-[720px]",children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{className:"border-b border-border-subtle bg-surface-2/40",children:[(0,r.jsx)("th",{className:"p-3 text-left text-sm font-semibold text-text-main",children:"Metric"}),l.map(e=>{let t=y[e.strategy]||{};return(0,r.jsx)("th",{className:"p-3 text-left",children:(0,r.jsxs)("div",{className:"flex items-center gap-1.5 text-sm font-semibold text-text-main",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px] text-text-subtle",children:t.icon}),t.label]})},e.strategy)})]})}),(0,r.jsxs)("tbody",{className:"align-top",children:[(0,r.jsxs)("tr",{className:"border-b border-border-subtle",children:[(0,r.jsx)("td",{className:"p-3 text-sm font-medium text-text-muted",children:"First to answer"}),l.map(e=>(0,r.jsx)("td",{className:"p-3",children:(0,r.jsxs)("div",{className:"flex flex-col items-start gap-1.5",children:[(0,r.jsx)(h,{model:e.primaryModel||"—",index:1,risk:p.includes(e.primaryModel)}),"smart-routing"===e.strategy&&e.reason&&(0,r.jsx)(n.default,{variant:d[e.reason]?.variant||"default",size:"sm",children:d[e.reason]?.label||e.reason})]})},e.strategy))]}),c&&(0,r.jsxs)("tr",{className:"border-b border-border-subtle",children:[(0,r.jsx)("td",{className:"p-3 text-sm font-medium text-text-muted",children:"Predicted vs reality"}),l.map(e=>{let t=c.strategies?.find(t=>t.strategy===e.strategy);return(0,r.jsx)("td",{className:"p-3",children:(0,r.jsxs)("div",{className:"flex flex-col items-start gap-1",children:[(0,r.jsx)(_,{entry:t}),t?.match==="different"&&c.servedModel&&(0,r.jsxs)("span",{className:"font-mono text-xs text-text-muted",children:["→ served ",c.servedModel]}),t?.match==="failed"&&(0,r.jsx)("span",{className:"text-xs text-text-muted",children:"nothing answered on the real run"})]})},e.strategy)})]}),(0,r.jsxs)("tr",{className:"border-b border-border-subtle",children:[(0,r.jsx)("td",{className:"p-3 text-sm font-medium text-text-muted",children:"Logical calls"}),l.map(e=>(0,r.jsx)("td",{className:"p-3 font-mono text-sm text-text-main",children:S(e.calls)},e.strategy))]}),(0,r.jsxs)("tr",{className:"border-b border-border-subtle",children:[(0,r.jsx)("td",{className:"p-3 text-sm font-medium text-text-muted",children:"Est. cost / request"}),l.map(e=>(0,r.jsxs)("td",{className:"p-3 font-mono text-sm text-text-main",children:[(0,r.jsx)("span",{className:"text-text-muted",children:k(e.cost?.optimistic)})," – ",(0,r.jsx)("span",{children:k(e.cost?.worst)})]},e.strategy))]}),(0,r.jsxs)("tr",{className:"border-b border-border-subtle",children:[(0,r.jsx)("td",{className:"p-3 text-sm font-medium text-text-muted",children:"Per call"}),l.map(e=>(0,r.jsx)("td",{className:"p-3 font-mono text-sm text-text-muted",children:k(e.cost?.perCall)},e.strategy))]}),(0,r.jsxs)("tr",{className:"border-b border-border-subtle",children:[(0,r.jsx)("td",{className:"p-3 text-sm font-medium text-text-muted",children:"Pool tried"}),l.map(e=>(0,r.jsxs)("td",{className:"p-3 text-sm text-text-muted",children:[e.order.length," model",1===e.order.length?"":"s",e.excludedCookies?.length>0&&(0,r.jsxs)("span",{className:"text-danger",children:[" \xb7 ",e.excludedCookies.length," cookie",1===e.excludedCookies.length?"":"s"," excluded"]}),"swarm"===e.strategy&&Object.keys(e.roleModels||{}).length>0&&(0,r.jsxs)("span",{className:"text-text-subtle",children:[" \xb7 +",Object.keys(e.roleModels).length," role call",1===Object.keys(e.roleModels).length?"":"s"]})]},e.strategy))]})]})]})}),c&&c.status&&(0,r.jsxs)("div",{className:(0,o.cn)("flex flex-wrap items-center gap-x-4 gap-y-1 rounded-lg border px-3 py-2 text-xs","error"===c.status?"border-danger/20 bg-danger/5 text-danger":"border-border-subtle bg-surface-2/50 text-text-muted"),children:[(0,r.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[15px]",children:"fact_check"}),(0,r.jsx)("span",{className:"font-semibold text-text-main",children:"Reality"})]}),(0,r.jsx)(n.default,{variant:x(c.status),size:"sm",children:m(c.status)}),c.originalReason&&(0,r.jsxs)("span",{children:["original:"," ",(0,r.jsx)(n.default,{variant:d[c.originalReason]?.variant||"default",size:"sm",children:d[c.originalReason]?.label||c.originalReason})]}),c.servedModel?(0,r.jsxs)("span",{children:["served: ",(0,r.jsx)("span",{className:"font-mono text-text-main",children:c.servedModel})]}):"error"===c.status?(0,r.jsx)("span",{children:"no model answered — chain failed"}):(0,r.jsx)("span",{children:"no served model recorded"}),null!=c.totalDurationMs&&(0,r.jsx)("span",{className:"font-mono",children:u(c.totalDurationMs)}),c.fellThrough&&(0,r.jsx)("span",{className:"text-warning",children:"predicted head failed → chain fell through"}),"error"===c.status&&c.error&&(0,r.jsx)("span",{className:"max-w-[420px] truncate",children:c.error})]}),e.pool&&(e.pool.cookie.length>0||i)&&(0,r.jsxs)("p",{className:"text-xs text-text-muted",children:["Cookie providers in pool:"," ",(0,r.jsx)("span",{className:"font-mono text-text-subtle",children:e.pool.cookie.length>0?e.pool.cookie.join(", "):"none"})," \xb7 ","normal: ",(0,r.jsx)("span",{className:"font-mono text-text-subtle",children:e.pool.normal.map(e=>e.split("/")[0]).join(", ")||"none"})]}),b.length>0&&(0,r.jsxs)("div",{className:"flex flex-col gap-1.5 rounded-lg border border-border-subtle bg-surface-2/40 px-3 py-2",children:[(0,r.jsxs)("div",{className:"flex items-center gap-1.5 text-xs font-medium text-text-muted",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"monitor_heart"}),"Production reliability (30d)"]}),(0,r.jsx)("div",{className:"flex flex-wrap gap-x-5 gap-y-1",children:b.map(([e,t])=>{var s;let a=p.includes(e);return(0,r.jsxs)("span",{className:(0,o.cn)("flex items-center gap-1 font-mono text-xs",a?"text-danger":"text-text-muted"),children:[(0,r.jsx)("span",{className:"truncate max-w-[180px]",children:e}),(0,r.jsx)("span",{className:"font-medium",children:null!=(s=t.successRate)&&Number.isFinite(s)?`${Math.round(100*s)}%`:"—"}),(0,r.jsxs)("span",{className:"text-text-subtle",children:["(",t.total," req)"]}),a&&(0,r.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"warning"})]},e)})}),p.length>0&&(0,r.jsxs)("p",{className:"text-xs text-danger",children:["⚠ ",p.join(", ")," fail",1===p.length?"s":""," ≥ 50% of requests (30d) — smart-routing pushes these behind healthier members automatically."]})]}),(0,r.jsx)("div",{className:"grid grid-cols-1 gap-3 xl:grid-cols-3",children:l.map(e=>{let a=y[e.strategy]||{},l=t===e.strategy;return(0,r.jsxs)("div",{className:"overflow-hidden rounded-lg border border-border-subtle",children:[(0,r.jsxs)("button",{type:"button",onClick:()=>s(l?null:e.strategy),className:"flex w-full items-center justify-between gap-2 bg-surface-2/40 px-3 py-2.5 text-left",children:[(0,r.jsxs)("span",{className:"flex items-center gap-2 text-sm font-semibold text-text-main",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px] text-text-subtle",children:a.icon}),a.label]}),(0,r.jsx)("span",{className:(0,o.cn)("material-symbols-outlined text-[18px] text-text-subtle transition-transform",l&&"rotate-180"),children:"expand_more"})]}),l&&(0,r.jsx)(P,{s:e,atRisk:p})]},e.strategy)})})]})}function P({s:e,atRisk:t=[]}){let s=y[e.strategy]||{};return(0,r.jsxs)("div",{className:"flex flex-col gap-3 px-3 py-3",children:[(0,r.jsx)("p",{className:"text-xs text-text-muted",children:s.desc}),"smart-routing"===e.strategy&&e.reason&&(0,r.jsxs)("div",{className:"flex flex-col gap-1 rounded-md border border-border-subtle bg-surface-2/50 p-2.5",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)(n.default,{variant:d[e.reason]?.variant||"default",size:"sm",children:d[e.reason]?.label||e.reason}),e.intent&&(0,r.jsx)("span",{className:"text-xs text-text-muted",children:p({...e.intent,source:"heuristic"})})]}),(0,r.jsx)("p",{className:"text-xs text-text-muted",children:d[e.reason]?.desc||""})]}),"swarm"===e.strategy&&Object.keys(e.roleModels||{}).length>0&&(0,r.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,r.jsx)("span",{className:"text-xs font-medium text-text-muted",children:"Roles"}),Object.entries(e.roleModels).map(([e,t])=>(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)(n.default,{variant:"primary",size:"sm",children:e}),(0,r.jsx)(h,{model:t,muted:!0})]},e))]}),(0,r.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,r.jsxs)("span",{className:"text-xs font-medium text-text-muted",children:["Pool order (",e.order.length,")"]}),(0,r.jsx)("div",{className:"flex flex-wrap gap-1.5",children:e.order.map((e,s)=>(0,r.jsx)(h,{model:e,index:s+1,risk:t.includes(e)},`${e}-${s}`))})]}),e.excludedCookies?.length>0&&(0,r.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,r.jsxs)("span",{className:"text-xs font-medium text-danger",children:["Excluded for tool-calling (",e.excludedCookies.length,")"]}),(0,r.jsx)("div",{className:"flex flex-wrap gap-1.5",children:e.excludedCookies.map(e=>(0,r.jsx)(h,{model:e,blocked:!0},e))})]}),(0,r.jsxs)("div",{className:"flex flex-wrap gap-x-5 gap-y-1 border-t border-border-subtle pt-2.5 text-xs text-text-muted",children:[(0,r.jsxs)("span",{children:["Calls: ",(0,r.jsx)("span",{className:"font-mono text-text-main",children:S(e.calls)})]}),(0,r.jsxs)("span",{children:["Per call: ",(0,r.jsx)("span",{className:"font-mono text-text-main",children:k(e.cost?.perCall)})]}),(0,r.jsxs)("span",{children:["Cost: ",(0,r.jsxs)("span",{className:"font-mono text-text-main",children:[k(e.cost?.optimistic),"–",k(e.cost?.worst)]})]})]})]})}var z=s(50378);let D=Object.keys(d),I=["running","done","error"],$={reason:"",comboName:"",status:"",startDate:"",endDate:""};function F({onCompare:e}){let[t,s]=(0,a.useState)([]),[l,n]=(0,a.useState)([]),[i,o]=(0,a.useState)({page:1,pageSize:20,totalItems:0,totalPages:0}),[c,x]=(0,a.useState)($),[m,u]=(0,a.useState)(!1),[p,h]=(0,a.useState)(null),[b,g]=(0,a.useState)(null),f=(0,a.useCallback)(async()=>{u(!0),g(null);try{let e=new URLSearchParams({page:i.page.toString(),pageSize:i.pageSize.toString()});c.reason&&e.append("reason",c.reason),c.comboName&&e.append("comboName",c.comboName),c.status&&e.append("status",c.status),c.startDate&&e.append("startDate",c.startDate),c.endDate&&e.append("endDate",c.endDate);let t=await fetch(`/api/smart-routing/history?${e}`),r=await v(t);s(r.runs||[]),n(r.combos||[]),o(e=>({...e,...r.pagination}))}catch(e){console.error("Failed to fetch smart-routing history:",e),g(e?.message||"Failed to load history")}finally{u(!1)}},[i.page,i.pageSize,c]);(0,a.useEffect)(()=>{f()},[f]);let y=(e,t)=>{x(s=>({...s,[e]:t})),o(e=>({...e,page:1}))},w=Object.values(c).some(Boolean);return(0,r.jsxs)("div",{className:"flex flex-col gap-5",children:[(0,r.jsxs)(j.default,{padding:"md",children:[(0,r.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-5",children:[(0,r.jsxs)("div",{className:"flex min-w-0 flex-col gap-2",children:[(0,r.jsx)("label",{htmlFor:"sr-reason-filter",className:"text-sm font-medium text-text-main",children:"Reason"}),(0,r.jsxs)("select",{id:"sr-reason-filter",value:c.reason,onChange:e=>y("reason",e.target.value),className:"h-9 w-full min-w-0 cursor-pointer rounded-lg border border-border bg-surface-2 px-3 text-sm text-text-main focus:outline-none focus:ring-2 focus:ring-primary/20",children:[(0,r.jsx)("option",{value:"",children:"All Reasons"}),D.map(e=>(0,r.jsx)("option",{value:e,children:d[e].label},e))]})]}),(0,r.jsxs)("div",{className:"flex min-w-0 flex-col gap-2",children:[(0,r.jsx)("label",{htmlFor:"sr-combo-filter",className:"text-sm font-medium text-text-main",children:"Combo"}),(0,r.jsxs)("select",{id:"sr-combo-filter",value:c.comboName,onChange:e=>y("comboName",e.target.value),className:"h-9 w-full min-w-0 cursor-pointer rounded-lg border border-border bg-surface-2 px-3 text-sm text-text-main focus:outline-none focus:ring-2 focus:ring-primary/20",children:[(0,r.jsx)("option",{value:"",children:"All Combos"}),l.map(e=>(0,r.jsx)("option",{value:e,children:e},e))]})]}),(0,r.jsxs)("div",{className:"flex min-w-0 flex-col gap-2",children:[(0,r.jsx)("label",{htmlFor:"sr-status-filter",className:"text-sm font-medium text-text-main",children:"Status"}),(0,r.jsxs)("select",{id:"sr-status-filter",value:c.status,onChange:e=>y("status",e.target.value),className:"h-9 w-full min-w-0 cursor-pointer rounded-lg border border-border bg-surface-2 px-3 text-sm text-text-main focus:outline-none focus:ring-2 focus:ring-primary/20",children:[(0,r.jsx)("option",{value:"",children:"All Statuses"}),I.map(e=>(0,r.jsx)("option",{value:e,children:e},e))]})]}),(0,r.jsxs)("div",{className:"flex min-w-0 flex-col gap-2",children:[(0,r.jsx)("label",{htmlFor:"sr-start-filter",className:"text-sm font-medium text-text-main",children:"From"}),(0,r.jsx)("input",{id:"sr-start-filter",type:"datetime-local",value:c.startDate,onChange:e=>y("startDate",e.target.value),className:"h-9 w-full min-w-0 rounded-lg border border-border bg-surface-2 px-3 text-sm text-text-main focus:outline-none focus:ring-2 focus:ring-primary/20",style:{colorScheme:"auto"}})]}),(0,r.jsxs)("div",{className:"flex min-w-0 flex-col gap-2",children:[(0,r.jsx)("label",{htmlFor:"sr-end-filter",className:"text-sm font-medium text-text-main",children:"To"}),(0,r.jsx)("input",{id:"sr-end-filter",type:"datetime-local",value:c.endDate,onChange:e=>y("endDate",e.target.value),className:"h-9 w-full min-w-0 rounded-lg border border-border bg-surface-2 px-3 text-sm text-text-main focus:outline-none focus:ring-2 focus:ring-primary/20",style:{colorScheme:"auto"}})]})]}),(0,r.jsx)("div",{className:"mt-4 flex items-center justify-end",children:(0,r.jsx)(N.default,{variant:"ghost",onClick:()=>{x($),o(e=>({...e,page:1}))},disabled:!w,children:"Clear Filters"})})]}),(0,r.jsxs)(j.default,{padding:"none",children:[b?(0,r.jsx)("div",{className:"p-8 text-center text-sm text-danger",children:b}):(0,r.jsx)("div",{className:"overflow-x-auto",children:(0,r.jsxs)("table",{className:"w-full min-w-[880px]",children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{className:"border-b border-border-subtle",children:[(0,r.jsx)("th",{className:"p-4 text-left text-sm font-semibold text-text-main",children:"Time"}),(0,r.jsx)("th",{className:"p-4 text-left text-sm font-semibold text-text-main",children:"Combo"}),(0,r.jsx)("th",{className:"p-4 text-left text-sm font-semibold text-text-main",children:"Reason"}),(0,r.jsx)("th",{className:"p-4 text-left text-sm font-semibold text-text-main",children:"Pool"}),(0,r.jsx)("th",{className:"p-4 text-left text-sm font-semibold text-text-main",children:"Served"}),(0,r.jsx)("th",{className:"p-4 text-left text-sm font-semibold text-text-main",children:"Status"}),(0,r.jsx)("th",{className:"p-4 text-right text-sm font-semibold text-text-main",children:"Duration"}),(0,r.jsx)("th",{className:"p-4 text-right text-sm font-semibold text-text-main",children:"Compare"})]})}),(0,r.jsx)("tbody",{children:m?(0,r.jsx)("tr",{children:(0,r.jsx)("td",{colSpan:"8",className:"p-8 text-center text-text-muted",children:(0,r.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined animate-spin text-[20px]",children:"progress_activity"}),"Loading…"]})})}):0===t.length?(0,r.jsx)("tr",{children:(0,r.jsxs)("td",{colSpan:"8",className:"p-8 text-center text-text-muted",children:["No smart-routing history found",w&&" for the selected filters"]})}):t.map(t=>{let s=d[t.routing?.reason]||d.general,a=p===t.runId;return(0,r.jsx)(T,{run:t,meta:s,expanded:a,onToggle:()=>h(a?null:t.runId),onCompare:e},t.runId)})})]})}),!m&&t.length>0&&(0,r.jsx)("div",{className:"border-t border-border-subtle",children:(0,r.jsx)(z.A,{currentPage:i.page,pageSize:i.pageSize,totalItems:i.totalItems,onPageChange:e=>o(t=>({...t,page:e})),onPageSizeChange:e=>o(t=>({...t,pageSize:e,page:1}))})})]})]})}function T({run:e,meta:t,expanded:s,onToggle:a,onCompare:l}){let i=(e.routing?.order||[]).slice(0,3).join(", "),o=(e.routing?.order?.length||0)-3;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("tr",{onClick:a,className:"cursor-pointer border-b border-border-subtle transition-colors last:border-b-0 hover:bg-black/[0.02] dark:hover:bg-white/[0.02]",children:[(0,r.jsx)("td",{className:"whitespace-nowrap p-4 text-sm text-text-muted",children:e.startedAt?new Date(e.startedAt).toLocaleString():"—"}),(0,r.jsx)("td",{className:"max-w-[200px] truncate p-4 font-mono text-sm text-text-main",children:e.comboName||"—"}),(0,r.jsx)("td",{className:"p-4",children:(0,r.jsx)(n.default,{variant:t.variant,size:"sm",children:t.label})}),(0,r.jsx)("td",{className:"max-w-[280px] p-4",children:(0,r.jsxs)("div",{className:"truncate font-mono text-xs text-text-muted",children:[i,o>0&&(0,r.jsxs)("span",{className:"text-text-subtle",children:[" +",o," more"]}),!i&&"—"]})}),(0,r.jsx)("td",{className:"max-w-[200px] truncate p-4 font-mono text-xs text-text-muted",children:e.servedModel||"—"}),(0,r.jsx)("td",{className:"p-4",children:(0,r.jsx)(n.default,{variant:x(e.status),size:"sm",children:m(e.status)})}),(0,r.jsx)("td",{className:"whitespace-nowrap p-4 text-right font-mono text-sm text-text-muted",children:u(e.totalDurationMs)}),(0,r.jsx)("td",{className:"whitespace-nowrap p-4 text-right",children:"function"==typeof l&&(0,r.jsx)("button",{type:"button",title:"A/B compare strategies on this request",onClick:t=>{t.stopPropagation(),l(e)},className:"flex h-8 w-8 items-center justify-center rounded-lg border border-border bg-surface-2 text-text-muted transition-colors hover:border-primary/40 hover:text-primary",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"science"})})})]}),s&&(0,r.jsx)("tr",{className:"border-b border-border-subtle bg-surface-2/40 last:border-b-0",children:(0,r.jsx)("td",{colSpan:"8",className:"p-0",children:(0,r.jsxs)("div",{className:"flex flex-col",children:[e.promptPreview&&(0,r.jsx)("div",{className:"border-b border-border-subtle px-4 py-2",children:(0,r.jsx)("p",{className:"truncate text-xs text-text-muted",children:e.promptPreview})}),(0,r.jsx)(b,{routing:e.routing,servedModel:e.servedModel,pendingLabel:"No routing decision recorded"}),"error"===e.status&&e.error&&(0,r.jsx)("div",{className:"border-t border-danger/20 bg-danger/5 px-4 py-2",children:(0,r.jsx)("p",{className:"text-xs text-danger",children:e.error})})]})})})]})}let A="force-dynamic";function q(){let[e,t]=(0,a.useState)(null);return(0,r.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,r.jsx)(l.default,{title:"Smart Routing",description:"Live routing decisions per request — reason, selected pool & excluded cookies",icon:"alt_route"}),(0,r.jsx)(g,{}),(0,r.jsx)("div",{className:"mt-2 border-t border-border-subtle pt-6",children:(0,r.jsx)(M,{compareRun:e,onRunConsumed:()=>t(null)})}),(0,r.jsxs)("div",{className:"mt-2 border-t border-border-subtle pt-6",children:[(0,r.jsxs)("div",{className:"mb-4 flex items-center gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px] text-text-muted",children:"database"}),(0,r.jsx)("h2",{className:"text-base font-semibold text-text-main",children:"History"}),(0,r.jsx)("span",{className:"text-xs text-text-muted",children:"Persisted across restarts — filter, paginate & A/B compare"})]}),(0,r.jsx)(F,{onCompare:t})]})]})}},31474:(e,t,s)=>{"use strict";function r(...e){return e.filter(Boolean).join(" ").replace(/\s+/g," ").trim()}s.d(t,{cn:()=>r})},50378:(e,t,s)=>{"use strict";s.d(t,{A:()=>n});var r=s(95155),a=s(31474),l=s(92542);function n({currentPage:e,pageSize:t,totalItems:s,onPageChange:i,onPageSizeChange:o,className:d}){let c=Math.ceil(s/t),x=s>0?(e-1)*t+1:0,m=Math.min(e*t,s),u=(()=>{let t=[],s=Math.max(1,e-2),r=Math.min(c,s+5-1);r-s+1<5&&(s=Math.max(1,r-5+1));for(let e=s;e<=r;e++)t.push(e);return t})();return(0,r.jsxs)("div",{className:(0,a.cn)("flex flex-col sm:flex-row items-center justify-between gap-4 py-4 px-2",d),children:[s>0&&(0,r.jsxs)("div",{className:"text-sm text-text-muted",children:["Showing ",(0,r.jsx)("span",{className:"font-medium text-text-main",children:x})," to"," ",(0,r.jsx)("span",{className:"font-medium text-text-main",children:m})," of"," ",(0,r.jsx)("span",{className:"font-medium text-text-main",children:s})," results"]}),(0,r.jsxs)("div",{className:"flex flex-wrap items-center justify-center gap-2 sm:gap-4",children:[o&&(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("span",{className:"text-sm text-text-muted",children:"Rows:"}),(0,r.jsx)("select",{value:t,onChange:e=>o(Number(e.target.value)),className:(0,a.cn)("h-9 rounded-lg border border-black/10 dark:border-white/10 bg-surface","text-sm text-text-main focus:outline-none focus:ring-2 focus:ring-primary/20","cursor-pointer"),style:{colorScheme:"auto"},children:[10,20,50].map(e=>(0,r.jsx)("option",{value:e,children:e},e))})]}),c>1&&(0,r.jsxs)("div",{className:"flex items-center gap-1",children:[(0,r.jsx)(l.default,{variant:"outline",size:"sm",onClick:()=>i(e-1),disabled:1===e,className:"w-9 px-0",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"chevron_left"})}),u[0]>1&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.default,{variant:"ghost",size:"sm",onClick:()=>i(1),className:"w-9 px-0 hidden sm:inline-flex",children:"1"}),u[0]>2&&(0,r.jsx)("span",{className:"text-text-muted px-1 hidden sm:inline",children:"..."})]}),u.map(t=>(0,r.jsx)(l.default,{variant:e===t?"primary":"ghost",size:"sm",onClick:()=>i(t),className:(0,a.cn)("w-9 px-0",e===t?"inline-flex":"hidden sm:inline-flex"),children:t},t)),u[u.length-1]<c&&(0,r.jsxs)(r.Fragment,{children:[u[u.length-1]<c-1&&(0,r.jsx)("span",{className:"text-text-muted px-1 hidden sm:inline",children:"..."}),(0,r.jsx)(l.default,{variant:"ghost",size:"sm",onClick:()=>i(c),className:"w-9 px-0 hidden sm:inline-flex",children:c})]}),(0,r.jsx)(l.default,{variant:"outline",size:"sm",onClick:()=>i(e+1),disabled:e===c,className:"w-9 px-0",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"chevron_right"})})]})]})]})}},54960:(e,t,s)=>{"use strict";s.d(t,{default:()=>l});var r=s(95155),a=s(31474);function l({title:e,description:t,icon:s,iconNode:n,actions:i,breadcrumbs:o,className:d}){return(0,r.jsxs)("div",{className:(0,a.cn)("mb-6",d),children:[o?.length>0&&(0,r.jsx)("nav",{className:"mb-2 flex items-center gap-1.5 text-xs text-text-muted",children:o.map((e,t)=>(0,r.jsxs)("span",{className:"flex items-center gap-1.5",children:[t>0&&(0,r.jsx)("span",{className:"material-symbols-outlined text-[12px] opacity-60",children:"chevron_right"}),e.href?(0,r.jsx)("a",{href:e.href,className:"transition-colors hover:text-primary",children:e.label}):(0,r.jsx)("span",{className:"font-medium text-text-main",children:e.label})]},t))}),(0,r.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,r.jsxs)("div",{className:"flex min-w-0 items-start gap-3",children:[n?(0,r.jsx)("div",{className:"mt-0.5 shrink-0",children:n}):s&&(0,r.jsx)("div",{className:"mt-0.5 flex size-9 shrink-0 items-center justify-center rounded-brand bg-primary/10 text-primary ring-1 ring-primary/15",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:s})}),(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("h1",{className:"truncate text-xl font-semibold tracking-tight text-text-main",children:e}),t&&(0,r.jsx)("p",{className:"mt-0.5 text-sm text-text-muted",children:t})]})]}),i&&(0,r.jsx)("div",{className:"flex shrink-0 items-center gap-2",children:i})]})]})}},56061:(e,t,s)=>{"use strict";s.d(t,{default:()=>o});var r=s(95155),a=s(31474);let l={default:"bg-surface-2 text-text-muted ring-1 ring-border-subtle",primary:"bg-primary/12 text-primary ring-1 ring-primary/20",success:"bg-success/12 text-success ring-1 ring-success/20",warning:"bg-warning/12 text-warning ring-1 ring-warning/20",error:"bg-danger/12 text-danger ring-1 ring-danger/20",info:"bg-info/12 text-info ring-1 ring-info/20",cyan:"bg-cyan/12 text-cyan ring-1 ring-cyan/20"},n={default:"bg-text-subtle",primary:"bg-primary",success:"bg-success",warning:"bg-warning",error:"bg-danger",info:"bg-info",cyan:"bg-cyan"},i={sm:"px-2 py-0.5 text-xs",md:"px-2.5 py-1 text-xs",lg:"px-3 py-1.5 text-sm"};function o({children:e,variant:t="default",size:s="md",dot:d=!1,icon:c,className:x}){return(0,r.jsxs)("span",{className:(0,a.cn)("inline-flex items-center gap-1.5 rounded-full font-semibold leading-none",l[t],i[s],x),children:[d&&(0,r.jsx)("span",{className:(0,a.cn)("size-1.5 rounded-full",n[t])}),c&&(0,r.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:c}),e]})}},70445:(e,t,s)=>{Promise.resolve().then(s.bind(s,16688))},84588:(e,t,s)=>{"use strict";s.d(t,{default:()=>l});var r=s(95155),a=s(31474);function l({children:e,title:t,subtitle:s,icon:n,action:i,padding:o="md",hover:d=!1,elev:c=!1,className:x,...m}){return(0,r.jsxs)("div",{className:(0,a.cn)("bg-panel border border-border-subtle text-text-main",c?"rounded-panel shadow-[var(--shadow-elev)]":"rounded-panel shadow-[var(--shadow-soft)]",d&&"hover:border-primary/35 hover:bg-panel-elev hover:shadow-[var(--shadow-warm)] transition-all cursor-pointer",{none:"",xs:"p-3",sm:"p-4",md:"p-5",lg:"p-6"}[o],x),...m,children:[(t||i)&&(0,r.jsxs)("div",{className:"mb-4 flex items-center justify-between gap-3",children:[(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[n&&(0,r.jsx)("div",{className:"flex size-9 items-center justify-center rounded-brand bg-primary/10 text-primary ring-1 ring-primary/15",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:n})}),(0,r.jsxs)("div",{className:"min-w-0",children:[t&&(0,r.jsx)("h3",{className:"truncate text-sm font-semibold tracking-tight text-text-main",children:t}),s&&(0,r.jsx)("p",{className:"mt-0.5 truncate text-xs text-text-muted",children:s})]})]}),i]}),e]})}l.Section=function({children:e,className:t,...s}){return(0,r.jsx)("div",{className:(0,a.cn)("rounded-brand border border-border-subtle bg-surface-2 p-4",t),...s,children:e})},l.Row=function({children:e,className:t,...s}){return(0,r.jsx)("div",{className:(0,a.cn)("-mx-3 border-b border-border-subtle px-3 py-3 transition-colors last:border-b-0","hover:bg-surface-2/70",t),...s,children:e})},l.ListItem=function({children:e,actions:t,className:s,...l}){return(0,r.jsxs)("div",{className:(0,a.cn)("group -mx-3 flex items-center justify-between border-b border-border-subtle px-3 py-3 transition-colors last:border-b-0","hover:bg-surface-2/70",s),...l,children:[(0,r.jsx)("div",{className:"min-w-0 flex-1",children:e}),t&&(0,r.jsx)("div",{className:"flex items-center gap-1 opacity-0 transition-opacity group-hover:opacity-100",children:t})]})}},92542:(e,t,s)=>{"use strict";s.d(t,{default:()=>i});var r=s(95155),a=s(31474);let l={primary:"bg-primary hover:bg-primary-hover text-white shadow-[0_0_0_1px_rgba(255,255,255,0.08)_inset,0_10px_30px_-18px_rgba(139,92,246,0.75)] disabled:bg-surface-3 disabled:text-text-muted",secondary:"bg-surface-2 hover:bg-surface-3 text-text-main border border-border disabled:opacity-50",outline:"border border-border text-text-main hover:bg-surface-2 hover:border-primary/45",ghost:"text-text-muted hover:bg-surface-2 hover:text-text-main",danger:"bg-danger hover:brightness-110 text-white shadow-sm disabled:bg-surface-3 disabled:text-text-muted",success:"bg-success hover:brightness-110 text-white shadow-sm disabled:bg-surface-3 disabled:text-text-muted"},n={sm:"h-7 px-3 text-xs rounded-brand",md:"h-9 px-4 text-sm rounded-brand",lg:"h-10 px-5 text-sm rounded-brand"};function i({children:e,variant:t="primary",size:s="md",icon:o,iconRight:d,disabled:c=!1,loading:x=!1,fullWidth:m=!1,className:u,...p}){return(0,r.jsxs)("button",{className:(0,a.cn)("inline-flex items-center justify-center gap-2 font-semibold transition-all duration-150 ease-out cursor-pointer","active:scale-[0.98] disabled:opacity-50 disabled:cursor-not-allowed disabled:active:scale-100","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/35 focus-visible:ring-offset-2 focus-visible:ring-offset-bg",l[t],n[s],m&&"w-full",u),disabled:c||x,...p,children:[x?(0,r.jsx)("span",{className:"material-symbols-outlined animate-spin text-[16px]",children:"progress_activity"}):o?(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:o}):null,e,d&&!x&&(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:d})]})}},99312:(e,t,s)=>{"use strict";s.d(t,{default:()=>n});var r=s(95155),a=s(31474),l=s(92542);function n({icon:e="inbox",title:t="No items found",description:s="There's nothing here yet.",action:i,actionText:o,onAction:d,className:c}){return(0,r.jsxs)("div",{className:(0,a.cn)("flex flex-col items-center justify-center rounded-panel border border-dashed border-border p-12 text-center",c),children:[(0,r.jsx)("div",{className:"mb-4 flex size-12 items-center justify-center rounded-full bg-surface-2 text-text-muted ring-1 ring-border-subtle",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[24px]",children:e})}),(0,r.jsx)("h3",{className:"mb-1.5 text-sm font-semibold text-text-main",children:t}),(0,r.jsx)("p",{className:"mb-6 max-w-sm text-xs text-text-muted",children:s}),i||o&&d&&(0,r.jsx)(l.default,{variant:"outline",size:"sm",onClick:d,children:o})]})}}},e=>{e.O(0,[8441,3794,7358],()=>e(e.s=70445)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3054],{31474:(e,t,s)=>{"use strict";function r(...e){return e.filter(Boolean).join(" ").replace(/\s+/g," ").trim()}s.d(t,{cn:()=>r})},42616:(e,t,s)=>{Promise.resolve().then(s.bind(s,54960)),Promise.resolve().then(s.bind(s,79765))},54960:(e,t,s)=>{"use strict";s.d(t,{default:()=>n});var r=s(95155),a=s(31474);function n({title:e,description:t,icon:s,iconNode:i,actions:l,breadcrumbs:d,className:o}){return(0,r.jsxs)("div",{className:(0,a.cn)("mb-6",o),children:[d?.length>0&&(0,r.jsx)("nav",{className:"mb-2 flex items-center gap-1.5 text-xs text-text-muted",children:d.map((e,t)=>(0,r.jsxs)("span",{className:"flex items-center gap-1.5",children:[t>0&&(0,r.jsx)("span",{className:"material-symbols-outlined text-[12px] opacity-60",children:"chevron_right"}),e.href?(0,r.jsx)("a",{href:e.href,className:"transition-colors hover:text-primary",children:e.label}):(0,r.jsx)("span",{className:"font-medium text-text-main",children:e.label})]},t))}),(0,r.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,r.jsxs)("div",{className:"flex min-w-0 items-start gap-3",children:[i?(0,r.jsx)("div",{className:"mt-0.5 shrink-0",children:i}):s&&(0,r.jsx)("div",{className:"mt-0.5 flex size-9 shrink-0 items-center justify-center rounded-brand bg-primary/10 text-primary ring-1 ring-primary/15",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:s})}),(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("h1",{className:"truncate text-xl font-semibold tracking-tight text-text-main",children:e}),t&&(0,r.jsx)("p",{className:"mt-0.5 text-sm text-text-muted",children:t})]})]}),l&&(0,r.jsx)("div",{className:"flex shrink-0 items-center gap-2",children:l})]})]})}},56061:(e,t,s)=>{"use strict";s.d(t,{default:()=>d});var r=s(95155),a=s(31474);let n={default:"bg-surface-2 text-text-muted ring-1 ring-border-subtle",primary:"bg-primary/12 text-primary ring-1 ring-primary/20",success:"bg-success/12 text-success ring-1 ring-success/20",warning:"bg-warning/12 text-warning ring-1 ring-warning/20",error:"bg-danger/12 text-danger ring-1 ring-danger/20",info:"bg-info/12 text-info ring-1 ring-info/20",cyan:"bg-cyan/12 text-cyan ring-1 ring-cyan/20"},i={default:"bg-text-subtle",primary:"bg-primary",success:"bg-success",warning:"bg-warning",error:"bg-danger",info:"bg-info",cyan:"bg-cyan"},l={sm:"px-2 py-0.5 text-xs",md:"px-2.5 py-1 text-xs",lg:"px-3 py-1.5 text-sm"};function d({children:e,variant:t="default",size:s="md",dot:o=!1,icon:c,className:u}){return(0,r.jsxs)("span",{className:(0,a.cn)("inline-flex items-center gap-1.5 rounded-full font-semibold leading-none",n[t],l[s],u),children:[o&&(0,r.jsx)("span",{className:(0,a.cn)("size-1.5 rounded-full",i[t])}),c&&(0,r.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:c}),e]})}},79765:(e,t,s)=>{"use strict";s.d(t,{default:()=>m});var r=s(95155),a=s(12115),n=s(56061),i=s(99312),l=s(31474);let d={gatekeeper:{label:"Gatekeeper",icon:"fork_right",desc:"Classifies request complexity"},manager:{label:"Manager",icon:"psychology",desc:"Decomposes into subtasks"},workers:{label:"Workers",icon:"group_work",desc:"Parallel specialist execution"},audit:{label:"Staff Audit",icon:"fact_check",desc:"Reviews worker outputs"},synthesis:{label:"Synthesis",icon:"auto_awesome",desc:"Final cohesive answer"}},o=["gatekeeper","manager","workers","audit","synthesis"];function c(e){return"done"===e?"success":"running"===e?"info":"error"===e?"error":"default"}function u(e){return"done"===e?"Done":"running"===e?"Running":"error"===e?"Error":"Pending"}function x(e){return e||0===e?e<1e3?`${e}ms`:`${(e/1e3).toFixed(1)}s`:"—"}function m(){let[e,t]=(0,a.useState)([]),[s,d]=(0,a.useState)(!1),[,o]=(0,a.useState)(0),c=(0,a.useRef)(null);(0,a.useEffect)(()=>{let e=new EventSource("/api/swarm/stream");return c.current=e,e.onopen=()=>d(!0),e.onerror=()=>d(!1),e.onmessage=e=>{try{let s=JSON.parse(e.data);t(e=>"snapshot"===s.type&&Array.isArray(s.runs)?s.runs:s.runId?"swarm:start"===s.type?[{runId:s.runId,comboName:s.comboName,promptPreview:s.promptPreview,workerCount:s.workerCount,status:"running",startedAt:Date.now(),totalDurationMs:null,stages:{gatekeeper:{status:"pending"},manager:{status:"pending"},workers:{status:"pending",workers:[]},audit:{status:"pending"},synthesis:{status:"pending"}}},...e].slice(0,50):e.map(e=>{if(e.runId!==s.runId)return e;let t={...e,stages:{...e.stages}};if("swarm:stage"===s.type)if("workers"===s.stage&&void 0!==s.worker){let e=[...t.stages.workers?.workers||[]];for(;e.length<=s.worker;)e.push({index:e.length,status:"pending",model:null});e[s.worker]={...e[s.worker],status:s.status,model:s.model??e[s.worker].model,durationMs:s.durationMs??e[s.worker].durationMs},t.stages.workers={...t.stages.workers,workers:e}}else s.stage&&(t.stages[s.stage]={...t.stages[s.stage],status:s.status,durationMs:s.durationMs??t.stages[s.stage]?.durationMs,model:s.model??t.stages[s.stage]?.model,verdict:s.verdict??t.stages[s.stage]?.verdict,strategy:s.strategy??t.stages[s.stage]?.strategy,skipped:s.skipped??t.stages[s.stage]?.skipped});else"swarm:complete"===s.type?(t.status="done",t.totalDurationMs=s.totalDurationMs,"number"==typeof s.workerCount&&(t.workerCount=s.workerCount)):"swarm:error"===s.type&&(t.status="error",t.error=s.error,t.totalDurationMs=s.totalDurationMs);return t}):e)}catch{}},()=>{e.close(),c.current=null}},[]),(0,a.useEffect)(()=>{let e=setInterval(()=>o(e=>e+1),3e4);return()=>clearInterval(e)},[]);let u=e.filter(e=>"running"===e.status),x=e.filter(e=>"running"!==e.status);return(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",{className:"flex items-center gap-2 text-sm text-text-muted",children:[(0,r.jsx)("span",{className:(0,l.cn)("size-2 rounded-full",s?"bg-success animate-pulse":"bg-danger")}),s?"Live":"Reconnecting…"]}),u.length>0&&(0,r.jsxs)(n.default,{variant:"info",dot:!0,children:[u.length," active run",u.length>1?"s":""]})]}),0===e.length?(0,r.jsx)(i.default,{icon:"hub",title:"No swarm runs yet",description:"Hierarchical Swarm runs will appear here in real time. Send a request to a combo with the 'Hierarchical Swarm' strategy to see the pipeline in action."}):(0,r.jsxs)(r.Fragment,{children:[u.length>0&&(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsx)("h3",{className:"text-xs font-semibold uppercase tracking-wide text-text-muted",children:"Active"}),u.map(e=>(0,r.jsx)(g,{run:e,expanded:!0},e.runId))]}),x.length>0&&(0,r.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,r.jsx)("h3",{className:"text-xs font-semibold uppercase tracking-wide text-text-muted",children:"Recent"}),x.slice(0,10).map(e=>(0,r.jsx)(g,{run:e},e.runId))]})]})]})}function g({run:e,expanded:t=!1}){let s=o.map(t=>[t,e.stages?.[t]]);return(0,r.jsxs)("div",{className:(0,l.cn)("rounded-panel border bg-panel shadow-[var(--shadow-soft)]","error"===e.status?"border-danger/30":"border-border-subtle"),children:[(0,r.jsxs)("div",{className:"flex items-center justify-between gap-3 border-b border-border-subtle px-4 py-3",children:[(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,r.jsx)(n.default,{variant:c(e.status),dot:!0,size:"sm",children:u(e.status)}),(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("div",{className:"truncate font-mono text-sm font-medium text-text-main",children:e.comboName||"swarm"}),(0,r.jsx)("div",{className:"truncate text-xs text-text-muted",children:function(e){if(!e)return"—";let t=Date.now()-e;return t<5e3?"just now":t<6e4?`${Math.floor(t/1e3)}s ago`:t<36e5?`${Math.floor(t/6e4)}m ago`:new Date(e).toLocaleTimeString()}(e.startedAt)})]})]}),(0,r.jsxs)("div",{className:"flex shrink-0 items-center gap-3 text-xs text-text-muted",children:[e.totalDurationMs&&(0,r.jsx)("span",{className:"font-mono",children:x(e.totalDurationMs)}),null!=e.workerCount&&e.workerCount>0&&(0,r.jsxs)("span",{className:"flex items-center gap-1",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"group_work"}),e.workerCount]})]})]}),e.promptPreview&&(0,r.jsx)("div",{className:"border-b border-border-subtle px-4 py-2",children:(0,r.jsx)("p",{className:"truncate text-xs text-text-muted",children:e.promptPreview})}),(0,r.jsx)("div",{className:"grid grid-cols-2 gap-px bg-border-subtle sm:grid-cols-5",children:s.map(([e,t])=>{let s=d[e];c(t?.status);let a=t?.status==="running";return(0,r.jsxs)("div",{className:(0,l.cn)("bg-panel p-3 transition-colors",a&&"bg-primary/5"),children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("span",{className:(0,l.cn)("material-symbols-outlined text-[16px]",t?.status==="done"&&"text-success",t?.status==="running"&&"text-info",t?.status==="error"&&"text-danger",(!t?.status||t?.status==="pending")&&"text-text-subtle"),children:a?"progress_activity":s.icon}),(0,r.jsx)("span",{className:"text-xs font-semibold text-text-main",children:s.label})]}),(0,r.jsxs)("div",{className:"mt-1.5 flex items-center gap-1.5",children:[(0,r.jsx)("span",{className:(0,l.cn)("size-1.5 rounded-full",t?.status==="done"&&"bg-success",t?.status==="running"&&"bg-info animate-pulse",t?.status==="error"&&"bg-danger",(!t?.status||t?.status==="pending")&&"bg-text-subtle")}),(0,r.jsx)("span",{className:"text-[11px] text-text-muted",children:t?.skipped?"Skipped":t?.durationMs?x(t.durationMs):u(t?.status)})]}),t?.verdict&&(0,r.jsx)("div",{className:"mt-1 text-[10px] uppercase tracking-wide text-text-subtle",children:t.verdict})]},e)})}),t&&e.stages?.workers?.workers?.length>0&&(0,r.jsxs)("div",{className:"border-t border-border-subtle px-4 py-3",children:[(0,r.jsx)("div",{className:"mb-2 text-[11px] font-semibold uppercase tracking-wide text-text-muted",children:"Workers"}),(0,r.jsx)("div",{className:"flex flex-wrap gap-2",children:e.stages.workers.workers.map((e,t)=>(0,r.jsxs)("div",{className:(0,l.cn)("flex items-center gap-2 rounded-md border px-2.5 py-1.5 text-xs","done"===e.status?"border-success/30 bg-success/5":"running"===e.status?"border-info/30 bg-info/5":"error"===e.status?"border-danger/30 bg-danger/5":"border-border-subtle bg-surface-2"),children:[(0,r.jsxs)("span",{className:"font-mono text-text-subtle",children:["#",t+1]}),(0,r.jsx)("span",{className:"truncate max-w-[160px] text-text-muted",children:e.model||"—"}),(0,r.jsx)("span",{className:(0,l.cn)("size-1.5 rounded-full","done"===e.status&&"bg-success","running"===e.status&&"bg-info animate-pulse","error"===e.status&&"bg-danger",(!e.status||"pending"===e.status)&&"bg-text-subtle")}),e.durationMs&&(0,r.jsx)("span",{className:"font-mono text-text-subtle",children:x(e.durationMs)})]},t))})]}),"error"===e.status&&e.error&&(0,r.jsx)("div",{className:"border-t border-danger/20 bg-danger/5 px-4 py-2",children:(0,r.jsx)("p",{className:"text-xs text-danger",children:e.error})})]})}},92542:(e,t,s)=>{"use strict";s.d(t,{default:()=>l});var r=s(95155),a=s(31474);let n={primary:"bg-primary hover:bg-primary-hover text-white shadow-[0_0_0_1px_rgba(255,255,255,0.08)_inset,0_10px_30px_-18px_rgba(139,92,246,0.75)] disabled:bg-surface-3 disabled:text-text-muted",secondary:"bg-surface-2 hover:bg-surface-3 text-text-main border border-border disabled:opacity-50",outline:"border border-border text-text-main hover:bg-surface-2 hover:border-primary/45",ghost:"text-text-muted hover:bg-surface-2 hover:text-text-main",danger:"bg-danger hover:brightness-110 text-white shadow-sm disabled:bg-surface-3 disabled:text-text-muted",success:"bg-success hover:brightness-110 text-white shadow-sm disabled:bg-surface-3 disabled:text-text-muted"},i={sm:"h-7 px-3 text-xs rounded-brand",md:"h-9 px-4 text-sm rounded-brand",lg:"h-10 px-5 text-sm rounded-brand"};function l({children:e,variant:t="primary",size:s="md",icon:d,iconRight:o,disabled:c=!1,loading:u=!1,fullWidth:x=!1,className:m,...g}){return(0,r.jsxs)("button",{className:(0,a.cn)("inline-flex items-center justify-center gap-2 font-semibold transition-all duration-150 ease-out cursor-pointer","active:scale-[0.98] disabled:opacity-50 disabled:cursor-not-allowed disabled:active:scale-100","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/35 focus-visible:ring-offset-2 focus-visible:ring-offset-bg",n[t],i[s],x&&"w-full",m),disabled:c||u,...g,children:[u?(0,r.jsx)("span",{className:"material-symbols-outlined animate-spin text-[16px]",children:"progress_activity"}):d?(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:d}):null,e,o&&!u&&(0,r.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:o})]})}},99312:(e,t,s)=>{"use strict";s.d(t,{default:()=>i});var r=s(95155),a=s(31474),n=s(92542);function i({icon:e="inbox",title:t="No items found",description:s="There's nothing here yet.",action:l,actionText:d,onAction:o,className:c}){return(0,r.jsxs)("div",{className:(0,a.cn)("flex flex-col items-center justify-center rounded-panel border border-dashed border-border p-12 text-center",c),children:[(0,r.jsx)("div",{className:"mb-4 flex size-12 items-center justify-center rounded-full bg-surface-2 text-text-muted ring-1 ring-border-subtle",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[24px]",children:e})}),(0,r.jsx)("h3",{className:"mb-1.5 text-sm font-semibold text-text-main",children:t}),(0,r.jsx)("p",{className:"mb-6 max-w-sm text-xs text-text-muted",children:s}),l||d&&o&&(0,r.jsx)(n.default,{variant:"outline",size:"sm",onClick:o,children:d})]})}}},e=>{e.O(0,[8441,3794,7358],()=>e(e.s=42616)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9839],{5047:(e,t,s)=>{Promise.resolve().then(s.bind(s,61203))},15536:(e,t,s)=>{"use strict";s.d(t,{Cp:()=>r,Hx:()=>n,Iv:()=>o,Nv:()=>m,RL:()=>d,ev:()=>x,fl:()=>i,hT:()=>a,oX:()=>l,t6:()=>c});let a=["zh-CN","zh-TW"],l=[{icon:"public",title:"Access Anywhere",desc:"Use your API from any network"},{icon:"group",title:"Share Endpoint",desc:"Share URL with team members"},{icon:"code",title:"Use in Cursor/Cline",desc:"Connect AI tools remotely"},{icon:"lock",title:"Encrypted",desc:"End-to-end TLS via Cloudflare"}],n=2e3,r=3e5,i=5e3,c=5,d=1e4,o=5e3,x=[{id:"lite",label:"Lite",desc:"Drop filler, keep grammar"},{id:"full",label:"Full",desc:"Drop articles, fragments OK"},{id:"ultra",label:"Ultra",desc:"Telegraphic, max compression"},{id:"wenyan-lite",label:"文 Lite",desc:"Classical Chinese, light compression",wenyan:!0},{id:"wenyan",label:"文 Full",desc:"Maximum 文言文, 80-90% reduction",wenyan:!0},{id:"wenyan-ultra",label:"文 Ultra",desc:"Extreme classical compression",wenyan:!0}],m=[{id:"lite",label:"Lite",desc:"Build asked, name lazier option"},{id:"full",label:"Full",desc:"Ladder enforced: stdlib/native first"},{id:"ultra",label:"Ultra",desc:"YAGNI extremist, deletion first"}]},61203:(e,t,s)=>{"use strict";s.d(t,{default:()=>d});var a=s(95155),l=s(12115),n=s(35497),r=s(11059),i=s(73006),c=s(15536);function d(){let[e,t]=(0,l.useState)(!0),[s,d]=(0,l.useState)(!1),[o,x]=(0,l.useState)("http://localhost:8787"),[m,h]=(0,l.useState)({installed:!1,running:!1,python:null,loading:!0}),[p,u]=(0,l.useState)(!1),[f,j]=(0,l.useState)(!1),[g,b]=(0,l.useState)(""),[y,v]=(0,l.useState)(!1),[N,w]=(0,l.useState)("full"),[k,C]=(0,l.useState)(!1),[S,E]=(0,l.useState)("full"),[T,L]=(0,l.useState)(!1),[U,P]=(0,l.useState)(.85),[$,R]=(0,l.useState)(null),[z,_]=(0,l.useState)(!1),[H,I]=(0,l.useState)({installed:!1,loaded:!1,version:null,loading:!0}),[M,O]=(0,l.useState)(!1),[A,F]=(0,l.useState)("en"),{copied:D,copy:W}=(0,r.C)();(0,l.useEffect)(()=>(F((0,i.kk)()),(0,i.oQ)(()=>F((0,i.kk)()))),[]);let B=c.hT.includes(A),G=B?c.ev:c.ev.filter(e=>!e.wenyan);(0,l.useEffect)(()=>{let e=c.ev.find(e=>e.id===N);e?.wenyan&&!B&&(w("ultra"),J({cavemanLevel:"ultra"}))},[B,N]);let J=async e=>{try{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}catch(e){console.log("Error updating setting:",e)}},Y=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({rtkEnabled:e})})).ok&&t(e)}catch(e){console.log("Error updating rtkEnabled:",e)}},q=async()=>{let e=o.trim()||"http://localhost:8787";x(e),await J({headroomUrl:e}),Z()},Z=(0,l.useCallback)(async()=>{h(e=>({...e,loading:!0}));try{let e=await fetch("/api/headroom/status",{headers:{"Cache-Control":"no-store"}}),t=await e.json();h({...t,loading:!1})}catch{h({installed:!1,running:!1,python:null,loading:!1})}},[]),K=(0,l.useCallback)(async()=>{b(""),j(!0);try{let e=await fetch("/api/headroom/start",{method:"POST"}),t=await e.json().catch(()=>({}));if(!e.ok)throw Error(t.error||"Failed to start proxy");await Z()}catch(e){b(e.message)}finally{j(!1)}},[Z]),Q=(0,l.useCallback)(async()=>{j(!0);try{await fetch("/api/headroom/stop",{method:"POST"}),await Z()}finally{j(!1)}},[Z]),X=async()=>{I(e=>({...e,loading:!0}));try{let e=await fetch("/api/pxpipe/status",{headers:{"Cache-Control":"no-store"}}),t=await e.json();I({...t,loading:!1})}catch{I({installed:!1,loaded:!1,version:null,loading:!1})}},V=async()=>{O(!0);try{let e=await fetch("/api/pxpipe/install",{method:"POST"});await e.json(),await X()}catch{}O(!1)},ee=async()=>{try{await fetch("/api/cache",{method:"DELETE"}),R(null)}catch{}};(0,l.useEffect)(()=>{(async()=>{try{let e=await fetch("/api/settings");if(e.ok){let s=await e.json();t(!1!==s.rtkEnabled),d(!!s.headroomEnabled),x(s.headroomUrl||"http://localhost:8787"),v(!!s.cavemanEnabled),w(s.cavemanLevel||"full"),C(!!s.ponytailEnabled),E(s.ponytailLevel||"full"),L(!!s.semanticCacheEnabled),P("number"==typeof s.semanticCacheThreshold?s.semanticCacheThreshold:.85),_(!!s.pxpipeEnabled),Z(),X()}}catch{}})()},[Z]);let et=!!m.running,es=m.loading?"Checking…":et?"Running":!1===m.localUrl||m.installed?!1!==m.localUrl?"Stopped":"External":"Not installed",ea=!1!==m.localUrl,el=!!m.canStart,en=ea&&!!m.managedPid;return(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsx)(n.zY,{title:"Token Saver",description:"Compression policies for prompt and tool output",icon:"savings"}),(0,a.jsxs)(n.Zp,{id:"rtk",children:[(0,a.jsx)("div",{className:"flex items-center justify-between mb-2",children:(0,a.jsxs)("h2",{className:"text-lg font-semibold flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary",children:"bolt"}),"Token Saver"]})}),(0,a.jsxs)("div",{className:"flex items-center justify-between pt-2 pb-4 border-b border-border gap-4",children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("p",{className:"font-medium",children:["Compress tool output"," ",(0,a.jsx)("a",{href:"https://github.com/rtk-ai/rtk",target:"_blank",rel:"noreferrer",className:"text-xs font-normal text-primary underline hover:opacity-80",children:"(RTK)"})]}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"git/grep/ls/tree/logs → 60-90% fewer input tokens"})]}),(0,a.jsx)(n.lM,{checked:e,onChange:()=>Y(!e)})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between py-4 border-b border-border gap-4 flex-wrap",children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[(0,a.jsxs)("p",{className:"font-medium",children:["Compress context"," ",(0,a.jsx)("a",{href:"https://github.com/chopratejas/headroom",target:"_blank",rel:"noreferrer",className:"text-xs font-normal text-primary underline hover:opacity-80",children:"(Headroom)"})]}),(0,a.jsx)("span",{className:`text-xs px-2 py-0.5 rounded ${et?"bg-success/15 text-success":"bg-warning/15 text-warning"}`,children:es}),(0,a.jsx)("button",{type:"button",onClick:()=>u(!0),className:"text-xs text-primary underline hover:opacity-80",children:et?"Manage":"Setup"})]}),(0,a.jsx)("p",{className:"text-sm text-text-muted mt-1",children:"Compress prompts via /v1/compress before routing to the model"})]}),(0,a.jsx)(n.lM,{checked:s&&et,disabled:!et,onChange:()=>{var e;let t;return e=!s,void(x(t=o.trim()||"http://localhost:8787"),d(e),J({headroomEnabled:e,headroomUrl:t}))}})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between pt-4 gap-4 flex-wrap",children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("p",{className:"font-medium",children:["Compress LLM output"," ",(0,a.jsx)("a",{href:"https://github.com/JuliusBrussee/caveman",target:"_blank",rel:"noreferrer",className:"text-xs font-normal text-primary underline hover:opacity-80",children:"(Caveman)"})]}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Terse-style system prompt → ~65% fewer output tokens (up to 87%)"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-3 shrink-0",children:[y&&(0,a.jsxs)("div",{className:"flex flex-col items-end gap-1",children:[(0,a.jsx)("div",{className:"flex items-center gap-1.5",children:G.map(e=>(0,a.jsx)("button",{onClick:()=>{var t;w(t=e.id),J({cavemanLevel:t})},className:`px-3 py-1.5 rounded text-xs font-medium border transition-colors ${N===e.id?"bg-primary text-white border-primary":"bg-transparent border-border text-text-muted hover:bg-surface-2"}`,title:e.desc,children:e.label},e.id))}),(0,a.jsx)("p",{className:"text-xs text-primary",children:c.ev.find(e=>e.id===N)?.desc})]}),(0,a.jsx)(n.lM,{checked:y,onChange:()=>{var e;v(e=!y),J({cavemanEnabled:e})}})]})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between pt-4 mt-4 border-t border-border gap-4 flex-wrap",children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("p",{className:"font-medium",children:["Lazy senior dev"," ",(0,a.jsx)("a",{href:"https://github.com/DietrichGebert/ponytail",target:"_blank",rel:"noreferrer",className:"text-xs font-normal text-primary underline hover:opacity-80",children:"(Ponytail)"})]}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Bias the model toward minimal code: YAGNI, reuse stdlib, deletion over addition"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-3 shrink-0",children:[k&&(0,a.jsxs)("div",{className:"flex flex-col items-end gap-1",children:[(0,a.jsx)("div",{className:"flex items-center gap-1.5",children:c.Nv.map(e=>(0,a.jsx)("button",{onClick:()=>{var t;E(t=e.id),J({ponytailLevel:t})},className:`px-3 py-1.5 rounded text-xs font-medium border transition-colors ${S===e.id?"bg-primary text-white border-primary":"bg-transparent border-border text-text-muted hover:bg-surface-2"}`,title:e.desc,children:e.label},e.id))}),(0,a.jsx)("p",{className:"text-xs text-primary",children:c.Nv.find(e=>e.id===S)?.desc})]}),(0,a.jsx)(n.lM,{checked:k,onChange:()=>{var e;C(e=!k),J({ponytailEnabled:e})}})]})]})]}),(0,a.jsxs)(n.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted",children:"cached"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-medium text-text-main",children:"Semantic Cache"}),(0,a.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:"Cache responses by message similarity (Jaccard). Instant hits, $0 cost."})]})]}),(0,a.jsx)(n.lM,{checked:T,onChange:()=>{var e;L(e=!T),J({semanticCacheEnabled:e})}})]}),T&&(0,a.jsxs)("div",{className:"mt-4 flex flex-col gap-3 border-t border-border-subtle pt-3",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted",children:"Similarity Threshold"}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("input",{type:"range",min:.5,max:1,step:.05,value:U,onChange:e=>{var t;P(t=parseFloat(e.target.value)),J({semanticCacheThreshold:t})},className:"w-32 accent-[var(--color-primary)]"}),(0,a.jsxs)("span",{className:"w-10 text-right font-mono text-xs text-text-main",children:[Math.round(100*U),"%"]})]})]}),$&&(0,a.jsxs)("div",{className:"flex flex-wrap gap-3 text-xs text-text-muted",children:[(0,a.jsxs)("span",{children:["Size: ",$.size]}),(0,a.jsx)("span",{children:"\xb7"}),(0,a.jsxs)("span",{children:["Hits: ",$.hits]}),(0,a.jsx)("span",{children:"\xb7"}),(0,a.jsxs)("span",{children:["Near: ",$.nearHits]}),(0,a.jsx)("span",{children:"\xb7"}),(0,a.jsxs)("span",{children:["Misses: ",$.misses]}),(0,a.jsx)("span",{children:"\xb7"}),(0,a.jsxs)("span",{children:["Rate: ",$.hitRate,"%"]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(n.$n,{size:"sm",variant:"secondary",icon:"refresh",onClick:async()=>{try{let e=await fetch("/api/cache");R(await e.json())}catch{}},children:"Refresh Stats"}),(0,a.jsx)(n.$n,{size:"sm",variant:"ghost",icon:"delete",onClick:ee,children:"Clear Cache"})]})]})]}),(0,a.jsxs)(n.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted",children:"image_compressor"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-medium text-text-main",children:"Pxpipe (Image Compression)"}),(0,a.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:"Render dense Claude-format contexts as PNG images before dispatch. Saves ~35-60% input tokens on large payloads."})]})]}),(0,a.jsx)(n.lM,{checked:z,onChange:()=>{var e;_(e=!z),J({pxpipeEnabled:e})}})]}),z&&(0,a.jsxs)("div",{className:"mt-4 flex flex-col gap-3 border-t border-border-subtle pt-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-xs",children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[14px] ${H.installed?"text-success":"text-warning"}`,children:H.installed?"check_circle":"error"}),(0,a.jsxs)("span",{className:"text-text-muted",children:["Package: ",H.installed?`v${H.version||"?"} installed`:"not installed"]}),H.loaded&&(0,a.jsx)(n.Ex,{variant:"success",size:"sm",dot:!0,children:"Loaded"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(n.$n,{size:"sm",variant:"secondary",icon:M?"progress_activity":"download",onClick:V,disabled:M,children:M?"Installing...":H.installed?"Reinstall / Upgrade":"Install Package"}),(0,a.jsx)(n.$n,{size:"sm",variant:"ghost",icon:"refresh",onClick:X,children:"Refresh Status"})]}),(0,a.jsx)("p",{className:"text-[11px] text-text-muted",children:"Only activates for Claude-format requests with text content above threshold. Fail-open — never blocks requests."})]})]}),(0,a.jsx)(n.aF,{isOpen:p,title:et?"Headroom":"Setup Headroom",onClose:()=>u(!1),children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,a.jsx)("span",{children:"Status"}),(0,a.jsx)("span",{className:et?"text-success":"text-warning",children:es})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:"Proxy URL"}),(0,a.jsx)(n.pd,{value:o,onChange:e=>x(e.target.value),onBlur:q,placeholder:"http://localhost:8787",className:"font-mono text-sm"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Use a local proxy for Start/Stop, or an external Docker sidecar like http://headroom:8787."})]}),en?(0,a.jsx)(n.$n,{onClick:Q,variant:"ghost",fullWidth:!0,disabled:f,children:f?"Stopping…":"Stop Headroom"}):et?(0,a.jsx)("p",{className:"text-sm text-success",children:"Headroom proxy is reachable. You can enable the token saver."}):el?(0,a.jsx)(n.$n,{onClick:K,fullWidth:!0,disabled:f,children:f?"Starting…":"Start Headroom"}):ea?m.python?(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:"Install then click Start:"}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("pre",{className:"flex-1 rounded bg-black/5 dark:bg-white/5 p-2 text-xs font-mono overflow-x-auto",children:'pip install "headroom-ai[proxy]"'}),(0,a.jsx)(n.$n,{size:"sm",variant:"ghost",onClick:()=>W('pip install "headroom-ai[proxy]"'),children:D?"Copied":"Copy"})]})]}):(0,a.jsx)("p",{className:"text-sm text-warning",children:"Python ≥ 3.10 required for local managed mode. Install Python first, or use an external proxy URL."}):(0,a.jsx)("p",{className:"text-sm text-warning",children:"Start Headroom separately at the configured URL, then recheck."}),g&&(0,a.jsx)("p",{className:"text-sm text-warning",children:g}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(n.$n,{onClick:()=>Z(),variant:"ghost",fullWidth:!0,children:"Recheck"}),(0,a.jsx)(n.$n,{onClick:()=>u(!1),fullWidth:!0,children:"Done"})]})]})})]})}}},e=>{e.O(0,[27,8105,705,1321,5497,8441,3794,7358],()=>e(e.s=5047)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9839],{5047:(e,t,s)=>{Promise.resolve().then(s.bind(s,61203))},15536:(e,t,s)=>{"use strict";s.d(t,{Cp:()=>r,Hx:()=>n,Iv:()=>o,Nv:()=>m,RL:()=>d,ev:()=>x,fl:()=>i,hT:()=>a,oX:()=>l,t6:()=>c});let a=["zh-CN","zh-TW"],l=[{icon:"public",title:"Access Anywhere",desc:"Use your API from any network"},{icon:"group",title:"Share Endpoint",desc:"Share URL with team members"},{icon:"code",title:"Use in Cursor/Cline",desc:"Connect AI tools remotely"},{icon:"lock",title:"Encrypted",desc:"End-to-end TLS via Cloudflare"}],n=2e3,r=3e5,i=5e3,c=5,d=1e4,o=5e3,x=[{id:"lite",label:"Lite",desc:"Drop filler, keep grammar"},{id:"full",label:"Full",desc:"Drop articles, fragments OK"},{id:"ultra",label:"Ultra",desc:"Telegraphic, max compression"},{id:"wenyan-lite",label:"文 Lite",desc:"Classical Chinese, light compression",wenyan:!0},{id:"wenyan",label:"文 Full",desc:"Maximum 文言文, 80-90% reduction",wenyan:!0},{id:"wenyan-ultra",label:"文 Ultra",desc:"Extreme classical compression",wenyan:!0}],m=[{id:"lite",label:"Lite",desc:"Build asked, name lazier option"},{id:"full",label:"Full",desc:"Ladder enforced: stdlib/native first"},{id:"ultra",label:"Ultra",desc:"YAGNI extremist, deletion first"}]},61203:(e,t,s)=>{"use strict";s.d(t,{default:()=>d});var a=s(95155),l=s(12115),n=s(35497),r=s(11059),i=s(73006),c=s(15536);function d(){let[e,t]=(0,l.useState)(!0),[s,d]=(0,l.useState)(!1),[o,x]=(0,l.useState)("http://localhost:8787"),[m,h]=(0,l.useState)({installed:!1,running:!1,python:null,loading:!0}),[p,u]=(0,l.useState)(!1),[f,j]=(0,l.useState)(!1),[g,b]=(0,l.useState)(""),[y,v]=(0,l.useState)(!1),[N,w]=(0,l.useState)("full"),[k,C]=(0,l.useState)(!1),[S,E]=(0,l.useState)("full"),[T,L]=(0,l.useState)(!1),[U,P]=(0,l.useState)(.85),[$,R]=(0,l.useState)(null),[z,_]=(0,l.useState)(!1),[H,I]=(0,l.useState)({installed:!1,loaded:!1,version:null,loading:!0}),[M,O]=(0,l.useState)(!1),[A,F]=(0,l.useState)("en"),{copied:D,copy:W}=(0,r.C)();(0,l.useEffect)(()=>(F((0,i.kk)()),(0,i.oQ)(()=>F((0,i.kk)()))),[]);let B=c.hT.includes(A),G=B?c.ev:c.ev.filter(e=>!e.wenyan);(0,l.useEffect)(()=>{let e=c.ev.find(e=>e.id===N);e?.wenyan&&!B&&(w("ultra"),J({cavemanLevel:"ultra"}))},[B,N]);let J=async e=>{try{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}catch(e){console.log("Error updating setting:",e)}},Y=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({rtkEnabled:e})})).ok&&t(e)}catch(e){console.log("Error updating rtkEnabled:",e)}},q=async()=>{let e=o.trim()||"http://localhost:8787";x(e),await J({headroomUrl:e}),Z()},Z=(0,l.useCallback)(async()=>{h(e=>({...e,loading:!0}));try{let e=await fetch("/api/headroom/status",{headers:{"Cache-Control":"no-store"}}),t=await e.json();h({...t,loading:!1})}catch{h({installed:!1,running:!1,python:null,loading:!1})}},[]),K=(0,l.useCallback)(async()=>{b(""),j(!0);try{let e=await fetch("/api/headroom/start",{method:"POST"}),t=await e.json().catch(()=>({}));if(!e.ok)throw Error(t.error||"Failed to start proxy");await Z()}catch(e){b(e.message)}finally{j(!1)}},[Z]),Q=(0,l.useCallback)(async()=>{j(!0);try{await fetch("/api/headroom/stop",{method:"POST"}),await Z()}finally{j(!1)}},[Z]),X=async()=>{I(e=>({...e,loading:!0}));try{let e=await fetch("/api/pxpipe/status",{headers:{"Cache-Control":"no-store"}}),t=await e.json();I({...t,loading:!1})}catch{I({installed:!1,loaded:!1,version:null,loading:!1})}},V=async()=>{O(!0);try{let e=await fetch("/api/pxpipe/install",{method:"POST"});await e.json(),await X()}catch{}O(!1)},ee=async()=>{try{await fetch("/api/cache",{method:"DELETE"}),R(null)}catch{}};(0,l.useEffect)(()=>{(async()=>{try{let e=await fetch("/api/settings");if(e.ok){let s=await e.json();t(!1!==s.rtkEnabled),d(!!s.headroomEnabled),x(s.headroomUrl||"http://localhost:8787"),v(!!s.cavemanEnabled),w(s.cavemanLevel||"full"),C(!!s.ponytailEnabled),E(s.ponytailLevel||"full"),L(!!s.semanticCacheEnabled),P("number"==typeof s.semanticCacheThreshold?s.semanticCacheThreshold:.85),_(!!s.pxpipeEnabled),Z(),X()}}catch{}})()},[Z]);let et=!!m.running,es=m.loading?"Checking…":et?"Running":!1===m.localUrl||m.installed?!1!==m.localUrl?"Stopped":"External":"Not installed",ea=!1!==m.localUrl,el=!!m.canStart,en=ea&&!!m.managedPid;return(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsx)(n.zY,{title:"Token Saver",description:"Compression policies for prompt and tool output",icon:"savings"}),(0,a.jsxs)(n.Zp,{id:"rtk",children:[(0,a.jsx)("div",{className:"flex items-center justify-between mb-2",children:(0,a.jsxs)("h2",{className:"text-lg font-semibold flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary",children:"bolt"}),"Token Saver"]})}),(0,a.jsxs)("div",{className:"flex items-center justify-between pt-2 pb-4 border-b border-border gap-4",children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("p",{className:"font-medium",children:["Compress tool output"," ",(0,a.jsx)("a",{href:"https://github.com/rtk-ai/rtk",target:"_blank",rel:"noreferrer",className:"text-xs font-normal text-primary underline hover:opacity-80",children:"(RTK)"})]}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"git/grep/ls/tree/logs → 60-90% fewer input tokens"})]}),(0,a.jsx)(n.lM,{checked:e,onChange:()=>Y(!e)})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between py-4 border-b border-border gap-4 flex-wrap",children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[(0,a.jsxs)("p",{className:"font-medium",children:["Compress context"," ",(0,a.jsx)("a",{href:"https://github.com/chopratejas/headroom",target:"_blank",rel:"noreferrer",className:"text-xs font-normal text-primary underline hover:opacity-80",children:"(Headroom)"})]}),(0,a.jsx)("span",{className:`text-xs px-2 py-0.5 rounded ${et?"bg-success/15 text-success":"bg-warning/15 text-warning"}`,children:es}),(0,a.jsx)("button",{type:"button",onClick:()=>u(!0),className:"text-xs text-primary underline hover:opacity-80",children:et?"Manage":"Setup"})]}),(0,a.jsx)("p",{className:"text-sm text-text-muted mt-1",children:"Compress prompts via /v1/compress before routing to the model"})]}),(0,a.jsx)(n.lM,{checked:s&&et,disabled:!et,onChange:()=>{var e;let t;return e=!s,void(x(t=o.trim()||"http://localhost:8787"),d(e),J({headroomEnabled:e,headroomUrl:t}))}})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between pt-4 gap-4 flex-wrap",children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("p",{className:"font-medium",children:["Compress LLM output"," ",(0,a.jsx)("a",{href:"https://github.com/JuliusBrussee/caveman",target:"_blank",rel:"noreferrer",className:"text-xs font-normal text-primary underline hover:opacity-80",children:"(Caveman)"})]}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Terse-style system prompt → ~65% fewer output tokens (up to 87%)"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-3 shrink-0",children:[y&&(0,a.jsxs)("div",{className:"flex flex-col items-end gap-1",children:[(0,a.jsx)("div",{className:"flex items-center gap-1.5",children:G.map(e=>(0,a.jsx)("button",{onClick:()=>{var t;w(t=e.id),J({cavemanLevel:t})},className:`px-3 py-1.5 rounded text-xs font-medium border transition-colors ${N===e.id?"bg-primary text-white border-primary":"bg-transparent border-border text-text-muted hover:bg-surface-2"}`,title:e.desc,children:e.label},e.id))}),(0,a.jsx)("p",{className:"text-xs text-primary",children:c.ev.find(e=>e.id===N)?.desc})]}),(0,a.jsx)(n.lM,{checked:y,onChange:()=>{var e;v(e=!y),J({cavemanEnabled:e})}})]})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between pt-4 mt-4 border-t border-border gap-4 flex-wrap",children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("p",{className:"font-medium",children:["Lazy senior dev"," ",(0,a.jsx)("a",{href:"https://github.com/DietrichGebert/ponytail",target:"_blank",rel:"noreferrer",className:"text-xs font-normal text-primary underline hover:opacity-80",children:"(Ponytail)"})]}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Bias the model toward minimal code: YAGNI, reuse stdlib, deletion over addition"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-3 shrink-0",children:[k&&(0,a.jsxs)("div",{className:"flex flex-col items-end gap-1",children:[(0,a.jsx)("div",{className:"flex items-center gap-1.5",children:c.Nv.map(e=>(0,a.jsx)("button",{onClick:()=>{var t;E(t=e.id),J({ponytailLevel:t})},className:`px-3 py-1.5 rounded text-xs font-medium border transition-colors ${S===e.id?"bg-primary text-white border-primary":"bg-transparent border-border text-text-muted hover:bg-surface-2"}`,title:e.desc,children:e.label},e.id))}),(0,a.jsx)("p",{className:"text-xs text-primary",children:c.Nv.find(e=>e.id===S)?.desc})]}),(0,a.jsx)(n.lM,{checked:k,onChange:()=>{var e;C(e=!k),J({ponytailEnabled:e})}})]})]})]}),(0,a.jsxs)(n.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted",children:"cached"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-medium text-text-main",children:"Semantic Cache"}),(0,a.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:"Cache responses by message similarity (Jaccard). Instant hits, $0 cost."})]})]}),(0,a.jsx)(n.lM,{checked:T,onChange:()=>{var e;L(e=!T),J({semanticCacheEnabled:e})}})]}),T&&(0,a.jsxs)("div",{className:"mt-4 flex flex-col gap-3 border-t border-border-subtle pt-3",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted",children:"Similarity Threshold"}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("input",{type:"range",min:.5,max:1,step:.05,value:U,onChange:e=>{var t;P(t=parseFloat(e.target.value)),J({semanticCacheThreshold:t})},className:"w-32 accent-[var(--color-primary)]"}),(0,a.jsxs)("span",{className:"w-10 text-right font-mono text-xs text-text-main",children:[Math.round(100*U),"%"]})]})]}),$&&(0,a.jsxs)("div",{className:"flex flex-wrap gap-3 text-xs text-text-muted",children:[(0,a.jsxs)("span",{children:["Size: ",$.size]}),(0,a.jsx)("span",{children:"\xb7"}),(0,a.jsxs)("span",{children:["Hits: ",$.hits]}),(0,a.jsx)("span",{children:"\xb7"}),(0,a.jsxs)("span",{children:["Near: ",$.nearHits]}),(0,a.jsx)("span",{children:"\xb7"}),(0,a.jsxs)("span",{children:["Misses: ",$.misses]}),(0,a.jsx)("span",{children:"\xb7"}),(0,a.jsxs)("span",{children:["Rate: ",$.hitRate,"%"]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(n.$n,{size:"sm",variant:"secondary",icon:"refresh",onClick:async()=>{try{let e=await fetch("/api/cache");R(await e.json())}catch{}},children:"Refresh Stats"}),(0,a.jsx)(n.$n,{size:"sm",variant:"ghost",icon:"delete",onClick:ee,children:"Clear Cache"})]})]})]}),(0,a.jsxs)(n.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted",children:"image_compressor"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-medium text-text-main",children:"Pxpipe (Image Compression)"}),(0,a.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:"Render dense Claude-format contexts as PNG images before dispatch. Saves ~35-60% input tokens on large payloads."})]})]}),(0,a.jsx)(n.lM,{checked:z,onChange:()=>{var e;_(e=!z),J({pxpipeEnabled:e})}})]}),z&&(0,a.jsxs)("div",{className:"mt-4 flex flex-col gap-3 border-t border-border-subtle pt-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-xs",children:[(0,a.jsx)("span",{className:`material-symbols-outlined text-[14px] ${H.installed?"text-success":"text-warning"}`,children:H.installed?"check_circle":"error"}),(0,a.jsxs)("span",{className:"text-text-muted",children:["Package: ",H.installed?`v${H.version||"?"} installed`:"not installed"]}),H.loaded&&(0,a.jsx)(n.Ex,{variant:"success",size:"sm",dot:!0,children:"Loaded"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(n.$n,{size:"sm",variant:"secondary",icon:M?"progress_activity":"download",onClick:V,disabled:M,children:M?"Installing...":H.installed?"Reinstall / Upgrade":"Install Package"}),(0,a.jsx)(n.$n,{size:"sm",variant:"ghost",icon:"refresh",onClick:X,children:"Refresh Status"})]}),(0,a.jsx)("p",{className:"text-[11px] text-text-muted",children:"Only activates for Claude-format requests with text content above threshold. Fail-open — never blocks requests."})]})]}),(0,a.jsx)(n.aF,{isOpen:p,title:et?"Headroom":"Setup Headroom",onClose:()=>u(!1),children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,a.jsx)("span",{children:"Status"}),(0,a.jsx)("span",{className:et?"text-success":"text-warning",children:es})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:"Proxy URL"}),(0,a.jsx)(n.pd,{value:o,onChange:e=>x(e.target.value),onBlur:q,placeholder:"http://localhost:8787",className:"font-mono text-sm"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Use a local proxy for Start/Stop, or an external Docker sidecar like http://headroom:8787."})]}),en?(0,a.jsx)(n.$n,{onClick:Q,variant:"ghost",fullWidth:!0,disabled:f,children:f?"Stopping…":"Stop Headroom"}):et?(0,a.jsx)("p",{className:"text-sm text-success",children:"Headroom proxy is reachable. You can enable the token saver."}):el?(0,a.jsx)(n.$n,{onClick:K,fullWidth:!0,disabled:f,children:f?"Starting…":"Start Headroom"}):ea?m.python?(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:"Install then click Start:"}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("pre",{className:"flex-1 rounded bg-black/5 dark:bg-white/5 p-2 text-xs font-mono overflow-x-auto",children:'pip install "headroom-ai[proxy]"'}),(0,a.jsx)(n.$n,{size:"sm",variant:"ghost",onClick:()=>W('pip install "headroom-ai[proxy]"'),children:D?"Copied":"Copy"})]})]}):(0,a.jsx)("p",{className:"text-sm text-warning",children:"Python ≥ 3.10 required for local managed mode. Install Python first, or use an external proxy URL."}):(0,a.jsx)("p",{className:"text-sm text-warning",children:"Start Headroom separately at the configured URL, then recheck."}),g&&(0,a.jsx)("p",{className:"text-sm text-warning",children:g}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(n.$n,{onClick:()=>Z(),variant:"ghost",fullWidth:!0,children:"Recheck"}),(0,a.jsx)(n.$n,{onClick:()=>u(!1),fullWidth:!0,children:"Done"})]})]})})]})}}},e=>{e.O(0,[27,2563,705,1321,5497,8441,3794,7358],()=>e(e.s=5047)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3528],{5214:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"workAsyncStorage",{enumerable:!0,get:function(){return r.workAsyncStorageInstance}});let r=n(17828)},11495:(e,t,n)=>{Promise.resolve().then(n.bind(n,69472))},17828:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"workAsyncStorageInstance",{enumerable:!0,get:function(){return r}});let r=(0,n(64054).createAsyncLocalStorage)()},21957:(e,t,n)=>{"use strict";function r({moduleIds:e}){return null}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"PreloadChunks",{enumerable:!0,get:function(){return r}}),n(95155),n(47650),n(5214),n(2451),n(53887)},41112:(e,t,n)=>{"use strict";function r({reason:e,children:t}){return t}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BailoutToCSR",{enumerable:!0,get:function(){return r}}),n(1980)},64054:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={bindSnapshot:function(){return i},createAsyncLocalStorage:function(){return l},createSnapshot:function(){return d}};for(var r in n)Object.defineProperty(t,r,{enumerable:!0,get:n[r]});let a=Object.defineProperty(Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available"),"__NEXT_ERROR_CODE",{value:"E504",enumerable:!1,configurable:!0});class s{disable(){throw a}getStore(){}run(){throw a}exit(){throw a}enterWith(){throw a}static bind(e){return e}}let o="u">typeof globalThis&&globalThis.AsyncLocalStorage;function l(){return o?new o:new s}function i(e){return o?o.bind(e):s.bind(e)}function d(){return o?o.snapshot():function(e,...t){return e(...t)}}},68635:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return i}});let r=n(95155),a=n(12115),s=n(41112);function o(e){return{default:e&&"default"in e?e.default:e}}n(21957);let l={loader:()=>Promise.resolve(o(()=>null)),loading:null,ssr:!0},i=function(e){let t={...l,...e},n=(0,a.lazy)(()=>t.loader().then(o)),i=t.loading;function d(e){let o=i?(0,r.jsx)(i,{isLoading:!0,pastDelay:!0,error:null}):null,l=!t.ssr||!!t.loading,d=l?a.Suspense:a.Fragment,c=t.ssr?(0,r.jsxs)(r.Fragment,{children:[null,(0,r.jsx)(n,{...e})]}):(0,r.jsx)(s.BailoutToCSR,{reason:"next/dynamic",children:(0,r.jsx)(n,{...e})});return(0,r.jsx)(d,{...l?{fallback:o}:{},children:c})}return d.displayName="LoadableComponent",d}},69472:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>u});var r=n(95155),a=n(12115),s=n(35497),o=n(11059),l=n(75707);let i=n.n(l)()(()=>n.e(8202).then(n.bind(n,28202)),{loadableGenerated:{webpack:()=>[28202]},ssr:!1}),d=[{id:1,label:"Client Request",file:"1_req_client.json",lang:"json",desc:"Raw request from client"},{id:2,label:"Source Body",file:"2_req_source.json",lang:"json",desc:"After initial conversion"},{id:3,label:"OpenAI Intermediate",file:"3_req_openai.json",lang:"json",desc:"source → openai"},{id:4,label:"Target Request",file:"4_req_target.json",lang:"json",desc:"openai → target + URL + headers"},{id:5,label:"Provider Response",file:"5_res_provider.txt",lang:"text",desc:"Raw SSE from provider"},{id:6,label:"OpenAI Response",file:"6_res_openai.txt",lang:"text",desc:"target → openai (response)"},{id:7,label:"Client Response",file:"7_res_client.txt",lang:"text",desc:"Final response to client"}],c={minimap:{enabled:!1},fontSize:12,lineNumbers:"on",scrollBeyondLastLine:!1,wordWrap:"on",automaticLayout:!0};function u(){let[e,t]=(0,a.useState)({}),[n,l]=(0,a.useState)({1:!0}),[u,f]=(0,a.useState)({}),[m,x]=(0,a.useState)(null),g=(e,t)=>f(n=>({...n,[e]:t})),b=(e,n)=>t(t=>({...t,[e]:n})),h=e=>l(t=>{let n={};return d.forEach(e=>{n[e.id]=!1}),n[e]=!0,n}),y=async e=>{let t=d.find(t=>t.id===e);g(`load-${e}`,!0);try{let n=await fetch(`/api/translator/load?file=${t.file}`),r=await n.json();r.success?(b(e,r.content),1===e&&await j(r.content)):alert(r.error||"File not found")}catch(e){alert(e.message)}g(`load-${e}`,!1)},j=async e=>{try{let t="string"==typeof e?JSON.parse(e):e,n=await fetch("/api/translator/translate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({step:1,body:t})}),r=await n.json();r.success&&x(r.result)}catch{}},_=(e,t)=>fetch("/api/translator/save",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({file:e,content:t})}).catch(()=>{}),v=async()=>{g("toOpenAI",!0);try{let t=e[1],n=JSON.parse(t);_("1_req_client.json",t),_("2_req_source.json",JSON.stringify({timestamp:new Date().toISOString(),headers:{},body:n.body||n},null,2));let r=await fetch("/api/translator/translate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({step:2,body:n})}),a=await r.json();if(!a.success)return void alert(a.error);let s=JSON.stringify(a.result.body,null,2);b(3,s),h(3)}catch(e){alert(e.message)}g("toOpenAI",!1)},O=async()=>{g("toTarget",!0);try{let t=e[3],n=JSON.parse(t);_("3_req_openai.json",t);let r=await fetch("/api/translator/translate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({step:3,body:{...n,provider:m?.provider,model:m?.model}})}),a=await r.json();if(!a.success)return void alert(a.error);let s={...a.result,provider:m?.provider,model:m?.model};b(4,JSON.stringify(s,null,2)),h(4)}catch(e){alert(e.message)}g("toTarget",!1)},S=async()=>{g("send",!0);try{let t=e[4],n=JSON.parse(t);_("4_req_target.json",t);let r=n.provider||m?.provider,a=n.model||m?.model;if(!r||!a)return void alert("Missing provider or model. Please run step 1 first to detect them.");let s=await fetch("/api/translator/send",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:r,model:a,body:n.body||n})});if(!s.ok){let e=await s.json().catch(()=>({error:s.statusText}));alert(e.error||"Send failed");return}let o=s.body.getReader(),l=new TextDecoder,i="";for(;;){let{done:e,value:t}=await o.read();if(e)break;i+=l.decode(t,{stream:!0})}b(5,i),h(5),await fetch("/api/translator/save",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({file:"5_res_provider.txt",content:i})})}catch(e){alert(e.message)}finally{g("send",!1)}},{copy:w}=(0,o.C)(),N=async t=>{e[t]&&w(e[t],`translator-step-${t}`)};return(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)(s.zY,{title:"Translator",description:"Inspect format conversion between clients and providers",icon:"translate"}),m&&(0,r.jsxs)("div",{className:"flex flex-wrap items-center justify-end gap-2",children:[(0,r.jsx)(p,{label:"src",value:m.sourceFormat,color:"blue"}),(0,r.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,r.jsx)(p,{label:"dst",value:m.targetFormat,color:"orange"}),(0,r.jsx)(p,{label:"provider",value:m.provider,color:"green"}),(0,r.jsx)(p,{label:"model",value:m.model,color:"purple"})]}),d.map(t=>{var a;let o=1===(a=t.id)?(0,r.jsx)(s.$n,{size:"sm",icon:"arrow_forward",loading:u.toOpenAI,onClick:v,children:"→ OpenAI"}):3===a?(0,r.jsx)(s.$n,{size:"sm",icon:"arrow_forward",loading:u.toTarget,onClick:O,children:"→ Target"}):4===a?(0,r.jsx)(s.$n,{size:"sm",icon:"send",loading:u.send,onClick:S,children:"Send"}):null,d=!!n[t.id],p=e[t.id]||"";return(0,r.jsx)(s.Zp,{children:(0,r.jsxs)("div",{className:"p-4 space-y-3",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsxs)("button",{onClick:()=>{let e;return e=t.id,l(t=>({...t,[e]:!t[e]}))},className:"flex items-center gap-2 flex-1 text-left group",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px] text-text-muted group-hover:text-primary transition-colors",children:d?"expand_more":"chevron_right"}),(0,r.jsx)("span",{className:"text-xs font-mono text-text-muted/60 w-4",children:t.id}),(0,r.jsx)("h3",{className:"text-sm font-semibold text-text-main",children:t.label}),(0,r.jsx)("span",{className:"text-xs text-text-muted/60 font-mono",children:t.file}),p&&(0,r.jsxs)("span",{className:"text-xs text-green-500",children:["(",p.length," chars)"]})]}),!d&&(0,r.jsxs)("div",{className:"flex gap-1 shrink-0",children:[(0,r.jsx)(s.$n,{size:"sm",variant:"ghost",icon:"folder_open",loading:u[`load-${t.id}`],onClick:()=>y(t.id)}),o]})]}),d&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"border border-border rounded-lg overflow-hidden",children:(0,r.jsx)(i,{height:"400px",defaultLanguage:"text"===t.lang?"plaintext":"json",value:p,onChange:e=>{b(t.id,e||""),1===t.id&&j(e||"")},theme:"vs-dark",options:c})}),(0,r.jsxs)("div",{className:"flex gap-2 flex-wrap",children:[(0,r.jsx)(s.$n,{size:"sm",variant:"outline",icon:"folder_open",loading:u[`load-${t.id}`],onClick:()=>y(t.id),children:"Load"}),(0,r.jsx)(s.$n,{size:"sm",variant:"outline",icon:"data_object",onClick:()=>(t=>{try{let n=JSON.parse(e[t]);b(t,JSON.stringify(n,null,2))}catch{}})(t.id),children:"Format"}),(0,r.jsx)(s.$n,{size:"sm",variant:"outline",icon:"content_copy",onClick:()=>N(t.id),children:"Copy"}),o]})]})]})},t.id)})]})}function p({label:e,value:t,color:n}){return(0,r.jsxs)("span",{className:`inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs font-mono ${{blue:"bg-blue-500/10 text-blue-500",orange:"bg-orange-500/10 text-orange-500",green:"bg-green-500/10 text-green-500",purple:"bg-purple-500/10 text-purple-500"}[n]}`,children:[(0,r.jsxs)("span",{className:"text-text-muted/70 font-sans text-[10px]",children:[e,":"]}),t]})}},75707:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return a}});let r=n(73623)._(n(68635));function a(e,t){let n={};"function"==typeof e&&(n.loader=e);let a={...n,...t};return(0,r.default)({...a,modules:a.loadableGenerated?.modules})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}},e=>{e.O(0,[27,8105,705,1321,5497,8441,3794,7358],()=>e(e.s=11495)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3528],{5214:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"workAsyncStorage",{enumerable:!0,get:function(){return r.workAsyncStorageInstance}});let r=n(17828)},11495:(e,t,n)=>{Promise.resolve().then(n.bind(n,69472))},17828:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"workAsyncStorageInstance",{enumerable:!0,get:function(){return r}});let r=(0,n(64054).createAsyncLocalStorage)()},21957:(e,t,n)=>{"use strict";function r({moduleIds:e}){return null}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"PreloadChunks",{enumerable:!0,get:function(){return r}}),n(95155),n(47650),n(5214),n(2451),n(53887)},41112:(e,t,n)=>{"use strict";function r({reason:e,children:t}){return t}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BailoutToCSR",{enumerable:!0,get:function(){return r}}),n(1980)},64054:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={bindSnapshot:function(){return i},createAsyncLocalStorage:function(){return l},createSnapshot:function(){return d}};for(var r in n)Object.defineProperty(t,r,{enumerable:!0,get:n[r]});let a=Object.defineProperty(Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available"),"__NEXT_ERROR_CODE",{value:"E504",enumerable:!1,configurable:!0});class s{disable(){throw a}getStore(){}run(){throw a}exit(){throw a}enterWith(){throw a}static bind(e){return e}}let o="u">typeof globalThis&&globalThis.AsyncLocalStorage;function l(){return o?new o:new s}function i(e){return o?o.bind(e):s.bind(e)}function d(){return o?o.snapshot():function(e,...t){return e(...t)}}},68635:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return i}});let r=n(95155),a=n(12115),s=n(41112);function o(e){return{default:e&&"default"in e?e.default:e}}n(21957);let l={loader:()=>Promise.resolve(o(()=>null)),loading:null,ssr:!0},i=function(e){let t={...l,...e},n=(0,a.lazy)(()=>t.loader().then(o)),i=t.loading;function d(e){let o=i?(0,r.jsx)(i,{isLoading:!0,pastDelay:!0,error:null}):null,l=!t.ssr||!!t.loading,d=l?a.Suspense:a.Fragment,c=t.ssr?(0,r.jsxs)(r.Fragment,{children:[null,(0,r.jsx)(n,{...e})]}):(0,r.jsx)(s.BailoutToCSR,{reason:"next/dynamic",children:(0,r.jsx)(n,{...e})});return(0,r.jsx)(d,{...l?{fallback:o}:{},children:c})}return d.displayName="LoadableComponent",d}},69472:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>u});var r=n(95155),a=n(12115),s=n(35497),o=n(11059),l=n(75707);let i=n.n(l)()(()=>n.e(8202).then(n.bind(n,28202)),{loadableGenerated:{webpack:()=>[28202]},ssr:!1}),d=[{id:1,label:"Client Request",file:"1_req_client.json",lang:"json",desc:"Raw request from client"},{id:2,label:"Source Body",file:"2_req_source.json",lang:"json",desc:"After initial conversion"},{id:3,label:"OpenAI Intermediate",file:"3_req_openai.json",lang:"json",desc:"source → openai"},{id:4,label:"Target Request",file:"4_req_target.json",lang:"json",desc:"openai → target + URL + headers"},{id:5,label:"Provider Response",file:"5_res_provider.txt",lang:"text",desc:"Raw SSE from provider"},{id:6,label:"OpenAI Response",file:"6_res_openai.txt",lang:"text",desc:"target → openai (response)"},{id:7,label:"Client Response",file:"7_res_client.txt",lang:"text",desc:"Final response to client"}],c={minimap:{enabled:!1},fontSize:12,lineNumbers:"on",scrollBeyondLastLine:!1,wordWrap:"on",automaticLayout:!0};function u(){let[e,t]=(0,a.useState)({}),[n,l]=(0,a.useState)({1:!0}),[u,f]=(0,a.useState)({}),[m,x]=(0,a.useState)(null),g=(e,t)=>f(n=>({...n,[e]:t})),b=(e,n)=>t(t=>({...t,[e]:n})),h=e=>l(t=>{let n={};return d.forEach(e=>{n[e.id]=!1}),n[e]=!0,n}),y=async e=>{let t=d.find(t=>t.id===e);g(`load-${e}`,!0);try{let n=await fetch(`/api/translator/load?file=${t.file}`),r=await n.json();r.success?(b(e,r.content),1===e&&await j(r.content)):alert(r.error||"File not found")}catch(e){alert(e.message)}g(`load-${e}`,!1)},j=async e=>{try{let t="string"==typeof e?JSON.parse(e):e,n=await fetch("/api/translator/translate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({step:1,body:t})}),r=await n.json();r.success&&x(r.result)}catch{}},_=(e,t)=>fetch("/api/translator/save",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({file:e,content:t})}).catch(()=>{}),v=async()=>{g("toOpenAI",!0);try{let t=e[1],n=JSON.parse(t);_("1_req_client.json",t),_("2_req_source.json",JSON.stringify({timestamp:new Date().toISOString(),headers:{},body:n.body||n},null,2));let r=await fetch("/api/translator/translate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({step:2,body:n})}),a=await r.json();if(!a.success)return void alert(a.error);let s=JSON.stringify(a.result.body,null,2);b(3,s),h(3)}catch(e){alert(e.message)}g("toOpenAI",!1)},O=async()=>{g("toTarget",!0);try{let t=e[3],n=JSON.parse(t);_("3_req_openai.json",t);let r=await fetch("/api/translator/translate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({step:3,body:{...n,provider:m?.provider,model:m?.model}})}),a=await r.json();if(!a.success)return void alert(a.error);let s={...a.result,provider:m?.provider,model:m?.model};b(4,JSON.stringify(s,null,2)),h(4)}catch(e){alert(e.message)}g("toTarget",!1)},S=async()=>{g("send",!0);try{let t=e[4],n=JSON.parse(t);_("4_req_target.json",t);let r=n.provider||m?.provider,a=n.model||m?.model;if(!r||!a)return void alert("Missing provider or model. Please run step 1 first to detect them.");let s=await fetch("/api/translator/send",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:r,model:a,body:n.body||n})});if(!s.ok){let e=await s.json().catch(()=>({error:s.statusText}));alert(e.error||"Send failed");return}let o=s.body.getReader(),l=new TextDecoder,i="";for(;;){let{done:e,value:t}=await o.read();if(e)break;i+=l.decode(t,{stream:!0})}b(5,i),h(5),await fetch("/api/translator/save",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({file:"5_res_provider.txt",content:i})})}catch(e){alert(e.message)}finally{g("send",!1)}},{copy:w}=(0,o.C)(),N=async t=>{e[t]&&w(e[t],`translator-step-${t}`)};return(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsx)(s.zY,{title:"Translator",description:"Inspect format conversion between clients and providers",icon:"translate"}),m&&(0,r.jsxs)("div",{className:"flex flex-wrap items-center justify-end gap-2",children:[(0,r.jsx)(p,{label:"src",value:m.sourceFormat,color:"blue"}),(0,r.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,r.jsx)(p,{label:"dst",value:m.targetFormat,color:"orange"}),(0,r.jsx)(p,{label:"provider",value:m.provider,color:"green"}),(0,r.jsx)(p,{label:"model",value:m.model,color:"purple"})]}),d.map(t=>{var a;let o=1===(a=t.id)?(0,r.jsx)(s.$n,{size:"sm",icon:"arrow_forward",loading:u.toOpenAI,onClick:v,children:"→ OpenAI"}):3===a?(0,r.jsx)(s.$n,{size:"sm",icon:"arrow_forward",loading:u.toTarget,onClick:O,children:"→ Target"}):4===a?(0,r.jsx)(s.$n,{size:"sm",icon:"send",loading:u.send,onClick:S,children:"Send"}):null,d=!!n[t.id],p=e[t.id]||"";return(0,r.jsx)(s.Zp,{children:(0,r.jsxs)("div",{className:"p-4 space-y-3",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsxs)("button",{onClick:()=>{let e;return e=t.id,l(t=>({...t,[e]:!t[e]}))},className:"flex items-center gap-2 flex-1 text-left group",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px] text-text-muted group-hover:text-primary transition-colors",children:d?"expand_more":"chevron_right"}),(0,r.jsx)("span",{className:"text-xs font-mono text-text-muted/60 w-4",children:t.id}),(0,r.jsx)("h3",{className:"text-sm font-semibold text-text-main",children:t.label}),(0,r.jsx)("span",{className:"text-xs text-text-muted/60 font-mono",children:t.file}),p&&(0,r.jsxs)("span",{className:"text-xs text-green-500",children:["(",p.length," chars)"]})]}),!d&&(0,r.jsxs)("div",{className:"flex gap-1 shrink-0",children:[(0,r.jsx)(s.$n,{size:"sm",variant:"ghost",icon:"folder_open",loading:u[`load-${t.id}`],onClick:()=>y(t.id)}),o]})]}),d&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"border border-border rounded-lg overflow-hidden",children:(0,r.jsx)(i,{height:"400px",defaultLanguage:"text"===t.lang?"plaintext":"json",value:p,onChange:e=>{b(t.id,e||""),1===t.id&&j(e||"")},theme:"vs-dark",options:c})}),(0,r.jsxs)("div",{className:"flex gap-2 flex-wrap",children:[(0,r.jsx)(s.$n,{size:"sm",variant:"outline",icon:"folder_open",loading:u[`load-${t.id}`],onClick:()=>y(t.id),children:"Load"}),(0,r.jsx)(s.$n,{size:"sm",variant:"outline",icon:"data_object",onClick:()=>(t=>{try{let n=JSON.parse(e[t]);b(t,JSON.stringify(n,null,2))}catch{}})(t.id),children:"Format"}),(0,r.jsx)(s.$n,{size:"sm",variant:"outline",icon:"content_copy",onClick:()=>N(t.id),children:"Copy"}),o]})]})]})},t.id)})]})}function p({label:e,value:t,color:n}){return(0,r.jsxs)("span",{className:`inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs font-mono ${{blue:"bg-blue-500/10 text-blue-500",orange:"bg-orange-500/10 text-orange-500",green:"bg-green-500/10 text-green-500",purple:"bg-purple-500/10 text-purple-500"}[n]}`,children:[(0,r.jsxs)("span",{className:"text-text-muted/70 font-sans text-[10px]",children:[e,":"]}),t]})}},75707:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return a}});let r=n(73623)._(n(68635));function a(e,t){let n={};"function"==typeof e&&(n.loader=e);let a={...n,...t};return(0,r.default)({...a,modules:a.loadableGenerated?.modules})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}},e=>{e.O(0,[27,2563,705,1321,5497,8441,3794,7358],()=>e(e.s=11495)),_N_E=e.O()}]);