@athenaintel/react 0.22.4 → 0.23.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (350) hide show
  1. package/README.md +394 -4
  2. package/dist/chat/AthenaChat.cjs +346 -244
  3. package/dist/chat/AthenaChat.cjs.map +1 -1
  4. package/dist/chat/AthenaChat.d.ts +19 -8
  5. package/dist/chat/AthenaChat.js +350 -248
  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 -95
  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 -95
  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 +38 -5
  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 +11 -0
  129. package/dist/chat-ui/rich-text/chat-node-views.js +39 -6
  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 +20 -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 +15 -2
  134. package/dist/chat-ui/rich-text/chat-text-schema.js +20 -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 +3 -3
  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,15 +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");
25
45
  const messageActionsConfig = require("../chat-ui/messages/message-actions-config.cjs");
26
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");
27
51
  const react = require("@assistant-ui/react");
28
52
  const lucideReact = require("lucide-react");
29
- const react$1 = require("react");
30
53
  const threadIdContext = require("../threads/thread-id-context.cjs");
31
54
  const FileUploadButton = require("../composer/FileUploadButton.cjs");
32
55
  const ComposerQuotePreview = require("../composer/ComposerQuotePreview.cjs");
@@ -39,36 +62,15 @@ const useAttachFiles = require("../composer/useAttachFiles.cjs");
39
62
  const AthenaContext = require("../provider/AthenaContext.cjs");
40
63
  const athenaUrls = require("../lib/athena-urls.cjs");
41
64
  const utils = require("../lib/utils.cjs");
42
- const useSendMessage = require("../composer/useSendMessage.cjs");
43
65
  const index = require("../toolkits/index.cjs");
44
66
  const runActivity = require("./run-activity.cjs");
67
+ const messageTime = require("./message-time.cjs");
68
+ const threadScrollToBottom = require("./thread-scroll-to-bottom.cjs");
45
69
  const cnfast = require("cnfast");
46
70
  function QuotePostMessageBridge() {
47
71
  QuoteContext.useQuoteFromPostMessage();
48
72
  return null;
49
73
  }
50
- const DEFAULT_SUGGESTIONS = [
51
- {
52
- icon: lucideReact.SearchIcon,
53
- title: "Research a topic and draft a report",
54
- 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."
55
- },
56
- {
57
- icon: lucideReact.SearchIcon,
58
- title: "Compare recent AI model launches",
59
- 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."
60
- },
61
- {
62
- icon: lucideReact.PresentationIcon,
63
- title: "Build a presentation from scratch",
64
- prompt: "Create a 5-slide investor update presentation covering market opportunity, product traction, key metrics, competitive positioning, and next steps."
65
- },
66
- {
67
- icon: lucideReact.FileTextIcon,
68
- title: "Set up a structured spreadsheet",
69
- prompt: "Create a project tracking spreadsheet with columns for task name, owner, priority, status, start date, due date, and completion percentage."
70
- }
71
- ];
72
74
  const AthenaChatDefaultComponentsContext = react$1.createContext(null);
73
75
  const AthenaReasoningTextComponentContext = react$1.createContext(null);
74
76
  const useAthenaChatDefaultComponents = () => {
@@ -79,11 +81,20 @@ const useAthenaChatDefaultComponents = () => {
79
81
  return value;
80
82
  };
81
83
  const AthenaDefaultAssistantMessage = () => {
82
- 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();
83
93
  return /* @__PURE__ */ jsxRuntime.jsx(
84
94
  AthenaAssistantMessage,
85
95
  {
86
96
  toolUIs,
97
+ AvatarComponent,
87
98
  TextComponent,
88
99
  ReasoningComponent,
89
100
  EmptyComponent,
@@ -122,50 +133,22 @@ const withNestedPtcMessages = (ToolUI) => {
122
133
  };
123
134
  return ToolUIWithNestedPtcMessages;
124
135
  };
125
- const SuggestionCard = ({
126
- suggestion,
127
- index: index2
128
- }) => {
129
- const Icon = suggestion.icon;
130
- const sendMessage = useSendMessage.useSendMessage();
131
- const handleClick = react$1.useCallback(() => {
132
- void sendMessage(suggestion.prompt);
133
- }, [sendMessage, suggestion.prompt]);
134
- return /* @__PURE__ */ jsxRuntime.jsxs(
135
- "button",
136
- {
137
- type: "button",
138
- onClick: handleClick,
139
- 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`,
140
- style: { animationDelay: `${100 + index2 * 75}ms` },
141
- children: [
142
- /* @__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" }) }),
143
- /* @__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 }) }),
144
- /* @__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" })
145
- ]
146
- }
147
- );
148
- };
149
- 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: [
150
- /* @__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 }),
151
- 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 }),
152
- 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)) })
153
- ] }) }) });
154
136
  const AthenaChat = ({
155
137
  className,
156
138
  welcomeMessage = "Hello there!",
157
139
  welcomeSubtext = "What can I help you with?",
158
- maxWidth = "44rem",
140
+ maxWidth = "46rem",
159
141
  turnAnchor = "bottom",
160
142
  readOnly = false,
161
143
  toolUIs,
162
144
  mentionTools,
163
- welcomeSuggestions = DEFAULT_SUGGESTIONS,
145
+ welcomeSuggestions = athenaChatWelcome.DEFAULT_WELCOME_SUGGESTIONS,
164
146
  components,
165
- groupToolCalls = false
147
+ groupToolCalls = true
166
148
  }) => {
167
149
  var _a, _b, _c;
168
150
  const athenaConfig = AthenaContext.useAthenaConfig();
151
+ const statewireThreadId = react$1.useContext(threadIdContext.AthenaStatewireThreadIdContext);
169
152
  const mentionAuth = react$1.useMemo(
170
153
  () => ({
171
154
  backendUrl: athenaConfig.backendUrl,
@@ -206,6 +189,7 @@ const AthenaChat = ({
206
189
  const reasoningComponent = (_b = components == null ? void 0 : components.messageParts) == null ? void 0 : _b.Reasoning;
207
190
  const emptyComponent = ((_c = components == null ? void 0 : components.messageParts) == null ? void 0 : _c.Empty) ?? AthenaAssistantMessageEmpty;
208
191
  const actionBarComponent = (components == null ? void 0 : components.AssistantActionBar) ?? AthenaAssistantActionBar;
192
+ const avatarComponent = components == null ? void 0 : components.AssistantAvatar;
209
193
  const defaultComponentsContextValue = react$1.useMemo(
210
194
  () => ({
211
195
  toolUIs: mergedToolUIs,
@@ -213,9 +197,18 @@ const AthenaChat = ({
213
197
  ReasoningComponent: reasoningComponent,
214
198
  EmptyComponent: emptyComponent,
215
199
  ActionBarComponent: actionBarComponent,
200
+ AvatarComponent: avatarComponent,
216
201
  groupToolCalls
217
202
  }),
218
- [actionBarComponent, emptyComponent, groupToolCalls, mergedToolUIs, reasoningComponent, textComponent]
203
+ [
204
+ actionBarComponent,
205
+ avatarComponent,
206
+ emptyComponent,
207
+ groupToolCalls,
208
+ mergedToolUIs,
209
+ reasoningComponent,
210
+ textComponent
211
+ ]
219
212
  );
220
213
  const AssistantMessageComponent = (components == null ? void 0 : components.AssistantMessage) ?? AthenaDefaultAssistantMessage;
221
214
  const UserMessageComponent = (components == null ? void 0 : components.UserMessage) ?? AthenaDefaultUserMessage;
@@ -226,10 +219,10 @@ const AthenaChat = ({
226
219
  }),
227
220
  [AssistantMessageComponent, UserMessageComponent]
228
221
  );
229
- 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(
230
223
  chatThreadShell.ChatThreadShell,
231
224
  {
232
- overlay: /* @__PURE__ */ jsxRuntime.jsx(ThreadLoadingOverlay, {}),
225
+ overlay: /* @__PURE__ */ jsxRuntime.jsx(threadLoadingOverlay.ThreadLoadingOverlay, {}),
233
226
  panelClassName: cnfast.cn(
234
227
  "aui-root aui-thread-root @container relative flex h-full flex-col bg-background",
235
228
  className
@@ -237,46 +230,35 @@ const AthenaChat = ({
237
230
  maxWidth,
238
231
  turnAnchor,
239
232
  readOnly,
233
+ banners: /* @__PURE__ */ jsxRuntime.jsx(WaitingOnYouBanner.WaitingOnYouBanner, { className: "px-4 pt-3" }),
240
234
  viewportClassName: "aui-thread-viewport relative flex flex-1 flex-col overflow-x-auto overflow-y-scroll scroll-smooth px-4 pt-4",
241
235
  contentClassName: "flex w-full flex-1 flex-col",
242
236
  viewportOverlay: /* @__PURE__ */ jsxRuntime.jsx(ThreadScrollToTop, {}),
243
- welcome: /* @__PURE__ */ jsxRuntime.jsx(
244
- AthenaChatWelcome,
245
- {
246
- welcomeMessage,
247
- welcomeSubtext,
248
- welcomeSuggestions
249
- }
250
- ),
237
+ welcome: /* @__PURE__ */ jsxRuntime.jsx(athenaChatWelcome.AthenaChatWelcome, { welcomeMessage, welcomeSubtext }),
251
238
  beforeMessages: /* @__PURE__ */ jsxRuntime.jsx(statewireHistoryEdge.StatewireHistoryEdge, { className: "aui-thread-history-edge" }),
252
239
  components: messageComponents2,
253
240
  runningIndicator: null,
254
- scrollToBottom: /* @__PURE__ */ jsxRuntime.jsx(ThreadScrollToBottom, {}),
255
- 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",
256
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 }) }),
257
245
  /* @__PURE__ */ jsxRuntime.jsx(statewireBanners.StatewireConnectionBanner, {}),
258
246
  /* @__PURE__ */ jsxRuntime.jsx(statewireBanners.StatewireErrorBanner, {}),
259
247
  /* @__PURE__ */ jsxRuntime.jsx(StatewireApprovalCard.StatewireApprovalCard, {}),
260
248
  /* @__PURE__ */ jsxRuntime.jsx(StatewireQueuedMessages.StatewireQueuedMessages, {}),
261
249
  /* @__PURE__ */ jsxRuntime.jsx(AttachmentContext.AttachmentProvider, { children: /* @__PURE__ */ jsxRuntime.jsxs(QuoteContext.QuoteProvider, { children: [
262
250
  /* @__PURE__ */ jsxRuntime.jsx(QuotePostMessageBridge, {}),
263
- /* @__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
+ ) })
264
258
  ] }) })
265
259
  ] })
266
260
  }
267
- ) }) });
268
- };
269
- const ThreadLoadingOverlay = () => {
270
- const remoteId = threadIdContext.useAthenaThreadId();
271
- const [timedOut, setTimedOut] = react$1.useState(false);
272
- react$1.useEffect(() => {
273
- if (!remoteId) return;
274
- setTimedOut(false);
275
- const timer = setTimeout(() => setTimedOut(true), 15e3);
276
- return () => clearTimeout(timer);
277
- }, [remoteId]);
278
- if (!remoteId || timedOut) return null;
279
- 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) });
280
262
  };
281
263
  const THREAD_VIEWPORT_ATTR = "data-aui-thread-viewport";
282
264
  const useScrollToTop = () => {
@@ -322,63 +304,13 @@ const ThreadScrollToTop = () => {
322
304
  }
323
305
  ) });
324
306
  };
325
- const ThreadScrollToBottom = () => /* @__PURE__ */ jsxRuntime.jsx(react.ThreadPrimitive.ScrollToBottom, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
326
- tooltipIconButton.TooltipIconButton,
327
- {
328
- tooltip: "Scroll to bottom",
329
- variant: "outline",
330
- 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",
331
- children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowDownIcon, {})
332
- }
333
- ) });
334
- const AthenaComposerSendButton = ({
335
- action,
336
- onSend,
337
- disabled,
338
- title
339
- }) => {
340
- const label = action === "queue" ? "Queue message" : "Send message";
341
- return /* @__PURE__ */ jsxRuntime.jsx(
342
- tooltipIconButton.TooltipIconButton,
343
- {
344
- tooltip: title ?? label,
345
- side: "bottom",
346
- type: "button",
347
- variant: "default",
348
- size: "icon",
349
- className: "aui-composer-send size-8 rounded-full",
350
- "aria-label": label,
351
- onClick: onSend,
352
- disabled,
353
- 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" })
354
- }
355
- );
356
- };
357
- const AthenaComposerStopButton = ({ onStop, disabled, title }) => /* @__PURE__ */ jsxRuntime.jsx(
358
- button.Button,
359
- {
360
- type: "button",
361
- variant: "default",
362
- size: "icon",
363
- className: "aui-composer-cancel size-8 rounded-full",
364
- "aria-label": "Stop generating",
365
- title,
366
- onClick: onStop,
367
- disabled,
368
- children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.SquareIcon, { className: "aui-composer-cancel-icon size-3 fill-current" })
369
- }
370
- );
371
- const ATHENA_COMPOSER_COMPONENTS = {
372
- SendButton: AthenaComposerSendButton,
373
- StopButton: AthenaComposerStopButton
374
- };
375
307
  const ATHENA_CHAT_MENTION_CATEGORIES = [
376
308
  "favorites",
377
309
  "assets",
378
310
  "projects",
379
311
  "folders"
380
312
  ];
381
- const AthenaChatComposer = ({ tools }) => {
313
+ const AthenaChatComposer = ({ tools, welcomeSuggestionCount }) => {
382
314
  const aui = react.useAui();
383
315
  const threadId = threadIdContext.useAthenaStatewireThreadId();
384
316
  const { appUrl } = AthenaContext.useAthenaConfig();
@@ -387,6 +319,15 @@ const AthenaChatComposer = ({ tools }) => {
387
319
  const { attachFiles } = useAttachFiles.useAttachFiles();
388
320
  const composerRef = react$1.useRef(null);
389
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
+ );
390
331
  const rootCategories = react$1.useMemo(() => {
391
332
  const categories = [...ATHENA_CHAT_MENTION_CATEGORIES];
392
333
  if (tools.some((tool) => tool.type === "toolkit")) categories.push("toolkits");
@@ -442,41 +383,62 @@ const AthenaChatComposer = ({ tools }) => {
442
383
  }),
443
384
  [attachFiles]
444
385
  );
445
- return /* @__PURE__ */ jsxRuntime.jsx(ComposerDropZone.ComposerDropZone, { children: /* @__PURE__ */ jsxRuntime.jsx(
446
- chatComposerDock.ChatComposerDock,
386
+ return /* @__PURE__ */ jsxRuntime.jsx(ComposerDropZone.ComposerDropZone, { onDragActiveChange: setDragActive, children: /* @__PURE__ */ jsxRuntime.jsx(
387
+ "div",
447
388
  {
448
- className: "",
449
- 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",
450
- editorRowClassName: "px-2.5",
451
- toolbarClassName: "aui-composer-action-wrapper relative mx-2 mb-2 flex items-center",
452
- beforeEditor: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
453
- /* @__PURE__ */ jsxRuntime.jsx(ComposerQuotePreview.ComposerQuotePreview, {}),
454
- /* @__PURE__ */ jsxRuntime.jsx(ComposerAttachmentPreview.ComposerAttachmentPreview, {})
455
- ] }),
456
- editor: /* @__PURE__ */ jsxRuntime.jsx(
457
- tiptapComposer.TiptapComposer,
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,
458
394
  {
459
- ref: composerRef,
460
- threadId,
461
- placeholder: "Type @ to tag an asset",
462
- tools,
463
- rootCategories,
464
- onDraftStateChange: setHasText,
465
- waitForHostUploads,
466
- interceptSubmit,
467
- fileIntake
468
- }
469
- ),
470
- toolbarStart: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-1", children: /* @__PURE__ */ jsxRuntime.jsx(FileUploadButton.FileUploadButton, {}) }),
471
- toolbarEnd: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-1", children: /* @__PURE__ */ jsxRuntime.jsx(
472
- composerSendOrStop.ComposerSendOrStop,
473
- {
474
- composerRef,
475
- hasDraft: hasText || hasExtras,
476
- sendBlockedReason: isUploading ? "Upload in progress..." : null,
477
- 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 })
478
440
  }
479
- ) })
441
+ )
480
442
  }
481
443
  ) });
482
444
  };
@@ -493,9 +455,54 @@ const MessageError = () => /* @__PURE__ */ jsxRuntime.jsx(react.MessagePrimitive
493
455
  }
494
456
  ) })
495
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
+ };
496
503
  const AthenaAssistantMessageEmpty = ({ status }) => {
497
504
  if ((status == null ? void 0 : status.type) !== "running") return null;
498
- 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" });
499
506
  };
500
507
  const AthenaMessageEmptyIndicator = ({
501
508
  EmptyComponent
@@ -514,27 +521,77 @@ const AthenaMessageActivityIndicator = () => {
514
521
  return ((_a = s.message.status) == null ? void 0 : _a.type) === "running";
515
522
  });
516
523
  const activityKey = react.useAuiState((s) => runActivity.runActivityKey(s.message.parts));
517
- const [seconds, setSeconds] = react$1.useState(0);
518
- react$1.useEffect(() => {
519
- setSeconds(0);
520
- if (!isRunning || activityKey === null) return;
521
- const startedAt = Date.now();
522
- const timer = setInterval(() => {
523
- setSeconds(Math.floor((Date.now() - startedAt) / 1e3));
524
- }, 1e3);
525
- return () => clearInterval(timer);
526
- }, [isRunning, activityKey]);
524
+ const verb = react.useAuiState((s) => runActivity.runActivityVerb(s.message.parts));
527
525
  if (!isRunning || activityKey === null) return null;
528
- const stalled = seconds >= runActivity.RUN_ACTIVITY_STALL_SECONDS;
529
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "aui-run-activity mt-2 flex items-center gap-2 px-1 text-[12px] text-muted-foreground", children: [
530
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-1", "aria-hidden": true, children: [
531
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "size-1.5 animate-bounce rounded-full bg-current [animation-delay:0ms]" }),
532
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "size-1.5 animate-bounce rounded-full bg-current [animation-delay:150ms]" }),
533
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "size-1.5 animate-bounce rounded-full bg-current [animation-delay:300ms]" })
534
- ] }),
535
- /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": true, className: stalled ? "text-amber-600 dark:text-amber-400" : void 0, children: runActivity.runActivityLabel(seconds) }),
536
- /* @__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." })
537
- ] });
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
+ );
538
595
  };
539
596
  const AthenaReasoningPart = ({
540
597
  text,
@@ -614,11 +671,12 @@ const AthenaReasoningPart = ({
614
671
  const noToolGrouping = () => null;
615
672
  const AthenaAssistantMessage = ({
616
673
  toolUIs,
674
+ AvatarComponent,
617
675
  TextComponent = tiptapText.TiptapText,
618
676
  ReasoningComponent,
619
677
  EmptyComponent = AthenaAssistantMessageEmpty,
620
678
  ActionBarComponent = AthenaAssistantActionBar,
621
- groupToolCalls = false
679
+ groupToolCalls = true
622
680
  }) => {
623
681
  const effectiveReasoningComponent = ReasoningComponent ?? AthenaReasoningPart;
624
682
  const toolUIsWithNestedMessages = react$1.useMemo(() => {
@@ -646,50 +704,71 @@ const AthenaAssistantMessage = ({
646
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",
647
705
  "data-role": "assistant",
648
706
  children: [
649
- /* @__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: [
650
- /* @__PURE__ */ jsxRuntime.jsx(NestedPtcMessages.NestedPtcComponentsProvider, { components: nestedPtcComponents, children: groupToolCalls ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col space-y-2", children: [
651
- /* @__PURE__ */ jsxRuntime.jsx(
652
- SuperGroupingCard.SuperGroupingCard,
653
- {
654
- toolUIs: toolUIsWithNestedMessages,
655
- TextComponent,
656
- ReasoningComponent: effectiveReasoningComponent
657
- }
658
- ),
659
- /* @__PURE__ */ jsxRuntime.jsx(SuperGroupingCard.SuperGroupingFinalText, { TextComponent }),
660
- /* @__PURE__ */ jsxRuntime.jsx(AthenaMessageActivityIndicator, {})
661
- ] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
662
- /* @__PURE__ */ jsxRuntime.jsx(AthenaMessageEmptyIndicator, { EmptyComponent }),
663
- /* @__PURE__ */ jsxRuntime.jsx(react.MessagePrimitive.GroupedParts, { groupBy: noToolGrouping, children: ({ part }) => {
664
- var _a;
665
- switch (part.type) {
666
- case "tool-call": {
667
- const ToolUI = toolUIsWithNestedMessages[part.toolName];
668
- const toolProps = part;
669
- return ToolUI ? /* @__PURE__ */ jsxRuntime.jsx(ToolUI, { ...toolProps }) : /* @__PURE__ */ jsxRuntime.jsx(toolFallback.ToolFallback, { ...toolProps });
670
- }
671
- case "reasoning": {
672
- const ReasoningRenderer = effectiveReasoningComponent;
673
- 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"
674
720
  }
675
- case "text": {
676
- const textPart = part;
677
- if (textPart.text === "" && ((_a = textPart.status) == null ? void 0 : _a.type) === "running") {
678
- 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
679
734
  }
680
- return /* @__PURE__ */ jsxRuntime.jsx(TextComponent, { ...textPart });
681
- }
682
- default:
683
- return null;
684
- }
685
- } }),
686
- /* @__PURE__ */ jsxRuntime.jsx(AthenaMessageActivityIndicator, {})
687
- ] }) }),
688
- /* @__PURE__ */ jsxRuntime.jsx(MessageError, {})
689
- ] }) }),
690
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "aui-assistant-message-footer mt-1 ml-2 flex items-center gap-1", children: [
691
- /* @__PURE__ */ jsxRuntime.jsx(messageComponents.BranchPicker, {}),
692
- /* @__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
+ ] })
693
772
  ] })
694
773
  ]
695
774
  }
@@ -788,20 +867,43 @@ const AthenaAssistantActionBar = ({ className }) => {
788
867
  };
789
868
  const AthenaUserMessage = ({
790
869
  TextComponent = tiptapText.TiptapText
791
- }) => /* @__PURE__ */ jsxRuntime.jsx(
792
- react.MessagePrimitive.Root,
793
- {
794
- 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 justify-end px-2 py-3 duration-150",
795
- "data-role": "user",
796
- children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 max-w-full flex-col items-end gap-1", children: [
797
- /* @__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 } }) }),
798
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "aui-user-message-footer -mr-1 flex items-center gap-1", children: [
799
- /* @__PURE__ */ jsxRuntime.jsx(messageComponents.BranchPicker, {}),
800
- /* @__PURE__ */ jsxRuntime.jsx(AthenaUserActionBar, {})
801
- ] })
802
- ] })
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
+ );
803
887
  }
804
- );
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
+ };
805
907
  exports.AthenaAssistantActionBar = AthenaAssistantActionBar;
806
908
  exports.AthenaAssistantMessage = AthenaAssistantMessage;
807
909
  exports.AthenaChat = AthenaChat;