@buoy-gg/ask-buoy 7.0.34 → 7.0.36

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 (352) hide show
  1. package/README.md +35 -8
  2. package/lib/commonjs/blocks/AskBlocks.js +338 -1
  3. package/lib/commonjs/blocks/AskBlocks.js.map +1 -0
  4. package/lib/commonjs/blocks/BlockRenderer.js +262 -1
  5. package/lib/commonjs/blocks/BlockRenderer.js.map +1 -0
  6. package/lib/commonjs/blocks/ChromePrototypes.js +514 -1
  7. package/lib/commonjs/blocks/ChromePrototypes.js.map +1 -0
  8. package/lib/commonjs/blocks/DataBlocks.js +781 -1
  9. package/lib/commonjs/blocks/DataBlocks.js.map +1 -0
  10. package/lib/commonjs/blocks/ExtraBlocks.js +1860 -1
  11. package/lib/commonjs/blocks/ExtraBlocks.js.map +1 -0
  12. package/lib/commonjs/blocks/MediaBlocks.js +156 -1
  13. package/lib/commonjs/blocks/MediaBlocks.js.map +1 -0
  14. package/lib/commonjs/blocks/ReceiptBlocks.js +586 -1
  15. package/lib/commonjs/blocks/ReceiptBlocks.js.map +1 -0
  16. package/lib/commonjs/blocks/blockText.js +60 -0
  17. package/lib/commonjs/blocks/blockText.js.map +1 -0
  18. package/lib/commonjs/blocks/blockText.test.js +53 -0
  19. package/lib/commonjs/blocks/blockText.test.js.map +1 -0
  20. package/lib/commonjs/blocks/context.js +42 -1
  21. package/lib/commonjs/blocks/context.js.map +1 -0
  22. package/lib/commonjs/blocks/icons.js +96 -1
  23. package/lib/commonjs/blocks/icons.js.map +1 -0
  24. package/lib/commonjs/blocks/index.js +95 -1
  25. package/lib/commonjs/blocks/index.js.map +1 -0
  26. package/lib/commonjs/blocks/listRow.test.js +55 -0
  27. package/lib/commonjs/blocks/listRow.test.js.map +1 -0
  28. package/lib/commonjs/blocks/pageState.js +34 -0
  29. package/lib/commonjs/blocks/pageState.js.map +1 -0
  30. package/lib/commonjs/blocks/pageState.test.js +57 -0
  31. package/lib/commonjs/blocks/pageState.test.js.map +1 -0
  32. package/lib/commonjs/blocks/primitives.js +457 -1
  33. package/lib/commonjs/blocks/primitives.js.map +1 -0
  34. package/lib/commonjs/blocks/primitivesIndex.js +62 -1
  35. package/lib/commonjs/blocks/primitivesIndex.js.map +1 -0
  36. package/lib/commonjs/components/ApprovalCard.js +244 -1
  37. package/lib/commonjs/components/ApprovalCard.js.map +1 -0
  38. package/lib/commonjs/components/AskBuoyHeader.js +196 -1
  39. package/lib/commonjs/components/AskBuoyHeader.js.map +1 -0
  40. package/lib/commonjs/components/AskBuoyIcon.js +19 -1
  41. package/lib/commonjs/components/AskBuoyIcon.js.map +1 -0
  42. package/lib/commonjs/components/AskBuoyModal.js +479 -1
  43. package/lib/commonjs/components/AskBuoyModal.js.map +1 -0
  44. package/lib/commonjs/components/AskBuoySettings.js +119 -0
  45. package/lib/commonjs/components/AskBuoySettings.js.map +1 -0
  46. package/lib/commonjs/components/ChangesBar.js +211 -1
  47. package/lib/commonjs/components/ChangesBar.js.map +1 -0
  48. package/lib/commonjs/components/Composer.js +255 -1
  49. package/lib/commonjs/components/Composer.js.map +1 -0
  50. package/lib/commonjs/components/EmptyState.js +161 -1
  51. package/lib/commonjs/components/EmptyState.js.map +1 -0
  52. package/lib/commonjs/components/KeyboardPad.js +80 -0
  53. package/lib/commonjs/components/KeyboardPad.js.map +1 -0
  54. package/lib/commonjs/components/Markdown.js +310 -1
  55. package/lib/commonjs/components/Markdown.js.map +1 -0
  56. package/lib/commonjs/components/MessageList.js +930 -1
  57. package/lib/commonjs/components/MessageList.js.map +1 -0
  58. package/lib/commonjs/components/QueuedMessages.js +145 -0
  59. package/lib/commonjs/components/QueuedMessages.js.map +1 -0
  60. package/lib/commonjs/components/ThinkingStrip.js +223 -0
  61. package/lib/commonjs/components/ThinkingStrip.js.map +1 -0
  62. package/lib/commonjs/components/TypingDots.js +63 -1
  63. package/lib/commonjs/components/TypingDots.js.map +1 -0
  64. package/lib/commonjs/components/markdownParse.js +131 -0
  65. package/lib/commonjs/components/markdownParse.js.map +1 -0
  66. package/lib/commonjs/components/markdownParse.test.js +99 -0
  67. package/lib/commonjs/components/markdownParse.test.js.map +1 -0
  68. package/lib/commonjs/components/useCopyAction.js +50 -0
  69. package/lib/commonjs/components/useCopyAction.js.map +1 -0
  70. package/lib/commonjs/index.js +252 -1
  71. package/lib/commonjs/index.js.map +1 -0
  72. package/lib/commonjs/preset.js +90 -1
  73. package/lib/commonjs/preset.js.map +1 -0
  74. package/lib/commonjs/store/activityGroups.js +110 -0
  75. package/lib/commonjs/store/activityGroups.js.map +1 -0
  76. package/lib/commonjs/store/activityGroups.test.js +78 -0
  77. package/lib/commonjs/store/activityGroups.test.js.map +1 -0
  78. package/lib/commonjs/store/askBuoySettings.js +72 -0
  79. package/lib/commonjs/store/askBuoySettings.js.map +1 -0
  80. package/lib/commonjs/store/askBuoyStore.js +547 -1
  81. package/lib/commonjs/store/askBuoyStore.js.map +1 -0
  82. package/lib/commonjs/store/blockPlacement.js +64 -0
  83. package/lib/commonjs/store/blockPlacement.js.map +1 -0
  84. package/lib/commonjs/store/blockPlacement.test.js +123 -0
  85. package/lib/commonjs/store/blockPlacement.test.js.map +1 -0
  86. package/lib/commonjs/store/queue.test.js +150 -0
  87. package/lib/commonjs/store/queue.test.js.map +1 -0
  88. package/lib/commonjs/store/resetConversation.js +77 -0
  89. package/lib/commonjs/store/resetConversation.js.map +1 -0
  90. package/lib/commonjs/store/restorePending.test.js +63 -0
  91. package/lib/commonjs/store/restorePending.test.js.map +1 -0
  92. package/lib/commonjs/store/restoredIds.test.js +47 -0
  93. package/lib/commonjs/store/restoredIds.test.js.map +1 -0
  94. package/lib/commonjs/store/suggestions.js +54 -0
  95. package/lib/commonjs/store/suggestions.js.map +1 -0
  96. package/lib/commonjs/store/suggestions.test.js +58 -0
  97. package/lib/commonjs/store/suggestions.test.js.map +1 -0
  98. package/lib/commonjs/store/systemLine.test.js +77 -0
  99. package/lib/commonjs/store/systemLine.test.js.map +1 -0
  100. package/lib/commonjs/store/ticketPrompt.js +17 -0
  101. package/lib/commonjs/store/ticketPrompt.js.map +1 -0
  102. package/lib/commonjs/store/traceText.js +81 -0
  103. package/lib/commonjs/store/traceText.js.map +1 -0
  104. package/lib/commonjs/store/traceText.test.js +112 -0
  105. package/lib/commonjs/store/traceText.test.js.map +1 -0
  106. package/lib/commonjs/store/transcriptPersistence.js +297 -0
  107. package/lib/commonjs/store/transcriptPersistence.js.map +1 -0
  108. package/lib/commonjs/store/transcriptPersistence.test.js +333 -0
  109. package/lib/commonjs/store/transcriptPersistence.test.js.map +1 -0
  110. package/lib/commonjs/store/turnRendering.test.js +151 -0
  111. package/lib/commonjs/store/turnRendering.test.js.map +1 -0
  112. package/lib/commonjs/store/useAskBuoy.js +622 -1
  113. package/lib/commonjs/store/useAskBuoy.js.map +1 -0
  114. package/lib/commonjs/store/useAskBuoySettings.js +14 -0
  115. package/lib/commonjs/store/useAskBuoySettings.js.map +1 -0
  116. package/lib/commonjs/sync/askBuoySyncAdapter.js +140 -1
  117. package/lib/commonjs/sync/askBuoySyncAdapter.js.map +1 -0
  118. package/lib/commonjs/sync/askBuoySyncAdapter.test.js +141 -1
  119. package/lib/commonjs/sync/askBuoySyncAdapter.test.js.map +1 -0
  120. package/lib/commonjs/sync/wire.js +58 -1
  121. package/lib/commonjs/sync/wire.js.map +1 -0
  122. package/lib/commonjs/types.js +6 -1
  123. package/lib/commonjs/types.js.map +1 -0
  124. package/lib/module/blocks/AskBlocks.js +331 -1
  125. package/lib/module/blocks/AskBlocks.js.map +1 -0
  126. package/lib/module/blocks/BlockRenderer.js +257 -1
  127. package/lib/module/blocks/BlockRenderer.js.map +1 -0
  128. package/lib/module/blocks/ChromePrototypes.js +503 -1
  129. package/lib/module/blocks/ChromePrototypes.js.map +1 -0
  130. package/lib/module/blocks/DataBlocks.js +767 -1
  131. package/lib/module/blocks/DataBlocks.js.map +1 -0
  132. package/lib/module/blocks/ExtraBlocks.js +1833 -1
  133. package/lib/module/blocks/ExtraBlocks.js.map +1 -0
  134. package/lib/module/blocks/MediaBlocks.js +151 -1
  135. package/lib/module/blocks/MediaBlocks.js.map +1 -0
  136. package/lib/module/blocks/ReceiptBlocks.js +574 -1
  137. package/lib/module/blocks/ReceiptBlocks.js.map +1 -0
  138. package/lib/module/blocks/blockText.js +55 -0
  139. package/lib/module/blocks/blockText.js.map +1 -0
  140. package/lib/module/blocks/blockText.test.js +53 -0
  141. package/lib/module/blocks/blockText.test.js.map +1 -0
  142. package/lib/module/blocks/context.js +35 -1
  143. package/lib/module/blocks/context.js.map +1 -0
  144. package/lib/module/blocks/icons.js +91 -1
  145. package/lib/module/blocks/icons.js.map +1 -0
  146. package/lib/module/blocks/index.js +8 -1
  147. package/lib/module/blocks/index.js.map +1 -0
  148. package/lib/module/blocks/listRow.test.js +56 -0
  149. package/lib/module/blocks/listRow.test.js.map +1 -0
  150. package/lib/module/blocks/pageState.js +30 -0
  151. package/lib/module/blocks/pageState.js.map +1 -0
  152. package/lib/module/blocks/pageState.test.js +56 -0
  153. package/lib/module/blocks/pageState.test.js.map +1 -0
  154. package/lib/module/blocks/primitives.js +445 -1
  155. package/lib/module/blocks/primitives.js.map +1 -0
  156. package/lib/module/blocks/primitivesIndex.js +5 -1
  157. package/lib/module/blocks/primitivesIndex.js.map +1 -0
  158. package/lib/module/components/ApprovalCard.js +239 -1
  159. package/lib/module/components/ApprovalCard.js.map +1 -0
  160. package/lib/module/components/AskBuoyHeader.js +193 -1
  161. package/lib/module/components/AskBuoyHeader.js.map +1 -0
  162. package/lib/module/components/AskBuoyIcon.js +8 -1
  163. package/lib/module/components/AskBuoyIcon.js.map +1 -0
  164. package/lib/module/components/AskBuoyModal.js +474 -1
  165. package/lib/module/components/AskBuoyModal.js.map +1 -0
  166. package/lib/module/components/AskBuoySettings.js +114 -0
  167. package/lib/module/components/AskBuoySettings.js.map +1 -0
  168. package/lib/module/components/ChangesBar.js +206 -1
  169. package/lib/module/components/ChangesBar.js.map +1 -0
  170. package/lib/module/components/Composer.js +250 -1
  171. package/lib/module/components/Composer.js.map +1 -0
  172. package/lib/module/components/EmptyState.js +156 -1
  173. package/lib/module/components/EmptyState.js.map +1 -0
  174. package/lib/module/components/KeyboardPad.js +75 -0
  175. package/lib/module/components/KeyboardPad.js.map +1 -0
  176. package/lib/module/components/Markdown.js +305 -1
  177. package/lib/module/components/Markdown.js.map +1 -0
  178. package/lib/module/components/MessageList.js +924 -1
  179. package/lib/module/components/MessageList.js.map +1 -0
  180. package/lib/module/components/QueuedMessages.js +140 -0
  181. package/lib/module/components/QueuedMessages.js.map +1 -0
  182. package/lib/module/components/ThinkingStrip.js +218 -0
  183. package/lib/module/components/ThinkingStrip.js.map +1 -0
  184. package/lib/module/components/TypingDots.js +58 -1
  185. package/lib/module/components/TypingDots.js.map +1 -0
  186. package/lib/module/components/markdownParse.js +125 -0
  187. package/lib/module/components/markdownParse.js.map +1 -0
  188. package/lib/module/components/markdownParse.test.js +98 -0
  189. package/lib/module/components/markdownParse.test.js.map +1 -0
  190. package/lib/module/components/useCopyAction.js +46 -0
  191. package/lib/module/components/useCopyAction.js.map +1 -0
  192. package/lib/module/index.js +34 -1
  193. package/lib/module/index.js.map +1 -0
  194. package/lib/module/preset.js +73 -1
  195. package/lib/module/preset.js.map +1 -0
  196. package/lib/module/store/activityGroups.js +103 -0
  197. package/lib/module/store/activityGroups.js.map +1 -0
  198. package/lib/module/store/activityGroups.test.js +77 -0
  199. package/lib/module/store/activityGroups.test.js.map +1 -0
  200. package/lib/module/store/askBuoySettings.js +67 -0
  201. package/lib/module/store/askBuoySettings.js.map +1 -0
  202. package/lib/module/store/askBuoyStore.js +541 -1
  203. package/lib/module/store/askBuoyStore.js.map +1 -0
  204. package/lib/module/store/blockPlacement.js +59 -0
  205. package/lib/module/store/blockPlacement.js.map +1 -0
  206. package/lib/module/store/blockPlacement.test.js +122 -0
  207. package/lib/module/store/blockPlacement.test.js.map +1 -0
  208. package/lib/module/store/queue.test.js +149 -0
  209. package/lib/module/store/queue.test.js.map +1 -0
  210. package/lib/module/store/resetConversation.js +72 -0
  211. package/lib/module/store/resetConversation.js.map +1 -0
  212. package/lib/module/store/restorePending.test.js +62 -0
  213. package/lib/module/store/restorePending.test.js.map +1 -0
  214. package/lib/module/store/restoredIds.test.js +46 -0
  215. package/lib/module/store/restoredIds.test.js.map +1 -0
  216. package/lib/module/store/suggestions.js +49 -0
  217. package/lib/module/store/suggestions.js.map +1 -0
  218. package/lib/module/store/suggestions.test.js +57 -0
  219. package/lib/module/store/suggestions.test.js.map +1 -0
  220. package/lib/module/store/systemLine.test.js +76 -0
  221. package/lib/module/store/systemLine.test.js.map +1 -0
  222. package/lib/module/store/ticketPrompt.js +13 -0
  223. package/lib/module/store/ticketPrompt.js.map +1 -0
  224. package/lib/module/store/traceText.js +75 -0
  225. package/lib/module/store/traceText.js.map +1 -0
  226. package/lib/module/store/traceText.test.js +111 -0
  227. package/lib/module/store/traceText.test.js.map +1 -0
  228. package/lib/module/store/transcriptPersistence.js +287 -0
  229. package/lib/module/store/transcriptPersistence.js.map +1 -0
  230. package/lib/module/store/transcriptPersistence.test.js +332 -0
  231. package/lib/module/store/transcriptPersistence.test.js.map +1 -0
  232. package/lib/module/store/turnRendering.test.js +150 -0
  233. package/lib/module/store/turnRendering.test.js.map +1 -0
  234. package/lib/module/store/useAskBuoy.js +616 -1
  235. package/lib/module/store/useAskBuoy.js.map +1 -0
  236. package/lib/module/store/useAskBuoySettings.js +9 -0
  237. package/lib/module/store/useAskBuoySettings.js.map +1 -0
  238. package/lib/module/sync/askBuoySyncAdapter.js +135 -1
  239. package/lib/module/sync/askBuoySyncAdapter.js.map +1 -0
  240. package/lib/module/sync/askBuoySyncAdapter.test.js +140 -1
  241. package/lib/module/sync/askBuoySyncAdapter.test.js.map +1 -0
  242. package/lib/module/sync/wire.js +47 -1
  243. package/lib/module/sync/wire.js.map +1 -0
  244. package/lib/module/types.js +4 -1
  245. package/lib/module/types.js.map +1 -0
  246. package/lib/typescript/blocks/AskBlocks.d.ts.map +1 -0
  247. package/lib/typescript/blocks/BlockRenderer.d.ts.map +1 -0
  248. package/lib/typescript/blocks/ChromePrototypes.d.ts.map +1 -0
  249. package/lib/typescript/blocks/DataBlocks.d.ts +42 -0
  250. package/lib/typescript/blocks/DataBlocks.d.ts.map +1 -0
  251. package/lib/typescript/blocks/ExtraBlocks.d.ts +29 -2
  252. package/lib/typescript/blocks/ExtraBlocks.d.ts.map +1 -0
  253. package/lib/typescript/blocks/MediaBlocks.d.ts.map +1 -0
  254. package/lib/typescript/blocks/ReceiptBlocks.d.ts.map +1 -0
  255. package/lib/typescript/blocks/blockText.d.ts +14 -0
  256. package/lib/typescript/blocks/blockText.d.ts.map +1 -0
  257. package/lib/typescript/blocks/blockText.test.d.ts +2 -0
  258. package/lib/typescript/blocks/blockText.test.d.ts.map +1 -0
  259. package/lib/typescript/blocks/context.d.ts.map +1 -0
  260. package/lib/typescript/blocks/icons.d.ts.map +1 -0
  261. package/lib/typescript/blocks/index.d.ts.map +1 -0
  262. package/lib/typescript/blocks/listRow.test.d.ts +2 -0
  263. package/lib/typescript/blocks/listRow.test.d.ts.map +1 -0
  264. package/lib/typescript/blocks/pageState.d.ts +23 -0
  265. package/lib/typescript/blocks/pageState.d.ts.map +1 -0
  266. package/lib/typescript/blocks/pageState.test.d.ts +2 -0
  267. package/lib/typescript/blocks/pageState.test.d.ts.map +1 -0
  268. package/lib/typescript/blocks/primitives.d.ts +55 -10
  269. package/lib/typescript/blocks/primitives.d.ts.map +1 -0
  270. package/lib/typescript/blocks/primitivesIndex.d.ts +2 -1
  271. package/lib/typescript/blocks/primitivesIndex.d.ts.map +1 -0
  272. package/lib/typescript/components/ApprovalCard.d.ts.map +1 -0
  273. package/lib/typescript/components/AskBuoyHeader.d.ts +41 -1
  274. package/lib/typescript/components/AskBuoyHeader.d.ts.map +1 -0
  275. package/lib/typescript/components/AskBuoyIcon.d.ts.map +1 -0
  276. package/lib/typescript/components/AskBuoyModal.d.ts.map +1 -0
  277. package/lib/typescript/components/AskBuoySettings.d.ts +2 -0
  278. package/lib/typescript/components/AskBuoySettings.d.ts.map +1 -0
  279. package/lib/typescript/components/ChangesBar.d.ts.map +1 -0
  280. package/lib/typescript/components/Composer.d.ts +16 -1
  281. package/lib/typescript/components/Composer.d.ts.map +1 -0
  282. package/lib/typescript/components/EmptyState.d.ts +5 -1
  283. package/lib/typescript/components/EmptyState.d.ts.map +1 -0
  284. package/lib/typescript/components/KeyboardPad.d.ts +33 -0
  285. package/lib/typescript/components/KeyboardPad.d.ts.map +1 -0
  286. package/lib/typescript/components/Markdown.d.ts +0 -10
  287. package/lib/typescript/components/Markdown.d.ts.map +1 -0
  288. package/lib/typescript/components/MessageList.d.ts +19 -7
  289. package/lib/typescript/components/MessageList.d.ts.map +1 -0
  290. package/lib/typescript/components/QueuedMessages.d.ts +10 -0
  291. package/lib/typescript/components/QueuedMessages.d.ts.map +1 -0
  292. package/lib/typescript/components/ThinkingStrip.d.ts +5 -0
  293. package/lib/typescript/components/ThinkingStrip.d.ts.map +1 -0
  294. package/lib/typescript/components/TypingDots.d.ts.map +1 -0
  295. package/lib/typescript/components/markdownParse.d.ts +49 -0
  296. package/lib/typescript/components/markdownParse.d.ts.map +1 -0
  297. package/lib/typescript/components/markdownParse.test.d.ts +2 -0
  298. package/lib/typescript/components/markdownParse.test.d.ts.map +1 -0
  299. package/lib/typescript/components/useCopyAction.d.ts +5 -0
  300. package/lib/typescript/components/useCopyAction.d.ts.map +1 -0
  301. package/lib/typescript/index.d.ts +5 -0
  302. package/lib/typescript/index.d.ts.map +1 -0
  303. package/lib/typescript/preset.d.ts.map +1 -0
  304. package/lib/typescript/store/activityGroups.d.ts +29 -0
  305. package/lib/typescript/store/activityGroups.d.ts.map +1 -0
  306. package/lib/typescript/store/activityGroups.test.d.ts +2 -0
  307. package/lib/typescript/store/activityGroups.test.d.ts.map +1 -0
  308. package/lib/typescript/store/askBuoySettings.d.ts +44 -0
  309. package/lib/typescript/store/askBuoySettings.d.ts.map +1 -0
  310. package/lib/typescript/store/askBuoyStore.d.ts +216 -18
  311. package/lib/typescript/store/askBuoyStore.d.ts.map +1 -0
  312. package/lib/typescript/store/blockPlacement.d.ts +30 -0
  313. package/lib/typescript/store/blockPlacement.d.ts.map +1 -0
  314. package/lib/typescript/store/blockPlacement.test.d.ts +2 -0
  315. package/lib/typescript/store/blockPlacement.test.d.ts.map +1 -0
  316. package/lib/typescript/store/queue.test.d.ts +2 -0
  317. package/lib/typescript/store/queue.test.d.ts.map +1 -0
  318. package/lib/typescript/store/resetConversation.d.ts +38 -0
  319. package/lib/typescript/store/resetConversation.d.ts.map +1 -0
  320. package/lib/typescript/store/restorePending.test.d.ts +2 -0
  321. package/lib/typescript/store/restorePending.test.d.ts.map +1 -0
  322. package/lib/typescript/store/restoredIds.test.d.ts +2 -0
  323. package/lib/typescript/store/restoredIds.test.d.ts.map +1 -0
  324. package/lib/typescript/store/suggestions.d.ts +32 -0
  325. package/lib/typescript/store/suggestions.d.ts.map +1 -0
  326. package/lib/typescript/store/suggestions.test.d.ts +2 -0
  327. package/lib/typescript/store/suggestions.test.d.ts.map +1 -0
  328. package/lib/typescript/store/systemLine.test.d.ts +2 -0
  329. package/lib/typescript/store/systemLine.test.d.ts.map +1 -0
  330. package/lib/typescript/store/ticketPrompt.d.ts +11 -0
  331. package/lib/typescript/store/ticketPrompt.d.ts.map +1 -0
  332. package/lib/typescript/store/traceText.d.ts +33 -0
  333. package/lib/typescript/store/traceText.d.ts.map +1 -0
  334. package/lib/typescript/store/traceText.test.d.ts +2 -0
  335. package/lib/typescript/store/traceText.test.d.ts.map +1 -0
  336. package/lib/typescript/store/transcriptPersistence.d.ts +79 -0
  337. package/lib/typescript/store/transcriptPersistence.d.ts.map +1 -0
  338. package/lib/typescript/store/transcriptPersistence.test.d.ts +2 -0
  339. package/lib/typescript/store/transcriptPersistence.test.d.ts.map +1 -0
  340. package/lib/typescript/store/turnRendering.test.d.ts +2 -0
  341. package/lib/typescript/store/turnRendering.test.d.ts.map +1 -0
  342. package/lib/typescript/store/useAskBuoy.d.ts +23 -1
  343. package/lib/typescript/store/useAskBuoy.d.ts.map +1 -0
  344. package/lib/typescript/store/useAskBuoySettings.d.ts +3 -0
  345. package/lib/typescript/store/useAskBuoySettings.d.ts.map +1 -0
  346. package/lib/typescript/sync/askBuoySyncAdapter.d.ts +26 -6
  347. package/lib/typescript/sync/askBuoySyncAdapter.d.ts.map +1 -0
  348. package/lib/typescript/sync/askBuoySyncAdapter.test.d.ts.map +1 -0
  349. package/lib/typescript/sync/wire.d.ts.map +1 -0
  350. package/lib/typescript/types.d.ts +24 -1
  351. package/lib/typescript/types.d.ts.map +1 -0
  352. package/package.json +9 -9
@@ -1 +1,930 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.MessageList=MessageList,exports.transcriptToText=transcriptToText;var _react=require("react"),_reactNative=require("react-native"),_sharedUi=require("@buoy-gg/shared-ui"),_agentCore=require("@buoy-gg/agent-core"),_BlockRenderer=require("../blocks/BlockRenderer"),_Markdown=require("./Markdown"),_TypingDots=require("./TypingDots"),_jsxRuntime=require("react/jsx-runtime");function StatusMark({status:e}){switch(e){case"running":return(0,_jsxRuntime.jsx)(_reactNative.ActivityIndicator,{size:"small",color:_sharedUi.night.color.textSecondary});case"ok":return(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.mark,styles.markOk],children:(0,_jsxRuntime.jsx)(_sharedUi.Check,{size:10,color:_sharedUi.night.color.onAccent})});case"failed":return(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.mark,styles.markFailed],children:(0,_jsxRuntime.jsx)(_sharedUi.X,{size:10,color:_sharedUi.night.color.text})});case"refused":return(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.mark,styles.markRefused],children:(0,_jsxRuntime.jsx)(_sharedUi.AlertTriangle,{size:10,color:_sharedUi.night.color.onAccent})})}}function statusText(e){return"running"===e.status?{text:"",tone:"muted"}:"refused"===e.status?{text:"Refused",tone:"warning"}:"failed"===e.status?{text:"Failed",tone:"danger"}:{text:e.summary||"Done",tone:"muted"}}function ActivityRow({call:e,last:t}){const[r,s]=(0,_react.useState)(!1),i=statusText(e),a=r?_sharedUi.ChevronDown:_sharedUi.ChevronRight,o="failed"===e.status&&e.summary&&"Failed"!==e.summary?e.summary:null;return(0,_jsxRuntime.jsxs)(_reactNative.Pressable,{testID:`buoy-ask-buoy-tool-${e.toolId}`,accessibilityRole:"button",accessibilityLabel:`${e.label}, ${i.text||"running"}`,accessibilityState:{expanded:r},onPress:()=>s(e=>!e),style:[styles.row,!t&&styles.rowDivider],children:[(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.rowLine,children:[(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.markSlot,children:(0,_jsxRuntime.jsx)(StatusMark,{status:e.status})}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.rowTitle,children:e.label}),i.text?(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.rowStatus,"danger"===i.tone&&styles.rowStatusDanger,"warning"===i.tone&&styles.rowStatusWarning],numberOfLines:1,children:i.text}):null,(0,_jsxRuntime.jsx)(a,{size:12,color:_sharedUi.night.color.textTertiary})]}),r&&(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.rowDetail,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.rowTool,children:(0,_agentCore.toolTitle)(e.toolId).toUpperCase()}),e.description?(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.rowDescription,children:e.description}):null,o?(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.rowFailure,children:o}):null]})]})}const COLLAPSE_AFTER=4;function ActivityCard({calls:e}){const[t,r]=(0,_react.useState)(!1),s=e.some(e=>"running"===e.status),i=e.length>4&&!t&&!s,a=e.filter(e=>"failed"===e.status).length,o=e.filter(e=>"refused"===e.status).length,n=i?e.filter(e=>"failed"===e.status||"refused"===e.status):e;return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.card,testID:"buoy-ask-buoy-activity",children:[i&&(0,_jsxRuntime.jsx)(_reactNative.Pressable,{onPress:()=>r(!0),accessibilityRole:"button",style:[styles.row,n.length>0&&styles.rowDivider],testID:"buoy-ask-buoy-activity-expand",children:(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.rowLine,children:[(0,_jsxRuntime.jsxs)(_reactNative.Text,{style:styles.rowTitle,children:["Did ",e.length," things",a?` · ${a} failed`:"",o?` · ${o} refused`:""]}),(0,_jsxRuntime.jsx)(_sharedUi.ChevronRight,{size:12,color:_sharedUi.night.color.textTertiary})]})}),n.map((e,t)=>(0,_jsxRuntime.jsx)(ActivityRow,{call:e,last:t===n.length-1},e.id))]})}function Blocks({blocks:e}){return 0===e.length?null:(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.blocks,children:e.map(({block:e})=>(0,_jsxRuntime.jsx)(_BlockRenderer.BlockRenderer,{block:e},e.id))})}function UserMessage({message:e}){return(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.userWrap,children:(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.userBubble,children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.userText,selectable:!0,children:e.text})})})}function AssistantMessage({message:e,onRetry:t}){const r=e.toolCalls.some(e=>"running"===e.status),s=!!e.streaming&&0===e.text.length&&!r,i=e.blocks.filter(e=>(0,_agentCore.isAskBlock)(e.block)),a=e.blocks.filter(e=>!(0,_agentCore.isAskBlock)(e.block));return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.assistantWrap,children:[e.toolCalls.length>0&&(0,_jsxRuntime.jsx)(ActivityCard,{calls:e.toolCalls}),(0,_jsxRuntime.jsx)(Blocks,{blocks:a}),e.text.length>0&&(0,_jsxRuntime.jsx)(_Markdown.Markdown,{text:e.text,style:styles.assistantText}),(0,_jsxRuntime.jsx)(Blocks,{blocks:i}),s&&(0,_jsxRuntime.jsx)(_TypingDots.TypingDots,{}),e.error&&(0,_jsxRuntime.jsx)(ErrorNote,{error:e.error,onRetry:t})]})}function ErrorNote({error:e,onRetry:t}){const r=/fetch failed|network|ECONN|timed? ?out|socket|abort/i.test(e)?"Couldn't reach your AI endpoint. Check the connection and try again.":"Something went wrong with that turn.";return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.errorBox,testID:"buoy-ask-buoy-error",children:[(0,_jsxRuntime.jsx)(_sharedUi.AlertTriangle,{size:14,color:_sharedUi.night.color.danger}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.errorBody,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.errorText,children:r}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.errorDetail,selectable:!0,children:e}),t&&(0,_jsxRuntime.jsx)(_reactNative.Pressable,{testID:"buoy-ask-buoy-retry",accessibilityRole:"button",onPress:t,style:({pressed:e})=>[styles.retry,e&&styles.retryPressed],children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.retryText,children:"Retry"})})]})]})}function transcriptToText(e){const t=[];for(const r of e)if("user"===r.role)t.push(`You: ${r.text}`);else{for(const e of r.toolCalls){const r="failed"===e.status||"refused"===e.status?` (${e.status})`:"";t.push(` · ${e.label}${e.summary?` — ${e.summary}`:""}${r}`)}r.text&&t.push(`Ask Buoy: ${r.text}`),r.error&&t.push(` ! ${r.error}`)}return t.join("\n")}function TranscriptActions({message:e,messages:t}){const r=(0,_react.useCallback)(()=>{_reactNative.Share.share({message:e.text}).catch(()=>{})},[e.text]),s=(0,_react.useCallback)(()=>{_reactNative.Share.share({message:transcriptToText(t)}).catch(()=>{})},[t]);return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.transcriptActions,children:[e.text.length>0&&(0,_jsxRuntime.jsx)(_reactNative.Pressable,{testID:"buoy-ask-buoy-share-reply",accessibilityRole:"button",onPress:r,style:({pressed:e})=>[styles.shareBtn,e&&styles.sharePressed],children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.shareText,children:"Share reply"})}),(0,_jsxRuntime.jsx)(_reactNative.Pressable,{testID:"buoy-ask-buoy-share-session",accessibilityRole:"button",onPress:s,style:({pressed:e})=>[styles.shareBtn,e&&styles.sharePressed],children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.shareText,children:"Share session"})})]})}function Row({message:e,messages:t,onRetry:r,isLast:s}){if("user"===e.role)return(0,_jsxRuntime.jsx)(UserMessage,{message:e});const i=!e.streaming&&!e.error;return(0,_jsxRuntime.jsxs)(_reactNative.View,{children:[(0,_jsxRuntime.jsx)(AssistantMessage,{message:e,onRetry:r}),s&&i&&(0,_jsxRuntime.jsx)(TranscriptActions,{message:e,messages:t})]})}function MessageList({messages:e,ListHeaderComponent:t,ListEmptyComponent:r,ListFooterComponent:s,onRetry:i}){const a=(0,_react.useRef)(null),o=(0,_react.useRef)(!0),n=(0,_react.useRef)(!1),l=(0,_react.useCallback)(e=>{const{contentOffset:t,contentSize:r,layoutMeasurement:s}=e.nativeEvent,i=r.height-s.height-t.y;o.current=i<80},[]),c=(0,_react.useCallback)(()=>{n.current=!0},[]),d=(0,_react.useCallback)(e=>{n.current&&l(e)},[l]),u=(0,_react.useCallback)(e=>{n.current=!1,l(e)},[l]),h=(0,_react.useCallback)(()=>{o.current&&(a.current?.scrollToEnd({animated:!1}),requestAnimationFrame(()=>a.current?.scrollToEnd({animated:!1})))},[]),g=e[e.length-1],x=g?`${g.id}:${g.text.length}:${g.toolCalls.length}:${g.error??""}`:"";return(0,_react.useEffect)(()=>{h()},[x,h]),(0,_jsxRuntime.jsx)(_reactNative.FlatList,{ref:a,testID:"buoy-ask-buoy-messages-scroll",style:styles.list,contentContainerStyle:styles.listContent,data:e,keyExtractor:e=>e.id,renderItem:({item:t})=>(0,_jsxRuntime.jsx)(Row,{message:t,messages:e,isLast:t.id===g?.id,onRetry:t.id===g?.id?i:void 0}),onScroll:d,onScrollBeginDrag:c,onScrollEndDrag:u,onMomentumScrollEnd:l,scrollEventThrottle:32,onContentSizeChange:h,keyboardShouldPersistTaps:"handled",keyboardDismissMode:"interactive",ListHeaderComponent:t,ListEmptyComponent:r,ListFooterComponent:s})}const styles=_reactNative.StyleSheet.create({list:{flex:1,backgroundColor:"transparent"},listContent:{paddingHorizontal:_sharedUi.night.gutter,paddingTop:12,paddingBottom:16,gap:16,flexGrow:1},userWrap:{alignItems:"flex-end"},userBubble:{maxWidth:"84%",paddingHorizontal:14,paddingVertical:9,borderRadius:18,borderBottomRightRadius:6,backgroundColor:_sharedUi.night.color.accentFill,borderWidth:_reactNative.StyleSheet.hairlineWidth,borderColor:_sharedUi.night.color.accentBorder},userText:{color:_sharedUi.night.color.text,fontSize:_sharedUi.night.font.row,lineHeight:21},assistantWrap:{alignItems:"stretch",gap:10},blocks:{gap:10},assistantText:{color:_sharedUi.night.color.text,fontSize:_sharedUi.night.font.row,lineHeight:22,paddingHorizontal:2},card:{borderRadius:_sharedUi.night.radius.card,borderWidth:_reactNative.StyleSheet.hairlineWidth,borderColor:_sharedUi.night.color.border,backgroundColor:_sharedUi.night.color.surface,overflow:"hidden"},row:{paddingHorizontal:12,paddingVertical:10},rowDivider:{borderBottomWidth:_reactNative.StyleSheet.hairlineWidth,borderBottomColor:_sharedUi.night.color.separator},rowLine:{flexDirection:"row",alignItems:"center",gap:10},markSlot:{width:18,height:18,alignItems:"center",justifyContent:"center"},mark:{width:16,height:16,borderRadius:8,alignItems:"center",justifyContent:"center"},markOk:{backgroundColor:_sharedUi.night.color.accent},markFailed:{backgroundColor:_sharedUi.night.color.danger},markRefused:{backgroundColor:_sharedUi.night.color.warning},rowTitle:{flex:1,color:_sharedUi.night.color.text,fontSize:_sharedUi.night.font.body,lineHeight:19},rowStatus:{color:_sharedUi.night.color.textTertiary,fontSize:_sharedUi.night.font.caption,maxWidth:120},rowStatusDanger:{color:_sharedUi.night.color.danger},rowStatusWarning:{color:_sharedUi.night.color.warning},rowDetail:{paddingLeft:28,paddingTop:8,gap:4},rowTool:{color:_sharedUi.night.color.textTertiary,fontSize:_sharedUi.night.font.micro,fontWeight:"600",letterSpacing:.8},rowDescription:{color:_sharedUi.night.color.textSecondary,fontSize:_sharedUi.night.font.caption,lineHeight:18},rowFailure:{color:_sharedUi.night.color.danger,fontSize:_sharedUi.night.font.caption,lineHeight:18},errorBox:{flexDirection:"row",alignItems:"flex-start",gap:8,paddingHorizontal:12,paddingVertical:10,borderRadius:_sharedUi.night.radius.row,backgroundColor:_sharedUi.night.color.dangerSoft},errorBody:{flex:1,gap:4},errorText:{color:_sharedUi.night.color.danger,fontSize:_sharedUi.night.font.caption,fontWeight:"600",lineHeight:18},errorDetail:{color:_sharedUi.night.color.textSecondary,fontSize:_sharedUi.night.font.micro,lineHeight:15},retry:{alignSelf:"flex-start",marginTop:6,paddingHorizontal:14,paddingVertical:7,borderRadius:_sharedUi.night.radius.row,backgroundColor:_sharedUi.night.color.button},retryPressed:{opacity:.7},retryText:{color:_sharedUi.night.color.accent,fontSize:_sharedUi.night.font.caption,fontWeight:"600"},transcriptActions:{flexDirection:"row",gap:8,marginTop:8},shareBtn:{paddingHorizontal:10,paddingVertical:5,borderRadius:_sharedUi.night.radius.badge,backgroundColor:_sharedUi.night.color.fill},sharePressed:{opacity:.7},shareText:{color:_sharedUi.night.color.textSecondary,fontSize:_sharedUi.night.font.micro,fontWeight:"600"}});
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.MessageList = MessageList;
7
+ exports.transcriptToText = transcriptToText;
8
+ var _react = require("react");
9
+ var _reactNative = require("react-native");
10
+ var _sharedUi = require("@buoy-gg/shared-ui");
11
+ var _agentCore = require("@buoy-gg/agent-core");
12
+ var _BlockRenderer = require("../blocks/BlockRenderer");
13
+ var _blockText = require("../blocks/blockText");
14
+ var _activityGroups = require("../store/activityGroups");
15
+ var _blockPlacement = require("../store/blockPlacement");
16
+ var _askBuoyStore = require("../store/askBuoyStore");
17
+ var _Markdown = require("./Markdown");
18
+ var _ThinkingStrip = require("./ThinkingStrip");
19
+ var _TypingDots = require("./TypingDots");
20
+ var _useCopyAction = require("./useCopyAction");
21
+ var _traceText = require("../store/traceText");
22
+ var _useAskBuoySettings = require("../store/useAskBuoySettings");
23
+ var _jsxRuntime = require("react/jsx-runtime");
24
+ /**
25
+ * The transcript.
26
+ *
27
+ * Owns the ONLY scroller in the sheet. JsModal's default wrapper uses
28
+ * `contentContainerStyle: { flexGrow: 1 }`, so a `flex: 1` scroller nested
29
+ * inside resolves against the CONTENT rather than the viewport: it grows to
30
+ * full content height, never scrolls, and the outer wrapper scrolls instead.
31
+ * That is invisible to a human and fatal to Detox ("View is not scrollable at
32
+ * the given start point"). The sheet passes `disableScrollWrapper` and this
33
+ * list is the one scroller.
34
+ *
35
+ * Layout, and why:
36
+ * - The user's messages are bubbles on the right; the assistant's text is
37
+ * plain, full-width prose on the left. A grey bubble around every answer
38
+ * cost 28pt of width per line and made the two sides look like the same
39
+ * speaker.
40
+ * - Tool calls render as an ACTIVITY CARD above the answer they produced —
41
+ * one row per call, a status mark, a short human title ("Open /bag") and a
42
+ * result word ("Done", "12 items", "Not found"). Nothing in a row is
43
+ * truncated to the point of being unreadable: the title wraps, and tapping
44
+ * the row expands it to the catalog's full sentence plus the tool it ran on.
45
+ * The previous version showed the model-facing sentence cut off at two
46
+ * lines with the result's JSON key names beside it, which was unreadable
47
+ * AND uninformative.
48
+ * - What a READ step returned (the receipt — "10 cached queries", a store's
49
+ * key/values) lives INSIDE that step's row and shows only when the row is
50
+ * expanded. Rendered as a standalone card under the activity list it read
51
+ * as part of the answer: a question about one Pokémon produced a wall of
52
+ * ten cache entries that a non-technical tester had no way to relate to
53
+ * what they asked. The step row already says "10 items"; tapping it is the
54
+ * ask for the detail. Receipts of WRITES (a diff of what changed) are drawn
55
+ * in full — that is the thing the user must see without asking.
56
+ * - CARDS COME LAST, AFTER THE PROSE. A turn reads activity → explanation →
57
+ * the thing itself, which is the order a person would say it in. It used to
58
+ * be the other way round, and on a long turn the answer — a grid of 28 shop
59
+ * items — landed at the TOP with five paragraphs of narration underneath it,
60
+ * so the finished answer arrived before the sentence explaining it. Ask
61
+ * blocks (choice/confirm/input) stay last of all: they are the question the
62
+ * turn ends on.
63
+ */
64
+
65
+ function StatusMark({
66
+ status
67
+ }) {
68
+ switch (status) {
69
+ case "running":
70
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
71
+ size: "small",
72
+ color: _sharedUi.night.color.textSecondary
73
+ });
74
+ case "ok":
75
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
76
+ style: [styles.mark, styles.markOk],
77
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.Check, {
78
+ size: 10,
79
+ color: _sharedUi.night.color.onAccent
80
+ })
81
+ });
82
+ case "failed":
83
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
84
+ style: [styles.mark, styles.markFailed],
85
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.X, {
86
+ size: 10,
87
+ color: _sharedUi.night.color.text
88
+ })
89
+ });
90
+ case "refused":
91
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
92
+ style: [styles.mark, styles.markRefused],
93
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.AlertTriangle, {
94
+ size: 10,
95
+ color: _sharedUi.night.color.onAccent
96
+ })
97
+ });
98
+ // A grey ring with a bar — drawn, not an icon, so the shape is distinct
99
+ // from every outcome the MODEL produced. `declined` had no case at all:
100
+ // the row rendered a blank slot, and later nobody could tell whether the
101
+ // person or the policy had stopped it.
102
+ case "declined":
103
+ case "stopped":
104
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
105
+ style: [styles.mark, styles.markNotRun],
106
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
107
+ style: styles.markNotRunBar
108
+ })
109
+ });
110
+ }
111
+ }
112
+
113
+ /** The trailing word: what happened, in one glance. */
114
+ function statusText(call) {
115
+ if (call.status === "running") return {
116
+ text: "",
117
+ tone: "muted"
118
+ };
119
+ if (call.status === "refused") return {
120
+ text: "Refused",
121
+ tone: "warning"
122
+ };
123
+ if (call.status === "failed") return {
124
+ text: "Failed",
125
+ tone: "danger"
126
+ };
127
+ if (call.status === "declined") return {
128
+ text: "You declined",
129
+ tone: "muted"
130
+ };
131
+ if (call.status === "stopped") return {
132
+ text: "Not run — stopped",
133
+ tone: "muted"
134
+ };
135
+ return {
136
+ text: call.summary || "Done",
137
+ tone: "muted"
138
+ };
139
+ }
140
+
141
+ /** Rows that never fold: anything that did not simply succeed. */
142
+ const isExceptional = c => c.status === "failed" || c.status === "refused" || c.status === "declined" || c.status === "stopped";
143
+ function ActivityRow({
144
+ call,
145
+ receipts,
146
+ last
147
+ }) {
148
+ const [open, setOpen] = (0, _react.useState)(false);
149
+ const status = statusText(call);
150
+ const Chevron = open ? _sharedUi.ChevronDown : _sharedUi.ChevronRight;
151
+ const failureDetail = call.status === "failed" && call.summary && call.summary !== "Failed" ? call.summary : null;
152
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
153
+ style: [styles.row, !last && styles.rowDivider],
154
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Pressable, {
155
+ testID: `buoy-ask-buoy-tool-${call.toolId}`,
156
+ accessibilityRole: "button",
157
+ accessibilityLabel: `${call.label}, ${status.text || "running"}`,
158
+ accessibilityState: {
159
+ expanded: open
160
+ },
161
+ onPress: () => setOpen(v => !v),
162
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
163
+ style: styles.rowLine,
164
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
165
+ style: styles.markSlot,
166
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(StatusMark, {
167
+ status: call.status
168
+ })
169
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
170
+ style: styles.rowTitle,
171
+ children: call.label
172
+ }), status.text ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
173
+ style: [styles.rowStatus, status.tone === "danger" && styles.rowStatusDanger, status.tone === "warning" && styles.rowStatusWarning],
174
+ numberOfLines: 1,
175
+ children: status.text
176
+ }) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)(Chevron, {
177
+ size: 12,
178
+ color: _sharedUi.night.color.textTertiary
179
+ })]
180
+ }), open && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
181
+ style: styles.rowDetail,
182
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
183
+ style: styles.rowTool,
184
+ children: (0, _agentCore.toolTitle)(call.toolId).toUpperCase()
185
+ }), call.description ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
186
+ style: styles.rowDescription,
187
+ children: call.description
188
+ }) : null, failureDetail ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
189
+ style: styles.rowFailure,
190
+ children: failureDetail
191
+ }) : null]
192
+ })]
193
+ }), open && receipts.length > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
194
+ style: styles.rowReceipts,
195
+ testID: `buoy-ask-buoy-tool-receipt-${call.toolId}`,
196
+ children: receipts.map(block => /*#__PURE__*/(0, _jsxRuntime.jsx)(_BlockRenderer.BlockRenderer, {
197
+ block: block
198
+ }, block.id))
199
+ })]
200
+ });
201
+ }
202
+
203
+ /**
204
+ * Consecutive successful reads fold into one row — "Looked at Network and
205
+ * Storage · 3 reads" — expandable to the individual rows. Everything else
206
+ * (running, failed, refused, declined, stopped, any write) is always its own
207
+ * row, and a group never crosses a write. See store/activityGroups.ts for the
208
+ * rule and why the old "Did 7 things" fold was replaced.
209
+ */
210
+ function ReadsGroup({
211
+ label,
212
+ count,
213
+ calls,
214
+ receipts,
215
+ last
216
+ }) {
217
+ const [open, setOpen] = (0, _react.useState)(false);
218
+ const Chevron = open ? _sharedUi.ChevronDown : _sharedUi.ChevronRight;
219
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
220
+ style: !last && !open && styles.rowDivider,
221
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
222
+ testID: "buoy-ask-buoy-reads-group",
223
+ accessibilityRole: "button",
224
+ accessibilityLabel: `${label}, ${count} reads`,
225
+ accessibilityState: {
226
+ expanded: open
227
+ },
228
+ onPress: () => setOpen(v => !v),
229
+ style: [styles.row, open && styles.rowDivider],
230
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
231
+ style: styles.rowLine,
232
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
233
+ style: styles.markSlot,
234
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(StatusMark, {
235
+ status: "ok"
236
+ })
237
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
238
+ style: styles.rowTitle,
239
+ children: label
240
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
241
+ style: styles.rowStatus,
242
+ numberOfLines: 1,
243
+ children: [count, " reads"]
244
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(Chevron, {
245
+ size: 12,
246
+ color: _sharedUi.night.color.textTertiary
247
+ })]
248
+ })
249
+ }), open && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
250
+ style: styles.groupBody,
251
+ children: calls.map((c, i) => /*#__PURE__*/(0, _jsxRuntime.jsx)(ActivityRow, {
252
+ call: c,
253
+ receipts: receipts.get(c.id) ?? [],
254
+ last: last && i === calls.length - 1
255
+ }, c.id))
256
+ })]
257
+ });
258
+ }
259
+ function ActivityCard({
260
+ calls,
261
+ receipts
262
+ }) {
263
+ const items = (0, _activityGroups.groupCalls)(calls);
264
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
265
+ style: styles.card,
266
+ testID: "buoy-ask-buoy-activity",
267
+ children: items.map((item, i) => item.kind === "reads" ? /*#__PURE__*/(0, _jsxRuntime.jsx)(ReadsGroup, {
268
+ label: item.label,
269
+ count: item.count,
270
+ calls: item.calls,
271
+ receipts: receipts,
272
+ last: i === items.length - 1
273
+ }, item.id) : /*#__PURE__*/(0, _jsxRuntime.jsx)(ActivityRow, {
274
+ call: item.call,
275
+ receipts: receipts.get(item.call.id) ?? [],
276
+ last: i === items.length - 1
277
+ }, item.call.id))
278
+ });
279
+ }
280
+
281
+ /** Write receipts and model blocks render between the activity card and the prose; Ask blocks last. */
282
+ function Blocks({
283
+ blocks
284
+ }) {
285
+ if (blocks.length === 0) return null;
286
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
287
+ style: styles.blocks,
288
+ children: blocks.map(({
289
+ block
290
+ }) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_BlockRenderer.BlockRenderer, {
291
+ block: block
292
+ }, block.id))
293
+ });
294
+ }
295
+
296
+ /** A line from Buoy, not the model. Dim, centred, no footer, no copy pill. */
297
+ function SystemLine({
298
+ message
299
+ }) {
300
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
301
+ style: styles.systemLine,
302
+ testID: "buoy-ask-buoy-system-line",
303
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
304
+ style: styles.systemText,
305
+ children: message.text
306
+ })
307
+ });
308
+ }
309
+ function UserMessage({
310
+ message
311
+ }) {
312
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
313
+ style: styles.userWrap,
314
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
315
+ style: styles.userBubble,
316
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
317
+ style: styles.userText,
318
+ selectable: true,
319
+ children: message.text
320
+ })
321
+ })
322
+ });
323
+ }
324
+ function AssistantMessage({
325
+ message,
326
+ onRetry,
327
+ waitingOnUser
328
+ }) {
329
+ const {
330
+ showThinking
331
+ } = (0, _useAskBuoySettings.useAskBuoySettings)();
332
+ /**
333
+ * The dots run for the WHOLE turn, not just the wait for the first token.
334
+ *
335
+ * They used to hide as soon as any prose arrived and while a tool call was
336
+ * running. A turn that says "pulling the catalogue up — one moment" and
337
+ * then works for another minute is the normal shape of this tool, and it
338
+ * spent that minute with nothing moving at the bottom of the chat: the
339
+ * activity card had already collapsed to "Did 16 things", so the only clue
340
+ * anything was still happening was the Stop button and the header
341
+ * subtitle. The row spinner in the activity card says which STEP is
342
+ * running; this says the TURN is.
343
+ *
344
+ * The one state it stays out of is a turn waiting on the user — an
345
+ * approval or an Ask block. Nothing is loading there.
346
+ */
347
+ const waiting = !!message.streaming && !waitingOnUser;
348
+ const {
349
+ nested,
350
+ afterText,
351
+ ask: askBlocks
352
+ } = (0, _blockPlacement.placeBlocks)(message.blocks, message.toolCalls.map(c => c.id));
353
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
354
+ style: styles.assistantWrap,
355
+ children: [message.toolCalls.length > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)(ActivityCard, {
356
+ calls: message.toolCalls,
357
+ receipts: nested
358
+ }), message.text.length > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Markdown.Markdown, {
359
+ text: message.text,
360
+ style: styles.assistantText
361
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(Blocks, {
362
+ blocks: afterText
363
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(Blocks, {
364
+ blocks: askBlocks
365
+ }), showThinking && !message.streaming && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ThinkingStrip.ThinkingStrip, {
366
+ message: message
367
+ }), waiting && /*#__PURE__*/(0, _jsxRuntime.jsx)(_TypingDots.TypingDots, {}), message.error && /*#__PURE__*/(0, _jsxRuntime.jsx)(ErrorNote, {
368
+ error: message.error,
369
+ onRetry: onRetry
370
+ }), message.stopped && !message.error && /*#__PURE__*/(0, _jsxRuntime.jsx)(StoppedNote, {
371
+ onRetry: onRetry,
372
+ changed: message.toolCalls.some(c => c.status === "ok" && !!c.effect && c.effect !== "read")
373
+ })]
374
+ });
375
+ }
376
+
377
+ /**
378
+ * A turn the user stopped.
379
+ *
380
+ * Deliberately not the error box: they pressed the button. The whole point is
381
+ * that it is quiet — a muted line, the same Try-again affordance, and none of
382
+ * the red "check your connection" advice that a cancelled fetch used to
383
+ * produce. When a write had already landed before the tap, the line says so:
384
+ * Stop cannot pull a dispatched change back out of the app, and "Stopped."
385
+ * alone read as if nothing had happened.
386
+ */
387
+ function StoppedNote({
388
+ onRetry,
389
+ changed
390
+ }) {
391
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
392
+ style: styles.stoppedBox,
393
+ testID: "buoy-ask-buoy-stopped",
394
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
395
+ style: styles.stoppedText,
396
+ children: changed ? "Stopped. Changes already made are listed above." : "Stopped."
397
+ }), onRetry && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
398
+ testID: "buoy-ask-buoy-retry",
399
+ accessibilityRole: "button",
400
+ accessibilityLabel: "Try again",
401
+ onPress: onRetry,
402
+ style: ({
403
+ pressed
404
+ }) => [styles.retry, pressed && styles.retryPressed],
405
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
406
+ style: styles.retryText,
407
+ children: "Try again"
408
+ })
409
+ })]
410
+ });
411
+ }
412
+
413
+ /**
414
+ * A failed turn. The headline is for the tester ("couldn't reach the
415
+ * endpoint"); the raw message stays underneath for whoever gets the bug
416
+ * report, because "fetch failed: UnexpectedException: The network connection
417
+ * was lost" is what a developer needs and nothing a tester can act on.
418
+ */
419
+ function ErrorNote({
420
+ error,
421
+ onRetry
422
+ }) {
423
+ const network = /fetch failed|network|ECONN|timed? ?out|socket/i.test(error);
424
+ const headline = network ? "Couldn't reach your AI endpoint. Check the connection and try again." : "Something went wrong with that turn.";
425
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
426
+ style: styles.errorBox,
427
+ testID: "buoy-ask-buoy-error",
428
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.AlertTriangle, {
429
+ size: 14,
430
+ color: _sharedUi.night.color.danger
431
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
432
+ style: styles.errorBody,
433
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
434
+ style: styles.errorText,
435
+ children: headline
436
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
437
+ style: styles.errorDetail,
438
+ selectable: true,
439
+ children: error
440
+ }), onRetry && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
441
+ testID: "buoy-ask-buoy-retry",
442
+ accessibilityRole: "button",
443
+ accessibilityLabel: "Try again",
444
+ onPress: onRetry,
445
+ style: ({
446
+ pressed
447
+ }) => [styles.retry, pressed && styles.retryPressed],
448
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
449
+ style: styles.retryText,
450
+ children: "Try again"
451
+ })
452
+ })]
453
+ })]
454
+ });
455
+ }
456
+
457
+ /**
458
+ * The whole conversation as plain text — the only thing Copy ever produces,
459
+ * and the only way a session leaves the DEVICE (what it saves to disk for a
460
+ * reload goes nowhere — see `transcriptPersistence`).
461
+ *
462
+ * Plain text on purpose. This lands in a Slack message, a ticket comment or a
463
+ * notes file, all of which are read by a person; a JSON document is a worse
464
+ * version of that everywhere except a parser, and nothing here parses it.
465
+ *
466
+ * With `Show agent thinking` on it carries the working too — the reasoning and
467
+ * each step with its parameters — because reading the run somewhere that is
468
+ * not a phone is the entire point of that setting.
469
+ */
470
+ function transcriptToText(messages, withTrace = false) {
471
+ const lines = [];
472
+ for (const m of messages) {
473
+ if (m.role === "user") {
474
+ lines.push(`You: ${m.text}`);
475
+ continue;
476
+ }
477
+ if (m.system) {
478
+ lines.push(` — ${m.text}`);
479
+ continue;
480
+ }
481
+ if (withTrace) {
482
+ lines.push(...(0, _traceText.traceToText)(m));
483
+ } else {
484
+ for (const c of m.toolCalls) {
485
+ const status = isExceptional(c) ? ` (${c.status})` : "";
486
+ lines.push(` · ${c.label}${c.summary ? ` — ${c.summary}` : ""}${status}`);
487
+ }
488
+ }
489
+ if (m.text) lines.push(`Ask Buoy: ${m.text}`);
490
+ // The cards, too. A finding is the thing a ticket wants and it used to be
491
+ // the one thing the paste left out.
492
+ for (const t of (0, _blockText.blocksToText)(m.blocks.map(p => p.block))) lines.push(t);
493
+ if (m.error) lines.push(` ! ${m.error}`);
494
+ if (m.stopped && !m.error) lines.push(" ! Stopped by the user.");
495
+ }
496
+ return lines.join("\n");
497
+ }
498
+
499
+ /** Copy, with the result visible for a moment. Shares the header's behaviour. */
500
+ function CopyPill({
501
+ testID,
502
+ label,
503
+ getText
504
+ }) {
505
+ const {
506
+ copied,
507
+ copy
508
+ } = (0, _useCopyAction.useCopyAction)(getText);
509
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Pressable, {
510
+ testID: testID,
511
+ accessibilityRole: "button",
512
+ accessibilityLabel: label,
513
+ onPress: copy,
514
+ style: ({
515
+ pressed
516
+ }) => [styles.copyBtn, styles.iconBtn, pressed && styles.copyPressed],
517
+ children: [copied ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.Check, {
518
+ size: 11,
519
+ color: _sharedUi.night.color.accent
520
+ }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.Copy, {
521
+ size: 11,
522
+ color: _sharedUi.night.color.textSecondary
523
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
524
+ style: [styles.copyText, copied && styles.copiedText],
525
+ children: copied ? "Copied" : label
526
+ })]
527
+ });
528
+ }
529
+
530
+ /**
531
+ * Under a finished answer: the turn's footer and one Copy.
532
+ *
533
+ * The footer — "48s · 6 actions · 1 declined" — is always on. Duration and
534
+ * counts used to exist only inside the opt-in thinking strip, so nothing
535
+ * separated one turn from the next and "how long did that take?" had no
536
+ * answer without a setting. See `turnFooter` for what is counted and why.
537
+ *
538
+ * Copy is on EVERY answer rather than only the newest, because the moment you
539
+ * decide to keep a conversation is usually a few replies after the one that
540
+ * went wrong, and scrolling to the bottom to find the button is friction at
541
+ * exactly the wrong time. It copies the WHOLE chat, and now says so: labelled
542
+ * "Copy" it read as "copy this answer", and a paste into Slack brought the
543
+ * full transcript. The text is built on press from the live store, so this
544
+ * component takes no `messages` prop and a streaming answer no longer
545
+ * re-renders every finished one.
546
+ */
547
+ function TranscriptActions({
548
+ message
549
+ }) {
550
+ const {
551
+ showThinking
552
+ } = (0, _useAskBuoySettings.useAskBuoySettings)();
553
+ const getText = (0, _react.useCallback)(() => transcriptToText(_askBuoyStore.askBuoyStore.getState().messages, showThinking), [showThinking]);
554
+ const footer = (0, _activityGroups.turnFooter)(message);
555
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
556
+ style: styles.transcriptActions,
557
+ children: [footer ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
558
+ style: styles.turnFooter,
559
+ testID: "buoy-ask-buoy-turn-footer",
560
+ children: footer
561
+ }) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)(CopyPill, {
562
+ testID: "buoy-ask-buoy-copy",
563
+ label: "Copy conversation",
564
+ getText: getText
565
+ })]
566
+ });
567
+ }
568
+
569
+ /**
570
+ * Memoised: a streaming answer changes the store on every token, and every
571
+ * row re-rendered for it. Props are the message itself (a new object when it
572
+ * changes), the retry handler (only the newest row gets one) and the waiting
573
+ * flag — nothing that changes when a DIFFERENT message streams.
574
+ */
575
+ const Row = /*#__PURE__*/(0, _react.memo)(function Row({
576
+ message,
577
+ onRetry,
578
+ waitingOnUser
579
+ }) {
580
+ if (message.role === "user") return /*#__PURE__*/(0, _jsxRuntime.jsx)(UserMessage, {
581
+ message: message
582
+ });
583
+ if (message.system) return /*#__PURE__*/(0, _jsxRuntime.jsx)(SystemLine, {
584
+ message: message
585
+ });
586
+ const finished = !message.streaming && !message.error;
587
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
588
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(AssistantMessage, {
589
+ message: message,
590
+ onRetry: onRetry,
591
+ waitingOnUser: waitingOnUser
592
+ }), finished && /*#__PURE__*/(0, _jsxRuntime.jsx)(TranscriptActions, {
593
+ message: message
594
+ })]
595
+ });
596
+ });
597
+ function MessageList({
598
+ messages,
599
+ ListHeaderComponent,
600
+ ListEmptyComponent,
601
+ ListFooterComponent,
602
+ onRetry,
603
+ waitingOnUser
604
+ }) {
605
+ const ref = (0, _react.useRef)(null);
606
+ // Only auto-scroll when the user is already at the bottom. Yanking them back
607
+ // down while they are reading an earlier answer is the classic chat-UI sin.
608
+ //
609
+ // "At the bottom" is decided from the USER's gestures, not from every scroll
610
+ // event. An animated scrollToEnd fires intermediate events while the content
611
+ // is still growing under it, and reading those as "the user scrolled up"
612
+ // silently unpinned the list mid-answer — the reply then streamed in below
613
+ // the fold and the last thing on screen was the question.
614
+ const pinned = (0, _react.useRef)(true);
615
+ const dragging = (0, _react.useRef)(false);
616
+ const measure = (0, _react.useCallback)(e => {
617
+ const {
618
+ contentOffset,
619
+ contentSize,
620
+ layoutMeasurement
621
+ } = e.nativeEvent;
622
+ const distance = contentSize.height - layoutMeasurement.height - contentOffset.y;
623
+ pinned.current = distance < 80;
624
+ }, []);
625
+ const onScrollBeginDrag = (0, _react.useCallback)(() => {
626
+ dragging.current = true;
627
+ }, []);
628
+ const onScroll = (0, _react.useCallback)(e => {
629
+ if (dragging.current) measure(e);
630
+ }, [measure]);
631
+ const onScrollEndDrag = (0, _react.useCallback)(e => {
632
+ dragging.current = false;
633
+ measure(e);
634
+ }, [measure]);
635
+ const scrollToEnd = (0, _react.useCallback)(() => {
636
+ if (!pinned.current) return;
637
+ // The size change fires before the new row has finished laying out its
638
+ // wrapped text; one frame later the end really is the end.
639
+ ref.current?.scrollToEnd({
640
+ animated: false
641
+ });
642
+ requestAnimationFrame(() => ref.current?.scrollToEnd({
643
+ animated: false
644
+ }));
645
+ }, []);
646
+
647
+ // A row can grow without the list reporting a size change in the same tick
648
+ // (an error box appended to the last message). Follow the transcript too.
649
+ const last = messages[messages.length - 1];
650
+ const tail = last ? `${last.id}:${last.text.length}:${last.toolCalls.length}:${last.error ?? ""}` : "";
651
+ (0, _react.useEffect)(() => {
652
+ scrollToEnd();
653
+ }, [tail, scrollToEnd]);
654
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.FlatList, {
655
+ ref: ref,
656
+ testID: "buoy-ask-buoy-messages-scroll",
657
+ style: styles.list,
658
+ contentContainerStyle: styles.listContent,
659
+ data: messages,
660
+ keyExtractor: m => m.id,
661
+ renderItem: ({
662
+ item
663
+ }) => /*#__PURE__*/(0, _jsxRuntime.jsx)(Row, {
664
+ message: item,
665
+ onRetry: item.id === last?.id ? onRetry : undefined,
666
+ waitingOnUser: item.id === last?.id ? waitingOnUser : false
667
+ }),
668
+ onScroll: onScroll,
669
+ onScrollBeginDrag: onScrollBeginDrag,
670
+ onScrollEndDrag: onScrollEndDrag,
671
+ onMomentumScrollEnd: measure,
672
+ scrollEventThrottle: 32,
673
+ onContentSizeChange: scrollToEnd
674
+ // Mandatory with a focused input below: without it the first tap after
675
+ // typing only dismisses the keyboard and the button never fires.
676
+ ,
677
+ keyboardShouldPersistTaps: "handled",
678
+ keyboardDismissMode: "interactive",
679
+ ListHeaderComponent: ListHeaderComponent,
680
+ ListEmptyComponent: ListEmptyComponent,
681
+ ListFooterComponent: ListFooterComponent
682
+ });
683
+ }
684
+ const styles = _reactNative.StyleSheet.create({
685
+ list: {
686
+ flex: 1,
687
+ backgroundColor: "transparent"
688
+ },
689
+ listContent: {
690
+ paddingHorizontal: _sharedUi.night.gutter,
691
+ paddingTop: 12,
692
+ paddingBottom: 16,
693
+ gap: 16,
694
+ flexGrow: 1
695
+ },
696
+ // User
697
+ userWrap: {
698
+ alignItems: "flex-end"
699
+ },
700
+ userBubble: {
701
+ maxWidth: "84%",
702
+ paddingHorizontal: 14,
703
+ paddingVertical: 9,
704
+ borderRadius: 18,
705
+ borderBottomRightRadius: 6,
706
+ backgroundColor: _sharedUi.night.color.accentFill,
707
+ borderWidth: _reactNative.StyleSheet.hairlineWidth,
708
+ borderColor: _sharedUi.night.color.accentBorder
709
+ },
710
+ userText: {
711
+ color: _sharedUi.night.color.text,
712
+ fontSize: _sharedUi.night.font.row,
713
+ lineHeight: 21
714
+ },
715
+ // Buoy's own lines
716
+ systemLine: {
717
+ alignSelf: "stretch",
718
+ paddingHorizontal: 12,
719
+ paddingVertical: 7,
720
+ borderRadius: _sharedUi.night.radius.row,
721
+ backgroundColor: _sharedUi.night.color.fill
722
+ },
723
+ systemText: {
724
+ color: _sharedUi.night.color.textSecondary,
725
+ fontSize: _sharedUi.night.font.micro,
726
+ lineHeight: 16,
727
+ textAlign: "center"
728
+ },
729
+ // Assistant
730
+ assistantWrap: {
731
+ alignItems: "stretch",
732
+ gap: 10
733
+ },
734
+ blocks: {
735
+ gap: 10
736
+ },
737
+ assistantText: {
738
+ color: _sharedUi.night.color.text,
739
+ fontSize: _sharedUi.night.font.row,
740
+ lineHeight: 22,
741
+ paddingHorizontal: 2
742
+ },
743
+ // Activity card
744
+ card: {
745
+ borderRadius: _sharedUi.night.radius.card,
746
+ borderWidth: _reactNative.StyleSheet.hairlineWidth,
747
+ borderColor: _sharedUi.night.color.border,
748
+ backgroundColor: _sharedUi.night.color.surface,
749
+ overflow: "hidden"
750
+ },
751
+ row: {
752
+ paddingHorizontal: 12,
753
+ paddingVertical: 10
754
+ },
755
+ rowDivider: {
756
+ borderBottomWidth: _reactNative.StyleSheet.hairlineWidth,
757
+ borderBottomColor: _sharedUi.night.color.separator
758
+ },
759
+ rowLine: {
760
+ flexDirection: "row",
761
+ alignItems: "center",
762
+ gap: 10
763
+ },
764
+ markSlot: {
765
+ width: 18,
766
+ height: 18,
767
+ alignItems: "center",
768
+ justifyContent: "center"
769
+ },
770
+ mark: {
771
+ width: 16,
772
+ height: 16,
773
+ borderRadius: 8,
774
+ alignItems: "center",
775
+ justifyContent: "center"
776
+ },
777
+ markOk: {
778
+ backgroundColor: _sharedUi.night.color.accent
779
+ },
780
+ markFailed: {
781
+ backgroundColor: _sharedUi.night.color.danger
782
+ },
783
+ markRefused: {
784
+ backgroundColor: _sharedUi.night.color.warning
785
+ },
786
+ markNotRun: {
787
+ borderWidth: 1.5,
788
+ borderColor: _sharedUi.night.color.textTertiary
789
+ },
790
+ markNotRunBar: {
791
+ width: 7,
792
+ height: 1.5,
793
+ borderRadius: 1,
794
+ backgroundColor: _sharedUi.night.color.textSecondary
795
+ },
796
+ rowTitle: {
797
+ flex: 1,
798
+ color: _sharedUi.night.color.text,
799
+ fontSize: _sharedUi.night.font.body,
800
+ lineHeight: 19
801
+ },
802
+ rowStatus: {
803
+ color: _sharedUi.night.color.textTertiary,
804
+ fontSize: _sharedUi.night.font.caption,
805
+ maxWidth: 120
806
+ },
807
+ rowStatusDanger: {
808
+ color: _sharedUi.night.color.danger
809
+ },
810
+ rowStatusWarning: {
811
+ color: _sharedUi.night.color.warning
812
+ },
813
+ rowDetail: {
814
+ paddingLeft: 28,
815
+ paddingTop: 8,
816
+ gap: 4
817
+ },
818
+ rowTool: {
819
+ color: _sharedUi.night.color.textTertiary,
820
+ fontSize: _sharedUi.night.font.micro,
821
+ fontWeight: "600",
822
+ letterSpacing: 0.8
823
+ },
824
+ rowDescription: {
825
+ color: _sharedUi.night.color.textSecondary,
826
+ fontSize: _sharedUi.night.font.caption,
827
+ lineHeight: 18
828
+ },
829
+ rowFailure: {
830
+ color: _sharedUi.night.color.danger,
831
+ fontSize: _sharedUi.night.font.caption,
832
+ lineHeight: 18
833
+ },
834
+ rowReceipts: {
835
+ paddingTop: 10,
836
+ gap: 10
837
+ },
838
+ groupBody: {
839
+ paddingLeft: 14,
840
+ backgroundColor: _sharedUi.night.color.fill
841
+ },
842
+ stoppedBox: {
843
+ alignItems: "flex-start",
844
+ gap: 2,
845
+ paddingHorizontal: 12,
846
+ paddingVertical: 8
847
+ },
848
+ stoppedText: {
849
+ color: _sharedUi.night.color.textTertiary,
850
+ fontSize: _sharedUi.night.font.caption,
851
+ lineHeight: 18
852
+ },
853
+ // Error
854
+ errorBox: {
855
+ flexDirection: "row",
856
+ alignItems: "flex-start",
857
+ gap: 8,
858
+ paddingHorizontal: 12,
859
+ paddingVertical: 10,
860
+ borderRadius: _sharedUi.night.radius.row,
861
+ backgroundColor: _sharedUi.night.color.dangerSoft
862
+ },
863
+ errorBody: {
864
+ flex: 1,
865
+ gap: 4
866
+ },
867
+ errorText: {
868
+ color: _sharedUi.night.color.danger,
869
+ fontSize: _sharedUi.night.font.caption,
870
+ fontWeight: "600",
871
+ lineHeight: 18
872
+ },
873
+ errorDetail: {
874
+ color: _sharedUi.night.color.textSecondary,
875
+ fontSize: _sharedUi.night.font.micro,
876
+ lineHeight: 15
877
+ },
878
+ retry: {
879
+ alignSelf: "flex-start",
880
+ marginTop: 6,
881
+ paddingHorizontal: 14,
882
+ paddingVertical: 7,
883
+ borderRadius: _sharedUi.night.radius.row,
884
+ backgroundColor: _sharedUi.night.color.button
885
+ },
886
+ retryPressed: {
887
+ opacity: 0.7
888
+ },
889
+ retryText: {
890
+ color: _sharedUi.night.color.accent,
891
+ fontSize: _sharedUi.night.font.caption,
892
+ fontWeight: "600"
893
+ },
894
+ transcriptActions: {
895
+ flexDirection: "row",
896
+ alignItems: "center",
897
+ gap: 10,
898
+ marginTop: 8
899
+ },
900
+ turnFooter: {
901
+ flex: 1,
902
+ color: _sharedUi.night.color.textTertiary,
903
+ fontSize: _sharedUi.night.font.micro,
904
+ fontVariant: ["tabular-nums"]
905
+ },
906
+ copyBtn: {
907
+ paddingHorizontal: 10,
908
+ paddingVertical: 5,
909
+ borderRadius: _sharedUi.night.radius.badge,
910
+ backgroundColor: _sharedUi.night.color.fill
911
+ },
912
+ iconBtn: {
913
+ flexDirection: "row",
914
+ alignItems: "center",
915
+ gap: 4,
916
+ paddingHorizontal: 8
917
+ },
918
+ copyPressed: {
919
+ opacity: 0.7
920
+ },
921
+ copyText: {
922
+ color: _sharedUi.night.color.textSecondary,
923
+ fontSize: _sharedUi.night.font.micro,
924
+ fontWeight: "600"
925
+ },
926
+ copiedText: {
927
+ color: _sharedUi.night.color.accent
928
+ }
929
+ });
930
+ //# sourceMappingURL=MessageList.js.map