@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.esm.js
CHANGED
|
@@ -45,7 +45,7 @@ var styles_module_default = {
|
|
|
45
45
|
var Attachments_default = forwardRef(({ fileUpload, fileUploadConfig, fileList = [], onChange, extraParams }, ref) => {
|
|
46
46
|
const { message: message3 } = App.useApp();
|
|
47
47
|
const chatStore = useChatStore();
|
|
48
|
-
useSnapshot(chatStore.
|
|
48
|
+
const configState = useSnapshot(chatStore.config);
|
|
49
49
|
const fileListRef = useRef([]);
|
|
50
50
|
const [attachedFiles, setAttachedFiles, getAttachedFiles] = useRefState([]);
|
|
51
51
|
useEffect(() => {
|
|
@@ -164,8 +164,8 @@ var Attachments_default = forwardRef(({ fileUpload, fileUploadConfig, fileList =
|
|
|
164
164
|
currentFile.abortController.abort();
|
|
165
165
|
}
|
|
166
166
|
setAttachedFiles(attachedFiles.filter((f) => f.uid !== file.uid));
|
|
167
|
-
|
|
168
|
-
|
|
167
|
+
const filePath = file.path;
|
|
168
|
+
configState.hooks?.onAfterRemoveFile?.(filePath);
|
|
169
169
|
};
|
|
170
170
|
useImperativeHandle(
|
|
171
171
|
ref,
|
|
@@ -4898,7 +4898,7 @@ var TextNode2 = React10__default.memo(
|
|
|
4898
4898
|
}
|
|
4899
4899
|
const markdownContent = typeof content === "string" ? transformResourceText(content) : content;
|
|
4900
4900
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
4901
|
-
!!item.reasoningContent && /* @__PURE__ */ jsx(Think, { title: "\u6DF1\u5EA6\u601D\u8003", children: item.reasoningContent }),
|
|
4901
|
+
!!item.reasoningContent && /* @__PURE__ */ jsx(Think, { title: "\u6DF1\u5EA6\u601D\u8003", style: { marginBottom: "16px" }, children: item.reasoningContent }),
|
|
4902
4902
|
!!markdownContent && /* @__PURE__ */ jsx(XMarkdown_default, { message: message3, components: markdownComponents, content: markdownContent })
|
|
4903
4903
|
] });
|
|
4904
4904
|
}
|
|
@@ -4907,15 +4907,17 @@ var TextNode2 = React10__default.memo(
|
|
|
4907
4907
|
// src/components/CustomComponents/ToolRenders/index.module.less
|
|
4908
4908
|
var index_module_default2 = {
|
|
4909
4909
|
toolCollapse: "index_module_toolCollapse",
|
|
4910
|
-
|
|
4910
|
+
toolCallItem: "index_module_toolCallItem",
|
|
4911
|
+
toolIcon: "index_module_toolIcon",
|
|
4911
4912
|
toolName: "index_module_toolName",
|
|
4913
|
+
statusIcon: "index_module_statusIcon",
|
|
4914
|
+
duration: "index_module_duration",
|
|
4912
4915
|
toolNamePending: "index_module_toolNamePending",
|
|
4913
4916
|
dot: "index_module_dot",
|
|
4914
4917
|
dotBlink: "index_module_dotBlink",
|
|
4915
|
-
duration: "index_module_duration",
|
|
4916
|
-
statusIcon: "index_module_statusIcon",
|
|
4917
4918
|
expandIcon: "index_module_expandIcon",
|
|
4918
4919
|
expanded: "index_module_expanded",
|
|
4920
|
+
contentScrollContainer: "index_module_contentScrollContainer",
|
|
4919
4921
|
sectionLabel: "index_module_sectionLabel",
|
|
4920
4922
|
plainTextContainer: "index_module_plainTextContainer",
|
|
4921
4923
|
markdownContainer: "index_module_markdownContainer",
|
|
@@ -4938,7 +4940,6 @@ var index_module_default2 = {
|
|
|
4938
4940
|
errorDisplay: "index_module_errorDisplay",
|
|
4939
4941
|
sectionBlock: "index_module_sectionBlock",
|
|
4940
4942
|
compactSectionBlock: "index_module_compactSectionBlock",
|
|
4941
|
-
contentScrollContainer: "index_module_contentScrollContainer",
|
|
4942
4943
|
subAgentContainer: "index_module_subAgentContainer",
|
|
4943
4944
|
subAgentHeader: "index_module_subAgentHeader",
|
|
4944
4945
|
subAgentName: "index_module_subAgentName",
|
|
@@ -5178,13 +5179,13 @@ var ToolCallItem = ({ item }) => {
|
|
|
5178
5179
|
const displayName = item.title || (showLoading ? "" : item.toolName || "Unknown Tool");
|
|
5179
5180
|
const renderIcon = () => {
|
|
5180
5181
|
if (!item.toolIcon) {
|
|
5181
|
-
return /* @__PURE__ */ jsx(ToolOutlined, { style: { fontSize: 14
|
|
5182
|
+
return /* @__PURE__ */ jsx(ToolOutlined, { style: { fontSize: 14 } });
|
|
5182
5183
|
}
|
|
5183
5184
|
const isUrl = /^(http|\/)/.test(item.toolIcon);
|
|
5184
5185
|
if (isUrl) {
|
|
5185
5186
|
return /* @__PURE__ */ jsx("img", { src: item.toolIcon, alt: "tool-icon", style: { width: "100%", height: "100%", objectFit: "contain" } });
|
|
5186
5187
|
}
|
|
5187
|
-
return /* @__PURE__ */ jsx("span", {
|
|
5188
|
+
return /* @__PURE__ */ jsx("span", { className: index_module_default2.toolIcon, children: item.toolIcon });
|
|
5188
5189
|
};
|
|
5189
5190
|
return /* @__PURE__ */ jsx(
|
|
5190
5191
|
Collapse,
|
|
@@ -5195,31 +5196,18 @@ var ToolCallItem = ({ item }) => {
|
|
|
5195
5196
|
defaultActiveKey: isDefaultExpanded && hasContent ? [item.toolCallId || "fallback-key"] : void 0,
|
|
5196
5197
|
expandIconPlacement: "end",
|
|
5197
5198
|
expandIcon: ({ isActive }) => hasContent ? /* @__PURE__ */ jsx(RightOutlined, { className: `${index_module_default2.expandIcon} ${isActive ? index_module_default2.expanded : ""}` }) : null,
|
|
5198
|
-
styles: {
|
|
5199
|
-
header: {
|
|
5200
|
-
padding: "4px 8px",
|
|
5201
|
-
overflow: "hidden"
|
|
5202
|
-
},
|
|
5203
|
-
body: {
|
|
5204
|
-
padding: "0 8px 8px"
|
|
5205
|
-
}
|
|
5206
|
-
},
|
|
5207
5199
|
items: [
|
|
5208
5200
|
{
|
|
5209
5201
|
key: item.toolCallId || "fallback-key",
|
|
5210
5202
|
showArrow: hasContent,
|
|
5211
|
-
label: /* @__PURE__ */ jsxs(
|
|
5212
|
-
/* @__PURE__ */ jsx("div", {
|
|
5213
|
-
displayName ? /* @__PURE__ */ jsx("span", { className: index_module_default2.toolName
|
|
5203
|
+
label: /* @__PURE__ */ jsxs("div", { className: index_module_default2.toolCallItem, children: [
|
|
5204
|
+
/* @__PURE__ */ jsx("div", { children: renderIcon() }),
|
|
5205
|
+
displayName ? /* @__PURE__ */ jsx("span", { className: `${index_module_default2.toolName} text-ellipsis`, children: displayName }) : /* @__PURE__ */ jsxs("span", { className: index_module_default2.toolNamePending, children: [
|
|
5214
5206
|
/* @__PURE__ */ jsx("span", { className: index_module_default2.dot }),
|
|
5215
5207
|
/* @__PURE__ */ jsx("span", { className: index_module_default2.dot }),
|
|
5216
5208
|
/* @__PURE__ */ jsx("span", { className: index_module_default2.dot })
|
|
5217
5209
|
] }),
|
|
5218
|
-
showLoading && /* @__PURE__ */ jsx("div", { className: index_module_default2.statusIcon, style: { color: token.colorPrimary }, children: /* @__PURE__ */ jsx(LoadingOutlined, {}) })
|
|
5219
|
-
item.duration && /* @__PURE__ */ jsxs(Typography.Text, { className: index_module_default2.duration, children: [
|
|
5220
|
-
item.duration,
|
|
5221
|
-
"ms"
|
|
5222
|
-
] })
|
|
5210
|
+
showLoading && /* @__PURE__ */ jsx("div", { className: index_module_default2.statusIcon, style: { color: token.colorPrimary }, children: /* @__PURE__ */ jsx(LoadingOutlined, {}) })
|
|
5223
5211
|
] }),
|
|
5224
5212
|
children: /* @__PURE__ */ jsx("div", { className: index_module_default2.contentScrollContainer, children: /* @__PURE__ */ jsx(
|
|
5225
5213
|
CustomRender,
|
|
@@ -5306,7 +5294,7 @@ var MessageRender_default = React10__default.memo(({ role, message: message3, me
|
|
|
5306
5294
|
),
|
|
5307
5295
|
index === lastToolCallIndex && messageIndex >= 0 ? /* @__PURE__ */ jsx(A2uiMessageCards, { messageIndex, message: message3 }) : null
|
|
5308
5296
|
] }, `message-${index}`)),
|
|
5309
|
-
showPending && /* @__PURE__ */ jsx(Bubble, { role: role.user, placement: role.placement, content: /* @__PURE__ */ jsx(RunStartedNode, {}) }),
|
|
5297
|
+
showPending && role.user === "agent" && /* @__PURE__ */ jsx(Bubble, { role: role.user, placement: role.placement, content: /* @__PURE__ */ jsx(RunStartedNode, {}) }),
|
|
5310
5298
|
quoteMsg && /* @__PURE__ */ jsx(QuoteMsgNode, { quoteMsg, role })
|
|
5311
5299
|
] });
|
|
5312
5300
|
});
|