@qredence/fleet 0.8.0 → 0.9.0
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/CHANGELOG.md +31 -0
- package/dist/web/client/assets/DialogTitle-BlVq-tcv.js +1 -0
- package/dist/web/client/assets/FloatingPortal-D8-EPDs2.js +1 -0
- package/dist/web/client/assets/activity-BPIKUzOU.js +1 -0
- package/dist/web/client/assets/agents-CGjUBYX7.js +2 -0
- package/dist/web/client/assets/agents-page-CTuFJL9H.js +1 -0
- package/dist/web/client/assets/alert-CzWGeumf.js +1 -0
- package/dist/web/client/assets/alert-dialog-D-e1Pr4q.js +1 -0
- package/dist/web/client/assets/artifacts-panel-6JEdy6jU.js +1 -0
- package/dist/web/client/assets/badge-CzQFgmVK.js +1 -0
- package/dist/web/client/assets/chat-command-palette-Bxr5EkO6.js +1 -0
- package/dist/web/client/assets/chat-hpzV6IA6.js +57 -0
- package/dist/web/client/assets/chat-queries-CfZiupub.js +3 -0
- package/dist/web/client/assets/clock-3-BwWCSCm_.js +1 -0
- package/dist/web/client/assets/{command-imgUMV3r.js → command-xo-NK4xO.js} +1 -1
- package/dist/web/client/assets/connectors-CFxLqG2x.js +2 -0
- package/dist/web/client/assets/connectors-page-DQJdoAnl.js +1 -0
- package/dist/web/client/assets/create-project-dialog-Db-WhUmP.js +1 -0
- package/dist/web/client/assets/dialog-CK8dym6z.js +1 -0
- package/dist/web/client/assets/{fork-picker-dialog-Cgi48NnT.js → fork-picker-dialog-DSaFeUii.js} +1 -1
- package/dist/web/client/assets/globals-DJhWyayo.css +2 -0
- package/dist/web/client/assets/index-C9FHZDGw.js +13 -0
- package/dist/web/client/assets/{input-7g8_nw-Z.js → input-CBoTMPC_.js} +1 -1
- package/dist/web/client/assets/{input-group-Nq03Qums.js → input-group-BFubAtz9.js} +1 -1
- package/dist/web/client/assets/mcp-connections-section-DEo6Kemv.js +2 -0
- package/dist/web/client/assets/message-queue-Btjt9wK2.js +1 -0
- package/dist/web/client/assets/{model-selector-list-Cp687pdm.js → model-selector-list-CbDAT0Rw.js} +1 -1
- package/dist/web/client/assets/mutation-Da9zdeWr.js +1 -0
- package/dist/web/client/assets/notify-BIL0-CGy.js +1 -0
- package/dist/web/client/assets/open-panel-action-message-SdA1VU42.js +1 -0
- package/dist/web/client/assets/openui-renderer-DG-iML7M.js +291 -0
- package/dist/web/client/assets/pencil-Cbgq3ybX.js +1 -0
- package/dist/web/client/assets/plus-DUP2JPVG.js +1 -0
- package/dist/web/client/assets/product-page-header-Ck6I13CE.js +1 -0
- package/dist/web/client/assets/provider-catalog-CLEDlH_v.js +1 -0
- package/dist/web/client/assets/provider-label-BItazQ6H.js +1 -0
- package/dist/web/client/assets/right-panel-context-CjX-HkDO.js +1 -0
- package/dist/web/client/assets/right-panel-registry-BAJ6TuEY.js +2 -0
- package/dist/web/client/assets/rotate-ccw-DLkfsmG9.js +1 -0
- package/dist/web/client/assets/routes-ja_liP8Z.js +14 -0
- package/dist/web/client/assets/select-DYh951qi.js +1 -0
- package/dist/web/client/assets/{session-activity-panel-Bc4-HSfb.js → session-activity-panel-DwaXiSrS.js} +1 -1
- package/dist/web/client/assets/{session-insights-panel-D0v_DKcb.js → session-insights-panel-BXEmuJKf.js} +1 -1
- package/dist/web/client/assets/{session-tool-renderer-C7mYeUOs.js → session-tool-renderer-DEABxZG3.js} +25 -25
- package/dist/web/client/assets/{session-tree-panel-By9m9tGB.js → session-tree-panel-5QgMvXoX.js} +1 -1
- package/dist/web/client/assets/settings-dialog-DiikSLhF.js +1 -0
- package/dist/web/client/assets/sparkles-CASAe1AI.js +1 -0
- package/dist/web/client/assets/{subagent-chat-panel-DsPmLZSf.js → subagent-chat-panel-R2RoX1Yt.js} +1 -1
- package/dist/web/client/assets/subagent-transcript-DVZhMo7a.js +1 -0
- package/dist/web/client/assets/{subagents-panel-gQ9BLfV3.js → subagents-panel-CMMRUP8F.js} +1 -1
- package/dist/web/client/assets/switch-BrxDfsX6.js +1 -0
- package/dist/web/client/assets/toast-BNWkgZ0u.js +1 -0
- package/dist/web/client/assets/{tool-output-normalizer-CADgEiI4.js → tool-output-normalizer-DDU09Zc6.js} +1 -1
- package/dist/web/client/assets/tool-part-normalizer-CF6bmJ0s.js +4 -0
- package/dist/web/client/assets/tool-result-7qREIVv_.js +5 -0
- package/dist/web/client/assets/tool-timeline-CGhwMeNl.js +2 -0
- package/dist/web/client/assets/trash-sm2UyOxe.js +1 -0
- package/dist/web/client/assets/types-gIgIxnnG.js +1 -0
- package/dist/web/client/assets/useNavigate-CVhM7pag.js +1 -0
- package/dist/web/client/assets/useRender-CzJUrRlB.js +1 -0
- package/dist/web/client/assets/useScrollLock-BcsteNzT.js +1 -0
- package/dist/web/client/assets/with-selector-B_VDO56x.js +1 -0
- package/dist/web/client/bundle-budget.json +6 -6
- package/dist/web/server/{_tanstack-start-manifest_v-BiNPG4xt-BZTMSM2I.js → _tanstack-start-manifest_v-B6ne-00G-OFX7UD4K.js} +44 -23
- package/dist/web/server/agents-BwzqhPjK-ANFHE5AG.js +22 -0
- package/dist/web/server/agents-page-DEqPV-eG-BR5MR74O.js +215 -0
- package/dist/web/server/{artifacts-panel-CqGBNU4q-UHNMC7PK.js → artifacts-panel-DLO8OfXb-B2ZWCDFP.js} +27 -17
- package/dist/web/server/{chat-command-palette-B94-zIEz-ES2ZB4ZF.js → chat-command-palette-CaDQAMAu-KDH7BTDS.js} +22 -13
- package/dist/web/server/chunk-2ETDIMNM.js +40 -0
- package/dist/web/server/{chunk-2VKVSL6Y.js → chunk-35RIM6VP.js} +128 -127
- package/dist/web/server/{chunk-SI5IQSG4.js → chunk-5IE54MRG.js} +8 -7
- package/dist/web/server/chunk-5MOXRFX6.js +826 -0
- package/dist/web/server/{chunk-FB2QLQTN.js → chunk-6AFVCERK.js} +12 -13
- package/dist/web/server/chunk-6GYLXDX3.js +588 -0
- package/dist/web/server/chunk-7DQQMT5V.js +8993 -0
- package/dist/web/server/chunk-APOS34PW.js +8965 -0
- package/dist/web/server/{chunk-YQO36OP6.js → chunk-AXN2OBPF.js} +2 -4
- package/dist/web/server/{chunk-E6T36NM5.js → chunk-B5FKCW75.js} +36 -353
- package/dist/web/server/chunk-BD7YKYWL.js +1007 -0
- package/dist/web/server/{chunk-BAHZXA4D.js → chunk-BZ2EAUZZ.js} +10 -12
- package/dist/web/server/chunk-CE7U5QB2.js +42 -0
- package/dist/web/server/{chunk-LTTBT3J7.js → chunk-FNV3WZXL.js} +5 -9
- package/dist/web/server/{chunk-2FHYWKDN.js → chunk-FSQWWR2M.js} +46 -16
- package/dist/web/server/chunk-FT7HNDR5.js +143 -0
- package/dist/web/server/chunk-GNXIDE26.js +44 -0
- package/dist/web/server/{chunk-EAKPTSWR.js → chunk-HAFELESQ.js} +5 -7
- package/dist/web/server/{chunk-K67IDUAI.js → chunk-HUHUPGHT.js} +42 -32
- package/dist/web/server/{chunk-WSK55TKE.js → chunk-KBMRRJQN.js} +96 -10
- package/dist/web/server/chunk-KDCSEISZ.js +6890 -0
- package/dist/web/server/chunk-KSGGSGOA.js +50 -0
- package/dist/web/server/chunk-OO7NBFQQ.js +15 -0
- package/dist/web/server/{chunk-EL2JCDAM.js → chunk-PQVTLG3E.js} +9 -9
- package/dist/web/server/{chunk-LQM6QR7S.js → chunk-Q4ECIATK.js} +61 -47
- package/dist/web/server/{chunk-CZLGB3NE.js → chunk-R4BS3KYI.js} +2 -4
- package/dist/web/server/chunk-RX2ZJARF.js +73 -0
- package/dist/web/server/chunk-TOJA3X5N.js +421 -0
- package/dist/web/server/chunk-TQ2RECTH.js +193 -0
- package/dist/web/server/{chunk-ABMGW6QH.js → chunk-TTNONWZZ.js} +15871 -15660
- package/dist/web/server/chunk-TXZDDJCT.js +5115 -0
- package/dist/web/server/{chunk-SGAQVAYL.js → chunk-UDUG3MYZ.js} +2 -2
- package/dist/web/server/{chunk-5GUEYYYO.js → chunk-V2GCVTDP.js} +4583 -13665
- package/dist/web/server/{chunk-OAYEN3JV.js → chunk-VDEUVEWL.js} +2253 -1
- package/dist/web/server/chunk-VM3U6PUU.js +769 -0
- package/dist/web/server/connectors-C0xm91Ss-DJVBGD73.js +22 -0
- package/dist/web/server/connectors-page-B6tJNZ6c-R5K4NSAT.js +66 -0
- package/dist/web/server/{create-project-dialog-CFPX6Ihl-EO4XTINS.js → create-project-dialog-PFPHHWIV-GH7JR5IK.js} +25 -14
- package/dist/web/server/{fork-picker-dialog-B2RBFzoZ-R6GXPSPL.js → fork-picker-dialog-DFpKOdAw-JPLJSYYU.js} +7 -10
- package/dist/web/server/{markdown-BvCfOB26-VDH4YOQD.js → markdown-Cc8V9dOF-JTNTJKQU.js} +5 -6
- package/dist/web/server/{markdown-code-SYc-BQvp-MR4FXT5C.js → markdown-code-gaRnbgNM-V5LIRYCD.js} +7 -8
- package/dist/web/server/{message-queue-D32rLiJo-HEBRGH5B.js → message-queue-nQ2_kU82-KKSLYR4S.js} +7 -14
- package/dist/web/server/{model-selector-list-DKzt_xEN-5ZPU6XDY.js → model-selector-list-By_G7_Hr-GXT27BZO.js} +12 -14
- package/dist/web/server/{openui-renderer-CeVtOdYl-PY37PCJI.js → openui-renderer-B9D8-Av--LFZP4U5V.js} +20 -13
- package/dist/web/server/{prompt-suggestions-CpTK_fHV-Q4ILLZKC.js → prompt-suggestions-B67Uy5Rk-5SMTSIFQ.js} +5 -4
- package/dist/web/server/{repl-panel-1kSS1UGd-DDM5ADGZ.js → repl-panel-1kSS1UGd-POXRYDDJ.js} +2 -3
- package/dist/web/server/{resources-panel-S4NHlpz7-NF7WYYSR.js → resources-panel-CTzOOKPz-5G6RS2D6.js} +18 -10
- package/dist/web/server/router-CnBux_Ld-YTVBMJFL.js +23 -0
- package/dist/web/server/routes-BUGzvQoO-WW43X7W2.js +124 -0
- package/dist/web/server/server.js +3 -3
- package/dist/web/server/{session-activity-panel-Bz2GrdMk-PCOXG46X.js → session-activity-panel-f0d3fCm7-I6L5IKFQ.js} +18 -10
- package/dist/web/server/{session-insights-panel-CfMX2NRu-6HWZTTAC.js → session-insights-panel-BiVObm_6-AP4FITT7.js} +2 -12
- package/dist/web/server/{session-reasoning-panel-CpiTdyQz-O3B5CDKS.js → session-reasoning-panel-QIt_xjP0-FKJWMNHO.js} +17 -9
- package/dist/web/server/session-tool-renderer-Cg_ZPHxS-BNQKNJNZ.js +34 -0
- package/dist/web/server/{session-tree-panel-CzkE0RFB-P4KWA7S2.js → session-tree-panel-B--el8O5-NZOZJM5L.js} +18 -11
- package/dist/web/server/{settings-dialog-BUgVNpr1-THSYIOZL.js → settings-dialog-D_eJN2ia-W47Y474K.js} +102 -790
- package/dist/web/server/{subagent-chat-panel-mw3kEFfK-CDYX7LST.js → subagent-chat-panel-C9nWP21E-D5C2TTYD.js} +23 -15
- package/dist/web/server/{subagents-panel-2ZJfYrXG-NDJKHJHD.js → subagents-panel-fAKvBNRG-O7QHXNE2.js} +24 -17
- package/dist/web/server/{workspace-panel-xznrPDLt-QCJRZOF3.js → workspace-panel-CZMNMU63-SYOSM3B7.js} +23 -15
- package/package.json +1 -1
- package/dist/web/client/assets/DialogTitle-RY2UDuCY.js +0 -1
- package/dist/web/client/assets/FloatingPortal-XC0MCNnD.js +0 -1
- package/dist/web/client/assets/action-swap-BWRUNKQA.js +0 -1
- package/dist/web/client/assets/alert-dialog-DGNvg0B1.js +0 -1
- package/dist/web/client/assets/artifacts-panel-BGXpKRJ7.js +0 -1
- package/dist/web/client/assets/badge-DM06QVqB.js +0 -57
- package/dist/web/client/assets/chat-command-palette-PenyaZBw.js +0 -1
- package/dist/web/client/assets/create-project-dialog-C00d5yCq.js +0 -1
- package/dist/web/client/assets/dialog-zCNOQI63.js +0 -1
- package/dist/web/client/assets/globals-BuMuB_ea.css +0 -2
- package/dist/web/client/assets/index-BqBdQGWs.js +0 -13
- package/dist/web/client/assets/message-queue-sSljtjYz.js +0 -1
- package/dist/web/client/assets/mutation-DOi2Qgfa.js +0 -1
- package/dist/web/client/assets/notify-Cqdu6EV8.js +0 -1
- package/dist/web/client/assets/openui-renderer-BdYTcn-_.js +0 -291
- package/dist/web/client/assets/provider-label-QrVOwKBO.js +0 -1
- package/dist/web/client/assets/right-panel-context-DHKWoetk.js +0 -1
- package/dist/web/client/assets/right-panel-registry-BaLZiKny.js +0 -2
- package/dist/web/client/assets/routes-BkFkhfO3.js +0 -16
- package/dist/web/client/assets/select-BhV4ikeN.js +0 -1
- package/dist/web/client/assets/settings-dialog-Dpt4Ha_m.js +0 -2
- package/dist/web/client/assets/sparkles-BwVa9zQJ.js +0 -1
- package/dist/web/client/assets/subagent-transcript-CNQ9wGk2.js +0 -1
- package/dist/web/client/assets/switch-C7Myu-Dt.js +0 -1
- package/dist/web/client/assets/toast-DlbKi6K-.js +0 -1
- package/dist/web/client/assets/tool-part-normalizer-CYK62WZM.js +0 -4
- package/dist/web/client/assets/tool-result-bjAGZ2qm.js +0 -5
- package/dist/web/client/assets/tool-timeline-eNqH1zj7.js +0 -2
- package/dist/web/client/assets/types-D5hZ8IyV.js +0 -1
- package/dist/web/client/assets/useRender-Bbk_fl72.js +0 -1
- package/dist/web/server/chunk-2PAW6K4Q.js +0 -56
- package/dist/web/server/chunk-7L5PCCYR.js +0 -2287
- package/dist/web/server/chunk-FB3UHLLN.js +0 -49
- package/dist/web/server/chunk-OSPDNT7S.js +0 -25404
- package/dist/web/server/router-DVKxZik_-254GZAJW.js +0 -30
- package/dist/web/server/routes-BTxAklRp-UM7ZTLLP.js +0 -140
- package/dist/web/server/session-tool-renderer-BZiOxtt1-T3ZGAQKX.js +0 -26
|
@@ -8,25 +8,17 @@ import {
|
|
|
8
8
|
getToolStatus,
|
|
9
9
|
useElapsedTime,
|
|
10
10
|
useToolComplete
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-R4BS3KYI.js";
|
|
12
12
|
import {
|
|
13
|
+
ActionSwapRollText,
|
|
14
|
+
AgentDisclosure,
|
|
13
15
|
CodeBlock,
|
|
14
16
|
FileDiff,
|
|
15
17
|
ToolResult,
|
|
16
18
|
ToolResultOutput
|
|
17
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-KBMRRJQN.js";
|
|
18
20
|
import {
|
|
19
|
-
ActionSwapRollText,
|
|
20
|
-
AgentDisclosure,
|
|
21
|
-
Collapsible$1,
|
|
22
|
-
CollapsibleContent,
|
|
23
|
-
CollapsibleTrigger,
|
|
24
|
-
EASE_IN_OUT,
|
|
25
|
-
EASE_OUT,
|
|
26
21
|
LazyMarkdown,
|
|
27
|
-
SPRING_LAYOUT,
|
|
28
|
-
SPRING_PRESS,
|
|
29
|
-
SPRING_SWAP,
|
|
30
22
|
Trace,
|
|
31
23
|
TraceCollapsible,
|
|
32
24
|
TraceCollapsibleContent,
|
|
@@ -35,19 +27,37 @@ import {
|
|
|
35
27
|
TraceIcon,
|
|
36
28
|
TraceLine,
|
|
37
29
|
TraceTitle,
|
|
38
|
-
isSafeExternalUrl,
|
|
39
|
-
mono,
|
|
40
30
|
normalizeToolPart$1,
|
|
41
31
|
stripSandboxPrefixes,
|
|
42
32
|
toolActionIconForName,
|
|
43
|
-
useHoverCapable
|
|
33
|
+
useHoverCapable
|
|
34
|
+
} from "./chunk-V2GCVTDP.js";
|
|
35
|
+
import {
|
|
36
|
+
Collapsible$1,
|
|
37
|
+
CollapsibleContent,
|
|
38
|
+
CollapsibleTrigger
|
|
39
|
+
} from "./chunk-5MOXRFX6.js";
|
|
40
|
+
import {
|
|
41
|
+
EASE_IN_OUT,
|
|
42
|
+
EASE_OUT,
|
|
43
|
+
SPRING_LAYOUT,
|
|
44
|
+
SPRING_PRESS,
|
|
45
|
+
SPRING_SWAP
|
|
46
|
+
} from "./chunk-RX2ZJARF.js";
|
|
47
|
+
import {
|
|
48
|
+
isSafeExternalUrl
|
|
49
|
+
} from "./chunk-TQ2RECTH.js";
|
|
50
|
+
import {
|
|
44
51
|
useRender
|
|
45
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-CE7U5QB2.js";
|
|
46
53
|
import {
|
|
47
54
|
AnimatePresence,
|
|
48
55
|
m,
|
|
49
56
|
useReducedMotion
|
|
50
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-7DQQMT5V.js";
|
|
58
|
+
import {
|
|
59
|
+
mono
|
|
60
|
+
} from "./chunk-TXZDDJCT.js";
|
|
51
61
|
import {
|
|
52
62
|
bundledLanguages,
|
|
53
63
|
createHighlighter,
|
|
@@ -57,18 +67,17 @@ import {
|
|
|
57
67
|
toHtml
|
|
58
68
|
} from "./chunk-2UGQEBXG.js";
|
|
59
69
|
import {
|
|
60
|
-
__exportAll
|
|
61
|
-
|
|
62
|
-
} from "./chunk-2FHYWKDN.js";
|
|
70
|
+
__exportAll
|
|
71
|
+
} from "./chunk-OO7NBFQQ.js";
|
|
63
72
|
import {
|
|
64
|
-
cva
|
|
65
|
-
|
|
73
|
+
cva,
|
|
74
|
+
mergeProps
|
|
75
|
+
} from "./chunk-FSQWWR2M.js";
|
|
66
76
|
import {
|
|
67
77
|
ArrowUpRight,
|
|
68
78
|
Check,
|
|
69
79
|
ChevronDown,
|
|
70
80
|
ChevronRight,
|
|
71
|
-
ChevronUp,
|
|
72
81
|
ChevronsDown,
|
|
73
82
|
ChevronsUp,
|
|
74
83
|
Circle,
|
|
@@ -87,20 +96,17 @@ import {
|
|
|
87
96
|
ListTodo,
|
|
88
97
|
LoaderCircle,
|
|
89
98
|
LogOut,
|
|
90
|
-
MessageCircleQuestionMark,
|
|
91
99
|
RotateCcw,
|
|
92
100
|
Route,
|
|
93
101
|
Search,
|
|
94
102
|
ShieldCheck,
|
|
95
103
|
Sparkles,
|
|
96
104
|
Terminal,
|
|
97
|
-
X
|
|
98
|
-
} from "./chunk-7L5PCCYR.js";
|
|
99
|
-
import {
|
|
105
|
+
X,
|
|
100
106
|
cn
|
|
101
|
-
} from "./chunk-
|
|
107
|
+
} from "./chunk-VDEUVEWL.js";
|
|
102
108
|
|
|
103
|
-
// web/app/dist/server/assets/session-tool-renderer-
|
|
109
|
+
// web/app/dist/server/assets/session-tool-renderer-Cg_ZPHxS.js
|
|
104
110
|
import React, { memo, useCallback as useCallback4, useEffect as useEffect3, useId, useLayoutEffect as useLayoutEffect2, useMemo as useMemo2, useRef as useRef3, useState as useState4 } from "react";
|
|
105
111
|
import { Fragment as Fragment$1, jsx as jsx7, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
106
112
|
|
|
@@ -12242,7 +12248,7 @@ function MultiFileDiff({ oldFile, newFile, options, editorOptions, editStateKey,
|
|
|
12242
12248
|
});
|
|
12243
12249
|
}
|
|
12244
12250
|
|
|
12245
|
-
// web/app/dist/server/assets/session-tool-renderer-
|
|
12251
|
+
// web/app/dist/server/assets/session-tool-renderer-Cg_ZPHxS.js
|
|
12246
12252
|
function getFaviconUrl(value) {
|
|
12247
12253
|
try {
|
|
12248
12254
|
return new URL("/favicon.ico", value).toString();
|
|
@@ -13281,324 +13287,6 @@ function ToolApproval({ tool, title = "Allow this tool to run?", description, pa
|
|
|
13281
13287
|
] })]
|
|
13282
13288
|
});
|
|
13283
13289
|
}
|
|
13284
|
-
var QUESTION_CUSTOM_ID = "__custom__";
|
|
13285
|
-
function optionBadge(idx) {
|
|
13286
|
-
return String.fromCharCode(65 + idx);
|
|
13287
|
-
}
|
|
13288
|
-
function seedPromptState(initialAnswer, questionKind, customEnabled) {
|
|
13289
|
-
if (!initialAnswer || initialAnswer.kind === "skip") return {
|
|
13290
|
-
selectedIds: [],
|
|
13291
|
-
customText: "",
|
|
13292
|
-
textValue: ""
|
|
13293
|
-
};
|
|
13294
|
-
if (questionKind === "text") return {
|
|
13295
|
-
selectedIds: [],
|
|
13296
|
-
customText: "",
|
|
13297
|
-
textValue: initialAnswer.text ?? ""
|
|
13298
|
-
};
|
|
13299
|
-
const nextSelected = new Set(initialAnswer.selectedIds ?? []);
|
|
13300
|
-
const nextCustomText = initialAnswer.text ?? "";
|
|
13301
|
-
if (customEnabled && nextCustomText.trim().length > 0) nextSelected.add(QUESTION_CUSTOM_ID);
|
|
13302
|
-
return {
|
|
13303
|
-
selectedIds: Array.from(nextSelected),
|
|
13304
|
-
customText: nextCustomText,
|
|
13305
|
-
textValue: ""
|
|
13306
|
-
};
|
|
13307
|
-
}
|
|
13308
|
-
function QuestionPrompt({ questions, questionIndex = 1, totalQuestions, onPreviousQuestion, onNextQuestion, submitLabel = "Send", nextLabel = "Next", skipLabel = "Skip", allowSkip = true, initialAnswer, onSubmit, onSkip, className }) {
|
|
13309
|
-
const resolvedTotal = totalQuestions ?? questions.length;
|
|
13310
|
-
const clampedIndex = Math.max(1, Math.min(questionIndex, resolvedTotal));
|
|
13311
|
-
const activeQuestion = questions[clampedIndex - 1];
|
|
13312
|
-
const customEnabled = activeQuestion?.allowCustom ?? false;
|
|
13313
|
-
const [selectedIds, setSelectedIds] = useState4(() => seedPromptState(initialAnswer, activeQuestion?.kind, customEnabled).selectedIds);
|
|
13314
|
-
const [customText, setCustomText] = useState4(() => seedPromptState(initialAnswer, activeQuestion?.kind, customEnabled).customText);
|
|
13315
|
-
const [textValue, setTextValue] = useState4(() => seedPromptState(initialAnswer, activeQuestion?.kind, customEnabled).textValue);
|
|
13316
|
-
const showNav = resolvedTotal > 1 && (!!onPreviousQuestion || !!onNextQuestion);
|
|
13317
|
-
const canGoPrev = clampedIndex > 1;
|
|
13318
|
-
const canGoNext = clampedIndex < resolvedTotal;
|
|
13319
|
-
const isLastQuestion = clampedIndex >= resolvedTotal;
|
|
13320
|
-
const selectedIdSet = useMemo2(() => new Set(selectedIds), [selectedIds]);
|
|
13321
|
-
const primaryLabel = isLastQuestion ? submitLabel : nextLabel;
|
|
13322
|
-
const canSubmit = useMemo2(() => {
|
|
13323
|
-
if (activeQuestion?.kind === "text") return textValue.trim().length > 0;
|
|
13324
|
-
const total = selectedIds.filter((id) => id !== QUESTION_CUSTOM_ID).length + (customText.trim().length > 0 ? 1 : 0);
|
|
13325
|
-
if (activeQuestion?.kind === "single") return total === 1;
|
|
13326
|
-
const min = activeQuestion?.minSelections ?? 1;
|
|
13327
|
-
const max = activeQuestion?.maxSelections;
|
|
13328
|
-
if (total < min) return false;
|
|
13329
|
-
if (typeof max === "number" && total > max) return false;
|
|
13330
|
-
return total > 0;
|
|
13331
|
-
}, [
|
|
13332
|
-
activeQuestion?.kind,
|
|
13333
|
-
activeQuestion?.minSelections,
|
|
13334
|
-
activeQuestion?.maxSelections,
|
|
13335
|
-
selectedIds,
|
|
13336
|
-
customText,
|
|
13337
|
-
textValue
|
|
13338
|
-
]);
|
|
13339
|
-
const toggleMulti = (id) => {
|
|
13340
|
-
setSelectedIds((prev) => prev.includes(id) ? prev.filter((x) => x !== id) : [...prev, id]);
|
|
13341
|
-
};
|
|
13342
|
-
const handleSingleSelect = (id) => {
|
|
13343
|
-
setSelectedIds([id]);
|
|
13344
|
-
};
|
|
13345
|
-
const handleCustomTextChange = (nextValue) => {
|
|
13346
|
-
setCustomText(nextValue);
|
|
13347
|
-
if (!activeQuestion) return;
|
|
13348
|
-
if (activeQuestion.kind === "single") {
|
|
13349
|
-
setSelectedIds(nextValue.trim().length > 0 ? [QUESTION_CUSTOM_ID] : []);
|
|
13350
|
-
return;
|
|
13351
|
-
}
|
|
13352
|
-
setSelectedIds((prev) => {
|
|
13353
|
-
const hasCustom = prev.includes(QUESTION_CUSTOM_ID);
|
|
13354
|
-
if (nextValue.trim().length > 0 && !hasCustom) return [...prev, QUESTION_CUSTOM_ID];
|
|
13355
|
-
if (nextValue.trim().length === 0 && hasCustom) return prev.filter((id) => id !== QUESTION_CUSTOM_ID);
|
|
13356
|
-
return prev;
|
|
13357
|
-
});
|
|
13358
|
-
};
|
|
13359
|
-
const handleSubmit = () => {
|
|
13360
|
-
if (!canSubmit || !activeQuestion) return;
|
|
13361
|
-
if (activeQuestion.kind === "text") {
|
|
13362
|
-
onSubmit({
|
|
13363
|
-
kind: "text",
|
|
13364
|
-
questionId: activeQuestion.id,
|
|
13365
|
-
text: textValue.trim()
|
|
13366
|
-
});
|
|
13367
|
-
return;
|
|
13368
|
-
}
|
|
13369
|
-
const selectedNonCustom = selectedIds.filter((id) => id !== QUESTION_CUSTOM_ID);
|
|
13370
|
-
const answerText = customText.trim() || void 0;
|
|
13371
|
-
onSubmit({
|
|
13372
|
-
kind: activeQuestion.kind,
|
|
13373
|
-
questionId: activeQuestion.id,
|
|
13374
|
-
selectedIds: selectedNonCustom,
|
|
13375
|
-
text: answerText || void 0
|
|
13376
|
-
});
|
|
13377
|
-
};
|
|
13378
|
-
const handleSkip = () => {
|
|
13379
|
-
onSkip?.();
|
|
13380
|
-
onSubmit({ kind: "skip" });
|
|
13381
|
-
};
|
|
13382
|
-
if (!activeQuestion) return null;
|
|
13383
|
-
return /* @__PURE__ */ jsxs3("div", {
|
|
13384
|
-
className: cn("flex flex-col gap-2 bg-background px-3 py-2", className),
|
|
13385
|
-
children: [
|
|
13386
|
-
/* @__PURE__ */ jsx7("div", {
|
|
13387
|
-
className: "flex items-center justify-between gap-px",
|
|
13388
|
-
"data-total-questions": resolvedTotal,
|
|
13389
|
-
children: /* @__PURE__ */ jsxs3("div", {
|
|
13390
|
-
className: "flex items-center gap-2 text-sm text-foreground",
|
|
13391
|
-
children: [/* @__PURE__ */ jsx7("span", {
|
|
13392
|
-
className: "inline-flex h-5 min-w-5 items-center justify-center rounded px-1 text-sm font-medium text-muted-foreground",
|
|
13393
|
-
children: clampedIndex
|
|
13394
|
-
}), /* @__PURE__ */ jsx7("span", { children: activeQuestion.title })]
|
|
13395
|
-
})
|
|
13396
|
-
}),
|
|
13397
|
-
activeQuestion.kind !== "text" && (activeQuestion.options?.length ?? 0) > 0 && /* @__PURE__ */ jsxs3("div", {
|
|
13398
|
-
className: "flex flex-col gap-px",
|
|
13399
|
-
children: [activeQuestion.options.map((option, idx) => {
|
|
13400
|
-
const optionId = option.id ?? option.value ?? option.label;
|
|
13401
|
-
const checked = selectedIdSet.has(optionId);
|
|
13402
|
-
return /* @__PURE__ */ jsxs3("button", {
|
|
13403
|
-
type: "button",
|
|
13404
|
-
onClick: () => {
|
|
13405
|
-
if (activeQuestion.kind === "single") {
|
|
13406
|
-
handleSingleSelect(optionId);
|
|
13407
|
-
if (customEnabled) setCustomText("");
|
|
13408
|
-
} else toggleMulti(optionId);
|
|
13409
|
-
},
|
|
13410
|
-
className: "-mx-2 flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-left hover:bg-secondary",
|
|
13411
|
-
children: [/* @__PURE__ */ jsx7("span", {
|
|
13412
|
-
className: cn("inline-flex h-5 min-w-5 items-center justify-center rounded border px-1 text-sm font-medium", checked ? "border-primary bg-primary text-primary-foreground" : "border-border bg-transparent text-muted-foreground"),
|
|
13413
|
-
children: optionBadge(idx)
|
|
13414
|
-
}), /* @__PURE__ */ jsxs3("span", {
|
|
13415
|
-
className: "text-sm text-foreground",
|
|
13416
|
-
children: [option.label, option.description && /* @__PURE__ */ jsxs3("span", {
|
|
13417
|
-
className: "text-muted-foreground",
|
|
13418
|
-
children: [" ", option.description]
|
|
13419
|
-
})]
|
|
13420
|
-
})]
|
|
13421
|
-
}, optionId);
|
|
13422
|
-
}), customEnabled && /* @__PURE__ */ jsxs3("div", {
|
|
13423
|
-
className: "flex items-center gap-2 pt-1",
|
|
13424
|
-
children: [/* @__PURE__ */ jsx7("span", {
|
|
13425
|
-
className: cn("inline-flex h-5 min-w-5 items-center justify-center rounded border px-1 text-sm font-medium", selectedIds.includes(QUESTION_CUSTOM_ID) ? "border-primary bg-primary text-primary-foreground" : "border-border bg-transparent text-muted-foreground"),
|
|
13426
|
-
children: optionBadge(activeQuestion.options.length)
|
|
13427
|
-
}), /* @__PURE__ */ jsx7("input", {
|
|
13428
|
-
value: customText,
|
|
13429
|
-
onChange: (event) => handleCustomTextChange(event.target.value),
|
|
13430
|
-
placeholder: activeQuestion.customPlaceholder ?? "Type your answer",
|
|
13431
|
-
className: "h-7 w-full rounded-md border border-border bg-background px-2 text-base text-foreground md:text-sm"
|
|
13432
|
-
})]
|
|
13433
|
-
})]
|
|
13434
|
-
}),
|
|
13435
|
-
activeQuestion.kind === "text" && /* @__PURE__ */ jsx7("textarea", {
|
|
13436
|
-
value: textValue,
|
|
13437
|
-
onChange: (event) => setTextValue(event.target.value),
|
|
13438
|
-
placeholder: activeQuestion.placeholder ?? "Type your answer",
|
|
13439
|
-
rows: 3,
|
|
13440
|
-
className: "w-full resize-y rounded-md border border-border bg-background px-2 py-1.5 text-base text-foreground md:text-sm"
|
|
13441
|
-
}),
|
|
13442
|
-
/* @__PURE__ */ jsxs3("div", {
|
|
13443
|
-
className: cn("flex items-center gap-1.5", showNav ? "justify-between" : "justify-end"),
|
|
13444
|
-
children: [showNav && /* @__PURE__ */ jsxs3("div", {
|
|
13445
|
-
className: "flex items-center gap-1.5",
|
|
13446
|
-
children: [onPreviousQuestion && /* @__PURE__ */ jsx7("button", {
|
|
13447
|
-
type: "button",
|
|
13448
|
-
onClick: onPreviousQuestion,
|
|
13449
|
-
disabled: !canGoPrev,
|
|
13450
|
-
className: "h-6 rounded px-2 text-sm text-muted-foreground hover:text-foreground disabled:opacity-60",
|
|
13451
|
-
children: "Previous"
|
|
13452
|
-
}), onNextQuestion && /* @__PURE__ */ jsx7("button", {
|
|
13453
|
-
type: "button",
|
|
13454
|
-
onClick: onNextQuestion,
|
|
13455
|
-
disabled: !canGoNext,
|
|
13456
|
-
className: "h-6 rounded px-2 text-sm text-muted-foreground hover:text-foreground disabled:opacity-60",
|
|
13457
|
-
children: "Next"
|
|
13458
|
-
})]
|
|
13459
|
-
}), /* @__PURE__ */ jsxs3("div", {
|
|
13460
|
-
className: "flex items-center justify-end gap-1.5",
|
|
13461
|
-
children: [allowSkip && /* @__PURE__ */ jsx7("button", {
|
|
13462
|
-
type: "button",
|
|
13463
|
-
onClick: handleSkip,
|
|
13464
|
-
className: "h-6 rounded px-2 text-sm text-muted-foreground transition-[background-color,color,transform] duration-150 hover:bg-muted/50 hover:text-foreground enabled:active:scale-[0.96]",
|
|
13465
|
-
children: skipLabel
|
|
13466
|
-
}), /* @__PURE__ */ jsx7("button", {
|
|
13467
|
-
type: "button",
|
|
13468
|
-
onClick: handleSubmit,
|
|
13469
|
-
disabled: !canSubmit,
|
|
13470
|
-
className: "h-6 rounded bg-primary px-2.5 text-sm font-medium text-primary-foreground transition-[background-color,transform] duration-150 hover:bg-primary/90 enabled:active:scale-[0.96] disabled:opacity-60 disabled:hover:bg-primary",
|
|
13471
|
-
children: primaryLabel
|
|
13472
|
-
})]
|
|
13473
|
-
})]
|
|
13474
|
-
})
|
|
13475
|
-
]
|
|
13476
|
-
});
|
|
13477
|
-
}
|
|
13478
|
-
function formatAnswer(answer) {
|
|
13479
|
-
if (answer.kind === "skip") return "Skipped";
|
|
13480
|
-
if (answer.kind === "text") return answer.text || "Answered";
|
|
13481
|
-
const ids = answer.selectedIds?.length ? answer.selectedIds.join(", ") : "";
|
|
13482
|
-
if (answer.text) return ids ? `${ids} (${answer.text})` : answer.text;
|
|
13483
|
-
return ids || "Answered";
|
|
13484
|
-
}
|
|
13485
|
-
function QuestionTool({ part }) {
|
|
13486
|
-
const [localIndex, setLocalIndex] = useState4(part.input?.questionIndex ?? 1);
|
|
13487
|
-
const questions = part.input?.questions ?? [];
|
|
13488
|
-
const totalQuestions = part.input?.totalQuestions ?? questions.length;
|
|
13489
|
-
const isControlled = typeof part.input?.questionIndex === "number";
|
|
13490
|
-
const questionIndex = isControlled ? part.input?.questionIndex ?? 1 : questions.length > 0 ? localIndex : part.input?.questionIndex ?? 1;
|
|
13491
|
-
const clampedIndex = Math.max(1, Math.min(questionIndex, totalQuestions));
|
|
13492
|
-
const question = questions[clampedIndex - 1];
|
|
13493
|
-
const [localAnswers, setLocalAnswers] = useState4({});
|
|
13494
|
-
const [prevQuestionIndex, setPrevQuestionIndex] = useState4(part.input?.questionIndex);
|
|
13495
|
-
if (part.input?.questionIndex !== prevQuestionIndex) {
|
|
13496
|
-
setPrevQuestionIndex(part.input?.questionIndex);
|
|
13497
|
-
if (typeof part.input?.questionIndex === "number") setLocalIndex(part.input.questionIndex);
|
|
13498
|
-
}
|
|
13499
|
-
const [prevToolCallId, setPrevToolCallId] = useState4(part.toolCallId);
|
|
13500
|
-
if (part.toolCallId !== prevToolCallId) {
|
|
13501
|
-
setPrevToolCallId(part.toolCallId);
|
|
13502
|
-
setLocalAnswers({});
|
|
13503
|
-
setLocalIndex(part.input?.questionIndex ?? 1);
|
|
13504
|
-
}
|
|
13505
|
-
const outputAnswer = part.output?.answer;
|
|
13506
|
-
const answeredCount = Object.keys(localAnswers).length;
|
|
13507
|
-
const isComplete = totalQuestions === 1 ? !!outputAnswer || answeredCount >= 1 : totalQuestions > 0 && answeredCount >= totalQuestions;
|
|
13508
|
-
const showNavigation = totalQuestions > 1 && !isComplete;
|
|
13509
|
-
const canGoPrev = clampedIndex > 1;
|
|
13510
|
-
const canGoNext = clampedIndex < totalQuestions;
|
|
13511
|
-
const summaryAnswers = useMemo2(() => {
|
|
13512
|
-
if (!isComplete || totalQuestions <= 1) return [];
|
|
13513
|
-
return Array.from({ length: totalQuestions }, (_, idx) => ({
|
|
13514
|
-
index: idx + 1,
|
|
13515
|
-
answer: localAnswers[idx + 1]
|
|
13516
|
-
}));
|
|
13517
|
-
}, [
|
|
13518
|
-
isComplete,
|
|
13519
|
-
localAnswers,
|
|
13520
|
-
totalQuestions
|
|
13521
|
-
]);
|
|
13522
|
-
const summaryText = useMemo2(() => {
|
|
13523
|
-
if (!isComplete) return "";
|
|
13524
|
-
if (summaryAnswers.length > 0) return summaryAnswers.map((item) => `${item.index}: ${item.answer ? formatAnswer(item.answer) : "Pending"}`).join(" \u2022 ");
|
|
13525
|
-
if (outputAnswer) return formatAnswer(outputAnswer);
|
|
13526
|
-
if (localAnswers[clampedIndex]) return formatAnswer(localAnswers[clampedIndex]);
|
|
13527
|
-
return "Pending";
|
|
13528
|
-
}, [
|
|
13529
|
-
isComplete,
|
|
13530
|
-
summaryAnswers,
|
|
13531
|
-
outputAnswer,
|
|
13532
|
-
localAnswers,
|
|
13533
|
-
clampedIndex
|
|
13534
|
-
]);
|
|
13535
|
-
if (!question) return null;
|
|
13536
|
-
const goPrev = () => {
|
|
13537
|
-
if (!canGoPrev) return;
|
|
13538
|
-
part.input?.onPreviousQuestion?.();
|
|
13539
|
-
if (!isControlled) setLocalIndex((prev) => Math.max(1, prev - 1));
|
|
13540
|
-
};
|
|
13541
|
-
const goNext = () => {
|
|
13542
|
-
if (!canGoNext) return;
|
|
13543
|
-
part.input?.onNextQuestion?.();
|
|
13544
|
-
if (!isControlled) setLocalIndex((prev) => Math.min(totalQuestions, prev + 1));
|
|
13545
|
-
};
|
|
13546
|
-
return /* @__PURE__ */ jsxs3("div", {
|
|
13547
|
-
className: "overflow-hidden rounded-chat-tool border border-border bg-muted",
|
|
13548
|
-
children: [/* @__PURE__ */ jsxs3("div", {
|
|
13549
|
-
className: "flex h-7 items-center justify-between border-b border-border px-3 text-xs text-muted-foreground",
|
|
13550
|
-
children: [/* @__PURE__ */ jsxs3("div", {
|
|
13551
|
-
className: "inline-flex items-center gap-1.5",
|
|
13552
|
-
children: [/* @__PURE__ */ jsx7(MessageCircleQuestionMark, { className: "size-3.5" }), "Question"]
|
|
13553
|
-
}), showNavigation && /* @__PURE__ */ jsxs3("div", {
|
|
13554
|
-
className: "inline-flex items-center gap-1",
|
|
13555
|
-
children: [
|
|
13556
|
-
/* @__PURE__ */ jsx7("button", {
|
|
13557
|
-
type: "button",
|
|
13558
|
-
onClick: goPrev,
|
|
13559
|
-
disabled: !canGoPrev,
|
|
13560
|
-
className: "inline-flex size-5 items-center justify-center rounded-[4px] hover:bg-secondary disabled:opacity-40",
|
|
13561
|
-
"aria-label": "Previous question",
|
|
13562
|
-
children: /* @__PURE__ */ jsx7(ChevronUp, { className: "size-3.5" })
|
|
13563
|
-
}),
|
|
13564
|
-
/* @__PURE__ */ jsxs3("span", { children: [
|
|
13565
|
-
clampedIndex,
|
|
13566
|
-
" of ",
|
|
13567
|
-
totalQuestions
|
|
13568
|
-
] }),
|
|
13569
|
-
/* @__PURE__ */ jsx7("button", {
|
|
13570
|
-
type: "button",
|
|
13571
|
-
onClick: goNext,
|
|
13572
|
-
disabled: !canGoNext,
|
|
13573
|
-
className: "inline-flex size-5 items-center justify-center rounded-[4px] hover:bg-secondary disabled:opacity-40",
|
|
13574
|
-
"aria-label": "Next question",
|
|
13575
|
-
children: /* @__PURE__ */ jsx7(ChevronDown, { className: "size-3.5" })
|
|
13576
|
-
})
|
|
13577
|
-
]
|
|
13578
|
-
})]
|
|
13579
|
-
}), isComplete ? /* @__PURE__ */ jsx7("div", {
|
|
13580
|
-
className: "bg-background px-3 py-2 text-xs text-muted-foreground",
|
|
13581
|
-
children: summaryText
|
|
13582
|
-
}) : /* @__PURE__ */ jsx7(QuestionPrompt, {
|
|
13583
|
-
questions,
|
|
13584
|
-
questionIndex: clampedIndex,
|
|
13585
|
-
totalQuestions,
|
|
13586
|
-
initialAnswer: localAnswers[clampedIndex],
|
|
13587
|
-
submitLabel: part.input?.submitLabel,
|
|
13588
|
-
nextLabel: part.input?.nextLabel,
|
|
13589
|
-
skipLabel: part.input?.skipLabel,
|
|
13590
|
-
allowSkip: part.input?.allowSkip,
|
|
13591
|
-
onSubmit: (nextAnswer) => {
|
|
13592
|
-
setLocalAnswers((prev) => ({
|
|
13593
|
-
...prev,
|
|
13594
|
-
[clampedIndex]: nextAnswer
|
|
13595
|
-
}));
|
|
13596
|
-
part.input?.onSubmitAnswer?.(nextAnswer);
|
|
13597
|
-
if (clampedIndex < totalQuestions) goNext();
|
|
13598
|
-
}
|
|
13599
|
-
}, `${clampedIndex}-${question.title}`)]
|
|
13600
|
-
});
|
|
13601
|
-
}
|
|
13602
13290
|
function extractCommandSummary(cmd) {
|
|
13603
13291
|
return cmd.split("|").map((s) => s.trim().split(/\s+/)[0] ?? "").filter(Boolean).slice(0, 4).join(", ");
|
|
13604
13292
|
}
|
|
@@ -15008,11 +14696,6 @@ var ToolRenderer = memo(function ToolRenderer2({ part, nestedTools, chatStatus,
|
|
|
15008
14696
|
part,
|
|
15009
14697
|
chatStatus
|
|
15010
14698
|
});
|
|
15011
|
-
case "tool-Question":
|
|
15012
|
-
return /* @__PURE__ */ jsx7(QuestionTool, {
|
|
15013
|
-
part,
|
|
15014
|
-
chatStatus
|
|
15015
|
-
});
|
|
15016
14699
|
case "tool-Task":
|
|
15017
14700
|
case "tool-Agent": {
|
|
15018
14701
|
const labelBase = part.type === "tool-Agent" ? "Agent" : "Task";
|