switchboard-router 0.9.2 → 0.9.3

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 (253) hide show
  1. package/app/.next/static/chunks/{1321-4de88db4bd94a23c.js → 1321-6bd6f91d24e9863e.js} +1 -1
  2. package/app/.next/static/chunks/1330-56405eca78b12fee.js +7 -0
  3. package/app/{.next-cli-build/static/chunks/3531-936a1e7912d9876c.js → .next/static/chunks/3531-eb5d385c954b3765.js} +7 -7
  4. package/app/.next/static/chunks/app/(dashboard)/dashboard/agent-library/page-cf3bc192f7a27304.js +1 -0
  5. package/app/.next/static/chunks/app/(dashboard)/dashboard/basic-chat/page-0e1d54e59ac767a1.js +1 -0
  6. package/app/.next/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/{page-d7205b7328b3fed1.js → page-af0d85c06970853b.js} +1 -1
  7. package/app/.next/static/chunks/app/(dashboard)/dashboard/cli-tools/{page-d0b6efe01e687aec.js → page-2cfc2352bc42d9b8.js} +1 -1
  8. package/app/.next/static/chunks/app/(dashboard)/dashboard/combos/page-62cd36ee99eaa630.js +1 -0
  9. package/app/.next/static/chunks/app/(dashboard)/dashboard/combos/routing/page-0b02e9a2f1cc6e43.js +1 -0
  10. package/app/.next/static/chunks/app/(dashboard)/dashboard/console-log/page-ded6ec41e583b3b3.js +1 -0
  11. package/app/.next/static/chunks/app/(dashboard)/dashboard/endpoint/page-ca47b09e6ed6ae7b.js +16 -0
  12. package/app/.next/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/{page-772f246688672d59.js → page-78d098f14f8cff05.js} +8 -8
  13. package/app/.next/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/page-d1654fba27199492.js +1 -0
  14. package/app/.next/static/chunks/app/(dashboard)/dashboard/media-providers/combo/[id]/{page-8554ba79c854167f.js → page-ff13a39fb7744f5e.js} +3 -3
  15. package/app/.next/static/chunks/app/(dashboard)/dashboard/media-providers/page-919f3eec8dfc9b6e.js +1 -0
  16. package/app/.next/static/chunks/app/(dashboard)/dashboard/media-providers/web/page-db19da41661d630b.js +1 -0
  17. package/app/.next/static/chunks/app/(dashboard)/dashboard/mitm/{page-8779ff2bc755ba78.js → page-309b09a142a2995d.js} +1 -1
  18. package/app/.next/static/chunks/app/(dashboard)/dashboard/page-86cd6523dcd61f1b.js +1 -0
  19. package/app/.next/static/chunks/app/(dashboard)/dashboard/profile/{page-d32871b974f7e72f.js → page-ae6cf9ce7ac84eb7.js} +1 -1
  20. package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/[id]/{page-d8610d9b77a2cae4.js → page-97e0f7067cab0724.js} +3 -3
  21. package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/new/page-413b59dd764a1563.js +1 -0
  22. package/app/{.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-555f079cdf31bbf6.js → .next/static/chunks/app/(dashboard)/dashboard/providers/page-31212a5a4a9825b0.js} +1 -1
  23. package/app/.next/static/chunks/app/(dashboard)/dashboard/pxpipe/page-1805f993834a1adb.js +1 -0
  24. package/app/.next/static/chunks/app/(dashboard)/dashboard/quota/page-798a65a8c4d2708a.js +1 -0
  25. package/app/.next/static/chunks/app/(dashboard)/dashboard/skills/[id]/page-aba614778bfe50ad.js +1 -0
  26. package/app/.next/static/chunks/app/(dashboard)/dashboard/skills/page-b1e9603ce7be0155.js +1 -0
  27. package/app/.next/static/chunks/app/(dashboard)/dashboard/token-saver/page-1711a424a8dcad0e.js +1 -0
  28. package/app/.next/static/chunks/app/(dashboard)/dashboard/translator/page-0c7b901caf8614b9.js +1 -0
  29. package/app/.next/static/chunks/app/(dashboard)/dashboard/usage/page-b085086e6c5b9387.js +1 -0
  30. package/app/.next/static/chunks/app/(dashboard)/{layout-62b4e2cdf745f8d0.js → layout-59baac68c7aedd25.js} +1 -1
  31. package/app/.next/static/css/c5928b380ef8a163.css +1 -0
  32. package/app/.next-cli-build/BUILD_ID +1 -1
  33. package/app/.next-cli-build/app-path-routes-manifest.json +6 -6
  34. package/app/.next-cli-build/build-manifest.json +2 -2
  35. package/app/.next-cli-build/prerender-manifest.json +3 -3
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/agent-library/page.js +1 -1
  37. package/app/.next-cli-build/server/app/(dashboard)/dashboard/agent-library/page_client-reference-manifest.js +1 -1
  38. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +1 -1
  39. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  42. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +1 -1
  43. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  44. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/routing/page.js +1 -1
  45. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/routing/page_client-reference-manifest.js +1 -1
  46. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +1 -1
  47. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  48. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +15 -2
  49. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  50. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +1 -1
  51. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  52. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +1 -1
  53. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  54. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +1 -1
  55. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  56. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/page.js +1 -1
  57. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/page_client-reference-manifest.js +1 -1
  58. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +1 -1
  59. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  60. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  61. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +1 -1
  62. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  63. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +1 -1
  64. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  65. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +2 -2
  66. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  67. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +1 -1
  68. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  69. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +1 -1
  70. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  71. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js +1 -1
  72. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
  73. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +1 -1
  74. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  75. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/[id]/page.js +1 -1
  76. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/[id]/page_client-reference-manifest.js +1 -1
  77. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +1 -1
  78. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  79. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +1 -1
  80. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  81. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +1 -1
  82. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  83. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +1 -1
  84. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  85. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  86. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  87. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  88. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  89. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  90. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  91. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  92. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  93. package/app/.next-cli-build/server/app/_not-found.rsc +4 -4
  94. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +4 -4
  95. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +4 -4
  96. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  97. package/app/.next-cli-build/server/app/api/cli-tools/aider-settings/route.js +2 -2
  98. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +5 -5
  99. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
  100. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +2 -2
  101. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
  102. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +2 -2
  103. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +1 -1
  104. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +2 -2
  105. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +1 -1
  106. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +2 -2
  107. package/app/.next-cli-build/server/app/api/cli-tools/gemini-cli-settings/route.js +3 -3
  108. package/app/.next-cli-build/server/app/api/cli-tools/grok-settings/route.js +3 -3
  109. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +3 -3
  110. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +2 -2
  111. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +2 -2
  112. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
  113. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +1 -1
  114. package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js +1 -1
  115. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  116. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
  117. package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  118. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  119. package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  120. package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  121. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  122. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  123. package/app/.next-cli-build/server/app/callback.html +1 -1
  124. package/app/.next-cli-build/server/app/callback.rsc +4 -4
  125. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +4 -4
  126. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
  127. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +4 -4
  128. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  129. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  130. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +4 -4
  131. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +4 -4
  132. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
  133. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +4 -4
  134. package/app/.next-cli-build/server/app/index.html +1 -1
  135. package/app/.next-cli-build/server/app/index.rsc +4 -4
  136. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +4 -4
  137. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +4 -4
  138. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +2 -2
  139. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  140. package/app/.next-cli-build/server/app/landing.html +1 -1
  141. package/app/.next-cli-build/server/app/landing.rsc +4 -4
  142. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +4 -4
  143. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
  144. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +4 -4
  145. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  146. package/app/.next-cli-build/server/app/login.html +1 -1
  147. package/app/.next-cli-build/server/app/login.rsc +4 -4
  148. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +4 -4
  149. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
  150. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +4 -4
  151. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  152. package/app/.next-cli-build/server/app-paths-manifest.json +6 -6
  153. package/app/.next-cli-build/server/chunks/1350.js +1 -1
  154. package/app/.next-cli-build/server/chunks/194.js +1 -1
  155. package/app/.next-cli-build/server/chunks/6395.js +1 -1
  156. package/app/.next-cli-build/server/chunks/6406.js +1 -1
  157. package/app/.next-cli-build/server/chunks/646.js +1 -1
  158. package/app/.next-cli-build/server/chunks/6985.js +1 -1
  159. package/app/.next-cli-build/server/chunks/7454.js +1 -1
  160. package/app/.next-cli-build/server/chunks/869.js +1 -1
  161. package/app/.next-cli-build/server/chunks/8834.js +1 -1
  162. package/app/.next-cli-build/server/chunks/8976.js +1 -1
  163. package/app/.next-cli-build/server/chunks/8998.js +9 -9
  164. package/app/.next-cli-build/server/chunks/9261.js +6 -6
  165. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  166. package/app/.next-cli-build/server/pages/404.html +1 -1
  167. package/app/.next-cli-build/server/pages/500.html +1 -1
  168. package/app/.next-cli-build/server/server-reference-manifest.js +1 -1
  169. package/app/.next-cli-build/server/server-reference-manifest.json +1 -1
  170. package/app/.next-cli-build/static/chunks/{1321-4de88db4bd94a23c.js → 1321-6bd6f91d24e9863e.js} +1 -1
  171. package/app/.next-cli-build/static/chunks/1330-56405eca78b12fee.js +7 -0
  172. package/app/{.next/static/chunks/3531-936a1e7912d9876c.js → .next-cli-build/static/chunks/3531-eb5d385c954b3765.js} +7 -7
  173. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/agent-library/page-cf3bc192f7a27304.js +1 -0
  174. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/basic-chat/page-0e1d54e59ac767a1.js +1 -0
  175. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/{page-d7205b7328b3fed1.js → page-af0d85c06970853b.js} +1 -1
  176. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/{page-d0b6efe01e687aec.js → page-2cfc2352bc42d9b8.js} +1 -1
  177. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-62cd36ee99eaa630.js +1 -0
  178. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/routing/page-0b02e9a2f1cc6e43.js +1 -0
  179. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/page-ded6ec41e583b3b3.js +1 -0
  180. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-ca47b09e6ed6ae7b.js +16 -0
  181. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/{page-772f246688672d59.js → page-78d098f14f8cff05.js} +8 -8
  182. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/page-d1654fba27199492.js +1 -0
  183. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/combo/[id]/{page-8554ba79c854167f.js → page-ff13a39fb7744f5e.js} +3 -3
  184. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/page-919f3eec8dfc9b6e.js +1 -0
  185. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/web/page-db19da41661d630b.js +1 -0
  186. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/{page-8779ff2bc755ba78.js → page-309b09a142a2995d.js} +1 -1
  187. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-86cd6523dcd61f1b.js +1 -0
  188. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/{page-d32871b974f7e72f.js → page-ae6cf9ce7ac84eb7.js} +1 -1
  189. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/{page-d8610d9b77a2cae4.js → page-97e0f7067cab0724.js} +3 -3
  190. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/new/page-413b59dd764a1563.js +1 -0
  191. package/app/{.next/static/chunks/app/(dashboard)/dashboard/providers/page-555f079cdf31bbf6.js → .next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-31212a5a4a9825b0.js} +1 -1
  192. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/pxpipe/page-1805f993834a1adb.js +1 -0
  193. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-798a65a8c4d2708a.js +1 -0
  194. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/[id]/page-aba614778bfe50ad.js +1 -0
  195. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/page-b1e9603ce7be0155.js +1 -0
  196. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/page-1711a424a8dcad0e.js +1 -0
  197. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/translator/page-0c7b901caf8614b9.js +1 -0
  198. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/page-b085086e6c5b9387.js +1 -0
  199. package/app/.next-cli-build/static/chunks/app/(dashboard)/{layout-62b4e2cdf745f8d0.js → layout-59baac68c7aedd25.js} +1 -1
  200. package/app/.next-cli-build/static/css/c5928b380ef8a163.css +1 -0
  201. package/app/open-sse/identity/tls/bin/darwin/arm64/switchboard-claude-tls +0 -0
  202. package/app/open-sse/identity/tls/bin/darwin/x64/switchboard-claude-tls +0 -0
  203. package/app/open-sse/identity/tls/bin/linux/arm64/switchboard-claude-tls +0 -0
  204. package/app/open-sse/identity/tls/bin/linux/x64/switchboard-claude-tls +0 -0
  205. package/app/open-sse/identity/tls/bin/win32/arm64/switchboard-claude-tls.exe +0 -0
  206. package/app/open-sse/identity/tls/bin/win32/x64/switchboard-claude-tls.exe +0 -0
  207. package/app/package.json +1 -1
  208. package/package.json +1 -1
  209. package/src/cli/api/client.js +1 -1
  210. package/app/.next/static/chunks/5497-78bd7208dc4a083d.js +0 -7
  211. package/app/.next/static/chunks/app/(dashboard)/dashboard/agent-library/page-24b5a8515eee26d6.js +0 -1
  212. package/app/.next/static/chunks/app/(dashboard)/dashboard/basic-chat/page-4ec8bfa73afe20a6.js +0 -1
  213. package/app/.next/static/chunks/app/(dashboard)/dashboard/combos/page-5cfdfdf507c8222f.js +0 -1
  214. package/app/.next/static/chunks/app/(dashboard)/dashboard/combos/routing/page-25629f96675ad55d.js +0 -1
  215. package/app/.next/static/chunks/app/(dashboard)/dashboard/console-log/page-b54cd17200807e49.js +0 -1
  216. package/app/.next/static/chunks/app/(dashboard)/dashboard/endpoint/page-cd44cb44125275b6.js +0 -3
  217. package/app/.next/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/page-52c12af07f9a6de0.js +0 -1
  218. package/app/.next/static/chunks/app/(dashboard)/dashboard/media-providers/page-0f54c9a5e7391a77.js +0 -1
  219. package/app/.next/static/chunks/app/(dashboard)/dashboard/media-providers/web/page-cfbd3661ac75b8c5.js +0 -1
  220. package/app/.next/static/chunks/app/(dashboard)/dashboard/page-c33d24bdadcf0c6e.js +0 -1
  221. package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/new/page-74d56b3b7ac42546.js +0 -1
  222. package/app/.next/static/chunks/app/(dashboard)/dashboard/pxpipe/page-bd18ad88b98cd373.js +0 -1
  223. package/app/.next/static/chunks/app/(dashboard)/dashboard/quota/page-b3ffcc7df06a37d8.js +0 -1
  224. package/app/.next/static/chunks/app/(dashboard)/dashboard/skills/[id]/page-56bf48ee2068208e.js +0 -1
  225. package/app/.next/static/chunks/app/(dashboard)/dashboard/skills/page-46986a955b8c89b2.js +0 -1
  226. package/app/.next/static/chunks/app/(dashboard)/dashboard/token-saver/page-20972a96e348f397.js +0 -1
  227. package/app/.next/static/chunks/app/(dashboard)/dashboard/translator/page-0cc2ccbe11cc0013.js +0 -1
  228. package/app/.next/static/chunks/app/(dashboard)/dashboard/usage/page-5af5fff7d28ed91d.js +0 -1
  229. package/app/.next/static/css/d89fdbc0e71b454e.css +0 -1
  230. package/app/.next-cli-build/static/chunks/5497-78bd7208dc4a083d.js +0 -7
  231. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/agent-library/page-24b5a8515eee26d6.js +0 -1
  232. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/basic-chat/page-4ec8bfa73afe20a6.js +0 -1
  233. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-5cfdfdf507c8222f.js +0 -1
  234. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/routing/page-25629f96675ad55d.js +0 -1
  235. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/page-b54cd17200807e49.js +0 -1
  236. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-cd44cb44125275b6.js +0 -3
  237. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/page-52c12af07f9a6de0.js +0 -1
  238. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/page-0f54c9a5e7391a77.js +0 -1
  239. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/web/page-cfbd3661ac75b8c5.js +0 -1
  240. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-c33d24bdadcf0c6e.js +0 -1
  241. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/new/page-74d56b3b7ac42546.js +0 -1
  242. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/pxpipe/page-bd18ad88b98cd373.js +0 -1
  243. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-b3ffcc7df06a37d8.js +0 -1
  244. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/[id]/page-56bf48ee2068208e.js +0 -1
  245. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/page-46986a955b8c89b2.js +0 -1
  246. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/page-20972a96e348f397.js +0 -1
  247. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/translator/page-0cc2ccbe11cc0013.js +0 -1
  248. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/page-5af5fff7d28ed91d.js +0 -1
  249. package/app/.next-cli-build/static/css/d89fdbc0e71b454e.css +0 -1
  250. /package/app/.next/static/{Fq0KReA64JGBdC8atypku → kGdbG3TEpkBeoqsRS2Mre}/_buildManifest.js +0 -0
  251. /package/app/.next/static/{Fq0KReA64JGBdC8atypku → kGdbG3TEpkBeoqsRS2Mre}/_ssgManifest.js +0 -0
  252. /package/app/.next-cli-build/static/{Fq0KReA64JGBdC8atypku → kGdbG3TEpkBeoqsRS2Mre}/_buildManifest.js +0 -0
  253. /package/app/.next-cli-build/static/{Fq0KReA64JGBdC8atypku → kGdbG3TEpkBeoqsRS2Mre}/_ssgManifest.js +0 -0
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9749],{35497:(e,a,l)=>{"use strict";l.d(a,{x0:()=>w.default,Ex:()=>o.default,$n:()=>t.default,nh:()=>E.default,Zp:()=>r.default,Qv:()=>n.CardSkeleton,CK:()=>f.default,uo:()=>i.ConfirmModal,G9:()=>g.default,wI:()=>_.default,vj:()=>N.default,vE:()=>j.default,pd:()=>d.default,Mh:()=>v.default,uR:()=>m.default,Nf:()=>b.default,aF:()=>i.default,rq:()=>x.default,gw:()=>S.default,LF:()=>u.default,Wx:()=>k.default,gM:()=>p.default,Iz:()=>y.default,l6:()=>s.default,lM:()=>c.default,m_:()=>T.default,jK:()=>h.default});var t=l(92542),d=l(11910),s=l(98),r=l(84588),i=l(81127),n=l(25086);l(56319);var o=l(56061),c=l(98542);l(38587),l(21110),l(92622),l(8823),l(92173);var u=l(90882),x=l(72908),m=l(28815),f=l(45455),b=l(28058),h=l(4809);l(21931),l(80752),l(40197);var p=l(23615);l(44736);var v=l(62899);l(94230);var g=l(30815),j=l(23936),N=l(95088),_=l(73579),w=l(96748),S=l(4823),y=l(28067),T=l(97677),k=l(51825),E=l(29366);l(76361),l(91450)},57767:(e,a,l)=>{"use strict";l.r(a),l.d(a,{default:()=>o});var t=l(95155),d=l(98500),s=l.n(d),r=l(35497),i=l(88105);let n=[{id:"image",label:"Text to Image",icon:"brush",blurb:"Image generation providers"},{id:"video",label:"Video",icon:"movie",blurb:"Video generation providers"},{id:"tts",label:"Text to Speech",icon:"record_voice_over",blurb:"Speech synthesis providers"},{id:"stt",label:"Speech to Text",icon:"mic",blurb:"Transcription providers"},{id:"embedding",label:"Embedding",icon:"data_array",blurb:"Vector embedding providers"},{id:"web",label:"Web Fetch & Search",icon:"travel_explore",blurb:"Search + page fetch providers"}];function o(){return(0,t.jsxs)("div",{className:"flex flex-col gap-5 max-w-3xl",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("h1",{className:"text-[17px] font-semibold text-text-main",children:"Media"}),(0,t.jsx)("p",{className:"text-xs font-mono text-text-subtle",children:"image \xb7 TTS \xb7 STT \xb7 embeddings \xb7 web — separate from agent Skills"})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:n.map(e=>{let a=i.rj.find(a=>a.id===e.id);return(0,t.jsx)(s(),{href:`/dashboard/media-providers/${e.id}`,className:"group",children:(0,t.jsx)(r.Zp,{padding:"sm",className:"h-full transition-colors group-hover:border-brand-500/40",children:(0,t.jsxs)("div",{className:"flex items-start gap-3",children:[(0,t.jsx)("div",{className:"size-9 rounded-lg bg-brand-500/10 text-primary flex items-center justify-center shrink-0",children:(0,t.jsx)("span",{className:"material-symbols-outlined text-[20px] leading-none",children:e.icon||a?.icon||"perm_media"})}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("h2",{className:"text-sm font-semibold text-text-main",children:e.label||a?.label||e.id}),(0,t.jsx)("span",{className:"material-symbols-outlined text-text-subtle text-[16px] group-hover:text-primary transition-colors",children:"chevron_right"})]}),(0,t.jsx)("p",{className:"text-xs text-text-muted mt-0.5",children:e.blurb})]})]})})},e.id)})})]})}},96434:(e,a,l)=>{Promise.resolve().then(l.bind(l,57767))}},e=>{e.O(0,[2574,3862,782,8500,594,1321,4707,1330,8441,3794,7358],()=>e(e.s=96434)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9260],{22637:(e,t,s)=>{Promise.resolve().then(s.bind(s,71088))},35497:(e,t,s)=>{"use strict";s.d(t,{x0:()=>y.default,Ex:()=>o.default,$n:()=>a.default,nh:()=>E.default,Zp:()=>l.default,Qv:()=>i.CardSkeleton,CK:()=>p.default,uo:()=>n.ConfirmModal,G9:()=>j.default,wI:()=>w.default,vj:()=>N.default,vE:()=>g.default,pd:()=>r.default,Mh:()=>v.default,uR:()=>h.default,Nf:()=>b.default,aF:()=>n.default,rq:()=>m.default,gw:()=>k.default,LF:()=>x.default,Wx:()=>$.default,gM:()=>u.default,Iz:()=>C.default,l6:()=>d.default,lM:()=>c.default,m_:()=>S.default,jK:()=>f.default});var a=s(92542),r=s(11910),d=s(98),l=s(84588),n=s(81127),i=s(25086);s(56319);var o=s(56061),c=s(98542);s(38587),s(21110),s(92622),s(8823),s(92173);var x=s(90882),m=s(72908),h=s(28815),p=s(45455),b=s(28058),f=s(4809);s(21931),s(80752),s(40197);var u=s(23615);s(44736);var v=s(62899);s(94230);var j=s(30815),g=s(23936),N=s(95088),w=s(73579),y=s(96748),k=s(4823),C=s(28067),S=s(97677),$=s(51825),E=s(29366);s(76361),s(91450)},54026:(e,t,s)=>{"use strict";s.d(t,{A:()=>o});var a=s(95155),r=s(98500),d=s.n(r),l=s(73321),n=s(31474);let i=[{id:"image",label:"Image",href:"/dashboard/media-providers/image"},{id:"tts",label:"TTS",href:"/dashboard/media-providers/tts"},{id:"stt",label:"STT",href:"/dashboard/media-providers/stt"},{id:"embedding",label:"Embedding",href:"/dashboard/media-providers/embedding"},{id:"web",label:"Web",href:"/dashboard/media-providers/web"}];function o({activeKind:e}){let t=(0,l.usePathname)(),s=e||i.find(e=>t===e.href||t.startsWith(`${e.href}/`))?.id||"";return(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5 mb-5",children:[(0,a.jsx)(d(),{href:"/dashboard/media-providers",className:(0,n.cn)("px-2.5 py-1 rounded-[7px] text-xs font-medium border transition-colors","/dashboard/media-providers"===t?"bg-brand-500/15 text-primary border-brand-500/40":"bg-transparent text-text-muted border-border hover:text-text-main hover:border-brand-500/30"),children:"All"}),i.map(e=>{let t=s===e.id;return(0,a.jsx)(d(),{href:e.href,className:(0,n.cn)("px-2.5 py-1 rounded-[7px] text-xs font-medium border transition-colors",t?"bg-brand-500/15 text-primary border-brand-500/40":"bg-transparent text-text-muted border-border hover:text-text-main hover:border-brand-500/30"),children:e.label},e.id)})]})}},71088:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>v});var a=s(95155),r=s(98500),d=s.n(r),l=s(12115),n=s(73321),i=s(35497),o=s(11059),c=s(57250),x=s(88105),m=s(54026),h=s(78559);function p(e){let t=Object.entries(e).some(([e,t])=>e.startsWith("modelLock_")&&t&&new Date(t).getTime()>Date.now());return"unavailable"!==e.testStatus||t?e.testStatus:"active"}function b({provider:e,kind:t,connections:s}){let r=x.Q2[e.id],l=!!r?.noAuth,n=s.filter(t=>t.provider===e.id),o=n.filter(e=>{let t=p(e);return"active"===t||"success"===t}).length,m=n.filter(e=>{let t=p(e);return"error"===t||"expired"===t||"unavailable"===t}).length,h=n.length,f=h>0&&n.every(e=>!1===e.isActive);return(0,a.jsx)(d(),{href:`/dashboard/media-providers/${t}/${e.id}`,className:"group",children:(0,a.jsx)(i.Zp,{padding:"xs",className:`h-full hover:bg-black/[0.01] dark:hover:bg-white/[0.01] transition-colors cursor-pointer ${f?"opacity-50":""}`,children:(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,a.jsx)("div",{className:"size-8 rounded-lg flex items-center justify-center shrink-0",style:{backgroundColor:`${e.color?.length>7?e.color:(e.color??"#888")+"15"}`},children:(0,a.jsx)(c.A,{src:`/providers/${e.id}.png`,alt:e.name,size:30,className:"object-contain rounded-lg max-w-[30px] max-h-[30px]",fallbackText:e.textIcon||e.id.slice(0,2).toUpperCase(),fallbackColor:e.color})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"font-semibold text-sm",children:e.name}),(0,a.jsx)("div",{className:"flex items-center gap-2 mt-0.5 flex-wrap",children:l?(0,a.jsx)(i.Ex,{variant:"success",size:"sm",children:"Ready"}):f?(0,a.jsx)(i.Ex,{variant:"default",size:"sm",children:"Disabled"}):0===h?(0,a.jsx)("span",{className:"text-xs text-text-muted",children:"No connections"}):(0,a.jsxs)(a.Fragment,{children:[o>0&&(0,a.jsxs)(i.Ex,{variant:"success",size:"sm",dot:!0,children:[o," Connected"]}),m>0&&(0,a.jsxs)(i.Ex,{variant:"error",size:"sm",dot:!0,children:[m," Error"]}),0===o&&0===m&&(0,a.jsxs)(i.Ex,{variant:"default",size:"sm",children:[h," Added"]})]})})]})]})})})}function f({combos:e}){return 0===e.length?(0,a.jsx)("p",{className:"text-xs text-text-muted italic",children:"No combos yet."}):(0,a.jsx)("div",{className:"flex flex-col gap-2",children:e.map(e=>(0,a.jsx)(d(),{href:`/dashboard/media-providers/combo/${e.id}`,children:(0,a.jsx)(i.Zp,{padding:"xs",className:"hover:bg-black/[0.02] dark:hover:bg-white/[0.02] transition-colors cursor-pointer",children:(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary text-[18px]",children:"layers"}),(0,a.jsx)("code",{className:"text-sm font-mono font-medium flex-1 truncate",children:e.name}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-1 sm:shrink-0",children:[e.models.slice(0,6).map((e,t)=>{let s="string"==typeof e?e.split("/")[0]:"",r=x.Q2[s];return(0,a.jsx)("div",{title:r?.name||e,className:"size-5 rounded flex items-center justify-center",style:{backgroundColor:`${r?.color??"#888"}15`},children:(0,a.jsx)(c.A,{src:`/providers/${s}.png`,alt:r?.name||s,size:18,className:"object-contain rounded max-w-[18px] max-h-[18px]",fallbackText:r?.textIcon||s.slice(0,2).toUpperCase(),fallbackColor:r?.color})},`${e}-${t}`)}),e.models.length>6&&(0,a.jsxs)("span",{className:"text-[10px] text-text-muted ml-1",children:["+",e.models.length-6]})]}),(0,a.jsx)("span",{className:"text-[11px] text-text-muted shrink-0",children:e.models.length}),(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[16px]",children:"chevron_right"})]})})},e.id))})}function u({title:e,icon:t,kind:s,providers:r,connections:d,combos:l,onCreateCombo:n,origin:o,copied:c,onCopy:x}){let m="webSearch"===s?{method:"POST",path:"/v1/search",desc:"Web search query endpoint across connected search providers & combos",payloadExample:'{ "query": "..." }'}:{method:"POST",path:"/v1/web/fetch",desc:"Direct web page markdown and content fetcher endpoint",payloadExample:'{ "url": "https://..." }'},h=`${o.replace(/\/+$/,"")}${m.path}`;return(0,a.jsxs)("div",{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",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary",children:t}),(0,a.jsx)("h2",{className:"text-base font-semibold",children:e}),(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["(",r.length," providers \xb7 ",l.length," combos)"]})]}),(0,a.jsx)(i.$n,{size:"sm",icon:"add",onClick:n,children:"Create Combo"})]}),(0,a.jsx)(i.Zp,{padding:"xs",className:"mb-4 border border-border/80 bg-surface-2/60",children:(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,a.jsx)("span",{className:"text-[11px] font-mono font-semibold px-2 py-0.5 rounded bg-teal-500/10 text-teal-600 dark:text-teal-400 border border-teal-500/20 shrink-0",children:m.method}),(0,a.jsxs)("span",{className:"text-xs font-semibold text-text-main truncate",children:[e," Endpoint"]})]}),(0,a.jsx)("span",{className:"text-[11px] font-mono text-text-muted hidden sm:inline truncate",children:m.payloadExample})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,a.jsx)(i.pd,{value:h,readOnly:!0,className:"flex-1 min-w-0",inputClassName:"font-mono text-xs bg-surface"}),(0,a.jsx)("button",{type:"button",onClick:()=>x(h,`endpoint_${s}`),className:"p-2 hover:bg-surface rounded text-text-muted hover:text-primary transition-colors shrink-0 border border-border/60",title:"Copy Endpoint URL","aria-label":`Copy ${e} Endpoint URL`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px] leading-none",children:c===`endpoint_${s}`?"check":"content_copy"})})]}),(0,a.jsx)("p",{className:"text-[11px] text-text-muted",children:m.desc})]})}),l.length>0&&(0,a.jsx)("div",{className:"mb-4",children:(0,a.jsx)(f,{combos:l})}),0===r.length?(0,a.jsx)("div",{className:"text-center py-8 border border-dashed border-border rounded-xl text-text-muted text-sm",children:"No providers."}):(0,a.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:r.map(e=>(0,a.jsx)(b,{provider:e,kind:s,connections:d},e.id))})]})}function v(){let e=(0,n.useRouter)(),[t,s]=(0,l.useState)([]),[r,d]=(0,l.useState)([]),[i,c]=(0,l.useState)("http://127.0.0.1:20128"),{copied:p,copy:b}=(0,o.C)();(0,l.useEffect)(()=>{c(window.location.origin)},[]);let f=async()=>{try{let[e,t]=await Promise.all([fetch("/api/providers",{cache:"no-store"}),fetch("/api/combos",{cache:"no-store"})]);e.ok&&s((await e.json()).connections||[]),t.ok&&d((await t.json()).combos||[])}catch{}};(0,l.useEffect)(()=>{f()},[]);let v=(0,x.o5)("webSearch"),j=(0,x.o5)("webFetch"),g=r.filter(e=>"webSearch"===e.kind),N=r.filter(e=>"webFetch"===e.kind),w=async t=>{let s="webSearch"===t?"search-combo":"fetch-combo",a=s,d=1,l=new Set(r.map(e=>e.name));for(;l.has(a);)a=`${s}-${d++}`;let n=await fetch("/api/combos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:a,models:[],kind:t})});if(n.ok){let t=await n.json();e.push(`/dashboard/media-providers/combo/${t.id}`)}else{let e=await n.json();(0,h.s)(e.error||"Failed to create combo")}};return(0,a.jsxs)("div",{className:"flex flex-col gap-8",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:"Web Fetch & Search"}),(0,a.jsx)("p",{className:"text-xs font-mono text-text-subtle",children:"Media providers \xb7 not agent Skills"})]}),(0,a.jsx)(m.A,{activeKind:"web"}),(0,a.jsx)(u,{title:"Web Search",icon:"search",kind:"webSearch",providers:v,connections:t,combos:g,onCreateCombo:()=>w("webSearch"),origin:i,copied:p,onCopy:b}),(0,a.jsx)("div",{className:"border-t border-border"}),(0,a.jsx)(u,{title:"Web Fetch",icon:"travel_explore",kind:"webFetch",providers:j,connections:t,combos:N,onCreateCombo:()=>w("webFetch"),origin:i,copied:p,onCopy:b})]})}}},e=>{e.O(0,[2574,3862,782,8500,594,1321,4707,1330,8441,3794,7358],()=>e(e.s=22637)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6607],{23879:(e,s,t)=>{"use strict";t.d(s,{default:()=>d});var a=t(95155),i=t(12115),n=t(3534),l=t(28777),o=t(88105),r=t(28048);function d(){let[e,s]=(0,i.useState)([]),[t,d]=(0,i.useState)([]),[c,u]=(0,i.useState)({}),[h,p]=(0,i.useState)(!1),[w,f]=(0,i.useState)(null),[y,x]=(0,i.useState)({running:!1,certExists:!1,dnsStatus:{},hasCachedPassword:!1});(0,i.useEffect)(()=>{g(),v(),m(),S()},[]);let g=async()=>{try{let e=await fetch("/api/providers");if(e.ok){let t=await e.json();s(t.connections||[])}}catch{}},v=async()=>{try{let e=await fetch("/api/keys");if(e.ok){let s=await e.json();d(s.keys||[])}}catch{}},m=async()=>{try{let e=await fetch("/api/models/alias");if(e.ok){let s=await e.json();u(s.aliases||{})}}catch{}},S=async()=>{try{let e=await fetch("/api/settings");if(e.ok){let s=await e.json();p(s.cloudEnabled||!1)}}catch{}},b=()=>e.filter(e=>!1!==e.isActive),k=Object.entries(n.wn);return(0,a.jsxs)("div",{className:"flex w-full flex-col gap-6",children:[(0,a.jsxs)("div",{className:"flex items-start gap-2 px-3 py-2 rounded-lg bg-yellow-500/10 border border-yellow-500/30",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-yellow-500 mt-0.5 shrink-0",children:"warning"}),(0,a.jsx)("p",{className:"text-xs text-red-600 dark:text-yellow-400 leading-relaxed",children:"⚠️ MITM intercepts HTTPS traffic of IDE tools (Antigravity, GitHub Copilot, Kiro) via local CA to redirect requests to your providers. May violate ToS → account ban. Use at your own risk."})]}),(0,a.jsx)(r.tA,{apiKeys:t,cloudEnabled:h,onStatusChange:x}),(0,a.jsx)("div",{className:"grid gap-3 sm:gap-4",children:k.map(([e,s])=>(0,a.jsx)(r.kn,{tool:s,isExpanded:w===e,onToggle:()=>f(w===e?null:e),serverRunning:y.running,dnsActive:y.dnsStatus?.[e]||!1,hasCachedPassword:y.hasCachedPassword||!1,needsSudoPassword:!1!==y.needsSudoPassword,isWin:!0===y.isWin,apiKeys:t,activeProviders:b(),hasActiveProviders:b().some(e=>(0,l.KC)(e.provider).length>0||(0,o.mq)(e.provider)||(0,o.gb)(e.provider)),modelAliases:c,cloudEnabled:h,onDnsChange:e=>x(s=>({...s,dnsStatus:e.dnsStatus??s.dnsStatus}))},e))})]})}},82831:(e,s,t)=>{Promise.resolve().then(t.bind(t,23879))}},e=>{e.O(0,[2574,3862,782,8500,594,1321,4707,5497,3531,8441,3794,7358],()=>e(e.s=82831)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6607],{23879:(e,s,t)=>{"use strict";t.d(s,{default:()=>d});var a=t(95155),i=t(12115),n=t(3534),l=t(28777),o=t(88105),r=t(28048);function d(){let[e,s]=(0,i.useState)([]),[t,d]=(0,i.useState)([]),[c,u]=(0,i.useState)({}),[h,p]=(0,i.useState)(!1),[w,f]=(0,i.useState)(null),[y,x]=(0,i.useState)({running:!1,certExists:!1,dnsStatus:{},hasCachedPassword:!1});(0,i.useEffect)(()=>{g(),v(),m(),S()},[]);let g=async()=>{try{let e=await fetch("/api/providers");if(e.ok){let t=await e.json();s(t.connections||[])}}catch{}},v=async()=>{try{let e=await fetch("/api/keys");if(e.ok){let s=await e.json();d(s.keys||[])}}catch{}},m=async()=>{try{let e=await fetch("/api/models/alias");if(e.ok){let s=await e.json();u(s.aliases||{})}}catch{}},S=async()=>{try{let e=await fetch("/api/settings");if(e.ok){let s=await e.json();p(s.cloudEnabled||!1)}}catch{}},b=()=>e.filter(e=>!1!==e.isActive),k=Object.entries(n.wn);return(0,a.jsxs)("div",{className:"flex w-full flex-col gap-6",children:[(0,a.jsxs)("div",{className:"flex items-start gap-2 px-3 py-2 rounded-lg bg-yellow-500/10 border border-yellow-500/30",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-yellow-500 mt-0.5 shrink-0",children:"warning"}),(0,a.jsx)("p",{className:"text-xs text-red-600 dark:text-yellow-400 leading-relaxed",children:"⚠️ MITM intercepts HTTPS traffic of IDE tools (Antigravity, GitHub Copilot, Kiro) via local CA to redirect requests to your providers. May violate ToS → account ban. Use at your own risk."})]}),(0,a.jsx)(r.tA,{apiKeys:t,cloudEnabled:h,onStatusChange:x}),(0,a.jsx)("div",{className:"grid gap-3 sm:gap-4",children:k.map(([e,s])=>(0,a.jsx)(r.kn,{tool:s,isExpanded:w===e,onToggle:()=>f(w===e?null:e),serverRunning:y.running,dnsActive:y.dnsStatus?.[e]||!1,hasCachedPassword:y.hasCachedPassword||!1,needsSudoPassword:!1!==y.needsSudoPassword,isWin:!0===y.isWin,apiKeys:t,activeProviders:b(),hasActiveProviders:b().some(e=>(0,l.KC)(e.provider).length>0||(0,o.mq)(e.provider)||(0,o.gb)(e.provider)),modelAliases:c,cloudEnabled:h,onDnsChange:e=>x(s=>({...s,dnsStatus:e.dnsStatus??s.dnsStatus}))},e))})]})}},82831:(e,s,t)=>{Promise.resolve().then(t.bind(t,23879))}},e=>{e.O(0,[2574,3862,782,8500,594,1321,4707,1330,3531,8441,3794,7358],()=>e(e.s=82831)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6337],{11059:(e,o,t)=>{"use strict";t.d(o,{C:()=>r});var n=t(12115);function r(e=2e3){let[o,t]=(0,n.useState)(null),s=(0,n.useRef)(null),l=(0,n.useCallback)(async(o,n="default")=>{let r=async()=>{if(navigator?.clipboard?.writeText)await navigator.clipboard.writeText(o);else{let e=document.createElement("textarea");e.value=o,e.style.position="fixed",e.style.opacity="0",document.body.appendChild(e);try{if(e.select(),!document.execCommand("copy"))throw Error("Clipboard copy was rejected")}finally{document.body.removeChild(e)}}};try{await r(),t(n),s.current&&clearTimeout(s.current),s.current=setTimeout(()=>{t(null)},e)}catch{}},[e]);return(0,n.useEffect)(()=>()=>{s.current&&clearTimeout(s.current)},[]),{copied:o,copy:l}}},14051:(e,o,t)=>{e.exports=t(34701)()},21172:(e,o,t)=>{"use strict";Object.defineProperty(o,"__esModule",{value:!0}),Object.defineProperty(o,"useMergedRef",{enumerable:!0,get:function(){return r}});let n=t(12115);function r(e,o){let t=(0,n.useRef)(null),r=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=t.current;e&&(t.current=null,e());let o=r.current;o&&(r.current=null,o())}else e&&(t.current=s(e,n)),o&&(r.current=s(o,n))},[e,o])}function s(e,o){if("function"!=typeof e)return e.current=o,()=>{e.current=null};{let t=e(o);return"function"==typeof t?t:()=>e(null)}}("function"==typeof o.default||"object"==typeof o.default&&null!==o.default)&&void 0===o.default.__esModule&&(Object.defineProperty(o.default,"__esModule",{value:!0}),Object.assign(o.default,o),e.exports=o.default)},34701:(e,o,t)=>{"use strict";var n=t(82114);function r(){}function s(){}s.resetWarningCache=r,e.exports=function(){function e(e,o,t,r,s,l){if(l!==n){var a=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function o(){return e}e.isRequired=e;var t={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:o,element:e,elementType:e,instanceOf:o,node:e,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:s,resetWarningCache:r};return t.PropTypes=t,t}},48420:(e,o,t)=>{Promise.resolve().then(t.bind(t,55084))},55084:(e,o,t)=>{"use strict";t.d(o,{default:()=>u});var n=t(95155),r=t(12115),s=t(98500),l=t.n(s),a=t(14051),i=t.n(a),c=t(11059);let d={fallback:"fallback","round-robin":"round-robin",fusion:"fusion",auto:"auto"};function u({initialData:e}){let[o,t]=(0,r.useState)(e?.endpointHost||"127.0.0.1:20128"),[s,a]=(0,r.useState)(null),{copied:i,copy:f}=(0,c.C)(),m=e?.providerCount??0,x=(e?.readyProviderCount??0)>0,g=e?.keyCount??0,h=e?.comboCount??0,y=e?.defaultCombo||null,b=e?.learningSummary||null,v=e?.quotas||[],j=!!y?.isAuto,E=y?.strategy||"fallback";(0,r.useEffect)(()=>{t(window.location.host||"127.0.0.1:20128")},[]),(0,r.useEffect)(()=>{let e=!1;return fetch("/api/usage/stats?period=24h").then(e=>e.json()).then(o=>{e||a(o)}).catch(()=>{}),()=>{e=!0}},[]);let C=`http://${o}/v1`,S=(0,r.useMemo)(()=>{let e=s?.totalRequests??s?.requests??0,o=s?.totalPromptTokens??0,t=s?.totalCompletionTokens??0,n=s?.totalCost??0;return[{label:"Requests \xb7 24h",value:p(e)},{label:"Tokens in",value:p(o)},{label:"Tokens out",value:p(t)},{label:"Est. cost",value:n?`$${Number(n).toFixed(2)}`:"$0.00"}]},[s]),k=(0,r.useMemo)(()=>y?j?[["Router",y.routerModel||"not configured"],["Worker pool",`${y.workerCount||0} workers`],["Objective",y.objective||"balanced"],["Exploration",y.exploration||"5%"]]:"fusion"===E?[["Panel",`${y.workerCount||0} models`],["Judge",y.judgeModel||"first model"],["Calls / request","N+1 (panel + judge)"],["Capacity switch",y.capacityAutoSwitch?"on":"off"]]:"round-robin"===E?[["Pool",`${y.workerCount||0} models`],["Rotation","spread load across models"],["Capacity switch",y.capacityAutoSwitch?"on":"off"],["On failure","try next in rotation"]]:[["Pool",`${y.workerCount||0} models`],["Order","try in listed order"],["Capacity switch",!1!==y.capacityAutoSwitch?"on":"off"],["On failure","next model"]]:[["Combos","none configured"],["Strategy","—"],["Models","—"],["Tip","Create a combo to group models"]],[y,j,E]);return(0,n.jsxs)("div",{className:"flex flex-col w-full",style:{gap:16,maxWidth:1120},children:[(0,n.jsxs)("div",{className:"flex flex-col",style:{gap:4},children:[(0,n.jsx)("span",{style:{fontSize:17,fontWeight:600,color:"#ECE4D2"},children:"Overview"}),(0,n.jsx)("span",{style:{fontSize:12,color:"#6F6653",fontFamily:"var(--font-mono), 'IBM Plex Mono', monospace"},children:"everything routing through your endpoint, at a glance"})]}),0===m&&(0,n.jsxs)("div",{style:{background:"#1E1A13",border:"1px solid #E5B454",borderRadius:12,padding:18},children:[(0,n.jsx)("div",{style:{fontSize:14,fontWeight:600,color:"#E5B454",marginBottom:8},children:"Connect your first provider to get started"}),(0,n.jsx)("div",{style:{fontSize:12,color:"#8A7F66",marginBottom:12},children:"Add an API key for any provider to start routing requests through Switchboard."}),(0,n.jsx)(l(),{href:"/dashboard/providers",style:{display:"inline-flex",alignItems:"center",gap:6,padding:"6px 14px",borderRadius:8,background:"#E5B454",color:"#1E1A13",fontSize:12,fontWeight:600,textDecoration:"none"},children:"Connect Provider"})]}),(0,n.jsxs)("div",{className:"grid gap-4 grid-cols-1 md:grid-cols-2",children:[(0,n.jsxs)("div",{className:"flex flex-col justify-between",style:{background:"#1E1A13",border:"1px solid #332C1E",borderRadius:12,padding:18},children:[(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{className:"flex items-center justify-between",style:{marginBottom:12},children:[(0,n.jsx)("span",{style:{fontSize:10.5,letterSpacing:"1.2px",color:"#8A7F66",textTransform:"uppercase",fontWeight:600},children:"Endpoint"}),(0,n.jsxs)("span",{className:"flex items-center gap-[7px]",style:{fontSize:11.5,color:x?"#74C08A":"#8A7F66",fontFamily:"var(--font-mono), 'IBM Plex Mono', monospace"},children:[(0,n.jsx)("span",{className:"console-online-dot",style:x?void 0:{background:"#6F6653",boxShadow:"none"}}),x?"online":m>0?"providers unavailable":"no providers"]})]}),(0,n.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,n.jsx)("div",{style:{fontFamily:"var(--font-mono), 'IBM Plex Mono', monospace",fontSize:16,color:"#E5B454",wordBreak:"break-all"},children:C}),(0,n.jsx)("button",{type:"button",onClick:()=>f(C,"overview_endpoint"),className:"p-1.5 rounded hover:bg-white/10 text-[#8A7F66] hover:text-[#E5B454] transition-colors shrink-0",title:"Copy endpoint URL","aria-label":"Copy endpoint URL",children:(0,n.jsx)("span",{className:"material-symbols-outlined text-[16px] leading-none",children:"overview_endpoint"===i?"check":"content_copy"})})]})]}),(0,n.jsxs)("div",{style:{fontSize:11.5,color:"#6F6653",fontFamily:"var(--font-mono), 'IBM Plex Mono', monospace",marginTop:14},children:[g," API key",1===g?"":"s"," \xb7 ",m," provider",1===m?"":"s"," connected"]})]}),(0,n.jsxs)("div",{style:{background:"#1E1A13",border:"1px solid #332C1E",borderRadius:12,padding:18},children:[(0,n.jsxs)("div",{className:"flex items-center justify-between",style:{marginBottom:12},children:[(0,n.jsx)("span",{style:{fontSize:10.5,letterSpacing:"1.2px",color:"#8A7F66",textTransform:"uppercase",fontWeight:600},children:j?"Learning":"Combos"}),(0,n.jsx)("span",{style:{fontSize:10,fontFamily:"var(--font-mono), 'IBM Plex Mono', monospace",padding:"2px 8px",borderRadius:999,textTransform:"uppercase",letterSpacing:"0.5px",background:"rgba(229,180,84,.15)",color:"#E5B454",border:"1px solid rgba(229,180,84,.4)"},children:j?b?.freezeLearning?"frozen":b?.version?`v${b.version}`:"no version yet":h?`${h} configured`:"none"})]}),(0,n.jsxs)("div",{className:"flex items-end gap-2.5",style:{marginBottom:3},children:[(0,n.jsx)("span",{style:{fontFamily:"var(--font-mono), 'IBM Plex Mono', monospace",fontSize:32,fontWeight:600,lineHeight:1,color:"#ECE4D2"},children:j?b?.evalScore!=null?Number(b.evalScore).toFixed(0):"—":String(h)}),(0,n.jsx)("span",{style:{fontSize:11,color:j?"#74C08A":"#A99E86",fontFamily:"var(--font-mono), 'IBM Plex Mono', monospace",paddingBottom:3},children:j?"eval score":"combos"})]}),(0,n.jsx)("div",{style:{fontSize:11,color:"#6F6653",fontFamily:"var(--font-mono), 'IBM Plex Mono', monospace",marginBottom:14},children:j?"Auto strategy \xb7 relearn from Combos → Insights":"Group models \xb7 fallback / round-robin / fusion / auto"}),(0,n.jsxs)("div",{className:"flex gap-2 items-center flex-wrap",children:[(0,n.jsx)(l(),{href:"/dashboard/combos",style:{display:"inline-flex",alignItems:"center",gap:7,background:"rgba(229,180,84,.15)",border:"1px solid rgba(229,180,84,.4)",borderRadius:7,padding:"7px 12px",fontSize:12,color:"#E5B454",fontFamily:"inherit"},children:h?"Manage combos":"Create combo"}),j&&y?.name&&(0,n.jsx)(l(),{href:`/dashboard/combos/routing?combo=${encodeURIComponent(y.name)}`,style:{display:"inline-flex",alignItems:"center",gap:7,background:"transparent",border:"1px solid #3A3221",borderRadius:7,padding:"7px 10px",fontSize:12,color:"#A99E86"},children:"Routing insights"})]})]})]}),(0,n.jsx)("div",{className:"grid gap-3 grid-cols-2 lg:grid-cols-4",children:S.map(e=>(0,n.jsxs)("div",{style:{background:"#1E1A13",border:"1px solid #332C1E",borderRadius:11,padding:15},children:[(0,n.jsx)("div",{style:{fontSize:10,letterSpacing:"0.6px",color:"#6F6653",textTransform:"uppercase",marginBottom:8},children:e.label}),(0,n.jsx)("div",{style:{fontFamily:"var(--font-mono), 'IBM Plex Mono', monospace",fontSize:21,fontWeight:600,color:"#ECE4D2"},children:e.value})]},e.label))}),(0,n.jsxs)("div",{className:"grid gap-4 items-start grid-cols-1 md:grid-cols-2",children:[(0,n.jsxs)("div",{style:{background:"#1E1A13",border:"1px solid #332C1E",borderRadius:12,padding:18},children:[(0,n.jsxs)("div",{className:"flex items-center justify-between",style:{marginBottom:14},children:[(0,n.jsx)("span",{style:{fontSize:13,fontWeight:600,color:"#ECE4D2"},children:"Active routing"}),(0,n.jsx)(l(),{href:j&&y?.name?`/dashboard/combos/routing?combo=${encodeURIComponent(y.name)}`:"/dashboard/combos",style:{padding:"6px 12px",borderRadius:7,fontSize:11.5,border:"1px solid #3A3221",background:"transparent",color:"#A99E86"},children:j?"View insights":"Open combos"})]}),(0,n.jsxs)("div",{className:"flex items-center gap-2.5",style:{marginBottom:14},children:[(0,n.jsx)("span",{style:{fontFamily:"var(--font-mono), 'IBM Plex Mono', monospace",fontSize:14,fontWeight:600,color:"#ECE4D2"},children:y?.name||"—"}),(0,n.jsx)("span",{style:{fontSize:10,fontFamily:"var(--font-mono), 'IBM Plex Mono', monospace",padding:"2px 8px",borderRadius:999,textTransform:"uppercase",letterSpacing:"0.5px",background:"rgba(229,180,84,.15)",color:"#E5B454",border:"1px solid rgba(229,180,84,.4)"},children:d[E]||E||"fallback"})]}),(0,n.jsx)("div",{className:"flex flex-col",children:k.map(([e,o],t,r)=>(0,n.jsxs)("div",{className:"flex items-center justify-between gap-3",style:{padding:"9px 0",borderBottom:t<r.length-1?"1px solid #241F16":"none"},children:[(0,n.jsx)("span",{style:{fontSize:12,color:"#8A7F66"},children:e}),(0,n.jsx)("span",{className:"truncate text-right",style:{fontSize:12,color:"#A99E86",fontFamily:"var(--font-mono), 'IBM Plex Mono', monospace",maxWidth:"60%"},title:String(o),children:o})]},e))})]}),(0,n.jsxs)("div",{style:{background:"#1E1A13",border:"1px solid #332C1E",borderRadius:12,padding:18},children:[(0,n.jsxs)("div",{className:"flex items-center justify-between",style:{marginBottom:16},children:[(0,n.jsx)("span",{style:{fontSize:13,fontWeight:600,color:"#ECE4D2"},children:"Quota"}),(0,n.jsxs)("span",{style:{fontSize:11,color:"#6F6653",fontFamily:"var(--font-mono), 'IBM Plex Mono', monospace"},children:[v.length||m," accounts"]})]}),(0,n.jsx)("div",{className:"flex flex-col",style:{gap:13},children:(v.length?v:[{account:"No quota data yet",pct:0}]).slice(0,6).map(e=>{let o=Math.max(0,Math.min(100,Number(e.pct)||0)),t=o>=90?"#E07070":o>=70?"#E5B454":"#74C08A";return(0,n.jsxs)("div",{className:"flex flex-col",style:{gap:5},children:[(0,n.jsxs)("div",{className:"flex justify-between items-baseline gap-2",children:[(0,n.jsx)("span",{style:{fontSize:12,color:"#ECE4D2"},children:e.account}),(0,n.jsxs)("span",{style:{fontSize:11,color:t,fontFamily:"var(--font-mono), 'IBM Plex Mono', monospace"},children:[o,"%"]})]}),(0,n.jsx)("div",{style:{height:5,borderRadius:3,background:"#241F16",overflow:"hidden"},children:(0,n.jsx)("div",{style:{height:"100%",width:`${o}%`,borderRadius:3,background:t}})})]},e.account)})}),(0,n.jsx)(l(),{href:"/dashboard/quota",className:"inline-block mt-4",style:{fontSize:11.5,color:"#A99E86"},children:"Open quota tracker →"})]})]})]})}function p(e){let o=Number(e)||0;return o>=1e6?`${(o/1e6).toFixed(1)}M`:o>=1e3?`${(o/1e3).toFixed(1)}k`:String(Math.round(o))}u.propTypes={initialData:i().object}},82114:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}},e=>{e.O(0,[8500,8441,3794,7358],()=>e(e.s=48420)),_N_E=e.O()}]);
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3471],{12151:(e,t,s)=>{"use strict";s.d(t,{default:()=>b});var a=s(95155),r=s(12115),i=s(35497),o=s(81127),l=s(21931),n=s(1620),d=s(31474),c=s(90620),m=s(93308),x=s(38202),u=s(65921);function b({initialData:e}){let{theme:t,setTheme:s,isDark:p}=(0,n.D)(),h=(0,u.i)(e=>e.error),[y,g]=(0,r.useState)("en"),[f,j]=(0,r.useState)(!1),[N,w]=(0,r.useState)(!1),[v,k]=(0,r.useState)(!1),[C,S]=(0,r.useState)(e?.settings||{fallbackStrategy:"fill-first"}),[P,R]=(0,r.useState)(!e?.settings),[T,O]=(0,r.useState)(!1),[E,L]=(0,r.useState)({type:"",message:""}),$=(0,r.useRef)(null),[U,A]=(0,r.useState)({outboundProxyEnabled:!1,outboundProxyUrl:"",outboundNoProxy:""}),[F,H]=(0,r.useState)({type:"",message:""}),[J,_]=(0,r.useState)(!1),[D,M]=(0,r.useState)(!1);(0,r.useEffect)(()=>{g(function(){if("u"<typeof document)return"en";let e=document.cookie.split(";").find(e=>e.trim().startsWith(`${m.CL}=`)),t=e?decodeURIComponent(e.split("=")[1]):"en";return(0,m.QC)(t)}())},[f]),(0,r.useEffect)(()=>{let t=e?.settings||C;A({outboundProxyEnabled:t?.outboundProxyEnabled===!0,outboundProxyUrl:t?.outboundProxyUrl||"",outboundNoProxy:t?.outboundNoProxy||""}),R(!1)},[e]);let I=async e=>{if(e.preventDefault(),!0===C.outboundProxyEnabled){_(!0),H({type:"",message:""});try{let e=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({outboundProxyUrl:U.outboundProxyUrl,outboundNoProxy:U.outboundNoProxy})}),t=await e.json();e.ok?(S(e=>({...e,...t})),H({type:"success",message:"Proxy settings applied"})):H({type:"error",message:t.error||"Failed to update proxy settings"})}catch(e){H({type:"error",message:"An error occurred"})}finally{_(!1)}}},Z=async()=>{if(!0!==C.outboundProxyEnabled)return;let e=(U.outboundProxyUrl||"").trim();if(!e)return void H({type:"error",message:"Please enter a Proxy URL to test"});M(!0),H({type:"",message:""});try{let t=await fetch("/api/settings/proxy-test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyUrl:e})}),s=await t.json();t.ok&&s?.ok?H({type:"success",message:`Proxy test OK (${s.status}) in ${s.elapsedMs}ms`}):H({type:"error",message:s?.error||"Proxy test failed"})}catch(e){H({type:"error",message:"An error occurred"})}finally{M(!1)}},q=async e=>{_(!0),H({type:"",message:""});try{let t=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({outboundProxyEnabled:e})}),s=await t.json();t.ok?(S(e=>({...e,...s})),A(e=>({...e,outboundProxyEnabled:s?.outboundProxyEnabled===!0})),H({type:"success",message:e?"Proxy enabled":"Proxy disabled"})):H({type:"error",message:s.error||"Failed to update proxy settings"})}catch(e){H({type:"error",message:"An error occurred"})}finally{_(!1)}},z=async e=>{try{let t=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({fallbackStrategy:e})});if(t.ok)S(t=>({...t,fallbackStrategy:e}));else throw Error(`HTTP ${t.status}`)}catch(e){h("Failed to update settings")}},B=async e=>{try{let t=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStrategy:e})});if(t.ok)S(t=>({...t,comboStrategy:e}));else throw Error(`HTTP ${t.status}`)}catch(e){h("Failed to update combo strategy")}},Q=async e=>{let t=parseInt(e);if(!isNaN(t)&&!(t<1))try{let e=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({stickyRoundRobinLimit:t})});if(e.ok)S(e=>({...e,stickyRoundRobinLimit:t}));else throw Error(`HTTP ${e.status}`)}catch(e){h("Failed to update sticky limit")}},W=async e=>{let t=parseInt(e);if(!isNaN(t)&&!(t<1))try{let e=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStickyRoundRobinLimit:t})});if(e.ok)S(e=>({...e,comboStickyRoundRobinLimit:t}));else throw Error(`HTTP ${e.status}`)}catch(e){h("Failed to update combo sticky limit")}},K=async e=>{try{let t=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({enableObservability:e})});if(t.ok)S(t=>({...t,enableObservability:e}));else throw Error(`HTTP ${t.status}`)}catch(e){h("Failed to update observability setting")}},G=async()=>{try{let e=await fetch("/api/settings");if(!e.ok)throw Error(`HTTP ${e.status}`);let t=await e.json();S(t)}catch(e){h("Failed to reload settings")}},V=async()=>{O(!0),L({type:"",message:""});try{let e=await fetch("/api/settings/database");if(!e.ok){let t=await e.json().catch(()=>({}));throw Error(t.error||"Failed to export database")}let t=await e.json(),s=JSON.stringify(t,null,2),a=new Blob([s],{type:"application/json"}),r=URL.createObjectURL(a),i=document.createElement("a"),o=new Date().toISOString().replace(/[.:]/g,"-");i.href=r,i.download=`switchboard-backup-${o}.json`,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(r),L({type:"success",message:"Database backup downloaded"})}catch(e){L({type:"error",message:e.message||"Failed to export database"})}finally{O(!1)}},X=async e=>{let t=e.target.files?.[0];if($.current&&($.current.value=""),t){O(!0),L({type:"",message:""});try{let e=await t.text(),s=JSON.parse(e),a=await fetch("/api/settings/database",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)}),r=await a.json().catch(()=>({}));if(!a.ok)throw Error(r.error||"Failed to import database");await G(),L({type:"success",message:"Database imported successfully"})}catch(e){L({type:"error",message:e.message||"Invalid backup file"})}finally{O(!1)}}},Y=!0===C.enableObservability,ee=async()=>{k(!0);try{await fetch("/api/version/shutdown",{method:"POST"})}catch(e){}k(!1),w(!1)};return(0,a.jsxs)("div",{className:"max-w-2xl mx-auto px-4 sm:px-0",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsxs)(i.Zp,{children:[(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 mb-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 sm:gap-4",children:[(0,a.jsx)("div",{className:"size-10 sm:size-12 rounded-lg bg-green-500/10 text-green-500 flex items-center justify-center shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-xl sm:text-2xl",children:"computer"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-lg sm:text-xl font-semibold",children:"Local Mode"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Running on your machine"})]})]}),(0,a.jsx)("div",{className:"inline-flex p-1 rounded-lg bg-black/5 dark:bg-white/5 w-full sm:w-auto",children:["light","dark","system"].map(e=>(0,a.jsxs)("button",{type:"button",onClick:()=>s(e),className:(0,d.cn)("flex items-center justify-center gap-1 sm:gap-1.5 px-2 sm:px-3 py-1.5 rounded-md font-medium transition-all flex-1 sm:flex-initial",t===e?"bg-white dark:bg-white/10 text-text-main shadow-sm":"text-text-muted hover:text-text-main"),children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"light"===e?"light_mode":"dark"===e?"dark_mode":"contrast"}),(0,a.jsx)("span",{className:"capitalize text-xs sm:text-sm",children:e})]},e))})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 pt-4 border-t border-border",children:[(0,a.jsx)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between p-3 rounded-lg bg-bg border border-border gap-2",children:(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Database Location"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted font-mono break-all",children:"~/.switchboard/db/data.sqlite"})]})}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2",children:[(0,a.jsx)(i.$n,{variant:"secondary",icon:"download",onClick:()=>V(),loading:T,className:"w-full sm:w-auto",children:"Download Backup"}),(0,a.jsx)(i.$n,{variant:"outline",icon:"upload",onClick:()=>$.current?.click(),disabled:T,className:"w-full sm:w-auto",children:"Import Backup"}),(0,a.jsx)("input",{ref:$,type:"file",accept:"application/json,.json",className:"hidden",onChange:X})]}),E.message&&(0,a.jsx)("p",{className:`text-sm ${"error"===E.type?"text-red-500":"text-green-600 dark:text-green-400"}`,children:E.message})]})]}),(0,a.jsxs)(i.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"size-10 rounded-lg bg-blue-500/10 text-blue-500 flex items-center justify-center shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"language"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Language"})]}),(0,a.jsxs)("button",{onClick:()=>j(!0),className:"flex items-center justify-between w-full p-3 rounded-lg bg-bg border border-border hover:border-primary/50 transition-colors","data-i18n-skip":"true",children:[(0,a.jsx)("span",{className:"text-sm text-text-muted",children:"Display language"}),(0,a.jsx)("span",{className:"text-2xl",children:x.h[y]||"\uD83C\uDF10"})]})]}),(0,a.jsxs)(i.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-blue-500/10 text-blue-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"route"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Routing Strategy"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Round Robin"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Cycle through accounts to distribute load"})]}),(0,a.jsx)(i.lM,{checked:"round-robin"===C.fallbackStrategy,onChange:()=>z("round-robin"===C.fallbackStrategy?"fill-first":"round-robin"),disabled:P,"aria-label":"Round Robin"})]}),"round-robin"===C.fallbackStrategy&&(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4 pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Sticky Limit"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Calls per account before switching"})]}),(0,a.jsx)(i.pd,{type:"number","aria-label":"Sticky Limit",min:"1",max:"10",value:C.stickyRoundRobinLimit||3,onChange:e=>Q(e.target.value),disabled:P,className:"w-16 sm:w-20 text-center shrink-0"})]}),(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4 pt-4 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Combo Round Robin"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Cycle through providers in combos instead of always starting with first"})]}),(0,a.jsx)(i.lM,{checked:"round-robin"===C.comboStrategy,onChange:()=>B("round-robin"===C.comboStrategy?"fallback":"round-robin"),disabled:P,"aria-label":"Combo Round Robin"})]}),"round-robin"===C.comboStrategy&&(0,a.jsxs)("div",{className:"flex items-center justify-between pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:"Combo Sticky Limit"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Calls per combo model before switching"})]}),(0,a.jsx)(i.pd,{type:"number","aria-label":"Combo Sticky Limit",min:"1",max:"100",value:C.comboStickyRoundRobinLimit||1,onChange:e=>W(e.target.value),disabled:P,className:"w-20 text-center"})]}),(0,a.jsxs)("p",{className:"text-xs text-text-muted italic pt-2 border-t border-border/50",children:["round-robin"===C.fallbackStrategy?`Currently distributing requests across all available accounts with ${C.stickyRoundRobinLimit||3} calls per account.`:"Currently using accounts in priority order (Fill First).","round-robin"===C.comboStrategy?` Combos rotate after ${C.comboStickyRoundRobinLimit||1} call${1===(C.comboStickyRoundRobinLimit||1)?"":"s"} per model.`:" Combos always start with their first model."]})]})]}),(0,a.jsxs)(i.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-purple-500/10 text-purple-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"wifi"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Network"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Outbound Proxy"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Enable proxy for OAuth + provider outbound requests."})]}),(0,a.jsx)(i.lM,{checked:!0===C.outboundProxyEnabled,onChange:()=>q(!0!==C.outboundProxyEnabled),disabled:P||J,"aria-label":"Outbound Proxy"})]}),!0===C.outboundProxyEnabled&&(0,a.jsxs)("form",{onSubmit:I,className:"flex flex-col gap-4 pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Proxy URL"}),(0,a.jsx)(i.pd,{placeholder:"http://127.0.0.1:7897",value:U.outboundProxyUrl,onChange:e=>A(t=>({...t,outboundProxyUrl:e.target.value})),disabled:P||J}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Leave empty to inherit existing env proxy (if any)."})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2 pt-2 border-t border-border/50",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"No Proxy"}),(0,a.jsx)(i.pd,{placeholder:"localhost,127.0.0.1",value:U.outboundNoProxy,onChange:e=>A(t=>({...t,outboundNoProxy:e.target.value})),disabled:P||J}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Comma-separated hostnames/domains to bypass the proxy."})]}),(0,a.jsxs)("div",{className:"pt-2 border-t border-border/50 flex flex-col sm:flex-row items-stretch sm:items-center gap-2",children:[(0,a.jsx)(i.$n,{type:"button",variant:"secondary",loading:D,disabled:P||J,onClick:Z,className:"w-full sm:w-auto",children:"Test proxy URL"}),(0,a.jsx)(i.$n,{type:"submit",variant:"primary",loading:J,className:"w-full sm:w-auto",children:"Apply"})]})]}),F.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===F.type?"text-red-500":"text-green-500"} pt-2 border-t border-border/50`,children:F.message})]})]}),(0,a.jsxs)(i.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-orange-500/10 text-orange-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"monitoring"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Observability"})]}),(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Enable Observability"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Record request details for inspection in the logs view"})]}),(0,a.jsx)(i.lM,{checked:Y,onChange:K,disabled:P,"aria-label":"Enable Observability"})]})]}),(0,a.jsx)("div",{className:"flex flex-col sm:flex-row gap-2",children:(0,a.jsx)(i.$n,{variant:"outline",fullWidth:!0,icon:"power_settings_new",onClick:()=>w(!0),className:"text-red-500 border-red-200 hover:bg-red-50 hover:border-red-300",children:"Shutdown"})}),(0,a.jsxs)("div",{className:"text-center text-xs sm:text-sm text-text-muted py-4",children:[(0,a.jsxs)("p",{children:[c.vQ.name," v",c.vQ.version]}),(0,a.jsx)("p",{className:"mt-1",children:"Local Mode - All data stored on your machine"})]})]}),(0,a.jsx)(l.default,{hideTrigger:!0,isOpen:f,onClose:e=>{j(!1),g(e)}}),(0,a.jsx)(o.ConfirmModal,{isOpen:N,onClose:()=>w(!1),onConfirm:ee,title:"Shutdown",message:"Are you sure you want to close the proxy server?",confirmText:"Shutdown",cancelText:"Cancel",variant:"danger",loading:v})]})}},34743:(e,t,s)=>{Promise.resolve().then(s.bind(s,12151))}},e=>{e.O(0,[2574,3862,782,8500,594,1321,4707,5497,8441,3794,7358],()=>e(e.s=34743)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3471],{12151:(e,t,s)=>{"use strict";s.d(t,{default:()=>b});var a=s(95155),r=s(12115),l=s(35497),i=s(81127),o=s(21931),n=s(1620),d=s(31474),c=s(90620),m=s(93308),x=s(38202),u=s(65921);function b({initialData:e}){let{theme:t,setTheme:s,isDark:p}=(0,n.D)(),h=(0,u.i)(e=>e.error),[y,f]=(0,r.useState)("en"),[g,j]=(0,r.useState)(!1),[N,w]=(0,r.useState)(!1),[v,k]=(0,r.useState)(!1),[C,S]=(0,r.useState)(e?.settings||{fallbackStrategy:"fill-first"}),[P,R]=(0,r.useState)(!e?.settings),[T,O]=(0,r.useState)(!1),[E,L]=(0,r.useState)({type:"",message:""}),$=(0,r.useRef)(null),[U,F]=(0,r.useState)({outboundProxyEnabled:!1,outboundProxyUrl:"",outboundNoProxy:""}),[A,H]=(0,r.useState)({type:"",message:""}),[M,J]=(0,r.useState)(!1),[_,D]=(0,r.useState)(!1);(0,r.useEffect)(()=>{f(function(){if("u"<typeof document)return"en";let e=document.cookie.split(";").find(e=>e.trim().startsWith(`${m.CL}=`)),t=e?decodeURIComponent(e.split("=")[1]):"en";return(0,m.QC)(t)}())},[g]),(0,r.useEffect)(()=>{let t=e?.settings||C;F({outboundProxyEnabled:t?.outboundProxyEnabled===!0,outboundProxyUrl:t?.outboundProxyUrl||"",outboundNoProxy:t?.outboundNoProxy||""}),R(!1)},[e]);let I=async e=>{if(e.preventDefault(),!0===C.outboundProxyEnabled){J(!0),H({type:"",message:""});try{let e=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({outboundProxyUrl:U.outboundProxyUrl,outboundNoProxy:U.outboundNoProxy})}),t=await e.json();e.ok?(S(e=>({...e,...t})),H({type:"success",message:"Proxy settings applied"})):H({type:"error",message:t.error||"Failed to update proxy settings"})}catch(e){H({type:"error",message:"An error occurred"})}finally{J(!1)}}},Z=async()=>{if(!0!==C.outboundProxyEnabled)return;let e=(U.outboundProxyUrl||"").trim();if(!e)return void H({type:"error",message:"Please enter a Proxy URL to test"});D(!0),H({type:"",message:""});try{let t=await fetch("/api/settings/proxy-test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyUrl:e})}),s=await t.json();t.ok&&s?.ok?H({type:"success",message:`Proxy test OK (${s.status}) in ${s.elapsedMs}ms`}):H({type:"error",message:s?.error||"Proxy test failed"})}catch(e){H({type:"error",message:"An error occurred"})}finally{D(!1)}},q=async e=>{J(!0),H({type:"",message:""});try{let t=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({outboundProxyEnabled:e})}),s=await t.json();t.ok?(S(e=>({...e,...s})),F(e=>({...e,outboundProxyEnabled:s?.outboundProxyEnabled===!0})),H({type:"success",message:e?"Proxy enabled":"Proxy disabled"})):H({type:"error",message:s.error||"Failed to update proxy settings"})}catch(e){H({type:"error",message:"An error occurred"})}finally{J(!1)}},z=async e=>{try{let t=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({fallbackStrategy:e})});if(t.ok)S(t=>({...t,fallbackStrategy:e}));else throw Error(`HTTP ${t.status}`)}catch(e){h("Failed to update settings")}},Q=async e=>{try{let t=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStrategy:e})});if(t.ok)S(t=>({...t,comboStrategy:e}));else throw Error(`HTTP ${t.status}`)}catch(e){h("Failed to update combo strategy")}},B=async e=>{let t=parseInt(e);if(!isNaN(t)&&!(t<1))try{let e=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({stickyRoundRobinLimit:t})});if(e.ok)S(e=>({...e,stickyRoundRobinLimit:t}));else throw Error(`HTTP ${e.status}`)}catch(e){h("Failed to update sticky limit")}},K=async e=>{let t=parseInt(e);if(!isNaN(t)&&!(t<1))try{let e=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStickyRoundRobinLimit:t})});if(e.ok)S(e=>({...e,comboStickyRoundRobinLimit:t}));else throw Error(`HTTP ${e.status}`)}catch(e){h("Failed to update combo sticky limit")}},W=async e=>{try{let t=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({enableObservability:e})});if(t.ok)S(t=>({...t,enableObservability:e}));else throw Error(`HTTP ${t.status}`)}catch(e){h("Failed to update observability setting")}},G=async()=>{try{let e=await fetch("/api/settings");if(!e.ok)throw Error(`HTTP ${e.status}`);let t=await e.json();S(t)}catch(e){h("Failed to reload settings")}},V=async()=>{O(!0),L({type:"",message:""});try{let e=await fetch("/api/settings/database");if(!e.ok){let t=await e.json().catch(()=>({}));throw Error(t.error||"Failed to export database")}let t=await e.json(),s=JSON.stringify(t,null,2),a=new Blob([s],{type:"application/json"}),r=URL.createObjectURL(a),l=document.createElement("a"),i=new Date().toISOString().replace(/[.:]/g,"-");l.href=r,l.download=`switchboard-backup-${i}.json`,document.body.appendChild(l),l.click(),document.body.removeChild(l),URL.revokeObjectURL(r),L({type:"success",message:"Database backup downloaded"})}catch(e){L({type:"error",message:e.message||"Failed to export database"})}finally{O(!1)}},X=async e=>{let t=e.target.files?.[0];if($.current&&($.current.value=""),t){O(!0),L({type:"",message:""});try{let e=await t.text(),s=JSON.parse(e),a=await fetch("/api/settings/database",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)}),r=await a.json().catch(()=>({}));if(!a.ok)throw Error(r.error||"Failed to import database");await G(),L({type:"success",message:"Database imported successfully"})}catch(e){L({type:"error",message:e.message||"Invalid backup file"})}finally{O(!1)}}},Y=!0===C.enableObservability,ee=async()=>{k(!0);try{await fetch("/api/version/shutdown",{method:"POST"})}catch(e){}k(!1),w(!1)};return(0,a.jsxs)("div",{className:"max-w-2xl mx-auto px-4 sm:px-0",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsxs)(l.Zp,{children:[(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 mb-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 sm:gap-4",children:[(0,a.jsx)("div",{className:"size-10 sm:size-12 rounded-lg bg-green-500/10 text-green-500 flex items-center justify-center shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-xl sm:text-2xl",children:"computer"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-lg sm:text-xl font-semibold",children:"Local Mode"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Running on your machine"})]})]}),(0,a.jsx)("div",{className:"inline-flex p-1 rounded-lg bg-black/5 dark:bg-white/5 w-full sm:w-auto",children:["light","dark","system"].map(e=>(0,a.jsxs)("button",{type:"button",onClick:()=>s(e),className:(0,d.cn)("flex items-center justify-center gap-1 sm:gap-1.5 px-2 sm:px-3 py-1.5 rounded-md font-medium transition-all flex-1 sm:flex-initial",t===e?"bg-white dark:bg-white/10 text-text-main shadow-sm":"text-text-muted hover:text-text-main"),children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"light"===e?"light_mode":"dark"===e?"dark_mode":"contrast"}),(0,a.jsx)("span",{className:"capitalize text-xs sm:text-sm",children:e})]},e))})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 pt-4 border-t border-border",children:[(0,a.jsx)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between p-3 rounded-lg bg-bg border border-border gap-2",children:(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Database Location"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted font-mono break-all",children:"~/.switchboard/db/data.sqlite"})]})}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2",children:[(0,a.jsx)(l.$n,{variant:"secondary",icon:"download",onClick:()=>V(),loading:T,className:"w-full sm:w-auto",children:"Download Backup"}),(0,a.jsx)(l.$n,{variant:"outline",icon:"upload",onClick:()=>$.current?.click(),disabled:T,className:"w-full sm:w-auto",children:"Import Backup"}),(0,a.jsx)("input",{ref:$,type:"file",accept:"application/json,.json",className:"hidden",onChange:X})]}),E.message&&(0,a.jsx)("p",{className:`text-sm ${"error"===E.type?"text-red-500":"text-green-600 dark:text-green-400"}`,children:E.message})]})]}),(0,a.jsxs)(l.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"size-10 rounded-lg bg-blue-500/10 text-blue-500 flex items-center justify-center shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"language"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Language"})]}),(0,a.jsxs)("button",{onClick:()=>j(!0),className:"flex items-center justify-between w-full p-3 rounded-lg bg-bg border border-border hover:border-primary/50 transition-colors","data-i18n-skip":"true",children:[(0,a.jsx)("span",{className:"text-sm text-text-muted",children:"Display language"}),(0,a.jsx)("span",{className:"text-2xl",children:x.h[y]||"\uD83C\uDF10"})]})]}),(0,a.jsxs)(l.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-blue-500/10 text-blue-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"route"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Routing Strategy"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Round Robin"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Cycle through accounts to distribute load"})]}),(0,a.jsx)(l.lM,{checked:"round-robin"===C.fallbackStrategy,onChange:()=>z("round-robin"===C.fallbackStrategy?"fill-first":"round-robin"),disabled:P,"aria-label":"Round Robin"})]}),"round-robin"===C.fallbackStrategy&&(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4 pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Sticky Limit"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Calls per account before switching"})]}),(0,a.jsx)(l.pd,{type:"number","aria-label":"Sticky Limit",min:"1",max:"10",value:C.stickyRoundRobinLimit||3,onChange:e=>B(e.target.value),disabled:P,className:"w-16 sm:w-20 text-center shrink-0"})]}),(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4 pt-4 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Combo Round Robin"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Cycle through providers in combos instead of always starting with first"})]}),(0,a.jsx)(l.lM,{checked:"round-robin"===C.comboStrategy,onChange:()=>Q("round-robin"===C.comboStrategy?"fallback":"round-robin"),disabled:P,"aria-label":"Combo Round Robin"})]}),"round-robin"===C.comboStrategy&&(0,a.jsxs)("div",{className:"flex items-center justify-between pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:"Combo Sticky Limit"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Calls per combo model before switching"})]}),(0,a.jsx)(l.pd,{type:"number","aria-label":"Combo Sticky Limit",min:"1",max:"100",value:C.comboStickyRoundRobinLimit||1,onChange:e=>K(e.target.value),disabled:P,className:"w-20 text-center"})]}),(0,a.jsxs)("p",{className:"text-xs text-text-muted italic pt-2 border-t border-border/50",children:["round-robin"===C.fallbackStrategy?`Currently distributing requests across all available accounts with ${C.stickyRoundRobinLimit||3} calls per account.`:"Currently using accounts in priority order (Fill First).","round-robin"===C.comboStrategy?` Combos rotate after ${C.comboStickyRoundRobinLimit||1} call${1===(C.comboStickyRoundRobinLimit||1)?"":"s"} per model.`:" Combos always start with their first model."]})]})]}),(0,a.jsxs)(l.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-purple-500/10 text-purple-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"wifi"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Network"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Outbound Proxy"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Enable proxy for OAuth + provider outbound requests."})]}),(0,a.jsx)(l.lM,{checked:!0===C.outboundProxyEnabled,onChange:()=>q(!0!==C.outboundProxyEnabled),disabled:P||M,"aria-label":"Outbound Proxy"})]}),!0===C.outboundProxyEnabled&&(0,a.jsxs)("form",{onSubmit:I,className:"flex flex-col gap-4 pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Proxy URL"}),(0,a.jsx)(l.pd,{placeholder:"http://127.0.0.1:7897",value:U.outboundProxyUrl,onChange:e=>F(t=>({...t,outboundProxyUrl:e.target.value})),disabled:P||M}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Leave empty to inherit existing env proxy (if any)."})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2 pt-2 border-t border-border/50",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"No Proxy"}),(0,a.jsx)(l.pd,{placeholder:"localhost,127.0.0.1",value:U.outboundNoProxy,onChange:e=>F(t=>({...t,outboundNoProxy:e.target.value})),disabled:P||M}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Comma-separated hostnames/domains to bypass the proxy."})]}),(0,a.jsxs)("div",{className:"pt-2 border-t border-border/50 flex flex-col sm:flex-row items-stretch sm:items-center gap-2",children:[(0,a.jsx)(l.$n,{type:"button",variant:"secondary",loading:_,disabled:P||M,onClick:Z,className:"w-full sm:w-auto",children:"Test proxy URL"}),(0,a.jsx)(l.$n,{type:"submit",variant:"primary",loading:M,className:"w-full sm:w-auto",children:"Apply"})]})]}),A.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===A.type?"text-red-500":"text-green-500"} pt-2 border-t border-border/50`,children:A.message})]})]}),(0,a.jsxs)(l.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-orange-500/10 text-orange-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"monitoring"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Observability"})]}),(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Enable Observability"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Record request details for inspection in the logs view"})]}),(0,a.jsx)(l.lM,{checked:Y,onChange:W,disabled:P,"aria-label":"Enable Observability"})]})]}),(0,a.jsx)("div",{className:"flex flex-col sm:flex-row gap-2",children:(0,a.jsx)(l.$n,{variant:"outline",fullWidth:!0,icon:"power_settings_new",onClick:()=>w(!0),className:"text-red-500 border-red-200 hover:bg-red-50 hover:border-red-300",children:"Shutdown"})}),(0,a.jsxs)("div",{className:"text-center text-xs sm:text-sm text-text-muted py-4",children:[(0,a.jsxs)("p",{children:[c.vQ.name," v",c.vQ.version]}),(0,a.jsx)("p",{className:"mt-1",children:"Local Mode - All data stored on your machine"})]})]}),(0,a.jsx)(o.default,{hideTrigger:!0,isOpen:g,onClose:e=>{j(!1),f(e)}}),(0,a.jsx)(i.ConfirmModal,{isOpen:N,onClose:()=>w(!1),onConfirm:ee,title:"Shutdown",message:"Are you sure you want to close the proxy server?",confirmText:"Shutdown",cancelText:"Cancel",variant:"danger",loading:v})]})}},34743:(e,t,s)=>{Promise.resolve().then(s.bind(s,12151))},35497:(e,t,s)=>{"use strict";s.d(t,{x0:()=>v.default,Ex:()=>d.default,$n:()=>a.default,nh:()=>R.default,Zp:()=>i.default,Qv:()=>n.CardSkeleton,CK:()=>b.default,uo:()=>o.ConfirmModal,G9:()=>g.default,wI:()=>w.default,vj:()=>N.default,vE:()=>j.default,pd:()=>r.default,Mh:()=>f.default,uR:()=>u.default,Nf:()=>p.default,aF:()=>o.default,rq:()=>x.default,gw:()=>k.default,LF:()=>m.default,Wx:()=>P.default,gM:()=>y.default,Iz:()=>C.default,l6:()=>l.default,lM:()=>c.default,m_:()=>S.default,jK:()=>h.default});var a=s(92542),r=s(11910),l=s(98),i=s(84588),o=s(81127),n=s(25086);s(56319);var d=s(56061),c=s(98542);s(38587),s(21110),s(92622),s(8823),s(92173);var m=s(90882),x=s(72908),u=s(28815),b=s(45455),p=s(28058),h=s(4809);s(21931),s(80752),s(40197);var y=s(23615);s(44736);var f=s(62899);s(94230);var g=s(30815),j=s(23936),N=s(95088),w=s(73579),v=s(96748),k=s(4823),C=s(28067),S=s(97677),P=s(51825),R=s(29366);s(76361),s(91450)}},e=>{e.O(0,[2574,3862,782,8500,594,1321,4707,1330,8441,3794,7358],()=>e(e.s=34743)),_N_E=e.O()}]);