@axiom-lattice/react-sdk 2.1.5 → 2.1.6

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/dist/index.js CHANGED
@@ -638,25 +638,14 @@ var import_react_syntax_highlighter = require("react-syntax-highlighter");
638
638
  var import_prism = require("react-syntax-highlighter/dist/cjs/styles/prism");
639
639
  var import_remark_gfm = __toESM(require("remark-gfm"));
640
640
  var import_react13 = require("react");
641
- var import_antd_style6 = require("antd-style");
641
+ var import_antd_style5 = require("antd-style");
642
642
  var import_rehype_raw = __toESM(require("rehype-raw"));
643
643
 
644
644
  // src/components/GenUI/elements/confirm_feedback.tsx
645
645
  var import_antd = require("antd");
646
646
  var import_react6 = require("react");
647
- var import_antd_style = require("antd-style");
648
647
  var import_jsx_runtime2 = require("react/jsx-runtime");
649
648
  var { Text } = import_antd.Typography;
650
- var useStyle = (0, import_antd_style.createStyles)(({ token, css }) => ({
651
- card: css`
652
- max-width: 1200px;
653
- background: linear-gradient(
654
- 919deg,
655
- rgb(232 67 157 / 8%),
656
- rgb(250 235 206 / 28%) 43%
657
- );
658
- `
659
- }));
660
649
  var ConfirmFeedback = ({
661
650
  data,
662
651
  eventHandler,
@@ -664,23 +653,7 @@ var ConfirmFeedback = ({
664
653
  }) => {
665
654
  const { message: message3, type, config, feedback, options } = data ?? {};
666
655
  const [clicked, setClicked] = (0, import_react6.useState)(false);
667
- const { styles } = useStyle();
668
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_antd.Card, { size: "small", className: `shadow-sm ${styles.card}`, bordered: false, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_antd.Space, { direction: "vertical", style: { width: "100%" }, children: [
669
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
670
- import_antd.Tag,
671
- {
672
- bordered: false,
673
- color: "orange",
674
- style: {
675
- fontSize: 14,
676
- fontWeight: "bold",
677
- background: "#ffffff8f",
678
- padding: 4,
679
- borderRadius: 8
680
- },
681
- children: "\u8BF7\u6C42\u786E\u8BA4"
682
- }
683
- ),
656
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_antd.Space, { direction: "vertical", style: { width: "100%" }, children: [
684
657
  /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(MDResponse, { content: message3 }),
685
658
  options ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_antd.Space, { style: { justifyContent: "flex-end", width: "100%" }, children: options?.map((option) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
686
659
  import_antd.Button,
@@ -747,7 +720,7 @@ var ConfirmFeedback = ({
747
720
  }
748
721
  )
749
722
  ] })
750
- ] }) });
723
+ ] });
751
724
  };
752
725
 
753
726
  // src/components/GenUI/elements/generic_data_table.tsx
@@ -916,11 +889,11 @@ var import_icons3 = require("@ant-design/icons");
916
889
 
917
890
  // src/components/GenUI/elements/ToolCard.tsx
918
891
  var import_antd3 = require("antd");
919
- var import_antd_style2 = require("antd-style");
892
+ var import_antd_style = require("antd-style");
920
893
  var import_icons2 = require("@ant-design/icons");
921
894
  var import_jsx_runtime5 = require("react/jsx-runtime");
922
895
  var { Text: Text3, Title } = import_antd3.Typography;
923
- var useStyle2 = (0, import_antd_style2.createStyles)(({ token, css }) => ({
896
+ var useStyle = (0, import_antd_style.createStyles)(({ token, css }) => ({
924
897
  card: css`
925
898
  max-width: 500px;
926
899
  background: linear-gradient(
@@ -987,7 +960,7 @@ var ToolCard = ({
987
960
  eventHandler,
988
961
  interactive = true
989
962
  }) => {
990
- const { styles } = useStyle2();
963
+ const { styles } = useStyle();
991
964
  if (!data || !data.name) {
992
965
  return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_antd3.Card, { size: "small", className: styles.card, bordered: false, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text3, { type: "secondary", children: "Invalid tool data" }) });
993
966
  }
@@ -1191,11 +1164,11 @@ var ToolCall = ({ data, eventHandler }) => {
1191
1164
 
1192
1165
  // src/components/GenUI/elements/Todo.tsx
1193
1166
  var import_antd5 = require("antd");
1194
- var import_antd_style3 = require("antd-style");
1167
+ var import_antd_style2 = require("antd-style");
1195
1168
  var import_icons4 = require("@ant-design/icons");
1196
1169
  var import_jsx_runtime7 = require("react/jsx-runtime");
1197
1170
  var { Text: Text4 } = import_antd5.Typography;
1198
- var useStyle3 = (0, import_antd_style3.createStyles)(({ token, css }) => ({
1171
+ var useStyle2 = (0, import_antd_style2.createStyles)(({ token, css }) => ({
1199
1172
  card: css`
1200
1173
  max-width: 1200px;
1201
1174
  background: linear-gradient(
@@ -1227,7 +1200,7 @@ var Todo = ({
1227
1200
  eventHandler,
1228
1201
  interactive = true
1229
1202
  }) => {
1230
- const { styles } = useStyle3();
1203
+ const { styles } = useStyle2();
1231
1204
  const getStatusIcon3 = (status) => {
1232
1205
  switch (status) {
1233
1206
  case "completed":
@@ -1385,7 +1358,7 @@ var WriteTodos = ({
1385
1358
  var import_react8 = require("react");
1386
1359
  var import_antd7 = require("antd");
1387
1360
  var import_icons7 = require("@ant-design/icons");
1388
- var import_antd_style4 = require("antd-style");
1361
+ var import_antd_style3 = require("antd-style");
1389
1362
 
1390
1363
  // src/components/GenUI/elements/getFileIcon.tsx
1391
1364
  var import_icons6 = require("@ant-design/icons");
@@ -1423,7 +1396,7 @@ var getFileIcon = (filename) => {
1423
1396
 
1424
1397
  // src/components/GenUI/FileExplorer.tsx
1425
1398
  var import_jsx_runtime10 = require("react/jsx-runtime");
1426
- var useStyles = (0, import_antd_style4.createStyles)(({ token, css }) => ({
1399
+ var useStyles = (0, import_antd_style3.createStyles)(({ token, css }) => ({
1427
1400
  container: css`
1428
1401
  height: 100%;
1429
1402
  background: ${token.colorBgContainer};
@@ -1785,7 +1758,7 @@ var AttachmentsCard = ({
1785
1758
  columns = 1,
1786
1759
  showDownloadButton = false
1787
1760
  }) => {
1788
- const { Text: Text8 } = import_antd8.Typography;
1761
+ const { Text: Text9 } = import_antd8.Typography;
1789
1762
  const [showAll, setShowAll] = (0, import_react9.useState)(false);
1790
1763
  const getStyles = () => {
1791
1764
  switch (size) {
@@ -1862,7 +1835,7 @@ var AttachmentsCard = ({
1862
1835
  );
1863
1836
  };
1864
1837
  const renderFileDescription = (item) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_antd8.Space, { direction: "vertical", size: size === "small" ? 2 : 4, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_antd8.Space, { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1865
- Text8,
1838
+ Text9,
1866
1839
  {
1867
1840
  type: "secondary",
1868
1841
  style: {
@@ -1941,7 +1914,7 @@ var AttachmentsCard = ({
1941
1914
  }
1942
1915
  ),
1943
1916
  item.files && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { style: { paddingLeft: "12px" }, children: [
1944
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(Text8, { type: "secondary", style: { fontSize: "12px" }, children: [
1917
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(Text9, { type: "secondary", style: { fontSize: "12px" }, children: [
1945
1918
  "\u5305\u542B\u6587\u4EF6(",
1946
1919
  item.files.length,
1947
1920
  ")"
@@ -2050,13 +2023,13 @@ var import_antd11 = require("antd");
2050
2023
  // src/components/GenUI/elements/ContentPreviewCollapse.tsx
2051
2024
  var import_react11 = require("react");
2052
2025
  var import_antd10 = require("antd");
2053
- var import_antd_style5 = require("antd-style");
2026
+ var import_antd_style4 = require("antd-style");
2054
2027
  var import_icons8 = require("@ant-design/icons");
2055
2028
  var import_CollapsePanel3 = __toESM(require("antd/es/collapse/CollapsePanel"));
2056
2029
  var import_jsx_runtime13 = require("react/jsx-runtime");
2057
2030
  var DEFAULT_COLLAPSED_MAX_HEIGHT = 180;
2058
2031
  var DEFAULT_EXPANDED_MAX_HEIGHT = 500;
2059
- var useStyle4 = (0, import_antd_style5.createStyles)(
2032
+ var useStyle3 = (0, import_antd_style4.createStyles)(
2060
2033
  ({ css }, { showShadow }) => ({
2061
2034
  collapse: css`
2062
2035
  .ant-collapse-header {
@@ -2122,7 +2095,7 @@ var ContentPreviewCollapse = ({
2122
2095
  const [isOverflowing, setIsOverflowing] = (0, import_react11.useState)(false);
2123
2096
  const contentRef = (0, import_react11.useRef)(null);
2124
2097
  const showShadow = isOverflowing && !showFullContent;
2125
- const { styles, cx } = useStyle4({ showShadow });
2098
+ const { styles, cx } = useStyle3({ showShadow });
2126
2099
  const checkOverflow = (0, import_react11.useCallback)(() => {
2127
2100
  if (contentRef.current) {
2128
2101
  const scrollHeight = contentRef.current.scrollHeight;
@@ -2457,7 +2430,7 @@ var MDMermaid = ({ children = [] }) => {
2457
2430
  // src/components/GenUI/MDResponse.tsx
2458
2431
  var import_jsx_runtime18 = require("react/jsx-runtime");
2459
2432
  var SyntaxHighlighter = import_react_syntax_highlighter.Prism;
2460
- var useStyles2 = (0, import_antd_style6.createStyles)(({ token, css }) => ({
2433
+ var useStyles2 = (0, import_antd_style5.createStyles)(({ token, css }) => ({
2461
2434
  markdownTableContainer: css`
2462
2435
  overflow-x: auto;
2463
2436
  width: 100%;
@@ -2649,11 +2622,61 @@ var IFrameCard = ({ src }) => {
2649
2622
  // src/components/Chat/Chating.tsx
2650
2623
  var import_icons9 = require("@ant-design/icons");
2651
2624
  var import_x2 = require("@ant-design/x");
2652
- var import_antd13 = require("antd");
2625
+ var import_antd14 = require("antd");
2653
2626
  var import_ErrorBoundary = __toESM(require("antd/es/alert/ErrorBoundary"));
2654
2627
  var import_react14 = __toESM(require("react"));
2655
2628
  var import_react_i18next = require("react-i18next");
2629
+
2630
+ // src/components/GenUI/HITLContainer.tsx
2631
+ var import_antd13 = require("antd");
2632
+ var import_antd_style6 = require("antd-style");
2656
2633
  var import_jsx_runtime19 = require("react/jsx-runtime");
2634
+ var { Text: Text8 } = import_antd13.Typography;
2635
+ var useStyle4 = (0, import_antd_style6.createStyles)(({ token, css }) => ({
2636
+ card: css`
2637
+ max-width: 1200px;
2638
+ margin: 8px 20px;
2639
+ background: linear-gradient(
2640
+ 919deg,
2641
+ rgb(232 67 157 / 8%),
2642
+ rgb(250 235 206 / 28%) 43%
2643
+ );
2644
+ `
2645
+ }));
2646
+ var HITLContainer = ({
2647
+ interrupts,
2648
+ eventHandler
2649
+ }) => {
2650
+ const { styles } = useStyle4();
2651
+ return interrupts && interrupts.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_antd13.Card, { size: "small", className: `shadow-sm ${styles.card}`, bordered: false, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_antd13.Space, { direction: "vertical", style: { width: "100%" }, children: [
2652
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
2653
+ import_antd13.Tag,
2654
+ {
2655
+ bordered: false,
2656
+ color: "orange",
2657
+ style: {
2658
+ fontSize: 14,
2659
+ fontWeight: "bold",
2660
+ background: "#ffffff8f",
2661
+ padding: 4,
2662
+ borderRadius: 8
2663
+ },
2664
+ children: "\u7B49\u5F85\u53CD\u9988"
2665
+ }
2666
+ ),
2667
+ interrupts.map((interrupt) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
2668
+ MDResponse,
2669
+ {
2670
+ content: interrupt.value,
2671
+ eventHandler
2672
+ },
2673
+ interrupt.id
2674
+ ))
2675
+ ] }) }) : null;
2676
+ };
2677
+
2678
+ // src/components/Chat/Chating.tsx
2679
+ var import_jsx_runtime20 = require("react/jsx-runtime");
2657
2680
  var LazyBubble = ({
2658
2681
  message: message3,
2659
2682
  renderContent,
@@ -2687,16 +2710,16 @@ var LazyBubble = ({
2687
2710
  }, []);
2688
2711
  const getPlaceholder = () => {
2689
2712
  const estimatedHeight = message3.content ? Math.min(100, message3.content.length / 5) : 100;
2690
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { style: { height: `${estimatedHeight}px`, minHeight: "50px" } });
2713
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { style: { height: `${estimatedHeight}px`, minHeight: "50px" } });
2691
2714
  };
2692
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_ErrorBoundary.default, { children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { ref, style: { width: "100%" }, children: isVisible || wasEverVisible ? renderContent(message3) : getPlaceholder() }) });
2715
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_ErrorBoundary.default, { children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { ref, style: { width: "100%" }, children: isVisible || wasEverVisible ? renderContent(message3) : getPlaceholder() }) });
2693
2716
  };
2694
2717
  var MemoizedBubbleList = (0, import_react14.memo)(
2695
2718
  ({
2696
2719
  items,
2697
2720
  roles,
2698
2721
  className
2699
- }) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
2722
+ }) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2700
2723
  import_x2.Bubble.List,
2701
2724
  {
2702
2725
  autoScroll: true,
@@ -2761,7 +2784,7 @@ var Chating = ({
2761
2784
  try {
2762
2785
  const json = JSON.parse(content2);
2763
2786
  if (json.action && json.message) {
2764
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
2787
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2765
2788
  MDResponse,
2766
2789
  {
2767
2790
  content: json.message,
@@ -2777,7 +2800,7 @@ ${JSON.stringify(tool_call)}
2777
2800
  \`\`\``;
2778
2801
  }) || [];
2779
2802
  const content_md = [content2, ...tool_calls_md].join("\n");
2780
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_antd13.Space, { direction: "vertical", style: { width: "100%" }, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
2803
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_antd14.Space, { direction: "vertical", style: { width: "100%" }, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2781
2804
  MDResponse,
2782
2805
  {
2783
2806
  content: content_md,
@@ -2792,7 +2815,7 @@ ${JSON.stringify(tool_call)}
2792
2815
  key: message3.id,
2793
2816
  role: message3.role,
2794
2817
  typing: false,
2795
- content: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
2818
+ content: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2796
2819
  LazyBubble,
2797
2820
  {
2798
2821
  message: message3,
@@ -2842,7 +2865,7 @@ ${JSON.stringify(tool_call)}
2842
2865
  const onSubmit = (nextContent) => {
2843
2866
  if (!nextContent && attachedFiles.length === 0) return;
2844
2867
  if (attachedFiles.filter((f) => f.status !== "done").length > 0) {
2845
- import_antd13.message.warning("\u6587\u4EF6\u8FD8\u5728\u4E0A\u4F20\u4E2D...");
2868
+ import_antd14.message.warning("\u6587\u4EF6\u8FD8\u5728\u4E0A\u4F20\u4E2D...");
2846
2869
  return;
2847
2870
  }
2848
2871
  if (!nextContent && attachedFiles.length > 0) {
@@ -2886,7 +2909,7 @@ ${JSON.stringify(tool_call)}
2886
2909
  setHeaderOpen(true);
2887
2910
  }
2888
2911
  if (info.file?.response?.error || info.file.status === "error") {
2889
- import_antd13.message.error(
2912
+ import_antd14.message.error(
2890
2913
  `${info.file.name} file upload failed.${info.file?.response?.message}`
2891
2914
  );
2892
2915
  }
@@ -2898,22 +2921,22 @@ ${JSON.stringify(tool_call)}
2898
2921
  const beforeUpload = (file) => {
2899
2922
  const isLessThan20MB = file.size / 1024 / 1024 < 20;
2900
2923
  if (!isLessThan20MB) {
2901
- import_antd13.message.error(
2924
+ import_antd14.message.error(
2902
2925
  `File must be smaller than 20MB! ${file.name} is too large.`
2903
2926
  );
2904
2927
  return false;
2905
2928
  }
2906
2929
  return true;
2907
2930
  };
2908
- const attachmentsNode = /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_antd13.Badge, { dot: attachedFiles.length > 0 && !headerOpen, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
2909
- import_antd13.Button,
2931
+ const attachmentsNode = /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_antd14.Badge, { dot: attachedFiles.length > 0 && !headerOpen, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2932
+ import_antd14.Button,
2910
2933
  {
2911
2934
  type: "text",
2912
- icon: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_icons9.PaperClipOutlined, {}),
2935
+ icon: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_icons9.PaperClipOutlined, {}),
2913
2936
  onClick: () => setHeaderOpen(!headerOpen)
2914
2937
  }
2915
2938
  ) });
2916
- const senderHeader = /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
2939
+ const senderHeader = /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2917
2940
  import_x2.Sender.Header,
2918
2941
  {
2919
2942
  title: "Attachments",
@@ -2925,7 +2948,7 @@ ${JSON.stringify(tool_call)}
2925
2948
  }
2926
2949
  },
2927
2950
  forceRender: true,
2928
- children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
2951
+ children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2929
2952
  import_x2.Attachments,
2930
2953
  {
2931
2954
  ref: attachmentsRef,
@@ -2947,7 +2970,7 @@ ${JSON.stringify(tool_call)}
2947
2970
  multiple: true,
2948
2971
  maxCount: 10,
2949
2972
  placeholder: (type) => ({
2950
- icon: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_icons9.CloudUploadOutlined, {}),
2973
+ icon: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_icons9.CloudUploadOutlined, {}),
2951
2974
  title: "\u4E0A\u4F20\u6587\u4EF6",
2952
2975
  description: attachment_placeholder
2953
2976
  })
@@ -2988,7 +3011,7 @@ ${JSON.stringify(tool_call)}
2988
3011
  try {
2989
3012
  } catch (error2) {
2990
3013
  }
2991
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
3014
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2992
3015
  Element,
2993
3016
  {
2994
3017
  component_key: meta.id,
@@ -3004,22 +3027,22 @@ ${JSON.stringify(tool_call)}
3004
3027
  }
3005
3028
  return void 0;
3006
3029
  }, [extraMeta]);
3007
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
3008
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { children: [
3009
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
3030
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
3031
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { children: [
3032
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3010
3033
  import_x2.Welcome,
3011
3034
  {
3012
3035
  style: { padding: 8 },
3013
3036
  variant: "borderless",
3014
3037
  description,
3015
- icon: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_antd13.Avatar, { src: avatar || "/images/avatar.jpeg", size: 48 }),
3038
+ icon: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_antd14.Avatar, { src: avatar || "/images/avatar.jpeg", size: 48 }),
3016
3039
  title: name || "Fina",
3017
- extra: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_antd13.Space, { children: [
3040
+ extra: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_antd14.Space, { children: [
3018
3041
  extra,
3019
- todos && todos.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
3020
- import_antd13.Popover,
3042
+ todos && todos.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3043
+ import_antd14.Popover,
3021
3044
  {
3022
- content: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { style: { width: 400 }, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
3045
+ content: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { style: { width: 400 }, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3023
3046
  Todo,
3024
3047
  {
3025
3048
  data: todos,
@@ -3030,12 +3053,12 @@ ${JSON.stringify(tool_call)}
3030
3053
  title: "Todos",
3031
3054
  trigger: "click",
3032
3055
  placement: "bottomRight",
3033
- children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
3034
- import_antd13.Tooltip,
3056
+ children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3057
+ import_antd14.Tooltip,
3035
3058
  {
3036
3059
  title: `${todos.filter((item) => item.status === "completed").length} / ${todos.length} tasks completed`,
3037
- children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { style: { cursor: "pointer", display: "inline-flex" }, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
3038
- import_antd13.Progress,
3060
+ children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { style: { cursor: "pointer", display: "inline-flex" }, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3061
+ import_antd14.Progress,
3039
3062
  {
3040
3063
  type: "circle",
3041
3064
  strokeColor: {
@@ -3047,7 +3070,7 @@ ${JSON.stringify(tool_call)}
3047
3070
  ),
3048
3071
  status: todos.some((item) => item.status === "in_progress") ? "active" : "normal",
3049
3072
  width: 30,
3050
- format: () => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
3073
+ format: () => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3051
3074
  "div",
3052
3075
  {
3053
3076
  style: {
@@ -3056,7 +3079,7 @@ ${JSON.stringify(tool_call)}
3056
3079
  alignItems: "center",
3057
3080
  lineHeight: 1
3058
3081
  },
3059
- children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("span", { style: { fontSize: 8 }, children: [
3082
+ children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("span", { style: { fontSize: 8 }, children: [
3060
3083
  todos.filter(
3061
3084
  (item) => item.status === "completed"
3062
3085
  ).length,
@@ -3071,17 +3094,17 @@ ${JSON.stringify(tool_call)}
3071
3094
  )
3072
3095
  }
3073
3096
  ),
3074
- files && Object.keys(files).length > 0 && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_antd13.Tooltip, { title: "File Explorer", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
3075
- import_antd13.Badge,
3097
+ files && Object.keys(files).length > 0 && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_antd14.Tooltip, { title: "File Explorer", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3098
+ import_antd14.Badge,
3076
3099
  {
3077
3100
  count: Object.keys(files).length,
3078
3101
  size: "small",
3079
3102
  color: "blue",
3080
- children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
3081
- import_antd13.Button,
3103
+ children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3104
+ import_antd14.Button,
3082
3105
  {
3083
3106
  type: "text",
3084
- icon: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_icons9.FileTextOutlined, {}),
3107
+ icon: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_icons9.FileTextOutlined, {}),
3085
3108
  onClick: () => onOpenSidePanel({
3086
3109
  component_key: "file_explorer",
3087
3110
  message: "File Explorer",
@@ -3091,11 +3114,11 @@ ${JSON.stringify(tool_call)}
3091
3114
  )
3092
3115
  }
3093
3116
  ) }),
3094
- extraMetaComponents && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_antd13.Space, { align: "center", style: { marginRight: 16 }, children: extraMetaComponents })
3117
+ extraMetaComponents && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_antd14.Space, { align: "center", style: { marginRight: 16 }, children: extraMetaComponents })
3095
3118
  ] })
3096
3119
  }
3097
3120
  ),
3098
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
3121
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3099
3122
  "div",
3100
3123
  {
3101
3124
  style: {
@@ -3104,17 +3127,17 @@ ${JSON.stringify(tool_call)}
3104
3127
  }
3105
3128
  )
3106
3129
  ] }),
3107
- items.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
3130
+ items.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3108
3131
  MemoizedBubbleList,
3109
3132
  {
3110
3133
  items,
3111
3134
  roles,
3112
3135
  className: styles.messages
3113
3136
  }
3114
- ) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { style: { flex: 1 } }),
3115
- isLoading ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_x2.Bubble, { loading: isLoading, variant: "borderless" }) }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_x2.Prompts, { items: senderPromptsItems, onItemClick: onPromptsItemClick }),
3116
- error && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { style: { padding: "0 16px 8px" }, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
3117
- import_antd13.Alert,
3137
+ ) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { style: { flex: 1 } }),
3138
+ isLoading ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_x2.Bubble, { loading: isLoading, variant: "borderless" }) }) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_x2.Prompts, { items: senderPromptsItems, onItemClick: onPromptsItemClick }),
3139
+ error && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { style: { padding: "0 16px 8px" }, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3140
+ import_antd14.Alert,
3118
3141
  {
3119
3142
  type: "error",
3120
3143
  banner: true,
@@ -3123,15 +3146,14 @@ ${JSON.stringify(tool_call)}
3123
3146
  message: `${error.message}`
3124
3147
  }
3125
3148
  ) }),
3126
- interrupts && interrupts.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_antd13.Space, { direction: "vertical", style: { width: "100%" }, children: interrupts.map((interrupt) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
3127
- MDResponse,
3149
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3150
+ HITLContainer,
3128
3151
  {
3129
- content: interrupt.value,
3152
+ interrupts,
3130
3153
  eventHandler: handleMDResponseEvent
3131
- },
3132
- interrupt.id
3133
- )) }),
3134
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
3154
+ }
3155
+ ),
3156
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3135
3157
  import_x2.Sender,
3136
3158
  {
3137
3159
  disabled: interrupts && interrupts.length > 0,
@@ -3147,7 +3169,7 @@ ${JSON.stringify(tool_call)}
3147
3169
  className: styles.sender,
3148
3170
  actions: (ori, { components }) => {
3149
3171
  const { SendButton, LoadingButton } = components;
3150
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_antd13.Flex, { justify: "space-between", align: "center", children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(LoadingButton, { type: "default" }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
3172
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_antd14.Flex, { justify: "space-between", align: "center", children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(LoadingButton, { type: "default" }) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3151
3173
  SendButton,
3152
3174
  {
3153
3175
  type: "primary",
@@ -3170,17 +3192,17 @@ ${JSON.stringify(tool_call)}
3170
3192
  // src/components/Chat/ThinkingChain.tsx
3171
3193
  var import_icons10 = require("@ant-design/icons");
3172
3194
  var import_x3 = require("@ant-design/x");
3173
- var import_jsx_runtime20 = require("react/jsx-runtime");
3195
+ var import_jsx_runtime21 = require("react/jsx-runtime");
3174
3196
  function getStatusIcon2(status) {
3175
3197
  switch (status) {
3176
3198
  case "success":
3177
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_icons10.CheckCircleOutlined, {});
3199
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_icons10.CheckCircleOutlined, {});
3178
3200
  case "error":
3179
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_icons10.InfoCircleOutlined, {});
3201
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_icons10.InfoCircleOutlined, {});
3180
3202
  case "pending":
3181
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_icons10.LoadingOutlined, {});
3203
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_icons10.LoadingOutlined, {});
3182
3204
  default:
3183
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_icons10.CheckCircleOutlined, {});
3205
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_icons10.CheckCircleOutlined, {});
3184
3206
  }
3185
3207
  }
3186
3208
  var ThinkingChain = ({ message: message3 }) => {
@@ -3189,12 +3211,12 @@ var ThinkingChain = ({ message: message3 }) => {
3189
3211
  {
3190
3212
  key: message3.id,
3191
3213
  title,
3192
- content: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(MDResponse, { content: message3.content }),
3214
+ content: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(MDResponse, { content: message3.content }),
3193
3215
  status: message3.status,
3194
3216
  icon: getStatusIcon2(message3.status)
3195
3217
  }
3196
3218
  ];
3197
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
3219
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3198
3220
  import_x3.ThoughtChain,
3199
3221
  {
3200
3222
  items,
@@ -3208,19 +3230,19 @@ var ThinkingChainGroup = ({ message: message3 }) => {
3208
3230
  const children = message3.items?.map((item) => ({
3209
3231
  key: item.id,
3210
3232
  title: item.name || item.content.split("\n")[0],
3211
- content: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(MDResponse, { content: item.content }),
3233
+ content: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(MDResponse, { content: item.content }),
3212
3234
  status: item.status,
3213
3235
  icon: getStatusIcon2(item.status)
3214
3236
  }));
3215
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_x3.ThoughtChain, { items: children, collapsible: true, size: "small" });
3237
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_x3.ThoughtChain, { items: children, collapsible: true, size: "small" });
3216
3238
  };
3217
3239
 
3218
3240
  // src/components/Chat/SideAppViewBrowser.tsx
3219
3241
  var import_icons11 = require("@ant-design/icons");
3220
- var import_antd14 = require("antd");
3242
+ var import_antd15 = require("antd");
3221
3243
  var import_antd_style7 = require("antd-style");
3222
3244
  var import_react15 = require("react");
3223
- var import_jsx_runtime21 = require("react/jsx-runtime");
3245
+ var import_jsx_runtime22 = require("react/jsx-runtime");
3224
3246
  var useStyle5 = (0, import_antd_style7.createStyles)(({ token, css }) => {
3225
3247
  return {
3226
3248
  tabContainer: css`
@@ -3240,9 +3262,9 @@ var useStyle5 = (0, import_antd_style7.createStyles)(({ token, css }) => {
3240
3262
  };
3241
3263
  });
3242
3264
  var EmptySideAppView = ({ component_key, data }) => {
3243
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { children: [
3244
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { children: "\u672A\u627E\u5230\u5BF9\u5E94\u7684\u7EC4\u4EF6\u89C6\u56FE" }),
3245
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("pre", { children: JSON.stringify({ component_key, data }, null, 2) })
3265
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { children: [
3266
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { children: "\u672A\u627E\u5230\u5BF9\u5E94\u7684\u7EC4\u4EF6\u89C6\u56FE" }),
3267
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("pre", { children: JSON.stringify({ component_key, data }, null, 2) })
3246
3268
  ] });
3247
3269
  };
3248
3270
  var SideAppViewBrowser = ({
@@ -3300,7 +3322,7 @@ var SideAppViewBrowser = ({
3300
3322
  add(
3301
3323
  key,
3302
3324
  open_uri.message || open_uri.data.message || "\u672A\u547D\u540D",
3303
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3325
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
3304
3326
  SideAppView,
3305
3327
  {
3306
3328
  component_key: open_uri.component_key,
@@ -3348,26 +3370,26 @@ var SideAppViewBrowser = ({
3348
3370
  const getSizeIcon = (size) => {
3349
3371
  switch (size) {
3350
3372
  case "middle":
3351
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_icons11.CompressOutlined, {});
3373
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_icons11.CompressOutlined, {});
3352
3374
  case "large":
3353
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_icons11.ExpandOutlined, {});
3375
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_icons11.ExpandOutlined, {});
3354
3376
  case "full":
3355
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_icons11.FullscreenOutlined, {});
3377
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_icons11.FullscreenOutlined, {});
3356
3378
  default:
3357
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_icons11.ExpandOutlined, {});
3379
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_icons11.ExpandOutlined, {});
3358
3380
  }
3359
3381
  };
3360
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3361
- import_antd14.Tabs,
3382
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
3383
+ import_antd15.Tabs,
3362
3384
  {
3363
3385
  className: styles.tabContainer,
3364
3386
  type: "editable-card",
3365
3387
  style: { height: "100%" },
3366
3388
  hideAdd: true,
3367
3389
  tabBarExtraContent: {
3368
- right: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { style: { display: "flex", gap: "4px" }, children: [
3369
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3370
- import_antd14.Button,
3390
+ right: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { style: { display: "flex", gap: "4px" }, children: [
3391
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
3392
+ import_antd15.Button,
3371
3393
  {
3372
3394
  style: { margin: "8px 0" },
3373
3395
  size: "large",
@@ -3377,13 +3399,13 @@ var SideAppViewBrowser = ({
3377
3399
  title: `\u5F53\u524D\u5C3A\u5BF8: ${getSizeLabel(currentSize)}, \u70B9\u51FB\u5207\u6362`
3378
3400
  }
3379
3401
  ),
3380
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
3381
- import_antd14.Button,
3402
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
3403
+ import_antd15.Button,
3382
3404
  {
3383
3405
  style: { margin: "8px 0" },
3384
3406
  size: "large",
3385
3407
  type: "text",
3386
- icon: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_icons11.CloseOutlined, {}),
3408
+ icon: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_icons11.CloseOutlined, {}),
3387
3409
  onClick: () => {
3388
3410
  onClose();
3389
3411
  }