@kg-ui/kg-ui-plus 0.1.30 → 0.1.32
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/CopiCanvas/FilePreview.vue.mjs +7 -0
- package/dist/es/KgCopilot/CopiCanvas/FilePreview.vue2.mjs +81 -0
- package/dist/es/KgCopilot/CopiCanvas/FilePreview.vue3.mjs +4 -0
- package/dist/es/KgCopilot/CopiCanvas/FileSkeletion.vue.mjs +96 -0
- package/dist/es/KgCopilot/CopiCanvas/FileSkeletion.vue2.mjs +4 -0
- package/dist/es/KgCopilot/CopiCanvas/InitWrap.vue.mjs +7 -0
- package/dist/es/KgCopilot/CopiCanvas/InitWrap.vue2.mjs +41 -0
- package/dist/es/KgCopilot/CopiCanvas/InitWrap.vue3.mjs +4 -0
- package/dist/es/KgCopilot/CopiCanvas/index.vue.mjs +7 -0
- package/dist/es/KgCopilot/CopiCanvas/index.vue2.mjs +52 -0
- package/dist/es/KgCopilot/CopiCanvas/index.vue3.mjs +4 -0
- package/dist/es/KgCopilot/CopiFooter/SearchInput/InputFootTool.vue.mjs +7 -0
- package/dist/es/KgCopilot/CopiFooter/SearchInput/InputFootTool.vue2.mjs +61 -0
- package/dist/es/KgCopilot/CopiFooter/SearchInput/InputFootTool.vue3.mjs +4 -0
- package/dist/es/KgCopilot/CopiFooter/SearchInput/SelectPluginByKey.vue2.mjs +1 -1
- package/dist/es/KgCopilot/CopiFooter/SearchInput/index.vue.mjs +1 -1
- package/dist/es/KgCopilot/CopiFooter/SearchInput/index.vue2.mjs +34 -22
- 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/SuggestMessage.vue.mjs +7 -0
- package/dist/es/KgCopilot/dialogue/SuggestMessage.vue2.mjs +50 -0
- package/dist/es/KgCopilot/dialogue/SuggestMessage.vue3.mjs +4 -0
- package/dist/es/KgCopilot/dialogue/index.vue.mjs +1 -1
- package/dist/es/KgCopilot/dialogue/index.vue2.mjs +10 -4
- package/dist/es/KgCopilot/dialogue/index.vue3.mjs +2 -2
- package/dist/es/KgCopilot/dialogue/messageParse/fileBox.vue.mjs +19 -5
- package/dist/es/KgCopilot/dialogue/messageParse/fileBox.vue2.mjs +2 -2
- package/dist/es/KgCopilot/dialogue/messageParse/readMd.vue2.mjs +1 -1
- package/dist/es/KgCopilot/historyRecord/index.vue.mjs +1 -1
- package/dist/es/KgCopilot/historyRecord/index.vue2.mjs +6 -6
- package/dist/es/KgCopilot/historyRecord/index.vue3.mjs +2 -2
- package/dist/es/KgCopilot/index.vue.mjs +1 -1
- package/dist/es/KgCopilot/index.vue2.mjs +62 -39
- package/dist/es/KgCopilot/index.vue3.mjs +2 -2
- package/dist/es/_virtual/_commonjs-dynamic-modules.mjs +6 -0
- package/dist/es/_virtual/jszip.min.mjs +13 -0
- package/dist/es/api/copilot.mjs +8 -0
- package/dist/es/assets/empty.png.mjs +4 -0
- package/dist/es/directives/heighlight/index.mjs +27 -27
- package/dist/es/home/LFilter/FilterHead.vue.mjs +1 -1
- package/dist/es/node_modules/.pnpm/@iconify-icons_ep@1.2.12/node_modules/@iconify-icons/ep/folder-opened.mjs +8 -0
- package/dist/es/node_modules/.pnpm/@iconify-icons_ep@1.2.12/node_modules/@iconify-icons/ep/notebook.mjs +8 -0
- package/dist/es/node_modules/.pnpm/@iconify-icons_ep@1.2.12/node_modules/@iconify-icons/ep/reading.mjs +8 -0
- package/dist/es/node_modules/.pnpm/@vueuse_core@9.13.0_vue@3.2.45/node_modules/@vueuse/core/index.mjs +8 -1
- package/dist/es/node_modules/.pnpm/@vueuse_shared@9.13.0_vue@3.2.45/node_modules/@vueuse/shared/index.mjs +115 -2
- package/dist/es/node_modules/.pnpm/call-bind-apply-helpers@1.0.1/node_modules/call-bind-apply-helpers/actualApply.mjs +12 -0
- package/dist/es/node_modules/.pnpm/call-bind-apply-helpers@1.0.1/node_modules/call-bind-apply-helpers/functionApply.mjs +12 -0
- package/dist/es/node_modules/.pnpm/call-bind-apply-helpers@1.0.1/node_modules/call-bind-apply-helpers/functionCall.mjs +4 -0
- package/dist/es/node_modules/.pnpm/call-bind-apply-helpers@1.0.1/node_modules/call-bind-apply-helpers/index.mjs +17 -0
- package/dist/es/node_modules/.pnpm/call-bind-apply-helpers@1.0.1/node_modules/call-bind-apply-helpers/reflectApply.mjs +4 -0
- package/dist/es/node_modules/.pnpm/call-bound@1.0.3/node_modules/call-bound/index.mjs +18 -0
- package/dist/es/node_modules/.pnpm/docx-preview@0.3.3/node_modules/docx-preview/dist/docx-preview.mjs +3877 -0
- package/dist/es/node_modules/.pnpm/{dompurify@3.1.5 → dompurify@3.2.3}/node_modules/dompurify/dist/purify.es.mjs +78 -87
- package/dist/es/node_modules/.pnpm/dunder-proto@1.0.1/node_modules/dunder-proto/get.mjs +37 -0
- package/dist/es/node_modules/.pnpm/es-define-property@1.0.1/node_modules/es-define-property/index.mjs +12 -0
- package/dist/es/node_modules/.pnpm/es-object-atoms@1.0.0/node_modules/es-object-atoms/index.mjs +4 -0
- package/dist/es/node_modules/.pnpm/{get-intrinsic@1.2.4 → get-intrinsic@1.2.6}/node_modules/get-intrinsic/index.mjs +43 -24
- package/dist/es/node_modules/.pnpm/gopd@1.2.0/node_modules/gopd/gOPD.mjs +4 -0
- package/dist/es/node_modules/.pnpm/gopd@1.2.0/node_modules/gopd/index.mjs +13 -0
- package/dist/es/node_modules/.pnpm/has-symbols@1.1.0/node_modules/has-symbols/index.mjs +29 -0
- package/dist/es/node_modules/.pnpm/has-symbols@1.1.0/node_modules/has-symbols/shams.mjs +59 -0
- package/dist/es/node_modules/.pnpm/hasown@2.0.2/node_modules/hasown/index.mjs +13 -5
- package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/es/languages/apache.mjs +4 -0
- package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/es/languages/bash.mjs +20 -2
- package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/es/languages/basic.mjs +7 -1
- package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/es/languages/c.mjs +19 -4
- package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/es/languages/css.mjs +214 -8
- package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/es/languages/dart.mjs +10 -2
- package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/es/languages/erlang.mjs +48 -6
- package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/es/languages/go.mjs +23 -3
- package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/es/languages/java.mjs +3 -1
- package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/es/languages/javascript.mjs +15 -11
- package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/es/languages/json.mjs +1 -0
- package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/es/languages/markdown.mjs +7 -1
- package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/es/languages/php.mjs +16 -2
- package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/es/languages/python.mjs +3 -1
- package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/es/languages/ruby.mjs +1 -1
- package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/es/languages/stylus.mjs +214 -8
- package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/es/languages/swift.mjs +60 -14
- package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/es/languages/typescript.mjs +45 -18
- package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/lib/core.mjs +8 -8
- package/dist/es/node_modules/.pnpm/jszip@3.10.1/node_modules/jszip/dist/jszip.min.mjs +2649 -0
- package/dist/es/node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/abs.mjs +4 -0
- package/dist/es/node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/floor.mjs +4 -0
- package/dist/es/node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/max.mjs +4 -0
- package/dist/es/node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/min.mjs +4 -0
- package/dist/es/node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/pow.mjs +4 -0
- package/dist/es/node_modules/.pnpm/{object-inspect@1.13.1 → object-inspect@1.13.3}/node_modules/object-inspect/index.mjs +17 -4
- package/dist/es/node_modules/.pnpm/qs@6.11.0/node_modules/qs/lib/stringify.mjs +1 -1
- package/dist/es/node_modules/.pnpm/side-channel-list@1.0.0/node_modules/side-channel-list/index.mjs +92 -0
- package/dist/es/node_modules/.pnpm/side-channel-map@1.0.1/node_modules/side-channel-map/index.mjs +56 -0
- package/dist/es/node_modules/.pnpm/side-channel-weakmap@1.0.2/node_modules/side-channel-weakmap/index.mjs +74 -0
- package/dist/es/node_modules/.pnpm/side-channel@1.1.0/node_modules/side-channel/index.mjs +40 -0
- package/dist/es/store/modules/copilot.mjs +68 -8
- package/dist/es/style.css +1 -1
- package/dist/es/utils/http/index.mjs +1 -1
- package/package.json +3 -2
- package/dist/es/_virtual/index.mjs +0 -13
- package/dist/es/node_modules/.pnpm/call-bind@1.0.7/node_modules/call-bind/callBound.mjs +0 -16
- package/dist/es/node_modules/.pnpm/call-bind@1.0.7/node_modules/call-bind/index.mjs +0 -36
- package/dist/es/node_modules/.pnpm/define-data-property@1.1.4/node_modules/define-data-property/index.mjs +0 -48
- package/dist/es/node_modules/.pnpm/es-define-property@1.0.0/node_modules/es-define-property/index.mjs +0 -22
- package/dist/es/node_modules/.pnpm/gopd@1.0.1/node_modules/gopd/index.mjs +0 -14
- package/dist/es/node_modules/.pnpm/has-property-descriptors@1.0.2/node_modules/has-property-descriptors/index.mjs +0 -19
- package/dist/es/node_modules/.pnpm/has-proto@1.0.3/node_modules/has-proto/index.mjs +0 -11
- package/dist/es/node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/index.mjs +0 -21
- package/dist/es/node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/shams.mjs +0 -48
- package/dist/es/node_modules/.pnpm/set-function-length@1.2.2/node_modules/set-function-length/index.mjs +0 -54
- package/dist/es/node_modules/.pnpm/side-channel@1.0.6/node_modules/side-channel/index.mjs +0 -115
- /package/dist/es/node_modules/.pnpm/{@iconify-icons_ep@1.2.7 → @iconify-icons_ep@1.2.12}/node_modules/@iconify-icons/ep/arrow-left.mjs +0 -0
- /package/dist/es/node_modules/.pnpm/{@iconify-icons_ep@1.2.7 → @iconify-icons_ep@1.2.12}/node_modules/@iconify-icons/ep/arrow-right.mjs +0 -0
- /package/dist/es/node_modules/.pnpm/{@iconify-icons_ep@1.2.7 → @iconify-icons_ep@1.2.12}/node_modules/@iconify-icons/ep/check.mjs +0 -0
- /package/dist/es/node_modules/.pnpm/{@iconify-icons_ep@1.2.7 → @iconify-icons_ep@1.2.12}/node_modules/@iconify-icons/ep/close.mjs +0 -0
- /package/dist/es/node_modules/.pnpm/{@iconify-icons_ep@1.2.7 → @iconify-icons_ep@1.2.12}/node_modules/@iconify-icons/ep/delete.mjs +0 -0
- /package/dist/es/node_modules/.pnpm/{@iconify-icons_ep@1.2.7 → @iconify-icons_ep@1.2.12}/node_modules/@iconify-icons/ep/edit.mjs +0 -0
- /package/dist/es/node_modules/.pnpm/{@iconify-icons_ep@1.2.7 → @iconify-icons_ep@1.2.12}/node_modules/@iconify-icons/ep/promotion.mjs +0 -0
- /package/dist/es/node_modules/.pnpm/{@iconify-icons_ep@1.2.7 → @iconify-icons_ep@1.2.12}/node_modules/@iconify-icons/ep/search.mjs +0 -0
- /package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/es/core.mjs +0 -0
- /package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/es/languages/django.mjs +0 -0
- /package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/es/languages/dns.mjs +0 -0
- /package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/es/languages/dos.mjs +0 -0
- /package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/es/languages/dust.mjs +0 -0
- /package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/es/languages/http.mjs +0 -0
- /package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/es/languages/nginx.mjs +0 -0
- /package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/es/languages/xml.mjs +0 -0
- /package/dist/es/node_modules/.pnpm/{highlight.js@11.9.0 → highlight.js@11.11.1}/node_modules/highlight.js/styles/sunburst.css.mjs +0 -0
@@ -54,9 +54,19 @@ function addNumericSeparator(num, str) {
|
|
54
54
|
var utilInspect = require$$0;
|
55
55
|
var inspectCustom = utilInspect.custom;
|
56
56
|
var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;
|
57
|
+
var quotes = {
|
58
|
+
__proto__: null,
|
59
|
+
"double": '"',
|
60
|
+
single: "'"
|
61
|
+
};
|
62
|
+
var quoteREs = {
|
63
|
+
__proto__: null,
|
64
|
+
"double": /(["\\])/g,
|
65
|
+
single: /(['\\])/g
|
66
|
+
};
|
57
67
|
var objectInspect = function inspect_(obj, options, depth, seen) {
|
58
68
|
var opts = options || {};
|
59
|
-
if (has(opts, "quoteStyle") && (
|
69
|
+
if (has(opts, "quoteStyle") && !has(quotes, opts.quoteStyle)) {
|
60
70
|
throw new TypeError('option "quoteStyle" must be "single" or "double"');
|
61
71
|
}
|
62
72
|
if (has(opts, "maxStringLength") && (typeof opts.maxStringLength === "number" ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity : opts.maxStringLength !== null)) {
|
@@ -216,7 +226,7 @@ var objectInspect = function inspect_(obj, options, depth, seen) {
|
|
216
226
|
if (typeof window !== "undefined" && obj === window) {
|
217
227
|
return "{ [object Window] }";
|
218
228
|
}
|
219
|
-
if (obj === commonjsGlobal) {
|
229
|
+
if (typeof globalThis !== "undefined" && obj === globalThis || typeof commonjsGlobal !== "undefined" && obj === commonjsGlobal) {
|
220
230
|
return "{ [object globalThis] }";
|
221
231
|
}
|
222
232
|
if (!isDate(obj) && !isRegExp(obj)) {
|
@@ -237,7 +247,8 @@ var objectInspect = function inspect_(obj, options, depth, seen) {
|
|
237
247
|
return String(obj);
|
238
248
|
};
|
239
249
|
function wrapQuotes(s, defaultStyle, opts) {
|
240
|
-
var
|
250
|
+
var style = opts.quoteStyle || defaultStyle;
|
251
|
+
var quoteChar = quotes[style];
|
241
252
|
return quoteChar + s + quoteChar;
|
242
253
|
}
|
243
254
|
function quote(s) {
|
@@ -412,7 +423,9 @@ function inspectString(str, opts) {
|
|
412
423
|
var trailer = "... " + remaining + " more character" + (remaining > 1 ? "s" : "");
|
413
424
|
return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;
|
414
425
|
}
|
415
|
-
var
|
426
|
+
var quoteRE = quoteREs[opts.quoteStyle || "single"];
|
427
|
+
quoteRE.lastIndex = 0;
|
428
|
+
var s = $replace.call($replace.call(str, quoteRE, "\\$1"), /[\x00-\x1f]/g, lowbyte);
|
416
429
|
return wrapQuotes(s, "single", opts);
|
417
430
|
}
|
418
431
|
function lowbyte(c) {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import sideChannel from "../../../../side-channel@1.0
|
1
|
+
import sideChannel from "../../../../side-channel@1.1.0/node_modules/side-channel/index.mjs";
|
2
2
|
import utils$1 from "./utils.mjs";
|
3
3
|
import formats$1 from "./formats.mjs";
|
4
4
|
var getSideChannel = sideChannel;
|
package/dist/es/node_modules/.pnpm/side-channel-list@1.0.0/node_modules/side-channel-list/index.mjs
ADDED
@@ -0,0 +1,92 @@
|
|
1
|
+
import objectInspect from "../../../object-inspect@1.13.3/node_modules/object-inspect/index.mjs";
|
2
|
+
import type from "../../../es-errors@1.3.0/node_modules/es-errors/type.mjs";
|
3
|
+
var inspect = objectInspect;
|
4
|
+
var $TypeError = type;
|
5
|
+
var listGetNode = function(list, key, isDelete) {
|
6
|
+
var prev = list;
|
7
|
+
var curr;
|
8
|
+
for (; (curr = prev.next) != null; prev = curr) {
|
9
|
+
if (curr.key === key) {
|
10
|
+
prev.next = curr.next;
|
11
|
+
if (!isDelete) {
|
12
|
+
curr.next = /** @type {NonNullable<typeof list.next>} */
|
13
|
+
list.next;
|
14
|
+
list.next = curr;
|
15
|
+
}
|
16
|
+
return curr;
|
17
|
+
}
|
18
|
+
}
|
19
|
+
};
|
20
|
+
var listGet = function(objects, key) {
|
21
|
+
if (!objects) {
|
22
|
+
return void 0;
|
23
|
+
}
|
24
|
+
var node = listGetNode(objects, key);
|
25
|
+
return node && node.value;
|
26
|
+
};
|
27
|
+
var listSet = function(objects, key, value) {
|
28
|
+
var node = listGetNode(objects, key);
|
29
|
+
if (node) {
|
30
|
+
node.value = value;
|
31
|
+
} else {
|
32
|
+
objects.next = /** @type {import('./list.d.ts').ListNode<typeof value, typeof key>} */
|
33
|
+
{
|
34
|
+
// eslint-disable-line no-param-reassign, no-extra-parens
|
35
|
+
key,
|
36
|
+
next: objects.next,
|
37
|
+
value
|
38
|
+
};
|
39
|
+
}
|
40
|
+
};
|
41
|
+
var listHas = function(objects, key) {
|
42
|
+
if (!objects) {
|
43
|
+
return false;
|
44
|
+
}
|
45
|
+
return !!listGetNode(objects, key);
|
46
|
+
};
|
47
|
+
var listDelete = function(objects, key) {
|
48
|
+
if (objects) {
|
49
|
+
return listGetNode(objects, key, true);
|
50
|
+
}
|
51
|
+
};
|
52
|
+
var sideChannelList = function getSideChannelList() {
|
53
|
+
var $o;
|
54
|
+
var channel = {
|
55
|
+
assert: function(key) {
|
56
|
+
if (!channel.has(key)) {
|
57
|
+
throw new $TypeError("Side channel does not contain " + inspect(key));
|
58
|
+
}
|
59
|
+
},
|
60
|
+
"delete": function(key) {
|
61
|
+
var root = $o && $o.next;
|
62
|
+
var deletedNode = listDelete($o, key);
|
63
|
+
if (deletedNode && root && root === deletedNode) {
|
64
|
+
$o = void 0;
|
65
|
+
}
|
66
|
+
return !!deletedNode;
|
67
|
+
},
|
68
|
+
get: function(key) {
|
69
|
+
return listGet($o, key);
|
70
|
+
},
|
71
|
+
has: function(key) {
|
72
|
+
return listHas($o, key);
|
73
|
+
},
|
74
|
+
set: function(key, value) {
|
75
|
+
if (!$o) {
|
76
|
+
$o = {
|
77
|
+
next: void 0
|
78
|
+
};
|
79
|
+
}
|
80
|
+
listSet(
|
81
|
+
/** @type {NonNullable<typeof $o>} */
|
82
|
+
$o,
|
83
|
+
key,
|
84
|
+
value
|
85
|
+
);
|
86
|
+
}
|
87
|
+
};
|
88
|
+
return channel;
|
89
|
+
};
|
90
|
+
export {
|
91
|
+
sideChannelList as default
|
92
|
+
};
|
package/dist/es/node_modules/.pnpm/side-channel-map@1.0.1/node_modules/side-channel-map/index.mjs
ADDED
@@ -0,0 +1,56 @@
|
|
1
|
+
import getIntrinsic from "../../../get-intrinsic@1.2.6/node_modules/get-intrinsic/index.mjs";
|
2
|
+
import callBound$1 from "../../../call-bound@1.0.3/node_modules/call-bound/index.mjs";
|
3
|
+
import objectInspect from "../../../object-inspect@1.13.3/node_modules/object-inspect/index.mjs";
|
4
|
+
import type from "../../../es-errors@1.3.0/node_modules/es-errors/type.mjs";
|
5
|
+
var GetIntrinsic = getIntrinsic;
|
6
|
+
var callBound = callBound$1;
|
7
|
+
var inspect = objectInspect;
|
8
|
+
var $TypeError = type;
|
9
|
+
var $Map = GetIntrinsic("%Map%", true);
|
10
|
+
var $mapGet = callBound("Map.prototype.get", true);
|
11
|
+
var $mapSet = callBound("Map.prototype.set", true);
|
12
|
+
var $mapHas = callBound("Map.prototype.has", true);
|
13
|
+
var $mapDelete = callBound("Map.prototype.delete", true);
|
14
|
+
var $mapSize = callBound("Map.prototype.size", true);
|
15
|
+
var sideChannelMap = !!$Map && /** @type {Exclude<import('.'), false>} */
|
16
|
+
function getSideChannelMap() {
|
17
|
+
var $m;
|
18
|
+
var channel = {
|
19
|
+
assert: function(key) {
|
20
|
+
if (!channel.has(key)) {
|
21
|
+
throw new $TypeError("Side channel does not contain " + inspect(key));
|
22
|
+
}
|
23
|
+
},
|
24
|
+
"delete": function(key) {
|
25
|
+
if ($m) {
|
26
|
+
var result = $mapDelete($m, key);
|
27
|
+
if ($mapSize($m) === 0) {
|
28
|
+
$m = void 0;
|
29
|
+
}
|
30
|
+
return result;
|
31
|
+
}
|
32
|
+
return false;
|
33
|
+
},
|
34
|
+
get: function(key) {
|
35
|
+
if ($m) {
|
36
|
+
return $mapGet($m, key);
|
37
|
+
}
|
38
|
+
},
|
39
|
+
has: function(key) {
|
40
|
+
if ($m) {
|
41
|
+
return $mapHas($m, key);
|
42
|
+
}
|
43
|
+
return false;
|
44
|
+
},
|
45
|
+
set: function(key, value) {
|
46
|
+
if (!$m) {
|
47
|
+
$m = new $Map();
|
48
|
+
}
|
49
|
+
$mapSet($m, key, value);
|
50
|
+
}
|
51
|
+
};
|
52
|
+
return channel;
|
53
|
+
};
|
54
|
+
export {
|
55
|
+
sideChannelMap as default
|
56
|
+
};
|
@@ -0,0 +1,74 @@
|
|
1
|
+
import getIntrinsic from "../../../get-intrinsic@1.2.6/node_modules/get-intrinsic/index.mjs";
|
2
|
+
import callBound$1 from "../../../call-bound@1.0.3/node_modules/call-bound/index.mjs";
|
3
|
+
import objectInspect from "../../../object-inspect@1.13.3/node_modules/object-inspect/index.mjs";
|
4
|
+
import sideChannelMap from "../../../side-channel-map@1.0.1/node_modules/side-channel-map/index.mjs";
|
5
|
+
import type from "../../../es-errors@1.3.0/node_modules/es-errors/type.mjs";
|
6
|
+
var GetIntrinsic = getIntrinsic;
|
7
|
+
var callBound = callBound$1;
|
8
|
+
var inspect = objectInspect;
|
9
|
+
var getSideChannelMap = sideChannelMap;
|
10
|
+
var $TypeError = type;
|
11
|
+
var $WeakMap = GetIntrinsic("%WeakMap%", true);
|
12
|
+
var $weakMapGet = callBound("WeakMap.prototype.get", true);
|
13
|
+
var $weakMapSet = callBound("WeakMap.prototype.set", true);
|
14
|
+
var $weakMapHas = callBound("WeakMap.prototype.has", true);
|
15
|
+
var $weakMapDelete = callBound("WeakMap.prototype.delete", true);
|
16
|
+
var sideChannelWeakmap = $WeakMap ? (
|
17
|
+
/** @type {Exclude<import('.'), false>} */
|
18
|
+
function getSideChannelWeakMap() {
|
19
|
+
var $wm;
|
20
|
+
var $m;
|
21
|
+
var channel = {
|
22
|
+
assert: function(key) {
|
23
|
+
if (!channel.has(key)) {
|
24
|
+
throw new $TypeError("Side channel does not contain " + inspect(key));
|
25
|
+
}
|
26
|
+
},
|
27
|
+
"delete": function(key) {
|
28
|
+
if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) {
|
29
|
+
if ($wm) {
|
30
|
+
return $weakMapDelete($wm, key);
|
31
|
+
}
|
32
|
+
} else if (getSideChannelMap) {
|
33
|
+
if ($m) {
|
34
|
+
return $m["delete"](key);
|
35
|
+
}
|
36
|
+
}
|
37
|
+
return false;
|
38
|
+
},
|
39
|
+
get: function(key) {
|
40
|
+
if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) {
|
41
|
+
if ($wm) {
|
42
|
+
return $weakMapGet($wm, key);
|
43
|
+
}
|
44
|
+
}
|
45
|
+
return $m && $m.get(key);
|
46
|
+
},
|
47
|
+
has: function(key) {
|
48
|
+
if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) {
|
49
|
+
if ($wm) {
|
50
|
+
return $weakMapHas($wm, key);
|
51
|
+
}
|
52
|
+
}
|
53
|
+
return !!$m && $m.has(key);
|
54
|
+
},
|
55
|
+
set: function(key, value) {
|
56
|
+
if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) {
|
57
|
+
if (!$wm) {
|
58
|
+
$wm = new $WeakMap();
|
59
|
+
}
|
60
|
+
$weakMapSet($wm, key, value);
|
61
|
+
} else if (getSideChannelMap) {
|
62
|
+
if (!$m) {
|
63
|
+
$m = getSideChannelMap();
|
64
|
+
}
|
65
|
+
$m.set(key, value);
|
66
|
+
}
|
67
|
+
}
|
68
|
+
};
|
69
|
+
return channel;
|
70
|
+
}
|
71
|
+
) : getSideChannelMap;
|
72
|
+
export {
|
73
|
+
sideChannelWeakmap as default
|
74
|
+
};
|
@@ -0,0 +1,40 @@
|
|
1
|
+
import type from "../../../es-errors@1.3.0/node_modules/es-errors/type.mjs";
|
2
|
+
import objectInspect from "../../../object-inspect@1.13.3/node_modules/object-inspect/index.mjs";
|
3
|
+
import sideChannelList from "../../../side-channel-list@1.0.0/node_modules/side-channel-list/index.mjs";
|
4
|
+
import sideChannelMap from "../../../side-channel-map@1.0.1/node_modules/side-channel-map/index.mjs";
|
5
|
+
import sideChannelWeakmap from "../../../side-channel-weakmap@1.0.2/node_modules/side-channel-weakmap/index.mjs";
|
6
|
+
var $TypeError = type;
|
7
|
+
var inspect = objectInspect;
|
8
|
+
var getSideChannelList = sideChannelList;
|
9
|
+
var getSideChannelMap = sideChannelMap;
|
10
|
+
var getSideChannelWeakMap = sideChannelWeakmap;
|
11
|
+
var makeChannel = getSideChannelWeakMap || getSideChannelMap || getSideChannelList;
|
12
|
+
var sideChannel = function getSideChannel() {
|
13
|
+
var $channelData;
|
14
|
+
var channel = {
|
15
|
+
assert: function(key) {
|
16
|
+
if (!channel.has(key)) {
|
17
|
+
throw new $TypeError("Side channel does not contain " + inspect(key));
|
18
|
+
}
|
19
|
+
},
|
20
|
+
"delete": function(key) {
|
21
|
+
return !!$channelData && $channelData["delete"](key);
|
22
|
+
},
|
23
|
+
get: function(key) {
|
24
|
+
return $channelData && $channelData.get(key);
|
25
|
+
},
|
26
|
+
has: function(key) {
|
27
|
+
return !!$channelData && $channelData.has(key);
|
28
|
+
},
|
29
|
+
set: function(key, value) {
|
30
|
+
if (!$channelData) {
|
31
|
+
$channelData = makeChannel();
|
32
|
+
}
|
33
|
+
$channelData.set(key, value);
|
34
|
+
}
|
35
|
+
};
|
36
|
+
return channel;
|
37
|
+
};
|
38
|
+
export {
|
39
|
+
sideChannel as default
|
40
|
+
};
|
@@ -14,6 +14,9 @@ var DataType = /* @__PURE__ */ ((DataType2) => {
|
|
14
14
|
const useCopilotStore = defineStore({
|
15
15
|
id: "kg-copilot",
|
16
16
|
state: () => ({
|
17
|
+
previewFileUrl: "",
|
18
|
+
canvasVisible: false,
|
19
|
+
suggest_message_list: [],
|
17
20
|
maxSendNum: 0,
|
18
21
|
useHistoryRecord: false,
|
19
22
|
knowledgeToken: "",
|
@@ -22,6 +25,7 @@ const useCopilotStore = defineStore({
|
|
22
25
|
intelligentAnalysisConfig: {},
|
23
26
|
defaultDeal: {},
|
24
27
|
placeholder: "输入“@”选择智能体,可通过上下键切换,回车选中",
|
28
|
+
isLittleCom: true,
|
25
29
|
plugins: [],
|
26
30
|
//智能体信息
|
27
31
|
currentPluginParams: {},
|
@@ -39,8 +43,9 @@ const useCopilotStore = defineStore({
|
|
39
43
|
requestSseing: false,
|
40
44
|
cancelsse: () => {
|
41
45
|
},
|
42
|
-
pluginsPayload: {}
|
46
|
+
pluginsPayload: {},
|
43
47
|
// 智能体负载(从外部设置)
|
48
|
+
fullscreen: false
|
44
49
|
}),
|
45
50
|
getters: {
|
46
51
|
// 选中插件的参数要求
|
@@ -72,8 +77,11 @@ const useCopilotStore = defineStore({
|
|
72
77
|
defaultDeal,
|
73
78
|
pluginsPayload = {},
|
74
79
|
useHistoryRecord,
|
75
|
-
knowledgeToken
|
80
|
+
knowledgeToken,
|
81
|
+
isLittleComponent
|
76
82
|
}) {
|
83
|
+
this.isLittleCom = isLittleComponent;
|
84
|
+
this.setFullScreen(!isLittleComponent);
|
77
85
|
this.plugins = plugins;
|
78
86
|
this.initText = initText;
|
79
87
|
this.aiName = aiName;
|
@@ -130,6 +138,16 @@ const useCopilotStore = defineStore({
|
|
130
138
|
}
|
131
139
|
];
|
132
140
|
},
|
141
|
+
changeCanvasVisible() {
|
142
|
+
this.canvasVisible = !this.canvasVisible;
|
143
|
+
},
|
144
|
+
openCanvasVisible() {
|
145
|
+
this.canvasVisible = true;
|
146
|
+
},
|
147
|
+
getPreviewFileUrl(url) {
|
148
|
+
const index = url.indexOf("/files/tools");
|
149
|
+
this.previewFileUrl = url.slice(index);
|
150
|
+
},
|
133
151
|
setCheckedPluginList(plugin) {
|
134
152
|
this.checkedPluginByBtn = this.checkedPluginByBtn === plugin ? {} : plugin;
|
135
153
|
},
|
@@ -177,6 +195,7 @@ const useCopilotStore = defineStore({
|
|
177
195
|
});
|
178
196
|
},
|
179
197
|
async sendMsg(msg) {
|
198
|
+
this.suggest_message_list = [];
|
180
199
|
if (this.msgList.length === 1 && this.useHistoryRecord) {
|
181
200
|
createHistoryRecord({ name: msg }).then((res) => {
|
182
201
|
if (res.status === 200) {
|
@@ -229,6 +248,22 @@ const useCopilotStore = defineStore({
|
|
229
248
|
}
|
230
249
|
}).join("");
|
231
250
|
});
|
251
|
+
const sendMessageList = this.msgList.slice(-30).filter((item) => item.isSend).map((item) => {
|
252
|
+
return item.msgs.map((msg2) => {
|
253
|
+
if (msg2.type === DataType[
|
254
|
+
1
|
255
|
+
/* text */
|
256
|
+
]) {
|
257
|
+
return msg2.content;
|
258
|
+
}
|
259
|
+
if (msg2.type === DataType[
|
260
|
+
2
|
261
|
+
/* edit */
|
262
|
+
]) {
|
263
|
+
return msg2.content.message;
|
264
|
+
}
|
265
|
+
}).join("");
|
266
|
+
});
|
232
267
|
let pluginList = [];
|
233
268
|
if (Object.keys(this.checkedPluginByBtn).length) {
|
234
269
|
const {
|
@@ -256,7 +291,8 @@ const useCopilotStore = defineStore({
|
|
256
291
|
{
|
257
292
|
data: {
|
258
293
|
message: willSendMsg[willSendMsg.length - 1],
|
259
|
-
functionInfoList: pluginList
|
294
|
+
functionInfoList: pluginList,
|
295
|
+
messageList: sendMessageList
|
260
296
|
},
|
261
297
|
headers: {
|
262
298
|
accessToken: this.intelligentAnalysisConfig.token
|
@@ -312,7 +348,7 @@ const useCopilotStore = defineStore({
|
|
312
348
|
responseParamMsg = [responseParamMsg];
|
313
349
|
}
|
314
350
|
responseParamMsg.forEach((item) => {
|
315
|
-
const { type, content, isOver, isResult } = item;
|
351
|
+
const { type, content, isOver, isResult, suggest_message_list } = item;
|
316
352
|
if (content) {
|
317
353
|
this.responseMsg({
|
318
354
|
isResult,
|
@@ -320,6 +356,9 @@ const useCopilotStore = defineStore({
|
|
320
356
|
content
|
321
357
|
});
|
322
358
|
}
|
359
|
+
if (Array.isArray(suggest_message_list) && suggest_message_list.length) {
|
360
|
+
this.suggest_message_list = suggest_message_list;
|
361
|
+
}
|
323
362
|
if (isOver) {
|
324
363
|
this.requestSseing = false;
|
325
364
|
this.cancelsse();
|
@@ -369,11 +408,14 @@ const useCopilotStore = defineStore({
|
|
369
408
|
this.cancelsse();
|
370
409
|
},
|
371
410
|
onmessage: (msg) => {
|
372
|
-
const { type, content, isOver } = this.defaultDeal.responseParameFn(msg);
|
411
|
+
const { type, content, isOver, suggest_message_list } = this.defaultDeal.responseParameFn(msg);
|
373
412
|
this.responseMsg({
|
374
413
|
type,
|
375
414
|
content
|
376
415
|
});
|
416
|
+
if (Array.isArray(suggest_message_list) && suggest_message_list.length) {
|
417
|
+
this.suggest_message_list = suggest_message_list;
|
418
|
+
}
|
377
419
|
if (isOver) {
|
378
420
|
this.requestSseing = false;
|
379
421
|
this.cancelsse();
|
@@ -395,11 +437,14 @@ const useCopilotStore = defineStore({
|
|
395
437
|
headers,
|
396
438
|
method
|
397
439
|
}).then((res) => {
|
398
|
-
const { type, content, isOver } = this.defaultDeal.responseParameFn(res);
|
440
|
+
const { type, content, isOver, suggest_message_list } = this.defaultDeal.responseParameFn(res);
|
399
441
|
this.responseMsg({
|
400
442
|
type,
|
401
443
|
content
|
402
444
|
});
|
445
|
+
if (Array.isArray(suggest_message_list) && suggest_message_list.length) {
|
446
|
+
this.suggest_message_list = suggest_message_list;
|
447
|
+
}
|
403
448
|
if (isOver) {
|
404
449
|
http.cancelByUrl(this.cancleUrl);
|
405
450
|
return;
|
@@ -463,7 +508,10 @@ const useCopilotStore = defineStore({
|
|
463
508
|
id: this.currentHistoryRecord.recordId,
|
464
509
|
info: JSON.stringify({
|
465
510
|
msgList: this.msgList,
|
466
|
-
checkedPlugKey: this.checkedPluginByBtn.key || ""
|
511
|
+
checkedPlugKey: this.checkedPluginByBtn.key || "",
|
512
|
+
suggest_message_list: this.suggest_message_list,
|
513
|
+
currentUsePluginKey: this.currentUsePlugin.key || "",
|
514
|
+
currentPluginParams: this.currentPluginParams
|
467
515
|
})
|
468
516
|
});
|
469
517
|
},
|
@@ -481,7 +529,13 @@ const useCopilotStore = defineStore({
|
|
481
529
|
if (!msg)
|
482
530
|
return;
|
483
531
|
this.currentHistoryRecord.recordId = msg.id;
|
484
|
-
const {
|
532
|
+
const {
|
533
|
+
msgList,
|
534
|
+
checkedPlugKey,
|
535
|
+
suggest_message_list,
|
536
|
+
currentUsePluginKey,
|
537
|
+
currentPluginParams
|
538
|
+
} = JSON.parse(msg.info);
|
485
539
|
this.checkedPluginByBtn = this.plugins.find((item2) => item2.key === checkedPlugKey) || {};
|
486
540
|
msgList.forEach((item2, index) => {
|
487
541
|
item2.isHistory = true;
|
@@ -493,6 +547,9 @@ const useCopilotStore = defineStore({
|
|
493
547
|
}
|
494
548
|
});
|
495
549
|
this.setMsgList(msgList);
|
550
|
+
this.suggest_message_list = suggest_message_list || [];
|
551
|
+
this.currentUsePlugin = this.plugins.find((item2) => item2.key === currentUsePluginKey) || {};
|
552
|
+
this.currentPluginParams = currentPluginParams || {};
|
496
553
|
}
|
497
554
|
});
|
498
555
|
},
|
@@ -512,6 +569,9 @@ const useCopilotStore = defineStore({
|
|
512
569
|
},
|
513
570
|
clearPluginsPayload() {
|
514
571
|
this.pluginsPayload = {};
|
572
|
+
},
|
573
|
+
setFullScreen(val) {
|
574
|
+
this.fullscreen = val;
|
515
575
|
}
|
516
576
|
}
|
517
577
|
});
|