sparkecoder 0.1.130 → 0.1.132

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 (216) hide show
  1. package/README.md +3 -3
  2. package/dist/agent/index.d.ts +3 -3
  3. package/dist/agent/index.js +1480 -638
  4. package/dist/agent/index.js.map +1 -1
  5. package/dist/cli.js +2281 -808
  6. package/dist/cli.js.map +1 -1
  7. package/dist/db/index.d.ts +2 -2
  8. package/dist/db/index.js.map +1 -1
  9. package/dist/{index-Bcz0aCAR.d.ts → index-BM99kjgq.d.ts} +177 -103
  10. package/dist/index.d.ts +5 -5
  11. package/dist/index.js +2215 -780
  12. package/dist/index.js.map +1 -1
  13. package/dist/{schema-BWbWmfDQ.d.ts → schema-Dz-wABVY.d.ts} +27 -4
  14. package/dist/{search-DOzC4ojH.d.ts → search-CVVfuBPZ.d.ts} +4 -4
  15. package/dist/server/index.js +2215 -780
  16. package/dist/server/index.js.map +1 -1
  17. package/dist/skills/default/build-context-and-solve-issue.md +74 -0
  18. package/dist/skills/default/doublecheck.md +95 -0
  19. package/dist/tools/index.d.ts +3 -3
  20. package/dist/tools/index.js +11 -2
  21. package/dist/tools/index.js.map +1 -1
  22. package/package.json +1 -1
  23. package/src/skills/default/build-context-and-solve-issue.md +74 -0
  24. package/src/skills/default/doublecheck.md +95 -0
  25. package/web/.next/BUILD_ID +1 -1
  26. package/web/.next/standalone/web/.next/BUILD_ID +1 -1
  27. package/web/.next/standalone/web/.next/build-manifest.json +2 -2
  28. package/web/.next/standalone/web/.next/prerender-manifest.json +3 -3
  29. package/web/.next/standalone/web/.next/server/app/(main)/agents/page/next-font-manifest.json +1 -1
  30. package/web/.next/standalone/web/.next/server/app/(main)/agents/page_client-reference-manifest.js +1 -1
  31. package/web/.next/standalone/web/.next/server/app/(main)/page/next-font-manifest.json +1 -1
  32. package/web/.next/standalone/web/.next/server/app/(main)/page_client-reference-manifest.js +1 -1
  33. package/web/.next/standalone/web/.next/server/app/(main)/session/[id]/page/next-font-manifest.json +1 -1
  34. package/web/.next/standalone/web/.next/server/app/(main)/session/[id]/page_client-reference-manifest.js +1 -1
  35. package/web/.next/standalone/web/.next/server/app/(main)/settings/page/next-font-manifest.json +1 -1
  36. package/web/.next/standalone/web/.next/server/app/(main)/settings/page_client-reference-manifest.js +1 -1
  37. package/web/.next/standalone/web/.next/server/app/_global-error.html +2 -2
  38. package/web/.next/standalone/web/.next/server/app/_global-error.rsc +1 -1
  39. package/web/.next/standalone/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  40. package/web/.next/standalone/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  41. package/web/.next/standalone/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  42. package/web/.next/standalone/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  43. package/web/.next/standalone/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  44. package/web/.next/standalone/web/.next/server/app/_not-found/page/next-font-manifest.json +1 -1
  45. package/web/.next/standalone/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  46. package/web/.next/standalone/web/.next/server/app/_not-found.html +1 -1
  47. package/web/.next/standalone/web/.next/server/app/_not-found.rsc +3 -3
  48. package/web/.next/standalone/web/.next/server/app/_not-found.segments/_full.segment.rsc +3 -3
  49. package/web/.next/standalone/web/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  50. package/web/.next/standalone/web/.next/server/app/_not-found.segments/_index.segment.rsc +3 -3
  51. package/web/.next/standalone/web/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  52. package/web/.next/standalone/web/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  53. package/web/.next/standalone/web/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  54. package/web/.next/standalone/web/.next/server/app/agents.html +1 -1
  55. package/web/.next/standalone/web/.next/server/app/agents.rsc +6 -6
  56. package/web/.next/standalone/web/.next/server/app/agents.segments/!KG1haW4p/agents/__PAGE__.segment.rsc +2 -2
  57. package/web/.next/standalone/web/.next/server/app/agents.segments/!KG1haW4p/agents.segment.rsc +1 -1
  58. package/web/.next/standalone/web/.next/server/app/agents.segments/!KG1haW4p.segment.rsc +2 -2
  59. package/web/.next/standalone/web/.next/server/app/agents.segments/_full.segment.rsc +6 -6
  60. package/web/.next/standalone/web/.next/server/app/agents.segments/_head.segment.rsc +1 -1
  61. package/web/.next/standalone/web/.next/server/app/agents.segments/_index.segment.rsc +3 -3
  62. package/web/.next/standalone/web/.next/server/app/agents.segments/_tree.segment.rsc +3 -3
  63. package/web/.next/standalone/web/.next/server/app/api/config/route.js.nft.json +1 -1
  64. package/web/.next/standalone/web/.next/server/app/api/health/route.js.nft.json +1 -1
  65. package/web/.next/standalone/web/.next/server/app/docs/installation/page/next-font-manifest.json +1 -1
  66. package/web/.next/standalone/web/.next/server/app/docs/installation/page_client-reference-manifest.js +1 -1
  67. package/web/.next/standalone/web/.next/server/app/docs/installation.html +4 -4
  68. package/web/.next/standalone/web/.next/server/app/docs/installation.rsc +6 -6
  69. package/web/.next/standalone/web/.next/server/app/docs/installation.segments/_full.segment.rsc +6 -6
  70. package/web/.next/standalone/web/.next/server/app/docs/installation.segments/_head.segment.rsc +1 -1
  71. package/web/.next/standalone/web/.next/server/app/docs/installation.segments/_index.segment.rsc +3 -3
  72. package/web/.next/standalone/web/.next/server/app/docs/installation.segments/_tree.segment.rsc +2 -2
  73. package/web/.next/standalone/web/.next/server/app/docs/installation.segments/docs/installation/__PAGE__.segment.rsc +20 -21
  74. package/web/.next/standalone/web/.next/server/app/docs/installation.segments/docs/installation.segment.rsc +1 -1
  75. package/web/.next/standalone/web/.next/server/app/docs/installation.segments/docs.segment.rsc +2 -2
  76. package/web/.next/standalone/web/.next/server/app/docs/page/next-font-manifest.json +1 -1
  77. package/web/.next/standalone/web/.next/server/app/docs/page_client-reference-manifest.js +1 -1
  78. package/web/.next/standalone/web/.next/server/app/docs/skills/page/next-font-manifest.json +1 -1
  79. package/web/.next/standalone/web/.next/server/app/docs/skills/page_client-reference-manifest.js +1 -1
  80. package/web/.next/standalone/web/.next/server/app/docs/skills.html +2 -2
  81. package/web/.next/standalone/web/.next/server/app/docs/skills.rsc +4 -4
  82. package/web/.next/standalone/web/.next/server/app/docs/skills.segments/_full.segment.rsc +4 -4
  83. package/web/.next/standalone/web/.next/server/app/docs/skills.segments/_head.segment.rsc +1 -1
  84. package/web/.next/standalone/web/.next/server/app/docs/skills.segments/_index.segment.rsc +3 -3
  85. package/web/.next/standalone/web/.next/server/app/docs/skills.segments/_tree.segment.rsc +2 -2
  86. package/web/.next/standalone/web/.next/server/app/docs/skills.segments/docs/skills/__PAGE__.segment.rsc +1 -1
  87. package/web/.next/standalone/web/.next/server/app/docs/skills.segments/docs/skills.segment.rsc +1 -1
  88. package/web/.next/standalone/web/.next/server/app/docs/skills.segments/docs.segment.rsc +2 -2
  89. package/web/.next/standalone/web/.next/server/app/docs/tools/page/next-font-manifest.json +1 -1
  90. package/web/.next/standalone/web/.next/server/app/docs/tools/page_client-reference-manifest.js +1 -1
  91. package/web/.next/standalone/web/.next/server/app/docs/tools.html +2 -2
  92. package/web/.next/standalone/web/.next/server/app/docs/tools.rsc +4 -4
  93. package/web/.next/standalone/web/.next/server/app/docs/tools.segments/_full.segment.rsc +4 -4
  94. package/web/.next/standalone/web/.next/server/app/docs/tools.segments/_head.segment.rsc +1 -1
  95. package/web/.next/standalone/web/.next/server/app/docs/tools.segments/_index.segment.rsc +3 -3
  96. package/web/.next/standalone/web/.next/server/app/docs/tools.segments/_tree.segment.rsc +2 -2
  97. package/web/.next/standalone/web/.next/server/app/docs/tools.segments/docs/tools/__PAGE__.segment.rsc +2 -2
  98. package/web/.next/standalone/web/.next/server/app/docs/tools.segments/docs/tools.segment.rsc +1 -1
  99. package/web/.next/standalone/web/.next/server/app/docs/tools.segments/docs.segment.rsc +2 -2
  100. package/web/.next/standalone/web/.next/server/app/docs.html +3 -3
  101. package/web/.next/standalone/web/.next/server/app/docs.rsc +5 -5
  102. package/web/.next/standalone/web/.next/server/app/docs.segments/_full.segment.rsc +5 -5
  103. package/web/.next/standalone/web/.next/server/app/docs.segments/_head.segment.rsc +1 -1
  104. package/web/.next/standalone/web/.next/server/app/docs.segments/_index.segment.rsc +3 -3
  105. package/web/.next/standalone/web/.next/server/app/docs.segments/_tree.segment.rsc +2 -2
  106. package/web/.next/standalone/web/.next/server/app/docs.segments/docs/__PAGE__.segment.rsc +3 -3
  107. package/web/.next/standalone/web/.next/server/app/docs.segments/docs.segment.rsc +2 -2
  108. package/web/.next/standalone/web/.next/server/app/index.html +1 -1
  109. package/web/.next/standalone/web/.next/server/app/index.rsc +6 -6
  110. package/web/.next/standalone/web/.next/server/app/index.segments/!KG1haW4p/__PAGE__.segment.rsc +2 -2
  111. package/web/.next/standalone/web/.next/server/app/index.segments/!KG1haW4p.segment.rsc +2 -2
  112. package/web/.next/standalone/web/.next/server/app/index.segments/_full.segment.rsc +6 -6
  113. package/web/.next/standalone/web/.next/server/app/index.segments/_head.segment.rsc +1 -1
  114. package/web/.next/standalone/web/.next/server/app/index.segments/_index.segment.rsc +3 -3
  115. package/web/.next/standalone/web/.next/server/app/index.segments/_tree.segment.rsc +3 -3
  116. package/web/.next/standalone/web/.next/server/app/settings.html +1 -1
  117. package/web/.next/standalone/web/.next/server/app/settings.rsc +6 -6
  118. package/web/.next/standalone/web/.next/server/app/settings.segments/!KG1haW4p/settings/__PAGE__.segment.rsc +2 -2
  119. package/web/.next/standalone/web/.next/server/app/settings.segments/!KG1haW4p/settings.segment.rsc +1 -1
  120. package/web/.next/standalone/web/.next/server/app/settings.segments/!KG1haW4p.segment.rsc +2 -2
  121. package/web/.next/standalone/web/.next/server/app/settings.segments/_full.segment.rsc +6 -6
  122. package/web/.next/standalone/web/.next/server/app/settings.segments/_head.segment.rsc +1 -1
  123. package/web/.next/standalone/web/.next/server/app/settings.segments/_index.segment.rsc +3 -3
  124. package/web/.next/standalone/web/.next/server/app/settings.segments/_tree.segment.rsc +3 -3
  125. package/web/.next/standalone/web/.next/server/chunks/[root-of-the-server]__36edac7c._.js +1 -1
  126. package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__397fadd4._.js +1 -1
  127. package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__70cecda8._.js +1 -1
  128. package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__be5e2967._.js +1 -1
  129. package/web/.next/standalone/web/.next/server/chunks/ssr/web_src_app_(main)_layout_tsx_453f6492._.js +1 -1
  130. package/web/.next/standalone/web/.next/server/chunks/ssr/web_src_app_(main)_page_tsx_5ac4794b._.js +1 -1
  131. package/web/.next/standalone/web/.next/server/chunks/ssr/web_src_app_(main)_settings_page_tsx_eb320e07._.js +2 -2
  132. package/web/.next/standalone/web/.next/server/next-font-manifest.js +1 -1
  133. package/web/.next/standalone/web/.next/server/next-font-manifest.json +9 -9
  134. package/web/.next/standalone/web/.next/server/pages/404.html +1 -1
  135. package/web/.next/standalone/web/.next/server/pages/500.html +2 -2
  136. package/web/.next/standalone/web/.next/server/server-reference-manifest.js +1 -1
  137. package/web/.next/standalone/web/.next/server/server-reference-manifest.json +1 -1
  138. package/web/.next/standalone/web/.next/static/chunks/185f69f6478ba713.js +1 -0
  139. package/web/.next/standalone/web/.next/static/chunks/20ca4e35e9bb3e94.js +3 -0
  140. package/web/.next/standalone/web/.next/static/chunks/{a7d5d0791c8c6223.css → 34d933785a17edf3.css} +1 -1
  141. package/web/.next/standalone/web/.next/static/chunks/7549a5b7c7f6786e.js +1 -0
  142. package/web/.next/standalone/web/.next/static/{static/chunks/c5dd884b71007965.js → chunks/a839c83078c56476.js} +1 -1
  143. package/web/.next/standalone/web/.next/static/media/4fa387ec64143e14-s.3b336396.woff2 +0 -0
  144. package/web/.next/standalone/web/.next/static/media/5ce348bf30bf5439-s.56c1f21e.woff2 +0 -0
  145. package/web/.next/standalone/web/.next/static/media/6306c77e7c8268e4-s.e3369375.woff2 +0 -0
  146. package/web/.next/standalone/web/.next/static/media/797e433ab948586e-s.p.29207c2f.woff2 +0 -0
  147. package/web/.next/standalone/web/.next/static/media/7d817b4c03b0c5f1-s.a40b9a8b.woff2 +0 -0
  148. package/web/.next/standalone/web/.next/static/media/bbc41e54d2fcbd21-s.fe42ddf4.woff2 +0 -0
  149. package/web/.next/standalone/web/.next/static/static/chunks/185f69f6478ba713.js +1 -0
  150. package/web/.next/standalone/web/.next/static/static/chunks/20ca4e35e9bb3e94.js +3 -0
  151. package/web/.next/standalone/web/.next/static/static/chunks/{a7d5d0791c8c6223.css → 34d933785a17edf3.css} +1 -1
  152. package/web/.next/standalone/web/.next/static/static/chunks/7549a5b7c7f6786e.js +1 -0
  153. package/web/.next/{static/chunks/c5dd884b71007965.js → standalone/web/.next/static/static/chunks/a839c83078c56476.js} +1 -1
  154. package/web/.next/standalone/web/.next/static/static/media/4fa387ec64143e14-s.3b336396.woff2 +0 -0
  155. package/web/.next/standalone/web/.next/static/static/media/5ce348bf30bf5439-s.56c1f21e.woff2 +0 -0
  156. package/web/.next/standalone/web/.next/static/static/media/6306c77e7c8268e4-s.e3369375.woff2 +0 -0
  157. package/web/.next/standalone/web/.next/static/static/media/797e433ab948586e-s.p.29207c2f.woff2 +0 -0
  158. package/web/.next/standalone/web/.next/static/static/media/7d817b4c03b0c5f1-s.a40b9a8b.woff2 +0 -0
  159. package/web/.next/standalone/web/.next/static/static/media/bbc41e54d2fcbd21-s.fe42ddf4.woff2 +0 -0
  160. package/web/.next/standalone/web/package-lock.json +21 -21
  161. package/web/.next/standalone/web/runtime-config.json +2 -1
  162. package/web/.next/standalone/web/src/app/(main)/page.tsx +2 -2
  163. package/web/.next/standalone/web/src/app/(main)/settings/page.tsx +111 -11
  164. package/web/.next/standalone/web/src/app/__sfapi/[...path]/route.ts +96 -0
  165. package/web/.next/standalone/web/src/app/api/config/route.ts +5 -12
  166. package/web/.next/standalone/web/src/app/docs/installation/page.mdx +2 -2
  167. package/web/.next/standalone/web/src/app/docs/page.mdx +1 -1
  168. package/web/.next/standalone/web/src/components/sessions-sidebar.tsx +1 -1
  169. package/web/.next/standalone/web/src/lib/config.ts +26 -16
  170. package/web/.next/static/chunks/185f69f6478ba713.js +1 -0
  171. package/web/.next/static/chunks/20ca4e35e9bb3e94.js +3 -0
  172. package/web/.next/static/chunks/{a7d5d0791c8c6223.css → 34d933785a17edf3.css} +1 -1
  173. package/web/.next/static/chunks/7549a5b7c7f6786e.js +1 -0
  174. package/web/.next/{standalone/web/.next/static/chunks/c5dd884b71007965.js → static/chunks/a839c83078c56476.js} +1 -1
  175. package/web/.next/static/media/4fa387ec64143e14-s.3b336396.woff2 +0 -0
  176. package/web/.next/static/media/5ce348bf30bf5439-s.56c1f21e.woff2 +0 -0
  177. package/web/.next/static/media/6306c77e7c8268e4-s.e3369375.woff2 +0 -0
  178. package/web/.next/static/media/797e433ab948586e-s.p.29207c2f.woff2 +0 -0
  179. package/web/.next/static/media/7d817b4c03b0c5f1-s.a40b9a8b.woff2 +0 -0
  180. package/web/.next/static/media/bbc41e54d2fcbd21-s.fe42ddf4.woff2 +0 -0
  181. package/web/.next/standalone/web/.next/static/chunks/9b88f148788e4504.js +0 -3
  182. package/web/.next/standalone/web/.next/static/chunks/b203b9aa975135d3.js +0 -1
  183. package/web/.next/standalone/web/.next/static/chunks/ea89ca7892d8c557.js +0 -1
  184. package/web/.next/standalone/web/.next/static/media/4fa387ec64143e14-s.c36e1862.woff2 +0 -0
  185. package/web/.next/standalone/web/.next/static/media/5ce348bf30bf5439-s.ebceb24d.woff2 +0 -0
  186. package/web/.next/standalone/web/.next/static/media/6306c77e7c8268e4-s.ff4a2084.woff2 +0 -0
  187. package/web/.next/standalone/web/.next/static/media/797e433ab948586e-s.p.479bea2b.woff2 +0 -0
  188. package/web/.next/standalone/web/.next/static/media/7d817b4c03b0c5f1-s.f377b9c4.woff2 +0 -0
  189. package/web/.next/standalone/web/.next/static/media/bbc41e54d2fcbd21-s.d1207556.woff2 +0 -0
  190. package/web/.next/standalone/web/.next/static/static/chunks/9b88f148788e4504.js +0 -3
  191. package/web/.next/standalone/web/.next/static/static/chunks/b203b9aa975135d3.js +0 -1
  192. package/web/.next/standalone/web/.next/static/static/chunks/ea89ca7892d8c557.js +0 -1
  193. package/web/.next/standalone/web/.next/static/static/media/4fa387ec64143e14-s.c36e1862.woff2 +0 -0
  194. package/web/.next/standalone/web/.next/static/static/media/5ce348bf30bf5439-s.ebceb24d.woff2 +0 -0
  195. package/web/.next/standalone/web/.next/static/static/media/6306c77e7c8268e4-s.ff4a2084.woff2 +0 -0
  196. package/web/.next/standalone/web/.next/static/static/media/797e433ab948586e-s.p.479bea2b.woff2 +0 -0
  197. package/web/.next/standalone/web/.next/static/static/media/7d817b4c03b0c5f1-s.f377b9c4.woff2 +0 -0
  198. package/web/.next/standalone/web/.next/static/static/media/bbc41e54d2fcbd21-s.d1207556.woff2 +0 -0
  199. package/web/.next/static/chunks/9b88f148788e4504.js +0 -3
  200. package/web/.next/static/chunks/b203b9aa975135d3.js +0 -1
  201. package/web/.next/static/chunks/ea89ca7892d8c557.js +0 -1
  202. package/web/.next/static/media/4fa387ec64143e14-s.c36e1862.woff2 +0 -0
  203. package/web/.next/static/media/5ce348bf30bf5439-s.ebceb24d.woff2 +0 -0
  204. package/web/.next/static/media/6306c77e7c8268e4-s.ff4a2084.woff2 +0 -0
  205. package/web/.next/static/media/797e433ab948586e-s.p.479bea2b.woff2 +0 -0
  206. package/web/.next/static/media/7d817b4c03b0c5f1-s.f377b9c4.woff2 +0 -0
  207. package/web/.next/static/media/bbc41e54d2fcbd21-s.d1207556.woff2 +0 -0
  208. /package/web/.next/standalone/web/.next/static/{2mUQ8I-TCRE5uOBFhIWag → WaAcu3X3K00MDvfn1ik7H}/_buildManifest.js +0 -0
  209. /package/web/.next/standalone/web/.next/static/{2mUQ8I-TCRE5uOBFhIWag → WaAcu3X3K00MDvfn1ik7H}/_clientMiddlewareManifest.json +0 -0
  210. /package/web/.next/standalone/web/.next/static/{2mUQ8I-TCRE5uOBFhIWag → WaAcu3X3K00MDvfn1ik7H}/_ssgManifest.js +0 -0
  211. /package/web/.next/standalone/web/.next/static/static/{2mUQ8I-TCRE5uOBFhIWag → WaAcu3X3K00MDvfn1ik7H}/_buildManifest.js +0 -0
  212. /package/web/.next/standalone/web/.next/static/static/{2mUQ8I-TCRE5uOBFhIWag → WaAcu3X3K00MDvfn1ik7H}/_clientMiddlewareManifest.json +0 -0
  213. /package/web/.next/standalone/web/.next/static/static/{2mUQ8I-TCRE5uOBFhIWag → WaAcu3X3K00MDvfn1ik7H}/_ssgManifest.js +0 -0
  214. /package/web/.next/static/{2mUQ8I-TCRE5uOBFhIWag → WaAcu3X3K00MDvfn1ik7H}/_buildManifest.js +0 -0
  215. /package/web/.next/static/{2mUQ8I-TCRE5uOBFhIWag → WaAcu3X3K00MDvfn1ik7H}/_clientMiddlewareManifest.json +0 -0
  216. /package/web/.next/static/{2mUQ8I-TCRE5uOBFhIWag → WaAcu3X3K00MDvfn1ik7H}/_ssgManifest.js +0 -0
@@ -1,3 +1,3 @@
1
- module.exports=[193695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},918622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},556704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},832319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},324725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},814747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},522734,(e,t,r)=>{t.exports=e.x("fs",()=>require("fs"))},604575,e=>{"use strict";var t=e.i(698490),r=e.i(618006),a=e.i(795912),n=e.i(772560),o=e.i(976852),i=e.i(738533),s=e.i(455822),l=e.i(754068),d=e.i(266843),u=e.i(699385),p=e.i(903050),c=e.i(475293),h=e.i(502144),f=e.i(833599),g=e.i(536497),v=e.i(193695);e.i(779178);var x=e.i(396717),m=e.i(23480),R=e.i(522734),C=e.i(814747);let w=[{id:"anthropic/claude-opus-4.7",name:"Claude Opus 4.7",provider:"Anthropic"},{id:"anthropic/claude-opus-4-6",name:"Claude Opus 4.6",provider:"Anthropic"},{id:"anthropic/claude-opus-4-5",name:"Claude Opus 4.5",provider:"Anthropic"},{id:"anthropic/claude-sonnet-4",name:"Claude Sonnet 4",provider:"Anthropic"},{id:"anthropic/claude-haiku-4-5",name:"Claude Haiku 4.5",provider:"Anthropic"},{id:"openai/gpt-5-2-codex",name:"GPT-5.2 Codex",provider:"OpenAI"},{id:"openai/gpt-4o",name:"GPT-4o",provider:"OpenAI"},{id:"google/gemini-3-pro-preview",name:"Gemini 3 Pro Preview",provider:"Google"},{id:"google/gemini-3-flash",name:"Gemini 3 Flash",provider:"Google"},{id:"xai/grok-code-fast-1",name:"Grok Code Fast",provider:"xAI"}],E=[{id:"bash",name:"Bash",description:"Execute shell commands",dangerous:!0},{id:"write_file",name:"Write File",description:"Create or edit files",dangerous:!0},{id:"read_file",name:"Read File",description:"Read file contents",dangerous:!1},{id:"todo",name:"Todo",description:"Manage task lists",dangerous:!1},{id:"load_skill",name:"Load Skill",description:"Load skills into context",dangerous:!1}];async function y(){let e=function(){let e=process.cwd();for(let t of[C.join(e,"runtime-config.json"),C.join(e,"..","runtime-config.json"),C.join(e,"..","..","runtime-config.json"),C.join(e,"..","..","..","runtime-config.json")])try{if(R.existsSync(t)){let e=R.readFileSync(t,"utf-8"),r=JSON.parse(e);if(r.apiBaseUrl)return r.apiBaseUrl}}catch{}return"http://localhost:3141"}();try{let t=new AbortController,r=setTimeout(()=>t.abort(),3e3),a=await fetch(`${e}/health`,{cache:"no-store",signal:t.signal});clearTimeout(r);let n=await a.json();return m.NextResponse.json({availableModels:w,availableTools:E,defaultModel:n.config?.defaultModel||"anthropic/claude-opus-4.7",defaultToolApprovals:n.config?.defaultToolApprovals||{},serverConnected:!0,apiKeyConfigured:n.apiKeyConfigured??!1,apiBaseUrl:e})}catch{return m.NextResponse.json({availableModels:w,availableTools:E,defaultModel:"anthropic/claude-opus-4.7",defaultToolApprovals:{},serverConnected:!1,apiKeyConfigured:!1,apiBaseUrl:e})}}e.s(["GET",()=>y,"dynamic",0,"force-dynamic"],518232);var A=e.i(518232);let b=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/config/route",pathname:"/api/config",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/web/src/app/api/config/route.ts",nextConfigOutput:"standalone",userland:A}),{workAsyncStorage:T,workUnitAsyncStorage:k,serverHooks:j}=b;function O(){return(0,a.patchFetch)({workAsyncStorage:T,workUnitAsyncStorage:k})}async function P(e,t,a){b.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let m="/api/config/route";m=m.replace(/\/index$/,"")||"/";let R=await b.prepare(e,t,{srcPage:m,multiZoneDraftMode:!1});if(!R)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:C,params:w,nextConfig:E,parsedUrl:y,isDraftMode:A,prerenderManifest:T,routerServerContext:k,isOnDemandRevalidate:j,revalidateOnlyGenerated:O,resolvedPathname:P,clientReferenceManifest:N,serverActionsManifest:S}=R,_=(0,s.normalizeAppPath)(m),q=!!(T.dynamicRoutes[_]||T.routes[P]),H=async()=>((null==k?void 0:k.render404)?await k.render404(e,t,y,!1):t.end("This page could not be found"),null);if(q&&!A){let e=!!T.routes[P],t=T.dynamicRoutes[_];if(t&&!1===t.fallback&&!e){if(E.experimental.adapterPath)return await H();throw new v.NoFallbackError}}let I=null;!q||b.isDev||A||(I="/index"===(I=P)?"/":I);let M=!0===b.isDev||!q,U=q&&!M;S&&N&&(0,i.setManifestsSingleton)({page:m,clientReferenceManifest:N,serverActionsManifest:S});let D=e.method||"GET",F=(0,o.getTracer)(),G=F.getActiveScopeSpan(),K={params:w,prerenderManifest:T,renderOpts:{experimental:{authInterrupts:!!E.experimental.authInterrupts},cacheComponents:!!E.cacheComponents,supportsDynamicResponse:M,incrementalCache:(0,n.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:E.cacheLife,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,a,n)=>b.onRequestError(e,t,a,n,k)},sharedContext:{buildId:C}},$=new l.NodeNextRequest(e),B=new l.NodeNextResponse(t),L=d.NextRequestAdapter.fromNodeNextRequest($,(0,d.signalFromNodeResponse)(t));try{let i=async e=>b.handle(L,K).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=F.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==u.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let a=r.get("next.route");if(a){let t=`${D} ${a}`;e.setAttributes({"next.route":a,"http.route":a,"next.span_name":t}),e.updateName(t)}else e.updateName(`${D} ${m}`)}),s=!!(0,n.getRequestMeta)(e,"minimalMode"),l=async n=>{var o,l;let d=async({previousCacheEntry:r})=>{try{if(!s&&j&&O&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let o=await i(n);e.fetchMetrics=K.renderOpts.fetchMetrics;let l=K.renderOpts.pendingWaitUntil;l&&a.waitUntil&&(a.waitUntil(l),l=void 0);let d=K.renderOpts.collectedTags;if(!q)return await (0,c.sendResponse)($,B,o,K.renderOpts.pendingWaitUntil),null;{let e=await o.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(o.headers);d&&(t[g.NEXT_CACHE_TAGS_HEADER]=d),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==K.renderOpts.collectedRevalidate&&!(K.renderOpts.collectedRevalidate>=g.INFINITE_CACHE)&&K.renderOpts.collectedRevalidate,a=void 0===K.renderOpts.collectedExpire||K.renderOpts.collectedExpire>=g.INFINITE_CACHE?void 0:K.renderOpts.collectedExpire;return{value:{kind:x.CachedRouteKind.APP_ROUTE,status:o.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:a}}}}catch(t){throw(null==r?void 0:r.isStale)&&await b.onRequestError(e,t,{routerKind:"App Router",routePath:m,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:j})},!1,k),t}},u=await b.handleResponse({req:e,nextConfig:E,cacheKey:I,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:T,isRoutePPREnabled:!1,isOnDemandRevalidate:j,revalidateOnlyGenerated:O,responseGenerator:d,waitUntil:a.waitUntil,isMinimalMode:s});if(!q)return null;if((null==u||null==(o=u.value)?void 0:o.kind)!==x.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==u||null==(l=u.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});s||t.setHeader("x-nextjs-cache",j?"REVALIDATED":u.isMiss?"MISS":u.isStale?"STALE":"HIT"),A&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let v=(0,h.fromNodeOutgoingHttpHeaders)(u.value.headers);return s&&q||v.delete(g.NEXT_CACHE_TAGS_HEADER),!u.cacheControl||t.getHeader("Cache-Control")||v.get("Cache-Control")||v.set("Cache-Control",(0,f.getCacheControlHeader)(u.cacheControl)),await (0,c.sendResponse)($,B,new Response(u.value.body,{headers:v,status:u.value.status||200})),null};G?await l(G):await F.withPropagatedContext(e.headers,()=>F.trace(u.BaseServerSpan.handleRequest,{spanName:`${D} ${m}`,kind:o.SpanKind.SERVER,attributes:{"http.method":D,"http.target":e.url}},l))}catch(t){if(t instanceof v.NoFallbackError||await b.onRequestError(e,t,{routerKind:"App Router",routePath:_,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:j})},!1,k),q)throw t;return await (0,c.sendResponse)($,B,new Response(null,{status:500})),null}}e.s(["handler",()=>P,"patchFetch",()=>O,"routeModule",()=>b,"serverHooks",()=>j,"workAsyncStorage",()=>T,"workUnitAsyncStorage",()=>k],604575)}];
1
+ module.exports=[193695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},918622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},556704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},832319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},324725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},814747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},522734,(e,t,r)=>{t.exports=e.x("fs",()=>require("fs"))},604575,e=>{"use strict";var t=e.i(698490),r=e.i(618006),a=e.i(795912),n=e.i(772560),o=e.i(976852),i=e.i(738533),s=e.i(455822),l=e.i(754068),d=e.i(266843),u=e.i(699385),p=e.i(903050),c=e.i(475293),h=e.i(502144),f=e.i(833599),x=e.i(536497),g=e.i(193695);e.i(779178);var v=e.i(396717),R=e.i(23480),m=e.i(522734),w=e.i(814747);let C=[{id:"claude-opus-4-8",name:"Claude Opus 4.8",provider:"Anthropic"},{id:"gpt-5.5",name:"GPT-5.5",provider:"OpenAI"},{id:"claude-fable-5",name:"Claude Fable 5",provider:"Anthropic"}],E=[{id:"bash",name:"Bash",description:"Execute shell commands",dangerous:!0},{id:"write_file",name:"Write File",description:"Create or edit files",dangerous:!0},{id:"read_file",name:"Read File",description:"Read file contents",dangerous:!1},{id:"todo",name:"Todo",description:"Manage task lists",dangerous:!1},{id:"load_skill",name:"Load Skill",description:"Load skills into context",dangerous:!1}];async function y(){let e=function(){let e=process.cwd();for(let t of[w.join(e,"runtime-config.json"),w.join(e,"..","runtime-config.json"),w.join(e,"..","..","runtime-config.json"),w.join(e,"..","..","..","runtime-config.json")])try{if(m.existsSync(t)){let e=m.readFileSync(t,"utf-8"),r=JSON.parse(e);if(r.apiBaseUrl)return r.apiBaseUrl}}catch{}return"http://localhost:3141"}();try{let t=new AbortController,r=setTimeout(()=>t.abort(),3e3),a=await fetch(`${e}/health`,{cache:"no-store",signal:t.signal});clearTimeout(r);let n=await a.json();return R.NextResponse.json({availableModels:C,availableTools:E,defaultModel:n.config?.defaultModel||"gpt-5.5",defaultToolApprovals:n.config?.defaultToolApprovals||{},serverConnected:!0,apiKeyConfigured:n.apiKeyConfigured??!1,apiBaseUrl:e})}catch{return R.NextResponse.json({availableModels:C,availableTools:E,defaultModel:"gpt-5.5",defaultToolApprovals:{},serverConnected:!1,apiKeyConfigured:!1,apiBaseUrl:e})}}e.s(["GET",()=>y,"dynamic",0,"force-dynamic"],518232);var b=e.i(518232);let A=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/config/route",pathname:"/api/config",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/web/src/app/api/config/route.ts",nextConfigOutput:"standalone",userland:b}),{workAsyncStorage:T,workUnitAsyncStorage:j,serverHooks:N}=A;function k(){return(0,a.patchFetch)({workAsyncStorage:T,workUnitAsyncStorage:j})}async function O(e,t,a){A.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let R="/api/config/route";R=R.replace(/\/index$/,"")||"/";let m=await A.prepare(e,t,{srcPage:R,multiZoneDraftMode:!1});if(!m)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:w,params:C,nextConfig:E,parsedUrl:y,isDraftMode:b,prerenderManifest:T,routerServerContext:j,isOnDemandRevalidate:N,revalidateOnlyGenerated:k,resolvedPathname:O,clientReferenceManifest:P,serverActionsManifest:S}=m,_=(0,s.normalizeAppPath)(R),q=!!(T.dynamicRoutes[_]||T.routes[O]),M=async()=>((null==j?void 0:j.render404)?await j.render404(e,t,y,!1):t.end("This page could not be found"),null);if(q&&!b){let e=!!T.routes[O],t=T.dynamicRoutes[_];if(t&&!1===t.fallback&&!e){if(E.experimental.adapterPath)return await M();throw new g.NoFallbackError}}let U=null;!q||A.isDev||b||(U="/index"===(U=O)?"/":U);let H=!0===A.isDev||!q,I=q&&!H;S&&P&&(0,i.setManifestsSingleton)({page:R,clientReferenceManifest:P,serverActionsManifest:S});let D=e.method||"GET",F=(0,o.getTracer)(),K=F.getActiveScopeSpan(),$={params:C,prerenderManifest:T,renderOpts:{experimental:{authInterrupts:!!E.experimental.authInterrupts},cacheComponents:!!E.cacheComponents,supportsDynamicResponse:H,incrementalCache:(0,n.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:E.cacheLife,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,a,n)=>A.onRequestError(e,t,a,n,j)},sharedContext:{buildId:w}},B=new l.NodeNextRequest(e),L=new l.NodeNextResponse(t),G=d.NextRequestAdapter.fromNodeNextRequest(B,(0,d.signalFromNodeResponse)(t));try{let i=async e=>A.handle(G,$).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=F.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==u.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let a=r.get("next.route");if(a){let t=`${D} ${a}`;e.setAttributes({"next.route":a,"http.route":a,"next.span_name":t}),e.updateName(t)}else e.updateName(`${D} ${R}`)}),s=!!(0,n.getRequestMeta)(e,"minimalMode"),l=async n=>{var o,l;let d=async({previousCacheEntry:r})=>{try{if(!s&&N&&k&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let o=await i(n);e.fetchMetrics=$.renderOpts.fetchMetrics;let l=$.renderOpts.pendingWaitUntil;l&&a.waitUntil&&(a.waitUntil(l),l=void 0);let d=$.renderOpts.collectedTags;if(!q)return await (0,c.sendResponse)(B,L,o,$.renderOpts.pendingWaitUntil),null;{let e=await o.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(o.headers);d&&(t[x.NEXT_CACHE_TAGS_HEADER]=d),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==$.renderOpts.collectedRevalidate&&!($.renderOpts.collectedRevalidate>=x.INFINITE_CACHE)&&$.renderOpts.collectedRevalidate,a=void 0===$.renderOpts.collectedExpire||$.renderOpts.collectedExpire>=x.INFINITE_CACHE?void 0:$.renderOpts.collectedExpire;return{value:{kind:v.CachedRouteKind.APP_ROUTE,status:o.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:a}}}}catch(t){throw(null==r?void 0:r.isStale)&&await A.onRequestError(e,t,{routerKind:"App Router",routePath:R,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:I,isOnDemandRevalidate:N})},!1,j),t}},u=await A.handleResponse({req:e,nextConfig:E,cacheKey:U,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:T,isRoutePPREnabled:!1,isOnDemandRevalidate:N,revalidateOnlyGenerated:k,responseGenerator:d,waitUntil:a.waitUntil,isMinimalMode:s});if(!q)return null;if((null==u||null==(o=u.value)?void 0:o.kind)!==v.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==u||null==(l=u.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});s||t.setHeader("x-nextjs-cache",N?"REVALIDATED":u.isMiss?"MISS":u.isStale?"STALE":"HIT"),b&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let g=(0,h.fromNodeOutgoingHttpHeaders)(u.value.headers);return s&&q||g.delete(x.NEXT_CACHE_TAGS_HEADER),!u.cacheControl||t.getHeader("Cache-Control")||g.get("Cache-Control")||g.set("Cache-Control",(0,f.getCacheControlHeader)(u.cacheControl)),await (0,c.sendResponse)(B,L,new Response(u.value.body,{headers:g,status:u.value.status||200})),null};K?await l(K):await F.withPropagatedContext(e.headers,()=>F.trace(u.BaseServerSpan.handleRequest,{spanName:`${D} ${R}`,kind:o.SpanKind.SERVER,attributes:{"http.method":D,"http.target":e.url}},l))}catch(t){if(t instanceof g.NoFallbackError||await A.onRequestError(e,t,{routerKind:"App Router",routePath:_,routeType:"route",revalidateReason:(0,p.getRevalidateReason)({isStaticGeneration:I,isOnDemandRevalidate:N})},!1,j),q)throw t;return await (0,c.sendResponse)(B,L,new Response(null,{status:500})),null}}e.s(["handler",()=>O,"patchFetch",()=>k,"routeModule",()=>A,"serverHooks",()=>N,"workAsyncStorage",()=>T,"workUnitAsyncStorage",()=>j],604575)}];
2
2
 
3
3
  //# sourceMappingURL=%5Broot-of-the-server%5D__36edac7c._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[193695,(a,b,c)=>{b.exports=a.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},353587,a=>{a.n(a.i(540183))},493510,a=>{a.n(a.i(47576))},616077,a=>{a.n(a.i(756733))},382884,a=>{a.n(a.i(654333))},375868,a=>{a.n(a.i(937271))},221752,a=>{a.n(a.i(412632))},624128,a=>{a.n(a.i(289664))},708532,a=>{a.n(a.i(262647))},350918,a=>{a.n(a.i(958781))},814874,a=>{a.n(a.i(971850))},805981,a=>{"use strict";var b=a.i(280516),c=a.i(803184);let d={h1:({children:a})=>(0,b.jsx)("h1",{className:"text-4xl font-bold mt-8 mb-4 text-foreground",children:a}),h2:({children:a})=>(0,b.jsx)("h2",{className:"text-3xl font-semibold mt-8 mb-3 text-foreground border-b border-border pb-2",children:a}),h3:({children:a})=>(0,b.jsx)("h3",{className:"text-2xl font-semibold mt-6 mb-2 text-foreground",children:a}),h4:({children:a})=>(0,b.jsx)("h4",{className:"text-xl font-medium mt-4 mb-2 text-foreground",children:a}),p:({children:a})=>(0,b.jsx)("p",{className:"my-4 text-muted-foreground leading-7",children:a}),a:({href:a,children:d})=>a?.startsWith("http")?(0,b.jsx)("a",{href:a,target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:d}):(0,b.jsx)(c.default,{href:a||"#",className:"text-primary hover:underline",children:d}),pre:({children:a})=>(0,b.jsx)("pre",{className:"bg-muted rounded-lg p-4 overflow-x-auto my-4 text-sm",children:a}),code:({children:a,className:c})=>c?.includes("language-")?(0,b.jsx)("code",{className:c,children:a}):(0,b.jsx)("code",{className:"bg-muted px-1.5 py-0.5 rounded text-sm font-mono",children:a}),ul:({children:a})=>(0,b.jsx)("ul",{className:"list-disc list-inside my-4 space-y-2 text-muted-foreground",children:a}),ol:({children:a})=>(0,b.jsx)("ol",{className:"list-decimal list-inside my-4 space-y-2 text-muted-foreground",children:a}),li:({children:a})=>(0,b.jsx)("li",{className:"leading-7",children:a}),blockquote:({children:a})=>(0,b.jsx)("blockquote",{className:"border-l-4 border-primary pl-4 my-4 italic text-muted-foreground",children:a}),table:({children:a})=>(0,b.jsx)("div",{className:"overflow-x-auto my-4",children:(0,b.jsx)("table",{className:"min-w-full border-collapse border border-border",children:a})}),th:({children:a})=>(0,b.jsx)("th",{className:"border border-border bg-muted px-4 py-2 text-left font-semibold",children:a}),td:({children:a})=>(0,b.jsx)("td",{className:"border border-border px-4 py-2",children:a}),hr:()=>(0,b.jsx)("hr",{className:"my-8 border-border"}),strong:({children:a})=>(0,b.jsx)("strong",{className:"font-semibold text-foreground",children:a}),em:({children:a})=>(0,b.jsx)("em",{className:"italic",children:a})};function e(){return d}a.s(["useMDXComponents",()=>e])},664793,a=>{"use strict";var b=a.i(280516),c=a.i(805981);function d(a){let d={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,c.useMDXComponents)(),...a.components};return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(d.h1,{children:"SparkECoder Documentation"}),"\n",(0,b.jsx)(d.p,{children:"SparkECoder is a powerful AI coding agent that helps developers write, debug, and improve code. It runs locally and provides an intelligent assistant for your development workflow."}),"\n",(0,b.jsx)(d.h2,{children:"Features"}),"\n",(0,b.jsxs)(d.ul,{children:["\n",(0,b.jsxs)(d.li,{children:[(0,b.jsx)(d.strong,{children:"Interactive Chat Interface"})," - Converse naturally with the AI to get coding help"]}),"\n",(0,b.jsxs)(d.li,{children:[(0,b.jsx)(d.strong,{children:"Tool Integration"})," - Read files, write code, run terminal commands, and more"]}),"\n",(0,b.jsxs)(d.li,{children:[(0,b.jsx)(d.strong,{children:"Agent Skills"})," - Extend capabilities with custom skills and rules"]}),"\n",(0,b.jsxs)(d.li,{children:[(0,b.jsx)(d.strong,{children:"Session Management"})," - Resume conversations and track progress across sessions"]}),"\n",(0,b.jsxs)(d.li,{children:[(0,b.jsx)(d.strong,{children:"Checkpoints"})," - Save and restore file states during development"]}),"\n"]}),"\n",(0,b.jsx)(d.h2,{children:"Getting Started"}),"\n",(0,b.jsx)(d.h3,{children:"Installation"}),"\n",(0,b.jsx)(d.pre,{children:(0,b.jsx)(d.code,{className:"language-bash",children:"npm install -g sparkecoder\n"})}),"\n",(0,b.jsx)(d.h3,{children:"Quick Start"}),"\n",(0,b.jsxs)(d.ol,{children:["\n",(0,b.jsxs)(d.li,{children:["\n",(0,b.jsx)(d.p,{children:(0,b.jsx)(d.strong,{children:"Set up your API key:"})}),"\n",(0,b.jsx)(d.pre,{children:(0,b.jsx)(d.code,{className:"language-bash",children:"export AI_GATEWAY_API_KEY=your_api_key\n"})}),"\n"]}),"\n",(0,b.jsxs)(d.li,{children:["\n",(0,b.jsx)(d.p,{children:(0,b.jsx)(d.strong,{children:"Start the agent:"})}),"\n",(0,b.jsx)(d.pre,{children:(0,b.jsx)(d.code,{className:"language-bash",children:"sparkecoder\n"})}),"\n"]}),"\n",(0,b.jsxs)(d.li,{children:["\n",(0,b.jsxs)(d.p,{children:[(0,b.jsx)(d.strong,{children:"Start chatting!"})," Ask the agent to help with code, explain concepts, or perform tasks."]}),"\n"]}),"\n"]}),"\n",(0,b.jsx)(d.h2,{children:"Core Concepts"}),"\n",(0,b.jsx)(d.h3,{children:"Sessions"}),"\n",(0,b.jsx)(d.p,{children:"Each conversation is a session. Sessions persist your chat history, tool executions, and context. You can resume sessions later:"}),"\n",(0,b.jsx)(d.pre,{children:(0,b.jsx)(d.code,{className:"language-bash",children:"sparkecoder --session <session-id>\n"})}),"\n",(0,b.jsx)(d.h3,{children:"Tools"}),"\n",(0,b.jsx)(d.p,{children:"The agent has access to several built-in tools:"}),"\n",(0,b.jsxs)(d.p,{children:["| Tool | Description |\n|------|-------------|\n| ",(0,b.jsx)(d.code,{children:"bash"})," | Execute terminal commands |\n| ",(0,b.jsx)(d.code,{children:"read_file"})," | Read file contents |\n| ",(0,b.jsx)(d.code,{children:"write_file"})," | Create or modify files |\n| ",(0,b.jsx)(d.code,{children:"linter"})," | Check for type errors and lint issues |\n| ",(0,b.jsx)(d.code,{children:"todo"})," | Track tasks and progress |\n| ",(0,b.jsx)(d.code,{children:"load_skill"})," | Load specialized knowledge |\n| ",(0,b.jsx)(d.code,{children:"explore_agent"})," | Explore agent for semantic discovery across codebase |"]}),"\n",(0,b.jsx)(d.h3,{children:"Skills"}),"\n",(0,b.jsx)(d.p,{children:"Skills are reusable instructions that extend the agent's capabilities. They can be:"}),"\n",(0,b.jsxs)(d.ul,{children:["\n",(0,b.jsxs)(d.li,{children:[(0,b.jsx)(d.strong,{children:"Always loaded"})," - Injected into every conversation"]}),"\n",(0,b.jsxs)(d.li,{children:[(0,b.jsx)(d.strong,{children:"On-demand"})," - Loaded when needed via the ",(0,b.jsx)(d.code,{children:"load_skill"})," tool"]}),"\n",(0,b.jsxs)(d.li,{children:[(0,b.jsx)(d.strong,{children:"Glob-matched"})," - Auto-loaded when working with specific file types"]}),"\n"]}),"\n",(0,b.jsx)(d.p,{children:(0,b.jsx)(d.a,{href:"/docs/skills",children:"Learn more about skills →"})}),"\n",(0,b.jsx)(d.h2,{children:"Configuration"}),"\n",(0,b.jsxs)(d.p,{children:["Create a ",(0,b.jsx)(d.code,{children:"sparkecoder.config.json"})," in your project:"]}),"\n",(0,b.jsx)(d.pre,{children:(0,b.jsx)(d.code,{className:"language-json",children:'{\n "defaultModel": "anthropic/claude-opus-4-5",\n "workingDirectory": ".",\n "toolApprovals": {\n "bash": true,\n "write_file": false\n },\n "skills": {\n "directory": "./skills"\n }\n}\n'})}),"\n",(0,b.jsx)(d.h2,{children:"Next Steps"}),"\n",(0,b.jsxs)(d.ul,{children:["\n",(0,b.jsxs)(d.li,{children:[(0,b.jsx)(d.a,{href:"/docs/skills",children:"Configure Agent Skills"})," - Create custom skills for your workflow"]}),"\n",(0,b.jsxs)(d.li,{children:[(0,b.jsx)(d.a,{href:"/docs/tools",children:"Explore Tools"})," - Learn about available tools"]}),"\n",(0,b.jsxs)(d.li,{children:[(0,b.jsx)(d.a,{href:"/docs/api",children:"API Reference"})," - Integrate SparkECoder programmatically"]}),"\n"]})]})}function e(a={}){let{wrapper:f}={...(0,c.useMDXComponents)(),...a.components};return f?(0,b.jsx)(f,{...a,children:(0,b.jsx)(d,{...a})}):d(a)}a.s(["default",()=>e])}];
1
+ module.exports=[193695,(a,b,c)=>{b.exports=a.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},353587,a=>{a.n(a.i(540183))},493510,a=>{a.n(a.i(47576))},616077,a=>{a.n(a.i(756733))},382884,a=>{a.n(a.i(654333))},375868,a=>{a.n(a.i(937271))},221752,a=>{a.n(a.i(412632))},624128,a=>{a.n(a.i(289664))},708532,a=>{a.n(a.i(262647))},350918,a=>{a.n(a.i(958781))},814874,a=>{a.n(a.i(971850))},805981,a=>{"use strict";var b=a.i(280516),c=a.i(803184);let d={h1:({children:a})=>(0,b.jsx)("h1",{className:"text-4xl font-bold mt-8 mb-4 text-foreground",children:a}),h2:({children:a})=>(0,b.jsx)("h2",{className:"text-3xl font-semibold mt-8 mb-3 text-foreground border-b border-border pb-2",children:a}),h3:({children:a})=>(0,b.jsx)("h3",{className:"text-2xl font-semibold mt-6 mb-2 text-foreground",children:a}),h4:({children:a})=>(0,b.jsx)("h4",{className:"text-xl font-medium mt-4 mb-2 text-foreground",children:a}),p:({children:a})=>(0,b.jsx)("p",{className:"my-4 text-muted-foreground leading-7",children:a}),a:({href:a,children:d})=>a?.startsWith("http")?(0,b.jsx)("a",{href:a,target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:d}):(0,b.jsx)(c.default,{href:a||"#",className:"text-primary hover:underline",children:d}),pre:({children:a})=>(0,b.jsx)("pre",{className:"bg-muted rounded-lg p-4 overflow-x-auto my-4 text-sm",children:a}),code:({children:a,className:c})=>c?.includes("language-")?(0,b.jsx)("code",{className:c,children:a}):(0,b.jsx)("code",{className:"bg-muted px-1.5 py-0.5 rounded text-sm font-mono",children:a}),ul:({children:a})=>(0,b.jsx)("ul",{className:"list-disc list-inside my-4 space-y-2 text-muted-foreground",children:a}),ol:({children:a})=>(0,b.jsx)("ol",{className:"list-decimal list-inside my-4 space-y-2 text-muted-foreground",children:a}),li:({children:a})=>(0,b.jsx)("li",{className:"leading-7",children:a}),blockquote:({children:a})=>(0,b.jsx)("blockquote",{className:"border-l-4 border-primary pl-4 my-4 italic text-muted-foreground",children:a}),table:({children:a})=>(0,b.jsx)("div",{className:"overflow-x-auto my-4",children:(0,b.jsx)("table",{className:"min-w-full border-collapse border border-border",children:a})}),th:({children:a})=>(0,b.jsx)("th",{className:"border border-border bg-muted px-4 py-2 text-left font-semibold",children:a}),td:({children:a})=>(0,b.jsx)("td",{className:"border border-border px-4 py-2",children:a}),hr:()=>(0,b.jsx)("hr",{className:"my-8 border-border"}),strong:({children:a})=>(0,b.jsx)("strong",{className:"font-semibold text-foreground",children:a}),em:({children:a})=>(0,b.jsx)("em",{className:"italic",children:a})};function e(){return d}a.s(["useMDXComponents",()=>e])},664793,a=>{"use strict";var b=a.i(280516),c=a.i(805981);function d(a){let d={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,c.useMDXComponents)(),...a.components};return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(d.h1,{children:"SparkECoder Documentation"}),"\n",(0,b.jsx)(d.p,{children:"SparkECoder is a powerful AI coding agent that helps developers write, debug, and improve code. It runs locally and provides an intelligent assistant for your development workflow."}),"\n",(0,b.jsx)(d.h2,{children:"Features"}),"\n",(0,b.jsxs)(d.ul,{children:["\n",(0,b.jsxs)(d.li,{children:[(0,b.jsx)(d.strong,{children:"Interactive Chat Interface"})," - Converse naturally with the AI to get coding help"]}),"\n",(0,b.jsxs)(d.li,{children:[(0,b.jsx)(d.strong,{children:"Tool Integration"})," - Read files, write code, run terminal commands, and more"]}),"\n",(0,b.jsxs)(d.li,{children:[(0,b.jsx)(d.strong,{children:"Agent Skills"})," - Extend capabilities with custom skills and rules"]}),"\n",(0,b.jsxs)(d.li,{children:[(0,b.jsx)(d.strong,{children:"Session Management"})," - Resume conversations and track progress across sessions"]}),"\n",(0,b.jsxs)(d.li,{children:[(0,b.jsx)(d.strong,{children:"Checkpoints"})," - Save and restore file states during development"]}),"\n"]}),"\n",(0,b.jsx)(d.h2,{children:"Getting Started"}),"\n",(0,b.jsx)(d.h3,{children:"Installation"}),"\n",(0,b.jsx)(d.pre,{children:(0,b.jsx)(d.code,{className:"language-bash",children:"npm install -g sparkecoder\n"})}),"\n",(0,b.jsx)(d.h3,{children:"Quick Start"}),"\n",(0,b.jsxs)(d.ol,{children:["\n",(0,b.jsxs)(d.li,{children:["\n",(0,b.jsx)(d.p,{children:(0,b.jsx)(d.strong,{children:"Set up your API key:"})}),"\n",(0,b.jsx)(d.pre,{children:(0,b.jsx)(d.code,{className:"language-bash",children:"export AI_GATEWAY_API_KEY=your_api_key\n"})}),"\n"]}),"\n",(0,b.jsxs)(d.li,{children:["\n",(0,b.jsx)(d.p,{children:(0,b.jsx)(d.strong,{children:"Start the agent:"})}),"\n",(0,b.jsx)(d.pre,{children:(0,b.jsx)(d.code,{className:"language-bash",children:"sparkecoder\n"})}),"\n"]}),"\n",(0,b.jsxs)(d.li,{children:["\n",(0,b.jsxs)(d.p,{children:[(0,b.jsx)(d.strong,{children:"Start chatting!"})," Ask the agent to help with code, explain concepts, or perform tasks."]}),"\n"]}),"\n"]}),"\n",(0,b.jsx)(d.h2,{children:"Core Concepts"}),"\n",(0,b.jsx)(d.h3,{children:"Sessions"}),"\n",(0,b.jsx)(d.p,{children:"Each conversation is a session. Sessions persist your chat history, tool executions, and context. You can resume sessions later:"}),"\n",(0,b.jsx)(d.pre,{children:(0,b.jsx)(d.code,{className:"language-bash",children:"sparkecoder --session <session-id>\n"})}),"\n",(0,b.jsx)(d.h3,{children:"Tools"}),"\n",(0,b.jsx)(d.p,{children:"The agent has access to several built-in tools:"}),"\n",(0,b.jsxs)(d.p,{children:["| Tool | Description |\n|------|-------------|\n| ",(0,b.jsx)(d.code,{children:"bash"})," | Execute terminal commands |\n| ",(0,b.jsx)(d.code,{children:"read_file"})," | Read file contents |\n| ",(0,b.jsx)(d.code,{children:"write_file"})," | Create or modify files |\n| ",(0,b.jsx)(d.code,{children:"linter"})," | Check for type errors and lint issues |\n| ",(0,b.jsx)(d.code,{children:"todo"})," | Track tasks and progress |\n| ",(0,b.jsx)(d.code,{children:"load_skill"})," | Load specialized knowledge |\n| ",(0,b.jsx)(d.code,{children:"explore_agent"})," | Explore agent for semantic discovery across codebase |"]}),"\n",(0,b.jsx)(d.h3,{children:"Skills"}),"\n",(0,b.jsx)(d.p,{children:"Skills are reusable instructions that extend the agent's capabilities. They can be:"}),"\n",(0,b.jsxs)(d.ul,{children:["\n",(0,b.jsxs)(d.li,{children:[(0,b.jsx)(d.strong,{children:"Always loaded"})," - Injected into every conversation"]}),"\n",(0,b.jsxs)(d.li,{children:[(0,b.jsx)(d.strong,{children:"On-demand"})," - Loaded when needed via the ",(0,b.jsx)(d.code,{children:"load_skill"})," tool"]}),"\n",(0,b.jsxs)(d.li,{children:[(0,b.jsx)(d.strong,{children:"Glob-matched"})," - Auto-loaded when working with specific file types"]}),"\n"]}),"\n",(0,b.jsx)(d.p,{children:(0,b.jsx)(d.a,{href:"/docs/skills",children:"Learn more about skills →"})}),"\n",(0,b.jsx)(d.h2,{children:"Configuration"}),"\n",(0,b.jsxs)(d.p,{children:["Create a ",(0,b.jsx)(d.code,{children:"sparkecoder.config.json"})," in your project:"]}),"\n",(0,b.jsx)(d.pre,{children:(0,b.jsx)(d.code,{className:"language-json",children:'{\n "defaultModel": "gpt-5.5",\n "workingDirectory": ".",\n "toolApprovals": {\n "bash": true,\n "write_file": false\n },\n "skills": {\n "directory": "./skills"\n }\n}\n'})}),"\n",(0,b.jsx)(d.h2,{children:"Next Steps"}),"\n",(0,b.jsxs)(d.ul,{children:["\n",(0,b.jsxs)(d.li,{children:[(0,b.jsx)(d.a,{href:"/docs/skills",children:"Configure Agent Skills"})," - Create custom skills for your workflow"]}),"\n",(0,b.jsxs)(d.li,{children:[(0,b.jsx)(d.a,{href:"/docs/tools",children:"Explore Tools"})," - Learn about available tools"]}),"\n",(0,b.jsxs)(d.li,{children:[(0,b.jsx)(d.a,{href:"/docs/api",children:"API Reference"})," - Integrate SparkECoder programmatically"]}),"\n"]})]})}function e(a={}){let{wrapper:f}={...(0,c.useMDXComponents)(),...a.components};return f?(0,b.jsx)(f,{...a,children:(0,b.jsx)(d,{...a})}):d(a)}a.s(["default",()=>e])}];
2
2
 
3
3
  //# sourceMappingURL=%5Broot-of-the-server%5D__397fadd4._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[193695,(a,b,c)=>{b.exports=a.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},353587,a=>{a.n(a.i(540183))},493510,a=>{a.n(a.i(47576))},616077,a=>{a.n(a.i(756733))},382884,a=>{a.n(a.i(654333))},375868,a=>{a.n(a.i(937271))},221752,a=>{a.n(a.i(412632))},624128,a=>{a.n(a.i(289664))},708532,a=>{a.n(a.i(262647))},350918,a=>{a.n(a.i(958781))},814874,a=>{a.n(a.i(971850))},805981,a=>{"use strict";var b=a.i(280516),c=a.i(803184);let d={h1:({children:a})=>(0,b.jsx)("h1",{className:"text-4xl font-bold mt-8 mb-4 text-foreground",children:a}),h2:({children:a})=>(0,b.jsx)("h2",{className:"text-3xl font-semibold mt-8 mb-3 text-foreground border-b border-border pb-2",children:a}),h3:({children:a})=>(0,b.jsx)("h3",{className:"text-2xl font-semibold mt-6 mb-2 text-foreground",children:a}),h4:({children:a})=>(0,b.jsx)("h4",{className:"text-xl font-medium mt-4 mb-2 text-foreground",children:a}),p:({children:a})=>(0,b.jsx)("p",{className:"my-4 text-muted-foreground leading-7",children:a}),a:({href:a,children:d})=>a?.startsWith("http")?(0,b.jsx)("a",{href:a,target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:d}):(0,b.jsx)(c.default,{href:a||"#",className:"text-primary hover:underline",children:d}),pre:({children:a})=>(0,b.jsx)("pre",{className:"bg-muted rounded-lg p-4 overflow-x-auto my-4 text-sm",children:a}),code:({children:a,className:c})=>c?.includes("language-")?(0,b.jsx)("code",{className:c,children:a}):(0,b.jsx)("code",{className:"bg-muted px-1.5 py-0.5 rounded text-sm font-mono",children:a}),ul:({children:a})=>(0,b.jsx)("ul",{className:"list-disc list-inside my-4 space-y-2 text-muted-foreground",children:a}),ol:({children:a})=>(0,b.jsx)("ol",{className:"list-decimal list-inside my-4 space-y-2 text-muted-foreground",children:a}),li:({children:a})=>(0,b.jsx)("li",{className:"leading-7",children:a}),blockquote:({children:a})=>(0,b.jsx)("blockquote",{className:"border-l-4 border-primary pl-4 my-4 italic text-muted-foreground",children:a}),table:({children:a})=>(0,b.jsx)("div",{className:"overflow-x-auto my-4",children:(0,b.jsx)("table",{className:"min-w-full border-collapse border border-border",children:a})}),th:({children:a})=>(0,b.jsx)("th",{className:"border border-border bg-muted px-4 py-2 text-left font-semibold",children:a}),td:({children:a})=>(0,b.jsx)("td",{className:"border border-border px-4 py-2",children:a}),hr:()=>(0,b.jsx)("hr",{className:"my-8 border-border"}),strong:({children:a})=>(0,b.jsx)("strong",{className:"font-semibold text-foreground",children:a}),em:({children:a})=>(0,b.jsx)("em",{className:"italic",children:a})};function e(){return d}a.s(["useMDXComponents",()=>e])},34624,a=>{"use strict";var b=a.i(280516),c=a.i(805981);function d(a){let d={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,c.useMDXComponents)(),...a.components};return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(d.h1,{children:"Installation"}),"\n",(0,b.jsx)(d.p,{children:"Get SparkECoder up and running in minutes."}),"\n",(0,b.jsx)(d.h2,{children:"Requirements"}),"\n",(0,b.jsxs)(d.ul,{children:["\n",(0,b.jsxs)(d.li,{children:[(0,b.jsx)(d.strong,{children:"Node.js 18+"})," - Required runtime"]}),"\n",(0,b.jsxs)(d.li,{children:[(0,b.jsx)(d.strong,{children:"API Key"})," - From Anthropic, OpenAI, or AI Gateway"]}),"\n"]}),"\n",(0,b.jsx)(d.h2,{children:"Install via npm"}),"\n",(0,b.jsx)(d.pre,{children:(0,b.jsx)(d.code,{className:"language-bash",children:"npm install -g sparkecoder\n"})}),"\n",(0,b.jsx)(d.p,{children:"Or with pnpm:"}),"\n",(0,b.jsx)(d.pre,{children:(0,b.jsx)(d.code,{className:"language-bash",children:"pnpm add -g sparkecoder\n"})}),"\n",(0,b.jsx)(d.h2,{children:"Set Up API Key"}),"\n",(0,b.jsx)(d.p,{children:"SparkECoder needs an API key to communicate with AI models. Set one of the following environment variables:"}),"\n",(0,b.jsx)(d.pre,{children:(0,b.jsx)(d.code,{className:"language-bash",children:"# For AI Gateway (supports multiple providers) (recommended) (you can just set this)\nexport AI_GATEWAY_API_KEY=your_key\n\n# For Anthropic Claude models \nexport ANTHROPIC_API_KEY=your_key\n\n# For OpenAI models\nexport OPENAI_API_KEY=your_key\n\n"})}),"\n",(0,b.jsx)(d.h3,{children:"Persistent Configuration"}),"\n",(0,b.jsx)(d.p,{children:"To save your API key permanently, use the built-in config:"}),"\n",(0,b.jsx)(d.pre,{children:(0,b.jsx)(d.code,{className:"language-bash",children:"sparkecoder config set anthropic your_api_key\n"})}),"\n",(0,b.jsx)(d.p,{children:"This stores the key securely in your system's app data directory."}),"\n",(0,b.jsx)(d.h2,{children:"Initialize Project"}),"\n",(0,b.jsx)(d.p,{children:"Create a local configuration file:"}),"\n",(0,b.jsx)(d.pre,{children:(0,b.jsx)(d.code,{className:"language-bash",children:"sparkecoder init\n"})}),"\n",(0,b.jsxs)(d.p,{children:["This creates ",(0,b.jsx)(d.code,{children:"sparkecoder.config.json"})," with default settings:"]}),"\n",(0,b.jsx)(d.pre,{children:(0,b.jsx)(d.code,{className:"language-json",children:'{\n "defaultModel": "anthropic/claude-opus-4-5",\n "workingDirectory": ".",\n "toolApprovals": {\n "bash": true,\n "write_file": false\n },\n "skills": {\n "directory": "./skills"\n }\n}\n'})}),"\n",(0,b.jsx)(d.h2,{children:"Start Chatting"}),"\n",(0,b.jsx)(d.p,{children:"Simply run:"}),"\n",(0,b.jsx)(d.pre,{children:(0,b.jsx)(d.code,{className:"language-bash",children:"sparkecoder\n"})}),"\n",(0,b.jsx)(d.p,{children:"This starts the interactive chat interface. You can also:"}),"\n",(0,b.jsx)(d.pre,{children:(0,b.jsx)(d.code,{className:"language-bash",children:"# Start with a specific working directory\nsparkecoder -w /path/to/project\n\n# Use a specific model\nsparkecoder -m anthropic/claude-sonnet-4-20250514\n\n# Resume a previous session\nsparkecoder -s session_id\n"})}),"\n",(0,b.jsx)(d.h2,{children:"Web Interface"}),"\n",(0,b.jsx)(d.p,{children:"SparkECoder includes a web interface that starts automatically:"}),"\n",(0,b.jsx)(d.pre,{children:(0,b.jsx)(d.code,{className:"language-bash",children:"# The server starts on port 3141 by default\n# Open http://localhost:3141 in your browser\n"})}),"\n",(0,b.jsx)(d.p,{children:"Or start the server separately:"}),"\n",(0,b.jsx)(d.pre,{children:(0,b.jsx)(d.code,{className:"language-bash",children:"sparkecoder server\n"})}),"\n",(0,b.jsx)(d.h2,{children:"Verify Installation"}),"\n",(0,b.jsx)(d.p,{children:"Check that everything is working:"}),"\n",(0,b.jsx)(d.pre,{children:(0,b.jsx)(d.code,{className:"language-bash",children:"# Show version\nsparkecoder --version\n\n# Show configuration\nsparkecoder config\n\n# Check server status\nsparkecoder status\n"})}),"\n",(0,b.jsx)(d.h2,{children:"Next Steps"}),"\n",(0,b.jsxs)(d.ul,{children:["\n",(0,b.jsxs)(d.li,{children:[(0,b.jsx)(d.a,{href:"/docs/skills",children:"Configure Skills"})," - Set up custom skills for your workflow"]}),"\n",(0,b.jsxs)(d.li,{children:[(0,b.jsx)(d.a,{href:"/docs/tools",children:"Explore Tools"})," - Learn about available tools"]}),"\n",(0,b.jsxs)(d.li,{children:[(0,b.jsx)(d.a,{href:"/docs",children:"Read the Docs"})," - Full documentation"]}),"\n"]})]})}function e(a={}){let{wrapper:f}={...(0,c.useMDXComponents)(),...a.components};return f?(0,b.jsx)(f,{...a,children:(0,b.jsx)(d,{...a})}):d(a)}a.s(["default",()=>e])}];
1
+ module.exports=[193695,(a,b,c)=>{b.exports=a.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},353587,a=>{a.n(a.i(540183))},493510,a=>{a.n(a.i(47576))},616077,a=>{a.n(a.i(756733))},382884,a=>{a.n(a.i(654333))},375868,a=>{a.n(a.i(937271))},221752,a=>{a.n(a.i(412632))},624128,a=>{a.n(a.i(289664))},708532,a=>{a.n(a.i(262647))},350918,a=>{a.n(a.i(958781))},814874,a=>{a.n(a.i(971850))},805981,a=>{"use strict";var b=a.i(280516),c=a.i(803184);let d={h1:({children:a})=>(0,b.jsx)("h1",{className:"text-4xl font-bold mt-8 mb-4 text-foreground",children:a}),h2:({children:a})=>(0,b.jsx)("h2",{className:"text-3xl font-semibold mt-8 mb-3 text-foreground border-b border-border pb-2",children:a}),h3:({children:a})=>(0,b.jsx)("h3",{className:"text-2xl font-semibold mt-6 mb-2 text-foreground",children:a}),h4:({children:a})=>(0,b.jsx)("h4",{className:"text-xl font-medium mt-4 mb-2 text-foreground",children:a}),p:({children:a})=>(0,b.jsx)("p",{className:"my-4 text-muted-foreground leading-7",children:a}),a:({href:a,children:d})=>a?.startsWith("http")?(0,b.jsx)("a",{href:a,target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:d}):(0,b.jsx)(c.default,{href:a||"#",className:"text-primary hover:underline",children:d}),pre:({children:a})=>(0,b.jsx)("pre",{className:"bg-muted rounded-lg p-4 overflow-x-auto my-4 text-sm",children:a}),code:({children:a,className:c})=>c?.includes("language-")?(0,b.jsx)("code",{className:c,children:a}):(0,b.jsx)("code",{className:"bg-muted px-1.5 py-0.5 rounded text-sm font-mono",children:a}),ul:({children:a})=>(0,b.jsx)("ul",{className:"list-disc list-inside my-4 space-y-2 text-muted-foreground",children:a}),ol:({children:a})=>(0,b.jsx)("ol",{className:"list-decimal list-inside my-4 space-y-2 text-muted-foreground",children:a}),li:({children:a})=>(0,b.jsx)("li",{className:"leading-7",children:a}),blockquote:({children:a})=>(0,b.jsx)("blockquote",{className:"border-l-4 border-primary pl-4 my-4 italic text-muted-foreground",children:a}),table:({children:a})=>(0,b.jsx)("div",{className:"overflow-x-auto my-4",children:(0,b.jsx)("table",{className:"min-w-full border-collapse border border-border",children:a})}),th:({children:a})=>(0,b.jsx)("th",{className:"border border-border bg-muted px-4 py-2 text-left font-semibold",children:a}),td:({children:a})=>(0,b.jsx)("td",{className:"border border-border px-4 py-2",children:a}),hr:()=>(0,b.jsx)("hr",{className:"my-8 border-border"}),strong:({children:a})=>(0,b.jsx)("strong",{className:"font-semibold text-foreground",children:a}),em:({children:a})=>(0,b.jsx)("em",{className:"italic",children:a})};function e(){return d}a.s(["useMDXComponents",()=>e])},34624,a=>{"use strict";var b=a.i(280516),c=a.i(805981);function d(a){let d={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,c.useMDXComponents)(),...a.components};return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(d.h1,{children:"Installation"}),"\n",(0,b.jsx)(d.p,{children:"Get SparkECoder up and running in minutes."}),"\n",(0,b.jsx)(d.h2,{children:"Requirements"}),"\n",(0,b.jsxs)(d.ul,{children:["\n",(0,b.jsxs)(d.li,{children:[(0,b.jsx)(d.strong,{children:"Node.js 18+"})," - Required runtime"]}),"\n",(0,b.jsxs)(d.li,{children:[(0,b.jsx)(d.strong,{children:"API Key"})," - From Anthropic, OpenAI, or AI Gateway"]}),"\n"]}),"\n",(0,b.jsx)(d.h2,{children:"Install via npm"}),"\n",(0,b.jsx)(d.pre,{children:(0,b.jsx)(d.code,{className:"language-bash",children:"npm install -g sparkecoder\n"})}),"\n",(0,b.jsx)(d.p,{children:"Or with pnpm:"}),"\n",(0,b.jsx)(d.pre,{children:(0,b.jsx)(d.code,{className:"language-bash",children:"pnpm add -g sparkecoder\n"})}),"\n",(0,b.jsx)(d.h2,{children:"Set Up API Key"}),"\n",(0,b.jsx)(d.p,{children:"SparkECoder needs an API key to communicate with AI models. Set one of the following environment variables:"}),"\n",(0,b.jsx)(d.pre,{children:(0,b.jsx)(d.code,{className:"language-bash",children:"# For AI Gateway (supports multiple providers) (recommended) (you can just set this)\nexport AI_GATEWAY_API_KEY=your_key\n\n# For Anthropic Claude models \nexport ANTHROPIC_API_KEY=your_key\n\n# For OpenAI models\nexport OPENAI_API_KEY=your_key\n\n"})}),"\n",(0,b.jsx)(d.h3,{children:"Persistent Configuration"}),"\n",(0,b.jsx)(d.p,{children:"To save your API key permanently, use the built-in config:"}),"\n",(0,b.jsx)(d.pre,{children:(0,b.jsx)(d.code,{className:"language-bash",children:"sparkecoder config set anthropic your_api_key\n"})}),"\n",(0,b.jsx)(d.p,{children:"This stores the key securely in your system's app data directory."}),"\n",(0,b.jsx)(d.h2,{children:"Initialize Project"}),"\n",(0,b.jsx)(d.p,{children:"Create a local configuration file:"}),"\n",(0,b.jsx)(d.pre,{children:(0,b.jsx)(d.code,{className:"language-bash",children:"sparkecoder init\n"})}),"\n",(0,b.jsxs)(d.p,{children:["This creates ",(0,b.jsx)(d.code,{children:"sparkecoder.config.json"})," with default settings:"]}),"\n",(0,b.jsx)(d.pre,{children:(0,b.jsx)(d.code,{className:"language-json",children:'{\n "defaultModel": "gpt-5.5",\n "workingDirectory": ".",\n "toolApprovals": {\n "bash": true,\n "write_file": false\n },\n "skills": {\n "directory": "./skills"\n }\n}\n'})}),"\n",(0,b.jsx)(d.h2,{children:"Start Chatting"}),"\n",(0,b.jsx)(d.p,{children:"Simply run:"}),"\n",(0,b.jsx)(d.pre,{children:(0,b.jsx)(d.code,{className:"language-bash",children:"sparkecoder\n"})}),"\n",(0,b.jsx)(d.p,{children:"This starts the interactive chat interface. You can also:"}),"\n",(0,b.jsx)(d.pre,{children:(0,b.jsx)(d.code,{className:"language-bash",children:"# Start with a specific working directory\nsparkecoder -w /path/to/project\n\n# Use a specific model\nsparkecoder -m gpt-5.5\n\n# Resume a previous session\nsparkecoder -s session_id\n"})}),"\n",(0,b.jsx)(d.h2,{children:"Web Interface"}),"\n",(0,b.jsx)(d.p,{children:"SparkECoder includes a web interface that starts automatically:"}),"\n",(0,b.jsx)(d.pre,{children:(0,b.jsx)(d.code,{className:"language-bash",children:"# The server starts on port 3141 by default\n# Open http://localhost:3141 in your browser\n"})}),"\n",(0,b.jsx)(d.p,{children:"Or start the server separately:"}),"\n",(0,b.jsx)(d.pre,{children:(0,b.jsx)(d.code,{className:"language-bash",children:"sparkecoder server\n"})}),"\n",(0,b.jsx)(d.h2,{children:"Verify Installation"}),"\n",(0,b.jsx)(d.p,{children:"Check that everything is working:"}),"\n",(0,b.jsx)(d.pre,{children:(0,b.jsx)(d.code,{className:"language-bash",children:"# Show version\nsparkecoder --version\n\n# Show configuration\nsparkecoder config\n\n# Check server status\nsparkecoder status\n"})}),"\n",(0,b.jsx)(d.h2,{children:"Next Steps"}),"\n",(0,b.jsxs)(d.ul,{children:["\n",(0,b.jsxs)(d.li,{children:[(0,b.jsx)(d.a,{href:"/docs/skills",children:"Configure Skills"})," - Set up custom skills for your workflow"]}),"\n",(0,b.jsxs)(d.li,{children:[(0,b.jsx)(d.a,{href:"/docs/tools",children:"Explore Tools"})," - Learn about available tools"]}),"\n",(0,b.jsxs)(d.li,{children:[(0,b.jsx)(d.a,{href:"/docs",children:"Read the Docs"})," - Full documentation"]}),"\n"]})]})}function e(a={}){let{wrapper:f}={...(0,c.useMDXComponents)(),...a.components};return f?(0,b.jsx)(f,{...a,children:(0,b.jsx)(d,{...a})}):d(a)}a.s(["default",()=>e])}];
2
2
 
3
3
  //# sourceMappingURL=%5Broot-of-the-server%5D__70cecda8._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[918622,(a,b,c)=>{b.exports=a.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},640881,(a,b,c)=>{"use strict";b.exports=a.r(918622)},755132,(a,b,c)=>{"use strict";b.exports=a.r(640881).vendored["react-ssr"].React},555941,a=>{"use strict";let b="http://localhost:3141";function c(){}function d(){return b}function e(a){}function f(){}let g={availableModels:[{id:"anthropic/claude-opus-4.7",name:"Claude Opus 4.7",provider:"Anthropic"},{id:"anthropic/claude-opus-4-6",name:"Claude Opus 4.6",provider:"Anthropic"},{id:"anthropic/claude-opus-4-5",name:"Claude Opus 4.5",provider:"Anthropic"},{id:"anthropic/claude-sonnet-4",name:"Claude Sonnet 4",provider:"Anthropic"},{id:"anthropic/claude-haiku-4-5",name:"Claude Haiku 4.5",provider:"Anthropic"},{id:"openai/gpt-5-2-codex",name:"GPT-5.2 Codex",provider:"OpenAI"},{id:"google/gemini-3-flash",name:"Gemini 3 Flash",provider:"Google"},{id:"xai/grok-code-fast-1",name:"Grok Code Fast",provider:"xAI"}],availableTools:[{id:"bash",name:"Bash",description:"Execute shell commands",dangerous:!0},{id:"write_file",name:"Write File",description:"Create or edit files",dangerous:!0},{id:"read_file",name:"Read File",description:"Read file contents",dangerous:!1}],defaultModel:"anthropic/claude-opus-4.7",defaultToolApprovals:{},serverConnected:!1,apiKeyConfigured:!1,apiBaseUrl:b};async function h(){try{let a=new AbortController,c=setTimeout(()=>a.abort(),3e3),d=await fetch(`${b}/health`,{signal:a.signal});if(clearTimeout(c),!d.ok)return{...g,apiBaseUrl:b};let e=await d.json();return{...g,defaultModel:e.config?.defaultModel||g.defaultModel,defaultToolApprovals:e.config?.defaultToolApprovals||{},serverConnected:!0,apiKeyConfigured:e.apiKeyConfigured??!1,apiBaseUrl:b}}catch{return{...g,apiBaseUrl:b}}}async function i(){return b}function j(){}a.s(["clearApiUrl",()=>f,"getApiBaseUrl",()=>i,"getApiUrl",()=>d,"getConfig",()=>h,"initApiUrl",()=>c,"resetConfigCache",()=>j,"setApiUrl",()=>e])},956805,a=>{"use strict";var b=a.i(755132),c=a.i(555941);function d(){return(0,b.useEffect)(()=>{(0,c.initApiUrl)()},[]),null}a.s(["ApiInit",()=>d])}];
1
+ module.exports=[918622,(a,b,c)=>{b.exports=a.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},640881,(a,b,c)=>{"use strict";b.exports=a.r(918622)},755132,(a,b,c)=>{"use strict";b.exports=a.r(640881).vendored["react-ssr"].React},555941,a=>{"use strict";let b="http://localhost:3141";function c(){}function d(){return b}function e(a){}function f(){}let g={availableModels:[{id:"claude-opus-4-8",name:"Claude Opus 4.8",provider:"Anthropic"},{id:"gpt-5.5",name:"GPT-5.5",provider:"OpenAI"},{id:"claude-fable-5",name:"Claude Fable 5",provider:"Anthropic"}],availableTools:[{id:"bash",name:"Bash",description:"Execute shell commands",dangerous:!0},{id:"write_file",name:"Write File",description:"Create or edit files",dangerous:!0},{id:"read_file",name:"Read File",description:"Read file contents",dangerous:!1}],defaultModel:"gpt-5.5",defaultToolApprovals:{},serverConnected:!1,apiKeyConfigured:!1,apiBaseUrl:b};async function h(){try{let a=new AbortController,c=setTimeout(()=>a.abort(),3e3),d=await fetch(`${b}/health`,{signal:a.signal});if(clearTimeout(c),!d.ok)return{...g,apiBaseUrl:b};let e=await d.json();return{...g,defaultModel:e.config?.defaultModel||g.defaultModel,defaultToolApprovals:e.config?.defaultToolApprovals||{},serverConnected:!0,apiKeyConfigured:e.apiKeyConfigured??!1,apiBaseUrl:b}}catch{return{...g,apiBaseUrl:b}}}async function i(){return b}function j(){}a.s(["clearApiUrl",()=>f,"getApiBaseUrl",()=>i,"getApiUrl",()=>d,"getConfig",()=>h,"initApiUrl",()=>c,"resetConfigCache",()=>j,"setApiUrl",()=>e])},956805,a=>{"use strict";var b=a.i(755132),c=a.i(555941);function d(){return(0,b.useEffect)(()=>{(0,c.initApiUrl)()},[]),null}a.s(["ApiInit",()=>d])}];
2
2
 
3
3
  //# sourceMappingURL=%5Broot-of-the-server%5D__be5e2967._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[126823,a=>{"use strict";var b=a.i(256856),c=a.i(507031),d=a.i(755132),e=a.i(832315),f=a.i(546640),g=a.i(746881),h=a.i(916454),i=a.i(544244),j=a.i(762491),k=a.i(252831),l=a.i(179743),m=a.i(335520);let n=(0,m.default)("panel-left-close",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]]);var o=a.i(17655),p=a.i(221557),q=a.i(95041),r=a.i(300274),s=a.i(393700),t=a.i(190555);let u=(0,m.default)("volume-2",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]]);var v=a.i(952631),w=a.i(189854),x=a.i(870514);let y=(0,m.default)("layout-grid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]),z=(0,m.default)("sliders-vertical",[["path",{d:"M10 8h4",key:"1sr2af"}],["path",{d:"M12 21v-9",key:"17s77i"}],["path",{d:"M12 8V3",key:"13r4qs"}],["path",{d:"M17 16h4",key:"h1uq16"}],["path",{d:"M19 12V3",key:"o1uvq1"}],["path",{d:"M19 21v-5",key:"qua636"}],["path",{d:"M3 14h4",key:"bcjad9"}],["path",{d:"M5 10V3",key:"cb8scm"}],["path",{d:"M5 21v-7",key:"1w1uti"}]]);var A=a.i(958792),B=a.i(476031),C=a.i(806634),D=a.i(338706),E=a.i(878137),F=a.i(679609),G=a.i(946253),H=a.i(670923),I=a.i(979412),J=a.i(605571),K=a.i(642392),L=a.i(555941),M=a.i(156033),N=a.i(828278),O=a.i(7478);function P(){let a,m,P,Q,R,S=(0,e.useRouter)(),T=(0,e.usePathname)(),{state:U,toggleSidebar:V}=(0,c.useSidebar)(),{sessions:W,isLoading:X}=(0,N.useSessions)(),[Y,Z]=(0,d.useState)(!1),[$,_]=(0,d.useState)(!1),[aa,ab]=(0,d.useState)(!1),[ac,ad]=(0,d.useState)(null),[ae,af]=(0,d.useState)(null),ag=(0,d.useRef)(null),[ah,ai]=(0,d.useState)(""),[aj,ak]=(0,d.useState)(""),[al,am]=(0,d.useState)({}),[an,ao]=(0,d.useState)(!1),[ap,aq]=(0,d.useState)(""),ar={type:"object",properties:{},required:[]},[as,at]=(0,d.useState)(ar),[au,av]=(0,d.useState)(""),[aw,ax]=(0,d.useState)(""),[ay,az]=(0,d.useState)(""),[aA,aB]=(0,d.useState)(""),[aC,aD]=(0,d.useState)("50"),[aE,aF]=(0,d.useState)(!1),[aG,aH]=(0,d.useState)([]),[aI,aJ]=(0,d.useState)(null),[aK,aL]=(0,d.useState)(""),[aM,aN]=(0,d.useState)(!1),[aO,aP]=(0,d.useState)(!1),{enabled:aQ,setEnabled:aR}=(0,O.useNotificationSound)(),aS=T.startsWith("/session/")?T.split("/session/")[1]:null,aT="/session",aU=W.some(a=>a.isStreaming),aV=async()=>{let a=await (0,L.getConfig)();ad(a),ak(a.defaultModel),am(a.defaultToolApprovals)},aW=async()=>{try{let a=await (0,I.getApiKeys)();aH(a.providers)}catch(a){console.error("Failed to load API keys:",a)}};(0,d.useEffect)(()=>{aV(),aW()},[]),(0,d.useEffect)(()=>{aa&&aW()},[aa]);let aX=async a=>{if(aK.trim()){aP(!0);try{await (0,I.setApiKey)(a,aK),await aW(),aJ(null),aL(""),aN(!1)}catch(a){console.error("Failed to save API key:",a)}finally{aP(!1)}}},aY=()=>{aJ(null),aL(""),aN(!1)};(0,d.useEffect)(()=>{ag.current&&(aU?ag.current.play().catch(()=>{}):(ag.current.pause(),ag.current.currentTime=0))},[aU]);let aZ=async()=>{if(!Y){Z(!0);try{let a=await (0,I.createSession)({name:`Session ${W.length+1}`,model:ac?.defaultModel||"anthropic/claude-opus-4.7",toolApprovals:al});(0,N.mutateSessions)(),S.push(`${aT}/${a.id}`)}catch(a){console.error("Failed to create session:",a)}finally{Z(!1)}}},a$=async()=>{Z(!0);try{let a=await (0,I.createSession)({name:ah||`Session ${W.length+1}`,model:aj,toolApprovals:al});(0,N.mutateSessions)(),a_(),_(!1),S.push(`${aT}/${a.id}`)}catch(a){console.error("Failed to create session:",a)}finally{Z(!1)}},a_=()=>{ai(""),ac&&(ak(ac.defaultModel),am(ac.defaultToolApprovals))},a0=()=>{aq(""),at(ar),av(""),ax(""),az(""),aB(ac?.defaultModel||""),aD("50")},a1=async()=>{if(ap.trim()){if(av(""),!as||"object"!=typeof as)return void av("Schema must be a JSON object");aF(!0);try{let a=await (0,I.createTask)({prompt:ap,outputSchema:as,webhookUrl:aw||void 0,model:aA||ac?.defaultModel,name:ay||void 0,maxIterations:parseInt(aC)||50});(0,N.mutateSessions)(),ao(!1),a0(),S.push(`${aT}/${a.taskId}`)}catch(a){console.error("Failed to create task:",a)}finally{aF(!1)}}},a2=async(a,b)=>{a.preventDefault(),a.stopPropagation();try{await (0,I.deleteSession)(b),(0,N.mutateSessions)(),aS===b&&S.push("/")}catch(a){console.error("Failed to delete session:",a)}},a3=a=>{am(b=>({...b,[a]:!b[a]}))},a4="collapsed"===U;return(0,b.jsxs)(c.Sidebar,{collapsible:"icon",className:"border-r border-border/50",children:[(0,b.jsxs)(c.SidebarHeader,{className:(0,M.cn)(a4?"p-2 space-y-2":"p-3 space-y-3"),children:[!a4&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{className:"flex items-center gap-3",children:[(0,b.jsxs)("div",{className:"relative shrink-0 overflow-hidden rounded-xl size-10 shadow-md ring-1 ring-white/10",children:[(0,b.jsx)(g.default,{src:"/sparke-coder.png",alt:"Sparke",width:40,height:40,className:"absolute inset-0 size-full object-cover",priority:!0}),(0,b.jsx)("video",{ref:ag,src:"/sparkecode.mp4",muted:!0,loop:!0,playsInline:!0,className:(0,M.cn)("absolute inset-0 size-full object-cover transition-opacity duration-300",aU?"opacity-100":"opacity-0")})]}),(0,b.jsxs)("div",{className:"flex flex-1 items-center justify-between min-w-0",children:[(0,b.jsx)("h1",{className:"text-lg font-bold text-foreground",children:"SparkECoder"}),(0,b.jsx)(H.TooltipProvider,{children:(0,b.jsxs)(H.Tooltip,{children:[(0,b.jsx)(H.TooltipTrigger,{asChild:!0,children:(0,b.jsx)(B.Button,{size:"icon",variant:"ghost",className:"size-7 hover:bg-accent transition-colors",onClick:V,children:(0,b.jsx)(n,{className:"size-4"})})}),(0,b.jsxs)(H.TooltipContent,{side:"bottom",children:["Collapse ",(0,b.jsx)("kbd",{className:"ml-1 text-[10px] opacity-60",children:"⌘B"})]})]})})]})]}),(a=W.find(a=>"orchestrator"===a.role),P=(m=W.filter(a=>"worker"===a.role)).filter(a=>"needs_attention"===a.agentStatus).length,Q=m.filter(a=>"running"===a.agentStatus).length,(0,b.jsxs)("div",{className:"flex flex-col gap-1 w-full",children:[(0,b.jsxs)(f.default,{href:a?`/session/${a.id}`:"#",className:(0,M.cn)("flex items-center gap-2 px-2 py-1.5 rounded-md text-sm transition-colors",T.startsWith("/session/")&&a&&T.includes(a.id)?"bg-accent text-foreground":"hover:bg-accent/60 text-foreground/80"),children:[(0,b.jsx)(x.Bot,{className:"size-4 text-primary shrink-0"}),(0,b.jsx)("span",{className:"flex-1 truncate",children:"Orchestrator"}),a?.isStreaming&&(0,b.jsx)("span",{className:"size-1.5 rounded-full bg-emerald-500 animate-pulse"})]}),(0,b.jsxs)(f.default,{href:"/agents",className:(0,M.cn)("flex items-center gap-2 px-2 py-1.5 rounded-md text-sm transition-colors","/agents"===T?"bg-accent text-foreground":"hover:bg-accent/60 text-foreground/80"),children:[(0,b.jsx)(y,{className:"size-4 text-muted-foreground shrink-0"}),(0,b.jsx)("span",{className:"flex-1 truncate",children:"Agents"}),(0,b.jsx)("span",{className:"text-[10px] text-muted-foreground tabular-nums",children:m.length}),P>0&&(0,b.jsxs)("span",{className:"text-[10px] px-1 rounded bg-amber-500/20 text-amber-600 dark:text-amber-300 tabular-nums",children:[P,"!"]}),Q>0&&0===P&&(0,b.jsx)("span",{className:"size-1.5 rounded-full bg-emerald-500 animate-pulse"})]}),(0,b.jsxs)(f.default,{href:"/settings",className:(0,M.cn)("flex items-center gap-2 px-2 py-1.5 rounded-md text-sm transition-colors","/settings"===T?"bg-accent text-foreground":"hover:bg-accent/60 text-foreground/80"),children:[(0,b.jsx)(z,{className:"size-4 text-muted-foreground shrink-0"}),(0,b.jsx)("span",{className:"flex-1 truncate",children:"Settings"})]})]})),(0,b.jsxs)("div",{className:"flex gap-2 w-full",children:[(0,b.jsxs)(B.Button,{onClick:aZ,disabled:Y,className:"flex-1 justify-center gap-2 h-9",children:[Y?(0,b.jsx)(k.Loader2,{className:"size-4 animate-spin"}):(0,b.jsx)(h.Plus,{className:"size-4"}),"New Agent"]}),(0,b.jsx)(H.TooltipProvider,{children:(0,b.jsxs)(H.Tooltip,{children:[(0,b.jsx)(H.TooltipTrigger,{asChild:!0,children:(0,b.jsx)(B.Button,{variant:"outline",onClick:()=>{ac||aV(),ao(!0)},className:"h-9 px-2.5",children:(0,b.jsx)(v.ListChecks,{className:"size-4"})})}),(0,b.jsx)(H.TooltipContent,{side:"bottom",children:"New Task"})]})})]})]}),a4&&(0,b.jsxs)("div",{className:"flex flex-col items-center gap-2 w-full",children:[(0,b.jsx)(H.TooltipProvider,{children:(0,b.jsxs)(H.Tooltip,{children:[(0,b.jsx)(H.TooltipTrigger,{asChild:!0,children:(0,b.jsx)(B.Button,{size:"icon",variant:"ghost",onClick:V,className:"size-8 mx-auto",children:(0,b.jsx)(o.PanelLeft,{className:"size-4"})})}),(0,b.jsxs)(H.TooltipContent,{side:"right",children:["Expand ",(0,b.jsx)("kbd",{className:"ml-1 text-[10px] opacity-60",children:"⌘B"})]})]})}),(0,b.jsxs)("div",{className:"relative overflow-hidden rounded-xl size-8 shadow-md ring-1 ring-white/10 mx-auto",children:[(0,b.jsx)(g.default,{src:"/sparke-coder.png",alt:"SparkECoder",width:32,height:32,className:"absolute inset-0 size-full object-cover",priority:!0}),(0,b.jsx)("video",{ref:ag,src:"/sparkecode.mp4",muted:!0,loop:!0,playsInline:!0,className:(0,M.cn)("absolute inset-0 size-full object-cover transition-opacity duration-300",aU?"opacity-100":"opacity-0")})]}),(0,b.jsx)(H.TooltipProvider,{children:(0,b.jsxs)(H.Tooltip,{children:[(0,b.jsx)(H.TooltipTrigger,{asChild:!0,children:(0,b.jsx)(B.Button,{size:"icon",onClick:aZ,disabled:Y,className:"size-8 mx-auto",children:Y?(0,b.jsx)(k.Loader2,{className:"size-4 animate-spin"}):(0,b.jsx)(h.Plus,{className:"size-4"})})}),(0,b.jsx)(H.TooltipContent,{side:"right",children:"New Agent"})]})}),(R=W.find(a=>"orchestrator"===a.role),(0,b.jsx)(H.TooltipProvider,{children:(0,b.jsxs)(H.Tooltip,{children:[(0,b.jsx)(H.TooltipTrigger,{asChild:!0,children:(0,b.jsx)(f.default,{href:R?`/session/${R.id}`:"#",className:"size-8 mx-auto inline-flex items-center justify-center rounded-md hover:bg-accent",children:(0,b.jsx)(x.Bot,{className:"size-4 text-primary"})})}),(0,b.jsx)(H.TooltipContent,{side:"right",children:"Orchestrator"})]})})),(0,b.jsx)(H.TooltipProvider,{children:(0,b.jsxs)(H.Tooltip,{children:[(0,b.jsx)(H.TooltipTrigger,{asChild:!0,children:(0,b.jsx)(f.default,{href:"/agents",className:"size-8 mx-auto inline-flex items-center justify-center rounded-md hover:bg-accent",children:(0,b.jsx)(y,{className:"size-4"})})}),(0,b.jsx)(H.TooltipContent,{side:"right",children:"Agents board"})]})}),(0,b.jsx)(H.TooltipProvider,{children:(0,b.jsxs)(H.Tooltip,{children:[(0,b.jsx)(H.TooltipTrigger,{asChild:!0,children:(0,b.jsx)(f.default,{href:"/settings",className:"size-8 mx-auto inline-flex items-center justify-center rounded-md hover:bg-accent",children:(0,b.jsx)(z,{className:"size-4"})})}),(0,b.jsx)(H.TooltipContent,{side:"right",children:"Settings"})]})}),(0,b.jsx)(H.TooltipProvider,{children:(0,b.jsxs)(H.Tooltip,{children:[(0,b.jsx)(H.TooltipTrigger,{asChild:!0,children:(0,b.jsx)(B.Button,{size:"icon",variant:"outline",onClick:()=>{ac||aV(),ao(!0)},className:"size-8 mx-auto",children:(0,b.jsx)(v.ListChecks,{className:"size-4"})})}),(0,b.jsx)(H.TooltipContent,{side:"right",children:"New Task"})]})})]})]}),(0,b.jsx)(C.Dialog,{open:$,onOpenChange:a=>{_(a),a&&a_()},children:(0,b.jsxs)(C.DialogContent,{className:"sm:max-w-md",children:[(0,b.jsx)(C.DialogHeader,{children:(0,b.jsxs)(C.DialogTitle,{className:"flex items-center gap-2",children:[(0,b.jsx)("div",{className:"size-8 rounded-lg bg-primary flex items-center justify-center",children:(0,b.jsx)(l.Settings,{className:"size-4 text-primary-foreground"})}),"New Agent"]})}),(0,b.jsxs)("div",{className:"space-y-4 pt-2",children:[(0,b.jsxs)("div",{className:"space-y-1.5",children:[(0,b.jsx)(E.Label,{htmlFor:"name",className:"text-sm font-medium",children:"Session Name"}),(0,b.jsx)(D.Input,{id:"name",placeholder:"My Coding Project (optional)",value:ah,onChange:a=>ai(a.target.value),className:"transition-all focus:ring-2 focus:ring-primary/20"})]}),(0,b.jsxs)("div",{className:"space-y-1.5",children:[(0,b.jsx)(E.Label,{className:"text-sm font-medium",children:"Model"}),(0,b.jsxs)(G.Select,{value:aj,onValueChange:ak,children:[(0,b.jsx)(G.SelectTrigger,{className:"transition-all hover:border-primary/50",children:(0,b.jsx)(G.SelectValue,{placeholder:"Select a model"})}),(0,b.jsx)(G.SelectContent,{children:ac?.availableModels.map(a=>(0,b.jsx)(G.SelectItem,{value:a.id,children:(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("span",{children:a.name}),(0,b.jsx)("span",{className:"text-xs text-muted-foreground",children:a.provider})]})},a.id))})]})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(E.Label,{className:"flex items-center gap-2 text-sm font-medium",children:"Tool Approvals"}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground -mt-0.5",children:"Toggle on to require approval before tool executes"}),(0,b.jsx)("div",{className:"space-y-1 rounded-lg border p-2.5 bg-muted/30",children:ac?.availableTools.map(a=>(0,b.jsxs)("div",{className:"flex items-center justify-between py-1.5 hover:bg-muted/50 rounded px-2 -mx-1 transition-colors",children:[(0,b.jsxs)("div",{className:"space-y-0",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("span",{className:"text-sm font-medium",children:a.name}),a.dangerous&&(0,b.jsx)("span",{className:"text-[10px] bg-amber-500/20 text-amber-600 dark:text-amber-400 px-1.5 py-0.5 rounded font-medium",children:"risky"})]}),(0,b.jsx)("p",{className:"text-[11px] text-muted-foreground",children:a.description})]}),(0,b.jsx)(F.Switch,{checked:al[a.id]??!1,onCheckedChange:()=>a3(a.id)})]},a.id))})]}),(0,b.jsxs)(B.Button,{onClick:a$,disabled:Y,className:"w-full",children:[Y?(0,b.jsx)(k.Loader2,{className:"size-4 animate-spin mr-2"}):(0,b.jsx)(h.Plus,{className:"size-4 mr-2"}),"Create Session"]})]})]})}),(0,b.jsx)(C.Dialog,{open:an,onOpenChange:a=>{ao(a),a&&a0()},children:(0,b.jsxs)(C.DialogContent,{className:"sm:max-w-lg",children:[(0,b.jsx)(C.DialogHeader,{children:(0,b.jsxs)(C.DialogTitle,{className:"flex items-center gap-2",children:[(0,b.jsx)("div",{className:"size-8 rounded-lg bg-blue-600 flex items-center justify-center",children:(0,b.jsx)(v.ListChecks,{className:"size-4 text-white"})}),"New Task"]})}),(0,b.jsxs)("div",{className:"space-y-4 pt-2",children:[(0,b.jsxs)("div",{className:"space-y-1.5",children:[(0,b.jsx)(E.Label,{htmlFor:"task-prompt",className:"text-sm font-medium",children:"What should the agent do?"}),(0,b.jsx)(J.Textarea,{id:"task-prompt",placeholder:"e.g. Refactor the auth module to use JWT tokens...",value:ap,onChange:a=>aq(a.target.value),rows:3,autoFocus:!0})]}),(0,b.jsxs)("div",{className:"space-y-1.5",children:[(0,b.jsx)(E.Label,{className:"text-sm font-medium",children:"Expected output shape"}),(0,b.jsx)("p",{className:"text-[11px] text-muted-foreground -mt-0.5",children:"Define the JSON structure the agent must return"}),(0,b.jsx)("div",{className:(0,M.cn)("rounded-md border bg-muted/30 overflow-hidden transition-colors",au&&"border-red-500"),children:(0,b.jsx)(K.VisualJson,{value:as,onChange:a=>{at(a),av("")},children:(0,b.jsx)(K.TreeView,{className:"h-44 text-sm"})})}),au&&(0,b.jsx)("p",{className:"text-xs text-red-500 mt-1",children:au})]}),(0,b.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,b.jsxs)("div",{className:"space-y-1.5",children:[(0,b.jsx)(E.Label,{className:"text-xs text-muted-foreground",children:"Model"}),(0,b.jsxs)(G.Select,{value:aA,onValueChange:aB,children:[(0,b.jsx)(G.SelectTrigger,{className:"h-9",children:(0,b.jsx)(G.SelectValue,{placeholder:"Select a model"})}),(0,b.jsx)(G.SelectContent,{children:ac?.availableModels.map(a=>(0,b.jsx)(G.SelectItem,{value:a.id,children:(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("span",{children:a.name}),(0,b.jsx)("span",{className:"text-xs text-muted-foreground",children:a.provider})]})},a.id))})]})]}),(0,b.jsxs)("div",{className:"space-y-1.5",children:[(0,b.jsx)(E.Label,{htmlFor:"task-name",className:"text-xs text-muted-foreground",children:"Name"}),(0,b.jsx)(D.Input,{id:"task-name",placeholder:"Optional",value:ay,onChange:a=>az(a.target.value),className:"h-9"})]})]}),(0,b.jsxs)("details",{className:"group",children:[(0,b.jsxs)("summary",{className:"flex items-center gap-1.5 text-xs text-muted-foreground cursor-pointer select-none hover:text-foreground transition-colors",children:[(0,b.jsx)(w.ChevronDown,{className:"size-3 transition-transform group-open:rotate-180"}),"Advanced"]}),(0,b.jsxs)("div",{className:"grid grid-cols-2 gap-3 pt-3",children:[(0,b.jsxs)("div",{className:"space-y-1.5",children:[(0,b.jsx)(E.Label,{htmlFor:"task-webhook",className:"text-xs text-muted-foreground",children:"Webhook URL"}),(0,b.jsx)(D.Input,{id:"task-webhook",placeholder:"https://...",value:aw,onChange:a=>ax(a.target.value),className:"h-9"})]}),(0,b.jsxs)("div",{className:"space-y-1.5",children:[(0,b.jsx)(E.Label,{htmlFor:"task-iterations",className:"text-xs text-muted-foreground",children:"Max iterations"}),(0,b.jsx)(D.Input,{id:"task-iterations",type:"number",min:1,max:500,value:aC,onChange:a=>aD(a.target.value),className:"h-9"})]})]})]}),(0,b.jsx)(B.Button,{onClick:a1,disabled:aE||!ap.trim(),className:"w-full",children:aE?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(k.Loader2,{className:"size-4 animate-spin mr-2"}),"Creating..."]}):"Start Task"})]})]})}),(0,b.jsx)(c.SidebarContent,{className:"px-2",children:(0,b.jsx)(c.SidebarGroup,{className:"p-0",children:(0,b.jsx)(c.SidebarGroupContent,{children:(0,b.jsx)(c.SidebarMenu,{className:"gap-1",children:X?(0,b.jsx)("div",{className:"flex justify-center py-8",children:(0,b.jsx)(k.Loader2,{className:"size-5 animate-spin text-muted-foreground"})}):0===W.filter(a=>"orchestrator"!==a.role).length?!a4&&(0,b.jsxs)("div",{className:"text-center py-8 px-4",children:[(0,b.jsxs)("div",{className:"relative overflow-hidden rounded-xl size-12 mx-auto mb-3 shadow-md ring-1 ring-white/10",children:[(0,b.jsx)(g.default,{src:"/sparke-coder.png",alt:"SparkECoder",width:48,height:48,className:"absolute inset-0 size-full object-cover"}),aU&&(0,b.jsx)("video",{src:"/sparkecode.mp4",autoPlay:!0,muted:!0,loop:!0,playsInline:!0,className:"absolute inset-0 size-full object-cover"})]}),(0,b.jsx)("p",{className:"text-sm text-foreground",children:"No sessions yet"}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:"Click New Agent above"})]}):W.filter(a=>"orchestrator"!==a.role).map(a=>{let d,e,g,h,k=a.id===aS,l=ae===a.id,m=!0===a.isStreaming,n=!a4&&(l||k);return(0,b.jsx)(c.SidebarMenuItem,{onMouseEnter:()=>af(a.id),onMouseLeave:()=>af(null),children:a4?(0,b.jsx)(H.TooltipProvider,{children:(0,b.jsxs)(H.Tooltip,{children:[(0,b.jsx)(H.TooltipTrigger,{asChild:!0,children:(0,b.jsx)(f.default,{href:`${aT}/${a.id}`,className:(0,M.cn)("flex items-center justify-center size-8 rounded-lg transition-colors mx-auto",k?"bg-accent":"hover:bg-accent/60",m&&!k&&"bg-emerald-500/10"),children:m?(0,b.jsx)("span",{className:"size-2 rounded-full bg-emerald-500 animate-pulse"}):(0,b.jsx)(i.MessageSquare,{className:(0,M.cn)("size-4",k?"text-primary":"text-muted-foreground")})})}),(0,b.jsxs)(H.TooltipContent,{side:"right",children:[a.name||"Untitled",m&&" (Running)"]})]})}):(0,b.jsx)(c.SidebarMenuButton,{asChild:!0,isActive:k,className:(0,M.cn)("h-9 transition-all duration-150","hover:bg-accent/60",k&&"bg-accent",m&&!k&&"bg-emerald-500/5"),children:(0,b.jsxs)(f.default,{href:`${aT}/${a.id}`,className:"flex items-center gap-2.5 px-2",children:[m?(0,b.jsx)("span",{className:"size-2 rounded-full bg-emerald-500 animate-pulse shrink-0"}):(0,b.jsx)(i.MessageSquare,{className:(0,M.cn)("size-4 shrink-0",k?"text-primary":"text-muted-foreground")}),(0,b.jsx)("span",{className:(0,M.cn)("truncate flex-1 text-sm",m&&"text-emerald-600 dark:text-emerald-400"),children:a.name||"Untitled"}),a.config?.task?.enabled&&(0,b.jsxs)(A.Badge,{variant:"outline",className:(0,M.cn)("shrink-0 text-[10px] px-1.5 py-0 h-4 font-medium gap-1","completed"===a.config.task.status&&"border-emerald-500/30 bg-emerald-500/10 text-emerald-600 dark:text-emerald-400","failed"===a.config.task.status&&"border-red-500/30 bg-red-500/10 text-red-600 dark:text-red-400","running"===a.config.task.status&&"border-blue-500/30 bg-blue-500/10 text-blue-600 dark:text-blue-400"),children:[(0,b.jsx)(v.ListChecks,{className:"size-2.5"}),"Task"]}),n?(0,b.jsx)(H.TooltipProvider,{children:(0,b.jsxs)(H.Tooltip,{children:[(0,b.jsx)(H.TooltipTrigger,{asChild:!0,children:(0,b.jsx)(B.Button,{size:"icon",variant:"ghost",className:"size-6 shrink-0 hover:bg-destructive/10 hover:text-destructive transition-colors",onClick:b=>a2(b,a.id),children:(0,b.jsx)(j.Trash2,{className:"size-3.5"})})}),(0,b.jsx)(H.TooltipContent,{side:"right",children:"Delete session"})]})}):m&&!a.config?.task?.enabled?(0,b.jsx)("span",{className:"inline-flex items-center gap-1 text-[10px] text-emerald-600 dark:text-emerald-400 shrink-0 font-medium",children:"Active"}):"waiting"===a.status?(0,b.jsx)("span",{className:"text-[10px] text-amber-600 dark:text-amber-400 shrink-0 font-medium",children:"Waiting"}):"error"===a.status?(0,b.jsx)("span",{className:"text-[10px] text-red-600 dark:text-red-400 shrink-0 font-medium",children:"Error"}):(0,b.jsx)("span",{className:"text-[11px] text-muted-foreground shrink-0 tabular-nums",children:(d=new Date(a.createdAt),h=Math.floor((g=Math.floor((e=Math.floor(Math.floor((new Date().getTime()-d.getTime())/1e3)/60))/60))/24),e<1?"now":e<60?`${e}m`:g<24?`${g}h`:h<7?`${h}d`:`${Math.floor(h/7)}w`)})]})})},a.id)})})})})}),(0,b.jsx)(c.SidebarFooter,{className:(0,M.cn)("border-t border-border/50",a4?"p-2":"p-3"),children:(0,b.jsx)("div",{className:"flex items-center justify-between",children:a4?(0,b.jsx)("div",{className:"flex flex-col items-center gap-2 w-full",children:(0,b.jsx)(H.TooltipProvider,{children:(0,b.jsxs)(H.Tooltip,{children:[(0,b.jsx)(H.TooltipTrigger,{asChild:!0,children:(0,b.jsx)("div",{className:"flex items-center justify-center",children:(0,b.jsx)("span",{className:(0,M.cn)("size-2 rounded-full",ac?.serverConnected?"bg-emerald-500 animate-pulse":"bg-red-500")})})}),(0,b.jsx)(H.TooltipContent,{side:"right",children:ac?.serverConnected?"Connected":"Disconnected"})]})})}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 text-xs",children:[ac?.serverConnected?(0,b.jsxs)("div",{className:"flex items-center gap-1.5 text-emerald-600 dark:text-emerald-400",children:[(0,b.jsx)("span",{className:"size-1.5 rounded-full bg-current animate-pulse"}),(0,b.jsx)("span",{children:"Connected"})]}):(0,b.jsxs)("div",{className:"flex items-center gap-1.5 text-red-500",children:[(0,b.jsx)("span",{className:"size-1.5 rounded-full bg-current"}),(0,b.jsx)("span",{children:"Disconnected"})]}),(0,b.jsx)("span",{className:"text-muted-foreground",children:"·"}),(0,b.jsx)("span",{className:"text-muted-foreground",children:W.length})]}),(0,b.jsx)(C.Dialog,{open:!1,onOpenChange:ab,children:(0,b.jsxs)(C.DialogContent,{className:"sm:max-w-md",children:[(0,b.jsx)(C.DialogHeader,{children:(0,b.jsxs)(C.DialogTitle,{className:"flex items-center gap-2",children:[(0,b.jsx)("div",{className:"size-8 rounded-lg bg-muted flex items-center justify-center",children:(0,b.jsx)(l.Settings,{className:"size-4"})}),"Settings"]})}),(0,b.jsxs)("div",{className:"space-y-4 pt-2",children:[(0,b.jsxs)("div",{className:"space-y-1.5",children:[(0,b.jsx)(E.Label,{className:"text-sm font-medium",children:"Default Model"}),(0,b.jsxs)(G.Select,{value:aj,onValueChange:ak,children:[(0,b.jsx)(G.SelectTrigger,{className:"transition-all hover:border-primary/50",children:(0,b.jsx)(G.SelectValue,{placeholder:"Select a model"})}),(0,b.jsx)(G.SelectContent,{children:ac?.availableModels.map(a=>(0,b.jsx)(G.SelectItem,{value:a.id,children:(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("span",{children:a.name}),(0,b.jsx)("span",{className:"text-xs text-muted-foreground",children:a.provider})]})},a.id))})]})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(E.Label,{className:"flex items-center gap-2 text-sm font-medium",children:"Tool Approvals"}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground -mt-0.5",children:"Toggle on to require approval before tool executes"}),(0,b.jsx)("div",{className:"space-y-1 rounded-lg border p-2.5 bg-muted/30",children:ac?.availableTools.map(a=>(0,b.jsxs)("div",{className:"flex items-center justify-between py-1.5 hover:bg-muted/50 rounded px-2 -mx-1 transition-colors",children:[(0,b.jsxs)("div",{className:"space-y-0",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("span",{className:"text-sm font-medium",children:a.name}),a.dangerous&&(0,b.jsx)("span",{className:"text-[10px] bg-amber-500/20 text-amber-600 dark:text-amber-400 px-1.5 py-0.5 rounded font-medium",children:"risky"})]}),(0,b.jsx)("p",{className:"text-[11px] text-muted-foreground",children:a.description})]}),(0,b.jsx)(F.Switch,{checked:al[a.id]??!1,onCheckedChange:()=>a3(a.id)})]},a.id))})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsxs)(E.Label,{className:"flex items-center gap-2 text-sm font-medium",children:[(0,b.jsx)(p.Key,{className:"size-4"}),"API Keys"]}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground -mt-0.5",children:"Configure API keys for different providers. Keys are stored securely on your machine."}),(0,b.jsx)("div",{className:"space-y-1 rounded-lg border p-2.5 bg-muted/30",children:aG.map(a=>(0,b.jsx)("div",{className:"py-1.5 hover:bg-muted/50 rounded px-2 -mx-1 transition-colors",children:aI===a.provider?(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsx)("span",{className:"text-sm font-medium capitalize",children:a.provider}),(0,b.jsx)("span",{className:"text-[10px] text-muted-foreground font-mono",children:a.envVar})]}),(0,b.jsxs)("div",{className:"flex gap-2",children:[(0,b.jsxs)("div",{className:"relative flex-1",children:[(0,b.jsx)(D.Input,{type:aM?"text":"password",value:aK,onChange:a=>aL(a.target.value),placeholder:"Paste your API key...",className:"pr-8 text-sm font-mono",autoFocus:!0}),(0,b.jsx)(B.Button,{type:"button",variant:"ghost",size:"icon",className:"absolute right-0 top-0 h-full px-2 hover:bg-transparent",onClick:()=>aN(!aM),children:aM?(0,b.jsx)(t.EyeOff,{className:"size-4"}):(0,b.jsx)(s.Eye,{className:"size-4"})})]}),(0,b.jsx)(B.Button,{size:"icon",variant:"ghost",className:"shrink-0",onClick:()=>aX(a.provider),disabled:aO||!aK.trim(),children:aO?(0,b.jsx)(k.Loader2,{className:"size-4 animate-spin"}):(0,b.jsx)(q.Check,{className:"size-4 text-green-500"})}),(0,b.jsx)(B.Button,{size:"icon",variant:"ghost",className:"shrink-0",onClick:aY,children:(0,b.jsx)(r.X,{className:"size-4 text-muted-foreground"})})]})]}):(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsxs)("div",{className:"space-y-0",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("span",{className:"text-sm font-medium capitalize",children:a.provider}),a.configured&&(0,b.jsx)("span",{className:(0,M.cn)("text-[10px] px-1.5 py-0.5 rounded font-medium","env"===a.source?"bg-blue-500/20 text-blue-600 dark:text-blue-400":"bg-green-500/20 text-green-600 dark:text-green-400"),children:"env"===a.source?"from env":"saved"})]}),(0,b.jsx)("p",{className:"text-[11px] text-muted-foreground font-mono",children:a.configured?a.maskedKey:"Not configured"})]}),(0,b.jsx)(B.Button,{size:"sm",variant:"ghost",className:"h-7 text-xs",onClick:()=>aJ(a.provider),children:a.configured?"Update":"Add"})]})},a.provider))})]}),(0,b.jsxs)("div",{className:"space-y-1.5",children:[(0,b.jsxs)(E.Label,{className:"flex items-center gap-2 text-sm font-medium",children:[(0,b.jsx)(u,{className:"size-4"}),"Notification Sound"]}),(0,b.jsxs)("div",{className:"flex items-center justify-between rounded-lg border p-2.5 bg-muted/30",children:[(0,b.jsxs)("div",{className:"space-y-0",children:[(0,b.jsx)("span",{className:"text-sm font-medium",children:"Play sound when done"}),(0,b.jsx)("p",{className:"text-[11px] text-muted-foreground",children:"Ding when the assistant finishes responding"})]}),(0,b.jsx)(F.Switch,{checked:aQ,onCheckedChange:aR})]})]}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:"These settings apply to new sessions. You can also change the model per-session in the chat header."})]})]})})]})})})]})}function Q({children:a}){return(0,b.jsxs)(c.SidebarProvider,{defaultOpen:!0,children:[(0,b.jsx)(P,{}),(0,b.jsx)(c.SidebarInset,{className:"h-screen flex flex-col bg-background min-w-0",children:(0,b.jsx)("div",{className:"flex-1 overflow-hidden min-w-0",children:a})})]})}a.s(["default",()=>Q],126823)}];
1
+ module.exports=[126823,a=>{"use strict";var b=a.i(256856),c=a.i(507031),d=a.i(755132),e=a.i(832315),f=a.i(546640),g=a.i(746881),h=a.i(916454),i=a.i(544244),j=a.i(762491),k=a.i(252831),l=a.i(179743),m=a.i(335520);let n=(0,m.default)("panel-left-close",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]]);var o=a.i(17655),p=a.i(221557),q=a.i(95041),r=a.i(300274),s=a.i(393700),t=a.i(190555);let u=(0,m.default)("volume-2",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]]);var v=a.i(952631),w=a.i(189854),x=a.i(870514);let y=(0,m.default)("layout-grid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]),z=(0,m.default)("sliders-vertical",[["path",{d:"M10 8h4",key:"1sr2af"}],["path",{d:"M12 21v-9",key:"17s77i"}],["path",{d:"M12 8V3",key:"13r4qs"}],["path",{d:"M17 16h4",key:"h1uq16"}],["path",{d:"M19 12V3",key:"o1uvq1"}],["path",{d:"M19 21v-5",key:"qua636"}],["path",{d:"M3 14h4",key:"bcjad9"}],["path",{d:"M5 10V3",key:"cb8scm"}],["path",{d:"M5 21v-7",key:"1w1uti"}]]);var A=a.i(958792),B=a.i(476031),C=a.i(806634),D=a.i(338706),E=a.i(878137),F=a.i(679609),G=a.i(946253),H=a.i(670923),I=a.i(979412),J=a.i(605571),K=a.i(642392),L=a.i(555941),M=a.i(156033),N=a.i(828278),O=a.i(7478);function P(){let a,m,P,Q,R,S=(0,e.useRouter)(),T=(0,e.usePathname)(),{state:U,toggleSidebar:V}=(0,c.useSidebar)(),{sessions:W,isLoading:X}=(0,N.useSessions)(),[Y,Z]=(0,d.useState)(!1),[$,_]=(0,d.useState)(!1),[aa,ab]=(0,d.useState)(!1),[ac,ad]=(0,d.useState)(null),[ae,af]=(0,d.useState)(null),ag=(0,d.useRef)(null),[ah,ai]=(0,d.useState)(""),[aj,ak]=(0,d.useState)(""),[al,am]=(0,d.useState)({}),[an,ao]=(0,d.useState)(!1),[ap,aq]=(0,d.useState)(""),ar={type:"object",properties:{},required:[]},[as,at]=(0,d.useState)(ar),[au,av]=(0,d.useState)(""),[aw,ax]=(0,d.useState)(""),[ay,az]=(0,d.useState)(""),[aA,aB]=(0,d.useState)(""),[aC,aD]=(0,d.useState)("50"),[aE,aF]=(0,d.useState)(!1),[aG,aH]=(0,d.useState)([]),[aI,aJ]=(0,d.useState)(null),[aK,aL]=(0,d.useState)(""),[aM,aN]=(0,d.useState)(!1),[aO,aP]=(0,d.useState)(!1),{enabled:aQ,setEnabled:aR}=(0,O.useNotificationSound)(),aS=T.startsWith("/session/")?T.split("/session/")[1]:null,aT="/session",aU=W.some(a=>a.isStreaming),aV=async()=>{let a=await (0,L.getConfig)();ad(a),ak(a.defaultModel),am(a.defaultToolApprovals)},aW=async()=>{try{let a=await (0,I.getApiKeys)();aH(a.providers)}catch(a){console.error("Failed to load API keys:",a)}};(0,d.useEffect)(()=>{aV(),aW()},[]),(0,d.useEffect)(()=>{aa&&aW()},[aa]);let aX=async a=>{if(aK.trim()){aP(!0);try{await (0,I.setApiKey)(a,aK),await aW(),aJ(null),aL(""),aN(!1)}catch(a){console.error("Failed to save API key:",a)}finally{aP(!1)}}},aY=()=>{aJ(null),aL(""),aN(!1)};(0,d.useEffect)(()=>{ag.current&&(aU?ag.current.play().catch(()=>{}):(ag.current.pause(),ag.current.currentTime=0))},[aU]);let aZ=async()=>{if(!Y){Z(!0);try{let a=await (0,I.createSession)({name:`Session ${W.length+1}`,model:ac?.defaultModel||"gpt-5.5",toolApprovals:al});(0,N.mutateSessions)(),S.push(`${aT}/${a.id}`)}catch(a){console.error("Failed to create session:",a)}finally{Z(!1)}}},a$=async()=>{Z(!0);try{let a=await (0,I.createSession)({name:ah||`Session ${W.length+1}`,model:aj,toolApprovals:al});(0,N.mutateSessions)(),a_(),_(!1),S.push(`${aT}/${a.id}`)}catch(a){console.error("Failed to create session:",a)}finally{Z(!1)}},a_=()=>{ai(""),ac&&(ak(ac.defaultModel),am(ac.defaultToolApprovals))},a0=()=>{aq(""),at(ar),av(""),ax(""),az(""),aB(ac?.defaultModel||""),aD("50")},a1=async()=>{if(ap.trim()){if(av(""),!as||"object"!=typeof as)return void av("Schema must be a JSON object");aF(!0);try{let a=await (0,I.createTask)({prompt:ap,outputSchema:as,webhookUrl:aw||void 0,model:aA||ac?.defaultModel,name:ay||void 0,maxIterations:parseInt(aC)||50});(0,N.mutateSessions)(),ao(!1),a0(),S.push(`${aT}/${a.taskId}`)}catch(a){console.error("Failed to create task:",a)}finally{aF(!1)}}},a2=async(a,b)=>{a.preventDefault(),a.stopPropagation();try{await (0,I.deleteSession)(b),(0,N.mutateSessions)(),aS===b&&S.push("/")}catch(a){console.error("Failed to delete session:",a)}},a3=a=>{am(b=>({...b,[a]:!b[a]}))},a4="collapsed"===U;return(0,b.jsxs)(c.Sidebar,{collapsible:"icon",className:"border-r border-border/50",children:[(0,b.jsxs)(c.SidebarHeader,{className:(0,M.cn)(a4?"p-2 space-y-2":"p-3 space-y-3"),children:[!a4&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{className:"flex items-center gap-3",children:[(0,b.jsxs)("div",{className:"relative shrink-0 overflow-hidden rounded-xl size-10 shadow-md ring-1 ring-white/10",children:[(0,b.jsx)(g.default,{src:"/sparke-coder.png",alt:"Sparke",width:40,height:40,className:"absolute inset-0 size-full object-cover",priority:!0}),(0,b.jsx)("video",{ref:ag,src:"/sparkecode.mp4",muted:!0,loop:!0,playsInline:!0,className:(0,M.cn)("absolute inset-0 size-full object-cover transition-opacity duration-300",aU?"opacity-100":"opacity-0")})]}),(0,b.jsxs)("div",{className:"flex flex-1 items-center justify-between min-w-0",children:[(0,b.jsx)("h1",{className:"text-lg font-bold text-foreground",children:"SparkECoder"}),(0,b.jsx)(H.TooltipProvider,{children:(0,b.jsxs)(H.Tooltip,{children:[(0,b.jsx)(H.TooltipTrigger,{asChild:!0,children:(0,b.jsx)(B.Button,{size:"icon",variant:"ghost",className:"size-7 hover:bg-accent transition-colors",onClick:V,children:(0,b.jsx)(n,{className:"size-4"})})}),(0,b.jsxs)(H.TooltipContent,{side:"bottom",children:["Collapse ",(0,b.jsx)("kbd",{className:"ml-1 text-[10px] opacity-60",children:"⌘B"})]})]})})]})]}),(a=W.find(a=>"orchestrator"===a.role),P=(m=W.filter(a=>"worker"===a.role)).filter(a=>"needs_attention"===a.agentStatus).length,Q=m.filter(a=>"running"===a.agentStatus).length,(0,b.jsxs)("div",{className:"flex flex-col gap-1 w-full",children:[(0,b.jsxs)(f.default,{href:a?`/session/${a.id}`:"#",className:(0,M.cn)("flex items-center gap-2 px-2 py-1.5 rounded-md text-sm transition-colors",T.startsWith("/session/")&&a&&T.includes(a.id)?"bg-accent text-foreground":"hover:bg-accent/60 text-foreground/80"),children:[(0,b.jsx)(x.Bot,{className:"size-4 text-primary shrink-0"}),(0,b.jsx)("span",{className:"flex-1 truncate",children:"Orchestrator"}),a?.isStreaming&&(0,b.jsx)("span",{className:"size-1.5 rounded-full bg-emerald-500 animate-pulse"})]}),(0,b.jsxs)(f.default,{href:"/agents",className:(0,M.cn)("flex items-center gap-2 px-2 py-1.5 rounded-md text-sm transition-colors","/agents"===T?"bg-accent text-foreground":"hover:bg-accent/60 text-foreground/80"),children:[(0,b.jsx)(y,{className:"size-4 text-muted-foreground shrink-0"}),(0,b.jsx)("span",{className:"flex-1 truncate",children:"Agents"}),(0,b.jsx)("span",{className:"text-[10px] text-muted-foreground tabular-nums",children:m.length}),P>0&&(0,b.jsxs)("span",{className:"text-[10px] px-1 rounded bg-amber-500/20 text-amber-600 dark:text-amber-300 tabular-nums",children:[P,"!"]}),Q>0&&0===P&&(0,b.jsx)("span",{className:"size-1.5 rounded-full bg-emerald-500 animate-pulse"})]}),(0,b.jsxs)(f.default,{href:"/settings",className:(0,M.cn)("flex items-center gap-2 px-2 py-1.5 rounded-md text-sm transition-colors","/settings"===T?"bg-accent text-foreground":"hover:bg-accent/60 text-foreground/80"),children:[(0,b.jsx)(z,{className:"size-4 text-muted-foreground shrink-0"}),(0,b.jsx)("span",{className:"flex-1 truncate",children:"Settings"})]})]})),(0,b.jsxs)("div",{className:"flex gap-2 w-full",children:[(0,b.jsxs)(B.Button,{onClick:aZ,disabled:Y,className:"flex-1 justify-center gap-2 h-9",children:[Y?(0,b.jsx)(k.Loader2,{className:"size-4 animate-spin"}):(0,b.jsx)(h.Plus,{className:"size-4"}),"New Agent"]}),(0,b.jsx)(H.TooltipProvider,{children:(0,b.jsxs)(H.Tooltip,{children:[(0,b.jsx)(H.TooltipTrigger,{asChild:!0,children:(0,b.jsx)(B.Button,{variant:"outline",onClick:()=>{ac||aV(),ao(!0)},className:"h-9 px-2.5",children:(0,b.jsx)(v.ListChecks,{className:"size-4"})})}),(0,b.jsx)(H.TooltipContent,{side:"bottom",children:"New Task"})]})})]})]}),a4&&(0,b.jsxs)("div",{className:"flex flex-col items-center gap-2 w-full",children:[(0,b.jsx)(H.TooltipProvider,{children:(0,b.jsxs)(H.Tooltip,{children:[(0,b.jsx)(H.TooltipTrigger,{asChild:!0,children:(0,b.jsx)(B.Button,{size:"icon",variant:"ghost",onClick:V,className:"size-8 mx-auto",children:(0,b.jsx)(o.PanelLeft,{className:"size-4"})})}),(0,b.jsxs)(H.TooltipContent,{side:"right",children:["Expand ",(0,b.jsx)("kbd",{className:"ml-1 text-[10px] opacity-60",children:"⌘B"})]})]})}),(0,b.jsxs)("div",{className:"relative overflow-hidden rounded-xl size-8 shadow-md ring-1 ring-white/10 mx-auto",children:[(0,b.jsx)(g.default,{src:"/sparke-coder.png",alt:"SparkECoder",width:32,height:32,className:"absolute inset-0 size-full object-cover",priority:!0}),(0,b.jsx)("video",{ref:ag,src:"/sparkecode.mp4",muted:!0,loop:!0,playsInline:!0,className:(0,M.cn)("absolute inset-0 size-full object-cover transition-opacity duration-300",aU?"opacity-100":"opacity-0")})]}),(0,b.jsx)(H.TooltipProvider,{children:(0,b.jsxs)(H.Tooltip,{children:[(0,b.jsx)(H.TooltipTrigger,{asChild:!0,children:(0,b.jsx)(B.Button,{size:"icon",onClick:aZ,disabled:Y,className:"size-8 mx-auto",children:Y?(0,b.jsx)(k.Loader2,{className:"size-4 animate-spin"}):(0,b.jsx)(h.Plus,{className:"size-4"})})}),(0,b.jsx)(H.TooltipContent,{side:"right",children:"New Agent"})]})}),(R=W.find(a=>"orchestrator"===a.role),(0,b.jsx)(H.TooltipProvider,{children:(0,b.jsxs)(H.Tooltip,{children:[(0,b.jsx)(H.TooltipTrigger,{asChild:!0,children:(0,b.jsx)(f.default,{href:R?`/session/${R.id}`:"#",className:"size-8 mx-auto inline-flex items-center justify-center rounded-md hover:bg-accent",children:(0,b.jsx)(x.Bot,{className:"size-4 text-primary"})})}),(0,b.jsx)(H.TooltipContent,{side:"right",children:"Orchestrator"})]})})),(0,b.jsx)(H.TooltipProvider,{children:(0,b.jsxs)(H.Tooltip,{children:[(0,b.jsx)(H.TooltipTrigger,{asChild:!0,children:(0,b.jsx)(f.default,{href:"/agents",className:"size-8 mx-auto inline-flex items-center justify-center rounded-md hover:bg-accent",children:(0,b.jsx)(y,{className:"size-4"})})}),(0,b.jsx)(H.TooltipContent,{side:"right",children:"Agents board"})]})}),(0,b.jsx)(H.TooltipProvider,{children:(0,b.jsxs)(H.Tooltip,{children:[(0,b.jsx)(H.TooltipTrigger,{asChild:!0,children:(0,b.jsx)(f.default,{href:"/settings",className:"size-8 mx-auto inline-flex items-center justify-center rounded-md hover:bg-accent",children:(0,b.jsx)(z,{className:"size-4"})})}),(0,b.jsx)(H.TooltipContent,{side:"right",children:"Settings"})]})}),(0,b.jsx)(H.TooltipProvider,{children:(0,b.jsxs)(H.Tooltip,{children:[(0,b.jsx)(H.TooltipTrigger,{asChild:!0,children:(0,b.jsx)(B.Button,{size:"icon",variant:"outline",onClick:()=>{ac||aV(),ao(!0)},className:"size-8 mx-auto",children:(0,b.jsx)(v.ListChecks,{className:"size-4"})})}),(0,b.jsx)(H.TooltipContent,{side:"right",children:"New Task"})]})})]})]}),(0,b.jsx)(C.Dialog,{open:$,onOpenChange:a=>{_(a),a&&a_()},children:(0,b.jsxs)(C.DialogContent,{className:"sm:max-w-md",children:[(0,b.jsx)(C.DialogHeader,{children:(0,b.jsxs)(C.DialogTitle,{className:"flex items-center gap-2",children:[(0,b.jsx)("div",{className:"size-8 rounded-lg bg-primary flex items-center justify-center",children:(0,b.jsx)(l.Settings,{className:"size-4 text-primary-foreground"})}),"New Agent"]})}),(0,b.jsxs)("div",{className:"space-y-4 pt-2",children:[(0,b.jsxs)("div",{className:"space-y-1.5",children:[(0,b.jsx)(E.Label,{htmlFor:"name",className:"text-sm font-medium",children:"Session Name"}),(0,b.jsx)(D.Input,{id:"name",placeholder:"My Coding Project (optional)",value:ah,onChange:a=>ai(a.target.value),className:"transition-all focus:ring-2 focus:ring-primary/20"})]}),(0,b.jsxs)("div",{className:"space-y-1.5",children:[(0,b.jsx)(E.Label,{className:"text-sm font-medium",children:"Model"}),(0,b.jsxs)(G.Select,{value:aj,onValueChange:ak,children:[(0,b.jsx)(G.SelectTrigger,{className:"transition-all hover:border-primary/50",children:(0,b.jsx)(G.SelectValue,{placeholder:"Select a model"})}),(0,b.jsx)(G.SelectContent,{children:ac?.availableModels.map(a=>(0,b.jsx)(G.SelectItem,{value:a.id,children:(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("span",{children:a.name}),(0,b.jsx)("span",{className:"text-xs text-muted-foreground",children:a.provider})]})},a.id))})]})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(E.Label,{className:"flex items-center gap-2 text-sm font-medium",children:"Tool Approvals"}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground -mt-0.5",children:"Toggle on to require approval before tool executes"}),(0,b.jsx)("div",{className:"space-y-1 rounded-lg border p-2.5 bg-muted/30",children:ac?.availableTools.map(a=>(0,b.jsxs)("div",{className:"flex items-center justify-between py-1.5 hover:bg-muted/50 rounded px-2 -mx-1 transition-colors",children:[(0,b.jsxs)("div",{className:"space-y-0",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("span",{className:"text-sm font-medium",children:a.name}),a.dangerous&&(0,b.jsx)("span",{className:"text-[10px] bg-amber-500/20 text-amber-600 dark:text-amber-400 px-1.5 py-0.5 rounded font-medium",children:"risky"})]}),(0,b.jsx)("p",{className:"text-[11px] text-muted-foreground",children:a.description})]}),(0,b.jsx)(F.Switch,{checked:al[a.id]??!1,onCheckedChange:()=>a3(a.id)})]},a.id))})]}),(0,b.jsxs)(B.Button,{onClick:a$,disabled:Y,className:"w-full",children:[Y?(0,b.jsx)(k.Loader2,{className:"size-4 animate-spin mr-2"}):(0,b.jsx)(h.Plus,{className:"size-4 mr-2"}),"Create Session"]})]})]})}),(0,b.jsx)(C.Dialog,{open:an,onOpenChange:a=>{ao(a),a&&a0()},children:(0,b.jsxs)(C.DialogContent,{className:"sm:max-w-lg",children:[(0,b.jsx)(C.DialogHeader,{children:(0,b.jsxs)(C.DialogTitle,{className:"flex items-center gap-2",children:[(0,b.jsx)("div",{className:"size-8 rounded-lg bg-blue-600 flex items-center justify-center",children:(0,b.jsx)(v.ListChecks,{className:"size-4 text-white"})}),"New Task"]})}),(0,b.jsxs)("div",{className:"space-y-4 pt-2",children:[(0,b.jsxs)("div",{className:"space-y-1.5",children:[(0,b.jsx)(E.Label,{htmlFor:"task-prompt",className:"text-sm font-medium",children:"What should the agent do?"}),(0,b.jsx)(J.Textarea,{id:"task-prompt",placeholder:"e.g. Refactor the auth module to use JWT tokens...",value:ap,onChange:a=>aq(a.target.value),rows:3,autoFocus:!0})]}),(0,b.jsxs)("div",{className:"space-y-1.5",children:[(0,b.jsx)(E.Label,{className:"text-sm font-medium",children:"Expected output shape"}),(0,b.jsx)("p",{className:"text-[11px] text-muted-foreground -mt-0.5",children:"Define the JSON structure the agent must return"}),(0,b.jsx)("div",{className:(0,M.cn)("rounded-md border bg-muted/30 overflow-hidden transition-colors",au&&"border-red-500"),children:(0,b.jsx)(K.VisualJson,{value:as,onChange:a=>{at(a),av("")},children:(0,b.jsx)(K.TreeView,{className:"h-44 text-sm"})})}),au&&(0,b.jsx)("p",{className:"text-xs text-red-500 mt-1",children:au})]}),(0,b.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,b.jsxs)("div",{className:"space-y-1.5",children:[(0,b.jsx)(E.Label,{className:"text-xs text-muted-foreground",children:"Model"}),(0,b.jsxs)(G.Select,{value:aA,onValueChange:aB,children:[(0,b.jsx)(G.SelectTrigger,{className:"h-9",children:(0,b.jsx)(G.SelectValue,{placeholder:"Select a model"})}),(0,b.jsx)(G.SelectContent,{children:ac?.availableModels.map(a=>(0,b.jsx)(G.SelectItem,{value:a.id,children:(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("span",{children:a.name}),(0,b.jsx)("span",{className:"text-xs text-muted-foreground",children:a.provider})]})},a.id))})]})]}),(0,b.jsxs)("div",{className:"space-y-1.5",children:[(0,b.jsx)(E.Label,{htmlFor:"task-name",className:"text-xs text-muted-foreground",children:"Name"}),(0,b.jsx)(D.Input,{id:"task-name",placeholder:"Optional",value:ay,onChange:a=>az(a.target.value),className:"h-9"})]})]}),(0,b.jsxs)("details",{className:"group",children:[(0,b.jsxs)("summary",{className:"flex items-center gap-1.5 text-xs text-muted-foreground cursor-pointer select-none hover:text-foreground transition-colors",children:[(0,b.jsx)(w.ChevronDown,{className:"size-3 transition-transform group-open:rotate-180"}),"Advanced"]}),(0,b.jsxs)("div",{className:"grid grid-cols-2 gap-3 pt-3",children:[(0,b.jsxs)("div",{className:"space-y-1.5",children:[(0,b.jsx)(E.Label,{htmlFor:"task-webhook",className:"text-xs text-muted-foreground",children:"Webhook URL"}),(0,b.jsx)(D.Input,{id:"task-webhook",placeholder:"https://...",value:aw,onChange:a=>ax(a.target.value),className:"h-9"})]}),(0,b.jsxs)("div",{className:"space-y-1.5",children:[(0,b.jsx)(E.Label,{htmlFor:"task-iterations",className:"text-xs text-muted-foreground",children:"Max iterations"}),(0,b.jsx)(D.Input,{id:"task-iterations",type:"number",min:1,max:500,value:aC,onChange:a=>aD(a.target.value),className:"h-9"})]})]})]}),(0,b.jsx)(B.Button,{onClick:a1,disabled:aE||!ap.trim(),className:"w-full",children:aE?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(k.Loader2,{className:"size-4 animate-spin mr-2"}),"Creating..."]}):"Start Task"})]})]})}),(0,b.jsx)(c.SidebarContent,{className:"px-2",children:(0,b.jsx)(c.SidebarGroup,{className:"p-0",children:(0,b.jsx)(c.SidebarGroupContent,{children:(0,b.jsx)(c.SidebarMenu,{className:"gap-1",children:X?(0,b.jsx)("div",{className:"flex justify-center py-8",children:(0,b.jsx)(k.Loader2,{className:"size-5 animate-spin text-muted-foreground"})}):0===W.filter(a=>"orchestrator"!==a.role).length?!a4&&(0,b.jsxs)("div",{className:"text-center py-8 px-4",children:[(0,b.jsxs)("div",{className:"relative overflow-hidden rounded-xl size-12 mx-auto mb-3 shadow-md ring-1 ring-white/10",children:[(0,b.jsx)(g.default,{src:"/sparke-coder.png",alt:"SparkECoder",width:48,height:48,className:"absolute inset-0 size-full object-cover"}),aU&&(0,b.jsx)("video",{src:"/sparkecode.mp4",autoPlay:!0,muted:!0,loop:!0,playsInline:!0,className:"absolute inset-0 size-full object-cover"})]}),(0,b.jsx)("p",{className:"text-sm text-foreground",children:"No sessions yet"}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:"Click New Agent above"})]}):W.filter(a=>"orchestrator"!==a.role).map(a=>{let d,e,g,h,k=a.id===aS,l=ae===a.id,m=!0===a.isStreaming,n=!a4&&(l||k);return(0,b.jsx)(c.SidebarMenuItem,{onMouseEnter:()=>af(a.id),onMouseLeave:()=>af(null),children:a4?(0,b.jsx)(H.TooltipProvider,{children:(0,b.jsxs)(H.Tooltip,{children:[(0,b.jsx)(H.TooltipTrigger,{asChild:!0,children:(0,b.jsx)(f.default,{href:`${aT}/${a.id}`,className:(0,M.cn)("flex items-center justify-center size-8 rounded-lg transition-colors mx-auto",k?"bg-accent":"hover:bg-accent/60",m&&!k&&"bg-emerald-500/10"),children:m?(0,b.jsx)("span",{className:"size-2 rounded-full bg-emerald-500 animate-pulse"}):(0,b.jsx)(i.MessageSquare,{className:(0,M.cn)("size-4",k?"text-primary":"text-muted-foreground")})})}),(0,b.jsxs)(H.TooltipContent,{side:"right",children:[a.name||"Untitled",m&&" (Running)"]})]})}):(0,b.jsx)(c.SidebarMenuButton,{asChild:!0,isActive:k,className:(0,M.cn)("h-9 transition-all duration-150","hover:bg-accent/60",k&&"bg-accent",m&&!k&&"bg-emerald-500/5"),children:(0,b.jsxs)(f.default,{href:`${aT}/${a.id}`,className:"flex items-center gap-2.5 px-2",children:[m?(0,b.jsx)("span",{className:"size-2 rounded-full bg-emerald-500 animate-pulse shrink-0"}):(0,b.jsx)(i.MessageSquare,{className:(0,M.cn)("size-4 shrink-0",k?"text-primary":"text-muted-foreground")}),(0,b.jsx)("span",{className:(0,M.cn)("truncate flex-1 text-sm",m&&"text-emerald-600 dark:text-emerald-400"),children:a.name||"Untitled"}),a.config?.task?.enabled&&(0,b.jsxs)(A.Badge,{variant:"outline",className:(0,M.cn)("shrink-0 text-[10px] px-1.5 py-0 h-4 font-medium gap-1","completed"===a.config.task.status&&"border-emerald-500/30 bg-emerald-500/10 text-emerald-600 dark:text-emerald-400","failed"===a.config.task.status&&"border-red-500/30 bg-red-500/10 text-red-600 dark:text-red-400","running"===a.config.task.status&&"border-blue-500/30 bg-blue-500/10 text-blue-600 dark:text-blue-400"),children:[(0,b.jsx)(v.ListChecks,{className:"size-2.5"}),"Task"]}),n?(0,b.jsx)(H.TooltipProvider,{children:(0,b.jsxs)(H.Tooltip,{children:[(0,b.jsx)(H.TooltipTrigger,{asChild:!0,children:(0,b.jsx)(B.Button,{size:"icon",variant:"ghost",className:"size-6 shrink-0 hover:bg-destructive/10 hover:text-destructive transition-colors",onClick:b=>a2(b,a.id),children:(0,b.jsx)(j.Trash2,{className:"size-3.5"})})}),(0,b.jsx)(H.TooltipContent,{side:"right",children:"Delete session"})]})}):m&&!a.config?.task?.enabled?(0,b.jsx)("span",{className:"inline-flex items-center gap-1 text-[10px] text-emerald-600 dark:text-emerald-400 shrink-0 font-medium",children:"Active"}):"waiting"===a.status?(0,b.jsx)("span",{className:"text-[10px] text-amber-600 dark:text-amber-400 shrink-0 font-medium",children:"Waiting"}):"error"===a.status?(0,b.jsx)("span",{className:"text-[10px] text-red-600 dark:text-red-400 shrink-0 font-medium",children:"Error"}):(0,b.jsx)("span",{className:"text-[11px] text-muted-foreground shrink-0 tabular-nums",children:(d=new Date(a.createdAt),h=Math.floor((g=Math.floor((e=Math.floor(Math.floor((new Date().getTime()-d.getTime())/1e3)/60))/60))/24),e<1?"now":e<60?`${e}m`:g<24?`${g}h`:h<7?`${h}d`:`${Math.floor(h/7)}w`)})]})})},a.id)})})})})}),(0,b.jsx)(c.SidebarFooter,{className:(0,M.cn)("border-t border-border/50",a4?"p-2":"p-3"),children:(0,b.jsx)("div",{className:"flex items-center justify-between",children:a4?(0,b.jsx)("div",{className:"flex flex-col items-center gap-2 w-full",children:(0,b.jsx)(H.TooltipProvider,{children:(0,b.jsxs)(H.Tooltip,{children:[(0,b.jsx)(H.TooltipTrigger,{asChild:!0,children:(0,b.jsx)("div",{className:"flex items-center justify-center",children:(0,b.jsx)("span",{className:(0,M.cn)("size-2 rounded-full",ac?.serverConnected?"bg-emerald-500 animate-pulse":"bg-red-500")})})}),(0,b.jsx)(H.TooltipContent,{side:"right",children:ac?.serverConnected?"Connected":"Disconnected"})]})})}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 text-xs",children:[ac?.serverConnected?(0,b.jsxs)("div",{className:"flex items-center gap-1.5 text-emerald-600 dark:text-emerald-400",children:[(0,b.jsx)("span",{className:"size-1.5 rounded-full bg-current animate-pulse"}),(0,b.jsx)("span",{children:"Connected"})]}):(0,b.jsxs)("div",{className:"flex items-center gap-1.5 text-red-500",children:[(0,b.jsx)("span",{className:"size-1.5 rounded-full bg-current"}),(0,b.jsx)("span",{children:"Disconnected"})]}),(0,b.jsx)("span",{className:"text-muted-foreground",children:"·"}),(0,b.jsx)("span",{className:"text-muted-foreground",children:W.length})]}),(0,b.jsx)(C.Dialog,{open:!1,onOpenChange:ab,children:(0,b.jsxs)(C.DialogContent,{className:"sm:max-w-md",children:[(0,b.jsx)(C.DialogHeader,{children:(0,b.jsxs)(C.DialogTitle,{className:"flex items-center gap-2",children:[(0,b.jsx)("div",{className:"size-8 rounded-lg bg-muted flex items-center justify-center",children:(0,b.jsx)(l.Settings,{className:"size-4"})}),"Settings"]})}),(0,b.jsxs)("div",{className:"space-y-4 pt-2",children:[(0,b.jsxs)("div",{className:"space-y-1.5",children:[(0,b.jsx)(E.Label,{className:"text-sm font-medium",children:"Default Model"}),(0,b.jsxs)(G.Select,{value:aj,onValueChange:ak,children:[(0,b.jsx)(G.SelectTrigger,{className:"transition-all hover:border-primary/50",children:(0,b.jsx)(G.SelectValue,{placeholder:"Select a model"})}),(0,b.jsx)(G.SelectContent,{children:ac?.availableModels.map(a=>(0,b.jsx)(G.SelectItem,{value:a.id,children:(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("span",{children:a.name}),(0,b.jsx)("span",{className:"text-xs text-muted-foreground",children:a.provider})]})},a.id))})]})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsx)(E.Label,{className:"flex items-center gap-2 text-sm font-medium",children:"Tool Approvals"}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground -mt-0.5",children:"Toggle on to require approval before tool executes"}),(0,b.jsx)("div",{className:"space-y-1 rounded-lg border p-2.5 bg-muted/30",children:ac?.availableTools.map(a=>(0,b.jsxs)("div",{className:"flex items-center justify-between py-1.5 hover:bg-muted/50 rounded px-2 -mx-1 transition-colors",children:[(0,b.jsxs)("div",{className:"space-y-0",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("span",{className:"text-sm font-medium",children:a.name}),a.dangerous&&(0,b.jsx)("span",{className:"text-[10px] bg-amber-500/20 text-amber-600 dark:text-amber-400 px-1.5 py-0.5 rounded font-medium",children:"risky"})]}),(0,b.jsx)("p",{className:"text-[11px] text-muted-foreground",children:a.description})]}),(0,b.jsx)(F.Switch,{checked:al[a.id]??!1,onCheckedChange:()=>a3(a.id)})]},a.id))})]}),(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsxs)(E.Label,{className:"flex items-center gap-2 text-sm font-medium",children:[(0,b.jsx)(p.Key,{className:"size-4"}),"API Keys"]}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground -mt-0.5",children:"Configure API keys for different providers. Keys are stored securely on your machine."}),(0,b.jsx)("div",{className:"space-y-1 rounded-lg border p-2.5 bg-muted/30",children:aG.map(a=>(0,b.jsx)("div",{className:"py-1.5 hover:bg-muted/50 rounded px-2 -mx-1 transition-colors",children:aI===a.provider?(0,b.jsxs)("div",{className:"space-y-2",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsx)("span",{className:"text-sm font-medium capitalize",children:a.provider}),(0,b.jsx)("span",{className:"text-[10px] text-muted-foreground font-mono",children:a.envVar})]}),(0,b.jsxs)("div",{className:"flex gap-2",children:[(0,b.jsxs)("div",{className:"relative flex-1",children:[(0,b.jsx)(D.Input,{type:aM?"text":"password",value:aK,onChange:a=>aL(a.target.value),placeholder:"Paste your API key...",className:"pr-8 text-sm font-mono",autoFocus:!0}),(0,b.jsx)(B.Button,{type:"button",variant:"ghost",size:"icon",className:"absolute right-0 top-0 h-full px-2 hover:bg-transparent",onClick:()=>aN(!aM),children:aM?(0,b.jsx)(t.EyeOff,{className:"size-4"}):(0,b.jsx)(s.Eye,{className:"size-4"})})]}),(0,b.jsx)(B.Button,{size:"icon",variant:"ghost",className:"shrink-0",onClick:()=>aX(a.provider),disabled:aO||!aK.trim(),children:aO?(0,b.jsx)(k.Loader2,{className:"size-4 animate-spin"}):(0,b.jsx)(q.Check,{className:"size-4 text-green-500"})}),(0,b.jsx)(B.Button,{size:"icon",variant:"ghost",className:"shrink-0",onClick:aY,children:(0,b.jsx)(r.X,{className:"size-4 text-muted-foreground"})})]})]}):(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsxs)("div",{className:"space-y-0",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("span",{className:"text-sm font-medium capitalize",children:a.provider}),a.configured&&(0,b.jsx)("span",{className:(0,M.cn)("text-[10px] px-1.5 py-0.5 rounded font-medium","env"===a.source?"bg-blue-500/20 text-blue-600 dark:text-blue-400":"bg-green-500/20 text-green-600 dark:text-green-400"),children:"env"===a.source?"from env":"saved"})]}),(0,b.jsx)("p",{className:"text-[11px] text-muted-foreground font-mono",children:a.configured?a.maskedKey:"Not configured"})]}),(0,b.jsx)(B.Button,{size:"sm",variant:"ghost",className:"h-7 text-xs",onClick:()=>aJ(a.provider),children:a.configured?"Update":"Add"})]})},a.provider))})]}),(0,b.jsxs)("div",{className:"space-y-1.5",children:[(0,b.jsxs)(E.Label,{className:"flex items-center gap-2 text-sm font-medium",children:[(0,b.jsx)(u,{className:"size-4"}),"Notification Sound"]}),(0,b.jsxs)("div",{className:"flex items-center justify-between rounded-lg border p-2.5 bg-muted/30",children:[(0,b.jsxs)("div",{className:"space-y-0",children:[(0,b.jsx)("span",{className:"text-sm font-medium",children:"Play sound when done"}),(0,b.jsx)("p",{className:"text-[11px] text-muted-foreground",children:"Ding when the assistant finishes responding"})]}),(0,b.jsx)(F.Switch,{checked:aQ,onCheckedChange:aR})]})]}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground",children:"These settings apply to new sessions. You can also change the model per-session in the chat header."})]})]})})]})})})]})}function Q({children:a}){return(0,b.jsxs)(c.SidebarProvider,{defaultOpen:!0,children:[(0,b.jsx)(P,{}),(0,b.jsx)(c.SidebarInset,{className:"h-screen flex flex-col bg-background min-w-0",children:(0,b.jsx)("div",{className:"flex-1 overflow-hidden min-w-0",children:a})})]})}a.s(["default",()=>Q],126823)}];
2
2
 
3
3
  //# sourceMappingURL=web_src_app_%28main%29_layout_tsx_453f6492._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[908810,a=>{"use strict";var b=a.i(256856),c=a.i(755132),d=a.i(832315),e=a.i(746881),f=a.i(546640),g=a.i(916454),h=a.i(252831),i=a.i(221557),j=a.i(917999),j=j,k=a.i(290293),k=k,l=a.i(544244),m=a.i(784268),m=m,n=a.i(762491),o=a.i(870514),p=a.i(670923),q=a.i(476031),r=a.i(338706),s=a.i(331893),t=a.i(979412),u=a.i(555941),v=a.i(828278),w=a.i(156033);function x({label:a,value:c,tone:d}){return(0,b.jsxs)("div",{className:"rounded-lg border border-border/60 bg-card/50 p-2 text-center",children:[(0,b.jsx)("p",{className:(0,w.cn)("text-lg font-semibold tabular-nums",d),children:c}),(0,b.jsx)("p",{className:"text-[10px] text-muted-foreground uppercase tracking-wide",children:a})]})}function y(){let a=(0,d.useRouter)(),y=(0,d.useSearchParams)(),{sessions:z,isLoading:A}=(0,v.useSessions)(),B=z.filter(a=>"worker"===a.role),C={running:B.filter(a=>"running"===a.agentStatus).length,needs_attention:B.filter(a=>"needs_attention"===a.agentStatus).length,completed:B.filter(a=>"completed"===a.agentStatus).length,failed:B.filter(a=>"failed"===a.agentStatus).length,idle:B.filter(a=>"idle"===a.agentStatus).length},[D,E]=(0,c.useState)(!1),[F,G]=(0,c.useState)(null),[H,I]=(0,c.useState)(""),[J,K]=(0,c.useState)(!1),[L,M]=(0,c.useState)(null),[N,O]=(0,c.useState)(null),P=(0,c.useRef)(!1),Q=async(a,b)=>{a.preventDefault(),a.stopPropagation();try{await (0,t.deleteSession)(b),(0,v.mutateSessions)()}catch(a){console.error("Failed to delete session:",a)}};(0,c.useEffect)(()=>{(0,u.getConfig)().then(G)},[]),(0,c.useEffect)(()=>{y.has("new")&&F&&F.apiKeyConfigured&&!P.current&&!D&&(P.current=!0,(async()=>{E(!0);try{let b=await (0,t.createSession)({name:`Session ${z.length+1}`,model:F.defaultModel||"anthropic/claude-opus-4.7",toolApprovals:F.defaultToolApprovals||{}});(0,v.mutateSessions)(),a.replace(`/session/${b.id}`)}catch(a){console.error("Failed to auto-create session:",a),E(!1)}})())},[y,F,z.length,D,a]),(0,c.useEffect)(()=>{y.has("latest")&&!A&&z.length>0&&a.replace(`/session/${z[0].id}`)},[y,A,z,a]);let R=async()=>{if(H.trim()&&!J){K(!0),M(null);try{if((await (0,t.setApiKey)("ai-gateway",H.trim())).success){let a=await (0,u.getConfig)();G(a),I("")}else M("Failed to save API key. Please try again.")}catch(a){M("Failed to save API key. Please try again.")}finally{K(!1)}}},S=async()=>{if(!D){E(!0);try{let b=await (0,t.createSession)({name:`Session ${z.length+1}`,model:F?.defaultModel||"anthropic/claude-opus-4.7",toolApprovals:F?.defaultToolApprovals||{}});(0,v.mutateSessions)(),a.push(`/session/${b.id}`)}catch(a){console.error("Failed to create session:",a)}finally{E(!1)}}};return((0,c.useEffect)(()=>{let a=a=>{(a.metaKey||a.ctrlKey)&&"t"===a.key&&(a.preventDefault(),S())};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[D,z.length,F]),F&&!F.serverConnected)?(0,b.jsx)("div",{className:"flex items-center justify-center h-full bg-gradient-to-b from-background to-muted/20",children:(0,b.jsxs)("div",{className:"text-center max-w-lg mx-auto p-8",children:[(0,b.jsx)("div",{className:"flex justify-center mb-8",children:(0,b.jsx)("div",{className:"relative size-28 rounded-2xl overflow-hidden shadow-xl ring-1 ring-white/10",children:(0,b.jsx)(e.default,{src:"/sparke-coder.png",alt:"Sparke",fill:!0,className:"object-cover",priority:!0})})}),(0,b.jsx)("h1",{className:"text-3xl font-bold mb-3 text-primary",children:"SparkECoder API unreachable"}),(0,b.jsxs)("div",{className:"bg-muted/50 rounded-lg p-6 mb-6 text-left",children:[(0,b.jsxs)("p",{className:"text-sm text-muted-foreground mb-2",children:["The browser couldn't reach the SparkECoder API at ",(0,b.jsx)("code",{className:"px-1 py-0.5 rounded bg-muted text-[11px] break-all",children:F.apiBaseUrl}),"."]}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground mb-2",children:"Common causes:"}),(0,b.jsxs)("ul",{className:"text-sm text-muted-foreground list-disc pl-5 space-y-1",children:[(0,b.jsxs)("li",{children:["The auto-detected URL is wrong for this hostname. Append ",(0,b.jsx)("code",{className:"px-1 py-0.5 rounded bg-muted text-[11px]",children:"?apiUrl=https://your-api-host"})," to the page URL to override (saves to localStorage)."]}),(0,b.jsx)("li",{children:"Cloudflared tunnel down or DNS not yet propagated."}),(0,b.jsxs)("li",{children:["Sparkecoder service stopped — run ",(0,b.jsx)("code",{className:"px-1 py-0.5 rounded bg-muted text-[11px]",children:"launchctl list | grep sparkecoder"}),"."]})]})]})]})}):F&&F.serverConnected&&!F.apiKeyConfigured?(0,b.jsx)("div",{className:"flex items-center justify-center h-full bg-gradient-to-b from-background to-muted/20",children:(0,b.jsxs)("div",{className:"text-center max-w-lg mx-auto p-8",children:[(0,b.jsx)("div",{className:"flex justify-center mb-8",children:(0,b.jsx)("div",{className:"relative size-28 rounded-2xl overflow-hidden shadow-xl ring-1 ring-white/10",children:(0,b.jsx)(e.default,{src:"/sparke-coder.png",alt:"Sparke - AI Coding Assistant",fill:!0,className:"object-cover",priority:!0})})}),(0,b.jsx)("h1",{className:"text-3xl font-bold mb-3 text-primary",children:"Welcome to SparkECoder"}),(0,b.jsxs)("div",{className:"bg-muted/50 rounded-lg p-6 mb-6 text-left",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,b.jsx)(i.Key,{className:"size-5 text-amber-500"}),(0,b.jsx)("h2",{className:"font-semibold",children:"API Key Required"})]}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground mb-4",children:"SparkECoder uses the Vercel AI Gateway. Enter your API key to get started."}),(0,b.jsxs)("div",{className:"flex gap-2 mb-3",children:[(0,b.jsx)(r.Input,{type:"password",placeholder:"Enter your AI Gateway API key",value:H,onChange:a=>I(a.target.value),onKeyDown:a=>"Enter"===a.key&&R(),className:"flex-1"}),(0,b.jsx)(q.Button,{onClick:R,disabled:!H.trim()||J,children:J?(0,b.jsx)(h.Loader2,{className:"size-4 animate-spin"}):"Save"})]}),L&&(0,b.jsxs)("div",{className:"flex items-center gap-2 text-sm text-destructive mb-3",children:[(0,b.jsx)(k.default,{className:"size-4"}),L]}),(0,b.jsxs)("a",{href:"https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%2Fapi-keys",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-sm text-primary hover:underline",children:["Get an API key from Vercel",(0,b.jsx)(j.default,{className:"size-3"})]})]})]})}):(0,b.jsx)("div",{className:"flex items-center justify-center h-full bg-gradient-to-b from-background to-muted/20 overflow-auto",children:(0,b.jsxs)("div",{className:"text-center max-w-lg mx-auto p-8",children:[(0,b.jsx)("div",{className:"flex justify-center mb-8",children:(0,b.jsx)(p.TooltipProvider,{children:(0,b.jsxs)(p.Tooltip,{children:[(0,b.jsx)(p.TooltipTrigger,{asChild:!0,children:(0,b.jsxs)("div",{className:"relative group cursor-pointer",children:[(0,b.jsx)("div",{className:"absolute inset-0 rounded-3xl blur-2xl opacity-40 group-hover:opacity-60 transition-opacity bg-primary/30"}),(0,b.jsx)("div",{className:"relative size-28 rounded-2xl overflow-hidden shadow-xl ring-1 ring-white/10 hover-lift",children:(0,b.jsx)(e.default,{src:"/sparke-coder.png",alt:"Sparke - AI Coding Assistant",fill:!0,className:"object-cover sparke-idle",priority:!0})})]})}),(0,b.jsx)(p.TooltipContent,{children:"Meet Sparke, your coding companion!"})]})})}),(0,b.jsx)("h1",{className:"text-3xl font-bold mb-3 text-primary",children:"Welcome to SparkECoder"}),(0,b.jsx)("p",{className:"text-muted-foreground mb-8 leading-relaxed",children:"Your AI-powered coding assistant. Start a new session to begin building amazing things."}),(0,b.jsx)(q.Button,{size:"lg",onClick:S,disabled:D,className:"gap-2 px-8",children:D?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(h.Loader2,{className:"size-4 animate-spin"}),"Creating..."]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(g.Plus,{className:"size-4"}),"Start a Session"]})}),(0,b.jsxs)("p",{className:"mt-6 text-xs text-muted-foreground/70",children:["Press ",(0,b.jsx)("kbd",{className:"px-1.5 py-0.5 bg-muted rounded text-[10px] font-mono",children:"⌘"})," + ",(0,b.jsx)("kbd",{className:"px-1.5 py-0.5 bg-muted rounded text-[10px] font-mono",children:"T"})," to create a new session"]}),B.length>0&&(0,b.jsxs)("div",{className:"mt-6 text-left",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(o.Bot,{className:"size-4 text-muted-foreground"}),(0,b.jsx)("h2",{className:"text-sm font-medium text-muted-foreground",children:"Agents"})]}),(0,b.jsx)(f.default,{href:"/agents",className:"text-xs text-muted-foreground hover:text-foreground",children:"Open board →"})]}),(0,b.jsxs)("div",{className:"grid grid-cols-5 gap-2",children:[(0,b.jsx)(x,{label:"Running",value:C.running,tone:"text-emerald-500"}),(0,b.jsx)(x,{label:"Needs input",value:C.needs_attention,tone:"text-amber-500"}),(0,b.jsx)(x,{label:"Idle",value:C.idle,tone:"text-muted-foreground"}),(0,b.jsx)(x,{label:"Done",value:C.completed,tone:"text-blue-500"}),(0,b.jsx)(x,{label:"Failed",value:C.failed,tone:"text-rose-500"})]})]}),!A&&z.length>0&&(0,b.jsxs)("div",{className:"mt-10 text-left",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,b.jsx)(m.default,{className:"size-4 text-muted-foreground"}),(0,b.jsx)("h2",{className:"text-sm font-medium text-muted-foreground",children:"Recent Sessions"})]}),(0,b.jsx)("div",{className:"rounded-xl border border-border/60 bg-card/50 backdrop-blur-sm overflow-hidden",children:(0,b.jsx)(s.ScrollArea,{className:(0,w.cn)(z.length>5?"h-[280px]":""),children:(0,b.jsx)("div",{className:"divide-y divide-border/40",children:z.map(a=>{let c,d,e,g,h=N===a.id,i=!0===a.isStreaming;return(0,b.jsxs)(f.default,{href:`/session/${a.id}`,className:(0,w.cn)("flex items-center gap-3 p-3 transition-colors hover:bg-accent/50 group",i&&"bg-emerald-500/5"),onMouseEnter:()=>O(a.id),onMouseLeave:()=>O(null),children:[(0,b.jsx)("div",{className:(0,w.cn)("size-9 rounded-lg flex items-center justify-center shrink-0 transition-colors",i?"bg-emerald-500/10":"bg-muted/60 group-hover:bg-muted"),children:i?(0,b.jsx)("span",{className:"size-2.5 rounded-full bg-emerald-500 animate-pulse"}):(0,b.jsx)(l.MessageSquare,{className:"size-4 text-muted-foreground"})}),(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("p",{className:(0,w.cn)("text-sm font-medium truncate",i&&"text-emerald-600 dark:text-emerald-400"),children:a.name||"Untitled Session"}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground truncate",children:i?(0,b.jsx)("span",{className:"text-emerald-600 dark:text-emerald-400",children:"Active now"}):"waiting"===a.status?(0,b.jsx)("span",{className:"text-amber-600 dark:text-amber-400",children:"Waiting for input"}):(c=new Date(a.updatedAt||a.createdAt),g=Math.floor((e=Math.floor((d=Math.floor(Math.floor((new Date().getTime()-c.getTime())/1e3)/60))/60))/24),d<1?"just now":1===d?"1 minute ago":d<60?`${d} minutes ago`:1===e?"1 hour ago":e<24?`${e} hours ago`:1===g?"yesterday":g<7?`${g} days ago`:`${Math.floor(g/7)} weeks ago`)})]}),h&&(0,b.jsx)(p.TooltipProvider,{children:(0,b.jsxs)(p.Tooltip,{children:[(0,b.jsx)(p.TooltipTrigger,{asChild:!0,children:(0,b.jsx)(q.Button,{size:"icon",variant:"ghost",className:"size-7 shrink-0 hover:bg-destructive/10 hover:text-destructive transition-colors",onClick:b=>Q(b,a.id),children:(0,b.jsx)(n.Trash2,{className:"size-3.5"})})}),(0,b.jsx)(p.TooltipContent,{children:"Delete session"})]})})]},a.id)})})})})]})]})})}function z(){return(0,b.jsx)(c.Suspense,{fallback:(0,b.jsx)("div",{className:"flex items-center justify-center h-full",children:(0,b.jsx)(h.Loader2,{className:"size-6 animate-spin text-muted-foreground"})}),children:(0,b.jsx)(y,{})})}a.s(["default",()=>z],908810)}];
1
+ module.exports=[908810,a=>{"use strict";var b=a.i(256856),c=a.i(755132),d=a.i(832315),e=a.i(746881),f=a.i(546640),g=a.i(916454),h=a.i(252831),i=a.i(221557),j=a.i(917999),j=j,k=a.i(290293),k=k,l=a.i(544244),m=a.i(784268),m=m,n=a.i(762491),o=a.i(870514),p=a.i(670923),q=a.i(476031),r=a.i(338706),s=a.i(331893),t=a.i(979412),u=a.i(555941),v=a.i(828278),w=a.i(156033);function x({label:a,value:c,tone:d}){return(0,b.jsxs)("div",{className:"rounded-lg border border-border/60 bg-card/50 p-2 text-center",children:[(0,b.jsx)("p",{className:(0,w.cn)("text-lg font-semibold tabular-nums",d),children:c}),(0,b.jsx)("p",{className:"text-[10px] text-muted-foreground uppercase tracking-wide",children:a})]})}function y(){let a=(0,d.useRouter)(),y=(0,d.useSearchParams)(),{sessions:z,isLoading:A}=(0,v.useSessions)(),B=z.filter(a=>"worker"===a.role),C={running:B.filter(a=>"running"===a.agentStatus).length,needs_attention:B.filter(a=>"needs_attention"===a.agentStatus).length,completed:B.filter(a=>"completed"===a.agentStatus).length,failed:B.filter(a=>"failed"===a.agentStatus).length,idle:B.filter(a=>"idle"===a.agentStatus).length},[D,E]=(0,c.useState)(!1),[F,G]=(0,c.useState)(null),[H,I]=(0,c.useState)(""),[J,K]=(0,c.useState)(!1),[L,M]=(0,c.useState)(null),[N,O]=(0,c.useState)(null),P=(0,c.useRef)(!1),Q=async(a,b)=>{a.preventDefault(),a.stopPropagation();try{await (0,t.deleteSession)(b),(0,v.mutateSessions)()}catch(a){console.error("Failed to delete session:",a)}};(0,c.useEffect)(()=>{(0,u.getConfig)().then(G)},[]),(0,c.useEffect)(()=>{y.has("new")&&F&&F.apiKeyConfigured&&!P.current&&!D&&(P.current=!0,(async()=>{E(!0);try{let b=await (0,t.createSession)({name:`Session ${z.length+1}`,model:F.defaultModel||"gpt-5.5",toolApprovals:F.defaultToolApprovals||{}});(0,v.mutateSessions)(),a.replace(`/session/${b.id}`)}catch(a){console.error("Failed to auto-create session:",a),E(!1)}})())},[y,F,z.length,D,a]),(0,c.useEffect)(()=>{y.has("latest")&&!A&&z.length>0&&a.replace(`/session/${z[0].id}`)},[y,A,z,a]);let R=async()=>{if(H.trim()&&!J){K(!0),M(null);try{if((await (0,t.setApiKey)("ai-gateway",H.trim())).success){let a=await (0,u.getConfig)();G(a),I("")}else M("Failed to save API key. Please try again.")}catch(a){M("Failed to save API key. Please try again.")}finally{K(!1)}}},S=async()=>{if(!D){E(!0);try{let b=await (0,t.createSession)({name:`Session ${z.length+1}`,model:F?.defaultModel||"gpt-5.5",toolApprovals:F?.defaultToolApprovals||{}});(0,v.mutateSessions)(),a.push(`/session/${b.id}`)}catch(a){console.error("Failed to create session:",a)}finally{E(!1)}}};return((0,c.useEffect)(()=>{let a=a=>{(a.metaKey||a.ctrlKey)&&"t"===a.key&&(a.preventDefault(),S())};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[D,z.length,F]),F&&!F.serverConnected)?(0,b.jsx)("div",{className:"flex items-center justify-center h-full bg-gradient-to-b from-background to-muted/20",children:(0,b.jsxs)("div",{className:"text-center max-w-lg mx-auto p-8",children:[(0,b.jsx)("div",{className:"flex justify-center mb-8",children:(0,b.jsx)("div",{className:"relative size-28 rounded-2xl overflow-hidden shadow-xl ring-1 ring-white/10",children:(0,b.jsx)(e.default,{src:"/sparke-coder.png",alt:"Sparke",fill:!0,className:"object-cover",priority:!0})})}),(0,b.jsx)("h1",{className:"text-3xl font-bold mb-3 text-primary",children:"SparkECoder API unreachable"}),(0,b.jsxs)("div",{className:"bg-muted/50 rounded-lg p-6 mb-6 text-left",children:[(0,b.jsxs)("p",{className:"text-sm text-muted-foreground mb-2",children:["The browser couldn't reach the SparkECoder API at ",(0,b.jsx)("code",{className:"px-1 py-0.5 rounded bg-muted text-[11px] break-all",children:F.apiBaseUrl}),"."]}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground mb-2",children:"Common causes:"}),(0,b.jsxs)("ul",{className:"text-sm text-muted-foreground list-disc pl-5 space-y-1",children:[(0,b.jsxs)("li",{children:["The auto-detected URL is wrong for this hostname. Append ",(0,b.jsx)("code",{className:"px-1 py-0.5 rounded bg-muted text-[11px]",children:"?apiUrl=https://your-api-host"})," to the page URL to override (saves to localStorage)."]}),(0,b.jsx)("li",{children:"Cloudflared tunnel down or DNS not yet propagated."}),(0,b.jsxs)("li",{children:["Sparkecoder service stopped — run ",(0,b.jsx)("code",{className:"px-1 py-0.5 rounded bg-muted text-[11px]",children:"launchctl list | grep sparkecoder"}),"."]})]})]})]})}):F&&F.serverConnected&&!F.apiKeyConfigured?(0,b.jsx)("div",{className:"flex items-center justify-center h-full bg-gradient-to-b from-background to-muted/20",children:(0,b.jsxs)("div",{className:"text-center max-w-lg mx-auto p-8",children:[(0,b.jsx)("div",{className:"flex justify-center mb-8",children:(0,b.jsx)("div",{className:"relative size-28 rounded-2xl overflow-hidden shadow-xl ring-1 ring-white/10",children:(0,b.jsx)(e.default,{src:"/sparke-coder.png",alt:"Sparke - AI Coding Assistant",fill:!0,className:"object-cover",priority:!0})})}),(0,b.jsx)("h1",{className:"text-3xl font-bold mb-3 text-primary",children:"Welcome to SparkECoder"}),(0,b.jsxs)("div",{className:"bg-muted/50 rounded-lg p-6 mb-6 text-left",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,b.jsx)(i.Key,{className:"size-5 text-amber-500"}),(0,b.jsx)("h2",{className:"font-semibold",children:"API Key Required"})]}),(0,b.jsx)("p",{className:"text-sm text-muted-foreground mb-4",children:"SparkECoder uses the Vercel AI Gateway. Enter your API key to get started."}),(0,b.jsxs)("div",{className:"flex gap-2 mb-3",children:[(0,b.jsx)(r.Input,{type:"password",placeholder:"Enter your AI Gateway API key",value:H,onChange:a=>I(a.target.value),onKeyDown:a=>"Enter"===a.key&&R(),className:"flex-1"}),(0,b.jsx)(q.Button,{onClick:R,disabled:!H.trim()||J,children:J?(0,b.jsx)(h.Loader2,{className:"size-4 animate-spin"}):"Save"})]}),L&&(0,b.jsxs)("div",{className:"flex items-center gap-2 text-sm text-destructive mb-3",children:[(0,b.jsx)(k.default,{className:"size-4"}),L]}),(0,b.jsxs)("a",{href:"https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%2Fapi-keys",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-sm text-primary hover:underline",children:["Get an API key from Vercel",(0,b.jsx)(j.default,{className:"size-3"})]})]})]})}):(0,b.jsx)("div",{className:"flex items-center justify-center h-full bg-gradient-to-b from-background to-muted/20 overflow-auto",children:(0,b.jsxs)("div",{className:"text-center max-w-lg mx-auto p-8",children:[(0,b.jsx)("div",{className:"flex justify-center mb-8",children:(0,b.jsx)(p.TooltipProvider,{children:(0,b.jsxs)(p.Tooltip,{children:[(0,b.jsx)(p.TooltipTrigger,{asChild:!0,children:(0,b.jsxs)("div",{className:"relative group cursor-pointer",children:[(0,b.jsx)("div",{className:"absolute inset-0 rounded-3xl blur-2xl opacity-40 group-hover:opacity-60 transition-opacity bg-primary/30"}),(0,b.jsx)("div",{className:"relative size-28 rounded-2xl overflow-hidden shadow-xl ring-1 ring-white/10 hover-lift",children:(0,b.jsx)(e.default,{src:"/sparke-coder.png",alt:"Sparke - AI Coding Assistant",fill:!0,className:"object-cover sparke-idle",priority:!0})})]})}),(0,b.jsx)(p.TooltipContent,{children:"Meet Sparke, your coding companion!"})]})})}),(0,b.jsx)("h1",{className:"text-3xl font-bold mb-3 text-primary",children:"Welcome to SparkECoder"}),(0,b.jsx)("p",{className:"text-muted-foreground mb-8 leading-relaxed",children:"Your AI-powered coding assistant. Start a new session to begin building amazing things."}),(0,b.jsx)(q.Button,{size:"lg",onClick:S,disabled:D,className:"gap-2 px-8",children:D?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(h.Loader2,{className:"size-4 animate-spin"}),"Creating..."]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(g.Plus,{className:"size-4"}),"Start a Session"]})}),(0,b.jsxs)("p",{className:"mt-6 text-xs text-muted-foreground/70",children:["Press ",(0,b.jsx)("kbd",{className:"px-1.5 py-0.5 bg-muted rounded text-[10px] font-mono",children:"⌘"})," + ",(0,b.jsx)("kbd",{className:"px-1.5 py-0.5 bg-muted rounded text-[10px] font-mono",children:"T"})," to create a new session"]}),B.length>0&&(0,b.jsxs)("div",{className:"mt-6 text-left",children:[(0,b.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(o.Bot,{className:"size-4 text-muted-foreground"}),(0,b.jsx)("h2",{className:"text-sm font-medium text-muted-foreground",children:"Agents"})]}),(0,b.jsx)(f.default,{href:"/agents",className:"text-xs text-muted-foreground hover:text-foreground",children:"Open board →"})]}),(0,b.jsxs)("div",{className:"grid grid-cols-5 gap-2",children:[(0,b.jsx)(x,{label:"Running",value:C.running,tone:"text-emerald-500"}),(0,b.jsx)(x,{label:"Needs input",value:C.needs_attention,tone:"text-amber-500"}),(0,b.jsx)(x,{label:"Idle",value:C.idle,tone:"text-muted-foreground"}),(0,b.jsx)(x,{label:"Done",value:C.completed,tone:"text-blue-500"}),(0,b.jsx)(x,{label:"Failed",value:C.failed,tone:"text-rose-500"})]})]}),!A&&z.length>0&&(0,b.jsxs)("div",{className:"mt-10 text-left",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,b.jsx)(m.default,{className:"size-4 text-muted-foreground"}),(0,b.jsx)("h2",{className:"text-sm font-medium text-muted-foreground",children:"Recent Sessions"})]}),(0,b.jsx)("div",{className:"rounded-xl border border-border/60 bg-card/50 backdrop-blur-sm overflow-hidden",children:(0,b.jsx)(s.ScrollArea,{className:(0,w.cn)(z.length>5?"h-[280px]":""),children:(0,b.jsx)("div",{className:"divide-y divide-border/40",children:z.map(a=>{let c,d,e,g,h=N===a.id,i=!0===a.isStreaming;return(0,b.jsxs)(f.default,{href:`/session/${a.id}`,className:(0,w.cn)("flex items-center gap-3 p-3 transition-colors hover:bg-accent/50 group",i&&"bg-emerald-500/5"),onMouseEnter:()=>O(a.id),onMouseLeave:()=>O(null),children:[(0,b.jsx)("div",{className:(0,w.cn)("size-9 rounded-lg flex items-center justify-center shrink-0 transition-colors",i?"bg-emerald-500/10":"bg-muted/60 group-hover:bg-muted"),children:i?(0,b.jsx)("span",{className:"size-2.5 rounded-full bg-emerald-500 animate-pulse"}):(0,b.jsx)(l.MessageSquare,{className:"size-4 text-muted-foreground"})}),(0,b.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,b.jsx)("p",{className:(0,w.cn)("text-sm font-medium truncate",i&&"text-emerald-600 dark:text-emerald-400"),children:a.name||"Untitled Session"}),(0,b.jsx)("p",{className:"text-xs text-muted-foreground truncate",children:i?(0,b.jsx)("span",{className:"text-emerald-600 dark:text-emerald-400",children:"Active now"}):"waiting"===a.status?(0,b.jsx)("span",{className:"text-amber-600 dark:text-amber-400",children:"Waiting for input"}):(c=new Date(a.updatedAt||a.createdAt),g=Math.floor((e=Math.floor((d=Math.floor(Math.floor((new Date().getTime()-c.getTime())/1e3)/60))/60))/24),d<1?"just now":1===d?"1 minute ago":d<60?`${d} minutes ago`:1===e?"1 hour ago":e<24?`${e} hours ago`:1===g?"yesterday":g<7?`${g} days ago`:`${Math.floor(g/7)} weeks ago`)})]}),h&&(0,b.jsx)(p.TooltipProvider,{children:(0,b.jsxs)(p.Tooltip,{children:[(0,b.jsx)(p.TooltipTrigger,{asChild:!0,children:(0,b.jsx)(q.Button,{size:"icon",variant:"ghost",className:"size-7 shrink-0 hover:bg-destructive/10 hover:text-destructive transition-colors",onClick:b=>Q(b,a.id),children:(0,b.jsx)(n.Trash2,{className:"size-3.5"})})}),(0,b.jsx)(p.TooltipContent,{children:"Delete session"})]})})]},a.id)})})})})]})]})})}function z(){return(0,b.jsx)(c.Suspense,{fallback:(0,b.jsx)("div",{className:"flex items-center justify-center h-full",children:(0,b.jsx)(h.Loader2,{className:"size-6 animate-spin text-muted-foreground"})}),children:(0,b.jsx)(y,{})})}a.s(["default",()=>z],908810)}];
2
2
 
3
3
  //# sourceMappingURL=web_src_app_%28main%29_page_tsx_5ac4794b._.js.map