constellai 0.3.3 → 0.3.4

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 (240) 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 +2 -2
  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 +3 -3
  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 +2 -2
  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 +3 -3
  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 +2 -2
  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 +3 -3
  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 +3 -3
  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 +3 -3
  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 +2 -2
  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 +1 -1
  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 +7 -7
  127. package/.next/server/chunks/259.js +1 -1
  128. package/.next/server/chunks/2867.js +1 -1
  129. package/.next/server/chunks/2960.js +1 -1
  130. package/.next/server/chunks/319.js +1 -0
  131. package/.next/server/chunks/3234.js +1 -1
  132. package/.next/server/chunks/4828.js +1 -0
  133. package/.next/server/chunks/4979.js +2 -2
  134. package/.next/server/chunks/5697.js +1 -0
  135. package/.next/server/chunks/6151.js +12 -0
  136. package/.next/server/chunks/6431.js +1 -1
  137. package/.next/server/chunks/{8195.js → 6798.js} +3 -3
  138. package/.next/server/chunks/{5086.js → 6903.js} +13 -13
  139. package/.next/server/chunks/7589.js +1 -1
  140. package/.next/server/chunks/7989.js +1 -1
  141. package/.next/server/chunks/8486.js +4 -0
  142. package/.next/server/chunks/8561.js +1 -1
  143. package/.next/server/chunks/8823.js +1 -1
  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/4353-12629098ed83e468.js +1 -0
  150. package/.next/static/chunks/4398-e798770ae782576f.js +1 -0
  151. package/.next/static/chunks/4428-09f7d473d9e33d59.js +1 -0
  152. package/.next/static/chunks/7457-c37382c6f4e115f8.js +4 -0
  153. package/.next/static/chunks/8370-6da6aa10d687b8ae.js +12 -0
  154. package/.next/static/chunks/9690-00ad96a74abac075.js +1 -0
  155. package/.next/static/chunks/app/(app)/activity/{page-0f51a22d4f2207b2.js → page-09bc1c776962737c.js} +1 -1
  156. package/.next/static/chunks/app/(app)/agents/[handle]/page-b11e5f8f25fb2f88.js +1 -0
  157. package/.next/static/chunks/app/(app)/code/page-ff6925db6e10e3cc.js +1 -0
  158. package/.next/static/chunks/app/(app)/config/page-4df2facd9c81adb5.js +1 -0
  159. package/.next/static/chunks/app/(app)/costs/{page-969eba498344314d.js → page-c0a07c0283731a8c.js} +1 -1
  160. package/.next/static/chunks/app/(app)/cron/{page-ab35783e4341f6b7.js → page-662e6e1a25b14025.js} +1 -1
  161. package/.next/static/chunks/app/(app)/dashboard/page-e6f62eaecc0f9926.js +1 -0
  162. package/.next/static/chunks/app/(app)/design/{page-fcee2dfd5c7e3a4b.js → page-d457cdfa525acb85.js} +3 -3
  163. package/.next/static/chunks/app/(app)/docs/[id]/{page-b3451b21d7d2127b.js → page-4a1be0c9bd6ca402.js} +1 -1
  164. package/.next/static/chunks/app/(app)/docs/page-e6db758a14f57ec8.js +1 -0
  165. package/.next/static/chunks/app/(app)/github/page-57bb812627d083a1.js +1 -0
  166. package/.next/static/chunks/app/(app)/goals/page-81e1af515f78e13b.js +1 -0
  167. package/.next/static/chunks/app/(app)/inbox/page-0baef1b01009c832.js +12 -0
  168. package/.next/static/chunks/app/(app)/knowledge/page-eb1317bf385e31ed.js +1 -0
  169. package/.next/static/chunks/app/(app)/layout-dcd4f30b53cb140f.js +1 -0
  170. package/.next/static/chunks/app/(app)/models/page-d73965ae6ca317e8.js +1 -0
  171. package/.next/static/chunks/app/(app)/notifications/page-b3ff14483cb6694e.js +12 -0
  172. package/.next/static/chunks/app/(app)/org/page-3075b218dbc681ce.js +12 -0
  173. package/.next/static/chunks/app/(app)/organizations/page-a6d35dbb21a61b7c.js +1 -0
  174. package/.next/static/chunks/app/(app)/page-c9e4fc0616a0083e.js +1 -0
  175. package/.next/static/chunks/app/(app)/planner/page-809dd3edda4ada93.js +1 -0
  176. package/.next/static/chunks/app/(app)/plugins/{page-e75d982132825b07.js → page-7e2aad1b702b5c88.js} +1 -1
  177. package/.next/static/chunks/app/(app)/pm/{page-773626398c10fdb7.js → page-709f9ac68ac98693.js} +1 -1
  178. package/.next/static/chunks/app/(app)/prepare-deploy/{page-01f767248e7fa2a7.js → page-f9609626153c2483.js} +1 -1
  179. package/.next/static/chunks/app/(app)/profile/page-6d22c7bd0adb7a52.js +1 -0
  180. package/.next/static/chunks/app/(app)/pulse/{page-1a63c4ed76db48f5.js → page-f529917828ff4884.js} +1 -1
  181. package/.next/static/chunks/app/(app)/reports/[id]/{page-ab35783e4341f6b7.js → page-662e6e1a25b14025.js} +1 -1
  182. package/.next/static/chunks/app/(app)/reports/page-5248735b18767054.js +1 -0
  183. package/.next/static/chunks/app/(app)/routines/page-cf4e597389865ae8.js +1 -0
  184. package/.next/static/chunks/app/(app)/search/{page-d30f1c44c95e14a3.js → page-4d1e07c4c43a7489.js} +1 -1
  185. package/.next/static/chunks/app/(app)/security/page-db7b8840d9cc6b72.js +1 -0
  186. package/.next/static/chunks/app/(app)/skills/page-a98da9e415efc310.js +1 -0
  187. package/.next/static/chunks/app/(app)/tasks/page-ab33402626a50c88.js +1 -0
  188. package/.next/static/chunks/app/(app)/test-dev/page-34612a4b47ec9aa2.js +1 -0
  189. package/.next/static/chunks/app/(app)/update/page-99d63495bfdd56a9.js +1 -0
  190. package/.next/static/chunks/app/(auth)/login/page-c7b372a5053512f0.js +1 -0
  191. package/.next/static/chunks/app/(auth)/onboarding/{page-0cd7cd9fa146a927.js → page-450bfc87fb942f9b.js} +1 -1
  192. package/.next/static/chunks/app/_not-found/page-dc38b02aebeab535.js +1 -0
  193. package/.next/trace-build +1 -1
  194. package/CHANGELOG.md +32 -3
  195. package/README.md +1 -1
  196. package/README.pt-BR.md +1 -1
  197. package/bin/constella-update.mjs +44 -0
  198. package/docs/UPDATE.md +31 -6
  199. package/package.json +1 -1
  200. package/scripts/vps-install.sh +22 -0
  201. package/scripts/vps-update.sh +22 -0
  202. package/.next/server/chunks/3174.js +0 -12
  203. package/.next/server/chunks/3334.js +0 -1
  204. package/.next/server/chunks/3439.js +0 -4
  205. package/.next/server/chunks/478.js +0 -1
  206. package/.next/server/chunks/8244.js +0 -1
  207. package/.next/static/chunks/386-0f2b8d23016cf4d0.js +0 -1
  208. package/.next/static/chunks/4909-9f16a714c78ed30d.js +0 -4
  209. package/.next/static/chunks/5332-84d9a65aa5d16106.js +0 -1
  210. package/.next/static/chunks/5664-3cb5735f1b5bbde1.js +0 -1
  211. package/.next/static/chunks/8370-7ec9e9bf414f8f2d.js +0 -12
  212. package/.next/static/chunks/9690-53d5222618cbeddb.js +0 -1
  213. package/.next/static/chunks/app/(app)/agents/[handle]/page-14805dd54a1333e8.js +0 -1
  214. package/.next/static/chunks/app/(app)/code/page-7ebd6923ac440103.js +0 -1
  215. package/.next/static/chunks/app/(app)/config/page-47b5b62b73050673.js +0 -1
  216. package/.next/static/chunks/app/(app)/dashboard/page-59521ad116c60a88.js +0 -1
  217. package/.next/static/chunks/app/(app)/docs/page-3a34eec67591ce3e.js +0 -1
  218. package/.next/static/chunks/app/(app)/github/page-a0117637dc143821.js +0 -1
  219. package/.next/static/chunks/app/(app)/goals/page-d1cb2552625ccadb.js +0 -1
  220. package/.next/static/chunks/app/(app)/inbox/page-dbfc885cd61f9b9f.js +0 -12
  221. package/.next/static/chunks/app/(app)/knowledge/page-29df476a9c2f930c.js +0 -1
  222. package/.next/static/chunks/app/(app)/layout-2b6b23e82fbf0211.js +0 -1
  223. package/.next/static/chunks/app/(app)/models/page-ea54a5d167cd3cc2.js +0 -1
  224. package/.next/static/chunks/app/(app)/notifications/page-ef1ac55efadb2a1a.js +0 -12
  225. package/.next/static/chunks/app/(app)/org/page-a7c734b8d86f7641.js +0 -12
  226. package/.next/static/chunks/app/(app)/organizations/page-4bcec3010a9d9119.js +0 -1
  227. package/.next/static/chunks/app/(app)/page-54a99a54295a40be.js +0 -1
  228. package/.next/static/chunks/app/(app)/planner/page-adfd05afc6ddcbef.js +0 -1
  229. package/.next/static/chunks/app/(app)/profile/page-cb2450679785db1a.js +0 -1
  230. package/.next/static/chunks/app/(app)/reports/page-b0bcc85ad4afecf5.js +0 -1
  231. package/.next/static/chunks/app/(app)/routines/page-c0ce223d128a9010.js +0 -1
  232. package/.next/static/chunks/app/(app)/security/page-4640d72a0b360f05.js +0 -1
  233. package/.next/static/chunks/app/(app)/skills/page-87a71bd0a6b0f262.js +0 -1
  234. package/.next/static/chunks/app/(app)/tasks/page-a34a5658aff509ec.js +0 -1
  235. package/.next/static/chunks/app/(app)/test-dev/page-842f8771d36e964b.js +0 -1
  236. package/.next/static/chunks/app/(app)/update/page-64467fa6d8ed737e.js +0 -1
  237. package/.next/static/chunks/app/(auth)/login/page-82964b720ff11bab.js +0 -1
  238. package/.next/static/chunks/app/_not-found/page-489c316e4356f1b7.js +0 -1
  239. /package/.next/static/{Fx06n4huXV42eQUI-Lty0 → mOVW9EdxrQ1xPT7vDdRdK}/_buildManifest.js +0 -0
  240. /package/.next/static/{Fx06n4huXV42eQUI-Lty0 → mOVW9EdxrQ1xPT7vDdRdK}/_ssgManifest.js +0 -0
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4353],{891:(e,t,a)=>{a.d(t,{m:()=>n});var s=a(5076);let c={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 n({status:e,label:t=!1,size:a=8}){let l=c[e]??c.idle;return(0,s.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:5},title:l.label,children:[l.pulse?(0,s.jsx)("span",{className:"dotpulse"}):(0,s.jsx)("span",{style:{width:a,height:a,borderRadius:"50%",background:l.c,display:"inline-block",flex:`0 0 ${a}px`}}),t&&(0,s.jsx)("span",{style:{fontSize:11,color:l.c,fontWeight:600},children:l.label})]})}},1973:(e,t,a)=>{a.d(t,{M:()=>c});var s=a(7814);let c=(0,s.createServerReference)("70134ed93c744753cbd112c32720864d9c20816aac",s.callServer,void 0,s.findSourceMapURL,"connectTelegram")},4353:(e,t,a)=>{a.d(t,{uG:()=>U,QE:()=>T,CZ:()=>A});var s=a(5076),c=a(8488),n=a(7814);let l=(0,n.createServerReference)("0025f5c700bf585074afe9a3d74daf5d034b95a18d",n.callServer,void 0,n.findSourceMapURL,"listChatRefs");var r=a(7799);let i=(0,n.createServerReference)("40972e72e17f52772e05b1c26618888916aa0a95cc",n.callServer,void 0,n.findSourceMapURL,"listSessions"),d=(0,n.createServerReference)("60face35dada2c40df11c8516d8fa9bd434df12801",n.callServer,void 0,n.findSourceMapURL,"createSession"),o=(0,n.createServerReference)("601269a69c549fe5fca4611d91fa20388e33f4e50b",n.callServer,void 0,n.findSourceMapURL,"switchSession"),h=(0,n.createServerReference)("6061163d33474b69b44ca71969e7e32eea6632c216",n.callServer,void 0,n.findSourceMapURL,"renameSession"),m=(0,n.createServerReference)("606c496fc7ae51c9732c206c25c0180519765eb1c5",n.callServer,void 0,n.findSourceMapURL,"deleteSession");var u=a(5415),f=a(5651),x=a(6196),g=a(7832),v=a(5629),p=a(1973),j=a(5300),b=a(7868),k=a(4327),N=a(3368),S=a(7063);let y=(0,n.createServerReference)("00ffdd5039d3f6a2972d259f688e974bc22fce2faa",n.callServer,void 0,n.findSourceMapURL,"getChatNotifications"),w=(0,n.createServerReference)("008385a17df8e9a6678d83c4e627af6724a6f6bd63",n.callServer,void 0,n.findSourceMapURL,"getUnreadCounts"),C=(0,n.createServerReference)("405e24180c17959a1265888000a45d837e7964045b",n.callServer,void 0,n.findSourceMapURL,"markChannelRead"),R=(0,n.createServerReference)("403917580efb407e1766db48881562b96dbf6c5fcb",n.callServer,void 0,n.findSourceMapURL,"markNotifRead");var I=a(4552),L=a(8576),z=a(891),E=a(8163),M=a(8894);function T({agents:e,previews:t,onOpenDM:a}){let n=(0,v.k)(),[l,r]=(0,c.useState)(""),i=l.trim().toLowerCase(),d=e.filter(e=>!i||e.name.toLowerCase().includes(i)||e.handle.includes(i)||e.role.toLowerCase().includes(i));return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"dm-search",children:[(0,s.jsx)(L.I,{name:"search",size:13}),(0,s.jsx)("input",{placeholder:n("chat.searchAgents"),value:l,onChange:e=>r(e.target.value),autoFocus:!0})]}),(0,s.jsxs)("div",{className:"people-list scroll",children:[0===d.length&&(0,s.jsx)("div",{className:"mention-empty",children:n("chat.noAgentMatch",{q:l})}),d.map(e=>{let c=t[e.handle];return(0,s.jsxs)("div",{className:"people-row",onClick:()=>a(e.handle),children:[(0,s.jsx)(I.e,{name:e.name,color:e.color,image:e.image,size:36,health:e.health}),(0,s.jsxs)("div",{className:"people-meta",children:[(0,s.jsxs)("div",{className:"people-name",style:{display:"flex",alignItems:"center",gap:6},children:[e.name," ",(0,s.jsxs)("span",{className:"agent-handle",children:["@",e.handle]})," ","idle"!==e.status&&(0,s.jsx)(z.m,{status:e.status})]}),(0,s.jsx)("div",{className:"people-sub"+(c?" preview":""),children:c?(c.mine?n("chat.youPrefix"):"")+(c.text||"…"):`${e.role} \xb7 ${e.adapter}`})]}),(0,s.jsx)("span",{className:"people-go",children:(0,s.jsx)(L.I,{name:c?"chat":"chevronRight",size:14})})]},e.handle)})]})]})}function A({onConnected:e}){let t=(0,v.k)(),[a,n]=(0,c.useState)(""),[l,r]=(0,c.useState)(""),[i,d]=(0,c.useState)(""),[o,h]=(0,c.useState)(""),[m,u]=(0,c.useState)(""),[f,x]=(0,c.useTransition)();return(0,s.jsx)("div",{className:"tg-connect scroll",children:(0,s.jsxs)("div",{className:"tg-card",children:[(0,s.jsxs)("div",{className:"tg-card-head",children:[(0,s.jsx)("span",{className:"tg-card-ico",children:(0,s.jsx)(L.I,{name:"send",size:18})}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"tg-card-title",children:t("chat.tg.connectTitle")}),(0,s.jsx)("div",{className:"tg-card-sub",children:t("chat.tg.connectSub")})]})]}),(0,s.jsxs)("ol",{className:"tg-steps",children:[(0,s.jsxs)("li",{children:[t("chat.tg.step1.a")," ",(0,s.jsx)("b",{children:"@BotFather"})," ",t("chat.tg.step1.b")," → ",(0,s.jsx)("code",{children:"/newbot"})," → ",t("chat.tg.step1.c")," ",(0,s.jsx)("b",{children:t("chat.tg.step1.token")}),"."]}),(0,s.jsxs)("li",{children:[t("chat.tg.step2.a")," ",(0,s.jsx)("b",{children:"@userinfobot"})," → ",t("chat.tg.step2.b")," ",(0,s.jsx)("b",{children:t("chat.tg.step2.chatId")})," ",t("chat.tg.step2.c")]}),(0,s.jsx)("li",{children:t("chat.tg.step3")})]}),(0,s.jsxs)("label",{className:"tg-field",children:[(0,s.jsx)("span",{children:t("chat.tg.botToken")}),(0,s.jsx)("input",{className:"form-input",placeholder:"123456789:AA…",value:a,onChange:e=>n(e.target.value)})]}),(0,s.jsxs)("div",{className:"tg-field-row",children:[(0,s.jsxs)("label",{className:"tg-field",children:[(0,s.jsx)("span",{children:t("chat.tg.yourChatId")}),(0,s.jsx)("input",{className:"form-input",placeholder:"123456789",value:l,onChange:e=>r(e.target.value)})]}),(0,s.jsxs)("label",{className:"tg-field",children:[(0,s.jsx)("span",{children:t("chat.tg.yourName")}),(0,s.jsx)("input",{className:"form-input",placeholder:t("chat.tg.namePlaceholder"),value:i,onChange:e=>d(e.target.value)})]})]}),o&&(0,s.jsx)("div",{className:"tg-msg err",children:o}),m&&(0,s.jsx)("div",{className:"tg-msg ok",children:m}),(0,s.jsxs)("button",{className:"btn-accent tg-save",disabled:f||!a.trim()||!l.trim(),onClick:function(){h(""),u(""),x(async()=>{let s=await (0,p.M)(a,l,i);s.ok?(u(t("chat.tg.botConnected",{bot:"@"+(s.username??"bot")})),n(""),r(""),d(""),e()):h(s.error??t("chat.tg.connectionFailed"))})},children:[f?(0,s.jsx)("span",{className:"spin",children:(0,s.jsx)(L.I,{name:"refresh",size:13})}):(0,s.jsx)(L.I,{name:"send",size:13})," ",t("chat.tg.connectBot")]}),(0,s.jsxs)("div",{className:"tg-note",children:[(0,s.jsx)(L.I,{name:"bot",size:12})," ",t("chat.tg.isolatedNote")]})]})})}function U({agents:e,operator:t}){let a,n,p,z,[D,q]=(0,c.useState)(!1),[F,H]=(0,c.useState)("right"),[O,P]=(0,c.useState)(380),[W,$]=(0,c.useState)("room"),[_,B]=(0,c.useState)("all"),[K,V]=(0,c.useState)(""),G=(0,v.k)(),[J,X]=(0,c.useState)([]),[Q,Y]=(0,c.useState)([]),[Z,ee]=(0,c.useState)([]),[et,ea]=(0,c.useState)(!1),[es,ec]=(0,c.useState)(null),[en,el]=(0,c.useState)(!1),[er,ei]=(0,c.useState)([]),[ed,eo]=(0,c.useState)({}),[eh,em]=(0,c.useState)(!1),[eu,ef]=(0,c.useState)(null),[ex,eg]=(0,c.useState)({}),[ev,ep]=(0,c.useState)(""),[ej,eb]=(0,c.useState)(0),[ek,eN]=(0,c.useState)([]),[eS,ey]=(0,c.useState)(null),[ew,eC]=(0,c.useState)(0),[eR,eI]=(0,c.useState)([]),[,eL]=(0,c.useTransition)(),ez=(0,c.useRef)(0),eE=(0,c.useRef)(0),eM=(0,c.useRef)(null),eT=(0,c.useRef)({}),eA=(0,c.useRef)([]),[eU,eD]=(0,c.useState)(null),eq=Object.fromEntries(e.map(e=>[e.handle,e])),eF=W.startsWith("dm:");(0,c.useEffect)(()=>{D&&!eR.length&&l().then(eI).catch(()=>{})},[D]);let eH="people"===W,eO="telegram"===W,eP=eF?W.slice(3):null,eW=eP?eq[eP]:null,e$=eF?W:eO?"telegram":"room";function e_(){delete eT.current[e$],eC(e=>e+1)}(0,c.useEffect)(()=>{function e(){q(e=>!e)}function t(e){q(!0);let t=e.detail?.channel;("room"===t||"telegram"===t||t&&t.startsWith("dm:"))&&$(t)}return window.addEventListener("constella:toggle-chat",e),window.addEventListener("constella:open-chat",t),()=>{window.removeEventListener("constella:toggle-chat",e),window.removeEventListener("constella:open-chat",t)}},[]),(0,c.useEffect)(()=>{try{"1"===localStorage.getItem("bx.chatOpen")&&q(!0);let e=localStorage.getItem("bx.chatSide");("left"===e||"right"===e)&&H(e);let t=Number(localStorage.getItem("bx.chatWidth"));t>=320&&t<=640&&P(t)}catch{}},[]),(0,c.useEffect)(()=>{try{localStorage.setItem("bx.chatOpen",D?"1":"0")}catch{}},[D]),(0,c.useEffect)(()=>{try{localStorage.setItem("bx.chatSide",F)}catch{}},[F]),(0,c.useEffect)(()=>{try{localStorage.setItem("bx.chatWidth",String(O))}catch{}},[O]),(0,c.useEffect)(()=>{function e(e){let t=e.detail;t?.handle&&(q(!0),$("dm:"+t.handle),t.text&&(ep(t.text),eb(e=>e+1)))}return window.addEventListener("constella:open-dm",e),()=>window.removeEventListener("constella:open-dm",e)},[]),(0,c.useEffect)(()=>{if(!D||eH)return;let e=!1,t=()=>({msgs:[],events:[],evSeq:0,msgCursor:0}),a=e=>e.length>250?e.slice(-250):e;for(eA.current=[...eA.current.filter(e=>e!==e$),e$];eA.current.length>6;){let e=eA.current.shift();e&&e!==e$&&delete eT.current[e]}let s=eT.current[e$];async function c(){let[t,a]=await Promise.all([(0,r.V)(e$),(0,k.k)(e$,0)]);e||(X(t),Y(a),ez.current=a.reduce((e,t)=>Math.max(e,t.seq),0),eE.current=t.reduce((e,t)=>Math.max(e,t.createdAt?new Date(t.createdAt).getTime():0),0),eT.current[e$]={msgs:t,events:a,evSeq:ez.current,msgCursor:eE.current})}function n(){if(e||document.hidden||eM.current)return;let s=new EventSource(`/api/stream?channel=${encodeURIComponent(e$)}&evCursor=${ez.current}&msgCursor=${eE.current}`);eM.current=s,s.addEventListener("ev",e=>{let s=JSON.parse(e.data);s.seq>ez.current&&(ez.current=s.seq),Y(e=>e.some(e=>e.id===s.id)?e:a([...e,s]));let c=eT.current[e$]??t();c.events.some(e=>e.id===s.id)||(eT.current[e$]={...c,events:a([...c.events,s]),evSeq:ez.current})}),s.addEventListener("msg",e=>{let s=JSON.parse(e.data),c=s.createdAt?new Date(s.createdAt).getTime():0;if(c>eE.current&&(eE.current=c),"cleared"===s.kind){X([s]),Y([]),ee([]),eT.current[e$]={...t(),msgs:[s],msgCursor:eE.current,evSeq:ez.current};return}X(e=>e.some(e=>e.id===s.id)?e:a([...e,s])),Y(e=>e.filter(e=>e.runId!==s.id||"text"!==e.kind));let n=eT.current[e$]??t();eT.current[e$]={...n,msgs:n.msgs.some(e=>e.id===s.id)?n.msgs:a([...n.msgs,s]),events:n.events.filter(e=>e.runId!==s.id||"text"!==e.kind),msgCursor:eE.current}})}function l(){eM.current&&(eM.current.close(),eM.current=null)}s?(X(s.msgs),Y(s.events),ez.current=s.evSeq,eE.current=s.msgCursor,ea(!1)):(X([]),Y([]),ez.current=0,eE.current=0,ea(!0)),s?document.hidden||n():c().catch(()=>{}).finally(()=>{!e&&(ea(!1),document.hidden||n())});let i=()=>{document.hidden?l():n()};return document.addEventListener("visibilitychange",i),()=>{e=!0,document.removeEventListener("visibilitychange",i),l()}},[D,W,ew]),(0,c.useEffect)(()=>{D&&eF?i(e$).then(eN).catch(()=>{}):eN([])},[D,W,ew]);let eB=()=>(0,u.b)().then(e=>eg(e));(0,c.useEffect)(()=>{D&&eB()},[D,W]);let eK=()=>(0,j.G)().then(e=>eD(e)).catch(()=>eD({connected:!1}));(0,c.useEffect)(()=>{D&&eO&&eK()},[D,W]);let eV=async()=>{if(!eH)try{let e=await (0,N.p)(e$);if(e.used>=e.max&&!en){el(!0);try{await (0,S.L)(e$),e=await (0,N.p)(e$)}finally{el(!1)}}ec(e)}catch{}};async function eG(){if(!en){el(!0);try{await (0,S.L)(e$),await eV()}finally{el(!1)}}}function eJ(){ey({title:G("chat.dock.clearTitle"),body:G("chat.dock.clearBody"),confirmLabel:G("common.clear"),onConfirm:()=>eL(async()=>{await (0,f.H)(e$).catch(()=>{}),X([]),Y([]),ee([]),delete eT.current[e$],ez.current=0,eE.current=0,await eV(),eF&&await eB()})})}(0,c.useEffect)(()=>{D&&!eH?eV():eH&&ec(null)},[D,W,J.length]);let eX=async()=>{try{let[e,t]=await Promise.all([y(),w()]);ei(e),eo(t)}catch{}};async function eQ(e){em(!1),e.channel&&$(e.channel.startsWith("dm:")?e.channel:"room"),e.messageId&&(ef(e.messageId),setTimeout(()=>ef(null),2600));try{await R(e.id)}catch{}eX()}function eY(e,t){eL(async()=>{let{responders:a}=await (0,x._)(e$,e,t);if(a.length){for(let e of(ee(a),a))await (0,g.n)(e$,e),ee(t=>t.filter(t=>t!==e));ee([])}eF&&await eB()})}if((0,c.useEffect)(()=>{D&&eX()},[D,W,J.length]),(0,c.useEffect)(()=>{D&&!eH&&C(e$).then(eX).catch(()=>{})},[D,W,J.length]),!D)return(0,s.jsx)("button",{className:"chat-fab",style:{display:"grid",placeItems:"center"},onClick:()=>q(!0),title:G("chrome.chat.agentRoom"),children:(0,s.jsx)(L.I,{name:"chat",size:20})});let eZ={};for(let e of Q)(eZ[e.runId]??=[]).push(e);let e0=new Set(J.map(e=>e.id)),e1=Object.entries(eZ).filter(([e])=>!e0.has(e)),e6=Object.keys(ex).length,e5=ed.room??0,e8=Object.entries(ed).reduce((e,[t,a])=>t.startsWith("dm:")?e+a:e,0),e2=ed.telegram??0;return(0,s.jsxs)("div",{className:"chat-dock "+F,style:{width:O},children:[(0,s.jsx)("div",{className:"dock-resizer "+F,onMouseDown:function(e){e.preventDefault();let t=e.clientX;function a(e){let a=e.clientX-t;P(Math.max(320,Math.min(640,"right"===F?O-a:O+a)))}document.body.style.cursor="col-resize",window.addEventListener("mousemove",a),window.addEventListener("mouseup",function e(){window.removeEventListener("mousemove",a),window.removeEventListener("mouseup",e),document.body.style.cursor=""})}}),(0,s.jsxs)("div",{className:"dock-toolbar",children:[(0,s.jsxs)("span",{className:"dock-toolbar-title",children:[(0,s.jsx)(L.I,{name:"agents",size:15,style:{color:"var(--accent)"}})," ",G("chat.dock.agents")]}),(0,s.jsxs)("div",{className:"dock-tools",children:[(0,s.jsxs)("div",{className:"dock-bell-wrap",children:[(0,s.jsxs)("button",{className:"dock-tool",title:G("top.notifications"),onClick:()=>em(e=>!e),children:[(0,s.jsx)(L.I,{name:"bell",size:15}),er.length>0&&(0,s.jsx)("span",{className:"dock-bell-badge",children:er.length})]}),eh&&(0,s.jsxs)("div",{className:"dock-notif-pop",children:[(0,s.jsxs)("div",{className:"dock-notif-head",children:[G("top.notifications")," ",er.length>0&&(0,s.jsxs)("span",{children:["(",er.length,")"]})]}),0===er.length&&(0,s.jsx)("div",{className:"dock-notif-empty",children:G("chat.dock.nothingNeedsYou")}),er.map(e=>(0,s.jsxs)("button",{className:"dock-notif-row"+("approval"===e.kind?" approval":""),onClick:()=>eQ(e),children:[(0,s.jsx)("span",{className:"dn-ico",children:(0,s.jsx)(L.I,{name:"approval"===e.kind?"check":"at",size:13})}),(0,s.jsxs)("span",{className:"dn-body",children:[(0,s.jsx)("span",{className:"dn-text",children:e.text}),e.detail&&(0,s.jsx)("span",{className:"dn-detail",children:e.detail})]}),(0,s.jsx)("span",{className:"dn-go",children:(0,s.jsx)(L.I,{name:"chevronRight",size:12})})]},e.id))]})]}),(0,s.jsx)("button",{className:"dock-tool",title:"right"===F?G("chat.dock.moveLeft"):G("chat.dock.moveRight"),onClick:()=>H(e=>"right"===e?"left":"right"),children:(0,s.jsx)(L.I,{name:"right"===F?"dockLeft":"dockRight",size:15})}),(0,s.jsx)("button",{className:"dock-tool",title:G("chat.dock.hide"),onClick:()=>q(!1),children:(0,s.jsx)(L.I,{name:"close",size:15})})]})]}),(0,s.jsxs)("div",{className:"dock-tabs",children:[(0,s.jsxs)("button",{className:"dock-tab"+(eF||eH||eO?"":" on"),onClick:()=>$("room"),children:[(0,s.jsx)(L.I,{name:"agents",size:14})," ",G("chat.dock.tabRoom"),e5>0&&(0,s.jsx)("span",{className:"dt-badge",children:e5})]}),(0,s.jsxs)("button",{className:"dock-tab"+(eH||eF?" on":""),onClick:()=>$("people"),children:[(0,s.jsx)(L.I,{name:"chat",size:14})," ",G("chat.dock.tabDirect"),(e8||e6)>0&&(0,s.jsx)("span",{className:"dt-badge",children:e8||e6})]}),(0,s.jsxs)("button",{className:"dock-tab"+(eO?" on":""),onClick:()=>$("telegram"),children:[(0,s.jsx)(L.I,{name:"send",size:14})," Telegram",e2>0&&(0,s.jsx)("span",{className:"dt-badge",children:e2})]})]}),!eH&&!(eO&&eU&&!eU.connected)&&(0,s.jsxs)("div",{className:"ctx-bar",children:[es?(0,s.jsx)(E.m,{stat:es,onCompact:eG,compacting:en}):(0,s.jsx)("span",{}),eO?(0,s.jsxs)("span",{className:"ctx-hint",title:G("chat.dock.tgIsolatedTip"),children:[(0,s.jsx)(L.I,{name:"bot",size:12})," ",G("chat.dock.isolatedThreadAda")]}):(0,s.jsxs)("span",{className:"ctx-hint",title:G("chat.dock.dmAdaTip"),children:[(0,s.jsx)(L.I,{name:"bot",size:12})," ",G("home.chat.dmAda")]})]}),eF&&eW?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"dm-back-row",children:[(0,s.jsxs)("button",{className:"dm-back-btn",onClick:()=>$("people"),children:[(0,s.jsx)(L.I,{name:"chevronLeft",size:14})," ",G("chat.dock.allAgents")]}),(0,s.jsxs)("div",{style:{marginLeft:"auto",display:"flex",alignItems:"center",gap:5,flexWrap:"wrap",justifyContent:"flex-end"},children:[ek.map(e=>(0,s.jsxs)("span",{className:"sess-pill",children:[(0,s.jsx)("button",{className:"sess-tab"+(e.active?" active":""),title:e.active?G("chat.dock.sessActiveTip"):G("chat.dock.sessSwitchTip"),onClick:()=>{var t;return t=e.id,void(!ek.find(e=>e.id===t)?.active&&eL(async()=>{await o(e$,t).catch(()=>{}),e_()}))},onDoubleClick:()=>{var t,a;let s;return t=e.id,a=e.title,void(null!=(s=prompt(G("chat.dock.renameSession"),a))&&eL(async()=>{await h(t,s).catch(()=>{}),i(e$).then(eN).catch(()=>{})}))},children:e.title}),ek.length>1&&(0,s.jsx)("button",{className:"sess-del",title:G("chat.dock.sessDelete"),onClick:()=>{var t,a;return t=e.id,a=e.title,void ey({title:G("chat.dock.deleteSessionTitle"),body:G("chat.dock.deleteSessionBody",{title:a}),confirmLabel:G("common.delete"),onConfirm:()=>eL(async()=>{await m(e$,t).catch(()=>{}),e_(),i(e$).then(eN).catch(()=>{})})})},children:(0,s.jsx)(L.I,{name:"close",size:11})})]},e.id)),(0,s.jsxs)("button",{className:"sess-new",title:G("chat.dock.sessNewTip"),onClick:function(){eL(async()=>{await d(e$).catch(()=>{}),e_()})},children:[(0,s.jsx)(L.I,{name:"add",size:12})," ",G("chat.dock.sessNew")]})]})]}),(0,s.jsxs)("div",{className:"chat-header dm",children:[(0,s.jsx)(I.e,{name:eW.name,color:eW.color,image:eW.image,size:34,health:eW.health}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"chat-title",children:[eW.name," ",(0,s.jsxs)("span",{className:"agent-handle",children:["@",eW.handle]})]}),(0,s.jsxs)("div",{className:"chat-sub",children:[eW.role," \xb7 ",eW.adapter]})]}),(0,s.jsxs)("div",{style:{marginLeft:"auto",display:"flex",alignItems:"center",gap:8},children:[(0,s.jsx)(M.qs,{status:eW.status}),(0,s.jsx)("button",{className:"dock-tool",title:G("chat.dock.clearConversation"),onClick:eJ,children:(0,s.jsx)(L.I,{name:"trash",size:15})})]})]}),(0,s.jsxs)("div",{className:"dm-context-note",children:[(0,s.jsx)("span",{className:"ico",children:(0,s.jsx)(L.I,{name:"bot",size:14})}),G("chat.dock.dmContextNote",{name:eW.name})]}),(0,s.jsx)(M.H8,{msgs:J,typing:Z,agents:e,byRun:eZ,liveRuns:e1,loading:et,highlightId:eu,operator:t,markdownAgent:!0}),(0,s.jsx)(M.V4,{onSend:eY,agents:e,defaultText:ev,placeholder:G("chat.dock.messageAgent",{name:eW.name})},"dm:"+eP+":"+ej)]}):eH?(0,s.jsx)(T,{agents:e,previews:ex,onOpenDM:e=>{$("dm:"+e)}}):eO?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"chat-header room",children:[(0,s.jsx)("div",{className:"brand-ico",style:{background:"linear-gradient(150deg,#2aabee,#229ed9)",color:"#fff"},children:(0,s.jsx)(L.I,{name:"send",size:16})}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"chat-title",children:"Telegram"}),(0,s.jsx)("div",{className:"chat-sub",children:eU?.connected?G("chat.tg.connectedSub",{name:eU.allowedName||G("chat.tg.you"),chatId:eU.chatIdMasked??""}):G("chat.tg.connectPrompt")})]}),eU?.connected&&(0,s.jsxs)("div",{style:{marginLeft:"auto",display:"flex",gap:6},children:[(0,s.jsx)("button",{className:"dock-tool",title:G("chat.dock.clearConversation"),onClick:eJ,children:(0,s.jsx)(L.I,{name:"trash",size:15})}),(0,s.jsx)("button",{className:"dock-tool",title:G("chat.tg.disconnect"),onClick:()=>{confirm(G("chat.tg.disconnectConfirm"))&&eL(async()=>{await (0,b.K)(),eK()})},children:(0,s.jsx)(L.I,{name:"close",size:15})})]})]}),eU&&!eU.connected?(0,s.jsx)(A,{onConnected:eK}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"dm-context-note",children:[(0,s.jsx)("span",{className:"ico",children:(0,s.jsx)(L.I,{name:"send",size:14})}),G("chat.tg.isolatedThreadNote")]}),(0,s.jsx)(M.H8,{msgs:J,typing:Z,agents:e,byRun:eZ,liveRuns:e1,loading:et||!eU,highlightId:eu,operator:t,markdownAgent:!0}),(0,s.jsx)(M.V4,{onSend:eY,agents:e,placeholder:G("chat.tg.composerPlaceholder")},"telegram:"+ej)]})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"chat-header room",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"chat-title",children:G("chat.dock.teamChannel")}),(0,s.jsx)("div",{className:"chat-sub",children:G("chat.dock.teamChannelSub",{n:e.length})})]}),(0,s.jsxs)("div",{className:"chat-members",children:[e.slice(0,6).map(e=>(0,s.jsx)("button",{className:"member-btn",title:G("chat.dock.dmName",{name:e.name}),onClick:()=>{$("dm:"+e.handle)},children:(0,s.jsx)(I.e,{name:e.name,color:e.color,size:26})},e.handle)),e.length>6&&(0,s.jsxs)("button",{className:"more",title:G("chat.dock.allAgents"),onClick:()=>$("people"),children:["+",e.length-6]})]})]}),(a=Array.from(new Set(e.map(e=>e.role))).sort(),n="all"===_?J:"type:work"===_?J.filter(e=>(eZ[e.id]?.length??0)>0||!!e.kind):"type:chat"===_?J.filter(e=>!eZ[e.id]?.length&&!e.kind):_.startsWith("role:")?J.filter(e=>"operator"===e.fromKind||e.fromHandle&&eq[e.fromHandle]?.role===_.slice(5)):J.filter(e=>"operator"===e.fromKind||e.fromHandle===_),z=(p=K.trim().toLowerCase())?n.filter(e=>(e.text??"").toLowerCase().includes(p)):n,(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"room-filter",children:[(0,s.jsx)("span",{className:"rf-label",children:G("chat.filter")}),(0,s.jsx)("button",{type:"button",className:"rf-chip"+("all"===_?" on":""),onClick:()=>B("all"),children:G("common.all")}),(0,s.jsx)("button",{type:"button",className:"rf-chip rf-lane"+("type:work"===_?" on":""),title:G("chat.filter.work"),onClick:()=>B("type:work"===_?"all":"type:work"),children:G("chat.filter.work")}),(0,s.jsx)("button",{type:"button",className:"rf-chip rf-lane"+("type:chat"===_?" on":""),title:G("chat.filter.discussion"),onClick:()=>B("type:chat"===_?"all":"type:chat"),children:G("chat.filter.discussion")}),a.map(e=>(0,s.jsx)("button",{type:"button",className:"rf-chip rf-role"+(_==="role:"+e?" on":""),title:G("chat.filter.byRole"),onClick:()=>B(_==="role:"+e?"all":"role:"+e),children:e},"role:"+e)),e.map(e=>(0,s.jsxs)("button",{type:"button",className:"rf-chip"+(_===e.handle?" on":""),title:e.name,onClick:()=>B(_===e.handle?"all":e.handle),children:["@",e.handle]},e.handle)),(0,s.jsxs)("span",{className:"rf-search",children:[(0,s.jsx)(L.I,{name:"search",size:12}),(0,s.jsx)("input",{value:K,onChange:e=>V(e.target.value),placeholder:G("chat.filter.search"),"aria-label":G("chat.filter.search")}),K&&(0,s.jsx)("button",{type:"button",className:"rf-clear",onClick:()=>V(""),"aria-label":G("common.dismiss"),children:(0,s.jsx)(L.I,{name:"close",size:11})})]})]}),(0,s.jsx)(M.H8,{msgs:z,typing:Z,agents:e,byRun:eZ,liveRuns:e1,loading:et,highlightId:eu,operator:t,markdownAgent:!0,refs:eR})]})),(0,s.jsx)(M.V4,{onSend:eY,agents:e,defaultText:"room"===W?ev:"",requireMention:!0,placeholder:G("chat.dock.roomPlaceholder"),refs:eR},"room:"+ej)]}),eS&&(0,s.jsx)("div",{className:"modal-overlay",onMouseDown:()=>ey(null),children:(0,s.jsxs)("div",{className:"modal",style:{width:380},onMouseDown:e=>e.stopPropagation(),children:[(0,s.jsx)("div",{className:"modal-head",children:(0,s.jsxs)("div",{className:"modal-title",children:[(0,s.jsx)(L.I,{name:"trash",size:15,style:{color:"var(--sx-keyword)"}})," ",eS.title]})}),(0,s.jsx)("div",{className:"modal-body",children:(0,s.jsx)("div",{style:{fontSize:13,color:"var(--text-dim)",lineHeight:1.55},children:eS.body})}),(0,s.jsxs)("div",{className:"modal-foot",children:[(0,s.jsx)("button",{className:"btn-ghost",onClick:()=>ey(null),children:G("common.cancel")}),(0,s.jsx)("button",{className:"btn-accent",style:{background:"var(--sx-keyword)",borderColor:"var(--sx-keyword)",color:"#fff"},onClick:()=>{eS.onConfirm(),ey(null)},children:eS.confirmLabel})]})]})})]})}},5300:(e,t,a)=>{a.d(t,{G:()=>c});var s=a(7814);let c=(0,s.createServerReference)("0020ba3cad47f2e7c8173f78aff33a686a334486c7",s.callServer,void 0,s.findSourceMapURL,"telegramStatus")},5415:(e,t,a)=>{a.d(t,{b:()=>c});var s=a(7814);let c=(0,s.createServerReference)("004d9216cd0b492704be3f3914da6586dd305de8d5",s.callServer,void 0,s.findSourceMapURL,"getDmPreviews")},5651:(e,t,a)=>{a.d(t,{H:()=>c});var s=a(7814);let c=(0,s.createServerReference)("40daf6dca3077229fd6d6cbccfd335893f03280125",s.callServer,void 0,s.findSourceMapURL,"clearConversation")},6196:(e,t,a)=>{a.d(t,{_:()=>c});var s=a(7814);let c=(0,s.createServerReference)("702777ba042d40b1d5705ed063aec09cc357fcdd61",s.callServer,void 0,s.findSourceMapURL,"sendMessage")},7832:(e,t,a)=>{a.d(t,{n:()=>c});var s=a(7814);let c=(0,s.createServerReference)("6029b8dd07385c22b79cec8930cd425924cfa64f1c",s.callServer,void 0,s.findSourceMapURL,"agentRespond")},7868:(e,t,a)=>{a.d(t,{K:()=>c});var s=a(7814);let c=(0,s.createServerReference)("00d896599aa05f6b9b14826b3e2ffa5b7a98370f22",s.callServer,void 0,s.findSourceMapURL,"disconnectTelegram")}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4398],{370:(e,n,a)=>{a.d(n,{d:()=>r});var s=a(7814);let r=(0,s.createServerReference)("4088847163a13dc2e80c3095763da6ac497a5b9e37",s.callServer,void 0,s.findSourceMapURL,"rejectIssue")},2626:(e,n,a)=>{a.d(n,{B:()=>r});var s=a(7814);let r=(0,s.createServerReference)("4019def9d61c1f2ae2b3ef51af11efa0f5c439d65d",s.callServer,void 0,s.findSourceMapURL,"approveSpec")},2978:(e,n,a)=>{a.d(n,{AgentRunLive:()=>o});var s=a(5076),r=a(8488),t=a(9860),l=a(8576),i=a(4327),c=a(5629);let d=["read","create","edit","run","search","thinking","done","error"];function o({channel:e,resume:n=!1,sinceSeq:a=0,onFinish:p}){let u=(0,c.k)(),h=(0,t.useRouter)(),[g,v]=(0,r.useState)(n),[m,f]=(0,r.useState)([]),[x,j]=(0,r.useState)(0),b=(0,r.useRef)(n?a:0),k=(0,r.useRef)(!1),N=(0,r.useRef)(0);if((0,r.useEffect)(()=>{n&&(b.current=a,k.current=!1,N.current=a>0?a:Date.now(),f([]),j(Math.max(0,Math.floor((Date.now()-N.current)/1e3))),v(!0))},[n,a]),(0,r.useEffect)(()=>{function n(n){let a=n.detail;a?.channel===e&&(b.current=Date.now()-1,k.current=!1,N.current=Date.now(),f([]),j(0),v(!0))}return window.addEventListener("constella:agent-run",n),()=>window.removeEventListener("constella:agent-run",n)},[e]),(0,r.useEffect)(()=>{if(!g)return;N.current||(N.current=Date.now());let e=setInterval(()=>j(Math.floor((Date.now()-N.current)/1e3)),1e3);return()=>clearInterval(e)},[g]),(0,r.useEffect)(()=>{if(!g)return;let n=!0,a=Date.now();async function s(){let s=await (0,i.k)(e,b.current);n&&(s.length&&(b.current=Math.max(b.current,...s.map(e=>e.seq)),f(e=>{let n=new Set(e.map(e=>e.id));return[...e,...s.filter(e=>!n.has(e.id))]}),s.some(e=>"done"===e.kind||"error"===e.kind)&&(k.current||(k.current=!0,h.refresh(),p?.()),setTimeout(()=>{n&&v(!1)},2500))),Date.now()-a>96e4&&v(!1))}s();let r=setInterval(s,700);return()=>{n=!1,clearInterval(r)}},[g,e,h,p]),!g&&0===m.length)return null;let y=function(e){let n=[];for(let a of e)if("text"===a.kind){let e=(a.detail||"").replace(/\s+/g," ").trim();if(!e)continue;let s=n[n.length-1];s&&"text"===s.kind?s.content=(s.content+" "+e).slice(-600):n.push({id:a.id,kind:"text",content:e})}else if("thinking"===a.kind){let e=(a.detail||a.target||"").replace(/\s+/g," ").trim();e&&n.push({id:a.id,kind:"thinking",content:e})}else n.push({id:a.id,kind:a.kind,content:function(e){if(!e)return"";let n=e.split(/[\\/]/);return n.length>1?n.slice(-2).join("/"):e}(a.target)||a.detail||""});return n}(m),S=y.slice(-5),w=y.length-S.length,I=m.some(e=>"done"===e.kind||"error"===e.kind),R=m.some(e=>"error"===e.kind),z=String(Math.floor(x/60)).padStart(2,"0"),C=String(x%60).padStart(2,"0");return(0,s.jsxs)("div",{className:"card live-stream",style:{marginBottom:16,borderColor:R?"var(--sx-keyword)":"var(--accent)"},children:[(0,s.jsxs)("div",{className:"set-desc",style:{marginBottom:8,display:"flex",alignItems:"center",gap:7},children:[g&&!I?(0,s.jsx)("span",{className:"dotpulse"}):(0,s.jsx)(l.I,{name:R?"close":"check",size:13,style:{color:R?"var(--sx-keyword)":"var(--sx-string)"}}),g&&!I?u("agent.run.working"):R?u("agent.run.failed"):u("agent.run.finished"),y.length>0&&(0,s.jsxs)("span",{style:{color:"var(--text-faint)"},children:["\xb7 ",u(1===y.length?"agent.run.steps.one":"agent.run.steps.other",{n:y.length})]}),(0,s.jsxs)("span",{className:"live-elapsed",style:{marginLeft:"auto"},children:[z,":",C]})]}),0===S.length?(0,s.jsxs)("div",{className:"muted",style:{fontSize:12,display:"flex",alignItems:"center",gap:7},children:[(0,s.jsx)("span",{className:"sync-spin",children:(0,s.jsx)(l.I,{name:"refresh",size:12})})," ",u("agent.run.reading")]}):(0,s.jsxs)(s.Fragment,{children:[w>0&&(0,s.jsx)("div",{className:"live-more",children:u(1===w?"agent.run.earlier.one":"agent.run.earlier.other",{n:w})}),(0,s.jsx)("div",{className:"live-stream-lines",children:S.map(e=>(0,s.jsxs)("div",{className:"live-line "+e.kind,children:["text"!==e.kind&&(0,s.jsx)("span",{className:"ll-k",children:d.includes(e.kind)?u(`agent.verb.${e.kind}`):e.kind}),(0,s.jsxs)("span",{className:"ll-c",children:[e.content,!I&&e===S[S.length-1]&&"text"===e.kind&&(0,s.jsx)("span",{className:"ll-caret"})]})]},e.id))})]})]})}},4327:(e,n,a)=>{a.d(n,{k:()=>r});var s=a(7814);let r=(0,s.createServerReference)("60274f514b61483b6e070a65f4817ee1ad9fe43504",s.callServer,void 0,s.findSourceMapURL,"getEvents")},4398:(e,n,a)=>{a.d(n,{IssueApprove:()=>y,PlanGate:()=>k,PlanGateLive:()=>b,Run247Button:()=>S,p:()=>N});var s=a(5076),r=a(8488),t=a(9860),l=a(8576),i=a(5629),c=a(2978),d=a(7814);let o=(0,d.createServerReference)("40e3b911773e190273915e8ecd96b865a3e34df027",d.callServer,void 0,d.findSourceMapURL,"generatePlan"),p=(0,d.createServerReference)("009534a6350f6d7ee36028fb9ab4659b11f05bd937",d.callServer,void 0,d.findSourceMapURL,"requestPlanChanges");var u=a(9739),h=a(2626),g=a(8538),v=a(8517),m=a(370);let f=(0,d.createServerReference)("40ea0236fb2729d70fa5f0bf6383e5f20dfa0c930e",d.callServer,void 0,d.findSourceMapURL,"setAuto247"),x=(0,d.createServerReference)("00194592ad47500e882eca534f2a4293d58ced6167",d.callServer,void 0,d.findSourceMapURL,"skipDesignGate");function j(e,n){window.dispatchEvent(new CustomEvent("constella:open-dm",{detail:{handle:e,text:n}}))}function b({planning:e,planSince:n,designRecommended:a=!1,designPending:d=!1}){let p=(0,i.k)(),[u,h]=(0,r.useTransition)(),g=(0,t.useRouter)(),[v,m]=(0,r.useState)(!1),[f,j]=(0,r.useState)(""),k=e||v;function N(){j(""),m(!0),window.dispatchEvent(new CustomEvent("constella:agent-run",{detail:{channel:"planner"}})),h(async()=>{try{let e=await o();(!e?.ok||!1===e.started)&&(m(!1),e?.error&&j(e.error)),g.refresh()}catch{m(!1),j(p("planner.gate.staleTab"))}})}return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(c.AgentRunLive,{channel:"planner",resume:e,sinceSeq:e?n-1:0,onFinish:()=>m(!1)}),k?(0,s.jsxs)("div",{className:"plan-gate",children:[(0,s.jsx)("div",{className:"plan-gate-bar","aria-hidden":!0}),(0,s.jsx)("div",{className:"pg-ic",children:(0,s.jsx)(l.I,{name:"bot",size:20})}),(0,s.jsxs)("div",{className:"pg-main",children:[(0,s.jsx)("div",{className:"pg-t",children:p("planner.gate.drafting.t")}),(0,s.jsx)("div",{className:"pg-d",children:p("planner.gate.drafting.d")})]})]}):a||d?(0,s.jsxs)("div",{className:"plan-gate",style:{borderColor:"rgba(99,102,241,.45)"},children:[(0,s.jsx)("div",{className:"plan-gate-bar","aria-hidden":!0,style:{background:"#6366f1"}}),(0,s.jsx)("div",{className:"pg-ic",style:{background:"rgba(99,102,241,.16)",color:"#6366f1"},children:(0,s.jsx)(l.I,{name:"skill",size:20})}),(0,s.jsxs)("div",{className:"pg-main",children:[(0,s.jsx)("div",{className:"pg-t",children:d?"Design step pending":"Recommended: prototype the design first"}),(0,s.jsx)("div",{className:"pg-d",children:d?"Ada is holding the plan on the design step. Open the Design module, build & approve the prototype with Grace, then Send to execution — Ada turns the approved design into specs & issues (zero drift).":"This is a frontend product. Prototype & approve the UI in the Design module before generating the plan — Grace turns the brief into a real visual reference, so the specs are precise and you avoid rework."}),f&&(0,s.jsx)("div",{className:"pg-d",style:{color:"var(--sx-keyword)",marginTop:6},children:f})]}),(0,s.jsxs)("div",{className:"pg-actions",children:[(0,s.jsxs)("button",{className:"btn-accent",onClick:()=>g.push("/design"),children:[(0,s.jsx)(l.I,{name:"skill",size:14})," Open Design"]}),(0,s.jsxs)("button",{className:"btn-ghost",disabled:u,onClick:function(){h(async()=>{try{await x()}catch{}}),N()},style:{fontSize:12},children:[(0,s.jsx)(l.I,{name:u?"refresh":"bot",size:13,className:u?"sync-spin":""})," ",u?p("planner.gate.analyzing"):"Skip design & plan anyway"]})]})]}):(0,s.jsxs)("div",{className:"plan-gate",children:[(0,s.jsx)("div",{className:"plan-gate-bar","aria-hidden":!0}),(0,s.jsx)("div",{className:"pg-ic",children:(0,s.jsx)(l.I,{name:"bot",size:20})}),(0,s.jsxs)("div",{className:"pg-main",children:[(0,s.jsx)("div",{className:"pg-t",children:p("planner.gate.noPlan.t")}),(0,s.jsx)("div",{className:"pg-d",children:p("planner.gate.noPlan.d")}),f&&(0,s.jsx)("div",{className:"pg-d",style:{color:"var(--sx-keyword)",marginTop:6},children:f})]}),(0,s.jsxs)("div",{className:"pg-actions",children:[(0,s.jsxs)("div",{className:"plan-hint",children:[(0,s.jsx)("div",{className:"plan-hint-t",children:p("planner.gate.hint.t")}),(0,s.jsx)("div",{className:"plan-hint-d",children:p("planner.gate.hint.d")})]}),(0,s.jsxs)("button",{className:"btn-accent",disabled:u,onClick:N,children:[(0,s.jsx)(l.I,{name:u?"refresh":"bot",size:14,className:u?"sync-spin":""})," ",u?p("planner.gate.analyzing"):p("planner.gate.generate")]})]})]})]})}function k({specs:e,total:n}){let a=(0,i.k)(),[t,c]=(0,r.useTransition)();return(0,s.jsxs)("div",{className:"plan-gate",children:[(0,s.jsx)("div",{className:"pg-ic",children:(0,s.jsx)(l.I,{name:"bot",size:20})}),(0,s.jsxs)("div",{className:"pg-main",children:[(0,s.jsx)("div",{className:"pg-t",children:a("planner.gate.ready.t")}),(0,s.jsx)("div",{className:"pg-d",children:a("planner.gate.ready.d",{specs:e,total:n})})]}),(0,s.jsxs)("div",{className:"pg-actions",children:[(0,s.jsxs)("button",{className:"btn-ghost",disabled:t,onClick:()=>c(async()=>{await p(),j("ada",a("planner.gate.rejectPlanDm"))}),children:[(0,s.jsx)(l.I,{name:"refresh",size:13})," ",a("planner.gate.requestChanges")]}),(0,s.jsxs)("button",{className:"btn-accent",disabled:t,onClick:()=>c(()=>(0,u.P)()),children:[(0,s.jsx)(l.I,{name:"check",size:14})," ",a("planner.gate.approvePlan")]})]})]})}function N({specId:e,specKey:n,approved:a}){let t=(0,i.k)(),[c,d]=(0,r.useTransition)();return a?(0,s.jsxs)("span",{className:"pill",style:{background:"var(--sx-string)22",color:"var(--sx-string)"},children:[(0,s.jsx)(l.I,{name:"check",size:11})," ",t("planner.approved")]}):(0,s.jsxs)("span",{style:{display:"inline-flex",gap:6},children:[(0,s.jsxs)("button",{className:"sc2-btn",disabled:c,onClick:()=>d(()=>(0,h.B)(e)),children:[(0,s.jsx)(l.I,{name:"check",size:11})," ",t("planner.approve")]}),(0,s.jsxs)("button",{className:"sc2-btn danger",disabled:c,onClick:()=>d(async()=>{j((await (0,g.J)(e)).handle,t("planner.rejectItemDm",{key:n}))}),children:[(0,s.jsx)(l.I,{name:"refresh",size:11})," ",t("planner.reject")]})]})}function y({issueId:e,issueKey:n,approved:a}){let t=(0,i.k)(),[c,d]=(0,r.useTransition)();return a?(0,s.jsxs)("span",{className:"pill",style:{background:"var(--sx-string)22",color:"var(--sx-string)"},children:[(0,s.jsx)(l.I,{name:"check",size:11})," ",t("planner.approved")]}):(0,s.jsxs)("span",{style:{display:"inline-flex",gap:6},children:[(0,s.jsxs)("button",{className:"sc2-btn",disabled:c,onClick:()=>d(()=>(0,v.t)(e)),children:[(0,s.jsx)(l.I,{name:"check",size:11})," ",t("planner.approve")]}),(0,s.jsxs)("button",{className:"sc2-btn danger",disabled:c,onClick:()=>d(async()=>{j((await (0,m.d)(e)).handle,t("planner.rejectItemDm",{key:n}))}),children:[(0,s.jsx)(l.I,{name:"refresh",size:11})," ",t("planner.reject")]})]})}function S({auto:e,approved:n,state:a}){let t=(0,i.k)(),[c,d]=(0,r.useTransition)(),o=t(c?e?"planner.run247.pausing":"planner.run247.starting":"waiting-approval"===a?"planner.run247.approveToRun":"all-done"===a?"planner.run247.allDone":e?"planner.run247.pause":"planner.run247.run"),p="blocked"===a?t("planner.run247.blockedTip"):void 0,u="off"===a&&!c;return(0,s.jsxs)("button",{className:"btn-"+(e?"ghost":"accent")+(u?" run-attn":""),disabled:!n||"all-done"===a||c,title:p,onClick:()=>d(()=>f(!e)),children:[(0,s.jsx)(l.I,{name:c?"refresh":"waiting-approval"===a?"bot":"all-done"===a?"check":e?"close":"play",size:14,className:c?"sync-spin":""})," ",o,("running"===a||u)&&(0,s.jsx)("span",{className:"dotpulse",style:{marginLeft:6}})]})}},8517:(e,n,a)=>{a.d(n,{t:()=>r});var s=a(7814);let r=(0,s.createServerReference)("40aed83757bf4e7d35906a784d6f38596d11a37abf",s.callServer,void 0,s.findSourceMapURL,"approveIssue")},8538:(e,n,a)=>{a.d(n,{J:()=>r});var s=a(7814);let r=(0,s.createServerReference)("4096c37c3555263308f9a36206eaf746d0defe25ad",s.callServer,void 0,s.findSourceMapURL,"rejectSpec")},9739:(e,n,a)=>{a.d(n,{P:()=>r});var s=a(7814);let r=(0,s.createServerReference)("00417fb0c5992b5d8c9bf7bfdb20091c0b75f967d3",s.callServer,void 0,s.findSourceMapURL,"approvePlan")}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4428],{1344:(e,t,r)=>{r.d(t,{LangSwitch:()=>n});var s=r(5076),h=r(8488),c=r(9860),x=r(7814);let a=(0,x.createServerReference)("40664d1b326c4e702d0a3077bb46439f2b2600cd50",x.callServer,void 0,x.findSourceMapURL,"setLang");function n(){let e=(0,c.useRouter)(),[t,r]=(0,h.useState)("en"),[x,n]=(0,h.useTransition)();return(0,h.useEffect)(()=>{r(/(?:^|;\s*)cn-lang=pt/.test(document.cookie)?"pt":"en")},[]),(0,s.jsx)("div",{style:{display:"inline-flex",border:"1px solid var(--border)",borderRadius:7,overflow:"hidden"},children:["en","pt"].map(h=>(0,s.jsx)("button",{type:"button",disabled:x,onClick:()=>{h===t||x||n(async()=>{await a(h),r(h),e.refresh()})},title:"en"===h?"English":"Portugu\xeas (BR)",style:{padding:"3px 8px",fontSize:11,fontWeight:600,cursor:"pointer",border:"none",background:t===h?"var(--accent)":"transparent",color:t===h?"var(--accent-fg)":"var(--text-dim)"},children:h.toUpperCase()},h))})}},5629:(e,t,r)=>{r.d(t,{LangProvider:()=>a,k:()=>n});var s=r(5076),h=r(8488),c=r(3219);let x=(0,h.createContext)("en");function a({lang:e,children:t}){return(0,s.jsx)(x.Provider,{value:e,children:t})}function n(){let e=(0,h.useContext)(x);return(t,r)=>(0,c.t)(e,t,r)}},8576:(e,t,r)=>{r.d(t,{I:()=>c});var s=r(5076);let h={files:(0,s.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,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("circle",{cx:"7",cy:"7",r:"4.2"}),(0,s.jsx)("path",{d:"M10.2 10.2 14 14"})]}),git:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("circle",{cx:"4",cy:"4",r:"1.8"}),(0,s.jsx)("circle",{cx:"4",cy:"12",r:"1.8"}),(0,s.jsx)("circle",{cx:"12",cy:"9.5",r:"1.8"}),(0,s.jsx)("path",{d:"M4 5.8v4.4M5.8 4H9a2 2 0 0 1 2 2v1.6"})]}),debug:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("circle",{cx:"8",cy:"8.5",r:"3.5"}),(0,s.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,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("rect",{x:"2.5",y:"2.5",width:"4.5",height:"4.5",rx:"1"}),(0,s.jsx)("rect",{x:"9",y:"2.5",width:"4.5",height:"4.5",rx:"1"}),(0,s.jsx)("rect",{x:"2.5",y:"9",width:"4.5",height:"4.5",rx:"1"}),(0,s.jsx)("path",{d:"M9 11.2h4.5M11.2 9v4.5"})]}),settings:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("circle",{cx:"8",cy:"8",r:"2.2"}),(0,s.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,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("circle",{cx:"8",cy:"5.5",r:"2.8"}),(0,s.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,s.jsx)("path",{d:"M6 4l4 4-4 4"}),chevronDown:(0,s.jsx)("path",{d:"M4 6l4 4 4-4"}),chevronUp:(0,s.jsx)("path",{d:"M4 10l4-4 4 4"}),close:(0,s.jsx)("path",{d:"M4 4l8 8M12 4l-8 8"}),add:(0,s.jsx)("path",{d:"M8 3v10M3 8h10"}),newFile:(0,s.jsxs)(s.Fragment,{children:[(0,s.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,s.jsx)("path",{d:"M9 2v4h4M8 8v4M6 10h4"})]}),newFolder:(0,s.jsxs)(s.Fragment,{children:[(0,s.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,s.jsx)("path",{d:"M8 8v3M6.5 9.5h3"})]}),refresh:(0,s.jsx)("path",{d:"M13 8a5 5 0 1 1-1.5-3.5M13 2.5V5h-2.5"}),collapse:(0,s.jsx)("path",{d:"M3 5h6M3 8h6M3 11h6M12 6l-1.5 1.5L12 9"}),more:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("circle",{cx:"3.5",cy:"8",r:"1"}),(0,s.jsx)("circle",{cx:"8",cy:"8",r:"1"}),(0,s.jsx)("circle",{cx:"12.5",cy:"8",r:"1"})]}),split:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("rect",{x:"2",y:"3",width:"12",height:"10",rx:"1"}),(0,s.jsx)("path",{d:"M8 3v10"})]}),terminal:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("rect",{x:"2",y:"3",width:"12",height:"10",rx:"1.5"}),(0,s.jsx)("path",{d:"M4.5 6.5 6.5 8l-2 1.5M8 10h3.5"})]}),panelBottom:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("rect",{x:"2",y:"3",width:"12",height:"10",rx:"1.5"}),(0,s.jsx)("path",{d:"M2 10h12"})]}),sidebarIcon:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("rect",{x:"2",y:"3",width:"12",height:"10",rx:"1.5"}),(0,s.jsx)("path",{d:"M6 3v10"})]}),bell:(0,s.jsxs)(s.Fragment,{children:[(0,s.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,s.jsx)("path",{d:"M6.7 12a1.4 1.4 0 0 0 2.6 0"})]}),check:(0,s.jsx)("path",{d:"M3 8.5 6.5 12 13 4"}),error:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("circle",{cx:"8",cy:"8",r:"6"}),(0,s.jsx)("path",{d:"M8 5v4M8 11h.01"})]}),warn:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("path",{d:"M8 2.5 14.5 13.5h-13z"}),(0,s.jsx)("path",{d:"M8 7v3M8 12h.01"})]}),branch:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("circle",{cx:"4",cy:"4",r:"1.6"}),(0,s.jsx)("circle",{cx:"4",cy:"12",r:"1.6"}),(0,s.jsx)("circle",{cx:"12",cy:"9",r:"1.6"}),(0,s.jsx)("path",{d:"M4 5.6v4.8M5.6 4H9a1.8 1.8 0 0 1 1.8 1.8v1.6"})]}),sync:(0,s.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,s.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,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("path",{d:"M3 8h8M7.5 4.5 11 8l-3.5 3.5"}),(0,s.jsx)("path",{d:"M13 3v10"})]}),sun:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("circle",{cx:"8",cy:"8",r:"3"}),(0,s.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,s.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,s.jsx)("path",{d:"M5 3.5v9l7-4.5z"}),trash:(0,s.jsx)("path",{d:"M3.5 4.5h9M6 4.5V3h4v1.5M5 4.5l.5 8.5h5l.5-8.5"}),dot:(0,s.jsx)("circle",{cx:"8",cy:"8",r:"3"}),fileTs:(0,s.jsxs)(s.Fragment,{children:[(0,s.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,s.jsx)("path",{d:"M9 2v4h4"})]}),arrowUp:(0,s.jsx)("path",{d:"M8 13V3M4 7l4-4 4 4"}),arrowDown:(0,s.jsx)("path",{d:"M8 3v10M4 9l4 4 4-4"}),agents:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("circle",{cx:"5.5",cy:"6",r:"2.2"}),(0,s.jsx)("circle",{cx:"11",cy:"6.5",r:"1.8"}),(0,s.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,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("rect",{x:"3",y:"5.5",width:"10",height:"7",rx:"2"}),(0,s.jsx)("path",{d:"M8 3v2.5M5.8 9h.01M10.2 9h.01M6 12h4"}),(0,s.jsx)("circle",{cx:"8",cy:"3",r:"1"})]}),send:(0,s.jsx)("path",{d:"M14 2 7 9M14 2l-4.5 12-2.5-5L2 6.5z"}),at:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("circle",{cx:"8",cy:"8",r:"3"}),(0,s.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,s.jsx)("path",{d:"M10 4 6 8l4 4"}),dockRight:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("rect",{x:"2",y:"3",width:"12",height:"10",rx:"1.5"}),(0,s.jsx)("path",{d:"M10 3v10"}),(0,s.jsx)("rect",{x:"10.5",y:"3.5",width:"3",height:"9",rx:"1",fill:"currentColor",stroke:"none",opacity:"0.25"})]}),dockLeft:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("rect",{x:"2",y:"3",width:"12",height:"10",rx:"1.5"}),(0,s.jsx)("path",{d:"M6 3v10"}),(0,s.jsx)("rect",{x:"2.5",y:"3.5",width:"3",height:"9",rx:"1",fill:"currentColor",stroke:"none",opacity:"0.25"})]}),chat:(0,s.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,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("rect",{x:"2.5",y:"2.5",width:"4.5",height:"4.5",rx:"1"}),(0,s.jsx)("rect",{x:"9",y:"2.5",width:"4.5",height:"4.5",rx:"1"}),(0,s.jsx)("rect",{x:"2.5",y:"9",width:"4.5",height:"4.5",rx:"1"}),(0,s.jsx)("rect",{x:"9",y:"9",width:"4.5",height:"4.5",rx:"1"})]}),inbox:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("path",{d:"M2 9h3l1 2h4l1-2h3"}),(0,s.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,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("rect",{x:"2.5",y:"3.5",width:"11",height:"10",rx:"1.5"}),(0,s.jsx)("path",{d:"M2.5 6.5h11M5.5 2v3M10.5 2v3"})]}),repeat:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("path",{d:"M3 6a4 4 0 0 1 7-2.5L12 5M13 10a4 4 0 0 1-7 2.5L4 11"}),(0,s.jsx)("path",{d:"M12 2v3H9M4 14v-3h3"})]}),doc:(0,s.jsxs)(s.Fragment,{children:[(0,s.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,s.jsx)("path",{d:"M9 2v3.5h3.5M6 8.5h4M6 11h4"})]}),skill:(0,s.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,s.jsx)("path",{d:"M2 8h3l1.5-4 2.5 8 1.5-4H14"}),coins:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("ellipse",{cx:"6",cy:"4.5",rx:"3.5",ry:"1.8"}),(0,s.jsx)("path",{d:"M2.5 4.5v3c0 1 1.6 1.8 3.5 1.8s3.5-.8 3.5-1.8v-3"}),(0,s.jsx)("ellipse",{cx:"10",cy:"9.5",rx:"3.5",ry:"1.8"}),(0,s.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,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("rect",{x:"4",y:"4",width:"8",height:"8",rx:"1.5"}),(0,s.jsx)("rect",{x:"6.3",y:"6.3",width:"3.4",height:"3.4",rx:".5"}),(0,s.jsx)("path",{d:"M6 2v2M10 2v2M6 12v2M10 12v2M2 6h2M2 10h2M12 6h2M12 10h2"})]}),shield:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("path",{d:"M8 2 3 4v4c0 3 2.2 5 5 6 2.8-1 5-3 5-6V4z"}),(0,s.jsx)("path",{d:"M5.8 8 7.3 9.5 10.4 6.3"})]}),target:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("circle",{cx:"8",cy:"8",r:"5.5"}),(0,s.jsx)("circle",{cx:"8",cy:"8",r:"2.4"})]}),selectParent:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("rect",{x:"2",y:"2.5",width:"12",height:"11",rx:"1.5"}),(0,s.jsx)("path",{d:"M8 11V6.5M5.5 9 8 6.5l2.5 2.5"})]})};function c({name:e,size:t=16,className:r="",strokeWidth:x=1.4,style:a}){let n=h[e];return n?(0,s.jsx)("svg",{width:t,height:t,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:x,strokeLinecap:"round",strokeLinejoin:"round",className:r,style:a,children:"play"===e||"dot"===e?(0,s.jsx)("g",{fill:"currentColor",stroke:"none",children:n}):n}):null}},8669:(e,t,r)=>{r.r(t),r.d(t,{AnimToggle:()=>l});var s=r(5076),h=r(8488),c=r(9860),x=r(8576),a=r(5629),n=r(7814);let i=(0,n.createServerReference)("0020ee1e4504363fce8f1b7fda9b92e0b5f0073be2",n.callServer,void 0,n.findSourceMapURL,"toggleAnim");function l({labeled:e}){let t=(0,a.k)(),r=(0,c.useRouter)(),[n,d]=(0,h.useState)(!0),[j,M]=(0,h.useTransition)();(0,h.useEffect)(()=>{d(!/(?:^|;\s*)cn-anim=off/.test(document.cookie))},[]);let o=()=>M(async()=>{await i(),d(e=>!e),r.refresh()});return e?(0,s.jsxs)("button",{className:"btn-ghost",onClick:o,disabled:j,type:"button",style:{gap:8},children:[(0,s.jsx)(x.I,{name:"pulse",size:14,style:{opacity:n?1:.4}})," ",t("chrome.anim.label",{state:t(n?"common.on":"common.off")})]}):(0,s.jsx)("button",{className:"top-btn",onClick:o,disabled:j,type:"button",title:t(n?"chrome.anim.titleOn":"chrome.anim.titleOff"),children:(0,s.jsx)(x.I,{name:"pulse",size:17,style:{opacity:n?1:.4}})})}}}]);
@@ -0,0 +1,4 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7457],{3368:(e,s,t)=>{t.d(s,{p:()=>n});var a=t(7814);let n=(0,a.createServerReference)("40632f18c6e8cc524a1b65fbb8e73c1786b9759f01",a.callServer,void 0,a.findSourceMapURL,"conversationContext")},4327:(e,s,t)=>{t.d(s,{k:()=>n});var a=t(7814);let n=(0,a.createServerReference)("60274f514b61483b6e070a65f4817ee1ad9fe43504",a.callServer,void 0,a.findSourceMapURL,"getEvents")},4552:(e,s,t)=>{t.d(s,{e:()=>n});var a=t(5076);function n({name:e,color:s,size:t=24,health:l,image:r}){let c=Math.max(6,Math.round(.3*t)),i=Math.round(.28*t),d=r?/^(data:|https?:|\/)/.test(r)?r:`/api/upload?path=${encodeURIComponent(r)}`:null;return(0,a.jsxs)("span",{style:{position:"relative",width:t,height:t,flex:`0 0 ${t}px`,display:"inline-block"},children:[d?(0,a.jsx)("img",{src:d,alt:e,width:t,height:t,style:{width:t,height:t,borderRadius:i,objectFit:"cover",display:"block"}}):(0,a.jsx)("span",{style:{width:t,height:t,borderRadius:i,background:s,color:"#fff",display:"grid",placeItems:"center",fontSize:Math.round(.42*t),fontWeight:700},children:(e[0]||"?").toUpperCase()}),l&&(0,a.jsx)("span",{style:{position:"absolute",right:-1,bottom:-1,width:c,height:c,borderRadius:"50%",background:"alive"===l?"var(--sx-string)":"stale"===l?"var(--sx-number)":"var(--text-faint)",border:"1.5px solid var(--bg-elevated)"}})]})}},7063:(e,s,t)=>{t.d(s,{L:()=>n});var a=t(7814);let n=(0,a.createServerReference)("40e5564668bafedda17fe12ac371e358864fd39c63",a.callServer,void 0,a.findSourceMapURL,"compactConversation")},7799:(e,s,t)=>{t.d(s,{V:()=>n});var a=t(7814);let n=(0,a.createServerReference)("408bdae443a0482c1bfbd42dc2b720e682b1423fab",a.callServer,void 0,a.findSourceMapURL,"getMessages")},8163:(e,s,t)=>{t.d(s,{m:()=>i});var a=t(5076),n=t(4552),l=t(8576),r=t(5629);let c=e=>(e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e))+" tks";function i({stat:e,onCompact:s,compacting:t}){let d=(0,r.k)(),o=2*Math.PI*15,m=Math.min(1,e.used/e.max)*o,h=Math.min(1,e.reserve/e.max)*o,u=e.usedPct>=85?"#e8688f":e.usedPct>=65?"#e0a44e":"#b3d97a",p=e.remainingPct<=35,x=e.used>0&&e.usedPct<1?"<1%":`${e.usedPct}%`;return(0,a.jsxs)("div",{className:"ctx-donut-wrap",children:[(0,a.jsxs)("div",{className:"ctx-donut",tabIndex:0,children:[(0,a.jsxs)("svg",{width:38,height:38,viewBox:"0 0 38 38",children:[(0,a.jsx)("circle",{cx:19,cy:19,r:15,fill:"none",stroke:"var(--border)",strokeWidth:4}),(0,a.jsx)("circle",{cx:19,cy:19,r:15,fill:"none",stroke:u,strokeWidth:4,strokeLinecap:"round",strokeDasharray:`${m} ${o}`,transform:"rotate(-90 19 19)"}),(0,a.jsx)("circle",{cx:19,cy:19,r:15,fill:"none",stroke:"var(--text-faint)",strokeWidth:4,strokeDasharray:`${h} ${o}`,strokeDashoffset:-m,transform:"rotate(-90 19 19)"}),(0,a.jsx)("text",{x:19,y:20,textAnchor:"middle",dominantBaseline:"middle",fontSize:10,fontWeight:700,fill:"var(--text)",children:x})]}),(0,a.jsxs)("div",{className:"ctx-pop",children:[(0,a.jsxs)("div",{className:"ctx-pop-title",children:[(0,a.jsx)(l.I,{name:"pulse",size:12})," ",d("chrome.ctx.title")]}),(0,a.jsxs)("div",{className:"ctx-rows",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{children:d("chrome.ctx.max")}),(0,a.jsx)("b",{children:c(e.max)})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{children:d("chrome.ctx.used")}),(0,a.jsxs)("b",{style:{color:u},children:[c(e.used)," \xb7 ",x]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{children:d("chrome.ctx.reserve")}),(0,a.jsxs)("b",{children:[c(e.reserve)," \xb7 ",e.reservePct,"%"]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{children:d("chrome.ctx.remaining")}),(0,a.jsxs)("b",{children:[c(e.remaining)," \xb7 ",e.remainingPct,"%"]})]})]}),e.perAgent.length>0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"ctx-pop-sub",children:d("chrome.ctx.byAgent")}),(0,a.jsx)("div",{className:"ctx-agents",children:e.perAgent.slice(0,8).map(e=>(0,a.jsxs)("div",{className:"ctx-agent",children:[(0,a.jsx)(n.e,{name:e.name,color:e.color,size:18}),(0,a.jsx)("span",{className:"ctx-agent-name",children:e.name}),(0,a.jsx)("span",{className:"ctx-agent-bar",children:(0,a.jsx)("span",{style:{width:`${e.pct}%`,background:e.color}})}),(0,a.jsxs)("span",{className:"ctx-agent-tok",children:[c(e.tokens)," \xb7 ",e.pct,"%",e.usd>0?` \xb7 $${e.usd.toFixed(2)}`:""]})]},e.handle))})]}),(0,a.jsx)("div",{className:"ctx-pop-note",children:d("chrome.ctx.explain")})]})]}),p&&(0,a.jsxs)("button",{className:"ctx-compact",onClick:s,disabled:t,title:d("chrome.ctx.compactHint"),children:[t?(0,a.jsx)("span",{className:"spin",children:(0,a.jsx)(l.I,{name:"refresh",size:12})}):(0,a.jsx)(l.I,{name:"collapse",size:12}),d(t?"chrome.ctx.compacting":"chrome.ctx.compact")]})]})}},8566:(e,s,t)=>{t.d(s,{V:()=>n});var a=t(7814);let n=(0,a.createServerReference)("001b3f03a4be8dae997cef3766f261a8abe4f1f85a",a.callServer,void 0,a.findSourceMapURL,"seedDefaultBlocksAction")},8894:(e,s,t)=>{t.d(s,{V4:()=>w,H8:()=>M,qs:()=>b});var a=t(5076),n=t(8488),l=t(9860),r=t(4302),c=t(5393),i=t(4552),d=t(8576),o=t(5629),m=t(7814);let h=(0,m.createServerReference)("40fb601e332b01b2db0128c9248448e91ee1e8823a",m.callServer,void 0,m.findSourceMapURL,"pullKbForComposer"),u=(0,m.createServerReference)("40bdecbf659bb86c86705318c2779dca409a75fc6a",m.callServer,void 0,m.findSourceMapURL,"sendMessageToKb"),p=(0,m.createServerReference)("40673eeabfff5b8aa941d94d53ce3478e168718e95",m.callServer,void 0,m.findSourceMapURL,"taskRef");var x=t(8566),g=t(9217);let j={read:"Read",create:"Create",edit:"Edit",run:"Run",search:"Search"},f=[{cmd:"/help",descKey:"help"},{cmd:"/kb",descKey:"kb",arg:"<question>"},{cmd:"/search",descKey:"search",arg:"<query>"},{cmd:"/graph",descKey:"graph",arg:"<key>"},{cmd:"/status",descKey:"status"},{cmd:"/agents",descKey:"agents"},{cmd:"/agent",descKey:"agent",arg:"<handle>"},{cmd:"/new-goal",descKey:"newGoal",arg:"<brief>"},{cmd:"/new-issue",descKey:"newIssue",arg:"<title>"},{cmd:"/new-spec",descKey:"newSpec",arg:"<title>"},{cmd:"/generate-plan",descKey:"generatePlan",arg:"<brief>"},{cmd:"/approve",descKey:"approve"},{cmd:"/reject",descKey:"reject",arg:"<reason>"},{cmd:"/run-247",descKey:"run247"},{cmd:"/pause",descKey:"pause"},{cmd:"/cancel",descKey:"cancel"},{cmd:"/archive",descKey:"archive"},{cmd:"/assign",descKey:"assign",arg:"<issue> <@agent>"},{cmd:"/review",descKey:"review"},{cmd:"/close-sprint",descKey:"closeSprint"},{cmd:"/test-dev",descKey:"testDev"},{cmd:"/github",descKey:"github"},{cmd:"/prepare-deploy",descKey:"prepareDeploy"},{cmd:"/export-source",descKey:"exportSource",arg:"<repo>"},{cmd:"/models",descKey:"models"},{cmd:"/skills",descKey:"skills"},{cmd:"/locks",descKey:"locks"},{cmd:"/telegram",descKey:"telegram"},{cmd:"/reindex",descKey:"reindex"},{cmd:"/curate",descKey:"curate"},{cmd:"/clear",descKey:"clear"}],v={idle:{c:"#6b7390",bg:"rgba(120,130,160,.16)"},working:{c:"#b3d97a",bg:"rgba(179,217,122,.15)"},review:{c:"#e0a44e",bg:"rgba(224,164,78,.16)"},blocked:{c:"#e8688f",bg:"rgba(232,104,143,.16)"}};function b({status:e}){let s=(0,o.k)(),t=v[e]??v.idle;return(0,a.jsx)("span",{className:"status-pill",style:{color:t.c,background:t.bg},children:e in v?s("chat.status."+e):e})}function k(e,s,t){let n=t?Object.fromEntries(t.map(e=>[e.key.toLowerCase(),e])):{},l=t&&t.length>0;return e.split(l?/(@[a-z0-9-]+|#[a-z0-9_-]+)/gi:/(@[a-z0-9-]+)/gi).map((e,t)=>{if(/^@[a-z0-9-]+$/i.test(e)&&s.has(e.slice(1).toLowerCase()))return(0,a.jsx)("span",{className:"mention",children:e},t);if(l&&/^#[a-z0-9_-]+$/i.test(e)){let s=n[e.slice(1).toLowerCase()];if(s){let n="goal"===s.kind?"/goals":"spec"===s.kind?"/planner":"/pm";return(0,a.jsx)("a",{className:"ref-chip",href:n,title:s.title,children:e},t)}}return(0,a.jsx)("span",{children:e},t)})}function N({step:e}){let s,t,n=(0,o.k)(),l=e.kind in j?n("chat.verb."+e.kind):e.kind,r="run"===e.kind,c="edit"===e.kind&&!!e.detail,i="create"===e.kind&&!!e.detail,d=c?e.detail.split("\n"):[],m=c?d.filter(e=>e.startsWith("+")).length:0,h=c?d.filter(e=>e.startsWith("-")).length:0,u=i?e.detail.slice(0,4e3).split("\n"):[];return(0,a.jsxs)("div",{className:"work-step",children:[(0,a.jsxs)("div",{className:"wstep-head",children:[(0,a.jsx)("span",{className:"wstep-verb "+e.kind,children:l}),(0,a.jsx)("span",{className:"wstep-file",children:e.target}),c&&(0,a.jsxs)("span",{className:"wstep-badge",children:[(0,a.jsxs)("span",{className:"plus",children:["+",m]})," ",(0,a.jsxs)("span",{className:"minus",children:["−",h]})]}),i&&(0,a.jsx)("span",{className:"wstep-badge",children:(0,a.jsxs)("span",{className:"plus",children:["+",u.length]})})]}),i&&(0,a.jsx)("div",{className:"wstep-code scroll",children:u.map((e,s)=>(0,a.jsxs)("div",{className:"wcode-line",children:[(0,a.jsx)("span",{className:"wcode-gutter",children:s+1}),(0,a.jsx)("span",{className:"wcode-text",children:e||"​"})]},s))}),c&&(0,a.jsx)("div",{className:"wstep-code scroll",children:d.map((e,s)=>{let t=e.startsWith("+")?"add":e.startsWith("-")?"del":"ctx";return(0,a.jsxs)("div",{className:"wdiff-line "+t,children:[(0,a.jsx)("span",{className:"wdiff-sign",children:"add"===t?"+":"del"===t?"−":" "}),(0,a.jsx)("span",{className:"wdiff-text",children:e.slice(1)||"​"})]},s)})}),r&&e.detail&&(t=(s=e.detail.split("\n")).slice(0,14),(0,a.jsxs)("div",{className:"wstep-term",children:[t.map((e,s)=>(0,a.jsx)("div",{className:/✓|passed|ok\b/i.test(e)?"ok":"",children:e||"​"},s)),s.length>t.length&&(0,a.jsxs)("div",{className:"wstep-more",children:["… +",s.length-t.length," lines"]})]}))]})}function y({steps:e,live:s}){let t=(0,o.k)(),l=e.filter(e=>["read","create","edit","run","search"].includes(e.kind)),r=l.filter(e=>"create"===e.kind||"edit"===e.kind).length,c=[...e].reverse().find(e=>"thinking"===e.kind),i=!s,[m,h]=(0,n.useState)(s);return 0!==l.length||c?(0,a.jsxs)("div",{className:"work-block"+(m?"":" collapsed"),children:[(0,a.jsxs)("button",{type:"button",className:"work-head",onClick:()=>h(e=>!e),children:[i?(0,a.jsx)("span",{className:"done-check",children:(0,a.jsx)(d.I,{name:"check",size:15})}):(0,a.jsx)("span",{className:"spin",children:(0,a.jsx)(d.I,{name:"refresh",size:14})}),(0,a.jsx)("span",{className:"wlabel",children:t(i?"chat.work.done":"chat.work.working")}),(0,a.jsx)("span",{className:"wmeta",children:i?t(1===l.length?"chat.work.actions.one":"chat.work.actions.other",{n:l.length}):t("chat.work.workingEllipsis")}),i&&r>0&&(0,a.jsxs)("span",{className:"wmeta wfiles",title:"files changed",children:["✎ ",r]}),(0,a.jsx)("span",{className:"work-toggle"+(m?" open":""),children:(0,a.jsx)(d.I,{name:"chevronRight",size:13})})]}),m&&(0,a.jsxs)(a.Fragment,{children:[c?.detail&&(0,a.jsxs)("div",{className:"work-thinking",children:[(0,a.jsx)("span",{className:"ti",children:(0,a.jsx)(d.I,{name:"bot",size:13})}),(0,a.jsx)("span",{children:c.detail})]}),(0,a.jsx)("div",{className:"work-steps",children:l.map(e=>(0,a.jsx)(N,{step:e},e.id))})]})]}):null}function w({onSend:e,placeholder:s,agents:t,defaultText:l="",requireMention:r=!1,enableAttachments:c=!0,refs:m}){let[u,p]=(0,n.useState)(l),x=(0,o.k)(),g=!r||u.trim().startsWith("/")||(u.match(/@([a-z0-9-]+)/gi)||[]).some(e=>t.some(s=>s.handle.toLowerCase()===e.slice(1).toLowerCase())),[j,v]=(0,n.useState)(!1),[b,k]=(0,n.useState)(null),[N,y]=(0,n.useState)(null),[S,z]=(0,n.useState)(null),[D,I]=(0,n.useState)([]),[K,R]=(0,n.useState)(""),[C,M]=(0,n.useState)(!1),[A,L]=(0,n.useState)(!1),[E,$]=(0,n.useState)(""),[P,T]=(0,n.useState)(null),[F,W]=(0,n.useState)(""),[U,q]=(0,n.useTransition)(),H=(0,n.useRef)(null),B=(0,n.useRef)(null),_=(0,n.useRef)(null),V=void 0!==m;async function O(e){if(!e||!e.length)return;R("");let s=10-D.length,t=Array.from(e).slice(0,Math.max(0,s));if(!t.length)return void R(x("chat.composer.maxAttachments"));let a=new FormData;for(let e of t)a.append("files",e);M(!0);try{let e=await fetch("/api/upload",{method:"POST",body:a}),s=await e.json();if(!e.ok||!s.ok)return void R(s.error??x("chat.composer.uploadFailed"));I(e=>[...e,...s.attachments].slice(0,10))}catch{R(x("chat.composer.uploadFailed"))}finally{M(!1),B.current&&(B.current.value="")}}function G(e){e.style.height="auto",e.style.height=Math.min(e.scrollHeight,260)+"px"}function J(e){if(!b||!H.current)return;let s=u.slice(0,b.start),t=u.slice(H.current.selectionStart),a="@"+e.handle+" ";p(s+a+t),_.current=(s+a).length,k(null),requestAnimationFrame(()=>H.current?.focus())}function Q(e){if(!N||!H.current)return;let s=u.slice(0,N.start),t=u.slice(H.current.selectionStart),a="#"+e.key+" ";p(s+a+t),_.current=(s+a).length,y(null),requestAnimationFrame(()=>H.current?.focus())}function X(e){let s=e.cmd+(e.arg?" ":"");p(s),_.current=s.length,z(null),requestAnimationFrame(()=>H.current?.focus())}function Y(){let e=E.trim();if(!e){T(null),W(x("chat.kbPull.empty"));return}W(""),T(null),q(async()=>{let s=await h(e);s.ok&&s.text?T({text:s.text,sources:s.sources??[]}):W(x("chat.kbPull.noResult"))})}function Z(){let s=u.trim();!s&&0===D.length||g&&(e(s,D.length?D:void 0),p(""),I([]),R(""),H.current&&(H.current.style.height="auto"),k(null),z(null),y(null),L(!1))}return(0,n.useEffect)(()=>{null!=_.current&&H.current&&(H.current.setSelectionRange(_.current,_.current),_.current=null)}),(0,a.jsxs)("div",{className:"chat-composer",children:[b&&(0,a.jsxs)("div",{className:"mention-pop",children:[(0,a.jsxs)("div",{className:"mention-head",children:[(0,a.jsx)(d.I,{name:"at",size:12})," ",x("chat.composer.mentionAgent")]}),(0,a.jsxs)("div",{className:"mention-list scroll",children:[0===b.items.length&&(0,a.jsx)("div",{className:"mention-empty",children:x("chat.noAgentMatch",{q:b.query})}),b.items.map((e,s)=>(0,a.jsxs)("div",{className:"mention-item"+(s===b.index?" active":""),onMouseEnter:()=>k(e=>e&&{...e,index:s}),onMouseDown:s=>{s.preventDefault(),J(e)},children:[(0,a.jsx)(i.e,{name:e.name,color:e.color,image:e.image,size:24}),(0,a.jsx)("div",{className:"mi-text",children:(0,a.jsxs)("div",{className:"mi-name",children:[e.name," ",(0,a.jsxs)("span",{className:"mi-handle",children:["@",e.handle]})]})}),(0,a.jsx)("span",{className:"mi-role",children:e.role})]},e.handle))]})]}),N&&(0,a.jsxs)("div",{className:"mention-pop",children:[(0,a.jsxs)("div",{className:"mention-head",children:[(0,a.jsx)(d.I,{name:"branch",size:12})," ",x("chat.composer.referenceItem")]}),(0,a.jsxs)("div",{className:"mention-list scroll",children:[0===N.items.length&&(0,a.jsx)("div",{className:"mention-empty",children:x("chat.noRefMatch",{q:N.query})}),N.items.map((e,s)=>(0,a.jsxs)("div",{className:"mention-item"+(s===N.index?" active":""),onMouseEnter:()=>y(e=>e&&{...e,index:s}),onMouseDown:s=>{s.preventDefault(),Q(e)},children:[(0,a.jsx)("span",{className:"mi-ref-kind",children:x("chat.composer.refKind."+e.kind)}),(0,a.jsx)("div",{className:"mi-text",children:(0,a.jsxs)("div",{className:"mi-name",children:[(0,a.jsxs)("span",{className:"mi-handle",children:["#",e.key]})," ",e.title]})})]},e.id))]})]}),S&&(0,a.jsxs)("div",{className:"mention-pop",children:[(0,a.jsxs)("div",{className:"mention-head",children:[(0,a.jsx)(d.I,{name:"command",size:12})," ",x("chat.commands")]}),(0,a.jsx)("div",{className:"mention-list scroll",children:S.items.map((e,s)=>(0,a.jsxs)("div",{className:"mention-item"+(s===S.index?" active":""),onMouseEnter:()=>z(e=>e&&{...e,index:s}),onMouseDown:s=>{s.preventDefault(),X(e)},children:[(0,a.jsx)("div",{className:"mi-text",children:(0,a.jsxs)("div",{className:"mi-name",children:[e.cmd,e.arg&&(0,a.jsxs)("span",{className:"mi-handle",children:[" ",e.arg]})]})}),(0,a.jsx)("span",{className:"mi-role",children:x("chat.slash."+e.descKey)})]},e.cmd))})]}),A&&(0,a.jsxs)("div",{className:"mention-pop kb-pull-pop",children:[(0,a.jsxs)("div",{className:"mention-head",children:[(0,a.jsx)(d.I,{name:"branch",size:12})," ",x("chat.kbPull.title")]}),(0,a.jsxs)("div",{className:"kb-pull-body",children:[(0,a.jsxs)("div",{className:"kb-pull-row",children:[(0,a.jsx)("input",{className:"kb-pull-input",value:E,placeholder:x("chat.kbPull.placeholder"),onChange:e=>{$(e.target.value),W("")},onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),Y()),"Escape"===e.key&&(e.preventDefault(),L(!1))}}),(0,a.jsxs)("button",{type:"button",className:"att-btn",disabled:U,onMouseDown:e=>e.preventDefault(),onClick:Y,children:[U?(0,a.jsx)("span",{className:"spin",children:(0,a.jsx)(d.I,{name:"refresh",size:13})}):(0,a.jsx)(d.I,{name:"search",size:13}),x("chat.kbPull.search")]})]}),(0,a.jsx)("div",{className:"kb-pull-preview",children:U?(0,a.jsx)("div",{className:"kb-pull-muted",children:x("chat.kbPull.searching")}):P?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"kb-pull-text",children:P.text}),P.sources.length>0&&(0,a.jsx)("div",{className:"kb-pull-sources",children:P.sources.map(e=>(0,a.jsx)("span",{children:e},e))})]}):(0,a.jsx)("div",{className:F?"kb-pull-error":"kb-pull-muted",children:F||x("chat.kbPull.empty")})}),P&&(0,a.jsx)("div",{className:"kb-pull-actions",children:(0,a.jsxs)("button",{type:"button",className:"send-btn",onMouseDown:e=>e.preventDefault(),onClick:function(){if(!P)return;let e=P.sources.length?`
2
+ Sources: ${P.sources.join(", ")}`:"",s=`KB: ${P.text}${e}`;p(e=>e.trim()?`${e.trimEnd()}
3
+
4
+ ${s}`:s),L(!1),T(null),W(""),requestAnimationFrame(()=>{H.current&&(G(H.current),H.current.focus())})},children:[(0,a.jsx)(d.I,{name:"add",size:13})," ",x("chat.kbPull.insert")]})})]})]}),(0,a.jsxs)("div",{className:"composer-box"+(j?" focus":""),children:[D.length>0&&(0,a.jsx)("div",{className:"att-row",children:D.map((e,s)=>(0,a.jsxs)("span",{className:"att-chip",children:[(0,a.jsx)(d.I,{name:/^image\//.test(e.type)||"application/pdf"===e.type?"doc":"files",size:11}),(0,a.jsx)("span",{className:"att-name",children:e.name}),(0,a.jsx)("button",{className:"att-x",onClick:()=>I(e=>e.filter((e,t)=>t!==s)),children:(0,a.jsx)(d.I,{name:"close",size:10})})]},e.path))}),K&&(0,a.jsx)("div",{style:{fontSize:10.5,color:"#e8688f",padding:"2px 8px"},children:K}),(0,a.jsx)("textarea",{ref:H,className:"composer-input",value:u,rows:1,placeholder:s,onChange:e=>{p(e.target.value),function(e,s){let a=e.match(/^\/([a-z-]*)$/i);if(a){let e=a[1].toLowerCase(),s=f.filter(s=>s.cmd.slice(1).startsWith(e));k(null),y(null),z(s.length?{items:s,index:0}:null);return}z(null);let n=e.slice(0,s).match(/#([a-z0-9_-]*)$/i);if(n&&m&&m.length>0){let e=n[1].toLowerCase(),t=m.filter(s=>s.key.toLowerCase().includes(e)||s.title.toLowerCase().includes(e));k(null),y({query:e,start:s-n[0].length,items:t,index:0});return}y(null);let l=e.slice(0,s).match(/@([a-z0-9-]*)$/i);if(!l)return k(null);let r=l[1].toLowerCase(),c=t.filter(e=>e.handle.includes(r)||e.name.toLowerCase().includes(r)||e.role.toLowerCase().includes(r));k({query:r,start:s-l[0].length,items:c,index:0})}(e.target.value,e.target.selectionStart),G(e.target)},onKeyDown:function(e){if(S&&S.items.length){if("ArrowDown"===e.key){e.preventDefault(),z(e=>e&&{...e,index:(e.index+1)%e.items.length});return}if("ArrowUp"===e.key){e.preventDefault(),z(e=>e&&{...e,index:(e.index-1+e.items.length)%e.items.length});return}if("Enter"===e.key||"Tab"===e.key){e.preventDefault(),X(S.items[S.index]);return}if("Escape"===e.key){e.preventDefault(),z(null);return}}if(N&&N.items.length){if("ArrowDown"===e.key){e.preventDefault(),y(e=>e&&{...e,index:(e.index+1)%e.items.length});return}if("ArrowUp"===e.key){e.preventDefault(),y(e=>e&&{...e,index:(e.index-1+e.items.length)%e.items.length});return}if("Enter"===e.key||"Tab"===e.key){e.preventDefault(),Q(N.items[N.index]);return}if("Escape"===e.key){e.preventDefault(),y(null);return}}if(b&&b.items.length){if("ArrowDown"===e.key){e.preventDefault(),k(e=>e&&{...e,index:(e.index+1)%e.items.length});return}if("ArrowUp"===e.key){e.preventDefault(),k(e=>e&&{...e,index:(e.index-1+e.items.length)%e.items.length});return}if("Enter"===e.key||"Tab"===e.key){e.preventDefault(),J(b.items[b.index]);return}if("Escape"===e.key){e.preventDefault(),k(null);return}}if("Escape"===e.key&&A){e.preventDefault(),L(!1);return}"Enter"!==e.key||e.shiftKey||(e.preventDefault(),Z())},onFocus:()=>v(!0),onBlur:()=>v(!1)}),c&&(0,a.jsx)("input",{ref:B,type:"file",multiple:!0,hidden:!0,accept:".png,.jpg,.jpeg,.gif,.webp,.bmp,.pdf,.txt,.md,.csv,.json,.log,.zip,.doc,.docx,.xls,.xlsx,.ppt,.pptx",onChange:e=>O(e.target.files)}),(0,a.jsxs)("div",{className:"composer-foot",children:[(0,a.jsxs)("span",{className:"composer-actions",children:[c&&(0,a.jsxs)("button",{type:"button",className:"att-btn",title:x("chat.composer.attachTitle"),disabled:C||D.length>=10,onClick:()=>B.current?.click(),children:[C?(0,a.jsx)("span",{className:"spin",children:(0,a.jsx)(d.I,{name:"refresh",size:13})}):(0,a.jsx)(d.I,{name:"add",size:14})," ",D.length>0?`${D.length}/10`:x("chat.composer.attach")]}),V&&(0,a.jsxs)("button",{type:"button",className:"att-btn kb-pull-btn",title:x("chat.kbPull.open"),disabled:U,onMouseDown:e=>e.preventDefault(),onClick:function(){$(u.replace(/@[a-z0-9-]+/gi,"").trim().slice(0,180)),T(null),W(""),k(null),z(null),y(null),L(e=>!e)},children:[(0,a.jsx)(d.I,{name:"branch",size:13})," ",x("chat.kbPull.open")]})]}),r&&u.trim()&&!g?(0,a.jsxs)("span",{className:"composer-hint",style:{color:"#f0a35e"},children:[(0,a.jsx)(d.I,{name:"at",size:11})," ",x("chat.composer.mentionToSend")]}):(0,a.jsxs)("span",{className:"composer-hint",children:[(0,a.jsx)("kbd",{children:"↵"})," ",x("chat.composer.send")," \xb7 ",(0,a.jsx)("kbd",{children:"⇧↵"})," ",x("chat.composer.newline")]}),(0,a.jsxs)("button",{className:"send-btn",disabled:!u.trim()&&0===D.length||!g,onMouseDown:e=>e.preventDefault(),onClick:Z,children:[(0,a.jsx)(d.I,{name:"send",size:13})," ",x("home.cmd.run")]})]})]})]})}function S({atts:e}){return(0,a.jsx)("div",{className:"msg-atts",children:e.map(e=>{let s=`/api/upload?path=${encodeURIComponent(e.path)}`;return/^image\//.test(e.type)?(0,a.jsx)("a",{href:s,target:"_blank",rel:"noreferrer",className:"msg-att-img",title:e.name,children:(0,a.jsx)("img",{src:s,alt:e.name,loading:"lazy"})},e.path):(0,a.jsxs)("a",{href:s,target:"_blank",rel:"noreferrer",className:"msg-att-doc",title:e.name,children:[(0,a.jsx)(d.I,{name:"doc",size:13})," ",(0,a.jsx)("span",{className:"mad-name",children:e.name})]},e.path)})})}function z({id:e}){let s=(0,o.k)(),[t,l]=(0,n.useTransition)(),[r,c]=(0,n.useState)(!1);return(0,a.jsx)("button",{type:"button",className:"cmsg-kb",disabled:t||r,title:s(r?"chat.kbSave.saved":"chat.kbSave.send"),onClick:()=>l(async()=>{(await u(e)).ok&&c(!0)}),style:{background:"none",border:"none",cursor:r?"default":"pointer",padding:0,marginLeft:2,display:"inline-flex",alignItems:"center",color:r?"var(--accent)":"var(--text-faint)",opacity:t?.5:1},children:(0,a.jsx)(d.I,{name:r?"check":"branch",size:11,className:t?"sync-spin":""})})}function D({taskId:e}){let[s,t]=(0,n.useState)(null);return((0,n.useEffect)(()=>{let s=!0;return p(e).then(e=>{s&&t(e)}).catch(()=>{}),()=>{s=!1}},[e]),s)?(0,a.jsxs)("div",{style:{marginTop:5,fontSize:10.5,color:"var(--text-faint)",display:"flex",alignItems:"center",gap:5,flexWrap:"wrap"},children:[(0,a.jsx)(d.I,{name:"branch",size:10}),(0,a.jsx)("span",{style:{color:"var(--accent)",fontWeight:600},children:s.taskKey}),s.issueKey&&(0,a.jsxs)("span",{children:["\xb7 ",s.issueKey]}),s.goalTitle&&(0,a.jsxs)("span",{children:["\xb7 ",s.goalTitle.slice(0,40)]}),s.col&&(0,a.jsx)("span",{style:{padding:"0 5px",borderRadius:5,border:"1px solid var(--border)",textTransform:"capitalize"},children:s.col})]}):null}function I({blocks:e}){let s=(0,l.useRouter)(),t=(0,o.k)();return(0,a.jsxs)("div",{style:{marginTop:5,fontSize:10.5,color:"var(--text-faint)",display:"flex",alignItems:"center",gap:5,flexWrap:"wrap"},children:[(0,a.jsx)(d.I,{name:"doc",size:10}),(0,a.jsx)("span",{children:t("chat.touchedBlocks")}),e.map(e=>(0,a.jsx)("button",{type:"button",title:t("chat.touchedBlocks"),onClick:()=>s.push("/knowledge"),style:{color:"var(--accent)",fontWeight:600,background:"rgba(120,100,255,.10)",border:"1px solid rgba(120,100,255,.25)",borderRadius:4,padding:"0 5px",cursor:"pointer"},children:e},e))]})}function K({sources:e}){let[s,t]=(0,n.useState)(!1),l=(0,o.k)();return(0,a.jsxs)("div",{className:"msg-sources",children:[(0,a.jsxs)("button",{type:"button",className:"msg-sources-toggle",onClick:()=>t(e=>!e),children:[(0,a.jsx)(d.I,{name:"pulse",size:10})," ",l("chat.sources",{n:e.length})," ",(0,a.jsx)(d.I,{name:s?"chevronDown":"chevronRight",size:11})]}),s&&(0,a.jsx)("div",{className:"msg-sources-list",children:e.map((e,s)=>(0,a.jsx)("span",{children:e},s))})]})}function R({text:e,markdown:s,known:t,refs:l}){let i=(0,o.k)(),[d,m]=(0,n.useState)(!1),h=e.length>900;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"cmsg-bubble"+(h&&!d?" clamped":"")+(h&&d?" expanded":""),children:s?(0,a.jsx)("div",{className:"md cmsg-md",children:(0,a.jsx)(r.oz,{remarkPlugins:[c.A],children:e})}):k(e,t,l)}),h&&(0,a.jsx)("button",{type:"button",className:"cmsg-more",onClick:()=>m(e=>!e),children:i(d?"chat.showLess":"chat.showMore")})]})}function C({m:e}){let s=(0,o.k)(),t=(0,l.useRouter)(),[i,m]=(0,n.useTransition)(),[h,u]=(0,n.useState)(!1),[p,j]=(0,n.useState)(null);return(0,a.jsxs)("div",{className:"kb-card",children:[(0,a.jsxs)("div",{className:"kb-card-head",children:[(0,a.jsx)(d.I,{name:"branch",size:14})," ",s("kbcard.title")]}),(0,a.jsx)("div",{className:"kb-card-body cmsg-md",children:(0,a.jsx)(r.oz,{remarkPlugins:[c.A],children:e.text})}),p&&(0,a.jsxs)("div",{className:"kb-card-note",children:[(0,a.jsx)(d.I,{name:"check",size:12})," ",p]}),(0,a.jsxs)("div",{className:"kb-card-actions",children:[(0,a.jsx)("button",{className:"kbc-btn primary",disabled:i,onClick:()=>m(async()=>{j(s("kbcard.created",{n:(await (0,x.V)()).seeded})),t.refresh()}),children:s("home.createBlocks")}),(0,a.jsx)("button",{className:"kbc-btn",onClick:()=>t.push("/knowledge"),children:s("home.openKnowledge")}),(0,a.jsx)("button",{className:"kbc-btn",disabled:i,onClick:()=>m(async()=>{j(s("kb.reindexResult",{n:(await (0,g.f)()).chunks})),t.refresh()}),children:s("kb.reindex")})]}),e.sources&&e.sources.length>0&&(0,a.jsxs)("div",{className:"kb-card-sources",children:[(0,a.jsxs)("button",{type:"button",className:"msg-sources-toggle",onClick:()=>u(e=>!e),children:[(0,a.jsx)(d.I,{name:"pulse",size:10})," ",s("chat.sources",{n:e.sources.length})," ",(0,a.jsx)(d.I,{name:h?"chevronDown":"chevronRight",size:11})]}),h&&(0,a.jsx)("div",{className:"msg-sources-list",children:e.sources.map((e,s)=>(0,a.jsx)("span",{children:e},s))})]})]})}function M({msgs:e,typing:s,agents:t,byRun:l,liveRuns:r,loading:c,highlightId:d,operator:m,markdownAgent:h=!1,emptyHint:u,avatarSize:p=30,refs:x}){let g=(0,o.k)(),j=(0,n.useRef)(null),f=(0,n.useRef)(!0),v=Object.fromEntries(t.map(e=>[e.handle,e])),b=new Set(t.map(e=>e.handle));return(0,n.useEffect)(()=>{let e=j.current;e&&f.current&&(e.scrollTop=e.scrollHeight)},[e,s,l,r]),(0,n.useEffect)(()=>{d&&document.getElementById("m-"+d)?.scrollIntoView({block:"center",behavior:"smooth"})},[d,e]),(0,a.jsxs)("div",{className:"chat-stream scroll",ref:j,onScroll:()=>{let e=j.current;e&&(f.current=e.scrollHeight-e.scrollTop-e.clientHeight<120)},children:[[...e].sort((e,s)=>{let t=e.createdAt?new Date(e.createdAt).getTime():0,a=s.createdAt?new Date(s.createdAt).getTime():0;return t!==a?t-a:("operator"!==e.fromKind)-("operator"!==s.fromKind)}).map(e=>{let s="operator"===e.fromKind,t=e.fromHandle?v[e.fromHandle]:null,n=l[e.id],r=!s&&"kb-card"===e.kind;return(0,a.jsxs)("div",{className:"cmsg"+(s?" operator":"")+(d===e.id?" highlight":""),id:"m-"+e.id,children:[s?m?.image?(0,a.jsx)(i.e,{name:m.name||g("chat.you"),color:"#9a5cff",image:m.image,size:p}):(0,a.jsx)("div",{className:"avatar",style:{background:"linear-gradient(150deg,#e0a44e,#9a5cff)",color:"#1a1206",width:p,height:p,borderRadius:Math.round(.3*p),display:"grid",placeItems:"center",fontWeight:700,fontSize:Math.round(.4*p)},children:"OP"}):t?(0,a.jsx)(i.e,{name:t.name,color:t.color,image:t.image,size:p}):(0,a.jsx)(i.e,{name:"?",color:"#6b7390",size:p}),(0,a.jsxs)("div",{className:"cmsg-body",children:[(0,a.jsxs)("div",{className:"cmsg-head",children:[(0,a.jsx)("span",{className:"cmsg-name",children:s?g("chat.you"):t?.name??e.fromHandle}),!s&&t&&(0,a.jsx)("span",{className:"cmsg-role",children:t.role}),(0,a.jsx)("span",{className:"cmsg-when",children:function(e){if(!e)return"";let s="string"==typeof e?new Date(e):e,t=s.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}),a=s.toLocaleDateString([],{day:"2-digit",month:"short"});return`${a}, ${t}`}(e.createdAt)}),!s&&e.text&&(0,a.jsx)(z,{id:e.id})]}),n&&n.length>0&&(0,a.jsx)(y,{steps:n,live:!1}),r?(0,a.jsx)(C,{m:e}):e.text&&(0,a.jsx)(R,{text:e.text,markdown:h&&!s,known:b,refs:x}),e.attachments&&e.attachments.length>0&&(0,a.jsx)(S,{atts:e.attachments}),!s&&!r&&e.sources&&e.sources.length>0&&(0,a.jsx)(K,{sources:e.sources}),!s&&e.taskId&&(0,a.jsx)(D,{taskId:e.taskId}),!s&&e.blocks&&e.blocks.length>0&&(0,a.jsx)(I,{blocks:e.blocks})]})]},e.id)}),r.map(([e,s])=>{let n=s.find(e=>e.agentId)?.agentId,l=t.find(e=>e.id===n);if(!l)return null;let r=s.reduce((e,s)=>Math.max(e,s.seq||0),0),c=s.some(e=>"done"===e.kind)||r>0&&Date.now()-r>12e4,d=s.filter(e=>"text"===e.kind).map(e=>e.detail).join("");return(0,a.jsxs)("div",{className:"cmsg",children:[(0,a.jsx)(i.e,{name:l.name,color:l.color,image:l.image,size:p}),(0,a.jsxs)("div",{className:"cmsg-body",children:[(0,a.jsxs)("div",{className:"cmsg-head",children:[(0,a.jsx)("span",{className:"cmsg-name",children:l.name}),(0,a.jsx)("span",{className:"cmsg-role",children:l.role})]}),(0,a.jsx)(y,{steps:s,live:!c}),d&&(0,a.jsxs)("div",{className:"cmsg-bubble",children:[k(d,b,x),!c&&(0,a.jsx)("span",{className:"live-caret"})]})]})]},"live-"+e)}),s.filter(e=>{let s=v[e];return s&&!r.some(([,e])=>e.some(e=>e.agentId===s.id))}).map(e=>{let s=v[e];return s?(0,a.jsxs)("div",{className:"cmsg",children:[(0,a.jsx)(i.e,{name:s.name,color:s.color,image:s.image,size:p}),(0,a.jsxs)("div",{className:"cmsg-body",children:[(0,a.jsxs)("div",{className:"cmsg-head",children:[(0,a.jsx)("span",{className:"cmsg-name",children:s.name}),(0,a.jsx)("span",{className:"cmsg-role",children:s.role})]}),(0,a.jsxs)("div",{className:"typing-bubble",children:[(0,a.jsx)("span",{}),(0,a.jsx)("span",{}),(0,a.jsx)("span",{})]})]})]},"typing-"+e):null}),c&&0===e.length&&0===r.length&&(0,a.jsx)("div",{className:"chat-skel","aria-label":g("home.chat.loading"),children:[0,1,2].map(e=>(0,a.jsxs)("div",{className:"skel-row",style:{animationDelay:`${.12*e}s`},children:[(0,a.jsx)("div",{className:"skel-avatar"}),(0,a.jsxs)("div",{className:"skel-lines",children:[(0,a.jsx)("div",{className:"skel-line",style:{width:"38%"}}),(0,a.jsx)("div",{className:"skel-line",style:{width:1===e?"82%":"64%"}}),2!==e&&(0,a.jsx)("div",{className:"skel-line",style:{width:"48%"}})]})]},e))}),!c&&0===e.length&&0===s.length&&0===r.length&&(0,a.jsx)("div",{className:"mention-empty",style:{textAlign:"center",padding:22},children:u??g("chat.stream.emptyHint")})]})}},9217:(e,s,t)=>{t.d(s,{f:()=>n});var a=t(7814);let n=(0,a.createServerReference)("00a15e709e3207ab4c46e487231119285bf1ecb00d",a.callServer,void 0,a.findSourceMapURL,"reindexKbAction")}}]);
@@ -0,0 +1,12 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8370],{972:(e,t,i)=>{i.d(t,{E:()=>o,e:()=>n});let o=["Cockpit","Hierarchy","Execution","Product","Knowledge","Operations","Inbox","System"],n=[{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"}]},2393:(e,t,i)=>{i.d(t,{H4:()=>l,Uy:()=>s,st:()=>a});let o=/Failed to find Server Action|older or newer deployment|ChunkLoadError|Loading chunk [\w-]+ failed|error loading dynamically imported module/i,n=/invariant expected layout router to be mounted/i;function r(e){return e?e instanceof Error?`${e.name} ${e.message}`:"string"==typeof e?e:String(e?.message??e):""}function a(e){return o.test(r(e))}function l(e){let t=r(e);return o.test(t)||n.test(t)}function s(){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,i)=>{i.d(t,{UpdateHeaderBadge:()=>p});var o=i(5076),n=i(8488),r=i(9860),a=i(8576),l=i(5629),s=i(5259),d=i(4303),c=i(8837),u=i(2393);function p(){let e=(0,l.k)(),t=(0,r.useRouter)(),[i,p]=(0,n.useState)(null),[g,h]=(0,n.useState)(!1),[f,b]=(0,n.useState)("available"),[v,m]=(0,n.useState)(!1),[y,x]=(0,n.useState)(""),w=(0,n.useRef)(null);async function k(){if(!v){m(!0),x("");try{let t=await (0,s.l)(!0);p(t.info.updateAvailable&&t.info.latest?t.info.latest:null),h(t.busy),t.info.updateAvailable||x(e("chrome.update.upToDate"))}catch{}finally{m(!1)}}}async function S(){if("updating"!==f&&!g){if("done"===f)return void t.refresh();b("updating"),x("");try{let i=await (0,d.P)();if(i.blocked){b("available"),h(!0),x(e("chrome.update.busy"));return}i.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),b("error"),x(e("chrome.update.failed"))))},3e3):(b("available"),x(i.message||""),t.push("/update"))}catch{b("error"),x(e("chrome.update.failed"))}}}(0,n.useEffect)(()=>{let e=!1,t=async t=>{try{let i=await (0,s.l)(t);if(e)return;p(i.info.updateAvailable&&i.info.latest?i.info.latest:null),h(i.busy)}catch{}};t(!1);let i=setInterval(()=>t(!1),12e3),o=setInterval(()=>t(!0),18e4);return()=>{e=!0,clearInterval(i),clearInterval(o),w.current&&clearInterval(w.current)}},[]);let C=(0,o.jsx)("button",{type:"button",className:"top-btn",onClick:k,disabled:v,title:y||e("chrome.update.check"),children:(0,o.jsx)("span",{className:v?"sync-spin":"",style:{display:"inline-flex"},children:(0,o.jsx)(a.I,{name:"sync",size:17})})});if(!i)return C;let I="updating"===f?e("chrome.update.updating"):"done"===f?e("chrome.update.restart"):"error"===f?e("chrome.update.failed"):g?`v${i}`:`${e("chrome.update.update")} v${i}`,j="updating"===f||g;return(0,o.jsxs)(o.Fragment,{children:[C,(0,o.jsxs)("button",{type:"button",onClick:S,disabled:j,title:g?e("chrome.update.busy"):y||`${e("chrome.update.available")} — v${i}`,style:{display:"inline-flex",alignItems:"center",gap:6,width:"auto",padding:"0 11px",height:30,background:"error"===f?"var(--sx-keyword)":g?"var(--bg-active)":"var(--accent)",color:g?"var(--text-dim)":"var(--accent-fg)",borderRadius:999,fontSize:12,fontWeight:600,border:"none",opacity:"updating"===f?.75:1,cursor:j?"default":"pointer"},children:["updating"===f?(0,o.jsx)("span",{className:"sync-spin",style:{display:"inline-flex"},children:(0,o.jsx)(a.I,{name:"sync",size:14})}):(0,o.jsx)(a.I,{name:"updating"===f?"sync":"done"===f?"refresh":"error"===f?"bell":"arrowUp",size:14}),(0,o.jsx)("span",{children:I})]})]})}},4303:(e,t,i)=>{i.d(t,{P:()=>n});var o=i(7814);let n=(0,o.createServerReference)("00448c48579abd11cee040b8b9ddca4e41be6f184e",o.callServer,void 0,o.findSourceMapURL,"runUpdate")},4414:(e,t,i)=>{i.d(t,{ChatToggle:()=>a});var o=i(5076),n=i(8576),r=i(5629);function a(){let e=(0,r.k)();return(0,o.jsx)("button",{className:"top-btn",title:`${e("chrome.chat.agentRoom")} (⌘J)`,type:"button",onClick:()=>window.dispatchEvent(new CustomEvent("constella:toggle-chat")),children:(0,o.jsx)(n.I,{name:"chat",size:17})})}},4942:(e,t,i)=>{i.d(t,{SidebarToggle:()=>l});var o=i(5076),n=i(8488),r=i(8576);let a=`
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,n.useState)(!1);return(0,n.useEffect)(()=>{if(!document.getElementById("side-rail-style")){let e=document.createElement("style");e.id="side-rail-style",e.textContent=a,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,o.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,o.jsx)(r.I,{name:"sidebarIcon",size:17})})}},5259:(e,t,i)=>{i.d(t,{l:()=>n});var o=i(7814);let n=(0,o.createServerReference)("405ee9cc58fe89e8c6f9f1f265a850575a129a7936",o.callServer,void 0,o.findSourceMapURL,"getUpdateState")},5787:(e,t,i)=>{i.d(t,{ViewChrome:()=>l});var o=i(5076),n=i(8576),r=i(972),a=i(5629);function l({title:e,sub:t,right:i,icon:s,flush:d,children:c}){let u=(0,a.k)(),p=r.e.find(t=>t.title===e),g=s??p?.icon,h=p?u(`mod.${p.id}`):e;return(0,o.jsxs)("div",{className:"app-view",children:[(0,o.jsxs)("div",{className:"view-head",children:[g&&(0,o.jsx)("div",{className:"vh-icon",children:(0,o.jsx)(n.I,{name:g,size:18})}),(0,o.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,o.jsx)("div",{className:"view-title",children:h}),t&&(0,o.jsx)("div",{className:"view-sub",children:t})]}),i]}),(0,o.jsx)("div",{className:"view-body",style:d?{padding:0,overflow:"hidden"}:void 0,children:c})]})}},6588:(e,t,i)=>{i.d(t,{BackButton:()=>l});var o=i(5076),n=i(9860),r=i(8576),a=i(5629);function l(){let e=(0,a.k)(),t=(0,n.useRouter)();return(0,o.jsx)("button",{className:"top-btn",title:e("common.back"),style:{marginRight:2},onClick:()=>{window.history.length>1?t.back():t.push("/")},children:(0,o.jsx)(r.I,{name:"chevronLeft",size:18})})}},8837:(e,t,i)=>{i.d(t,{e:()=>n});var o=i(7814);let n=(0,o.createServerReference)("0083096d6b88e89fee2e833270be160a64f9948543",o.callServer,void 0,o.findSourceMapURL,"pollUpdateResult")}}]);