switchboard-router 0.6.31 → 0.8.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 (1257) hide show
  1. package/app/.next/static/LW9zpYBdABYCFKEJUiC4B/_buildManifest.js +1 -0
  2. package/app/.next/static/LW9zpYBdABYCFKEJUiC4B/_ssgManifest.js +1 -0
  3. package/app/.next/static/chunks/1321-8d4ef805452d3649.js +1 -0
  4. package/app/.next/static/chunks/136-b76ff55769d5ecb1.js +1 -0
  5. package/app/.next/static/chunks/1a258343-33aee1e7d9aa500f.js +1 -0
  6. package/app/.next/static/chunks/3531-e8d13ec64699f527.js +68 -0
  7. package/app/.next/static/chunks/3794-d7cddff008311ab3.js +52 -0
  8. package/app/.next/static/chunks/4707-1ec0b2edbb07f455.js +1 -0
  9. package/app/.next/static/chunks/4bd1b696-8a4ab4fdf0ae305a.js +1 -0
  10. package/app/.next/static/chunks/5497-a3b9cdb0b8300541.js +7 -0
  11. package/app/.next/static/chunks/594-5a5c7b405aa92038.js +64 -0
  12. package/app/.next/static/chunks/6430-4c528cfc35666c11.js +1 -0
  13. package/app/.next/static/chunks/7055-e60e20f43bfbe5f8.js +1 -0
  14. package/app/.next/static/chunks/782-3a03a779968fa7a2.js +3 -0
  15. package/app/.next/static/chunks/8202.1ffc6ce531e066ce.js +1 -0
  16. package/app/.next/static/chunks/8500-74c368e06d70378e.js +1 -0
  17. package/app/.next/static/chunks/app/(dashboard)/dashboard/agent-library/page-24b5a8515eee26d6.js +1 -0
  18. package/app/.next/static/chunks/app/(dashboard)/dashboard/basic-chat/page-4ec8bfa73afe20a6.js +1 -0
  19. package/app/.next/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/page-d7205b7328b3fed1.js +1 -0
  20. package/app/.next/static/chunks/app/(dashboard)/dashboard/cli-tools/page-d0b6efe01e687aec.js +1 -0
  21. package/app/.next/static/chunks/app/(dashboard)/dashboard/combos/page-5cfdfdf507c8222f.js +1 -0
  22. package/app/.next/static/chunks/app/(dashboard)/dashboard/combos/routing/page-25629f96675ad55d.js +1 -0
  23. package/app/.next/static/chunks/app/(dashboard)/dashboard/console-log/page-b54cd17200807e49.js +1 -0
  24. package/app/.next/static/chunks/app/(dashboard)/dashboard/endpoint/page-cd44cb44125275b6.js +3 -0
  25. package/app/.next/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page-995a96a01c24b126.js +59 -0
  26. package/app/.next/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/page-52c12af07f9a6de0.js +1 -0
  27. package/app/.next/static/chunks/app/(dashboard)/dashboard/media-providers/combo/[id]/page-8554ba79c854167f.js +4 -0
  28. package/app/.next/static/chunks/app/(dashboard)/dashboard/media-providers/page-0f54c9a5e7391a77.js +1 -0
  29. package/app/.next/static/chunks/app/(dashboard)/dashboard/media-providers/web/page-cfbd3661ac75b8c5.js +1 -0
  30. package/app/.next/static/chunks/app/(dashboard)/dashboard/mitm/page-8779ff2bc755ba78.js +1 -0
  31. package/app/.next/static/chunks/app/(dashboard)/dashboard/page-c33d24bdadcf0c6e.js +1 -0
  32. package/app/.next/static/chunks/app/(dashboard)/dashboard/profile/page-d32871b974f7e72f.js +1 -0
  33. package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-e4258dcd8fb1a077.js +10 -0
  34. package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/new/page-74d56b3b7ac42546.js +1 -0
  35. package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/page-555f079cdf31bbf6.js +1 -0
  36. package/app/.next/static/chunks/app/(dashboard)/dashboard/pxpipe/page-bd18ad88b98cd373.js +1 -0
  37. package/app/.next/static/chunks/app/(dashboard)/dashboard/quota/page-b3ffcc7df06a37d8.js +1 -0
  38. package/app/.next/static/chunks/app/(dashboard)/dashboard/skills/[id]/page-56bf48ee2068208e.js +1 -0
  39. package/app/.next/static/chunks/app/(dashboard)/dashboard/skills/page-46986a955b8c89b2.js +1 -0
  40. package/app/.next/static/chunks/app/(dashboard)/dashboard/token-saver/page-20972a96e348f397.js +1 -0
  41. package/app/.next/static/chunks/app/(dashboard)/dashboard/translator/page-0cc2ccbe11cc0013.js +1 -0
  42. package/app/.next/static/chunks/app/(dashboard)/dashboard/usage/page-5af5fff7d28ed91d.js +1 -0
  43. package/app/.next/static/chunks/app/(dashboard)/error-d633be4a53c4ab61.js +1 -0
  44. package/app/.next/static/chunks/app/(dashboard)/layout-62b4e2cdf745f8d0.js +1 -0
  45. package/app/.next/static/chunks/app/_global-error/page-e5f03432dd0bcd61.js +1 -0
  46. package/app/.next/static/chunks/app/_not-found/page-ee581ced4614e639.js +1 -0
  47. package/app/.next/static/chunks/app/api/agent-library/catalog/route-e5f03432dd0bcd61.js +1 -0
  48. package/app/.next/static/chunks/app/api/agent-library/doctor/route-e5f03432dd0bcd61.js +1 -0
  49. package/app/.next/static/chunks/app/api/agent-library/export/route-e5f03432dd0bcd61.js +1 -0
  50. package/app/.next/static/chunks/app/api/agent-library/mcp/route-e5f03432dd0bcd61.js +1 -0
  51. package/app/.next/static/chunks/app/api/agent-library/route-e5f03432dd0bcd61.js +1 -0
  52. package/app/.next/static/chunks/app/api/agent-library/skills/route-e5f03432dd0bcd61.js +1 -0
  53. package/app/.next/static/chunks/app/api/agent-library/sync/route-e5f03432dd0bcd61.js +1 -0
  54. package/app/.next/static/chunks/app/api/agent-library/updates/route-e5f03432dd0bcd61.js +1 -0
  55. package/app/.next/static/chunks/app/api/auth/status/route-e5f03432dd0bcd61.js +1 -0
  56. package/app/.next/static/chunks/app/api/cli-tools/aider-settings/route-e5f03432dd0bcd61.js +1 -0
  57. package/app/.next/static/chunks/app/api/cli-tools/all-statuses/route-e5f03432dd0bcd61.js +1 -0
  58. package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-e5f03432dd0bcd61.js +1 -0
  59. package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/route-e5f03432dd0bcd61.js +1 -0
  60. package/app/.next/static/chunks/app/api/cli-tools/claude-full-catalog/route-e5f03432dd0bcd61.js +1 -0
  61. package/app/.next/static/chunks/app/api/cli-tools/claude-picker-labels/route-e5f03432dd0bcd61.js +1 -0
  62. package/app/.next/static/chunks/app/api/cli-tools/claude-settings/route-e5f03432dd0bcd61.js +1 -0
  63. package/app/.next/static/chunks/app/api/cli-tools/cline-settings/route-e5f03432dd0bcd61.js +1 -0
  64. package/app/.next/static/chunks/app/api/cli-tools/codex-settings/route-e5f03432dd0bcd61.js +1 -0
  65. package/app/.next/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-e5f03432dd0bcd61.js +1 -0
  66. package/app/.next/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-e5f03432dd0bcd61.js +1 -0
  67. package/app/.next/static/chunks/app/api/cli-tools/cowork-settings/route-e5f03432dd0bcd61.js +1 -0
  68. package/app/.next/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-e5f03432dd0bcd61.js +1 -0
  69. package/app/.next/static/chunks/app/api/cli-tools/droid-settings/route-e5f03432dd0bcd61.js +1 -0
  70. package/app/.next/static/chunks/app/api/cli-tools/gemini-cli-settings/route-e5f03432dd0bcd61.js +1 -0
  71. package/app/.next/static/chunks/app/api/cli-tools/grok-settings/route-e5f03432dd0bcd61.js +1 -0
  72. package/app/.next/static/chunks/app/api/cli-tools/hermes-settings/route-e5f03432dd0bcd61.js +1 -0
  73. package/app/.next/static/chunks/app/api/cli-tools/jcode-settings/route-e5f03432dd0bcd61.js +1 -0
  74. package/app/.next/static/chunks/app/api/cli-tools/kilo-settings/route-e5f03432dd0bcd61.js +1 -0
  75. package/app/.next/static/chunks/app/api/cli-tools/openclaw-settings/route-e5f03432dd0bcd61.js +1 -0
  76. package/app/.next/static/chunks/app/api/cli-tools/opencode-settings/route-e5f03432dd0bcd61.js +1 -0
  77. package/app/.next/static/chunks/app/api/cli-tools/pi-settings/route-e5f03432dd0bcd61.js +1 -0
  78. package/app/.next/static/chunks/app/api/cli-tools/picker-labels/route-e5f03432dd0bcd61.js +1 -0
  79. package/app/.next/static/chunks/app/api/combos/[id]/route-e5f03432dd0bcd61.js +1 -0
  80. package/app/.next/static/chunks/app/api/combos/route-e5f03432dd0bcd61.js +1 -0
  81. package/app/.next/static/chunks/app/api/headroom/extras/route-e5f03432dd0bcd61.js +1 -0
  82. package/app/.next/static/chunks/app/api/headroom/proxy/[...path]/route-e5f03432dd0bcd61.js +1 -0
  83. package/app/.next/static/chunks/app/api/headroom/restart/route-e5f03432dd0bcd61.js +1 -0
  84. package/app/.next/static/chunks/app/api/headroom/start/route-e5f03432dd0bcd61.js +1 -0
  85. package/app/.next/static/chunks/app/api/headroom/status/route-e5f03432dd0bcd61.js +1 -0
  86. package/app/.next/static/chunks/app/api/headroom/stop/route-e5f03432dd0bcd61.js +1 -0
  87. package/app/.next/static/chunks/app/api/health/route-e5f03432dd0bcd61.js +1 -0
  88. package/app/.next/static/chunks/app/api/keys/[id]/route-e5f03432dd0bcd61.js +1 -0
  89. package/app/.next/static/chunks/app/api/keys/route-e5f03432dd0bcd61.js +1 -0
  90. package/app/.next/static/chunks/app/api/locale/route-e5f03432dd0bcd61.js +1 -0
  91. package/app/.next/static/chunks/app/api/mcp/[plugin]/message/route-e5f03432dd0bcd61.js +1 -0
  92. package/app/.next/static/chunks/app/api/mcp/[plugin]/sse/route-e5f03432dd0bcd61.js +1 -0
  93. package/app/.next/static/chunks/app/api/media-providers/tts/deepgram/voices/route-e5f03432dd0bcd61.js +1 -0
  94. package/app/.next/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-e5f03432dd0bcd61.js +1 -0
  95. package/app/.next/static/chunks/app/api/media-providers/tts/inworld/voices/route-e5f03432dd0bcd61.js +1 -0
  96. package/app/.next/static/chunks/app/api/media-providers/tts/minimax/voices/route-e5f03432dd0bcd61.js +1 -0
  97. package/app/.next/static/chunks/app/api/media-providers/tts/voices/route-e5f03432dd0bcd61.js +1 -0
  98. package/app/.next/static/chunks/app/api/mgmt/v1/combos/[id]/route-e5f03432dd0bcd61.js +1 -0
  99. package/app/.next/static/chunks/app/api/mgmt/v1/combos/[id]/strategy/route-e5f03432dd0bcd61.js +1 -0
  100. package/app/.next/static/chunks/app/api/mgmt/v1/combos/route-e5f03432dd0bcd61.js +1 -0
  101. package/app/.next/static/chunks/app/api/mgmt/v1/health/route-e5f03432dd0bcd61.js +1 -0
  102. package/app/.next/static/chunks/app/api/mgmt/v1/metrics/route-e5f03432dd0bcd61.js +1 -0
  103. package/app/.next/static/chunks/app/api/mgmt/v1/providers/route-e5f03432dd0bcd61.js +1 -0
  104. package/app/.next/static/chunks/app/api/mgmt/v1/routing/route-e5f03432dd0bcd61.js +1 -0
  105. package/app/.next/static/chunks/app/api/mgmt/v1/usage/route-e5f03432dd0bcd61.js +1 -0
  106. package/app/.next/static/chunks/app/api/mgmt/v1/version/route-e5f03432dd0bcd61.js +1 -0
  107. package/app/.next/static/chunks/app/api/models/alias/route-e5f03432dd0bcd61.js +1 -0
  108. package/app/.next/static/chunks/app/api/models/availability/route-e5f03432dd0bcd61.js +1 -0
  109. package/app/.next/static/chunks/app/api/models/custom/route-e5f03432dd0bcd61.js +1 -0
  110. package/app/.next/static/chunks/app/api/models/disabled/route-e5f03432dd0bcd61.js +1 -0
  111. package/app/.next/static/chunks/app/api/models/route-e5f03432dd0bcd61.js +1 -0
  112. package/app/.next/static/chunks/app/api/models/test/route-e5f03432dd0bcd61.js +1 -0
  113. package/app/.next/static/chunks/app/api/oauth/[provider]/[action]/route-e5f03432dd0bcd61.js +1 -0
  114. package/app/.next/static/chunks/app/api/oauth/codex/bulk-import/route-e5f03432dd0bcd61.js +1 -0
  115. package/app/.next/static/chunks/app/api/oauth/codex/import-token/route-e5f03432dd0bcd61.js +1 -0
  116. package/app/.next/static/chunks/app/api/oauth/cursor/auto-import/route-e5f03432dd0bcd61.js +1 -0
  117. package/app/.next/static/chunks/app/api/oauth/cursor/import/route-e5f03432dd0bcd61.js +1 -0
  118. package/app/.next/static/chunks/app/api/oauth/gitlab/pat/route-e5f03432dd0bcd61.js +1 -0
  119. package/app/.next/static/chunks/app/api/oauth/iflow/cookie/route-e5f03432dd0bcd61.js +1 -0
  120. package/app/.next/static/chunks/app/api/oauth/kiro/api-key/route-e5f03432dd0bcd61.js +1 -0
  121. package/app/.next/static/chunks/app/api/oauth/kiro/auto-import/route-e5f03432dd0bcd61.js +1 -0
  122. package/app/.next/static/chunks/app/api/oauth/kiro/import/route-e5f03432dd0bcd61.js +1 -0
  123. package/app/.next/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-e5f03432dd0bcd61.js +1 -0
  124. package/app/.next/static/chunks/app/api/oauth/kiro/social-authorize/route-e5f03432dd0bcd61.js +1 -0
  125. package/app/.next/static/chunks/app/api/oauth/kiro/social-exchange/route-e5f03432dd0bcd61.js +1 -0
  126. package/app/.next/static/chunks/app/api/pricing/route-e5f03432dd0bcd61.js +1 -0
  127. package/app/.next/static/chunks/app/api/provider-nodes/[id]/route-e5f03432dd0bcd61.js +1 -0
  128. package/app/.next/static/chunks/app/api/provider-nodes/route-e5f03432dd0bcd61.js +1 -0
  129. package/app/.next/static/chunks/app/api/provider-nodes/validate/route-e5f03432dd0bcd61.js +1 -0
  130. package/app/.next/static/chunks/app/api/providers/[id]/model-probes/batch/route-e5f03432dd0bcd61.js +1 -0
  131. package/app/.next/static/chunks/app/api/providers/[id]/model-probes/cache/route-e5f03432dd0bcd61.js +1 -0
  132. package/app/.next/static/chunks/app/api/providers/[id]/model-probes/prepare/route-e5f03432dd0bcd61.js +1 -0
  133. package/app/.next/static/chunks/app/api/providers/[id]/model-probes/remove-unavailable/route-e5f03432dd0bcd61.js +1 -0
  134. package/app/.next/static/chunks/app/api/providers/[id]/model-probes/route-e5f03432dd0bcd61.js +1 -0
  135. package/app/.next/static/chunks/app/api/providers/[id]/model-probes/verify/cancel/route-e5f03432dd0bcd61.js +1 -0
  136. package/app/.next/static/chunks/app/api/providers/[id]/model-probes/verify/start/route-e5f03432dd0bcd61.js +1 -0
  137. package/app/.next/static/chunks/app/api/providers/[id]/model-probes/verify/status/route-e5f03432dd0bcd61.js +1 -0
  138. package/app/.next/static/chunks/app/api/providers/[id]/models/route-e5f03432dd0bcd61.js +1 -0
  139. package/app/.next/static/chunks/app/api/providers/[id]/route-e5f03432dd0bcd61.js +1 -0
  140. package/app/.next/static/chunks/app/api/providers/[id]/test/route-e5f03432dd0bcd61.js +1 -0
  141. package/app/.next/static/chunks/app/api/providers/[id]/test-models/route-e5f03432dd0bcd61.js +1 -0
  142. package/app/.next/static/chunks/app/api/providers/client/route-e5f03432dd0bcd61.js +1 -0
  143. package/app/.next/static/chunks/app/api/providers/kilo/free-models/route-e5f03432dd0bcd61.js +1 -0
  144. package/app/.next/static/chunks/app/api/providers/route-e5f03432dd0bcd61.js +1 -0
  145. package/app/.next/static/chunks/app/api/providers/suggested-models/route-e5f03432dd0bcd61.js +1 -0
  146. package/app/.next/static/chunks/app/api/providers/test-batch/route-e5f03432dd0bcd61.js +1 -0
  147. package/app/.next/static/chunks/app/api/providers/validate/route-e5f03432dd0bcd61.js +1 -0
  148. package/app/.next/static/chunks/app/api/pxpipe/health/route-e5f03432dd0bcd61.js +1 -0
  149. package/app/.next/static/chunks/app/api/pxpipe/install/route-e5f03432dd0bcd61.js +1 -0
  150. package/app/.next/static/chunks/app/api/pxpipe/logs/route-e5f03432dd0bcd61.js +1 -0
  151. package/app/.next/static/chunks/app/api/pxpipe/restart/route-e5f03432dd0bcd61.js +1 -0
  152. package/app/.next/static/chunks/app/api/pxpipe/start/route-e5f03432dd0bcd61.js +1 -0
  153. package/app/.next/static/chunks/app/api/pxpipe/stats/route-e5f03432dd0bcd61.js +1 -0
  154. package/app/.next/static/chunks/app/api/pxpipe/status/route-e5f03432dd0bcd61.js +1 -0
  155. package/app/.next/static/chunks/app/api/pxpipe/stop/route-e5f03432dd0bcd61.js +1 -0
  156. package/app/.next/static/chunks/app/api/routing/feedback/route-e5f03432dd0bcd61.js +1 -0
  157. package/app/.next/static/chunks/app/api/routing/insights/route-e5f03432dd0bcd61.js +1 -0
  158. package/app/.next/static/chunks/app/api/routing/learn/route-e5f03432dd0bcd61.js +1 -0
  159. package/app/.next/static/chunks/app/api/routing/stats/route-e5f03432dd0bcd61.js +1 -0
  160. package/app/.next/static/chunks/app/api/routing/versions/promote/route-e5f03432dd0bcd61.js +1 -0
  161. package/app/.next/static/chunks/app/api/routing/versions/rollback/route-e5f03432dd0bcd61.js +1 -0
  162. package/app/.next/static/chunks/app/api/settings/database/route-e5f03432dd0bcd61.js +1 -0
  163. package/app/.next/static/chunks/app/api/settings/proxy-test/route-e5f03432dd0bcd61.js +1 -0
  164. package/app/.next/static/chunks/app/api/settings/route-e5f03432dd0bcd61.js +1 -0
  165. package/app/.next/static/chunks/app/api/shutdown/route-e5f03432dd0bcd61.js +1 -0
  166. package/app/.next/static/chunks/app/api/skills/[id]/route-e5f03432dd0bcd61.js +1 -0
  167. package/app/.next/static/chunks/app/api/tags/route-e5f03432dd0bcd61.js +1 -0
  168. package/app/.next/static/chunks/app/api/token-saver/vault-stats/route-e5f03432dd0bcd61.js +1 -0
  169. package/app/.next/static/chunks/app/api/translator/console-logs/route-e5f03432dd0bcd61.js +1 -0
  170. package/app/.next/static/chunks/app/api/translator/console-logs/stream/route-e5f03432dd0bcd61.js +1 -0
  171. package/app/.next/static/chunks/app/api/translator/load/route-e5f03432dd0bcd61.js +1 -0
  172. package/app/.next/static/chunks/app/api/translator/save/route-e5f03432dd0bcd61.js +1 -0
  173. package/app/.next/static/chunks/app/api/translator/send/route-e5f03432dd0bcd61.js +1 -0
  174. package/app/.next/static/chunks/app/api/translator/translate/route-e5f03432dd0bcd61.js +1 -0
  175. package/app/.next/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-e5f03432dd0bcd61.js +1 -0
  176. package/app/.next/static/chunks/app/api/usage/[connectionId]/route-e5f03432dd0bcd61.js +1 -0
  177. package/app/.next/static/chunks/app/api/usage/chart/route-e5f03432dd0bcd61.js +1 -0
  178. package/app/.next/static/chunks/app/api/usage/history/route-e5f03432dd0bcd61.js +1 -0
  179. package/app/.next/static/chunks/app/api/usage/logs/route-e5f03432dd0bcd61.js +1 -0
  180. package/app/.next/static/chunks/app/api/usage/providers/route-e5f03432dd0bcd61.js +1 -0
  181. package/app/.next/static/chunks/app/api/usage/request-details/route-e5f03432dd0bcd61.js +1 -0
  182. package/app/.next/static/chunks/app/api/usage/request-logs/route-e5f03432dd0bcd61.js +1 -0
  183. package/app/.next/static/chunks/app/api/usage/stats/route-e5f03432dd0bcd61.js +1 -0
  184. package/app/.next/static/chunks/app/api/usage/stream/route-e5f03432dd0bcd61.js +1 -0
  185. package/app/.next/static/chunks/app/api/v1/api/chat/route-e5f03432dd0bcd61.js +1 -0
  186. package/app/.next/static/chunks/app/api/v1/audio/speech/route-e5f03432dd0bcd61.js +1 -0
  187. package/app/.next/static/chunks/app/api/v1/audio/transcriptions/route-e5f03432dd0bcd61.js +1 -0
  188. package/app/.next/static/chunks/app/api/v1/audio/voices/route-e5f03432dd0bcd61.js +1 -0
  189. package/app/.next/static/chunks/app/api/v1/chat/completions/route-e5f03432dd0bcd61.js +1 -0
  190. package/app/.next/static/chunks/app/api/v1/embeddings/route-e5f03432dd0bcd61.js +1 -0
  191. package/app/.next/static/chunks/app/api/v1/images/generations/route-e5f03432dd0bcd61.js +1 -0
  192. package/app/.next/static/chunks/app/api/v1/messages/count_tokens/route-e5f03432dd0bcd61.js +1 -0
  193. package/app/.next/static/chunks/app/api/v1/messages/route-e5f03432dd0bcd61.js +1 -0
  194. package/app/.next/static/chunks/app/api/v1/models/[kind]/route-e5f03432dd0bcd61.js +1 -0
  195. package/app/.next/static/chunks/app/api/v1/models/info/route-e5f03432dd0bcd61.js +1 -0
  196. package/app/.next/static/chunks/app/api/v1/models/route-e5f03432dd0bcd61.js +1 -0
  197. package/app/.next/static/chunks/app/api/v1/responses/compact/route-e5f03432dd0bcd61.js +1 -0
  198. package/app/.next/static/chunks/app/api/v1/responses/route-e5f03432dd0bcd61.js +1 -0
  199. package/app/.next/static/chunks/app/api/v1/route-e5f03432dd0bcd61.js +1 -0
  200. package/app/.next/static/chunks/app/api/v1/search/route-e5f03432dd0bcd61.js +1 -0
  201. package/app/.next/static/chunks/app/api/v1/videos/[id]/route-e5f03432dd0bcd61.js +1 -0
  202. package/app/.next/static/chunks/app/api/v1/videos/edits/route-e5f03432dd0bcd61.js +1 -0
  203. package/app/.next/static/chunks/app/api/v1/videos/extensions/route-e5f03432dd0bcd61.js +1 -0
  204. package/app/.next/static/chunks/app/api/v1/videos/generations/route-e5f03432dd0bcd61.js +1 -0
  205. package/app/.next/static/chunks/app/api/v1/web/fetch/route-e5f03432dd0bcd61.js +1 -0
  206. package/app/.next/static/chunks/app/api/v1beta/models/[...path]/route-e5f03432dd0bcd61.js +1 -0
  207. package/app/.next/static/chunks/app/api/v1beta/models/route-e5f03432dd0bcd61.js +1 -0
  208. package/app/.next/static/chunks/app/api/version/route-e5f03432dd0bcd61.js +1 -0
  209. package/app/.next/static/chunks/app/api/version/shutdown/route-e5f03432dd0bcd61.js +1 -0
  210. package/app/.next/static/chunks/app/api/version/update/route-e5f03432dd0bcd61.js +1 -0
  211. package/app/.next/static/chunks/app/callback/page-5c1d863ff86ddc6e.js +1 -0
  212. package/app/.next/static/chunks/app/dashboard/settings/pricing/page-423a4c1e078872dd.js +1 -0
  213. package/app/.next/static/chunks/app/landing/page-9e06d57d9b215fd7.js +1 -0
  214. package/app/.next/static/chunks/app/layout-214ea0ad8a3d8323.js +1 -0
  215. package/app/.next/static/chunks/app/login/page-e5f03432dd0bcd61.js +1 -0
  216. package/app/.next/static/chunks/app/manifest.webmanifest/route-e5f03432dd0bcd61.js +1 -0
  217. package/app/.next/static/chunks/app/page-e5f03432dd0bcd61.js +1 -0
  218. package/app/.next/static/chunks/framework-461b899b66554474.js +1 -0
  219. package/app/.next/static/chunks/main-app-83fef838b21a8d19.js +1 -0
  220. package/app/.next/static/chunks/main-d2d664d299c2e1bc.js +5 -0
  221. package/app/.next/static/chunks/next/dist/client/components/builtin/app-error-e5f03432dd0bcd61.js +1 -0
  222. package/app/.next/static/chunks/next/dist/client/components/builtin/forbidden-e5f03432dd0bcd61.js +1 -0
  223. package/app/.next/static/chunks/next/dist/client/components/builtin/global-error-f9c47afa2e4175d7.js +1 -0
  224. package/app/.next/static/chunks/next/dist/client/components/builtin/not-found-e5f03432dd0bcd61.js +1 -0
  225. package/app/.next/static/chunks/next/dist/client/components/builtin/unauthorized-e5f03432dd0bcd61.js +1 -0
  226. package/app/.next/static/chunks/polyfills-42372ed130431b0a.js +1 -0
  227. package/app/.next/static/chunks/webpack-57b54315eb9fa808.js +1 -0
  228. package/app/.next/static/css/23b999cda6943547.css +1 -0
  229. package/app/.next/static/css/a26e7bdf55d5cb27.css +1 -0
  230. package/app/.next/static/css/e07f2bf4fa519943.css +31 -0
  231. package/app/.next/static/media/011e180705008d6f-s.woff2 +0 -0
  232. package/app/.next/static/media/20535187d867b7b9-s.woff2 +0 -0
  233. package/app/.next/static/media/26d4368bf94c0ec4-s.p.woff2 +0 -0
  234. package/app/.next/static/media/2801417b65625cf5-s.woff2 +0 -0
  235. package/app/.next/static/media/28793f5c5e3d822d-s.woff2 +0 -0
  236. package/app/.next/static/media/5356a6a4f2c8c8d8-s.woff2 +0 -0
  237. package/app/.next/static/media/58f386aa6b1a2a92-s.woff2 +0 -0
  238. package/app/.next/static/media/73cb51aac9c97f90-s.woff2 +0 -0
  239. package/app/.next/static/media/7b19b489dc6743ba-s.woff2 +0 -0
  240. package/app/.next/static/media/7ba5fb2a8c88521c-s.woff2 +0 -0
  241. package/app/.next/static/media/92eeb95d069020cc-s.woff2 +0 -0
  242. package/app/.next/static/media/98e207f02528a563-s.p.woff2 +0 -0
  243. package/app/.next/static/media/99dcf268bda04fe5-s.woff2 +0 -0
  244. package/app/.next/static/media/b3bf17a9041d9433-s.woff2 +0 -0
  245. package/app/.next/static/media/c9c3823090ec8b55-s.woff2 +0 -0
  246. package/app/.next/static/media/catalog.e7ada387.json +1710 -0
  247. package/app/.next/static/media/d26bbd13d6b70f89-s.woff2 +0 -0
  248. package/app/.next/static/media/d29838c109ef09b4-s.woff2 +0 -0
  249. package/app/.next/static/media/d3ebbfd689654d3a-s.p.woff2 +0 -0
  250. package/app/.next/static/media/db96af6b531dc71f-s.p.woff2 +0 -0
  251. package/app/.next/static/media/e40af3453d7c920a-s.woff2 +0 -0
  252. package/app/.next/static/media/ef4d5661765d0e49-s.woff2 +0 -0
  253. package/app/.next/static/media/material-symbols-outlined.f656244e.woff2 +0 -0
  254. package/app/.next-cli-build/BUILD_ID +1 -1
  255. package/app/.next-cli-build/app-path-routes-manifest.json +26 -10
  256. package/app/.next-cli-build/build-manifest.json +2 -2
  257. package/app/.next-cli-build/prerender-manifest.json +3 -3
  258. package/app/.next-cli-build/required-server-files.json +5 -1
  259. package/app/.next-cli-build/routes-manifest.json +98 -0
  260. package/app/.next-cli-build/server/app/(dashboard)/dashboard/agent-library/page.js +1 -1
  261. package/app/.next-cli-build/server/app/(dashboard)/dashboard/agent-library/page.js.nft.json +1 -1
  262. package/app/.next-cli-build/server/app/(dashboard)/dashboard/agent-library/page_client-reference-manifest.js +1 -1
  263. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +1 -1
  264. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  265. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  266. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +1 -1
  267. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  268. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  269. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +1 -1
  270. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  271. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  272. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +1 -1
  273. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  274. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  275. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/routing/page.js +1 -1
  276. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/routing/page.js.nft.json +1 -1
  277. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/routing/page_client-reference-manifest.js +1 -1
  278. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +1 -1
  279. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  280. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  281. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +2 -2
  282. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  283. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  284. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +11 -11
  285. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  286. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  287. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +1 -1
  288. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  289. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  290. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +2 -2
  291. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  292. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  293. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/page.js +1 -1
  294. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/page.js.nft.json +1 -1
  295. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/page_client-reference-manifest.js +1 -1
  296. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +1 -1
  297. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  298. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  299. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +1 -1
  300. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  301. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  302. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +1 -1
  303. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  304. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  305. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +1 -1
  306. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  307. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  308. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +2 -2
  309. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  310. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  311. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +1 -1
  312. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  313. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  314. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +1 -1
  315. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  316. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  317. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js +1 -0
  318. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js.nft.json +1 -0
  319. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -0
  320. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +1 -1
  321. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  322. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  323. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/[id]/page.js +1 -1
  324. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/[id]/page.js.nft.json +1 -1
  325. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/[id]/page_client-reference-manifest.js +1 -1
  326. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +1 -1
  327. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  328. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  329. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +1 -1
  330. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
  331. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  332. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +1 -1
  333. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  334. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  335. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +1 -1
  336. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  337. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  338. package/app/.next-cli-build/server/app/_global-error/page.js +2 -2
  339. package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  340. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  341. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  342. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  343. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  344. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  345. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  346. package/app/.next-cli-build/server/app/_not-found/page.js +1 -1
  347. package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  348. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  349. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  350. package/app/.next-cli-build/server/app/_not-found.rsc +4 -4
  351. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +4 -4
  352. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +4 -4
  353. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  354. package/app/.next-cli-build/server/app/api/agent-library/catalog/route.js +1 -1
  355. package/app/.next-cli-build/server/app/api/agent-library/catalog/route.js.nft.json +1 -1
  356. package/app/.next-cli-build/server/app/api/agent-library/doctor/route.js +1 -1
  357. package/app/.next-cli-build/server/app/api/agent-library/doctor/route.js.nft.json +1 -1
  358. package/app/.next-cli-build/server/app/api/agent-library/export/route.js +1 -1
  359. package/app/.next-cli-build/server/app/api/agent-library/export/route.js.nft.json +1 -1
  360. package/app/.next-cli-build/server/app/api/agent-library/mcp/route.js +1 -1
  361. package/app/.next-cli-build/server/app/api/agent-library/mcp/route.js.nft.json +1 -1
  362. package/app/.next-cli-build/server/app/api/agent-library/route.js +1 -1
  363. package/app/.next-cli-build/server/app/api/agent-library/route.js.nft.json +1 -1
  364. package/app/.next-cli-build/server/app/api/agent-library/skills/route.js +1 -1
  365. package/app/.next-cli-build/server/app/api/agent-library/skills/route.js.nft.json +1 -1
  366. package/app/.next-cli-build/server/app/api/agent-library/sync/route.js +1 -1
  367. package/app/.next-cli-build/server/app/api/agent-library/sync/route.js.nft.json +1 -1
  368. package/app/.next-cli-build/server/app/api/agent-library/updates/route.js +1 -1
  369. package/app/.next-cli-build/server/app/api/agent-library/updates/route.js.nft.json +1 -1
  370. package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
  371. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  372. package/app/.next-cli-build/server/app/api/cli-tools/aider-settings/route.js +2 -2
  373. package/app/.next-cli-build/server/app/api/cli-tools/aider-settings/route.js.nft.json +1 -1
  374. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +5 -5
  375. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  376. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
  377. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  378. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  379. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  380. package/app/.next-cli-build/server/app/api/cli-tools/claude-full-catalog/route.js +1 -1
  381. package/app/.next-cli-build/server/app/api/cli-tools/claude-full-catalog/route.js.nft.json +1 -1
  382. package/app/.next-cli-build/server/app/api/cli-tools/claude-picker-labels/route.js +1 -1
  383. package/app/.next-cli-build/server/app/api/cli-tools/claude-picker-labels/route.js.nft.json +1 -1
  384. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +1 -1
  385. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  386. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +2 -2
  387. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  388. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +2 -2
  389. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  390. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +2 -2
  391. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  392. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +2 -2
  393. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  394. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +2 -2
  395. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  396. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +2 -2
  397. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  398. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +2 -2
  399. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  400. package/app/.next-cli-build/server/app/api/cli-tools/gemini-cli-settings/route.js +2 -2
  401. package/app/.next-cli-build/server/app/api/cli-tools/gemini-cli-settings/route.js.nft.json +1 -1
  402. package/app/.next-cli-build/server/app/api/cli-tools/grok-settings/route.js +2 -2
  403. package/app/.next-cli-build/server/app/api/cli-tools/grok-settings/route.js.nft.json +1 -1
  404. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +2 -2
  405. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  406. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +2 -2
  407. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  408. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +2 -2
  409. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  410. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
  411. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  412. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +2 -2
  413. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  414. package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js +1 -1
  415. package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js.nft.json +1 -1
  416. package/app/.next-cli-build/server/app/api/cli-tools/picker-labels/route.js +1 -1
  417. package/app/.next-cli-build/server/app/api/cli-tools/picker-labels/route.js.nft.json +1 -1
  418. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  419. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  420. package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  421. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  422. package/app/.next-cli-build/server/app/api/headroom/extras/route.js +1 -0
  423. package/app/.next-cli-build/server/app/api/headroom/extras/route.js.nft.json +1 -0
  424. package/app/.next-cli-build/server/app/api/headroom/extras/route_client-reference-manifest.js +1 -0
  425. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js +1 -1
  426. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
  427. package/app/.next-cli-build/server/app/api/headroom/restart/route.js +1 -0
  428. package/app/.next-cli-build/server/app/api/headroom/restart/route.js.nft.json +1 -0
  429. package/app/.next-cli-build/server/app/api/headroom/restart/route_client-reference-manifest.js +1 -0
  430. package/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -1
  431. package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
  432. package/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -1
  433. package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
  434. package/app/.next-cli-build/server/app/api/headroom/stop/route.js +1 -1
  435. package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
  436. package/app/.next-cli-build/server/app/api/health/route.js +1 -1
  437. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  438. package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  439. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  440. package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
  441. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  442. package/app/.next-cli-build/server/app/api/locale/route.js +1 -1
  443. package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  444. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +2 -2
  445. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  446. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +1 -1
  447. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  448. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  449. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  450. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  451. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  452. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  453. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  454. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  455. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  456. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
  457. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  458. package/app/.next-cli-build/server/app/api/mgmt/v1/combos/[id]/route.js +1 -1
  459. package/app/.next-cli-build/server/app/api/mgmt/v1/combos/[id]/route.js.nft.json +1 -1
  460. package/app/.next-cli-build/server/app/api/mgmt/v1/combos/[id]/strategy/route.js +1 -1
  461. package/app/.next-cli-build/server/app/api/mgmt/v1/combos/[id]/strategy/route.js.nft.json +1 -1
  462. package/app/.next-cli-build/server/app/api/mgmt/v1/combos/route.js +1 -1
  463. package/app/.next-cli-build/server/app/api/mgmt/v1/combos/route.js.nft.json +1 -1
  464. package/app/.next-cli-build/server/app/api/mgmt/v1/health/route.js +1 -1
  465. package/app/.next-cli-build/server/app/api/mgmt/v1/health/route.js.nft.json +1 -1
  466. package/app/.next-cli-build/server/app/api/mgmt/v1/metrics/route.js +2 -0
  467. package/app/.next-cli-build/server/app/api/mgmt/v1/metrics/route.js.nft.json +1 -0
  468. package/app/.next-cli-build/server/app/api/mgmt/v1/metrics/route_client-reference-manifest.js +1 -0
  469. package/app/.next-cli-build/server/app/api/mgmt/v1/providers/route.js +1 -1
  470. package/app/.next-cli-build/server/app/api/mgmt/v1/providers/route.js.nft.json +1 -1
  471. package/app/.next-cli-build/server/app/api/mgmt/v1/routing/route.js +1 -1
  472. package/app/.next-cli-build/server/app/api/mgmt/v1/routing/route.js.nft.json +1 -1
  473. package/app/.next-cli-build/server/app/api/mgmt/v1/usage/route.js +1 -1
  474. package/app/.next-cli-build/server/app/api/mgmt/v1/usage/route.js.nft.json +1 -1
  475. package/app/.next-cli-build/server/app/api/mgmt/v1/version/route.js +1 -1
  476. package/app/.next-cli-build/server/app/api/mgmt/v1/version/route.js.nft.json +1 -1
  477. package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  478. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  479. package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
  480. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  481. package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  482. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  483. package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
  484. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  485. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  486. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  487. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  488. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  489. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  490. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  491. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
  492. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
  493. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  494. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  495. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +2 -2
  496. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  497. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  498. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  499. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  500. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  501. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  502. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  503. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
  504. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
  505. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
  506. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  507. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  508. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  509. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js +1 -1
  510. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
  511. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  512. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  513. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  514. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  515. package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  516. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  517. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
  518. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  519. package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  520. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  521. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
  522. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  523. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/batch/route.js +1 -1
  524. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/batch/route.js.nft.json +1 -1
  525. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/cache/route.js +1 -1
  526. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/cache/route.js.nft.json +1 -1
  527. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/prepare/route.js +1 -1
  528. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/prepare/route.js.nft.json +1 -1
  529. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/remove-unavailable/route.js +1 -1
  530. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/remove-unavailable/route.js.nft.json +1 -1
  531. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/route.js +1 -1
  532. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/route.js.nft.json +1 -1
  533. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/verify/cancel/route.js +1 -1
  534. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/verify/cancel/route.js.nft.json +1 -1
  535. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/verify/start/route.js +1 -1
  536. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/verify/start/route.js.nft.json +1 -1
  537. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/verify/status/route.js +1 -1
  538. package/app/.next-cli-build/server/app/api/providers/[id]/model-probes/verify/status/route.js.nft.json +1 -1
  539. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  540. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  541. package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  542. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  543. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  544. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  545. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  546. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  547. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  548. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  549. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
  550. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  551. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  552. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  553. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
  554. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  555. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  556. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  557. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  558. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  559. package/app/.next-cli-build/server/app/api/pxpipe/health/route.js +3 -0
  560. package/app/.next-cli-build/server/app/api/pxpipe/health/route.js.nft.json +1 -0
  561. package/app/.next-cli-build/server/app/api/pxpipe/health/route_client-reference-manifest.js +1 -0
  562. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js +3 -0
  563. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -0
  564. package/app/.next-cli-build/server/app/api/pxpipe/install/route_client-reference-manifest.js +1 -0
  565. package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js +3 -0
  566. package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js.nft.json +1 -0
  567. package/app/.next-cli-build/server/app/api/pxpipe/logs/route_client-reference-manifest.js +1 -0
  568. package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js +3 -0
  569. package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js.nft.json +1 -0
  570. package/app/.next-cli-build/server/app/api/pxpipe/restart/route_client-reference-manifest.js +1 -0
  571. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js +3 -0
  572. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js.nft.json +1 -0
  573. package/app/.next-cli-build/server/app/api/pxpipe/start/route_client-reference-manifest.js +1 -0
  574. package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js +3 -0
  575. package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js.nft.json +1 -0
  576. package/app/.next-cli-build/server/app/api/pxpipe/stats/route_client-reference-manifest.js +1 -0
  577. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js +3 -0
  578. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -0
  579. package/app/.next-cli-build/server/app/api/pxpipe/status/route_client-reference-manifest.js +1 -0
  580. package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js +3 -0
  581. package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js.nft.json +1 -0
  582. package/app/.next-cli-build/server/app/api/pxpipe/stop/route_client-reference-manifest.js +1 -0
  583. package/app/.next-cli-build/server/app/api/routing/feedback/route.js +1 -1
  584. package/app/.next-cli-build/server/app/api/routing/feedback/route.js.nft.json +1 -1
  585. package/app/.next-cli-build/server/app/api/routing/insights/route.js +1 -1
  586. package/app/.next-cli-build/server/app/api/routing/insights/route.js.nft.json +1 -1
  587. package/app/.next-cli-build/server/app/api/routing/learn/route.js +1 -1
  588. package/app/.next-cli-build/server/app/api/routing/learn/route.js.nft.json +1 -1
  589. package/app/.next-cli-build/server/app/api/routing/stats/route.js +1 -1
  590. package/app/.next-cli-build/server/app/api/routing/stats/route.js.nft.json +1 -1
  591. package/app/.next-cli-build/server/app/api/routing/versions/promote/route.js +1 -1
  592. package/app/.next-cli-build/server/app/api/routing/versions/promote/route.js.nft.json +1 -1
  593. package/app/.next-cli-build/server/app/api/routing/versions/rollback/route.js +1 -1
  594. package/app/.next-cli-build/server/app/api/routing/versions/rollback/route.js.nft.json +1 -1
  595. package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  596. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  597. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
  598. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  599. package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  600. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  601. package/app/.next-cli-build/server/app/api/shutdown/route.js +1 -1
  602. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  603. package/app/.next-cli-build/server/app/api/skills/[id]/route.js +1 -1
  604. package/app/.next-cli-build/server/app/api/skills/[id]/route.js.nft.json +1 -1
  605. package/app/.next-cli-build/server/app/api/tags/route.js +1 -1
  606. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  607. package/app/.next-cli-build/server/app/api/token-saver/vault-stats/route.js +1 -1
  608. package/app/.next-cli-build/server/app/api/token-saver/vault-stats/route.js.nft.json +1 -1
  609. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  610. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  611. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
  612. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  613. package/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
  614. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  615. package/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
  616. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  617. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  618. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  619. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  620. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  621. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
  622. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
  623. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  624. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  625. package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  626. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  627. package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  628. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  629. package/app/.next-cli-build/server/app/api/usage/logs/route.js +1 -1
  630. package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
  631. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  632. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  633. package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  634. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  635. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  636. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  637. package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  638. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  639. package/app/.next-cli-build/server/app/api/usage/stream/route.js +2 -2
  640. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  641. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  642. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  643. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  644. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  645. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  646. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  647. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
  648. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  649. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  650. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  651. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  652. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  653. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +2 -2
  654. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  655. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
  656. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  657. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  658. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  659. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
  660. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  661. package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  662. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  663. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  664. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  665. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  666. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  667. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  668. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  669. package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  670. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  671. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  672. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  673. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js +1 -0
  674. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js.nft.json +1 -0
  675. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route_client-reference-manifest.js +1 -0
  676. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js +1 -0
  677. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js.nft.json +1 -0
  678. package/app/.next-cli-build/server/app/api/v1/videos/edits/route_client-reference-manifest.js +1 -0
  679. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js +1 -0
  680. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js.nft.json +1 -0
  681. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route_client-reference-manifest.js +1 -0
  682. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js +1 -0
  683. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js.nft.json +1 -0
  684. package/app/.next-cli-build/server/app/api/v1/videos/generations/route_client-reference-manifest.js +1 -0
  685. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  686. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  687. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  688. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  689. package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  690. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  691. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  692. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  693. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  694. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  695. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  696. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  697. package/app/.next-cli-build/server/app/callback/page.js +1 -1
  698. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  699. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  700. package/app/.next-cli-build/server/app/callback.html +1 -1
  701. package/app/.next-cli-build/server/app/callback.rsc +4 -4
  702. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +4 -4
  703. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
  704. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +4 -4
  705. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +1 -1
  706. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  707. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  708. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  709. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +5 -5
  710. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +5 -5
  711. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
  712. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +5 -5
  713. package/app/.next-cli-build/server/app/favicon.ico/route.js +1 -1
  714. package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
  715. package/app/.next-cli-build/server/app/index.html +1 -1
  716. package/app/.next-cli-build/server/app/index.rsc +4 -4
  717. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +4 -4
  718. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +4 -4
  719. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +2 -2
  720. package/app/.next-cli-build/server/app/landing/page.js +1 -1
  721. package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  722. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  723. package/app/.next-cli-build/server/app/landing.html +1 -1
  724. package/app/.next-cli-build/server/app/landing.rsc +4 -4
  725. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +4 -4
  726. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
  727. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +4 -4
  728. package/app/.next-cli-build/server/app/login/page.js +1 -1
  729. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  730. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  731. package/app/.next-cli-build/server/app/login.html +1 -1
  732. package/app/.next-cli-build/server/app/login.rsc +4 -4
  733. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +4 -4
  734. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
  735. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +4 -4
  736. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js +2 -2
  737. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  738. package/app/.next-cli-build/server/app/page.js +1 -1
  739. package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  740. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  741. package/app/.next-cli-build/server/app-paths-manifest.json +26 -10
  742. package/app/.next-cli-build/server/chunks/1294.js +1 -1
  743. package/app/.next-cli-build/server/chunks/1350.js +1 -1
  744. package/app/.next-cli-build/server/chunks/159.js +1 -1
  745. package/app/.next-cli-build/server/chunks/1656.js +2 -0
  746. package/app/.next-cli-build/server/chunks/1937.js +2 -2
  747. package/app/.next-cli-build/server/chunks/194.js +1 -1
  748. package/app/.next-cli-build/server/chunks/1998.js +1 -1
  749. package/app/.next-cli-build/server/chunks/2376.js +1 -1
  750. package/app/.next-cli-build/server/chunks/2409.js +1 -1
  751. package/app/.next-cli-build/server/chunks/3026.js +1 -0
  752. package/app/.next-cli-build/server/chunks/3072.js +1 -1
  753. package/app/.next-cli-build/server/chunks/3075.js +1 -1
  754. package/app/.next-cli-build/server/chunks/3546.js +1 -1
  755. package/app/.next-cli-build/server/chunks/3593.js +2 -2
  756. package/app/.next-cli-build/server/chunks/369.js +11 -9
  757. package/app/.next-cli-build/server/chunks/3787.js +1 -1
  758. package/app/.next-cli-build/server/chunks/3904.js +1 -1
  759. package/app/.next-cli-build/server/chunks/3986.js +39 -23
  760. package/app/.next-cli-build/server/chunks/4739.js +2 -2
  761. package/app/.next-cli-build/server/chunks/4780.js +2 -2
  762. package/app/.next-cli-build/server/chunks/4803.js +1 -1
  763. package/app/.next-cli-build/server/chunks/507.js +2 -2
  764. package/app/.next-cli-build/server/chunks/5258.js +2 -2
  765. package/app/.next-cli-build/server/chunks/5350.js +1 -1
  766. package/app/.next-cli-build/server/chunks/5616.js +1 -0
  767. package/app/.next-cli-build/server/chunks/5717.js +47 -0
  768. package/app/.next-cli-build/server/chunks/5781.js +15 -0
  769. package/app/.next-cli-build/server/chunks/5888.js +246 -0
  770. package/app/.next-cli-build/server/chunks/5913.js +1 -0
  771. package/app/.next-cli-build/server/chunks/6052.js +2 -0
  772. package/app/.next-cli-build/server/chunks/6252.js +1 -1
  773. package/app/.next-cli-build/server/chunks/6274.js +1 -0
  774. package/app/.next-cli-build/server/chunks/6328.js +1 -1
  775. package/app/.next-cli-build/server/chunks/6347.js +1 -0
  776. package/app/.next-cli-build/server/chunks/6395.js +15 -15
  777. package/app/.next-cli-build/server/chunks/6406.js +1 -1
  778. package/app/.next-cli-build/server/chunks/6492.js +1 -1
  779. package/app/.next-cli-build/server/chunks/6947.js +1 -0
  780. package/app/.next-cli-build/server/chunks/698.js +2 -2
  781. package/app/.next-cli-build/server/chunks/6985.js +1 -1
  782. package/app/.next-cli-build/server/chunks/7141.js +1 -1
  783. package/app/.next-cli-build/server/chunks/7454.js +1 -1
  784. package/app/.next-cli-build/server/chunks/7557.js +4 -4
  785. package/app/.next-cli-build/server/chunks/7757.js +1 -0
  786. package/app/.next-cli-build/server/chunks/7774.js +3 -3
  787. package/app/.next-cli-build/server/chunks/7828.js +2 -2
  788. package/app/.next-cli-build/server/chunks/7965.js +2 -2
  789. package/app/.next-cli-build/server/chunks/8062.js +1 -1
  790. package/app/.next-cli-build/server/chunks/8117.js +1 -1
  791. package/app/.next-cli-build/server/chunks/8400.js +9 -9
  792. package/app/.next-cli-build/server/chunks/8469.js +1 -1
  793. package/app/.next-cli-build/server/chunks/849.js +1 -0
  794. package/app/.next-cli-build/server/chunks/8520.js +2 -2
  795. package/app/.next-cli-build/server/chunks/8658.js +1 -1
  796. package/app/.next-cli-build/server/chunks/869.js +1 -1
  797. package/app/.next-cli-build/server/chunks/8775.js +1 -1
  798. package/app/.next-cli-build/server/chunks/8789.js +1 -1
  799. package/app/.next-cli-build/server/chunks/8834.js +7 -0
  800. package/app/.next-cli-build/server/chunks/8942.js +246 -0
  801. package/app/.next-cli-build/server/chunks/8998.js +67 -43
  802. package/app/.next-cli-build/server/chunks/{5615.js → 9091.js} +2 -2
  803. package/app/.next-cli-build/server/chunks/9261.js +6 -6
  804. package/app/.next-cli-build/server/chunks/9264.js +10 -0
  805. package/app/.next-cli-build/server/chunks/940.js +246 -0
  806. package/app/.next-cli-build/server/chunks/9421.js +4 -0
  807. package/app/.next-cli-build/server/chunks/9508.js +4 -4
  808. package/app/.next-cli-build/server/chunks/9617.js +1 -0
  809. package/app/.next-cli-build/server/chunks/static/media/versions.401d57e8.json +20 -0
  810. package/app/.next-cli-build/server/functions-config-manifest.json +6 -0
  811. package/app/.next-cli-build/server/instrumentation.js +1 -1
  812. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  813. package/app/.next-cli-build/server/middleware.js +24 -12
  814. package/app/.next-cli-build/server/pages/404.html +1 -1
  815. package/app/.next-cli-build/server/pages/500.html +1 -1
  816. package/app/.next-cli-build/server/server-reference-manifest.js +1 -1
  817. package/app/.next-cli-build/server/server-reference-manifest.json +1 -1
  818. package/app/.next-cli-build/static/LW9zpYBdABYCFKEJUiC4B/_buildManifest.js +1 -0
  819. package/app/.next-cli-build/static/chunks/1321-8d4ef805452d3649.js +1 -0
  820. package/app/.next-cli-build/static/chunks/3531-e8d13ec64699f527.js +68 -0
  821. package/app/.next-cli-build/static/chunks/4707-1ec0b2edbb07f455.js +1 -0
  822. package/app/.next-cli-build/static/chunks/5497-a3b9cdb0b8300541.js +7 -0
  823. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/agent-library/page-24b5a8515eee26d6.js +1 -0
  824. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/basic-chat/page-4ec8bfa73afe20a6.js +1 -0
  825. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/{page-6633578a55a1a436.js → page-d7205b7328b3fed1.js} +1 -1
  826. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/{page-3cbe5d8636bd2161.js → page-d0b6efe01e687aec.js} +1 -1
  827. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-5cfdfdf507c8222f.js +1 -0
  828. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/routing/{page-1fc70bcd434deb73.js → page-25629f96675ad55d.js} +1 -1
  829. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/page-b54cd17200807e49.js +1 -0
  830. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-cd44cb44125275b6.js +3 -0
  831. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page-995a96a01c24b126.js +59 -0
  832. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/{page-95bf830096d019fd.js → page-52c12af07f9a6de0.js} +1 -1
  833. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/combo/[id]/page-8554ba79c854167f.js +4 -0
  834. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/page-0f54c9a5e7391a77.js +1 -0
  835. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/web/{page-961013b570bbeac6.js → page-cfbd3661ac75b8c5.js} +1 -1
  836. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/{page-59e54ef2021ad5bb.js → page-8779ff2bc755ba78.js} +1 -1
  837. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-c33d24bdadcf0c6e.js +1 -0
  838. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/{page-b5b9038ea28e63b6.js → page-d32871b974f7e72f.js} +1 -1
  839. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-e4258dcd8fb1a077.js +10 -0
  840. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/new/page-74d56b3b7ac42546.js +1 -0
  841. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/{page-d3e35265648406f2.js → page-555f079cdf31bbf6.js} +1 -1
  842. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/pxpipe/page-bd18ad88b98cd373.js +1 -0
  843. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-b3ffcc7df06a37d8.js +1 -0
  844. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/[id]/{page-bb4af1ac9b13a514.js → page-56bf48ee2068208e.js} +1 -1
  845. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/{page-4382c14f28ddfc7f.js → page-46986a955b8c89b2.js} +1 -1
  846. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/page-20972a96e348f397.js +1 -0
  847. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/translator/page-0cc2ccbe11cc0013.js +1 -0
  848. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/page-5af5fff7d28ed91d.js +1 -0
  849. package/app/.next-cli-build/static/chunks/app/(dashboard)/error-d633be4a53c4ab61.js +1 -0
  850. package/app/.next-cli-build/static/chunks/app/(dashboard)/{layout-d1fa5b81e1c386ab.js → layout-62b4e2cdf745f8d0.js} +1 -1
  851. package/app/.next-cli-build/static/chunks/app/_global-error/page-e5f03432dd0bcd61.js +1 -0
  852. package/app/.next-cli-build/static/chunks/app/api/agent-library/catalog/route-e5f03432dd0bcd61.js +1 -0
  853. package/app/.next-cli-build/static/chunks/app/api/agent-library/doctor/route-e5f03432dd0bcd61.js +1 -0
  854. package/app/.next-cli-build/static/chunks/app/api/agent-library/export/route-e5f03432dd0bcd61.js +1 -0
  855. package/app/.next-cli-build/static/chunks/app/api/agent-library/mcp/route-e5f03432dd0bcd61.js +1 -0
  856. package/app/.next-cli-build/static/chunks/app/api/agent-library/route-e5f03432dd0bcd61.js +1 -0
  857. package/app/.next-cli-build/static/chunks/app/api/agent-library/skills/route-e5f03432dd0bcd61.js +1 -0
  858. package/app/.next-cli-build/static/chunks/app/api/agent-library/sync/route-e5f03432dd0bcd61.js +1 -0
  859. package/app/.next-cli-build/static/chunks/app/api/agent-library/updates/route-e5f03432dd0bcd61.js +1 -0
  860. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-e5f03432dd0bcd61.js +1 -0
  861. package/app/.next-cli-build/static/chunks/app/api/cli-tools/aider-settings/route-e5f03432dd0bcd61.js +1 -0
  862. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-e5f03432dd0bcd61.js +1 -0
  863. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-e5f03432dd0bcd61.js +1 -0
  864. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-e5f03432dd0bcd61.js +1 -0
  865. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-full-catalog/route-e5f03432dd0bcd61.js +1 -0
  866. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-picker-labels/route-e5f03432dd0bcd61.js +1 -0
  867. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-e5f03432dd0bcd61.js +1 -0
  868. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-e5f03432dd0bcd61.js +1 -0
  869. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-e5f03432dd0bcd61.js +1 -0
  870. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-e5f03432dd0bcd61.js +1 -0
  871. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-e5f03432dd0bcd61.js +1 -0
  872. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-e5f03432dd0bcd61.js +1 -0
  873. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-e5f03432dd0bcd61.js +1 -0
  874. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-e5f03432dd0bcd61.js +1 -0
  875. package/app/.next-cli-build/static/chunks/app/api/cli-tools/gemini-cli-settings/route-e5f03432dd0bcd61.js +1 -0
  876. package/app/.next-cli-build/static/chunks/app/api/cli-tools/grok-settings/route-e5f03432dd0bcd61.js +1 -0
  877. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-e5f03432dd0bcd61.js +1 -0
  878. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-e5f03432dd0bcd61.js +1 -0
  879. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-e5f03432dd0bcd61.js +1 -0
  880. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-e5f03432dd0bcd61.js +1 -0
  881. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-e5f03432dd0bcd61.js +1 -0
  882. package/app/.next-cli-build/static/chunks/app/api/cli-tools/pi-settings/route-e5f03432dd0bcd61.js +1 -0
  883. package/app/.next-cli-build/static/chunks/app/api/cli-tools/picker-labels/route-e5f03432dd0bcd61.js +1 -0
  884. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-e5f03432dd0bcd61.js +1 -0
  885. package/app/.next-cli-build/static/chunks/app/api/combos/route-e5f03432dd0bcd61.js +1 -0
  886. package/app/.next-cli-build/static/chunks/app/api/headroom/extras/route-e5f03432dd0bcd61.js +1 -0
  887. package/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-e5f03432dd0bcd61.js +1 -0
  888. package/app/.next-cli-build/static/chunks/app/api/headroom/restart/route-e5f03432dd0bcd61.js +1 -0
  889. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-e5f03432dd0bcd61.js +1 -0
  890. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-e5f03432dd0bcd61.js +1 -0
  891. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-e5f03432dd0bcd61.js +1 -0
  892. package/app/.next-cli-build/static/chunks/app/api/health/route-e5f03432dd0bcd61.js +1 -0
  893. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-e5f03432dd0bcd61.js +1 -0
  894. package/app/.next-cli-build/static/chunks/app/api/keys/route-e5f03432dd0bcd61.js +1 -0
  895. package/app/.next-cli-build/static/chunks/app/api/locale/route-e5f03432dd0bcd61.js +1 -0
  896. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-e5f03432dd0bcd61.js +1 -0
  897. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-e5f03432dd0bcd61.js +1 -0
  898. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-e5f03432dd0bcd61.js +1 -0
  899. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-e5f03432dd0bcd61.js +1 -0
  900. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-e5f03432dd0bcd61.js +1 -0
  901. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-e5f03432dd0bcd61.js +1 -0
  902. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-e5f03432dd0bcd61.js +1 -0
  903. package/app/.next-cli-build/static/chunks/app/api/mgmt/v1/combos/[id]/route-e5f03432dd0bcd61.js +1 -0
  904. package/app/.next-cli-build/static/chunks/app/api/mgmt/v1/combos/[id]/strategy/route-e5f03432dd0bcd61.js +1 -0
  905. package/app/.next-cli-build/static/chunks/app/api/mgmt/v1/combos/route-e5f03432dd0bcd61.js +1 -0
  906. package/app/.next-cli-build/static/chunks/app/api/mgmt/v1/health/route-e5f03432dd0bcd61.js +1 -0
  907. package/app/.next-cli-build/static/chunks/app/api/mgmt/v1/metrics/route-e5f03432dd0bcd61.js +1 -0
  908. package/app/.next-cli-build/static/chunks/app/api/mgmt/v1/providers/route-e5f03432dd0bcd61.js +1 -0
  909. package/app/.next-cli-build/static/chunks/app/api/mgmt/v1/routing/route-e5f03432dd0bcd61.js +1 -0
  910. package/app/.next-cli-build/static/chunks/app/api/mgmt/v1/usage/route-e5f03432dd0bcd61.js +1 -0
  911. package/app/.next-cli-build/static/chunks/app/api/mgmt/v1/version/route-e5f03432dd0bcd61.js +1 -0
  912. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-e5f03432dd0bcd61.js +1 -0
  913. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-e5f03432dd0bcd61.js +1 -0
  914. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-e5f03432dd0bcd61.js +1 -0
  915. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-e5f03432dd0bcd61.js +1 -0
  916. package/app/.next-cli-build/static/chunks/app/api/models/route-e5f03432dd0bcd61.js +1 -0
  917. package/app/.next-cli-build/static/chunks/app/api/models/test/route-e5f03432dd0bcd61.js +1 -0
  918. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-e5f03432dd0bcd61.js +1 -0
  919. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-e5f03432dd0bcd61.js +1 -0
  920. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-e5f03432dd0bcd61.js +1 -0
  921. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-e5f03432dd0bcd61.js +1 -0
  922. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-e5f03432dd0bcd61.js +1 -0
  923. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-e5f03432dd0bcd61.js +1 -0
  924. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-e5f03432dd0bcd61.js +1 -0
  925. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-e5f03432dd0bcd61.js +1 -0
  926. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-e5f03432dd0bcd61.js +1 -0
  927. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-e5f03432dd0bcd61.js +1 -0
  928. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-e5f03432dd0bcd61.js +1 -0
  929. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-e5f03432dd0bcd61.js +1 -0
  930. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-e5f03432dd0bcd61.js +1 -0
  931. package/app/.next-cli-build/static/chunks/app/api/pricing/route-e5f03432dd0bcd61.js +1 -0
  932. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-e5f03432dd0bcd61.js +1 -0
  933. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-e5f03432dd0bcd61.js +1 -0
  934. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-e5f03432dd0bcd61.js +1 -0
  935. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/model-probes/batch/route-e5f03432dd0bcd61.js +1 -0
  936. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/model-probes/cache/route-e5f03432dd0bcd61.js +1 -0
  937. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/model-probes/prepare/route-e5f03432dd0bcd61.js +1 -0
  938. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/model-probes/remove-unavailable/route-e5f03432dd0bcd61.js +1 -0
  939. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/model-probes/route-e5f03432dd0bcd61.js +1 -0
  940. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/model-probes/verify/cancel/route-e5f03432dd0bcd61.js +1 -0
  941. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/model-probes/verify/start/route-e5f03432dd0bcd61.js +1 -0
  942. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/model-probes/verify/status/route-e5f03432dd0bcd61.js +1 -0
  943. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-e5f03432dd0bcd61.js +1 -0
  944. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-e5f03432dd0bcd61.js +1 -0
  945. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-e5f03432dd0bcd61.js +1 -0
  946. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-e5f03432dd0bcd61.js +1 -0
  947. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-e5f03432dd0bcd61.js +1 -0
  948. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-e5f03432dd0bcd61.js +1 -0
  949. package/app/.next-cli-build/static/chunks/app/api/providers/route-e5f03432dd0bcd61.js +1 -0
  950. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-e5f03432dd0bcd61.js +1 -0
  951. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-e5f03432dd0bcd61.js +1 -0
  952. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-e5f03432dd0bcd61.js +1 -0
  953. package/app/.next-cli-build/static/chunks/app/api/pxpipe/health/route-e5f03432dd0bcd61.js +1 -0
  954. package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-e5f03432dd0bcd61.js +1 -0
  955. package/app/.next-cli-build/static/chunks/app/api/pxpipe/logs/route-e5f03432dd0bcd61.js +1 -0
  956. package/app/.next-cli-build/static/chunks/app/api/pxpipe/restart/route-e5f03432dd0bcd61.js +1 -0
  957. package/app/.next-cli-build/static/chunks/app/api/pxpipe/start/route-e5f03432dd0bcd61.js +1 -0
  958. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stats/route-e5f03432dd0bcd61.js +1 -0
  959. package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-e5f03432dd0bcd61.js +1 -0
  960. package/app/.next-cli-build/static/chunks/app/api/pxpipe/stop/route-e5f03432dd0bcd61.js +1 -0
  961. package/app/.next-cli-build/static/chunks/app/api/routing/feedback/route-e5f03432dd0bcd61.js +1 -0
  962. package/app/.next-cli-build/static/chunks/app/api/routing/insights/route-e5f03432dd0bcd61.js +1 -0
  963. package/app/.next-cli-build/static/chunks/app/api/routing/learn/route-e5f03432dd0bcd61.js +1 -0
  964. package/app/.next-cli-build/static/chunks/app/api/routing/stats/route-e5f03432dd0bcd61.js +1 -0
  965. package/app/.next-cli-build/static/chunks/app/api/routing/versions/promote/route-e5f03432dd0bcd61.js +1 -0
  966. package/app/.next-cli-build/static/chunks/app/api/routing/versions/rollback/route-e5f03432dd0bcd61.js +1 -0
  967. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-e5f03432dd0bcd61.js +1 -0
  968. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-e5f03432dd0bcd61.js +1 -0
  969. package/app/.next-cli-build/static/chunks/app/api/settings/route-e5f03432dd0bcd61.js +1 -0
  970. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-e5f03432dd0bcd61.js +1 -0
  971. package/app/.next-cli-build/static/chunks/app/api/skills/[id]/route-e5f03432dd0bcd61.js +1 -0
  972. package/app/.next-cli-build/static/chunks/app/api/tags/route-e5f03432dd0bcd61.js +1 -0
  973. package/app/.next-cli-build/static/chunks/app/api/token-saver/vault-stats/route-e5f03432dd0bcd61.js +1 -0
  974. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-e5f03432dd0bcd61.js +1 -0
  975. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-e5f03432dd0bcd61.js +1 -0
  976. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-e5f03432dd0bcd61.js +1 -0
  977. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-e5f03432dd0bcd61.js +1 -0
  978. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-e5f03432dd0bcd61.js +1 -0
  979. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-e5f03432dd0bcd61.js +1 -0
  980. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-e5f03432dd0bcd61.js +1 -0
  981. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-e5f03432dd0bcd61.js +1 -0
  982. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-e5f03432dd0bcd61.js +1 -0
  983. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-e5f03432dd0bcd61.js +1 -0
  984. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-e5f03432dd0bcd61.js +1 -0
  985. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-e5f03432dd0bcd61.js +1 -0
  986. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-e5f03432dd0bcd61.js +1 -0
  987. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-e5f03432dd0bcd61.js +1 -0
  988. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-e5f03432dd0bcd61.js +1 -0
  989. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-e5f03432dd0bcd61.js +1 -0
  990. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-e5f03432dd0bcd61.js +1 -0
  991. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-e5f03432dd0bcd61.js +1 -0
  992. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-e5f03432dd0bcd61.js +1 -0
  993. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-e5f03432dd0bcd61.js +1 -0
  994. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-e5f03432dd0bcd61.js +1 -0
  995. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-e5f03432dd0bcd61.js +1 -0
  996. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-e5f03432dd0bcd61.js +1 -0
  997. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-e5f03432dd0bcd61.js +1 -0
  998. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-e5f03432dd0bcd61.js +1 -0
  999. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-e5f03432dd0bcd61.js +1 -0
  1000. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-e5f03432dd0bcd61.js +1 -0
  1001. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-e5f03432dd0bcd61.js +1 -0
  1002. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-e5f03432dd0bcd61.js +1 -0
  1003. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-e5f03432dd0bcd61.js +1 -0
  1004. package/app/.next-cli-build/static/chunks/app/api/v1/route-e5f03432dd0bcd61.js +1 -0
  1005. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-e5f03432dd0bcd61.js +1 -0
  1006. package/app/.next-cli-build/static/chunks/app/api/v1/videos/[id]/route-e5f03432dd0bcd61.js +1 -0
  1007. package/app/.next-cli-build/static/chunks/app/api/v1/videos/edits/route-e5f03432dd0bcd61.js +1 -0
  1008. package/app/.next-cli-build/static/chunks/app/api/v1/videos/extensions/route-e5f03432dd0bcd61.js +1 -0
  1009. package/app/.next-cli-build/static/chunks/app/api/v1/videos/generations/route-e5f03432dd0bcd61.js +1 -0
  1010. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-e5f03432dd0bcd61.js +1 -0
  1011. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-e5f03432dd0bcd61.js +1 -0
  1012. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-e5f03432dd0bcd61.js +1 -0
  1013. package/app/.next-cli-build/static/chunks/app/api/version/route-e5f03432dd0bcd61.js +1 -0
  1014. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-e5f03432dd0bcd61.js +1 -0
  1015. package/app/.next-cli-build/static/chunks/app/api/version/update/route-e5f03432dd0bcd61.js +1 -0
  1016. package/app/.next-cli-build/static/chunks/app/dashboard/settings/pricing/page-423a4c1e078872dd.js +1 -0
  1017. package/app/.next-cli-build/static/chunks/app/login/page-e5f03432dd0bcd61.js +1 -0
  1018. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-e5f03432dd0bcd61.js +1 -0
  1019. package/app/.next-cli-build/static/chunks/app/page-e5f03432dd0bcd61.js +1 -0
  1020. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-e5f03432dd0bcd61.js +1 -0
  1021. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-e5f03432dd0bcd61.js +1 -0
  1022. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-e5f03432dd0bcd61.js +1 -0
  1023. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-e5f03432dd0bcd61.js +1 -0
  1024. package/app/.next-cli-build/static/css/23b999cda6943547.css +1 -0
  1025. package/app/custom-server.js +63 -2
  1026. package/app/node_modules/impit/CHANGELOG.md +545 -0
  1027. package/app/node_modules/impit/README.md +62 -0
  1028. package/app/node_modules/impit/dts-header.d.ts +36 -0
  1029. package/app/node_modules/impit/errors.js +117 -0
  1030. package/app/node_modules/impit/index.d.ts +431 -0
  1031. package/app/node_modules/impit/index.js +583 -0
  1032. package/app/node_modules/impit/index.wrapper.js +504 -0
  1033. package/app/node_modules/impit/package.json +66 -0
  1034. package/app/node_modules/impit/pnpm-workspace.yaml +15 -0
  1035. package/app/node_modules/impit/tsconfig.docs.json +6 -0
  1036. package/app/node_modules/impit-linux-x64-gnu/README.md +3 -0
  1037. package/app/node_modules/impit-linux-x64-gnu/impit-node.linux-x64-gnu.node +0 -0
  1038. package/app/node_modules/impit-linux-x64-gnu/package.json +24 -0
  1039. package/app/open-sse/identity/snapshots/versions.json +20 -0
  1040. package/app/open-sse/identity/tls/bin/darwin/arm64/switchboard-claude-tls +0 -0
  1041. package/app/open-sse/identity/tls/bin/darwin/x64/switchboard-claude-tls +0 -0
  1042. package/app/open-sse/identity/tls/bin/linux/arm64/switchboard-claude-tls +0 -0
  1043. package/app/open-sse/identity/tls/bin/linux/x64/switchboard-claude-tls +0 -0
  1044. package/app/open-sse/identity/tls/bin/win32/arm64/switchboard-claude-tls.exe +0 -0
  1045. package/app/open-sse/identity/tls/bin/win32/x64/switchboard-claude-tls.exe +0 -0
  1046. package/app/package.json +9 -3
  1047. package/app/server.js +1 -1
  1048. package/app/src/lib/db/adapters/betterSqliteAdapter.js +12 -6
  1049. package/app/src/lib/db/adapters/bunSqliteAdapter.js +11 -6
  1050. package/app/src/lib/db/adapters/nodeSqliteAdapter.js +11 -6
  1051. package/app/src/lib/db/adapters/sqljsAdapter.js +12 -5
  1052. package/app/src/lib/db/migrate.js +167 -22
  1053. package/app/src/lib/oauth/services/qoder.js +8 -1
  1054. package/app/src/lib/oauth/services/xai.js +11 -3
  1055. package/cli.js +14 -0
  1056. package/package.json +10 -2
  1057. package/src/cli/cliOptions.js +3 -0
  1058. package/src/cli/commands/xaiVideo.js +300 -0
  1059. package/src/cli/menus/apiKeys.js +7 -49
  1060. package/src/cli/menus/cliTools.js +4 -5
  1061. package/src/cli/terminalUI.js +2 -2
  1062. package/src/cli/utils/input.js +40 -0
  1063. package/app/.next-cli-build/server/chunks/1064.js +0 -104
  1064. package/app/.next-cli-build/server/chunks/1421.js +0 -1
  1065. package/app/.next-cli-build/server/chunks/2925.js +0 -1
  1066. package/app/.next-cli-build/server/chunks/3535.js +0 -1
  1067. package/app/.next-cli-build/server/chunks/4776.js +0 -33
  1068. package/app/.next-cli-build/server/chunks/615.js +0 -1
  1069. package/app/.next-cli-build/server/chunks/6448.js +0 -109
  1070. package/app/.next-cli-build/server/chunks/65.js +0 -1
  1071. package/app/.next-cli-build/server/chunks/7335.js +0 -1
  1072. package/app/.next-cli-build/server/chunks/7374.js +0 -2
  1073. package/app/.next-cli-build/server/chunks/8718.js +0 -1
  1074. package/app/.next-cli-build/server/chunks/9046.js +0 -1
  1075. package/app/.next-cli-build/server/chunks/9062.js +0 -104
  1076. package/app/.next-cli-build/server/chunks/9489.js +0 -8
  1077. package/app/.next-cli-build/server/chunks/9696.js +0 -7
  1078. package/app/.next-cli-build/static/_G05wV0ToAcQtfhzFIbzm/_buildManifest.js +0 -1
  1079. package/app/.next-cli-build/static/chunks/1321-91e485d6232fe450.js +0 -1
  1080. package/app/.next-cli-build/static/chunks/3531-5066ce0b15cf43af.js +0 -68
  1081. package/app/.next-cli-build/static/chunks/5497-0cbb034d03b47b7c.js +0 -7
  1082. package/app/.next-cli-build/static/chunks/7592-bbf465c7acd2478e.js +0 -1
  1083. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/agent-library/page-62bea7b75b3f2692.js +0 -1
  1084. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/basic-chat/page-1eb380280857cf20.js +0 -1
  1085. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-4bf0abe7c7119ac0.js +0 -1
  1086. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/page-fdc5377da12ec933.js +0 -1
  1087. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-b48bd39cb03c4985.js +0 -3
  1088. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page-9e60537a4b8f5a0c.js +0 -59
  1089. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/combo/[id]/page-45ebe6bb46c9f65e.js +0 -4
  1090. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/page-7ac82c8930583633.js +0 -1
  1091. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-27ae229b00137a0b.js +0 -1
  1092. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-463c649c2ddabc82.js +0 -10
  1093. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/new/page-fe7ccc9c117d7d38.js +0 -1
  1094. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-5ac3900baf3fe9ca.js +0 -1
  1095. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/page-1b2b6b736fe98698.js +0 -1
  1096. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/translator/page-92fe95bd4e6b3d0a.js +0 -1
  1097. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/page-4c47b9660f3066e2.js +0 -1
  1098. package/app/.next-cli-build/static/chunks/app/_global-error/page-596c1bc92adc4d71.js +0 -1
  1099. package/app/.next-cli-build/static/chunks/app/api/agent-library/catalog/route-596c1bc92adc4d71.js +0 -1
  1100. package/app/.next-cli-build/static/chunks/app/api/agent-library/doctor/route-596c1bc92adc4d71.js +0 -1
  1101. package/app/.next-cli-build/static/chunks/app/api/agent-library/export/route-596c1bc92adc4d71.js +0 -1
  1102. package/app/.next-cli-build/static/chunks/app/api/agent-library/mcp/route-596c1bc92adc4d71.js +0 -1
  1103. package/app/.next-cli-build/static/chunks/app/api/agent-library/route-596c1bc92adc4d71.js +0 -1
  1104. package/app/.next-cli-build/static/chunks/app/api/agent-library/skills/route-596c1bc92adc4d71.js +0 -1
  1105. package/app/.next-cli-build/static/chunks/app/api/agent-library/sync/route-596c1bc92adc4d71.js +0 -1
  1106. package/app/.next-cli-build/static/chunks/app/api/agent-library/updates/route-596c1bc92adc4d71.js +0 -1
  1107. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-596c1bc92adc4d71.js +0 -1
  1108. package/app/.next-cli-build/static/chunks/app/api/cli-tools/aider-settings/route-596c1bc92adc4d71.js +0 -1
  1109. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-596c1bc92adc4d71.js +0 -1
  1110. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-596c1bc92adc4d71.js +0 -1
  1111. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-596c1bc92adc4d71.js +0 -1
  1112. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-full-catalog/route-596c1bc92adc4d71.js +0 -1
  1113. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-picker-labels/route-596c1bc92adc4d71.js +0 -1
  1114. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-596c1bc92adc4d71.js +0 -1
  1115. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-596c1bc92adc4d71.js +0 -1
  1116. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-596c1bc92adc4d71.js +0 -1
  1117. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-596c1bc92adc4d71.js +0 -1
  1118. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-596c1bc92adc4d71.js +0 -1
  1119. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-596c1bc92adc4d71.js +0 -1
  1120. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-596c1bc92adc4d71.js +0 -1
  1121. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-596c1bc92adc4d71.js +0 -1
  1122. package/app/.next-cli-build/static/chunks/app/api/cli-tools/gemini-cli-settings/route-596c1bc92adc4d71.js +0 -1
  1123. package/app/.next-cli-build/static/chunks/app/api/cli-tools/grok-settings/route-596c1bc92adc4d71.js +0 -1
  1124. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-596c1bc92adc4d71.js +0 -1
  1125. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-596c1bc92adc4d71.js +0 -1
  1126. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-596c1bc92adc4d71.js +0 -1
  1127. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-596c1bc92adc4d71.js +0 -1
  1128. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-596c1bc92adc4d71.js +0 -1
  1129. package/app/.next-cli-build/static/chunks/app/api/cli-tools/pi-settings/route-596c1bc92adc4d71.js +0 -1
  1130. package/app/.next-cli-build/static/chunks/app/api/cli-tools/picker-labels/route-596c1bc92adc4d71.js +0 -1
  1131. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-596c1bc92adc4d71.js +0 -1
  1132. package/app/.next-cli-build/static/chunks/app/api/combos/route-596c1bc92adc4d71.js +0 -1
  1133. package/app/.next-cli-build/static/chunks/app/api/headroom/proxy/[...path]/route-596c1bc92adc4d71.js +0 -1
  1134. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-596c1bc92adc4d71.js +0 -1
  1135. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-596c1bc92adc4d71.js +0 -1
  1136. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-596c1bc92adc4d71.js +0 -1
  1137. package/app/.next-cli-build/static/chunks/app/api/health/route-596c1bc92adc4d71.js +0 -1
  1138. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-596c1bc92adc4d71.js +0 -1
  1139. package/app/.next-cli-build/static/chunks/app/api/keys/route-596c1bc92adc4d71.js +0 -1
  1140. package/app/.next-cli-build/static/chunks/app/api/locale/route-596c1bc92adc4d71.js +0 -1
  1141. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-596c1bc92adc4d71.js +0 -1
  1142. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-596c1bc92adc4d71.js +0 -1
  1143. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-596c1bc92adc4d71.js +0 -1
  1144. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-596c1bc92adc4d71.js +0 -1
  1145. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-596c1bc92adc4d71.js +0 -1
  1146. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-596c1bc92adc4d71.js +0 -1
  1147. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-596c1bc92adc4d71.js +0 -1
  1148. package/app/.next-cli-build/static/chunks/app/api/mgmt/v1/combos/[id]/route-596c1bc92adc4d71.js +0 -1
  1149. package/app/.next-cli-build/static/chunks/app/api/mgmt/v1/combos/[id]/strategy/route-596c1bc92adc4d71.js +0 -1
  1150. package/app/.next-cli-build/static/chunks/app/api/mgmt/v1/combos/route-596c1bc92adc4d71.js +0 -1
  1151. package/app/.next-cli-build/static/chunks/app/api/mgmt/v1/health/route-596c1bc92adc4d71.js +0 -1
  1152. package/app/.next-cli-build/static/chunks/app/api/mgmt/v1/providers/route-596c1bc92adc4d71.js +0 -1
  1153. package/app/.next-cli-build/static/chunks/app/api/mgmt/v1/routing/route-596c1bc92adc4d71.js +0 -1
  1154. package/app/.next-cli-build/static/chunks/app/api/mgmt/v1/usage/route-596c1bc92adc4d71.js +0 -1
  1155. package/app/.next-cli-build/static/chunks/app/api/mgmt/v1/version/route-596c1bc92adc4d71.js +0 -1
  1156. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-596c1bc92adc4d71.js +0 -1
  1157. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-596c1bc92adc4d71.js +0 -1
  1158. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-596c1bc92adc4d71.js +0 -1
  1159. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-596c1bc92adc4d71.js +0 -1
  1160. package/app/.next-cli-build/static/chunks/app/api/models/route-596c1bc92adc4d71.js +0 -1
  1161. package/app/.next-cli-build/static/chunks/app/api/models/test/route-596c1bc92adc4d71.js +0 -1
  1162. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-596c1bc92adc4d71.js +0 -1
  1163. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-596c1bc92adc4d71.js +0 -1
  1164. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-596c1bc92adc4d71.js +0 -1
  1165. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-596c1bc92adc4d71.js +0 -1
  1166. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-596c1bc92adc4d71.js +0 -1
  1167. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-596c1bc92adc4d71.js +0 -1
  1168. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-596c1bc92adc4d71.js +0 -1
  1169. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-596c1bc92adc4d71.js +0 -1
  1170. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-596c1bc92adc4d71.js +0 -1
  1171. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-596c1bc92adc4d71.js +0 -1
  1172. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-596c1bc92adc4d71.js +0 -1
  1173. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-596c1bc92adc4d71.js +0 -1
  1174. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-596c1bc92adc4d71.js +0 -1
  1175. package/app/.next-cli-build/static/chunks/app/api/pricing/route-596c1bc92adc4d71.js +0 -1
  1176. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-596c1bc92adc4d71.js +0 -1
  1177. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-596c1bc92adc4d71.js +0 -1
  1178. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-596c1bc92adc4d71.js +0 -1
  1179. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/model-probes/batch/route-596c1bc92adc4d71.js +0 -1
  1180. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/model-probes/cache/route-596c1bc92adc4d71.js +0 -1
  1181. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/model-probes/prepare/route-596c1bc92adc4d71.js +0 -1
  1182. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/model-probes/remove-unavailable/route-596c1bc92adc4d71.js +0 -1
  1183. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/model-probes/route-596c1bc92adc4d71.js +0 -1
  1184. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/model-probes/verify/cancel/route-596c1bc92adc4d71.js +0 -1
  1185. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/model-probes/verify/start/route-596c1bc92adc4d71.js +0 -1
  1186. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/model-probes/verify/status/route-596c1bc92adc4d71.js +0 -1
  1187. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-596c1bc92adc4d71.js +0 -1
  1188. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-596c1bc92adc4d71.js +0 -1
  1189. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-596c1bc92adc4d71.js +0 -1
  1190. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-596c1bc92adc4d71.js +0 -1
  1191. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-596c1bc92adc4d71.js +0 -1
  1192. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-596c1bc92adc4d71.js +0 -1
  1193. package/app/.next-cli-build/static/chunks/app/api/providers/route-596c1bc92adc4d71.js +0 -1
  1194. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-596c1bc92adc4d71.js +0 -1
  1195. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-596c1bc92adc4d71.js +0 -1
  1196. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-596c1bc92adc4d71.js +0 -1
  1197. package/app/.next-cli-build/static/chunks/app/api/routing/feedback/route-596c1bc92adc4d71.js +0 -1
  1198. package/app/.next-cli-build/static/chunks/app/api/routing/insights/route-596c1bc92adc4d71.js +0 -1
  1199. package/app/.next-cli-build/static/chunks/app/api/routing/learn/route-596c1bc92adc4d71.js +0 -1
  1200. package/app/.next-cli-build/static/chunks/app/api/routing/stats/route-596c1bc92adc4d71.js +0 -1
  1201. package/app/.next-cli-build/static/chunks/app/api/routing/versions/promote/route-596c1bc92adc4d71.js +0 -1
  1202. package/app/.next-cli-build/static/chunks/app/api/routing/versions/rollback/route-596c1bc92adc4d71.js +0 -1
  1203. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-596c1bc92adc4d71.js +0 -1
  1204. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-596c1bc92adc4d71.js +0 -1
  1205. package/app/.next-cli-build/static/chunks/app/api/settings/route-596c1bc92adc4d71.js +0 -1
  1206. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-596c1bc92adc4d71.js +0 -1
  1207. package/app/.next-cli-build/static/chunks/app/api/skills/[id]/route-596c1bc92adc4d71.js +0 -1
  1208. package/app/.next-cli-build/static/chunks/app/api/tags/route-596c1bc92adc4d71.js +0 -1
  1209. package/app/.next-cli-build/static/chunks/app/api/token-saver/vault-stats/route-596c1bc92adc4d71.js +0 -1
  1210. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-596c1bc92adc4d71.js +0 -1
  1211. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-596c1bc92adc4d71.js +0 -1
  1212. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-596c1bc92adc4d71.js +0 -1
  1213. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-596c1bc92adc4d71.js +0 -1
  1214. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-596c1bc92adc4d71.js +0 -1
  1215. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-596c1bc92adc4d71.js +0 -1
  1216. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-596c1bc92adc4d71.js +0 -1
  1217. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-596c1bc92adc4d71.js +0 -1
  1218. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-596c1bc92adc4d71.js +0 -1
  1219. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-596c1bc92adc4d71.js +0 -1
  1220. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-596c1bc92adc4d71.js +0 -1
  1221. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-596c1bc92adc4d71.js +0 -1
  1222. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-596c1bc92adc4d71.js +0 -1
  1223. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-596c1bc92adc4d71.js +0 -1
  1224. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-596c1bc92adc4d71.js +0 -1
  1225. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-596c1bc92adc4d71.js +0 -1
  1226. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-596c1bc92adc4d71.js +0 -1
  1227. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-596c1bc92adc4d71.js +0 -1
  1228. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-596c1bc92adc4d71.js +0 -1
  1229. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-596c1bc92adc4d71.js +0 -1
  1230. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-596c1bc92adc4d71.js +0 -1
  1231. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-596c1bc92adc4d71.js +0 -1
  1232. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-596c1bc92adc4d71.js +0 -1
  1233. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-596c1bc92adc4d71.js +0 -1
  1234. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-596c1bc92adc4d71.js +0 -1
  1235. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-596c1bc92adc4d71.js +0 -1
  1236. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-596c1bc92adc4d71.js +0 -1
  1237. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-596c1bc92adc4d71.js +0 -1
  1238. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-596c1bc92adc4d71.js +0 -1
  1239. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-596c1bc92adc4d71.js +0 -1
  1240. package/app/.next-cli-build/static/chunks/app/api/v1/route-596c1bc92adc4d71.js +0 -1
  1241. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-596c1bc92adc4d71.js +0 -1
  1242. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-596c1bc92adc4d71.js +0 -1
  1243. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-596c1bc92adc4d71.js +0 -1
  1244. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-596c1bc92adc4d71.js +0 -1
  1245. package/app/.next-cli-build/static/chunks/app/api/version/route-596c1bc92adc4d71.js +0 -1
  1246. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-596c1bc92adc4d71.js +0 -1
  1247. package/app/.next-cli-build/static/chunks/app/api/version/update/route-596c1bc92adc4d71.js +0 -1
  1248. package/app/.next-cli-build/static/chunks/app/dashboard/settings/pricing/page-3414584e4d85b11f.js +0 -1
  1249. package/app/.next-cli-build/static/chunks/app/login/page-596c1bc92adc4d71.js +0 -1
  1250. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-596c1bc92adc4d71.js +0 -1
  1251. package/app/.next-cli-build/static/chunks/app/page-596c1bc92adc4d71.js +0 -1
  1252. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-596c1bc92adc4d71.js +0 -1
  1253. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-596c1bc92adc4d71.js +0 -1
  1254. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-596c1bc92adc4d71.js +0 -1
  1255. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-596c1bc92adc4d71.js +0 -1
  1256. package/app/.next-cli-build/static/css/8f209feb703c674d.css +0 -1
  1257. /package/app/.next-cli-build/static/{_G05wV0ToAcQtfhzFIbzm → LW9zpYBdABYCFKEJUiC4B}/_ssgManifest.js +0 -0
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6897],{5194:(e,t,s)=>{Promise.resolve().then(s.bind(s,94091))},94091:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>i});var a=s(95155),r=s(12115),l=s(35497),n=s(77251);function i(){let[e,t]=(0,r.useState)(null),[s,i]=(0,r.useState)(!0),[o,c]=(0,r.useState)(""),[x,m]=(0,r.useState)(null),[p,h]=(0,r.useState)(null),[u,b]=(0,r.useState)(null),[y,g]=(0,r.useState)("overview"),[f,j]=(0,r.useState)({id:"",name:"",transport:"stdio",command:"npx",args:"-y @modelcontextprotocol/server-filesystem .",url:"",notes:""}),[v,w]=(0,r.useState)([]),[k,N]=(0,r.useState)(""),[C,S]=(0,r.useState)(""),[P,$]=(0,r.useState)(""),[O,T]=(0,r.useState)(!1),[E,M]=(0,r.useState)(""),[I,z]=(0,r.useState)(""),[A,L]=(0,r.useState)({}),[Z,U]=(0,r.useState)(null),[D,R]=(0,r.useState)(!1),[J,_]=(0,r.useState)(""),H=(0,r.useCallback)(async()=>{i(!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{i(!1)}},[]),K=(0,r.useCallback)(async()=>{try{let e=await fetch("/api/agent-library/updates",{cache:"no-store"}),t=await e.json();if(!e.ok)return;let s={};for(let e of t.results||[])s[e.id]=e;L(s)}catch{}},[]);(0,r.useEffect)(()=>{H(),K(),fetch("/api/agent-library/catalog").then(e=>e.json()).then(e=>w(e.presets||[])).catch(()=>{})},[H,K]);let F=e?.settings||{},G=e?.agents||{};async function W(e){c("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 H()}catch(e){m({type:"error",text:e.message})}finally{c("")}}async function B(e){c(e),m(null),b(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");b(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 H()}catch(e){m({type:"error",text:e.message})}finally{c("")}}async function Y(){c("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");h(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{c("")}}async function q(e){e?.preventDefault?.(),c("mcp");try{let e=f.args?f.args.split(/\s+/).filter(Boolean):[],t=await fetch("/api/agent-library/mcp",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:f.id,name:f.name||f.id,transport:f.transport,command:"stdio"===f.transport?f.command:void 0,args:"stdio"===f.transport?e:void 0,url:"stdio"!==f.transport?f.url:void 0,notes:f.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)`}),j({id:"",name:"",transport:"stdio",command:"npx",args:"",url:"",notes:""}),await H()}catch(e){m({type:"error",text:e.message})}finally{c("")}}async function Q(e){if(await (0,n.l)({message:`Remove MCP ${e} from library? (targets updated on next Apply)`,confirmText:"Continue"})){c("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 H()}catch(e){m({type:"error",text:e.message})}finally{c("")}}}async function V(e){if(await (0,n.l)({message:`Remove skill ${e} from library?`,confirmText:"Continue"})){c("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 H(),await K()}catch(e){m({type:"error",text:e.message})}finally{c("")}}}async function X(){c("skill-add");try{let e=await fetch("/api/agent-library/skills",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:E,markdown:I,source:"manual"})}),t=await e.json();if(!e.ok)throw Error(t.error);m({type:"success",text:`Skill ${t.id} installed in library`}),M(""),z(""),await H()}catch(e){m({type:"error",text:e.message})}finally{c("")}}async function ee(e){c("upd-preview"),R(!1);try{let t=await fetch("/api/agent-library/updates",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"preview",skillId:e})}),s=await t.json();if(!t.ok||!s.ok)throw Error(s.message||s.error||"Preview failed");U({id:e,markdown:s.markdown,contentHash:s.contentHash})}catch(e){m({type:"error",text:e.message})}finally{c("")}}async function et(){if(Z){c("upd-apply");try{let e=await fetch("/api/agent-library/updates",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"update",skillId:Z.id,confirmed:D,expectedHash:Z.contentHash})}),t=await e.json();if(!e.ok||!t.ok)throw Error(t.message||t.error||"Update failed");m({type:"success",text:t.warning||`Updated ${t.id}`}),U(null),R(!1),await H(),await K()}catch(e){m({type:"error",text:e.message})}finally{c("")}}}async function es(e){c("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");$(s.preview||""),m({type:"success",text:`Preview loaded (${s.bytes} bytes)`})}catch(e){m({type:"error",text:e.message})}finally{c("")}}async function ea(){c("catalog");try{let e=await fetch("/api/agent-library/catalog",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"install",skillId:C,url:k,confirmed:O})}),t=await e.json();if(!e.ok)throw Error(t.message||t.error||"Install failed");m({type:"success",text:t.warning||`Installed ${t.id}`}),T(!1),await H(),await K()}catch(e){m({type:"error",text:e.message})}finally{c("")}}async function er(){c("export");try{let e=await fetch("/api/agent-library/export",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({destPath:J||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{c("")}}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."]})]}),x&&(0,a.jsx)("div",{className:`text-xs px-3 py-2 rounded-lg border ${"success"===x.type?"bg-green-500/10 border-green-500/30 text-green-600 dark:text-green-400":"warn"===x.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:x.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!==F.enabled,disabled:!!o,onChange:e=>W({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:!!o||!1===F.enabled,loading:"dry-run"===o,onClick:()=>B("dry-run"),children:"Dry-run"}),(0,a.jsx)(l.$n,{size:"sm",disabled:!!o||!1===F.enabled,loading:"apply"===o,onClick:()=>B("apply"),children:"Apply sync"}),(0,a.jsx)(l.$n,{size:"sm",variant:"outline",disabled:!!o,loading:"doctor"===o,onClick:Y,children:"Doctor"})]})]}),(0,a.jsxs)("p",{className:"text-[11px] text-text-subtle mt-2 font-mono break-all",children:["Library: ",e?.libraryRoot||"…",F.linkMode?` \xb7 mode=${F.linkMode}`:"",F.scope?` \xb7 scope=${F.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:()=>g(e.id),className:`px-3 py-2 text-xs font-medium rounded-t-md transition-colors ${y===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"===y&&(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(G).map(e=>{let t=F.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||!!o,onChange:s=>W({targets:{...F.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||!!o,onChange:s=>W({targets:{...F.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:F.linkMode||"copy",disabled:!!o,onChange:e=>W({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:F.scope||"global",disabled:!!o,onChange:e=>W({scope:e.target.value,projectPath:"project"===e.target.value?F.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"===F.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:F.projectPath||"",placeholder:"/Users/you/my-app",disabled:!!o,onChange:e=>W({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!==F.neverOverwriteUser,disabled:!!o,onChange:async e=>{e.target.checked?W({neverOverwriteUser:!0}):await (0,n.l)({message:"Allow overwriting paths that are NOT Switchboard-managed? This can replace your personal skills/MCP. Continue?",confirmText:"Continue"})&&W({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!==F.includeProductSkills,disabled:!!o,onChange:e=>W({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)(d,{label:"Skills in library",value:String(e?.skills?.length??0)}),(0,a.jsx)(d,{label:"MCP servers",value:String(e?.mcpServers?.length??0)}),(0,a.jsx)(d,{label:"Last sync",value:e?.state?.lastSync?.at?new Date(e.state.lastSync.at).toLocaleString():"—"})]}),u&&(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(u.summary||u,null,2)}),u.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:u.skills.filter(e=>"conflict"===e.action).map((e,t)=>(0,a.jsxs)("li",{children:[e.agent,"/",e.skillId,": ",e.message||e.reason]},t))})]})]}),p&&(0,a.jsxs)(l.Zp,{padding:"md",children:[(0,a.jsx)("h2",{className:"text-sm font-semibold text-text-main mb-2",children:"Doctor"}),p.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:p.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"===y&&(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.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(l.$n,{size:"sm",variant:"ghost",disabled:!!o,onClick:async()=>{c("upd-check");try{await K(),m({type:"success",text:"Update check complete"})}finally{c("")}},children:"Check updates"}),(0,a.jsx)(l.$n,{size:"sm",variant:"secondary",disabled:!!o,onClick:async()=>{c("ensure");try{await fetch("/api/agent-library/skills",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"ensure_product"})}),await H(),m({type:"success",text:"Product skills ensured"})}finally{c("")}},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]})}),A[e.id]?.status==="update"&&(0,a.jsx)(l.Ex,{size:"sm",variant:"warning",children:"update available"}),A[e.id]?.status==="error"&&(0,a.jsx)("span",{className:"text-[10px] text-text-subtle",title:A[e.id]?.message||"check failed",children:"check failed"})]}),(0,a.jsx)("p",{className:"text-[11px] text-text-muted mt-0.5 line-clamp-2",children:e.description||"—"})]}),(0,a.jsxs)("div",{className:"flex gap-1 shrink-0",children:[A[e.id]?.status==="update"&&(0,a.jsx)(l.$n,{size:"sm",variant:"secondary",disabled:!!o,loading:"upd-preview"===o&&Z?.id!==e.id,onClick:()=>ee(e.id),children:"Update"}),(0,a.jsx)(l.$n,{size:"sm",variant:"ghost",disabled:!!o,onClick:()=>V(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."})]})]}),Z&&(0,a.jsxs)(l.Zp,{padding:"md",children:[(0,a.jsxs)("h2",{className:"text-sm font-semibold text-text-main mb-2",children:["Update preview — ",(0,a.jsx)("code",{className:"text-[12px]",children:Z.id})]}),(0,a.jsx)("p",{className:"text-[11px] text-text-subtle mb-2",children:"Full incoming SKILL.md shown below. Exactly these bytes are installed on confirm — if upstream changes in between, the update is refused and you preview again."}),(0,a.jsx)("pre",{className:"text-[10px] font-mono max-h-64 overflow-auto bg-surface-2 p-2 rounded border border-border-subtle whitespace-pre-wrap",children:Z.markdown}),(0,a.jsxs)("label",{className:"flex items-start gap-2 text-xs text-text-muted cursor-pointer mt-2",children:[(0,a.jsx)("input",{type:"checkbox",checked:D,onChange:e=>R(e.target.checked)}),"I reviewed this skill and understand it may instruct agents to run tools/shell commands."]}),(0,a.jsxs)("div",{className:"flex gap-2 mt-2",children:[(0,a.jsx)(l.$n,{size:"sm",disabled:!D||!!o,loading:"upd-apply"===o,onClick:et,children:"Apply update"}),(0,a.jsx)(l.$n,{size:"sm",variant:"ghost",disabled:!!o,onClick:()=>{U(null),R(!1)},children:"Cancel"})]})]}),(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=>M(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:I,onChange:e=>z(e.target.value)}),(0,a.jsx)(l.$n,{size:"sm",disabled:!E||!I||!!o,loading:"skill-add"===o,onClick:X,children:"Add to library"})]})]})]}),!s&&"mcp"===y&&(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:()=>Q(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:q,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:f.id,onChange:e=>j({...f,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:f.name,onChange:e=>j({...f,name:e.target.value})}),(0,a.jsxs)("select",{className:"bg-surface border border-border rounded-md px-2 py-1.5 text-xs",value:f.transport,onChange:e=>j({...f,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"===f.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:f.command,onChange:e=>j({...f,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:f.args,onChange:e=>j({...f,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:f.url,onChange:e=>j({...f,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"===o,disabled:!!o,children:"Save to library"})})]})]})]}),!s&&"catalog"===y&&(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:v.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:()=>{N(e.rawUrl),S(e.skillId),es(e.rawUrl)},children:"Preview"}),(0,a.jsx)(l.$n,{size:"sm",variant:"secondary",onClick:()=>{N(e.rawUrl),S(e.skillId),T(!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:C,onChange:e=>S(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:k,onChange:e=>N(e.target.value)}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:(0,a.jsx)(l.$n,{size:"sm",variant:"secondary",disabled:!k||!!o,onClick:()=>es(k),children:"Preview"})}),P&&(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:P}),(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:O,onChange:e=>T(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:!k||!C||!O||!!o,loading:"catalog"===o,onClick:ea,children:"Install into library"})]})]})]}),!s&&"advanced"===y&&(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:!!o,loading:"clean"===o,onClick:async()=>{await (0,n.l)({message:"Remove all Switchboard-managed skill/MCP projections from targets?",confirmText:"Continue"})&&B("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:J,onChange:e=>_(e.target.value)}),(0,a.jsx)(l.$n,{size:"sm",variant:"secondary",disabled:!!o,loading:"export"===o,onClick:er,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 d({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,782,8500,594,1321,7592,5497,8441,3794,7358],()=>e(e.s=5194)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4465],{55774:(e,t,r)=>{Promise.resolve().then(r.bind(r,88512))},88512:(e,t,r)=>{"use strict";r.d(t,{default:()=>w});var s=r(95155),a=r(12115),i=r(35497),l=r(28777),n=r(88105),o=r(5772);let d="basic-chat.sessions",c="basic-chat.activeSessionId",m="basic-chat.activeProviderId",u="basic-chat.draft";function p(){return globalThis.crypto?.randomUUID?globalThis.crypto.randomUUID():`chat_${Date.now()}_${Math.random().toString(16).slice(2)}`}function h(e){if("string"==typeof e)return e;if(null==e)return"";if(Array.isArray(e))return e.map(h).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 x(e=""){let t=h(e).replace(/\s+/g," ").trim();return t?t.length>52?`${t.slice(0,52).trimEnd()}…`:t:"New chat"}async function f(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 g(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 w(){let[e,t]=(0,a.useState)([]),[r,w]=(0,a.useState)(!0),[v,b]=(0,a.useState)(""),[N,y]=(0,a.useState)(()=>{try{let e=function(e,t){try{return JSON.parse(e)}catch{return t}}(globalThis.localStorage.getItem(d),[]);return Array.isArray(e)?e.map(e=>({...e,messages:Array.isArray(e.messages)?e.messages:[]})):[]}catch{return[]}}),[j,S]=(0,a.useState)(()=>globalThis.localStorage.getItem(c)||""),[I,A]=(0,a.useState)(()=>globalThis.localStorage.getItem(m)||""),[k,D]=(0,a.useState)(""),[O,$]=(0,a.useState)(()=>globalThis.localStorage.getItem(u)||""),[C,_]=(0,a.useState)([]),[M,E]=(0,a.useState)(!1),[T,U]=(0,a.useState)(""),[R,z]=(0,a.useState)(""),[q,P]=(0,a.useState)(!1),[J,B]=(0,a.useState)(!1),[F,K]=(0,a.useState)(!1),L=(0,a.useRef)(null),W=(0,a.useRef)(null),H=(0,a.useRef)(!1),Y=(0,a.useRef)(null),G=(0,a.useRef)(null);(0,a.useEffect)(()=>{P(!0)},[]),(0,a.useEffect)(()=>{let e=!1;return async function(){w(!0),b("");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([]),b("No providers connected yet."));return}let i=new Map;for(let e of a){let t=e.provider||e.id,r=g(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:g(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:g(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&&b("Providers connected but no models available."))}catch(r){e||(b(h(r?.message)||"Failed to load providers/models."),t([]))}finally{e||w(!1)}}(),()=>{e=!0}},[]),(0,a.useEffect)(()=>{let e=e=>{Y.current&&!Y.current.contains(e.target)&&B(!1),G.current&&!G.current.contains(e.target)&&K(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]);let Q=(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]),V=(0,a.useMemo)(()=>e.find(e=>e.providerId===I)||e[0]||null,[e,I]),X=(0,a.useMemo)(()=>{if(k&&Q.has(k))return Q.get(k);if(j){let e=N.find(e=>e.id===j);if(e?.modelId&&Q.has(e.modelId))return Q.get(e.modelId)}return V?.models?.[0]||null},[k,Q,V,N,j]),Z=(0,a.useMemo)(()=>N.find(e=>e.id===j)||null,[N,j]),ee=Z?.messages||[],et=(0,a.useMemo)(()=>[...N].sort((e,t)=>new Date(t.updatedAt).getTime()-new Date(e.updatedAt).getTime()),[N]),er=!M&&!!X&&(O.trim().length>0||C.length>0);(0,a.useEffect)(()=>{if(q)try{globalThis.localStorage.setItem(d,JSON.stringify(N)),globalThis.localStorage.setItem(c,j),globalThis.localStorage.setItem(m,I),globalThis.localStorage.setItem(u,O)}catch{}},[q,N,j,I,O]),(0,a.useEffect)(()=>{if(!q||r||H.current||0===e.length)return;let t=e.find(e=>e.providerId===I)||e[0],s=k&&Q.has(k)?Q.get(k):t.models[0];if(N.length>0){let e=N.find(e=>e.id===j)||N[0],r=e?.modelId&&Q.has(e.modelId)?Q.get(e.modelId):s;H.current=!0,S(e.id),A(r?.providerId||t.providerId),D(r?.id||s.id);return}let a={id:p(),title:"New chat",providerId:t.providerId,providerName:t.providerName,modelId:s.id,modelName:s.name,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),messages:[]};H.current=!0,y([a]),S(a.id),A(t.providerId),D(s.id)},[q,r,e,Q,N,j,I,k]);let es=(e,t)=>{y(r=>r.map(r=>r.id===e?t({...r,messages:Array.isArray(r.messages)?r.messages.map(e=>({...e})):[]}):r))},ea=e=>e?{id:p(),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,ei=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:p(),name:e.name,type:e.type,size:e.size,dataUrl:await f(e)})));_(e=>[...e,...s]),e.target.value=""},el=async()=>{let e=X||V?.models?.[0]||null;if(!e)return;let t=O.trim();if(!t&&0===C.length)return;let r=j,s=N.find(e=>e.id===r);if(!s){if(!(s=ea(e)))return;r=s.id,y(e=>[s,...e]),S(r)}let a={id:p(),role:"user",content:t,attachments:C.map(e=>({id:e.id,name:e.name,type:e.type,dataUrl:e.dataUrl})),createdAt:new Date().toISOString()},i=p(),l={id:i,role:"assistant",content:"",createdAt:new Date().toISOString(),status:"streaming"},n=[...s.messages||[],a,l];y(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?x(t):s.title}:s)),$(""),_([]),E(!0),U(i),z(""),W.current?.abort(),W.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=h(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:W.current.signal});if(!a.ok){let e=await a.json().catch(()=>({}));throw Error(h(e.error||e.message||`Request failed (${a.status})`))}let l=a.body?.getReader();if(!l){let e=await a.json().catch(()=>({})),t=h(e?.choices?.[0]?.message?.content||e?.output_text||e?.error||e?.message||"");es(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(h).filter(Boolean)[0]||""}(e);if(!t)continue;m+=t,z(m),es(r,e=>({...e,messages:e.messages.map(e=>e.id===i?{...e,content:m,status:"streaming"}:e),updatedAt:new Date().toISOString()}))}catch{}}}es(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=x(t),es(d,e=>({...e,title:"New chat"===e.title?s:e.title,updatedAt:new Date().toISOString()}))}catch(e){if("AbortError"!==e.name){let t=h(e?.message||e);es(r,e=>({...e,messages:e.messages.map(e=>e.id===i?{...e,content:e.content||`Error: ${t}`,status:"error"}:e),updatedAt:new Date().toISOString()})),b(t||"Failed to send message.")}}finally{E(!1),U(""),z(""),W.current=null}},en=X?`${X.name}`:"Select model",eo=X?X.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:Y,className:"relative",children:[(0,s.jsx)("button",{type:"button",onClick:()=>B(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:en}),(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:eo})]})}),J?(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===k;return(0,s.jsx)("button",{type:"button",onClick:()=>(e=>{let t=Q.get(e);if(!t)return;let r=N.find(e=>e.id===j);if(r&&r.messages.length>0){let e=ea(t);if(!e)return;y(t=>[e,...t]),S(e.id)}else if(r)y(e=>e.map(e=>e.id===r.id?{...e,providerId:t.providerId,providerName:t.providerName,modelId:t.id,modelName:t.name}:e)),S(r.id);else{let e=ea(t);if(!e)return;y(t=>[e,...t]),S(e.id)}A(t.providerId),D(t.id),B(!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:()=>K(e=>!e),className:"rounded-2xl border border-white/10 bg-white/5 px-4 py-3 text-sm text-white/80 transition hover:bg-white/8",children:"History"}),(0,s.jsx)(i.$n,{variant:"ghost",size:"sm",icon:"delete",onClick:()=>{if(!j)return;let e=N.filter(e=>e.id!==j),t=e[0]||null;y(e),t?(S(t.id),A(t.providerId),D(t.modelId)):(S(""),A(""),D(""))},disabled:!j||0===N.length,children:"Clear"})]})]}),F?(0,s.jsxs)("div",{ref:G,className:"absolute right-4 top-[72px] z-20 w-[min(360px,calc(100vw-2rem))] rounded-[20px] border border-white/10 bg-[#262626] p-2 shadow-2xl shadow-black/50 lg:right-6",children:[(0,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===et.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."}):et.map(e=>{let t=e.id===j,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=N.find(e=>e.id===t))&&(S(t),A(r.providerId||I),D(r.modelId||k),K(!1)))},className:`w-full rounded-[16px] border px-3 py-3 text-left transition ${t?"border-blue-400/40 bg-blue-500/15":"border-white/10 bg-white/5 hover:bg-white/8"}`,children:(0,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:h(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,v?(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:v})]})}):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===ee.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:ee.map(e=>{let t="user"===e.role,r="assistant"===e.role,a=r&&e.id===T&&"streaming"===e.status,i=h(e.content)||(r?R:"");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":X?.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)(o.default,{src:e.dataUrl,alt:e.name,width:320,height:112,unoptimized:!0,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&&!R?(0,s.jsx)("span",{className:"inline-block animate-pulse",children:"▋"}):null]})]})},e.id)})})]}),(0,s.jsxs)("div",{className:"shrink-0 pt-2",children:[C.length>0?(0,s.jsx)("div",{className:"mx-auto mb-3 flex w-full max-w-3xl flex-wrap gap-2 px-4",children:C.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 _(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:O,onChange:e=>$(e.target.value),onKeyDown:e=>{"Enter"===e.key&&!e.shiftKey&&(e.preventDefault(),er&&el())},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:()=>L.current?.click(),disabled:!X||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:L,type:"file",accept:"image/*",multiple:!0,className:"hidden",onChange:ei}),(0,s.jsx)("span",{className:"text-xs font-medium text-white/30 truncate max-w-[120px]",children:X?X.name:"No model"})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[M?(0,s.jsx)("button",{type:"button",onClick:()=>{W.current?.abort()},className:"p-2 text-white bg-white/10 hover:bg-white/20 transition rounded-full h-8 w-8 flex items-center justify-center",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"stop"})}):null,(0,s.jsx)("button",{onClick:el,disabled:!er,className:`h-8 w-8 rounded-full flex items-center justify-center transition ${er?"bg-white text-black hover:opacity-90":"bg-white/10 text-white/30 cursor-not-allowed"}`,children:(0,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,782,8500,594,1321,7592,5497,8441,3794,7358],()=>e(e.s=55774)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3649],{41483:(e,t,a)=>{"use strict";a.d(t,{default:()=>h});var l=a(95155),r=a(12115),s=a(44923),o=a(87256),i=a(39768),n=a(5020),d=a(35497),c=a(11059);a(88105);var m=a(65921),x=a(78559),u=a(47224);let p=/^[a-zA-Z0-9_.\-]+$/;function h({initialData:e}){let t=(0,m.i)(e=>e.error),[a,s]=(0,r.useState)(()=>(e?.combos||[]).filter(e=>!e.kind||"llm"===e.kind)),[o,i]=(0,r.useState)(!e),[n,x]=(0,r.useState)(!1),[u,p]=(0,r.useState)(null),[f,g]=(0,r.useState)(e?.connections||[]),[j,y]=(0,r.useState)(e?.settings?.comboStrategies||{}),[v,k]=(0,r.useState)(e?.modelCaps||{}),[C,S]=(0,r.useState)(null),{copied:A,copy:M}=(0,c.C)(),F=(0,r.useCallback)(async()=>{try{let[e,t,a,l]=await Promise.all([fetch("/api/combos"),fetch("/api/providers"),fetch("/api/settings"),fetch("/api/models")]);if(![e,t,a,l].every(e=>e.ok))throw Error("One or more combo resources failed to load");let r=await e.json(),o=await t.json(),i=await a.json();if(e.ok&&s((r.combos||[]).filter(e=>!e.kind||"llm"===e.kind)),t.ok&&g(o.connections||[]),l.ok){let e=await l.json(),t={};for(let a of e.models||[])a.caps&&(t[a.fullModel]=a.caps);k(t)}y(i.comboStrategies||{})}catch(e){t("Failed to fetch combo data")}finally{i(!1)}},[t]);(0,r.useEffect)(()=>{e?.combos?i(!1):F()},[e,F]);let R=async e=>{try{let{strategy:a,capacityAutoSwitch:l,routerModel:r,objective:s,...o}=e,i=await fetch("/api/combos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(o)});if(i.ok){let e=await i.json().catch(()=>({})),t=o.name?.trim()||e?.name;t&&(a||void 0!==l||r||s)&&await q(t,b(a,l,r,s)),await F(),x(!1)}else{let e=await i.json();t(e.error||"Failed to create combo")}}catch(e){t("Failed to create combo")}},O=async(e,a)=>{try{let{strategy:l,capacityAutoSwitch:r,routerModel:s,objective:o,...i}=a,n=u?.name,d=await fetch(`/api/combos/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});if(d.ok){let e=i.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&&(l||void 0!==r)){let t,a=n&&n!==e?(t={...j},n in t&&(e in t||(t[e]=t[n]),delete t[n]),t):j;await q(e,b(l,r,s,o),a)}await F(),p(null)}else{let e=await d.json();t(e.error||"Failed to update combo")}}catch(e){t("Failed to update combo")}},E=async e=>{let l=a.find(t=>t.id===e);S({title:"Delete Combo",message:l?.name?`Delete combo “${l.name}”?`:"Delete this combo?",onConfirm:async()=>{S(null);try{let a=await fetch(`/api/combos/${e}`,{method:"DELETE"});if(a.ok)s(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});else{let e=await a.json().catch(()=>({}));t(e.error||`Failed to delete combo (HTTP ${a.status})`)}}catch(e){t("Failed to delete combo")}}})},q=async(e,a,l=null)=>{try{let r={...l||j},s={...r[e]||{},...a};for(let e of Object.keys(s))(""===s[e]||null===s[e]||void 0===s[e])&&delete s[e];let o=s.fallbackStrategy||"fallback";"fallback"!==o||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===a.fallbackStrategy&&r[e]?.fallbackStrategy&&(s.fallbackStrategy=r[e].fallbackStrategy),r[e]=s):delete r[e];let i=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStrategies:r})});if(!i.ok){let e=await i.json().catch(()=>({}));t(e.error||`Failed to update combo strategy (${i.status})`);return}y(r)}catch(e){throw t("Failed to update combo strategy"),e}};return o?(0,l.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,l.jsx)(d.Qv,{}),(0,l.jsx)(d.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)(d.$n,{icon:"add",onClick:()=>x(!0),className:"w-full sm:w-auto whitespace-nowrap shrink-0",children:"Create Combo"})]}),0===a.length?(0,l.jsx)(d.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)(d.$n,{icon:"add",onClick:()=>x(!0),className:"w-full sm:w-auto",children:"Create Combo"})]})}):(0,l.jsx)("div",{className:"flex flex-col gap-4",children:a.map(e=>(0,l.jsx)(N,{combo:e,modelCaps:v,activeProviders:f,copied:A,onCopy:M,onEdit:()=>p(e),onDelete:()=>E(e.id),strategy:j[e.name]||{},onSetStrategy:t=>q(e.name,t)},e.id))}),(0,l.jsx)(w,{isOpen:n,onClose:()=>x(!1),onSave:R,activeProviders:f,modelCaps:v,initialStrategy:{fallbackStrategy:"fallback",capacityAutoSwitch:!0}},"create"),(0,l.jsx)(w,{isOpen:!!u,combo:u,onClose:()=>p(null),onSave:e=>O(u.id,e),activeProviders:f,modelCaps:v,initialStrategy:u?j[u.name]||{fallbackStrategy:"fallback"}:{}},u?.id||"new"),(0,l.jsx)(d.uo,{isOpen:!!C,onClose:()=>S(null),onConfirm:C?.onConfirm,title:C?.title||"Confirm",message:C?.message,variant:"danger"})]})}function b(e,t,a,l){let r=e||"fallback",s={fallbackStrategy:r,...void 0!==t?{capacityAutoSwitch:t}:{}};return"auto"===r?(a&&(s.routerModel=a),l&&(s.objective=l),s.judgeModel=""):("fusion"===r?s.routerModel="":(s.routerModel="",s.judgeModel=""),s.objective="",s.learningEnabled="",s.freezeLearning="",s.explorationRate=""),s}function f(e,t,a){let l=(e||[]).filter(e=>e&&e!==t);return l.length>0&&!l.some(e=>a[e]?.vision)}function g({models:e,routerModel:t}){let a=(e||[]).filter(e=>e&&e!==t);if(a.length<2)return null;let{cheap:r,frontier:s,disabled:o}=function(e){let t=(e||[]).filter(Boolean);if(t.length<=1)return{cheap:t.slice(),frontier:[],disabled:!0};let a=t.map(e=>({m:e,t:function(e){if(!e)return 4;let[t,...a]=e.split("/"),l=a.join("/")||t,r=(0,u.PS)(t,l);if(!r||"number"!=typeof r.input)return 4;let s="number"==typeof r.output?r.output:3*r.input,o=r.input+s;return o<2?0:o<10?1:o<30?2:o<80?3:4}(e)}));if(new Set(a.map(e=>e.t)).size<=1)return{cheap:t.slice(),frontier:[],disabled:!0};let l=a.filter(e=>e.t<=1).map(e=>e.m),r=a.filter(e=>e.t>=2).map(e=>e.m);if(!l.length||!r.length){let e=a.map((e,t)=>({...e,i:t})).sort((e,t)=>e.t-t.t||e.i-t.i),t=Math.ceil(e.length/2);l=e.slice(0,t).map(e=>e.m),r=e.slice(t).map(e=>e.m)}return{cheap:l,frontier:r,disabled:!1}}(a),i=e=>String(e).split("/").pop();return o?(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:"Tiers"}),(0,l.jsx)("span",{className:"text-[10px] text-text-subtle",title:"All workers share one cost tier — tiered routing is off",children:"single tier (tiering off)"})]}):(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:"Tiers"}),r.map(e=>(0,l.jsx)("span",{className:"rounded border border-emerald-500/30 bg-emerald-500/10 px-1.5 py-0.5 font-mono text-[10px] text-emerald-600 dark:text-emerald-400",title:`${e} — cheap tier`,children:i(e)},`c-${e}`)),(0,l.jsx)("span",{className:"material-symbols-outlined text-[12px] text-text-subtle",children:"arrow_forward"}),s.map(e=>(0,l.jsx)("span",{className:"rounded border border-amber-500/30 bg-amber-500/10 px-1.5 py-0.5 font-mono text-[10px] text-amber-600 dark:text-amber-400",title:`${e} — frontier tier`,children:i(e)},`f-${e}`))]})}let j=[{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"}],y={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)."},v=[{value:"quality",label:"Quality"},{value:"balanced",label:"Balanced"},{value:"economy",label:"Economy"},{value:"latency",label:"Latency"}];function N({combo:e,modelCaps:t={},activeProviders:a=[],copied:s,onCopy:o,onEdit:i,onDelete:n,strategy:c={},onSetStrategy:m}){let[x,u]=(0,r.useState)(!1),[p,h]=(0,r.useState)(!1),[b,k]=(0,r.useState)(!1),[w,C]=(0,r.useState)(!1),[S,A]=(0,r.useState)(""),M=c.fallbackStrategy||"fallback",F=c.judgeModel||"",R="auto"===M,O=c.routerModel||"",E=c.objective||"balanced",q=c.providerStrategy||"off",$=!1!==c.capacityAutoSwitch;return(0,l.jsxs)(d.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:y[M]||""}),(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)(d.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"===M&&(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:F||`Auto — ${e.models[0]||"first model"}`})]}),F&&(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"})})]}),R&&(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:()=>h(!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 — required for Auto",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"alt_route"}),(0,l.jsx)("span",{className:"truncate",children:O||"Select a router model (required)"})]})]}),O&&e.models?.includes(O)&&(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."]}),f(e.models,O,t)&&(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"}),"No vision-capable model — image requests will have images stripped"]}),(0,l.jsx)(g,{models:e.models,routerModel:O}),(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:v.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!==c.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:!!c.freezeLearning,onChange:e=>m({freezeLearning:e.target.checked})}),"Freeze"]}),(0,l.jsxs)("label",{className:"inline-flex items-center gap-1 text-[11px] text-text-muted cursor-pointer",title:"Occasionally append a 1/2/3 feedback prompt to Auto chat replies (human chat only). Off by default.",children:[(0,l.jsx)("input",{type:"checkbox",className:"rounded border-border",checked:!!c.feedbackAsk,onChange:e=>m({feedbackAsk:e.target.checked})}),"Ask feedback"]}),(0,l.jsxs)("button",{type:"button",disabled:w||!!c.freezeLearning,onClick:async()=>{C(!0),A("");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();A(a.message||(a.ok?"Done":a.error||"Failed"))}catch(e){A(e.message||"Failed")}finally{C(!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"}),w?"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-1.5",children:[(0,l.jsx)("span",{className:"text-[11px] font-medium text-text-muted",children:"Provider"}),(0,l.jsxs)("select",{value:q,onChange:e=>m({providerStrategy:e.target.value}),className:"rounded border border-border bg-surface-2 px-1.5 py-0.5 text-[11px] text-text-main",children:[(0,l.jsx)("option",{value:"off",children:"Off"}),(0,l.jsx)("option",{value:"priority",children:"Priority"}),(0,l.jsx)("option",{value:"round-robin",children:"Round robin"}),(0,l.jsx)("option",{value:"fastest",children:"Fastest"}),(0,l.jsx)("option",{value:"quota-first",children:"Quota first"})]}),"priority"===q&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("input",{type:"text",value:Array.isArray(c.providerOrder)?c.providerOrder.join(", "):"",onChange:e=>m({providerOrder:e.target.value.split(",").map(e=>e.trim()).filter(Boolean)}),placeholder:"provider-a, provider-b",className:"w-40 rounded border border-border bg-surface-2 px-1.5 py-0.5 text-[11px] text-text-main"}),(0,l.jsx)("span",{className:"text-[10px] text-text-muted",children:"comma-separated provider names, highest priority first"})]}),(0,l.jsx)("input",{type:"number",min:"1",value:c.providerLatencyGuardMs??"",onChange:e=>m({providerLatencyGuardMs:Number(e.target.value)||void 0}),placeholder:"20000",title:"Demote providers slower than this latency in milliseconds",className:"w-20 rounded border border-border bg-surface-2 px-1.5 py-0.5 text-[11px] text-text-main"})]}),"quota-first"===q&&(0,l.jsx)("p",{className:"text-[10px] text-text-muted",children:"Quota data currently available for Claude & Codex; other providers use availability (not rate-limited, lower recent use)."}),(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:c.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((c.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:c.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!==c.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!==c.emitAutoRouterHeaders,onChange:e=>m({emitAutoRouterHeaders:e.target.checked})}),"Route headers"]})]}),S?(0,l.jsx)("p",{className:"text-[11px] font-mono text-text-subtle",children:S}):(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 model is required — pick a connected account (a cheap, fast model such as Haiku works well)."})]})]})]}),(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)(d.l6,{options:j,value:M,onChange:e=>{let t=e.target.value;if("auto"===t&&!O){k(!0),h(!0);return}m({fallbackStrategy:t})},selectClassName:"py-1.5 text-xs"}),!R&&(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:$,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:s===`combo-${e.id}`?"check":"content_copy"}),(0,l.jsx)("span",{className:"text-[10px] leading-tight",children:"Copy"})]}),(0,l.jsxs)("button",{onClick:i,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:n,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)(d.rq,{isOpen:x,onClose:()=>u(!1),onSelect:e=>{m({judgeModel:e?.value||""}),u(!1)},activeProviders:a,title:"Select Judge Model",addedModelValues:F?[F]:[],closeOnSelect:!0}),(0,l.jsx)(d.rq,{isOpen:p,onClose:()=>{k(!1),h(!1)},onSelect:e=>{let t=e?.value||"";b?(k(!1),t&&m({fallbackStrategy:"auto",routerModel:t})):m({routerModel:t}),h(!1)},activeProviders:a,title:"Select Router Model",addedModelValues:O?[O]:[],closeOnSelect:!0})]})}function k({id:e,index:t,model:a,learned:s=null,isFirst:n,isLast:d,onEdit:c,onMoveUp:m,onMoveDown:x,onRemove:u}){let{attributes:p,listeners:h,setNodeRef:b,transform:f,isDragging:g}=(0,o.gl)({id:e}),j={transform:i.Ks.Transform.toString(f),opacity:g?.4:1,zIndex:g?999:void 0},[y,v]=(0,r.useState)(!1),[N,w]=(0,r.useState)(a),C=()=>{let e=N.trim();e&&e!==a?c(e):w(a),v(!1)};return(0,l.jsxs)("div",{ref:b,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 ${g?"shadow-md ring-1 ring-primary/30":""}`,children:[(0,l.jsx)("button",{...p,...h,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=>w(e.target.value),onBlur:C,onKeyDown:e=>{"Enter"===e.key&&C(),"Escape"===e.key&&(w(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}),s&&s.n>=10&&(0,l.jsxs)("span",{className:"shrink-0 font-mono text-[10px] text-text-subtle",title:"Learned routing stats (all combos, last 14d)",children:["avg ",Math.round(s.avgScore)," \xb7 n=",s.n,s.bestCluster?` \xb7 best: ${s.bestCluster}`:""]}),(0,l.jsxs)("div",{className:"flex shrink-0 items-center gap-0.5",children:[(0,l.jsx)("button",{onClick:m,disabled:n,className:`p-0.5 rounded ${n?"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:x,disabled:d,className:`p-0.5 rounded ${d?"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:u,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 w({isOpen:e,combo:t,onClose:a,onSave:i,activeProviders:c,modelCaps:m={},kindFilter:u=null,initialStrategy:h={}}){let[b,g]=(0,r.useState)(t?.name||""),[v,N]=(0,r.useState)(t?.models||[]),[C,S]=(0,r.useState)(h.fallbackStrategy||"fallback"),[A,M]=(0,r.useState)(!1!==h.capacityAutoSwitch),[F,R]=(0,r.useState)(!1),[O,E]=(0,r.useState)(!1),[q,$]=(0,r.useState)(""),[P,D]=(0,r.useState)({}),[L,T]=(0,r.useState)({}),_=(0,s.FR)((0,s.MS)(s.AN,{activationConstraint:{distance:5}}),(0,s.MS)(s.uN,{coordinateGetter:o.JR})),z=v.map((e,t)=>({uid:`item-${t}`,model:e})),H=async()=>{try{let e=await fetch("/api/models/alias");if(e.ok){let t=await e.json();D(t.aliases||{})}}catch(e){(0,x.s)("Error fetching modal data:",e)}try{let e=await fetch("/api/routing/stats");if(!e.ok)throw Error("Failed to fetch learned routing stats");let t=await e.json(),a={};for(let e of t.global||[]){let t=Object.entries(e.clusters||{}),l=t.filter(([,e])=>e.n>=3),r=(l.length?l:t).reduce((e,t)=>{if(!e)return t;let[a,r]=e,[s,o]=t,i=l.length?r.avgScore:r.n,n=l.length?o.avgScore:o.n;return n>i||n===i&&s<a?t:e},null);a[e.worker]={avgScore:e.avgScore,n:e.n,bestCluster:r?r[0]:null}}T(a)}catch{T({})}};(0,r.useEffect)(()=>{e&&(g(t?.name||""),N(t?.models||[]),S(h.fallbackStrategy||"fallback"),M(!1!==h.capacityAutoSwitch),R(!1),E(!1),$(""),T({}),H())},[e,t?.id,t?.name]);let J=e=>e.trim()?p.test(e)?($(""),!0):($("Only letters, numbers, -, _ and . allowed"),!1):($("Name is required"),!1),B=async()=>{if(J(b)){if(0===v.length)return void(0,x.s)("Add at least one model to the combo");if("auto"===C&&v.length<2)return void(0,x.s)("Auto strategy needs at least 2 models in the worker pool (plus a connected router account)");E(!0),await i({name:b.trim(),models:v,strategy:C,capacityAutoSwitch:"auto"===C||A}),E(!1)}},I=!!t;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(d.aF,{isOpen:e,onClose:a,title:I?"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)(d.pd,{label:"Combo Name",value:b,onChange:e=>{let t=e.target.value;g(t),t?J(t):$("")},placeholder:"my-combo",error:q}),(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)(d.l6,{options:j,value:C,onChange:e=>S(e.target.value),selectClassName:"py-2 text-sm"}),(0,l.jsx)("p",{className:"text-[11px] text-text-muted mt-1.5",children:y[C]}),"auto"===C&&(0,l.jsxs)("p",{className:"text-[11px] text-amber-600 dark:text-amber-400 mt-1 flex items-center gap-1",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"info"}),"Auto requires a router model — select one on the combo card after saving."]}),"auto"!==C&&(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:A,onChange:e=>M(e.target.checked)}),"Capacity auto-switch — prefer vision/PDF-capable models when the request needs them"]}),"auto"===C&&(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"===C&&(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"===C?"(order = priority)":"(pool)"]}),v.length>0&&f(v,null,m)&&(0,l.jsxs)("p",{className:"text-[10px] text-amber-600 dark:text-amber-400 flex items-center gap-1 mb-1",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"warning"}),"No vision-capable model — image requests will have images stripped"]}),0===v.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)(s.Mp,{sensors:_,collisionDetection:s.fp,onDragEnd:e=>{let{active:t,over:a}=e;if(a&&t.id!==a.id){let e=z.findIndex(e=>e.uid===t.id),l=z.findIndex(e=>e.uid===a.id);-1!==e&&-1!==l&&N(t=>(0,o.be)(t,e,l))}},modifiers:[n.FN,n.gj],children:(0,l.jsx)(o.gB,{items:z.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:z.map(({uid:e,model:t},a)=>(0,l.jsx)(k,{id:e,index:a,model:t,learned:L[t]||null,isFirst:0===a,isLast:a===z.length-1,onEdit:e=>{let t=[...v];t[a]=e,N(t)},onMoveUp:()=>(e=>{if(0===e)return;let t=[...v];[t[e-1],t[e]]=[t[e],t[e-1]],N(t)})(a),onMoveDown:()=>(e=>{if(e===v.length-1)return;let t=[...v];[t[e],t[e+1]]=[t[e+1],t[e]],N(t)})(a),onRemove:()=>{N(v.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)(d.$n,{onClick:a,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,l.jsx)(d.$n,{onClick:B,fullWidth:!0,size:"sm",disabled:!b.trim()||!!q||O,children:O?"Saving...":I?"Save":"Create"})]})]})}),(0,l.jsx)(d.rq,{isOpen:F,onClose:()=>R(!1),onSelect:e=>{v.includes(e.value)||N([...v,e.value])},onDeselect:e=>{N(v.filter(t=>t!==e.value))},activeProviders:c,modelAliases:P,title:"Add Model to Combo",kindFilter:u,addedModelValues:v,closeOnSelect:!1})]})}},80063:(e,t,a)=>{Promise.resolve().then(a.bind(a,41483))}},e=>{e.O(0,[2574,3862,782,8500,594,7055,1321,7592,5497,8441,3794,7358],()=>e(e.s=80063)),_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),c=l(78559);let i={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),u=(0,n.useRef)(null),x=async()=>{try{await fetch("/api/translator/console-logs",{method:"DELETE"})}catch(e){(0,c.s)("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)(()=>{u.current&&(u.current.scrollTop=u.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:x,children:"Clear"})}),(0,s.jsx)("div",{ref:u,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=i[(l=e.match(/\[(\w+)\]/g))?l[1]?.replace(/\[|\]/g,""):null]||"text-green-400",(0,s.jsx)("span",{className:n,children:e}))},t)})})})]})})}},63131:(e,t,l)=>{Promise.resolve().then(l.bind(l,44493))}},e=>{e.O(0,[2574,3862,782,8500,594,1321,7592,5497,8441,3794,7358],()=>e(e.s=63131)),_N_E=e.O()}]);
@@ -1,3 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6099],{53390:(e,t,s)=>{"use strict";s.d(t,{$:()=>o,s:()=>r});var i=s(31967),a=s(99190),n=s(9846),r=class extends a.k{#e;#t;#s;#i;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#s=e.mutationCache,this.#t=[],this.state=e.state||o(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#s.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#s.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||("pending"===this.state.status?this.scheduleGc():this.#s.remove(this))}continue(){return this.#i?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#a({type:"continue"})},s={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#i=(0,n.II)({fn:()=>this.options.mutationFn?this.options.mutationFn(e,s):Promise.reject(Error("No mutationFn found")),onFail:(e,t)=>{this.#a({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#a({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#s.canRun(this)});let i="pending"===this.state.status,a=!this.#i.canStart();try{if(i)t();else{this.#a({type:"pending",variables:e,isPaused:a}),this.#s.config.onMutate&&await this.#s.config.onMutate(e,this,s);let t=await this.options.onMutate?.(e,s);t!==this.state.context&&this.#a({type:"pending",context:t,variables:e,isPaused:a})}let n=await this.#i.start();return await this.#s.config.onSuccess?.(n,e,this.state.context,this,s),await this.options.onSuccess?.(n,e,this.state.context,s),await this.#s.config.onSettled?.(n,null,this.state.variables,this.state.context,this,s),await this.options.onSettled?.(n,null,e,this.state.context,s),this.#a({type:"success",data:n}),n}catch(t){try{await this.#s.config.onError?.(t,e,this.state.context,this,s)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,s)}catch(e){Promise.reject(e)}try{await this.#s.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,s)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,s)}catch(e){Promise.reject(e)}throw this.#a({type:"error",error:t}),t}finally{this.#s.runNext(this)}}#a(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}})(this.state),i.jG.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#s.notify({mutation:this,type:"updated",action:e})})}};function o(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}},53427:(e,t,s)=>{Promise.resolve().then(s.bind(s,92323))},92323:(e,t,s)=>{"use strict";s.d(t,{default:()=>C});var i=s(95155),a=s(12115),n=s(14051),r=s.n(n),o=s(35625),l=s(4109),c=s(53390),u=s(31967),d=s(98216),h=s(5858),m=class extends d.Q{#e;#n=void 0;#r;#o;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#l()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),(0,h.f8)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#r,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,h.EN)(t.mutationKey)!==(0,h.EN)(this.options.mutationKey)?this.reset():this.#r?.state.status==="pending"&&this.#r.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#r?.removeObserver(this)}onMutationUpdate(e){this.#l(),this.#c(e)}getCurrentResult(){return this.#n}reset(){this.#r?.removeObserver(this),this.#r=void 0,this.#l(),this.#c()}mutate(e,t){return this.#o=t,this.#r?.removeObserver(this),this.#r=this.#e.getMutationCache().build(this.#e,this.options),this.#r.addObserver(this),this.#r.execute(e)}#l(){let e=this.#r?.state??(0,c.$)();this.#n={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#c(e){u.jG.batch(()=>{if(this.#o&&this.hasListeners()){let t=this.#n.variables,s=this.#n.context,i={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#o.onSuccess?.(e.data,t,s,i)}catch(e){Promise.reject(e)}try{this.#o.onSettled?.(e.data,null,t,s,i)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#o.onError?.(e.error,t,s,i)}catch(e){Promise.reject(e)}try{this.#o.onSettled?.(void 0,e.error,t,s,i)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#n)})})}};function p(e,t){let s=(0,o.jE)(t),[i]=a.useState(()=>new m(s,e));a.useEffect(()=>{i.setOptions(e)},[i,e]);let n=a.useSyncExternalStore(a.useCallback(e=>i.subscribe(u.jG.batchCalls(e)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),r=a.useCallback((e,t)=>{i.mutate(e,t).catch(h.lQ)},[i]);if(n.error&&(0,h.GU)(i.options.throwOnError,[n.error]))throw n.error;return{...n,mutate:r,mutateAsync:n.mutate}}var y=s(35497),x=s(11059);function b({label:e,url:t,copyId:s,copied:a,onCopy:n,badge:r,actions:o}){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"===r||"TS"===r?"bg-primary/10 text-primary border-primary/25":"bg-surface-2 text-text-muted border-border"}`,children:e}),(0,i.jsx)(y.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"})}),o]})}function f({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 v=()=>["endpoint","keys"],g=()=>["endpoint","settings"];async function j(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}var k=s(65921);function C({initialData:e}){let t=(0,o.jE)(),s=e?.machineId||"",n=(0,k.i)(e=>e.error),r=(0,l.I)({queryKey:v(),queryFn:async()=>(await j("/api/keys")).keys||[],initialData:e?.keys||[]}),c=(0,l.I)({queryKey:g(),queryFn:()=>j("/api/settings"),initialData:e?.settings||{}}),u=r.data||[],d=c.data?.requireApiKey===!0,[h,m]=(0,a.useState)(!1),[N,w]=(0,a.useState)(""),[P,S]=(0,a.useState)(null),[A,O]=(0,a.useState)(null),[I,R]=(0,a.useState)(()=>new Set),[E,M]=(0,a.useState)("/v1");(0,a.useEffect)(()=>{M(`${window.location.origin}/v1`)},[]);let{copied:K,copy:q}=(0,x.C)(),F=p({mutationFn:e=>j("/api/settings",{method:"PATCH",body:JSON.stringify({requireApiKey:e})}),onSuccess:()=>{t.invalidateQueries({queryKey:g()})},onError:()=>n("Failed to update API key requirement")}),$=p({mutationFn:e=>j("/api/keys",{method:"POST",body:JSON.stringify({name:e})}),onSuccess:e=>{S(e.key||null),w(""),m(!1),t.invalidateQueries({queryKey:v()})},onError:()=>n("Failed to create API key")}),_=p({mutationFn:e=>j(`/api/keys/${e}`,{method:"DELETE"}),onSuccess:()=>{t.invalidateQueries({queryKey:v()})},onError:()=>n("Failed to delete API key")}),D=p({mutationFn:({id:e,isActive:t})=>j(`/api/keys/${e}`,{method:"PUT",body:JSON.stringify({isActive:t})}),onSuccess:()=>{t.invalidateQueries({queryKey:v()})},onError:()=>n("Failed to toggle API key")});return(0,i.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,i.jsxs)(y.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)(b,{label:"Local",url:E,copyId:"local_url",copied:K,onCopy:q}),s?(0,i.jsxs)("p",{className:"mt-3 text-xs text-text-muted font-mono",children:["Machine: ",s]}):null]}),(0,i.jsxs)(y.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)(y.$n,{icon:"add",onClick:()=>m(!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)(y.lM,{checked:d,onChange:()=>{d?O({title:"Disable API key protection?",message:"Any client that can reach this Switchboard endpoint will be able to use your provider accounts.",onConfirm:()=>{O(null),F.mutate(!1)}}):F.mutate(!0)}})]}),!d&&(0,i.jsx)("div",{className:"mb-4 -mt-2",children:(0,i.jsx)(f,{message:"API key is not required — any local client can call /v1."})}),0===u.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)(y.$n,{icon:"add",onClick:()=>m(!0),children:"Create Key"})]}):(0,i.jsx)("div",{className:"flex flex-col",children:u.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:I.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 R(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:I.has(e.id)?"Hide key":"Show key",children:(0,i.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:I.has(e.id)?"visibility_off":"visibility"})}),(0,i.jsx)("button",{type:"button",onClick:()=>q(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:K===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)(y.lM,{size:"sm",checked:e.isActive??!0,onChange:t=>{if(e.isActive&&!t){let s=e.name?.trim()||e.id;O({title:"Pause API Key",message:`Pause API key "${s}"?
2
-
3
- This key will stop working immediately but can be resumed later.`,onConfirm:async()=>{O(null),D.mutate({id:e.id,isActive:t})}})}else D.mutate({id:e.id,isActive:t})},title:e.isActive?"Pause key":"Resume key"}),(0,i.jsx)("button",{type:"button",onClick:()=>O({title:"Delete API Key",message:`Delete API key "${e.name?.trim()||e.id}"?`,onConfirm:async()=>{O(null),_.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)(y.aF,{isOpen:h,title:"Create API Key",onClose:()=>{m(!1),w("")},children:(0,i.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,i.jsx)(y.pd,{label:"Key Name",value:N,onChange:e=>w(e.target.value),placeholder:"Production Key"}),(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)(y.$n,{onClick:()=>$.mutate(N.trim()),fullWidth:!0,disabled:!N.trim()||$.isPending,loading:$.isPending,children:"Create"}),(0,i.jsx)(y.$n,{onClick:()=>{m(!1),w("")},variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}),(0,i.jsx)(y.aF,{isOpen:!!P,title:"API Key Created",onClose:()=>S(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)(y.pd,{value:P||"",readOnly:!0,className:"flex-1 font-mono text-sm"}),(0,i.jsx)(y.$n,{variant:"secondary",icon:"created_key"===K?"check":"content_copy",onClick:()=>q(P,"created_key"),children:"created_key"===K?"Copied!":"Copy"})]}),(0,i.jsx)(y.$n,{onClick:()=>S(null),fullWidth:!0,children:"Done"})]})}),(0,i.jsx)(y.uo,{isOpen:!!A,onClose:()=>O(null),onConfirm:A?.onConfirm,title:A?.title||"Confirm",message:A?.message,variant:"danger"})]})}C.propTypes={initialData:r().shape({machineId:r().string,keys:r().array,settings:r().object}).isRequired}}},e=>{e.O(0,[2574,3862,782,8500,594,1321,7592,5497,8441,3794,7358],()=>e(e.s=53427)),_N_E=e.O()}]);
@@ -1,59 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[182],{17845:(e,t,s)=>{Promise.resolve().then(s.bind(s,41095))},41095:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>B});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),x=s(65921);function h({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 b({connection:e,isOAuth:t,isFirst:s,isLast:r,onMoveUp:o,onMoveDown:l,onToggleActive:d,onEdit:c,onDelete:u}){let[p,x]=(0,n.useState)(!1),f=e.providerSpecificData?.connectionProxyEnabled===!0&&!!e.providerSpecificData?.connectionProxyUrl,g=f?`Legacy: ${e.providerSpecificData?.connectionProxyUrl}`:"",y="",v=e.providerSpecificData?.connectionProxyUrl;if(v)try{let e=new URL(v);y=`${e.protocol}//${e.hostname}${e.port?`:${e.port}`:""}`}catch{y=v}let j=e.providerSpecificData?.connectionNoProxy||"",w=Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>e).filter(Boolean).sort()[0]||null;(0,n.useEffect)(()=>{let t=()=>{x(!!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=w?setInterval(t,1e3):null;return()=>{s&&clearInterval(s)}},[e,w]);let N="unavailable"!==e.testStatus||p?e.testStatus:"active",k=t?e.name||e.email||e.displayName||"OAuth Account":e.name;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:o,disabled:s,className:`p-0.5 rounded ${s?"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: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_down"})})]}),(0,a.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted",children:t?"lock":"key"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium truncate",children:k}),(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,N),size:"sm",dot:!0,children:!1===e.isActive?"disabled":N||"Unknown"}),f&&(0,a.jsx)(i.Ex,{variant:"success",size:"sm",children:"Proxy"}),p&&!1!==e.isActive&&(0,a.jsx)(h,{until:w}),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]})]}),f&&(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:g,children:g}),y&&(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:y}),j&&(0,a.jsxs)("span",{className:"text-[11px] text-text-muted truncate max-w-[320px]",title:j,children:["no_proxy: ",j]})]})]})]}),(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:[(0,a.jsxs)("button",{onClick:c,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:u,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:d,title:e.isActive??!0?"Disable":"Enable"})]})]})}function f({isOpen:e,provider:t,providerName:s,onSave:r,onClose:o}){let[l,d]=(0,n.useState)({name:"",apiKey:"",priority:1}),[c,m]=(0,n.useState)(!1),[u,p]=(0,n.useState)(null),[x,h]=(0,n.useState)(!1),b=l.name.trim().length>0,g=l.apiKey.trim().length>0,y=async()=>{let e=l.apiKey.trim();if(e){m(!0);try{let s=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:e})}),a=await s.json();p(a.valid?"success":"failed")}catch{p("failed")}finally{m(!1)}}},v=async()=>{let e=l.name.trim(),s=l.apiKey.trim();if(t&&e&&s){h(!0);try{let a=!1;try{m(!0),p(null);let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:s})});a=!!(await e.json()).valid,p(a?"success":"failed")}catch{p("failed")}finally{m(!1)}await r({name:e,apiKey:s,priority:l.priority,testStatus:a?"active":"unknown"})}finally{h(!1)}}};return t?(0,a.jsx)(i.aF,{isOpen:e,title:`Add ${s||t} API Key`,onClose:o,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:l.name,onChange:e=>d({...l,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",autoComplete:"off",className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",value:l.apiKey,onChange:e=>d({...l,apiKey:e.target.value})})]}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(i.$n,{onClick:y,disabled:!g||c||x,variant:"secondary",children:c?"Checking...":"Check"})})]}),u&&(0,a.jsx)(i.Ex,{variant:"success"===u?"success":"error",children:"success"===u?"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",min:1,className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",value:l.priority,onChange:e=>d({...l,priority:Number.parseInt(e.target.value)||1})})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(i.$n,{onClick:v,fullWidth:!0,disabled:!b||!g||x,children:x?"Saving...":"Save"}),(0,a.jsx)(i.$n,{onClick:o,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}function g({providerId:e,isOAuth:t}){let[s,r]=(0,n.useState)([]),[o,l]=(0,n.useState)(!0),[d,c]=(0,n.useState)(!1),[m,u]=(0,n.useState)(!1),[p,h]=(0,n.useState)(null),[y,v]=(0,n.useState)(null),[j,w]=(0,n.useState)("1"),[N,k]=(0,n.useState)(null),C=(0,x.i)(e=>e.error),S=(0,n.useCallback)(async()=>{try{let[t,s]=await Promise.all([fetch("/api/providers",{cache:"no-store"}),fetch("/api/settings",{cache:"no-store"})]);if(!t.ok||!s.ok)throw Error("Failed to load connections");let a=await t.json(),o=await s.json();r((a.connections||[]).filter(t=>t.provider===e));let l=(o.providerStrategies||{})[e]||{};v(l.fallbackStrategy||null),w(null!=l.stickyRoundRobinLimit?String(l.stickyRoundRobinLimit):"1")}catch(e){C(e?.message||"Failed to load connections")}finally{l(!1)}},[C,e]);(0,n.useEffect)(()=>{S()},[S]);let $=async(t,s)=>{try{let a=await fetch("/api/settings",{cache:"no-store"});if(!a.ok)throw Error(`Failed to load settings (${a.status})`);let r=(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;let n=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:l})});if(!n.ok)throw Error(`Failed to save strategy (${n.status})`)}catch(e){C(e?.message||"Failed to save provider strategy")}},E=async(e,t)=>{let a=[...s];[a[e],a[t]]=[a[t],a[e]],r(a);try{if((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})})])).some(e=>!e.ok))throw Error("Failed to reorder connections")}catch(e){C(e?.message||"Failed to reorder connections"),await S()}},A=async e=>{let t=s.find(t=>t.id===e),a=t?.name?.trim()||t?.email?.trim()||e;k({title:"Delete Connection",message:`Delete connection “${a}”?`,onConfirm:async()=>{k(null);try{let t=await fetch(`/api/providers/${e}`,{method:"DELETE"});if(!t.ok)throw Error(`Failed to delete connection (${t.status})`);r(t=>t.filter(t=>t.id!==e))}catch(e){C("Failed to delete connection")}}})},T=async(e,t)=>{try{let s=await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})});if(!s.ok)throw Error(`Failed to toggle connection (${s.status})`);r(s=>s.map(s=>s.id===e?{...s,isActive:t}:s))}catch(e){C("Failed to toggle connection")}},P=async t=>{try{let s=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:e,...t})});if(!s.ok)throw Error(`Failed to save API key (${s.status})`);await S(),c(!1)}catch(e){C("Failed to save API key")}},R=async e=>{try{let t=await fetch(`/api/providers/${p.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok)throw Error(`Failed to update connection (${t.status})`);await S(),u(!1)}catch(e){C("Failed to update connection")}};return o?(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"===y,onChange:e=>{let t=e?"round-robin":null;v(t),e&&!j&&w("1"),$(t,e?j||"1":j)}}),"round-robin"===y&&(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:j,onChange:e=>{w(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:()=>c(!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)(b,{connection:e,isOAuth:t,isFirst:0===r,isLast:r===s.length-1,onMoveUp:()=>E(r,r-1),onMoveDown:()=>E(r,r+1),onToggleActive:t=>T(e.id,t),onEdit:()=>{h(e),u(!0)},onDelete:()=>A(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:()=>c(!0),children:"Add"})})]})]}),(0,a.jsx)(f,{isOpen:d,provider:e,onSave:P,onClose:()=>c(!1)}),(0,a.jsx)(i.wI,{isOpen:m,connection:p,onSave:R,onClose:()=>u(!1)}),(0,a.jsx)(i.uo,{isOpen:!!N,onClose:()=>k(null),onConfirm:N?.onConfirm,title:N?.title||"Confirm",message:N?.message,variant:"danger"})]})}h.propTypes={until:p().string.isRequired},b.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,isOAuth:p().bool.isRequired,isFirst:p().bool.isRequired,isLast:p().bool.isRequired,onMoveUp:p().func.isRequired,onMoveDown:p().func.isRequired,onToggleActive:p().func.isRequired,onEdit:p().func.isRequired,onDelete:p().func.isRequired},f.propTypes={isOpen:p().bool.isRequired,provider:p().string,providerName:p().string,onSave:p().func.isRequired,onClose:p().func.isRequired},g.propTypes={providerId:p().string.isRequired,isOAuth:p().bool};var y=s(28777),v=s(11059),j=s(78559);function w({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 N({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 k({providerId:e,kindFilter:t,providerAliasOverride:s}){let{copied:r,copy:o}=(0,v.C)(),[l,d]=(0,n.useState)({}),[m,u]=(0,n.useState)([]),[p,x]=(0,n.useState)({}),[h,b]=(0,n.useState)(null),[f,g]=(0,n.useState)(""),[C,S]=(0,n.useState)(!1),[$,E]=(0,n.useState)([]),A=s||(0,c.wG)(e),T=t||"llm",P=(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&&E((o.connections||[]).filter(t=>t.provider===e)),a.ok&&u(l.models||[])}catch(e){(0,j.s)("ModelsCard fetch error:",e)}},[e]);(0,n.useEffect)(()=>{P()},[P]);let R=async(e,t)=>{let s=`${A}/${e}`;try{(await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:s,alias:t})})).ok&&await P()}catch(e){(0,j.s)("set alias error:",e)}},I=async e=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await P()}catch(e){(0,j.s)("delete alias error:",e)}},_=async e=>{try{(await fetch("/api/models/custom",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:A,id:e,type:T})})).ok&&(await P(),window.dispatchEvent(new CustomEvent("customModelChanged")))}catch(e){(0,j.s)("add custom model error:",e)}},O=async e=>{try{let t=new URLSearchParams({providerAlias:A,id:e,type:T});(await fetch(`/api/models/custom?${t}`,{method:"DELETE"})).ok&&(await P(),window.dispatchEvent(new CustomEvent("customModelChanged")))}catch(e){(0,j.s)("delete custom model error:",e)}},M=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:`${A}/${e}`,kind:t})}),a=await s.json();x(t=>({...t,[e]:a.ok?"ok":"error"})),g(a.ok?"":a.error||"Model not reachable")}catch{x(t=>({...t,[e]:"error"})),g("Network error")}finally{b(null)}}},F=(0,y.KC)(e),K=t?F.filter(e=>e.kinds?e.kinds.includes(t):(0,y.CP)(e,"llm")===t):F,L=m.filter(e=>e.providerAlias===A&&(0,y.CP)(e,"llm")===T&&!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=`${A}/${e.id}`,s=Object.entries(l).find(([,e])=>e===t)?.[0];return(0,a.jsx)(w,{model:e,fullModel:`${A}/${e.id}`,alias:s,copied:r,onCopy:o,onSetAlias:t=>R(e.id,t),onDeleteAlias:()=>I(s),testStatus:p[e.id],onTest:$.length>0?()=>M(e.id):void 0,isTesting:h===e.id,isFree:e.isFree},e.id)}),L.map(e=>(0,a.jsx)(w,{model:{id:e.id,name:e.name},fullModel:`${A}/${e.id}`,copied:r,onCopy:o,onSetAlias:()=>{},onDeleteAlias:()=>O(e.id),testStatus:p[e.id],onTest:$.length>0?()=>M(e.id):void 0,isTesting:h===e.id,isCustom:!0},`${e.id}-${e.type}`)),(0,a.jsxs)("button",{onClick:()=>S(!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)(N,{isOpen:C,onSave:async e=>{await _(e),S(!1)},onClose:()=>S(!1)})]})}function C({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})]})}w.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},N.propTypes={isOpen:p().bool.isRequired,onSave:p().func.isRequired,onClose:p().func.isRequired},k.propTypes={providerId:p().string.isRequired,kindFilter:p().string,providerAliasOverride:p().string};let S={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
- }`}},$=`{
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 E({providerId:e,customAlias:t}){let s=(0,c.gC)(e),r=s?t||e:(0,c.wG)(e),o=s?[]:(0,y.KC)(e).filter(e=>"embedding"===(0,y.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,g]=(0,n.useState)(""),[j,w]=(0,n.useState)(null),[N,k]=(0,n.useState)(!1),[S,A]=(0,n.useState)(""),{copied:T,copy:P}=(0,v.C)(),{copied:R,copy:I}=(0,v.C)();(0,n.useEffect)(()=>{g(window.location.origin),fetch("/api/keys").then(e=>e.json()).then(e=>{b((e.keys||[]).find(e=>!1!==e.isActive)?.key||"")}).catch(()=>{})},[]);let _=l?`${r}/${l}`:"",O=()=>{let e={model:_,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())}'`,F=async()=>{if(!m.trim()||!_)return;k(!0),A(""),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 A(r?.error?.message||r?.error||`HTTP ${s.status}`);w({data:r,latencyMs:a})}catch(e){A(e.message||"Network error")}finally{k(!1)}},K=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)(C,{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)(C,{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=>g(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)(C,{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)(C,{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)(C,{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:()=>P(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:T?"check":"content_copy"}),T?"Copied":"Copy"]}),(0,a.jsxs)("button",{onClick:F,disabled:N||!m.trim()||!_,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:N?{animation:"spin 1s linear infinite"}:void 0,children:"play_arrow"}),N?"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})]}),S&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:S}),(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:()=>I(K),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:R?"check":"content_copy"}),R?"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 $;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 A={"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 T=s(63935),P=s(14683);let R=`// 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=A[e]||A["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,g]=(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,y.KC)(o.modelKey);return e?.[0]?.id||""}return""}),[N,k]=(0,n.useState)("Hello, this is a text to speech test."),[S,$]=(0,n.useState)(""),[E,_]=(0,n.useState)(""),[O,M]=(0,n.useState)("mp3"),[F,K]=(0,n.useState)(""),[L,B]=(0,n.useState)(null),[D,U]=(0,n.useState)(!1),[q,z]=(0,n.useState)(""),[J,V]=(0,n.useState)(null),{copied:H,copy:W}=(0,v.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(_(window.location.origin),fetch("/api/keys").then(e=>e.json()).then(e=>{$((e.keys||[]).find(e=>!1!==e.isActive)?.key||"")}).catch(()=>{}),"hardcoded"===o.voiceSource){let t=o.hasModelSelector&&o.modelKey&&(0,y.KC)(o.modelKey)?.[0]?.id||"",s=o.voicesPerModel&&t?(0,T.jY)(e,t)||[]:(0,y.KC)(o.voiceKey||e).filter(e=>"tts"===(0,y.CP)(e));if(s.length)if(o.hasBrowseButton){let e=s.find(e=>"en"===e.id)||s[0];g(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)}},[o.hasBrowseButton,o.hasModelSelector,o.modelKey,o.voiceKey,o.voiceSource,o.voicesPerModel,e]),(0,n.useEffect)(()=>{if(!o.voicesPerModel||!j)return;let t=(0,T.jY)(e,j)||[];b(t),t.length&&(d(t[0].id),u(t[0].name||t[0].id))},[o.voicesPerModel,e,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,y.KC)(t).filter(e=>"tts"===(0,y.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:N},o.hasLanguageHint&&en&&(t.language=en),t),ex=`curl -X POST ${E}/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(!N.trim()||!eu)return;U(!0),z(""),K(""),B(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:N.trim()})});if(V(Date.now()-e),!a.ok){let e=await a.json().catch(()=>({}));z(e?.error?.message||e?.error||`HTTP ${a.status}`);return}if("json"===O){let e=await a.json();B(e);let t=await fetch(`data:audio/mp3;base64,${e.audio}`).then(e=>e.blob());K(URL.createObjectURL(t))}else{let e=await a.blob();K(URL.createObjectURL(e))}}catch(e){z(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)(C,{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:[E,"/v1/audio/speech"]})})}),(0,a.jsx)(C,{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,y.KC)(e).some(e=>"tts"===(0,y.CP)(e)))&&(0,a.jsx)(C,{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,y.KC)(e).filter(e=>"tts"===(0,y.CP)(e))).length?s:(0,y.KC)(o.modelKey)||[]).map(e=>(0,a.jsx)("option",{value:e.id,children:e.name||e.id},e.id))})}),o.hasLanguageHint&&(0,a.jsx)(C,{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"}),P.I.map(e=>(0,a.jsx)("option",{value:e.name,children:e.name},e.id))]})}),o.hasBrowseButton&&(0,a.jsx)(C,{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)(C,{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)(C,{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)(C,{label:"Language",children:(0,a.jsx)("select",{value:l,onChange:t=>{let s=(0,y.KC)(e).filter(e=>"tts"===(0,y.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,y.KC)(e).filter(e=>"tts"===(0,y.CP)(e)).map(e=>(0,a.jsx)("option",{value:e.id,children:e.name||e.id},e.id))})}),(0,a.jsx)(C,{label:"Input",children:(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("input",{value:N,onChange:e=>k(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"}),N&&(0,a.jsx)("button",{type:"button",onClick:()=>k(""),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)(C,{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:D||!N.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:D?{animation:"spin 1s linear infinite"}:void 0,children:"play_arrow"}),D?"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}),F?(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,"ms"]})]}),(0,a.jsxs)("a",{href:F,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:F,className:"w-full"}),L&&(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:L.format,audio:L.audio?`${L.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:R})]})]})]}),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","data-i18n":"Select Language",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...","data-i18n-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),g(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."})]})]})]})})]})}var _=s(5772);let O="https://pub-1fb693cb11cc46b2b2f656f51e015a2c.r2.dev/dog.png";function M(e){let t="string"==typeof e?e.trim():"";return t?/^(data:image\/|https?:\/\/)/i.test(t)?t:`data:image/png;base64,${t}`:""}function F({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=S[t],d=l||{},m=(0,y.KC)(e).filter(e=>(0,y.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"),g=!!b?.capabilities?.includes("mask"),[j,w]=(0,n.useState)(d.defaultInput||""),[N,k]=(0,n.useState)(""),[$,E]=(0,n.useState)(""),[A,T]=(0,n.useState)(()=>(d.extraFields||[]).reduce((e,t)=>(e[t.key]=t.default??"",e),{})),[P,R]=(0,n.useState)(""),[I,K]=(0,n.useState)(""),[L,B]=(0,n.useState)(null),[D,U]=(0,n.useState)(null),[q,z]=(0,n.useState)(null),[J,V]=(0,n.useState)("json"),[H,W]=(0,n.useState)(""),[G,Y]=(0,n.useState)(!1),[Z,Q]=(0,n.useState)(""),[X,ee]=(0,n.useState)([]),[et,es]=(0,n.useState)(""),{copied:ea,copy:er}=(0,v.C)(),{copied:eo,copy:el}=(0,v.C)();if((0,n.useEffect)(()=>{K(window.location.origin),fetch("/api/keys").then(e=>e.json()).then(e=>{R((e.keys||[]).find(e=>!1!==e.isActive)?.key||"")}).catch(()=>{}),fetch("/api/providers/client").then(e=>e.json()).then(t=>{ee((t.connections||[]).filter(t=>t.provider===e&&!1!==t.isActive))}).catch(()=>{})},[e]),!o||!l)return null;let en=o.endpoint.path,ei=u?x?`${r}/${x}`:p?"":r:r,ed="cloudflare-ai"!==e?{}:"@cf/runwayml/stable-diffusion-v1-5-img2img"===x?{image:O}:"@cf/runwayml/stable-diffusion-v1-5-inpainting"===x?{image:O,mask_image:"https://pub-1fb693cb11cc46b2b2f656f51e015a2c.r2.dev/dog-mask.png"}:{},ec=N.trim()||ed.image||"",em=$.trim()||ed.mask_image||"",eu=M(ec),ep=M(em),ex=Object.entries(A).reduce((e,[t,s])=>(""===s||null==s||"number"==typeof s&&Number.isNaN(s)||(e[t]=s),e),{}),eh={model:ei,[l.bodyKey]:j,...l.extraBody,...ex,...f&&ec?{image:ec}:{},...g&&em?{mask_image:em}:{}},eb="image"===t&&"binary"===J,ef="image"===t&&"codex"===e&&!eb,eg=`${en}${eb?"?response_format=binary":""}`,ey=`-H "Content-Type: application/json" \\
46
- -H "Authorization: Bearer ${P||"YOUR_KEY"}"${et?` \\
47
- -H "x-connection-id: ${et}"`:""}${ef?` \\
48
- -H "Accept: text/event-stream"`:""}`,ev=`curl -X ${o.endpoint.method} ${I}${eg} \\
49
- ${ey.replace(/\\\n /g,"\\\n ")} \\
50
- -d '${JSON.stringify(eh)}'${eb?" \\\n --output image.png":""}`,ej=async()=>{if(!j.trim()||!ei)return;if(Y(!0),Q(""),B(null),U(null),z(null),H){try{URL.revokeObjectURL(H)}catch{}W("")}let e=Date.now();try{let t={"Content-Type":"application/json"};P&&(t.Authorization=`Bearer ${P}`),et&&(t["x-connection-id"]=et),ef&&(t.Accept="text/event-stream");let s={...eh,model:ei},a=await fetch(`/api${eg}`,{method:o.endpoint.method,headers:t,body:JSON.stringify(s)});if(!a.ok){let e=await a.json().catch(()=>({}));Q(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);W(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?U(e):"partial_image"===s?z(e):"done"===s?o=e:"error"===s&&(l=e?.message||"Stream error")}catch{}}}let n=Date.now()-e;if(l)return void Q(l);o&&B({data:o,latencyMs:n})}else{let t=await a.json(),s=Date.now()-e;B({data:t,latencyMs:s})}}catch(e){Q(e.message||"Network error")}finally{Y(!1)}},ew=e=>{if(!e||"object"!=typeof e)return e;if(Array.isArray(e))return e.map(ew);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>`:ew(a);return t},eN=L?JSON.stringify(ew(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)(C,{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)(C,{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)(C,{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:[I,en]})})}),(0,a.jsx)(C,{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:P?`${P.slice(0,8)}${"•".repeat(Math.min(20,P.length-8))}`:(0,a.jsx)("span",{className:"text-text-muted italic",children:"No key configured"})})}),X.length>0&&(0,a.jsx)(C,{label:"Connection",children:(0,a.jsxs)("select",{value:et,onChange:e=>es(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)"}),X.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)(C,{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)(C,{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:N,onChange:e=>k(e.target.value),placeholder:ed.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"}),N&&(0,a.jsx)("button",{type:"button",onClick:()=>k(""),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)(_.default,{src:eu,alt:"Reference",width:640,height:320,unoptimized:!0,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"}})]})}),g&&(0,a.jsx)(C,{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=>E(e.target.value),placeholder:ed.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:()=>E(""),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"})})]}),ep&&(0,a.jsx)(_.default,{src:ep,alt:"Mask",width:640,height:320,unoptimized:!0,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)(C,{label:e.label,children:"select"===e.type?(0,a.jsx)("select",{value:A[e.key]??"",onChange:t=>T(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:A[e.key]??"",placeholder:e.placeholder,onChange:t=>T(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:A[e.key]??"",min:e.min,max:e.max,onChange:t=>T(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)(C,{label:"Output Format",children:(0,a.jsxs)("select",{value:J,onChange:e=>V(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:()=>er(ev),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:ea?"check":"content_copy"}),ea?"Copied":"Copy"]}),(0,a.jsxs)("button",{onClick:ej,disabled:G||!j.trim()||!ei,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:G?{animation:"spin 1s linear infinite"}:void 0,children:"play_arrow"}),G?"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:ev})]}),(G||D)&&ef&&(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:G?{animation:"spin 1s linear infinite"}:void 0,children:G?"progress_activity":"check_circle"}),(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:[D?.stage||"starting",!G&&D?.bytesReceived?` \xb7 ${(D.bytesReceived/1024).toFixed(1)} KB`:""]})]}),q?.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)(_.default,{src:`data:image/png;base64,${q.b64_json}`,alt:"Partial",width:1024,height:1024,unoptimized:!0,className:"max-w-full rounded-lg border border-border mt-1.5 opacity-80"})]}),Z&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:Z}),(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:()=>el(eN),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:eo?"check":"content_copy"}),eo?"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?eN:l.defaultResponse}),"image"===t&&(H||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:H||(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)(_.default,{src:H||(L?.data?.data?.[0]?.b64_json?`data:image/png;base64,${L.data.data[0].b64_json}`:L?.data?.data?.[0]?.url),alt:"Generated",width:1024,height:1024,unoptimized:!0,className:"max-w-full rounded-lg border border-border"})]})]})]})]})}function K({providerId:e}){let t=(0,c.wG)(e),s=(0,y.KC)(e).filter(e=>"stt"===(0,y.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)(""),[g,j]=(0,n.useState)(""),[w,N]=(0,n.useState)("json"),[k,S]=(0,n.useState)(""),[$,E]=(0,n.useState)(""),[A,T]=(0,n.useState)(""),[P,R]=(0,n.useState)(null),[I,_]=(0,n.useState)(null),[O,M]=(0,n.useState)(!1),[F,L]=(0,n.useState)(""),{copied:B,copy:D}=(0,v.C)(),{copied:U,copy:q}=(0,v.C)();(0,n.useEffect)(()=>{T(window.location.origin),fetch("/api/keys").then(e=>e.json()).then(e=>{E((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,y.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 z=d?`${t}/${d}`:"",J=`curl -X POST ${A}/v1/audio/transcriptions \\
51
- -H "Authorization: Bearer ${$||"YOUR_KEY"}" \\
52
- -F "file=@${x?.name||"audio.mp3"}" \\
53
- -F "model=${z}"${p.includes("language")&&b?` \\
54
- -F "language=${b}"`:""}${p.includes("response_format")?` \\
55
- -F "response_format=${w}"`:""}${p.includes("temperature")&&k?` \\
56
- -F "temperature=${k}"`:""}${p.includes("prompt")&&g?` \\
57
- -F "prompt=${g}"`:""}`,V=async()=>{if(!x||!z)return;M(!0),L(""),R(null);let e=Date.now();try{let t=new FormData;t.append("file",x),t.append("model",z),p.includes("language")&&b&&t.append("language",b),p.includes("response_format")&&t.append("response_format",w),p.includes("temperature")&&k&&t.append("temperature",k),p.includes("prompt")&&g&&t.append("prompt",g);let s={};$&&(s.Authorization=`Bearer ${$}`);let a=await fetch("/api/v1/audio/transcriptions",{method:"POST",headers:s,body:t});_(Date.now()-e);let r=(a.headers.get("content-type")||"").includes("application/json")?await a.json():await a.text();if(!a.ok)return void L(r?.error?.message||r?.error||r||`HTTP ${a.status}`);R(r)}catch(e){L(e.message||"Network error")}finally{M(!1)}},H="string"==typeof P?P:P?JSON.stringify(P,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)(C,{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)(C,{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)(C,{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:[A,"/v1/audio/transcriptions"]})})}),(0,a.jsx)(C,{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)(C,{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)(C,{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)(C,{label:"Prompt",children:(0,a.jsx)("input",{value:g,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)(C,{label:"Temperature",children:(0,a.jsx)("input",{type:"number",step:"0.1",min:"0",max:"1",value:k,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)(C,{label:"Response Format",children:(0,a.jsxs)("select",{value:w,onChange:e=>N(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:()=>D(J),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:B?"check":"content_copy"}),B?"Copied":"Copy"]}),(0,a.jsxs)("button",{onClick:V,disabled:O||!x||!z,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:O?{animation:"spin 1s linear infinite"}:void 0,children:"play_arrow"}),O?"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:J})]}),F&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:F}),(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 ",P&&I&&(0,a.jsxs)("span",{className:"font-normal normal-case",children:["⚡ ",I,"ms"]})]}),P&&(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})]})]})]})}var L=s(77251);function B(){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(await (0,L.l)({message:"Delete this Custom Embedding node?",confirmText:"Continue"}))try{(await fetch(`/api/provider-nodes/${t}`,{method:"DELETE"})).ok&&s.push(`/dashboard/media-providers/${e}`)}catch(e){(0,j.s)("Error deleting custom embedding node:",e)}},[p,x]=(0,n.useState)(null),[h,b]=(0,n.useState)(m),[f,y]=(0,n.useState)(!1);if((0,n.useEffect)(()=>{if(!m)return;let e=!1;return fetch("/api/provider-nodes",{cache:"no-store"}).then(e=>e.json()).then(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],w=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"]:w.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:`${w.color}15`},children:(0,a.jsx)(d.A,{src:`/providers/${w.id}.png`,alt:w.name,size:48,className:"object-contain rounded-lg max-w-[48px] max-h-[48px]",fallbackText:w.textIcon||w.id.slice(0,2).toUpperCase(),fallbackColor:w.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:w.name}),!m&&w.notice?.apiKeyUrl&&(0,a.jsxs)("a",{href:w.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&&w.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:w.kindNotice[e]})]}),!m&&w.notice?.text&&!w.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:w.notice.text}),w.notice.apiKeyUrl&&(0,a.jsx)("a",{href:w.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&&w.noAuth?(0,a.jsx)(i.gw,{providerId:t}):(0,a.jsx)(g,{providerId:t,isOAuth:!1}),"tts"!==e&&"webSearch"!==e&&"webFetch"!==e&&(0,a.jsx)(k,{providerId:t,kindFilter:e,providerAliasOverride:m?p?.prefix:void 0}),!m&&(w.searchConfig||w.fetchConfig||w.ttsConfig||w.sttConfig||w.embeddingConfig||w.searchViaChat)&&(0,a.jsx)(i.Wx,{config:"webFetch"===e?w.fetchConfig:"tts"===e?w.ttsConfig:"stt"===e?w.sttConfig:"embedding"===e?w.embeddingConfig:w.searchConfig||{mode:"chat-completions",defaultModel:w.searchViaChat?.defaultModel,pricingUrl:w.searchViaChat?.pricingUrl,freeTier:w.searchViaChat?.freeTier},provider:w,title:`${o.label} Config`}),"embedding"===e&&(0,a.jsx)(E,{providerId:t,customAlias:p?.prefix}),"tts"===e&&(0,a.jsx)(I,{providerId:t}),"stt"===e&&!m&&(0,a.jsx)(K,{providerId:t}),!m&&S[e]&&(0,a.jsx)(F,{providerId:t,kind:e}),m&&(0,a.jsx)(i.x0,{isOpen:f,node:p,onClose:()=>y(!1),onSaved:e=>{x(e),y(!1)}})]}):(0,r.notFound)()}},70217:(e,t,s)=>{"use strict";function a(e,t){return!1===e?"default":"active"===t||"success"===t?"success":"error"===t||"expired"===t||"unavailable"===t?"error":"default"}s.d(t,{g:()=>a})}},e=>{e.O(0,[2574,3862,782,8500,594,1321,7592,5497,8441,3794,7358],()=>e(e.s=17845)),_N_E=e.O()}]);
@@ -1,4 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8334],{22662:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>g});var a=s(95155),l=s(73321),r=s(12115),i=s(98500),n=s.n(i),o=s(35497),d=s(57250),c=s(88105),m=s(78559),x=s(77251),h=s(5772);let u=/^[a-zA-Z0-9_.\-]+$/,p={webSearch:"Web Search",webFetch:"Web Fetch",image:"Text to Image",tts:"Text To Speech"},b={webSearch:"/v1/search",webFetch:"/v1/web/fetch",image:"/v1/images/generations",tts:"/v1/audio/speech"},f={webSearch:e=>({model:e,query:"What is the latest news about AI?",search_type:"web",max_results:5}),webFetch:e=>({model:e,url:"https://example.com",format:"markdown"}),image:e=>({model:e,prompt:"A cute cat playing piano",n:1,size:"1024x1024"}),tts:e=>({model:e,input:"Hello, this is a test.",voice:"alloy"})};function j(e){return"webSearch"===e||"webFetch"===e?"/dashboard/media-providers/web":`/dashboard/media-providers/${e}`}function g(){let{id:e}=(0,l.useParams)(),t=(0,l.useRouter)(),[s,i]=(0,r.useState)(null),[g,w]=(0,r.useState)(!0),[y,v]=(0,r.useState)(""),[N,k]=(0,r.useState)(""),[S,U]=(0,r.useState)([]),[$,C]=(0,r.useState)(!1),[O,_]=(0,r.useState)(!1),[T,R]=(0,r.useState)([]),[A,L]=(0,r.useState)(!1),[P,z]=(0,r.useState)(null),[E,D]=(0,r.useState)(""),[F,M]=(0,r.useState)(""),[I,J]=(0,r.useState)([]),[W,H]=(0,r.useState)({}),Z=async()=>{try{let[t,s,a,l,r,n]=await Promise.all([fetch(`/api/combos/${e}`,{cache:"no-store"}),fetch("/api/settings",{cache:"no-store"}),fetch("/api/usage/logs",{cache:"no-store"}),fetch("/api/keys",{cache:"no-store"}),fetch("/api/providers",{cache:"no-store"}),fetch("/api/models/alias",{cache:"no-store"})]);if(n.ok&&H((await n.json()).aliases||{}),l.ok){let e=await l.json();M((e.keys||[]).find(e=>!1!==e.isActive)?.key||"")}if(r.ok&&J((await r.json()).connections||[]),!t.ok){i(null),w(!1);return}let o=await t.json();i(o),v(o.name),U(o.models||[]);let d=s.ok?await s.json():{};C(d.comboStrategies?.[o.name]?.fallbackStrategy==="round-robin");let c=a.ok?await a.json():[];R(c.filter(e=>"string"==typeof e&&e.includes(o.name)).slice(0,50))}catch{}w(!1)};(0,r.useEffect)(()=>{Z()},[e]);let q=e=>e.trim()?u.test(e)?(k(""),!0):(k("Only letters, numbers, -, _ and ."),!1):(k("Name is required"),!1),B=async t=>{let s=await fetch(`/api/combos/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!s.ok){let e=await s.json();return(0,m.s)(e.error||"Failed to save"),!1}return!0},Y=async()=>{!q(y)||y===s.name||await B({name:y})&&await Z()},G=async e=>{let t=e?.value||e;if(!t||S.includes(t))return;let s=[...S,t];U(s),await B({models:s})},K=async e=>{let t=e?.value||e;if(!t||!S.includes(t))return;let s=S.filter(e=>e!==t);U(s),await B({models:s})},Q=async e=>{let t=S.filter((t,s)=>s!==e);U(t),await B({models:t})},V=async(e,t)=>{let s=[...S],a=e+t;a<0||a>=s.length||([s[e],s[a]]=[s[a],s[e]],U(s),await B({models:s}))},X=async e=>{C(e);let t=await fetch("/api/settings",{cache:"no-store"}),a={...(t.ok?await t.json():{}).comboStrategies||{}};e?a[s.name]={fallbackStrategy:"round-robin"}:delete a[s.name],await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStrategies:a})})},ee=async()=>{!await (0,x.l)({message:`Delete combo "${s.name?.trim()||e}"?`,confirmText:"Continue"})||(await fetch(`/api/combos/${e}`,{method:"DELETE"})).ok&&t.push(j(s.kind))},et=async()=>{if(L(!0),z(null),D(""),P?.audioUrl)try{URL.revokeObjectURL(P.audioUrl)}catch{}if(P?.imageUrl?.startsWith("blob:"))try{URL.revokeObjectURL(P.imageUrl)}catch{}let e=Date.now();try{let t=b[s.kind],a=f[s.kind](s.name),l={"Content-Type":"application/json"};F&&(l.Authorization=`Bearer ${F}`);let r=await fetch(`/api${t}`,{method:"POST",headers:l,body:JSON.stringify(a)}),i=Date.now()-e;if(!r.ok){let e=await r.json().catch(()=>({}));D(e?.error?.message||e?.error||`HTTP ${r.status}`),z({json:JSON.stringify(e,null,2),latencyMs:i});return}let n=r.headers.get("content-type")||"";if(n.startsWith("image/")){let e=await r.blob();z({imageUrl:URL.createObjectURL(e),latencyMs:i});return}if(n.startsWith("audio/")||"application/octet-stream"===n){let e=await r.blob();z({audioUrl:URL.createObjectURL(e),latencyMs:i});return}let o=await r.json(),d=o?.data?.[0],c=d?.b64_json?`data:image/png;base64,${d.b64_json}`:d?.url||"";z({json:JSON.stringify(function e(t){if(!t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(e);let s={};for(let[a,l]of Object.entries(t))s[a]="b64_json"===a&&"string"==typeof l&&l.length>100?`<${l.length} chars base64>`:e(l);return s}(o),null,2),imageUrl:c,latencyMs:i})}catch(e){D(e.message||"Network error")}L(!1)};if(g)return(0,a.jsx)("div",{className:"text-text-muted text-sm",children:"Loading..."});if(!s)return(0,l.notFound)();let es=p[s.kind]||c.rj.find(e=>e.id===s.kind)?.label||"Combo",ea=b[s.kind],el=s.kind&&f[s.kind]?f[s.kind](s.name):null,er=ea?`curl -X POST http://localhost:20128${ea} \\
2
- -H "Content-Type: application/json" \\
3
- -H "Authorization: Bearer ${F||"YOUR_KEY"}" \\
4
- -d '${JSON.stringify(el)}'`:"",ei=j(s.kind);return(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 min-w-0",children:[(0,a.jsx)(n(),{href:ei,className:"text-text-muted hover:text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined",children:"arrow_back"})}),(0,a.jsx)("div",{className:"size-10 rounded-lg bg-primary/10 flex items-center justify-center",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-primary",children:"layers"})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:[es," Combo"]}),(0,a.jsx)("code",{className:"text-lg font-semibold font-mono",children:s.name})]})]}),(0,a.jsx)(o.$n,{variant:"outline",icon:"delete",onClick:ee,className:"text-red-500 border-red-200 hover:bg-red-50",children:"Delete"})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold mb-3",children:"Settings"}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(o.pd,{label:"Combo Name",value:y,onChange:e=>{v(e.target.value),q(e.target.value)},onBlur:Y,error:N}),(0,a.jsx)("p",{className:"text-[10px] text-text-muted mt-0.5",children:"Only letters, numbers, -, _ and ."})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:"Round Robin"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Rotate providers across requests instead of strict fallback order."})]}),(0,a.jsx)(o.lM,{checked:$,onChange:X})]})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-3",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Providers"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Tried in order (top-down) or rotated when round-robin is on."})]}),(0,a.jsx)(o.$n,{size:"sm",icon:"add",onClick:()=>_(!0),children:"Add Provider"})]}),0===S.length?(0,a.jsx)("div",{className:"text-center py-6 border border-dashed border-border rounded-lg text-text-muted text-sm",children:"No providers yet."}):(0,a.jsx)("div",{className:"flex flex-col gap-2",children:S.map((e,t)=>{let{providerId:s,model:l}=function(e){if("string"!=typeof e)return{providerId:"",model:""};let t=e.indexOf("/");return t<0?{providerId:e,model:""}:{providerId:e.slice(0,t),model:e.slice(t+1)}}(e),r=c.Q2[s];return(0,a.jsxs)("div",{className:"flex items-center gap-3 p-2 rounded-lg bg-black/[0.02] dark:bg-white/[0.02]",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted w-5 text-center",children:t+1}),(0,a.jsx)(d.A,{src:`/providers/${s}.png`,alt:r?.name||s,size:24,className:"object-contain rounded shrink-0",fallbackText:r?.textIcon||s.slice(0,2).toUpperCase(),fallbackColor:r?.color}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("div",{className:"text-sm font-medium truncate",children:r?.name||s}),l&&(0,a.jsx)("code",{className:"text-[10px] text-text-muted font-mono truncate block",children:l})]}),(0,a.jsxs)("div",{className:"flex items-center gap-0.5",children:[(0,a.jsx)("button",{onClick:()=>V(t,-1),disabled:0===t,className:`p-1 rounded ${0===t?"text-text-muted/20":"text-text-muted hover:text-primary hover:bg-black/5"}`,title:"Move up",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"arrow_upward"})}),(0,a.jsx)("button",{onClick:()=>V(t,1),disabled:t===S.length-1,className:`p-1 rounded ${t===S.length-1?"text-text-muted/20":"text-text-muted hover:text-primary hover:bg-black/5"}`,title:"Move down",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"arrow_downward"})}),(0,a.jsx)("button",{onClick:()=>Q(t),className:"p-1 rounded text-text-muted hover:text-red-500 hover:bg-red-500/10",title:"Remove",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"close"})})]})]},`${e}-${t}`)})})]}),s.kind&&ea&&(0,a.jsxs)(o.Zp,{children:[(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-3",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Test Example"}),(0,a.jsx)(o.$n,{size:"sm",icon:"play_arrow",onClick:et,disabled:A||0===S.length,children:A?"Running...":"Run"})]}),(0,a.jsx)("pre",{className:"text-xs font-mono bg-black/[0.03] dark:bg-white/[0.03] p-3 rounded-lg overflow-x-auto whitespace-pre-wrap break-all",children:er}),E&&(0,a.jsx)("p",{className:"mt-3 text-xs text-red-500 break-words",children:E}),P&&(0,a.jsxs)("div",{className:"mt-3 flex flex-col gap-3",children:[null!=P.latencyMs&&(0,a.jsxs)("span",{className:"text-[11px] text-text-muted",children:["⚡ ",P.latencyMs,"ms"]}),P.imageUrl&&(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"flex items-center justify-end mb-1.5",children:(0,a.jsxs)("a",{href:P.imageUrl,download:"image.png",className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"download"}),"Download"]})}),(0,a.jsx)(h.default,{src:P.imageUrl,alt:"Generated",width:1024,height:1024,unoptimized:!0,className:"max-w-full rounded-lg border border-border"})]}),P.audioUrl&&(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"flex items-center justify-end mb-1.5",children:(0,a.jsxs)("a",{href:P.audioUrl,download:"speech.mp3",className:"inline-flex items-center gap-1 text-xs text-text-muted hover:text-primary transition-colors",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"download"}),"Download"]})}),(0,a.jsx)("audio",{controls:!0,src:P.audioUrl,className:"w-full"})]}),P.json&&(0,a.jsx)("pre",{className:"text-xs font-mono bg-black/[0.03] dark:bg-white/[0.03] p-3 rounded-lg overflow-auto max-h-[300px] whitespace-pre-wrap break-all",children:P.json})]})]}),(0,a.jsxs)(o.Zp,{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold mb-3",children:"Usage Logs"}),0===T.length?(0,a.jsx)("p",{className:"text-xs text-text-muted italic",children:"No usage yet."}):(0,a.jsx)("pre",{className:"text-[11px] font-mono bg-black/[0.03] dark:bg-white/[0.03] p-3 rounded-lg overflow-auto max-h-[400px] whitespace-pre-wrap",children:T.join("\n")})]}),(0,a.jsx)(o.rq,{isOpen:O,onClose:()=>_(!1),onSelect:G,onDeselect:K,activeProviders:I,modelAliases:W,title:`Add ${es} Model`,kindFilter:s.kind,addedModelValues:S,closeOnSelect:!1})]})}},69701:(e,t,s)=>{Promise.resolve().then(s.bind(s,22662))}},e=>{e.O(0,[2574,3862,782,8500,594,1321,7592,5497,8441,3794,7358],()=>e(e.s=69701)),_N_E=e.O()}]);