vansrouter 0.91.21 → 0.91.30

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 (1206) hide show
  1. package/app/.next-cli-build/BUILD_ID +1 -1
  2. package/app/.next-cli-build/app-path-routes-manifest.json +27 -20
  3. package/app/.next-cli-build/build-manifest.json +3 -3
  4. package/app/.next-cli-build/prerender-manifest.json +3 -3
  5. package/app/.next-cli-build/react-loadable-manifest.json +19 -23
  6. package/app/.next-cli-build/routes-manifest.json +42 -0
  7. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +2 -2
  8. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +2 -28
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +2 -2
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +2 -2
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +2 -2
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +2 -2
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +3 -3
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +2 -2
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +3 -3
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +2 -2
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  37. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +2 -2
  38. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  39. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +2 -2
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  42. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  43. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +2 -2
  44. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  45. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  46. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +6 -6
  47. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  48. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  49. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +2 -2
  50. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  51. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  52. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +2 -2
  53. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  54. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  55. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-fitness/page.js +2 -2
  56. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-fitness/page.js.nft.json +1 -1
  57. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-fitness/page_client-reference-manifest.js +1 -1
  58. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +3 -3
  59. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  60. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  61. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js +2 -2
  62. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js.nft.json +1 -1
  63. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
  64. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +2 -2
  65. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  66. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  67. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +2 -2
  68. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  69. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  70. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +2 -2
  71. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
  72. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  73. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +2 -2
  74. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  75. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  76. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +2 -2
  77. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  78. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  79. package/app/.next-cli-build/server/app/_global-error/page.js +2 -2
  80. package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  81. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  82. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  83. package/app/.next-cli-build/server/app/_global-error.rsc +2 -2
  84. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +2 -2
  85. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  86. package/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  87. package/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
  88. package/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
  89. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +2 -2
  90. package/app/.next-cli-build/server/app/_not-found/page.js +2 -2
  91. package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  92. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  93. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  94. package/app/.next-cli-build/server/app/_not-found.rsc +4 -4
  95. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +4 -4
  96. package/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
  97. package/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +4 -4
  98. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  99. package/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  100. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  101. package/app/.next-cli-build/server/app/api/auth/check/route.js +1 -1
  102. package/app/.next-cli-build/server/app/api/auth/check/route.js.nft.json +1 -1
  103. package/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
  104. package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  105. package/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
  106. package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  107. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
  108. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  109. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
  110. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  111. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
  112. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  113. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js +1 -1
  114. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -1
  115. package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
  116. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  117. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +35 -16
  118. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  119. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +1 -2
  120. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  121. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  122. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  123. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
  124. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  125. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +2 -2
  126. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  127. package/app/.next-cli-build/server/app/api/cli-tools/codewhale-settings/route.js +4 -0
  128. package/app/.next-cli-build/server/app/api/cli-tools/codewhale-settings/route.js.nft.json +1 -0
  129. package/app/.next-cli-build/server/app/api/cli-tools/codewhale-settings/route_client-reference-manifest.js +1 -0
  130. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +2 -1
  131. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  132. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +1 -1
  133. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  134. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +1 -2
  135. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  136. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +2 -2
  137. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  138. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -2
  139. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  140. package/app/.next-cli-build/server/app/api/cli-tools/crush-settings/route.js +2 -0
  141. package/app/.next-cli-build/server/app/api/cli-tools/crush-settings/route.js.nft.json +1 -0
  142. package/app/.next-cli-build/server/app/api/cli-tools/crush-settings/route_client-reference-manifest.js +1 -0
  143. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +4 -5
  144. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  145. package/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js +1 -2
  146. package/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js.nft.json +1 -1
  147. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +1 -1
  148. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  149. package/app/.next-cli-build/server/app/api/cli-tools/forge-settings/route.js +3 -0
  150. package/app/.next-cli-build/server/app/api/cli-tools/forge-settings/route.js.nft.json +1 -0
  151. package/app/.next-cli-build/server/app/api/cli-tools/forge-settings/route_client-reference-manifest.js +1 -0
  152. package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js +7 -8
  153. package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js.nft.json +1 -1
  154. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +6 -7
  155. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  156. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +3 -2
  157. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  158. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +2 -2
  159. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  160. package/app/.next-cli-build/server/app/api/cli-tools/omp-settings/route.js +16 -0
  161. package/app/.next-cli-build/server/app/api/cli-tools/omp-settings/route.js.nft.json +1 -0
  162. package/app/.next-cli-build/server/app/api/cli-tools/omp-settings/route_client-reference-manifest.js +1 -0
  163. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
  164. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  165. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +1 -2
  166. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  167. package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js +2 -0
  168. package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js.nft.json +1 -0
  169. package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route_client-reference-manifest.js +1 -0
  170. package/app/.next-cli-build/server/app/api/cli-tools/smelt-settings/route.js +2 -0
  171. package/app/.next-cli-build/server/app/api/cli-tools/smelt-settings/route.js.nft.json +1 -0
  172. package/app/.next-cli-build/server/app/api/cli-tools/smelt-settings/route_client-reference-manifest.js +1 -0
  173. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  174. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  175. package/app/.next-cli-build/server/app/api/combos/presets/route.js +1 -0
  176. package/app/.next-cli-build/server/app/api/combos/presets/route.js.nft.json +1 -0
  177. package/app/.next-cli-build/server/app/api/combos/presets/route_client-reference-manifest.js +1 -0
  178. package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  179. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  180. package/app/.next-cli-build/server/app/api/headroom/extras/route.js +1 -1
  181. package/app/.next-cli-build/server/app/api/headroom/extras/route.js.nft.json +1 -1
  182. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js +1 -1
  183. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
  184. package/app/.next-cli-build/server/app/api/headroom/restart/route.js +1 -1
  185. package/app/.next-cli-build/server/app/api/headroom/restart/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 +1 -1
  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/route.js +1 -1
  193. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  194. package/app/.next-cli-build/server/app/api/init/route.js +1 -1
  195. package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  196. package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  197. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  198. package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
  199. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  200. package/app/.next-cli-build/server/app/api/locale/route.js +1 -1
  201. package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  202. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +2 -2
  203. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  204. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +2 -2
  205. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  206. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  207. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  208. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  209. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  210. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  211. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  212. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  213. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  214. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
  215. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  216. package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  217. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  218. package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
  219. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  220. package/app/.next-cli-build/server/app/api/models/catalog-sync/route.js +1 -1
  221. package/app/.next-cli-build/server/app/api/models/catalog-sync/route.js.nft.json +1 -1
  222. package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  223. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  224. package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
  225. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  226. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  227. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  228. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  229. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  230. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  231. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  232. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
  233. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
  234. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  235. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  236. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +2 -2
  237. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  238. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  239. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  240. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  241. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  242. package/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js +1 -1
  243. package/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js.nft.json +1 -1
  244. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  245. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  246. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
  247. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
  248. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
  249. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  250. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  251. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  252. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js +1 -1
  253. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
  254. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  255. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  256. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  257. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  258. package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  259. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  260. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
  261. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  262. package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  263. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  264. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +2 -2
  265. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  266. package/app/.next-cli-build/server/app/api/providers/[id]/gcp-projects/route.js +1 -1
  267. package/app/.next-cli-build/server/app/api/providers/[id]/gcp-projects/route.js.nft.json +1 -1
  268. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  269. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  270. package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  271. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  272. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  273. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  274. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  275. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  276. package/app/.next-cli-build/server/app/api/providers/bulk/route.js +1 -1
  277. package/app/.next-cli-build/server/app/api/providers/bulk/route.js.nft.json +1 -1
  278. package/app/.next-cli-build/server/app/api/providers/circuit-breakers/[name]/reset/route.js +1 -1
  279. package/app/.next-cli-build/server/app/api/providers/circuit-breakers/[name]/reset/route.js.nft.json +1 -1
  280. package/app/.next-cli-build/server/app/api/providers/circuit-breakers/route.js +1 -1
  281. package/app/.next-cli-build/server/app/api/providers/circuit-breakers/route.js.nft.json +1 -1
  282. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  283. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  284. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
  285. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  286. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  287. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  288. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +2 -2
  289. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  290. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  291. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  292. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  293. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  294. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/fitness/clear/route.js +1 -1
  295. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/fitness/clear/route.js.nft.json +1 -1
  296. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
  297. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  298. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  299. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  300. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +3 -3
  301. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  302. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +3 -3
  303. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  304. package/app/.next-cli-build/server/app/api/proxy-pools/fitness/clear-all/route.js +1 -1
  305. package/app/.next-cli-build/server/app/api/proxy-pools/fitness/clear-all/route.js.nft.json +1 -1
  306. package/app/.next-cli-build/server/app/api/proxy-pools/fitness/route.js +1 -1
  307. package/app/.next-cli-build/server/app/api/proxy-pools/fitness/route.js.nft.json +1 -1
  308. package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
  309. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  310. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +3 -3
  311. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  312. package/app/.next-cli-build/server/app/api/pxpipe/health/route.js +2 -2
  313. package/app/.next-cli-build/server/app/api/pxpipe/health/route.js.nft.json +1 -1
  314. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js +2 -2
  315. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
  316. package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js +2 -2
  317. package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js.nft.json +1 -1
  318. package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js +2 -2
  319. package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js.nft.json +1 -1
  320. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js +2 -2
  321. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js.nft.json +1 -1
  322. package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js +2 -2
  323. package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js.nft.json +1 -1
  324. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js +2 -2
  325. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
  326. package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js +1 -1
  327. package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js.nft.json +1 -1
  328. package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  329. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  330. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
  331. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  332. package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
  333. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  334. package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  335. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  336. package/app/.next-cli-build/server/app/api/shutdown/route.js +1 -1
  337. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  338. package/app/.next-cli-build/server/app/api/tags/route.js +1 -1
  339. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  340. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  341. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  342. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
  343. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  344. package/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
  345. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  346. package/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
  347. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  348. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  349. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  350. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  351. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  352. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
  353. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  354. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
  355. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  356. package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
  357. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  358. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
  359. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  360. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
  361. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  362. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
  363. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  364. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +3 -3
  365. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  366. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
  367. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
  368. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  369. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  370. package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  371. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  372. package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  373. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  374. package/app/.next-cli-build/server/app/api/usage/logs/route.js +1 -1
  375. package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
  376. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  377. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  378. package/app/.next-cli-build/server/app/api/usage/request-details/[id]/route.js +1 -1
  379. package/app/.next-cli-build/server/app/api/usage/request-details/[id]/route.js.nft.json +1 -1
  380. package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  381. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  382. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  383. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  384. package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  385. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  386. package/app/.next-cli-build/server/app/api/usage/stream/route.js +2 -2
  387. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  388. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  389. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  390. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  391. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  392. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  393. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  394. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
  395. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  396. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  397. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  398. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  399. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  400. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +2 -2
  401. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  402. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
  403. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  404. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  405. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  406. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
  407. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  408. package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  409. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  410. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  411. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  412. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  413. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  414. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  415. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  416. package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  417. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  418. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  419. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  420. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js +1 -1
  421. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js.nft.json +1 -1
  422. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js +1 -1
  423. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js.nft.json +1 -1
  424. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js +1 -1
  425. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js.nft.json +1 -1
  426. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js +1 -1
  427. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js.nft.json +1 -1
  428. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  429. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  430. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  431. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  432. package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  433. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  434. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  435. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  436. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  437. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  438. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  439. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  440. package/app/.next-cli-build/server/app/callback/page.js +2 -2
  441. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  442. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  443. package/app/.next-cli-build/server/app/callback.html +1 -1
  444. package/app/.next-cli-build/server/app/callback.rsc +5 -5
  445. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +5 -5
  446. package/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
  447. package/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +4 -4
  448. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
  449. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +2 -2
  450. package/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
  451. package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  452. package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +6 -6
  453. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
  454. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
  455. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  456. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  457. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +6 -6
  458. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
  459. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_index.segment.rsc +4 -4
  460. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +2 -2
  461. package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  462. package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +7 -7
  463. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
  464. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
  465. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  466. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  467. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +7 -7
  468. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
  469. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_index.segment.rsc +4 -4
  470. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +2 -2
  471. package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  472. package/app/.next-cli-build/server/app/dashboard/combos.rsc +6 -6
  473. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
  474. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
  475. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  476. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  477. package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +6 -6
  478. package/app/.next-cli-build/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
  479. package/app/.next-cli-build/server/app/dashboard/combos.segments/_index.segment.rsc +4 -4
  480. package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -2
  481. package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  482. package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +7 -7
  483. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
  484. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
  485. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  486. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  487. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +7 -7
  488. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
  489. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_index.segment.rsc +4 -4
  490. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +2 -2
  491. package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  492. package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +6 -6
  493. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +2 -2
  494. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +1 -1
  495. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +1 -1
  496. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  497. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  498. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +6 -6
  499. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +1 -1
  500. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +4 -4
  501. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +2 -2
  502. package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  503. package/app/.next-cli-build/server/app/dashboard/mitm.rsc +6 -6
  504. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
  505. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
  506. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  507. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  508. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +6 -6
  509. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
  510. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_index.segment.rsc +4 -4
  511. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +2 -2
  512. package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  513. package/app/.next-cli-build/server/app/dashboard/profile.rsc +6 -6
  514. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
  515. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
  516. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  517. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  518. package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +6 -6
  519. package/app/.next-cli-build/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
  520. package/app/.next-cli-build/server/app/dashboard/profile.segments/_index.segment.rsc +4 -4
  521. package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -2
  522. package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  523. package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +6 -6
  524. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
  525. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
  526. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  527. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  528. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  529. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +6 -6
  530. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
  531. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_index.segment.rsc +4 -4
  532. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +2 -2
  533. package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  534. package/app/.next-cli-build/server/app/dashboard/providers.rsc +6 -6
  535. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
  536. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  537. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  538. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  539. package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +6 -6
  540. package/app/.next-cli-build/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
  541. package/app/.next-cli-build/server/app/dashboard/providers.segments/_index.segment.rsc +4 -4
  542. package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -2
  543. package/app/.next-cli-build/server/app/dashboard/proxy-fitness.html +1 -1
  544. package/app/.next-cli-build/server/app/dashboard/proxy-fitness.rsc +6 -6
  545. package/app/.next-cli-build/server/app/dashboard/proxy-fitness.segments/!KGRhc2hib2FyZCk/dashboard/proxy-fitness/__PAGE__.segment.rsc +2 -2
  546. package/app/.next-cli-build/server/app/dashboard/proxy-fitness.segments/!KGRhc2hib2FyZCk/dashboard/proxy-fitness.segment.rsc +1 -1
  547. package/app/.next-cli-build/server/app/dashboard/proxy-fitness.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  548. package/app/.next-cli-build/server/app/dashboard/proxy-fitness.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  549. package/app/.next-cli-build/server/app/dashboard/proxy-fitness.segments/_full.segment.rsc +6 -6
  550. package/app/.next-cli-build/server/app/dashboard/proxy-fitness.segments/_head.segment.rsc +1 -1
  551. package/app/.next-cli-build/server/app/dashboard/proxy-fitness.segments/_index.segment.rsc +4 -4
  552. package/app/.next-cli-build/server/app/dashboard/proxy-fitness.segments/_tree.segment.rsc +2 -2
  553. package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  554. package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +6 -6
  555. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
  556. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
  557. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  558. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  559. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +6 -6
  560. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
  561. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +4 -4
  562. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +2 -2
  563. package/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
  564. package/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +6 -6
  565. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +2 -2
  566. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe.segment.rsc +1 -1
  567. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  568. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  569. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +6 -6
  570. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_head.segment.rsc +1 -1
  571. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_index.segment.rsc +4 -4
  572. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +2 -2
  573. package/app/.next-cli-build/server/app/dashboard/quota.html +2 -2
  574. package/app/.next-cli-build/server/app/dashboard/quota.rsc +7 -7
  575. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
  576. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
  577. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  578. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  579. package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +7 -7
  580. package/app/.next-cli-build/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
  581. package/app/.next-cli-build/server/app/dashboard/quota.segments/_index.segment.rsc +4 -4
  582. package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +2 -2
  583. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +2 -2
  584. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  585. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  586. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  587. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +4 -4
  588. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +4 -4
  589. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  590. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +4 -4
  591. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
  592. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
  593. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
  594. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
  595. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
  596. package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
  597. package/app/.next-cli-build/server/app/dashboard/skills.rsc +6 -6
  598. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +2 -2
  599. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills.segment.rsc +1 -1
  600. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  601. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  602. package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +6 -6
  603. package/app/.next-cli-build/server/app/dashboard/skills.segments/_head.segment.rsc +1 -1
  604. package/app/.next-cli-build/server/app/dashboard/skills.segments/_index.segment.rsc +4 -4
  605. package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +2 -2
  606. package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
  607. package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +6 -6
  608. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +2 -2
  609. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver.segment.rsc +1 -1
  610. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  611. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  612. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +6 -6
  613. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_head.segment.rsc +1 -1
  614. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_index.segment.rsc +4 -4
  615. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +2 -2
  616. package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  617. package/app/.next-cli-build/server/app/dashboard/translator.rsc +6 -6
  618. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
  619. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
  620. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  621. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  622. package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +6 -6
  623. package/app/.next-cli-build/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
  624. package/app/.next-cli-build/server/app/dashboard/translator.segments/_index.segment.rsc +4 -4
  625. package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +2 -2
  626. package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  627. package/app/.next-cli-build/server/app/dashboard/usage.rsc +6 -6
  628. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
  629. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
  630. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  631. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  632. package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +6 -6
  633. package/app/.next-cli-build/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
  634. package/app/.next-cli-build/server/app/dashboard/usage.segments/_index.segment.rsc +4 -4
  635. package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +2 -2
  636. package/app/.next-cli-build/server/app/dashboard.html +1 -1
  637. package/app/.next-cli-build/server/app/dashboard.rsc +6 -6
  638. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
  639. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  640. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  641. package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +6 -6
  642. package/app/.next-cli-build/server/app/dashboard.segments/_head.segment.rsc +1 -1
  643. package/app/.next-cli-build/server/app/dashboard.segments/_index.segment.rsc +4 -4
  644. package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +2 -2
  645. package/app/.next-cli-build/server/app/favicon.ico/route.js +1 -1
  646. package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
  647. package/app/.next-cli-build/server/app/landing/page.js +2 -2
  648. package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  649. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  650. package/app/.next-cli-build/server/app/landing.html +1 -1
  651. package/app/.next-cli-build/server/app/landing.rsc +5 -5
  652. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +5 -5
  653. package/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
  654. package/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +4 -4
  655. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
  656. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +2 -2
  657. package/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
  658. package/app/.next-cli-build/server/app/login/page.js +2 -2
  659. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  660. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  661. package/app/.next-cli-build/server/app/login.html +1 -1
  662. package/app/.next-cli-build/server/app/login.rsc +5 -5
  663. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +5 -5
  664. package/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
  665. package/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +4 -4
  666. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
  667. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  668. package/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
  669. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js +1 -1
  670. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  671. package/app/.next-cli-build/server/app/masuk/page.js +2 -2
  672. package/app/.next-cli-build/server/app/masuk/page.js.nft.json +1 -1
  673. package/app/.next-cli-build/server/app/masuk/page_client-reference-manifest.js +1 -1
  674. package/app/.next-cli-build/server/app-paths-manifest.json +27 -20
  675. package/app/.next-cli-build/server/chunks/124.js +1 -0
  676. package/app/.next-cli-build/server/chunks/1248.js +1 -1
  677. package/app/.next-cli-build/server/chunks/1253.js +1 -1
  678. package/app/.next-cli-build/server/chunks/127.js +1 -1
  679. package/app/.next-cli-build/server/chunks/{154.js → 1579.js} +26 -8
  680. package/app/.next-cli-build/server/chunks/1685.js +2 -2
  681. package/app/.next-cli-build/server/chunks/1688.js +2 -2
  682. package/app/.next-cli-build/server/chunks/1945.js +1 -1
  683. package/app/.next-cli-build/server/chunks/1950.js +66 -0
  684. package/app/.next-cli-build/server/chunks/2365.js +1 -0
  685. package/app/.next-cli-build/server/chunks/2411.js +1 -1
  686. package/app/.next-cli-build/server/chunks/2504.js +1 -1
  687. package/app/.next-cli-build/server/chunks/2557.js +11 -17
  688. package/app/.next-cli-build/server/chunks/2732.js +1 -1
  689. package/app/.next-cli-build/server/chunks/2884.js +1 -1
  690. package/app/.next-cli-build/server/chunks/2927.js +2 -2
  691. package/app/.next-cli-build/server/chunks/3040.js +2 -2
  692. package/app/.next-cli-build/server/chunks/314.js +1 -1
  693. package/app/.next-cli-build/server/chunks/3398.js +8 -8
  694. package/app/.next-cli-build/server/chunks/3405.js +2 -2
  695. package/app/.next-cli-build/server/chunks/3519.js +2 -2
  696. package/app/.next-cli-build/server/chunks/3621.js +1 -0
  697. package/app/.next-cli-build/server/chunks/3750.js +1 -1
  698. package/app/.next-cli-build/server/chunks/3912.js +9 -0
  699. package/app/.next-cli-build/server/chunks/3946.js +1 -0
  700. package/app/.next-cli-build/server/chunks/4004.js +2 -2
  701. package/app/.next-cli-build/server/chunks/4043.js +1 -0
  702. package/app/.next-cli-build/server/chunks/4105.js +1 -1
  703. package/app/.next-cli-build/server/chunks/4502.js +13 -15
  704. package/app/.next-cli-build/server/chunks/4539.js +2 -2
  705. package/app/.next-cli-build/server/chunks/{8011.js → 4549.js} +1 -2
  706. package/app/.next-cli-build/server/chunks/4574.js +53 -49
  707. package/app/.next-cli-build/server/chunks/4836.js +1 -1
  708. package/app/.next-cli-build/server/chunks/5300.js +1 -1
  709. package/app/.next-cli-build/server/chunks/5538.js +1 -0
  710. package/app/.next-cli-build/server/chunks/5570.js +1 -0
  711. package/app/.next-cli-build/server/chunks/5577.js +1 -1
  712. package/app/.next-cli-build/server/chunks/5598.js +1 -1
  713. package/app/.next-cli-build/server/chunks/{6807.js → 5860.js} +1 -1
  714. package/app/.next-cli-build/server/chunks/6165.js +2 -2
  715. package/app/.next-cli-build/server/chunks/622.js +1 -0
  716. package/app/.next-cli-build/server/chunks/6385.js +1 -1
  717. package/app/.next-cli-build/server/chunks/6589.js +7 -0
  718. package/app/.next-cli-build/server/chunks/6723.js +1 -1
  719. package/app/.next-cli-build/server/chunks/6737.js +1 -0
  720. package/app/.next-cli-build/server/chunks/7006.js +2 -2
  721. package/app/.next-cli-build/server/chunks/7074.js +3 -3
  722. package/app/.next-cli-build/server/chunks/7104.js +1 -1
  723. package/app/.next-cli-build/server/chunks/7502.js +1 -1
  724. package/app/.next-cli-build/server/chunks/7656.js +27 -0
  725. package/app/.next-cli-build/server/chunks/7693.js +2 -2
  726. package/app/.next-cli-build/server/chunks/7842.js +1 -0
  727. package/app/.next-cli-build/server/chunks/7863.js +1 -1
  728. package/app/.next-cli-build/server/chunks/7901.js +1 -0
  729. package/app/.next-cli-build/server/chunks/7938.js +2 -2
  730. package/app/.next-cli-build/server/chunks/7950.js +1 -1
  731. package/app/.next-cli-build/server/chunks/8104.js +1 -0
  732. package/app/.next-cli-build/server/chunks/8413.js +1 -1
  733. package/app/.next-cli-build/server/chunks/8691.js +2 -2
  734. package/app/.next-cli-build/server/chunks/8786.js +1 -0
  735. package/app/.next-cli-build/server/chunks/88.js +1 -1
  736. package/app/.next-cli-build/server/chunks/8941.js +1 -1
  737. package/app/.next-cli-build/server/chunks/912.js +1 -1
  738. package/app/.next-cli-build/server/chunks/{2764.js → 9306.js} +1 -1
  739. package/app/.next-cli-build/server/chunks/9404.js +1 -0
  740. package/app/.next-cli-build/server/chunks/9808.js +7 -0
  741. package/app/.next-cli-build/server/chunks/9974.js +1 -1
  742. package/app/.next-cli-build/server/instrumentation.js +1 -1
  743. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  744. package/app/.next-cli-build/server/middleware-react-loadable-manifest.js +1 -1
  745. package/app/.next-cli-build/server/middleware.js +5 -5
  746. package/app/.next-cli-build/server/pages/404.html +1 -1
  747. package/app/.next-cli-build/server/pages/500.html +1 -1
  748. package/app/.next-cli-build/server/server-reference-manifest.js +1 -1
  749. package/app/.next-cli-build/server/server-reference-manifest.json +1 -1
  750. package/app/.next-cli-build/static/E9fXOaI2LcUxzAal-qB_G/_buildManifest.js +1 -0
  751. package/app/.next-cli-build/static/chunks/1342-9835342a614a64b4.js +1 -0
  752. package/app/.next-cli-build/static/chunks/{2884.9a2db949e26c550b.js → 2884.46157ab83818a990.js} +1 -1
  753. package/app/.next-cli-build/static/chunks/3178-c8b2ded55709f2d2.js +1 -0
  754. package/app/.next-cli-build/static/chunks/{3257.4095ef9514389f69.js → 3257.562cf9b39c3d52e4.js} +1 -1
  755. package/app/.next-cli-build/static/chunks/{3386.c9a6be6fd4e818a6.js → 3386.1bfc303d22916972.js} +1 -1
  756. package/app/.next-cli-build/static/chunks/3758-f820cbe5bbed8ed5.js +66 -0
  757. package/app/.next-cli-build/static/chunks/3809.a27517d640eed59c.js +1 -0
  758. package/app/.next-cli-build/static/chunks/{406.7447d162fc1137ef.js → 406.8e37f15c32fac09d.js} +1 -1
  759. package/app/.next-cli-build/static/chunks/4385-e3eb6b7c4b7dfb22.js +1 -0
  760. package/app/.next-cli-build/static/chunks/4964.086f3a95e52cdf64.js +7 -0
  761. package/app/.next-cli-build/static/chunks/5331.128ab40951332f33.js +1 -0
  762. package/app/.next-cli-build/static/chunks/{5337.0f3e559687a6f415.js → 5337.6a61522e6c696f60.js} +1 -1
  763. package/app/.next-cli-build/static/chunks/{6474.d4e25fbe7c09068f.js → 6474.fd5dccfa8449f5f9.js} +1 -1
  764. package/app/.next-cli-build/static/chunks/{6909.20637e0929ccd959.js → 6909.929d7fd212a31a66.js} +1 -1
  765. package/app/.next-cli-build/static/chunks/{8914-58cf85ef9bb0b6e0.js → 8914-cff0fbfad05fc69b.js} +3 -3
  766. package/app/.next-cli-build/static/chunks/{9131-f4afa0414d45c1d1.js → 9131-8865c2f5b2d104bf.js} +2 -2
  767. package/app/.next-cli-build/static/chunks/{9146.7174fc5feff1bf58.js → 9146.51c9e590114c99ab.js} +1 -1
  768. package/app/.next-cli-build/static/chunks/941.1766407a48f890e1.js +1 -0
  769. package/app/.next-cli-build/static/chunks/{5338-bca3ce9343d90c4f.js → 9643-1650acc296f77253.js} +29 -11
  770. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/basic-chat/{page-8d2cf057877e520c.js → page-96728a43a2ce920c.js} +1 -1
  771. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/{page-7c93b16b43de2c8f.js → page-3004f4af215b215a.js} +1 -1
  772. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/{page-9854c7db29f0cb69.js → page-71a1f0244d4d1287.js} +1 -1
  773. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-c15b5f331606e3aa.js +1 -0
  774. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/{page-91427dc2416753e5.js → page-7cf7e96e3f12d777.js} +1 -1
  775. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-e79f5fbcbd3662d0.js +1 -0
  776. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/{page-07eea31f525f94ed.js → page-7e8a0e7bafdd972d.js} +2 -2
  777. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/{page-7caa1878034401a6.js → page-5bd5188ca9e08f60.js} +1 -1
  778. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/combo/[id]/{page-15c5617ad2c27966.js → page-b19583351ad0149d.js} +2 -2
  779. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/web/{page-fb0d7d79c84c197c.js → page-5496dd8e8a1e4a1e.js} +1 -1
  780. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/{page-01af83ff8590888e.js → page-6114fb82946445cb.js} +1 -1
  781. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-c30fcb1ed5f77411.js +1 -0
  782. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/{page-97b63031e33bafba.js → page-202871f51690bc61.js} +1 -1
  783. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-728c2dc02d8273eb.js +27 -0
  784. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/new/{page-a40e2e0af6a60760.js → page-8cf917b2f8241886.js} +1 -1
  785. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/{page-bcd99ea45b8e3f0b.js → page-6febfa2b9b61037f.js} +1 -1
  786. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/proxy-fitness/{page-a6fbe7c554c97288.js → page-c54081ae07c59029.js} +1 -1
  787. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/proxy-pools/{page-c8a179ca8b3961a1.js → page-d35b045cc4d9e513.js} +2 -2
  788. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/pxpipe/{page-1ccca37edb21a2c2.js → page-55629dba8eb114d7.js} +1 -1
  789. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-61d3b94595ff6592.js +1 -0
  790. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/{page-6b6aa4440b9bbdd4.js → page-5a509b067cce0c79.js} +1 -1
  791. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/{page-540d37c2987cd9a7.js → page-c629e15e8e3f798f.js} +1 -1
  792. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/translator/{page-14b9b1f4c2cfffbb.js → page-607c073b7406e31e.js} +1 -1
  793. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/{page-1cdf081b553a1b83.js → page-565722d50146d9d0.js} +1 -1
  794. package/app/.next-cli-build/static/chunks/app/(dashboard)/layout-829e3939151d724b.js +1 -0
  795. package/app/.next-cli-build/static/chunks/app/_global-error/page-1bef1cfa12175e17.js +1 -0
  796. package/app/.next-cli-build/static/chunks/app/api/auth/check/route-1bef1cfa12175e17.js +1 -0
  797. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-1bef1cfa12175e17.js +1 -0
  798. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-1bef1cfa12175e17.js +1 -0
  799. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-1bef1cfa12175e17.js +1 -0
  800. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-1bef1cfa12175e17.js +1 -0
  801. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-1bef1cfa12175e17.js +1 -0
  802. package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-1bef1cfa12175e17.js +1 -0
  803. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-1bef1cfa12175e17.js +1 -0
  804. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-1bef1cfa12175e17.js +1 -0
  805. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-1bef1cfa12175e17.js +1 -0
  806. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-1bef1cfa12175e17.js +1 -0
  807. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-1bef1cfa12175e17.js +1 -0
  808. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-1bef1cfa12175e17.js +1 -0
  809. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codewhale-settings/route-1bef1cfa12175e17.js +1 -0
  810. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-1bef1cfa12175e17.js +1 -0
  811. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-1bef1cfa12175e17.js +1 -0
  812. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-1bef1cfa12175e17.js +1 -0
  813. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-1bef1cfa12175e17.js +1 -0
  814. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-1bef1cfa12175e17.js +1 -0
  815. package/app/.next-cli-build/static/chunks/app/api/cli-tools/crush-settings/route-1bef1cfa12175e17.js +1 -0
  816. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-1bef1cfa12175e17.js +1 -0
  817. package/app/.next-cli-build/static/chunks/app/api/cli-tools/devin-settings/route-1bef1cfa12175e17.js +1 -0
  818. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-1bef1cfa12175e17.js +1 -0
  819. package/app/.next-cli-build/static/chunks/app/api/cli-tools/forge-settings/route-1bef1cfa12175e17.js +1 -0
  820. package/app/.next-cli-build/static/chunks/app/api/cli-tools/grok-build-settings/route-1bef1cfa12175e17.js +1 -0
  821. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-1bef1cfa12175e17.js +1 -0
  822. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-1bef1cfa12175e17.js +1 -0
  823. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-1bef1cfa12175e17.js +1 -0
  824. package/app/.next-cli-build/static/chunks/app/api/cli-tools/omp-settings/route-1bef1cfa12175e17.js +1 -0
  825. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-1bef1cfa12175e17.js +1 -0
  826. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-1bef1cfa12175e17.js +1 -0
  827. package/app/.next-cli-build/static/chunks/app/api/cli-tools/pi-settings/route-1bef1cfa12175e17.js +1 -0
  828. package/app/.next-cli-build/static/chunks/app/api/cli-tools/smelt-settings/route-1bef1cfa12175e17.js +1 -0
  829. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-1bef1cfa12175e17.js +1 -0
  830. package/app/.next-cli-build/static/chunks/app/api/combos/presets/route-1bef1cfa12175e17.js +1 -0
  831. package/app/.next-cli-build/static/chunks/app/api/combos/route-1bef1cfa12175e17.js +1 -0
  832. package/app/.next-cli-build/static/chunks/app/api/headroom/extras/route-1bef1cfa12175e17.js +1 -0
  833. package/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-1bef1cfa12175e17.js +1 -0
  834. package/app/.next-cli-build/static/chunks/app/api/headroom/restart/route-1bef1cfa12175e17.js +1 -0
  835. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-1bef1cfa12175e17.js +1 -0
  836. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-1bef1cfa12175e17.js +1 -0
  837. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-1bef1cfa12175e17.js +1 -0
  838. package/app/.next-cli-build/static/chunks/app/api/health/route-1bef1cfa12175e17.js +1 -0
  839. package/app/.next-cli-build/static/chunks/app/api/init/route-1bef1cfa12175e17.js +1 -0
  840. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-1bef1cfa12175e17.js +1 -0
  841. package/app/.next-cli-build/static/chunks/app/api/keys/route-1bef1cfa12175e17.js +1 -0
  842. package/app/.next-cli-build/static/chunks/app/api/locale/route-1bef1cfa12175e17.js +1 -0
  843. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-1bef1cfa12175e17.js +1 -0
  844. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-1bef1cfa12175e17.js +1 -0
  845. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-1bef1cfa12175e17.js +1 -0
  846. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-1bef1cfa12175e17.js +1 -0
  847. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-1bef1cfa12175e17.js +1 -0
  848. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-1bef1cfa12175e17.js +1 -0
  849. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-1bef1cfa12175e17.js +1 -0
  850. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-1bef1cfa12175e17.js +1 -0
  851. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-1bef1cfa12175e17.js +1 -0
  852. package/app/.next-cli-build/static/chunks/app/api/models/catalog-sync/route-1bef1cfa12175e17.js +1 -0
  853. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-1bef1cfa12175e17.js +1 -0
  854. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-1bef1cfa12175e17.js +1 -0
  855. package/app/.next-cli-build/static/chunks/app/api/models/route-1bef1cfa12175e17.js +1 -0
  856. package/app/.next-cli-build/static/chunks/app/api/models/test/route-1bef1cfa12175e17.js +1 -0
  857. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-1bef1cfa12175e17.js +1 -0
  858. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-1bef1cfa12175e17.js +1 -0
  859. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-1bef1cfa12175e17.js +1 -0
  860. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-1bef1cfa12175e17.js +1 -0
  861. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-1bef1cfa12175e17.js +1 -0
  862. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-1bef1cfa12175e17.js +1 -0
  863. package/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/bulk-import/route-1bef1cfa12175e17.js +1 -0
  864. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-1bef1cfa12175e17.js +1 -0
  865. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-1bef1cfa12175e17.js +1 -0
  866. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-1bef1cfa12175e17.js +1 -0
  867. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-1bef1cfa12175e17.js +1 -0
  868. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-1bef1cfa12175e17.js +1 -0
  869. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-1bef1cfa12175e17.js +1 -0
  870. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-1bef1cfa12175e17.js +1 -0
  871. package/app/.next-cli-build/static/chunks/app/api/pricing/route-1bef1cfa12175e17.js +1 -0
  872. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-1bef1cfa12175e17.js +1 -0
  873. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-1bef1cfa12175e17.js +1 -0
  874. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-1bef1cfa12175e17.js +1 -0
  875. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/gcp-projects/route-1bef1cfa12175e17.js +1 -0
  876. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-1bef1cfa12175e17.js +1 -0
  877. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-1bef1cfa12175e17.js +1 -0
  878. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-1bef1cfa12175e17.js +1 -0
  879. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-1bef1cfa12175e17.js +1 -0
  880. package/app/.next-cli-build/static/chunks/app/api/providers/bulk/route-1bef1cfa12175e17.js +1 -0
  881. package/app/.next-cli-build/static/chunks/app/api/providers/circuit-breakers/[name]/reset/route-1bef1cfa12175e17.js +1 -0
  882. package/app/.next-cli-build/static/chunks/app/api/providers/circuit-breakers/route-1bef1cfa12175e17.js +1 -0
  883. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-1bef1cfa12175e17.js +1 -0
  884. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-1bef1cfa12175e17.js +1 -0
  885. package/app/.next-cli-build/static/chunks/app/api/providers/route-1bef1cfa12175e17.js +1 -0
  886. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-1bef1cfa12175e17.js +1 -0
  887. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-1bef1cfa12175e17.js +1 -0
  888. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-1bef1cfa12175e17.js +1 -0
  889. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/fitness/clear/route-1bef1cfa12175e17.js +1 -0
  890. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-1bef1cfa12175e17.js +1 -0
  891. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-1bef1cfa12175e17.js +1 -0
  892. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-1bef1cfa12175e17.js +1 -0
  893. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-1bef1cfa12175e17.js +1 -0
  894. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/fitness/clear-all/route-1bef1cfa12175e17.js +1 -0
  895. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/fitness/route-1bef1cfa12175e17.js +1 -0
  896. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-1bef1cfa12175e17.js +1 -0
  897. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-1bef1cfa12175e17.js +1 -0
  898. package/app/.next-cli-build/static/chunks/app/api/pxpipe/health/route-1bef1cfa12175e17.js +1 -0
  899. package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-1bef1cfa12175e17.js +1 -0
  900. package/app/.next-cli-build/static/chunks/app/api/pxpipe/logs/route-1bef1cfa12175e17.js +1 -0
  901. package/app/.next-cli-build/static/chunks/app/api/pxpipe/restart/route-1bef1cfa12175e17.js +1 -0
  902. package/app/.next-cli-build/static/chunks/app/api/pxpipe/start/route-1bef1cfa12175e17.js +1 -0
  903. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stats/route-1bef1cfa12175e17.js +1 -0
  904. package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-1bef1cfa12175e17.js +1 -0
  905. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stop/route-1bef1cfa12175e17.js +1 -0
  906. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-1bef1cfa12175e17.js +1 -0
  907. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-1bef1cfa12175e17.js +1 -0
  908. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-1bef1cfa12175e17.js +1 -0
  909. package/app/.next-cli-build/static/chunks/app/api/settings/route-1bef1cfa12175e17.js +1 -0
  910. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-1bef1cfa12175e17.js +1 -0
  911. package/app/.next-cli-build/static/chunks/app/api/tags/route-1bef1cfa12175e17.js +1 -0
  912. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-1bef1cfa12175e17.js +1 -0
  913. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-1bef1cfa12175e17.js +1 -0
  914. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-1bef1cfa12175e17.js +1 -0
  915. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-1bef1cfa12175e17.js +1 -0
  916. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-1bef1cfa12175e17.js +1 -0
  917. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-1bef1cfa12175e17.js +1 -0
  918. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-1bef1cfa12175e17.js +1 -0
  919. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-1bef1cfa12175e17.js +1 -0
  920. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-1bef1cfa12175e17.js +1 -0
  921. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-1bef1cfa12175e17.js +1 -0
  922. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-1bef1cfa12175e17.js +1 -0
  923. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-1bef1cfa12175e17.js +1 -0
  924. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-1bef1cfa12175e17.js +1 -0
  925. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-1bef1cfa12175e17.js +1 -0
  926. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-1bef1cfa12175e17.js +1 -0
  927. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-1bef1cfa12175e17.js +1 -0
  928. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-1bef1cfa12175e17.js +1 -0
  929. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-1bef1cfa12175e17.js +1 -0
  930. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-1bef1cfa12175e17.js +1 -0
  931. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/[id]/route-1bef1cfa12175e17.js +1 -0
  932. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-1bef1cfa12175e17.js +1 -0
  933. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-1bef1cfa12175e17.js +1 -0
  934. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-1bef1cfa12175e17.js +1 -0
  935. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-1bef1cfa12175e17.js +1 -0
  936. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-1bef1cfa12175e17.js +1 -0
  937. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-1bef1cfa12175e17.js +1 -0
  938. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-1bef1cfa12175e17.js +1 -0
  939. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-1bef1cfa12175e17.js +1 -0
  940. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-1bef1cfa12175e17.js +1 -0
  941. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-1bef1cfa12175e17.js +1 -0
  942. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-1bef1cfa12175e17.js +1 -0
  943. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-1bef1cfa12175e17.js +1 -0
  944. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-1bef1cfa12175e17.js +1 -0
  945. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-1bef1cfa12175e17.js +1 -0
  946. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-1bef1cfa12175e17.js +1 -0
  947. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-1bef1cfa12175e17.js +1 -0
  948. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-1bef1cfa12175e17.js +1 -0
  949. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-1bef1cfa12175e17.js +1 -0
  950. package/app/.next-cli-build/static/chunks/app/api/v1/route-1bef1cfa12175e17.js +1 -0
  951. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-1bef1cfa12175e17.js +1 -0
  952. package/app/.next-cli-build/static/chunks/app/api/v1/videos/[id]/route-1bef1cfa12175e17.js +1 -0
  953. package/app/.next-cli-build/static/chunks/app/api/v1/videos/edits/route-1bef1cfa12175e17.js +1 -0
  954. package/app/.next-cli-build/static/chunks/app/api/v1/videos/extensions/route-1bef1cfa12175e17.js +1 -0
  955. package/app/.next-cli-build/static/chunks/app/api/v1/videos/generations/route-1bef1cfa12175e17.js +1 -0
  956. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-1bef1cfa12175e17.js +1 -0
  957. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-1bef1cfa12175e17.js +1 -0
  958. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-1bef1cfa12175e17.js +1 -0
  959. package/app/.next-cli-build/static/chunks/app/api/version/route-1bef1cfa12175e17.js +1 -0
  960. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-1bef1cfa12175e17.js +1 -0
  961. package/app/.next-cli-build/static/chunks/app/api/version/update/route-1bef1cfa12175e17.js +1 -0
  962. package/app/.next-cli-build/static/chunks/app/callback/{page-501f35fcad0ae65c.js → page-7f7a73f46ef0e567.js} +1 -1
  963. package/app/.next-cli-build/static/chunks/app/landing/page-1c9aceed2518a7cf.js +1 -0
  964. package/app/.next-cli-build/static/chunks/app/{layout-02633570bc545d3b.js → layout-8ba5cd62a94327a0.js} +1 -1
  965. package/app/.next-cli-build/static/chunks/app/login/{page-3bfabe4dc89ad6c4.js → page-a3af87402da40101.js} +1 -1
  966. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-1bef1cfa12175e17.js +1 -0
  967. package/app/.next-cli-build/static/chunks/app/masuk/{page-d24ad3ff5c276f36.js → page-23714324c6ceceda.js} +1 -1
  968. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-1bef1cfa12175e17.js +1 -0
  969. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-1bef1cfa12175e17.js +1 -0
  970. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-1bef1cfa12175e17.js +1 -0
  971. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-1bef1cfa12175e17.js +1 -0
  972. package/app/.next-cli-build/static/chunks/webpack-8d5df0eb3e3a6c37.js +1 -0
  973. package/app/.next-cli-build/static/css/3ad4070e34d43663.css +1 -0
  974. package/app/custom-server.js +37 -37
  975. package/app/package.json +1 -3
  976. package/app/public/i18n/literals/fa.json +17 -1
  977. package/app/public/providers/codewhale.svg +9 -0
  978. package/app/public/providers/crush.png +0 -0
  979. package/app/public/providers/forge.png +0 -0
  980. package/app/public/providers/omp.png +0 -0
  981. package/app/public/providers/pi.svg +6 -0
  982. package/app/public/providers/smelt.svg +101 -0
  983. package/app/src/lib/db/adapters/betterSqliteAdapter.js +12 -4
  984. package/app/src/lib/db/adapters/nodeSqliteAdapter.js +12 -3
  985. package/app/src/lib/db/adapters/sqljsAdapter.js +13 -6
  986. package/app/src/lib/db/migrate.js +299 -299
  987. package/app/src/mitm/server.js +27 -27
  988. package/app/src/shared/services/quotaAutoPing.js +313 -313
  989. package/hooks/sqliteRuntime.js +188 -188
  990. package/package.json +2 -5
  991. package/src/cli/api/client.js +556 -556
  992. package/src/cli/commands/xaiVideo.js +300 -300
  993. package/src/cli/menus/combos.js +0 -103
  994. package/src/cli/menus/providers.js +868 -858
  995. package/src/cli/menus/settings.js +204 -204
  996. package/src/cli/utils/modelSelector.js +189 -51
  997. package/app/.next-cli-build/server/chunks/1725.js +0 -1
  998. package/app/.next-cli-build/server/chunks/2445.js +0 -1
  999. package/app/.next-cli-build/server/chunks/32.js +0 -9
  1000. package/app/.next-cli-build/server/chunks/3539.js +0 -1
  1001. package/app/.next-cli-build/server/chunks/3736.js +0 -1
  1002. package/app/.next-cli-build/server/chunks/4029.js +0 -7
  1003. package/app/.next-cli-build/server/chunks/4816.js +0 -1
  1004. package/app/.next-cli-build/server/chunks/5006.js +0 -7
  1005. package/app/.next-cli-build/server/chunks/5009.js +0 -1
  1006. package/app/.next-cli-build/server/chunks/5050.js +0 -1
  1007. package/app/.next-cli-build/server/chunks/5198.js +0 -1
  1008. package/app/.next-cli-build/server/chunks/5302.js +0 -1
  1009. package/app/.next-cli-build/server/chunks/6120.js +0 -1
  1010. package/app/.next-cli-build/server/chunks/6793.js +0 -1
  1011. package/app/.next-cli-build/server/chunks/6931.js +0 -1
  1012. package/app/.next-cli-build/server/chunks/7425.js +0 -1
  1013. package/app/.next-cli-build/server/chunks/7592.js +0 -66
  1014. package/app/.next-cli-build/server/chunks/8356.js +0 -1
  1015. package/app/.next-cli-build/server/chunks/8695.js +0 -1
  1016. package/app/.next-cli-build/server/chunks/9162.js +0 -1
  1017. package/app/.next-cli-build/server/chunks/9614.js +0 -7
  1018. package/app/.next-cli-build/server/chunks/9784.js +0 -1
  1019. package/app/.next-cli-build/server/chunks/9984.js +0 -1
  1020. package/app/.next-cli-build/static/chunks/1049.adc9916d5a6b95f8.js +0 -7
  1021. package/app/.next-cli-build/static/chunks/1399-71db70ab3102530f.js +0 -1
  1022. package/app/.next-cli-build/static/chunks/2318-288d3ff89298deb7.js +0 -66
  1023. package/app/.next-cli-build/static/chunks/2940-b6dd0c5879412cea.js +0 -1
  1024. package/app/.next-cli-build/static/chunks/4385-ce7b55264de51d47.js +0 -1
  1025. package/app/.next-cli-build/static/chunks/5331.049b1512362de1f4.js +0 -1
  1026. package/app/.next-cli-build/static/chunks/5334-4a80ee40870b70ae.js +0 -1
  1027. package/app/.next-cli-build/static/chunks/5479-20746781c1de7eb2.js +0 -1
  1028. package/app/.next-cli-build/static/chunks/6676.a4b23fc11d3037fd.js +0 -1
  1029. package/app/.next-cli-build/static/chunks/9078.ea6aeb4af0c25e5d.js +0 -7
  1030. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-5de110c9d826db7a.js +0 -1
  1031. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-e19a996981cbb56d.js +0 -1
  1032. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-694ccd630a55547c.js +0 -1
  1033. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-1fdc31375a54bb60.js +0 -27
  1034. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-fce8c9b1ef1963db.js +0 -1
  1035. package/app/.next-cli-build/static/chunks/app/(dashboard)/layout-8f58062b0584c945.js +0 -1
  1036. package/app/.next-cli-build/static/chunks/app/_global-error/page-17aa0c4536dd4f4c.js +0 -1
  1037. package/app/.next-cli-build/static/chunks/app/api/auth/check/route-17aa0c4536dd4f4c.js +0 -1
  1038. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-17aa0c4536dd4f4c.js +0 -1
  1039. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-17aa0c4536dd4f4c.js +0 -1
  1040. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-17aa0c4536dd4f4c.js +0 -1
  1041. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-17aa0c4536dd4f4c.js +0 -1
  1042. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-17aa0c4536dd4f4c.js +0 -1
  1043. package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-17aa0c4536dd4f4c.js +0 -1
  1044. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-17aa0c4536dd4f4c.js +0 -1
  1045. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-17aa0c4536dd4f4c.js +0 -1
  1046. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-17aa0c4536dd4f4c.js +0 -1
  1047. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-17aa0c4536dd4f4c.js +0 -1
  1048. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-17aa0c4536dd4f4c.js +0 -1
  1049. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-17aa0c4536dd4f4c.js +0 -1
  1050. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-17aa0c4536dd4f4c.js +0 -1
  1051. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-17aa0c4536dd4f4c.js +0 -1
  1052. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-17aa0c4536dd4f4c.js +0 -1
  1053. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-17aa0c4536dd4f4c.js +0 -1
  1054. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-17aa0c4536dd4f4c.js +0 -1
  1055. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-17aa0c4536dd4f4c.js +0 -1
  1056. package/app/.next-cli-build/static/chunks/app/api/cli-tools/devin-settings/route-17aa0c4536dd4f4c.js +0 -1
  1057. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-17aa0c4536dd4f4c.js +0 -1
  1058. package/app/.next-cli-build/static/chunks/app/api/cli-tools/grok-build-settings/route-17aa0c4536dd4f4c.js +0 -1
  1059. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-17aa0c4536dd4f4c.js +0 -1
  1060. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-17aa0c4536dd4f4c.js +0 -1
  1061. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-17aa0c4536dd4f4c.js +0 -1
  1062. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-17aa0c4536dd4f4c.js +0 -1
  1063. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-17aa0c4536dd4f4c.js +0 -1
  1064. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-17aa0c4536dd4f4c.js +0 -1
  1065. package/app/.next-cli-build/static/chunks/app/api/combos/route-17aa0c4536dd4f4c.js +0 -1
  1066. package/app/.next-cli-build/static/chunks/app/api/headroom/extras/route-17aa0c4536dd4f4c.js +0 -1
  1067. package/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-17aa0c4536dd4f4c.js +0 -1
  1068. package/app/.next-cli-build/static/chunks/app/api/headroom/restart/route-17aa0c4536dd4f4c.js +0 -1
  1069. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-17aa0c4536dd4f4c.js +0 -1
  1070. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-17aa0c4536dd4f4c.js +0 -1
  1071. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-17aa0c4536dd4f4c.js +0 -1
  1072. package/app/.next-cli-build/static/chunks/app/api/health/route-17aa0c4536dd4f4c.js +0 -1
  1073. package/app/.next-cli-build/static/chunks/app/api/init/route-17aa0c4536dd4f4c.js +0 -1
  1074. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-17aa0c4536dd4f4c.js +0 -1
  1075. package/app/.next-cli-build/static/chunks/app/api/keys/route-17aa0c4536dd4f4c.js +0 -1
  1076. package/app/.next-cli-build/static/chunks/app/api/locale/route-17aa0c4536dd4f4c.js +0 -1
  1077. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-17aa0c4536dd4f4c.js +0 -1
  1078. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-17aa0c4536dd4f4c.js +0 -1
  1079. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-17aa0c4536dd4f4c.js +0 -1
  1080. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-17aa0c4536dd4f4c.js +0 -1
  1081. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-17aa0c4536dd4f4c.js +0 -1
  1082. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-17aa0c4536dd4f4c.js +0 -1
  1083. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-17aa0c4536dd4f4c.js +0 -1
  1084. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-17aa0c4536dd4f4c.js +0 -1
  1085. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-17aa0c4536dd4f4c.js +0 -1
  1086. package/app/.next-cli-build/static/chunks/app/api/models/catalog-sync/route-17aa0c4536dd4f4c.js +0 -1
  1087. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-17aa0c4536dd4f4c.js +0 -1
  1088. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-17aa0c4536dd4f4c.js +0 -1
  1089. package/app/.next-cli-build/static/chunks/app/api/models/route-17aa0c4536dd4f4c.js +0 -1
  1090. package/app/.next-cli-build/static/chunks/app/api/models/test/route-17aa0c4536dd4f4c.js +0 -1
  1091. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-17aa0c4536dd4f4c.js +0 -1
  1092. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-17aa0c4536dd4f4c.js +0 -1
  1093. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-17aa0c4536dd4f4c.js +0 -1
  1094. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-17aa0c4536dd4f4c.js +0 -1
  1095. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-17aa0c4536dd4f4c.js +0 -1
  1096. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-17aa0c4536dd4f4c.js +0 -1
  1097. package/app/.next-cli-build/static/chunks/app/api/oauth/grok-cli/bulk-import/route-17aa0c4536dd4f4c.js +0 -1
  1098. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-17aa0c4536dd4f4c.js +0 -1
  1099. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-17aa0c4536dd4f4c.js +0 -1
  1100. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-17aa0c4536dd4f4c.js +0 -1
  1101. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-17aa0c4536dd4f4c.js +0 -1
  1102. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-17aa0c4536dd4f4c.js +0 -1
  1103. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-17aa0c4536dd4f4c.js +0 -1
  1104. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-17aa0c4536dd4f4c.js +0 -1
  1105. package/app/.next-cli-build/static/chunks/app/api/pricing/route-17aa0c4536dd4f4c.js +0 -1
  1106. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-17aa0c4536dd4f4c.js +0 -1
  1107. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-17aa0c4536dd4f4c.js +0 -1
  1108. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-17aa0c4536dd4f4c.js +0 -1
  1109. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/gcp-projects/route-17aa0c4536dd4f4c.js +0 -1
  1110. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-17aa0c4536dd4f4c.js +0 -1
  1111. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-17aa0c4536dd4f4c.js +0 -1
  1112. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-17aa0c4536dd4f4c.js +0 -1
  1113. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-17aa0c4536dd4f4c.js +0 -1
  1114. package/app/.next-cli-build/static/chunks/app/api/providers/bulk/route-17aa0c4536dd4f4c.js +0 -1
  1115. package/app/.next-cli-build/static/chunks/app/api/providers/circuit-breakers/[name]/reset/route-17aa0c4536dd4f4c.js +0 -1
  1116. package/app/.next-cli-build/static/chunks/app/api/providers/circuit-breakers/route-17aa0c4536dd4f4c.js +0 -1
  1117. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-17aa0c4536dd4f4c.js +0 -1
  1118. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-17aa0c4536dd4f4c.js +0 -1
  1119. package/app/.next-cli-build/static/chunks/app/api/providers/route-17aa0c4536dd4f4c.js +0 -1
  1120. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-17aa0c4536dd4f4c.js +0 -1
  1121. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-17aa0c4536dd4f4c.js +0 -1
  1122. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-17aa0c4536dd4f4c.js +0 -1
  1123. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/fitness/clear/route-17aa0c4536dd4f4c.js +0 -1
  1124. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-17aa0c4536dd4f4c.js +0 -1
  1125. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-17aa0c4536dd4f4c.js +0 -1
  1126. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-17aa0c4536dd4f4c.js +0 -1
  1127. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-17aa0c4536dd4f4c.js +0 -1
  1128. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/fitness/clear-all/route-17aa0c4536dd4f4c.js +0 -1
  1129. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/fitness/route-17aa0c4536dd4f4c.js +0 -1
  1130. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-17aa0c4536dd4f4c.js +0 -1
  1131. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-17aa0c4536dd4f4c.js +0 -1
  1132. package/app/.next-cli-build/static/chunks/app/api/pxpipe/health/route-17aa0c4536dd4f4c.js +0 -1
  1133. package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-17aa0c4536dd4f4c.js +0 -1
  1134. package/app/.next-cli-build/static/chunks/app/api/pxpipe/logs/route-17aa0c4536dd4f4c.js +0 -1
  1135. package/app/.next-cli-build/static/chunks/app/api/pxpipe/restart/route-17aa0c4536dd4f4c.js +0 -1
  1136. package/app/.next-cli-build/static/chunks/app/api/pxpipe/start/route-17aa0c4536dd4f4c.js +0 -1
  1137. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stats/route-17aa0c4536dd4f4c.js +0 -1
  1138. package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-17aa0c4536dd4f4c.js +0 -1
  1139. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stop/route-17aa0c4536dd4f4c.js +0 -1
  1140. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-17aa0c4536dd4f4c.js +0 -1
  1141. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-17aa0c4536dd4f4c.js +0 -1
  1142. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-17aa0c4536dd4f4c.js +0 -1
  1143. package/app/.next-cli-build/static/chunks/app/api/settings/route-17aa0c4536dd4f4c.js +0 -1
  1144. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-17aa0c4536dd4f4c.js +0 -1
  1145. package/app/.next-cli-build/static/chunks/app/api/tags/route-17aa0c4536dd4f4c.js +0 -1
  1146. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-17aa0c4536dd4f4c.js +0 -1
  1147. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-17aa0c4536dd4f4c.js +0 -1
  1148. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-17aa0c4536dd4f4c.js +0 -1
  1149. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-17aa0c4536dd4f4c.js +0 -1
  1150. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-17aa0c4536dd4f4c.js +0 -1
  1151. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-17aa0c4536dd4f4c.js +0 -1
  1152. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-17aa0c4536dd4f4c.js +0 -1
  1153. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-17aa0c4536dd4f4c.js +0 -1
  1154. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-17aa0c4536dd4f4c.js +0 -1
  1155. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-17aa0c4536dd4f4c.js +0 -1
  1156. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-17aa0c4536dd4f4c.js +0 -1
  1157. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-17aa0c4536dd4f4c.js +0 -1
  1158. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-17aa0c4536dd4f4c.js +0 -1
  1159. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-17aa0c4536dd4f4c.js +0 -1
  1160. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-17aa0c4536dd4f4c.js +0 -1
  1161. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-17aa0c4536dd4f4c.js +0 -1
  1162. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-17aa0c4536dd4f4c.js +0 -1
  1163. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-17aa0c4536dd4f4c.js +0 -1
  1164. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-17aa0c4536dd4f4c.js +0 -1
  1165. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/[id]/route-17aa0c4536dd4f4c.js +0 -1
  1166. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-17aa0c4536dd4f4c.js +0 -1
  1167. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-17aa0c4536dd4f4c.js +0 -1
  1168. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-17aa0c4536dd4f4c.js +0 -1
  1169. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-17aa0c4536dd4f4c.js +0 -1
  1170. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-17aa0c4536dd4f4c.js +0 -1
  1171. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-17aa0c4536dd4f4c.js +0 -1
  1172. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-17aa0c4536dd4f4c.js +0 -1
  1173. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-17aa0c4536dd4f4c.js +0 -1
  1174. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-17aa0c4536dd4f4c.js +0 -1
  1175. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-17aa0c4536dd4f4c.js +0 -1
  1176. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-17aa0c4536dd4f4c.js +0 -1
  1177. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-17aa0c4536dd4f4c.js +0 -1
  1178. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-17aa0c4536dd4f4c.js +0 -1
  1179. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-17aa0c4536dd4f4c.js +0 -1
  1180. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-17aa0c4536dd4f4c.js +0 -1
  1181. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-17aa0c4536dd4f4c.js +0 -1
  1182. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-17aa0c4536dd4f4c.js +0 -1
  1183. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-17aa0c4536dd4f4c.js +0 -1
  1184. package/app/.next-cli-build/static/chunks/app/api/v1/route-17aa0c4536dd4f4c.js +0 -1
  1185. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-17aa0c4536dd4f4c.js +0 -1
  1186. package/app/.next-cli-build/static/chunks/app/api/v1/videos/[id]/route-17aa0c4536dd4f4c.js +0 -1
  1187. package/app/.next-cli-build/static/chunks/app/api/v1/videos/edits/route-17aa0c4536dd4f4c.js +0 -1
  1188. package/app/.next-cli-build/static/chunks/app/api/v1/videos/extensions/route-17aa0c4536dd4f4c.js +0 -1
  1189. package/app/.next-cli-build/static/chunks/app/api/v1/videos/generations/route-17aa0c4536dd4f4c.js +0 -1
  1190. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-17aa0c4536dd4f4c.js +0 -1
  1191. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-17aa0c4536dd4f4c.js +0 -1
  1192. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-17aa0c4536dd4f4c.js +0 -1
  1193. package/app/.next-cli-build/static/chunks/app/api/version/route-17aa0c4536dd4f4c.js +0 -1
  1194. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-17aa0c4536dd4f4c.js +0 -1
  1195. package/app/.next-cli-build/static/chunks/app/api/version/update/route-17aa0c4536dd4f4c.js +0 -1
  1196. package/app/.next-cli-build/static/chunks/app/landing/page-e42a61eee9f904dc.js +0 -1
  1197. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-17aa0c4536dd4f4c.js +0 -1
  1198. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-17aa0c4536dd4f4c.js +0 -1
  1199. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-17aa0c4536dd4f4c.js +0 -1
  1200. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-17aa0c4536dd4f4c.js +0 -1
  1201. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-17aa0c4536dd4f4c.js +0 -1
  1202. package/app/.next-cli-build/static/chunks/webpack-81a7adaed327dd6b.js +0 -1
  1203. package/app/.next-cli-build/static/css/c78f5cc987a85267.css +0 -1
  1204. package/app/.next-cli-build/static/yvUSImiXUeMIOPHHzKVq_/_buildManifest.js +0 -1
  1205. /package/app/.next-cli-build/static/{yvUSImiXUeMIOPHHzKVq_ → E9fXOaI2LcUxzAal-qB_G}/_ssgManifest.js +0 -0
  1206. /package/app/.next-cli-build/static/chunks/{2920-d6cf02087e8d0773.js → 2920.d6cf02087e8d0773.js} +0 -0
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4465],{21422:(e,t,r)=>{"use strict";r.d(t,{default:()=>b});var a=r(15102),s=r(82030),i=r(37837),l=r(92940),n=r(55223),o=r(31038);let d="basic-chat.sessions",c="basic-chat.activeSessionId",m="basic-chat.activeProviderId",u="basic-chat.draft";function h(){return globalThis.crypto?.randomUUID?globalThis.crypto.randomUUID():`chat_${Date.now()}_${Math.random().toString(16).slice(2)}`}function p(e){return e?{id:h(),title:"New chat",providerId:e.providerId,providerName:e.providerName,modelId:e.id,modelName:e.name,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),messages:[]}:null}function x(e){if("string"==typeof e)return e;if(null==e)return"";if(Array.isArray(e))return e.flatMap(e=>{let t=x(e);return t?[t]:[]}).join(" ");if("object"==typeof e){if("string"==typeof e.message)return e.message;if("string"==typeof e.error)return e.error;try{return JSON.stringify(e)}catch{}}return String(e)}function f(e=""){let t=x(e).replace(/\s+/g," ").trim();return t?t.length>52?`${t.slice(0,52).trimEnd()}…`:t:"New chat"}async function g(e){return await new Promise((t,r)=>{let a=new FileReader;a.onload=()=>t(String(a.result||"")),a.onerror=()=>r(a.error||Error("Failed to read file")),a.readAsDataURL(e)})}function w(e){return e?.name||function(e=""){return String(e).replace(/[-_]/g," ").replace(/\b\w/g,e=>e.toUpperCase()).trim()||"Unknown"}(e?.provider||e?.id||"provider")}function b(){let[e,t]=(0,s.useState)([]),[r,b]=(0,s.useState)(!0),[v,N]=(0,s.useState)(""),[y,j]=(0,s.useState)(()=>{try{let e=function(e,t){try{return JSON.parse(e)}catch{return t}}(globalThis.localStorage.getItem(d),[]);return Array.isArray(e)?e.map(e=>({...e,messages:Array.isArray(e.messages)?e.messages:[]})):[]}catch{return[]}}),[S,I]=(0,s.useState)(()=>globalThis.localStorage.getItem(c)||""),[A,k]=(0,s.useState)(()=>globalThis.localStorage.getItem(m)||""),[D,M]=(0,s.useState)(""),[C,O]=(0,s.useState)(()=>globalThis.localStorage.getItem(u)||""),[$,_]=(0,s.useState)([]),[T,E]=(0,s.useState)(!1),[U,R]=(0,s.useState)(""),[z,q]=(0,s.useState)(""),[P]=(0,s.useState)(()=>!0),[J,F]=(0,s.useState)(!1),[B,K]=(0,s.useState)(!1),L=(0,s.useRef)(null),W=(0,s.useRef)(null),H=(0,s.useRef)(!1),Y=(0,s.useRef)(null),G=(0,s.useRef)(null);(0,s.useEffect)(()=>{let e=new AbortController,r=!1;return async function(){b(!0),N("");try{let a=await fetch("/api/providers",{cache:"no-store",signal:e.signal}),s=await a.json().catch(()=>({})),i=Array.isArray(s.connections)?s.connections.filter(e=>e?.isActive!==!1):[];if(0===i.length){r||(t([]),N("No providers connected yet."));return}let l=new Map;for(let e of i){let t=e.provider||e.id,r=w(e),a=(0,o.mq)(t)?"openai-compatible":(0,o.gb)(t)?"anthropic-compatible":t;l.has(t)||l.set(t,{providerId:t,providerName:r,providerType:a,connections:[],models:[]});let s=l.get(t);s.providerName=s.providerName||r,s.providerType=s.providerType||a,s.connections.push(e);let i=(0,n.KC)(t).flatMap(t=>{let r=t?.id?{id:`${e.provider}/${t.id}`,requestModel:`${e.provider}/${t.id}`,name:t.name||t.id,providerId:e.provider,providerName:w(e),source:"static"}:null;return r?[r]:[]});s.models.push(...i)}for(let t of(await Promise.all(i.map(async t=>{try{let r=await fetch(`/api/providers/${t.id}/models`,{cache:"no-store",signal:e.signal}),a=await r.json().catch(()=>({}));if(!r.ok)return{connection:t,models:[]};let s=(Array.isArray(a?.models)?a.models:Array.isArray(a?.data)?a.data:Array.isArray(a?.results)?a.results:Array.isArray(a)?a:[]).flatMap(e=>{let r=function(e,t){let r="string"==typeof e?e:e?.id||e?.name||e?.model||"";if(!r)return null;let a="string"==typeof e?e:e?.name||e?.displayName||r,s=r;return((0,o.mq)(t.provider)||(0,o.gb)(t.provider))&&!r.includes("/")&&(s=`${t.provider}/${r}`),{id:s,requestModel:s,name:a,providerId:t.provider,providerName:w(t),source:"live"}}(e,t);return r?[r]:[]});return{connection:t,models:s}}catch{return{connection:t,models:[]}}})))){let e=t.connection.provider||t.connection.id,r=l.get(e);r&&r.models.push(...t.models)}let d=Array.from(l.values()).reduce((e,t)=>{let r=(function(e){let t=new Map;for(let r of e)r?.id&&(t.has(r.id)||t.set(r.id,r));return Array.from(t.values())})(t.models).sort((e,t)=>e.name.localeCompare(t.name));return r.length>0&&e.push({...t,models:r}),e},[]).sort((e,t)=>e.providerName.localeCompare(t.providerName));r||(t(d),0===d.length&&N("Providers connected but no models available."))}catch(e){r||(N(x(e?.message)||"Failed to load providers/models."),t([]))}finally{r||b(!1)}}(),()=>{r=!0,e.abort()}},[]),(0,s.useEffect)(()=>{let e=e=>{Y.current&&!Y.current.contains(e.target)&&F(!1),G.current&&!G.current.contains(e.target)&&K(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]);let Q=(0,s.useMemo)(()=>{let t=new Map;for(let r of e)for(let e of r.models)t.set(e.id,{...e,providerId:r.providerId,providerName:r.providerName});return t},[e]),V=(0,s.useMemo)(()=>e.find(e=>e.providerId===A)||e[0]||null,[e,A]),X=(0,s.useMemo)(()=>{if(D&&Q.has(D))return Q.get(D);if(S){let e=y.find(e=>e.id===S);if(e?.modelId&&Q.has(e.modelId))return Q.get(e.modelId)}return V?.models?.[0]||null},[D,Q,V,y,S]),Z=(0,s.useMemo)(()=>y.find(e=>e.id===S)||null,[y,S]),ee=Z?.messages||[],et=(0,s.useMemo)(()=>y.toSorted((e,t)=>new Date(t.updatedAt).getTime()-new Date(e.updatedAt).getTime()),[y]),er=!T&&!!X&&(C.trim().length>0||$.length>0);(0,s.useEffect)(()=>{if(P)try{globalThis.localStorage.setItem(d,JSON.stringify(y)),globalThis.localStorage.setItem(c,S),globalThis.localStorage.setItem(m,A),globalThis.localStorage.setItem(u,C)}catch{}},[P,y,S,A,C]),(0,s.useEffect)(()=>{if(!P||r||H.current||0===e.length)return;let t=e.find(e=>e.providerId===A)||e[0],a=D&&Q.has(D)?Q.get(D):t.models[0];if(y.length>0){let e=y.find(e=>e.id===S)||y[0],r=e?.modelId&&Q.has(e.modelId)?Q.get(e.modelId):a;H.current=!0,I(e.id),k(r?.providerId||t.providerId),M(r?.id||a.id);return}let s={id:h(),title:"New chat",providerId:t.providerId,providerName:t.providerName,modelId:a.id,modelName:a.name,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),messages:[]};H.current=!0,j([s]),I(s.id),k(t.providerId),M(a.id)},[P,r,e,Q,A,D,y,S]);let ea=(e,t)=>{j(r=>r.map(r=>r.id===e?t({...r,messages:Array.isArray(r.messages)?r.messages.map(e=>({...e})):[]}):r))},es=async e=>{let t=Array.from(e.target.files||[]);if(0===t.length)return;let r=t.filter(e=>e.type.startsWith("image/"));if(0===r.length){e.target.value="";return}let a=await Promise.all(r.map(async e=>({id:h(),name:e.name,type:e.type,size:e.size,dataUrl:await g(e)})));_(e=>[...e,...a]),e.target.value=""},ei=async()=>{let e=X||V?.models?.[0]||null;if(!e)return;let t=C.trim();if(!t&&0===$.length)return;let r=S,a=y.find(e=>e.id===r);if(!a){if(!(a=p(e)))return;r=a.id,j(e=>[a,...e]),I(r)}let s={id:h(),role:"user",content:t,attachments:$.map(e=>({id:e.id,name:e.name,type:e.type,dataUrl:e.dataUrl})),createdAt:new Date().toISOString()},i=h(),l={id:i,role:"assistant",content:"",createdAt:new Date().toISOString(),status:"streaming"},n=[...a.messages||[],s,l];j(a=>a.map(a=>a.id===r?{...a,providerId:e.providerId,providerName:e.providerName,modelId:e.id,modelName:e.name,messages:n,updatedAt:new Date().toISOString(),title:"New chat"===a.title?f(t):a.title}:a)),O(""),_([]),E(!0),R(i),q(""),W.current?.abort(),W.current=new AbortController;let o=n.reduce((e,t)=>(("assistant"!==t.role||t.id!==i)&&e.push({role:t.role,content:"user"===t.role?function(e){let t=x(e.content).trim(),r=Array.isArray(e.attachments)?e.attachments:[];if(0===r.length)return t;let a=[];for(let e of(t&&a.push({type:"text",text:t}),r))e?.dataUrl&&a.push({type:"image_url",image_url:{url:e.dataUrl}});return a.length>0?a:t}(t):t.content}),e),[]);try{var d;let a,s=await fetch("/api/dashboard/chat/completions",{method:"POST",headers:{"Content-Type":"application/json",Accept:"text/event-stream"},body:JSON.stringify({model:e.requestModel||e.id,messages:o,stream:!0}),signal:W.current.signal});if(!s.ok){let e=await s.json().catch(()=>({}));throw Error(x(e.error||e.message||`Request failed (${s.status})`))}let l=s.body?.getReader();if(!l){let e=await s.json().catch(()=>({})),t=x(e?.choices?.[0]?.message?.content||e?.output_text||e?.error||e?.message||"");ea(r,e=>({...e,messages:e.messages.map(e=>e.id===i?{...e,content:t,status:"done"}:e),updatedAt:new Date().toISOString()}));return}let n=new TextDecoder,c="",m="";for(;;){let{value:e,done:t}=await l.read();if(t)break;let a=(c+=n.decode(e,{stream:!0})).split(/\r?\n/);for(let e of(c=a.pop()||"",a)){let t=e.trim();if(!t.startsWith("data:"))continue;let a=t.slice(5).trim();if(a&&"[DONE]"!==a)try{let e=JSON.parse(a),t=function(e){if(!e||"object"!=typeof e)return"";let t=e.choices?.[0];return[(t?.delta||{}).content,t?.message?.content,e.output_text,e.text].map(x).filter(Boolean)[0]||""}(e);if(!t)continue;m+=t,q(m),ea(r,e=>({...e,messages:e.messages.map(e=>e.id===i?{...e,content:m,status:"streaming"}:e),updatedAt:new Date().toISOString()}))}catch{}}}ea(r,e=>({...e,messages:e.messages.map(e=>e.id===i?{...e,content:m||e.content,status:"done"}:e),updatedAt:new Date().toISOString()})),d=r,a=f(t),ea(d,e=>({...e,title:"New chat"===e.title?a:e.title,updatedAt:new Date().toISOString()}))}catch(e){if("AbortError"!==e.name){let t=x(e?.message||e);ea(r,e=>({...e,messages:e.messages.map(e=>e.id===i?{...e,content:e.content||`Error: ${t}`,status:"error"}:e),updatedAt:new Date().toISOString()})),N(t||"Failed to send message.")}}finally{E(!1),R(""),q(""),W.current=null}},el=X?`${X.name}`:"Select model",en=X?X.requestModel:"Choose from connected providers";return(0,a.jsx)("div",{className:"relative flex-1 flex flex-col h-full min-h-0 min-w-0 bg-[#212121] text-white overflow-hidden",children:(0,a.jsxs)("div",{className:"relative mx-auto flex flex-1 h-full min-h-0 w-full max-w-4xl flex-col",children:[(0,a.jsxs)("div",{className:"flex shrink-0 items-center justify-between gap-3 px-4 py-3 lg:px-6",children:[(0,a.jsxs)("div",{ref:Y,className:"relative",children:[(0,a.jsx)("button",{type:"button",onClick:()=>F(e=>!e),className:"flex items-center gap-3 rounded-2xl border border-white/10 bg-white/5 px-4 py-3 text-left transition hover:bg-white/8",children:(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-sm font-semibold text-white",children:el}),(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] text-white/70",children:"expand_more"})]}),(0,a.jsx)("p",{className:"truncate text-xs text-white/55",children:en})]})}),J?(0,a.jsxs)("div",{className:"absolute left-0 top-[calc(100%+10px)] z-30 w-[min(520px,calc(100vw-2rem))] overflow-hidden rounded-[20px] border border-white/10 bg-[#262626] shadow-2xl shadow-black/50",children:[(0,a.jsxs)("div",{className:"border-b border-white/10 px-4 py-3",children:[(0,a.jsx)("p",{className:"text-xs uppercase tracking-[0.22em] text-white/45",children:"Models"}),(0,a.jsx)("p",{className:"text-sm text-white/75",children:"Only from connected providers"})]}),(0,a.jsx)("div",{className:"max-h-[60vh] overflow-y-auto p-2 custom-scrollbar",children:e.map(e=>(0,a.jsxs)("div",{className:"mb-2 rounded-[16px] border border-white/10 bg-black/20 p-2",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between px-2 py-2",children:[(0,a.jsx)("p",{className:"text-sm font-semibold text-white",children:e.providerName}),(0,a.jsx)(l.Badge,{size:"sm",variant:"default",children:e.models.length})]}),(0,a.jsx)("div",{className:"grid gap-2 sm:grid-cols-2",children:e.models.map(e=>{let t=e.id===D;return(0,a.jsx)("button",{type:"button",onClick:()=>(e=>{let t=Q.get(e);if(!t)return;let r=y.find(e=>e.id===S);if(r&&r.messages.length>0){let e=p(t);if(!e)return;j(t=>[e,...t]),I(e.id)}else if(r)j(e=>e.map(e=>e.id===r.id?{...e,providerId:t.providerId,providerName:t.providerName,modelId:t.id,modelName:t.name}:e)),I(r.id);else{let e=p(t);if(!e)return;j(t=>[e,...t]),I(e.id)}k(t.providerId),M(t.id),F(!1)})(e.id),className:`rounded-[14px] border px-3 py-3 text-left transition ${t?"border-blue-400/40 bg-blue-500/15":"border-white/10 bg-white/5 hover:bg-white/8"}`,children:(0,a.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("p",{className:"truncate text-sm font-medium text-white",children:e.name}),(0,a.jsx)("p",{className:"truncate text-[11px] text-white/45",children:e.requestModel})]}),t?(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] text-blue-300",children:"check_circle"}):null]})},e.id)})})]},e.providerId))})]}):null]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("button",{type:"button",onClick:()=>K(e=>!e),className:"rounded-2xl border border-white/10 bg-white/5 px-4 py-3 text-sm text-white/80 transition hover:bg-white/8",children:"History"}),(0,a.jsx)(l.Button,{variant:"ghost",size:"sm",icon:"delete",onClick:()=>{if(!S)return;let e=y.filter(e=>e.id!==S),t=e[0]||null;j(e),t?(I(t.id),k(t.providerId),M(t.modelId)):(I(""),k(""),M(""))},disabled:!S||0===y.length,children:"Clear"})]})]}),B?(0,a.jsxs)("div",{ref:G,className:"absolute right-4 top-[72px] z-20 w-[min(360px,calc(100vw-2rem))] rounded-[20px] border border-white/10 bg-[#262626] p-2 shadow-2xl shadow-black/50 lg:right-6",children:[(0,a.jsx)("div",{className:"px-3 py-2",children:(0,a.jsx)("p",{className:"text-xs uppercase tracking-[0.22em] text-white/45",children:"Recent chats"})}),(0,a.jsx)("div",{className:"max-h-[48vh] space-y-2 overflow-y-auto p-1 custom-scrollbar",children:0===et.length?(0,a.jsx)("div",{className:"rounded-[16px] border border-dashed border-white/10 bg-white/5 p-4 text-sm text-white/55",children:"No conversations yet."}):et.map(e=>{let t=e.id===S,r=[...e.messages||[]].reverse().find(e=>"user"===e.role)||e.messages?.[0];return(0,a.jsx)("button",{type:"button",onClick:()=>{var t;let r;return t=e.id,void((r=y.find(e=>e.id===t))&&(I(t),k(r.providerId||A),M(r.modelId||D),K(!1)))},className:`w-full rounded-[16px] border px-3 py-3 text-left transition ${t?"border-blue-400/40 bg-blue-500/15":"border-white/10 bg-white/5 hover:bg-white/8"}`,children:(0,a.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("p",{className:"truncate text-sm font-medium text-white",children:e.title}),(0,a.jsx)("p",{className:"mt-1 truncate text-xs text-white/50",children:x(r?.content)||"Empty chat"})]}),(0,a.jsx)("span",{className:"text-[10px] text-white/40 shrink-0",children:function(e){if(!e)return"Now";let t=new Date(e).getTime();if(Number.isNaN(t))return"Now";let r=Math.max(1,Math.round((Date.now()-t)/6e4));if(r<60)return`${r}m`;let a=Math.round(r/60);return a<24?`${a}h`:`${Math.round(a/24)}d`}(e.updatedAt)})]})},e.id)})})]}):null,v?(0,a.jsx)("div",{className:"mt-4 rounded-[18px] border border-rose-500/20 bg-rose-500/10 px-4 py-3 text-rose-100",children:(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"error"}),(0,a.jsx)("p",{className:"text-sm leading-6",children:v})]})}):null,(0,a.jsxs)("div",{className:"flex flex-1 flex-col min-h-0",children:[(0,a.jsxs)("div",{className:"flex-1 overflow-y-auto py-4 custom-scrollbar",children:[0===ee.length?(0,a.jsx)("div",{className:"flex min-h-[50vh] items-center justify-center px-4 text-center",children:(0,a.jsxs)("div",{className:"max-w-xl space-y-4",children:[(0,a.jsx)("div",{className:"mx-auto flex size-16 items-center justify-center rounded-[20px] border border-white/10 bg-white/5 text-white/80",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[30px]",children:"chat"})}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("h2",{className:"text-2xl font-semibold text-white",children:"Start a conversation"}),(0,a.jsx)("p",{className:"text-sm leading-6 text-white/60",children:"Simple chat interface to interact with any AI model from connected providers. Select a model and start chatting!"})]})]})}):null,(0,a.jsx)("div",{className:"mx-auto flex w-full max-w-3xl flex-col gap-4 px-4",children:ee.map(e=>{let t="user"===e.role,r="assistant"===e.role,s=r&&e.id===U&&"streaming"===e.status,l=x(e.content)||(r?z:"");return(0,a.jsx)("div",{className:`flex w-full ${t?"justify-end":"justify-start"} mb-6`,children:(0,a.jsxs)("div",{className:`max-w-[min(88%,42rem)] ${t?"rounded-3xl bg-[#2f2f2f] px-5 py-3.5 text-white":"text-white/90"}`,children:[(0,a.jsx)("div",{className:"mb-1 flex items-center justify-between gap-3",children:(0,a.jsx)("span",{className:"text-xs font-semibold",children:t?"You":X?.name||"Assistant"})}),e.attachments?.length?(0,a.jsx)("div",{className:"mb-3 grid grid-cols-2 gap-2 sm:grid-cols-3 mt-2",children:e.attachments.map(e=>(0,a.jsx)("a",{href:e.dataUrl,target:"_blank",rel:"noreferrer",className:"overflow-hidden rounded-[18px] border border-white/10 bg-black/20",children:(0,a.jsx)(i.default,{src:e.dataUrl,alt:e.name,className:"h-28 w-full object-cover",width:0,height:0,sizes:"100vw",style:{width:"100%",height:"112px"},unoptimized:!0})},e.id))}):null,(0,a.jsxs)("div",{className:"whitespace-pre-wrap break-words text-[15px] leading-7",children:[l,r&&s&&!z?(0,a.jsx)("span",{className:"inline-block animate-pulse",children:"▋"}):null]})]})},e.id)})})]}),(0,a.jsxs)("div",{className:"shrink-0 pt-2",children:[$.length>0?(0,a.jsx)("div",{className:"mx-auto mb-3 flex w-full max-w-3xl flex-wrap gap-2 px-4",children:$.map(e=>(0,a.jsxs)("div",{className:"flex items-center gap-2 rounded-full border border-white/10 bg-white/5 px-3 py-2",children:[(0,a.jsx)("span",{className:"text-xs text-white/80 max-w-[12rem] truncate",children:e.name}),(0,a.jsx)("button",{type:"button",onClick:()=>{var t;return t=e.id,void _(e=>e.filter(e=>e.id!==t))},className:"text-white/55 hover:text-white","aria-label":"Remove attachment",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"close"})})]},e.id))}):null,(0,a.jsx)("div",{className:"mx-auto w-full max-w-3xl px-4 pb-2",children:(0,a.jsxs)("div",{className:"rounded-[26px] bg-[#2f2f2f] px-3 pt-3 pb-2 shadow-[0_0_15px_rgba(0,0,0,0.10)] ring-1 ring-white/5",children:[(0,a.jsx)("textarea",{value:C,onChange:e=>O(e.target.value),onKeyDown:e=>{"Enter"===e.key&&!e.shiftKey&&(e.preventDefault(),er&&ei())},placeholder:"Message AI","aria-label":"Message AI",rows:1,className:"w-full resize-none bg-transparent px-2 text-[15px] leading-6 text-white outline-none placeholder:text-white/40 custom-scrollbar max-h-[25vh] overflow-y-auto"}),(0,a.jsxs)("div",{className:"mt-2 flex items-center justify-between gap-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("button",{type:"button",onClick:()=>L.current?.click(),disabled:!X||r,className:"p-2 text-white/50 hover:text-white transition rounded-full hover:bg-white/5",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"attach_file"})}),(0,a.jsx)("input",{ref:L,type:"file",accept:"image/*",multiple:!0,className:"hidden",onChange:es,"aria-label":"Attach images"}),(0,a.jsx)("span",{className:"text-xs font-medium text-white/30 truncate max-w-[120px]",children:X?X.name:"No model"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[T?(0,a.jsx)("button",{type:"button",onClick:()=>{W.current?.abort()},className:"p-2 text-white bg-white/10 hover:bg-white/20 transition rounded-full h-8 w-8 flex items-center justify-center",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"stop"})}):null,(0,a.jsx)("button",{type:"button",onClick:ei,disabled:!er,className:`h-8 w-8 rounded-full flex items-center justify-center transition ${er?"bg-white text-black hover:opacity-90":"bg-white/10 text-white/30 cursor-not-allowed"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"arrow_upward"})})]})]})]})})]}),(0,a.jsx)("p",{className:"mx-auto mt-2 max-w-3xl px-4 pb-4 text-center text-[11px] text-white/30",children:"Model list is filtered from connected providers."})]})]})})}},94867:(e,t,r)=>{Promise.resolve().then(r.bind(r,21422))}},e=>{e.O(0,[3885,2318,4385,2940,2147,3204,7358],()=>e(e.s=94867)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4465],{21422:(e,t,r)=>{"use strict";r.d(t,{default:()=>b});var a=r(15102),s=r(82030),i=r(37837),l=r(73178),n=r(55223),o=r(31038);let d="basic-chat.sessions",c="basic-chat.activeSessionId",m="basic-chat.activeProviderId",u="basic-chat.draft";function h(){return globalThis.crypto?.randomUUID?globalThis.crypto.randomUUID():`chat_${Date.now()}_${Math.random().toString(16).slice(2)}`}function p(e){return e?{id:h(),title:"New chat",providerId:e.providerId,providerName:e.providerName,modelId:e.id,modelName:e.name,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),messages:[]}:null}function x(e){if("string"==typeof e)return e;if(null==e)return"";if(Array.isArray(e))return e.flatMap(e=>{let t=x(e);return t?[t]:[]}).join(" ");if("object"==typeof e){if("string"==typeof e.message)return e.message;if("string"==typeof e.error)return e.error;try{return JSON.stringify(e)}catch{}}return String(e)}function f(e=""){let t=x(e).replace(/\s+/g," ").trim();return t?t.length>52?`${t.slice(0,52).trimEnd()}…`:t:"New chat"}async function g(e){return await new Promise((t,r)=>{let a=new FileReader;a.onload=()=>t(String(a.result||"")),a.onerror=()=>r(a.error||Error("Failed to read file")),a.readAsDataURL(e)})}function w(e){return e?.name||function(e=""){return String(e).replace(/[-_]/g," ").replace(/\b\w/g,e=>e.toUpperCase()).trim()||"Unknown"}(e?.provider||e?.id||"provider")}function b(){let[e,t]=(0,s.useState)([]),[r,b]=(0,s.useState)(!0),[v,N]=(0,s.useState)(""),[y,j]=(0,s.useState)(()=>{try{let e=function(e,t){try{return JSON.parse(e)}catch{return t}}(globalThis.localStorage.getItem(d),[]);return Array.isArray(e)?e.map(e=>({...e,messages:Array.isArray(e.messages)?e.messages:[]})):[]}catch{return[]}}),[S,I]=(0,s.useState)(()=>globalThis.localStorage.getItem(c)||""),[A,k]=(0,s.useState)(()=>globalThis.localStorage.getItem(m)||""),[D,M]=(0,s.useState)(""),[C,O]=(0,s.useState)(()=>globalThis.localStorage.getItem(u)||""),[$,_]=(0,s.useState)([]),[T,E]=(0,s.useState)(!1),[U,R]=(0,s.useState)(""),[z,q]=(0,s.useState)(""),[P]=(0,s.useState)(()=>!0),[J,F]=(0,s.useState)(!1),[B,K]=(0,s.useState)(!1),L=(0,s.useRef)(null),W=(0,s.useRef)(null),H=(0,s.useRef)(!1),Y=(0,s.useRef)(null),G=(0,s.useRef)(null);(0,s.useEffect)(()=>{let e=new AbortController,r=!1;return async function(){b(!0),N("");try{let a=await fetch("/api/providers",{cache:"no-store",signal:e.signal}),s=await a.json().catch(()=>({})),i=Array.isArray(s.connections)?s.connections.filter(e=>e?.isActive!==!1):[];if(0===i.length){r||(t([]),N("No providers connected yet."));return}let l=new Map;for(let e of i){let t=e.provider||e.id,r=w(e),a=(0,o.mq)(t)?"openai-compatible":(0,o.gb)(t)?"anthropic-compatible":t;l.has(t)||l.set(t,{providerId:t,providerName:r,providerType:a,connections:[],models:[]});let s=l.get(t);s.providerName=s.providerName||r,s.providerType=s.providerType||a,s.connections.push(e);let i=(0,n.KC)(t).flatMap(t=>{let r=t?.id?{id:`${e.provider}/${t.id}`,requestModel:`${e.provider}/${t.id}`,name:t.name||t.id,providerId:e.provider,providerName:w(e),source:"static"}:null;return r?[r]:[]});s.models.push(...i)}for(let t of(await Promise.all(i.map(async t=>{try{let r=await fetch(`/api/providers/${t.id}/models`,{cache:"no-store",signal:e.signal}),a=await r.json().catch(()=>({}));if(!r.ok)return{connection:t,models:[]};let s=(Array.isArray(a?.models)?a.models:Array.isArray(a?.data)?a.data:Array.isArray(a?.results)?a.results:Array.isArray(a)?a:[]).flatMap(e=>{let r=function(e,t){let r="string"==typeof e?e:e?.id||e?.name||e?.model||"";if(!r)return null;let a="string"==typeof e?e:e?.name||e?.displayName||r,s=r;return((0,o.mq)(t.provider)||(0,o.gb)(t.provider))&&!r.includes("/")&&(s=`${t.provider}/${r}`),{id:s,requestModel:s,name:a,providerId:t.provider,providerName:w(t),source:"live"}}(e,t);return r?[r]:[]});return{connection:t,models:s}}catch{return{connection:t,models:[]}}})))){let e=t.connection.provider||t.connection.id,r=l.get(e);r&&r.models.push(...t.models)}let d=Array.from(l.values()).reduce((e,t)=>{let r=(function(e){let t=new Map;for(let r of e)r?.id&&(t.has(r.id)||t.set(r.id,r));return Array.from(t.values())})(t.models).sort((e,t)=>e.name.localeCompare(t.name));return r.length>0&&e.push({...t,models:r}),e},[]).sort((e,t)=>e.providerName.localeCompare(t.providerName));r||(t(d),0===d.length&&N("Providers connected but no models available."))}catch(e){r||(N(x(e?.message)||"Failed to load providers/models."),t([]))}finally{r||b(!1)}}(),()=>{r=!0,e.abort()}},[]),(0,s.useEffect)(()=>{let e=e=>{Y.current&&!Y.current.contains(e.target)&&F(!1),G.current&&!G.current.contains(e.target)&&K(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]);let Q=(0,s.useMemo)(()=>{let t=new Map;for(let r of e)for(let e of r.models)t.set(e.id,{...e,providerId:r.providerId,providerName:r.providerName});return t},[e]),V=(0,s.useMemo)(()=>e.find(e=>e.providerId===A)||e[0]||null,[e,A]),X=(0,s.useMemo)(()=>{if(D&&Q.has(D))return Q.get(D);if(S){let e=y.find(e=>e.id===S);if(e?.modelId&&Q.has(e.modelId))return Q.get(e.modelId)}return V?.models?.[0]||null},[D,Q,V,y,S]),Z=(0,s.useMemo)(()=>y.find(e=>e.id===S)||null,[y,S]),ee=Z?.messages||[],et=(0,s.useMemo)(()=>y.toSorted((e,t)=>new Date(t.updatedAt).getTime()-new Date(e.updatedAt).getTime()),[y]),er=!T&&!!X&&(C.trim().length>0||$.length>0);(0,s.useEffect)(()=>{if(P)try{globalThis.localStorage.setItem(d,JSON.stringify(y)),globalThis.localStorage.setItem(c,S),globalThis.localStorage.setItem(m,A),globalThis.localStorage.setItem(u,C)}catch{}},[P,y,S,A,C]),(0,s.useEffect)(()=>{if(!P||r||H.current||0===e.length)return;let t=e.find(e=>e.providerId===A)||e[0],a=D&&Q.has(D)?Q.get(D):t.models[0];if(y.length>0){let e=y.find(e=>e.id===S)||y[0],r=e?.modelId&&Q.has(e.modelId)?Q.get(e.modelId):a;H.current=!0,I(e.id),k(r?.providerId||t.providerId),M(r?.id||a.id);return}let s={id:h(),title:"New chat",providerId:t.providerId,providerName:t.providerName,modelId:a.id,modelName:a.name,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),messages:[]};H.current=!0,j([s]),I(s.id),k(t.providerId),M(a.id)},[P,r,e,Q,A,D,y,S]);let ea=(e,t)=>{j(r=>r.map(r=>r.id===e?t({...r,messages:Array.isArray(r.messages)?r.messages.map(e=>({...e})):[]}):r))},es=async e=>{let t=Array.from(e.target.files||[]);if(0===t.length)return;let r=t.filter(e=>e.type.startsWith("image/"));if(0===r.length){e.target.value="";return}let a=await Promise.all(r.map(async e=>({id:h(),name:e.name,type:e.type,size:e.size,dataUrl:await g(e)})));_(e=>[...e,...a]),e.target.value=""},ei=async()=>{let e=X||V?.models?.[0]||null;if(!e)return;let t=C.trim();if(!t&&0===$.length)return;let r=S,a=y.find(e=>e.id===r);if(!a){if(!(a=p(e)))return;r=a.id,j(e=>[a,...e]),I(r)}let s={id:h(),role:"user",content:t,attachments:$.map(e=>({id:e.id,name:e.name,type:e.type,dataUrl:e.dataUrl})),createdAt:new Date().toISOString()},i=h(),l={id:i,role:"assistant",content:"",createdAt:new Date().toISOString(),status:"streaming"},n=[...a.messages||[],s,l];j(a=>a.map(a=>a.id===r?{...a,providerId:e.providerId,providerName:e.providerName,modelId:e.id,modelName:e.name,messages:n,updatedAt:new Date().toISOString(),title:"New chat"===a.title?f(t):a.title}:a)),O(""),_([]),E(!0),R(i),q(""),W.current?.abort(),W.current=new AbortController;let o=n.reduce((e,t)=>(("assistant"!==t.role||t.id!==i)&&e.push({role:t.role,content:"user"===t.role?function(e){let t=x(e.content).trim(),r=Array.isArray(e.attachments)?e.attachments:[];if(0===r.length)return t;let a=[];for(let e of(t&&a.push({type:"text",text:t}),r))e?.dataUrl&&a.push({type:"image_url",image_url:{url:e.dataUrl}});return a.length>0?a:t}(t):t.content}),e),[]);try{var d;let a,s=await fetch("/api/dashboard/chat/completions",{method:"POST",headers:{"Content-Type":"application/json",Accept:"text/event-stream"},body:JSON.stringify({model:e.requestModel||e.id,messages:o,stream:!0}),signal:W.current.signal});if(!s.ok){let e=await s.json().catch(()=>({}));throw Error(x(e.error||e.message||`Request failed (${s.status})`))}let l=s.body?.getReader();if(!l){let e=await s.json().catch(()=>({})),t=x(e?.choices?.[0]?.message?.content||e?.output_text||e?.error||e?.message||"");ea(r,e=>({...e,messages:e.messages.map(e=>e.id===i?{...e,content:t,status:"done"}:e),updatedAt:new Date().toISOString()}));return}let n=new TextDecoder,c="",m="";for(;;){let{value:e,done:t}=await l.read();if(t)break;let a=(c+=n.decode(e,{stream:!0})).split(/\r?\n/);for(let e of(c=a.pop()||"",a)){let t=e.trim();if(!t.startsWith("data:"))continue;let a=t.slice(5).trim();if(a&&"[DONE]"!==a)try{let e=JSON.parse(a),t=function(e){if(!e||"object"!=typeof e)return"";let t=e.choices?.[0];return[(t?.delta||{}).content,t?.message?.content,e.output_text,e.text].map(x).filter(Boolean)[0]||""}(e);if(!t)continue;m+=t,q(m),ea(r,e=>({...e,messages:e.messages.map(e=>e.id===i?{...e,content:m,status:"streaming"}:e),updatedAt:new Date().toISOString()}))}catch{}}}ea(r,e=>({...e,messages:e.messages.map(e=>e.id===i?{...e,content:m||e.content,status:"done"}:e),updatedAt:new Date().toISOString()})),d=r,a=f(t),ea(d,e=>({...e,title:"New chat"===e.title?a:e.title,updatedAt:new Date().toISOString()}))}catch(e){if("AbortError"!==e.name){let t=x(e?.message||e);ea(r,e=>({...e,messages:e.messages.map(e=>e.id===i?{...e,content:e.content||`Error: ${t}`,status:"error"}:e),updatedAt:new Date().toISOString()})),N(t||"Failed to send message.")}}finally{E(!1),R(""),q(""),W.current=null}},el=X?`${X.name}`:"Select model",en=X?X.requestModel:"Choose from connected providers";return(0,a.jsx)("div",{className:"relative flex-1 flex flex-col h-full min-h-0 min-w-0 bg-[#212121] text-white overflow-hidden",children:(0,a.jsxs)("div",{className:"relative mx-auto flex flex-1 h-full min-h-0 w-full max-w-4xl flex-col",children:[(0,a.jsxs)("div",{className:"flex shrink-0 items-center justify-between gap-3 px-4 py-3 lg:px-6",children:[(0,a.jsxs)("div",{ref:Y,className:"relative",children:[(0,a.jsx)("button",{type:"button",onClick:()=>F(e=>!e),className:"flex items-center gap-3 rounded-2xl border border-white/10 bg-white/5 px-4 py-3 text-left transition hover:bg-white/8",children:(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-sm font-semibold text-white",children:el}),(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] text-white/70",children:"expand_more"})]}),(0,a.jsx)("p",{className:"truncate text-xs text-white/55",children:en})]})}),J?(0,a.jsxs)("div",{className:"absolute left-0 top-[calc(100%+10px)] z-30 w-[min(520px,calc(100vw-2rem))] overflow-hidden rounded-[20px] border border-white/10 bg-[#262626] shadow-2xl shadow-black/50",children:[(0,a.jsxs)("div",{className:"border-b border-white/10 px-4 py-3",children:[(0,a.jsx)("p",{className:"text-xs uppercase tracking-[0.22em] text-white/45",children:"Models"}),(0,a.jsx)("p",{className:"text-sm text-white/75",children:"Only from connected providers"})]}),(0,a.jsx)("div",{className:"max-h-[60vh] overflow-y-auto p-2 custom-scrollbar",children:e.map(e=>(0,a.jsxs)("div",{className:"mb-2 rounded-[16px] border border-white/10 bg-black/20 p-2",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between px-2 py-2",children:[(0,a.jsx)("p",{className:"text-sm font-semibold text-white",children:e.providerName}),(0,a.jsx)(l.Badge,{size:"sm",variant:"default",children:e.models.length})]}),(0,a.jsx)("div",{className:"grid gap-2 sm:grid-cols-2",children:e.models.map(e=>{let t=e.id===D;return(0,a.jsx)("button",{type:"button",onClick:()=>(e=>{let t=Q.get(e);if(!t)return;let r=y.find(e=>e.id===S);if(r&&r.messages.length>0){let e=p(t);if(!e)return;j(t=>[e,...t]),I(e.id)}else if(r)j(e=>e.map(e=>e.id===r.id?{...e,providerId:t.providerId,providerName:t.providerName,modelId:t.id,modelName:t.name}:e)),I(r.id);else{let e=p(t);if(!e)return;j(t=>[e,...t]),I(e.id)}k(t.providerId),M(t.id),F(!1)})(e.id),className:`rounded-[14px] border px-3 py-3 text-left transition ${t?"border-blue-400/40 bg-blue-500/15":"border-white/10 bg-white/5 hover:bg-white/8"}`,children:(0,a.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("p",{className:"truncate text-sm font-medium text-white",children:e.name}),(0,a.jsx)("p",{className:"truncate text-[11px] text-white/45",children:e.requestModel})]}),t?(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] text-blue-300",children:"check_circle"}):null]})},e.id)})})]},e.providerId))})]}):null]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("button",{type:"button",onClick:()=>K(e=>!e),className:"rounded-2xl border border-white/10 bg-white/5 px-4 py-3 text-sm text-white/80 transition hover:bg-white/8",children:"History"}),(0,a.jsx)(l.Button,{variant:"ghost",size:"sm",icon:"delete",onClick:()=>{if(!S)return;let e=y.filter(e=>e.id!==S),t=e[0]||null;j(e),t?(I(t.id),k(t.providerId),M(t.modelId)):(I(""),k(""),M(""))},disabled:!S||0===y.length,children:"Clear"})]})]}),B?(0,a.jsxs)("div",{ref:G,className:"absolute right-4 top-[72px] z-20 w-[min(360px,calc(100vw-2rem))] rounded-[20px] border border-white/10 bg-[#262626] p-2 shadow-2xl shadow-black/50 lg:right-6",children:[(0,a.jsx)("div",{className:"px-3 py-2",children:(0,a.jsx)("p",{className:"text-xs uppercase tracking-[0.22em] text-white/45",children:"Recent chats"})}),(0,a.jsx)("div",{className:"max-h-[48vh] space-y-2 overflow-y-auto p-1 custom-scrollbar",children:0===et.length?(0,a.jsx)("div",{className:"rounded-[16px] border border-dashed border-white/10 bg-white/5 p-4 text-sm text-white/55",children:"No conversations yet."}):et.map(e=>{let t=e.id===S,r=[...e.messages||[]].reverse().find(e=>"user"===e.role)||e.messages?.[0];return(0,a.jsx)("button",{type:"button",onClick:()=>{var t;let r;return t=e.id,void((r=y.find(e=>e.id===t))&&(I(t),k(r.providerId||A),M(r.modelId||D),K(!1)))},className:`w-full rounded-[16px] border px-3 py-3 text-left transition ${t?"border-blue-400/40 bg-blue-500/15":"border-white/10 bg-white/5 hover:bg-white/8"}`,children:(0,a.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("p",{className:"truncate text-sm font-medium text-white",children:e.title}),(0,a.jsx)("p",{className:"mt-1 truncate text-xs text-white/50",children:x(r?.content)||"Empty chat"})]}),(0,a.jsx)("span",{className:"text-[10px] text-white/40 shrink-0",children:function(e){if(!e)return"Now";let t=new Date(e).getTime();if(Number.isNaN(t))return"Now";let r=Math.max(1,Math.round((Date.now()-t)/6e4));if(r<60)return`${r}m`;let a=Math.round(r/60);return a<24?`${a}h`:`${Math.round(a/24)}d`}(e.updatedAt)})]})},e.id)})})]}):null,v?(0,a.jsx)("div",{className:"mt-4 rounded-[18px] border border-rose-500/20 bg-rose-500/10 px-4 py-3 text-rose-100",children:(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"error"}),(0,a.jsx)("p",{className:"text-sm leading-6",children:v})]})}):null,(0,a.jsxs)("div",{className:"flex flex-1 flex-col min-h-0",children:[(0,a.jsxs)("div",{className:"flex-1 overflow-y-auto py-4 custom-scrollbar",children:[0===ee.length?(0,a.jsx)("div",{className:"flex min-h-[50vh] items-center justify-center px-4 text-center",children:(0,a.jsxs)("div",{className:"max-w-xl space-y-4",children:[(0,a.jsx)("div",{className:"mx-auto flex size-16 items-center justify-center rounded-[20px] border border-white/10 bg-white/5 text-white/80",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[30px]",children:"chat"})}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("h2",{className:"text-2xl font-semibold text-white",children:"Start a conversation"}),(0,a.jsx)("p",{className:"text-sm leading-6 text-white/60",children:"Simple chat interface to interact with any AI model from connected providers. Select a model and start chatting!"})]})]})}):null,(0,a.jsx)("div",{className:"mx-auto flex w-full max-w-3xl flex-col gap-4 px-4",children:ee.map(e=>{let t="user"===e.role,r="assistant"===e.role,s=r&&e.id===U&&"streaming"===e.status,l=x(e.content)||(r?z:"");return(0,a.jsx)("div",{className:`flex w-full ${t?"justify-end":"justify-start"} mb-6`,children:(0,a.jsxs)("div",{className:`max-w-[min(88%,42rem)] ${t?"rounded-3xl bg-[#2f2f2f] px-5 py-3.5 text-white":"text-white/90"}`,children:[(0,a.jsx)("div",{className:"mb-1 flex items-center justify-between gap-3",children:(0,a.jsx)("span",{className:"text-xs font-semibold",children:t?"You":X?.name||"Assistant"})}),e.attachments?.length?(0,a.jsx)("div",{className:"mb-3 grid grid-cols-2 gap-2 sm:grid-cols-3 mt-2",children:e.attachments.map(e=>(0,a.jsx)("a",{href:e.dataUrl,target:"_blank",rel:"noreferrer",className:"overflow-hidden rounded-[18px] border border-white/10 bg-black/20",children:(0,a.jsx)(i.default,{src:e.dataUrl,alt:e.name,className:"h-28 w-full object-cover",width:0,height:0,sizes:"100vw",style:{width:"100%",height:"112px"},unoptimized:!0})},e.id))}):null,(0,a.jsxs)("div",{className:"whitespace-pre-wrap break-words text-[15px] leading-7",children:[l,r&&s&&!z?(0,a.jsx)("span",{className:"inline-block animate-pulse",children:"▋"}):null]})]})},e.id)})})]}),(0,a.jsxs)("div",{className:"shrink-0 pt-2",children:[$.length>0?(0,a.jsx)("div",{className:"mx-auto mb-3 flex w-full max-w-3xl flex-wrap gap-2 px-4",children:$.map(e=>(0,a.jsxs)("div",{className:"flex items-center gap-2 rounded-full border border-white/10 bg-white/5 px-3 py-2",children:[(0,a.jsx)("span",{className:"text-xs text-white/80 max-w-[12rem] truncate",children:e.name}),(0,a.jsx)("button",{type:"button",onClick:()=>{var t;return t=e.id,void _(e=>e.filter(e=>e.id!==t))},className:"text-white/55 hover:text-white","aria-label":"Remove attachment",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"close"})})]},e.id))}):null,(0,a.jsx)("div",{className:"mx-auto w-full max-w-3xl px-4 pb-2",children:(0,a.jsxs)("div",{className:"rounded-[26px] bg-[#2f2f2f] px-3 pt-3 pb-2 shadow-[0_0_15px_rgba(0,0,0,0.10)] ring-1 ring-white/5",children:[(0,a.jsx)("textarea",{value:C,onChange:e=>O(e.target.value),onKeyDown:e=>{"Enter"===e.key&&!e.shiftKey&&(e.preventDefault(),er&&ei())},placeholder:"Message AI","aria-label":"Message AI",rows:1,className:"w-full resize-none bg-transparent px-2 text-[15px] leading-6 text-white outline-none placeholder:text-white/40 custom-scrollbar max-h-[25vh] overflow-y-auto"}),(0,a.jsxs)("div",{className:"mt-2 flex items-center justify-between gap-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("button",{type:"button",onClick:()=>L.current?.click(),disabled:!X||r,className:"p-2 text-white/50 hover:text-white transition rounded-full hover:bg-white/5",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"attach_file"})}),(0,a.jsx)("input",{ref:L,type:"file",accept:"image/*",multiple:!0,className:"hidden",onChange:es,"aria-label":"Attach images"}),(0,a.jsx)("span",{className:"text-xs font-medium text-white/30 truncate max-w-[120px]",children:X?X.name:"No model"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[T?(0,a.jsx)("button",{type:"button",onClick:()=>{W.current?.abort()},className:"p-2 text-white bg-white/10 hover:bg-white/20 transition rounded-full h-8 w-8 flex items-center justify-center",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"stop"})}):null,(0,a.jsx)("button",{type:"button",onClick:ei,disabled:!er,className:`h-8 w-8 rounded-full flex items-center justify-center transition ${er?"bg-white text-black hover:opacity-90":"bg-white/10 text-white/30 cursor-not-allowed"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"arrow_upward"})})]})]})]})})]}),(0,a.jsx)("p",{className:"mx-auto mt-2 max-w-3xl px-4 pb-4 text-center text-[11px] text-white/30",children:"Model list is filtered from connected providers."})]})]})})}},94867:(e,t,r)=>{Promise.resolve().then(r.bind(r,21422))}},e=>{e.O(0,[3885,3758,7236,4385,3178,2147,3204,7358],()=>e(e.s=94867)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3554],{29322:(e,t,a)=>{Promise.resolve().then(a.bind(a,30819))},30819:(e,t,a)=>{"use strict";a.d(t,{default:()=>x});var s=a(15102),l=a(82030),r=a(93885),i=a.n(r),o=a(92940),d=a(93700),c=a(55223),n=a(85338);let u=a(39730).env.NEXT_PUBLIC_CLOUD_URL;function x({toolId:e,machineId:t}){let a=d.dM[e],[r,v]=(0,l.useState)([]),[h,m]=(0,l.useState)(!0),[p,b]=(0,l.useState)({}),[f,j]=(0,l.useState)(!1),[E,P]=(0,l.useState)(!1),[k,w]=(0,l.useState)(""),[g,N]=(0,l.useState)(!1),[_,S]=(0,l.useState)(""),[y,A]=(0,l.useState)([]);(0,l.useEffect)(()=>{let e=!0;return(async()=>{try{let[t,a,s,l]=await Promise.all([fetch("/api/providers"),fetch("/api/settings"),fetch("/api/tunnel/status"),fetch("/api/keys")]);if(!e)return;if(t.ok){let e=await t.json();v(e.connections||[])}if(a.ok){let e=await a.json();j(e.cloudEnabled||!1)}if(s.ok){let e=await s.json();P(!!(e.tunnel?.enabled||e.tunnel?.settingsEnabled)),w(e.tunnel?.publicUrl||""),N(!!(e.tailscale?.enabled||e.tailscale?.settingsEnabled)),S(e.tailscale?.tunnelUrl||"")}if(l.ok){let e=await l.json();A(e.keys||[])}}catch(e){console.log("Error loading tool data:",e)}finally{e&&m(!1)}})(),()=>{e=!1}},[]);let C=()=>r.filter(e=>!1!==e.isActive),U=(0,l.useCallback)((e,t,a)=>{b(s=>s[e]?.[t]===a?s:{...s,[e]:{...s[e],[t]:a}})},[]);return a?(0,s.jsxs)("div",{className:"mx-auto flex w-full max-w-5xl flex-col gap-4 px-1 sm:px-0",children:[(0,s.jsxs)(i(),{href:"/dashboard/cli-tools",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary w-fit",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"arrow_back"}),"Back to CLI Tools"]}),(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsx)("h1",{className:"text-xl font-semibold text-text-main sm:text-2xl",children:a.name}),(0,s.jsx)("p",{className:"text-sm text-text-muted",children:a.description})]}),h?(0,s.jsx)(o.CardSkeleton,{}):(()=>{let t,l,r,i=(t=C(),l=[],r=new Set,t.forEach(e=>{let t=c.Xg[e.provider]||e.provider;(0,c.KC)(e.provider).forEach(a=>{let s=`${t}/${a.id}`;r.has(s)||(r.add(s),l.push({value:s,label:`${t}/${a.id}`,provider:e.provider,alias:t,connectionName:e.name,modelId:a.id}))})}),l).length>0,o={tool:a,isExpanded:!0,onToggle:()=>{},baseUrl:E&&k?k:f&&u?u:window.location.origin,apiKeys:y,tunnelEnabled:E,tunnelPublicUrl:k,tailscaleEnabled:g,tailscaleUrl:_};switch(e){case"claude":return(0,s.jsx)(n.Tk,{...o,activeProviders:C(),modelMappings:p[e]||{},onModelMappingChange:(t,a)=>U(e,t,a),hasActiveProviders:i,cloudEnabled:f});case"codex":return(0,s.jsx)(n.Ah,{...o,activeProviders:C(),cloudEnabled:f});case"opencode":return(0,s.jsx)(n.qO,{...o,activeProviders:C(),cloudEnabled:f});case"cowork":return(0,s.jsx)(n.Q6,{...o,activeProviders:C(),hasActiveProviders:i,cloudEnabled:f,cloudUrl:u,tunnelEnabled:E,tunnelPublicUrl:k,tailscaleEnabled:g,tailscaleUrl:_});case"droid":return(0,s.jsx)(n.ZM,{...o,activeProviders:C(),hasActiveProviders:i,cloudEnabled:f});case"openclaw":return(0,s.jsx)(n.yZ,{...o,activeProviders:C(),hasActiveProviders:i,cloudEnabled:f});case"hermes":return(0,s.jsx)(n.RF,{...o,activeProviders:C(),hasActiveProviders:i,cloudEnabled:f});case"copilot":return(0,s.jsx)(n.h1,{...o,activeProviders:C(),cloudEnabled:f});case"cline":return(0,s.jsx)(n.aG,{...o,activeProviders:C(),cloudEnabled:f});case"kilo":return(0,s.jsx)(n.c9,{...o,activeProviders:C(),cloudEnabled:f});case"deepseek-tui":return(0,s.jsx)(n.lF,{...o,activeProviders:C(),hasActiveProviders:i,cloudEnabled:f});case"jcode":return(0,s.jsx)(n.mW,{...o,activeProviders:C(),hasActiveProviders:i,cloudEnabled:f});case"grok-build":return(0,s.jsx)(n.E_,{...o,activeProviders:C(),hasActiveProviders:i,cloudEnabled:f});default:return(0,s.jsx)(n.a7,{toolId:e,...o,activeProviders:C(),cloudEnabled:f,tunnelEnabled:E})}})()]}):(0,s.jsxs)("div",{className:"mx-auto flex w-full max-w-5xl flex-col gap-4 px-1 sm:px-0",children:[(0,s.jsxs)(i(),{href:"/dashboard/cli-tools",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary w-fit",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"arrow_back"}),"Back to CLI Tools"]}),(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"Tool not found or disabled."})]})}}},e=>{e.O(0,[3885,2318,4385,2940,7236,5479,8914,5338,2147,3204,7358],()=>e(e.s=29322)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3554],{29322:(e,t,a)=>{Promise.resolve().then(a.bind(a,30819))},30819:(e,t,a)=>{"use strict";a.d(t,{default:()=>x});var s=a(15102),l=a(82030),r=a(93885),i=a.n(r),o=a(73178),c=a(93700),d=a(55223),n=a(59643);let u=a(39730).env.NEXT_PUBLIC_CLOUD_URL;function x({toolId:e,machineId:t}){let a=c.dM[e],[r,v]=(0,l.useState)([]),[h,m]=(0,l.useState)(!0),[p,b]=(0,l.useState)({}),[f,E]=(0,l.useState)(!1),[j,P]=(0,l.useState)(!1),[w,k]=(0,l.useState)(""),[g,N]=(0,l.useState)(!1),[_,S]=(0,l.useState)(""),[y,A]=(0,l.useState)([]);(0,l.useEffect)(()=>{let e=!0;return(async()=>{try{let[t,a,s,l]=await Promise.all([fetch("/api/providers"),fetch("/api/settings"),fetch("/api/tunnel/status"),fetch("/api/keys")]);if(!e)return;if(t.ok){let e=await t.json();v(e.connections||[])}if(a.ok){let e=await a.json();E(e.cloudEnabled||!1)}if(s.ok){let e=await s.json();P(!!(e.tunnel?.enabled||e.tunnel?.settingsEnabled)),k(e.tunnel?.publicUrl||""),N(!!(e.tailscale?.enabled||e.tailscale?.settingsEnabled)),S(e.tailscale?.tunnelUrl||"")}if(l.ok){let e=await l.json();A(e.keys||[])}}catch(e){console.log("Error loading tool data:",e)}finally{e&&m(!1)}})(),()=>{e=!1}},[]);let C=()=>r.filter(e=>!1!==e.isActive),U=(0,l.useCallback)((e,t,a)=>{b(s=>s[e]?.[t]===a?s:{...s,[e]:{...s[e],[t]:a}})},[]);return a?(0,s.jsxs)("div",{className:"mx-auto flex w-full max-w-5xl flex-col gap-4 px-1 sm:px-0",children:[(0,s.jsxs)(i(),{href:"/dashboard/cli-tools",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary w-fit",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"arrow_back"}),"Back to CLI Tools"]}),(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsx)("h1",{className:"text-xl font-semibold text-text-main sm:text-2xl",children:a.name}),(0,s.jsx)("p",{className:"text-sm text-text-muted",children:a.description})]}),h?(0,s.jsx)(o.CardSkeleton,{}):(()=>{let t,l,r,i=(t=C(),l=[],r=new Set,t.forEach(e=>{let t=d.Xg[e.provider]||e.provider;(0,d.KC)(e.provider).forEach(a=>{let s=`${t}/${a.id}`;r.has(s)||(r.add(s),l.push({value:s,label:`${t}/${a.id}`,provider:e.provider,alias:t,connectionName:e.name,modelId:a.id}))})}),l).length>0,o={tool:a,isExpanded:!0,onToggle:()=>{},baseUrl:j&&w?w:f&&u?u:window.location.origin,apiKeys:y,tunnelEnabled:j,tunnelPublicUrl:w,tailscaleEnabled:g,tailscaleUrl:_};switch(e){case"claude":return(0,s.jsx)(n.Tk,{...o,activeProviders:C(),modelMappings:p[e]||{},onModelMappingChange:(t,a)=>U(e,t,a),hasActiveProviders:i,cloudEnabled:f});case"codex":return(0,s.jsx)(n.Ah,{...o,activeProviders:C(),cloudEnabled:f});case"opencode":return(0,s.jsx)(n.qO,{...o,activeProviders:C(),cloudEnabled:f});case"cowork":return(0,s.jsx)(n.Q6,{...o,activeProviders:C(),hasActiveProviders:i,cloudEnabled:f,cloudUrl:u,tunnelEnabled:j,tunnelPublicUrl:w,tailscaleEnabled:g,tailscaleUrl:_});case"droid":return(0,s.jsx)(n.ZM,{...o,activeProviders:C(),hasActiveProviders:i,cloudEnabled:f});case"openclaw":return(0,s.jsx)(n.yZ,{...o,activeProviders:C(),hasActiveProviders:i,cloudEnabled:f});case"hermes":return(0,s.jsx)(n.RF,{...o,activeProviders:C(),hasActiveProviders:i,cloudEnabled:f});case"copilot":return(0,s.jsx)(n.h1,{...o,activeProviders:C(),cloudEnabled:f});case"cline":return(0,s.jsx)(n.aG,{...o,activeProviders:C(),cloudEnabled:f});case"kilo":return(0,s.jsx)(n.c9,{...o,activeProviders:C(),cloudEnabled:f});case"deepseek-tui":return(0,s.jsx)(n.lF,{...o,activeProviders:C(),hasActiveProviders:i,cloudEnabled:f});case"jcode":return(0,s.jsx)(n.mW,{...o,activeProviders:C(),hasActiveProviders:i,cloudEnabled:f});case"grok-build":return(0,s.jsx)(n.E_,{...o,activeProviders:C(),hasActiveProviders:i,cloudEnabled:f});case"pi":case"omp":case"crush":case"forge":case"smelt":case"codewhale":return(0,s.jsx)(n.WE,{...o,activeProviders:C(),cloudEnabled:f});default:return(0,s.jsx)(n.a7,{toolId:e,...o,activeProviders:C(),cloudEnabled:f,tunnelEnabled:j})}})()]}):(0,s.jsxs)("div",{className:"mx-auto flex w-full max-w-5xl flex-col gap-4 px-1 sm:px-0",children:[(0,s.jsxs)(i(),{href:"/dashboard/cli-tools",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary w-fit",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"arrow_back"}),"Back to CLI Tools"]}),(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"Tool not found or disabled."})]})}}},e=>{e.O(0,[3885,3758,7236,4385,3178,8914,9643,2147,3204,7358],()=>e(e.s=29322)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2326],{80307:(e,s,l)=>{Promise.resolve().then(l.bind(l,99590))},99590:(e,s,l)=>{"use strict";l.d(s,{default:()=>m});var a=l(15102),t=l(82030),r=l(92940),n=l(93700),i=l(23895),o=l(93885),c=l.n(o),d=l(37837);function x({toolId:e,tool:s,status:l}){let t=l?l.installed?l.has9Router?{label:"Connected",cls:"bg-green-500/10 text-green-600 dark:text-green-400"}:{label:"Not configured",cls:"bg-yellow-500/10 text-yellow-600 dark:text-yellow-400"}:{label:"Not installed",cls:"bg-gray-500/10 text-gray-500"}:{label:"Unknown",cls:"bg-gray-500/10 text-gray-500"};return(0,a.jsx)(c(),{href:`/dashboard/cli-tools/${e}`,className:"block",children:(0,a.jsx)(r.Card,{padding:"sm",className:"h-full overflow-hidden hover:border-primary/50 transition-colors cursor-pointer",children:(0,a.jsx)("div",{className:"flex h-full flex-col gap-2",children:(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:s.image?(0,a.jsx)(d.default,{src:s.image,alt:s.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:e=>{e.target.style.display="none"},loading:"lazy",decoding:"async"}):s.icon?(0,a.jsx)("span",{className:"material-symbols-outlined text-[28px]",style:{color:s.color},children:s.icon}):null}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("h3",{className:"font-medium text-sm truncate",children:s.name}),(0,a.jsx)("span",{className:`inline-block mt-1 px-1.5 py-0.5 text-[10px] font-medium rounded-full ${t.cls}`,children:t.label})]}),(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px] shrink-0",children:"chevron_right"})]})})})})}function m({machineId:e}){let[s,l]=(0,t.useState)(!0),[o,c]=(0,t.useState)({});if((0,t.useEffect)(()=>{let e=new AbortController;return(async()=>{try{let s=await fetch("/api/cli-tools/all-statuses",{signal:e.signal});s.ok&&!e.signal.aborted&&c(await s.json())}catch(s){e.signal.aborted||console.log("Error fetching tool statuses:",s)}finally{e.signal.aborted||l(!1)}})(),()=>e.abort()},[]),s)return(0,a.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 sm:gap-4",children:[(0,a.jsx)(r.CardSkeleton,{}),(0,a.jsx)(r.CardSkeleton,{}),(0,a.jsx)(r.CardSkeleton,{}),(0,a.jsx)(r.CardSkeleton,{}),(0,a.jsx)(r.CardSkeleton,{}),(0,a.jsx)(r.CardSkeleton,{})]});let d=Object.entries(n.dM),g=Object.entries(n.wn);return(0,a.jsxs)("div",{className:"mx-auto flex w-full max-w-5xl flex-col gap-6 px-1 sm:px-0",children:[(0,a.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 sm:gap-4",children:d.map(([e,s])=>(0,a.jsx)(x,{toolId:e,tool:s,status:o[e]},e))}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:gap-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 px-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] text-primary",children:"security"}),(0,a.jsx)("h2",{className:"text-sm font-semibold text-text-main",children:"MITM Tools"})]}),(0,a.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 sm:gap-4",children:g.map(([e,s])=>(0,a.jsx)(i.A,{tool:s},e))})]})]})}}},e=>{e.O(0,[3885,2318,4385,2940,8914,2147,3204,7358],()=>e(e.s=80307)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2326],{80307:(e,s,l)=>{Promise.resolve().then(l.bind(l,99590))},99590:(e,s,l)=>{"use strict";l.d(s,{default:()=>m});var a=l(15102),t=l(82030),r=l(73178),n=l(93700),i=l(23895),o=l(93885),c=l.n(o),d=l(37837);function x({toolId:e,tool:s,status:l}){let t=l?l.installed?l.has9Router?{label:"Connected",cls:"bg-green-500/10 text-green-600 dark:text-green-400"}:{label:"Not configured",cls:"bg-yellow-500/10 text-yellow-600 dark:text-yellow-400"}:{label:"Not installed",cls:"bg-gray-500/10 text-gray-500"}:{label:"Unknown",cls:"bg-gray-500/10 text-gray-500"};return(0,a.jsx)(c(),{href:`/dashboard/cli-tools/${e}`,className:"block",children:(0,a.jsx)(r.Card,{padding:"sm",className:"h-full overflow-hidden hover:border-primary/50 transition-colors cursor-pointer",children:(0,a.jsx)("div",{className:"flex h-full flex-col gap-2",children:(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:s.image?(0,a.jsx)(d.default,{src:s.image,alt:s.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:e=>{e.target.style.display="none"},loading:"lazy",decoding:"async"}):s.icon?(0,a.jsx)("span",{className:"material-symbols-outlined text-[28px]",style:{color:s.color},children:s.icon}):null}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("h3",{className:"font-medium text-sm truncate",children:s.name}),(0,a.jsx)("span",{className:`inline-block mt-1 px-1.5 py-0.5 text-[10px] font-medium rounded-full ${t.cls}`,children:t.label})]}),(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px] shrink-0",children:"chevron_right"})]})})})})}function m({machineId:e}){let[s,l]=(0,t.useState)(!0),[o,c]=(0,t.useState)({});if((0,t.useEffect)(()=>{let e=new AbortController;return(async()=>{try{let s=await fetch("/api/cli-tools/all-statuses",{signal:e.signal});s.ok&&!e.signal.aborted&&c(await s.json())}catch(s){e.signal.aborted||console.log("Error fetching tool statuses:",s)}finally{e.signal.aborted||l(!1)}})(),()=>e.abort()},[]),s)return(0,a.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 sm:gap-4",children:[(0,a.jsx)(r.CardSkeleton,{}),(0,a.jsx)(r.CardSkeleton,{}),(0,a.jsx)(r.CardSkeleton,{}),(0,a.jsx)(r.CardSkeleton,{}),(0,a.jsx)(r.CardSkeleton,{}),(0,a.jsx)(r.CardSkeleton,{})]});let d=Object.entries(n.dM),g=Object.entries(n.wn);return(0,a.jsxs)("div",{className:"mx-auto flex w-full max-w-5xl flex-col gap-6 px-1 sm:px-0",children:[(0,a.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 sm:gap-4",children:d.map(([e,s])=>(0,a.jsx)(x,{toolId:e,tool:s,status:o[e]},e))}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:gap-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 px-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] text-primary",children:"security"}),(0,a.jsx)("h2",{className:"text-sm font-semibold text-text-main",children:"MITM Tools"})]}),(0,a.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 sm:gap-4",children:g.map(([e,s])=>(0,a.jsx)(i.A,{tool:s},e))})]})]})}}},e=>{e.O(0,[3885,3758,7236,4385,3178,8914,2147,3204,7358],()=>e(e.s=80307)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3649],{1117:(e,t,s)=>{Promise.resolve().then(s.bind(s,14813))},14813:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>n});var a=s(15102),l=s(82030),o=s(73178),r=s(21577),i=s(85479);function n(){let[e,t]=(0,l.useState)([]),[s,n]=(0,l.useState)(!0),[m,x]=(0,l.useState)(!1),[u,p]=(0,l.useState)(null),[h,f]=(0,l.useState)([]),[g,b]=(0,l.useState)({}),[y,j]=(0,l.useState)(null),[w,N]=(0,l.useState)([]),[v,k]=(0,l.useState)(!1),{getCaps:C}=(0,i.y)(),[S,$]=(0,l.useState)(null),{copied:E,copy:D}=(0,r.C)();(0,l.useEffect)(()=>{T()},[]),(0,l.useEffect)(()=>{let t=new Set(e.map(e=>e.id));N(e=>e.filter(e=>t.has(e)))},[e]);let F=e.filter(e=>w.includes(e.id)),O=e.length>0&&w.length===e.length,P=w.length>0,T=async()=>{try{let[e,s,a]=await Promise.all([fetch("/api/combos",{cache:"no-store"}),fetch("/api/providers",{cache:"no-store"}),fetch("/api/settings",{cache:"no-store"})]),l=await e.json(),o=await s.json(),r=a.ok?await a.json():{};e.ok&&t((l.combos||[]).filter(e=>!e.kind||"llm"===e.kind)),s.ok&&f(o.connections||[]),b(r.comboStrategies||{})}catch(e){console.log("Error fetching data:",e)}finally{n(!1)}},M=async e=>{try{let t=await fetch("/api/combos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(t.ok)await T(),x(!1);else{let e=await t.json();alert(e.error||"Failed to create combo")}}catch(e){console.log("Error creating combo:",e)}},_=async(e,t)=>{try{let s=await fetch(`/api/combos/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(s.ok)await T(),p(null);else{let e=await s.json();alert(e.error||"Failed to update combo")}}catch(e){console.log("Error updating combo:",e)}},B=async e=>{let t="cursor"===e?"Cursor Default":"Claude Default";j(e);try{let s=await fetch(`/api/combos/presets?source=${e}`),a=await s.json();if(!s.ok)return void alert(a.error||`Failed to preview ${t}`);let l=(a.items||[]).length,o=a.toCreate??(a.items||[]).filter(e=>!e.exists).length,r=a.toSkip??(a.items||[]).filter(e=>e.exists).length;if(0===l)return void alert(`No ${t} models available to generate.`);if(0===o)return void alert(`All ${l} ${t} combos already exist. Nothing to create.`);$({title:`Generate ${t}`,message:`Create ${o} combo${1===o?"":"s"} named like ${"cursor"===e?"Cursor":"Claude"} model IDs (seeded with cu/… or cc/…). ${r} already exist and will be skipped. You can edit any combo afterward to add fallbacks.`,confirmText:"Generate",variant:"primary",onConfirm:async()=>{$(e=>e?{...e,loading:!0}:null);try{let s=await fetch("/api/combos/presets",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({source:e})}),a=await s.json();if(!s.ok){alert(a.error||`Failed to generate ${t}`),$(e=>e?{...e,loading:!1}:null);return}await T(),$(null)}catch(e){console.log(`Error generating ${t}:`,e),alert(`Failed to generate ${t}`),$(e=>e?{...e,loading:!1}:null)}}})}catch(e){console.log(`Error previewing ${t}:`,e),alert(`Failed to preview ${t}`)}finally{j(null)}},I=(e,t=g)=>{let s={...t};for(let t of e)delete s[t];return s},R=async e=>{await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStrategies:e})}),b(e)},A=async s=>{let a=e.find(e=>e.id===s);$({title:"Delete Combo",message:a?`Delete combo "${a.name}"?`:"Delete this combo?",onConfirm:async()=>{$(e=>e?{...e,loading:!0}:null);try{(await fetch(`/api/combos/${s}`,{method:"DELETE"})).ok&&(a?.name&&await R(I([a.name])),t(e=>e.filter(e=>e.id!==s)),N(e=>e.filter(e=>e!==s))),$(null)}catch(e){console.log("Error deleting combo:",e),$(e=>e?{...e,loading:!1}:null)}}})},J=async(e,t)=>{try{let s={...g},a={...s[e]||{},...t};a.fallbackStrategy&&"fallback"!==a.fallbackStrategy?s[e]=a:delete s[e],await R(s)}catch(e){console.log("Error updating combo strategy:",e)}},z=async e=>{if(0!==F.length&&e){k(!0);try{let t={...g};for(let s of F)"fallback"===e?delete t[s.name]:t[s.name]={...t[s.name]||{},fallbackStrategy:e};await R(t)}catch(e){console.log("Error bulk updating combo strategy:",e),alert("Failed to update strategy for selected combos")}finally{k(!1)}}};return s?(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsx)(o.CardSkeleton,{}),(0,a.jsx)(o.CardSkeleton,{})]}):(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-6 px-1 sm:px-0",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Group models under one name, then pick a strategy per combo."}),(0,a.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2 mt-3",children:[(0,a.jsxs)("div",{className:"flex items-start gap-2 p-2 rounded-lg bg-surface-2/50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] text-primary mt-0.5 shrink-0",children:"arrow_downward"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-xs font-medium text-text-main",children:"Fallback"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Tries models in order, next on failure"})]})]}),(0,a.jsxs)("div",{className:"flex items-start gap-2 p-2 rounded-lg bg-surface-2/50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] text-primary mt-0.5 shrink-0",children:"sync"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-xs font-medium text-text-main",children:"Round Robin"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Rotates across requests to spread load"})]})]}),(0,a.jsxs)("div",{className:"flex items-start gap-2 p-2 rounded-lg bg-surface-2/50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] text-primary mt-0.5 shrink-0",children:"hub"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-xs font-medium text-text-main",children:"Fusion"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Parallel query + judge synthesis (N+1 calls)"})]})]}),(0,a.jsxs)("div",{className:"flex items-start gap-2 p-2 rounded-lg bg-surface-2/50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] text-primary mt-0.5 shrink-0",children:"auto_awesome"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-xs font-medium text-text-main",children:"Capacity auto-switch"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Routes image/PDF/audio to capable models"})]})]})]}),(0,a.jsxs)("p",{className:"text-xs text-text-muted mt-3 max-w-2xl",children:[(0,a.jsx)("span",{className:"font-medium text-text-main",children:"Cursor / Claude Default"})," create combos named exactly like those clients' model IDs (e.g. ",(0,a.jsx)("code",{className:"font-mono",children:"composer-2.5"}),", ",(0,a.jsx)("code",{className:"font-mono",children:"opus"}),"), seeded with the matching ",(0,a.jsx)("code",{className:"font-mono",children:"cu/…"})," or ",(0,a.jsx)("code",{className:"font-mono",children:"cc/…"})," route so traffic can hit the router without the prefix."," ",'Note: Cursor IDE often blocks built-in Composer / Grok from Override OpenAI Base URL ("model does not support custom API"); add them via Cursor\'s ',(0,a.jsx)("span",{className:"font-medium text-text-main",children:"Add Custom Model"})," using the combo name, or pick a model Cursor allows through the custom endpoint."]})]}),(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:shrink-0",children:[(0,a.jsx)(o.Button,{icon:"add",onClick:()=>x(!0),className:"w-full sm:w-auto whitespace-nowrap",children:"Create Combo"}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,a.jsx)(o.Button,{variant:"secondary",size:"sm",icon:"edit_note",loading:"cursor"===y,disabled:!!y,onClick:()=>B("cursor"),className:"w-full whitespace-nowrap",children:"Cursor Default"}),(0,a.jsx)(o.Button,{variant:"secondary",size:"sm",icon:"smart_toy",loading:"claude"===y,disabled:!!y,onClick:()=>B("claude"),className:"w-full whitespace-nowrap",children:"Claude Default"})]})]})]}),0===e.length?(0,a.jsx)(o.Card,{children:(0,a.jsxs)("div",{className:"text-center py-12",children:[(0,a.jsx)("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-full bg-primary/10 text-primary mb-4",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[32px]",children:"layers"})}),(0,a.jsx)("p",{className:"text-text-main font-medium mb-1",children:"No combos yet"}),(0,a.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Create model combos with fallback support"}),(0,a.jsx)(o.Button,{icon:"add",onClick:()=>x(!0),className:"w-full sm:w-auto",children:"Create Combo"})]})}):(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-2 rounded-lg border border-black/5 bg-black/[0.015] px-3 py-2 dark:border-white/5 dark:bg-white/[0.02] sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("label",{className:"flex cursor-pointer items-center gap-2 text-xs text-text-muted hover:text-primary select-none",children:[(0,a.jsx)("input",{type:"checkbox",checked:O,ref:e=>{e&&(e.indeterminate=P&&!O)},onChange:()=>N(O?[]:e.map(e=>e.id)),className:"h-3.5 w-3.5 rounded border-gray-300 text-primary focus:ring-primary","aria-label":"Select all combos"}),(0,a.jsx)("span",{children:P?`${w.length} selected`:`Select all (${e.length})`})]}),(0,a.jsx)("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:P&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"w-full min-w-[160px] sm:w-[200px]",children:(0,a.jsx)(o.Select,{options:c,value:"",placeholder:"Set strategy…",disabled:v,onChange:e=>{let t=e.target.value;t&&z(t)},selectClassName:"py-1.5 text-xs"})}),(0,a.jsxs)(o.Button,{size:"sm",variant:"danger",icon:"delete",disabled:v,loading:v,onClick:()=>{if(0===F.length)return;let e=F.length;$({title:"Delete Selected Combos",message:`Delete ${e} selected combo${1===e?"":"s"}? This cannot be undone.`,confirmText:"Delete",variant:"danger",onConfirm:async()=>{$(e=>e?{...e,loading:!0}:null),k(!0);try{let e=F.map(e=>e.id),s=await Promise.all(e.map(e=>fetch(`/api/combos/${e}`,{method:"DELETE"}))),a=F.filter((e,t)=>s[t]?.ok),l=new Set(a.map(e=>e.id)),o=e.length-a.length;a.length>0&&(await R(I(a.map(e=>e.name))),t(e=>e.filter(e=>!l.has(e.id))),N(e=>e.filter(e=>!l.has(e)))),$(null),o>0&&alert(`Deleted with ${o} failure${1===o?"":"s"}.`)}catch(e){console.log("Error bulk deleting combos:",e),alert("Failed to delete selected combos"),$(e=>e?{...e,loading:!1}:null)}finally{k(!1)}}})},className:"whitespace-nowrap",children:["Delete (",w.length,")"]}),(0,a.jsx)(o.Button,{size:"sm",variant:"ghost",onClick:()=>N([]),disabled:v,children:"Clear"})]})})]}),(0,a.jsx)("div",{className:"flex flex-col gap-3",children:e.map(e=>(0,a.jsx)(d,{combo:e,getCaps:C,activeProviders:h,copied:E,onCopy:D,onEdit:()=>p(e),onDelete:()=>A(e.id),strategy:g[e.name]||{},onSetStrategy:t=>J(e.name,t),selected:w.includes(e.id),onToggleSelect:()=>{var t;return t=e.id,void N(e=>e.includes(t)?e.filter(e=>e!==t):[...e,t])}},e.id))})]}),m&&(0,a.jsx)(o.ComboFormModal,{isOpen:m,onClose:()=>x(!1),onSave:M,activeProviders:h},"create"),u&&(0,a.jsx)(o.ComboFormModal,{isOpen:!!u,combo:u,onClose:()=>p(null),onSave:e=>_(u.id,e),activeProviders:h},u.id),(0,a.jsx)(o.ConfirmModal,{isOpen:!!S,onClose:()=>!S?.loading&&$(null),onConfirm:S?.onConfirm,title:S?.title||"Confirm",message:S?.message,confirmText:S?.confirmText||"Confirm",variant:S?.variant||"danger",loading:!!S?.loading})]})}s(31038);let c=[{value:"fallback",label:"Fallback — try in order"},{value:"round-robin",label:"Round Robin — rotate"},{value:"fusion",label:"Fusion — panel + judge"}];function d({combo:e,getCaps:t,activeProviders:s=[],copied:r,onCopy:i,onEdit:n,onDelete:m,strategy:x={},onSetStrategy:u,selected:p=!1,onToggleSelect:h}){let[f,g]=(0,l.useState)(!1),b=x.fallbackStrategy||"fallback",y=x.judgeModel||"";return(0,a.jsxs)(o.Card,{padding:"sm",className:`group ${p?"ring-1 ring-primary/40 bg-primary/[0.03]":""}`,children:[(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-3 sm:items-center",children:[(0,a.jsx)("label",{className:"flex shrink-0 items-center pt-1 sm:pt-0 cursor-pointer",title:"Select combo",children:(0,a.jsx)("input",{type:"checkbox",checked:p,onChange:h,onClick:e=>e.stopPropagation(),className:"h-4 w-4 rounded border-gray-300 text-primary focus:ring-primary","aria-label":`Select ${e.name}`})}),(0,a.jsx)("div",{className:"size-8 rounded-lg bg-primary/10 flex items-center justify-center shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-primary text-[18px]",children:"layers"})}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("code",{className:"block truncate font-mono text-sm font-medium",children:e.name}),(0,a.jsxs)("div",{className:"mt-1 flex min-w-0 flex-wrap items-center gap-1",children:[0===e.models.length?(0,a.jsx)("span",{className:"text-xs text-text-muted italic",children:"No models"}):e.models.slice(0,3).map((e,s)=>(0,a.jsxs)("code",{className:"inline-flex items-center gap-1 rounded bg-black/5 px-1.5 py-0.5 font-mono text-xs text-text-muted dark:bg-white/5",children:[(0,a.jsx)("span",{children:e}),(0,a.jsx)(o.CapacityBadges,{caps:t?.(e)})]},s)),e.models.length>3&&(0,a.jsxs)("span",{className:"text-[10px] text-text-muted",children:["+",e.models.length-3," more"]})]}),e.models.length>0&&e.models.every(e=>t?.(e)?.vision===!1)&&(0,a.jsxs)("button",{type:"button",onClick:n,className:"mt-1 inline-flex items-center gap-1 text-[11px] text-amber-600 hover:text-amber-700 dark:text-amber-400 dark:hover:text-amber-300",title:"Edit combo to add a vision-capable model",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"visibility_off"}),"Cannot see images — edit combo"]}),"fusion"===b&&(0,a.jsxs)("div",{className:"mt-2 flex min-w-0 flex-wrap items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-[11px] font-medium text-text-muted",children:"Judge"}),(0,a.jsxs)("button",{onClick:()=>g(!0),className:"inline-flex max-w-full items-center gap-1 rounded border border-dashed border-primary/40 px-1.5 py-0.5 font-mono text-[11px] text-primary hover:border-primary hover:bg-primary/5 transition-colors",title:"Pick the model that fuses panel answers",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"gavel"}),(0,a.jsx)("span",{className:"truncate",children:y||`Auto — ${e.models[0]||"first model"}`})]}),y&&(0,a.jsx)("button",{onClick:()=>u({judgeModel:""}),className:"p-0.5 rounded text-text-muted hover:text-red-500 hover:bg-red-500/10 transition-colors",title:"Reset judge to Auto",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"close"})})]})]})]}),(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center sm:gap-3 sm:shrink-0",children:[(0,a.jsx)("div",{className:"w-full sm:w-[200px]",children:(0,a.jsx)(o.Select,{options:c,value:b,onChange:e=>u({fallbackStrategy:e.target.value}),selectClassName:"py-1.5 text-xs"})}),(0,a.jsxs)("div",{className:"grid grid-cols-3 gap-1 sm:flex",children:[(0,a.jsxs)("button",{onClick:t=>{t.stopPropagation(),i(e.name,`combo-${e.id}`)},className:"flex flex-col items-center rounded px-2 py-1 text-text-muted transition-colors hover:bg-black/5 hover:text-primary dark:hover:bg-white/5",title:"Copy combo name",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:r===`combo-${e.id}`?"check":"content_copy"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Copy"})]}),(0,a.jsxs)("button",{onClick:n,className:"flex flex-col items-center rounded px-2 py-1 text-text-muted transition-colors hover:bg-black/5 hover:text-primary dark:hover:bg-white/5",title:"Edit",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,a.jsxs)("button",{onClick:m,className:"flex flex-col items-center rounded px-2 py-1 text-red-500 transition-colors hover:bg-red-500/10",title:"Delete",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]})]})]}),f&&(0,a.jsx)(o.ModelSelectModal,{isOpen:f,onClose:()=>g(!1),onSelect:e=>{u({judgeModel:e?.value||""}),g(!1)},activeProviders:s,title:"Select Judge Model",addedModelValues:y?[y]:[],closeOnSelect:!0})]})}},85479:(e,t,s)=>{"use strict";s.d(t,{y:()=>i});var a=s(82030),l=s(24332);let o=null,r=null;function i(){let[e,t]=(0,a.useState)(()=>o?.byFull||{}),[s,i]=(0,a.useState)(()=>o?.byId||{});return(0,a.useEffect)(()=>{if(o)return;let e=!0;return(o?Promise.resolve(o):r||(r=fetch("/api/models").then(async e=>{if(!e.ok)throw Error(`models ${e.status}`);return o=function(e){let t={},s={};for(let a of e||[])a.caps&&(a.fullModel&&(t[a.fullModel]=a.caps),a.routedModel&&(t[a.routedModel]=a.caps),a.model&&(s[a.model]=a.caps));return{byFull:t,byId:s}}((await e.json()).models)}).catch(()=>({byFull:{},byId:{}})).finally(()=>{r=null}))).then(s=>{e&&(t(s.byFull),i(s.byId))}),()=>{e=!1}},[]),{getCaps:(0,a.useCallback)(t=>(function(e,t,s){if(!s)return null;if(e[s])return e[s];let a=s.includes("/")?s.slice(s.indexOf("/")+1):s;if(t[a])return t[a];let o=s.includes("/")?s.slice(0,s.indexOf("/")):null,r=(0,l.nl)(o,a);return{vision:r.vision,search:r.search,reasoning:r.reasoning,contextWindow:r.contextWindow,maxOutput:r.maxOutput}})(e,s,t),[e,s])}}}},e=>{e.O(0,[3885,3758,7236,4385,3178,2147,3204,7358],()=>e(e.s=1117)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[712],{78199:(e,t,s)=>{"use strict";s.d(t,{default:()=>c});var r=s(15102),l=s(82030),n=s(92940),a=s(11434);let o={LOG:"text-emerald-400",INFO:"text-blue-400",WARN:"text-yellow-400",ERROR:"text-red-400 font-medium",DEBUG:"text-purple-400"};function i(e){if(!e||"string"!=typeof e)return"INFO";let t=e.toUpperCase();return t.includes("ERROR")||t.includes("EXCEPTION")||t.includes("FAIL")||t.includes("PM2-ERROR")||t.includes("ERR_")?"ERROR":t.includes("WARN")||t.includes("WARNING")?"WARN":t.includes("DEBUG")?"DEBUG":(t.includes("LOG")||t.includes("INFO")||t.includes("[PM2-OUT]"),"INFO")}function c(){let[e,t]=(0,l.useState)([]),[s,c]=(0,l.useState)([]),[x,d]=(0,l.useState)([]),[m,u]=(0,l.useState)({available:!1,errorCount:0}),[p,h]=(0,l.useState)({isDocker:!1,available:!1}),[b,g]=(0,l.useState)("all"),[f,y]=(0,l.useState)("ALL"),[N,j]=(0,l.useState)(""),[v,R]=(0,l.useState)(!0),[k,L]=(0,l.useState)(!1),[w,C]=(0,l.useState)(!0),O=(0,l.useRef)(null),E=async()=>{try{C(!0);let e=await fetch("/api/translator/console-logs"),s=await e.json();s.success&&(s.logs&&t(s.logs.slice(-a.UY.maxLines)),s.pm2Logs&&c(s.pm2Logs),s.pm2Info&&u(s.pm2Info),s.dockerLogs&&d(s.dockerLogs),s.dockerInfo&&h(s.dockerInfo))}catch(e){console.error("Failed to fetch system logs:",e)}finally{C(!1)}},A=async()=>{try{await fetch("/api/translator/console-logs",{method:"DELETE"}),t([])}catch(e){console.error("Failed to clear console logs:",e)}};(0,l.useEffect)(()=>{E();let e=new EventSource("/api/translator/console-logs/stream");return e.onopen=()=>L(!0),e.onmessage=e=>{let s=JSON.parse(e.data);"init"===s.type?t(s.logs.slice(-a.UY.maxLines)):"line"===s.type?t(e=>{let t=[...e,s.line];return t.length>a.UY.maxLines?t.slice(-a.UY.maxLines):t}):"lines"===s.type?t(e=>{let t=[...e,...s.lines];return t.length>a.UY.maxLines?t.slice(-a.UY.maxLines):t}):"clear"===s.type&&t([])},e.onerror=()=>L(!1),()=>e.close()},[]);let I=(0,l.useMemo)(()=>{let t=[];return"all"===b?t=[...e,...s,...x]:"app"===b?t=e:"pm2"===b?t=s:"docker"===b&&(t=x),t.filter(e=>{if(!e)return!1;let t=i(e);return("ERROR"!==f||"ERROR"===t)&&("WARN"!==f||"WARN"===t)&&("INFO"!==f||"INFO"===t||"LOG"===t)&&(!N.trim()||e.toLowerCase().includes(N.toLowerCase()))})},[b,f,N,e,s,x]),S=(0,l.useMemo)(()=>("all"===b?[...e,...s,...x]:"app"===b?e:"pm2"===b?s:x).filter(e=>"ERROR"===i(e)).length,[b,e,s,x]);return(0,l.useEffect)(()=>{v&&O.current&&(O.current.scrollTop=O.current.scrollHeight)},[I,v]),(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsxs)(n.Card,{className:"p-4",children:[(0,r.jsxs)("div",{className:"flex flex-col gap-4 md:flex-row md:items-center md:justify-between",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 overflow-x-auto pb-1 md:pb-0",children:[(0,r.jsxs)("button",{onClick:()=>g("all"),className:`px-3 py-1.5 text-xs font-medium rounded-lg transition-colors flex items-center gap-1.5 shrink-0 ${"all"===b?"bg-primary text-white":"bg-surface-hover text-text-muted hover:text-text-primary"}`,children:[(0,r.jsx)("span",{children:"All Logs"}),(0,r.jsx)("span",{className:"px-1.5 py-0.5 rounded-full text-[10px] bg-black/20",children:e.length+s.length+x.length})]}),(0,r.jsxs)("button",{onClick:()=>g("app"),className:`px-3 py-1.5 text-xs font-medium rounded-lg transition-colors flex items-center gap-1.5 shrink-0 ${"app"===b?"bg-primary text-white":"bg-surface-hover text-text-muted hover:text-text-primary"}`,children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-sm",children:"terminal"}),(0,r.jsx)("span",{children:"App Console"}),(0,r.jsx)("span",{className:"px-1.5 py-0.5 rounded-full text-[10px] bg-black/20",children:e.length})]}),(0,r.jsxs)("button",{onClick:()=>g("pm2"),className:`px-3 py-1.5 text-xs font-medium rounded-lg transition-colors flex items-center gap-1.5 shrink-0 ${"pm2"===b?"bg-primary text-white":"bg-surface-hover text-text-muted hover:text-text-primary"}`,children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-sm",children:"dns"}),(0,r.jsx)("span",{children:"PM2 Server Logs"}),m.errorCount>0&&(0,r.jsxs)("span",{className:"px-1.5 py-0.5 rounded-full text-[10px] bg-red-500 text-white font-bold",children:[m.errorCount," Err"]})]}),(p.available||x.length>0)&&(0,r.jsxs)("button",{onClick:()=>g("docker"),className:`px-3 py-1.5 text-xs font-medium rounded-lg transition-colors flex items-center gap-1.5 shrink-0 ${"docker"===b?"bg-primary text-white":"bg-surface-hover text-text-muted hover:text-text-primary"}`,children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-sm",children:"dataset"}),(0,r.jsx)("span",{children:"Docker Logs"}),(0,r.jsx)("span",{className:"px-1.5 py-0.5 rounded-full text-[10px] bg-black/20",children:x.length})]})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsxs)("div",{className:"flex items-center gap-1",children:[(0,r.jsx)("span",{className:`inline-block size-2 rounded-full ${k?"bg-green-500 animate-pulse":"bg-red-500"}`}),(0,r.jsx)("span",{className:"text-xs text-text-muted",children:k?"Live Stream":"Disconnected"})]}),(0,r.jsx)(n.Button,{size:"sm",variant:"outline",icon:"sync",onClick:E,loading:w,children:"Refresh"}),(0,r.jsx)(n.Button,{size:"sm",variant:"outline",icon:"content_copy",onClick:()=>{let e=I.join("\n");navigator.clipboard.writeText(e)},children:"Copy"}),(0,r.jsx)(n.Button,{size:"sm",variant:"outline",icon:"delete",onClick:A,children:"Clear App Logs"})]})]}),(0,r.jsxs)("div",{className:"mt-4 pt-3 border-t border-border-primary flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,r.jsxs)("div",{className:"flex items-center gap-1.5 flex-wrap",children:[(0,r.jsx)("span",{className:"text-xs font-medium text-text-muted mr-1",children:"Filter Level:"}),(0,r.jsx)("button",{onClick:()=>y("ALL"),className:`px-2.5 py-1 text-xs rounded-md transition-colors ${"ALL"===f?"bg-primary/20 text-primary font-bold border border-primary/40":"bg-surface-hover text-text-muted hover:text-text-primary"}`,children:"ALL"}),(0,r.jsxs)("button",{onClick:()=>y("ERROR"),className:`px-2.5 py-1 text-xs rounded-md transition-colors flex items-center gap-1 ${"ERROR"===f?"bg-red-500/20 text-red-400 font-bold border border-red-500/50":"bg-surface-hover text-text-muted hover:text-red-400"}`,children:[(0,r.jsx)("span",{children:"ERROR ONLY"}),S>0&&(0,r.jsx)("span",{className:"px-1.5 py-0.2 rounded-full text-[10px] bg-red-500 text-white font-bold",children:S})]}),(0,r.jsx)("button",{onClick:()=>y("WARN"),className:`px-2.5 py-1 text-xs rounded-md transition-colors ${"WARN"===f?"bg-yellow-500/20 text-yellow-400 font-bold border border-yellow-500/50":"bg-surface-hover text-text-muted hover:text-yellow-400"}`,children:"WARN"}),(0,r.jsx)("button",{onClick:()=>y("INFO"),className:`px-2.5 py-1 text-xs rounded-md transition-colors ${"INFO"===f?"bg-blue-500/20 text-blue-400 font-bold border border-blue-500/50":"bg-surface-hover text-text-muted hover:text-blue-400"}`,children:"INFO"})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsxs)("div",{className:"relative w-48 sm:w-64",children:[(0,r.jsx)(n.Input,{size:"sm",placeholder:"Search log text...",value:N,onChange:e=>j(e.target.value),className:"w-full text-xs"}),N&&(0,r.jsx)("button",{onClick:()=>j(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-muted hover:text-text-primary text-xs",children:"✕"})]}),(0,r.jsxs)("button",{onClick:()=>R(!v),className:`px-2.5 py-1 text-xs rounded-md border transition-colors flex items-center gap-1 ${v?"bg-green-500/10 text-green-400 border-green-500/30":"bg-surface-hover text-text-muted border-border-primary"}`,children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-sm",children:v?"vertical_align_bottom":"pause"}),(0,r.jsx)("span",{children:v?"Auto-scroll":"Paused"})]})]})]})]}),(0,r.jsx)(n.Card,{className:"overflow-hidden",children:(0,r.jsx)("div",{ref:O,className:"bg-black/95 p-4 font-mono text-xs h-[calc(100vh-280px)] overflow-y-auto space-y-1 scrollbar-thin",children:0===I.length?(0,r.jsxs)("div",{className:"flex flex-col items-center justify-center h-full text-text-muted py-12",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-4xl mb-2 text-text-muted/50",children:"terminal"}),(0,r.jsx)("p",{children:"No console or system logs match your filter criteria."}),"ALL"!==f&&(0,r.jsx)("button",{onClick:()=>y("ALL"),className:"text-xs text-primary hover:underline mt-2",children:"Reset level filter"})]}):I.map((e,t)=>{let s,l,n;return l=o[s=i(e)]||"text-gray-300",n="","ERROR"===s?n="bg-red-500/10 border-l-2 border-red-500 pl-2 py-0.5 my-0.5 rounded-r":"WARN"===s&&(n="bg-yellow-500/10 border-l-2 border-yellow-500 pl-2 py-0.5 my-0.5 rounded-r"),(0,r.jsx)("div",{className:`font-mono text-xs leading-relaxed break-all ${n} ${l}`,children:e},t)})})})]})}},84406:(e,t,s)=>{Promise.resolve().then(s.bind(s,78199))}},e=>{e.O(0,[3885,2318,4385,2940,2147,3204,7358],()=>e(e.s=84406)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[712],{78199:(e,t,s)=>{"use strict";s.d(t,{default:()=>c});var r=s(15102),l=s(82030),n=s(73178),a=s(11434);let o={LOG:"text-emerald-400",INFO:"text-blue-400",WARN:"text-yellow-400",ERROR:"text-red-400 font-medium",DEBUG:"text-purple-400"};function i(e){if(!e||"string"!=typeof e)return"INFO";let t=e.toUpperCase();return t.includes("ERROR")||t.includes("EXCEPTION")||t.includes("FAIL")||t.includes("PM2-ERROR")||t.includes("ERR_")?"ERROR":t.includes("WARN")||t.includes("WARNING")?"WARN":t.includes("DEBUG")?"DEBUG":(t.includes("LOG")||t.includes("INFO")||t.includes("[PM2-OUT]"),"INFO")}function c(){let[e,t]=(0,l.useState)([]),[s,c]=(0,l.useState)([]),[x,d]=(0,l.useState)([]),[m,u]=(0,l.useState)({available:!1,errorCount:0}),[p,h]=(0,l.useState)({isDocker:!1,available:!1}),[b,g]=(0,l.useState)("all"),[f,y]=(0,l.useState)("ALL"),[N,j]=(0,l.useState)(""),[v,R]=(0,l.useState)(!0),[k,L]=(0,l.useState)(!1),[w,C]=(0,l.useState)(!0),O=(0,l.useRef)(null),E=async()=>{try{C(!0);let e=await fetch("/api/translator/console-logs"),s=await e.json();s.success&&(s.logs&&t(s.logs.slice(-a.UY.maxLines)),s.pm2Logs&&c(s.pm2Logs),s.pm2Info&&u(s.pm2Info),s.dockerLogs&&d(s.dockerLogs),s.dockerInfo&&h(s.dockerInfo))}catch(e){console.error("Failed to fetch system logs:",e)}finally{C(!1)}},A=async()=>{try{await fetch("/api/translator/console-logs",{method:"DELETE"}),t([])}catch(e){console.error("Failed to clear console logs:",e)}};(0,l.useEffect)(()=>{E();let e=new EventSource("/api/translator/console-logs/stream");return e.onopen=()=>L(!0),e.onmessage=e=>{let s=JSON.parse(e.data);"init"===s.type?t(s.logs.slice(-a.UY.maxLines)):"line"===s.type?t(e=>{let t=[...e,s.line];return t.length>a.UY.maxLines?t.slice(-a.UY.maxLines):t}):"lines"===s.type?t(e=>{let t=[...e,...s.lines];return t.length>a.UY.maxLines?t.slice(-a.UY.maxLines):t}):"clear"===s.type&&t([])},e.onerror=()=>L(!1),()=>e.close()},[]);let I=(0,l.useMemo)(()=>{let t=[];return"all"===b?t=[...e,...s,...x]:"app"===b?t=e:"pm2"===b?t=s:"docker"===b&&(t=x),t.filter(e=>{if(!e)return!1;let t=i(e);return("ERROR"!==f||"ERROR"===t)&&("WARN"!==f||"WARN"===t)&&("INFO"!==f||"INFO"===t||"LOG"===t)&&(!N.trim()||e.toLowerCase().includes(N.toLowerCase()))})},[b,f,N,e,s,x]),S=(0,l.useMemo)(()=>("all"===b?[...e,...s,...x]:"app"===b?e:"pm2"===b?s:x).filter(e=>"ERROR"===i(e)).length,[b,e,s,x]);return(0,l.useEffect)(()=>{v&&O.current&&(O.current.scrollTop=O.current.scrollHeight)},[I,v]),(0,r.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,r.jsxs)(n.Card,{className:"p-4",children:[(0,r.jsxs)("div",{className:"flex flex-col gap-4 md:flex-row md:items-center md:justify-between",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 overflow-x-auto pb-1 md:pb-0",children:[(0,r.jsxs)("button",{onClick:()=>g("all"),className:`px-3 py-1.5 text-xs font-medium rounded-lg transition-colors flex items-center gap-1.5 shrink-0 ${"all"===b?"bg-primary text-white":"bg-surface-hover text-text-muted hover:text-text-primary"}`,children:[(0,r.jsx)("span",{children:"All Logs"}),(0,r.jsx)("span",{className:"px-1.5 py-0.5 rounded-full text-[10px] bg-black/20",children:e.length+s.length+x.length})]}),(0,r.jsxs)("button",{onClick:()=>g("app"),className:`px-3 py-1.5 text-xs font-medium rounded-lg transition-colors flex items-center gap-1.5 shrink-0 ${"app"===b?"bg-primary text-white":"bg-surface-hover text-text-muted hover:text-text-primary"}`,children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-sm",children:"terminal"}),(0,r.jsx)("span",{children:"App Console"}),(0,r.jsx)("span",{className:"px-1.5 py-0.5 rounded-full text-[10px] bg-black/20",children:e.length})]}),(0,r.jsxs)("button",{onClick:()=>g("pm2"),className:`px-3 py-1.5 text-xs font-medium rounded-lg transition-colors flex items-center gap-1.5 shrink-0 ${"pm2"===b?"bg-primary text-white":"bg-surface-hover text-text-muted hover:text-text-primary"}`,children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-sm",children:"dns"}),(0,r.jsx)("span",{children:"PM2 Server Logs"}),m.errorCount>0&&(0,r.jsxs)("span",{className:"px-1.5 py-0.5 rounded-full text-[10px] bg-red-500 text-white font-bold",children:[m.errorCount," Err"]})]}),(p.available||x.length>0)&&(0,r.jsxs)("button",{onClick:()=>g("docker"),className:`px-3 py-1.5 text-xs font-medium rounded-lg transition-colors flex items-center gap-1.5 shrink-0 ${"docker"===b?"bg-primary text-white":"bg-surface-hover text-text-muted hover:text-text-primary"}`,children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-sm",children:"dataset"}),(0,r.jsx)("span",{children:"Docker Logs"}),(0,r.jsx)("span",{className:"px-1.5 py-0.5 rounded-full text-[10px] bg-black/20",children:x.length})]})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsxs)("div",{className:"flex items-center gap-1",children:[(0,r.jsx)("span",{className:`inline-block size-2 rounded-full ${k?"bg-green-500 animate-pulse":"bg-red-500"}`}),(0,r.jsx)("span",{className:"text-xs text-text-muted",children:k?"Live Stream":"Disconnected"})]}),(0,r.jsx)(n.Button,{size:"sm",variant:"outline",icon:"sync",onClick:E,loading:w,children:"Refresh"}),(0,r.jsx)(n.Button,{size:"sm",variant:"outline",icon:"content_copy",onClick:()=>{let e=I.join("\n");navigator.clipboard.writeText(e)},children:"Copy"}),(0,r.jsx)(n.Button,{size:"sm",variant:"outline",icon:"delete",onClick:A,children:"Clear App Logs"})]})]}),(0,r.jsxs)("div",{className:"mt-4 pt-3 border-t border-border-primary flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,r.jsxs)("div",{className:"flex items-center gap-1.5 flex-wrap",children:[(0,r.jsx)("span",{className:"text-xs font-medium text-text-muted mr-1",children:"Filter Level:"}),(0,r.jsx)("button",{onClick:()=>y("ALL"),className:`px-2.5 py-1 text-xs rounded-md transition-colors ${"ALL"===f?"bg-primary/20 text-primary font-bold border border-primary/40":"bg-surface-hover text-text-muted hover:text-text-primary"}`,children:"ALL"}),(0,r.jsxs)("button",{onClick:()=>y("ERROR"),className:`px-2.5 py-1 text-xs rounded-md transition-colors flex items-center gap-1 ${"ERROR"===f?"bg-red-500/20 text-red-400 font-bold border border-red-500/50":"bg-surface-hover text-text-muted hover:text-red-400"}`,children:[(0,r.jsx)("span",{children:"ERROR ONLY"}),S>0&&(0,r.jsx)("span",{className:"px-1.5 py-0.2 rounded-full text-[10px] bg-red-500 text-white font-bold",children:S})]}),(0,r.jsx)("button",{onClick:()=>y("WARN"),className:`px-2.5 py-1 text-xs rounded-md transition-colors ${"WARN"===f?"bg-yellow-500/20 text-yellow-400 font-bold border border-yellow-500/50":"bg-surface-hover text-text-muted hover:text-yellow-400"}`,children:"WARN"}),(0,r.jsx)("button",{onClick:()=>y("INFO"),className:`px-2.5 py-1 text-xs rounded-md transition-colors ${"INFO"===f?"bg-blue-500/20 text-blue-400 font-bold border border-blue-500/50":"bg-surface-hover text-text-muted hover:text-blue-400"}`,children:"INFO"})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsxs)("div",{className:"relative w-48 sm:w-64",children:[(0,r.jsx)(n.Input,{size:"sm",placeholder:"Search log text...",value:N,onChange:e=>j(e.target.value),className:"w-full text-xs"}),N&&(0,r.jsx)("button",{onClick:()=>j(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-muted hover:text-text-primary text-xs",children:"✕"})]}),(0,r.jsxs)("button",{onClick:()=>R(!v),className:`px-2.5 py-1 text-xs rounded-md border transition-colors flex items-center gap-1 ${v?"bg-green-500/10 text-green-400 border-green-500/30":"bg-surface-hover text-text-muted border-border-primary"}`,children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-sm",children:v?"vertical_align_bottom":"pause"}),(0,r.jsx)("span",{children:v?"Auto-scroll":"Paused"})]})]})]})]}),(0,r.jsx)(n.Card,{className:"overflow-hidden",children:(0,r.jsx)("div",{ref:O,className:"bg-black/95 p-4 font-mono text-xs h-[calc(100vh-280px)] overflow-y-auto space-y-1 scrollbar-thin",children:0===I.length?(0,r.jsxs)("div",{className:"flex flex-col items-center justify-center h-full text-text-muted py-12",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-4xl mb-2 text-text-muted/50",children:"terminal"}),(0,r.jsx)("p",{children:"No console or system logs match your filter criteria."}),"ALL"!==f&&(0,r.jsx)("button",{onClick:()=>y("ALL"),className:"text-xs text-primary hover:underline mt-2",children:"Reset level filter"})]}):I.map((e,t)=>{let s,l,n;return l=o[s=i(e)]||"text-gray-300",n="","ERROR"===s?n="bg-red-500/10 border-l-2 border-red-500 pl-2 py-0.5 my-0.5 rounded-r":"WARN"===s&&(n="bg-yellow-500/10 border-l-2 border-yellow-500 pl-2 py-0.5 my-0.5 rounded-r"),(0,r.jsx)("div",{className:`font-mono text-xs leading-relaxed break-all ${n} ${l}`,children:e},t)})})})]})}},84406:(e,t,s)=>{Promise.resolve().then(s.bind(s,78199))}},e=>{e.O(0,[3885,3758,7236,4385,3178,2147,3204,7358],()=>e(e.s=84406)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6099],{},_=>{_.O(0,[3885,3758,7236,4385,3178,9131,2147,3204,7358],()=>_(_.s=11512)),_N_E=_.O()}]);
@@ -1,4 +1,4 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[182],{2710:(e,t,a)=>{Promise.resolve().then(a.bind(a,28721))},21863:(e,t,a)=>{"use strict";function s(e,t){return!1===e?"default":"active"===t||"success"===t?"success":"error"===t||"expired"===t||"unavailable"===t?"error":"default"}a.d(t,{g:()=>s})},28721:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>B});var s=a(15102),r=a(93278),l=a(93885),o=a.n(l),n=a(82030),i=a(92940),d=a(31704),c=a(31038),m=a(21863);function u({until:e}){let[t,a]=(0,n.useState)("");return((0,n.useEffect)(()=>{let t=()=>{let t=new Date(e).getTime()-Date.now();if(t<=0)return void a("");let s=Math.floor(t/1e3);s<60?a(`${s}s`):s<3600?a(`${Math.floor(s/60)}m ${s%60}s`):a(`${Math.floor(s/3600)}h ${Math.floor(s%3600/60)}m`)};t();let s=setInterval(t,1e3);return()=>clearInterval(s)},[e]),t)?(0,s.jsxs)("span",{className:"text-xs text-orange-500 font-mono",children:["⏱ ",t]}):null}function x({connection:e,proxyPools:t,isOAuth:a,isFirst:r,isLast:l,onMoveUp:o,onMoveDown:d,onToggleActive:c,onUpdateProxy:p,onEdit:h,onDelete:b}){let[g,f]=(0,n.useState)(!1),[y,j]=(0,n.useState)(!1),[v,w]=(0,n.useState)(!1),N=(0,n.useRef)(null),k=new Map((t||[]).map(e=>[e.id,e])),C=e.providerSpecificData?.proxyPoolId||null,S=C?k.get(C):null,$=e.providerSpecificData?.connectionProxyEnabled===!0&&!!e.providerSpecificData?.connectionProxyUrl,P=!!C||$,A=S?`Pool: ${S.name}`:C?`Pool: ${C} (inactive/missing)`:$?`Legacy: ${e.providerSpecificData?.connectionProxyUrl}`:"",_="",I=S?.proxyUrl||e.providerSpecificData?.connectionProxyUrl;if(I)try{let e=new URL(I);_=`${e.protocol}//${e.hostname}${e.port?`:${e.port}`:""}`}catch{_=I}let T=S?.noProxy||e.providerSpecificData?.connectionNoProxy||"",E=S?.isActive===!0?"success":C||$?"error":"default",O=Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>e).filter(Boolean).sort()[0]||null;(0,n.useEffect)(()=>{let t=null,a=()=>{w(!!Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>e).filter(e=>e&&new Date(e).getTime()>Date.now()).sort()[0])};return a(),O&&(t=setInterval(a,1e3)),()=>{t&&clearInterval(t)}},[O,e]),(0,n.useEffect)(()=>{if(!g)return;let e=e=>{N.current&&!N.current.contains(e.target)&&f(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[g]);let M="unavailable"!==e.testStatus||v?e.testStatus:"active",B=a?e.name||e.email||e.displayName||"OAuth Account":e.name,R=async e=>{j(!0);try{await p("__none__"===e?null:e)}finally{j(!1),f(!1)}};return(0,s.jsxs)("div",{className:`group flex flex-col gap-3 p-2 rounded-lg sm:flex-row sm:items-center sm:justify-between hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors ${!1===e.isActive?"opacity-60":""}`,children:[(0,s.jsxs)("div",{className:"flex w-full min-w-0 flex-1 items-start gap-3 sm:items-center",children:[(0,s.jsxs)("div",{className:"flex flex-col",children:[(0,s.jsx)("button",{onClick:o,disabled:r,className:`p-0.5 rounded ${r?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_up"})}),(0,s.jsx)("button",{onClick:d,disabled:l,className:`p-0.5 rounded ${l?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_down"})})]}),(0,s.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted",children:a?"lock":"key"}),(0,s.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,s.jsx)("p",{className:"text-sm font-medium truncate",children:B}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2 mt-1",children:[(0,s.jsx)(i.Badge,{variant:(0,m.g)(e.isActive,M),size:"sm",dot:!0,children:!1===e.isActive?"disabled":M||"Unknown"}),P&&(0,s.jsx)(i.Badge,{variant:E,size:"sm",children:"Proxy"}),v&&!1!==e.isActive&&(0,s.jsx)(u,{until:O}),e.lastError&&!1!==e.isActive&&(0,s.jsx)("span",{className:"text-xs text-red-500 truncate max-w-[300px]",title:e.lastError,children:e.lastError}),(0,s.jsxs)("span",{className:"text-xs text-text-muted",children:["#",e.priority]})]}),P&&(0,s.jsxs)("div",{className:"mt-1 flex flex-wrap items-center gap-2",children:[(0,s.jsx)("span",{className:"text-[11px] text-text-muted truncate max-w-[420px]",title:A,children:A}),_&&(0,s.jsx)("code",{className:"text-[10px] font-mono bg-black/5 dark:bg-white/5 px-1 py-0.5 rounded text-text-muted",children:_}),T&&(0,s.jsxs)("span",{className:"text-[11px] text-text-muted truncate max-w-[320px]",title:T,children:["no_proxy: ",T]})]})]})]}),(0,s.jsxs)("div",{className:"flex w-full flex-wrap items-center justify-between gap-2 sm:w-auto sm:justify-end",children:[(0,s.jsxs)("div",{className:"flex flex-wrap gap-1",children:[(t||[]).length>0&&(0,s.jsxs)("div",{className:"relative",ref:N,children:[(0,s.jsxs)("button",{onClick:()=>f(e=>!e),className:`flex flex-col items-center px-2 py-1 rounded hover:bg-black/5 dark:hover:bg-white/5 transition-colors ${P?"text-primary":"text-text-muted hover:text-primary"}`,disabled:y,children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:y?"progress_activity":"lan"}),(0,s.jsx)("span",{className:"text-[10px] leading-tight",children:"Proxy"})]}),g&&(0,s.jsxs)("div",{className:"absolute right-0 top-full mt-1 z-50 bg-bg border border-border rounded-lg shadow-lg py-1 min-w-[160px]",children:[(0,s.jsx)("button",{onClick:()=>R("__none__"),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${!C?"text-primary font-medium":"text-text-main"}`,children:"None"}),(t||[]).map(e=>(0,s.jsx)("button",{onClick:()=>R(e.id),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${C===e.id?"text-primary font-medium":"text-text-main"}`,children:e.name},e.id))]})]}),(0,s.jsxs)("button",{onClick:h,className:"flex flex-col items-center px-2 py-1 rounded hover:bg-black/5 dark:hover:bg-white/5 text-text-muted hover:text-primary",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,s.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,s.jsxs)("button",{onClick:b,className:"flex flex-col items-center px-2 py-1 rounded hover:bg-red-500/10 text-red-500",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,s.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]}),(0,s.jsx)(i.Toggle,{size:"sm",checked:e.isActive??!0,onChange:c,title:e.isActive??!0?"Disable":"Enable"})]})]})}function p({isOpen:e,provider:t,providerName:a,proxyPools:r,onSave:l,onClose:o}){let d="__none__",[c,m]=(0,n.useState)({name:"",apiKey:"",priority:1,proxyPoolId:d}),[u,x]=(0,n.useState)(!1),[h,b]=(0,n.useState)(null),[g,f]=(0,n.useState)(!1),y=async()=>{x(!0);try{let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:c.apiKey})}),a=await e.json();b(a.valid?"success":"failed")}catch{b("failed")}finally{x(!1)}},j=async()=>{if(t&&c.apiKey){f(!0);try{let e=!1;try{x(!0),b(null);let a=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:c.apiKey})});e=!!(await a.json()).valid,b(e?"success":"failed")}catch{b("failed")}finally{x(!1)}await l({name:c.name,apiKey:c.apiKey,priority:c.priority,proxyPoolId:c.proxyPoolId===d?null:c.proxyPoolId,testStatus:e?"active":"unknown"})}finally{f(!1)}}};return t?(0,s.jsx)(i.Modal,{isOpen:e,title:`Add ${a||t} API Key`,onClose:o,children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"text-xs text-text-muted mb-1 block",children:"Name"}),(0,s.jsx)("input",{className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",value:c.name,onChange:e=>m({...c,name:e.target.value}),placeholder:"Production Key"})]}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsxs)("div",{className:"flex-1",children:[(0,s.jsx)("label",{className:"text-xs text-text-muted mb-1 block",children:"API Key"}),(0,s.jsx)("input",{type:"password",className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",value:c.apiKey,onChange:e=>m({...c,apiKey:e.target.value})})]}),(0,s.jsx)("div",{className:"pt-6",children:(0,s.jsx)(i.Button,{onClick:y,disabled:!c.apiKey||u||g,variant:"secondary",children:u?"Checking...":"Check"})})]}),h&&(0,s.jsx)(i.Badge,{variant:"success"===h?"success":"error",children:"success"===h?"Valid":"Invalid"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"text-xs text-text-muted mb-1 block",children:"Priority"}),(0,s.jsx)("input",{type:"number",className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",value:c.priority,onChange:e=>m({...c,priority:Number.parseInt(e.target.value)||1})})]}),(0,s.jsx)(i.Select,{label:"Proxy Pool",value:c.proxyPoolId,onChange:e=>m({...c,proxyPoolId:e.target.value}),options:[{value:d,label:"None"},...(r||[]).map(e=>({value:e.id,label:e.name}))]}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(i.Button,{onClick:j,fullWidth:!0,disabled:!c.name||!c.apiKey||g,children:g?"Saving...":"Save"}),(0,s.jsx)(i.Button,{onClick:o,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}function h({providerId:e,isOAuth:t}){let[a,r]=(0,n.useState)([]),[l,o]=(0,n.useState)([]),[d,c]=(0,n.useState)(!0),[m,u]=(0,n.useState)(!1),[b,g]=(0,n.useState)(!1),[f,y]=(0,n.useState)(null),[j,v]=(0,n.useState)(null),[w,N]=(0,n.useState)("1"),[k,C]=(0,n.useState)(null),S=(0,n.useCallback)(async()=>{try{let[t,a,s]=await Promise.all([fetch("/api/providers",{cache:"no-store"}),fetch("/api/proxy-pools?isActive=true",{cache:"no-store"}),fetch("/api/settings",{cache:"no-store"})]),l=await t.json(),n=await a.json(),i=s.ok?await s.json():{};t.ok&&r((l.connections||[]).filter(t=>t.provider===e)),a.ok&&o(n.proxyPools||[]);let d=(i.providerStrategies||{})[e]||{};v(d.fallbackStrategy||null),N(null!=d.stickyRoundRobinLimit?String(d.stickyRoundRobinLimit):"1")}catch(e){console.log("ConnectionsCard fetch error:",e)}finally{c(!1)}},[e]);(0,n.useEffect)(()=>{S()},[S]);let $=async(t,a)=>{try{let s=await fetch("/api/settings",{cache:"no-store"}),r=(s.ok?await s.json():{}).providerStrategies||{},l={};t&&(l.fallbackStrategy=t),"round-robin"===t&&""!==a&&(l.stickyRoundRobinLimit=Number(a)||3);let o={...r};0===Object.keys(l).length?delete o[e]:o[e]=l,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:o})})}catch(e){console.log("saveStrategy error:",e)}},P=async(e,t)=>{let s=[...a];[s[e],s[t]]=[s[t],s[e]],r(s);try{await Promise.all([fetch(`/api/providers/${s[e].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:e})}),fetch(`/api/providers/${s[t].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:t})})])}catch{await S()}},A=async e=>{C({title:"Delete Connection",message:"Delete this connection?",onConfirm:async()=>{C(null);try{(await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok&&r(t=>t.filter(t=>t.id!==e))}catch(e){console.log("delete error:",e)}}})},_=async(e,t)=>{try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&r(a=>a.map(a=>a.id===e?{...a,isActive:t}:a))}catch(e){console.log("toggle error:",e)}},I=async(e,t)=>{try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:t||null})})).ok&&r(a=>a.map(a=>a.id===e?{...a,providerSpecificData:{...a.providerSpecificData,proxyPoolId:t||null}}:a))}catch(e){console.log("proxy error:",e)}},T=async t=>{try{(await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:e,...t})})).ok&&(await S(),u(!1))}catch(e){console.log("save apikey error:",e)}},E=async e=>{try{(await fetch(`/api/providers/${f.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await S(),g(!1))}catch(e){console.log("update connection error:",e)}};return d?(0,s.jsx)(i.Card,{children:(0,s.jsx)("div",{className:"h-20 animate-pulse bg-black/5 rounded-lg"})}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(i.Card,{children:[(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-4",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold",children:"Connections"}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,s.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"Round Robin"}),(0,s.jsx)(i.Toggle,{checked:"round-robin"===j,onChange:e=>{let t=e?"round-robin":null;v(t),e&&!w&&N("1"),$(t,e?w||"1":w)}}),"round-robin"===j&&(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[(0,s.jsx)("span",{className:"text-xs text-text-muted",children:"Sticky:"}),(0,s.jsx)("input",{type:"number",min:1,value:w,onChange:e=>{N(e.target.value),$("round-robin",e.target.value)},className:"w-16 px-2 py-1 text-xs border border-border rounded-md bg-background focus:outline-none focus:border-primary"})]})]})]}),0===a.length?(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"No connections yet"}),(0,s.jsx)(i.Button,{size:"sm",icon:"add",onClick:()=>u(!0),children:"Add Connection"})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"flex flex-col divide-y divide-black/[0.03] dark:divide-white/[0.03]",children:a.map((e,r)=>(0,s.jsx)(x,{connection:e,proxyPools:l,isOAuth:t,isFirst:0===r,isLast:r===a.length-1,onMoveUp:()=>P(r,r-1),onMoveDown:()=>P(r,r+1),onToggleActive:t=>_(e.id,t),onUpdateProxy:t=>I(e.id,t),onEdit:()=>{y(e),g(!0)},onDelete:()=>A(e.id)},e.id))}),(0,s.jsx)("div",{className:"mt-4 flex justify-stretch sm:justify-start",children:(0,s.jsx)(i.Button,{size:"sm",icon:"add",onClick:()=>u(!0),children:"Add"})})]})]}),(0,s.jsx)(p,{isOpen:m,provider:e,proxyPools:l,onSave:T,onClose:()=>u(!1)}),(0,s.jsx)(i.EditConnectionModal,{isOpen:b,connection:f,proxyPools:l,onSave:E,onClose:()=>g(!1)}),(0,s.jsx)(i.ConfirmModal,{isOpen:!!k,onClose:()=>C(null),onConfirm:k?.onConfirm,title:k?.title||"Confirm",message:k?.message,variant:"danger"})]})}var b=a(55223),g=a(21577);function f({model:e,fullModel:t,copied:a,onCopy:r,testStatus:l,isCustom:o,isFree:n,onDeleteAlias:i,onTest:d,isTesting:c}){let m="ok"===l?"#22c55e":"error"===l?"#ef4444":void 0;return(0,s.jsx)("div",{className:`group px-3 py-2 rounded-lg border ${"ok"===l?"border-green-500/40":"error"===l?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-base",style:m?{color:m}:void 0,children:"ok"===l?"check_circle":"error"===l?"cancel":"smart_toy"}),(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsx)("code",{className:"text-xs text-text-muted font-mono bg-sidebar px-1.5 py-0.5 rounded",children:t}),e.name&&(0,s.jsx)("span",{className:"text-[9px] text-text-muted/70 italic pl-1",children:e.name})]}),d&&(0,s.jsxs)("div",{className:"relative group/btn",children:[(0,s.jsx)("button",{onClick:d,disabled:c,className:`p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary transition-opacity ${c?"opacity-100":"opacity-0 group-hover:opacity-100"}`,children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",style:c?{animation:"spin 1s linear infinite"}:void 0,children:c?"progress_activity":"science"})}),(0,s.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:c?"Testing...":"Test"})]}),(0,s.jsxs)("div",{className:"relative group/btn",children:[(0,s.jsx)("button",{onClick:()=>r(t,`model-${e.id}`),className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:a===`model-${e.id}`?"check":"content_copy"})}),(0,s.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:a===`model-${e.id}`?"Copied!":"Copy"})]}),n&&(0,s.jsx)("span",{className:"text-[10px] font-bold text-green-500 bg-green-500/10 px-1.5 py-0.5 rounded",children:"FREE"}),o&&(0,s.jsx)("button",{onClick:i,className:"p-0.5 hover:bg-red-500/10 rounded text-text-muted hover:text-red-500 opacity-0 group-hover:opacity-100 transition-opacity ml-auto",title:"Remove custom model",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})})]})})}function y({isOpen:e,onSave:t,onClose:a}){let[r,l]=(0,n.useState)(""),o=()=>{r.trim()&&(t(r.trim()),l(""))};return(0,s.jsx)(i.Modal,{isOpen:e,title:"Add Custom Model",onClose:a,children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"text-xs text-text-muted mb-1 block",children:"Model ID"}),(0,s.jsx)("input",{className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",value:r,onChange:e=>l(e.target.value),onKeyDown:e=>"Enter"===e.key&&o(),placeholder:"e.g. tts-1-hd",autoFocus:!0})]}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(i.Button,{onClick:o,fullWidth:!0,disabled:!r.trim(),children:"Add"}),(0,s.jsx)(i.Button,{onClick:a,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})})}function j({providerId:e,kindFilter:t,providerAliasOverride:a}){let{copied:r,copy:l}=(0,g.C)(),[o,d]=(0,n.useState)({}),[m,u]=(0,n.useState)([]),[x,p]=(0,n.useState)({}),[h,v]=(0,n.useState)(null),[w,N]=(0,n.useState)(""),[k,C]=(0,n.useState)(!1),S=a||(0,c.wG)(e),$=t||"llm",P=(0,n.useCallback)(async()=>{try{let[e,t]=await Promise.all([fetch("/api/models/alias"),fetch("/api/models/custom",{cache:"no-store"})]),a=await e.json(),s=await t.json();e.ok&&d(a.aliases||{}),t.ok&&u(s.models||[])}catch(e){console.log("ModelsCard fetch error:",e)}},[]);(0,n.useEffect)(()=>{P()},[P]);let A=async(e,t)=>{let a=`${S}/${e}`;try{(await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:a,alias:t})})).ok&&await P()}catch(e){console.log("set alias error:",e)}},_=async e=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await P()}catch(e){console.log("delete alias error:",e)}},I=async e=>{try{(await fetch("/api/models/custom",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:S,id:e,type:$})})).ok&&(await P(),window.dispatchEvent(new CustomEvent("customModelChanged")))}catch(e){console.log("add custom model error:",e)}},T=async e=>{try{let t=new URLSearchParams({providerAlias:S,id:e,type:$});(await fetch(`/api/models/custom?${t}`,{method:"DELETE"})).ok&&(await P(),window.dispatchEvent(new CustomEvent("customModelChanged")))}catch(e){console.log("delete custom model error:",e)}},E=async e=>{if(!h){v(e);try{let a=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${S}/${e}`,kind:t})}),s=await a.json();p(t=>({...t,[e]:s.ok?"ok":"error"})),N(s.ok?"":s.error||"Model not reachable")}catch{p(t=>({...t,[e]:"error"})),N("Network error")}finally{v(null)}}},O=(0,b.KC)(e),M=t?O.filter(e=>e.kinds?e.kinds.includes(t):(0,b.CP)(e,"llm")===t):O,B=m.filter(e=>e.providerAlias===S&&(0,b.CP)(e,"llm")===$&&!M.some(t=>t.id===e.id));return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(i.Card,{children:[(0,s.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,s.jsxs)("h2",{className:"text-lg font-semibold",children:["Models",t?` — ${t.toUpperCase()}`:""]})}),w&&(0,s.jsx)("p",{className:"text-xs text-red-500 mb-3 break-words",children:w}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-3",children:[M.map(e=>{let t=`${S}/${e.id}`,a=Object.entries(o).find(([,e])=>e===t)?.[0];return(0,s.jsx)(f,{model:e,fullModel:`${S}/${e.id}`,alias:a,copied:r,onCopy:l,onSetAlias:t=>A(e.id,t),onDeleteAlias:()=>_(a),testStatus:x[e.id],onTest:()=>E(e.id),isTesting:h===e.id,isFree:e.isFree},e.id)}),B.map(e=>(0,s.jsx)(f,{model:{id:e.id,name:e.name},fullModel:`${S}/${e.id}`,copied:r,onCopy:l,onSetAlias:()=>{},onDeleteAlias:()=>T(e.id),testStatus:x[e.id],onTest:()=>E(e.id),isTesting:h===e.id,isCustom:!0},`${e.id}-${e.type}`)),(0,s.jsxs)("button",{onClick:()=>C(!0),className:"flex items-center gap-1.5 px-3 py-2 rounded-lg border border-dashed border-black/15 dark:border-white/15 text-xs text-text-muted hover:text-primary hover:border-primary/40 transition-colors",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"}),"Add Model"]})]})]}),(0,s.jsx)(y,{isOpen:k,onSave:async e=>{await I(e),C(!1)},onClose:()=>C(!1)})]})}function v({label:e,children:t}){return(0,s.jsxs)("div",{className:"flex min-w-0 flex-col gap-1.5 sm:flex-row sm:items-center sm:gap-3",children:[(0,s.jsx)("span",{className:"w-full text-xs font-medium text-text-muted sm:w-20 sm:shrink-0",children:e}),(0,s.jsx)("div",{className:"w-full min-w-0 flex-1",children:t})]})}let w={webSearch:{inputLabel:"Query",inputPlaceholder:"What is the latest news about AI?",defaultInput:"What is the latest news about AI?",bodyKey:"query",defaultResponse:`{
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[182],{2710:(e,t,a)=>{Promise.resolve().then(a.bind(a,28721))},21863:(e,t,a)=>{"use strict";function s(e,t){return!1===e?"default":"active"===t||"success"===t?"success":"error"===t||"expired"===t||"unavailable"===t?"error":"default"}a.d(t,{g:()=>s})},28721:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>B});var s=a(15102),r=a(93278),l=a(93885),o=a.n(l),n=a(82030),i=a(73178),d=a(31704),c=a(31038),m=a(21863);function u({until:e}){let[t,a]=(0,n.useState)("");return((0,n.useEffect)(()=>{let t=()=>{let t=new Date(e).getTime()-Date.now();if(t<=0)return void a("");let s=Math.floor(t/1e3);s<60?a(`${s}s`):s<3600?a(`${Math.floor(s/60)}m ${s%60}s`):a(`${Math.floor(s/3600)}h ${Math.floor(s%3600/60)}m`)};t();let s=setInterval(t,1e3);return()=>clearInterval(s)},[e]),t)?(0,s.jsxs)("span",{className:"text-xs text-orange-500 font-mono",children:["⏱ ",t]}):null}function x({connection:e,proxyPools:t,isOAuth:a,isFirst:r,isLast:l,onMoveUp:o,onMoveDown:d,onToggleActive:c,onUpdateProxy:p,onEdit:h,onDelete:b}){let[g,f]=(0,n.useState)(!1),[y,j]=(0,n.useState)(!1),[v,w]=(0,n.useState)(!1),N=(0,n.useRef)(null),k=new Map((t||[]).map(e=>[e.id,e])),C=e.providerSpecificData?.proxyPoolId||null,S=C?k.get(C):null,$=e.providerSpecificData?.connectionProxyEnabled===!0&&!!e.providerSpecificData?.connectionProxyUrl,P=!!C||$,A=S?`Pool: ${S.name}`:C?`Pool: ${C} (inactive/missing)`:$?`Legacy: ${e.providerSpecificData?.connectionProxyUrl}`:"",_="",I=S?.proxyUrl||e.providerSpecificData?.connectionProxyUrl;if(I)try{let e=new URL(I);_=`${e.protocol}//${e.hostname}${e.port?`:${e.port}`:""}`}catch{_=I}let T=S?.noProxy||e.providerSpecificData?.connectionNoProxy||"",E=S?.isActive===!0?"success":C||$?"error":"default",O=Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>e).filter(Boolean).sort()[0]||null;(0,n.useEffect)(()=>{let t=null,a=()=>{w(!!Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>e).filter(e=>e&&new Date(e).getTime()>Date.now()).sort()[0])};return a(),O&&(t=setInterval(a,1e3)),()=>{t&&clearInterval(t)}},[O,e]),(0,n.useEffect)(()=>{if(!g)return;let e=e=>{N.current&&!N.current.contains(e.target)&&f(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[g]);let M="unavailable"!==e.testStatus||v?e.testStatus:"active",B=a?e.name||e.email||e.displayName||"OAuth Account":e.name,R=async e=>{j(!0);try{await p("__none__"===e?null:e)}finally{j(!1),f(!1)}};return(0,s.jsxs)("div",{className:`group flex flex-col gap-3 p-2 rounded-lg sm:flex-row sm:items-center sm:justify-between hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors ${!1===e.isActive?"opacity-60":""}`,children:[(0,s.jsxs)("div",{className:"flex w-full min-w-0 flex-1 items-start gap-3 sm:items-center",children:[(0,s.jsxs)("div",{className:"flex flex-col",children:[(0,s.jsx)("button",{onClick:o,disabled:r,className:`p-0.5 rounded ${r?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_up"})}),(0,s.jsx)("button",{onClick:d,disabled:l,className:`p-0.5 rounded ${l?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_down"})})]}),(0,s.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted",children:a?"lock":"key"}),(0,s.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,s.jsx)("p",{className:"text-sm font-medium truncate",children:B}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2 mt-1",children:[(0,s.jsx)(i.Badge,{variant:(0,m.g)(e.isActive,M),size:"sm",dot:!0,children:!1===e.isActive?"disabled":M||"Unknown"}),P&&(0,s.jsx)(i.Badge,{variant:E,size:"sm",children:"Proxy"}),v&&!1!==e.isActive&&(0,s.jsx)(u,{until:O}),e.lastError&&!1!==e.isActive&&(0,s.jsx)("span",{className:"text-xs text-red-500 truncate max-w-[300px]",title:e.lastError,children:e.lastError}),(0,s.jsxs)("span",{className:"text-xs text-text-muted",children:["#",e.priority]})]}),P&&(0,s.jsxs)("div",{className:"mt-1 flex flex-wrap items-center gap-2",children:[(0,s.jsx)("span",{className:"text-[11px] text-text-muted truncate max-w-[420px]",title:A,children:A}),_&&(0,s.jsx)("code",{className:"text-[10px] font-mono bg-black/5 dark:bg-white/5 px-1 py-0.5 rounded text-text-muted",children:_}),T&&(0,s.jsxs)("span",{className:"text-[11px] text-text-muted truncate max-w-[320px]",title:T,children:["no_proxy: ",T]})]})]})]}),(0,s.jsxs)("div",{className:"flex w-full flex-wrap items-center justify-between gap-2 sm:w-auto sm:justify-end",children:[(0,s.jsxs)("div",{className:"flex flex-wrap gap-1",children:[(t||[]).length>0&&(0,s.jsxs)("div",{className:"relative",ref:N,children:[(0,s.jsxs)("button",{onClick:()=>f(e=>!e),className:`flex flex-col items-center px-2 py-1 rounded hover:bg-black/5 dark:hover:bg-white/5 transition-colors ${P?"text-primary":"text-text-muted hover:text-primary"}`,disabled:y,children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:y?"progress_activity":"lan"}),(0,s.jsx)("span",{className:"text-[10px] leading-tight",children:"Proxy"})]}),g&&(0,s.jsxs)("div",{className:"absolute right-0 top-full mt-1 z-50 bg-bg border border-border rounded-lg shadow-lg py-1 min-w-[160px]",children:[(0,s.jsx)("button",{onClick:()=>R("__none__"),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${!C?"text-primary font-medium":"text-text-main"}`,children:"None"}),(t||[]).map(e=>(0,s.jsx)("button",{onClick:()=>R(e.id),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${C===e.id?"text-primary font-medium":"text-text-main"}`,children:e.name},e.id))]})]}),(0,s.jsxs)("button",{onClick:h,className:"flex flex-col items-center px-2 py-1 rounded hover:bg-black/5 dark:hover:bg-white/5 text-text-muted hover:text-primary",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,s.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,s.jsxs)("button",{onClick:b,className:"flex flex-col items-center px-2 py-1 rounded hover:bg-red-500/10 text-red-500",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,s.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]}),(0,s.jsx)(i.Toggle,{size:"sm",checked:e.isActive??!0,onChange:c,title:e.isActive??!0?"Disable":"Enable"})]})]})}function p({isOpen:e,provider:t,providerName:a,proxyPools:r,onSave:l,onClose:o}){let d="__none__",[c,m]=(0,n.useState)({name:"",apiKey:"",priority:1,proxyPoolId:d}),[u,x]=(0,n.useState)(!1),[h,b]=(0,n.useState)(null),[g,f]=(0,n.useState)(!1),y=async()=>{x(!0);try{let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:c.apiKey})}),a=await e.json();b(a.valid?"success":"failed")}catch{b("failed")}finally{x(!1)}},j=async()=>{if(t&&c.apiKey){f(!0);try{let e=!1;try{x(!0),b(null);let a=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:c.apiKey})});e=!!(await a.json()).valid,b(e?"success":"failed")}catch{b("failed")}finally{x(!1)}await l({name:c.name,apiKey:c.apiKey,priority:c.priority,proxyPoolId:c.proxyPoolId===d?null:c.proxyPoolId,testStatus:e?"active":"unknown"})}finally{f(!1)}}};return t?(0,s.jsx)(i.Modal,{isOpen:e,title:`Add ${a||t} API Key`,onClose:o,children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"text-xs text-text-muted mb-1 block",children:"Name"}),(0,s.jsx)("input",{className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",value:c.name,onChange:e=>m({...c,name:e.target.value}),placeholder:"Production Key"})]}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsxs)("div",{className:"flex-1",children:[(0,s.jsx)("label",{className:"text-xs text-text-muted mb-1 block",children:"API Key"}),(0,s.jsx)("input",{type:"password",className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",value:c.apiKey,onChange:e=>m({...c,apiKey:e.target.value})})]}),(0,s.jsx)("div",{className:"pt-6",children:(0,s.jsx)(i.Button,{onClick:y,disabled:!c.apiKey||u||g,variant:"secondary",children:u?"Checking...":"Check"})})]}),h&&(0,s.jsx)(i.Badge,{variant:"success"===h?"success":"error",children:"success"===h?"Valid":"Invalid"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"text-xs text-text-muted mb-1 block",children:"Priority"}),(0,s.jsx)("input",{type:"number",className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",value:c.priority,onChange:e=>m({...c,priority:Number.parseInt(e.target.value)||1})})]}),(0,s.jsx)(i.Select,{label:"Proxy Pool",value:c.proxyPoolId,onChange:e=>m({...c,proxyPoolId:e.target.value}),options:[{value:d,label:"None"},...(r||[]).map(e=>({value:e.id,label:e.name}))]}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(i.Button,{onClick:j,fullWidth:!0,disabled:!c.name||!c.apiKey||g,children:g?"Saving...":"Save"}),(0,s.jsx)(i.Button,{onClick:o,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}function h({providerId:e,isOAuth:t}){let[a,r]=(0,n.useState)([]),[l,o]=(0,n.useState)([]),[d,c]=(0,n.useState)(!0),[m,u]=(0,n.useState)(!1),[b,g]=(0,n.useState)(!1),[f,y]=(0,n.useState)(null),[j,v]=(0,n.useState)(null),[w,N]=(0,n.useState)("1"),[k,C]=(0,n.useState)(null),S=(0,n.useCallback)(async()=>{try{let[t,a,s]=await Promise.all([fetch("/api/providers",{cache:"no-store"}),fetch("/api/proxy-pools?isActive=true",{cache:"no-store"}),fetch("/api/settings",{cache:"no-store"})]),l=await t.json(),n=await a.json(),i=s.ok?await s.json():{};t.ok&&r((l.connections||[]).filter(t=>t.provider===e)),a.ok&&o(n.proxyPools||[]);let d=(i.providerStrategies||{})[e]||{};v(d.fallbackStrategy||null),N(null!=d.stickyRoundRobinLimit?String(d.stickyRoundRobinLimit):"1")}catch(e){console.log("ConnectionsCard fetch error:",e)}finally{c(!1)}},[e]);(0,n.useEffect)(()=>{S()},[S]);let $=async(t,a)=>{try{let s=await fetch("/api/settings",{cache:"no-store"}),r=(s.ok?await s.json():{}).providerStrategies||{},l={};t&&(l.fallbackStrategy=t),"round-robin"===t&&""!==a&&(l.stickyRoundRobinLimit=Number(a)||3);let o={...r};0===Object.keys(l).length?delete o[e]:o[e]=l,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:o})})}catch(e){console.log("saveStrategy error:",e)}},P=async(e,t)=>{let s=[...a];[s[e],s[t]]=[s[t],s[e]],r(s);try{await Promise.all([fetch(`/api/providers/${s[e].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:e})}),fetch(`/api/providers/${s[t].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:t})})])}catch{await S()}},A=async e=>{C({title:"Delete Connection",message:"Delete this connection?",onConfirm:async()=>{C(null);try{(await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok&&r(t=>t.filter(t=>t.id!==e))}catch(e){console.log("delete error:",e)}}})},_=async(e,t)=>{try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&r(a=>a.map(a=>a.id===e?{...a,isActive:t}:a))}catch(e){console.log("toggle error:",e)}},I=async(e,t)=>{try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:t||null})})).ok&&r(a=>a.map(a=>a.id===e?{...a,providerSpecificData:{...a.providerSpecificData,proxyPoolId:t||null}}:a))}catch(e){console.log("proxy error:",e)}},T=async t=>{try{(await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:e,...t})})).ok&&(await S(),u(!1))}catch(e){console.log("save apikey error:",e)}},E=async e=>{try{(await fetch(`/api/providers/${f.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await S(),g(!1))}catch(e){console.log("update connection error:",e)}};return d?(0,s.jsx)(i.Card,{children:(0,s.jsx)("div",{className:"h-20 animate-pulse bg-black/5 rounded-lg"})}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(i.Card,{children:[(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-4",children:[(0,s.jsx)("h2",{className:"text-lg font-semibold",children:"Connections"}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,s.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"Round Robin"}),(0,s.jsx)(i.Toggle,{checked:"round-robin"===j,onChange:e=>{let t=e?"round-robin":null;v(t),e&&!w&&N("1"),$(t,e?w||"1":w)}}),"round-robin"===j&&(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[(0,s.jsx)("span",{className:"text-xs text-text-muted",children:"Sticky:"}),(0,s.jsx)("input",{type:"number",min:1,value:w,onChange:e=>{N(e.target.value),$("round-robin",e.target.value)},className:"w-16 px-2 py-1 text-xs border border-border rounded-md bg-background focus:outline-none focus:border-primary"})]})]})]}),0===a.length?(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsx)("p",{className:"text-sm text-text-muted",children:"No connections yet"}),(0,s.jsx)(i.Button,{size:"sm",icon:"add",onClick:()=>u(!0),children:"Add Connection"})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"flex flex-col divide-y divide-black/[0.03] dark:divide-white/[0.03]",children:a.map((e,r)=>(0,s.jsx)(x,{connection:e,proxyPools:l,isOAuth:t,isFirst:0===r,isLast:r===a.length-1,onMoveUp:()=>P(r,r-1),onMoveDown:()=>P(r,r+1),onToggleActive:t=>_(e.id,t),onUpdateProxy:t=>I(e.id,t),onEdit:()=>{y(e),g(!0)},onDelete:()=>A(e.id)},e.id))}),(0,s.jsx)("div",{className:"mt-4 flex justify-stretch sm:justify-start",children:(0,s.jsx)(i.Button,{size:"sm",icon:"add",onClick:()=>u(!0),children:"Add"})})]})]}),(0,s.jsx)(p,{isOpen:m,provider:e,proxyPools:l,onSave:T,onClose:()=>u(!1)}),(0,s.jsx)(i.EditConnectionModal,{isOpen:b,connection:f,proxyPools:l,onSave:E,onClose:()=>g(!1)}),(0,s.jsx)(i.ConfirmModal,{isOpen:!!k,onClose:()=>C(null),onConfirm:k?.onConfirm,title:k?.title||"Confirm",message:k?.message,variant:"danger"})]})}var b=a(55223),g=a(21577);function f({model:e,fullModel:t,copied:a,onCopy:r,testStatus:l,isCustom:o,isFree:n,onDeleteAlias:i,onTest:d,isTesting:c}){let m="ok"===l?"#22c55e":"error"===l?"#ef4444":void 0;return(0,s.jsx)("div",{className:`group px-3 py-2 rounded-lg border ${"ok"===l?"border-green-500/40":"error"===l?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-base",style:m?{color:m}:void 0,children:"ok"===l?"check_circle":"error"===l?"cancel":"smart_toy"}),(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsx)("code",{className:"text-xs text-text-muted font-mono bg-sidebar px-1.5 py-0.5 rounded",children:t}),e.name&&(0,s.jsx)("span",{className:"text-[9px] text-text-muted/70 italic pl-1",children:e.name})]}),d&&(0,s.jsxs)("div",{className:"relative group/btn",children:[(0,s.jsx)("button",{onClick:d,disabled:c,className:`p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary transition-opacity ${c?"opacity-100":"opacity-0 group-hover:opacity-100"}`,children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",style:c?{animation:"spin 1s linear infinite"}:void 0,children:c?"progress_activity":"science"})}),(0,s.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:c?"Testing...":"Test"})]}),(0,s.jsxs)("div",{className:"relative group/btn",children:[(0,s.jsx)("button",{onClick:()=>r(t,`model-${e.id}`),className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:a===`model-${e.id}`?"check":"content_copy"})}),(0,s.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:a===`model-${e.id}`?"Copied!":"Copy"})]}),n&&(0,s.jsx)("span",{className:"text-[10px] font-bold text-green-500 bg-green-500/10 px-1.5 py-0.5 rounded",children:"FREE"}),o&&(0,s.jsx)("button",{onClick:i,className:"p-0.5 hover:bg-red-500/10 rounded text-text-muted hover:text-red-500 opacity-0 group-hover:opacity-100 transition-opacity ml-auto",title:"Remove custom model",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})})]})})}function y({isOpen:e,onSave:t,onClose:a}){let[r,l]=(0,n.useState)(""),o=()=>{r.trim()&&(t(r.trim()),l(""))};return(0,s.jsx)(i.Modal,{isOpen:e,title:"Add Custom Model",onClose:a,children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"text-xs text-text-muted mb-1 block",children:"Model ID"}),(0,s.jsx)("input",{className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",value:r,onChange:e=>l(e.target.value),onKeyDown:e=>"Enter"===e.key&&o(),placeholder:"e.g. tts-1-hd",autoFocus:!0})]}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(i.Button,{onClick:o,fullWidth:!0,disabled:!r.trim(),children:"Add"}),(0,s.jsx)(i.Button,{onClick:a,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})})}function j({providerId:e,kindFilter:t,providerAliasOverride:a}){let{copied:r,copy:l}=(0,g.C)(),[o,d]=(0,n.useState)({}),[m,u]=(0,n.useState)([]),[x,p]=(0,n.useState)({}),[h,v]=(0,n.useState)(null),[w,N]=(0,n.useState)(""),[k,C]=(0,n.useState)(!1),S=a||(0,c.wG)(e),$=t||"llm",P=(0,n.useCallback)(async()=>{try{let[e,t]=await Promise.all([fetch("/api/models/alias"),fetch("/api/models/custom",{cache:"no-store"})]),a=await e.json(),s=await t.json();e.ok&&d(a.aliases||{}),t.ok&&u(s.models||[])}catch(e){console.log("ModelsCard fetch error:",e)}},[]);(0,n.useEffect)(()=>{P()},[P]);let A=async(e,t)=>{let a=`${S}/${e}`;try{(await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:a,alias:t})})).ok&&await P()}catch(e){console.log("set alias error:",e)}},_=async e=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await P()}catch(e){console.log("delete alias error:",e)}},I=async e=>{try{(await fetch("/api/models/custom",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:S,id:e,type:$})})).ok&&(await P(),window.dispatchEvent(new CustomEvent("customModelChanged")))}catch(e){console.log("add custom model error:",e)}},T=async e=>{try{let t=new URLSearchParams({providerAlias:S,id:e,type:$});(await fetch(`/api/models/custom?${t}`,{method:"DELETE"})).ok&&(await P(),window.dispatchEvent(new CustomEvent("customModelChanged")))}catch(e){console.log("delete custom model error:",e)}},E=async e=>{if(!h){v(e);try{let a=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${S}/${e}`,kind:t})}),s=await a.json();p(t=>({...t,[e]:s.ok?"ok":"error"})),N(s.ok?"":s.error||"Model not reachable")}catch{p(t=>({...t,[e]:"error"})),N("Network error")}finally{v(null)}}},O=(0,b.KC)(e),M=t?O.filter(e=>e.kinds?e.kinds.includes(t):(0,b.CP)(e,"llm")===t):O,B=m.filter(e=>e.providerAlias===S&&(0,b.CP)(e,"llm")===$&&!M.some(t=>t.id===e.id));return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(i.Card,{children:[(0,s.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,s.jsxs)("h2",{className:"text-lg font-semibold",children:["Models",t?` — ${t.toUpperCase()}`:""]})}),w&&(0,s.jsx)("p",{className:"text-xs text-red-500 mb-3 break-words",children:w}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-3",children:[M.map(e=>{let t=`${S}/${e.id}`,a=Object.entries(o).find(([,e])=>e===t)?.[0];return(0,s.jsx)(f,{model:e,fullModel:`${S}/${e.id}`,alias:a,copied:r,onCopy:l,onSetAlias:t=>A(e.id,t),onDeleteAlias:()=>_(a),testStatus:x[e.id],onTest:()=>E(e.id),isTesting:h===e.id,isFree:e.isFree},e.id)}),B.map(e=>(0,s.jsx)(f,{model:{id:e.id,name:e.name},fullModel:`${S}/${e.id}`,copied:r,onCopy:l,onSetAlias:()=>{},onDeleteAlias:()=>T(e.id),testStatus:x[e.id],onTest:()=>E(e.id),isTesting:h===e.id,isCustom:!0},`${e.id}-${e.type}`)),(0,s.jsxs)("button",{onClick:()=>C(!0),className:"flex items-center gap-1.5 px-3 py-2 rounded-lg border border-dashed border-black/15 dark:border-white/15 text-xs text-text-muted hover:text-primary hover:border-primary/40 transition-colors",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"}),"Add Model"]})]})]}),(0,s.jsx)(y,{isOpen:k,onSave:async e=>{await I(e),C(!1)},onClose:()=>C(!1)})]})}function v({label:e,children:t}){return(0,s.jsxs)("div",{className:"flex min-w-0 flex-col gap-1.5 sm:flex-row sm:items-center sm:gap-3",children:[(0,s.jsx)("span",{className:"w-full text-xs font-medium text-text-muted sm:w-20 sm:shrink-0",children:e}),(0,s.jsx)("div",{className:"w-full min-w-0 flex-1",children:t})]})}let w={webSearch:{inputLabel:"Query",inputPlaceholder:"What is the latest news about AI?",defaultInput:"What is the latest news about AI?",bodyKey:"query",defaultResponse:`{
2
2
  "results": [
3
3
  { "title": "...", "url": "...", "snippet": "..." }
4
4
  ]
@@ -60,4 +60,4 @@
60
60
  -F "temperature=${C}"`:""}${x.includes("prompt")&&j?` \\
61
61
  -F "prompt=${j}"`:""}`,Q=async()=>{if(!p||!Y)return;D(!0),J(""),R(null);let e=Date.now();try{let t=new FormData;t.append("file",p),t.append("model",Y),x.includes("language")&&f&&t.append("language",f),x.includes("response_format")&&t.append("response_format",N),x.includes("temperature")&&C&&t.append("temperature",C),x.includes("prompt")&&j&&t.append("prompt",j);let a={};$&&(a.Authorization=`Bearer ${$}`);let s=await fetch("/api/v1/audio/transcriptions",{method:"POST",headers:a,body:t});L(Date.now()-e);let r=(s.headers.get("content-type")||"").includes("application/json")?await s.json():await s.text();if(!s.ok)return void J(r?.error?.message||r?.error||r||`HTTP ${s.status}`);R(r)}catch(e){J(e.message||"Network error")}finally{D(!1)}},X="string"==typeof B?B:B?JSON.stringify(B,null,2):`{
62
62
  "text": "Hello world..."
63
- }`;return(0,s.jsxs)(i.Card,{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"Example"}),(0,s.jsxs)("div",{className:"flex flex-col gap-2.5",children:[o.length>0?(0,s.jsx)(v,{label:"Model",children:(0,s.jsx)("select",{value:d,onChange:e=>m(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:o.map(e=>(0,s.jsx)("option",{value:e.id,children:e.name||e.id},e.id))})}):(0,s.jsx)(v,{label:"Model",children:(0,s.jsx)("input",{value:d,onChange:e=>m(e.target.value),placeholder:"Enter model id",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"})}),(0,s.jsx)(v,{label:"Endpoint",children:(0,s.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,s.jsxs)("span",{className:"w-full min-w-0 flex-1 px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate",children:[W,"/v1/audio/transcriptions"]}),E&&(0,s.jsxs)("button",{onClick:()=>_(e=>!e),title:A?"Using tunnel":"Using local",className:`flex items-center gap-1 text-xs px-2 py-1.5 rounded-lg border shrink-0 transition-colors ${A?"border-primary/40 bg-primary/10 text-primary":"border-border text-text-muted hover:text-primary"}`,children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"wifi_tethering"}),"Tunnel"]})]})}),(0,s.jsx)(v,{label:"API Key",children:(0,s.jsx)("span",{className:"px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate block",children:$?`${$.slice(0,8)}${"•".repeat(Math.min(20,Math.max(0,$.length-8)))}`:(0,s.jsx)("span",{className:"text-text-muted italic",children:"No key configured"})})}),(0,s.jsx)(v,{label:"Audio File",children:(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.jsx)("input",{type:"file",accept:"audio/*,video/mp4,.m4a,.mp3,.wav,.ogg,.flac,.webm,.opus",onChange:e=>h(e.target.files?.[0]||null),className:"w-full text-xs text-text-muted file:mr-2 file:py-1 file:px-2.5 file:rounded-lg file:border file:border-border file:bg-background file:text-text-main hover:file:bg-sidebar file:cursor-pointer"}),p&&(0,s.jsxs)("span",{className:"text-xs text-text-muted font-mono",children:[p.name," \xb7 ",(p.size/1024).toFixed(1)," KB"]})]})}),x.includes("language")&&(0,s.jsx)(v,{label:"Language",children:(0,s.jsx)("input",{value:f,onChange:e=>y(e.target.value),placeholder:"e.g. en, vi, ja (auto-detect if empty)",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"})}),x.includes("prompt")&&(0,s.jsx)(v,{label:"Prompt",children:(0,s.jsx)("input",{value:j,onChange:e=>w(e.target.value),placeholder:"optional context to improve accuracy",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})}),x.includes("temperature")&&(0,s.jsx)(v,{label:"Temperature",children:(0,s.jsx)("input",{type:"number",step:"0.1",min:"0",max:"1",value:C,onChange:e=>S(e.target.value),placeholder:"0 - 1 (default 0)",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})}),x.includes("response_format")&&(0,s.jsx)(v,{label:"Response Format",children:(0,s.jsxs)("select",{value:N,onChange:e=>k(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:[(0,s.jsx)("option",{value:"json",children:"json"}),(0,s.jsx)("option",{value:"text",children:"text"}),(0,s.jsx)("option",{value:"srt",children:"srt"}),(0,s.jsx)("option",{value:"verbose_json",children:"verbose_json"}),(0,s.jsx)("option",{value:"vtt",children:"vtt"})]})}),(0,s.jsxs)("div",{className:"mt-1",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,s.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Request"}),(0,s.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,s.jsxs)("button",{onClick:()=>H(G),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:z?"check":"content_copy"}),z?"Copied":"Copy"]}),(0,s.jsxs)("button",{onClick:Q,disabled:U||!p||!Y,className:"flex w-full sm:w-auto items-center justify-center gap-1.5 px-3 py-1 rounded-lg bg-primary text-white text-xs font-medium hover:bg-primary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",style:U?{animation:"spin 1s linear infinite"}:void 0,children:"play_arrow"}),U?"Transcribing...":"Run"]})]})]}),(0,s.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all",children:G})]}),F&&(0,s.jsx)("p",{className:"text-xs text-red-500 break-words",children:F}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,s.jsxs)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:["Response ",B&&K&&(0,s.jsxs)("span",{className:"font-normal normal-case",children:["⚡ ",K,"ms"]})]}),B&&(0,s.jsxs)("button",{onClick:()=>q(X),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:V?"check":"content_copy"}),V?"Copied":"Copy"]})]}),(0,s.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all opacity-70",children:X})]})]})]})}function B(){let{kind:e,id:t}=(0,r.useParams)(),a=(0,r.useRouter)(),l=c.rj.find(t=>t.id===e),m=(0,c.gC)(t)&&"embedding"===e,u=async()=>{if(confirm("Delete this Custom Embedding node?"))try{(await fetch(`/api/provider-nodes/${t}`,{method:"DELETE"})).ok&&a.push(`/dashboard/media-providers/${e}`)}catch(e){console.log("Error deleting custom embedding node:",e)}},[x,p]=(0,n.useState)(null),[b,g]=(0,n.useState)(m),[f,y]=(0,n.useState)(!1);if((0,n.useEffect)(()=>{if(!m)return;let e=!1;return fetch("/api/provider-nodes",{cache:"no-store"}).then(e=>e.json()).then(a=>{e||(p((a.nodes||[]).find(e=>e.id===t)||null),g(!1))}).catch(()=>{e||g(!1)}),()=>{e=!0}},[t,m]),!l)return(0,r.notFound)();let v=c.Q2[t],N=m?x?{id:t,name:x.name||"Custom Embedding",color:"#6366F1",textIcon:"CE"}:null:v;if(!m&&!v||m&&!b&&!x)return(0,r.notFound)();if(m&&b)return(0,s.jsx)("div",{className:"text-text-muted text-sm py-12 text-center",children:"Loading..."});let C=m?["embedding"]:N.serviceKinds??["llm"];return m||C.includes(e)?(0,s.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)(o(),{href:`/dashboard/media-providers/${e}`,className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary transition-colors mb-4",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),l.label]}),(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-4",children:[(0,s.jsx)("div",{className:"size-12 rounded-lg flex items-center justify-center shrink-0",style:{backgroundColor:`${N.color}15`},children:(0,s.jsx)(d.A,{src:`/providers/${N.id}.webp`,alt:N.name,size:48,className:"object-contain rounded-lg max-w-[48px] max-h-[48px]",fallbackText:N.textIcon||N.id.slice(0,2).toUpperCase(),fallbackColor:N.color})}),(0,s.jsxs)("div",{className:"flex-1",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2 sm:gap-3",children:[(0,s.jsx)("h1",{className:"text-3xl font-semibold tracking-tight",children:N.name}),!m&&N.notice?.apiKeyUrl&&(0,s.jsxs)("a",{href:N.notice.apiKeyUrl,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline inline-flex items-center gap-1",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),"Get API Key"]})]}),(0,s.jsxs)("div",{className:"flex items-center gap-1.5 mt-1 flex-wrap",children:[m&&(0,s.jsxs)(i.Badge,{variant:"default",size:"sm",children:["Custom \xb7 ",x?.prefix]}),C.map(t=>(0,s.jsx)(i.Badge,{variant:t===e?"primary":"default",size:"sm",children:t.toUpperCase()},t))]})]}),m&&(0,s.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,s.jsx)(i.Button,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>y(!0),children:"Edit"}),(0,s.jsx)(i.Button,{size:"sm",variant:"secondary",icon:"delete",onClick:u,children:"Delete"})]})]})]}),!m&&N.kindNotice?.[e]&&(0,s.jsxs)("div",{className:"flex items-start gap-3 px-4 py-3 rounded-lg bg-amber-500/10 border border-amber-500/30 text-amber-700 dark:text-amber-400",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[20px] mt-0.5",children:"warning"}),(0,s.jsx)("p",{className:"text-sm",children:N.kindNotice[e]})]}),!m&&N.notice?.text&&!N.deprecated&&(0,s.jsxs)("div",{className:"flex flex-col gap-2 rounded-lg border border-blue-500/30 bg-blue-500/10 px-3 py-2 sm:flex-row sm:items-center",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px] text-blue-500 shrink-0",children:"info"}),(0,s.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-blue-600 dark:text-blue-400",children:N.notice.text}),N.notice.apiKeyUrl&&(0,s.jsx)("a",{href:N.notice.apiKeyUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-flex justify-center rounded bg-blue-500 px-2 py-1 text-xs font-medium text-white transition-colors hover:bg-blue-600 sm:py-0.5",children:"Get API Key →"})]}),!m&&N.noAuth?(0,s.jsx)(i.NoAuthProxyCard,{providerId:t}):(0,s.jsx)(h,{providerId:t,isOAuth:!1}),"tts"!==e&&"webSearch"!==e&&"webFetch"!==e&&(0,s.jsx)(j,{providerId:t,kindFilter:e,providerAliasOverride:m?x?.prefix:void 0}),!m&&(N.searchConfig||N.fetchConfig||N.ttsConfig||N.sttConfig||N.embeddingConfig||N.searchViaChat)&&(0,s.jsx)(i.ProviderInfoCard,{config:"webFetch"===e?N.fetchConfig:"tts"===e?N.ttsConfig:"stt"===e?N.sttConfig:"embedding"===e?N.embeddingConfig:N.searchConfig||{mode:"chat-completions",defaultModel:N.searchViaChat?.defaultModel,pricingUrl:N.searchViaChat?.pricingUrl,freeTier:N.searchViaChat?.freeTier},provider:N,title:`${l.label} Config`}),"embedding"===e&&(0,s.jsx)(k,{providerId:t,customAlias:x?.prefix}),"tts"===e&&(0,s.jsx)(A,{providerId:t}),"stt"===e&&!m&&(0,s.jsx)(M,{providerId:t}),!m&&"webSearch"===e&&"exa"===t&&(0,s.jsx)(O,{providerId:t}),!m&&w[e]&&("webSearch"!==e||"exa"!==t)&&(0,s.jsx)(T,{providerId:t,kind:e}),m&&(0,s.jsx)(i.AddCustomEmbeddingModal,{isOpen:f,node:x,onClose:()=>y(!1),onSaved:e=>{p(e),y(!1)}})]}):(0,r.notFound)()}}},e=>{e.O(0,[3885,2318,4385,2940,2147,3204,7358],()=>e(e.s=2710)),_N_E=e.O()}]);
63
+ }`;return(0,s.jsxs)(i.Card,{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"Example"}),(0,s.jsxs)("div",{className:"flex flex-col gap-2.5",children:[o.length>0?(0,s.jsx)(v,{label:"Model",children:(0,s.jsx)("select",{value:d,onChange:e=>m(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:o.map(e=>(0,s.jsx)("option",{value:e.id,children:e.name||e.id},e.id))})}):(0,s.jsx)(v,{label:"Model",children:(0,s.jsx)("input",{value:d,onChange:e=>m(e.target.value),placeholder:"Enter model id",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"})}),(0,s.jsx)(v,{label:"Endpoint",children:(0,s.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,s.jsxs)("span",{className:"w-full min-w-0 flex-1 px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate",children:[W,"/v1/audio/transcriptions"]}),E&&(0,s.jsxs)("button",{onClick:()=>_(e=>!e),title:A?"Using tunnel":"Using local",className:`flex items-center gap-1 text-xs px-2 py-1.5 rounded-lg border shrink-0 transition-colors ${A?"border-primary/40 bg-primary/10 text-primary":"border-border text-text-muted hover:text-primary"}`,children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"wifi_tethering"}),"Tunnel"]})]})}),(0,s.jsx)(v,{label:"API Key",children:(0,s.jsx)("span",{className:"px-3 py-1.5 text-sm font-mono text-text-main bg-sidebar rounded-lg truncate block",children:$?`${$.slice(0,8)}${"•".repeat(Math.min(20,Math.max(0,$.length-8)))}`:(0,s.jsx)("span",{className:"text-text-muted italic",children:"No key configured"})})}),(0,s.jsx)(v,{label:"Audio File",children:(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.jsx)("input",{type:"file",accept:"audio/*,video/mp4,.m4a,.mp3,.wav,.ogg,.flac,.webm,.opus",onChange:e=>h(e.target.files?.[0]||null),className:"w-full text-xs text-text-muted file:mr-2 file:py-1 file:px-2.5 file:rounded-lg file:border file:border-border file:bg-background file:text-text-main hover:file:bg-sidebar file:cursor-pointer"}),p&&(0,s.jsxs)("span",{className:"text-xs text-text-muted font-mono",children:[p.name," \xb7 ",(p.size/1024).toFixed(1)," KB"]})]})}),x.includes("language")&&(0,s.jsx)(v,{label:"Language",children:(0,s.jsx)("input",{value:f,onChange:e=>y(e.target.value),placeholder:"e.g. en, vi, ja (auto-detect if empty)",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"})}),x.includes("prompt")&&(0,s.jsx)(v,{label:"Prompt",children:(0,s.jsx)("input",{value:j,onChange:e=>w(e.target.value),placeholder:"optional context to improve accuracy",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})}),x.includes("temperature")&&(0,s.jsx)(v,{label:"Temperature",children:(0,s.jsx)("input",{type:"number",step:"0.1",min:"0",max:"1",value:C,onChange:e=>S(e.target.value),placeholder:"0 - 1 (default 0)",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})}),x.includes("response_format")&&(0,s.jsx)(v,{label:"Response Format",children:(0,s.jsxs)("select",{value:N,onChange:e=>k(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:[(0,s.jsx)("option",{value:"json",children:"json"}),(0,s.jsx)("option",{value:"text",children:"text"}),(0,s.jsx)("option",{value:"srt",children:"srt"}),(0,s.jsx)("option",{value:"verbose_json",children:"verbose_json"}),(0,s.jsx)("option",{value:"vtt",children:"vtt"})]})}),(0,s.jsxs)("div",{className:"mt-1",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,s.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Request"}),(0,s.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,s.jsxs)("button",{onClick:()=>H(G),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:z?"check":"content_copy"}),z?"Copied":"Copy"]}),(0,s.jsxs)("button",{onClick:Q,disabled:U||!p||!Y,className:"flex w-full sm:w-auto items-center justify-center gap-1.5 px-3 py-1 rounded-lg bg-primary text-white text-xs font-medium hover:bg-primary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",style:U?{animation:"spin 1s linear infinite"}:void 0,children:"play_arrow"}),U?"Transcribing...":"Run"]})]})]}),(0,s.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all",children:G})]}),F&&(0,s.jsx)("p",{className:"text-xs text-red-500 break-words",children:F}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,s.jsxs)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:["Response ",B&&K&&(0,s.jsxs)("span",{className:"font-normal normal-case",children:["⚡ ",K,"ms"]})]}),B&&(0,s.jsxs)("button",{onClick:()=>q(X),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:V?"check":"content_copy"}),V?"Copied":"Copy"]})]}),(0,s.jsx)("pre",{className:"bg-sidebar rounded-lg px-3 py-2.5 text-xs font-mono text-text-main overflow-x-auto whitespace-pre-wrap break-all opacity-70",children:X})]})]})]})}function B(){let{kind:e,id:t}=(0,r.useParams)(),a=(0,r.useRouter)(),l=c.rj.find(t=>t.id===e),m=(0,c.gC)(t)&&"embedding"===e,u=async()=>{if(confirm("Delete this Custom Embedding node?"))try{(await fetch(`/api/provider-nodes/${t}`,{method:"DELETE"})).ok&&a.push(`/dashboard/media-providers/${e}`)}catch(e){console.log("Error deleting custom embedding node:",e)}},[x,p]=(0,n.useState)(null),[b,g]=(0,n.useState)(m),[f,y]=(0,n.useState)(!1);if((0,n.useEffect)(()=>{if(!m)return;let e=!1;return fetch("/api/provider-nodes",{cache:"no-store"}).then(e=>e.json()).then(a=>{e||(p((a.nodes||[]).find(e=>e.id===t)||null),g(!1))}).catch(()=>{e||g(!1)}),()=>{e=!0}},[t,m]),!l)return(0,r.notFound)();let v=c.Q2[t],N=m?x?{id:t,name:x.name||"Custom Embedding",color:"#6366F1",textIcon:"CE"}:null:v;if(!m&&!v||m&&!b&&!x)return(0,r.notFound)();if(m&&b)return(0,s.jsx)("div",{className:"text-text-muted text-sm py-12 text-center",children:"Loading..."});let C=m?["embedding"]:N.serviceKinds??["llm"];return m||C.includes(e)?(0,s.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)(o(),{href:`/dashboard/media-providers/${e}`,className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary transition-colors mb-4",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),l.label]}),(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-4",children:[(0,s.jsx)("div",{className:"size-12 rounded-lg flex items-center justify-center shrink-0",style:{backgroundColor:`${N.color}15`},children:(0,s.jsx)(d.A,{src:`/providers/${N.id}.webp`,alt:N.name,size:48,className:"object-contain rounded-lg max-w-[48px] max-h-[48px]",fallbackText:N.textIcon||N.id.slice(0,2).toUpperCase(),fallbackColor:N.color})}),(0,s.jsxs)("div",{className:"flex-1",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2 sm:gap-3",children:[(0,s.jsx)("h1",{className:"text-3xl font-semibold tracking-tight",children:N.name}),!m&&N.notice?.apiKeyUrl&&(0,s.jsxs)("a",{href:N.notice.apiKeyUrl,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline inline-flex items-center gap-1",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),"Get API Key"]})]}),(0,s.jsxs)("div",{className:"flex items-center gap-1.5 mt-1 flex-wrap",children:[m&&(0,s.jsxs)(i.Badge,{variant:"default",size:"sm",children:["Custom \xb7 ",x?.prefix]}),C.map(t=>(0,s.jsx)(i.Badge,{variant:t===e?"primary":"default",size:"sm",children:t.toUpperCase()},t))]})]}),m&&(0,s.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,s.jsx)(i.Button,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>y(!0),children:"Edit"}),(0,s.jsx)(i.Button,{size:"sm",variant:"secondary",icon:"delete",onClick:u,children:"Delete"})]})]})]}),!m&&N.kindNotice?.[e]&&(0,s.jsxs)("div",{className:"flex items-start gap-3 px-4 py-3 rounded-lg bg-amber-500/10 border border-amber-500/30 text-amber-700 dark:text-amber-400",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[20px] mt-0.5",children:"warning"}),(0,s.jsx)("p",{className:"text-sm",children:N.kindNotice[e]})]}),!m&&N.notice?.text&&!N.deprecated&&(0,s.jsxs)("div",{className:"flex flex-col gap-2 rounded-lg border border-blue-500/30 bg-blue-500/10 px-3 py-2 sm:flex-row sm:items-center",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px] text-blue-500 shrink-0",children:"info"}),(0,s.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-blue-600 dark:text-blue-400",children:N.notice.text}),N.notice.apiKeyUrl&&(0,s.jsx)("a",{href:N.notice.apiKeyUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-flex justify-center rounded bg-blue-500 px-2 py-1 text-xs font-medium text-white transition-colors hover:bg-blue-600 sm:py-0.5",children:"Get API Key →"})]}),!m&&N.noAuth?(0,s.jsx)(i.NoAuthProxyCard,{providerId:t}):(0,s.jsx)(h,{providerId:t,isOAuth:!1}),"tts"!==e&&"webSearch"!==e&&"webFetch"!==e&&(0,s.jsx)(j,{providerId:t,kindFilter:e,providerAliasOverride:m?x?.prefix:void 0}),!m&&(N.searchConfig||N.fetchConfig||N.ttsConfig||N.sttConfig||N.embeddingConfig||N.searchViaChat)&&(0,s.jsx)(i.ProviderInfoCard,{config:"webFetch"===e?N.fetchConfig:"tts"===e?N.ttsConfig:"stt"===e?N.sttConfig:"embedding"===e?N.embeddingConfig:N.searchConfig||{mode:"chat-completions",defaultModel:N.searchViaChat?.defaultModel,pricingUrl:N.searchViaChat?.pricingUrl,freeTier:N.searchViaChat?.freeTier},provider:N,title:`${l.label} Config`}),"embedding"===e&&(0,s.jsx)(k,{providerId:t,customAlias:x?.prefix}),"tts"===e&&(0,s.jsx)(A,{providerId:t}),"stt"===e&&!m&&(0,s.jsx)(M,{providerId:t}),!m&&"webSearch"===e&&"exa"===t&&(0,s.jsx)(O,{providerId:t}),!m&&w[e]&&("webSearch"!==e||"exa"!==t)&&(0,s.jsx)(T,{providerId:t,kind:e}),m&&(0,s.jsx)(i.AddCustomEmbeddingModal,{isOpen:f,node:x,onClose:()=>y(!1),onSaved:e=>{p(e),y(!1)}})]}):(0,r.notFound)()}}},e=>{e.O(0,[3885,3758,7236,4385,3178,2147,3204,7358],()=>e(e.s=2710)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6620],{86615:(e,s,t)=>{Promise.resolve().then(t.bind(t,87250))},87250:(e,s,t)=>{"use strict";t.d(s,{default:()=>b});var a=t(15102),i=t(93278),r=t(93885),n=t.n(r),l=t(82030),o=t(92940),d=t(31704),c=t(31038);let m=new Set([]),x={image:"image-combo",tts:"tts-combo"};function p(e){let s=Object.entries(e).some(([e,s])=>e.startsWith("modelLock_")&&s&&new Date(s).getTime()>Date.now());return"unavailable"!==e.testStatus||s?e.testStatus:"active"}function h({isNoAuth:e,allDisabled:s,total:t,connected:i,error:r}){return e?(0,a.jsx)(o.Badge,{variant:"success",size:"sm",children:"Ready"}):s?(0,a.jsx)(o.Badge,{variant:"default",size:"sm",children:"Disabled"}):0===t?(0,a.jsx)("span",{className:"text-xs text-text-muted",children:"No connections"}):(0,a.jsxs)(a.Fragment,{children:[i>0&&(0,a.jsxs)(o.Badge,{variant:"success",size:"sm",dot:!0,children:[i," Connected"]}),r>0&&(0,a.jsxs)(o.Badge,{variant:"error",size:"sm",dot:!0,children:[r," Error"]}),0===i&&0===r&&(0,a.jsxs)(o.Badge,{variant:"default",size:"sm",children:[t," Added"]})]})}function u({provider:e,kind:s,connections:t,isCustom:i,onToggle:r}){let l=c.Q2[e.id],m=!!l?.noAuth,x=t.filter(s=>s.provider===e.id),g=x.filter(e=>{let s=p(e);return"active"===s||"success"===s}).length,b=x.filter(e=>{let s=p(e);return"error"===s||"expired"===s||"unavailable"===s}).length,f=x.length,j=f>0&&x.every(e=>!1===e.isActive);return(0,a.jsx)(n(),{href:`/dashboard/media-providers/${s}/${e.id}`,className:"group",children:(0,a.jsx)(o.Card,{padding:"xs",className:`h-full hover:bg-black/[0.01] dark:hover:bg-white/[0.01] transition-colors cursor-pointer ${j?"opacity-50":""}`,children:(0,a.jsxs)("div",{className:"flex min-w-0 items-center justify-between gap-3",children:[(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,a.jsx)("div",{className:"size-8 rounded-lg flex items-center justify-center shrink-0",style:{backgroundColor:`${e.color?.length>7?e.color:(e.color??"#888")+"15"}`},children:(0,a.jsx)(d.A,{src:`/providers/${e.id}.webp`,alt:e.name,size:30,className:"object-contain rounded-lg max-w-[30px] max-h-[30px]",fallbackText:e.textIcon||e.id.slice(0,2).toUpperCase(),fallbackColor:e.color})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("h3",{className:"font-semibold text-sm",children:e.name}),(0,a.jsxs)("div",{className:"flex items-center gap-2 mt-0.5 flex-wrap",children:[i&&(0,a.jsx)(o.Badge,{variant:"default",size:"sm",children:"Custom"}),(0,a.jsx)(h,{isNoAuth:m,allDisabled:j,total:f,connected:g,error:b})]})]})]}),f>0&&(0,a.jsx)("button",{type:"button",className:"shrink-0 opacity-100 transition-opacity sm:opacity-0 sm:group-hover:opacity-100",onClick:s=>{s.preventDefault(),s.stopPropagation(),r&&r(e.id,j)},"aria-label":j?"Enable provider":"Disable provider",children:(0,a.jsx)(o.Toggle,{size:"sm",checked:!j,onChange:()=>{},title:j?"Enable provider":"Disable provider"})})]})})})}function g({combos:e}){return 0===e.length?null:(0,a.jsx)("div",{className:"flex flex-col gap-2",children:e.map(e=>(0,a.jsx)(n(),{href:`/dashboard/media-providers/combo/${e.id}`,children:(0,a.jsx)(o.Card,{padding:"xs",className:"hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors cursor-pointer",children:(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary text-[18px]",children:"layers"}),(0,a.jsx)("code",{className:"text-sm font-mono font-medium flex-1 truncate",children:e.name}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-1 sm:shrink-0",children:[e.models.slice(0,6).map((e,s)=>{let t="string"==typeof e?e.split("/")[0]:"",i=c.Q2[t];return(0,a.jsx)("div",{title:i?.name||e,className:"size-5 rounded flex items-center justify-center",style:{backgroundColor:`${i?.color??"#888"}15`},children:(0,a.jsx)(d.A,{src:`/providers/${t}.webp`,alt:i?.name||t,size:18,className:"object-contain rounded max-w-[18px] max-h-[18px]",fallbackText:i?.textIcon||t.slice(0,2).toUpperCase(),fallbackColor:i?.color})},`${e}-${s}`)}),e.models.length>6&&(0,a.jsxs)("span",{className:"text-[10px] text-text-muted ml-1",children:["+",e.models.length-6]})]}),(0,a.jsx)("span",{className:"text-[11px] text-text-muted shrink-0",children:e.models.length}),(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[16px]",children:"chevron_right"})]})})},e.id))})}function b({initialConnections:e,initialNodes:s,initialCombos:t}){let{kind:r}=(0,i.useParams)(),n=(0,i.useRouter)(),[d,p]=(0,l.useState)(e||[]),[h,f]=(0,l.useState)(s||[]),[j,v]=(0,l.useState)(t||[]),[N,y]=(0,l.useState)(!1),k=c.rj.find(e=>e.id===r),C="embedding"===r,w=m.has(r);if("webSearch"===r||"webFetch"===r)return n.replace("/dashboard/media-providers/web"),null;if(!k)return(0,i.notFound)();let $=(0,c.o5)(r),z=j.filter(e=>e.kind===r),S=h.map(e=>({id:e.id,name:e.name||"Custom Embedding",color:"#6366F1",textIcon:"CE"})),A=[...$,...S],E=async(e,s)=>{let t=d.filter(s=>s.provider===e);p(t=>t.map(t=>t.provider===e?{...t,isActive:s}:t)),await Promise.allSettled(t.map(e=>fetch(`/api/providers/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:s})})))},T=async()=>{let e=x[r]||`${r}-combo`,s=e,t=1,a=new Set(j.map(e=>e.name));for(;a.has(s);)s=`${e}-${t++}`;let i=await fetch("/api/combos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:s,models:[],kind:r})});if(i.ok){let e=await i.json();n.push(`/dashboard/media-providers/combo/${e.id}`)}else alert((await i.json()).error||"Failed to create combo")};return(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(C||w)&&(0,a.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[w&&(0,a.jsx)(o.Button,{size:"sm",icon:"add",onClick:T,children:"Create Combo"}),C&&(0,a.jsx)(o.Button,{size:"sm",icon:"add",onClick:()=>y(!0),children:"Add Custom Embedding"})]}),w&&z.length>0&&(0,a.jsx)(g,{combos:z}),0===A.length?(0,a.jsxs)("div",{className:"text-center py-12 border border-dashed border-border rounded-xl text-text-muted text-sm",children:["No providers support ",(0,a.jsx)("strong",{children:k.label})," yet."]}):(0,a.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:[$.map(e=>(0,a.jsx)(u,{provider:e,kind:r,connections:d,onToggle:E},e.id)),S.map(e=>(0,a.jsx)(u,{provider:e,kind:r,connections:d,isCustom:!0,onToggle:E},e.id))]}),C&&(0,a.jsx)(o.AddCustomEmbeddingModal,{isOpen:N,onClose:()=>y(!1),onCreated:e=>{f(s=>[...s,e]),y(!1)}})]})}}},e=>{e.O(0,[3885,2318,4385,2940,2147,3204,7358],()=>e(e.s=86615)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6620],{86615:(e,s,t)=>{Promise.resolve().then(t.bind(t,87250))},87250:(e,s,t)=>{"use strict";t.d(s,{default:()=>b});var a=t(15102),i=t(93278),r=t(93885),n=t.n(r),l=t(82030),o=t(73178),d=t(31704),c=t(31038);let m=new Set([]),x={image:"image-combo",tts:"tts-combo"};function p(e){let s=Object.entries(e).some(([e,s])=>e.startsWith("modelLock_")&&s&&new Date(s).getTime()>Date.now());return"unavailable"!==e.testStatus||s?e.testStatus:"active"}function h({isNoAuth:e,allDisabled:s,total:t,connected:i,error:r}){return e?(0,a.jsx)(o.Badge,{variant:"success",size:"sm",children:"Ready"}):s?(0,a.jsx)(o.Badge,{variant:"default",size:"sm",children:"Disabled"}):0===t?(0,a.jsx)("span",{className:"text-xs text-text-muted",children:"No connections"}):(0,a.jsxs)(a.Fragment,{children:[i>0&&(0,a.jsxs)(o.Badge,{variant:"success",size:"sm",dot:!0,children:[i," Connected"]}),r>0&&(0,a.jsxs)(o.Badge,{variant:"error",size:"sm",dot:!0,children:[r," Error"]}),0===i&&0===r&&(0,a.jsxs)(o.Badge,{variant:"default",size:"sm",children:[t," Added"]})]})}function u({provider:e,kind:s,connections:t,isCustom:i,onToggle:r}){let l=c.Q2[e.id],m=!!l?.noAuth,x=t.filter(s=>s.provider===e.id),g=x.filter(e=>{let s=p(e);return"active"===s||"success"===s}).length,b=x.filter(e=>{let s=p(e);return"error"===s||"expired"===s||"unavailable"===s}).length,f=x.length,j=f>0&&x.every(e=>!1===e.isActive);return(0,a.jsx)(n(),{href:`/dashboard/media-providers/${s}/${e.id}`,className:"group",children:(0,a.jsx)(o.Card,{padding:"xs",className:`h-full hover:bg-black/[0.01] dark:hover:bg-white/[0.01] transition-colors cursor-pointer ${j?"opacity-50":""}`,children:(0,a.jsxs)("div",{className:"flex min-w-0 items-center justify-between gap-3",children:[(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,a.jsx)("div",{className:"size-8 rounded-lg flex items-center justify-center shrink-0",style:{backgroundColor:`${e.color?.length>7?e.color:(e.color??"#888")+"15"}`},children:(0,a.jsx)(d.A,{src:`/providers/${e.id}.webp`,alt:e.name,size:30,className:"object-contain rounded-lg max-w-[30px] max-h-[30px]",fallbackText:e.textIcon||e.id.slice(0,2).toUpperCase(),fallbackColor:e.color})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("h3",{className:"font-semibold text-sm",children:e.name}),(0,a.jsxs)("div",{className:"flex items-center gap-2 mt-0.5 flex-wrap",children:[i&&(0,a.jsx)(o.Badge,{variant:"default",size:"sm",children:"Custom"}),(0,a.jsx)(h,{isNoAuth:m,allDisabled:j,total:f,connected:g,error:b})]})]})]}),f>0&&(0,a.jsx)("button",{type:"button",className:"shrink-0 opacity-100 transition-opacity sm:opacity-0 sm:group-hover:opacity-100",onClick:s=>{s.preventDefault(),s.stopPropagation(),r&&r(e.id,j)},"aria-label":j?"Enable provider":"Disable provider",children:(0,a.jsx)(o.Toggle,{size:"sm",checked:!j,onChange:()=>{},title:j?"Enable provider":"Disable provider"})})]})})})}function g({combos:e}){return 0===e.length?null:(0,a.jsx)("div",{className:"flex flex-col gap-2",children:e.map(e=>(0,a.jsx)(n(),{href:`/dashboard/media-providers/combo/${e.id}`,children:(0,a.jsx)(o.Card,{padding:"xs",className:"hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors cursor-pointer",children:(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary text-[18px]",children:"layers"}),(0,a.jsx)("code",{className:"text-sm font-mono font-medium flex-1 truncate",children:e.name}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-1 sm:shrink-0",children:[e.models.slice(0,6).map((e,s)=>{let t="string"==typeof e?e.split("/")[0]:"",i=c.Q2[t];return(0,a.jsx)("div",{title:i?.name||e,className:"size-5 rounded flex items-center justify-center",style:{backgroundColor:`${i?.color??"#888"}15`},children:(0,a.jsx)(d.A,{src:`/providers/${t}.webp`,alt:i?.name||t,size:18,className:"object-contain rounded max-w-[18px] max-h-[18px]",fallbackText:i?.textIcon||t.slice(0,2).toUpperCase(),fallbackColor:i?.color})},`${e}-${s}`)}),e.models.length>6&&(0,a.jsxs)("span",{className:"text-[10px] text-text-muted ml-1",children:["+",e.models.length-6]})]}),(0,a.jsx)("span",{className:"text-[11px] text-text-muted shrink-0",children:e.models.length}),(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[16px]",children:"chevron_right"})]})})},e.id))})}function b({initialConnections:e,initialNodes:s,initialCombos:t}){let{kind:r}=(0,i.useParams)(),n=(0,i.useRouter)(),[d,p]=(0,l.useState)(e||[]),[h,f]=(0,l.useState)(s||[]),[j,v]=(0,l.useState)(t||[]),[N,y]=(0,l.useState)(!1),k=c.rj.find(e=>e.id===r),C="embedding"===r,w=m.has(r);if("webSearch"===r||"webFetch"===r)return n.replace("/dashboard/media-providers/web"),null;if(!k)return(0,i.notFound)();let $=(0,c.o5)(r),z=j.filter(e=>e.kind===r),S=h.map(e=>({id:e.id,name:e.name||"Custom Embedding",color:"#6366F1",textIcon:"CE"})),A=[...$,...S],E=async(e,s)=>{let t=d.filter(s=>s.provider===e);p(t=>t.map(t=>t.provider===e?{...t,isActive:s}:t)),await Promise.allSettled(t.map(e=>fetch(`/api/providers/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:s})})))},T=async()=>{let e=x[r]||`${r}-combo`,s=e,t=1,a=new Set(j.map(e=>e.name));for(;a.has(s);)s=`${e}-${t++}`;let i=await fetch("/api/combos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:s,models:[],kind:r})});if(i.ok){let e=await i.json();n.push(`/dashboard/media-providers/combo/${e.id}`)}else alert((await i.json()).error||"Failed to create combo")};return(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(C||w)&&(0,a.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[w&&(0,a.jsx)(o.Button,{size:"sm",icon:"add",onClick:T,children:"Create Combo"}),C&&(0,a.jsx)(o.Button,{size:"sm",icon:"add",onClick:()=>y(!0),children:"Add Custom Embedding"})]}),w&&z.length>0&&(0,a.jsx)(g,{combos:z}),0===A.length?(0,a.jsxs)("div",{className:"text-center py-12 border border-dashed border-border rounded-xl text-text-muted text-sm",children:["No providers support ",(0,a.jsx)("strong",{children:k.label})," yet."]}):(0,a.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:[$.map(e=>(0,a.jsx)(u,{provider:e,kind:r,connections:d,onToggle:E},e.id)),S.map(e=>(0,a.jsx)(u,{provider:e,kind:r,connections:d,isCustom:!0,onToggle:E},e.id))]}),C&&(0,a.jsx)(o.AddCustomEmbeddingModal,{isOpen:N,onClose:()=>y(!1),onCreated:e=>{f(s=>[...s,e]),y(!1)}})]})}}},e=>{e.O(0,[3885,3758,7236,4385,3178,2147,3204,7358],()=>e(e.s=86615)),_N_E=e.O()}]);