@kg-ui/kg-ui-plus 0.0.20 → 0.0.22

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 (32) hide show
  1. package/dist/es/KgCopilot/CopiFooter/SearchInput/SelectPluginByKey.vue.mjs +1 -1
  2. package/dist/es/KgCopilot/CopiFooter/SearchInput/SelectPluginByKey.vue3.mjs +2 -2
  3. package/dist/es/KgCopilot/CopiFooter/SearchInput/index.vue.mjs +1 -1
  4. package/dist/es/KgCopilot/CopiFooter/SearchInput/index.vue2.mjs +6 -6
  5. package/dist/es/KgCopilot/CopiFooter/SearchInput/index.vue3.mjs +2 -2
  6. package/dist/es/KgCopilot/dialogue/index.vue.mjs +1 -1
  7. package/dist/es/KgCopilot/dialogue/index.vue2.mjs +60 -57
  8. package/dist/es/KgCopilot/dialogue/index.vue3.mjs +2 -2
  9. package/dist/es/KgCopilot/dialogue/messageParse/edit.vue.mjs +1 -1
  10. package/dist/es/KgCopilot/dialogue/messageParse/edit.vue2.mjs +1 -1
  11. package/dist/es/KgCopilot/dialogue/messageParse/edit.vue3.mjs +2 -2
  12. package/dist/es/KgCopilot/dialogue/messageParse/fileBox.vue.mjs +88 -0
  13. package/dist/es/KgCopilot/dialogue/messageParse/fileBox.vue2.mjs +4 -0
  14. package/dist/es/KgCopilot/dialogue/messageParse/fileIcon.vue.mjs +79 -0
  15. package/dist/es/KgCopilot/dialogue/messageParse/fileIcon.vue2.mjs +4 -0
  16. package/dist/es/KgCopilot/dialogue/messageParse/index.vue.mjs +1 -1
  17. package/dist/es/KgCopilot/dialogue/messageParse/index.vue2.mjs +10 -2
  18. package/dist/es/KgCopilot/dialogue/messageParse/index.vue3.mjs +2 -2
  19. package/dist/es/KgCopilot/dialogue/messageParse/readMd.vue.mjs +1 -1
  20. package/dist/es/KgCopilot/dialogue/messageParse/readMd.vue2.mjs +3 -3
  21. package/dist/es/KgCopilot/dialogue/messageParse/readMd.vue3.mjs +2 -2
  22. package/dist/es/KgCopilot/index.vue.mjs +1 -1
  23. package/dist/es/KgCopilot/index.vue2.mjs +20 -16
  24. package/dist/es/KgCopilot/index.vue3.mjs +2 -2
  25. package/dist/es/api/copilot.mjs +16 -29
  26. package/dist/es/node_modules/.pnpm/{dompurify@3.0.10 → dompurify@3.1.0}/node_modules/dompurify/dist/purify.es.mjs +15 -5
  27. package/dist/es/node_modules/.pnpm/{marked@12.0.1 → marked@12.0.2}/node_modules/marked/lib/marked.esm.mjs +2 -1
  28. package/dist/es/store/modules/copilot.mjs +148 -68
  29. package/dist/es/style.css +1 -1
  30. package/dist/es/utils/home.mjs +19 -1
  31. package/dist/es/utils/http/index.mjs +1 -2
  32. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  import _sfc_main from "./SelectPluginByKey.vue2.mjs";
2
2
  import "./SelectPluginByKey.vue3.mjs";
3
3
  import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.mjs";
4
- const SelectPluginByKey = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-7c69a1b1"]]);
4
+ const SelectPluginByKey = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-fca01c32"]]);
5
5
  export {
6
6
  SelectPluginByKey as default
7
7
  };
@@ -1,4 +1,4 @@
1
- const SelectPluginByKey_vue_vue_type_style_index_0_scoped_7c69a1b1_lang = "";
1
+ const SelectPluginByKey_vue_vue_type_style_index_0_scoped_fca01c32_lang = "";
2
2
  export {
3
- SelectPluginByKey_vue_vue_type_style_index_0_scoped_7c69a1b1_lang as default
3
+ SelectPluginByKey_vue_vue_type_style_index_0_scoped_fca01c32_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 SearchInput = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-f8bed907"]]);
4
+ const SearchInput = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-8e399450"]]);
5
5
  export {
6
6
  SearchInput as default
7
7
  };
@@ -7,7 +7,7 @@ import SpeechControl from "./SpeechControl.vue.mjs";
7
7
  import SelectPluginByKey from "./SelectPluginByKey.vue.mjs";
8
8
  import { useCopilotStoreHook } from "../../../store/modules/copilot.mjs";
9
9
  import { storeToRefs } from "pinia";
10
- const _withScopeId = (n) => (pushScopeId("data-v-f8bed907"), n = n(), popScopeId(), n);
10
+ const _withScopeId = (n) => (pushScopeId("data-v-8e399450"), n = n(), popScopeId(), n);
11
11
  const _hoisted_1 = { class: "control-contain" };
12
12
  const _hoisted_2 = ["onClick"];
13
13
  const _hoisted_3 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("svg", {
@@ -35,7 +35,7 @@ const _hoisted_9 = {
35
35
  key: 0,
36
36
  class: "plugin-town"
37
37
  };
38
- const _hoisted_10 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("span", null, "已选插件:", -1));
38
+ const _hoisted_10 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("span", null, "已选智能体:", -1));
39
39
  const _hoisted_11 = {
40
40
  class: "input-row",
41
41
  id: "copiFooter"
@@ -253,15 +253,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
253
253
  isInitCopilot.value = false;
254
254
  }
255
255
  });
256
- const buttonText = ref("选择插件");
256
+ const buttonText = ref("选择智能体");
257
257
  const isShowSelection = ref(false);
258
258
  watch(
259
259
  checkedPluginByBtn,
260
260
  (val) => {
261
261
  if (Object.keys(val).length) {
262
- buttonText.value = "已选插件";
262
+ buttonText.value = "已选智能体";
263
263
  } else {
264
- buttonText.value = "选择插件";
264
+ buttonText.value = "选择智能体";
265
265
  }
266
266
  },
267
267
  {
@@ -357,7 +357,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
357
357
  ref: coptInput,
358
358
  class: "text-area",
359
359
  contenteditable: "plaintext-only",
360
- placeholder: "有问题请尽管问我。。。",
360
+ placeholder: "输入“@”选择智能体,可通过上下键切换,回车选中",
361
361
  spellcheck: "false",
362
362
  onInput: inputChange,
363
363
  onKeydown: [
@@ -1,4 +1,4 @@
1
- const index_vue_vue_type_style_index_0_scoped_f8bed907_lang = "";
1
+ const index_vue_vue_type_style_index_0_scoped_8e399450_lang = "";
2
2
  export {
3
- index_vue_vue_type_style_index_0_scoped_f8bed907_lang as default
3
+ index_vue_vue_type_style_index_0_scoped_8e399450_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-318d9fe4"]]);
4
+ const dialogue = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-1e904412"]]);
5
5
  export {
6
6
  dialogue as default
7
7
  };
@@ -11,41 +11,42 @@ import data$6 from "../../node_modules/.pnpm/@iconify-icons_ph@1.2.5/node_module
11
11
  import data from "../../node_modules/.pnpm/@iconify-icons_ph@1.2.5/node_modules/@iconify-icons/ph/caret-down-fill.mjs";
12
12
  import { useCopilotStoreHook } from "../../store/modules/copilot.mjs";
13
13
  import { storeToRefs } from "pinia";
14
- const _withScopeId = (n) => (pushScopeId("data-v-318d9fe4"), n = n(), popScopeId(), n);
14
+ const _withScopeId = (n) => (pushScopeId("data-v-1e904412"), n = n(), popScopeId(), n);
15
15
  const _hoisted_1 = { class: "msg-head" };
16
- const _hoisted_2 = {
16
+ const _hoisted_2 = { class: "msg-box" };
17
+ const _hoisted_3 = {
17
18
  key: 0,
18
19
  class: "msg-plus mb-1"
19
20
  };
20
- const _hoisted_3 = { style: { "cursor": "pointer" } };
21
- const _hoisted_4 = {
21
+ const _hoisted_4 = { style: { "cursor": "pointer" } };
22
+ const _hoisted_5 = {
22
23
  key: 0,
23
24
  class: "icon-operates"
24
25
  };
25
- const _hoisted_5 = {
26
+ const _hoisted_6 = {
26
27
  class: "icon-item",
27
28
  title: "点赞"
28
29
  };
29
- const _hoisted_6 = {
30
+ const _hoisted_7 = {
30
31
  class: "icon-item",
31
32
  title: "不喜欢"
32
33
  };
33
- const _hoisted_7 = {
34
+ const _hoisted_8 = {
34
35
  class: "icon-item",
35
36
  title: "复制"
36
37
  };
37
- const _hoisted_8 = {
38
+ const _hoisted_9 = {
38
39
  class: "icon-item",
39
40
  title: "导出"
40
41
  };
41
- const _hoisted_9 = {
42
+ const _hoisted_10 = {
42
43
  class: "icon-item",
43
44
  title: "播放"
44
45
  };
45
- const _hoisted_10 = { class: "stop-dialogue" };
46
- const _hoisted_11 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", { class: "gray-line" }, null, -1));
47
- const _hoisted_12 = { class: "title" };
48
- const _hoisted_13 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", { class: "gray-line" }, null, -1));
46
+ const _hoisted_11 = { class: "stop-dialogue" };
47
+ const _hoisted_12 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", { class: "gray-line" }, null, -1));
48
+ const _hoisted_13 = { class: "title" };
49
+ const _hoisted_14 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", { class: "gray-line" }, null, -1));
49
50
  const _sfc_main = /* @__PURE__ */ defineComponent({
50
51
  __name: "index",
51
52
  setup(__props) {
@@ -90,63 +91,65 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
90
91
  _: 3
91
92
  }))
92
93
  ]),
93
- createElementVNode("div", {
94
- class: normalizeClass({ "msg-content": true, "response-content": !item.isSend })
95
- }, [
96
- !item.isSend && item.plusName ? (openBlock(), createElementBlock("div", _hoisted_2, [
97
- createElementVNode("div", null, [
98
- createTextVNode(" 使用: "),
99
- createElementVNode("span", null, toDisplayString(item.plusName.replace(/,/g, " ")), 1)
100
- ]),
101
- createElementVNode("div", _hoisted_3, [
102
- createVNode(_component_IconifyIconOffline, {
103
- icon: unref(data),
104
- onClick: ($event) => item.isShrink = !item.isShrink,
105
- class: normalizeClass({ "arrow-icon": true, "rotate-up": item.isShrink })
106
- }, null, 8, ["icon", "onClick", "class"])
107
- ])
108
- ])) : createCommentVNode("", true),
94
+ createElementVNode("div", _hoisted_2, [
109
95
  createElementVNode("div", {
110
- class: normalizeClass({ "plugs-answer": true, "is-shrink": item.isShrink })
96
+ class: normalizeClass({ "msg-content": true, "response-content": !item.isSend })
111
97
  }, [
112
- createVNode(MessageParse, {
113
- msgs: item.msgs,
114
- onPrintOk: printOk,
115
- isPrinting: item.needPrinting,
116
- "onUpdate:isPrinting": ($event) => item.needPrinting = $event,
117
- scrollToBottom
118
- }, null, 8, ["msgs", "isPrinting", "onUpdate:isPrinting"]),
119
- !item.isSend && !item.needPrinting && item.showOpt ? (openBlock(), createElementBlock("div", _hoisted_4, [
120
- createElementVNode("div", _hoisted_5, [
121
- createVNode(_component_IconifyIconOffline, { icon: unref(data$1) }, null, 8, ["icon"])
122
- ]),
123
- createElementVNode("div", _hoisted_6, [
124
- createVNode(_component_IconifyIconOffline, { icon: unref(data$2) }, null, 8, ["icon"])
125
- ]),
126
- createElementVNode("div", _hoisted_7, [
127
- createVNode(_component_IconifyIconOffline, { icon: unref(data$3) }, null, 8, ["icon"])
128
- ]),
129
- createElementVNode("div", _hoisted_8, [
130
- createVNode(_component_IconifyIconOffline, { icon: unref(data$4) }, null, 8, ["icon"])
98
+ !item.isSend && item.plusName ? (openBlock(), createElementBlock("div", _hoisted_3, [
99
+ createElementVNode("div", null, [
100
+ createTextVNode(" 使用: "),
101
+ createElementVNode("span", null, toDisplayString(item.plusName.replace(/,/g, " ")), 1)
131
102
  ]),
132
- createElementVNode("div", _hoisted_9, [
133
- createVNode(_component_IconifyIconOffline, { icon: unref(data$5) }, null, 8, ["icon"])
103
+ createElementVNode("div", _hoisted_4, [
104
+ createVNode(_component_IconifyIconOffline, {
105
+ icon: unref(data),
106
+ onClick: ($event) => item.isShrink = !item.isShrink,
107
+ class: normalizeClass({ "arrow-icon": true, "rotate-up": item.isShrink })
108
+ }, null, 8, ["icon", "onClick", "class"])
134
109
  ])
135
- ])) : createCommentVNode("", true)
110
+ ])) : createCommentVNode("", true),
111
+ createElementVNode("div", {
112
+ class: normalizeClass({ "plugs-answer": true, "is-shrink": item.isShrink })
113
+ }, [
114
+ createVNode(MessageParse, {
115
+ msgs: item.msgs,
116
+ onPrintOk: printOk,
117
+ isPrinting: item.needPrinting,
118
+ "onUpdate:isPrinting": ($event) => item.needPrinting = $event,
119
+ scrollToBottom
120
+ }, null, 8, ["msgs", "isPrinting", "onUpdate:isPrinting"]),
121
+ !item.isSend && !item.needPrinting && item.showOpt ? (openBlock(), createElementBlock("div", _hoisted_5, [
122
+ createElementVNode("div", _hoisted_6, [
123
+ createVNode(_component_IconifyIconOffline, { icon: unref(data$1) }, null, 8, ["icon"])
124
+ ]),
125
+ createElementVNode("div", _hoisted_7, [
126
+ createVNode(_component_IconifyIconOffline, { icon: unref(data$2) }, null, 8, ["icon"])
127
+ ]),
128
+ createElementVNode("div", _hoisted_8, [
129
+ createVNode(_component_IconifyIconOffline, { icon: unref(data$3) }, null, 8, ["icon"])
130
+ ]),
131
+ createElementVNode("div", _hoisted_9, [
132
+ createVNode(_component_IconifyIconOffline, { icon: unref(data$4) }, null, 8, ["icon"])
133
+ ]),
134
+ createElementVNode("div", _hoisted_10, [
135
+ createVNode(_component_IconifyIconOffline, { icon: unref(data$5) }, null, 8, ["icon"])
136
+ ])
137
+ ])) : createCommentVNode("", true)
138
+ ], 2)
136
139
  ], 2)
137
- ], 2)
140
+ ])
138
141
  ]);
139
142
  }), 128)),
140
- withDirectives(createElementVNode("div", _hoisted_10, [
141
- _hoisted_11,
142
- createElementVNode("div", _hoisted_12, [
143
+ withDirectives(createElementVNode("div", _hoisted_11, [
144
+ _hoisted_12,
145
+ createElementVNode("div", _hoisted_13, [
143
146
  createVNode(_component_IconifyIconOffline, {
144
147
  icon: unref(data$6),
145
148
  class: "stop-icon"
146
149
  }, null, 8, ["icon"]),
147
150
  createTextVNode(" 很抱歉,此对话已达到其限制。让我们开始新的聊天。 ")
148
151
  ]),
149
- _hoisted_13
152
+ _hoisted_14
150
153
  ], 512), [
151
154
  [vShow, unref(stopDialogue)]
152
155
  ])
@@ -1,4 +1,4 @@
1
- const index_vue_vue_type_style_index_0_scoped_318d9fe4_lang = "";
1
+ const index_vue_vue_type_style_index_0_scoped_1e904412_lang = "";
2
2
  export {
3
- index_vue_vue_type_style_index_0_scoped_318d9fe4_lang as default
3
+ index_vue_vue_type_style_index_0_scoped_1e904412_lang as default
4
4
  };
@@ -1,7 +1,7 @@
1
1
  import _sfc_main from "./edit.vue2.mjs";
2
2
  import "./edit.vue3.mjs";
3
3
  import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.mjs";
4
- const Edit = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-cbf4d716"]]);
4
+ const Edit = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-3055f0b8"]]);
5
5
  export {
6
6
  Edit as default
7
7
  };
@@ -33,10 +33,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
33
33
  emits: ["update:isPrinting", "printOk", "update:content"],
34
34
  setup(__props, { emit: emits }) {
35
35
  const props = __props;
36
- const isPrinting = ref(true);
37
36
  const CopilotStore = useCopilotStoreHook();
38
37
  const { onlyCancelRequest, sendPluginMsg } = CopilotStore;
39
38
  const { currentPluginParams, sendLonding } = storeToRefs(CopilotStore);
39
+ const isPrinting = ref(true);
40
40
  const showButton = ref(false);
41
41
  const countDown = ref(5);
42
42
  let interval = null;
@@ -1,4 +1,4 @@
1
- const edit_vue_vue_type_style_index_0_scoped_cbf4d716_lang = "";
1
+ const edit_vue_vue_type_style_index_0_scoped_3055f0b8_lang = "";
2
2
  export {
3
- edit_vue_vue_type_style_index_0_scoped_cbf4d716_lang as default
3
+ edit_vue_vue_type_style_index_0_scoped_3055f0b8_lang as default
4
4
  };
@@ -0,0 +1,88 @@
1
+ import { ref, watch, onMounted, openBlock, createElementBlock, createElementVNode, createVNode, toDisplayString } from "vue";
2
+ import _sfc_main$1 from "./fileIcon.vue.mjs";
3
+ import { convertBytes, urlDownload } from "../../../utils/home.mjs";
4
+ import { useCopilotStoreHook } from "../../../store/modules/copilot.mjs";
5
+ import { storeToRefs } from "pinia";
6
+ import "./fileBox.vue2.mjs";
7
+ import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.mjs";
8
+ const _hoisted_1 = { class: "file-box" };
9
+ const _hoisted_2 = { class: "file-content" };
10
+ const _hoisted_3 = { class: "file-desc" };
11
+ const _hoisted_4 = { class: "file-name" };
12
+ const _hoisted_5 = { class: "file-size-type" };
13
+ const _hoisted_6 = { class: "size" };
14
+ const _hoisted_7 = { class: "type" };
15
+ const _sfc_main = {
16
+ __name: "fileBox",
17
+ props: {
18
+ desc: {
19
+ type: Object,
20
+ default: () => {
21
+ }
22
+ },
23
+ isPrinting: {
24
+ type: Boolean,
25
+ default: false
26
+ }
27
+ },
28
+ emits: ["printOk", "update:isPrinting"],
29
+ setup(__props, { emit: emits }) {
30
+ const props = __props;
31
+ const CopilotStore = useCopilotStoreHook();
32
+ const { sendLonding } = storeToRefs(CopilotStore);
33
+ const fileType = ref("");
34
+ const size = ref("");
35
+ watch(
36
+ () => sendLonding.value,
37
+ (newValue) => {
38
+ if (!newValue) {
39
+ emits("update:isPrinting", false);
40
+ }
41
+ }
42
+ );
43
+ watch(
44
+ props.desc,
45
+ (val) => {
46
+ size.value = convertBytes(val.size);
47
+ switch (val.suffix) {
48
+ case "doc":
49
+ fileType.value = "word";
50
+ break;
51
+ case "docx":
52
+ fileType.value = "word";
53
+ break;
54
+ }
55
+ },
56
+ { immediate: true }
57
+ );
58
+ const downLoadFilde = () => {
59
+ urlDownload(props.desc.fileUrl, props.desc.name);
60
+ };
61
+ onMounted(() => {
62
+ emits("update:isPrinting", false);
63
+ emits("printOk");
64
+ });
65
+ return (_ctx, _cache) => {
66
+ return openBlock(), createElementBlock("div", _hoisted_1, [
67
+ createElementVNode("div", _hoisted_2, [
68
+ createVNode(_sfc_main$1, { type: fileType.value }, null, 8, ["type"]),
69
+ createElementVNode("div", _hoisted_3, [
70
+ createElementVNode("span", _hoisted_4, toDisplayString(__props.desc.name), 1),
71
+ createElementVNode("div", _hoisted_5, [
72
+ createElementVNode("span", _hoisted_6, toDisplayString(size.value), 1),
73
+ createElementVNode("span", _hoisted_7, toDisplayString(fileType.value), 1)
74
+ ])
75
+ ])
76
+ ]),
77
+ createElementVNode("button", {
78
+ class: "download-btn",
79
+ onClick: downLoadFilde
80
+ }, "下载")
81
+ ]);
82
+ };
83
+ }
84
+ };
85
+ const FileBox = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-45f0332a"]]);
86
+ export {
87
+ FileBox as default
88
+ };
@@ -0,0 +1,4 @@
1
+ const fileBox_vue_vue_type_style_index_0_scoped_45f0332a_lang = "";
2
+ export {
3
+ fileBox_vue_vue_type_style_index_0_scoped_45f0332a_lang as default
4
+ };
@@ -0,0 +1,79 @@
1
+ import { defineComponent, openBlock, createElementBlock, createCommentVNode, createElementVNode } from "vue";
2
+ const _hoisted_1 = {
3
+ key: 0,
4
+ t: "1713764760412",
5
+ class: "icon",
6
+ viewBox: "0 0 1024 1024",
7
+ version: "1.1",
8
+ xmlns: "http://www.w3.org/2000/svg",
9
+ "p-id": "5972",
10
+ "xmlns:xlink": "http://www.w3.org/1999/xlink",
11
+ width: "40",
12
+ height: "40"
13
+ };
14
+ const _hoisted_2 = /* @__PURE__ */ createElementVNode("path", {
15
+ d: "M620.9 67.2H236.5c-30.3 0-54.9 25-54.9 55.9v782.7c0 30.9 24.6 55.9 54.9 55.9h549c30.3 0 54.9-25 54.9-55.9v-615L620.9 67.2z",
16
+ fill: "#FF7357",
17
+ "p-id": "5973"
18
+ }, null, -1);
19
+ const _hoisted_3 = /* @__PURE__ */ createElementVNode("path", {
20
+ d: "M802 925.9H220.1V109.7h379.6v218.9H802z",
21
+ fill: "#FFFFFF",
22
+ "p-id": "5974"
23
+ }, null, -1);
24
+ const _hoisted_4 = /* @__PURE__ */ createElementVNode("path", {
25
+ d: "M802 922.6H220.1V106.4h379.6v218.8H802z",
26
+ fill: "#FF917B",
27
+ "p-id": "5975"
28
+ }, null, -1);
29
+ const _hoisted_5 = /* @__PURE__ */ createElementVNode("path", {
30
+ d: "M340.8 597.6c47.7 0 71.4 20.2 71.4 60.8 0 40.9-24.2 61.4-72.1 61.4h-51.9v78h-30.6V597.6h83.2z m-52.4 96.2h49.8c15.1 0 26.1-2.9 33.1-8.4 6.8-5.6 10.3-14.5 10.3-26.9 0-12.4-3.7-21.3-10.6-26.3-7.1-5.6-17.9-8.4-32.9-8.4h-49.8v70zM523.6 597.6c47.7 0 71.4 20.2 71.4 60.8 0 40.9-24.2 61.4-72.1 61.4H471v78h-30.6V597.6h83.2z m-52.4 96.2H521c15.1 0 26.1-2.9 33.1-8.4 6.8-5.6 10.3-14.5 10.3-26.9 0-12.4-3.7-21.3-10.6-26.3-7.1-5.6-17.9-8.4-32.9-8.4h-49.8v70h0.1zM772 597.6v26.1h-66.7v174.1H675V623.7h-67v-26.1h164z",
31
+ fill: "#FFFFFF",
32
+ "p-id": "5976"
33
+ }, null, -1);
34
+ const _hoisted_6 = [
35
+ _hoisted_2,
36
+ _hoisted_3,
37
+ _hoisted_4,
38
+ _hoisted_5
39
+ ];
40
+ const _hoisted_7 = {
41
+ key: 1,
42
+ t: "1713764692798",
43
+ class: "icon",
44
+ viewBox: "0 0 1024 1024",
45
+ version: "1.1",
46
+ xmlns: "http://www.w3.org/2000/svg",
47
+ "p-id": "4500",
48
+ "xmlns:xlink": "http://www.w3.org/1999/xlink",
49
+ width: "40",
50
+ height: "40"
51
+ };
52
+ const _hoisted_8 = /* @__PURE__ */ createElementVNode("path", {
53
+ d: "M791.94 155.36H332.48c-42.23 0-76.54 34.31-76.54 76.54v76.55h-51.03c-28.16 0-51.04 22.87-51.04 51.03v306.37c0 28.15 22.88 51.02 51.04 51.02h51.03v76.54c0 42.24 34.32 76.55 76.54 76.55h459.46c42.23 0 76.54-34.32 76.54-76.54V231.9c0.1-42.24-34.31-76.54-76.54-76.54z m-547.68 298.6h40.28l26.04 93.58h5.7l29.16-93.58h34.45l29.02 93.71h6.24l26.18-93.71h40.41l-40.41 133.72H384.1l-19.53-70.25h-5.43l-19.26 69.98h-55.74l-39.88-133.45zM817.45 793.5c-0.01 14.09-11.42 25.5-25.51 25.51H332.48c-14.09-0.01-25.5-11.43-25.51-25.51v-76.54h204.21c28.15 0 51.03-22.88 51.03-51.03V614.9H740.9c14.09-0.01 25.51-11.43 25.52-25.52-0.02-14.09-11.43-25.5-25.52-25.51H562.21v-51.03H740.9c14.09-0.01 25.51-11.43 25.52-25.52-0.01-14.09-11.43-25.5-25.52-25.52H562.21v-51.03H740.9c14.09-0.01 25.51-11.43 25.52-25.51-0.01-14.09-11.43-25.51-25.52-25.52H562.21c0-28.16-22.89-51.03-51.03-51.03H306.97v-76.54c0.01-14.09 11.43-25.5 25.51-25.52h459.46c14.08 0.01 25.5 11.43 25.51 25.52V793.5z m0 0",
54
+ fill: "#54A0FF",
55
+ "p-id": "4501"
56
+ }, null, -1);
57
+ const _hoisted_9 = [
58
+ _hoisted_8
59
+ ];
60
+ const _sfc_main = /* @__PURE__ */ defineComponent({
61
+ __name: "fileIcon",
62
+ props: {
63
+ type: {
64
+ type: String,
65
+ default: "word"
66
+ }
67
+ },
68
+ setup(__props) {
69
+ return (_ctx, _cache) => {
70
+ return openBlock(), createElementBlock("div", null, [
71
+ __props.type === "ppt" ? (openBlock(), createElementBlock("svg", _hoisted_1, _hoisted_6)) : createCommentVNode("", true),
72
+ __props.type === "word" ? (openBlock(), createElementBlock("svg", _hoisted_7, _hoisted_9)) : createCommentVNode("", true)
73
+ ]);
74
+ };
75
+ }
76
+ });
77
+ export {
78
+ _sfc_main as default
79
+ };
@@ -0,0 +1,4 @@
1
+ import _sfc_main from "./fileIcon.vue.mjs";
2
+ export {
3
+ _sfc_main as default
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-8cf9b160"]]);
4
+ const MessageParse = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-3b302dc1"]]);
5
5
  export {
6
6
  MessageParse as default
7
7
  };
@@ -4,8 +4,9 @@ import ReadMd from "./readMd.vue.mjs";
4
4
  import Edit from "./edit.vue.mjs";
5
5
  import { storeToRefs } from "pinia";
6
6
  import { useVModel } from "../../../node_modules/.pnpm/@vueuse_core@9.13.0_vue@3.2.45/node_modules/@vueuse/core/index.mjs";
7
+ import FileBox from "./fileBox.vue.mjs";
7
8
  const _hoisted_1 = {
8
- key: 2,
9
+ key: 3,
9
10
  class: "cursor"
10
11
  };
11
12
  const _sfc_main = /* @__PURE__ */ defineComponent({
@@ -44,7 +45,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
44
45
  watch(
45
46
  () => props.msgs.length,
46
47
  () => {
47
- if (current.value === props.msgs.length - 1 && !props.msgs[current.value - 1].needPrinting) {
48
+ if (current.value < props.msgs.length && !props.msgs[current.value - 1].needPrinting) {
48
49
  current.value++;
49
50
  }
50
51
  }
@@ -94,6 +95,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
94
95
  "onUpdate:isPrinting": ($event) => item.needPrinting = $event,
95
96
  onPrintOk: printOk
96
97
  }, null, 8, ["content", "scrollToBottom", "isPrinting", "onUpdate:isPrinting"])) : createCommentVNode("", true),
98
+ index < current.value && item.type === unref(DataType)[unref(DataType).file] ? (openBlock(), createBlock(FileBox, {
99
+ key: 2,
100
+ desc: item.content,
101
+ isPrinting: item.needPrinting,
102
+ "onUpdate:isPrinting": ($event) => item.needPrinting = $event,
103
+ onPrintOk: printOk
104
+ }, null, 8, ["desc", "isPrinting", "onUpdate:isPrinting"])) : createCommentVNode("", true),
97
105
  props.isPrinting && index === current.value - 1 && !item.needPrinting ? (openBlock(), createElementBlock("span", _hoisted_1)) : createCommentVNode("", true)
98
106
  ], 64);
99
107
  }), 128);
@@ -1,4 +1,4 @@
1
- const index_vue_vue_type_style_index_0_scoped_8cf9b160_lang = "";
1
+ const index_vue_vue_type_style_index_0_scoped_3b302dc1_lang = "";
2
2
  export {
3
- index_vue_vue_type_style_index_0_scoped_8cf9b160_lang as default
3
+ index_vue_vue_type_style_index_0_scoped_3b302dc1_lang as default
4
4
  };
@@ -1,7 +1,7 @@
1
1
  import _sfc_main from "./readMd.vue2.mjs";
2
2
  import "./readMd.vue3.mjs";
3
3
  import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.mjs";
4
- const ReadMd = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-6f0b4aca"]]);
4
+ const ReadMd = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-abb459b6"]]);
5
5
  export {
6
6
  ReadMd as default
7
7
  };
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, ref, computed, watch, onMounted, resolveDirective, openBlock, createElementBlock, withDirectives, createElementVNode, unref } from "vue";
2
- import purify from "../../../node_modules/.pnpm/dompurify@3.0.10/node_modules/dompurify/dist/purify.es.mjs";
3
- import { marked } from "../../../node_modules/.pnpm/marked@12.0.1/node_modules/marked/lib/marked.esm.mjs";
2
+ import purify from "../../../node_modules/.pnpm/dompurify@3.1.0/node_modules/dompurify/dist/purify.es.mjs";
3
+ import { marked } from "../../../node_modules/.pnpm/marked@12.0.2/node_modules/marked/lib/marked.esm.mjs";
4
4
  import isInCode from "./mdInCode.mjs";
5
5
  import { useCopilotStoreHook } from "../../../store/modules/copilot.mjs";
6
6
  import { storeToRefs } from "pinia";
@@ -45,7 +45,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
45
45
  clearTimeout(printTimeout);
46
46
  printTimeout = null;
47
47
  emits("update:isPrinting", false);
48
- emits("printOk", !sendLonding.value);
48
+ emits("printOk");
49
49
  return;
50
50
  }
51
51
  if (index === getHtml.value.length) {
@@ -1,4 +1,4 @@
1
- const readMd_vue_vue_type_style_index_0_scoped_6f0b4aca_lang = "";
1
+ const readMd_vue_vue_type_style_index_0_scoped_abb459b6_lang = "";
2
2
  export {
3
- readMd_vue_vue_type_style_index_0_scoped_6f0b4aca_lang as default
3
+ readMd_vue_vue_type_style_index_0_scoped_abb459b6_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 KgCopilot = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-5140ed8f"]]);
4
+ const KgCopilot = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-73aaa632"]]);
5
5
  export {
6
6
  KgCopilot as default
7
7
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent, toRefs, onMounted, useSlots, openBlock, createElementBlock, createElementVNode, createVNode, createSlots, renderList, unref, withCtx, renderSlot, toRaw } from "vue";
1
+ import { defineComponent, onMounted, useSlots, openBlock, createElementBlock, createElementVNode, createVNode, createSlots, renderList, unref, withCtx, renderSlot, toRaw } from "vue";
2
2
  import dialogue from "./dialogue/index.vue.mjs";
3
3
  import "../style/tailwind.css.mjs";
4
4
  import "../style/index.scss.mjs";
@@ -17,28 +17,29 @@ const __default__ = {
17
17
  const _sfc_main = /* @__PURE__ */ defineComponent({
18
18
  ...__default__,
19
19
  props: {
20
- sendUrl: null,
21
- getkitsUrl: null,
22
- token: null,
23
20
  plugins: null,
24
21
  initText: { default: "你好,我是AI智能助手,如有任何需要,请随时告诉我,我会尽力为您提供帮助。" },
25
- aiName: { default: "Copilot" }
22
+ aiName: { default: "Copilot" },
23
+ placeholder: { default: "输入“@”选择智能体,可通过上下键切换智能体选项,回车选中。" },
24
+ maxSendNum: { default: 0 },
25
+ intelligentAnalysisConfig: null,
26
+ defaultDeal: null
26
27
  },
27
28
  setup(__props, { expose }) {
28
29
  const props = __props;
29
30
  const CopilotStore = useCopilotStoreHook();
30
31
  const { searchText, msgList } = storeToRefs(CopilotStore);
31
- const { initCopilot, setSearchText, setMsgList } = CopilotStore;
32
- const { sendUrl, getkitsUrl, token, plugins, initText, aiName } = toRefs(props);
32
+ const { initCopilot, setSearchText, sendMsg } = CopilotStore;
33
33
  onMounted(() => {
34
- initCopilot(
35
- sendUrl.value,
36
- getkitsUrl.value,
37
- token.value,
38
- plugins.value,
39
- initText.value,
40
- aiName.value
41
- );
34
+ initCopilot({
35
+ plugins: props.plugins,
36
+ initText: props.initText,
37
+ aiName: props.aiName,
38
+ maxSendNum: props.maxSendNum,
39
+ placeholder: props.placeholder,
40
+ intelligentAnalysisConfig: props.intelligentAnalysisConfig,
41
+ defaultDeal: props.defaultDeal
42
+ });
42
43
  });
43
44
  const getSearchText = () => {
44
45
  return searchText.value;
@@ -46,11 +47,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
46
47
  const getMsgList = () => {
47
48
  return toRaw(msgList.value);
48
49
  };
50
+ const sendMsgAuto = (str) => {
51
+ sendMsg(str);
52
+ };
49
53
  expose({
50
54
  getSearchText,
51
55
  setSearchText,
52
56
  getMsgList,
53
- setMsgList
57
+ sendMsgAuto
54
58
  });
55
59
  const slots = useSlots();
56
60
  return (_ctx, _cache) => {