@zero-library/chat-copilot 3.1.0 → 3.1.1

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 CHANGED
@@ -2134,6 +2134,18 @@ var IndexQuote_default = ({ data, loading, message: message2 }) => {
2134
2134
  open && /* @__PURE__ */ jsxRuntime.jsx(DocDrawer_default, { paramsStr: citation?.citationUrl, title: citation?.citationName, open, onClose: () => setOpen(false) })
2135
2135
  ] });
2136
2136
  };
2137
+ var MarkImg_default = ({ data, loading, message: message2, ...rest }) => {
2138
+ const getPreviewFileUrl = (src) => {
2139
+ return common.buildUrlParams({ [TOKEN_KEY]: tokenManager.get() || "" }, src);
2140
+ };
2141
+ const previewSrc = React7.useMemo(() => {
2142
+ if (String(rest.src).startsWith("/luya")) {
2143
+ return getPreviewFileUrl(rest.src);
2144
+ }
2145
+ return rest.src;
2146
+ }, [rest.src]);
2147
+ return /* @__PURE__ */ jsxRuntime.jsx(antd.Image, { ...rest, src: previewSrc, placeholder: /* @__PURE__ */ jsxRuntime.jsx(antd.Spin, {}) });
2148
+ };
2137
2149
  var MdEdit_default = ({ data, loading }) => {
2138
2150
  const chatStore = useChatStore();
2139
2151
  const [value, setValue] = React7.useState("");
@@ -2301,6 +2313,7 @@ var XMarkdown_default = ({ message: message2, components = {}, content = "", ...
2301
2313
  indexquote: IndexQuote_default,
2302
2314
  mdedit: MdEdit_default,
2303
2315
  fileedit: FileEdit_default,
2316
+ img: MarkImg_default,
2304
2317
  ...components
2305
2318
  }),
2306
2319
  [components]
@@ -4471,7 +4484,7 @@ var ResourceSelectorModal_default = ({ open, type, onCancel }) => {
4471
4484
  width: 960,
4472
4485
  centered: true,
4473
4486
  destroyOnHidden: true,
4474
- title: /* @__PURE__ */ jsxRuntime.jsx(antd.Flex, { className: style_module_default.titleContainer, children: /* @__PURE__ */ jsxRuntime.jsx(Title2, { level: 5, children: title }) }),
4487
+ title: /* @__PURE__ */ jsxRuntime.jsx("div", { className: style_module_default.titleContainer, children: /* @__PURE__ */ jsxRuntime.jsx(Title2, { level: 5, children: title }) }),
4475
4488
  footer: /* @__PURE__ */ jsxRuntime.jsx("div", { className: style_module_default.footer, children: /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { type: "primary", onClick: handleConfirm, children: "\u786E\u8BA4" }) }),
4476
4489
  children: /* @__PURE__ */ jsxRuntime.jsxs(antd.Layout, { className: style_module_default.layout, children: [
4477
4490
  /* @__PURE__ */ jsxRuntime.jsx(Sider, { width: 220, className: style_module_default.sider, theme: "light", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: style_module_default.siderContent, children: /* @__PURE__ */ jsxRuntime.jsx(antd.Flex, { gap: 4, vertical: true, children: categories.map((cat) => {
@@ -4865,7 +4878,7 @@ var ChatPreviewPanel = React7.memo(({ file }) => {
4865
4878
  }, [file]);
4866
4879
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
4867
4880
  file.fileUrl && /* @__PURE__ */ jsxRuntime.jsxs(antd.Flex, { vertical: true, className: "height-full", children: [
4868
- /* @__PURE__ */ jsxRuntime.jsxs(antd.Flex, { justify: "space-between", className: styles_module_default5.previewHeader, children: [
4881
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles_module_default5.previewHeader, children: [
4869
4882
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: classNames2__default.default(styles_module_default5.previewHeaderTitle, "text-ellipsis"), title: file.fileName, children: file.fileName }),
4870
4883
  /* @__PURE__ */ jsxRuntime.jsxs(antd.Flex, { gap: 8, justify: "center", align: "center", children: [
4871
4884
  /* @__PURE__ */ jsxRuntime.jsx(