tfy-web-components 0.0.33 → 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/AgentStepsCard.d.ts +2 -2
- 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 +78 -410
- 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,60 +219,40 @@ const AgentStepsCard = ({
|
|
|
224
219
|
dataTestPrefix,
|
|
225
220
|
className
|
|
226
221
|
}) => {
|
|
227
|
-
const {
|
|
228
|
-
const
|
|
229
|
-
const thinkingLabel = thinkingCount > 0 ? ` · ${thinkingCount} thought${thinkingCount === 1 ? "" : "s"}` : "";
|
|
230
|
-
const defaultBorderColor = borderColor ?? (isDark ? colors.gray[275] : colors.gray[250]);
|
|
222
|
+
const toolLabel = toolCount ? `${toolCount} tool ${toolCount === 1 ? "call" : "calls"}` : "";
|
|
223
|
+
const thinkingLabel = thinkingCount ? ` · ${thinkingCount} thought${thinkingCount === 1 ? "" : "s"}` : "";
|
|
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
|
-
/* @__PURE__ */ jsxs("span", { className: "text-gray-500", children: [
|
|
264
|
-
"· ",
|
|
265
|
-
toolLabel,
|
|
266
|
-
thinkingLabel,
|
|
267
|
-
extraSummary
|
|
268
|
-
] }),
|
|
269
|
-
active && /* @__PURE__ */ jsx("div", { className: "ml-auto", children: /* @__PURE__ */ jsx(Spinner, { small: true, className: "text-indigo-600" }) })
|
|
270
|
-
] })
|
|
271
|
-
}
|
|
272
|
-
),
|
|
273
|
-
/* @__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(
|
|
274
249
|
"div",
|
|
275
250
|
{
|
|
276
|
-
className: "space-y-3 border-t border-
|
|
251
|
+
className: "space-y-3 border-t border-border-default p-3",
|
|
277
252
|
"data-test": dataTestPrefix && toDataTestId(dataTestPrefix, "content"),
|
|
278
253
|
children
|
|
279
254
|
}
|
|
280
|
-
)
|
|
255
|
+
)
|
|
281
256
|
]
|
|
282
257
|
}
|
|
283
258
|
);
|
|
@@ -307,45 +282,47 @@ const AskUserQuestionCard = ({
|
|
|
307
282
|
if (questions.length === 0) {
|
|
308
283
|
if (answeredQuestions.length === 0) return null;
|
|
309
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: [
|
|
310
|
-
/* @__PURE__ */ jsxs("div", { className: "bg-
|
|
311
|
-
/* @__PURE__ */ jsx("div", { className: "text-xs font-medium font-sans text-
|
|
312
|
-
/* @__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" }) })
|
|
313
288
|
] }),
|
|
314
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 px-4 py-3 border border-
|
|
315
|
-
/* @__PURE__ */ jsx(IconProvider, { icon: "check-circle", size: 0.875, className: "text-
|
|
316
|
-
/* @__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 })
|
|
317
292
|
] })
|
|
318
293
|
] }, q.id)) });
|
|
319
294
|
}
|
|
320
295
|
if (!currentQuestion) return null;
|
|
321
296
|
return /* @__PURE__ */ jsxs("div", { className, "data-test": dataTestPrefix && toDataTestId(dataTestPrefix, "question-card"), children: [
|
|
322
|
-
/* @__PURE__ */ jsxs("div", { className: "bg-
|
|
323
|
-
/* @__PURE__ */ jsx("div", { className: "text-sm font-sans font-medium text-
|
|
324
|
-
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,
|
|
325
300
|
!readOnly && isMultiQuestion && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
|
|
326
301
|
/* @__PURE__ */ jsx(
|
|
327
302
|
IconButton,
|
|
328
303
|
{
|
|
329
304
|
icon: "chevron-left",
|
|
305
|
+
variant: "ghost",
|
|
306
|
+
size: "md",
|
|
330
307
|
iconSize: 0.75,
|
|
331
308
|
onClick: () => onCurrentQuestionIndexChange == null ? void 0 : onCurrentQuestionIndexChange(Math.max(0, currentQuestionIndex - 1)),
|
|
332
309
|
disabled: currentQuestionIndex === 0,
|
|
333
|
-
tooltip: "Previous question"
|
|
334
|
-
className: "text-gray-750"
|
|
310
|
+
tooltip: "Previous question"
|
|
335
311
|
}
|
|
336
312
|
),
|
|
337
313
|
/* @__PURE__ */ jsx(
|
|
338
314
|
IconButton,
|
|
339
315
|
{
|
|
340
316
|
icon: "chevron-right",
|
|
317
|
+
variant: "ghost",
|
|
318
|
+
size: "md",
|
|
341
319
|
iconSize: 0.75,
|
|
342
320
|
onClick: () => onCurrentQuestionIndexChange == null ? void 0 : onCurrentQuestionIndexChange(Math.min(totalQuestions - 1, currentQuestionIndex + 1)),
|
|
343
321
|
disabled: currentQuestionIndex === totalQuestions - 1,
|
|
344
|
-
tooltip: "Next question"
|
|
345
|
-
className: "text-gray-750"
|
|
322
|
+
tooltip: "Next question"
|
|
346
323
|
}
|
|
347
324
|
),
|
|
348
|
-
/* @__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: [
|
|
349
326
|
/* @__PURE__ */ jsxs("span", { children: [
|
|
350
327
|
" ",
|
|
351
328
|
currentQuestionIndex + 1,
|
|
@@ -362,9 +339,9 @@ const AskUserQuestionCard = ({
|
|
|
362
339
|
] })
|
|
363
340
|
] })
|
|
364
341
|
] }),
|
|
365
|
-
/* @__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: [
|
|
366
343
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-3", children: [
|
|
367
|
-
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?" }),
|
|
368
345
|
/* @__PURE__ */ jsxs(
|
|
369
346
|
"div",
|
|
370
347
|
{
|
|
@@ -390,7 +367,7 @@ const AskUserQuestionCard = ({
|
|
|
390
367
|
onChange: () => onCurrentAnswerChange == null ? void 0 : onCurrentAnswerChange(currentQuestion.id, { radioValue: opt })
|
|
391
368
|
}
|
|
392
369
|
),
|
|
393
|
-
/* @__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 })
|
|
394
371
|
]
|
|
395
372
|
},
|
|
396
373
|
`${index}:${opt}`
|
|
@@ -494,16 +471,16 @@ const McpAuthCard = ({
|
|
|
494
471
|
return /* @__PURE__ */ jsxs(
|
|
495
472
|
"div",
|
|
496
473
|
{
|
|
497
|
-
className: classNames("rounded-lg border border-
|
|
474
|
+
className: classNames("rounded-lg border border-border-default overflow-hidden mt-2", className),
|
|
498
475
|
"data-test": dataTestPrefix && toDataTestId(dataTestPrefix, "mcp-auth-card"),
|
|
499
476
|
children: [
|
|
500
|
-
/* @__PURE__ */ jsx("div", { className: "bg-
|
|
501
|
-
/* @__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: [
|
|
502
479
|
servers.map((server) => /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-4", children: [
|
|
503
480
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5 min-w-0 text-sm", children: [
|
|
504
|
-
/* @__PURE__ */ jsx("span", { className: "font-medium text-
|
|
505
|
-
/* @__PURE__ */ jsx("span", { className: "font-semibold text-xs text-
|
|
506
|
-
/* @__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 })
|
|
507
484
|
] }),
|
|
508
485
|
/* @__PURE__ */ jsx(
|
|
509
486
|
Button.Primary,
|
|
@@ -518,7 +495,7 @@ const McpAuthCard = ({
|
|
|
518
495
|
}
|
|
519
496
|
)
|
|
520
497
|
] }, server.id)),
|
|
521
|
-
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 }) })
|
|
522
499
|
] })
|
|
523
500
|
]
|
|
524
501
|
}
|
|
@@ -561,9 +538,9 @@ const ReasoningCard = ({
|
|
|
561
538
|
"div",
|
|
562
539
|
{
|
|
563
540
|
ref: contentRef,
|
|
564
|
-
className: "py-2 pt-0 text-
|
|
541
|
+
className: "py-2 pt-0 text-text-secondary text-sm font-normal font-sans",
|
|
565
542
|
"data-test": dataTestPrefix && toDataTestId(dataTestPrefix, "content"),
|
|
566
|
-
children: /* @__PURE__ */ jsx(Markdown, { className: "text-
|
|
543
|
+
children: /* @__PURE__ */ jsx(Markdown, { className: "text-text-secondary font-sans text-sm", children: content })
|
|
567
544
|
}
|
|
568
545
|
)
|
|
569
546
|
}
|
|
@@ -571,155 +548,6 @@ const ReasoningCard = ({
|
|
|
571
548
|
}
|
|
572
549
|
);
|
|
573
550
|
};
|
|
574
|
-
const EDITOR_VIEW_TYPES = {
|
|
575
|
-
TERMINAL: {
|
|
576
|
-
text: "",
|
|
577
|
-
value: "terminal",
|
|
578
|
-
icon: "terminal",
|
|
579
|
-
tooltip: "Terminal View"
|
|
580
|
-
},
|
|
581
|
-
CODE: {
|
|
582
|
-
text: "",
|
|
583
|
-
value: "code",
|
|
584
|
-
icon: "code",
|
|
585
|
-
tooltip: "Code View"
|
|
586
|
-
}
|
|
587
|
-
};
|
|
588
|
-
const SandboxToolCall = ({
|
|
589
|
-
command,
|
|
590
|
-
exitCode = null,
|
|
591
|
-
argsJson,
|
|
592
|
-
resultText,
|
|
593
|
-
resultJson,
|
|
594
|
-
viewMode = "terminal",
|
|
595
|
-
hasContent = false,
|
|
596
|
-
onViewModeChange,
|
|
597
|
-
dataTestPrefix,
|
|
598
|
-
className
|
|
599
|
-
}) => {
|
|
600
|
-
return /* @__PURE__ */ jsxs(
|
|
601
|
-
"div",
|
|
602
|
-
{
|
|
603
|
-
className: classNames("rounded-lg border-gray-200 dark:border-gray-250 bg-white dark:bg-gray-150", className),
|
|
604
|
-
"data-test": dataTestPrefix && toDataTestId(dataTestPrefix, "sandbox"),
|
|
605
|
-
children: [
|
|
606
|
-
/* @__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: [
|
|
607
|
-
/* @__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" }) }),
|
|
608
|
-
/* @__PURE__ */ jsxs(
|
|
609
|
-
"div",
|
|
610
|
-
{
|
|
611
|
-
className: "flex ml-auto items-center self-baseline gap-1 shrink-0",
|
|
612
|
-
onClick: (e) => e.stopPropagation(),
|
|
613
|
-
onKeyDown: (e) => e.stopPropagation(),
|
|
614
|
-
children: [
|
|
615
|
-
exitCode !== null && /* @__PURE__ */ jsx(
|
|
616
|
-
Badge,
|
|
617
|
-
{
|
|
618
|
-
type: exitCode === 0 ? "success" : "danger",
|
|
619
|
-
text: `exit: ${exitCode}`,
|
|
620
|
-
icon: exitCode === 0 ? "check-circle" : "circle-xmark",
|
|
621
|
-
textClasses: "lowercase",
|
|
622
|
-
dataTestPrefix: dataTestPrefix && toDataTestId(dataTestPrefix, "exit-code")
|
|
623
|
-
}
|
|
624
|
-
),
|
|
625
|
-
/* @__PURE__ */ jsx(
|
|
626
|
-
ToggleButton,
|
|
627
|
-
{
|
|
628
|
-
buttonList: Object.values(EDITOR_VIEW_TYPES),
|
|
629
|
-
value: viewMode,
|
|
630
|
-
onChange: (value) => onViewModeChange == null ? void 0 : onViewModeChange(value),
|
|
631
|
-
className: classNames("p-[0.1875rem] border-gray-250 dark:border-gray-275"),
|
|
632
|
-
size: "small"
|
|
633
|
-
}
|
|
634
|
-
)
|
|
635
|
-
]
|
|
636
|
-
}
|
|
637
|
-
)
|
|
638
|
-
] }) }),
|
|
639
|
-
/* @__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: [
|
|
640
|
-
argsJson && /* @__PURE__ */ jsxs("div", { className: "border-l-4 border-indigo-400 px-3 my-1", children: [
|
|
641
|
-
/* @__PURE__ */ jsx("div", { className: "mb-1 text-xs font-medium leading-4 font-sans", children: "Arguments" }),
|
|
642
|
-
/* @__PURE__ */ jsx(
|
|
643
|
-
SimpleCodeEditor,
|
|
644
|
-
{
|
|
645
|
-
language: "json",
|
|
646
|
-
defaultValue: argsJson,
|
|
647
|
-
value: argsJson,
|
|
648
|
-
readOnly: true,
|
|
649
|
-
maxHeight: 10.5,
|
|
650
|
-
initialLinesCount: 1,
|
|
651
|
-
disableEditorResize: true,
|
|
652
|
-
enableExpand: true,
|
|
653
|
-
autoLayout: true,
|
|
654
|
-
hideLineNumbers: true,
|
|
655
|
-
className: "pl-2",
|
|
656
|
-
isFoldingEnabled: true
|
|
657
|
-
}
|
|
658
|
-
)
|
|
659
|
-
] }),
|
|
660
|
-
resultJson && /* @__PURE__ */ jsxs("div", { className: "border-l-4 border-purple-400 px-3 my-1", children: [
|
|
661
|
-
/* @__PURE__ */ jsx("div", { className: "mt-2 mb-1 text-xs font-medium leading-4 font-sans", children: "Result" }),
|
|
662
|
-
/* @__PURE__ */ jsx(
|
|
663
|
-
SimpleCodeEditor,
|
|
664
|
-
{
|
|
665
|
-
language: "json",
|
|
666
|
-
defaultValue: resultJson,
|
|
667
|
-
value: resultJson,
|
|
668
|
-
readOnly: true,
|
|
669
|
-
maxHeight: 10.5,
|
|
670
|
-
initialLinesCount: 1,
|
|
671
|
-
disableEditorResize: true,
|
|
672
|
-
enableExpand: true,
|
|
673
|
-
autoLayout: true,
|
|
674
|
-
hideLineNumbers: true,
|
|
675
|
-
className: "pl-2",
|
|
676
|
-
isFoldingEnabled: true
|
|
677
|
-
}
|
|
678
|
-
)
|
|
679
|
-
] })
|
|
680
|
-
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
681
|
-
command && /* @__PURE__ */ jsxs("div", { className: "break-all border-l-4 border-indigo-400 px-3 my-1", children: [
|
|
682
|
-
/* @__PURE__ */ jsx("div", { className: "mb-1 text-[12px] font-medium leading-4 font-jetbrains text-gray-600", children: "COMMAND" }),
|
|
683
|
-
/* @__PURE__ */ jsxs("div", { children: [
|
|
684
|
-
/* @__PURE__ */ jsx("span", { className: "text-teal-500", children: "$" }),
|
|
685
|
-
" ",
|
|
686
|
-
command
|
|
687
|
-
] })
|
|
688
|
-
] }),
|
|
689
|
-
resultText ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
690
|
-
/* @__PURE__ */ jsx("div", { className: "divider my-1 mx-3" }),
|
|
691
|
-
/* @__PURE__ */ jsxs("div", { className: "break-all border-l-4 border-purple-400 px-3 my-1", children: [
|
|
692
|
-
/* @__PURE__ */ jsx("div", { className: "mb-1 text-[12px] font-medium leading-4 font-jetbrains text-gray-600", children: "OUTPUT" }),
|
|
693
|
-
/* @__PURE__ */ jsx("div", { children: resultText })
|
|
694
|
-
] })
|
|
695
|
-
] }) : resultJson && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
696
|
-
/* @__PURE__ */ jsx("div", { className: "divider my-1 mx-3" }),
|
|
697
|
-
/* @__PURE__ */ jsxs("div", { className: "border-l-4 border-purple-400 px-3 my-1", children: [
|
|
698
|
-
/* @__PURE__ */ jsx("div", { className: "mb-1 text-[12px] font-medium leading-4 font-jetbrains text-gray-600", children: "OUTPUT" }),
|
|
699
|
-
/* @__PURE__ */ jsx(
|
|
700
|
-
SimpleCodeEditor,
|
|
701
|
-
{
|
|
702
|
-
language: "json",
|
|
703
|
-
defaultValue: resultJson,
|
|
704
|
-
value: resultJson,
|
|
705
|
-
readOnly: true,
|
|
706
|
-
maxHeight: 10.5,
|
|
707
|
-
initialLinesCount: 1,
|
|
708
|
-
disableEditorResize: true,
|
|
709
|
-
enableExpand: true,
|
|
710
|
-
autoLayout: true,
|
|
711
|
-
hideLineNumbers: true,
|
|
712
|
-
className: "pl-2",
|
|
713
|
-
isFoldingEnabled: true
|
|
714
|
-
}
|
|
715
|
-
)
|
|
716
|
-
] })
|
|
717
|
-
] })
|
|
718
|
-
] }) }) }) }) })
|
|
719
|
-
]
|
|
720
|
-
}
|
|
721
|
-
);
|
|
722
|
-
};
|
|
723
551
|
const SubAgentCard = ({
|
|
724
552
|
agentName,
|
|
725
553
|
instruction = "",
|
|
@@ -734,7 +562,7 @@ const SubAgentCard = ({
|
|
|
734
562
|
className
|
|
735
563
|
}) => {
|
|
736
564
|
const agentStatus = status === "running" ? "running" : status === "success" ? "success" : "error";
|
|
737
|
-
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;
|
|
738
566
|
return /* @__PURE__ */ jsx(
|
|
739
567
|
"div",
|
|
740
568
|
{
|
|
@@ -753,12 +581,12 @@ const SubAgentCard = ({
|
|
|
753
581
|
statusText: durationText,
|
|
754
582
|
dataTestPrefix,
|
|
755
583
|
children: [
|
|
756
|
-
instructionContent != null && /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2 border border-
|
|
757
|
-
/* @__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" }),
|
|
758
586
|
/* @__PURE__ */ jsx(
|
|
759
587
|
"div",
|
|
760
588
|
{
|
|
761
|
-
className: "text-sm text-
|
|
589
|
+
className: "text-sm text-text-secondary",
|
|
762
590
|
"data-test": dataTestPrefix && toDataTestId(dataTestPrefix, "instructions"),
|
|
763
591
|
children: instructionContent
|
|
764
592
|
}
|
|
@@ -809,14 +637,14 @@ const ToolApprovalBlock = ({
|
|
|
809
637
|
return /* @__PURE__ */ jsxs("div", { className, "data-test": dataTestPrefix && toDataTestId(dataTestPrefix, "approval"), children: [
|
|
810
638
|
/* @__PURE__ */ jsxs("div", { className: "flex gap-2", children: [
|
|
811
639
|
/* @__PURE__ */ jsxs("div", { className: classNames("flex flex-col items-center shrink-0", !showLineBelow && "pb-1"), children: [
|
|
812
|
-
/* @__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]" }),
|
|
813
641
|
/* @__PURE__ */ jsx(StepIconBox, { icon: "wrench", variant: "muted", iconSize: 0.875, className: classNames("my-1") }),
|
|
814
|
-
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]" })
|
|
815
643
|
] }),
|
|
816
644
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between flex-1 mt-2", children: [
|
|
817
645
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center w-full justify-between gap-2", children: [
|
|
818
646
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
819
|
-
/* @__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: [
|
|
820
648
|
headingText,
|
|
821
649
|
/* @__PURE__ */ jsx(Badge, { text: toolName, type: "gray" })
|
|
822
650
|
] }),
|
|
@@ -879,11 +707,11 @@ const ToolApprovalBlock = ({
|
|
|
879
707
|
] }),
|
|
880
708
|
!isDecided && !readOnly && selectedDenyOption && /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1 pl-8 pt-3", children: [
|
|
881
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: [
|
|
882
|
-
selectedDenyOption.confirm.title && /* @__PURE__ */ jsx("span", { className: "text-xs font-medium text-
|
|
883
|
-
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 })
|
|
884
712
|
] }),
|
|
885
713
|
selectedDenyOption.grants && selectedDenyOption.grants.length > 0 && /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-1", children: [
|
|
886
|
-
/* @__PURE__ */ jsx("span", { className: "text-xs text-
|
|
714
|
+
/* @__PURE__ */ jsx("span", { className: "text-xs text-text-secondary", children: "Grants:" }),
|
|
887
715
|
selectedDenyOption.grants.map((grant) => /* @__PURE__ */ jsx(Badge, { text: grant, type: "gray" }, grant))
|
|
888
716
|
] }),
|
|
889
717
|
/* @__PURE__ */ jsxs("div", { className: "flex gap-2", children: [
|
|
@@ -904,169 +732,12 @@ const ToolApprovalBlock = ({
|
|
|
904
732
|
] }),
|
|
905
733
|
showReasonError && /* @__PURE__ */ jsx("span", { className: "text-xs text-rose-500", children: "Reason is required" })
|
|
906
734
|
] }),
|
|
907
|
-
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: [
|
|
908
736
|
"Reason: ",
|
|
909
737
|
status.reason
|
|
910
738
|
] }) })
|
|
911
739
|
] });
|
|
912
740
|
};
|
|
913
|
-
const DEFAULT_AWAITING_TEXT = "Awaiting Response...";
|
|
914
|
-
const ToolCallCard = ({
|
|
915
|
-
icon = "mcp-server",
|
|
916
|
-
iconClassName,
|
|
917
|
-
iconVariant,
|
|
918
|
-
toolName,
|
|
919
|
-
expanded = false,
|
|
920
|
-
onToggle,
|
|
921
|
-
awaiting = false,
|
|
922
|
-
awaitingText = DEFAULT_AWAITING_TEXT,
|
|
923
|
-
status: explicitStatus,
|
|
924
|
-
exitCode,
|
|
925
|
-
showExpandChevron = true,
|
|
926
|
-
showResponseLine = false,
|
|
927
|
-
responseIcon,
|
|
928
|
-
approvalSlot,
|
|
929
|
-
requestSlot,
|
|
930
|
-
responseSlot,
|
|
931
|
-
dataTestPrefix,
|
|
932
|
-
className,
|
|
933
|
-
highlightCard = false
|
|
934
|
-
}) => {
|
|
935
|
-
const hasApproval = !!approvalSlot;
|
|
936
|
-
const hasRequest = !!requestSlot;
|
|
937
|
-
const hasResponse = !!responseSlot;
|
|
938
|
-
const showConnector = hasApproval || hasRequest || hasResponse;
|
|
939
|
-
const isExpandable = showExpandChevron && (hasRequest || hasResponse);
|
|
940
|
-
let derivedStatus = "idle";
|
|
941
|
-
if (explicitStatus) derivedStatus = explicitStatus;
|
|
942
|
-
else if (awaiting) derivedStatus = "running";
|
|
943
|
-
else if (exitCode === 0) derivedStatus = "success";
|
|
944
|
-
else if (exitCode != null) derivedStatus = "error";
|
|
945
|
-
else if (showResponseLine) derivedStatus = "success";
|
|
946
|
-
const statusText = awaiting ? awaitingText : void 0;
|
|
947
|
-
const isCubeIcon = icon === "cube";
|
|
948
|
-
const derivedIconVariant = iconVariant || (isCubeIcon ? "primary" : "muted");
|
|
949
|
-
const derivedIconSize = isCubeIcon ? 0.75 : void 0;
|
|
950
|
-
return /* @__PURE__ */ jsx(
|
|
951
|
-
"div",
|
|
952
|
-
{
|
|
953
|
-
className: classNames(
|
|
954
|
-
"flex flex-col min-w-0",
|
|
955
|
-
{
|
|
956
|
-
"rounded-md p-1 -mx-1": highlightCard,
|
|
957
|
-
"p-0 mx-0 mt-2": !highlightCard
|
|
958
|
-
},
|
|
959
|
-
className
|
|
960
|
-
),
|
|
961
|
-
"data-test": dataTestPrefix && toDataTestId(dataTestPrefix, "tool-call-card"),
|
|
962
|
-
children: /* @__PURE__ */ jsx(
|
|
963
|
-
AgentStepRow,
|
|
964
|
-
{
|
|
965
|
-
icon,
|
|
966
|
-
iconClassName,
|
|
967
|
-
iconVariant: derivedIconVariant,
|
|
968
|
-
iconSize: derivedIconSize,
|
|
969
|
-
title: toolName,
|
|
970
|
-
expandable: isExpandable,
|
|
971
|
-
expanded,
|
|
972
|
-
onToggle,
|
|
973
|
-
status: derivedStatus,
|
|
974
|
-
statusText,
|
|
975
|
-
showConnector,
|
|
976
|
-
showContentConnector: true,
|
|
977
|
-
showPersistentContentConnector: !hasApproval,
|
|
978
|
-
dataTestPrefix: dataTestPrefix && toDataTestId(dataTestPrefix, "header"),
|
|
979
|
-
persistentChildren: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
980
|
-
approvalSlot,
|
|
981
|
-
expanded && showResponseLine && responseSlot && /* @__PURE__ */ jsx("div", { "data-test": dataTestPrefix && toDataTestId(dataTestPrefix, "response"), children: responseSlot })
|
|
982
|
-
] }),
|
|
983
|
-
children: requestSlot && /* @__PURE__ */ jsx("div", { className: "py-2 pt-0", "data-test": dataTestPrefix && toDataTestId(dataTestPrefix, "request"), children: requestSlot })
|
|
984
|
-
}
|
|
985
|
-
)
|
|
986
|
-
}
|
|
987
|
-
);
|
|
988
|
-
};
|
|
989
|
-
const ToolCallContentBlock = ({
|
|
990
|
-
title,
|
|
991
|
-
content,
|
|
992
|
-
isJson = true,
|
|
993
|
-
copyValue,
|
|
994
|
-
maxHeight = "10.5rem",
|
|
995
|
-
resizable = false,
|
|
996
|
-
fullscreen = false,
|
|
997
|
-
onFullscreenChange,
|
|
998
|
-
contentHeightRem = 1.5,
|
|
999
|
-
contentRef,
|
|
1000
|
-
dataTestPrefix,
|
|
1001
|
-
className
|
|
1002
|
-
}) => {
|
|
1003
|
-
return /* @__PURE__ */ jsxs(
|
|
1004
|
-
"div",
|
|
1005
|
-
{
|
|
1006
|
-
className: classNames("flex flex-col text-gray-950 text-xs font-medium leading-4 font-sans", className),
|
|
1007
|
-
"data-test": dataTestPrefix && toDataTestId(dataTestPrefix, "content-block"),
|
|
1008
|
-
children: [
|
|
1009
|
-
/* @__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: [
|
|
1010
|
-
/* @__PURE__ */ jsx("div", { className: "text-xs font-medium font-sans text-indigo-600 dark:text-gray-700", children: title }),
|
|
1011
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
1012
|
-
/* @__PURE__ */ jsx(
|
|
1013
|
-
CopyField,
|
|
1014
|
-
{
|
|
1015
|
-
rawValue: copyValue ?? content,
|
|
1016
|
-
icon: ["far", "clone"],
|
|
1017
|
-
isIconButton: true,
|
|
1018
|
-
dataTestPrefix: dataTestPrefix && toDataTestId(dataTestPrefix, "copy")
|
|
1019
|
-
}
|
|
1020
|
-
),
|
|
1021
|
-
/* @__PURE__ */ jsx(
|
|
1022
|
-
IconButton,
|
|
1023
|
-
{
|
|
1024
|
-
icon: "expand-alt",
|
|
1025
|
-
iconSize: 1.25,
|
|
1026
|
-
onClick: () => onFullscreenChange == null ? void 0 : onFullscreenChange(true),
|
|
1027
|
-
tooltip: "Expand",
|
|
1028
|
-
className: "text-gray-500"
|
|
1029
|
-
}
|
|
1030
|
-
)
|
|
1031
|
-
] })
|
|
1032
|
-
] }),
|
|
1033
|
-
/* @__PURE__ */ jsx(
|
|
1034
|
-
"div",
|
|
1035
|
-
{
|
|
1036
|
-
ref: resizable ? contentRef : void 0,
|
|
1037
|
-
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",
|
|
1038
|
-
style: resizable ? {
|
|
1039
|
-
height: `${Math.min(contentHeightRem, 10)}rem`,
|
|
1040
|
-
resize: "vertical",
|
|
1041
|
-
padding: "0.5rem"
|
|
1042
|
-
} : {
|
|
1043
|
-
maxHeight,
|
|
1044
|
-
padding: "0.5rem"
|
|
1045
|
-
},
|
|
1046
|
-
children: isJson ? /* @__PURE__ */ jsx(
|
|
1047
|
-
SimpleCodeEditor,
|
|
1048
|
-
{
|
|
1049
|
-
language: "json",
|
|
1050
|
-
defaultValue: content,
|
|
1051
|
-
value: content,
|
|
1052
|
-
readOnly: true,
|
|
1053
|
-
isFoldingEnabled: true,
|
|
1054
|
-
maxHeight: 10.5,
|
|
1055
|
-
initialLinesCount: 1,
|
|
1056
|
-
openAsFullscreen: fullscreen,
|
|
1057
|
-
onMinimise: () => onFullscreenChange == null ? void 0 : onFullscreenChange(false),
|
|
1058
|
-
showExpandOnlyInFullscreen: true,
|
|
1059
|
-
className: "border-none !p-1",
|
|
1060
|
-
autoLayout: true,
|
|
1061
|
-
enableLineNumbersForText: true
|
|
1062
|
-
}
|
|
1063
|
-
) : /* @__PURE__ */ jsx(Markdown, { className: "text-gray-600 text-xs", children: content })
|
|
1064
|
-
}
|
|
1065
|
-
)
|
|
1066
|
-
]
|
|
1067
|
-
}
|
|
1068
|
-
);
|
|
1069
|
-
};
|
|
1070
741
|
export {
|
|
1071
742
|
ASK_USER_CUSTOM_OPTION,
|
|
1072
743
|
AgentStepRow,
|
|
@@ -1075,12 +746,9 @@ export {
|
|
|
1075
746
|
AssistantMessage,
|
|
1076
747
|
McpAuthCard,
|
|
1077
748
|
ReasoningCard,
|
|
1078
|
-
SandboxToolCall,
|
|
1079
749
|
StepIconBox,
|
|
1080
750
|
SubAgentCard,
|
|
1081
751
|
ToolApprovalBlock,
|
|
1082
|
-
ToolCallCard,
|
|
1083
|
-
ToolCallContentBlock,
|
|
1084
752
|
default2 as UserMessage,
|
|
1085
753
|
default3 as UserMessageEdit
|
|
1086
754
|
};
|