@kg-ui/kg-ui-plus 0.0.0
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.
- package/README.md +39 -0
- package/dist/es/KgCopilot/CopiContent/AnswerHead.vue.mjs +16 -0
- package/dist/es/KgCopilot/CopiContent/AnswerHead.vue2.mjs +4 -0
- package/dist/es/KgCopilot/CopiContent/UserHead.vue.mjs +26 -0
- package/dist/es/KgCopilot/CopiContent/UserHead.vue2.mjs +4 -0
- package/dist/es/KgCopilot/CopiFooter/components/NewTheme.vue.mjs +7 -0
- package/dist/es/KgCopilot/CopiFooter/components/NewTheme.vue2.mjs +49 -0
- package/dist/es/KgCopilot/CopiFooter/components/NewTheme.vue3.mjs +4 -0
- package/dist/es/KgCopilot/CopiFooter/components/SearchInput/SelectPlugin.vue.mjs +7 -0
- package/dist/es/KgCopilot/CopiFooter/components/SearchInput/SelectPlugin.vue2.mjs +94 -0
- package/dist/es/KgCopilot/CopiFooter/components/SearchInput/SelectPlugin.vue3.mjs +4 -0
- package/dist/es/KgCopilot/CopiFooter/components/SearchInput/SpeechControl.vue.mjs +7 -0
- package/dist/es/KgCopilot/CopiFooter/components/SearchInput/SpeechControl.vue2.mjs +33 -0
- package/dist/es/KgCopilot/CopiFooter/components/SearchInput/SpeechControl.vue3.mjs +4 -0
- package/dist/es/KgCopilot/CopiFooter/components/SearchInput/Upload.vue.mjs +7 -0
- package/dist/es/KgCopilot/CopiFooter/components/SearchInput/Upload.vue2.mjs +140 -0
- package/dist/es/KgCopilot/CopiFooter/components/SearchInput/Upload.vue3.mjs +4 -0
- package/dist/es/KgCopilot/CopiFooter/components/SearchInput/index.vue.mjs +7 -0
- package/dist/es/KgCopilot/CopiFooter/components/SearchInput/index.vue2.mjs +131 -0
- package/dist/es/KgCopilot/CopiFooter/components/SearchInput/index.vue3.mjs +4 -0
- package/dist/es/KgCopilot/CopiFooter/index.vue.mjs +7 -0
- package/dist/es/KgCopilot/CopiFooter/index.vue2.mjs +21 -0
- package/dist/es/KgCopilot/CopiFooter/index.vue3.mjs +4 -0
- package/dist/es/KgCopilot/dialogue.vue.mjs +7 -0
- package/dist/es/KgCopilot/dialogue.vue2.mjs +131 -0
- package/dist/es/KgCopilot/dialogue.vue3.mjs +4 -0
- package/dist/es/KgCopilot/index.vue.mjs +7 -0
- package/dist/es/KgCopilot/index.vue2.mjs +49 -0
- package/dist/es/KgCopilot/index.vue3.mjs +4 -0
- package/dist/es/KgCopilot/mdInCode.mjs +56 -0
- package/dist/es/KgCopilot/readMd.vue.mjs +7 -0
- package/dist/es/KgCopilot/readMd.vue2.mjs +87 -0
- package/dist/es/KgCopilot/readMd.vue3.mjs +4 -0
- package/dist/es/ReIcon/index.mjs +11 -0
- package/dist/es/ReIcon/src/iconfont.mjs +46 -0
- package/dist/es/ReIcon/src/iconifyIconOffline.mjs +30 -0
- package/dist/es/ReIcon/src/iconifyIconOnline.mjs +29 -0
- package/dist/es/_virtual/___vite-browser-external.mjs +6 -0
- package/dist/es/_virtual/__vite-browser-external.mjs +4 -0
- package/dist/es/_virtual/_commonjsHelpers.mjs +34 -0
- package/dist/es/_virtual/_plugin-vue_export-helper.mjs +10 -0
- package/dist/es/_virtual/index.mjs +13 -0
- package/dist/es/api/project.mjs +51 -0
- package/dist/es/directives/heighlight/index.mjs +69 -0
- package/dist/es/directives/index.mjs +4 -0
- package/dist/es/home/LFilter/FilterArea.vue.mjs +7 -0
- package/dist/es/home/LFilter/FilterArea.vue2.mjs +507 -0
- package/dist/es/home/LFilter/FilterArea.vue3.mjs +4 -0
- package/dist/es/home/LFilter/FilterHead.vue.mjs +129 -0
- package/dist/es/home/LFilter/FilterHead.vue2.mjs +4 -0
- package/dist/es/home/LFilter/FilterItem.vue.mjs +7 -0
- package/dist/es/home/LFilter/FilterItem.vue2.mjs +114 -0
- package/dist/es/home/LFilter/FilterItem.vue3.mjs +4 -0
- package/dist/es/home/LFilter/FilterItemIcon.vue.mjs +7 -0
- package/dist/es/home/LFilter/FilterItemIcon.vue2.mjs +171 -0
- package/dist/es/home/LFilter/FilterItemIcon.vue3.mjs +4 -0
- package/dist/es/home/LFilter/index.vue.mjs +17 -0
- package/dist/es/home/LFilter/index.vue2.mjs +4 -0
- package/dist/es/home/LProject/index.vue.mjs +7 -0
- package/dist/es/home/LProject/index.vue2.mjs +70 -0
- package/dist/es/home/LProject/index.vue3.mjs +4 -0
- package/dist/es/home/index.vue.mjs +7 -0
- package/dist/es/home/index.vue2.mjs +80 -0
- package/dist/es/home/index.vue3.mjs +4 -0
- package/dist/es/index.mjs +36 -0
- package/dist/es/node_modules/.pnpm/@iconify-icons_ep@1.2.7/node_modules/@iconify-icons/ep/check.mjs +8 -0
- package/dist/es/node_modules/.pnpm/@iconify-icons_ep@1.2.7/node_modules/@iconify-icons/ep/circle-plus.mjs +8 -0
- package/dist/es/node_modules/.pnpm/@iconify-icons_ep@1.2.7/node_modules/@iconify-icons/ep/close.mjs +8 -0
- package/dist/es/node_modules/.pnpm/@iconify-icons_ep@1.2.7/node_modules/@iconify-icons/ep/microphone.mjs +8 -0
- package/dist/es/node_modules/.pnpm/@iconify-icons_ep@1.2.7/node_modules/@iconify-icons/ep/paperclip.mjs +8 -0
- package/dist/es/node_modules/.pnpm/@iconify-icons_ep@1.2.7/node_modules/@iconify-icons/ep/promotion.mjs +8 -0
- package/dist/es/node_modules/.pnpm/@iconify-icons_ep@1.2.7/node_modules/@iconify-icons/ep/upload.mjs +8 -0
- package/dist/es/node_modules/.pnpm/@iconify-icons_ph@1.2.5/node_modules/@iconify-icons/ph/copy-simple.mjs +8 -0
- package/dist/es/node_modules/.pnpm/@iconify-icons_ph@1.2.5/node_modules/@iconify-icons/ph/speaker-high-light.mjs +8 -0
- package/dist/es/node_modules/.pnpm/@iconify-icons_ph@1.2.5/node_modules/@iconify-icons/ph/thumbs-down-thin.mjs +8 -0
- package/dist/es/node_modules/.pnpm/@iconify-icons_ph@1.2.5/node_modules/@iconify-icons/ph/thumbs-up-thin.mjs +8 -0
- package/dist/es/node_modules/.pnpm/@iconify-icons_ph@1.2.5/node_modules/@iconify-icons/ph/warning-bold.mjs +8 -0
- package/dist/es/node_modules/.pnpm/@iconify-icons_ri@1.2.3/node_modules/@iconify-icons/ri/add-line.mjs +8 -0
- package/dist/es/node_modules/.pnpm/@iconify-icons_ri@1.2.3/node_modules/@iconify-icons/ri/arrow-down-s-line.mjs +8 -0
- package/dist/es/node_modules/.pnpm/@iconify-icons_ri@1.2.3/node_modules/@iconify-icons/ri/arrow-up-s-line.mjs +8 -0
- package/dist/es/node_modules/.pnpm/@iconify-icons_ri@1.2.3/node_modules/@iconify-icons/ri/check-fill.mjs +8 -0
- package/dist/es/node_modules/.pnpm/@iconify-icons_ri@1.2.3/node_modules/@iconify-icons/ri/download-line.mjs +8 -0
- package/dist/es/node_modules/.pnpm/@iconify-icons_ri@1.2.3/node_modules/@iconify-icons/ri/more-2-fill.mjs +8 -0
- package/dist/es/node_modules/.pnpm/@iconify_vue@4.0.0_vue@3.2.45/node_modules/@iconify/vue/dist/iconify.mjs +1702 -0
- package/dist/es/node_modules/.pnpm/@iconify_vue@4.0.0_vue@3.2.45/node_modules/@iconify/vue/dist/offline.mjs +436 -0
- package/dist/es/node_modules/.pnpm/@pureadmin_utils@1.8.5_vue@3.2.45/node_modules/@pureadmin/utils/dist/index.mjs +70 -0
- package/dist/es/node_modules/.pnpm/call-bind@1.0.7/node_modules/call-bind/callBound.mjs +16 -0
- package/dist/es/node_modules/.pnpm/call-bind@1.0.7/node_modules/call-bind/index.mjs +36 -0
- package/dist/es/node_modules/.pnpm/define-data-property@1.1.4/node_modules/define-data-property/index.mjs +48 -0
- package/dist/es/node_modules/.pnpm/dompurify@3.0.10/node_modules/dompurify/dist/purify.es.mjs +949 -0
- package/dist/es/node_modules/.pnpm/es-define-property@1.0.0/node_modules/es-define-property/index.mjs +22 -0
- package/dist/es/node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/eval.mjs +4 -0
- package/dist/es/node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/index.mjs +4 -0
- package/dist/es/node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/range.mjs +4 -0
- package/dist/es/node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/ref.mjs +4 -0
- package/dist/es/node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/syntax.mjs +4 -0
- package/dist/es/node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/type.mjs +4 -0
- package/dist/es/node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/uri.mjs +4 -0
- package/dist/es/node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/implementation.mjs +72 -0
- package/dist/es/node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/index.mjs +6 -0
- package/dist/es/node_modules/.pnpm/get-intrinsic@1.2.4/node_modules/get-intrinsic/index.mjs +320 -0
- package/dist/es/node_modules/.pnpm/gopd@1.0.1/node_modules/gopd/index.mjs +14 -0
- package/dist/es/node_modules/.pnpm/has-property-descriptors@1.0.2/node_modules/has-property-descriptors/index.mjs +19 -0
- package/dist/es/node_modules/.pnpm/has-proto@1.0.3/node_modules/has-proto/index.mjs +11 -0
- package/dist/es/node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/index.mjs +21 -0
- package/dist/es/node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/shams.mjs +48 -0
- package/dist/es/node_modules/.pnpm/hasown@2.0.2/node_modules/hasown/index.mjs +8 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/core.mjs +5 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/apache.mjs +91 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/bash.mjs +377 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/basic.mjs +221 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/c.mjs +280 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/css.mjs +732 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/dart.mjs +247 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/django.mjs +47 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/dns.mjs +71 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/dos.mjs +160 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/dust.mjs +38 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/erlang.mjs +176 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/go.mjs +135 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/http.mjs +89 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/java.mjs +254 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/javascript.mjs +698 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/json.mjs +40 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/markdown.mjs +227 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/nginx.mjs +144 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/php.mjs +589 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/python.mjs +414 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/ruby.mjs +414 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/stylus.mjs +766 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/swift.mjs +832 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/typescript.mjs +788 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/es/languages/xml.mjs +227 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/lib/core.mjs +1580 -0
- package/dist/es/node_modules/.pnpm/highlight.js@11.9.0/node_modules/highlight.js/styles/paraiso-light.css.mjs +4 -0
- package/dist/es/node_modules/.pnpm/marked@12.0.1/node_modules/marked/lib/marked.esm.mjs +2045 -0
- package/dist/es/node_modules/.pnpm/object-inspect@1.13.1/node_modules/object-inspect/index.mjs +514 -0
- package/dist/es/node_modules/.pnpm/pinyin-match@1.2.4/node_modules/pinyin-match/es/main.mjs +124 -0
- package/dist/es/node_modules/.pnpm/qs@6.11.0/node_modules/qs/lib/formats.mjs +22 -0
- package/dist/es/node_modules/.pnpm/qs@6.11.0/node_modules/qs/lib/index.mjs +14 -0
- package/dist/es/node_modules/.pnpm/qs@6.11.0/node_modules/qs/lib/parse.mjs +199 -0
- package/dist/es/node_modules/.pnpm/qs@6.11.0/node_modules/qs/lib/stringify.mjs +262 -0
- package/dist/es/node_modules/.pnpm/qs@6.11.0/node_modules/qs/lib/utils.mjs +196 -0
- package/dist/es/node_modules/.pnpm/set-function-length@1.2.2/node_modules/set-function-length/index.mjs +54 -0
- package/dist/es/node_modules/.pnpm/side-channel@1.0.6/node_modules/side-channel/index.mjs +115 -0
- package/dist/es/store/index.mjs +8 -0
- package/dist/es/store/modules/copilot.mjs +108 -0
- package/dist/es/store/modules/filters.mjs +346 -0
- package/dist/es/store/modules/types.mjs +19 -0
- package/dist/es/style/index.scss.mjs +4 -0
- package/dist/es/style/tailwind.css.mjs +4 -0
- package/dist/es/style.css +1 -0
- package/dist/es/utils/home.mjs +129 -0
- package/dist/es/utils/http/index.mjs +90 -0
- package/dist/es/utils/message.mjs +42 -0
- package/package.json +124 -0
@@ -0,0 +1,21 @@
|
|
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";
|
4
|
+
const _hoisted_1 = { class: "copilot-footer" };
|
5
|
+
const _hoisted_2 = { class: "root" };
|
6
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
7
|
+
__name: "index",
|
8
|
+
setup(__props) {
|
9
|
+
return (_ctx, _cache) => {
|
10
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
11
|
+
createElementVNode("div", _hoisted_2, [
|
12
|
+
createVNode(NewTheme),
|
13
|
+
createVNode(SearchInput)
|
14
|
+
])
|
15
|
+
]);
|
16
|
+
};
|
17
|
+
}
|
18
|
+
});
|
19
|
+
export {
|
20
|
+
_sfc_main as default
|
21
|
+
};
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import _sfc_main from "./dialogue.vue2.mjs";
|
2
|
+
import "./dialogue.vue3.mjs";
|
3
|
+
import _export_sfc from "../_virtual/_plugin-vue_export-helper.mjs";
|
4
|
+
const dialogue = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-b543a8d4"]]);
|
5
|
+
export {
|
6
|
+
dialogue as default
|
7
|
+
};
|
@@ -0,0 +1,131 @@
|
|
1
|
+
import { defineComponent, ref, resolveComponent, openBlock, createElementBlock, Fragment, renderList, unref, createElementVNode, createBlock, normalizeClass, createVNode, createCommentVNode, withDirectives, createTextVNode, vShow, pushScopeId, popScopeId } from "vue";
|
2
|
+
import readMd from "./readMd.vue.mjs";
|
3
|
+
import UserHead from "./CopiContent/UserHead.vue.mjs";
|
4
|
+
import AnswerHead from "./CopiContent/AnswerHead.vue.mjs";
|
5
|
+
import data$2 from "../node_modules/.pnpm/@iconify-icons_ph@1.2.5/node_modules/@iconify-icons/ph/copy-simple.mjs";
|
6
|
+
import data$4 from "../node_modules/.pnpm/@iconify-icons_ph@1.2.5/node_modules/@iconify-icons/ph/speaker-high-light.mjs";
|
7
|
+
import data from "../node_modules/.pnpm/@iconify-icons_ph@1.2.5/node_modules/@iconify-icons/ph/thumbs-up-thin.mjs";
|
8
|
+
import data$1 from "../node_modules/.pnpm/@iconify-icons_ph@1.2.5/node_modules/@iconify-icons/ph/thumbs-down-thin.mjs";
|
9
|
+
import data$3 from "../node_modules/.pnpm/@iconify-icons_ri@1.2.3/node_modules/@iconify-icons/ri/download-line.mjs";
|
10
|
+
import data$5 from "../node_modules/.pnpm/@iconify-icons_ph@1.2.5/node_modules/@iconify-icons/ph/warning-bold.mjs";
|
11
|
+
import { useCopilotStoreHook } from "../store/modules/copilot.mjs";
|
12
|
+
import { storeToRefs } from "pinia";
|
13
|
+
const _withScopeId = (n) => (pushScopeId("data-v-b543a8d4"), n = n(), popScopeId(), n);
|
14
|
+
const _hoisted_1 = { class: "msg-head" };
|
15
|
+
const _hoisted_2 = {
|
16
|
+
key: 0,
|
17
|
+
class: "icon-operates"
|
18
|
+
};
|
19
|
+
const _hoisted_3 = {
|
20
|
+
class: "icon-item",
|
21
|
+
title: "点赞"
|
22
|
+
};
|
23
|
+
const _hoisted_4 = {
|
24
|
+
class: "icon-item",
|
25
|
+
title: "不喜欢"
|
26
|
+
};
|
27
|
+
const _hoisted_5 = {
|
28
|
+
class: "icon-item",
|
29
|
+
title: "复制"
|
30
|
+
};
|
31
|
+
const _hoisted_6 = {
|
32
|
+
class: "icon-item",
|
33
|
+
title: "导出"
|
34
|
+
};
|
35
|
+
const _hoisted_7 = {
|
36
|
+
class: "icon-item",
|
37
|
+
title: "播放"
|
38
|
+
};
|
39
|
+
const _hoisted_8 = { class: "stop-dialogue" };
|
40
|
+
const _hoisted_9 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", { class: "gray-line" }, null, -1));
|
41
|
+
const _hoisted_10 = { class: "title" };
|
42
|
+
const _hoisted_11 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", { class: "gray-line" }, null, -1));
|
43
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
44
|
+
__name: "dialogue",
|
45
|
+
setup(__props) {
|
46
|
+
const copilotStore = useCopilotStoreHook();
|
47
|
+
const { msgList, stopDialogue } = storeToRefs(copilotStore);
|
48
|
+
const maxLength = 1e6;
|
49
|
+
const printOk = () => {
|
50
|
+
if (msgList.value.length >= maxLength)
|
51
|
+
stopDialogue.value = true;
|
52
|
+
};
|
53
|
+
const messageBox = ref();
|
54
|
+
const scrollToBottom = (force = false) => {
|
55
|
+
if (force) {
|
56
|
+
messageBox.value.scrollTop = messageBox.value.scrollHeight;
|
57
|
+
return;
|
58
|
+
}
|
59
|
+
if (messageBox.value.scrollHeight - messageBox.value.scrollTop - messageBox.value.clientHeight < 60) {
|
60
|
+
messageBox.value.scrollTop = messageBox.value.scrollHeight - messageBox.value.clientHeight;
|
61
|
+
}
|
62
|
+
};
|
63
|
+
return (_ctx, _cache) => {
|
64
|
+
const _component_IconifyIconOffline = resolveComponent("IconifyIconOffline");
|
65
|
+
return openBlock(), createElementBlock("div", {
|
66
|
+
class: "message-box",
|
67
|
+
ref_key: "messageBox",
|
68
|
+
ref: messageBox
|
69
|
+
}, [
|
70
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(msgList), (item, index) => {
|
71
|
+
return openBlock(), createElementBlock("div", {
|
72
|
+
class: "message-group",
|
73
|
+
key: index
|
74
|
+
}, [
|
75
|
+
createElementVNode("div", _hoisted_1, [
|
76
|
+
item.isSend ? (openBlock(), createBlock(UserHead, { key: 0 })) : (openBlock(), createBlock(AnswerHead, { key: 1 }))
|
77
|
+
]),
|
78
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(item.msg, (msg, index2) => {
|
79
|
+
return openBlock(), createElementBlock("div", {
|
80
|
+
class: normalizeClass({ "msg-content": true }),
|
81
|
+
key: index2
|
82
|
+
}, [
|
83
|
+
createVNode(readMd, {
|
84
|
+
text: msg,
|
85
|
+
onPrintOk: printOk,
|
86
|
+
isPrinting: item.needPrinting,
|
87
|
+
"onUpdate:isPrinting": ($event) => item.needPrinting = $event,
|
88
|
+
showCursor: !item.isSend,
|
89
|
+
scrollToBottom
|
90
|
+
}, null, 8, ["text", "isPrinting", "onUpdate:isPrinting", "showCursor"]),
|
91
|
+
!item.isSend ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
92
|
+
createElementVNode("div", _hoisted_3, [
|
93
|
+
createVNode(_component_IconifyIconOffline, { icon: unref(data) }, null, 8, ["icon"])
|
94
|
+
]),
|
95
|
+
createElementVNode("div", _hoisted_4, [
|
96
|
+
createVNode(_component_IconifyIconOffline, { icon: unref(data$1) }, null, 8, ["icon"])
|
97
|
+
]),
|
98
|
+
createElementVNode("div", _hoisted_5, [
|
99
|
+
createVNode(_component_IconifyIconOffline, { icon: unref(data$2) }, null, 8, ["icon"])
|
100
|
+
]),
|
101
|
+
createElementVNode("div", _hoisted_6, [
|
102
|
+
createVNode(_component_IconifyIconOffline, { icon: unref(data$3) }, null, 8, ["icon"])
|
103
|
+
]),
|
104
|
+
createElementVNode("div", _hoisted_7, [
|
105
|
+
createVNode(_component_IconifyIconOffline, { icon: unref(data$4) }, null, 8, ["icon"])
|
106
|
+
])
|
107
|
+
])) : createCommentVNode("", true)
|
108
|
+
]);
|
109
|
+
}), 128))
|
110
|
+
]);
|
111
|
+
}), 128)),
|
112
|
+
withDirectives(createElementVNode("div", _hoisted_8, [
|
113
|
+
_hoisted_9,
|
114
|
+
createElementVNode("div", _hoisted_10, [
|
115
|
+
createVNode(_component_IconifyIconOffline, {
|
116
|
+
icon: unref(data$5),
|
117
|
+
class: "stop-icon"
|
118
|
+
}, null, 8, ["icon"]),
|
119
|
+
createTextVNode(" 很抱歉,此对话已达到其限制。让我们开始新的聊天。 ")
|
120
|
+
]),
|
121
|
+
_hoisted_11
|
122
|
+
], 512), [
|
123
|
+
[vShow, unref(stopDialogue)]
|
124
|
+
])
|
125
|
+
], 512);
|
126
|
+
};
|
127
|
+
}
|
128
|
+
});
|
129
|
+
export {
|
130
|
+
_sfc_main as default
|
131
|
+
};
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import _sfc_main from "./index.vue2.mjs";
|
2
|
+
import "./index.vue3.mjs";
|
3
|
+
import _export_sfc from "../_virtual/_plugin-vue_export-helper.mjs";
|
4
|
+
const KgCopilot = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-2a6ea990"]]);
|
5
|
+
export {
|
6
|
+
KgCopilot as default
|
7
|
+
};
|
@@ -0,0 +1,49 @@
|
|
1
|
+
import { defineComponent, openBlock, createElementBlock, createElementVNode, createVNode, toRaw } from "vue";
|
2
|
+
import dialogue from "./dialogue.vue.mjs";
|
3
|
+
import CopiFooter from "./CopiFooter/index.vue.mjs";
|
4
|
+
import { useCopilotStoreHook } from "../store/modules/copilot.mjs";
|
5
|
+
import { storeToRefs } from "pinia";
|
6
|
+
import "../style/tailwind.css.mjs";
|
7
|
+
import "../style/index.scss.mjs";
|
8
|
+
const _hoisted_1 = {
|
9
|
+
class: "wrap",
|
10
|
+
style: { "height": "100%" }
|
11
|
+
};
|
12
|
+
const _hoisted_2 = { class: "copilot-box" };
|
13
|
+
const _hoisted_3 = { class: "copilot-bottom-box" };
|
14
|
+
const __default__ = defineComponent({
|
15
|
+
name: "KgCopilot"
|
16
|
+
});
|
17
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
18
|
+
...__default__,
|
19
|
+
setup(__props, { expose }) {
|
20
|
+
const CopilotStore = useCopilotStoreHook();
|
21
|
+
const { searchText, msgList } = storeToRefs(CopilotStore);
|
22
|
+
const { setSearchText, setMsgList } = CopilotStore;
|
23
|
+
const getSearchText = () => {
|
24
|
+
return searchText.value;
|
25
|
+
};
|
26
|
+
const getMsgList = () => {
|
27
|
+
return toRaw(msgList.value);
|
28
|
+
};
|
29
|
+
expose({
|
30
|
+
getSearchText,
|
31
|
+
setSearchText,
|
32
|
+
getMsgList,
|
33
|
+
setMsgList
|
34
|
+
});
|
35
|
+
return (_ctx, _cache) => {
|
36
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
37
|
+
createElementVNode("div", _hoisted_2, [
|
38
|
+
createVNode(dialogue),
|
39
|
+
createElementVNode("div", _hoisted_3, [
|
40
|
+
createVNode(CopiFooter)
|
41
|
+
])
|
42
|
+
])
|
43
|
+
]);
|
44
|
+
};
|
45
|
+
}
|
46
|
+
});
|
47
|
+
export {
|
48
|
+
_sfc_main as default
|
49
|
+
};
|
@@ -0,0 +1,56 @@
|
|
1
|
+
const States = {
|
2
|
+
text: 0,
|
3
|
+
// 文本状态
|
4
|
+
codeStartSm: 1,
|
5
|
+
// 小代码块状态
|
6
|
+
codeStartBig: 2
|
7
|
+
// 大代码块状态
|
8
|
+
};
|
9
|
+
function isInCode(text) {
|
10
|
+
let state = States.text;
|
11
|
+
let source = text;
|
12
|
+
let inStart = true;
|
13
|
+
while (source) {
|
14
|
+
const char = source.charAt(0);
|
15
|
+
switch (state) {
|
16
|
+
case States.text:
|
17
|
+
if (/^\n?```/.test(source)) {
|
18
|
+
if (inStart || source.startsWith("\n")) {
|
19
|
+
state = States.codeStartBig;
|
20
|
+
}
|
21
|
+
source = source.replace(/^\n?```/, "");
|
22
|
+
} else if (char === "\\") {
|
23
|
+
source = source.slice(2);
|
24
|
+
} else if (char === "`") {
|
25
|
+
state = States.codeStartSm;
|
26
|
+
source = source.slice(1);
|
27
|
+
} else {
|
28
|
+
source = source.slice(1);
|
29
|
+
}
|
30
|
+
inStart = false;
|
31
|
+
break;
|
32
|
+
case States.codeStartSm:
|
33
|
+
if (char === "`") {
|
34
|
+
state = States.text;
|
35
|
+
source = source.slice(1);
|
36
|
+
} else if (char === "\\") {
|
37
|
+
source = source.slice(2);
|
38
|
+
} else {
|
39
|
+
source = source.slice(1);
|
40
|
+
}
|
41
|
+
break;
|
42
|
+
case States.codeStartBig:
|
43
|
+
if (/^\n```/.test(source)) {
|
44
|
+
state = States.text;
|
45
|
+
source = source.replace(/^\n```/, "");
|
46
|
+
} else {
|
47
|
+
source = source.slice(1);
|
48
|
+
}
|
49
|
+
break;
|
50
|
+
}
|
51
|
+
}
|
52
|
+
return state !== States.text;
|
53
|
+
}
|
54
|
+
export {
|
55
|
+
isInCode as default
|
56
|
+
};
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import _sfc_main from "./readMd.vue2.mjs";
|
2
|
+
import "./readMd.vue3.mjs";
|
3
|
+
import _export_sfc from "../_virtual/_plugin-vue_export-helper.mjs";
|
4
|
+
const readMd = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-9a928e0e"]]);
|
5
|
+
export {
|
6
|
+
readMd as default
|
7
|
+
};
|
@@ -0,0 +1,87 @@
|
|
1
|
+
import { defineComponent, ref, onMounted, resolveDirective, openBlock, createElementBlock, withDirectives, createElementVNode } 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";
|
4
|
+
import isInCode from "./mdInCode.mjs";
|
5
|
+
import { useCopilotStoreHook } from "../store/modules/copilot.mjs";
|
6
|
+
import { storeToRefs } from "pinia";
|
7
|
+
const _hoisted_1 = ["innerHTML"];
|
8
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
9
|
+
__name: "readMd",
|
10
|
+
props: {
|
11
|
+
// 输入的 markdown 文本
|
12
|
+
text: {
|
13
|
+
type: String,
|
14
|
+
default: ""
|
15
|
+
},
|
16
|
+
// 是否需要显示光标?比如在消息流结束后是不需要显示光标的
|
17
|
+
showCursor: {
|
18
|
+
type: Boolean,
|
19
|
+
default: false
|
20
|
+
},
|
21
|
+
speed: {
|
22
|
+
type: Number,
|
23
|
+
default: 100
|
24
|
+
},
|
25
|
+
isPrinting: {
|
26
|
+
type: Boolean,
|
27
|
+
default: false
|
28
|
+
},
|
29
|
+
scrollToBottom: {
|
30
|
+
type: Function,
|
31
|
+
default: () => {
|
32
|
+
}
|
33
|
+
}
|
34
|
+
},
|
35
|
+
emits: ["update:isPrinting", "printOk"],
|
36
|
+
setup(__props, { emit: emits }) {
|
37
|
+
const props = __props;
|
38
|
+
const CopilotStore = useCopilotStoreHook();
|
39
|
+
const { sendLonding } = storeToRefs(CopilotStore);
|
40
|
+
const { setSendLonding } = CopilotStore;
|
41
|
+
const vHtml = ref("");
|
42
|
+
const isShowCursor = ref(false);
|
43
|
+
let printInterval = null;
|
44
|
+
const printMessage = (message) => {
|
45
|
+
let index = 0;
|
46
|
+
printInterval = setInterval(() => {
|
47
|
+
vHtml.value += message[index];
|
48
|
+
isShowCursor.value = props.showCursor && !isInCode(vHtml.value);
|
49
|
+
index++;
|
50
|
+
props.scrollToBottom();
|
51
|
+
if (index === message.length || sendLonding.value === false) {
|
52
|
+
clearInterval(printInterval);
|
53
|
+
printInterval = null;
|
54
|
+
emits("update:isPrinting", false);
|
55
|
+
emits("printOk");
|
56
|
+
setSendLonding(false);
|
57
|
+
}
|
58
|
+
}, props.speed);
|
59
|
+
};
|
60
|
+
const getHtml = () => {
|
61
|
+
return purify.sanitize(marked.parse(props.text));
|
62
|
+
};
|
63
|
+
if (props.isPrinting) {
|
64
|
+
printMessage(getHtml());
|
65
|
+
} else {
|
66
|
+
vHtml.value = getHtml();
|
67
|
+
emits("printOk");
|
68
|
+
}
|
69
|
+
onMounted(() => {
|
70
|
+
props.scrollToBottom(true);
|
71
|
+
});
|
72
|
+
return (_ctx, _cache) => {
|
73
|
+
const _directive_highlight = resolveDirective("highlight");
|
74
|
+
return openBlock(), createElementBlock("div", null, [
|
75
|
+
withDirectives(createElementVNode("div", {
|
76
|
+
innerHTML: vHtml.value,
|
77
|
+
class: "markdown"
|
78
|
+
}, null, 8, _hoisted_1), [
|
79
|
+
[_directive_highlight]
|
80
|
+
])
|
81
|
+
]);
|
82
|
+
};
|
83
|
+
}
|
84
|
+
});
|
85
|
+
export {
|
86
|
+
_sfc_main as default
|
87
|
+
};
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import iconifyIconOffline from "./src/iconifyIconOffline.mjs";
|
2
|
+
import iconifyIconOnline from "./src/iconifyIconOnline.mjs";
|
3
|
+
import fontIcon from "./src/iconfont.mjs";
|
4
|
+
const IconifyIconOffline = iconifyIconOffline;
|
5
|
+
const IconifyIconOnline = iconifyIconOnline;
|
6
|
+
const FontIcon = fontIcon;
|
7
|
+
export {
|
8
|
+
FontIcon,
|
9
|
+
IconifyIconOffline,
|
10
|
+
IconifyIconOnline
|
11
|
+
};
|
@@ -0,0 +1,46 @@
|
|
1
|
+
import { defineComponent, h } from "vue";
|
2
|
+
const fontIcon = defineComponent({
|
3
|
+
name: "FontIcon",
|
4
|
+
props: {
|
5
|
+
icon: {
|
6
|
+
type: String,
|
7
|
+
default: ""
|
8
|
+
}
|
9
|
+
},
|
10
|
+
render() {
|
11
|
+
const attrs = this.$attrs;
|
12
|
+
if (Object.keys(attrs).includes("uni") || (attrs == null ? void 0 : attrs.iconType) === "uni") {
|
13
|
+
return h(
|
14
|
+
"i",
|
15
|
+
{
|
16
|
+
class: "iconfont",
|
17
|
+
...attrs
|
18
|
+
},
|
19
|
+
this.icon
|
20
|
+
);
|
21
|
+
} else if (Object.keys(attrs).includes("svg") || (attrs == null ? void 0 : attrs.iconType) === "svg") {
|
22
|
+
return h(
|
23
|
+
"svg",
|
24
|
+
{
|
25
|
+
class: "icon-svg",
|
26
|
+
"aria-hidden": true
|
27
|
+
},
|
28
|
+
{
|
29
|
+
default: () => [
|
30
|
+
h("use", {
|
31
|
+
"xlink:href": `#${this.icon}`
|
32
|
+
})
|
33
|
+
]
|
34
|
+
}
|
35
|
+
);
|
36
|
+
} else {
|
37
|
+
return h("i", {
|
38
|
+
class: `iconfont ${this.icon}`,
|
39
|
+
...attrs
|
40
|
+
});
|
41
|
+
}
|
42
|
+
}
|
43
|
+
});
|
44
|
+
export {
|
45
|
+
fontIcon as default
|
46
|
+
};
|
@@ -0,0 +1,30 @@
|
|
1
|
+
import { defineComponent, h } from "vue";
|
2
|
+
import { Icon, addIcon } from "../../node_modules/.pnpm/@iconify_vue@4.0.0_vue@3.2.45/node_modules/@iconify/vue/dist/offline.mjs";
|
3
|
+
const iconifyIconOffline = defineComponent({
|
4
|
+
name: "IconifyIconOffline",
|
5
|
+
components: { IconifyIcon: Icon },
|
6
|
+
props: {
|
7
|
+
icon: {
|
8
|
+
default: null
|
9
|
+
}
|
10
|
+
},
|
11
|
+
render() {
|
12
|
+
if (typeof this.icon === "object")
|
13
|
+
addIcon(this.icon, this.icon);
|
14
|
+
const attrs = this.$attrs;
|
15
|
+
return h(
|
16
|
+
Icon,
|
17
|
+
{
|
18
|
+
icon: this.icon,
|
19
|
+
style: (attrs == null ? void 0 : attrs.style) ? Object.assign(attrs.style, { outline: "none" }) : { outline: "none" },
|
20
|
+
...attrs
|
21
|
+
},
|
22
|
+
{
|
23
|
+
default: () => []
|
24
|
+
}
|
25
|
+
);
|
26
|
+
}
|
27
|
+
});
|
28
|
+
export {
|
29
|
+
iconifyIconOffline as default
|
30
|
+
};
|
@@ -0,0 +1,29 @@
|
|
1
|
+
import { defineComponent, h } from "vue";
|
2
|
+
import { Icon } from "../../node_modules/.pnpm/@iconify_vue@4.0.0_vue@3.2.45/node_modules/@iconify/vue/dist/iconify.mjs";
|
3
|
+
const iconifyIconOnline = defineComponent({
|
4
|
+
name: "IconifyIconOnline",
|
5
|
+
components: { IconifyIcon: Icon },
|
6
|
+
props: {
|
7
|
+
icon: {
|
8
|
+
type: String,
|
9
|
+
default: ""
|
10
|
+
}
|
11
|
+
},
|
12
|
+
render() {
|
13
|
+
const attrs = this.$attrs;
|
14
|
+
return h(
|
15
|
+
Icon,
|
16
|
+
{
|
17
|
+
icon: `${this.icon}`,
|
18
|
+
style: (attrs == null ? void 0 : attrs.style) ? Object.assign(attrs.style, { outline: "none" }) : { outline: "none" },
|
19
|
+
...attrs
|
20
|
+
},
|
21
|
+
{
|
22
|
+
default: () => []
|
23
|
+
}
|
24
|
+
);
|
25
|
+
}
|
26
|
+
});
|
27
|
+
export {
|
28
|
+
iconifyIconOnline as default
|
29
|
+
};
|
@@ -0,0 +1,34 @@
|
|
1
|
+
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
2
|
+
function getAugmentedNamespace(n) {
|
3
|
+
if (n.__esModule)
|
4
|
+
return n;
|
5
|
+
var f = n.default;
|
6
|
+
if (typeof f == "function") {
|
7
|
+
var a = function a2() {
|
8
|
+
if (this instanceof a2) {
|
9
|
+
var args = [null];
|
10
|
+
args.push.apply(args, arguments);
|
11
|
+
var Ctor = Function.bind.apply(f, args);
|
12
|
+
return new Ctor();
|
13
|
+
}
|
14
|
+
return f.apply(this, arguments);
|
15
|
+
};
|
16
|
+
a.prototype = f.prototype;
|
17
|
+
} else
|
18
|
+
a = {};
|
19
|
+
Object.defineProperty(a, "__esModule", { value: true });
|
20
|
+
Object.keys(n).forEach(function(k) {
|
21
|
+
var d = Object.getOwnPropertyDescriptor(n, k);
|
22
|
+
Object.defineProperty(a, k, d.get ? d : {
|
23
|
+
enumerable: true,
|
24
|
+
get: function() {
|
25
|
+
return n[k];
|
26
|
+
}
|
27
|
+
});
|
28
|
+
});
|
29
|
+
return a;
|
30
|
+
}
|
31
|
+
export {
|
32
|
+
commonjsGlobal,
|
33
|
+
getAugmentedNamespace
|
34
|
+
};
|
@@ -0,0 +1,51 @@
|
|
1
|
+
import { http } from "../utils/http/index.mjs";
|
2
|
+
const baseUrlApi = (url) => `/api/${url}`;
|
3
|
+
const getProList = (params) => {
|
4
|
+
return http.request("get", baseUrlApi("app/getAppList"), {
|
5
|
+
params
|
6
|
+
});
|
7
|
+
};
|
8
|
+
const getXinyuanHeadFn = (params) => {
|
9
|
+
return http.request(
|
10
|
+
"get",
|
11
|
+
baseUrlApi("appSourceCol/getAllList"),
|
12
|
+
{
|
13
|
+
params
|
14
|
+
}
|
15
|
+
);
|
16
|
+
};
|
17
|
+
const getXinyuanFilterFn = (params) => {
|
18
|
+
return http.request("get", baseUrlApi("appSourceCol/list"), {
|
19
|
+
params,
|
20
|
+
headers: {
|
21
|
+
noProgress: true
|
22
|
+
}
|
23
|
+
});
|
24
|
+
};
|
25
|
+
const getXinyuanFilterMapFn = (params, data) => {
|
26
|
+
return http.request(
|
27
|
+
"post",
|
28
|
+
baseUrlApi("appSourceMapping/getSourceMapping"),
|
29
|
+
{
|
30
|
+
params
|
31
|
+
},
|
32
|
+
{
|
33
|
+
data
|
34
|
+
}
|
35
|
+
);
|
36
|
+
};
|
37
|
+
const getFilterListApi = (params) => {
|
38
|
+
return http.request(
|
39
|
+
"get",
|
40
|
+
baseUrlApi("appcategory/getAppCategoryList"),
|
41
|
+
{ params }
|
42
|
+
);
|
43
|
+
};
|
44
|
+
export {
|
45
|
+
baseUrlApi,
|
46
|
+
getFilterListApi,
|
47
|
+
getProList,
|
48
|
+
getXinyuanFilterFn,
|
49
|
+
getXinyuanFilterMapFn,
|
50
|
+
getXinyuanHeadFn
|
51
|
+
};
|