@kg-ui/kg-ui-plus 0.0.16 → 0.0.17
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/dist/es/KgCopilot/CopiFooter/SearchInput/SelectPluginByKey.vue.mjs +1 -1
- package/dist/es/KgCopilot/CopiFooter/SearchInput/SelectPluginByKey.vue2.mjs +79 -47
- package/dist/es/KgCopilot/CopiFooter/SearchInput/SelectPluginByKey.vue3.mjs +2 -2
- package/dist/es/KgCopilot/CopiFooter/SearchInput/index.vue.mjs +1 -1
- package/dist/es/KgCopilot/CopiFooter/SearchInput/index.vue2.mjs +211 -76
- package/dist/es/KgCopilot/CopiFooter/SearchInput/index.vue3.mjs +2 -2
- package/dist/es/KgCopilot/CopiFooter/index.vue.mjs +1 -1
- package/dist/es/KgCopilot/CopiFooter/index.vue3.mjs +2 -2
- package/dist/es/KgCopilot/dialogue/index.vue.mjs +1 -1
- package/dist/es/KgCopilot/dialogue/index.vue2.mjs +78 -63
- package/dist/es/KgCopilot/dialogue/index.vue3.mjs +2 -2
- package/dist/es/KgCopilot/dialogue/messageParse/edit.vue.mjs +7 -0
- package/dist/es/KgCopilot/dialogue/messageParse/edit.vue2.mjs +148 -0
- package/dist/es/KgCopilot/dialogue/messageParse/edit.vue3.mjs +4 -0
- package/dist/es/KgCopilot/dialogue/messageParse/index.vue.mjs +7 -0
- package/dist/es/KgCopilot/dialogue/messageParse/index.vue2.mjs +105 -0
- package/dist/es/KgCopilot/dialogue/messageParse/index.vue3.mjs +4 -0
- package/dist/es/KgCopilot/dialogue/messageParse/readMd.vue.mjs +7 -0
- package/dist/es/KgCopilot/dialogue/{readMd.vue2.mjs → messageParse/readMd.vue2.mjs} +14 -9
- package/dist/es/KgCopilot/dialogue/messageParse/readMd.vue3.mjs +4 -0
- package/dist/es/KgCopilot/index.vue.mjs +1 -1
- package/dist/es/KgCopilot/index.vue3.mjs +2 -2
- package/dist/es/api/copilot.mjs +13 -0
- package/dist/es/directives/heighlight/index.mjs +4 -0
- package/dist/es/node_modules/.pnpm/@iconify-icons_ph@1.2.5/node_modules/@iconify-icons/ph/caret-down-fill.mjs +8 -0
- package/dist/es/node_modules/.pnpm/@iconify-icons_ph@1.2.5/node_modules/@iconify-icons/ph/note-pencil-bold.mjs +8 -0
- package/dist/es/node_modules/.pnpm/@vueuse_core@9.13.0_vue@3.2.45/node_modules/@vueuse/core/index.mjs +111 -0
- package/dist/es/node_modules/.pnpm/@vueuse_shared@9.13.0_vue@3.2.45/node_modules/@vueuse/shared/index.mjs +15 -0
- package/dist/es/store/modules/copilot.mjs +144 -61
- package/dist/es/style.css +1 -1
- package/dist/es/utils/home.mjs +9 -10
- package/package.json +2 -1
- package/dist/es/KgCopilot/CopiFooter/SearchInput/SelectPlugin.vue.mjs +0 -7
- package/dist/es/KgCopilot/CopiFooter/SearchInput/SelectPlugin.vue2.mjs +0 -113
- package/dist/es/KgCopilot/CopiFooter/SearchInput/SelectPlugin.vue3.mjs +0 -4
- package/dist/es/KgCopilot/dialogue/readMd.vue.mjs +0 -7
- package/dist/es/KgCopilot/dialogue/readMd.vue3.mjs +0 -4
- /package/dist/es/KgCopilot/dialogue/{mdInCode.mjs → messageParse/mdInCode.mjs} +0 -0
@@ -1,113 +0,0 @@
|
|
1
|
-
import { defineComponent, ref, watch, resolveComponent, openBlock, createElementBlock, createVNode, Transition, withCtx, withDirectives, createElementVNode, toDisplayString, unref, Fragment, renderList, normalizeClass, createBlock, createCommentVNode } from "vue";
|
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";
|
6
|
-
import { storeToRefs } from "pinia";
|
7
|
-
const _hoisted_1 = { class: "select-plugin-box" };
|
8
|
-
const _hoisted_2 = {
|
9
|
-
key: 0,
|
10
|
-
class: "selection"
|
11
|
-
};
|
12
|
-
const _hoisted_3 = { class: "input-container" };
|
13
|
-
const _hoisted_4 = { class: "plugin-number" };
|
14
|
-
const _hoisted_5 = { class: "plugin-content" };
|
15
|
-
const _hoisted_6 = ["onClick", "onMouseover"];
|
16
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
17
|
-
__name: "SelectPlugin",
|
18
|
-
props: {
|
19
|
-
isShowSelection: { type: Boolean }
|
20
|
-
},
|
21
|
-
emits: ["closePluginByoutside"],
|
22
|
-
setup(__props, { emit }) {
|
23
|
-
const CopilotStore = useCopilotStoreHook();
|
24
|
-
const { setCheckedPluginList } = CopilotStore;
|
25
|
-
const { checkedPluginByBtn, plugins } = storeToRefs(CopilotStore);
|
26
|
-
const selectPluginList = ref([]);
|
27
|
-
watch(
|
28
|
-
() => plugins.value,
|
29
|
-
() => {
|
30
|
-
selectPluginList.value = plugins.value;
|
31
|
-
},
|
32
|
-
{
|
33
|
-
immediate: true
|
34
|
-
}
|
35
|
-
);
|
36
|
-
const onClickOutside = () => {
|
37
|
-
emit("closePluginByoutside");
|
38
|
-
};
|
39
|
-
const choosePlugin = (plugin) => {
|
40
|
-
setCheckedPluginList(plugin);
|
41
|
-
};
|
42
|
-
const searchPlugin = debounce((event) => {
|
43
|
-
const target = event.target;
|
44
|
-
const filteredPlugins = plugins.value.filter(
|
45
|
-
(item) => item.name.includes(target.value)
|
46
|
-
);
|
47
|
-
selectPluginList.value = filteredPlugins.length > 0 ? filteredPlugins : plugins.value;
|
48
|
-
});
|
49
|
-
const hoverIndex = ref(null);
|
50
|
-
const showButton = (index) => {
|
51
|
-
hoverIndex.value = index;
|
52
|
-
};
|
53
|
-
const hideButton = () => {
|
54
|
-
hoverIndex.value = null;
|
55
|
-
};
|
56
|
-
return (_ctx, _cache) => {
|
57
|
-
const _component_IconifyIconOffline = resolveComponent("IconifyIconOffline");
|
58
|
-
return openBlock(), createElementBlock("div", _hoisted_1, [
|
59
|
-
createVNode(Transition, { name: "fade-scale" }, {
|
60
|
-
default: withCtx(() => [
|
61
|
-
__props.isShowSelection ? withDirectives((openBlock(), createElementBlock("div", _hoisted_2, [
|
62
|
-
createElementVNode("div", _hoisted_3, [
|
63
|
-
createElementVNode("div", _hoisted_4, [
|
64
|
-
createElementVNode("span", null, "已选用" + toDisplayString(unref(checkedPluginByBtn).length) + "/" + toDisplayString(unref(plugins).length < 3 ? unref(plugins).length : 3) + "个插件", 1)
|
65
|
-
]),
|
66
|
-
createElementVNode("input", {
|
67
|
-
type: "text",
|
68
|
-
placeholder: "请输入插件名",
|
69
|
-
class: "select-input",
|
70
|
-
onInput: _cache[0] || (_cache[0] = //@ts-ignore
|
71
|
-
(...args) => unref(searchPlugin) && unref(searchPlugin)(...args))
|
72
|
-
}, null, 32)
|
73
|
-
]),
|
74
|
-
createElementVNode("div", _hoisted_5, [
|
75
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(selectPluginList.value, (plugin, index) => {
|
76
|
-
return openBlock(), createElementBlock("div", {
|
77
|
-
key: index,
|
78
|
-
class: "plugin-item",
|
79
|
-
onClick: ($event) => choosePlugin(plugin),
|
80
|
-
onMouseover: ($event) => showButton(index),
|
81
|
-
onMouseleave: _cache[1] || (_cache[1] = ($event) => hideButton())
|
82
|
-
}, [
|
83
|
-
createElementVNode("span", null, toDisplayString(plugin.name), 1),
|
84
|
-
createElementVNode("div", {
|
85
|
-
class: normalizeClass(["select-radio", [unref(checkedPluginByBtn).includes(plugin) && "active-radio"]])
|
86
|
-
}, [
|
87
|
-
unref(checkedPluginByBtn).includes(plugin) || hoverIndex.value === index ? (openBlock(), createBlock(_component_IconifyIconOffline, {
|
88
|
-
key: 0,
|
89
|
-
class: "icon",
|
90
|
-
icon: unref(data)
|
91
|
-
}, null, 8, ["icon"])) : createCommentVNode("", true)
|
92
|
-
], 2)
|
93
|
-
], 40, _hoisted_6);
|
94
|
-
}), 128))
|
95
|
-
])
|
96
|
-
])), [
|
97
|
-
[
|
98
|
-
unref(ClickOutside),
|
99
|
-
onClickOutside,
|
100
|
-
void 0,
|
101
|
-
{ stop: true }
|
102
|
-
]
|
103
|
-
]) : createCommentVNode("", true)
|
104
|
-
]),
|
105
|
-
_: 1
|
106
|
-
})
|
107
|
-
]);
|
108
|
-
};
|
109
|
-
}
|
110
|
-
});
|
111
|
-
export {
|
112
|
-
_sfc_main as default
|
113
|
-
};
|
@@ -1,7 +0,0 @@
|
|
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-a1ec27a2"]]);
|
5
|
-
export {
|
6
|
-
readMd as default
|
7
|
-
};
|
File without changes
|