@ant-design/agentic-ui 2.31.4 → 2.31.5

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.
@@ -266,7 +266,8 @@ import classNames from "clsx";
266
266
  import React, { useCallback, useContext, useMemo } from "react";
267
267
  import { ActionIconBox } from "../../Components/ActionIconBox";
268
268
  import { I18nContext } from "../../I18n";
269
- import { MarkdownEditor, useRefFunction } from "../../index";
269
+ import { MarkdownEditor } from "../../MarkdownEditor";
270
+ import { useRefFunction } from "../../Hooks/useRefFunction";
270
271
  import { BubbleConfigContext } from "../BubbleConfigProvide";
271
272
  import { BubbleExtra } from "./BubbleExtra";
272
273
  import { DocInfoList } from "./DocInfo";
@@ -176,7 +176,7 @@ import { Star, StarFill, Trash2 } from "@sofa-design/icons";
176
176
  import { ConfigProvider, Popconfirm, Space } from "antd";
177
177
  import React, { useContext, useState } from "react";
178
178
  import { I18nContext } from "../../I18n";
179
- import { ActionIconBox } from "../../index";
179
+ import { ActionIconBox } from "../../Components/ActionIconBox";
180
180
  /**
181
181
  * HistoryActionsBox 组件 - 历史记录操作按钮容器组件
182
182
  *
@@ -237,7 +237,7 @@ function _ts_generator(thisArg, body) {
237
237
  }
238
238
  }
239
239
  import { useEffect, useMemo, useRef, useState } from "react";
240
- import { useRefFunction } from "../../index";
240
+ import { useRefFunction } from "../../Hooks/useRefFunction";
241
241
  /**
242
242
  * 根据关键词从列表中过滤
243
243
  */ function filterListByKeyword(list, keyword) {
@@ -131,7 +131,8 @@ import { ConfigProvider, Popover } from "antd";
131
131
  import classNames from "clsx";
132
132
  import React, { memo, useContext, useMemo, useRef } from "react";
133
133
  import useClickAway from "../Hooks/useClickAway";
134
- import { ActionIconBox, I18nContext } from "../index";
134
+ import { ActionIconBox } from "../Components/ActionIconBox";
135
+ import { I18nContext } from "../I18n";
135
136
  import { HistoryEmpty, HistoryLoadMore, HistoryNewChat, HistorySearch, generateHistoryItems } from "./components";
136
137
  import { useHistory } from "./hooks/useHistory";
137
138
  import GroupMenu from "./menu";
@@ -398,7 +398,6 @@ export declare function useLanguage(): {
398
398
  'browser.totalResults': string;
399
399
  'browser.searching': string;
400
400
  'layout.header.title': string;
401
- theme: string;
402
401
  localPreview: string;
403
402
  expandCollapse: string;
404
403
  moreActions: string;
@@ -360,7 +360,6 @@ export declare const cnLabels: {
360
360
  'browser.totalResults': string;
361
361
  'browser.searching': string;
362
362
  'layout.header.title': string;
363
- theme: string;
364
363
  localPreview: string;
365
364
  expandCollapse: string;
366
365
  moreActions: string;
@@ -382,7 +382,6 @@
382
382
  'browser.totalResults': '共${count}个结果',
383
383
  'browser.searching': '搜索中...',
384
384
  'layout.header.title': 'AI 助手',
385
- theme: '主题',
386
385
  localPreview: '本地预览',
387
386
  expandCollapse: '展开/收起',
388
387
  moreActions: '更多操作',
@@ -844,7 +843,6 @@
844
843
  'browser.totalResults': 'Total ${count} results',
845
844
  'browser.searching': 'Searching...',
846
845
  'layout.header.title': 'AI Assistant',
847
- theme: 'Theme',
848
846
  localPreview: 'Local Preview',
849
847
  expandCollapse: 'Expand/Collapse',
850
848
  moreActions: 'More Actions',
@@ -1,6 +1,4 @@
1
- import { HookAPI } from 'antd/es/modal/useModal';
2
1
  import React from 'react';
3
- import { Subject } from 'rxjs';
4
2
  export declare const nid: (size?: number | undefined) => string;
5
3
  export declare const sizeUnit: (size: number) => string;
6
4
  export declare const copy: <T = any>(data: T) => T;
@@ -8,12 +6,7 @@ export declare const isMod: (e: MouseEvent | KeyboardEvent | React.KeyboardEvent
8
6
  export declare function base64ToArrayBuffer(base64: string): ArrayBufferLike;
9
7
  export declare const getImageData: (filePath?: string) => string;
10
8
  export declare function toArrayBuffer(buffer: any): ArrayBuffer;
11
- export declare const download: (data: Blob | Uint8Array, fileName: string) => void;
12
- type ModalEvent<K extends keyof HookAPI> = {
13
- type: K;
14
- params: Parameters<HookAPI[K]>[0];
15
- };
16
- export declare const modal$: Subject<ModalEvent<"warning" | "info" | "error" | "success" | "confirm">>;
9
+ export { download, modal$ } from './sideEffects';
17
10
  export declare const encodeHtml: (str: string) => string;
18
11
  export { isMarkdown } from './isMarkdown';
19
12
  export declare function debounce(func: {
@@ -1,4 +1,4 @@
1
- /* eslint-disable @typescript-eslint/no-this-alias */ /* eslint-disable @typescript-eslint/ban-types */ /* eslint-disable @typescript-eslint/no-unused-expressions */ /* eslint-disable no-param-reassign */ function _array_like_to_array(arr, len) {
1
+ function _array_like_to_array(arr, len) {
2
2
  if (len == null || len > arr.length) len = arr.length;
3
3
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
4
4
  return arr2;
@@ -22,13 +22,6 @@ function _define_property(obj, key, value) {
22
22
  }
23
23
  return obj;
24
24
  }
25
- function _instanceof(left, right) {
26
- if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
27
- return !!right[Symbol.hasInstance](left);
28
- } else {
29
- return left instanceof right;
30
- }
31
- }
32
25
  function _iterable_to_array(iter) {
33
26
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
34
27
  }
@@ -95,8 +88,7 @@ function _unsupported_iterable_to_array(o, minLen) {
95
88
  if (n === "Map" || n === "Set") return Array.from(n);
96
89
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
97
90
  }
98
- import { customAlphabet } from "nanoid";
99
- import { Subject } from "rxjs";
91
+ /* eslint-disable @typescript-eslint/no-this-alias */ /* eslint-disable @typescript-eslint/ban-types */ /* eslint-disable @typescript-eslint/no-unused-expressions */ /* eslint-disable no-param-reassign */ import { customAlphabet } from "nanoid";
100
92
  export var nid = customAlphabet('1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ', 13);
101
93
  var kb = 1024;
102
94
  var mb = kb * 1024;
@@ -136,25 +128,7 @@ export function toArrayBuffer(buffer) {
136
128
  }
137
129
  return arrayBuffer;
138
130
  }
139
- export var download = function download(data, fileName) {
140
- data = _instanceof(data, Uint8Array) ? new Blob([
141
- data
142
- ]) : data;
143
- var link = document.createElement('a');
144
- if (link.download !== undefined) {
145
- var url = URL.createObjectURL(data);
146
- link.addEventListener('click', function(e) {
147
- return e.stopPropagation();
148
- });
149
- link.setAttribute('href', url);
150
- link.setAttribute('download', fileName);
151
- link.style.visibility = 'hidden';
152
- document.body.appendChild(link);
153
- link.click();
154
- document.body.removeChild(link);
155
- }
156
- };
157
- export var modal$ = new Subject();
131
+ export { download, modal$ } from "./sideEffects";
158
132
  export var encodeHtml = function encodeHtml(str) {
159
133
  var encodeHTMLRules = {
160
134
  '&': '&#38;',
@@ -0,0 +1,9 @@
1
+ import { HookAPI } from 'antd/es/modal/useModal';
2
+ import { Subject } from 'rxjs';
3
+ type ModalEvent<K extends keyof HookAPI> = {
4
+ type: K;
5
+ params: Parameters<HookAPI[K]>[0];
6
+ };
7
+ export declare const modal$: Subject<ModalEvent<"warning" | "info" | "error" | "success" | "confirm">>;
8
+ export declare const download: (data: Blob | Uint8Array, fileName: string) => void;
9
+ export {};
@@ -0,0 +1,27 @@
1
+ function _instanceof(left, right) {
2
+ if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
3
+ return !!right[Symbol.hasInstance](left);
4
+ } else {
5
+ return left instanceof right;
6
+ }
7
+ }
8
+ import { Subject } from "rxjs";
9
+ export var modal$ = new Subject();
10
+ export var download = function download(data, fileName) {
11
+ data = _instanceof(data, Uint8Array) ? new Blob([
12
+ data
13
+ ]) : data;
14
+ var link = document.createElement('a');
15
+ if (link.download !== undefined) {
16
+ var url = URL.createObjectURL(data);
17
+ link.addEventListener('click', function(e) {
18
+ return e.stopPropagation();
19
+ });
20
+ link.setAttribute('href', url);
21
+ link.setAttribute('download', fileName);
22
+ link.style.visibility = 'hidden';
23
+ document.body.appendChild(link);
24
+ link.click();
25
+ document.body.removeChild(link);
26
+ }
27
+ };
@@ -108,8 +108,7 @@ var extractTextContent = function extractTextContent1(children) {
108
108
  element: fakeElement,
109
109
  showBorder: false,
110
110
  hide: false,
111
- onEditorClick: function onEditorClick() {},
112
- theme: theme
111
+ onEditorClick: function onEditorClick() {}
113
112
  }, /*#__PURE__*/ React.createElement("div", {
114
113
  "data-testid": "code-toolbar",
115
114
  contentEditable: false,
@@ -136,7 +135,7 @@ var extractTextContent = function extractTextContent1(children) {
136
135
  alignSelf: 'stretch',
137
136
  boxSizing: 'border-box',
138
137
  userSelect: 'none',
139
- borderBottom: isExpanded ? theme === 'chaos' ? '1px solid #161616' : '1px solid var(--color-gray-border-light)' : 'none'
138
+ borderBottom: isExpanded ? '1px solid var(--color-gray-border-light)' : 'none'
140
139
  }
141
140
  }, /*#__PURE__*/ React.createElement("div", {
142
141
  style: {
@@ -399,7 +399,6 @@ declare class ChartErrorBoundary extends React.Component<ChartErrorBoundaryProps
399
399
  'browser.totalResults': string;
400
400
  'browser.searching': string;
401
401
  'layout.header.title': string;
402
- theme: string;
403
402
  localPreview: string;
404
403
  expandCollapse: string;
405
404
  moreActions: string;
@@ -826,7 +825,6 @@ declare class ChartErrorBoundary extends React.Component<ChartErrorBoundaryProps
826
825
  'browser.totalResults': string;
827
826
  'browser.searching': string;
828
827
  'layout.header.title': string;
829
- theme: string;
830
828
  localPreview: string;
831
829
  expandCollapse: string;
832
830
  moreActions: string;
@@ -11,7 +11,6 @@ interface CodeContainerProps {
11
11
  onEditorClick: () => void;
12
12
  children: ReactNode;
13
13
  readonly?: boolean;
14
- theme: string;
15
14
  }
16
- export declare function CodeContainer({ element, showBorder, hide, onEditorClick, children, theme, }: CodeContainerProps): React.JSX.Element;
15
+ export declare function CodeContainer({ element, showBorder, hide, onEditorClick, children, }: CodeContainerProps): React.JSX.Element;
17
16
  export {};
@@ -4,7 +4,7 @@
4
4
  */ import classNames from "clsx";
5
5
  import React, { useRef } from "react";
6
6
  export function CodeContainer(param) {
7
- var element = param.element, showBorder = param.showBorder, hide = param.hide, onEditorClick = param.onEditorClick, children = param.children, theme = param.theme;
7
+ var element = param.element, showBorder = param.showBorder, hide = param.hide, onEditorClick = param.onEditorClick, children = param.children;
8
8
  var containerRef = useRef(null);
9
9
  // 处理未定义的 element
10
10
  var safeElement = element || {
@@ -36,8 +36,8 @@ export function CodeContainer(param) {
36
36
  marginBottom: hide ? 0 : undefined,
37
37
  boxShadow: 'var(--shadow-control-base, 0 1px 2px rgba(20, 22, 28, 0.06))',
38
38
  borderRadius: 'var(--radius-card-base, 12px)',
39
- backgroundColor: showBorder ? 'rgba(59, 130, 246, 0.1)' : hide ? 'transparent' : theme === 'chaos' ? 'var(--color-gray-text-default, rgba(20, 22, 28, 0.88))' : 'var(--color-gray-bg-page-light, #fafafa)',
40
- color: theme === 'chaos' ? '#FFFFFF' : 'var(--color-gray-text-default, rgba(20, 22, 28, 0.88))',
39
+ backgroundColor: showBorder ? 'rgba(59, 130, 246, 0.1)' : hide ? 'transparent' : 'var(--color-gray-bg-page-light, #fafafa)',
40
+ color: 'var(--color-gray-text-default, rgba(20, 22, 28, 0.88))',
41
41
  height: hide ? 0 : 'auto',
42
42
  opacity: hide ? 0 : 1
43
43
  },
@@ -302,7 +302,6 @@ import { AceEditor, AceEditorContainer, CodeContainer, CodeToolbar, HtmlPreview,
302
302
  algorithm: theme === 'chaos' ? antdTheme.darkAlgorithm : antdTheme.defaultAlgorithm
303
303
  }
304
304
  }, /*#__PURE__*/ React.createElement("div", props.attributes, /*#__PURE__*/ React.createElement(CodeContainer, {
305
- theme: theme,
306
305
  element: props.element,
307
306
  showBorder: state.showBorder,
308
307
  hide: state.hide,
@@ -358,6 +357,7 @@ import { AceEditor, AceEditorContainer, CodeContainer, CodeToolbar, HtmlPreview,
358
357
  viewMode,
359
358
  handleViewModeToggle,
360
359
  disableHtmlPreview,
361
- handleLocalPreview
360
+ handleLocalPreview,
361
+ theme
362
362
  ]);
363
363
  }
@@ -125,7 +125,7 @@ import { LoadImage } from "./LoadImage";
125
125
  alignSelf: 'stretch',
126
126
  boxSizing: 'border-box',
127
127
  userSelect: 'none',
128
- borderBottom: isExpanded ? theme === 'chaos' ? '1px solid #161616' : '1px solid var(--color-gray-border-light)' : 'none'
128
+ borderBottom: isExpanded ? '1px solid var(--color-gray-border-light)' : 'none'
129
129
  }
130
130
  }, /*#__PURE__*/ React.createElement("div", {
131
131
  style: {
@@ -157,7 +157,8 @@ export var TaskList = /*#__PURE__*/ memo(function(param) {
157
157
  text = tpl.replace('${taskName}', taskName);
158
158
  } else if (hasError) {
159
159
  status = 'error';
160
- text = (locale === null || locale === void 0 ? void 0 : locale['taskList.taskAborted']) || '任务已取消';
160
+ var tpl1 = (locale === null || locale === void 0 ? void 0 : locale['taskList.taskInProgress']) || '正在进行任务';
161
+ text = tpl1.replace('${taskName}', '');
161
162
  }
162
163
  return {
163
164
  summaryStatus: status,
@@ -102,7 +102,7 @@ import { Button, Table, Typography } from "antd";
102
102
  import copy from "copy-to-clipboard";
103
103
  import React, { useContext, useMemo } from "react";
104
104
  import { I18nContext } from "../I18n";
105
- import { ActionIconBox } from "../index";
105
+ import { ActionIconBox } from "../Components/ActionIconBox";
106
106
  import { MarkdownEditor, parserSlateNodeToMarkdown } from "../MarkdownEditor";
107
107
  import { CostMillis } from "./CostMillis";
108
108
  /**
@@ -4,7 +4,7 @@ import classNames from "clsx";
4
4
  import { motion } from "framer-motion";
5
5
  import React, { useContext, useMemo } from "react";
6
6
  import { I18nContext } from "../I18n";
7
- import { ActionIconBox } from "../index";
7
+ import { ActionIconBox } from "../Components/ActionIconBox";
8
8
  import { CostMillis } from "./CostMillis";
9
9
  import { FlipText } from "./FlipText";
10
10
  /**
@@ -102,7 +102,7 @@ import { Button, Typography } from "antd";
102
102
  import copy from "copy-to-clipboard";
103
103
  import React, { useContext, useMemo } from "react";
104
104
  import { I18nContext } from "../I18n";
105
- import { ActionIconBox } from "../index";
105
+ import { ActionIconBox } from "../Components/ActionIconBox";
106
106
  import { MarkdownEditor, parserSlateNodeToMarkdown } from "../MarkdownEditor";
107
107
  import { CostMillis } from "./CostMillis";
108
108
  import { DotLoading } from "./DotAni";
package/dist/index.d.ts CHANGED
@@ -100,4 +100,4 @@ export * from './Utils/proxySandbox/SecurityContextManager';
100
100
  * @description 原始 SDK 导出,一般用户无需直接使用
101
101
  * @deprecated @since 2.30.0 建议直接从 @schema-element-editor/host-sdk 导入
102
102
  */
103
- export * from '@schema-element-editor/host-sdk';
103
+ export { createSchemaElementEditorBridge, useSchemaElementEditor, type MethodLevelConfig, type PostMessageSourceConfig, type PostMessageTypeConfig, type ReactSchemaElementEditorConfig, type SchemaElementEditorBridge, type SchemaElementEditorConfig, type SchemaElementEditorRecording, type SchemaValue, } from '@schema-element-editor/host-sdk';
package/dist/index.js CHANGED
@@ -116,4 +116,4 @@ export * from "./Utils/proxySandbox/SecurityContextManager";
116
116
  * Schema Element Editor Chrome 插件底层 SDK
117
117
  * @description 原始 SDK 导出,一般用户无需直接使用
118
118
  * @deprecated @since 2.30.0 建议直接从 @schema-element-editor/host-sdk 导入
119
- */ export * from "@schema-element-editor/host-sdk";
119
+ */ export { createSchemaElementEditorBridge, useSchemaElementEditor } from "@schema-element-editor/host-sdk";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ant-design/agentic-ui",
3
- "version": "2.31.4",
3
+ "version": "2.31.5",
4
4
  "description": "面向智能体的 UI 组件库,提供多步推理可视化、工具调用展示、任务执行协同等 Agentic UI 能力",
5
5
  "repository": "git@github.com:ant-design/agentic-ui.git",
6
6
  "license": "MIT",
@@ -10,7 +10,10 @@
10
10
  "sideEffects": [
11
11
  "**/*.css",
12
12
  "**/*.less",
13
- "**/*.scss"
13
+ "**/*.scss",
14
+ "./dist/MarkdownEditor/editor/utils/sideEffects.js",
15
+ "./dist/Utils/proxySandbox/index.js",
16
+ "./dist/Plugins/chart/components/index.js"
14
17
  ],
15
18
  "exports": {
16
19
  ".": {