@kg-ui/kg-ui-plus 0.2.13 → 0.2.15

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.
Files changed (30) hide show
  1. package/dist/es/api/copilot.mjs +0 -8
  2. package/dist/es/kgCopilot/copilotCanvas/docViewer/index.vue.mjs +1 -1
  3. package/dist/es/kgCopilot/copilotCanvas/docViewer/index.vue2.mjs +6 -12
  4. package/dist/es/kgCopilot/copilotCanvas/docViewer/index.vue3.mjs +2 -2
  5. package/dist/es/kgCopilot/copilotCanvas/docViewer/wpsFileViewer/wpsPanel.vue.mjs +1 -1
  6. package/dist/es/kgCopilot/copilotCanvas/docViewer/wpsFileViewer/wpsPanel.vue2.mjs +112 -61
  7. package/dist/es/kgCopilot/copilotCanvas/docViewer/wpsFileViewer/wpsPanel.vue3.mjs +2 -2
  8. package/dist/es/kgCopilot/copilotCanvas/index.vue.mjs +1 -1
  9. package/dist/es/kgCopilot/copilotCanvas/index.vue2.mjs +10 -10
  10. package/dist/es/kgCopilot/copilotCanvas/index.vue3.mjs +2 -2
  11. package/dist/es/kgCopilot/copilotDialog/CopiContent/index.vue.mjs +1 -1
  12. package/dist/es/kgCopilot/copilotDialog/CopiContent/index.vue2.mjs +4 -3
  13. package/dist/es/kgCopilot/copilotDialog/CopiContent/index.vue3.mjs +2 -2
  14. package/dist/es/kgCopilot/copilotDialog/CopiContent/messageParse/codeBox.vue.mjs +4 -4
  15. package/dist/es/kgCopilot/copilotDialog/CopiContent/messageParse/codeBox.vue2.mjs +2 -2
  16. package/dist/es/kgCopilot/copilotDialog/CopiContent/messageParse/index.vue.mjs +1 -1
  17. package/dist/es/kgCopilot/copilotDialog/CopiContent/messageParse/index.vue2.mjs +35 -7
  18. package/dist/es/kgCopilot/copilotDialog/CopiContent/messageParse/index.vue3.mjs +2 -2
  19. package/dist/es/kgCopilot/copilotDialog/CopiContent/messageParse/reportBox2.vue.mjs +108 -0
  20. package/dist/es/kgCopilot/copilotDialog/CopiContent/messageParse/reportBox2.vue2.mjs +4 -0
  21. package/dist/es/node_modules/.pnpm/call-bind-apply-helpers@1.0.1/node_modules/call-bind-apply-helpers/actualApply.mjs +4 -4
  22. package/dist/es/node_modules/.pnpm/call-bind-apply-helpers@1.0.1/node_modules/call-bind-apply-helpers/functionCall.mjs +2 -10
  23. package/dist/es/node_modules/.pnpm/call-bind-apply-helpers@1.0.1/node_modules/call-bind-apply-helpers/index.mjs +4 -4
  24. package/dist/es/node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/implementation.mjs +65 -73
  25. package/dist/es/node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/index.mjs +4 -12
  26. package/dist/es/node_modules/.pnpm/get-intrinsic@1.2.6/node_modules/get-intrinsic/index.mjs +4 -4
  27. package/dist/es/node_modules/.pnpm/hasown@2.0.2/node_modules/hasown/index.mjs +2 -2
  28. package/dist/es/store/modules/copilot.mjs +66 -9
  29. package/dist/es/style.css +2 -2
  30. package/package.json +1 -1
@@ -78,13 +78,6 @@ const updataHistoryRecord = (data) => {
78
78
  timeout: 6e4
79
79
  });
80
80
  };
81
- const getDocxFileByUrl = (url) => {
82
- return http.request("get", url, {
83
- responseType: "blob",
84
- timeout: 60 * 1e3 * 10,
85
- needHeader: true
86
- });
87
- };
88
81
  const updateFileToWps = (data) => {
89
82
  return http.request("post", "/api/uploadFile/save", {
90
83
  data,
@@ -120,7 +113,6 @@ export {
120
113
  createHistoryRecord,
121
114
  deleteHistoryRecord,
122
115
  downloadByWps,
123
- getDocxFileByUrl,
124
116
  getHistoryInfo,
125
117
  getHistoryRecordList,
126
118
  getReport,
@@ -1,7 +1,7 @@
1
1
  import _sfc_main from "./index.vue2.mjs";
2
2
  import "./index.vue3.mjs";
3
3
  import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.mjs";
4
- const WpsIndex = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-044d1ce3"]]);
4
+ const WpsIndex = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-8d189af1"]]);
5
5
  export {
6
6
  WpsIndex as default
7
7
  };
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, ref, watch, resolveComponent, openBlock, createElementBlock, withDirectives, createVNode, vShow, unref, createCommentVNode, createElementVNode, normalizeStyle, createTextVNode, toDisplayString } from "vue";
2
2
  import { storeToRefs } from "pinia";
3
- import { getDocxFileByUrl, updateFileToWps } from "../../../api/copilot.mjs";
3
+ import { updateFileToWps } from "../../../api/copilot.mjs";
4
4
  import WpsPanel from "./wpsFileViewer/wpsPanel.vue.mjs";
5
5
  import { useCopilotStoreHook } from "../../../store/modules/copilot.mjs";
6
6
  import _sfc_main$1 from "../FileSkeletion.vue.mjs";
@@ -21,22 +21,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
21
21
  const result = ref("");
22
22
  const loading = ref(false);
23
23
  watch(
24
- () => previewFileUrl.value,
24
+ () => fileUrl.value,
25
25
  (url) => {
26
26
  if (!url)
27
27
  return;
28
28
  loading.value = true;
29
29
  result.value = "";
30
- getDocxFileByUrl(url).then((res) => {
31
- updateFileToWps({ url: fileUrl.value, name: fileName.value }).then((res2) => {
32
- loading.value = false;
33
- successShowFile.value = true;
34
- setWpsFileId(res2);
35
- }).catch((res2) => {
36
- result.value = res2.response.status === 403 ? "文件已过期" : "获取失败";
37
- successShowFile.value = false;
38
- loading.value = false;
39
- });
30
+ updateFileToWps({ url: fileUrl.value, name: fileName.value }).then((res) => {
31
+ loading.value = false;
32
+ successShowFile.value = true;
33
+ setWpsFileId(res);
40
34
  }).catch((res) => {
41
35
  result.value = res.response.status === 403 ? "文件已过期" : "获取失败";
42
36
  successShowFile.value = false;
@@ -1,4 +1,4 @@
1
- const index_vue_vue_type_style_index_0_scoped_044d1ce3_lang = "";
1
+ const index_vue_vue_type_style_index_0_scoped_8d189af1_lang = "";
2
2
  export {
3
- index_vue_vue_type_style_index_0_scoped_044d1ce3_lang as default
3
+ index_vue_vue_type_style_index_0_scoped_8d189af1_lang as default
4
4
  };
@@ -1,7 +1,7 @@
1
1
  import _sfc_main from "./wpsPanel.vue2.mjs";
2
2
  import "./wpsPanel.vue3.mjs";
3
3
  import _export_sfc from "../../../../_virtual/_plugin-vue_export-helper.mjs";
4
- const WpsPanel = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-60dd4890"]]);
4
+ const WpsPanel = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-f7979893"]]);
5
5
  export {
6
6
  WpsPanel as default
7
7
  };
@@ -1,12 +1,12 @@
1
- import { defineComponent, ref, onMounted, openBlock, createElementBlock, Fragment, createVNode, pushScopeId, popScopeId, createElementVNode } from "vue";
1
+ import { defineComponent, computed, ref, onMounted, watch, openBlock, createElementBlock, Fragment, createVNode, pushScopeId, popScopeId, createElementVNode } from "vue";
2
2
  import { storeToRefs } from "pinia";
3
3
  import k from "./lib/web-office-sdk-solution-v2.0.7.es.mjs";
4
4
  import _sfc_main$1 from "./wpsAi/index.vue.mjs";
5
5
  import { useCopilotStoreHook, wpsAiOpt } from "../../../../store/modules/copilot.mjs";
6
6
  import { downloadByWps } from "../../../../api/copilot.mjs";
7
7
  import { urlDownload } from "../../../../utils/home.mjs";
8
- import { useThrottleFn } from "../../../../node_modules/.pnpm/@vueuse_shared@9.13.0_vue@3.2.45/node_modules/@vueuse/shared/index.mjs";
9
- const _withScopeId = (n) => (pushScopeId("data-v-60dd4890"), n = n(), popScopeId(), n);
8
+ import { useThrottleFn, useDebounceFn } from "../../../../node_modules/.pnpm/@vueuse_shared@9.13.0_vue@3.2.45/node_modules/@vueuse/shared/index.mjs";
9
+ const _withScopeId = (n) => (pushScopeId("data-v-f7979893"), n = n(), popScopeId(), n);
10
10
  const _hoisted_1 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", {
11
11
  id: "office-container",
12
12
  class: ""
@@ -19,7 +19,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
19
19
  setup(__props) {
20
20
  const props = __props;
21
21
  const copilotStore = useCopilotStoreHook();
22
- const { intelligentAnalysisConfig } = storeToRefs(copilotStore);
22
+ const { intelligentAnalysisConfig, canvasMsgIndex, msgList } = storeToRefs(copilotStore);
23
+ const localVarPool = computed(() => {
24
+ const subMsg = msgList.value[canvasMsgIndex.value[0]].msgs[canvasMsgIndex.value[1]];
25
+ return subMsg.varPoor || {};
26
+ });
27
+ const replacedVariables = ref(/* @__PURE__ */ new Set());
23
28
  let app;
24
29
  let jssdk;
25
30
  const appId = ref("AK20250623TIZRAB");
@@ -29,6 +34,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
29
34
  const wpsAiBarPos = ref({ x: 0, y: 0 });
30
35
  const wpsAiInputPos = ref({ x: 0, y: 0, w: 0, h: 0 });
31
36
  onMounted(() => {
37
+ init();
38
+ });
39
+ async function init() {
32
40
  jssdk = k.init({
33
41
  officeType: k.OfficeType.Writer,
34
42
  appId: appId.value,
@@ -153,62 +161,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
153
161
  }
154
162
  ]
155
163
  });
156
- async function handleSelectChange(e) {
157
- const { begin, end } = e;
158
- const range = await app.ActiveDocument.Range(begin, end);
159
- selContextIndex.value = [begin, end];
160
- const text = await range.Text;
161
- selContext.value = text;
162
- let offsetX = 0;
163
- let offsetY = 0;
164
- let rectH = 0;
165
- const officeEl = document.getElementById("office-container");
166
- if (officeEl) {
167
- const rect = officeEl.getBoundingClientRect();
168
- offsetX = rect.left + window.scrollX;
169
- offsetY = rect.top + window.scrollY;
170
- rectH = rect.height;
171
- rect.width;
172
- }
173
- const startPos = await getSelectionPos(app, begin);
174
- const endPos = await getSelectionPos(app, end);
175
- const x = startPos.x;
176
- let y = startPos.y;
177
- if (startPos.y === endPos.y) {
178
- y = endPos.y + 95;
179
- }
180
- wpsAiBarPos.value = { x: x + offsetX, y: y + offsetY };
181
- let wpsAiInputPosY = endPos.y + 70;
182
- const h = 220;
183
- if (endPos.y + h > rectH) {
184
- wpsAiInputPosY = startPos.y - h;
185
- }
186
- const info = await app.ActiveDocument.GetContainerAttributes();
187
- const docWitch = info.OffsetWidth;
188
- const PageSetup = await app.ActiveDocument.Sections.Item(1).PageSetup;
189
- const pageWidth = await PageSetup.PageWidth;
190
- wpsAiInputPos.value = {
191
- x: offsetX + (docWitch - pageWidth) / 2,
192
- y: wpsAiInputPosY,
193
- w: pageWidth,
194
- h
195
- };
196
- }
197
- async function getSelectionPos(app2, index) {
198
- const rangeIdx = await index;
199
- const relativeBodyPos = await app2.ActiveDocument.ActiveWindow.Selection.GetRelativePosByGcp(
200
- rangeIdx
201
- );
202
- await app2.ActiveDocument.ActiveWindow.Selection.GetPosByGcp(rangeIdx);
203
- const pos = relativeBodyPos;
204
- return {
205
- x: pos.x ? pos.x : pos.X,
206
- y: pos.y ? pos.y : pos.Y
207
- };
208
- }
209
- const handleSelectChangeFn = useThrottleFn((e) => {
210
- handleSelectChange(e);
211
- }, 200);
212
164
  jssdk.ready().then(async () => {
213
165
  app = jssdk == null ? void 0 : jssdk.Application;
214
166
  app.Sub.WindowSelectionChange = handleSelectChangeFn;
@@ -222,8 +174,65 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
222
174
  controlButton.Caption = "下载";
223
175
  controlButton.Picture = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDgiIGhlaWdodD0iNDgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8cmVjdCB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHJ4PSI2IiBmaWxsPSIjMDBDMkZGIi8+CiAgPHBhdGggZD0iTTEyIDZWMTRNMTIgMTRMOCAxME0xMiAxNEwxNiAxMCIgc3Ryb2tlPSJ3aGl0ZSIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPC9zdmc+";
224
176
  controlButton.OnAction = () => handleDownload();
177
+ replaceDocumentVariables(Object.keys(localVarPool.value));
225
178
  });
226
- });
179
+ }
180
+ async function getSelectionPos(app2, index) {
181
+ const rangeIdx = await index;
182
+ const relativeBodyPos = await app2.ActiveDocument.ActiveWindow.Selection.GetRelativePosByGcp(
183
+ rangeIdx
184
+ );
185
+ await app2.ActiveDocument.ActiveWindow.Selection.GetPosByGcp(rangeIdx);
186
+ const pos = relativeBodyPos;
187
+ return {
188
+ x: pos.x ? pos.x : pos.X,
189
+ y: pos.y ? pos.y : pos.Y
190
+ };
191
+ }
192
+ const handleSelectChangeFn = useThrottleFn((e) => {
193
+ handleSelectChange(e);
194
+ }, 200);
195
+ async function handleSelectChange(e) {
196
+ const { begin, end } = e;
197
+ const range = await app.ActiveDocument.Range(begin, end);
198
+ selContextIndex.value = [begin, end];
199
+ const text = await range.Text;
200
+ selContext.value = text;
201
+ let offsetX = 0;
202
+ let offsetY = 0;
203
+ let rectH = 0;
204
+ const officeEl = document.getElementById("office-container");
205
+ if (officeEl) {
206
+ const rect = officeEl.getBoundingClientRect();
207
+ offsetX = rect.left + window.scrollX;
208
+ offsetY = rect.top + window.scrollY;
209
+ rectH = rect.height;
210
+ rect.width;
211
+ }
212
+ const startPos = await getSelectionPos(app, begin);
213
+ const endPos = await getSelectionPos(app, end);
214
+ const x = startPos.x;
215
+ let y = startPos.y;
216
+ if (startPos.y === endPos.y) {
217
+ y = endPos.y + 95;
218
+ }
219
+ wpsAiBarPos.value = { x: x + offsetX, y: y + offsetY };
220
+ let wpsAiInputPosY = endPos.y + 70;
221
+ const h = 220;
222
+ if (endPos.y + h > rectH) {
223
+ wpsAiInputPosY = startPos.y - h;
224
+ }
225
+ const info = await app.ActiveDocument.GetContainerAttributes();
226
+ const docWitch = info.OffsetWidth;
227
+ const PageSetup = await app.ActiveDocument.Sections.Item(1).PageSetup;
228
+ const pageWidth = await PageSetup.PageWidth;
229
+ wpsAiInputPos.value = {
230
+ x: offsetX + (docWitch - pageWidth) / 2,
231
+ y: wpsAiInputPosY,
232
+ w: pageWidth,
233
+ h
234
+ };
235
+ }
227
236
  async function insertText(newText) {
228
237
  const range = await app.ActiveDocument.Range.SetRange(
229
238
  selContextIndex.value[1],
@@ -243,6 +252,28 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
243
252
  );
244
253
  range1.Text = newText;
245
254
  }
255
+ const replaceDocumentVariables = async (targetKeys) => {
256
+ if (!app || !localVarPool.value)
257
+ return;
258
+ try {
259
+ const keysToProcess = (targetKeys == null ? void 0 : targetKeys.length) ? targetKeys : Object.keys(localVarPool.value);
260
+ const replacements = [];
261
+ for (const key of keysToProcess) {
262
+ const val = localVarPool.value[key];
263
+ if (val === void 0 || val === null)
264
+ continue;
265
+ const value = String(val);
266
+ replacedVariables.value.add(key);
267
+ replacements.push({ key: `{{${key}}}`, value });
268
+ replacements.push({ key: `{{ ${key} }}`, value });
269
+ }
270
+ if (!replacements.length)
271
+ return;
272
+ const isSuccess = await app.ActiveDocument.ReplaceText(replacements);
273
+ } catch (error) {
274
+ console.error("变量替换失败:", error);
275
+ }
276
+ };
246
277
  const handleAiAction = ({ type, text = "" }) => {
247
278
  switch (type) {
248
279
  case wpsAiOpt.insert:
@@ -257,6 +288,26 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
257
288
  const res = await downloadByWps(props.fileId);
258
289
  urlDownload(res == null ? void 0 : res.url, res == null ? void 0 : res.name);
259
290
  };
291
+ const debouncedReplace = useDebounceFn(
292
+ (newVal) => {
293
+ const changedKeys = Object.keys(newVal).filter((key) => {
294
+ return !replacedVariables.value.has(key);
295
+ });
296
+ if (changedKeys.length) {
297
+ replaceDocumentVariables(changedKeys);
298
+ }
299
+ },
300
+ 500
301
+ // 防抖延迟,避免频繁更新
302
+ );
303
+ watch(() => localVarPool.value, debouncedReplace, { deep: true });
304
+ watch(
305
+ () => props.fileId,
306
+ () => {
307
+ jssdk.destroy();
308
+ init();
309
+ }
310
+ );
260
311
  return (_ctx, _cache) => {
261
312
  return openBlock(), createElementBlock(Fragment, null, [
262
313
  _hoisted_1,
@@ -1,4 +1,4 @@
1
- const wpsPanel_vue_vue_type_style_index_0_scoped_60dd4890_lang = "";
1
+ const wpsPanel_vue_vue_type_style_index_0_scoped_f7979893_lang = "";
2
2
  export {
3
- wpsPanel_vue_vue_type_style_index_0_scoped_60dd4890_lang as default
3
+ wpsPanel_vue_vue_type_style_index_0_scoped_f7979893_lang as default
4
4
  };
@@ -1,7 +1,7 @@
1
1
  import _sfc_main from "./index.vue2.mjs";
2
2
  import "./index.vue3.mjs";
3
3
  import _export_sfc from "../../_virtual/_plugin-vue_export-helper.mjs";
4
- const CopiCanvas = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-cd38651b"]]);
4
+ const CopiCanvas = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-7cea2651"]]);
5
5
  export {
6
6
  CopiCanvas as default
7
7
  };
@@ -11,7 +11,7 @@ import { getWpsShareCode } from "../../api/copilot.mjs";
11
11
  import { execCommand } from "../../utils/index.mjs";
12
12
  import { urlDownload } from "../../utils/home.mjs";
13
13
  import { message } from "../../utils/message.mjs";
14
- const _withScopeId = (n) => (pushScopeId("data-v-cd38651b"), n = n(), popScopeId(), n);
14
+ const _withScopeId = (n) => (pushScopeId("data-v-7cea2651"), n = n(), popScopeId(), n);
15
15
  const _hoisted_1 = { class: "canvas-icon space-x-2 px-3 py-1.5 rounded-md cursor-pointer hover:bg-gray-100 transition-all duration-200" };
16
16
  const _hoisted_2 = { class: "canvas-content" };
17
17
  const _hoisted_3 = {
@@ -41,7 +41,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
41
41
  msgList,
42
42
  canvasVisible,
43
43
  canvasType,
44
- canvasCodeMsgIndex,
44
+ canvasMsgIndex,
45
45
  previewFileUrl,
46
46
  successShowFile,
47
47
  fileId,
@@ -64,30 +64,30 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
64
64
  };
65
65
  const curCode = computed(() => {
66
66
  let str = "";
67
- const msgIndex = canvasCodeMsgIndex.value[0];
68
- const subMsgIndex = canvasCodeMsgIndex.value[1];
67
+ const msgIndex = canvasMsgIndex.value[0];
68
+ const subMsgIndex = canvasMsgIndex.value[1];
69
69
  if (msgIndex !== -1) {
70
70
  str = msgList.value[msgIndex].msgs[subMsgIndex].content;
71
71
  }
72
72
  return str;
73
73
  });
74
74
  const curCodeUnique = computed(() => {
75
- const msgIndex = canvasCodeMsgIndex.value[0];
76
- const subMsgIndex = canvasCodeMsgIndex.value[1];
75
+ const msgIndex = canvasMsgIndex.value[0];
76
+ const subMsgIndex = canvasMsgIndex.value[1];
77
77
  return msgIndex + "" + subMsgIndex;
78
78
  });
79
79
  const needPrint = computed(() => {
80
80
  let isNeed = true;
81
- const msgIndex = canvasCodeMsgIndex.value[0];
82
- const subMsgIndex = canvasCodeMsgIndex.value[1];
81
+ const msgIndex = canvasMsgIndex.value[0];
82
+ const subMsgIndex = canvasMsgIndex.value[1];
83
83
  if (msgIndex !== -1) {
84
84
  isNeed = msgList.value[msgIndex].msgs[subMsgIndex].needPrinting;
85
85
  }
86
86
  return isNeed;
87
87
  });
88
88
  const handleCodePrintOk = () => {
89
- const msgIndex = canvasCodeMsgIndex.value[0];
90
- const subMsgIndex = canvasCodeMsgIndex.value[1];
89
+ const msgIndex = canvasMsgIndex.value[0];
90
+ const subMsgIndex = canvasMsgIndex.value[1];
91
91
  if (msgIndex !== -1) {
92
92
  const obj = msgList.value[msgIndex].msgs[subMsgIndex];
93
93
  obj.needPrinting = false;
@@ -1,4 +1,4 @@
1
- const index_vue_vue_type_style_index_0_scoped_cd38651b_lang = "";
1
+ const index_vue_vue_type_style_index_0_scoped_7cea2651_lang = "";
2
2
  export {
3
- index_vue_vue_type_style_index_0_scoped_cd38651b_lang as default
3
+ index_vue_vue_type_style_index_0_scoped_7cea2651_lang as default
4
4
  };
@@ -1,7 +1,7 @@
1
1
  import _sfc_main from "./index.vue2.mjs";
2
2
  import "./index.vue3.mjs";
3
3
  import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.mjs";
4
- const Dialogue = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-a9f68771"]]);
4
+ const Dialogue = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-3c926ccb"]]);
5
5
  export {
6
6
  Dialogue as default
7
7
  };
@@ -7,7 +7,7 @@ import data$1 from "../../../node_modules/.pnpm/@iconify-icons_ph@1.2.5/node_mod
7
7
  import data from "../../../node_modules/.pnpm/@iconify-icons_ph@1.2.5/node_modules/@iconify-icons/ph/caret-down-fill.mjs";
8
8
  import { useCopilotStoreHook } from "../../../store/modules/copilot.mjs";
9
9
  import { storeToRefs } from "pinia";
10
- const _withScopeId = (n) => (pushScopeId("data-v-a9f68771"), n = n(), popScopeId(), n);
10
+ const _withScopeId = (n) => (pushScopeId("data-v-3c926ccb"), n = n(), popScopeId(), n);
11
11
  const _hoisted_1 = { class: "msg-head" };
12
12
  const _hoisted_2 = { class: "msg-box" };
13
13
  const _hoisted_3 = {
@@ -97,8 +97,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
97
97
  isPrinting: item.needPrinting,
98
98
  "onUpdate:isPrinting": ($event) => item.needPrinting = $event,
99
99
  scrollToBottom,
100
- isSend: item.isSend
101
- }, null, 8, ["msgs", "plusName", "isHistory", "startShrinkIndex", "isShrink", "onUpdate:isShrink", "isPrinting", "onUpdate:isPrinting", "isSend"])
100
+ isSend: item.isSend,
101
+ msgIndex: index
102
+ }, null, 8, ["msgs", "plusName", "isHistory", "startShrinkIndex", "isShrink", "onUpdate:isShrink", "isPrinting", "onUpdate:isPrinting", "isSend", "msgIndex"])
102
103
  ])
103
104
  ], 2)
104
105
  ])
@@ -1,4 +1,4 @@
1
- const index_vue_vue_type_style_index_0_scoped_a9f68771_lang = "";
1
+ const index_vue_vue_type_style_index_0_scoped_3c926ccb_lang = "";
2
2
  export {
3
- index_vue_vue_type_style_index_0_scoped_a9f68771_lang as default
3
+ index_vue_vue_type_style_index_0_scoped_3c926ccb_lang as default
4
4
  };
@@ -27,7 +27,7 @@ const _sfc_main = {
27
27
  type: String,
28
28
  default: ""
29
29
  },
30
- canvasCodeMsgIndex: {
30
+ canvasMsgIndex: {
31
31
  type: Object
32
32
  }
33
33
  },
@@ -39,11 +39,11 @@ const _sfc_main = {
39
39
  const { openCanvasVisible, setCanvasCodeMsgIndex2, getPreviewFileUrl } = CopilotStore;
40
40
  const preview = () => {
41
41
  getPreviewFileUrl(props.file_url, props.file_name);
42
- setCanvasCodeMsgIndex2(props.canvasCodeMsgIndex);
42
+ setCanvasCodeMsgIndex2(props.canvasMsgIndex);
43
43
  openCanvasVisible(DataType.report_code);
44
44
  };
45
45
  onMounted(() => {
46
- setCanvasCodeMsgIndex2(props.canvasCodeMsgIndex);
46
+ setCanvasCodeMsgIndex2(props.canvasMsgIndex);
47
47
  openCanvasVisible(DataType.report_code);
48
48
  emits("update:isPrinting", false);
49
49
  emits("printOk");
@@ -92,7 +92,7 @@ const _sfc_main = {
92
92
  };
93
93
  }
94
94
  };
95
- const CodeCard = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-8ce8b270"]]);
95
+ const CodeCard = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-827dc79c"]]);
96
96
  export {
97
97
  CodeCard as default
98
98
  };
@@ -1,4 +1,4 @@
1
- const codeBox_vue_vue_type_style_index_0_scoped_8ce8b270_lang = "";
1
+ const codeBox_vue_vue_type_style_index_0_scoped_827dc79c_lang = "";
2
2
  export {
3
- codeBox_vue_vue_type_style_index_0_scoped_8ce8b270_lang as default
3
+ codeBox_vue_vue_type_style_index_0_scoped_827dc79c_lang as default
4
4
  };
@@ -1,7 +1,7 @@
1
1
  import _sfc_main from "./index.vue2.mjs";
2
2
  import "./index.vue3.mjs";
3
3
  import _export_sfc from "../../../../_virtual/_plugin-vue_export-helper.mjs";
4
- const MessageParse = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-6b224019"]]);
4
+ const MessageParse = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-25196487"]]);
5
5
  export {
6
6
  MessageParse as default
7
7
  };
@@ -5,6 +5,7 @@ import ReadStreamMd from "./readStreamMd.vue.mjs";
5
5
  import Edit from "./edit.vue.mjs";
6
6
  import FileBox from "./fileBox.vue.mjs";
7
7
  import ReportBox from "./reportBox.vue.mjs";
8
+ import ReportBox2 from "./reportBox2.vue.mjs";
8
9
  import CodeCard from "./codeBox.vue.mjs";
9
10
  import { storeToRefs } from "pinia";
10
11
  import { useVModel } from "../../../../node_modules/.pnpm/@vueuse_core@9.13.0_vue@3.2.45/node_modules/@vueuse/core/index.mjs";
@@ -51,6 +52,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
51
52
  },
52
53
  isSend: {
53
54
  type: Boolean
55
+ },
56
+ msgIndex: {
57
+ type: Number
54
58
  }
55
59
  },
56
60
  emits: ["update:isPrinting", "printOk", "update:msgs", "update:isShrink"],
@@ -180,20 +184,33 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
180
184
  file_status: item.file_status,
181
185
  file_url: item.file_url,
182
186
  file_name: item.file_name,
187
+ msgIndex: __props.msgIndex,
188
+ subMsgInde: index,
183
189
  isPrinting: item.needPrinting,
184
190
  "onUpdate:isPrinting": ($event) => item.needPrinting = $event,
185
191
  onPrintOk: (isEdit) => printOk(isEdit, item.type)
186
- }, null, 8, ["file_status", "file_url", "file_name", "isPrinting", "onUpdate:isPrinting", "onPrintOk"])) : createCommentVNode("", true),
187
- item.type === unref(DataType).report_code ? (openBlock(), createBlock(CodeCard, {
192
+ }, null, 8, ["file_status", "file_url", "file_name", "msgIndex", "subMsgInde", "isPrinting", "onUpdate:isPrinting", "onPrintOk"])) : createCommentVNode("", true),
193
+ item.type === unref(DataType).report2 ? (openBlock(), createBlock(ReportBox2, {
188
194
  key: 5,
189
195
  file_status: item.file_status,
190
196
  file_url: item.file_url,
191
197
  file_name: item.file_name,
192
- canvasCodeMsgIndex: item.canvasCodeMsgIndex,
198
+ msgIndex: __props.msgIndex,
199
+ subMsgInde: index,
200
+ isPrinting: item.needPrinting,
201
+ "onUpdate:isPrinting": ($event) => item.needPrinting = $event,
202
+ onPrintOk: (isEdit) => printOk(isEdit, item.type)
203
+ }, null, 8, ["file_status", "file_url", "file_name", "msgIndex", "subMsgInde", "isPrinting", "onUpdate:isPrinting", "onPrintOk"])) : createCommentVNode("", true),
204
+ item.type === unref(DataType).report_code ? (openBlock(), createBlock(CodeCard, {
205
+ key: 6,
206
+ file_status: item.file_status,
207
+ file_url: item.file_url,
208
+ file_name: item.file_name,
209
+ canvasMsgIndex: item.canvasMsgIndex,
193
210
  isPrinting: item.needPrinting,
194
211
  "onUpdate:isPrinting": ($event) => item.needPrinting = $event,
195
212
  onPrintOk: (isEdit) => printOk(isEdit, item.type)
196
- }, null, 8, ["file_status", "file_url", "file_name", "canvasCodeMsgIndex", "isPrinting", "onUpdate:isPrinting", "onPrintOk"])) : createCommentVNode("", true)
213
+ }, null, 8, ["file_status", "file_url", "file_name", "canvasMsgIndex", "isPrinting", "onUpdate:isPrinting", "onPrintOk"])) : createCommentVNode("", true)
197
214
  ], 64)) : createCommentVNode("", true),
198
215
  props.isPrinting && index === current.value - 1 && !item.needPrinting && current.value <= firstResIndex.value ? (openBlock(), createElementBlock("span", _hoisted_1)) : createCommentVNode("", true)
199
216
  ], 64);
@@ -237,16 +254,27 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
237
254
  "onUpdate:isPrinting": ($event) => item.needPrinting = $event,
238
255
  onPrintOk: printOk
239
256
  }, null, 8, ["file_status", "file_url", "file_name", "isPrinting", "onUpdate:isPrinting"])) : createCommentVNode("", true),
240
- item.type === unref(DataType).report_code ? (openBlock(), createBlock(CodeCard, {
257
+ item.type === unref(DataType).report2 ? (openBlock(), createBlock(ReportBox2, {
241
258
  key: 4,
242
259
  file_status: item.file_status,
243
260
  file_url: item.file_url,
244
261
  file_name: item.file_name,
245
- canvasCodeMsgIndex: item.canvasCodeMsgIndex,
262
+ msgIndex: __props.msgIndex,
263
+ subMsgInde: index,
264
+ isPrinting: item.needPrinting,
265
+ "onUpdate:isPrinting": ($event) => item.needPrinting = $event,
266
+ onPrintOk: (isEdit) => printOk(isEdit, item.type)
267
+ }, null, 8, ["file_status", "file_url", "file_name", "msgIndex", "subMsgInde", "isPrinting", "onUpdate:isPrinting", "onPrintOk"])) : createCommentVNode("", true),
268
+ item.type === unref(DataType).report_code ? (openBlock(), createBlock(CodeCard, {
269
+ key: 5,
270
+ file_status: item.file_status,
271
+ file_url: item.file_url,
272
+ file_name: item.file_name,
273
+ canvasMsgIndex: item.canvasMsgIndex,
246
274
  isPrinting: item.needPrinting,
247
275
  "onUpdate:isPrinting": ($event) => item.needPrinting = $event,
248
276
  onPrintOk: printOk
249
- }, null, 8, ["file_status", "file_url", "file_name", "canvasCodeMsgIndex", "isPrinting", "onUpdate:isPrinting"])) : createCommentVNode("", true)
277
+ }, null, 8, ["file_status", "file_url", "file_name", "canvasMsgIndex", "isPrinting", "onUpdate:isPrinting"])) : createCommentVNode("", true)
250
278
  ], 64)) : createCommentVNode("", true),
251
279
  props.isPrinting && index === current.value - 1 && !item.needPrinting && current.value > firstResIndex.value ? (openBlock(), createElementBlock("span", _hoisted_2)) : createCommentVNode("", true)
252
280
  ], 64);
@@ -1,4 +1,4 @@
1
- const index_vue_vue_type_style_index_0_scoped_6b224019_lang = "";
1
+ const index_vue_vue_type_style_index_0_scoped_25196487_lang = "";
2
2
  export {
3
- index_vue_vue_type_style_index_0_scoped_6b224019_lang as default
3
+ index_vue_vue_type_style_index_0_scoped_25196487_lang as default
4
4
  };