@buoy-gg/ask-buoy 7.0.40 → 7.0.42

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 (314) hide show
  1. package/README.md +13 -94
  2. package/lib/commonjs/blocks/AskBlocks.js +1 -338
  3. package/lib/commonjs/blocks/BlockRenderer.js +1 -262
  4. package/lib/commonjs/blocks/ChromePrototypes.js +1 -514
  5. package/lib/commonjs/blocks/DataBlocks.js +1 -781
  6. package/lib/commonjs/blocks/ExtraBlocks.js +1 -1860
  7. package/lib/commonjs/blocks/MediaBlocks.js +1 -156
  8. package/lib/commonjs/blocks/ReceiptBlocks.js +2 -586
  9. package/lib/commonjs/blocks/blockText.js +1 -60
  10. package/lib/commonjs/blocks/blockText.test.js +1 -53
  11. package/lib/commonjs/blocks/context.js +1 -42
  12. package/lib/commonjs/blocks/icons.js +1 -96
  13. package/lib/commonjs/blocks/index.js +1 -95
  14. package/lib/commonjs/blocks/listRow.test.js +1 -55
  15. package/lib/commonjs/blocks/pageState.js +1 -34
  16. package/lib/commonjs/blocks/pageState.test.js +1 -57
  17. package/lib/commonjs/blocks/primitives.js +1 -457
  18. package/lib/commonjs/blocks/primitivesIndex.js +1 -62
  19. package/lib/commonjs/blocks/ruleStates.js +1 -0
  20. package/lib/commonjs/components/ApprovalCard.js +1 -297
  21. package/lib/commonjs/components/AskBuoyHeader.js +1 -196
  22. package/lib/commonjs/components/AskBuoyIcon.js +1 -19
  23. package/lib/commonjs/components/AskBuoyModal.js +2 -478
  24. package/lib/commonjs/components/AskBuoySettings.js +1 -181
  25. package/lib/commonjs/components/ChangesBar.js +1 -211
  26. package/lib/commonjs/components/Composer.js +1 -255
  27. package/lib/commonjs/components/EmptyState.js +1 -161
  28. package/lib/commonjs/components/KeyboardPad.js +1 -80
  29. package/lib/commonjs/components/Markdown.js +1 -310
  30. package/lib/commonjs/components/MessageList.js +1 -970
  31. package/lib/commonjs/components/QueuedMessages.js +1 -145
  32. package/lib/commonjs/components/ThinkingStrip.js +1 -223
  33. package/lib/commonjs/components/TypingDots.js +1 -63
  34. package/lib/commonjs/components/markdownParse.js +1 -131
  35. package/lib/commonjs/components/markdownParse.test.js +1 -99
  36. package/lib/commonjs/components/useCopyAction.js +1 -50
  37. package/lib/commonjs/index.js +1 -252
  38. package/lib/commonjs/preset.js +1 -91
  39. package/lib/commonjs/store/activityGroups.js +1 -110
  40. package/lib/commonjs/store/activityGroups.test.js +1 -78
  41. package/lib/commonjs/store/askBuoySettings.js +1 -72
  42. package/lib/commonjs/store/askBuoyStore.js +2 -588
  43. package/lib/commonjs/store/blockPlacement.js +1 -64
  44. package/lib/commonjs/store/blockPlacement.test.js +1 -123
  45. package/lib/commonjs/store/queue.test.js +1 -150
  46. package/lib/commonjs/store/resetConversation.js +1 -77
  47. package/lib/commonjs/store/restorePending.test.js +1 -63
  48. package/lib/commonjs/store/restoredIds.test.js +1 -47
  49. package/lib/commonjs/store/suggestions.js +1 -54
  50. package/lib/commonjs/store/suggestions.test.js +1 -58
  51. package/lib/commonjs/store/systemLine.test.js +1 -77
  52. package/lib/commonjs/store/ticketPrompt.js +1 -17
  53. package/lib/commonjs/store/traceText.js +1 -81
  54. package/lib/commonjs/store/traceText.test.js +1 -112
  55. package/lib/commonjs/store/transcriptPersistence.js +1 -297
  56. package/lib/commonjs/store/transcriptPersistence.test.js +1 -333
  57. package/lib/commonjs/store/turnRendering.test.js +1 -151
  58. package/lib/commonjs/store/useAskBuoy.js +1 -651
  59. package/lib/commonjs/store/useAskBuoySettings.js +1 -14
  60. package/lib/commonjs/sync/askBuoySyncAdapter.js +1 -153
  61. package/lib/commonjs/sync/askBuoySyncAdapter.test.js +1 -141
  62. package/lib/commonjs/sync/wire.js +1 -58
  63. package/lib/commonjs/types.js +1 -6
  64. package/lib/module/blocks/AskBlocks.js +1 -331
  65. package/lib/module/blocks/BlockRenderer.js +1 -257
  66. package/lib/module/blocks/ChromePrototypes.js +1 -503
  67. package/lib/module/blocks/DataBlocks.js +1 -767
  68. package/lib/module/blocks/ExtraBlocks.js +1 -1833
  69. package/lib/module/blocks/MediaBlocks.js +1 -151
  70. package/lib/module/blocks/ReceiptBlocks.js +2 -574
  71. package/lib/module/blocks/blockText.js +1 -55
  72. package/lib/module/blocks/blockText.test.js +1 -53
  73. package/lib/module/blocks/context.js +1 -35
  74. package/lib/module/blocks/icons.js +1 -91
  75. package/lib/module/blocks/index.js +1 -8
  76. package/lib/module/blocks/listRow.test.js +1 -56
  77. package/lib/module/blocks/pageState.js +1 -30
  78. package/lib/module/blocks/pageState.test.js +1 -56
  79. package/lib/module/blocks/primitives.js +1 -445
  80. package/lib/module/blocks/primitivesIndex.js +1 -5
  81. package/lib/module/blocks/ruleStates.js +1 -0
  82. package/lib/module/components/ApprovalCard.js +1 -292
  83. package/lib/module/components/AskBuoyHeader.js +1 -193
  84. package/lib/module/components/AskBuoyIcon.js +1 -8
  85. package/lib/module/components/AskBuoyModal.js +2 -473
  86. package/lib/module/components/AskBuoySettings.js +1 -176
  87. package/lib/module/components/ChangesBar.js +1 -206
  88. package/lib/module/components/Composer.js +1 -250
  89. package/lib/module/components/EmptyState.js +1 -156
  90. package/lib/module/components/KeyboardPad.js +1 -75
  91. package/lib/module/components/Markdown.js +1 -305
  92. package/lib/module/components/MessageList.js +1 -964
  93. package/lib/module/components/QueuedMessages.js +1 -140
  94. package/lib/module/components/ThinkingStrip.js +1 -218
  95. package/lib/module/components/TypingDots.js +1 -58
  96. package/lib/module/components/markdownParse.js +1 -125
  97. package/lib/module/components/markdownParse.test.js +1 -98
  98. package/lib/module/components/useCopyAction.js +1 -46
  99. package/lib/module/index.js +1 -34
  100. package/lib/module/preset.js +1 -74
  101. package/lib/module/store/activityGroups.js +1 -103
  102. package/lib/module/store/activityGroups.test.js +1 -77
  103. package/lib/module/store/askBuoySettings.js +1 -67
  104. package/lib/module/store/askBuoyStore.js +2 -582
  105. package/lib/module/store/blockPlacement.js +1 -59
  106. package/lib/module/store/blockPlacement.test.js +1 -122
  107. package/lib/module/store/queue.test.js +1 -149
  108. package/lib/module/store/resetConversation.js +1 -72
  109. package/lib/module/store/restorePending.test.js +1 -62
  110. package/lib/module/store/restoredIds.test.js +1 -46
  111. package/lib/module/store/suggestions.js +1 -49
  112. package/lib/module/store/suggestions.test.js +1 -57
  113. package/lib/module/store/systemLine.test.js +1 -76
  114. package/lib/module/store/ticketPrompt.js +1 -13
  115. package/lib/module/store/traceText.js +1 -75
  116. package/lib/module/store/traceText.test.js +1 -111
  117. package/lib/module/store/transcriptPersistence.js +1 -287
  118. package/lib/module/store/transcriptPersistence.test.js +1 -332
  119. package/lib/module/store/turnRendering.test.js +1 -150
  120. package/lib/module/store/useAskBuoy.js +1 -646
  121. package/lib/module/store/useAskBuoySettings.js +1 -9
  122. package/lib/module/sync/askBuoySyncAdapter.js +1 -148
  123. package/lib/module/sync/askBuoySyncAdapter.test.js +1 -140
  124. package/lib/module/sync/wire.js +1 -47
  125. package/lib/module/types.js +1 -4
  126. package/lib/typescript/blocks/context.d.ts +3 -0
  127. package/lib/typescript/blocks/ruleStates.d.ts +15 -0
  128. package/lib/typescript/components/ChangesBar.d.ts +2 -1
  129. package/lib/typescript/sync/askBuoySyncAdapter.d.ts +2 -2
  130. package/lib/web/index.mjs +15 -0
  131. package/package.json +44 -11
  132. package/lib/commonjs/blocks/AskBlocks.js.map +0 -1
  133. package/lib/commonjs/blocks/BlockRenderer.js.map +0 -1
  134. package/lib/commonjs/blocks/ChromePrototypes.js.map +0 -1
  135. package/lib/commonjs/blocks/DataBlocks.js.map +0 -1
  136. package/lib/commonjs/blocks/ExtraBlocks.js.map +0 -1
  137. package/lib/commonjs/blocks/MediaBlocks.js.map +0 -1
  138. package/lib/commonjs/blocks/ReceiptBlocks.js.map +0 -1
  139. package/lib/commonjs/blocks/blockText.js.map +0 -1
  140. package/lib/commonjs/blocks/blockText.test.js.map +0 -1
  141. package/lib/commonjs/blocks/context.js.map +0 -1
  142. package/lib/commonjs/blocks/icons.js.map +0 -1
  143. package/lib/commonjs/blocks/index.js.map +0 -1
  144. package/lib/commonjs/blocks/listRow.test.js.map +0 -1
  145. package/lib/commonjs/blocks/pageState.js.map +0 -1
  146. package/lib/commonjs/blocks/pageState.test.js.map +0 -1
  147. package/lib/commonjs/blocks/primitives.js.map +0 -1
  148. package/lib/commonjs/blocks/primitivesIndex.js.map +0 -1
  149. package/lib/commonjs/components/ApprovalCard.js.map +0 -1
  150. package/lib/commonjs/components/AskBuoyHeader.js.map +0 -1
  151. package/lib/commonjs/components/AskBuoyIcon.js.map +0 -1
  152. package/lib/commonjs/components/AskBuoyModal.js.map +0 -1
  153. package/lib/commonjs/components/AskBuoySettings.js.map +0 -1
  154. package/lib/commonjs/components/ChangesBar.js.map +0 -1
  155. package/lib/commonjs/components/Composer.js.map +0 -1
  156. package/lib/commonjs/components/EmptyState.js.map +0 -1
  157. package/lib/commonjs/components/KeyboardPad.js.map +0 -1
  158. package/lib/commonjs/components/Markdown.js.map +0 -1
  159. package/lib/commonjs/components/MessageList.js.map +0 -1
  160. package/lib/commonjs/components/QueuedMessages.js.map +0 -1
  161. package/lib/commonjs/components/ThinkingStrip.js.map +0 -1
  162. package/lib/commonjs/components/TypingDots.js.map +0 -1
  163. package/lib/commonjs/components/markdownParse.js.map +0 -1
  164. package/lib/commonjs/components/markdownParse.test.js.map +0 -1
  165. package/lib/commonjs/components/useCopyAction.js.map +0 -1
  166. package/lib/commonjs/index.js.map +0 -1
  167. package/lib/commonjs/preset.js.map +0 -1
  168. package/lib/commonjs/store/activityGroups.js.map +0 -1
  169. package/lib/commonjs/store/activityGroups.test.js.map +0 -1
  170. package/lib/commonjs/store/askBuoySettings.js.map +0 -1
  171. package/lib/commonjs/store/askBuoyStore.js.map +0 -1
  172. package/lib/commonjs/store/blockPlacement.js.map +0 -1
  173. package/lib/commonjs/store/blockPlacement.test.js.map +0 -1
  174. package/lib/commonjs/store/queue.test.js.map +0 -1
  175. package/lib/commonjs/store/resetConversation.js.map +0 -1
  176. package/lib/commonjs/store/restorePending.test.js.map +0 -1
  177. package/lib/commonjs/store/restoredIds.test.js.map +0 -1
  178. package/lib/commonjs/store/suggestions.js.map +0 -1
  179. package/lib/commonjs/store/suggestions.test.js.map +0 -1
  180. package/lib/commonjs/store/systemLine.test.js.map +0 -1
  181. package/lib/commonjs/store/ticketPrompt.js.map +0 -1
  182. package/lib/commonjs/store/traceText.js.map +0 -1
  183. package/lib/commonjs/store/traceText.test.js.map +0 -1
  184. package/lib/commonjs/store/transcriptPersistence.js.map +0 -1
  185. package/lib/commonjs/store/transcriptPersistence.test.js.map +0 -1
  186. package/lib/commonjs/store/turnRendering.test.js.map +0 -1
  187. package/lib/commonjs/store/useAskBuoy.js.map +0 -1
  188. package/lib/commonjs/store/useAskBuoySettings.js.map +0 -1
  189. package/lib/commonjs/sync/askBuoySyncAdapter.js.map +0 -1
  190. package/lib/commonjs/sync/askBuoySyncAdapter.test.js.map +0 -1
  191. package/lib/commonjs/sync/wire.js.map +0 -1
  192. package/lib/commonjs/types.js.map +0 -1
  193. package/lib/module/blocks/AskBlocks.js.map +0 -1
  194. package/lib/module/blocks/BlockRenderer.js.map +0 -1
  195. package/lib/module/blocks/ChromePrototypes.js.map +0 -1
  196. package/lib/module/blocks/DataBlocks.js.map +0 -1
  197. package/lib/module/blocks/ExtraBlocks.js.map +0 -1
  198. package/lib/module/blocks/MediaBlocks.js.map +0 -1
  199. package/lib/module/blocks/ReceiptBlocks.js.map +0 -1
  200. package/lib/module/blocks/blockText.js.map +0 -1
  201. package/lib/module/blocks/blockText.test.js.map +0 -1
  202. package/lib/module/blocks/context.js.map +0 -1
  203. package/lib/module/blocks/icons.js.map +0 -1
  204. package/lib/module/blocks/index.js.map +0 -1
  205. package/lib/module/blocks/listRow.test.js.map +0 -1
  206. package/lib/module/blocks/pageState.js.map +0 -1
  207. package/lib/module/blocks/pageState.test.js.map +0 -1
  208. package/lib/module/blocks/primitives.js.map +0 -1
  209. package/lib/module/blocks/primitivesIndex.js.map +0 -1
  210. package/lib/module/components/ApprovalCard.js.map +0 -1
  211. package/lib/module/components/AskBuoyHeader.js.map +0 -1
  212. package/lib/module/components/AskBuoyIcon.js.map +0 -1
  213. package/lib/module/components/AskBuoyModal.js.map +0 -1
  214. package/lib/module/components/AskBuoySettings.js.map +0 -1
  215. package/lib/module/components/ChangesBar.js.map +0 -1
  216. package/lib/module/components/Composer.js.map +0 -1
  217. package/lib/module/components/EmptyState.js.map +0 -1
  218. package/lib/module/components/KeyboardPad.js.map +0 -1
  219. package/lib/module/components/Markdown.js.map +0 -1
  220. package/lib/module/components/MessageList.js.map +0 -1
  221. package/lib/module/components/QueuedMessages.js.map +0 -1
  222. package/lib/module/components/ThinkingStrip.js.map +0 -1
  223. package/lib/module/components/TypingDots.js.map +0 -1
  224. package/lib/module/components/markdownParse.js.map +0 -1
  225. package/lib/module/components/markdownParse.test.js.map +0 -1
  226. package/lib/module/components/useCopyAction.js.map +0 -1
  227. package/lib/module/index.js.map +0 -1
  228. package/lib/module/preset.js.map +0 -1
  229. package/lib/module/store/activityGroups.js.map +0 -1
  230. package/lib/module/store/activityGroups.test.js.map +0 -1
  231. package/lib/module/store/askBuoySettings.js.map +0 -1
  232. package/lib/module/store/askBuoyStore.js.map +0 -1
  233. package/lib/module/store/blockPlacement.js.map +0 -1
  234. package/lib/module/store/blockPlacement.test.js.map +0 -1
  235. package/lib/module/store/queue.test.js.map +0 -1
  236. package/lib/module/store/resetConversation.js.map +0 -1
  237. package/lib/module/store/restorePending.test.js.map +0 -1
  238. package/lib/module/store/restoredIds.test.js.map +0 -1
  239. package/lib/module/store/suggestions.js.map +0 -1
  240. package/lib/module/store/suggestions.test.js.map +0 -1
  241. package/lib/module/store/systemLine.test.js.map +0 -1
  242. package/lib/module/store/ticketPrompt.js.map +0 -1
  243. package/lib/module/store/traceText.js.map +0 -1
  244. package/lib/module/store/traceText.test.js.map +0 -1
  245. package/lib/module/store/transcriptPersistence.js.map +0 -1
  246. package/lib/module/store/transcriptPersistence.test.js.map +0 -1
  247. package/lib/module/store/turnRendering.test.js.map +0 -1
  248. package/lib/module/store/useAskBuoy.js.map +0 -1
  249. package/lib/module/store/useAskBuoySettings.js.map +0 -1
  250. package/lib/module/sync/askBuoySyncAdapter.js.map +0 -1
  251. package/lib/module/sync/askBuoySyncAdapter.test.js.map +0 -1
  252. package/lib/module/sync/wire.js.map +0 -1
  253. package/lib/module/types.js.map +0 -1
  254. package/lib/typescript/blocks/AskBlocks.d.ts.map +0 -1
  255. package/lib/typescript/blocks/BlockRenderer.d.ts.map +0 -1
  256. package/lib/typescript/blocks/ChromePrototypes.d.ts.map +0 -1
  257. package/lib/typescript/blocks/DataBlocks.d.ts.map +0 -1
  258. package/lib/typescript/blocks/ExtraBlocks.d.ts.map +0 -1
  259. package/lib/typescript/blocks/MediaBlocks.d.ts.map +0 -1
  260. package/lib/typescript/blocks/ReceiptBlocks.d.ts.map +0 -1
  261. package/lib/typescript/blocks/blockText.d.ts.map +0 -1
  262. package/lib/typescript/blocks/blockText.test.d.ts.map +0 -1
  263. package/lib/typescript/blocks/context.d.ts.map +0 -1
  264. package/lib/typescript/blocks/icons.d.ts.map +0 -1
  265. package/lib/typescript/blocks/index.d.ts.map +0 -1
  266. package/lib/typescript/blocks/listRow.test.d.ts.map +0 -1
  267. package/lib/typescript/blocks/pageState.d.ts.map +0 -1
  268. package/lib/typescript/blocks/pageState.test.d.ts.map +0 -1
  269. package/lib/typescript/blocks/primitives.d.ts.map +0 -1
  270. package/lib/typescript/blocks/primitivesIndex.d.ts.map +0 -1
  271. package/lib/typescript/components/ApprovalCard.d.ts.map +0 -1
  272. package/lib/typescript/components/AskBuoyHeader.d.ts.map +0 -1
  273. package/lib/typescript/components/AskBuoyIcon.d.ts.map +0 -1
  274. package/lib/typescript/components/AskBuoyModal.d.ts.map +0 -1
  275. package/lib/typescript/components/AskBuoySettings.d.ts.map +0 -1
  276. package/lib/typescript/components/ChangesBar.d.ts.map +0 -1
  277. package/lib/typescript/components/Composer.d.ts.map +0 -1
  278. package/lib/typescript/components/EmptyState.d.ts.map +0 -1
  279. package/lib/typescript/components/KeyboardPad.d.ts.map +0 -1
  280. package/lib/typescript/components/Markdown.d.ts.map +0 -1
  281. package/lib/typescript/components/MessageList.d.ts.map +0 -1
  282. package/lib/typescript/components/QueuedMessages.d.ts.map +0 -1
  283. package/lib/typescript/components/ThinkingStrip.d.ts.map +0 -1
  284. package/lib/typescript/components/TypingDots.d.ts.map +0 -1
  285. package/lib/typescript/components/markdownParse.d.ts.map +0 -1
  286. package/lib/typescript/components/markdownParse.test.d.ts.map +0 -1
  287. package/lib/typescript/components/useCopyAction.d.ts.map +0 -1
  288. package/lib/typescript/index.d.ts.map +0 -1
  289. package/lib/typescript/preset.d.ts.map +0 -1
  290. package/lib/typescript/store/activityGroups.d.ts.map +0 -1
  291. package/lib/typescript/store/activityGroups.test.d.ts.map +0 -1
  292. package/lib/typescript/store/askBuoySettings.d.ts.map +0 -1
  293. package/lib/typescript/store/askBuoyStore.d.ts.map +0 -1
  294. package/lib/typescript/store/blockPlacement.d.ts.map +0 -1
  295. package/lib/typescript/store/blockPlacement.test.d.ts.map +0 -1
  296. package/lib/typescript/store/queue.test.d.ts.map +0 -1
  297. package/lib/typescript/store/resetConversation.d.ts.map +0 -1
  298. package/lib/typescript/store/restorePending.test.d.ts.map +0 -1
  299. package/lib/typescript/store/restoredIds.test.d.ts.map +0 -1
  300. package/lib/typescript/store/suggestions.d.ts.map +0 -1
  301. package/lib/typescript/store/suggestions.test.d.ts.map +0 -1
  302. package/lib/typescript/store/systemLine.test.d.ts.map +0 -1
  303. package/lib/typescript/store/ticketPrompt.d.ts.map +0 -1
  304. package/lib/typescript/store/traceText.d.ts.map +0 -1
  305. package/lib/typescript/store/traceText.test.d.ts.map +0 -1
  306. package/lib/typescript/store/transcriptPersistence.d.ts.map +0 -1
  307. package/lib/typescript/store/transcriptPersistence.test.d.ts.map +0 -1
  308. package/lib/typescript/store/turnRendering.test.d.ts.map +0 -1
  309. package/lib/typescript/store/useAskBuoy.d.ts.map +0 -1
  310. package/lib/typescript/store/useAskBuoySettings.d.ts.map +0 -1
  311. package/lib/typescript/sync/askBuoySyncAdapter.d.ts.map +0 -1
  312. package/lib/typescript/sync/askBuoySyncAdapter.test.d.ts.map +0 -1
  313. package/lib/typescript/sync/wire.d.ts.map +0 -1
  314. package/lib/typescript/types.d.ts.map +0 -1
@@ -0,0 +1,15 @@
1
+ "use client";var _o=Object.defineProperty;var Vn=Object.getOwnPropertyDescriptor;var En=Object.getOwnPropertyNames;var Nn=Object.prototype.hasOwnProperty;var jn=(e,t)=>{for(var o in t)_o(e,o,{get:t[o],enumerable:true})},Ko=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of En(t))!Nn.call(e,n)&&n!==o&&_o(e,n,{get:()=>t[n],enumerable:!(r=Vn(t,n))||r.enumerable});return e},Mn=(e,t,o)=>(Ko(e,t,"default"),o&&Ko(o,t,"default"));var Qt=process.env.NODE_ENV!=="production";typeof window<"u"&&typeof globalThis.global>"u"&&(globalThis.global=globalThis);import{useCallback as qe,useEffect as $t,useMemo as Jt,useRef as At,useState as co}from"react";var Qo={};jn(Qo,{AccessibilityInfo:()=>_n,ActivityIndicator:()=>Lt,Alert:()=>po,Animated:()=>se,AppRegistry:()=>Qn,AppState:()=>Jn,Appearance:()=>Kn,BackHandler:()=>Gn,Button:()=>$i,CheckBox:()=>si,Clipboard:()=>Yn,DeviceEventEmitter:()=>vi,Dimensions:()=>Xn,Easing:()=>Tt,FlatList:()=>Go,I18nManager:()=>Zn,Image:()=>gt,ImageBackground:()=>ci,InteractionManager:()=>ei,Keyboard:()=>uo,KeyboardAvoidingView:()=>di,LayoutAnimation:()=>ti,Linking:()=>oi,LogBox:()=>wi,Modal:()=>Ri,NativeEventEmitter:()=>ri,NativeModules:()=>Un,PanResponder:()=>ni,Picker:()=>ui,PixelRatio:()=>ii,Platform:()=>Bt,Pressable:()=>f,ProgressBar:()=>pi,RefreshControl:()=>hi,SafeAreaView:()=>gi,ScrollView:()=>Fe,SectionList:()=>bi,Share:()=>Jo,StatusBar:()=>fi,StyleSheet:()=>x,Switch:()=>Xo,Text:()=>l,TextInput:()=>Xe,Touchable:()=>yi,TouchableHighlight:()=>Ii,TouchableNativeFeedback:()=>mi,TouchableOpacity:()=>Ht,TouchableWithoutFeedback:()=>Di,UIManager:()=>li,Vibration:()=>ai,View:()=>s,VirtualizedList:()=>xi,YellowBox:()=>ki,findNodeHandle:()=>Ai,unstable_createElement:()=>Fn,useColorScheme:()=>Si,useLocaleContext:()=>Ti,useWindowDimensions:()=>Yo});Mn(Qo,qn);import*as qn from"react-native-web";import{unstable_createElement as Fn,NativeModules as Un,AccessibilityInfo as _n,Animated as se,Appearance as Kn,AppRegistry as Qn,AppState as Jn,BackHandler as Gn,Clipboard as Yn,Dimensions as Xn,Easing as Tt,I18nManager as Zn,Keyboard as uo,InteractionManager as ei,LayoutAnimation as ti,Linking as oi,NativeEventEmitter as ri,PanResponder as ni,PixelRatio as ii,Platform as Bt,Share as Jo,StyleSheet as x,UIManager as li,Vibration as ai,CheckBox as si,FlatList as Go,Image as gt,ImageBackground as ci,KeyboardAvoidingView as di,Picker as ui,ProgressBar as pi,RefreshControl as hi,SafeAreaView as gi,SectionList as bi,StatusBar as fi,Touchable as yi,TouchableNativeFeedback as mi,VirtualizedList as xi,YellowBox as ki,LogBox as wi,DeviceEventEmitter as vi,useColorScheme as Si,useLocaleContext as Ti,useWindowDimensions as Yo}from"react-native-web";import*as $e from"react-native-web";import{createElement as Ci,forwardRef as zi}from"react";function Oe(e){let t=zi((r,n)=>{let{accessibilityState:i,accessibilityValue:a,...h}=r;for(let u of["busy","checked","disabled","expanded","selected"])i?.[u]!==void 0&&h[`aria-${u}`]===void 0&&(h[`aria-${u}`]=i[u]);for(let[u,g]of Object.entries({min:"valuemin",max:"valuemax",now:"valuenow",text:"valuetext"}))a?.[u]!==void 0&&h[`aria-${g}`]===void 0&&(h[`aria-${g}`]=a[u]);return Ci(e,{...h,ref:n})}),o=e.State;return o&&Object.assign(t,{State:o}),t.displayName=e.displayName??e.name??"NativeWebView",t}var s=Oe($e.View),l=Oe($e.Text),Xe=Oe($e.TextInput),Ht=Oe($e.TouchableOpacity),Ii=Oe($e.TouchableHighlight),Di=Oe($e.TouchableWithoutFeedback),f=Oe($e.Pressable),Fe=Oe($e.ScrollView),Ri=Oe($e.Modal),Xo=Oe($e.Switch),Lt=Oe($e.ActivityIndicator),$i=Oe($e.Button),Ai=$e.findNodeHandle,po={alert(e,t,o,r){if(typeof document>"u")return;let n=document.createElement("dialog");n.dataset.buoyRoot="",n.setAttribute("aria-label",e),n.style.cssText="position:fixed;inset:0;margin:auto;width:min(440px,90vw);padding:24px;border:1px solid #475569;border-radius:14px;background:#17212e;color:#f1f5f9;font:14px system-ui;box-shadow:0 20px 80px #0008;z-index:2147483647";let i=document.createElement("h2");if(i.textContent=e,i.style.cssText="font-size:18px;margin:0 0 12px",n.appendChild(i),t){let g=document.createElement("p");g.textContent=t,g.style.cssText="line-height:1.5;white-space:pre-wrap;margin:0 0 20px",n.appendChild(g)}let a=document.createElement("div");a.style.cssText="display:flex;justify-content:flex-end;flex-wrap:wrap;gap:8px";let h=o?.length?o:[{text:"OK"}],u=()=>{n.close?.(),n.remove()};for(let g of h){let y=document.createElement("button");y.type="button",y.textContent=g.text??"OK",y.style.cssText=`padding:9px 14px;border:1px solid #64748b;border-radius:7px;color:white;background:${g.style==="destructive"?"#a52b38":"#283a4d"};cursor:pointer;font:inherit`,y.onclick=()=>{u(),g.onPress?.()},a.appendChild(y)}n.addEventListener("cancel",g=>{g.preventDefault(),r?.cancelable!==false&&(u(),r?.onDismiss?.())}),n.appendChild(a),document.body.appendChild(n),n.showModal?n.showModal():n.setAttribute("open","")}};import{isReversible as Bi}from"@buoy-gg/agent-core/web";import{dispatchToolAction as Hi,FeatureGate as Li,Info as Wi,JsModal as Oi,ModalHeader as ho,night as Wt,setToolAttention as Ct,useSafeAreaInsets as Pi}from"@buoy-gg/shared-ui/web";import{Component as Vi}from"react";import{night as Zo}from"@buoy-gg/shared-ui/web";import{useState as Ei}from"react";import{Check as Ni,ChevronRight as ji,night as N}from"@buoy-gg/shared-ui/web";import{createContext as Mi,useContext as qi}from"react";import{jsx as Fi}from"react/jsx-runtime";var Ui={answer:()=>{},runAction:()=>{},answered:{},supports:{}},er=Mi(Ui);function tr({value:e,children:t}){return Fi(er.Provider,{value:e,children:t})}function Z(){return qi(er)}function _i(e,t){return`${e}:${t.label}`}import{AlertTriangle as Ki,Check as Qi,Clock as Ji,Database as Gi,Eye as Yi,Globe as Xi,Image as Zi,Info as el,Layers as or,Navigation as tl,night as Ot,User as ol}from"@buoy-gg/shared-ui/web";import{jsx as Ae}from"react/jsx-runtime";function rr({name:e,size:t=14}){let o=Ot.color.textSecondary,r=(()=>{switch(e){case"network":return Ae(Xi,{size:t,color:o});case"storage":return Ae(Gi,{size:t,color:o});case"route":return Ae(tl,{size:t,color:o});case"screen":return Ae(Yi,{size:t,color:o});case"user":return Ae(ol,{size:t,color:o});case"image":return Ae(Zi,{size:t,color:o});case"check":return Ae(Qi,{size:t,color:Ot.color.accent});case"warn":return Ae(Ki,{size:t,color:Ot.color.warning});case"info":return Ae(el,{size:t,color:Ot.color.info});case"store":return Ae(or,{size:t,color:o});case"query":return Ae(or,{size:t,color:o});case"clock":return Ae(Ji,{size:t,color:o})}})();return Ae(s,{style:rl.wrap,children:r})}var rl=x.create({wrap:{width:24,height:24,borderRadius:6,backgroundColor:Ot.color.fill,alignItems:"center",justifyContent:"center"}});import{useState as nr}from"react";import{Check as nl,ChevronDown as ir,ChevronUp as lr,night as z,X as il}from"@buoy-gg/shared-ui/web";function ll(e,t,o,r){let n=Math.min(o,e),i=Math.max(0,e-n),a=o>t&&e>t;return{hidden:i,next:Math.min(i,r),expanded:a,canExpand:i>0,canCollapse:a}}import{jsx as ye,jsxs as Ze}from"react/jsx-runtime";function bt(e){switch(e){case"accent":return z.color.accent;case"warning":return z.color.warning;case"danger":return z.color.danger;case"info":return z.color.info;case"muted":return z.color.textTertiary;default:return z.color.text}}function ar({source:e}){if(!e||e==="live")return null;let t=e==="changed"?"CHANGED BY ASK BUOY":e==="mocked"?"MOCKED":"FROM THE MODEL",o=e==="changed"?z.color.warning:e==="mocked"?z.color.danger:z.color.textTertiary;return ye(s,{style:[F.badge,{borderColor:o}],children:ye(l,{style:[F.badgeText,{color:o}],children:t})})}function O({title:e,source:t,children:o,testID:r,tone:n,collapsible:i,summary:a}){let[h,u]=nr(false),g=!!i&&!h;return Ze(s,{style:[F.card,n==="warning"&&F.cardWarning,n==="danger"&&F.cardDanger,n==="info"&&F.cardInfo],testID:r,children:[(e||t&&t!=="live")&&Ze(s,{style:F.titleRow,children:[e?ye(l,{style:F.title,numberOfLines:2,children:e}):ye(s,{style:F.flex}),ye(ar,{source:t})]}),i?Ze(f,{testID:r?`${r}-toggle`:void 0,onPress:()=>u(y=>!y),accessibilityRole:"button",accessibilityState:{expanded:h},accessibilityLabel:`${a??"Details"}, ${h?"hide":"show"}`,style:({pressed:y})=>[F.disclosure,!g&&F.disclosureOpen,y&&F.pressed],children:[ye(l,{style:F.disclosureText,numberOfLines:1,children:a??"Details"}),g?ye(ir,{size:12,color:z.color.textTertiary}):ye(lr,{size:12,color:z.color.textTertiary})]}):null,g?null:o]})}var al=5;function et(e,t,o=al){let[r,n]=nr(t),{hidden:i,next:a,expanded:h,canExpand:u,canCollapse:g}=ll(e.length,t,r,o);return{visible:e.slice(0,r),hidden:i,next:a,expanded:h,showMore:u?()=>n(y=>y+o):void 0,showLess:g?()=>n(t):void 0}}function tt({paged:e}){let{next:t,showMore:o,showLess:r}=e;return!o&&!r?null:Ze(s,{style:F.moreRow,children:[o?Ze(f,{testID:"buoy-block-show-more",onPress:o,style:[F.more,F.moreCell],accessibilityRole:"button",children:[Ze(l,{style:F.moreText,children:["Show ",t," more"]}),ye(ir,{size:12,color:z.color.textTertiary})]}):null,r?Ze(f,{testID:"buoy-block-show-fewer",onPress:r,style:[F.more,F.moreCell],accessibilityRole:"button",children:[ye(l,{style:F.moreText,children:"Show fewer"}),ye(lr,{size:12,color:z.color.textTertiary})]}):null]})}function sl({shown:e,total:t}){return!t||t<=e?null:ye(s,{style:F.more,children:Ze(l,{style:F.moreNote,children:[e," of ",t," shown"]})})}function Pe({actions:e,blockId:t,align:o="left"}){let r=Z();if(!e?.length)return null;let n=e.filter(i=>i.openTool?r.supports?.openTool!==false:i.minimize?r.supports?.minimize!==false:i.dispatch?r.supports?.dispatch!==false:true);return n.length===0?null:ye(s,{style:[F.actions,o==="right"&&F.actionsRight],children:n.slice(0,2).map(i=>{let a=r.actionState?.[_i(t,i)],h=!!r.busy||a==="running"||a==="done";return Ze(f,{accessibilityRole:"button",accessibilityLabel:i.label,testID:`buoy-block-action-${i.label.toLowerCase().replace(/\s+/g,"-")}`,disabled:h,onPress:()=>void r.runAction(i,t),style:({pressed:u})=>[F.button,i.primary?F.buttonPrimary:F.buttonPlate,h&&F.buttonDisabled,u&&!h&&F.pressed],children:[a==="running"?ye(Lt,{size:"small",color:i.primary?z.color.onAccent:z.color.text}):a==="done"?ye(nl,{size:12,color:i.primary?z.color.onAccent:z.color.accent}):a==="failed"?ye(il,{size:12,color:z.color.danger}):null,ye(l,{style:[F.buttonText,i.primary?F.buttonTextPrimary:F.buttonTextPlate],children:i.label})]},i.label)})})}var D=x.create({row:{flexDirection:"row",alignItems:"center",gap:10,paddingHorizontal:12,paddingVertical:9},rowDivider:{borderTopWidth:x.hairlineWidth,borderTopColor:z.color.separator},rowTitle:{flex:1,color:z.color.text,fontSize:z.font.body,lineHeight:19},rowSub:{color:z.color.textSecondary,fontSize:z.font.caption,lineHeight:17},rowTrailing:{color:z.color.textTertiary,fontSize:z.font.caption,maxWidth:120,textAlign:"right"},mono:{fontFamily:"Menlo",fontSize:12,color:z.color.text},pill:{paddingHorizontal:7,paddingVertical:2,borderRadius:z.radius.badge,backgroundColor:z.color.fill},pillText:{fontSize:z.font.micro,fontWeight:"700",letterSpacing:.4,color:z.color.textSecondary}}),F=x.create({card:{borderRadius:z.radius.card,borderWidth:x.hairlineWidth,borderColor:z.color.border,backgroundColor:z.color.surface,overflow:"hidden"},cardWarning:{borderColor:z.color.warning,backgroundColor:z.color.warningSoft},cardDanger:{borderColor:z.color.danger,backgroundColor:z.color.dangerSoft},cardInfo:{borderColor:z.color.accentBorderStrong,backgroundColor:z.color.accentSoft},titleRow:{flexDirection:"row",alignItems:"center",gap:8,paddingHorizontal:12,paddingTop:10,paddingBottom:6},flex:{flex:1},title:{flex:1,color:z.color.text,fontSize:z.font.caption,fontWeight:"600"},disclosure:{flexDirection:"row",alignItems:"center",gap:8,paddingHorizontal:12,paddingVertical:9},disclosureOpen:{borderBottomWidth:x.hairlineWidth,borderBottomColor:z.color.separator},disclosureText:{flex:1,color:z.color.textSecondary,fontSize:z.font.caption},badge:{borderWidth:x.hairlineWidth,borderRadius:z.radius.badge,paddingHorizontal:6,paddingVertical:2},badgeText:{fontSize:9,fontWeight:"700",letterSpacing:.6},moreRow:{flexDirection:"row"},more:{flexDirection:"row",alignItems:"center",justifyContent:"center",gap:4,paddingVertical:9,paddingHorizontal:8,borderTopWidth:x.hairlineWidth,borderTopColor:z.color.separator},moreCell:{flex:1},moreText:{color:z.color.textSecondary,fontSize:z.font.caption,fontWeight:"600"},moreNote:{color:z.color.textTertiary,fontSize:z.font.caption},actions:{flexDirection:"row",gap:8,paddingHorizontal:12,paddingVertical:10,flexWrap:"wrap"},actionsRight:{justifyContent:"flex-end"},button:{flexDirection:"row",alignItems:"center",gap:6,paddingHorizontal:14,paddingVertical:9,borderRadius:z.radius.row},buttonPrimary:{backgroundColor:z.color.accent},buttonPlate:{backgroundColor:z.color.button},buttonDisabled:{opacity:.55},buttonText:{fontSize:z.font.caption,fontWeight:"600"},buttonTextPrimary:{color:z.color.onAccent},buttonTextPlate:{color:z.color.text},pressed:{opacity:.7}});import{Fragment as cl,jsx as ie,jsxs as ft}from"react/jsx-runtime";function dl({block:e}){let t=Z(),o=t.answered[e.id],r=o?.kind==="choice"?o.optionId:null,n=!!o;return ft(O,{testID:`buoy-block-choice-${e.id}`,tone:n?void 0:"info",children:[ie(l,{style:M.question,children:e.question}),ie(s,{style:M.options,children:e.options.slice(0,5).map((i,a)=>{let h=r===i.id;return ft(f,{testID:`buoy-block-option-${i.id}`,accessibilityRole:"button",accessibilityState:{selected:h,disabled:n},disabled:n,onPress:()=>t.answer({blockId:e.id,kind:"choice",optionId:i.id,label:i.label}),style:({pressed:u})=>[M.option,a>0&&M.optionDivider,h&&M.optionChosen,n&&!h&&M.optionDimmed,u&&!n&&M.pressed],children:[i.icon?ie(rr,{name:i.icon}):null,ft(s,{style:M.optionText,children:[ie(l,{style:[M.optionLabel,h&&M.optionLabelChosen],children:i.label}),i.detail?ie(l,{style:M.optionDetail,children:i.detail}):null]}),h?ie(Ni,{size:14,color:N.color.accent}):n?null:ie(ji,{size:14,color:N.color.textTertiary})]},i.id)})}),!n&&e.allowFreeText!==false?ie(l,{style:M.hint,children:"Or just type your answer below."}):null]})}function ul({block:e}){let t=Z(),o=t.answered[e.id],r=!!o,n=o?.kind==="confirm"?o.approved:null;return ft(O,{testID:`buoy-block-confirm-${e.id}`,tone:r?void 0:"warning",children:[ie(l,{style:M.confirmTitle,children:e.title}),ie(l,{style:M.confirmChange,children:e.change}),e.consequence?ie(l,{style:M.confirmConsequence,children:e.consequence}):null,ie(s,{style:M.confirmActions,children:r?ie(l,{style:M.decided,children:n?`\u2713 ${e.approveLabel??"Done"}`:`\u2715 ${e.declineLabel??"Not now"}`}):ft(cl,{children:[ie(f,{testID:"buoy-block-approve",accessibilityRole:"button",onPress:()=>t.answer({blockId:e.id,kind:"confirm",approved:true}),style:({pressed:i})=>[M.button,M.buttonPrimary,i&&M.pressed],children:ie(l,{style:M.buttonTextPrimary,children:e.approveLabel??"Do it"})}),ie(f,{testID:"buoy-block-decline",accessibilityRole:"button",onPress:()=>t.answer({blockId:e.id,kind:"confirm",approved:false}),style:({pressed:i})=>[M.button,M.buttonPlate,i&&M.pressed],children:ie(l,{style:M.buttonTextPlate,children:e.declineLabel??"Not now"})})]})})]})}function pl({block:e}){let t=Z(),o=t.answered[e.id],r=!!o,[n,i]=Ei(""),a=e.type==="secret",h=()=>{let u=n.trim();u&&t.answer({blockId:e.id,kind:"input",value:u})};return ft(O,{testID:`buoy-block-input-${e.id}`,tone:r?void 0:"info",children:[ie(l,{style:M.question,children:e.label}),r?ie(l,{style:M.decided,children:o.kind==="input"?a?"\u2022\u2022\u2022\u2022\u2022\u2022":o.value:"(skipped)"}):ft(s,{style:M.inputRow,children:[ie(Xe,{testID:"buoy-block-input-field",style:M.input,value:n,onChangeText:i,placeholder:e.placeholder??"",placeholderTextColor:N.color.placeholder,keyboardType:e.type==="number"?"numeric":"ascii-capable",secureTextEntry:a,autoCapitalize:"none",autoCorrect:false,returnKeyType:"send",onSubmitEditing:h}),ie(f,{testID:"buoy-block-input-submit",accessibilityRole:"button",disabled:!n.trim(),onPress:h,style:({pressed:u})=>[M.button,M.buttonPrimary,!n.trim()&&M.buttonDisabled,u&&M.pressed],children:ie(l,{style:M.buttonTextPrimary,children:e.submitLabel??"Send"})})]})]})}var M=x.create({question:{color:N.color.text,fontSize:N.font.row,fontWeight:"600",lineHeight:20,paddingHorizontal:12,paddingTop:12,paddingBottom:8},options:{marginHorizontal:8,marginBottom:8,borderRadius:N.radius.row,backgroundColor:N.color.surfaceElevated,overflow:"hidden"},option:{flexDirection:"row",alignItems:"center",gap:10,paddingHorizontal:12,paddingVertical:11},optionDivider:{borderTopWidth:x.hairlineWidth,borderTopColor:N.color.separator},optionChosen:{backgroundColor:N.color.accentSoft},optionDimmed:{opacity:.45},optionText:{flex:1,gap:2},optionLabel:{color:N.color.text,fontSize:N.font.body,fontWeight:"500"},optionLabelChosen:{color:N.color.accent},optionDetail:{color:N.color.textSecondary,fontSize:N.font.caption,lineHeight:17},hint:{color:N.color.textTertiary,fontSize:N.font.micro,paddingHorizontal:12,paddingBottom:10},confirmTitle:{color:N.color.text,fontSize:N.font.row,fontWeight:"600",paddingHorizontal:12,paddingTop:12},confirmChange:{color:N.color.text,fontSize:N.font.body,lineHeight:19,paddingHorizontal:12,paddingTop:6},confirmConsequence:{color:N.color.warning,fontSize:N.font.caption,lineHeight:17,paddingHorizontal:12,paddingTop:6},confirmActions:{flexDirection:"row",gap:8,paddingHorizontal:12,paddingVertical:12,alignItems:"center"},decided:{color:N.color.textSecondary,fontSize:N.font.caption,fontWeight:"600",paddingHorizontal:12,paddingVertical:10},inputRow:{flexDirection:"row",alignItems:"center",gap:8,paddingHorizontal:12,paddingBottom:12},input:{flex:1,height:38,paddingHorizontal:12,borderRadius:N.radius.row,backgroundColor:N.color.surfaceElevated,color:N.color.text,fontSize:N.font.body},button:{paddingHorizontal:14,paddingVertical:9,borderRadius:N.radius.row},buttonPrimary:{backgroundColor:N.color.accent},buttonPlate:{backgroundColor:N.color.button},buttonDisabled:{opacity:.5},buttonTextPrimary:{color:N.color.onAccent,fontSize:N.font.caption,fontWeight:"600"},buttonTextPlate:{color:N.color.text,fontSize:N.font.caption,fontWeight:"600"},pressed:{opacity:.7}});import{useState as sr}from"react";import{AlertTriangle as hl,Check as gl,Info as bl,night as B,X as fl}from"@buoy-gg/shared-ui/web";import{DataViewer as yl,TreeDiffViewer as ml}from"@buoy-gg/shared-ui/web/dataViewer";import{CAPS as Pt}from"@buoy-gg/agent-core/web";import{useState as xl}from"react";import{night as le}from"@buoy-gg/shared-ui/web";var cr=e=>/^\s*\|.*\|\s*$/.test(e),kl=e=>/^\s*\|?\s*:?-{2,}:?\s*(\|\s*:?-{2,}:?\s*)*\|?\s*$/.test(e),dr=e=>e.trim().replace(/^\|/,"").replace(/\|$/,"").split("|").map(t=>t.trim()),wl=/^\s*```\s*([\w+-]*)\s*$/;function vl(e){let t=[],o=[],r=()=>{o.length&&t.push({kind:"p",text:o.join(" ")}),o=[]},n=e.split(`
2
+ `);for(let i=0;i<n.length;i++){let a=n[i].replace(/\s+$/,""),h=wl.exec(a);if(h){r();let y=[],C=i+1,j=false;for(;C<n.length;){if(/^\s*```\s*$/.test(n[C])){j=true;break}y.push(n[C]),C++}t.push({kind:"code",lang:h[1]??"",text:y.join(`
3
+ `),closed:j}),i=j?C:n.length;continue}if(!a.trim()){r();continue}if(cr(a)&&n[i+1]&&kl(n[i+1])){r();let y=dr(a),C=[],j=i+2;for(;j<n.length&&cr(n[j]);)C.push(dr(n[j])),j++;t.push({kind:"table",header:y,rows:C}),i=j-1;continue}let u=/^#{1,6}\s+(.*)$/.exec(a);if(u){r(),t.push({kind:"h",text:u[1]});continue}let g=/^(\s*)([-*•]|\d+[.)])\s+(.*)$/.exec(a);if(g){r();let y=Math.min(2,Math.floor(g[1].length/2)),C=/^\d/.test(g[2])?g[2].replace(")","."):"\u2022";t.push({kind:"li",text:g[3],marker:C,depth:y});continue}o.push(a.trim())}return r(),t}var go=12,bo=4;function Sl(e,t){let o=[];return t.length>go&&o.push(`${go} of ${t.length} rows`),e.length>bo&&o.push(`${bo} of ${e.length} columns`),o.length?`Showing ${o.join(" \xB7 ")}`:null}import{jsx as he,jsxs as Gt}from"react/jsx-runtime";function zt(e,t){let o=e.replace(/!?\[([^\]]*)\]\([^)]*\)/g,"$1"),r=[],n=/(\*\*[^*]+\*\*|`[^`]+`|\*[^*\s][^*]*\*|_[^_\s][^_]*_)/g,i=0,a,h=0;for(;a=n.exec(o);){a.index>i&&r.push(o.slice(i,a.index));let u=a[0];u.startsWith("**")?r.push(he(l,{style:[t,_.bold],children:u.slice(2,-2)},h++)):u.startsWith("`")?r.push(he(l,{style:[t,_.code],children:u.slice(1,-1)},h++)):r.push(he(l,{style:[t,_.italic],children:u.slice(1,-1)},h++)),i=a.index+u.length}return i<o.length&&r.push(o.slice(i)),r}var Tl=e=>e.replace(/!?\[([^\]]*)\]\([^)]*\)/g,"$1");function Cl({header:e,rows:t}){let[o,r]=xl(false),n=Sl(e,t),i=o?e:e.slice(0,bo),a=o?t:t.slice(0,go),h=Gt(s,{style:o&&_.tableWide,children:[he(s,{style:_.tableHead,children:i.map((u,g)=>he(l,{style:[_.th,g===0&&_.firstCol,o&&_.colFixed],numberOfLines:1,children:u.replace(/\*\*/g,"")},g))}),a.map((u,g)=>he(s,{style:[_.tr,g>0&&_.trDivider],children:i.map((y,C)=>he(l,{style:[_.td,C===0&&_.firstCol,C===0&&_.tdFirst,o&&_.colFixed],numberOfLines:o?3:2,children:zt(Tl(u[C]??""),_.td)},C))},g))]});return Gt(s,{style:_.table,testID:"buoy-ask-buoy-md-table",children:[o?he(Fe,{style:_.tableScrollV,nestedScrollEnabled:true,children:he(Fe,{horizontal:true,showsHorizontalScrollIndicator:true,children:h})}):h,n?Gt(f,{testID:"buoy-ask-buoy-md-table-toggle",accessibilityRole:"button",accessibilityLabel:o?"Show fewer rows":"Show all rows and columns",onPress:()=>r(u=>!u),style:({pressed:u})=>[_.tfoot,u&&_.pressed],children:[he(l,{style:_.tfootText,children:o?`All ${t.length} rows \xB7 ${e.length} columns`:n}),he(l,{style:_.tfootAction,children:o?"Show fewer":"Show all"})]}):null]})}function ur({text:e,style:t}){let o=vl(e);return he(s,{style:_.wrap,children:o.map((r,n)=>r.kind==="table"?he(Cl,{header:r.header,rows:r.rows},n):r.kind==="code"?he(Fe,{horizontal:true,style:_.codeBlock,contentContainerStyle:_.codeBlockContent,testID:"buoy-ask-buoy-md-code",children:he(l,{style:_.codeText,selectable:true,children:r.text})},n):r.kind==="li"?Gt(s,{style:[_.li,{paddingLeft:4+r.depth*14}],children:[he(l,{style:[t,_.marker],children:r.marker}),he(l,{style:[t,_.liText],selectable:true,children:zt(r.text,t)})]},n):he(l,{style:[t,r.kind==="h"&&_.bold],selectable:true,children:zt(r.text,t)},n))})}var _=x.create({wrap:{gap:8},bold:{fontWeight:"600"},italic:{fontStyle:"italic"},code:{fontFamily:"Menlo",fontSize:13,color:le.color.accent,backgroundColor:le.color.fill},codeBlock:{borderRadius:le.radius.row,borderWidth:x.hairlineWidth,borderColor:le.color.border,backgroundColor:le.color.surface},codeBlockContent:{paddingHorizontal:12,paddingVertical:10},codeText:{fontFamily:"Menlo",fontSize:12,lineHeight:18,color:le.color.text},li:{flexDirection:"row",gap:8},table:{borderRadius:le.radius.row,borderWidth:x.hairlineWidth,borderColor:le.color.border,backgroundColor:le.color.surface,overflow:"hidden"},tableWide:{minWidth:"100%"},tableScrollV:{maxHeight:320},tableHead:{flexDirection:"row",paddingHorizontal:10,paddingVertical:6,gap:8,backgroundColor:le.color.fill},th:{flex:1,color:le.color.textTertiary,fontSize:le.font.micro,fontWeight:"700",letterSpacing:.6,textTransform:"uppercase"},tr:{flexDirection:"row",paddingHorizontal:10,paddingVertical:7,gap:8},trDivider:{borderTopWidth:x.hairlineWidth,borderTopColor:le.color.separator},td:{flex:1,color:le.color.textSecondary,fontSize:le.font.caption,lineHeight:17},tdFirst:{color:le.color.text,fontWeight:"500"},firstCol:{flex:1.3},colFixed:{flex:0,width:110},tfoot:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingHorizontal:10,paddingVertical:8,borderTopWidth:x.hairlineWidth,borderTopColor:le.color.border},tfootText:{color:le.color.textSecondary,fontSize:le.font.micro},tfootAction:{color:le.color.accent,fontSize:le.font.micro,fontWeight:"600"},pressed:{opacity:.7},marker:{color:le.color.textSecondary,minWidth:14,textAlign:"right"},liText:{flex:1}});import{useCallback as zl,useEffect as Il,useRef as Dl,useState as Rl}from"react";import{copyToClipboard as $l}from"@buoy-gg/shared-ui/web";var Al=1500;function fo(e){let[t,o]=Rl(false),r=Dl(null);Il(()=>()=>{r.current&&clearTimeout(r.current)},[]);let n=zl(()=>{let i=e();$l(i).then(a=>{if(!a){Jo.share({message:i}).catch(()=>{});return}o(true),r.current&&clearTimeout(r.current),r.current=setTimeout(()=>o(false),Al)}).catch(()=>{})},[e]);return{copied:t,copy:n}}var Bl=e=>typeof e=="string"?e:e.text;function pr(e){switch(e.kind){case"finding":return[e.title,...e.evidence.map(t=>`${t.label}: ${t.value}`)].join(`
4
+ `);case"keyValue":return[e.title,...e.pairs.map(t=>`${t.key}: ${typeof t.value=="string"?t.value:JSON.stringify(t.value)}`)].filter(Boolean).join(`
5
+ `);case"table":{let t=e.columns.join(" | "),o=e.rows.map(n=>n.map(Bl).join(" | ")),r=e.total&&e.total>e.rows.length?`\u2026 ${e.total-e.rows.length} more rows`:null;return[e.title,t,...o,r].filter(Boolean).join(`
6
+ `)}case"list":{let t=e.items.map(r=>`- ${r.title}${r.subtitle?` \u2014 ${r.subtitle}`:""}${r.trailing?` (${r.trailing})`:""}`),o=e.total&&e.total>e.items.length?`\u2026 ${e.total-e.items.length} more`:null;return[e.title,...t,o].filter(Boolean).join(`
7
+ `)}case"notice":return e.text;case"claim":return e.text;case"diff":case"chart":case"imageGrid":case"requestList":case"requestCard":case"logList":case"crash":case"screenElements":return`[${e.kind} card${"title"in e&&typeof e.title=="string"?`: ${e.title}`:""}]`;default:return null}}function Hl(e){return e.map(pr).filter(t=>!!t)}import{Fragment as Ll,jsx as I,jsxs as de}from"react/jsx-runtime";function yo(e){if(e===void 0)return"\u2014";if(e===null)return"null";if(typeof e=="string")return e;if(typeof e=="number"||typeof e=="boolean")return String(e);try{let t=JSON.stringify(e);return t.length>120?`${t.slice(0,117)}\u2026`:t}catch{return String(e)}}function Wl({block:e}){let t=et(e.rows,Pt.tableRows),{visible:o}=t,r=e.columns.slice(0,4);return de(O,{title:e.title,source:e.source,testID:`buoy-block-table-${e.id}`,children:[I(s,{style:$.tableHead,children:r.map((n,i)=>I(l,{style:[$.th,i===0&&$.firstCol],numberOfLines:1,children:n},n))}),o.map((n,i)=>I(s,{style:[$.tr,i>0&&D.rowDivider],children:r.map((a,h)=>{let u=n[h],g=typeof u=="string"?u:u?.text??"",y=typeof u=="string"?void 0:u?.tone;return I(l,{style:[$.td,h===0&&$.firstCol,h===0&&$.tdFirst,y&&{color:bt(y)}],numberOfLines:2,children:zt(g,$.td)},h)})},i)),I(tt,{paged:t})]})}function Ol({block:e}){let t=et(e.pairs,Pt.keyValuePairs),{visible:o}=t,[r,n]=sr(null);return de(O,{title:e.title,source:e.source,testID:`buoy-block-keyvalue-${e.id}`,children:[o.map((i,a)=>{let h=typeof i.value=="object"&&i.value!==null,u=r===i.key;return de(f,{onPress:h?()=>n(u?null:i.key):void 0,style:[$.kvRow,a>0&&D.rowDivider],children:[I(l,{style:$.kvKey,numberOfLines:1,children:i.key}),I(l,{style:[$.kvValue,u&&D.mono],numberOfLines:u?void 0:2,selectable:true,children:u?JSON.stringify(i.value,null,2):yo(i.value)})]},i.key)}),I(tt,{paged:t})]})}function Pl(e){let t=!!e.image;return{canExpand:t,rowRunsAction:!!e.action&&!t,actionIsOwnControl:!!e.action&&t}}function Vl({block:e}){let t=Z(),o=et(e.items,Pt.listItems),{visible:r}=o,[n,i]=sr(null);return de(O,{title:e.title,source:e.source,testID:`buoy-block-list-${e.id}`,children:[r.map((a,h)=>{let u=`${a.id??a.title}-${h}`,g=n===u,{canExpand:y,rowRunsAction:C,actionIsOwnControl:j}=Pl(a),q=y||C?f:s,X=y?{onPress:()=>i(g?null:u),accessibilityRole:"button",accessibilityState:{expanded:g},accessibilityLabel:`${a.title}, ${g?"hide":"show"} picture`,testID:`buoy-block-list-row-${u}`}:C?{onPress:()=>void t.runAction(a.action,e.id),accessibilityRole:"button"}:{};return de(s,{style:h>0?D.rowDivider:void 0,children:[g&&a.image?I(f,{onPress:()=>i(null),accessibilityRole:"button",accessibilityLabel:`Hide ${a.title}`,testID:`buoy-block-list-hero-${u}`,style:$.listHero,children:I(gt,{testID:"buoy-internal-chat-image",source:{uri:a.image},style:$.listHeroImage,resizeMode:"contain",accessibilityLabel:a.title})}):null,de(q,{...X,style:D.row,children:[a.image&&!g?I(gt,{testID:"buoy-internal-chat-image",source:{uri:a.image},style:$.thumb,resizeMode:"contain",accessibilityLabel:a.title}):a.icon?I(rr,{name:a.icon}):null,de(s,{style:$.flex,children:[I(l,{style:[D.rowTitle,a.tone&&{color:bt(a.tone)}],numberOfLines:g?void 0:2,children:zt(a.title,D.rowTitle)}),a.subtitle?I(l,{style:D.rowSub,numberOfLines:g?void 0:2,children:zt(a.subtitle,D.rowSub)}):null]}),a.trailing?I(l,{style:[D.rowTrailing,a.tone&&{color:bt(a.tone)}],numberOfLines:1,children:a.trailing}):null,a.action?j?I(f,{onPress:()=>void t.runAction(a.action,e.id),accessibilityRole:"button",accessibilityLabel:a.action.label,hitSlop:8,children:I(l,{style:$.rowAction,children:a.action.label})}):I(l,{style:$.rowAction,children:a.action.label}):null]})]},u)}),I(tt,{paged:o})]})}function hr(e){return e!==null&&typeof e=="object"}function El(e){let t=e.map(n=>n.path),o=t.slice(0,3).join(", "),r=t.length-3;return`${t.length===1?"1 field":`${t.length} fields`} \xB7 ${o}${r>0?`, +${r}`:""}`}function Nl({block:e}){let t=et(e.changes,Pt.keyValuePairs);return de(O,{title:e.title??"What changed",source:e.source,testID:`buoy-block-diff-${e.id}`,collapsible:true,summary:El(e.changes),children:[t.visible.map((o,r)=>{let n=o.before===void 0&&o.after!==void 0,i=o.after===void 0&&o.before!==void 0;return de(s,{style:[$.diffRow,r>0&&D.rowDivider],children:[I(l,{style:$.diffPath,numberOfLines:1,children:o.path}),hr(o.before)||hr(o.after)?I(s,{style:$.diffTree,children:I(ml,{oldValue:o.before,newValue:o.after,showUnchanged:false,scrollEnabled:false})}):de(Ll,{children:[n?null:de(s,{style:$.diffLine,children:[I(l,{style:[$.diffMark,{color:B.color.danger}],children:"\u2212"}),I(l,{style:[$.diffValue,{color:B.color.danger}],numberOfLines:3,selectable:true,children:yo(o.before)})]}),i?null:de(s,{style:$.diffLine,children:[I(l,{style:[$.diffMark,{color:B.color.accent}],children:"+"}),I(l,{style:[$.diffValue,{color:B.color.accent}],numberOfLines:3,selectable:true,children:yo(o.after)})]})]})]},`${o.path}-${r}`)}),I(tt,{paged:t})]})}function jl({block:e}){let t=e.bars.slice(0,Pt.chartBars),o=e.max??Math.max(1,...t.map(r=>r.value));return I(O,{title:e.title,source:e.source,testID:`buoy-block-chart-${e.id}`,children:I(s,{style:$.chart,children:t.map((r,n)=>de(s,{style:$.barRow,children:[I(l,{style:$.barLabel,numberOfLines:1,children:r.label}),I(s,{style:$.barTrack,children:I(s,{style:[$.bar,{width:`${Math.max(2,Math.round(r.value/o*100))}%`,backgroundColor:bt(r.tone??"accent")}]})}),de(l,{style:$.barValue,numberOfLines:1,children:[r.value,r.unit?` ${r.unit}`:""]})]},`${r.label}-${n}`))})})}function Ml({block:e}){return I(O,{title:e.title,testID:`buoy-block-steps-${e.id}`,children:e.steps.map((t,o)=>de(s,{style:[$.step,o>0&&D.rowDivider],children:[I(s,{style:[$.stepMark,t.state==="done"&&$.stepDone,t.state==="failed"&&$.stepFailed],children:t.state==="done"?I(gl,{size:10,color:B.color.onAccent}):t.state==="failed"?I(fl,{size:10,color:B.color.text}):I(l,{style:$.stepNum,children:o+1})}),I(l,{style:[D.rowTitle,t.state==="done"&&$.stepTextDone],children:t.text})]},o))})}function ql(e){try{let t=JSON.parse(e);return t!==null&&typeof t=="object"?t:void 0}catch{return}}function Fl({block:e,value:t}){return I(O,{title:e.title,testID:`buoy-block-code-${e.id}`,children:I(s,{style:$.viewer,children:I(yl,{title:e.title??"Payload",data:t,initialExpanded:true,showTypeFilter:false,testIDPrefix:`buoy-block-code-${e.id}`})})})}function Ul({block:e}){return I(O,{title:e.title,testID:`buoy-block-code-${e.id}`,children:I(l,{style:[D.mono,$.code],selectable:true,children:e.text})})}function _l({block:e}){let t=ql(e.text);return t===void 0?I(Ul,{block:e}):I(Fl,{block:e,value:t})}function Kl({block:e}){let t=e.tone==="danger"?B.color.danger:e.tone==="warning"?B.color.warning:B.color.info,o=e.tone==="info"?bl:hl;return de(O,{tone:e.tone,testID:`buoy-block-notice-${e.id}`,children:[de(s,{style:$.noticeRow,children:[I(o,{size:14,color:t}),I(l,{style:$.noticeText,children:e.text})]}),I(Pe,{actions:e.actions,blockId:e.id})]})}function Ql({block:e}){let{copied:t,copy:o}=fo(()=>pr(e)??e.title);return de(O,{title:e.title,source:e.source,testID:`buoy-block-finding-${e.id}`,tone:"warning",children:[e.evidence.map((r,n)=>de(s,{style:[$.kvRow,n>0&&D.rowDivider],children:[I(l,{style:$.kvKey,numberOfLines:1,children:r.label}),I(l,{style:[$.kvValue,r.tone&&{color:bt(r.tone)}],selectable:true,children:r.value})]},`${r.label}-${n}`)),I(s,{style:$.findingFoot,children:I(f,{testID:`buoy-block-finding-copy-${e.id}`,accessibilityRole:"button",accessibilityLabel:t?"Copied":"Copy this finding",onPress:o,style:({pressed:r})=>[$.findingCopy,r&&{opacity:.7}],children:I(l,{style:[$.findingCopyText,t&&{color:B.color.accent}],children:t?"Copied":"Copy finding"})})}),I(Pe,{actions:e.actions,blockId:e.id})]})}var $=x.create({flex:{flex:1},tableHead:{flexDirection:"row",paddingHorizontal:12,paddingVertical:6,gap:8,backgroundColor:B.color.fill},th:{flex:1,color:B.color.textTertiary,fontSize:B.font.micro,fontWeight:"700",letterSpacing:.6,textTransform:"uppercase"},tr:{flexDirection:"row",paddingHorizontal:12,paddingVertical:8,gap:8,alignItems:"center"},td:{flex:1,color:B.color.textSecondary,fontSize:B.font.caption,lineHeight:17},tdFirst:{color:B.color.text,fontWeight:"500"},firstCol:{flex:1.4},kvRow:{flexDirection:"row",gap:12,paddingHorizontal:12,paddingVertical:8,alignItems:"flex-start"},kvKey:{width:110,color:B.color.textSecondary,fontSize:B.font.caption,paddingTop:1},kvValue:{flex:1,color:B.color.text,fontSize:B.font.caption,lineHeight:17},findingFoot:{flexDirection:"row",paddingHorizontal:12,paddingVertical:8,borderTopWidth:x.hairlineWidth,borderTopColor:B.color.separator},findingCopy:{paddingHorizontal:10,paddingVertical:5,borderRadius:B.radius.badge,backgroundColor:B.color.fill},findingCopyText:{color:B.color.textSecondary,fontSize:B.font.micro,fontWeight:"600"},thumb:{width:40,height:40,borderRadius:8,backgroundColor:B.color.fill},listHero:{paddingHorizontal:12,paddingTop:12},listHeroImage:{width:"100%",height:240,borderRadius:B.radius.row,backgroundColor:B.color.fill},rowAction:{color:B.color.accent,fontSize:B.font.caption,fontWeight:"600"},diffRow:{paddingHorizontal:12,paddingVertical:8,gap:3},diffPath:{color:B.color.textSecondary,fontSize:B.font.micro,fontWeight:"600",letterSpacing:.3},diffLine:{flexDirection:"row",gap:8,alignItems:"flex-start"},diffMark:{fontFamily:"Menlo",fontSize:12,width:10},diffValue:{flex:1,fontFamily:"Menlo",fontSize:12,lineHeight:16},diffTree:{borderRadius:B.radius.row,overflow:"hidden"},chart:{paddingHorizontal:12,paddingVertical:10,gap:8},barRow:{flexDirection:"row",alignItems:"center",gap:8},barLabel:{width:96,color:B.color.textSecondary,fontSize:B.font.caption},barTrack:{flex:1,height:10,borderRadius:5,backgroundColor:B.color.fill,overflow:"hidden"},bar:{height:10,borderRadius:5},barValue:{width:72,textAlign:"right",color:B.color.text,fontSize:B.font.caption,fontWeight:"600"},step:{flexDirection:"row",alignItems:"center",gap:10,paddingHorizontal:12,paddingVertical:9},stepMark:{width:20,height:20,borderRadius:10,backgroundColor:B.color.fillTertiary,alignItems:"center",justifyContent:"center"},stepDone:{backgroundColor:B.color.accent},stepFailed:{backgroundColor:B.color.danger},stepNum:{color:B.color.text,fontSize:B.font.micro,fontWeight:"700"},stepTextDone:{color:B.color.textSecondary},viewer:{paddingHorizontal:4,paddingBottom:8},code:{paddingHorizontal:12,paddingVertical:10,lineHeight:17},noticeRow:{flexDirection:"row",alignItems:"flex-start",gap:8,paddingHorizontal:12,paddingTop:10,paddingBottom:4},noticeText:{flex:1,color:B.color.text,fontSize:B.font.caption,lineHeight:18}});import{useState as Jl}from"react";import{night as Ve}from"@buoy-gg/shared-ui/web";import{CAPS as gr}from"@buoy-gg/agent-core/web";import{jsx as Ee,jsxs as mo}from"react/jsx-runtime";function Gl({block:e}){let[t,o]=Jl(null),{width:r}=Yo(),n=e.images.slice(0,gr.gridMax),i=n.length>gr.gridImages,a=Math.min(150,Math.floor((r-2*Ve.gutter-24-8)/2)),h=({img:u,i:g})=>mo(f,{testID:`buoy-block-image-${g}`,accessibilityRole:"imagebutton",accessibilityLabel:u.alt,onPress:()=>o(t===g?null:g),style:[Ne.tile,{width:a},i&&Ne.tileCarousel],children:[Ee(gt,{testID:"buoy-internal-chat-image",source:{uri:u.url},style:[Ne.image,{width:a,height:a}],resizeMode:"contain",accessibilityLabel:u.alt}),Ee(l,{style:Ne.name,numberOfLines:1,children:u.alt}),u.caption?Ee(l,{style:Ne.caption,numberOfLines:1,children:u.caption}):null]},`${u.url}-${g}`);return mo(O,{title:e.title,source:e.source,testID:`buoy-block-imagegrid-${e.id}`,children:[t!==null&&n[t]?mo(f,{onPress:()=>o(null),style:Ne.hero,accessibilityRole:"button",accessibilityLabel:`Close ${n[t].alt}`,children:[Ee(gt,{testID:"buoy-internal-chat-image",source:{uri:n[t].url},style:Ne.heroImage,resizeMode:"contain",accessibilityLabel:n[t].alt}),Ee(l,{style:Ne.heroCaption,children:n[t].alt}),n[t].caption?Ee(l,{style:Ne.caption,children:n[t].caption}):null]}):null,i?Ee(Fe,{horizontal:true,showsHorizontalScrollIndicator:false,snapToInterval:a+8,decelerationRate:"fast",contentContainerStyle:Ne.carousel,children:n.map((u,g)=>Ee(h,{img:u,i:g},g))}):Ee(s,{style:Ne.grid,children:n.map((u,g)=>Ee(h,{img:u,i:g},g))}),Ee(sl,{shown:n.length,total:e.total})]})}var Ne=x.create({grid:{flexDirection:"row",flexWrap:"wrap",gap:8,padding:12},carousel:{gap:8,paddingHorizontal:12,paddingVertical:12},tile:{gap:4},tileCarousel:{},image:{borderRadius:Ve.radius.row,backgroundColor:Ve.color.fill},name:{color:Ve.color.text,fontSize:Ve.font.micro,fontWeight:"600"},caption:{color:Ve.color.textSecondary,fontSize:Ve.font.micro},hero:{alignItems:"center",padding:12,gap:6,borderBottomWidth:x.hairlineWidth,borderBottomColor:Ve.color.separator},heroImage:{width:"100%",height:240,borderRadius:Ve.radius.row,backgroundColor:Ve.color.fill},heroCaption:{color:Ve.color.text,fontSize:Ve.font.caption}});import{useState as Yl}from"react";import{AlertTriangle as Xl,ChevronRight as Zl,Eye as br,night as R,NightSegmented as ea}from"@buoy-gg/shared-ui/web";import{CAPS as Yt}from"@buoy-gg/agent-core/web";import{jsx as W,jsxs as ae}from"react/jsx-runtime";function fr(e){return e===void 0?R.color.textTertiary:e>=500?R.color.danger:e>=400?R.color.warning:e>=300?R.color.info:R.color.accent}function yr(e){try{let t=new URL(e);return t.pathname+(t.search?"?\u2026":"")}catch{return e}}function mr({status:e}){return W(s,{style:[D.pill,{backgroundColor:`${fr(e)}22`}],children:W(l,{style:[D.pillText,{color:fr(e)}],children:e??"\u2026"})})}function ta({block:e}){let t=Z(),o=t.supports?.openTool!==false,r=et(e.requests,Yt.listItems),{visible:n}=r;return ae(O,{title:e.title??"Network requests",source:e.source,testID:`buoy-block-requests-${e.id}`,children:[n.map((i,a)=>ae(f,{disabled:!o,onPress:()=>void t.runAction({label:"Open in Network",openTool:{toolId:"network",select:i.id}},e.id),style:[D.row,a>0&&D.rowDivider],accessibilityRole:o?"button":void 0,children:[W(l,{style:K.method,children:i.method}),W(l,{style:D.rowTitle,numberOfLines:1,children:yr(i.url)}),i.mocked?W(l,{style:K.mockedChip,children:"MOCKED"}):null,i.durationMs!==void 0?ae(l,{style:D.rowTrailing,children:[i.durationMs," ms"]}):null,W(mr,{status:i.status}),o?W(Zl,{size:12,color:R.color.textTertiary}):null]},`${i.id}-${a}`)),W(tt,{paged:r})]})}var oa=[{key:"response",label:"Response"},{key:"request",label:"Request"}];function ra({block:e}){let[t,o]=Yl("response"),r=t==="response"?e.responseBody:e.requestBody,n=r===void 0?"(none)":typeof r=="string"?r:JSON.stringify(r,null,2),i=Z();return ae(O,{source:e.source,testID:`buoy-block-request-${e.id}`,children:[ae(s,{style:[D.row,K.reqHead],children:[W(l,{style:K.method,children:e.request.method}),W(l,{style:D.rowTitle,numberOfLines:2,children:yr(e.request.url)}),e.request.mocked?W(l,{style:K.mockedChip,children:"MOCKED"}):null,W(mr,{status:e.request.status})]}),W(s,{style:K.tabs,children:W(ea,{tabs:oa,activeKey:t,onChange:a=>o(a),size:"sm"})}),W(l,{style:[D.mono,K.body],numberOfLines:14,selectable:true,children:n.length>1600?`${n.slice(0,1600)}
8
+ \u2026`:n}),W(Pe,{blockId:e.id,actions:[{label:"Open in Network",openTool:{toolId:"network",select:e.request.id}}]}),(i.supports?.openTool===false,null)]})}function na({block:e}){let t=Z().rules?.[e.rule.id],o=t?.deleted===true,r={...e.rule,enabled:o?false:t?.enabled??e.rule.enabled},n=r.kind==="fail"?"fails (no network)":r.kind==="delay"?`delayed ${r.delayMs??0} ms`:`returns ${r.status??200}`;return ae(O,{title:r.name??"Network override",source:e.source,testID:`buoy-block-rule-${e.id}`,tone:r.enabled?"warning":void 0,children:[ae(s,{style:K.ruleBody,children:[ae(l,{style:K.ruleLine,children:[ae(l,{style:K.ruleKey,children:[r.methods?.length?r.methods.join("/"):"ANY"," "]}),W(l,{style:D.mono,children:r.urlPattern})]}),ae(l,{style:K.ruleLine,children:[W(l,{style:K.ruleKey,children:"\u2192 "}),n,r.times?` \xB7 ${r.times===1?"once":`${r.times} times`}`:" \xB7 every time",r.hits!==void 0?` \xB7 ${r.hits} hit${r.hits===1?"":"s"}`:""]}),W(s,{style:[D.pill,r.enabled?K.on:K.off],children:W(l,{style:[D.pillText,{color:r.enabled?R.color.onAccent:R.color.textSecondary}],children:o?"DELETED":r.enabled?"ON":"OFF"})})]}),o?null:W(Pe,{blockId:e.id,actions:[r.enabled?{label:"Turn off",dispatch:{toolId:"network",action:"setOverrideRuleEnabled",params:{id:r.id,enabled:false}}}:{label:"Turn on",primary:true,dispatch:{toolId:"network",action:"setOverrideRuleEnabled",params:{id:r.id,enabled:true}}},{label:"Delete",dispatch:{toolId:"network",action:"deleteOverrideRule",params:{id:r.id}}}]})]})}function ia({block:e}){let t=Z(),o=et(e.elements,Yt.chips),{visible:r}=o;return ae(O,{title:e.title??"On screen right now",source:e.source,testID:`buoy-block-screen-${e.id}`,children:[r.map((n,i)=>ae(f,{onPress:()=>void t.runAction({label:"Highlight",dispatch:{toolId:"highlight-updates",action:"setSpotlight",params:{nativeTag:n.nativeTag}}},e.id),disabled:t.supports?.dispatch===false,style:[D.row,i>0&&D.rowDivider],accessibilityRole:"button",children:[W(br,{size:12,color:R.color.textTertiary}),W(l,{style:D.rowTitle,numberOfLines:1,children:n.label??n.testID??n.name}),W(l,{style:D.rowTrailing,numberOfLines:1,children:n.name})]},`${n.nativeTag}-${i}`)),W(tt,{paged:o})]})}function la({block:e}){let t=Z(),o=et(e.routes,Yt.chips),r=o.visible;return ae(O,{title:e.current?`Routes \xB7 you're on ${e.current}`:"Routes",source:e.source,testID:`buoy-block-routes-${e.id}`,children:[W(s,{style:K.chips,children:r.map((n,i)=>W(f,{disabled:t.supports?.dispatch===false,onPress:()=>n.dynamic?t.answer({blockId:e.id,kind:"input",value:`Open ${n.path} \u2014 which id?`}):void t.runAction({label:`Open ${n.path}`,dispatch:{toolId:"route-events",action:"navigate",params:{path:n.path}}},e.id),style:[K.chip,n.path===e.current&&K.chipCurrent],accessibilityRole:"button",children:W(l,{style:[K.chipText,n.dynamic&&K.chipDynamic],children:n.path})},`${n.path}-${i}`))}),W(tt,{paged:o})]})}var xr={error:R.color.danger,warn:R.color.warning,warning:R.color.warning,info:R.color.info};function aa({block:e}){let t=et(e.entries,Yt.listItems),{visible:o}=t;return ae(O,{title:"Console",source:e.source,testID:`buoy-block-logs-${e.id}`,children:[o.map((r,n)=>ae(s,{style:[D.row,n>0&&D.rowDivider,K.logRow],children:[W(s,{style:[D.pill,{backgroundColor:`${xr[r.level]??R.color.textTertiary}22`}],children:W(l,{style:[D.pillText,{color:xr[r.level]??R.color.textSecondary}],children:r.level.toUpperCase()})}),W(l,{style:[D.rowTitle,D.mono],numberOfLines:3,children:r.message}),r.count>1?ae(l,{style:D.rowTrailing,children:["\xD7",r.count]}):null]},`${r.level}-${r.message}-${n}`)),W(tt,{paged:t})]})}function sa({block:e}){return ae(O,{tone:"danger",testID:`buoy-block-crash-${e.id}`,children:[ae(s,{style:K.crashHead,children:[W(Xl,{size:14,color:R.color.danger}),ae(l,{style:K.crashTitle,children:["The app crashed",e.route?` on ${e.route}`:""]})]}),W(l,{style:[D.mono,K.crashMsg],numberOfLines:4,selectable:true,children:e.message}),e.suspect?ae(l,{style:K.suspect,children:["Most likely cause: ",e.suspect.label]}):null,W(Pe,{blockId:e.id,actions:[...e.suspect?.action?[{...e.suspect.action,primary:true}]:[],...e.actions??[]].slice(0,2)})]})}function ca({block:e}){let t=Z(),o=t.supports?.minimize!==false;return ae(f,{testID:`buoy-block-peek-${e.id}`,disabled:!o,onPress:()=>void t.runAction({label:"Look",minimize:true},e.id),style:({pressed:r})=>[K.peek,r&&{opacity:.7}],accessibilityRole:"button",accessibilityLabel:`${e.label}. Look at the app`,children:[W(l,{style:K.peekText,children:e.label}),o?ae(s,{style:K.peekLook,children:[W(br,{size:12,color:R.color.accent}),W(l,{style:K.peekLookText,children:"Look"})]}):null]})}var K=x.create({method:{color:R.color.textSecondary,fontSize:R.font.micro,fontWeight:"700",letterSpacing:.4,width:44},mockedChip:{color:R.color.warning,backgroundColor:R.color.warningSoft,fontSize:9,fontWeight:"700",letterSpacing:.6,paddingHorizontal:5,paddingVertical:1,borderRadius:R.radius.badge,overflow:"hidden"},reqHead:{paddingTop:12},tabs:{paddingHorizontal:12,paddingTop:4,paddingBottom:8},tab:{paddingHorizontal:10,paddingVertical:5,borderRadius:R.radius.badge,backgroundColor:R.color.fill},tabOn:{backgroundColor:R.color.accentSoft},tabText:{color:R.color.textSecondary,fontSize:R.font.micro,fontWeight:"600"},tabTextOn:{color:R.color.accent},body:{paddingHorizontal:12,paddingBottom:4,lineHeight:16,color:R.color.textSecondary},ruleBody:{paddingHorizontal:12,paddingTop:4,paddingBottom:4,gap:4},ruleLine:{color:R.color.text,fontSize:R.font.caption,lineHeight:18},ruleKey:{color:R.color.textSecondary,fontWeight:"700"},on:{alignSelf:"flex-start",backgroundColor:R.color.accent,marginTop:4},off:{alignSelf:"flex-start",backgroundColor:R.color.fillTertiary,marginTop:4},chips:{flexDirection:"row",flexWrap:"wrap",gap:6,padding:12},chip:{paddingHorizontal:10,paddingVertical:6,borderRadius:R.radius.chip,backgroundColor:R.color.fill,borderWidth:x.hairlineWidth,borderColor:R.color.border},chipCurrent:{backgroundColor:R.color.accentSoft,borderColor:R.color.accentBorderStrong},chipText:{color:R.color.text,fontSize:R.font.caption,fontFamily:"Menlo"},chipDynamic:{color:R.color.textSecondary},logRow:{alignItems:"flex-start"},crashHead:{flexDirection:"row",alignItems:"center",gap:8,paddingHorizontal:12,paddingTop:12},crashTitle:{color:R.color.danger,fontSize:R.font.row,fontWeight:"600"},crashMsg:{paddingHorizontal:12,paddingTop:6,color:R.color.text},suspect:{color:R.color.textSecondary,fontSize:R.font.caption,paddingHorizontal:12,paddingTop:6},peek:{alignSelf:"flex-start",flexDirection:"row",alignItems:"center",gap:10,paddingLeft:12,paddingRight:10,paddingVertical:7,borderRadius:R.radius.chip,backgroundColor:R.color.fill},peekText:{color:R.color.textSecondary,fontSize:R.font.caption},peekLook:{flexDirection:"row",alignItems:"center",gap:4},peekLookText:{color:R.color.accent,fontSize:R.font.caption,fontWeight:"600"}});import{useEffect as da,useRef as kr,useState as Ue}from"react";import{AlertTriangle as ua,Check as wr,ChevronDown as vr,ChevronRight as Sr,night as d,NightSegmented as pa,RefreshCw as ha,Search as ga,X as ba}from"@buoy-gg/shared-ui/web";import{Fragment as Xt,jsx as p,jsxs as v}from"react/jsx-runtime";var Tr=e=>typeof e=="string"?e:e===void 0?"\u2014":JSON.stringify(e);function fa({block:e}){let t=Z();return p(s,{style:c.chips,testID:`buoy-block-suggestions-${e.id}`,children:e.chips.slice(0,4).map(o=>p(f,{disabled:!!t.busy,onPress:()=>void t.runAction({label:o.label,send:o.send??o.label},e.id),style:({pressed:r})=>[c.chip,r&&c.pressed],accessibilityRole:"button",children:p(l,{style:c.chipText,children:o.label})},o.label))})}function ya({block:e}){let t=Z(),o=t.answered[e.id],r=!!o,[n,i]=Ue([]),a=o?.kind==="multi"?o.optionIds:n,h=g=>i(y=>y.includes(g)?y.filter(C=>C!==g):[...y,g]),u=n.length>=(e.min??1)&&(!e.max||n.length<=e.max);return v(O,{testID:`buoy-block-multi-${e.id}`,tone:r?void 0:"info",children:[p(l,{style:c.question,children:e.question}),p(s,{style:c.optionsBox,children:e.options.map((g,y)=>{let C=a.includes(g.id);return v(f,{disabled:r,onPress:()=>h(g.id),style:[c.option,y>0&&D.rowDivider,r&&!C&&c.dim],accessibilityRole:"checkbox",accessibilityState:{checked:C},children:[p(s,{style:[c.checkbox,C&&c.checkboxOn],children:C?p(wr,{size:11,color:d.color.onAccent}):null}),v(s,{style:c.flex,children:[p(l,{style:c.optionLabel,children:g.label}),g.detail?p(l,{style:c.optionDetail,children:g.detail}):null]})]},g.id)})}),r?null:p(s,{style:c.rowEnd,children:p(f,{testID:"buoy-block-multi-submit",disabled:!u,onPress:()=>t.answer({blockId:e.id,kind:"multi",optionIds:n,labels:e.options.filter(g=>n.includes(g.id)).map(g=>g.label)}),style:[c.button,c.buttonPrimary,!u&&c.disabled],children:p(l,{style:c.buttonTextPrimary,children:e.submitLabel??`Use ${n.length||""}`.trim()})})})]})}var ma=8;function xa({block:e}){let t=Z(),o=t.answered[e.id],[r,n]=Ue(""),[i,a]=Ue(false),h=o?.kind==="select"?o.label:null,u=e.options.filter(y=>!r||y.label.toLowerCase().includes(r.toLowerCase())).slice(0,8),g=e.searchable!==false&&e.options.length>=ma;return v(O,{testID:`buoy-block-select-${e.id}`,tone:o?void 0:"info",children:[p(l,{style:c.question,children:e.label}),h?p(l,{style:c.decided,children:h}):v(s,{style:c.selectBox,children:[v(f,{onPress:()=>a(y=>!y),style:c.selectField,accessibilityRole:"button",children:[p(l,{style:c.selectPlaceholder,children:i?"Choose\u2026":`${e.options.length} options`}),p(vr,{size:14,color:d.color.textSecondary})]}),i&&v(Xt,{children:[g&&v(s,{style:c.search,children:[p(ga,{size:12,color:d.color.textSecondary}),p(Xe,{style:c.searchInput,value:r,onChangeText:n,placeholder:"Search",placeholderTextColor:d.color.placeholder,autoCapitalize:"none",autoCorrect:false})]}),u.map((y,C)=>v(f,{onPress:()=>t.answer({blockId:e.id,kind:"select",optionId:y.id,label:y.label}),style:[c.option,C>0&&D.rowDivider],accessibilityRole:"button",children:[v(s,{style:c.flex,children:[p(l,{style:c.optionLabel,children:y.label}),y.detail?p(l,{style:c.optionDetail,children:y.detail}):null]}),p(Sr,{size:12,color:d.color.textTertiary})]},y.id)),e.options.length>u.length?v(l,{style:c.hint,children:[e.options.length-u.length," more \u2014 keep typing"]}):null]})]})]})}function Cr({min:e,max:t,step:o=1,value:r,unit:n,onChange:i,disabled:a}){let h=kr(0),u=t>e?(r-e)/(t-e)*100:0,g=q=>Math.min(t,Math.max(e,+(Math.round((q-e)/o)*o+e).toFixed(6))),y=q=>!a&&i(g(r+q*o)),C=q=>{if(a||h.current<=0)return;let X=Math.min(1,Math.max(0,q.nativeEvent.locationX/h.current));i(g(e+X*(t-e)))},j=q=>{h.current=q.nativeEvent.layout.width};return v(s,{style:c.sliderRow,children:[p(f,{disabled:a,onPress:()=>y(-1),style:c.stepBtn,accessibilityRole:"button",accessibilityLabel:"Decrease",children:p(l,{style:c.stepText,children:"\u2212"})}),p(f,{style:c.trackHit,onLayout:j,onPress:C,disabled:a,accessibilityRole:"adjustable",accessibilityValue:{min:e,max:t,now:r},accessibilityActions:[{name:"increment"},{name:"decrement"}],onAccessibilityAction:q=>y(q.nativeEvent.actionName==="increment"?1:-1),children:v(s,{style:c.track,pointerEvents:"none",children:[p(s,{style:[c.fill,{width:`${u}%`}]}),p(s,{style:[c.thumb,{left:`${u}%`}]})]})}),p(f,{disabled:a,onPress:()=>y(1),style:c.stepBtn,accessibilityRole:"button",accessibilityLabel:"Increase",children:p(l,{style:c.stepText,children:"+"})}),v(l,{style:c.sliderValue,children:[r,n?` ${n}`:""]})]})}function ka({block:e}){let t=Z(),o=t.answered[e.id],[r,n]=Ue(e.value??e.min);return v(O,{testID:`buoy-block-slider-${e.id}`,tone:o?void 0:"info",children:[p(l,{style:c.question,children:e.label}),p(s,{style:c.pad,children:p(Cr,{min:e.min,max:e.max,step:e.step,value:o?.kind==="slider"?o.value:r,unit:e.unit,onChange:n,disabled:!!o})}),o?null:p(s,{style:c.rowEnd,children:p(f,{onPress:()=>t.answer({blockId:e.id,kind:"slider",value:r,unit:e.unit}),style:[c.button,c.buttonPrimary],children:v(l,{style:c.buttonTextPrimary,children:["Use ",r,e.unit?` ${e.unit}`:""]})})})]})}function wa({block:e}){let t=Z(),o=t.answered[e.id],[r,n]=Ue(""),i=e.presets??[{label:"Now",value:new Date().toISOString()},{label:"Tomorrow",value:new Date(Date.now()+864e5).toISOString()},{label:"+7 days",value:new Date(Date.now()+7*864e5).toISOString()},{label:"+30 days",value:new Date(Date.now()+30*864e5).toISOString()}];return v(O,{testID:`buoy-block-datetime-${e.id}`,tone:o?void 0:"info",children:[p(l,{style:c.question,children:e.label}),o?p(l,{style:c.decided,children:o.kind==="dateTime"?o.label??o.value:"(skipped)"}):v(Xt,{children:[p(s,{style:[c.chips,c.pad],children:i.map(a=>p(f,{onPress:()=>t.answer({blockId:e.id,kind:"dateTime",value:a.value,label:a.label}),style:c.chip,children:p(l,{style:c.chipText,children:a.label})},a.label))}),v(s,{style:[c.inputRow,c.pad],children:[p(Xe,{style:c.input,value:r,onChangeText:n,placeholder:e.mode==="time"?"14:30":"2026-09-15",placeholderTextColor:d.color.placeholder,keyboardType:"numbers-and-punctuation"}),p(f,{disabled:!r.trim(),onPress:()=>t.answer({blockId:e.id,kind:"dateTime",value:r.trim()}),style:[c.button,c.buttonPrimary,!r.trim()&&c.disabled],children:p(l,{style:c.buttonTextPrimary,children:"Use"})})]})]})]})}function zr({f:e,value:t,onChange:o,disabled:r}){return e.type==="toggle"?v(s,{style:c.fieldRow,children:[p(l,{style:c.fieldLabel,children:e.label}),p(Xo,{value:!!t,onValueChange:o,disabled:r,trackColor:{true:d.color.accent,false:d.color.fillTertiary},thumbColor:d.color.knob})]}):e.type==="select"?v(s,{style:c.fieldCol,children:[p(l,{style:c.fieldLabel,children:e.label}),p(s,{style:c.chips,children:e.options.map(n=>p(f,{disabled:r,onPress:()=>o(n.id),style:[c.chip,t===n.id&&c.chipOn],children:p(l,{style:[c.chipText,t===n.id&&c.chipTextOn],children:n.label})},n.id))})]}):e.type==="slider"?v(s,{style:c.fieldCol,children:[p(l,{style:c.fieldLabel,children:e.label}),p(Cr,{min:e.min,max:e.max,step:e.step,unit:e.unit,value:typeof t=="number"?t:e.min,onChange:o,disabled:r})]}):v(s,{style:c.fieldRow,children:[p(l,{style:c.fieldLabel,children:e.label}),p(Xe,{style:c.fieldInput,value:t==null?"":String(t),onChangeText:o,editable:!r,placeholder:e.placeholder??"",placeholderTextColor:d.color.placeholder,keyboardType:e.type==="number"?"numeric":"ascii-capable",secureTextEntry:e.type==="secret",autoCapitalize:"none",autoCorrect:false})]})}function Ir(e){let[t,o]=Ue(()=>Object.fromEntries(e.map(r=>[r.key,r.value])));return{values:t,set:(r,n)=>o(i=>({...i,[r]:n}))}}function va({block:e}){let t=Z(),o=t.answered[e.id],{values:r,set:n}=Ir(e.fields);return v(O,{title:e.title,testID:`buoy-block-form-${e.id}`,tone:o?void 0:"info",children:[p(s,{style:c.pad,children:e.fields.map(i=>p(zr,{f:i,value:r[i.key],onChange:a=>n(i.key,a),disabled:!!o},i.key))}),o?p(l,{style:c.decided,children:"Sent"}):p(s,{style:c.rowEnd,children:p(f,{onPress:()=>t.answer({blockId:e.id,kind:"form",values:r}),style:[c.button,c.buttonPrimary],children:p(l,{style:c.buttonTextPrimary,children:e.submitLabel??"Send"})})})]})}function Sa({block:e}){let t=Z(),o=t.answered[e.id],{values:r,set:n}=Ir(e.fields),i=o?.kind==="proposal"?o.approved:null;return v(O,{testID:`buoy-block-proposal-${e.id}`,tone:o?void 0:"warning",children:[p(l,{style:c.confirmTitle,children:e.title}),p(l,{style:c.confirmChange,children:e.change}),p(s,{style:c.pad,children:e.fields.map(a=>p(zr,{f:a,value:r[a.key],onChange:h=>n(a.key,h),disabled:!!o},a.key))}),e.consequence?p(l,{style:c.consequence,children:e.consequence}):null,p(s,{style:c.actionsRow,children:o?p(l,{style:c.decided,children:i?"\u2713 Applied with these values":"\u2715 Not applied"}):v(Xt,{children:[p(f,{onPress:()=>t.answer({blockId:e.id,kind:"proposal",approved:true,values:r}),style:[c.button,c.buttonPrimary],children:p(l,{style:c.buttonTextPrimary,children:e.approveLabel??"Apply"})}),p(f,{onPress:()=>t.answer({blockId:e.id,kind:"proposal",approved:false}),style:[c.button,c.buttonPlate],children:p(l,{style:c.buttonTextPlate,children:"Not now"})})]})})]})}function Ta({block:e}){let t=Z(),[o,r]=Ue(null),n=t.actionState?.[`${e.id}:${e.verify?.label??"Verify"}`],i=e.verified||n==="done";return v(s,{style:c.claim,testID:`buoy-block-claim-${e.id}`,children:[v(l,{style:c.claimText,children:[e.text,e.sources.map((a,h)=>v(l,{onPress:()=>r(o===h?null:h),style:c.cite,children:[" [",h+1,"]"]},h)),i?p(l,{style:c.verified,children:" \u2713 verified"}):null]}),o!==null&&e.sources[o]?v(s,{style:c.citeBox,children:[v(l,{style:c.citeLabel,children:["[",o+1,"] ",e.sources[o].label]}),e.sources[o].detail?p(l,{style:c.citeDetail,children:e.sources[o].detail}):null]}):null,e.verify&&!i?v(f,{onPress:()=>void t.runAction(e.verify,e.id),style:c.verifyBtn,accessibilityRole:"button",children:[p(ha,{size:11,color:d.color.accent}),p(l,{style:c.verifyText,children:n==="running"?"Checking\u2026":e.verify.label})]}):null]})}function Ca({block:e}){let[t,o]=Ue(!!e.open);return v(O,{testID:`buoy-block-details-${e.id}`,children:[v(f,{onPress:()=>o(r=>!r),style:D.row,accessibilityRole:"button",accessibilityState:{expanded:t},children:[p(l,{style:D.rowTitle,children:e.summary}),t?p(vr,{size:12,color:d.color.textTertiary}):p(Sr,{size:12,color:d.color.textTertiary})]}),t?p(l,{style:c.detailsBody,selectable:true,children:e.body}):null]})}function za({block:e,renderNested:t}){let[o,r]=Ue(0),n=e.tabs.map((a,h)=>({key:String(h),label:a.label})),i=e.tabs[o];return v(s,{style:c.tabsWrap,testID:`buoy-block-tabs-${e.id}`,children:[p(pa,{tabs:n,activeKey:String(o),onChange:a=>r(Number(a)),size:"sm"}),i&&t?t(i.block):null]})}var Ia=10;function Da({block:e}){let t=et(e.events,Ia);return v(O,{title:e.title??"What happened",source:e.source,testID:`buoy-block-timeline-${e.id}`,children:[t.visible.map((o,r)=>v(s,{style:c.tlRow,children:[p(l,{style:c.tlAt,children:o.at}),v(s,{style:c.tlLine,children:[p(s,{style:[c.tlDot,{backgroundColor:bt(o.tone??"muted")}]}),r<t.visible.length-1?p(s,{style:c.tlStem}):null]}),v(s,{style:c.flex,children:[p(l,{style:c.tlSource,children:o.source.toUpperCase()}),p(l,{style:D.rowTitle,numberOfLines:2,children:o.label})]})]},r)),p(tt,{paged:t})]})}function Ra({block:e}){let t=e.series.slice(-60),o=Math.max(1,...t),r=Math.min(...t,0),n=44;return v(O,{title:e.title,source:e.source,testID:`buoy-block-sparkline-${e.id}`,children:[v(s,{style:c.sparkHead,children:[v(l,{style:c.sparkCurrent,children:[e.current??t[t.length-1],e.unit?v(l,{style:c.sparkUnit,children:[" ",e.unit]}):null]}),e.live?p(Dr,{}):null]}),p(s,{style:[c.spark,{height:n}],children:t.map((i,a)=>p(s,{style:[c.sparkBar,{height:Math.max(2,(i-r)/(o-r||1)*n),backgroundColor:a===t.length-1?d.color.accent:d.color.accentBorderStrong}]},a))}),e.label?p(l,{style:c.hint,children:e.label}):null]})}function Dr(){let e=kr(new se.Value(1)).current;return da(()=>{let t=se.loop(se.sequence([se.timing(e,{toValue:.3,duration:700,useNativeDriver:true}),se.timing(e,{toValue:1,duration:700,useNativeDriver:true})]));return t.start(),()=>t.stop()},[e]),v(s,{style:c.live,children:[p(se.View,{style:[c.liveDot,{opacity:e}]}),p(l,{style:c.liveText,children:"LIVE"})]})}function $a({block:e}){let t=[...new Set([...e.left.pairs.map(n=>n.key),...e.right.pairs.map(n=>n.key)])],o=Object.fromEntries(e.left.pairs.map(n=>[n.key,n.value])),r=Object.fromEntries(e.right.pairs.map(n=>[n.key,n.value]));return v(O,{title:e.title,source:e.source,testID:`buoy-block-compare-${e.id}`,children:[v(s,{style:c.cmpHead,children:[p(l,{style:c.cmpKey}),p(l,{style:c.cmpCol,children:e.left.title}),p(l,{style:c.cmpCol,children:e.right.title})]}),t.map((n,i)=>{let a=JSON.stringify(o[n])!==JSON.stringify(r[n]);return v(s,{style:[c.cmpRow,i>0&&D.rowDivider,a&&c.cmpDiff],children:[p(l,{style:c.cmpKey,numberOfLines:1,children:n}),p(l,{style:[c.cmpVal,a&&{color:d.color.danger}],numberOfLines:2,children:Tr(o[n])}),p(l,{style:[c.cmpVal,a&&{color:d.color.accent}],numberOfLines:2,children:Tr(r[n])})]},n)})]})}function Rr({c:e,id:t}){return v(Xt,{children:[e.image?p(gt,{testID:"buoy-internal-chat-image",source:{uri:e.image},style:c.cardImage,resizeMode:"contain",accessibilityLabel:e.title}):null,v(s,{style:c.cardText,children:[p(l,{style:c.cardTitle,numberOfLines:2,children:e.title}),e.subtitle?p(l,{style:D.rowSub,numberOfLines:2,children:e.subtitle}):null,e.facts?.slice(0,4).map(o=>v(s,{style:c.fact,children:[p(l,{style:c.factLabel,children:o.label}),p(l,{style:[c.factValue,o.tone&&{color:bt(o.tone)}],children:o.value})]},o.label))]}),p(Pe,{actions:e.actions,blockId:t})]})}function Aa({block:e}){return p(O,{source:e.source,testID:`buoy-block-card-${e.id}`,children:p(Rr,{c:e,id:e.id})})}function Ba({block:e}){return v(s,{testID:`buoy-block-cardcarousel-${e.id}`,children:[e.title?p(l,{style:c.carouselTitle,children:e.title}):null,p(Fe,{horizontal:true,showsHorizontalScrollIndicator:false,snapToInterval:232,decelerationRate:"fast",contentContainerStyle:c.carousel,children:e.cards.slice(0,8).map((t,o)=>p(s,{style:c.carouselCard,children:p(Rr,{c:t,id:`${e.id}-${o}`})},`${t.title}-${o}`))})]})}function Ha({block:e}){let[t,o]=Ue(false);return v(O,{title:e.route?`Screen \xB7 ${e.route}`:"Screen",source:e.source,testID:`buoy-block-screenshot-${e.id}`,children:[p(f,{onPress:()=>o(r=>!r),accessibilityRole:"imagebutton",accessibilityLabel:e.caption??"Screenshot",children:p(gt,{testID:"buoy-internal-chat-image",source:{uri:e.url},style:[c.shot,t&&c.shotBig],resizeMode:"contain"})}),e.caption?p(l,{style:c.hint,children:e.caption}):null]})}function La({block:e}){let t=e.steps.filter(o=>o.state==="done").length;return v(O,{title:e.title,testID:`buoy-block-plan-${e.id}`,tone:e.pending?"info":void 0,children:[p(s,{style:c.progress,children:p(s,{style:[c.progressFill,{width:`${t/Math.max(1,e.steps.length)*100}%`}]})}),e.steps.map((o,r)=>v(s,{style:[c.step,r>0&&D.rowDivider],children:[p(s,{style:[c.stepMark,o.state==="done"&&c.stepDone,o.state==="failed"&&c.stepFailed,o.state==="running"&&c.stepRunning],children:o.state==="done"?p(wr,{size:10,color:d.color.onAccent}):o.state==="failed"?p(ba,{size:10,color:d.color.text}):p(l,{style:c.stepNum,children:r+1})}),v(l,{style:[D.rowTitle,o.state==="done"&&c.muted],children:[o.text,o.state==="running"?"\u2026":""]})]},r)),p(Pe,{actions:e.actions??(e.pending?[{label:"Go",primary:true,send:"Go ahead with the plan."},{label:"Change it",send:"Let me change the plan first."}]:void 0),blockId:e.id})]})}function Wa({block:e}){let t=Z();return v(f,{testID:`buoy-block-checkpoint-${e.id}`,disabled:!e.restore,onPress:()=>e.restore&&void t.runAction(e.restore,e.id),style:c.checkpoint,accessibilityRole:"button",children:[p(s,{style:c.cpFlag}),v(l,{style:c.cpText,children:[e.label,e.at?` \xB7 ${e.at}`:""]}),e.restore?p(l,{style:c.cpRestore,children:e.restore.label}):null]})}function Oa({block:e}){let t=e.status==="failed"?d.color.danger:e.status==="done"?d.color.accent:d.color.info;return v(O,{testID:`buoy-block-task-${e.id}`,children:[v(s,{style:c.taskHead,children:[p(l,{style:c.cardTitle,children:e.title}),p(s,{style:[D.pill,{backgroundColor:`${t}22`}],children:p(l,{style:[D.pillText,{color:t}],children:e.status.toUpperCase()})})]}),e.progress!==void 0?p(s,{style:[c.progress,c.pad],children:p(s,{style:[c.progressFill,{width:`${Math.round(e.progress*100)}%`,backgroundColor:t}]})}):null,e.detail?p(l,{style:c.hint,children:e.detail}):null,p(Pe,{actions:e.actions,blockId:e.id})]})}function Pa({block:e}){let t=e.tone==="danger"?d.color.danger:e.tone==="warning"?d.color.warning:d.color.info;return v(s,{style:[c.banner,{borderColor:t,backgroundColor:`${t}1A`}],testID:`buoy-block-banner-${e.id}`,children:[p(ua,{size:13,color:t}),p(l,{style:[c.bannerText,{color:t}],numberOfLines:2,children:e.text}),e.actions?.[0]?p(Pe,{actions:e.actions.slice(0,1),blockId:e.id,align:"right"}):null]})}function Va({block:e}){return v(O,{testID:`buoy-block-file-${e.id}`,children:[v(s,{style:D.row,children:[p(s,{style:c.fileIcon,children:p(l,{style:c.fileExt,children:(e.type??e.name.split(".").pop()??"file").toUpperCase().slice(0,4)})}),v(s,{style:c.flex,children:[p(l,{style:D.rowTitle,numberOfLines:1,children:e.name}),e.size?p(l,{style:D.rowSub,children:e.size}):null]})]}),p(Pe,{actions:e.actions,blockId:e.id})]})}function Ea({block:e}){let t=Z(),o=t.answered[e.id];return v(O,{testID:`buoy-block-upload-${e.id}`,tone:o?void 0:"info",children:[p(l,{style:c.question,children:e.label}),o?p(l,{style:c.decided,children:o.kind==="upload"?`Attached ${o.name}`:"(skipped)"}):p(s,{style:[c.rowEnd,{justifyContent:"flex-start"}],children:p(f,{onPress:()=>t.answer({blockId:e.id,kind:"upload",name:"screenshot.png"}),style:[c.button,c.buttonPlate],children:p(l,{style:c.buttonTextPlate,children:e.accept==="image"?"Choose a screenshot":"Choose a file"})})})]})}var c=x.create({flex:{flex:1},pad:{paddingHorizontal:12,paddingBottom:8},muted:{color:d.color.textSecondary},dim:{opacity:.45},disabled:{opacity:.5},pressed:{opacity:.7},question:{color:d.color.text,fontSize:d.font.row,fontWeight:"600",lineHeight:20,paddingHorizontal:12,paddingTop:12,paddingBottom:8},hint:{color:d.color.textTertiary,fontSize:d.font.micro,paddingHorizontal:12,paddingBottom:10},decided:{color:d.color.textSecondary,fontSize:d.font.caption,fontWeight:"600",paddingHorizontal:12,paddingVertical:10},rowEnd:{flexDirection:"row",justifyContent:"flex-end",paddingHorizontal:12,paddingBottom:12,gap:8},actionsRow:{flexDirection:"row",gap:8,paddingHorizontal:12,paddingVertical:12,alignItems:"center"},button:{paddingHorizontal:14,paddingVertical:9,borderRadius:d.radius.row},buttonPrimary:{backgroundColor:d.color.accent},buttonPlate:{backgroundColor:d.color.button},buttonTextPrimary:{color:d.color.onAccent,fontSize:d.font.caption,fontWeight:"600"},buttonTextPlate:{color:d.color.text,fontSize:d.font.caption,fontWeight:"600"},chips:{flexDirection:"row",flexWrap:"wrap",gap:6},chip:{paddingHorizontal:12,paddingVertical:7,borderRadius:d.radius.chip,backgroundColor:d.color.fill,borderWidth:x.hairlineWidth,borderColor:d.color.border},chipOn:{backgroundColor:d.color.accentSoft,borderColor:d.color.accentBorderStrong},chipText:{color:d.color.text,fontSize:d.font.caption},chipTextOn:{color:d.color.accent,fontWeight:"600"},optionsBox:{marginHorizontal:8,marginBottom:8,borderRadius:d.radius.row,backgroundColor:d.color.surfaceElevated,overflow:"hidden"},option:{flexDirection:"row",alignItems:"center",gap:10,paddingHorizontal:12,paddingVertical:10},optionLabel:{color:d.color.text,fontSize:d.font.body,fontWeight:"500"},optionDetail:{color:d.color.textSecondary,fontSize:d.font.caption},checkbox:{width:20,height:20,borderRadius:6,borderWidth:1.5,borderColor:d.color.textTertiary,alignItems:"center",justifyContent:"center"},checkboxOn:{backgroundColor:d.color.accent,borderColor:d.color.accent},selectBox:{marginHorizontal:12,marginBottom:12,borderRadius:d.radius.row,backgroundColor:d.color.surfaceElevated,overflow:"hidden"},selectField:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingHorizontal:12,paddingVertical:11},selectPlaceholder:{color:d.color.textSecondary,fontSize:d.font.body},search:{flexDirection:"row",alignItems:"center",gap:6,paddingHorizontal:12,paddingVertical:6,borderTopWidth:x.hairlineWidth,borderTopColor:d.color.separator},searchInput:{flex:1,color:d.color.text,fontSize:d.font.caption,paddingVertical:4},sliderRow:{flexDirection:"row",alignItems:"center",gap:8},stepBtn:{width:28,height:28,borderRadius:14,backgroundColor:d.color.fill,alignItems:"center",justifyContent:"center"},stepText:{color:d.color.text,fontSize:16,fontWeight:"600"},trackHit:{flex:1,height:36,justifyContent:"center"},track:{height:6,borderRadius:3,backgroundColor:d.color.fillTertiary,justifyContent:"center"},fill:{height:6,borderRadius:3,backgroundColor:d.color.accent},thumb:{position:"absolute",width:20,height:20,borderRadius:10,backgroundColor:d.color.knob,marginLeft:-10,shadowColor:"#000",shadowOpacity:.35,shadowRadius:3,shadowOffset:{width:0,height:1}},sliderValue:{width:64,textAlign:"right",color:d.color.text,fontSize:d.font.caption,fontWeight:"600"},inputRow:{flexDirection:"row",alignItems:"center",gap:8,paddingBottom:12},input:{flex:1,height:38,paddingHorizontal:12,borderRadius:d.radius.row,backgroundColor:d.color.surfaceElevated,color:d.color.text,fontSize:d.font.body},fieldRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:10,paddingVertical:6},fieldCol:{paddingVertical:6,gap:6},fieldLabel:{color:d.color.textSecondary,fontSize:d.font.caption,width:110},fieldInput:{flex:1,height:34,paddingHorizontal:10,borderRadius:d.radius.segment,backgroundColor:d.color.surfaceElevated,color:d.color.text,fontSize:d.font.caption},confirmTitle:{color:d.color.text,fontSize:d.font.row,fontWeight:"600",paddingHorizontal:12,paddingTop:12},confirmChange:{color:d.color.text,fontSize:d.font.body,lineHeight:19,paddingHorizontal:12,paddingTop:6,paddingBottom:6},consequence:{color:d.color.warning,fontSize:d.font.caption,paddingHorizontal:12},claim:{gap:6,paddingHorizontal:2},claimText:{color:d.color.text,fontSize:d.font.row,lineHeight:22},cite:{color:d.color.accent,fontSize:d.font.caption,fontWeight:"700"},verified:{color:d.color.accent,fontSize:d.font.caption,fontWeight:"600"},citeBox:{padding:10,borderRadius:d.radius.row,backgroundColor:d.color.surface,borderWidth:x.hairlineWidth,borderColor:d.color.border,gap:2},citeLabel:{color:d.color.text,fontSize:d.font.caption,fontWeight:"600"},citeDetail:{color:d.color.textSecondary,fontSize:d.font.caption,fontFamily:"Menlo"},verifyBtn:{alignSelf:"flex-start",flexDirection:"row",alignItems:"center",gap:5,paddingHorizontal:10,paddingVertical:5,borderRadius:d.radius.chip,backgroundColor:d.color.accentSoft},verifyText:{color:d.color.accent,fontSize:d.font.micro,fontWeight:"700"},detailsBody:{color:d.color.textSecondary,fontSize:d.font.caption,lineHeight:18,paddingHorizontal:12,paddingBottom:12},tabsWrap:{gap:8},tabBar:{flexDirection:"row",gap:6},tab:{paddingHorizontal:12,paddingVertical:6,borderRadius:d.radius.badge,backgroundColor:d.color.fill},tabOn:{backgroundColor:d.color.accentSoft},tabText:{color:d.color.textSecondary,fontSize:d.font.caption,fontWeight:"600"},tabTextOn:{color:d.color.accent},tlRow:{flexDirection:"row",gap:10,paddingHorizontal:12,paddingVertical:4,alignItems:"flex-start"},tlAt:{width:46,color:d.color.textTertiary,fontSize:d.font.micro,fontFamily:"Menlo",paddingTop:3},tlLine:{width:12,alignItems:"center"},tlDot:{width:8,height:8,borderRadius:4,marginTop:5},tlStem:{width:1,flex:1,minHeight:18,backgroundColor:d.color.separator,marginTop:2},tlSource:{color:d.color.textTertiary,fontSize:9,fontWeight:"700",letterSpacing:.6},sparkHead:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingHorizontal:12,paddingTop:8},sparkCurrent:{color:d.color.text,fontSize:22,fontWeight:"700"},sparkUnit:{color:d.color.textSecondary,fontSize:d.font.caption,fontWeight:"500"},spark:{flexDirection:"row",alignItems:"flex-end",gap:2,paddingHorizontal:12,paddingTop:6,paddingBottom:6},sparkBar:{flex:1,borderRadius:1},live:{flexDirection:"row",alignItems:"center",gap:5,paddingHorizontal:8,paddingVertical:3,borderRadius:d.radius.badge,backgroundColor:d.color.dangerSoft},liveDot:{width:6,height:6,borderRadius:3,backgroundColor:d.color.danger},liveText:{color:d.color.danger,fontSize:9,fontWeight:"800",letterSpacing:.8},cmpHead:{flexDirection:"row",paddingHorizontal:12,paddingVertical:6,backgroundColor:d.color.fill,gap:8},cmpCol:{flex:1,color:d.color.textTertiary,fontSize:d.font.micro,fontWeight:"700",letterSpacing:.6,textTransform:"uppercase"},cmpRow:{flexDirection:"row",paddingHorizontal:12,paddingVertical:8,gap:8,alignItems:"flex-start"},cmpDiff:{backgroundColor:d.color.fill},cmpKey:{width:90,color:d.color.textSecondary,fontSize:d.font.caption},cmpVal:{flex:1,color:d.color.text,fontSize:d.font.caption,fontFamily:"Menlo"},cardImage:{width:"100%",height:140,backgroundColor:d.color.fill},cardText:{paddingHorizontal:12,paddingTop:10,paddingBottom:4,gap:4},cardTitle:{color:d.color.text,fontSize:d.font.row,fontWeight:"600"},fact:{flexDirection:"row",justifyContent:"space-between",gap:8},factLabel:{color:d.color.textSecondary,fontSize:d.font.caption},factValue:{color:d.color.text,fontSize:d.font.caption,fontWeight:"500"},carouselTitle:{color:d.color.text,fontSize:d.font.caption,fontWeight:"600",paddingBottom:8},carousel:{gap:8,paddingRight:8},carouselCard:{width:224,borderRadius:d.radius.card,borderWidth:x.hairlineWidth,borderColor:d.color.border,backgroundColor:d.color.surface,overflow:"hidden"},shot:{width:"100%",height:220,backgroundColor:d.color.fill},shotBig:{height:520},progress:{height:4,backgroundColor:d.color.fill,marginHorizontal:12,marginTop:6,marginBottom:8,borderRadius:2,overflow:"hidden"},progressFill:{height:4,backgroundColor:d.color.accent},step:{flexDirection:"row",alignItems:"center",gap:10,paddingHorizontal:12,paddingVertical:9},stepMark:{width:20,height:20,borderRadius:10,backgroundColor:d.color.fillTertiary,alignItems:"center",justifyContent:"center"},stepDone:{backgroundColor:d.color.accent},stepFailed:{backgroundColor:d.color.danger},stepRunning:{backgroundColor:d.color.info},stepNum:{color:d.color.text,fontSize:d.font.micro,fontWeight:"700"},checkpoint:{alignSelf:"flex-start",flexDirection:"row",alignItems:"center",gap:8,paddingHorizontal:12,paddingVertical:7,borderRadius:d.radius.chip,backgroundColor:d.color.fill},cpFlag:{width:8,height:8,borderRadius:2,backgroundColor:d.color.info},cpText:{color:d.color.textSecondary,fontSize:d.font.caption},cpRestore:{color:d.color.accent,fontSize:d.font.caption,fontWeight:"600"},taskHead:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:8,paddingHorizontal:12,paddingTop:12},banner:{flexDirection:"row",alignItems:"center",gap:8,paddingLeft:12,paddingRight:4,paddingVertical:4,borderRadius:d.radius.row,borderWidth:x.hairlineWidth},bannerText:{flex:1,fontSize:d.font.caption,fontWeight:"600"},fileIcon:{width:40,height:40,borderRadius:8,backgroundColor:d.color.fill,alignItems:"center",justifyContent:"center"},fileExt:{color:d.color.textSecondary,fontSize:10,fontWeight:"800"}});import{jsx as A}from"react/jsx-runtime";var Na=class extends Vi{constructor(){super(...arguments);this.state={failed:false}}static getDerivedStateFromError(){return{failed:true}}render(){return this.state.failed?A(l,{style:ja.fallback,testID:"buoy-block-render-failed",children:"This card couldn't be drawn \u2014 the data behind it is still in the conversation."}):this.props.children}},ja=x.create({fallback:{color:Zo.color.textTertiary,fontSize:Zo.font.micro,fontStyle:"italic",paddingVertical:6}}),Ma=e=>A(Zt,{block:e});function Zt({block:e}){return A(Na,{children:A(qa,{block:e})})}function qa({block:e}){switch(e.kind){case"choice":return A(dl,{block:e});case"confirm":return A(ul,{block:e});case"input":return A(pl,{block:e});case"table":return A(Wl,{block:e});case"keyValue":return A(Ol,{block:e});case"list":return A(Vl,{block:e});case"imageGrid":return A(Gl,{block:e});case"diff":return A(Nl,{block:e});case"chart":return A(jl,{block:e});case"steps":return A(Ml,{block:e});case"code":return A(_l,{block:e});case"actions":return A(Pe,{actions:e.actions,blockId:e.id});case"notice":return A(Kl,{block:e});case"finding":return A(Ql,{block:e});case"requestList":return A(ta,{block:e});case"requestCard":return A(ra,{block:e});case"ruleCard":return A(na,{block:e});case"screenElements":return A(ia,{block:e});case"routeChips":return A(la,{block:e});case"logList":return A(aa,{block:e});case"crash":return A(sa,{block:e});case"peek":return A(ca,{block:e});case"suggestions":return A(fa,{block:e});case"multiSelect":return A(ya,{block:e});case"select":return A(xa,{block:e});case"slider":return A(ka,{block:e});case"dateTime":return A(wa,{block:e});case"form":return A(va,{block:e});case"proposal":return A(Sa,{block:e});case"claim":return A(Ta,{block:e});case"details":return A(Ca,{block:e});case"tabs":return A(za,{block:e,renderNested:Ma});case"timeline":return A(Da,{block:e});case"sparkline":return A(Ra,{block:e});case"compare":return A($a,{block:e});case"card":return A(Aa,{block:e});case"cardCarousel":return A(Ba,{block:e});case"screenshot":return A(Ha,{block:e});case"plan":return A(La,{block:e});case"checkpoint":return A(Wa,{block:e});case"task":return A(Oa,{block:e});case"banner":return A(Pa,{block:e});case"file":return A(Va,{block:e});case"upload":return A(Ea,{block:e});default:return null}}import{useEffect as Fa,useState as yt}from"react";import{ChevronDown as Ua,ChevronRight as _a,Copy as Ka,night as T,RefreshCw as Qa}from"@buoy-gg/shared-ui/web";import{jsx as V,jsxs as ze}from"react/jsx-runtime";function Vt({label:e,onPress:t,children:o}){return V(f,{onPress:t,accessibilityRole:"button",accessibilityLabel:e,style:({pressed:r})=>[H.iconBtn,r&&H.pressed],children:o})}function Ja({id:e="chrome-actions"}){let t=Z(),[o,r]=yt(null),n=i=>void t.runAction({label:i,send:`__chrome__:${i}`},e);return ze(s,{style:H.actions,testID:"chrome-message-actions",children:[V(Vt,{label:"Copy",onPress:()=>n("copy"),children:V(Ka,{size:13,color:T.color.textSecondary})}),V(Vt,{label:"Retry",onPress:()=>n("retry"),children:V(Qa,{size:13,color:T.color.textSecondary})}),V(Vt,{label:"Good answer",onPress:()=>{r("up"),n("thumbs up")},children:V(l,{style:[H.glyph,o==="up"&&H.glyphOn],children:"\u{1F44D}"})}),V(Vt,{label:"Bad answer",onPress:()=>{r("down"),n("thumbs down")},children:V(l,{style:[H.glyph,o==="down"&&H.glyphOn],children:"\u{1F44E}"})}),V(Vt,{label:"Export",onPress:()=>n("export transcript"),children:V(l,{style:H.textBtn,children:"Export"})})]})}function Ga({text:e,live:t}){let[o,r]=yt(false);return ze(s,{style:H.reasoning,testID:"chrome-reasoning",children:[ze(f,{onPress:()=>r(n=>!n),style:H.reasoningHead,accessibilityRole:"button",accessibilityState:{expanded:o},children:[t?V(Lt,{size:"small",color:T.color.textTertiary}):null,V(l,{style:H.reasoningTitle,children:t?"Working it out\u2026":"How I got here"}),o?V(Ua,{size:12,color:T.color.textTertiary}):V(_a,{size:12,color:T.color.textTertiary})]}),o?V(l,{style:H.reasoningBody,children:e}):null]})}function Ya({label:e}){let[t,o]=yt(0);return Fa(()=>{let r=setInterval(()=>o(n=>n+250),250);return()=>clearInterval(r)},[]),ze(s,{style:H.elapsed,testID:"chrome-elapsed",children:[V(Lt,{size:"small",color:T.color.textSecondary}),V(l,{style:H.elapsedLabel,children:e}),ze(l,{style:H.elapsedMs,children:[(t/1e3).toFixed(1),"s"]})]})}function Xa(){let[e,t]=yt(""),[o,r]=yt(null);return ze(s,{style:H.composerWrap,testID:"chrome-queue",children:[o?ze(s,{style:H.queuedRow,children:[ze(l,{style:H.queuedText,numberOfLines:1,children:['Queued: "',o,'"']}),V(f,{onPress:()=>r(null),children:V(l,{style:H.queuedCancel,children:"Cancel"})})]}):null,ze(s,{style:H.composer,children:[V(Xe,{style:H.composerInput,value:e,onChangeText:t,placeholder:"Agent is busy \u2014 type and it sends next",placeholderTextColor:T.color.placeholder}),V(f,{disabled:!e.trim(),onPress:()=>{r(e.trim()),t("")},style:[H.queueBtn,!e.trim()&&{opacity:.5}],children:V(l,{style:H.queueBtnText,children:"Queue"})})]})]})}function Za({at:e}){return ze(s,{style:H.divider,testID:"chrome-divider",children:[V(s,{style:H.dividerLine}),ze(l,{style:H.dividerText,children:["App reloaded \xB7 ",e]}),V(s,{style:H.dividerLine})]})}function es({at:e}){return V(l,{style:H.timestamp,children:e})}function ts({text:e}){let t=Z(),[o,r]=yt(false),[n,i]=yt(e);return V(s,{style:H.userWrap,testID:"chrome-edit-bubble",children:o?ze(s,{style:H.editBox,children:[V(Xe,{style:H.editInput,value:n,onChangeText:i,multiline:true}),ze(s,{style:H.editActions,children:[V(f,{onPress:()=>{r(false),t.runAction({label:"re-run edited",send:`__chrome__:re-run "${n}"`},"chrome-edit")},style:H.editPrimary,children:V(l,{style:H.editPrimaryText,children:"Re-run from here"})}),V(f,{onPress:()=>{r(false),t.runAction({label:"branch",send:`__chrome__:branch "${n}"`},"chrome-edit")},style:H.editPlate,children:V(l,{style:H.editPlateText,children:"Branch"})}),V(f,{onPress:()=>r(false),style:H.editPlate,children:V(l,{style:H.editPlateText,children:"Cancel"})})]})]}):ze(f,{onLongPress:()=>r(true),onPress:()=>r(true),style:H.bubble,accessibilityRole:"button",accessibilityLabel:"Edit message",children:[V(l,{style:H.bubbleText,children:n}),V(l,{style:H.bubbleHint,children:"tap to edit \xB7 2 branches"})]})})}var H=x.create({actions:{flexDirection:"row",alignItems:"center",gap:4,paddingHorizontal:2},iconBtn:{paddingHorizontal:8,paddingVertical:6,borderRadius:T.radius.badge},pressed:{backgroundColor:T.color.fill},glyph:{fontSize:13,opacity:.6},glyphOn:{opacity:1},textBtn:{color:T.color.textSecondary,fontSize:T.font.micro,fontWeight:"600"},reasoning:{borderRadius:T.radius.row,backgroundColor:T.color.fill,overflow:"hidden"},reasoningHead:{flexDirection:"row",alignItems:"center",gap:8,paddingHorizontal:12,paddingVertical:8},reasoningTitle:{flex:1,color:T.color.textSecondary,fontSize:T.font.caption,fontStyle:"italic"},reasoningBody:{color:T.color.textSecondary,fontSize:T.font.caption,lineHeight:18,paddingHorizontal:12,paddingBottom:10},elapsed:{flexDirection:"row",alignItems:"center",gap:10,paddingHorizontal:12,paddingVertical:10,borderRadius:T.radius.card,borderWidth:x.hairlineWidth,borderColor:T.color.border,backgroundColor:T.color.surface},elapsedLabel:{flex:1,color:T.color.text,fontSize:T.font.body},elapsedMs:{color:T.color.textTertiary,fontSize:T.font.caption,fontFamily:"Menlo"},composerWrap:{gap:6},queuedRow:{flexDirection:"row",alignItems:"center",gap:8,paddingHorizontal:12,paddingVertical:6,borderRadius:T.radius.row,backgroundColor:T.color.infoSoft},queuedText:{flex:1,color:T.color.text,fontSize:T.font.caption},queuedCancel:{color:T.color.info,fontSize:T.font.caption,fontWeight:"600"},composer:{flexDirection:"row",alignItems:"center",gap:8},composerInput:{flex:1,height:40,paddingHorizontal:16,borderRadius:20,borderWidth:x.hairlineWidth,borderColor:T.color.border,backgroundColor:T.color.surfaceElevated,color:T.color.text,fontSize:T.font.body},queueBtn:{paddingHorizontal:14,height:40,borderRadius:20,backgroundColor:T.color.button,alignItems:"center",justifyContent:"center"},queueBtnText:{color:T.color.text,fontSize:T.font.caption,fontWeight:"600"},divider:{flexDirection:"row",alignItems:"center",gap:10,paddingVertical:4},dividerLine:{flex:1,height:x.hairlineWidth,backgroundColor:T.color.border},dividerText:{color:T.color.textTertiary,fontSize:T.font.micro},timestamp:{alignSelf:"center",color:T.color.textTertiary,fontSize:T.font.micro},userWrap:{alignItems:"flex-end"},bubble:{maxWidth:"84%",paddingHorizontal:14,paddingVertical:9,borderRadius:18,borderBottomRightRadius:6,backgroundColor:T.color.accentFill,borderWidth:x.hairlineWidth,borderColor:T.color.accentBorder,gap:4},bubbleText:{color:T.color.text,fontSize:T.font.row,lineHeight:21},bubbleHint:{color:T.color.textTertiary,fontSize:10,textAlign:"right"},editBox:{width:"100%",gap:8},editInput:{minHeight:60,padding:12,borderRadius:T.radius.row,backgroundColor:T.color.surfaceElevated,color:T.color.text,fontSize:T.font.row,borderWidth:x.hairlineWidth,borderColor:T.color.accentBorderStrong},editActions:{flexDirection:"row",gap:8,justifyContent:"flex-end",flexWrap:"wrap"},editPrimary:{paddingHorizontal:12,paddingVertical:8,borderRadius:T.radius.row,backgroundColor:T.color.accent},editPrimaryText:{color:T.color.onAccent,fontSize:T.font.caption,fontWeight:"600"},editPlate:{paddingHorizontal:12,paddingVertical:8,borderRadius:T.radius.row,backgroundColor:T.color.button},editPlateText:{color:T.color.text,fontSize:T.font.caption,fontWeight:"600"}});import{useState as $r}from"react";import{AlertTriangle as os,ChevronDown as rs,night as P}from"@buoy-gg/shared-ui/web";import{jsx as ge,jsxs as Et}from"react/jsx-runtime";function Ar({pending:e,onAnswer:t}){let[o,r]=$r("");return Et(s,{style:Q.card,testID:"buoy-ask-buoy-approval",children:[Et(s,{style:Q.titleRow,children:[ge(os,{size:14,color:P.color.warning}),ge(l,{style:Q.title,children:"Allow this change?"})]}),e.restored?ge(l,{style:Q.restored,testID:"buoy-ask-buoy-approval-restored",children:"Asked before the app restarted \u2014 check it still applies."}):null,ge(l,{style:Q.label,children:e.label}),ge(l,{style:Q.reason,children:e.reason}),e.description?ge(ns,{text:e.description}):null,ge(Xe,{testID:"buoy-ask-buoy-approval-note",value:o,onChangeText:r,placeholder:"Add a note for the agent (optional)",placeholderTextColor:P.color.textTertiary,style:Q.note,returnKeyType:"done",blurOnSubmit:true}),Et(s,{style:Q.actions,children:[ge(f,{testID:"buoy-ask-buoy-approve",accessibilityRole:"button",onPress:()=>t({approved:true,reason:o}),style:({pressed:n})=>[Q.button,Q.approve,n&&Q.pressed],children:ge(l,{style:Q.approveText,children:"Allow"})}),e.restored?null:ge(f,{testID:"buoy-ask-buoy-approve-trust",accessibilityRole:"button",onPress:()=>t({approved:true,reason:o,trust:true}),style:({pressed:n})=>[Q.button,Q.trust,n&&Q.pressed],children:ge(l,{style:Q.trustText,children:"Allow for this chat"})}),ge(f,{testID:"buoy-ask-buoy-reject",accessibilityRole:"button",onPress:()=>t({approved:false,reason:o}),style:({pressed:n})=>[Q.button,Q.reject,n&&Q.pressed],children:ge(l,{style:Q.rejectText,children:"Not now"})})]})]})}function ns({text:e}){let[t,o]=$r(false);return Et(s,{children:[Et(f,{testID:"buoy-ask-buoy-approval-details",accessibilityRole:"button",accessibilityState:{expanded:t},onPress:()=>o(r=>!r),style:({pressed:r})=>[Q.disclosure,r&&Q.pressed],hitSlop:6,children:[ge(s,{style:t?Q.chevronOpen:Q.chevronClosed,children:ge(rs,{size:12,color:P.color.textTertiary})}),ge(l,{style:Q.disclosureText,children:t?"Hide details":"Details"})]}),t?ge(Fe,{style:Q.detail,contentContainerStyle:Q.detailContent,nestedScrollEnabled:true,children:ge(l,{style:Q.description,children:e})}):null]})}var Q=x.create({card:{marginHorizontal:P.gutter,marginBottom:10,padding:P.cardPad,borderRadius:P.radius.card,borderWidth:x.hairlineWidth,borderColor:P.color.accentBorderStrong,backgroundColor:P.color.surface,gap:6},titleRow:{flexDirection:"row",alignItems:"center",gap:6},title:{color:P.color.text,fontSize:P.font.caption,fontWeight:"600"},label:{color:P.color.text,fontSize:P.font.row,fontWeight:"600",lineHeight:20},description:{color:P.color.textSecondary,fontSize:P.font.caption,lineHeight:18},reason:{color:P.color.warning,fontSize:P.font.caption,lineHeight:18},restored:{color:P.color.info,backgroundColor:P.color.infoSoft,fontSize:P.font.micro,lineHeight:16,paddingHorizontal:8,paddingVertical:5,borderRadius:8},disclosure:{flexDirection:"row",alignItems:"center",gap:4,paddingVertical:4},disclosureText:{color:P.color.textTertiary,fontSize:P.font.micro,fontWeight:"600"},chevronOpen:{transform:[{rotate:"0deg"}]},chevronClosed:{transform:[{rotate:"-90deg"}]},detail:{maxHeight:150,marginTop:2},detailContent:{paddingBottom:2},note:{color:P.color.text,fontSize:P.font.caption,paddingHorizontal:10,paddingVertical:7,borderRadius:P.radius.row,borderWidth:x.hairlineWidth,borderColor:P.color.border,backgroundColor:P.color.button,marginTop:2},actions:{flexDirection:"row",flexWrap:"wrap",gap:8,marginTop:6},button:{paddingHorizontal:16,paddingVertical:9,borderRadius:P.radius.row},approve:{backgroundColor:P.color.accent},approveText:{color:P.color.onAccent,fontWeight:"600",fontSize:P.font.caption},trust:{backgroundColor:P.color.button,borderWidth:x.hairlineWidth,borderColor:P.color.accentBorderStrong},trustText:{color:P.color.accent,fontWeight:"600",fontSize:P.font.caption},reject:{backgroundColor:P.color.button},rejectText:{color:P.color.text,fontSize:P.font.caption},pressed:{opacity:.7}});import{useSyncExternalStore as is}from"react";import{ChevronDown as ls,ChevronRight as as,night as oe}from"@buoy-gg/shared-ui/web";import{isReversible as Br}from"@buoy-gg/agent-core/web";import{jsx as ot,jsxs as at}from"react/jsx-runtime";var Hr=[];function Lr(e){return is(t=>e?.subscribe(t)??(()=>{}),()=>e?.list()??Hr,()=>e?.list()??Hr)}function Wr({ledger:e,onUndoAll:t,expanded:o,onToggle:r}){let n=Lr(e).filter(C=>!C.undoneAt),i=n.filter(C=>C.effect.kind!=="transient");if(i.length===0)return null;let a=i.filter(C=>Br(C.effect)),h=i.length-a.length,u=n.length-i.length,g=o?ls:as,y=[a.length>0?`${a.length} undoable`:null,h>0?`${h} permanent`:null].filter(Boolean).join(" \xB7 ");return at(s,{style:ue.wrap,children:[at(f,{testID:"buoy-ask-buoy-changes-bar",accessibilityRole:"button",accessibilityState:{expanded:o},onPress:r,style:ue.bar,children:[ot(s,{style:ue.dot}),ot(l,{style:ue.summary,numberOfLines:1,children:"Changed this app"}),ot(l,{style:ue.counts,numberOfLines:1,children:y}),ot(g,{size:12,color:oe.color.textSecondary})]}),o&&at(s,{style:ue.panel,children:[at(Fe,{style:ue.panelScroll,testID:"buoy-ask-buoy-changes-scroll",keyboardShouldPersistTaps:"handled",children:[i.map(C=>{let j=!Br(C.effect);return at(s,{style:ue.row,children:[ot(l,{style:ue.rowLabel,children:C.effect.label}),ot(l,{style:[ue.rowTag,j&&ue.rowTagMuted],children:j?"Permanent":"Undoable"})]},C.id)}),u>0&&ot(s,{style:ue.row,children:at(l,{style:[ue.rowLabel,ue.rowLabelMuted],children:["Also did ",u," one-shot action",u===1?"":"s"," (navigation, taps) \u2014 nothing to undo."]})})]}),at(s,{style:ue.footer,children:[a.length>0&&ot(f,{testID:"buoy-ask-buoy-undo-all",accessibilityRole:"button",onPress:t,style:({pressed:C})=>[ue.undo,C&&ue.pressed],children:at(l,{style:ue.undoText,children:["Undo ",a.length," change",a.length===1?"":"s"]})}),h>0&&ot(l,{style:ue.footnote,children:"Permanent changes can't be undone from here."})]})]})]})}var ue=x.create({wrap:{borderBottomWidth:x.hairlineWidth,borderBottomColor:oe.color.border,backgroundColor:oe.color.warningSoft},bar:{flexDirection:"row",alignItems:"center",gap:8,paddingHorizontal:oe.gutter,paddingVertical:10},dot:{width:7,height:7,borderRadius:4,backgroundColor:oe.color.warning},summary:{color:oe.color.text,fontSize:oe.font.caption,fontWeight:"600"},counts:{flex:1,color:oe.color.textSecondary,fontSize:oe.font.caption},panel:{paddingHorizontal:oe.gutter,paddingBottom:12,gap:10},panelScroll:{maxHeight:180},row:{flexDirection:"row",alignItems:"flex-start",gap:10,paddingVertical:8,borderTopWidth:x.hairlineWidth,borderTopColor:oe.color.separator},rowLabel:{flex:1,color:oe.color.text,fontSize:oe.font.caption,lineHeight:18},rowTag:{color:oe.color.accent,fontSize:oe.font.micro,fontWeight:"600",letterSpacing:.6,textTransform:"uppercase",paddingTop:2},rowTagMuted:{color:oe.color.textTertiary},rowLabelMuted:{color:oe.color.textTertiary},footer:{flexDirection:"row",alignItems:"center",gap:12,flexWrap:"wrap"},undo:{paddingHorizontal:14,paddingVertical:8,borderRadius:oe.radius.row,backgroundColor:oe.color.button},undoText:{color:oe.color.accent,fontSize:oe.font.caption,fontWeight:"600"},footnote:{flex:1,color:oe.color.textTertiary,fontSize:oe.font.micro},pressed:{opacity:.7}});function ss(e){let t={};for(let o of e){let r=o.effect;if(r.kind==="network-override")t[r.ruleId]=o.undoneAt?{deleted:true}:{enabled:true};else if(r.kind==="inverse-call"&&r.toolId==="network"&&r.action==="setOverrideRuleEnabled"&&typeof r.params.id=="string"){let n=r.params.enabled===true;if(t[r.params.id]?.deleted)continue;t[r.params.id]={enabled:o.undoneAt?n:!n}}}return t}import{useCallback as cs,useEffect as Or,useRef as ds,useState as us}from"react";import{night as ke}from"@buoy-gg/shared-ui/web";import{jsx as st,jsxs as ps}from"react/jsx-runtime";var Pr=40,hs=120,Vr=Bt.OS==="ios"?10:6,gs=16;function Er({onSend:e,onStop:t,busy:o,draft:r,onDraftTaken:n,disabled:i,placeholder:a,focusKey:h,canFocus:u=true}){let[g,y]=us(""),C=ds(null);Or(()=>{!h||!u||i||C.current?.focus()},[h,u,i]),Or(()=>{r&&(y(ee=>ee?`${ee} ${r}`:r),n?.())},[r,n]);let j=cs(()=>{let ee=g.trim();ee&&(y(""),e(ee))},[g,e]),q=g.trim().length>0&&!o&&!i,X=g.trim().length>0&&o&&!i;return ps(s,{style:be.wrap,children:[st(s,{style:[be.field,i&&be.fieldDisabled],children:st(Xe,{ref:C,testID:"buoy-ask-buoy-input",style:[be.input,g.length===0&&be.inputEmpty],value:g,onChangeText:y,placeholder:a??(i?"Ask Buoy isn't set up yet":"Ask, or tell it what to change\u2026"),placeholderTextColor:ke.color.placeholder,multiline:true,editable:!i,keyboardType:"ascii-capable",autoCorrect:true,autoCapitalize:"sentences",blurOnSubmit:false,onSubmitEditing:j,returnKeyType:"send",maxLength:4e3})}),X&&st(f,{testID:"buoy-ask-buoy-queue",accessibilityRole:"button",accessibilityLabel:"Queue message",onPress:j,style:({pressed:ee})=>[be.button,be.queue,ee&&be.pressed],children:st(l,{style:[be.sendGlyph,{color:ke.color.accent}],children:"\u2191"})}),o?st(f,{testID:"buoy-ask-buoy-stop",accessibilityRole:"button",accessibilityLabel:"Stop",onPress:t,style:({pressed:ee})=>[be.button,be.stop,ee&&be.pressed],children:st(s,{style:be.stopGlyph})}):st(f,{testID:"buoy-ask-buoy-send",accessibilityRole:"button",accessibilityLabel:"Send",disabled:!q,onPress:j,style:({pressed:ee})=>[be.button,q?be.sendOn:be.sendOff,ee&&q&&be.pressed],children:st(l,{style:[be.sendGlyph,{color:q?ke.color.onAccent:ke.color.textTertiary}],children:"\u2191"})})]})}var be=x.create({wrap:{flexDirection:"row",alignItems:"flex-end",gap:8,paddingHorizontal:ke.gutter,paddingTop:10,paddingBottom:6,borderTopWidth:x.hairlineWidth,borderTopColor:ke.color.border,backgroundColor:ke.color.bg},field:{flex:1,minHeight:Pr,justifyContent:"center",borderRadius:20,borderWidth:x.hairlineWidth,borderColor:ke.color.border,backgroundColor:ke.color.surfaceElevated},fieldDisabled:{opacity:.6},input:{maxHeight:hs,paddingHorizontal:gs,paddingTop:Vr,paddingBottom:Vr,color:ke.color.text,fontSize:ke.font.row},inputEmpty:{height:Pr},button:{width:40,height:40,borderRadius:20,alignItems:"center",justifyContent:"center"},sendGlyph:{fontSize:20,fontWeight:"700",lineHeight:22},sendOn:{backgroundColor:ke.color.accent},sendOff:{backgroundColor:ke.color.fill},stop:{backgroundColor:ke.color.fillTertiary},queue:{backgroundColor:"transparent",borderWidth:x.hairlineWidth,borderColor:ke.color.accentBorderStrong},stopGlyph:{width:12,height:12,borderRadius:2,backgroundColor:ke.color.text},pressed:{opacity:.7}});import{useEffect as bs,useRef as Nr}from"react";import{jsx as fs}from"react/jsx-runtime";function ys({children:e}){let t=Nr(null),o=Nr(new se.Value(0)).current;return bs(()=>{if(Bt.OS!=="ios")return;let r=(h,u)=>{se.timing(o,{toValue:h,duration:u.duration||250,easing:Tt.bezier(.17,.59,.4,.77),useNativeDriver:false}).start()},n=h=>{let u=t.current;u&&u.measureInWindow((g,y,C,j)=>{let q=y+j-h.endCoordinates.screenY;r(Math.max(0,q),h)})},i=h=>r(0,h),a=[uo.addListener("keyboardWillChangeFrame",n),uo.addListener("keyboardWillHide",i)];return()=>a.forEach(h=>h.remove())},[o]),fs(se.View,{ref:t,style:[ms.flex,{paddingBottom:o}],children:e})}var ms=x.create({flex:{flex:1}});import{useEffect as jr,useState as Mr}from"react";import{Check as xs,Copy as ks,FileText as ws,ModalHeader as eo,night as _e,Otto as vs,Plus as Ss,SettingsSolid as Ts,realNow as xo}from"@buoy-gg/shared-ui/web";import{toolTitle as Cs}from"@buoy-gg/agent-core/web";var zs=e=>e.effect==="read"&&e.status==="ok";function Is(e){let t=[],o=[],r=()=>{if(o.length!==0){if(o.length===1)t.push({kind:"call",call:o[0]});else{let n=[...new Set(o.map(i=>Cs(i.toolId)))];t.push({kind:"reads",id:o.map(i=>i.id).join("+"),calls:o,label:`Looked at ${Ds(n)}`,count:o.length})}o=[]}};for(let n of e){if(zs(n)){o.push(n);continue}r(),t.push({kind:"call",call:n})}return r(),t}function Ds(e){return e.length<=1?e[0]??"":e.length===2?`${e[0]} and ${e[1]}`:`${e.slice(0,-1).join(", ")} and ${e[e.length-1]}`}function Rs(e){let t=[];e.startedAt!==void 0&&e.endedAt!==void 0&&e.endedAt>=e.startedAt&&t.push(qr(e.endedAt-e.startedAt));let o=e.toolCalls.length;if(o>0){t.push(`${o} action${o===1?"":"s"}`);let r=u=>e.toolCalls.filter(g=>g.status===u).length,n=r("failed"),i=r("refused"),a=r("declined"),h=r("stopped");n&&t.push(`${n} failed`),i&&t.push(`${i} refused`),a&&t.push(`${a} declined`),h&&t.push(`${h} not run`)}return t.length?t.join(" \xB7 "):null}function qr(e){let t=Math.max(0,Math.floor(e/1e3));if(t<60)return`${t}s`;let o=Math.floor(t/60),r=t%60;return o<60?`${o}m ${String(r).padStart(2,"0")}s`:`${Math.floor(o/60)}h ${String(o%60).padStart(2,"0")}m`}import{jsx as Be,jsxs as Fr}from"react/jsx-runtime";var $s=200,As=()=>"";function Ur({configured:e,busy:t,failed:o=false,activeLabel:r,awaitingApproval:n=false,startedAt:i=null,stopping:a=false,readOnly:h=false,toolCount:u,hasMessages:g,onBack:y,onReset:C,getTranscript:j,onOpenSettings:q,onTicket:X}){let{copied:ee,copy:fe}=fo(j??As),[Ke,Re]=Mr(false);jr(()=>{t?r&&Re(true):Re(false)},[t,r]);let Qe=t&&!n&&i!==null,[Je,ut]=Mr(()=>xo());jr(()=>{if(!Qe)return;ut(xo());let lt=setInterval(()=>ut(xo()),1e3);return()=>clearInterval(lt)},[Qe]);let pt=Qe&&i!==null?qr(Je-i):null,wt=e?o?"error":t?r||Ke?"robot":"thinking":"idle":"confused",Me=a?"Stopping":r??"Thinking",it=e?n?"Waiting for you":t?pt?`${Me} \xB7 ${pt}`:`${Me}\u2026`:h?`Read only${u>0?` \xB7 ${u} tool${u===1?"":"s"}`:""}`:u>0?`Ready \xB7 ${u} tool${u===1?"":"s"} available`:"Ready":"Not set up in this app";return Fr(eo,{children:[y?Be(eo.Navigation,{onBack:y}):null,Be(s,{style:ct.otto,testID:"buoy-ask-buoy-otto",children:Be(vs,{state:wt,pixelSize:2,tickMs:$s,water:false})}),Be(eo.Content,{title:"Ask Buoy",subtitle:it,testID:"buoy-ask-buoy-title"}),Fr(eo.Actions,{children:[X?Be(Ht,{testID:"buoy-ask-buoy-ticket",accessibilityRole:"button",accessibilityLabel:"Summarize for a ticket",disabled:!g||t,onPress:X,style:[ct.actionBtn,(!g||t)&&ct.actionBtnDisabled],children:Be(ws,{size:14,color:g&&!t?_e.color.textSecondary:_e.color.textTertiary})}):null,j?Be(Ht,{testID:"buoy-ask-buoy-copy-chat",accessibilityRole:"button",accessibilityLabel:ee?"Conversation copied":"Copy conversation",disabled:!g,onPress:fe,style:[ct.actionBtn,!g&&ct.actionBtnDisabled],children:ee?Be(xs,{size:14,color:_e.color.accent}):Be(ks,{size:14,color:g?_e.color.textSecondary:_e.color.textTertiary})}):null,q?Be(Ht,{testID:"buoy-ask-buoy-settings",accessibilityRole:"button",accessibilityLabel:"Settings",onPress:q,style:ct.actionBtn,children:Be(Ts,{size:14,color:_e.color.textSecondary})}):null,Be(Ht,{testID:"buoy-ask-buoy-reset",accessibilityRole:"button",accessibilityLabel:"New conversation",disabled:!g,onPress:C,style:[ct.actionBtn,!g&&ct.actionBtnDisabled],children:Be(Ss,{size:14,color:g?_e.color.textSecondary:_e.color.textTertiary})})]})]})}var ct=x.create({otto:{marginRight:8,justifyContent:"center"},actionBtn:{width:32,height:32,borderRadius:8,backgroundColor:_e.color.buttonSurface,borderWidth:1,borderColor:_e.color.border,alignItems:"center",justifyContent:"center"},actionBtnDisabled:{opacity:.55}});import{AlertTriangle as Bs,night as ce,ToggleRow as ko}from"@buoy-gg/shared-ui/web";import{useSyncExternalStore as Hs}from"react";import{definePersistedSetting as Ls,devToolsStorageKeys as Ws}from"@buoy-gg/shared-ui/web";var wo={showThinking:false,bypassApprovals:false,readOnly:false},vo=Ls(`${Ws.base}_ask_buoy_settings`,wo,{sanitize:e=>({showThinking:e.showThinking===true,bypassApprovals:e.bypassApprovals===true,readOnly:e.readOnly===true})}),mt=wo,So=false,To=new Set;function _r(){for(let e of To)try{e()}catch{}}var xt={get:()=>mt,subscribe(e){return To.add(e),So||(So=true,vo.load().then(t=>{mt=t,_r()})),()=>To.delete(e)},set(e,t){mt[e]!==t&&(mt={...mt,[e]:t},_r(),vo.save(mt))},reset(){mt=wo,So=false,vo.clear()}};function It(){return Hs(xt.subscribe,xt.get,xt.get)}import{idFactory as Kr}from"@buoy-gg/agent-core/web";import{realNow as Nt}from"@buoy-gg/shared-ui/web";var to=Kr("m"),Qr=400;function Os(e){if(!(!e||Object.keys(e).length===0))try{let t=JSON.stringify(e);return t.length>Qr?`${t.slice(0,Qr)}\u2026`:t}catch{return}}var Ps=Kr("q"),L={messages:[],busy:false,stopping:false,pending:null,trusted:[],notice:null,configured:false,answers:{},awaitingBlockId:null,actionState:{},queued:[],draft:null,usage:{input:0,output:0,requests:0},meta:{}},Co=new Set,Jr=null,zo=null;function G(e){L={...L,...e};for(let t of Co)try{t()}catch{}}var b={getState:()=>L,subscribe(e){return Co.add(e),()=>Co.delete(e)},setLedger(e){Jr=e},getLedger(){return Jr},holdSession(e,t){zo={session:e,signature:t}},getHeldSession(){return zo},setNotice(e){G({notice:e})},setConfigured(e){e!==L.configured&&G({configured:e})},setMeta(e){Object.keys(e).every(t=>L.meta[t]===e[t])||G({meta:{...L.meta,...e}})},addUser(e){G({messages:[...L.messages,{id:to(),role:"user",text:e,toolCalls:[],blocks:[]}],busy:true})},beginTurn(){G({busy:true})},enqueue(e){let t={id:Ps(),text:e};return G({queued:[...L.queued,t]}),t},removeQueued(e){L.queued.some(t=>t.id===e)&&G({queued:L.queued.filter(t=>t.id!==e)})},shiftQueued(){let[e,...t]=L.queued;if(e)return G({queued:t}),e},takeQueuedToDraft(e){let t=L.queued.find(o=>o.id===e);t&&G({queued:L.queued.filter(o=>o.id!==e),draft:t.text})},requestStop(){!L.busy||L.stopping||G({stopping:true})},clearDraft(){L.draft!==null&&G({draft:null})},removeMessage(e){G({messages:L.messages.filter(t=>t.id!==e)})},recordAnswer(e){G({answers:{...L.answers,[e.blockId]:e},awaitingBlockId:L.awaitingBlockId===e.blockId?null:L.awaitingBlockId})},setActionState(e,t){let o={...L.actionState};t===null?delete o[e]:o[e]=t,G({actionState:o})},startAssistant(){let e=to();return G({messages:[...L.messages,{id:e,role:"assistant",text:"",toolCalls:[],blocks:[],streaming:true,startedAt:Nt()}]}),e},applyEvent(e,t){if(t.type==="history-trimmed"){let r=L.messages.findIndex(a=>a.id===e),n={id:to(),role:"assistant",system:true,text:`Older messages were trimmed from the agent's memory (${t.droppedRounds} exchange${t.droppedRounds===1?"":"s"}).`+(t.droppedPinned?` ${t.droppedPinned===1?"One of them made a change that is":`${t.droppedPinned} of them made changes that are`} still applied \u2014 the changes bar still lists ${t.droppedPinned===1?"it":"them"}, but the agent no longer remembers making ${t.droppedPinned===1?"it":"them"}.`:" It may not recall setup from earlier in this chat \u2014 the changes bar still lists what is applied."),toolCalls:[],blocks:[],endedAt:Nt()},i=[...L.messages];i.splice(r<0?i.length:r,0,n),G({messages:i});return}let o=L.messages.map(r=>{if(r.id!==e)return r;switch(t.type){case"retrying":{let n=Math.max(1,Math.round(t.inMs/1e3));return{...r,waiting:t.reason==="throttled"?`Endpoint busy \u2014 retrying in ${n}s (${t.attempt} of ${t.maxAttempts})`:"Request too large \u2014 trimming older messages and retrying"}}case"text":return{...r,waiting:void 0,text:(r.breakBeforeNextText||t.breakBefore)&&r.text?`${r.text.trimEnd()}
9
+
10
+ ${t.delta}`:r.text+t.delta,breakBeforeNextText:false};case"reasoning":return{...r,breakBeforeNextText:true,reasoning:[...r.reasoning??[],{text:t.text,afterCalls:r.toolCalls.length}]};case"tool-start":return{...r,waiting:void 0,toolCalls:[...r.toolCalls,{id:t.id,toolId:t.toolId,action:t.action,label:t.label,description:t.description,status:"running",params:Os(t.params),effect:t.effect,startedAt:Nt()}]};case"tool-end":return{...r,breakBeforeNextText:true,toolCalls:r.toolCalls.map(n=>n.id===t.id?{...n,status:!t.ok&&t.summary==="refused"?"refused":!t.ok&&t.summary==="declined"?"declined":!t.ok&&t.summary==="stopped"?"stopped":t.ok?"ok":"failed",summary:t.summary,durationMs:t.durationMs,result:t.result}:n)};case"tool-verified":return{...r,toolCalls:r.toolCalls.map(n=>n.id===t.id?{...n,verification:t.verification}:n)};case"block":return{...r,breakBeforeNextText:true,blocks:[...r.blocks,{block:t.block,forToolCallId:t.forToolCallId}]};case"usage":return{...r,usage:{input:(r.usage?.input??0)+t.input,output:(r.usage?.output??0)+t.output,requests:(r.usage?.requests??0)+1}};case"error":return{...r,waiting:void 0,error:t.message};default:return r}});G({messages:o,...t.type==="awaiting-user"?{awaitingBlockId:t.blockId}:{},...t.type==="usage"?{usage:{input:L.usage.input+t.input,output:L.usage.output+t.output,requests:L.usage.requests+1}}:{}})},markStopped(e){G({messages:L.messages.map(t=>t.id===e?{...t,stopped:true}:t)})},finishAssistant(e){G({messages:L.messages.map(t=>t.id===e?{...t,streaming:false,endedAt:Nt()}:t),busy:false,stopping:false})},askApproval(e){return new Promise(t=>{G({pending:{...e,resolve:t}})})},answerApproval(e){let t=L.pending,o=typeof e=="boolean"?e:e.approved,r=typeof e!="boolean"&&e.trust===true&&o,n=t?`${t.toolId}.${t.action}`:"";G({pending:null,...r&&t&&!L.trusted.some(i=>i.key===n)?{trusted:[...L.trusted,{key:n,label:t.label}]}:{}}),t?.resolve(e)},untrust(e){zo?.session.untrust(e),G({trusted:L.trusted.filter(t=>t.key!==e)})},restorePending(e){return L.pending||L.busy?false:(G({pending:{...e,restored:true,resolve:()=>{}}}),true)},addNote(e){G({messages:[...L.messages,{id:to(),role:"assistant",text:e,toolCalls:[],blocks:[],endedAt:Nt()}]})},hydrate(e){return L.messages.length>0||L.busy?false:(G({messages:e.messages.map(t=>({...t,restored:true})),answers:e.answers,usage:e.usage,queued:e.queued??[]}),true)},reset(){L.pending?.resolve(false),G({messages:[],busy:false,stopping:false,pending:null,trusted:[],notice:null,answers:{},awaitingBlockId:null,actionState:{},queued:[],draft:null,usage:{input:0,output:0,requests:0}})}};function Gr(e){return e.pending?"awaitingApproval":e.busy?e.stopping?"stopping":"running":e.awaitingBlockId?"awaitingAnswer":"idle"}function Yr(e){let t=Gr(e);if(t==="running"||t==="stopping")return null;if(t==="awaitingApproval")return"Paused \u2014 answer the approval above first.";if(t==="awaitingAnswer")return"Paused \u2014 answer the question above first.";let o=e.messages[e.messages.length-1];return o?.role==="assistant"&&o.error?"Paused \u2014 the last turn failed.":o?.role==="assistant"&&o.stopped?"Paused \u2014 you stopped the last turn.":null}import{getUseIsPro as Vs,hasAccountAccess as jt,subscribeAccountAccess as Es}from"@buoy-gg/shared-ui/web";import{useCallback as Ie,useEffect as dt,useMemo as Ns,useRef as kt,useState as js,useSyncExternalStore as Ms}from"react";import{dispatchToolAction as Xr,listSnapshotToolIds as qs,listToolActions as Fs,readToolSnapshot as Us,waitForToolRegistry as Zr}from"@buoy-gg/shared-ui/web";import{answerToText as en,CATALOG as Io,createAskBuoySession as _s,readTargetDigest as Ks,runGatedAction as tn,SNAPSHOT_ACTION as on}from"@buoy-gg/agent-core/web";import{persistentStorage as Do,devToolsStorageKeys as Qs}from"@buoy-gg/shared-ui/web";import{dispatchToolAction as rn}from"@buoy-gg/shared-ui/web";var Js=[{re:/\bBearer\s+[A-Za-z0-9._~+/-]{12,}=*/gi,label:"[bearer token removed]"},{re:/\beyJ[A-Za-z0-9._-]{20,}/g,label:"[jwt removed]"},{re:/\bsk-[A-Za-z0-9_-]{16,}/g,label:"[api key removed]"},{re:/\bBUOY-[A-Z0-9-]{8,}/g,label:"[license key removed]"},{re:/("|')?(authorization|x-api-key|api[_-]?key|password|secret|access_token|refresh_token)\1?\s*[:=]\s*("|')?[^\s"',}]{6,}/gi,label:"[credential removed]"}];function Mt(e){if(!e)return e;let t=e;for(let{re:o,label:r}of Js)t=t.replace(o,r);return t}var Ro=`${Qs.base}_ask_buoy_transcript`,$o=1,nn=60,Gs=256e3,Ys="[not kept across a restart \u2014 read it again if you need it]";function rt(e){return e&&Mt(e)}function Xs(e){let t=e.streaming===true;return{...e,text:rt(e.text),streaming:false,reasoning:e.reasoning?.map(o=>({...o,text:rt(o.text)})),toolCalls:e.toolCalls.map(o=>{let r=o.params?rt(o.params):void 0,{result:n,...i}=o;return o.status==="running"?{...i,params:r,status:"failed",summary:"Interrupted"}:{...i,params:r}}),error:e.error??(t&&!e.text?"This answer was interrupted \u2014 the app restarted mid-turn.":void 0)}}function Zs(e){return e.map(t=>t.role==="tool-results"?{...t,results:t.results.map(o=>({...o,content:Ys}))}:t.role==="assistant"?{...t,text:rt(t.text)}:{...t,text:rt(t.text)})}function ec(e){let t={...e,messages:e.messages.slice(-nn),history:e.history.slice(-nn*2)},o=JSON.stringify(t);for(;o.length>Gs&&t.messages.length>1;)t={...t,messages:t.messages.slice(1),history:t.history.slice(Math.min(2,t.history.length))},o=JSON.stringify(t);return t}function tc(e){if(!e)return null;let t=e.params;if(!t)return null;let o;try{o=JSON.stringify(t)}catch{return null}return Mt(o)!==o?null:{id:e.id,toolId:e.toolId,action:e.action,label:rt(e.label),description:e.description?rt(e.description):void 0,reason:rt(e.reason),params:t,targetDigest:e.targetDigest}}function oc(e){if(typeof e!="object"||e===null)return false;let t=e;return typeof t.id=="string"&&typeof t.toolId=="string"&&typeof t.action=="string"&&typeof t.label=="string"&&typeof t.reason=="string"&&typeof t.params=="object"&&t.params!==null}function rc(e){if(!e?.length)return;let t=e.filter(o=>{try{let r=JSON.stringify(o);return Mt(r)===r}catch{return false}});return t.length?t:void 0}function nc(e){return ec({v:$o,savedAt:Date.now(),messages:e.messages.map(Xs),history:Zs(e.history),answers:e.answers,usage:e.usage,pending:tc(e.pending),ledger:rc(e.ledger),queued:e.queued?.length?e.queued.map(t=>({id:t.id,text:rt(t.text)})):void 0})}function ic(e){if(!e)return null;try{let t=JSON.parse(e);return t?.v!==$o||!Array.isArray(t.messages)||t.messages.length===0?null:{v:$o,savedAt:typeof t.savedAt=="number"?t.savedAt:0,messages:t.messages,history:Array.isArray(t.history)?t.history:[],answers:t.answers??{},usage:t.usage??{input:0,output:0,requests:0},pending:oc(t.pending)?t.pending:null,ledger:Array.isArray(t.ledger)?t.ledger.filter(o=>typeof o=="object"&&o!==null&&typeof o.id=="string"):void 0,queued:Array.isArray(t.queued)?t.queued.filter(o=>typeof o=="object"&&o!==null&&typeof o.id=="string"&&typeof o.text=="string"):void 0}}catch{return null}}async function lc(){try{return ic(await Do.getItem(Ro))}catch{return null}}async function ac(e){try{await Do.setItem(Ro,JSON.stringify(e))}catch{}}async function sc(){try{await Do.removeItem(Ro)}catch{}}function Ao(){b.getHeldSession()?.session.reset(),b.reset(),sc()}async function ln(e){if(b.getState().busy)return{cleared:false,reverted:0,failed:[{label:"A turn is running",error:"Stop it first."}]};let t=b.getLedger();if(e.undoFirst&&t){let o=await t.revertAll(e.dispatch);return o.failed.length>0?{cleared:false,reverted:o.reverted,failed:o.failed}:(Ao(),{cleared:true,reverted:o.reverted,failed:[]})}return Ao(),{cleared:true,reverted:0,failed:[]}}var qt=typeof Qt<"u"&&!Qt;function cc(e){for(let t of b.getState().messages)if(t.restored)for(let o of t.blocks){let r=o.block;if(r?.id!==e)continue;let n=r.question??r.label??r.title;return typeof n=="string"&&n.trim()?n.trim():void 0}}function an(){try{let e=Fs();for(let t of qs())e[t]||(e[t]=[]),e[t].includes(on)||(e[t]=[on,...e[t]]);return e}catch{return{}}}var dc=600;function Bo(){return Ms(b.subscribe,b.getState,b.getState)}function sn(e){let t=Bo(),o=Vs()(),r=kt(o);r.current=o;let n=Ie((...S)=>!jt()||!r.current?Promise.reject(new Error("Ask Buoy requires Pro access.")):Xr(...S),[]),i=kt(null),a=kt(false),h=kt(null),u=kt(e);u.current=e;let g=!!e?.endpoint&&!!e?.model,y=e?.persistTranscript!==false,{bypassApprovals:C,readOnly:j}=It(),q=kt(C);q.current=C;let X=kt(j);X.current=j;let ee=Ie(()=>X.current?{...e?.policy??{},readOnly:true}:e?.policy??{},[e]),[fe,Ke]=js(0);dt(()=>{let S=false;return Zr().then(()=>{S||Ke(E=>E+1)}),()=>{S=true}},[]);let Re=Ns(()=>an(),[fe]),Qe=Object.keys(Re).sort().join(",");dt(()=>{if(b.setConfigured(g),b.setMeta({model:e?.model,protocol:e?.protocol??(e?"anthropic":void 0),appName:e?.appName,platform:Bt.OS,build:qt?"release":"development"}),!g||!e){i.current=null,b.setNotice("Ask Buoy isn't set up in this app yet. A developer needs to point it at your team's AI endpoint.");return}let S=e.protocol??"anthropic";qt&&e.apiKey?b.setNotice("This build carries a plaintext apiKey \u2014 that's dev-only and it ships to every install. Use the headers callback with your own gateway for distributed builds."):S==="anthropic"&&/^https?:\/\/api\.openai\.com\//i.test(e.endpoint)?b.setNotice('This endpoint is api.openai.com but the protocol is "anthropic". Set protocol: "openai" in the askBuoy config.'):S==="openai"&&/^https?:\/\/api\.anthropic\.com\//i.test(e.endpoint)?b.setNotice('This endpoint is api.anthropic.com but the protocol is "openai". Remove protocol or set it to "anthropic".'):b.setNotice(null);let E=[e.endpoint,e.protocol??"anthropic",e.model].join("|"),U=b.getHeldSession();if(U&&U.signature===E){i.current=U.session,U.session.setAvailableActions(Re),U.session.setApprovalBypass(q.current),U.session.setReadOnly(X.current),b.setLedger(U.session.ledger);return}let re=_s({endpoint:e.endpoint,protocol:e.protocol??"anthropic",model:e.model,headers:e.headers,apiKey:e.apiKey,maxTokens:e.maxTokens,anthropicVersion:e.anthropicVersion,requestOverrides:e.requestOverrides,catalog:e.tools?.length?[...Io,...e.tools]:void 0,dispatch:n,readSnapshot:Us,availableActions:Re,policy:e.policy,context:e.context,isRelease:qt,appName:e.appName,platform:Bt.OS,requestApproval:te=>b.askApproval(te)});i.current=re,re.setApprovalBypass(q.current),re.setReadOnly(X.current),b.holdSession(re,E),b.setLedger(re.ledger);let xe=false;return Zr().then(te=>{te&&!xe&&re.prime()}),y&&!a.current&&(a.current=true,lc().then(te=>{!te||!b.hydrate({messages:te.messages,answers:te.answers,usage:te.usage,queued:te.queued})||(i.current?.restore(te.history),te.ledger?.length&&i.current?.ledger.restore(te.ledger),te.pending&&b.restorePending(te.pending))})),()=>{xe=true}},[g,e,Re,Qe,y]),dt(()=>{i.current?.setApprovalBypass(C)},[C]),dt(()=>{i.current?.setReadOnly(j)},[j]);let Je=t.messages,ut=t.answers,pt=t.usage,wt=t.busy,Me=t.pending,it=t.queued;dt(()=>{if(!y||Je.length===0)return;let S=()=>{ac(nc({messages:Je,history:i.current?.messages??[],answers:ut,usage:pt,pending:Me,ledger:b.getLedger()?.list(),queued:it}))};if(!wt){S();return}let E=setTimeout(S,dc);return()=>clearTimeout(E)},[y,wt,Je,ut,pt,Me,it]);let lt=Ie(S=>{if(!jt()||!r.current)return;let E=i.current;if(!E)return;b.beginTurn();let U=b.startAssistant(),re=new AbortController;h.current=re,E.setAvailableActions(an());let xe=u.current?.onEvent;(async()=>{try{for await(let te of E.send(S,re.signal))if(b.applyEvent(U,te),xe)try{xe(te)}catch{}}catch(te){re.signal.aborted||b.applyEvent(U,{type:"error",message:te instanceof Error?te.message:"Something went wrong talking to your AI endpoint."})}finally{re.signal.aborted&&b.markStopped(U),b.finishAssistant(U),h.current=null}})()},[]),Ge=Ie(S=>{if(!jt()||!r.current)return;let E=S.trim();if(!i.current||!E)return;if(b.getState().busy){b.enqueue(E);return}let U=b.getState().awaitingBlockId;U&&b.recordAnswer({blockId:U,kind:"skipped"}),b.addUser(E),lt(E)},[lt]),ht=Ie(()=>{let{messages:S,busy:E}=b.getState();if(E||!i.current)return;let U=[...S].reverse().find(re=>re.role==="user");U&&lt(U.text)},[lt]),Ye=Ie(()=>{b.requestStop(),b.getState().pending&&b.answerApproval(false),h.current?.abort(),h.current=null},[]);dt(()=>{let S=Es(()=>{jt()||Ye()});return()=>{S(),Ye()}},[Ye]),dt(()=>{o||Ye()},[o,Ye]),dt(()=>{if(t.queued.length===0||Gr(t)!=="idle"||Yr(t)!==null)return;let S=b.shiftQueued();S&&Ge(S.text)},[t,Ge]);let Ce=Ie(S=>b.takeQueuedToDraft(S),[]),vt=Ie(S=>b.removeQueued(S),[]),Ut=Ie(()=>{h.current?.abort(),h.current=null,Ao()},[]),io=Ie(()=>ln({dispatch:Xr,undoFirst:true}),[]),_t=Ie(async S=>{let E=b.getLedger();if(!E){b.setNotice(`${S.label} couldn't run \u2014 no active Ask Buoy session.`);return}let U=e?.tools?.length?[...Io,...e.tools]:void 0;if(S.targetDigest){let xe=await Ks({toolId:S.toolId,action:S.action,params:S.params??{},dispatch:n,catalog:U});if(xe!==void 0&&xe!==S.targetDigest){b.addNote(`\u201C${S.label}\u201D wasn't applied \u2014 what it would change has moved on since the app restarted. Nothing was written. Ask again if you still want it.`);return}}let re=await tn({toolId:S.toolId,action:S.action,params:S.params??{},dispatch:n,ledger:E,policy:ee(),isRelease:qt,catalog:U});re.ok?b.addNote(`Applied \u201C${S.label}\u201D, which was still waiting when the app restarted. Whatever else that answer was going to do is gone \u2014 ask again if there was more to it.`):b.setNotice(`${S.label} failed \u2014 ${re.error}`)},[e,ee]),lo=Ie(S=>{let E=b.getState().pending,U=typeof S=="boolean"?S:S.approved;if(b.answerApproval(S),!!E?.restored){if(!U){b.addNote(`Skipped \u201C${E.label}\u201D. Nothing was changed.`);return}_t(E)}},[_t]),ao=Ie(S=>{b.recordAnswer(S);let E=cc(S.blockId);Ge(E?`${E} \u2014 ${en(S)}`:en(S))},[Ge]),so=Ie(async(S,E)=>{if(!jt()||!r.current){b.setNotice("Ask Buoy requires Pro access.");return}if(S.send){Ge(S.send);return}if(!S.dispatch)return;let U=`${E}:${S.label}`,re=b.getLedger();if(!re){b.setNotice(`${S.label} failed \u2014 no active Ask Buoy session.`);return}b.setActionState(U,"running");let xe=await tn({toolId:S.dispatch.toolId,action:S.dispatch.action,params:S.dispatch.params??{},dispatch:n,ledger:re,policy:ee(),isRelease:qt,catalog:e?.tools?.length?[...Io,...e.tools]:void 0});xe.ok?b.setActionState(U,"done"):(b.setActionState(U,"failed"),b.setNotice(`${S.label} failed \u2014 ${xe.error}`))},[Ge,e,ee]);return{state:t,send:Ge,stop:Ye,reset:Ut,undoThenReset:io,approve:lo,retry:ht,answer:ao,runAction:so,editQueued:Ce,removeQueued:vt,configured:g,toolCount:Object.keys(Re).length,availableToolIds:Object.keys(Re)}}import{jsx as De,jsxs as oo}from"react/jsx-runtime";function cn(){let e=It(),t=Bo().trusted;return oo(Fe,{style:ve.scroll,contentContainerStyle:ve.content,testID:"buoy-ask-buoy-settings",children:[De(l,{style:ve.section,children:"CHAT"}),De(ko,{testID:"buoy-ask-buoy-setting-thinking",label:"Show agent thinking",description:"Adds a collapsed strip under each answer: the model's reasoning, and every step it ran with its parameters, result, duration and token cost. Copy includes the steps and reasoning while this is on, so you can read the run outside the app.",value:e.showThinking,onValueChange:o=>xt.set("showThinking",o)}),De(l,{style:ve.note,children:"Not every model reports reasoning. Claude thinks by default; most OpenAI models return none, and the strip then shows the steps alone."}),De(l,{style:ve.section,children:"PERMISSIONS"}),De(ko,{testID:"buoy-ask-buoy-setting-readonly",label:"Read only",description:"Inspect the app, change nothing. Every write and simulation is refused until this is off. Undo still works \u2014 putting things back is the safe direction.",value:e.readOnly,onValueChange:o=>xt.set("readOnly",o)}),e.readOnly?De(l,{style:ve.note,testID:"buoy-ask-buoy-readonly-note",children:"On across reloads until you turn it off here. The header says \u201CRead only\u201D while it is on. It adds to whatever this app already restricts \u2014 it never loosens anything."}):null,De(ko,{testID:"buoy-ask-buoy-setting-bypass",tone:"warning",emphasizeLabel:e.bypassApprovals,disabled:e.readOnly,label:"Skip approval prompts",description:e.readOnly?"Unavailable while Read only is on \u2014 nothing can be approved.":"Runs every action the moment the agent calls it, with no Allow card \u2014 including the destructive ones that wipe or reset data.",value:e.bypassApprovals,onValueChange:o=>xt.set("bypassApprovals",o)}),e.bypassApprovals&&!e.readOnly?oo(s,{style:ve.warning,testID:"buoy-ask-buoy-bypass-warning",children:[De(Bs,{size:14,color:ce.color.warning}),De(l,{style:ve.warningText,children:"Nothing will ask before a change lands. A wipe or a reset runs on the model's word alone, and Undo only reverses the changes that can be reversed \u2014 the bar tells you which. This stays on across reloads and app restarts until you turn it off here, so leave it off on any device holding data you care about. It does not widen what the agent may reach: read-only mode, this app's deny list and the release-build refusals still apply."})]}):De(l,{style:ve.note,children:"On by default for destructive actions only \u2014 reads and ordinary writes already run without asking, and the changes bar records them."}),t.length>0?oo(s,{style:ve.trustedBox,testID:"buoy-ask-buoy-trusted",children:[De(l,{style:ve.section,children:"ALLOWED WITHOUT ASKING \u2014 THIS CHAT"}),t.map(o=>oo(s,{style:ve.trustedRow,children:[De(l,{style:ve.trustedLabel,numberOfLines:2,children:o.label}),De(f,{testID:`buoy-ask-buoy-untrust-${o.key}`,accessibilityRole:"button",onPress:()=>b.untrust(o.key),style:({pressed:r})=>[ve.forget,r&&{opacity:.7}],hitSlop:6,children:De(l,{style:ve.forgetText,children:"Ask again"})})]},o.key))]}):null]})}var ve=x.create({scroll:{flex:1},content:{padding:ce.gutter,gap:10,paddingBottom:32},section:{color:ce.color.textTertiary,fontSize:10,fontWeight:"700",letterSpacing:.6,paddingHorizontal:4,paddingTop:4},warning:{flexDirection:"row",gap:8,padding:ce.cardPad,borderRadius:ce.radius.card,borderWidth:x.hairlineWidth,borderColor:ce.color.warning,backgroundColor:ce.color.surface},warningText:{flex:1,color:ce.color.warning,fontSize:ce.font.micro,lineHeight:16},trustedBox:{gap:6,paddingTop:6},trustedRow:{flexDirection:"row",alignItems:"center",gap:10,padding:ce.cardPad,borderRadius:ce.radius.card,borderWidth:x.hairlineWidth,borderColor:ce.color.border,backgroundColor:ce.color.surface},trustedLabel:{flex:1,color:ce.color.text,fontSize:ce.font.caption,lineHeight:18},forget:{paddingHorizontal:10,paddingVertical:6,borderRadius:ce.radius.row,backgroundColor:ce.color.button},forgetText:{color:ce.color.text,fontSize:ce.font.micro,fontWeight:"600"},note:{color:ce.color.textTertiary,fontSize:ce.font.micro,lineHeight:16,paddingHorizontal:4}});import{ChevronRight as uc,night as me,NightSectionLabel as pc}from"@buoy-gg/shared-ui/web";var hc=[{text:"Why is this screen empty?"},{text:"What did the last few network calls return?",needs:"network"},{text:"Show me what's saved for this user",needs:"storage"},{text:"Make the next request to this screen fail with a 500",needs:"network",write:true,devOnly:true},{text:"Who am I signed in as right now?"},{text:"Did anything crash or log an error recently?",needs:"console"}],gc=4;function bc(e){let t=e.availableToolIds.length>0;return hc.filter(o=>o.write&&e.readOnly||o.devOnly&&e.isRelease?false:o.needs?t&&e.availableToolIds.includes(o.needs):true).slice(0,gc).map(o=>o.text)}import{jsx as je,jsxs as Ft}from"react/jsx-runtime";var dn=typeof Qt<"u"&&!Qt;function fc({configured:e,onPick:t,availableToolIds:o=[],readOnly:r=false}){let n=bc({availableToolIds:o,readOnly:r,isRelease:dn});return e?Ft(s,{style:Se.wrap,testID:"buoy-ask-buoy-empty",children:[je(l,{style:Se.title,children:"Ask about this app"}),je(l,{style:Se.body,children:"Ask what the app is doing right now, or tell it to change something. Anything it changes shows up in a bar at the top, with what can be undone."}),je(l,{style:Se.buildLine,testID:"buoy-ask-buoy-build-line",children:dn?"Release build \u2014 reading, impersonation and navigation work; simulations (forcing server responses, driving the screen) need a dev build.":"Dev build \u2014 full simulation available."}),Ft(s,{style:Se.group,children:[je(pc,{children:"Try asking"}),je(s,{style:Se.card,children:n.map((i,a)=>je(yc,{text:i,onPick:t,last:a===n.length-1},i))})]})]}):Ft(s,{style:Se.wrap,testID:"buoy-ask-buoy-unconfigured",children:[je(l,{style:Se.title,children:"Not set up yet"}),Ft(l,{style:Se.body,children:["Ask Buoy talks to your own company's AI endpoint \u2014 nothing goes to Buoy. A developer needs to add the ",je(l,{style:Se.code,children:"askBuoy"})," prop to"," ",je(l,{style:Se.code,children:"<FloatingDevTools />"})," with your team's endpoint and model."]})]})}function yc({text:e,onPick:t,last:o}){return Ft(f,{testID:`buoy-ask-buoy-suggestion-${e.slice(0,12)}`,accessibilityRole:"button",onPress:()=>t(e),style:({pressed:r})=>[Se.row,!o&&Se.rowDivider,r&&Se.pressed],children:[je(l,{style:Se.rowText,children:e}),je(uc,{size:14,color:me.color.textTertiary})]})}var Se=x.create({wrap:{flex:1,justifyContent:"center",paddingHorizontal:me.gutter,paddingVertical:24,gap:8},title:{color:me.color.text,fontSize:22,fontWeight:"700",letterSpacing:-.3},body:{color:me.color.textSecondary,fontSize:me.font.body,lineHeight:20},code:{color:me.color.text,fontFamily:"Menlo"},buildLine:{marginTop:8,color:me.color.textTertiary,fontSize:me.font.micro,lineHeight:15},group:{marginTop:me.groupGap-8},card:{borderRadius:me.radius.card,borderWidth:x.hairlineWidth,borderColor:me.color.border,backgroundColor:me.color.surface,overflow:"hidden"},row:{flexDirection:"row",alignItems:"center",gap:10,paddingHorizontal:me.rowPadH,paddingVertical:13},rowDivider:{borderBottomWidth:x.hairlineWidth,borderBottomColor:me.color.separator},rowText:{flex:1,color:me.color.text,fontSize:me.font.body,lineHeight:19},pressed:{backgroundColor:me.color.fill}});import{memo as mc,useCallback as Dt,useEffect as xc,useRef as Ho,useState as un}from"react";import{AlertTriangle as pn,Check as hn,ChevronDown as gn,ChevronRight as bn,Copy as kc,night as k,X as wc}from"@buoy-gg/shared-ui/web";import{toolTitle as vc}from"@buoy-gg/agent-core/web";import{isAskBlock as Sc}from"@buoy-gg/agent-core/web";function Tc({block:e,forToolCallId:t}){if(!t)return false;let o="source"in e?e.source:void 0;return o==="live"||o==="mocked"}function Cc(e,t){let o=new Set(t),r=new Map,n=[],i=[];for(let a of e){if(Sc(a.block)){i.push(a);continue}if(Tc(a)&&o.has(a.forToolCallId)){let h=r.get(a.forToolCallId)??[];h.push(a.block),r.set(a.forToolCallId,h)}else n.push(a)}return{nested:r,afterText:n,ask:i}}import{useState as fn}from"react";import{Activity as zc,ChevronDown as Ic,ChevronRight as Dc,night as Y}from"@buoy-gg/shared-ui/web";function Lo(e){let t=[...e.reasoning??[]].sort((i,a)=>i.afterCalls-a.afterCalls),o=[],r=0,n=i=>{for(;r<t.length&&t[r].afterCalls<=i;)o.push({kind:"thought",text:t[r].text}),r+=1};return e.toolCalls.forEach((i,a)=>{n(a),o.push({kind:"step",n:a+1,call:i})}),n(e.toolCalls.length),o}function yn(e){return(e.reasoning?.length??0)>0||e.toolCalls.length>0}var Rc=e=>e.status==="ok"?e.summary||"done":e.status==="running"?"running":`${e.status}${e.summary?` \u2014 ${e.summary}`:""}`;function mn(e,t=" "){let o=[];for(let r of Lo(e))if(r.kind==="thought"){o.push(`${t}[thinking]`);for(let n of r.text.trim().split(`
11
+ `))o.push(`${t} ${n}`)}else{let{n,call:i}=r;o.push(`${t}[${n}] ${i.toolId}.${i.action} \u2014 ${Rc(i)}`),i.params&&o.push(`${t} ${i.params}`)}return o}import{Fragment as $c,jsx as He,jsxs as nt}from"react/jsx-runtime";function Ac({n:e,call:t}){let[o,r]=fn(false),n=t.status==="failed"||t.status==="refused";return nt(f,{onPress:()=>r(i=>!i),accessibilityRole:"button",accessibilityState:{expanded:o},style:pe.step,children:[nt(s,{style:pe.stepLine,children:[He(l,{style:pe.stepN,children:e}),nt(l,{style:[pe.stepName,n&&pe.stepFailed],numberOfLines:1,children:[t.toolId,".",t.action]}),t.durationMs!==void 0?nt(l,{style:pe.stepMs,children:[t.durationMs,"ms"]}):null,He(l,{style:[pe.stepStatus,n&&pe.stepFailed],numberOfLines:1,children:t.status==="ok"?t.summary||"done":t.status})]}),o?nt(s,{style:pe.detail,children:[He(l,{style:pe.detailLabel,children:"SENT"}),He(l,{style:pe.code,selectable:true,children:t.params??"no parameters"}),t.result?nt($c,{children:[He(l,{style:pe.detailLabel,children:"RETURNED"}),He(l,{style:pe.code,selectable:true,children:t.result})]}):null]}):null]})}function xn({message:e}){let[t,o]=fn(false);if(!yn(e))return null;let r=Lo(e),n=r.filter(u=>u.kind==="step").length,i=r.length-n,a=e.startedAt!==void 0&&e.endedAt!==void 0?`${((e.endedAt-e.startedAt)/1e3).toFixed(1)}s`:null,h=[n?`${n} step${n===1?"":"s"}`:null,i?`${i} thought${i===1?"":"s"}`:null,a,e.usage?`${e.usage.input+e.usage.output} tokens`:null].filter(Boolean).join(" \xB7 ");return nt(s,{style:pe.wrap,testID:"buoy-ask-buoy-thinking",children:[nt(f,{testID:"buoy-ask-buoy-thinking-toggle",onPress:()=>o(u=>!u),accessibilityRole:"button",accessibilityLabel:t?"Hide agent thinking":"Show agent thinking",accessibilityState:{expanded:t},style:pe.head,children:[He(zc,{size:12,color:Y.color.textTertiary}),He(l,{style:pe.headText,children:h}),t?He(Ic,{size:12,color:Y.color.textTertiary}):He(Dc,{size:12,color:Y.color.textTertiary})]}),t?nt(s,{style:pe.body,children:[r.map((u,g)=>u.kind==="thought"?He(l,{style:pe.thought,selectable:true,children:u.text.trim()},`t${g}`):He(Ac,{n:u.n,call:u.call},u.call.id)),i===0?He(l,{style:pe.none,children:"This model reports no reasoning \u2014 the steps above are the whole trace."}):null]}):null]})}var pe=x.create({wrap:{marginTop:8,borderRadius:Y.radius.badge,borderWidth:x.hairlineWidth,borderColor:Y.color.separator,backgroundColor:Y.color.fill,overflow:"hidden"},head:{flexDirection:"row",alignItems:"center",gap:6,paddingHorizontal:10,paddingVertical:7},headText:{flex:1,color:Y.color.textTertiary,fontSize:Y.font.micro,fontWeight:"600"},body:{borderTopWidth:x.hairlineWidth,borderTopColor:Y.color.separator},thought:{color:Y.color.textSecondary,fontSize:Y.font.micro,lineHeight:17,fontStyle:"italic",paddingHorizontal:10,paddingVertical:8},step:{paddingHorizontal:10,paddingVertical:7},stepLine:{flexDirection:"row",alignItems:"center",gap:8},stepN:{color:Y.color.textTertiary,fontSize:Y.font.micro,width:14},stepName:{flex:1,color:Y.color.textSecondary,fontSize:Y.font.micro,fontWeight:"600"},stepMs:{color:Y.color.textTertiary,fontSize:Y.font.micro},stepStatus:{color:Y.color.textTertiary,fontSize:Y.font.micro,maxWidth:110},stepFailed:{color:Y.color.danger},detail:{marginTop:6,marginLeft:22,gap:3},detailLabel:{color:Y.color.textTertiary,fontSize:9,fontWeight:"700",letterSpacing:.5},code:{color:Y.color.textSecondary,fontSize:Y.font.micro,lineHeight:16,marginBottom:3},none:{color:Y.color.textTertiary,fontSize:Y.font.micro,fontStyle:"italic",paddingHorizontal:10,paddingVertical:8}});import{useEffect as Bc,useRef as Hc}from"react";import{night as Lc}from"@buoy-gg/shared-ui/web";import{jsx as kn}from"react/jsx-runtime";function Wc(){let e=Hc([0,1,2].map(()=>new se.Value(.25))).current;return Bc(()=>{let t=e.map((o,r)=>se.loop(se.sequence([se.delay(r*140),se.timing(o,{toValue:1,duration:320,easing:Tt.inOut(Tt.ease),useNativeDriver:true}),se.timing(o,{toValue:.25,duration:320,easing:Tt.inOut(Tt.ease),useNativeDriver:true}),se.delay((2-r)*140)])));return t.forEach(o=>o.start()),()=>t.forEach(o=>o.stop())},[e]),kn(s,{style:wn.wrap,testID:"buoy-ask-buoy-typing",accessibilityLabel:"Thinking",children:e.map((t,o)=>kn(se.View,{style:[wn.dot,{opacity:t}]},o))})}var wn=x.create({wrap:{flexDirection:"row",alignItems:"center",gap:5,paddingVertical:8,paddingHorizontal:2},dot:{width:7,height:7,borderRadius:4,backgroundColor:Lc.color.textSecondary}});import{jsx as w,jsxs as Te}from"react/jsx-runtime";function vn({status:e}){switch(e){case"running":return w(Lt,{size:"small",color:k.color.textSecondary});case"ok":return w(s,{style:[m.mark,m.markOk],children:w(hn,{size:10,color:k.color.onAccent})});case"failed":return w(s,{style:[m.mark,m.markFailed],children:w(wc,{size:10,color:k.color.text})});case"refused":return w(s,{style:[m.mark,m.markRefused],children:w(pn,{size:10,color:k.color.onAccent})});case"declined":case"stopped":return w(s,{style:[m.mark,m.markNotRun],children:w(s,{style:m.markNotRunBar})})}}function Oc(e){return e.status==="running"?{text:"",tone:"muted"}:e.status==="refused"?{text:"Refused",tone:"warning"}:e.status==="failed"?{text:"Failed",tone:"danger"}:e.status==="declined"?{text:"You declined",tone:"muted"}:e.status==="stopped"?{text:"Not run \u2014 stopped",tone:"muted"}:e.verification?.status==="verified"?{text:"Verified",tone:"ok"}:e.verification?.status==="unverified"?{text:"Done \xB7 not yet visible",tone:"muted"}:e.verification?.status==="failed"?{text:"Done \xB7 check failed",tone:"warning"}:{text:e.summary||"Done",tone:"muted"}}var Pc=e=>e.status==="failed"||e.status==="refused"||e.status==="declined"||e.status==="stopped";function Sn({call:e,receipts:t,last:o}){let[r,n]=un(false),i=Oc(e),a=r?gn:bn,h=e.status==="failed"&&e.summary&&e.summary!=="Failed"?e.summary:null;return Te(s,{style:[m.row,!o&&m.rowDivider],children:[Te(f,{testID:`buoy-ask-buoy-tool-${e.toolId}`,accessibilityRole:"button",accessibilityLabel:`${e.label}, ${i.text||"running"}`,accessibilityState:{expanded:r},onPress:()=>n(u=>!u),children:[Te(s,{style:m.rowLine,children:[w(s,{style:m.markSlot,children:w(vn,{status:e.status})}),w(l,{style:m.rowTitle,children:e.label}),i.text?w(l,{style:[m.rowStatus,i.tone==="danger"&&m.rowStatusDanger,i.tone==="warning"&&m.rowStatusWarning,i.tone==="ok"&&m.rowStatusOk],numberOfLines:1,children:i.text}):null,w(a,{size:12,color:k.color.textTertiary})]}),r&&Te(s,{style:m.rowDetail,children:[w(l,{style:m.rowTool,children:vc(e.toolId).toUpperCase()}),e.description?w(l,{style:m.rowDescription,children:e.description}):null,h?w(l,{style:m.rowFailure,children:h}):null,e.verification?w(l,{style:[m.rowDescription,e.verification.status==="failed"&&m.rowFailure,e.verification.status==="verified"&&m.rowVerified],testID:`buoy-ask-buoy-verification-${e.verification.status}`,children:e.verification.detail}):null]})]}),r&&t.length>0&&w(s,{style:m.rowReceipts,testID:`buoy-ask-buoy-tool-receipt-${e.toolId}`,children:t.map(u=>w(Zt,{block:u},u.id))})]})}function Vc({label:e,count:t,calls:o,receipts:r,last:n}){let[i,a]=un(false),h=i?gn:bn;return Te(s,{style:!n&&!i&&m.rowDivider,children:[w(f,{testID:"buoy-ask-buoy-reads-group",accessibilityRole:"button",accessibilityLabel:`${e}, ${t} reads`,accessibilityState:{expanded:i},onPress:()=>a(u=>!u),style:[m.row,i&&m.rowDivider],children:Te(s,{style:m.rowLine,children:[w(s,{style:m.markSlot,children:w(vn,{status:"ok"})}),w(l,{style:m.rowTitle,children:e}),Te(l,{style:m.rowStatus,numberOfLines:1,children:[t," reads"]}),w(h,{size:12,color:k.color.textTertiary})]})}),i&&w(s,{style:m.groupBody,children:o.map((u,g)=>w(Sn,{call:u,receipts:r.get(u.id)??[],last:n&&g===o.length-1},u.id))})]})}function Ec({calls:e,receipts:t}){let o=Is(e);return w(s,{style:m.card,testID:"buoy-ask-buoy-activity",children:o.map((r,n)=>r.kind==="reads"?w(Vc,{label:r.label,count:r.count,calls:r.calls,receipts:t,last:n===o.length-1},r.id):w(Sn,{call:r.call,receipts:t.get(r.call.id)??[],last:n===o.length-1},r.call.id))})}function Tn({blocks:e}){return e.length===0?null:w(s,{style:m.blocks,children:e.map(({block:t})=>w(Zt,{block:t},t.id))})}function Nc({message:e}){return w(s,{style:m.systemLine,testID:"buoy-ask-buoy-system-line",children:w(l,{style:m.systemText,children:e.text})})}function jc({message:e}){return w(s,{style:m.userWrap,children:w(s,{style:m.userBubble,children:w(l,{style:m.userText,selectable:true,children:e.text})})})}function Mc({message:e,onRetry:t,waitingOnUser:o}){let{showThinking:r}=It(),n=!!e.streaming&&!o,{nested:i,afterText:a,ask:h}=Cc(e.blocks,e.toolCalls.map(u=>u.id));return Te(s,{style:m.assistantWrap,children:[e.toolCalls.length>0&&w(Ec,{calls:e.toolCalls,receipts:i}),e.text.length>0&&w(ur,{text:e.text,style:m.assistantText}),w(Tn,{blocks:a}),w(Tn,{blocks:h}),r&&!e.streaming&&w(xn,{message:e}),n&&Te(s,{style:m.waitingRow,children:[w(Wc,{}),e.waiting?w(l,{style:m.waitingText,testID:"buoy-ask-buoy-waiting",children:e.waiting}):null]}),e.error&&w(Fc,{error:e.error,onRetry:t}),e.stopped&&!e.error&&w(qc,{onRetry:t,changed:e.toolCalls.some(u=>u.status==="ok"&&!!u.effect&&u.effect!=="read")})]})}function qc({onRetry:e,changed:t}){return Te(s,{style:m.stoppedBox,testID:"buoy-ask-buoy-stopped",children:[w(l,{style:m.stoppedText,children:t?"Stopped. Changes already made are listed above.":"Stopped."}),e&&w(f,{testID:"buoy-ask-buoy-retry",accessibilityRole:"button",accessibilityLabel:"Try again",onPress:e,style:({pressed:o})=>[m.retry,o&&m.retryPressed],children:w(l,{style:m.retryText,children:"Try again"})})]})}function Fc({error:e,onRetry:t}){let o=/fetch failed|network|ECONN|timed? ?out|socket/i.test(e)?"Couldn't reach your AI endpoint. Check the connection and try again.":"Something went wrong with that turn.";return Te(s,{style:m.errorBox,testID:"buoy-ask-buoy-error",children:[w(pn,{size:14,color:k.color.danger}),Te(s,{style:m.errorBody,children:[w(l,{style:m.errorText,children:o}),w(l,{style:m.errorDetail,selectable:true,children:e}),t&&w(f,{testID:"buoy-ask-buoy-retry",accessibilityRole:"button",accessibilityLabel:"Try again",onPress:t,style:({pressed:r})=>[m.retry,r&&m.retryPressed],children:w(l,{style:m.retryText,children:"Try again"})})]})]})}function Cn(e,t=false){let o=[];for(let r of e){if(r.role==="user"){o.push(`You: ${r.text}`);continue}if(r.system){o.push(` \u2014 ${r.text}`);continue}if(t)o.push(...mn(r));else for(let n of r.toolCalls){let i=Pc(n)?` (${n.status})`:"";o.push(` \xB7 ${n.label}${n.summary?` \u2014 ${n.summary}`:""}${i}`)}r.text&&o.push(`Ask Buoy: ${r.text}`);for(let n of Hl(r.blocks.map(i=>i.block)))o.push(n);r.error&&o.push(` ! ${r.error}`),r.stopped&&!r.error&&o.push(" ! Stopped by the user.")}return o.join(`
12
+ `)}function Uc({testID:e,label:t,getText:o}){let{copied:r,copy:n}=fo(o);return Te(f,{testID:e,accessibilityRole:"button",accessibilityLabel:t,onPress:n,style:({pressed:i})=>[m.copyBtn,m.iconBtn,i&&m.copyPressed],children:[r?w(hn,{size:11,color:k.color.accent}):w(kc,{size:11,color:k.color.textSecondary}),w(l,{style:[m.copyText,r&&m.copiedText],children:r?"Copied":t})]})}function _c({message:e}){let{showThinking:t}=It(),o=Dt(()=>Cn(b.getState().messages,t),[t]),r=Rs(e);return Te(s,{style:m.transcriptActions,children:[r?w(l,{style:m.turnFooter,testID:"buoy-ask-buoy-turn-footer",children:r}):null,w(Uc,{testID:"buoy-ask-buoy-copy",label:"Copy conversation",getText:o})]})}var Kc=mc(function({message:e,onRetry:t,waitingOnUser:o}){if(e.role==="user")return w(jc,{message:e});if(e.system)return w(Nc,{message:e});let r=!e.streaming&&!e.error;return Te(s,{children:[w(Mc,{message:e,onRetry:t,waitingOnUser:o}),r&&w(_c,{message:e})]})});function zn({messages:e,ListHeaderComponent:t,ListEmptyComponent:o,ListFooterComponent:r,onRetry:n,waitingOnUser:i}){let a=Ho(null),h=Ho(true),u=Ho(false),g=Dt(fe=>{let{contentOffset:Ke,contentSize:Re,layoutMeasurement:Qe}=fe.nativeEvent,Je=Re.height-Qe.height-Ke.y;h.current=Je<80},[]),y=Dt(()=>{u.current=true},[]),C=Dt(fe=>{u.current&&g(fe)},[g]),j=Dt(fe=>{u.current=false,g(fe)},[g]),q=Dt(()=>{h.current&&(a.current?.scrollToEnd({animated:false}),requestAnimationFrame(()=>a.current?.scrollToEnd({animated:false})))},[]),X=e[e.length-1],ee=X?`${X.id}:${X.text.length}:${X.toolCalls.length}:${X.error??""}`:"";return xc(()=>{q()},[ee,q]),w(Go,{ref:a,testID:"buoy-ask-buoy-messages-scroll",style:m.list,contentContainerStyle:m.listContent,data:e,keyExtractor:fe=>fe.id,renderItem:({item:fe})=>w(Kc,{message:fe,onRetry:fe.id===X?.id?n:void 0,waitingOnUser:fe.id===X?.id?i:false}),onScroll:C,onScrollBeginDrag:y,onScrollEndDrag:j,onMomentumScrollEnd:g,scrollEventThrottle:32,onContentSizeChange:q,keyboardShouldPersistTaps:"handled",keyboardDismissMode:"interactive",ListHeaderComponent:t,ListEmptyComponent:o,ListFooterComponent:r})}var m=x.create({list:{flex:1,backgroundColor:"transparent"},listContent:{paddingHorizontal:k.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:k.color.accentFill,borderWidth:x.hairlineWidth,borderColor:k.color.accentBorder},userText:{color:k.color.text,fontSize:k.font.row,lineHeight:21},systemLine:{alignSelf:"stretch",paddingHorizontal:12,paddingVertical:7,borderRadius:k.radius.row,backgroundColor:k.color.fill},systemText:{color:k.color.textSecondary,fontSize:k.font.micro,lineHeight:16,textAlign:"center"},assistantWrap:{alignItems:"stretch",gap:10},blocks:{gap:10},waitingRow:{flexDirection:"row",alignItems:"center",gap:8},waitingText:{color:k.color.textSecondary,fontSize:k.font.caption},assistantText:{color:k.color.text,fontSize:k.font.row,lineHeight:22,paddingHorizontal:2},card:{borderRadius:k.radius.card,borderWidth:x.hairlineWidth,borderColor:k.color.border,backgroundColor:k.color.surface,overflow:"hidden"},row:{paddingHorizontal:12,paddingVertical:10},rowDivider:{borderBottomWidth:x.hairlineWidth,borderBottomColor:k.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:k.color.accent},markFailed:{backgroundColor:k.color.danger},markRefused:{backgroundColor:k.color.warning},markNotRun:{borderWidth:1.5,borderColor:k.color.textTertiary},markNotRunBar:{width:7,height:1.5,borderRadius:1,backgroundColor:k.color.textSecondary},rowTitle:{flex:1,color:k.color.text,fontSize:k.font.body,lineHeight:19},rowStatus:{color:k.color.textTertiary,fontSize:k.font.caption,maxWidth:120},rowStatusDanger:{color:k.color.danger},rowStatusWarning:{color:k.color.warning},rowStatusOk:{color:k.color.accent},rowVerified:{color:k.color.accent},rowDetail:{paddingLeft:28,paddingTop:8,gap:4},rowTool:{color:k.color.textTertiary,fontSize:k.font.micro,fontWeight:"600",letterSpacing:.8},rowDescription:{color:k.color.textSecondary,fontSize:k.font.caption,lineHeight:18},rowFailure:{color:k.color.danger,fontSize:k.font.caption,lineHeight:18},rowReceipts:{paddingTop:10,gap:10},groupBody:{paddingLeft:14,backgroundColor:k.color.fill},stoppedBox:{alignItems:"flex-start",gap:2,paddingHorizontal:12,paddingVertical:8},stoppedText:{color:k.color.textTertiary,fontSize:k.font.caption,lineHeight:18},errorBox:{flexDirection:"row",alignItems:"flex-start",gap:8,paddingHorizontal:12,paddingVertical:10,borderRadius:k.radius.row,backgroundColor:k.color.dangerSoft},errorBody:{flex:1,gap:4},errorText:{color:k.color.danger,fontSize:k.font.caption,fontWeight:"600",lineHeight:18},errorDetail:{color:k.color.textSecondary,fontSize:k.font.micro,lineHeight:15},retry:{alignSelf:"flex-start",marginTop:6,paddingHorizontal:14,paddingVertical:7,borderRadius:k.radius.row,backgroundColor:k.color.button},retryPressed:{opacity:.7},retryText:{color:k.color.accent,fontSize:k.font.caption,fontWeight:"600"},transcriptActions:{flexDirection:"row",alignItems:"center",gap:10,marginTop:8},turnFooter:{flex:1,color:k.color.textTertiary,fontSize:k.font.micro,fontVariant:["tabular-nums"]},copyBtn:{paddingHorizontal:10,paddingVertical:5,borderRadius:k.radius.badge,backgroundColor:k.color.fill},iconBtn:{flexDirection:"row",alignItems:"center",gap:4,paddingHorizontal:8},copyPressed:{opacity:.7},copyText:{color:k.color.textSecondary,fontSize:k.font.micro,fontWeight:"600"},copiedText:{color:k.color.accent}});import{night as Le,X as Qc}from"@buoy-gg/shared-ui/web";import{jsx as Rt,jsxs as Wo}from"react/jsx-runtime";var Jc=132;function Gc({items:e,paused:t,onEdit:o,onRemove:r}){return e.length===0?null:Wo(s,{style:We.wrap,testID:"buoy-ask-buoy-queued",children:[Rt(Fe,{style:We.list,contentContainerStyle:We.listContent,keyboardShouldPersistTaps:"handled",children:e.map((n,i)=>Wo(s,{style:[We.row,t!==null&&We.rowPaused],children:[Wo(f,{testID:`buoy-ask-buoy-queue-item-${i}`,accessibilityRole:"button",accessibilityLabel:`Edit queued message: ${n.text}`,onPress:()=>o(n.id),style:({pressed:a})=>[We.rowBody,a&&We.pressed],children:[Rt(l,{style:We.ordinal,children:i===0?"NEXT":"THEN"}),Rt(l,{style:We.text,numberOfLines:3,children:n.text})]}),Rt(f,{testID:`buoy-ask-buoy-queue-remove-${i}`,accessibilityRole:"button",accessibilityLabel:"Remove queued message",onPress:()=>r(n.id),hitSlop:8,style:({pressed:a})=>[We.remove,a&&We.pressed],children:Rt(Qc,{size:11,color:Le.color.textTertiary})})]},n.id))}),Rt(l,{style:[We.hint,t!==null&&We.hintPaused],testID:"buoy-ask-buoy-queue-hint",children:t??"Sends one at a time when this turn finishes \xB7 tap to edit"})]})}var We=x.create({wrap:{paddingHorizontal:Le.gutter,paddingTop:8,gap:6,backgroundColor:Le.color.bg},list:{maxHeight:Jc},listContent:{gap:6},row:{flexDirection:"row",alignItems:"center",borderRadius:Le.radius.row,borderWidth:x.hairlineWidth,borderColor:Le.color.border,backgroundColor:Le.color.surface},rowPaused:{borderColor:Le.color.warning},rowBody:{flex:1,flexDirection:"row",alignItems:"center",gap:8,paddingVertical:7,paddingLeft:10},ordinal:{color:Le.color.textTertiary,fontSize:9,fontWeight:"700",letterSpacing:.6,width:30},text:{flex:1,color:Le.color.textSecondary,fontSize:Le.font.caption,lineHeight:17},remove:{width:32,height:32,alignItems:"center",justifyContent:"center"},pressed:{opacity:.7},hint:{color:Le.color.textTertiary,fontSize:Le.font.micro},hintPaused:{color:Le.color.warning}});var Yc="Summarize this conversation as a bug ticket, using one buoy_ui finding block and nothing else. Title it with the problem in one line. Evidence rows, in this order: Steps (what we did), Expected, Observed, Build (dev or release, platform), Evidence (the exact requests, statuses, logs or values you actually saw this conversation), Still applied (overrides or changes from your changes list that are still live, or 'none'). Only facts you observed in this conversation; write 'unknown' where you don't know rather than guessing, and put anything you inferred rather than saw in a final row labelled Inference. Do not run any tool or change anything to produce this.";import{Fragment as Xc,jsx as we,jsxs as ro}from"react/jsx-runtime";function Oo({visible:e,onClose:t,onBack:o,onMinimize:r,persistenceKey:n,config:i}){let{state:a,send:h,stop:u,reset:g,undoThenReset:y,approve:C,retry:j,answer:q,runAction:X,editQueued:ee,removeQueued:fe,configured:Ke,toolCount:Re,availableToolIds:Qe}=sn(i),[Je,ut]=co(false),pt=qe(()=>{u(),t()},[u,t]),wt=qe(()=>b.clearDraft(),[]),[Me,it]=co(false),lt=qe(()=>it(false),[]),Ge=qe(()=>it(true),[]),ht=!e,Ye=!!a.pending||!!a.awaitingBlockId,Ce=a.messages[a.messages.length-1],vt=At(false),Ut=At(a.busy);$t(()=>{ht&&Ut.current&&!a.busy&&(vt.current=true),ht||(vt.current=false),Ut.current=a.busy},[ht,a.busy]),$t(()=>{if(!ht){Ct("ask-buoy",null);return}Ye?Ct("ask-buoy",{kind:"needsInput",label:a.pending?"Needs your approval":"Has a question for you"}):vt.current&&Ce?.role==="assistant"&&Ce.error?Ct("ask-buoy",{kind:"failed",label:"The last turn failed"}):vt.current&&!a.busy?Ct("ask-buoy",{kind:"done",label:"Finished"}):Ct("ask-buoy",null)},[ht,Ye,a.busy,a.pending,Ce]),$t(()=>()=>Ct("ask-buoy",null),[]),$t(()=>{a.pending&&Me&&it(false)},[a.pending,Me]);let io=Pi({minBottom:16}),[_t,lo]=co("bottomSheet"),ao=_t==="floating"?0:io.bottom,so=qe(()=>{let J=b.getLedger();J&&(async()=>{let ne=await J.revertAll(Hi);if(ne.failed.length===0){b.setNotice(null);return}let St=ne.failed.map(Kt=>`${Kt.label} (${Kt.error})`).join("; ");b.setNotice(`Couldn't undo ${ne.failed.length} change${ne.failed.length===1?"":"s"} \u2014 ${St}`)})()},[]),S=qe(()=>ut(J=>!J),[]),E=At(new se.Value(560)).current,U=At(false),re=qe(()=>{U.current||(U.current=true,E.stopAnimation(J=>{let ne=typeof J=="number"&&J>200?J:560;se.timing(E,{toValue:120,duration:220,useNativeDriver:false}).start(()=>{setTimeout(()=>{se.spring(E,{toValue:ne,friction:9,useNativeDriver:false}).start(()=>{U.current=false})},2500)})}))},[E]),xe=Jt(()=>{let J=a.messages[a.messages.length-1];if(!J||J.role!=="assistant")return"";let ne=J.blocks.filter(St=>St.block.kind==="peek").length;return ne>0?`${J.id}:${ne}`:""},[a.messages]),te=At("");$t(()=>{xe&&xe!==te.current&&i?.peek!==false&&re(),te.current=xe},[xe,re,i]);let $n=qe(()=>{let J=b.getLedger()?.list().filter(ne=>!ne.undoneAt&&Bi(ne.effect)).length??0;if(J===0){g();return}po.alert("Undo changes first?",`Ask Buoy made ${J} change${J===1?"":"s"} that can still be undone. Clearing the conversation loses the only automatic undo for ${J===1?"it":"them"}.`,[{text:"Undo, then clear",onPress:()=>{(async()=>{let ne=await y();if(ne.cleared)return;let St=ne.reverted+ne.failed.length,Kt=ne.failed.map(Uo=>`${Uo.label} (${Uo.error})`).join(`
13
+ `);po.alert(`Couldn't undo ${ne.failed.length} of ${St} change${St===1?"":"s"}`,`${Kt}
14
+
15
+ Still applied in the app. Clear the conversation anyway?`,[{text:"Keep conversation",style:"cancel"},{text:"Clear anyway",style:"destructive",onPress:g}])})()}},{text:"Clear anyway",style:"destructive",onPress:g},{text:"Cancel",style:"cancel"}])},[g,y]),An=Jt(()=>{let J=a.messages[a.messages.length-1];return!J||J.role!=="assistant"||!J.streaming?null:J.toolCalls.find(ne=>ne.status==="running")?.label??null},[a.messages]),No=Lr(b.getLedger()),jo=Jt(()=>ss(No),[No]),Bn=Jt(()=>({answer:q,runAction:(J,ne)=>{if(J.minimize){r?.({mode:"bottomSheet"});return}return X(J,ne)},answered:a.answers,actionState:a.actionState,busy:a.busy,supports:{openTool:false,minimize:!!r,dispatch:true},rules:jo}),[q,X,r,a.answers,a.actionState,a.busy,jo]),Hn=!a.busy&&Ce?.role==="assistant"&&!!Ce.error,Mo=!a.busy&&Ce?.role==="assistant"&&Ce.stopped&&!Ce.error?Ce.id:null,Ln=Yr(a),{showThinking:qo,readOnly:Fo}=It(),Wn=qe(()=>Cn(a.messages,qo),[a.messages,qo]),On=qe(()=>h(Yc),[h]),Pn=Me?ro(ho,{children:[we(ho.Navigation,{onBack:lt}),we(ho.Content,{title:"Settings",subtitle:"Ask Buoy",testID:"buoy-ask-buoy-settings-title"})]}):we(Ur,{configured:Ke,busy:a.busy,failed:Hn,activeLabel:An,awaitingApproval:!!a.pending,startedAt:Ce?.role==="assistant"&&Ce.streaming?Ce.startedAt??null:null,stopping:a.stopping,readOnly:Fo,toolCount:Re,hasMessages:a.messages.length>0,onBack:o,onReset:$n,getTranscript:Wn,onOpenSettings:Ge,onTicket:On});return we(Oi,{visible:e,onClose:pt,disableScrollWrapper:true,background:false,initialHeight:560,animatedHeight:E,header:{customContent:Pn,showToggleButton:false},onBack:o,onMinimize:r,onModeChange:lo,persistenceKey:n??"buoy-ask-buoy",enablePersistence:true,children:we(tr,{value:Bn,children:ro(s,{style:[Po.root,{paddingBottom:ao}],children:[we(Wr,{ledger:b.getLedger(),onUndoAll:so,expanded:Je,onToggle:S}),a.notice&&ro(s,{style:Po.notice,testID:"buoy-ask-buoy-notice",children:[we(Wi,{size:14,color:Wt.color.info}),we(l,{style:Po.noticeText,children:a.notice})]}),we(ys,{children:we(Li,{featureName:"Ask Buoy",children:Me?we(cn,{}):ro(Xc,{children:[we(zn,{messages:a.messages,onRetry:j,waitingOnUser:!!a.pending||!!a.awaitingBlockId,ListEmptyComponent:we(fc,{configured:Ke,onPick:h,availableToolIds:Qe,readOnly:Fo||!!i?.policy?.readOnly})}),we(Gc,{items:a.queued,paused:Ln,onEdit:ee,onRemove:fe}),a.pending&&we(Ar,{pending:a.pending,onAnswer:C}),we(Er,{onSend:h,onStop:u,busy:a.busy,draft:a.draft,onDraftTaken:wt,disabled:!Ke,focusKey:Mo,canFocus:e,placeholder:Mo?"Tell it what to do differently\u2026":a.awaitingBlockId?"Pick an option above, or type\u2026":void 0})]})})})]})})})}var Po=x.create({root:{flex:1,backgroundColor:"transparent"},notice:{flexDirection:"row",alignItems:"flex-start",gap:8,paddingHorizontal:Wt.gutter,paddingVertical:10,backgroundColor:Wt.color.infoSoft},noticeText:{flex:1,color:Wt.color.text,fontSize:Wt.font.caption,lineHeight:18}});import{AskBuoyIcon as In,ASK_BUOY_ICON_COLOR as Dn}from"@buoy-gg/floating-tools-core/web";import{jsx as Rn}from"react/jsx-runtime";var no={id:"ask-buoy",name:"ASK BUOY",description:"Ask about this app in plain English",slot:"both",color:Dn,icon:({size:e,slot:t})=>Rn(In,{size:t==="dial"?e*1.5:e}),component:Oo};function Zc(e){let{name:t,description:o,...r}=e,n=r;return{...no,name:t??no.name,description:o??no.description,component:i=>Rn(Oo,{...i,config:n})}}import{isReversible as Vo}from"@buoy-gg/agent-core/web";var Eo=1,ed={version:Eo,async dispose(e){let t=b.getLedger();for(let o of t?.list()??[])o.undoneAt||o.effect.kind==="network-override"&&await e("network","deleteOverrideRule",{id:o.effect.ruleId})},getSnapshot(){let e=b.getState(),t=(b.getLedger()?.list()??[]).filter(o=>!o.undoneAt);return{version:Eo,busy:e.busy,configured:e.configured,notice:e.notice,messageCount:e.messages.length,messages:e.messages.map(o=>({id:o.id,role:o.role,text:Mt(o.text),streaming:!!o.streaming,toolCalls:o.toolCalls.map(r=>({toolId:r.toolId,action:r.action,status:r.status}))})),usage:e.usage,pendingApproval:e.pending?{toolId:e.pending.toolId,action:e.pending.action,label:e.pending.label}:null,changes:{reversible:t.filter(o=>Vo(o.effect)).length,permanent:t.filter(o=>o.effect.kind!=="transient"&&!Vo(o.effect)).length,transients:t.filter(o=>o.effect.kind==="transient").length,items:t.map(o=>({kind:o.effect.kind,label:o.effect.label}))}}},subscribe(e){let t=b.subscribe(e),o=b.getLedger()?.subscribe(e);return()=>{t(),o?.()}},actions:{listChanges:()=>(b.getLedger()?.list()??[]).filter(e=>!e.undoneAt).map(e=>({id:e.id,at:e.at,toolId:e.toolId,action:e.action,kind:e.effect.kind,label:e.effect.label,reversible:Vo(e.effect)})),undoAll:async()=>{let e=b.getLedger();return e?{ok:true,...await e.revertAll(rn)}:{ok:false,error:"No Ask Buoy session on this device."}},reset:async()=>{let e=await ln({dispatch:rn,undoFirst:true});return e.cleared?{ok:true,reverted:e.reverted}:{ok:false,error:`Couldn't undo ${e.failed.length} change${e.failed.length===1?"":"s"} \u2014 conversation kept.`,failed:e.failed}}}};export{Eo as ASK_BUOY_ADAPTER_VERSION,Dn as ASK_BUOY_ICON_COLOR,Ar as ApprovalCard,Ur as AskBuoyHeader,In as AskBuoyIcon,Oo as AskBuoyModal,cn as AskBuoySettings,Pe as BlockActionRow,O as BlockCard,tr as BlockHandlersProvider,Zt as BlockRenderer,Wr as ChangesBar,Er as Composer,ts as EditableUserBubble,Ya as ElapsedRow,Dr as LivePill,ur as Markdown,Ja as MessageActions,zn as MessageList,ar as ProvenanceBadge,Xa as QueuedComposer,Ga as ReasoningStrip,Za as ReloadDivider,xn as ThinkingStrip,es as Timestamp,xt as askBuoySettings,b as askBuoyStore,ed as askBuoySyncAdapter,no as askBuoyToolPreset,Zc as createAskBuoyTool,yn as hasTrace,Mt as redactForWire,Lo as traceEntries,mn as traceToText,sn as useAskBuoy,It as useAskBuoySettings,Bo as useAskBuoyState,Z as useBlockHandlers};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@buoy-gg/ask-buoy",
3
- "version": "7.0.40",
3
+ "version": "7.0.42",
4
4
  "description": "In-app AI chat for supported Buoy inspection and action tools, using a configured model endpoint.",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",
@@ -13,7 +13,8 @@
13
13
  "sideEffects": [
14
14
  "./src/index.tsx",
15
15
  "./lib/commonjs/index.js",
16
- "./lib/module/index.js"
16
+ "./lib/module/index.js",
17
+ "./lib/web/**/*.mjs"
17
18
  ],
18
19
  "keywords": [
19
20
  "react-native",
@@ -24,27 +25,38 @@
24
25
  "buoy"
25
26
  ],
26
27
  "dependencies": {
27
- "@buoy-gg/agent-core": "^7.0.40",
28
- "@buoy-gg/shared-ui": "^7.0.40",
29
- "@buoy-gg/floating-tools-core": "^7.0.40"
28
+ "@buoy-gg/agent-core": "^7.0.42",
29
+ "@buoy-gg/shared-ui": "^7.0.42",
30
+ "@buoy-gg/floating-tools-core": "^7.0.42"
30
31
  },
31
32
  "peerDependencies": {
32
- "@buoy-gg/license": "7.0.40",
33
+ "@buoy-gg/license": "7.0.42",
33
34
  "react": "*",
34
35
  "react-native": "*",
35
- "@buoy-gg/core": "^7.0.40"
36
+ "react-native-web": "^0.21.0",
37
+ "react-dom": ">=18",
38
+ "@buoy-gg/core": "^7.0.42"
36
39
  },
37
40
  "peerDependenciesMeta": {
38
41
  "@buoy-gg/core": {
39
42
  "optional": true
43
+ },
44
+ "react-native": {
45
+ "optional": true
46
+ },
47
+ "react-native-web": {
48
+ "optional": true
49
+ },
50
+ "react-dom": {
51
+ "optional": true
40
52
  }
41
53
  },
42
54
  "devDependencies": {
43
55
  "@types/react": "^19.1.0",
44
56
  "@types/react-native": "^0.73.0",
45
57
  "typescript": "~5.8.3",
46
- "@buoy-gg/core": "^7.0.40",
47
- "@buoy-gg/license": "^7.0.40"
58
+ "@buoy-gg/license": "^7.0.42",
59
+ "@buoy-gg/core": "^7.0.42"
48
60
  },
49
61
  "react-native-builder-bob": {
50
62
  "source": "src",
@@ -73,11 +85,32 @@
73
85
  "access": "public",
74
86
  "tag": "latest"
75
87
  },
88
+ "exports": {
89
+ ".": {
90
+ "browser": {
91
+ "types": "./lib/typescript/index.d.ts",
92
+ "default": "./lib/web/index.mjs"
93
+ },
94
+ "import": {
95
+ "types": "./lib/typescript/index.d.ts",
96
+ "default": "./lib/module/index.js"
97
+ },
98
+ "require": {
99
+ "types": "./lib/typescript/index.d.ts",
100
+ "default": "./lib/commonjs/index.js"
101
+ }
102
+ },
103
+ "./web": {
104
+ "types": "./lib/typescript/index.d.ts",
105
+ "default": "./lib/web/index.mjs"
106
+ }
107
+ },
76
108
  "scripts": {
77
- "build": "bob build",
109
+ "build": "bob build && pnpm run build:web",
78
110
  "typecheck": "tsc --noEmit",
79
111
  "clean": "rimraf lib",
80
112
  "test": "pnpm run typecheck",
81
- "postinstall": "echo \"Run pnpm build to compile this package\""
113
+ "postinstall": "echo \"Run pnpm build to compile this package\"",
114
+ "build:web": "node ../../scripts/build-web.mjs ask-buoy"
82
115
  }
83
116
  }
@@ -1 +0,0 @@
1
- {"version":3,"names":["_react","require","_reactNative","_sharedUi","_context","_icons","_primitives","_jsxRuntime","Choice","block","h","useBlockHandlers","answer","answered","id","chosen","kind","optionId","locked","jsxs","Card","testID","tone","undefined","children","jsx","Text","style","styles","question","View","options","slice","map","o","i","isChosen","Pressable","accessibilityRole","accessibilityState","selected","disabled","onPress","blockId","label","pressed","option","optionDivider","optionChosen","optionDimmed","icon","BlockIcon","name","optionText","optionLabel","optionLabelChosen","detail","optionDetail","Check","size","color","night","accent","ChevronRight","textTertiary","allowFreeText","hint","Confirm","approved","confirmTitle","title","confirmChange","change","consequence","confirmConsequence","confirmActions","decided","approveLabel","declineLabel","Fragment","button","buttonPrimary","buttonTextPrimary","buttonPlate","buttonTextPlate","Input","value","setValue","useState","secret","type","submit","v","trim","inputRow","TextInput","input","onChangeText","placeholder","placeholderTextColor","keyboardType","secureTextEntry","autoCapitalize","autoCorrect","returnKeyType","onSubmitEditing","buttonDisabled","submitLabel","StyleSheet","create","text","fontSize","font","row","fontWeight","lineHeight","paddingHorizontal","paddingTop","paddingBottom","marginHorizontal","marginBottom","borderRadius","radius","backgroundColor","surfaceElevated","overflow","flexDirection","alignItems","gap","paddingVertical","borderTopWidth","hairlineWidth","borderTopColor","separator","accentSoft","opacity","flex","body","textSecondary","caption","micro","warning","height","onAccent"],"sourceRoot":"../../../src","sources":["blocks/AskBlocks.tsx"],"mappings":";;;;;;;;AAQA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AAGA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAL,OAAA;AAAoC,IAAAM,WAAA,GAAAN,OAAA;AAfpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAUO,SAASO,MAAMA,CAAC;EAAEC;AAA8B,CAAC,EAAE;EACxD,MAAMC,CAAC,GAAG,IAAAC,yBAAgB,EAAC,CAAC;EAC5B,MAAMC,MAAM,GAAGF,CAAC,CAACG,QAAQ,CAACJ,KAAK,CAACK,EAAE,CAAC;EACnC,MAAMC,MAAM,GAAGH,MAAM,EAAEI,IAAI,KAAK,QAAQ,GAAGJ,MAAM,CAACK,QAAQ,GAAG,IAAI;EACjE,MAAMC,MAAM,GAAG,CAAC,CAACN,MAAM;EAEvB,oBACE,IAAAL,WAAA,CAAAY,IAAA,EAACb,WAAA,CAAAc,IAAI;IAACC,MAAM,EAAE,qBAAqBZ,KAAK,CAACK,EAAE,EAAG;IAACQ,IAAI,EAAEJ,MAAM,GAAGK,SAAS,GAAG,MAAO;IAAAC,QAAA,gBAC/E,IAAAjB,WAAA,CAAAk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;IAAER,YAAY,EAAE5D,eAAK,CAAC6D,MAAM,CAACT;EAAI,CAAC;EACrFhC,aAAa,EAAE;IAAE0C,eAAe,EAAE9D,eAAK,CAACD,KAAK,CAACE;EAAO,CAAC;EACtDqB,WAAW,EAAE;IAAEwC,eAAe,EAAE9D,eAAK,CAACD,KAAK,CAACoB;EAAO,CAAC;EACpD0B,cAAc,EAAE;IAAE6B,OAAO,EAAE;EAAI,CAAC;EAChCrD,iBAAiB,EAAE;IAAEtB,KAAK,EAAEC,eAAK,CAACD,KAAK,CAACmF,QAAQ;IAAEhC,QAAQ,EAAElD,eAAK,CAACmD,IAAI,CAAC2B,OAAO;IAAEzB,UAAU,EAAE;EAAM,CAAC;EACnG9B,eAAe,EAAE;IAAExB,KAAK,EAAEC,eAAK,CAACD,KAAK,CAACkD,IAAI;IAAEC,QAAQ,EAAElD,eAAK,CAACmD,IAAI,CAAC2B,OAAO;IAAEzB,UAAU,EAAE;EAAM,CAAC;EAC7FrE,OAAO,EAAE;IAAE0F,OAAO,EAAE;EAAI;AAC1B,CAAC,CAAC","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"names":["_react","require","_reactNative","_sharedUi","_AskBlocks","_DataBlocks","_MediaBlocks","_ReceiptBlocks","_ExtraBlocks","_primitives","_jsxRuntime","BlockBoundary","Component","state","failed","getDerivedStateFromError","render","jsx","Text","style","boundaryStyles","fallback","testID","children","props","StyleSheet","create","color","night","textTertiary","fontSize","font","micro","fontStyle","paddingVertical","renderNested","block","BlockRenderer","BlockRendererInner","kind","Choice","Confirm","Input","Table","KeyValue","List","ImageGrid","Diff","Chart","Steps","Code","ActionRow","actions","blockId","id","Notice","Finding","RequestList","RequestCard","RuleCard","ScreenElements","RouteChips","LogList","Crash","Peek","Suggestions","MultiSelect","Select","Slider","DateTime","Form","Proposal","Claim","Details","Tabs","Timeline","Sparkline","Compare","CardView","CardCarousel","Screenshot","Plan","Checkpoint","Task","Banner","File","Upload"],"sourceRoot":"../../../src","sources":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AAA1B,WAAA,CAAAO,GAAA,EAACT,YAAA,CAAAuE,YAAY;QAAC3C,KAAK,EAAEA;MAAM,CAAE,CAAC;IACvC,KAAK,YAAY;MACf,oBAAO,IAAA1B,WAAA,CAAAO,GAAA,EAACT,YAAA,CAAAwE,UAAU;QAAC5C,KAAK,EAAEA;MAAM,CAAE,CAAC;IACrC,KAAK,MAAM;MACT,oBAAO,IAAA1B,WAAA,CAAAO,GAAA,EAACT,YAAA,CAAAyE,IAAI;QAAC7C,KAAK,EAAEA;MAAM,CAAE,CAAC;IAC/B,KAAK,YAAY;MACf,oBAAO,IAAA1B,WAAA,CAAAO,GAAA,EAACT,YAAA,CAAA0E,UAAU;QAAC9C,KAAK,EAAEA;MAAM,CAAE,CAAC;IACrC,KAAK,MAAM;MACT,oBAAO,IAAA1B,WAAA,CAAAO,GAAA,EAACT,YAAA,CAAA2E,IAAI;QAAC/C,KAAK,EAAEA;MAAM,CAAE,CAAC;IAC/B,KAAK,QAAQ;MACX,oBAAO,IAAA1B,WAAA,CAAAO,GAAA,EAACT,YAAA,CAAA4E,MAAM;QAAChD,KAAK,EAAEA;MAAM,CAAE,CAAC;IACjC,KAAK,MAAM;MACT,oBAAO,IAAA1B,WAAA,CAAAO,GAAA,EAACT,YAAA,CAAA6E,IAAI;QAACjD,KAAK,EAAEA;MAAM,CAAE,CAAC;IAC/B,KAAK,QAAQ;MACX,oBAAO,IAAA1B,WAAA,CAAAO,GAAA,EAACT,YAAA,CAAA8E,MAAM;QAAClD,KAAK,EAAEA;MAAM,CAAE,CAAC;IACjC;MACE,OAAO,IAAI;EACf;AACF","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"names":["_react","require","_reactNative","_sharedUi","_context","_jsxRuntime","IconButton","label","onPress","children","jsx","Pressable","accessibilityRole","accessibilityLabel","style","pressed","styles","iconBtn","MessageActions","id","h","useBlockHandlers","vote","setVote","useState","fire","runAction","send","jsxs","View","actions","testID","Copy","size","color","night","textSecondary","RefreshCw","Text","glyph","glyphOn","textBtn","ReasoningStrip","text","live","open","setOpen","reasoning","v","reasoningHead","accessibilityState","expanded","ActivityIndicator","textTertiary","reasoningTitle","ChevronDown","ChevronRight","reasoningBody","ElapsedRow","ms","setMs","useEffect","t","setInterval","m","clearInterval","elapsed","elapsedLabel","elapsedMs","toFixed","QueuedComposer","setText","queued","setQueued","composerWrap","queuedRow","queuedText","numberOfLines","queuedCancel","composer","TextInput","composerInput","value","onChangeText","placeholder","placeholderTextColor","disabled","trim","queueBtn","opacity","queueBtnText","ReloadDivider","at","divider","dividerLine","dividerText","Timestamp","timestamp","EditableUserBubble","editing","setEditing","setValue","userWrap","editBox","editInput","multiline","editActions","editPrimary","editPrimaryText","editPlate","editPlateText","onLongPress","bubble","bubbleText","bubbleHint","StyleSheet","create","flexDirection","alignItems","gap","paddingHorizontal","paddingVertical","borderRadius","radius","badge","backgroundColor","fill","fontSize","font","micro","fontWeight","row","overflow","flex","caption","fontStyle","lineHeight","paddingBottom","card","borderWidth","hairlineWidth","borderColor","border","surface","body","fontFamily","infoSoft","info","height","surfaceElevated","button","justifyContent","alignSelf","maxWidth","borderBottomRightRadius","accentFill","accentBorder","textAlign","width","minHeight","padding","accentBorderStrong","flexWrap","accent","onAccent"],"sourceRoot":"../../../src","sources":["blocks/ChromePrototypes.tsx"],"mappings":";;;;;;;;;;;;AAOA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AAEA,IAAAG,QAAA,GAAAH,OAAA;AAA6C,IAAAI,WAAA,GAAAJ,OAAA;AAX7C;AACA;AACA;AACA;AACA;AACA;AACA;;AAOA,SAASK,UAAUA,CAAC;EAAEC,KAAK;EAAEC,OAAO;EAAEC;AAA4E,CAAC,EAAE;EACnH,oBACE,IAAAJ,WAAA,CAAAK,GAAA,EAACR,YAAA,CAAAS,SAAS;IAACH,OAAO,EAAEA,OAAQ;IAACI,iBAAiB,EAAC,QAAQ;I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