qidian-vue-ui 1.0.87 → 1.0.89

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.
@@ -12741,9 +12741,12 @@ const QdConfigProvider = vue.defineComponent({
12741
12741
  ...props.globalConfig
12742
12742
  };
12743
12743
  });
12744
- vue.provide(PROVIDE_USER, props.user);
12745
- vue.provide(PROVIDE_DICT, props.dict);
12746
- vue.provide(PROVIDE_UPLOAD, props.upload);
12744
+ const user = vue.computed(() => props.user);
12745
+ const dict = vue.computed(() => props.dict);
12746
+ const upload = vue.computed(() => props.upload);
12747
+ vue.provide(PROVIDE_USER, user);
12748
+ vue.provide(PROVIDE_DICT, dict);
12749
+ vue.provide(PROVIDE_UPLOAD, upload);
12747
12750
  vue.provide(PROVIDE_GLOBAL_CONFIG, mergedGlobalConfig);
12748
12751
  vue.watch(
12749
12752
  () => [props.user, props.dict, props.agentChat],
@@ -12759,8 +12762,8 @@ const QdConfigProvider = vue.defineComponent({
12759
12762
  vue.watchEffect(async () => {
12760
12763
  const localeMap = {
12761
12764
  "zh-CN": () => Promise.resolve().then(() => zhCN$1),
12762
- "zh-TW": () => Promise.resolve().then(() => require("./zh-TW-Dc4aq6uB.js")),
12763
- "en-US": () => Promise.resolve().then(() => require("./en-US-CF5ETwxv.js"))
12765
+ "zh-TW": () => Promise.resolve().then(() => require("./zh-TW-CpEagq9x.js")),
12766
+ "en-US": () => Promise.resolve().then(() => require("./en-US-DnuIFYoC.js"))
12764
12767
  };
12765
12768
  const loadLocale = localeMap[props.locale] || localeMap["zh-CN"];
12766
12769
  const [err, res] = await to(
@@ -12769,13 +12772,7 @@ const QdConfigProvider = vue.defineComponent({
12769
12772
  if (err) return;
12770
12773
  qdGlobalConfig.value = res.default;
12771
12774
  });
12772
- return () => vue.h(
12773
- tdesignVueNext.ConfigProvider,
12774
- {
12775
- globalConfig: mergedGlobalConfig.value
12776
- },
12777
- slots.default
12778
- );
12775
+ return () => vue.h(tdesignVueNext.ConfigProvider, { globalConfig: mergedGlobalConfig.value }, slots.default);
12779
12776
  }
12780
12777
  });
12781
12778
  const watchHandleMap = /* @__PURE__ */ new Map();
@@ -17840,7 +17837,10 @@ function useAgentChat(options) {
17840
17837
  client_type: "API_KEY",
17841
17838
  ...extParams
17842
17839
  });
17843
- csl.log.dev("send.new", "----------------------------");
17840
+ csl.log.dev(
17841
+ `send.${sId}`,
17842
+ "------------------------------------------------------------------------------------"
17843
+ );
17844
17844
  csl.log.dev(`send.${sId}`, { agentInfo: agInfo, body });
17845
17845
  return new Promise((resolve, reject) => {
17846
17846
  let timeoutId;
@@ -17856,7 +17856,9 @@ function useAgentChat(options) {
17856
17856
  function setTimeoutHandler() {
17857
17857
  if (timeoutId) clearTimeout(timeoutId);
17858
17858
  timeoutId = setTimeout(() => {
17859
- triggerError(new Error(t("agentProcessingTimeoutMessage")));
17859
+ const err = new Error(t("agentProcessingTimeoutMessage"));
17860
+ alertError(err.message);
17861
+ triggerError(err);
17860
17862
  stop();
17861
17863
  }, 20 * 1e3);
17862
17864
  }
@@ -17922,7 +17924,7 @@ function useAgentChat(options) {
17922
17924
  },
17923
17925
  onerror: (err) => {
17924
17926
  const reErr = err ? err : new Error(t("apiUnknownErrorMessage"));
17925
- msgError(reErr.message);
17927
+ alertError(reErr.message);
17926
17928
  triggerError(reErr);
17927
17929
  throw reErr;
17928
17930
  }
@@ -17943,6 +17945,7 @@ function useAgentChat(options) {
17943
17945
  const [err, res] = await suspectedWrapperPromise(getFn());
17944
17946
  if (err) throw err;
17945
17947
  if (!res?.agentId || !res.apiKey) throw new Error(t("failedObtainAgentInfoMessage"));
17948
+ csl.log.dev("getAgentInfo", res);
17946
17949
  return res;
17947
17950
  }
17948
17951
  async function getSessionId({
@@ -17956,6 +17959,7 @@ function useAgentChat(options) {
17956
17959
  const [err, res] = await suspectedWrapperPromise(getFn(agentId2, apiKey2));
17957
17960
  if (err) throw err;
17958
17961
  sessionId.value = res;
17962
+ csl.log.dev("getSessionId", res);
17959
17963
  return res;
17960
17964
  }
17961
17965
  vue.onBeforeUnmount(() => {
@@ -28263,7 +28267,7 @@ class NodeFilterFactory extends BaseFilterFactory {
28263
28267
  }
28264
28268
  class NodeCanvasFactory extends BaseCanvasFactory {
28265
28269
  _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-pVB9NlXo.js", document.baseURI).href);
28270
+ 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-DZxi0PUr.js", document.baseURI).href);
28267
28271
  const canvas = require$1("@napi-rs/canvas");
28268
28272
  return canvas.createCanvas(width, height);
28269
28273
  }
@@ -54901,7 +54905,10 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
54901
54905
  const { timer: uploadTimer, clearTimer: clearUploadTimer } = useTimer("interval");
54902
54906
  const delList = vue.ref([]);
54903
54907
  const popupFileList = vue.computed(() => [...fileList.value]);
54904
- const globalUploadProps = vue.inject(PROVIDE_UPLOAD, void 0);
54908
+ const globalUploadProps = vue.inject(
54909
+ PROVIDE_UPLOAD,
54910
+ vue.computed(() => void 0)
54911
+ );
54905
54912
  const reProps = vue.computed(() => {
54906
54913
  const {
54907
54914
  modelValue: modelValue2,
@@ -55012,8 +55019,9 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
55012
55019
  draggable: onlyView ? false : draggable,
55013
55020
  ...uploadOptions
55014
55021
  };
55015
- if (globalUploadProps) {
55016
- Object.entries(globalUploadProps).forEach(([key, value]) => {
55022
+ const globalUploadPropsV = globalUploadProps.value;
55023
+ if (globalUploadPropsV) {
55024
+ Object.entries(globalUploadPropsV).forEach(([key, value]) => {
55017
55025
  if (isEmpty(value)) return;
55018
55026
  reUploadOptions[key] = value;
55019
55027
  });
@@ -55026,14 +55034,14 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
55026
55034
  handlePopupRemove,
55027
55035
  onlyView,
55028
55036
  listOssByIds: {
55029
- ...globalUploadProps?.listOssByIds,
55037
+ ...globalUploadPropsV?.listOssByIds,
55030
55038
  ...listOssByIds
55031
55039
  },
55032
55040
  listOssByUrls: {
55033
- ...globalUploadProps?.listOssByUrls,
55041
+ ...globalUploadPropsV?.listOssByUrls,
55034
55042
  ...listOssByUrls
55035
55043
  },
55036
- del: { ...globalUploadProps?.del, ...del },
55044
+ del: { ...globalUploadPropsV?.del, ...del },
55037
55045
  uploadOptions: reUploadOptions,
55038
55046
  models: {
55039
55047
  modelValue: modelValue2,
@@ -55284,7 +55292,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
55284
55292
  };
55285
55293
  }
55286
55294
  });
55287
- const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-91a0c8d5"]]);
55295
+ const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-14a99db6"]]);
55288
55296
  exports.PROVIDE_FORM_ADD_BEFORE_SUBMIT_QUEUE = PROVIDE_FORM_ADD_BEFORE_SUBMIT_QUEUE;
55289
55297
  exports.PROVIDE_GRID_ITEM_PROPS_KEY = PROVIDE_GRID_ITEM_PROPS_KEY;
55290
55298
  exports.PROVIDE_GRID_WIDTH_KEY = PROVIDE_GRID_WIDTH_KEY;
@@ -55334,4 +55342,4 @@ exports.useDictDynamic = useDictDynamic;
55334
55342
  exports.useDisabled = useDisabled;
55335
55343
  exports.useModal = useModal;
55336
55344
  exports.useReadonly = useReadonly;
55337
- //# sourceMappingURL=index-pVB9NlXo.js.map
55345
+ //# sourceMappingURL=index-DZxi0PUr.js.map