@seqyuan/annovibe 0.8.130 → 0.8.134

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 (301) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-path-routes-manifest.json +14 -13
  3. package/.next/build-manifest.json +2 -2
  4. package/.next/prerender-manifest.json +3 -3
  5. package/.next/required-server-files.js +1 -1
  6. package/.next/required-server-files.json +1 -1
  7. package/.next/routes-manifest.json +8 -0
  8. package/.next/server/app/_global-error/page.js +2 -2
  9. package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  10. package/.next/server/app/_global-error.html +1 -1
  11. package/.next/server/app/_global-error.rsc +1 -1
  12. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  13. package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  14. package/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  15. package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  16. package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  17. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  18. package/.next/server/app/_not-found/page.js +2 -2
  19. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  20. package/.next/server/app/_not-found.html +1 -1
  21. package/.next/server/app/_not-found.rsc +2 -2
  22. package/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
  23. package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  24. package/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
  25. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  26. package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  27. package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  28. package/.next/server/app/api/agent/[id]/events/route.js +2 -2
  29. package/.next/server/app/api/agent/[id]/prepare/route.js +1 -1
  30. package/.next/server/app/api/agent/[id]/route.js +1 -1
  31. package/.next/server/app/api/agent/new/route.js +1 -1
  32. package/.next/server/app/api/agent/running/events/route.js +2 -2
  33. package/.next/server/app/api/agent/running/route.js +1 -1
  34. package/.next/server/app/api/agent/runtime/route.js +1 -1
  35. package/.next/server/app/api/apps/[id]/[[...path]]/route.js +2 -2
  36. package/.next/server/app/api/apps/route.js +2 -2
  37. package/.next/server/app/api/auth/all-providers/route.js +1 -1
  38. package/.next/server/app/api/auth/api-key/[provider]/route.js +1 -1
  39. package/.next/server/app/api/auth/login/[provider]/route.js +1 -1
  40. package/.next/server/app/api/auth/login/route.js +1 -1
  41. package/.next/server/app/api/auth/logout/[provider]/route.js +1 -1
  42. package/.next/server/app/api/auth/providers/route.js +1 -1
  43. package/.next/server/app/api/auth/status/route.js +1 -1
  44. package/.next/server/app/api/auth/totp/route.js +1 -1
  45. package/.next/server/app/api/debug-models/route.js +1 -1
  46. package/.next/server/app/api/default-cwd/route.js +1 -1
  47. package/.next/server/app/api/file-tree/delete/route.js +1 -1
  48. package/.next/server/app/api/file-tree/mkdir/route.js +1 -1
  49. package/.next/server/app/api/file-tree/rename/route.js +1 -1
  50. package/.next/server/app/api/file-tree/reveal/route.js +1 -1
  51. package/.next/server/app/api/file-tree/write/route.js +1 -1
  52. package/.next/server/app/api/file-watch/route.js +2 -2
  53. package/.next/server/app/api/files/[...path]/route.js +1 -1
  54. package/.next/server/app/api/harness/route.js +1 -1
  55. package/.next/server/app/api/home/route.js +1 -1
  56. package/.next/server/app/api/im/cancel/route.js +1 -1
  57. package/.next/server/app/api/im/gateway-status/route.js +1 -1
  58. package/.next/server/app/api/im/gateway-token/route.js +1 -1
  59. package/.next/server/app/api/im/project/route.js +1 -1
  60. package/.next/server/app/api/im/projects/route.js +1 -1
  61. package/.next/server/app/api/im/session-ids/route.js +1 -1
  62. package/.next/server/app/api/im/turn/route.js +2 -2
  63. package/.next/server/app/api/images/upload/route.js +1 -1
  64. package/.next/server/app/api/internal/runtime/route.js +1 -1
  65. package/.next/server/app/api/memory/dismiss/route.js +2 -2
  66. package/.next/server/app/api/memory/promote/route.js +2 -2
  67. package/.next/server/app/api/models/route.js +1 -1
  68. package/.next/server/app/api/models-config/discover/route.js +1 -1
  69. package/.next/server/app/api/models-config/route.js +1 -1
  70. package/.next/server/app/api/models-config/test/route.js +1 -1
  71. package/.next/server/app/api/plot-kernels/route.js +1 -1
  72. package/.next/server/app/api/plot-kernels/save/route.js +1 -1
  73. package/.next/server/app/api/plot-kernels/status/route.js +1 -1
  74. package/.next/server/app/api/plot-kernels/stop/route.js +1 -1
  75. package/.next/server/app/api/projects/browse/route.js +1 -1
  76. package/.next/server/app/api/projects/route.js +1 -1
  77. package/.next/server/app/api/search/route.js +1 -1
  78. package/.next/server/app/api/session-index/events/route.js +1 -1
  79. package/.next/server/app/api/sessions/[id]/auto-name/route.js +34 -0
  80. package/.next/server/app/api/sessions/[id]/auto-name/route_client-reference-manifest.js +1 -0
  81. package/.next/server/app/api/sessions/[id]/context/route.js +1 -1
  82. package/.next/server/app/api/sessions/[id]/kernel-state/route.js +1 -1
  83. package/.next/server/app/api/sessions/[id]/route.js +1 -1
  84. package/.next/server/app/api/sessions/[id]/shadowed/route.js +1 -1
  85. package/.next/server/app/api/sessions/[id]/workbench-artifact/route.js +1 -1
  86. package/.next/server/app/api/sessions/[id]/workbench-review/route.js +1 -1
  87. package/.next/server/app/api/sessions/new/route.js +1 -1
  88. package/.next/server/app/api/sessions/route.js +1 -1
  89. package/.next/server/app/api/settings/route.js +1 -1
  90. package/.next/server/app/api/skills/install/route.js +2 -2
  91. package/.next/server/app/api/skills/route.js +2 -2
  92. package/.next/server/app/api/skills/search/route.js +1 -1
  93. package/.next/server/app/api/smoke/prompt-admission/route.js +1 -1
  94. package/.next/server/app/api/soul/route.js +1 -1
  95. package/.next/server/app/api/subagents/status/route.js +1 -1
  96. package/.next/server/app/api/version/route.js +1 -1
  97. package/.next/server/app/favicon.ico/route.js +1 -1
  98. package/.next/server/app/icon.svg/route.js +1 -1
  99. package/.next/server/app/index.html +1 -1
  100. package/.next/server/app/index.rsc +3 -3
  101. package/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
  102. package/.next/server/app/index.segments/_full.segment.rsc +3 -3
  103. package/.next/server/app/index.segments/_head.segment.rsc +1 -1
  104. package/.next/server/app/index.segments/_index.segment.rsc +2 -2
  105. package/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  106. package/.next/server/app/login/page.js +2 -2
  107. package/.next/server/app/login/page_client-reference-manifest.js +1 -1
  108. package/.next/server/app/login.html +1 -1
  109. package/.next/server/app/login.rsc +2 -2
  110. package/.next/server/app/login.segments/_full.segment.rsc +2 -2
  111. package/.next/server/app/login.segments/_head.segment.rsc +1 -1
  112. package/.next/server/app/login.segments/_index.segment.rsc +2 -2
  113. package/.next/server/app/login.segments/_tree.segment.rsc +2 -2
  114. package/.next/server/app/login.segments/login/__PAGE__.segment.rsc +1 -1
  115. package/.next/server/app/login.segments/login.segment.rsc +1 -1
  116. package/.next/server/app/page.js +7 -7
  117. package/.next/server/app/page_client-reference-manifest.js +1 -1
  118. package/.next/server/app/smoke/page.js +3 -3
  119. package/.next/server/app/smoke/page_client-reference-manifest.js +1 -1
  120. package/.next/server/app/smoke/session-stream/page.js +2 -2
  121. package/.next/server/app/smoke/session-stream/page_client-reference-manifest.js +1 -1
  122. package/.next/server/app/smoke/session-stream.html +1 -1
  123. package/.next/server/app/smoke/session-stream.rsc +2 -2
  124. package/.next/server/app/smoke/session-stream.segments/_full.segment.rsc +2 -2
  125. package/.next/server/app/smoke/session-stream.segments/_head.segment.rsc +1 -1
  126. package/.next/server/app/smoke/session-stream.segments/_index.segment.rsc +2 -2
  127. package/.next/server/app/smoke/session-stream.segments/_tree.segment.rsc +2 -2
  128. package/.next/server/app/smoke/session-stream.segments/smoke/session-stream/__PAGE__.segment.rsc +1 -1
  129. package/.next/server/app/smoke/session-stream.segments/smoke/session-stream.segment.rsc +1 -1
  130. package/.next/server/app/smoke/session-stream.segments/smoke.segment.rsc +1 -1
  131. package/.next/server/app/smoke.html +2 -2
  132. package/.next/server/app/smoke.rsc +2 -2
  133. package/.next/server/app/smoke.segments/_full.segment.rsc +2 -2
  134. package/.next/server/app/smoke.segments/_head.segment.rsc +1 -1
  135. package/.next/server/app/smoke.segments/_index.segment.rsc +2 -2
  136. package/.next/server/app/smoke.segments/_tree.segment.rsc +2 -2
  137. package/.next/server/app/smoke.segments/smoke/__PAGE__.segment.rsc +1 -1
  138. package/.next/server/app/smoke.segments/smoke.segment.rsc +1 -1
  139. package/.next/server/app-paths-manifest.json +14 -13
  140. package/.next/server/chunks/402.js +2 -2
  141. package/.next/server/chunks/6429.js +1 -1
  142. package/.next/server/chunks/7890.js +1 -1
  143. package/.next/server/middleware-build-manifest.js +1 -1
  144. package/.next/server/next-font-manifest.js +1 -1
  145. package/.next/server/next-font-manifest.json +1 -1
  146. package/.next/server/pages/404.html +1 -1
  147. package/.next/server/pages/500.html +1 -1
  148. package/.next/server/server-reference-manifest.json +1 -1
  149. package/.next/static/chunks/app/_global-error/page-c47e15c89def27e4.js +1 -0
  150. package/.next/static/chunks/app/api/agent/[id]/events/route-c47e15c89def27e4.js +1 -0
  151. package/.next/static/chunks/app/api/agent/[id]/prepare/route-c47e15c89def27e4.js +1 -0
  152. package/.next/static/chunks/app/api/agent/[id]/route-c47e15c89def27e4.js +1 -0
  153. package/.next/static/chunks/app/api/agent/new/route-c47e15c89def27e4.js +1 -0
  154. package/.next/static/chunks/app/api/agent/running/events/route-c47e15c89def27e4.js +1 -0
  155. package/.next/static/chunks/app/api/agent/running/route-c47e15c89def27e4.js +1 -0
  156. package/.next/static/chunks/app/api/agent/runtime/route-c47e15c89def27e4.js +1 -0
  157. package/.next/static/chunks/app/api/apps/[id]/[[...path]]/route-c47e15c89def27e4.js +1 -0
  158. package/.next/static/chunks/app/api/apps/route-c47e15c89def27e4.js +1 -0
  159. package/.next/static/chunks/app/api/auth/all-providers/route-c47e15c89def27e4.js +1 -0
  160. package/.next/static/chunks/app/api/auth/api-key/[provider]/route-c47e15c89def27e4.js +1 -0
  161. package/.next/static/chunks/app/api/auth/login/[provider]/route-c47e15c89def27e4.js +1 -0
  162. package/.next/static/chunks/app/api/auth/login/route-c47e15c89def27e4.js +1 -0
  163. package/.next/static/chunks/app/api/auth/logout/[provider]/route-c47e15c89def27e4.js +1 -0
  164. package/.next/static/chunks/app/api/auth/providers/route-c47e15c89def27e4.js +1 -0
  165. package/.next/static/chunks/app/api/auth/status/route-c47e15c89def27e4.js +1 -0
  166. package/.next/static/chunks/app/api/auth/totp/route-c47e15c89def27e4.js +1 -0
  167. package/.next/static/chunks/app/api/debug-models/route-c47e15c89def27e4.js +1 -0
  168. package/.next/static/chunks/app/api/default-cwd/route-c47e15c89def27e4.js +1 -0
  169. package/.next/static/chunks/app/api/file-tree/delete/route-c47e15c89def27e4.js +1 -0
  170. package/.next/static/chunks/app/api/file-tree/mkdir/route-c47e15c89def27e4.js +1 -0
  171. package/.next/static/chunks/app/api/file-tree/rename/route-c47e15c89def27e4.js +1 -0
  172. package/.next/static/chunks/app/api/file-tree/reveal/route-c47e15c89def27e4.js +1 -0
  173. package/.next/static/chunks/app/api/file-tree/write/route-c47e15c89def27e4.js +1 -0
  174. package/.next/static/chunks/app/api/file-watch/route-c47e15c89def27e4.js +1 -0
  175. package/.next/static/chunks/app/api/files/[...path]/route-c47e15c89def27e4.js +1 -0
  176. package/.next/static/chunks/app/api/harness/route-c47e15c89def27e4.js +1 -0
  177. package/.next/static/chunks/app/api/home/route-c47e15c89def27e4.js +1 -0
  178. package/.next/static/chunks/app/api/im/cancel/route-c47e15c89def27e4.js +1 -0
  179. package/.next/static/chunks/app/api/im/gateway-status/route-c47e15c89def27e4.js +1 -0
  180. package/.next/static/chunks/app/api/im/gateway-token/route-c47e15c89def27e4.js +1 -0
  181. package/.next/static/chunks/app/api/im/project/route-c47e15c89def27e4.js +1 -0
  182. package/.next/static/chunks/app/api/im/projects/route-c47e15c89def27e4.js +1 -0
  183. package/.next/static/chunks/app/api/im/session-ids/route-c47e15c89def27e4.js +1 -0
  184. package/.next/static/chunks/app/api/im/turn/route-c47e15c89def27e4.js +1 -0
  185. package/.next/static/chunks/app/api/images/upload/route-c47e15c89def27e4.js +1 -0
  186. package/.next/static/chunks/app/api/internal/runtime/route-c47e15c89def27e4.js +1 -0
  187. package/.next/static/chunks/app/api/memory/dismiss/route-c47e15c89def27e4.js +1 -0
  188. package/.next/static/chunks/app/api/memory/promote/route-c47e15c89def27e4.js +1 -0
  189. package/.next/static/chunks/app/api/models/route-c47e15c89def27e4.js +1 -0
  190. package/.next/static/chunks/app/api/models-config/discover/route-c47e15c89def27e4.js +1 -0
  191. package/.next/static/chunks/app/api/models-config/route-c47e15c89def27e4.js +1 -0
  192. package/.next/static/chunks/app/api/models-config/test/route-c47e15c89def27e4.js +1 -0
  193. package/.next/static/chunks/app/api/plot-kernels/route-c47e15c89def27e4.js +1 -0
  194. package/.next/static/chunks/app/api/plot-kernels/save/route-c47e15c89def27e4.js +1 -0
  195. package/.next/static/chunks/app/api/plot-kernels/status/route-c47e15c89def27e4.js +1 -0
  196. package/.next/static/chunks/app/api/plot-kernels/stop/route-c47e15c89def27e4.js +1 -0
  197. package/.next/static/chunks/app/api/projects/browse/route-c47e15c89def27e4.js +1 -0
  198. package/.next/static/chunks/app/api/projects/route-c47e15c89def27e4.js +1 -0
  199. package/.next/static/chunks/app/api/search/route-c47e15c89def27e4.js +1 -0
  200. package/.next/static/chunks/app/api/session-index/events/route-c47e15c89def27e4.js +1 -0
  201. package/.next/static/chunks/app/api/sessions/[id]/auto-name/route-c47e15c89def27e4.js +1 -0
  202. package/.next/static/chunks/app/api/sessions/[id]/context/route-c47e15c89def27e4.js +1 -0
  203. package/.next/static/chunks/app/api/sessions/[id]/kernel-state/route-c47e15c89def27e4.js +1 -0
  204. package/.next/static/chunks/app/api/sessions/[id]/route-c47e15c89def27e4.js +1 -0
  205. package/.next/static/chunks/app/api/sessions/[id]/shadowed/route-c47e15c89def27e4.js +1 -0
  206. package/.next/static/chunks/app/api/sessions/[id]/workbench-artifact/route-c47e15c89def27e4.js +1 -0
  207. package/.next/static/chunks/app/api/sessions/[id]/workbench-review/route-c47e15c89def27e4.js +1 -0
  208. package/.next/static/chunks/app/api/sessions/new/route-c47e15c89def27e4.js +1 -0
  209. package/.next/static/chunks/app/api/sessions/route-c47e15c89def27e4.js +1 -0
  210. package/.next/static/chunks/app/api/settings/route-c47e15c89def27e4.js +1 -0
  211. package/.next/static/chunks/app/api/skills/install/route-c47e15c89def27e4.js +1 -0
  212. package/.next/static/chunks/app/api/skills/route-c47e15c89def27e4.js +1 -0
  213. package/.next/static/chunks/app/api/skills/search/route-c47e15c89def27e4.js +1 -0
  214. package/.next/static/chunks/app/api/smoke/prompt-admission/route-c47e15c89def27e4.js +1 -0
  215. package/.next/static/chunks/app/api/soul/route-c47e15c89def27e4.js +1 -0
  216. package/.next/static/chunks/app/api/subagents/status/route-c47e15c89def27e4.js +1 -0
  217. package/.next/static/chunks/app/api/version/route-c47e15c89def27e4.js +1 -0
  218. package/.next/static/chunks/app/favicon.ico/route-c47e15c89def27e4.js +1 -0
  219. package/.next/static/chunks/app/{page-252ec85583b84aaa.js → page-959c2935e21471e4.js} +6 -6
  220. package/.next/static/chunks/next/dist/client/components/builtin/app-error-c47e15c89def27e4.js +1 -0
  221. package/.next/static/chunks/next/dist/client/components/builtin/forbidden-c47e15c89def27e4.js +1 -0
  222. package/.next/static/chunks/next/dist/client/components/builtin/not-found-c47e15c89def27e4.js +1 -0
  223. package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-c47e15c89def27e4.js +1 -0
  224. package/.next/static/css/fdfd4d4bcfae3c6a.css +1 -0
  225. package/package.json +2 -1
  226. package/.next/static/chunks/app/_global-error/page-12f2c8373df5bb6a.js +0 -1
  227. package/.next/static/chunks/app/api/agent/[id]/events/route-12f2c8373df5bb6a.js +0 -1
  228. package/.next/static/chunks/app/api/agent/[id]/prepare/route-12f2c8373df5bb6a.js +0 -1
  229. package/.next/static/chunks/app/api/agent/[id]/route-12f2c8373df5bb6a.js +0 -1
  230. package/.next/static/chunks/app/api/agent/new/route-12f2c8373df5bb6a.js +0 -1
  231. package/.next/static/chunks/app/api/agent/running/events/route-12f2c8373df5bb6a.js +0 -1
  232. package/.next/static/chunks/app/api/agent/running/route-12f2c8373df5bb6a.js +0 -1
  233. package/.next/static/chunks/app/api/agent/runtime/route-12f2c8373df5bb6a.js +0 -1
  234. package/.next/static/chunks/app/api/apps/[id]/[[...path]]/route-12f2c8373df5bb6a.js +0 -1
  235. package/.next/static/chunks/app/api/apps/route-12f2c8373df5bb6a.js +0 -1
  236. package/.next/static/chunks/app/api/auth/all-providers/route-12f2c8373df5bb6a.js +0 -1
  237. package/.next/static/chunks/app/api/auth/api-key/[provider]/route-12f2c8373df5bb6a.js +0 -1
  238. package/.next/static/chunks/app/api/auth/login/[provider]/route-12f2c8373df5bb6a.js +0 -1
  239. package/.next/static/chunks/app/api/auth/login/route-12f2c8373df5bb6a.js +0 -1
  240. package/.next/static/chunks/app/api/auth/logout/[provider]/route-12f2c8373df5bb6a.js +0 -1
  241. package/.next/static/chunks/app/api/auth/providers/route-12f2c8373df5bb6a.js +0 -1
  242. package/.next/static/chunks/app/api/auth/status/route-12f2c8373df5bb6a.js +0 -1
  243. package/.next/static/chunks/app/api/auth/totp/route-12f2c8373df5bb6a.js +0 -1
  244. package/.next/static/chunks/app/api/debug-models/route-12f2c8373df5bb6a.js +0 -1
  245. package/.next/static/chunks/app/api/default-cwd/route-12f2c8373df5bb6a.js +0 -1
  246. package/.next/static/chunks/app/api/file-tree/delete/route-12f2c8373df5bb6a.js +0 -1
  247. package/.next/static/chunks/app/api/file-tree/mkdir/route-12f2c8373df5bb6a.js +0 -1
  248. package/.next/static/chunks/app/api/file-tree/rename/route-12f2c8373df5bb6a.js +0 -1
  249. package/.next/static/chunks/app/api/file-tree/reveal/route-12f2c8373df5bb6a.js +0 -1
  250. package/.next/static/chunks/app/api/file-tree/write/route-12f2c8373df5bb6a.js +0 -1
  251. package/.next/static/chunks/app/api/file-watch/route-12f2c8373df5bb6a.js +0 -1
  252. package/.next/static/chunks/app/api/files/[...path]/route-12f2c8373df5bb6a.js +0 -1
  253. package/.next/static/chunks/app/api/harness/route-12f2c8373df5bb6a.js +0 -1
  254. package/.next/static/chunks/app/api/home/route-12f2c8373df5bb6a.js +0 -1
  255. package/.next/static/chunks/app/api/im/cancel/route-12f2c8373df5bb6a.js +0 -1
  256. package/.next/static/chunks/app/api/im/gateway-status/route-12f2c8373df5bb6a.js +0 -1
  257. package/.next/static/chunks/app/api/im/gateway-token/route-12f2c8373df5bb6a.js +0 -1
  258. package/.next/static/chunks/app/api/im/project/route-12f2c8373df5bb6a.js +0 -1
  259. package/.next/static/chunks/app/api/im/projects/route-12f2c8373df5bb6a.js +0 -1
  260. package/.next/static/chunks/app/api/im/session-ids/route-12f2c8373df5bb6a.js +0 -1
  261. package/.next/static/chunks/app/api/im/turn/route-12f2c8373df5bb6a.js +0 -1
  262. package/.next/static/chunks/app/api/images/upload/route-12f2c8373df5bb6a.js +0 -1
  263. package/.next/static/chunks/app/api/internal/runtime/route-12f2c8373df5bb6a.js +0 -1
  264. package/.next/static/chunks/app/api/memory/dismiss/route-12f2c8373df5bb6a.js +0 -1
  265. package/.next/static/chunks/app/api/memory/promote/route-12f2c8373df5bb6a.js +0 -1
  266. package/.next/static/chunks/app/api/models/route-12f2c8373df5bb6a.js +0 -1
  267. package/.next/static/chunks/app/api/models-config/discover/route-12f2c8373df5bb6a.js +0 -1
  268. package/.next/static/chunks/app/api/models-config/route-12f2c8373df5bb6a.js +0 -1
  269. package/.next/static/chunks/app/api/models-config/test/route-12f2c8373df5bb6a.js +0 -1
  270. package/.next/static/chunks/app/api/plot-kernels/route-12f2c8373df5bb6a.js +0 -1
  271. package/.next/static/chunks/app/api/plot-kernels/save/route-12f2c8373df5bb6a.js +0 -1
  272. package/.next/static/chunks/app/api/plot-kernels/status/route-12f2c8373df5bb6a.js +0 -1
  273. package/.next/static/chunks/app/api/plot-kernels/stop/route-12f2c8373df5bb6a.js +0 -1
  274. package/.next/static/chunks/app/api/projects/browse/route-12f2c8373df5bb6a.js +0 -1
  275. package/.next/static/chunks/app/api/projects/route-12f2c8373df5bb6a.js +0 -1
  276. package/.next/static/chunks/app/api/search/route-12f2c8373df5bb6a.js +0 -1
  277. package/.next/static/chunks/app/api/session-index/events/route-12f2c8373df5bb6a.js +0 -1
  278. package/.next/static/chunks/app/api/sessions/[id]/context/route-12f2c8373df5bb6a.js +0 -1
  279. package/.next/static/chunks/app/api/sessions/[id]/kernel-state/route-12f2c8373df5bb6a.js +0 -1
  280. package/.next/static/chunks/app/api/sessions/[id]/route-12f2c8373df5bb6a.js +0 -1
  281. package/.next/static/chunks/app/api/sessions/[id]/shadowed/route-12f2c8373df5bb6a.js +0 -1
  282. package/.next/static/chunks/app/api/sessions/[id]/workbench-artifact/route-12f2c8373df5bb6a.js +0 -1
  283. package/.next/static/chunks/app/api/sessions/[id]/workbench-review/route-12f2c8373df5bb6a.js +0 -1
  284. package/.next/static/chunks/app/api/sessions/new/route-12f2c8373df5bb6a.js +0 -1
  285. package/.next/static/chunks/app/api/sessions/route-12f2c8373df5bb6a.js +0 -1
  286. package/.next/static/chunks/app/api/settings/route-12f2c8373df5bb6a.js +0 -1
  287. package/.next/static/chunks/app/api/skills/install/route-12f2c8373df5bb6a.js +0 -1
  288. package/.next/static/chunks/app/api/skills/route-12f2c8373df5bb6a.js +0 -1
  289. package/.next/static/chunks/app/api/skills/search/route-12f2c8373df5bb6a.js +0 -1
  290. package/.next/static/chunks/app/api/smoke/prompt-admission/route-12f2c8373df5bb6a.js +0 -1
  291. package/.next/static/chunks/app/api/soul/route-12f2c8373df5bb6a.js +0 -1
  292. package/.next/static/chunks/app/api/subagents/status/route-12f2c8373df5bb6a.js +0 -1
  293. package/.next/static/chunks/app/api/version/route-12f2c8373df5bb6a.js +0 -1
  294. package/.next/static/chunks/app/favicon.ico/route-12f2c8373df5bb6a.js +0 -1
  295. package/.next/static/chunks/next/dist/client/components/builtin/app-error-12f2c8373df5bb6a.js +0 -1
  296. package/.next/static/chunks/next/dist/client/components/builtin/forbidden-12f2c8373df5bb6a.js +0 -1
  297. package/.next/static/chunks/next/dist/client/components/builtin/not-found-12f2c8373df5bb6a.js +0 -1
  298. package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-12f2c8373df5bb6a.js +0 -1
  299. package/.next/static/css/98d226d636ddce16.css +0 -1
  300. /package/.next/static/{pD4GKzugLztRoTHeAKj_C → 2gyhgfAo_GNB2lRPOJwF9}/_buildManifest.js +0 -0
  301. /package/.next/static/{pD4GKzugLztRoTHeAKj_C → 2gyhgfAo_GNB2lRPOJwF9}/_ssgManifest.js +0 -0
@@ -1,3 +1,3 @@
1
- "use strict";exports.id=402,exports.ids=[402],exports.modules={12039:(a,b,c)=>{c.d(b,{B:()=>d});function d(a){if("assistant"!==a.role)return a;let b=a.content;if(!Array.isArray(b))return a;let c=b.map(a=>("object"!=typeof a||null===a||Array.isArray(a)||"toolCall"!==a.type?null:{type:"toolCall",toolCallId:"string"==typeof a.toolCallId?a.toolCallId:"string"==typeof a.id?a.id:"",toolName:"string"==typeof a.toolName?a.toolName:"string"==typeof a.name?a.name:"",input:"object"!=typeof a.input||null===a.input||Array.isArray(a.input)?"object"!=typeof a.arguments||null===a.arguments||Array.isArray(a.arguments)?{}:a.arguments:a.input})??a);return{...a,content:c}}},40402:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{BR:()=>u,CF:()=>z,DK:()=>v,O8:()=>t,Pt:()=>l.Pt,Uv:()=>w,dQ:()=>p,ev:()=>y,gO:()=>m.g,lG:()=>A,os:()=>s,r2:()=>q});var e=c(75430),f=c(12039),g=c(74788),h=c(77443),i=c(29021),j=c(33873),k=c(50723),l=c(16185),m=c(47240),n=a([e,g,h,l]);function o(a,b={}){let c=[];for(let b of a)if((0,i.existsSync)(b))try{for(let a of(0,i.readdirSync)(b))a.endsWith(".jsonl")&&c.push((0,j.join)(b,a))}catch{}let d=(0,g.tS)({force:!0===b.force}),e=r(),f=[];for(let a of c)try{let c,g,j,m=(0,k.V0)(a),n=b.force?null:(0,h._E)(a,m);if(n)c={id:n.id,cwd:n.cwd,timestamp:n.created,parentSession:n.parentSession,title:n.title},g=n.messageCount,j=n.firstMessage;else{let b=function(a){let b;try{b=(0,i.openSync)(a,"r");let c=Buffer.alloc(5120),d=(0,i.readSync)(b,c,0,5120,0);return c.toString("utf-8",0,d)}finally{if(void 0!==b)try{(0,i.closeSync)(b)}catch{}}}(a);if(!(c=function(a){let b=a.split("\n")[0]?.trim();if(!b)return null;try{let a=JSON.parse(b);if("session"!==a.type||"string"!=typeof a.id)return null;return{id:a.id,cwd:"string"==typeof a.cwd?a.cwd:"",timestamp:"string"==typeof a.timestamp?a.timestamp:new Date().toISOString(),parentSession:"string"==typeof a.parentSession?a.parentSession:void 0,title:"string"==typeof a.title?a.title:void 0}}catch{return null}}(b)))continue;g=function(a){let b=0,c=-1;for(;-1!==(c=a.indexOf('"type":"message"',c+1));)b++;return b}(b),j=function(a){let b=a.split("\n");for(let a=1;a<b.length;a++){let c=b[a].trim();if(c)try{let a=JSON.parse(c);if("message"!==a.type)continue;let b=a.message;if(b?.role!=="user")continue;let d=b.content;if("string"==typeof d)return d;if(Array.isArray(d)){let a=d.find(a=>"object"==typeof a&&null!==a&&"text"===a.type);if(a?.text)return a.text}}catch{}}return""}(b)||"(no messages)",(0,h.C8)(a,{identity:m,id:c.id,cwd:(0,l.Pt)(c.cwd),created:c.timestamp,parentSession:c.parentSession,title:c.title,messageCount:g,firstMessage:j})}let o=(0,l.Pt)(c.cwd);if(b.filterCwd&&o!==b.filterCwd)continue;let p=d[c.id]??null;e.set(c.id,a),f.push({path:a,id:c.id,cwd:o,name:c.title,created:c.timestamp,modified:new Date((0,k.$Q)(m)).toISOString(),messageCount:g,firstMessage:j,parentSessionId:c.parentSession?function(a){let b=(a.split("/").pop()??"").match(/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/i);return b?.[0]}(c.parentSession):void 0,sessionKind:p?.sessionKind,createdBy:p?.createdBy,sessionMeta:p})}catch{}return f.sort((a,b)=>new Date(b.modified).getTime()-new Date(a.modified).getTime()),f}async function p(a={}){let b=(0,l.tE)(),c=[];try{for(let a of(0,i.readdirSync)(b)){let d=(0,j.join)(b,a);try{(0,i.statSync)(d).isDirectory()&&c.push(d)}catch{}}}catch{}return o(c,a)}async function q(a,b={}){let c=(0,l.Pt)(a);return o([(0,l.D0)(c)],{...b,filterCwd:c})}function r(){return globalThis.__piSessionPathCache||(globalThis.__piSessionPathCache=new Map),globalThis.__piSessionPathCache}async function s(a){let b=r().get(a);if(b)return b;let c=(0,h.Y1)(a);if(c)try{let b=(0,k.V0)(c),d=(0,h._E)(c,b);if(d&&d.id===a)return r().set(a,c),c}catch{}return await p(),r().get(a)??null}function t(a,b){r().set(a,b)}function u(a){r().delete(a)}function v(a){return e.SessionManager.open(a).getEntries()}function w(a,b){let c,d,g,h=new Map;for(let b of a)h.set(b.id,b);let i=(0,e.buildSessionContext)(a,b,h);if(null===b||(b&&(c=h.get(b)),c||(c=a[a.length-1]),!c))return{messages:[],entryIds:[],thinkingLevel:i.thinkingLevel,model:i.model};let j=[],k=c;for(;k;)j.unshift(k),k=k.parentId?h.get(k.parentId):void 0;for(let a of j)"compaction"===a.type&&(d=a.id,g=a.firstKeptEntryId);let l=[],m=[];if(d){l.push(d);let a=j.findIndex(a=>a.id===d),b=g?j.findIndex((b,c)=>c<a&&b.id===g):-1,c=b>=0?b:a;for(let b=c;b<a;b++)"message"===j[b].type&&l.push(j[b].id);for(let b=a+1;b<j.length;b++)"message"===j[b].type&&l.push(j[b].id);let e=0;for(let a=0;a<c;a++)"message"===j[a].type&&e++;e>0&&m.push({entryId:d,shadowedCount:e})}else for(let a of j)"message"===a.type&&l.push(a.id);return{messages:i.messages.map(a=>"compactionSummary"===a.role?{role:"user",content:`*The conversation history before this point was compacted into the following summary:*
1
+ "use strict";exports.id=402,exports.ids=[402],exports.modules={12039:(a,b,c)=>{c.d(b,{B:()=>d});function d(a){if("assistant"!==a.role)return a;let b=a.content;if(!Array.isArray(b))return a;let c=b.map(a=>("object"!=typeof a||null===a||Array.isArray(a)||"toolCall"!==a.type?null:{type:"toolCall",toolCallId:"string"==typeof a.toolCallId?a.toolCallId:"string"==typeof a.id?a.id:"",toolName:"string"==typeof a.toolName?a.toolName:"string"==typeof a.name?a.name:"",input:"object"!=typeof a.input||null===a.input||Array.isArray(a.input)?"object"!=typeof a.arguments||null===a.arguments||Array.isArray(a.arguments)?{}:a.arguments:a.input})??a);return{...a,content:c}}},40402:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{BR:()=>w,CF:()=>B,DK:()=>x,O8:()=>v,Pt:()=>l.Pt,Uv:()=>y,dQ:()=>r,ev:()=>A,gO:()=>m.g,lG:()=>C,os:()=>u,r2:()=>s});var e=c(75430),f=c(12039),g=c(74788),h=c(77443),i=c(29021),j=c(33873),k=c(50723),l=c(16185),m=c(47240),n=a([e,g,h,l]);function o(a,b){let c;try{c=(0,i.openSync)(a,"r");let d=(0,i.fstatSync)(c).size,e=Math.min(d,b),f=Buffer.alloc(e),g=(0,i.readSync)(c,f,0,e,d-e);return f.toString("utf-8",0,g)}finally{if(void 0!==c)try{(0,i.closeSync)(c)}catch{}}}function p(a){let b=a.split("\n");for(let a=b.length-1;a>=1;a--){let c=b[a].trim();if(c)try{let a=JSON.parse(c);if("session_info"!==a.type)continue;let b=a.name;if("string"==typeof b&&b.trim())return b.trim()}catch{}}}function q(a,b={}){let c=[];for(let b of a)if((0,i.existsSync)(b))try{for(let a of(0,i.readdirSync)(b))a.endsWith(".jsonl")&&c.push((0,j.join)(b,a))}catch{}let d=(0,g.tS)({force:!0===b.force}),e=t(),f=[];for(let a of c)try{let c,g,j,m=(0,k.V0)(a),n=b.force?null:(0,h._E)(a,m);if(n){if(c={id:n.id,cwd:n.cwd,timestamp:n.created,parentSession:n.parentSession,title:n.title},g=n.messageCount,j=n.firstMessage,void 0===n.title){let b=p(o(a,8192));c.title=b??"",(0,h.C8)(a,{...n,identity:m,title:c.title})}}else{let b=function(a){let b;try{b=(0,i.openSync)(a,"r");let c=Buffer.alloc(5120),d=(0,i.readSync)(b,c,0,5120,0);return c.toString("utf-8",0,d)}finally{if(void 0!==b)try{(0,i.closeSync)(b)}catch{}}}(a);if(!(c=function(a){let b=a.split("\n")[0]?.trim();if(!b)return null;try{let a=JSON.parse(b);if("session"!==a.type||"string"!=typeof a.id)return null;return{id:a.id,cwd:"string"==typeof a.cwd?a.cwd:"",timestamp:"string"==typeof a.timestamp?a.timestamp:new Date().toISOString(),parentSession:"string"==typeof a.parentSession?a.parentSession:void 0,title:"string"==typeof a.title?a.title:void 0}}catch{return null}}(b)))continue;c.title||(c.title=p(o(a,8192))??""),g=function(a){let b=0,c=-1;for(;-1!==(c=a.indexOf('"type":"message"',c+1));)b++;return b}(b),j=function(a){let b=a.split("\n");for(let a=1;a<b.length;a++){let c=b[a].trim();if(c)try{let a=JSON.parse(c);if("message"!==a.type)continue;let b=a.message;if(b?.role!=="user")continue;let d=b.content;if("string"==typeof d)return d;if(Array.isArray(d)){let a=d.find(a=>"object"==typeof a&&null!==a&&"text"===a.type);if(a?.text)return a.text}}catch{}}return""}(b)||"(no messages)",(0,h.C8)(a,{identity:m,id:c.id,cwd:(0,l.Pt)(c.cwd),created:c.timestamp,parentSession:c.parentSession,title:c.title,messageCount:g,firstMessage:j})}let q=(0,l.Pt)(c.cwd);if(b.filterCwd&&q!==b.filterCwd)continue;let r=d[c.id]??null;e.set(c.id,a),f.push({path:a,id:c.id,cwd:q,name:c.title,created:c.timestamp,modified:new Date((0,k.$Q)(m)).toISOString(),messageCount:g,firstMessage:j,parentSessionId:c.parentSession?function(a){let b=(a.split("/").pop()??"").match(/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/i);return b?.[0]}(c.parentSession):void 0,sessionKind:r?.sessionKind,createdBy:r?.createdBy,sessionMeta:r})}catch{}return f.sort((a,b)=>new Date(b.modified).getTime()-new Date(a.modified).getTime()),f}async function r(a={}){let b=(0,l.tE)(),c=[];try{for(let a of(0,i.readdirSync)(b)){let d=(0,j.join)(b,a);try{(0,i.statSync)(d).isDirectory()&&c.push(d)}catch{}}}catch{}return q(c,a)}async function s(a,b={}){let c=(0,l.Pt)(a);return q([(0,l.D0)(c)],{...b,filterCwd:c})}function t(){return globalThis.__piSessionPathCache||(globalThis.__piSessionPathCache=new Map),globalThis.__piSessionPathCache}async function u(a){let b=t().get(a);if(b)return b;let c=(0,h.Y1)(a);if(c)try{let b=(0,k.V0)(c),d=(0,h._E)(c,b);if(d&&d.id===a)return t().set(a,c),c}catch{}return await r(),t().get(a)??null}function v(a,b){t().set(a,b)}function w(a){t().delete(a)}function x(a){return e.SessionManager.open(a).getEntries()}function y(a,b){let c,d,g,h=new Map;for(let b of a)h.set(b.id,b);let i=(0,e.buildSessionContext)(a,b,h);if(null===b||(b&&(c=h.get(b)),c||(c=a[a.length-1]),!c))return{messages:[],entryIds:[],thinkingLevel:i.thinkingLevel,model:i.model};let j=[],k=c;for(;k;)j.unshift(k),k=k.parentId?h.get(k.parentId):void 0;for(let a of j)"compaction"===a.type&&(d=a.id,g=a.firstKeptEntryId);let l=[],m=[];if(d){l.push(d);let a=j.findIndex(a=>a.id===d),b=g?j.findIndex((b,c)=>c<a&&b.id===g):-1,c=b>=0?b:a;for(let b=c;b<a;b++)"message"===j[b].type&&l.push(j[b].id);for(let b=a+1;b<j.length;b++)"message"===j[b].type&&l.push(j[b].id);let e=0;for(let a=0;a<c;a++)"message"===j[a].type&&e++;e>0&&m.push({entryId:d,shadowedCount:e})}else for(let a of j)"message"===a.type&&l.push(a.id);return{messages:i.messages.map(a=>"compactionSummary"===a.role?{role:"user",content:`*The conversation history before this point was compacted into the following summary:*
2
2
 
3
- ${a.summary??""}`,timestamp:a.timestamp}:(0,f.B)(a)),entryIds:l,thinkingLevel:i.thinkingLevel,model:i.model,compactions:m.length>0?m:void 0}}function x(){return globalThis.__piSessionContextCache||(globalThis.__piSessionContextCache={map:new Map,order:[]}),globalThis.__piSessionContextCache}function y(a,b){let c=x(),d=c.map.get(a);if(!d)return null;if(d.mtime!==b){c.map.delete(a);let b=c.order.indexOf(a);return b>-1&&c.order.splice(b,1),null}let e=c.order.indexOf(a);return e>-1&&c.order.splice(e,1),c.order.push(a),d}function z(a,b){let c=x(),d=c.map.has(a);if(!d&&c.order.length>=16){let a=c.order.shift();a&&c.map.delete(a)}if(c.map.set(a,b),d){let b=c.order.indexOf(a);b>-1&&c.order.splice(b,1),c.order.push(a)}else c.order.push(a)}function A(a){let b=x();b.map.delete(a);let c=b.order.indexOf(a);c>-1&&b.order.splice(c,1)}[e,g,h,l]=n.then?(await n)():n,d()}catch(a){d(a)}})},47240:(a,b,c)=>{c.d(b,{g:()=>d});function d(a,b){let c,d=new Map;for(let b of a)d.set(b.id,b);if(b&&(c=d.get(b)),c||(c=a[a.length-1]),!c)return[];let e=[],f=c;for(;f;)e.unshift(f),f=f.parentId?d.get(f.parentId):void 0;let g=[];for(let a=0;a<e.length;a++){let b=e[a];if("compaction"!==b.type)continue;let c=b.firstKeptEntryId??"",d=c?e.findIndex((b,d)=>d<a&&b.id===c):-1,f=d>=0?d:a,h=[],i=[];for(let a=0;a<f;a++){let b=e[a];"message"===b.type&&b.message&&(h.push(b.message),i.push(b.id))}h.length>0&&g.push({compactionEntryId:b.id,firstKeptEntryId:c,messages:h,entryIds:i})}return g}},74788:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{LN:()=>s,Of:()=>t,U5:()=>q,oR:()=>r,tS:()=>p});var e=c(29021),f=c(55511),g=c(33873),h=c(75430),i=c(16185),j=c(91179),k=a([h,i,j]);[h,i,j]=k.then?(await k)():k;let v=(0,g.join)((0,h.getAgentDir)(),"annovibe-session-meta.json"),w=(0,i.vo)(),x=null;function l(a){return(0,i.je)(a)}function m(){(0,e.existsSync)(w)||(0,e.mkdirSync)(w,{recursive:!0})}function n(a,b){m();let c=l(a),d=`${c}.${(0,f.randomUUID)().slice(0,8)}.tmp`;(0,e.writeFileSync)(d,JSON.stringify(b)),(0,e.renameSync)(d,c),x=null}if((0,e.existsSync)(v))try{m();let a=JSON.parse((0,e.readFileSync)(v,"utf-8"));for(let[b,c]of Object.entries(a)){let a=u(c);if(!a)continue;let d=l(b);(0,e.existsSync)(d)||n(b,a)}(0,e.renameSync)(v,`${v}.migrated`)}catch{}function o(a,b){a?(0,j.fd)(a):(0,j.xm)(b)}function p(a={}){if(!a.force&&x)return x;if(!(0,e.existsSync)(w))return x={};let b={};try{for(let a of(0,e.readdirSync)(w)){if(!a.endsWith(".json")||a.endsWith(".tmp"))continue;let c=a.slice(0,-5);try{let d=JSON.parse((0,e.readFileSync)((0,g.join)(w,a),"utf-8")),f=u(d);f&&(b[c]=f)}catch{}}}catch{}return x=b,b}function q(a){let b=l(a);if(!(0,e.existsSync)(b))return null;try{let a=JSON.parse((0,e.readFileSync)(b,"utf-8"));return u(a)}catch{return null}}async function r(a,b,c={}){n(a,b),o(c.cwd,a)}async function s(a,b,c={}){let d=q(a);d&&(n(a,{...d,...b}),o(c.cwd,a))}async function t(a,b={}){let c=l(a);if((0,e.existsSync)(c))try{(0,e.unlinkSync)(c),x=null,o(b.cwd,a)}catch{}}function u(a){let b;if(!a||"object"!=typeof a)return null;let c="workbench"===a.sessionKind||"chat"===a.sessionKind?a.sessionKind:null;if(!c)return null;let d="launcher"===a.createdBy||"fork"===a.createdBy||"manual"===a.createdBy?a.createdBy:"manual",e=Array.isArray(a.lastToolNames)?a.lastToolNames.filter(a=>"string"==typeof a):[],f="string"==typeof a.createdAt?a.createdAt:new Date().toISOString(),g="string"==typeof a.initialSourcePath&&a.initialSourcePath?a.initialSourcePath:void 0,h="r"===a.initialKernel||"python"===a.initialKernel?a.initialKernel:void 0,i="string"==typeof a.initialKernelId&&a.initialKernelId?a.initialKernelId:void 0,j="string"==typeof a.initialKernelDisplayName&&a.initialKernelDisplayName?a.initialKernelDisplayName:void 0;if(a.goal&&"object"==typeof a.goal){let c=a.goal;"string"==typeof c.id&&"string"==typeof c.objective&&"string"==typeof c.status&&(b={id:c.id,objective:c.objective,status:c.status,tokenBudget:"number"==typeof c.tokenBudget?c.tokenBudget:void 0,tokensUsed:"number"==typeof c.tokensUsed?c.tokensUsed:0,timeUsedSeconds:"number"==typeof c.timeUsedSeconds?c.timeUsedSeconds:0,createdAt:"number"==typeof c.createdAt?c.createdAt:Date.now(),updatedAt:"number"==typeof c.updatedAt?c.updatedAt:Date.now()})}return{sessionKind:c,lastToolNames:e,createdBy:d,createdAt:f,initialSourcePath:g,initialKernel:h,initialKernelId:i,initialKernelDisplayName:j,goal:b}}d()}catch(a){d(a)}})}};
3
+ ${a.summary??""}`,timestamp:a.timestamp}:(0,f.B)(a)),entryIds:l,thinkingLevel:i.thinkingLevel,model:i.model,compactions:m.length>0?m:void 0}}function z(){return globalThis.__piSessionContextCache||(globalThis.__piSessionContextCache={map:new Map,order:[]}),globalThis.__piSessionContextCache}function A(a,b){let c=z(),d=c.map.get(a);if(!d)return null;if(d.mtime!==b){c.map.delete(a);let b=c.order.indexOf(a);return b>-1&&c.order.splice(b,1),null}let e=c.order.indexOf(a);return e>-1&&c.order.splice(e,1),c.order.push(a),d}function B(a,b){let c=z(),d=c.map.has(a);if(!d&&c.order.length>=16){let a=c.order.shift();a&&c.map.delete(a)}if(c.map.set(a,b),d){let b=c.order.indexOf(a);b>-1&&c.order.splice(b,1),c.order.push(a)}else c.order.push(a)}function C(a){let b=z();b.map.delete(a);let c=b.order.indexOf(a);c>-1&&b.order.splice(c,1)}[e,g,h,l]=n.then?(await n)():n,d()}catch(a){d(a)}})},47240:(a,b,c)=>{c.d(b,{g:()=>d});function d(a,b){let c,d=new Map;for(let b of a)d.set(b.id,b);if(b&&(c=d.get(b)),c||(c=a[a.length-1]),!c)return[];let e=[],f=c;for(;f;)e.unshift(f),f=f.parentId?d.get(f.parentId):void 0;let g=[];for(let a=0;a<e.length;a++){let b=e[a];if("compaction"!==b.type)continue;let c=b.firstKeptEntryId??"",d=c?e.findIndex((b,d)=>d<a&&b.id===c):-1,f=d>=0?d:a,h=[],i=[];for(let a=0;a<f;a++){let b=e[a];"message"===b.type&&b.message&&(h.push(b.message),i.push(b.id))}h.length>0&&g.push({compactionEntryId:b.id,firstKeptEntryId:c,messages:h,entryIds:i})}return g}},74788:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{LN:()=>s,Of:()=>t,U5:()=>q,oR:()=>r,tS:()=>p});var e=c(29021),f=c(55511),g=c(33873),h=c(75430),i=c(16185),j=c(91179),k=a([h,i,j]);[h,i,j]=k.then?(await k)():k;let v=(0,g.join)((0,h.getAgentDir)(),"annovibe-session-meta.json"),w=(0,i.vo)(),x=null;function l(a){return(0,i.je)(a)}function m(){(0,e.existsSync)(w)||(0,e.mkdirSync)(w,{recursive:!0})}function n(a,b){m();let c=l(a),d=`${c}.${(0,f.randomUUID)().slice(0,8)}.tmp`;(0,e.writeFileSync)(d,JSON.stringify(b)),(0,e.renameSync)(d,c),x=null}if((0,e.existsSync)(v))try{m();let a=JSON.parse((0,e.readFileSync)(v,"utf-8"));for(let[b,c]of Object.entries(a)){let a=u(c);if(!a)continue;let d=l(b);(0,e.existsSync)(d)||n(b,a)}(0,e.renameSync)(v,`${v}.migrated`)}catch{}function o(a,b){a?(0,j.fd)(a):(0,j.xm)(b)}function p(a={}){if(!a.force&&x)return x;if(!(0,e.existsSync)(w))return x={};let b={};try{for(let a of(0,e.readdirSync)(w)){if(!a.endsWith(".json")||a.endsWith(".tmp"))continue;let c=a.slice(0,-5);try{let d=JSON.parse((0,e.readFileSync)((0,g.join)(w,a),"utf-8")),f=u(d);f&&(b[c]=f)}catch{}}}catch{}return x=b,b}function q(a){let b=l(a);if(!(0,e.existsSync)(b))return null;try{let a=JSON.parse((0,e.readFileSync)(b,"utf-8"));return u(a)}catch{return null}}async function r(a,b,c={}){n(a,b),o(c.cwd,a)}async function s(a,b,c={}){let d=q(a);d&&(n(a,{...d,...b}),o(c.cwd,a))}async function t(a,b={}){let c=l(a);if((0,e.existsSync)(c))try{(0,e.unlinkSync)(c),x=null,o(b.cwd,a)}catch{}}function u(a){let b;if(!a||"object"!=typeof a)return null;let c="workbench"===a.sessionKind||"chat"===a.sessionKind?a.sessionKind:null;if(!c)return null;let d="launcher"===a.createdBy||"fork"===a.createdBy||"manual"===a.createdBy?a.createdBy:"manual",e=Array.isArray(a.lastToolNames)?a.lastToolNames.filter(a=>"string"==typeof a):[],f="string"==typeof a.createdAt?a.createdAt:new Date().toISOString(),g="string"==typeof a.initialSourcePath&&a.initialSourcePath?a.initialSourcePath:void 0,h="r"===a.initialKernel||"python"===a.initialKernel?a.initialKernel:void 0,i="string"==typeof a.initialKernelId&&a.initialKernelId?a.initialKernelId:void 0,j="string"==typeof a.initialKernelDisplayName&&a.initialKernelDisplayName?a.initialKernelDisplayName:void 0;if(a.goal&&"object"==typeof a.goal){let c=a.goal;"string"==typeof c.id&&"string"==typeof c.objective&&"string"==typeof c.status&&(b={id:c.id,objective:c.objective,status:c.status,tokenBudget:"number"==typeof c.tokenBudget?c.tokenBudget:void 0,tokensUsed:"number"==typeof c.tokensUsed?c.tokensUsed:0,timeUsedSeconds:"number"==typeof c.timeUsedSeconds?c.timeUsedSeconds:0,createdAt:"number"==typeof c.createdAt?c.createdAt:Date.now(),updatedAt:"number"==typeof c.updatedAt?c.updatedAt:Date.now()})}return{sessionKind:c,lastToolNames:e,createdBy:d,createdAt:f,initialSourcePath:g,initialKernel:h,initialKernelId:i,initialKernelDisplayName:j,goal:b}}d()}catch(a){d(a)}})}};
@@ -139,7 +139,7 @@ ${h.content}
139
139
 
140
140
  ${j}`:j}},34429:(a,b,c)=>{"use strict";c.d(b,{O:()=>f});let d=/\bstream(?:[_\s-]+)read(?:[_\s-]+)error\b/i,e=new WeakSet;function f(a){if(e.has(a))return!0;let b=a._isRetryableError;return"function"==typeof b&&(a._isRetryableError=function(a){return!!a&&"object"==typeof a&&"error"===a.stopReason&&"string"==typeof a.errorMessage&&d.test(a.errorMessage)||b.call(this,a)},e.add(a),!0)}},36945:(a,b,c)=>{"use strict";function d(a){if(!a.afterEventId)return{afterSequence:void 0,replayGap:!1};let b=a.afterEventId.lastIndexOf(":"),c=b>0?a.afterEventId.slice(0,b):"",d=b>0?Number(a.afterEventId.slice(b+1)):NaN;if(c!==a.streamEpoch||!Number.isSafeInteger(d))return{afterSequence:void 0,replayGap:!0};let e=a.events.length>0?Number(a.events[0].__eventSequence):a.nextSequence;return!Number.isSafeInteger(e)||d<e-1?{afterSequence:void 0,replayGap:!0}:{afterSequence:d,replayGap:!1}}c.d(b,{Z:()=>d})},39773:(a,b,c)=>{"use strict";c.d(b,{X:()=>g,w:()=>f});var d=c(55511);let e=new Map;function f(a){let b=(0,d.randomUUID)().replace(/-/g,"").slice(0,24);return e.set(b,{...a,token:b,expiresAt:Date.now()+18e5}),b}function g(a){let b=e.get(a);return b?Date.now()>b.expiresAt?(e.delete(a),null):b:null}setInterval(()=>{let a=Date.now();for(let[b,c]of e)a>c.expiresAt&&e.delete(b)},3e5)},41761:(a,b,c)=>{"use strict";c.d(b,{C1:()=>e,lA:()=>d});let d="subagent",e=["bash","read","edit","write","grep","find","ls"];[...e],[...e]},44036:(a,b,c)=>{"use strict";c.d(b,{FJ:()=>g,R4:()=>h,X8:()=>f});let d="<workbench-guidelines>\nAnnoVibe Workbench is active. Use it for reproducible R/Python analysis plots, data visualizations, and warm-runtime analysis work.\n\nTool routing:\n- Use `kernel_plot_render` for one-shot iterative plot previews — images auto-render inline in chat without saving files. Call `render_plot()` to mark the preview target. ggplot2 (R) and plt.show() (Python) are auto-captured as convenience.\n- Use `kernel_plot_inspect` after resuming a workbench session, after suspected kernel restart, or whenever you are unsure whether objects like `adata`/`seurat_obj` are still live in memory.\n- Use `kernel_plot_run` when plots depend on data already loaded in warm kernel memory, or when saving final artifacts to disk.\n- Use `runtime: \"kernel-lite\"` in `kernel_plot_run` when variables or loaded data should persist across turns.\n- Use `runtime: \"worker\"` for one-shot scripts that should be isolated.\n- Do not run Rscript/python plotting through `bash` unless the workbench tools are unavailable.\n- Do not use bash with `conda run python`, `Rscript`, or direct interpreter calls for analysis code — always prefer `kernel_plot_run`.\n\nkernel-lite memory rules — CRITICAL:\n- Packages imported (import scanpy, library(Seurat), etc.) and variables assigned in one kernel_plot_run call persist while the same kernel-lite runtime is alive. Do NOT repeat imports in every call. Import each package only once, in the first call that needs it.\n- Large data objects loaded via sc.read(), readRDS(), qread(), pd.read_csv(), etc. stay in memory while the warm kernel is alive. Before calling any load function, check whether the object already exists:\n Python: `if 'adata' not in globals(): adata = sc.read(path)`\n R: `if (!exists('seurat_obj')) seurat_obj <- readRDS(path)`\n Print a brief note when reusing in-memory data vs loading fresh.\n- Do NOT put sc.read() / readRDS() / qread() at the top of every call. This reloads multi-GB files needlessly and is the #1 performance mistake in workbench sessions.\n- After browser refreshes, model switches, compaction, or a resumed workbench session, treat prior history as inferred only: first use `kernel_plot_inspect` or an explicit existence check to see whether required objects still exist, then reload only missing objects from the known source path.\n\nWorkbench artifact rules:\n- Save every output under `WARMPLOT_OUTPUT_DIR` or `PI_KERNEL_PLOT_OUTPUT_DIR`.\n- Create a primary PNG/JPEG/WebP preview for chat display whenever a figure is produced, not PDF-only output. Keep the preview reasonably sized so it can be embedded inline.\n- If a publication-quality PDF/SVG is needed, save it in addition to the preview image.\n- Name the primary preview clearly, for example `00_preview.png`, so it is easy to identify.\n- When the user asks to save final outputs to a specific project directory, use that directory (not WARMPLOT_OUTPUT_DIR) for the final artifacts.\n\nChat display rules:\n- The web chat renders returned image artifacts inline. Do not say that images cannot be displayed.\n- Do not use `open`, `xdg-open`, or desktop viewers to show plots.\n- After generating any plot, make the chat response displayable by including the PNG/JPEG/WebP preview path in the final answer or by returning it as a tool image artifact. Do not mention only PDF paths when an image preview exists.\n- When using shell tools for plotting, still save a PNG/JPEG/WebP preview and include that preview path in the final answer; avoid a final answer that only says a desktop window was opened.\n- When the user asks to show an existing PNG/JPEG/WebP file, use `read` on that image path; the UI will display the image even if the model cannot inspect pixels.\n- If only a PDF exists and the user asks to see it in chat, generate a PNG preview with `kernel_plot_run` or report the PDF path only if conversion is not practical.\n- After a successful plot, summarize the result briefly and include both preview image paths and any publication-quality PDF/SVG paths.\n</workbench-guidelines>",e=/\n?\s*(?:<plot-mode-guidelines>[\s\S]*?<\/plot-mode-guidelines>|<workbench-guidelines>[\s\S]*?<\/workbench-guidelines>)\s*/g;function f(a){return a.replace(e,"\n").replace(/\n{3,}/g,"\n\n").trim()}function g(a){return a.includes("<plot-mode-guidelines>")||a.includes("<workbench-guidelines>")?a:a.trim()?`${a.trimEnd()}
141
141
 
142
- ${d}`:d}function h(a){for(let b of a)if("kernel_plot_run"===b)return!0;return!1}},56429:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{A4:()=>J,Bj:()=>P,Fn:()=>M,HG:()=>K,OF:()=>Q,V$:()=>N,dU:()=>U,kp:()=>A});var e=c(75430),f=c(40402),g=c(9774),h=c(3867),i=c(85097),j=c(11745),k=c(9805),l=c(27348),m=c(44036),n=c(66469),o=c(29021),p=c(33873),q=c(55511),r=c(7048),s=c(41761),t=c(74788),u=c(91179),v=c(57149),w=c(60103),x=c(36945),y=c(34429),z=a([e,f,g,h,i,j,t,u]);[e,f,g,h,i,j,t,u]=z.then?(await z)():z;class R extends Error{constructor(a){super(`Session ${a} is already processing another command`),this.code="SESSION_BUSY",this.name="SessionBusyError"}}function A(a){return a instanceof R||!!a&&"object"==typeof a&&"SESSION_BUSY"===a.code}class S extends Error{constructor(a,b){super(b),this.reason=a,this.code="COMPACTION_ERROR",this.name="CompactionError"}}let T=s.C1;class U{constructor(a,b,c={}){this.inner=a,this.modelRegistry=b,this.options=c,this.listeners=[],this.replayEvents=[],this.unsubscribe=null,this.idleTimer=null,this.onDestroyCallback=null,this.busyOperations=new Set,this.activeTools=new Map,this.currentRuntimePhase="idle",this.phaseStartedAtMs=null,this.promptRunId=0,this.activePromptRunId=null,this.abortedPromptRunId=0,this.runStartedAtMs=null,this.firstModelEventAtMs=null,this.lastEventAtMs=null,this.lastEventType=null,this.lastErrorMessage=null,this.streamEpoch=(0,q.randomUUID)(),this.nextEventId=1,this._alive=!0,this._lastAppliedPromptKey="",this._kernelStateCache=null,(0,y.O)(a)}get sessionId(){return this.inner.sessionId}get sessionFile(){return this.inner.sessionFile??""}isAlive(){return this._alive}isBusy(){return this.busyOperations.size>0||this.inner.isStreaming||this.inner.isCompacting}getRuntimeStatus(){let a=Date.now(),b=this.getPhase(),c=this.inner.model?{provider:this.inner.model.provider,id:this.inner.model.id}:null;return{sessionId:this.sessionId,sessionFile:this.sessionFile,cwd:D(this.inner),busy:this.isBusy(),operations:[...this.busyOperations],isStreaming:this.inner.isStreaming,isCompacting:this.inner.isCompacting,phase:b,model:c,activeTools:[...this.activeTools.entries()].map(([a,b])=>({id:a,name:b})),runStartedAt:E(this.runStartedAtMs),firstModelEventAt:E(this.firstModelEventAtMs),lastEventAt:E(this.lastEventAtMs),lastEventType:this.lastEventType,uptimeMs:this.runStartedAtMs?Math.max(0,a-this.runStartedAtMs):null,waitingForModelMs:"waiting_model"===b&&this.phaseStartedAtMs?Math.max(0,a-this.phaseStartedAtMs):null,pendingMessageCount:"number"==typeof this.inner.pendingMessageCount?this.inner.pendingMessageCount:null,errorMessage:this.lastErrorMessage}}start(){this.unsubscribe=this.inner.subscribe(a=>{"message_end"===a.type?queueMicrotask(()=>this.forwardEvent(this.withLatestEntryId(a))):"agent_end"===a.type?queueMicrotask(()=>this.forwardEvent(a)):this.forwardEvent(a)}),this.resetIdleTimer(),O()}forwardEvent(a){let b=null!==this.activePromptRunId&&void 0===a.__runId?{...a,__runId:this.activePromptRunId}:a;this.recordRuntimeEvent(b),("message_end"===a.type||"compaction_end"===a.type||"auto_compaction_end"===a.type)&&this.bumpSessionCwd();let c=this.sequenceEvent(b);for(let b of(this.bufferReplayEvent(c),this.resetIdleTimer(),("agent_end"===a.type||"agent_start"===a.type)&&O(),this.listeners))b(c)}withLatestEntryId(a){let b=a.message;if(!b||"user"!==b.role&&"assistant"!==b.role&&"toolResult"!==b.role)return a;try{let c=this.inner.sessionManager.getEntries(),d=JSON.stringify(b);for(let b=c.length-1;b>=0;b--){let e=c[b];if("message"===e.type&&"string"==typeof e.id&&JSON.stringify(e.message)===d)return{...a,__entryId:e.id}}}catch{}let c=function(a){let b="string"==typeof a.role?a.role:null;if(!b)return null;let c="number"==typeof a.timestamp?a.timestamp:0,d=0;try{let b=JSON.stringify(a.content??"");for(let a=0;a<b.length;a++)d=(d<<5)-d+b.charCodeAt(a)|0}catch{}return`synth:${b}:${c}:${(d>>>0).toString(36)}`}(b);return c?{...a,__entryId:c}:a}resetIdleTimer(){this.idleTimer&&clearTimeout(this.idleTimer),this.idleTimer=setTimeout(()=>{this.isBusy()?this.resetIdleTimer():this.destroy()},6e5)}sequenceEvent(a){"string"!=typeof this.streamEpoch&&(this.streamEpoch=(0,q.randomUUID)());let b=Number.isSafeInteger(this.nextEventId)?this.nextEventId:1;return this.nextEventId=b+1,{...a,__eventId:`${this.streamEpoch}:${b}`,__eventSequence:b,__streamEpoch:this.streamEpoch}}bufferReplayEvent(a){"agent_start"===a.type&&(this.replayEvents=[]),this.replayEvents.push(a),this.replayEvents.length>200&&this.replayEvents.splice(0,this.replayEvents.length-200)}onEvent(a,b={}){if(this.listeners.push(a),b.replay){let c=(0,x.Z)({streamEpoch:this.streamEpoch,nextSequence:this.nextEventId,events:this.replayEvents,afterEventId:b.afterEventId}),{afterSequence:d}=c;for(let e of(c.replayGap&&(a({type:"replay_gap",requestedAfter:b.afterEventId,streamEpoch:this.streamEpoch,oldestEventId:this.replayEvents[0]?.__eventId??null}),d=void 0),this.replayEvents)){let b="number"==typeof e.__eventSequence?e.__eventSequence:0;(void 0===d||b>d)&&a(e)}}return()=>{let b=this.listeners.indexOf(a);-1!==b&&this.listeners.splice(b,1)}}onDestroy(a){this.onDestroyCallback=a}async send(a){this.resetIdleTimer();let b=a.type;switch(b){case"prompt":{if(null!==this.activePromptRunId||this.isBusy())throw new R(this.sessionId);Number.isSafeInteger(this.promptRunId)||(this.promptRunId=0);let b=++this.promptRunId;this.activePromptRunId=b,this.busyOperations.add("prompt"),this.setRuntimePhase("waiting_model"),this.resetIdleTimer(),this.replayEvents=[],this.emit({type:"prompt_admitted",__runId:b}),O();try{let c="string"==typeof a.leafId&&a.leafId.trim()?a.leafId:null;if(c&&this.inner.sessionManager.getLeafId()!==c&&(await this.inner.navigateTree(c,{})).cancelled)throw Error(`Failed to navigate session to leaf ${c}`);if("string"==typeof a.provider&&"string"==typeof a.modelId&&await this.applyModelSelection(a.provider,a.modelId),"string"==typeof a.thinkingLevel&&this.applyThinkingLevel(a.thinkingLevel),Array.isArray(a.toolNames)){let b=this.filterAvailableToolNames(a.toolNames);this.inner.setActiveToolsByName(b)}this.preparePromptContext(a.message);let d=a.images,e=this.inner.model?.input,f=!e||0===e.length||e.includes("image")?d:void 0;return this.inner.prompt(a.message,f?.length?{images:f}:void 0).then(()=>{this.emit({type:"prompt_done",__runId:b})}).catch(a=>{this.abortedPromptRunId!==b&&this.emit({type:"prompt_error",__runId:b,error:a instanceof Error?a.message:String(a)})}).finally(()=>this.finishPromptRun(b)),{runId:b}}catch(a){throw this.emit({type:"prompt_error",__runId:b,error:a instanceof Error?a.message:String(a)}),this.finishPromptRun(b),a}}case"abort":return this.abortedPromptRunId=this.promptRunId,await this.inner.abort(),null;case"get_state":{let a=this.inner.model,b=this.inner.getContextUsage(),c=this.inner.agent.state?.systemPrompt??"",d=(0,g.cV)(),e=(0,t.U5)(this.inner.sessionId),f=this.getRuntimeStatus();return{sessionId:this.inner.sessionId,sessionFile:this.inner.sessionFile??"",isStreaming:this.inner.isStreaming,isCompacting:this.inner.isCompacting,autoCompactionEnabled:this.inner.autoCompactionEnabled,autoRetryEnabled:this.inner.autoRetryEnabled,model:a?{id:a.id,provider:a.provider}:void 0,messageCount:0,pendingMessageCount:0,phase:f.phase,activeTools:f.activeTools,lastEventAt:f.lastEventAt,lastEventType:f.lastEventType,errorMessage:f.errorMessage,goal:e?.goal??null,contextUsage:b?{percent:b.percent,contextWindow:b.contextWindow,tokens:b.tokens}:null,systemPrompt:d.generativeUI?c:(0,k.FE)(c),thinkingLevel:this.inner.agent.state?.thinkingLevel??"off"}}case"set_model":{if(this.isBusy())throw new R(this.sessionId);let{provider:b,modelId:c}=a,d=await this.applyModelSelection(b,c);return{id:d.id,provider:d.provider,thinkingLevel:this.inner.agent.state?.thinkingLevel??"off"}}case"fork":{let b;if(this.isBusy())throw new R(this.sessionId);let c=a.entryId,d=this.inner.sessionManager,g=this.inner.sessionFile;if(!d.isPersisted())return{cancelled:!0};if(!g)throw Error("Persisted session is missing a session file");let h=d.getEntry(c);if(!h)throw Error("Invalid entry ID for forking");let i=d.getSessionDir();if(h.parentId){let a=e.SessionManager.open(g,i).createBranchedSession(h.parentId);if(!a)throw Error("Failed to create forked session");b=a}else{let a=e.SessionManager.create(d.getCwd(),i);a.newSession({parentSession:g}),b=a.getSessionFile()}let j=e.SessionManager.open(b,i).getSessionId();(0,f.O8)(j,b);let k=D(this.inner),l=(0,t.U5)(this.sessionId);return l&&await (0,t.oR)(j,{...l,createdBy:"fork",createdAt:new Date().toISOString()},k?{cwd:k}:{}),this.destroy(),k&&((0,u.fd)(k),(0,u.E8)()),{cancelled:!1,newSessionId:j}}case"navigate_tree":if(this.isBusy())throw new R(this.sessionId);return{cancelled:(await this.inner.navigateTree(a.targetId,{})).cancelled};case"set_thinking_level":if(this.isBusy())throw new R(this.sessionId);return this.applyThinkingLevel(a.level),null;case"compact":{let b;if(this.isBusy())throw new R(this.sessionId);let{findCutPoint:d,DEFAULT_COMPACTION_SETTINGS:e}=await Promise.resolve().then(c.bind(c,75430)),f=this.inner.sessionManager.getBranch(),g={...e,...this.inner.settingsManager.getCompactionSettings()},h=-1;for(let a=f.length-1;a>=0;a--)if("compaction"===f[a].type){h=a;break}let i=h+1,j=d(f,i,f.length,g.keepRecentTokens);if((j.isSplitTurn?j.turnStartIndex:j.firstKeptEntryIndex)<=i)throw new S("too-short","Conversation is too short to compact");try{b=await this.trackBusy("compact",this.inner.compact(a.customInstructions))}catch(c){let a,b;throw(b=(a=c instanceof Error?c.message:String(c)).toLowerCase()).includes("already compacted")?new S("already-compacted","This session has already been compacted"):b.includes("too small")||b.includes("nothing to compact")||b.includes("too short")?new S("too-short","Conversation is too short to compact"):b.includes("cancelled")||b.includes("abort")?new S("cancelled","Compaction was cancelled"):new S("failed",a||"Compaction failed")}let k=b;return{tokensBefore:"number"==typeof k?.tokensBefore?k.tokensBefore:null,tokensAfter:"number"==typeof k?.estimatedTokensAfter?k.estimatedTokensAfter:null,reducedBy:"number"==typeof k?.tokensBefore&&"number"==typeof k?.estimatedTokensAfter?Math.max(0,k.tokensBefore-k.estimatedTokensAfter):null}}case"set_auto_compaction":return this.inner.setAutoCompactionEnabled(a.enabled),null;case"steer":{this.preparePromptContext(a.message);let b=a.images,c=this.inner.model?.input,d=!c||0===c.length||c.includes("image")?b:void 0;return await this.trackBusy("steer",this.inner.steer(a.message,d?.length?d:void 0)),null}case"follow_up":{this.preparePromptContext(a.message);let b=a.images,c=this.inner.model?.input,d=!c||0===c.length||c.includes("image")?b:void 0;return await this.trackBusy("follow_up",this.inner.followUp(a.message,d?.length?d:void 0)),null}case"get_tools":{let a=this.inner.getAllTools(),b=new Set(this.inner.getActiveToolNames());return a.map(a=>({name:a.name,description:a.description,active:b.has(a.name)}))}case"set_tools":{if(this.isBusy())throw new R(this.sessionId);let b=this.filterAvailableToolNames(a.toolNames);return this.inner.setActiveToolsByName(b),this.applyRuntimePrompts(),(0,t.LN)(this.sessionId,{lastToolNames:this.inner.getActiveToolNames()}).catch(()=>{}),null}case"abort_compaction":return this.inner.abortCompaction(),null;case"append_message":{if(this.isBusy())throw new R(this.sessionId);let b=a.message;if("string"!=typeof b||!b.trim())return null;if(!this.inner.sendCustomMessage)throw Error("Session does not support append_message");return await this.inner.sendCustomMessage({customType:"string"==typeof a.customType&&a.customType?a.customType:"context-note",content:b,display:"boolean"!=typeof a.display||a.display},{triggerTurn:!1}),null}case"set_auto_retry":return this.inner.setAutoRetryEnabled(a.enabled),null;default:throw Error(`Unsupported command: ${b}`)}}destroy(){this._alive&&(this._alive=!1,this.idleTimer&&clearTimeout(this.idleTimer),this.unsubscribe?.(),this.onDestroyCallback?.(),O())}bumpSessionCwd(){let a=D(this.inner);a&&(0,u.fd)(a)}async applyModelSelection(a,b){let c=this.modelRegistry.find(a,b);if(!c){let d=a.toLowerCase().replace(/-/g,"");d!==a&&(c=this.modelRegistry.find(d,b))}if(!c)throw Error(`Model not found: ${a}/${b}`);return await this.inner.setModel(c),c}applyThinkingLevel(a){this.inner.setThinkingLevel(a),"xhigh"===a&&this.inner.model?.compat?.thinkingFormat==="deepseek"&&this.inner.agent?.state&&(this.inner.agent.state.thinkingLevel="xhigh")}preparePromptContext(a){this.applyRuntimePrompts(a)}finishPromptRun(a){this.activePromptRunId===a&&(this.activePromptRunId=null,this.busyOperations.delete("prompt"),this.isBusy()||this.setRuntimePhase("idle"),this.resetIdleTimer(),O())}async trackBusy(a,b){this.busyOperations.add(a),this.setRuntimePhase("compact"===a?"compacting":"waiting_model"),this.resetIdleTimer(),O();try{return await b}finally{this.busyOperations.delete(a),this.isBusy()||this.setRuntimePhase("idle"),this.resetIdleTimer(),O()}}setRuntimePhase(a,b=Date.now()){this.currentRuntimePhase!==a&&(this.currentRuntimePhase=a,this.phaseStartedAtMs="idle"===a?null:b)}getPhase(){if(this.inner.isCompacting||this.busyOperations.has("compact"))return"compacting";if(this.activeTools.size>0)return"running_tools";if(this.isBusy()){let a=this.currentRuntimePhase;return a&&"idle"!==a?a:"waiting_model"}return"idle"}emit(a){let b=this.sequenceEvent(a);for(let a of(this.bufferReplayEvent(b),this.listeners))a(b)}recordRuntimeEvent(a){let b=Date.now();switch(this.lastEventAtMs=b,this.lastEventType=a.type,a.type){case"agent_start":this.runStartedAtMs=b,this.firstModelEventAtMs=null,this.lastErrorMessage=null,this.activeTools.clear(),this.setRuntimePhase("waiting_model",b);break;case"message_start":case"message_update":{let c=a.message;c?.role==="assistant"?(this.firstModelEventAtMs||(this.firstModelEventAtMs=b),"string"==typeof c.errorMessage&&(this.lastErrorMessage=c.errorMessage),this.setRuntimePhase("streaming",b)):c?.role==="user"&&this.setRuntimePhase("waiting_model",b);break}case"message_end":{let c=a.message;c?.role==="assistant"&&"string"==typeof c.errorMessage&&(this.lastErrorMessage=c.errorMessage),this.setRuntimePhase("waiting_model",b);break}case"tool_execution_start":{let c="string"==typeof a.toolCallId?a.toolCallId:"",d="string"==typeof a.toolName?a.toolName:"tool";c&&this.activeTools.set(c,d),this.setRuntimePhase("running_tools",b);break}case"tool_execution_end":{let c="string"==typeof a.toolCallId?a.toolCallId:"";c&&this.activeTools.delete(c),this.setRuntimePhase(this.activeTools.size>0?"running_tools":"waiting_model",b);break}case"auto_retry_start":this.setRuntimePhase("waiting_model",b);break;case"compaction_start":case"auto_compaction_start":this.setRuntimePhase("compacting",b);break;case"compaction_end":case"auto_compaction_end":this.setRuntimePhase(this.isBusy()?"waiting_model":"idle",b);break;case"agent_end":this.activeTools.clear(),!0===a.willRetry?this.setRuntimePhase("waiting_model",b):(this.setRuntimePhase("idle",b),this.runStartedAtMs=null,this.firstModelEventAtMs=null)}}applyRuntimePrompts(a){if(!this.inner.agent.state||this.options.systemPromptDisabled)return;let b=(0,g.cV)(),c=this.inner.getActiveToolNames(),d=(0,m.R4)(c),e=B(this.inner),f=0;if(this.sessionFile)try{f=(0,o.statSync)(this.sessionFile).mtimeMs}catch{f=0}let h=null;if(d&&this.sessionFile)if(this._kernelStateCache&&this._kernelStateCache.mtime===f)h=this._kernelStateCache.summary;else{let a=(0,w.f)(this.sessionFile);a?(h=(0,w.v)(a),this._kernelStateCache={mtime:f,summary:h}):this._kernelStateCache=null}else this._kernelStateCache=null;let i=h?`|mtime=${f}`:"",j=a??"",n=`${d}|${b.generativeUI}|${j.length>0?"msg":"no-msg"}${i}`;if(this._lastAppliedPromptKey===n&&e.length>0)return;if(!b.generativeUI){let a=(0,m.X8)((0,k.FE)(e)),b=F(a,d),c=h?`${b}
142
+ ${d}`:d}function h(a){for(let b of a)if("kernel_plot_run"===b)return!0;return!1}},56429:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{A4:()=>J,Bj:()=>P,Fn:()=>M,HG:()=>K,OF:()=>Q,V$:()=>N,dU:()=>U,kp:()=>A});var e=c(75430),f=c(40402),g=c(9774),h=c(3867),i=c(85097),j=c(11745),k=c(9805),l=c(27348),m=c(44036),n=c(66469),o=c(29021),p=c(33873),q=c(55511),r=c(7048),s=c(41761),t=c(74788),u=c(91179),v=c(57149),w=c(60103),x=c(36945),y=c(34429),z=a([e,f,g,h,i,j,t,u]);[e,f,g,h,i,j,t,u]=z.then?(await z)():z;class R extends Error{constructor(a){super(`Session ${a} is already processing another command`),this.code="SESSION_BUSY",this.name="SessionBusyError"}}function A(a){return a instanceof R||!!a&&"object"==typeof a&&"SESSION_BUSY"===a.code}class S extends Error{constructor(a,b){super(b),this.reason=a,this.code="COMPACTION_ERROR",this.name="CompactionError"}}let T=s.C1;class U{constructor(a,b,c={}){this.inner=a,this.modelRegistry=b,this.options=c,this.listeners=[],this.replayEvents=[],this.unsubscribe=null,this.idleTimer=null,this.onDestroyCallback=null,this.busyOperations=new Set,this.activeTools=new Map,this.currentRuntimePhase="idle",this.phaseStartedAtMs=null,this.promptRunId=0,this.activePromptRunId=null,this.abortedPromptRunId=0,this.runStartedAtMs=null,this.firstModelEventAtMs=null,this.lastEventAtMs=null,this.lastEventType=null,this.lastErrorMessage=null,this.streamEpoch=(0,q.randomUUID)(),this.nextEventId=1,this._alive=!0,this._lastAppliedPromptKey="",this._kernelStateCache=null,(0,y.O)(a)}get sessionId(){return this.inner.sessionId}get sessionFile(){return this.inner.sessionFile??""}isAlive(){return this._alive}isBusy(){return this.busyOperations.size>0||this.inner.isStreaming||this.inner.isCompacting}getRuntimeStatus(){let a=Date.now(),b=this.getPhase(),c=this.inner.model?{provider:this.inner.model.provider,id:this.inner.model.id}:null;return{sessionId:this.sessionId,sessionFile:this.sessionFile,cwd:D(this.inner),busy:this.isBusy(),operations:[...this.busyOperations],isStreaming:this.inner.isStreaming,isCompacting:this.inner.isCompacting,phase:b,model:c,activeTools:[...this.activeTools.entries()].map(([a,b])=>({id:a,name:b})),runStartedAt:E(this.runStartedAtMs),firstModelEventAt:E(this.firstModelEventAtMs),lastEventAt:E(this.lastEventAtMs),lastEventType:this.lastEventType,uptimeMs:this.runStartedAtMs?Math.max(0,a-this.runStartedAtMs):null,waitingForModelMs:"waiting_model"===b&&this.phaseStartedAtMs?Math.max(0,a-this.phaseStartedAtMs):null,pendingMessageCount:"number"==typeof this.inner.pendingMessageCount?this.inner.pendingMessageCount:null,errorMessage:this.lastErrorMessage}}start(){this.unsubscribe=this.inner.subscribe(a=>{"message_end"===a.type?queueMicrotask(()=>this.forwardEvent(this.withLatestEntryId(a))):"agent_end"===a.type?queueMicrotask(()=>this.forwardEvent(a)):this.forwardEvent(a)}),this.resetIdleTimer(),O()}forwardEvent(a){let b=null!==this.activePromptRunId&&void 0===a.__runId?{...a,__runId:this.activePromptRunId}:a;this.recordRuntimeEvent(b),("message_end"===a.type||"compaction_end"===a.type||"auto_compaction_end"===a.type)&&this.bumpSessionCwd();let c=this.sequenceEvent(b);for(let b of(this.bufferReplayEvent(c),this.resetIdleTimer(),("agent_end"===a.type||"agent_start"===a.type)&&O(),this.listeners))b(c)}withLatestEntryId(a){let b=a.message;if(!b||"user"!==b.role&&"assistant"!==b.role&&"toolResult"!==b.role)return a;try{let c=this.inner.sessionManager.getEntries(),d=JSON.stringify(b);for(let b=c.length-1;b>=0;b--){let e=c[b];if("message"===e.type&&"string"==typeof e.id&&JSON.stringify(e.message)===d)return{...a,__entryId:e.id}}}catch{}let c=function(a){let b="string"==typeof a.role?a.role:null;if(!b)return null;let c="number"==typeof a.timestamp?a.timestamp:0,d=0;try{let b=JSON.stringify(a.content??"");for(let a=0;a<b.length;a++)d=(d<<5)-d+b.charCodeAt(a)|0}catch{}return`synth:${b}:${c}:${(d>>>0).toString(36)}`}(b);return c?{...a,__entryId:c}:a}resetIdleTimer(){this.idleTimer&&clearTimeout(this.idleTimer),this.idleTimer=setTimeout(()=>{this.isBusy()?this.resetIdleTimer():this.destroy()},6e5)}sequenceEvent(a){"string"!=typeof this.streamEpoch&&(this.streamEpoch=(0,q.randomUUID)());let b=Number.isSafeInteger(this.nextEventId)?this.nextEventId:1;return this.nextEventId=b+1,{...a,__eventId:`${this.streamEpoch}:${b}`,__eventSequence:b,__streamEpoch:this.streamEpoch}}bufferReplayEvent(a){"agent_start"===a.type&&(this.replayEvents=[]),this.replayEvents.push(a),this.replayEvents.length>200&&this.replayEvents.splice(0,this.replayEvents.length-200)}onEvent(a,b={}){if(this.listeners.push(a),b.replay){let c=(0,x.Z)({streamEpoch:this.streamEpoch,nextSequence:this.nextEventId,events:this.replayEvents,afterEventId:b.afterEventId}),{afterSequence:d}=c;for(let e of(c.replayGap&&(a({type:"replay_gap",requestedAfter:b.afterEventId,streamEpoch:this.streamEpoch,oldestEventId:this.replayEvents[0]?.__eventId??null}),d=void 0),this.replayEvents)){let b="number"==typeof e.__eventSequence?e.__eventSequence:0;(void 0===d||b>d)&&a(e)}}return()=>{let b=this.listeners.indexOf(a);-1!==b&&this.listeners.splice(b,1)}}onDestroy(a){this.onDestroyCallback=a}async send(a){this.resetIdleTimer();let b=a.type;switch(b){case"prompt":{if(null!==this.activePromptRunId||this.isBusy())throw new R(this.sessionId);Number.isSafeInteger(this.promptRunId)||(this.promptRunId=0);let b=++this.promptRunId;this.activePromptRunId=b,this.busyOperations.add("prompt"),this.setRuntimePhase("waiting_model"),this.resetIdleTimer(),this.replayEvents=[],this.emit({type:"prompt_admitted",__runId:b}),O();try{let c="string"==typeof a.leafId&&a.leafId.trim()?a.leafId:null;if(c&&this.inner.sessionManager.getLeafId()!==c&&(await this.inner.navigateTree(c,{})).cancelled)throw Error(`Failed to navigate session to leaf ${c}`);if("string"==typeof a.provider&&"string"==typeof a.modelId&&await this.applyModelSelection(a.provider,a.modelId),"string"==typeof a.thinkingLevel&&this.applyThinkingLevel(a.thinkingLevel),Array.isArray(a.toolNames)){let b=this.filterAvailableToolNames(a.toolNames);this.inner.setActiveToolsByName(b)}this.preparePromptContext(a.message);let d=a.images,e=this.inner.model?.input,f=!e||0===e.length||e.includes("image")?d:void 0;return this.inner.prompt(a.message,f?.length?{images:f}:void 0).then(()=>{this.emit({type:"prompt_done",__runId:b})}).catch(a=>{this.abortedPromptRunId!==b&&this.emit({type:"prompt_error",__runId:b,error:a instanceof Error?a.message:String(a)})}).finally(()=>this.finishPromptRun(b)),{runId:b}}catch(a){throw this.emit({type:"prompt_error",__runId:b,error:a instanceof Error?a.message:String(a)}),this.finishPromptRun(b),a}}case"abort":return this.abortedPromptRunId=this.promptRunId,await this.inner.abort(),null;case"get_state":{let a=this.inner.model,b=this.inner.getContextUsage(),c=this.inner.agent.state?.systemPrompt??"",d=(0,g.cV)(),e=(0,t.U5)(this.inner.sessionId),f=this.getRuntimeStatus();return{sessionId:this.inner.sessionId,sessionFile:this.inner.sessionFile??"",isStreaming:this.inner.isStreaming,isCompacting:this.inner.isCompacting,autoCompactionEnabled:this.inner.autoCompactionEnabled,autoRetryEnabled:this.inner.autoRetryEnabled,model:a?{id:a.id,provider:a.provider}:void 0,messageCount:0,pendingMessageCount:0,phase:f.phase,activeTools:f.activeTools,lastEventAt:f.lastEventAt,lastEventType:f.lastEventType,errorMessage:f.errorMessage,goal:e?.goal??null,contextUsage:b?{percent:b.percent,contextWindow:b.contextWindow,tokens:b.tokens}:null,systemPrompt:d.generativeUI?c:(0,k.FE)(c),thinkingLevel:this.inner.agent.state?.thinkingLevel??"off"}}case"set_model":{if(this.isBusy())throw new R(this.sessionId);let{provider:b,modelId:c}=a,d=await this.applyModelSelection(b,c);return{id:d.id,provider:d.provider,thinkingLevel:this.inner.agent.state?.thinkingLevel??"off"}}case"fork":{let b;if(this.isBusy())throw new R(this.sessionId);let c=a.entryId,d=this.inner.sessionManager,g=this.inner.sessionFile;if(!d.isPersisted())return{cancelled:!0};if(!g)throw Error("Persisted session is missing a session file");let h=d.getEntry(c);if(!h)throw Error("Invalid entry ID for forking");let i=d.getSessionDir();if(h.parentId){let a=e.SessionManager.open(g,i).createBranchedSession(h.parentId);if(!a)throw Error("Failed to create forked session");b=a}else{let a=e.SessionManager.create(d.getCwd(),i);a.newSession({parentSession:g}),b=a.getSessionFile()}let j=e.SessionManager.open(b,i).getSessionId();(0,f.O8)(j,b);let k=D(this.inner),l=(0,t.U5)(this.sessionId);return l&&await (0,t.oR)(j,{...l,createdBy:"fork",createdAt:new Date().toISOString()},k?{cwd:k}:{}),this.destroy(),k&&((0,u.fd)(k),(0,u.E8)()),{cancelled:!1,newSessionId:j}}case"navigate_tree":if(this.isBusy())throw new R(this.sessionId);return{cancelled:(await this.inner.navigateTree(a.targetId,{})).cancelled};case"set_thinking_level":if(this.isBusy())throw new R(this.sessionId);return this.applyThinkingLevel(a.level),null;case"compact":{let b;if(this.isBusy())throw new R(this.sessionId);let{findCutPoint:d,DEFAULT_COMPACTION_SETTINGS:e}=await Promise.resolve().then(c.bind(c,75430)),f=this.inner.sessionManager.getBranch(),g={...e,...this.inner.settingsManager.getCompactionSettings()},h=-1;for(let a=f.length-1;a>=0;a--)if("compaction"===f[a].type){h=a;break}let i=h+1,j=d(f,i,f.length,g.keepRecentTokens);if((j.isSplitTurn?j.turnStartIndex:j.firstKeptEntryIndex)<=i)throw new S("too-short","Conversation is too short to compact");try{b=await this.trackBusy("compact",this.inner.compact(a.customInstructions))}catch(c){let a,b;throw(b=(a=c instanceof Error?c.message:String(c)).toLowerCase()).includes("already compacted")?new S("already-compacted","This session has already been compacted"):b.includes("too small")||b.includes("nothing to compact")||b.includes("too short")?new S("too-short","Conversation is too short to compact"):b.includes("cancelled")||b.includes("abort")?new S("cancelled","Compaction was cancelled"):new S("failed",a||"Compaction failed")}let k=b;return{tokensBefore:"number"==typeof k?.tokensBefore?k.tokensBefore:null,tokensAfter:"number"==typeof k?.estimatedTokensAfter?k.estimatedTokensAfter:null,reducedBy:"number"==typeof k?.tokensBefore&&"number"==typeof k?.estimatedTokensAfter?Math.max(0,k.tokensBefore-k.estimatedTokensAfter):null}}case"set_auto_compaction":return this.inner.setAutoCompactionEnabled(a.enabled),null;case"steer":{this.preparePromptContext(a.message);let b=a.images,c=this.inner.model?.input,d=!c||0===c.length||c.includes("image")?b:void 0;return await this.trackBusy("steer",this.inner.steer(a.message,d?.length?d:void 0)),null}case"follow_up":{this.preparePromptContext(a.message);let b=a.images,c=this.inner.model?.input,d=!c||0===c.length||c.includes("image")?b:void 0;return await this.trackBusy("follow_up",this.inner.followUp(a.message,d?.length?d:void 0)),null}case"get_tools":{let a=this.inner.getAllTools(),b=new Set(this.inner.getActiveToolNames());return a.map(a=>({name:a.name,description:a.description,active:b.has(a.name)}))}case"set_tools":{if(this.isBusy())throw new R(this.sessionId);let b=this.filterAvailableToolNames(a.toolNames);return this.inner.setActiveToolsByName(b),this.applyRuntimePrompts(),(0,t.LN)(this.sessionId,{lastToolNames:this.inner.getActiveToolNames()}).catch(()=>{}),null}case"abort_compaction":return this.inner.abortCompaction(),null;case"set_session_name":{let b=a.name?.trim();if(!b)throw Error("Session name cannot be empty");return this.inner.setSessionName(b),(0,f.lG)(this.sessionId),(0,u.xm)(this.sessionId),null}case"append_message":{if(this.isBusy())throw new R(this.sessionId);let b=a.message;if("string"!=typeof b||!b.trim())return null;if(!this.inner.sendCustomMessage)throw Error("Session does not support append_message");return await this.inner.sendCustomMessage({customType:"string"==typeof a.customType&&a.customType?a.customType:"context-note",content:b,display:"boolean"!=typeof a.display||a.display},{triggerTurn:!1}),null}case"set_auto_retry":return this.inner.setAutoRetryEnabled(a.enabled),null;default:throw Error(`Unsupported command: ${b}`)}}destroy(){this._alive&&(this._alive=!1,this.idleTimer&&clearTimeout(this.idleTimer),this.unsubscribe?.(),this.onDestroyCallback?.(),O())}bumpSessionCwd(){let a=D(this.inner);a&&(0,u.fd)(a)}async applyModelSelection(a,b){let c=this.modelRegistry.find(a,b);if(!c){let d=a.toLowerCase().replace(/-/g,"");d!==a&&(c=this.modelRegistry.find(d,b))}if(!c)throw Error(`Model not found: ${a}/${b}`);return await this.inner.setModel(c),c}applyThinkingLevel(a){this.inner.setThinkingLevel(a),"xhigh"===a&&this.inner.model?.compat?.thinkingFormat==="deepseek"&&this.inner.agent?.state&&(this.inner.agent.state.thinkingLevel="xhigh")}preparePromptContext(a){this.applyRuntimePrompts(a)}finishPromptRun(a){this.activePromptRunId===a&&(this.activePromptRunId=null,this.busyOperations.delete("prompt"),this.isBusy()||this.setRuntimePhase("idle"),this.resetIdleTimer(),O())}async trackBusy(a,b){this.busyOperations.add(a),this.setRuntimePhase("compact"===a?"compacting":"waiting_model"),this.resetIdleTimer(),O();try{return await b}finally{this.busyOperations.delete(a),this.isBusy()||this.setRuntimePhase("idle"),this.resetIdleTimer(),O()}}setRuntimePhase(a,b=Date.now()){this.currentRuntimePhase!==a&&(this.currentRuntimePhase=a,this.phaseStartedAtMs="idle"===a?null:b)}getPhase(){if(this.inner.isCompacting||this.busyOperations.has("compact"))return"compacting";if(this.activeTools.size>0)return"running_tools";if(this.isBusy()){let a=this.currentRuntimePhase;return a&&"idle"!==a?a:"waiting_model"}return"idle"}emit(a){let b=this.sequenceEvent(a);for(let a of(this.bufferReplayEvent(b),this.listeners))a(b)}recordRuntimeEvent(a){let b=Date.now();switch(this.lastEventAtMs=b,this.lastEventType=a.type,a.type){case"agent_start":this.runStartedAtMs=b,this.firstModelEventAtMs=null,this.lastErrorMessage=null,this.activeTools.clear(),this.setRuntimePhase("waiting_model",b);break;case"message_start":case"message_update":{let c=a.message;c?.role==="assistant"?(this.firstModelEventAtMs||(this.firstModelEventAtMs=b),"string"==typeof c.errorMessage&&(this.lastErrorMessage=c.errorMessage),this.setRuntimePhase("streaming",b)):c?.role==="user"&&this.setRuntimePhase("waiting_model",b);break}case"message_end":{let c=a.message;c?.role==="assistant"&&"string"==typeof c.errorMessage&&(this.lastErrorMessage=c.errorMessage),this.setRuntimePhase("waiting_model",b);break}case"tool_execution_start":{let c="string"==typeof a.toolCallId?a.toolCallId:"",d="string"==typeof a.toolName?a.toolName:"tool";c&&this.activeTools.set(c,d),this.setRuntimePhase("running_tools",b);break}case"tool_execution_end":{let c="string"==typeof a.toolCallId?a.toolCallId:"";c&&this.activeTools.delete(c),this.setRuntimePhase(this.activeTools.size>0?"running_tools":"waiting_model",b);break}case"auto_retry_start":this.setRuntimePhase("waiting_model",b);break;case"compaction_start":case"auto_compaction_start":this.setRuntimePhase("compacting",b);break;case"compaction_end":case"auto_compaction_end":this.setRuntimePhase(this.isBusy()?"waiting_model":"idle",b);break;case"agent_end":this.activeTools.clear(),!0===a.willRetry?this.setRuntimePhase("waiting_model",b):(this.setRuntimePhase("idle",b),this.runStartedAtMs=null,this.firstModelEventAtMs=null)}}applyRuntimePrompts(a){if(!this.inner.agent.state||this.options.systemPromptDisabled)return;let b=(0,g.cV)(),c=this.inner.getActiveToolNames(),d=(0,m.R4)(c),e=B(this.inner),f=0;if(this.sessionFile)try{f=(0,o.statSync)(this.sessionFile).mtimeMs}catch{f=0}let h=null;if(d&&this.sessionFile)if(this._kernelStateCache&&this._kernelStateCache.mtime===f)h=this._kernelStateCache.summary;else{let a=(0,w.f)(this.sessionFile);a?(h=(0,w.v)(a),this._kernelStateCache={mtime:f,summary:h}):this._kernelStateCache=null}else this._kernelStateCache=null;let i=h?`|mtime=${f}`:"",j=a??"",n=`${d}|${b.generativeUI}|${j.length>0?"msg":"no-msg"}${i}`;if(this._lastAppliedPromptKey===n&&e.length>0)return;if(!b.generativeUI){let a=(0,m.X8)((0,k.FE)(e)),b=F(a,d),c=h?`${b}
143
143
 
144
144
  ${h}`:b;C(this.inner,c),this._lastAppliedPromptKey=n;return}let p=(0,m.X8)((0,k.FE)(e)),q=(0,k.zN)(p),r=F(q,d),s=a?(0,l.WO)(r,a,{force:function(a){try{return a.getBranch().some(a=>!!a&&"object"==typeof a&&"message"===a.type&&!!a.message&&JSON.stringify(a.message).includes("show-widget"))}catch{return!1}}(this.inner.sessionManager)}):r;h&&(s=`${s}
145
145