@zero-library/chat-copilot 3.1.13 → 3.1.14
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.cjs.js +16 -28
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.css +95 -110
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +7 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.esm.js +16 -28
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -74,7 +74,7 @@ var styles_module_default = {
|
|
|
74
74
|
var Attachments_default = React10.forwardRef(({ fileUpload, fileUploadConfig, fileList = [], onChange, extraParams }, ref) => {
|
|
75
75
|
const { message: message3 } = antd.App.useApp();
|
|
76
76
|
const chatStore = useChatStore();
|
|
77
|
-
valtio.useSnapshot(chatStore.
|
|
77
|
+
const configState = valtio.useSnapshot(chatStore.config);
|
|
78
78
|
const fileListRef = React10.useRef([]);
|
|
79
79
|
const [attachedFiles, setAttachedFiles, getAttachedFiles] = common.useRefState([]);
|
|
80
80
|
React10.useEffect(() => {
|
|
@@ -193,8 +193,8 @@ var Attachments_default = React10.forwardRef(({ fileUpload, fileUploadConfig, fi
|
|
|
193
193
|
currentFile.abortController.abort();
|
|
194
194
|
}
|
|
195
195
|
setAttachedFiles(attachedFiles.filter((f) => f.uid !== file.uid));
|
|
196
|
-
|
|
197
|
-
|
|
196
|
+
const filePath = file.path;
|
|
197
|
+
configState.hooks?.onAfterRemoveFile?.(filePath);
|
|
198
198
|
};
|
|
199
199
|
React10.useImperativeHandle(
|
|
200
200
|
ref,
|
|
@@ -4927,7 +4927,7 @@ var TextNode2 = React10__namespace.default.memo(
|
|
|
4927
4927
|
}
|
|
4928
4928
|
const markdownContent = typeof content === "string" ? transformResourceText(content) : content;
|
|
4929
4929
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
4930
|
-
!!item.reasoningContent && /* @__PURE__ */ jsxRuntime.jsx(xV2.Think, { title: "\u6DF1\u5EA6\u601D\u8003", children: item.reasoningContent }),
|
|
4930
|
+
!!item.reasoningContent && /* @__PURE__ */ jsxRuntime.jsx(xV2.Think, { title: "\u6DF1\u5EA6\u601D\u8003", style: { marginBottom: "16px" }, children: item.reasoningContent }),
|
|
4931
4931
|
!!markdownContent && /* @__PURE__ */ jsxRuntime.jsx(XMarkdown_default, { message: message3, components: markdownComponents, content: markdownContent })
|
|
4932
4932
|
] });
|
|
4933
4933
|
}
|
|
@@ -4936,15 +4936,17 @@ var TextNode2 = React10__namespace.default.memo(
|
|
|
4936
4936
|
// src/components/CustomComponents/ToolRenders/index.module.less
|
|
4937
4937
|
var index_module_default2 = {
|
|
4938
4938
|
toolCollapse: "index_module_toolCollapse",
|
|
4939
|
-
|
|
4939
|
+
toolCallItem: "index_module_toolCallItem",
|
|
4940
|
+
toolIcon: "index_module_toolIcon",
|
|
4940
4941
|
toolName: "index_module_toolName",
|
|
4942
|
+
statusIcon: "index_module_statusIcon",
|
|
4943
|
+
duration: "index_module_duration",
|
|
4941
4944
|
toolNamePending: "index_module_toolNamePending",
|
|
4942
4945
|
dot: "index_module_dot",
|
|
4943
4946
|
dotBlink: "index_module_dotBlink",
|
|
4944
|
-
duration: "index_module_duration",
|
|
4945
|
-
statusIcon: "index_module_statusIcon",
|
|
4946
4947
|
expandIcon: "index_module_expandIcon",
|
|
4947
4948
|
expanded: "index_module_expanded",
|
|
4949
|
+
contentScrollContainer: "index_module_contentScrollContainer",
|
|
4948
4950
|
sectionLabel: "index_module_sectionLabel",
|
|
4949
4951
|
plainTextContainer: "index_module_plainTextContainer",
|
|
4950
4952
|
markdownContainer: "index_module_markdownContainer",
|
|
@@ -4967,7 +4969,6 @@ var index_module_default2 = {
|
|
|
4967
4969
|
errorDisplay: "index_module_errorDisplay",
|
|
4968
4970
|
sectionBlock: "index_module_sectionBlock",
|
|
4969
4971
|
compactSectionBlock: "index_module_compactSectionBlock",
|
|
4970
|
-
contentScrollContainer: "index_module_contentScrollContainer",
|
|
4971
4972
|
subAgentContainer: "index_module_subAgentContainer",
|
|
4972
4973
|
subAgentHeader: "index_module_subAgentHeader",
|
|
4973
4974
|
subAgentName: "index_module_subAgentName",
|
|
@@ -5207,13 +5208,13 @@ var ToolCallItem = ({ item }) => {
|
|
|
5207
5208
|
const displayName = item.title || (showLoading ? "" : item.toolName || "Unknown Tool");
|
|
5208
5209
|
const renderIcon = () => {
|
|
5209
5210
|
if (!item.toolIcon) {
|
|
5210
|
-
return /* @__PURE__ */ jsxRuntime.jsx(icons.ToolOutlined, { style: { fontSize: 14
|
|
5211
|
+
return /* @__PURE__ */ jsxRuntime.jsx(icons.ToolOutlined, { style: { fontSize: 14 } });
|
|
5211
5212
|
}
|
|
5212
5213
|
const isUrl = /^(http|\/)/.test(item.toolIcon);
|
|
5213
5214
|
if (isUrl) {
|
|
5214
5215
|
return /* @__PURE__ */ jsxRuntime.jsx("img", { src: item.toolIcon, alt: "tool-icon", style: { width: "100%", height: "100%", objectFit: "contain" } });
|
|
5215
5216
|
}
|
|
5216
|
-
return /* @__PURE__ */ jsxRuntime.jsx("span", {
|
|
5217
|
+
return /* @__PURE__ */ jsxRuntime.jsx("span", { className: index_module_default2.toolIcon, children: item.toolIcon });
|
|
5217
5218
|
};
|
|
5218
5219
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5219
5220
|
antd.Collapse,
|
|
@@ -5224,31 +5225,18 @@ var ToolCallItem = ({ item }) => {
|
|
|
5224
5225
|
defaultActiveKey: isDefaultExpanded && hasContent ? [item.toolCallId || "fallback-key"] : void 0,
|
|
5225
5226
|
expandIconPlacement: "end",
|
|
5226
5227
|
expandIcon: ({ isActive }) => hasContent ? /* @__PURE__ */ jsxRuntime.jsx(icons.RightOutlined, { className: `${index_module_default2.expandIcon} ${isActive ? index_module_default2.expanded : ""}` }) : null,
|
|
5227
|
-
styles: {
|
|
5228
|
-
header: {
|
|
5229
|
-
padding: "4px 8px",
|
|
5230
|
-
overflow: "hidden"
|
|
5231
|
-
},
|
|
5232
|
-
body: {
|
|
5233
|
-
padding: "0 8px 8px"
|
|
5234
|
-
}
|
|
5235
|
-
},
|
|
5236
5228
|
items: [
|
|
5237
5229
|
{
|
|
5238
5230
|
key: item.toolCallId || "fallback-key",
|
|
5239
5231
|
showArrow: hasContent,
|
|
5240
|
-
label: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5241
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
5242
|
-
displayName ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: index_module_default2.toolName
|
|
5232
|
+
label: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: index_module_default2.toolCallItem, children: [
|
|
5233
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { children: renderIcon() }),
|
|
5234
|
+
displayName ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: `${index_module_default2.toolName} text-ellipsis`, children: displayName }) : /* @__PURE__ */ jsxRuntime.jsxs("span", { className: index_module_default2.toolNamePending, children: [
|
|
5243
5235
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: index_module_default2.dot }),
|
|
5244
5236
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: index_module_default2.dot }),
|
|
5245
5237
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: index_module_default2.dot })
|
|
5246
5238
|
] }),
|
|
5247
|
-
showLoading && /* @__PURE__ */ jsxRuntime.jsx("div", { className: index_module_default2.statusIcon, style: { color: token.colorPrimary }, children: /* @__PURE__ */ jsxRuntime.jsx(icons.LoadingOutlined, {}) })
|
|
5248
|
-
item.duration && /* @__PURE__ */ jsxRuntime.jsxs(antd.Typography.Text, { className: index_module_default2.duration, children: [
|
|
5249
|
-
item.duration,
|
|
5250
|
-
"ms"
|
|
5251
|
-
] })
|
|
5239
|
+
showLoading && /* @__PURE__ */ jsxRuntime.jsx("div", { className: index_module_default2.statusIcon, style: { color: token.colorPrimary }, children: /* @__PURE__ */ jsxRuntime.jsx(icons.LoadingOutlined, {}) })
|
|
5252
5240
|
] }),
|
|
5253
5241
|
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: index_module_default2.contentScrollContainer, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5254
5242
|
CustomRender,
|
|
@@ -5335,7 +5323,7 @@ var MessageRender_default = React10__namespace.default.memo(({ role, message: me
|
|
|
5335
5323
|
),
|
|
5336
5324
|
index === lastToolCallIndex && messageIndex >= 0 ? /* @__PURE__ */ jsxRuntime.jsx(A2uiMessageCards, { messageIndex, message: message3 }) : null
|
|
5337
5325
|
] }, `message-${index}`)),
|
|
5338
|
-
showPending && /* @__PURE__ */ jsxRuntime.jsx(xV2.Bubble, { role: role.user, placement: role.placement, content: /* @__PURE__ */ jsxRuntime.jsx(RunStartedNode, {}) }),
|
|
5326
|
+
showPending && role.user === "agent" && /* @__PURE__ */ jsxRuntime.jsx(xV2.Bubble, { role: role.user, placement: role.placement, content: /* @__PURE__ */ jsxRuntime.jsx(RunStartedNode, {}) }),
|
|
5339
5327
|
quoteMsg && /* @__PURE__ */ jsxRuntime.jsx(QuoteMsgNode, { quoteMsg, role })
|
|
5340
5328
|
] });
|
|
5341
5329
|
});
|