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.
Files changed (226) hide show
  1. package/README.md +49 -58
  2. package/dist/Button-C77b7jpW.js +284 -0
  3. package/dist/Button-C77b7jpW.js.map +1 -0
  4. package/dist/CompositeItem-BGwD51jI.js +33 -0
  5. package/dist/CompositeItem-BGwD51jI.js.map +1 -0
  6. package/dist/CompositeList-D4xmSZ5V.js +291 -0
  7. package/dist/CompositeList-D4xmSZ5V.js.map +1 -0
  8. package/dist/CompositeRoot-BxrPc7F6.js +351 -0
  9. package/dist/CompositeRoot-BxrPc7F6.js.map +1 -0
  10. package/dist/DirectionContext-Pb9yafF5.js +11 -0
  11. package/dist/DirectionContext-Pb9yafF5.js.map +1 -0
  12. package/dist/FieldItemContext-DRVgx-D1.js +13 -0
  13. package/dist/FieldItemContext-DRVgx-D1.js.map +1 -0
  14. package/dist/{Input-BvwIpntS.js → Input-Dhmo6L2n.js} +100 -78
  15. package/dist/Input-Dhmo6L2n.js.map +1 -0
  16. package/dist/Modal-C4MUy9GD.js +696 -0
  17. package/dist/Modal-C4MUy9GD.js.map +1 -0
  18. package/dist/{MonacoEditorCore-xfpJ6z-E.js → MonacoEditorCore-n-df5f7I.js} +2 -2
  19. package/dist/{MonacoEditorCore-xfpJ6z-E.js.map → MonacoEditorCore-n-df5f7I.js.map} +1 -1
  20. package/dist/Popover-eC_vX5By.js +1074 -0
  21. package/dist/Popover-eC_vX5By.js.map +1 -0
  22. package/dist/ToolbarRootContext-B_HxjkNI.js +11 -0
  23. package/dist/ToolbarRootContext-B_HxjkNI.js.map +1 -0
  24. package/dist/Tooltip-BuGLP-PU.js +4096 -0
  25. package/dist/Tooltip-BuGLP-PU.js.map +1 -0
  26. package/dist/classNames-B1XpQHle.js +44 -0
  27. package/dist/classNames-B1XpQHle.js.map +1 -0
  28. package/dist/components/atoms/Accordion.d.ts +19 -37
  29. package/dist/components/atoms/Accordion.es.js +847 -78
  30. package/dist/components/atoms/Accordion.es.js.map +1 -1
  31. package/dist/components/atoms/AudioPlayer.es.js +9 -9
  32. package/dist/components/atoms/AudioPlayer.es.js.map +1 -1
  33. package/dist/components/atoms/Avatar.d.ts +42 -9
  34. package/dist/components/atoms/Avatar.es.js +491 -36
  35. package/dist/components/atoms/Avatar.es.js.map +1 -1
  36. package/dist/components/atoms/Badge.d.ts +40 -35
  37. package/dist/components/atoms/Badge.es.js +163 -53
  38. package/dist/components/atoms/Badge.es.js.map +1 -1
  39. package/dist/components/atoms/Button.d.ts +37 -16
  40. package/dist/components/atoms/Button.es.js +16 -221
  41. package/dist/components/atoms/Button.es.js.map +1 -1
  42. package/dist/components/atoms/ButtonGroup.d.ts +53 -0
  43. package/dist/components/atoms/ButtonGroup.es.js +349 -0
  44. package/dist/components/atoms/ButtonGroup.es.js.map +1 -0
  45. package/dist/components/atoms/IconButton.d.ts +23 -9
  46. package/dist/components/atoms/IconButton.es.js +82 -16
  47. package/dist/components/atoms/IconButton.es.js.map +1 -1
  48. package/dist/components/atoms/IconProvider.d.ts +1 -1
  49. package/dist/components/atoms/IconProvider.es.js +48 -7
  50. package/dist/components/atoms/IconProvider.es.js.map +1 -1
  51. package/dist/components/atoms/Modal.d.ts +27 -3
  52. package/dist/components/atoms/Modal.es.js +15 -16
  53. package/dist/components/atoms/Modal.es.js.map +1 -1
  54. package/dist/components/atoms/Notification.d.ts +1 -1
  55. package/dist/components/atoms/Notification.es.js +26 -3
  56. package/dist/components/atoms/Notification.es.js.map +1 -1
  57. package/dist/components/atoms/OutlinedRadio.d.ts +6 -2
  58. package/dist/components/atoms/OutlinedRadio.es.js +12 -25
  59. package/dist/components/atoms/OutlinedRadio.es.js.map +1 -1
  60. package/dist/components/atoms/Progress.d.ts +48 -0
  61. package/dist/components/atoms/Progress.es.js +279 -0
  62. package/dist/components/atoms/Progress.es.js.map +1 -0
  63. package/dist/components/atoms/Skeleton.d.ts +9 -3
  64. package/dist/components/atoms/Skeleton.es.js +33 -3
  65. package/dist/components/atoms/Skeleton.es.js.map +1 -1
  66. package/dist/components/atoms/Spinner.d.ts +15 -4
  67. package/dist/components/atoms/Spinner.es.js +86 -22
  68. package/dist/components/atoms/Spinner.es.js.map +1 -1
  69. package/dist/components/atoms/Switch.d.ts +19 -7
  70. package/dist/components/atoms/Switch.es.js +288 -50
  71. package/dist/components/atoms/Switch.es.js.map +1 -1
  72. package/dist/components/atoms/TabButton.d.ts +17 -3
  73. package/dist/components/atoms/TabButton.es.js +647 -25
  74. package/dist/components/atoms/TabButton.es.js.map +1 -1
  75. package/dist/components/atoms/TabPanel.es.js +1 -1
  76. package/dist/components/atoms/Tag.d.ts +43 -0
  77. package/dist/components/atoms/Tag.es.js +219 -0
  78. package/dist/components/atoms/Tag.es.js.map +1 -0
  79. package/dist/components/atoms/Tooltip.d.ts +36 -14
  80. package/dist/components/atoms/Tooltip.es.js +7 -114
  81. package/dist/components/atoms/Tooltip.es.js.map +1 -1
  82. package/dist/components/molecules/Alert.d.ts +1 -1
  83. package/dist/components/molecules/Alert.es.js +13 -9
  84. package/dist/components/molecules/Alert.es.js.map +1 -1
  85. package/dist/components/molecules/CopyField.d.ts +2 -2
  86. package/dist/components/molecules/CopyField.es.js +3 -4
  87. package/dist/components/molecules/CopyField.es.js.map +1 -1
  88. package/dist/components/molecules/CustomDrawer.d.ts +5 -4
  89. package/dist/components/molecules/CustomDrawer.es.js +141 -82
  90. package/dist/components/molecules/CustomDrawer.es.js.map +1 -1
  91. package/dist/components/molecules/Dialog.d.ts +16 -8
  92. package/dist/components/molecules/Dialog.es.js +33 -31
  93. package/dist/components/molecules/Dialog.es.js.map +1 -1
  94. package/dist/components/molecules/ImagesPreview.es.js +15 -11
  95. package/dist/components/molecules/ImagesPreview.es.js.map +1 -1
  96. package/dist/components/molecules/Input.d.ts +1 -1
  97. package/dist/components/molecules/Input.es.js +3 -5
  98. package/dist/components/molecules/Input.es.js.map +1 -1
  99. package/dist/components/molecules/Markdown/ExpandableMarkdown.d.ts +8 -8
  100. package/dist/components/molecules/Markdown/components.d.ts +12 -11
  101. package/dist/components/molecules/Markdown.es.js +26 -49
  102. package/dist/components/molecules/Markdown.es.js.map +1 -1
  103. package/dist/components/molecules/Notify.d.ts +30 -1
  104. package/dist/components/molecules/Notify.es.js +91 -36
  105. package/dist/components/molecules/Notify.es.js.map +1 -1
  106. package/dist/components/molecules/SimpleCodeEditor.es.js +32 -19
  107. package/dist/components/molecules/SimpleCodeEditor.es.js.map +1 -1
  108. package/dist/components/molecules/ToggleButton.d.ts +3 -2
  109. package/dist/components/molecules/ToggleButton.es.js +155 -57
  110. package/dist/components/molecules/ToggleButton.es.js.map +1 -1
  111. package/dist/components/molecules/agent-chat/AgentStepsCard.d.ts +2 -2
  112. package/dist/components/molecules/agent-chat/UserMessage.es.js +2 -2
  113. package/dist/components/molecules/agent-chat/UserMessage.es.js.map +1 -1
  114. package/dist/components/molecules/agent-chat/UserMessageEdit.es.js +5 -5
  115. package/dist/components/molecules/agent-chat/UserMessageEdit.es.js.map +1 -1
  116. package/dist/components/molecules/agent-chat/index.d.ts +0 -6
  117. package/dist/components/molecules/agent-chat.es.js +78 -410
  118. package/dist/components/molecules/agent-chat.es.js.map +1 -1
  119. package/dist/components/molecules/monacoEditorCore/MonacoEditorCore.d.ts +0 -1
  120. package/dist/components/theme/colors.d.ts +17 -53
  121. package/dist/components/theme/colors.es.js +384 -180
  122. package/dist/components/theme/colors.es.js.map +1 -1
  123. package/dist/components/theme/theme.d.ts +14 -11
  124. package/dist/components/theme/theme.es.js +3 -64
  125. package/dist/components/theme/theme.es.js.map +1 -1
  126. package/dist/components/theme/useTheme.es.js +1 -4
  127. package/dist/components/theme/useTheme.es.js.map +1 -1
  128. package/dist/composite-CrCQWAKA.js +108 -0
  129. package/dist/composite-CrCQWAKA.js.map +1 -0
  130. package/dist/composite-DCpXNxz9.js +66 -0
  131. package/dist/composite-DCpXNxz9.js.map +1 -0
  132. package/dist/conversions-CbWPvHRE.js +14 -0
  133. package/dist/conversions-CbWPvHRE.js.map +1 -0
  134. package/dist/error-FX4R42W-.js +6 -0
  135. package/dist/error-FX4R42W-.js.map +1 -0
  136. package/dist/fonts.css +7 -0
  137. package/dist/hooks/useContainerDimensions.d.ts +1 -1
  138. package/dist/index-B806bfA-.js +257 -0
  139. package/dist/index-B806bfA-.js.map +1 -0
  140. package/dist/index-DSVg79g-.js +45 -0
  141. package/dist/index-DSVg79g-.js.map +1 -0
  142. package/dist/index.d.ts +19 -4
  143. package/dist/index.es.js +56 -9
  144. package/dist/index.es.js.map +1 -1
  145. package/dist/inertValue-IJM5NA30.js +11 -0
  146. package/dist/inertValue-IJM5NA30.js.map +1 -0
  147. package/dist/lib/utils.d.ts +1 -0
  148. package/dist/markdown.css +13 -14
  149. package/dist/new-components/atoms/Checkbox.d.ts +6 -0
  150. package/dist/new-components/atoms/Checkbox.es.js +423 -0
  151. package/dist/new-components/atoms/Checkbox.es.js.map +1 -0
  152. package/dist/new-components/atoms/Chip.d.ts +38 -0
  153. package/dist/new-components/atoms/Chip.es.js +269 -0
  154. package/dist/new-components/atoms/Chip.es.js.map +1 -0
  155. package/dist/new-components/atoms/Popover.d.ts +87 -0
  156. package/dist/new-components/atoms/Popover.es.js +21 -0
  157. package/dist/new-components/atoms/Popover.es.js.map +1 -0
  158. package/dist/new-components/atoms/Radio.d.ts +14 -0
  159. package/dist/new-components/atoms/Radio.es.js +536 -0
  160. package/dist/new-components/atoms/Radio.es.js.map +1 -0
  161. package/dist/new-components/atoms/SegmentedControl.d.ts +28 -0
  162. package/dist/new-components/atoms/SegmentedControl.es.js +326 -0
  163. package/dist/new-components/atoms/SegmentedControl.es.js.map +1 -0
  164. package/dist/new-components/atoms/Slider.d.ts +8 -0
  165. package/dist/new-components/atoms/Slider.es.js +1415 -0
  166. package/dist/new-components/atoms/Slider.es.js.map +1 -0
  167. package/dist/new-components/atoms/Toggletip.d.ts +43 -0
  168. package/dist/new-components/atoms/Toggletip.es.js +216 -0
  169. package/dist/new-components/atoms/Toggletip.es.js.map +1 -0
  170. package/dist/new-components/atoms/stories/ThemeComparison.d.ts +8 -0
  171. package/dist/shadowDom-Bq4g0Qeu.js +52 -0
  172. package/dist/shadowDom-Bq4g0Qeu.js.map +1 -0
  173. package/dist/style.css +1 -1
  174. package/dist/theme.css +9 -154
  175. package/dist/tokens.css +1136 -0
  176. package/dist/useAnimationFrame-DwhymJoW.js +108 -0
  177. package/dist/useAnimationFrame-DwhymJoW.js.map +1 -0
  178. package/dist/useAriaLabelledBy-B6n92QBS.js +49 -0
  179. package/dist/useAriaLabelledBy-B6n92QBS.js.map +1 -0
  180. package/dist/useBaseUiId-Ch7ujXpo.js +281 -0
  181. package/dist/useBaseUiId-Ch7ujXpo.js.map +1 -0
  182. package/dist/useButton-PUBhT4Vo.js +235 -0
  183. package/dist/useButton-PUBhT4Vo.js.map +1 -0
  184. package/dist/useControlled-BSyYkg5C.js +65 -0
  185. package/dist/useControlled-BSyYkg5C.js.map +1 -0
  186. package/dist/useIsoLayoutEffect-e9VA-ICd.js +499 -0
  187. package/dist/useIsoLayoutEffect-e9VA-ICd.js.map +1 -0
  188. package/dist/useLabelableId-DCLzrdD-.js +241 -0
  189. package/dist/useLabelableId-DCLzrdD-.js.map +1 -0
  190. package/dist/useOpenInteractionType-DGWLoAqp.js +1086 -0
  191. package/dist/useOpenInteractionType-DGWLoAqp.js.map +1 -0
  192. package/dist/usePopupHandleStore-BdS-xYID.js +2372 -0
  193. package/dist/usePopupHandleStore-BdS-xYID.js.map +1 -0
  194. package/dist/useTimeout-BXf1hDIL.js +46 -0
  195. package/dist/useTimeout-BXf1hDIL.js.map +1 -0
  196. package/dist/useTransitionStatus-C9gg_XJ-.js +202 -0
  197. package/dist/useTransitionStatus-C9gg_XJ-.js.map +1 -0
  198. package/dist/useValueAsRef-BfFRcMg6.js +28 -0
  199. package/dist/useValueAsRef-BfFRcMg6.js.map +1 -0
  200. package/dist/utils/classNames.d.ts +3 -2
  201. package/dist/visuallyHidden-B6H2X3_Y.js +26 -0
  202. package/dist/visuallyHidden-B6H2X3_Y.js.map +1 -0
  203. package/dist/vite-env.d.ts +18 -0
  204. package/package.json +30 -22
  205. package/dist/Input-BvwIpntS.js.map +0 -1
  206. package/dist/Notification-BT4CZ69U.js +0 -39
  207. package/dist/Notification-BT4CZ69U.js.map +0 -1
  208. package/dist/RootFontSizeContext-7vgn7Y_k.js +0 -22
  209. package/dist/RootFontSizeContext-7vgn7Y_k.js.map +0 -1
  210. package/dist/classNames-Dy-RXSjS.js +0 -9
  211. package/dist/classNames-Dy-RXSjS.js.map +0 -1
  212. package/dist/components/molecules/DropdownMenu.d.ts +0 -18
  213. package/dist/components/molecules/DropdownMenu.es.js +0 -104
  214. package/dist/components/molecules/DropdownMenu.es.js.map +0 -1
  215. package/dist/components/molecules/ThumbsFeedback.d.ts +0 -13
  216. package/dist/components/molecules/ThumbsFeedback.es.js +0 -98
  217. package/dist/components/molecules/ThumbsFeedback.es.js.map +0 -1
  218. package/dist/components/molecules/agent-chat/SandboxToolCall.d.ts +0 -15
  219. package/dist/components/molecules/agent-chat/ToolCallCard.d.ts +0 -26
  220. package/dist/components/molecules/agent-chat/ToolCallContentBlock.d.ts +0 -17
  221. package/dist/components/theme/lightColorPlugin.d.ts +0 -1
  222. package/dist/components/theme/lightColorPlugin.es.js +0 -92
  223. package/dist/components/theme/lightColorPlugin.es.js.map +0 -1
  224. package/dist/tailwindPreset.d.ts +0 -144
  225. package/dist/tailwindPreset.es.js +0 -100
  226. 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-Dy-RXSjS.js";
3
- import { t as toDataTestId } from "../../Notification-BT4CZ69U.js";
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 { Accordion, AccordionSummary, AccordionDetails } from "../atoms/Accordion.es.js";
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, C as CopyField } from "../../Input-BvwIpntS.js";
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-indigo-600 dark:text-gray-750": variant === "primary",
47
- "text-gray-600 dark:text-gray-750": variant === "muted"
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-gray-600 transition-transform duration-300 shrink-0",
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-gray-500 font-sans leading-none", children: label }),
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-gray-700 font-sans truncate min-w-0",
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: ["far", "check-circle"],
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-gray-600 font-sans mt-1",
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-gray-750 text-xs font-medium leading-4 font-sans", children: statusText })
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-gray-300" }) }),
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-gray-300" }) }),
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 { isDark } = useTheme();
228
- const toolLabel = `${toolCount} tool ${toolCount === 1 ? "call" : "calls"}`;
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
- Accordion,
225
+ "div",
233
226
  {
234
- expanded,
235
- onChange: () => onToggle(),
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__ */ jsx(
243
- AccordionSummary,
244
- {
245
- hideIcon: true,
246
- disableRipple: true,
247
- sx: {
248
- padding: 0,
249
- minHeight: 0,
250
- "&.Mui-expanded": { minHeight: 0 },
251
- "& .MuiAccordionSummary-content": { margin: 0, width: "100%" }
252
- },
253
- children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 w-full py-2 px-2.5 text-left text-xs", children: [
254
- /* @__PURE__ */ jsx(
255
- IconProvider,
256
- {
257
- icon: expanded ? "chevron-down" : "chevron-right",
258
- size: 0.75,
259
- className: "shrink-0 text-gray-500"
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-gray-200 dark:border-gray-275 p-3",
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-indigo-50 dark:bg-gray-250 border rounded-t-lg border-indigo-300 dark:border-gray-275 px-4 py-2 flex items-center justify-between", children: [
311
- /* @__PURE__ */ jsx("div", { className: "text-xs font-medium font-sans text-indigo-600 dark:text-gray-700", children: q.question }),
312
- /* @__PURE__ */ jsx("div", { className: "text-[0.6875rem] flex items-center gap-1 font-medium text-gray-600 border border-indigo-400 bg-white dark:bg-gray-200 rounded px-2 py-0.5 shrink-0 h-fit", children: /* @__PURE__ */ jsx("span", { className: "text-[0.6875rem] leading-tight", children: "Answered" }) })
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-gray-250 border-t-0 dark:border-gray-275 rounded-b-lg", children: [
315
- /* @__PURE__ */ jsx(IconProvider, { icon: "check-circle", size: 0.875, className: "text-indigo-600 shrink-0" }),
316
- /* @__PURE__ */ jsx("span", { className: "text-[0.8125rem] font-medium font-sans text-gray-700", children: q.isCustom ? `Other: ${q.answer}` : q.answer })
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-indigo-50 dark:bg-gray-250 border rounded-t-lg border-indigo-300 dark:border-gray-275 px-4 py-2 flex items-center justify-between", children: [
323
- /* @__PURE__ */ jsx("div", { className: "text-sm font-sans font-medium text-indigo-600 dark:text-gray-700", children: totalQuestions > 1 ? "Questions" : currentQuestion.question }),
324
- readOnly ? /* @__PURE__ */ jsx("div", { className: "text-[0.6875rem] flex items-center gap-1 font-medium text-gray-600 border border-indigo-400 bg-white dark:bg-gray-200 rounded px-2 py-0.5 shrink-0 h-fit", children: /* @__PURE__ */ jsx("span", { className: "text-[0.6875rem] leading-tight", children: "Unanswered" }) }) : null,
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-indigo-200 font-medium font-sans text-gray-800 rounded", children: [
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-gray-250 border-t-0 dark:border-gray-275 rounded-b-lg", children: [
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-gray-750", children: currentQuestion.question || "What would you like to do?" }),
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-gray-700", children: opt })
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-gray-250 dark:border-gray-275 overflow-hidden mt-2", className),
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-indigo-50 dark:bg-gray-250 border-b border-indigo-300 dark:border-gray-275 px-4 py-2", children: /* @__PURE__ */ jsx("div", { className: "text-sm font-medium font-sans text-indigo-600 dark:text-gray-700", children: title }) }),
501
- /* @__PURE__ */ jsxs("div", { className: "bg-white dark:bg-gray-200 px-4 py-3 flex flex-col gap-3", children: [
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-gray-600 shrink-0", children: "MCP Server Name" }),
505
- /* @__PURE__ */ jsx("span", { className: "font-semibold text-xs text-gray-500 shrink-0", children: ":" }),
506
- /* @__PURE__ */ jsx("span", { className: "font-sans font-medium text-gray-850 truncate", children: server.name })
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-gray-250", children: /* @__PURE__ */ jsx(Button.Primary, { text: "Continue", size: "small", disabled: readOnly, onClick: onContinue }) })
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-gray-600 text-sm font-normal font-sans",
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-gray-600 font-sans text-sm", children: content })
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-gray-600 dark:text-gray-400 font-sans text-sm", children: instruction }) : null;
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-gray-200 dark:border-gray-275 rounded-md p-2 mb-3", children: [
757
- /* @__PURE__ */ jsx("h4", { className: "text-sm font-semibold text-gray-900", children: "Instructions" }),
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-gray-600",
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-gray-300 dark:bg-gray-275 min-h-[0.75rem]" }),
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-gray-300 dark:bg-gray-275 min-h-[0.75rem]" })
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-gray-750 text-xs font-medium leading-4 font-sans inline-flex flex-wrap items-center gap-1", children: [
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-gray-750 dark:text-gray-200", children: selectedDenyOption.confirm.title }),
883
- selectedDenyOption.confirm.description && /* @__PURE__ */ jsx("span", { className: "text-xs text-gray-600 dark:text-gray-400", children: selectedDenyOption.confirm.description })
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-gray-600 dark:text-gray-400", children: "Grants:" }),
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-gray-600 dark:text-gray-400", children: [
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
  };