switchboard-router 0.5.20 → 0.5.21

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 (882) hide show
  1. package/app/.next-cli-build/BUILD_ID +1 -1
  2. package/app/.next-cli-build/app-path-routes-manifest.json +10 -10
  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/required-server-files.json +5 -5
  6. package/app/.next-cli-build/server/app/(dashboard)/dashboard/agent-library/page.js +2 -2
  7. package/app/.next-cli-build/server/app/(dashboard)/dashboard/agent-library/page.js.nft.json +1 -1
  8. package/app/.next-cli-build/server/app/(dashboard)/dashboard/agent-library/page_client-reference-manifest.js +1 -1
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +2 -2
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +3 -3
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +2 -2
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +2 -2
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/routing/page.js +2 -2
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/routing/page.js.nft.json +1 -1
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/routing/page_client-reference-manifest.js +1 -1
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +2 -2
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +3 -3
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +2 -2
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +2 -2
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +3 -3
  37. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  38. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  39. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/page.js +2 -2
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/page.js.nft.json +1 -1
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/page_client-reference-manifest.js +1 -1
  42. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +2 -2
  43. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  44. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  45. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +2 -2
  46. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  47. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  48. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +2 -2
  49. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  50. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  51. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +2 -2
  52. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  53. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  54. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +3 -3
  55. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  56. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  57. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +2 -2
  58. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  59. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  60. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +2 -2
  61. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  62. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  63. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +2 -2
  64. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  65. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  66. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/[id]/page.js +2 -2
  67. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/[id]/page.js.nft.json +1 -1
  68. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/[id]/page_client-reference-manifest.js +1 -1
  69. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +2 -2
  70. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  71. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  72. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +2 -2
  73. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
  74. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  75. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +2 -2
  76. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  77. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  78. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +2 -2
  79. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  80. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  81. package/app/.next-cli-build/server/app/_global-error/page.js +3 -3
  82. package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  83. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  84. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  85. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  86. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  87. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  88. package/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  89. package/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
  90. package/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
  91. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  92. package/app/.next-cli-build/server/app/_not-found/page.js +2 -2
  93. package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  94. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  95. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  96. package/app/.next-cli-build/server/app/_not-found.rsc +5 -5
  97. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +5 -5
  98. package/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
  99. package/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +5 -5
  100. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  101. package/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  102. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +3 -3
  103. package/app/.next-cli-build/server/app/api/agent-library/catalog/route.js +1 -1
  104. package/app/.next-cli-build/server/app/api/agent-library/catalog/route.js.nft.json +1 -1
  105. package/app/.next-cli-build/server/app/api/agent-library/catalog/route_client-reference-manifest.js +1 -1
  106. package/app/.next-cli-build/server/app/api/agent-library/doctor/route.js +1 -1
  107. package/app/.next-cli-build/server/app/api/agent-library/doctor/route.js.nft.json +1 -1
  108. package/app/.next-cli-build/server/app/api/agent-library/doctor/route_client-reference-manifest.js +1 -1
  109. package/app/.next-cli-build/server/app/api/agent-library/export/route.js +1 -1
  110. package/app/.next-cli-build/server/app/api/agent-library/export/route.js.nft.json +1 -1
  111. package/app/.next-cli-build/server/app/api/agent-library/export/route_client-reference-manifest.js +1 -1
  112. package/app/.next-cli-build/server/app/api/agent-library/mcp/route.js +1 -1
  113. package/app/.next-cli-build/server/app/api/agent-library/mcp/route.js.nft.json +1 -1
  114. package/app/.next-cli-build/server/app/api/agent-library/mcp/route_client-reference-manifest.js +1 -1
  115. package/app/.next-cli-build/server/app/api/agent-library/route.js +1 -1
  116. package/app/.next-cli-build/server/app/api/agent-library/route.js.nft.json +1 -1
  117. package/app/.next-cli-build/server/app/api/agent-library/route_client-reference-manifest.js +1 -1
  118. package/app/.next-cli-build/server/app/api/agent-library/skills/route.js +1 -1
  119. package/app/.next-cli-build/server/app/api/agent-library/skills/route.js.nft.json +1 -1
  120. package/app/.next-cli-build/server/app/api/agent-library/skills/route_client-reference-manifest.js +1 -1
  121. package/app/.next-cli-build/server/app/api/agent-library/sync/route.js +1 -1
  122. package/app/.next-cli-build/server/app/api/agent-library/sync/route.js.nft.json +1 -1
  123. package/app/.next-cli-build/server/app/api/agent-library/sync/route_client-reference-manifest.js +1 -1
  124. package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
  125. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  126. package/app/.next-cli-build/server/app/api/auth/status/route_client-reference-manifest.js +1 -1
  127. package/app/.next-cli-build/server/app/api/cli-tools/aider-settings/route.js +2 -2
  128. package/app/.next-cli-build/server/app/api/cli-tools/aider-settings/route.js.nft.json +1 -1
  129. package/app/.next-cli-build/server/app/api/cli-tools/aider-settings/route_client-reference-manifest.js +1 -1
  130. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +7 -7
  131. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  132. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route_client-reference-manifest.js +1 -1
  133. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
  134. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  135. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route_client-reference-manifest.js +1 -1
  136. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  137. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  138. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route_client-reference-manifest.js +1 -1
  139. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
  140. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  141. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route_client-reference-manifest.js +1 -1
  142. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +2 -2
  143. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  144. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route_client-reference-manifest.js +1 -1
  145. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
  146. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  147. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route_client-reference-manifest.js +1 -1
  148. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +2 -2
  149. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  150. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route_client-reference-manifest.js +1 -1
  151. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +2 -2
  152. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  153. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route_client-reference-manifest.js +1 -1
  154. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +1 -1
  155. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  156. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route_client-reference-manifest.js +1 -1
  157. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +2 -2
  158. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  159. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route_client-reference-manifest.js +1 -1
  160. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +2 -2
  161. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  162. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route_client-reference-manifest.js +1 -1
  163. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +1 -1
  164. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  165. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route_client-reference-manifest.js +1 -1
  166. package/app/.next-cli-build/server/app/api/cli-tools/gemini-cli-settings/route.js +3 -3
  167. package/app/.next-cli-build/server/app/api/cli-tools/gemini-cli-settings/route.js.nft.json +1 -1
  168. package/app/.next-cli-build/server/app/api/cli-tools/gemini-cli-settings/route_client-reference-manifest.js +1 -1
  169. package/app/.next-cli-build/server/app/api/cli-tools/grok-settings/route.js +2 -2
  170. package/app/.next-cli-build/server/app/api/cli-tools/grok-settings/route.js.nft.json +1 -1
  171. package/app/.next-cli-build/server/app/api/cli-tools/grok-settings/route_client-reference-manifest.js +1 -1
  172. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +3 -3
  173. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  174. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route_client-reference-manifest.js +1 -1
  175. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +2 -2
  176. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  177. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route_client-reference-manifest.js +1 -1
  178. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +2 -2
  179. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  180. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route_client-reference-manifest.js +1 -1
  181. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
  182. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  183. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route_client-reference-manifest.js +1 -1
  184. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +2 -2
  185. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  186. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route_client-reference-manifest.js +1 -1
  187. package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js +2 -2
  188. package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js.nft.json +1 -1
  189. package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route_client-reference-manifest.js +1 -1
  190. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  191. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  192. package/app/.next-cli-build/server/app/api/combos/[id]/route_client-reference-manifest.js +1 -1
  193. package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  194. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  195. package/app/.next-cli-build/server/app/api/combos/route_client-reference-manifest.js +1 -1
  196. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js +1 -1
  197. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
  198. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route_client-reference-manifest.js +1 -1
  199. package/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -1
  200. package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
  201. package/app/.next-cli-build/server/app/api/headroom/start/route_client-reference-manifest.js +1 -1
  202. package/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -1
  203. package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
  204. package/app/.next-cli-build/server/app/api/headroom/status/route_client-reference-manifest.js +1 -1
  205. package/app/.next-cli-build/server/app/api/headroom/stop/route.js +1 -1
  206. package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
  207. package/app/.next-cli-build/server/app/api/headroom/stop/route_client-reference-manifest.js +1 -1
  208. package/app/.next-cli-build/server/app/api/health/route.js +1 -1
  209. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  210. package/app/.next-cli-build/server/app/api/health/route_client-reference-manifest.js +1 -1
  211. package/app/.next-cli-build/server/app/api/init/route.js +1 -1
  212. package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  213. package/app/.next-cli-build/server/app/api/init/route_client-reference-manifest.js +1 -1
  214. package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  215. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  216. package/app/.next-cli-build/server/app/api/keys/[id]/route_client-reference-manifest.js +1 -1
  217. package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
  218. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  219. package/app/.next-cli-build/server/app/api/keys/route_client-reference-manifest.js +1 -1
  220. package/app/.next-cli-build/server/app/api/locale/route.js +1 -1
  221. package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  222. package/app/.next-cli-build/server/app/api/locale/route_client-reference-manifest.js +1 -1
  223. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +2 -2
  224. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  225. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route_client-reference-manifest.js +1 -1
  226. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +2 -2
  227. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  228. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route_client-reference-manifest.js +1 -1
  229. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  230. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  231. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route_client-reference-manifest.js +1 -1
  232. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  233. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  234. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route_client-reference-manifest.js +1 -1
  235. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  236. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  237. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route_client-reference-manifest.js +1 -1
  238. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  239. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  240. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route_client-reference-manifest.js +1 -1
  241. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
  242. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  243. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route_client-reference-manifest.js +1 -1
  244. package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  245. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  246. package/app/.next-cli-build/server/app/api/models/alias/route_client-reference-manifest.js +1 -1
  247. package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
  248. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  249. package/app/.next-cli-build/server/app/api/models/availability/route_client-reference-manifest.js +1 -1
  250. package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  251. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  252. package/app/.next-cli-build/server/app/api/models/custom/route_client-reference-manifest.js +1 -1
  253. package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
  254. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  255. package/app/.next-cli-build/server/app/api/models/disabled/route_client-reference-manifest.js +1 -1
  256. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  257. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  258. package/app/.next-cli-build/server/app/api/models/route_client-reference-manifest.js +1 -1
  259. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  260. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  261. package/app/.next-cli-build/server/app/api/models/test/route_client-reference-manifest.js +1 -1
  262. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  263. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  264. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route_client-reference-manifest.js +1 -1
  265. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
  266. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
  267. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route_client-reference-manifest.js +1 -1
  268. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  269. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  270. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route_client-reference-manifest.js +1 -1
  271. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +2 -2
  272. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  273. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route_client-reference-manifest.js +1 -1
  274. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  275. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  276. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route_client-reference-manifest.js +1 -1
  277. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  278. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  279. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route_client-reference-manifest.js +1 -1
  280. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  281. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  282. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route_client-reference-manifest.js +1 -1
  283. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
  284. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
  285. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route_client-reference-manifest.js +1 -1
  286. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
  287. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  288. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route_client-reference-manifest.js +1 -1
  289. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  290. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  291. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route_client-reference-manifest.js +1 -1
  292. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js +1 -1
  293. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
  294. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route_client-reference-manifest.js +1 -1
  295. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  296. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  297. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route_client-reference-manifest.js +1 -1
  298. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  299. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  300. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route_client-reference-manifest.js +1 -1
  301. package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  302. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  303. package/app/.next-cli-build/server/app/api/pricing/route_client-reference-manifest.js +1 -1
  304. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
  305. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  306. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route_client-reference-manifest.js +1 -1
  307. package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  308. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  309. package/app/.next-cli-build/server/app/api/provider-nodes/route_client-reference-manifest.js +1 -1
  310. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
  311. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  312. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route_client-reference-manifest.js +1 -1
  313. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/batch/route.js +1 -1
  314. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/batch/route.js.nft.json +1 -1
  315. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/batch/route_client-reference-manifest.js +1 -1
  316. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/cache/route.js +1 -1
  317. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/cache/route.js.nft.json +1 -1
  318. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/cache/route_client-reference-manifest.js +1 -1
  319. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/prepare/route.js +1 -1
  320. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/prepare/route.js.nft.json +1 -1
  321. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/prepare/route_client-reference-manifest.js +1 -1
  322. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/remove-unavailable/route.js +1 -1
  323. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/remove-unavailable/route.js.nft.json +1 -1
  324. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/remove-unavailable/route_client-reference-manifest.js +1 -1
  325. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  326. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  327. package/app/.next-cli-build/server/app/api/providers/[id]/models/route_client-reference-manifest.js +1 -1
  328. package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  329. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  330. package/app/.next-cli-build/server/app/api/providers/[id]/route_client-reference-manifest.js +1 -1
  331. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  332. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  333. package/app/.next-cli-build/server/app/api/providers/[id]/test/route_client-reference-manifest.js +1 -1
  334. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  335. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  336. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route_client-reference-manifest.js +1 -1
  337. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  338. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  339. package/app/.next-cli-build/server/app/api/providers/client/route_client-reference-manifest.js +1 -1
  340. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
  341. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  342. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route_client-reference-manifest.js +1 -1
  343. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  344. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  345. package/app/.next-cli-build/server/app/api/providers/route_client-reference-manifest.js +1 -1
  346. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
  347. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  348. package/app/.next-cli-build/server/app/api/providers/suggested-models/route_client-reference-manifest.js +1 -1
  349. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  350. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  351. package/app/.next-cli-build/server/app/api/providers/test-batch/route_client-reference-manifest.js +1 -1
  352. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  353. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  354. package/app/.next-cli-build/server/app/api/providers/validate/route_client-reference-manifest.js +1 -1
  355. package/app/.next-cli-build/server/app/api/routing/insights/route.js +1 -1
  356. package/app/.next-cli-build/server/app/api/routing/insights/route.js.nft.json +1 -1
  357. package/app/.next-cli-build/server/app/api/routing/insights/route_client-reference-manifest.js +1 -1
  358. package/app/.next-cli-build/server/app/api/routing/learn/route.js +1 -1
  359. package/app/.next-cli-build/server/app/api/routing/learn/route.js.nft.json +1 -1
  360. package/app/.next-cli-build/server/app/api/routing/learn/route_client-reference-manifest.js +1 -1
  361. package/app/.next-cli-build/server/app/api/routing/versions/promote/route.js +1 -1
  362. package/app/.next-cli-build/server/app/api/routing/versions/promote/route.js.nft.json +1 -1
  363. package/app/.next-cli-build/server/app/api/routing/versions/promote/route_client-reference-manifest.js +1 -1
  364. package/app/.next-cli-build/server/app/api/routing/versions/rollback/route.js +1 -1
  365. package/app/.next-cli-build/server/app/api/routing/versions/rollback/route.js.nft.json +1 -1
  366. package/app/.next-cli-build/server/app/api/routing/versions/rollback/route_client-reference-manifest.js +1 -1
  367. package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  368. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  369. package/app/.next-cli-build/server/app/api/settings/database/route_client-reference-manifest.js +1 -1
  370. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
  371. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  372. package/app/.next-cli-build/server/app/api/settings/proxy-test/route_client-reference-manifest.js +1 -1
  373. package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  374. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  375. package/app/.next-cli-build/server/app/api/settings/route_client-reference-manifest.js +1 -1
  376. package/app/.next-cli-build/server/app/api/shutdown/route.js +1 -1
  377. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  378. package/app/.next-cli-build/server/app/api/shutdown/route_client-reference-manifest.js +1 -1
  379. package/app/.next-cli-build/server/app/api/skills/[id]/route.js +1 -1
  380. package/app/.next-cli-build/server/app/api/skills/[id]/route.js.nft.json +1 -1
  381. package/app/.next-cli-build/server/app/api/skills/[id]/route_client-reference-manifest.js +1 -1
  382. package/app/.next-cli-build/server/app/api/tags/route.js +1 -1
  383. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  384. package/app/.next-cli-build/server/app/api/tags/route_client-reference-manifest.js +1 -1
  385. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  386. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  387. package/app/.next-cli-build/server/app/api/translator/console-logs/route_client-reference-manifest.js +1 -1
  388. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
  389. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  390. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route_client-reference-manifest.js +1 -1
  391. package/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
  392. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  393. package/app/.next-cli-build/server/app/api/translator/load/route_client-reference-manifest.js +1 -1
  394. package/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
  395. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  396. package/app/.next-cli-build/server/app/api/translator/save/route_client-reference-manifest.js +1 -1
  397. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  398. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  399. package/app/.next-cli-build/server/app/api/translator/send/route_client-reference-manifest.js +1 -1
  400. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  401. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  402. package/app/.next-cli-build/server/app/api/translator/translate/route_client-reference-manifest.js +1 -1
  403. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
  404. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
  405. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route_client-reference-manifest.js +1 -1
  406. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  407. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  408. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route_client-reference-manifest.js +1 -1
  409. package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  410. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  411. package/app/.next-cli-build/server/app/api/usage/chart/route_client-reference-manifest.js +1 -1
  412. package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  413. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  414. package/app/.next-cli-build/server/app/api/usage/history/route_client-reference-manifest.js +1 -1
  415. package/app/.next-cli-build/server/app/api/usage/logs/route.js +1 -1
  416. package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
  417. package/app/.next-cli-build/server/app/api/usage/logs/route_client-reference-manifest.js +1 -1
  418. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  419. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  420. package/app/.next-cli-build/server/app/api/usage/providers/route_client-reference-manifest.js +1 -1
  421. package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  422. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  423. package/app/.next-cli-build/server/app/api/usage/request-details/route_client-reference-manifest.js +1 -1
  424. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  425. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  426. package/app/.next-cli-build/server/app/api/usage/request-logs/route_client-reference-manifest.js +1 -1
  427. package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  428. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  429. package/app/.next-cli-build/server/app/api/usage/stats/route_client-reference-manifest.js +1 -1
  430. package/app/.next-cli-build/server/app/api/usage/stream/route.js +2 -2
  431. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  432. package/app/.next-cli-build/server/app/api/usage/stream/route_client-reference-manifest.js +1 -1
  433. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  434. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  435. package/app/.next-cli-build/server/app/api/v1/api/chat/route_client-reference-manifest.js +1 -1
  436. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  437. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  438. package/app/.next-cli-build/server/app/api/v1/audio/speech/route_client-reference-manifest.js +1 -1
  439. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  440. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  441. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route_client-reference-manifest.js +1 -1
  442. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
  443. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  444. package/app/.next-cli-build/server/app/api/v1/audio/voices/route_client-reference-manifest.js +1 -1
  445. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  446. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  447. package/app/.next-cli-build/server/app/api/v1/chat/completions/route_client-reference-manifest.js +1 -1
  448. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  449. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  450. package/app/.next-cli-build/server/app/api/v1/embeddings/route_client-reference-manifest.js +1 -1
  451. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +1 -1
  452. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  453. package/app/.next-cli-build/server/app/api/v1/images/generations/route_client-reference-manifest.js +1 -1
  454. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
  455. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  456. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route_client-reference-manifest.js +1 -1
  457. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  458. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  459. package/app/.next-cli-build/server/app/api/v1/messages/route_client-reference-manifest.js +1 -1
  460. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
  461. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  462. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route_client-reference-manifest.js +1 -1
  463. package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  464. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  465. package/app/.next-cli-build/server/app/api/v1/models/info/route_client-reference-manifest.js +1 -1
  466. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  467. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  468. package/app/.next-cli-build/server/app/api/v1/models/route_client-reference-manifest.js +1 -1
  469. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  470. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  471. package/app/.next-cli-build/server/app/api/v1/responses/compact/route_client-reference-manifest.js +1 -1
  472. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  473. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  474. package/app/.next-cli-build/server/app/api/v1/responses/route_client-reference-manifest.js +1 -1
  475. package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  476. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  477. package/app/.next-cli-build/server/app/api/v1/route_client-reference-manifest.js +1 -1
  478. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  479. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  480. package/app/.next-cli-build/server/app/api/v1/search/route_client-reference-manifest.js +1 -1
  481. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  482. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  483. package/app/.next-cli-build/server/app/api/v1/web/fetch/route_client-reference-manifest.js +1 -1
  484. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  485. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  486. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route_client-reference-manifest.js +1 -1
  487. package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  488. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  489. package/app/.next-cli-build/server/app/api/v1beta/models/route_client-reference-manifest.js +1 -1
  490. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  491. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  492. package/app/.next-cli-build/server/app/api/version/route_client-reference-manifest.js +1 -1
  493. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  494. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  495. package/app/.next-cli-build/server/app/api/version/shutdown/route_client-reference-manifest.js +1 -1
  496. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  497. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  498. package/app/.next-cli-build/server/app/api/version/update/route_client-reference-manifest.js +1 -1
  499. package/app/.next-cli-build/server/app/callback/page.js +2 -2
  500. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  501. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  502. package/app/.next-cli-build/server/app/callback.html +1 -1
  503. package/app/.next-cli-build/server/app/callback.rsc +6 -6
  504. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +6 -6
  505. package/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
  506. package/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +5 -5
  507. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +3 -3
  508. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +2 -2
  509. package/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
  510. package/app/.next-cli-build/server/app/dashboard/agent-library.html +1 -1
  511. package/app/.next-cli-build/server/app/dashboard/agent-library.rsc +8 -8
  512. package/app/.next-cli-build/server/app/dashboard/agent-library.segments/!KGRhc2hib2FyZCk/dashboard/agent-library/__PAGE__.segment.rsc +2 -2
  513. package/app/.next-cli-build/server/app/dashboard/agent-library.segments/!KGRhc2hib2FyZCk/dashboard/agent-library.segment.rsc +1 -1
  514. package/app/.next-cli-build/server/app/dashboard/agent-library.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  515. package/app/.next-cli-build/server/app/dashboard/agent-library.segments/!KGRhc2hib2FyZCk.segment.rsc +3 -3
  516. package/app/.next-cli-build/server/app/dashboard/agent-library.segments/_full.segment.rsc +8 -8
  517. package/app/.next-cli-build/server/app/dashboard/agent-library.segments/_head.segment.rsc +1 -1
  518. package/app/.next-cli-build/server/app/dashboard/agent-library.segments/_index.segment.rsc +5 -5
  519. package/app/.next-cli-build/server/app/dashboard/agent-library.segments/_tree.segment.rsc +3 -3
  520. package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  521. package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +8 -8
  522. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
  523. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
  524. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  525. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +3 -3
  526. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +8 -8
  527. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
  528. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_index.segment.rsc +5 -5
  529. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +3 -3
  530. package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  531. package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +9 -9
  532. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
  533. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
  534. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  535. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +3 -3
  536. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +9 -9
  537. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
  538. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_index.segment.rsc +5 -5
  539. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +3 -3
  540. package/app/.next-cli-build/server/app/dashboard/combos/routing.html +1 -1
  541. package/app/.next-cli-build/server/app/dashboard/combos/routing.rsc +8 -8
  542. package/app/.next-cli-build/server/app/dashboard/combos/routing.segments/!KGRhc2hib2FyZCk/dashboard/combos/routing/__PAGE__.segment.rsc +2 -2
  543. package/app/.next-cli-build/server/app/dashboard/combos/routing.segments/!KGRhc2hib2FyZCk/dashboard/combos/routing.segment.rsc +1 -1
  544. package/app/.next-cli-build/server/app/dashboard/combos/routing.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
  545. package/app/.next-cli-build/server/app/dashboard/combos/routing.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  546. package/app/.next-cli-build/server/app/dashboard/combos/routing.segments/!KGRhc2hib2FyZCk.segment.rsc +3 -3
  547. package/app/.next-cli-build/server/app/dashboard/combos/routing.segments/_full.segment.rsc +8 -8
  548. package/app/.next-cli-build/server/app/dashboard/combos/routing.segments/_head.segment.rsc +1 -1
  549. package/app/.next-cli-build/server/app/dashboard/combos/routing.segments/_index.segment.rsc +5 -5
  550. package/app/.next-cli-build/server/app/dashboard/combos/routing.segments/_tree.segment.rsc +3 -3
  551. package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  552. package/app/.next-cli-build/server/app/dashboard/combos.rsc +8 -8
  553. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
  554. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
  555. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  556. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +3 -3
  557. package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +8 -8
  558. package/app/.next-cli-build/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
  559. package/app/.next-cli-build/server/app/dashboard/combos.segments/_index.segment.rsc +5 -5
  560. package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +3 -3
  561. package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  562. package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +9 -9
  563. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
  564. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
  565. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  566. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +3 -3
  567. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +9 -9
  568. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
  569. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_index.segment.rsc +5 -5
  570. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +3 -3
  571. package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  572. package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +8 -8
  573. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +2 -2
  574. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +1 -1
  575. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +1 -1
  576. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  577. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +3 -3
  578. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +8 -8
  579. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +1 -1
  580. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +5 -5
  581. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +3 -3
  582. package/app/.next-cli-build/server/app/dashboard/media-providers.html +1 -1
  583. package/app/.next-cli-build/server/app/dashboard/media-providers.rsc +8 -8
  584. package/app/.next-cli-build/server/app/dashboard/media-providers.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/__PAGE__.segment.rsc +2 -2
  585. package/app/.next-cli-build/server/app/dashboard/media-providers.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +1 -1
  586. package/app/.next-cli-build/server/app/dashboard/media-providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  587. package/app/.next-cli-build/server/app/dashboard/media-providers.segments/!KGRhc2hib2FyZCk.segment.rsc +3 -3
  588. package/app/.next-cli-build/server/app/dashboard/media-providers.segments/_full.segment.rsc +8 -8
  589. package/app/.next-cli-build/server/app/dashboard/media-providers.segments/_head.segment.rsc +1 -1
  590. package/app/.next-cli-build/server/app/dashboard/media-providers.segments/_index.segment.rsc +5 -5
  591. package/app/.next-cli-build/server/app/dashboard/media-providers.segments/_tree.segment.rsc +3 -3
  592. package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  593. package/app/.next-cli-build/server/app/dashboard/mitm.rsc +8 -8
  594. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
  595. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
  596. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  597. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +3 -3
  598. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +8 -8
  599. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
  600. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_index.segment.rsc +5 -5
  601. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +3 -3
  602. package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  603. package/app/.next-cli-build/server/app/dashboard/profile.rsc +9 -9
  604. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
  605. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
  606. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  607. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +3 -3
  608. package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +9 -9
  609. package/app/.next-cli-build/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
  610. package/app/.next-cli-build/server/app/dashboard/profile.segments/_index.segment.rsc +5 -5
  611. package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +3 -3
  612. package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  613. package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +8 -8
  614. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
  615. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
  616. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  617. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  618. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +3 -3
  619. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +8 -8
  620. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
  621. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_index.segment.rsc +5 -5
  622. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +3 -3
  623. package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  624. package/app/.next-cli-build/server/app/dashboard/providers.rsc +8 -8
  625. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
  626. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  627. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  628. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +3 -3
  629. package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +8 -8
  630. package/app/.next-cli-build/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
  631. package/app/.next-cli-build/server/app/dashboard/providers.segments/_index.segment.rsc +5 -5
  632. package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +3 -3
  633. package/app/.next-cli-build/server/app/dashboard/quota.html +2 -2
  634. package/app/.next-cli-build/server/app/dashboard/quota.rsc +9 -9
  635. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
  636. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
  637. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  638. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +3 -3
  639. package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +9 -9
  640. package/app/.next-cli-build/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
  641. package/app/.next-cli-build/server/app/dashboard/quota.segments/_index.segment.rsc +5 -5
  642. package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +3 -3
  643. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +2 -2
  644. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  645. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  646. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  647. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +6 -6
  648. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +6 -6
  649. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  650. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +5 -5
  651. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +3 -3
  652. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +2 -2
  653. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
  654. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
  655. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
  656. package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
  657. package/app/.next-cli-build/server/app/dashboard/skills.rsc +8 -8
  658. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +2 -2
  659. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills.segment.rsc +1 -1
  660. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  661. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk.segment.rsc +3 -3
  662. package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +8 -8
  663. package/app/.next-cli-build/server/app/dashboard/skills.segments/_head.segment.rsc +1 -1
  664. package/app/.next-cli-build/server/app/dashboard/skills.segments/_index.segment.rsc +5 -5
  665. package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +3 -3
  666. package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
  667. package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +8 -8
  668. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +2 -2
  669. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver.segment.rsc +1 -1
  670. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  671. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk.segment.rsc +3 -3
  672. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +8 -8
  673. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_head.segment.rsc +1 -1
  674. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_index.segment.rsc +5 -5
  675. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +3 -3
  676. package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  677. package/app/.next-cli-build/server/app/dashboard/translator.rsc +8 -8
  678. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
  679. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
  680. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  681. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +3 -3
  682. package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +8 -8
  683. package/app/.next-cli-build/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
  684. package/app/.next-cli-build/server/app/dashboard/translator.segments/_index.segment.rsc +5 -5
  685. package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +3 -3
  686. package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  687. package/app/.next-cli-build/server/app/dashboard/usage.rsc +8 -8
  688. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
  689. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
  690. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  691. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +3 -3
  692. package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +8 -8
  693. package/app/.next-cli-build/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
  694. package/app/.next-cli-build/server/app/dashboard/usage.segments/_index.segment.rsc +5 -5
  695. package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +3 -3
  696. package/app/.next-cli-build/server/app/dashboard.html +1 -1
  697. package/app/.next-cli-build/server/app/dashboard.rsc +8 -8
  698. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
  699. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  700. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +3 -3
  701. package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +8 -8
  702. package/app/.next-cli-build/server/app/dashboard.segments/_head.segment.rsc +1 -1
  703. package/app/.next-cli-build/server/app/dashboard.segments/_index.segment.rsc +5 -5
  704. package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +3 -3
  705. package/app/.next-cli-build/server/app/favicon.ico/route.js +1 -1
  706. package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
  707. package/app/.next-cli-build/server/app/index.html +1 -1
  708. package/app/.next-cli-build/server/app/index.rsc +5 -5
  709. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  710. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +5 -5
  711. package/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
  712. package/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +5 -5
  713. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +3 -3
  714. package/app/.next-cli-build/server/app/landing/page.js +2 -2
  715. package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  716. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  717. package/app/.next-cli-build/server/app/landing.html +1 -1
  718. package/app/.next-cli-build/server/app/landing.rsc +6 -6
  719. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +6 -6
  720. package/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
  721. package/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +5 -5
  722. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +3 -3
  723. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +2 -2
  724. package/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
  725. package/app/.next-cli-build/server/app/login/page.js +2 -2
  726. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  727. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  728. package/app/.next-cli-build/server/app/login.html +1 -1
  729. package/app/.next-cli-build/server/app/login.rsc +5 -5
  730. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +5 -5
  731. package/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
  732. package/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +5 -5
  733. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +3 -3
  734. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +1 -1
  735. package/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
  736. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js +2 -2
  737. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  738. package/app/.next-cli-build/server/app/manifest.webmanifest/route_client-reference-manifest.js +1 -1
  739. package/app/.next-cli-build/server/app/page.js +2 -2
  740. package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  741. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  742. package/app/.next-cli-build/server/app-paths-manifest.json +10 -10
  743. package/app/.next-cli-build/server/chunks/1241.js +1 -1
  744. package/app/.next-cli-build/server/chunks/2701.js +1 -1
  745. package/app/.next-cli-build/server/chunks/2768.js +1 -1
  746. package/app/.next-cli-build/server/chunks/319.js +3 -3
  747. package/app/.next-cli-build/server/chunks/3546.js +1 -1
  748. package/app/.next-cli-build/server/chunks/4194.js +1 -0
  749. package/app/.next-cli-build/server/chunks/4206.js +1 -1
  750. package/app/.next-cli-build/server/chunks/4746.js +1 -1
  751. package/app/.next-cli-build/server/chunks/4827.js +1 -1
  752. package/app/.next-cli-build/server/chunks/5330.js +3 -3
  753. package/app/.next-cli-build/server/chunks/5612.js +1 -1
  754. package/app/.next-cli-build/server/chunks/5655.js +1 -1
  755. package/app/.next-cli-build/server/chunks/5961.js +1 -1
  756. package/app/.next-cli-build/server/chunks/6040.js +1 -0
  757. package/app/.next-cli-build/server/chunks/{9541.js → 6059.js} +1 -1
  758. package/app/.next-cli-build/server/chunks/6150.js +2 -2
  759. package/app/.next-cli-build/server/chunks/{5852.js → 7557.js} +3 -3
  760. package/app/.next-cli-build/server/chunks/7774.js +20 -19
  761. package/app/.next-cli-build/server/chunks/8238.js +1 -1
  762. package/app/.next-cli-build/server/chunks/{1260.js → 8666.js} +1 -1
  763. package/app/.next-cli-build/server/chunks/8860.js +3 -3
  764. package/app/.next-cli-build/server/chunks/9613.js +1 -0
  765. package/app/.next-cli-build/server/chunks/9696.js +7 -0
  766. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  767. package/app/.next-cli-build/server/middleware.js +9 -9
  768. package/app/.next-cli-build/server/next-font-manifest.js +1 -1
  769. package/app/.next-cli-build/server/next-font-manifest.json +1 -1
  770. package/app/.next-cli-build/server/pages/404.html +1 -1
  771. package/app/.next-cli-build/server/pages/500.html +1 -1
  772. package/app/.next-cli-build/server/server-reference-manifest.js +1 -1
  773. package/app/.next-cli-build/server/server-reference-manifest.json +1 -1
  774. package/app/.next-cli-build/static/chunks/{1321-3fb88ae56e7b3791.js → 1321-39ad919b1616c75c.js} +1 -1
  775. package/app/.next-cli-build/static/chunks/2562-ceb69ca00b47af6e.js +64 -0
  776. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/agent-library/page-b6f9c90a614bfb03.js +1 -0
  777. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/basic-chat/{page-c688f04d8c6a748d.js → page-af2d913820faedae.js} +1 -1
  778. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/page-a777baf9c2aa43b4.js +1 -0
  779. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/page-88244cb193592f8f.js +1 -0
  780. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/{page-3cf4f51a70049a03.js → page-3f5fa0d8e152056f.js} +1 -1
  781. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/routing/page-ff92eef8e57d1447.js +1 -0
  782. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/{page-588506e8d6588ef0.js → page-73628e93426ae624.js} +1 -1
  783. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-a8d8d0f4bfbcfbae.js +3 -0
  784. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/{page-65cfcbb2a087ac60.js → page-a915efd975f6af81.js} +2 -2
  785. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/{page-61ca3a6a1dd1eb4a.js → page-9cad271042843781.js} +1 -1
  786. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/combo/[id]/{page-dad3750b5c02900c.js → page-8bff15a89ffc3746.js} +1 -1
  787. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/{page-46a3db73d45024e9.js → page-36448aa4e37c7802.js} +1 -1
  788. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/web/{page-ed209fb43f1d6130.js → page-4d2b06f4c8d1b384.js} +1 -1
  789. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/{page-49e38f6f8e4e2f3c.js → page-755ed32651028f99.js} +1 -1
  790. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/{page-2ee7071258ed9bd4.js → page-afeae41f2e9445ec.js} +1 -1
  791. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/{page-224240854e1b6a8a.js → page-ff7973275ee57a96.js} +1 -1
  792. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/{page-ea29e184be241899.js → page-5e44267c26a7e42d.js} +2 -2
  793. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/new/page-3afd6ee04180298c.js +1 -0
  794. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-4957f02eb9879798.js +1 -0
  795. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/{page-84e16188362cb0af.js → page-14da9269a25bd090.js} +1 -1
  796. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/[id]/{page-0746d1a330d89fed.js → page-95e55b6593bcf3f7.js} +1 -1
  797. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/{page-901c28377166f266.js → page-77bb7400c2be9752.js} +1 -1
  798. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/{page-5887c8fd842b722e.js → page-54d1bd253432bc6f.js} +1 -1
  799. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/translator/{page-2b3ebdba6e257e3a.js → page-ef0b203963c2c25e.js} +1 -1
  800. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/page-59db0b586ad5ab45.js +1 -0
  801. package/app/.next-cli-build/static/chunks/app/(dashboard)/layout-58013e7e99d17d70.js +1 -0
  802. package/app/.next-cli-build/static/chunks/app/_not-found/{page-b8562ec224316153.js → page-ee581ced4614e639.js} +1 -1
  803. package/app/.next-cli-build/static/chunks/app/callback/page-64f2a90493720740.js +1 -0
  804. package/app/.next-cli-build/static/chunks/app/dashboard/settings/pricing/{page-ed2255d69c2760ec.js → page-2c2051aa3be879d6.js} +1 -1
  805. package/app/.next-cli-build/static/chunks/app/landing/page-8c76c0ea58e06a53.js +1 -0
  806. package/app/.next-cli-build/static/chunks/app/{layout-09827daf4ebdd3eb.js → layout-214ea0ad8a3d8323.js} +1 -1
  807. package/app/.next-cli-build/static/chunks/{framework-711ef29bc66f648c.js → framework-594babcea68f40f6.js} +1 -1
  808. package/app/.next-cli-build/static/chunks/{main-app-11f959986c6ea8f3.js → main-app-e5d01a79c4922432.js} +1 -1
  809. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/global-error-f9c47afa2e4175d7.js +1 -0
  810. package/app/.next-cli-build/static/css/20c5585d3269ee43.css +1 -0
  811. package/app/.next-cli-build/static/css/{34c541b5726dadd8.css → a26e7bdf55d5cb27.css} +1 -1
  812. package/app/.next-cli-build/static/media/material-symbols-outlined.f656244e.woff2 +0 -0
  813. package/app/cli/.build-home/.switchboard/auth/machine-id-salt +1 -0
  814. package/app/cli/.build-home/.switchboard/db/data.sqlite +0 -0
  815. package/app/cli/.build-home/.switchboard/machine-id +1 -1
  816. package/app/node_modules/react/cjs/react.development.js +1 -1
  817. package/app/node_modules/react/cjs/react.production.js +1 -1
  818. package/app/node_modules/react/package.json +1 -1
  819. package/app/node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.js +1 -1
  820. package/app/node_modules/react-dom/cjs/react-dom-server-legacy.node.production.js +1 -1
  821. package/app/node_modules/react-dom/cjs/react-dom-server.browser.production.js +3 -3
  822. package/app/node_modules/react-dom/cjs/react-dom-server.edge.production.js +3 -3
  823. package/app/node_modules/react-dom/cjs/react-dom-server.node.production.js +3 -3
  824. package/app/node_modules/react-dom/cjs/react-dom.production.js +1 -1
  825. package/app/node_modules/react-dom/package.json +2 -2
  826. package/app/package.json +15 -16
  827. package/app/server.js +1 -1
  828. package/app/src/mitm/server.js +2 -2
  829. package/package.json +4 -4
  830. package/app/.next/standalone/.next-cli-build/standalone/switchboard/.next/standalone/skills/switchboard/SKILL.md +0 -79
  831. package/app/.next/standalone/.next-cli-build/standalone/switchboard/.next/standalone/skills/switchboard-chat/SKILL.md +0 -116
  832. package/app/.next/standalone/.next-cli-build/standalone/switchboard/cli/app/.next/standalone/skills/switchboard/SKILL.md +0 -79
  833. package/app/.next/standalone/.next-cli-build/standalone/switchboard/cli/app/.next/standalone/skills/switchboard-chat/SKILL.md +0 -116
  834. package/app/.next/standalone/.next-cli-build/standalone/switchboard/cli/app/skills/switchboard/SKILL.md +0 -79
  835. package/app/.next/standalone/.next-cli-build/standalone/switchboard/cli/app/skills/switchboard-chat/SKILL.md +0 -116
  836. package/app/.next/standalone/.next-cli-build/standalone/switchboard/skills/switchboard/SKILL.md +0 -79
  837. package/app/.next/standalone/.next-cli-build/standalone/switchboard/skills/switchboard-chat/SKILL.md +0 -116
  838. package/app/.next/standalone/cli/app/.next/standalone/skills/switchboard/SKILL.md +0 -79
  839. package/app/.next/standalone/cli/app/.next/standalone/skills/switchboard-chat/SKILL.md +0 -116
  840. package/app/.next/standalone/cli/app/cli/app/.next/standalone/skills/switchboard/SKILL.md +0 -79
  841. package/app/.next/standalone/cli/app/cli/app/.next/standalone/skills/switchboard-chat/SKILL.md +0 -116
  842. package/app/.next/standalone/cli/app/cli/app/skills/switchboard/SKILL.md +0 -79
  843. package/app/.next/standalone/cli/app/cli/app/skills/switchboard-chat/SKILL.md +0 -116
  844. package/app/.next/standalone/cli/app/skills/switchboard/SKILL.md +0 -79
  845. package/app/.next/standalone/cli/app/skills/switchboard-chat/SKILL.md +0 -116
  846. package/app/.next/standalone/skills/switchboard/SKILL.md +0 -79
  847. package/app/.next/standalone/skills/switchboard-chat/SKILL.md +0 -116
  848. package/app/.next-cli-build/server/chunks/2231.js +0 -1
  849. package/app/.next-cli-build/server/chunks/3512.js +0 -7
  850. package/app/.next-cli-build/server/chunks/4414.js +0 -1
  851. package/app/.next-cli-build/server/chunks/595.js +0 -1
  852. package/app/.next-cli-build/static/chunks/2562-2500ff34b51fb718.js +0 -64
  853. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/agent-library/page-300dd0d4a14c86ab.js +0 -1
  854. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/page-5722c35724f2cc4f.js +0 -1
  855. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/page-d75b80dab94a2849.js +0 -1
  856. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/routing/page-c9dcb59231f22b88.js +0 -1
  857. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-08175767f4233a14.js +0 -3
  858. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/new/page-36c5cb9892efd5c3.js +0 -1
  859. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-5dcde8afd9ea38e7.js +0 -1
  860. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/page-5fb06025c80a090f.js +0 -1
  861. package/app/.next-cli-build/static/chunks/app/(dashboard)/layout-2cf7f9f80870dd6c.js +0 -1
  862. package/app/.next-cli-build/static/chunks/app/callback/page-f1f270e67555b182.js +0 -1
  863. package/app/.next-cli-build/static/chunks/app/landing/page-6892ba5b21239050.js +0 -1
  864. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/global-error-cc98e46801de50e2.js +0 -1
  865. package/app/.next-cli-build/static/css/0f3ab8c15caad6fe.css +0 -1
  866. package/app/.next-cli-build/static/media/material-symbols-outlined.ec1fa111.woff2 +0 -0
  867. package/app/cli/.build-home/Library/Preferences/nextjs-nodejs/config.json +0 -7
  868. package/app/cli/app/.next/standalone/skills/switchboard/SKILL.md +0 -79
  869. package/app/cli/app/.next/standalone/skills/switchboard-chat/SKILL.md +0 -116
  870. package/app/cli/app/cli/app/.next/standalone/skills/switchboard/SKILL.md +0 -79
  871. package/app/cli/app/cli/app/.next/standalone/skills/switchboard-chat/SKILL.md +0 -116
  872. package/app/cli/app/cli/app/skills/switchboard/SKILL.md +0 -79
  873. package/app/cli/app/cli/app/skills/switchboard-chat/SKILL.md +0 -116
  874. package/app/cli/app/skills/switchboard/SKILL.md +0 -79
  875. package/app/cli/app/skills/switchboard-chat/SKILL.md +0 -116
  876. package/app/skills/README.md +0 -37
  877. package/app/skills/switchboard/SKILL.md +0 -79
  878. package/app/skills/switchboard-chat/SKILL.md +0 -116
  879. package/app/tests/.tmp-data/agent-library/skills/switchboard/SKILL.md +0 -79
  880. package/app/tests/.tmp-data/agent-library/skills/switchboard-chat/SKILL.md +0 -116
  881. /package/app/.next-cli-build/static/{XN2UMzJk6TOOrjyMPr-m8 → HFerqnfiKkxdqoMVxOfPW}/_buildManifest.js +0 -0
  882. /package/app/.next-cli-build/static/{XN2UMzJk6TOOrjyMPr-m8 → HFerqnfiKkxdqoMVxOfPW}/_ssgManifest.js +0 -0
@@ -1,4 +1,4 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[182],{41095:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>M});var a=s(95155),r=s(73321),o=s(98500),l=s.n(o),n=s(12115),i=s(35497),d=s(57250),c=s(88105),m=s(70217),u=s(14051),p=s.n(u);function x({until:e}){let[t,s]=(0,n.useState)("");return((0,n.useEffect)(()=>{let t=()=>{let t=new Date(e).getTime()-Date.now();if(t<=0)return void s("");let a=Math.floor(t/1e3);a<60?s(`${a}s`):a<3600?s(`${Math.floor(a/60)}m ${a%60}s`):s(`${Math.floor(a/3600)}h ${Math.floor(a%3600/60)}m`)};t();let a=setInterval(t,1e3);return()=>clearInterval(a)},[e]),t)?(0,a.jsxs)("span",{className:"text-xs text-orange-500 font-mono",children:["⏱ ",t]}):null}function h({connection:e,proxyPools:t,isOAuth:s,isFirst:r,isLast:o,onMoveUp:l,onMoveDown:d,onToggleActive:c,onUpdateProxy:u,onEdit:p,onDelete:b}){let[f,g]=(0,n.useState)(!1),[y,v]=(0,n.useState)(!1),[j,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||$,_=S?`Pool: ${S.name}`:C?`Pool: ${C} (inactive/missing)`:$?`Legacy: ${e.providerSpecificData?.connectionProxyUrl}`:"",A="",I=S?.proxyUrl||e.providerSpecificData?.connectionProxyUrl;if(I)try{let e=new URL(I);A=`${e.protocol}//${e.hostname}${e.port?`:${e.port}`:""}`}catch{A=I}let E=S?.noProxy||e.providerSpecificData?.connectionNoProxy||"",T=S?.isActive===!0?"success":C||$?"error":"default",R=Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>e).filter(Boolean).sort()[0]||null;(0,n.useEffect)(()=>{let t=()=>{w(!!Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>e).filter(e=>e&&new Date(e).getTime()>Date.now()).sort()[0])};t();let s=R?setInterval(t,1e3):null;return()=>{s&&clearInterval(s)}},[R]),(0,n.useEffect)(()=>{if(!f)return;let e=e=>{N.current&&!N.current.contains(e.target)&&g(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[f]);let O="unavailable"!==e.testStatus||j?e.testStatus:"active",M=s?e.name||e.email||e.displayName||"OAuth Account":e.name,K=async e=>{v(!0);try{await u("__none__"===e?null:e)}finally{v(!1),g(!1)}};return(0,a.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,a.jsxs)("div",{className:"flex w-full min-w-0 flex-1 items-start gap-3 sm:items-center",children:[(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsx)("button",{onClick:l,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,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_up"})}),(0,a.jsx)("button",{onClick:d,disabled:o,className:`p-0.5 rounded ${o?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_down"})})]}),(0,a.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted",children:s?"lock":"key"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium truncate",children:M}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2 mt-1",children:[(0,a.jsx)(i.Ex,{variant:(0,m.g)(e.isActive,O),size:"sm",dot:!0,children:!1===e.isActive?"disabled":O||"Unknown"}),P&&(0,a.jsx)(i.Ex,{variant:T,size:"sm",children:"Proxy"}),j&&!1!==e.isActive&&(0,a.jsx)(x,{until:R}),e.lastError&&!1!==e.isActive&&(0,a.jsx)("span",{className:"text-xs text-red-500 truncate max-w-[300px]",title:e.lastError,children:e.lastError}),(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["#",e.priority]})]}),P&&(0,a.jsxs)("div",{className:"mt-1 flex flex-wrap items-center gap-2",children:[(0,a.jsx)("span",{className:"text-[11px] text-text-muted truncate max-w-[420px]",title:_,children:_}),A&&(0,a.jsx)("code",{className:"text-[10px] font-mono bg-black/5 dark:bg-white/5 px-1 py-0.5 rounded text-text-muted",children:A}),E&&(0,a.jsxs)("span",{className:"text-[11px] text-text-muted truncate max-w-[320px]",title:E,children:["no_proxy: ",E]})]})]})]}),(0,a.jsxs)("div",{className:"flex w-full flex-wrap items-center justify-between gap-2 sm:w-auto sm:justify-end",children:[(0,a.jsxs)("div",{className:"flex flex-wrap gap-1",children:[(t||[]).length>0&&(0,a.jsxs)("div",{className:"relative",ref:N,children:[(0,a.jsxs)("button",{onClick:()=>g(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,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:y?"progress_activity":"lan"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Proxy"})]}),f&&(0,a.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,a.jsx)("button",{onClick:()=>K("__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,a.jsx)("button",{onClick:()=>K(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,a.jsxs)("button",{onClick:p,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,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:b,className:"flex flex-col items-center px-2 py-1 rounded hover:bg-red-500/10 text-red-500",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]}),(0,a.jsx)(i.lM,{size:"sm",checked:e.isActive??!0,onChange:c,title:e.isActive??!0?"Disable":"Enable"})]})]})}function b({isOpen:e,provider:t,providerName:s,proxyPools:r,onSave:o,onClose:l}){let d="__none__",[c,m]=(0,n.useState)({name:"",apiKey:"",priority:1,proxyPoolId:d}),[u,p]=(0,n.useState)(!1),[x,h]=(0,n.useState)(null),[f,g]=(0,n.useState)(!1),y=async()=>{p(!0);try{let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:c.apiKey})}),s=await e.json();h(s.valid?"success":"failed")}catch{h("failed")}finally{p(!1)}},v=async()=>{if(t&&c.apiKey){g(!0);try{let e=!1;try{p(!0),h(null);let s=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:c.apiKey})});e=!!(await s.json()).valid,h(e?"success":"failed")}catch{h("failed")}finally{p(!1)}await o({name:c.name,apiKey:c.apiKey,priority:c.priority,proxyPoolId:c.proxyPoolId===d?null:c.proxyPoolId,testStatus:e?"active":"unknown"})}finally{g(!1)}}};return t?(0,a.jsx)(i.aF,{isOpen:e,title:`Add ${s||t} API Key`,onClose:l,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-xs text-text-muted mb-1 block",children:"Name"}),(0,a.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,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("label",{className:"text-xs text-text-muted mb-1 block",children:"API Key"}),(0,a.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,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(i.$n,{onClick:y,disabled:!c.apiKey||u||f,variant:"secondary",children:u?"Checking...":"Check"})})]}),x&&(0,a.jsx)(i.Ex,{variant:"success"===x?"success":"error",children:"success"===x?"Valid":"Invalid"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-xs text-text-muted mb-1 block",children:"Priority"}),(0,a.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,a.jsx)(i.l6,{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,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:v,fullWidth:!0,disabled:!c.name||!c.apiKey||f,children:f?"Saving...":"Save"}),(0,a.jsx)(i.$n,{onClick:l,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}function f({providerId:e,isOAuth:t}){let[s,r]=(0,n.useState)([]),[o,l]=(0,n.useState)([]),[d,c]=(0,n.useState)(!0),[m,u]=(0,n.useState)(!1),[p,x]=(0,n.useState)(!1),[g,y]=(0,n.useState)(null),[v,j]=(0,n.useState)(null),[w,N]=(0,n.useState)("1"),[k,C]=(0,n.useState)(null),S=(0,n.useCallback)(async()=>{try{let[t,s,a]=await Promise.all([fetch("/api/providers",{cache:"no-store"}),fetch("/api/proxy-pools?isActive=true",{cache:"no-store"}),fetch("/api/settings",{cache:"no-store"})]),o=await t.json(),n=await s.json(),i=a.ok?await a.json():{};t.ok&&r((o.connections||[]).filter(t=>t.provider===e)),s.ok&&l(n.proxyPools||[]);let d=(i.providerStrategies||{})[e]||{};j(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,s)=>{try{let a=await fetch("/api/settings",{cache:"no-store"}),r=(a.ok?await a.json():{}).providerStrategies||{},o={};t&&(o.fallbackStrategy=t),"round-robin"===t&&""!==s&&(o.stickyRoundRobinLimit=Number(s)||3);let l={...r};0===Object.keys(o).length?delete l[e]:l[e]=o,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:l})})}catch(e){console.log("saveStrategy error:",e)}},P=async(e,t)=>{let a=[...s];[a[e],a[t]]=[a[t],a[e]],r(a);try{await Promise.all([fetch(`/api/providers/${a[e].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:e})}),fetch(`/api/providers/${a[t].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:t})})])}catch{await S()}},_=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)}}})},A=async(e,t)=>{try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&r(s=>s.map(s=>s.id===e?{...s,isActive:t}:s))}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(s=>s.map(s=>s.id===e?{...s,providerSpecificData:{...s.providerSpecificData,proxyPoolId:t||null}}:s))}catch(e){console.log("proxy error:",e)}},E=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)}},T=async e=>{try{(await fetch(`/api/providers/${g.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await S(),x(!1))}catch(e){console.log("update connection error:",e)}};return d?(0,a.jsx)(i.Zp,{children:(0,a.jsx)("div",{className:"h-20 animate-pulse bg-black/5 rounded-lg"})}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(i.Zp,{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-4",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Connections"}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"Round Robin"}),(0,a.jsx)(i.lM,{checked:"round-robin"===v,onChange:e=>{let t=e?"round-robin":null;j(t),e&&!w&&N("1"),$(t,e?w||"1":w)}}),"round-robin"===v&&(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted",children:"Sticky:"}),(0,a.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===s.length?(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"No connections yet"}),(0,a.jsx)(i.$n,{size:"sm",icon:"add",onClick:()=>u(!0),children:"Add Connection"})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"flex flex-col divide-y divide-black/[0.03] dark:divide-white/[0.03]",children:s.map((e,r)=>(0,a.jsx)(h,{connection:e,proxyPools:o,isOAuth:t,isFirst:0===r,isLast:r===s.length-1,onMoveUp:()=>P(r,r-1),onMoveDown:()=>P(r,r+1),onToggleActive:t=>A(e.id,t),onUpdateProxy:t=>I(e.id,t),onEdit:()=>{y(e),x(!0)},onDelete:()=>_(e.id)},e.id))}),(0,a.jsx)("div",{className:"mt-4 flex justify-stretch sm:justify-start",children:(0,a.jsx)(i.$n,{size:"sm",icon:"add",onClick:()=>u(!0),children:"Add"})})]})]}),(0,a.jsx)(b,{isOpen:m,provider:e,proxyPools:o,onSave:E,onClose:()=>u(!1)}),(0,a.jsx)(i.wI,{isOpen:p,connection:g,proxyPools:o,onSave:T,onClose:()=>x(!1)}),(0,a.jsx)(i.uo,{isOpen:!!k,onClose:()=>C(null),onConfirm:k?.onConfirm,title:k?.title||"Confirm",message:k?.message,variant:"danger"})]})}x.propTypes={until:p().string.isRequired},h.propTypes={connection:p().shape({id:p().string,name:p().string,email:p().string,displayName:p().string,testStatus:p().string,isActive:p().bool,lastError:p().string,priority:p().number}).isRequired,proxyPools:p().array,isOAuth:p().bool.isRequired,isFirst:p().bool.isRequired,isLast:p().bool.isRequired,onMoveUp:p().func.isRequired,onMoveDown:p().func.isRequired,onToggleActive:p().func.isRequired,onUpdateProxy:p().func,onEdit:p().func.isRequired,onDelete:p().func.isRequired},b.propTypes={isOpen:p().bool.isRequired,provider:p().string,providerName:p().string,proxyPools:p().array,onSave:p().func.isRequired,onClose:p().func.isRequired},f.propTypes={providerId:p().string.isRequired,isOAuth:p().bool};var g=s(28777),y=s(11059);function v({model:e,fullModel:t,copied:s,onCopy:r,testStatus:o,isCustom:l,isFree:n,onDeleteAlias:i,onTest:d,isTesting:c}){let m="ok"===o?"#22c55e":"error"===o?"#ef4444":void 0;return(0,a.jsx)("div",{className:`group px-3 py-2 rounded-lg border ${"ok"===o?"border-green-500/40":"error"===o?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base",style:m?{color:m}:void 0,children:"ok"===o?"check_circle":"error"===o?"cancel":"smart_toy"}),(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)("code",{className:"text-xs text-text-muted font-mono bg-sidebar px-1.5 py-0.5 rounded",children:t}),e.name&&(0,a.jsx)("span",{className:"text-[9px] text-text-muted/70 italic pl-1",children:e.name})]}),d&&(0,a.jsxs)("div",{className:"relative group/btn",children:[(0,a.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,a.jsx)("span",{className:"material-symbols-outlined text-sm",style:c?{animation:"spin 1s linear infinite"}:void 0,children:c?"progress_activity":"science"})}),(0,a.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,a.jsxs)("div",{className:"relative group/btn",children:[(0,a.jsx)("button",{onClick:()=>r(t,`model-${e.id}`),className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:s===`model-${e.id}`?"check":"content_copy"})}),(0,a.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:s===`model-${e.id}`?"Copied!":"Copy"})]}),n&&(0,a.jsx)("span",{className:"text-[10px] font-bold text-green-500 bg-green-500/10 px-1.5 py-0.5 rounded",children:"FREE"}),l&&(0,a.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,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})})]})})}function j({isOpen:e,onSave:t,onClose:s}){let[r,o]=(0,n.useState)(""),l=()=>{r.trim()&&(t(r.trim()),o(""))};return(0,a.jsx)(i.aF,{isOpen:e,title:"Add Custom Model",onClose:s,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-xs text-text-muted mb-1 block",children:"Model ID"}),(0,a.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=>o(e.target.value),onKeyDown:e=>"Enter"===e.key&&l(),placeholder:"e.g. tts-1-hd",autoFocus:!0})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:l,fullWidth:!0,disabled:!r.trim(),children:"Add"}),(0,a.jsx)(i.$n,{onClick:s,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})})}function w({providerId:e,kindFilter:t,providerAliasOverride:s}){let{copied:r,copy:o}=(0,y.C)(),[l,d]=(0,n.useState)({}),[m,u]=(0,n.useState)([]),[p,x]=(0,n.useState)({}),[h,b]=(0,n.useState)(null),[f,N]=(0,n.useState)(""),[k,C]=(0,n.useState)(!1),[S,$]=(0,n.useState)([]),P=s||(0,c.wG)(e),_=t||"llm",A=(0,n.useCallback)(async()=>{try{let[t,s,a]=await Promise.all([fetch("/api/models/alias"),fetch("/api/providers",{cache:"no-store"}),fetch("/api/models/custom",{cache:"no-store"})]),r=await t.json(),o=await s.json(),l=await a.json();t.ok&&d(r.aliases||{}),s.ok&&$((o.connections||[]).filter(t=>t.provider===e)),a.ok&&u(l.models||[])}catch(e){console.log("ModelsCard fetch error:",e)}},[e]);(0,n.useEffect)(()=>{A()},[A]);let I=async(e,t)=>{let s=`${P}/${e}`;try{(await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:s,alias:t})})).ok&&await A()}catch(e){console.log("set alias error:",e)}},E=async e=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await A()}catch(e){console.log("delete alias error:",e)}},T=async e=>{try{(await fetch("/api/models/custom",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:P,id:e,type:_})})).ok&&(await A(),window.dispatchEvent(new CustomEvent("customModelChanged")))}catch(e){console.log("add custom model error:",e)}},R=async e=>{try{let t=new URLSearchParams({providerAlias:P,id:e,type:_});(await fetch(`/api/models/custom?${t}`,{method:"DELETE"})).ok&&(await A(),window.dispatchEvent(new CustomEvent("customModelChanged")))}catch(e){console.log("delete custom model error:",e)}},O=async e=>{if(!h){b(e);try{let s=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${P}/${e}`,kind:t})}),a=await s.json();x(t=>({...t,[e]:a.ok?"ok":"error"})),N(a.ok?"":a.error||"Model not reachable")}catch{x(t=>({...t,[e]:"error"})),N("Network error")}finally{b(null)}}},M=(0,g.KC)(e),K=t?M.filter(e=>e.kinds?e.kinds.includes(t):(0,g.CP)(e,"llm")===t):M,L=m.filter(e=>e.providerAlias===P&&(0,g.CP)(e,"llm")===_&&!K.some(t=>t.id===e.id));return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(i.Zp,{children:[(0,a.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,a.jsxs)("h2",{className:"text-lg font-semibold",children:["Models",t?` — ${t.toUpperCase()}`:""]})}),f&&(0,a.jsx)("p",{className:"text-xs text-red-500 mb-3 break-words",children:f}),(0,a.jsxs)("div",{className:"flex flex-wrap gap-3",children:[K.map(e=>{let t=`${P}/${e.id}`,s=Object.entries(l).find(([,e])=>e===t)?.[0];return(0,a.jsx)(v,{model:e,fullModel:`${P}/${e.id}`,alias:s,copied:r,onCopy:o,onSetAlias:t=>I(e.id,t),onDeleteAlias:()=>E(s),testStatus:p[e.id],onTest:S.length>0?()=>O(e.id):void 0,isTesting:h===e.id,isFree:e.isFree},e.id)}),L.map(e=>(0,a.jsx)(v,{model:{id:e.id,name:e.name},fullModel:`${P}/${e.id}`,copied:r,onCopy:o,onSetAlias:()=>{},onDeleteAlias:()=>R(e.id),testStatus:p[e.id],onTest:S.length>0?()=>O(e.id):void 0,isTesting:h===e.id,isCustom:!0},`${e.id}-${e.type}`)),(0,a.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,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"}),"Add Model"]})]})]}),(0,a.jsx)(j,{isOpen:k,onSave:async e=>{await T(e),C(!1)},onClose:()=>C(!1)})]})}function N({label:e,children:t}){return(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-1.5 sm:flex-row sm:items-center sm:gap-3",children:[(0,a.jsx)("span",{className:"w-full text-xs font-medium text-text-muted sm:w-20 sm:shrink-0",children:e}),(0,a.jsx)("div",{className:"w-full min-w-0 flex-1",children:t})]})}v.propTypes={model:p().shape({id:p().string.isRequired}).isRequired,fullModel:p().string.isRequired,copied:p().string,onCopy:p().func.isRequired,testStatus:p().oneOf(["ok","error"]),isCustom:p().bool,isFree:p().bool,onDeleteAlias:p().func,onTest:p().func,isTesting:p().bool},j.propTypes={isOpen:p().bool.isRequired,onSave:p().func.isRequired,onClose:p().func.isRequired},w.propTypes={providerId:p().string.isRequired,kindFilter:p().string,providerAliasOverride:p().string};let k={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],{17845:(e,t,s)=>{Promise.resolve().then(s.bind(s,41095))},41095:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>M});var a=s(95155),r=s(73321),o=s(98500),l=s.n(o),n=s(12115),i=s(35497),d=s(57250),c=s(88105),m=s(70217),u=s(14051),p=s.n(u);function x({until:e}){let[t,s]=(0,n.useState)("");return((0,n.useEffect)(()=>{let t=()=>{let t=new Date(e).getTime()-Date.now();if(t<=0)return void s("");let a=Math.floor(t/1e3);a<60?s(`${a}s`):a<3600?s(`${Math.floor(a/60)}m ${a%60}s`):s(`${Math.floor(a/3600)}h ${Math.floor(a%3600/60)}m`)};t();let a=setInterval(t,1e3);return()=>clearInterval(a)},[e]),t)?(0,a.jsxs)("span",{className:"text-xs text-orange-500 font-mono",children:["⏱ ",t]}):null}function h({connection:e,proxyPools:t,isOAuth:s,isFirst:r,isLast:o,onMoveUp:l,onMoveDown:d,onToggleActive:c,onUpdateProxy:u,onEdit:p,onDelete:b}){let[f,g]=(0,n.useState)(!1),[y,v]=(0,n.useState)(!1),[j,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||$,_=S?`Pool: ${S.name}`:C?`Pool: ${C} (inactive/missing)`:$?`Legacy: ${e.providerSpecificData?.connectionProxyUrl}`:"",A="",I=S?.proxyUrl||e.providerSpecificData?.connectionProxyUrl;if(I)try{let e=new URL(I);A=`${e.protocol}//${e.hostname}${e.port?`:${e.port}`:""}`}catch{A=I}let E=S?.noProxy||e.providerSpecificData?.connectionNoProxy||"",T=S?.isActive===!0?"success":C||$?"error":"default",R=Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>e).filter(Boolean).sort()[0]||null;(0,n.useEffect)(()=>{let t=()=>{w(!!Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>e).filter(e=>e&&new Date(e).getTime()>Date.now()).sort()[0])};t();let s=R?setInterval(t,1e3):null;return()=>{s&&clearInterval(s)}},[R]),(0,n.useEffect)(()=>{if(!f)return;let e=e=>{N.current&&!N.current.contains(e.target)&&g(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[f]);let O="unavailable"!==e.testStatus||j?e.testStatus:"active",M=s?e.name||e.email||e.displayName||"OAuth Account":e.name,K=async e=>{v(!0);try{await u("__none__"===e?null:e)}finally{v(!1),g(!1)}};return(0,a.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,a.jsxs)("div",{className:"flex w-full min-w-0 flex-1 items-start gap-3 sm:items-center",children:[(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsx)("button",{onClick:l,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,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_up"})}),(0,a.jsx)("button",{onClick:d,disabled:o,className:`p-0.5 rounded ${o?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_down"})})]}),(0,a.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted",children:s?"lock":"key"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium truncate",children:M}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2 mt-1",children:[(0,a.jsx)(i.Ex,{variant:(0,m.g)(e.isActive,O),size:"sm",dot:!0,children:!1===e.isActive?"disabled":O||"Unknown"}),P&&(0,a.jsx)(i.Ex,{variant:T,size:"sm",children:"Proxy"}),j&&!1!==e.isActive&&(0,a.jsx)(x,{until:R}),e.lastError&&!1!==e.isActive&&(0,a.jsx)("span",{className:"text-xs text-red-500 truncate max-w-[300px]",title:e.lastError,children:e.lastError}),(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["#",e.priority]})]}),P&&(0,a.jsxs)("div",{className:"mt-1 flex flex-wrap items-center gap-2",children:[(0,a.jsx)("span",{className:"text-[11px] text-text-muted truncate max-w-[420px]",title:_,children:_}),A&&(0,a.jsx)("code",{className:"text-[10px] font-mono bg-black/5 dark:bg-white/5 px-1 py-0.5 rounded text-text-muted",children:A}),E&&(0,a.jsxs)("span",{className:"text-[11px] text-text-muted truncate max-w-[320px]",title:E,children:["no_proxy: ",E]})]})]})]}),(0,a.jsxs)("div",{className:"flex w-full flex-wrap items-center justify-between gap-2 sm:w-auto sm:justify-end",children:[(0,a.jsxs)("div",{className:"flex flex-wrap gap-1",children:[(t||[]).length>0&&(0,a.jsxs)("div",{className:"relative",ref:N,children:[(0,a.jsxs)("button",{onClick:()=>g(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,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:y?"progress_activity":"lan"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Proxy"})]}),f&&(0,a.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,a.jsx)("button",{onClick:()=>K("__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,a.jsx)("button",{onClick:()=>K(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,a.jsxs)("button",{onClick:p,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,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:b,className:"flex flex-col items-center px-2 py-1 rounded hover:bg-red-500/10 text-red-500",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]}),(0,a.jsx)(i.lM,{size:"sm",checked:e.isActive??!0,onChange:c,title:e.isActive??!0?"Disable":"Enable"})]})]})}function b({isOpen:e,provider:t,providerName:s,proxyPools:r,onSave:o,onClose:l}){let d="__none__",[c,m]=(0,n.useState)({name:"",apiKey:"",priority:1,proxyPoolId:d}),[u,p]=(0,n.useState)(!1),[x,h]=(0,n.useState)(null),[f,g]=(0,n.useState)(!1),y=async()=>{p(!0);try{let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:c.apiKey})}),s=await e.json();h(s.valid?"success":"failed")}catch{h("failed")}finally{p(!1)}},v=async()=>{if(t&&c.apiKey){g(!0);try{let e=!1;try{p(!0),h(null);let s=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:c.apiKey})});e=!!(await s.json()).valid,h(e?"success":"failed")}catch{h("failed")}finally{p(!1)}await o({name:c.name,apiKey:c.apiKey,priority:c.priority,proxyPoolId:c.proxyPoolId===d?null:c.proxyPoolId,testStatus:e?"active":"unknown"})}finally{g(!1)}}};return t?(0,a.jsx)(i.aF,{isOpen:e,title:`Add ${s||t} API Key`,onClose:l,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-xs text-text-muted mb-1 block",children:"Name"}),(0,a.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,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("label",{className:"text-xs text-text-muted mb-1 block",children:"API Key"}),(0,a.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,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(i.$n,{onClick:y,disabled:!c.apiKey||u||f,variant:"secondary",children:u?"Checking...":"Check"})})]}),x&&(0,a.jsx)(i.Ex,{variant:"success"===x?"success":"error",children:"success"===x?"Valid":"Invalid"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-xs text-text-muted mb-1 block",children:"Priority"}),(0,a.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,a.jsx)(i.l6,{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,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:v,fullWidth:!0,disabled:!c.name||!c.apiKey||f,children:f?"Saving...":"Save"}),(0,a.jsx)(i.$n,{onClick:l,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}function f({providerId:e,isOAuth:t}){let[s,r]=(0,n.useState)([]),[o,l]=(0,n.useState)([]),[d,c]=(0,n.useState)(!0),[m,u]=(0,n.useState)(!1),[p,x]=(0,n.useState)(!1),[g,y]=(0,n.useState)(null),[v,j]=(0,n.useState)(null),[w,N]=(0,n.useState)("1"),[k,C]=(0,n.useState)(null),S=(0,n.useCallback)(async()=>{try{let[t,s,a]=await Promise.all([fetch("/api/providers",{cache:"no-store"}),fetch("/api/proxy-pools?isActive=true",{cache:"no-store"}),fetch("/api/settings",{cache:"no-store"})]),o=await t.json(),n=await s.json(),i=a.ok?await a.json():{};t.ok&&r((o.connections||[]).filter(t=>t.provider===e)),s.ok&&l(n.proxyPools||[]);let d=(i.providerStrategies||{})[e]||{};j(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,s)=>{try{let a=await fetch("/api/settings",{cache:"no-store"}),r=(a.ok?await a.json():{}).providerStrategies||{},o={};t&&(o.fallbackStrategy=t),"round-robin"===t&&""!==s&&(o.stickyRoundRobinLimit=Number(s)||3);let l={...r};0===Object.keys(o).length?delete l[e]:l[e]=o,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:l})})}catch(e){console.log("saveStrategy error:",e)}},P=async(e,t)=>{let a=[...s];[a[e],a[t]]=[a[t],a[e]],r(a);try{await Promise.all([fetch(`/api/providers/${a[e].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:e})}),fetch(`/api/providers/${a[t].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:t})})])}catch{await S()}},_=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)}}})},A=async(e,t)=>{try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&r(s=>s.map(s=>s.id===e?{...s,isActive:t}:s))}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(s=>s.map(s=>s.id===e?{...s,providerSpecificData:{...s.providerSpecificData,proxyPoolId:t||null}}:s))}catch(e){console.log("proxy error:",e)}},E=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)}},T=async e=>{try{(await fetch(`/api/providers/${g.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await S(),x(!1))}catch(e){console.log("update connection error:",e)}};return d?(0,a.jsx)(i.Zp,{children:(0,a.jsx)("div",{className:"h-20 animate-pulse bg-black/5 rounded-lg"})}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(i.Zp,{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-4",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Connections"}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"Round Robin"}),(0,a.jsx)(i.lM,{checked:"round-robin"===v,onChange:e=>{let t=e?"round-robin":null;j(t),e&&!w&&N("1"),$(t,e?w||"1":w)}}),"round-robin"===v&&(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted",children:"Sticky:"}),(0,a.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===s.length?(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"No connections yet"}),(0,a.jsx)(i.$n,{size:"sm",icon:"add",onClick:()=>u(!0),children:"Add Connection"})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"flex flex-col divide-y divide-black/[0.03] dark:divide-white/[0.03]",children:s.map((e,r)=>(0,a.jsx)(h,{connection:e,proxyPools:o,isOAuth:t,isFirst:0===r,isLast:r===s.length-1,onMoveUp:()=>P(r,r-1),onMoveDown:()=>P(r,r+1),onToggleActive:t=>A(e.id,t),onUpdateProxy:t=>I(e.id,t),onEdit:()=>{y(e),x(!0)},onDelete:()=>_(e.id)},e.id))}),(0,a.jsx)("div",{className:"mt-4 flex justify-stretch sm:justify-start",children:(0,a.jsx)(i.$n,{size:"sm",icon:"add",onClick:()=>u(!0),children:"Add"})})]})]}),(0,a.jsx)(b,{isOpen:m,provider:e,proxyPools:o,onSave:E,onClose:()=>u(!1)}),(0,a.jsx)(i.wI,{isOpen:p,connection:g,proxyPools:o,onSave:T,onClose:()=>x(!1)}),(0,a.jsx)(i.uo,{isOpen:!!k,onClose:()=>C(null),onConfirm:k?.onConfirm,title:k?.title||"Confirm",message:k?.message,variant:"danger"})]})}x.propTypes={until:p().string.isRequired},h.propTypes={connection:p().shape({id:p().string,name:p().string,email:p().string,displayName:p().string,testStatus:p().string,isActive:p().bool,lastError:p().string,priority:p().number}).isRequired,proxyPools:p().array,isOAuth:p().bool.isRequired,isFirst:p().bool.isRequired,isLast:p().bool.isRequired,onMoveUp:p().func.isRequired,onMoveDown:p().func.isRequired,onToggleActive:p().func.isRequired,onUpdateProxy:p().func,onEdit:p().func.isRequired,onDelete:p().func.isRequired},b.propTypes={isOpen:p().bool.isRequired,provider:p().string,providerName:p().string,proxyPools:p().array,onSave:p().func.isRequired,onClose:p().func.isRequired},f.propTypes={providerId:p().string.isRequired,isOAuth:p().bool};var g=s(28777),y=s(11059);function v({model:e,fullModel:t,copied:s,onCopy:r,testStatus:o,isCustom:l,isFree:n,onDeleteAlias:i,onTest:d,isTesting:c}){let m="ok"===o?"#22c55e":"error"===o?"#ef4444":void 0;return(0,a.jsx)("div",{className:`group px-3 py-2 rounded-lg border ${"ok"===o?"border-green-500/40":"error"===o?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base",style:m?{color:m}:void 0,children:"ok"===o?"check_circle":"error"===o?"cancel":"smart_toy"}),(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)("code",{className:"text-xs text-text-muted font-mono bg-sidebar px-1.5 py-0.5 rounded",children:t}),e.name&&(0,a.jsx)("span",{className:"text-[9px] text-text-muted/70 italic pl-1",children:e.name})]}),d&&(0,a.jsxs)("div",{className:"relative group/btn",children:[(0,a.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,a.jsx)("span",{className:"material-symbols-outlined text-sm",style:c?{animation:"spin 1s linear infinite"}:void 0,children:c?"progress_activity":"science"})}),(0,a.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,a.jsxs)("div",{className:"relative group/btn",children:[(0,a.jsx)("button",{onClick:()=>r(t,`model-${e.id}`),className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:s===`model-${e.id}`?"check":"content_copy"})}),(0,a.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:s===`model-${e.id}`?"Copied!":"Copy"})]}),n&&(0,a.jsx)("span",{className:"text-[10px] font-bold text-green-500 bg-green-500/10 px-1.5 py-0.5 rounded",children:"FREE"}),l&&(0,a.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,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})})]})})}function j({isOpen:e,onSave:t,onClose:s}){let[r,o]=(0,n.useState)(""),l=()=>{r.trim()&&(t(r.trim()),o(""))};return(0,a.jsx)(i.aF,{isOpen:e,title:"Add Custom Model",onClose:s,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-xs text-text-muted mb-1 block",children:"Model ID"}),(0,a.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=>o(e.target.value),onKeyDown:e=>"Enter"===e.key&&l(),placeholder:"e.g. tts-1-hd",autoFocus:!0})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:l,fullWidth:!0,disabled:!r.trim(),children:"Add"}),(0,a.jsx)(i.$n,{onClick:s,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})})}function w({providerId:e,kindFilter:t,providerAliasOverride:s}){let{copied:r,copy:o}=(0,y.C)(),[l,d]=(0,n.useState)({}),[m,u]=(0,n.useState)([]),[p,x]=(0,n.useState)({}),[h,b]=(0,n.useState)(null),[f,N]=(0,n.useState)(""),[k,C]=(0,n.useState)(!1),[S,$]=(0,n.useState)([]),P=s||(0,c.wG)(e),_=t||"llm",A=(0,n.useCallback)(async()=>{try{let[t,s,a]=await Promise.all([fetch("/api/models/alias"),fetch("/api/providers",{cache:"no-store"}),fetch("/api/models/custom",{cache:"no-store"})]),r=await t.json(),o=await s.json(),l=await a.json();t.ok&&d(r.aliases||{}),s.ok&&$((o.connections||[]).filter(t=>t.provider===e)),a.ok&&u(l.models||[])}catch(e){console.log("ModelsCard fetch error:",e)}},[e]);(0,n.useEffect)(()=>{A()},[A]);let I=async(e,t)=>{let s=`${P}/${e}`;try{(await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:s,alias:t})})).ok&&await A()}catch(e){console.log("set alias error:",e)}},E=async e=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await A()}catch(e){console.log("delete alias error:",e)}},T=async e=>{try{(await fetch("/api/models/custom",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:P,id:e,type:_})})).ok&&(await A(),window.dispatchEvent(new CustomEvent("customModelChanged")))}catch(e){console.log("add custom model error:",e)}},R=async e=>{try{let t=new URLSearchParams({providerAlias:P,id:e,type:_});(await fetch(`/api/models/custom?${t}`,{method:"DELETE"})).ok&&(await A(),window.dispatchEvent(new CustomEvent("customModelChanged")))}catch(e){console.log("delete custom model error:",e)}},O=async e=>{if(!h){b(e);try{let s=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${P}/${e}`,kind:t})}),a=await s.json();x(t=>({...t,[e]:a.ok?"ok":"error"})),N(a.ok?"":a.error||"Model not reachable")}catch{x(t=>({...t,[e]:"error"})),N("Network error")}finally{b(null)}}},M=(0,g.KC)(e),K=t?M.filter(e=>e.kinds?e.kinds.includes(t):(0,g.CP)(e,"llm")===t):M,L=m.filter(e=>e.providerAlias===P&&(0,g.CP)(e,"llm")===_&&!K.some(t=>t.id===e.id));return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(i.Zp,{children:[(0,a.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,a.jsxs)("h2",{className:"text-lg font-semibold",children:["Models",t?` — ${t.toUpperCase()}`:""]})}),f&&(0,a.jsx)("p",{className:"text-xs text-red-500 mb-3 break-words",children:f}),(0,a.jsxs)("div",{className:"flex flex-wrap gap-3",children:[K.map(e=>{let t=`${P}/${e.id}`,s=Object.entries(l).find(([,e])=>e===t)?.[0];return(0,a.jsx)(v,{model:e,fullModel:`${P}/${e.id}`,alias:s,copied:r,onCopy:o,onSetAlias:t=>I(e.id,t),onDeleteAlias:()=>E(s),testStatus:p[e.id],onTest:S.length>0?()=>O(e.id):void 0,isTesting:h===e.id,isFree:e.isFree},e.id)}),L.map(e=>(0,a.jsx)(v,{model:{id:e.id,name:e.name},fullModel:`${P}/${e.id}`,copied:r,onCopy:o,onSetAlias:()=>{},onDeleteAlias:()=>R(e.id),testStatus:p[e.id],onTest:S.length>0?()=>O(e.id):void 0,isTesting:h===e.id,isCustom:!0},`${e.id}-${e.type}`)),(0,a.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,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"}),"Add Model"]})]})]}),(0,a.jsx)(j,{isOpen:k,onSave:async e=>{await T(e),C(!1)},onClose:()=>C(!1)})]})}function N({label:e,children:t}){return(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-1.5 sm:flex-row sm:items-center sm:gap-3",children:[(0,a.jsx)("span",{className:"w-full text-xs font-medium text-text-muted sm:w-20 sm:shrink-0",children:e}),(0,a.jsx)("div",{className:"w-full min-w-0 flex-1",children:t})]})}v.propTypes={model:p().shape({id:p().string.isRequired}).isRequired,fullModel:p().string.isRequired,copied:p().string,onCopy:p().func.isRequired,testStatus:p().oneOf(["ok","error"]),isCustom:p().bool,isFree:p().bool,onDeleteAlias:p().func,onTest:p().func,isTesting:p().bool},j.propTypes={isOpen:p().bool.isRequired,onSave:p().func.isRequired,onClose:p().func.isRequired},w.propTypes={providerId:p().string.isRequired,kindFilter:p().string,providerAliasOverride:p().string};let k={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
  ]
@@ -56,4 +56,4 @@
56
56
  -F "temperature=${C}"`:""}${p.includes("prompt")&&v?` \\
57
57
  -F "prompt=${v}"`:""}`,V=async()=>{if(!x||!J)return;K(!0),B(""),E(null);let e=Date.now();try{let t=new FormData;t.append("file",x),t.append("model",J),p.includes("language")&&b&&t.append("language",b),p.includes("response_format")&&t.append("response_format",w),p.includes("temperature")&&C&&t.append("temperature",C),p.includes("prompt")&&v&&t.append("prompt",v);let s={};$&&(s.Authorization=`Bearer ${$}`);let a=await fetch("/api/v1/audio/transcriptions",{method:"POST",headers:s,body:t});R(Date.now()-e);let r=(a.headers.get("content-type")||"").includes("application/json")?await a.json():await a.text();if(!a.ok)return void B(r?.error?.message||r?.error||r||`HTTP ${a.status}`);E(r)}catch(e){B(e.message||"Network error")}finally{K(!1)}},H="string"==typeof I?I:I?JSON.stringify(I,null,2):`{
58
58
  "text": "Hello world..."
59
- }`;return(0,a.jsxs)(i.Zp,{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"Example"}),(0,a.jsxs)("div",{className:"flex flex-col gap-2.5",children:[l.length>0?(0,a.jsx)(N,{label:"Model",children:(0,a.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:l.map(e=>(0,a.jsx)("option",{value:e.id,children:e.name||e.id},e.id))})}):(0,a.jsx)(N,{label:"Model",children:(0,a.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,a.jsx)(N,{label:"Endpoint",children:(0,a.jsx)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:(0,a.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:[_,"/v1/audio/transcriptions"]})})}),(0,a.jsx)(N,{label:"API Key",children:(0,a.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,$.length-8))}`:(0,a.jsx)("span",{className:"text-text-muted italic",children:"No key configured"})})}),(0,a.jsx)(N,{label:"Audio File",children:(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.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"}),x&&(0,a.jsxs)("span",{className:"text-xs text-text-muted font-mono",children:[x.name," \xb7 ",(x.size/1024).toFixed(1)," KB"]})]})}),p.includes("language")&&(0,a.jsx)(N,{label:"Language",children:(0,a.jsx)("input",{value:b,onChange:e=>f(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"})}),p.includes("prompt")&&(0,a.jsx)(N,{label:"Prompt",children:(0,a.jsx)("input",{value:v,onChange:e=>j(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"})}),p.includes("temperature")&&(0,a.jsx)(N,{label:"Temperature",children:(0,a.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"})}),p.includes("response_format")&&(0,a.jsx)(N,{label:"Response Format",children:(0,a.jsxs)("select",{value:w,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,a.jsx)("option",{value:"json",children:"json"}),(0,a.jsx)("option",{value:"text",children:"text"}),(0,a.jsx)("option",{value:"srt",children:"srt"}),(0,a.jsx)("option",{value:"verbose_json",children:"verbose_json"}),(0,a.jsx)("option",{value:"vtt",children:"vtt"})]})}),(0,a.jsxs)("div",{className:"mt-1",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Request"}),(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsxs)("button",{onClick:()=>F(z),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:D?"check":"content_copy"}),D?"Copied":"Copy"]}),(0,a.jsxs)("button",{onClick:V,disabled:M||!x||!J,className:"flex w-full sm:w-auto items-center justify-center gap-1.5 px-3 py-1 rounded-lg bg-primary text-on-primary text-xs font-medium hover:bg-primary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",style:M?{animation:"spin 1s linear infinite"}:void 0,children:"play_arrow"}),M?"Transcribing...":"Run"]})]})]}),(0,a.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:z})]}),L&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:L}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,a.jsxs)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:["Response ",I&&T&&(0,a.jsxs)("span",{className:"font-normal normal-case",children:["⚡ ",T,"ms"]})]}),I&&(0,a.jsxs)("button",{onClick:()=>q(H),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:U?"check":"content_copy"}),U?"Copied":"Copy"]})]}),(0,a.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:H})]})]})]})}function M(){let{kind:e,id:t}=(0,r.useParams)(),s=(0,r.useRouter)(),o=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&&s.push(`/dashboard/media-providers/${e}`)}catch(e){console.log("Error deleting custom embedding node:",e)}},[p,x]=(0,n.useState)(null),[h,b]=(0,n.useState)(m),[g,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(s=>{e||(x((s.nodes||[]).find(e=>e.id===t)||null),b(!1))}).catch(()=>{e||b(!1)}),()=>{e=!0}},[t,m]),!o)return(0,r.notFound)();let v=c.Q2[t],j=m?p?{id:t,name:p.name||"Custom Embedding",color:"#6366F1",textIcon:"CE"}:null:v;if(!m&&!v||m&&!h&&!p)return(0,r.notFound)();if(m&&h)return(0,a.jsx)("div",{className:"text-text-muted text-sm py-12 text-center",children:"Loading..."});let N=m?["embedding"]:j.serviceKinds??["llm"];return m||N.includes(e)?(0,a.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)(l(),{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,a.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),o.label]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-4",children:[(0,a.jsx)("div",{className:"size-12 rounded-lg flex items-center justify-center shrink-0",style:{backgroundColor:`${j.color}15`},children:(0,a.jsx)(d.A,{src:`/providers/${j.id}.png`,alt:j.name,size:48,className:"object-contain rounded-lg max-w-[48px] max-h-[48px]",fallbackText:j.textIcon||j.id.slice(0,2).toUpperCase(),fallbackColor:j.color})}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2 sm:gap-3",children:[(0,a.jsx)("h1",{className:"text-3xl font-semibold tracking-tight",children:j.name}),!m&&j.notice?.apiKeyUrl&&(0,a.jsxs)("a",{href:j.notice.apiKeyUrl,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline inline-flex items-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),"Get API Key"]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5 mt-1 flex-wrap",children:[m&&(0,a.jsxs)(i.Ex,{variant:"default",size:"sm",children:["Custom \xb7 ",p?.prefix]}),N.map(t=>(0,a.jsx)(i.Ex,{variant:t===e?"primary":"default",size:"sm",children:t.toUpperCase()},t))]})]}),m&&(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsx)(i.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>y(!0),children:"Edit"}),(0,a.jsx)(i.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:u,children:"Delete"})]})]})]}),!m&&j.kindNotice?.[e]&&(0,a.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,a.jsx)("span",{className:"material-symbols-outlined text-[20px] mt-0.5",children:"warning"}),(0,a.jsx)("p",{className:"text-sm",children:j.kindNotice[e]})]}),!m&&j.notice?.text&&!j.deprecated&&(0,a.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,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-blue-500 shrink-0",children:"info"}),(0,a.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-blue-600 dark:text-blue-400",children:j.notice.text}),j.notice.apiKeyUrl&&(0,a.jsx)("a",{href:j.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&&j.noAuth?(0,a.jsx)(i.gw,{providerId:t}):(0,a.jsx)(f,{providerId:t,isOAuth:!1}),"tts"!==e&&"webSearch"!==e&&"webFetch"!==e&&(0,a.jsx)(w,{providerId:t,kindFilter:e,providerAliasOverride:m?p?.prefix:void 0}),!m&&(j.searchConfig||j.fetchConfig||j.ttsConfig||j.sttConfig||j.embeddingConfig||j.searchViaChat)&&(0,a.jsx)(i.Wx,{config:"webFetch"===e?j.fetchConfig:"tts"===e?j.ttsConfig:"stt"===e?j.sttConfig:"embedding"===e?j.embeddingConfig:j.searchConfig||{mode:"chat-completions",defaultModel:j.searchViaChat?.defaultModel,pricingUrl:j.searchViaChat?.pricingUrl,freeTier:j.searchViaChat?.freeTier},provider:j,title:`${o.label} Config`}),"embedding"===e&&(0,a.jsx)(S,{providerId:t,customAlias:p?.prefix}),"tts"===e&&(0,a.jsx)(I,{providerId:t}),"stt"===e&&!m&&(0,a.jsx)(O,{providerId:t}),!m&&k[e]&&(0,a.jsx)(R,{providerId:t,kind:e}),m&&(0,a.jsx)(i.x0,{isOpen:g,node:p,onClose:()=>y(!1),onSaved:e=>{x(e),y(!1)}})]}):(0,r.notFound)()}},50184:(e,t,s)=>{Promise.resolve().then(s.bind(s,41095))},70217:(e,t,s)=>{"use strict";function a(e,t){return!1===e?"default":"active"===t||"success"===t?"success":"error"===t||"expired"===t||"unavailable"===t?"error":"default"}s.d(t,{g:()=>a})}},e=>{e.O(0,[2574,3862,1610,2562,1321,705,5497,8441,3794,7358],()=>e(e.s=50184)),_N_E=e.O()}]);
59
+ }`;return(0,a.jsxs)(i.Zp,{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"Example"}),(0,a.jsxs)("div",{className:"flex flex-col gap-2.5",children:[l.length>0?(0,a.jsx)(N,{label:"Model",children:(0,a.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:l.map(e=>(0,a.jsx)("option",{value:e.id,children:e.name||e.id},e.id))})}):(0,a.jsx)(N,{label:"Model",children:(0,a.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,a.jsx)(N,{label:"Endpoint",children:(0,a.jsx)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:(0,a.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:[_,"/v1/audio/transcriptions"]})})}),(0,a.jsx)(N,{label:"API Key",children:(0,a.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,$.length-8))}`:(0,a.jsx)("span",{className:"text-text-muted italic",children:"No key configured"})})}),(0,a.jsx)(N,{label:"Audio File",children:(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.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"}),x&&(0,a.jsxs)("span",{className:"text-xs text-text-muted font-mono",children:[x.name," \xb7 ",(x.size/1024).toFixed(1)," KB"]})]})}),p.includes("language")&&(0,a.jsx)(N,{label:"Language",children:(0,a.jsx)("input",{value:b,onChange:e=>f(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"})}),p.includes("prompt")&&(0,a.jsx)(N,{label:"Prompt",children:(0,a.jsx)("input",{value:v,onChange:e=>j(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"})}),p.includes("temperature")&&(0,a.jsx)(N,{label:"Temperature",children:(0,a.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"})}),p.includes("response_format")&&(0,a.jsx)(N,{label:"Response Format",children:(0,a.jsxs)("select",{value:w,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,a.jsx)("option",{value:"json",children:"json"}),(0,a.jsx)("option",{value:"text",children:"text"}),(0,a.jsx)("option",{value:"srt",children:"srt"}),(0,a.jsx)("option",{value:"verbose_json",children:"verbose_json"}),(0,a.jsx)("option",{value:"vtt",children:"vtt"})]})}),(0,a.jsxs)("div",{className:"mt-1",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Request"}),(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsxs)("button",{onClick:()=>F(z),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:D?"check":"content_copy"}),D?"Copied":"Copy"]}),(0,a.jsxs)("button",{onClick:V,disabled:M||!x||!J,className:"flex w-full sm:w-auto items-center justify-center gap-1.5 px-3 py-1 rounded-lg bg-primary text-on-primary text-xs font-medium hover:bg-primary/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",style:M?{animation:"spin 1s linear infinite"}:void 0,children:"play_arrow"}),M?"Transcribing...":"Run"]})]})]}),(0,a.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:z})]}),L&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:L}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between mb-1.5",children:[(0,a.jsxs)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:["Response ",I&&T&&(0,a.jsxs)("span",{className:"font-normal normal-case",children:["⚡ ",T,"ms"]})]}),I&&(0,a.jsxs)("button",{onClick:()=>q(H),className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:U?"check":"content_copy"}),U?"Copied":"Copy"]})]}),(0,a.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:H})]})]})]})}function M(){let{kind:e,id:t}=(0,r.useParams)(),s=(0,r.useRouter)(),o=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&&s.push(`/dashboard/media-providers/${e}`)}catch(e){console.log("Error deleting custom embedding node:",e)}},[p,x]=(0,n.useState)(null),[h,b]=(0,n.useState)(m),[g,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(s=>{e||(x((s.nodes||[]).find(e=>e.id===t)||null),b(!1))}).catch(()=>{e||b(!1)}),()=>{e=!0}},[t,m]),!o)return(0,r.notFound)();let v=c.Q2[t],j=m?p?{id:t,name:p.name||"Custom Embedding",color:"#6366F1",textIcon:"CE"}:null:v;if(!m&&!v||m&&!h&&!p)return(0,r.notFound)();if(m&&h)return(0,a.jsx)("div",{className:"text-text-muted text-sm py-12 text-center",children:"Loading..."});let N=m?["embedding"]:j.serviceKinds??["llm"];return m||N.includes(e)?(0,a.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)(l(),{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,a.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),o.label]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-4",children:[(0,a.jsx)("div",{className:"size-12 rounded-lg flex items-center justify-center shrink-0",style:{backgroundColor:`${j.color}15`},children:(0,a.jsx)(d.A,{src:`/providers/${j.id}.png`,alt:j.name,size:48,className:"object-contain rounded-lg max-w-[48px] max-h-[48px]",fallbackText:j.textIcon||j.id.slice(0,2).toUpperCase(),fallbackColor:j.color})}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2 sm:gap-3",children:[(0,a.jsx)("h1",{className:"text-3xl font-semibold tracking-tight",children:j.name}),!m&&j.notice?.apiKeyUrl&&(0,a.jsxs)("a",{href:j.notice.apiKeyUrl,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline inline-flex items-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),"Get API Key"]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5 mt-1 flex-wrap",children:[m&&(0,a.jsxs)(i.Ex,{variant:"default",size:"sm",children:["Custom \xb7 ",p?.prefix]}),N.map(t=>(0,a.jsx)(i.Ex,{variant:t===e?"primary":"default",size:"sm",children:t.toUpperCase()},t))]})]}),m&&(0,a.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,a.jsx)(i.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>y(!0),children:"Edit"}),(0,a.jsx)(i.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:u,children:"Delete"})]})]})]}),!m&&j.kindNotice?.[e]&&(0,a.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,a.jsx)("span",{className:"material-symbols-outlined text-[20px] mt-0.5",children:"warning"}),(0,a.jsx)("p",{className:"text-sm",children:j.kindNotice[e]})]}),!m&&j.notice?.text&&!j.deprecated&&(0,a.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,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-blue-500 shrink-0",children:"info"}),(0,a.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-blue-600 dark:text-blue-400",children:j.notice.text}),j.notice.apiKeyUrl&&(0,a.jsx)("a",{href:j.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&&j.noAuth?(0,a.jsx)(i.gw,{providerId:t}):(0,a.jsx)(f,{providerId:t,isOAuth:!1}),"tts"!==e&&"webSearch"!==e&&"webFetch"!==e&&(0,a.jsx)(w,{providerId:t,kindFilter:e,providerAliasOverride:m?p?.prefix:void 0}),!m&&(j.searchConfig||j.fetchConfig||j.ttsConfig||j.sttConfig||j.embeddingConfig||j.searchViaChat)&&(0,a.jsx)(i.Wx,{config:"webFetch"===e?j.fetchConfig:"tts"===e?j.ttsConfig:"stt"===e?j.sttConfig:"embedding"===e?j.embeddingConfig:j.searchConfig||{mode:"chat-completions",defaultModel:j.searchViaChat?.defaultModel,pricingUrl:j.searchViaChat?.pricingUrl,freeTier:j.searchViaChat?.freeTier},provider:j,title:`${o.label} Config`}),"embedding"===e&&(0,a.jsx)(S,{providerId:t,customAlias:p?.prefix}),"tts"===e&&(0,a.jsx)(I,{providerId:t}),"stt"===e&&!m&&(0,a.jsx)(O,{providerId:t}),!m&&k[e]&&(0,a.jsx)(R,{providerId:t,kind:e}),m&&(0,a.jsx)(i.x0,{isOpen:g,node:p,onClose:()=>y(!1),onSaved:e=>{x(e),y(!1)}})]}):(0,r.notFound)()}},70217:(e,t,s)=>{"use strict";function a(e,t){return!1===e?"default":"active"===t||"success"===t?"success":"error"===t||"expired"===t||"unavailable"===t?"error":"default"}s.d(t,{g:()=>a})}},e=>{e.O(0,[2574,3862,1610,2562,1321,705,5497,8441,3794,7358],()=>e(e.s=17845)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6620],{16144:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>f});var r=t(95155),a=t(73321),i=t(98500),n=t.n(i),d=t(12115),o=t(35497),l=t(57250),c=t(88105),m=t(54026);let x=new Set([]),h={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 b({provider:e,kind:s,connections:t,isCustom:a,onToggle:i}){let d=c.Q2[e.id],m=!!d?.noAuth,x=t.filter(s=>s.provider===e.id),h=x.filter(e=>{let s=p(e);return"active"===s||"success"===s}).length,u=x.filter(e=>{let s=p(e);return"error"===s||"expired"===s||"unavailable"===s}).length,f=x.length,g=f>0&&x.every(e=>!1===e.isActive);return(0,r.jsx)(n(),{href:`/dashboard/media-providers/${s}/${e.id}`,className:"group",children:(0,r.jsx)(o.Zp,{padding:"xs",className:`h-full hover:bg-black/[0.01] dark:hover:bg-white/[0.01] transition-colors cursor-pointer ${g?"opacity-50":""}`,children:(0,r.jsxs)("div",{className:"flex min-w-0 items-center justify-between gap-3",children:[(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,r.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,r.jsx)(l.A,{src:`/providers/${e.id}.png`,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,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("h3",{className:"font-semibold text-sm",children:e.name}),(0,r.jsxs)("div",{className:"flex items-center gap-2 mt-0.5 flex-wrap",children:[a&&(0,r.jsx)(o.Ex,{variant:"default",size:"sm",children:"Custom"}),m?(0,r.jsx)(o.Ex,{variant:"success",size:"sm",children:"Ready"}):g?(0,r.jsx)(o.Ex,{variant:"default",size:"sm",children:"Disabled"}):0===f?(0,r.jsx)("span",{className:"text-xs text-text-muted",children:"No connections"}):(0,r.jsxs)(r.Fragment,{children:[h>0&&(0,r.jsxs)(o.Ex,{variant:"success",size:"sm",dot:!0,children:[h," Connected"]}),u>0&&(0,r.jsxs)(o.Ex,{variant:"error",size:"sm",dot:!0,children:[u," Error"]}),0===h&&0===u&&(0,r.jsxs)(o.Ex,{variant:"default",size:"sm",children:[f," Added"]})]})]})]})]}),f>0&&(0,r.jsx)("div",{className:"shrink-0 opacity-100 transition-opacity sm:opacity-0 sm:group-hover:opacity-100",onClick:s=>{s.preventDefault(),s.stopPropagation(),i&&i(e.id,g)},children:(0,r.jsx)(o.lM,{size:"sm",checked:!g,onChange:()=>{},title:g?"Enable provider":"Disable provider"})})]})})})}function u({combos:e}){return 0===e.length?null:(0,r.jsx)("div",{className:"flex flex-col gap-2",children:e.map(e=>(0,r.jsx)(n(),{href:`/dashboard/media-providers/combo/${e.id}`,children:(0,r.jsx)(o.Zp,{padding:"xs",className:"hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors cursor-pointer",children:(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary text-[18px]",children:"layers"}),(0,r.jsx)("code",{className:"text-sm font-mono font-medium flex-1 truncate",children:e.name}),(0,r.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]:"",a=c.Q2[t];return(0,r.jsx)("div",{title:a?.name||e,className:"size-5 rounded flex items-center justify-center",style:{backgroundColor:`${a?.color??"#888"}15`},children:(0,r.jsx)(l.A,{src:`/providers/${t}.png`,alt:a?.name||t,size:18,className:"object-contain rounded max-w-[18px] max-h-[18px]",fallbackText:a?.textIcon||t.slice(0,2).toUpperCase(),fallbackColor:a?.color})},`${e}-${s}`)}),e.models.length>6&&(0,r.jsxs)("span",{className:"text-[10px] text-text-muted ml-1",children:["+",e.models.length-6]})]}),(0,r.jsx)("span",{className:"text-[11px] text-text-muted shrink-0",children:e.models.length}),(0,r.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[16px]",children:"chevron_right"})]})})},e.id))})}function f(){let{kind:e}=(0,a.useParams)(),s=(0,a.useRouter)(),[t,i]=(0,d.useState)([]),[n,l]=(0,d.useState)([]),[p,f]=(0,d.useState)([]),[g,v]=(0,d.useState)(!1);(0,d.useEffect)(()=>{("webSearch"===e||"webFetch"===e)&&s.replace("/dashboard/media-providers/web")},[e,s]);let j=c.rj.find(s=>s.id===e),N="embedding"===e,y=x.has(e);if((0,d.useEffect)(()=>{j&&(fetch("/api/providers",{cache:"no-store"}).then(e=>e.json()).then(e=>i(e.connections||[])).catch(()=>{}),N&&fetch("/api/provider-nodes",{cache:"no-store"}).then(e=>e.json()).then(e=>l((e.nodes||[]).filter(e=>"custom-embedding"===e.type))).catch(()=>{}),y&&fetch("/api/combos",{cache:"no-store"}).then(e=>e.json()).then(e=>f(e.combos||[])).catch(()=>{}))},[N,y,j]),!j)return(0,a.notFound)();let k=(0,c.o5)(e),w=p.filter(s=>s.kind===e),C=n.map(e=>({id:e.id,name:e.name||"Custom Embedding",color:"#6366F1",textIcon:"CE"})),$=[...k,...C],E=async(e,s)=>{let r=t.filter(s=>s.provider===e);i(t=>t.map(t=>t.provider===e?{...t,isActive:s}:t)),await Promise.allSettled(r.map(e=>fetch(`/api/providers/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:s})})))},S=async()=>{let t=h[e]||`${e}-combo`,r=t,a=1,i=new Set(p.map(e=>e.name));for(;i.has(r);)r=`${t}-${a++}`;let n=await fetch("/api/combos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:r,models:[],kind:e})});if(n.ok){let e=await n.json();s.push(`/dashboard/media-providers/combo/${e.id}`)}else alert((await n.json()).error||"Failed to create combo")};return(0,r.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,r.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,r.jsx)("h1",{className:"text-[17px] font-semibold text-text-main",children:j.label}),(0,r.jsx)("p",{className:"text-xs font-mono text-text-subtle",children:"Media providers \xb7 not agent Skills"})]}),(0,r.jsx)(m.A,{activeKind:e}),(N||y)&&(0,r.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[y&&(0,r.jsx)(o.$n,{size:"sm",icon:"add",onClick:S,children:"Create Combo"}),N&&(0,r.jsx)(o.$n,{size:"sm",icon:"add",onClick:()=>v(!0),children:"Add Custom Embedding"})]}),y&&w.length>0&&(0,r.jsx)(u,{combos:w}),0===$.length?(0,r.jsxs)("div",{className:"text-center py-12 border border-dashed border-border rounded-xl text-text-muted text-sm",children:["No providers support ",(0,r.jsx)("strong",{children:j.label})," yet."]}):(0,r.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:[k.map(s=>(0,r.jsx)(b,{provider:s,kind:e,connections:t,onToggle:E},s.id)),C.map(s=>(0,r.jsx)(b,{provider:s,kind:e,connections:t,isCustom:!0,onToggle:E},s.id))]}),N&&(0,r.jsx)(o.x0,{isOpen:g,onClose:()=>v(!1),onCreated:e=>{l(s=>[...s,e]),v(!1)}})]})}},22878:(e,s,t)=>{Promise.resolve().then(t.bind(t,16144))},54026:(e,s,t)=>{"use strict";t.d(s,{A:()=>l});var r=t(95155),a=t(98500),i=t.n(a),n=t(73321),d=t(31474);let o=[{id:"image",label:"Image",href:"/dashboard/media-providers/image"},{id:"tts",label:"TTS",href:"/dashboard/media-providers/tts"},{id:"stt",label:"STT",href:"/dashboard/media-providers/stt"},{id:"embedding",label:"Embedding",href:"/dashboard/media-providers/embedding"},{id:"web",label:"Web",href:"/dashboard/media-providers/web"}];function l({activeKind:e}){let s=(0,n.usePathname)(),t=e||o.find(e=>s===e.href||s.startsWith(`${e.href}/`))?.id||"";return(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5 mb-5",children:[(0,r.jsx)(i(),{href:"/dashboard/media-providers",className:(0,d.cn)("px-2.5 py-1 rounded-[7px] text-xs font-medium border transition-colors","/dashboard/media-providers"===s?"bg-brand-500/15 text-primary border-brand-500/40":"bg-transparent text-text-muted border-border hover:text-text-main hover:border-brand-500/30"),children:"All"}),o.map(e=>{let s=t===e.id;return(0,r.jsx)(i(),{href:e.href,className:(0,d.cn)("px-2.5 py-1 rounded-[7px] text-xs font-medium border transition-colors",s?"bg-brand-500/15 text-primary border-brand-500/40":"bg-transparent text-text-muted border-border hover:text-text-main hover:border-brand-500/30"),children:e.label},e.id)})]})}}},e=>{e.O(0,[2574,3862,1610,2562,1321,705,5497,8441,3794,7358],()=>e(e.s=22878)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6620],{16144:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>f});var r=t(95155),a=t(73321),i=t(98500),n=t.n(i),d=t(12115),o=t(35497),l=t(57250),c=t(88105),m=t(54026);let x=new Set([]),h={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 b({provider:e,kind:s,connections:t,isCustom:a,onToggle:i}){let d=c.Q2[e.id],m=!!d?.noAuth,x=t.filter(s=>s.provider===e.id),h=x.filter(e=>{let s=p(e);return"active"===s||"success"===s}).length,u=x.filter(e=>{let s=p(e);return"error"===s||"expired"===s||"unavailable"===s}).length,f=x.length,g=f>0&&x.every(e=>!1===e.isActive);return(0,r.jsx)(n(),{href:`/dashboard/media-providers/${s}/${e.id}`,className:"group",children:(0,r.jsx)(o.Zp,{padding:"xs",className:`h-full hover:bg-black/[0.01] dark:hover:bg-white/[0.01] transition-colors cursor-pointer ${g?"opacity-50":""}`,children:(0,r.jsxs)("div",{className:"flex min-w-0 items-center justify-between gap-3",children:[(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,r.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,r.jsx)(l.A,{src:`/providers/${e.id}.png`,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,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("h3",{className:"font-semibold text-sm",children:e.name}),(0,r.jsxs)("div",{className:"flex items-center gap-2 mt-0.5 flex-wrap",children:[a&&(0,r.jsx)(o.Ex,{variant:"default",size:"sm",children:"Custom"}),m?(0,r.jsx)(o.Ex,{variant:"success",size:"sm",children:"Ready"}):g?(0,r.jsx)(o.Ex,{variant:"default",size:"sm",children:"Disabled"}):0===f?(0,r.jsx)("span",{className:"text-xs text-text-muted",children:"No connections"}):(0,r.jsxs)(r.Fragment,{children:[h>0&&(0,r.jsxs)(o.Ex,{variant:"success",size:"sm",dot:!0,children:[h," Connected"]}),u>0&&(0,r.jsxs)(o.Ex,{variant:"error",size:"sm",dot:!0,children:[u," Error"]}),0===h&&0===u&&(0,r.jsxs)(o.Ex,{variant:"default",size:"sm",children:[f," Added"]})]})]})]})]}),f>0&&(0,r.jsx)("div",{className:"shrink-0 opacity-100 transition-opacity sm:opacity-0 sm:group-hover:opacity-100",onClick:s=>{s.preventDefault(),s.stopPropagation(),i&&i(e.id,g)},children:(0,r.jsx)(o.lM,{size:"sm",checked:!g,onChange:()=>{},title:g?"Enable provider":"Disable provider"})})]})})})}function u({combos:e}){return 0===e.length?null:(0,r.jsx)("div",{className:"flex flex-col gap-2",children:e.map(e=>(0,r.jsx)(n(),{href:`/dashboard/media-providers/combo/${e.id}`,children:(0,r.jsx)(o.Zp,{padding:"xs",className:"hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors cursor-pointer",children:(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary text-[18px]",children:"layers"}),(0,r.jsx)("code",{className:"text-sm font-mono font-medium flex-1 truncate",children:e.name}),(0,r.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]:"",a=c.Q2[t];return(0,r.jsx)("div",{title:a?.name||e,className:"size-5 rounded flex items-center justify-center",style:{backgroundColor:`${a?.color??"#888"}15`},children:(0,r.jsx)(l.A,{src:`/providers/${t}.png`,alt:a?.name||t,size:18,className:"object-contain rounded max-w-[18px] max-h-[18px]",fallbackText:a?.textIcon||t.slice(0,2).toUpperCase(),fallbackColor:a?.color})},`${e}-${s}`)}),e.models.length>6&&(0,r.jsxs)("span",{className:"text-[10px] text-text-muted ml-1",children:["+",e.models.length-6]})]}),(0,r.jsx)("span",{className:"text-[11px] text-text-muted shrink-0",children:e.models.length}),(0,r.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[16px]",children:"chevron_right"})]})})},e.id))})}function f(){let{kind:e}=(0,a.useParams)(),s=(0,a.useRouter)(),[t,i]=(0,d.useState)([]),[n,l]=(0,d.useState)([]),[p,f]=(0,d.useState)([]),[g,v]=(0,d.useState)(!1);(0,d.useEffect)(()=>{("webSearch"===e||"webFetch"===e)&&s.replace("/dashboard/media-providers/web")},[e,s]);let j=c.rj.find(s=>s.id===e),N="embedding"===e,y=x.has(e);if((0,d.useEffect)(()=>{j&&(fetch("/api/providers",{cache:"no-store"}).then(e=>e.json()).then(e=>i(e.connections||[])).catch(()=>{}),N&&fetch("/api/provider-nodes",{cache:"no-store"}).then(e=>e.json()).then(e=>l((e.nodes||[]).filter(e=>"custom-embedding"===e.type))).catch(()=>{}),y&&fetch("/api/combos",{cache:"no-store"}).then(e=>e.json()).then(e=>f(e.combos||[])).catch(()=>{}))},[N,y,j]),!j)return(0,a.notFound)();let k=(0,c.o5)(e),w=p.filter(s=>s.kind===e),C=n.map(e=>({id:e.id,name:e.name||"Custom Embedding",color:"#6366F1",textIcon:"CE"})),$=[...k,...C],E=async(e,s)=>{let r=t.filter(s=>s.provider===e);i(t=>t.map(t=>t.provider===e?{...t,isActive:s}:t)),await Promise.allSettled(r.map(e=>fetch(`/api/providers/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:s})})))},S=async()=>{let t=h[e]||`${e}-combo`,r=t,a=1,i=new Set(p.map(e=>e.name));for(;i.has(r);)r=`${t}-${a++}`;let n=await fetch("/api/combos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:r,models:[],kind:e})});if(n.ok){let e=await n.json();s.push(`/dashboard/media-providers/combo/${e.id}`)}else alert((await n.json()).error||"Failed to create combo")};return(0,r.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,r.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,r.jsx)("h1",{className:"text-[17px] font-semibold text-text-main",children:j.label}),(0,r.jsx)("p",{className:"text-xs font-mono text-text-subtle",children:"Media providers \xb7 not agent Skills"})]}),(0,r.jsx)(m.A,{activeKind:e}),(N||y)&&(0,r.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[y&&(0,r.jsx)(o.$n,{size:"sm",icon:"add",onClick:S,children:"Create Combo"}),N&&(0,r.jsx)(o.$n,{size:"sm",icon:"add",onClick:()=>v(!0),children:"Add Custom Embedding"})]}),y&&w.length>0&&(0,r.jsx)(u,{combos:w}),0===$.length?(0,r.jsxs)("div",{className:"text-center py-12 border border-dashed border-border rounded-xl text-text-muted text-sm",children:["No providers support ",(0,r.jsx)("strong",{children:j.label})," yet."]}):(0,r.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:[k.map(s=>(0,r.jsx)(b,{provider:s,kind:e,connections:t,onToggle:E},s.id)),C.map(s=>(0,r.jsx)(b,{provider:s,kind:e,connections:t,isCustom:!0,onToggle:E},s.id))]}),N&&(0,r.jsx)(o.x0,{isOpen:g,onClose:()=>v(!1),onCreated:e=>{l(s=>[...s,e]),v(!1)}})]})}},54026:(e,s,t)=>{"use strict";t.d(s,{A:()=>l});var r=t(95155),a=t(98500),i=t.n(a),n=t(73321),d=t(31474);let o=[{id:"image",label:"Image",href:"/dashboard/media-providers/image"},{id:"tts",label:"TTS",href:"/dashboard/media-providers/tts"},{id:"stt",label:"STT",href:"/dashboard/media-providers/stt"},{id:"embedding",label:"Embedding",href:"/dashboard/media-providers/embedding"},{id:"web",label:"Web",href:"/dashboard/media-providers/web"}];function l({activeKind:e}){let s=(0,n.usePathname)(),t=e||o.find(e=>s===e.href||s.startsWith(`${e.href}/`))?.id||"";return(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5 mb-5",children:[(0,r.jsx)(i(),{href:"/dashboard/media-providers",className:(0,d.cn)("px-2.5 py-1 rounded-[7px] text-xs font-medium border transition-colors","/dashboard/media-providers"===s?"bg-brand-500/15 text-primary border-brand-500/40":"bg-transparent text-text-muted border-border hover:text-text-main hover:border-brand-500/30"),children:"All"}),o.map(e=>{let s=t===e.id;return(0,r.jsx)(i(),{href:e.href,className:(0,d.cn)("px-2.5 py-1 rounded-[7px] text-xs font-medium border transition-colors",s?"bg-brand-500/15 text-primary border-brand-500/40":"bg-transparent text-text-muted border-border hover:text-text-main hover:border-brand-500/30"),children:e.label},e.id)})]})}},61493:(e,s,t)=>{Promise.resolve().then(t.bind(t,16144))}},e=>{e.O(0,[2574,3862,1610,2562,1321,705,5497,8441,3794,7358],()=>e(e.s=61493)),_N_E=e.O()}]);
@@ -1,4 +1,4 @@
1
1
  (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8334],{22662:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>b});var a=s(95155),l=s(73321),r=s(12115),i=s(98500),n=s.n(i),o=s(35497),c=s(57250),d=s(88105);let m=/^[a-zA-Z0-9_.\-]+$/,x={webSearch:"Web Search",webFetch:"Web Fetch",image:"Text to Image",tts:"Text To Speech"},h={webSearch:"/v1/search",webFetch:"/v1/web/fetch",image:"/v1/images/generations",tts:"/v1/audio/speech"},u={webSearch:e=>({model:e,query:"What is the latest news about AI?",search_type:"web",max_results:5}),webFetch:e=>({model:e,url:"https://example.com",format:"markdown"}),image:e=>({model:e,prompt:"A cute cat playing piano",n:1,size:"1024x1024"}),tts:e=>({model:e,input:"Hello, this is a test.",voice:"alloy"})};function p(e){return"webSearch"===e||"webFetch"===e?"/dashboard/media-providers/web":`/dashboard/media-providers/${e}`}function b(){let{id:e}=(0,l.useParams)(),t=(0,l.useRouter)(),[s,i]=(0,r.useState)(null),[b,f]=(0,r.useState)(!0),[j,g]=(0,r.useState)(""),[w,y]=(0,r.useState)(""),[v,N]=(0,r.useState)([]),[k,S]=(0,r.useState)(!1),[U,$]=(0,r.useState)(!1),[C,O]=(0,r.useState)([]),[_,T]=(0,r.useState)(!1),[R,A]=(0,r.useState)(null),[L,P]=(0,r.useState)(""),[E,z]=(0,r.useState)(""),[D,F]=(0,r.useState)([]),[M,I]=(0,r.useState)({}),J=async()=>{try{let[t,s,a,l,r,n]=await Promise.all([fetch(`/api/combos/${e}`,{cache:"no-store"}),fetch("/api/settings",{cache:"no-store"}),fetch("/api/usage/logs",{cache:"no-store"}),fetch("/api/keys",{cache:"no-store"}),fetch("/api/providers",{cache:"no-store"}),fetch("/api/models/alias",{cache:"no-store"})]);if(n.ok&&I((await n.json()).aliases||{}),l.ok){let e=await l.json();z((e.keys||[]).find(e=>!1!==e.isActive)?.key||"")}if(r.ok&&F((await r.json()).connections||[]),!t.ok){i(null),f(!1);return}let o=await t.json();i(o),g(o.name),N(o.models||[]);let c=s.ok?await s.json():{};S(c.comboStrategies?.[o.name]?.fallbackStrategy==="round-robin");let d=a.ok?await a.json():[];O(d.filter(e=>"string"==typeof e&&e.includes(o.name)).slice(0,50))}catch{}f(!1)};(0,r.useEffect)(()=>{J()},[e]);let W=e=>e.trim()?m.test(e)?(y(""),!0):(y("Only letters, numbers, -, _ and ."),!1):(y("Name is required"),!1),H=async t=>{let s=await fetch(`/api/combos/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});return!!s.ok||(alert((await s.json()).error||"Failed to save"),!1)},Z=async()=>{!W(j)||j===s.name||await H({name:j})&&await J()},q=async e=>{let t=e?.value||e;if(!t||v.includes(t))return;let s=[...v,t];N(s),await H({models:s})},B=async e=>{let t=e?.value||e;if(!t||!v.includes(t))return;let s=v.filter(e=>e!==t);N(s),await H({models:s})},Y=async e=>{let t=v.filter((t,s)=>s!==e);N(t),await H({models:t})},G=async(e,t)=>{let s=[...v],a=e+t;a<0||a>=s.length||([s[e],s[a]]=[s[a],s[e]],N(s),await H({models:s}))},K=async e=>{S(e);let t=await fetch("/api/settings",{cache:"no-store"}),a={...(t.ok?await t.json():{}).comboStrategies||{}};e?a[s.name]={fallbackStrategy:"round-robin"}:delete a[s.name],await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStrategies:a})})},Q=async()=>{!confirm(`Delete combo "${s.name}"?`)||(await fetch(`/api/combos/${e}`,{method:"DELETE"})).ok&&t.push(p(s.kind))},V=async()=>{if(T(!0),A(null),P(""),R?.audioUrl)try{URL.revokeObjectURL(R.audioUrl)}catch{}if(R?.imageUrl?.startsWith("blob:"))try{URL.revokeObjectURL(R.imageUrl)}catch{}let e=Date.now();try{let t=h[s.kind],a=u[s.kind](s.name),l={"Content-Type":"application/json"};E&&(l.Authorization=`Bearer ${E}`);let r=await fetch(`/api${t}`,{method:"POST",headers:l,body:JSON.stringify(a)}),i=Date.now()-e;if(!r.ok){let e=await r.json().catch(()=>({}));P(e?.error?.message||e?.error||`HTTP ${r.status}`),A({json:JSON.stringify(e,null,2),latencyMs:i});return}let n=r.headers.get("content-type")||"";if(n.startsWith("image/")){let e=await r.blob();A({imageUrl:URL.createObjectURL(e),latencyMs:i});return}if(n.startsWith("audio/")||"application/octet-stream"===n){let e=await r.blob();A({audioUrl:URL.createObjectURL(e),latencyMs:i});return}let o=await r.json(),c=o?.data?.[0],d=c?.b64_json?`data:image/png;base64,${c.b64_json}`:c?.url||"";A({json:JSON.stringify(function e(t){if(!t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(e);let s={};for(let[a,l]of Object.entries(t))s[a]="b64_json"===a&&"string"==typeof l&&l.length>100?`<${l.length} chars base64>`:e(l);return s}(o),null,2),imageUrl:d,latencyMs:i})}catch(e){P(e.message||"Network error")}T(!1)};if(b)return(0,a.jsx)("div",{className:"text-text-muted text-sm",children:"Loading..."});if(!s)return(0,l.notFound)();let X=x[s.kind]||d.rj.find(e=>e.id===s.kind)?.label||"Combo",ee=h[s.kind],et=s.kind&&u[s.kind]?u[s.kind](s.name):null,es=ee?`curl -X POST http://localhost:20128${ee} \\
2
2
  -H "Content-Type: application/json" \\
3
3
  -H "Authorization: Bearer ${E||"YOUR_KEY"}" \\
4
- -d '${JSON.stringify(et)}'`:"",ea=p(s.kind);return(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 min-w-0",children:[(0,a.jsx)(n(),{href:ea,className:"text-text-muted hover:text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined",children:"arrow_back"})}),(0,a.jsx)("div",{className:"size-10 rounded-lg bg-primary/10 flex items-center justify-center",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-primary",children:"layers"})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:[X," Combo"]}),(0,a.jsx)("code",{className:"text-lg font-semibold font-mono",children:s.name})]})]}),(0,a.jsx)(o.$n,{variant:"outline",icon:"delete",onClick:Q,className:"text-red-500 border-red-200 hover:bg-red-50",children:"Delete"})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold mb-3",children:"Settings"}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(o.pd,{label:"Combo Name",value:j,onChange:e=>{g(e.target.value),W(e.target.value)},onBlur:Z,error:w}),(0,a.jsx)("p",{className:"text-[10px] text-text-muted mt-0.5",children:"Only letters, numbers, -, _ and ."})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:"Round Robin"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Rotate providers across requests instead of strict fallback order."})]}),(0,a.jsx)(o.lM,{checked:k,onChange:K})]})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Providers"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Tried in order (top-down) or rotated when round-robin is on."})]}),(0,a.jsx)(o.$n,{size:"sm",icon:"add",onClick:()=>$(!0),children:"Add Provider"})]}),0===v.length?(0,a.jsx)("div",{className:"text-center py-6 border border-dashed border-border rounded-lg text-text-muted text-sm",children:"No providers yet."}):(0,a.jsx)("div",{className:"flex flex-col gap-2",children:v.map((e,t)=>{let{providerId:s,model:l}=function(e){if("string"!=typeof e)return{providerId:"",model:""};let t=e.indexOf("/");return t<0?{providerId:e,model:""}:{providerId:e.slice(0,t),model:e.slice(t+1)}}(e),r=d.Q2[s];return(0,a.jsxs)("div",{className:"flex items-center gap-3 p-2 rounded-lg bg-black/[0.02] dark:bg-white/[0.02]",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted w-5 text-center",children:t+1}),(0,a.jsx)(c.A,{src:`/providers/${s}.png`,alt:r?.name||s,size:24,className:"object-contain rounded shrink-0",fallbackText:r?.textIcon||s.slice(0,2).toUpperCase(),fallbackColor:r?.color}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("div",{className:"text-sm font-medium truncate",children:r?.name||s}),l&&(0,a.jsx)("code",{className:"text-[10px] text-text-muted font-mono truncate block",children:l})]}),(0,a.jsxs)("div",{className:"flex items-center gap-0.5",children:[(0,a.jsx)("button",{onClick:()=>G(t,-1),disabled:0===t,className:`p-1 rounded ${0===t?"text-text-muted/20":"text-text-muted hover:text-primary hover:bg-black/5"}`,title:"Move up",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"arrow_upward"})}),(0,a.jsx)("button",{onClick:()=>G(t,1),disabled:t===v.length-1,className:`p-1 rounded ${t===v.length-1?"text-text-muted/20":"text-text-muted hover:text-primary hover:bg-black/5"}`,title:"Move down",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"arrow_downward"})}),(0,a.jsx)("button",{onClick:()=>Y(t),className:"p-1 rounded text-text-muted hover:text-red-500 hover:bg-red-500/10",title:"Remove",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"close"})})]})]},`${e}-${t}`)})})]}),s.kind&&ee&&(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-3",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Test Example"}),(0,a.jsx)(o.$n,{size:"sm",icon:"play_arrow",onClick:V,disabled:_||0===v.length,children:_?"Running...":"Run"})]}),(0,a.jsx)("pre",{className:"text-xs font-mono bg-black/[0.03] dark:bg-white/[0.03] p-3 rounded-lg overflow-x-auto whitespace-pre-wrap break-all",children:es}),L&&(0,a.jsx)("p",{className:"mt-3 text-xs text-red-500 break-words",children:L}),R&&(0,a.jsxs)("div",{className:"mt-3 flex flex-col gap-3",children:[null!=R.latencyMs&&(0,a.jsxs)("span",{className:"text-[11px] text-text-muted",children:["⚡ ",R.latencyMs,"ms"]}),R.imageUrl&&(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"flex items-center justify-end mb-1.5",children:(0,a.jsxs)("a",{href:R.imageUrl,download:"image.png",className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"download"}),"Download"]})}),(0,a.jsx)("img",{src:R.imageUrl,alt:"Generated",className:"max-w-full rounded-lg border border-border"})]}),R.audioUrl&&(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"flex items-center justify-end mb-1.5",children:(0,a.jsxs)("a",{href:R.audioUrl,download:"speech.mp3",className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"download"}),"Download"]})}),(0,a.jsx)("audio",{controls:!0,src:R.audioUrl,className:"w-full"})]}),R.json&&(0,a.jsx)("pre",{className:"text-xs font-mono bg-black/[0.03] dark:bg-white/[0.03] p-3 rounded-lg overflow-auto max-h-[300px] whitespace-pre-wrap break-all",children:R.json})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold mb-3",children:"Usage Logs"}),0===C.length?(0,a.jsx)("p",{className:"text-xs text-text-muted italic",children:"No usage yet."}):(0,a.jsx)("pre",{className:"text-[11px] font-mono bg-black/[0.03] dark:bg-white/[0.03] p-3 rounded-lg overflow-auto max-h-[400px] whitespace-pre-wrap",children:C.join("\n")})]}),(0,a.jsx)(o.rq,{isOpen:U,onClose:()=>$(!1),onSelect:q,onDeselect:B,activeProviders:D,modelAliases:M,title:`Add ${X} Model`,kindFilter:s.kind,addedModelValues:v,closeOnSelect:!1})]})}},46258:(e,t,s)=>{Promise.resolve().then(s.bind(s,22662))}},e=>{e.O(0,[2574,3862,1610,2562,1321,705,5497,8441,3794,7358],()=>e(e.s=46258)),_N_E=e.O()}]);
4
+ -d '${JSON.stringify(et)}'`:"",ea=p(s.kind);return(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 min-w-0",children:[(0,a.jsx)(n(),{href:ea,className:"text-text-muted hover:text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined",children:"arrow_back"})}),(0,a.jsx)("div",{className:"size-10 rounded-lg bg-primary/10 flex items-center justify-center",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-primary",children:"layers"})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:[X," Combo"]}),(0,a.jsx)("code",{className:"text-lg font-semibold font-mono",children:s.name})]})]}),(0,a.jsx)(o.$n,{variant:"outline",icon:"delete",onClick:Q,className:"text-red-500 border-red-200 hover:bg-red-50",children:"Delete"})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold mb-3",children:"Settings"}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(o.pd,{label:"Combo Name",value:j,onChange:e=>{g(e.target.value),W(e.target.value)},onBlur:Z,error:w}),(0,a.jsx)("p",{className:"text-[10px] text-text-muted mt-0.5",children:"Only letters, numbers, -, _ and ."})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:"Round Robin"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Rotate providers across requests instead of strict fallback order."})]}),(0,a.jsx)(o.lM,{checked:k,onChange:K})]})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Providers"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Tried in order (top-down) or rotated when round-robin is on."})]}),(0,a.jsx)(o.$n,{size:"sm",icon:"add",onClick:()=>$(!0),children:"Add Provider"})]}),0===v.length?(0,a.jsx)("div",{className:"text-center py-6 border border-dashed border-border rounded-lg text-text-muted text-sm",children:"No providers yet."}):(0,a.jsx)("div",{className:"flex flex-col gap-2",children:v.map((e,t)=>{let{providerId:s,model:l}=function(e){if("string"!=typeof e)return{providerId:"",model:""};let t=e.indexOf("/");return t<0?{providerId:e,model:""}:{providerId:e.slice(0,t),model:e.slice(t+1)}}(e),r=d.Q2[s];return(0,a.jsxs)("div",{className:"flex items-center gap-3 p-2 rounded-lg bg-black/[0.02] dark:bg-white/[0.02]",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted w-5 text-center",children:t+1}),(0,a.jsx)(c.A,{src:`/providers/${s}.png`,alt:r?.name||s,size:24,className:"object-contain rounded shrink-0",fallbackText:r?.textIcon||s.slice(0,2).toUpperCase(),fallbackColor:r?.color}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("div",{className:"text-sm font-medium truncate",children:r?.name||s}),l&&(0,a.jsx)("code",{className:"text-[10px] text-text-muted font-mono truncate block",children:l})]}),(0,a.jsxs)("div",{className:"flex items-center gap-0.5",children:[(0,a.jsx)("button",{onClick:()=>G(t,-1),disabled:0===t,className:`p-1 rounded ${0===t?"text-text-muted/20":"text-text-muted hover:text-primary hover:bg-black/5"}`,title:"Move up",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"arrow_upward"})}),(0,a.jsx)("button",{onClick:()=>G(t,1),disabled:t===v.length-1,className:`p-1 rounded ${t===v.length-1?"text-text-muted/20":"text-text-muted hover:text-primary hover:bg-black/5"}`,title:"Move down",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"arrow_downward"})}),(0,a.jsx)("button",{onClick:()=>Y(t),className:"p-1 rounded text-text-muted hover:text-red-500 hover:bg-red-500/10",title:"Remove",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"close"})})]})]},`${e}-${t}`)})})]}),s.kind&&ee&&(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-3",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Test Example"}),(0,a.jsx)(o.$n,{size:"sm",icon:"play_arrow",onClick:V,disabled:_||0===v.length,children:_?"Running...":"Run"})]}),(0,a.jsx)("pre",{className:"text-xs font-mono bg-black/[0.03] dark:bg-white/[0.03] p-3 rounded-lg overflow-x-auto whitespace-pre-wrap break-all",children:es}),L&&(0,a.jsx)("p",{className:"mt-3 text-xs text-red-500 break-words",children:L}),R&&(0,a.jsxs)("div",{className:"mt-3 flex flex-col gap-3",children:[null!=R.latencyMs&&(0,a.jsxs)("span",{className:"text-[11px] text-text-muted",children:["⚡ ",R.latencyMs,"ms"]}),R.imageUrl&&(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"flex items-center justify-end mb-1.5",children:(0,a.jsxs)("a",{href:R.imageUrl,download:"image.png",className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"download"}),"Download"]})}),(0,a.jsx)("img",{src:R.imageUrl,alt:"Generated",className:"max-w-full rounded-lg border border-border"})]}),R.audioUrl&&(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"flex items-center justify-end mb-1.5",children:(0,a.jsxs)("a",{href:R.audioUrl,download:"speech.mp3",className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"download"}),"Download"]})}),(0,a.jsx)("audio",{controls:!0,src:R.audioUrl,className:"w-full"})]}),R.json&&(0,a.jsx)("pre",{className:"text-xs font-mono bg-black/[0.03] dark:bg-white/[0.03] p-3 rounded-lg overflow-auto max-h-[300px] whitespace-pre-wrap break-all",children:R.json})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold mb-3",children:"Usage Logs"}),0===C.length?(0,a.jsx)("p",{className:"text-xs text-text-muted italic",children:"No usage yet."}):(0,a.jsx)("pre",{className:"text-[11px] font-mono bg-black/[0.03] dark:bg-white/[0.03] p-3 rounded-lg overflow-auto max-h-[400px] whitespace-pre-wrap",children:C.join("\n")})]}),(0,a.jsx)(o.rq,{isOpen:U,onClose:()=>$(!1),onSelect:q,onDeselect:B,activeProviders:D,modelAliases:M,title:`Add ${X} Model`,kindFilter:s.kind,addedModelValues:v,closeOnSelect:!1})]})}},69701:(e,t,s)=>{Promise.resolve().then(s.bind(s,22662))}},e=>{e.O(0,[2574,3862,1610,2562,1321,705,5497,8441,3794,7358],()=>e(e.s=69701)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9749],{57767:(e,s,i)=>{"use strict";i.r(s),i.d(s,{default:()=>c});var r=i(95155),t=i(98500),l=i.n(t),a=i(35497),d=i(88105);let n=[{id:"image",label:"Text to Image",icon:"brush",blurb:"Image generation providers"},{id:"tts",label:"Text to Speech",icon:"record_voice_over",blurb:"Speech synthesis providers"},{id:"stt",label:"Speech to Text",icon:"mic",blurb:"Transcription providers"},{id:"embedding",label:"Embedding",icon:"data_array",blurb:"Vector embedding providers"},{id:"web",label:"Web Fetch & Search",icon:"travel_explore",blurb:"Search + page fetch providers"}];function c(){return(0,r.jsxs)("div",{className:"flex flex-col gap-5 max-w-3xl",children:[(0,r.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,r.jsx)("h1",{className:"text-[17px] font-semibold text-text-main",children:"Media"}),(0,r.jsx)("p",{className:"text-xs font-mono text-text-subtle",children:"image \xb7 TTS \xb7 STT \xb7 embeddings \xb7 web — separate from agent Skills"})]}),(0,r.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:n.map(e=>{let s=d.rj.find(s=>s.id===e.id);return(0,r.jsx)(l(),{href:`/dashboard/media-providers/${e.id}`,className:"group",children:(0,r.jsx)(a.Zp,{padding:"sm",className:"h-full transition-colors group-hover:border-brand-500/40",children:(0,r.jsxs)("div",{className:"flex items-start gap-3",children:[(0,r.jsx)("div",{className:"size-9 rounded-lg bg-brand-500/10 text-primary flex items-center justify-center shrink-0",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px] leading-none",children:e.icon||s?.icon||"perm_media"})}),(0,r.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,r.jsx)("h2",{className:"text-sm font-semibold text-text-main",children:e.label||s?.label||e.id}),(0,r.jsx)("span",{className:"material-symbols-outlined text-text-subtle text-[16px] group-hover:text-primary transition-colors",children:"chevron_right"})]}),(0,r.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:e.blurb})]})]})})},e.id)})})]})}},82159:(e,s,i)=>{Promise.resolve().then(i.bind(i,57767))}},e=>{e.O(0,[2574,3862,1610,2562,1321,705,5497,8441,3794,7358],()=>e(e.s=82159)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9749],{57767:(e,s,i)=>{"use strict";i.r(s),i.d(s,{default:()=>c});var r=i(95155),t=i(98500),l=i.n(t),a=i(35497),d=i(88105);let n=[{id:"image",label:"Text to Image",icon:"brush",blurb:"Image generation providers"},{id:"tts",label:"Text to Speech",icon:"record_voice_over",blurb:"Speech synthesis providers"},{id:"stt",label:"Speech to Text",icon:"mic",blurb:"Transcription providers"},{id:"embedding",label:"Embedding",icon:"data_array",blurb:"Vector embedding providers"},{id:"web",label:"Web Fetch & Search",icon:"travel_explore",blurb:"Search + page fetch providers"}];function c(){return(0,r.jsxs)("div",{className:"flex flex-col gap-5 max-w-3xl",children:[(0,r.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,r.jsx)("h1",{className:"text-[17px] font-semibold text-text-main",children:"Media"}),(0,r.jsx)("p",{className:"text-xs font-mono text-text-subtle",children:"image \xb7 TTS \xb7 STT \xb7 embeddings \xb7 web — separate from agent Skills"})]}),(0,r.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:n.map(e=>{let s=d.rj.find(s=>s.id===e.id);return(0,r.jsx)(l(),{href:`/dashboard/media-providers/${e.id}`,className:"group",children:(0,r.jsx)(a.Zp,{padding:"sm",className:"h-full transition-colors group-hover:border-brand-500/40",children:(0,r.jsxs)("div",{className:"flex items-start gap-3",children:[(0,r.jsx)("div",{className:"size-9 rounded-lg bg-brand-500/10 text-primary flex items-center justify-center shrink-0",children:(0,r.jsx)("span",{className:"material-symbols-outlined text-[20px] leading-none",children:e.icon||s?.icon||"perm_media"})}),(0,r.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,r.jsx)("h2",{className:"text-sm font-semibold text-text-main",children:e.label||s?.label||e.id}),(0,r.jsx)("span",{className:"material-symbols-outlined text-text-subtle text-[16px] group-hover:text-primary transition-colors",children:"chevron_right"})]}),(0,r.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:e.blurb})]})]})})},e.id)})})]})}},96434:(e,s,i)=>{Promise.resolve().then(i.bind(i,57767))}},e=>{e.O(0,[2574,3862,1610,2562,1321,705,5497,8441,3794,7358],()=>e(e.s=96434)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9260],{37848:(e,s,t)=>{Promise.resolve().then(t.bind(t,71088))},54026:(e,s,t)=>{"use strict";t.d(s,{A:()=>n});var r=t(95155),a=t(98500),i=t.n(a),o=t(73321),d=t(31474);let l=[{id:"image",label:"Image",href:"/dashboard/media-providers/image"},{id:"tts",label:"TTS",href:"/dashboard/media-providers/tts"},{id:"stt",label:"STT",href:"/dashboard/media-providers/stt"},{id:"embedding",label:"Embedding",href:"/dashboard/media-providers/embedding"},{id:"web",label:"Web",href:"/dashboard/media-providers/web"}];function n({activeKind:e}){let s=(0,o.usePathname)(),t=e||l.find(e=>s===e.href||s.startsWith(`${e.href}/`))?.id||"";return(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5 mb-5",children:[(0,r.jsx)(i(),{href:"/dashboard/media-providers",className:(0,d.cn)("px-2.5 py-1 rounded-[7px] text-xs font-medium border transition-colors","/dashboard/media-providers"===s?"bg-brand-500/15 text-primary border-brand-500/40":"bg-transparent text-text-muted border-border hover:text-text-main hover:border-brand-500/30"),children:"All"}),l.map(e=>{let s=t===e.id;return(0,r.jsx)(i(),{href:e.href,className:(0,d.cn)("px-2.5 py-1 rounded-[7px] text-xs font-medium border transition-colors",s?"bg-brand-500/15 text-primary border-brand-500/40":"bg-transparent text-text-muted border-border hover:text-text-main hover:border-brand-500/30"),children:e.label},e.id)})]})}},71088:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>f});var r=t(95155),a=t(98500),i=t.n(a),o=t(12115),d=t(73321),l=t(35497),n=t(57250),c=t(88105),m=t(54026);function x(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({provider:e,kind:s,connections:t}){let a=c.Q2[e.id],o=!!a?.noAuth,d=t.filter(s=>s.provider===e.id),m=d.filter(e=>{let s=x(e);return"active"===s||"success"===s}).length,b=d.filter(e=>{let s=x(e);return"error"===s||"expired"===s||"unavailable"===s}).length,p=d.length,f=p>0&&d.every(e=>!1===e.isActive);return(0,r.jsx)(i(),{href:`/dashboard/media-providers/${s}/${e.id}`,className:"group",children:(0,r.jsx)(l.Zp,{padding:"xs",className:`h-full hover:bg-black/[0.01] dark:hover:bg-white/[0.01] transition-colors cursor-pointer ${f?"opacity-50":""}`,children:(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,r.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,r.jsx)(n.A,{src:`/providers/${e.id}.png`,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,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"font-semibold text-sm",children:e.name}),(0,r.jsx)("div",{className:"flex items-center gap-2 mt-0.5 flex-wrap",children:o?(0,r.jsx)(l.Ex,{variant:"success",size:"sm",children:"Ready"}):f?(0,r.jsx)(l.Ex,{variant:"default",size:"sm",children:"Disabled"}):0===p?(0,r.jsx)("span",{className:"text-xs text-text-muted",children:"No connections"}):(0,r.jsxs)(r.Fragment,{children:[m>0&&(0,r.jsxs)(l.Ex,{variant:"success",size:"sm",dot:!0,children:[m," Connected"]}),b>0&&(0,r.jsxs)(l.Ex,{variant:"error",size:"sm",dot:!0,children:[b," Error"]}),0===m&&0===b&&(0,r.jsxs)(l.Ex,{variant:"default",size:"sm",children:[p," Added"]})]})})]})]})})})}function b({combos:e}){return 0===e.length?(0,r.jsx)("p",{className:"text-xs text-text-muted italic",children:"No combos yet."}):(0,r.jsx)("div",{className:"flex flex-col gap-2",children:e.map(e=>(0,r.jsx)(i(),{href:`/dashboard/media-providers/combo/${e.id}`,children:(0,r.jsx)(l.Zp,{padding:"xs",className:"hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors cursor-pointer",children:(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary text-[18px]",children:"layers"}),(0,r.jsx)("code",{className:"text-sm font-mono font-medium flex-1 truncate",children:e.name}),(0,r.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]:"",a=c.Q2[t];return(0,r.jsx)("div",{title:a?.name||e,className:"size-5 rounded flex items-center justify-center",style:{backgroundColor:`${a?.color??"#888"}15`},children:(0,r.jsx)(n.A,{src:`/providers/${t}.png`,alt:a?.name||t,size:18,className:"object-contain rounded max-w-[18px] max-h-[18px]",fallbackText:a?.textIcon||t.slice(0,2).toUpperCase(),fallbackColor:a?.color})},`${e}-${s}`)}),e.models.length>6&&(0,r.jsxs)("span",{className:"text-[10px] text-text-muted ml-1",children:["+",e.models.length-6]})]}),(0,r.jsx)("span",{className:"text-[11px] text-text-muted shrink-0",children:e.models.length}),(0,r.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[16px]",children:"chevron_right"})]})})},e.id))})}function p({title:e,icon:s,kind:t,providers:a,connections:i,combos:o,onCreateCombo:d}){return(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-3",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary",children:s}),(0,r.jsx)("h2",{className:"text-base font-semibold",children:e}),(0,r.jsxs)("span",{className:"text-xs text-text-muted",children:["(",a.length," providers \xb7 ",o.length," combos)"]})]}),(0,r.jsx)(l.$n,{size:"sm",icon:"add",onClick:d,children:"Create Combo"})]}),o.length>0&&(0,r.jsx)("div",{className:"mb-4",children:(0,r.jsx)(b,{combos:o})}),0===a.length?(0,r.jsx)("div",{className:"text-center py-8 border border-dashed border-border rounded-xl text-text-muted text-sm",children:"No providers."}):(0,r.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:a.map(e=>(0,r.jsx)(h,{provider:e,kind:t,connections:i},e.id))})]})}function f(){let e=(0,d.useRouter)(),[s,t]=(0,o.useState)([]),[a,i]=(0,o.useState)([]),l=async()=>{try{let[e,s]=await Promise.all([fetch("/api/providers",{cache:"no-store"}),fetch("/api/combos",{cache:"no-store"})]);e.ok&&t((await e.json()).connections||[]),s.ok&&i((await s.json()).combos||[])}catch{}};(0,o.useEffect)(()=>{l()},[]);let n=(0,c.o5)("webSearch"),x=(0,c.o5)("webFetch"),h=a.filter(e=>"webSearch"===e.kind),b=a.filter(e=>"webFetch"===e.kind),f=async s=>{let t="webSearch"===s?"search-combo":"fetch-combo",r=t,i=1,o=new Set(a.map(e=>e.name));for(;o.has(r);)r=`${t}-${i++}`;let d=await fetch("/api/combos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:r,models:[],kind:s})});if(d.ok){let s=await d.json();e.push(`/dashboard/media-providers/combo/${s.id}`)}else alert((await d.json()).error||"Failed to create combo")};return(0,r.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,r.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,r.jsx)("h1",{className:"text-[17px] font-semibold text-text-main",children:"Web Fetch & Search"}),(0,r.jsx)("p",{className:"text-xs font-mono text-text-subtle",children:"Media providers \xb7 not agent Skills"})]}),(0,r.jsx)(m.A,{activeKind:"web"}),(0,r.jsx)(p,{title:"Web Search",icon:"search",kind:"webSearch",providers:n,connections:s,combos:h,onCreateCombo:()=>f("webSearch")}),(0,r.jsx)("div",{className:"border-t border-border"}),(0,r.jsx)(p,{title:"Web Fetch",icon:"travel_explore",kind:"webFetch",providers:x,connections:s,combos:b,onCreateCombo:()=>f("webFetch")})]})}}},e=>{e.O(0,[2574,3862,1610,2562,1321,705,5497,8441,3794,7358],()=>e(e.s=37848)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9260],{22637:(e,s,t)=>{Promise.resolve().then(t.bind(t,71088))},54026:(e,s,t)=>{"use strict";t.d(s,{A:()=>n});var r=t(95155),a=t(98500),i=t.n(a),o=t(73321),d=t(31474);let l=[{id:"image",label:"Image",href:"/dashboard/media-providers/image"},{id:"tts",label:"TTS",href:"/dashboard/media-providers/tts"},{id:"stt",label:"STT",href:"/dashboard/media-providers/stt"},{id:"embedding",label:"Embedding",href:"/dashboard/media-providers/embedding"},{id:"web",label:"Web",href:"/dashboard/media-providers/web"}];function n({activeKind:e}){let s=(0,o.usePathname)(),t=e||l.find(e=>s===e.href||s.startsWith(`${e.href}/`))?.id||"";return(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5 mb-5",children:[(0,r.jsx)(i(),{href:"/dashboard/media-providers",className:(0,d.cn)("px-2.5 py-1 rounded-[7px] text-xs font-medium border transition-colors","/dashboard/media-providers"===s?"bg-brand-500/15 text-primary border-brand-500/40":"bg-transparent text-text-muted border-border hover:text-text-main hover:border-brand-500/30"),children:"All"}),l.map(e=>{let s=t===e.id;return(0,r.jsx)(i(),{href:e.href,className:(0,d.cn)("px-2.5 py-1 rounded-[7px] text-xs font-medium border transition-colors",s?"bg-brand-500/15 text-primary border-brand-500/40":"bg-transparent text-text-muted border-border hover:text-text-main hover:border-brand-500/30"),children:e.label},e.id)})]})}},71088:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>f});var r=t(95155),a=t(98500),i=t.n(a),o=t(12115),d=t(73321),l=t(35497),n=t(57250),c=t(88105),m=t(54026);function x(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({provider:e,kind:s,connections:t}){let a=c.Q2[e.id],o=!!a?.noAuth,d=t.filter(s=>s.provider===e.id),m=d.filter(e=>{let s=x(e);return"active"===s||"success"===s}).length,b=d.filter(e=>{let s=x(e);return"error"===s||"expired"===s||"unavailable"===s}).length,p=d.length,f=p>0&&d.every(e=>!1===e.isActive);return(0,r.jsx)(i(),{href:`/dashboard/media-providers/${s}/${e.id}`,className:"group",children:(0,r.jsx)(l.Zp,{padding:"xs",className:`h-full hover:bg-black/[0.01] dark:hover:bg-white/[0.01] transition-colors cursor-pointer ${f?"opacity-50":""}`,children:(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,r.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,r.jsx)(n.A,{src:`/providers/${e.id}.png`,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,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"font-semibold text-sm",children:e.name}),(0,r.jsx)("div",{className:"flex items-center gap-2 mt-0.5 flex-wrap",children:o?(0,r.jsx)(l.Ex,{variant:"success",size:"sm",children:"Ready"}):f?(0,r.jsx)(l.Ex,{variant:"default",size:"sm",children:"Disabled"}):0===p?(0,r.jsx)("span",{className:"text-xs text-text-muted",children:"No connections"}):(0,r.jsxs)(r.Fragment,{children:[m>0&&(0,r.jsxs)(l.Ex,{variant:"success",size:"sm",dot:!0,children:[m," Connected"]}),b>0&&(0,r.jsxs)(l.Ex,{variant:"error",size:"sm",dot:!0,children:[b," Error"]}),0===m&&0===b&&(0,r.jsxs)(l.Ex,{variant:"default",size:"sm",children:[p," Added"]})]})})]})]})})})}function b({combos:e}){return 0===e.length?(0,r.jsx)("p",{className:"text-xs text-text-muted italic",children:"No combos yet."}):(0,r.jsx)("div",{className:"flex flex-col gap-2",children:e.map(e=>(0,r.jsx)(i(),{href:`/dashboard/media-providers/combo/${e.id}`,children:(0,r.jsx)(l.Zp,{padding:"xs",className:"hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors cursor-pointer",children:(0,r.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary text-[18px]",children:"layers"}),(0,r.jsx)("code",{className:"text-sm font-mono font-medium flex-1 truncate",children:e.name}),(0,r.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]:"",a=c.Q2[t];return(0,r.jsx)("div",{title:a?.name||e,className:"size-5 rounded flex items-center justify-center",style:{backgroundColor:`${a?.color??"#888"}15`},children:(0,r.jsx)(n.A,{src:`/providers/${t}.png`,alt:a?.name||t,size:18,className:"object-contain rounded max-w-[18px] max-h-[18px]",fallbackText:a?.textIcon||t.slice(0,2).toUpperCase(),fallbackColor:a?.color})},`${e}-${s}`)}),e.models.length>6&&(0,r.jsxs)("span",{className:"text-[10px] text-text-muted ml-1",children:["+",e.models.length-6]})]}),(0,r.jsx)("span",{className:"text-[11px] text-text-muted shrink-0",children:e.models.length}),(0,r.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[16px]",children:"chevron_right"})]})})},e.id))})}function p({title:e,icon:s,kind:t,providers:a,connections:i,combos:o,onCreateCombo:d}){return(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-3",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,r.jsx)("span",{className:"material-symbols-outlined text-primary",children:s}),(0,r.jsx)("h2",{className:"text-base font-semibold",children:e}),(0,r.jsxs)("span",{className:"text-xs text-text-muted",children:["(",a.length," providers \xb7 ",o.length," combos)"]})]}),(0,r.jsx)(l.$n,{size:"sm",icon:"add",onClick:d,children:"Create Combo"})]}),o.length>0&&(0,r.jsx)("div",{className:"mb-4",children:(0,r.jsx)(b,{combos:o})}),0===a.length?(0,r.jsx)("div",{className:"text-center py-8 border border-dashed border-border rounded-xl text-text-muted text-sm",children:"No providers."}):(0,r.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:a.map(e=>(0,r.jsx)(h,{provider:e,kind:t,connections:i},e.id))})]})}function f(){let e=(0,d.useRouter)(),[s,t]=(0,o.useState)([]),[a,i]=(0,o.useState)([]),l=async()=>{try{let[e,s]=await Promise.all([fetch("/api/providers",{cache:"no-store"}),fetch("/api/combos",{cache:"no-store"})]);e.ok&&t((await e.json()).connections||[]),s.ok&&i((await s.json()).combos||[])}catch{}};(0,o.useEffect)(()=>{l()},[]);let n=(0,c.o5)("webSearch"),x=(0,c.o5)("webFetch"),h=a.filter(e=>"webSearch"===e.kind),b=a.filter(e=>"webFetch"===e.kind),f=async s=>{let t="webSearch"===s?"search-combo":"fetch-combo",r=t,i=1,o=new Set(a.map(e=>e.name));for(;o.has(r);)r=`${t}-${i++}`;let d=await fetch("/api/combos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:r,models:[],kind:s})});if(d.ok){let s=await d.json();e.push(`/dashboard/media-providers/combo/${s.id}`)}else alert((await d.json()).error||"Failed to create combo")};return(0,r.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,r.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,r.jsx)("h1",{className:"text-[17px] font-semibold text-text-main",children:"Web Fetch & Search"}),(0,r.jsx)("p",{className:"text-xs font-mono text-text-subtle",children:"Media providers \xb7 not agent Skills"})]}),(0,r.jsx)(m.A,{activeKind:"web"}),(0,r.jsx)(p,{title:"Web Search",icon:"search",kind:"webSearch",providers:n,connections:s,combos:h,onCreateCombo:()=>f("webSearch")}),(0,r.jsx)("div",{className:"border-t border-border"}),(0,r.jsx)(p,{title:"Web Fetch",icon:"travel_explore",kind:"webFetch",providers:x,connections:s,combos:b,onCreateCombo:()=>f("webFetch")})]})}}},e=>{e.O(0,[2574,3862,1610,2562,1321,705,5497,8441,3794,7358],()=>e(e.s=22637)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6607],{23879:(e,s,t)=>{"use strict";t.d(s,{default:()=>d});var a=t(95155),i=t(12115),n=t(3534),l=t(28777),o=t(88105),r=t(37700);function d(){let[e,s]=(0,i.useState)([]),[t,d]=(0,i.useState)([]),[c,u]=(0,i.useState)({}),[h,p]=(0,i.useState)(!1),[w,f]=(0,i.useState)(null),[y,x]=(0,i.useState)({running:!1,certExists:!1,dnsStatus:{},hasCachedPassword:!1});(0,i.useEffect)(()=>{g(),v(),m(),S()},[]);let g=async()=>{try{let e=await fetch("/api/providers");if(e.ok){let t=await e.json();s(t.connections||[])}}catch{}},v=async()=>{try{let e=await fetch("/api/keys");if(e.ok){let s=await e.json();d(s.keys||[])}}catch{}},m=async()=>{try{let e=await fetch("/api/models/alias");if(e.ok){let s=await e.json();u(s.aliases||{})}}catch{}},S=async()=>{try{let e=await fetch("/api/settings");if(e.ok){let s=await e.json();p(s.cloudEnabled||!1)}}catch{}},b=()=>e.filter(e=>!1!==e.isActive),k=Object.entries(n.wn);return(0,a.jsxs)("div",{className:"flex w-full flex-col gap-6",children:[(0,a.jsxs)("div",{className:"flex items-start gap-2 px-3 py-2 rounded-lg bg-yellow-500/10 border border-yellow-500/30",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-yellow-500 mt-0.5 shrink-0",children:"warning"}),(0,a.jsx)("p",{className:"text-xs text-red-600 dark:text-yellow-400 leading-relaxed",children:"⚠️ MITM intercepts HTTPS traffic of IDE tools (Antigravity, GitHub Copilot, Kiro) via local CA to redirect requests to your providers. May violate ToS → account ban. Use at your own risk."})]}),(0,a.jsx)(r.tA,{apiKeys:t,cloudEnabled:h,onStatusChange:x}),(0,a.jsx)("div",{className:"grid gap-3 sm:gap-4",children:k.map(([e,s])=>(0,a.jsx)(r.kn,{tool:s,isExpanded:w===e,onToggle:()=>f(w===e?null:e),serverRunning:y.running,dnsActive:y.dnsStatus?.[e]||!1,hasCachedPassword:y.hasCachedPassword||!1,needsSudoPassword:!1!==y.needsSudoPassword,isWin:!0===y.isWin,apiKeys:t,activeProviders:b(),hasActiveProviders:b().some(e=>(0,l.KC)(e.provider).length>0||(0,o.mq)(e.provider)||(0,o.gb)(e.provider)),modelAliases:c,cloudEnabled:h,onDnsChange:e=>x(s=>({...s,dnsStatus:e.dnsStatus??s.dnsStatus}))},e))})]})}},73610:(e,s,t)=>{Promise.resolve().then(t.bind(t,23879))}},e=>{e.O(0,[2574,3862,1610,2562,5772,1321,705,5497,1655,8441,3794,7358],()=>e(e.s=73610)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6607],{23879:(e,s,t)=>{"use strict";t.d(s,{default:()=>d});var a=t(95155),i=t(12115),n=t(3534),l=t(28777),o=t(88105),r=t(37700);function d(){let[e,s]=(0,i.useState)([]),[t,d]=(0,i.useState)([]),[c,u]=(0,i.useState)({}),[h,p]=(0,i.useState)(!1),[w,f]=(0,i.useState)(null),[y,x]=(0,i.useState)({running:!1,certExists:!1,dnsStatus:{},hasCachedPassword:!1});(0,i.useEffect)(()=>{g(),v(),m(),S()},[]);let g=async()=>{try{let e=await fetch("/api/providers");if(e.ok){let t=await e.json();s(t.connections||[])}}catch{}},v=async()=>{try{let e=await fetch("/api/keys");if(e.ok){let s=await e.json();d(s.keys||[])}}catch{}},m=async()=>{try{let e=await fetch("/api/models/alias");if(e.ok){let s=await e.json();u(s.aliases||{})}}catch{}},S=async()=>{try{let e=await fetch("/api/settings");if(e.ok){let s=await e.json();p(s.cloudEnabled||!1)}}catch{}},b=()=>e.filter(e=>!1!==e.isActive),k=Object.entries(n.wn);return(0,a.jsxs)("div",{className:"flex w-full flex-col gap-6",children:[(0,a.jsxs)("div",{className:"flex items-start gap-2 px-3 py-2 rounded-lg bg-yellow-500/10 border border-yellow-500/30",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-yellow-500 mt-0.5 shrink-0",children:"warning"}),(0,a.jsx)("p",{className:"text-xs text-red-600 dark:text-yellow-400 leading-relaxed",children:"⚠️ MITM intercepts HTTPS traffic of IDE tools (Antigravity, GitHub Copilot, Kiro) via local CA to redirect requests to your providers. May violate ToS → account ban. Use at your own risk."})]}),(0,a.jsx)(r.tA,{apiKeys:t,cloudEnabled:h,onStatusChange:x}),(0,a.jsx)("div",{className:"grid gap-3 sm:gap-4",children:k.map(([e,s])=>(0,a.jsx)(r.kn,{tool:s,isExpanded:w===e,onToggle:()=>f(w===e?null:e),serverRunning:y.running,dnsActive:y.dnsStatus?.[e]||!1,hasCachedPassword:y.hasCachedPassword||!1,needsSudoPassword:!1!==y.needsSudoPassword,isWin:!0===y.isWin,apiKeys:t,activeProviders:b(),hasActiveProviders:b().some(e=>(0,l.KC)(e.provider).length>0||(0,o.mq)(e.provider)||(0,o.gb)(e.provider)),modelAliases:c,cloudEnabled:h,onDnsChange:e=>x(s=>({...s,dnsStatus:e.dnsStatus??s.dnsStatus}))},e))})]})}},82831:(e,s,t)=>{Promise.resolve().then(t.bind(t,23879))}},e=>{e.O(0,[2574,3862,1610,2562,5772,1321,705,5497,1655,8441,3794,7358],()=>e(e.s=82831)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6337],{54591:(e,o,n)=>{Promise.resolve().then(n.bind(n,55084))},55084:(e,o,n)=>{"use strict";n.d(o,{default:()=>c});var t=n(95155),s=n(12115),l=n(98500),a=n.n(l),r=n(14051),i=n.n(r);let d={fallback:"fallback","round-robin":"round-robin",fusion:"fusion",auto:"auto"};function c({initialData:e}){let[o,n]=(0,s.useState)("127.0.0.1:20128"),[l,r]=(0,s.useState)(null),i=e?.providerCount??0,p=e?.keyCount??0,f=e?.comboCount??0,x=e?.defaultCombo||null,u=e?.learningSummary||null,g=e?.quotas||[],h=!!x?.isAuto,b=x?.strategy||"fallback";(0,s.useEffect)(()=>{n(window.location.host||"127.0.0.1:20128")},[]),(0,s.useEffect)(()=>{let e=!1;return fetch("/api/usage/stats?period=24h").then(e=>e.json()).then(o=>{e||r(o)}).catch(()=>{}),()=>{e=!0}},[]);let y=`http://${o}/v1`,v=(0,s.useMemo)(()=>{let e=l?.totalRequests??l?.requests??0,o=l?.totalPromptTokens??0,n=l?.totalCompletionTokens??0,t=l?.totalCost??0;return[{label:"Requests \xb7 24h",value:m(e)},{label:"Tokens in",value:m(o)},{label:"Tokens out",value:m(n)},{label:"Est. cost",value:t?`$${Number(t).toFixed(2)}`:"$0.00"}]},[l]),j=(0,s.useMemo)(()=>x?h?[["Router",x.routerModel||"claude/claude-opus-4-8"],["Worker pool",`${x.workerCount||0} workers`],["Objective",x.objective||"balanced"],["Exploration",x.exploration||"5%"]]:"fusion"===b?[["Panel",`${x.workerCount||0} models`],["Judge",x.judgeModel||"first model"],["Calls / request","N+1 (panel + judge)"],["Capacity switch",x.capacityAutoSwitch?"on":"off"]]:"round-robin"===b?[["Pool",`${x.workerCount||0} models`],["Rotation","spread load across models"],["Capacity switch",x.capacityAutoSwitch?"on":"off"],["On failure","try next in rotation"]]:[["Pool",`${x.workerCount||0} models`],["Order","try in listed order"],["Capacity switch",!1!==x.capacityAutoSwitch?"on":"off"],["On failure","next model"]]:[["Combos","none configured"],["Strategy","—"],["Models","—"],["Tip","Create a combo to group models"]],[x,h,b]);return(0,t.jsxs)("div",{className:"flex flex-col w-full",style:{gap:16,maxWidth:1120},children:[(0,t.jsxs)("div",{className:"flex flex-col",style:{gap:4},children:[(0,t.jsx)("span",{style:{fontSize:17,fontWeight:600,color:"#ECE4D2"},children:"Overview"}),(0,t.jsx)("span",{style:{fontSize:12,color:"#6F6653",fontFamily:"var(--font-mono), 'IBM Plex Mono', monospace"},children:"everything routing through your endpoint, at a glance"})]}),(0,t.jsxs)("div",{className:"grid gap-4 grid-cols-1 md:grid-cols-2",children:[(0,t.jsxs)("div",{className:"flex flex-col justify-between",style:{background:"#1E1A13",border:"1px solid #332C1E",borderRadius:12,padding:18},children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",style:{marginBottom:12},children:[(0,t.jsx)("span",{style:{fontSize:10.5,letterSpacing:"1.2px",color:"#8A7F66",textTransform:"uppercase",fontWeight:600},children:"Endpoint"}),(0,t.jsxs)("span",{className:"flex items-center gap-[7px]",style:{fontSize:11.5,color:"#74C08A",fontFamily:"var(--font-mono), 'IBM Plex Mono', monospace"},children:[(0,t.jsx)("span",{className:"console-online-dot"}),"online"]})]}),(0,t.jsx)("div",{style:{fontFamily:"var(--font-mono), 'IBM Plex Mono', monospace",fontSize:16,color:"#E5B454",marginBottom:4,wordBreak:"break-all"},children:y})]}),(0,t.jsxs)("div",{style:{fontSize:11.5,color:"#6F6653",fontFamily:"var(--font-mono), 'IBM Plex Mono', monospace",marginTop:14},children:[p," API key",1===p?"":"s"," \xb7 ",i," provider",1===i?"":"s"," connected"]})]}),(0,t.jsxs)("div",{style:{background:"#1E1A13",border:"1px solid #332C1E",borderRadius:12,padding:18},children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",style:{marginBottom:12},children:[(0,t.jsx)("span",{style:{fontSize:10.5,letterSpacing:"1.2px",color:"#8A7F66",textTransform:"uppercase",fontWeight:600},children:h?"Learning":"Combos"}),(0,t.jsx)("span",{style:{fontSize:10,fontFamily:"var(--font-mono), 'IBM Plex Mono', monospace",padding:"2px 8px",borderRadius:999,textTransform:"uppercase",letterSpacing:"0.5px",background:"rgba(229,180,84,.15)",color:"#E5B454",border:"1px solid rgba(229,180,84,.4)"},children:h?u?.freezeLearning?"frozen":u?.version?`v${u.version}`:"no version yet":f?`${f} configured`:"none"})]}),(0,t.jsxs)("div",{className:"flex items-end gap-2.5",style:{marginBottom:3},children:[(0,t.jsx)("span",{style:{fontFamily:"var(--font-mono), 'IBM Plex Mono', monospace",fontSize:32,fontWeight:600,lineHeight:1,color:"#ECE4D2"},children:h?u?.evalScore!=null?Number(u.evalScore).toFixed(0):"—":String(f)}),(0,t.jsx)("span",{style:{fontSize:11,color:h?"#74C08A":"#A99E86",fontFamily:"var(--font-mono), 'IBM Plex Mono', monospace",paddingBottom:3},children:h?"eval score":"combos"})]}),(0,t.jsx)("div",{style:{fontSize:11,color:"#6F6653",fontFamily:"var(--font-mono), 'IBM Plex Mono', monospace",marginBottom:14},children:h?"Auto strategy \xb7 relearn from Combos → Insights":"Group models \xb7 fallback / round-robin / fusion / auto"}),(0,t.jsxs)("div",{className:"flex gap-2 items-center flex-wrap",children:[(0,t.jsx)(a(),{href:"/dashboard/combos",style:{display:"inline-flex",alignItems:"center",gap:7,background:"rgba(229,180,84,.15)",border:"1px solid rgba(229,180,84,.4)",borderRadius:7,padding:"7px 12px",fontSize:12,color:"#E5B454",fontFamily:"inherit"},children:f?"Manage combos":"Create combo"}),h&&x?.name&&(0,t.jsx)(a(),{href:`/dashboard/combos/routing?combo=${encodeURIComponent(x.name)}`,style:{display:"inline-flex",alignItems:"center",gap:7,background:"transparent",border:"1px solid #3A3221",borderRadius:7,padding:"7px 10px",fontSize:12,color:"#A99E86"},children:"Routing insights"})]})]})]}),(0,t.jsx)("div",{className:"grid gap-3 grid-cols-2 lg:grid-cols-4",children:v.map(e=>(0,t.jsxs)("div",{style:{background:"#1E1A13",border:"1px solid #332C1E",borderRadius:11,padding:15},children:[(0,t.jsx)("div",{style:{fontSize:10,letterSpacing:"0.6px",color:"#6F6653",textTransform:"uppercase",marginBottom:8},children:e.label}),(0,t.jsx)("div",{style:{fontFamily:"var(--font-mono), 'IBM Plex Mono', monospace",fontSize:21,fontWeight:600,color:"#ECE4D2"},children:e.value})]},e.label))}),(0,t.jsxs)("div",{className:"grid gap-4 items-start grid-cols-1 md:grid-cols-2",children:[(0,t.jsxs)("div",{style:{background:"#1E1A13",border:"1px solid #332C1E",borderRadius:12,padding:18},children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",style:{marginBottom:14},children:[(0,t.jsx)("span",{style:{fontSize:13,fontWeight:600,color:"#ECE4D2"},children:"Active routing"}),(0,t.jsx)(a(),{href:h&&x?.name?`/dashboard/combos/routing?combo=${encodeURIComponent(x.name)}`:"/dashboard/combos",style:{padding:"6px 12px",borderRadius:7,fontSize:11.5,border:"1px solid #3A3221",background:"transparent",color:"#A99E86"},children:h?"View insights":"Open combos"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2.5",style:{marginBottom:14},children:[(0,t.jsx)("span",{style:{fontFamily:"var(--font-mono), 'IBM Plex Mono', monospace",fontSize:14,fontWeight:600,color:"#ECE4D2"},children:x?.name||"—"}),(0,t.jsx)("span",{style:{fontSize:10,fontFamily:"var(--font-mono), 'IBM Plex Mono', monospace",padding:"2px 8px",borderRadius:999,textTransform:"uppercase",letterSpacing:"0.5px",background:"rgba(229,180,84,.15)",color:"#E5B454",border:"1px solid rgba(229,180,84,.4)"},children:d[b]||b||"fallback"})]}),(0,t.jsx)("div",{className:"flex flex-col",children:j.map(([e,o],n,s)=>(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",style:{padding:"9px 0",borderBottom:n<s.length-1?"1px solid #241F16":"none"},children:[(0,t.jsx)("span",{style:{fontSize:12,color:"#8A7F66"},children:e}),(0,t.jsx)("span",{className:"truncate text-right",style:{fontSize:12,color:"#A99E86",fontFamily:"var(--font-mono), 'IBM Plex Mono', monospace",maxWidth:"60%"},title:String(o),children:o})]},e))})]}),(0,t.jsxs)("div",{style:{background:"#1E1A13",border:"1px solid #332C1E",borderRadius:12,padding:18},children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",style:{marginBottom:16},children:[(0,t.jsx)("span",{style:{fontSize:13,fontWeight:600,color:"#ECE4D2"},children:"Quota"}),(0,t.jsxs)("span",{style:{fontSize:11,color:"#6F6653",fontFamily:"var(--font-mono), 'IBM Plex Mono', monospace"},children:[g.length||i," accounts"]})]}),(0,t.jsx)("div",{className:"flex flex-col",style:{gap:13},children:(g.length?g:[{account:"No quota data yet",pct:0}]).slice(0,6).map(e=>{let o=Math.max(0,Math.min(100,Number(e.pct)||0)),n=o>=90?"#E07070":o>=70?"#E5B454":"#74C08A";return(0,t.jsxs)("div",{className:"flex flex-col",style:{gap:5},children:[(0,t.jsxs)("div",{className:"flex justify-between items-baseline gap-2",children:[(0,t.jsx)("span",{style:{fontSize:12,color:"#ECE4D2"},children:e.account}),(0,t.jsxs)("span",{style:{fontSize:11,color:n,fontFamily:"var(--font-mono), 'IBM Plex Mono', monospace"},children:[o,"%"]})]}),(0,t.jsx)("div",{style:{height:5,borderRadius:3,background:"#241F16",overflow:"hidden"},children:(0,t.jsx)("div",{style:{height:"100%",width:`${o}%`,borderRadius:3,background:n}})})]},e.account)})}),(0,t.jsx)(a(),{href:"/dashboard/quota",className:"inline-block mt-4",style:{fontSize:11.5,color:"#A99E86"},children:"Open quota tracker →"})]})]})]})}function m(e){let o=Number(e)||0;return o>=1e6?`${(o/1e6).toFixed(1)}M`:o>=1e3?`${(o/1e3).toFixed(1)}k`:String(Math.round(o))}c.propTypes={initialData:i().object}}},e=>{e.O(0,[1610,8441,3794,7358],()=>e(e.s=54591)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6337],{48420:(e,o,n)=>{Promise.resolve().then(n.bind(n,55084))},55084:(e,o,n)=>{"use strict";n.d(o,{default:()=>c});var t=n(95155),s=n(12115),l=n(98500),a=n.n(l),r=n(14051),i=n.n(r);let d={fallback:"fallback","round-robin":"round-robin",fusion:"fusion",auto:"auto"};function c({initialData:e}){let[o,n]=(0,s.useState)("127.0.0.1:20128"),[l,r]=(0,s.useState)(null),i=e?.providerCount??0,p=e?.keyCount??0,f=e?.comboCount??0,x=e?.defaultCombo||null,u=e?.learningSummary||null,g=e?.quotas||[],h=!!x?.isAuto,b=x?.strategy||"fallback";(0,s.useEffect)(()=>{n(window.location.host||"127.0.0.1:20128")},[]),(0,s.useEffect)(()=>{let e=!1;return fetch("/api/usage/stats?period=24h").then(e=>e.json()).then(o=>{e||r(o)}).catch(()=>{}),()=>{e=!0}},[]);let y=`http://${o}/v1`,v=(0,s.useMemo)(()=>{let e=l?.totalRequests??l?.requests??0,o=l?.totalPromptTokens??0,n=l?.totalCompletionTokens??0,t=l?.totalCost??0;return[{label:"Requests \xb7 24h",value:m(e)},{label:"Tokens in",value:m(o)},{label:"Tokens out",value:m(n)},{label:"Est. cost",value:t?`$${Number(t).toFixed(2)}`:"$0.00"}]},[l]),j=(0,s.useMemo)(()=>x?h?[["Router",x.routerModel||"claude/claude-opus-4-8"],["Worker pool",`${x.workerCount||0} workers`],["Objective",x.objective||"balanced"],["Exploration",x.exploration||"5%"]]:"fusion"===b?[["Panel",`${x.workerCount||0} models`],["Judge",x.judgeModel||"first model"],["Calls / request","N+1 (panel + judge)"],["Capacity switch",x.capacityAutoSwitch?"on":"off"]]:"round-robin"===b?[["Pool",`${x.workerCount||0} models`],["Rotation","spread load across models"],["Capacity switch",x.capacityAutoSwitch?"on":"off"],["On failure","try next in rotation"]]:[["Pool",`${x.workerCount||0} models`],["Order","try in listed order"],["Capacity switch",!1!==x.capacityAutoSwitch?"on":"off"],["On failure","next model"]]:[["Combos","none configured"],["Strategy","—"],["Models","—"],["Tip","Create a combo to group models"]],[x,h,b]);return(0,t.jsxs)("div",{className:"flex flex-col w-full",style:{gap:16,maxWidth:1120},children:[(0,t.jsxs)("div",{className:"flex flex-col",style:{gap:4},children:[(0,t.jsx)("span",{style:{fontSize:17,fontWeight:600,color:"#ECE4D2"},children:"Overview"}),(0,t.jsx)("span",{style:{fontSize:12,color:"#6F6653",fontFamily:"var(--font-mono), 'IBM Plex Mono', monospace"},children:"everything routing through your endpoint, at a glance"})]}),(0,t.jsxs)("div",{className:"grid gap-4 grid-cols-1 md:grid-cols-2",children:[(0,t.jsxs)("div",{className:"flex flex-col justify-between",style:{background:"#1E1A13",border:"1px solid #332C1E",borderRadius:12,padding:18},children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",style:{marginBottom:12},children:[(0,t.jsx)("span",{style:{fontSize:10.5,letterSpacing:"1.2px",color:"#8A7F66",textTransform:"uppercase",fontWeight:600},children:"Endpoint"}),(0,t.jsxs)("span",{className:"flex items-center gap-[7px]",style:{fontSize:11.5,color:"#74C08A",fontFamily:"var(--font-mono), 'IBM Plex Mono', monospace"},children:[(0,t.jsx)("span",{className:"console-online-dot"}),"online"]})]}),(0,t.jsx)("div",{style:{fontFamily:"var(--font-mono), 'IBM Plex Mono', monospace",fontSize:16,color:"#E5B454",marginBottom:4,wordBreak:"break-all"},children:y})]}),(0,t.jsxs)("div",{style:{fontSize:11.5,color:"#6F6653",fontFamily:"var(--font-mono), 'IBM Plex Mono', monospace",marginTop:14},children:[p," API key",1===p?"":"s"," \xb7 ",i," provider",1===i?"":"s"," connected"]})]}),(0,t.jsxs)("div",{style:{background:"#1E1A13",border:"1px solid #332C1E",borderRadius:12,padding:18},children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",style:{marginBottom:12},children:[(0,t.jsx)("span",{style:{fontSize:10.5,letterSpacing:"1.2px",color:"#8A7F66",textTransform:"uppercase",fontWeight:600},children:h?"Learning":"Combos"}),(0,t.jsx)("span",{style:{fontSize:10,fontFamily:"var(--font-mono), 'IBM Plex Mono', monospace",padding:"2px 8px",borderRadius:999,textTransform:"uppercase",letterSpacing:"0.5px",background:"rgba(229,180,84,.15)",color:"#E5B454",border:"1px solid rgba(229,180,84,.4)"},children:h?u?.freezeLearning?"frozen":u?.version?`v${u.version}`:"no version yet":f?`${f} configured`:"none"})]}),(0,t.jsxs)("div",{className:"flex items-end gap-2.5",style:{marginBottom:3},children:[(0,t.jsx)("span",{style:{fontFamily:"var(--font-mono), 'IBM Plex Mono', monospace",fontSize:32,fontWeight:600,lineHeight:1,color:"#ECE4D2"},children:h?u?.evalScore!=null?Number(u.evalScore).toFixed(0):"—":String(f)}),(0,t.jsx)("span",{style:{fontSize:11,color:h?"#74C08A":"#A99E86",fontFamily:"var(--font-mono), 'IBM Plex Mono', monospace",paddingBottom:3},children:h?"eval score":"combos"})]}),(0,t.jsx)("div",{style:{fontSize:11,color:"#6F6653",fontFamily:"var(--font-mono), 'IBM Plex Mono', monospace",marginBottom:14},children:h?"Auto strategy \xb7 relearn from Combos → Insights":"Group models \xb7 fallback / round-robin / fusion / auto"}),(0,t.jsxs)("div",{className:"flex gap-2 items-center flex-wrap",children:[(0,t.jsx)(a(),{href:"/dashboard/combos",style:{display:"inline-flex",alignItems:"center",gap:7,background:"rgba(229,180,84,.15)",border:"1px solid rgba(229,180,84,.4)",borderRadius:7,padding:"7px 12px",fontSize:12,color:"#E5B454",fontFamily:"inherit"},children:f?"Manage combos":"Create combo"}),h&&x?.name&&(0,t.jsx)(a(),{href:`/dashboard/combos/routing?combo=${encodeURIComponent(x.name)}`,style:{display:"inline-flex",alignItems:"center",gap:7,background:"transparent",border:"1px solid #3A3221",borderRadius:7,padding:"7px 10px",fontSize:12,color:"#A99E86"},children:"Routing insights"})]})]})]}),(0,t.jsx)("div",{className:"grid gap-3 grid-cols-2 lg:grid-cols-4",children:v.map(e=>(0,t.jsxs)("div",{style:{background:"#1E1A13",border:"1px solid #332C1E",borderRadius:11,padding:15},children:[(0,t.jsx)("div",{style:{fontSize:10,letterSpacing:"0.6px",color:"#6F6653",textTransform:"uppercase",marginBottom:8},children:e.label}),(0,t.jsx)("div",{style:{fontFamily:"var(--font-mono), 'IBM Plex Mono', monospace",fontSize:21,fontWeight:600,color:"#ECE4D2"},children:e.value})]},e.label))}),(0,t.jsxs)("div",{className:"grid gap-4 items-start grid-cols-1 md:grid-cols-2",children:[(0,t.jsxs)("div",{style:{background:"#1E1A13",border:"1px solid #332C1E",borderRadius:12,padding:18},children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",style:{marginBottom:14},children:[(0,t.jsx)("span",{style:{fontSize:13,fontWeight:600,color:"#ECE4D2"},children:"Active routing"}),(0,t.jsx)(a(),{href:h&&x?.name?`/dashboard/combos/routing?combo=${encodeURIComponent(x.name)}`:"/dashboard/combos",style:{padding:"6px 12px",borderRadius:7,fontSize:11.5,border:"1px solid #3A3221",background:"transparent",color:"#A99E86"},children:h?"View insights":"Open combos"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2.5",style:{marginBottom:14},children:[(0,t.jsx)("span",{style:{fontFamily:"var(--font-mono), 'IBM Plex Mono', monospace",fontSize:14,fontWeight:600,color:"#ECE4D2"},children:x?.name||"—"}),(0,t.jsx)("span",{style:{fontSize:10,fontFamily:"var(--font-mono), 'IBM Plex Mono', monospace",padding:"2px 8px",borderRadius:999,textTransform:"uppercase",letterSpacing:"0.5px",background:"rgba(229,180,84,.15)",color:"#E5B454",border:"1px solid rgba(229,180,84,.4)"},children:d[b]||b||"fallback"})]}),(0,t.jsx)("div",{className:"flex flex-col",children:j.map(([e,o],n,s)=>(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",style:{padding:"9px 0",borderBottom:n<s.length-1?"1px solid #241F16":"none"},children:[(0,t.jsx)("span",{style:{fontSize:12,color:"#8A7F66"},children:e}),(0,t.jsx)("span",{className:"truncate text-right",style:{fontSize:12,color:"#A99E86",fontFamily:"var(--font-mono), 'IBM Plex Mono', monospace",maxWidth:"60%"},title:String(o),children:o})]},e))})]}),(0,t.jsxs)("div",{style:{background:"#1E1A13",border:"1px solid #332C1E",borderRadius:12,padding:18},children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",style:{marginBottom:16},children:[(0,t.jsx)("span",{style:{fontSize:13,fontWeight:600,color:"#ECE4D2"},children:"Quota"}),(0,t.jsxs)("span",{style:{fontSize:11,color:"#6F6653",fontFamily:"var(--font-mono), 'IBM Plex Mono', monospace"},children:[g.length||i," accounts"]})]}),(0,t.jsx)("div",{className:"flex flex-col",style:{gap:13},children:(g.length?g:[{account:"No quota data yet",pct:0}]).slice(0,6).map(e=>{let o=Math.max(0,Math.min(100,Number(e.pct)||0)),n=o>=90?"#E07070":o>=70?"#E5B454":"#74C08A";return(0,t.jsxs)("div",{className:"flex flex-col",style:{gap:5},children:[(0,t.jsxs)("div",{className:"flex justify-between items-baseline gap-2",children:[(0,t.jsx)("span",{style:{fontSize:12,color:"#ECE4D2"},children:e.account}),(0,t.jsxs)("span",{style:{fontSize:11,color:n,fontFamily:"var(--font-mono), 'IBM Plex Mono', monospace"},children:[o,"%"]})]}),(0,t.jsx)("div",{style:{height:5,borderRadius:3,background:"#241F16",overflow:"hidden"},children:(0,t.jsx)("div",{style:{height:"100%",width:`${o}%`,borderRadius:3,background:n}})})]},e.account)})}),(0,t.jsx)(a(),{href:"/dashboard/quota",className:"inline-block mt-4",style:{fontSize:11.5,color:"#A99E86"},children:"Open quota tracker →"})]})]})]})}function m(e){let o=Number(e)||0;return o>=1e6?`${(o/1e6).toFixed(1)}M`:o>=1e3?`${(o/1e3).toFixed(1)}k`:String(Math.round(o))}c.propTypes={initialData:i().object}}},e=>{e.O(0,[1610,8441,3794,7358],()=>e(e.s=48420)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3471],{12151:(e,t,s)=>{"use strict";s.d(t,{default:()=>u});var a=s(95155),r=s(12115),o=s(35497),i=s(81127),l=s(21931),n=s(1620),d=s(31474),c=s(90620),m=s(93308),x=s(38202);function u({initialData:e}){let{theme:t,setTheme:s,isDark:b}=(0,n.D)(),[p,h]=(0,r.useState)("en"),[y,g]=(0,r.useState)(!1),[f,j]=(0,r.useState)(!1),[N,w]=(0,r.useState)(!1),[v,k]=(0,r.useState)(e?.settings||{fallbackStrategy:"fill-first"}),[C,S]=(0,r.useState)(!e?.settings),[P,R]=(0,r.useState)(!1),[O,L]=(0,r.useState)({type:"",message:""}),T=(0,r.useRef)(null),[E,U]=(0,r.useState)({outboundProxyEnabled:!1,outboundProxyUrl:"",outboundNoProxy:""}),[A,$]=(0,r.useState)({type:"",message:""}),[F,J]=(0,r.useState)(!1),[_,D]=(0,r.useState)(!1);(0,r.useEffect)(()=>{h(function(){if("u"<typeof document)return"en";let e=document.cookie.split(";").find(e=>e.trim().startsWith(`${m.CL}=`)),t=e?decodeURIComponent(e.split("=")[1]):"en";return(0,m.QC)(t)}())},[y]),(0,r.useEffect)(()=>{let t=e?.settings||v;U({outboundProxyEnabled:t?.outboundProxyEnabled===!0,outboundProxyUrl:t?.outboundProxyUrl||"",outboundNoProxy:t?.outboundNoProxy||""}),S(!1)},[e]);let M=async e=>{if(e.preventDefault(),!0===v.outboundProxyEnabled){J(!0),$({type:"",message:""});try{let e=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({outboundProxyUrl:E.outboundProxyUrl,outboundNoProxy:E.outboundNoProxy})}),t=await e.json();e.ok?(k(e=>({...e,...t})),$({type:"success",message:"Proxy settings applied"})):$({type:"error",message:t.error||"Failed to update proxy settings"})}catch(e){$({type:"error",message:"An error occurred"})}finally{J(!1)}}},H=async()=>{if(!0!==v.outboundProxyEnabled)return;let e=(E.outboundProxyUrl||"").trim();if(!e)return void $({type:"error",message:"Please enter a Proxy URL to test"});D(!0),$({type:"",message:""});try{let t=await fetch("/api/settings/proxy-test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyUrl:e})}),s=await t.json();t.ok&&s?.ok?$({type:"success",message:`Proxy test OK (${s.status}) in ${s.elapsedMs}ms`}):$({type:"error",message:s?.error||"Proxy test failed"})}catch(e){$({type:"error",message:"An error occurred"})}finally{D(!1)}},I=async e=>{J(!0),$({type:"",message:""});try{let t=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({outboundProxyEnabled:e})}),s=await t.json();t.ok?(k(e=>({...e,...s})),U(e=>({...e,outboundProxyEnabled:s?.outboundProxyEnabled===!0})),$({type:"success",message:e?"Proxy enabled":"Proxy disabled"})):$({type:"error",message:s.error||"Failed to update proxy settings"})}catch(e){$({type:"error",message:"An error occurred"})}finally{J(!1)}},Z=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({fallbackStrategy:e})})).ok&&k(t=>({...t,fallbackStrategy:e}))}catch(e){console.error("Failed to update settings:",e)}},q=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStrategy:e})})).ok&&k(t=>({...t,comboStrategy:e}))}catch(e){console.error("Failed to update combo strategy:",e)}},z=async e=>{let t=parseInt(e);if(!isNaN(t)&&!(t<1))try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({stickyRoundRobinLimit:t})})).ok&&k(e=>({...e,stickyRoundRobinLimit:t}))}catch(e){console.error("Failed to update sticky limit:",e)}},B=async e=>{let t=parseInt(e);if(!isNaN(t)&&!(t<1))try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStickyRoundRobinLimit:t})})).ok&&k(e=>({...e,comboStickyRoundRobinLimit:t}))}catch(e){console.error("Failed to update combo sticky limit:",e)}},Q=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({enableObservability:e})})).ok&&k(t=>({...t,enableObservability:e}))}catch(e){console.error("Failed to update enableObservability:",e)}},W=async()=>{try{let e=await fetch("/api/settings");if(!e.ok)return;let t=await e.json();k(t)}catch(e){console.error("Failed to reload settings:",e)}},K=async()=>{R(!0),L({type:"",message:""});try{let e=await fetch("/api/settings/database");if(!e.ok){let t=await e.json().catch(()=>({}));throw Error(t.error||"Failed to export database")}let t=await e.json(),s=JSON.stringify(t,null,2),a=new Blob([s],{type:"application/json"}),r=URL.createObjectURL(a),o=document.createElement("a"),i=new Date().toISOString().replace(/[.:]/g,"-");o.href=r,o.download=`switchboard-backup-${i}.json`,document.body.appendChild(o),o.click(),document.body.removeChild(o),URL.revokeObjectURL(r),L({type:"success",message:"Database backup downloaded"})}catch(e){L({type:"error",message:e.message||"Failed to export database"})}finally{R(!1)}},G=async e=>{let t=e.target.files?.[0];if(T.current&&(T.current.value=""),t){R(!0),L({type:"",message:""});try{let e=await t.text(),s=JSON.parse(e),a=await fetch("/api/settings/database",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)}),r=await a.json().catch(()=>({}));if(!a.ok)throw Error(r.error||"Failed to import database");await W(),L({type:"success",message:"Database imported successfully"})}catch(e){L({type:"error",message:e.message||"Invalid backup file"})}finally{R(!1)}}},V=!0===v.enableObservability,X=async()=>{w(!0);try{await fetch("/api/version/shutdown",{method:"POST"})}catch(e){}w(!1),j(!1)};return(0,a.jsxs)("div",{className:"max-w-2xl mx-auto px-4 sm:px-0",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 mb-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 sm:gap-4",children:[(0,a.jsx)("div",{className:"size-10 sm:size-12 rounded-lg bg-green-500/10 text-green-500 flex items-center justify-center shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-xl sm:text-2xl",children:"computer"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-lg sm:text-xl font-semibold",children:"Local Mode"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Running on your machine"})]})]}),(0,a.jsx)("div",{className:"inline-flex p-1 rounded-lg bg-black/5 dark:bg-white/5 w-full sm:w-auto",children:["light","dark","system"].map(e=>(0,a.jsxs)("button",{type:"button",onClick:()=>s(e),className:(0,d.cn)("flex items-center justify-center gap-1 sm:gap-1.5 px-2 sm:px-3 py-1.5 rounded-md font-medium transition-all flex-1 sm:flex-initial",t===e?"bg-white dark:bg-white/10 text-text-main shadow-sm":"text-text-muted hover:text-text-main"),children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"light"===e?"light_mode":"dark"===e?"dark_mode":"contrast"}),(0,a.jsx)("span",{className:"capitalize text-xs sm:text-sm",children:e})]},e))})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 pt-4 border-t border-border",children:[(0,a.jsx)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between p-3 rounded-lg bg-bg border border-border gap-2",children:(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Database Location"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted font-mono break-all",children:"~/.switchboard/db/data.sqlite"})]})}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2",children:[(0,a.jsx)(o.$n,{variant:"secondary",icon:"download",onClick:()=>K(),loading:P,className:"w-full sm:w-auto",children:"Download Backup"}),(0,a.jsx)(o.$n,{variant:"outline",icon:"upload",onClick:()=>T.current?.click(),disabled:P,className:"w-full sm:w-auto",children:"Import Backup"}),(0,a.jsx)("input",{ref:T,type:"file",accept:"application/json,.json",className:"hidden",onChange:G})]}),O.message&&(0,a.jsx)("p",{className:`text-sm ${"error"===O.type?"text-red-500":"text-green-600 dark:text-green-400"}`,children:O.message})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"size-10 rounded-lg bg-blue-500/10 text-blue-500 flex items-center justify-center shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"language"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Language"})]}),(0,a.jsxs)("button",{onClick:()=>g(!0),className:"flex items-center justify-between w-full p-3 rounded-lg bg-bg border border-border hover:border-primary/50 transition-colors","data-i18n-skip":"true",children:[(0,a.jsx)("span",{className:"text-sm text-text-muted",children:"Display language"}),(0,a.jsx)("span",{className:"text-2xl",children:x.h[p]||"\uD83C\uDF10"})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-blue-500/10 text-blue-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"route"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Routing Strategy"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Round Robin"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Cycle through accounts to distribute load"})]}),(0,a.jsx)(o.lM,{checked:"round-robin"===v.fallbackStrategy,onChange:()=>Z("round-robin"===v.fallbackStrategy?"fill-first":"round-robin"),disabled:C})]}),"round-robin"===v.fallbackStrategy&&(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4 pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Sticky Limit"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Calls per account before switching"})]}),(0,a.jsx)(o.pd,{type:"number",min:"1",max:"10",value:v.stickyRoundRobinLimit||3,onChange:e=>z(e.target.value),disabled:C,className:"w-16 sm:w-20 text-center shrink-0"})]}),(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4 pt-4 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Combo Round Robin"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Cycle through providers in combos instead of always starting with first"})]}),(0,a.jsx)(o.lM,{checked:"round-robin"===v.comboStrategy,onChange:()=>q("round-robin"===v.comboStrategy?"fallback":"round-robin"),disabled:C})]}),"round-robin"===v.comboStrategy&&(0,a.jsxs)("div",{className:"flex items-center justify-between pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:"Combo Sticky Limit"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Calls per combo model before switching"})]}),(0,a.jsx)(o.pd,{type:"number",min:"1",max:"100",value:v.comboStickyRoundRobinLimit||1,onChange:e=>B(e.target.value),disabled:C,className:"w-20 text-center"})]}),(0,a.jsxs)("p",{className:"text-xs text-text-muted italic pt-2 border-t border-border/50",children:["round-robin"===v.fallbackStrategy?`Currently distributing requests across all available accounts with ${v.stickyRoundRobinLimit||3} calls per account.`:"Currently using accounts in priority order (Fill First).","round-robin"===v.comboStrategy?` Combos rotate after ${v.comboStickyRoundRobinLimit||1} call${1===(v.comboStickyRoundRobinLimit||1)?"":"s"} per model.`:" Combos always start with their first model."]})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-purple-500/10 text-purple-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"wifi"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Network"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Outbound Proxy"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Enable proxy for OAuth + provider outbound requests."})]}),(0,a.jsx)(o.lM,{checked:!0===v.outboundProxyEnabled,onChange:()=>I(!0!==v.outboundProxyEnabled),disabled:C||F})]}),!0===v.outboundProxyEnabled&&(0,a.jsxs)("form",{onSubmit:M,className:"flex flex-col gap-4 pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Proxy URL"}),(0,a.jsx)(o.pd,{placeholder:"http://127.0.0.1:7897",value:E.outboundProxyUrl,onChange:e=>U(t=>({...t,outboundProxyUrl:e.target.value})),disabled:C||F}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Leave empty to inherit existing env proxy (if any)."})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2 pt-2 border-t border-border/50",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"No Proxy"}),(0,a.jsx)(o.pd,{placeholder:"localhost,127.0.0.1",value:E.outboundNoProxy,onChange:e=>U(t=>({...t,outboundNoProxy:e.target.value})),disabled:C||F}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Comma-separated hostnames/domains to bypass the proxy."})]}),(0,a.jsxs)("div",{className:"pt-2 border-t border-border/50 flex flex-col sm:flex-row items-stretch sm:items-center gap-2",children:[(0,a.jsx)(o.$n,{type:"button",variant:"secondary",loading:_,disabled:C||F,onClick:H,className:"w-full sm:w-auto",children:"Test proxy URL"}),(0,a.jsx)(o.$n,{type:"submit",variant:"primary",loading:F,className:"w-full sm:w-auto",children:"Apply"})]})]}),A.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===A.type?"text-red-500":"text-green-500"} pt-2 border-t border-border/50`,children:A.message})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-orange-500/10 text-orange-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"monitoring"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Observability"})]}),(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Enable Observability"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Record request details for inspection in the logs view"})]}),(0,a.jsx)(o.lM,{checked:V,onChange:Q,disabled:C})]})]}),(0,a.jsx)("div",{className:"flex flex-col sm:flex-row gap-2",children:(0,a.jsx)(o.$n,{variant:"outline",fullWidth:!0,icon:"power_settings_new",onClick:()=>j(!0),className:"text-red-500 border-red-200 hover:bg-red-50 hover:border-red-300",children:"Shutdown"})}),(0,a.jsxs)("div",{className:"text-center text-xs sm:text-sm text-text-muted py-4",children:[(0,a.jsxs)("p",{children:[c.vQ.name," v",c.vQ.version]}),(0,a.jsx)("p",{className:"mt-1",children:"Local Mode - All data stored on your machine"})]})]}),(0,a.jsx)(l.default,{hideTrigger:!0,isOpen:y,onClose:e=>{g(!1),h(e)}}),(0,a.jsx)(i.ConfirmModal,{isOpen:f,onClose:()=>j(!1),onConfirm:X,title:"Close Proxy",message:"Are you sure you want to close the proxy server?",confirmText:"Close",cancelText:"Cancel",variant:"danger",loading:N})]})}},40746:(e,t,s)=>{Promise.resolve().then(s.bind(s,12151))}},e=>{e.O(0,[2574,3862,1610,2562,1321,705,5497,8441,3794,7358],()=>e(e.s=40746)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3471],{12151:(e,t,s)=>{"use strict";s.d(t,{default:()=>u});var a=s(95155),r=s(12115),o=s(35497),i=s(81127),l=s(21931),n=s(1620),d=s(31474),c=s(90620),m=s(93308),x=s(38202);function u({initialData:e}){let{theme:t,setTheme:s,isDark:b}=(0,n.D)(),[p,h]=(0,r.useState)("en"),[y,g]=(0,r.useState)(!1),[f,j]=(0,r.useState)(!1),[N,w]=(0,r.useState)(!1),[v,k]=(0,r.useState)(e?.settings||{fallbackStrategy:"fill-first"}),[C,S]=(0,r.useState)(!e?.settings),[P,R]=(0,r.useState)(!1),[O,L]=(0,r.useState)({type:"",message:""}),T=(0,r.useRef)(null),[E,U]=(0,r.useState)({outboundProxyEnabled:!1,outboundProxyUrl:"",outboundNoProxy:""}),[A,$]=(0,r.useState)({type:"",message:""}),[F,J]=(0,r.useState)(!1),[_,D]=(0,r.useState)(!1);(0,r.useEffect)(()=>{h(function(){if("u"<typeof document)return"en";let e=document.cookie.split(";").find(e=>e.trim().startsWith(`${m.CL}=`)),t=e?decodeURIComponent(e.split("=")[1]):"en";return(0,m.QC)(t)}())},[y]),(0,r.useEffect)(()=>{let t=e?.settings||v;U({outboundProxyEnabled:t?.outboundProxyEnabled===!0,outboundProxyUrl:t?.outboundProxyUrl||"",outboundNoProxy:t?.outboundNoProxy||""}),S(!1)},[e]);let M=async e=>{if(e.preventDefault(),!0===v.outboundProxyEnabled){J(!0),$({type:"",message:""});try{let e=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({outboundProxyUrl:E.outboundProxyUrl,outboundNoProxy:E.outboundNoProxy})}),t=await e.json();e.ok?(k(e=>({...e,...t})),$({type:"success",message:"Proxy settings applied"})):$({type:"error",message:t.error||"Failed to update proxy settings"})}catch(e){$({type:"error",message:"An error occurred"})}finally{J(!1)}}},H=async()=>{if(!0!==v.outboundProxyEnabled)return;let e=(E.outboundProxyUrl||"").trim();if(!e)return void $({type:"error",message:"Please enter a Proxy URL to test"});D(!0),$({type:"",message:""});try{let t=await fetch("/api/settings/proxy-test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyUrl:e})}),s=await t.json();t.ok&&s?.ok?$({type:"success",message:`Proxy test OK (${s.status}) in ${s.elapsedMs}ms`}):$({type:"error",message:s?.error||"Proxy test failed"})}catch(e){$({type:"error",message:"An error occurred"})}finally{D(!1)}},I=async e=>{J(!0),$({type:"",message:""});try{let t=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({outboundProxyEnabled:e})}),s=await t.json();t.ok?(k(e=>({...e,...s})),U(e=>({...e,outboundProxyEnabled:s?.outboundProxyEnabled===!0})),$({type:"success",message:e?"Proxy enabled":"Proxy disabled"})):$({type:"error",message:s.error||"Failed to update proxy settings"})}catch(e){$({type:"error",message:"An error occurred"})}finally{J(!1)}},Z=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({fallbackStrategy:e})})).ok&&k(t=>({...t,fallbackStrategy:e}))}catch(e){console.error("Failed to update settings:",e)}},q=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStrategy:e})})).ok&&k(t=>({...t,comboStrategy:e}))}catch(e){console.error("Failed to update combo strategy:",e)}},z=async e=>{let t=parseInt(e);if(!isNaN(t)&&!(t<1))try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({stickyRoundRobinLimit:t})})).ok&&k(e=>({...e,stickyRoundRobinLimit:t}))}catch(e){console.error("Failed to update sticky limit:",e)}},B=async e=>{let t=parseInt(e);if(!isNaN(t)&&!(t<1))try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStickyRoundRobinLimit:t})})).ok&&k(e=>({...e,comboStickyRoundRobinLimit:t}))}catch(e){console.error("Failed to update combo sticky limit:",e)}},Q=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({enableObservability:e})})).ok&&k(t=>({...t,enableObservability:e}))}catch(e){console.error("Failed to update enableObservability:",e)}},W=async()=>{try{let e=await fetch("/api/settings");if(!e.ok)return;let t=await e.json();k(t)}catch(e){console.error("Failed to reload settings:",e)}},K=async()=>{R(!0),L({type:"",message:""});try{let e=await fetch("/api/settings/database");if(!e.ok){let t=await e.json().catch(()=>({}));throw Error(t.error||"Failed to export database")}let t=await e.json(),s=JSON.stringify(t,null,2),a=new Blob([s],{type:"application/json"}),r=URL.createObjectURL(a),o=document.createElement("a"),i=new Date().toISOString().replace(/[.:]/g,"-");o.href=r,o.download=`switchboard-backup-${i}.json`,document.body.appendChild(o),o.click(),document.body.removeChild(o),URL.revokeObjectURL(r),L({type:"success",message:"Database backup downloaded"})}catch(e){L({type:"error",message:e.message||"Failed to export database"})}finally{R(!1)}},G=async e=>{let t=e.target.files?.[0];if(T.current&&(T.current.value=""),t){R(!0),L({type:"",message:""});try{let e=await t.text(),s=JSON.parse(e),a=await fetch("/api/settings/database",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)}),r=await a.json().catch(()=>({}));if(!a.ok)throw Error(r.error||"Failed to import database");await W(),L({type:"success",message:"Database imported successfully"})}catch(e){L({type:"error",message:e.message||"Invalid backup file"})}finally{R(!1)}}},V=!0===v.enableObservability,X=async()=>{w(!0);try{await fetch("/api/version/shutdown",{method:"POST"})}catch(e){}w(!1),j(!1)};return(0,a.jsxs)("div",{className:"max-w-2xl mx-auto px-4 sm:px-0",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 mb-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 sm:gap-4",children:[(0,a.jsx)("div",{className:"size-10 sm:size-12 rounded-lg bg-green-500/10 text-green-500 flex items-center justify-center shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-xl sm:text-2xl",children:"computer"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-lg sm:text-xl font-semibold",children:"Local Mode"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Running on your machine"})]})]}),(0,a.jsx)("div",{className:"inline-flex p-1 rounded-lg bg-black/5 dark:bg-white/5 w-full sm:w-auto",children:["light","dark","system"].map(e=>(0,a.jsxs)("button",{type:"button",onClick:()=>s(e),className:(0,d.cn)("flex items-center justify-center gap-1 sm:gap-1.5 px-2 sm:px-3 py-1.5 rounded-md font-medium transition-all flex-1 sm:flex-initial",t===e?"bg-white dark:bg-white/10 text-text-main shadow-sm":"text-text-muted hover:text-text-main"),children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"light"===e?"light_mode":"dark"===e?"dark_mode":"contrast"}),(0,a.jsx)("span",{className:"capitalize text-xs sm:text-sm",children:e})]},e))})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 pt-4 border-t border-border",children:[(0,a.jsx)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between p-3 rounded-lg bg-bg border border-border gap-2",children:(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Database Location"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted font-mono break-all",children:"~/.switchboard/db/data.sqlite"})]})}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2",children:[(0,a.jsx)(o.$n,{variant:"secondary",icon:"download",onClick:()=>K(),loading:P,className:"w-full sm:w-auto",children:"Download Backup"}),(0,a.jsx)(o.$n,{variant:"outline",icon:"upload",onClick:()=>T.current?.click(),disabled:P,className:"w-full sm:w-auto",children:"Import Backup"}),(0,a.jsx)("input",{ref:T,type:"file",accept:"application/json,.json",className:"hidden",onChange:G})]}),O.message&&(0,a.jsx)("p",{className:`text-sm ${"error"===O.type?"text-red-500":"text-green-600 dark:text-green-400"}`,children:O.message})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"size-10 rounded-lg bg-blue-500/10 text-blue-500 flex items-center justify-center shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"language"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Language"})]}),(0,a.jsxs)("button",{onClick:()=>g(!0),className:"flex items-center justify-between w-full p-3 rounded-lg bg-bg border border-border hover:border-primary/50 transition-colors","data-i18n-skip":"true",children:[(0,a.jsx)("span",{className:"text-sm text-text-muted",children:"Display language"}),(0,a.jsx)("span",{className:"text-2xl",children:x.h[p]||"\uD83C\uDF10"})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-blue-500/10 text-blue-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"route"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Routing Strategy"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Round Robin"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Cycle through accounts to distribute load"})]}),(0,a.jsx)(o.lM,{checked:"round-robin"===v.fallbackStrategy,onChange:()=>Z("round-robin"===v.fallbackStrategy?"fill-first":"round-robin"),disabled:C})]}),"round-robin"===v.fallbackStrategy&&(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4 pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Sticky Limit"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Calls per account before switching"})]}),(0,a.jsx)(o.pd,{type:"number",min:"1",max:"10",value:v.stickyRoundRobinLimit||3,onChange:e=>z(e.target.value),disabled:C,className:"w-16 sm:w-20 text-center shrink-0"})]}),(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4 pt-4 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Combo Round Robin"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Cycle through providers in combos instead of always starting with first"})]}),(0,a.jsx)(o.lM,{checked:"round-robin"===v.comboStrategy,onChange:()=>q("round-robin"===v.comboStrategy?"fallback":"round-robin"),disabled:C})]}),"round-robin"===v.comboStrategy&&(0,a.jsxs)("div",{className:"flex items-center justify-between pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:"Combo Sticky Limit"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Calls per combo model before switching"})]}),(0,a.jsx)(o.pd,{type:"number",min:"1",max:"100",value:v.comboStickyRoundRobinLimit||1,onChange:e=>B(e.target.value),disabled:C,className:"w-20 text-center"})]}),(0,a.jsxs)("p",{className:"text-xs text-text-muted italic pt-2 border-t border-border/50",children:["round-robin"===v.fallbackStrategy?`Currently distributing requests across all available accounts with ${v.stickyRoundRobinLimit||3} calls per account.`:"Currently using accounts in priority order (Fill First).","round-robin"===v.comboStrategy?` Combos rotate after ${v.comboStickyRoundRobinLimit||1} call${1===(v.comboStickyRoundRobinLimit||1)?"":"s"} per model.`:" Combos always start with their first model."]})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-purple-500/10 text-purple-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"wifi"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Network"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Outbound Proxy"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Enable proxy for OAuth + provider outbound requests."})]}),(0,a.jsx)(o.lM,{checked:!0===v.outboundProxyEnabled,onChange:()=>I(!0!==v.outboundProxyEnabled),disabled:C||F})]}),!0===v.outboundProxyEnabled&&(0,a.jsxs)("form",{onSubmit:M,className:"flex flex-col gap-4 pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Proxy URL"}),(0,a.jsx)(o.pd,{placeholder:"http://127.0.0.1:7897",value:E.outboundProxyUrl,onChange:e=>U(t=>({...t,outboundProxyUrl:e.target.value})),disabled:C||F}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Leave empty to inherit existing env proxy (if any)."})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2 pt-2 border-t border-border/50",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"No Proxy"}),(0,a.jsx)(o.pd,{placeholder:"localhost,127.0.0.1",value:E.outboundNoProxy,onChange:e=>U(t=>({...t,outboundNoProxy:e.target.value})),disabled:C||F}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Comma-separated hostnames/domains to bypass the proxy."})]}),(0,a.jsxs)("div",{className:"pt-2 border-t border-border/50 flex flex-col sm:flex-row items-stretch sm:items-center gap-2",children:[(0,a.jsx)(o.$n,{type:"button",variant:"secondary",loading:_,disabled:C||F,onClick:H,className:"w-full sm:w-auto",children:"Test proxy URL"}),(0,a.jsx)(o.$n,{type:"submit",variant:"primary",loading:F,className:"w-full sm:w-auto",children:"Apply"})]})]}),A.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===A.type?"text-red-500":"text-green-500"} pt-2 border-t border-border/50`,children:A.message})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-orange-500/10 text-orange-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"monitoring"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Observability"})]}),(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Enable Observability"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Record request details for inspection in the logs view"})]}),(0,a.jsx)(o.lM,{checked:V,onChange:Q,disabled:C})]})]}),(0,a.jsx)("div",{className:"flex flex-col sm:flex-row gap-2",children:(0,a.jsx)(o.$n,{variant:"outline",fullWidth:!0,icon:"power_settings_new",onClick:()=>j(!0),className:"text-red-500 border-red-200 hover:bg-red-50 hover:border-red-300",children:"Shutdown"})}),(0,a.jsxs)("div",{className:"text-center text-xs sm:text-sm text-text-muted py-4",children:[(0,a.jsxs)("p",{children:[c.vQ.name," v",c.vQ.version]}),(0,a.jsx)("p",{className:"mt-1",children:"Local Mode - All data stored on your machine"})]})]}),(0,a.jsx)(l.default,{hideTrigger:!0,isOpen:y,onClose:e=>{g(!1),h(e)}}),(0,a.jsx)(i.ConfirmModal,{isOpen:f,onClose:()=>j(!1),onConfirm:X,title:"Close Proxy",message:"Are you sure you want to close the proxy server?",confirmText:"Close",cancelText:"Cancel",variant:"danger",loading:N})]})}},34743:(e,t,s)=>{Promise.resolve().then(s.bind(s,12151))}},e=>{e.O(0,[2574,3862,1610,2562,1321,705,5497,8441,3794,7358],()=>e(e.s=34743)),_N_E=e.O()}]);