@buoy-gg/ask-buoy 7.0.33

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 (184) hide show
  1. package/LICENSE +58 -0
  2. package/README.md +50 -0
  3. package/lib/commonjs/blocks/AskBlocks.js +338 -0
  4. package/lib/commonjs/blocks/AskBlocks.js.map +1 -0
  5. package/lib/commonjs/blocks/BlockRenderer.js +250 -0
  6. package/lib/commonjs/blocks/BlockRenderer.js.map +1 -0
  7. package/lib/commonjs/blocks/ChromePrototypes.js +514 -0
  8. package/lib/commonjs/blocks/ChromePrototypes.js.map +1 -0
  9. package/lib/commonjs/blocks/DataBlocks.js +545 -0
  10. package/lib/commonjs/blocks/DataBlocks.js.map +1 -0
  11. package/lib/commonjs/blocks/ExtraBlocks.js +1821 -0
  12. package/lib/commonjs/blocks/ExtraBlocks.js.map +1 -0
  13. package/lib/commonjs/blocks/MediaBlocks.js +140 -0
  14. package/lib/commonjs/blocks/MediaBlocks.js.map +1 -0
  15. package/lib/commonjs/blocks/ReceiptBlocks.js +596 -0
  16. package/lib/commonjs/blocks/ReceiptBlocks.js.map +1 -0
  17. package/lib/commonjs/blocks/context.js +42 -0
  18. package/lib/commonjs/blocks/context.js.map +1 -0
  19. package/lib/commonjs/blocks/icons.js +96 -0
  20. package/lib/commonjs/blocks/icons.js.map +1 -0
  21. package/lib/commonjs/blocks/index.js +95 -0
  22. package/lib/commonjs/blocks/index.js.map +1 -0
  23. package/lib/commonjs/blocks/primitives.js +312 -0
  24. package/lib/commonjs/blocks/primitives.js.map +1 -0
  25. package/lib/commonjs/blocks/primitivesIndex.js +56 -0
  26. package/lib/commonjs/blocks/primitivesIndex.js.map +1 -0
  27. package/lib/commonjs/components/ApprovalCard.js +140 -0
  28. package/lib/commonjs/components/ApprovalCard.js.map +1 -0
  29. package/lib/commonjs/components/AskBuoyHeader.js +127 -0
  30. package/lib/commonjs/components/AskBuoyHeader.js.map +1 -0
  31. package/lib/commonjs/components/AskBuoyIcon.js +19 -0
  32. package/lib/commonjs/components/AskBuoyIcon.js.map +1 -0
  33. package/lib/commonjs/components/AskBuoyModal.js +322 -0
  34. package/lib/commonjs/components/AskBuoyModal.js.map +1 -0
  35. package/lib/commonjs/components/ChangesBar.js +211 -0
  36. package/lib/commonjs/components/ChangesBar.js.map +1 -0
  37. package/lib/commonjs/components/Composer.js +175 -0
  38. package/lib/commonjs/components/Composer.js.map +1 -0
  39. package/lib/commonjs/components/EmptyState.js +154 -0
  40. package/lib/commonjs/components/EmptyState.js.map +1 -0
  41. package/lib/commonjs/components/Markdown.js +252 -0
  42. package/lib/commonjs/components/Markdown.js.map +1 -0
  43. package/lib/commonjs/components/MessageList.js +648 -0
  44. package/lib/commonjs/components/MessageList.js.map +1 -0
  45. package/lib/commonjs/components/TypingDots.js +63 -0
  46. package/lib/commonjs/components/TypingDots.js.map +1 -0
  47. package/lib/commonjs/index.js +205 -0
  48. package/lib/commonjs/index.js.map +1 -0
  49. package/lib/commonjs/package.json +1 -0
  50. package/lib/commonjs/preset.js +90 -0
  51. package/lib/commonjs/preset.js.map +1 -0
  52. package/lib/commonjs/store/askBuoyStore.js +279 -0
  53. package/lib/commonjs/store/askBuoyStore.js.map +1 -0
  54. package/lib/commonjs/store/useAskBuoy.js +299 -0
  55. package/lib/commonjs/store/useAskBuoy.js.map +1 -0
  56. package/lib/commonjs/sync/askBuoySyncAdapter.js +119 -0
  57. package/lib/commonjs/sync/askBuoySyncAdapter.js.map +1 -0
  58. package/lib/commonjs/sync/askBuoySyncAdapter.test.js +136 -0
  59. package/lib/commonjs/sync/askBuoySyncAdapter.test.js.map +1 -0
  60. package/lib/commonjs/sync/wire.js +58 -0
  61. package/lib/commonjs/sync/wire.js.map +1 -0
  62. package/lib/commonjs/types.js +6 -0
  63. package/lib/commonjs/types.js.map +1 -0
  64. package/lib/module/blocks/AskBlocks.js +331 -0
  65. package/lib/module/blocks/AskBlocks.js.map +1 -0
  66. package/lib/module/blocks/BlockRenderer.js +245 -0
  67. package/lib/module/blocks/BlockRenderer.js.map +1 -0
  68. package/lib/module/blocks/ChromePrototypes.js +503 -0
  69. package/lib/module/blocks/ChromePrototypes.js.map +1 -0
  70. package/lib/module/blocks/DataBlocks.js +532 -0
  71. package/lib/module/blocks/DataBlocks.js.map +1 -0
  72. package/lib/module/blocks/ExtraBlocks.js +1794 -0
  73. package/lib/module/blocks/ExtraBlocks.js.map +1 -0
  74. package/lib/module/blocks/MediaBlocks.js +135 -0
  75. package/lib/module/blocks/MediaBlocks.js.map +1 -0
  76. package/lib/module/blocks/ReceiptBlocks.js +584 -0
  77. package/lib/module/blocks/ReceiptBlocks.js.map +1 -0
  78. package/lib/module/blocks/context.js +35 -0
  79. package/lib/module/blocks/context.js.map +1 -0
  80. package/lib/module/blocks/icons.js +91 -0
  81. package/lib/module/blocks/icons.js.map +1 -0
  82. package/lib/module/blocks/index.js +8 -0
  83. package/lib/module/blocks/index.js.map +1 -0
  84. package/lib/module/blocks/primitives.js +301 -0
  85. package/lib/module/blocks/primitives.js.map +1 -0
  86. package/lib/module/blocks/primitivesIndex.js +5 -0
  87. package/lib/module/blocks/primitivesIndex.js.map +1 -0
  88. package/lib/module/components/ApprovalCard.js +135 -0
  89. package/lib/module/components/ApprovalCard.js.map +1 -0
  90. package/lib/module/components/AskBuoyHeader.js +124 -0
  91. package/lib/module/components/AskBuoyHeader.js.map +1 -0
  92. package/lib/module/components/AskBuoyIcon.js +8 -0
  93. package/lib/module/components/AskBuoyIcon.js.map +1 -0
  94. package/lib/module/components/AskBuoyModal.js +317 -0
  95. package/lib/module/components/AskBuoyModal.js.map +1 -0
  96. package/lib/module/components/ChangesBar.js +206 -0
  97. package/lib/module/components/ChangesBar.js.map +1 -0
  98. package/lib/module/components/Composer.js +170 -0
  99. package/lib/module/components/Composer.js.map +1 -0
  100. package/lib/module/components/EmptyState.js +149 -0
  101. package/lib/module/components/EmptyState.js.map +1 -0
  102. package/lib/module/components/Markdown.js +246 -0
  103. package/lib/module/components/Markdown.js.map +1 -0
  104. package/lib/module/components/MessageList.js +642 -0
  105. package/lib/module/components/MessageList.js.map +1 -0
  106. package/lib/module/components/TypingDots.js +58 -0
  107. package/lib/module/components/TypingDots.js.map +1 -0
  108. package/lib/module/index.js +29 -0
  109. package/lib/module/index.js.map +1 -0
  110. package/lib/module/preset.js +73 -0
  111. package/lib/module/preset.js.map +1 -0
  112. package/lib/module/store/askBuoyStore.js +275 -0
  113. package/lib/module/store/askBuoyStore.js.map +1 -0
  114. package/lib/module/store/useAskBuoy.js +293 -0
  115. package/lib/module/store/useAskBuoy.js.map +1 -0
  116. package/lib/module/sync/askBuoySyncAdapter.js +114 -0
  117. package/lib/module/sync/askBuoySyncAdapter.js.map +1 -0
  118. package/lib/module/sync/askBuoySyncAdapter.test.js +135 -0
  119. package/lib/module/sync/askBuoySyncAdapter.test.js.map +1 -0
  120. package/lib/module/sync/wire.js +47 -0
  121. package/lib/module/sync/wire.js.map +1 -0
  122. package/lib/module/types.js +4 -0
  123. package/lib/module/types.js.map +1 -0
  124. package/lib/typescript/blocks/AskBlocks.d.ts +11 -0
  125. package/lib/typescript/blocks/AskBlocks.d.ts.map +1 -0
  126. package/lib/typescript/blocks/BlockRenderer.d.ts +5 -0
  127. package/lib/typescript/blocks/BlockRenderer.d.ts.map +1 -0
  128. package/lib/typescript/blocks/ChromePrototypes.d.ts +27 -0
  129. package/lib/typescript/blocks/ChromePrototypes.d.ts.map +1 -0
  130. package/lib/typescript/blocks/DataBlocks.d.ts +29 -0
  131. package/lib/typescript/blocks/DataBlocks.d.ts.map +1 -0
  132. package/lib/typescript/blocks/ExtraBlocks.d.ts +69 -0
  133. package/lib/typescript/blocks/ExtraBlocks.d.ts.map +1 -0
  134. package/lib/typescript/blocks/MediaBlocks.d.ts +5 -0
  135. package/lib/typescript/blocks/MediaBlocks.d.ts.map +1 -0
  136. package/lib/typescript/blocks/ReceiptBlocks.d.ts +27 -0
  137. package/lib/typescript/blocks/ReceiptBlocks.d.ts.map +1 -0
  138. package/lib/typescript/blocks/context.d.ts +35 -0
  139. package/lib/typescript/blocks/context.d.ts.map +1 -0
  140. package/lib/typescript/blocks/icons.d.ts +6 -0
  141. package/lib/typescript/blocks/icons.d.ts.map +1 -0
  142. package/lib/typescript/blocks/index.d.ts +6 -0
  143. package/lib/typescript/blocks/index.d.ts.map +1 -0
  144. package/lib/typescript/blocks/primitives.d.ts +85 -0
  145. package/lib/typescript/blocks/primitives.d.ts.map +1 -0
  146. package/lib/typescript/blocks/primitivesIndex.d.ts +3 -0
  147. package/lib/typescript/blocks/primitivesIndex.d.ts.map +1 -0
  148. package/lib/typescript/components/ApprovalCard.d.ts +7 -0
  149. package/lib/typescript/components/ApprovalCard.d.ts.map +1 -0
  150. package/lib/typescript/components/AskBuoyHeader.d.ts +14 -0
  151. package/lib/typescript/components/AskBuoyHeader.d.ts.map +1 -0
  152. package/lib/typescript/components/AskBuoyIcon.d.ts +6 -0
  153. package/lib/typescript/components/AskBuoyIcon.d.ts.map +1 -0
  154. package/lib/typescript/components/AskBuoyModal.d.ts +13 -0
  155. package/lib/typescript/components/AskBuoyModal.d.ts.map +1 -0
  156. package/lib/typescript/components/ChangesBar.d.ts +9 -0
  157. package/lib/typescript/components/ChangesBar.d.ts.map +1 -0
  158. package/lib/typescript/components/Composer.d.ts +9 -0
  159. package/lib/typescript/components/Composer.d.ts.map +1 -0
  160. package/lib/typescript/components/EmptyState.d.ts +6 -0
  161. package/lib/typescript/components/EmptyState.d.ts.map +1 -0
  162. package/lib/typescript/components/Markdown.d.ts +23 -0
  163. package/lib/typescript/components/Markdown.d.ts.map +1 -0
  164. package/lib/typescript/components/MessageList.d.ts +18 -0
  165. package/lib/typescript/components/MessageList.d.ts.map +1 -0
  166. package/lib/typescript/components/TypingDots.d.ts +2 -0
  167. package/lib/typescript/components/TypingDots.d.ts.map +1 -0
  168. package/lib/typescript/index.d.ts +28 -0
  169. package/lib/typescript/index.d.ts.map +1 -0
  170. package/lib/typescript/preset.d.ts +61 -0
  171. package/lib/typescript/preset.d.ts.map +1 -0
  172. package/lib/typescript/store/askBuoyStore.d.ts +124 -0
  173. package/lib/typescript/store/askBuoyStore.d.ts.map +1 -0
  174. package/lib/typescript/store/useAskBuoy.d.ts +22 -0
  175. package/lib/typescript/store/useAskBuoy.d.ts.map +1 -0
  176. package/lib/typescript/sync/askBuoySyncAdapter.d.ts +73 -0
  177. package/lib/typescript/sync/askBuoySyncAdapter.d.ts.map +1 -0
  178. package/lib/typescript/sync/askBuoySyncAdapter.test.d.ts +2 -0
  179. package/lib/typescript/sync/askBuoySyncAdapter.test.d.ts.map +1 -0
  180. package/lib/typescript/sync/wire.d.ts +17 -0
  181. package/lib/typescript/sync/wire.d.ts.map +1 -0
  182. package/lib/typescript/types.d.ts +119 -0
  183. package/lib/typescript/types.d.ts.map +1 -0
  184. package/package.json +83 -0
@@ -0,0 +1,140 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.ApprovalCard = ApprovalCard;
7
+ var _reactNative = require("react-native");
8
+ var _sharedUi = require("@buoy-gg/shared-ui");
9
+ var _jsxRuntime = require("react/jsx-runtime");
10
+ /**
11
+ * The approval prompt, shown only when the app opted into `requireApproval`.
12
+ *
13
+ * It renders the EFFECT, not the payload. That is the whole design constraint:
14
+ * every other agent product assumes a developer is reading the proposed
15
+ * command before approving it, and the people this tool is for cannot evaluate
16
+ * `redux_dispatch({type:'SET_ENTITLEMENTS', payload:{…}})`. An approval prompt
17
+ * nobody can read is not oversight — it is a rubber stamp that looks like
18
+ * oversight, which is worse than having no prompt at all.
19
+ */
20
+
21
+ function ApprovalCard({
22
+ pending,
23
+ onAnswer
24
+ }) {
25
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
26
+ style: styles.card,
27
+ testID: "buoy-ask-buoy-approval",
28
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
29
+ style: styles.titleRow,
30
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.AlertTriangle, {
31
+ size: 14,
32
+ color: _sharedUi.night.color.warning
33
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
34
+ style: styles.title,
35
+ children: "Allow this change?"
36
+ })]
37
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
38
+ style: styles.label,
39
+ children: pending.label
40
+ }), pending.description ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
41
+ style: styles.description,
42
+ children: pending.description
43
+ }) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
44
+ style: styles.reason,
45
+ children: pending.reason
46
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
47
+ style: styles.actions,
48
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
49
+ testID: "buoy-ask-buoy-approve",
50
+ accessibilityRole: "button",
51
+ onPress: () => onAnswer(true),
52
+ style: ({
53
+ pressed
54
+ }) => [styles.button, styles.approve, pressed && styles.pressed],
55
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
56
+ style: styles.approveText,
57
+ children: "Allow"
58
+ })
59
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
60
+ testID: "buoy-ask-buoy-reject",
61
+ accessibilityRole: "button",
62
+ onPress: () => onAnswer(false),
63
+ style: ({
64
+ pressed
65
+ }) => [styles.button, styles.reject, pressed && styles.pressed],
66
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
67
+ style: styles.rejectText,
68
+ children: "Not now"
69
+ })
70
+ })]
71
+ })]
72
+ });
73
+ }
74
+ const styles = _reactNative.StyleSheet.create({
75
+ card: {
76
+ marginHorizontal: _sharedUi.night.gutter,
77
+ marginBottom: 10,
78
+ padding: _sharedUi.night.cardPad,
79
+ borderRadius: _sharedUi.night.radius.card,
80
+ borderWidth: _reactNative.StyleSheet.hairlineWidth,
81
+ borderColor: _sharedUi.night.color.accentBorderStrong,
82
+ backgroundColor: _sharedUi.night.color.surface,
83
+ gap: 6
84
+ },
85
+ titleRow: {
86
+ flexDirection: "row",
87
+ alignItems: "center",
88
+ gap: 6
89
+ },
90
+ title: {
91
+ color: _sharedUi.night.color.text,
92
+ fontSize: _sharedUi.night.font.caption,
93
+ fontWeight: "600"
94
+ },
95
+ label: {
96
+ color: _sharedUi.night.color.text,
97
+ fontSize: _sharedUi.night.font.row,
98
+ fontWeight: "600",
99
+ lineHeight: 20
100
+ },
101
+ description: {
102
+ color: _sharedUi.night.color.textSecondary,
103
+ fontSize: _sharedUi.night.font.caption,
104
+ lineHeight: 18
105
+ },
106
+ reason: {
107
+ color: _sharedUi.night.color.warning,
108
+ fontSize: _sharedUi.night.font.caption,
109
+ lineHeight: 18
110
+ },
111
+ actions: {
112
+ flexDirection: "row",
113
+ gap: 8,
114
+ marginTop: 6
115
+ },
116
+ button: {
117
+ paddingHorizontal: 16,
118
+ paddingVertical: 9,
119
+ borderRadius: _sharedUi.night.radius.row
120
+ },
121
+ approve: {
122
+ backgroundColor: _sharedUi.night.color.accent
123
+ },
124
+ approveText: {
125
+ color: _sharedUi.night.color.onAccent,
126
+ fontWeight: "600",
127
+ fontSize: _sharedUi.night.font.caption
128
+ },
129
+ reject: {
130
+ backgroundColor: _sharedUi.night.color.button
131
+ },
132
+ rejectText: {
133
+ color: _sharedUi.night.color.text,
134
+ fontSize: _sharedUi.night.font.caption
135
+ },
136
+ pressed: {
137
+ opacity: 0.7
138
+ }
139
+ });
140
+ //# sourceMappingURL=ApprovalCard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_reactNative","require","_sharedUi","_jsxRuntime","ApprovalCard","pending","onAnswer","jsxs","View","style","styles","card","testID","children","titleRow","jsx","AlertTriangle","size","color","night","warning","Text","title","label","description","reason","actions","Pressable","accessibilityRole","onPress","pressed","button","approve","approveText","reject","rejectText","StyleSheet","create","marginHorizontal","gutter","marginBottom","padding","cardPad","borderRadius","radius","borderWidth","hairlineWidth","borderColor","accentBorderStrong","backgroundColor","surface","gap","flexDirection","alignItems","text","fontSize","font","caption","fontWeight","row","lineHeight","textSecondary","marginTop","paddingHorizontal","paddingVertical","accent","onAccent","opacity"],"sourceRoot":"../../../src","sources":["components/ApprovalCard.tsx"],"mappings":";;;;;;AAUA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AAA0D,IAAAE,WAAA,GAAAF,OAAA;AAX1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAWO,SAASG,YAAYA,CAAC;EAAEC,OAAO;EAAEC;AAA4B,CAAC,EAAE;EACrE,oBACE,IAAAH,WAAA,CAAAI,IAAA,EAACP,YAAA,CAAAQ,IAAI;IAACC,KAAK,EAAEC,MAAM,CAACC,IAAK;IAACC,MAAM,EAAC,wBAAwB;IAAAC,QAAA,gBACvD,IAAAV,WAAA,CAAAI,IAAA,EAACP,YAAA,CAAAQ,IAAI;MAACC,KAAK,EAAEC,MAAM,CAACI,QAAS;MAAAD,QAAA,gBAC3B,IAAAV,WAAA,CAAAY,GAAA,EAACb,SAAA,CAAAc,aAAa;QAACC,IAAI,EAAE,EAAG;QAACC,KAAK,EAAEC,eAAK,CAACD,KAAK,CAACE;MAAQ,CAAE,CAAC,eACvD,IAAAjB,WAAA,CAAAY,GAAA,EAACf,YAAA,CAAAqB,IAAI;QAACZ,KAAK,EAAEC,MAAM,CAACY,KAAM;QAAAT,QAAA,EAAC;MAAkB,CAAM,CAAC;IAAA,CAChD,CAAC,eACP,IAAAV,WAAA,CAAAY,GAAA,EAACf,YAAA,CAAAqB,IAAI;MAACZ,KAAK,EAAEC,MAAM,CAACa,KAAM;MAAAV,QAAA,EAAER,OAAO,CAACkB;IAAK,CAAO,CAAC,EAChDlB,OAAO,CAACmB,WAAW,gBAClB,IAAArB,WAAA,CA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EAC/FnC,MAAM,EAAE;IAAEP,KAAK,EAAEC,eAAK,CAACD,KAAK,CAACE,OAAO;IAAEmC,QAAQ,EAAEpC,eAAK,CAACqC,IAAI,CAACC,OAAO;IAAEG,UAAU,EAAE;EAAG,CAAC;EACpFlC,OAAO,EAAE;IAAE0B,aAAa,EAAE,KAAK;IAAED,GAAG,EAAE,CAAC;IAAEW,SAAS,EAAE;EAAE,CAAC;EACvD/B,MAAM,EAAE;IACNgC,iBAAiB,EAAE,EAAE;IACrBC,eAAe,EAAE,CAAC;IAClBrB,YAAY,EAAExB,eAAK,CAACyB,MAAM,CAACe;EAC7B,CAAC;EACD3B,OAAO,EAAE;IAAEiB,eAAe,EAAE9B,eAAK,CAACD,KAAK,CAAC+C;EAAO,CAAC;EAChDhC,WAAW,EAAE;IAAEf,KAAK,EAAEC,eAAK,CAACD,KAAK,CAACgD,QAAQ;IAAER,UAAU,EAAE,KAAK;IAAEH,QAAQ,EAAEpC,eAAK,CAACqC,IAAI,CAACC;EAAQ,CAAC;EAC7FvB,MAAM,EAAE;IAAEe,eAAe,EAAE9B,eAAK,CAACD,KAAK,CAACa;EAAO,CAAC;EAC/CI,UAAU,EAAE;IAAEjB,KAAK,EAAEC,eAAK,CAACD,KAAK,CAACoC,IAAI;IAAEC,QAAQ,EAAEpC,eAAK,CAACqC,IAAI,CAACC;EAAQ,CAAC;EACrE3B,OAAO,EAAE;IAAEqC,OAAO,EAAE;EAAI;AAC1B,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,127 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.AskBuoyHeader = AskBuoyHeader;
7
+ var _react = require("react");
8
+ var _reactNative = require("react-native");
9
+ var _sharedUi = require("@buoy-gg/shared-ui");
10
+ var _jsxRuntime = require("react/jsx-runtime");
11
+ /**
12
+ * The sheet header.
13
+ *
14
+ * Built on the shared `ModalHeader` so it matches Console, Network and Events
15
+ * 1:1 — the stock JsModal header was designed for a single centred title and
16
+ * paints its "Double tap: Toggle • Triple tap: Close" hint through the middle
17
+ * of it, which is how "Ask Buoy" ended up overprinted by grey italics.
18
+ *
19
+ * The subtitle is the one piece of live status the sheet has: what the agent
20
+ * is doing right now, in words a tester can act on. "Thinking…" while a
21
+ * response is streaming with no tool in flight, the current tool's title
22
+ * while one runs, and the reachable tool count at rest so a "why can't it
23
+ * see my network calls" question has an answer in the header.
24
+ *
25
+ * "New conversation" moved up here from a 11pt text link under the composer.
26
+ * A reset that lives under the keyboard is a reset nobody finds.
27
+ */
28
+
29
+ /**
30
+ * Slower than the sprite's default 140ms.
31
+ *
32
+ * This mascot is ambient status a user stares at for the length of a turn,
33
+ * not a moment of delight they glance at once — at the stock tick it read as
34
+ * fidgeting in the corner of the eye while you were trying to read the
35
+ * answer next to it. Every other placement keeps the default.
36
+ */const HEADER_TICK_MS = 200;
37
+ function AskBuoyHeader({
38
+ configured,
39
+ busy,
40
+ failed = false,
41
+ activeLabel,
42
+ toolCount,
43
+ hasMessages,
44
+ onBack,
45
+ onReset
46
+ }) {
47
+ /**
48
+ * ONE mascot state per turn, held to the end of it.
49
+ *
50
+ * `activeLabel` drops to null in the gap between two tool calls, so deriving
51
+ * the state from it directly flipped robot → thinking → robot on every
52
+ * boundary. A turn that runs four tools swapped the sprite eight times in
53
+ * about three seconds — a strobe that reads as a glitch, not as progress.
54
+ * So the robot latches: once this turn has driven a tool it stays `robot`
55
+ * until the turn ends, which is also the honest summary of that turn.
56
+ *
57
+ * The SUBTITLE still tracks each call, because updating a line of text is
58
+ * informative where restarting an animation is just noise.
59
+ */
60
+ const [droveTool, setDroveTool] = (0, _react.useState)(false);
61
+ (0, _react.useEffect)(() => {
62
+ if (!busy) setDroveTool(false);else if (activeLabel) setDroveTool(true);
63
+ }, [busy, activeLabel]);
64
+
65
+ /**
66
+ * Otto mirrors the subtitle, never contradicts it. This is the one place in
67
+ * the product where a mascot earns continuous presence: the user is waiting
68
+ * on a machine and the header is the only thing reporting on it.
69
+ *
70
+ * `robot` while a tool runs is literal — the agent IS driving the tools.
71
+ */
72
+ const otto = !configured ? "confused" : failed ? "error" : busy ? activeLabel || droveTool ? "robot" : "thinking" : "idle";
73
+ const subtitle = !configured ? "Not set up in this app" : busy ? activeLabel ? `${activeLabel}…` : "Thinking…" : toolCount > 0 ? `Ready · ${toolCount} tool${toolCount === 1 ? "" : "s"} available` : "Ready";
74
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_sharedUi.ModalHeader, {
75
+ children: [onBack ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.ModalHeader.Navigation, {
76
+ onBack: onBack
77
+ }) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
78
+ style: styles.otto,
79
+ testID: "buoy-ask-buoy-otto",
80
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.Otto, {
81
+ state: otto,
82
+ pixelSize: 2,
83
+ tickMs: HEADER_TICK_MS,
84
+ water: false
85
+ })
86
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.ModalHeader.Content, {
87
+ title: "Ask Buoy",
88
+ subtitle: subtitle,
89
+ testID: "buoy-ask-buoy-title"
90
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.ModalHeader.Actions, {
91
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
92
+ testID: "buoy-ask-buoy-reset",
93
+ accessibilityRole: "button",
94
+ accessibilityLabel: "New conversation",
95
+ disabled: !hasMessages,
96
+ onPress: onReset,
97
+ style: [styles.actionBtn, !hasMessages && styles.actionBtnDisabled],
98
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.Plus, {
99
+ size: 14,
100
+ color: hasMessages ? _sharedUi.night.color.textSecondary : _sharedUi.night.color.textTertiary
101
+ })
102
+ })
103
+ })]
104
+ });
105
+ }
106
+ const styles = _reactNative.StyleSheet.create({
107
+ // 32pt of Otto (16 grid × 2pt) reading as the header's status glyph.
108
+ otto: {
109
+ marginRight: 8,
110
+ justifyContent: "center"
111
+ },
112
+ // Same plate as the Console header's action buttons.
113
+ actionBtn: {
114
+ width: 32,
115
+ height: 32,
116
+ borderRadius: 8,
117
+ backgroundColor: _sharedUi.night.color.buttonSurface,
118
+ borderWidth: 1,
119
+ borderColor: _sharedUi.night.color.border,
120
+ alignItems: "center",
121
+ justifyContent: "center"
122
+ },
123
+ actionBtnDisabled: {
124
+ opacity: 0.55
125
+ }
126
+ });
127
+ //# sourceMappingURL=AskBuoyHeader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","require","_reactNative","_sharedUi","_jsxRuntime","HEADER_TICK_MS","AskBuoyHeader","configured","busy","failed","activeLabel","toolCount","hasMessages","onBack","onReset","droveTool","setDroveTool","useState","useEffect","otto","subtitle","jsxs","ModalHeader","children","jsx","Navigation","View","style","styles","testID","Otto","state","pixelSize","tickMs","water","Content","title","Actions","TouchableOpacity","accessibilityRole","accessibilityLabel","disabled","onPress","actionBtn","actionBtnDisabled","Plus","size","color","night","textSecondary","textTertiary","StyleSheet","create","marginRight","justifyContent","width","height","borderRadius","backgroundColor","buttonSurface","borderWidth","borderColor","border","alignItems","opacity"],"sourceRoot":"../../../src","sources":["components/AskBuoyHeader.tsx"],"mappings":";;;;;;AAiBA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AAAoF,IAAAG,WAAA,GAAAH,OAAA;AAnBpF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GACA,MAAMI,cAAc,GAAG,GAAG;AAenB,SAASC,aAAaA,CAAC;EAC5BC,UAAU;EACVC,IAAI;EACJC,MAAM,GAAG,KAAK;EACdC,WAAW;EACXC,SAAS;EACTC,WAAW;E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EAAE,CAAC;IACdC,WAAW,EAAEb,eAAK,CAACD,KAAK,CAACe,MAAM;IAC/BC,UAAU,EAAE,QAAQ;IACpBT,cAAc,EAAE;EAClB,CAAC;EACDV,iBAAiB,EAAE;IAAEoB,OAAO,EAAE;EAAK;AACrC,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "ASK_BUOY_ICON_COLOR", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _floatingToolsCore.ASK_BUOY_ICON_COLOR;
10
+ }
11
+ });
12
+ Object.defineProperty(exports, "AskBuoyIcon", {
13
+ enumerable: true,
14
+ get: function () {
15
+ return _floatingToolsCore.AskBuoyIcon;
16
+ }
17
+ });
18
+ var _floatingToolsCore = require("@buoy-gg/floating-tools-core");
19
+ //# sourceMappingURL=AskBuoyIcon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_floatingToolsCore","require"],"sourceRoot":"../../../src","sources":["components/AskBuoyIcon.tsx"],"mappings":";;;;;;;;;;;;;;;;;AAIA,IAAAA,kBAAA,GAAAC,OAAA","ignoreList":[]}
@@ -0,0 +1,322 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.AskBuoyModal = AskBuoyModal;
7
+ var _react = require("react");
8
+ var _reactNative = require("react-native");
9
+ var _agentCore = require("@buoy-gg/agent-core");
10
+ var _sharedUi = require("@buoy-gg/shared-ui");
11
+ var _blocks = require("../blocks");
12
+ var _ApprovalCard = require("./ApprovalCard");
13
+ var _ChangesBar = require("./ChangesBar");
14
+ var _Composer = require("./Composer");
15
+ var _AskBuoyHeader = require("./AskBuoyHeader");
16
+ var _EmptyState = require("./EmptyState");
17
+ var _MessageList = require("./MessageList");
18
+ var _askBuoyStore = require("../store/askBuoyStore");
19
+ var _useAskBuoy = require("../store/useAskBuoy");
20
+ var _jsxRuntime = require("react/jsx-runtime");
21
+ /**
22
+ * Ask Buoy — the sheet.
23
+ *
24
+ * Manual JsModal chrome rather than the declarative `InstalledApp.modal` path,
25
+ * because `ToolModalShell` forwards neither `footer`/`footerHeight` nor
26
+ * `initialHeight`, and a conversation in a 400pt sheet with no sticky composer
27
+ * is not usable.
28
+ *
29
+ * The layout rules here are all learned ones, each noted at its line: one
30
+ * scroller owned by the message list, no animated background competing with
31
+ * streaming text, transparent containers so the sheet's own chrome shows, and
32
+ * an iOS-only keyboard offset.
33
+ *
34
+ * Top to bottom: header (title, live status, new-conversation) · changes bar
35
+ * (only once something has been changed) · transcript · approval card (only
36
+ * with `requireApproval`) · composer. Nothing else. The old "New conversation"
37
+ * text link under the composer is gone — it is the header's + button now.
38
+ */
39
+
40
+ function AskBuoyModal({
41
+ visible,
42
+ onClose,
43
+ onBack,
44
+ onMinimize,
45
+ persistenceKey,
46
+ config
47
+ }) {
48
+ const {
49
+ state,
50
+ send,
51
+ stop,
52
+ reset,
53
+ approve,
54
+ retry,
55
+ answer,
56
+ runAction,
57
+ configured,
58
+ toolCount
59
+ } = (0, _useAskBuoy.useAskBuoy)(config);
60
+ const [changesOpen, setChangesOpen] = (0, _react.useState)(false);
61
+ // A hardcoded device map, not the native library — an unmapped phone
62
+ // silently returns bottom: 0, which is how footers ended up sitting on the
63
+ // home indicator.
64
+ const insets = (0, _sharedUi.useSafeAreaInsets)({
65
+ minBottom: 16
66
+ });
67
+
68
+ /**
69
+ * `dispatchToolAction` is imported STATICALLY at the top of this file, not
70
+ * with `import()`. A dynamic import here resolves through Metro's
71
+ * async-require path, which in a lazy dev bundle rejects with "Expected
72
+ * HMRClient.setup() call at startup" — and because the promise was voided,
73
+ * Undo did nothing at all while the bar went on claiming the changes were
74
+ * undoable. shared-ui is already a static dependency of this component.
75
+ *
76
+ * A failed revert is SHOWN. `revertAll` reports what it could not put back,
77
+ * and swallowing that is the same failure in a quieter form: the whole
78
+ * reason mutations may auto-run is that undo is real.
79
+ */
80
+ const undoAll = (0, _react.useCallback)(() => {
81
+ const ledger = _askBuoyStore.askBuoyStore.getLedger();
82
+ if (!ledger) return;
83
+ void (async () => {
84
+ const outcome = await ledger.revertAll(_sharedUi.dispatchToolAction);
85
+ if (outcome.failed.length === 0) {
86
+ _askBuoyStore.askBuoyStore.setNotice(null);
87
+ return;
88
+ }
89
+ const detail = outcome.failed.map(f => `${f.label} (${f.error})`).join("; ");
90
+ _askBuoyStore.askBuoyStore.setNotice(`Couldn't undo ${outcome.failed.length} change${outcome.failed.length === 1 ? "" : "s"} — ${detail}`);
91
+ })();
92
+ }, []);
93
+ const toggleChanges = (0, _react.useCallback)(() => setChangesOpen(v => !v), []);
94
+
95
+ /**
96
+ * PEEK. When the agent navigates or taps, the sheet drops to a 120pt strip
97
+ * for ~2.5s so the user watches the app do it, then springs back to the
98
+ * height it had (including a user's drag-resize — the value is read live,
99
+ * never assumed). Rides JsModal's external `animatedHeight` seam, so the
100
+ * modal's own drag-resize keeps working on the same value.
101
+ */
102
+ const sheetHeight = (0, _react.useRef)(new _reactNative.Animated.Value(560)).current;
103
+ const peeking = (0, _react.useRef)(false);
104
+ const runPeek = (0, _react.useCallback)(() => {
105
+ if (peeking.current) return;
106
+ peeking.current = true;
107
+ sheetHeight.stopAnimation(from => {
108
+ const restoreTo = typeof from === "number" && from > 200 ? from : 560;
109
+ _reactNative.Animated.timing(sheetHeight, {
110
+ toValue: 120,
111
+ duration: 220,
112
+ useNativeDriver: false
113
+ }).start(() => {
114
+ setTimeout(() => {
115
+ _reactNative.Animated.spring(sheetHeight, {
116
+ toValue: restoreTo,
117
+ friction: 9,
118
+ useNativeDriver: false
119
+ }).start(() => {
120
+ peeking.current = false;
121
+ });
122
+ }, 2500);
123
+ });
124
+ });
125
+ }, [sheetHeight]);
126
+
127
+ // A new `peek` receipt (navigate, tap) triggers the shrink. Keyed by
128
+ // message id + count so a fresh assistant message restarts the count.
129
+ const peekKey = (0, _react.useMemo)(() => {
130
+ const last = state.messages[state.messages.length - 1];
131
+ if (!last || last.role !== "assistant") return "";
132
+ const peeks = last.blocks.filter(p => p.block.kind === "peek").length;
133
+ return peeks > 0 ? `${last.id}:${peeks}` : "";
134
+ }, [state.messages]);
135
+ const prevPeekKey = (0, _react.useRef)("");
136
+ (0, _react.useEffect)(() => {
137
+ if (peekKey && peekKey !== prevPeekKey.current && config?.peek !== false) runPeek();
138
+ prevPeekKey.current = peekKey;
139
+ }, [peekKey, runPeek, config]);
140
+
141
+ /**
142
+ * New conversation, guarded. Clearing the session clears the ledger — the
143
+ * ONLY undo surface — while the agent's changes stay live in the app, so
144
+ * with reversible changes outstanding the user chooses their fate first.
145
+ */
146
+ const confirmReset = (0, _react.useCallback)(() => {
147
+ const ledger = _askBuoyStore.askBuoyStore.getLedger();
148
+ const reversible = ledger?.list().filter(e => !e.undoneAt && (0, _agentCore.isReversible)(e.effect)).length ?? 0;
149
+ if (reversible === 0) {
150
+ reset();
151
+ return;
152
+ }
153
+ _reactNative.Alert.alert("Undo changes first?", `Ask Buoy made ${reversible} change${reversible === 1 ? "" : "s"} that can still be undone. Clearing the conversation loses the only automatic undo for ${reversible === 1 ? "it" : "them"}.`, [{
154
+ text: "Undo, then clear",
155
+ onPress: () => {
156
+ void (async () => {
157
+ const l = _askBuoyStore.askBuoyStore.getLedger();
158
+ if (l) await l.revertAll(_sharedUi.dispatchToolAction);
159
+ reset();
160
+ })();
161
+ }
162
+ }, {
163
+ text: "Clear anyway",
164
+ style: "destructive",
165
+ onPress: reset
166
+ }, {
167
+ text: "Cancel",
168
+ style: "cancel"
169
+ }]);
170
+ }, [reset]);
171
+
172
+ // The header's live status: the title of whichever tool call is in flight.
173
+ const activeLabel = (0, _react.useMemo)(() => {
174
+ const last = state.messages[state.messages.length - 1];
175
+ if (!last || last.role !== "assistant" || !last.streaming) return null;
176
+ return last.toolCalls.find(c => c.status === "running")?.label ?? null;
177
+ }, [state.messages]);
178
+
179
+ /**
180
+ * What a block can do in THIS host. `minimize` collapses the sheet to the
181
+ * rail so the user can look at the app (the peek chip). `openTool` has no
182
+ * seam yet, so those buttons don't render here rather than render dead.
183
+ */
184
+ const blockHandlers = (0, _react.useMemo)(() => ({
185
+ answer,
186
+ runAction: (action, blockId) => {
187
+ if (action.minimize) {
188
+ onMinimize?.({
189
+ mode: "bottomSheet"
190
+ });
191
+ return;
192
+ }
193
+ return runAction(action, blockId);
194
+ },
195
+ answered: state.answers,
196
+ actionState: state.actionState,
197
+ busy: state.busy,
198
+ supports: {
199
+ openTool: false,
200
+ minimize: !!onMinimize,
201
+ dispatch: true
202
+ }
203
+ }), [answer, runAction, onMinimize, state.answers, state.actionState, state.busy]);
204
+
205
+ // The last assistant turn carrying an error is the only "it went wrong"
206
+ // signal the header can read; it clears as soon as the next send starts.
207
+ const lastMessage = state.messages[state.messages.length - 1];
208
+ const failed = !state.busy && lastMessage?.role === "assistant" && !!lastMessage.error;
209
+ const header = /*#__PURE__*/(0, _jsxRuntime.jsx)(_AskBuoyHeader.AskBuoyHeader, {
210
+ configured: configured,
211
+ busy: state.busy,
212
+ failed: failed,
213
+ activeLabel: activeLabel,
214
+ toolCount: toolCount,
215
+ hasMessages: state.messages.length > 0,
216
+ onBack: onBack,
217
+ onReset: confirmReset
218
+ });
219
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.JsModal, {
220
+ visible: visible,
221
+ onClose: onClose
222
+ // The message list is the only scroller. JsModal's default wrapper is
223
+ // flexGrow:1, which makes a nested flex:1 scroller resolve against the
224
+ // content and never scroll at all.
225
+ ,
226
+ disableScrollWrapper: true
227
+ // ToolBackground is an animated star field. A chat re-renders on every
228
+ // streamed token; two continuous animations competing is a dropped
229
+ // frame budget for no benefit.
230
+ ,
231
+ background: false,
232
+ initialHeight: 560,
233
+ animatedHeight: sheetHeight,
234
+ header: {
235
+ customContent: header,
236
+ showToggleButton: false
237
+ },
238
+ onBack: onBack,
239
+ onMinimize: onMinimize,
240
+ persistenceKey: persistenceKey ?? "buoy-ask-buoy",
241
+ enablePersistence: true,
242
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_blocks.BlockHandlersProvider, {
243
+ value: blockHandlers,
244
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
245
+ style: [styles.root, {
246
+ paddingBottom: insets.bottom
247
+ }],
248
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ChangesBar.ChangesBar, {
249
+ ledger: _askBuoyStore.askBuoyStore.getLedger(),
250
+ onUndoAll: undoAll,
251
+ expanded: changesOpen,
252
+ onToggle: toggleChanges
253
+ }), state.notice && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
254
+ style: styles.notice,
255
+ testID: "buoy-ask-buoy-notice",
256
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.Info, {
257
+ size: 14,
258
+ color: _sharedUi.night.color.info
259
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
260
+ style: styles.noticeText,
261
+ children: state.notice
262
+ })]
263
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.KeyboardAvoidingView, {
264
+ style: styles.flex
265
+ // iOS only: Android's default softwareKeyboardLayoutMode is "resize",
266
+ // so the window shrinks and a bottom-anchored view rides up already.
267
+ // Padding on both would lift the composer twice.
268
+ ,
269
+ behavior: _reactNative.Platform.OS === "ios" ? "padding" : undefined,
270
+ enabled: _reactNative.Platform.OS === "ios",
271
+ keyboardVerticalOffset: insets.bottom,
272
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_sharedUi.FeatureGate, {
273
+ featureName: "Ask Buoy",
274
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_MessageList.MessageList, {
275
+ messages: state.messages,
276
+ onRetry: retry,
277
+ ListEmptyComponent: /*#__PURE__*/(0, _jsxRuntime.jsx)(_EmptyState.EmptyState, {
278
+ configured: configured,
279
+ onPick: send
280
+ })
281
+ }), state.pending && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ApprovalCard.ApprovalCard, {
282
+ pending: state.pending,
283
+ onAnswer: approve
284
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Composer.Composer, {
285
+ onSend: send,
286
+ onStop: stop,
287
+ busy: state.busy,
288
+ disabled: !configured,
289
+ placeholder: state.queued ? "Queued — sends when this turn finishes" : state.awaitingBlockId ? "Pick an option above, or type…" : undefined
290
+ })]
291
+ })
292
+ })]
293
+ })
294
+ })
295
+ });
296
+ }
297
+ const styles = _reactNative.StyleSheet.create({
298
+ // Transparent or it paints over the sheet's own chrome — the convention is
299
+ // repeated verbatim across every Buoy tool body.
300
+ root: {
301
+ flex: 1,
302
+ backgroundColor: "transparent"
303
+ },
304
+ flex: {
305
+ flex: 1
306
+ },
307
+ notice: {
308
+ flexDirection: "row",
309
+ alignItems: "flex-start",
310
+ gap: 8,
311
+ paddingHorizontal: _sharedUi.night.gutter,
312
+ paddingVertical: 10,
313
+ backgroundColor: _sharedUi.night.color.infoSoft
314
+ },
315
+ noticeText: {
316
+ flex: 1,
317
+ color: _sharedUi.night.color.text,
318
+ fontSize: _sharedUi.night.font.caption,
319
+ lineHeight: 18
320
+ }
321
+ });
322
+ //# sourceMappingURL=AskBuoyModal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","require","_reactNative","_agentCore","_sharedUi","_blocks","_ApprovalCard","_ChangesBar","_Composer","_AskBuoyHeader","_EmptyState","_MessageList","_askBuoyStore","_useAskBuoy","_jsxRuntime","AskBuoyModal","visible","onClose","onBack","onMinimize","persistenceKey","config","state","send","stop","reset","approve","retry","answer","runAction","configured","toolCount","useAskBuoy","changesOpen","setChangesOpen","useState","insets","useSafeAreaInsets","minBottom","undoAll","useCallback","ledger","askBuoyStore","getLedger","outcome","revertAll","dispatchToolAction","failed","length","setNotice","detail","map","f","label","error","join","toggleChanges","v","sheetHeight","useRef","Animated","Value","current","peeking","runPeek","stopAnimation","from","restoreTo","timing","toValue","duration","useNativeDriver","start","setTimeout","spring","friction","peekKey","useMemo","last","messages","role","peeks","blocks","filter","p","block","kind","id","prevPeekKey","useEffect","peek","confirmReset","reversible","list","e","undoneAt","isReversible","effect","Alert","alert","text","onPress","l","style","activeLabel","streaming","toolCalls","find","c","status","blockHandlers","action","blockId","minimize","mode","answered","answers","actionState","busy","supports","openTool","dispatch","lastMessage","header","jsx","AskBuoyHeader","hasMessages","onReset","JsModal","disableScrollWrapper","background","initialHeight","animatedHeight","customContent","showToggleButton","enablePersistence","children","BlockHandlersProvider","value","jsxs","View","styles","root","paddingBottom","bottom","ChangesBar","onUndoAll","expanded","onToggle","notice","testID","Info","size","color","night","info","Text","noticeText","KeyboardAvoidingView","flex","behavior","Platform","OS","undefined","enabled","keyboardVerticalOffset","FeatureGate","featureName","MessageList","onRetry","ListEmptyComponent","EmptyState","onPick","pending","ApprovalCard","onAnswer","Composer","onSend","onStop","disabled","placeholder","queued","awaitingBlockId","StyleSheet","create","backgroundColor","flexDirection","alignItems","gap","paddingHorizontal","gutter","paddingVertical","infoSoft","fontSize","font","caption","lineHeight"],"sourceRoot":"../../../src","sources":["components/AskBuoyModal.tsx"],"mappings":";;;;;;AAkBA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AASA,IAAAE,UAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AAUA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,aAAA,GAAAL,OAAA;AACA,IAAAM,WAAA,GAAAN,OAAA;AACA,IAAAO,SAAA,GAAAP,OAAA;AACA,IAAAQ,cAAA,GAAAR,OAAA;AACA,IAAAS,WAAA,GAAAT,OAAA;AACA,IAAAU,YAAA,GAAAV,OAAA;AACA,IAAAW,aAAA,GAAAX,OAAA;AACA,IAAAY,WAAA,GAAAZ,OAAA;AAAiD,IAAAa,WAAA,GAAAb,OAAA;AA/CjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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