qidian-vue-ui 1.0.86 → 1.0.88

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.
@@ -12759,8 +12759,8 @@ const QdConfigProvider = vue.defineComponent({
12759
12759
  vue.watchEffect(async () => {
12760
12760
  const localeMap = {
12761
12761
  "zh-CN": () => Promise.resolve().then(() => zhCN$1),
12762
- "zh-TW": () => Promise.resolve().then(() => require("./zh-TW-xKpOgpLp.js")),
12763
- "en-US": () => Promise.resolve().then(() => require("./en-US-BYFPnSPo.js"))
12762
+ "zh-TW": () => Promise.resolve().then(() => require("./zh-TW-CoMdJzvj.js")),
12763
+ "en-US": () => Promise.resolve().then(() => require("./en-US-BbEMmlGf.js"))
12764
12764
  };
12765
12765
  const loadLocale = localeMap[props.locale] || localeMap["zh-CN"];
12766
12766
  const [err, res] = await to(
@@ -17832,7 +17832,19 @@ function useAgentChat(options) {
17832
17832
  }
17833
17833
  abortController = new AbortController();
17834
17834
  const sendTime = Date.now();
17835
- csl.log.dev(`send.${sId}`, agInfo);
17835
+ const body = JSON.stringify({
17836
+ message: prompt || "",
17837
+ re_chat: reSend ?? false,
17838
+ document_list: files,
17839
+ client_id: agInfo.apiKey,
17840
+ client_type: "API_KEY",
17841
+ ...extParams
17842
+ });
17843
+ csl.log.dev(
17844
+ `send.${sId}`,
17845
+ "------------------------------------------------------------------------------------"
17846
+ );
17847
+ csl.log.dev(`send.${sId}`, { agentInfo: agInfo, body });
17836
17848
  return new Promise((resolve, reject) => {
17837
17849
  let timeoutId;
17838
17850
  let isFirstMessage = true;
@@ -17847,7 +17859,9 @@ function useAgentChat(options) {
17847
17859
  function setTimeoutHandler() {
17848
17860
  if (timeoutId) clearTimeout(timeoutId);
17849
17861
  timeoutId = setTimeout(() => {
17850
- triggerError(new Error(t("agentProcessingTimeoutMessage")));
17862
+ const err = new Error(t("agentProcessingTimeoutMessage"));
17863
+ alertError(err.message);
17864
+ triggerError(err);
17851
17865
  stop();
17852
17866
  }, 20 * 1e3);
17853
17867
  }
@@ -17859,14 +17873,7 @@ function useAgentChat(options) {
17859
17873
  },
17860
17874
  signal: abortController?.signal,
17861
17875
  openWhenHidden: true,
17862
- body: JSON.stringify({
17863
- message: prompt || "",
17864
- re_chat: reSend ?? false,
17865
- document_list: files,
17866
- client_id: agInfo.apiKey,
17867
- client_type: "API_KEY",
17868
- ...extParams
17869
- }),
17876
+ body,
17870
17877
  onopen: async (res) => {
17871
17878
  csl.log.dev(`onOpen.${sId}`, res);
17872
17879
  await onOpen?.(res);
@@ -17920,7 +17927,7 @@ function useAgentChat(options) {
17920
17927
  },
17921
17928
  onerror: (err) => {
17922
17929
  const reErr = err ? err : new Error(t("apiUnknownErrorMessage"));
17923
- msgError(reErr.message);
17930
+ alertError(reErr.message);
17924
17931
  triggerError(reErr);
17925
17932
  throw reErr;
17926
17933
  }
@@ -17940,9 +17947,8 @@ function useAgentChat(options) {
17940
17947
  if (!getFn) throw new Error(t("failedObtainAgentInfoMessage"));
17941
17948
  const [err, res] = await suspectedWrapperPromise(getFn());
17942
17949
  if (err) throw err;
17943
- if (!res?.agentId || !res.apiKey) {
17944
- if (!getFn) throw new Error(t("failedObtainAgentInfoMessage"));
17945
- }
17950
+ if (!res?.agentId || !res.apiKey) throw new Error(t("failedObtainAgentInfoMessage"));
17951
+ csl.log.dev("getAgentInfo", res);
17946
17952
  return res;
17947
17953
  }
17948
17954
  async function getSessionId({
@@ -17956,6 +17962,7 @@ function useAgentChat(options) {
17956
17962
  const [err, res] = await suspectedWrapperPromise(getFn(agentId2, apiKey2));
17957
17963
  if (err) throw err;
17958
17964
  sessionId.value = res;
17965
+ csl.log.dev("getSessionId", res);
17959
17966
  return res;
17960
17967
  }
17961
17968
  vue.onBeforeUnmount(() => {
@@ -18664,7 +18671,7 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
18664
18671
  function buildActionPermi(action) {
18665
18672
  if (action.permi) return action.permi;
18666
18673
  if (!props.permiPrefix || !action.permiID) return [];
18667
- return [`${props.permiPrefix}.${action.permiID}`];
18674
+ return [`${props.permiPrefix}:${action.permiID}`];
18668
18675
  }
18669
18676
  function buildActionForm(action, crudForm) {
18670
18677
  const IsCRU = actionIsCRU(action.crudMode);
@@ -19070,7 +19077,7 @@ const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent({
19070
19077
  };
19071
19078
  }
19072
19079
  });
19073
- const table = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-bdb9c97a"]]);
19080
+ const table = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-e86f79a1"]]);
19074
19081
  const _hoisted_1$2 = {
19075
19082
  key: 0,
19076
19083
  class: "qd-crud-list__header"
@@ -28263,7 +28270,7 @@ class NodeFilterFactory extends BaseFilterFactory {
28263
28270
  }
28264
28271
  class NodeCanvasFactory extends BaseCanvasFactory {
28265
28272
  _createCanvas(width, height) {
28266
- const require$1 = process.getBuiltinModule("module").createRequire(typeof document === "undefined" ? require("url").pathToFileURL(__filename).href : _documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === "SCRIPT" && _documentCurrentScript.src || new URL("index-D-E4wvKQ.js", document.baseURI).href);
28273
+ const require$1 = process.getBuiltinModule("module").createRequire(typeof document === "undefined" ? require("url").pathToFileURL(__filename).href : _documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === "SCRIPT" && _documentCurrentScript.src || new URL("index-YsJcyYUi.js", document.baseURI).href);
28267
28274
  const canvas = require$1("@napi-rs/canvas");
28268
28275
  return canvas.createCanvas(width, height);
28269
28276
  }
@@ -55334,4 +55341,4 @@ exports.useDictDynamic = useDictDynamic;
55334
55341
  exports.useDisabled = useDisabled;
55335
55342
  exports.useModal = useModal;
55336
55343
  exports.useReadonly = useReadonly;
55337
- //# sourceMappingURL=index-D-E4wvKQ.js.map
55344
+ //# sourceMappingURL=index-YsJcyYUi.js.map