constellai 0.3.0 → 0.3.1

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 (239) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-path-routes-manifest.json +1 -1
  3. package/.next/build-manifest.json +2 -2
  4. package/.next/prerender-manifest.json +3 -3
  5. package/.next/server/app/(app)/activity/page.js +1 -1
  6. package/.next/server/app/(app)/activity/page.js.nft.json +1 -1
  7. package/.next/server/app/(app)/activity/page_client-reference-manifest.js +1 -1
  8. package/.next/server/app/(app)/agents/[handle]/page.js +2 -2
  9. package/.next/server/app/(app)/agents/[handle]/page.js.nft.json +1 -1
  10. package/.next/server/app/(app)/agents/[handle]/page_client-reference-manifest.js +1 -1
  11. package/.next/server/app/(app)/code/page.js +2 -2
  12. package/.next/server/app/(app)/code/page.js.nft.json +1 -1
  13. package/.next/server/app/(app)/code/page_client-reference-manifest.js +1 -1
  14. package/.next/server/app/(app)/config/page.js +2 -2
  15. package/.next/server/app/(app)/config/page.js.nft.json +1 -1
  16. package/.next/server/app/(app)/config/page_client-reference-manifest.js +1 -1
  17. package/.next/server/app/(app)/costs/page.js +2 -2
  18. package/.next/server/app/(app)/costs/page.js.nft.json +1 -1
  19. package/.next/server/app/(app)/costs/page_client-reference-manifest.js +1 -1
  20. package/.next/server/app/(app)/cron/page.js +1 -1
  21. package/.next/server/app/(app)/cron/page.js.nft.json +1 -1
  22. package/.next/server/app/(app)/cron/page_client-reference-manifest.js +1 -1
  23. package/.next/server/app/(app)/dashboard/page.js +2 -2
  24. package/.next/server/app/(app)/dashboard/page.js.nft.json +1 -1
  25. package/.next/server/app/(app)/dashboard/page_client-reference-manifest.js +1 -1
  26. package/.next/server/app/(app)/design/page.js +12 -12
  27. package/.next/server/app/(app)/design/page.js.nft.json +1 -1
  28. package/.next/server/app/(app)/design/page_client-reference-manifest.js +1 -1
  29. package/.next/server/app/(app)/docs/[id]/page.js +2 -2
  30. package/.next/server/app/(app)/docs/[id]/page.js.nft.json +1 -1
  31. package/.next/server/app/(app)/docs/[id]/page_client-reference-manifest.js +1 -1
  32. package/.next/server/app/(app)/docs/page.js +2 -2
  33. package/.next/server/app/(app)/docs/page.js.nft.json +1 -1
  34. package/.next/server/app/(app)/docs/page_client-reference-manifest.js +1 -1
  35. package/.next/server/app/(app)/github/page.js +2 -2
  36. package/.next/server/app/(app)/github/page.js.nft.json +1 -1
  37. package/.next/server/app/(app)/github/page_client-reference-manifest.js +1 -1
  38. package/.next/server/app/(app)/goals/page.js +2 -2
  39. package/.next/server/app/(app)/goals/page.js.nft.json +1 -1
  40. package/.next/server/app/(app)/goals/page_client-reference-manifest.js +1 -1
  41. package/.next/server/app/(app)/inbox/page.js +2 -2
  42. package/.next/server/app/(app)/inbox/page.js.nft.json +1 -1
  43. package/.next/server/app/(app)/inbox/page_client-reference-manifest.js +1 -1
  44. package/.next/server/app/(app)/knowledge/page.js +3 -3
  45. package/.next/server/app/(app)/knowledge/page.js.nft.json +1 -1
  46. package/.next/server/app/(app)/knowledge/page_client-reference-manifest.js +1 -1
  47. package/.next/server/app/(app)/models/page.js +2 -2
  48. package/.next/server/app/(app)/models/page.js.nft.json +1 -1
  49. package/.next/server/app/(app)/models/page_client-reference-manifest.js +1 -1
  50. package/.next/server/app/(app)/notifications/page.js +2 -2
  51. package/.next/server/app/(app)/notifications/page.js.nft.json +1 -1
  52. package/.next/server/app/(app)/notifications/page_client-reference-manifest.js +1 -1
  53. package/.next/server/app/(app)/org/page.js +4 -4
  54. package/.next/server/app/(app)/org/page.js.nft.json +1 -1
  55. package/.next/server/app/(app)/org/page_client-reference-manifest.js +1 -1
  56. package/.next/server/app/(app)/organizations/page.js +2 -2
  57. package/.next/server/app/(app)/organizations/page.js.nft.json +1 -1
  58. package/.next/server/app/(app)/organizations/page_client-reference-manifest.js +1 -1
  59. package/.next/server/app/(app)/page.js +3 -3
  60. package/.next/server/app/(app)/page.js.nft.json +1 -1
  61. package/.next/server/app/(app)/page_client-reference-manifest.js +1 -1
  62. package/.next/server/app/(app)/planner/page.js +2 -2
  63. package/.next/server/app/(app)/planner/page.js.nft.json +1 -1
  64. package/.next/server/app/(app)/planner/page_client-reference-manifest.js +1 -1
  65. package/.next/server/app/(app)/plugins/page.js +2 -2
  66. package/.next/server/app/(app)/plugins/page.js.nft.json +1 -1
  67. package/.next/server/app/(app)/plugins/page_client-reference-manifest.js +1 -1
  68. package/.next/server/app/(app)/pm/page.js +2 -2
  69. package/.next/server/app/(app)/pm/page.js.nft.json +1 -1
  70. package/.next/server/app/(app)/pm/page_client-reference-manifest.js +1 -1
  71. package/.next/server/app/(app)/prepare-deploy/page.js +3 -3
  72. package/.next/server/app/(app)/prepare-deploy/page.js.nft.json +1 -1
  73. package/.next/server/app/(app)/prepare-deploy/page_client-reference-manifest.js +1 -1
  74. package/.next/server/app/(app)/profile/page.js +2 -2
  75. package/.next/server/app/(app)/profile/page.js.nft.json +1 -1
  76. package/.next/server/app/(app)/profile/page_client-reference-manifest.js +1 -1
  77. package/.next/server/app/(app)/pulse/page.js +2 -2
  78. package/.next/server/app/(app)/pulse/page.js.nft.json +1 -1
  79. package/.next/server/app/(app)/pulse/page_client-reference-manifest.js +1 -1
  80. package/.next/server/app/(app)/reports/[id]/page.js +2 -2
  81. package/.next/server/app/(app)/reports/[id]/page.js.nft.json +1 -1
  82. package/.next/server/app/(app)/reports/[id]/page_client-reference-manifest.js +1 -1
  83. package/.next/server/app/(app)/reports/page.js +2 -2
  84. package/.next/server/app/(app)/reports/page.js.nft.json +1 -1
  85. package/.next/server/app/(app)/reports/page_client-reference-manifest.js +1 -1
  86. package/.next/server/app/(app)/routines/page.js +2 -2
  87. package/.next/server/app/(app)/routines/page.js.nft.json +1 -1
  88. package/.next/server/app/(app)/routines/page_client-reference-manifest.js +1 -1
  89. package/.next/server/app/(app)/search/page.js +2 -2
  90. package/.next/server/app/(app)/search/page.js.nft.json +1 -1
  91. package/.next/server/app/(app)/search/page_client-reference-manifest.js +1 -1
  92. package/.next/server/app/(app)/security/page.js +2 -2
  93. package/.next/server/app/(app)/security/page.js.nft.json +1 -1
  94. package/.next/server/app/(app)/security/page_client-reference-manifest.js +1 -1
  95. package/.next/server/app/(app)/skills/page.js +2 -2
  96. package/.next/server/app/(app)/skills/page.js.nft.json +1 -1
  97. package/.next/server/app/(app)/skills/page_client-reference-manifest.js +1 -1
  98. package/.next/server/app/(app)/tasks/page.js +2 -2
  99. package/.next/server/app/(app)/tasks/page.js.nft.json +1 -1
  100. package/.next/server/app/(app)/tasks/page_client-reference-manifest.js +1 -1
  101. package/.next/server/app/(app)/test-dev/page.js +2 -2
  102. package/.next/server/app/(app)/test-dev/page.js.nft.json +1 -1
  103. package/.next/server/app/(app)/test-dev/page_client-reference-manifest.js +1 -1
  104. package/.next/server/app/(app)/update/page.js +2 -2
  105. package/.next/server/app/(app)/update/page.js.nft.json +1 -1
  106. package/.next/server/app/(app)/update/page_client-reference-manifest.js +1 -1
  107. package/.next/server/app/(auth)/login/page.js +2 -2
  108. package/.next/server/app/(auth)/login/page_client-reference-manifest.js +1 -1
  109. package/.next/server/app/(auth)/onboarding/page.js +1 -1
  110. package/.next/server/app/(auth)/onboarding/page_client-reference-manifest.js +1 -1
  111. package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  112. package/.next/server/app/_global-error.html +1 -1
  113. package/.next/server/app/_global-error.rsc +1 -1
  114. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  115. package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  116. package/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  117. package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  118. package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  119. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  120. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  121. package/.next/server/app/api/cron/tick/route.js +2 -2
  122. package/.next/server/app/api/sync/file/route.js +2 -2
  123. package/.next/server/app/api/telegram/poll/route.js +3 -3
  124. package/.next/server/app/api/v1/[[...path]]/route.js +1 -1
  125. package/.next/server/app-paths-manifest.json +1 -1
  126. package/.next/server/chunks/1249.js +6 -6
  127. package/.next/server/chunks/259.js +1 -1
  128. package/.next/server/chunks/2867.js +1 -1
  129. package/.next/server/chunks/2873.js +1 -0
  130. package/.next/server/chunks/2960.js +1 -1
  131. package/.next/server/chunks/{7976.js → 3076.js} +1 -1
  132. package/.next/server/chunks/3234.js +1 -1
  133. package/.next/server/chunks/467.js +21 -0
  134. package/.next/server/chunks/4979.js +2 -2
  135. package/.next/server/chunks/5097.js +4 -0
  136. package/.next/server/chunks/6431.js +1 -1
  137. package/.next/server/chunks/{3882.js → 6606.js} +13 -13
  138. package/.next/server/chunks/7589.js +1 -1
  139. package/.next/server/chunks/7989.js +1 -1
  140. package/.next/server/chunks/{2939.js → 8544.js} +2 -2
  141. package/.next/server/chunks/8561.js +1 -1
  142. package/.next/server/chunks/8823.js +1 -1
  143. package/.next/server/chunks/896.js +1 -0
  144. package/.next/server/chunks/9783.js +1 -1
  145. package/.next/server/middleware-build-manifest.js +1 -1
  146. package/.next/server/pages/500.html +1 -1
  147. package/.next/server/server-reference-manifest.js +1 -1
  148. package/.next/server/server-reference-manifest.json +1 -1
  149. package/.next/static/chunks/2458-a02b9ba3fbf5a4aa.js +1 -0
  150. package/.next/static/chunks/3448-3ebb2581741d6552.js +1 -0
  151. package/.next/static/chunks/{8370-db3280cb1ba67bcd.js → 8370-4306eb227fde422e.js} +2 -2
  152. package/.next/static/chunks/8959-2456e03da35f9879.js +1 -0
  153. package/.next/static/chunks/9512-a0f7aae0722248da.js +4 -0
  154. package/.next/static/chunks/app/(app)/activity/{page-f06add40c3785686.js → page-b4f7b6850a427aa9.js} +1 -1
  155. package/.next/static/chunks/app/(app)/agents/[handle]/page-8f3582f06b659fbd.js +1 -0
  156. package/.next/static/chunks/app/(app)/code/page-629706b6872eb74c.js +1 -0
  157. package/.next/static/chunks/app/(app)/config/page-502173fb21b78d88.js +1 -0
  158. package/.next/static/chunks/app/(app)/costs/page-60c884ab3d917cba.js +1 -0
  159. package/.next/static/chunks/app/(app)/cron/page-23924d673b353117.js +1 -0
  160. package/.next/static/chunks/app/(app)/dashboard/page-325f833279658e69.js +1 -0
  161. package/.next/static/chunks/app/(app)/design/{page-e0fd071fb7144c46.js → page-410e5f6f08882c19.js} +3 -3
  162. package/.next/static/chunks/app/(app)/docs/[id]/page-d8ef563c662c9c34.js +1 -0
  163. package/.next/static/chunks/app/(app)/docs/page-8cd228461c719430.js +1 -0
  164. package/.next/static/chunks/app/(app)/github/page-9617cd18258e00da.js +1 -0
  165. package/.next/static/chunks/app/(app)/goals/page-e2a13b8a62db3a6c.js +1 -0
  166. package/.next/static/chunks/app/(app)/inbox/page-57759eb7889a5aa6.js +12 -0
  167. package/.next/static/chunks/app/(app)/knowledge/page-1e7da0e09c954bb7.js +1 -0
  168. package/.next/static/chunks/app/(app)/layout-f5678dc87a3ce366.js +1 -0
  169. package/.next/static/chunks/app/(app)/models/page-6e3a57c08eca441a.js +1 -0
  170. package/.next/static/chunks/app/(app)/notifications/page-cbb438455126086b.js +12 -0
  171. package/.next/static/chunks/app/(app)/org/page-e8831367a1382eb3.js +12 -0
  172. package/.next/static/chunks/app/(app)/organizations/page-e41ed5fba9cbb700.js +1 -0
  173. package/.next/static/chunks/app/(app)/page-2c4c2724bd2b99b7.js +1 -0
  174. package/.next/static/chunks/app/(app)/planner/page-7c5448444950f6e0.js +1 -0
  175. package/.next/static/chunks/app/(app)/plugins/{page-454613b9f5cb1d3d.js → page-2ffa3fd55dbbb32d.js} +1 -1
  176. package/.next/static/chunks/app/(app)/pm/page-ed5ceba076b889f8.js +1 -0
  177. package/.next/static/chunks/app/(app)/prepare-deploy/page-a6ed9a2756c5ed5e.js +1 -0
  178. package/.next/static/chunks/app/(app)/profile/page-43de355af3d9dc28.js +1 -0
  179. package/.next/static/chunks/app/(app)/pulse/page-dd0db1606004d1cd.js +1 -0
  180. package/.next/static/chunks/app/(app)/reports/[id]/page-23924d673b353117.js +1 -0
  181. package/.next/static/chunks/app/(app)/reports/{page-de1e69ca09d7cabb.js → page-a700f5a3c51fd8b2.js} +1 -1
  182. package/.next/static/chunks/app/(app)/routines/page-1a24a2e021239bb1.js +1 -0
  183. package/.next/static/chunks/app/(app)/search/page-71d3db75f945ae4d.js +1 -0
  184. package/.next/static/chunks/app/(app)/security/page-bc83e0eeeaa06803.js +1 -0
  185. package/.next/static/chunks/app/(app)/skills/page-7b9d25eefde42c62.js +1 -0
  186. package/.next/static/chunks/app/(app)/tasks/page-49e04347c03ad380.js +1 -0
  187. package/.next/static/chunks/app/(app)/test-dev/page-5a5787dff721c528.js +1 -0
  188. package/.next/static/chunks/app/(app)/update/page-711cca7457171762.js +1 -0
  189. package/.next/static/chunks/app/(auth)/login/page-c4942e3f5c363aee.js +1 -0
  190. package/.next/static/chunks/app/(auth)/onboarding/page-fccc9edc6c250f2f.js +1 -0
  191. package/.next/trace-build +1 -1
  192. package/CHANGELOG.md +3 -0
  193. package/bin/constella.mjs +7 -6
  194. package/docs/en/TROUBLESHOOTING.md +2 -0
  195. package/docs/pt/TROUBLESHOOTING.md +2 -0
  196. package/package.json +4 -3
  197. package/.next/server/chunks/3440.js +0 -1
  198. package/.next/server/chunks/5181.js +0 -1
  199. package/.next/server/chunks/834.js +0 -4
  200. package/.next/server/chunks/9459.js +0 -21
  201. package/.next/static/chunks/2237-2a30470119df8616.js +0 -1
  202. package/.next/static/chunks/7268-ac23e9901bf535af.js +0 -4
  203. package/.next/static/chunks/9846-c853e71d4d8fbb80.js +0 -1
  204. package/.next/static/chunks/9950-703805abe4653068.js +0 -1
  205. package/.next/static/chunks/app/(app)/agents/[handle]/page-2ddf1f9908c73eb1.js +0 -1
  206. package/.next/static/chunks/app/(app)/code/page-ef9dceeae728b9d1.js +0 -1
  207. package/.next/static/chunks/app/(app)/config/page-496e569efd86e75c.js +0 -1
  208. package/.next/static/chunks/app/(app)/costs/page-675f542fdd517bee.js +0 -1
  209. package/.next/static/chunks/app/(app)/cron/page-80a87a05492c0ffe.js +0 -1
  210. package/.next/static/chunks/app/(app)/dashboard/page-4bddca6808a3be40.js +0 -1
  211. package/.next/static/chunks/app/(app)/docs/[id]/page-f05e389793127500.js +0 -1
  212. package/.next/static/chunks/app/(app)/docs/page-f6bbf5c6b9104cbe.js +0 -1
  213. package/.next/static/chunks/app/(app)/github/page-5297c806ce6afa9b.js +0 -1
  214. package/.next/static/chunks/app/(app)/goals/page-3fa53e8541c8e9fc.js +0 -1
  215. package/.next/static/chunks/app/(app)/inbox/page-a2a74b5f6a6c326e.js +0 -12
  216. package/.next/static/chunks/app/(app)/knowledge/page-fb11b2bfa9ecd9a4.js +0 -1
  217. package/.next/static/chunks/app/(app)/layout-b74cd565406964d5.js +0 -1
  218. package/.next/static/chunks/app/(app)/models/page-c8acfc3d353fd9d0.js +0 -1
  219. package/.next/static/chunks/app/(app)/notifications/page-05a094d02d23f455.js +0 -12
  220. package/.next/static/chunks/app/(app)/org/page-883d6aa98b593c6b.js +0 -12
  221. package/.next/static/chunks/app/(app)/organizations/page-4595e8fa86ca3c01.js +0 -1
  222. package/.next/static/chunks/app/(app)/page-21d47e76fe9a6c63.js +0 -1
  223. package/.next/static/chunks/app/(app)/planner/page-1fc32005d05bbe69.js +0 -1
  224. package/.next/static/chunks/app/(app)/pm/page-8473da305f4c2880.js +0 -1
  225. package/.next/static/chunks/app/(app)/prepare-deploy/page-3ba948f5557dea38.js +0 -1
  226. package/.next/static/chunks/app/(app)/profile/page-05f25516fea20762.js +0 -1
  227. package/.next/static/chunks/app/(app)/pulse/page-540a80dbaf61453d.js +0 -1
  228. package/.next/static/chunks/app/(app)/reports/[id]/page-80a87a05492c0ffe.js +0 -1
  229. package/.next/static/chunks/app/(app)/routines/page-83085c9ba3584ec9.js +0 -1
  230. package/.next/static/chunks/app/(app)/search/page-8769fd9075e21e36.js +0 -1
  231. package/.next/static/chunks/app/(app)/security/page-1baa88dc61c3fab8.js +0 -1
  232. package/.next/static/chunks/app/(app)/skills/page-fa75c290b456c629.js +0 -1
  233. package/.next/static/chunks/app/(app)/tasks/page-1eb62689244c8a79.js +0 -1
  234. package/.next/static/chunks/app/(app)/test-dev/page-c496b31087389906.js +0 -1
  235. package/.next/static/chunks/app/(app)/update/page-5a217e6479bc5289.js +0 -1
  236. package/.next/static/chunks/app/(auth)/login/page-ad50e3112f35f41c.js +0 -1
  237. package/.next/static/chunks/app/(auth)/onboarding/page-ab05f02e868c9eec.js +0 -1
  238. /package/.next/static/{T0ETI55t9tc9pi5i_CGOe → Ri83ondUvcbIqZUDGJAn8}/_buildManifest.js +0 -0
  239. /package/.next/static/{T0ETI55t9tc9pi5i_CGOe → Ri83ondUvcbIqZUDGJAn8}/_ssgManifest.js +0 -0
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7789],{735:(e,a,l)=>{"use strict";l.d(a,{E:()=>t});var s=l(7814);let t=(0,s.createServerReference)("40937ee47e4c7becfa255d0da60d81ee3e8eac1337",s.callServer,void 0,s.findSourceMapURL,"listProviderModels")},3728:(e,a,l)=>{"use strict";l.d(a,{m:()=>o});var s=l(5076),t=l(8488),n=l(8576),i=l(9265),r=l(5629);function o({value:e,options:a,onChange:l,placeholder:c,mono:d,glyph:m,disabled:u,searchable:p}){let g=(0,r.k)(),[h,v]=(0,t.useState)(!1),[x,f]=(0,t.useState)(""),b=(0,t.useRef)(null),j=(0,t.useRef)(null),k=(0,t.useMemo)(()=>(a||[]).map(e=>"string"==typeof e?{value:e,label:e}:e),[a]),y=k.find(a=>a.value===e),N=(p??k.length>8)&&!u,S=x.trim().toLowerCase(),C=N&&S?k.filter(e=>(e.label+" "+e.value+" "+(e.sub||"")).toLowerCase().includes(S)):k;return(0,t.useEffect)(()=>{if(!h)return void f("");function e(e){b.current&&!b.current.contains(e.target)&&v(!1)}function a(e){"Escape"===e.key&&v(!1)}return document.addEventListener("mousedown",e),document.addEventListener("keydown",a),N&&requestAnimationFrame(()=>j.current?.focus()),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",a)}},[h,N]),(0,s.jsxs)("div",{className:"dd"+(h?" open":"")+(u?" disabled":""),ref:b,children:[(0,s.jsxs)("button",{type:"button",className:"dd-btn"+(d?" mono":""),onClick:()=>!u&&v(e=>!e),children:[m&&y&&(0,s.jsx)(i.W,{id:y.glyphId||y.value,size:20}),(0,s.jsx)("span",{className:"dd-val",children:y?y.label:(0,s.jsx)("span",{className:"dd-ph",children:c||g("common.selectEllipsis")})}),(0,s.jsx)(n.I,{name:"chevronDown",size:14})]}),h&&(0,s.jsxs)("div",{className:"dd-menu scroll",children:[N&&(0,s.jsxs)("div",{style:{position:"sticky",top:0,zIndex:1,display:"flex",alignItems:"center",gap:6,padding:"6px 8px",margin:"-4px -4px 4px",background:"var(--bg-elev, var(--bg-active))",borderBottom:"1px solid var(--border)"},children:[(0,s.jsx)(n.I,{name:"search",size:13}),(0,s.jsx)("input",{ref:j,value:x,placeholder:g("common.searchEllipsis"),onChange:e=>f(e.target.value),onKeyDown:e=>{"Enter"===e.key&&C[0]?(l(C[0].value),v(!1)):"Escape"===e.key&&x&&(e.stopPropagation(),f(""))},className:d?"mono":void 0,style:{flex:1,minWidth:0,background:"transparent",border:"none",outline:"none",color:"var(--text)",fontSize:12.5,fontFamily:d?"var(--mono-font)":"inherit"}}),x&&(0,s.jsx)("button",{type:"button",title:g("common.clear"),onClick:()=>{f(""),j.current?.focus()},style:{background:"none",border:"none",color:"var(--text-dim)",cursor:"pointer",display:"flex",padding:0},children:(0,s.jsx)(n.I,{name:"close",size:12})})]}),0===k.length&&(0,s.jsx)("div",{className:"dd-empty",children:g("common.noOptions")}),k.length>0&&0===C.length&&(0,s.jsx)("div",{className:"dd-empty",children:g("dropdown.noMatch",{q:x})}),C.map(a=>(0,s.jsxs)("button",{type:"button",className:"dd-opt"+(a.value===e?" on":""),onClick:()=>{l(a.value),v(!1)},children:[m&&(0,s.jsx)(i.W,{id:a.glyphId||a.value,size:22}),(0,s.jsxs)("span",{className:"dd-opt-main",children:[(0,s.jsx)("span",{className:"dd-opt-label"+(d?" mono":""),children:a.label}),a.sub&&(0,s.jsx)("span",{className:"dd-opt-sub",children:a.sub})]}),a.tag&&(0,s.jsx)("span",{className:"dd-opt-tag",children:a.tag}),a.value===e&&(0,s.jsx)(n.I,{name:"check",size:13})]},a.value))]})]})}},4403:(e,a,l)=>{"use strict";l.d(a,{Y:()=>m});var s=l(5076),t=l(8488),n=l(3728),i=l(5629);let r={cli_claude_code:[{value:"opus",label:"Claude Opus \xb7 most capable"},{value:"sonnet",label:"Claude Sonnet \xb7 balanced"},{value:"haiku",label:"Claude Haiku \xb7 fast"}],cli_codex:[{value:"gpt-5-codex",label:"GPT-5 Codex"},{value:"o4-mini",label:"o4-mini"}],cli_gemini:[{value:"gemini-2.5-pro",label:"Gemini 2.5 Pro"},{value:"gemini-2.5-flash",label:"Gemini 2.5 Flash"}],cli_openclaw:[{value:"(default)",label:"Configured default"},{value:"openai/gpt-5.4",label:"OpenAI \xb7 GPT-5.4"},{value:"anthropic/claude-sonnet-4",label:"Anthropic \xb7 Claude Sonnet 4"}],cli_hermes:[{value:"(default)",label:"Configured default"},{value:"anthropic/claude-sonnet-4.6",label:"Anthropic \xb7 Claude Sonnet 4.6"},{value:"openai/gpt-5.5",label:"OpenAI \xb7 GPT-5.5"}],cli_aider:[{value:"(default)",label:"Configured default"},{value:"anthropic/claude-sonnet-4-6",label:"Anthropic \xb7 Claude Sonnet 4.6"},{value:"openai/gpt-5.2",label:"OpenAI \xb7 GPT-5.2"},{value:"deepseek/deepseek-chat",label:"DeepSeek \xb7 Chat"}],cli_opencode:[{value:"(default)",label:"Configured default"},{value:"anthropic/claude-sonnet-4-6",label:"Anthropic \xb7 Claude Sonnet 4.6"},{value:"openai/gpt-5.2",label:"OpenAI \xb7 GPT-5.2"}],cli_copilot:[{value:"(default)",label:"Configured default"},{value:"claude-sonnet-4.5",label:"Claude Sonnet 4.5"},{value:"gpt-5",label:"GPT-5"}],cli_cursor:[{value:"(default)",label:"Configured default"},{value:"claude-4.5-sonnet",label:"Claude Sonnet 4.5"},{value:"gpt-5",label:"GPT-5"}],cli_cline:[{value:"(default)",label:"Configured default"}],cli_kilo:[{value:"(default)",label:"Configured default"}]};var o=l(6517),c=l(8524),d=l(735);function m({adapter:e,value:a,onChange:l,providers:u}){let p=(0,i.k)(),g=function(e){let a=r[e]??null;if(!a)return null;let l=(0,o.L2)(e);return l?a.map(e=>{let a=l.find(a=>a.id===e.value);return a?{value:e.value,label:`${a.label} ${a.version}${a.note?" \xb7 "+a.note:""}`}:e}):a}(e),h=e.startsWith("local_"),[v,x]=(0,t.useState)(null),[f,b]=(0,t.useState)(""),j=u.find(a=>a.adapter===e);(0,t.useEffect)(()=>{if(g||h||!j){x(null),b(g||h?"":p("modelpicker.connectProvider"));return}let e=!0;return b(p("modelpicker.loading")),(0,c.A)(j.id).then(async({models:s})=>{if(!e)return;if(s.length){if(x(s.map(e=>{let a;return{value:e.id,label:e.name+(a=[],e.context&&a.push(e.context>=1e6?`${(e.context/1e6).toFixed(e.context%1e6?1:0)}M ctx`:`${Math.round(e.context/1e3)}K ctx`),(e.inputCost||e.outputCost)&&a.push(`$${e.inputCost}/${e.outputCost}`),a.length?" \xb7 "+a.join(" \xb7 "):"")+(e.isDefault?" \xb7 "+p("modelpicker.recommended"):"")}})),b(""),!a){let e=s.find(e=>e.isDefault)??s[0];e&&l(e.id)}return}let t=await (0,d.E)(j.id);e&&(x(t.models.map(e=>({value:e,label:e}))),b(t.error?t.error:t.models.length?p("modelpicker.syncProvider"):p("modelpicker.noModels")))}).catch(()=>{e&&(x([]),b(p("modelpicker.loadError")))}),()=>{e=!1}},[e,j?.id,!!g,h]);let k=h?[{value:a||"local",label:p("modelpicker.localGguf")}]:null,y=g??k??v??(a?[{value:a,label:a}]:[]),N=a&&!y.some(e=>e.value===a)?[{value:a,label:a},...y]:y;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.m,{mono:!0,value:a,options:N,placeholder:p("modelpicker.placeholder"),onChange:l}),f&&(0,s.jsx)("div",{className:"form-hint",style:{marginTop:4},children:f})]})}},4552:(e,a,l)=>{"use strict";l.d(a,{e:()=>t});var s=l(5076);function t({name:e,color:a,size:l=24,health:n,image:i}){let r=Math.max(6,Math.round(.3*l)),o=Math.round(.28*l),c=i?/^(data:|https?:|\/)/.test(i)?i:`/api/upload?path=${encodeURIComponent(i)}`:null;return(0,s.jsxs)("span",{style:{position:"relative",width:l,height:l,flex:`0 0 ${l}px`,display:"inline-block"},children:[c?(0,s.jsx)("img",{src:c,alt:e,width:l,height:l,style:{width:l,height:l,borderRadius:o,objectFit:"cover",display:"block"}}):(0,s.jsx)("span",{style:{width:l,height:l,borderRadius:o,background:a,color:"#fff",display:"grid",placeItems:"center",fontSize:Math.round(.42*l),fontWeight:700},children:(e[0]||"?").toUpperCase()}),n&&(0,s.jsx)("span",{style:{position:"absolute",right:-1,bottom:-1,width:r,height:r,borderRadius:"50%",background:"alive"===n?"var(--sx-string)":"stale"===n?"var(--sx-number)":"var(--text-faint)",border:"1.5px solid var(--bg-elevated)"}})]})}},4934:(e,a,l)=>{"use strict";l.d(a,{j:()=>t});var s=l(7814);let t=(0,s.createServerReference)("40f4ef6ab0dc6a852c2184ca12f9a0aabddf636882",s.callServer,void 0,s.findSourceMapURL,"pullModel")},5115:(e,a,l)=>{"use strict";l.d(a,{k:()=>t});var s=l(7814);let t=(0,s.createServerReference)("60bd7f16418dc50dc8405ee52f569d6b76466e42c2",s.callServer,void 0,s.findSourceMapURL,"getEvents")},5715:(e,a,l)=>{Promise.resolve().then(l.t.bind(l,3283,23)),Promise.resolve().then(l.bind(l,9286)),Promise.resolve().then(l.bind(l,235)),Promise.resolve().then(l.bind(l,6588)),Promise.resolve().then(l.bind(l,4414)),Promise.resolve().then(l.bind(l,6556)),Promise.resolve().then(l.bind(l,4942)),Promise.resolve().then(l.bind(l,2444)),Promise.resolve().then(l.bind(l,5787))},6517:(e,a,l)=>{"use strict";l.d(a,{L2:()=>t,Ov:()=>n});let s={cli_claude_code:[{id:"opus",label:"Claude Opus",version:"4.8",note:"most capable"},{id:"sonnet",label:"Claude Sonnet",version:"4.6",note:"balanced"},{id:"haiku",label:"Claude Haiku",version:"4.5",note:"fast"}],cli_codex:[{id:"gpt-5-codex",label:"GPT-5 Codex",version:"5"},{id:"o4-mini",label:"o4-mini",version:"o4"}],cli_gemini:[{id:"gemini-2.5-pro",label:"Gemini Pro",version:"2.5"},{id:"gemini-2.5-flash",label:"Gemini Flash",version:"2.5"}],cli_openclaw:[{id:"(default)",label:"OpenClaw",version:"default",note:"configured provider"},{id:"openai/gpt-5.4",label:"GPT",version:"5.4"},{id:"anthropic/claude-sonnet-4",label:"Claude Sonnet",version:"4"}],cli_hermes:[{id:"(default)",label:"Hermes",version:"default",note:"configured provider"},{id:"anthropic/claude-sonnet-4.6",label:"Claude Sonnet",version:"4.6"},{id:"openai/gpt-5.5",label:"GPT",version:"5.5"}],cli_aider:[{id:"(default)",label:"Aider",version:"default",note:"configured provider"},{id:"anthropic/claude-sonnet-4-6",label:"Claude Sonnet",version:"4.6"},{id:"openai/gpt-5.2",label:"GPT",version:"5.2"},{id:"deepseek/deepseek-chat",label:"DeepSeek Chat",version:""}],cli_opencode:[{id:"(default)",label:"OpenCode",version:"default",note:"configured provider"},{id:"anthropic/claude-sonnet-4-6",label:"Claude Sonnet",version:"4.6"},{id:"openai/gpt-5.2",label:"GPT",version:"5.2"}],cli_copilot:[{id:"(default)",label:"Copilot",version:"default",note:"configured provider"},{id:"claude-sonnet-4.5",label:"Claude Sonnet",version:"4.5"},{id:"gpt-5",label:"GPT",version:"5"}],cli_cursor:[{id:"(default)",label:"Cursor",version:"default",note:"configured provider"},{id:"claude-4.5-sonnet",label:"Claude Sonnet",version:"4.5"},{id:"gpt-5",label:"GPT",version:"5"}],cli_cline:[{id:"(default)",label:"Cline",version:"default",note:"configured provider"}],cli_kilo:[{id:"(default)",label:"Kilo Code",version:"default",note:"configured provider"}]};function t(e){return s[e]??null}function n(e){if(!e)return{label:"",version:""};let a=e.match(/(\d+(?:[.\-]\d+){0,2})(?!.*\d)/),l=a?a[1].replace(/-/g,"."):"";return{label:(a?e.slice(0,a.index).replace(/[-_.\s]+$/,""):e).split(/[-_.\s]+/).filter(Boolean).map(e=>/^(gpt|llm|api|ai)$/i.test(e)?e.toUpperCase():e.charAt(0).toUpperCase()+e.slice(1)).join(" ")||e,version:l}}},8006:(e,a,l)=>{"use strict";l.d(a,{n:()=>o});var s=l(5076),t=l(8488),n=l(4552),i=l(8576),r=l(5629);function o({name:e,color:a,image:l,size:c=64,onChange:d}){let m=(0,r.k)(),u=(0,t.useRef)(null),[p,g]=(0,t.useState)(!1),[h,v]=(0,t.useState)(""),[,x]=(0,t.useTransition)();async function f(e){if(e){v(""),g(!0);try{let a=await function(e,a=160){return new Promise((l,s)=>{let t=URL.createObjectURL(e),n=new Image;n.onload=()=>{URL.revokeObjectURL(t);let e=Math.min(1,a/Math.max(n.width,n.height)),i=Math.max(1,Math.round(n.width*e)),r=Math.max(1,Math.round(n.height*e)),o=document.createElement("canvas");o.width=i,o.height=r;let c=o.getContext("2d");if(!c)return void s(Error("canvas unavailable"));c.drawImage(n,0,0,i,r);let d=o.toDataURL("image/webp",.85);d.startsWith("data:image/webp")||(d=o.toDataURL("image/jpeg",.85)),d.length>6e5&&(d=o.toDataURL("image/jpeg",.6)),l(d)},n.onerror=()=>{URL.revokeObjectURL(t),s(Error("invalid image"))},n.src=t})}(e);x(()=>d(a))}catch{v(m("chrome.avatar.processError"))}finally{g(!1),u.current&&(u.current.value="")}}}return(0,s.jsxs)("div",{className:"avatar-upload",children:[(0,s.jsx)(n.e,{name:e,color:a,image:l,size:c}),(0,s.jsxs)("div",{className:"avatar-upload-actions",children:[(0,s.jsxs)("button",{className:"btn-ghost",disabled:p,onClick:()=>u.current?.click(),children:[p?(0,s.jsx)("span",{className:"sync-spin",children:(0,s.jsx)(i.I,{name:"refresh",size:12})}):(0,s.jsx)(i.I,{name:"add",size:12})," ",l?m("chrome.avatar.change"):m("chrome.avatar.upload")]}),h&&(0,s.jsx)("span",{style:{fontSize:11,color:"#e8688f"},children:h}),(0,s.jsx)("input",{ref:u,type:"file",accept:".png,.jpg,.jpeg,.gif,.webp",hidden:!0,onChange:e=>f(e.target.files?.[0])})]})]})}},8524:(e,a,l)=>{"use strict";l.d(a,{A:()=>t});var s=l(7814);let t=(0,s.createServerReference)("407fd030bc32b0b7bf6ab53578958bf02bb1105779",s.callServer,void 0,s.findSourceMapURL,"listCatalogModels")},8604:(e,a,l)=>{"use strict";l.d(a,{k:()=>t});var s=l(7814);let t=(0,s.createServerReference)("605cecd6f7c8c7ec8ac71ece24b285db530ef643ec",s.callServer,void 0,s.findSourceMapURL,"saveAgentModel")},9265:(e,a,l)=>{"use strict";l.d(a,{W:()=>r});var s=l(5076),t=l(8488);let n={anthropic:"anthropic",claude_code:"claude",openai:"openai",codex_cli:"openai",google:"google",google_gemini:"gemini",gemini_cli:"gemini",vertex_ai:"vertexai",mistral:"mistral",deepseek:"deepseek",cohere:"cohere",perplexity:"perplexity",xai_grok:"grok",groq:"groq",ai21:"ai21",nvidia_nim:"nvidia",huggingface:"huggingface",replicate:"replicate",azure_openai:"azure",aws_bedrock:"bedrock",cloudflare:"cloudflare",dashscope:"qwen",zhipu:"zhipu",moonshot:"moonshot",minimax:"minimax",together:"together",openrouter:"openrouter",fireworks:"fireworks",cerebras:"cerebras",ollama:"ollama",ollama_cli:"ollama",lmstudio:"lmstudio",vllm:"vllm",localai:"localai",elevenlabs:"elevenlabs",stability:"stability",jina:"jina",voyage:"voyage"},i={anthropic:["#d97757","An"],openai:["#10a37f","AI"],google_gemini:["#4285f4","G"],google:["#4285f4","G"],mistral:["#fa520f","Mi"],xai_grok:["#1a1a1a","X"],deepseek:["#4d6bfe","DS"],cohere:["#39594d","Co"],ai21:["#e8488a","A2"],perplexity:["#20808d","Px"],groq:["#f55036","Gq"],nvidia_nim:["#76b900","NV"],together:["#0f6fff","To"],fireworks:["#5019c5","Fw"],cerebras:["#f25733","Cb"],huggingface:["#ff9d00","HF"],replicate:["#1a1a1a","Rp"],openrouter:["#6566f1","OR"],litellm:["#00b8a3","LL"],portkey:["#3b5bdb","Pk"],azure_openai:["#0078d4","Az"],aws_bedrock:["#ff9900","Br"],vertex_ai:["#4285f4","Vx"],cloudflare:["#f38020","Cf"],dashscope:["#ff6a00","Qw"],zhipu:["#3859ff","GL"],moonshot:["#16162a","Ki"],minimax:["#e1342c","MM"],ollama:["#0c0c0c","Ol"],llamacpp:["#7a4ddb","Lc"],lmstudio:["#4a5cff","LM"],vllm:["#1668dc","vL"],localai:["#2e7d32","La"],gpt4all:["#5b6cff","G4"],jan:["#1a1a1a","Jn"],claude_code:["#d97757","CC"],codex_cli:["#10a37f","Cx"],gemini_cli:["#4285f4","Gc"],aider:["#14b8a6","Ad"],ollama_cli:["#0c0c0c","Oc"],openclaw:["#e8590c","OC"],hermes_cli:["#6d28d9","Hm"],opencode:["#1a1a1a","Oc"],copilot_cli:["#1f2328","Co"],cursor_cli:["#1a1a1a","Cu"],cline_cli:["#2563eb","Cl"],kilo_code:["#7c3aed","Ki"],voyage:["#5b21b6","Vo"],jina:["#ec4899","Ji"],stability:["#a855f7","St"],elevenlabs:["#1a1a1a","El"]};function r({id:e,size:a=34,radius:l}){let o,c=i[e],d=c?c[0]:"#5b6378",m=c?c[1]:(e||"?").slice(0,2).replace(/[^a-z0-9]/gi,"").toUpperCase(),u=(o=n[e])?`https://cdn.jsdelivr.net/npm/@lobehub/icons-static-svg/icons/${o}.svg`:null,[p,g]=(0,t.useState)(!1),h=null!=l?l:Math.round(.28*a),v=u&&!p,x=Math.round(.66*a);return(0,s.jsx)("span",{className:"prov-glyph",style:{width:a,height:a,flex:"0 0 "+a+"px",borderRadius:h,background:v?"#fff":"linear-gradient(150deg, "+d+", color-mix(in srgb, "+d+" 70%, #000))",color:"#fff",display:"grid",placeItems:"center",overflow:"hidden",fontSize:Math.round(.4*a),fontWeight:800,letterSpacing:"-.5px",boxShadow:v?"inset 0 0 0 1px rgba(0,0,0,.08)":"inset 0 1px 0 rgba(255,255,255,.18)"},children:v?(0,s.jsx)("img",{src:u,alt:"",width:x,height:x,loading:"lazy",onError:()=>g(!0),style:{width:x,height:x,objectFit:"contain",display:"block"}}):m})}},9286:(e,a,l)=>{"use strict";l.d(a,{AgentStudioDetail:()=>I});var s=l(5076),t=l(8488),n=l(8604),i=l(7814);let r=(0,i.createServerReference)("607a90e0b3c479694490944c61d84cc864bfec86bb",i.callServer,void 0,i.findSourceMapURL,"saveAgentPersona"),o=(0,i.createServerReference)("60e60101dcc8334633f85eec1030b7df22647ade76",i.callServer,void 0,i.findSourceMapURL,"saveAgentRag"),c=(0,i.createServerReference)("60ea1b9ebacdc783833a397e252ecf7b4e82c16130",i.callServer,void 0,i.findSourceMapURL,"saveAgentImage");var d=l(8006);let m=(0,i.createServerReference)("7028049fb9ad8688f47576e220ab51e9732377db1b",i.callServer,void 0,i.findSourceMapURL,"toggleAgentSkill"),u=(0,i.createServerReference)("601a2bd6b84a02b81cef7b4671f132f5515f8f65b2",i.callServer,void 0,i.findSourceMapURL,"setAllAgentSkills");var p=l(4934),g=l(5115),h=l(8576),v=l(3728),x=l(4403),f=l(5629);let b=["read","create","edit","run","search"];function j({agentId:e}){let a=(0,f.k)(),[l,n]=(0,t.useState)([]),i=(0,t.useRef)(0);if((0,t.useEffect)(()=>{let a=!0;async function l(){let l=await (0,g.k)("room",i.current);if(!a)return;l.length&&(i.current=Math.max(i.current,...l.map(e=>e.seq)));let s=l.filter(a=>a.agentId===e);s.length&&n(e=>{let a=new Set(e.map(e=>e.id));return[...e,...s.filter(e=>!a.has(e.id))]})}l();let s=setInterval(l,1500);return()=>{a=!1,clearInterval(s)}},[e]),0===l.length)return null;let r=[...new Set(l.map(e=>e.runId))],o=r[r.length-1],c=l.filter(e=>e.runId===o&&b.includes(e.kind));return 0===c.length?null:(0,s.jsxs)("div",{className:"card",style:{marginBottom:14,borderColor:"var(--accent)"},children:[(0,s.jsxs)("div",{className:"set-desc",style:{marginBottom:8,display:"flex",alignItems:"center",gap:6},children:[(0,s.jsx)("span",{className:"spin",children:(0,s.jsx)(h.I,{name:"refresh",size:12})})," ",a("agent.wf.liveRun",{n:c.length})]}),c.map(e=>(0,s.jsxs)("div",{className:"live-step",children:[(0,s.jsx)("span",{className:"ls-ico",style:{color:"var(--accent)",fontFamily:"var(--mono-font)",fontSize:11},children:b.includes(e.kind)?a(`agent.wf.${e.kind}`):e.kind})," ",e.target]},e.id))]})}let k=["model","skills","persona","rag","workflow"],y=e=>"$"+e.toFixed(2);function N({value:e,onChange:a}){let l=(0,f.k)(),t=l(e<=.3?"agent.temp.precise":e<=.6?"agent.temp.balanced":e<=.85?"agent.temp.creative":"agent.temp.exploratory");return(0,s.jsxs)("div",{className:"temp-wrap",children:[(0,s.jsxs)("div",{className:"temp-head",children:[(0,s.jsx)("label",{className:"form-label",style:{margin:0},children:l("agent.temp.label")}),(0,s.jsxs)("span",{className:"temp-val",children:[e.toFixed(2)," \xb7 ",t]})]}),(0,s.jsx)("input",{type:"range",className:"temp-range",min:0,max:1,step:.05,value:e,onChange:e=>a(+e.target.value)}),(0,s.jsxs)("div",{className:"temp-scale",children:[(0,s.jsx)("span",{children:l("agent.temp.scaleFocused")}),(0,s.jsx)("span",{children:"0.5"}),(0,s.jsx)("span",{children:l("agent.temp.scaleCreative")})]}),(0,s.jsxs)("div",{className:"temp-desc",children:[(0,s.jsx)("span",{className:"ti",children:(0,s.jsx)(h.I,{name:"bot",size:12})})," ",l("agent.temp.desc")]})]})}function S({spent:e,cap:a}){let l,t,n=(0,f.k)(),{pct:i,level:r,color:o}=(t=(l=a>0?Math.min(100,e/a*100):0)>=90?"crit":l>=70?"warn":"ok",{pct:l,level:t,color:"crit"===t?"var(--sx-keyword)":"warn"===t?"var(--sx-number)":"var(--sx-string)"}),c=n("crit"===r?"agent.budget.noteCrit":"warn"===r?"agent.budget.noteWarn":"agent.budget.noteOk");return(0,s.jsxs)("div",{className:"budget",children:[(0,s.jsxs)("div",{className:"budget-top",children:[(0,s.jsx)("span",{className:"budget-spent",children:y(e)}),(0,s.jsx)("span",{className:"budget-cap",children:n("agent.budget.dailyCap",{cap:y(a)})}),(0,s.jsxs)("span",{className:"budget-pct",style:{background:o+"22",color:o},children:[Math.round(i),"%"]})]}),(0,s.jsx)("div",{className:"budget-track",children:(0,s.jsx)("div",{className:"budget-fill",style:{width:i+"%",background:o}})}),(0,s.jsxs)("div",{className:"budget-note "+r,children:["ok"===r?(0,s.jsx)(h.I,{name:"check",size:12}):(0,s.jsx)(h.I,{name:"warn",size:12})," ",c]})]})}let C={repo:{color:"var(--accent)"},reports:{color:"var(--sx-property)"},skills:{color:"var(--sx-string)"},room:{color:"#c4a0ff"},external:{color:"#6cc7e0"}};function w({docs:e}){let a=(0,f.k)(),[l,n]=(0,t.useState)(null),i=e.reduce((e,a)=>e+a.chunks,0),r=120*i,o=e.map((a,l)=>{let s=l/Math.max(1,e.length)*Math.PI*2,t=26+l%3*9,n=C[a.source]??C.repo;return{x:50+Math.cos(s)*t,y:50+Math.sin(s)*t,sz:Math.min(18,6+.7*a.chunks),color:n.color,name:a.path.split("/").pop()??a.path,chunks:a.chunks,source:a.source}}),c=[...new Set(e.map(e=>e.source))].map(e=>({key:e,...C[e]??C.repo}));return(0,s.jsxs)("div",{className:"ragm",children:[(0,s.jsxs)("div",{className:"ragm-stats",children:[(0,s.jsxs)("div",{className:"ragm-stat",children:[(0,s.jsx)("div",{className:"rs-n",children:e.length}),(0,s.jsx)("div",{className:"rs-l",children:a("agent.rag.statDocuments")})]}),(0,s.jsxs)("div",{className:"ragm-stat",children:[(0,s.jsx)("div",{className:"rs-n",children:i}),(0,s.jsx)("div",{className:"rs-l",children:a("agent.rag.statChunks")})]}),(0,s.jsxs)("div",{className:"ragm-stat",children:[(0,s.jsx)("div",{className:"rs-n",children:i}),(0,s.jsx)("div",{className:"rs-l",children:a("agent.rag.statVectors")})]}),(0,s.jsxs)("div",{className:"ragm-stat",children:[(0,s.jsxs)("div",{className:"rs-n",children:[(r/1e3).toFixed(1),"k"]}),(0,s.jsx)("div",{className:"rs-l",children:a("agent.rag.statTokens")})]})]}),(0,s.jsxs)("div",{className:"ragm-canvas",children:[(0,s.jsx)("svg",{className:"ragm-svg",viewBox:"0 0 100 100",preserveAspectRatio:"none",children:o.map((e,a)=>(0,s.jsx)("line",{x1:"50",y1:"50",x2:e.x,y2:e.y,stroke:e.color,strokeOpacity:"0.28",strokeWidth:"0.4",vectorEffect:"non-scaling-stroke"},a))}),(0,s.jsx)("div",{className:"ragm-core",children:(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"rc-t",children:"RAG"}),(0,s.jsx)("div",{className:"rc-s",children:a("agent.rag.coreDocs",{n:e.length})})]})}),o.map((e,a)=>(0,s.jsx)("div",{className:"ragm-node",style:{left:e.x+"%",top:e.y+"%",width:e.sz,height:e.sz,background:e.color,boxShadow:"0 0 8px "+e.color+"66"},onMouseEnter:()=>n({x:e.x,y:e.y,name:e.name,chunks:e.chunks}),onMouseLeave:()=>n(null)},a)),l&&(0,s.jsxs)("div",{className:"ragm-tip",style:{left:l.x+"%",top:l.y+"%"},children:[(0,s.jsx)("div",{className:"tt-t",children:l.name}),(0,s.jsx)("div",{className:"tt-s",children:a("agent.rag.tipChunks",{n:l.chunks,tok:120*l.chunks})})]}),0===o.length&&(0,s.jsx)("div",{style:{position:"absolute",inset:0,display:"grid",placeItems:"center",color:"var(--text-faint)",fontSize:12.5},children:a("agent.rag.nothingIndexed")}),(0,s.jsx)("div",{className:"ragm-legend",children:c.map(e=>(0,s.jsxs)("div",{className:"lg",children:[(0,s.jsx)("span",{className:"dot",style:{background:e.color}})," ",a(`agent.rag.src.${e.key}`)]},e.key))})]}),(0,s.jsx)("div",{className:"ragm-docs",children:e.slice().sort((e,a)=>a.chunks-e.chunks).slice(0,24).map((e,l)=>{let t=C[e.source]??C.repo;return(0,s.jsxs)("div",{className:"ragm-doc",children:[(0,s.jsx)("span",{className:"src-chip",style:{background:t.color+"22",color:t.color},children:a(`agent.rag.src.${e.source}`)}),(0,s.jsx)("span",{className:"rd-t",children:e.path}),(0,s.jsx)("div",{className:"rd-bar",children:(0,s.jsx)("i",{style:{width:Math.min(100,4*e.chunks)+"%",background:t.color}})}),(0,s.jsx)("span",{className:"rd-chunks",children:a("agent.rag.chunksAbbr",{n:e.chunks})})]},l)})})]})}function I(e){let a,l,i,g,b=(0,f.k)(),[y,C]=(0,t.useState)("model"),[I,M]=(0,t.useState)(e.image??null),[z,_]=(0,t.useState)(e.adapter),[R,P]=(0,t.useState)(e.model),[L,A]=(0,t.useState)(e.temperature),[T,E]=(0,t.useState)(e.dailyCapUsd),[U,D]=(0,t.useState)(e.tierFloor),[G,W]=(0,t.useState)(e.persona.identity),[F,O]=(0,t.useState)(e.persona.ritual),[$,B]=(0,t.useState)(e.persona.tone),[q,H]=(0,t.useState)(e.persona.systemPrompt),[K,V]=(0,t.useState)(new Set(e.enabledIds)),[Y,J]=(0,t.useState)(""),[Q,X]=(0,t.useTransition)(),[Z,ee]=(0,t.useState)(e.rag),[ea,el]=(0,t.useState)(!1),[es,et]=(0,t.useState)(""),[en,ei]=(0,t.useState)(""),[er,eo]=(0,t.useState)(!1),[ec,ed]=(0,t.useState)(!1),[em,eu]=(0,t.useState)(""),[ep,eg]=(0,t.useState)(""),[eh,ev]=(0,t.useState)("all");function ex(e){J(e),setTimeout(()=>J(""),1500)}function ef(a){ee(a),X(async()=>{await o(e.agentId,a),ex(b("agent.flash.ragSaved"))})}function eb(){em.trim()&&(ef({...Z,external:!0,sources:[...Z.sources??[],em.trim()]}),eu(""),ed(!1))}function ej(){X(async()=>{eo(!1),ei(b("agent.model.pulling"));let e=await (0,p.j)(es.trim());e.ok?(_("local_ollama"),P(es.trim()),el(!1),et(""),ei(""),ex(b("agent.flash.modelPulled"))):(eo(!0),ei(e.error??b("agent.model.pullFailed")))})}function ek(a){V(a?new Set(e.skills.map(e=>e.id)):new Set),X(()=>u(e.agentId,a))}return(0,t.useEffect)(()=>{C("model"),_(e.adapter),P(e.model),A(e.temperature),E(e.dailyCapUsd),D(e.tierFloor),W(e.persona.identity),O(e.persona.ritual),B(e.persona.tone),H(e.persona.systemPrompt),V(new Set(e.enabledIds)),ee(e.rag),J(""),el(!1),ed(!1),et(""),ei(""),eo(!1),eu(""),eg(""),ev("all")},[e.agentId]),(0,s.jsxs)("div",{className:"as-detail",children:[(0,s.jsx)("div",{className:"as-head",children:(0,s.jsxs)("div",{className:"as-hero",children:[(0,s.jsx)(d.n,{name:e.name,color:e.color,image:I,size:48,onChange:a=>{M(a),X(()=>c(e.agentId,a))}}),(0,s.jsxs)("div",{style:{flex:1},children:[(0,s.jsxs)("div",{className:"ah-name",children:[e.name," ",(0,s.jsxs)("span",{className:"agent-handle",children:["@",e.handle]})]}),(0,s.jsxs)("div",{className:"ah-sub",children:[e.role," \xb7 ",b("agent.reportsTo",{who:e.reportsTo?"@"+e.reportsTo:"—"})]})]}),(0,s.jsx)("span",{className:"pill",style:{background:"var(--bg-active)",color:"var(--text-dim)"},children:b(`agent.status.${e.status}`)})]})}),(0,s.jsxs)("div",{className:"as-tabs",children:[k.map(e=>(0,s.jsx)("button",{className:"as-tab"+(y===e?" on":""),onClick:()=>C(e),children:b(`agent.tab.${e}`)},e)),Y&&(0,s.jsxs)("span",{className:"oauth-ok",style:{marginLeft:"auto",padding:"4px 10px",fontSize:11.5},children:[(0,s.jsx)(h.I,{name:"check",size:12})," ",Y]})]}),(0,s.jsxs)("div",{className:"as-body scroll",children:["model"===y&&(0,s.jsxs)("div",{style:{maxWidth:1080},children:[(0,s.jsxs)("div",{className:"set-grid",children:[(0,s.jsxs)("div",{className:"form-field",children:[(0,s.jsx)("label",{className:"form-label",children:b("agent.model.provider")}),(0,s.jsx)(v.m,{glyph:!0,mono:!0,value:z,options:e.providerOpts,onChange:_})]}),(0,s.jsxs)("div",{className:"form-field",children:[(0,s.jsx)("label",{className:"form-label",children:b("agent.model.model")}),(0,s.jsx)(x.Y,{adapter:z,value:R,onChange:P,providers:e.providers}),(0,s.jsx)("div",{className:"form-hint",style:{justifyContent:"space-between"},children:(0,s.jsxs)("span",{children:[(0,s.jsx)(h.I,{name:"cpu",size:12})," ",b("agent.model.runnerHint")]})})]})]}),(0,s.jsx)("div",{className:"persona-field",style:{marginTop:14},children:(0,s.jsx)(N,{value:L,onChange:A})}),(0,s.jsxs)("div",{className:"set-grid",style:{marginTop:4},children:[(0,s.jsxs)("div",{className:"form-field",children:[(0,s.jsx)("label",{className:"form-label",children:b("agent.model.dailyCap")}),(0,s.jsx)("input",{className:"form-input mono",value:"$"+T,onChange:e=>E(Math.max(0,parseFloat(e.target.value.replace(/[^0-9.]/g,""))||0))})]}),(0,s.jsxs)("div",{className:"form-field",children:[(0,s.jsx)("label",{className:"form-label",children:b("agent.model.tierFloor")}),(0,s.jsx)(v.m,{value:U,options:["light","heavy","critical"].map(e=>({value:e,label:b(`agent.tier.${e}`)})),onChange:D})]})]}),(0,s.jsxs)("div",{className:"card",style:{marginTop:14},children:[(0,s.jsx)("div",{className:"detail-label",children:b("agent.model.budgetToday")}),(0,s.jsx)(S,{spent:e.spentToday,cap:T}),(0,s.jsx)("div",{className:"modal-hint",children:b("agent.model.budgetHint")})]}),(0,s.jsxs)("div",{className:"onb-foot",style:{gap:8},children:[(0,s.jsxs)("button",{className:"btn-ghost",onClick:()=>el(!0),children:[(0,s.jsx)(h.I,{name:"add",size:13})," ",b("agent.model.uploadPull")]}),(0,s.jsxs)("button",{className:"btn-accent",disabled:Q,onClick:function(){X(async()=>{await (0,n.k)(e.agentId,{adapter:z,model:R,temperature:L,dailyCapUsd:T,tierFloor:U}),ex(b("agent.flash.modelSaved"))})},children:[(0,s.jsx)(h.I,{name:"check",size:13})," ",b("agent.model.saveModel")]})]})]}),"skills"===y&&(a=[...new Set(e.skills.map(e=>e.category))].sort(),l=e=>e.charAt(0).toUpperCase()+e.slice(1),i=ep.trim().toLowerCase(),g=e.skills.filter(e=>("all"===eh||e.category===eh)&&(!i||e.name.toLowerCase().includes(i))),(0,s.jsxs)("div",{style:{maxWidth:1080},children:[(0,s.jsxs)("div",{style:{display:"flex",alignItems:"center",marginBottom:10,gap:10},children:[(0,s.jsxs)("div",{className:"set-desc",style:{margin:0},children:[b("agent.skills.desc")," ",(0,s.jsxs)("span",{style:{color:"var(--text-faint)"},children:["\xb7 ",b("agent.skills.onCount",{on:K.size,total:e.skills.length})]})]}),(0,s.jsxs)("div",{style:{marginLeft:"auto",display:"flex",gap:6},children:[(0,s.jsxs)("button",{className:"btn-ghost",onClick:()=>ek(!0),disabled:0===e.skills.length||K.size===e.skills.length,children:[(0,s.jsx)(h.I,{name:"check",size:12})," ",b("common.enableAll")]}),(0,s.jsxs)("button",{className:"btn-ghost",onClick:()=>ek(!1),disabled:0===K.size,children:[(0,s.jsx)(h.I,{name:"close",size:12})," ",b("common.disableAll")]})]})]}),(0,s.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:12,flexWrap:"wrap"},children:[(0,s.jsxs)("div",{className:"cs-bar",style:{flex:1,minWidth:220,margin:0},children:[(0,s.jsx)(h.I,{name:"search",size:13}),(0,s.jsx)("input",{value:ep,onChange:e=>eg(e.target.value),placeholder:b("agent.skills.search")}),ep&&(0,s.jsx)("button",{className:"ss-clear",onClick:()=>eg(""),children:(0,s.jsx)(h.I,{name:"close",size:12})})]}),(0,s.jsx)(v.m,{value:eh,options:[{value:"all",label:b("agent.skills.allCategories")},...a.map(e=>({value:e,label:l(e)}))],onChange:ev}),(0,s.jsx)("span",{style:{fontSize:11,color:"var(--text-faint)",whiteSpace:"nowrap"},children:b("agent.skills.shownCount",{shown:g.length,total:e.skills.length})})]}),g.map(a=>(0,s.jsxs)("div",{className:"skill-pick",children:[(0,s.jsx)(h.I,{name:"skill",size:15,style:{color:"var(--accent)"}}),(0,s.jsx)("div",{className:"sp-main",children:(0,s.jsxs)("div",{className:"sr-title mono",style:{fontSize:12.5},children:[a.name," ",a.provisional&&(0,s.jsx)("span",{className:"pill",style:{background:"var(--sx-number)22",color:"var(--sx-number)"},children:b("agent.skills.provisional")})]})}),(0,s.jsx)("span",{className:"pill",style:{background:"var(--bg-active)",color:"var(--text-faint)",fontSize:10},children:l(a.category)}),(0,s.jsx)("div",{className:"toggle"+(K.has(a.id)?" on":""),onClick:()=>{var l;let s;return l=a.id,s=!K.has(l),void(V(e=>{let a=new Set(e);return s?a.add(l):a.delete(l),a}),X(()=>m(e.agentId,l,s)))}})]},a.id)),0===e.skills.length&&(0,s.jsx)("div",{className:"muted",style:{fontSize:12.5,padding:"8px 0"},children:b("agent.skills.empty")}),e.skills.length>0&&0===g.length&&(0,s.jsx)("div",{className:"muted",style:{fontSize:12.5,padding:"8px 0"},children:b("agent.skills.noMatch")})]})),"persona"===y&&(0,s.jsxs)("div",{style:{maxWidth:1080},children:[(0,s.jsxs)("div",{className:"persona-field",children:[(0,s.jsx)("label",{className:"form-label",children:b("agent.persona.identity")}),(0,s.jsx)("textarea",{className:"persona-ta",value:G,onChange:e=>W(e.target.value)})]}),(0,s.jsxs)("div",{className:"persona-field",children:[(0,s.jsx)("label",{className:"form-label",children:b("agent.persona.ritual")}),(0,s.jsx)("textarea",{className:"persona-ta",value:F,onChange:e=>O(e.target.value)})]}),(0,s.jsx)("div",{className:"set-grid",style:{marginBottom:16},children:(0,s.jsxs)("div",{className:"form-field",children:[(0,s.jsx)("label",{className:"form-label",children:b("agent.persona.tone")}),(0,s.jsx)(v.m,{value:$,options:["Executive","Friendly","Direct","Rigorous","Precise","Calm","Clear","Warm","Measured"].map(e=>({value:e,label:b(`agent.tone.${e}`)})),onChange:B})]})}),(0,s.jsxs)("div",{className:"persona-field",children:[(0,s.jsxs)("label",{className:"form-label",children:[b("agent.persona.systemPrompt")," ",(0,s.jsx)("span",{style:{color:"var(--text-faint)",fontWeight:400},children:"\xb7 .md"})]}),(0,s.jsx)("textarea",{className:"persona-ta mono",rows:6,value:q,onChange:e=>H(e.target.value)}),(0,s.jsxs)("div",{className:"modal-hint",children:[b("agent.persona.storedAsPrefix")," ",(0,s.jsxs)("b",{children:[".claude/agents/",e.handle,"/SYSTEM.md"]})," ",b("agent.persona.storedAsSuffix")]})]}),(0,s.jsx)("div",{className:"onb-foot",children:(0,s.jsxs)("button",{className:"btn-accent",disabled:Q,onClick:function(){X(async()=>{await r(e.agentId,{identity:G,ritual:F,tone:$,systemPrompt:q}),ex(b("agent.flash.personaSaved"))})},children:[(0,s.jsx)(h.I,{name:"check",size:13})," ",b("agent.persona.save")]})})]}),"rag"===y&&(0,s.jsxs)("div",{style:{maxWidth:1080},children:[(0,s.jsx)(w,{docs:e.ragDocs}),(0,s.jsxs)("div",{className:"set-desc",style:{marginTop:16,display:"flex",alignItems:"center"},children:[(0,s.jsx)("span",{children:b("agent.rag.sourcesDesc")}),(0,s.jsxs)("button",{className:"btn-ghost",style:{marginLeft:"auto",padding:"5px 11px"},onClick:()=>ed(!0),children:[(0,s.jsx)(h.I,{name:"add",size:12})," ",b("agent.rag.addSource")]})]}),[{k:"repo",name:b("agent.rag.row.repo"),desc:b("agent.rag.row.repoDesc",{n:e.fileCount})},{k:"room",name:b("agent.rag.row.room"),desc:b("agent.rag.row.roomDesc")},{k:"reports",name:b("agent.rag.row.reports"),desc:b("agent.rag.row.reportsDesc")},{k:"skills",name:b("agent.rag.row.skills"),desc:b("agent.rag.row.skillsDesc",{n:e.skills.length})},{k:"external",name:b("agent.rag.row.external"),desc:Z.sources?.length?b(1===Z.sources.length?"agent.rag.sourcesConnected.one":"agent.rag.sourcesConnected.other",{n:Z.sources.length}):b("agent.rag.row.externalOff")}].map(e=>(0,s.jsxs)("div",{className:"skill-pick",children:[(0,s.jsx)(h.I,{name:"doc",size:15,style:{color:"var(--accent)"}}),(0,s.jsxs)("div",{className:"sp-main",children:[(0,s.jsx)("div",{className:"sr-title",children:e.name}),(0,s.jsx)("div",{className:"sr-sub",children:e.desc})]}),(0,s.jsx)("div",{className:"toggle"+(Z[e.k]?" on":""),onClick:()=>{var a;return a=e.k,void ef({...Z,[a]:!Z[a]})}})]},e.k)),(Z.sources??[]).map((e,a)=>(0,s.jsxs)("div",{className:"skill-pick",style:{paddingLeft:28},children:[(0,s.jsx)(h.I,{name:"goto",size:13,style:{color:"var(--text-faint)"}}),(0,s.jsx)("div",{className:"sp-main",children:(0,s.jsx)("div",{className:"sr-title mono",style:{fontSize:12},children:e})}),(0,s.jsx)("button",{className:"iact danger",title:b("agent.rag.removeSource"),onClick:()=>ef({...Z,sources:(Z.sources??[]).filter((e,l)=>l!==a)}),children:(0,s.jsx)(h.I,{name:"trash",size:13})})]},"src-"+a)),(0,s.jsx)("div",{className:"modal-hint",style:{marginTop:10},children:b("agent.rag.toggleHint")})]}),"workflow"===y&&(0,s.jsxs)("div",{style:{maxWidth:1080},children:[(0,s.jsx)(j,{agentId:e.agentId}),(0,s.jsx)("div",{className:"set-desc",children:b("agent.workflow.intro",{name:e.name})}),[b("agent.workflow.step1",{path:`.claude/agents/${e.handle}/SYSTEM.md`}),b("agent.workflow.step2",{cli:z.startsWith("cli_codex")?"Codex":"Claude Code"}),b("agent.workflow.step3"),b("agent.workflow.step4"),b("agent.workflow.step5")].map((e,a)=>(0,s.jsxs)("div",{className:"skill-pick",children:[(0,s.jsx)("span",{style:{width:22,height:22,borderRadius:"50%",background:"var(--bg-active)",color:"var(--accent)",display:"grid",placeItems:"center",fontSize:11,fontWeight:800,flex:"0 0 22px"},children:a+1}),(0,s.jsx)("div",{className:"sp-main",children:(0,s.jsx)("div",{className:"sr-title",style:{fontWeight:500,fontSize:13},children:e})})]},a))]})]}),ea&&(0,s.jsx)("div",{className:"modal-overlay",onMouseDown:()=>el(!1),children:(0,s.jsxs)("div",{className:"modal",style:{padding:"20px 22px",width:460,maxWidth:"94vw"},onMouseDown:e=>e.stopPropagation(),children:[(0,s.jsx)("div",{style:{fontSize:15,fontWeight:800,marginBottom:4},children:b("agent.pullModal.title")}),(0,s.jsxs)("div",{className:"set-desc",style:{marginBottom:12},children:[b("agent.pullModal.descPrefix")," ",(0,s.jsx)("span",{className:"mono",children:"qwen2.5-coder:7b"}),b("agent.pullModal.descSuffix",{name:e.name})]}),(0,s.jsx)("input",{className:"form-input mono",autoFocus:!0,placeholder:b("agent.pullModal.placeholder"),value:es,onChange:e=>et(e.target.value),onKeyDown:e=>{"Enter"===e.key&&es.trim()&&ej()}}),en&&(0,s.jsx)("div",{style:{fontSize:11.5,color:er?"var(--sx-keyword)":"var(--sx-string)",marginTop:8},children:en}),(0,s.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end",gap:8,marginTop:16},children:[(0,s.jsx)("button",{className:"btn-ghost",onClick:()=>el(!1),children:b("common.cancel")}),(0,s.jsxs)("button",{className:"btn-accent",disabled:!es.trim()||Q,onClick:ej,children:[(0,s.jsx)(h.I,{name:"add",size:13})," ",b("agent.pullModal.pullAssign")]})]})]})}),ec&&(0,s.jsx)("div",{className:"modal-overlay",onMouseDown:()=>ed(!1),children:(0,s.jsxs)("div",{className:"modal",style:{padding:"20px 22px",width:460,maxWidth:"94vw"},onMouseDown:e=>e.stopPropagation(),children:[(0,s.jsx)("div",{style:{fontSize:15,fontWeight:800,marginBottom:4},children:b("agent.addSrcModal.title")}),(0,s.jsx)("div",{className:"set-desc",style:{marginBottom:12},children:b("agent.addSrcModal.desc")}),(0,s.jsx)("input",{className:"form-input mono",autoFocus:!0,placeholder:b("agent.addSrcModal.placeholder"),value:em,onChange:e=>eu(e.target.value),onKeyDown:e=>{"Enter"===e.key&&eb()}}),(0,s.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end",gap:8,marginTop:16},children:[(0,s.jsx)("button",{className:"btn-ghost",onClick:()=>ed(!1),children:b("common.cancel")}),(0,s.jsxs)("button",{className:"btn-accent",disabled:!em.trim(),onClick:eb,children:[(0,s.jsx)(h.I,{name:"check",size:13})," ",b("agent.rag.addSource")]})]})]})})]})}}},e=>{e.O(0,[9219,3219,9950,8370,6646,6834,7358],()=>e(e.s=5715)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5125],{1716:(e,s,t)=>{"use strict";t.d(s,{R:()=>n});var a=t(5076);function n({name:e}){let s={ts:{t:"TS",c:"#3178c6"},tsx:{t:"TS",c:"#3178c6"},js:{t:"JS",c:"#f0c000"},jsx:{t:"JS",c:"#f0c000"},json:{t:"{}",c:"#cbab35"},md:{t:"M↓",c:"#7d8590"},css:{t:"#",c:"#42a5f5"}}[e.split(".").pop()??""]||{t:"\xb7",c:"#7d8590"};return(0,a.jsx)("span",{style:{fontSize:9,fontWeight:700,fontFamily:"var(--mono-font, monospace)",color:s.c,lineHeight:1,letterSpacing:"-.5px"},children:s.t})}},3606:(e,s,t)=>{"use strict";t.d(s,{CodeEditor:()=>v});var a=t(5076),n=t(8488),l=t(5629),i=t(8576),c=t(1716),o=t(7814);let r=(0,o.createServerReference)("6048a65eb6e89c9dc4b0268d737206b00b71ec3ea2",o.callServer,void 0,o.findSourceMapURL,"saveFileContent"),d=(0,o.createServerReference)("40d665e4c72077c11b40050cc32912d47f1910a173",o.callServer,void 0,o.findSourceMapURL,"createFolder"),h=(0,o.createServerReference)("4066ce02319c4deff66b1f9897f476f9d9a1cc2220",o.callServer,void 0,o.findSourceMapURL,"createFile"),m=(0,o.createServerReference)("40de52926fd4d47bfe0ff9e61fbb455541c3eee686",o.callServer,void 0,o.findSourceMapURL,"deleteFile"),p=(0,o.createServerReference)("40ceb770c35ed6eac8bc8da767e3d4760ba86b2e1c",o.callServer,void 0,o.findSourceMapURL,"fileDiff"),x=(0,o.createServerReference)("60b536b94c093ce972ef3ef5f3459740b273494be9",o.callServer,void 0,o.findSourceMapURL,"grepWorkspace");function u(e,s){let t;if(!s)return e||"​";let n=[],l=0,i=0;for(s.lastIndex=0;t=s.exec(e);){if(0===t[0].length){s.lastIndex++;continue}t.index>l&&n.push(e.slice(l,t.index)),n.push((0,a.jsx)("mark",{children:t[0]},i++)),l=t.index+t[0].length}return l<e.length&&n.push(e.slice(l)),n.length?n:e||"​"}function j({path:e,onClose:s}){let t=(0,l.k)(),[c,o]=(0,n.useState)(null);return(0,n.useEffect)(()=>{let s=!0;return p(e).then(e=>{s&&o(e.diff||t("codeedit.noDiff"))}),()=>{s=!1}},[e,t]),(0,a.jsx)("div",{className:"detail-overlay",onMouseDown:s,children:(0,a.jsxs)("div",{className:"detail-panel",style:{width:720,maxWidth:"94vw"},onMouseDown:e=>e.stopPropagation(),children:[(0,a.jsx)("div",{className:"detail-head",children:(0,a.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,a.jsx)("span",{className:"view-title",style:{fontSize:14,fontFamily:"var(--mono-font)"},children:e}),(0,a.jsx)("button",{className:"dock-tool",onClick:s,children:(0,a.jsx)(i.I,{name:"close",size:15})})]})}),(0,a.jsx)("div",{className:"detail-body",children:null===c?(0,a.jsxs)("div",{className:"muted",children:[(0,a.jsx)("span",{className:"spin",children:(0,a.jsx)(i.I,{name:"refresh",size:13})})," ",t("codeedit.loadingDiff")]}):(0,a.jsx)("pre",{className:"scroll",style:{maxHeight:"60vh",overflow:"auto",fontFamily:"var(--mono-font)",fontSize:12,lineHeight:1.5,margin:0},children:c.split("\n").map((e,s)=>(0,a.jsx)("div",{style:{color:e.startsWith("+")&&!e.startsWith("+++")?"var(--sx-string)":e.startsWith("-")&&!e.startsWith("---")?"#e8688f":e.startsWith("@@")?"var(--accent)":"var(--text-dim)",whiteSpace:"pre-wrap"},children:e||"​"},s))})})]})})}let f=new Set(["import","from","export","const","let","var","function","return","if","else","for","while","async","await","type","interface","class","extends","implements","new","try","catch","finally","throw","switch","case","break","continue","default","of","in","typeof","instanceof","void","null","undefined","true","false","this","super","public","private","protected","readonly","static","enum","as","yield","do","then","def","lambda","with","pass","elif","None","True","False"]);function g({node:e,depth:s,expanded:t,selected:n,onToggle:o,onOpen:r,onDelete:d,gitStatus:h}){let m=(0,l.k)(),p=8+14*s;if("dir"===e.type){let l=t.has(e.path);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"row dir",style:{paddingLeft:p},onClick:()=>o(e.path),children:[(0,a.jsx)("span",{className:"chev",children:(0,a.jsx)(i.I,{name:l?"chevronDown":"chevronRight",size:12})}),(0,a.jsx)("span",{className:"name",children:e.name}),(0,a.jsx)("button",{className:"row-del",title:m("codeedit.deleteFolderNamed",{name:e.name}),onClick:s=>{s.stopPropagation(),d(e.path,"dir")},children:(0,a.jsx)(i.I,{name:"close",size:12})})]}),l&&e.children.map(e=>(0,a.jsx)(g,{node:e,depth:s+1,expanded:t,selected:n,onToggle:o,onOpen:r,onDelete:d,gitStatus:h},e.path))]})}let x=h[e.path];return(0,a.jsxs)("div",{className:"row file"+(n===e.path?" selected":""),style:{paddingLeft:p},onClick:()=>r(e.path),children:[(0,a.jsx)("span",{className:"chev"}),(0,a.jsx)("span",{className:"fi",children:(0,a.jsx)(c.R,{name:e.name})}),(0,a.jsx)("span",{className:"name",style:x?{color:"U"===x?"var(--sx-number)":"var(--sx-type)"}:void 0,children:e.name}),x&&(0,a.jsx)("span",{className:"git-badge gstat "+x,children:x}),(0,a.jsx)("button",{className:"row-del",title:m("codeedit.deleteNamed",{name:e.name}),onClick:s=>{s.stopPropagation(),d(e.path,"file")},children:(0,a.jsx)(i.I,{name:"close",size:12})})]})}function v({files:e,repo:s,branch:t="workspace"}){let o,p=(0,l.k)(),N=(0,n.useMemo)(()=>(function(e){let s=[];for(let t of[...e].sort((e,s)=>e.path.localeCompare(s.path))){let e=t.path.split("/"),a=s,n="";e.forEach((s,l)=>{if(n=n?n+"/"+s:s,l===e.length-1)a.push({type:"file",name:s,path:t.path});else{let e=a.find(e=>"dir"===e.type&&e.path===n);e||(e={type:"dir",name:s,path:n,children:[]},a.push(e)),a=e.children}})}let t=e=>e.sort((e,s)=>e.type===s.type?e.name.localeCompare(s.name):"dir"===e.type?-1:1).map(e=>"dir"===e.type?{...e,children:t(e.children)}:e);return t(s)})(e),[e]),b=(0,n.useMemo)(()=>Object.fromEntries(e.filter(e=>e.gitStatus).map(e=>[e.path,e.gitStatus])),[e]),[y,w]=(0,n.useState)(()=>e[0]?[e[0].path]:[]),[S,k]=(0,n.useState)(e[0]?.path??null),[C,z]=(0,n.useState)("workspace"),[I,F]=(0,n.useState)(""),[R,P]=(0,n.useState)(!1),[M,W]=(0,n.useState)(!1),[D,E]=(0,n.useState)(!1),[T,L]=(0,n.useState)([]),[U,_]=(0,n.useState)(!1),[A,H]=(0,n.useState)(!1),[$,O]=(0,n.useState)(null),B=(0,n.useRef)(null),Z=(0,n.useMemo)(()=>"search"===C?function(e,s){if(!e||e.trim().length<1)return null;try{let t=s.regex?e:e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return s.wholeWord&&(t=`\\b(?:${t})\\b`),new RegExp(t,s.caseSensitive?"g":"gi")}catch{return null}}(I,{caseSensitive:R,wholeWord:M,regex:D}):null,[C,I,R,M,D]);(0,n.useEffect)(()=>{if("search"!==C||I.trim().length<2){L([]),H(!1);return}_(!0);let e=setTimeout(async()=>{try{let e=await x(I,{caseSensitive:R,wholeWord:M,regex:D});L(e.files),H(e.truncated)}finally{_(!1)}},250);return()=>clearTimeout(e)},[C,I,R,M,D]),(0,n.useEffect)(()=>{if(null==$)return;let e=B.current?.querySelector(`[data-line="${$}"]`);e?.scrollIntoView({block:"center",behavior:"smooth"})},[$,S]);let[J,q]=(0,n.useState)(!0),[K,V]=(0,n.useState)(()=>{let e=new Set;return N.forEach(s=>"dir"===s.type&&e.add(s.path)),e}),[X,Y]=(0,n.useState)(""),[G,Q]=(0,n.useState)(!1),[ee,es]=(0,n.useState)(!1),[et,ea]=(0,n.useState)("file"),[en,el]=(0,n.useState)(""),[ei,ec]=(0,n.useState)(null),[eo,er]=(0,n.useState)(null),[,ed]=(0,n.useTransition)(),eh=e.find(e=>e.path===S)??null;function em(e){V(s=>{let t=new Set(s);return t.has(e)?t.delete(e):t.add(e),t})}function ep(e){w(s=>s.includes(e)?s:[...s,e]),k(e),Q(!1)}function ex(e){w(s=>{let t=s.filter(s=>s!==e);return S===e&&k(t[t.length-1]??null),t})}let eu=Object.entries(b).map(([e,s])=>({path:e,st:s,name:e.split("/").pop()??e,dir:e.split("/").slice(0,-1).join("/")})),ej=eu.filter(e=>"A"===e.st),ef=eu.filter(e=>"A"!==e.st),eg=eh?eh.content.split("\n"):[];return(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:12,marginBottom:12},children:[(0,a.jsx)(i.I,{name:"git",size:15,style:{color:"var(--accent)"}}),(0,a.jsx)("span",{className:"mono",style:{fontWeight:700,fontSize:13},children:s}),(0,a.jsxs)("span",{className:"mono",style:{display:"inline-flex",alignItems:"center",gap:5,fontSize:12,color:"var(--text-dim)"},children:[(0,a.jsx)(i.I,{name:"branch",size:11})," ",t]}),(0,a.jsxs)("div",{className:"seg",style:{marginLeft:"auto",width:380},children:[(0,a.jsxs)("button",{className:"seg-opt"+("workspace"===C?" on":""),onClick:()=>z("workspace"),children:[(0,a.jsx)(i.I,{name:"grid",size:12})," ",p("codeedit.workspace")]}),(0,a.jsxs)("button",{className:"seg-opt"+("search"===C?" on":""),onClick:()=>z("search"),children:[(0,a.jsx)(i.I,{name:"search",size:12})," ",p("common.search")]}),(0,a.jsxs)("button",{className:"seg-opt"+("git"===C?" on":""),onClick:()=>z("git"),children:[(0,a.jsx)(i.I,{name:"git",size:12})," ",p("codeedit.sourceControl"),eu.length>0?` \xb7 ${eu.length}`:""]})]})]}),(0,a.jsxs)("div",{className:"code-mod",children:[(0,a.jsx)("div",{className:"code-tree",children:"workspace"===C?(0,a.jsxs)(a.Fragment,{children:[y.length>0&&(0,a.jsxs)("div",{className:"open-editors",children:[(0,a.jsxs)("div",{className:"oe-head",children:[(0,a.jsxs)("span",{className:"tree-section-label",style:{padding:0,cursor:"pointer"},onClick:()=>q(e=>!e),children:[(0,a.jsx)(i.I,{name:J?"chevronDown":"chevronRight",size:12})," ",p("codeedit.openEditors")]}),(0,a.jsx)("span",{className:"oe-count",children:y.length}),(0,a.jsx)("button",{className:"side-act",title:p("codeedit.closeAll"),onClick:()=>{w([]),k(null)},children:(0,a.jsx)(i.I,{name:"close",size:13})})]}),J&&y.map(e=>(0,a.jsxs)("div",{className:"oe-row"+(e===S?" active":""),onClick:()=>ep(e),title:e,children:[(0,a.jsx)(c.R,{name:e.split("/").pop()??e}),(0,a.jsx)("span",{className:"oe-name",children:e.split("/").pop()}),(0,a.jsx)("button",{className:"oe-close",onClick:s=>{s.stopPropagation(),ex(e)},children:(0,a.jsx)(i.I,{name:"close",size:12})})]},e))]}),(0,a.jsxs)("div",{className:"tree-section-label",children:[(0,a.jsx)(i.I,{name:"chevronDown",size:12}),(0,a.jsx)("span",{style:{flex:1},children:s}),(0,a.jsx)("button",{className:"side-act",title:p("codeedit.newFile"),onClick:()=>{ea("file"),es(!0),el("")},children:(0,a.jsx)(i.I,{name:"newFile",size:14})}),(0,a.jsx)("button",{className:"side-act",title:p("codeedit.newFolder"),onClick:()=>{ea("folder"),es(!0),el("")},children:(0,a.jsx)(i.I,{name:"newFolder",size:14})})]}),0===e.length&&(0,a.jsx)("div",{className:"muted",style:{padding:12,fontSize:12},children:p("codeedit.noFilesYet")}),N.map(e=>(0,a.jsx)(g,{node:e,depth:0,expanded:K,selected:S,onToggle:em,onOpen:ep,onDelete:(e,s)=>ec({path:e,type:s}),gitStatus:b},e.path))]}):"search"===C?(0,a.jsxs)("div",{className:"code-search",children:[(0,a.jsxs)("div",{className:"cs-bar",children:[(0,a.jsx)(i.I,{name:"search",size:13}),(0,a.jsx)("input",{autoFocus:!0,placeholder:p("codeedit.searchFilesCode"),value:I,onChange:e=>F(e.target.value)}),I&&(0,a.jsx)("button",{className:"ss-clear",onClick:()=>F(""),children:(0,a.jsx)(i.I,{name:"close",size:12})})]}),(0,a.jsxs)("div",{className:"cs-toggles",children:[(0,a.jsx)("button",{className:"cs-tog"+(R?" on":""),title:p("codeedit.matchCase"),onClick:()=>P(e=>!e),children:"Aa"}),(0,a.jsx)("button",{className:"cs-tog"+(M?" on":""),title:p("codeedit.wholeWord"),onClick:()=>W(e=>!e),children:"ab"}),(0,a.jsx)("button",{className:"cs-tog"+(D?" on":""),title:p("codeedit.regex"),onClick:()=>E(e=>!e),children:".*"}),(0,a.jsx)("span",{className:"cs-count",children:U?"…":T.length?p("codeedit.matchesInFiles",{matches:T.reduce((e,s)=>e+s.matches.length,0),files:T.length}):""})]}),(0,a.jsxs)("div",{className:"cs-results scroll",children:[!U&&I.trim().length>=2&&0===T.length&&(0,a.jsx)("div",{className:"muted",style:{fontSize:12,padding:10},children:p("codeedit.noMatches")}),T.map(e=>(0,a.jsxs)("div",{className:"cs-file",children:[(0,a.jsxs)("div",{className:"cs-file-head",onClick:()=>ep(e.path),title:e.path,children:[(0,a.jsx)(c.R,{name:e.path.split("/").pop()??e.path}),(0,a.jsx)("span",{className:"cs-file-name"+(e.nameMatch?" name-hit":""),children:e.path}),(0,a.jsx)("span",{className:"cs-file-n",children:e.matches.length||(e.nameMatch?p("codeedit.nameMatch"):"")})]}),e.matches.slice(0,50).map((s,t)=>(0,a.jsxs)("div",{className:"cs-hit",onClick:()=>{ep(e.path),O(s.line)},children:[(0,a.jsx)("span",{className:"cs-ln",children:s.line}),(0,a.jsx)("span",{className:"cs-line",children:u(s.text,Z)})]},t))]},e.path)),A&&(0,a.jsx)("div",{className:"muted",style:{fontSize:11,padding:8},children:p("codeedit.truncatedHint")})]})]}):(0,a.jsxs)("div",{className:"git-panel",children:[(0,a.jsxs)("div",{className:"gh-repo",children:[(0,a.jsx)(i.I,{name:"git",size:14,style:{color:"var(--accent)"}}),(0,a.jsxs)("div",{className:"gh-repo-main",children:[(0,a.jsx)("div",{className:"gh-repo-name",children:s}),(0,a.jsxs)("div",{className:"gh-repo-branch",children:[(0,a.jsx)(i.I,{name:"branch",size:11})," ",t]})]})]}),0===eu.length?(0,a.jsx)("div",{className:"muted",style:{fontSize:12,padding:"10px 2px"},children:p("codeedit.noChanges")}):(0,a.jsxs)(a.Fragment,{children:[ej.length>0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"git-group-label",children:p("codeedit.stagedChanges",{n:ej.length})}),ej.map(e=>(0,a.jsxs)("div",{className:"git-row",title:e.path,onClick:()=>ep(e.path),children:[(0,a.jsx)(c.R,{name:e.name}),(0,a.jsx)("span",{className:"gname",children:e.name}),(0,a.jsx)("span",{className:"gpath",children:e.dir}),(0,a.jsx)("button",{className:"iact",title:p("codeedit.viewDiff"),onClick:s=>{s.stopPropagation(),er(e.path)},children:(0,a.jsx)(i.I,{name:"git",size:12})}),(0,a.jsx)("span",{className:"gstat "+e.st,children:e.st})]},e.path))]}),(0,a.jsx)("div",{className:"git-group-label",children:p("codeedit.changes",{n:ef.length})}),ef.map(e=>(0,a.jsxs)("div",{className:"git-row",title:e.path,onClick:()=>ep(e.path),children:[(0,a.jsx)(c.R,{name:e.name}),(0,a.jsx)("span",{className:"gname",children:e.name}),(0,a.jsx)("span",{className:"gpath",children:e.dir}),(0,a.jsx)("button",{className:"iact",title:p("codeedit.viewDiff"),onClick:s=>{s.stopPropagation(),er(e.path)},children:(0,a.jsx)(i.I,{name:"git",size:12})}),(0,a.jsx)("span",{className:"gstat "+e.st,children:e.st})]},e.path)),(0,a.jsxs)("a",{href:"/github",className:"btn-ghost",style:{display:"inline-flex",gap:6,margin:"12px 8px"},children:[(0,a.jsx)(i.I,{name:"arrowUp",size:13})," ",p("codeedit.commitPush")]})]})]})}),(0,a.jsxs)("div",{className:"editor-wrap",children:[(0,a.jsx)("div",{className:"tabbar",children:y.map(e=>(0,a.jsxs)("div",{className:"tab"+(e===S?" active":""),onClick:()=>ep(e),title:e,children:[(0,a.jsx)(c.R,{name:e.split("/").pop()??e}),(0,a.jsx)("span",{className:"tname",children:e.split("/").pop()}),(0,a.jsx)("span",{className:"tclose",onClick:s=>{s.stopPropagation(),ex(e)},children:(0,a.jsx)(i.I,{name:"close",size:12})})]},e))}),eh?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"breadcrumb",children:eh.path.split("/").map((e,s,t)=>(0,a.jsxs)("span",{className:"crumb",children:[s>0&&(0,a.jsx)(i.I,{name:"chevronRight",size:11}),s===t.length-1?(0,a.jsx)(c.R,{name:e}):null," ",e]},s))}),(0,a.jsxs)("div",{className:"editor-toolbar",children:[(0,a.jsxs)("span",{className:"et-lang",children:[(0,a.jsx)(c.R,{name:eh.path.split("/").pop()??""})," ",eh.lang.toUpperCase()]}),(0,a.jsx)("span",{className:"et-spacer"}),(0,a.jsxs)("span",{className:"et-diag ok",children:[(0,a.jsx)(i.I,{name:"check",size:12})," ",p("codeedit.noProblems")]}),G?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("button",{className:"et-edit",onClick:()=>Q(!1),children:p("common.cancel")}),(0,a.jsxs)("button",{className:"et-edit on",onClick:()=>ed(async()=>{await r(eh.path,X),Q(!1)}),children:[(0,a.jsx)(i.I,{name:"check",size:12})," ",p("common.save")]})]}):(0,a.jsxs)("button",{className:"et-edit",onClick:()=>{Q(!0),Y(eh.content)},children:[(0,a.jsx)(i.I,{name:"command",size:12})," ",p("common.edit")]})]}),G?(0,a.jsx)("textarea",{className:"code-area",value:X,onChange:e=>Y(e.target.value),spellCheck:!1}):(0,a.jsxs)("div",{className:"editor-body",children:[(0,a.jsx)("div",{className:"editor-scroll",children:(0,a.jsx)("div",{className:"code",ref:B,children:eg.map((e,s)=>(0,a.jsxs)("div",{className:"code-line"+($===s+1?" search-hit":""),"data-line":s+1,children:[(0,a.jsx)("span",{className:"gutter",children:s+1}),(0,a.jsx)("span",{className:"line-content",children:Z?u(e,Z):""===e?"​":(function(e,s){let t=[],a="py"===s||"yaml"===s,n=0,l=/[A-Za-z0-9_$]/;for(;n<e.length;){let s=e[n];if("/"===s&&"/"===e[n+1]||"#"===s&&a){t.push({t:e.slice(n),c:"comment"});break}if('"'===s||"'"===s||"`"===s){let a=n+1;for(;a<e.length&&e[a]!==s;)"\\"===e[a]&&a++,a++;let l=Math.min(a+1,e.length);t.push({t:e.slice(n,l),c:"string"}),n=l;continue}if(s>="0"&&s<="9"&&!l.test(e[n-1]??" ")){let s=n;for(;s<e.length&&/[0-9.xXa-fA-F_]/.test(e[s]);)s++;t.push({t:e.slice(n,s),c:"number"}),n=s;continue}if(/[A-Za-z_$]/.test(s)){let s=n;for(;s<e.length&&l.test(e[s]);)s++;let a=e.slice(n,s);t.push({t:a,c:f.has(a)?"keyword":/^[A-Z]/.test(a)?"type":"plain"}),n=s;continue}t.push({t:s,c:/[{}()[\].,;]/.test(s)?"punct":/\s/.test(s)?"plain":"operator"}),n++}return t})(e,eh.lang).map((e,s)=>(0,a.jsx)("span",{className:"tok-"+e.c,children:e.t},s))})]},s))})}),(0,a.jsx)("div",{className:"minimap",children:(0,a.jsx)("div",{className:"minimap-inner",children:eg.map((e,s)=>(0,a.jsx)("div",{className:"mini-line",children:e||"\xa0"},s))})})]})]}):(0,a.jsx)("div",{className:"welcome",children:(0,a.jsxs)("div",{className:"welcome-inner",children:[(0,a.jsx)("div",{className:"welcome-logo",children:"⌘"}),(0,a.jsx)("div",{className:"welcome-sub",children:p("codeedit.welcomeSub")})]})})]})]}),ee&&(0,a.jsx)("div",{className:"modal-overlay",onMouseDown:()=>es(!1),children:(0,a.jsx)("div",{className:"modal",style:{padding:"20px 22px",width:440,maxWidth:"94vw"},onMouseDown:e=>e.stopPropagation(),children:(o=()=>ed(async()=>{let e=en.trim();"folder"===et?await d(e):(await h(e),ep(e.replace(/^\/+/,""))),es(!1)}),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{style:{fontSize:15,fontWeight:800,marginBottom:10},children:"folder"===et?p("codeedit.newFolder"):p("codeedit.newFile")}),(0,a.jsx)("input",{className:"form-input mono",autoFocus:!0,placeholder:"folder"===et?p("codeedit.folderPathHint"):p("codeedit.filePathHint"),value:en,onChange:e=>el(e.target.value),onKeyDown:e=>{"Enter"===e.key&&en.trim()&&o()}}),(0,a.jsx)("div",{className:"muted",style:{fontSize:11.5,marginTop:8},children:"folder"===et?p("codeedit.folderCreateHint"):p("codeedit.fileCreateHint")}),(0,a.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end",gap:8,marginTop:16},children:[(0,a.jsx)("button",{className:"btn-ghost",onClick:()=>es(!1),children:p("common.cancel")}),(0,a.jsx)("button",{className:"btn-accent",disabled:!en.trim(),onClick:o,children:p("common.create")})]})]}))})}),ei&&(0,a.jsx)("div",{className:"modal-overlay",onMouseDown:()=>ec(null),children:(0,a.jsxs)("div",{className:"modal",style:{padding:"20px 22px",width:440,maxWidth:"94vw"},onMouseDown:e=>e.stopPropagation(),children:[(0,a.jsx)("div",{style:{fontSize:15,fontWeight:800,marginBottom:10},children:"dir"===ei.type?p("codeedit.deleteFolder"):p("codeedit.deleteFile")}),(0,a.jsxs)("div",{style:{fontSize:13},children:[p("codeedit.deleteConfirmPrefix")," ",(0,a.jsx)("b",{className:"mono",style:{color:"var(--sx-keyword)"},children:ei.path}),p("codeedit.deleteConfirmSuffix")]}),(0,a.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end",gap:8,marginTop:16},children:[(0,a.jsx)("button",{className:"btn-ghost",onClick:()=>ec(null),children:p("common.cancel")}),(0,a.jsx)("button",{className:"btn-accent",onClick:()=>ed(async()=>{await m(ei.path),eh&&(eh.path===ei.path||eh.path.startsWith(ei.path+"/"))&&ex(eh.path),ec(null)}),children:p("common.delete")})]})]})}),eo&&(0,a.jsx)(j,{path:eo,onClose:()=>er(null)})]})}},7214:(e,s,t)=>{Promise.resolve().then(t.t.bind(t,3283,23)),Promise.resolve().then(t.bind(t,3606)),Promise.resolve().then(t.bind(t,235)),Promise.resolve().then(t.bind(t,6588)),Promise.resolve().then(t.bind(t,4414)),Promise.resolve().then(t.bind(t,6556)),Promise.resolve().then(t.bind(t,4942)),Promise.resolve().then(t.bind(t,2444)),Promise.resolve().then(t.bind(t,5787))}},e=>{e.O(0,[9219,3219,9950,8370,6646,6834,7358],()=>e(e.s=7214)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9530],{1104:(e,s,a)=>{"use strict";a.d(s,{ProjectSource:()=>o});var n=a(5076),i=a(8488),r=a(8576),l=a(7814);let t=(0,l.createServerReference)("00d16fc1eea7652dffeffe7a9ed99a8123d231839f",l.callServer,void 0,l.findSourceMapURL,"reanalyzeProject");var c=a(5629);function o({source:e}){let s=(0,c.k)(),[a,l]=(0,i.useTransition)(),[d,m]=(0,i.useState)(!1),v=e??{},f=v.type??"new",p="local"===f?s("config.source.local",{name:v.localPath??"—",n:v.fileCount??0}):"github"===f?s("config.source.github",{repo:v.repo??"—",n:v.fileCount??0}):s("mock"===f?"config.source.mock":"config.source.new");return(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{className:"kv",children:[(0,n.jsx)("span",{className:"k",children:s("config.source.active")}),(0,n.jsx)("span",{className:"v",children:p})]}),(0,n.jsxs)("div",{className:"kv",children:[(0,n.jsx)("span",{className:"k",children:s("config.source.dir")}),(0,n.jsx)("span",{className:"v lr-mono",style:{fontFamily:"var(--mono-font)",fontSize:11.5},children:"~/.constella/organizations/<org>/workspace"})]}),("local"===f||"github"===f||"mock"===f)&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"kv",children:[(0,n.jsx)("span",{className:"k",children:s("config.source.analysis")}),(0,n.jsx)("span",{className:"v",children:s(v.analyzed?"config.source.analyzed":"config.source.notAnalyzed")})]}),(0,n.jsxs)("button",{className:"btn-ghost",disabled:a||d,style:{marginTop:8},onClick:()=>l(async()=>{m((await t()).ok)}),children:[(0,n.jsx)("span",{className:a?"sync-spin":"",style:{display:"inline-flex"},children:(0,n.jsx)(r.I,{name:"refresh",size:13})})," ",s(d?"config.source.reanalyzeQueued":"config.source.reanalyze")]})]})]})}},2155:(e,s,a)=>{"use strict";a.d(s,{AgentRuntimeSettings:()=>d,EditorSettings:()=>o});var n=a(5076),i=a(8488);a(8576);var r=a(5629),l=a(7814);let t=(0,l.createServerReference)("40805d6c3c158700d94e5a433b022edb68adc26182",l.callServer,void 0,l.findSourceMapURL,"setEditorSettings"),c=(0,l.createServerReference)("4006bd6e734006ada97bbfec15416a3b3bde988451",l.callServer,void 0,l.findSourceMapURL,"setAgentRuntime");function o({editor:e}){let s=(0,r.k)(),[a,l]=(0,i.useState)({tabSize:e?.tabSize??2,formatOnSave:e?.formatOnSave??!0,wordWrap:e?.wordWrap??!0,minimap:e?.minimap??!0}),[,c]=(0,i.useTransition)();function d(e){l(s=>({...s,...e})),c(()=>t(e))}let m=(e,s)=>(0,n.jsxs)("div",{className:"set-row",children:[(0,n.jsx)("div",{className:"sr-main",children:(0,n.jsx)("div",{className:"sr-title",children:s})}),(0,n.jsx)("div",{className:"toggle"+(a[e]?" on":""),onClick:()=>d({[e]:!a[e]})})]});return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"set-row",style:{paddingTop:0},children:[(0,n.jsx)("div",{className:"sr-main",children:(0,n.jsx)("div",{className:"sr-title",children:s("config.editor.tabSize")})}),(0,n.jsx)("div",{style:{display:"flex",gap:6},children:[2,4,8].map(e=>(0,n.jsx)("button",{className:"chip-sm",style:a.tabSize===e?{background:"var(--accent)",color:"var(--accent-fg)"}:void 0,onClick:()=>d({tabSize:e}),children:e},e))})]}),m("formatOnSave",s("config.editor.formatOnSave")),m("wordWrap",s("config.editor.wordWrap")),m("minimap",s("config.editor.minimap"))]})}function d({agents:e}){let s=(0,r.k)(),[a,l]=(0,i.useState)(e?.maxConcurrent??1),[t,o]=(0,i.useState)(!!e?.fileLocks),[m,v]=(0,i.useState)(e?.webResearch??!0),[,f]=(0,i.useTransition)();return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"set-row",style:{paddingTop:0},children:[(0,n.jsxs)("div",{className:"sr-main",children:[(0,n.jsx)("div",{className:"sr-title",children:s("config.agents.parallel")}),(0,n.jsx)("div",{className:"sr-sub",children:s("config.agents.parallelDesc")})]}),(0,n.jsx)("div",{style:{display:"flex",gap:6},children:[1,2,3,4,5].map(e=>(0,n.jsx)("button",{className:"chip-sm",style:a===e?{background:"var(--accent)",color:"var(--accent-fg)"}:void 0,onClick:()=>{l(e),f(()=>c({maxConcurrent:e}))},children:e},e))})]}),(0,n.jsxs)("div",{className:"set-row",children:[(0,n.jsxs)("div",{className:"sr-main",children:[(0,n.jsx)("div",{className:"sr-title",children:s("config.agents.fileLock")}),(0,n.jsx)("div",{className:"sr-sub",children:s("config.agents.fileLockDesc")})]}),(0,n.jsx)("div",{className:"toggle"+(t?" on":""),onClick:()=>{let e=!t;o(e),f(()=>c({fileLocks:e}))}})]}),a>1&&!t&&(0,n.jsxs)("div",{className:"sr-sub",style:{color:"#e8a14e",paddingBottom:6},children:["⚠ ",s("config.agents.lockWarn",{n:a})]}),(0,n.jsxs)("div",{className:"set-row",children:[(0,n.jsxs)("div",{className:"sr-main",children:[(0,n.jsx)("div",{className:"sr-title",children:s("config.agents.webResearch")}),(0,n.jsx)("div",{className:"sr-sub",children:s("config.agents.webResearchDesc")})]}),(0,n.jsx)("div",{className:"toggle"+(m?" on":""),onClick:()=>{let e=!m;v(e),f(()=>c({webResearch:e}))}})]})]})}},4625:(e,s,a)=>{Promise.resolve().then(a.t.bind(a,3283,23)),Promise.resolve().then(a.bind(a,2155)),Promise.resolve().then(a.bind(a,1104)),Promise.resolve().then(a.bind(a,6126)),Promise.resolve().then(a.bind(a,235)),Promise.resolve().then(a.bind(a,6588)),Promise.resolve().then(a.bind(a,4414)),Promise.resolve().then(a.bind(a,6556)),Promise.resolve().then(a.bind(a,4942)),Promise.resolve().then(a.bind(a,2444)),Promise.resolve().then(a.bind(a,5787))},6126:(e,s,a)=>{"use strict";a.d(s,{StackEditor:()=>m});var n=a(5076),i=a(8488),r=a(3730),l=a(7814);let t=(0,l.createServerReference)("403ad35020d0178cad6c5c90cc869fc00fd1b6370c",l.callServer,void 0,l.findSourceMapURL,"setWorkspaceStack");var c=a(9562),o=a(973),d=a(8576);function m({stack:e}){let[s,a]=(0,i.useState)(()=>(0,c.T1)(e).stack),[l,v]=(0,i.useTransition)(),[f,p]=(0,i.useState)(!1),[g,h]=(0,i.useState)("");return(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(240px, 1fr))",gap:"12px 16px"},children:r.z.map(e=>{let i=e.opts.includes("None")?e.opts:[...e.opts,"None"],r=(0,o.jX)(s[e.key]).filter(e=>"None"!==e);return(0,n.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:6},children:[(0,n.jsxs)("span",{style:{fontSize:11.5,color:"var(--text-dim)",fontWeight:600},children:[e.label,r.length>1&&(0,n.jsxs)("span",{style:{color:"var(--text-faint)",fontWeight:400},children:[" \xb7 ",r.length]})]}),(0,n.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:5},children:i.map(i=>{let l=(0,c.YL)(s,e.key,i),t="None"===i?0===r.length:(0,o.Hn)(s[e.key],i);return(0,n.jsx)("button",{type:"button",disabled:!!l&&!t,onClick:()=>{var n;let r;(!l||t)&&(n=e.key,a((r=(0,c.T1)({...s,[n]:(0,o.P_)(s[n],i)})).stack),h(r.removed.map(e=>`${e.opt} was unselected automatically — ${e.reason}.`).join(" ")),p(!1))},title:l||i,style:{fontSize:12,padding:"4px 9px",borderRadius:999,cursor:l&&!t?"not-allowed":"pointer",border:"1px solid "+(t?"var(--accent)":"var(--border)"),background:t?"var(--accent)":"transparent",color:t?"#1a1206":l?"var(--text-faint)":"var(--text-dim)",opacity:l&&!t?.5:1},children:i},i)})})]},e.key)})}),g&&(0,n.jsxs)("div",{style:{fontSize:12,color:"var(--sx-number)",marginTop:10,display:"flex",alignItems:"center",gap:6},children:[(0,n.jsx)(d.I,{name:"warn",size:12})," ",g]}),(0,n.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,marginTop:12},children:[(0,n.jsx)("button",{className:"btn-accent",disabled:l,onClick:function(){v(async()=>{await t(s),p(!0)})},children:l?"Saving…":"Save stack & reload skills"}),f&&(0,n.jsxs)("span",{style:{fontSize:12,color:"var(--sx-string)",display:"inline-flex",alignItems:"center",gap:5},children:[(0,n.jsx)(d.I,{name:"check",size:12})," Saved — agents re-linked to the new stack."]})]})]})}}},e=>{e.O(0,[9219,3219,9950,8370,9562,6646,6834,7358],()=>e(e.s=4625)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9598],{2124:(e,s,n)=>{Promise.resolve().then(n.t.bind(n,3283,23)),Promise.resolve().then(n.bind(n,7541)),Promise.resolve().then(n.bind(n,235)),Promise.resolve().then(n.bind(n,6588)),Promise.resolve().then(n.bind(n,4414)),Promise.resolve().then(n.bind(n,6556)),Promise.resolve().then(n.bind(n,4942)),Promise.resolve().then(n.bind(n,2444)),Promise.resolve().then(n.bind(n,5787))},7541:(e,s,n)=>{"use strict";n.d(s,{CapEditor:()=>d});var t=n(5076),a=n(8488),i=n(7814);let r=(0,i.createServerReference)("40e17afc92a4e315e129477c69ce5ea92af6d37ba2",i.callServer,void 0,i.findSourceMapURL,"setMonthlyCap");var o=n(8576),l=n(5629);function d({cap:e}){let s=(0,l.k)(),[n,i]=(0,a.useState)(e),[c,h]=(0,a.useState)(!1),[m,v]=(0,a.useTransition)();function p(){n!==e&&v(async()=>{await r(n),h(!0),setTimeout(()=>h(!1),1400)})}return(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[c&&(0,t.jsxs)("span",{className:"oauth-ok",style:{padding:"3px 8px",fontSize:11},children:[(0,t.jsx)(o.I,{name:"check",size:11})," ",s("common.saved")]}),(0,t.jsx)("span",{style:{fontSize:12,color:"var(--text-dim)"},children:s("skills.cap.label")}),(0,t.jsx)("input",{className:"form-input mono",style:{width:120},value:"$"+n,disabled:m,onChange:e=>i(Math.max(0,parseFloat(e.target.value.replace(/[^0-9.]/g,""))||0)),onBlur:p,onKeyDown:e=>{"Enter"===e.key&&p()}})]})}}},e=>{e.O(0,[9219,3219,9950,8370,6646,6834,7358],()=>e(e.s=2124)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[148,3719],{5403:(e,s,n)=>{Promise.resolve().then(n.t.bind(n,3283,23)),Promise.resolve().then(n.bind(n,235)),Promise.resolve().then(n.bind(n,6588)),Promise.resolve().then(n.bind(n,4414)),Promise.resolve().then(n.bind(n,6556)),Promise.resolve().then(n.bind(n,4942)),Promise.resolve().then(n.bind(n,2444)),Promise.resolve().then(n.bind(n,5787))}},e=>{e.O(0,[9219,3219,9950,8370,6646,6834,7358],()=>e(e.s=5403)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1536],{891:(e,s,a)=>{"use strict";a.d(s,{m:()=>c});var l=a(5076);let n={working:{c:"var(--sx-string)",pulse:!0,label:"working"},review:{c:"#e0a44e",label:"review"},blocked:{c:"#e8688f",label:"blocked"},idle:{c:"var(--text-faint)",label:"idle"}};function c({status:e,label:s=!1,size:a=8}){let i=n[e]??n.idle;return(0,l.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:5},title:i.label,children:[i.pulse?(0,l.jsx)("span",{className:"dotpulse"}):(0,l.jsx)("span",{style:{width:a,height:a,borderRadius:"50%",background:i.c,display:"inline-block",flex:`0 0 ${a}px`}}),s&&(0,l.jsx)("span",{style:{fontSize:11,color:i.c,fontWeight:600},children:i.label})]})}},1670:(e,s,a)=>{"use strict";a.d(s,{Dashboard:()=>P});var l=a(5076),n=a(8488),c=a(3283),i=a.n(c),t=a(8576),d=a(4552),r=a(891),o=a(3728);let h=["var(--sx-property)","var(--sx-type)","var(--sx-function)","var(--sx-number)","var(--sx-string)","var(--sx-operator)","var(--sx-keyword)","var(--accent)"];function x({value:e,max:s=100,size:a=64,thickness:n=7,color:c,track:i="var(--bg-active)",center:t,sub:d,className:r}){let o=(a-n)/2,h=a/2,m=2*Math.PI*o,u=s>0?Math.min(1,Math.max(0,e/s)):0,v=c??(u>=.85?"var(--sx-keyword)":u>=.6?"var(--sx-number)":"var(--sx-string)");return(0,l.jsxs)("div",{className:"donut-wrap"+(r?" "+r:""),style:{width:a,height:a},children:[(0,l.jsxs)("svg",{width:a,height:a,viewBox:`0 0 ${a} ${a}`,children:[(0,l.jsx)("circle",{cx:h,cy:h,r:o,fill:"none",stroke:i,strokeWidth:n}),(0,l.jsx)("circle",{cx:h,cy:h,r:o,fill:"none",stroke:v,strokeWidth:n,strokeLinecap:"round",strokeDasharray:`${u*m} ${m}`,transform:`rotate(-90 ${h} ${h})`,className:"donut-arc"})]}),(0,l.jsxs)("div",{className:"donut-center",children:[(0,l.jsx)("div",{className:"donut-num",style:{color:v,fontSize:Math.round(.26*a)},children:t??Math.round(100*u)+"%"}),d&&(0,l.jsx)("div",{className:"donut-sub",children:d})]})]})}function m({segments:e,size:s=96,thickness:a=12,center:n,sub:c,className:i}){let t=(s-a)/2,d=s/2,r=2*Math.PI*t,o=e.reduce((e,s)=>e+s.value,0)||1,h=0,x=e.filter(e=>e.value>0).map((e,s)=>{let n=e.value/o*r,c=(0,l.jsx)("circle",{cx:d,cy:d,r:t,fill:"none",stroke:e.color,strokeWidth:a,strokeDasharray:`${n} ${r-n}`,strokeDashoffset:-h,transform:`rotate(-90 ${d} ${d})`,className:"donut-arc"},s);return h+=n,c});return(0,l.jsxs)("div",{className:"donut-wrap"+(i?" "+i:""),style:{width:s,height:s},children:[(0,l.jsxs)("svg",{width:s,height:s,viewBox:`0 0 ${s} ${s}`,children:[(0,l.jsx)("circle",{cx:d,cy:d,r:t,fill:"none",stroke:"var(--bg-active)",strokeWidth:a}),x]}),(n||c)&&(0,l.jsxs)("div",{className:"donut-center",children:[n&&(0,l.jsx)("div",{className:"donut-num",style:{fontSize:Math.round(.2*s)},children:n}),c&&(0,l.jsx)("div",{className:"donut-sub",children:c})]})]})}function u({data:e,color:s="var(--accent)",width:a=120,height:n=34,fill:c=!0,className:i}){let t=0===e.length?[0,0]:1===e.length?[e[0],e[0]]:e,d=t.length,r=Math.max(...t),o=Math.min(...t),h=r-o||1,x=(a-4)/(d-1),m="M"+t.map((e,s)=>`${(2+s*x).toFixed(1)},${(n-2-(e-o)/h*(n-4)).toFixed(1)}`).join(" L"),v=`${m} L${(2+(d-1)*x).toFixed(1)},${n-2} L2,${n-2} Z`;return(0,l.jsxs)("svg",{className:"spark"+(i?" "+i:""),width:a,height:n,viewBox:`0 0 ${a} ${n}`,preserveAspectRatio:"none",children:[c&&(0,l.jsx)("path",{d:v,fill:s,opacity:.12}),(0,l.jsx)("path",{d:m,fill:"none",stroke:s,strokeWidth:1.6,strokeLinejoin:"round",strokeLinecap:"round"})]})}function v({segments:e,height:s=10,rounded:a=!0,className:n}){let c=e.reduce((e,s)=>e+s.value,0);return(0,l.jsx)("div",{className:"segbar"+(n?" "+n:""),style:{height:s,borderRadius:a?s:4},children:0===c?(0,l.jsx)("span",{className:"segbar-empty"}):e.filter(e=>e.value>0).map((e,s)=>(0,l.jsx)("span",{className:"segbar-seg",style:{width:`${e.value/c*100}%`,background:e.color},title:e.label},s))})}function p({pct:e,color:s="var(--accent)",height:a=8,className:n}){return(0,l.jsx)("div",{className:"pbar"+(n?" "+n:""),style:{height:a},children:(0,l.jsx)("span",{style:{width:Math.min(100,Math.max(0,e))+"%",background:s}})})}var g=a(5629),j=a(7814);let b=(0,j.createServerReference)("4046d28f96c5b3f275a96b91bc56e3057b5d1e676e",j.callServer,void 0,j.findSourceMapURL,"getDashboardSnapshot"),k=(0,j.createServerReference)("00268489a96d2d01278e132b397bf4255077295af6",j.callServer,void 0,j.findSourceMapURL,"startDevServer"),N=(0,j.createServerReference)("40b82525491ce2eafe97c6598bd4917186ccf3b438",j.callServer,void 0,j.findSourceMapURL,"releaseStaleLock");var f=a(6544),y=a(6177),w=a(6520),I=a(1931);let z=[{id:"today",key:"dash.filter.today"},{id:"7d",key:"dash.filter.7d"},{id:"30d",key:"dash.filter.30d"},{id:"month",key:"dash.filter.month"}],S={"start-dev":"dash.act.start",reindex:"dash.act.reindex","start-loop":"dash.act.start",open:"dash.act.open",configure:"dash.act.configure",reconnect:"dash.act.reconnect"},M={triage:"var(--text-faint)",todo:"var(--sx-property)",doing:"var(--sx-number)",blocked:"var(--sx-keyword)",review:"var(--sx-function)",done:"var(--sx-string)"},C={devServer:"cpu",production:"goto",agentLoop:"play",kb:"knowledge",storage:"files",models:"cpu",github:"goto",telegram:"send",testDev:"check",queues:"files",locks:"files",update:"refresh"},L={github:"goto",telegram:"send",models:"cpu",cli:"terminal",local:"cpu",update:"refresh"};function $(e){return"$"+e.toFixed(2)}function _(e){return e>=1e6?(e/1e6).toFixed(1)+"M":e>=1e3?(e/1e3).toFixed(1)+"K":String(e)}function R(e){if(!e)return"—";let s=Math.floor((Date.now()-e)/1e3);return s<60?s+"s":s<3600?Math.floor(s/60)+"m":s<86400?Math.floor(s/3600)+"h":Math.floor(s/86400)+"d"}function P({initial:e,runMode:s}){let a=(0,g.k)(),[c,j]=(0,n.useState)(e),[D,A]=(0,n.useState)({range:e.range,goalId:"",agentId:""}),E=(0,n.useRef)(D),[B,F]=(0,n.useState)(""),[,T]=(0,n.useTransition)(),[,O]=(0,n.useState)(0),W=(0,n.useCallback)(async()=>{let e=E.current;try{let s=await b({range:e.range,goalId:e.goalId||null,agentId:e.agentId||null});j(s)}catch{}},[]);function U(e){A(e),E.current=e,T(()=>{W()})}function q(e,s){F(e),T(async()=>{try{await s()}catch{}await W(),F("")})}(0,n.useEffect)(()=>{let e=setInterval(()=>{document.hidden||W()},1e4),s=setInterval(()=>{document.hidden||O(e=>e+1)},5e3);return()=>{clearInterval(e),clearInterval(s)}},[W]);let G=c.cards,K=c.tasksByCol.reduce((e,s)=>e+s.count,0),V=G.spend.trendPct,H=G.spend.cap>0?Math.min(100,G.spend.spent/G.spend.cap*100):0,J=Math.min(100,15*G.security.high+6*G.security.med+2*G.security.low),Q=G.security.high?"var(--sx-keyword)":G.security.open?"var(--sx-number)":"var(--sx-string)",X=[{value:G.agents.idle,color:"var(--text-faint)",label:a("dash.ag.idle")},{value:G.agents.working,color:"var(--sx-string)",label:a("dash.ag.working")},{value:G.agents.review,color:"var(--sx-number)",label:a("dash.ag.review")},{value:G.agents.blocked,color:"var(--sx-keyword)",label:a("dash.ag.blocked")}],Y=[{value:G.goals.active,color:"var(--accent)"},{value:G.goals.done,color:"var(--sx-string)"},{value:G.goals.blocked,color:"var(--sx-keyword)"}],Z=[{value:G.security.high,color:"var(--sx-keyword)"},{value:G.security.med,color:"var(--sx-number)"},{value:G.security.low,color:"var(--sx-property)"}],ee=c.kbByType.length>0,es=ee?c.kbByType.map((e,s)=>({value:e.total,color:h[s%h.length],label:e.type})):[{value:c.kb.embeddings,color:"var(--sx-string)",label:a("dash.kb.embeddings")},{value:Math.max(0,c.kb.chunks-c.kb.embeddings),color:"var(--bg-active)",label:a("dash.kb.chunks")}],ea=ee?c.kb.active:c.kb.chunks,el=ee?a("dash.kb.entries"):a("dash.kb.chunks");return(0,l.jsxs)("div",{className:"dash",children:[(0,l.jsxs)("div",{className:"dash-filters",children:[(0,l.jsx)("div",{className:"df-ranges",children:z.map(e=>(0,l.jsx)("button",{className:"df-chip"+(D.range===e.id?" on":""),onClick:()=>U({...D,range:e.id}),children:a(e.key)},e.id))}),(0,l.jsxs)("div",{className:"df-selects",children:[(0,l.jsx)(o.m,{value:D.goalId,onChange:e=>U({...D,goalId:e}),options:[{value:"",label:a("dash.filter.allGoals")},...c.goalOptions.map(e=>({value:e.id,label:e.title}))]}),(0,l.jsx)(o.m,{value:D.agentId,onChange:e=>U({...D,agentId:e}),options:[{value:"",label:a("dash.filter.allAgents")},...c.agents.map(e=>({value:e.id,label:e.name}))]})]}),(0,l.jsxs)("div",{className:"df-meta",children:[(0,l.jsxs)("span",{className:"df-updated",children:[a("dash.updated")," ",R(c.generatedAt)]}),(0,l.jsx)("button",{className:"df-refresh",disabled:!!B,onClick:()=>q("refresh",W),title:a("dash.refresh"),children:(0,l.jsx)(t.I,{name:"refresh",size:13})})]})]}),(0,l.jsxs)("div",{className:"dash-grid",children:[(0,l.jsxs)("div",{className:"dash-card stat-card",style:{gridColumn:"span 3"},children:[(0,l.jsxs)("h3",{children:[(0,l.jsx)(t.I,{name:"agents",size:14})," ",a("dash.agents")]}),(0,l.jsxs)("div",{className:"sc-body",children:[(0,l.jsxs)("div",{className:"sc-left",children:[(0,l.jsxs)("div",{className:"stat-num",children:[G.agents.activeNow,(0,l.jsxs)("span",{className:"stat-of",children:["/",G.agents.total]})]}),(0,l.jsx)("div",{className:"kpi-sub",children:a("dash.activeNow")})]}),(0,l.jsx)(x,{value:G.agents.activeNow,max:Math.max(1,G.agents.total),size:56,thickness:6,color:"var(--sx-string)",center:String(G.agents.activeNow)})]}),(0,l.jsx)(v,{segments:X,className:"sc-seg"}),(0,l.jsxs)("div",{className:"stat-chips",children:[(0,l.jsxs)("span",{children:[(0,l.jsx)("i",{className:"dotc",style:{background:"var(--sx-string)"}}),G.agents.working," ",a("dash.ag.working")]}),(0,l.jsxs)("span",{children:[(0,l.jsx)("i",{className:"dotc",style:{background:"var(--sx-number)"}}),G.agents.review," ",a("dash.ag.review")]}),(0,l.jsxs)("span",{className:G.agents.blocked?"bad":"",children:[(0,l.jsx)("i",{className:"dotc",style:{background:"var(--sx-keyword)"}}),G.agents.blocked," ",a("dash.ag.blocked")]})]}),(0,l.jsxs)("div",{className:"sc-foot",children:[(0,l.jsx)(t.I,{name:"pulse",size:11})," ",a("dash.ag.heartbeat")," ",R(G.agents.lastHeartbeat)]})]}),(0,l.jsxs)("div",{className:"dash-card stat-card",style:{gridColumn:"span 3"},children:[(0,l.jsxs)("h3",{children:[(0,l.jsx)(t.I,{name:"coins",size:14})," ",a("dash.spend")]}),(0,l.jsxs)("div",{className:"sc-body",children:[(0,l.jsxs)("div",{className:"sc-left",children:[(0,l.jsx)("div",{className:"stat-num",children:$(G.spend.spent)}),(0,l.jsx)("div",{className:"kpi-sub",children:G.spend.cap?`${Math.round(H)}% ${a("dash.ofCapShort",{cap:G.spend.cap})}`:`${_(G.spend.tokens)} ${a("dash.tokens")}`})]}),(0,l.jsx)(u,{data:c.spendSeries,color:"var(--accent)",width:104,height:42})]}),(0,l.jsx)(p,{pct:H,color:H>=85?"var(--sx-keyword)":H>=60?"var(--sx-number)":"var(--sx-string)",className:"sc-seg"}),(0,l.jsxs)("div",{className:"stat-chips",children:[(0,l.jsxs)("span",{className:"trend "+(V>0?"up":V<0?"down":""),children:[(0,l.jsx)(t.I,{name:V>0?"arrowUp":V<0?"arrowDown":"dot",size:11})," ",Math.abs(V),"%"]}),(0,l.jsx)("span",{children:a("dash.vsPrev")}),(0,l.jsxs)("span",{style:{marginLeft:"auto"},children:[_(G.spend.tokens)," ",a("dash.tokens")]})]})]}),(0,l.jsxs)("div",{className:"dash-card stat-card",style:{gridColumn:"span 3"},children:[(0,l.jsxs)("h3",{children:[(0,l.jsx)(t.I,{name:"shield",size:14})," ",a("mod.security")]}),(0,l.jsxs)("div",{className:"sc-body",children:[(0,l.jsxs)("div",{className:"sc-left",children:[(0,l.jsx)("div",{className:"stat-num",style:{color:Q},children:G.security.score}),(0,l.jsx)("div",{className:"kpi-sub",children:a("dash.openFindings",{n:G.security.open})})]}),(0,l.jsx)(x,{value:J,max:100,size:56,thickness:6,color:Q,center:String(G.security.open),sub:a("dash.openShort")})]}),(0,l.jsx)(v,{segments:Z,className:"sc-seg"}),(0,l.jsxs)("div",{className:"stat-chips",children:[(0,l.jsxs)("span",{className:G.security.high?"bad":"",children:[(0,l.jsx)("i",{className:"dotc",style:{background:"var(--sx-keyword)"}}),G.security.high," ",a("dash.sev.high")]}),(0,l.jsxs)("span",{children:[(0,l.jsx)("i",{className:"dotc",style:{background:"var(--sx-number)"}}),G.security.med," ",a("dash.sev.med")]}),(0,l.jsxs)("span",{children:[(0,l.jsx)("i",{className:"dotc",style:{background:"var(--sx-property)"}}),G.security.low," ",a("dash.sev.low")]})]}),(0,l.jsxs)("div",{className:"sc-foot",children:[(0,l.jsx)(t.I,{name:"refresh",size:11})," ",a("dash.lastScan")," ",R(G.security.lastScan)]})]}),(0,l.jsxs)("div",{className:"dash-card stat-card",style:{gridColumn:"span 3"},children:[(0,l.jsxs)("h3",{children:[(0,l.jsx)(t.I,{name:"target",size:14})," ",a("mod.goals")]}),(0,l.jsxs)("div",{className:"sc-body",children:[(0,l.jsxs)("div",{className:"sc-left",children:[(0,l.jsxs)("div",{className:"stat-num",children:[G.goals.avgProgress,(0,l.jsx)("span",{className:"stat-of",children:"%"})]}),(0,l.jsx)("div",{className:"kpi-sub",children:a("dash.avgActive",{n:G.goals.active})})]}),(0,l.jsx)(x,{value:G.goals.avgProgress,max:100,size:56,thickness:6,color:"var(--accent)"})]}),(0,l.jsx)(v,{segments:Y,className:"sc-seg"}),(0,l.jsxs)("div",{className:"stat-chips",children:[(0,l.jsxs)("span",{children:[(0,l.jsx)("i",{className:"dotc",style:{background:"var(--accent)"}}),G.goals.active," ",a("dash.go.active")]}),(0,l.jsxs)("span",{children:[(0,l.jsx)("i",{className:"dotc",style:{background:"var(--sx-string)"}}),G.goals.done," ",a("dash.go.done")]}),(0,l.jsxs)("span",{className:G.goals.blocked?"bad":"",children:[(0,l.jsx)("i",{className:"dotc",style:{background:"var(--sx-keyword)"}}),G.goals.blocked," ",a("dash.go.blocked")]})]})]})]}),(0,l.jsxs)("div",{className:"dash-card",children:[(0,l.jsxs)("h3",{children:[(0,l.jsx)(t.I,{name:"pulse",size:14})," ",a("dash.healthTitle")]}),(0,l.jsx)("div",{className:"hcard-grid",children:c.health.map(e=>(0,l.jsxs)("div",{className:"hcard",children:[(0,l.jsxs)("div",{className:"hc-top",children:[(0,l.jsx)("span",{className:"hc-ic",children:(0,l.jsx)(t.I,{name:C[e.key]??"dot",size:14})}),(0,l.jsx)("span",{className:"hc-name",children:a("dash.health."+e.key)}),(0,l.jsx)("span",{className:"hdot "+e.status,style:{marginLeft:"auto"}})]}),(0,l.jsx)("div",{className:"hc-detail",children:e.detail}),(0,l.jsxs)("div",{className:"hc-foot",children:[(0,l.jsx)("span",{className:"hc-badge "+e.status,children:a("dash.hstatus."+e.status)}),"start-dev"===e.action||"reindex"===e.action||"start-loop"===e.action?(0,l.jsx)("button",{className:"hi-act",disabled:!!B,onClick:()=>"start-dev"===e.action?q("h-"+e.key,k):"reindex"===e.action?q("h-"+e.key,y.f):"start-loop"===e.action?q("h-"+e.key,()=>(0,f.D)("start")):void 0,children:B==="h-"+e.key?"…":a(S[e.action])}):e.href?(0,l.jsx)(i(),{className:"hi-act",href:e.href,children:a(S[e.action??"open"]??"dash.act.open")}):null]})]},e.key))})]}),(0,l.jsxs)("div",{className:"dash-grid",children:[(0,l.jsxs)("div",{className:"dash-card",style:{gridColumn:"span 7"},children:[(0,l.jsxs)("h3",{children:[(0,l.jsx)(t.I,{name:"play",size:14})," ",a("dash.execTitle")]}),c.execution&&"running"===c.execution.runState?(0,l.jsxs)("div",{className:"exec-panel",children:[(0,l.jsxs)("div",{className:"exec-head",children:[(0,l.jsx)("span",{className:"dotpulse"}),(0,l.jsx)("span",{className:"exec-goal",children:c.execution.goalTitle??c.execution.issueTitle??"—"}),c.execution.agentName&&(0,l.jsx)("span",{className:"exec-agent",children:c.execution.agentName}),(0,l.jsx)("span",{className:"exec-elapsed mono",children:c.execution.elapsedMs?R(Date.now()-c.execution.elapsedMs):""})]}),(0,l.jsxs)("div",{className:"exec-grid",children:[(0,l.jsxs)("div",{className:"exec-row",children:[(0,l.jsx)("span",{className:"ex-k",children:a("dash.exec.issue")}),(0,l.jsx)("span",{className:"ex-v",children:c.execution.issueTitle??"—"})]}),(0,l.jsxs)("div",{className:"exec-row",children:[(0,l.jsx)("span",{className:"ex-k",children:a("dash.exec.next")}),(0,l.jsx)("span",{className:"ex-v",children:c.execution.nextStep??"—"})]}),(0,l.jsxs)("div",{className:"exec-row",children:[(0,l.jsx)("span",{className:"ex-k",children:a("dash.exec.review")}),(0,l.jsx)("span",{className:"ex-v",children:c.execution.reviewOpen??0})]}),(0,l.jsxs)("div",{className:"exec-row",children:[(0,l.jsx)("span",{className:"ex-k",children:a("dash.exec.tests")}),(0,l.jsx)("span",{className:"ex-v",children:c.execution.testStatus?a("dash.test."+c.execution.testStatus):"—"})]}),(0,l.jsxs)("div",{className:"exec-row",children:[(0,l.jsx)("span",{className:"ex-k",children:a("dash.exec.locks")}),(0,l.jsx)("span",{className:"ex-v",children:c.execution.lockedFiles??0})]})]})]}):(0,l.jsxs)("div",{className:"exec-blank",children:[(0,l.jsx)("span",{className:"exec-blank-ic",children:(0,l.jsx)(t.I,{name:"play",size:22})}),(0,l.jsx)("div",{className:"exec-blank-t",children:a("dash.exec.none."+(c.execution?.runState??"idle"))}),(0,l.jsxs)("div",{className:"exec-cta",children:[(0,l.jsxs)(i(),{className:"btn-accent",href:"/planner",children:[(0,l.jsx)(t.I,{name:"target",size:13})," ",a("dash.exec.planner")]}),(0,l.jsxs)("button",{className:"btn-ghost",disabled:!!B,onClick:()=>q("loop",()=>(0,f.D)("off"===s?"start":"off")),children:[(0,l.jsx)(t.I,{name:"play",size:13})," ","off"===s?a("dash.exec.startLoop"):a("dash.exec.pauseLoop")]}),(0,l.jsxs)(i(),{className:"btn-ghost",href:"/inbox",children:[(0,l.jsx)(t.I,{name:"bell",size:13})," ",a("dash.exec.pending")]})]})]})]}),(0,l.jsxs)("div",{className:"dash-card",style:{gridColumn:"span 5"},children:[(0,l.jsxs)("h3",{children:[(0,l.jsx)(t.I,{name:"files",size:14})," ",a("dash.tasksByStatus")]}),(0,l.jsx)(v,{segments:c.tasksByCol.map(e=>({value:e.count,color:M[e.col]})),height:12,className:"tasks-seg"}),(0,l.jsx)("div",{className:"tasks-rows",children:c.tasksByCol.map(e=>{let s=K?Math.round(e.count/K*100):0;return(0,l.jsxs)(i(),{href:"/tasks",className:"taskrow",children:[(0,l.jsx)("span",{className:"tr-dot",style:{background:M[e.col]}}),(0,l.jsx)("span",{className:"tr-name",children:a("dash.col."+e.col)}),(0,l.jsx)("span",{className:"tr-track",children:(0,l.jsx)("span",{className:"tr-fill",style:{width:s+"%",background:M[e.col]}})}),(0,l.jsxs)("span",{className:"tr-val",children:[e.count,(0,l.jsxs)("span",{className:"tr-pct",children:[" ",s,"%"]})]})]},e.col)})})]})]}),(0,l.jsxs)("div",{className:"dash-grid",children:[(0,l.jsxs)("div",{className:"dash-card",style:{gridColumn:"span 7"},children:[(0,l.jsxs)("h3",{children:[(0,l.jsx)(t.I,{name:"bot",size:14})," ",a("dash.activeAgents")]}),0===c.agents.length?(0,l.jsxs)("div",{className:"exec-blank",children:[(0,l.jsx)("span",{className:"exec-blank-ic",children:(0,l.jsx)(t.I,{name:"bot",size:22})}),(0,l.jsx)("div",{className:"exec-blank-t",children:a("dash.noActive")}),(0,l.jsxs)("div",{className:"exec-cta",children:[(0,l.jsxs)("button",{className:"btn-accent",disabled:!!B,onClick:()=>q("loop",()=>(0,f.D)("start")),children:[(0,l.jsx)(t.I,{name:"play",size:13})," ",a("dash.exec.startLoop")]}),(0,l.jsxs)(i(),{className:"btn-ghost",href:"/agents/ada",children:[(0,l.jsx)(t.I,{name:"agents",size:13})," ",a("dash.openStudio")]}),(0,l.jsxs)(i(),{className:"btn-ghost",href:"/config",children:[(0,l.jsx)(t.I,{name:"settings",size:13})," ",a("dash.runConfig")]})]})]}):(0,l.jsx)("div",{className:"agent-grid",children:c.agents.map(e=>{let s=c.costByAgent[e.id]??0;return(0,l.jsxs)("div",{className:"agent-card",children:[(0,l.jsx)(d.e,{name:e.name,color:e.color,size:32,health:e.health}),(0,l.jsxs)("div",{className:"ac-main",children:[(0,l.jsxs)("div",{className:"ac-top",children:[(0,l.jsx)("span",{className:"ac-name",children:e.name}),(0,l.jsx)(r.m,{status:e.status})]}),(0,l.jsxs)("div",{className:"ac-meta",children:[(0,l.jsx)("span",{className:"ac-model mono",children:e.model}),s>0&&(0,l.jsx)("span",{className:"ac-cost",children:$(s)})]}),(0,l.jsx)("div",{className:"ac-task",children:e.taskTitle??a("dash.ag."+e.status)}),(0,l.jsxs)("div",{className:"ac-hb",children:[(0,l.jsx)(t.I,{name:"pulse",size:10})," ",R(e.lastPulseMs)]})]})]},e.id)})})]}),(0,l.jsxs)("div",{className:"dash-card",style:{gridColumn:"span 5"},children:[(0,l.jsxs)("h3",{children:[(0,l.jsx)(t.I,{name:"bell",size:14})," ",a("dash.alerts")]}),0===c.alerts.length?(0,l.jsx)("div",{className:"home-empty",children:a("dash.nothingNeedsYou")}):c.alerts.map(e=>(0,l.jsxs)(i(),{href:"/inbox",className:"alert-group",children:[(0,l.jsx)("span",{className:"ag-badge p"+e.priority,children:e.count}),(0,l.jsxs)("span",{className:"ag-text",children:[a("dash.alert."+e.kind),e.agentName?` \xb7 ${e.agentName}`:""]}),(0,l.jsx)("span",{className:"ag-time",children:R(e.latestAtMs)})]},e.key))]})]}),c.problems.length>0&&(0,l.jsxs)("div",{className:"dash-card",children:[(0,l.jsxs)("h3",{children:[(0,l.jsx)(t.I,{name:"warn",size:14})," ",a("dash.problemsTitle")]}),c.problems.map(e=>(0,l.jsxs)("div",{className:"problem-row",children:[(0,l.jsx)("span",{className:"prob-sev "+e.severity,children:a("dash.sev."+e.severity)}),(0,l.jsxs)("div",{className:"pr-main",children:[(0,l.jsx)("div",{className:"pr-title",children:a(e.title)}),(0,l.jsx)("div",{className:"pr-impact",children:a(e.impact)})]}),(0,l.jsx)(i(),{className:"hi-act",href:e.href,children:a(S[e.action]??"dash.act.open")})]},e.key))]}),(0,l.jsxs)("div",{className:"dash-grid",children:[(0,l.jsxs)("div",{className:"dash-card",style:{gridColumn:"span 7"},children:[(0,l.jsxs)("h3",{children:[(0,l.jsx)(t.I,{name:"knowledge",size:14})," ",a("dash.kbTitle")]}),0===c.kb.chunks?(0,l.jsxs)("div",{className:"exec-blank",children:[(0,l.jsx)("span",{className:"exec-blank-ic",children:(0,l.jsx)(t.I,{name:"knowledge",size:22})}),(0,l.jsx)("div",{className:"exec-blank-t",children:a("dash.kb.empty")}),(0,l.jsxs)("div",{className:"exec-cta",children:[(0,l.jsxs)("button",{className:"btn-accent",disabled:!!B,onClick:()=>q("kb-seed",I.V),children:[(0,l.jsx)(t.I,{name:"add",size:13})," ",a("dash.kb.createBlocks")]}),(0,l.jsxs)(i(),{className:"btn-ghost",href:"/knowledge",children:[(0,l.jsx)(t.I,{name:"knowledge",size:13})," ",a("dash.kb.open")]})]})]}):(0,l.jsxs)("div",{className:"kb-body",children:[(0,l.jsxs)("div",{className:"kb-donut",children:[(0,l.jsx)(m,{segments:es,size:104,thickness:13,center:String(ea),sub:el}),(0,l.jsx)("div",{className:"kb-legend",children:ee?c.kbByType.slice(0,6).map((e,s)=>(0,l.jsxs)("span",{className:"kb-leg",children:[(0,l.jsx)("i",{className:"dotc",style:{background:h[s%h.length]}}),e.type," ",(0,l.jsx)("b",{children:e.total})]},e.type)):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("span",{className:"kb-leg",children:[(0,l.jsx)("i",{className:"dotc",style:{background:"var(--sx-string)"}}),a("dash.kb.embeddings")," ",(0,l.jsx)("b",{children:c.kb.embeddings})]}),(0,l.jsxs)("span",{className:"kb-leg",children:[(0,l.jsx)("i",{className:"dotc",style:{background:"var(--bg-active)"}}),a("dash.kb.chunks")," ",(0,l.jsx)("b",{children:c.kb.chunks})]})]})})]}),(0,l.jsxs)("div",{className:"kb-right",children:[(0,l.jsxs)("div",{className:"kb-tiles",children:[(0,l.jsxs)("div",{className:"ks",children:[(0,l.jsx)("div",{className:"ks-v",children:c.kb.chunks}),(0,l.jsx)("div",{className:"ks-k",children:a("dash.kb.chunks")})]}),(0,l.jsxs)("div",{className:"ks",children:[(0,l.jsx)("div",{className:"ks-v",children:c.kb.embeddings}),(0,l.jsx)("div",{className:"ks-k",children:a("dash.kb.embeddings")})]}),(0,l.jsxs)("div",{className:"ks",children:[(0,l.jsx)("div",{className:"ks-v",children:c.kb.recentQueries}),(0,l.jsx)("div",{className:"ks-k",children:a("dash.kb.queries")})]}),(0,l.jsxs)("div",{className:"ks",children:[(0,l.jsx)("div",{className:"ks-v"+(c.kb.gaps?" warn":""),children:c.kb.gaps}),(0,l.jsx)("div",{className:"ks-k",children:a("dash.kb.gaps")})]}),(0,l.jsxs)("div",{className:"ks",children:[(0,l.jsx)("div",{className:"ks-v",children:R(c.kb.lastReindexMs)}),(0,l.jsx)("div",{className:"ks-k",children:a("dash.kb.lastReindex")})]}),(0,l.jsxs)("div",{className:"ks",children:[(0,l.jsx)("div",{className:"ks-v"+(c.kb.semantic?"":" warn"),children:c.kb.semantic?"●":"○"}),(0,l.jsx)("div",{className:"ks-k",children:a("dash.kb.semantic")})]})]}),(0,l.jsxs)("div",{className:"exec-cta",children:[(0,l.jsxs)(i(),{className:"btn-ghost",href:"/knowledge",children:[(0,l.jsx)(t.I,{name:"knowledge",size:13})," ",a("dash.kb.open")]}),(0,l.jsxs)("button",{className:"btn-ghost",disabled:!!B,onClick:()=>q("kb-reindex",y.f),children:[(0,l.jsx)(t.I,{name:"refresh",size:13})," ",a("dash.kb.reindex")]}),(0,l.jsxs)("button",{className:"btn-ghost",disabled:!!B,onClick:()=>q("kb-curate",w.O),children:[(0,l.jsx)(t.I,{name:"skill",size:13})," ",a("dash.kb.curate")]})]})]})]})]}),(0,l.jsxs)("div",{className:"dash-card",style:{gridColumn:"span 5"},children:[(0,l.jsxs)("h3",{children:[(0,l.jsx)(t.I,{name:"ext",size:14})," ",a("dash.integTitle")]}),(0,l.jsx)("div",{className:"integ-grid",children:c.integrations.map(e=>(0,l.jsxs)("div",{className:"integ-card",children:[(0,l.jsx)("span",{className:"ic-ic",children:(0,l.jsx)(t.I,{name:L[e.key]??"ext",size:14})}),(0,l.jsxs)("div",{className:"ic-main",children:[(0,l.jsx)("div",{className:"ic-name",children:a("dash.integ."+e.key)}),(0,l.jsx)("div",{className:"ic-detail",children:e.detail})]}),(0,l.jsx)("span",{className:"integ-chip "+e.status,children:a("dash.integStatus."+e.status)})]},e.key))})]})]}),c.locks.length>0&&(0,l.jsxs)("div",{className:"dash-card",children:[(0,l.jsxs)("h3",{children:[(0,l.jsx)(t.I,{name:"files",size:14})," ",a("dash.locksTitle")]}),c.locks.map(e=>(0,l.jsxs)("div",{className:"lock-row",children:[(0,l.jsx)(t.I,{name:"files",size:13}),(0,l.jsx)("span",{className:"lk-path mono",children:e.path}),(0,l.jsxs)("span",{className:"lk-by",children:["@",e.agentHandle]}),(0,l.jsx)("button",{className:"hi-act",disabled:!!B,onClick:()=>q("lock-"+e.path,()=>N(e.path)),children:a("dash.locks.release")})]},e.path))]})]})}},1931:(e,s,a)=>{"use strict";a.d(s,{V:()=>n});var l=a(7814);let n=(0,l.createServerReference)("005ea234d96275090327f7e2dcce8ca4432f5fe72c",l.callServer,void 0,l.findSourceMapURL,"seedDefaultBlocksAction")},3728:(e,s,a)=>{"use strict";a.d(s,{m:()=>d});var l=a(5076),n=a(8488),c=a(8576),i=a(9265),t=a(5629);function d({value:e,options:s,onChange:a,placeholder:r,mono:o,glyph:h,disabled:x,searchable:m}){let u=(0,t.k)(),[v,p]=(0,n.useState)(!1),[g,j]=(0,n.useState)(""),b=(0,n.useRef)(null),k=(0,n.useRef)(null),N=(0,n.useMemo)(()=>(s||[]).map(e=>"string"==typeof e?{value:e,label:e}:e),[s]),f=N.find(s=>s.value===e),y=(m??N.length>8)&&!x,w=g.trim().toLowerCase(),I=y&&w?N.filter(e=>(e.label+" "+e.value+" "+(e.sub||"")).toLowerCase().includes(w)):N;return(0,n.useEffect)(()=>{if(!v)return void j("");function e(e){b.current&&!b.current.contains(e.target)&&p(!1)}function s(e){"Escape"===e.key&&p(!1)}return document.addEventListener("mousedown",e),document.addEventListener("keydown",s),y&&requestAnimationFrame(()=>k.current?.focus()),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",s)}},[v,y]),(0,l.jsxs)("div",{className:"dd"+(v?" open":"")+(x?" disabled":""),ref:b,children:[(0,l.jsxs)("button",{type:"button",className:"dd-btn"+(o?" mono":""),onClick:()=>!x&&p(e=>!e),children:[h&&f&&(0,l.jsx)(i.W,{id:f.glyphId||f.value,size:20}),(0,l.jsx)("span",{className:"dd-val",children:f?f.label:(0,l.jsx)("span",{className:"dd-ph",children:r||u("common.selectEllipsis")})}),(0,l.jsx)(c.I,{name:"chevronDown",size:14})]}),v&&(0,l.jsxs)("div",{className:"dd-menu scroll",children:[y&&(0,l.jsxs)("div",{style:{position:"sticky",top:0,zIndex:1,display:"flex",alignItems:"center",gap:6,padding:"6px 8px",margin:"-4px -4px 4px",background:"var(--bg-elev, var(--bg-active))",borderBottom:"1px solid var(--border)"},children:[(0,l.jsx)(c.I,{name:"search",size:13}),(0,l.jsx)("input",{ref:k,value:g,placeholder:u("common.searchEllipsis"),onChange:e=>j(e.target.value),onKeyDown:e=>{"Enter"===e.key&&I[0]?(a(I[0].value),p(!1)):"Escape"===e.key&&g&&(e.stopPropagation(),j(""))},className:o?"mono":void 0,style:{flex:1,minWidth:0,background:"transparent",border:"none",outline:"none",color:"var(--text)",fontSize:12.5,fontFamily:o?"var(--mono-font)":"inherit"}}),g&&(0,l.jsx)("button",{type:"button",title:u("common.clear"),onClick:()=>{j(""),k.current?.focus()},style:{background:"none",border:"none",color:"var(--text-dim)",cursor:"pointer",display:"flex",padding:0},children:(0,l.jsx)(c.I,{name:"close",size:12})})]}),0===N.length&&(0,l.jsx)("div",{className:"dd-empty",children:u("common.noOptions")}),N.length>0&&0===I.length&&(0,l.jsx)("div",{className:"dd-empty",children:u("dropdown.noMatch",{q:g})}),I.map(s=>(0,l.jsxs)("button",{type:"button",className:"dd-opt"+(s.value===e?" on":""),onClick:()=>{a(s.value),p(!1)},children:[h&&(0,l.jsx)(i.W,{id:s.glyphId||s.value,size:22}),(0,l.jsxs)("span",{className:"dd-opt-main",children:[(0,l.jsx)("span",{className:"dd-opt-label"+(o?" mono":""),children:s.label}),s.sub&&(0,l.jsx)("span",{className:"dd-opt-sub",children:s.sub})]}),s.tag&&(0,l.jsx)("span",{className:"dd-opt-tag",children:s.tag}),s.value===e&&(0,l.jsx)(c.I,{name:"check",size:13})]},s.value))]})]})}},4552:(e,s,a)=>{"use strict";a.d(s,{e:()=>n});var l=a(5076);function n({name:e,color:s,size:a=24,health:c,image:i}){let t=Math.max(6,Math.round(.3*a)),d=Math.round(.28*a),r=i?/^(data:|https?:|\/)/.test(i)?i:`/api/upload?path=${encodeURIComponent(i)}`:null;return(0,l.jsxs)("span",{style:{position:"relative",width:a,height:a,flex:`0 0 ${a}px`,display:"inline-block"},children:[r?(0,l.jsx)("img",{src:r,alt:e,width:a,height:a,style:{width:a,height:a,borderRadius:d,objectFit:"cover",display:"block"}}):(0,l.jsx)("span",{style:{width:a,height:a,borderRadius:d,background:s,color:"#fff",display:"grid",placeItems:"center",fontSize:Math.round(.42*a),fontWeight:700},children:(e[0]||"?").toUpperCase()}),c&&(0,l.jsx)("span",{style:{position:"absolute",right:-1,bottom:-1,width:t,height:t,borderRadius:"50%",background:"alive"===c?"var(--sx-string)":"stale"===c?"var(--sx-number)":"var(--text-faint)",border:"1.5px solid var(--bg-elevated)"}})]})}},6177:(e,s,a)=>{"use strict";a.d(s,{f:()=>n});var l=a(7814);let n=(0,l.createServerReference)("0012956bf2d3bbcb43f67d38b3aa8dfae55ac33977",l.callServer,void 0,l.findSourceMapURL,"reindexKbAction")},6520:(e,s,a)=>{"use strict";a.d(s,{O:()=>n});var l=a(7814);let n=(0,l.createServerReference)("002014c503129e70c12e060d2d82613f53e06ed951",l.callServer,void 0,l.findSourceMapURL,"curateKbAction")},6544:(e,s,a)=>{"use strict";a.d(s,{D:()=>n});var l=a(7814);let n=(0,l.createServerReference)("4058c9447c6db1cfaceee0db2490f11726cf348d6a",l.callServer,void 0,l.findSourceMapURL,"setRunMode")},7327:(e,s,a)=>{Promise.resolve().then(a.t.bind(a,3283,23)),Promise.resolve().then(a.bind(a,1670)),Promise.resolve().then(a.bind(a,235)),Promise.resolve().then(a.bind(a,6588)),Promise.resolve().then(a.bind(a,4414)),Promise.resolve().then(a.bind(a,6556)),Promise.resolve().then(a.bind(a,4942)),Promise.resolve().then(a.bind(a,2444)),Promise.resolve().then(a.bind(a,5787))},9265:(e,s,a)=>{"use strict";a.d(s,{W:()=>t});var l=a(5076),n=a(8488);let c={anthropic:"anthropic",claude_code:"claude",openai:"openai",codex_cli:"openai",google:"google",google_gemini:"gemini",gemini_cli:"gemini",vertex_ai:"vertexai",mistral:"mistral",deepseek:"deepseek",cohere:"cohere",perplexity:"perplexity",xai_grok:"grok",groq:"groq",ai21:"ai21",nvidia_nim:"nvidia",huggingface:"huggingface",replicate:"replicate",azure_openai:"azure",aws_bedrock:"bedrock",cloudflare:"cloudflare",dashscope:"qwen",zhipu:"zhipu",moonshot:"moonshot",minimax:"minimax",together:"together",openrouter:"openrouter",fireworks:"fireworks",cerebras:"cerebras",ollama:"ollama",ollama_cli:"ollama",lmstudio:"lmstudio",vllm:"vllm",localai:"localai",elevenlabs:"elevenlabs",stability:"stability",jina:"jina",voyage:"voyage"},i={anthropic:["#d97757","An"],openai:["#10a37f","AI"],google_gemini:["#4285f4","G"],google:["#4285f4","G"],mistral:["#fa520f","Mi"],xai_grok:["#1a1a1a","X"],deepseek:["#4d6bfe","DS"],cohere:["#39594d","Co"],ai21:["#e8488a","A2"],perplexity:["#20808d","Px"],groq:["#f55036","Gq"],nvidia_nim:["#76b900","NV"],together:["#0f6fff","To"],fireworks:["#5019c5","Fw"],cerebras:["#f25733","Cb"],huggingface:["#ff9d00","HF"],replicate:["#1a1a1a","Rp"],openrouter:["#6566f1","OR"],litellm:["#00b8a3","LL"],portkey:["#3b5bdb","Pk"],azure_openai:["#0078d4","Az"],aws_bedrock:["#ff9900","Br"],vertex_ai:["#4285f4","Vx"],cloudflare:["#f38020","Cf"],dashscope:["#ff6a00","Qw"],zhipu:["#3859ff","GL"],moonshot:["#16162a","Ki"],minimax:["#e1342c","MM"],ollama:["#0c0c0c","Ol"],llamacpp:["#7a4ddb","Lc"],lmstudio:["#4a5cff","LM"],vllm:["#1668dc","vL"],localai:["#2e7d32","La"],gpt4all:["#5b6cff","G4"],jan:["#1a1a1a","Jn"],claude_code:["#d97757","CC"],codex_cli:["#10a37f","Cx"],gemini_cli:["#4285f4","Gc"],aider:["#14b8a6","Ad"],ollama_cli:["#0c0c0c","Oc"],openclaw:["#e8590c","OC"],hermes_cli:["#6d28d9","Hm"],opencode:["#1a1a1a","Oc"],copilot_cli:["#1f2328","Co"],cursor_cli:["#1a1a1a","Cu"],cline_cli:["#2563eb","Cl"],kilo_code:["#7c3aed","Ki"],voyage:["#5b21b6","Vo"],jina:["#ec4899","Ji"],stability:["#a855f7","St"],elevenlabs:["#1a1a1a","El"]};function t({id:e,size:s=34,radius:a}){let d,r=i[e],o=r?r[0]:"#5b6378",h=r?r[1]:(e||"?").slice(0,2).replace(/[^a-z0-9]/gi,"").toUpperCase(),x=(d=c[e])?`https://cdn.jsdelivr.net/npm/@lobehub/icons-static-svg/icons/${d}.svg`:null,[m,u]=(0,n.useState)(!1),v=null!=a?a:Math.round(.28*s),p=x&&!m,g=Math.round(.66*s);return(0,l.jsx)("span",{className:"prov-glyph",style:{width:s,height:s,flex:"0 0 "+s+"px",borderRadius:v,background:p?"#fff":"linear-gradient(150deg, "+o+", color-mix(in srgb, "+o+" 70%, #000))",color:"#fff",display:"grid",placeItems:"center",overflow:"hidden",fontSize:Math.round(.4*s),fontWeight:800,letterSpacing:"-.5px",boxShadow:p?"inset 0 0 0 1px rgba(0,0,0,.08)":"inset 0 1px 0 rgba(255,255,255,.18)"},children:p?(0,l.jsx)("img",{src:x,alt:"",width:g,height:g,loading:"lazy",onError:()=>u(!0),style:{width:g,height:g,objectFit:"contain",display:"block"}}):h})}}},e=>{e.O(0,[9219,3219,9950,8370,6646,6834,7358],()=>e(e.s=7327)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1387],{404:(e,s,n)=>{Promise.resolve().then(n.t.bind(n,3283,23)),Promise.resolve().then(n.bind(n,3341)),Promise.resolve().then(n.bind(n,235)),Promise.resolve().then(n.bind(n,6588)),Promise.resolve().then(n.bind(n,4414)),Promise.resolve().then(n.bind(n,6556)),Promise.resolve().then(n.bind(n,4942)),Promise.resolve().then(n.bind(n,2444)),Promise.resolve().then(n.bind(n,5787))},3341:(e,s,n)=>{"use strict";n.d(s,{DocEditor:()=>m});var t=n(5076),a=n(8488),i=n(4302),o=n(5393),r=n(8576),c=n(7814);let l=(0,c.createServerReference)("60a7ac3c98e3ad2117823cb6ef29aa37974b11b1b9",c.callServer,void 0,c.findSourceMapURL,"saveDoc");var d=n(5629);function m({docId:e,path:s,initial:n}){let c=(0,d.k)(),[h,v]=(0,a.useState)(!1),[b,u]=(0,a.useState)(n),[x,j]=(0,a.useTransition)();return(0,t.jsxs)("div",{className:"card",style:{maxWidth:880},children:[(0,t.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center",marginBottom:12},children:[h?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("button",{className:"btn-accent",disabled:x,onClick:()=>j(async()=>{await l(e,b),v(!1)}),children:[(0,t.jsx)(r.I,{name:"check",size:13})," ",c(x?"common.saving":"docsedit.saveMd")]}),(0,t.jsx)("button",{className:"btn-ghost",onClick:()=>{u(n),v(!1)},children:c("common.cancel")})]}):(0,t.jsxs)("button",{className:"btn-ghost",onClick:()=>v(!0),children:[(0,t.jsx)(r.I,{name:"command",size:13})," ",c("common.edit")]}),(0,t.jsx)("span",{className:"mono",style:{marginLeft:"auto",fontSize:11,color:"var(--text-faint)"},children:s})]}),h?(0,t.jsx)("textarea",{className:"persona-ta mono",style:{minHeight:460,width:"100%"},value:b,onChange:e=>u(e.target.value)}):(0,t.jsx)("div",{className:"md",children:b.trim()?(0,t.jsx)(i.oz,{remarkPlugins:[o.A],children:b}):(0,t.jsx)("div",{className:"muted",children:c("docsedit.emptyFile")})})]})}}},e=>{e.O(0,[9219,9690,3219,9950,8370,6646,6834,7358],()=>e(e.s=404)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1059],{1703:(e,s,n)=>{"use strict";n.d(s,{GenerateDocsButton:()=>l});var r=n(5076),i=n(8488),o=n(9860),t=n(8576),c=n(7814);let a=(0,c.createServerReference)("005fdbc1e7982ad96d3823514a3fdf7955ecc8ef8b",c.callServer,void 0,c.findSourceMapURL,"generateDocs");var d=n(5629);function l(){let e=(0,d.k)(),[s,n]=(0,i.useTransition)(),c=(0,o.useRouter)();return(0,r.jsxs)("button",{className:"btn-accent",disabled:s,onClick:()=>n(async()=>{await a(),c.refresh()}),children:[(0,r.jsx)(t.I,{name:"doc",size:14,className:s?"sync-spin":""})," ",e(s?"docs.writing":"docs.generate")]})}},3438:(e,s,n)=>{Promise.resolve().then(n.t.bind(n,3283,23)),Promise.resolve().then(n.bind(n,1703)),Promise.resolve().then(n.bind(n,235)),Promise.resolve().then(n.bind(n,6588)),Promise.resolve().then(n.bind(n,4414)),Promise.resolve().then(n.bind(n,6556)),Promise.resolve().then(n.bind(n,4942)),Promise.resolve().then(n.bind(n,2444)),Promise.resolve().then(n.bind(n,5787))}},e=>{e.O(0,[9219,3219,9950,8370,6646,6834,7358],()=>e(e.s=3438)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8191],{1716:(e,s,t)=>{"use strict";t.d(s,{R:()=>n});var i=t(5076);function n({name:e}){let s={ts:{t:"TS",c:"#3178c6"},tsx:{t:"TS",c:"#3178c6"},js:{t:"JS",c:"#f0c000"},jsx:{t:"JS",c:"#f0c000"},json:{t:"{}",c:"#cbab35"},md:{t:"M↓",c:"#7d8590"},css:{t:"#",c:"#42a5f5"}}[e.split(".").pop()??""]||{t:"\xb7",c:"#7d8590"};return(0,i.jsx)("span",{style:{fontSize:9,fontWeight:700,fontFamily:"var(--mono-font, monospace)",color:s.c,lineHeight:1,letterSpacing:"-.5px"},children:s.t})}},2010:(e,s,t)=>{"use strict";t.d(s,{GitHubFlow:()=>S});var i=t(5076),n=t(8488),a=t(9860),l=t(8576),r=t(4552),o=t(1716),c=t(2799),d=t(7814);let h=(0,d.createServerReference)("005ddda8f3a66691e67c306bef9847b8667b14a402",d.callServer,void 0,d.findSourceMapURL,"listRepos"),m=(0,d.createServerReference)("403aa6627a3967b3dc05f17b294d6cdab5936cfd79",d.callServer,void 0,d.findSourceMapURL,"setRepo"),g=(0,d.createServerReference)("40af5bca204e9f035ec0c0bd88607d6f3ae5a5c86a",d.callServer,void 0,d.findSourceMapURL,"createRepo"),u=(0,d.createServerReference)("00f6740a30935cd4715d852275b45ba0077d0b30b3",d.callServer,void 0,d.findSourceMapURL,"refreshGitStatus"),x=(0,d.createServerReference)("4070dfecb0ee005a86d2ea1cd95938c6fb15995dca",d.callServer,void 0,d.findSourceMapURL,"connectGitHub"),f=(0,d.createServerReference)("00294381ec9f25ec5af63f23a7b16d6084a6363f4b",d.callServer,void 0,d.findSourceMapURL,"disconnectGitHub"),b=(0,d.createServerReference)("0034a229323e97b080590cd5f66eac9f35c36ac57f",d.callServer,void 0,d.findSourceMapURL,"draftCommitMessage"),p=(0,d.createServerReference)("4082ef99d84b609643278f415d9cdf338e37b0f430",d.callServer,void 0,d.findSourceMapURL,"commitPush"),v=(0,d.createServerReference)("0059ee3de2c00051f1eb386a230ed7b555f02e51c8",d.callServer,void 0,d.findSourceMapURL,"scanWorkspace");var j=t(4055),y=t(5629);function N({current:e}){let[s,t]=(0,n.useState)(!1),[r,o]=(0,n.useState)(null),[c,d]=(0,n.useState)(""),[u,x]=(0,n.useState)(""),[f,b]=(0,n.useState)(!0),[p,v]=(0,n.useState)(""),[j,k]=(0,n.useTransition)(),S=(0,a.useRouter)(),w=(0,y.k)(),z=(r??[]).filter(e=>!c.trim()||e.full.toLowerCase().includes(c.trim().toLowerCase()));return(0,i.jsxs)("div",{className:"card",style:{marginBottom:16},children:[(0,i.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,i.jsx)("div",{className:"detail-label",style:{margin:0,flex:1},children:w("github.repo.label")}),(0,i.jsxs)("button",{className:"link-btn",onClick:function(){t("pick"),v(""),o(null),k(async()=>{let e=await h();e.ok?o(e.repos.map(e=>({full:e.full,private:e.private}))):v(e.error??w("github.repo.listError"))})},disabled:j,children:[(0,i.jsx)(l.I,{name:"git",size:12})," ",e?w("github.repo.change"):w("common.select")]}),(0,i.jsxs)("button",{className:"link-btn",onClick:()=>{t("new"),v("")},disabled:j,children:[(0,i.jsx)(l.I,{name:"add",size:12})," ",w("github.repo.new")]})]}),(0,i.jsx)("div",{style:{fontFamily:"var(--mono-font)",fontSize:12.5,color:e?"var(--accent)":"var(--text-faint)",marginTop:4},children:e||w("github.repo.noOrigin")}),"pick"===s&&(0,i.jsxs)("div",{style:{marginTop:10},children:[(0,i.jsxs)("div",{className:"dm-search",style:{marginBottom:8},children:[(0,i.jsx)(l.I,{name:"search",size:13}),(0,i.jsx)("input",{placeholder:w("github.repo.filterPlaceholder"),value:c,onChange:e=>d(e.target.value),autoFocus:!0})]}),null===r&&(0,i.jsxs)("div",{className:"muted",style:{fontSize:12},children:[(0,i.jsx)("span",{className:"spin",children:(0,i.jsx)(l.I,{name:"refresh",size:12})})," ",w("github.repo.loading")]}),p&&(0,i.jsxs)("div",{className:"form-hint",style:{color:"var(--sx-number)"},children:[(0,i.jsx)(l.I,{name:"close",size:12})," ",p]}),(0,i.jsxs)("div",{className:"scroll",style:{maxHeight:220,overflowY:"auto"},children:[z.map(e=>(0,i.jsxs)("button",{className:"lrow",style:{width:"100%",cursor:"pointer"},disabled:j,onClick:()=>{var s;return s=e.full,void k(async()=>{let e=await m(s);e.ok?(t(!1),S.refresh()):v(e.error??"")})},children:[(0,i.jsx)(l.I,{name:"git",size:14,style:{color:"var(--text-faint)"}}),(0,i.jsx)("span",{className:"lr-main",children:(0,i.jsx)("span",{className:"lr-title",style:{fontFamily:"var(--mono-font)",fontSize:12.5},children:e.full})}),(0,i.jsx)("span",{className:"pill",style:{fontSize:10},children:e.private?w("github.repo.private"):w("github.repo.public")})]},e.full)),null!==r&&0===z.length&&(0,i.jsx)("div",{className:"muted",style:{fontSize:12,padding:8},children:w("github.repo.noRepos")})]})]}),"new"===s&&(0,i.jsxs)("div",{style:{marginTop:10},children:[(0,i.jsx)("input",{className:"form-input mono",placeholder:"new-repo-name",value:u,onChange:e=>x(e.target.value),autoFocus:!0}),(0,i.jsxs)("label",{style:{display:"flex",alignItems:"center",gap:8,marginTop:8,fontSize:12.5,color:"var(--text-dim)"},children:[(0,i.jsx)("input",{type:"checkbox",checked:f,onChange:e=>b(e.target.checked)})," ",w("github.repo.privateRepo")]}),p&&(0,i.jsxs)("div",{className:"form-hint",style:{color:"var(--sx-number)"},children:[(0,i.jsx)(l.I,{name:"close",size:12})," ",p]}),(0,i.jsxs)("div",{style:{display:"flex",gap:8,marginTop:10},children:[(0,i.jsx)("button",{className:"btn-accent",onClick:function(){v(""),u.trim()&&k(async()=>{let e=await g({name:u,private:f});e.ok?(t(!1),x(""),S.refresh()):v(e.error??"")})},disabled:j||!u.trim(),children:j?w("github.repo.creating"):w("github.repo.createSetOrigin")}),(0,i.jsx)("button",{className:"btn-ghost",onClick:()=>t(!1),children:w("common.cancel")})]})]})]})}function k(){let[e,s]=(0,n.useTransition)(),t=(0,a.useRouter)(),r=(0,y.k)();return(0,i.jsxs)("button",{className:"link-btn",disabled:e,onClick:()=>s(async()=>{await u(),t.refresh()}),children:[e?(0,i.jsx)("span",{className:"spin",children:(0,i.jsx)(l.I,{name:"refresh",size:12})}):(0,i.jsx)(l.I,{name:"refresh",size:12})," ",r("github.refreshChanges")]})}function S({linked:e,repo:s,changes:t,deploys:a,assistant:d,oauthAvailable:h}){let m,g,u,w,z,[I,R]=(0,n.useState)(h?"oauth":"token"),[C,T]=(0,n.useState)(""),[M,F]=(0,n.useState)(""),[U,L]=(0,n.useState)(""),[P,$]=(0,n.useState)(!1),[H,O]=(0,n.useState)(!1),[_,B]=(0,n.useState)("idle"),[W,E]=(0,n.useState)(null),[G,J]=(0,n.useTransition)(),Y=(0,y.k)();function A(e,t=!1){O(e),B("committing"),J(async()=>{B("pushing");let i=await p({repo:s.full,branch:s.branch,message:U||"chore: sync workspace to remote",delegated:e,force:t});E(i),B("done"),i.blocked||setTimeout(()=>{B("idle"),L(""),O(!1),E(null)},3800)})}let[D,K]=(0,n.useState)(null),[q,Q]=(0,n.useState)(!0);return e?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("button",{className:"link-btn",style:{marginBottom:10},onClick:function(){J(async()=>{await f()})},disabled:G,children:[(0,i.jsx)(l.I,{name:"settings",size:12})," ",Y("github.disconnect")]}),(0,i.jsx)(N,{current:s.full}),(0,i.jsxs)("div",{className:"card",style:{marginBottom:16},children:[(0,i.jsx)("div",{className:"detail-label",children:Y("github.flow.title")}),(0,i.jsxs)("div",{className:"gh-flow",children:[(0,i.jsxs)("div",{className:"gf-node",children:[(0,i.jsx)("div",{className:"gf-t",children:Y("github.flow.workspace")}),(0,i.jsxs)("div",{className:"gf-s",children:[t.length," ",Y(1===t.length?"github.flow.change.one":"github.flow.change.other")]})]}),(0,i.jsx)("span",{className:"gf-arrow",children:(0,i.jsx)(l.I,{name:"chevronRight",size:18})}),(0,i.jsxs)("div",{className:"gf-node",children:[(0,i.jsx)("div",{className:"gf-t",children:Y("github.flow.commit")}),(0,i.jsx)("div",{className:"gf-s",children:s.branch})]}),(0,i.jsx)("span",{className:"gf-arrow",children:(0,i.jsx)(l.I,{name:"chevronRight",size:18})}),(0,i.jsxs)("div",{className:"gf-node",children:[(0,i.jsx)("div",{className:"gf-t",children:"origin"}),(0,i.jsx)("div",{className:"gf-s",children:"github.com"})]})]})]}),(0,i.jsxs)("div",{className:"card",style:{marginBottom:16},children:[(0,i.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,i.jsxs)("button",{onClick:()=>Q(e=>!e),style:{flex:1,display:"flex",alignItems:"center",gap:7,background:"none",border:"none",padding:0,cursor:"pointer",textAlign:"left"},children:[(0,i.jsx)(l.I,{name:"chevronDown",size:13,style:{color:"var(--text-dim)",transform:q?"none":"rotate(-90deg)",transition:"transform .15s"}}),(0,i.jsx)("span",{className:"detail-label",style:{margin:0},children:Y("github.changes.title")}),t.length>0&&(0,i.jsx)("span",{className:"pill",style:{fontSize:10},children:t.length})]}),(0,i.jsx)(k,{})]}),q&&(0===t.length?(0,i.jsx)("div",{className:"muted",style:{fontSize:12.5,marginTop:6},children:Y("github.changes.clean")}):(0,i.jsx)("div",{className:"scroll",style:{maxHeight:340,marginTop:6,overflowY:"auto"},children:t.map(e=>(0,i.jsxs)("div",{className:"gh-stat",children:[(0,i.jsx)(o.R,{name:e.name}),(0,i.jsx)("span",{className:"gs-file",children:e.path}),(0,i.jsx)("span",{className:"gstat "+e.st,style:{fontFamily:"var(--mono-font)",fontWeight:700},children:e.st})]},e.path))}))]}),(0,i.jsxs)("div",{className:"card",children:[(0,i.jsx)("div",{className:"detail-label",children:Y("github.commit.message")}),(0,i.jsx)("textarea",{className:"persona-ta mono",rows:3,placeholder:Y("github.commit.placeholder"),value:U,onChange:e=>L(e.target.value)}),(0,i.jsxs)("button",{className:"assist-btn",onClick:function(){$(!0),J(async()=>{let e=await b();e.ok&&L(e.message),$(!1)})},disabled:P||0===t.length,style:{marginTop:8},children:[P?(0,i.jsx)("span",{className:"spin",children:(0,i.jsx)(l.I,{name:"refresh",size:13})}):(0,i.jsx)(l.I,{name:"skill",size:13}),P?Y("github.commit.drafting"):Y("github.commit.generate")]}),"idle"===_?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{style:{display:"flex",gap:8,marginTop:14},children:[(0,i.jsxs)("button",{className:"btn-accent",onClick:()=>A(!1),disabled:!U.trim()||0===t.length,children:[(0,i.jsx)(l.I,{name:"arrowUp",size:14})," ",Y("github.commit.commitPush")]}),(0,i.jsxs)("button",{className:"btn-ghost",onClick:function(){K(null),J(async()=>{let e=await v();K({findings:e.findings,scanned:e.scanned})})},disabled:0===t.length,children:[(0,i.jsx)(l.I,{name:"shield",size:13})," ",Y("github.commit.securityScan")]})]}),D&&(0,i.jsx)("div",{className:"card",style:{marginTop:10,borderColor:D.findings.length?"color-mix(in srgb, var(--sx-keyword) 45%, var(--border))":void 0},children:0===D.findings.length?(0,i.jsxs)("div",{style:{fontSize:12.5,color:"var(--sx-string)"},children:[(0,i.jsx)(l.I,{name:"check",size:13})," ",Y("github.scan.clean",{n:D.scanned})]}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{style:{fontSize:12.5,color:"var(--sx-keyword)",fontWeight:700,marginBottom:6},children:[(0,i.jsx)(l.I,{name:"shield",size:13})," ",Y("github.scan.risks",{n:D.findings.length})]}),D.findings.slice(0,30).map((e,s)=>(0,i.jsxs)("div",{style:{fontSize:11.5,fontFamily:"var(--mono-font)",color:"var(--text-dim)",display:"flex",gap:8},children:[(0,i.jsx)("span",{style:{color:"var(--sx-keyword)"},children:e.kind}),(0,i.jsxs)("span",{style:{flex:1},children:[e.file,e.line?":"+e.line:""]}),(0,i.jsx)("span",{style:{color:"var(--text-faint)"},children:e.preview})]},s))]})})]}):(0,i.jsxs)("div",{style:{marginTop:14},children:[(m=W?W.pushed?`${Y("github.progress.pushed",{branch:s.branch})}${W.prUrl?H?` \xb7 ${Y("github.progress.agentOpenedPr",{name:d?.name??Y("github.progress.agent")})}`:` \xb7 ${Y("github.progress.prOpened")}`:""}`:W.committed?`${Y("github.progress.committedLocal")}${W.sha?` (${W.sha})`:""}${Y("github.progress.notPushedSuffix")}`:W.nothing?Y("github.progress.nothing"):Y("github.progress.failed"):Y("github.progress.finishing"),g="done"===_&&null!=W&&!W.ok,u=[["committing",Y("github.progress.committing",{n:t.length})],["pushing",Y("github.progress.pushing",{branch:s.branch})],["done",m]],z=(w=["committing","pushing","done"]).indexOf(_),u.map(([e,s])=>{let t=w.indexOf(e),n=t<z||"done"===_&&"done"===e?"done":t===z?"on":"",a="done"===e&&g;return(0,i.jsxs)("div",{className:"gh-progress-step "+(a?"":n),children:[(0,i.jsx)("span",{className:"gp-ico",children:a?(0,i.jsx)(l.I,{name:"close",size:13}):"done"===n?(0,i.jsx)(l.I,{name:"check",size:14}):"on"===n?(0,i.jsx)("span",{className:"spin",children:(0,i.jsx)(l.I,{name:"refresh",size:13})}):(0,i.jsx)(l.I,{name:"dot",size:8})}),s]},e)})),W?.error&&(0,i.jsxs)("div",{className:"form-hint",style:{marginTop:8,color:"var(--sx-number)"},children:[(0,i.jsx)(l.I,{name:"shield",size:12})," ",W.error]}),W?.blocked&&W.secrets&&W.secrets.length>0&&(0,i.jsxs)("div",{className:"card",style:{marginTop:10,borderColor:"color-mix(in srgb, var(--sx-keyword) 45%, var(--border))"},children:[W.secrets.slice(0,30).map((e,s)=>(0,i.jsxs)("div",{style:{fontSize:11.5,fontFamily:"var(--mono-font)",color:"var(--text-dim)",display:"flex",gap:8},children:[(0,i.jsx)("span",{style:{color:"var(--sx-keyword)"},children:e.kind}),(0,i.jsxs)("span",{style:{flex:1},children:[e.file,e.line?":"+e.line:""]}),(0,i.jsx)("span",{style:{color:"var(--text-faint)"},children:e.preview})]},s)),(0,i.jsxs)("div",{style:{display:"flex",gap:8,marginTop:10},children:[(0,i.jsx)("button",{className:"btn-ghost",onClick:()=>{B("idle"),E(null)},children:Y("github.blocked.fixRetry")}),(0,i.jsx)("button",{className:"btn-accent",style:{background:"var(--sx-keyword)"},onClick:()=>{confirm(Y("github.blocked.confirm"))&&A(H,!0)},children:Y("github.blocked.commitAnyway")})]})]}),W?.blocked&&(!W.secrets||0===W.secrets.length)&&(0,i.jsx)("button",{className:"btn-ghost",style:{marginTop:8},onClick:()=>{B("idle"),E(null)},children:Y("github.blocked.ok")}),W?.prUrl&&(0,i.jsxs)("a",{className:"link-btn",href:W.prUrl,target:"_blank",rel:"noreferrer",style:{marginTop:8,display:"inline-flex"},children:[(0,i.jsx)(l.I,{name:"git",size:12})," ",Y("github.viewPr")]})]}),"idle"===_&&d&&(0,i.jsxs)("div",{className:"agent-do",children:[(0,i.jsx)(r.e,{name:d.name,color:d.color,size:30,health:d.health}),(0,i.jsxs)("div",{style:{flex:1},children:[(0,i.jsx)("div",{className:"sr-title",children:Y("github.delegate.title")}),(0,i.jsx)("div",{className:"sr-sub",children:Y("github.delegate.sub",{name:d.name})})]}),(0,i.jsxs)("button",{className:"btn-ghost",onClick:()=>{L(U||"chore: sync workspace to remote"),A(!0)},disabled:0===t.length,children:[(0,i.jsx)(l.I,{name:"bot",size:13})," ",Y("github.delegate.button")]})]})]}),a.length>0&&(0,i.jsxs)("div",{className:"card",style:{marginTop:16},children:[(0,i.jsx)("div",{className:"detail-label",children:Y("github.recentPushes")}),(0,i.jsx)("div",{className:"scroll",style:{maxHeight:260,overflowY:"auto"},children:a.map(e=>(0,i.jsxs)("div",{className:"gh-stat",children:[(0,i.jsx)(l.I,{name:"git",size:13,style:{color:"var(--text-faint)"}}),(0,i.jsx)("span",{className:"gs-file",style:{fontFamily:"var(--ui-font)"},children:e.text}),(0,i.jsx)("span",{style:{fontSize:11,color:"var(--text-faint)"},children:(0,c.f)(e.at)})]},e.id))})]})]}):(0,i.jsxs)("div",{className:"card",children:[(0,i.jsxs)("div",{className:"gh-auth-tabs",children:[(0,i.jsx)("button",{className:"seg-opt"+("oauth"===I?" on":""),onClick:()=>R("oauth"),style:{flex:"none",padding:"7px 14px"},children:Y("github.auth.githubLogin")}),(0,i.jsx)("button",{className:"seg-opt"+("token"===I?" on":""),onClick:()=>R("token"),style:{flex:"none",padding:"7px 14px"},children:Y("github.auth.personalToken")})]}),"oauth"===I?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("button",{className:"oauth-btn",disabled:!h||G,onClick:()=>h&&j.Jv.social({provider:"github",callbackURL:"/github"}),children:[(0,i.jsx)(l.I,{name:"git",size:15}),Y("github.auth.signInWithGithub")]}),(0,i.jsx)("div",{className:"form-hint",style:{marginTop:8},children:h?(0,i.jsx)(i.Fragment,{children:Y("github.auth.authorizeHint")}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(l.I,{name:"shield",size:12})," ",Y("github.auth.oauthNotConfigured")]})})]}):(0,i.jsxs)("div",{className:"form-field",children:[(0,i.jsx)("label",{className:"form-label",children:Y("github.auth.patLabel")}),(0,i.jsx)("input",{className:"form-input mono",type:"password",placeholder:"ghp_…",value:C,onChange:e=>{T(e.target.value),F("")}}),(0,i.jsxs)("div",{className:"form-hint",children:[(0,i.jsx)(l.I,{name:"shield",size:12})," ",Y("github.auth.patHint")]}),M&&(0,i.jsxs)("div",{className:"form-hint",style:{color:"var(--sx-number)"},children:[(0,i.jsx)(l.I,{name:"close",size:12})," ",M]}),(0,i.jsxs)("button",{className:"btn-accent",style:{marginTop:10},onClick:function(){C.length<7||(F(""),J(async()=>{let e=await x(C);e.ok||F(e.error??Y("github.connectError"))}))},disabled:C.length<7||G,children:[G?(0,i.jsx)("span",{className:"spin",children:(0,i.jsx)(l.I,{name:"refresh",size:13})}):(0,i.jsx)(l.I,{name:"git",size:13}),G?Y("github.auth.verifying"):Y("common.connect")]})]})]})}},2799:(e,s,t)=>{"use strict";function i(e){if(!e)return"";let s=Math.max(0,Math.floor((Date.now()-("number"==typeof e?e*(e<1e12?1e3:1):e.getTime()))/1e3));if(s<60)return"now";let t=Math.floor(s/60);if(t<60)return t+"m";let i=Math.floor(t/60);if(i<24)return i+"h";let n=Math.floor(i/24);return n<7?n+"d":Math.floor(n/7)+"w"}t.d(s,{f:()=>i})},4055:(e,s,t)=>{"use strict";t.d(s,{Jv:()=>l,yK:()=>a});var i=t(5138),n=t(8618);let a=(0,i.M)({baseURL:window.location.origin,plugins:[(0,n.N)()]}),{signIn:l,signUp:r,signOut:o,useSession:c,twoFactor:d}=a},4552:(e,s,t)=>{"use strict";t.d(s,{e:()=>n});var i=t(5076);function n({name:e,color:s,size:t=24,health:a,image:l}){let r=Math.max(6,Math.round(.3*t)),o=Math.round(.28*t),c=l?/^(data:|https?:|\/)/.test(l)?l:`/api/upload?path=${encodeURIComponent(l)}`:null;return(0,i.jsxs)("span",{style:{position:"relative",width:t,height:t,flex:`0 0 ${t}px`,display:"inline-block"},children:[c?(0,i.jsx)("img",{src:c,alt:e,width:t,height:t,style:{width:t,height:t,borderRadius:o,objectFit:"cover",display:"block"}}):(0,i.jsx)("span",{style:{width:t,height:t,borderRadius:o,background:s,color:"#fff",display:"grid",placeItems:"center",fontSize:Math.round(.42*t),fontWeight:700},children:(e[0]||"?").toUpperCase()}),a&&(0,i.jsx)("span",{style:{position:"absolute",right:-1,bottom:-1,width:r,height:r,borderRadius:"50%",background:"alive"===a?"var(--sx-string)":"stale"===a?"var(--sx-number)":"var(--text-faint)",border:"1.5px solid var(--bg-elevated)"}})]})}},9206:(e,s,t)=>{Promise.resolve().then(t.t.bind(t,3283,23)),Promise.resolve().then(t.bind(t,2010)),Promise.resolve().then(t.bind(t,235)),Promise.resolve().then(t.bind(t,6588)),Promise.resolve().then(t.bind(t,4414)),Promise.resolve().then(t.bind(t,6556)),Promise.resolve().then(t.bind(t,4942)),Promise.resolve().then(t.bind(t,2444)),Promise.resolve().then(t.bind(t,5787))}},e=>{e.O(0,[9219,7555,3219,9950,8370,6646,6834,7358],()=>e(e.s=9206)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[296],{891:(e,s,a)=>{"use strict";a.d(s,{m:()=>i});var l=a(5076);let t={working:{c:"var(--sx-string)",pulse:!0,label:"working"},review:{c:"#e0a44e",label:"review"},blocked:{c:"#e8688f",label:"blocked"},idle:{c:"var(--text-faint)",label:"idle"}};function i({status:e,label:s=!1,size:a=8}){let n=t[e]??t.idle;return(0,l.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:5},title:n.label,children:[n.pulse?(0,l.jsx)("span",{className:"dotpulse"}):(0,l.jsx)("span",{style:{width:a,height:a,borderRadius:"50%",background:n.c,display:"inline-block",flex:`0 0 ${a}px`}}),s&&(0,l.jsx)("span",{style:{fontSize:11,color:n.c,fontWeight:600},children:n.label})]})}},4552:(e,s,a)=>{"use strict";a.d(s,{e:()=>t});var l=a(5076);function t({name:e,color:s,size:a=24,health:i,image:n}){let o=Math.max(6,Math.round(.3*a)),c=Math.round(.28*a),r=n?/^(data:|https?:|\/)/.test(n)?n:`/api/upload?path=${encodeURIComponent(n)}`:null;return(0,l.jsxs)("span",{style:{position:"relative",width:a,height:a,flex:`0 0 ${a}px`,display:"inline-block"},children:[r?(0,l.jsx)("img",{src:r,alt:e,width:a,height:a,style:{width:a,height:a,borderRadius:c,objectFit:"cover",display:"block"}}):(0,l.jsx)("span",{style:{width:a,height:a,borderRadius:c,background:s,color:"#fff",display:"grid",placeItems:"center",fontSize:Math.round(.42*a),fontWeight:700},children:(e[0]||"?").toUpperCase()}),i&&(0,l.jsx)("span",{style:{position:"absolute",right:-1,bottom:-1,width:o,height:o,borderRadius:"50%",background:"alive"===i?"var(--sx-string)":"stale"===i?"var(--sx-number)":"var(--text-faint)",border:"1.5px solid var(--bg-elevated)"}})]})}},4663:(e,s,a)=>{"use strict";a.d(s,{NewGoalButton:()=>c});var l=a(5076),t=a(8488),i=a(7814);let n=(0,i.createServerReference)("401d9e8cf6502442583eb393ebef473c7eabcfd529",i.callServer,void 0,i.findSourceMapURL,"createGoal");var o=a(5629);function c({agents:e}){let s=(0,o.k)(),[a,i]=(0,t.useState)(!1),[r,d]=(0,t.useState)(""),[h,g]=(0,t.useState)(""),[u,m]=(0,t.useState)(e[0]?.id??""),[p,v]=(0,t.useTransition)();return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("button",{className:"btn-accent",onClick:()=>i(!0),children:["+ ",s("goals.new")]}),a&&(0,l.jsx)("div",{className:"modal-overlay",onMouseDown:()=>i(!1),children:(0,l.jsxs)("div",{className:"modal",style:{padding:"20px 22px",width:440,maxWidth:"94vw"},onMouseDown:e=>e.stopPropagation(),children:[(0,l.jsx)("div",{style:{fontSize:15,fontWeight:800,marginBottom:10},children:s("goals.new")}),(0,l.jsx)("label",{className:"form-label",children:s("goals.objective")}),(0,l.jsx)("input",{className:"form-input",autoFocus:!0,value:r,onChange:e=>d(e.target.value),placeholder:s("goals.objectivePlaceholder")}),(0,l.jsx)("label",{className:"form-label",children:s("common.description")}),(0,l.jsx)("textarea",{className:"form-input",rows:3,value:h,onChange:e=>g(e.target.value),placeholder:s("goals.descPlaceholder")}),(0,l.jsx)("label",{className:"form-label",children:s("goals.owner")}),(0,l.jsx)("select",{className:"form-input",value:u,onChange:e=>m(e.target.value),children:e.map(e=>(0,l.jsxs)("option",{value:e.id,children:[e.name," \xb7 ",e.role]},e.id))}),(0,l.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end",gap:8,marginTop:16},children:[(0,l.jsx)("button",{className:"btn-ghost",onClick:()=>i(!1),children:s("common.cancel")}),(0,l.jsx)("button",{className:"btn-accent",disabled:!r.trim()||p,onClick:function(){v(async()=>{await n({title:r,description:h,ownerId:u}),i(!1),d(""),g("")})},children:s(p?"goals.creating":"goals.create")})]})]})})]})}},4899:(e,s,a)=>{Promise.resolve().then(a.t.bind(a,3283,23)),Promise.resolve().then(a.bind(a,8248)),Promise.resolve().then(a.bind(a,4663)),Promise.resolve().then(a.bind(a,235)),Promise.resolve().then(a.bind(a,6588)),Promise.resolve().then(a.bind(a,4414)),Promise.resolve().then(a.bind(a,6556)),Promise.resolve().then(a.bind(a,4942)),Promise.resolve().then(a.bind(a,2444)),Promise.resolve().then(a.bind(a,5787))},5695:(e,s,a)=>{"use strict";function l(e){if(null==e)return"";let s=e instanceof Date?e:new Date(e);if(isNaN(s.getTime()))return"";let a=s.toLocaleDateString([],{day:"2-digit",month:"short"}),l=s.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"});return`${a}, ${l}`}a.d(s,{F:()=>l})},8248:(e,s,a)=>{"use strict";a.d(s,{GoalTree:()=>f});var l=a(5076),t=a(8488),i=a(9860),n=a(8576),o=a(4552),c=a(891),r=a(7814);let d=(0,r.createServerReference)("404f3a69a763df38c2e7a1e5a53c5057ca23ea0e0e",r.callServer,void 0,r.findSourceMapURL,"cancelGoal"),h=(0,r.createServerReference)("401ce0d0044b68d616330136c7b91df842222ec656",r.callServer,void 0,r.findSourceMapURL,"archiveGoal"),g=(0,r.createServerReference)("40b49cdc69f9863d8fd47031ae35fc68c16bc561d7",r.callServer,void 0,r.findSourceMapURL,"reopenGoal"),u=(0,r.createServerReference)("400f2e8a55aa1c3ad79fc0293cb651de89a22df6e1",r.callServer,void 0,r.findSourceMapURL,"restoreGoal");var m=a(5695),p=a(5629);function v({id:e,status:s,progress:a}){let o=(0,p.k)(),[c,r]=(0,t.useTransition)(),m=(0,i.useRouter)(),x=s=>r(async()=>{await s(e),m.refresh()});return(0,l.jsxs)("div",{className:"goal-actions",children:["active"===s&&a<100&&(0,l.jsxs)("button",{className:"goal-act danger",disabled:c,onClick:()=>{confirm(o("goals.cancelConfirm"))&&x(d)},children:[(0,l.jsx)(n.I,{name:"close",size:12})," ",o("common.cancel")]}),("active"===s||"cancelled"===s||"done"===s)&&(0,l.jsxs)("button",{className:"goal-act",disabled:c,onClick:()=>x(h),children:[(0,l.jsx)(n.I,{name:"collapse",size:12})," ",o("goals.archive")]}),"cancelled"===s&&(0,l.jsxs)("button",{className:"goal-act accent",disabled:c,onClick:()=>x(g),children:[(0,l.jsx)(n.I,{name:"refresh",size:12})," ",o("goals.reopen")]}),"archived"===s&&(0,l.jsxs)("button",{className:"goal-act accent",disabled:c,onClick:()=>x(u),children:[(0,l.jsx)(n.I,{name:"refresh",size:12})," ",o("goals.restore")]})]})}let x={active:"active",done:"done",cancelled:"cancelled",archived:"archived"};function f({goals:e}){let s=(0,p.k)(),[a,i]=(0,t.useState)("active"),[r,d]=(0,t.useState)("all"),[h,g]=(0,t.useState)(new Set),u=(0,t.useMemo)(()=>{let s=new Map;for(let a of e)for(let e of a.issues)e.assignee&&s.set(e.assignee.handle,e.assignee.name);return[...s.entries()]},[e]),b=e.filter(e=>"all"===a||e.status===a);return 0===e.length?(0,l.jsx)("div",{className:"muted",style:{padding:30,textAlign:"center"},children:s("goals.empty")}):(0,l.jsxs)("div",{className:"goal-tree",children:[(0,l.jsxs)("div",{className:"goal-filters",children:[(0,l.jsx)("div",{className:"seg",children:["active","done","cancelled","archived","all"].map(e=>(0,l.jsx)("button",{className:"seg-opt"+(a===e?" on":""),onClick:()=>i(e),children:s(`goals.status.${e}`)},e))}),u.length>0&&(0,l.jsxs)("select",{className:"goal-agent-sel",value:r,onChange:e=>d(e.target.value),children:[(0,l.jsx)("option",{value:"all",children:s("goals.allAgents")}),u.map(([e,s])=>(0,l.jsx)("option",{value:e,children:s},e))]})]}),0===b.length&&(0,l.jsx)("div",{className:"muted",style:{padding:24,textAlign:"center"},children:s("goals.emptyFiltered",{status:s(`goals.status.${a}`).toLowerCase()})}),b.map(e=>{let a,t=h.has(e.id),i=e.issues.filter(e=>"all"===r||e.assignee?.handle===r),d=e.issues.filter(e=>e.progress>=100).length;return(0,l.jsx)("div",{className:"goal-node",children:(0,l.jsxs)("div",{className:"goal-card status-"+(x[e.status]??"active"),children:[(0,l.jsxs)("div",{className:"goal-head",children:[(0,l.jsx)("button",{className:"side-act",title:t?s("goals.expand"):s("goals.collapse"),style:{flex:"0 0 auto"},onClick:()=>g(s=>{let a=new Set(s);return a.has(e.id)?a.delete(e.id):a.add(e.id),a}),children:(0,l.jsx)(n.I,{name:t?"chevronRight":"chevronDown",size:13})}),(0,l.jsx)(n.I,{name:"target",size:15,style:{color:"var(--accent)",flex:"0 0 auto"}}),(0,l.jsx)("span",{className:"goal-title",children:e.title}),(0,l.jsx)("span",{className:"goal-status-badge "+(x[e.status]??"active"),children:s(`goals.status.${e.status}`)}),(0,l.jsxs)("span",{className:"chip-sm",children:[e.progress,"%"]})]}),e.description&&(0,l.jsx)("div",{className:"goal-desc",children:e.description}),(0,l.jsx)("div",{className:"pbar",children:(0,l.jsx)("span",{style:{width:e.progress+"%"}})}),(0,l.jsxs)("div",{className:"goal-bottom",children:[(0,l.jsxs)("div",{className:"goal-meta",children:[s("goals.meta.complete",{done:d,total:e.issues.length})," \xb7 ",s(1!==e.issues.length?"goals.meta.childIssues.other":"goals.meta.childIssues.one",{n:e.issues.length}),(a="done"===e.status?[s("goals.stamp.done"),e.doneAt]:"cancelled"===e.status?[s("goals.stamp.cancelled"),e.cancelledAt]:"archived"===e.status?[s("goals.stamp.archived"),e.archivedAt]:[s("goals.stamp.created"),e.createdAt])[1]?(0,l.jsxs)("span",{style:{color:"var(--text-faint)"},children:[" \xb7 ",a[0]," ",(0,m.F)(a[1])]}):null]}),(0,l.jsx)(v,{id:e.id,status:e.status,progress:e.progress})]}),!t&&(0,l.jsxs)("div",{className:"goal-issues",children:[0===i.length&&(0,l.jsx)("div",{className:"goal-issue-empty",children:"all"!==r?s("goals.noIssuesForAgent"):s("goals.noIssuesYet")}),i.map(e=>(0,l.jsxs)("div",{className:"goal-issue",children:[(0,l.jsx)("span",{className:"gi-key",children:e.key}),(0,l.jsxs)("div",{className:"gi-main",children:[(0,l.jsxs)("div",{className:"gi-title-row",children:[(0,l.jsx)("span",{className:"gi-title",children:e.title}),e.assignee&&(0,l.jsx)(o.e,{name:e.assignee.name,color:e.assignee.color,size:18}),(0,l.jsxs)("span",{className:"gi-col col-"+e.col,children:[(0,l.jsx)(c.m,{status:"doing"===e.col?"working":"blocked"===e.col?"blocked":"review"===e.col?"review":"idle"})," ",s(`goals.col.${e.col}`)]})]}),(0,l.jsxs)("div",{className:"gi-prog",children:[(0,l.jsx)("span",{className:"gi-bar",children:(0,l.jsx)("span",{style:{width:e.progress+"%"}})}),(0,l.jsxs)("span",{className:"gi-pct",children:[e.progress,"%",e.steps.total>0?` \xb7 ${s("goals.todos",{done:e.steps.done,total:e.steps.total})}`:""]}),e.updatedAt&&(0,l.jsx)("span",{style:{fontSize:10,color:"var(--text-faint)",marginLeft:"auto"},children:(0,m.F)(e.updatedAt)})]})]})]},e.id))]})]})},e.id)})]})}}},e=>{e.O(0,[9219,3219,9950,8370,6646,6834,7358],()=>e(e.s=4899)),_N_E=e.O()}]);
@@ -1,12 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[576],{589:(e,t,a)=>{"use strict";a.d(t,{b:()=>r});var n=a(7814);let r=(0,n.createServerReference)("60a5de95f9a35fa26ccc9ca3c10061a5c4d45d4091",n.callServer,void 0,n.findSourceMapURL,"resolveInbox")},2393:(e,t,a)=>{"use strict";a.d(t,{H4:()=>l,Uy:()=>o,st:()=>s});let n=/Failed to find Server Action|older or newer deployment|ChunkLoadError|Loading chunk [\w-]+ failed|error loading dynamically imported module/i,r=/invariant expected layout router to be mounted/i;function i(e){return e?e instanceof Error?`${e.name} ${e.message}`:"string"==typeof e?e:String(e?.message??e):""}function s(e){return n.test(i(e))}function l(e){let t=i(e);return n.test(t)||r.test(t)}function o(){try{let e="cn-skew-reload-at",t=Number(window.sessionStorage.getItem(e)||0);if(Date.now()-t<2e4)return;window.sessionStorage.setItem(e,String(Date.now()))}catch{}try{let e=new URL(window.location.href);e.searchParams.set("_r",String(Date.now())),window.location.replace(e.toString())}catch{window.location.reload()}}},2444:(e,t,a)=>{"use strict";a.d(t,{UpdateHeaderBadge:()=>p});var n=a(5076),r=a(8488),i=a(9860),s=a(8576),l=a(5629),o=a(9964),d=a(9564),c=a(5931),u=a(2393);function p(){let e=(0,l.k)(),t=(0,i.useRouter)(),[a,p]=(0,r.useState)(null),[h,f]=(0,r.useState)(!1),[b,v]=(0,r.useState)("available"),[m,y]=(0,r.useState)(!1),[x,g]=(0,r.useState)(""),w=(0,r.useRef)(null);async function j(){if(!m){y(!0),g("");try{let t=await (0,o.l)(!0);p(t.info.updateAvailable&&t.info.latest?t.info.latest:null),f(t.busy),t.info.updateAvailable||g(e("chrome.update.upToDate"))}catch{}finally{y(!1)}}}async function S(){if("updating"!==b&&!h){if("done"===b)return void t.refresh();v("updating"),g("");try{let a=await (0,d.P)();if(a.blocked){v("available"),f(!0),g(e("chrome.update.busy"));return}a.started?w.current=setInterval(async()=>{let t=await (0,c.e)().catch(e=>((0,u.st)(e)&&(w.current&&clearInterval(w.current),(0,u.Uy)()),null));t&&("done"===t.status?(w.current&&clearInterval(w.current),window.location.reload()):"error"===t.status&&(w.current&&clearInterval(w.current),v("error"),g(e("chrome.update.failed"))))},3e3):(v("available"),g(a.message||""),t.push("/update"))}catch{v("error"),g(e("chrome.update.failed"))}}}(0,r.useEffect)(()=>{let e=!1,t=async t=>{try{let a=await (0,o.l)(t);if(e)return;p(a.info.updateAvailable&&a.info.latest?a.info.latest:null),f(a.busy)}catch{}};t(!1);let a=setInterval(()=>t(!1),12e3),n=setInterval(()=>t(!0),18e4);return()=>{e=!0,clearInterval(a),clearInterval(n),w.current&&clearInterval(w.current)}},[]);let k=(0,n.jsx)("button",{type:"button",className:"top-btn",onClick:j,disabled:m,title:x||e("chrome.update.check"),children:(0,n.jsx)("span",{className:m?"sync-spin":"",style:{display:"inline-flex"},children:(0,n.jsx)(s.I,{name:"sync",size:17})})});if(!a)return k;let I="updating"===b?e("chrome.update.updating"):"done"===b?e("chrome.update.restart"):"error"===b?e("chrome.update.failed"):h?`v${a}`:`${e("chrome.update.update")} v${a}`,N="updating"===b||h;return(0,n.jsxs)(n.Fragment,{children:[k,(0,n.jsxs)("button",{type:"button",onClick:S,disabled:N,title:h?e("chrome.update.busy"):x||`${e("chrome.update.available")} — v${a}`,style:{display:"inline-flex",alignItems:"center",gap:6,width:"auto",padding:"0 11px",height:30,background:"error"===b?"var(--sx-keyword)":h?"var(--bg-active)":"var(--accent)",color:h?"var(--text-dim)":"var(--accent-fg)",borderRadius:999,fontSize:12,fontWeight:600,border:"none",opacity:"updating"===b?.75:1,cursor:N?"default":"pointer"},children:["updating"===b?(0,n.jsx)("span",{className:"sync-spin",style:{display:"inline-flex"},children:(0,n.jsx)(s.I,{name:"sync",size:14})}):(0,n.jsx)(s.I,{name:"updating"===b?"sync":"done"===b?"refresh":"error"===b?"bell":"arrowUp",size:14}),(0,n.jsx)("span",{children:I})]})]})}},3820:(e,t,a)=>{Promise.resolve().then(a.t.bind(a,3283,23)),Promise.resolve().then(a.bind(a,5315)),Promise.resolve().then(a.bind(a,235)),Promise.resolve().then(a.bind(a,6588)),Promise.resolve().then(a.bind(a,4414)),Promise.resolve().then(a.bind(a,6556)),Promise.resolve().then(a.bind(a,4942)),Promise.resolve().then(a.bind(a,2444))},4414:(e,t,a)=>{"use strict";a.d(t,{ChatToggle:()=>s});var n=a(5076),r=a(8576),i=a(5629);function s(){let e=(0,i.k)();return(0,n.jsx)("button",{className:"top-btn",title:`${e("chrome.chat.agentRoom")} (⌘J)`,type:"button",onClick:()=>window.dispatchEvent(new CustomEvent("constella:toggle-chat")),children:(0,n.jsx)(r.I,{name:"chat",size:17})})}},4552:(e,t,a)=>{"use strict";a.d(t,{e:()=>r});var n=a(5076);function r({name:e,color:t,size:a=24,health:i,image:s}){let l=Math.max(6,Math.round(.3*a)),o=Math.round(.28*a),d=s?/^(data:|https?:|\/)/.test(s)?s:`/api/upload?path=${encodeURIComponent(s)}`:null;return(0,n.jsxs)("span",{style:{position:"relative",width:a,height:a,flex:`0 0 ${a}px`,display:"inline-block"},children:[d?(0,n.jsx)("img",{src:d,alt:e,width:a,height:a,style:{width:a,height:a,borderRadius:o,objectFit:"cover",display:"block"}}):(0,n.jsx)("span",{style:{width:a,height:a,borderRadius:o,background:t,color:"#fff",display:"grid",placeItems:"center",fontSize:Math.round(.42*a),fontWeight:700},children:(e[0]||"?").toUpperCase()}),i&&(0,n.jsx)("span",{style:{position:"absolute",right:-1,bottom:-1,width:l,height:l,borderRadius:"50%",background:"alive"===i?"var(--sx-string)":"stale"===i?"var(--sx-number)":"var(--text-faint)",border:"1.5px solid var(--bg-elevated)"}})]})}},4942:(e,t,a)=>{"use strict";a.d(t,{SidebarToggle:()=>l});var n=a(5076),r=a(8488),i=a(8576);let s=`
2
- body.side-collapsed .side{width:58px!important;flex:0 0 58px!important;}
3
- body.side-collapsed .side .nav-item{justify-content:center;padding-left:0;padding-right:0;position:relative;}
4
- body.side-collapsed .side .nav-item>span:not(.nv-badge),
5
- body.side-collapsed .side .nav-group-label,
6
- body.side-collapsed .side .nav-search input,
7
- body.side-collapsed .side .side-foot .pf{display:none!important;}
8
- body.side-collapsed .side .nav-search{justify-content:center;}
9
- body.side-collapsed .side .side-brand-wrap{overflow:hidden;}
10
- body.side-collapsed .side .side-foot{justify-content:center;flex-wrap:wrap;gap:6px;}
11
- body.side-collapsed .side .nv-badge{position:absolute;top:2px;right:6px;}
12
- `;function l(){let[e,t]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{if(!document.getElementById("side-rail-style")){let e=document.createElement("style");e.id="side-rail-style",e.textContent=s,document.head.appendChild(e)}let e=!1;try{e="1"===localStorage.getItem("bx.sideCollapsed")}catch{}t(e),document.body.classList.toggle("side-collapsed",e)},[]),(0,n.jsx)("button",{className:"top-btn"+(e?" on":""),onClick:function(){t(e=>{let t=!e;document.body.classList.toggle("side-collapsed",t);try{localStorage.setItem("bx.sideCollapsed",t?"1":"0")}catch{}return t})},title:e?"Expand sidebar":"Collapse sidebar","aria-label":"Toggle sidebar",children:(0,n.jsx)(i.I,{name:"sidebarIcon",size:17})})}},4986:(e,t,a)=>{"use strict";a.d(t,{B:()=>r});var n=a(7814);let r=(0,n.createServerReference)("40084a275c8f82569ddc46cea40f7137fbab8a94df",n.callServer,void 0,n.findSourceMapURL,"approveSpec")},5315:(e,t,a)=>{"use strict";a.d(t,{InboxList:()=>y});var n=a(5076),r=a(8488),i=a(9860),s=a(8576),l=a(4552),o=a(589),d=a(7555),c=a(4986),u=a(6240),p=a(5695),h=a(5629);let f={approval:"check",budget:"coins",question:"chat",review:"doc",block:"close",validation:"pulse"},b={color:"var(--text-faint)"},v={background:"var(--accent)22",color:"var(--accent)"};function m(e,t){return"plan"===e.refType?{labelKey:"inbox.action.approvePlan",run:()=>(0,d.P)()}:"spec"===e.refType&&e.refId?{labelKey:"inbox.action.approveSpec",run:()=>(0,c.B)(e.refId)}:"issue"===e.refType&&e.refId?{labelKey:"inbox.action.approveIssue",run:()=>(0,u.t)(e.refId)}:"task"===e.refType?{labelKey:"inbox.action.openTasks",run:async()=>{t.push("/tasks")}}:"validation"===e.refType?{labelKey:"inbox.action.openTestDev",run:async()=>{window.location.href="/test-dev"}}:"question"===e.refType?{labelKey:"inbox.action.openChat",run:async()=>{e.channel?.startsWith("dm:")?window.dispatchEvent(new CustomEvent("constella:open-dm",{detail:{handle:e.channel.slice(3)}})):window.dispatchEvent(new Event("constella:toggle-chat"))}}:null}function y({items:e}){let t,a=(0,h.k)(),[d,c]=(0,r.useState)(null),[u,x]=(0,r.useTransition)(),g=(0,i.useRouter)();function w(e,t){x(async()=>{await (0,o.b)(e,t),g.refresh()}),c(null)}return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"view-body scroll",children:[0===e.length&&(0,n.jsxs)("div",{style:{color:"var(--text-faint)",textAlign:"center",padding:40},children:[a("inbox.empty")," \uD83C\uDF89"]}),e.map(e=>(0,n.jsxs)("div",{className:"lrow",style:{cursor:"pointer",opacity:e.resolved?.5:1},onClick:()=>c(e),children:[(0,n.jsx)("div",{className:"vh-icon",style:{width:34,height:34,flex:"0 0 34px"},children:(0,n.jsx)(s.I,{name:f[e.kind],size:15})}),(0,n.jsxs)("div",{className:"lr-main",children:[(0,n.jsx)("div",{className:"lr-title",style:{textDecoration:e.resolved?"line-through":"none"},children:e.title}),(0,n.jsxs)("div",{className:"lr-sub",children:[a(`inbox.kind.${e.kind}`),e.fromName?` \xb7 ${a("inbox.from",{name:e.fromName})}`:"",e.createdAt?` \xb7 ${(0,p.F)(e.createdAt)}`:""]})]}),e.fromName&&(0,n.jsx)(l.e,{name:e.fromName,color:e.fromColor??"#e0a44e",size:22,health:e.fromHealth}),(0,n.jsx)(s.I,{name:"chevronRight",size:14,style:b})]},e.id))]}),d&&(t=m(d,g),(0,n.jsx)("div",{className:"detail-overlay",onMouseDown:()=>c(null),children:(0,n.jsxs)("div",{className:"detail-panel",onMouseDown:e=>e.stopPropagation(),children:[(0,n.jsxs)("div",{className:"detail-head",children:[(0,n.jsxs)("div",{style:{display:"flex",justifyContent:"space-between"},children:[(0,n.jsx)("span",{className:"pill",style:v,children:a(`inbox.kind.${d.kind}`)}),(0,n.jsx)("button",{className:"dock-tool",onClick:()=>c(null),children:(0,n.jsx)(s.I,{name:"close",size:15})})]}),(0,n.jsx)("div",{className:"view-title",style:{fontSize:16,marginTop:8},children:d.title}),d.createdAt&&(0,n.jsx)("div",{style:{fontSize:11,color:"var(--text-faint)",marginTop:2},children:(0,p.F)(d.createdAt)})]}),(0,n.jsxs)("div",{className:"detail-body",children:[d.fromName&&(0,n.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[(0,n.jsx)(l.e,{name:d.fromName,color:d.fromColor??"#e0a44e",size:24,health:d.fromHealth}),(0,n.jsx)("span",{style:{fontSize:12.5},children:d.fromName})]}),d.detail?(0,n.jsx)("div",{style:{fontSize:13,color:"var(--text-dim)",lineHeight:1.6,whiteSpace:"pre-wrap"},children:d.detail}):(0,n.jsx)("div",{style:{fontSize:13,color:"var(--text-faint)",lineHeight:1.6},children:a("inbox.noDetail")}),(0,n.jsx)("div",{style:{display:"flex",gap:8},children:d.resolved?(0,n.jsx)("button",{className:"btn-ghost",disabled:u,onClick:()=>w(d.id,!1),children:a("inbox.action.reopen")}):(0,n.jsxs)(n.Fragment,{children:[t&&(0,n.jsx)("button",{className:"btn-accent",disabled:u,onClick:()=>{let e;return e=m(d,g),void(x(async()=>{try{e&&await e.run()}finally{await (0,o.b)(d.id,!0),g.refresh()}}),c(null))},children:a(t.labelKey)}),(0,n.jsx)("button",{className:"btn-ghost",disabled:u,onClick:()=>w(d.id,!0),children:a("common.dismiss")})]})})]})]})}))]})}},5695:(e,t,a)=>{"use strict";function n(e){if(null==e)return"";let t=e instanceof Date?e:new Date(e);if(isNaN(t.getTime()))return"";let a=t.toLocaleDateString([],{day:"2-digit",month:"short"}),n=t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"});return`${a}, ${n}`}a.d(t,{F:()=>n})},5931:(e,t,a)=>{"use strict";a.d(t,{e:()=>r});var n=a(7814);let r=(0,n.createServerReference)("0057467d49ea85739735767ccea6db330c76faeec8",n.callServer,void 0,n.findSourceMapURL,"pollUpdateResult")},6240:(e,t,a)=>{"use strict";a.d(t,{t:()=>r});var n=a(7814);let r=(0,n.createServerReference)("40f6cefa4c49de146bff195564cb4bad726f983b34",n.callServer,void 0,n.findSourceMapURL,"approveIssue")},6588:(e,t,a)=>{"use strict";a.d(t,{BackButton:()=>l});var n=a(5076),r=a(9860),i=a(8576),s=a(5629);function l(){let e=(0,s.k)(),t=(0,r.useRouter)();return(0,n.jsx)("button",{className:"top-btn",title:e("common.back"),style:{marginRight:2},onClick:()=>{window.history.length>1?t.back():t.push("/")},children:(0,n.jsx)(i.I,{name:"chevronLeft",size:18})})}},7555:(e,t,a)=>{"use strict";a.d(t,{P:()=>r});var n=a(7814);let r=(0,n.createServerReference)("00a25f4a14c45f0cf711f2df9db27b2b26622d594d",n.callServer,void 0,n.findSourceMapURL,"approvePlan")},9564:(e,t,a)=>{"use strict";a.d(t,{P:()=>r});var n=a(7814);let r=(0,n.createServerReference)("00ef40b521ba111ae5cd40d15fc2fbe1a31aec511b",n.callServer,void 0,n.findSourceMapURL,"runUpdate")},9964:(e,t,a)=>{"use strict";a.d(t,{l:()=>r});var n=a(7814);let r=(0,n.createServerReference)("40a6b07acdef8a3d7decbb3abd27a5e167f75ea818",n.callServer,void 0,n.findSourceMapURL,"getUpdateState")}},e=>{e.O(0,[9219,3219,9950,6646,6834,7358],()=>e(e.s=3820)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4644],{6177:(e,s,l)=>{"use strict";l.d(s,{f:()=>n});var a=l(7814);let n=(0,a.createServerReference)("0012956bf2d3bbcb43f67d38b3aa8dfae55ac33977",a.callServer,void 0,a.findSourceMapURL,"reindexKbAction")},6520:(e,s,l)=>{"use strict";l.d(s,{O:()=>n});var a=l(7814);let n=(0,a.createServerReference)("002014c503129e70c12e060d2d82613f53e06ed951",a.callServer,void 0,a.findSourceMapURL,"curateKbAction")},7423:(e,s,l)=>{Promise.resolve().then(l.t.bind(l,3283,23)),Promise.resolve().then(l.bind(l,7754)),Promise.resolve().then(l.bind(l,8445)),Promise.resolve().then(l.bind(l,235)),Promise.resolve().then(l.bind(l,6588)),Promise.resolve().then(l.bind(l,4414)),Promise.resolve().then(l.bind(l,6556)),Promise.resolve().then(l.bind(l,4942)),Promise.resolve().then(l.bind(l,2444)),Promise.resolve().then(l.bind(l,5787))},7754:(e,s,l)=>{"use strict";l.d(s,{BlocksPanel:()=>v});var a=l(5076),n=l(8488),t=l(9860),i=l(4302),r=l(5393),c=l(8576),d=l(5629),o=l(7814);let m=(0,o.createServerReference)("40c2849ce4892a523c0f6826e0747a4a1bcb773954",o.callServer,void 0,o.findSourceMapURL,"saveBlockAction"),h=(0,o.createServerReference)("4034047e3cec56354eae1ec41f866469d06078fb04",o.callServer,void 0,o.findSourceMapURL,"mergeProposalAction"),b=(0,o.createServerReference)("40da0fa136729a64a58a5f45fc8b28376f4815c529",o.callServer,void 0,o.findSourceMapURL,"rejectProposalAction"),u=(0,o.createServerReference)("40448c5c20fb04ace2af739622349aa2d52ade65fa",o.callServer,void 0,o.findSourceMapURL,"deleteBlockAction");function v({blocks:e,proposals:s}){let l=(0,d.k)(),o=(0,t.useRouter)(),[g,x]=(0,n.useTransition)(),[f,k]=(0,n.useState)(null);return(0,a.jsxs)(a.Fragment,{children:[s.length>0&&(0,a.jsxs)("div",{className:"card",style:{marginTop:12,borderColor:"#e8a14e"},children:[(0,a.jsxs)("div",{className:"lr-title",style:{marginBottom:8},children:[(0,a.jsx)(c.I,{name:"inbox",size:14,style:{color:"#e8a14e"}})," ",l("block.proposals")," (",s.length,")"]}),s.map(e=>(0,a.jsxs)("div",{className:"lrow",style:{alignItems:"flex-start"},children:[(0,a.jsxs)("div",{className:"lr-main",children:[(0,a.jsxs)("div",{className:"lr-title",children:[e.slug," ",(0,a.jsxs)("span",{className:"muted",style:{fontWeight:400},children:["\xb7 @",e.byAgentHandle]})]}),(0,a.jsx)("div",{className:"md",style:{fontSize:12,maxHeight:120,overflow:"hidden"},children:(0,a.jsx)(i.oz,{remarkPlugins:[r.A],children:e.body.slice(0,600)})})]}),(0,a.jsxs)("div",{style:{display:"flex",gap:6,flex:"0 0 auto"},children:[(0,a.jsxs)("button",{className:"btn-accent",disabled:g,onClick:()=>x(async()=>{await h(e.id),o.refresh()}),children:[(0,a.jsx)(c.I,{name:"check",size:12})," ",l("block.merge")]}),(0,a.jsx)("button",{className:"btn-ghost",disabled:g,onClick:()=>x(async()=>{await b(e.id),o.refresh()}),children:l("block.reject")})]})]},e.id))]}),(0,a.jsxs)("div",{className:"card",style:{marginTop:12},children:[(0,a.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:10},children:[(0,a.jsxs)("div",{className:"lr-title",children:[(0,a.jsx)(c.I,{name:"grid",size:14,style:{color:"var(--accent)"}})," ",l("block.title")]}),(0,a.jsxs)("button",{className:"btn-ghost",onClick:()=>k({slug:"",title:"",kind:"note",body:""}),children:[(0,a.jsx)(c.I,{name:"add",size:13})," ",l("block.new")]})]}),f&&(0,a.jsxs)("div",{className:"card",style:{marginBottom:12,background:"var(--bg-panel)"},children:[(0,a.jsxs)("div",{style:{display:"flex",gap:8,marginBottom:8,flexWrap:"wrap"},children:[(0,a.jsx)("input",{className:"form-input",style:{width:200},placeholder:l("block.slugPlaceholder"),value:f.slug,onChange:e=>k({...f,slug:e.target.value})}),(0,a.jsx)("input",{className:"form-input",style:{width:200},placeholder:l("block.titlePlaceholder"),value:f.title,onChange:e=>k({...f,title:e.target.value})}),(0,a.jsx)("input",{className:"form-input",style:{width:160},placeholder:l("block.kindPlaceholder"),value:f.kind,onChange:e=>k({...f,kind:e.target.value})})]}),(0,a.jsx)("textarea",{className:"persona-ta mono",style:{minHeight:200,width:"100%"},placeholder:l("block.bodyPlaceholder"),value:f.body,onChange:e=>k({...f,body:e.target.value})}),(0,a.jsxs)("div",{style:{display:"flex",gap:8,marginTop:8},children:[(0,a.jsxs)("button",{className:"btn-accent",disabled:g||!f.slug.trim()||!f.body.trim(),onClick:()=>{f&&x(async()=>{await m(f),k(null),o.refresh()})},children:[(0,a.jsx)(c.I,{name:"check",size:13})," ",g?l("block.saving"):l("block.save")]}),(0,a.jsx)("button",{className:"btn-ghost",onClick:()=>k(null),children:l("block.cancel")})]})]}),0===e.length&&!f&&(0,a.jsx)("div",{className:"muted",children:l("block.empty")}),e.map(e=>(0,a.jsxs)("div",{className:"lrow",style:{alignItems:"flex-start"},children:[(0,a.jsxs)("div",{className:"lr-main",children:[(0,a.jsxs)("div",{className:"lr-title",children:[e.title||e.slug," ",(0,a.jsxs)("span",{className:"muted",style:{fontWeight:400},children:["\xb7 ",e.slug," \xb7 ",e.kind," \xb7 v",e.version," \xb7 ",e.updatedBy]})]}),(0,a.jsx)("div",{className:"md",style:{fontSize:12.5,maxHeight:100,overflow:"hidden"},children:(0,a.jsx)(i.oz,{remarkPlugins:[r.A],children:e.body.slice(0,400)||`_(${l("block.bodyEmpty")})_`})})]}),(0,a.jsxs)("div",{style:{display:"flex",gap:6,flex:"0 0 auto"},children:[(0,a.jsxs)("button",{className:"btn-ghost",onClick:()=>k({slug:e.slug,title:e.title,kind:e.kind,body:e.body}),children:[(0,a.jsx)(c.I,{name:"command",size:12})," ",l("block.edit")]}),(0,a.jsx)("button",{className:"btn-ghost",disabled:g,title:l("block.delete"),onClick:()=>x(async()=>{await u(e.slug),o.refresh()}),children:(0,a.jsx)(c.I,{name:"trash",size:12})})]})]},e.slug))]})]})}},8445:(e,s,l)=>{"use strict";l.d(s,{KbActions:()=>o});var a=l(5076),n=l(8488),t=l(9860),i=l(8576),r=l(5629),c=l(6177),d=l(6520);function o(){let[e,s]=(0,n.useTransition)(),[l,o]=(0,n.useState)(null),m=(0,t.useRouter)(),h=(0,r.k)();return(0,a.jsxs)("div",{style:{display:"inline-flex",alignItems:"center",gap:8},children:[l&&(0,a.jsx)("span",{className:"kb-actions-msg",children:l}),(0,a.jsxs)("button",{className:"btn-accent",disabled:e,onClick:function(){s(async()=>{o(null),o(h("kb.reindexResult",{n:(await (0,c.f)()).chunks})),m.refresh()})},children:[(0,a.jsx)(i.I,{name:"sync",size:14,className:e?"sync-spin":""})," ",h("kb.reindex")]}),(0,a.jsxs)("button",{className:"btn-accent",disabled:e,onClick:function(){s(async()=>{o(null);let e=await (0,d.O)();o(e.merged+e.retired+e.summarized+e.gaps>0?h("kb.curateResult",{m:e.merged,r:e.retired,s:e.summarized,g:e.gaps}):h("kb.curateNone")),m.refresh()})},children:[(0,a.jsx)(i.I,{name:"skill",size:14,className:e?"sync-spin":""})," ",e?h("kb.curating"):h("kb.curate")]})]})}}},e=>{e.O(0,[9219,9690,3219,9950,8370,6646,6834,7358],()=>e(e.s=7423)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4944],{972:(e,t,r)=>{"use strict";r.d(t,{E:()=>i,e:()=>s});let i=["Cockpit","Hierarchy","Execution","Product","Knowledge","Operations","Inbox","System"],s=[{id:"home",title:"Home",href:"/",group:"Cockpit",tile:"Welcome — canonical knowledge & quick navigation",icon:"grid"},{id:"dashboard",title:"Dashboard",href:"/dashboard",group:"Cockpit",tile:"Cockpit hub — status at a glance",icon:"pulse"},{id:"organizations",title:"Organizations",href:"/organizations",group:"Hierarchy",tile:"Manage organizations & workspaces",icon:"grid"},{id:"org",title:"Org Chart",href:"/org",group:"Hierarchy",tile:"Hierarchy & delegation",icon:"agents"},{id:"agents",title:"Agent Studio",href:"/agents/ada",group:"Hierarchy",tile:"Configure each agent",icon:"bot"},{id:"code",title:"Code",href:"/code",group:"Execution",tile:"Code editor & repo files",icon:"terminal"},{id:"tasks",title:"Tasks",href:"/tasks",group:"Execution",tile:"Team kanban board",icon:"files"},{id:"cron",title:"Cron",href:"/cron",group:"Execution",tile:"Scheduled tasks & history",icon:"calendar"},{id:"routines",title:"Routines",href:"/routines",group:"Execution",tile:"Recurring automations",icon:"repeat"},{id:"goals",title:"Goals",href:"/goals",group:"Execution",tile:"Objective tree",icon:"target"},{id:"design",title:"Design",href:"/design",group:"Execution",tile:"Prototype the UI with the frontend agent before the plan",icon:"grid"},{id:"planner",title:"CEO Planner",href:"/planner",group:"Execution",tile:"Specs → issues → approval → 24/7",icon:"command"},{id:"test-dev",title:"Test Dev",href:"/test-dev",group:"Execution",tile:"Boot, navigate + validate the project",icon:"play"},{id:"pm",title:"Product Manager",href:"/pm",group:"Product",tile:"Sprints & backlog (PO)",icon:"goto"},{id:"reports",title:"Reports",href:"/reports",group:"Knowledge",tile:"Plans, reviews, audits",icon:"doc"},{id:"docs",title:"Docs",href:"/docs",group:"Knowledge",tile:"Architecture, API & PO docs",icon:"doc"},{id:"skills",title:"Skills",href:"/skills",group:"Knowledge",tile:"Agent procedure library",icon:"skill"},{id:"activity",title:"Activity",href:"/activity",group:"Knowledge",tile:"Agent action timeline",icon:"pulse"},{id:"knowledge",title:"Knowledge",href:"/knowledge",group:"Knowledge",tile:"KB index, coverage, gaps & agent recall",icon:"branch"},{id:"costs",title:"Costs",href:"/costs",group:"Operations",tile:"Spend by agent/provider",icon:"coins"},{id:"security",title:"Security",href:"/security",group:"Operations",tile:"Findings & security score",icon:"shield"},{id:"pulse",title:"Pulse",href:"/pulse",group:"Operations",tile:"Agent health & validation",icon:"pulse"},{id:"github",title:"Commit GitHub",href:"/github",group:"Operations",tile:"Push workspace to remote",icon:"git"},{id:"prepare-deploy",title:"Prepare Deploy",href:"/prepare-deploy",group:"Operations",tile:"Prod-prep + export clean source to a deploy repo",icon:"goto"},{id:"models",title:"Models",href:"/models",group:"Operations",tile:"Providers & local models",icon:"cpu"},{id:"update",title:"Update",href:"/update",group:"Operations",tile:"Detect & apply new versions",icon:"goto"},{id:"plugins",title:"Plugins",href:"/plugins",group:"Operations",tile:"Extensions & integrations",icon:"ext"},{id:"inbox",title:"Inbox",href:"/inbox",group:"Inbox",tile:"Approvals & escalations",icon:"inbox"},{id:"notifications",title:"Notifications",href:"/notifications",group:"Inbox",tile:"Passive alert feed",icon:"bell"},{id:"config",title:"Config",href:"/config",group:"System",tile:"Platform settings",icon:"settings"},{id:"profile",title:"Profile",href:"/profile",group:"System",tile:"Account & preferences",icon:"account"}]},1202:(e,t,r)=>{"use strict";r.d(t,{Sidebar:()=>j});var i=r(5076),s=r(3283),n=r.n(s),a=r(9860),c=r(972),l=r(8576),o=r(8488),d=r(6816),h=r(5629),x=r(2381);function p({orgs:e,currentId:t,workspaceSlug:r}){let s=(0,h.k)(),n=(0,a.useRouter)(),[c,u]=(0,o.useState)(!1),[g,j]=(0,o.useTransition)(),v=(0,o.useRef)(null),m=e.find(e=>e.id===t)||e[0];return(0,o.useEffect)(()=>{if(c)return document.addEventListener("mousedown",e),document.addEventListener("keydown",t),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",t)};function e(e){v.current&&!v.current.contains(e.target)&&u(!1)}function t(e){"Escape"===e.key&&u(!1)}},[c]),(0,i.jsxs)("div",{className:"org-switch",ref:v,children:[(0,i.jsxs)("button",{className:"org-switch-btn"+(c?" open":""),disabled:g,onClick:()=>u(e=>!e),title:m?.name,children:[(0,i.jsx)(d.J,{size:34,rx:10}),(0,i.jsxs)("div",{className:"os-meta",children:[(0,i.jsx)("div",{className:"os-name",children:m?.name??"Constella"}),(0,i.jsx)("div",{className:"os-sub mono",children:r})]}),(0,i.jsx)(l.I,{name:"chevronDown",size:14})]}),c&&(0,i.jsxs)("div",{className:"org-pop",children:[(0,i.jsx)("div",{className:"org-pop-h",children:s("mod.organizations")}),e.map((e,r)=>(0,i.jsxs)("button",{className:"org-pop-item"+(e.id===t?" on":""),onClick:()=>{var r;return r=e.id,void(u(!1),r!==t&&j(async()=>{await (0,x.T)(r),window.location.href="/"}))},children:[(0,i.jsx)("span",{className:"op-badge",children:r+1}),(0,i.jsx)("span",{className:"op-name",children:e.name}),e.id===t&&(0,i.jsx)(l.I,{name:"check",size:14})]},e.id)),(0,i.jsx)("div",{className:"org-pop-sep"}),(0,i.jsxs)("button",{className:"org-pop-create",onClick:()=>{u(!1),n.push("/onboarding")},children:[(0,i.jsx)("span",{className:"opc-ic",children:(0,i.jsx)(l.I,{name:"add",size:13})})," ",s("orgs.createOrganization")]})]})]})}var u=r(7814);let g=(0,u.createServerReference)("0059387b91e7e6a7a87cacf80370a17b5b8e4de460",u.callServer,void 0,u.findSourceMapURL,"signOutAction");function j({orgs:e,currentOrgId:t,workspaceSlug:r,userName:s,userEmail:o,userImage:d,inboxCount:x,notifCount:u}){let v=(0,a.usePathname)(),m=(0,h.k)();return(0,i.jsxs)("aside",{className:"side",children:[(0,i.jsx)("div",{className:"side-brand-wrap",children:(0,i.jsx)(p,{orgs:e,currentId:t,workspaceSlug:r})}),(0,i.jsxs)(n(),{href:"/search",className:"nav-search",children:[(0,i.jsx)(l.I,{name:"search",size:13}),(0,i.jsx)("input",{placeholder:m("nav.search"),readOnly:!0,style:{pointerEvents:"none"}})]}),(0,i.jsx)("div",{className:"side-nav scroll",children:c.E.map(e=>{let t=c.e.filter(t=>t.group===e);return t.length?(0,i.jsxs)("div",{children:[(0,i.jsx)("div",{className:"nav-group-label",children:m(`group.${e}`)}),t.map(e=>{let t=e=>"/"+(e.split("/")[1]??""),r="home"===e.id?"/"===v:t(v)===t(e.href),s="inbox"===e.id?x:"notifications"===e.id?u:0;return(0,i.jsxs)(n(),{href:e.href,className:"nav-item"+(r?" active":""),children:[(0,i.jsx)(l.I,{name:e.icon,size:17}),(0,i.jsx)("span",{children:m(`mod.${e.id}`)}),s?(0,i.jsx)("span",{className:"nv-badge",children:s}):null]},e.id)})]},e):null})}),(0,i.jsxs)("div",{className:"side-foot",children:[(0,i.jsx)("div",{className:"top-avatar",style:{margin:0,overflow:"hidden",padding:d?0:void 0},children:d?(0,i.jsx)("img",{src:/^(data:|https?:|\/)/.test(d)?d:`/api/upload?path=${encodeURIComponent(d)}`,alt:s,style:{width:"100%",height:"100%",objectFit:"cover",display:"block"}}):(s?.[0]||"O").toUpperCase()}),(0,i.jsxs)(n(),{href:"/profile",className:"pf",children:[(0,i.jsx)("div",{className:"pn",children:s||m("nav.operator")}),(0,i.jsx)("div",{className:"pe",children:o||""})]}),(0,i.jsx)("form",{action:g,children:(0,i.jsx)("button",{className:"foot-signout",title:m("nav.signout"),type:"submit",children:(0,i.jsx)(l.I,{name:"close",size:15})})})]})]})}},2381:(e,t,r)=>{"use strict";r.d(t,{T:()=>s});var i=r(7814);let s=(0,i.createServerReference)("409364c2aeb5b3848eb49929913f7b33024d052ade",i.callServer,void 0,i.findSourceMapURL,"setActiveOrg")},3027:(e,t,r)=>{"use strict";r.d(t,{RunnerHeartbeat:()=>l});var i=r(8488),s=r(9860),n=r(7814);let a=(0,n.createServerReference)("003b0864cd6028ed215e860e8eab5e7c1ffff7c460",n.callServer,void 0,n.findSourceMapURL,"tick"),c=(0,n.createServerReference)("00447576ecd8f610009a2c1071738c9934a1e9cd8f",n.callServer,void 0,n.findSourceMapURL,"autoTick");function l({intervalMs:e=8e3,approved:t=!1,auto247:r=!1}){let n=(0,s.useRouter)(),o=(0,i.useRef)(!1),d=(0,i.useRef)(!1);return(0,i.useEffect)(()=>{let t=!1;async function r(){if(!t&&!o.current&&!document.hidden){o.current=!0;try{let e=await a();!e.paused&&(e.advanced||(e.changed??0)>0)&&n.refresh()}catch{}finally{o.current=!1}}}r();let i=setInterval(r,e),s=()=>{document.hidden||r()};return document.addEventListener("visibilitychange",s),()=>{t=!0,clearInterval(i),document.removeEventListener("visibilitychange",s)}},[e,n]),(0,i.useEffect)(()=>{let e=!1;async function i(){if(!e&&!d.current&&!document.hidden&&t&&r){d.current=!0;try{let t=await c();t.ran&&n.refresh(),e||t.paused||!t.ran||!(t.remaining>0)||document.hidden||setTimeout(i,1200)}catch{}finally{d.current=!1}}}i();let s=()=>{document.hidden||i()};return document.addEventListener("visibilitychange",s),()=>{e=!0,document.removeEventListener("visibilitychange",s)}},[t,r,n]),null}},4419:(e,t,r)=>{Promise.resolve().then(r.bind(r,6257)),Promise.resolve().then(r.bind(r,3027)),Promise.resolve().then(r.bind(r,5750)),Promise.resolve().then(r.bind(r,1202)),Promise.resolve().then(r.bind(r,6503))},5629:(e,t,r)=>{"use strict";r.d(t,{LangProvider:()=>c,k:()=>l});var i=r(5076),s=r(8488),n=r(3219);let a=(0,s.createContext)("en");function c({lang:e,children:t}){return(0,i.jsx)(a.Provider,{value:e,children:t})}function l(){let e=(0,s.useContext)(a);return(t,r)=>(0,n.t)(e,t,r)}},5750:(e,t,r)=>{"use strict";r.d(t,{SearchHotkey:()=>n});var i=r(8488),s=r(9860);function n(){let e=(0,s.useRouter)();return(0,i.useEffect)(()=>{function t(t){(t.ctrlKey||t.metaKey)&&("p"===t.key||"k"===t.key||"P"===t.key||"K"===t.key)&&(t.preventDefault(),e.push("/search"))}return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[e]),null}},6257:(e,t,r)=>{"use strict";r.d(t,{ChatDockGate:()=>a});var i=r(5076),s=r(9860),n=r(9846);function a(e){return"/"===(0,s.usePathname)()?null:(0,i.jsx)(n.uG,{...e})}},6503:(e,t,r)=>{"use strict";r.d(t,{Toaster:()=>d});var i=r(5076),s=r(8488),n=r(9860),a=r(8576),c=r(5629),l=r(7814);let o=(0,l.createServerReference)("40fea276f6a37289f66ea71a9be729e90d327aed30",l.callServer,void 0,l.findSourceMapURL,"recentNotifications");function d(){let e=(0,c.k)(),[t,r]=(0,s.useState)([]),l=(0,s.useRef)(0),d=(0,s.useRef)(new Set),h=(0,n.useRouter)();function x(e){r(t=>t.filter(t=>t.id!==e))}return((0,s.useEffect)(()=>{l.current=Date.now();let e=!0,t=setInterval(async()=>{try{let t=await o(l.current);if(!e||!t.length)return;l.current=Math.max(l.current,...t.map(e=>e.at));let i=t.filter(e=>!d.current.has(e.id));if(!i.length)return;i.forEach(e=>d.current.add(e.id)),r(e=>[...i,...e].slice(0,4))}catch{}},8e3);return()=>{e=!1,clearInterval(t)}},[]),(0,s.useEffect)(()=>{if(!t.length)return;let e=setTimeout(()=>r(e=>e.slice(0,-1)),7e3);return()=>clearTimeout(e)},[t]),t.length)?(0,i.jsx)("div",{className:"toaster",children:t.map(t=>{var r;return(0,i.jsxs)("div",{className:"toast toast-"+t.kind,role:"status",onClick:()=>{var e,r;(x((e=t).id),e.channel&&("room"===(r=e.channel)||"telegram"===r||r.startsWith("dm:")))?window.dispatchEvent(new CustomEvent("constella:open-chat",{detail:{channel:e.channel}})):h.push("/notifications")},children:[(0,i.jsx)("span",{className:"toast-ic",children:(0,i.jsx)(a.I,{name:"approval"===(r=t.kind)||"needs-approval"===r?"inbox":"security"===r||"block"===r||"blocked"===r?"shield":"deploy"===r?"goto":"error"===r||"warn"===r||"warning"===r?"warn":r.startsWith("dm")||"mention"===r||"message"===r?"chat":"bell",size:15})}),(0,i.jsxs)("div",{className:"toast-body",children:[(0,i.jsx)("div",{className:"toast-title",children:t.text}),t.detail&&(0,i.jsx)("div",{className:"toast-detail",children:t.detail})]}),(0,i.jsx)("button",{className:"toast-x",title:e("common.dismiss"),onClick:e=>{e.stopPropagation(),x(t.id)},children:(0,i.jsx)(a.I,{name:"close",size:12})})]},t.id)})}):null}},6816:(e,t,r)=>{"use strict";r.d(t,{J:()=>s});var i=r(5076);function s({size:e=34,rx:t=9}){return(0,i.jsxs)("svg",{width:e,height:e,viewBox:"0 0 100 100",style:{display:"block",flex:`0 0 ${e}px`},"aria-label":"Constella",children:[(0,i.jsx)("rect",{x:"1",y:"1",width:"98",height:"98",rx:t,fill:"var(--cs-bg)",stroke:"var(--cs-border)",strokeWidth:"1.5"}),(0,i.jsx)("path",{d:"M66.06 27.06 L42.75 22.95 L24.62 38.17 L24.62 61.83 L42.75 77.05 L66.06 72.94",fill:"none",stroke:"var(--cs-line)",strokeWidth:"2.1",strokeLinecap:"round",strokeLinejoin:"round"}),(0,i.jsx)("path",{d:"M48 50 L42.75 22.95 M48 50 L24.62 50 M48 50 L42.75 77.05",fill:"none",stroke:"var(--cs-line)",strokeWidth:"1.2",strokeLinecap:"round",opacity:"0.55"}),[[66.06,27.06],[42.75,22.95],[24.62,38.17],[24.62,61.83],[42.75,77.05],[66.06,72.94]].map((e,t)=>(0,i.jsx)("circle",{cx:e[0],cy:e[1],r:"3.1",fill:"var(--cs-node)"},t)),(0,i.jsx)("circle",{cx:"48",cy:"50",r:"8.5",fill:"var(--cs-glow)",opacity:"0.4"}),(0,i.jsx)("circle",{cx:"48",cy:"50",r:"4.3",fill:"var(--cs-core)"})]})}},8576:(e,t,r)=>{"use strict";r.d(t,{I:()=>n});var i=r(5076);let s={files:(0,i.jsx)("path",{d:"M3 3.5h5l1.5 2H13a1 1 0 0 1 1 1V12a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4.5a1 1 0 0 1 1-1z"}),search:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("circle",{cx:"7",cy:"7",r:"4.2"}),(0,i.jsx)("path",{d:"M10.2 10.2 14 14"})]}),git:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("circle",{cx:"4",cy:"4",r:"1.8"}),(0,i.jsx)("circle",{cx:"4",cy:"12",r:"1.8"}),(0,i.jsx)("circle",{cx:"12",cy:"9.5",r:"1.8"}),(0,i.jsx)("path",{d:"M4 5.8v4.4M5.8 4H9a2 2 0 0 1 2 2v1.6"})]}),debug:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("circle",{cx:"8",cy:"8.5",r:"3.5"}),(0,i.jsx)("path",{d:"M8 5V3M4.5 8.5H2m12 0h-2.5M4.8 11.8 3.4 13M11.2 11.8l1.4 1.2M5.2 5 3.8 3.6M10.8 5l1.4-1.4"})]}),ext:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("rect",{x:"2.5",y:"2.5",width:"4.5",height:"4.5",rx:"1"}),(0,i.jsx)("rect",{x:"9",y:"2.5",width:"4.5",height:"4.5",rx:"1"}),(0,i.jsx)("rect",{x:"2.5",y:"9",width:"4.5",height:"4.5",rx:"1"}),(0,i.jsx)("path",{d:"M9 11.2h4.5M11.2 9v4.5"})]}),settings:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("circle",{cx:"8",cy:"8",r:"2.2"}),(0,i.jsx)("path",{d:"M8 1.5v2M8 12.5v2M14.5 8h-2M3.5 8h-2M12.6 3.4l-1.4 1.4M4.8 11.2l-1.4 1.4M12.6 12.6l-1.4-1.4M4.8 4.8 3.4 3.4"})]}),account:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("circle",{cx:"8",cy:"5.5",r:"2.8"}),(0,i.jsx)("path",{d:"M2.8 14c0-2.8 2.3-4.5 5.2-4.5s5.2 1.7 5.2 4.5"})]}),chevronRight:(0,i.jsx)("path",{d:"M6 4l4 4-4 4"}),chevronDown:(0,i.jsx)("path",{d:"M4 6l4 4 4-4"}),chevronUp:(0,i.jsx)("path",{d:"M4 10l4-4 4 4"}),close:(0,i.jsx)("path",{d:"M4 4l8 8M12 4l-8 8"}),add:(0,i.jsx)("path",{d:"M8 3v10M3 8h10"}),newFile:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("path",{d:"M9 2H4a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V6L9 2z"}),(0,i.jsx)("path",{d:"M9 2v4h4M8 8v4M6 10h4"})]}),newFolder:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("path",{d:"M2 5.5a1 1 0 0 1 1-1h3l1.2 1.5H13a1 1 0 0 1 1 1V12a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V5.5z"}),(0,i.jsx)("path",{d:"M8 8v3M6.5 9.5h3"})]}),refresh:(0,i.jsx)("path",{d:"M13 8a5 5 0 1 1-1.5-3.5M13 2.5V5h-2.5"}),collapse:(0,i.jsx)("path",{d:"M3 5h6M3 8h6M3 11h6M12 6l-1.5 1.5L12 9"}),more:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("circle",{cx:"3.5",cy:"8",r:"1"}),(0,i.jsx)("circle",{cx:"8",cy:"8",r:"1"}),(0,i.jsx)("circle",{cx:"12.5",cy:"8",r:"1"})]}),split:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("rect",{x:"2",y:"3",width:"12",height:"10",rx:"1"}),(0,i.jsx)("path",{d:"M8 3v10"})]}),terminal:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("rect",{x:"2",y:"3",width:"12",height:"10",rx:"1.5"}),(0,i.jsx)("path",{d:"M4.5 6.5 6.5 8l-2 1.5M8 10h3.5"})]}),panelBottom:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("rect",{x:"2",y:"3",width:"12",height:"10",rx:"1.5"}),(0,i.jsx)("path",{d:"M2 10h12"})]}),sidebarIcon:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("rect",{x:"2",y:"3",width:"12",height:"10",rx:"1.5"}),(0,i.jsx)("path",{d:"M6 3v10"})]}),bell:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("path",{d:"M8 2a3.5 3.5 0 0 0-3.5 3.5c0 3-1.3 4-1.3 4h9.6s-1.3-1-1.3-4A3.5 3.5 0 0 0 8 2z"}),(0,i.jsx)("path",{d:"M6.7 12a1.4 1.4 0 0 0 2.6 0"})]}),check:(0,i.jsx)("path",{d:"M3 8.5 6.5 12 13 4"}),error:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("circle",{cx:"8",cy:"8",r:"6"}),(0,i.jsx)("path",{d:"M8 5v4M8 11h.01"})]}),warn:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("path",{d:"M8 2.5 14.5 13.5h-13z"}),(0,i.jsx)("path",{d:"M8 7v3M8 12h.01"})]}),branch:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("circle",{cx:"4",cy:"4",r:"1.6"}),(0,i.jsx)("circle",{cx:"4",cy:"12",r:"1.6"}),(0,i.jsx)("circle",{cx:"12",cy:"9",r:"1.6"}),(0,i.jsx)("path",{d:"M4 5.6v4.8M5.6 4H9a1.8 1.8 0 0 1 1.8 1.8v1.6"})]}),sync:(0,i.jsx)("path",{d:"M3 6a5 5 0 0 1 8.5-2M13 10a5 5 0 0 1-8.5 2M11.5 2.5V4h-1.5M4.5 13.5V12h1.5"}),command:(0,i.jsx)("path",{d:"M5.5 3.5A1.5 1.5 0 1 1 4 5h8a1.5 1.5 0 1 1-1.5 1.5v3A1.5 1.5 0 1 1 12 11H4a1.5 1.5 0 1 1 1.5-1.5v-3z"}),goto:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("path",{d:"M3 8h8M7.5 4.5 11 8l-3.5 3.5"}),(0,i.jsx)("path",{d:"M13 3v10"})]}),sun:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("circle",{cx:"8",cy:"8",r:"3"}),(0,i.jsx)("path",{d:"M8 1.5v1.5M8 13v1.5M14.5 8H13M3 8H1.5M12.6 3.4l-1 1M4.4 11.6l-1 1M12.6 12.6l-1-1M4.4 4.4l-1-1"})]}),moon:(0,i.jsx)("path",{d:"M13 9.2A5.5 5.5 0 0 1 6.8 3 5.5 5.5 0 1 0 13 9.2z"}),play:(0,i.jsx)("path",{d:"M5 3.5v9l7-4.5z"}),trash:(0,i.jsx)("path",{d:"M3.5 4.5h9M6 4.5V3h4v1.5M5 4.5l.5 8.5h5l.5-8.5"}),dot:(0,i.jsx)("circle",{cx:"8",cy:"8",r:"3"}),fileTs:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("path",{d:"M9 2H4a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V6L9 2z"}),(0,i.jsx)("path",{d:"M9 2v4h4"})]}),arrowUp:(0,i.jsx)("path",{d:"M8 13V3M4 7l4-4 4 4"}),arrowDown:(0,i.jsx)("path",{d:"M8 3v10M4 9l4 4 4-4"}),agents:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("circle",{cx:"5.5",cy:"6",r:"2.2"}),(0,i.jsx)("circle",{cx:"11",cy:"6.5",r:"1.8"}),(0,i.jsx)("path",{d:"M2 13c0-2 1.6-3.2 3.5-3.2S9 11 9 13M9.5 12.5c.2-1.6 1.3-2.5 2.8-2.5 1.3 0 2.4.8 2.4 2.3"})]}),bot:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("rect",{x:"3",y:"5.5",width:"10",height:"7",rx:"2"}),(0,i.jsx)("path",{d:"M8 3v2.5M5.8 9h.01M10.2 9h.01M6 12h4"}),(0,i.jsx)("circle",{cx:"8",cy:"3",r:"1"})]}),send:(0,i.jsx)("path",{d:"M14 2 7 9M14 2l-4.5 12-2.5-5L2 6.5z"}),at:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("circle",{cx:"8",cy:"8",r:"3"}),(0,i.jsx)("path",{d:"M11 8v1.2a1.8 1.8 0 0 0 3.5.6A6.5 6.5 0 1 0 11 13.2"})]}),chevronLeft:(0,i.jsx)("path",{d:"M10 4 6 8l4 4"}),dockRight:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("rect",{x:"2",y:"3",width:"12",height:"10",rx:"1.5"}),(0,i.jsx)("path",{d:"M10 3v10"}),(0,i.jsx)("rect",{x:"10.5",y:"3.5",width:"3",height:"9",rx:"1",fill:"currentColor",stroke:"none",opacity:"0.25"})]}),dockLeft:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("rect",{x:"2",y:"3",width:"12",height:"10",rx:"1.5"}),(0,i.jsx)("path",{d:"M6 3v10"}),(0,i.jsx)("rect",{x:"2.5",y:"3.5",width:"3",height:"9",rx:"1",fill:"currentColor",stroke:"none",opacity:"0.25"})]}),chat:(0,i.jsx)("path",{d:"M3 4.5h10a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1H7l-3 2.5V11.5H3a1 1 0 0 1-1-1v-5a1 1 0 0 1 1-1z"}),grid:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("rect",{x:"2.5",y:"2.5",width:"4.5",height:"4.5",rx:"1"}),(0,i.jsx)("rect",{x:"9",y:"2.5",width:"4.5",height:"4.5",rx:"1"}),(0,i.jsx)("rect",{x:"2.5",y:"9",width:"4.5",height:"4.5",rx:"1"}),(0,i.jsx)("rect",{x:"9",y:"9",width:"4.5",height:"4.5",rx:"1"})]}),inbox:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("path",{d:"M2 9h3l1 2h4l1-2h3"}),(0,i.jsx)("path",{d:"M2.5 9 4 3.5h8L13.5 9v3.5a1 1 0 0 1-1 1h-9a1 1 0 0 1-1-1z"})]}),calendar:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("rect",{x:"2.5",y:"3.5",width:"11",height:"10",rx:"1.5"}),(0,i.jsx)("path",{d:"M2.5 6.5h11M5.5 2v3M10.5 2v3"})]}),repeat:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("path",{d:"M3 6a4 4 0 0 1 7-2.5L12 5M13 10a4 4 0 0 1-7 2.5L4 11"}),(0,i.jsx)("path",{d:"M12 2v3H9M4 14v-3h3"})]}),doc:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("path",{d:"M9 2H4.5a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h7a1 1 0 0 0 1-1V5.5L9 2z"}),(0,i.jsx)("path",{d:"M9 2v3.5h3.5M6 8.5h4M6 11h4"})]}),skill:(0,i.jsx)("path",{d:"M8 2.5l1.4 3.1 3.4.4-2.5 2.3.7 3.3L8 9.9 5 11.6l.7-3.3L3.2 6l3.4-.4z"}),pulse:(0,i.jsx)("path",{d:"M2 8h3l1.5-4 2.5 8 1.5-4H14"}),coins:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("ellipse",{cx:"6",cy:"4.5",rx:"3.5",ry:"1.8"}),(0,i.jsx)("path",{d:"M2.5 4.5v3c0 1 1.6 1.8 3.5 1.8s3.5-.8 3.5-1.8v-3"}),(0,i.jsx)("ellipse",{cx:"10",cy:"9.5",rx:"3.5",ry:"1.8"}),(0,i.jsx)("path",{d:"M6.5 9.5c.4.9 1.8 1.5 3.5 1.5s3.5-.8 3.5-1.8v-1.2"})]}),cpu:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("rect",{x:"4",y:"4",width:"8",height:"8",rx:"1.5"}),(0,i.jsx)("rect",{x:"6.3",y:"6.3",width:"3.4",height:"3.4",rx:".5"}),(0,i.jsx)("path",{d:"M6 2v2M10 2v2M6 12v2M10 12v2M2 6h2M2 10h2M12 6h2M12 10h2"})]}),shield:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("path",{d:"M8 2 3 4v4c0 3 2.2 5 5 6 2.8-1 5-3 5-6V4z"}),(0,i.jsx)("path",{d:"M5.8 8 7.3 9.5 10.4 6.3"})]}),target:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("circle",{cx:"8",cy:"8",r:"5.5"}),(0,i.jsx)("circle",{cx:"8",cy:"8",r:"2.4"})]}),selectParent:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("rect",{x:"2",y:"2.5",width:"12",height:"11",rx:"1.5"}),(0,i.jsx)("path",{d:"M8 11V6.5M5.5 9 8 6.5l2.5 2.5"})]})};function n({name:e,size:t=16,className:r="",strokeWidth:a=1.4,style:c}){let l=s[e];return l?(0,i.jsx)("svg",{width:t,height:t,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:a,strokeLinecap:"round",strokeLinejoin:"round",className:r,style:c,children:"play"===e||"dot"===e?(0,i.jsx)("g",{fill:"currentColor",stroke:"none",children:l}):l}):null}}},e=>{e.O(0,[9219,9690,3219,7268,9846,6646,6834,7358],()=>e(e.s=4419)),_N_E=e.O()}]);