@alifd/chat 0.3.33-beta.1 → 0.3.33-beta.3
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/es/drawer/index.js +2 -2
- package/es/drawer/main.scss +8 -2
- package/es/html-render/index.js +3 -3
- package/es/index.js +1 -1
- package/es/tool-status/index.js +9 -8
- package/es/tool-status/main.scss +23 -10
- package/es/tool-status/types.d.ts +10 -2
- package/lib/drawer/index.js +2 -2
- package/lib/drawer/main.scss +8 -2
- package/lib/html-render/index.js +3 -3
- package/lib/index.js +1 -1
- package/lib/tool-status/index.js +9 -8
- package/lib/tool-status/main.scss +23 -10
- package/lib/tool-status/types.d.ts +10 -2
- package/package.json +1 -1
package/es/drawer/index.js
CHANGED
|
@@ -11,12 +11,12 @@ import { Drawer as NextDrawer, ConfigProvider } from '@alifd/next';
|
|
|
11
11
|
import cs from 'classnames';
|
|
12
12
|
import { PREFIX_DEFAULT, assignSubComponent } from '../utils';
|
|
13
13
|
const Drawer = forwardRef((_a, ref) => {
|
|
14
|
-
var { className, headerStyle, children, footer, footerClassName } = _a, props = __rest(_a, ["className", "headerStyle", "children", "footer", "footerClassName"]);
|
|
14
|
+
var { className, headerStyle, children, footer, footerClassName, placement } = _a, props = __rest(_a, ["className", "headerStyle", "children", "footer", "footerClassName", "placement"]);
|
|
15
15
|
// 对齐小蜜现有的底部
|
|
16
16
|
const defaultHeaderStyle = {
|
|
17
17
|
"border-bottom:": "1px solid var(--40gmM)"
|
|
18
18
|
};
|
|
19
|
-
return (React.createElement(NextDrawer, Object.assign({}, props, { v2: true, ref: ref, headerStyle: Object.assign(Object.assign({}, defaultHeaderStyle), headerStyle), className: cs(`${PREFIX_DEFAULT}drawer`, className) }),
|
|
19
|
+
return (React.createElement(NextDrawer, Object.assign({}, props, { v2: true, ref: ref, placement: placement, headerStyle: Object.assign(Object.assign({}, defaultHeaderStyle), headerStyle), className: cs(`${PREFIX_DEFAULT}drawer ${placement}`, className) }),
|
|
20
20
|
React.createElement("div", { className: 'draw-content' }, children),
|
|
21
21
|
footer && footer.length && React.createElement("div", { className: cs('draw-footer', footerClassName) }, footer)));
|
|
22
22
|
});
|
package/es/drawer/main.scss
CHANGED
|
@@ -2,8 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
.#{$prefix}drawer {
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
&.bottom {
|
|
6
|
+
border-top-left-radius: 16px;
|
|
7
|
+
border-top-right-radius: 16px;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
&.right {
|
|
11
|
+
border-top-right-radius: 8px;
|
|
12
|
+
}
|
|
7
13
|
|
|
8
14
|
.draw-footer {
|
|
9
15
|
width: calc(100% - 40px);
|
package/es/html-render/index.js
CHANGED
|
@@ -103,7 +103,7 @@ const HTMLRenderer = memo(function HTMLRenderer({ className, children, imagePrev
|
|
|
103
103
|
const parserOptions = {
|
|
104
104
|
// @ts-ignore
|
|
105
105
|
replace: domNode => {
|
|
106
|
-
var _a, _b, _c, _d, _e, _f;
|
|
106
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
107
107
|
// 处理文本节点
|
|
108
108
|
if ((domNode.type === 'text' || domNode.nodeType === 3) && typewriterEffect) {
|
|
109
109
|
return processTextNode(domNode);
|
|
@@ -131,7 +131,7 @@ const HTMLRenderer = memo(function HTMLRenderer({ className, children, imagePrev
|
|
|
131
131
|
return (React.createElement(Balloon, { v2: true, align: "b", className: "link-reference-balloon", closable: false, offset: [0, -8], triggerType: ['hover'], trigger: React.createElement("span", { className: "link-reference-index", onClick: handleUrlClick }, (_c = spanElement === null || spanElement === void 0 ? void 0 : spanElement.props) === null || _c === void 0 ? void 0 : _c.children) },
|
|
132
132
|
React.createElement("div", { className: "link-reference-content" },
|
|
133
133
|
React.createElement("img", { className: "link-reference-source-icon", src: ((_d = element.props) === null || _d === void 0 ? void 0 : _d['data-source-icon']) || '' }),
|
|
134
|
-
React.createElement("a", { className: "link-reference-title", onClick: handleUrlClick
|
|
134
|
+
React.createElement("a", { className: "link-reference-title", onClick: handleUrlClick, title: ((_e = element.props) === null || _e === void 0 ? void 0 : _e['data-title']) || '' }, ((_f = element.props) === null || _f === void 0 ? void 0 : _f['data-title']) || ''))));
|
|
135
135
|
}
|
|
136
136
|
if (name === 'a') {
|
|
137
137
|
const element = (domToReact([domNode]));
|
|
@@ -185,7 +185,7 @@ const HTMLRenderer = memo(function HTMLRenderer({ className, children, imagePrev
|
|
|
185
185
|
return renderImage(element.props);
|
|
186
186
|
}
|
|
187
187
|
// 换成统一的图片渲染
|
|
188
|
-
return React.createElement(Img, Object.assign({}, element.props, { imageClassName: (
|
|
188
|
+
return React.createElement(Img, Object.assign({}, element.props, { imageClassName: (_g = element.props) === null || _g === void 0 ? void 0 : _g.className, enablePreview: imagePreview, onImageClick: () => {
|
|
189
189
|
handleImageClick === null || handleImageClick === void 0 ? void 0 : handleImageClick(element.props.src);
|
|
190
190
|
} }));
|
|
191
191
|
}
|
package/es/index.js
CHANGED
|
@@ -32,4 +32,4 @@ export { default as CheckboxGroup } from './checkbox-group';
|
|
|
32
32
|
export { default as Select } from './select';
|
|
33
33
|
export { default as Flip } from './flip';
|
|
34
34
|
export { default as ToolStatus } from './tool-status';
|
|
35
|
-
export const version = '0.3.33-beta.
|
|
35
|
+
export const version = '0.3.33-beta.3';
|
package/es/tool-status/index.js
CHANGED
|
@@ -7,13 +7,14 @@
|
|
|
7
7
|
import React, { forwardRef } from 'react';
|
|
8
8
|
import { ConfigProvider } from '@alifd/next';
|
|
9
9
|
import Icon from '../icon';
|
|
10
|
+
import Button from '../button';
|
|
10
11
|
import cs from 'classnames';
|
|
11
12
|
import { PREFIX_DEFAULT } from '../utils';
|
|
12
13
|
const SUCCESS_ICON = 'success';
|
|
13
14
|
const ERROR_ICON = 'error';
|
|
14
15
|
const LOADING_ICON = 'loading';
|
|
15
16
|
const ToolStatus = forwardRef((props, ref) => {
|
|
16
|
-
const { className, selected = false, status,
|
|
17
|
+
const { useText = '使用', name, className, selected = false, status, onToolClick, authInfo } = props;
|
|
17
18
|
const handleClick = (event) => {
|
|
18
19
|
event.stopPropagation();
|
|
19
20
|
onToolClick === null || onToolClick === void 0 ? void 0 : onToolClick(props);
|
|
@@ -22,15 +23,15 @@ const ToolStatus = forwardRef((props, ref) => {
|
|
|
22
23
|
return (React.createElement("div", { className: cs(`${PREFIX_DEFAULT}tool-status ${statusClassName} ${status}`, className), ref: ref, onClick: (e) => {
|
|
23
24
|
handleClick(e);
|
|
24
25
|
} },
|
|
25
|
-
React.createElement(
|
|
26
|
-
|
|
27
|
-
React.createElement(
|
|
28
|
-
auth && React.createElement("div", { className: 'auth-content' },
|
|
29
|
-
React.createElement("div", { onClick: (event) => {
|
|
26
|
+
React.createElement(Icon, { size: 'small', type: status === 'failed' ? ERROR_ICON : status === 'completed' ? SUCCESS_ICON : LOADING_ICON }),
|
|
27
|
+
authInfo && status === 'auth' && React.createElement("div", { className: 'auth-content' },
|
|
28
|
+
React.createElement(Button, { type: 'primary', text: true, size: 'medium', onClick: (event) => {
|
|
30
29
|
var _a;
|
|
31
30
|
event.stopPropagation();
|
|
32
|
-
(_a =
|
|
33
|
-
} },
|
|
31
|
+
(_a = authInfo === null || authInfo === void 0 ? void 0 : authInfo.onAuthClick) === null || _a === void 0 ? void 0 : _a.call(authInfo, props);
|
|
32
|
+
} }, authInfo === null || authInfo === void 0 ? void 0 : authInfo.content)),
|
|
33
|
+
React.createElement("div", { className: 'content-use-tips' }, useText),
|
|
34
|
+
React.createElement("div", { className: 'content-name' }, name)));
|
|
34
35
|
});
|
|
35
36
|
export * from './types';
|
|
36
37
|
export default ConfigProvider.config(ToolStatus);
|
package/es/tool-status/main.scss
CHANGED
|
@@ -4,39 +4,52 @@
|
|
|
4
4
|
width: fit-content;
|
|
5
5
|
transition: width 0.3s ease-in-out;
|
|
6
6
|
background-color: $color-fill1-1;//$color-brand1-1;
|
|
7
|
-
padding: $s-1;
|
|
8
|
-
border-radius: $s-
|
|
7
|
+
padding: $s-1 $s-3;
|
|
8
|
+
border-radius: $s-4;
|
|
9
9
|
box-sizing: border-box;
|
|
10
10
|
border: solid 1px $color-fill1-1;
|
|
11
11
|
align-items: center;
|
|
12
|
+
display: flex;
|
|
13
|
+
i {
|
|
14
|
+
margin-right: $s-2;
|
|
15
|
+
}
|
|
12
16
|
|
|
13
17
|
&.selected {
|
|
14
18
|
background-color: $color-fill1-2;
|
|
15
19
|
}
|
|
16
20
|
|
|
17
|
-
&.
|
|
21
|
+
&.completed {
|
|
18
22
|
i {
|
|
19
23
|
color: $color-success-3;
|
|
20
24
|
}
|
|
21
25
|
}
|
|
22
26
|
|
|
23
|
-
&.
|
|
27
|
+
&.failed {
|
|
24
28
|
i {
|
|
25
29
|
color: $color-error-3;
|
|
26
30
|
}
|
|
27
31
|
}
|
|
28
32
|
|
|
29
|
-
&.
|
|
33
|
+
&.running, &.auth, &.started {
|
|
30
34
|
i {
|
|
31
35
|
color: $color-brand1-6;
|
|
32
36
|
}
|
|
33
37
|
}
|
|
34
|
-
|
|
35
|
-
.
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
38
|
+
|
|
39
|
+
.auth-content {
|
|
40
|
+
margin-right: $s-1;
|
|
41
|
+
button {
|
|
42
|
+
font-size: $font-size-body-2 !important;
|
|
39
43
|
}
|
|
40
44
|
}
|
|
41
45
|
|
|
46
|
+
.content-use-tips {
|
|
47
|
+
color: $color-text1-2;
|
|
48
|
+
margin-right: $s-1;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.content-name {
|
|
52
|
+
color: $color-text1-4;
|
|
53
|
+
}
|
|
54
|
+
|
|
42
55
|
}
|
|
@@ -16,7 +16,7 @@ export interface ToolStatusProps extends React.HTMLAttributes<HTMLElement>, Comm
|
|
|
16
16
|
/**
|
|
17
17
|
* 工具调用状态
|
|
18
18
|
*/
|
|
19
|
-
status?: '
|
|
19
|
+
status?: 'started' | 'running' | 'completed' | 'failed' | 'auth';
|
|
20
20
|
/**
|
|
21
21
|
* 工具调用结果
|
|
22
22
|
*/
|
|
@@ -28,5 +28,13 @@ export interface ToolStatusProps extends React.HTMLAttributes<HTMLElement>, Comm
|
|
|
28
28
|
/**
|
|
29
29
|
* 额外的授权信息
|
|
30
30
|
*/
|
|
31
|
-
|
|
31
|
+
authInfo?: ToolStatusAuthProps;
|
|
32
|
+
/**
|
|
33
|
+
* 工具名称
|
|
34
|
+
*/
|
|
35
|
+
name?: string;
|
|
36
|
+
/**
|
|
37
|
+
* 工具详情链接
|
|
38
|
+
*/
|
|
39
|
+
useText?: string;
|
|
32
40
|
}
|
package/lib/drawer/index.js
CHANGED
|
@@ -13,12 +13,12 @@ const next_1 = require("@alifd/next");
|
|
|
13
13
|
const classnames_1 = tslib_1.__importDefault(require("classnames"));
|
|
14
14
|
const utils_1 = require("../utils");
|
|
15
15
|
const Drawer = (0, react_1.forwardRef)((_a, ref) => {
|
|
16
|
-
var { className, headerStyle, children, footer, footerClassName } = _a, props = tslib_1.__rest(_a, ["className", "headerStyle", "children", "footer", "footerClassName"]);
|
|
16
|
+
var { className, headerStyle, children, footer, footerClassName, placement } = _a, props = tslib_1.__rest(_a, ["className", "headerStyle", "children", "footer", "footerClassName", "placement"]);
|
|
17
17
|
// 对齐小蜜现有的底部
|
|
18
18
|
const defaultHeaderStyle = {
|
|
19
19
|
"border-bottom:": "1px solid var(--40gmM)"
|
|
20
20
|
};
|
|
21
|
-
return (react_1.default.createElement(next_1.Drawer, Object.assign({}, props, { v2: true, ref: ref, headerStyle: Object.assign(Object.assign({}, defaultHeaderStyle), headerStyle), className: (0, classnames_1.default)(`${utils_1.PREFIX_DEFAULT}drawer`, className) }),
|
|
21
|
+
return (react_1.default.createElement(next_1.Drawer, Object.assign({}, props, { v2: true, ref: ref, placement: placement, headerStyle: Object.assign(Object.assign({}, defaultHeaderStyle), headerStyle), className: (0, classnames_1.default)(`${utils_1.PREFIX_DEFAULT}drawer ${placement}`, className) }),
|
|
22
22
|
react_1.default.createElement("div", { className: 'draw-content' }, children),
|
|
23
23
|
footer && footer.length && react_1.default.createElement("div", { className: (0, classnames_1.default)('draw-footer', footerClassName) }, footer)));
|
|
24
24
|
});
|
package/lib/drawer/main.scss
CHANGED
|
@@ -2,8 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
.#{$prefix}drawer {
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
&.bottom {
|
|
6
|
+
border-top-left-radius: 16px;
|
|
7
|
+
border-top-right-radius: 16px;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
&.right {
|
|
11
|
+
border-top-right-radius: 8px;
|
|
12
|
+
}
|
|
7
13
|
|
|
8
14
|
.draw-footer {
|
|
9
15
|
width: calc(100% - 40px);
|
package/lib/html-render/index.js
CHANGED
|
@@ -106,7 +106,7 @@ const HTMLRenderer = (0, react_1.memo)(function HTMLRenderer({ className, childr
|
|
|
106
106
|
const parserOptions = {
|
|
107
107
|
// @ts-ignore
|
|
108
108
|
replace: domNode => {
|
|
109
|
-
var _a, _b, _c, _d, _e, _f;
|
|
109
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
110
110
|
// 处理文本节点
|
|
111
111
|
if ((domNode.type === 'text' || domNode.nodeType === 3) && typewriterEffect) {
|
|
112
112
|
return processTextNode(domNode);
|
|
@@ -134,7 +134,7 @@ const HTMLRenderer = (0, react_1.memo)(function HTMLRenderer({ className, childr
|
|
|
134
134
|
return (react_1.default.createElement(balloon_1.default, { v2: true, align: "b", className: "link-reference-balloon", closable: false, offset: [0, -8], triggerType: ['hover'], trigger: react_1.default.createElement("span", { className: "link-reference-index", onClick: handleUrlClick }, (_c = spanElement === null || spanElement === void 0 ? void 0 : spanElement.props) === null || _c === void 0 ? void 0 : _c.children) },
|
|
135
135
|
react_1.default.createElement("div", { className: "link-reference-content" },
|
|
136
136
|
react_1.default.createElement("img", { className: "link-reference-source-icon", src: ((_d = element.props) === null || _d === void 0 ? void 0 : _d['data-source-icon']) || '' }),
|
|
137
|
-
react_1.default.createElement("a", { className: "link-reference-title", onClick: handleUrlClick
|
|
137
|
+
react_1.default.createElement("a", { className: "link-reference-title", onClick: handleUrlClick, title: ((_e = element.props) === null || _e === void 0 ? void 0 : _e['data-title']) || '' }, ((_f = element.props) === null || _f === void 0 ? void 0 : _f['data-title']) || ''))));
|
|
138
138
|
}
|
|
139
139
|
if (name === 'a') {
|
|
140
140
|
const element = ((0, html_react_parser_1.domToReact)([domNode]));
|
|
@@ -188,7 +188,7 @@ const HTMLRenderer = (0, react_1.memo)(function HTMLRenderer({ className, childr
|
|
|
188
188
|
return renderImage(element.props);
|
|
189
189
|
}
|
|
190
190
|
// 换成统一的图片渲染
|
|
191
|
-
return react_1.default.createElement(img_1.default, Object.assign({}, element.props, { imageClassName: (
|
|
191
|
+
return react_1.default.createElement(img_1.default, Object.assign({}, element.props, { imageClassName: (_g = element.props) === null || _g === void 0 ? void 0 : _g.className, enablePreview: imagePreview, onImageClick: () => {
|
|
192
192
|
handleImageClick === null || handleImageClick === void 0 ? void 0 : handleImageClick(element.props.src);
|
|
193
193
|
} }));
|
|
194
194
|
}
|
package/lib/index.js
CHANGED
|
@@ -70,4 +70,4 @@ var flip_1 = require("./flip");
|
|
|
70
70
|
Object.defineProperty(exports, "Flip", { enumerable: true, get: function () { return tslib_1.__importDefault(flip_1).default; } });
|
|
71
71
|
var tool_status_1 = require("./tool-status");
|
|
72
72
|
Object.defineProperty(exports, "ToolStatus", { enumerable: true, get: function () { return tslib_1.__importDefault(tool_status_1).default; } });
|
|
73
|
-
exports.version = '0.3.33-beta.
|
|
73
|
+
exports.version = '0.3.33-beta.3';
|
package/lib/tool-status/index.js
CHANGED
|
@@ -10,13 +10,14 @@ const tslib_1 = require("tslib");
|
|
|
10
10
|
const react_1 = tslib_1.__importStar(require("react"));
|
|
11
11
|
const next_1 = require("@alifd/next");
|
|
12
12
|
const icon_1 = tslib_1.__importDefault(require("../icon"));
|
|
13
|
+
const button_1 = tslib_1.__importDefault(require("../button"));
|
|
13
14
|
const classnames_1 = tslib_1.__importDefault(require("classnames"));
|
|
14
15
|
const utils_1 = require("../utils");
|
|
15
16
|
const SUCCESS_ICON = 'success';
|
|
16
17
|
const ERROR_ICON = 'error';
|
|
17
18
|
const LOADING_ICON = 'loading';
|
|
18
19
|
const ToolStatus = (0, react_1.forwardRef)((props, ref) => {
|
|
19
|
-
const { className, selected = false, status,
|
|
20
|
+
const { useText = '使用', name, className, selected = false, status, onToolClick, authInfo } = props;
|
|
20
21
|
const handleClick = (event) => {
|
|
21
22
|
event.stopPropagation();
|
|
22
23
|
onToolClick === null || onToolClick === void 0 ? void 0 : onToolClick(props);
|
|
@@ -25,15 +26,15 @@ const ToolStatus = (0, react_1.forwardRef)((props, ref) => {
|
|
|
25
26
|
return (react_1.default.createElement("div", { className: (0, classnames_1.default)(`${utils_1.PREFIX_DEFAULT}tool-status ${statusClassName} ${status}`, className), ref: ref, onClick: (e) => {
|
|
26
27
|
handleClick(e);
|
|
27
28
|
} },
|
|
28
|
-
react_1.default.createElement(
|
|
29
|
-
|
|
30
|
-
react_1.default.createElement(
|
|
31
|
-
auth && react_1.default.createElement("div", { className: 'auth-content' },
|
|
32
|
-
react_1.default.createElement("div", { onClick: (event) => {
|
|
29
|
+
react_1.default.createElement(icon_1.default, { size: 'small', type: status === 'failed' ? ERROR_ICON : status === 'completed' ? SUCCESS_ICON : LOADING_ICON }),
|
|
30
|
+
authInfo && status === 'auth' && react_1.default.createElement("div", { className: 'auth-content' },
|
|
31
|
+
react_1.default.createElement(button_1.default, { type: 'primary', text: true, size: 'medium', onClick: (event) => {
|
|
33
32
|
var _a;
|
|
34
33
|
event.stopPropagation();
|
|
35
|
-
(_a =
|
|
36
|
-
} },
|
|
34
|
+
(_a = authInfo === null || authInfo === void 0 ? void 0 : authInfo.onAuthClick) === null || _a === void 0 ? void 0 : _a.call(authInfo, props);
|
|
35
|
+
} }, authInfo === null || authInfo === void 0 ? void 0 : authInfo.content)),
|
|
36
|
+
react_1.default.createElement("div", { className: 'content-use-tips' }, useText),
|
|
37
|
+
react_1.default.createElement("div", { className: 'content-name' }, name)));
|
|
37
38
|
});
|
|
38
39
|
tslib_1.__exportStar(require("./types"), exports);
|
|
39
40
|
exports.default = next_1.ConfigProvider.config(ToolStatus);
|
|
@@ -4,39 +4,52 @@
|
|
|
4
4
|
width: fit-content;
|
|
5
5
|
transition: width 0.3s ease-in-out;
|
|
6
6
|
background-color: $color-fill1-1;//$color-brand1-1;
|
|
7
|
-
padding: $s-1;
|
|
8
|
-
border-radius: $s-
|
|
7
|
+
padding: $s-1 $s-3;
|
|
8
|
+
border-radius: $s-4;
|
|
9
9
|
box-sizing: border-box;
|
|
10
10
|
border: solid 1px $color-fill1-1;
|
|
11
11
|
align-items: center;
|
|
12
|
+
display: flex;
|
|
13
|
+
i {
|
|
14
|
+
margin-right: $s-2;
|
|
15
|
+
}
|
|
12
16
|
|
|
13
17
|
&.selected {
|
|
14
18
|
background-color: $color-fill1-2;
|
|
15
19
|
}
|
|
16
20
|
|
|
17
|
-
&.
|
|
21
|
+
&.completed {
|
|
18
22
|
i {
|
|
19
23
|
color: $color-success-3;
|
|
20
24
|
}
|
|
21
25
|
}
|
|
22
26
|
|
|
23
|
-
&.
|
|
27
|
+
&.failed {
|
|
24
28
|
i {
|
|
25
29
|
color: $color-error-3;
|
|
26
30
|
}
|
|
27
31
|
}
|
|
28
32
|
|
|
29
|
-
&.
|
|
33
|
+
&.running, &.auth, &.started {
|
|
30
34
|
i {
|
|
31
35
|
color: $color-brand1-6;
|
|
32
36
|
}
|
|
33
37
|
}
|
|
34
|
-
|
|
35
|
-
.
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
38
|
+
|
|
39
|
+
.auth-content {
|
|
40
|
+
margin-right: $s-1;
|
|
41
|
+
button {
|
|
42
|
+
font-size: $font-size-body-2 !important;
|
|
39
43
|
}
|
|
40
44
|
}
|
|
41
45
|
|
|
46
|
+
.content-use-tips {
|
|
47
|
+
color: $color-text1-2;
|
|
48
|
+
margin-right: $s-1;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.content-name {
|
|
52
|
+
color: $color-text1-4;
|
|
53
|
+
}
|
|
54
|
+
|
|
42
55
|
}
|
|
@@ -16,7 +16,7 @@ export interface ToolStatusProps extends React.HTMLAttributes<HTMLElement>, Comm
|
|
|
16
16
|
/**
|
|
17
17
|
* 工具调用状态
|
|
18
18
|
*/
|
|
19
|
-
status?: '
|
|
19
|
+
status?: 'started' | 'running' | 'completed' | 'failed' | 'auth';
|
|
20
20
|
/**
|
|
21
21
|
* 工具调用结果
|
|
22
22
|
*/
|
|
@@ -28,5 +28,13 @@ export interface ToolStatusProps extends React.HTMLAttributes<HTMLElement>, Comm
|
|
|
28
28
|
/**
|
|
29
29
|
* 额外的授权信息
|
|
30
30
|
*/
|
|
31
|
-
|
|
31
|
+
authInfo?: ToolStatusAuthProps;
|
|
32
|
+
/**
|
|
33
|
+
* 工具名称
|
|
34
|
+
*/
|
|
35
|
+
name?: string;
|
|
36
|
+
/**
|
|
37
|
+
* 工具详情链接
|
|
38
|
+
*/
|
|
39
|
+
useText?: string;
|
|
32
40
|
}
|