@agentscope-ai/chat 1.1.45-beta.1766027835357 → 1.1.45-beta.1766038189989
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.
|
@@ -61,10 +61,9 @@ export default memo(function (props: MarkdownProps) {
|
|
|
61
61
|
img: props.disableImage ? DisabledImage : Media,
|
|
62
62
|
citation: CitationComponent,
|
|
63
63
|
'custom-cursor': CursorComponent,
|
|
64
|
-
...components,
|
|
64
|
+
...props.components,
|
|
65
65
|
}), [props.disableImage, CitationComponent, props.components]);
|
|
66
66
|
|
|
67
|
-
|
|
68
67
|
const dompurifyConfig = useMemo(() =>
|
|
69
68
|
allowHtml ? {
|
|
70
69
|
ADD_TAGS: ['custom-cursor', 'citation']
|
|
@@ -161,14 +161,16 @@ export default function (props: IRagProps) {
|
|
|
161
161
|
body={{
|
|
162
162
|
defaultOpen,
|
|
163
163
|
children: <>
|
|
164
|
-
{query && <div className={`${prefixCls}-rag-query`}>
|
|
165
|
-
<span className={`${prefixCls}-rag-query-title`}>{queryTitle}</span>
|
|
166
|
-
{query}
|
|
167
|
-
</div>}
|
|
168
164
|
{
|
|
169
|
-
|
|
165
|
+
query ? <div className={`${prefixCls}-rag-query`}>
|
|
166
|
+
<span className={`${prefixCls}-rag-query-title`}>{queryTitle}</span>
|
|
167
|
+
{query}
|
|
168
|
+
</div> : null
|
|
169
|
+
}
|
|
170
|
+
{
|
|
171
|
+
images?.length ? <div className={`${prefixCls}-rag-query-images`}>
|
|
170
172
|
<Images images={images} />
|
|
171
|
-
</div>
|
|
173
|
+
</div> : null
|
|
172
174
|
}
|
|
173
175
|
{children}
|
|
174
176
|
</>
|
package/lib/Markdown/Markdown.js
CHANGED
|
@@ -67,7 +67,7 @@ export default /*#__PURE__*/memo(function (props) {
|
|
|
67
67
|
img: props.disableImage ? DisabledImage : Media,
|
|
68
68
|
citation: CitationComponent,
|
|
69
69
|
'custom-cursor': CursorComponent
|
|
70
|
-
}, components);
|
|
70
|
+
}, props.components);
|
|
71
71
|
}, [props.disableImage, CitationComponent, props.components]);
|
|
72
72
|
var dompurifyConfig = useMemo(function () {
|
|
73
73
|
return allowHtml ? {
|
|
@@ -127,18 +127,18 @@ export default function (props) {
|
|
|
127
127
|
body: {
|
|
128
128
|
defaultOpen: defaultOpen,
|
|
129
129
|
children: /*#__PURE__*/_jsxs(_Fragment, {
|
|
130
|
-
children: [query
|
|
130
|
+
children: [query ? /*#__PURE__*/_jsxs("div", {
|
|
131
131
|
className: "".concat(prefixCls, "-rag-query"),
|
|
132
132
|
children: [/*#__PURE__*/_jsx("span", {
|
|
133
133
|
className: "".concat(prefixCls, "-rag-query-title"),
|
|
134
134
|
children: queryTitle
|
|
135
135
|
}), query]
|
|
136
|
-
}),
|
|
136
|
+
}) : null, images !== null && images !== void 0 && images.length ? /*#__PURE__*/_jsx("div", {
|
|
137
137
|
className: "".concat(prefixCls, "-rag-query-images"),
|
|
138
138
|
children: /*#__PURE__*/_jsx(Images, {
|
|
139
139
|
images: images
|
|
140
140
|
})
|
|
141
|
-
}), children]
|
|
141
|
+
}) : null, children]
|
|
142
142
|
})
|
|
143
143
|
}
|
|
144
144
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentscope-ai/chat",
|
|
3
|
-
"version": "1.1.45-beta.
|
|
3
|
+
"version": "1.1.45-beta.1766038189989",
|
|
4
4
|
"description": "a free and open-source chat framework for building excellent LLM-powered chat experiences",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"sideEffects": [
|