@zero-library/chat-agent 2.2.18 → 2.2.19

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
@@ -45,7 +45,10 @@ var init_styles_module = __esm({
45
45
  fileEditContent: "styles_module_fileEditContent",
46
46
  quoteList: "styles_module_quoteList",
47
47
  mdEdit: "styles_module_mdEdit",
48
- think: "styles_module_think"
48
+ think: "styles_module_think",
49
+ chart: "styles_module_chart",
50
+ chartSkeleton: "styles_module_chartSkeleton",
51
+ chartSkeletonIcon: "styles_module_chartSkeletonIcon"
49
52
  };
50
53
  }
51
54
  });
@@ -252,6 +255,77 @@ var init_Think = __esm({
252
255
  };
253
256
  }
254
257
  });
258
+
259
+ // src/ui/common/markdownAlert/Charts.tsx
260
+ var Charts_exports = {};
261
+ __export(Charts_exports, {
262
+ default: () => Charts_default
263
+ });
264
+ var chartTypes, CHART_COMPONENTS, Charts_default;
265
+ var init_Charts = __esm({
266
+ "src/ui/common/markdownAlert/Charts.tsx"() {
267
+ init_styles_module();
268
+ chartTypes = [
269
+ "Line",
270
+ "Column",
271
+ "Bar",
272
+ "Area",
273
+ "Pie",
274
+ "DualAxes",
275
+ "Scatter",
276
+ "WordCloud",
277
+ "Funnel",
278
+ "Heatmap",
279
+ "Histogram",
280
+ "Liquid",
281
+ "BidirectionalBar",
282
+ "Box",
283
+ "Bullet",
284
+ "CirclePacking",
285
+ "Gauge",
286
+ "Radar",
287
+ "Rose",
288
+ "Sankey",
289
+ "Stock",
290
+ "Sunburst",
291
+ "Treemap",
292
+ "Venn",
293
+ "Waterfall",
294
+ "MindMap",
295
+ "Fishbone",
296
+ "IndentedTree",
297
+ "Dendrogram",
298
+ "OrganizationChart",
299
+ "FlowGraph",
300
+ "FlowDirectionGraph",
301
+ "NetworkGraph"
302
+ // …如果还有其他图表也继续加
303
+ ];
304
+ CHART_COMPONENTS = Object.fromEntries(
305
+ chartTypes.map((type) => [
306
+ type,
307
+ () => import('@ant-design/charts').then((mod) => ({
308
+ default: mod[type]
309
+ }))
310
+ ])
311
+ );
312
+ Charts_default = ({ data, loading }) => {
313
+ const { type, config } = data;
314
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles_module_default.chart, children: loading ? (
315
+ // Antd 骨架屏
316
+ /* @__PURE__ */ jsxRuntime.jsx(antd.Skeleton.Node, { active: true, className: styles_module_default.chartSkeleton, children: /* @__PURE__ */ jsxRuntime.jsx(icons.DotChartOutlined, { className: styles_module_default.chartSkeletonIcon }) })
317
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
318
+ common.LazyComponent,
319
+ {
320
+ type,
321
+ ...config,
322
+ customComponents: CHART_COMPONENTS,
323
+ unknownContent: /* @__PURE__ */ jsxRuntime.jsx(antd.Alert, { message: "\u4E0D\u652F\u6301\u7684\u56FE\u8868", description: `\u5F53\u524D\u56FE\u8868\u7C7B\u578B "${type}" \u6682\u672A\u5B9E\u73B0\uFF0C\u8BF7\u68C0\u67E5\u56FE\u8868\u7C7B\u578B\u662F\u5426\u6B63\u786E\u3002`, type: "warning", showIcon: true })
324
+ }
325
+ ) });
326
+ };
327
+ }
328
+ });
255
329
  var userInfoManager = common.createSecureManager({
256
330
  key: "NS-USER",
257
331
  aesKey: "((#II))"
@@ -363,7 +437,7 @@ var createChatService = (request) => {
363
437
  };
364
438
  var createFileService = (request) => {
365
439
  const docQuery = (paramsStr) => {
366
- return request.get(`/uc/doc?${paramsStr}`);
440
+ return request.get(`/lolr/doc?${paramsStr}`);
367
441
  };
368
442
  const fileCreate = async (fileContent, fileName, targetFormat = "docx") => {
369
443
  const blob = await request.post(`/uc/doc/convert`, { fileContent, fileName, targetFormat }, { responseType: "blob" });
@@ -545,9 +619,6 @@ function createChatStore() {
545
619
  });
546
620
  receiver.active.type = 3;
547
621
  setReceiverParams();
548
- if (receiver.active.feature?.deepThink) {
549
- setReceiverParams({ thinkMode: "2" });
550
- }
551
622
  config.hooks?.onAfterSwitchAgent?.(data);
552
623
  } catch (error) {
553
624
  console.error(error);
@@ -1085,7 +1156,8 @@ var customComponents = {
1085
1156
  mdEdit: () => Promise.resolve().then(() => (init_MdEdit(), MdEdit_exports)),
1086
1157
  fileEdit: () => Promise.resolve().then(() => (init_FileEdit(), FileEdit_exports)),
1087
1158
  // quoteList: () => import('./QuoteList'),
1088
- think: () => Promise.resolve().then(() => (init_Think(), Think_exports))
1159
+ think: () => Promise.resolve().then(() => (init_Think(), Think_exports)),
1160
+ charts: () => Promise.resolve().then(() => (init_Charts(), Charts_exports))
1089
1161
  };
1090
1162
 
1091
1163
  // src/components/styles.module.less