@buoy-gg/ask-buoy 7.0.40 → 7.0.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -94
- package/lib/commonjs/blocks/AskBlocks.js +1 -338
- package/lib/commonjs/blocks/BlockRenderer.js +1 -262
- package/lib/commonjs/blocks/ChromePrototypes.js +1 -514
- package/lib/commonjs/blocks/DataBlocks.js +1 -781
- package/lib/commonjs/blocks/ExtraBlocks.js +1 -1860
- package/lib/commonjs/blocks/MediaBlocks.js +1 -156
- package/lib/commonjs/blocks/ReceiptBlocks.js +2 -586
- package/lib/commonjs/blocks/blockText.js +1 -60
- package/lib/commonjs/blocks/blockText.test.js +1 -53
- package/lib/commonjs/blocks/context.js +1 -42
- package/lib/commonjs/blocks/icons.js +1 -96
- package/lib/commonjs/blocks/index.js +1 -95
- package/lib/commonjs/blocks/listRow.test.js +1 -55
- package/lib/commonjs/blocks/pageState.js +1 -34
- package/lib/commonjs/blocks/pageState.test.js +1 -57
- package/lib/commonjs/blocks/primitives.js +1 -457
- package/lib/commonjs/blocks/primitivesIndex.js +1 -62
- package/lib/commonjs/blocks/ruleStates.js +1 -0
- package/lib/commonjs/components/ApprovalCard.js +1 -297
- package/lib/commonjs/components/AskBuoyHeader.js +1 -196
- package/lib/commonjs/components/AskBuoyIcon.js +1 -19
- package/lib/commonjs/components/AskBuoyModal.js +2 -478
- package/lib/commonjs/components/AskBuoySettings.js +1 -181
- package/lib/commonjs/components/ChangesBar.js +1 -211
- package/lib/commonjs/components/Composer.js +1 -255
- package/lib/commonjs/components/EmptyState.js +1 -161
- package/lib/commonjs/components/KeyboardPad.js +1 -80
- package/lib/commonjs/components/Markdown.js +1 -310
- package/lib/commonjs/components/MessageList.js +1 -970
- package/lib/commonjs/components/QueuedMessages.js +1 -145
- package/lib/commonjs/components/ThinkingStrip.js +1 -223
- package/lib/commonjs/components/TypingDots.js +1 -63
- package/lib/commonjs/components/markdownParse.js +1 -131
- package/lib/commonjs/components/markdownParse.test.js +1 -99
- package/lib/commonjs/components/useCopyAction.js +1 -50
- package/lib/commonjs/index.js +1 -252
- package/lib/commonjs/preset.js +1 -91
- package/lib/commonjs/store/activityGroups.js +1 -110
- package/lib/commonjs/store/activityGroups.test.js +1 -78
- package/lib/commonjs/store/askBuoySettings.js +1 -72
- package/lib/commonjs/store/askBuoyStore.js +2 -588
- package/lib/commonjs/store/blockPlacement.js +1 -64
- package/lib/commonjs/store/blockPlacement.test.js +1 -123
- package/lib/commonjs/store/queue.test.js +1 -150
- package/lib/commonjs/store/resetConversation.js +1 -77
- package/lib/commonjs/store/restorePending.test.js +1 -63
- package/lib/commonjs/store/restoredIds.test.js +1 -47
- package/lib/commonjs/store/suggestions.js +1 -54
- package/lib/commonjs/store/suggestions.test.js +1 -58
- package/lib/commonjs/store/systemLine.test.js +1 -77
- package/lib/commonjs/store/ticketPrompt.js +1 -17
- package/lib/commonjs/store/traceText.js +1 -81
- package/lib/commonjs/store/traceText.test.js +1 -112
- package/lib/commonjs/store/transcriptPersistence.js +1 -297
- package/lib/commonjs/store/transcriptPersistence.test.js +1 -333
- package/lib/commonjs/store/turnRendering.test.js +1 -151
- package/lib/commonjs/store/useAskBuoy.js +1 -651
- package/lib/commonjs/store/useAskBuoySettings.js +1 -14
- package/lib/commonjs/sync/askBuoySyncAdapter.js +1 -153
- package/lib/commonjs/sync/askBuoySyncAdapter.test.js +1 -141
- package/lib/commonjs/sync/wire.js +1 -58
- package/lib/commonjs/types.js +1 -6
- package/lib/module/blocks/AskBlocks.js +1 -331
- package/lib/module/blocks/BlockRenderer.js +1 -257
- package/lib/module/blocks/ChromePrototypes.js +1 -503
- package/lib/module/blocks/DataBlocks.js +1 -767
- package/lib/module/blocks/ExtraBlocks.js +1 -1833
- package/lib/module/blocks/MediaBlocks.js +1 -151
- package/lib/module/blocks/ReceiptBlocks.js +2 -574
- package/lib/module/blocks/blockText.js +1 -55
- package/lib/module/blocks/blockText.test.js +1 -53
- package/lib/module/blocks/context.js +1 -35
- package/lib/module/blocks/icons.js +1 -91
- package/lib/module/blocks/index.js +1 -8
- package/lib/module/blocks/listRow.test.js +1 -56
- package/lib/module/blocks/pageState.js +1 -30
- package/lib/module/blocks/pageState.test.js +1 -56
- package/lib/module/blocks/primitives.js +1 -445
- package/lib/module/blocks/primitivesIndex.js +1 -5
- package/lib/module/blocks/ruleStates.js +1 -0
- package/lib/module/components/ApprovalCard.js +1 -292
- package/lib/module/components/AskBuoyHeader.js +1 -193
- package/lib/module/components/AskBuoyIcon.js +1 -8
- package/lib/module/components/AskBuoyModal.js +2 -473
- package/lib/module/components/AskBuoySettings.js +1 -176
- package/lib/module/components/ChangesBar.js +1 -206
- package/lib/module/components/Composer.js +1 -250
- package/lib/module/components/EmptyState.js +1 -156
- package/lib/module/components/KeyboardPad.js +1 -75
- package/lib/module/components/Markdown.js +1 -305
- package/lib/module/components/MessageList.js +1 -964
- package/lib/module/components/QueuedMessages.js +1 -140
- package/lib/module/components/ThinkingStrip.js +1 -218
- package/lib/module/components/TypingDots.js +1 -58
- package/lib/module/components/markdownParse.js +1 -125
- package/lib/module/components/markdownParse.test.js +1 -98
- package/lib/module/components/useCopyAction.js +1 -46
- package/lib/module/index.js +1 -34
- package/lib/module/preset.js +1 -74
- package/lib/module/store/activityGroups.js +1 -103
- package/lib/module/store/activityGroups.test.js +1 -77
- package/lib/module/store/askBuoySettings.js +1 -67
- package/lib/module/store/askBuoyStore.js +2 -582
- package/lib/module/store/blockPlacement.js +1 -59
- package/lib/module/store/blockPlacement.test.js +1 -122
- package/lib/module/store/queue.test.js +1 -149
- package/lib/module/store/resetConversation.js +1 -72
- package/lib/module/store/restorePending.test.js +1 -62
- package/lib/module/store/restoredIds.test.js +1 -46
- package/lib/module/store/suggestions.js +1 -49
- package/lib/module/store/suggestions.test.js +1 -57
- package/lib/module/store/systemLine.test.js +1 -76
- package/lib/module/store/ticketPrompt.js +1 -13
- package/lib/module/store/traceText.js +1 -75
- package/lib/module/store/traceText.test.js +1 -111
- package/lib/module/store/transcriptPersistence.js +1 -287
- package/lib/module/store/transcriptPersistence.test.js +1 -332
- package/lib/module/store/turnRendering.test.js +1 -150
- package/lib/module/store/useAskBuoy.js +1 -646
- package/lib/module/store/useAskBuoySettings.js +1 -9
- package/lib/module/sync/askBuoySyncAdapter.js +1 -148
- package/lib/module/sync/askBuoySyncAdapter.test.js +1 -140
- package/lib/module/sync/wire.js +1 -47
- package/lib/module/types.js +1 -4
- package/lib/typescript/blocks/context.d.ts +3 -0
- package/lib/typescript/blocks/ruleStates.d.ts +15 -0
- package/lib/typescript/components/ChangesBar.d.ts +2 -1
- package/lib/typescript/sync/askBuoySyncAdapter.d.ts +2 -2
- package/lib/web/index.mjs +15 -0
- package/package.json +44 -11
- package/lib/commonjs/blocks/AskBlocks.js.map +0 -1
- package/lib/commonjs/blocks/BlockRenderer.js.map +0 -1
- package/lib/commonjs/blocks/ChromePrototypes.js.map +0 -1
- package/lib/commonjs/blocks/DataBlocks.js.map +0 -1
- package/lib/commonjs/blocks/ExtraBlocks.js.map +0 -1
- package/lib/commonjs/blocks/MediaBlocks.js.map +0 -1
- package/lib/commonjs/blocks/ReceiptBlocks.js.map +0 -1
- package/lib/commonjs/blocks/blockText.js.map +0 -1
- package/lib/commonjs/blocks/blockText.test.js.map +0 -1
- package/lib/commonjs/blocks/context.js.map +0 -1
- package/lib/commonjs/blocks/icons.js.map +0 -1
- package/lib/commonjs/blocks/index.js.map +0 -1
- package/lib/commonjs/blocks/listRow.test.js.map +0 -1
- package/lib/commonjs/blocks/pageState.js.map +0 -1
- package/lib/commonjs/blocks/pageState.test.js.map +0 -1
- package/lib/commonjs/blocks/primitives.js.map +0 -1
- package/lib/commonjs/blocks/primitivesIndex.js.map +0 -1
- package/lib/commonjs/components/ApprovalCard.js.map +0 -1
- package/lib/commonjs/components/AskBuoyHeader.js.map +0 -1
- package/lib/commonjs/components/AskBuoyIcon.js.map +0 -1
- package/lib/commonjs/components/AskBuoyModal.js.map +0 -1
- package/lib/commonjs/components/AskBuoySettings.js.map +0 -1
- package/lib/commonjs/components/ChangesBar.js.map +0 -1
- package/lib/commonjs/components/Composer.js.map +0 -1
- package/lib/commonjs/components/EmptyState.js.map +0 -1
- package/lib/commonjs/components/KeyboardPad.js.map +0 -1
- package/lib/commonjs/components/Markdown.js.map +0 -1
- package/lib/commonjs/components/MessageList.js.map +0 -1
- package/lib/commonjs/components/QueuedMessages.js.map +0 -1
- package/lib/commonjs/components/ThinkingStrip.js.map +0 -1
- package/lib/commonjs/components/TypingDots.js.map +0 -1
- package/lib/commonjs/components/markdownParse.js.map +0 -1
- package/lib/commonjs/components/markdownParse.test.js.map +0 -1
- package/lib/commonjs/components/useCopyAction.js.map +0 -1
- package/lib/commonjs/index.js.map +0 -1
- package/lib/commonjs/preset.js.map +0 -1
- package/lib/commonjs/store/activityGroups.js.map +0 -1
- package/lib/commonjs/store/activityGroups.test.js.map +0 -1
- package/lib/commonjs/store/askBuoySettings.js.map +0 -1
- package/lib/commonjs/store/askBuoyStore.js.map +0 -1
- package/lib/commonjs/store/blockPlacement.js.map +0 -1
- package/lib/commonjs/store/blockPlacement.test.js.map +0 -1
- package/lib/commonjs/store/queue.test.js.map +0 -1
- package/lib/commonjs/store/resetConversation.js.map +0 -1
- package/lib/commonjs/store/restorePending.test.js.map +0 -1
- package/lib/commonjs/store/restoredIds.test.js.map +0 -1
- package/lib/commonjs/store/suggestions.js.map +0 -1
- package/lib/commonjs/store/suggestions.test.js.map +0 -1
- package/lib/commonjs/store/systemLine.test.js.map +0 -1
- package/lib/commonjs/store/ticketPrompt.js.map +0 -1
- package/lib/commonjs/store/traceText.js.map +0 -1
- package/lib/commonjs/store/traceText.test.js.map +0 -1
- package/lib/commonjs/store/transcriptPersistence.js.map +0 -1
- package/lib/commonjs/store/transcriptPersistence.test.js.map +0 -1
- package/lib/commonjs/store/turnRendering.test.js.map +0 -1
- package/lib/commonjs/store/useAskBuoy.js.map +0 -1
- package/lib/commonjs/store/useAskBuoySettings.js.map +0 -1
- package/lib/commonjs/sync/askBuoySyncAdapter.js.map +0 -1
- package/lib/commonjs/sync/askBuoySyncAdapter.test.js.map +0 -1
- package/lib/commonjs/sync/wire.js.map +0 -1
- package/lib/commonjs/types.js.map +0 -1
- package/lib/module/blocks/AskBlocks.js.map +0 -1
- package/lib/module/blocks/BlockRenderer.js.map +0 -1
- package/lib/module/blocks/ChromePrototypes.js.map +0 -1
- package/lib/module/blocks/DataBlocks.js.map +0 -1
- package/lib/module/blocks/ExtraBlocks.js.map +0 -1
- package/lib/module/blocks/MediaBlocks.js.map +0 -1
- package/lib/module/blocks/ReceiptBlocks.js.map +0 -1
- package/lib/module/blocks/blockText.js.map +0 -1
- package/lib/module/blocks/blockText.test.js.map +0 -1
- package/lib/module/blocks/context.js.map +0 -1
- package/lib/module/blocks/icons.js.map +0 -1
- package/lib/module/blocks/index.js.map +0 -1
- package/lib/module/blocks/listRow.test.js.map +0 -1
- package/lib/module/blocks/pageState.js.map +0 -1
- package/lib/module/blocks/pageState.test.js.map +0 -1
- package/lib/module/blocks/primitives.js.map +0 -1
- package/lib/module/blocks/primitivesIndex.js.map +0 -1
- package/lib/module/components/ApprovalCard.js.map +0 -1
- package/lib/module/components/AskBuoyHeader.js.map +0 -1
- package/lib/module/components/AskBuoyIcon.js.map +0 -1
- package/lib/module/components/AskBuoyModal.js.map +0 -1
- package/lib/module/components/AskBuoySettings.js.map +0 -1
- package/lib/module/components/ChangesBar.js.map +0 -1
- package/lib/module/components/Composer.js.map +0 -1
- package/lib/module/components/EmptyState.js.map +0 -1
- package/lib/module/components/KeyboardPad.js.map +0 -1
- package/lib/module/components/Markdown.js.map +0 -1
- package/lib/module/components/MessageList.js.map +0 -1
- package/lib/module/components/QueuedMessages.js.map +0 -1
- package/lib/module/components/ThinkingStrip.js.map +0 -1
- package/lib/module/components/TypingDots.js.map +0 -1
- package/lib/module/components/markdownParse.js.map +0 -1
- package/lib/module/components/markdownParse.test.js.map +0 -1
- package/lib/module/components/useCopyAction.js.map +0 -1
- package/lib/module/index.js.map +0 -1
- package/lib/module/preset.js.map +0 -1
- package/lib/module/store/activityGroups.js.map +0 -1
- package/lib/module/store/activityGroups.test.js.map +0 -1
- package/lib/module/store/askBuoySettings.js.map +0 -1
- package/lib/module/store/askBuoyStore.js.map +0 -1
- package/lib/module/store/blockPlacement.js.map +0 -1
- package/lib/module/store/blockPlacement.test.js.map +0 -1
- package/lib/module/store/queue.test.js.map +0 -1
- package/lib/module/store/resetConversation.js.map +0 -1
- package/lib/module/store/restorePending.test.js.map +0 -1
- package/lib/module/store/restoredIds.test.js.map +0 -1
- package/lib/module/store/suggestions.js.map +0 -1
- package/lib/module/store/suggestions.test.js.map +0 -1
- package/lib/module/store/systemLine.test.js.map +0 -1
- package/lib/module/store/ticketPrompt.js.map +0 -1
- package/lib/module/store/traceText.js.map +0 -1
- package/lib/module/store/traceText.test.js.map +0 -1
- package/lib/module/store/transcriptPersistence.js.map +0 -1
- package/lib/module/store/transcriptPersistence.test.js.map +0 -1
- package/lib/module/store/turnRendering.test.js.map +0 -1
- package/lib/module/store/useAskBuoy.js.map +0 -1
- package/lib/module/store/useAskBuoySettings.js.map +0 -1
- package/lib/module/sync/askBuoySyncAdapter.js.map +0 -1
- package/lib/module/sync/askBuoySyncAdapter.test.js.map +0 -1
- package/lib/module/sync/wire.js.map +0 -1
- package/lib/module/types.js.map +0 -1
- package/lib/typescript/blocks/AskBlocks.d.ts.map +0 -1
- package/lib/typescript/blocks/BlockRenderer.d.ts.map +0 -1
- package/lib/typescript/blocks/ChromePrototypes.d.ts.map +0 -1
- package/lib/typescript/blocks/DataBlocks.d.ts.map +0 -1
- package/lib/typescript/blocks/ExtraBlocks.d.ts.map +0 -1
- package/lib/typescript/blocks/MediaBlocks.d.ts.map +0 -1
- package/lib/typescript/blocks/ReceiptBlocks.d.ts.map +0 -1
- package/lib/typescript/blocks/blockText.d.ts.map +0 -1
- package/lib/typescript/blocks/blockText.test.d.ts.map +0 -1
- package/lib/typescript/blocks/context.d.ts.map +0 -1
- package/lib/typescript/blocks/icons.d.ts.map +0 -1
- package/lib/typescript/blocks/index.d.ts.map +0 -1
- package/lib/typescript/blocks/listRow.test.d.ts.map +0 -1
- package/lib/typescript/blocks/pageState.d.ts.map +0 -1
- package/lib/typescript/blocks/pageState.test.d.ts.map +0 -1
- package/lib/typescript/blocks/primitives.d.ts.map +0 -1
- package/lib/typescript/blocks/primitivesIndex.d.ts.map +0 -1
- package/lib/typescript/components/ApprovalCard.d.ts.map +0 -1
- package/lib/typescript/components/AskBuoyHeader.d.ts.map +0 -1
- package/lib/typescript/components/AskBuoyIcon.d.ts.map +0 -1
- package/lib/typescript/components/AskBuoyModal.d.ts.map +0 -1
- package/lib/typescript/components/AskBuoySettings.d.ts.map +0 -1
- package/lib/typescript/components/ChangesBar.d.ts.map +0 -1
- package/lib/typescript/components/Composer.d.ts.map +0 -1
- package/lib/typescript/components/EmptyState.d.ts.map +0 -1
- package/lib/typescript/components/KeyboardPad.d.ts.map +0 -1
- package/lib/typescript/components/Markdown.d.ts.map +0 -1
- package/lib/typescript/components/MessageList.d.ts.map +0 -1
- package/lib/typescript/components/QueuedMessages.d.ts.map +0 -1
- package/lib/typescript/components/ThinkingStrip.d.ts.map +0 -1
- package/lib/typescript/components/TypingDots.d.ts.map +0 -1
- package/lib/typescript/components/markdownParse.d.ts.map +0 -1
- package/lib/typescript/components/markdownParse.test.d.ts.map +0 -1
- package/lib/typescript/components/useCopyAction.d.ts.map +0 -1
- package/lib/typescript/index.d.ts.map +0 -1
- package/lib/typescript/preset.d.ts.map +0 -1
- package/lib/typescript/store/activityGroups.d.ts.map +0 -1
- package/lib/typescript/store/activityGroups.test.d.ts.map +0 -1
- package/lib/typescript/store/askBuoySettings.d.ts.map +0 -1
- package/lib/typescript/store/askBuoyStore.d.ts.map +0 -1
- package/lib/typescript/store/blockPlacement.d.ts.map +0 -1
- package/lib/typescript/store/blockPlacement.test.d.ts.map +0 -1
- package/lib/typescript/store/queue.test.d.ts.map +0 -1
- package/lib/typescript/store/resetConversation.d.ts.map +0 -1
- package/lib/typescript/store/restorePending.test.d.ts.map +0 -1
- package/lib/typescript/store/restoredIds.test.d.ts.map +0 -1
- package/lib/typescript/store/suggestions.d.ts.map +0 -1
- package/lib/typescript/store/suggestions.test.d.ts.map +0 -1
- package/lib/typescript/store/systemLine.test.d.ts.map +0 -1
- package/lib/typescript/store/ticketPrompt.d.ts.map +0 -1
- package/lib/typescript/store/traceText.d.ts.map +0 -1
- package/lib/typescript/store/traceText.test.d.ts.map +0 -1
- package/lib/typescript/store/transcriptPersistence.d.ts.map +0 -1
- package/lib/typescript/store/transcriptPersistence.test.d.ts.map +0 -1
- package/lib/typescript/store/turnRendering.test.d.ts.map +0 -1
- package/lib/typescript/store/useAskBuoy.d.ts.map +0 -1
- package/lib/typescript/store/useAskBuoySettings.d.ts.map +0 -1
- package/lib/typescript/sync/askBuoySyncAdapter.d.ts.map +0 -1
- package/lib/typescript/sync/askBuoySyncAdapter.test.d.ts.map +0 -1
- package/lib/typescript/sync/wire.d.ts.map +0 -1
- package/lib/typescript/types.d.ts.map +0 -1
|
@@ -1,514 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.EditableUserBubble = EditableUserBubble;
|
|
7
|
-
exports.ElapsedRow = ElapsedRow;
|
|
8
|
-
exports.MessageActions = MessageActions;
|
|
9
|
-
exports.QueuedComposer = QueuedComposer;
|
|
10
|
-
exports.ReasoningStrip = ReasoningStrip;
|
|
11
|
-
exports.ReloadDivider = ReloadDivider;
|
|
12
|
-
exports.Timestamp = Timestamp;
|
|
13
|
-
var _react = require("react");
|
|
14
|
-
var _reactNative = require("react-native");
|
|
15
|
-
var _sharedUi = require("@buoy-gg/shared-ui");
|
|
16
|
-
var _context = require("./context");
|
|
17
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
18
|
-
/**
|
|
19
|
-
* Conversation chrome from the survey — NOT blocks. Prototypes for the review
|
|
20
|
-
* page so each can be judged before it is wired into the real transcript:
|
|
21
|
-
* message actions, a reasoning strip, elapsed time on a running step, a
|
|
22
|
-
* queued-message composer state, timestamps + a reload divider, and an
|
|
23
|
-
* editable user bubble with a branch affordance.
|
|
24
|
-
*/
|
|
25
|
-
|
|
26
|
-
function IconButton({
|
|
27
|
-
label,
|
|
28
|
-
onPress,
|
|
29
|
-
children
|
|
30
|
-
}) {
|
|
31
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
|
|
32
|
-
onPress: onPress,
|
|
33
|
-
accessibilityRole: "button",
|
|
34
|
-
accessibilityLabel: label,
|
|
35
|
-
style: ({
|
|
36
|
-
pressed
|
|
37
|
-
}) => [styles.iconBtn, pressed && styles.pressed],
|
|
38
|
-
children: children
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
/** Copy · Retry · 👍 👎 · Share, under an assistant message. */
|
|
43
|
-
function MessageActions({
|
|
44
|
-
id = "chrome-actions"
|
|
45
|
-
}) {
|
|
46
|
-
const h = (0, _context.useBlockHandlers)();
|
|
47
|
-
const [vote, setVote] = (0, _react.useState)(null);
|
|
48
|
-
const fire = label => void h.runAction({
|
|
49
|
-
label,
|
|
50
|
-
send: `__chrome__:${label}`
|
|
51
|
-
}, id);
|
|
52
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
53
|
-
style: styles.actions,
|
|
54
|
-
testID: "chrome-message-actions",
|
|
55
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(IconButton, {
|
|
56
|
-
label: "Copy",
|
|
57
|
-
onPress: () => fire("copy"),
|
|
58
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.Copy, {
|
|
59
|
-
size: 13,
|
|
60
|
-
color: _sharedUi.night.color.textSecondary
|
|
61
|
-
})
|
|
62
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(IconButton, {
|
|
63
|
-
label: "Retry",
|
|
64
|
-
onPress: () => fire("retry"),
|
|
65
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.RefreshCw, {
|
|
66
|
-
size: 13,
|
|
67
|
-
color: _sharedUi.night.color.textSecondary
|
|
68
|
-
})
|
|
69
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(IconButton, {
|
|
70
|
-
label: "Good answer",
|
|
71
|
-
onPress: () => {
|
|
72
|
-
setVote("up");
|
|
73
|
-
fire("thumbs up");
|
|
74
|
-
},
|
|
75
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
76
|
-
style: [styles.glyph, vote === "up" && styles.glyphOn],
|
|
77
|
-
children: "\uD83D\uDC4D"
|
|
78
|
-
})
|
|
79
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(IconButton, {
|
|
80
|
-
label: "Bad answer",
|
|
81
|
-
onPress: () => {
|
|
82
|
-
setVote("down");
|
|
83
|
-
fire("thumbs down");
|
|
84
|
-
},
|
|
85
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
86
|
-
style: [styles.glyph, vote === "down" && styles.glyphOn],
|
|
87
|
-
children: "\uD83D\uDC4E"
|
|
88
|
-
})
|
|
89
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(IconButton, {
|
|
90
|
-
label: "Export",
|
|
91
|
-
onPress: () => fire("export transcript"),
|
|
92
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
93
|
-
style: styles.textBtn,
|
|
94
|
-
children: "Export"
|
|
95
|
-
})
|
|
96
|
-
})]
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
/** Collapsible "what I'm doing / what I thought" strip. */
|
|
101
|
-
function ReasoningStrip({
|
|
102
|
-
text,
|
|
103
|
-
live
|
|
104
|
-
}) {
|
|
105
|
-
const [open, setOpen] = (0, _react.useState)(false);
|
|
106
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
107
|
-
style: styles.reasoning,
|
|
108
|
-
testID: "chrome-reasoning",
|
|
109
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Pressable, {
|
|
110
|
-
onPress: () => setOpen(v => !v),
|
|
111
|
-
style: styles.reasoningHead,
|
|
112
|
-
accessibilityRole: "button",
|
|
113
|
-
accessibilityState: {
|
|
114
|
-
expanded: open
|
|
115
|
-
},
|
|
116
|
-
children: [live ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
|
|
117
|
-
size: "small",
|
|
118
|
-
color: _sharedUi.night.color.textTertiary
|
|
119
|
-
}) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
120
|
-
style: styles.reasoningTitle,
|
|
121
|
-
children: live ? "Working it out…" : "How I got here"
|
|
122
|
-
}), open ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.ChevronDown, {
|
|
123
|
-
size: 12,
|
|
124
|
-
color: _sharedUi.night.color.textTertiary
|
|
125
|
-
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.ChevronRight, {
|
|
126
|
-
size: 12,
|
|
127
|
-
color: _sharedUi.night.color.textTertiary
|
|
128
|
-
})]
|
|
129
|
-
}), open ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
130
|
-
style: styles.reasoningBody,
|
|
131
|
-
children: text
|
|
132
|
-
}) : null]
|
|
133
|
-
});
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
/** A running activity row with elapsed time. */
|
|
137
|
-
function ElapsedRow({
|
|
138
|
-
label
|
|
139
|
-
}) {
|
|
140
|
-
const [ms, setMs] = (0, _react.useState)(0);
|
|
141
|
-
(0, _react.useEffect)(() => {
|
|
142
|
-
const t = setInterval(() => setMs(m => m + 250), 250);
|
|
143
|
-
return () => clearInterval(t);
|
|
144
|
-
}, []);
|
|
145
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
146
|
-
style: styles.elapsed,
|
|
147
|
-
testID: "chrome-elapsed",
|
|
148
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
|
|
149
|
-
size: "small",
|
|
150
|
-
color: _sharedUi.night.color.textSecondary
|
|
151
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
152
|
-
style: styles.elapsedLabel,
|
|
153
|
-
children: label
|
|
154
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
|
|
155
|
-
style: styles.elapsedMs,
|
|
156
|
-
children: [(ms / 1000).toFixed(1), "s"]
|
|
157
|
-
})]
|
|
158
|
-
});
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
/** Composer while the agent is busy: type now, it sends when the turn ends. */
|
|
162
|
-
function QueuedComposer() {
|
|
163
|
-
const [text, setText] = (0, _react.useState)("");
|
|
164
|
-
const [queued, setQueued] = (0, _react.useState)(null);
|
|
165
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
166
|
-
style: styles.composerWrap,
|
|
167
|
-
testID: "chrome-queue",
|
|
168
|
-
children: [queued ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
169
|
-
style: styles.queuedRow,
|
|
170
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
|
|
171
|
-
style: styles.queuedText,
|
|
172
|
-
numberOfLines: 1,
|
|
173
|
-
children: ["Queued: \"", queued, "\""]
|
|
174
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
|
|
175
|
-
onPress: () => setQueued(null),
|
|
176
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
177
|
-
style: styles.queuedCancel,
|
|
178
|
-
children: "Cancel"
|
|
179
|
-
})
|
|
180
|
-
})]
|
|
181
|
-
}) : null, /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
182
|
-
style: styles.composer,
|
|
183
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TextInput, {
|
|
184
|
-
style: styles.composerInput,
|
|
185
|
-
value: text,
|
|
186
|
-
onChangeText: setText,
|
|
187
|
-
placeholder: "Agent is busy \u2014 type and it sends next",
|
|
188
|
-
placeholderTextColor: _sharedUi.night.color.placeholder
|
|
189
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
|
|
190
|
-
disabled: !text.trim(),
|
|
191
|
-
onPress: () => {
|
|
192
|
-
setQueued(text.trim());
|
|
193
|
-
setText("");
|
|
194
|
-
},
|
|
195
|
-
style: [styles.queueBtn, !text.trim() && {
|
|
196
|
-
opacity: 0.5
|
|
197
|
-
}],
|
|
198
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
199
|
-
style: styles.queueBtnText,
|
|
200
|
-
children: "Queue"
|
|
201
|
-
})
|
|
202
|
-
})]
|
|
203
|
-
})]
|
|
204
|
-
});
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
/** "9:41 · 3 min ago" on long-press, and a divider when the app reloaded. */
|
|
208
|
-
function ReloadDivider({
|
|
209
|
-
at
|
|
210
|
-
}) {
|
|
211
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
212
|
-
style: styles.divider,
|
|
213
|
-
testID: "chrome-divider",
|
|
214
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
215
|
-
style: styles.dividerLine
|
|
216
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
|
|
217
|
-
style: styles.dividerText,
|
|
218
|
-
children: ["App reloaded \xB7 ", at]
|
|
219
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
220
|
-
style: styles.dividerLine
|
|
221
|
-
})]
|
|
222
|
-
});
|
|
223
|
-
}
|
|
224
|
-
function Timestamp({
|
|
225
|
-
at
|
|
226
|
-
}) {
|
|
227
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
228
|
-
style: styles.timestamp,
|
|
229
|
-
children: at
|
|
230
|
-
});
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
/** A user bubble you can edit (re-run from here) or branch. */
|
|
234
|
-
function EditableUserBubble({
|
|
235
|
-
text
|
|
236
|
-
}) {
|
|
237
|
-
const h = (0, _context.useBlockHandlers)();
|
|
238
|
-
const [editing, setEditing] = (0, _react.useState)(false);
|
|
239
|
-
const [value, setValue] = (0, _react.useState)(text);
|
|
240
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
241
|
-
style: styles.userWrap,
|
|
242
|
-
testID: "chrome-edit-bubble",
|
|
243
|
-
children: editing ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
244
|
-
style: styles.editBox,
|
|
245
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TextInput, {
|
|
246
|
-
style: styles.editInput,
|
|
247
|
-
value: value,
|
|
248
|
-
onChangeText: setValue,
|
|
249
|
-
multiline: true
|
|
250
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
251
|
-
style: styles.editActions,
|
|
252
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
|
|
253
|
-
onPress: () => {
|
|
254
|
-
setEditing(false);
|
|
255
|
-
void h.runAction({
|
|
256
|
-
label: "re-run edited",
|
|
257
|
-
send: `__chrome__:re-run "${value}"`
|
|
258
|
-
}, "chrome-edit");
|
|
259
|
-
},
|
|
260
|
-
style: styles.editPrimary,
|
|
261
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
262
|
-
style: styles.editPrimaryText,
|
|
263
|
-
children: "Re-run from here"
|
|
264
|
-
})
|
|
265
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
|
|
266
|
-
onPress: () => {
|
|
267
|
-
setEditing(false);
|
|
268
|
-
void h.runAction({
|
|
269
|
-
label: "branch",
|
|
270
|
-
send: `__chrome__:branch "${value}"`
|
|
271
|
-
}, "chrome-edit");
|
|
272
|
-
},
|
|
273
|
-
style: styles.editPlate,
|
|
274
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
275
|
-
style: styles.editPlateText,
|
|
276
|
-
children: "Branch"
|
|
277
|
-
})
|
|
278
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
|
|
279
|
-
onPress: () => setEditing(false),
|
|
280
|
-
style: styles.editPlate,
|
|
281
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
282
|
-
style: styles.editPlateText,
|
|
283
|
-
children: "Cancel"
|
|
284
|
-
})
|
|
285
|
-
})]
|
|
286
|
-
})]
|
|
287
|
-
}) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Pressable, {
|
|
288
|
-
onLongPress: () => setEditing(true),
|
|
289
|
-
onPress: () => setEditing(true),
|
|
290
|
-
style: styles.bubble,
|
|
291
|
-
accessibilityRole: "button",
|
|
292
|
-
accessibilityLabel: "Edit message",
|
|
293
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
294
|
-
style: styles.bubbleText,
|
|
295
|
-
children: value
|
|
296
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
297
|
-
style: styles.bubbleHint,
|
|
298
|
-
children: "tap to edit \xB7 2 branches"
|
|
299
|
-
})]
|
|
300
|
-
})
|
|
301
|
-
});
|
|
302
|
-
}
|
|
303
|
-
const styles = _reactNative.StyleSheet.create({
|
|
304
|
-
actions: {
|
|
305
|
-
flexDirection: "row",
|
|
306
|
-
alignItems: "center",
|
|
307
|
-
gap: 4,
|
|
308
|
-
paddingHorizontal: 2
|
|
309
|
-
},
|
|
310
|
-
iconBtn: {
|
|
311
|
-
paddingHorizontal: 8,
|
|
312
|
-
paddingVertical: 6,
|
|
313
|
-
borderRadius: _sharedUi.night.radius.badge
|
|
314
|
-
},
|
|
315
|
-
pressed: {
|
|
316
|
-
backgroundColor: _sharedUi.night.color.fill
|
|
317
|
-
},
|
|
318
|
-
glyph: {
|
|
319
|
-
fontSize: 13,
|
|
320
|
-
opacity: 0.6
|
|
321
|
-
},
|
|
322
|
-
glyphOn: {
|
|
323
|
-
opacity: 1
|
|
324
|
-
},
|
|
325
|
-
textBtn: {
|
|
326
|
-
color: _sharedUi.night.color.textSecondary,
|
|
327
|
-
fontSize: _sharedUi.night.font.micro,
|
|
328
|
-
fontWeight: "600"
|
|
329
|
-
},
|
|
330
|
-
reasoning: {
|
|
331
|
-
borderRadius: _sharedUi.night.radius.row,
|
|
332
|
-
backgroundColor: _sharedUi.night.color.fill,
|
|
333
|
-
overflow: "hidden"
|
|
334
|
-
},
|
|
335
|
-
reasoningHead: {
|
|
336
|
-
flexDirection: "row",
|
|
337
|
-
alignItems: "center",
|
|
338
|
-
gap: 8,
|
|
339
|
-
paddingHorizontal: 12,
|
|
340
|
-
paddingVertical: 8
|
|
341
|
-
},
|
|
342
|
-
reasoningTitle: {
|
|
343
|
-
flex: 1,
|
|
344
|
-
color: _sharedUi.night.color.textSecondary,
|
|
345
|
-
fontSize: _sharedUi.night.font.caption,
|
|
346
|
-
fontStyle: "italic"
|
|
347
|
-
},
|
|
348
|
-
reasoningBody: {
|
|
349
|
-
color: _sharedUi.night.color.textSecondary,
|
|
350
|
-
fontSize: _sharedUi.night.font.caption,
|
|
351
|
-
lineHeight: 18,
|
|
352
|
-
paddingHorizontal: 12,
|
|
353
|
-
paddingBottom: 10
|
|
354
|
-
},
|
|
355
|
-
elapsed: {
|
|
356
|
-
flexDirection: "row",
|
|
357
|
-
alignItems: "center",
|
|
358
|
-
gap: 10,
|
|
359
|
-
paddingHorizontal: 12,
|
|
360
|
-
paddingVertical: 10,
|
|
361
|
-
borderRadius: _sharedUi.night.radius.card,
|
|
362
|
-
borderWidth: _reactNative.StyleSheet.hairlineWidth,
|
|
363
|
-
borderColor: _sharedUi.night.color.border,
|
|
364
|
-
backgroundColor: _sharedUi.night.color.surface
|
|
365
|
-
},
|
|
366
|
-
elapsedLabel: {
|
|
367
|
-
flex: 1,
|
|
368
|
-
color: _sharedUi.night.color.text,
|
|
369
|
-
fontSize: _sharedUi.night.font.body
|
|
370
|
-
},
|
|
371
|
-
elapsedMs: {
|
|
372
|
-
color: _sharedUi.night.color.textTertiary,
|
|
373
|
-
fontSize: _sharedUi.night.font.caption,
|
|
374
|
-
fontFamily: "Menlo"
|
|
375
|
-
},
|
|
376
|
-
composerWrap: {
|
|
377
|
-
gap: 6
|
|
378
|
-
},
|
|
379
|
-
queuedRow: {
|
|
380
|
-
flexDirection: "row",
|
|
381
|
-
alignItems: "center",
|
|
382
|
-
gap: 8,
|
|
383
|
-
paddingHorizontal: 12,
|
|
384
|
-
paddingVertical: 6,
|
|
385
|
-
borderRadius: _sharedUi.night.radius.row,
|
|
386
|
-
backgroundColor: _sharedUi.night.color.infoSoft
|
|
387
|
-
},
|
|
388
|
-
queuedText: {
|
|
389
|
-
flex: 1,
|
|
390
|
-
color: _sharedUi.night.color.text,
|
|
391
|
-
fontSize: _sharedUi.night.font.caption
|
|
392
|
-
},
|
|
393
|
-
queuedCancel: {
|
|
394
|
-
color: _sharedUi.night.color.info,
|
|
395
|
-
fontSize: _sharedUi.night.font.caption,
|
|
396
|
-
fontWeight: "600"
|
|
397
|
-
},
|
|
398
|
-
composer: {
|
|
399
|
-
flexDirection: "row",
|
|
400
|
-
alignItems: "center",
|
|
401
|
-
gap: 8
|
|
402
|
-
},
|
|
403
|
-
composerInput: {
|
|
404
|
-
flex: 1,
|
|
405
|
-
height: 40,
|
|
406
|
-
paddingHorizontal: 16,
|
|
407
|
-
borderRadius: 20,
|
|
408
|
-
borderWidth: _reactNative.StyleSheet.hairlineWidth,
|
|
409
|
-
borderColor: _sharedUi.night.color.border,
|
|
410
|
-
backgroundColor: _sharedUi.night.color.surfaceElevated,
|
|
411
|
-
color: _sharedUi.night.color.text,
|
|
412
|
-
fontSize: _sharedUi.night.font.body
|
|
413
|
-
},
|
|
414
|
-
queueBtn: {
|
|
415
|
-
paddingHorizontal: 14,
|
|
416
|
-
height: 40,
|
|
417
|
-
borderRadius: 20,
|
|
418
|
-
backgroundColor: _sharedUi.night.color.button,
|
|
419
|
-
alignItems: "center",
|
|
420
|
-
justifyContent: "center"
|
|
421
|
-
},
|
|
422
|
-
queueBtnText: {
|
|
423
|
-
color: _sharedUi.night.color.text,
|
|
424
|
-
fontSize: _sharedUi.night.font.caption,
|
|
425
|
-
fontWeight: "600"
|
|
426
|
-
},
|
|
427
|
-
divider: {
|
|
428
|
-
flexDirection: "row",
|
|
429
|
-
alignItems: "center",
|
|
430
|
-
gap: 10,
|
|
431
|
-
paddingVertical: 4
|
|
432
|
-
},
|
|
433
|
-
dividerLine: {
|
|
434
|
-
flex: 1,
|
|
435
|
-
height: _reactNative.StyleSheet.hairlineWidth,
|
|
436
|
-
backgroundColor: _sharedUi.night.color.border
|
|
437
|
-
},
|
|
438
|
-
dividerText: {
|
|
439
|
-
color: _sharedUi.night.color.textTertiary,
|
|
440
|
-
fontSize: _sharedUi.night.font.micro
|
|
441
|
-
},
|
|
442
|
-
timestamp: {
|
|
443
|
-
alignSelf: "center",
|
|
444
|
-
color: _sharedUi.night.color.textTertiary,
|
|
445
|
-
fontSize: _sharedUi.night.font.micro
|
|
446
|
-
},
|
|
447
|
-
userWrap: {
|
|
448
|
-
alignItems: "flex-end"
|
|
449
|
-
},
|
|
450
|
-
bubble: {
|
|
451
|
-
maxWidth: "84%",
|
|
452
|
-
paddingHorizontal: 14,
|
|
453
|
-
paddingVertical: 9,
|
|
454
|
-
borderRadius: 18,
|
|
455
|
-
borderBottomRightRadius: 6,
|
|
456
|
-
backgroundColor: _sharedUi.night.color.accentFill,
|
|
457
|
-
borderWidth: _reactNative.StyleSheet.hairlineWidth,
|
|
458
|
-
borderColor: _sharedUi.night.color.accentBorder,
|
|
459
|
-
gap: 4
|
|
460
|
-
},
|
|
461
|
-
bubbleText: {
|
|
462
|
-
color: _sharedUi.night.color.text,
|
|
463
|
-
fontSize: _sharedUi.night.font.row,
|
|
464
|
-
lineHeight: 21
|
|
465
|
-
},
|
|
466
|
-
bubbleHint: {
|
|
467
|
-
color: _sharedUi.night.color.textTertiary,
|
|
468
|
-
fontSize: 10,
|
|
469
|
-
textAlign: "right"
|
|
470
|
-
},
|
|
471
|
-
editBox: {
|
|
472
|
-
width: "100%",
|
|
473
|
-
gap: 8
|
|
474
|
-
},
|
|
475
|
-
editInput: {
|
|
476
|
-
minHeight: 60,
|
|
477
|
-
padding: 12,
|
|
478
|
-
borderRadius: _sharedUi.night.radius.row,
|
|
479
|
-
backgroundColor: _sharedUi.night.color.surfaceElevated,
|
|
480
|
-
color: _sharedUi.night.color.text,
|
|
481
|
-
fontSize: _sharedUi.night.font.row,
|
|
482
|
-
borderWidth: _reactNative.StyleSheet.hairlineWidth,
|
|
483
|
-
borderColor: _sharedUi.night.color.accentBorderStrong
|
|
484
|
-
},
|
|
485
|
-
editActions: {
|
|
486
|
-
flexDirection: "row",
|
|
487
|
-
gap: 8,
|
|
488
|
-
justifyContent: "flex-end",
|
|
489
|
-
flexWrap: "wrap"
|
|
490
|
-
},
|
|
491
|
-
editPrimary: {
|
|
492
|
-
paddingHorizontal: 12,
|
|
493
|
-
paddingVertical: 8,
|
|
494
|
-
borderRadius: _sharedUi.night.radius.row,
|
|
495
|
-
backgroundColor: _sharedUi.night.color.accent
|
|
496
|
-
},
|
|
497
|
-
editPrimaryText: {
|
|
498
|
-
color: _sharedUi.night.color.onAccent,
|
|
499
|
-
fontSize: _sharedUi.night.font.caption,
|
|
500
|
-
fontWeight: "600"
|
|
501
|
-
},
|
|
502
|
-
editPlate: {
|
|
503
|
-
paddingHorizontal: 12,
|
|
504
|
-
paddingVertical: 8,
|
|
505
|
-
borderRadius: _sharedUi.night.radius.row,
|
|
506
|
-
backgroundColor: _sharedUi.night.color.button
|
|
507
|
-
},
|
|
508
|
-
editPlateText: {
|
|
509
|
-
color: _sharedUi.night.color.text,
|
|
510
|
-
fontSize: _sharedUi.night.font.caption,
|
|
511
|
-
fontWeight: "600"
|
|
512
|
-
}
|
|
513
|
-
});
|
|
514
|
-
//# sourceMappingURL=ChromePrototypes.js.map
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.EditableUserBubble=EditableUserBubble;exports.ElapsedRow=ElapsedRow;exports.MessageActions=MessageActions;exports.QueuedComposer=QueuedComposer;exports.ReasoningStrip=ReasoningStrip;exports.ReloadDivider=ReloadDivider;exports.Timestamp=Timestamp;var _react=require("react");var _reactNative=require("react-native");var _sharedUi=require("@buoy-gg/shared-ui");var _context=require("./context");var _jsxRuntime=require("react/jsx-runtime");function IconButton({label:e,onPress:r,children:o}){return(0,_jsxRuntime.jsx)(_reactNative.Pressable,{onPress:r,accessibilityRole:"button",accessibilityLabel:e,style:({pressed:t})=>[styles.iconBtn,t&&styles.pressed],children:o})}function MessageActions({id:e="chrome-actions"}){const r=(0,_context.useBlockHandlers)();const[o,t]=(0,_react.useState)(null);const i=n=>void r.runAction({label:n,send:`__chrome__:${n}`},e);return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.actions,testID:"chrome-message-actions",children:[(0,_jsxRuntime.jsx)(IconButton,{label:"Copy",onPress:()=>i("copy"),children:(0,_jsxRuntime.jsx)(_sharedUi.Copy,{size:13,color:_sharedUi.night.color.textSecondary})}),(0,_jsxRuntime.jsx)(IconButton,{label:"Retry",onPress:()=>i("retry"),children:(0,_jsxRuntime.jsx)(_sharedUi.RefreshCw,{size:13,color:_sharedUi.night.color.textSecondary})}),(0,_jsxRuntime.jsx)(IconButton,{label:"Good answer",onPress:()=>{t("up");i("thumbs up")},children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.glyph,o==="up"&&styles.glyphOn],children:"\u{1F44D}"})}),(0,_jsxRuntime.jsx)(IconButton,{label:"Bad answer",onPress:()=>{t("down");i("thumbs down")},children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.glyph,o==="down"&&styles.glyphOn],children:"\u{1F44E}"})}),(0,_jsxRuntime.jsx)(IconButton,{label:"Export",onPress:()=>i("export transcript"),children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.textBtn,children:"Export"})})]})}function ReasoningStrip({text:e,live:r}){const[o,t]=(0,_react.useState)(false);return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.reasoning,testID:"chrome-reasoning",children:[(0,_jsxRuntime.jsxs)(_reactNative.Pressable,{onPress:()=>t(i=>!i),style:styles.reasoningHead,accessibilityRole:"button",accessibilityState:{expanded:o},children:[r?(0,_jsxRuntime.jsx)(_reactNative.ActivityIndicator,{size:"small",color:_sharedUi.night.color.textTertiary}):null,(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.reasoningTitle,children:r?"Working it out\u2026":"How I got here"}),o?(0,_jsxRuntime.jsx)(_sharedUi.ChevronDown,{size:12,color:_sharedUi.night.color.textTertiary}):(0,_jsxRuntime.jsx)(_sharedUi.ChevronRight,{size:12,color:_sharedUi.night.color.textTertiary})]}),o?(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.reasoningBody,children:e}):null]})}function ElapsedRow({label:e}){const[r,o]=(0,_react.useState)(0);(0,_react.useEffect)(()=>{const t=setInterval(()=>o(i=>i+250),250);return()=>clearInterval(t)},[]);return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.elapsed,testID:"chrome-elapsed",children:[(0,_jsxRuntime.jsx)(_reactNative.ActivityIndicator,{size:"small",color:_sharedUi.night.color.textSecondary}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.elapsedLabel,children:e}),(0,_jsxRuntime.jsxs)(_reactNative.Text,{style:styles.elapsedMs,children:[(r/1e3).toFixed(1),"s"]})]})}function QueuedComposer(){const[e,r]=(0,_react.useState)("");const[o,t]=(0,_react.useState)(null);return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.composerWrap,testID:"chrome-queue",children:[o?(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.queuedRow,children:[(0,_jsxRuntime.jsxs)(_reactNative.Text,{style:styles.queuedText,numberOfLines:1,children:['Queued: "',o,'"']}),(0,_jsxRuntime.jsx)(_reactNative.Pressable,{onPress:()=>t(null),children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.queuedCancel,children:"Cancel"})})]}):null,(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.composer,children:[(0,_jsxRuntime.jsx)(_reactNative.TextInput,{style:styles.composerInput,value:e,onChangeText:r,placeholder:"Agent is busy \u2014 type and it sends next",placeholderTextColor:_sharedUi.night.color.placeholder}),(0,_jsxRuntime.jsx)(_reactNative.Pressable,{disabled:!e.trim(),onPress:()=>{t(e.trim());r("")},style:[styles.queueBtn,!e.trim()&&{opacity:.5}],children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.queueBtnText,children:"Queue"})})]})]})}function ReloadDivider({at:e}){return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.divider,testID:"chrome-divider",children:[(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.dividerLine}),(0,_jsxRuntime.jsxs)(_reactNative.Text,{style:styles.dividerText,children:["App reloaded \xB7 ",e]}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.dividerLine})]})}function Timestamp({at:e}){return(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.timestamp,children:e})}function EditableUserBubble({text:e}){const r=(0,_context.useBlockHandlers)();const[o,t]=(0,_react.useState)(false);const[i,n]=(0,_react.useState)(e);return(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.userWrap,testID:"chrome-edit-bubble",children:o?(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.editBox,children:[(0,_jsxRuntime.jsx)(_reactNative.TextInput,{style:styles.editInput,value:i,onChangeText:n,multiline:true}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.editActions,children:[(0,_jsxRuntime.jsx)(_reactNative.Pressable,{onPress:()=>{t(false);void r.runAction({label:"re-run edited",send:`__chrome__:re-run "${i}"`},"chrome-edit")},style:styles.editPrimary,children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.editPrimaryText,children:"Re-run from here"})}),(0,_jsxRuntime.jsx)(_reactNative.Pressable,{onPress:()=>{t(false);void r.runAction({label:"branch",send:`__chrome__:branch "${i}"`},"chrome-edit")},style:styles.editPlate,children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.editPlateText,children:"Branch"})}),(0,_jsxRuntime.jsx)(_reactNative.Pressable,{onPress:()=>t(false),style:styles.editPlate,children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.editPlateText,children:"Cancel"})})]})]}):(0,_jsxRuntime.jsxs)(_reactNative.Pressable,{onLongPress:()=>t(true),onPress:()=>t(true),style:styles.bubble,accessibilityRole:"button",accessibilityLabel:"Edit message",children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.bubbleText,children:i}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.bubbleHint,children:"tap to edit \xB7 2 branches"})]})})}const styles=_reactNative.StyleSheet.create({actions:{flexDirection:"row",alignItems:"center",gap:4,paddingHorizontal:2},iconBtn:{paddingHorizontal:8,paddingVertical:6,borderRadius:_sharedUi.night.radius.badge},pressed:{backgroundColor:_sharedUi.night.color.fill},glyph:{fontSize:13,opacity:.6},glyphOn:{opacity:1},textBtn:{color:_sharedUi.night.color.textSecondary,fontSize:_sharedUi.night.font.micro,fontWeight:"600"},reasoning:{borderRadius:_sharedUi.night.radius.row,backgroundColor:_sharedUi.night.color.fill,overflow:"hidden"},reasoningHead:{flexDirection:"row",alignItems:"center",gap:8,paddingHorizontal:12,paddingVertical:8},reasoningTitle:{flex:1,color:_sharedUi.night.color.textSecondary,fontSize:_sharedUi.night.font.caption,fontStyle:"italic"},reasoningBody:{color:_sharedUi.night.color.textSecondary,fontSize:_sharedUi.night.font.caption,lineHeight:18,paddingHorizontal:12,paddingBottom:10},elapsed:{flexDirection:"row",alignItems:"center",gap:10,paddingHorizontal:12,paddingVertical:10,borderRadius:_sharedUi.night.radius.card,borderWidth:_reactNative.StyleSheet.hairlineWidth,borderColor:_sharedUi.night.color.border,backgroundColor:_sharedUi.night.color.surface},elapsedLabel:{flex:1,color:_sharedUi.night.color.text,fontSize:_sharedUi.night.font.body},elapsedMs:{color:_sharedUi.night.color.textTertiary,fontSize:_sharedUi.night.font.caption,fontFamily:"Menlo"},composerWrap:{gap:6},queuedRow:{flexDirection:"row",alignItems:"center",gap:8,paddingHorizontal:12,paddingVertical:6,borderRadius:_sharedUi.night.radius.row,backgroundColor:_sharedUi.night.color.infoSoft},queuedText:{flex:1,color:_sharedUi.night.color.text,fontSize:_sharedUi.night.font.caption},queuedCancel:{color:_sharedUi.night.color.info,fontSize:_sharedUi.night.font.caption,fontWeight:"600"},composer:{flexDirection:"row",alignItems:"center",gap:8},composerInput:{flex:1,height:40,paddingHorizontal:16,borderRadius:20,borderWidth:_reactNative.StyleSheet.hairlineWidth,borderColor:_sharedUi.night.color.border,backgroundColor:_sharedUi.night.color.surfaceElevated,color:_sharedUi.night.color.text,fontSize:_sharedUi.night.font.body},queueBtn:{paddingHorizontal:14,height:40,borderRadius:20,backgroundColor:_sharedUi.night.color.button,alignItems:"center",justifyContent:"center"},queueBtnText:{color:_sharedUi.night.color.text,fontSize:_sharedUi.night.font.caption,fontWeight:"600"},divider:{flexDirection:"row",alignItems:"center",gap:10,paddingVertical:4},dividerLine:{flex:1,height:_reactNative.StyleSheet.hairlineWidth,backgroundColor:_sharedUi.night.color.border},dividerText:{color:_sharedUi.night.color.textTertiary,fontSize:_sharedUi.night.font.micro},timestamp:{alignSelf:"center",color:_sharedUi.night.color.textTertiary,fontSize:_sharedUi.night.font.micro},userWrap:{alignItems:"flex-end"},bubble:{maxWidth:"84%",paddingHorizontal:14,paddingVertical:9,borderRadius:18,borderBottomRightRadius:6,backgroundColor:_sharedUi.night.color.accentFill,borderWidth:_reactNative.StyleSheet.hairlineWidth,borderColor:_sharedUi.night.color.accentBorder,gap:4},bubbleText:{color:_sharedUi.night.color.text,fontSize:_sharedUi.night.font.row,lineHeight:21},bubbleHint:{color:_sharedUi.night.color.textTertiary,fontSize:10,textAlign:"right"},editBox:{width:"100%",gap:8},editInput:{minHeight:60,padding:12,borderRadius:_sharedUi.night.radius.row,backgroundColor:_sharedUi.night.color.surfaceElevated,color:_sharedUi.night.color.text,fontSize:_sharedUi.night.font.row,borderWidth:_reactNative.StyleSheet.hairlineWidth,borderColor:_sharedUi.night.color.accentBorderStrong},editActions:{flexDirection:"row",gap:8,justifyContent:"flex-end",flexWrap:"wrap"},editPrimary:{paddingHorizontal:12,paddingVertical:8,borderRadius:_sharedUi.night.radius.row,backgroundColor:_sharedUi.night.color.accent},editPrimaryText:{color:_sharedUi.night.color.onAccent,fontSize:_sharedUi.night.font.caption,fontWeight:"600"},editPlate:{paddingHorizontal:12,paddingVertical:8,borderRadius:_sharedUi.night.radius.row,backgroundColor:_sharedUi.night.color.button},editPlateText:{color:_sharedUi.night.color.text,fontSize:_sharedUi.night.font.caption,fontWeight:"600"}});
|