switchboard-router 0.5.20 → 0.6.0

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 (1457) hide show
  1. package/app/.next-cli-build/BUILD_ID +1 -1
  2. package/app/.next-cli-build/app-path-routes-manifest.json +18 -9
  3. package/app/.next-cli-build/build-manifest.json +4 -4
  4. package/app/.next-cli-build/prerender-manifest.json +3 -435
  5. package/app/.next-cli-build/required-server-files.json +14 -7
  6. package/app/.next-cli-build/routes-manifest.json +86 -13
  7. package/app/.next-cli-build/server/app/(dashboard)/dashboard/agent-library/page.js +2 -2
  8. package/app/.next-cli-build/server/app/(dashboard)/dashboard/agent-library/page.js.nft.json +1 -1
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/agent-library/page_client-reference-manifest.js +1 -1
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +2 -2
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +11 -24
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +2 -2
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +2 -2
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/routing/page.js +2 -2
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/routing/page.js.nft.json +1 -1
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/routing/page_client-reference-manifest.js +1 -1
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +2 -2
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +3 -3
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +16 -16
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +2 -2
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  37. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +4 -4
  38. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  39. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/page.js +2 -2
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/page.js.nft.json +1 -1
  42. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/page_client-reference-manifest.js +1 -1
  43. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +2 -2
  44. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  45. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  46. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +2 -2
  47. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  48. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  49. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +2 -2
  50. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  51. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  52. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +2 -2
  53. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  54. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  55. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +4 -4
  56. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  57. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  58. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +2 -2
  59. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  60. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  61. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +2 -2
  62. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  63. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  64. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +2 -2
  65. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  66. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  67. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/[id]/page.js +2 -2
  68. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/[id]/page.js.nft.json +1 -1
  69. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/[id]/page_client-reference-manifest.js +1 -1
  70. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +2 -2
  71. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  72. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  73. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +2 -2
  74. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
  75. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  76. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +2 -2
  77. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  78. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  79. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +2 -2
  80. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  81. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  82. package/app/.next-cli-build/server/app/_global-error/page.js +3 -3
  83. package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  84. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  85. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  86. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  87. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  88. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  89. package/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  90. package/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
  91. package/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
  92. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  93. package/app/.next-cli-build/server/app/_not-found/page.js +2 -2
  94. package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  95. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  96. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  97. package/app/.next-cli-build/server/app/_not-found.rsc +5 -5
  98. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +5 -5
  99. package/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
  100. package/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +5 -5
  101. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  102. package/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  103. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +3 -3
  104. package/app/.next-cli-build/server/app/api/agent-library/catalog/route.js +1 -1
  105. package/app/.next-cli-build/server/app/api/agent-library/catalog/route.js.nft.json +1 -1
  106. package/app/.next-cli-build/server/app/api/agent-library/catalog/route_client-reference-manifest.js +1 -1
  107. package/app/.next-cli-build/server/app/api/agent-library/doctor/route.js +1 -1
  108. package/app/.next-cli-build/server/app/api/agent-library/doctor/route.js.nft.json +1 -1
  109. package/app/.next-cli-build/server/app/api/agent-library/doctor/route_client-reference-manifest.js +1 -1
  110. package/app/.next-cli-build/server/app/api/agent-library/export/route.js +1 -1
  111. package/app/.next-cli-build/server/app/api/agent-library/export/route.js.nft.json +1 -1
  112. package/app/.next-cli-build/server/app/api/agent-library/export/route_client-reference-manifest.js +1 -1
  113. package/app/.next-cli-build/server/app/api/agent-library/mcp/route.js +1 -1
  114. package/app/.next-cli-build/server/app/api/agent-library/mcp/route.js.nft.json +1 -1
  115. package/app/.next-cli-build/server/app/api/agent-library/mcp/route_client-reference-manifest.js +1 -1
  116. package/app/.next-cli-build/server/app/api/agent-library/route.js +1 -1
  117. package/app/.next-cli-build/server/app/api/agent-library/route.js.nft.json +1 -1
  118. package/app/.next-cli-build/server/app/api/agent-library/route_client-reference-manifest.js +1 -1
  119. package/app/.next-cli-build/server/app/api/agent-library/skills/route.js +1 -1
  120. package/app/.next-cli-build/server/app/api/agent-library/skills/route.js.nft.json +1 -1
  121. package/app/.next-cli-build/server/app/api/agent-library/skills/route_client-reference-manifest.js +1 -1
  122. package/app/.next-cli-build/server/app/api/agent-library/sync/route.js +1 -1
  123. package/app/.next-cli-build/server/app/api/agent-library/sync/route.js.nft.json +1 -1
  124. package/app/.next-cli-build/server/app/api/agent-library/sync/route_client-reference-manifest.js +1 -1
  125. package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
  126. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  127. package/app/.next-cli-build/server/app/api/auth/status/route_client-reference-manifest.js +1 -1
  128. package/app/.next-cli-build/server/app/api/cli-tools/aider-settings/route.js +5 -11
  129. package/app/.next-cli-build/server/app/api/cli-tools/aider-settings/route.js.nft.json +1 -1
  130. package/app/.next-cli-build/server/app/api/cli-tools/aider-settings/route_client-reference-manifest.js +1 -1
  131. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +13 -38
  132. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  133. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route_client-reference-manifest.js +1 -1
  134. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
  135. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  136. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route_client-reference-manifest.js +1 -1
  137. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  138. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  139. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route_client-reference-manifest.js +1 -1
  140. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
  141. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  142. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route_client-reference-manifest.js +1 -1
  143. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +5 -2
  144. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  145. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route_client-reference-manifest.js +1 -1
  146. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +2 -1
  147. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  148. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route_client-reference-manifest.js +1 -1
  149. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +2 -2
  150. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  151. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route_client-reference-manifest.js +1 -1
  152. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +2 -2
  153. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  154. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route_client-reference-manifest.js +1 -1
  155. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +2 -2
  156. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  157. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route_client-reference-manifest.js +1 -1
  158. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +5 -9
  159. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  160. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route_client-reference-manifest.js +1 -1
  161. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +5 -2
  162. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  163. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route_client-reference-manifest.js +1 -1
  164. package/app/.next-cli-build/server/app/api/cli-tools/gemini-cli-settings/route.js +9 -10
  165. package/app/.next-cli-build/server/app/api/cli-tools/gemini-cli-settings/route.js.nft.json +1 -1
  166. package/app/.next-cli-build/server/app/api/cli-tools/gemini-cli-settings/route_client-reference-manifest.js +1 -1
  167. package/app/.next-cli-build/server/app/api/cli-tools/grok-settings/route.js +9 -6
  168. package/app/.next-cli-build/server/app/api/cli-tools/grok-settings/route.js.nft.json +1 -1
  169. package/app/.next-cli-build/server/app/api/cli-tools/grok-settings/route_client-reference-manifest.js +1 -1
  170. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +8 -10
  171. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  172. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route_client-reference-manifest.js +1 -1
  173. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +6 -2
  174. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  175. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route_client-reference-manifest.js +1 -1
  176. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +5 -2
  177. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  178. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route_client-reference-manifest.js +1 -1
  179. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +1 -2
  180. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  181. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route_client-reference-manifest.js +1 -1
  182. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +2 -2
  183. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  184. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route_client-reference-manifest.js +1 -1
  185. package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js +5 -2
  186. package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js.nft.json +1 -1
  187. package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route_client-reference-manifest.js +1 -1
  188. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  189. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  190. package/app/.next-cli-build/server/app/api/combos/[id]/route_client-reference-manifest.js +1 -1
  191. package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  192. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  193. package/app/.next-cli-build/server/app/api/combos/route_client-reference-manifest.js +1 -1
  194. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js +1 -1
  195. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
  196. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route_client-reference-manifest.js +1 -1
  197. package/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -1
  198. package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
  199. package/app/.next-cli-build/server/app/api/headroom/start/route_client-reference-manifest.js +1 -1
  200. package/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -1
  201. package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
  202. package/app/.next-cli-build/server/app/api/headroom/status/route_client-reference-manifest.js +1 -1
  203. package/app/.next-cli-build/server/app/api/headroom/stop/route.js +1 -1
  204. package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
  205. package/app/.next-cli-build/server/app/api/headroom/stop/route_client-reference-manifest.js +1 -1
  206. package/app/.next-cli-build/server/app/api/health/route.js +1 -1
  207. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  208. package/app/.next-cli-build/server/app/api/health/route_client-reference-manifest.js +1 -1
  209. package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  210. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  211. package/app/.next-cli-build/server/app/api/keys/[id]/route_client-reference-manifest.js +1 -1
  212. package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
  213. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  214. package/app/.next-cli-build/server/app/api/keys/route_client-reference-manifest.js +1 -1
  215. package/app/.next-cli-build/server/app/api/locale/route.js +1 -1
  216. package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  217. package/app/.next-cli-build/server/app/api/locale/route_client-reference-manifest.js +1 -1
  218. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +1 -1
  219. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  220. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route_client-reference-manifest.js +1 -1
  221. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +2 -2
  222. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  223. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route_client-reference-manifest.js +1 -1
  224. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  225. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  226. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route_client-reference-manifest.js +1 -1
  227. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  228. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  229. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route_client-reference-manifest.js +1 -1
  230. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  231. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  232. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route_client-reference-manifest.js +1 -1
  233. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  234. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  235. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route_client-reference-manifest.js +1 -1
  236. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
  237. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  238. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route_client-reference-manifest.js +1 -1
  239. package/app/.next-cli-build/server/app/api/mgmt/v1/combos/[id]/route.js +1 -0
  240. package/app/.next-cli-build/server/app/api/mgmt/v1/combos/[id]/route.js.nft.json +1 -0
  241. package/app/.next-cli-build/server/app/api/mgmt/v1/combos/[id]/route_client-reference-manifest.js +1 -0
  242. package/app/.next-cli-build/server/app/api/mgmt/v1/combos/[id]/strategy/route.js +1 -0
  243. package/app/.next-cli-build/server/app/api/mgmt/v1/combos/[id]/strategy/route.js.nft.json +1 -0
  244. package/app/.next-cli-build/server/app/api/mgmt/v1/combos/[id]/strategy/route_client-reference-manifest.js +1 -0
  245. package/app/.next-cli-build/server/app/api/mgmt/v1/combos/route.js +1 -0
  246. package/app/.next-cli-build/server/app/api/mgmt/v1/combos/route.js.nft.json +1 -0
  247. package/app/.next-cli-build/server/app/api/mgmt/v1/combos/route_client-reference-manifest.js +1 -0
  248. package/app/.next-cli-build/server/app/api/mgmt/v1/health/route.js +1 -0
  249. package/app/.next-cli-build/server/app/api/mgmt/v1/health/route.js.nft.json +1 -0
  250. package/app/.next-cli-build/server/app/api/mgmt/v1/health/route_client-reference-manifest.js +1 -0
  251. package/app/.next-cli-build/server/app/api/mgmt/v1/providers/route.js +1 -0
  252. package/app/.next-cli-build/server/app/api/mgmt/v1/providers/route.js.nft.json +1 -0
  253. package/app/.next-cli-build/server/app/api/mgmt/v1/providers/route_client-reference-manifest.js +1 -0
  254. package/app/.next-cli-build/server/app/api/mgmt/v1/routing/route.js +1 -0
  255. package/app/.next-cli-build/server/app/api/mgmt/v1/routing/route.js.nft.json +1 -0
  256. package/app/.next-cli-build/server/app/api/mgmt/v1/routing/route_client-reference-manifest.js +1 -0
  257. package/app/.next-cli-build/server/app/api/mgmt/v1/usage/route.js +1 -0
  258. package/app/.next-cli-build/server/app/api/mgmt/v1/usage/route.js.nft.json +1 -0
  259. package/app/.next-cli-build/server/app/api/mgmt/v1/usage/route_client-reference-manifest.js +1 -0
  260. package/app/.next-cli-build/server/app/api/mgmt/v1/version/route.js +1 -0
  261. package/app/.next-cli-build/server/app/api/mgmt/v1/version/route.js.nft.json +1 -0
  262. package/app/.next-cli-build/server/app/api/mgmt/v1/version/route_client-reference-manifest.js +1 -0
  263. package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  264. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  265. package/app/.next-cli-build/server/app/api/models/alias/route_client-reference-manifest.js +1 -1
  266. package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
  267. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  268. package/app/.next-cli-build/server/app/api/models/availability/route_client-reference-manifest.js +1 -1
  269. package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  270. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  271. package/app/.next-cli-build/server/app/api/models/custom/route_client-reference-manifest.js +1 -1
  272. package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
  273. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  274. package/app/.next-cli-build/server/app/api/models/disabled/route_client-reference-manifest.js +1 -1
  275. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  276. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  277. package/app/.next-cli-build/server/app/api/models/route_client-reference-manifest.js +1 -1
  278. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  279. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  280. package/app/.next-cli-build/server/app/api/models/test/route_client-reference-manifest.js +1 -1
  281. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  282. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  283. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route_client-reference-manifest.js +1 -1
  284. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
  285. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
  286. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route_client-reference-manifest.js +1 -1
  287. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  288. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  289. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route_client-reference-manifest.js +1 -1
  290. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +2 -2
  291. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  292. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route_client-reference-manifest.js +1 -1
  293. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  294. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  295. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route_client-reference-manifest.js +1 -1
  296. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  297. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  298. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route_client-reference-manifest.js +1 -1
  299. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  300. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  301. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route_client-reference-manifest.js +1 -1
  302. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
  303. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
  304. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route_client-reference-manifest.js +1 -1
  305. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
  306. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  307. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route_client-reference-manifest.js +1 -1
  308. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  309. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  310. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route_client-reference-manifest.js +1 -1
  311. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js +1 -1
  312. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
  313. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route_client-reference-manifest.js +1 -1
  314. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  315. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  316. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route_client-reference-manifest.js +1 -1
  317. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  318. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  319. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route_client-reference-manifest.js +1 -1
  320. package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  321. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  322. package/app/.next-cli-build/server/app/api/pricing/route_client-reference-manifest.js +1 -1
  323. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
  324. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  325. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route_client-reference-manifest.js +1 -1
  326. package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  327. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  328. package/app/.next-cli-build/server/app/api/provider-nodes/route_client-reference-manifest.js +1 -1
  329. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
  330. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  331. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route_client-reference-manifest.js +1 -1
  332. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/batch/route.js +1 -1
  333. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/batch/route.js.nft.json +1 -1
  334. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/batch/route_client-reference-manifest.js +1 -1
  335. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/cache/route.js +1 -1
  336. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/cache/route.js.nft.json +1 -1
  337. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/cache/route_client-reference-manifest.js +1 -1
  338. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/prepare/route.js +1 -1
  339. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/prepare/route.js.nft.json +1 -1
  340. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/prepare/route_client-reference-manifest.js +1 -1
  341. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/remove-unavailable/route.js +1 -1
  342. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/remove-unavailable/route.js.nft.json +1 -1
  343. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/remove-unavailable/route_client-reference-manifest.js +1 -1
  344. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  345. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  346. package/app/.next-cli-build/server/app/api/providers/[id]/models/route_client-reference-manifest.js +1 -1
  347. package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  348. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  349. package/app/.next-cli-build/server/app/api/providers/[id]/route_client-reference-manifest.js +1 -1
  350. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  351. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  352. package/app/.next-cli-build/server/app/api/providers/[id]/test/route_client-reference-manifest.js +1 -1
  353. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  354. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  355. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route_client-reference-manifest.js +1 -1
  356. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  357. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  358. package/app/.next-cli-build/server/app/api/providers/client/route_client-reference-manifest.js +1 -1
  359. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
  360. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  361. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route_client-reference-manifest.js +1 -1
  362. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  363. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  364. package/app/.next-cli-build/server/app/api/providers/route_client-reference-manifest.js +1 -1
  365. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
  366. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  367. package/app/.next-cli-build/server/app/api/providers/suggested-models/route_client-reference-manifest.js +1 -1
  368. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  369. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  370. package/app/.next-cli-build/server/app/api/providers/test-batch/route_client-reference-manifest.js +1 -1
  371. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  372. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  373. package/app/.next-cli-build/server/app/api/providers/validate/route_client-reference-manifest.js +1 -1
  374. package/app/.next-cli-build/server/app/api/routing/feedback/route.js +1 -0
  375. package/app/.next-cli-build/server/app/api/routing/feedback/route.js.nft.json +1 -0
  376. package/app/.next-cli-build/server/app/api/routing/feedback/route_client-reference-manifest.js +1 -0
  377. package/app/.next-cli-build/server/app/api/routing/insights/route.js +1 -1
  378. package/app/.next-cli-build/server/app/api/routing/insights/route.js.nft.json +1 -1
  379. package/app/.next-cli-build/server/app/api/routing/insights/route_client-reference-manifest.js +1 -1
  380. package/app/.next-cli-build/server/app/api/routing/learn/route.js +1 -1
  381. package/app/.next-cli-build/server/app/api/routing/learn/route.js.nft.json +1 -1
  382. package/app/.next-cli-build/server/app/api/routing/learn/route_client-reference-manifest.js +1 -1
  383. package/app/.next-cli-build/server/app/api/routing/stats/route.js +1 -0
  384. package/app/.next-cli-build/server/app/api/routing/stats/route.js.nft.json +1 -0
  385. package/app/.next-cli-build/server/app/api/routing/stats/route_client-reference-manifest.js +1 -0
  386. package/app/.next-cli-build/server/app/api/routing/versions/promote/route.js +1 -1
  387. package/app/.next-cli-build/server/app/api/routing/versions/promote/route.js.nft.json +1 -1
  388. package/app/.next-cli-build/server/app/api/routing/versions/promote/route_client-reference-manifest.js +1 -1
  389. package/app/.next-cli-build/server/app/api/routing/versions/rollback/route.js +1 -1
  390. package/app/.next-cli-build/server/app/api/routing/versions/rollback/route.js.nft.json +1 -1
  391. package/app/.next-cli-build/server/app/api/routing/versions/rollback/route_client-reference-manifest.js +1 -1
  392. package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  393. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  394. package/app/.next-cli-build/server/app/api/settings/database/route_client-reference-manifest.js +1 -1
  395. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
  396. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  397. package/app/.next-cli-build/server/app/api/settings/proxy-test/route_client-reference-manifest.js +1 -1
  398. package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  399. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  400. package/app/.next-cli-build/server/app/api/settings/route_client-reference-manifest.js +1 -1
  401. package/app/.next-cli-build/server/app/api/shutdown/route.js +1 -1
  402. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  403. package/app/.next-cli-build/server/app/api/shutdown/route_client-reference-manifest.js +1 -1
  404. package/app/.next-cli-build/server/app/api/skills/[id]/route.js +1 -1
  405. package/app/.next-cli-build/server/app/api/skills/[id]/route.js.nft.json +1 -1
  406. package/app/.next-cli-build/server/app/api/skills/[id]/route_client-reference-manifest.js +1 -1
  407. package/app/.next-cli-build/server/app/api/tags/route.js +1 -1
  408. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  409. package/app/.next-cli-build/server/app/api/tags/route_client-reference-manifest.js +1 -1
  410. package/app/.next-cli-build/server/app/api/token-saver/vault-stats/route.js +1 -0
  411. package/app/.next-cli-build/server/app/api/token-saver/vault-stats/route.js.nft.json +1 -0
  412. package/app/.next-cli-build/server/app/api/token-saver/vault-stats/route_client-reference-manifest.js +1 -0
  413. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  414. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  415. package/app/.next-cli-build/server/app/api/translator/console-logs/route_client-reference-manifest.js +1 -1
  416. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
  417. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  418. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route_client-reference-manifest.js +1 -1
  419. package/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
  420. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  421. package/app/.next-cli-build/server/app/api/translator/load/route_client-reference-manifest.js +1 -1
  422. package/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
  423. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  424. package/app/.next-cli-build/server/app/api/translator/save/route_client-reference-manifest.js +1 -1
  425. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  426. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  427. package/app/.next-cli-build/server/app/api/translator/send/route_client-reference-manifest.js +1 -1
  428. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  429. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  430. package/app/.next-cli-build/server/app/api/translator/translate/route_client-reference-manifest.js +1 -1
  431. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
  432. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
  433. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route_client-reference-manifest.js +1 -1
  434. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  435. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  436. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route_client-reference-manifest.js +1 -1
  437. package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  438. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  439. package/app/.next-cli-build/server/app/api/usage/chart/route_client-reference-manifest.js +1 -1
  440. package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  441. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  442. package/app/.next-cli-build/server/app/api/usage/history/route_client-reference-manifest.js +1 -1
  443. package/app/.next-cli-build/server/app/api/usage/logs/route.js +1 -1
  444. package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
  445. package/app/.next-cli-build/server/app/api/usage/logs/route_client-reference-manifest.js +1 -1
  446. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  447. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  448. package/app/.next-cli-build/server/app/api/usage/providers/route_client-reference-manifest.js +1 -1
  449. package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  450. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  451. package/app/.next-cli-build/server/app/api/usage/request-details/route_client-reference-manifest.js +1 -1
  452. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  453. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  454. package/app/.next-cli-build/server/app/api/usage/request-logs/route_client-reference-manifest.js +1 -1
  455. package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  456. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  457. package/app/.next-cli-build/server/app/api/usage/stats/route_client-reference-manifest.js +1 -1
  458. package/app/.next-cli-build/server/app/api/usage/stream/route.js +2 -2
  459. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  460. package/app/.next-cli-build/server/app/api/usage/stream/route_client-reference-manifest.js +1 -1
  461. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  462. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  463. package/app/.next-cli-build/server/app/api/v1/api/chat/route_client-reference-manifest.js +1 -1
  464. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  465. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  466. package/app/.next-cli-build/server/app/api/v1/audio/speech/route_client-reference-manifest.js +1 -1
  467. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  468. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  469. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route_client-reference-manifest.js +1 -1
  470. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
  471. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  472. package/app/.next-cli-build/server/app/api/v1/audio/voices/route_client-reference-manifest.js +1 -1
  473. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  474. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  475. package/app/.next-cli-build/server/app/api/v1/chat/completions/route_client-reference-manifest.js +1 -1
  476. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  477. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  478. package/app/.next-cli-build/server/app/api/v1/embeddings/route_client-reference-manifest.js +1 -1
  479. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +2 -2
  480. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  481. package/app/.next-cli-build/server/app/api/v1/images/generations/route_client-reference-manifest.js +1 -1
  482. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
  483. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  484. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route_client-reference-manifest.js +1 -1
  485. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  486. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  487. package/app/.next-cli-build/server/app/api/v1/messages/route_client-reference-manifest.js +1 -1
  488. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
  489. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  490. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route_client-reference-manifest.js +1 -1
  491. package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  492. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  493. package/app/.next-cli-build/server/app/api/v1/models/info/route_client-reference-manifest.js +1 -1
  494. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  495. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  496. package/app/.next-cli-build/server/app/api/v1/models/route_client-reference-manifest.js +1 -1
  497. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  498. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  499. package/app/.next-cli-build/server/app/api/v1/responses/compact/route_client-reference-manifest.js +1 -1
  500. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  501. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  502. package/app/.next-cli-build/server/app/api/v1/responses/route_client-reference-manifest.js +1 -1
  503. package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  504. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  505. package/app/.next-cli-build/server/app/api/v1/route_client-reference-manifest.js +1 -1
  506. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  507. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  508. package/app/.next-cli-build/server/app/api/v1/search/route_client-reference-manifest.js +1 -1
  509. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  510. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  511. package/app/.next-cli-build/server/app/api/v1/web/fetch/route_client-reference-manifest.js +1 -1
  512. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  513. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  514. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route_client-reference-manifest.js +1 -1
  515. package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  516. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  517. package/app/.next-cli-build/server/app/api/v1beta/models/route_client-reference-manifest.js +1 -1
  518. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  519. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  520. package/app/.next-cli-build/server/app/api/version/route_client-reference-manifest.js +1 -1
  521. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  522. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  523. package/app/.next-cli-build/server/app/api/version/shutdown/route_client-reference-manifest.js +1 -1
  524. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  525. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  526. package/app/.next-cli-build/server/app/api/version/update/route_client-reference-manifest.js +1 -1
  527. package/app/.next-cli-build/server/app/callback/page.js +2 -2
  528. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  529. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  530. package/app/.next-cli-build/server/app/callback.html +1 -1
  531. package/app/.next-cli-build/server/app/callback.rsc +6 -6
  532. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +6 -6
  533. package/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
  534. package/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +5 -5
  535. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +3 -3
  536. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +2 -2
  537. package/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
  538. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +2 -2
  539. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  540. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  541. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  542. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +6 -6
  543. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +6 -6
  544. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  545. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +5 -5
  546. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +3 -3
  547. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +2 -2
  548. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
  549. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
  550. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
  551. package/app/.next-cli-build/server/app/favicon.ico/route.js +1 -1
  552. package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
  553. package/app/.next-cli-build/server/app/index.html +1 -1
  554. package/app/.next-cli-build/server/app/index.rsc +5 -5
  555. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  556. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +5 -5
  557. package/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
  558. package/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +5 -5
  559. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +3 -3
  560. package/app/.next-cli-build/server/app/landing/page.js +2 -2
  561. package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  562. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  563. package/app/.next-cli-build/server/app/landing.html +1 -1
  564. package/app/.next-cli-build/server/app/landing.rsc +6 -6
  565. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +6 -6
  566. package/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
  567. package/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +5 -5
  568. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +3 -3
  569. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +2 -2
  570. package/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
  571. package/app/.next-cli-build/server/app/login/page.js +2 -2
  572. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  573. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  574. package/app/.next-cli-build/server/app/login.html +1 -1
  575. package/app/.next-cli-build/server/app/login.rsc +5 -5
  576. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +5 -5
  577. package/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
  578. package/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +5 -5
  579. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +3 -3
  580. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +1 -1
  581. package/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
  582. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js +2 -2
  583. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  584. package/app/.next-cli-build/server/app/manifest.webmanifest/route_client-reference-manifest.js +1 -1
  585. package/app/.next-cli-build/server/app/page.js +2 -2
  586. package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  587. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  588. package/app/.next-cli-build/server/app-paths-manifest.json +18 -9
  589. package/app/.next-cli-build/server/chunks/1062.js +64 -0
  590. package/app/.next-cli-build/server/chunks/1064.js +104 -0
  591. package/app/.next-cli-build/server/chunks/1294.js +49 -0
  592. package/app/.next-cli-build/server/chunks/159.js +1 -0
  593. package/app/.next-cli-build/server/chunks/1808.js +1 -0
  594. package/app/.next-cli-build/server/chunks/1814.js +2 -2
  595. package/app/.next-cli-build/server/chunks/194.js +1 -0
  596. package/app/.next-cli-build/server/chunks/1998.js +1 -1
  597. package/app/.next-cli-build/server/chunks/241.js +1 -1
  598. package/app/.next-cli-build/server/chunks/2712.js +3 -0
  599. package/app/.next-cli-build/server/chunks/2750.js +31 -0
  600. package/app/.next-cli-build/server/chunks/2925.js +1 -0
  601. package/app/.next-cli-build/server/chunks/3072.js +2 -0
  602. package/app/.next-cli-build/server/chunks/3075.js +1 -0
  603. package/app/.next-cli-build/server/chunks/319.js +4 -4
  604. package/app/.next-cli-build/server/chunks/3535.js +1 -1
  605. package/app/.next-cli-build/server/chunks/3546.js +1 -1
  606. package/app/.next-cli-build/server/chunks/3593.js +2 -2
  607. package/app/.next-cli-build/server/chunks/3675.js +1 -0
  608. package/app/.next-cli-build/server/chunks/369.js +70 -0
  609. package/app/.next-cli-build/server/chunks/3904.js +1 -0
  610. package/app/.next-cli-build/server/chunks/3986.js +49 -14
  611. package/app/.next-cli-build/server/chunks/4126.js +5 -0
  612. package/app/.next-cli-build/server/chunks/4176.js +1 -0
  613. package/app/.next-cli-build/server/chunks/4192.js +1 -0
  614. package/app/.next-cli-build/server/chunks/4194.js +1 -0
  615. package/app/.next-cli-build/server/chunks/440.js +26 -0
  616. package/app/.next-cli-build/server/chunks/4646.js +1 -0
  617. package/app/.next-cli-build/server/chunks/4739.js +2 -2
  618. package/app/.next-cli-build/server/chunks/4746.js +1 -1
  619. package/app/.next-cli-build/server/chunks/4776.js +33 -0
  620. package/app/.next-cli-build/server/chunks/4780.js +2 -2
  621. package/app/.next-cli-build/server/chunks/4803.js +9 -0
  622. package/app/.next-cli-build/server/chunks/4904.js +10 -0
  623. package/app/.next-cli-build/server/chunks/507.js +1 -1
  624. package/app/.next-cli-build/server/chunks/5115.js +67 -0
  625. package/app/.next-cli-build/server/chunks/5139.js +1 -0
  626. package/app/.next-cli-build/server/chunks/5258.js +2 -2
  627. package/app/.next-cli-build/server/chunks/5350.js +1 -0
  628. package/app/.next-cli-build/server/chunks/5615.js +3 -3
  629. package/app/.next-cli-build/server/chunks/5821.js +1 -0
  630. package/app/.next-cli-build/server/chunks/6103.js +1 -0
  631. package/app/.next-cli-build/server/chunks/615.js +1 -1
  632. package/app/.next-cli-build/server/chunks/6182.js +3 -3
  633. package/app/.next-cli-build/server/chunks/6252.js +9 -0
  634. package/app/.next-cli-build/server/chunks/6448.js +109 -0
  635. package/app/.next-cli-build/server/chunks/6470.js +1 -0
  636. package/app/.next-cli-build/server/chunks/6492.js +1 -0
  637. package/app/.next-cli-build/server/chunks/6844.js +1 -1
  638. package/app/.next-cli-build/server/chunks/698.js +1 -1
  639. package/app/.next-cli-build/server/chunks/7141.js +1 -0
  640. package/app/.next-cli-build/server/chunks/7155.js +1 -0
  641. package/app/.next-cli-build/server/chunks/7250.js +1 -0
  642. package/app/.next-cli-build/server/chunks/7335.js +1 -0
  643. package/app/.next-cli-build/server/chunks/7557.js +8 -0
  644. package/app/.next-cli-build/server/chunks/7662.js +1 -0
  645. package/app/.next-cli-build/server/chunks/7753.js +1 -0
  646. package/app/.next-cli-build/server/chunks/7774.js +20 -19
  647. package/app/.next-cli-build/server/chunks/7828.js +1 -0
  648. package/app/.next-cli-build/server/chunks/7965.js +2 -2
  649. package/app/.next-cli-build/server/chunks/8062.js +9 -0
  650. package/app/.next-cli-build/server/chunks/8117.js +1 -0
  651. package/app/.next-cli-build/server/chunks/8129.js +1 -0
  652. package/app/.next-cli-build/server/chunks/8400.js +153 -0
  653. package/app/.next-cli-build/server/chunks/8469.js +9 -0
  654. package/app/.next-cli-build/server/chunks/8520.js +1 -1
  655. package/app/.next-cli-build/server/chunks/8666.js +1 -0
  656. package/app/.next-cli-build/server/chunks/869.js +1 -0
  657. package/app/.next-cli-build/server/chunks/8775.js +1 -1
  658. package/app/.next-cli-build/server/chunks/8998.js +486 -0
  659. package/app/.next-cli-build/server/chunks/9046.js +1 -0
  660. package/app/.next-cli-build/server/chunks/9062.js +104 -0
  661. package/app/.next-cli-build/server/chunks/9261.js +88 -0
  662. package/app/.next-cli-build/server/chunks/9291.js +1 -0
  663. package/app/.next-cli-build/server/chunks/9397.js +1 -0
  664. package/app/.next-cli-build/server/chunks/9489.js +8 -0
  665. package/app/.next-cli-build/server/chunks/9508.js +45 -0
  666. package/app/.next-cli-build/server/chunks/9613.js +1 -0
  667. package/app/.next-cli-build/server/chunks/9696.js +7 -0
  668. package/app/.next-cli-build/server/chunks/995.js +1 -0
  669. package/app/.next-cli-build/server/chunks/static/media/catalog.e7ada387.json +1710 -0
  670. package/app/.next-cli-build/server/instrumentation.js +1 -0
  671. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  672. package/app/.next-cli-build/server/middleware.js +11 -11
  673. package/app/.next-cli-build/server/next-font-manifest.js +1 -1
  674. package/app/.next-cli-build/server/next-font-manifest.json +1 -1
  675. package/app/.next-cli-build/server/pages/404.html +1 -1
  676. package/app/.next-cli-build/server/pages/500.html +1 -1
  677. package/app/.next-cli-build/server/server-reference-manifest.js +1 -1
  678. package/app/.next-cli-build/server/server-reference-manifest.json +1 -1
  679. package/app/.next-cli-build/server/webpack-runtime.js +1 -1
  680. package/app/.next-cli-build/static/chunks/1321-a44fdd7adfc172fb.js +1 -0
  681. package/app/.next-cli-build/static/chunks/136-b76ff55769d5ecb1.js +1 -0
  682. package/app/.next-cli-build/static/chunks/2280-61262f8359f37a85.js +64 -0
  683. package/app/.next-cli-build/static/chunks/2493-6241eb181f2ecb6e.js +67 -0
  684. package/app/.next-cli-build/static/chunks/5497-aa5f62602eba33e9.js +7 -0
  685. package/app/.next-cli-build/static/chunks/7592-bbf465c7acd2478e.js +1 -0
  686. package/app/.next-cli-build/static/chunks/782-3676be0287313117.js +3 -0
  687. package/app/.next-cli-build/static/chunks/8500-287dd3e5d372ba6f.js +1 -0
  688. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/agent-library/page-3eb83b61eb3cbc9f.js +1 -0
  689. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/basic-chat/page-04509a38b9fd3dcf.js +1 -0
  690. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/page-fa35870caaeabe20.js +1 -0
  691. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/page-aa9c65a5e73a3f5d.js +1 -0
  692. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-a8d77d24b4c71915.js +1 -0
  693. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/routing/page-95f09ae849f539d6.js +1 -0
  694. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/page-6678759c536b4008.js +1 -0
  695. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-59e92d48daea1aed.js +3 -0
  696. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page-183cf5498e6d3e42.js +59 -0
  697. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/page-b67e7e3b9acaf1cc.js +1 -0
  698. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/combo/[id]/page-a4bad553cba810e7.js +4 -0
  699. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/page-0568602ac2385103.js +1 -0
  700. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/web/page-f6e3507247a819e5.js +1 -0
  701. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/page-08fe6612a31239da.js +1 -0
  702. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-27ae229b00137a0b.js +1 -0
  703. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-a1ab95a02951c91d.js +1 -0
  704. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-0d7fcdbff356b2ab.js +10 -0
  705. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/new/page-608cdc11e7047159.js +1 -0
  706. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-ad84a479883e6cc3.js +1 -0
  707. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-f312c1076859630e.js +1 -0
  708. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/[id]/page-90277b8688f387c1.js +1 -0
  709. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/page-33e127c15efc66a5.js +1 -0
  710. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/page-0f74a450b98fa125.js +1 -0
  711. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/translator/page-ad2eda4b48c9319b.js +1 -0
  712. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/page-025d20cc7b091120.js +1 -0
  713. package/app/.next-cli-build/static/chunks/app/(dashboard)/layout-b06b9aec5dcdf486.js +1 -0
  714. package/app/.next-cli-build/static/chunks/app/_global-error/page-1d242eb898fee31e.js +1 -0
  715. package/app/.next-cli-build/static/chunks/app/_not-found/page-ee581ced4614e639.js +1 -0
  716. package/app/.next-cli-build/static/chunks/app/api/agent-library/catalog/route-1d242eb898fee31e.js +1 -0
  717. package/app/.next-cli-build/static/chunks/app/api/agent-library/doctor/route-1d242eb898fee31e.js +1 -0
  718. package/app/.next-cli-build/static/chunks/app/api/agent-library/export/route-1d242eb898fee31e.js +1 -0
  719. package/app/.next-cli-build/static/chunks/app/api/agent-library/mcp/route-1d242eb898fee31e.js +1 -0
  720. package/app/.next-cli-build/static/chunks/app/api/agent-library/route-1d242eb898fee31e.js +1 -0
  721. package/app/.next-cli-build/static/chunks/app/api/agent-library/skills/route-1d242eb898fee31e.js +1 -0
  722. package/app/.next-cli-build/static/chunks/app/api/agent-library/sync/route-1d242eb898fee31e.js +1 -0
  723. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-1d242eb898fee31e.js +1 -0
  724. package/app/.next-cli-build/static/chunks/app/api/cli-tools/aider-settings/route-1d242eb898fee31e.js +1 -0
  725. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-1d242eb898fee31e.js +1 -0
  726. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-1d242eb898fee31e.js +1 -0
  727. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-1d242eb898fee31e.js +1 -0
  728. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-1d242eb898fee31e.js +1 -0
  729. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-1d242eb898fee31e.js +1 -0
  730. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-1d242eb898fee31e.js +1 -0
  731. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-1d242eb898fee31e.js +1 -0
  732. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-1d242eb898fee31e.js +1 -0
  733. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-1d242eb898fee31e.js +1 -0
  734. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-1d242eb898fee31e.js +1 -0
  735. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-1d242eb898fee31e.js +1 -0
  736. package/app/.next-cli-build/static/chunks/app/api/cli-tools/gemini-cli-settings/route-1d242eb898fee31e.js +1 -0
  737. package/app/.next-cli-build/static/chunks/app/api/cli-tools/grok-settings/route-1d242eb898fee31e.js +1 -0
  738. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-1d242eb898fee31e.js +1 -0
  739. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-1d242eb898fee31e.js +1 -0
  740. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-1d242eb898fee31e.js +1 -0
  741. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-1d242eb898fee31e.js +1 -0
  742. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-1d242eb898fee31e.js +1 -0
  743. package/app/.next-cli-build/static/chunks/app/api/cli-tools/pi-settings/route-1d242eb898fee31e.js +1 -0
  744. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-1d242eb898fee31e.js +1 -0
  745. package/app/.next-cli-build/static/chunks/app/api/combos/route-1d242eb898fee31e.js +1 -0
  746. package/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-1d242eb898fee31e.js +1 -0
  747. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-1d242eb898fee31e.js +1 -0
  748. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-1d242eb898fee31e.js +1 -0
  749. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-1d242eb898fee31e.js +1 -0
  750. package/app/.next-cli-build/static/chunks/app/api/health/route-1d242eb898fee31e.js +1 -0
  751. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-1d242eb898fee31e.js +1 -0
  752. package/app/.next-cli-build/static/chunks/app/api/keys/route-1d242eb898fee31e.js +1 -0
  753. package/app/.next-cli-build/static/chunks/app/api/locale/route-1d242eb898fee31e.js +1 -0
  754. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-1d242eb898fee31e.js +1 -0
  755. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-1d242eb898fee31e.js +1 -0
  756. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-1d242eb898fee31e.js +1 -0
  757. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-1d242eb898fee31e.js +1 -0
  758. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-1d242eb898fee31e.js +1 -0
  759. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-1d242eb898fee31e.js +1 -0
  760. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-1d242eb898fee31e.js +1 -0
  761. package/app/.next-cli-build/static/chunks/app/api/mgmt/v1/combos/[id]/route-1d242eb898fee31e.js +1 -0
  762. package/app/.next-cli-build/static/chunks/app/api/mgmt/v1/combos/[id]/strategy/route-1d242eb898fee31e.js +1 -0
  763. package/app/.next-cli-build/static/chunks/app/api/mgmt/v1/combos/route-1d242eb898fee31e.js +1 -0
  764. package/app/.next-cli-build/static/chunks/app/api/mgmt/v1/health/route-1d242eb898fee31e.js +1 -0
  765. package/app/.next-cli-build/static/chunks/app/api/mgmt/v1/providers/route-1d242eb898fee31e.js +1 -0
  766. package/app/.next-cli-build/static/chunks/app/api/mgmt/v1/routing/route-1d242eb898fee31e.js +1 -0
  767. package/app/.next-cli-build/static/chunks/app/api/mgmt/v1/usage/route-1d242eb898fee31e.js +1 -0
  768. package/app/.next-cli-build/static/chunks/app/api/mgmt/v1/version/route-1d242eb898fee31e.js +1 -0
  769. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-1d242eb898fee31e.js +1 -0
  770. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-1d242eb898fee31e.js +1 -0
  771. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-1d242eb898fee31e.js +1 -0
  772. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-1d242eb898fee31e.js +1 -0
  773. package/app/.next-cli-build/static/chunks/app/api/models/route-1d242eb898fee31e.js +1 -0
  774. package/app/.next-cli-build/static/chunks/app/api/models/test/route-1d242eb898fee31e.js +1 -0
  775. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-1d242eb898fee31e.js +1 -0
  776. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-1d242eb898fee31e.js +1 -0
  777. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-1d242eb898fee31e.js +1 -0
  778. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-1d242eb898fee31e.js +1 -0
  779. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-1d242eb898fee31e.js +1 -0
  780. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-1d242eb898fee31e.js +1 -0
  781. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-1d242eb898fee31e.js +1 -0
  782. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-1d242eb898fee31e.js +1 -0
  783. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-1d242eb898fee31e.js +1 -0
  784. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-1d242eb898fee31e.js +1 -0
  785. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-1d242eb898fee31e.js +1 -0
  786. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-1d242eb898fee31e.js +1 -0
  787. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-1d242eb898fee31e.js +1 -0
  788. package/app/.next-cli-build/static/chunks/app/api/pricing/route-1d242eb898fee31e.js +1 -0
  789. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-1d242eb898fee31e.js +1 -0
  790. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-1d242eb898fee31e.js +1 -0
  791. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-1d242eb898fee31e.js +1 -0
  792. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/model-probes/batch/route-1d242eb898fee31e.js +1 -0
  793. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/model-probes/cache/route-1d242eb898fee31e.js +1 -0
  794. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/model-probes/prepare/route-1d242eb898fee31e.js +1 -0
  795. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/model-probes/remove-unavailable/route-1d242eb898fee31e.js +1 -0
  796. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-1d242eb898fee31e.js +1 -0
  797. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-1d242eb898fee31e.js +1 -0
  798. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-1d242eb898fee31e.js +1 -0
  799. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-1d242eb898fee31e.js +1 -0
  800. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-1d242eb898fee31e.js +1 -0
  801. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-1d242eb898fee31e.js +1 -0
  802. package/app/.next-cli-build/static/chunks/app/api/providers/route-1d242eb898fee31e.js +1 -0
  803. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-1d242eb898fee31e.js +1 -0
  804. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-1d242eb898fee31e.js +1 -0
  805. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-1d242eb898fee31e.js +1 -0
  806. package/app/.next-cli-build/static/chunks/app/api/routing/feedback/route-1d242eb898fee31e.js +1 -0
  807. package/app/.next-cli-build/static/chunks/app/api/routing/insights/route-1d242eb898fee31e.js +1 -0
  808. package/app/.next-cli-build/static/chunks/app/api/routing/learn/route-1d242eb898fee31e.js +1 -0
  809. package/app/.next-cli-build/static/chunks/app/api/routing/stats/route-1d242eb898fee31e.js +1 -0
  810. package/app/.next-cli-build/static/chunks/app/api/routing/versions/promote/route-1d242eb898fee31e.js +1 -0
  811. package/app/.next-cli-build/static/chunks/app/api/routing/versions/rollback/route-1d242eb898fee31e.js +1 -0
  812. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-1d242eb898fee31e.js +1 -0
  813. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-1d242eb898fee31e.js +1 -0
  814. package/app/.next-cli-build/static/chunks/app/api/settings/route-1d242eb898fee31e.js +1 -0
  815. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-1d242eb898fee31e.js +1 -0
  816. package/app/.next-cli-build/static/chunks/app/api/skills/[id]/route-1d242eb898fee31e.js +1 -0
  817. package/app/.next-cli-build/static/chunks/app/api/tags/route-1d242eb898fee31e.js +1 -0
  818. package/app/.next-cli-build/static/chunks/app/api/token-saver/vault-stats/route-1d242eb898fee31e.js +1 -0
  819. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-1d242eb898fee31e.js +1 -0
  820. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-1d242eb898fee31e.js +1 -0
  821. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-1d242eb898fee31e.js +1 -0
  822. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-1d242eb898fee31e.js +1 -0
  823. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-1d242eb898fee31e.js +1 -0
  824. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-1d242eb898fee31e.js +1 -0
  825. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-1d242eb898fee31e.js +1 -0
  826. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-1d242eb898fee31e.js +1 -0
  827. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-1d242eb898fee31e.js +1 -0
  828. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-1d242eb898fee31e.js +1 -0
  829. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-1d242eb898fee31e.js +1 -0
  830. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-1d242eb898fee31e.js +1 -0
  831. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-1d242eb898fee31e.js +1 -0
  832. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-1d242eb898fee31e.js +1 -0
  833. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-1d242eb898fee31e.js +1 -0
  834. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-1d242eb898fee31e.js +1 -0
  835. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-1d242eb898fee31e.js +1 -0
  836. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-1d242eb898fee31e.js +1 -0
  837. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-1d242eb898fee31e.js +1 -0
  838. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-1d242eb898fee31e.js +1 -0
  839. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-1d242eb898fee31e.js +1 -0
  840. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-1d242eb898fee31e.js +1 -0
  841. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-1d242eb898fee31e.js +1 -0
  842. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-1d242eb898fee31e.js +1 -0
  843. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-1d242eb898fee31e.js +1 -0
  844. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-1d242eb898fee31e.js +1 -0
  845. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-1d242eb898fee31e.js +1 -0
  846. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-1d242eb898fee31e.js +1 -0
  847. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-1d242eb898fee31e.js +1 -0
  848. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-1d242eb898fee31e.js +1 -0
  849. package/app/.next-cli-build/static/chunks/app/api/v1/route-1d242eb898fee31e.js +1 -0
  850. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-1d242eb898fee31e.js +1 -0
  851. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-1d242eb898fee31e.js +1 -0
  852. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-1d242eb898fee31e.js +1 -0
  853. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-1d242eb898fee31e.js +1 -0
  854. package/app/.next-cli-build/static/chunks/app/api/version/route-1d242eb898fee31e.js +1 -0
  855. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-1d242eb898fee31e.js +1 -0
  856. package/app/.next-cli-build/static/chunks/app/api/version/update/route-1d242eb898fee31e.js +1 -0
  857. package/app/.next-cli-build/static/chunks/app/callback/page-5c1d863ff86ddc6e.js +1 -0
  858. package/app/.next-cli-build/static/chunks/app/dashboard/settings/pricing/page-4cfc7195d2a8bf0e.js +1 -0
  859. package/app/.next-cli-build/static/chunks/app/landing/page-9e06d57d9b215fd7.js +1 -0
  860. package/app/.next-cli-build/static/chunks/app/layout-214ea0ad8a3d8323.js +1 -0
  861. package/app/.next-cli-build/static/chunks/app/login/page-1d242eb898fee31e.js +1 -0
  862. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-1d242eb898fee31e.js +1 -0
  863. package/app/.next-cli-build/static/chunks/app/page-1d242eb898fee31e.js +1 -0
  864. package/app/.next-cli-build/static/chunks/framework-594babcea68f40f6.js +1 -0
  865. package/app/.next-cli-build/static/chunks/main-app-e5d01a79c4922432.js +1 -0
  866. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-1d242eb898fee31e.js +1 -0
  867. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-1d242eb898fee31e.js +1 -0
  868. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/global-error-f9c47afa2e4175d7.js +1 -0
  869. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-1d242eb898fee31e.js +1 -0
  870. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-1d242eb898fee31e.js +1 -0
  871. package/app/.next-cli-build/static/chunks/webpack-57b54315eb9fa808.js +1 -0
  872. package/app/.next-cli-build/static/css/92a5708a6b29ef8c.css +1 -0
  873. package/app/.next-cli-build/static/css/a26e7bdf55d5cb27.css +1 -0
  874. package/app/.next-cli-build/static/media/catalog.e7ada387.json +1710 -0
  875. package/app/.next-cli-build/static/media/material-symbols-outlined.f656244e.woff2 +0 -0
  876. package/app/.next-cli-build/static/sBwyl4vbyME9SYpTbTHkn/_buildManifest.js +1 -0
  877. package/app/custom-server.js +5 -5
  878. package/app/node_modules/postcss/lib/container.js +447 -0
  879. package/app/node_modules/postcss/lib/css-syntax-error.js +133 -0
  880. package/app/node_modules/postcss/lib/declaration.js +24 -0
  881. package/app/node_modules/postcss/lib/fromJSON.js +68 -0
  882. package/app/node_modules/postcss/lib/input.js +276 -0
  883. package/app/node_modules/postcss/lib/lazy-result.js +563 -0
  884. package/app/node_modules/postcss/lib/map-generator.js +376 -0
  885. package/app/node_modules/postcss/lib/no-work-result.js +137 -0
  886. package/app/node_modules/postcss/lib/node.js +456 -0
  887. package/app/node_modules/postcss/lib/parse.js +42 -0
  888. package/app/node_modules/postcss/lib/parser.js +618 -0
  889. package/app/node_modules/postcss/lib/postcss.js +101 -0
  890. package/app/node_modules/postcss/lib/previous-map.js +161 -0
  891. package/app/node_modules/postcss/lib/processor.js +67 -0
  892. package/app/node_modules/postcss/lib/result.js +42 -0
  893. package/app/node_modules/postcss/lib/rule.js +27 -0
  894. package/app/node_modules/postcss/lib/stringifier.js +374 -0
  895. package/app/node_modules/postcss/lib/tokenize.js +270 -0
  896. package/app/node_modules/postcss/package.json +88 -0
  897. package/app/node_modules/react/cjs/react.development.js +1 -1
  898. package/app/node_modules/react/cjs/react.production.js +1 -1
  899. package/app/node_modules/react/package.json +1 -1
  900. package/app/node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.js +1 -1
  901. package/app/node_modules/react-dom/cjs/react-dom-server-legacy.node.production.js +1 -1
  902. package/app/node_modules/react-dom/cjs/react-dom-server.browser.production.js +3 -3
  903. package/app/node_modules/react-dom/cjs/react-dom-server.edge.production.js +3 -3
  904. package/app/node_modules/react-dom/cjs/react-dom-server.node.production.js +3 -3
  905. package/app/node_modules/react-dom/cjs/react-dom.production.js +1 -1
  906. package/app/node_modules/react-dom/package.json +2 -2
  907. package/app/open-sse/package.json +4 -0
  908. package/app/open-sse/providers/generated/catalog.json +1710 -0
  909. package/app/package.json +35 -24
  910. package/app/public/i18n/literals/zh-CN.json +8 -0
  911. package/app/server.js +1 -1
  912. package/app/src/lib/db/adapters/betterSqliteAdapter.js +2 -3
  913. package/app/src/lib/db/adapters/bunSqliteAdapter.js +0 -2
  914. package/app/src/lib/db/adapters/nodeSqliteAdapter.js +0 -2
  915. package/app/src/lib/db/adapters/sqljsAdapter.js +23 -4
  916. package/app/src/lib/db/migrate.js +15 -4
  917. package/app/src/lib/updater/updater.js +67 -9
  918. package/app/src/mitm/server.js +2 -2
  919. package/app/src/shared/utils/apiKey.js +3 -7
  920. package/cli.js +205 -180
  921. package/hooks/sqliteRuntime.js +1 -7
  922. package/package.json +5 -5
  923. package/src/cli/api/client.js +3 -20
  924. package/src/cli/menus/settings.js +3 -62
  925. package/src/cli/tray/tray.js +18 -26
  926. package/src/shared/dataDir.js +61 -0
  927. package/src/shared/disableMitm.js +102 -0
  928. package/src/shared/openBrowser.js +43 -0
  929. package/app/.next/standalone/.next-cli-build/standalone/switchboard/.next/standalone/skills/switchboard/SKILL.md +0 -79
  930. package/app/.next/standalone/.next-cli-build/standalone/switchboard/.next/standalone/skills/switchboard-chat/SKILL.md +0 -116
  931. package/app/.next/standalone/.next-cli-build/standalone/switchboard/cli/app/.next/standalone/skills/switchboard/SKILL.md +0 -79
  932. package/app/.next/standalone/.next-cli-build/standalone/switchboard/cli/app/.next/standalone/skills/switchboard-chat/SKILL.md +0 -116
  933. package/app/.next/standalone/.next-cli-build/standalone/switchboard/cli/app/skills/switchboard/SKILL.md +0 -79
  934. package/app/.next/standalone/.next-cli-build/standalone/switchboard/cli/app/skills/switchboard-chat/SKILL.md +0 -116
  935. package/app/.next/standalone/.next-cli-build/standalone/switchboard/skills/switchboard/SKILL.md +0 -79
  936. package/app/.next/standalone/.next-cli-build/standalone/switchboard/skills/switchboard-chat/SKILL.md +0 -116
  937. package/app/.next/standalone/cli/app/.next/standalone/skills/switchboard/SKILL.md +0 -79
  938. package/app/.next/standalone/cli/app/.next/standalone/skills/switchboard-chat/SKILL.md +0 -116
  939. package/app/.next/standalone/cli/app/cli/app/.next/standalone/skills/switchboard/SKILL.md +0 -79
  940. package/app/.next/standalone/cli/app/cli/app/.next/standalone/skills/switchboard-chat/SKILL.md +0 -116
  941. package/app/.next/standalone/cli/app/cli/app/skills/switchboard/SKILL.md +0 -79
  942. package/app/.next/standalone/cli/app/cli/app/skills/switchboard-chat/SKILL.md +0 -116
  943. package/app/.next/standalone/cli/app/skills/switchboard/SKILL.md +0 -79
  944. package/app/.next/standalone/cli/app/skills/switchboard-chat/SKILL.md +0 -116
  945. package/app/.next/standalone/skills/switchboard/SKILL.md +0 -79
  946. package/app/.next/standalone/skills/switchboard-chat/SKILL.md +0 -116
  947. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +0 -2
  948. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +0 -1
  949. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route_client-reference-manifest.js +0 -1
  950. package/app/.next-cli-build/server/app/api/init/route.js +0 -1
  951. package/app/.next-cli-build/server/app/api/init/route.js.nft.json +0 -1
  952. package/app/.next-cli-build/server/app/api/init/route_client-reference-manifest.js +0 -1
  953. package/app/.next-cli-build/server/app/dashboard/agent-library.html +0 -1
  954. package/app/.next-cli-build/server/app/dashboard/agent-library.meta +0 -17
  955. package/app/.next-cli-build/server/app/dashboard/agent-library.rsc +0 -30
  956. package/app/.next-cli-build/server/app/dashboard/agent-library.segments/!KGRhc2hib2FyZCk/dashboard/agent-library/__PAGE__.segment.rsc +0 -9
  957. package/app/.next-cli-build/server/app/dashboard/agent-library.segments/!KGRhc2hib2FyZCk/dashboard/agent-library.segment.rsc +0 -5
  958. package/app/.next-cli-build/server/app/dashboard/agent-library.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +0 -5
  959. package/app/.next-cli-build/server/app/dashboard/agent-library.segments/!KGRhc2hib2FyZCk.segment.rsc +0 -7
  960. package/app/.next-cli-build/server/app/dashboard/agent-library.segments/_full.segment.rsc +0 -30
  961. package/app/.next-cli-build/server/app/dashboard/agent-library.segments/_head.segment.rsc +0 -6
  962. package/app/.next-cli-build/server/app/dashboard/agent-library.segments/_index.segment.rsc +0 -8
  963. package/app/.next-cli-build/server/app/dashboard/agent-library.segments/_tree.segment.rsc +0 -8
  964. package/app/.next-cli-build/server/app/dashboard/basic-chat.html +0 -1
  965. package/app/.next-cli-build/server/app/dashboard/basic-chat.meta +0 -17
  966. package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +0 -27
  967. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +0 -6
  968. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +0 -5
  969. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +0 -5
  970. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +0 -7
  971. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +0 -27
  972. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_head.segment.rsc +0 -6
  973. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_index.segment.rsc +0 -8
  974. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +0 -8
  975. package/app/.next-cli-build/server/app/dashboard/cli-tools.html +0 -1
  976. package/app/.next-cli-build/server/app/dashboard/cli-tools.meta +0 -17
  977. package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +0 -28
  978. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +0 -6
  979. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +0 -5
  980. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +0 -5
  981. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +0 -7
  982. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +0 -28
  983. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_head.segment.rsc +0 -6
  984. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_index.segment.rsc +0 -8
  985. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +0 -8
  986. package/app/.next-cli-build/server/app/dashboard/combos/routing.html +0 -1
  987. package/app/.next-cli-build/server/app/dashboard/combos/routing.meta +0 -18
  988. package/app/.next-cli-build/server/app/dashboard/combos/routing.rsc +0 -30
  989. package/app/.next-cli-build/server/app/dashboard/combos/routing.segments/!KGRhc2hib2FyZCk/dashboard/combos/routing/__PAGE__.segment.rsc +0 -9
  990. package/app/.next-cli-build/server/app/dashboard/combos/routing.segments/!KGRhc2hib2FyZCk/dashboard/combos/routing.segment.rsc +0 -5
  991. package/app/.next-cli-build/server/app/dashboard/combos/routing.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +0 -5
  992. package/app/.next-cli-build/server/app/dashboard/combos/routing.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +0 -5
  993. package/app/.next-cli-build/server/app/dashboard/combos/routing.segments/!KGRhc2hib2FyZCk.segment.rsc +0 -7
  994. package/app/.next-cli-build/server/app/dashboard/combos/routing.segments/_full.segment.rsc +0 -30
  995. package/app/.next-cli-build/server/app/dashboard/combos/routing.segments/_head.segment.rsc +0 -6
  996. package/app/.next-cli-build/server/app/dashboard/combos/routing.segments/_index.segment.rsc +0 -8
  997. package/app/.next-cli-build/server/app/dashboard/combos/routing.segments/_tree.segment.rsc +0 -8
  998. package/app/.next-cli-build/server/app/dashboard/combos.html +0 -1
  999. package/app/.next-cli-build/server/app/dashboard/combos.meta +0 -17
  1000. package/app/.next-cli-build/server/app/dashboard/combos.rsc +0 -28
  1001. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +0 -6
  1002. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +0 -5
  1003. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +0 -5
  1004. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +0 -7
  1005. package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +0 -28
  1006. package/app/.next-cli-build/server/app/dashboard/combos.segments/_head.segment.rsc +0 -6
  1007. package/app/.next-cli-build/server/app/dashboard/combos.segments/_index.segment.rsc +0 -8
  1008. package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +0 -8
  1009. package/app/.next-cli-build/server/app/dashboard/endpoint.html +0 -1
  1010. package/app/.next-cli-build/server/app/dashboard/endpoint.meta +0 -17
  1011. package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +0 -28
  1012. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +0 -6
  1013. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +0 -5
  1014. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +0 -5
  1015. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +0 -7
  1016. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +0 -28
  1017. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_head.segment.rsc +0 -6
  1018. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_index.segment.rsc +0 -8
  1019. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +0 -8
  1020. package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +0 -1
  1021. package/app/.next-cli-build/server/app/dashboard/media-providers/web.meta +0 -18
  1022. package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +0 -30
  1023. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +0 -9
  1024. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +0 -5
  1025. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +0 -5
  1026. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +0 -5
  1027. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +0 -7
  1028. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +0 -30
  1029. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +0 -6
  1030. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +0 -8
  1031. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +0 -8
  1032. package/app/.next-cli-build/server/app/dashboard/media-providers.html +0 -1
  1033. package/app/.next-cli-build/server/app/dashboard/media-providers.meta +0 -17
  1034. package/app/.next-cli-build/server/app/dashboard/media-providers.rsc +0 -30
  1035. package/app/.next-cli-build/server/app/dashboard/media-providers.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/__PAGE__.segment.rsc +0 -9
  1036. package/app/.next-cli-build/server/app/dashboard/media-providers.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +0 -5
  1037. package/app/.next-cli-build/server/app/dashboard/media-providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +0 -5
  1038. package/app/.next-cli-build/server/app/dashboard/media-providers.segments/!KGRhc2hib2FyZCk.segment.rsc +0 -7
  1039. package/app/.next-cli-build/server/app/dashboard/media-providers.segments/_full.segment.rsc +0 -30
  1040. package/app/.next-cli-build/server/app/dashboard/media-providers.segments/_head.segment.rsc +0 -6
  1041. package/app/.next-cli-build/server/app/dashboard/media-providers.segments/_index.segment.rsc +0 -8
  1042. package/app/.next-cli-build/server/app/dashboard/media-providers.segments/_tree.segment.rsc +0 -8
  1043. package/app/.next-cli-build/server/app/dashboard/mitm.html +0 -1
  1044. package/app/.next-cli-build/server/app/dashboard/mitm.meta +0 -17
  1045. package/app/.next-cli-build/server/app/dashboard/mitm.rsc +0 -27
  1046. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +0 -6
  1047. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +0 -5
  1048. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +0 -5
  1049. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +0 -7
  1050. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +0 -27
  1051. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_head.segment.rsc +0 -6
  1052. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_index.segment.rsc +0 -8
  1053. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +0 -8
  1054. package/app/.next-cli-build/server/app/dashboard/profile.html +0 -1
  1055. package/app/.next-cli-build/server/app/dashboard/profile.meta +0 -17
  1056. package/app/.next-cli-build/server/app/dashboard/profile.rsc +0 -28
  1057. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +0 -6
  1058. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +0 -5
  1059. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +0 -5
  1060. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +0 -7
  1061. package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +0 -28
  1062. package/app/.next-cli-build/server/app/dashboard/profile.segments/_head.segment.rsc +0 -6
  1063. package/app/.next-cli-build/server/app/dashboard/profile.segments/_index.segment.rsc +0 -8
  1064. package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +0 -8
  1065. package/app/.next-cli-build/server/app/dashboard/providers/new.html +0 -1
  1066. package/app/.next-cli-build/server/app/dashboard/providers/new.meta +0 -18
  1067. package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +0 -30
  1068. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +0 -9
  1069. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +0 -5
  1070. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +0 -5
  1071. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +0 -5
  1072. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +0 -7
  1073. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +0 -30
  1074. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_head.segment.rsc +0 -6
  1075. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_index.segment.rsc +0 -8
  1076. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +0 -8
  1077. package/app/.next-cli-build/server/app/dashboard/providers.html +0 -1
  1078. package/app/.next-cli-build/server/app/dashboard/providers.meta +0 -17
  1079. package/app/.next-cli-build/server/app/dashboard/providers.rsc +0 -28
  1080. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +0 -6
  1081. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +0 -5
  1082. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +0 -5
  1083. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +0 -7
  1084. package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +0 -28
  1085. package/app/.next-cli-build/server/app/dashboard/providers.segments/_head.segment.rsc +0 -6
  1086. package/app/.next-cli-build/server/app/dashboard/providers.segments/_index.segment.rsc +0 -8
  1087. package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +0 -8
  1088. package/app/.next-cli-build/server/app/dashboard/quota.html +0 -2
  1089. package/app/.next-cli-build/server/app/dashboard/quota.meta +0 -17
  1090. package/app/.next-cli-build/server/app/dashboard/quota.rsc +0 -28
  1091. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +0 -7
  1092. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +0 -5
  1093. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +0 -5
  1094. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +0 -7
  1095. package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +0 -28
  1096. package/app/.next-cli-build/server/app/dashboard/quota.segments/_head.segment.rsc +0 -6
  1097. package/app/.next-cli-build/server/app/dashboard/quota.segments/_index.segment.rsc +0 -8
  1098. package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +0 -8
  1099. package/app/.next-cli-build/server/app/dashboard/skills.html +0 -1
  1100. package/app/.next-cli-build/server/app/dashboard/skills.meta +0 -17
  1101. package/app/.next-cli-build/server/app/dashboard/skills.rsc +0 -30
  1102. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +0 -9
  1103. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills.segment.rsc +0 -5
  1104. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +0 -5
  1105. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk.segment.rsc +0 -7
  1106. package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +0 -30
  1107. package/app/.next-cli-build/server/app/dashboard/skills.segments/_head.segment.rsc +0 -6
  1108. package/app/.next-cli-build/server/app/dashboard/skills.segments/_index.segment.rsc +0 -8
  1109. package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +0 -8
  1110. package/app/.next-cli-build/server/app/dashboard/token-saver.html +0 -1
  1111. package/app/.next-cli-build/server/app/dashboard/token-saver.meta +0 -17
  1112. package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +0 -27
  1113. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +0 -6
  1114. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver.segment.rsc +0 -5
  1115. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +0 -5
  1116. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk.segment.rsc +0 -7
  1117. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +0 -27
  1118. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_head.segment.rsc +0 -6
  1119. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_index.segment.rsc +0 -8
  1120. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +0 -8
  1121. package/app/.next-cli-build/server/app/dashboard/translator.html +0 -1
  1122. package/app/.next-cli-build/server/app/dashboard/translator.meta +0 -17
  1123. package/app/.next-cli-build/server/app/dashboard/translator.rsc +0 -30
  1124. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +0 -9
  1125. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +0 -5
  1126. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +0 -5
  1127. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +0 -7
  1128. package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +0 -30
  1129. package/app/.next-cli-build/server/app/dashboard/translator.segments/_head.segment.rsc +0 -6
  1130. package/app/.next-cli-build/server/app/dashboard/translator.segments/_index.segment.rsc +0 -8
  1131. package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +0 -8
  1132. package/app/.next-cli-build/server/app/dashboard/usage.html +0 -1
  1133. package/app/.next-cli-build/server/app/dashboard/usage.meta +0 -17
  1134. package/app/.next-cli-build/server/app/dashboard/usage.rsc +0 -30
  1135. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +0 -9
  1136. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +0 -5
  1137. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +0 -5
  1138. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +0 -7
  1139. package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +0 -30
  1140. package/app/.next-cli-build/server/app/dashboard/usage.segments/_head.segment.rsc +0 -6
  1141. package/app/.next-cli-build/server/app/dashboard/usage.segments/_index.segment.rsc +0 -8
  1142. package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +0 -8
  1143. package/app/.next-cli-build/server/app/dashboard.html +0 -1
  1144. package/app/.next-cli-build/server/app/dashboard.meta +0 -16
  1145. package/app/.next-cli-build/server/app/dashboard.rsc +0 -28
  1146. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +0 -6
  1147. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +0 -5
  1148. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +0 -7
  1149. package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +0 -28
  1150. package/app/.next-cli-build/server/app/dashboard.segments/_head.segment.rsc +0 -6
  1151. package/app/.next-cli-build/server/app/dashboard.segments/_index.segment.rsc +0 -8
  1152. package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +0 -8
  1153. package/app/.next-cli-build/server/chunks/1051.js +0 -1
  1154. package/app/.next-cli-build/server/chunks/1220.js +0 -3
  1155. package/app/.next-cli-build/server/chunks/1241.js +0 -1
  1156. package/app/.next-cli-build/server/chunks/1260.js +0 -1
  1157. package/app/.next-cli-build/server/chunks/2117.js +0 -1
  1158. package/app/.next-cli-build/server/chunks/2231.js +0 -1
  1159. package/app/.next-cli-build/server/chunks/2280.js +0 -1
  1160. package/app/.next-cli-build/server/chunks/2422.js +0 -1
  1161. package/app/.next-cli-build/server/chunks/2548.js +0 -67
  1162. package/app/.next-cli-build/server/chunks/2701.js +0 -10
  1163. package/app/.next-cli-build/server/chunks/2768.js +0 -79
  1164. package/app/.next-cli-build/server/chunks/3512.js +0 -7
  1165. package/app/.next-cli-build/server/chunks/3943.js +0 -1
  1166. package/app/.next-cli-build/server/chunks/4206.js +0 -1
  1167. package/app/.next-cli-build/server/chunks/4414.js +0 -1
  1168. package/app/.next-cli-build/server/chunks/4632.js +0 -1
  1169. package/app/.next-cli-build/server/chunks/4827.js +0 -1
  1170. package/app/.next-cli-build/server/chunks/5330.js +0 -161
  1171. package/app/.next-cli-build/server/chunks/5612.js +0 -1
  1172. package/app/.next-cli-build/server/chunks/5655.js +0 -1
  1173. package/app/.next-cli-build/server/chunks/5699.js +0 -1
  1174. package/app/.next-cli-build/server/chunks/5852.js +0 -8
  1175. package/app/.next-cli-build/server/chunks/595.js +0 -1
  1176. package/app/.next-cli-build/server/chunks/5961.js +0 -28
  1177. package/app/.next-cli-build/server/chunks/6070.js +0 -1
  1178. package/app/.next-cli-build/server/chunks/6150.js +0 -64
  1179. package/app/.next-cli-build/server/chunks/6306.js +0 -1
  1180. package/app/.next-cli-build/server/chunks/6763.js +0 -1
  1181. package/app/.next-cli-build/server/chunks/6777.js +0 -1
  1182. package/app/.next-cli-build/server/chunks/6922.js +0 -1
  1183. package/app/.next-cli-build/server/chunks/7651.js +0 -1
  1184. package/app/.next-cli-build/server/chunks/8164.js +0 -67
  1185. package/app/.next-cli-build/server/chunks/8238.js +0 -1
  1186. package/app/.next-cli-build/server/chunks/8860.js +0 -32
  1187. package/app/.next-cli-build/server/chunks/8895.js +0 -67
  1188. package/app/.next-cli-build/server/chunks/8910.js +0 -8
  1189. package/app/.next-cli-build/server/chunks/8920.js +0 -1
  1190. package/app/.next-cli-build/server/chunks/9528.js +0 -32
  1191. package/app/.next-cli-build/server/chunks/9541.js +0 -1
  1192. package/app/.next-cli-build/server/chunks/9830.js +0 -73
  1193. package/app/.next-cli-build/static/XN2UMzJk6TOOrjyMPr-m8/_buildManifest.js +0 -1
  1194. package/app/.next-cli-build/static/chunks/1321-3fb88ae56e7b3791.js +0 -1
  1195. package/app/.next-cli-build/static/chunks/1610-cd46c6c47a9aa99a.js +0 -1
  1196. package/app/.next-cli-build/static/chunks/1655-0df56bb46fc3a442.js +0 -73
  1197. package/app/.next-cli-build/static/chunks/2562-2500ff34b51fb718.js +0 -64
  1198. package/app/.next-cli-build/static/chunks/5242-bb1a1a7ec3bfb62f.js +0 -1
  1199. package/app/.next-cli-build/static/chunks/5497-1ebc533b1f404c9f.js +0 -7
  1200. package/app/.next-cli-build/static/chunks/5772-901f1092d831ec37.js +0 -3
  1201. package/app/.next-cli-build/static/chunks/705-012db20bb6a5da8b.js +0 -1
  1202. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/agent-library/page-300dd0d4a14c86ab.js +0 -1
  1203. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/basic-chat/page-c688f04d8c6a748d.js +0 -1
  1204. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/page-5722c35724f2cc4f.js +0 -1
  1205. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/page-d75b80dab94a2849.js +0 -1
  1206. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-3cf4f51a70049a03.js +0 -1
  1207. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/routing/page-c9dcb59231f22b88.js +0 -1
  1208. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/page-588506e8d6588ef0.js +0 -1
  1209. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-08175767f4233a14.js +0 -3
  1210. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page-65cfcbb2a087ac60.js +0 -59
  1211. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/page-61ca3a6a1dd1eb4a.js +0 -1
  1212. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/combo/[id]/page-dad3750b5c02900c.js +0 -4
  1213. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/page-46a3db73d45024e9.js +0 -1
  1214. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/web/page-ed209fb43f1d6130.js +0 -1
  1215. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/page-49e38f6f8e4e2f3c.js +0 -1
  1216. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-2ee7071258ed9bd4.js +0 -1
  1217. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-224240854e1b6a8a.js +0 -1
  1218. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-ea29e184be241899.js +0 -10
  1219. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/new/page-36c5cb9892efd5c3.js +0 -1
  1220. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-5dcde8afd9ea38e7.js +0 -1
  1221. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-84e16188362cb0af.js +0 -1
  1222. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/[id]/page-0746d1a330d89fed.js +0 -1
  1223. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/page-901c28377166f266.js +0 -1
  1224. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/page-5887c8fd842b722e.js +0 -1
  1225. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/translator/page-2b3ebdba6e257e3a.js +0 -1
  1226. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/page-5fb06025c80a090f.js +0 -1
  1227. package/app/.next-cli-build/static/chunks/app/(dashboard)/layout-2cf7f9f80870dd6c.js +0 -1
  1228. package/app/.next-cli-build/static/chunks/app/_global-error/page-4ff27935cdf818b5.js +0 -1
  1229. package/app/.next-cli-build/static/chunks/app/_not-found/page-b8562ec224316153.js +0 -1
  1230. package/app/.next-cli-build/static/chunks/app/api/agent-library/catalog/route-4ff27935cdf818b5.js +0 -1
  1231. package/app/.next-cli-build/static/chunks/app/api/agent-library/doctor/route-4ff27935cdf818b5.js +0 -1
  1232. package/app/.next-cli-build/static/chunks/app/api/agent-library/export/route-4ff27935cdf818b5.js +0 -1
  1233. package/app/.next-cli-build/static/chunks/app/api/agent-library/mcp/route-4ff27935cdf818b5.js +0 -1
  1234. package/app/.next-cli-build/static/chunks/app/api/agent-library/route-4ff27935cdf818b5.js +0 -1
  1235. package/app/.next-cli-build/static/chunks/app/api/agent-library/skills/route-4ff27935cdf818b5.js +0 -1
  1236. package/app/.next-cli-build/static/chunks/app/api/agent-library/sync/route-4ff27935cdf818b5.js +0 -1
  1237. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-4ff27935cdf818b5.js +0 -1
  1238. package/app/.next-cli-build/static/chunks/app/api/cli-tools/aider-settings/route-4ff27935cdf818b5.js +0 -1
  1239. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-4ff27935cdf818b5.js +0 -1
  1240. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-4ff27935cdf818b5.js +0 -1
  1241. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-4ff27935cdf818b5.js +0 -1
  1242. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-4ff27935cdf818b5.js +0 -1
  1243. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-4ff27935cdf818b5.js +0 -1
  1244. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-4ff27935cdf818b5.js +0 -1
  1245. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-4ff27935cdf818b5.js +0 -1
  1246. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-4ff27935cdf818b5.js +0 -1
  1247. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-4ff27935cdf818b5.js +0 -1
  1248. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-4ff27935cdf818b5.js +0 -1
  1249. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-4ff27935cdf818b5.js +0 -1
  1250. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-4ff27935cdf818b5.js +0 -1
  1251. package/app/.next-cli-build/static/chunks/app/api/cli-tools/gemini-cli-settings/route-4ff27935cdf818b5.js +0 -1
  1252. package/app/.next-cli-build/static/chunks/app/api/cli-tools/grok-settings/route-4ff27935cdf818b5.js +0 -1
  1253. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-4ff27935cdf818b5.js +0 -1
  1254. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-4ff27935cdf818b5.js +0 -1
  1255. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-4ff27935cdf818b5.js +0 -1
  1256. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-4ff27935cdf818b5.js +0 -1
  1257. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-4ff27935cdf818b5.js +0 -1
  1258. package/app/.next-cli-build/static/chunks/app/api/cli-tools/pi-settings/route-4ff27935cdf818b5.js +0 -1
  1259. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-4ff27935cdf818b5.js +0 -1
  1260. package/app/.next-cli-build/static/chunks/app/api/combos/route-4ff27935cdf818b5.js +0 -1
  1261. package/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-4ff27935cdf818b5.js +0 -1
  1262. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-4ff27935cdf818b5.js +0 -1
  1263. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-4ff27935cdf818b5.js +0 -1
  1264. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-4ff27935cdf818b5.js +0 -1
  1265. package/app/.next-cli-build/static/chunks/app/api/health/route-4ff27935cdf818b5.js +0 -1
  1266. package/app/.next-cli-build/static/chunks/app/api/init/route-4ff27935cdf818b5.js +0 -1
  1267. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-4ff27935cdf818b5.js +0 -1
  1268. package/app/.next-cli-build/static/chunks/app/api/keys/route-4ff27935cdf818b5.js +0 -1
  1269. package/app/.next-cli-build/static/chunks/app/api/locale/route-4ff27935cdf818b5.js +0 -1
  1270. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-4ff27935cdf818b5.js +0 -1
  1271. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-4ff27935cdf818b5.js +0 -1
  1272. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-4ff27935cdf818b5.js +0 -1
  1273. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-4ff27935cdf818b5.js +0 -1
  1274. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-4ff27935cdf818b5.js +0 -1
  1275. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-4ff27935cdf818b5.js +0 -1
  1276. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-4ff27935cdf818b5.js +0 -1
  1277. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-4ff27935cdf818b5.js +0 -1
  1278. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-4ff27935cdf818b5.js +0 -1
  1279. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-4ff27935cdf818b5.js +0 -1
  1280. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-4ff27935cdf818b5.js +0 -1
  1281. package/app/.next-cli-build/static/chunks/app/api/models/route-4ff27935cdf818b5.js +0 -1
  1282. package/app/.next-cli-build/static/chunks/app/api/models/test/route-4ff27935cdf818b5.js +0 -1
  1283. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-4ff27935cdf818b5.js +0 -1
  1284. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-4ff27935cdf818b5.js +0 -1
  1285. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-4ff27935cdf818b5.js +0 -1
  1286. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-4ff27935cdf818b5.js +0 -1
  1287. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-4ff27935cdf818b5.js +0 -1
  1288. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-4ff27935cdf818b5.js +0 -1
  1289. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-4ff27935cdf818b5.js +0 -1
  1290. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-4ff27935cdf818b5.js +0 -1
  1291. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-4ff27935cdf818b5.js +0 -1
  1292. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-4ff27935cdf818b5.js +0 -1
  1293. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-4ff27935cdf818b5.js +0 -1
  1294. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-4ff27935cdf818b5.js +0 -1
  1295. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-4ff27935cdf818b5.js +0 -1
  1296. package/app/.next-cli-build/static/chunks/app/api/pricing/route-4ff27935cdf818b5.js +0 -1
  1297. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-4ff27935cdf818b5.js +0 -1
  1298. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-4ff27935cdf818b5.js +0 -1
  1299. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-4ff27935cdf818b5.js +0 -1
  1300. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/model-probes/batch/route-4ff27935cdf818b5.js +0 -1
  1301. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/model-probes/cache/route-4ff27935cdf818b5.js +0 -1
  1302. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/model-probes/prepare/route-4ff27935cdf818b5.js +0 -1
  1303. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/model-probes/remove-unavailable/route-4ff27935cdf818b5.js +0 -1
  1304. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-4ff27935cdf818b5.js +0 -1
  1305. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-4ff27935cdf818b5.js +0 -1
  1306. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-4ff27935cdf818b5.js +0 -1
  1307. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-4ff27935cdf818b5.js +0 -1
  1308. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-4ff27935cdf818b5.js +0 -1
  1309. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-4ff27935cdf818b5.js +0 -1
  1310. package/app/.next-cli-build/static/chunks/app/api/providers/route-4ff27935cdf818b5.js +0 -1
  1311. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-4ff27935cdf818b5.js +0 -1
  1312. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-4ff27935cdf818b5.js +0 -1
  1313. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-4ff27935cdf818b5.js +0 -1
  1314. package/app/.next-cli-build/static/chunks/app/api/routing/insights/route-4ff27935cdf818b5.js +0 -1
  1315. package/app/.next-cli-build/static/chunks/app/api/routing/learn/route-4ff27935cdf818b5.js +0 -1
  1316. package/app/.next-cli-build/static/chunks/app/api/routing/versions/promote/route-4ff27935cdf818b5.js +0 -1
  1317. package/app/.next-cli-build/static/chunks/app/api/routing/versions/rollback/route-4ff27935cdf818b5.js +0 -1
  1318. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-4ff27935cdf818b5.js +0 -1
  1319. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-4ff27935cdf818b5.js +0 -1
  1320. package/app/.next-cli-build/static/chunks/app/api/settings/route-4ff27935cdf818b5.js +0 -1
  1321. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-4ff27935cdf818b5.js +0 -1
  1322. package/app/.next-cli-build/static/chunks/app/api/skills/[id]/route-4ff27935cdf818b5.js +0 -1
  1323. package/app/.next-cli-build/static/chunks/app/api/tags/route-4ff27935cdf818b5.js +0 -1
  1324. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-4ff27935cdf818b5.js +0 -1
  1325. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-4ff27935cdf818b5.js +0 -1
  1326. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-4ff27935cdf818b5.js +0 -1
  1327. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-4ff27935cdf818b5.js +0 -1
  1328. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-4ff27935cdf818b5.js +0 -1
  1329. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-4ff27935cdf818b5.js +0 -1
  1330. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-4ff27935cdf818b5.js +0 -1
  1331. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-4ff27935cdf818b5.js +0 -1
  1332. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-4ff27935cdf818b5.js +0 -1
  1333. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-4ff27935cdf818b5.js +0 -1
  1334. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-4ff27935cdf818b5.js +0 -1
  1335. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-4ff27935cdf818b5.js +0 -1
  1336. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-4ff27935cdf818b5.js +0 -1
  1337. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-4ff27935cdf818b5.js +0 -1
  1338. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-4ff27935cdf818b5.js +0 -1
  1339. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-4ff27935cdf818b5.js +0 -1
  1340. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-4ff27935cdf818b5.js +0 -1
  1341. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-4ff27935cdf818b5.js +0 -1
  1342. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-4ff27935cdf818b5.js +0 -1
  1343. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-4ff27935cdf818b5.js +0 -1
  1344. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-4ff27935cdf818b5.js +0 -1
  1345. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-4ff27935cdf818b5.js +0 -1
  1346. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-4ff27935cdf818b5.js +0 -1
  1347. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-4ff27935cdf818b5.js +0 -1
  1348. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-4ff27935cdf818b5.js +0 -1
  1349. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-4ff27935cdf818b5.js +0 -1
  1350. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-4ff27935cdf818b5.js +0 -1
  1351. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-4ff27935cdf818b5.js +0 -1
  1352. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-4ff27935cdf818b5.js +0 -1
  1353. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-4ff27935cdf818b5.js +0 -1
  1354. package/app/.next-cli-build/static/chunks/app/api/v1/route-4ff27935cdf818b5.js +0 -1
  1355. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-4ff27935cdf818b5.js +0 -1
  1356. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-4ff27935cdf818b5.js +0 -1
  1357. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-4ff27935cdf818b5.js +0 -1
  1358. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-4ff27935cdf818b5.js +0 -1
  1359. package/app/.next-cli-build/static/chunks/app/api/version/route-4ff27935cdf818b5.js +0 -1
  1360. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-4ff27935cdf818b5.js +0 -1
  1361. package/app/.next-cli-build/static/chunks/app/api/version/update/route-4ff27935cdf818b5.js +0 -1
  1362. package/app/.next-cli-build/static/chunks/app/callback/page-f1f270e67555b182.js +0 -1
  1363. package/app/.next-cli-build/static/chunks/app/dashboard/settings/pricing/page-ed2255d69c2760ec.js +0 -1
  1364. package/app/.next-cli-build/static/chunks/app/landing/page-6892ba5b21239050.js +0 -1
  1365. package/app/.next-cli-build/static/chunks/app/layout-09827daf4ebdd3eb.js +0 -1
  1366. package/app/.next-cli-build/static/chunks/app/login/page-4ff27935cdf818b5.js +0 -1
  1367. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-4ff27935cdf818b5.js +0 -1
  1368. package/app/.next-cli-build/static/chunks/app/page-4ff27935cdf818b5.js +0 -1
  1369. package/app/.next-cli-build/static/chunks/framework-711ef29bc66f648c.js +0 -1
  1370. package/app/.next-cli-build/static/chunks/main-app-11f959986c6ea8f3.js +0 -1
  1371. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-4ff27935cdf818b5.js +0 -1
  1372. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-4ff27935cdf818b5.js +0 -1
  1373. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/global-error-cc98e46801de50e2.js +0 -1
  1374. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-4ff27935cdf818b5.js +0 -1
  1375. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-4ff27935cdf818b5.js +0 -1
  1376. package/app/.next-cli-build/static/chunks/webpack-868e94e9a2c8d9a9.js +0 -1
  1377. package/app/.next-cli-build/static/css/0f3ab8c15caad6fe.css +0 -1
  1378. package/app/.next-cli-build/static/css/34c541b5726dadd8.css +0 -1
  1379. package/app/.next-cli-build/static/media/material-symbols-outlined.ec1fa111.woff2 +0 -0
  1380. package/app/cli/.build-home/.switchboard/db/data.sqlite +0 -0
  1381. package/app/cli/.build-home/.switchboard/machine-id +0 -1
  1382. package/app/cli/.build-home/Library/Preferences/nextjs-nodejs/config.json +0 -7
  1383. package/app/cli/app/.next/standalone/skills/switchboard/SKILL.md +0 -79
  1384. package/app/cli/app/.next/standalone/skills/switchboard-chat/SKILL.md +0 -116
  1385. package/app/cli/app/cli/app/.next/standalone/skills/switchboard/SKILL.md +0 -79
  1386. package/app/cli/app/cli/app/.next/standalone/skills/switchboard-chat/SKILL.md +0 -116
  1387. package/app/cli/app/cli/app/skills/switchboard/SKILL.md +0 -79
  1388. package/app/cli/app/cli/app/skills/switchboard-chat/SKILL.md +0 -116
  1389. package/app/cli/app/skills/switchboard/SKILL.md +0 -79
  1390. package/app/cli/app/skills/switchboard-chat/SKILL.md +0 -116
  1391. package/app/node_modules/next/node_modules/postcss/lib/container.js +0 -439
  1392. package/app/node_modules/next/node_modules/postcss/lib/css-syntax-error.js +0 -100
  1393. package/app/node_modules/next/node_modules/postcss/lib/declaration.js +0 -24
  1394. package/app/node_modules/next/node_modules/postcss/lib/fromJSON.js +0 -54
  1395. package/app/node_modules/next/node_modules/postcss/lib/input.js +0 -248
  1396. package/app/node_modules/next/node_modules/postcss/lib/lazy-result.js +0 -550
  1397. package/app/node_modules/next/node_modules/postcss/lib/map-generator.js +0 -359
  1398. package/app/node_modules/next/node_modules/postcss/lib/no-work-result.js +0 -135
  1399. package/app/node_modules/next/node_modules/postcss/lib/node.js +0 -381
  1400. package/app/node_modules/next/node_modules/postcss/lib/parse.js +0 -42
  1401. package/app/node_modules/next/node_modules/postcss/lib/parser.js +0 -610
  1402. package/app/node_modules/next/node_modules/postcss/lib/postcss.js +0 -101
  1403. package/app/node_modules/next/node_modules/postcss/lib/previous-map.js +0 -142
  1404. package/app/node_modules/next/node_modules/postcss/lib/processor.js +0 -67
  1405. package/app/node_modules/next/node_modules/postcss/lib/result.js +0 -42
  1406. package/app/node_modules/next/node_modules/postcss/lib/rule.js +0 -27
  1407. package/app/node_modules/next/node_modules/postcss/lib/stringifier.js +0 -353
  1408. package/app/node_modules/next/node_modules/postcss/lib/tokenize.js +0 -266
  1409. package/app/node_modules/next/node_modules/postcss/package.json +0 -88
  1410. package/app/public/i18n/literals/ar.json +0 -195
  1411. package/app/public/i18n/literals/bn.json +0 -195
  1412. package/app/public/i18n/literals/cs.json +0 -195
  1413. package/app/public/i18n/literals/da.json +0 -195
  1414. package/app/public/i18n/literals/de.json +0 -195
  1415. package/app/public/i18n/literals/el.json +0 -195
  1416. package/app/public/i18n/literals/es.json +0 -195
  1417. package/app/public/i18n/literals/fa.json +0 -195
  1418. package/app/public/i18n/literals/fi.json +0 -195
  1419. package/app/public/i18n/literals/fr.json +0 -195
  1420. package/app/public/i18n/literals/he.json +0 -195
  1421. package/app/public/i18n/literals/hi.json +0 -195
  1422. package/app/public/i18n/literals/hu.json +0 -195
  1423. package/app/public/i18n/literals/id.json +0 -195
  1424. package/app/public/i18n/literals/it.json +0 -195
  1425. package/app/public/i18n/literals/ja.json +0 -195
  1426. package/app/public/i18n/literals/ko.json +0 -195
  1427. package/app/public/i18n/literals/nl.json +0 -195
  1428. package/app/public/i18n/literals/no.json +0 -195
  1429. package/app/public/i18n/literals/pl.json +0 -195
  1430. package/app/public/i18n/literals/pt-BR.json +0 -195
  1431. package/app/public/i18n/literals/pt-PT.json +0 -195
  1432. package/app/public/i18n/literals/ro.json +0 -195
  1433. package/app/public/i18n/literals/ru.json +0 -195
  1434. package/app/public/i18n/literals/sv.json +0 -195
  1435. package/app/public/i18n/literals/th.json +0 -195
  1436. package/app/public/i18n/literals/tl.json +0 -195
  1437. package/app/public/i18n/literals/tr.json +0 -195
  1438. package/app/public/i18n/literals/uk.json +0 -195
  1439. package/app/public/i18n/literals/ur.json +0 -195
  1440. package/app/public/i18n/literals/vi.json +0 -195
  1441. package/app/public/i18n/literals/zh-TW.json +0 -195
  1442. package/app/skills/README.md +0 -37
  1443. package/app/skills/switchboard/SKILL.md +0 -79
  1444. package/app/skills/switchboard-chat/SKILL.md +0 -116
  1445. package/app/tests/.tmp-data/agent-library/skills/switchboard/SKILL.md +0 -79
  1446. package/app/tests/.tmp-data/agent-library/skills/switchboard-chat/SKILL.md +0 -116
  1447. /package/app/.next-cli-build/static/{XN2UMzJk6TOOrjyMPr-m8 → sBwyl4vbyME9SYpTbTHkn}/_ssgManifest.js +0 -0
  1448. /package/app/node_modules/{next/node_modules/postcss → postcss}/lib/at-rule.js +0 -0
  1449. /package/app/node_modules/{next/node_modules/postcss → postcss}/lib/comment.js +0 -0
  1450. /package/app/node_modules/{next/node_modules/postcss → postcss}/lib/document.js +0 -0
  1451. /package/app/node_modules/{next/node_modules/postcss → postcss}/lib/list.js +0 -0
  1452. /package/app/node_modules/{next/node_modules/postcss → postcss}/lib/root.js +0 -0
  1453. /package/app/node_modules/{next/node_modules/postcss → postcss}/lib/stringify.js +0 -0
  1454. /package/app/node_modules/{next/node_modules/postcss → postcss}/lib/symbols.js +0 -0
  1455. /package/app/node_modules/{next/node_modules/postcss → postcss}/lib/terminal-highlight.js +0 -0
  1456. /package/app/node_modules/{next/node_modules/postcss → postcss}/lib/warn-once.js +0 -0
  1457. /package/app/node_modules/{next/node_modules/postcss → postcss}/lib/warning.js +0 -0
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[705],{31474:(e,r,t)=>{t.d(r,{cn:()=>s});function s(...e){return e.filter(Boolean).join(" ").replace(/\s+/g," ").trim()}},62630:(e,r,t)=>{t.d(r,{ad:()=>i,gH:()=>n});let s={gh:{"gpt-5.3-codex":{input:1.75,output:14,cached:.175,reasoning:14,cache_creation:1.75}}};function n(e,r){return RegExp("^"+e.split("*").map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join(".*")+"$","i").test(r)}function i(){return s}},84588:(e,r,t)=>{t.d(r,{default:()=>i});var s=t(95155),n=t(31474);function i({children:e,title:r,subtitle:t,icon:c,action:o,padding:d="md",hover:a=!1,elev:l=!1,className:u,...b}){return(0,s.jsxs)("div",{className:(0,n.cn)("bg-surface border border-border","rounded-[12px]",a&&"hover:border-brand-500/40 transition-all cursor-pointer",{none:"",xs:"p-3",sm:"p-4",md:"p-6",lg:"p-8"}[d],u),...b,children:[(r||o)&&(0,s.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[c&&(0,s.jsx)("div",{className:"p-2 rounded-[10px] bg-bg text-text-muted",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:c})}),(0,s.jsxs)("div",{children:[r&&(0,s.jsx)("h3",{className:"text-text-main font-semibold",children:r}),t&&(0,s.jsx)("p",{className:"text-sm text-text-muted",children:t})]})]}),o]}),e]})}i.Section=function({children:e,className:r,...t}){return(0,s.jsx)("div",{className:(0,n.cn)("p-4 rounded-[10px]","bg-bg border border-border-subtle",r),...t,children:e})},i.Row=function({children:e,className:r,...t}){return(0,s.jsx)("div",{className:(0,n.cn)("p-3 -mx-3 px-3 transition-colors","border-b border-border-subtle last:border-b-0","hover:bg-surface-2/50",r),...t,children:e})},i.ListItem=function({children:e,actions:r,className:t,...i}){return(0,s.jsxs)("div",{className:(0,n.cn)("group flex items-center justify-between p-3 -mx-3 px-3","border-b border-border-subtle last:border-b-0","hover:bg-surface-2/50 transition-colors",t),...i,children:[(0,s.jsx)("div",{className:"flex-1 min-w-0",children:e}),r&&(0,s.jsx)("div",{className:"flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:r})]})}}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6897],{15691:(e,t,s)=>{Promise.resolve().then(s.bind(s,94091))},94091:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>n});var a=s(95155),r=s(12115),l=s(35497);function n(){let[e,t]=(0,r.useState)(null),[s,n]=(0,r.useState)(!0),[d,o]=(0,r.useState)(""),[c,m]=(0,r.useState)(null),[x,p]=(0,r.useState)(null),[h,u]=(0,r.useState)(null),[b,y]=(0,r.useState)("overview"),[g,f]=(0,r.useState)({id:"",name:"",transport:"stdio",command:"npx",args:"-y @modelcontextprotocol/server-filesystem .",url:"",notes:""}),[j,v]=(0,r.useState)([]),[N,k]=(0,r.useState)(""),[w,C]=(0,r.useState)(""),[S,P]=(0,r.useState)(""),[$,O]=(0,r.useState)(!1),[E,T]=(0,r.useState)(""),[M,A]=(0,r.useState)(""),[I,L]=(0,r.useState)(""),Z=(0,r.useCallback)(async()=>{n(!0);try{let e=await fetch("/api/agent-library",{cache:"no-store"}),s=await e.json();if(!e.ok)throw Error(s.error||"Load failed");t(s)}catch(e){m({type:"error",text:e.message})}finally{n(!1)}},[]);(0,r.useEffect)(()=>{Z(),fetch("/api/agent-library/catalog").then(e=>e.json()).then(e=>v(e.presets||[])).catch(()=>{})},[Z]);let z=e?.settings||{},D=e?.agents||{};async function R(e){o("settings"),m(null);try{let t=await fetch("/api/agent-library",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),s=await t.json();if(!t.ok)throw Error(s.error||"Save failed");m({type:"success",text:"Settings saved"}),await Z()}catch(e){m({type:"error",text:e.message})}finally{o("")}}async function U(e){o(e),m(null),u(null);try{let t=await fetch("/api/agent-library/sync",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:e,confirm:"clean"===e||void 0})}),s=await t.json();if(!t.ok)throw Error(s.error||s.message||"Sync failed");u(s),m({type:s.conflictCount?"warn":"success",text:"dry-run"===e?`Dry-run: ${s.summary?.skillsSynced??0} skill ops, ${s.summary?.mcpOk??0} MCP ok, ${s.conflictCount||0} conflicts`:"clean"===e?"Removed Switchboard-managed projections only":`Applied: ${s.summary?.skillsSynced??0} skills synced, ${s.conflictCount||0} conflicts protected`}),await Z()}catch(e){m({type:"error",text:e.message})}finally{o("")}}async function J(){o("doctor");try{let e=await fetch("/api/agent-library/doctor",{cache:"no-store"}),t=await e.json();if(!e.ok)throw Error(t.error||"Doctor failed");p(t),m({type:t.ok?"success":"warn",text:t.ok?"Doctor: no blocking errors":`Doctor: ${t.issues?.filter(e=>"error"===e.severity).length||0} errors`})}catch(e){m({type:"error",text:e.message})}finally{o("")}}async function _(e){e?.preventDefault?.(),o("mcp");try{let e=g.args?g.args.split(/\s+/).filter(Boolean):[],t=await fetch("/api/agent-library/mcp",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:g.id,name:g.name||g.id,transport:g.transport,command:"stdio"===g.transport?g.command:void 0,args:"stdio"===g.transport?e:void 0,url:"stdio"!==g.transport?g.url:void 0,notes:g.notes})}),s=await t.json();if(!t.ok)throw Error(s.error||"MCP save failed");s.warnings?.length?m({type:"warn",text:s.warnings.join(" \xb7 ")}):m({type:"success",text:`MCP ${s.server?.id} saved (Apply to project)`}),f({id:"",name:"",transport:"stdio",command:"npx",args:"",url:"",notes:""}),await Z()}catch(e){m({type:"error",text:e.message})}finally{o("")}}async function K(e){if(confirm(`Remove MCP ${e} from library? (targets updated on next Apply)`)){o("mcp-del");try{let t=await fetch(`/api/agent-library/mcp?id=${encodeURIComponent(e)}`,{method:"DELETE"}),s=await t.json();if(!t.ok)throw Error(s.error);m({type:"success",text:"MCP removed from library"}),await Z()}catch(e){m({type:"error",text:e.message})}finally{o("")}}}async function H(e){if(confirm(`Remove skill ${e} from library?`)){o("skill-del");try{let t=await fetch(`/api/agent-library/skills?id=${encodeURIComponent(e)}`,{method:"DELETE"}),s=await t.json();if(!t.ok)throw Error(s.error);m({type:"success",text:"Skill removed from library"}),await Z()}catch(e){m({type:"error",text:e.message})}finally{o("")}}}async function G(){o("skill-add");try{let e=await fetch("/api/agent-library/skills",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:E,markdown:M,source:"manual"})}),t=await e.json();if(!e.ok)throw Error(t.error);m({type:"success",text:`Skill ${t.id} installed in library`}),T(""),A(""),await Z()}catch(e){m({type:"error",text:e.message})}finally{o("")}}async function W(e){o("preview");try{let t=await fetch("/api/agent-library/catalog",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"preview",url:e})}),s=await t.json();if(!t.ok||!s.ok)throw Error(s.error||"Preview failed");P(s.preview||""),m({type:"success",text:`Preview loaded (${s.bytes} bytes)`})}catch(e){m({type:"error",text:e.message})}finally{o("")}}async function B(){o("catalog");try{let e=await fetch("/api/agent-library/catalog",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"install",skillId:w,url:N,confirmed:$})}),t=await e.json();if(!e.ok)throw Error(t.message||t.error||"Install failed");m({type:"success",text:t.warning||`Installed ${t.id}`}),O(!1),await Z()}catch(e){m({type:"error",text:e.message})}finally{o("")}}async function F(){o("export");try{let e=await fetch("/api/agent-library/export",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({destPath:I||void 0})}),t=await e.json();if(!e.ok)throw Error(t.message||t.error||"Export failed");m({type:"success",text:`Exported AgentSync layout to ${t.path}`})}catch(e){m({type:"error",text:e.message})}finally{o("")}}return(0,a.jsxs)("div",{className:"max-w-5xl mx-auto space-y-5 pb-12",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)("h1",{className:"text-[17px] font-semibold text-text-main",children:"Agent library"}),(0,a.jsxs)("p",{className:"text-xs text-text-muted leading-relaxed max-w-2xl",children:["One Switchboard-owned library of ",(0,a.jsx)("strong",{className:"text-text-main",children:"skills"})," and"," ",(0,a.jsx)("strong",{className:"text-text-main",children:"MCP servers"}),", projected into Claude Code, Codex, OpenCode, Gemini CLI, and Cursor. Managed entries use the"," ",(0,a.jsx)("code",{className:"text-[11px] font-mono",children:"sb-"})," namespace so we never overwrite your existing skills or MCP keys."]})]}),c&&(0,a.jsx)("div",{className:`text-xs px-3 py-2 rounded-lg border ${"success"===c.type?"bg-green-500/10 border-green-500/30 text-green-600 dark:text-green-400":"warn"===c.type?"bg-amber-500/10 border-amber-500/30 text-amber-700 dark:text-amber-400":"bg-red-500/10 border-red-500/30 text-red-500"}`,children:c.text}),(0,a.jsxs)(l.Zp,{padding:"md",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[(0,a.jsxs)("label",{className:"flex items-center gap-2 text-sm text-text-main cursor-pointer",children:[(0,a.jsx)("input",{type:"checkbox",className:"accent-[var(--color-primary)]",checked:!1!==z.enabled,disabled:!!d,onChange:e=>R({enabled:e.target.checked})}),"Sync enabled"]}),(0,a.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,a.jsx)(l.$n,{size:"sm",variant:"secondary",disabled:!!d||!1===z.enabled,loading:"dry-run"===d,onClick:()=>U("dry-run"),children:"Dry-run"}),(0,a.jsx)(l.$n,{size:"sm",disabled:!!d||!1===z.enabled,loading:"apply"===d,onClick:()=>U("apply"),children:"Apply sync"}),(0,a.jsx)(l.$n,{size:"sm",variant:"outline",disabled:!!d,loading:"doctor"===d,onClick:J,children:"Doctor"})]})]}),(0,a.jsxs)("p",{className:"text-[11px] text-text-subtle mt-2 font-mono break-all",children:["Library: ",e?.libraryRoot||"…",z.linkMode?` \xb7 mode=${z.linkMode}`:"",z.scope?` \xb7 scope=${z.scope}`:""]})]}),(0,a.jsx)("div",{className:"flex flex-wrap gap-1 border-b border-border pb-0",children:[{id:"overview",label:"Overview"},{id:"skills",label:"Skills"},{id:"mcp",label:"MCP"},{id:"catalog",label:"Catalog"},{id:"advanced",label:"Advanced"}].map(e=>(0,a.jsx)("button",{type:"button",onClick:()=>y(e.id),className:`px-3 py-2 text-xs font-medium rounded-t-md transition-colors ${b===e.id?"bg-surface border border-border border-b-surface text-primary -mb-px":"text-text-muted hover:text-text-main"}`,children:e.label},e.id))}),s&&(0,a.jsxs)("p",{className:"text-sm text-text-muted flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-[18px]",children:"progress_activity"}),"Loading…"]}),!s&&"overview"===b&&(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsxs)(l.Zp,{padding:"md",children:[(0,a.jsx)("h2",{className:"text-sm font-semibold text-text-main mb-2",children:"How it works"}),(0,a.jsxs)("ol",{className:"text-xs text-text-muted space-y-1.5 list-decimal pl-4 leading-relaxed",children:[(0,a.jsxs)("li",{children:["Skills and MCP servers live only in Switchboard's library (",(0,a.jsx)("code",{className:"font-mono",children:"~/.switchboard/agent-library"}),")."]}),(0,a.jsxs)("li",{children:[(0,a.jsx)("strong",{className:"text-text-main",children:"Apply sync"})," projects them into each enabled agent under namespaced paths/keys (",(0,a.jsx)("code",{className:"font-mono",children:"sb-*"}),")."]}),(0,a.jsxs)("li",{children:["If a path already exists and is ",(0,a.jsx)("em",{children:"not"})," marked managed, we"," ",(0,a.jsx)("strong",{className:"text-text-main",children:"skip"})," it (never overwrite)."]}),(0,a.jsx)("li",{children:"Turn individual agents or skills/MCP off with the toggles below."})]})]}),(0,a.jsxs)(l.Zp,{padding:"md",children:[(0,a.jsx)("h2",{className:"text-sm font-semibold text-text-main mb-3",children:"Targets"}),(0,a.jsx)("div",{className:"space-y-2",children:Object.values(D).map(e=>{let t=z.targets?.[e.id]||{skills:!0,mcp:!0};return(0,a.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2 py-2 border-b border-border-subtle last:border-0",children:[(0,a.jsx)("span",{className:"text-sm text-text-main",children:e.label}),(0,a.jsxs)("div",{className:"flex gap-4 text-xs text-text-muted",children:[(0,a.jsxs)("label",{className:"flex items-center gap-1.5 cursor-pointer",children:[(0,a.jsx)("input",{type:"checkbox",checked:!1!==t.skills,disabled:!e.supportsSkills||!!d,onChange:s=>R({targets:{...z.targets,[e.id]:{...t,skills:s.target.checked}}})}),"Skills"]}),(0,a.jsxs)("label",{className:"flex items-center gap-1.5 cursor-pointer",children:[(0,a.jsx)("input",{type:"checkbox",checked:!1!==t.mcp,disabled:!e.supportsMcp||!!d,onChange:s=>R({targets:{...z.targets,[e.id]:{...t,mcp:s.target.checked}}})}),"MCP"]})]})]},e.id)})})]}),(0,a.jsxs)(l.Zp,{padding:"md",children:[(0,a.jsx)("h2",{className:"text-sm font-semibold text-text-main mb-3",children:"Safety & link mode"}),(0,a.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2 text-xs",children:[(0,a.jsxs)("label",{className:"flex flex-col gap-1",children:[(0,a.jsx)("span",{className:"text-text-muted",children:"Link mode"}),(0,a.jsxs)("select",{className:"bg-surface border border-border rounded-md px-2 py-1.5 text-text-main",value:z.linkMode||"copy",disabled:!!d,onChange:e=>R({linkMode:e.target.value}),children:[(0,a.jsx)("option",{value:"copy",children:"Copy (safe default on Windows)"}),(0,a.jsx)("option",{value:"symlink",children:"Symlink (instant updates; may need privileges on Windows)"})]})]}),(0,a.jsxs)("label",{className:"flex flex-col gap-1",children:[(0,a.jsx)("span",{className:"text-text-muted",children:"Scope"}),(0,a.jsxs)("select",{className:"bg-surface border border-border rounded-md px-2 py-1.5 text-text-main",value:z.scope||"global",disabled:!!d,onChange:e=>R({scope:e.target.value,projectPath:"project"===e.target.value?z.projectPath||"":null}),children:[(0,a.jsx)("option",{value:"global",children:"Global (user home agents)"}),(0,a.jsx)("option",{value:"project",children:"Project (paths under project folder)"})]})]}),"project"===z.scope&&(0,a.jsxs)("label",{className:"flex flex-col gap-1 sm:col-span-2",children:[(0,a.jsx)("span",{className:"text-text-muted",children:"Project path (absolute)"}),(0,a.jsx)("input",{className:"bg-surface border border-border rounded-md px-2 py-1.5 font-mono text-text-main",value:z.projectPath||"",placeholder:"/Users/you/my-app",disabled:!!d,onChange:e=>R({projectPath:e.target.value})})]}),(0,a.jsxs)("label",{className:"flex items-start gap-2 sm:col-span-2 cursor-pointer",children:[(0,a.jsx)("input",{type:"checkbox",className:"mt-0.5",checked:!1!==z.neverOverwriteUser,disabled:!!d,onChange:e=>{e.target.checked?R({neverOverwriteUser:!0}):confirm("Allow overwriting paths that are NOT Switchboard-managed? This can replace your personal skills/MCP. Continue?")&&R({neverOverwriteUser:!1,confirmAllowOverwrite:!0})}}),(0,a.jsxs)("span",{className:"text-text-muted leading-relaxed",children:[(0,a.jsx)("strong",{className:"text-text-main",children:"Never overwrite user-owned files"})," ","(recommended). Only touch ",(0,a.jsx)("code",{className:"font-mono",children:"sb-*"})," managed entries."]})]}),(0,a.jsxs)("label",{className:"flex items-center gap-2 cursor-pointer",children:[(0,a.jsx)("input",{type:"checkbox",checked:!1!==z.includeProductSkills,disabled:!!d,onChange:e=>R({includeProductSkills:e.target.checked})}),(0,a.jsx)("span",{className:"text-text-muted",children:"Auto-include Switchboard product skills (entry + chat)"})]})]})]}),(0,a.jsxs)("div",{className:"grid sm:grid-cols-3 gap-3",children:[(0,a.jsx)(i,{label:"Skills in library",value:String(e?.skills?.length??0)}),(0,a.jsx)(i,{label:"MCP servers",value:String(e?.mcpServers?.length??0)}),(0,a.jsx)(i,{label:"Last sync",value:e?.state?.lastSync?.at?new Date(e.state.lastSync.at).toLocaleString():"—"})]}),h&&(0,a.jsxs)(l.Zp,{padding:"md",children:[(0,a.jsx)("h2",{className:"text-sm font-semibold text-text-main mb-2",children:"Last sync detail"}),(0,a.jsx)("pre",{className:"text-[11px] font-mono text-text-muted overflow-x-auto max-h-48 bg-surface-2 p-2 rounded",children:JSON.stringify(h.summary||h,null,2)}),h.skills?.filter(e=>"conflict"===e.action).length>0&&(0,a.jsxs)("div",{className:"mt-2 text-xs text-amber-600 dark:text-amber-400",children:["Conflicts (protected):",(0,a.jsx)("ul",{className:"list-disc pl-4 mt-1",children:h.skills.filter(e=>"conflict"===e.action).map((e,t)=>(0,a.jsxs)("li",{children:[e.agent,"/",e.skillId,": ",e.message||e.reason]},t))})]})]}),x&&(0,a.jsxs)(l.Zp,{padding:"md",children:[(0,a.jsx)("h2",{className:"text-sm font-semibold text-text-main mb-2",children:"Doctor"}),x.issues?.length===0?(0,a.jsx)("p",{className:"text-xs text-green-600",children:"No issues"}):(0,a.jsx)("ul",{className:"text-xs space-y-1",children:x.issues?.map((e,t)=>(0,a.jsxs)("li",{className:"error"===e.severity?"text-red-500":"text-amber-600 dark:text-amber-400",children:["[",e.severity,"] ",e.message]},t))})]})]}),!s&&"skills"===b&&(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsxs)(l.Zp,{padding:"md",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,a.jsx)("h2",{className:"text-sm font-semibold text-text-main",children:"Library skills"}),(0,a.jsx)(l.$n,{size:"sm",variant:"secondary",disabled:!!d,onClick:async()=>{o("ensure");try{await fetch("/api/agent-library/skills",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"ensure_product"})}),await Z(),m({type:"success",text:"Product skills ensured"})}finally{o("")}},children:"Refresh product skills"})]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(e?.skills||[]).map(e=>(0,a.jsxs)("div",{className:"flex items-start justify-between gap-2 p-3 rounded-lg border border-border-subtle bg-surface-2/50",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-sm font-medium text-text-main",children:e.title||e.id}),(0,a.jsx)(l.Ex,{size:"sm",variant:"default",children:(0,a.jsxs)("code",{className:"text-[10px]",children:["sb-",e.id]})})]}),(0,a.jsx)("p",{className:"text-[11px] text-text-muted mt-0.5 line-clamp-2",children:e.description||"—"})]}),(0,a.jsx)(l.$n,{size:"sm",variant:"ghost",disabled:!!d,onClick:()=>H(e.id),children:"Remove"})]},e.id)),!e?.skills?.length&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"No skills yet. Enable product skills or add manually."})]})]}),(0,a.jsxs)(l.Zp,{padding:"md",children:[(0,a.jsx)("h2",{className:"text-sm font-semibold text-text-main mb-2",children:"Add skill (paste SKILL.md)"}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("input",{className:"w-full bg-surface border border-border rounded-md px-2 py-1.5 text-xs font-mono",placeholder:"skill-id (e.g. my-review)",value:E,onChange:e=>T(e.target.value)}),(0,a.jsx)("textarea",{className:"w-full h-40 bg-surface border border-border rounded-md px-2 py-1.5 text-xs font-mono",placeholder:"---\nname: my-skill\ndescription: ...\n---\n\n# ...",value:M,onChange:e=>A(e.target.value)}),(0,a.jsx)(l.$n,{size:"sm",disabled:!E||!M||!!d,loading:"skill-add"===d,onClick:G,children:"Add to library"})]})]})]}),!s&&"mcp"===b&&(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsxs)(l.Zp,{padding:"md",children:[(0,a.jsx)("h2",{className:"text-sm font-semibold text-text-main mb-1",children:"MCP servers in library"}),(0,a.jsxs)("p",{className:"text-[11px] text-text-subtle mb-3",children:["Prefer ",(0,a.jsxs)("code",{className:"font-mono",children:["$","{GITHUB_TOKEN}"]})," style env values — do not paste raw API keys if you can avoid it. Keys are projected as"," ",(0,a.jsx)("code",{className:"font-mono",children:"sb-*"})," only."]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(e?.mcpServers||[]).map(e=>(0,a.jsxs)("div",{className:"flex items-start justify-between gap-2 p-3 rounded-lg border border-border-subtle",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-sm text-text-main font-medium",children:e.name}),(0,a.jsx)("code",{className:"text-[10px] text-text-subtle",children:e.id}),(0,a.jsxs)("div",{className:"text-[11px] text-text-muted mt-1",children:[e.transport||"stdio"," \xb7"," ",e.command?`${e.command} ${(e.args||[]).join(" ")}`:e.url]})]}),(0,a.jsx)(l.$n,{size:"sm",variant:"ghost",onClick:()=>K(e.id),children:"Remove"})]},e.id)),!e?.mcpServers?.length&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"No MCP servers in library yet."})]})]}),(0,a.jsxs)(l.Zp,{padding:"md",children:[(0,a.jsx)("h2",{className:"text-sm font-semibold text-text-main mb-3",children:"Add MCP server"}),(0,a.jsxs)("form",{className:"grid gap-2 sm:grid-cols-2",onSubmit:_,children:[(0,a.jsx)("input",{required:!0,className:"bg-surface border border-border rounded-md px-2 py-1.5 text-xs font-mono",placeholder:"id (e.g. filesystem)",value:g.id,onChange:e=>f({...g,id:e.target.value})}),(0,a.jsx)("input",{className:"bg-surface border border-border rounded-md px-2 py-1.5 text-xs",placeholder:"Display name",value:g.name,onChange:e=>f({...g,name:e.target.value})}),(0,a.jsxs)("select",{className:"bg-surface border border-border rounded-md px-2 py-1.5 text-xs",value:g.transport,onChange:e=>f({...g,transport:e.target.value}),children:[(0,a.jsx)("option",{value:"stdio",children:"stdio (command)"}),(0,a.jsx)("option",{value:"http",children:"http (url)"}),(0,a.jsx)("option",{value:"sse",children:"sse (url)"})]}),"stdio"===g.transport?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("input",{className:"bg-surface border border-border rounded-md px-2 py-1.5 text-xs font-mono",placeholder:"command",value:g.command,onChange:e=>f({...g,command:e.target.value})}),(0,a.jsx)("input",{className:"sm:col-span-2 bg-surface border border-border rounded-md px-2 py-1.5 text-xs font-mono",placeholder:"args (space-separated)",value:g.args,onChange:e=>f({...g,args:e.target.value})})]}):(0,a.jsx)("input",{className:"sm:col-span-1 bg-surface border border-border rounded-md px-2 py-1.5 text-xs font-mono",placeholder:"https://...",value:g.url,onChange:e=>f({...g,url:e.target.value})}),(0,a.jsx)("div",{className:"sm:col-span-2",children:(0,a.jsx)(l.$n,{size:"sm",type:"submit",loading:"mcp"===d,disabled:!!d,children:"Save to library"})})]})]})]}),!s&&"catalog"===b&&(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsxs)(l.Zp,{padding:"md",children:[(0,a.jsx)("h2",{className:"text-sm font-semibold text-text-main mb-1",children:"Trusted presets"}),(0,a.jsx)("p",{className:"text-[11px] text-text-subtle mb-3",children:"Fetches SKILL.md only — never runs install scripts. You must confirm and then Apply sync."}),(0,a.jsx)("div",{className:"space-y-2",children:j.map(e=>(0,a.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2 p-2 rounded border border-border-subtle",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-sm text-text-main",children:e.name}),(0,a.jsx)("div",{className:"text-[11px] text-text-muted",children:e.description})]}),(0,a.jsxs)("div",{className:"flex gap-1",children:[(0,a.jsx)(l.$n,{size:"sm",variant:"ghost",onClick:()=>{k(e.rawUrl),C(e.skillId),W(e.rawUrl)},children:"Preview"}),(0,a.jsx)(l.$n,{size:"sm",variant:"secondary",onClick:()=>{k(e.rawUrl),C(e.skillId),O(!1)},children:"Select"})]})]},e.id))})]}),(0,a.jsxs)(l.Zp,{padding:"md",children:[(0,a.jsx)("h2",{className:"text-sm font-semibold text-text-main mb-2",children:"Install from URL"}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("input",{className:"w-full bg-surface border border-border rounded-md px-2 py-1.5 text-xs font-mono",placeholder:"skill-id",value:w,onChange:e=>C(e.target.value)}),(0,a.jsx)("input",{className:"w-full bg-surface border border-border rounded-md px-2 py-1.5 text-xs font-mono",placeholder:"https://.../SKILL.md",value:N,onChange:e=>k(e.target.value)}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:(0,a.jsx)(l.$n,{size:"sm",variant:"secondary",disabled:!N||!!d,onClick:()=>W(N),children:"Preview"})}),S&&(0,a.jsx)("pre",{className:"text-[10px] font-mono max-h-48 overflow-auto bg-surface-2 p-2 rounded border border-border-subtle whitespace-pre-wrap",children:S}),(0,a.jsxs)("label",{className:"flex items-start gap-2 text-xs text-text-muted cursor-pointer",children:[(0,a.jsx)("input",{type:"checkbox",checked:$,onChange:e=>O(e.target.checked)}),"I reviewed this skill and understand it may instruct agents to run tools/shell commands."]}),(0,a.jsx)(l.$n,{size:"sm",disabled:!N||!w||!$||!!d,loading:"catalog"===d,onClick:B,children:"Install into library"})]})]})]}),!s&&"advanced"===b&&(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsxs)(l.Zp,{padding:"md",children:[(0,a.jsx)("h2",{className:"text-sm font-semibold text-text-main mb-2",children:"Clean managed projections"}),(0,a.jsxs)("p",{className:"text-xs text-text-muted mb-3",children:["Removes only ",(0,a.jsx)("code",{className:"font-mono",children:"sb-*"})," skills and MCP keys written by Switchboard. Your other skills/MCP stay untouched."]}),(0,a.jsx)(l.$n,{size:"sm",variant:"outline",disabled:!!d,loading:"clean"===d,onClick:()=>{confirm("Remove all Switchboard-managed skill/MCP projections from targets?")&&U("clean")},children:"Clean managed only"})]}),(0,a.jsxs)(l.Zp,{padding:"md",children:[(0,a.jsx)("h2",{className:"text-sm font-semibold text-text-main mb-2",children:"Export AgentSync layout"}),(0,a.jsxs)("p",{className:"text-xs text-text-muted mb-2",children:["Writes a coexistence-friendly ",(0,a.jsx)("code",{className:"font-mono",children:".agents/"})," tree (skills + agentsync.toml). Does not run agentsync. Paths must be under your home or project directory."]}),(0,a.jsx)("input",{className:"w-full bg-surface border border-border rounded-md px-2 py-1.5 text-xs font-mono mb-2",placeholder:"Optional dest (default ~/switchboard-agents-export/.agents)",value:I,onChange:e=>L(e.target.value)}),(0,a.jsx)(l.$n,{size:"sm",variant:"secondary",disabled:!!d,loading:"export"===d,onClick:F,children:"Export"})]}),(0,a.jsxs)(l.Zp,{padding:"md",children:[(0,a.jsx)("h2",{className:"text-sm font-semibold text-text-main mb-2",children:"Coexistence"}),(0,a.jsxs)("ul",{className:"text-xs text-text-muted space-y-1 list-disc pl-4",children:[(0,a.jsxs)("li",{children:["Switchboard only owns ",(0,a.jsx)("code",{className:"font-mono",children:"sb-*"})," skill directories and MCP keys."]}),(0,a.jsx)("li",{children:"AgentSync / skillbook may manage other paths — avoid pointing both at the same un-namespaced skill."}),(0,a.jsx)("li",{children:"Product skills for HTTP agents remain under Dashboard → Skills (separate)."})]})]})]})]})}function i({label:e,value:t}){return(0,a.jsxs)(l.Zp,{padding:"sm",children:[(0,a.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-text-subtle font-semibold",children:e}),(0,a.jsx)("div",{className:"text-sm text-text-main mt-1 font-medium truncate",title:t,children:t})]})}}},e=>{e.O(0,[2574,3862,1610,2562,1321,705,5497,8441,3794,7358],()=>e(e.s=15691)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4465],{70065:(e,t,r)=>{Promise.resolve().then(r.bind(r,88512))},88512:(e,t,r)=>{"use strict";r.d(t,{default:()=>g});var s=r(95155),a=r(12115),i=r(35497),l=r(28777),n=r(88105);let o="basic-chat.sessions",d="basic-chat.activeSessionId",c="basic-chat.activeProviderId",m="basic-chat.draft";function u(){return globalThis.crypto?.randomUUID?globalThis.crypto.randomUUID():`chat_${Date.now()}_${Math.random().toString(16).slice(2)}`}function p(e){if("string"==typeof e)return e;if(null==e)return"";if(Array.isArray(e))return e.map(p).filter(Boolean).join(" ");if("object"==typeof e){if("string"==typeof e.message)return e.message;if("string"==typeof e.error)return e.error;try{return JSON.stringify(e)}catch{}}return String(e)}function h(e=""){let t=p(e).replace(/\s+/g," ").trim();return t?t.length>52?`${t.slice(0,52).trimEnd()}…`:t:"New chat"}async function x(e){return await new Promise((t,r)=>{let s=new FileReader;s.onload=()=>t(String(s.result||"")),s.onerror=()=>r(s.error||Error("Failed to read file")),s.readAsDataURL(e)})}function f(e){return e?.name||function(e=""){return String(e).replace(/[-_]/g," ").replace(/\b\w/g,e=>e.toUpperCase()).trim()||"Unknown"}(e?.provider||e?.id||"provider")}function g(){let[e,t]=(0,a.useState)([]),[r,g]=(0,a.useState)(!0),[w,v]=(0,a.useState)(""),[b,N]=(0,a.useState)(()=>{try{let e=function(e,t){try{return JSON.parse(e)}catch{return t}}(globalThis.localStorage.getItem(o),[]);return Array.isArray(e)?e.map(e=>({...e,messages:Array.isArray(e.messages)?e.messages:[]})):[]}catch{return[]}}),[y,j]=(0,a.useState)(()=>globalThis.localStorage.getItem(d)||""),[S,I]=(0,a.useState)(()=>globalThis.localStorage.getItem(c)||""),[A,k]=(0,a.useState)(""),[D,O]=(0,a.useState)(()=>globalThis.localStorage.getItem(m)||""),[$,C]=(0,a.useState)([]),[_,M]=(0,a.useState)(!1),[E,T]=(0,a.useState)(""),[U,R]=(0,a.useState)(""),[z,q]=(0,a.useState)(!1),[P,J]=(0,a.useState)(!1),[B,F]=(0,a.useState)(!1),K=(0,a.useRef)(null),L=(0,a.useRef)(null),W=(0,a.useRef)(!1),H=(0,a.useRef)(null),Y=(0,a.useRef)(null);(0,a.useEffect)(()=>{q(!0)},[]),(0,a.useEffect)(()=>{let e=!1;return async function(){g(!0),v("");try{let r=await fetch("/api/providers",{cache:"no-store"}),s=await r.json().catch(()=>({})),a=Array.isArray(s.connections)?s.connections.filter(e=>e?.isActive!==!1):[];if(0===a.length){e||(t([]),v("No providers connected yet."));return}let i=new Map;for(let e of a){let t=e.provider||e.id,r=f(e),s=(0,n.mq)(t)?"openai-compatible":(0,n.gb)(t)?"anthropic-compatible":t;i.has(t)||i.set(t,{providerId:t,providerName:r,providerType:s,connections:[],models:[]});let a=i.get(t);a.providerName=a.providerName||r,a.providerType=a.providerType||s,a.connections.push(e);let o=(0,l.KC)(t).map(t=>t?.id?{id:`${e.provider}/${t.id}`,requestModel:`${e.provider}/${t.id}`,name:t.name||t.id,providerId:e.provider,providerName:f(e),source:"static"}:null).filter(Boolean);a.models.push(...o)}for(let e of(await Promise.all(a.map(async e=>{try{let t=await fetch(`/api/providers/${e.id}/models`,{cache:"no-store"}),r=await t.json().catch(()=>({}));if(!t.ok)return{connection:e,models:[]};let s=(Array.isArray(r?.models)?r.models:Array.isArray(r?.data)?r.data:Array.isArray(r?.results)?r.results:Array.isArray(r)?r:[]).map(t=>(function(e,t){let r="string"==typeof e?e:e?.id||e?.name||e?.model||"";if(!r)return null;let s="string"==typeof e?e:e?.name||e?.displayName||r,a=r;return((0,n.mq)(t.provider)||(0,n.gb)(t.provider))&&!r.includes("/")&&(a=`${t.provider}/${r}`),{id:a,requestModel:a,name:s,providerId:t.provider,providerName:f(t),source:"live"}})(t,e)).filter(Boolean);return{connection:e,models:s}}catch{return{connection:e,models:[]}}})))){let t=e.connection.provider||e.connection.id,r=i.get(t);r&&r.models.push(...e.models)}let o=Array.from(i.values()).map(e=>({...e,models:(function(e){let t=new Map;for(let r of e)r?.id&&(t.has(r.id)||t.set(r.id,r));return Array.from(t.values())})(e.models).sort((e,t)=>e.name.localeCompare(t.name))})).filter(e=>e.models.length>0).sort((e,t)=>e.providerName.localeCompare(t.providerName));e||(t(o),0===o.length&&v("Providers connected but no models available."))}catch(r){e||(v(p(r?.message)||"Failed to load providers/models."),t([]))}finally{e||g(!1)}}(),()=>{e=!0}},[]),(0,a.useEffect)(()=>{let e=e=>{H.current&&!H.current.contains(e.target)&&J(!1),Y.current&&!Y.current.contains(e.target)&&F(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]);let G=(0,a.useMemo)(()=>{let t=new Map;for(let r of e)for(let e of r.models)t.set(e.id,{...e,providerId:r.providerId,providerName:r.providerName});return t},[e]),Q=(0,a.useMemo)(()=>e.find(e=>e.providerId===S)||e[0]||null,[e,S]),V=(0,a.useMemo)(()=>{if(A&&G.has(A))return G.get(A);if(y){let e=b.find(e=>e.id===y);if(e?.modelId&&G.has(e.modelId))return G.get(e.modelId)}return Q?.models?.[0]||null},[A,G,Q,b,y]),X=(0,a.useMemo)(()=>b.find(e=>e.id===y)||null,[b,y]),Z=X?.messages||[],ee=(0,a.useMemo)(()=>[...b].sort((e,t)=>new Date(t.updatedAt).getTime()-new Date(e.updatedAt).getTime()),[b]),et=!_&&!!V&&(D.trim().length>0||$.length>0);(0,a.useEffect)(()=>{if(z)try{globalThis.localStorage.setItem(o,JSON.stringify(b)),globalThis.localStorage.setItem(d,y),globalThis.localStorage.setItem(c,S),globalThis.localStorage.setItem(m,D)}catch{}},[z,b,y,S,D]),(0,a.useEffect)(()=>{if(!z||r||W.current||0===e.length)return;let t=e.find(e=>e.providerId===S)||e[0],s=A&&G.has(A)?G.get(A):t.models[0];if(b.length>0){let e=b.find(e=>e.id===y)||b[0],r=e?.modelId&&G.has(e.modelId)?G.get(e.modelId):s;W.current=!0,j(e.id),I(r?.providerId||t.providerId),k(r?.id||s.id);return}let a={id:u(),title:"New chat",providerId:t.providerId,providerName:t.providerName,modelId:s.id,modelName:s.name,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),messages:[]};W.current=!0,N([a]),j(a.id),I(t.providerId),k(s.id)},[z,r,e,G,b,y,S,A]);let er=(e,t)=>{N(r=>r.map(r=>r.id===e?t({...r,messages:Array.isArray(r.messages)?r.messages.map(e=>({...e})):[]}):r))},es=e=>e?{id:u(),title:"New chat",providerId:e.providerId,providerName:e.providerName,modelId:e.id,modelName:e.name,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),messages:[]}:null,ea=async e=>{let t=Array.from(e.target.files||[]);if(0===t.length)return;let r=t.filter(e=>e.type.startsWith("image/"));if(0===r.length){e.target.value="";return}let s=await Promise.all(r.map(async e=>({id:u(),name:e.name,type:e.type,size:e.size,dataUrl:await x(e)})));C(e=>[...e,...s]),e.target.value=""},ei=async()=>{let e=V||Q?.models?.[0]||null;if(!e)return;let t=D.trim();if(!t&&0===$.length)return;let r=y,s=b.find(e=>e.id===r);if(!s){if(!(s=es(e)))return;r=s.id,N(e=>[s,...e]),j(r)}let a={id:u(),role:"user",content:t,attachments:$.map(e=>({id:e.id,name:e.name,type:e.type,dataUrl:e.dataUrl})),createdAt:new Date().toISOString()},i=u(),l={id:i,role:"assistant",content:"",createdAt:new Date().toISOString(),status:"streaming"},n=[...s.messages||[],a,l];N(s=>s.map(s=>s.id===r?{...s,providerId:e.providerId,providerName:e.providerName,modelId:e.id,modelName:e.name,messages:n,updatedAt:new Date().toISOString(),title:"New chat"===s.title?h(t):s.title}:s)),O(""),C([]),M(!0),T(i),R(""),L.current?.abort(),L.current=new AbortController;let o=n.filter(e=>"assistant"!==e.role||e.id!==i).map(e=>({role:e.role,content:"user"===e.role?function(e){let t=p(e.content).trim(),r=Array.isArray(e.attachments)?e.attachments:[];if(0===r.length)return t;let s=[];for(let e of(t&&s.push({type:"text",text:t}),r))e?.dataUrl&&s.push({type:"image_url",image_url:{url:e.dataUrl}});return s.length>0?s:t}(e):e.content}));try{var d;let s,a=await fetch("/api/dashboard/chat/completions",{method:"POST",headers:{"Content-Type":"application/json",Accept:"text/event-stream"},body:JSON.stringify({model:e.requestModel||e.id,messages:o,stream:!0}),signal:L.current.signal});if(!a.ok){let e=await a.json().catch(()=>({}));throw Error(p(e.error||e.message||`Request failed (${a.status})`))}let l=a.body?.getReader();if(!l){let e=await a.json().catch(()=>({})),t=p(e?.choices?.[0]?.message?.content||e?.output_text||e?.error||e?.message||"");er(r,e=>({...e,messages:e.messages.map(e=>e.id===i?{...e,content:t,status:"done"}:e),updatedAt:new Date().toISOString()}));return}let n=new TextDecoder,c="",m="";for(;;){let{value:e,done:t}=await l.read();if(t)break;let s=(c+=n.decode(e,{stream:!0})).split(/\r?\n/);for(let e of(c=s.pop()||"",s)){let t=e.trim();if(!t.startsWith("data:"))continue;let s=t.slice(5).trim();if(s&&"[DONE]"!==s)try{let e=JSON.parse(s),t=function(e){if(!e||"object"!=typeof e)return"";let t=e.choices?.[0];return[(t?.delta||{}).content,t?.message?.content,e.output_text,e.text].map(p).filter(Boolean)[0]||""}(e);if(!t)continue;m+=t,R(m),er(r,e=>({...e,messages:e.messages.map(e=>e.id===i?{...e,content:m,status:"streaming"}:e),updatedAt:new Date().toISOString()}))}catch{}}}er(r,e=>({...e,messages:e.messages.map(e=>e.id===i?{...e,content:m||e.content,status:"done"}:e),updatedAt:new Date().toISOString()})),d=r,s=h(t),er(d,e=>({...e,title:"New chat"===e.title?s:e.title,updatedAt:new Date().toISOString()}))}catch(e){if("AbortError"!==e.name){let t=p(e?.message||e);er(r,e=>({...e,messages:e.messages.map(e=>e.id===i?{...e,content:e.content||`Error: ${t}`,status:"error"}:e),updatedAt:new Date().toISOString()})),v(t||"Failed to send message.")}}finally{M(!1),T(""),R(""),L.current=null}},el=V?`${V.name}`:"Select model",en=V?V.requestModel:"Choose from connected providers";return(0,s.jsx)("div",{className:"relative flex-1 flex flex-col h-full min-h-0 min-w-0 bg-[#212121] text-white overflow-hidden",children:(0,s.jsxs)("div",{className:"relative mx-auto flex flex-1 h-full min-h-0 w-full max-w-4xl flex-col",children:[(0,s.jsxs)("div",{className:"flex shrink-0 items-center justify-between gap-3 px-4 py-3 lg:px-6",children:[(0,s.jsxs)("div",{ref:H,className:"relative",children:[(0,s.jsx)("button",{type:"button",onClick:()=>J(e=>!e),className:"flex items-center gap-3 rounded-2xl border border-white/10 bg-white/5 px-4 py-3 text-left transition hover:bg-white/8",children:(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"text-sm font-semibold text-white",children:el}),(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px] text-white/70",children:"expand_more"})]}),(0,s.jsx)("p",{className:"truncate text-xs text-white/55",children:en})]})}),P?(0,s.jsxs)("div",{className:"absolute left-0 top-[calc(100%+10px)] z-30 w-[min(520px,calc(100vw-2rem))] overflow-hidden rounded-[20px] border border-white/10 bg-[#262626] shadow-2xl shadow-black/50",children:[(0,s.jsxs)("div",{className:"border-b border-white/10 px-4 py-3",children:[(0,s.jsx)("p",{className:"text-xs uppercase tracking-[0.22em] text-white/45",children:"Models"}),(0,s.jsx)("p",{className:"text-sm text-white/75",children:"Only from connected providers"})]}),(0,s.jsx)("div",{className:"max-h-[60vh] overflow-y-auto p-2 custom-scrollbar",children:e.map(e=>(0,s.jsxs)("div",{className:"mb-2 rounded-[16px] border border-white/10 bg-black/20 p-2",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between px-2 py-2",children:[(0,s.jsx)("p",{className:"text-sm font-semibold text-white",children:e.providerName}),(0,s.jsx)(i.Ex,{size:"sm",variant:"default",children:e.models.length})]}),(0,s.jsx)("div",{className:"grid gap-2 sm:grid-cols-2",children:e.models.map(e=>{let t=e.id===A;return(0,s.jsx)("button",{type:"button",onClick:()=>(e=>{let t=G.get(e);if(!t)return;let r=b.find(e=>e.id===y);if(r&&r.messages.length>0){let e=es(t);if(!e)return;N(t=>[e,...t]),j(e.id)}else if(r)N(e=>e.map(e=>e.id===r.id?{...e,providerId:t.providerId,providerName:t.providerName,modelId:t.id,modelName:t.name}:e)),j(r.id);else{let e=es(t);if(!e)return;N(t=>[e,...t]),j(e.id)}I(t.providerId),k(t.id),J(!1)})(e.id),className:`rounded-[14px] border px-3 py-3 text-left transition ${t?"border-blue-400/40 bg-blue-500/15":"border-white/10 bg-white/5 hover:bg-white/8"}`,children:(0,s.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("p",{className:"truncate text-sm font-medium text-white",children:e.name}),(0,s.jsx)("p",{className:"truncate text-[11px] text-white/45",children:e.requestModel})]}),t?(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px] text-blue-300",children:"check_circle"}):null]})},e.id)})})]},e.providerId))})]}):null]}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("button",{type:"button",onClick:()=>F(e=>!e),className:"rounded-2xl border border-white/10 bg-white/5 px-4 py-3 text-sm text-white/80 transition hover:bg-white/8",children:"History"}),(0,s.jsx)(i.$n,{variant:"ghost",size:"sm",icon:"delete",onClick:()=>{if(!y)return;let e=b.filter(e=>e.id!==y),t=e[0]||null;N(e),t?(j(t.id),I(t.providerId),k(t.modelId)):(j(""),I(""),k(""))},disabled:!y||0===b.length,children:"Clear"})]})]}),B?(0,s.jsxs)("div",{ref:Y,className:"absolute right-4 top-[72px] z-20 w-[min(360px,calc(100vw-2rem))] rounded-[20px] border border-white/10 bg-[#262626] p-2 shadow-2xl shadow-black/50 lg:right-6",children:[(0,s.jsx)("div",{className:"px-3 py-2",children:(0,s.jsx)("p",{className:"text-xs uppercase tracking-[0.22em] text-white/45",children:"Recent chats"})}),(0,s.jsx)("div",{className:"max-h-[48vh] space-y-2 overflow-y-auto p-1 custom-scrollbar",children:0===ee.length?(0,s.jsx)("div",{className:"rounded-[16px] border border-dashed border-white/10 bg-white/5 p-4 text-sm text-white/55",children:"No conversations yet."}):ee.map(e=>{let t=e.id===y,r=[...e.messages||[]].reverse().find(e=>"user"===e.role)||e.messages?.[0];return(0,s.jsx)("button",{type:"button",onClick:()=>{var t;let r;return t=e.id,void((r=b.find(e=>e.id===t))&&(j(t),I(r.providerId||S),k(r.modelId||A),F(!1)))},className:`w-full rounded-[16px] border px-3 py-3 text-left transition ${t?"border-blue-400/40 bg-blue-500/15":"border-white/10 bg-white/5 hover:bg-white/8"}`,children:(0,s.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsx)("p",{className:"truncate text-sm font-medium text-white",children:e.title}),(0,s.jsx)("p",{className:"mt-1 truncate text-xs text-white/50",children:p(r?.content)||"Empty chat"})]}),(0,s.jsx)("span",{className:"text-[10px] text-white/40 shrink-0",children:function(e){if(!e)return"Now";let t=new Date(e).getTime();if(Number.isNaN(t))return"Now";let r=Math.max(1,Math.round((Date.now()-t)/6e4));if(r<60)return`${r}m`;let s=Math.round(r/60);return s<24?`${s}h`:`${Math.round(s/24)}d`}(e.updatedAt)})]})},e.id)})})]}):null,w?(0,s.jsx)("div",{className:"mt-4 rounded-[18px] border border-rose-500/20 bg-rose-500/10 px-4 py-3 text-rose-100",children:(0,s.jsxs)("div",{className:"flex items-start gap-3",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"error"}),(0,s.jsx)("p",{className:"text-sm leading-6",children:w})]})}):null,(0,s.jsxs)("div",{className:"flex flex-1 flex-col min-h-0",children:[(0,s.jsxs)("div",{className:"flex-1 overflow-y-auto py-4 custom-scrollbar",children:[0===Z.length?(0,s.jsx)("div",{className:"flex min-h-[50vh] items-center justify-center px-4 text-center",children:(0,s.jsxs)("div",{className:"max-w-xl space-y-4",children:[(0,s.jsx)("div",{className:"mx-auto flex size-16 items-center justify-center rounded-[20px] border border-white/10 bg-white/5 text-white/80",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[30px]",children:"chat"})}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("h2",{className:"text-2xl font-semibold text-white",children:"Start a conversation"}),(0,s.jsx)("p",{className:"text-sm leading-6 text-white/60",children:"Simple chat interface to interact with any AI model from connected providers. Select a model and start chatting!"})]})]})}):null,(0,s.jsx)("div",{className:"mx-auto flex w-full max-w-3xl flex-col gap-4 px-4",children:Z.map(e=>{let t="user"===e.role,r="assistant"===e.role,a=r&&e.id===E&&"streaming"===e.status,i=p(e.content)||(r?U:"");return(0,s.jsx)("div",{className:`flex w-full ${t?"justify-end":"justify-start"} mb-6`,children:(0,s.jsxs)("div",{className:`max-w-[min(88%,42rem)] ${t?"rounded-3xl bg-[#2f2f2f] px-5 py-3.5 text-white":"text-white/90"}`,children:[(0,s.jsx)("div",{className:"mb-1 flex items-center justify-between gap-3",children:(0,s.jsx)("span",{className:"text-xs font-semibold",children:t?"You":V?.name||"Assistant"})}),e.attachments?.length?(0,s.jsx)("div",{className:"mb-3 grid grid-cols-2 gap-2 sm:grid-cols-3 mt-2",children:e.attachments.map(e=>(0,s.jsx)("a",{href:e.dataUrl,target:"_blank",rel:"noreferrer",className:"overflow-hidden rounded-[18px] border border-white/10 bg-black/20",children:(0,s.jsx)("img",{src:e.dataUrl,alt:e.name,className:"h-28 w-full object-cover"})},e.id))}):null,(0,s.jsxs)("div",{className:"whitespace-pre-wrap break-words text-[15px] leading-7",children:[i,r&&a&&!U?(0,s.jsx)("span",{className:"inline-block animate-pulse",children:"▋"}):null]})]})},e.id)})})]}),(0,s.jsxs)("div",{className:"shrink-0 pt-2",children:[$.length>0?(0,s.jsx)("div",{className:"mx-auto mb-3 flex w-full max-w-3xl flex-wrap gap-2 px-4",children:$.map(e=>(0,s.jsxs)("div",{className:"flex items-center gap-2 rounded-full border border-white/10 bg-white/5 px-3 py-2",children:[(0,s.jsx)("span",{className:"text-xs text-white/80 max-w-[12rem] truncate",children:e.name}),(0,s.jsx)("button",{type:"button",onClick:()=>{var t;return t=e.id,void C(e=>e.filter(e=>e.id!==t))},className:"text-white/55 hover:text-white","aria-label":"Remove attachment",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"close"})})]},e.id))}):null,(0,s.jsx)("div",{className:"mx-auto w-full max-w-3xl px-4 pb-2",children:(0,s.jsxs)("div",{className:"rounded-[26px] bg-[#2f2f2f] px-3 pt-3 pb-2 shadow-[0_0_15px_rgba(0,0,0,0.10)] ring-1 ring-white/5",children:[(0,s.jsx)("textarea",{value:D,onChange:e=>O(e.target.value),onKeyDown:e=>{"Enter"===e.key&&!e.shiftKey&&(e.preventDefault(),et&&ei())},placeholder:"Message AI",rows:1,className:"w-full resize-none bg-transparent px-2 text-[15px] leading-6 text-white outline-none placeholder:text-white/40 custom-scrollbar max-h-[25vh] overflow-y-auto"}),(0,s.jsxs)("div",{className:"mt-2 flex items-center justify-between gap-3",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("button",{type:"button",onClick:()=>K.current?.click(),disabled:!V||r,className:"p-2 text-white/50 hover:text-white transition rounded-full hover:bg-white/5",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"attach_file"})}),(0,s.jsx)("input",{ref:K,type:"file",accept:"image/*",multiple:!0,className:"hidden",onChange:ea}),(0,s.jsx)("span",{className:"text-xs font-medium text-white/30 truncate max-w-[120px]",children:V?V.name:"No model"})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[_?(0,s.jsx)("button",{type:"button",onClick:()=>{L.current?.abort()},className:"p-2 text-white bg-white/10 hover:bg-white/20 transition rounded-full h-8 w-8 flex items-center justify-center",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"stop"})}):null,(0,s.jsx)("button",{onClick:ei,disabled:!et,className:`h-8 w-8 rounded-full flex items-center justify-center transition ${et?"bg-white text-black hover:opacity-90":"bg-white/10 text-white/30 cursor-not-allowed"}`,children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"arrow_upward"})})]})]})]})})]}),(0,s.jsx)("p",{className:"mx-auto mt-2 max-w-3xl px-4 pb-4 text-center text-[11px] text-white/30",children:"Model list is filtered from connected providers."})]})]})})}}},e=>{e.O(0,[2574,3862,1610,2562,1321,705,5497,8441,3794,7358],()=>e(e.s=70065)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3554],{12396:(e,r,s)=>{Promise.resolve().then(s.bind(s,85309))},85309:(e,r,s)=>{"use strict";s.d(r,{default:()=>v});var t=s(95155),a=s(12115),i=s(98500),o=s.n(i),l=s(35497),c=s(3534),d=s(28777),n=s(37700);function v({toolId:e,machineId:r}){let s=c.dM[e],[i,x]=(0,a.useState)([]),[u,h]=(0,a.useState)(!0),[m,p]=(0,a.useState)({}),[f,P]=(0,a.useState)([]);(0,a.useEffect)(()=>{let e=!0;return(async()=>{try{let[r,s]=await Promise.all([fetch("/api/providers"),fetch("/api/keys")]);if(!e)return;if(r.ok){let e=await r.json();x(e.connections||[])}if(s.ok){let e=await s.json();P(e.keys||[])}}catch(e){console.log("Error loading tool data:",e)}finally{e&&h(!1)}})(),()=>{e=!1}},[]);let j=()=>i.filter(e=>!1!==e.isActive),w=(0,a.useCallback)((e,r,s)=>{p(t=>t[e]?.[r]===s?t:{...t,[e]:{...t[e],[r]:s}})},[]);return s?u?(0,t.jsx)("div",{className:"mx-auto flex w-full max-w-5xl flex-col gap-4 px-1 sm:px-0",children:(0,t.jsx)(l.Qv,{})}):(0,t.jsxs)("div",{className:"mx-auto flex w-full max-w-5xl flex-col gap-4 px-1 sm:px-0",children:[(0,t.jsxs)(o(),{href:"/dashboard/cli-tools",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary w-fit",children:[(0,t.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"arrow_back"}),"Back to CLI Tools"]}),r?(0,t.jsxs)("p",{className:"text-xs text-text-muted font-mono",children:["Machine: ",r]}):null,(()=>{let r,a,i,o=(r=j(),a=[],i=new Set,r.forEach(e=>{let r=d.Xg[e.provider]||e.provider;(0,d.KC)(e.provider).forEach(s=>{let t=`${r}/${s.id}`;i.has(t)||(i.add(t),a.push({value:t,label:`${r}/${s.id}`,provider:e.provider,alias:r,connectionName:e.name,modelId:s.id}))})}),a).length>0,l={tool:s,isExpanded:!0,onToggle:()=>{},baseUrl:window.location.origin,apiKeys:f,tunnelEnabled:!1,tunnelPublicUrl:"",tailscaleEnabled:!1,tailscaleUrl:"",cloudEnabled:!1};switch(e){case"claude":return(0,t.jsx)(n.Tk,{...l,activeProviders:j(),modelMappings:m[e]||{},onModelMappingChange:(r,s)=>w(e,r,s),hasActiveProviders:o});case"codex":return(0,t.jsx)(n.Ah,{...l,activeProviders:j()});case"opencode":return(0,t.jsx)(n.qO,{...l,activeProviders:j()});case"cowork":return(0,t.jsx)(n.Q6,{...l,activeProviders:j(),hasActiveProviders:o,cloudUrl:""});case"droid":return(0,t.jsx)(n.ZM,{...l,activeProviders:j(),hasActiveProviders:o});case"openclaw":return(0,t.jsx)(n.yZ,{...l,activeProviders:j(),hasActiveProviders:o});case"hermes":return(0,t.jsx)(n.RF,{...l,activeProviders:j(),hasActiveProviders:o});case"copilot":return(0,t.jsx)(n.h1,{...l,activeProviders:j()});case"cline":return(0,t.jsx)(n.aG,{...l,activeProviders:j()});case"kilo":return(0,t.jsx)(n.c9,{...l,activeProviders:j()});case"deepseek-tui":return(0,t.jsx)(n.lF,{...l,activeProviders:j(),hasActiveProviders:o});case"jcode":return(0,t.jsx)(n.mW,{...l,activeProviders:j(),hasActiveProviders:o});case"grok":return(0,t.jsx)(n.wg,{...l,activeProviders:j(),hasActiveProviders:o});case"pi":return(0,t.jsx)(n.S3,{...l,activeProviders:j(),hasActiveProviders:o});case"aider":return(0,t.jsx)(n.qn,{...l,activeProviders:j(),hasActiveProviders:o});case"gemini-cli":return(0,t.jsx)(n.Ib,{...l,activeProviders:j(),hasActiveProviders:o});default:return(0,t.jsx)(n.a7,{toolId:e,...l,activeProviders:j()})}})()]}):(0,t.jsxs)("div",{className:"mx-auto flex w-full max-w-5xl flex-col gap-4 px-1 sm:px-0",children:[(0,t.jsxs)(o(),{href:"/dashboard/cli-tools",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary w-fit",children:[(0,t.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"arrow_back"}),"Back to CLI Tools"]}),(0,t.jsx)("p",{className:"text-sm text-text-muted",children:"Tool not found or disabled."})]})}}},e=>{e.O(0,[2574,3862,1610,2562,5772,1321,705,5497,1655,8441,3794,7358],()=>e(e.s=12396)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2326],{53501:(e,s,l)=>{"use strict";l.d(s,{default:()=>m});var a=l(95155),t=l(12115),r=l(35497),i=l(3534),n=l(37700),c=l(98500),o=l.n(c),d=l(5772);function x({toolId:e,tool:s,status:l}){let t=l?l.installed?l.hasSwitchboard?{label:"Connected",cls:"bg-green-500/10 text-green-600 dark:text-green-400 border border-green-500/20"}:{label:"Installed \xb7 not configured",cls:"bg-amber-500/10 text-amber-600 dark:text-amber-400 border border-amber-500/25"}:{label:"Not installed",cls:"bg-orange-500/15 text-orange-600 dark:text-orange-400 border border-orange-500/25"}:{label:"Unknown",cls:"bg-gray-500/10 text-gray-500"};return(0,a.jsx)(o(),{href:`/dashboard/cli-tools/${e}`,className:"block",children:(0,a.jsx)(r.Zp,{padding:"sm",className:"h-full overflow-hidden hover:border-primary/50 transition-colors cursor-pointer",children:(0,a.jsx)("div",{className:"flex h-full flex-col gap-2",children:(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:s.image?(0,a.jsx)(d.default,{src:s.image,alt:s.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:e=>{e.target.style.display="none"}}):s.icon?(0,a.jsx)("span",{className:"material-symbols-outlined text-[28px]",style:{color:s.color},children:s.icon}):null}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("h3",{className:"font-medium text-sm truncate",children:s.name}),(0,a.jsx)("span",{className:`inline-block mt-1 px-1.5 py-0.5 text-[10px] font-medium rounded-full ${t.cls}`,children:t.label})]}),(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[18px] shrink-0",children:"chevron_right"})]})})})})}function m({machineId:e}){let[s,l]=(0,t.useState)(!0),[c,o]=(0,t.useState)({});if((0,t.useEffect)(()=>{let e=!0;return(async()=>{try{let s=await fetch("/api/cli-tools/all-statuses");s.ok&&e&&o(await s.json())}catch(e){console.log("Error fetching tool statuses:",e)}finally{e&&l(!1)}})(),()=>{e=!1}},[]),s)return(0,a.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 sm:gap-4",children:[(0,a.jsx)(r.Qv,{}),(0,a.jsx)(r.Qv,{}),(0,a.jsx)(r.Qv,{}),(0,a.jsx)(r.Qv,{}),(0,a.jsx)(r.Qv,{}),(0,a.jsx)(r.Qv,{})]});let d=Object.entries(i.dM),g=Object.entries(i.wn);return(0,a.jsxs)("div",{className:"mx-auto flex w-full max-w-5xl flex-col gap-6 px-1 sm:px-0",children:[(0,a.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 sm:gap-4",children:d.map(([e,s])=>(0,a.jsx)(x,{toolId:e,tool:s,status:c[e]},e))}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:gap-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 px-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] text-primary",children:"security"}),(0,a.jsx)("h2",{className:"text-sm font-semibold text-text-main",children:"MITM Tools"})]}),(0,a.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 sm:gap-4",children:g.map(([e,s])=>(0,a.jsx)(n.gY,{tool:s},e))})]})]})}},98521:(e,s,l)=>{Promise.resolve().then(l.bind(l,53501))}},e=>{e.O(0,[2574,3862,1610,2562,5772,1321,705,5497,1655,8441,3794,7358],()=>e(e.s=98521)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3649],{48451:(e,t,a)=>{"use strict";a.d(t,{default:()=>x});var l=a(95155),s=a(12115),r=a(44923),o=a(87256),n=a(39768),i=a(5020),c=a(35497),d=a(11059);a(88105);let m=/^[a-zA-Z0-9_.\-]+$/;function x({initialData:e}){let[t,a]=(0,s.useState)(()=>(e?.combos||[]).filter(e=>!e.kind||"llm"===e.kind)),[r,o]=(0,s.useState)(!e),[n,i]=(0,s.useState)(!1),[m,p]=(0,s.useState)(null),[h,b]=(0,s.useState)(e?.connections||[]),[g,y]=(0,s.useState)(e?.settings?.comboStrategies||{}),[v,N]=(0,s.useState)(e?.modelCaps||{}),[k,w]=(0,s.useState)(null),{copied:C,copy:S}=(0,d.C)(),R=async()=>{try{let[e,t,l,s]=await Promise.all([fetch("/api/combos"),fetch("/api/providers"),fetch("/api/settings"),fetch("/api/models")]),r=await e.json(),o=await t.json(),n=l.ok?await l.json():{};if(e.ok&&a((r.combos||[]).filter(e=>!e.kind||"llm"===e.kind)),t.ok&&b(o.connections||[]),s.ok){let e=await s.json(),t={};for(let a of e.models||[])a.caps&&(t[a.fullModel]=a.caps);N(t)}y(n.comboStrategies||{})}catch(e){console.log("Error fetching data:",e)}finally{o(!1)}};(0,s.useEffect)(()=>{e?.combos?o(!1):R()},[e]);let E=async e=>{try{let{strategy:t,capacityAutoSwitch:a,routerModel:l,objective:s,...r}=e,o=await fetch("/api/combos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)});if(o.ok){let e=await o.json().catch(()=>({})),n=r.name?.trim()||e?.name;n&&(t||void 0!==a||l||s)&&await F(n,u(t,a,l,s)),await R(),i(!1)}else{let e=await o.json();alert(e.error||"Failed to create combo")}}catch(e){console.log("Error creating combo:",e)}},M=async(e,t)=>{try{let{strategy:a,capacityAutoSwitch:l,routerModel:s,objective:r,...o}=t,n=m?.name,i=await fetch(`/api/combos/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(o)});if(i.ok){let e=o.name?.trim()||n;if(n&&e&&n!==e&&y(t=>{let a={...t};return n in a&&(e in a||(a[e]=a[n]),delete a[n]),a}),e&&(a||void 0!==l)){let t,o=n&&n!==e?(t={...g},n in t&&(e in t||(t[e]=t[n]),delete t[n]),t):g;await F(e,u(a,l,s,r),o)}await R(),p(null)}else{let e=await i.json();alert(e.error||"Failed to update combo")}}catch(e){console.log("Error updating combo:",e)}},A=async e=>{let l=t.find(t=>t.id===e);w({title:"Delete Combo",message:"Delete this combo?",onConfirm:async()=>{w(null);try{(await fetch(`/api/combos/${e}`,{method:"DELETE"})).ok&&(a(t=>t.filter(t=>t.id!==e)),l?.name&&y(e=>{if(!(l.name in e))return e;let t={...e};return delete t[l.name],t}))}catch(e){console.log("Error deleting combo:",e)}}})},F=async(e,t,a=null)=>{try{let l={...a||g},s={...l[e]||{},...t};for(let e of Object.keys(s))(""===s[e]||null===s[e]||void 0===s[e])&&delete s[e];let r=s.fallbackStrategy||"fallback";"fallback"!==r||s.judgeModel||s.routerModel||s.objective||void 0!==s.learningEnabled||void 0!==s.freezeLearning||void 0!==s.explorationRate||!1===s.capacityAutoSwitch?(!s.fallbackStrategy&&void 0===t.fallbackStrategy&&l[e]?.fallbackStrategy&&(s.fallbackStrategy=l[e].fallbackStrategy),l[e]=s):delete l[e],await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStrategies:l})}),y(l)}catch(e){console.log("Error updating combo strategy:",e)}};return r?(0,l.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,l.jsx)(c.Qv,{}),(0,l.jsx)(c.Qv,{})]}):(0,l.jsxs)("div",{className:"flex min-w-0 flex-col gap-6 px-1 sm:px-0",children:[(0,l.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,l.jsxs)("div",{className:"min-w-0 max-w-3xl",children:[(0,l.jsx)("h1",{className:"text-[17px] font-semibold text-text-main",children:"Combos"}),(0,l.jsx)("p",{className:"text-sm text-text-muted mt-1",children:"Group models under one name, then pick a strategy per combo:"}),(0,l.jsxs)("ul",{className:"text-sm text-text-muted mt-2 flex flex-col gap-1.5",children:[(0,l.jsxs)("li",{children:[(0,l.jsx)("span",{className:"font-medium text-text-main",children:"Fallback"})," ","— tries models in order (next on failure)"]}),(0,l.jsxs)("li",{children:[(0,l.jsx)("span",{className:"font-medium text-text-main",children:"Round Robin"})," ","— rotates models across requests to spread load"]}),(0,l.jsxs)("li",{children:[(0,l.jsx)("span",{className:"font-medium text-text-main",children:"Fusion"})," ","— queries all models in parallel, then a judge synthesizes one answer. Best quality, but costs the most: every request bills all panel models + the judge (N+1 calls)"]}),(0,l.jsxs)("li",{children:[(0,l.jsx)("span",{className:"font-medium text-text-main",children:"Auto"})," ","— a router model picks one worker from the pool each request (2 calls: router + worker); optional learning from outcomes"]}),(0,l.jsxs)("li",{children:[(0,l.jsx)("span",{className:"font-medium text-text-main",children:"Capacity auto-switch"})," ","— when enabled on a combo, sends image/PDF requests to a model that supports them first (works with Fallback, Round Robin, and Fusion)"]})]})]}),(0,l.jsx)(c.$n,{icon:"add",onClick:()=>i(!0),className:"w-full sm:w-auto whitespace-nowrap shrink-0",children:"Create Combo"})]}),0===t.length?(0,l.jsx)(c.Zp,{children:(0,l.jsxs)("div",{className:"text-center py-12",children:[(0,l.jsx)("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-full bg-primary/10 text-primary mb-4",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[32px]",children:"layers"})}),(0,l.jsx)("p",{className:"text-text-main font-medium mb-1",children:"No combos yet"}),(0,l.jsx)("p",{className:"text-sm text-text-muted mb-4 max-w-md mx-auto",children:"Create a named model group, choose Fallback / Round Robin / Fusion / Auto, and point clients at the combo name."}),(0,l.jsx)(c.$n,{icon:"add",onClick:()=>i(!0),className:"w-full sm:w-auto",children:"Create Combo"})]})}):(0,l.jsx)("div",{className:"flex flex-col gap-4",children:t.map(e=>(0,l.jsx)(f,{combo:e,modelCaps:v,activeProviders:h,copied:C,onCopy:S,onEdit:()=>p(e),onDelete:()=>A(e.id),strategy:g[e.name]||{},onSetStrategy:t=>F(e.name,t)},e.id))}),(0,l.jsx)(j,{isOpen:n,onClose:()=>i(!1),onSave:E,activeProviders:h,initialStrategy:{fallbackStrategy:"fallback",capacityAutoSwitch:!0}},"create"),(0,l.jsx)(j,{isOpen:!!m,combo:m,onClose:()=>p(null),onSave:e=>M(m.id,e),activeProviders:h,initialStrategy:m?g[m.name]||{fallbackStrategy:"fallback"}:{}},m?.id||"new"),(0,l.jsx)(c.uo,{isOpen:!!k,onClose:()=>w(null),onConfirm:k?.onConfirm,title:k?.title||"Confirm",message:k?.message,variant:"danger"})]})}function u(e,t,a,l){let s=e||"fallback",r={fallbackStrategy:s,...void 0!==t?{capacityAutoSwitch:t}:{}};return"auto"===s?(a&&(r.routerModel=a),l&&(r.objective=l),r.judgeModel=""):("fusion"===s?r.routerModel="":(r.routerModel="",r.judgeModel=""),r.objective="",r.learningEnabled="",r.freezeLearning="",r.explorationRate=""),r}let p=[{value:"fallback",label:"Fallback — try in order"},{value:"round-robin",label:"Round Robin — rotate load"},{value:"fusion",label:"Fusion — panel + judge (N+1)"},{value:"auto",label:"Auto — router picks 1 worker"}],h={fallback:"Tries models top-to-bottom; on failure uses the next.","round-robin":"Rotates models across requests to spread load.",fusion:"Calls every model, then a judge merges answers (bills N+1).",auto:"Router model chooses one worker each request (bills 2 calls)."},b=[{value:"quality",label:"Quality"},{value:"balanced",label:"Balanced"},{value:"economy",label:"Economy"},{value:"latency",label:"Latency"}];function f({combo:e,modelCaps:t={},activeProviders:a=[],copied:r,onCopy:o,onEdit:n,onDelete:i,strategy:d={},onSetStrategy:m}){let[x,u]=(0,s.useState)(!1),[g,j]=(0,s.useState)(!1),[y,v]=(0,s.useState)(!1),[N,k]=(0,s.useState)(""),w=d.fallbackStrategy||"fallback",C=d.judgeModel||"",S="auto"===w,R=d.routerModel||"",E=d.objective||"balanced",M=!1!==d.capacityAutoSwitch;return(0,l.jsxs)(c.Zp,{padding:"sm",className:"group",children:[(0,l.jsxs)("div",{className:"flex min-w-0 flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,l.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-3 sm:items-center",children:[(0,l.jsx)("div",{className:"size-8 rounded-lg bg-primary/10 flex items-center justify-center shrink-0",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-primary text-[18px]",children:"layers"})}),(0,l.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,l.jsx)("code",{className:"block truncate font-mono text-sm font-medium",children:e.name}),(0,l.jsx)("p",{className:"text-[10px] text-text-subtle mt-0.5",children:h[w]||""}),(0,l.jsxs)("div",{className:"mt-1 flex min-w-0 flex-wrap items-center gap-1",children:[0===e.models.length?(0,l.jsx)("span",{className:"text-xs text-text-muted italic",children:"No models"}):e.models.slice(0,3).map((e,a)=>(0,l.jsxs)("code",{className:"inline-flex items-center gap-1 rounded bg-black/5 px-1.5 py-0.5 font-mono text-xs text-text-muted dark:bg-white/5",children:[(0,l.jsx)("span",{children:e}),(0,l.jsx)(c.nh,{caps:t[e]})]},a)),e.models.length>3&&(0,l.jsxs)("span",{className:"text-[10px] text-text-muted",children:["+",e.models.length-3," more"]})]}),"fusion"===w&&(0,l.jsxs)("div",{className:"mt-2 flex min-w-0 flex-wrap items-center gap-1.5",children:[(0,l.jsx)("span",{className:"text-[11px] font-medium text-text-muted",children:"Judge"}),(0,l.jsxs)("button",{onClick:()=>u(!0),className:"inline-flex max-w-full items-center gap-1 rounded border border-dashed border-primary/40 px-1.5 py-0.5 font-mono text-[11px] text-primary hover:border-primary hover:bg-primary/5 transition-colors",title:"Pick the model that fuses panel answers",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"gavel"}),(0,l.jsx)("span",{className:"truncate",children:C||`Auto — ${e.models[0]||"first model"}`})]}),C&&(0,l.jsx)("button",{onClick:()=>m({judgeModel:""}),className:"p-0.5 rounded text-text-muted hover:text-red-500 hover:bg-red-500/10 transition-colors",title:"Reset judge to Auto",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"close"})})]}),S&&(0,l.jsxs)("div",{className:"mt-2 flex min-w-0 flex-col gap-2",children:[(0,l.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-1.5",children:[(0,l.jsx)("span",{className:"text-[11px] font-medium text-text-muted",children:"Router"}),(0,l.jsxs)("button",{type:"button",onClick:()=>j(!0),className:"inline-flex max-w-full items-center gap-1 rounded border border-dashed border-primary/40 px-1.5 py-0.5 font-mono text-[11px] text-primary hover:border-primary hover:bg-primary/5 transition-colors",title:"Model that picks the worker each request",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"alt_route"}),(0,l.jsx)("span",{className:"truncate",children:R||"claude/claude-opus-4-8 (default)"})]}),R&&(0,l.jsx)("button",{type:"button",onClick:()=>m({routerModel:""}),className:"p-0.5 rounded text-text-muted hover:text-red-500 hover:bg-red-500/10 transition-colors",title:"Reset router to default",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"close"})})]}),R&&e.models?.includes(R)&&(0,l.jsxs)("p",{className:"text-[10px] text-amber-600 dark:text-amber-400 flex items-center gap-1",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"warning"}),"Router is also in the worker list — it is auto-excluded from the pool."]}),(0,l.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-1.5",children:[(0,l.jsx)("span",{className:"text-[11px] font-medium text-text-muted",children:"Objective"}),(0,l.jsx)("select",{value:E,onChange:e=>m({objective:e.target.value}),className:"rounded border border-border bg-surface-2 px-1.5 py-0.5 text-[11px] text-text-main",children:b.map(e=>(0,l.jsx)("option",{value:e.value,children:e.label},e.value))}),(0,l.jsxs)("label",{className:"inline-flex items-center gap-1 text-[11px] text-text-muted cursor-pointer",children:[(0,l.jsx)("input",{type:"checkbox",className:"rounded border-border",checked:!1!==d.learningEnabled,onChange:e=>m({learningEnabled:e.target.checked})}),"Learn"]}),(0,l.jsxs)("label",{className:"inline-flex items-center gap-1 text-[11px] text-text-muted cursor-pointer",title:"Keep routing on current learning version; block relearn",children:[(0,l.jsx)("input",{type:"checkbox",className:"rounded border-border",checked:!!d.freezeLearning,onChange:e=>m({freezeLearning:e.target.checked})}),"Freeze"]}),(0,l.jsxs)("button",{type:"button",disabled:y||!!d.freezeLearning,onClick:async()=>{v(!0),k("");try{let t=await fetch("/api/routing/learn",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboName:e.name})}),a=await t.json();k(a.message||(a.ok?"Done":a.error||"Failed"))}catch(e){k(e.message||"Failed")}finally{v(!1)}},className:"inline-flex items-center gap-1 rounded border border-primary/40 bg-primary/10 px-2 py-0.5 text-[11px] font-medium text-primary hover:bg-primary/15 disabled:opacity-50",title:"Run learning optimizer on recent routing events",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"psychology"}),y?"Learning…":"Relearn now"]}),(0,l.jsx)("a",{href:`/dashboard/combos/routing?combo=${encodeURIComponent(e.name)}`,className:"inline-flex items-center gap-1 rounded border border-border px-2 py-0.5 text-[11px] text-text-muted hover:text-primary hover:border-primary/40",children:"Insights"})]}),(0,l.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2 text-[11px] text-text-muted",children:[(0,l.jsxs)("label",{className:"inline-flex items-center gap-1",children:["Window",(0,l.jsxs)("select",{value:d.learningWindowDays??14,onChange:e=>m({learningWindowDays:Number(e.target.value)||14}),className:"rounded border border-border bg-surface-2 px-1 py-0.5 text-[11px] text-text-main",children:[(0,l.jsx)("option",{value:7,children:"7d"}),(0,l.jsx)("option",{value:14,children:"14d"}),(0,l.jsx)("option",{value:30,children:"30d"})]})]}),(0,l.jsxs)("label",{className:"inline-flex items-center gap-1",title:"Epsilon-greedy exploration (capped at 20%)",children:["Explore",(0,l.jsx)("select",{value:Math.round((d.explorationRate??.05)*100),onChange:e=>m({explorationRate:Number(e.target.value)/100}),className:"rounded border border-border bg-surface-2 px-1 py-0.5 text-[11px] text-text-main",children:[0,5,10,15,20].map(e=>(0,l.jsxs)("option",{value:e,children:[e,"%"]},e))})]}),(0,l.jsxs)("label",{className:"inline-flex items-center gap-1",title:"0 = manual relearn only",children:["Auto-relearn",(0,l.jsxs)("select",{value:d.autoLearnIntervalHours??0,onChange:e=>m({autoLearnIntervalHours:Number(e.target.value)||0}),className:"rounded border border-border bg-surface-2 px-1 py-0.5 text-[11px] text-text-main",children:[(0,l.jsx)("option",{value:0,children:"off"}),(0,l.jsx)("option",{value:6,children:"6h"}),(0,l.jsx)("option",{value:12,children:"12h"}),(0,l.jsx)("option",{value:24,children:"24h"}),(0,l.jsx)("option",{value:72,children:"72h"})]})]}),(0,l.jsxs)("label",{className:"inline-flex items-center gap-1",title:"Capacity pre-filter before router (vision/PDF)",children:[(0,l.jsx)("input",{type:"checkbox",className:"rounded border-border",checked:!1!==d.capacityAutoSwitch,onChange:e=>m({capacityAutoSwitch:e.target.checked})}),"Heuristic first"]}),(0,l.jsxs)("label",{className:"inline-flex items-center gap-1",title:"Emit X-Auto-Router-* response headers (worker, cluster, score, skipped)",children:[(0,l.jsx)("input",{type:"checkbox",className:"rounded border-border",checked:!1!==d.emitAutoRouterHeaders,onChange:e=>m({emitAutoRouterHeaders:e.target.checked})}),"Route headers"]})]}),N?(0,l.jsx)("p",{className:"text-[11px] font-mono text-text-subtle",children:N}):(0,l.jsx)("p",{className:"text-[10px] text-text-subtle",children:"Worker pool = models list (router model excluded if listed). Every request re-routes. Router must be a connected account (default claude/claude-opus-4-8)."})]})]})]}),(0,l.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center sm:gap-3 sm:shrink-0",children:[(0,l.jsxs)("div",{className:"w-full sm:w-[220px] flex flex-col gap-1.5",children:[(0,l.jsx)(c.l6,{options:p,value:w,onChange:e=>m({fallbackStrategy:e.target.value}),selectClassName:"py-1.5 text-xs"}),!S&&(0,l.jsxs)("label",{className:"inline-flex items-center gap-1.5 text-[10px] text-text-muted cursor-pointer",children:[(0,l.jsx)("input",{type:"checkbox",className:"rounded border-border",checked:M,onChange:e=>m({capacityAutoSwitch:e.target.checked})}),"Capacity auto-switch (vision/PDF first)"]})]}),(0,l.jsxs)("div",{className:"grid grid-cols-3 gap-1 sm:flex",children:[(0,l.jsxs)("button",{onClick:t=>{t.stopPropagation(),o(e.name,`combo-${e.id}`)},className:"flex flex-col items-center rounded px-2 py-1 text-text-muted transition-colors hover:bg-black/5 hover:text-primary dark:hover:bg-white/5",title:"Copy combo name",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:r===`combo-${e.id}`?"check":"content_copy"}),(0,l.jsx)("span",{className:"text-[10px] leading-tight",children:"Copy"})]}),(0,l.jsxs)("button",{onClick:n,className:"flex flex-col items-center rounded px-2 py-1 text-text-muted transition-colors hover:bg-black/5 hover:text-primary dark:hover:bg-white/5",title:"Edit",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,l.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,l.jsxs)("button",{onClick:i,className:"flex flex-col items-center rounded px-2 py-1 text-red-500 transition-colors hover:bg-red-500/10",title:"Delete",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,l.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]})]})]}),(0,l.jsx)(c.rq,{isOpen:x,onClose:()=>u(!1),onSelect:e=>{m({judgeModel:e?.value||""}),u(!1)},activeProviders:a,title:"Select Judge Model",addedModelValues:C?[C]:[],closeOnSelect:!0}),(0,l.jsx)(c.rq,{isOpen:g,onClose:()=>j(!1),onSelect:e=>{m({routerModel:e?.value||""}),j(!1)},activeProviders:a,title:"Select Router Model",addedModelValues:R?[R]:[],closeOnSelect:!0})]})}function g({id:e,index:t,model:a,isFirst:r,isLast:i,onEdit:c,onMoveUp:d,onMoveDown:m,onRemove:x}){let{attributes:u,listeners:p,setNodeRef:h,transform:b,isDragging:f}=(0,o.gl)({id:e}),j={transform:n.Ks.Transform.toString(b),opacity:f?.4:1,zIndex:f?999:void 0},[y,v]=(0,s.useState)(!1),[N,k]=(0,s.useState)(a),w=()=>{let e=N.trim();e&&e!==a?c(e):k(a),v(!1)};return(0,l.jsxs)("div",{ref:h,style:j,className:`group flex min-w-0 items-center gap-1.5 rounded-md px-2 py-1 bg-black/[0.02] hover:bg-black/[0.04] dark:bg-white/[0.02] dark:hover:bg-white/[0.04] transition-colors ${f?"shadow-md ring-1 ring-primary/30":""}`,children:[(0,l.jsx)("button",{...u,...p,type:"button",className:"cursor-grab touch-none p-0.5 rounded text-text-muted hover:text-primary active:cursor-grabbing shrink-0",title:"Drag to reorder",children:(0,l.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,l.jsx)("circle",{cx:"9",cy:"4",r:"2"}),(0,l.jsx)("circle",{cx:"15",cy:"4",r:"2"}),(0,l.jsx)("circle",{cx:"9",cy:"12",r:"2"}),(0,l.jsx)("circle",{cx:"15",cy:"12",r:"2"}),(0,l.jsx)("circle",{cx:"9",cy:"20",r:"2"}),(0,l.jsx)("circle",{cx:"15",cy:"20",r:"2"})]})}),(0,l.jsx)("span",{className:"text-[10px] font-medium text-text-muted w-3 text-center shrink-0",children:t+1}),y?(0,l.jsx)("input",{autoFocus:!0,value:N,onChange:e=>k(e.target.value),onBlur:w,onKeyDown:e=>{"Enter"===e.key&&w(),"Escape"===e.key&&(k(a),v(!1))},className:"min-w-0 flex-1 rounded border border-primary/40 bg-white px-1.5 py-0.5 font-mono text-xs text-text-main outline-none dark:bg-black/20"}):(0,l.jsx)("div",{className:"min-w-0 flex-1 cursor-text truncate rounded px-1.5 py-0.5 font-mono text-xs text-text-main hover:bg-black/5 dark:hover:bg-white/5",onClick:()=>v(!0),title:"Click to edit",children:a}),(0,l.jsxs)("div",{className:"flex shrink-0 items-center gap-0.5",children:[(0,l.jsx)("button",{onClick:d,disabled:r,className:`p-0.5 rounded ${r?"text-text-muted/20 cursor-not-allowed":"text-text-muted hover:text-primary hover:bg-black/5 dark:hover:bg-white/5"}`,title:"Move up",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"arrow_upward"})}),(0,l.jsx)("button",{onClick:m,disabled:i,className:`p-0.5 rounded ${i?"text-text-muted/20 cursor-not-allowed":"text-text-muted hover:text-primary hover:bg-black/5 dark:hover:bg-white/5"}`,title:"Move down",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"arrow_downward"})})]}),(0,l.jsx)("button",{onClick:x,className:"p-0.5 hover:bg-red-500/10 rounded text-text-muted hover:text-red-500 transition-all",title:"Remove",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"close"})})]})}function j({isOpen:e,combo:t,onClose:a,onSave:n,activeProviders:d,kindFilter:x=null,initialStrategy:u={}}){let[b,f]=(0,s.useState)(t?.name||""),[y,v]=(0,s.useState)(t?.models||[]),[N,k]=(0,s.useState)(u.fallbackStrategy||"fallback"),[w,C]=(0,s.useState)(!1!==u.capacityAutoSwitch),[S,R]=(0,s.useState)(!1),[E,M]=(0,s.useState)(!1),[A,F]=(0,s.useState)(""),[O,D]=(0,s.useState)({}),P=(0,r.FR)((0,r.MS)(r.AN,{activationConstraint:{distance:5}}),(0,r.MS)(r.uN,{coordinateGetter:o.JR})),q=y.map((e,t)=>({uid:`item-${t}`,model:e})),$=async()=>{try{let e=await fetch("/api/models/alias");if(!e.ok)return;let t=await e.json();D(t.aliases||{})}catch(e){console.error("Error fetching modal data:",e)}};(0,s.useEffect)(()=>{e&&(f(t?.name||""),v(t?.models||[]),k(u.fallbackStrategy||"fallback"),C(!1!==u.capacityAutoSwitch),R(!1),M(!1),F(""),$())},[e,t?.id,t?.name]);let _=e=>e.trim()?m.test(e)?(F(""),!0):(F("Only letters, numbers, -, _ and . allowed"),!1):(F("Name is required"),!1),z=async()=>{if(_(b)){if(0===y.length)return void alert("Add at least one model to the combo");if("auto"===N&&y.length<2)return void alert("Auto strategy needs at least 2 models in the worker pool (plus a connected router account)");M(!0),await n({name:b.trim(),models:y,strategy:N,capacityAutoSwitch:"auto"===N||w}),M(!1)}},L=!!t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(c.aF,{isOpen:e,onClose:a,title:L?"Edit Combo":"Create Combo",children:(0,l.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,l.jsxs)("p",{className:"text-xs text-text-muted leading-relaxed",children:["Clients call this combo by name as the ",(0,l.jsx)("code",{className:"text-primary",children:"model"})," field. Strategy controls how models in the list are used."]}),(0,l.jsxs)("div",{children:[(0,l.jsx)(c.pd,{label:"Combo Name",value:b,onChange:e=>{let t=e.target.value;f(t),t?_(t):F("")},placeholder:"my-combo",error:A}),(0,l.jsx)("p",{className:"text-[10px] text-text-muted mt-0.5",children:"Only letters, numbers, -, _ and . allowed \xb7 use as model id in /v1"})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Strategy"}),(0,l.jsx)(c.l6,{options:p,value:N,onChange:e=>k(e.target.value),selectClassName:"py-2 text-sm"}),(0,l.jsx)("p",{className:"text-[11px] text-text-muted mt-1.5",children:h[N]}),"auto"!==N&&(0,l.jsxs)("label",{className:"mt-2 inline-flex items-center gap-2 text-xs text-text-muted cursor-pointer",children:[(0,l.jsx)("input",{type:"checkbox",className:"rounded border-border",checked:w,onChange:e=>C(e.target.checked)}),"Capacity auto-switch — prefer vision/PDF-capable models when the request needs them"]}),"auto"===N&&(0,l.jsx)("p",{className:"text-[11px] text-text-subtle mt-1.5 font-mono",children:"After create: set Router model on the combo card (must be a connected account). Workers = this model list (router excluded if listed)."}),"fusion"===N&&(0,l.jsx)("p",{className:"text-[11px] text-text-subtle mt-1.5 font-mono",children:"After create: optionally set Judge on the combo card (default = first model)."})]}),(0,l.jsxs)("div",{children:[(0,l.jsxs)("label",{className:"text-sm font-medium mb-1.5 block",children:["Models ","fallback"===N?"(order = priority)":"(pool)"]}),0===y.length?(0,l.jsxs)("div",{className:"text-center py-4 border border-dashed border-black/10 dark:border-white/10 rounded-lg bg-black/[0.01] dark:bg-white/[0.01]",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-text-muted text-xl mb-1",children:"layers"}),(0,l.jsx)("p",{className:"text-xs text-text-muted",children:"No models added yet"})]}):(0,l.jsx)(r.Mp,{sensors:P,collisionDetection:r.fp,onDragEnd:e=>{let{active:t,over:a}=e;if(a&&t.id!==a.id){let e=q.findIndex(e=>e.uid===t.id),l=q.findIndex(e=>e.uid===a.id);-1!==e&&-1!==l&&v(t=>(0,o.be)(t,e,l))}},modifiers:[i.FN,i.gj],children:(0,l.jsx)(o.gB,{items:q.map(e=>e.uid),strategy:o._G,children:(0,l.jsx)("div",{className:"flex max-h-[55vh] min-w-0 flex-col gap-1 overflow-y-auto sm:max-h-[350px]",children:q.map(({uid:e,model:t},a)=>(0,l.jsx)(g,{id:e,index:a,model:t,isFirst:0===a,isLast:a===q.length-1,onEdit:e=>{let t=[...y];t[a]=e,v(t)},onMoveUp:()=>(e=>{if(0===e)return;let t=[...y];[t[e-1],t[e]]=[t[e],t[e-1]],v(t)})(a),onMoveDown:()=>(e=>{if(e===y.length-1)return;let t=[...y];[t[e],t[e+1]]=[t[e+1],t[e]],v(t)})(a),onRemove:()=>{v(y.filter((e,t)=>t!==a))}},e))})})}),(0,l.jsxs)("button",{onClick:()=>R(!0),className:"w-full mt-2 py-2 border border-dashed border-black/10 dark:border-white/10 rounded-lg text-xs text-primary font-medium hover:text-primary hover:border-primary/50 transition-colors flex items-center justify-center gap-1",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"add"}),"Add Model"]})]}),(0,l.jsxs)("div",{className:"flex flex-col gap-2 pt-1 sm:flex-row",children:[(0,l.jsx)(c.$n,{onClick:a,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,l.jsx)(c.$n,{onClick:z,fullWidth:!0,size:"sm",disabled:!b.trim()||!!A||E,children:E?"Saving...":L?"Save":"Create"})]})]})}),(0,l.jsx)(c.rq,{isOpen:S,onClose:()=>R(!1),onSelect:e=>{y.includes(e.value)||v([...y,e.value])},onDeselect:e=>{v(y.filter(t=>t!==e.value))},activeProviders:d,modelAliases:O,title:"Add Model to Combo",kindFilter:x,addedModelValues:y,closeOnSelect:!1})]})}},73670:(e,t,a)=>{Promise.resolve().then(a.bind(a,48451))}},e=>{e.O(0,[2574,3862,1610,2562,7055,1321,705,5497,8441,3794,7358],()=>e(e.s=73670)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[624],{60828:(e,t,s)=>{Promise.resolve().then(s.bind(s,61872))},61872:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>x});var a=s(95155),r=s(12115),l=s(73321),n=s(98500),o=s.n(n),i=s(35497);function x(){return(0,a.jsx)(r.Suspense,{fallback:(0,a.jsx)("p",{className:"text-sm text-text-muted p-4",children:"Loading insights…"}),children:(0,a.jsx)(c,{})})}function c(){let e,t,s=(0,l.useSearchParams)().get("combo")||"",[n,x]=(0,r.useState)(null),[c,m]=(0,r.useState)(!1),[p,h]=(0,r.useState)(""),[u,g]=(0,r.useState)(""),[j,b]=(0,r.useState)(14),[N,f]=(0,r.useState)(""),[v,y]=(0,r.useState)(""),[w,k]=(0,r.useState)(!1),S=(0,r.useCallback)(async()=>{if(s){m(!0),h("");try{let e=new URLSearchParams({combo:s,days:String(j)});N&&e.set("cluster",N),v&&e.set("worker",v),w&&e.set("exploration","1");let t=await fetch(`/api/routing/insights?${e}`,{cache:"no-store"}),a=await t.json();if(!t.ok)throw Error(a.error||"Failed to load insights");x(a)}catch(e){h(e.message||"Failed"),x(null)}finally{m(!1)}}},[s,j,N,v,w]);(0,r.useEffect)(()=>{S()},[S]);let C=(0,r.useMemo)(()=>{if(!n?.heatmap)return 100;let e=1;for(let t of n.heatmap)for(let s of t.cells||[])null!=s.avg&&s.avg>e&&(e=s.avg);return e},[n]);return s?(0,a.jsxs)("div",{className:"flex flex-col gap-5 max-w-[1180px]",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-end justify-between gap-3",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)("h1",{className:"text-[17px] font-semibold tracking-tight",children:"Routing insights"}),(0,a.jsxs)("p",{className:"text-xs font-mono text-text-subtle",children:["combo: ",s,n?.strategy?.routerModel?` \xb7 router ${n.strategy.routerModel}`:"",n?.strategy?.objective?` \xb7 ${n.strategy.objective}`:"",n?.strategy?.explorationRate!=null?` \xb7 ε=${Math.round((n.strategy.explorationRate??.05)*100)}% (cap ${Math.round((n.strategy.explorationRateCap??.2)*100)}%)`:""]})]}),(0,a.jsxs)("div",{className:"flex flex-wrap gap-2 items-center",children:[(0,a.jsxs)("select",{value:j,onChange:e=>b(Number(e.target.value)||14),className:"text-[11.5px] font-mono text-text-subtle px-2 py-1.5 rounded-[7px] bg-surface-2 border border-border",title:"Date range",children:[(0,a.jsx)("option",{value:7,children:"last 7 days"}),(0,a.jsx)("option",{value:14,children:"last 14 days"}),(0,a.jsx)("option",{value:30,children:"last 30 days"}),(0,a.jsx)("option",{value:90,children:"last 90 days"})]}),(0,a.jsxs)("select",{value:N,onChange:e=>f(e.target.value),className:"text-[11.5px] font-mono text-text-subtle px-2 py-1.5 rounded-[7px] bg-surface-2 border border-border max-w-[140px]",title:"Filter cluster",children:[(0,a.jsx)("option",{value:"",children:"all clusters"}),(n?.clusters||[]).map(e=>(0,a.jsx)("option",{value:e,children:e},e))]}),(0,a.jsxs)("select",{value:v,onChange:e=>y(e.target.value),className:"text-[11.5px] font-mono text-text-subtle px-2 py-1.5 rounded-[7px] bg-surface-2 border border-border max-w-[160px]",title:"Filter worker",children:[(0,a.jsx)("option",{value:"",children:"all workers"}),(n?.workers||[]).map(e=>(0,a.jsx)("option",{value:e,children:e.split("/").pop()},e))]}),(0,a.jsxs)("label",{className:"inline-flex items-center gap-1 text-[11px] text-text-muted cursor-pointer",children:[(0,a.jsx)("input",{type:"checkbox",className:"rounded border-border",checked:w,onChange:e=>k(e.target.checked)}),"exploration only"]}),(0,a.jsx)(i.$n,{size:"sm",variant:"secondary",onClick:S,disabled:c,children:"Refresh"}),(0,a.jsx)(i.$n,{size:"sm",disabled:c,onClick:async()=>{g("");try{let e=await fetch("/api/routing/learn",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboName:s})}),t=await e.json();g(t.message||JSON.stringify(t)),await S()}catch(e){g(e.message)}},children:"Relearn now"}),(0,a.jsx)(o(),{href:"/dashboard/combos",className:"text-xs text-text-muted hover:text-primary px-2 py-1.5",children:"← Combos"})]})]}),u&&(0,a.jsx)("p",{className:"text-xs font-mono text-text-subtle",children:u}),p&&(0,a.jsx)("p",{className:"text-sm text-red-400",children:p}),c&&!n&&(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Loading…"}),n&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-3",children:[(0,a.jsx)(d,{label:"Requests",value:String(n.eventCount??0)}),(0,a.jsx)(d,{label:"Need for learn",value:n.needMore>0?`${n.needMore} more`:"ready"}),(0,a.jsx)(d,{label:"Active version",value:n.promoted?`v${n.promoted.version}`:"—"}),(0,a.jsx)(d,{label:"Eval score",value:n.promoted?.evalScore!=null?Number(n.promoted.evalScore).toFixed(1):"—"})]}),(0,a.jsxs)("p",{className:"text-[11px] text-text-subtle font-mono -mt-2",children:["Request-level counts (one per chat). Intermediate fallback attempts",null!=n.attemptCount&&n.attemptCount!==n.eventCount?` (${n.attemptCount} attempt rows)`:""," ","feed the bandit but not the min-events gate. Single-worker and heuristic shortcuts are not logged here."]}),(0,a.jsxs)(i.Zp,{padding:"md",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-1 flex-wrap gap-2",children:[(0,a.jsx)("span",{className:"text-[13px] font-semibold",children:"Win-rate heatmap"}),(0,a.jsxs)("div",{className:"flex items-center gap-2 text-[10.5px] font-mono text-text-subtle",children:[(0,a.jsx)("span",{children:"low"}),(0,a.jsx)("span",{className:"w-[120px] h-2 rounded",style:{background:"linear-gradient(90deg,rgba(229,180,84,.1),rgba(229,180,84,.72))"}}),(0,a.jsx)("span",{children:"high \xb7 number always shown"})]})]}),(0,a.jsx)("p",{className:"text-[11.5px] font-mono text-text-subtle mb-3",children:"cluster \xd7 worker \xb7 average outcome score (0–100)"}),n.clusters?.length&&n.workers?.length?(0,a.jsxs)("div",{className:"grid gap-1 overflow-x-auto",style:{gridTemplateColumns:`112px repeat(${n.workers.length}, minmax(56px, 1fr))`},children:[(0,a.jsx)("div",{}),n.workers.map(e=>(0,a.jsx)("div",{className:"font-mono text-[10.5px] text-text-muted text-center pb-1 truncate",title:e,children:e.split("/").pop()},e)),n.heatmap.map(e=>(0,a.jsxs)("div",{className:"contents",children:[(0,a.jsx)("div",{className:"text-[11px] uppercase tracking-wide text-text-muted flex items-center font-medium",children:e.cluster}),e.cells.map(t=>{let s=t.avg,r=null==s||C<=0?0:Math.min(1,s/C);return(0,a.jsx)("div",{className:"rounded text-center font-mono text-[11px] py-2 border border-border",style:{background:`rgba(229,180,84,${.08+.55*r})`,color:null==s?"#6F6653":"#ECE4D2"},title:`${t.worker}: n=${t.n}`,children:null==s?"—":Math.round(s)},`${e.cluster}-${t.worker}`)})]},e.cluster))]}):(0,a.jsx)("p",{className:"text-sm text-text-muted py-6 text-center",children:"No routing events yet. Point a client at this combo with strategy Auto."})]}),(0,a.jsxs)(i.Zp,{padding:"md",children:[(0,a.jsx)("span",{className:"text-[13px] font-semibold",children:"Score trend"}),(0,a.jsx)("p",{className:"text-[11px] text-text-subtle font-mono mb-2",children:"mean outcomeScore per day over the selected window (request-level)"}),0===(n.scoreTrend||[]).length?(0,a.jsx)("p",{className:"text-xs text-text-muted py-3 text-center",children:"No scored days yet"}):(0,a.jsx)("div",{className:"flex items-end gap-1 h-24 overflow-x-auto pt-2",children:(t=Math.max(1,...(e=n.scoreTrend||[]).map(e=>Number(e.avgScore)||0)),e.map(e=>{let s=Number(e.avgScore)||0,r=Math.max(4,Math.round(s/t*80));return(0,a.jsxs)("div",{className:"flex flex-col items-center gap-0.5 min-w-[28px]",title:`${e.day}: ${s.toFixed(1)} (n=${e.n})`,children:[(0,a.jsx)("span",{className:"text-[9px] font-mono text-text-subtle",children:Math.round(s)}),(0,a.jsx)("div",{className:"w-5 rounded-t bg-primary/70",style:{height:r}}),(0,a.jsx)("span",{className:"text-[8px] font-mono text-text-subtle",children:String(e.day).slice(5)})]},e.day)}))})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[(0,a.jsxs)(i.Zp,{padding:"md",children:[(0,a.jsx)("span",{className:"text-[13px] font-semibold",children:"Model performance"}),(0,a.jsxs)("div",{className:"mt-3 space-y-2",children:[0===(n.modelStats||[]).length&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"No data"}),(n.modelStats||[]).map(e=>(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_52px_60px_40px] gap-2 items-center text-xs",children:[(0,a.jsx)("span",{className:"font-mono truncate text-text-main",title:e.worker,children:e.worker}),(0,a.jsx)("span",{className:"text-right font-mono text-text-muted",children:null!=e.avgScore?Math.round(e.avgScore):"—"}),(0,a.jsx)("span",{className:"text-right font-mono text-text-muted",children:null!=e.avgLatencyMs?`${Math.round(e.avgLatencyMs)}ms`:"—"}),(0,a.jsx)("span",{className:"text-right font-mono text-text-subtle",children:e.errors||0})]},e.worker))]})]}),(0,a.jsxs)(i.Zp,{padding:"md",children:[(0,a.jsx)("span",{className:"text-[13px] font-semibold",children:"Learning versions"}),(0,a.jsx)("p",{className:"text-[11px] text-text-subtle font-mono mb-2",children:"immutable \xb7 rollback-safe"}),(0,a.jsxs)("div",{className:"space-y-2 max-h-64 overflow-y-auto",children:[0===(n.versions||[]).length&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"No versions yet"}),(n.versions||[]).map(e=>(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2 text-xs border-b border-border py-1.5",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("span",{className:"font-mono text-text-main",children:["v",e.version,e.promoted?" \xb7 active":""]}),(0,a.jsxs)("div",{className:"text-[10px] text-text-subtle font-mono",children:["eval ",null!=e.evalScore?Number(e.evalScore).toFixed(1):"—"," \xb7"," ",e.source]})]}),!e.promoted&&(0,a.jsx)("button",{type:"button",className:"text-primary text-[11px] hover:underline",onClick:async()=>{await fetch("/api/routing/versions/promote",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:e.id})}),S()},children:"Promote"})]},e.id))]}),n.promoted?.prevVersionId&&(0,a.jsx)(i.$n,{size:"sm",variant:"outline",className:"mt-3",onClick:async()=>{await fetch("/api/routing/versions/rollback",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboName:s})}),S()},children:"Rollback"})]})]}),(0,a.jsxs)(i.Zp,{padding:"md",children:[(0,a.jsx)("span",{className:"text-[13px] font-semibold",children:"Recent decisions"}),(0,a.jsxs)("div",{className:"mt-3 overflow-x-auto",children:[(0,a.jsxs)("table",{className:"w-full text-left text-xs",children:[(0,a.jsx)("thead",{className:"text-text-subtle font-mono uppercase tracking-wide",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"py-1 pr-2",children:"Time"}),(0,a.jsx)("th",{className:"py-1 pr-2",children:"Cluster"}),(0,a.jsx)("th",{className:"py-1 pr-2",children:"Worker"}),(0,a.jsx)("th",{className:"py-1 pr-2",children:"Score"}),(0,a.jsx)("th",{className:"py-1",children:"Reason"})]})}),(0,a.jsx)("tbody",{children:(n.recent||[]).map(e=>(0,a.jsxs)("tr",{className:"border-t border-border",children:[(0,a.jsxs)("td",{className:"py-1.5 pr-2 font-mono text-text-muted whitespace-nowrap",children:[e.timestamp?.slice(0,19)?.replace("T"," "),e.meta?.exploration?(0,a.jsx)("span",{className:"ml-1 text-[9px] text-primary",children:"ε"}):null]}),(0,a.jsx)("td",{className:"py-1.5 pr-2",children:e.cluster||"—"}),(0,a.jsx)("td",{className:"py-1.5 pr-2 font-mono truncate max-w-[160px]",title:e.pickedWorker,children:e.pickedWorker?.split("/").pop()||"—"}),(0,a.jsx)("td",{className:"py-1.5 pr-2 font-mono",children:null!=e.outcomeScore?Math.round(e.outcomeScore):"—"}),(0,a.jsx)("td",{className:"py-1.5 text-text-muted truncate max-w-[240px]",title:e.routerReason,children:e.routerReason||"—"})]},e.id))})]}),!(n.recent||[]).length&&(0,a.jsx)("p",{className:"text-xs text-text-muted py-4 text-center",children:"No decisions logged"})]})]}),(0,a.jsxs)(i.Zp,{padding:"md",children:[(0,a.jsx)("span",{className:"text-[13px] font-semibold",children:"Exploration log"}),(0,a.jsx)("p",{className:"text-[11px] text-text-subtle font-mono mb-2",children:"epsilon-greedy random picks (meta.exploration)"}),(0,a.jsxs)("div",{className:"space-y-1.5 max-h-48 overflow-y-auto",children:[0===(n.explorationLog||[]).length&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"No exploration events in this window"}),(n.explorationLog||[]).map(e=>(0,a.jsxs)("div",{className:"flex flex-wrap gap-2 text-[11px] font-mono border-b border-border py-1",children:[(0,a.jsx)("span",{className:"text-text-muted",children:e.timestamp?.slice(0,19)?.replace("T"," ")}),(0,a.jsx)("span",{children:e.cluster||"—"}),(0,a.jsx)("span",{className:"text-primary",children:e.pickedWorker?.split("/").pop()}),(0,a.jsxs)("span",{className:"text-text-subtle",children:["score ",null!=e.outcomeScore?Math.round(e.outcomeScore):"—"]})]},`ex-${e.id}`))]})]})]})]}):(0,a.jsxs)("div",{className:"max-w-lg space-y-3",children:[(0,a.jsx)("h1",{className:"text-[17px] font-semibold",children:"Routing insights"}),(0,a.jsxs)("p",{className:"text-sm text-text-muted",children:["Open from a combo card with strategy ",(0,a.jsx)("strong",{children:"Auto"}),", or append"," ",(0,a.jsx)("code",{className:"text-xs",children:"?combo=your-combo"}),"."]}),(0,a.jsx)(o(),{href:"/dashboard/combos",className:"text-sm text-primary hover:underline",children:"← Combos"})]})}function d({label:e,value:t}){return(0,a.jsxs)("div",{className:"rounded-[11px] border border-border bg-surface p-3.5",children:[(0,a.jsx)("div",{className:"text-[10px] uppercase tracking-wide text-text-subtle mb-1.5",children:e}),(0,a.jsx)("div",{className:"font-mono text-[18px] font-semibold text-text-main",children:t})]})}}},e=>{e.O(0,[2574,3862,1610,2562,1321,705,5497,8441,3794,7358],()=>e(e.s=60828)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[712],{44493:(e,t,l)=>{"use strict";l.d(t,{default:()=>o});var s=l(95155),n=l(12115),r=l(35497),a=l(90620);let c={LOG:"text-green-400",INFO:"text-blue-400",WARN:"text-yellow-400",ERROR:"text-red-400",DEBUG:"text-purple-400"};function o(){let[e,t]=(0,n.useState)([]),[l,o]=(0,n.useState)(!1),i=(0,n.useRef)(null),u=async()=>{try{await fetch("/api/translator/console-logs",{method:"DELETE"})}catch(e){console.error("Failed to clear console logs:",e)}};return(0,n.useEffect)(()=>{let e=new EventSource("/api/translator/console-logs/stream");return e.onopen=()=>o(!0),e.onmessage=e=>{let l=JSON.parse(e.data);"init"===l.type?t(l.logs.slice(-a.UY.maxLines)):"line"===l.type?t(e=>{let t=[...e,l.line];return t.length>a.UY.maxLines?t.slice(-a.UY.maxLines):t}):"lines"===l.type?t(e=>{let t=[...e,...l.lines];return t.length>a.UY.maxLines?t.slice(-a.UY.maxLines):t}):"clear"===l.type&&t([])},e.onerror=()=>o(!1),()=>e.close()},[]),(0,n.useEffect)(()=>{i.current&&(i.current.scrollTop=i.current.scrollHeight)},[e]),(0,s.jsx)("div",{className:"",children:(0,s.jsxs)(r.Zp,{children:[(0,s.jsx)("div",{className:"flex items-center justify-end px-4 pt-3 pb-2",children:(0,s.jsx)(r.$n,{size:"sm",variant:"outline",icon:"delete",onClick:u,children:"Clear"})}),(0,s.jsx)("div",{ref:i,className:"bg-black rounded-b-lg p-4 text-xs font-mono h-[calc(100vh-220px)] overflow-y-auto",children:0===e.length?(0,s.jsx)("span",{className:"text-text-muted",children:"No console logs yet."}):(0,s.jsx)("div",{className:"space-y-0.5",children:e.map((e,t)=>{let l,n;return(0,s.jsx)("div",{children:(n=c[(l=e.match(/\[(\w+)\]/g))?l[1]?.replace(/\[|\]/g,""):null]||"text-green-400",(0,s.jsx)("span",{className:n,children:e}))},t)})})})]})})}},94512:(e,t,l)=>{Promise.resolve().then(l.bind(l,44493))}},e=>{e.O(0,[2574,3862,1610,2562,1321,705,5497,8441,3794,7358],()=>e(e.s=94512)),_N_E=e.O()}]);
@@ -1,3 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6099],{2794:(e,t,s)=>{Promise.resolve().then(s.bind(s,66187))},66187:(e,t,s)=>{"use strict";s.d(t,{default:()=>b});var i=s(95155),a=s(12115),n=s(14051),l=s.n(n),r=s(35625),o=s(4109),d=s(48934),c=s(35497),m=s(11059);function x({label:e,url:t,copyId:s,copied:a,onCopy:n,badge:l,actions:r}){return(0,i.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,i.jsx)("span",{className:`text-xs font-mono px-1.5 py-0.5 rounded shrink-0 min-w-[88px] text-center border ${"CF"===l||"TS"===l?"bg-primary/10 text-primary border-primary/25":"bg-surface-2 text-text-muted border-border"}`,children:e}),(0,i.jsx)(c.pd,{value:t,readOnly:!0,className:"flex-1 min-w-0",inputClassName:"font-mono text-sm"}),(0,i.jsx)("button",{type:"button",onClick:()=>n(t,s),className:"p-2 hover:bg-surface-2 rounded text-text-muted hover:text-primary transition-colors shrink-0 border border-transparent hover:border-border",title:"Copy","aria-label":"Copy endpoint URL",children:(0,i.jsx)("span",{className:"material-symbols-outlined text-[18px] leading-none",children:a===s?"check":"content_copy"})}),r]})}function u({message:e,action:t}){return(0,i.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-brand-500/10 border border-brand-500/30 text-brand-400",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-[16px] shrink-0 leading-none",children:"warning"}),(0,i.jsx)("p",{className:"text-xs flex-1 text-brand-300",children:e}),t&&(0,i.jsx)("a",{href:t.href,className:"text-xs font-medium underline shrink-0 hover:opacity-80",onClick:t.href.startsWith("#")?e=>{e.preventDefault(),document.getElementById(t.href.slice(1))?.scrollIntoView({behavior:"smooth"})}:void 0,children:t.label})]})}let y=()=>["endpoint","keys"],h=()=>["endpoint","settings"];async function p(e,t){let s=await fetch(e,{...t,headers:{"Content-Type":"application/json",...t?.headers||{}},credentials:"same-origin"}),i=null;try{i=await s.json()}catch{i=null}if(!s.ok){let e=i&&(i.error||i.message)||`Request failed (${s.status})`,t=Error("string"==typeof e?e:"Request failed");throw t.status=s.status,t.data=i,t}return i}function b({initialData:e}){let t=(0,r.jE)(),s=e?.machineId||"",n=(0,o.I)({queryKey:y(),queryFn:async()=>(await p("/api/keys")).keys||[],initialData:e?.keys||[]}),l=(0,o.I)({queryKey:h(),queryFn:()=>p("/api/settings"),initialData:e?.settings||{}}),f=n.data||[],j=l.data?.requireApiKey===!0,[g,k]=(0,a.useState)(!1),[v,N]=(0,a.useState)(""),[C,w]=(0,a.useState)(null),[A,P]=(0,a.useState)(null),[S,I]=(0,a.useState)(()=>new Set),[K,q]=(0,a.useState)("/v1");(0,a.useEffect)(()=>{q(`${window.location.origin}/v1`)},[]);let{copied:_,copy:$}=(0,m.C)(),O=(0,d.n)({mutationFn:e=>p("/api/settings",{method:"PATCH",body:JSON.stringify({requireApiKey:e})}),onSuccess:()=>{t.invalidateQueries({queryKey:h()})}}),D=(0,d.n)({mutationFn:e=>p("/api/keys",{method:"POST",body:JSON.stringify({name:e})}),onSuccess:e=>{w(e.key||null),N(""),k(!1),t.invalidateQueries({queryKey:y()})}}),E=(0,d.n)({mutationFn:e=>p(`/api/keys/${e}`,{method:"DELETE"}),onSuccess:()=>{t.invalidateQueries({queryKey:y()})}}),F=(0,d.n)({mutationFn:({id:e,isActive:t})=>p(`/api/keys/${e}`,{method:"PUT",body:JSON.stringify({isActive:t})}),onSuccess:()=>{t.invalidateQueries({queryKey:y()})}});return(0,i.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,i.jsxs)(c.Zp,{children:[(0,i.jsxs)("h2",{className:"text-lg font-semibold mb-4 flex items-center gap-2",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-primary",children:"api"}),"API Endpoint"]}),(0,i.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Local OpenAI-compatible base URL for coding agents and SDKs. Switchboard is local-only — no tunnels or remote exposure."}),(0,i.jsx)(x,{label:"Local",url:K,copyId:"local_url",copied:_,onCopy:$}),s?(0,i.jsxs)("p",{className:"mt-3 text-xs text-text-muted font-mono",children:["Machine: ",s]}):null]}),(0,i.jsxs)(c.Zp,{id:"require-api-key",children:[(0,i.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,i.jsxs)("h2",{className:"text-lg font-semibold flex items-center gap-2",children:[(0,i.jsx)("span",{className:"material-symbols-outlined text-primary",children:"vpn_key"}),"API Keys"]}),(0,i.jsx)(c.$n,{icon:"add",onClick:()=>k(!0),children:"Create Key"})]}),(0,i.jsxs)("div",{className:"flex items-center justify-between pb-4 mb-4 border-b border-border",children:[(0,i.jsxs)("div",{children:[(0,i.jsx)("p",{className:"font-medium",children:"Require API key"}),(0,i.jsx)("p",{className:"text-sm text-text-muted",children:"Requests without a valid key will be rejected"})]}),(0,i.jsx)(c.lM,{checked:j,onChange:()=>O.mutate(!j)})]}),!j&&(0,i.jsx)("div",{className:"mb-4 -mt-2",children:(0,i.jsx)(u,{message:"API key is not required — any local client can call /v1."})}),0===f.length?(0,i.jsxs)("div",{className:"text-center py-12",children:[(0,i.jsx)("div",{className:"inline-flex items-center justify-center w-16 h-16 rounded-full bg-primary/10 text-primary mb-4",children:(0,i.jsx)("span",{className:"material-symbols-outlined text-[32px]",children:"vpn_key"})}),(0,i.jsx)("p",{className:"text-text-main font-medium mb-1",children:"No API keys yet"}),(0,i.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Create your first API key to get started"}),(0,i.jsx)(c.$n,{icon:"add",onClick:()=>k(!0),children:"Create Key"})]}):(0,i.jsx)("div",{className:"flex flex-col",children:f.map(e=>{var t;return(0,i.jsxs)("div",{className:`group flex items-center justify-between py-3 border-b border-black/[0.03] dark:border-white/[0.03] last:border-b-0 ${!1===e.isActive?"opacity-60":""}`,children:[(0,i.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,i.jsx)("p",{className:"text-sm font-medium",children:e.name}),(0,i.jsxs)("div",{className:"flex items-center gap-2 mt-1",children:[(0,i.jsx)("code",{className:"text-xs text-text-muted font-mono",children:S.has(e.id)?e.key:(t=e.key)&&!(t.length<=10)?t.slice(0,6)+"•".repeat(t.length-10)+t.slice(-4):t||""}),(0,i.jsx)("button",{type:"button",onClick:()=>{var t;return t=e.id,void I(e=>{let s=new Set(e);return s.has(t)?s.delete(t):s.add(t),s})},className:"p-1 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary opacity-100 sm:opacity-0 sm:group-hover:opacity-100 transition-all",title:S.has(e.id)?"Hide key":"Show key",children:(0,i.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:S.has(e.id)?"visibility_off":"visibility"})}),(0,i.jsx)("button",{type:"button",onClick:()=>$(e.key,e.id),className:"p-1 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary opacity-100 sm:opacity-0 sm:group-hover:opacity-100 transition-all",children:(0,i.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:_===e.id?"check":"content_copy"})})]}),(0,i.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:["Created ",new Date(e.createdAt).toLocaleDateString()]}),!1===e.isActive&&(0,i.jsx)("p",{className:"text-xs text-orange-500 mt-1",children:"Paused"})]}),(0,i.jsxs)("div",{className:"flex items-center gap-2",children:[(0,i.jsx)(c.lM,{size:"sm",checked:e.isActive??!0,onChange:t=>{e.isActive&&!t?P({title:"Pause API Key",message:`Pause API key "${e.name}"?
2
-
3
- This key will stop working immediately but can be resumed later.`,onConfirm:async()=>{P(null),F.mutate({id:e.id,isActive:t})}}):F.mutate({id:e.id,isActive:t})},title:e.isActive?"Pause key":"Resume key"}),(0,i.jsx)("button",{type:"button",onClick:()=>P({title:"Delete API Key",message:"Delete this API key?",onConfirm:async()=>{P(null),E.mutate(e.id)}}),className:"p-2 hover:bg-red-500/10 rounded text-red-500 opacity-100 sm:opacity-0 sm:group-hover:opacity-100 transition-all",children:(0,i.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"})})]})]},e.id)})})]}),(0,i.jsx)(c.aF,{isOpen:g,title:"Create API Key",onClose:()=>{k(!1),N("")},children:(0,i.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,i.jsx)(c.pd,{label:"Key Name",value:v,onChange:e=>N(e.target.value),placeholder:"Production Key"}),(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)(c.$n,{onClick:()=>D.mutate(v.trim()),fullWidth:!0,disabled:!v.trim()||D.isPending,loading:D.isPending,children:"Create"}),(0,i.jsx)(c.$n,{onClick:()=>{k(!1),N("")},variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}),(0,i.jsx)(c.aF,{isOpen:!!C,title:"API Key Created",onClose:()=>w(null),children:(0,i.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,i.jsxs)("div",{className:"bg-yellow-50 dark:bg-yellow-900/20 border border-yellow-200 dark:border-yellow-800 rounded-lg p-4",children:[(0,i.jsx)("p",{className:"text-sm text-yellow-800 dark:text-yellow-200 mb-2 font-medium",children:"Save this key now!"}),(0,i.jsx)("p",{className:"text-sm text-yellow-700 dark:text-yellow-300",children:"This is the only time you will see this key. Store it securely."})]}),(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)(c.pd,{value:C||"",readOnly:!0,className:"flex-1 font-mono text-sm"}),(0,i.jsx)(c.$n,{variant:"secondary",icon:"created_key"===_?"check":"content_copy",onClick:()=>$(C,"created_key"),children:"created_key"===_?"Copied!":"Copy"})]}),(0,i.jsx)(c.$n,{onClick:()=>w(null),fullWidth:!0,children:"Done"})]})}),(0,i.jsx)(c.uo,{isOpen:!!A,onClose:()=>P(null),onConfirm:A?.onConfirm,title:A?.title||"Confirm",message:A?.message,variant:"danger"})]})}b.propTypes={initialData:l().shape({machineId:l().string,keys:l().array,settings:l().object}).isRequired}}},e=>{e.O(0,[2574,3862,1610,2562,1631,2176,1321,705,5497,8441,3794,7358],()=>e(e.s=2794)),_N_E=e.O()}]);
@@ -1,59 +0,0 @@
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:`{
2
- "results": [
3
- { "title": "...", "url": "...", "snippet": "..." }
4
- ]
5
- }`,extraFields:[{key:"search_type",label:"Type",type:"select",default:"web",options:["web","news"]},{key:"max_results",label:"Max results",type:"number",default:5,min:1,max:100},{key:"country",label:"Country",type:"text",default:""},{key:"language",label:"Language",type:"text",default:""}]},webFetch:{inputLabel:"URL",inputPlaceholder:"https://example.com",defaultInput:"https://example.com",bodyKey:"url",defaultResponse:`{
6
- "content": "...",
7
- "title": "...",
8
- "url": "..."
9
- }`,extraFields:[{key:"format",label:"Format",type:"select",default:"markdown",options:["markdown","text","html"]},{key:"max_characters",label:"Max chars",type:"number",default:0,min:0}]},image:{inputLabel:"Prompt",inputPlaceholder:"A cute cat wearing a hat",defaultInput:"A cute cat wearing a hat",bodyKey:"prompt",defaultResponse:`{
10
- "data": [
11
- { "url": "...", "b64_json": "..." }
12
- ]
13
- }`,extraFields:[{key:"n",label:"n",type:"number",default:1,min:1,max:4},{key:"size",label:"Size",type:"select",default:"auto",options:["auto","1024x1024","1024x1536","1536x1024","1024x1792","1792x1024"]},{key:"quality",label:"Quality",type:"select",default:"auto",options:["auto","low","medium","high","standard","hd"]},{key:"background",label:"Background",type:"select",default:"auto",options:["auto","transparent","opaque"]},{key:"style",label:"Style",type:"select",default:"",options:["","vivid","natural"]},{key:"response_format",label:"Format",type:"select",default:"",options:["","url","b64_json"]},{key:"image_detail",label:"Image Detail",type:"select",default:"high",options:["auto","low","high","original"]},{key:"output_format",label:"Codec",type:"select",default:"png",options:["png","jpeg","webp"]}]},imageToText:{inputLabel:"Image URL",inputPlaceholder:"https://example.com/image.png",defaultInput:"https://upload.wikimedia.org/wikipedia/commons/thumb/3/3a/Cat03.jpg/1200px-Cat03.jpg",bodyKey:"url",extraBody:{prompt:"Describe this image in detail"},defaultResponse:`{
14
- "text": "A cat sitting on a windowsill...",
15
- "model": "..."
16
- }`},video:{inputLabel:"Prompt",inputPlaceholder:"A serene lake at sunset",defaultInput:"A serene lake at sunset",bodyKey:"prompt",defaultResponse:`{
17
- "data": [
18
- { "url": "..." }
19
- ]
20
- }`},music:{inputLabel:"Prompt",inputPlaceholder:"A calm piano melody",defaultInput:"A calm piano melody",bodyKey:"prompt",defaultResponse:`{
21
- "data": [
22
- { "url": "...", "format": "mp3" }
23
- ]
24
- }`}},C=`{
25
- "object": "list",
26
- "data": [{
27
- "object": "embedding",
28
- "index": 0,
29
- "embedding": [0.002301, -0.019212, 0.004815, -0.031249, ...]
30
- }],
31
- "model": "...",
32
- "usage": { "prompt_tokens": 9, "total_tokens": 9 }
33
- }`;function S({providerId:e,customAlias:t}){let s=(0,c.gC)(e),r=s?t||e:(0,c.wG)(e),o=s?[]:(0,g.KC)(e).filter(e=>"embedding"===(0,g.CP)(e)),[l,d]=(0,n.useState)(o[0]?.id??""),[m,u]=(0,n.useState)("The quick brown fox jumps over the lazy dog"),[p,x]=(0,n.useState)(""),[h,b]=(0,n.useState)(""),[f,v]=(0,n.useState)(""),[j,w]=(0,n.useState)(null),[k,$]=(0,n.useState)(!1),[P,_]=(0,n.useState)(""),{copied:A,copy:I}=(0,y.C)(),{copied:E,copy:T}=(0,y.C)();(0,n.useEffect)(()=>{v(window.location.origin),fetch("/api/keys").then(e=>e.json()).then(e=>{b((e.keys||[]).find(e=>!1!==e.isActive)?.key||"")}).catch(()=>{})},[]);let R=l?`${r}/${l}`:"",O=()=>{let e={model:R,input:m.trim()},t=Number(p);return p&&Number.isFinite(t)&&t>0&&(e.dimensions=t),e},M=`curl -X POST ${f}/v1/embeddings \\
34
- -H "Content-Type: application/json" \\
35
- -H "Authorization: Bearer ${h||"YOUR_KEY"}" \\
36
- -d '${JSON.stringify(O())}'`,K=async()=>{if(!m.trim()||!R)return;$(!0),_(""),w(null);let e=Date.now();try{let t={"Content-Type":"application/json"};h&&(t.Authorization=`Bearer ${h}`);let s=await fetch("/api/v1/embeddings",{method:"POST",headers:t,body:JSON.stringify(O())}),a=Date.now()-e,r=await s.json();if(!s.ok)return void _(r?.error?.message||r?.error||`HTTP ${s.status}`);w({data:r,latencyMs:a})}catch(e){_(e.message||"Network error")}finally{$(!1)}},L=j?JSON.stringify(j.data,null,2):"";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:[(0,a.jsx)(N,{label:"Model",children:s?(0,a.jsx)("input",{value:l,onChange:e=>d(e.target.value),placeholder:"e.g. voyage-3, embed-english-v3.0, text-embedding-3-small",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)("select",{value:l,onChange:e=>d(e.target.value),className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",children:o.map(e=>(0,a.jsx)("option",{value:e.id,children:e.name||e.id},e.id))})}),(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.jsx)("input",{value:f,onChange:e=>v(e.target.value),className:"w-full min-w-0 flex-1 px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono",placeholder:"http://localhost:3000"})})}),(0,a.jsx)(N,{label:"API Key",children:(0,a.jsx)("input",{type:"password",value:h,onChange:e=>b(e.target.value),placeholder:"sk-...",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:"Input",children:(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("input",{value:m,onChange:e=>u(e.target.value),className:"w-full px-3 py-1.5 pr-7 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"}),m&&(0,a.jsx)("button",{type:"button",onClick:()=>u(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-muted hover:text-primary transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})}),(0,a.jsx)(N,{label:"Dimensions",children:(0,a.jsx)("input",{type:"number",min:"1",value:p,onChange:e=>x(e.target.value),placeholder:"optional, e.g. 512, 1024 (leave empty for default)",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})}),(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:()=>I(M),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:A?"check":"content_copy"}),A?"Copied":"Copy"]}),(0,a.jsxs)("button",{onClick:K,disabled:k||!m.trim()||!R,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:k?{animation:"spin 1s linear infinite"}:void 0,children:"play_arrow"}),k?"Running...":"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:M})]}),P&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:P}),(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 ",j&&(0,a.jsxs)("span",{className:"font-normal normal-case",children:["⚡ ",j.latencyMs,"ms"]})]}),j&&(0,a.jsxs)("button",{onClick:()=>T(L),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:E?"check":"content_copy"}),E?"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:(e=>{if(!e)return C;let t=JSON.parse(JSON.stringify(e));return(t.data||[]).forEach(e=>{Array.isArray(e.embedding)&&e.embedding.length>4&&(e.embedding=[...e.embedding.slice(0,4).map(e=>parseFloat(e.toFixed(6))),`... (${e.embedding.length} dims)`])}),JSON.stringify(t,null,2)})(j?.data)})]})]})]})}let $={"google-tts":{hasLanguageDropdown:!1,hasModelSelector:!1,hasBrowseButton:!0,voiceSource:"hardcoded"},openai:{hasLanguageDropdown:!1,hasModelSelector:!0,hasBrowseButton:!1,voiceSource:"hardcoded",modelKey:"openai-tts-models",voiceKey:"openai-tts-voices",voicesPerModel:!0},openrouter:{hasLanguageDropdown:!1,hasModelSelector:!0,hasBrowseButton:!1,voiceSource:"hardcoded",modelKey:"openrouter-tts-models",voiceKey:"openrouter-tts-voices",voicesPerModel:!0},elevenlabs:{hasLanguageDropdown:!1,hasModelSelector:!0,hasBrowseButton:!0,hasVoiceIdInput:!0,voiceSource:"api-language",modelKey:"elevenlabs-tts-models",apiEndpoint:"/api/media-providers/tts/elevenlabs/voices"},"edge-tts":{hasLanguageDropdown:!1,hasModelSelector:!1,hasBrowseButton:!0,voiceSource:"api-language"},"local-device":{hasLanguageDropdown:!1,hasModelSelector:!1,hasBrowseButton:!0,voiceSource:"api-language"},nvidia:{hasModelSelector:!0,hasBrowseButton:!1,hasVoiceIdInput:!0,voiceSource:"config"},hyperbolic:{hasModelSelector:!0,hasBrowseButton:!1,voiceSource:"config"},deepgram:{hasModelSelector:!1,hasBrowseButton:!0,voiceSource:"api-language",apiEndpoint:"/api/media-providers/tts/deepgram/voices"},huggingface:{hasModelSelector:!0,hasBrowseButton:!1,voiceSource:"config"},cartesia:{hasModelSelector:!0,hasBrowseButton:!1,hasVoiceIdInput:!0,voiceSource:"config"},playht:{hasModelSelector:!0,hasBrowseButton:!1,hasVoiceIdInput:!0,voiceSource:"config"},coqui:{hasModelSelector:!0,hasBrowseButton:!1,hasVoiceIdInput:!0,voiceSource:"config"},tortoise:{hasModelSelector:!0,hasBrowseButton:!1,hasVoiceIdInput:!0,voiceSource:"config"},inworld:{hasModelSelector:!0,hasBrowseButton:!0,hasVoiceIdInput:!0,voiceSource:"api-language",modelKey:"inworld-tts-models",apiEndpoint:"/api/media-providers/tts/inworld/voices"},qwen:{hasModelSelector:!0,hasBrowseButton:!1,hasVoiceIdInput:!0,voiceSource:"config"},minimax:{hasModelSelector:!0,hasBrowseButton:!0,hasVoiceIdInput:!0,voiceSource:"api-language",apiEndpoint:"/api/media-providers/tts/minimax/voices",defaultVoiceId:"English_expressive_narrator"},"minimax-cn":{hasModelSelector:!0,hasBrowseButton:!0,hasVoiceIdInput:!0,voiceSource:"api-language",apiEndpoint:"/api/media-providers/tts/minimax/voices?provider=minimax-cn",defaultVoiceId:"English_expressive_narrator"},gemini:{hasLanguageDropdown:!1,hasLanguageHint:!0,hasModelSelector:!0,hasBrowseButton:!1,voiceSource:"hardcoded",modelKey:"gemini-tts-models",voiceKey:"gemini-tts-voices",voicesPerModel:!0}};var P=s(717),_=s(91781);let A=`// Audio will appear here after running.
37
- // Example JSON response (response_format=json):
38
- {
39
- "format": "mp3",
40
- "audio": "//NExAANaAIIAUAAANNNNNNNN..." // base64 encoded MP3
41
- }`;function I({providerId:e}){let t,s,r=(0,c.wG)(e),o=$[e]||$["edge-tts"],[l,d]=(0,n.useState)(o.defaultVoiceId||""),[m,u]=(0,n.useState)(""),[p,x]=(0,n.useState)(o.defaultVoiceId||""),[h,b]=(0,n.useState)([]),[f,v]=(0,n.useState)(""),[j,w]=(0,n.useState)(()=>{let t=c.Q2[e]?.ttsConfig?.models;if(t?.length)return t[0].id;if(o.hasModelSelector&&o.modelKey){let e=(0,g.KC)(o.modelKey);return e?.[0]?.id||""}return""}),[k,C]=(0,n.useState)("Hello, this is a text to speech test."),[S,E]=(0,n.useState)(""),[T,R]=(0,n.useState)(""),[O,M]=(0,n.useState)("mp3"),[K,L]=(0,n.useState)(""),[B,D]=(0,n.useState)(null),[F,U]=(0,n.useState)(!1),[q,J]=(0,n.useState)(""),[z,V]=(0,n.useState)(null),{copied:H,copy:W}=(0,y.C)(),[G,Y]=(0,n.useState)(!1),[Z,Q]=(0,n.useState)([]),[X,ee]=(0,n.useState)(!1),[et,es]=(0,n.useState)(""),[ea,er]=(0,n.useState)(""),[eo,el]=(0,n.useState)({}),[en,ei]=(0,n.useState)("");(0,n.useEffect)(()=>{if(R(window.location.origin),fetch("/api/keys").then(e=>e.json()).then(e=>{E((e.keys||[]).find(e=>!1!==e.isActive)?.key||"")}).catch(()=>{}),"hardcoded"===o.voiceSource){let t=o.hasModelSelector&&o.modelKey&&(0,g.KC)(o.modelKey)?.[0]?.id||"",s=o.voicesPerModel&&t?(0,P.jY)(e,t)||[]:(0,g.KC)(o.voiceKey||e).filter(e=>"tts"===(0,g.CP)(e));if(s.length)if(o.hasBrowseButton){let e=s.find(e=>"en"===e.id)||s[0];v(e.id),d(e.id),u(e.name),b([{id:e.id,name:e.name}])}else b(s),d(s[0].id),u(s[0].name||s[0].id)}},[e]),(0,n.useEffect)(()=>{if(!o.voicesPerModel||!j)return;let t=(0,P.jY)(e,j)||[];b(t),t.length&&(d(t[0].id),u(t[0].name||t[0].id))},[j]);let ed=async()=>{if(Y(!0),es(""),er(""),!Z.length){ee(!0);try{if("hardcoded"===o.voiceSource){let t=o.voiceKey||e,s=(0,g.KC)(t).filter(e=>"tts"===(0,g.CP)(e)),a={};for(let e of s)a[e.id]||(a[e.id]={code:e.id,name:e.name,voices:[{id:e.id,name:e.name}]});el(a),Q(Object.values(a).sort((e,t)=>e.name.localeCompare(t.name)))}else{let t=o.apiEndpoint?o.apiEndpoint:`/api/media-providers/tts/voices?provider=${"local-device"===e?"local-device":"edge-tts"}`,s=await fetch(t),a=await s.json();if(a.error)return void er(a.error);Q(a.languages||[]),el(a.byLang||{})}}catch(e){er(e.message)}finally{ee(!1)}}},ec=et?Z.filter(e=>e.name.toLowerCase().includes(et.toLowerCase())||e.code.toLowerCase().includes(et.toLowerCase())):Z,em=o.hasVoiceIdInput&&p||l,eu=o.hasModelSelector&&j&&em?`${r}/${j}/${em}`:o.hasModelSelector&&j?`${r}/${j}`:em?`${r}/${em}`:"",ep=(t={model:eu,input:k},o.hasLanguageHint&&en&&(t.language=en),t),ex=`curl -X POST ${T}/v1/audio/speech${"json"===O?"?response_format=json":""} \\
42
- -H "Content-Type: application/json" \\
43
- -H "Authorization: Bearer ${S||"YOUR_KEY"}" \\
44
- -d '${JSON.stringify(ep)}' \\
45
- ${"json"===O?"":"--output speech.mp3"}`,eh=async()=>{if(!k.trim()||!eu)return;U(!0),J(""),L(""),D(null);let e=Date.now();try{let t={"Content-Type":"application/json"};S&&(t.Authorization=`Bearer ${S}`);let s=`/api/v1/audio/speech${"json"===O?"?response_format=json":""}`,a=await fetch(s,{method:"POST",headers:t,body:JSON.stringify({...ep,input:k.trim()})});if(V(Date.now()-e),!a.ok){let e=await a.json().catch(()=>({}));J(e?.error?.message||e?.error||`HTTP ${a.status}`);return}if("json"===O){let e=await a.json();D(e);let t=await fetch(`data:audio/mp3;base64,${e.audio}`).then(e=>e.blob());L(URL.createObjectURL(t))}else{let e=await a.blob();L(URL.createObjectURL(e))}}catch(e){J(e.message||"Network error")}finally{U(!1)}};return(0,a.jsxs)(a.Fragment,{children:[(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:[(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:[T,"/v1/audio/speech"]})})}),(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:S?`${S.slice(0,8)}${"•".repeat(Math.min(20,S.length-8))}`:(0,a.jsx)("span",{className:"text-text-muted italic",children:"No key configured"})})}),o.hasModelSelector&&(o.modelKey||(0,g.KC)(e).some(e=>"tts"===(0,g.CP)(e)))&&(0,a.jsx)(N,{label:"Model",children:(0,a.jsx)("select",{value:j,onChange:e=>w(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:((s=(0,g.KC)(e).filter(e=>"tts"===(0,g.CP)(e))).length?s:(0,g.KC)(o.modelKey)||[]).map(e=>(0,a.jsx)("option",{value:e.id,children:e.name||e.id},e.id))})}),o.hasLanguageHint&&(0,a.jsx)(N,{label:"Language",children:(0,a.jsxs)("select",{value:en,onChange:e=>ei(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:"",children:"Auto-detect"}),_.I.map(e=>(0,a.jsx)("option",{value:e.name,children:e.name},e.id))]})}),o.hasBrowseButton&&(0,a.jsx)(N,{label:"Language",children:(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)("button",{onClick:ed,className:"w-full min-w-0 flex-1 px-3 py-1.5 text-sm border border-border rounded-lg bg-background font-mono truncate text-left hover:border-primary/40 transition-colors",children:f?(0,a.jsx)("span",{className:"text-text-main",children:Z.find(e=>e.code===f)?.name||f}):(0,a.jsx)("span",{className:"text-text-muted",children:"No language selected"})}),(0,a.jsxs)("button",{onClick:ed,className:"flex w-full items-center justify-center gap-1 text-xs px-2.5 py-1.5 rounded-lg border border-border text-text-muted hover:text-primary hover:border-primary/40 transition-colors sm:w-auto sm:shrink-0",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"language"}),"Select language"]})]})}),h.length>0&&(0,a.jsx)(N,{label:"Voice",children:(0,a.jsx)("div",{className:"flex flex-wrap gap-1.5",children:h.map(e=>(0,a.jsxs)("button",{onClick:()=>{d(e.id),u(e.name),o.hasVoiceIdInput&&x(e.id)},className:`px-2.5 py-1 rounded-full text-xs border transition-colors ${l===e.id?"bg-primary/15 border-primary/40 text-primary font-medium":"border-border text-text-muted hover:text-primary hover:border-primary/40"}`,children:[e.name,e.gender?` \xb7 ${e.gender[0].toUpperCase()}`:"",!0===e.free_users_allowed&&(0,a.jsx)("span",{className:"ml-1.5 px-1 py-0.5 text-[9px] font-semibold rounded bg-green-500/15 text-green-600 border border-green-500/20",children:"Free"}),!1===e.free_users_allowed&&(0,a.jsx)("span",{className:"ml-1.5 px-1 py-0.5 text-[9px] font-semibold rounded bg-amber-500/15 text-amber-600 border border-amber-500/20",children:"Paid"})]},e.id))})}),o.hasVoiceIdInput&&(0,a.jsx)(N,{label:"Voice ID",children:(0,a.jsx)("div",{className:"flex flex-col gap-1",children:(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("input",{value:p,onChange:e=>{x(e.target.value),d(e.target.value)},placeholder:"e.g. CwhRBWXzGAHq8TQ4Fs17",className:"w-full px-3 py-1.5 pr-7 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary font-mono"}),p&&(0,a.jsx)("button",{type:"button",onClick:()=>{x(""),d("")},className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-muted hover:text-primary transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})})}),o.hasLanguageDropdown&&(0,a.jsx)(N,{label:"Language",children:(0,a.jsx)("select",{value:l,onChange:t=>{let s=(0,g.KC)(e).filter(e=>"tts"===(0,g.CP)(e)).find(e=>e.id===t.target.value);d(t.target.value),u(s?.name||t.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,g.KC)(e).filter(e=>"tts"===(0,g.CP)(e)).map(e=>(0,a.jsx)("option",{value:e.id,children:e.name||e.id},e.id))})}),(0,a.jsx)(N,{label:"Input",children:(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("input",{value:k,onChange:e=>C(e.target.value),className:"w-full px-3 py-1.5 pr-7 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"}),k&&(0,a.jsx)("button",{type:"button",onClick:()=>C(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-muted hover:text-primary transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})}),(0,a.jsx)(N,{label:"Output Format",children:(0,a.jsxs)("select",{value:O,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:[(0,a.jsx)("option",{value:"mp3",children:"MP3 (Binary)"}),(0,a.jsx)("option",{value:"json",children:"JSON (Base64)"})]})}),(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:()=>W(ex),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:H?"check":"content_copy"}),H?"Copied":"Copy"]}),(0,a.jsxs)("button",{onClick:eh,disabled:F||!k.trim()||!eu,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:F?{animation:"spin 1s linear infinite"}:void 0,children:"play_arrow"}),F?"Generating...":"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:ex})]}),q&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:q}),K?(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 ",z&&(0,a.jsxs)("span",{className:"font-normal normal-case",children:["⚡ ",z,"ms"]})]}),(0,a.jsxs)("a",{href:K,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:K,className:"w-full"}),B&&(0,a.jsxs)("div",{className:"mt-3",children:[(0,a.jsx)("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:"JSON Response"})}),(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:JSON.stringify({format:B.format,audio:B.audio?`${B.audio.substring(0,100)}...`:""},null,2)})]})]}):(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Response"}),(0,a.jsx)("pre",{className:"mt-1.5 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-50",children:A})]})]})]}),G&&(0,a.jsx)("div",{className:"fixed inset-0 z-50 flex items-end justify-center sm:items-center",style:{backgroundColor:"rgba(0,0,0,0.6)",backdropFilter:"blur(2px)"},onClick:()=>Y(!1),children:(0,a.jsxs)("div",{className:"border border-border rounded-xl shadow-2xl w-full max-w-md mx-4 flex flex-col max-h-[80vh]",style:{backgroundColor:"var(--color-bg)",isolation:"isolate"},onClick:e=>e.stopPropagation(),children:[(0,a.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border shrink-0 rounded-t-xl",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold",children:"Select Language"}),(0,a.jsx)("button",{onClick:()=>Y(!1),className:"text-text-muted hover:text-primary transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"close"})})]}),(0,a.jsx)("div",{className:"px-4 py-2.5 border-b border-border shrink-0",children:(0,a.jsx)("input",{autoFocus:!0,value:et,onChange:e=>es(e.target.value),placeholder:"Search language...",className:"w-full px-3 py-1.5 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})}),(0,a.jsxs)("div",{className:"overflow-y-auto flex-1 p-2",children:[ea&&(0,a.jsx)("p",{className:"text-xs text-red-500 px-2 py-1",children:ea}),X?(0,a.jsx)("p",{className:"text-xs text-text-muted px-2 py-3",children:"Loading..."}):(0,a.jsxs)("div",{className:"flex flex-col gap-0.5",children:[ec.map(e=>(0,a.jsxs)("button",{onClick:()=>{let t;return Y(!1),v(e.code),void(b(t=eo[e.code]?.voices||[]),t.length&&(d(t[0].id),u(t[0].name),o.hasVoiceIdInput&&x(t[0].id)))},className:`flex items-center justify-between w-full px-3 py-2 rounded-lg text-left hover:bg-sidebar transition-colors ${f===e.code?"bg-primary/10 text-primary":""}`,children:[(0,a.jsx)("span",{className:"text-sm",children:e.name}),(0,a.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:[(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:[e.voices.length," voices"]}),f===e.code&&(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-primary",children:"check"})]})]},e.code)),0===ec.length&&(0,a.jsx)("p",{className:"text-xs text-text-muted px-2 py-3",children:"No languages found."})]})]})]})})]})}let E="https://pub-1fb693cb11cc46b2b2f656f51e015a2c.r2.dev/dog.png";function T(e){let t="string"==typeof e?e.trim():"";return t?/^(data:image\/|https?:\/\/)/i.test(t)?t:`data:image/png;base64,${t}`:""}function R({providerId:e,kind:t}){let s=(0,c.wG)(e),r=(0,c.rs)(s)===e?s:e,o=c.rj.find(e=>e.id===t),l=k[t],d=l||{},m=(0,g.KC)(e).filter(e=>(0,g.CP)(e)===t),u=new Set(["image","video","music","imageToText"]).has(t),p=u&&0===m.length,[x,h]=(0,n.useState)(m[0]?.id??""),b=m.find(e=>e.id===x),f=!!b?.capabilities?.includes("edit"),v=!!b?.capabilities?.includes("mask"),[j,w]=(0,n.useState)(d.defaultInput||""),[C,S]=(0,n.useState)(""),[$,P]=(0,n.useState)(""),[_,A]=(0,n.useState)(()=>(d.extraFields||[]).reduce((e,t)=>(e[t.key]=t.default??"",e),{})),[I,O]=(0,n.useState)(""),[M,K]=(0,n.useState)(""),[L,B]=(0,n.useState)(null),[D,F]=(0,n.useState)(null),[U,q]=(0,n.useState)(null),[J,z]=(0,n.useState)("json"),[V,H]=(0,n.useState)(""),[W,G]=(0,n.useState)(!1),[Y,Z]=(0,n.useState)(""),[Q,X]=(0,n.useState)([]),[ee,et]=(0,n.useState)(""),{copied:es,copy:ea}=(0,y.C)(),{copied:er,copy:eo}=(0,y.C)();if((0,n.useEffect)(()=>{K(window.location.origin),fetch("/api/keys").then(e=>e.json()).then(e=>{O((e.keys||[]).find(e=>!1!==e.isActive)?.key||"")}).catch(()=>{}),fetch("/api/providers/client").then(e=>e.json()).then(t=>{X((t.connections||[]).filter(t=>t.provider===e&&!1!==t.isActive))}).catch(()=>{})},[e]),!o||!l)return null;let el=o.endpoint.path,en=u?x?`${r}/${x}`:p?"":r:r,ei="cloudflare-ai"!==e?{}:"@cf/runwayml/stable-diffusion-v1-5-img2img"===x?{image:E}:"@cf/runwayml/stable-diffusion-v1-5-inpainting"===x?{image:E,mask_image:"https://pub-1fb693cb11cc46b2b2f656f51e015a2c.r2.dev/dog-mask.png"}:{},ed=C.trim()||ei.image||"",ec=$.trim()||ei.mask_image||"",em=T(ed),eu=T(ec),ep=Object.entries(_).reduce((e,[t,s])=>(""===s||null==s||"number"==typeof s&&Number.isNaN(s)||(e[t]=s),e),{}),ex={model:en,[l.bodyKey]:j,...l.extraBody,...ep,...f&&ed?{image:ed}:{},...v&&ec?{mask_image:ec}:{}},eh="image"===t&&"binary"===J,eb="image"===t&&"codex"===e&&!eh,ef=`${el}${eh?"?response_format=binary":""}`,eg=`-H "Content-Type: application/json" \\
46
- -H "Authorization: Bearer ${I||"YOUR_KEY"}"${ee?` \\
47
- -H "x-connection-id: ${ee}"`:""}${eb?` \\
48
- -H "Accept: text/event-stream"`:""}`,ey=`curl -X ${o.endpoint.method} ${M}${ef} \\
49
- ${eg.replace(/\\\n /g,"\\\n ")} \\
50
- -d '${JSON.stringify(ex)}'${eh?" \\\n --output image.png":""}`,ev=async()=>{if(!j.trim()||!en)return;if(G(!0),Z(""),B(null),F(null),q(null),V){try{URL.revokeObjectURL(V)}catch{}H("")}let e=Date.now();try{let t={"Content-Type":"application/json"};I&&(t.Authorization=`Bearer ${I}`),ee&&(t["x-connection-id"]=ee),eb&&(t.Accept="text/event-stream");let s={...ex,model:en},a=await fetch(`/api${ef}`,{method:o.endpoint.method,headers:t,body:JSON.stringify(s)});if(!a.ok){let e=await a.json().catch(()=>({}));Z(e?.error?.message||e?.error||`HTTP ${a.status}`);return}let r=a.headers.get("content-type")||"";if(r.startsWith("image/")){let t=await a.blob(),s=URL.createObjectURL(t);H(s),B({data:{binary:!0,mime:r,size:t.size},latencyMs:Date.now()-e});return}if(r.includes("text/event-stream")&&a.body){let t=a.body.getReader(),s=new TextDecoder,r="",o=null,l=null;for(;;){let e,{done:a,value:n}=await t.read();if(a)break;for(r+=s.decode(n,{stream:!0});-1!==(e=r.indexOf("\n\n"));){let t=r.slice(0,e);r=r.slice(e+2);let s=null,a="";for(let e of t.split("\n"))e.startsWith("event:")?s=e.slice(6).trim():e.startsWith("data:")&&(a+=e.slice(5).trim());if(s)try{let e=a?JSON.parse(a):{};"progress"===s?F(e):"partial_image"===s?q(e):"done"===s?o=e:"error"===s&&(l=e?.message||"Stream error")}catch{}}}let n=Date.now()-e;if(l)return void Z(l);o&&B({data:o,latencyMs:n})}else{let t=await a.json(),s=Date.now()-e;B({data:t,latencyMs:s})}}catch(e){Z(e.message||"Network error")}finally{G(!1)}},ej=e=>{if(!e||"object"!=typeof e)return e;if(Array.isArray(e))return e.map(ej);let t={};for(let[s,a]of Object.entries(e))t[s]="b64_json"===s&&"string"==typeof a&&a.length>100?`<${a.length} chars base64>`:ej(a);return t},ew=L?JSON.stringify(ej(L.data),null,2):"";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:[m.length>0?(0,a.jsx)(N,{label:"Model",children:(0,a.jsx)("select",{value:x,onChange:e=>h(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:m.map(e=>(0,a.jsx)("option",{value:e.id,children:e.name||e.id},e.id))})}):p?(0,a.jsx)(N,{label:"Model",children:(0,a.jsx)("input",{value:x,onChange:e=>h(e.target.value),placeholder:"Enter model id (provider-specific)",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"})}):null,(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:[M,el]})})}),(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:I?`${I.slice(0,8)}${"•".repeat(Math.min(20,I.length-8))}`:(0,a.jsx)("span",{className:"text-text-muted italic",children:"No key configured"})})}),Q.length>0&&(0,a.jsx)(N,{label:"Connection",children:(0,a.jsxs)("select",{value:ee,onChange:e=>et(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:"",children:"Auto (by priority)"}),Q.map(e=>{let t=e.providerSpecificData?.chatgptPlanType,s=e.email||e.name||e.id.slice(0,8);return(0,a.jsxs)("option",{value:e.id,children:[s,t?` [${t}]`:""]},e.id)})]})}),(0,a.jsx)(N,{label:l.inputLabel,children:(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("input",{value:j,onChange:e=>w(e.target.value),placeholder:l.inputPlaceholder,className:"w-full px-3 py-1.5 pr-7 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"}),j&&(0,a.jsx)("button",{type:"button",onClick:()=>w(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-muted hover:text-primary transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})}),f&&(0,a.jsx)(N,{label:"Ref Image (URL)",children:(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("input",{value:C,onChange:e=>S(e.target.value),placeholder:ei.image||"https://example.com/source.png",className:"w-full px-3 py-1.5 pr-7 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"}),C&&(0,a.jsx)("button",{type:"button",onClick:()=>S(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-muted hover:text-primary transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]}),em&&(0,a.jsx)("img",{src:em,alt:"Reference",className:"max-h-40 rounded-lg border border-border object-contain bg-sidebar",onError:e=>{e.currentTarget.style.display="none"},onLoad:e=>{e.currentTarget.style.display="block"}})]})}),v&&(0,a.jsx)(N,{label:"Mask (URL)",children:(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("input",{value:$,onChange:e=>P(e.target.value),placeholder:ei.mask_image||"https://example.com/mask.png",className:"w-full px-3 py-1.5 pr-7 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"}),$&&(0,a.jsx)("button",{type:"button",onClick:()=>P(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-text-muted hover:text-primary transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]}),eu&&(0,a.jsx)("img",{src:eu,alt:"Mask",className:"max-h-40 rounded-lg border border-border object-contain bg-sidebar",onError:e=>{e.currentTarget.style.display="none"},onLoad:e=>{e.currentTarget.style.display="block"}})]})}),(l.extraFields||[]).filter(e=>0===m.length||Array.isArray(b?.params)&&b.params.includes(e.key)).map(e=>(0,a.jsx)(N,{label:e.label,children:"select"===e.type?(0,a.jsx)("select",{value:_[e.key]??"",onChange:t=>A(s=>({...s,[e.key]:t.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:(e.options||[]).map(e=>(0,a.jsx)("option",{value:e,children:""===e?"(default)":e},e))}):"text"===e.type?(0,a.jsx)("input",{type:"text",value:_[e.key]??"",placeholder:e.placeholder,onChange:t=>A(s=>({...s,[e.key]:t.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"}):(0,a.jsx)("input",{type:"number",value:_[e.key]??"",min:e.min,max:e.max,onChange:t=>A(s=>({...s,[e.key]:""===t.target.value?"":Number(t.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"})},e.key)),"image"===t&&(0,a.jsx)(N,{label:"Output Format",children:(0,a.jsxs)("select",{value:J,onChange:e=>z(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 (Base64)"}),(0,a.jsx)("option",{value:"binary",children:"Binary File"})]})}),(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:()=>ea(ey),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:es?"check":"content_copy"}),es?"Copied":"Copy"]}),(0,a.jsxs)("button",{onClick:ev,disabled:W||!j.trim()||!en,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:W?{animation:"spin 1s linear infinite"}:void 0,children:"play_arrow"}),W?"Running...":"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:ey})]}),(W||D)&&eb&&(0,a.jsxs)("div",{className:"flex flex-col gap-2 px-3 py-2 rounded-lg bg-sidebar border border-border sm:flex-row sm:items-center sm:gap-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-primary",style:W?{animation:"spin 1s linear infinite"}:void 0,children:W?"progress_activity":"check_circle"}),(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:[D?.stage||"starting",!W&&D?.bytesReceived?` \xb7 ${(D.bytesReceived/1024).toFixed(1)} KB`:""]})]}),U?.b64_json&&!L&&(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-text-muted uppercase tracking-wider",children:"Partial preview"}),(0,a.jsx)("img",{src:`data:image/png;base64,${U.b64_json}`,alt:"Partial",className:"max-w-full rounded-lg border border-border mt-1.5 opacity-80"})]}),Y&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:Y}),(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 ",L&&(0,a.jsxs)("span",{className:"font-normal normal-case",children:["⚡ ",L.latencyMs,"ms"]})]}),L&&(0,a.jsxs)("button",{onClick:()=>eo(ew),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:er?"check":"content_copy"}),er?"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:L?ew:l.defaultResponse}),"image"===t&&(V||L?.data?.data?.[0])&&(0,a.jsxs)("div",{className:"mt-2",children:[(0,a.jsx)("div",{className:"flex items-center justify-end mb-1.5",children:(0,a.jsxs)("a",{href:V||(L?.data?.data?.[0]?.b64_json?`data:image/png;base64,${L.data.data[0].b64_json}`:L?.data?.data?.[0]?.url||""),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:V||(L?.data?.data?.[0]?.b64_json?`data:image/png;base64,${L.data.data[0].b64_json}`:L?.data?.data?.[0]?.url),alt:"Generated",className:"max-w-full rounded-lg border border-border"})]})]})]})]})}function O({providerId:e}){let t=(0,c.wG)(e),s=(0,g.KC)(e).filter(e=>"stt"===(0,g.CP)(e)),[r,o]=(0,n.useState)([]),l=[...s,...r],[d,m]=(0,n.useState)(s[0]?.id??""),u=l.find(e=>e.id===d),p=Array.isArray(u?.params)?u.params:[],[x,h]=(0,n.useState)(null),[b,f]=(0,n.useState)(""),[v,j]=(0,n.useState)(""),[w,k]=(0,n.useState)("json"),[C,S]=(0,n.useState)(""),[$,P]=(0,n.useState)(""),[_,A]=(0,n.useState)(""),[I,E]=(0,n.useState)(null),[T,R]=(0,n.useState)(null),[M,K]=(0,n.useState)(!1),[L,B]=(0,n.useState)(""),{copied:D,copy:F}=(0,y.C)(),{copied:U,copy:q}=(0,y.C)();(0,n.useEffect)(()=>{A(window.location.origin),fetch("/api/keys").then(e=>e.json()).then(e=>{P((e.keys||[]).find(e=>!1!==e.isActive)?.key||"")}).catch(()=>{});let e=()=>{fetch("/api/models/custom",{cache:"no-store"}).then(e=>e.json()).then(e=>{o((e.models||[]).filter(e=>"stt"===(0,g.CP)(e)&&e.providerAlias===t))}).catch(()=>{})};return e(),window.addEventListener("focus",e),window.addEventListener("customModelChanged",e),()=>{window.removeEventListener("focus",e),window.removeEventListener("customModelChanged",e)}},[t]);let J=d?`${t}/${d}`:"",z=`curl -X POST ${_}/v1/audio/transcriptions \\
51
- -H "Authorization: Bearer ${$||"YOUR_KEY"}" \\
52
- -F "file=@${x?.name||"audio.mp3"}" \\
53
- -F "model=${J}"${p.includes("language")&&b?` \\
54
- -F "language=${b}"`:""}${p.includes("response_format")?` \\
55
- -F "response_format=${w}"`:""}${p.includes("temperature")&&C?` \\
56
- -F "temperature=${C}"`:""}${p.includes("prompt")&&v?` \\
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
- "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()}]);