tfy-web-components 0.0.34 → 0.0.35
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 +49 -58
- package/dist/Button-C77b7jpW.js +284 -0
- package/dist/Button-C77b7jpW.js.map +1 -0
- package/dist/CompositeItem-BGwD51jI.js +33 -0
- package/dist/CompositeItem-BGwD51jI.js.map +1 -0
- package/dist/CompositeList-D4xmSZ5V.js +291 -0
- package/dist/CompositeList-D4xmSZ5V.js.map +1 -0
- package/dist/CompositeRoot-BxrPc7F6.js +351 -0
- package/dist/CompositeRoot-BxrPc7F6.js.map +1 -0
- package/dist/DirectionContext-Pb9yafF5.js +11 -0
- package/dist/DirectionContext-Pb9yafF5.js.map +1 -0
- package/dist/FieldItemContext-DRVgx-D1.js +13 -0
- package/dist/FieldItemContext-DRVgx-D1.js.map +1 -0
- package/dist/{Input-BvwIpntS.js → Input-Dhmo6L2n.js} +100 -78
- package/dist/Input-Dhmo6L2n.js.map +1 -0
- package/dist/Modal-C4MUy9GD.js +696 -0
- package/dist/Modal-C4MUy9GD.js.map +1 -0
- package/dist/{MonacoEditorCore-xfpJ6z-E.js → MonacoEditorCore-n-df5f7I.js} +2 -2
- package/dist/{MonacoEditorCore-xfpJ6z-E.js.map → MonacoEditorCore-n-df5f7I.js.map} +1 -1
- package/dist/Popover-eC_vX5By.js +1074 -0
- package/dist/Popover-eC_vX5By.js.map +1 -0
- package/dist/ToolbarRootContext-B_HxjkNI.js +11 -0
- package/dist/ToolbarRootContext-B_HxjkNI.js.map +1 -0
- package/dist/Tooltip-BuGLP-PU.js +4096 -0
- package/dist/Tooltip-BuGLP-PU.js.map +1 -0
- package/dist/classNames-B1XpQHle.js +44 -0
- package/dist/classNames-B1XpQHle.js.map +1 -0
- package/dist/components/atoms/Accordion.d.ts +19 -37
- package/dist/components/atoms/Accordion.es.js +847 -78
- package/dist/components/atoms/Accordion.es.js.map +1 -1
- package/dist/components/atoms/AudioPlayer.es.js +9 -9
- package/dist/components/atoms/AudioPlayer.es.js.map +1 -1
- package/dist/components/atoms/Avatar.d.ts +42 -9
- package/dist/components/atoms/Avatar.es.js +491 -36
- package/dist/components/atoms/Avatar.es.js.map +1 -1
- package/dist/components/atoms/Badge.d.ts +40 -35
- package/dist/components/atoms/Badge.es.js +163 -53
- package/dist/components/atoms/Badge.es.js.map +1 -1
- package/dist/components/atoms/Button.d.ts +37 -16
- package/dist/components/atoms/Button.es.js +16 -221
- package/dist/components/atoms/Button.es.js.map +1 -1
- package/dist/components/atoms/ButtonGroup.d.ts +53 -0
- package/dist/components/atoms/ButtonGroup.es.js +349 -0
- package/dist/components/atoms/ButtonGroup.es.js.map +1 -0
- package/dist/components/atoms/IconButton.d.ts +23 -9
- package/dist/components/atoms/IconButton.es.js +82 -16
- package/dist/components/atoms/IconButton.es.js.map +1 -1
- package/dist/components/atoms/IconProvider.d.ts +1 -1
- package/dist/components/atoms/IconProvider.es.js +48 -7
- package/dist/components/atoms/IconProvider.es.js.map +1 -1
- package/dist/components/atoms/Modal.d.ts +27 -3
- package/dist/components/atoms/Modal.es.js +15 -16
- package/dist/components/atoms/Modal.es.js.map +1 -1
- package/dist/components/atoms/Notification.d.ts +1 -1
- package/dist/components/atoms/Notification.es.js +26 -3
- package/dist/components/atoms/Notification.es.js.map +1 -1
- package/dist/components/atoms/OutlinedRadio.d.ts +6 -2
- package/dist/components/atoms/OutlinedRadio.es.js +12 -25
- package/dist/components/atoms/OutlinedRadio.es.js.map +1 -1
- package/dist/components/atoms/Progress.d.ts +48 -0
- package/dist/components/atoms/Progress.es.js +279 -0
- package/dist/components/atoms/Progress.es.js.map +1 -0
- package/dist/components/atoms/Skeleton.d.ts +9 -3
- package/dist/components/atoms/Skeleton.es.js +33 -3
- package/dist/components/atoms/Skeleton.es.js.map +1 -1
- package/dist/components/atoms/Spinner.d.ts +15 -4
- package/dist/components/atoms/Spinner.es.js +86 -22
- package/dist/components/atoms/Spinner.es.js.map +1 -1
- package/dist/components/atoms/Switch.d.ts +19 -7
- package/dist/components/atoms/Switch.es.js +288 -50
- package/dist/components/atoms/Switch.es.js.map +1 -1
- package/dist/components/atoms/TabButton.d.ts +17 -3
- package/dist/components/atoms/TabButton.es.js +647 -25
- package/dist/components/atoms/TabButton.es.js.map +1 -1
- package/dist/components/atoms/TabPanel.es.js +1 -1
- package/dist/components/atoms/Tag.d.ts +43 -0
- package/dist/components/atoms/Tag.es.js +219 -0
- package/dist/components/atoms/Tag.es.js.map +1 -0
- package/dist/components/atoms/Tooltip.d.ts +36 -14
- package/dist/components/atoms/Tooltip.es.js +7 -114
- package/dist/components/atoms/Tooltip.es.js.map +1 -1
- package/dist/components/molecules/Alert.d.ts +1 -1
- package/dist/components/molecules/Alert.es.js +13 -9
- package/dist/components/molecules/Alert.es.js.map +1 -1
- package/dist/components/molecules/CopyField.d.ts +2 -2
- package/dist/components/molecules/CopyField.es.js +3 -4
- package/dist/components/molecules/CopyField.es.js.map +1 -1
- package/dist/components/molecules/CustomDrawer.d.ts +5 -4
- package/dist/components/molecules/CustomDrawer.es.js +141 -82
- package/dist/components/molecules/CustomDrawer.es.js.map +1 -1
- package/dist/components/molecules/Dialog.d.ts +16 -8
- package/dist/components/molecules/Dialog.es.js +33 -31
- package/dist/components/molecules/Dialog.es.js.map +1 -1
- package/dist/components/molecules/ImagesPreview.es.js +15 -11
- package/dist/components/molecules/ImagesPreview.es.js.map +1 -1
- package/dist/components/molecules/Input.d.ts +1 -1
- package/dist/components/molecules/Input.es.js +3 -5
- package/dist/components/molecules/Input.es.js.map +1 -1
- package/dist/components/molecules/Markdown/ExpandableMarkdown.d.ts +8 -8
- package/dist/components/molecules/Markdown/components.d.ts +12 -11
- package/dist/components/molecules/Markdown.es.js +26 -49
- package/dist/components/molecules/Markdown.es.js.map +1 -1
- package/dist/components/molecules/Notify.d.ts +30 -1
- package/dist/components/molecules/Notify.es.js +91 -36
- package/dist/components/molecules/Notify.es.js.map +1 -1
- package/dist/components/molecules/SimpleCodeEditor.es.js +32 -19
- package/dist/components/molecules/SimpleCodeEditor.es.js.map +1 -1
- package/dist/components/molecules/ToggleButton.d.ts +3 -2
- package/dist/components/molecules/ToggleButton.es.js +155 -57
- package/dist/components/molecules/ToggleButton.es.js.map +1 -1
- package/dist/components/molecules/agent-chat/UserMessage.es.js +2 -2
- package/dist/components/molecules/agent-chat/UserMessage.es.js.map +1 -1
- package/dist/components/molecules/agent-chat/UserMessageEdit.es.js +5 -5
- package/dist/components/molecules/agent-chat/UserMessageEdit.es.js.map +1 -1
- package/dist/components/molecules/agent-chat/index.d.ts +0 -6
- package/dist/components/molecules/agent-chat.es.js +76 -407
- package/dist/components/molecules/agent-chat.es.js.map +1 -1
- package/dist/components/molecules/monacoEditorCore/MonacoEditorCore.d.ts +0 -1
- package/dist/components/theme/colors.d.ts +17 -53
- package/dist/components/theme/colors.es.js +384 -180
- package/dist/components/theme/colors.es.js.map +1 -1
- package/dist/components/theme/theme.d.ts +14 -11
- package/dist/components/theme/theme.es.js +3 -64
- package/dist/components/theme/theme.es.js.map +1 -1
- package/dist/components/theme/useTheme.es.js +1 -4
- package/dist/components/theme/useTheme.es.js.map +1 -1
- package/dist/composite-CrCQWAKA.js +108 -0
- package/dist/composite-CrCQWAKA.js.map +1 -0
- package/dist/composite-DCpXNxz9.js +66 -0
- package/dist/composite-DCpXNxz9.js.map +1 -0
- package/dist/conversions-CbWPvHRE.js +14 -0
- package/dist/conversions-CbWPvHRE.js.map +1 -0
- package/dist/error-FX4R42W-.js +6 -0
- package/dist/error-FX4R42W-.js.map +1 -0
- package/dist/fonts.css +7 -0
- package/dist/hooks/useContainerDimensions.d.ts +1 -1
- package/dist/index-B806bfA-.js +257 -0
- package/dist/index-B806bfA-.js.map +1 -0
- package/dist/index-DSVg79g-.js +45 -0
- package/dist/index-DSVg79g-.js.map +1 -0
- package/dist/index.d.ts +19 -4
- package/dist/index.es.js +56 -9
- package/dist/index.es.js.map +1 -1
- package/dist/inertValue-IJM5NA30.js +11 -0
- package/dist/inertValue-IJM5NA30.js.map +1 -0
- package/dist/lib/utils.d.ts +1 -0
- package/dist/markdown.css +13 -14
- package/dist/new-components/atoms/Checkbox.d.ts +6 -0
- package/dist/new-components/atoms/Checkbox.es.js +423 -0
- package/dist/new-components/atoms/Checkbox.es.js.map +1 -0
- package/dist/new-components/atoms/Chip.d.ts +38 -0
- package/dist/new-components/atoms/Chip.es.js +269 -0
- package/dist/new-components/atoms/Chip.es.js.map +1 -0
- package/dist/new-components/atoms/Popover.d.ts +87 -0
- package/dist/new-components/atoms/Popover.es.js +21 -0
- package/dist/new-components/atoms/Popover.es.js.map +1 -0
- package/dist/new-components/atoms/Radio.d.ts +14 -0
- package/dist/new-components/atoms/Radio.es.js +536 -0
- package/dist/new-components/atoms/Radio.es.js.map +1 -0
- package/dist/new-components/atoms/SegmentedControl.d.ts +28 -0
- package/dist/new-components/atoms/SegmentedControl.es.js +326 -0
- package/dist/new-components/atoms/SegmentedControl.es.js.map +1 -0
- package/dist/new-components/atoms/Slider.d.ts +8 -0
- package/dist/new-components/atoms/Slider.es.js +1415 -0
- package/dist/new-components/atoms/Slider.es.js.map +1 -0
- package/dist/new-components/atoms/Toggletip.d.ts +43 -0
- package/dist/new-components/atoms/Toggletip.es.js +216 -0
- package/dist/new-components/atoms/Toggletip.es.js.map +1 -0
- package/dist/new-components/atoms/stories/ThemeComparison.d.ts +8 -0
- package/dist/shadowDom-Bq4g0Qeu.js +52 -0
- package/dist/shadowDom-Bq4g0Qeu.js.map +1 -0
- package/dist/style.css +1 -1
- package/dist/theme.css +9 -154
- package/dist/tokens.css +1136 -0
- package/dist/useAnimationFrame-DwhymJoW.js +108 -0
- package/dist/useAnimationFrame-DwhymJoW.js.map +1 -0
- package/dist/useAriaLabelledBy-B6n92QBS.js +49 -0
- package/dist/useAriaLabelledBy-B6n92QBS.js.map +1 -0
- package/dist/useBaseUiId-Ch7ujXpo.js +281 -0
- package/dist/useBaseUiId-Ch7ujXpo.js.map +1 -0
- package/dist/useButton-PUBhT4Vo.js +235 -0
- package/dist/useButton-PUBhT4Vo.js.map +1 -0
- package/dist/useControlled-BSyYkg5C.js +65 -0
- package/dist/useControlled-BSyYkg5C.js.map +1 -0
- package/dist/useIsoLayoutEffect-e9VA-ICd.js +499 -0
- package/dist/useIsoLayoutEffect-e9VA-ICd.js.map +1 -0
- package/dist/useLabelableId-DCLzrdD-.js +241 -0
- package/dist/useLabelableId-DCLzrdD-.js.map +1 -0
- package/dist/useOpenInteractionType-DGWLoAqp.js +1086 -0
- package/dist/useOpenInteractionType-DGWLoAqp.js.map +1 -0
- package/dist/usePopupHandleStore-BdS-xYID.js +2372 -0
- package/dist/usePopupHandleStore-BdS-xYID.js.map +1 -0
- package/dist/useTimeout-BXf1hDIL.js +46 -0
- package/dist/useTimeout-BXf1hDIL.js.map +1 -0
- package/dist/useTransitionStatus-C9gg_XJ-.js +202 -0
- package/dist/useTransitionStatus-C9gg_XJ-.js.map +1 -0
- package/dist/useValueAsRef-BfFRcMg6.js +28 -0
- package/dist/useValueAsRef-BfFRcMg6.js.map +1 -0
- package/dist/utils/classNames.d.ts +3 -2
- package/dist/visuallyHidden-B6H2X3_Y.js +26 -0
- package/dist/visuallyHidden-B6H2X3_Y.js.map +1 -0
- package/dist/vite-env.d.ts +18 -0
- package/package.json +30 -22
- package/dist/Input-BvwIpntS.js.map +0 -1
- package/dist/Notification-BT4CZ69U.js +0 -39
- package/dist/Notification-BT4CZ69U.js.map +0 -1
- package/dist/RootFontSizeContext-7vgn7Y_k.js +0 -22
- package/dist/RootFontSizeContext-7vgn7Y_k.js.map +0 -1
- package/dist/classNames-Dy-RXSjS.js +0 -9
- package/dist/classNames-Dy-RXSjS.js.map +0 -1
- package/dist/components/molecules/DropdownMenu.d.ts +0 -18
- package/dist/components/molecules/DropdownMenu.es.js +0 -104
- package/dist/components/molecules/DropdownMenu.es.js.map +0 -1
- package/dist/components/molecules/ThumbsFeedback.d.ts +0 -13
- package/dist/components/molecules/ThumbsFeedback.es.js +0 -98
- package/dist/components/molecules/ThumbsFeedback.es.js.map +0 -1
- package/dist/components/molecules/agent-chat/SandboxToolCall.d.ts +0 -15
- package/dist/components/molecules/agent-chat/ToolCallCard.d.ts +0 -26
- package/dist/components/molecules/agent-chat/ToolCallContentBlock.d.ts +0 -17
- package/dist/components/theme/lightColorPlugin.d.ts +0 -1
- package/dist/components/theme/lightColorPlugin.es.js +0 -92
- package/dist/components/theme/lightColorPlugin.es.js.map +0 -1
- package/dist/tailwindPreset.d.ts +0 -144
- package/dist/tailwindPreset.es.js +0 -100
- package/dist/tailwindPreset.es.js.map +0 -1
|
@@ -1,18 +1,13 @@
|
|
|
1
1
|
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { c as classNames } from "../../classNames-
|
|
3
|
-
import { t as toDataTestId } from "../../
|
|
2
|
+
import { c as classNames } from "../../classNames-B1XpQHle.js";
|
|
3
|
+
import { t as toDataTestId } from "../../conversions-CbWPvHRE.js";
|
|
4
4
|
import IconProvider from "../atoms/IconProvider.es.js";
|
|
5
5
|
import Spinner from "../atoms/Spinner.es.js";
|
|
6
|
-
import {
|
|
7
|
-
import { colors } from "../theme/theme.es.js";
|
|
8
|
-
import { useTheme } from "../theme/useTheme.es.js";
|
|
9
|
-
import { Button } from "../atoms/Button.es.js";
|
|
6
|
+
import { B as Button } from "../../Button-C77b7jpW.js";
|
|
10
7
|
import IconButton from "../atoms/IconButton.es.js";
|
|
11
8
|
import OutlinedRadio from "../atoms/OutlinedRadio.es.js";
|
|
12
|
-
import { I as Input, M as Markdown
|
|
9
|
+
import { I as Input, M as Markdown } from "../../Input-Dhmo6L2n.js";
|
|
13
10
|
import Badge from "../atoms/Badge.es.js";
|
|
14
|
-
import SimpleCodeEditor from "./SimpleCodeEditor.es.js";
|
|
15
|
-
import ToggleButton from "./ToggleButton.es.js";
|
|
16
11
|
import { default as default2 } from "./agent-chat/UserMessage.es.js";
|
|
17
12
|
import { default as default3 } from "./agent-chat/UserMessageEdit.es.js";
|
|
18
13
|
const StatusDot = ({ className, colorClassName = "bg-orange-500" }) => {
|
|
@@ -43,8 +38,8 @@ const StepIconBox = ({
|
|
|
43
38
|
size: iconSize,
|
|
44
39
|
className: classNames(
|
|
45
40
|
{
|
|
46
|
-
"text-
|
|
47
|
-
"text-
|
|
41
|
+
"text-text-brand": variant === "primary",
|
|
42
|
+
"text-text-secondary": variant === "muted"
|
|
48
43
|
},
|
|
49
44
|
iconClassName
|
|
50
45
|
)
|
|
@@ -102,7 +97,7 @@ const AgentStepRow = ({
|
|
|
102
97
|
icon: "chevron-right",
|
|
103
98
|
size: 0.5,
|
|
104
99
|
className: classNames(
|
|
105
|
-
"text-
|
|
100
|
+
"text-text-secondary transition-transform duration-300 shrink-0",
|
|
106
101
|
expanded && "rotate-90"
|
|
107
102
|
)
|
|
108
103
|
}
|
|
@@ -127,13 +122,13 @@ const AgentStepRow = ({
|
|
|
127
122
|
}),
|
|
128
123
|
onClick: showExpandChevron ? onToggle : void 0,
|
|
129
124
|
children: [
|
|
130
|
-
label && /* @__PURE__ */ jsx("span", { className: "text-xs font-medium text-
|
|
125
|
+
label && /* @__PURE__ */ jsx("span", { className: "text-xs font-medium text-text-tertiary font-sans leading-none", children: label }),
|
|
131
126
|
title && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 min-w-0", children: [
|
|
132
127
|
/* @__PURE__ */ jsx(
|
|
133
128
|
"span",
|
|
134
129
|
{
|
|
135
130
|
className: classNames(
|
|
136
|
-
"text-[0.75rem] font-medium leading-5 text-
|
|
131
|
+
"text-[0.75rem] font-medium leading-5 text-text-primary font-sans truncate min-w-0",
|
|
137
132
|
titleClassName
|
|
138
133
|
),
|
|
139
134
|
"data-test": dataTestPrefix && toDataTestId(dataTestPrefix, "title"),
|
|
@@ -143,7 +138,7 @@ const AgentStepRow = ({
|
|
|
143
138
|
isSuccess && /* @__PURE__ */ jsx(
|
|
144
139
|
IconProvider,
|
|
145
140
|
{
|
|
146
|
-
icon:
|
|
141
|
+
icon: "check-circle",
|
|
147
142
|
size: 0.875,
|
|
148
143
|
className: "text-green-600 shrink-0",
|
|
149
144
|
"data-test": dataTestPrefix && toDataTestId(dataTestPrefix, "success-icon")
|
|
@@ -153,7 +148,7 @@ const AgentStepRow = ({
|
|
|
153
148
|
body && /* @__PURE__ */ jsx(
|
|
154
149
|
"div",
|
|
155
150
|
{
|
|
156
|
-
className: "text-sm text-
|
|
151
|
+
className: "text-sm text-text-secondary font-sans mt-1",
|
|
157
152
|
onClick: (e) => {
|
|
158
153
|
if (expanded && showExpandChevron) {
|
|
159
154
|
e.stopPropagation();
|
|
@@ -169,7 +164,7 @@ const AgentStepRow = ({
|
|
|
169
164
|
/* @__PURE__ */ jsxs("div", { className: classNames("flex items-center gap-2 shrink-0", alignStart ? "self-start" : "self-center"), children: [
|
|
170
165
|
statusText && /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-1", children: [
|
|
171
166
|
isRunning && /* @__PURE__ */ jsx(StatusDot, { colorClassName: "bg-orange-500" }),
|
|
172
|
-
/* @__PURE__ */ jsx("span", { className: "text-
|
|
167
|
+
/* @__PURE__ */ jsx("span", { className: "text-text-primary text-xs font-medium leading-4 font-sans", children: statusText })
|
|
173
168
|
] }),
|
|
174
169
|
!statusText && isRunning && /* @__PURE__ */ jsx(Fragment, { children: showSpinner ? /* @__PURE__ */ jsx("div", { className: "ml-1", children: /* @__PURE__ */ jsx(Spinner, {}) }) : /* @__PURE__ */ jsx(StatusDot, { colorClassName: "bg-orange-500" }) }),
|
|
175
170
|
isError && /* @__PURE__ */ jsx(
|
|
@@ -190,7 +185,7 @@ const AgentStepRow = ({
|
|
|
190
185
|
"data-test": dataTestPrefix && toDataTestId(dataTestPrefix, "expanded-content"),
|
|
191
186
|
children: [
|
|
192
187
|
showChevronColumn && /* @__PURE__ */ jsx("div", { className: "w-5 shrink-0" }),
|
|
193
|
-
showContentConnector && showConnector && /* @__PURE__ */ jsx("div", { className: "flex justify-center shrink-0 w-3", children: /* @__PURE__ */ jsx("div", { className: "w-px bg-
|
|
188
|
+
showContentConnector && showConnector && /* @__PURE__ */ jsx("div", { className: "flex justify-center shrink-0 w-3", children: /* @__PURE__ */ jsx("div", { className: "w-px bg-border-default" }) }),
|
|
194
189
|
/* @__PURE__ */ jsx("div", { className: "flex-1 min-w-0", children })
|
|
195
190
|
]
|
|
196
191
|
}
|
|
@@ -202,7 +197,7 @@ const AgentStepRow = ({
|
|
|
202
197
|
"data-test": dataTestPrefix && toDataTestId(dataTestPrefix, "persistent-content"),
|
|
203
198
|
children: [
|
|
204
199
|
showChevronColumn && /* @__PURE__ */ jsx("div", { className: "w-5 shrink-0" }),
|
|
205
|
-
showPersistentContentConnector && showConnector && /* @__PURE__ */ jsx("div", { className: "flex justify-center shrink-0 w-3", children: /* @__PURE__ */ jsx("div", { className: "w-px bg-
|
|
200
|
+
showPersistentContentConnector && showConnector && /* @__PURE__ */ jsx("div", { className: "flex justify-center shrink-0 w-3", children: /* @__PURE__ */ jsx("div", { className: "w-px bg-border-default" }) }),
|
|
206
201
|
/* @__PURE__ */ jsx("div", { className: "flex-1 min-w-0", children: persistentChildren })
|
|
207
202
|
]
|
|
208
203
|
}
|
|
@@ -224,59 +219,40 @@ const AgentStepsCard = ({
|
|
|
224
219
|
dataTestPrefix,
|
|
225
220
|
className
|
|
226
221
|
}) => {
|
|
227
|
-
const { isDark } = useTheme();
|
|
228
222
|
const toolLabel = toolCount ? `${toolCount} tool ${toolCount === 1 ? "call" : "calls"}` : "";
|
|
229
223
|
const thinkingLabel = thinkingCount ? ` · ${thinkingCount} thought${thinkingCount === 1 ? "" : "s"}` : "";
|
|
230
|
-
const defaultBorderColor = borderColor ?? (isDark ? colors.gray[275] : colors.gray[250]);
|
|
231
224
|
return /* @__PURE__ */ jsxs(
|
|
232
|
-
|
|
225
|
+
"div",
|
|
233
226
|
{
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
background,
|
|
237
|
-
borderColor: defaultBorderColor,
|
|
238
|
-
className: classNames("rounded-lg", className),
|
|
239
|
-
sx: { margin: 0, boxShadow: "none", color: colors.gray[750] },
|
|
227
|
+
className: classNames("rounded-lg border", className),
|
|
228
|
+
style: { borderColor: borderColor ?? "var(--color-border-default)", backgroundColor: background },
|
|
240
229
|
"data-test": dataTestPrefix && toDataTestId(dataTestPrefix, "agent-steps-card"),
|
|
241
230
|
children: [
|
|
242
|
-
/* @__PURE__ */
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
}
|
|
261
|
-
),
|
|
262
|
-
/* @__PURE__ */ jsx("span", { className: "font-semibold text-gray-750", children: "Agent steps" }),
|
|
263
|
-
(toolLabel || thinkingLabel || extraSummary) && /* @__PURE__ */ jsxs("span", { className: "text-gray-500", children: [
|
|
264
|
-
toolLabel && `· ${toolLabel}`,
|
|
265
|
-
thinkingLabel,
|
|
266
|
-
extraSummary
|
|
267
|
-
] }),
|
|
268
|
-
active && /* @__PURE__ */ jsx("div", { className: "ml-auto", children: /* @__PURE__ */ jsx(Spinner, { small: true, className: "text-indigo-600" }) })
|
|
269
|
-
] })
|
|
270
|
-
}
|
|
271
|
-
),
|
|
272
|
-
/* @__PURE__ */ jsx(AccordionDetails, { sx: { padding: 0 }, children: /* @__PURE__ */ jsx(
|
|
231
|
+
/* @__PURE__ */ jsxs("button", { type: "button", className: "flex items-center gap-2 w-full py-2 px-2.5 text-left text-xs", onClick: onToggle, children: [
|
|
232
|
+
/* @__PURE__ */ jsx(
|
|
233
|
+
IconProvider,
|
|
234
|
+
{
|
|
235
|
+
icon: expanded ? "chevron-down" : "chevron-right",
|
|
236
|
+
size: 0.75,
|
|
237
|
+
className: "shrink-0 text-icon-secondary"
|
|
238
|
+
}
|
|
239
|
+
),
|
|
240
|
+
/* @__PURE__ */ jsx("span", { className: "font-semibold text-text-primary", children: "Agent steps" }),
|
|
241
|
+
(toolLabel || thinkingLabel || extraSummary) && /* @__PURE__ */ jsxs("span", { className: "text-text-secondary", children: [
|
|
242
|
+
toolLabel && `· ${toolLabel}`,
|
|
243
|
+
thinkingLabel,
|
|
244
|
+
extraSummary
|
|
245
|
+
] }),
|
|
246
|
+
active && /* @__PURE__ */ jsx("div", { className: "ml-auto", children: /* @__PURE__ */ jsx(Spinner, { small: true, className: "text-icon-brand" }) })
|
|
247
|
+
] }),
|
|
248
|
+
expanded && /* @__PURE__ */ jsx(
|
|
273
249
|
"div",
|
|
274
250
|
{
|
|
275
|
-
className: "space-y-3 border-t border-
|
|
251
|
+
className: "space-y-3 border-t border-border-default p-3",
|
|
276
252
|
"data-test": dataTestPrefix && toDataTestId(dataTestPrefix, "content"),
|
|
277
253
|
children
|
|
278
254
|
}
|
|
279
|
-
)
|
|
255
|
+
)
|
|
280
256
|
]
|
|
281
257
|
}
|
|
282
258
|
);
|
|
@@ -306,45 +282,47 @@ const AskUserQuestionCard = ({
|
|
|
306
282
|
if (questions.length === 0) {
|
|
307
283
|
if (answeredQuestions.length === 0) return null;
|
|
308
284
|
return /* @__PURE__ */ jsx("div", { className: classNames("flex flex-col gap-3 mt-2", className), children: answeredQuestions.map((q) => /* @__PURE__ */ jsxs("div", { "data-test": dataTestPrefix && toDataTestId(dataTestPrefix, `answered-${q.id}`), children: [
|
|
309
|
-
/* @__PURE__ */ jsxs("div", { className: "bg-
|
|
310
|
-
/* @__PURE__ */ jsx("div", { className: "text-xs font-medium font-sans text-
|
|
311
|
-
/* @__PURE__ */ jsx("div", { className: "text-[0.6875rem] flex items-center gap-1 font-medium text-
|
|
285
|
+
/* @__PURE__ */ jsxs("div", { className: "bg-background-surface-brand border rounded-t-lg border-border-brand px-4 py-2 flex items-center justify-between", children: [
|
|
286
|
+
/* @__PURE__ */ jsx("div", { className: "text-xs font-medium font-sans text-text-brand", children: q.question }),
|
|
287
|
+
/* @__PURE__ */ jsx("div", { className: "text-[0.6875rem] flex items-center gap-1 font-medium text-text-secondary border border-border-brand-bold bg-background-surface-raised rounded px-2 py-0.5 shrink-0 h-fit", children: /* @__PURE__ */ jsx("span", { className: "text-[0.6875rem] leading-tight", children: "Answered" }) })
|
|
312
288
|
] }),
|
|
313
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 px-4 py-3 border border-
|
|
314
|
-
/* @__PURE__ */ jsx(IconProvider, { icon: "check-circle", size: 0.875, className: "text-
|
|
315
|
-
/* @__PURE__ */ jsx("span", { className: "text-[0.8125rem] font-medium font-sans text-
|
|
289
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 px-4 py-3 border border-border-default border-t-0 dark:border-border-default rounded-b-lg", children: [
|
|
290
|
+
/* @__PURE__ */ jsx(IconProvider, { icon: "check-circle", size: 0.875, className: "text-text-brand shrink-0" }),
|
|
291
|
+
/* @__PURE__ */ jsx("span", { className: "text-[0.8125rem] font-medium font-sans text-text-primary", children: q.isCustom ? `Other: ${q.answer}` : q.answer })
|
|
316
292
|
] })
|
|
317
293
|
] }, q.id)) });
|
|
318
294
|
}
|
|
319
295
|
if (!currentQuestion) return null;
|
|
320
296
|
return /* @__PURE__ */ jsxs("div", { className, "data-test": dataTestPrefix && toDataTestId(dataTestPrefix, "question-card"), children: [
|
|
321
|
-
/* @__PURE__ */ jsxs("div", { className: "bg-
|
|
322
|
-
/* @__PURE__ */ jsx("div", { className: "text-sm font-sans font-medium text-
|
|
323
|
-
readOnly ? /* @__PURE__ */ jsx("div", { className: "text-[0.6875rem] flex items-center gap-1 font-medium text-
|
|
297
|
+
/* @__PURE__ */ jsxs("div", { className: "bg-background-surface-brand border rounded-t-lg border-border-brand px-4 py-2 flex items-center justify-between", children: [
|
|
298
|
+
/* @__PURE__ */ jsx("div", { className: "text-sm font-sans font-medium text-text-brand", children: totalQuestions > 1 ? "Questions" : currentQuestion.question }),
|
|
299
|
+
readOnly ? /* @__PURE__ */ jsx("div", { className: "text-[0.6875rem] flex items-center gap-1 font-medium text-text-secondary border border-border-brand-bold bg-background-surface-raised rounded px-2 py-0.5 shrink-0 h-fit", children: /* @__PURE__ */ jsx("span", { className: "text-[0.6875rem] leading-tight", children: "Unanswered" }) }) : null,
|
|
324
300
|
!readOnly && isMultiQuestion && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
|
|
325
301
|
/* @__PURE__ */ jsx(
|
|
326
302
|
IconButton,
|
|
327
303
|
{
|
|
328
304
|
icon: "chevron-left",
|
|
305
|
+
variant: "ghost",
|
|
306
|
+
size: "md",
|
|
329
307
|
iconSize: 0.75,
|
|
330
308
|
onClick: () => onCurrentQuestionIndexChange == null ? void 0 : onCurrentQuestionIndexChange(Math.max(0, currentQuestionIndex - 1)),
|
|
331
309
|
disabled: currentQuestionIndex === 0,
|
|
332
|
-
tooltip: "Previous question"
|
|
333
|
-
className: "text-gray-750"
|
|
310
|
+
tooltip: "Previous question"
|
|
334
311
|
}
|
|
335
312
|
),
|
|
336
313
|
/* @__PURE__ */ jsx(
|
|
337
314
|
IconButton,
|
|
338
315
|
{
|
|
339
316
|
icon: "chevron-right",
|
|
317
|
+
variant: "ghost",
|
|
318
|
+
size: "md",
|
|
340
319
|
iconSize: 0.75,
|
|
341
320
|
onClick: () => onCurrentQuestionIndexChange == null ? void 0 : onCurrentQuestionIndexChange(Math.min(totalQuestions - 1, currentQuestionIndex + 1)),
|
|
342
321
|
disabled: currentQuestionIndex === totalQuestions - 1,
|
|
343
|
-
tooltip: "Next question"
|
|
344
|
-
className: "text-gray-750"
|
|
322
|
+
tooltip: "Next question"
|
|
345
323
|
}
|
|
346
324
|
),
|
|
347
|
-
/* @__PURE__ */ jsxs("div", { className: "text-xs px-2 py-1 ml-1 bg-
|
|
325
|
+
/* @__PURE__ */ jsxs("div", { className: "text-xs px-2 py-1 ml-1 bg-background-fill-brand font-medium font-sans text-text-on-solid rounded", children: [
|
|
348
326
|
/* @__PURE__ */ jsxs("span", { children: [
|
|
349
327
|
" ",
|
|
350
328
|
currentQuestionIndex + 1,
|
|
@@ -361,9 +339,9 @@ const AskUserQuestionCard = ({
|
|
|
361
339
|
] })
|
|
362
340
|
] })
|
|
363
341
|
] }),
|
|
364
|
-
/* @__PURE__ */ jsxs("div", { className: "flex flex-col px-4 py-3 gap-4 border border-
|
|
342
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col px-4 py-3 gap-4 border border-border-default border-t-0 dark:border-border-default rounded-b-lg", children: [
|
|
365
343
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-3", children: [
|
|
366
|
-
isMultiQuestion && /* @__PURE__ */ jsx("div", { className: "text-xs font-medium font-sans text-
|
|
344
|
+
isMultiQuestion && /* @__PURE__ */ jsx("div", { className: "text-xs font-medium font-sans text-text-primary", children: currentQuestion.question || "What would you like to do?" }),
|
|
367
345
|
/* @__PURE__ */ jsxs(
|
|
368
346
|
"div",
|
|
369
347
|
{
|
|
@@ -389,7 +367,7 @@ const AskUserQuestionCard = ({
|
|
|
389
367
|
onChange: () => onCurrentAnswerChange == null ? void 0 : onCurrentAnswerChange(currentQuestion.id, { radioValue: opt })
|
|
390
368
|
}
|
|
391
369
|
),
|
|
392
|
-
/* @__PURE__ */ jsx("span", { className: "min-w-0 text-[0.8125rem] font-medium font-sans leading-snug text-
|
|
370
|
+
/* @__PURE__ */ jsx("span", { className: "min-w-0 text-[0.8125rem] font-medium font-sans leading-snug text-text-primary", children: opt })
|
|
393
371
|
]
|
|
394
372
|
},
|
|
395
373
|
`${index}:${opt}`
|
|
@@ -493,16 +471,16 @@ const McpAuthCard = ({
|
|
|
493
471
|
return /* @__PURE__ */ jsxs(
|
|
494
472
|
"div",
|
|
495
473
|
{
|
|
496
|
-
className: classNames("rounded-lg border border-
|
|
474
|
+
className: classNames("rounded-lg border border-border-default overflow-hidden mt-2", className),
|
|
497
475
|
"data-test": dataTestPrefix && toDataTestId(dataTestPrefix, "mcp-auth-card"),
|
|
498
476
|
children: [
|
|
499
|
-
/* @__PURE__ */ jsx("div", { className: "bg-
|
|
500
|
-
/* @__PURE__ */ jsxs("div", { className: "bg-
|
|
477
|
+
/* @__PURE__ */ jsx("div", { className: "bg-background-surface-brand border-b border-border-brand px-4 py-2", children: /* @__PURE__ */ jsx("div", { className: "text-sm font-medium font-sans text-text-brand", children: title }) }),
|
|
478
|
+
/* @__PURE__ */ jsxs("div", { className: "bg-background-surface-raised px-4 py-3 flex flex-col gap-3", children: [
|
|
501
479
|
servers.map((server) => /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-4", children: [
|
|
502
480
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5 min-w-0 text-sm", children: [
|
|
503
|
-
/* @__PURE__ */ jsx("span", { className: "font-medium text-
|
|
504
|
-
/* @__PURE__ */ jsx("span", { className: "font-semibold text-xs text-
|
|
505
|
-
/* @__PURE__ */ jsx("span", { className: "font-sans font-medium text-
|
|
481
|
+
/* @__PURE__ */ jsx("span", { className: "font-medium text-text-secondary shrink-0", children: "MCP Server Name" }),
|
|
482
|
+
/* @__PURE__ */ jsx("span", { className: "font-semibold text-xs text-text-tertiary shrink-0", children: ":" }),
|
|
483
|
+
/* @__PURE__ */ jsx("span", { className: "font-sans font-medium text-text-primary truncate", children: server.name })
|
|
506
484
|
] }),
|
|
507
485
|
/* @__PURE__ */ jsx(
|
|
508
486
|
Button.Primary,
|
|
@@ -517,7 +495,7 @@ const McpAuthCard = ({
|
|
|
517
495
|
}
|
|
518
496
|
)
|
|
519
497
|
] }, server.id)),
|
|
520
|
-
onContinue && /* @__PURE__ */ jsx("div", { className: "flex justify-end pt-2 border-t border-
|
|
498
|
+
onContinue && /* @__PURE__ */ jsx("div", { className: "flex justify-end pt-2 border-t border-border-default", children: /* @__PURE__ */ jsx(Button.Primary, { text: "Continue", size: "small", disabled: readOnly, onClick: onContinue }) })
|
|
521
499
|
] })
|
|
522
500
|
]
|
|
523
501
|
}
|
|
@@ -560,9 +538,9 @@ const ReasoningCard = ({
|
|
|
560
538
|
"div",
|
|
561
539
|
{
|
|
562
540
|
ref: contentRef,
|
|
563
|
-
className: "py-2 pt-0 text-
|
|
541
|
+
className: "py-2 pt-0 text-text-secondary text-sm font-normal font-sans",
|
|
564
542
|
"data-test": dataTestPrefix && toDataTestId(dataTestPrefix, "content"),
|
|
565
|
-
children: /* @__PURE__ */ jsx(Markdown, { className: "text-
|
|
543
|
+
children: /* @__PURE__ */ jsx(Markdown, { className: "text-text-secondary font-sans text-sm", children: content })
|
|
566
544
|
}
|
|
567
545
|
)
|
|
568
546
|
}
|
|
@@ -570,155 +548,6 @@ const ReasoningCard = ({
|
|
|
570
548
|
}
|
|
571
549
|
);
|
|
572
550
|
};
|
|
573
|
-
const EDITOR_VIEW_TYPES = {
|
|
574
|
-
TERMINAL: {
|
|
575
|
-
text: "",
|
|
576
|
-
value: "terminal",
|
|
577
|
-
icon: "terminal",
|
|
578
|
-
tooltip: "Terminal View"
|
|
579
|
-
},
|
|
580
|
-
CODE: {
|
|
581
|
-
text: "",
|
|
582
|
-
value: "code",
|
|
583
|
-
icon: "code",
|
|
584
|
-
tooltip: "Code View"
|
|
585
|
-
}
|
|
586
|
-
};
|
|
587
|
-
const SandboxToolCall = ({
|
|
588
|
-
command,
|
|
589
|
-
exitCode = null,
|
|
590
|
-
argsJson,
|
|
591
|
-
resultText,
|
|
592
|
-
resultJson,
|
|
593
|
-
viewMode = "terminal",
|
|
594
|
-
hasContent = false,
|
|
595
|
-
onViewModeChange,
|
|
596
|
-
dataTestPrefix,
|
|
597
|
-
className
|
|
598
|
-
}) => {
|
|
599
|
-
return /* @__PURE__ */ jsxs(
|
|
600
|
-
"div",
|
|
601
|
-
{
|
|
602
|
-
className: classNames("rounded-lg border-gray-200 dark:border-gray-250 bg-white dark:bg-gray-150", className),
|
|
603
|
-
"data-test": dataTestPrefix && toDataTestId(dataTestPrefix, "sandbox"),
|
|
604
|
-
children: [
|
|
605
|
-
/* @__PURE__ */ jsx("div", { className: "bg-indigo-50 dark:bg-gray-200 rounded-t-md border border-indigo-300 dark:border-gray-275", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 px-3 py-1 w-full min-w-0", children: [
|
|
606
|
-
/* @__PURE__ */ jsx("div", { className: "flex flex-col-reverse min-w-0 gap-0", children: /* @__PURE__ */ jsx("p", { className: "text-xs font-medium font-sans text-indigo-600 dark:text-gray-700", children: "sandbox" }) }),
|
|
607
|
-
/* @__PURE__ */ jsxs(
|
|
608
|
-
"div",
|
|
609
|
-
{
|
|
610
|
-
className: "flex ml-auto items-center self-baseline gap-1 shrink-0",
|
|
611
|
-
onClick: (e) => e.stopPropagation(),
|
|
612
|
-
onKeyDown: (e) => e.stopPropagation(),
|
|
613
|
-
children: [
|
|
614
|
-
exitCode !== null && /* @__PURE__ */ jsx(
|
|
615
|
-
Badge,
|
|
616
|
-
{
|
|
617
|
-
type: exitCode === 0 ? "success" : "danger",
|
|
618
|
-
text: `exit: ${exitCode}`,
|
|
619
|
-
icon: exitCode === 0 ? "check-circle" : "circle-xmark",
|
|
620
|
-
textClasses: "lowercase",
|
|
621
|
-
dataTestPrefix: dataTestPrefix && toDataTestId(dataTestPrefix, "exit-code")
|
|
622
|
-
}
|
|
623
|
-
),
|
|
624
|
-
/* @__PURE__ */ jsx(
|
|
625
|
-
ToggleButton,
|
|
626
|
-
{
|
|
627
|
-
buttonList: Object.values(EDITOR_VIEW_TYPES),
|
|
628
|
-
value: viewMode,
|
|
629
|
-
onChange: (value) => onViewModeChange == null ? void 0 : onViewModeChange(value),
|
|
630
|
-
className: classNames("p-[0.1875rem] border-gray-250 dark:border-gray-275"),
|
|
631
|
-
size: "small"
|
|
632
|
-
}
|
|
633
|
-
)
|
|
634
|
-
]
|
|
635
|
-
}
|
|
636
|
-
)
|
|
637
|
-
] }) }),
|
|
638
|
-
/* @__PURE__ */ jsx("div", { className: "p-3 border rounded-b-lg border-t-0 border-gray-250", children: /* @__PURE__ */ jsx("div", { className: "flex bg-white dark:bg-gray-150 overflow-hidden", children: hasContent && /* @__PURE__ */ jsx("div", { className: "flex-1 min-w-0", children: /* @__PURE__ */ jsx("div", { className: "text-xs font-mono max-h-80 h-full text-gray-800 overflow-x-hidden overflow-y-auto whitespace-pre-wrap break-words", children: viewMode === "code" ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
639
|
-
argsJson && /* @__PURE__ */ jsxs("div", { className: "border-l-4 border-indigo-400 px-3 my-1", children: [
|
|
640
|
-
/* @__PURE__ */ jsx("div", { className: "mb-1 text-xs font-medium leading-4 font-sans", children: "Arguments" }),
|
|
641
|
-
/* @__PURE__ */ jsx(
|
|
642
|
-
SimpleCodeEditor,
|
|
643
|
-
{
|
|
644
|
-
language: "json",
|
|
645
|
-
defaultValue: argsJson,
|
|
646
|
-
value: argsJson,
|
|
647
|
-
readOnly: true,
|
|
648
|
-
maxHeight: 10.5,
|
|
649
|
-
initialLinesCount: 1,
|
|
650
|
-
disableEditorResize: true,
|
|
651
|
-
enableExpand: true,
|
|
652
|
-
autoLayout: true,
|
|
653
|
-
hideLineNumbers: true,
|
|
654
|
-
className: "pl-2",
|
|
655
|
-
isFoldingEnabled: true
|
|
656
|
-
}
|
|
657
|
-
)
|
|
658
|
-
] }),
|
|
659
|
-
resultJson && /* @__PURE__ */ jsxs("div", { className: "border-l-4 border-purple-400 px-3 my-1", children: [
|
|
660
|
-
/* @__PURE__ */ jsx("div", { className: "mt-2 mb-1 text-xs font-medium leading-4 font-sans", children: "Result" }),
|
|
661
|
-
/* @__PURE__ */ jsx(
|
|
662
|
-
SimpleCodeEditor,
|
|
663
|
-
{
|
|
664
|
-
language: "json",
|
|
665
|
-
defaultValue: resultJson,
|
|
666
|
-
value: resultJson,
|
|
667
|
-
readOnly: true,
|
|
668
|
-
maxHeight: 10.5,
|
|
669
|
-
initialLinesCount: 1,
|
|
670
|
-
disableEditorResize: true,
|
|
671
|
-
enableExpand: true,
|
|
672
|
-
autoLayout: true,
|
|
673
|
-
hideLineNumbers: true,
|
|
674
|
-
className: "pl-2",
|
|
675
|
-
isFoldingEnabled: true
|
|
676
|
-
}
|
|
677
|
-
)
|
|
678
|
-
] })
|
|
679
|
-
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
680
|
-
command && /* @__PURE__ */ jsxs("div", { className: "break-all border-l-4 border-indigo-400 px-3 my-1", children: [
|
|
681
|
-
/* @__PURE__ */ jsx("div", { className: "mb-1 text-[12px] font-medium leading-4 font-jetbrains text-gray-600", children: "COMMAND" }),
|
|
682
|
-
/* @__PURE__ */ jsxs("div", { children: [
|
|
683
|
-
/* @__PURE__ */ jsx("span", { className: "text-teal-500", children: "$" }),
|
|
684
|
-
" ",
|
|
685
|
-
command
|
|
686
|
-
] })
|
|
687
|
-
] }),
|
|
688
|
-
resultText ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
689
|
-
/* @__PURE__ */ jsx("div", { className: "divider my-1 mx-3" }),
|
|
690
|
-
/* @__PURE__ */ jsxs("div", { className: "break-all border-l-4 border-purple-400 px-3 my-1", children: [
|
|
691
|
-
/* @__PURE__ */ jsx("div", { className: "mb-1 text-[12px] font-medium leading-4 font-jetbrains text-gray-600", children: "OUTPUT" }),
|
|
692
|
-
/* @__PURE__ */ jsx("div", { children: resultText })
|
|
693
|
-
] })
|
|
694
|
-
] }) : resultJson && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
695
|
-
/* @__PURE__ */ jsx("div", { className: "divider my-1 mx-3" }),
|
|
696
|
-
/* @__PURE__ */ jsxs("div", { className: "border-l-4 border-purple-400 px-3 my-1", children: [
|
|
697
|
-
/* @__PURE__ */ jsx("div", { className: "mb-1 text-[12px] font-medium leading-4 font-jetbrains text-gray-600", children: "OUTPUT" }),
|
|
698
|
-
/* @__PURE__ */ jsx(
|
|
699
|
-
SimpleCodeEditor,
|
|
700
|
-
{
|
|
701
|
-
language: "json",
|
|
702
|
-
defaultValue: resultJson,
|
|
703
|
-
value: resultJson,
|
|
704
|
-
readOnly: true,
|
|
705
|
-
maxHeight: 10.5,
|
|
706
|
-
initialLinesCount: 1,
|
|
707
|
-
disableEditorResize: true,
|
|
708
|
-
enableExpand: true,
|
|
709
|
-
autoLayout: true,
|
|
710
|
-
hideLineNumbers: true,
|
|
711
|
-
className: "pl-2",
|
|
712
|
-
isFoldingEnabled: true
|
|
713
|
-
}
|
|
714
|
-
)
|
|
715
|
-
] })
|
|
716
|
-
] })
|
|
717
|
-
] }) }) }) }) })
|
|
718
|
-
]
|
|
719
|
-
}
|
|
720
|
-
);
|
|
721
|
-
};
|
|
722
551
|
const SubAgentCard = ({
|
|
723
552
|
agentName,
|
|
724
553
|
instruction = "",
|
|
@@ -733,7 +562,7 @@ const SubAgentCard = ({
|
|
|
733
562
|
className
|
|
734
563
|
}) => {
|
|
735
564
|
const agentStatus = status === "running" ? "running" : status === "success" ? "success" : "error";
|
|
736
|
-
const instructionContent = instruction.trim().length > 0 ? renderInstruction ? renderInstruction(instruction) : /* @__PURE__ */ jsx(Markdown, { className: "flex flex-col text-
|
|
565
|
+
const instructionContent = instruction.trim().length > 0 ? renderInstruction ? renderInstruction(instruction) : /* @__PURE__ */ jsx(Markdown, { className: "flex flex-col text-text-secondary font-sans text-sm", children: instruction }) : null;
|
|
737
566
|
return /* @__PURE__ */ jsx(
|
|
738
567
|
"div",
|
|
739
568
|
{
|
|
@@ -752,12 +581,12 @@ const SubAgentCard = ({
|
|
|
752
581
|
statusText: durationText,
|
|
753
582
|
dataTestPrefix,
|
|
754
583
|
children: [
|
|
755
|
-
instructionContent != null && /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2 border border-
|
|
756
|
-
/* @__PURE__ */ jsx("h4", { className: "text-sm font-semibold text-
|
|
584
|
+
instructionContent != null && /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2 border border-border-default rounded-md p-2 mb-3", children: [
|
|
585
|
+
/* @__PURE__ */ jsx("h4", { className: "text-sm font-semibold text-text-primary", children: "Instructions" }),
|
|
757
586
|
/* @__PURE__ */ jsx(
|
|
758
587
|
"div",
|
|
759
588
|
{
|
|
760
|
-
className: "text-sm text-
|
|
589
|
+
className: "text-sm text-text-secondary",
|
|
761
590
|
"data-test": dataTestPrefix && toDataTestId(dataTestPrefix, "instructions"),
|
|
762
591
|
children: instructionContent
|
|
763
592
|
}
|
|
@@ -808,14 +637,14 @@ const ToolApprovalBlock = ({
|
|
|
808
637
|
return /* @__PURE__ */ jsxs("div", { className, "data-test": dataTestPrefix && toDataTestId(dataTestPrefix, "approval"), children: [
|
|
809
638
|
/* @__PURE__ */ jsxs("div", { className: "flex gap-2", children: [
|
|
810
639
|
/* @__PURE__ */ jsxs("div", { className: classNames("flex flex-col items-center shrink-0", !showLineBelow && "pb-1"), children: [
|
|
811
|
-
/* @__PURE__ */ jsx("div", { className: "w-px flex-1 bg-
|
|
640
|
+
/* @__PURE__ */ jsx("div", { className: "w-px flex-1 bg-border-default min-h-[0.75rem]" }),
|
|
812
641
|
/* @__PURE__ */ jsx(StepIconBox, { icon: "wrench", variant: "muted", iconSize: 0.875, className: classNames("my-1") }),
|
|
813
|
-
showLineBelow && /* @__PURE__ */ jsx("div", { className: "w-px flex-1 bg-
|
|
642
|
+
showLineBelow && /* @__PURE__ */ jsx("div", { className: "w-px flex-1 bg-border-default min-h-[0.75rem]" })
|
|
814
643
|
] }),
|
|
815
644
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between flex-1 mt-2", children: [
|
|
816
645
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center w-full justify-between gap-2", children: [
|
|
817
646
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
818
|
-
/* @__PURE__ */ jsxs("span", { className: "text-
|
|
647
|
+
/* @__PURE__ */ jsxs("span", { className: "text-text-primary text-xs font-medium leading-4 font-sans inline-flex flex-wrap items-center gap-1", children: [
|
|
819
648
|
headingText,
|
|
820
649
|
/* @__PURE__ */ jsx(Badge, { text: toolName, type: "gray" })
|
|
821
650
|
] }),
|
|
@@ -878,11 +707,11 @@ const ToolApprovalBlock = ({
|
|
|
878
707
|
] }),
|
|
879
708
|
!isDecided && !readOnly && selectedDenyOption && /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1 pl-8 pt-3", children: [
|
|
880
709
|
(((_a = selectedDenyOption.confirm) == null ? void 0 : _a.title) || ((_b = selectedDenyOption.confirm) == null ? void 0 : _b.description)) && /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-0.5", children: [
|
|
881
|
-
selectedDenyOption.confirm.title && /* @__PURE__ */ jsx("span", { className: "text-xs font-medium text-
|
|
882
|
-
selectedDenyOption.confirm.description && /* @__PURE__ */ jsx("span", { className: "text-xs text-
|
|
710
|
+
selectedDenyOption.confirm.title && /* @__PURE__ */ jsx("span", { className: "text-xs font-medium text-text-primary", children: selectedDenyOption.confirm.title }),
|
|
711
|
+
selectedDenyOption.confirm.description && /* @__PURE__ */ jsx("span", { className: "text-xs text-text-secondary", children: selectedDenyOption.confirm.description })
|
|
883
712
|
] }),
|
|
884
713
|
selectedDenyOption.grants && selectedDenyOption.grants.length > 0 && /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-1", children: [
|
|
885
|
-
/* @__PURE__ */ jsx("span", { className: "text-xs text-
|
|
714
|
+
/* @__PURE__ */ jsx("span", { className: "text-xs text-text-secondary", children: "Grants:" }),
|
|
886
715
|
selectedDenyOption.grants.map((grant) => /* @__PURE__ */ jsx(Badge, { text: grant, type: "gray" }, grant))
|
|
887
716
|
] }),
|
|
888
717
|
/* @__PURE__ */ jsxs("div", { className: "flex gap-2", children: [
|
|
@@ -903,169 +732,12 @@ const ToolApprovalBlock = ({
|
|
|
903
732
|
] }),
|
|
904
733
|
showReasonError && /* @__PURE__ */ jsx("span", { className: "text-xs text-rose-500", children: "Reason is required" })
|
|
905
734
|
] }),
|
|
906
|
-
isDecided && (status == null ? void 0 : status.reason) && /* @__PURE__ */ jsx("div", { className: "pl-8 pt-2", children: /* @__PURE__ */ jsxs("span", { className: "text-xs text-
|
|
735
|
+
isDecided && (status == null ? void 0 : status.reason) && /* @__PURE__ */ jsx("div", { className: "pl-8 pt-2", children: /* @__PURE__ */ jsxs("span", { className: "text-xs text-text-secondary", children: [
|
|
907
736
|
"Reason: ",
|
|
908
737
|
status.reason
|
|
909
738
|
] }) })
|
|
910
739
|
] });
|
|
911
740
|
};
|
|
912
|
-
const DEFAULT_AWAITING_TEXT = "Awaiting Response...";
|
|
913
|
-
const ToolCallCard = ({
|
|
914
|
-
icon = "mcp-server",
|
|
915
|
-
iconClassName,
|
|
916
|
-
iconVariant,
|
|
917
|
-
toolName,
|
|
918
|
-
expanded = false,
|
|
919
|
-
onToggle,
|
|
920
|
-
awaiting = false,
|
|
921
|
-
awaitingText = DEFAULT_AWAITING_TEXT,
|
|
922
|
-
status: explicitStatus,
|
|
923
|
-
exitCode,
|
|
924
|
-
showExpandChevron = true,
|
|
925
|
-
showResponseLine = false,
|
|
926
|
-
responseIcon,
|
|
927
|
-
approvalSlot,
|
|
928
|
-
requestSlot,
|
|
929
|
-
responseSlot,
|
|
930
|
-
dataTestPrefix,
|
|
931
|
-
className,
|
|
932
|
-
highlightCard = false
|
|
933
|
-
}) => {
|
|
934
|
-
const hasApproval = !!approvalSlot;
|
|
935
|
-
const hasRequest = !!requestSlot;
|
|
936
|
-
const hasResponse = !!responseSlot;
|
|
937
|
-
const showConnector = hasApproval || hasRequest || hasResponse;
|
|
938
|
-
const isExpandable = showExpandChevron && (hasRequest || hasResponse);
|
|
939
|
-
let derivedStatus = "idle";
|
|
940
|
-
if (explicitStatus) derivedStatus = explicitStatus;
|
|
941
|
-
else if (awaiting) derivedStatus = "running";
|
|
942
|
-
else if (exitCode === 0) derivedStatus = "success";
|
|
943
|
-
else if (exitCode != null) derivedStatus = "error";
|
|
944
|
-
else if (showResponseLine) derivedStatus = "success";
|
|
945
|
-
const statusText = awaiting ? awaitingText : void 0;
|
|
946
|
-
const isCubeIcon = icon === "cube";
|
|
947
|
-
const derivedIconVariant = iconVariant || (isCubeIcon ? "primary" : "muted");
|
|
948
|
-
const derivedIconSize = isCubeIcon ? 0.75 : void 0;
|
|
949
|
-
return /* @__PURE__ */ jsx(
|
|
950
|
-
"div",
|
|
951
|
-
{
|
|
952
|
-
className: classNames(
|
|
953
|
-
"flex flex-col min-w-0",
|
|
954
|
-
{
|
|
955
|
-
"rounded-md p-1 -mx-1": highlightCard,
|
|
956
|
-
"p-0 mx-0 mt-2": !highlightCard
|
|
957
|
-
},
|
|
958
|
-
className
|
|
959
|
-
),
|
|
960
|
-
"data-test": dataTestPrefix && toDataTestId(dataTestPrefix, "tool-call-card"),
|
|
961
|
-
children: /* @__PURE__ */ jsx(
|
|
962
|
-
AgentStepRow,
|
|
963
|
-
{
|
|
964
|
-
icon,
|
|
965
|
-
iconClassName,
|
|
966
|
-
iconVariant: derivedIconVariant,
|
|
967
|
-
iconSize: derivedIconSize,
|
|
968
|
-
title: toolName,
|
|
969
|
-
expandable: isExpandable,
|
|
970
|
-
expanded,
|
|
971
|
-
onToggle,
|
|
972
|
-
status: derivedStatus,
|
|
973
|
-
statusText,
|
|
974
|
-
showConnector,
|
|
975
|
-
showContentConnector: true,
|
|
976
|
-
showPersistentContentConnector: !hasApproval,
|
|
977
|
-
dataTestPrefix: dataTestPrefix && toDataTestId(dataTestPrefix, "header"),
|
|
978
|
-
persistentChildren: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
979
|
-
approvalSlot,
|
|
980
|
-
expanded && showResponseLine && responseSlot && /* @__PURE__ */ jsx("div", { "data-test": dataTestPrefix && toDataTestId(dataTestPrefix, "response"), children: responseSlot })
|
|
981
|
-
] }),
|
|
982
|
-
children: requestSlot && /* @__PURE__ */ jsx("div", { className: "py-2 pt-0", "data-test": dataTestPrefix && toDataTestId(dataTestPrefix, "request"), children: requestSlot })
|
|
983
|
-
}
|
|
984
|
-
)
|
|
985
|
-
}
|
|
986
|
-
);
|
|
987
|
-
};
|
|
988
|
-
const ToolCallContentBlock = ({
|
|
989
|
-
title,
|
|
990
|
-
content,
|
|
991
|
-
isJson = true,
|
|
992
|
-
copyValue,
|
|
993
|
-
maxHeight = "10.5rem",
|
|
994
|
-
resizable = false,
|
|
995
|
-
fullscreen = false,
|
|
996
|
-
onFullscreenChange,
|
|
997
|
-
contentHeightRem = 1.5,
|
|
998
|
-
contentRef,
|
|
999
|
-
dataTestPrefix,
|
|
1000
|
-
className
|
|
1001
|
-
}) => {
|
|
1002
|
-
return /* @__PURE__ */ jsxs(
|
|
1003
|
-
"div",
|
|
1004
|
-
{
|
|
1005
|
-
className: classNames("flex flex-col text-gray-950 text-xs font-medium leading-4 font-sans", className),
|
|
1006
|
-
"data-test": dataTestPrefix && toDataTestId(dataTestPrefix, "content-block"),
|
|
1007
|
-
children: [
|
|
1008
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between bg-indigo-50 dark:bg-gray-250 border border-indigo-300 dark:border-gray-275 py-2 px-3 rounded-t-lg", children: [
|
|
1009
|
-
/* @__PURE__ */ jsx("div", { className: "text-xs font-medium font-sans text-indigo-600 dark:text-gray-700", children: title }),
|
|
1010
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
1011
|
-
/* @__PURE__ */ jsx(
|
|
1012
|
-
CopyField,
|
|
1013
|
-
{
|
|
1014
|
-
rawValue: copyValue ?? content,
|
|
1015
|
-
icon: ["far", "clone"],
|
|
1016
|
-
isIconButton: true,
|
|
1017
|
-
dataTestPrefix: dataTestPrefix && toDataTestId(dataTestPrefix, "copy")
|
|
1018
|
-
}
|
|
1019
|
-
),
|
|
1020
|
-
/* @__PURE__ */ jsx(
|
|
1021
|
-
IconButton,
|
|
1022
|
-
{
|
|
1023
|
-
icon: "expand-alt",
|
|
1024
|
-
iconSize: 1.25,
|
|
1025
|
-
onClick: () => onFullscreenChange == null ? void 0 : onFullscreenChange(true),
|
|
1026
|
-
tooltip: "Expand",
|
|
1027
|
-
className: "text-gray-500"
|
|
1028
|
-
}
|
|
1029
|
-
)
|
|
1030
|
-
] })
|
|
1031
|
-
] }),
|
|
1032
|
-
/* @__PURE__ */ jsx(
|
|
1033
|
-
"div",
|
|
1034
|
-
{
|
|
1035
|
-
ref: resizable ? contentRef : void 0,
|
|
1036
|
-
className: "overflow-y-auto relative min-h-[1.875rem] rounded-b-lg bg-white dark:bg-gray-200 border border-gray-250 border-t-0",
|
|
1037
|
-
style: resizable ? {
|
|
1038
|
-
height: `${Math.min(contentHeightRem, 10)}rem`,
|
|
1039
|
-
resize: "vertical",
|
|
1040
|
-
padding: "0.5rem"
|
|
1041
|
-
} : {
|
|
1042
|
-
maxHeight,
|
|
1043
|
-
padding: "0.5rem"
|
|
1044
|
-
},
|
|
1045
|
-
children: isJson ? /* @__PURE__ */ jsx(
|
|
1046
|
-
SimpleCodeEditor,
|
|
1047
|
-
{
|
|
1048
|
-
language: "json",
|
|
1049
|
-
defaultValue: content,
|
|
1050
|
-
value: content,
|
|
1051
|
-
readOnly: true,
|
|
1052
|
-
isFoldingEnabled: true,
|
|
1053
|
-
maxHeight: 10.5,
|
|
1054
|
-
initialLinesCount: 1,
|
|
1055
|
-
openAsFullscreen: fullscreen,
|
|
1056
|
-
onMinimise: () => onFullscreenChange == null ? void 0 : onFullscreenChange(false),
|
|
1057
|
-
showExpandOnlyInFullscreen: true,
|
|
1058
|
-
className: "border-none !p-1",
|
|
1059
|
-
autoLayout: true,
|
|
1060
|
-
enableLineNumbersForText: true
|
|
1061
|
-
}
|
|
1062
|
-
) : /* @__PURE__ */ jsx(Markdown, { className: "text-gray-600 text-xs", children: content })
|
|
1063
|
-
}
|
|
1064
|
-
)
|
|
1065
|
-
]
|
|
1066
|
-
}
|
|
1067
|
-
);
|
|
1068
|
-
};
|
|
1069
741
|
export {
|
|
1070
742
|
ASK_USER_CUSTOM_OPTION,
|
|
1071
743
|
AgentStepRow,
|
|
@@ -1074,12 +746,9 @@ export {
|
|
|
1074
746
|
AssistantMessage,
|
|
1075
747
|
McpAuthCard,
|
|
1076
748
|
ReasoningCard,
|
|
1077
|
-
SandboxToolCall,
|
|
1078
749
|
StepIconBox,
|
|
1079
750
|
SubAgentCard,
|
|
1080
751
|
ToolApprovalBlock,
|
|
1081
|
-
ToolCallCard,
|
|
1082
|
-
ToolCallContentBlock,
|
|
1083
752
|
default2 as UserMessage,
|
|
1084
753
|
default3 as UserMessageEdit
|
|
1085
754
|
};
|