@buoy-gg/ask-buoy 7.0.35 → 7.0.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +35 -8
- package/lib/commonjs/blocks/BlockRenderer.js +13 -1
- package/lib/commonjs/blocks/BlockRenderer.js.map +1 -1
- package/lib/commonjs/blocks/DataBlocks.js +126 -33
- package/lib/commonjs/blocks/DataBlocks.js.map +1 -1
- package/lib/commonjs/blocks/ExtraBlocks.js +12 -6
- package/lib/commonjs/blocks/ExtraBlocks.js.map +1 -1
- package/lib/commonjs/blocks/MediaBlocks.js +22 -6
- package/lib/commonjs/blocks/MediaBlocks.js.map +1 -1
- package/lib/commonjs/blocks/blockText.js +60 -0
- package/lib/commonjs/blocks/blockText.js.map +1 -0
- package/lib/commonjs/blocks/blockText.test.js +53 -0
- package/lib/commonjs/blocks/blockText.test.js.map +1 -0
- package/lib/commonjs/blocks/primitives.js +58 -2
- package/lib/commonjs/blocks/primitives.js.map +1 -1
- package/lib/commonjs/components/ApprovalCard.js +111 -7
- package/lib/commonjs/components/ApprovalCard.js.map +1 -1
- package/lib/commonjs/components/AskBuoyHeader.js +36 -4
- package/lib/commonjs/components/AskBuoyHeader.js.map +1 -1
- package/lib/commonjs/components/AskBuoyModal.js +160 -34
- package/lib/commonjs/components/AskBuoyModal.js.map +1 -1
- package/lib/commonjs/components/AskBuoySettings.js +50 -0
- package/lib/commonjs/components/AskBuoySettings.js.map +1 -1
- package/lib/commonjs/components/Composer.js +94 -14
- package/lib/commonjs/components/Composer.js.map +1 -1
- package/lib/commonjs/components/EmptyState.js +12 -5
- package/lib/commonjs/components/EmptyState.js.map +1 -1
- package/lib/commonjs/components/KeyboardPad.js +80 -0
- package/lib/commonjs/components/KeyboardPad.js.map +1 -0
- package/lib/commonjs/components/Markdown.js +148 -90
- package/lib/commonjs/components/Markdown.js.map +1 -1
- package/lib/commonjs/components/MessageList.js +339 -92
- package/lib/commonjs/components/MessageList.js.map +1 -1
- package/lib/commonjs/components/QueuedMessages.js +145 -0
- package/lib/commonjs/components/QueuedMessages.js.map +1 -0
- package/lib/commonjs/components/markdownParse.js +131 -0
- package/lib/commonjs/components/markdownParse.js.map +1 -0
- package/lib/commonjs/components/markdownParse.test.js +99 -0
- package/lib/commonjs/components/markdownParse.test.js.map +1 -0
- package/lib/commonjs/store/activityGroups.js +110 -0
- package/lib/commonjs/store/activityGroups.js.map +1 -0
- package/lib/commonjs/store/activityGroups.test.js +78 -0
- package/lib/commonjs/store/activityGroups.test.js.map +1 -0
- package/lib/commonjs/store/askBuoySettings.js +7 -2
- package/lib/commonjs/store/askBuoySettings.js.map +1 -1
- package/lib/commonjs/store/askBuoyStore.js +192 -10
- package/lib/commonjs/store/askBuoyStore.js.map +1 -1
- package/lib/commonjs/store/blockPlacement.js +64 -0
- package/lib/commonjs/store/blockPlacement.js.map +1 -0
- package/lib/commonjs/store/blockPlacement.test.js +123 -0
- package/lib/commonjs/store/blockPlacement.test.js.map +1 -0
- package/lib/commonjs/store/queue.test.js +150 -0
- package/lib/commonjs/store/queue.test.js.map +1 -0
- package/lib/commonjs/store/resetConversation.js +77 -0
- package/lib/commonjs/store/resetConversation.js.map +1 -0
- package/lib/commonjs/store/restorePending.test.js +63 -0
- package/lib/commonjs/store/restorePending.test.js.map +1 -0
- package/lib/commonjs/store/suggestions.js +54 -0
- package/lib/commonjs/store/suggestions.js.map +1 -0
- package/lib/commonjs/store/suggestions.test.js +58 -0
- package/lib/commonjs/store/suggestions.test.js.map +1 -0
- package/lib/commonjs/store/systemLine.test.js +77 -0
- package/lib/commonjs/store/systemLine.test.js.map +1 -0
- package/lib/commonjs/store/ticketPrompt.js +17 -0
- package/lib/commonjs/store/ticketPrompt.js.map +1 -0
- package/lib/commonjs/store/transcriptPersistence.js +92 -3
- package/lib/commonjs/store/transcriptPersistence.js.map +1 -1
- package/lib/commonjs/store/transcriptPersistence.test.js +148 -0
- package/lib/commonjs/store/transcriptPersistence.test.js.map +1 -1
- package/lib/commonjs/store/turnRendering.test.js +151 -0
- package/lib/commonjs/store/turnRendering.test.js.map +1 -0
- package/lib/commonjs/store/useAskBuoy.js +271 -49
- package/lib/commonjs/store/useAskBuoy.js.map +1 -1
- package/lib/commonjs/sync/askBuoySyncAdapter.js +25 -4
- package/lib/commonjs/sync/askBuoySyncAdapter.js.map +1 -1
- package/lib/module/blocks/BlockRenderer.js +13 -1
- package/lib/module/blocks/BlockRenderer.js.map +1 -1
- package/lib/module/blocks/DataBlocks.js +128 -35
- package/lib/module/blocks/DataBlocks.js.map +1 -1
- package/lib/module/blocks/ExtraBlocks.js +12 -6
- package/lib/module/blocks/ExtraBlocks.js.map +1 -1
- package/lib/module/blocks/MediaBlocks.js +22 -6
- package/lib/module/blocks/MediaBlocks.js.map +1 -1
- package/lib/module/blocks/blockText.js +55 -0
- package/lib/module/blocks/blockText.js.map +1 -0
- package/lib/module/blocks/blockText.test.js +53 -0
- package/lib/module/blocks/blockText.test.js.map +1 -0
- package/lib/module/blocks/primitives.js +58 -2
- package/lib/module/blocks/primitives.js.map +1 -1
- package/lib/module/components/ApprovalCard.js +113 -9
- package/lib/module/components/ApprovalCard.js.map +1 -1
- package/lib/module/components/AskBuoyHeader.js +37 -5
- package/lib/module/components/AskBuoyHeader.js.map +1 -1
- package/lib/module/components/AskBuoyModal.js +163 -37
- package/lib/module/components/AskBuoyModal.js.map +1 -1
- package/lib/module/components/AskBuoySettings.js +52 -2
- package/lib/module/components/AskBuoySettings.js.map +1 -1
- package/lib/module/components/Composer.js +95 -15
- package/lib/module/components/Composer.js.map +1 -1
- package/lib/module/components/EmptyState.js +12 -5
- package/lib/module/components/EmptyState.js.map +1 -1
- package/lib/module/components/KeyboardPad.js +75 -0
- package/lib/module/components/KeyboardPad.js.map +1 -0
- package/lib/module/components/Markdown.js +149 -90
- package/lib/module/components/Markdown.js.map +1 -1
- package/lib/module/components/MessageList.js +341 -94
- package/lib/module/components/MessageList.js.map +1 -1
- package/lib/module/components/QueuedMessages.js +140 -0
- package/lib/module/components/QueuedMessages.js.map +1 -0
- package/lib/module/components/markdownParse.js +125 -0
- package/lib/module/components/markdownParse.js.map +1 -0
- package/lib/module/components/markdownParse.test.js +98 -0
- package/lib/module/components/markdownParse.test.js.map +1 -0
- package/lib/module/store/activityGroups.js +103 -0
- package/lib/module/store/activityGroups.js.map +1 -0
- package/lib/module/store/activityGroups.test.js +77 -0
- package/lib/module/store/activityGroups.test.js.map +1 -0
- package/lib/module/store/askBuoySettings.js +7 -2
- package/lib/module/store/askBuoySettings.js.map +1 -1
- package/lib/module/store/askBuoyStore.js +190 -10
- package/lib/module/store/askBuoyStore.js.map +1 -1
- package/lib/module/store/blockPlacement.js +59 -0
- package/lib/module/store/blockPlacement.js.map +1 -0
- package/lib/module/store/blockPlacement.test.js +122 -0
- package/lib/module/store/blockPlacement.test.js.map +1 -0
- package/lib/module/store/queue.test.js +149 -0
- package/lib/module/store/queue.test.js.map +1 -0
- package/lib/module/store/resetConversation.js +72 -0
- package/lib/module/store/resetConversation.js.map +1 -0
- package/lib/module/store/restorePending.test.js +62 -0
- package/lib/module/store/restorePending.test.js.map +1 -0
- package/lib/module/store/suggestions.js +49 -0
- package/lib/module/store/suggestions.js.map +1 -0
- package/lib/module/store/suggestions.test.js +57 -0
- package/lib/module/store/suggestions.test.js.map +1 -0
- package/lib/module/store/systemLine.test.js +76 -0
- package/lib/module/store/systemLine.test.js.map +1 -0
- package/lib/module/store/ticketPrompt.js +13 -0
- package/lib/module/store/ticketPrompt.js.map +1 -0
- package/lib/module/store/transcriptPersistence.js +92 -3
- package/lib/module/store/transcriptPersistence.js.map +1 -1
- package/lib/module/store/transcriptPersistence.test.js +148 -0
- package/lib/module/store/transcriptPersistence.test.js.map +1 -1
- package/lib/module/store/turnRendering.test.js +150 -0
- package/lib/module/store/turnRendering.test.js.map +1 -0
- package/lib/module/store/useAskBuoy.js +275 -53
- package/lib/module/store/useAskBuoy.js.map +1 -1
- package/lib/module/sync/askBuoySyncAdapter.js +25 -4
- package/lib/module/sync/askBuoySyncAdapter.js.map +1 -1
- package/lib/typescript/blocks/BlockRenderer.d.ts.map +1 -1
- package/lib/typescript/blocks/DataBlocks.d.ts +11 -0
- package/lib/typescript/blocks/DataBlocks.d.ts.map +1 -1
- package/lib/typescript/blocks/ExtraBlocks.d.ts +18 -2
- package/lib/typescript/blocks/ExtraBlocks.d.ts.map +1 -1
- package/lib/typescript/blocks/MediaBlocks.d.ts.map +1 -1
- package/lib/typescript/blocks/blockText.d.ts +14 -0
- package/lib/typescript/blocks/blockText.d.ts.map +1 -0
- package/lib/typescript/blocks/blockText.test.d.ts +2 -0
- package/lib/typescript/blocks/blockText.test.d.ts.map +1 -0
- package/lib/typescript/blocks/primitives.d.ts +16 -1
- package/lib/typescript/blocks/primitives.d.ts.map +1 -1
- package/lib/typescript/components/ApprovalCard.d.ts.map +1 -1
- package/lib/typescript/components/AskBuoyHeader.d.ts +31 -1
- package/lib/typescript/components/AskBuoyHeader.d.ts.map +1 -1
- package/lib/typescript/components/AskBuoyModal.d.ts.map +1 -1
- package/lib/typescript/components/AskBuoySettings.d.ts.map +1 -1
- package/lib/typescript/components/Composer.d.ts +16 -1
- package/lib/typescript/components/Composer.d.ts.map +1 -1
- package/lib/typescript/components/EmptyState.d.ts +5 -1
- package/lib/typescript/components/EmptyState.d.ts.map +1 -1
- package/lib/typescript/components/KeyboardPad.d.ts +33 -0
- package/lib/typescript/components/KeyboardPad.d.ts.map +1 -0
- package/lib/typescript/components/Markdown.d.ts +0 -10
- package/lib/typescript/components/Markdown.d.ts.map +1 -1
- package/lib/typescript/components/MessageList.d.ts +7 -2
- package/lib/typescript/components/MessageList.d.ts.map +1 -1
- package/lib/typescript/components/QueuedMessages.d.ts +10 -0
- package/lib/typescript/components/QueuedMessages.d.ts.map +1 -0
- package/lib/typescript/components/markdownParse.d.ts +49 -0
- package/lib/typescript/components/markdownParse.d.ts.map +1 -0
- package/lib/typescript/components/markdownParse.test.d.ts +2 -0
- package/lib/typescript/components/markdownParse.test.d.ts.map +1 -0
- package/lib/typescript/store/activityGroups.d.ts +29 -0
- package/lib/typescript/store/activityGroups.d.ts.map +1 -0
- package/lib/typescript/store/activityGroups.test.d.ts +2 -0
- package/lib/typescript/store/activityGroups.test.d.ts.map +1 -0
- package/lib/typescript/store/askBuoySettings.d.ts +22 -0
- package/lib/typescript/store/askBuoySettings.d.ts.map +1 -1
- package/lib/typescript/store/askBuoyStore.d.ts +142 -5
- package/lib/typescript/store/askBuoyStore.d.ts.map +1 -1
- package/lib/typescript/store/blockPlacement.d.ts +30 -0
- package/lib/typescript/store/blockPlacement.d.ts.map +1 -0
- package/lib/typescript/store/blockPlacement.test.d.ts +2 -0
- package/lib/typescript/store/blockPlacement.test.d.ts.map +1 -0
- package/lib/typescript/store/queue.test.d.ts +2 -0
- package/lib/typescript/store/queue.test.d.ts.map +1 -0
- package/lib/typescript/store/resetConversation.d.ts +38 -0
- package/lib/typescript/store/resetConversation.d.ts.map +1 -0
- package/lib/typescript/store/restorePending.test.d.ts +2 -0
- package/lib/typescript/store/restorePending.test.d.ts.map +1 -0
- package/lib/typescript/store/suggestions.d.ts +32 -0
- package/lib/typescript/store/suggestions.d.ts.map +1 -0
- package/lib/typescript/store/suggestions.test.d.ts +2 -0
- package/lib/typescript/store/suggestions.test.d.ts.map +1 -0
- package/lib/typescript/store/systemLine.test.d.ts +2 -0
- package/lib/typescript/store/systemLine.test.d.ts.map +1 -0
- package/lib/typescript/store/ticketPrompt.d.ts +11 -0
- package/lib/typescript/store/ticketPrompt.d.ts.map +1 -0
- package/lib/typescript/store/transcriptPersistence.d.ts +41 -2
- package/lib/typescript/store/transcriptPersistence.d.ts.map +1 -1
- package/lib/typescript/store/turnRendering.test.d.ts +2 -0
- package/lib/typescript/store/turnRendering.test.d.ts.map +1 -0
- package/lib/typescript/store/useAskBuoy.d.ts +23 -1
- package/lib/typescript/store/useAskBuoy.d.ts.map +1 -1
- package/lib/typescript/sync/askBuoySyncAdapter.d.ts +26 -6
- package/lib/typescript/sync/askBuoySyncAdapter.d.ts.map +1 -1
- package/package.json +9 -9
|
@@ -12,11 +12,14 @@ var _blocks = require("../blocks");
|
|
|
12
12
|
var _ApprovalCard = require("./ApprovalCard");
|
|
13
13
|
var _ChangesBar = require("./ChangesBar");
|
|
14
14
|
var _Composer = require("./Composer");
|
|
15
|
+
var _KeyboardPad = require("./KeyboardPad");
|
|
15
16
|
var _AskBuoyHeader = require("./AskBuoyHeader");
|
|
16
17
|
var _AskBuoySettings = require("./AskBuoySettings");
|
|
17
18
|
var _EmptyState = require("./EmptyState");
|
|
18
19
|
var _MessageList = require("./MessageList");
|
|
20
|
+
var _QueuedMessages = require("./QueuedMessages");
|
|
19
21
|
var _askBuoyStore = require("../store/askBuoyStore");
|
|
22
|
+
var _ticketPrompt = require("../store/ticketPrompt");
|
|
20
23
|
var _useAskBuoy = require("../store/useAskBuoy");
|
|
21
24
|
var _useAskBuoySettings = require("../store/useAskBuoySettings");
|
|
22
25
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -52,20 +55,122 @@ function AskBuoyModal({
|
|
|
52
55
|
send,
|
|
53
56
|
stop,
|
|
54
57
|
reset,
|
|
58
|
+
undoThenReset,
|
|
55
59
|
approve,
|
|
56
60
|
retry,
|
|
57
61
|
answer,
|
|
58
62
|
runAction,
|
|
63
|
+
editQueued,
|
|
64
|
+
removeQueued,
|
|
59
65
|
configured,
|
|
60
|
-
toolCount
|
|
66
|
+
toolCount,
|
|
67
|
+
availableToolIds
|
|
61
68
|
} = (0, _useAskBuoy.useAskBuoy)(config);
|
|
62
69
|
const [changesOpen, setChangesOpen] = (0, _react.useState)(false);
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Closing the sheet stops the turn.
|
|
73
|
+
*
|
|
74
|
+
* It did not, and the turn had no Stop left once the window was gone: closed
|
|
75
|
+
* mid-answer, the agent ran on invisibly — finishing tool calls and writing
|
|
76
|
+
* a full reply into a transcript nobody was watching. Dismissing the chat is
|
|
77
|
+
* the most natural "make it stop" gesture there is, and tool calls CHANGE
|
|
78
|
+
* THE APP, so a turn nobody can see or halt is the wrong thing to leave
|
|
79
|
+
* running. Minimise is the affordance for "keep going while I look" — that
|
|
80
|
+
* one deliberately does not stop anything.
|
|
81
|
+
*/
|
|
82
|
+
const closeAndStop = (0, _react.useCallback)(() => {
|
|
83
|
+
stop();
|
|
84
|
+
onClose();
|
|
85
|
+
}, [stop, onClose]);
|
|
86
|
+
const takeDraft = (0, _react.useCallback)(() => _askBuoyStore.askBuoyStore.clearDraft(), []);
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Settings replaces the transcript in place rather than opening over it. The
|
|
90
|
+
* sheet's own back arrow is the way out, and the conversation is untouched
|
|
91
|
+
* underneath — a toggle you flip here should be visible the moment you go
|
|
92
|
+
* back, not after dismissing something.
|
|
93
|
+
*/
|
|
94
|
+
const [showSettings, setShowSettings] = (0, _react.useState)(false);
|
|
95
|
+
const closeSettings = (0, _react.useCallback)(() => setShowSettings(false), []);
|
|
96
|
+
const openSettings = (0, _react.useCallback)(() => setShowSettings(true), []);
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* An approval that arrives while the sheet is hidden HOLDS, and the rail says
|
|
100
|
+
* so.
|
|
101
|
+
*
|
|
102
|
+
* It used to auto-decline: minimised, the card was simply not on screen —
|
|
103
|
+
* the host keeps this component mounted with `visible={false}` — so the turn
|
|
104
|
+
* parked on a promise nobody could answer, and failing safe meant declining
|
|
105
|
+
* the change and ending the turn. Which made minimise mean "stop", the
|
|
106
|
+
* opposite of what it is for ("keep going while I look at the app").
|
|
107
|
+
*
|
|
108
|
+
* Now the chip in the minimised rail gets a badge — "!" for needs-input, a
|
|
109
|
+
* dot for finished or failed — through the `setToolAttention` seam, and
|
|
110
|
+
* tapping the chip is the existing restore path, so the card is one tap
|
|
111
|
+
* away rather than gone. The approval wait is already excluded from the
|
|
112
|
+
* turn's deadline, so holding costs nothing. Closing the sheet still stops.
|
|
113
|
+
*
|
|
114
|
+
* The settings view hides the card while `visible` stays true, so a question
|
|
115
|
+
* arriving there flips back to the chat: a card you cannot see is the
|
|
116
|
+
* original bug in a different coat.
|
|
117
|
+
*/
|
|
118
|
+
const hidden = !visible;
|
|
119
|
+
const awaitingUser = !!state.pending || !!state.awaitingBlockId;
|
|
120
|
+
const lastMessage = state.messages[state.messages.length - 1];
|
|
121
|
+
const finishedWhileHidden = (0, _react.useRef)(false);
|
|
122
|
+
const wasBusy = (0, _react.useRef)(state.busy);
|
|
123
|
+
(0, _react.useEffect)(() => {
|
|
124
|
+
if (hidden && wasBusy.current && !state.busy) finishedWhileHidden.current = true;
|
|
125
|
+
if (!hidden) finishedWhileHidden.current = false;
|
|
126
|
+
wasBusy.current = state.busy;
|
|
127
|
+
}, [hidden, state.busy]);
|
|
128
|
+
(0, _react.useEffect)(() => {
|
|
129
|
+
if (!hidden) {
|
|
130
|
+
(0, _sharedUi.setToolAttention)("ask-buoy", null);
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
if (awaitingUser) {
|
|
134
|
+
(0, _sharedUi.setToolAttention)("ask-buoy", {
|
|
135
|
+
kind: "needsInput",
|
|
136
|
+
label: state.pending ? "Needs your approval" : "Has a question for you"
|
|
137
|
+
});
|
|
138
|
+
} else if (finishedWhileHidden.current && lastMessage?.role === "assistant" && lastMessage.error) {
|
|
139
|
+
(0, _sharedUi.setToolAttention)("ask-buoy", {
|
|
140
|
+
kind: "failed",
|
|
141
|
+
label: "The last turn failed"
|
|
142
|
+
});
|
|
143
|
+
} else if (finishedWhileHidden.current && !state.busy) {
|
|
144
|
+
(0, _sharedUi.setToolAttention)("ask-buoy", {
|
|
145
|
+
kind: "done",
|
|
146
|
+
label: "Finished"
|
|
147
|
+
});
|
|
148
|
+
} else {
|
|
149
|
+
(0, _sharedUi.setToolAttention)("ask-buoy", null);
|
|
150
|
+
}
|
|
151
|
+
}, [hidden, awaitingUser, state.busy, state.pending, lastMessage]);
|
|
152
|
+
(0, _react.useEffect)(() => () => (0, _sharedUi.setToolAttention)("ask-buoy", null), []);
|
|
153
|
+
(0, _react.useEffect)(() => {
|
|
154
|
+
if (state.pending && showSettings) setShowSettings(false);
|
|
155
|
+
}, [state.pending, showSettings]);
|
|
63
156
|
// A hardcoded device map, not the native library — an unmapped phone
|
|
64
157
|
// silently returns bottom: 0, which is how footers ended up sitting on the
|
|
65
158
|
// home indicator.
|
|
66
159
|
const insets = (0, _sharedUi.useSafeAreaInsets)({
|
|
67
160
|
minBottom: 16
|
|
68
161
|
});
|
|
162
|
+
/**
|
|
163
|
+
* The safe-area inset is for the HOME INDICATOR, and only a bottom sheet
|
|
164
|
+
* touches it. A floating window is positioned away from the screen edge and
|
|
165
|
+
* clips its own rounded corner, so the same padding is just a band of dead
|
|
166
|
+
* space under the composer in the smallest layout the tool has.
|
|
167
|
+
*
|
|
168
|
+
* JsModal owns the mode (it restores a persisted one on mount and reports it
|
|
169
|
+
* here), so this mirrors rather than decides. Default matches JsModal's own:
|
|
170
|
+
* a sheet until told otherwise.
|
|
171
|
+
*/
|
|
172
|
+
const [mode, setMode] = (0, _react.useState)("bottomSheet");
|
|
173
|
+
const bottomInset = mode === "floating" ? 0 : insets.bottom;
|
|
69
174
|
|
|
70
175
|
/**
|
|
71
176
|
* `dispatchToolAction` is imported STATICALLY at the top of this file, not
|
|
@@ -144,6 +249,12 @@ function AskBuoyModal({
|
|
|
144
249
|
* New conversation, guarded. Clearing the session clears the ledger — the
|
|
145
250
|
* ONLY undo surface — while the agent's changes stay live in the app, so
|
|
146
251
|
* with reversible changes outstanding the user chooses their fate first.
|
|
252
|
+
*
|
|
253
|
+
* "Undo, then clear" reads the outcome. It did not: two of five reverts
|
|
254
|
+
* would fail (a key changed since) and the conversation cleared anyway,
|
|
255
|
+
* leaving two changes live with no record. Now a failed undo keeps the
|
|
256
|
+
* conversation and names what is still applied; clearing is a second,
|
|
257
|
+
* explicit tap. See resetConversation.ts.
|
|
147
258
|
*/
|
|
148
259
|
const confirmReset = (0, _react.useCallback)(() => {
|
|
149
260
|
const ledger = _askBuoyStore.askBuoyStore.getLedger();
|
|
@@ -156,9 +267,18 @@ function AskBuoyModal({
|
|
|
156
267
|
text: "Undo, then clear",
|
|
157
268
|
onPress: () => {
|
|
158
269
|
void (async () => {
|
|
159
|
-
const
|
|
160
|
-
if (
|
|
161
|
-
|
|
270
|
+
const outcome = await undoThenReset();
|
|
271
|
+
if (outcome.cleared) return;
|
|
272
|
+
const total = outcome.reverted + outcome.failed.length;
|
|
273
|
+
const stillApplied = outcome.failed.map(f => `${f.label} (${f.error})`).join("\n");
|
|
274
|
+
_reactNative.Alert.alert(`Couldn't undo ${outcome.failed.length} of ${total} change${total === 1 ? "" : "s"}`, `${stillApplied}\n\nStill applied in the app. Clear the conversation anyway?`, [{
|
|
275
|
+
text: "Keep conversation",
|
|
276
|
+
style: "cancel"
|
|
277
|
+
}, {
|
|
278
|
+
text: "Clear anyway",
|
|
279
|
+
style: "destructive",
|
|
280
|
+
onPress: reset
|
|
281
|
+
}]);
|
|
162
282
|
})();
|
|
163
283
|
}
|
|
164
284
|
}, {
|
|
@@ -169,7 +289,7 @@ function AskBuoyModal({
|
|
|
169
289
|
text: "Cancel",
|
|
170
290
|
style: "cancel"
|
|
171
291
|
}]);
|
|
172
|
-
}, [reset]);
|
|
292
|
+
}, [reset, undoThenReset]);
|
|
173
293
|
|
|
174
294
|
// The header's live status: the title of whichever tool call is in flight.
|
|
175
295
|
const activeLabel = (0, _react.useMemo)(() => {
|
|
@@ -206,25 +326,24 @@ function AskBuoyModal({
|
|
|
206
326
|
|
|
207
327
|
// The last assistant turn carrying an error is the only "it went wrong"
|
|
208
328
|
// signal the header can read; it clears as soon as the next send starts.
|
|
209
|
-
const lastMessage = state.messages[state.messages.length - 1];
|
|
210
329
|
const failed = !state.busy && lastMessage?.role === "assistant" && !!lastMessage.error;
|
|
330
|
+
/**
|
|
331
|
+
* Stop invites a redirect. The turn just ended because the user said so;
|
|
332
|
+
* the likeliest next move is "do this instead", not "do that again" — so
|
|
333
|
+
* the composer takes focus with that prompt. Keyed by the stopped message so
|
|
334
|
+
* it happens once per stop, and only while the sheet is on screen.
|
|
335
|
+
*/
|
|
336
|
+
const redirectKey = !state.busy && lastMessage?.role === "assistant" && lastMessage.stopped && !lastMessage.error ? lastMessage.id : null;
|
|
337
|
+
const queuePaused = (0, _askBuoyStore.queuePauseReason)(state);
|
|
211
338
|
|
|
212
339
|
// Built on press, not on render — a streaming answer would otherwise rebuild
|
|
213
340
|
// the whole transcript on every frame for a button nobody tapped.
|
|
214
341
|
const {
|
|
215
|
-
showThinking
|
|
342
|
+
showThinking,
|
|
343
|
+
readOnly
|
|
216
344
|
} = (0, _useAskBuoySettings.useAskBuoySettings)();
|
|
217
345
|
const getTranscript = (0, _react.useCallback)(() => (0, _MessageList.transcriptToText)(state.messages, showThinking), [state.messages, showThinking]);
|
|
218
|
-
|
|
219
|
-
/**
|
|
220
|
-
* Settings replaces the transcript in place rather than opening over it. The
|
|
221
|
-
* sheet's own back arrow is the way out, and the conversation is untouched
|
|
222
|
-
* underneath — a toggle you flip here should be visible the moment you go
|
|
223
|
-
* back, not after dismissing something.
|
|
224
|
-
*/
|
|
225
|
-
const [showSettings, setShowSettings] = (0, _react.useState)(false);
|
|
226
|
-
const closeSettings = (0, _react.useCallback)(() => setShowSettings(false), []);
|
|
227
|
-
const openSettings = (0, _react.useCallback)(() => setShowSettings(true), []);
|
|
346
|
+
const requestTicket = (0, _react.useCallback)(() => send(_ticketPrompt.TICKET_PROMPT), [send]);
|
|
228
347
|
const header = showSettings ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_sharedUi.ModalHeader, {
|
|
229
348
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.ModalHeader.Navigation, {
|
|
230
349
|
onBack: closeSettings
|
|
@@ -238,16 +357,21 @@ function AskBuoyModal({
|
|
|
238
357
|
busy: state.busy,
|
|
239
358
|
failed: failed,
|
|
240
359
|
activeLabel: activeLabel,
|
|
360
|
+
awaitingApproval: !!state.pending,
|
|
361
|
+
startedAt: lastMessage?.role === "assistant" && lastMessage.streaming ? lastMessage.startedAt ?? null : null,
|
|
362
|
+
stopping: state.stopping,
|
|
363
|
+
readOnly: readOnly,
|
|
241
364
|
toolCount: toolCount,
|
|
242
365
|
hasMessages: state.messages.length > 0,
|
|
243
366
|
onBack: onBack,
|
|
244
367
|
onReset: confirmReset,
|
|
245
368
|
getTranscript: getTranscript,
|
|
246
|
-
onOpenSettings: openSettings
|
|
369
|
+
onOpenSettings: openSettings,
|
|
370
|
+
onTicket: requestTicket
|
|
247
371
|
});
|
|
248
372
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.JsModal, {
|
|
249
373
|
visible: visible,
|
|
250
|
-
onClose:
|
|
374
|
+
onClose: closeAndStop
|
|
251
375
|
// The message list is the only scroller. JsModal's default wrapper is
|
|
252
376
|
// flexGrow:1, which makes a nested flex:1 scroller resolve against the
|
|
253
377
|
// content and never scroll at all.
|
|
@@ -266,13 +390,14 @@ function AskBuoyModal({
|
|
|
266
390
|
},
|
|
267
391
|
onBack: onBack,
|
|
268
392
|
onMinimize: onMinimize,
|
|
393
|
+
onModeChange: setMode,
|
|
269
394
|
persistenceKey: persistenceKey ?? "buoy-ask-buoy",
|
|
270
395
|
enablePersistence: true,
|
|
271
396
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_blocks.BlockHandlersProvider, {
|
|
272
397
|
value: blockHandlers,
|
|
273
398
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
274
399
|
style: [styles.root, {
|
|
275
|
-
paddingBottom:
|
|
400
|
+
paddingBottom: bottomInset
|
|
276
401
|
}],
|
|
277
402
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ChangesBar.ChangesBar, {
|
|
278
403
|
ledger: _askBuoyStore.askBuoyStore.getLedger(),
|
|
@@ -289,25 +414,25 @@ function AskBuoyModal({
|
|
|
289
414
|
style: styles.noticeText,
|
|
290
415
|
children: state.notice
|
|
291
416
|
})]
|
|
292
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
293
|
-
style: styles.flex
|
|
294
|
-
// iOS only: Android's default softwareKeyboardLayoutMode is "resize",
|
|
295
|
-
// so the window shrinks and a bottom-anchored view rides up already.
|
|
296
|
-
// Padding on both would lift the composer twice.
|
|
297
|
-
,
|
|
298
|
-
behavior: _reactNative.Platform.OS === "ios" ? "padding" : undefined,
|
|
299
|
-
enabled: _reactNative.Platform.OS === "ios",
|
|
300
|
-
keyboardVerticalOffset: insets.bottom,
|
|
417
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_KeyboardPad.KeyboardPad, {
|
|
301
418
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.FeatureGate, {
|
|
302
419
|
featureName: "Ask Buoy",
|
|
303
420
|
children: showSettings ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_AskBuoySettings.AskBuoySettings, {}) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
304
421
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_MessageList.MessageList, {
|
|
305
422
|
messages: state.messages,
|
|
306
423
|
onRetry: retry,
|
|
424
|
+
waitingOnUser: !!state.pending || !!state.awaitingBlockId,
|
|
307
425
|
ListEmptyComponent: /*#__PURE__*/(0, _jsxRuntime.jsx)(_EmptyState.EmptyState, {
|
|
308
426
|
configured: configured,
|
|
309
|
-
onPick: send
|
|
427
|
+
onPick: send,
|
|
428
|
+
availableToolIds: availableToolIds,
|
|
429
|
+
readOnly: readOnly || !!config?.policy?.readOnly
|
|
310
430
|
})
|
|
431
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_QueuedMessages.QueuedMessages, {
|
|
432
|
+
items: state.queued,
|
|
433
|
+
paused: queuePaused,
|
|
434
|
+
onEdit: editQueued,
|
|
435
|
+
onRemove: removeQueued
|
|
311
436
|
}), state.pending && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ApprovalCard.ApprovalCard, {
|
|
312
437
|
pending: state.pending,
|
|
313
438
|
onAnswer: approve
|
|
@@ -315,8 +440,12 @@ function AskBuoyModal({
|
|
|
315
440
|
onSend: send,
|
|
316
441
|
onStop: stop,
|
|
317
442
|
busy: state.busy,
|
|
443
|
+
draft: state.draft,
|
|
444
|
+
onDraftTaken: takeDraft,
|
|
318
445
|
disabled: !configured,
|
|
319
|
-
|
|
446
|
+
focusKey: redirectKey,
|
|
447
|
+
canFocus: visible,
|
|
448
|
+
placeholder: redirectKey ? "Tell it what to do differently…" : state.awaitingBlockId ? "Pick an option above, or type…" : undefined
|
|
320
449
|
})]
|
|
321
450
|
})
|
|
322
451
|
})
|
|
@@ -332,9 +461,6 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
332
461
|
flex: 1,
|
|
333
462
|
backgroundColor: "transparent"
|
|
334
463
|
},
|
|
335
|
-
flex: {
|
|
336
|
-
flex: 1
|
|
337
|
-
},
|
|
338
464
|
notice: {
|
|
339
465
|
flexDirection: "row",
|
|
340
466
|
alignItems: "flex-start",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNative","_agentCore","_sharedUi","_blocks","_ApprovalCard","_ChangesBar","_Composer","_AskBuoyHeader","_AskBuoySettings","_EmptyState","_MessageList","_askBuoyStore","_useAskBuoy","_useAskBuoySettings","_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","showThinking","useAskBuoySettings","getTranscript","transcriptToText","showSettings","setShowSettings","closeSettings","openSettings","header","jsxs","ModalHeader","children","jsx","Navigation","Content","title","subtitle","testID","AskBuoyHeader","hasMessages","onReset","onOpenSettings","JsModal","disableScrollWrapper","background","initialHeight","animatedHeight","customContent","showToggleButton","enablePersistence","BlockHandlersProvider","value","View","styles","root","paddingBottom","bottom","ChangesBar","onUndoAll","expanded","onToggle","notice","Info","size","color","night","info","Text","noticeText","KeyboardAvoidingView","flex","behavior","Platform","OS","undefined","enabled","keyboardVerticalOffset","FeatureGate","featureName","AskBuoySettings","Fragment","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;AAWA,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,gBAAA,GAAAT,OAAA;AACA,IAAAU,WAAA,GAAAV,OAAA;AACA,IAAAW,YAAA,GAAAX,OAAA;AACA,IAAAY,aAAA,G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,CAACuK,OAAQ;gBAACE,QAAQ,EAAErK;cAAQ,CAAE,CAAC,eAE7E,IAAAZ,WAAA,CAAAyH,GAAA,EAACjI,SAAA,CAAA0L,QAAQ;gBACPC,MAAM,EAAE1K,IAAK;gBACb2K,MAAM,EAAE1K,IAAK;gBACb8F,IAAI,EAAEhG,KAAK,CAACgG,IAAK;gBACjB6E,QAAQ,EAAE,CAACrK,UAAW;gBACtBsK,WAAW,EACT9K,KAAK,CAAC+K,MAAM,GACR,wCAAwC,GACxC/K,KAAK,CAACgL,eAAe,GACnB,gCAAgC,GAChCrB;cACP,CACF,CAAC;YAAA,CACF;UACH,CACU;QAAC,CACM,CAAC;MAAA,CACnB;IAAC,CACgB;EAAC,CACjB,CAAC;AAEd;AAEA,MAAMrB,MAAM,GAAG2C,uBAAU,CAACC,MAAM,CAAC;EAC/B;EACA;EACA3C,IAAI,EAAE;IAAEgB,IAAI,EAAE,CAAC;IAAE4B,eAAe,EAAE;EAAc,CAAC;EACjD5B,IAAI,EAAE;IAAEA,IAAI,EAAE;EAAE,CAAC;EACjBT,MAAM,EAAE;IACNsC,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE,YAAY;IACxBC,GAAG,EAAE,CAAC;IACNC,iBAAiB,EAAErC,eAAK,CAACsC,MAAM;IAC/BC,eAAe,EAAE,EAAE;IACnBN,eAAe,EAAEjC,eAAK,CAACD,KAAK,CAACyC;EAC/B,CAAC;EACDrC,UAAU,EAAE;IACVE,IAAI,EAAE,CAAC;IACPN,KAAK,EAAEC,eAAK,CAACD,KAAK,CAACnE,IAAI;IACvB6G,QAAQ,EAAEzC,eAAK,CAAC0C,IAAI,CAACC,OAAO;IAC5BC,UAAU,EAAE;EACd;AACF,CAAC,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_agentCore","_sharedUi","_blocks","_ApprovalCard","_ChangesBar","_Composer","_KeyboardPad","_AskBuoyHeader","_AskBuoySettings","_EmptyState","_MessageList","_QueuedMessages","_askBuoyStore","_ticketPrompt","_useAskBuoy","_useAskBuoySettings","_jsxRuntime","AskBuoyModal","visible","onClose","onBack","onMinimize","persistenceKey","config","state","send","stop","reset","undoThenReset","approve","retry","answer","runAction","editQueued","removeQueued","configured","toolCount","availableToolIds","useAskBuoy","changesOpen","setChangesOpen","useState","closeAndStop","useCallback","takeDraft","askBuoyStore","clearDraft","showSettings","setShowSettings","closeSettings","openSettings","hidden","awaitingUser","pending","awaitingBlockId","lastMessage","messages","length","finishedWhileHidden","useRef","wasBusy","busy","useEffect","current","setToolAttention","kind","label","role","error","insets","useSafeAreaInsets","minBottom","mode","setMode","bottomInset","bottom","undoAll","ledger","getLedger","outcome","revertAll","dispatchToolAction","failed","setNotice","detail","map","f","join","toggleChanges","v","sheetHeight","Animated","Value","peeking","runPeek","stopAnimation","from","restoreTo","timing","toValue","duration","useNativeDriver","start","setTimeout","spring","friction","peekKey","useMemo","last","peeks","blocks","filter","p","block","id","prevPeekKey","peek","confirmReset","reversible","list","e","undoneAt","isReversible","effect","Alert","alert","text","onPress","cleared","total","reverted","stillApplied","style","activeLabel","streaming","toolCalls","find","c","status","blockHandlers","action","blockId","minimize","answered","answers","actionState","supports","openTool","dispatch","redirectKey","stopped","queuePaused","queuePauseReason","showThinking","readOnly","useAskBuoySettings","getTranscript","transcriptToText","requestTicket","TICKET_PROMPT","header","jsxs","ModalHeader","children","jsx","Navigation","Content","title","subtitle","testID","AskBuoyHeader","awaitingApproval","startedAt","stopping","hasMessages","onReset","onOpenSettings","onTicket","JsModal","disableScrollWrapper","background","initialHeight","animatedHeight","customContent","showToggleButton","onModeChange","enablePersistence","BlockHandlersProvider","value","View","styles","root","paddingBottom","ChangesBar","onUndoAll","expanded","onToggle","notice","Info","size","color","night","info","Text","noticeText","KeyboardPad","FeatureGate","featureName","AskBuoySettings","Fragment","MessageList","onRetry","waitingOnUser","ListEmptyComponent","EmptyState","onPick","policy","QueuedMessages","items","queued","paused","onEdit","onRemove","ApprovalCard","onAnswer","Composer","onSend","onStop","draft","onDraftTaken","disabled","focusKey","canFocus","placeholder","undefined","StyleSheet","create","flex","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;AAOA,IAAAE,UAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AAYA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,aAAA,GAAAL,OAAA;AACA,IAAAM,WAAA,GAAAN,OAAA;AACA,IAAAO,SAAA,GAAAP,OAAA;AACA,IAAAQ,YAAA,GAAAR,OAAA;AACA,IAAAS,cAAA,GAAAT,OAAA;AACA,IAAAU,gBAAA,GAAAV,OAAA;AACA,IAAAW,WAAA,GAAAX,OAAA;AACA,IAAAY,YAAA,GAAAZ,OAAA;AACA,IAAAa,eAAA,GAAAb,OAAA;AACA,IAAAc,aAAA,GAAAd,OAAA;AACA,IAAAe,aAAA,GAAAf,OAAA;AACA,IAAAgB,WAAA,GAAAhB,OAAA;AACA,IAAAiB,mBAAA,GAAAjB,OAAA;AAAiE,IAAAkB,WAAA,GAAAlB,OAAA;AApDjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAgDO,SAASmB,YAAYA,CAAC;EAC3BC,OAAO;EACPC,OAAO;EACPC,MAAM;EACNC,UAAU;EACVC,cAAc;EACdC;AACiB,CAAC,EAAE;EACpB,MAAM;IACJC,KAAK;IACLC,IAAI;IACJC,IAAI;IACJC,KAAK;IACLC,aAAa;IACbC,OAAO;IACPC,KAAK;IACLC,MAAM;IACNC,SAAS;IACTC,UAAU;IACVC,YAAY;IACZC,UAAU;IACVC,SAAS;IACTC;EACF,CAAC,GAAG,IAAAC,sBAAU,EA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,IAAK;gBACjBuK,KAAK,EAAE5M,KAAK,CAAC4M,KAAM;gBACnBC,YAAY,EAAEzL,SAAU;gBACxB0L,QAAQ,EAAE,CAACnM,UAAW;gBACtBoM,QAAQ,EAAElF,WAAY;gBACtBmF,QAAQ,EAAEtN,OAAQ;gBAClBuN,WAAW,EACTpF,WAAW,GACP,iCAAiC,GACjC7H,KAAK,CAAC8B,eAAe,GACnB,gCAAgC,GAChCoL;cACP,CACF,CAAC;YAAA,CACF;UACH,CACU;QAAC,CACH,CAAC;MAAA,CACV;IAAC,CACgB;EAAC,CACjB,CAAC;AAEd;AAEA,MAAM5C,MAAM,GAAG6C,uBAAU,CAACC,MAAM,CAAC;EAC/B;EACA;EACA7C,IAAI,EAAE;IAAE8C,IAAI,EAAE,CAAC;IAAEC,eAAe,EAAE;EAAc,CAAC;EACjDzC,MAAM,EAAE;IACN0C,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE,YAAY;IACxBC,GAAG,EAAE,CAAC;IACNC,iBAAiB,EAAEzC,eAAK,CAAC0C,MAAM;IAC/BC,eAAe,EAAE,EAAE;IACnBN,eAAe,EAAErC,eAAK,CAACD,KAAK,CAAC6C;EAC/B,CAAC;EACDzC,UAAU,EAAE;IACViC,IAAI,EAAE,CAAC;IACPrC,KAAK,EAAEC,eAAK,CAACD,KAAK,CAAC1E,IAAI;IACvBwH,QAAQ,EAAE7C,eAAK,CAAC8C,IAAI,CAACC,OAAO;IAC5BC,UAAU,EAAE;EACd;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -39,6 +39,41 @@ function AskBuoySettings() {
|
|
|
39
39
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
40
40
|
style: styles.note,
|
|
41
41
|
children: "Not every model reports reasoning. Claude thinks by default; most OpenAI models return none, and the strip then shows the steps alone."
|
|
42
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
43
|
+
style: styles.section,
|
|
44
|
+
children: "PERMISSIONS"
|
|
45
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.ToggleRow, {
|
|
46
|
+
testID: "buoy-ask-buoy-setting-readonly",
|
|
47
|
+
label: "Read only",
|
|
48
|
+
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.",
|
|
49
|
+
value: settings.readOnly,
|
|
50
|
+
onValueChange: next => _askBuoySettings.askBuoySettings.set("readOnly", next)
|
|
51
|
+
}), settings.readOnly ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
52
|
+
style: styles.note,
|
|
53
|
+
testID: "buoy-ask-buoy-readonly-note",
|
|
54
|
+
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."
|
|
55
|
+
}) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.ToggleRow, {
|
|
56
|
+
testID: "buoy-ask-buoy-setting-bypass",
|
|
57
|
+
tone: "warning",
|
|
58
|
+
emphasizeLabel: settings.bypassApprovals,
|
|
59
|
+
disabled: settings.readOnly,
|
|
60
|
+
label: "Skip approval prompts",
|
|
61
|
+
description: settings.readOnly ? "Unavailable while Read only is on — nothing can be approved." : "Runs every action the moment the agent calls it, with no Allow card — including the destructive ones that wipe or reset data.",
|
|
62
|
+
value: settings.bypassApprovals,
|
|
63
|
+
onValueChange: next => _askBuoySettings.askBuoySettings.set("bypassApprovals", next)
|
|
64
|
+
}), settings.bypassApprovals && !settings.readOnly ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
65
|
+
style: styles.warning,
|
|
66
|
+
testID: "buoy-ask-buoy-bypass-warning",
|
|
67
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.AlertTriangle, {
|
|
68
|
+
size: 14,
|
|
69
|
+
color: _sharedUi.night.color.warning
|
|
70
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
71
|
+
style: styles.warningText,
|
|
72
|
+
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."
|
|
73
|
+
})]
|
|
74
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
75
|
+
style: styles.note,
|
|
76
|
+
children: "On by default for destructive actions only \u2014 reads and ordinary writes already run without asking, and the changes bar records them."
|
|
42
77
|
})]
|
|
43
78
|
});
|
|
44
79
|
}
|
|
@@ -59,6 +94,21 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
59
94
|
paddingHorizontal: 4,
|
|
60
95
|
paddingTop: 4
|
|
61
96
|
},
|
|
97
|
+
warning: {
|
|
98
|
+
flexDirection: "row",
|
|
99
|
+
gap: 8,
|
|
100
|
+
padding: _sharedUi.night.cardPad,
|
|
101
|
+
borderRadius: _sharedUi.night.radius.card,
|
|
102
|
+
borderWidth: _reactNative.StyleSheet.hairlineWidth,
|
|
103
|
+
borderColor: _sharedUi.night.color.warning,
|
|
104
|
+
backgroundColor: _sharedUi.night.color.surface
|
|
105
|
+
},
|
|
106
|
+
warningText: {
|
|
107
|
+
flex: 1,
|
|
108
|
+
color: _sharedUi.night.color.warning,
|
|
109
|
+
fontSize: _sharedUi.night.font.micro,
|
|
110
|
+
lineHeight: 16
|
|
111
|
+
},
|
|
62
112
|
note: {
|
|
63
113
|
color: _sharedUi.night.color.textTertiary,
|
|
64
114
|
fontSize: _sharedUi.night.font.micro,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","_sharedUi","_useAskBuoySettings","_askBuoySettings","_jsxRuntime","AskBuoySettings","settings","useAskBuoySettings","jsxs","ScrollView","style","styles","scroll","contentContainerStyle","content","testID","children","jsx","Text","section","ToggleRow","label","description","value","showThinking","onValueChange","next","askBuoySettings","set","note","StyleSheet","create","flex","padding","
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_sharedUi","_useAskBuoySettings","_askBuoySettings","_jsxRuntime","AskBuoySettings","settings","useAskBuoySettings","jsxs","ScrollView","style","styles","scroll","contentContainerStyle","content","testID","children","jsx","Text","section","ToggleRow","label","description","value","showThinking","onValueChange","next","askBuoySettings","set","note","readOnly","tone","emphasizeLabel","bypassApprovals","disabled","View","warning","AlertTriangle","size","color","night","warningText","StyleSheet","create","flex","padding","gutter","gap","paddingBottom","textTertiary","fontSize","fontWeight","letterSpacing","paddingHorizontal","paddingTop","flexDirection","cardPad","borderRadius","radius","card","borderWidth","hairlineWidth","borderColor","backgroundColor","surface","font","micro","lineHeight"],"sourceRoot":"../../../src","sources":["components/AskBuoySettings.tsx"],"mappings":";;;;;;AAWA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AAEA,IAAAE,mBAAA,GAAAF,OAAA;AACA,IAAAG,gBAAA,GAAAH,OAAA;AAA2D,IAAAI,WAAA,GAAAJ,OAAA;AAf3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAOO,SAASK,eAAeA,CAAA,EAAG;EAChC,MAAMC,QAAQ,GAAG,IAAAC,sCAAkB,EAAC,CAAC;EACrC,oBACE,IAAAH,WAAA,CAAAI,IAAA,EAACT,YAAA,CAAAU,UAAU;IACTC,KAAK,EAAEC,MAAM,CAACC,MAAO;IACrBC,qBAAqB,EAAEF,MAAM,CAACG,OAAQ;IACtCC,MAAM,EAAC,wBAAwB;IAAAC,QAAA,gBAE/B,IAAAZ,WAAA,CAAAa,GAAA,EAAClB,YAAA,CAAAmB,IAAI;MAACR,KAAK,EAAEC,MAAM,CAACQ,OAAQ;MAAAH,QAAA,EAAC;IAAI,CAAM,CAAC,eACxC,IAAAZ,WAAA,CAAAa,GAAA,EAAChB,SAAA,CAAAmB,SAA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a,EAAE,GAAG;IAClBC,iBAAiB,EAAE,CAAC;IACpBC,UAAU,EAAE;EACd,CAAC;EACDlB,OAAO,EAAE;IACPmB,aAAa,EAAE,KAAK;IACpBR,GAAG,EAAE,CAAC;IACNF,OAAO,EAAEL,eAAK,CAACgB,OAAO;IACtBC,YAAY,EAAEjB,eAAK,CAACkB,MAAM,CAACC,IAAI;IAC/BC,WAAW,EAAElB,uBAAU,CAACmB,aAAa;IACrCC,WAAW,EAAEtB,eAAK,CAACD,KAAK,CAACH,OAAO;IAChC2B,eAAe,EAAEvB,eAAK,CAACD,KAAK,CAACyB;EAC/B,CAAC;EACDvB,WAAW,EAAE;IACXG,IAAI,EAAE,CAAC;IACPL,KAAK,EAAEC,eAAK,CAACD,KAAK,CAACH,OAAO;IAC1Bc,QAAQ,EAAEV,eAAK,CAACyB,IAAI,CAACC,KAAK;IAC1BC,UAAU,EAAE;EACd,CAAC;EACDtC,IAAI,EAAE;IACJU,KAAK,EAAEC,eAAK,CAACD,KAAK,CAACU,YAAY;IAC/BC,QAAQ,EAAEV,eAAK,CAACyB,IAAI,CAACC,KAAK;IAC1BC,UAAU,EAAE,EAAE;IACdd,iBAAiB,EAAE;EACrB;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -19,10 +19,13 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
19
19
|
* comments and pin their inputs to the TOP of the screen. A chat cannot.
|
|
20
20
|
*
|
|
21
21
|
* What makes it work:
|
|
22
|
-
* - `
|
|
23
|
-
*
|
|
24
|
-
* and
|
|
25
|
-
*
|
|
22
|
+
* - `KeyboardPad` (see that file), iOS only. `KeyboardAvoidingView` looked
|
|
23
|
+
* right here and did nothing: it measures its frame relative to its PARENT
|
|
24
|
+
* and compares that with the keyboard's SCREEN position, which never
|
|
25
|
+
* overlap inside a bottom-anchored sheet. On Android Expo's default
|
|
26
|
+
* `softwareKeyboardLayoutMode: "resize"` shrinks the window and a
|
|
27
|
+
* bottom-anchored view rides up for free; adding padding there would lift
|
|
28
|
+
* it twice.
|
|
26
29
|
* - The parent list carries `keyboardShouldPersistTaps="handled"`. Without it
|
|
27
30
|
* the first tap after typing only dismisses the keyboard and Send never
|
|
28
31
|
* fires — a real shipped bug in Time Machine, and invisible to Detox because
|
|
@@ -36,14 +39,39 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
36
39
|
* looked like a disabled control and gave no hint it was tappable.
|
|
37
40
|
*/
|
|
38
41
|
|
|
42
|
+
/**
|
|
43
|
+
* One line of input, and the height of the send/stop button beside it — the
|
|
44
|
+
* row only reads as level while those two agree.
|
|
45
|
+
*/
|
|
46
|
+
const MIN_INPUT_HEIGHT = 40;
|
|
47
|
+
/** ~5 lines, then it scrolls instead of eating the transcript. */
|
|
48
|
+
const MAX_INPUT_HEIGHT = 120;
|
|
49
|
+
const INPUT_PAD_V = _reactNative.Platform.OS === "ios" ? 10 : 6;
|
|
50
|
+
const INPUT_PAD_H = 16;
|
|
39
51
|
function Composer({
|
|
40
52
|
onSend,
|
|
41
53
|
onStop,
|
|
42
54
|
busy,
|
|
55
|
+
draft,
|
|
56
|
+
onDraftTaken,
|
|
43
57
|
disabled,
|
|
44
|
-
placeholder
|
|
58
|
+
placeholder,
|
|
59
|
+
focusKey,
|
|
60
|
+
canFocus = true
|
|
45
61
|
}) {
|
|
46
62
|
const [text, setText] = (0, _react.useState)("");
|
|
63
|
+
const inputRef = (0, _react.useRef)(null);
|
|
64
|
+
(0, _react.useEffect)(() => {
|
|
65
|
+
if (!focusKey || !canFocus || disabled) return;
|
|
66
|
+
inputRef.current?.focus();
|
|
67
|
+
}, [focusKey, canFocus, disabled]);
|
|
68
|
+
(0, _react.useEffect)(() => {
|
|
69
|
+
if (!draft) return;
|
|
70
|
+
// Appended, not assigned: they may have started typing something else in
|
|
71
|
+
// the moment between pressing Stop and this landing.
|
|
72
|
+
setText(current => current ? `${current} ${draft}` : draft);
|
|
73
|
+
onDraftTaken?.();
|
|
74
|
+
}, [draft, onDraftTaken]);
|
|
47
75
|
const submit = (0, _react.useCallback)(() => {
|
|
48
76
|
const value = text.trim();
|
|
49
77
|
if (!value) return;
|
|
@@ -51,13 +79,37 @@ function Composer({
|
|
|
51
79
|
onSend(value);
|
|
52
80
|
}, [text, onSend]);
|
|
53
81
|
const canSend = text.trim().length > 0 && !busy && !disabled;
|
|
82
|
+
/**
|
|
83
|
+
* Typed something while a turn is running.
|
|
84
|
+
*
|
|
85
|
+
* `send` parks it and flushes it when the turn ends — but the only button on
|
|
86
|
+
* screen while busy was Stop, so the sole way to reach that was the
|
|
87
|
+
* keyboard's return key, and the "Queued" placeholder that explains it only
|
|
88
|
+
* appears AFTER you have managed it. The button is the affordance.
|
|
89
|
+
*/
|
|
90
|
+
const canQueue = text.trim().length > 0 && busy && !disabled;
|
|
54
91
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
55
92
|
style: styles.wrap,
|
|
56
93
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
57
94
|
style: [styles.field, disabled && styles.fieldDisabled],
|
|
58
95
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TextInput, {
|
|
59
|
-
|
|
60
|
-
|
|
96
|
+
ref: inputRef,
|
|
97
|
+
testID: "buoy-ask-buoy-input"
|
|
98
|
+
/*
|
|
99
|
+
* Empty means one line, always.
|
|
100
|
+
*
|
|
101
|
+
* The box is otherwise auto-height, and an iOS multiline TextInput
|
|
102
|
+
* grows with the text but never shrinks back: sending a two-line
|
|
103
|
+
* message cleared the text and left a two-line box standing over
|
|
104
|
+
* the 40pt round button beside it. Nothing on the native side
|
|
105
|
+
* reports the shrink either — on Fabric `onContentSizeChange` is
|
|
106
|
+
* emitted from `updateLayoutMetrics` (a LAYOUT change), not from a
|
|
107
|
+
* text change — so the height it last grew to is the height it
|
|
108
|
+
* keeps. Pinning the empty case is the whole fix: it is the only
|
|
109
|
+
* state that has to line up with the button, and it is exactly the
|
|
110
|
+
* state a send or a new conversation lands in.
|
|
111
|
+
*/,
|
|
112
|
+
style: [styles.input, text.length === 0 && styles.inputEmpty],
|
|
61
113
|
value: text,
|
|
62
114
|
onChangeText: setText,
|
|
63
115
|
placeholder: placeholder ?? (disabled ? "Ask Buoy isn't set up yet" : "Ask, or tell it what to change…"),
|
|
@@ -77,6 +129,20 @@ function Composer({
|
|
|
77
129
|
returnKeyType: "send",
|
|
78
130
|
maxLength: 4000
|
|
79
131
|
})
|
|
132
|
+
}), canQueue && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
|
|
133
|
+
testID: "buoy-ask-buoy-queue",
|
|
134
|
+
accessibilityRole: "button",
|
|
135
|
+
accessibilityLabel: "Queue message",
|
|
136
|
+
onPress: submit,
|
|
137
|
+
style: ({
|
|
138
|
+
pressed
|
|
139
|
+
}) => [styles.button, styles.queue, pressed && styles.pressed],
|
|
140
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
141
|
+
style: [styles.sendGlyph, {
|
|
142
|
+
color: _sharedUi.night.color.accent
|
|
143
|
+
}],
|
|
144
|
+
children: "\u2191"
|
|
145
|
+
})
|
|
80
146
|
}), busy ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
|
|
81
147
|
testID: "buoy-ask-buoy-stop",
|
|
82
148
|
accessibilityRole: "button",
|
|
@@ -122,7 +188,7 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
122
188
|
},
|
|
123
189
|
field: {
|
|
124
190
|
flex: 1,
|
|
125
|
-
minHeight:
|
|
191
|
+
minHeight: MIN_INPUT_HEIGHT,
|
|
126
192
|
justifyContent: "center",
|
|
127
193
|
borderRadius: 20,
|
|
128
194
|
borderWidth: _reactNative.StyleSheet.hairlineWidth,
|
|
@@ -133,13 +199,20 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
133
199
|
opacity: 0.6
|
|
134
200
|
},
|
|
135
201
|
input: {
|
|
136
|
-
maxHeight:
|
|
137
|
-
paddingHorizontal:
|
|
138
|
-
paddingTop:
|
|
139
|
-
paddingBottom:
|
|
202
|
+
maxHeight: MAX_INPUT_HEIGHT,
|
|
203
|
+
paddingHorizontal: INPUT_PAD_H,
|
|
204
|
+
paddingTop: INPUT_PAD_V,
|
|
205
|
+
paddingBottom: INPUT_PAD_V,
|
|
140
206
|
color: _sharedUi.night.color.text,
|
|
141
|
-
fontSize: _sharedUi.night.font.row
|
|
142
|
-
lineHeight
|
|
207
|
+
fontSize: _sharedUi.night.font.row
|
|
208
|
+
// No `lineHeight` here on purpose. A multiline TextInput on iOS lays out
|
|
209
|
+
// with the paragraph line height AND the font's own leading, so setting
|
|
210
|
+
// it made a one-line box measure ~56pt instead of 40 — the pill towered
|
|
211
|
+
// over the 40pt send/stop button beside it and the row read as crooked.
|
|
212
|
+
},
|
|
213
|
+
// Exactly the button's height, so the two read as one level row.
|
|
214
|
+
inputEmpty: {
|
|
215
|
+
height: MIN_INPUT_HEIGHT
|
|
143
216
|
},
|
|
144
217
|
button: {
|
|
145
218
|
width: 40,
|
|
@@ -162,6 +235,13 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
162
235
|
stop: {
|
|
163
236
|
backgroundColor: _sharedUi.night.color.fillTertiary
|
|
164
237
|
},
|
|
238
|
+
// Outlined rather than filled: it sits beside Stop, and two solid buttons
|
|
239
|
+
// read as one control with two halves.
|
|
240
|
+
queue: {
|
|
241
|
+
backgroundColor: "transparent",
|
|
242
|
+
borderWidth: _reactNative.StyleSheet.hairlineWidth,
|
|
243
|
+
borderColor: _sharedUi.night.color.accentBorderStrong
|
|
244
|
+
},
|
|
165
245
|
stopGlyph: {
|
|
166
246
|
width: 12,
|
|
167
247
|
height: 12,
|