@athenaintel/react 0.22.3 → 0.23.0

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 (350) hide show
  1. package/README.md +394 -4
  2. package/dist/chat/AthenaChat.cjs +389 -240
  3. package/dist/chat/AthenaChat.cjs.map +1 -1
  4. package/dist/chat/AthenaChat.d.ts +26 -8
  5. package/dist/chat/AthenaChat.js +394 -245
  6. package/dist/chat/AthenaChat.js.map +1 -1
  7. package/dist/chat/StatewireApprovalCard.cjs +2 -1
  8. package/dist/chat/StatewireApprovalCard.cjs.map +1 -1
  9. package/dist/chat/StatewireApprovalCard.js +2 -1
  10. package/dist/chat/StatewireApprovalCard.js.map +1 -1
  11. package/dist/chat/StatewireClientToolBridge.cjs +1 -0
  12. package/dist/chat/StatewireClientToolBridge.cjs.map +1 -1
  13. package/dist/chat/StatewireClientToolBridge.js +1 -0
  14. package/dist/chat/StatewireClientToolBridge.js.map +1 -1
  15. package/dist/chat/StatewireQueuedMessages.cjs +1 -0
  16. package/dist/chat/StatewireQueuedMessages.cjs.map +1 -1
  17. package/dist/chat/StatewireQueuedMessages.js +1 -0
  18. package/dist/chat/StatewireQueuedMessages.js.map +1 -1
  19. package/dist/chat/WaitingOnYouBanner.cjs +100 -0
  20. package/dist/chat/WaitingOnYouBanner.cjs.map +1 -0
  21. package/dist/chat/WaitingOnYouBanner.d.ts +29 -0
  22. package/dist/chat/WaitingOnYouBanner.js +100 -0
  23. package/dist/chat/WaitingOnYouBanner.js.map +1 -0
  24. package/dist/chat/athena-chat-welcome.cjs +148 -0
  25. package/dist/chat/athena-chat-welcome.cjs.map +1 -0
  26. package/dist/chat/athena-chat-welcome.d.ts +54 -0
  27. package/dist/chat/athena-chat-welcome.js +148 -0
  28. package/dist/chat/athena-chat-welcome.js.map +1 -0
  29. package/dist/chat/athena-composer-controls.cjs +76 -0
  30. package/dist/chat/athena-composer-controls.cjs.map +1 -0
  31. package/dist/chat/athena-composer-controls.d.ts +21 -0
  32. package/dist/chat/athena-composer-controls.js +76 -0
  33. package/dist/chat/athena-composer-controls.js.map +1 -0
  34. package/dist/chat/composer-keyboard-hint.cjs +61 -0
  35. package/dist/chat/composer-keyboard-hint.cjs.map +1 -0
  36. package/dist/chat/composer-keyboard-hint.d.ts +33 -0
  37. package/dist/chat/composer-keyboard-hint.js +61 -0
  38. package/dist/chat/composer-keyboard-hint.js.map +1 -0
  39. package/dist/chat/message-time.cjs +64 -0
  40. package/dist/chat/message-time.cjs.map +1 -0
  41. package/dist/chat/message-time.d.ts +45 -0
  42. package/dist/chat/message-time.js +64 -0
  43. package/dist/chat/message-time.js.map +1 -0
  44. package/dist/chat/run-activity.cjs +38 -7
  45. package/dist/chat/run-activity.cjs.map +1 -1
  46. package/dist/chat/run-activity.d.ts +14 -3
  47. package/dist/chat/run-activity.js +39 -8
  48. package/dist/chat/run-activity.js.map +1 -1
  49. package/dist/chat/statewire-client-tools.cjs +2 -1
  50. package/dist/chat/statewire-client-tools.cjs.map +1 -1
  51. package/dist/chat/statewire-client-tools.js +2 -1
  52. package/dist/chat/statewire-client-tools.js.map +1 -1
  53. package/dist/chat/super-grouping/activity-timeline.cjs +2 -1
  54. package/dist/chat/super-grouping/activity-timeline.cjs.map +1 -1
  55. package/dist/chat/super-grouping/activity-timeline.js +2 -1
  56. package/dist/chat/super-grouping/activity-timeline.js.map +1 -1
  57. package/dist/chat/thread-scroll-to-bottom.cjs +24 -0
  58. package/dist/chat/thread-scroll-to-bottom.cjs.map +1 -0
  59. package/dist/chat/thread-scroll-to-bottom.d.ts +11 -0
  60. package/dist/chat/thread-scroll-to-bottom.js +24 -0
  61. package/dist/chat/thread-scroll-to-bottom.js.map +1 -0
  62. package/dist/chat/tiptap-text.cjs +26 -99
  63. package/dist/chat/tiptap-text.cjs.map +1 -1
  64. package/dist/chat/tiptap-text.d.ts +13 -0
  65. package/dist/chat/tiptap-text.js +26 -99
  66. package/dist/chat/tiptap-text.js.map +1 -1
  67. package/dist/chat/use-athena-run-live.cjs +2 -1
  68. package/dist/chat/use-athena-run-live.cjs.map +1 -1
  69. package/dist/chat/use-athena-run-live.js +2 -1
  70. package/dist/chat/use-athena-run-live.js.map +1 -1
  71. package/dist/chat/use-statewire-approval-request.cjs +1 -0
  72. package/dist/chat/use-statewire-approval-request.cjs.map +1 -1
  73. package/dist/chat/use-statewire-approval-request.js +1 -0
  74. package/dist/chat/use-statewire-approval-request.js.map +1 -1
  75. package/dist/chat-ui/composer/tiptap-composer.cjs +39 -4
  76. package/dist/chat-ui/composer/tiptap-composer.cjs.map +1 -1
  77. package/dist/chat-ui/composer/tiptap-composer.d.ts +21 -0
  78. package/dist/chat-ui/composer/tiptap-composer.js +39 -4
  79. package/dist/chat-ui/composer/tiptap-composer.js.map +1 -1
  80. package/dist/chat-ui/index.cjs +15 -1
  81. package/dist/chat-ui/index.cjs.map +1 -1
  82. package/dist/chat-ui/index.d.ts +6 -3
  83. package/dist/chat-ui/index.js +16 -2
  84. package/dist/chat-ui/index.js.map +1 -1
  85. package/dist/chat-ui/mentions/mention-chip.cjs +31 -4
  86. package/dist/chat-ui/mentions/mention-chip.cjs.map +1 -1
  87. package/dist/chat-ui/mentions/mention-chip.js +31 -4
  88. package/dist/chat-ui/mentions/mention-chip.js.map +1 -1
  89. package/dist/chat-ui/messages/message-components.cjs +19 -1
  90. package/dist/chat-ui/messages/message-components.cjs.map +1 -1
  91. package/dist/chat-ui/messages/message-components.d.ts +13 -0
  92. package/dist/chat-ui/messages/message-components.js +19 -1
  93. package/dist/chat-ui/messages/message-components.js.map +1 -1
  94. package/dist/chat-ui/messages/runtime-message.cjs +2 -1
  95. package/dist/chat-ui/messages/runtime-message.cjs.map +1 -1
  96. package/dist/chat-ui/messages/runtime-message.js +2 -1
  97. package/dist/chat-ui/messages/runtime-message.js.map +1 -1
  98. package/dist/chat-ui/messages/statewire-continue-run.cjs +1 -0
  99. package/dist/chat-ui/messages/statewire-continue-run.cjs.map +1 -1
  100. package/dist/chat-ui/messages/statewire-continue-run.js +1 -0
  101. package/dist/chat-ui/messages/statewire-continue-run.js.map +1 -1
  102. package/dist/chat-ui/messages/user-edit-composer.cjs +3 -1
  103. package/dist/chat-ui/messages/user-edit-composer.cjs.map +1 -1
  104. package/dist/chat-ui/messages/user-edit-composer.js +3 -1
  105. package/dist/chat-ui/messages/user-edit-composer.js.map +1 -1
  106. package/dist/chat-ui/messages/wake-marker.cjs +84 -0
  107. package/dist/chat-ui/messages/wake-marker.cjs.map +1 -0
  108. package/dist/chat-ui/messages/wake-marker.d.ts +16 -0
  109. package/dist/chat-ui/messages/wake-marker.js +84 -0
  110. package/dist/chat-ui/messages/wake-marker.js.map +1 -0
  111. package/dist/chat-ui/rich-text/chat-blocks.cjs +177 -0
  112. package/dist/chat-ui/rich-text/chat-blocks.cjs.map +1 -0
  113. package/dist/chat-ui/rich-text/chat-blocks.d.ts +58 -0
  114. package/dist/chat-ui/rich-text/chat-blocks.js +177 -0
  115. package/dist/chat-ui/rich-text/chat-blocks.js.map +1 -0
  116. package/dist/chat-ui/rich-text/chat-link.cjs +69 -0
  117. package/dist/chat-ui/rich-text/chat-link.cjs.map +1 -0
  118. package/dist/chat-ui/rich-text/chat-link.d.ts +24 -0
  119. package/dist/chat-ui/rich-text/chat-link.js +69 -0
  120. package/dist/chat-ui/rich-text/chat-link.js.map +1 -0
  121. package/dist/chat-ui/rich-text/chat-message-body.cjs +144 -18
  122. package/dist/chat-ui/rich-text/chat-message-body.cjs.map +1 -1
  123. package/dist/chat-ui/rich-text/chat-message-body.d.ts +10 -1
  124. package/dist/chat-ui/rich-text/chat-message-body.js +149 -23
  125. package/dist/chat-ui/rich-text/chat-message-body.js.map +1 -1
  126. package/dist/chat-ui/rich-text/chat-node-views.cjs +84 -4
  127. package/dist/chat-ui/rich-text/chat-node-views.cjs.map +1 -1
  128. package/dist/chat-ui/rich-text/chat-node-views.d.ts +12 -1
  129. package/dist/chat-ui/rich-text/chat-node-views.js +85 -5
  130. package/dist/chat-ui/rich-text/chat-node-views.js.map +1 -1
  131. package/dist/chat-ui/rich-text/chat-text-schema.cjs +21 -3
  132. package/dist/chat-ui/rich-text/chat-text-schema.cjs.map +1 -1
  133. package/dist/chat-ui/rich-text/chat-text-schema.d.ts +17 -2
  134. package/dist/chat-ui/rich-text/chat-text-schema.js +21 -3
  135. package/dist/chat-ui/rich-text/chat-text-schema.js.map +1 -1
  136. package/dist/chat-ui/rich-text/citation-anchors.cjs +139 -0
  137. package/dist/chat-ui/rich-text/citation-anchors.cjs.map +1 -0
  138. package/dist/chat-ui/rich-text/citation-anchors.d.ts +74 -0
  139. package/dist/chat-ui/rich-text/citation-anchors.js +139 -0
  140. package/dist/chat-ui/rich-text/citation-anchors.js.map +1 -0
  141. package/dist/chat-ui/statewire.cjs +8 -1
  142. package/dist/chat-ui/statewire.cjs.map +1 -1
  143. package/dist/chat-ui/statewire.d.ts +2 -0
  144. package/dist/chat-ui/statewire.js +8 -1
  145. package/dist/chat-ui/statewire.js.map +1 -1
  146. package/dist/chat-ui/thread/chat-composer-dock.cjs +27 -6
  147. package/dist/chat-ui/thread/chat-composer-dock.cjs.map +1 -1
  148. package/dist/chat-ui/thread/chat-composer-dock.d.ts +21 -1
  149. package/dist/chat-ui/thread/chat-composer-dock.js +28 -7
  150. package/dist/chat-ui/thread/chat-composer-dock.js.map +1 -1
  151. package/dist/chat-ui/thread/statewire-history-edge.cjs +12 -13
  152. package/dist/chat-ui/thread/statewire-history-edge.cjs.map +1 -1
  153. package/dist/chat-ui/thread/statewire-history-edge.d.ts +11 -10
  154. package/dist/chat-ui/thread/statewire-history-edge.js +13 -14
  155. package/dist/chat-ui/thread/statewire-history-edge.js.map +1 -1
  156. package/dist/chat-ui/thread/thread-loading-overlay.cjs +31 -0
  157. package/dist/chat-ui/thread/thread-loading-overlay.cjs.map +1 -0
  158. package/dist/chat-ui/thread/thread-loading-overlay.d.ts +14 -0
  159. package/dist/chat-ui/thread/thread-loading-overlay.js +31 -0
  160. package/dist/chat-ui/thread/thread-loading-overlay.js.map +1 -0
  161. package/dist/composer/ComposerDropZone.cjs +8 -1
  162. package/dist/composer/ComposerDropZone.cjs.map +1 -1
  163. package/dist/composer/ComposerDropZone.d.ts +6 -0
  164. package/dist/composer/ComposerDropZone.js +9 -2
  165. package/dist/composer/ComposerDropZone.js.map +1 -1
  166. package/dist/diagnostics/errors.cjs +20 -0
  167. package/dist/diagnostics/errors.cjs.map +1 -1
  168. package/dist/diagnostics/errors.d.ts +20 -0
  169. package/dist/diagnostics/errors.js +20 -0
  170. package/dist/diagnostics/errors.js.map +1 -1
  171. package/dist/index.cjs +47 -1
  172. package/dist/index.cjs.map +1 -1
  173. package/dist/index.d.ts +26 -7
  174. package/dist/index.js +51 -5
  175. package/dist/index.js.map +1 -1
  176. package/dist/lib/use-prefers-reduced-motion.cjs +29 -0
  177. package/dist/lib/use-prefers-reduced-motion.cjs.map +1 -0
  178. package/dist/lib/use-prefers-reduced-motion.d.ts +6 -0
  179. package/dist/lib/use-prefers-reduced-motion.js +29 -0
  180. package/dist/lib/use-prefers-reduced-motion.js.map +1 -0
  181. package/dist/packages/agent-runtime/src/conversation-index.cjs.map +1 -1
  182. package/dist/packages/agent-runtime/src/conversation-index.js.map +1 -1
  183. package/dist/packages/agent-runtime/src/conversation-list.cjs +59 -0
  184. package/dist/packages/agent-runtime/src/conversation-list.cjs.map +1 -1
  185. package/dist/packages/agent-runtime/src/conversation-list.js +60 -1
  186. package/dist/packages/agent-runtime/src/conversation-list.js.map +1 -1
  187. package/dist/packages/agent-runtime/src/deep-agent-transport-recipe.cjs +5 -3
  188. package/dist/packages/agent-runtime/src/deep-agent-transport-recipe.cjs.map +1 -1
  189. package/dist/packages/agent-runtime/src/deep-agent-transport-recipe.js +5 -3
  190. package/dist/packages/agent-runtime/src/deep-agent-transport-recipe.js.map +1 -1
  191. package/dist/packages/agent-runtime/src/edit-command.cjs +21 -17
  192. package/dist/packages/agent-runtime/src/edit-command.cjs.map +1 -1
  193. package/dist/packages/agent-runtime/src/edit-command.js +22 -18
  194. package/dist/packages/agent-runtime/src/edit-command.js.map +1 -1
  195. package/dist/packages/agent-runtime/src/generated/runconfig-contract.cjs +9 -11
  196. package/dist/packages/agent-runtime/src/generated/runconfig-contract.cjs.map +1 -1
  197. package/dist/packages/agent-runtime/src/generated/runconfig-contract.js +9 -11
  198. package/dist/packages/agent-runtime/src/generated/runconfig-contract.js.map +1 -1
  199. package/dist/packages/agent-runtime/src/github-wake-event.cjs +86 -0
  200. package/dist/packages/agent-runtime/src/github-wake-event.cjs.map +1 -0
  201. package/dist/packages/agent-runtime/src/github-wake-event.js +86 -0
  202. package/dist/packages/agent-runtime/src/github-wake-event.js.map +1 -0
  203. package/dist/packages/agent-runtime/src/message-window.cjs +150 -42
  204. package/dist/packages/agent-runtime/src/message-window.cjs.map +1 -1
  205. package/dist/packages/agent-runtime/src/message-window.js +151 -43
  206. package/dist/packages/agent-runtime/src/message-window.js.map +1 -1
  207. package/dist/packages/agent-runtime/src/quota-safe-local-storage-session.cjs +13 -9
  208. package/dist/packages/agent-runtime/src/quota-safe-local-storage-session.cjs.map +1 -1
  209. package/dist/packages/agent-runtime/src/quota-safe-local-storage-session.js +13 -9
  210. package/dist/packages/agent-runtime/src/quota-safe-local-storage-session.js.map +1 -1
  211. package/dist/packages/agent-runtime/src/statewire-suspended.cjs +1 -3
  212. package/dist/packages/agent-runtime/src/statewire-suspended.cjs.map +1 -1
  213. package/dist/packages/agent-runtime/src/statewire-suspended.js +1 -3
  214. package/dist/packages/agent-runtime/src/statewire-suspended.js.map +1 -1
  215. package/dist/packages/agent-runtime/src/use-deep-agent-edit-submit.cjs.map +1 -1
  216. package/dist/packages/agent-runtime/src/use-deep-agent-edit-submit.js.map +1 -1
  217. package/dist/packages/agent-runtime/src/use-deep-agent-thread.cjs +61 -30
  218. package/dist/packages/agent-runtime/src/use-deep-agent-thread.cjs.map +1 -1
  219. package/dist/packages/agent-runtime/src/use-deep-agent-thread.js +59 -28
  220. package/dist/packages/agent-runtime/src/use-deep-agent-thread.js.map +1 -1
  221. package/dist/packages/agent-runtime/src/use-deep-agent-window-sync.cjs +56 -36
  222. package/dist/packages/agent-runtime/src/use-deep-agent-window-sync.cjs.map +1 -1
  223. package/dist/packages/agent-runtime/src/use-deep-agent-window-sync.js +59 -39
  224. package/dist/packages/agent-runtime/src/use-deep-agent-window-sync.js.map +1 -1
  225. package/dist/packages/react/package.json.cjs +1 -1
  226. package/dist/packages/react/package.json.js +1 -1
  227. package/dist/provider/AthenaContext.cjs.map +1 -1
  228. package/dist/provider/AthenaContext.d.ts +3 -0
  229. package/dist/provider/AthenaContext.js.map +1 -1
  230. package/dist/provider/AthenaProvider.cjs +93 -45
  231. package/dist/provider/AthenaProvider.cjs.map +1 -1
  232. package/dist/provider/AthenaProvider.d.ts +6 -1
  233. package/dist/provider/AthenaProvider.js +97 -49
  234. package/dist/provider/AthenaProvider.js.map +1 -1
  235. package/dist/runtime/statewire-lifecycle.cjs +2 -1
  236. package/dist/runtime/statewire-lifecycle.cjs.map +1 -1
  237. package/dist/runtime/statewire-lifecycle.js +2 -1
  238. package/dist/runtime/statewire-lifecycle.js.map +1 -1
  239. package/dist/runtime/useAthenaStatewireRuntime.cjs +3 -2
  240. package/dist/runtime/useAthenaStatewireRuntime.cjs.map +1 -1
  241. package/dist/runtime/useAthenaStatewireRuntime.d.ts +8 -12
  242. package/dist/runtime/useAthenaStatewireRuntime.js +3 -2
  243. package/dist/runtime/useAthenaStatewireRuntime.js.map +1 -1
  244. package/dist/search/useAthenaRepoSearch.cjs +94 -0
  245. package/dist/search/useAthenaRepoSearch.cjs.map +1 -0
  246. package/dist/search/useAthenaRepoSearch.d.ts +95 -0
  247. package/dist/search/useAthenaRepoSearch.js +94 -0
  248. package/dist/search/useAthenaRepoSearch.js.map +1 -0
  249. package/dist/styles.css +1 -1
  250. package/dist/threads/SessionList.cjs +486 -0
  251. package/dist/threads/SessionList.cjs.map +1 -0
  252. package/dist/threads/SessionList.d.ts +60 -0
  253. package/dist/threads/SessionList.js +486 -0
  254. package/dist/threads/SessionList.js.map +1 -0
  255. package/dist/threads/api.cjs +112 -4
  256. package/dist/threads/api.cjs.map +1 -1
  257. package/dist/threads/api.d.ts +128 -1
  258. package/dist/threads/api.js +113 -5
  259. package/dist/threads/api.js.map +1 -1
  260. package/dist/threads/conversation-list-fetcher.cjs +27 -3
  261. package/dist/threads/conversation-list-fetcher.cjs.map +1 -1
  262. package/dist/threads/conversation-list-fetcher.d.ts +16 -3
  263. package/dist/threads/conversation-list-fetcher.js +27 -3
  264. package/dist/threads/conversation-list-fetcher.js.map +1 -1
  265. package/dist/threads/index.d.ts +5 -1
  266. package/dist/threads/session-list-model.cjs +130 -0
  267. package/dist/threads/session-list-model.cjs.map +1 -0
  268. package/dist/threads/session-list-model.d.ts +62 -0
  269. package/dist/threads/session-list-model.js +130 -0
  270. package/dist/threads/session-list-model.js.map +1 -0
  271. package/dist/threads/statewire-thread-list.cjs +220 -38
  272. package/dist/threads/statewire-thread-list.cjs.map +1 -1
  273. package/dist/threads/statewire-thread-list.d.ts +152 -2
  274. package/dist/threads/statewire-thread-list.js +222 -40
  275. package/dist/threads/statewire-thread-list.js.map +1 -1
  276. package/dist/threads/thread-prefetcher.cjs +63 -0
  277. package/dist/threads/thread-prefetcher.cjs.map +1 -0
  278. package/dist/threads/thread-prefetcher.d.ts +54 -0
  279. package/dist/threads/thread-prefetcher.js +63 -0
  280. package/dist/threads/thread-prefetcher.js.map +1 -0
  281. package/dist/threads/use-athena-session-attention.cjs +22 -0
  282. package/dist/threads/use-athena-session-attention.cjs.map +1 -0
  283. package/dist/threads/use-athena-session-attention.d.ts +24 -0
  284. package/dist/threads/use-athena-session-attention.js +22 -0
  285. package/dist/threads/use-athena-session-attention.js.map +1 -0
  286. package/dist/threads/use-rest-conversation-history.cjs +25 -2
  287. package/dist/threads/use-rest-conversation-history.cjs.map +1 -1
  288. package/dist/threads/use-rest-conversation-history.d.ts +8 -1
  289. package/dist/threads/use-rest-conversation-history.js +25 -2
  290. package/dist/threads/use-rest-conversation-history.js.map +1 -1
  291. package/dist/threads/use-statewire-conversation-history.cjs +40 -16
  292. package/dist/threads/use-statewire-conversation-history.cjs.map +1 -1
  293. package/dist/threads/use-statewire-conversation-history.d.ts +13 -0
  294. package/dist/threads/use-statewire-conversation-history.js +40 -16
  295. package/dist/threads/use-statewire-conversation-history.js.map +1 -1
  296. package/dist/threads/use-thread-archive.cjs +128 -0
  297. package/dist/threads/use-thread-archive.cjs.map +1 -0
  298. package/dist/threads/use-thread-archive.d.ts +26 -0
  299. package/dist/threads/use-thread-archive.js +128 -0
  300. package/dist/threads/use-thread-archive.js.map +1 -0
  301. package/dist/threads/use-thread-favorite.cjs +53 -0
  302. package/dist/threads/use-thread-favorite.cjs.map +1 -0
  303. package/dist/threads/use-thread-favorite.d.ts +49 -0
  304. package/dist/threads/use-thread-favorite.js +53 -0
  305. package/dist/threads/use-thread-favorite.js.map +1 -0
  306. package/dist/threads/use-thread-field-override.cjs +184 -0
  307. package/dist/threads/use-thread-field-override.cjs.map +1 -0
  308. package/dist/threads/use-thread-field-override.d.ts +55 -0
  309. package/dist/threads/use-thread-field-override.js +184 -0
  310. package/dist/threads/use-thread-field-override.js.map +1 -0
  311. package/dist/threads/use-thread-rename.cjs +53 -0
  312. package/dist/threads/use-thread-rename.cjs.map +1 -0
  313. package/dist/threads/use-thread-rename.d.ts +48 -0
  314. package/dist/threads/use-thread-rename.js +53 -0
  315. package/dist/threads/use-thread-rename.js.map +1 -0
  316. package/dist/tools/index.cjs +5 -1
  317. package/dist/tools/index.cjs.map +1 -1
  318. package/dist/tools/index.d.ts +1 -1
  319. package/dist/tools/index.js +7 -3
  320. package/dist/tools/index.js.map +1 -1
  321. package/dist/tools/misc-tool-uis.cjs +2 -1
  322. package/dist/tools/misc-tool-uis.cjs.map +1 -1
  323. package/dist/tools/misc-tool-uis.js +2 -1
  324. package/dist/tools/misc-tool-uis.js.map +1 -1
  325. package/dist/tools/primitives.cjs +25 -2
  326. package/dist/tools/primitives.cjs.map +1 -1
  327. package/dist/tools/primitives.d.ts +9 -2
  328. package/dist/tools/primitives.js +26 -3
  329. package/dist/tools/primitives.js.map +1 -1
  330. package/dist/tools/tool-appearance.cjs +11 -0
  331. package/dist/tools/tool-appearance.cjs.map +1 -0
  332. package/dist/tools/tool-appearance.d.ts +29 -0
  333. package/dist/tools/tool-appearance.js +11 -0
  334. package/dist/tools/tool-appearance.js.map +1 -0
  335. package/dist/tools/tool-fallback.cjs +211 -13
  336. package/dist/tools/tool-fallback.cjs.map +1 -1
  337. package/dist/tools/tool-fallback.d.ts +31 -4
  338. package/dist/tools/tool-fallback.js +214 -16
  339. package/dist/tools/tool-fallback.js.map +1 -1
  340. package/dist/tools/use-elapsed-seconds.cjs +24 -0
  341. package/dist/tools/use-elapsed-seconds.cjs.map +1 -0
  342. package/dist/tools/use-elapsed-seconds.d.ts +10 -0
  343. package/dist/tools/use-elapsed-seconds.js +24 -0
  344. package/dist/tools/use-elapsed-seconds.js.map +1 -0
  345. package/dist/tools/voice-update-tool-ui.cjs +2 -1
  346. package/dist/tools/voice-update-tool-ui.cjs.map +1 -1
  347. package/dist/tools/voice-update-tool-ui.js +2 -1
  348. package/dist/tools/voice-update-tool-ui.js.map +1 -1
  349. package/package.json +1 -1
  350. package/src/chat-ui/tailwind-preset.js +14 -1
@@ -1,11 +1,30 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const jsxRuntime = require("react/jsx-runtime");
4
+ require("../packages/agent-runtime/src/generated/runconfig-contract.cjs");
5
+ const react$1 = require("react");
6
+ require("@assistant-ui/tap");
7
+ require("statewire");
8
+ require("../packages/agent-runtime/src/statewire-suspended.cjs");
9
+ require("../packages/agent-runtime/src/conversation-list.cjs");
10
+ require("@tanstack/react-query");
11
+ require("../packages/agent-runtime/src/statewire-state.cjs");
12
+ require("../packages/agent-runtime/src/messages.cjs");
13
+ require("@assistant-ui/store");
14
+ require("../packages/agent-runtime/src/quota-safe-local-storage-session.cjs");
15
+ require("../packages/agent-runtime/src/statewire-attach-observer.cjs");
16
+ require("../packages/agent-runtime/src/thread-status.cjs");
17
+ require("@assistant-ui/react-statewire");
18
+ const githubWakeEvent = require("../packages/agent-runtime/src/github-wake-event.cjs");
19
+ require("@assistant-ui/core");
20
+ require("../packages/agent-runtime/src/thread-handoff.cjs");
4
21
  const tiptapText = require("./tiptap-text.cjs");
5
22
  const AthenaChatErrorBoundary = require("./AthenaChatErrorBoundary.cjs");
6
23
  const StatewireApprovalCard = require("./StatewireApprovalCard.cjs");
7
24
  const StatewireQueuedMessages = require("./StatewireQueuedMessages.cjs");
8
25
  const statewireBanners = require("./statewire-banners.cjs");
26
+ const WaitingOnYouBanner = require("./WaitingOnYouBanner.cjs");
27
+ const wakeMarker = require("../chat-ui/messages/wake-marker.cjs");
9
28
  const toolFallback = require("../tools/tool-fallback.cjs");
10
29
  const appendDocumentToolUi = require("../tools/append-document-tool-ui.cjs");
11
30
  const readAssetToolUi = require("../tools/read-asset-tool-ui.cjs");
@@ -18,13 +37,19 @@ const collapsible = require("../ui/collapsible.cjs");
18
37
  const chatComposerDock = require("../chat-ui/thread/chat-composer-dock.cjs");
19
38
  const chatThreadShell = require("../chat-ui/thread/chat-thread-shell.cjs");
20
39
  const statewireHistoryEdge = require("../chat-ui/thread/statewire-history-edge.cjs");
40
+ const threadLoadingOverlay = require("../chat-ui/thread/thread-loading-overlay.cjs");
21
41
  const composerSendOrStop = require("../chat-ui/thread/composer-send-or-stop.cjs");
22
42
  const tiptapComposer = require("../chat-ui/composer/tiptap-composer.cjs");
23
43
  const apiClient = require("../chat-ui/mentions/suggestions/data/api-client.cjs");
24
44
  const messageComponents = require("../chat-ui/messages/message-components.cjs");
45
+ const messageActionsConfig = require("../chat-ui/messages/message-actions-config.cjs");
46
+ const useAthenaRunLive = require("./use-athena-run-live.cjs");
47
+ const athenaChatWelcome = require("./athena-chat-welcome.cjs");
48
+ const athenaComposerControls = require("./athena-composer-controls.cjs");
49
+ const composerKeyboardHint = require("./composer-keyboard-hint.cjs");
50
+ const usePrefersReducedMotion = require("../lib/use-prefers-reduced-motion.cjs");
25
51
  const react = require("@assistant-ui/react");
26
52
  const lucideReact = require("lucide-react");
27
- const react$1 = require("react");
28
53
  const threadIdContext = require("../threads/thread-id-context.cjs");
29
54
  const FileUploadButton = require("../composer/FileUploadButton.cjs");
30
55
  const ComposerQuotePreview = require("../composer/ComposerQuotePreview.cjs");
@@ -37,36 +62,15 @@ const useAttachFiles = require("../composer/useAttachFiles.cjs");
37
62
  const AthenaContext = require("../provider/AthenaContext.cjs");
38
63
  const athenaUrls = require("../lib/athena-urls.cjs");
39
64
  const utils = require("../lib/utils.cjs");
40
- const useSendMessage = require("../composer/useSendMessage.cjs");
41
65
  const index = require("../toolkits/index.cjs");
42
66
  const runActivity = require("./run-activity.cjs");
67
+ const messageTime = require("./message-time.cjs");
68
+ const threadScrollToBottom = require("./thread-scroll-to-bottom.cjs");
43
69
  const cnfast = require("cnfast");
44
70
  function QuotePostMessageBridge() {
45
71
  QuoteContext.useQuoteFromPostMessage();
46
72
  return null;
47
73
  }
48
- const DEFAULT_SUGGESTIONS = [
49
- {
50
- icon: lucideReact.SearchIcon,
51
- title: "Research a topic and draft a report",
52
- prompt: "Search the web for the latest developments in enterprise AI adoption, then create a document summarizing the key trends, market data, and strategic implications."
53
- },
54
- {
55
- icon: lucideReact.SearchIcon,
56
- title: "Compare recent AI model launches",
57
- prompt: "Search the web for the latest major AI model launches from OpenAI, Anthropic, and Google, then summarize the release dates, standout capabilities, and practical tradeoffs in a concise comparison table."
58
- },
59
- {
60
- icon: lucideReact.PresentationIcon,
61
- title: "Build a presentation from scratch",
62
- prompt: "Create a 5-slide investor update presentation covering market opportunity, product traction, key metrics, competitive positioning, and next steps."
63
- },
64
- {
65
- icon: lucideReact.FileTextIcon,
66
- title: "Set up a structured spreadsheet",
67
- prompt: "Create a project tracking spreadsheet with columns for task name, owner, priority, status, start date, due date, and completion percentage."
68
- }
69
- ];
70
74
  const AthenaChatDefaultComponentsContext = react$1.createContext(null);
71
75
  const AthenaReasoningTextComponentContext = react$1.createContext(null);
72
76
  const useAthenaChatDefaultComponents = () => {
@@ -77,11 +81,20 @@ const useAthenaChatDefaultComponents = () => {
77
81
  return value;
78
82
  };
79
83
  const AthenaDefaultAssistantMessage = () => {
80
- const { toolUIs, TextComponent, ReasoningComponent, EmptyComponent, ActionBarComponent, groupToolCalls } = useAthenaChatDefaultComponents();
84
+ const {
85
+ toolUIs,
86
+ TextComponent,
87
+ ReasoningComponent,
88
+ EmptyComponent,
89
+ ActionBarComponent,
90
+ AvatarComponent,
91
+ groupToolCalls
92
+ } = useAthenaChatDefaultComponents();
81
93
  return /* @__PURE__ */ jsxRuntime.jsx(
82
94
  AthenaAssistantMessage,
83
95
  {
84
96
  toolUIs,
97
+ AvatarComponent,
85
98
  TextComponent,
86
99
  ReasoningComponent,
87
100
  EmptyComponent,
@@ -120,49 +133,22 @@ const withNestedPtcMessages = (ToolUI) => {
120
133
  };
121
134
  return ToolUIWithNestedPtcMessages;
122
135
  };
123
- const SuggestionCard = ({
124
- suggestion,
125
- index: index2
126
- }) => {
127
- const Icon = suggestion.icon;
128
- const sendMessage = useSendMessage.useSendMessage();
129
- const handleClick = react$1.useCallback(() => {
130
- void sendMessage(suggestion.prompt);
131
- }, [sendMessage, suggestion.prompt]);
132
- return /* @__PURE__ */ jsxRuntime.jsxs(
133
- "button",
134
- {
135
- type: "button",
136
- onClick: handleClick,
137
- className: `fade-in slide-in-from-bottom-2 animate-in fill-mode-both group flex items-start gap-3 rounded-xl border border-border/60 bg-background p-3.5 text-left shadow-sm transition-all duration-150 hover:border-border hover:bg-muted/40 hover:shadow-md`,
138
- style: { animationDelay: `${100 + index2 * 75}ms` },
139
- children: [
140
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex size-8 shrink-0 items-center justify-center rounded-lg bg-muted/60 text-muted-foreground transition-colors group-hover:bg-primary/10 group-hover:text-primary", children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { className: "size-4" }) }),
141
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[13px] font-medium leading-snug text-foreground", children: suggestion.title }) }),
142
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowRightIcon, { className: "mt-0.5 size-3.5 shrink-0 text-muted-foreground/0 transition-all group-hover:text-muted-foreground" })
143
- ]
144
- }
145
- );
146
- };
147
- const AthenaChatWelcome = ({ welcomeMessage, welcomeSubtext, welcomeSuggestions }) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "aui-thread-welcome-root mx-auto my-auto flex w-full max-w-(--thread-max-width) grow flex-col", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "aui-thread-welcome-center flex w-full grow flex-col items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "aui-thread-welcome-message flex size-full flex-col justify-center px-4", children: [
148
- /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "aui-thread-welcome-message-inner fade-in slide-in-from-bottom-1 animate-in fill-mode-both font-semibold text-2xl duration-200", children: welcomeMessage }),
149
- welcomeSubtext && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "aui-thread-welcome-message-inner fade-in slide-in-from-bottom-1 animate-in fill-mode-both text-muted-foreground text-lg delay-75 duration-200", children: welcomeSubtext }),
150
- welcomeSuggestions.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-6 grid grid-cols-1 gap-2.5 sm:grid-cols-2", children: welcomeSuggestions.map((s, i) => /* @__PURE__ */ jsxRuntime.jsx(SuggestionCard, { suggestion: s, index: i }, s.title)) })
151
- ] }) }) });
152
136
  const AthenaChat = ({
153
137
  className,
154
138
  welcomeMessage = "Hello there!",
155
139
  welcomeSubtext = "What can I help you with?",
156
- maxWidth = "44rem",
140
+ maxWidth = "46rem",
157
141
  turnAnchor = "bottom",
142
+ readOnly = false,
158
143
  toolUIs,
159
144
  mentionTools,
160
- welcomeSuggestions = DEFAULT_SUGGESTIONS,
145
+ welcomeSuggestions = athenaChatWelcome.DEFAULT_WELCOME_SUGGESTIONS,
161
146
  components,
162
- groupToolCalls = false
147
+ groupToolCalls = true
163
148
  }) => {
164
149
  var _a, _b, _c;
165
150
  const athenaConfig = AthenaContext.useAthenaConfig();
151
+ const statewireThreadId = react$1.useContext(threadIdContext.AthenaStatewireThreadIdContext);
166
152
  const mentionAuth = react$1.useMemo(
167
153
  () => ({
168
154
  backendUrl: athenaConfig.backendUrl,
@@ -203,6 +189,7 @@ const AthenaChat = ({
203
189
  const reasoningComponent = (_b = components == null ? void 0 : components.messageParts) == null ? void 0 : _b.Reasoning;
204
190
  const emptyComponent = ((_c = components == null ? void 0 : components.messageParts) == null ? void 0 : _c.Empty) ?? AthenaAssistantMessageEmpty;
205
191
  const actionBarComponent = (components == null ? void 0 : components.AssistantActionBar) ?? AthenaAssistantActionBar;
192
+ const avatarComponent = components == null ? void 0 : components.AssistantAvatar;
206
193
  const defaultComponentsContextValue = react$1.useMemo(
207
194
  () => ({
208
195
  toolUIs: mergedToolUIs,
@@ -210,9 +197,18 @@ const AthenaChat = ({
210
197
  ReasoningComponent: reasoningComponent,
211
198
  EmptyComponent: emptyComponent,
212
199
  ActionBarComponent: actionBarComponent,
200
+ AvatarComponent: avatarComponent,
213
201
  groupToolCalls
214
202
  }),
215
- [actionBarComponent, emptyComponent, groupToolCalls, mergedToolUIs, reasoningComponent, textComponent]
203
+ [
204
+ actionBarComponent,
205
+ avatarComponent,
206
+ emptyComponent,
207
+ groupToolCalls,
208
+ mergedToolUIs,
209
+ reasoningComponent,
210
+ textComponent
211
+ ]
216
212
  );
217
213
  const AssistantMessageComponent = (components == null ? void 0 : components.AssistantMessage) ?? AthenaDefaultAssistantMessage;
218
214
  const UserMessageComponent = (components == null ? void 0 : components.UserMessage) ?? AthenaDefaultUserMessage;
@@ -223,56 +219,46 @@ const AthenaChat = ({
223
219
  }),
224
220
  [AssistantMessageComponent, UserMessageComponent]
225
221
  );
226
- return /* @__PURE__ */ jsxRuntime.jsx(AthenaChatDefaultComponentsContext.Provider, { value: defaultComponentsContextValue, children: /* @__PURE__ */ jsxRuntime.jsx(AthenaChatErrorBoundary.AthenaChatErrorBoundary, { children: /* @__PURE__ */ jsxRuntime.jsx(
222
+ return /* @__PURE__ */ jsxRuntime.jsx(AthenaChatDefaultComponentsContext.Provider, { value: defaultComponentsContextValue, children: /* @__PURE__ */ jsxRuntime.jsx(AthenaChatErrorBoundary.AthenaChatErrorBoundary, { children: /* @__PURE__ */ jsxRuntime.jsx(toolFallback.ToolFallbackAppearanceProvider, { appearance: "thread", children: /* @__PURE__ */ jsxRuntime.jsx(
227
223
  chatThreadShell.ChatThreadShell,
228
224
  {
229
- overlay: /* @__PURE__ */ jsxRuntime.jsx(ThreadLoadingOverlay, {}),
225
+ overlay: /* @__PURE__ */ jsxRuntime.jsx(threadLoadingOverlay.ThreadLoadingOverlay, {}),
230
226
  panelClassName: cnfast.cn(
231
227
  "aui-root aui-thread-root @container relative flex h-full flex-col bg-background",
232
228
  className
233
229
  ),
234
230
  maxWidth,
235
231
  turnAnchor,
232
+ readOnly,
233
+ banners: /* @__PURE__ */ jsxRuntime.jsx(WaitingOnYouBanner.WaitingOnYouBanner, { className: "px-4 pt-3" }),
236
234
  viewportClassName: "aui-thread-viewport relative flex flex-1 flex-col overflow-x-auto overflow-y-scroll scroll-smooth px-4 pt-4",
237
235
  contentClassName: "flex w-full flex-1 flex-col",
238
236
  viewportOverlay: /* @__PURE__ */ jsxRuntime.jsx(ThreadScrollToTop, {}),
239
- welcome: /* @__PURE__ */ jsxRuntime.jsx(
240
- AthenaChatWelcome,
241
- {
242
- welcomeMessage,
243
- welcomeSubtext,
244
- welcomeSuggestions
245
- }
246
- ),
237
+ welcome: /* @__PURE__ */ jsxRuntime.jsx(athenaChatWelcome.AthenaChatWelcome, { welcomeMessage, welcomeSubtext }),
247
238
  beforeMessages: /* @__PURE__ */ jsxRuntime.jsx(statewireHistoryEdge.StatewireHistoryEdge, { className: "aui-thread-history-edge" }),
248
239
  components: messageComponents2,
249
240
  runningIndicator: null,
250
- scrollToBottom: /* @__PURE__ */ jsxRuntime.jsx(ThreadScrollToBottom, {}),
251
- viewportFooterClassName: "aui-thread-viewport-footer sticky bottom-0 mx-auto mt-auto flex w-full max-w-(--thread-max-width) flex-col gap-4 overflow-visible rounded-t-3xl bg-background pb-4 md:pb-6",
241
+ scrollToBottom: null,
242
+ viewportFooterClassName: "aui-thread-viewport-footer sticky bottom-0 mx-auto mt-auto flex w-full max-w-(--thread-max-width) flex-col gap-4 overflow-visible rounded-t-3xl bg-background pt-4 pb-4 md:pb-6",
252
243
  viewportFooter: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
244
+ welcomeSuggestions.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(react.ThreadPrimitive.Empty, { children: /* @__PURE__ */ jsxRuntime.jsx(athenaChatWelcome.AthenaChatWelcomeSuggestions, { suggestions: welcomeSuggestions }) }),
253
245
  /* @__PURE__ */ jsxRuntime.jsx(statewireBanners.StatewireConnectionBanner, {}),
254
246
  /* @__PURE__ */ jsxRuntime.jsx(statewireBanners.StatewireErrorBanner, {}),
255
247
  /* @__PURE__ */ jsxRuntime.jsx(StatewireApprovalCard.StatewireApprovalCard, {}),
256
248
  /* @__PURE__ */ jsxRuntime.jsx(StatewireQueuedMessages.StatewireQueuedMessages, {}),
257
249
  /* @__PURE__ */ jsxRuntime.jsx(AttachmentContext.AttachmentProvider, { children: /* @__PURE__ */ jsxRuntime.jsxs(QuoteContext.QuoteProvider, { children: [
258
250
  /* @__PURE__ */ jsxRuntime.jsx(QuotePostMessageBridge, {}),
259
- /* @__PURE__ */ jsxRuntime.jsx(apiClient.MentionAuthCtx.Provider, { value: mentionAuth, children: /* @__PURE__ */ jsxRuntime.jsx(AthenaChatComposer, { tools }) })
251
+ /* @__PURE__ */ jsxRuntime.jsx(apiClient.MentionAuthCtx.Provider, { value: mentionAuth, children: /* @__PURE__ */ jsxRuntime.jsx(
252
+ AthenaChatComposer,
253
+ {
254
+ tools,
255
+ welcomeSuggestionCount: welcomeSuggestions.length
256
+ }
257
+ ) })
260
258
  ] }) })
261
259
  ] })
262
260
  }
263
- ) }) });
264
- };
265
- const ThreadLoadingOverlay = () => {
266
- const remoteId = threadIdContext.useAthenaThreadId();
267
- const [timedOut, setTimedOut] = react$1.useState(false);
268
- react$1.useEffect(() => {
269
- if (!remoteId) return;
270
- setTimedOut(false);
271
- const timer = setTimeout(() => setTimedOut(true), 15e3);
272
- return () => clearTimeout(timer);
273
- }, [remoteId]);
274
- if (!remoteId || timedOut) return null;
275
- return /* @__PURE__ */ jsxRuntime.jsx(react.AuiIf, { condition: (s) => s.thread.isEmpty, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 z-10 flex items-center justify-center bg-background/80", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "size-5 animate-spin rounded-full border-2 border-muted-foreground border-t-transparent" }) }) });
261
+ ) }) }, statewireThreadId ?? void 0) });
276
262
  };
277
263
  const THREAD_VIEWPORT_ATTR = "data-aui-thread-viewport";
278
264
  const useScrollToTop = () => {
@@ -318,63 +304,13 @@ const ThreadScrollToTop = () => {
318
304
  }
319
305
  ) });
320
306
  };
321
- const ThreadScrollToBottom = () => /* @__PURE__ */ jsxRuntime.jsx(react.ThreadPrimitive.ScrollToBottom, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
322
- tooltipIconButton.TooltipIconButton,
323
- {
324
- tooltip: "Scroll to bottom",
325
- variant: "outline",
326
- className: "aui-thread-scroll-to-bottom absolute -top-12 z-10 self-center rounded-full p-4 disabled:invisible dark:bg-background dark:hover:bg-accent",
327
- children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowDownIcon, {})
328
- }
329
- ) });
330
- const AthenaComposerSendButton = ({
331
- action,
332
- onSend,
333
- disabled,
334
- title
335
- }) => {
336
- const label = action === "queue" ? "Queue message" : "Send message";
337
- return /* @__PURE__ */ jsxRuntime.jsx(
338
- tooltipIconButton.TooltipIconButton,
339
- {
340
- tooltip: title ?? label,
341
- side: "bottom",
342
- type: "button",
343
- variant: "default",
344
- size: "icon",
345
- className: "aui-composer-send size-8 rounded-full",
346
- "aria-label": label,
347
- onClick: onSend,
348
- disabled,
349
- children: action === "queue" ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ListPlusIcon, { className: "aui-composer-send-icon size-4" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowUpIcon, { className: "aui-composer-send-icon size-4" })
350
- }
351
- );
352
- };
353
- const AthenaComposerStopButton = ({ onStop, disabled, title }) => /* @__PURE__ */ jsxRuntime.jsx(
354
- button.Button,
355
- {
356
- type: "button",
357
- variant: "default",
358
- size: "icon",
359
- className: "aui-composer-cancel size-8 rounded-full",
360
- "aria-label": "Stop generating",
361
- title,
362
- onClick: onStop,
363
- disabled,
364
- children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.SquareIcon, { className: "aui-composer-cancel-icon size-3 fill-current" })
365
- }
366
- );
367
- const ATHENA_COMPOSER_COMPONENTS = {
368
- SendButton: AthenaComposerSendButton,
369
- StopButton: AthenaComposerStopButton
370
- };
371
307
  const ATHENA_CHAT_MENTION_CATEGORIES = [
372
308
  "favorites",
373
309
  "assets",
374
310
  "projects",
375
311
  "folders"
376
312
  ];
377
- const AthenaChatComposer = ({ tools }) => {
313
+ const AthenaChatComposer = ({ tools, welcomeSuggestionCount }) => {
378
314
  const aui = react.useAui();
379
315
  const threadId = threadIdContext.useAthenaStatewireThreadId();
380
316
  const { appUrl } = AthenaContext.useAthenaConfig();
@@ -383,6 +319,15 @@ const AthenaChatComposer = ({ tools }) => {
383
319
  const { attachFiles } = useAttachFiles.useAttachFiles();
384
320
  const composerRef = react$1.useRef(null);
385
321
  const [hasText, setHasText] = react$1.useState(false);
322
+ const [dragActive, setDragActive] = react$1.useState(false);
323
+ const keyboardHint = composerKeyboardHint.useComposerKeyboardHint();
324
+ const reducedMotion = usePrefersReducedMotion.usePrefersReducedMotion();
325
+ const isEmpty = react.useAuiState((state) => state.thread.isEmpty);
326
+ const [mountedEmpty] = react$1.useState(() => isEmpty);
327
+ const entrance = athenaChatWelcome.welcomeEntrance(
328
+ athenaChatWelcome.welcomeComposerDelayMs(welcomeSuggestionCount),
329
+ reducedMotion || !mountedEmpty
330
+ );
386
331
  const rootCategories = react$1.useMemo(() => {
387
332
  const categories = [...ATHENA_CHAT_MENTION_CATEGORIES];
388
333
  if (tools.some((tool) => tool.type === "toolkit")) categories.push("toolkits");
@@ -438,41 +383,62 @@ const AthenaChatComposer = ({ tools }) => {
438
383
  }),
439
384
  [attachFiles]
440
385
  );
441
- return /* @__PURE__ */ jsxRuntime.jsx(ComposerDropZone.ComposerDropZone, { children: /* @__PURE__ */ jsxRuntime.jsx(
442
- chatComposerDock.ChatComposerDock,
386
+ return /* @__PURE__ */ jsxRuntime.jsx(ComposerDropZone.ComposerDropZone, { onDragActiveChange: setDragActive, children: /* @__PURE__ */ jsxRuntime.jsx(
387
+ "div",
443
388
  {
444
- className: "",
445
- surfaceClassName: "aui-composer-root relative flex w-full flex-col rounded-2xl border border-input bg-background px-1 pt-2 outline-none transition-shadow focus-within:border-ring focus-within:ring-2 focus-within:ring-ring/20",
446
- editorRowClassName: "px-2.5",
447
- toolbarClassName: "aui-composer-action-wrapper relative mx-2 mb-2 flex items-center",
448
- beforeEditor: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
449
- /* @__PURE__ */ jsxRuntime.jsx(ComposerQuotePreview.ComposerQuotePreview, {}),
450
- /* @__PURE__ */ jsxRuntime.jsx(ComposerAttachmentPreview.ComposerAttachmentPreview, {})
451
- ] }),
452
- editor: /* @__PURE__ */ jsxRuntime.jsx(
453
- tiptapComposer.TiptapComposer,
454
- {
455
- ref: composerRef,
456
- threadId,
457
- placeholder: "Send a message...",
458
- tools,
459
- rootCategories,
460
- onDraftStateChange: setHasText,
461
- waitForHostUploads,
462
- interceptSubmit,
463
- fileIntake
464
- }
465
- ),
466
- toolbarStart: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-1", children: /* @__PURE__ */ jsxRuntime.jsx(FileUploadButton.FileUploadButton, {}) }),
467
- toolbarEnd: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-1", children: /* @__PURE__ */ jsxRuntime.jsx(
468
- composerSendOrStop.ComposerSendOrStop,
389
+ className: cnfast.cn("aui-composer-entrance", entrance.className),
390
+ style: entrance.style,
391
+ onFocus: keyboardHint.onFocus,
392
+ children: /* @__PURE__ */ jsxRuntime.jsx(
393
+ chatComposerDock.ChatComposerDock,
469
394
  {
470
- composerRef,
471
- hasDraft: hasText || hasExtras,
472
- sendBlockedReason: isUploading ? "Upload in progress..." : null,
473
- components: ATHENA_COMPOSER_COMPONENTS
395
+ appearance: "paper",
396
+ dragActive,
397
+ aboveSurface: /* @__PURE__ */ jsxRuntime.jsx(threadScrollToBottom.ThreadScrollToBottom, {}),
398
+ beforeEditor: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
399
+ /* @__PURE__ */ jsxRuntime.jsx(ComposerQuotePreview.ComposerQuotePreview, {}),
400
+ /* @__PURE__ */ jsxRuntime.jsx(ComposerAttachmentPreview.ComposerAttachmentPreview, {})
401
+ ] }),
402
+ editor: /* @__PURE__ */ jsxRuntime.jsx(
403
+ tiptapComposer.TiptapComposer,
404
+ {
405
+ ref: composerRef,
406
+ threadId,
407
+ appearance: "paper",
408
+ placeholder: "Type @ to tag an asset",
409
+ tools,
410
+ rootCategories,
411
+ onDraftStateChange: setHasText,
412
+ waitForHostUploads,
413
+ interceptSubmit,
414
+ fileIntake,
415
+ onSubmitted: keyboardHint.onSubmitted
416
+ }
417
+ ),
418
+ toolbarStart: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1", children: [
419
+ /* @__PURE__ */ jsxRuntime.jsx(FileUploadButton.FileUploadButton, { className: "aui-composer-attach size-8 rounded-full p-0 disabled:opacity-30" }),
420
+ /* @__PURE__ */ jsxRuntime.jsx(
421
+ athenaComposerControls.AthenaComposerMentionButton,
422
+ {
423
+ onClick: () => {
424
+ var _a, _b;
425
+ return (_b = (_a = composerRef.current) == null ? void 0 : _a.openMentionMenu) == null ? void 0 : _b.call(_a);
426
+ }
427
+ }
428
+ )
429
+ ] }),
430
+ toolbarEnd: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-1", children: /* @__PURE__ */ jsxRuntime.jsx(
431
+ composerSendOrStop.ComposerSendOrStop,
432
+ {
433
+ composerRef,
434
+ hasDraft: hasText || hasExtras,
435
+ sendBlockedReason: isUploading ? "Upload in progress..." : null,
436
+ components: athenaComposerControls.ATHENA_COMPOSER_COMPONENTS
437
+ }
438
+ ) }),
439
+ belowSurface: /* @__PURE__ */ jsxRuntime.jsx(composerKeyboardHint.ComposerKeyboardHint, { visible: keyboardHint.visible })
474
440
  }
475
- ) })
441
+ )
476
442
  }
477
443
  ) });
478
444
  };
@@ -489,9 +455,54 @@ const MessageError = () => /* @__PURE__ */ jsxRuntime.jsx(react.MessagePrimitive
489
455
  }
490
456
  ) })
491
457
  ] }) });
458
+ const RunStatusLine = ({ verb, resetKey, counterOnly = false, className }) => {
459
+ const [seconds, setSeconds] = react$1.useState(0);
460
+ react$1.useEffect(() => {
461
+ setSeconds(0);
462
+ const startedAt = Date.now();
463
+ const timer = setInterval(() => {
464
+ setSeconds(Math.floor((Date.now() - startedAt) / 1e3));
465
+ }, 1e3);
466
+ return () => clearInterval(timer);
467
+ }, [resetKey]);
468
+ const stalled = seconds >= runActivity.RUN_ACTIVITY_STALL_SECONDS;
469
+ if (counterOnly && seconds < runActivity.RUN_ACTIVITY_COUNTER_SECONDS) return null;
470
+ return /* @__PURE__ */ jsxRuntime.jsxs(
471
+ "div",
472
+ {
473
+ "data-slot": "run-status-line",
474
+ "data-stalled": stalled ? "true" : void 0,
475
+ className: cnfast.cn(
476
+ "aui-run-activity mt-2 flex items-center gap-2 px-1 text-[12px] text-muted-foreground",
477
+ className
478
+ ),
479
+ children: [
480
+ /* @__PURE__ */ jsxRuntime.jsx(
481
+ "span",
482
+ {
483
+ "aria-hidden": "true",
484
+ className: cnfast.cn(
485
+ "size-1.5 shrink-0 rounded-full bg-current opacity-60",
486
+ !stalled && "animate-pulse motion-reduce:animate-none"
487
+ )
488
+ }
489
+ ),
490
+ /* @__PURE__ */ jsxRuntime.jsx(
491
+ "span",
492
+ {
493
+ "aria-hidden": "true",
494
+ className: cnfast.cn("tabular-nums", stalled && "text-amber-600 dark:text-amber-400"),
495
+ children: runActivity.runActivityLabel(seconds, verb)
496
+ }
497
+ ),
498
+ /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-live": "polite", className: "sr-only", children: stalled ? "Assistant is still working; nothing new for over thirty seconds." : `${verb}…` })
499
+ ]
500
+ }
501
+ );
502
+ };
492
503
  const AthenaAssistantMessageEmpty = ({ status }) => {
493
504
  if ((status == null ? void 0 : status.type) !== "running") return null;
494
- return /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shimmer text-[13px] text-muted-foreground", children: "Thinking..." });
505
+ return /* @__PURE__ */ jsxRuntime.jsx(RunStatusLine, { verb: "Thinking", resetKey: "empty", className: "mt-0" });
495
506
  };
496
507
  const AthenaMessageEmptyIndicator = ({
497
508
  EmptyComponent
@@ -510,27 +521,77 @@ const AthenaMessageActivityIndicator = () => {
510
521
  return ((_a = s.message.status) == null ? void 0 : _a.type) === "running";
511
522
  });
512
523
  const activityKey = react.useAuiState((s) => runActivity.runActivityKey(s.message.parts));
513
- const [seconds, setSeconds] = react$1.useState(0);
514
- react$1.useEffect(() => {
515
- setSeconds(0);
516
- if (!isRunning || activityKey === null) return;
517
- const startedAt = Date.now();
518
- const timer = setInterval(() => {
519
- setSeconds(Math.floor((Date.now() - startedAt) / 1e3));
520
- }, 1e3);
521
- return () => clearInterval(timer);
522
- }, [isRunning, activityKey]);
524
+ const verb = react.useAuiState((s) => runActivity.runActivityVerb(s.message.parts));
523
525
  if (!isRunning || activityKey === null) return null;
524
- const stalled = seconds >= runActivity.RUN_ACTIVITY_STALL_SECONDS;
525
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "aui-run-activity mt-2 flex items-center gap-2 px-1 text-[12px] text-muted-foreground", children: [
526
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-1", "aria-hidden": true, children: [
527
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "size-1.5 animate-bounce rounded-full bg-current [animation-delay:0ms]" }),
528
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "size-1.5 animate-bounce rounded-full bg-current [animation-delay:150ms]" }),
529
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "size-1.5 animate-bounce rounded-full bg-current [animation-delay:300ms]" })
530
- ] }),
531
- /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": true, className: stalled ? "text-amber-600 dark:text-amber-400" : void 0, children: runActivity.runActivityLabel(seconds) }),
532
- /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-live": "polite", className: "sr-only", children: stalled ? "Assistant is still working; nothing new for over thirty seconds." : "Assistant is working." })
533
- ] });
526
+ return /* @__PURE__ */ jsxRuntime.jsx(RunStatusLine, { verb: verb ?? "Working", resetKey: activityKey });
527
+ };
528
+ const AthenaGroupedRunMeta = () => {
529
+ const activityKey = react.useAuiState((s) => runActivity.runActivityKey(s.message.parts));
530
+ return /* @__PURE__ */ jsxRuntime.jsx(
531
+ RunStatusLine,
532
+ {
533
+ verb: "Working",
534
+ resetKey: activityKey ?? "thinking",
535
+ counterOnly: true,
536
+ className: "mt-1 px-0"
537
+ }
538
+ );
539
+ };
540
+ const renderGroupedRunningMeta = () => /* @__PURE__ */ jsxRuntime.jsx(AthenaGroupedRunMeta, {});
541
+ const MessageDaySeparator = () => {
542
+ const stamp = react.useAuiState((s) => {
543
+ var _a;
544
+ return messageTime.readMessageCreatedAt((_a = s.message.metadata) == null ? void 0 : _a.custom);
545
+ });
546
+ const previousStamp = react.useAuiState((s) => {
547
+ var _a;
548
+ const index2 = s.message.index;
549
+ const previous = index2 > 0 ? s.thread.messages[index2 - 1] : void 0;
550
+ return messageTime.readMessageCreatedAt((_a = previous == null ? void 0 : previous.metadata) == null ? void 0 : _a.custom);
551
+ });
552
+ const label = react$1.useMemo(() => {
553
+ const date = stamp ? messageTime.parseMessageTime(stamp) : null;
554
+ const previous = previousStamp ? messageTime.parseMessageTime(previousStamp) : null;
555
+ if (!date || !previous || messageTime.isSameCalendarDay(date, previous)) return null;
556
+ return messageTime.formatDayLabel(date);
557
+ }, [stamp, previousStamp]);
558
+ if (!label) return null;
559
+ return /* @__PURE__ */ jsxRuntime.jsxs(
560
+ "div",
561
+ {
562
+ role: "separator",
563
+ "aria-label": label,
564
+ "data-slot": "day-separator",
565
+ className: "aui-day-separator mb-3 flex w-full items-center gap-3 text-[11px] font-medium text-muted-foreground",
566
+ children: [
567
+ /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": "true", className: "h-px flex-1 bg-border" }),
568
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: label }),
569
+ /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": "true", className: "h-px flex-1 bg-border" })
570
+ ]
571
+ }
572
+ );
573
+ };
574
+ const MessageTimestamp = ({ className }) => {
575
+ const stamp = react.useAuiState((s) => {
576
+ var _a;
577
+ return messageTime.readMessageCreatedAt((_a = s.message.metadata) == null ? void 0 : _a.custom);
578
+ });
579
+ const date = react$1.useMemo(() => stamp ? messageTime.parseMessageTime(stamp) : null, [stamp]);
580
+ if (!date) return null;
581
+ return /* @__PURE__ */ jsxRuntime.jsx(
582
+ "time",
583
+ {
584
+ dateTime: date.toISOString(),
585
+ title: messageTime.formatMessageDateTime(date),
586
+ "data-slot": "message-timestamp",
587
+ className: cnfast.cn(
588
+ "aui-message-timestamp shrink-0 text-[11px] tabular-nums text-muted-foreground",
589
+ messageComponents.ACTION_BAR_REVEAL_CLASS,
590
+ className
591
+ ),
592
+ children: messageTime.formatMessageTime(date)
593
+ }
594
+ );
534
595
  };
535
596
  const AthenaReasoningPart = ({
536
597
  text,
@@ -610,11 +671,12 @@ const AthenaReasoningPart = ({
610
671
  const noToolGrouping = () => null;
611
672
  const AthenaAssistantMessage = ({
612
673
  toolUIs,
674
+ AvatarComponent,
613
675
  TextComponent = tiptapText.TiptapText,
614
676
  ReasoningComponent,
615
677
  EmptyComponent = AthenaAssistantMessageEmpty,
616
678
  ActionBarComponent = AthenaAssistantActionBar,
617
- groupToolCalls = false
679
+ groupToolCalls = true
618
680
  }) => {
619
681
  const effectiveReasoningComponent = ReasoningComponent ?? AthenaReasoningPart;
620
682
  const toolUIsWithNestedMessages = react$1.useMemo(() => {
@@ -642,48 +704,108 @@ const AthenaAssistantMessage = ({
642
704
  className: "aui-assistant-message-root group/aui-assistant-message fade-in slide-in-from-bottom-1 relative mx-auto w-full max-w-(--thread-max-width) animate-in py-3 duration-150",
643
705
  "data-role": "assistant",
644
706
  children: [
645
- /* @__PURE__ */ jsxRuntime.jsx(AthenaReasoningTextComponentContext.Provider, { value: TextComponent, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "aui-assistant-message-content wrap-break-word px-2 text-foreground leading-relaxed", children: [
646
- /* @__PURE__ */ jsxRuntime.jsx(NestedPtcMessages.NestedPtcComponentsProvider, { components: nestedPtcComponents, children: groupToolCalls ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col space-y-2", children: [
647
- /* @__PURE__ */ jsxRuntime.jsx(
648
- SuperGroupingCard.SuperGroupingCard,
649
- {
650
- toolUIs: toolUIsWithNestedMessages,
651
- TextComponent,
652
- ReasoningComponent: effectiveReasoningComponent
653
- }
654
- ),
655
- /* @__PURE__ */ jsxRuntime.jsx(SuperGroupingCard.SuperGroupingFinalText, { TextComponent }),
656
- /* @__PURE__ */ jsxRuntime.jsx(AthenaMessageActivityIndicator, {})
657
- ] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
658
- /* @__PURE__ */ jsxRuntime.jsx(AthenaMessageEmptyIndicator, { EmptyComponent }),
659
- /* @__PURE__ */ jsxRuntime.jsx(react.MessagePrimitive.GroupedParts, { groupBy: noToolGrouping, children: ({ part }) => {
660
- var _a;
661
- switch (part.type) {
662
- case "tool-call": {
663
- const ToolUI = toolUIsWithNestedMessages[part.toolName];
664
- const toolProps = part;
665
- return ToolUI ? /* @__PURE__ */ jsxRuntime.jsx(ToolUI, { ...toolProps }) : /* @__PURE__ */ jsxRuntime.jsx(toolFallback.ToolFallback, { ...toolProps });
666
- }
667
- case "reasoning": {
668
- const ReasoningRenderer = effectiveReasoningComponent;
669
- return /* @__PURE__ */ jsxRuntime.jsx(ReasoningRenderer, { ...part });
707
+ /* @__PURE__ */ jsxRuntime.jsx(MessageDaySeparator, {}),
708
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-3", children: [
709
+ /* @__PURE__ */ jsxRuntime.jsx(
710
+ "div",
711
+ {
712
+ "data-slot": "assistant-lead",
713
+ className: "aui-assistant-message-lead flex shrink-0 justify-center",
714
+ children: AvatarComponent ? /* @__PURE__ */ jsxRuntime.jsx(AvatarComponent, {}) : /* @__PURE__ */ jsxRuntime.jsx(
715
+ "span",
716
+ {
717
+ "aria-hidden": "true",
718
+ "data-slot": "assistant-rule",
719
+ className: "aui-assistant-message-rule w-0.5 self-stretch rounded-full bg-border"
670
720
  }
671
- case "text": {
672
- const textPart = part;
673
- if (textPart.text === "" && ((_a = textPart.status) == null ? void 0 : _a.type) === "running") {
674
- return /* @__PURE__ */ jsxRuntime.jsx(EmptyComponent, { status: textPart.status });
721
+ )
722
+ }
723
+ ),
724
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
725
+ /* @__PURE__ */ jsxRuntime.jsx(AthenaReasoningTextComponentContext.Provider, { value: TextComponent, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "aui-assistant-message-content wrap-break-word px-2 text-foreground leading-relaxed", children: [
726
+ /* @__PURE__ */ jsxRuntime.jsx(NestedPtcMessages.NestedPtcComponentsProvider, { components: nestedPtcComponents, children: groupToolCalls ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col space-y-2", children: [
727
+ /* @__PURE__ */ jsxRuntime.jsx(
728
+ SuperGroupingCard.SuperGroupingCard,
729
+ {
730
+ toolUIs: toolUIsWithNestedMessages,
731
+ TextComponent,
732
+ ReasoningComponent: effectiveReasoningComponent,
733
+ renderRunningMeta: renderGroupedRunningMeta
675
734
  }
676
- return /* @__PURE__ */ jsxRuntime.jsx(TextComponent, { ...textPart });
677
- }
678
- default:
679
- return null;
680
- }
681
- } }),
682
- /* @__PURE__ */ jsxRuntime.jsx(AthenaMessageActivityIndicator, {})
683
- ] }) }),
684
- /* @__PURE__ */ jsxRuntime.jsx(MessageError, {})
685
- ] }) }),
686
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "aui-assistant-message-footer mt-1 ml-2 flex", children: /* @__PURE__ */ jsxRuntime.jsx(ActionBarComponent, {}) })
735
+ ),
736
+ /* @__PURE__ */ jsxRuntime.jsx(SuperGroupingCard.SuperGroupingFinalText, { TextComponent })
737
+ ] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
738
+ /* @__PURE__ */ jsxRuntime.jsx(AthenaMessageEmptyIndicator, { EmptyComponent }),
739
+ /* @__PURE__ */ jsxRuntime.jsx(react.MessagePrimitive.GroupedParts, { groupBy: noToolGrouping, children: ({ part }) => {
740
+ var _a;
741
+ switch (part.type) {
742
+ case "tool-call": {
743
+ const ToolUI = toolUIsWithNestedMessages[part.toolName];
744
+ const toolProps = part;
745
+ return ToolUI ? /* @__PURE__ */ jsxRuntime.jsx(ToolUI, { ...toolProps }) : /* @__PURE__ */ jsxRuntime.jsx(toolFallback.ToolFallback, { ...toolProps });
746
+ }
747
+ case "reasoning": {
748
+ const ReasoningRenderer = effectiveReasoningComponent;
749
+ return /* @__PURE__ */ jsxRuntime.jsx(ReasoningRenderer, { ...part });
750
+ }
751
+ case "text": {
752
+ const textPart = part;
753
+ if (textPart.text === "" && ((_a = textPart.status) == null ? void 0 : _a.type) === "running") {
754
+ return /* @__PURE__ */ jsxRuntime.jsx(EmptyComponent, { status: textPart.status });
755
+ }
756
+ return /* @__PURE__ */ jsxRuntime.jsx(TextComponent, { ...textPart });
757
+ }
758
+ default:
759
+ return null;
760
+ }
761
+ } }),
762
+ /* @__PURE__ */ jsxRuntime.jsx(AthenaMessageActivityIndicator, {})
763
+ ] }) }),
764
+ /* @__PURE__ */ jsxRuntime.jsx(MessageError, {})
765
+ ] }) }),
766
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "aui-assistant-message-footer mt-1 ml-2 flex items-center gap-1", children: [
767
+ /* @__PURE__ */ jsxRuntime.jsx(messageComponents.BranchPicker, {}),
768
+ /* @__PURE__ */ jsxRuntime.jsx(ActionBarComponent, {}),
769
+ /* @__PURE__ */ jsxRuntime.jsx(MessageTimestamp, { className: "ml-auto group-hover/aui-assistant-message:opacity-100" })
770
+ ] })
771
+ ] })
772
+ ] })
773
+ ]
774
+ }
775
+ );
776
+ };
777
+ const CopyMessageButton = () => /* @__PURE__ */ jsxRuntime.jsx(react.ActionBarPrimitive.Copy, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(tooltipIconButton.TooltipIconButton, { tooltip: "Copy", children: [
778
+ /* @__PURE__ */ jsxRuntime.jsx(react.AuiIf, { condition: (s) => s.message.isCopied, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckIcon, {}) }),
779
+ /* @__PURE__ */ jsxRuntime.jsx(react.AuiIf, { condition: (s) => !s.message.isCopied, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CopyIcon, {}) })
780
+ ] }) });
781
+ const RegenerateMessageButton = () => {
782
+ const readOnly = messageActionsConfig.useMessageActionsReadOnly();
783
+ if (readOnly) return null;
784
+ return /* @__PURE__ */ jsxRuntime.jsx(react.ActionBarPrimitive.Reload, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(tooltipIconButton.TooltipIconButton, { tooltip: "Regenerate", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.RefreshCwIcon, {}) }) });
785
+ };
786
+ const EditMessageButton = () => {
787
+ const allowEdit = react.useAuiState((s) => s.thread.capabilities.edit);
788
+ const isRunning = useAthenaRunLive.useAthenaRunLive();
789
+ const readOnly = messageActionsConfig.useMessageActionsReadOnly();
790
+ if (!allowEdit || isRunning || readOnly) return null;
791
+ return /* @__PURE__ */ jsxRuntime.jsx(react.ActionBarPrimitive.Edit, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(tooltipIconButton.TooltipIconButton, { tooltip: "Edit", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.PencilIcon, {}) }) });
792
+ };
793
+ const AthenaUserActionBar = () => {
794
+ const isThreadRunning = react.useAuiState((s) => s.thread.isRunning);
795
+ return /* @__PURE__ */ jsxRuntime.jsxs(
796
+ react.ActionBarPrimitive.Root,
797
+ {
798
+ autohide: "never",
799
+ className: cnfast.cn(
800
+ "aui-user-action-bar-root flex min-h-6 gap-1 text-muted-foreground",
801
+ isThreadRunning ? "invisible" : [
802
+ messageComponents.ACTION_BAR_REVEAL_CLASS,
803
+ "group-hover/aui-user-message:pointer-events-auto group-hover/aui-user-message:opacity-100"
804
+ ]
805
+ ),
806
+ children: [
807
+ /* @__PURE__ */ jsxRuntime.jsx(CopyMessageButton, {}),
808
+ /* @__PURE__ */ jsxRuntime.jsx(EditMessageButton, {})
687
809
  ]
688
810
  }
689
811
  );
@@ -707,10 +829,8 @@ const AthenaAssistantActionBar = ({ className }) => {
707
829
  className
708
830
  ),
709
831
  children: [
710
- /* @__PURE__ */ jsxRuntime.jsx(react.ActionBarPrimitive.Copy, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(tooltipIconButton.TooltipIconButton, { tooltip: "Copy", children: [
711
- /* @__PURE__ */ jsxRuntime.jsx(react.AuiIf, { condition: (s) => s.message.isCopied, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckIcon, {}) }),
712
- /* @__PURE__ */ jsxRuntime.jsx(react.AuiIf, { condition: (s) => !s.message.isCopied, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CopyIcon, {}) })
713
- ] }) }),
832
+ /* @__PURE__ */ jsxRuntime.jsx(CopyMessageButton, {}),
833
+ /* @__PURE__ */ jsxRuntime.jsx(RegenerateMessageButton, {}),
714
834
  /* @__PURE__ */ jsxRuntime.jsxs(react.ActionBarMorePrimitive.Root, { children: [
715
835
  /* @__PURE__ */ jsxRuntime.jsx(react.ActionBarMorePrimitive.Trigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(tooltipIconButton.TooltipIconButton, { tooltip: "More", className: "data-[state=open]:bg-accent", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MoreHorizontalIcon, {}) }) }),
716
836
  /* @__PURE__ */ jsxRuntime.jsxs(
@@ -747,14 +867,43 @@ const AthenaAssistantActionBar = ({ className }) => {
747
867
  };
748
868
  const AthenaUserMessage = ({
749
869
  TextComponent = tiptapText.TiptapText
750
- }) => /* @__PURE__ */ jsxRuntime.jsx(
751
- react.MessagePrimitive.Root,
752
- {
753
- className: "aui-user-message-root fade-in slide-in-from-bottom-1 mx-auto flex w-full max-w-(--thread-max-width) animate-in justify-end px-2 py-3 duration-150",
754
- "data-role": "user",
755
- children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "aui-user-message-content wrap-break-word rounded-2xl bg-muted px-4 py-2.5 text-foreground", children: /* @__PURE__ */ jsxRuntime.jsx(react.MessagePrimitive.Parts, { components: { Text: TextComponent } }) })
870
+ }) => {
871
+ const isWake = react.useAuiState((s) => {
872
+ var _a;
873
+ return githubWakeEvent.isGithubWakeMessage((_a = s.message.metadata) == null ? void 0 : _a.custom);
874
+ });
875
+ if (isWake) {
876
+ return /* @__PURE__ */ jsxRuntime.jsxs(
877
+ react.MessagePrimitive.Root,
878
+ {
879
+ className: "aui-user-message-root aui-wake-marker-root mx-auto w-full max-w-(--thread-max-width) px-2 py-1",
880
+ "data-role": "user",
881
+ children: [
882
+ /* @__PURE__ */ jsxRuntime.jsx(MessageDaySeparator, {}),
883
+ /* @__PURE__ */ jsxRuntime.jsx(wakeMarker.WakeMarkerMessage, {})
884
+ ]
885
+ }
886
+ );
756
887
  }
757
- );
888
+ return /* @__PURE__ */ jsxRuntime.jsxs(
889
+ react.MessagePrimitive.Root,
890
+ {
891
+ className: "aui-user-message-root group/aui-user-message fade-in slide-in-from-bottom-1 mx-auto flex w-full max-w-(--thread-max-width) animate-in flex-col items-end px-2 py-3 duration-150",
892
+ "data-role": "user",
893
+ children: [
894
+ /* @__PURE__ */ jsxRuntime.jsx(MessageDaySeparator, {}),
895
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 max-w-[75%] flex-col items-end gap-1", children: [
896
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "aui-user-message-content wrap-break-word rounded-2xl bg-muted/70 px-4 py-2.5 text-foreground", children: /* @__PURE__ */ jsxRuntime.jsx(react.MessagePrimitive.Parts, { components: { Text: TextComponent } }) }),
897
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "aui-user-message-footer -mr-1 flex items-center gap-1", children: [
898
+ /* @__PURE__ */ jsxRuntime.jsx(MessageTimestamp, { className: "mr-1 group-hover/aui-user-message:opacity-100" }),
899
+ /* @__PURE__ */ jsxRuntime.jsx(messageComponents.BranchPicker, {}),
900
+ /* @__PURE__ */ jsxRuntime.jsx(AthenaUserActionBar, {})
901
+ ] })
902
+ ] })
903
+ ]
904
+ }
905
+ );
906
+ };
758
907
  exports.AthenaAssistantActionBar = AthenaAssistantActionBar;
759
908
  exports.AthenaAssistantMessage = AthenaAssistantMessage;
760
909
  exports.AthenaChat = AthenaChat;