@kg-ui/kg-ui-plus 0.0.12 → 0.0.13

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 (42) hide show
  1. package/dist/es/KgCopilot/CopiFooter/{components → SearchInput}/NewTheme.vue.mjs +1 -1
  2. package/dist/es/KgCopilot/CopiFooter/{components → SearchInput}/NewTheme.vue2.mjs +6 -6
  3. package/dist/es/KgCopilot/CopiFooter/SearchInput/NewTheme.vue3.mjs +4 -0
  4. package/dist/es/KgCopilot/CopiFooter/{components/SearchInput → SearchInput}/SelectPlugin.vue.mjs +2 -2
  5. package/dist/es/KgCopilot/CopiFooter/{components/SearchInput → SearchInput}/SelectPlugin.vue2.mjs +13 -61
  6. package/dist/es/KgCopilot/CopiFooter/SearchInput/SelectPlugin.vue3.mjs +4 -0
  7. package/dist/es/KgCopilot/CopiFooter/{components/SearchInput → SearchInput}/SelectPluginByKey.vue.mjs +2 -2
  8. package/dist/es/KgCopilot/CopiFooter/{components/SearchInput → SearchInput}/SelectPluginByKey.vue2.mjs +2 -2
  9. package/dist/es/KgCopilot/CopiFooter/SearchInput/SelectPluginByKey.vue3.mjs +4 -0
  10. package/dist/es/KgCopilot/CopiFooter/{components/SearchInput → SearchInput}/SpeechControl.vue.mjs +2 -2
  11. package/dist/es/KgCopilot/CopiFooter/{components/SearchInput → SearchInput}/SpeechControl.vue2.mjs +1 -1
  12. package/dist/es/KgCopilot/CopiFooter/SearchInput/SpeechControl.vue3.mjs +4 -0
  13. package/dist/es/KgCopilot/CopiFooter/{components/SearchInput → SearchInput}/Upload.vue.mjs +2 -2
  14. package/dist/es/KgCopilot/CopiFooter/{components/SearchInput → SearchInput}/Upload.vue2.mjs +3 -3
  15. package/dist/es/KgCopilot/CopiFooter/SearchInput/Upload.vue3.mjs +4 -0
  16. package/dist/es/KgCopilot/CopiFooter/{components/SearchInput → SearchInput}/index.vue.mjs +2 -2
  17. package/dist/es/KgCopilot/CopiFooter/SearchInput/index.vue2.mjs +258 -0
  18. package/dist/es/KgCopilot/CopiFooter/SearchInput/index.vue3.mjs +4 -0
  19. package/dist/es/KgCopilot/CopiFooter/index.vue.mjs +1 -1
  20. package/dist/es/KgCopilot/CopiFooter/index.vue2.mjs +3 -8
  21. package/dist/es/KgCopilot/CopiFooter/index.vue3.mjs +2 -2
  22. package/dist/es/KgCopilot/dialogue/index.vue.mjs +1 -1
  23. package/dist/es/KgCopilot/dialogue/index.vue2.mjs +31 -32
  24. package/dist/es/KgCopilot/dialogue/index.vue3.mjs +2 -2
  25. package/dist/es/KgCopilot/dialogue/readMd.vue.mjs +1 -1
  26. package/dist/es/KgCopilot/dialogue/readMd.vue2.mjs +3 -2
  27. package/dist/es/KgCopilot/dialogue/readMd.vue3.mjs +2 -2
  28. package/dist/es/KgCopilot/index.vue.mjs +1 -1
  29. package/dist/es/KgCopilot/index.vue3.mjs +2 -2
  30. package/dist/es/directives/heighlight/index.mjs +1 -1
  31. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/styles/sunburst.css.mjs +4 -0
  32. package/dist/es/store/modules/copilot.mjs +1 -0
  33. package/dist/es/style.css +1 -1
  34. package/package.json +122 -122
  35. package/dist/es/KgCopilot/CopiFooter/components/NewTheme.vue3.mjs +0 -4
  36. package/dist/es/KgCopilot/CopiFooter/components/SearchInput/SelectPlugin.vue3.mjs +0 -4
  37. package/dist/es/KgCopilot/CopiFooter/components/SearchInput/SelectPluginByKey.vue3.mjs +0 -4
  38. package/dist/es/KgCopilot/CopiFooter/components/SearchInput/SpeechControl.vue3.mjs +0 -4
  39. package/dist/es/KgCopilot/CopiFooter/components/SearchInput/Upload.vue3.mjs +0 -4
  40. package/dist/es/KgCopilot/CopiFooter/components/SearchInput/index.vue2.mjs +0 -187
  41. package/dist/es/KgCopilot/CopiFooter/components/SearchInput/index.vue3.mjs +0 -4
  42. package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/styles/paraiso-light.css.mjs +0 -4
@@ -1,7 +1,7 @@
1
1
  import _sfc_main from "./NewTheme.vue2.mjs";
2
2
  import "./NewTheme.vue3.mjs";
3
3
  import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.mjs";
4
- const NewTheme = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-f9300f6e"]]);
4
+ const NewTheme = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-e4530874"]]);
5
5
  export {
6
6
  NewTheme as default
7
7
  };
@@ -2,7 +2,7 @@ import { defineComponent, ref, watch, openBlock, createElementBlock, createEleme
2
2
  import { useCopilotStoreHook } from "../../../store/modules/copilot.mjs";
3
3
  import { storeToRefs } from "pinia";
4
4
  const _hoisted_1 = { class: "outside-left-container" };
5
- const _hoisted_2 = /* @__PURE__ */ createStaticVNode('<div class="button-compose-content" data-v-f9300f6e><div class="button-compose-icon" data-v-f9300f6e><svg class="button-compose-icon" width="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" data-v-f9300f6e><path fill="#fff" d="M12 2C17.5228 2 22 6.47715 22 12C22 12.2628 21.9899 12.5232 21.97 12.7809C21.5319 12.3658 21.0361 12.0111 20.4958 11.73C20.3532 7.16054 16.6041 3.5 12 3.5C7.30558 3.5 3.5 7.30558 3.5 12C3.5 13.4696 3.87277 14.8834 4.57303 16.1375L4.72368 16.4072L3.61096 20.3914L7.59755 19.2792L7.86709 19.4295C9.04305 20.0852 10.3592 20.4531 11.73 20.4958C12.0111 21.0361 12.3658 21.5319 12.7809 21.97C12.5232 21.9899 12.2628 22 12 22C10.3817 22 8.81782 21.6146 7.41286 20.888L3.58704 21.9553C2.92212 22.141 2.23258 21.7525 2.04691 21.0876C1.98546 20.8676 1.98549 20.6349 2.04695 20.4151L3.11461 16.5922C2.38637 15.186 2 13.6203 2 12C2 6.47715 6.47715 2 12 2ZM23 17.5C23 14.4624 20.5376 12 17.5 12C14.4624 12 12 14.4624 12 17.5C12 20.5376 14.4624 23 17.5 23C20.5376 23 23 20.5376 23 17.5ZM18.0006 18L18.0011 20.5035C18.0011 20.7797 17.7773 21.0035 17.5011 21.0035C17.225 21.0035 17.0011 20.7797 17.0011 20.5035L17.0006 18H14.4956C14.2197 18 13.9961 17.7762 13.9961 17.5C13.9961 17.2239 14.2197 17 14.4956 17H17.0005L17 14.4993C17 14.2231 17.2239 13.9993 17.5 13.9993C17.7761 13.9993 18 14.2231 18 14.4993L18.0005 17H20.4966C20.7725 17 20.9961 17.2239 20.9961 17.5C20.9961 17.7762 20.7725 18 20.4966 18H18.0006Z" data-v-f9300f6e></path></svg></div><div class="button-compose-text" data-v-f9300f6e>新主题</div></div>', 1);
5
+ const _hoisted_2 = /* @__PURE__ */ createStaticVNode('<div class="button-compose-content" data-v-e4530874><div class="button-compose-icon" data-v-e4530874><svg class="button-compose-icon" width="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" data-v-e4530874><path fill="#fff" d="M12 2C17.5228 2 22 6.47715 22 12C22 12.2628 21.9899 12.5232 21.97 12.7809C21.5319 12.3658 21.0361 12.0111 20.4958 11.73C20.3532 7.16054 16.6041 3.5 12 3.5C7.30558 3.5 3.5 7.30558 3.5 12C3.5 13.4696 3.87277 14.8834 4.57303 16.1375L4.72368 16.4072L3.61096 20.3914L7.59755 19.2792L7.86709 19.4295C9.04305 20.0852 10.3592 20.4531 11.73 20.4958C12.0111 21.0361 12.3658 21.5319 12.7809 21.97C12.5232 21.9899 12.2628 22 12 22C10.3817 22 8.81782 21.6146 7.41286 20.888L3.58704 21.9553C2.92212 22.141 2.23258 21.7525 2.04691 21.0876C1.98546 20.8676 1.98549 20.6349 2.04695 20.4151L3.11461 16.5922C2.38637 15.186 2 13.6203 2 12C2 6.47715 6.47715 2 12 2ZM23 17.5C23 14.4624 20.5376 12 17.5 12C14.4624 12 12 14.4624 12 17.5C12 20.5376 14.4624 23 17.5 23C20.5376 23 23 20.5376 23 17.5ZM18.0006 18L18.0011 20.5035C18.0011 20.7797 17.7773 21.0035 17.5011 21.0035C17.225 21.0035 17.0011 20.7797 17.0011 20.5035L17.0006 18H14.4956C14.2197 18 13.9961 17.7762 13.9961 17.5C13.9961 17.2239 14.2197 17 14.4956 17H17.0005L17 14.4993C17 14.2231 17.2239 13.9993 17.5 13.9993C17.7761 13.9993 18 14.2231 18 14.4993L18.0005 17H20.4966C20.7725 17 20.9961 17.2239 20.9961 17.5C20.9961 17.7762 20.7725 18 20.4966 18H18.0006Z" data-v-e4530874></path></svg></div><div class="button-compose-text" data-v-e4530874>新主题</div></div>', 1);
6
6
  const _hoisted_3 = [
7
7
  _hoisted_2
8
8
  ];
@@ -12,22 +12,22 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
12
12
  const CopilotStore = useCopilotStoreHook();
13
13
  const { isShowNewTheme } = storeToRefs(CopilotStore);
14
14
  const { resetCopilot } = CopilotStore;
15
- const newthemeWidth = ref(50);
15
+ const newthemeWidth = ref(40);
16
16
  watch(isShowNewTheme, (val) => {
17
17
  if (val) {
18
- newthemeWidth.value = 110;
18
+ newthemeWidth.value = 100;
19
19
  } else {
20
- newthemeWidth.value = 50;
20
+ newthemeWidth.value = 40;
21
21
  }
22
22
  });
23
23
  const getNewTheme = () => {
24
24
  resetCopilot();
25
25
  };
26
26
  const mouseEnterBtn = () => {
27
- newthemeWidth.value = 110;
27
+ newthemeWidth.value = 100;
28
28
  };
29
29
  const mouseLeaveBtn = () => {
30
- newthemeWidth.value = 50;
30
+ newthemeWidth.value = 40;
31
31
  };
32
32
  return (_ctx, _cache) => {
33
33
  return openBlock(), createElementBlock("div", _hoisted_1, [
@@ -0,0 +1,4 @@
1
+ const NewTheme_vue_vue_type_style_index_0_scoped_e4530874_lang = "";
2
+ export {
3
+ NewTheme_vue_vue_type_style_index_0_scoped_e4530874_lang as default
4
+ };
@@ -1,7 +1,7 @@
1
1
  import _sfc_main from "./SelectPlugin.vue2.mjs";
2
2
  import "./SelectPlugin.vue3.mjs";
3
- import _export_sfc from "../../../../_virtual/_plugin-vue_export-helper.mjs";
4
- const SelectPlugin = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-a4be1cda"]]);
3
+ import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.mjs";
4
+ const SelectPlugin = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-b3be75d1"]]);
5
5
  export {
6
6
  SelectPlugin as default
7
7
  };
@@ -1,10 +1,9 @@
1
- import { defineComponent, ref, watch, resolveComponent, openBlock, createElementBlock, createVNode, Transition, withCtx, withDirectives, createElementVNode, toDisplayString, unref, Fragment, renderList, normalizeClass, createBlock, createCommentVNode, withModifiers, pushScopeId, popScopeId } from "vue";
1
+ import { defineComponent, ref, watch, resolveComponent, openBlock, createElementBlock, createVNode, Transition, withCtx, withDirectives, createElementVNode, toDisplayString, unref, Fragment, renderList, normalizeClass, createBlock, createCommentVNode } from "vue";
2
2
  import { ClickOutside } from "element-plus";
3
- import data from "../../../../node_modules/.pnpm/@iconify-icons_ep@1.2.7/node_modules/@iconify-icons/ep/check.mjs";
4
- import { debounce } from "../../../../utils/home.mjs";
5
- import { useCopilotStoreHook } from "../../../../store/modules/copilot.mjs";
3
+ import data from "../../../node_modules/.pnpm/@iconify-icons_ep@1.2.7/node_modules/@iconify-icons/ep/check.mjs";
4
+ import { debounce } from "../../../utils/home.mjs";
5
+ import { useCopilotStoreHook } from "../../../store/modules/copilot.mjs";
6
6
  import { storeToRefs } from "pinia";
7
- const _withScopeId = (n) => (pushScopeId("data-v-a4be1cda"), n = n(), popScopeId(), n);
8
7
  const _hoisted_1 = { class: "select-plugin-box" };
9
8
  const _hoisted_2 = {
10
9
  key: 0,
@@ -14,27 +13,16 @@ const _hoisted_3 = { class: "input-container" };
14
13
  const _hoisted_4 = { class: "plugin-number" };
15
14
  const _hoisted_5 = { class: "plugin-content" };
16
15
  const _hoisted_6 = ["onClick", "onMouseover"];
17
- const _hoisted_7 = ["onClick"];
18
- const _hoisted_8 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("svg", {
19
- xmlns: "http://www.w3.org/2000/svg",
20
- width: "32",
21
- height: "32",
22
- fill: "currentColor"
23
- }, [
24
- /* @__PURE__ */ createElementVNode("path", {
25
- "fill-rule": "evenodd",
26
- d: "M16 0a2.4 2.4 0 012.4 2.4l-.001 11.199L29.6 13.6a2.4 2.4 0 010 4.8l-11.201-.001L18.4 29.6a2.4 2.4 0 01-4.8 0l-.001-11.201L2.4 18.4a2.4 2.4 0 010-4.8l11.199-.001L13.6 2.4A2.4 2.4 0 0116 0z"
27
- })
28
- ], -1));
29
- const _hoisted_9 = [
30
- _hoisted_8
31
- ];
32
16
  const _sfc_main = /* @__PURE__ */ defineComponent({
33
17
  __name: "SelectPlugin",
34
- setup(__props) {
18
+ props: {
19
+ isShowSelection: { type: Boolean }
20
+ },
21
+ emits: ["closePluginByoutside"],
22
+ setup(__props, { emit }) {
35
23
  const CopilotStore = useCopilotStoreHook();
36
24
  const { setCheckedPluginList } = CopilotStore;
37
- const { sendLonding, checkedPluginByBtn, plugins } = storeToRefs(CopilotStore);
25
+ const { checkedPluginByBtn, plugins } = storeToRefs(CopilotStore);
38
26
  const selectPluginList = ref([]);
39
27
  watch(
40
28
  () => plugins.value,
@@ -45,34 +33,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
45
33
  immediate: true
46
34
  }
47
35
  );
48
- const buttonText = ref("选择插件");
49
- const isShowSelection = ref(false);
50
- watch(
51
- checkedPluginByBtn.value,
52
- (val) => {
53
- if (val.length) {
54
- buttonText.value = "已选插件";
55
- } else {
56
- buttonText.value = "选择插件";
57
- }
58
- },
59
- {
60
- immediate: true
61
- }
62
- );
63
- const outsideClose = ref(false);
64
- watch(sendLonding, (val) => {
65
- if (val) {
66
- isShowSelection.value = false;
67
- }
68
- });
69
- const selectPlugin = () => {
70
- isShowSelection.value = outsideClose.value ? false : true;
71
- outsideClose.value = false;
72
- };
73
36
  const onClickOutside = () => {
74
- outsideClose.value = true;
75
- isShowSelection.value = false;
37
+ emit("closePluginByoutside");
76
38
  };
77
39
  const choosePlugin = (plugin) => {
78
40
  setCheckedPluginList(plugin);
@@ -96,7 +58,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
96
58
  return openBlock(), createElementBlock("div", _hoisted_1, [
97
59
  createVNode(Transition, { name: "fade-scale" }, {
98
60
  default: withCtx(() => [
99
- isShowSelection.value ? withDirectives((openBlock(), createElementBlock("div", _hoisted_2, [
61
+ __props.isShowSelection ? withDirectives((openBlock(), createElementBlock("div", _hoisted_2, [
100
62
  createElementVNode("div", _hoisted_3, [
101
63
  createElementVNode("div", _hoisted_4, [
102
64
  createElementVNode("span", null, "已选用" + toDisplayString(unref(checkedPluginByBtn).length) + "/" + toDisplayString(unref(plugins).length < 3 ? unref(plugins).length : 3) + "个插件", 1)
@@ -141,17 +103,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
141
103
  ]) : createCommentVNode("", true)
142
104
  ]),
143
105
  _: 1
144
- }),
145
- !unref(sendLonding) ? (openBlock(), createElementBlock("button", {
146
- key: 0,
147
- class: "select-button",
148
- onClick: withModifiers(selectPlugin, ["stop"])
149
- }, [
150
- createElementVNode("span", null, toDisplayString(buttonText.value), 1),
151
- createElementVNode("div", {
152
- class: normalizeClass(["icon", [isShowSelection.value && "rotated"]])
153
- }, _hoisted_9, 2)
154
- ], 8, _hoisted_7)) : createCommentVNode("", true)
106
+ })
155
107
  ]);
156
108
  };
157
109
  }
@@ -0,0 +1,4 @@
1
+ const SelectPlugin_vue_vue_type_style_index_0_scoped_b3be75d1_lang = "";
2
+ export {
3
+ SelectPlugin_vue_vue_type_style_index_0_scoped_b3be75d1_lang as default
4
+ };
@@ -1,7 +1,7 @@
1
1
  import _sfc_main from "./SelectPluginByKey.vue2.mjs";
2
2
  import "./SelectPluginByKey.vue3.mjs";
3
- import _export_sfc from "../../../../_virtual/_plugin-vue_export-helper.mjs";
4
- const SelectPluginByKey = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-5c5c0d09"]]);
3
+ import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.mjs";
4
+ const SelectPluginByKey = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-598aed82"]]);
5
5
  export {
6
6
  SelectPluginByKey as default
7
7
  };
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, ref, watch, openBlock, createBlock, Transition, withCtx, withDirectives, createElementBlock, createElementVNode, unref, Fragment, renderList, normalizeClass, toDisplayString, createCommentVNode } from "vue";
2
2
  import { ClickOutside } from "element-plus";
3
- import { debounce } from "../../../../utils/home.mjs";
4
- import { useCopilotStoreHook } from "../../../../store/modules/copilot.mjs";
3
+ import { debounce } from "../../../utils/home.mjs";
4
+ import { useCopilotStoreHook } from "../../../store/modules/copilot.mjs";
5
5
  import { storeToRefs } from "pinia";
6
6
  const _hoisted_1 = {
7
7
  key: 0,
@@ -0,0 +1,4 @@
1
+ const SelectPluginByKey_vue_vue_type_style_index_0_scoped_598aed82_lang = "";
2
+ export {
3
+ SelectPluginByKey_vue_vue_type_style_index_0_scoped_598aed82_lang as default
4
+ };
@@ -1,7 +1,7 @@
1
1
  import _sfc_main from "./SpeechControl.vue2.mjs";
2
2
  import "./SpeechControl.vue3.mjs";
3
- import _export_sfc from "../../../../_virtual/_plugin-vue_export-helper.mjs";
4
- const SpeechControl = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-1d74f45c"]]);
3
+ import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.mjs";
4
+ const SpeechControl = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-2de838e5"]]);
5
5
  export {
6
6
  SpeechControl as default
7
7
  };
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, resolveComponent, openBlock, createElementBlock, createVNode, withCtx, createElementVNode, unref } from "vue";
2
- import data from "../../../../node_modules/.pnpm/@iconify-icons_ep@1.2.7/node_modules/@iconify-icons/ep/microphone.mjs";
2
+ import data from "../../../node_modules/.pnpm/@iconify-icons_ep@1.2.7/node_modules/@iconify-icons/ep/microphone.mjs";
3
3
  const _hoisted_1 = { class: "top-controls" };
4
4
  const _hoisted_2 = { class: "icon-button" };
5
5
  const _sfc_main = /* @__PURE__ */ defineComponent({
@@ -0,0 +1,4 @@
1
+ const SpeechControl_vue_vue_type_style_index_0_scoped_2de838e5_lang = "";
2
+ export {
3
+ SpeechControl_vue_vue_type_style_index_0_scoped_2de838e5_lang as default
4
+ };
@@ -1,7 +1,7 @@
1
1
  import _sfc_main from "./Upload.vue2.mjs";
2
2
  import "./Upload.vue3.mjs";
3
- import _export_sfc from "../../../../_virtual/_plugin-vue_export-helper.mjs";
4
- const Upload = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-5b8c5cba"]]);
3
+ import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.mjs";
4
+ const Upload = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-94f38585"]]);
5
5
  export {
6
6
  Upload as default
7
7
  };
@@ -1,8 +1,8 @@
1
1
  import { defineComponent, ref, resolveComponent, openBlock, createElementBlock, withDirectives, createBlock, withCtx, createElementVNode, createVNode, unref, createTextVNode, createCommentVNode, pushScopeId, popScopeId } from "vue";
2
- import data from "../../../../node_modules/.pnpm/@iconify-icons_ep@1.2.7/node_modules/@iconify-icons/ep/upload.mjs";
3
- import data$1 from "../../../../node_modules/.pnpm/@iconify-icons_ep@1.2.7/node_modules/@iconify-icons/ep/paperclip.mjs";
2
+ import data from "../../../node_modules/.pnpm/@iconify-icons_ep@1.2.7/node_modules/@iconify-icons/ep/upload.mjs";
3
+ import data$1 from "../../../node_modules/.pnpm/@iconify-icons_ep@1.2.7/node_modules/@iconify-icons/ep/paperclip.mjs";
4
4
  import { ClickOutside, genFileId } from "element-plus";
5
- const _withScopeId = (n) => (pushScopeId("data-v-5b8c5cba"), n = n(), popScopeId(), n);
5
+ const _withScopeId = (n) => (pushScopeId("data-v-94f38585"), n = n(), popScopeId(), n);
6
6
  const _hoisted_1 = { class: "pic-control" };
7
7
  const _hoisted_2 = { class: "visual-search" };
8
8
  const _hoisted_3 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("span", { class: "visual-search-title" }, "添加图像", -1));
@@ -0,0 +1,4 @@
1
+ const Upload_vue_vue_type_style_index_0_scoped_94f38585_lang = "";
2
+ export {
3
+ Upload_vue_vue_type_style_index_0_scoped_94f38585_lang as default
4
+ };
@@ -1,7 +1,7 @@
1
1
  import _sfc_main from "./index.vue2.mjs";
2
2
  import "./index.vue3.mjs";
3
- import _export_sfc from "../../../../_virtual/_plugin-vue_export-helper.mjs";
4
- const SearchInput = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-554a5c95"]]);
3
+ import _export_sfc from "../../../_virtual/_plugin-vue_export-helper.mjs";
4
+ const SearchInput = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-6c6f4a6e"]]);
5
5
  export {
6
6
  SearchInput as default
7
7
  };
@@ -0,0 +1,258 @@
1
+ import { defineComponent, ref, onMounted, computed, watch, resolveComponent, openBlock, createElementBlock, Fragment, createVNode, createElementVNode, withModifiers, toDisplayString, normalizeClass, unref, createCommentVNode, withKeys, createTextVNode, normalizeStyle, pushScopeId, popScopeId } from "vue";
2
+ import Upload from "./Upload.vue.mjs";
3
+ import data from "../../../node_modules/.pnpm/@iconify-icons_ep@1.2.7/node_modules/@iconify-icons/ep/promotion.mjs";
4
+ import NewTheme from "./NewTheme.vue.mjs";
5
+ import SpeechControl from "./SpeechControl.vue.mjs";
6
+ import SelectPlugin from "./SelectPlugin.vue.mjs";
7
+ import SelectPluginByKey from "./SelectPluginByKey.vue.mjs";
8
+ import { useCopilotStoreHook } from "../../../store/modules/copilot.mjs";
9
+ import { storeToRefs } from "pinia";
10
+ const _withScopeId = (n) => (pushScopeId("data-v-6c6f4a6e"), n = n(), popScopeId(), n);
11
+ const _hoisted_1 = { class: "bottom-footer" };
12
+ const _hoisted_2 = { class: "control-contain" };
13
+ const _hoisted_3 = ["onClick"];
14
+ const _hoisted_4 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("svg", {
15
+ xmlns: "http://www.w3.org/2000/svg",
16
+ width: "32",
17
+ height: "32",
18
+ fill: "currentColor"
19
+ }, [
20
+ /* @__PURE__ */ createElementVNode("path", {
21
+ "fill-rule": "evenodd",
22
+ d: "M16 0a2.4 2.4 0 012.4 2.4l-.001 11.199L29.6 13.6a2.4 2.4 0 010 4.8l-11.201-.001L18.4 29.6a2.4 2.4 0 01-4.8 0l-.001-11.201L2.4 18.4a2.4 2.4 0 010-4.8l11.199-.001L13.6 2.4A2.4 2.4 0 0116 0z"
23
+ })
24
+ ], -1));
25
+ const _hoisted_5 = [
26
+ _hoisted_4
27
+ ];
28
+ const _hoisted_6 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", { class: "stop-icon" }, null, -1));
29
+ const _hoisted_7 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("span", null, "停止响应", -1));
30
+ const _hoisted_8 = [
31
+ _hoisted_6,
32
+ _hoisted_7
33
+ ];
34
+ const _hoisted_9 = { class: "input-container" };
35
+ const _hoisted_10 = {
36
+ key: 0,
37
+ class: "plugin-town"
38
+ };
39
+ const _hoisted_11 = {
40
+ class: "input-row",
41
+ id: "copiFooter"
42
+ };
43
+ const _hoisted_12 = ["onKeydown"];
44
+ const _hoisted_13 = { class: "bottom-controls" };
45
+ const _hoisted_14 = { class: "bottom-left-controls" };
46
+ const _hoisted_15 = { class: "bottom-right-controls" };
47
+ const _hoisted_16 = { class: "text-sum" };
48
+ const _hoisted_17 = {
49
+ key: 1,
50
+ class: "disable",
51
+ "click.stop": ""
52
+ };
53
+ const _sfc_main = /* @__PURE__ */ defineComponent({
54
+ __name: "index",
55
+ setup(__props) {
56
+ const CopilotStore = useCopilotStoreHook();
57
+ const {
58
+ searchText,
59
+ isInitCopilot,
60
+ sendLonding,
61
+ stopDialogue,
62
+ checkedPluginByBtn
63
+ } = storeToRefs(CopilotStore);
64
+ const { setSearchText, sendMsg, setShowNewTheme, cancelRequest } = CopilotStore;
65
+ const coptInput = ref();
66
+ onMounted(() => {
67
+ coptInput.value.focus();
68
+ });
69
+ const textLength = computed(() => {
70
+ const num = searchText.value.length;
71
+ if (num === 0) {
72
+ setShowNewTheme(false);
73
+ }
74
+ return num;
75
+ });
76
+ const root = document.documentElement;
77
+ const inputChange = (e) => {
78
+ if (e.target.offsetHeight < 200) {
79
+ root.style.setProperty(
80
+ "--input-bottom-height",
81
+ `${e.target.offsetHeight + 70}px`
82
+ );
83
+ } else {
84
+ root.style.setProperty("--font-size", `270px`);
85
+ }
86
+ if (e.target.innerText.length >= 2e3) {
87
+ e.target.innerText = e.target.innerText.substring(0, 2e3);
88
+ const range = document.createRange();
89
+ range.selectNodeContents(e.target);
90
+ range.collapse(false);
91
+ const sel = window.getSelection();
92
+ sel.removeAllRanges();
93
+ sel.addRange(range);
94
+ }
95
+ setSearchText(e.target.innerText);
96
+ };
97
+ const isShowSelect = ref(false);
98
+ const handlerSendMsg = (e) => {
99
+ e.preventDefault();
100
+ if (isComposing.value)
101
+ return;
102
+ const sendText = searchText.value;
103
+ if (!sendText)
104
+ return;
105
+ if (sendLonding.value)
106
+ return;
107
+ sendMsg(sendText);
108
+ initInput();
109
+ };
110
+ const isComposing = ref(false);
111
+ const handleCompositionStart = () => {
112
+ isComposing.value = true;
113
+ };
114
+ const handleCompositionEnd = (e) => {
115
+ isComposing.value = false;
116
+ };
117
+ const handleKeyDown = (e) => {
118
+ if (e.key === "@") {
119
+ selectPluginByKey();
120
+ }
121
+ };
122
+ const closeSelection = () => {
123
+ isShowSelect.value = false;
124
+ };
125
+ const selectPluginByKey = () => {
126
+ isShowSelect.value = true;
127
+ getCursorPosition();
128
+ };
129
+ const initInput = () => {
130
+ coptInput.value.innerText = "";
131
+ setSearchText("");
132
+ root.style.setProperty("--input-bottom-height", `110px`);
133
+ };
134
+ let cursorPos = "";
135
+ const deleteText = () => {
136
+ const textArr = coptInput.value.innerText.split("");
137
+ textArr.splice(parseInt(cursorPos) - 1, 1);
138
+ searchText.value = textArr.join("");
139
+ };
140
+ const getCursorPosition = () => {
141
+ const selection = window.getSelection();
142
+ const range = selection.getRangeAt(0);
143
+ cursorPos = range.startOffset.toString();
144
+ };
145
+ const handleClickStopBtn = () => {
146
+ cancelRequest();
147
+ };
148
+ watch(isInitCopilot, (newVal) => {
149
+ if (newVal) {
150
+ initInput();
151
+ isInitCopilot.value = false;
152
+ }
153
+ });
154
+ const buttonText = ref("选择插件");
155
+ const isShowSelection = ref(false);
156
+ const outsideClose = ref(false);
157
+ watch(
158
+ checkedPluginByBtn.value,
159
+ (val) => {
160
+ if (val.length) {
161
+ buttonText.value = "已选插件";
162
+ } else {
163
+ buttonText.value = "选择插件";
164
+ }
165
+ },
166
+ {
167
+ immediate: true
168
+ }
169
+ );
170
+ const selectPlugin = () => {
171
+ isShowSelection.value = outsideClose.value ? false : true;
172
+ outsideClose.value = false;
173
+ };
174
+ const closePluginByoutside = () => {
175
+ outsideClose.value = true;
176
+ isShowSelection.value = false;
177
+ };
178
+ return (_ctx, _cache) => {
179
+ const _component_IconifyIconOffline = resolveComponent("IconifyIconOffline");
180
+ return openBlock(), createElementBlock(Fragment, null, [
181
+ createVNode(SelectPlugin, {
182
+ isShowSelection: isShowSelection.value,
183
+ outsideClose: outsideClose.value,
184
+ onClosePluginByoutside: closePluginByoutside
185
+ }, null, 8, ["isShowSelection", "outsideClose"]),
186
+ createVNode(SelectPluginByKey, {
187
+ isShowSelect: isShowSelect.value,
188
+ onClose: closeSelection,
189
+ onDeleteText: deleteText
190
+ }, null, 8, ["isShowSelect"]),
191
+ createElementVNode("div", _hoisted_1, [
192
+ createElementVNode("div", _hoisted_2, [
193
+ createElementVNode("button", {
194
+ class: "select-button",
195
+ onClick: withModifiers(selectPlugin, ["stop"])
196
+ }, [
197
+ createElementVNode("span", null, toDisplayString(buttonText.value), 1),
198
+ createElementVNode("div", {
199
+ class: normalizeClass(["icon", [isShowSelection.value && "rotated"]])
200
+ }, _hoisted_5, 2)
201
+ ], 8, _hoisted_3),
202
+ createVNode(NewTheme),
203
+ unref(sendLonding) ? (openBlock(), createElementBlock("button", {
204
+ key: 0,
205
+ class: "stop-responding-button",
206
+ onClick: handleClickStopBtn
207
+ }, _hoisted_8)) : createCommentVNode("", true)
208
+ ]),
209
+ createElementVNode("div", _hoisted_9, [
210
+ unref(checkedPluginByBtn).length !== 0 ? (openBlock(), createElementBlock("div", _hoisted_10, toDisplayString(unref(checkedPluginByBtn).map((item) => item.name).join(" ")) + " ", 1)) : createCommentVNode("", true),
211
+ createElementVNode("div", _hoisted_11, [
212
+ createElementVNode("div", {
213
+ ref_key: "coptInput",
214
+ ref: coptInput,
215
+ class: "text-area",
216
+ contenteditable: "plaintext-only",
217
+ placeholder: "有问题请尽管问我。。。",
218
+ onInput: inputChange,
219
+ onKeydown: withKeys(handlerSendMsg, ["enter"]),
220
+ onKeyup: handleKeyDown,
221
+ onCompositionstart: handleCompositionStart,
222
+ onCompositionend: handleCompositionEnd
223
+ }, toDisplayString(unref(searchText)), 41, _hoisted_12),
224
+ createVNode(SpeechControl)
225
+ ]),
226
+ createElementVNode("div", _hoisted_13, [
227
+ createElementVNode("div", _hoisted_14, [
228
+ createVNode(Upload, { type: "pic" })
229
+ ]),
230
+ createElementVNode("div", _hoisted_15, [
231
+ createElementVNode("span", _hoisted_16, [
232
+ createElementVNode("span", null, toDisplayString(unref(textLength)), 1),
233
+ createTextVNode("/2000")
234
+ ]),
235
+ createElementVNode("button", {
236
+ class: "send-button",
237
+ onClick: handlerSendMsg
238
+ }, [
239
+ createVNode(_component_IconifyIconOffline, {
240
+ class: "icon",
241
+ icon: unref(data),
242
+ style: normalizeStyle({
243
+ color: unref(textLength) && !unref(sendLonding) ? "#1e56ea" : "#dbdbdb"
244
+ })
245
+ }, null, 8, ["icon", "style"])
246
+ ])
247
+ ])
248
+ ]),
249
+ unref(stopDialogue) ? (openBlock(), createElementBlock("div", _hoisted_17)) : createCommentVNode("", true)
250
+ ])
251
+ ])
252
+ ], 64);
253
+ };
254
+ }
255
+ });
256
+ export {
257
+ _sfc_main as default
258
+ };
@@ -0,0 +1,4 @@
1
+ const index_vue_vue_type_style_index_0_scoped_6c6f4a6e_lang = "";
2
+ export {
3
+ index_vue_vue_type_style_index_0_scoped_6c6f4a6e_lang 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 CopiFooter = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-a0bb8b78"]]);
4
+ const CopiFooter = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-0e191f08"]]);
5
5
  export {
6
6
  CopiFooter as default
7
7
  };
@@ -1,17 +1,12 @@
1
- import { defineComponent, openBlock, createElementBlock, createElementVNode, createVNode } from "vue";
2
- import NewTheme from "./components/NewTheme.vue.mjs";
3
- import SearchInput from "./components/SearchInput/index.vue.mjs";
1
+ import { defineComponent, openBlock, createElementBlock, createVNode } from "vue";
2
+ import SearchInput from "./SearchInput/index.vue.mjs";
4
3
  const _hoisted_1 = { class: "copilot-footer" };
5
- const _hoisted_2 = { class: "root" };
6
4
  const _sfc_main = /* @__PURE__ */ defineComponent({
7
5
  __name: "index",
8
6
  setup(__props) {
9
7
  return (_ctx, _cache) => {
10
8
  return openBlock(), createElementBlock("div", _hoisted_1, [
11
- createElementVNode("div", _hoisted_2, [
12
- createVNode(NewTheme),
13
- createVNode(SearchInput)
14
- ])
9
+ createVNode(SearchInput)
15
10
  ]);
16
11
  };
17
12
  }
@@ -1,4 +1,4 @@
1
- const index_vue_vue_type_style_index_0_scoped_a0bb8b78_lang = "";
1
+ const index_vue_vue_type_style_index_0_scoped_0e191f08_lang = "";
2
2
  export {
3
- index_vue_vue_type_style_index_0_scoped_a0bb8b78_lang as default
3
+ index_vue_vue_type_style_index_0_scoped_0e191f08_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-530737a8"]]);
4
+ const dialogue = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-c4a8f0ca"]]);
5
5
  export {
6
6
  dialogue as default
7
7
  };