@blueking/chat-x 0.0.1-beta.5 → 0.0.1-beta.6
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/ag-ui/types/constants.d.ts +2 -0
- package/dist/ag-ui/types/contents.d.ts +10 -0
- package/dist/ag-ui/types/messages.d.ts +4 -4
- package/dist/common/constants.d.ts +2 -0
- package/dist/components/ai-buttons/file-upload-btn/file-upload-btn.vue.d.ts +26 -0
- package/dist/components/chat-content/common-error-content/common-error-content.vue.d.ts +1 -1
- package/dist/components/chat-content/file-content/file-content.vue.d.ts +12 -0
- package/dist/components/chat-content/markdown-content/markdown-content.vue.d.ts +1 -1
- package/dist/components/chat-content/reference-content/reference-content.vue.d.ts +2 -2
- package/dist/components/chat-input/ai-slash-input/ai-slash-input.vue.d.ts +3 -0
- package/dist/components/chat-input/chat-input.vue.d.ts +40 -7
- package/dist/components/chat-message/message-container/message-container.vue.d.ts +85 -50
- package/dist/components/chat-message/message-render/message-render.vue.d.ts +2 -1
- package/dist/components/chat-message/user-message/user-message.vue.d.ts +6 -1
- package/dist/components/message-tools/message-tools.vue.d.ts +3 -2
- package/dist/components/message-tools/user-feedback/user-feedback.vue.d.ts +1 -0
- package/dist/icons/content.d.ts +6 -0
- package/dist/icons/index.d.ts +1 -0
- package/dist/icons/input.d.ts +12 -0
- package/dist/icons/messages.d.ts +0 -3
- package/dist/index.css +1 -1
- package/dist/index.js +668 -302
- package/dist/index.js.map +1 -1
- package/dist/lang/lang.d.ts +4 -1
- package/dist/types/input.d.ts +10 -0
- package/dist/types/tool.d.ts +2 -2
- package/dist/utils/file.d.ts +24 -0
- package/dist/utils/index.d.ts +1 -0
- package/package.json +2 -2
- package/dist/components/chat-content/x-content/x-content.vue.d.ts +0 -17
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Fragment, Teleport, Text, Transition, computed, createApp, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, customRef, defineComponent, getCurrentInstance, guardReactiveProps, h, inject, isReactive, isRef, isVNode, mergeModels, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onMounted, onScopeDispose, onUnmounted, openBlock, provide, reactive, ref, renderList, renderSlot, resolveDynamicComponent, shallowRef, toDisplayString, toValue, unref, useCssVars, useModel, useSlots, useTemplateRef, vShow, watch, watchEffect, withCtx, withDirectives, withModifiers } from "vue";
|
|
1
|
+
import { Fragment, Teleport, Text, Transition, computed, createApp, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, customRef, defineComponent, getCurrentInstance, guardReactiveProps, h, inject, isReactive, isRef, isVNode, mergeModels, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onMounted, onScopeDispose, onUnmounted, openBlock, provide, reactive, ref, renderList, renderSlot, resolveDynamicComponent, shallowRef, toDisplayString, toValue, unref, useCssVars, useModel, useSlots, useTemplateRef, vShow, watch, watchEffect, watchPostEffect, withCtx, withDirectives, withModifiers } from "vue";
|
|
2
2
|
import { Button, Checkbox, Form, Input, Loading, Message, Radio, Select, Switcher } from "bkui-vue";
|
|
3
3
|
import dompurify from "dompurify";
|
|
4
4
|
import markdownItFootnote from "markdown-it-footnote";
|
|
@@ -27,12 +27,25 @@ var __create = Object.create, __defProp = Object.defineProperty, __getOwnPropDes
|
|
|
27
27
|
enumerable: !0
|
|
28
28
|
}) : r, e));
|
|
29
29
|
let MessageContentType = /* @__PURE__ */ function(e) {
|
|
30
|
-
return e.Binary = "binary", e.Function = "function", e.KeyValue = "key-value", e.Other = "other", e.Text = "text", e;
|
|
30
|
+
return e.Binary = "binary", e.Function = "function", e.KeyValue = "key-value", e.KnowledgeRag = "knowledge-rag", e.Other = "other", e.ReferenceDocument = "reference-document", e.Text = "text", e;
|
|
31
31
|
}({}), MessageRole = /* @__PURE__ */ function(e) {
|
|
32
32
|
return e.Activity = "activity", e.Assistant = "assistant", e.Developer = "developer", e.Guide = "guide", e.Hidden = "hidden", e.HiddenAssistant = "hidden-assistant", e.HiddenGuide = "hidden-guide", e.HiddenSystem = "hidden-system", e.HiddenUser = "hidden-user", e.Info = "info", e.Pause = "pause", e.Placeholder = "placeholder", e.Reasoning = "reasoning", e.System = "system", e.TemplateAssistant = "template-assistant", e.TemplateGuide = "template-guide", e.TemplateHidden = "template-hidden", e.TemplateSystem = "template-system", e.TemplateUser = "template-user", e.Tool = "tool", e.User = "user", e;
|
|
33
33
|
}({}), MessageStatus = /* @__PURE__ */ function(e) {
|
|
34
34
|
return e.Complete = "complete", e.Disabled = "disabled", e.Error = "error", e.Pending = "pending", e.Stop = "stop", e.Streaming = "streaming", e;
|
|
35
35
|
}({});
|
|
36
|
+
const isImageFile = (e) => e ? e.startsWith("image/") : !1, getFilePreviewUrl = (e) => e ? URL.createObjectURL(e) : "", getFileExtension = (e) => {
|
|
37
|
+
var n;
|
|
38
|
+
return e && (e.name.split(".").pop() || ((n = e.type) == null ? void 0 : n.split("/").pop())) || "";
|
|
39
|
+
}, formatFileSize = (e) => {
|
|
40
|
+
if (!e) return "";
|
|
41
|
+
let n = e.size, r = [
|
|
42
|
+
"B",
|
|
43
|
+
"KB",
|
|
44
|
+
"M",
|
|
45
|
+
"GB"
|
|
46
|
+
], i = Math.floor(Math.log2(n) / 10);
|
|
47
|
+
return `${(n / Math.pow(1024, i)).toFixed(2)} ${r[i]}`;
|
|
48
|
+
};
|
|
36
49
|
var REGEX_CODE_BLOCK = /^```/, REGEX_DOUBLE_DOLLAR = /\$\$/g, REGEX_BRACKET_OPEN = /\\\[/g, REGEX_BRACKET_CLOSE = /\\\]/g, REGEX_BEGIN_ENV = /\\begin\{([^}]+)\}/g, REGEX_END_ENV = /\\end\{([^}]+)\}/g, REGEX_INCOMPLETE_BEGIN = /\\begin\{([^}]*)$/, REGEX_INCOMPLETE_END = /\\end\{([^}]*)$/, REGEX_INCOMPLETE_CMD = /\\([a-zA-Z]+)$/, TWO_ARG_COMMANDS = new Set([
|
|
37
50
|
"frac",
|
|
38
51
|
"dfrac",
|
|
@@ -286,7 +299,10 @@ const getCookieByName = (e) => {
|
|
|
286
299
|
暂无数据: "No Data",
|
|
287
300
|
"节点输出内容...": "Node output content...",
|
|
288
301
|
"调用 MCP:": "Call MCP:",
|
|
289
|
-
更多: "More"
|
|
302
|
+
更多: "More",
|
|
303
|
+
"检索中...": "Searching...",
|
|
304
|
+
检索完成: "Search Completed",
|
|
305
|
+
上传文件: "Upload File"
|
|
290
306
|
}, t = (e) => isEn ? lang[e] : e, CHAT_Z_INDEX = 9999, EDITOR_Z_INDEX = CHAT_Z_INDEX + 1, EDITOR_MENU_Z_INDEX = EDITOR_Z_INDEX + 1, SHORTCUT_MENU_Z_INDEX = EDITOR_MENU_Z_INDEX + 1, SELECTION_Z_INDEX = SHORTCUT_MENU_Z_INDEX + 1, CONST_MESSAGE_TOOLS = [
|
|
291
307
|
{
|
|
292
308
|
description: t("复制"),
|
|
@@ -345,7 +361,7 @@ const getCookieByName = (e) => {
|
|
|
345
361
|
id: "delete",
|
|
346
362
|
name: t("删除")
|
|
347
363
|
}
|
|
348
|
-
], commonSVGProps = {
|
|
364
|
+
], MAX_UPLOAD_FILES = 3, MAX_UPLOAD_FILE_SIZE = 2.5 * 1024 * 1024, commonSVGProps = {
|
|
349
365
|
class: "ai-common-icon",
|
|
350
366
|
style: {
|
|
351
367
|
verticalAlign: "middle",
|
|
@@ -607,7 +623,32 @@ const AIBluekingIcon = h("svg", _objectSpread2(_objectSpread2({}, commonSVGProps
|
|
|
607
623
|
h("path", { d: "M263.04 760.96a148.48 148.48 0 0 1-1.92-224l92.48-92.48L308.48 398.72 216 491.2a212.8 212.8 0 0 0 1.92 314.88 212.8 212.8 0 0 0 314.88 1.92l92.48-92.48L579.84 672l-92.48 92.48A148.48 148.48 0 0 1 263.04 760.96Z" }),
|
|
608
624
|
h("path", { d: "M491.2 216L398.72 308.48l45.44 45.12 92.48-92.48a148.48 148.48 0 0 1 224 1.92 148.48 148.48 0 0 1 1.92 224L672 579.84l45.12 45.44 92.48-92.48a212.8 212.8 0 0 0-1.92-314.88A212.8 212.8 0 0 0 491.2 216Z" }),
|
|
609
625
|
h("path", { d: "M398.78566017615634 579.8877413259167L579.8049961599127 398.86840534216054 625.0598301558516 444.1232393380996 444.0404941720955 625.1425753218557 398.78566017615634 579.8877413259167z" })
|
|
610
|
-
]),
|
|
626
|
+
]), ImageErrorIcon = h("svg", _objectSpread2(_objectSpread2({}, commonSVGProps), {}, {
|
|
627
|
+
viewBox: "0 0 24 24",
|
|
628
|
+
class: {
|
|
629
|
+
[commonSVGProps.class]: !0,
|
|
630
|
+
"ai-image-error-icon": !0
|
|
631
|
+
}
|
|
632
|
+
}), [h("path", { d: "M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z" }), h("line", {
|
|
633
|
+
x1: "3",
|
|
634
|
+
y1: "3",
|
|
635
|
+
x2: "21",
|
|
636
|
+
y2: "21",
|
|
637
|
+
"stroke-width": "2",
|
|
638
|
+
"stroke-linecap": "round"
|
|
639
|
+
})]), CloseCircleIcon = h("svg", _objectSpread2(_objectSpread2({}, commonSVGProps), {}, { class: {
|
|
640
|
+
[commonSVGProps.class]: !0,
|
|
641
|
+
"ai-close-circle-icon": !0
|
|
642
|
+
} }), [h("path", { d: "M512 70.246391c230.929037 0 418.133279 187.204242 418.133279 418.133279s-187.204242 418.133279-418.133279 418.133279-418.133279-187.204242-418.133279-418.133279 187.204242-418.133279 418.133279-418.133279z m0 59.733325c-197.938508 0-358.399953 160.461446-358.399953 358.399954s160.461446 358.399953 358.399953 358.399953 358.399953-160.461446 358.399953-358.399953-160.461446-358.399953-358.399953-358.399954z m0 123.199984c129.884516 0 235.199969 105.315453 235.199969 235.19997s-105.315453 235.199969-235.199969 235.199969-235.199969-105.315453-235.199969-235.199969 105.315453-235.199969 235.199969-235.19997z m71.276791 140.165182l-71.283324 71.282391-71.276791-71.275858-23.751464 23.751464 71.275858 71.276791-71.275858 71.27679 23.769197 23.769197 71.276791-71.27679 71.265591 71.26559 23.751463-23.751463-71.264657-71.265591 71.282391-71.283324-23.769197-23.769197z" })]), DocLinkIcon = h("svg", _objectSpread2(_objectSpread2({}, commonSVGProps), {}, { class: {
|
|
643
|
+
[commonSVGProps.class]: !0,
|
|
644
|
+
"ai-doc-link-icon": !0
|
|
645
|
+
} }), [h("path", { d: "M320.950857 203.337143H191.634286a32.036571 32.036571 0 0 0-31.670857 31.890286v639.561142c0 17.408 14.409143 31.890286 31.670857 31.890286h129.316571a32.036571 32.036571 0 0 0 31.670857-31.890286V235.227429a32.036571 32.036571 0 0 0-31.670857-31.890286z m-35.84 130.486857H227.474286a28.964571 28.964571 0 0 1 0-58.002286h57.490285a28.964571 28.964571 0 0 1 0 58.002286z m293.156572-237.860571H448.877714a32.036571 32.036571 0 0 0-31.597714 31.963428v746.788572c0 17.481143 14.409143 31.963429 31.597714 31.963428h129.462857a32.036571 32.036571 0 0 0 31.524572-31.890286V127.926857c1.462857-17.408-12.873143-31.890286-31.597714-31.890286z m-34.523429 132.022857h-57.490286a28.964571 28.964571 0 0 1 0-58.002286h57.490286a28.964571 28.964571 0 0 1 0 58.002286z m383.780571 613.449143l-120.685714-628.004572a33.792 33.792 0 0 0-33.060571-26.038857H768l-126.537143 24.649143a32.768 32.768 0 0 0-25.819428 37.668571l122.148571 629.394286c2.925714 15.945143 15.872 26.112 31.670857 26.112h5.705143l126.537143-24.649143a35.108571 35.108571 0 0 0 25.819428-39.131428z m-165.302857-529.334858l-57.490285 11.556572h-5.705143a30.72 30.72 0 0 1-28.745143-23.186286 29.696 29.696 0 0 1 22.966857-34.816l57.490286-11.556571c15.798857-2.925714 31.670857 7.241143 34.523428 23.186285a29.696 29.696 0 0 1-22.966857 34.816z" })]), DeleteCircleIcon = h("svg", _objectSpread2(_objectSpread2({}, commonSVGProps), {}, { class: {
|
|
646
|
+
[commonSVGProps.class]: !0,
|
|
647
|
+
"ai-delete-circle-icon": !0
|
|
648
|
+
} }), [h("path", { d: "M512 64C264 64 64 264 64 512s200 448 448 448 448-200 448-448S760 64 512 64z m180.8 584l-44.8 44.8-136-136-136 136-44.8-44.8 136-136-136-136 44.8-44.8 136 136 136-136 44.8 44.8-136 136 136 136z" })]), FileUploadIcon = h("svg", _objectSpread2(_objectSpread2({}, commonSVGProps), {}, { class: {
|
|
649
|
+
[commonSVGProps.class]: !0,
|
|
650
|
+
"ai-delete-circle-icon": !0
|
|
651
|
+
} }), [h("path", { d: "M470.8352 362.7008l-192.8192 186.368a160.768 160.768 0 0 0 0.0512 232.8576c66.4576 64.2048 174.4384 64.3072 240.896 0.0512l241.0496-233.0112a34.9184 34.9184 0 0 1 48.1792 0c13.312 12.8512 13.312 33.7408 0 46.592l-241.0496 233.0112c-93.0816 89.9584-244.224 89.856-337.2544-0.0512a225.1264 225.1264 0 0 1-0.0512-326.0416l337.408-326.144a174.1824 174.1824 0 0 1 240.896 0 160.512 160.512 0 0 1 0 232.96l-192.8192 186.368-144.384 139.5712a104.6528 104.6528 0 0 1-144.6912 0.1024 96.1536 96.1536 0 0 1 0.1536-139.8784l337.0496-325.7856a34.9184 34.9184 0 0 1 48.128 0c13.312 12.8512 13.312 33.7408 0 46.592L374.6304 642.048a31.8464 31.8464 0 0 0-0.1536 46.7456 34.816 34.816 0 0 0 48.3328-0.1536l144.384-139.52 192.8192-186.4192a96.1536 96.1536 0 0 0 0-139.776 103.68 103.68 0 0 0-72.2944-29.0304c-27.136 0-53.1456 10.4448-72.2432 29.0304l-144.5888 139.776z" })]), SendMessageIcon = h("svg", _objectSpread2(_objectSpread2({}, commonSVGProps), {}, { class: {
|
|
611
652
|
[commonSVGProps.class]: !0,
|
|
612
653
|
"ai-send-message-icon": !0
|
|
613
654
|
} }), [h("path", { d: "M873.6 99.2L118.4 476.8c-28.8 16-28.8 44.8-6.4 60.8l182.4 112c16 6.4 28.8 6.4 44.8-6.4L736 288 390.4 672c-6.4 6.4-6.4 16-6.4 22.4v166.4c0 16 6.4 28.8 22.4 38.4s28.8 0 38.4-6.4l89.6-89.6 182.4 121.6c28.8 16 54.4 6.4 60.8-22.4L928 147.2c6.4-38.4-19.2-60.8-54.4-48z" })]), LoadingMessageIcon = h("svg", _objectSpread2(_objectSpread2({}, commonSVGProps), {}, { class: {
|
|
@@ -631,10 +672,7 @@ const AIBluekingIcon = h("svg", _objectSpread2(_objectSpread2({}, commonSVGProps
|
|
|
631
672
|
})]), ArrowDownIcon = h("svg", _objectSpread2(_objectSpread2({}, commonSVGProps), {}, { class: {
|
|
632
673
|
[commonSVGProps.class]: !0,
|
|
633
674
|
"ai-arrow-down-icon": !0
|
|
634
|
-
} }), [h("path", { d: "M810.666628 571.545259l-85.526922-83.200123-171.019311 166.469312-0.035467-554.735928H440.048409l0.0672 554.735928-171.121977-166.469312L183.466709 571.545259l313.59996 305.066494L810.666628 571.545259z" })]),
|
|
635
|
-
[commonSVGProps.class]: !0,
|
|
636
|
-
"ai-close-circle-icon": !0
|
|
637
|
-
} }), [h("path", { d: "M512 70.246391c230.929037 0 418.133279 187.204242 418.133279 418.133279s-187.204242 418.133279-418.133279 418.133279-418.133279-187.204242-418.133279-418.133279 187.204242-418.133279 418.133279-418.133279z m0 59.733325c-197.938508 0-358.399953 160.461446-358.399953 358.399954s160.461446 358.399953 358.399953 358.399953 358.399953-160.461446 358.399953-358.399953-160.461446-358.399953-358.399953-358.399954z m0 123.199984c129.884516 0 235.199969 105.315453 235.199969 235.19997s-105.315453 235.199969-235.199969 235.199969-235.199969-105.315453-235.199969-235.199969 105.315453-235.199969 235.199969-235.19997z m71.276791 140.165182l-71.283324 71.282391-71.276791-71.275858-23.751464 23.751464 71.275858 71.276791-71.275858 71.27679 23.769197 23.769197 71.276791-71.27679 71.265591 71.26559 23.751463-23.751463-71.264657-71.265591 71.282391-71.283324-23.769197-23.769197z" })]), CloseIcon = h("svg", _objectSpread2(_objectSpread2({}, commonSVGProps), {}, { class: {
|
|
675
|
+
} }), [h("path", { d: "M810.666628 571.545259l-85.526922-83.200123-171.019311 166.469312-0.035467-554.735928H440.048409l0.0672 554.735928-171.121977-166.469312L183.466709 571.545259l313.59996 305.066494L810.666628 571.545259z" })]), CloseIcon = h("svg", _objectSpread2(_objectSpread2({}, commonSVGProps), {}, { class: {
|
|
638
676
|
[commonSVGProps.class]: !0,
|
|
639
677
|
"ai-close-icon": !0
|
|
640
678
|
} }), [h("path", { d: "M757.09004048 196.21090938L512 446.01421987l-245.09004048-249.80331049-70.69905014 70.69905014 249.80331049 245.09004048-249.80331049 245.09004048 70.69905014 70.69905014 245.09004048-249.80331049 245.09004048 249.80331049 70.69905014-70.69905014-249.80331049-245.09004048 249.80331049-245.09004048z" })]), MoreIcon = h("svg", _objectSpread2(_objectSpread2({}, commonSVGProps), {}, { class: {
|
|
@@ -1356,12 +1394,12 @@ function preventOverflow$1(e) {
|
|
|
1356
1394
|
var j, M = S === "y" ? top$1 : left$1, N = S === "y" ? bottom$1 : right$1, P = S === "y" ? "height" : "width", F = w[S], I = F + v[M], L = F - v[N], R = m ? -E[P] / 2 : 0, z = b === start$1 ? T[P] : E[P], B = b === start$1 ? -E[P] : -T[P], V = n.elements.arrow, H = m && V ? getLayoutRect$1(V) : {
|
|
1357
1395
|
width: 0,
|
|
1358
1396
|
height: 0
|
|
1359
|
-
}, U = n.modifiersData["arrow#persistent"] ? n.modifiersData["arrow#persistent"].padding : getFreshSideObject$1(), W = U[M], G = U[N], K = within$1(0, T[P], H[P]), q = x ? T[P] / 2 - R - K - W - O.mainAxis : z - K - W - O.mainAxis,
|
|
1360
|
-
w[S] =
|
|
1397
|
+
}, U = n.modifiersData["arrow#persistent"] ? n.modifiersData["arrow#persistent"].padding : getFreshSideObject$1(), W = U[M], G = U[N], K = within$1(0, T[P], H[P]), q = x ? T[P] / 2 - R - K - W - O.mainAxis : z - K - W - O.mainAxis, J = x ? -T[P] / 2 + R + K + G + O.mainAxis : B + K + G + O.mainAxis, Y = n.elements.arrow && getOffsetParent$1(n.elements.arrow), Lv = Y ? S === "y" ? Y.clientTop || 0 : Y.clientLeft || 0 : 0, X = (j = k == null ? void 0 : k[S]) == null ? 0 : j, Rv = F + q - X - Lv, zv = F + J - X, Bv = within$1(m ? min$2(I, Rv) : I, F, m ? max$1(L, zv) : L);
|
|
1398
|
+
w[S] = Bv, A[S] = Bv - F;
|
|
1361
1399
|
}
|
|
1362
1400
|
if (c) {
|
|
1363
|
-
var
|
|
1364
|
-
w[C] =
|
|
1401
|
+
var Vv, Hv = S === "x" ? top$1 : left$1, Uv = S === "x" ? bottom$1 : right$1, Z = w[C], Q = C === "y" ? "height" : "width", $ = Z + v[Hv], Wv = Z - v[Uv], Gv = [top$1, left$1].indexOf(y) !== -1, Kv = (Vv = k == null ? void 0 : k[C]) == null ? 0 : Vv, qv = Gv ? $ : Z - T[Q] - E[Q] - Kv + O.altAxis, Jv = Gv ? Z + T[Q] + E[Q] - Kv - O.altAxis : Wv, Yv = m && Gv ? withinMaxClamp$1(qv, Z, Jv) : within$1(m ? qv : $, Z, m ? Jv : Wv);
|
|
1402
|
+
w[C] = Yv, A[C] = Yv - Z;
|
|
1365
1403
|
}
|
|
1366
1404
|
n.modifiersData[i] = A;
|
|
1367
1405
|
}
|
|
@@ -1824,7 +1862,7 @@ function render$1(e) {
|
|
|
1824
1862
|
render$1.$$tippy = !0;
|
|
1825
1863
|
var idCounter$1 = 1, mouseMoveListeners$1 = [], mountedInstances$1 = [];
|
|
1826
1864
|
function createTippy$1(e, n) {
|
|
1827
|
-
var r = evaluateProps$1(e, Object.assign({}, defaultProps$1, getExtendedPassedProps$1(removeUndefinedProps$1(n)))), i, a, o, s = !1, c = !1, l = !1, u = !1, d, f, p, m = [], g = debounce$1$1(
|
|
1865
|
+
var r = evaluateProps$1(e, Object.assign({}, defaultProps$1, getExtendedPassedProps$1(removeUndefinedProps$1(n)))), i, a, o, s = !1, c = !1, l = !1, u = !1, d, f, p, m = [], g = debounce$1$1(X, r.interactiveDebounce), _, v = idCounter$1++, y = null, b = unique$1(r.plugins), x = {
|
|
1828
1866
|
id: v,
|
|
1829
1867
|
reference: e,
|
|
1830
1868
|
popper: div$1(),
|
|
@@ -1838,16 +1876,16 @@ function createTippy$1(e, n) {
|
|
|
1838
1876
|
isShown: !1
|
|
1839
1877
|
},
|
|
1840
1878
|
plugins: b,
|
|
1841
|
-
clearDelayTimeouts:
|
|
1842
|
-
setProps:
|
|
1843
|
-
setContent:
|
|
1844
|
-
show:
|
|
1845
|
-
hide:
|
|
1846
|
-
hideWithInteractivity:
|
|
1847
|
-
enable:
|
|
1848
|
-
disable:
|
|
1849
|
-
unmount:
|
|
1850
|
-
destroy:
|
|
1879
|
+
clearDelayTimeouts: Kv,
|
|
1880
|
+
setProps: qv,
|
|
1881
|
+
setContent: Jv,
|
|
1882
|
+
show: Yv,
|
|
1883
|
+
hide: Xv,
|
|
1884
|
+
hideWithInteractivity: Zv,
|
|
1885
|
+
enable: Wv,
|
|
1886
|
+
disable: Gv,
|
|
1887
|
+
unmount: Qv,
|
|
1888
|
+
destroy: $v
|
|
1851
1889
|
};
|
|
1852
1890
|
/* istanbul ignore if */
|
|
1853
1891
|
if (!r.render) return x;
|
|
@@ -1856,7 +1894,7 @@ function createTippy$1(e, n) {
|
|
|
1856
1894
|
var T = b.map(function(e) {
|
|
1857
1895
|
return e.fn(x);
|
|
1858
1896
|
}), E = e.hasAttribute("aria-expanded");
|
|
1859
|
-
return
|
|
1897
|
+
return J(), L(), P(), F("onCreate", [x]), r.showOnCreate && Q(), C.addEventListener("mouseenter", function() {
|
|
1860
1898
|
x.props.interactive && x.state.isVisible && x.clearDelayTimeouts();
|
|
1861
1899
|
}), C.addEventListener("mouseleave", function() {
|
|
1862
1900
|
x.props.interactive && x.props.trigger.indexOf("mouseenter") >= 0 && j().addEventListener("mousemove", g);
|
|
@@ -1975,37 +2013,37 @@ function createTippy$1(e, n) {
|
|
|
1975
2013
|
});
|
|
1976
2014
|
});
|
|
1977
2015
|
}
|
|
1978
|
-
function
|
|
1979
|
-
O() && (q("touchstart",
|
|
1980
|
-
if (e !== "manual") switch (q(e,
|
|
2016
|
+
function J() {
|
|
2017
|
+
O() && (q("touchstart", Lv, { passive: !0 }), q("touchend", Rv, { passive: !0 })), splitBySpaces$1(x.props.trigger).forEach(function(e) {
|
|
2018
|
+
if (e !== "manual") switch (q(e, Lv), e) {
|
|
1981
2019
|
case "mouseenter":
|
|
1982
|
-
q("mouseleave",
|
|
2020
|
+
q("mouseleave", Rv);
|
|
1983
2021
|
break;
|
|
1984
2022
|
case "focus":
|
|
1985
|
-
q(isIE11$1 ? "focusout" : "blur",
|
|
2023
|
+
q(isIE11$1 ? "focusout" : "blur", zv);
|
|
1986
2024
|
break;
|
|
1987
2025
|
case "focusin":
|
|
1988
|
-
q("focusout",
|
|
2026
|
+
q("focusout", zv);
|
|
1989
2027
|
break;
|
|
1990
2028
|
}
|
|
1991
2029
|
});
|
|
1992
2030
|
}
|
|
1993
|
-
function
|
|
2031
|
+
function Y() {
|
|
1994
2032
|
m.forEach(function(e) {
|
|
1995
2033
|
var n = e.node, r = e.eventType, i = e.handler, a = e.options;
|
|
1996
2034
|
n.removeEventListener(r, i, a);
|
|
1997
2035
|
}), m = [];
|
|
1998
2036
|
}
|
|
1999
|
-
function
|
|
2037
|
+
function Lv(e) {
|
|
2000
2038
|
var n, r = !1;
|
|
2001
|
-
if (!(!x.state.isEnabled ||
|
|
2039
|
+
if (!(!x.state.isEnabled || Bv(e) || c)) {
|
|
2002
2040
|
var i = ((n = d) == null ? void 0 : n.type) === "focus";
|
|
2003
2041
|
d = e, _ = e.currentTarget, L(), !x.state.isVisible && isMouseEvent$1(e) && mouseMoveListeners$1.forEach(function(n) {
|
|
2004
2042
|
return n(e);
|
|
2005
2043
|
}), e.type === "click" && (x.props.trigger.indexOf("mouseenter") < 0 || s) && x.props.hideOnClick !== !1 && x.state.isVisible ? r = !0 : Q(e), e.type === "click" && (s = !r), r && !i && $(e);
|
|
2006
2044
|
}
|
|
2007
2045
|
}
|
|
2008
|
-
function
|
|
2046
|
+
function X(e) {
|
|
2009
2047
|
var n = e.target, i = A().contains(n) || C.contains(n);
|
|
2010
2048
|
e.type === "mousemove" && i || isCursorOutsideInteractiveBorder$1(Z().concat(C).map(function(e) {
|
|
2011
2049
|
var n, i = (n = e._tippy.popperInstance) == null ? void 0 : n.state;
|
|
@@ -2016,8 +2054,8 @@ function createTippy$1(e, n) {
|
|
|
2016
2054
|
} : null;
|
|
2017
2055
|
}).filter(Boolean), e) && (R(), $(e));
|
|
2018
2056
|
}
|
|
2019
|
-
function
|
|
2020
|
-
if (!(
|
|
2057
|
+
function Rv(e) {
|
|
2058
|
+
if (!(Bv(e) || x.props.trigger.indexOf("click") >= 0 && s)) {
|
|
2021
2059
|
if (x.props.interactive) {
|
|
2022
2060
|
x.hideWithInteractivity(e);
|
|
2023
2061
|
return;
|
|
@@ -2025,14 +2063,14 @@ function createTippy$1(e, n) {
|
|
|
2025
2063
|
$(e);
|
|
2026
2064
|
}
|
|
2027
2065
|
}
|
|
2028
|
-
function
|
|
2066
|
+
function zv(e) {
|
|
2029
2067
|
x.props.trigger.indexOf("focusin") < 0 && e.target !== A() || x.props.interactive && e.relatedTarget && C.contains(e.relatedTarget) || $(e);
|
|
2030
2068
|
}
|
|
2031
|
-
function
|
|
2069
|
+
function Bv(e) {
|
|
2032
2070
|
return currentInput$1.isTouch ? O() !== e.type.indexOf("touch") >= 0 : !1;
|
|
2033
2071
|
}
|
|
2034
|
-
function
|
|
2035
|
-
|
|
2072
|
+
function Vv() {
|
|
2073
|
+
Hv();
|
|
2036
2074
|
var n = x.props, r = n.popperOptions, i = n.placement, a = n.offset, o = n.getReferenceClientRect, s = n.moveTransition, c = k() ? getChildren$1(C).arrow : null, l = o ? {
|
|
2037
2075
|
getBoundingClientRect: o,
|
|
2038
2076
|
contextElement: o.contextElement || A()
|
|
@@ -2090,12 +2128,12 @@ function createTippy$1(e, n) {
|
|
|
2090
2128
|
modifiers: u
|
|
2091
2129
|
}));
|
|
2092
2130
|
}
|
|
2093
|
-
function
|
|
2131
|
+
function Hv() {
|
|
2094
2132
|
x.popperInstance && (x.popperInstance.destroy(), x.popperInstance = null);
|
|
2095
2133
|
}
|
|
2096
|
-
function
|
|
2134
|
+
function Uv() {
|
|
2097
2135
|
var e = x.props.appendTo, n, r = A();
|
|
2098
|
-
n = x.props.interactive && e === TIPPY_DEFAULT_APPEND_TO$1 || e === "parent" ? r.parentNode : invokeWithArgsOrReturn$1(e, [r]), n.contains(C) || n.appendChild(C), x.state.isMounted = !0,
|
|
2136
|
+
n = x.props.interactive && e === TIPPY_DEFAULT_APPEND_TO$1 || e === "parent" ? r.parentNode : invokeWithArgsOrReturn$1(e, [r]), n.contains(C) || n.appendChild(C), x.state.isMounted = !0, Vv();
|
|
2099
2137
|
}
|
|
2100
2138
|
function Z() {
|
|
2101
2139
|
return arrayFrom$1(C.querySelectorAll("[data-tippy-root]"));
|
|
@@ -2121,30 +2159,30 @@ function createTippy$1(e, n) {
|
|
|
2121
2159
|
});
|
|
2122
2160
|
}
|
|
2123
2161
|
}
|
|
2124
|
-
function
|
|
2162
|
+
function Wv() {
|
|
2125
2163
|
x.state.isEnabled = !0;
|
|
2126
2164
|
}
|
|
2127
|
-
function
|
|
2165
|
+
function Gv() {
|
|
2128
2166
|
x.hide(), x.state.isEnabled = !1;
|
|
2129
2167
|
}
|
|
2130
|
-
function
|
|
2168
|
+
function Kv() {
|
|
2131
2169
|
clearTimeout(i), clearTimeout(a), cancelAnimationFrame(o);
|
|
2132
2170
|
}
|
|
2133
|
-
function
|
|
2171
|
+
function qv(n) {
|
|
2134
2172
|
if (!x.state.isDestroyed) {
|
|
2135
|
-
F("onBeforeUpdate", [x, n]),
|
|
2173
|
+
F("onBeforeUpdate", [x, n]), Y();
|
|
2136
2174
|
var r = x.props, i = evaluateProps$1(e, Object.assign({}, r, removeUndefinedProps$1(n), { ignoreAttributes: !0 }));
|
|
2137
|
-
x.props = i,
|
|
2175
|
+
x.props = i, J(), r.interactiveDebounce !== i.interactiveDebounce && (R(), g = debounce$1$1(X, i.interactiveDebounce)), r.triggerTarget && !i.triggerTarget ? normalizeToArray$1(r.triggerTarget).forEach(function(e) {
|
|
2138
2176
|
e.removeAttribute("aria-expanded");
|
|
2139
|
-
}) : i.triggerTarget && e.removeAttribute("aria-expanded"), L(), P(), w && w(r, i), x.popperInstance && (
|
|
2177
|
+
}) : i.triggerTarget && e.removeAttribute("aria-expanded"), L(), P(), w && w(r, i), x.popperInstance && (Vv(), Z().forEach(function(e) {
|
|
2140
2178
|
requestAnimationFrame(e._tippy.popperInstance.forceUpdate);
|
|
2141
2179
|
})), F("onAfterUpdate", [x, n]);
|
|
2142
2180
|
}
|
|
2143
2181
|
}
|
|
2144
|
-
function
|
|
2182
|
+
function Jv(e) {
|
|
2145
2183
|
x.setProps({ content: e });
|
|
2146
2184
|
}
|
|
2147
|
-
function
|
|
2185
|
+
function Yv() {
|
|
2148
2186
|
var e = x.state.isVisible, n = x.state.isDestroyed, r = !x.state.isEnabled, i = currentInput$1.isTouch && !x.props.touch, a = getValueAtIndexOrReturn$1(x.props.duration, 0, defaultProps$1.duration);
|
|
2149
2187
|
if (!(e || n || r || i) && !A().hasAttribute("disabled") && (F("onShow", [x], !1), x.props.onShow(x) !== !1)) {
|
|
2150
2188
|
if (x.state.isVisible = !0, k() && (C.style.visibility = "visible"), P(), H(), x.state.isMounted || (C.style.transition = "none"), k()) {
|
|
@@ -2162,10 +2200,10 @@ function createTippy$1(e, n) {
|
|
|
2162
2200
|
x.state.isShown = !0, F("onShown", [x]);
|
|
2163
2201
|
});
|
|
2164
2202
|
}
|
|
2165
|
-
},
|
|
2203
|
+
}, Uv();
|
|
2166
2204
|
}
|
|
2167
2205
|
}
|
|
2168
|
-
function
|
|
2206
|
+
function Xv() {
|
|
2169
2207
|
var e = !x.state.isVisible, n = x.state.isDestroyed, r = !x.state.isEnabled, i = getValueAtIndexOrReturn$1(x.props.duration, 1, defaultProps$1.duration);
|
|
2170
2208
|
if (!(e || n || r) && (F("onHide", [x], !1), x.props.onHide(x) !== !1)) {
|
|
2171
2209
|
if (x.state.isVisible = !1, x.state.isShown = !1, u = !1, s = !1, k() && (C.style.visibility = "hidden"), R(), U(), P(!0), k()) {
|
|
@@ -2175,18 +2213,18 @@ function createTippy$1(e, n) {
|
|
|
2175
2213
|
I(), L(), x.props.animation ? k() && W(i, x.unmount) : x.unmount();
|
|
2176
2214
|
}
|
|
2177
2215
|
}
|
|
2178
|
-
function
|
|
2216
|
+
function Zv(e) {
|
|
2179
2217
|
j().addEventListener("mousemove", g), pushIfUnique$1(mouseMoveListeners$1, g), g(e);
|
|
2180
2218
|
}
|
|
2181
|
-
function
|
|
2182
|
-
x.state.isVisible && x.hide(), x.state.isMounted && (
|
|
2219
|
+
function Qv() {
|
|
2220
|
+
x.state.isVisible && x.hide(), x.state.isMounted && (Hv(), Z().forEach(function(e) {
|
|
2183
2221
|
e._tippy.unmount();
|
|
2184
2222
|
}), C.parentNode && C.parentNode.removeChild(C), mountedInstances$1 = mountedInstances$1.filter(function(e) {
|
|
2185
2223
|
return e !== x;
|
|
2186
2224
|
}), x.state.isMounted = !1, F("onHidden", [x]));
|
|
2187
2225
|
}
|
|
2188
|
-
function
|
|
2189
|
-
x.state.isDestroyed || (x.clearDelayTimeouts(), x.unmount(),
|
|
2226
|
+
function $v() {
|
|
2227
|
+
x.state.isDestroyed || (x.clearDelayTimeouts(), x.unmount(), Y(), delete e._tippy, x.state.isDestroyed = !0, F("onDestroy", [x]));
|
|
2190
2228
|
}
|
|
2191
2229
|
}
|
|
2192
2230
|
function tippy$1(e, n) {
|
|
@@ -2904,7 +2942,7 @@ setDefaultProps$1$1({
|
|
|
2904
2942
|
animateFill
|
|
2905
2943
|
]
|
|
2906
2944
|
});
|
|
2907
|
-
var _hoisted_1$
|
|
2945
|
+
var _hoisted_1$31 = ["src"], shortcut_btn_default = /* @__PURE__ */ defineComponent({
|
|
2908
2946
|
__name: "shortcut-btn",
|
|
2909
2947
|
props: {
|
|
2910
2948
|
mode: {},
|
|
@@ -2928,7 +2966,7 @@ var _hoisted_1$29 = ["src"], shortcut_btn_default = /* @__PURE__ */ defineCompon
|
|
|
2928
2966
|
key: 0,
|
|
2929
2967
|
class: "ai-common-icon ai-shortcut-btn-icon",
|
|
2930
2968
|
src: n.shortcut.icon
|
|
2931
|
-
}, null, 8, _hoisted_1$
|
|
2969
|
+
}, null, 8, _hoisted_1$31)) : createCommentVNode("", !0), createElementVNode("span", { class: normalizeClass(n.shortcut.icon) }, null, 2)], 64)) : (openBlock(), createBlock(resolveDynamicComponent(typeof ((i = n.shortcut) == null ? void 0 : i.icon) == "function" ? (a = (o = n.shortcut).icon) == null ? void 0 : a.call(o, h) : n.shortcut.icon), {
|
|
2932
2970
|
key: 1,
|
|
2933
2971
|
class: "ai-shortcut-btn-icon"
|
|
2934
2972
|
}))], 64)) : n.shortcut && !((f = n.shortcut.components) != null && f.length) ? (openBlock(), createBlock(unref(AgentIcon), {
|
|
@@ -2937,7 +2975,7 @@ var _hoisted_1$29 = ["src"], shortcut_btn_default = /* @__PURE__ */ defineCompon
|
|
|
2937
2975
|
})) : createCommentVNode("", !0), createTextVNode(" " + toDisplayString((p = n.shortcut) == null ? void 0 : p.name), 1)];
|
|
2938
2976
|
}), renderSlot(r.$slots, "append")], 2));
|
|
2939
2977
|
}
|
|
2940
|
-
}), _hoisted_1$
|
|
2978
|
+
}), _hoisted_1$30 = { class: "ai-selection-popover-content" }, _hoisted_2$20 = {
|
|
2941
2979
|
key: 0,
|
|
2942
2980
|
class: "shortcut-menu"
|
|
2943
2981
|
}, ai_selection_default = /* @__PURE__ */ defineComponent({
|
|
@@ -2952,7 +2990,7 @@ var _hoisted_1$29 = ["src"], shortcut_btn_default = /* @__PURE__ */ defineCompon
|
|
|
2952
2990
|
}),
|
|
2953
2991
|
emits: /* @__PURE__ */ mergeModels(["selectShortcut", "selectionChange"], ["update:visible"]),
|
|
2954
2992
|
setup(r, { emit: a }) {
|
|
2955
|
-
useCssVars((e) => ({
|
|
2993
|
+
useCssVars((e) => ({ f9eb3404: unref(SELECTION_Z_INDEX) }));
|
|
2956
2994
|
let o = r, d = useModel(r, "visible"), p = a, m = useTemplateRef("popoverRef"), g = useTemplateRef("moreMenuRef"), _ = shallowRef({
|
|
2957
2995
|
x: 0,
|
|
2958
2996
|
y: 0
|
|
@@ -3066,7 +3104,7 @@ var _hoisted_1$29 = ["src"], shortcut_btn_default = /* @__PURE__ */ defineCompon
|
|
|
3066
3104
|
zIndex: unref(SELECTION_Z_INDEX)
|
|
3067
3105
|
}),
|
|
3068
3106
|
onMousedown: o[2] || (o[2] = withModifiers(() => {}, ["stop"]))
|
|
3069
|
-
}, [createElementVNode("div", _hoisted_1$
|
|
3107
|
+
}, [createElementVNode("div", _hoisted_1$30, [renderSlot(a.$slots, "default", { shortcuts: r.shortcuts }, () => [(openBlock(!0), createElementBlock(Fragment, null, renderList(r.shortcuts.slice(0, r.maxShortcutCount), (n, i) => (openBlock(), createElementBlock(Fragment, { key: n.id }, [i < r.maxShortcutCount ? (openBlock(), createBlock(shortcut_btn_default, {
|
|
3070
3108
|
key: 0,
|
|
3071
3109
|
shortcut: n,
|
|
3072
3110
|
onClick: (e) => w(n)
|
|
@@ -3088,7 +3126,7 @@ var _hoisted_1$29 = ["src"], shortcut_btn_default = /* @__PURE__ */ defineCompon
|
|
|
3088
3126
|
b.value = !0;
|
|
3089
3127
|
})
|
|
3090
3128
|
}, {
|
|
3091
|
-
content: withCtx(() => [b.value ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
3129
|
+
content: withCtx(() => [b.value ? (openBlock(), createElementBlock("div", _hoisted_2$20, [(openBlock(!0), createElementBlock(Fragment, null, renderList(r.shortcuts.slice(r.maxShortcutCount), (e) => (openBlock(), createBlock(shortcut_btn_default, {
|
|
3092
3130
|
key: e.id,
|
|
3093
3131
|
mode: "menu",
|
|
3094
3132
|
shortcut: e,
|
|
@@ -3144,7 +3182,7 @@ const useObserverVisibleList = (e, n, r) => {
|
|
|
3144
3182
|
calculateVisibleMenuItems: a
|
|
3145
3183
|
};
|
|
3146
3184
|
};
|
|
3147
|
-
var _hoisted_1$
|
|
3185
|
+
var _hoisted_1$29 = { class: "shortcut-menu" }, GAP = 4, shortcut_btns_default = /* @__PURE__ */ defineComponent({
|
|
3148
3186
|
__name: "shortcut-btns",
|
|
3149
3187
|
props: { shortcuts: {} },
|
|
3150
3188
|
emits: ["selectShortcut"],
|
|
@@ -3202,7 +3240,7 @@ var _hoisted_1$27 = { class: "shortcut-menu" }, GAP = 4, shortcut_btns_default =
|
|
|
3202
3240
|
b.value = !1;
|
|
3203
3241
|
})
|
|
3204
3242
|
}, {
|
|
3205
|
-
content: withCtx(() => [createElementVNode("div", _hoisted_1$
|
|
3243
|
+
content: withCtx(() => [createElementVNode("div", _hoisted_1$29, [(openBlock(!0), createElementBlock(Fragment, null, renderList(y.value, (e) => (openBlock(), createBlock(shortcut_btn_default, {
|
|
3206
3244
|
key: e.id,
|
|
3207
3245
|
mode: "menu",
|
|
3208
3246
|
shortcut: e,
|
|
@@ -3239,7 +3277,7 @@ function _objectWithoutProperties(e, n) {
|
|
|
3239
3277
|
}
|
|
3240
3278
|
return a;
|
|
3241
3279
|
}
|
|
3242
|
-
var _excluded = ["options"], _excluded2 = ["options"], _hoisted_1$
|
|
3280
|
+
var _excluded = ["options"], _excluded2 = ["options"], _hoisted_1$28 = { class: "shortcut-render" }, _hoisted_2$19 = { class: "shortcut-render-header" }, _hoisted_3$14 = { class: "header-name" }, _hoisted_4$12 = { class: "shortcut-render-content" }, _hoisted_5$8 = { class: "shortcut-footer" }, shortcut_render_default = /* @__PURE__ */ defineComponent({
|
|
3243
3281
|
__name: "shortcut-render",
|
|
3244
3282
|
props: {
|
|
3245
3283
|
components: {},
|
|
@@ -3316,14 +3354,14 @@ var _excluded = ["options"], _excluded2 = ["options"], _hoisted_1$26 = { class:
|
|
|
3316
3354
|
}, x = () => {
|
|
3317
3355
|
a("close");
|
|
3318
3356
|
};
|
|
3319
|
-
return (r, i) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
3357
|
+
return (r, i) => (openBlock(), createElementBlock("div", _hoisted_1$28, [createElementVNode("div", _hoisted_2$19, [
|
|
3320
3358
|
createVNode(unref(ThinkingIcon), { class: "header-icon" }),
|
|
3321
|
-
createElementVNode("span", _hoisted_3$
|
|
3359
|
+
createElementVNode("span", _hoisted_3$14, toDisplayString(n.name), 1),
|
|
3322
3360
|
createVNode(unref(CloseIcon), {
|
|
3323
3361
|
class: "header-close",
|
|
3324
3362
|
onClick: x
|
|
3325
3363
|
})
|
|
3326
|
-
]), createElementVNode("div", _hoisted_4$
|
|
3364
|
+
]), createElementVNode("div", _hoisted_4$12, [createVNode(unref(Form), {
|
|
3327
3365
|
ref_key: "formRef",
|
|
3328
3366
|
ref: o,
|
|
3329
3367
|
class: "shortcut-render-form",
|
|
@@ -3341,7 +3379,7 @@ var _excluded = ["options"], _excluded2 = ["options"], _hoisted_1$26 = { class:
|
|
|
3341
3379
|
default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(_(e))))]),
|
|
3342
3380
|
_: 2
|
|
3343
3381
|
}, 1040, ["style"]))), 128)), createVNode(unref(Form).FormItem, { class: "shortcut-footer-item" }, {
|
|
3344
|
-
default: withCtx(() => [createElementVNode("div", _hoisted_5$
|
|
3382
|
+
default: withCtx(() => [createElementVNode("div", _hoisted_5$8, [createVNode(unref(Button), {
|
|
3345
3383
|
theme: "primary",
|
|
3346
3384
|
onClick: y
|
|
3347
3385
|
}, {
|
|
@@ -6736,7 +6774,7 @@ function parseLatexEnvName(e, n) {
|
|
|
6736
6774
|
endIdx: r + 1
|
|
6737
6775
|
};
|
|
6738
6776
|
}
|
|
6739
|
-
var _hoisted_1$
|
|
6777
|
+
var _hoisted_1$27 = { class: "code-content-wrapper" }, _hoisted_2$18 = { class: "hljs-pre" }, _hoisted_3$13 = ["innerHTML"], _hoisted_4$11 = {
|
|
6740
6778
|
key: 0,
|
|
6741
6779
|
class: "code-line current-line"
|
|
6742
6780
|
}, MAX_CACHE_SIZE = 500, code_content_default = /* @__PURE__ */ defineComponent({
|
|
@@ -6817,22 +6855,22 @@ var _hoisted_1$25 = { class: "code-content-wrapper" }, _hoisted_2$17 = { class:
|
|
|
6817
6855
|
}, {
|
|
6818
6856
|
immediate: !0,
|
|
6819
6857
|
deep: !0
|
|
6820
|
-
}), (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
6858
|
+
}), (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$27, [createElementVNode("pre", _hoisted_2$18, [createElementVNode("code", {
|
|
6821
6859
|
ref_key: "codeRef",
|
|
6822
6860
|
ref: s,
|
|
6823
6861
|
class: normalizeClass(C.value)
|
|
6824
6862
|
}, [(openBlock(!0), createElementBlock(Fragment, null, renderList(f.value, (n, i) => (openBlock(), createElementBlock(Fragment, { key: `completed-${i}` }, [createElementVNode("span", {
|
|
6825
6863
|
class: "code-line",
|
|
6826
6864
|
innerHTML: n.html
|
|
6827
|
-
}, null, 8, _hoisted_3$
|
|
6865
|
+
}, null, 8, _hoisted_3$13), r[0] || (r[0] = createTextVNode(toDisplayString("\n"), -1))], 64))), 128)), p.value ? (openBlock(), createElementBlock("span", _hoisted_4$11, toDisplayString(p.value), 1)) : createCommentVNode("", !0)], 2)])]));
|
|
6828
6866
|
}
|
|
6829
|
-
}), import_debounce = /* @__PURE__ */ __toESM(require_debounce()), _hoisted_1$
|
|
6867
|
+
}), import_debounce = /* @__PURE__ */ __toESM(require_debounce()), _hoisted_1$26 = { class: "md-image-wrapper" }, _hoisted_2$17 = {
|
|
6830
6868
|
key: 0,
|
|
6831
6869
|
class: "md-image-loading"
|
|
6832
|
-
}, _hoisted_3$
|
|
6870
|
+
}, _hoisted_3$12 = { class: "md-image-loading-text" }, _hoisted_4$10 = {
|
|
6833
6871
|
key: 1,
|
|
6834
6872
|
class: "md-image-error"
|
|
6835
|
-
}, _hoisted_5$
|
|
6873
|
+
}, _hoisted_5$7 = { class: "md-image-error-text" }, _hoisted_6$2 = ["alt", "src"], image_content_default = /* @__PURE__ */ defineComponent({
|
|
6836
6874
|
__name: "image-content",
|
|
6837
6875
|
props: {
|
|
6838
6876
|
alt: {},
|
|
@@ -6881,17 +6919,17 @@ var _hoisted_1$25 = { class: "code-content-wrapper" }, _hoisted_2$17 = { class:
|
|
|
6881
6919
|
c.value = !1, g(), _.value ? v(e) : (o.value = !0, s.value = !1);
|
|
6882
6920
|
}, { immediate: !0 }), watch(_, (e) => {
|
|
6883
6921
|
e && r.src && v(r.src);
|
|
6884
|
-
}), (n, r) => (openBlock(), createElementBlock("span", _hoisted_1$
|
|
6922
|
+
}), (n, r) => (openBlock(), createElementBlock("span", _hoisted_1$26, [p.value ? (openBlock(), createElementBlock("span", _hoisted_2$17, [createVNode(unref(Loading), {
|
|
6885
6923
|
mode: "spin",
|
|
6886
6924
|
size: "mini",
|
|
6887
6925
|
theme: "primary"
|
|
6888
|
-
}), createElementVNode("span", _hoisted_3$
|
|
6926
|
+
}), createElementVNode("span", _hoisted_3$12, toDisplayString(unref(t)("图片加载中...")), 1)])) : m.value ? (openBlock(), createElementBlock("span", _hoisted_4$10, [r[0] || (r[0] = createElementVNode("span", { class: "md-image-error-icon" }, "⚠️", -1)), createElementVNode("span", _hoisted_5$7, toDisplayString(e.alt || unref(t)("图片加载失败")), 1)])) : (openBlock(), createElementBlock("img", {
|
|
6889
6927
|
key: 2,
|
|
6890
6928
|
alt: e.alt,
|
|
6891
6929
|
class: "md-image",
|
|
6892
6930
|
loading: "lazy",
|
|
6893
6931
|
src: e.src
|
|
6894
|
-
}, null, 8, _hoisted_6$
|
|
6932
|
+
}, null, 8, _hoisted_6$2))]));
|
|
6895
6933
|
}
|
|
6896
6934
|
}), import_throttle$2 = /* @__PURE__ */ __toESM(require_throttle()), ErrorColor = "#cc0000", latex_content_default = /* @__PURE__ */ defineComponent({
|
|
6897
6935
|
__name: "latex-content",
|
|
@@ -7117,7 +7155,7 @@ var _hoisted_1$25 = { class: "code-content-wrapper" }, _hoisted_2$17 = { class:
|
|
|
7117
7155
|
innerHTML: r.value
|
|
7118
7156
|
}, null, 8, ["class", "innerHTML"]));
|
|
7119
7157
|
}
|
|
7120
|
-
}), import_throttle$1 = /* @__PURE__ */ __toESM(require_throttle()), _hoisted_1$
|
|
7158
|
+
}), import_throttle$1 = /* @__PURE__ */ __toESM(require_throttle()), _hoisted_1$25 = ["innerHTML"], mermaid_content_default = /* @__PURE__ */ defineComponent({
|
|
7121
7159
|
__name: "mermaid-content",
|
|
7122
7160
|
props: { token: {} },
|
|
7123
7161
|
emits: ["mounted"],
|
|
@@ -7176,13 +7214,13 @@ var _hoisted_1$25 = { class: "code-content-wrapper" }, _hoisted_2$17 = { class:
|
|
|
7176
7214
|
ref: i,
|
|
7177
7215
|
class: "mermaid-content",
|
|
7178
7216
|
innerHTML: r.value
|
|
7179
|
-
}, null, 8, _hoisted_1$
|
|
7217
|
+
}, null, 8, _hoisted_1$25));
|
|
7180
7218
|
}
|
|
7181
|
-
}), _hoisted_1$
|
|
7219
|
+
}), _hoisted_1$24 = { class: "error-content" }, common_error_content_default = /* @__PURE__ */ defineComponent({
|
|
7182
7220
|
__name: "common-error-content",
|
|
7183
7221
|
props: { content: {} },
|
|
7184
7222
|
setup(e) {
|
|
7185
|
-
return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
7223
|
+
return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$24, [createVNode(unref(ErrorIcon)), createTextVNode(" " + toDisplayString(e.content), 1)]));
|
|
7186
7224
|
}
|
|
7187
7225
|
}), keyCounterMap = /* @__PURE__ */ new Map(), resetKeyCounter = () => {
|
|
7188
7226
|
keyCounterMap = /* @__PURE__ */ new Map();
|
|
@@ -7348,7 +7386,7 @@ var vnode_renderer_default = defineComponent({
|
|
|
7348
7386
|
setup(e) {
|
|
7349
7387
|
return () => tokensToVNodes(e.tokens, e.options);
|
|
7350
7388
|
}
|
|
7351
|
-
}), import_throttle = /* @__PURE__ */ __toESM(require_throttle()), _hoisted_1$
|
|
7389
|
+
}), import_throttle = /* @__PURE__ */ __toESM(require_throttle()), _hoisted_1$23 = { class: "markdown-content" }, _hoisted_2$16 = {
|
|
7352
7390
|
key: 1,
|
|
7353
7391
|
class: "markdown-body"
|
|
7354
7392
|
}, markdown_content_default = /* @__PURE__ */ defineComponent({
|
|
@@ -7419,6 +7457,10 @@ var vnode_renderer_default = defineComponent({
|
|
|
7419
7457
|
return n;
|
|
7420
7458
|
};
|
|
7421
7459
|
watch(() => i.content, (0, import_throttle.default)((e) => {
|
|
7460
|
+
if (!e) {
|
|
7461
|
+
o.value = [];
|
|
7462
|
+
return;
|
|
7463
|
+
}
|
|
7422
7464
|
let { content: n, isIncomplete: r } = completeMarkdownSyntax$1(e);
|
|
7423
7465
|
if (r && o.value.length > 0) return;
|
|
7424
7466
|
let i = m(c.parse(n, {}));
|
|
@@ -7438,10 +7480,10 @@ var vnode_renderer_default = defineComponent({
|
|
|
7438
7480
|
leading: !0,
|
|
7439
7481
|
trailing: !0
|
|
7440
7482
|
});
|
|
7441
|
-
return (r, i) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
7483
|
+
return (r, i) => (openBlock(), createElementBlock("div", _hoisted_1$23, [n.status === unref(MessageStatus).Error ? (openBlock(), createBlock(common_error_content_default, {
|
|
7442
7484
|
key: 0,
|
|
7443
7485
|
content: n.content
|
|
7444
|
-
}, null, 8, ["content"])) : (openBlock(), createElementBlock("div", _hoisted_2$
|
|
7486
|
+
}, null, 8, ["content"])) : (openBlock(), createElementBlock("div", _hoisted_2$16, [(openBlock(!0), createElementBlock(Fragment, null, renderList(o.value, (n, r) => (openBlock(), createElementBlock(Fragment, { key: r }, [d(n) ? (openBlock(), createBlock(unref(mermaid_content_default), {
|
|
7445
7487
|
key: r,
|
|
7446
7488
|
token: n,
|
|
7447
7489
|
onMounted: unref(g)
|
|
@@ -7460,7 +7502,7 @@ var vnode_renderer_default = defineComponent({
|
|
|
7460
7502
|
onVnodeMounted: unref(g)
|
|
7461
7503
|
}, null, 8, ["tokens", "onVnodeMounted"]))], 64))), 128))]))]));
|
|
7462
7504
|
}
|
|
7463
|
-
}), _hoisted_1$
|
|
7505
|
+
}), _hoisted_1$22 = ["onClick"], reference_content_default = /* @__PURE__ */ defineComponent({
|
|
7464
7506
|
__name: "reference-content",
|
|
7465
7507
|
props: { content: {} },
|
|
7466
7508
|
setup(n) {
|
|
@@ -7469,32 +7511,26 @@ var vnode_renderer_default = defineComponent({
|
|
|
7469
7511
|
}, o = computed(() => r.content.filter((e) => e.name).map((e) => ({
|
|
7470
7512
|
title: e.name,
|
|
7471
7513
|
url: e.url,
|
|
7472
|
-
originFileUrl: e.
|
|
7473
|
-
icon: e.icon
|
|
7514
|
+
originFileUrl: e.originFile
|
|
7474
7515
|
})));
|
|
7475
7516
|
return (n, r) => (openBlock(!0), createElementBlock(Fragment, null, renderList(o.value, (e) => (openBlock(), createElementBlock("div", {
|
|
7476
7517
|
key: e.title,
|
|
7477
7518
|
class: "ai-reference-item"
|
|
7478
7519
|
}, [
|
|
7479
|
-
|
|
7480
|
-
key: 0,
|
|
7481
|
-
class: "ai-reference-img",
|
|
7482
|
-
src: e.icon
|
|
7483
|
-
}, null, 8, _hoisted_1$20)) : createCommentVNode("", !0),
|
|
7484
|
-
createVNode(unref(LinkIcon)),
|
|
7520
|
+
createVNode(unref(DocLinkIcon), { color: "#D66F6B" }),
|
|
7485
7521
|
createElementVNode("span", {
|
|
7486
7522
|
class: "ai-reference-item-title",
|
|
7487
7523
|
onClick: (n) => e.url && i(e.url, n)
|
|
7488
|
-
}, toDisplayString(e.title), 9,
|
|
7524
|
+
}, toDisplayString(e.title), 9, _hoisted_1$22),
|
|
7489
7525
|
e.url && e.originFileUrl ? withDirectives((openBlock(), createBlock(unref(PreviewIcon), {
|
|
7490
|
-
key:
|
|
7526
|
+
key: 0,
|
|
7491
7527
|
onClick: (n) => e.url && i(e.url, n)
|
|
7492
7528
|
}, null, 8, ["onClick"])), [[unref(directive), {
|
|
7493
7529
|
content: unref(t)("预览内容"),
|
|
7494
7530
|
theme: "ai-chat-box"
|
|
7495
7531
|
}]]) : createCommentVNode("", !0),
|
|
7496
7532
|
e.url && e.originFileUrl ? withDirectives((openBlock(), createBlock(unref(TargetIcon), {
|
|
7497
|
-
key:
|
|
7533
|
+
key: 1,
|
|
7498
7534
|
onClick: (n) => e.originFileUrl && i(e.originFileUrl, n)
|
|
7499
7535
|
}, null, 8, ["onClick"])), [[unref(directive), {
|
|
7500
7536
|
content: unref(t)("跳转详情"),
|
|
@@ -8043,17 +8079,75 @@ const voidNode = ({ is: e, data: n, plain: r = emptyString }) => ({
|
|
|
8043
8079
|
return stringToDoc(e.getData("text/plain"));
|
|
8044
8080
|
}
|
|
8045
8081
|
};
|
|
8082
|
+
}, resourceTypeMap = {
|
|
8083
|
+
tool: "工具",
|
|
8084
|
+
mcp: "MCP",
|
|
8085
|
+
doc: "知识库",
|
|
8086
|
+
shortcut: "快捷指令"
|
|
8087
|
+
}, noop = () => {}, MessageState = {
|
|
8088
|
+
ACTIVE: "active",
|
|
8089
|
+
DISABLED: "disabled",
|
|
8090
|
+
LOADING: "loading"
|
|
8046
8091
|
};
|
|
8047
|
-
|
|
8092
|
+
let UploadStatus = /* @__PURE__ */ function(e) {
|
|
8093
|
+
return e.Error = "error", e.Pending = "pending", e.Success = "success", e;
|
|
8094
|
+
}({});
|
|
8095
|
+
var _hoisted_1$21 = { class: "file-upload-btn" }, _hoisted_2$15 = ["accept"], file_upload_btn_default = /* @__PURE__ */ defineComponent({
|
|
8096
|
+
__name: "file-upload-btn",
|
|
8097
|
+
props: {
|
|
8098
|
+
accept: { default: "image/*" },
|
|
8099
|
+
maxFiles: { default: 3 },
|
|
8100
|
+
multiple: {
|
|
8101
|
+
type: Boolean,
|
|
8102
|
+
default: !0
|
|
8103
|
+
}
|
|
8104
|
+
},
|
|
8105
|
+
emits: ["upload"],
|
|
8106
|
+
setup(e, { emit: n }) {
|
|
8107
|
+
let r = e, i = n, a = useTemplateRef("fileInputRef"), o = () => {
|
|
8108
|
+
var e;
|
|
8109
|
+
(e = a.value) == null || e.click();
|
|
8110
|
+
}, s = (e) => {
|
|
8111
|
+
let n = e.target, a = n.files;
|
|
8112
|
+
if (a != null && a.length) {
|
|
8113
|
+
if (a.length > Math.max(r.maxFiles, 3)) {
|
|
8114
|
+
Message({
|
|
8115
|
+
message: isEn ? `You can only upload up to ${r.maxFiles} files` : `最多上传${r.maxFiles}个文件`,
|
|
8116
|
+
theme: "error"
|
|
8117
|
+
});
|
|
8118
|
+
return;
|
|
8119
|
+
}
|
|
8120
|
+
i("upload", Array.from(a).filter((e) => e.size > 0 && e.size < 2621440));
|
|
8121
|
+
}
|
|
8122
|
+
n.value = "";
|
|
8123
|
+
};
|
|
8124
|
+
return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$21, [createElementVNode("input", {
|
|
8125
|
+
ref_key: "fileInputRef",
|
|
8126
|
+
ref: a,
|
|
8127
|
+
accept: e.accept,
|
|
8128
|
+
class: "file-upload-btn-input",
|
|
8129
|
+
multiple: "",
|
|
8130
|
+
type: "file",
|
|
8131
|
+
onChange: s
|
|
8132
|
+
}, null, 40, _hoisted_2$15), withDirectives((openBlock(), createElementBlock("span", {
|
|
8133
|
+
class: "ai-shortcut-btn file-upload-btn-icon",
|
|
8134
|
+
onClick: o
|
|
8135
|
+
}, [renderSlot(n.$slots, "default", {}, () => [createVNode(unref(FileUploadIcon))])])), [[unref(directive), {
|
|
8136
|
+
content: unref(t)("上传文件"),
|
|
8137
|
+
theme: "ai-chat-box",
|
|
8138
|
+
offset: [0, 16]
|
|
8139
|
+
}]])]));
|
|
8140
|
+
}
|
|
8141
|
+
}), _hoisted_1$20 = { class: "ai-cite-content" }, _hoisted_2$14 = { class: "ai-cite-content-text" }, cite_content_default = /* @__PURE__ */ defineComponent({
|
|
8048
8142
|
__name: "cite-content",
|
|
8049
8143
|
props: {
|
|
8050
8144
|
content: {},
|
|
8051
8145
|
onClose: { type: Function }
|
|
8052
8146
|
},
|
|
8053
8147
|
setup(e) {
|
|
8054
|
-
return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$
|
|
8148
|
+
return (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$20, [
|
|
8055
8149
|
createVNode(unref(CiteIcon)),
|
|
8056
|
-
createElementVNode("span", _hoisted_2$
|
|
8150
|
+
createElementVNode("span", _hoisted_2$14, toDisplayString(e.content), 1),
|
|
8057
8151
|
e.onClose ? (openBlock(), createBlock(unref(CloseIcon), {
|
|
8058
8152
|
key: 0,
|
|
8059
8153
|
onClick: r[0] || (r[0] = (n) => {
|
|
@@ -8063,6 +8157,54 @@ var _hoisted_1$19 = { class: "ai-cite-content" }, _hoisted_2$13 = { class: "ai-c
|
|
|
8063
8157
|
})) : createCommentVNode("", !0)
|
|
8064
8158
|
]));
|
|
8065
8159
|
}
|
|
8160
|
+
}), _hoisted_1$19 = { class: "ai-files-content" }, _hoisted_2$13 = [
|
|
8161
|
+
"alt",
|
|
8162
|
+
"src",
|
|
8163
|
+
"onError"
|
|
8164
|
+
], _hoisted_3$11 = {
|
|
8165
|
+
key: 1,
|
|
8166
|
+
class: "file-content-image image-error"
|
|
8167
|
+
}, _hoisted_4$9 = {
|
|
8168
|
+
key: 2,
|
|
8169
|
+
class: "file-content-object"
|
|
8170
|
+
}, _hoisted_5$6 = { class: "file-description" }, _hoisted_6$1 = { class: "file-name" }, _hoisted_7$1 = { class: "file-type" }, _hoisted_8 = { class: "file-size" }, file_content_default = /* @__PURE__ */ defineComponent({
|
|
8171
|
+
__name: "file-content",
|
|
8172
|
+
props: {
|
|
8173
|
+
files: {},
|
|
8174
|
+
readonly: { type: Boolean }
|
|
8175
|
+
},
|
|
8176
|
+
emits: ["deleteFile"],
|
|
8177
|
+
setup(n, { emit: r }) {
|
|
8178
|
+
let i = r, a = reactive({}), o = (e) => {
|
|
8179
|
+
var n;
|
|
8180
|
+
return e.url || ((n = e.file) == null ? void 0 : n.name) || "";
|
|
8181
|
+
}, d = (e) => {
|
|
8182
|
+
a[o(e)] = !0;
|
|
8183
|
+
}, p = (e) => {
|
|
8184
|
+
i("deleteFile", e);
|
|
8185
|
+
};
|
|
8186
|
+
return (r, i) => (openBlock(), createElementBlock("div", _hoisted_1$19, [(openBlock(!0), createElementBlock(Fragment, null, renderList(n.files, (e) => {
|
|
8187
|
+
var r, i, m, g, _, v, y, b;
|
|
8188
|
+
return openBlock(), createElementBlock("div", {
|
|
8189
|
+
key: (r = e.file) == null ? void 0 : r.name,
|
|
8190
|
+
class: normalizeClass(["file-content", { "is-file-object": !unref(isImageFile)(e.mimeType || ((i = e.file) == null ? void 0 : i.type)) || a[o(e)] }])
|
|
8191
|
+
}, [unref(isImageFile)(e.mimeType || ((m = e.file) == null ? void 0 : m.type)) && !a[o(e)] ? (openBlock(), createElementBlock("img", {
|
|
8192
|
+
key: 0,
|
|
8193
|
+
alt: e.filename || ((g = e.file) == null ? void 0 : g.name),
|
|
8194
|
+
class: "file-content-image",
|
|
8195
|
+
src: e.url || unref(getFilePreviewUrl)(e.file),
|
|
8196
|
+
onError: (n) => d(e)
|
|
8197
|
+
}, null, 40, _hoisted_2$13)) : unref(isImageFile)(e.mimeType || ((_ = e.file) == null ? void 0 : _.type)) && a[o(e)] ? (openBlock(), createElementBlock("div", _hoisted_3$11, [createVNode(unref(ImageErrorIcon), { class: "file-error-icon" })])) : (openBlock(), createElementBlock("div", _hoisted_4$9, [createElementVNode("div", _hoisted_5$6, [
|
|
8198
|
+
createVNode(unref(DocumentIcon), { class: "file-icon" }),
|
|
8199
|
+
createElementVNode("span", _hoisted_6$1, toDisplayString(e.filename || ((v = e.file) == null ? void 0 : v.name)), 1),
|
|
8200
|
+
createElementVNode("span", _hoisted_7$1, toDisplayString(e.file ? unref(getFileExtension)(e.file) : ((y = e.filename) == null ? void 0 : y.split(".").pop()) || ((b = e.mimeType) == null ? void 0 : b.split("/").pop())), 1)
|
|
8201
|
+
]), createElementVNode("div", _hoisted_8, toDisplayString(unref(formatFileSize)(e.file)), 1)])), n.readonly ? createCommentVNode("", !0) : (openBlock(), createBlock(unref(DeleteCircleIcon), {
|
|
8202
|
+
key: 3,
|
|
8203
|
+
class: "file-delete-icon",
|
|
8204
|
+
onClick: (n) => p(e)
|
|
8205
|
+
}, null, 8, ["onClick"]))], 2);
|
|
8206
|
+
}), 128))]));
|
|
8207
|
+
}
|
|
8066
8208
|
}), _hoisted_1$18 = ["onClick"], ai_prompt_list_default = /* @__PURE__ */ defineComponent({
|
|
8067
8209
|
__name: "ai-prompt-list",
|
|
8068
8210
|
props: {
|
|
@@ -8748,12 +8890,12 @@ function preventOverflow(e) {
|
|
|
8748
8890
|
var j, M = S === "y" ? "top" : left, N = S === "y" ? bottom : right, P = S === "y" ? "height" : "width", F = w[S], I = F + v[M], L = F - v[N], R = m ? -E[P] / 2 : 0, z = b === "start" ? T[P] : E[P], B = b === "start" ? -E[P] : -T[P], V = n.elements.arrow, H = m && V ? getLayoutRect(V) : {
|
|
8749
8891
|
width: 0,
|
|
8750
8892
|
height: 0
|
|
8751
|
-
}, U = n.modifiersData["arrow#persistent"] ? n.modifiersData["arrow#persistent"].padding : getFreshSideObject(), W = U[M], G = U[N], K = within(0, T[P], H[P]), q = x ? T[P] / 2 - R - K - W - O.mainAxis : z - K - W - O.mainAxis,
|
|
8752
|
-
w[S] =
|
|
8893
|
+
}, U = n.modifiersData["arrow#persistent"] ? n.modifiersData["arrow#persistent"].padding : getFreshSideObject(), W = U[M], G = U[N], K = within(0, T[P], H[P]), q = x ? T[P] / 2 - R - K - W - O.mainAxis : z - K - W - O.mainAxis, J = x ? -T[P] / 2 + R + K + G + O.mainAxis : B + K + G + O.mainAxis, Y = n.elements.arrow && getOffsetParent(n.elements.arrow), Lv = Y ? S === "y" ? Y.clientTop || 0 : Y.clientLeft || 0 : 0, X = (j = k == null ? void 0 : k[S]) == null ? 0 : j, Rv = F + q - X - Lv, zv = F + J - X, Bv = within(m ? min$1(I, Rv) : I, F, m ? max(L, zv) : L);
|
|
8894
|
+
w[S] = Bv, A[S] = Bv - F;
|
|
8753
8895
|
}
|
|
8754
8896
|
if (c) {
|
|
8755
|
-
var
|
|
8756
|
-
w[C] =
|
|
8897
|
+
var Vv, Hv = S === "x" ? "top" : left, Uv = S === "x" ? bottom : right, Z = w[C], Q = C === "y" ? "height" : "width", $ = Z + v[Hv], Wv = Z - v[Uv], Gv = ["top", left].indexOf(y) !== -1, Kv = (Vv = k == null ? void 0 : k[C]) == null ? 0 : Vv, qv = Gv ? $ : Z - T[Q] - E[Q] - Kv + O.altAxis, Jv = Gv ? Z + T[Q] + E[Q] - Kv - O.altAxis : Wv, Yv = m && Gv ? withinMaxClamp(qv, Z, Jv) : within(m ? qv : $, Z, m ? Jv : Wv);
|
|
8898
|
+
w[C] = Yv, A[C] = Yv - Z;
|
|
8757
8899
|
}
|
|
8758
8900
|
n.modifiersData[i] = A;
|
|
8759
8901
|
}
|
|
@@ -9279,7 +9421,7 @@ function render(e) {
|
|
|
9279
9421
|
render.$$tippy = !0;
|
|
9280
9422
|
var idCounter = 1, mouseMoveListeners = [], mountedInstances = [];
|
|
9281
9423
|
function createTippy(e, n) {
|
|
9282
|
-
var r = evaluateProps(e, Object.assign({}, defaultProps, getExtendedPassedProps(removeUndefinedProps(n)))), i, a, o, s = !1, c = !1, l = !1, u = !1, d, f, p, m = [], g = debounce(
|
|
9424
|
+
var r = evaluateProps(e, Object.assign({}, defaultProps, getExtendedPassedProps(removeUndefinedProps(n)))), i, a, o, s = !1, c = !1, l = !1, u = !1, d, f, p, m = [], g = debounce(X, r.interactiveDebounce), _, v = idCounter++, y = null, b = unique(r.plugins), x = {
|
|
9283
9425
|
id: v,
|
|
9284
9426
|
reference: e,
|
|
9285
9427
|
popper: div(),
|
|
@@ -9293,16 +9435,16 @@ function createTippy(e, n) {
|
|
|
9293
9435
|
isShown: !1
|
|
9294
9436
|
},
|
|
9295
9437
|
plugins: b,
|
|
9296
|
-
clearDelayTimeouts:
|
|
9297
|
-
setProps:
|
|
9298
|
-
setContent:
|
|
9299
|
-
show:
|
|
9300
|
-
hide:
|
|
9301
|
-
hideWithInteractivity:
|
|
9302
|
-
enable:
|
|
9303
|
-
disable:
|
|
9304
|
-
unmount:
|
|
9305
|
-
destroy:
|
|
9438
|
+
clearDelayTimeouts: Kv,
|
|
9439
|
+
setProps: qv,
|
|
9440
|
+
setContent: Jv,
|
|
9441
|
+
show: Yv,
|
|
9442
|
+
hide: Xv,
|
|
9443
|
+
hideWithInteractivity: Zv,
|
|
9444
|
+
enable: Wv,
|
|
9445
|
+
disable: Gv,
|
|
9446
|
+
unmount: Qv,
|
|
9447
|
+
destroy: $v
|
|
9306
9448
|
};
|
|
9307
9449
|
/* istanbul ignore if */
|
|
9308
9450
|
if (!r.render) return process.env.NODE_ENV !== "production" && errorWhen(!0, "render() function has not been supplied."), x;
|
|
@@ -9311,7 +9453,7 @@ function createTippy(e, n) {
|
|
|
9311
9453
|
var T = b.map(function(e) {
|
|
9312
9454
|
return e.fn(x);
|
|
9313
9455
|
}), E = e.hasAttribute("aria-expanded");
|
|
9314
|
-
return
|
|
9456
|
+
return J(), L(), P(), F("onCreate", [x]), r.showOnCreate && Q(), C.addEventListener("mouseenter", function() {
|
|
9315
9457
|
x.props.interactive && x.state.isVisible && x.clearDelayTimeouts();
|
|
9316
9458
|
}), C.addEventListener("mouseleave", function() {
|
|
9317
9459
|
x.props.interactive && x.props.trigger.indexOf("mouseenter") >= 0 && j().addEventListener("mousemove", g);
|
|
@@ -9430,37 +9572,37 @@ function createTippy(e, n) {
|
|
|
9430
9572
|
});
|
|
9431
9573
|
});
|
|
9432
9574
|
}
|
|
9433
|
-
function
|
|
9434
|
-
O() && (q("touchstart",
|
|
9435
|
-
if (e !== "manual") switch (q(e,
|
|
9575
|
+
function J() {
|
|
9576
|
+
O() && (q("touchstart", Lv, { passive: !0 }), q("touchend", Rv, { passive: !0 })), splitBySpaces(x.props.trigger).forEach(function(e) {
|
|
9577
|
+
if (e !== "manual") switch (q(e, Lv), e) {
|
|
9436
9578
|
case "mouseenter":
|
|
9437
|
-
q("mouseleave",
|
|
9579
|
+
q("mouseleave", Rv);
|
|
9438
9580
|
break;
|
|
9439
9581
|
case "focus":
|
|
9440
|
-
q(isIE11 ? "focusout" : "blur",
|
|
9582
|
+
q(isIE11 ? "focusout" : "blur", zv);
|
|
9441
9583
|
break;
|
|
9442
9584
|
case "focusin":
|
|
9443
|
-
q("focusout",
|
|
9585
|
+
q("focusout", zv);
|
|
9444
9586
|
break;
|
|
9445
9587
|
}
|
|
9446
9588
|
});
|
|
9447
9589
|
}
|
|
9448
|
-
function
|
|
9590
|
+
function Y() {
|
|
9449
9591
|
m.forEach(function(e) {
|
|
9450
9592
|
var n = e.node, r = e.eventType, i = e.handler, a = e.options;
|
|
9451
9593
|
n.removeEventListener(r, i, a);
|
|
9452
9594
|
}), m = [];
|
|
9453
9595
|
}
|
|
9454
|
-
function
|
|
9596
|
+
function Lv(e) {
|
|
9455
9597
|
var n, r = !1;
|
|
9456
|
-
if (!(!x.state.isEnabled ||
|
|
9598
|
+
if (!(!x.state.isEnabled || Bv(e) || c)) {
|
|
9457
9599
|
var i = ((n = d) == null ? void 0 : n.type) === "focus";
|
|
9458
9600
|
d = e, _ = e.currentTarget, L(), !x.state.isVisible && isMouseEvent(e) && mouseMoveListeners.forEach(function(n) {
|
|
9459
9601
|
return n(e);
|
|
9460
9602
|
}), e.type === "click" && (x.props.trigger.indexOf("mouseenter") < 0 || s) && x.props.hideOnClick !== !1 && x.state.isVisible ? r = !0 : Q(e), e.type === "click" && (s = !r), r && !i && $(e);
|
|
9461
9603
|
}
|
|
9462
9604
|
}
|
|
9463
|
-
function
|
|
9605
|
+
function X(e) {
|
|
9464
9606
|
var n = e.target, i = A().contains(n) || C.contains(n);
|
|
9465
9607
|
e.type === "mousemove" && i || isCursorOutsideInteractiveBorder(Z().concat(C).map(function(e) {
|
|
9466
9608
|
var n, i = (n = e._tippy.popperInstance) == null ? void 0 : n.state;
|
|
@@ -9471,8 +9613,8 @@ function createTippy(e, n) {
|
|
|
9471
9613
|
} : null;
|
|
9472
9614
|
}).filter(Boolean), e) && (R(), $(e));
|
|
9473
9615
|
}
|
|
9474
|
-
function
|
|
9475
|
-
if (!(
|
|
9616
|
+
function Rv(e) {
|
|
9617
|
+
if (!(Bv(e) || x.props.trigger.indexOf("click") >= 0 && s)) {
|
|
9476
9618
|
if (x.props.interactive) {
|
|
9477
9619
|
x.hideWithInteractivity(e);
|
|
9478
9620
|
return;
|
|
@@ -9480,14 +9622,14 @@ function createTippy(e, n) {
|
|
|
9480
9622
|
$(e);
|
|
9481
9623
|
}
|
|
9482
9624
|
}
|
|
9483
|
-
function
|
|
9625
|
+
function zv(e) {
|
|
9484
9626
|
x.props.trigger.indexOf("focusin") < 0 && e.target !== A() || x.props.interactive && e.relatedTarget && C.contains(e.relatedTarget) || $(e);
|
|
9485
9627
|
}
|
|
9486
|
-
function
|
|
9628
|
+
function Bv(e) {
|
|
9487
9629
|
return currentInput.isTouch ? O() !== e.type.indexOf("touch") >= 0 : !1;
|
|
9488
9630
|
}
|
|
9489
|
-
function
|
|
9490
|
-
|
|
9631
|
+
function Vv() {
|
|
9632
|
+
Hv();
|
|
9491
9633
|
var n = x.props, r = n.popperOptions, i = n.placement, a = n.offset, o = n.getReferenceClientRect, s = n.moveTransition, c = k() ? getChildren(C).arrow : null, l = o ? {
|
|
9492
9634
|
getBoundingClientRect: o,
|
|
9493
9635
|
contextElement: o.contextElement || A()
|
|
@@ -9545,13 +9687,13 @@ function createTippy(e, n) {
|
|
|
9545
9687
|
modifiers: u
|
|
9546
9688
|
}));
|
|
9547
9689
|
}
|
|
9548
|
-
function
|
|
9690
|
+
function Hv() {
|
|
9549
9691
|
x.popperInstance && (x.popperInstance.destroy(), x.popperInstance = null);
|
|
9550
9692
|
}
|
|
9551
|
-
function
|
|
9693
|
+
function Uv() {
|
|
9552
9694
|
var e = x.props.appendTo, n, r = A();
|
|
9553
9695
|
/* istanbul ignore else */
|
|
9554
|
-
n = x.props.interactive && e === TIPPY_DEFAULT_APPEND_TO || e === "parent" ? r.parentNode : invokeWithArgsOrReturn(e, [r]), n.contains(C) || n.appendChild(C), x.state.isMounted = !0,
|
|
9696
|
+
n = x.props.interactive && e === TIPPY_DEFAULT_APPEND_TO || e === "parent" ? r.parentNode : invokeWithArgsOrReturn(e, [r]), n.contains(C) || n.appendChild(C), x.state.isMounted = !0, Vv(), process.env.NODE_ENV !== "production" && warnWhen(x.props.interactive && e === defaultProps.appendTo && r.nextElementSibling !== C, [
|
|
9555
9697
|
"Interactive tippy element may not be accessible via keyboard",
|
|
9556
9698
|
"navigation because it is not directly after the reference element",
|
|
9557
9699
|
"in the DOM source order.",
|
|
@@ -9590,31 +9732,31 @@ function createTippy(e, n) {
|
|
|
9590
9732
|
});
|
|
9591
9733
|
}
|
|
9592
9734
|
}
|
|
9593
|
-
function
|
|
9735
|
+
function Wv() {
|
|
9594
9736
|
x.state.isEnabled = !0;
|
|
9595
9737
|
}
|
|
9596
|
-
function
|
|
9738
|
+
function Gv() {
|
|
9597
9739
|
x.hide(), x.state.isEnabled = !1;
|
|
9598
9740
|
}
|
|
9599
|
-
function
|
|
9741
|
+
function Kv() {
|
|
9600
9742
|
clearTimeout(i), clearTimeout(a), cancelAnimationFrame(o);
|
|
9601
9743
|
}
|
|
9602
|
-
function
|
|
9744
|
+
function qv(n) {
|
|
9603
9745
|
/* istanbul ignore else */
|
|
9604
9746
|
if (process.env.NODE_ENV !== "production" && warnWhen(x.state.isDestroyed, createMemoryLeakWarning("setProps")), !x.state.isDestroyed) {
|
|
9605
|
-
F("onBeforeUpdate", [x, n]),
|
|
9747
|
+
F("onBeforeUpdate", [x, n]), Y();
|
|
9606
9748
|
var r = x.props, i = evaluateProps(e, Object.assign({}, r, removeUndefinedProps(n), { ignoreAttributes: !0 }));
|
|
9607
|
-
x.props = i,
|
|
9749
|
+
x.props = i, J(), r.interactiveDebounce !== i.interactiveDebounce && (R(), g = debounce(X, i.interactiveDebounce)), r.triggerTarget && !i.triggerTarget ? normalizeToArray(r.triggerTarget).forEach(function(e) {
|
|
9608
9750
|
e.removeAttribute("aria-expanded");
|
|
9609
|
-
}) : i.triggerTarget && e.removeAttribute("aria-expanded"), L(), P(), w && w(r, i), x.popperInstance && (
|
|
9751
|
+
}) : i.triggerTarget && e.removeAttribute("aria-expanded"), L(), P(), w && w(r, i), x.popperInstance && (Vv(), Z().forEach(function(e) {
|
|
9610
9752
|
requestAnimationFrame(e._tippy.popperInstance.forceUpdate);
|
|
9611
9753
|
})), F("onAfterUpdate", [x, n]);
|
|
9612
9754
|
}
|
|
9613
9755
|
}
|
|
9614
|
-
function
|
|
9756
|
+
function Jv(e) {
|
|
9615
9757
|
x.setProps({ content: e });
|
|
9616
9758
|
}
|
|
9617
|
-
function
|
|
9759
|
+
function Yv() {
|
|
9618
9760
|
/* istanbul ignore else */
|
|
9619
9761
|
process.env.NODE_ENV !== "production" && warnWhen(x.state.isDestroyed, createMemoryLeakWarning("show"));
|
|
9620
9762
|
var e = x.state.isVisible, n = x.state.isDestroyed, r = !x.state.isEnabled, i = currentInput.isTouch && !x.props.touch, a = getValueAtIndexOrReturn(x.props.duration, 0, defaultProps.duration);
|
|
@@ -9634,10 +9776,10 @@ function createTippy(e, n) {
|
|
|
9634
9776
|
x.state.isShown = !0, F("onShown", [x]);
|
|
9635
9777
|
});
|
|
9636
9778
|
}
|
|
9637
|
-
},
|
|
9779
|
+
}, Uv();
|
|
9638
9780
|
}
|
|
9639
9781
|
}
|
|
9640
|
-
function
|
|
9782
|
+
function Xv() {
|
|
9641
9783
|
/* istanbul ignore else */
|
|
9642
9784
|
process.env.NODE_ENV !== "production" && warnWhen(x.state.isDestroyed, createMemoryLeakWarning("hide"));
|
|
9643
9785
|
var e = !x.state.isVisible, n = x.state.isDestroyed, r = !x.state.isEnabled, i = getValueAtIndexOrReturn(x.props.duration, 1, defaultProps.duration);
|
|
@@ -9649,20 +9791,20 @@ function createTippy(e, n) {
|
|
|
9649
9791
|
I(), L(), x.props.animation ? k() && W(i, x.unmount) : x.unmount();
|
|
9650
9792
|
}
|
|
9651
9793
|
}
|
|
9652
|
-
function
|
|
9794
|
+
function Zv(e) {
|
|
9653
9795
|
process.env.NODE_ENV !== "production" && warnWhen(x.state.isDestroyed, createMemoryLeakWarning("hideWithInteractivity")), j().addEventListener("mousemove", g), pushIfUnique(mouseMoveListeners, g), g(e);
|
|
9654
9796
|
}
|
|
9655
|
-
function
|
|
9797
|
+
function Qv() {
|
|
9656
9798
|
/* istanbul ignore else */
|
|
9657
|
-
process.env.NODE_ENV !== "production" && warnWhen(x.state.isDestroyed, createMemoryLeakWarning("unmount")), x.state.isVisible && x.hide(), x.state.isMounted && (
|
|
9799
|
+
process.env.NODE_ENV !== "production" && warnWhen(x.state.isDestroyed, createMemoryLeakWarning("unmount")), x.state.isVisible && x.hide(), x.state.isMounted && (Hv(), Z().forEach(function(e) {
|
|
9658
9800
|
e._tippy.unmount();
|
|
9659
9801
|
}), C.parentNode && C.parentNode.removeChild(C), mountedInstances = mountedInstances.filter(function(e) {
|
|
9660
9802
|
return e !== x;
|
|
9661
9803
|
}), x.state.isMounted = !1, F("onHidden", [x]));
|
|
9662
9804
|
}
|
|
9663
|
-
function
|
|
9805
|
+
function $v() {
|
|
9664
9806
|
/* istanbul ignore else */
|
|
9665
|
-
process.env.NODE_ENV !== "production" && warnWhen(x.state.isDestroyed, createMemoryLeakWarning("destroy")), !x.state.isDestroyed && (x.clearDelayTimeouts(), x.unmount(),
|
|
9807
|
+
process.env.NODE_ENV !== "production" && warnWhen(x.state.isDestroyed, createMemoryLeakWarning("destroy")), !x.state.isDestroyed && (x.clearDelayTimeouts(), x.unmount(), Y(), delete e._tippy, x.state.isDestroyed = !0, F("onDestroy", [x]));
|
|
9666
9808
|
}
|
|
9667
9809
|
}
|
|
9668
9810
|
function tippy(e, n) {
|
|
@@ -9746,15 +9888,6 @@ const OverflowTips = {
|
|
|
9746
9888
|
var n;
|
|
9747
9889
|
e.removeEventListener("mouseenter", e.mouseEnterFunc), e.removeEventListener("mouseleave", e.mouseLeaveFunc), (n = e.unObserverFunc) == null || n.call(e), e.mouseEnterFunc = void 0, e.mouseLeaveFunc = void 0, e.unObserverFunc = void 0;
|
|
9748
9890
|
}
|
|
9749
|
-
}, resourceTypeMap = {
|
|
9750
|
-
tool: "工具",
|
|
9751
|
-
mcp: "MCP",
|
|
9752
|
-
doc: "知识库",
|
|
9753
|
-
shortcut: "快捷指令"
|
|
9754
|
-
}, noop = () => {}, MessageState = {
|
|
9755
|
-
ACTIVE: "active",
|
|
9756
|
-
DISABLED: "disabled",
|
|
9757
|
-
LOADING: "loading"
|
|
9758
9891
|
};
|
|
9759
9892
|
var _hoisted_1$17 = { class: "ai-slash-item ai-slash-group-title" }, _hoisted_2$12 = ["onClick"], _hoisted_3$10 = ["onClick"], _hoisted_4$8 = ["title"], ai_slash_menu_default = /* @__PURE__ */ defineComponent({
|
|
9760
9893
|
__name: "ai-slash-menu",
|
|
@@ -9845,7 +9978,7 @@ const DeleteTag = (e, n, r, i) => new Transaction().delete(r, i), InsertTag = (e
|
|
|
9845
9978
|
plain: (e) => e.label
|
|
9846
9979
|
}) }
|
|
9847
9980
|
});
|
|
9848
|
-
var _hoisted_1$16 = { class: "ai-slash-input-wrapper" }, _hoisted_2$11 = ["aria-placeholder"], _hoisted_3$9 = { key: 0 }, _hoisted_4$7 = ["data-tag-type"], _hoisted_5$
|
|
9981
|
+
var _hoisted_1$16 = { class: "ai-slash-input-wrapper" }, _hoisted_2$11 = ["aria-placeholder"], _hoisted_3$9 = { key: 0 }, _hoisted_4$7 = ["data-tag-type"], _hoisted_5$5 = { key: 1 }, ai_slash_input_default = /* @__PURE__ */ defineComponent({
|
|
9849
9982
|
__name: "ai-slash-input",
|
|
9850
9983
|
props: /* @__PURE__ */ mergeModels({
|
|
9851
9984
|
placeholder: { default: isEn ? "Please enter content" : "请输入内容" },
|
|
@@ -9855,7 +9988,7 @@ var _hoisted_1$16 = { class: "ai-slash-input-wrapper" }, _hoisted_2$11 = ["aria-
|
|
|
9855
9988
|
modelValue: { required: !0 },
|
|
9856
9989
|
modelModifiers: {}
|
|
9857
9990
|
}),
|
|
9858
|
-
emits: /* @__PURE__ */ mergeModels(["keydown"], ["update:modelValue"]),
|
|
9991
|
+
emits: /* @__PURE__ */ mergeModels(["keydown", "upload"], ["update:modelValue"]),
|
|
9859
9992
|
setup(n, { expose: r, emit: i }) {
|
|
9860
9993
|
let a = useTemplateRef("editorRef"), o = useTemplateRef("tippyRef"), m = i, g = useModel(n, "modelValue"), _ = n, v = customRef((e, n) => ({
|
|
9861
9994
|
get() {
|
|
@@ -9952,7 +10085,17 @@ var _hoisted_1$16 = { class: "ai-slash-input-wrapper" }, _hoisted_2$11 = ["aria-
|
|
|
9952
10085
|
let n = R(e, r);
|
|
9953
10086
|
w.command(DeleteTag, [i, n], [i, n + 1]);
|
|
9954
10087
|
}
|
|
9955
|
-
},
|
|
10088
|
+
}, J = (e) => {
|
|
10089
|
+
var n;
|
|
10090
|
+
let r = (n = e.clipboardData) == null ? void 0 : n.items;
|
|
10091
|
+
if (!r) return;
|
|
10092
|
+
let i = [];
|
|
10093
|
+
for (let e of r) if (e.kind === "file") {
|
|
10094
|
+
let n = e.getAsFile();
|
|
10095
|
+
n && i.push(n);
|
|
10096
|
+
}
|
|
10097
|
+
i.length > 0 && (e.preventDefault(), console.log("handlePaste files", i), m("upload", i));
|
|
10098
|
+
}, Lv = () => {
|
|
9956
10099
|
T == null || T(), w = createEditor({
|
|
9957
10100
|
doc: v.value,
|
|
9958
10101
|
schema: tagSchema,
|
|
@@ -9966,14 +10109,19 @@ var _hoisted_1$16 = { class: "ai-slash-input-wrapper" }, _hoisted_2$11 = ["aria-
|
|
|
9966
10109
|
}(),
|
|
9967
10110
|
onKeyDown: (e) => P(e)
|
|
9968
10111
|
}), T = w.input(a.value);
|
|
9969
|
-
},
|
|
10112
|
+
}, Rv = () => y.value === "slash" ? x.value.length < 1 ? !1 : void 0 : S.value.length < 1 ? !1 : void 0;
|
|
9970
10113
|
return onMounted(() => {
|
|
9971
|
-
|
|
10114
|
+
var e;
|
|
10115
|
+
Lv(), (e = a.value) == null || e.addEventListener("paste", J);
|
|
9972
10116
|
}), onUnmounted(() => {
|
|
9973
|
-
|
|
9974
|
-
|
|
9975
|
-
|
|
9976
|
-
|
|
10117
|
+
var e;
|
|
10118
|
+
w.command(ReplaceAll, ""), T == null || T(), (e = a.value) == null || e.removeEventListener("paste", J);
|
|
10119
|
+
}), r({
|
|
10120
|
+
cleanup: () => {
|
|
10121
|
+
w.command(ReplaceAll, "");
|
|
10122
|
+
},
|
|
10123
|
+
focus: U
|
|
10124
|
+
}), (r, i) => (openBlock(), createElementBlock("div", _hoisted_1$16, [createElementVNode("div", {
|
|
9977
10125
|
ref_key: "editorRef",
|
|
9978
10126
|
ref: a,
|
|
9979
10127
|
"aria-placeholder": n.placeholder,
|
|
@@ -9987,7 +10135,7 @@ var _hoisted_1$16 = { class: "ai-slash-input-wrapper" }, _hoisted_2$11 = ["aria-
|
|
|
9987
10135
|
}, [createTextVNode(toDisplayString(i.data.label) + " ", 1), createVNode(unref(RemoveIcon), {
|
|
9988
10136
|
class: "mention-tag-remove-icon",
|
|
9989
10137
|
onClick: (e) => q(n, i, a, r)
|
|
9990
|
-
}, null, 8, ["onClick"])], 10, _hoisted_4$7)) : createCommentVNode("", !0)], 64))), 128)) : (openBlock(), createElementBlock("br", _hoisted_5$
|
|
10138
|
+
}, null, 8, ["onClick"])], 10, _hoisted_4$7)) : createCommentVNode("", !0)], 64))), 128)) : (openBlock(), createElementBlock("br", _hoisted_5$5))]))), 128)) : createCommentVNode("", !0)], 8, _hoisted_2$11), createVNode(unref(TippyComponent), {
|
|
9991
10139
|
ref_key: "tippyRef",
|
|
9992
10140
|
ref: o,
|
|
9993
10141
|
"append-to": unref(D),
|
|
@@ -10001,7 +10149,7 @@ var _hoisted_1$16 = { class: "ai-slash-input-wrapper" }, _hoisted_2$11 = ["aria-
|
|
|
10001
10149
|
"trigger-target": a.value,
|
|
10002
10150
|
"z-index": unref(EDITOR_MENU_Z_INDEX),
|
|
10003
10151
|
onHidden: F,
|
|
10004
|
-
onShow:
|
|
10152
|
+
onShow: Rv
|
|
10005
10153
|
}, {
|
|
10006
10154
|
content: withCtx(() => [y.value === "slash" ? (openBlock(), createBlock(ai_slash_menu_default, {
|
|
10007
10155
|
key: 0,
|
|
@@ -10045,12 +10193,18 @@ var _hoisted_1$16 = { class: "ai-slash-input-wrapper" }, _hoisted_2$11 = ["aria-
|
|
|
10045
10193
|
offset: [0, 16]
|
|
10046
10194
|
}]])], 2)])]));
|
|
10047
10195
|
}
|
|
10048
|
-
}), _hoisted_1$14 = { class: "chat-input-container" }, _hoisted_2$10 = {
|
|
10196
|
+
}), _hoisted_1$14 = { class: "chat-input-container" }, _hoisted_2$10 = {
|
|
10197
|
+
key: 1,
|
|
10198
|
+
class: "ai-divider"
|
|
10199
|
+
}, chat_input_default = /* @__PURE__ */ defineComponent({
|
|
10049
10200
|
__name: "chat-input",
|
|
10050
10201
|
props: /* @__PURE__ */ mergeModels({
|
|
10202
|
+
defaultUploadFiles: {},
|
|
10203
|
+
inputMaxHeight: { default: 200 },
|
|
10051
10204
|
messageStatus: {},
|
|
10052
10205
|
onSendMessage: {},
|
|
10053
10206
|
onStopSending: {},
|
|
10207
|
+
onUpload: {},
|
|
10054
10208
|
placeholder: { default: isEn ? "Input \"/\" to trigger prompt\nInput \"@\" to trigger tool\nUse Shift + Enter to enter a new line" : "输入 “/”唤出 Prompt\n输入“@”唤出工具\n通过 Shift + Enter 进行换行输入" },
|
|
10055
10209
|
prompts: { default: () => [] },
|
|
10056
10210
|
resources: { default: () => [] },
|
|
@@ -10066,16 +10220,44 @@ var _hoisted_1$16 = { class: "ai-slash-input-wrapper" }, _hoisted_2$11 = ["aria-
|
|
|
10066
10220
|
citeModifiers: {}
|
|
10067
10221
|
}),
|
|
10068
10222
|
emits: /* @__PURE__ */ mergeModels(["selectShortcut", "deleteShortcut"], ["update:modelValue", "update:cite"]),
|
|
10069
|
-
setup(e, {
|
|
10070
|
-
useCssVars((e) => ({
|
|
10071
|
-
let
|
|
10223
|
+
setup(e, { expose: n, emit: r }) {
|
|
10224
|
+
useCssVars((e) => ({ v247556bc: unref(CHAT_Z_INDEX) }));
|
|
10225
|
+
let i = useTemplateRef("aiSlashInputRef"), o = useTemplateRef("filesRef"), d = useModel(e, "modelValue"), p = useModel(e, "cite"), m = shallowRef(200), g = e, v = r, y = ref(g.defaultUploadFiles || []), b = computed(() => {
|
|
10072
10226
|
var e;
|
|
10073
|
-
return (e =
|
|
10074
|
-
}),
|
|
10227
|
+
return (e = g.shortcuts) == null ? void 0 : e.find((e) => e.id === g.shortcutId);
|
|
10228
|
+
}), x = computed(() => d.value.length < 1 || Array.isArray(d.value) && !d.value[0] ? MessageStatus.Disabled : g.messageStatus), S = computed(() => typeof g.onUpload == "function");
|
|
10229
|
+
watchPostEffect(() => {
|
|
10230
|
+
var e;
|
|
10231
|
+
let n = g.inputMaxHeight || 200;
|
|
10232
|
+
if (y.value.length < 1 || !o.value) {
|
|
10233
|
+
m.value = n;
|
|
10234
|
+
return;
|
|
10235
|
+
}
|
|
10236
|
+
m.value = n + (((e = o.value) == null ? void 0 : e.clientHeight) || 0);
|
|
10237
|
+
});
|
|
10238
|
+
let C = function() {
|
|
10075
10239
|
var e = _asyncToGenerator(function* () {
|
|
10076
10240
|
try {
|
|
10077
|
-
var e, n, a;
|
|
10078
|
-
(e =
|
|
10241
|
+
var e, n, r, a;
|
|
10242
|
+
(e = i.value) == null || (n = e.cleanup) == null || n.call(e);
|
|
10243
|
+
let s;
|
|
10244
|
+
if (!((r = y.value) != null && r.length)) s = typeof d.value == "string" ? d.value : docToString(d.value);
|
|
10245
|
+
else {
|
|
10246
|
+
var o;
|
|
10247
|
+
s = (o = y.value) == null ? void 0 : o.slice().map((e) => {
|
|
10248
|
+
var n, r;
|
|
10249
|
+
return {
|
|
10250
|
+
type: MessageContentType.Binary,
|
|
10251
|
+
url: e.url,
|
|
10252
|
+
mimeType: ((n = e.file) == null ? void 0 : n.type) || "",
|
|
10253
|
+
filename: ((r = e.file) == null ? void 0 : r.name) || ""
|
|
10254
|
+
};
|
|
10255
|
+
}), d.value && s.push({
|
|
10256
|
+
type: MessageContentType.Text,
|
|
10257
|
+
text: docToString(d.value)
|
|
10258
|
+
});
|
|
10259
|
+
}
|
|
10260
|
+
(a = g.onSendMessage) == null || a.call(g, s, d.value), y.value = [];
|
|
10079
10261
|
} catch (e) {
|
|
10080
10262
|
console.error(e);
|
|
10081
10263
|
}
|
|
@@ -10083,16 +10265,16 @@ var _hoisted_1$16 = { class: "ai-slash-input-wrapper" }, _hoisted_2$11 = ["aria-
|
|
|
10083
10265
|
return function() {
|
|
10084
10266
|
return e.apply(this, arguments);
|
|
10085
10267
|
};
|
|
10086
|
-
}(),
|
|
10268
|
+
}(), w = (e) => {
|
|
10087
10269
|
if (e.key === "Enter" || e.key === "NumpadEnter") {
|
|
10088
10270
|
if (e.shiftKey) return;
|
|
10089
|
-
|
|
10271
|
+
C();
|
|
10090
10272
|
}
|
|
10091
|
-
},
|
|
10273
|
+
}, T = function() {
|
|
10092
10274
|
var e = _asyncToGenerator(function* () {
|
|
10093
10275
|
try {
|
|
10094
10276
|
var e;
|
|
10095
|
-
(e =
|
|
10277
|
+
(e = g.onStopSending) == null || e.call(g);
|
|
10096
10278
|
} catch (e) {
|
|
10097
10279
|
console.error(e);
|
|
10098
10280
|
}
|
|
@@ -10100,29 +10282,72 @@ var _hoisted_1$16 = { class: "ai-slash-input-wrapper" }, _hoisted_2$11 = ["aria-
|
|
|
10100
10282
|
return function() {
|
|
10101
10283
|
return e.apply(this, arguments);
|
|
10102
10284
|
};
|
|
10103
|
-
}(),
|
|
10104
|
-
|
|
10105
|
-
},
|
|
10106
|
-
|
|
10107
|
-
},
|
|
10108
|
-
|
|
10285
|
+
}(), E = () => {
|
|
10286
|
+
p.value = "";
|
|
10287
|
+
}, k = (e) => {
|
|
10288
|
+
v("selectShortcut", e);
|
|
10289
|
+
}, A = () => {
|
|
10290
|
+
v("deleteShortcut");
|
|
10291
|
+
}, j = function() {
|
|
10292
|
+
var e = _asyncToGenerator(function* (e) {
|
|
10293
|
+
if (S.value) for (let r of e) {
|
|
10294
|
+
var n;
|
|
10295
|
+
if (y.value.find((e) => {
|
|
10296
|
+
var n;
|
|
10297
|
+
return ((n = e.file) == null ? void 0 : n.name) === r.name;
|
|
10298
|
+
})) continue;
|
|
10299
|
+
let e = {
|
|
10300
|
+
file: r,
|
|
10301
|
+
status: UploadStatus.Pending
|
|
10302
|
+
};
|
|
10303
|
+
y.value.push(e), (n = g.onUpload) == null || n.call(g, r).then((n) => {
|
|
10304
|
+
n && typeof n == "object" && "download_url" in n && (e.url = n.download_url), e.status = UploadStatus.Success;
|
|
10305
|
+
}).catch(() => {
|
|
10306
|
+
e.status = UploadStatus.Error;
|
|
10307
|
+
});
|
|
10308
|
+
}
|
|
10309
|
+
});
|
|
10310
|
+
return function(n) {
|
|
10311
|
+
return e.apply(this, arguments);
|
|
10312
|
+
};
|
|
10313
|
+
}(), N = (e) => {
|
|
10314
|
+
y.value = y.value.filter((n) => n.file ? n.file !== e.file : n.url ? n.url !== e.url : n.filename ? n.filename !== e.filename : !0);
|
|
10109
10315
|
};
|
|
10110
|
-
return
|
|
10111
|
-
|
|
10316
|
+
return n({
|
|
10317
|
+
focus: () => {
|
|
10318
|
+
var e, n;
|
|
10319
|
+
(e = i.value) == null || (n = e.focus) == null || n.call(e);
|
|
10320
|
+
},
|
|
10321
|
+
triggerSendMessage: C
|
|
10322
|
+
}), (n, r) => (openBlock(), createElementBlock("div", _hoisted_1$14, [renderSlot(n.$slots, "top"), createElementVNode("div", {
|
|
10323
|
+
class: "chat-input",
|
|
10324
|
+
style: normalizeStyle({ maxHeight: m.value + "px" })
|
|
10325
|
+
}, [
|
|
10326
|
+
renderSlot(n.$slots, "input-header", {}, () => [p.value ? (openBlock(), createBlock(cite_content_default, {
|
|
10112
10327
|
key: 0,
|
|
10113
10328
|
class: "chat-input-cite",
|
|
10114
|
-
content:
|
|
10115
|
-
onClose:
|
|
10329
|
+
content: p.value,
|
|
10330
|
+
onClose: E
|
|
10116
10331
|
}, null, 8, ["content"])) : createCommentVNode("", !0)]),
|
|
10332
|
+
renderSlot(n.$slots, "files", normalizeProps(guardReactiveProps({ files: y.value })), () => [y.value.length ? (openBlock(), createElementBlock("div", {
|
|
10333
|
+
key: 0,
|
|
10334
|
+
ref_key: "filesRef",
|
|
10335
|
+
ref: o,
|
|
10336
|
+
class: "chat-input-files"
|
|
10337
|
+
}, [createVNode(file_content_default, {
|
|
10338
|
+
files: y.value,
|
|
10339
|
+
onDeleteFile: N
|
|
10340
|
+
}, null, 8, ["files"])], 512)) : createCommentVNode("", !0)]),
|
|
10117
10341
|
createVNode(ai_slash_input_default, {
|
|
10118
10342
|
ref_key: "aiSlashInputRef",
|
|
10119
|
-
ref:
|
|
10120
|
-
modelValue:
|
|
10121
|
-
"onUpdate:modelValue":
|
|
10343
|
+
ref: i,
|
|
10344
|
+
modelValue: d.value,
|
|
10345
|
+
"onUpdate:modelValue": r[0] || (r[0] = (e) => d.value = e),
|
|
10122
10346
|
placeholder: e.placeholder,
|
|
10123
10347
|
prompts: e.prompts,
|
|
10124
10348
|
resources: e.resources,
|
|
10125
|
-
onKeydown:
|
|
10349
|
+
onKeydown: w,
|
|
10350
|
+
onUpload: j
|
|
10126
10351
|
}, null, 8, [
|
|
10127
10352
|
"modelValue",
|
|
10128
10353
|
"placeholder",
|
|
@@ -10130,26 +10355,36 @@ var _hoisted_1$16 = { class: "ai-slash-input-wrapper" }, _hoisted_2$11 = ["aria-
|
|
|
10130
10355
|
"resources"
|
|
10131
10356
|
]),
|
|
10132
10357
|
createVNode(input_attachment_default, {
|
|
10133
|
-
"message-state":
|
|
10134
|
-
onSendMessage:
|
|
10135
|
-
onStopSending:
|
|
10358
|
+
"message-state": x.value,
|
|
10359
|
+
onSendMessage: C,
|
|
10360
|
+
onStopSending: T
|
|
10136
10361
|
}, {
|
|
10137
|
-
default: withCtx(() =>
|
|
10138
|
-
|
|
10139
|
-
|
|
10140
|
-
|
|
10141
|
-
|
|
10142
|
-
|
|
10143
|
-
|
|
10144
|
-
|
|
10145
|
-
|
|
10146
|
-
|
|
10147
|
-
|
|
10148
|
-
|
|
10362
|
+
default: withCtx(() => {
|
|
10363
|
+
var r;
|
|
10364
|
+
return [
|
|
10365
|
+
S.value ? (openBlock(), createBlock(file_upload_btn_default, {
|
|
10366
|
+
key: 0,
|
|
10367
|
+
onUpload: j
|
|
10368
|
+
})) : createCommentVNode("", !0),
|
|
10369
|
+
S.value && ((r = e.shortcuts) != null && r.length || b.value) ? (openBlock(), createElementBlock("span", _hoisted_2$10)) : createCommentVNode("", !0),
|
|
10370
|
+
renderSlot(n.$slots, "attachment", {}, () => [e.shortcuts && !b.value ? (openBlock(), createBlock(shortcut_btns_default, {
|
|
10371
|
+
key: 0,
|
|
10372
|
+
shortcuts: e.shortcuts,
|
|
10373
|
+
onSelectShortcut: k
|
|
10374
|
+
}, null, 8, ["shortcuts"])) : createCommentVNode("", !0), b.value ? (openBlock(), createBlock(shortcut_btn_default, {
|
|
10375
|
+
key: 1,
|
|
10376
|
+
class: "selected-shortcut-btn",
|
|
10377
|
+
shortcut: b.value
|
|
10378
|
+
}, {
|
|
10379
|
+
append: withCtx(() => [createVNode(unref(CloseIcon), { onClick: A })]),
|
|
10380
|
+
_: 1
|
|
10381
|
+
}, 8, ["shortcut"])) : createCommentVNode("", !0)])
|
|
10382
|
+
];
|
|
10383
|
+
}),
|
|
10149
10384
|
"send-icon": withCtx(() => [renderSlot(n.$slots, "send-icon")]),
|
|
10150
10385
|
_: 3
|
|
10151
10386
|
}, 8, ["message-state"])
|
|
10152
|
-
])]));
|
|
10387
|
+
], 4)]));
|
|
10153
10388
|
}
|
|
10154
10389
|
}), _hoisted_1$13 = { class: "ai-scroll-btn" }, scroll_btn_default = /* @__PURE__ */ defineComponent({
|
|
10155
10390
|
__name: "scroll-btn",
|
|
@@ -10175,18 +10410,22 @@ var _hoisted_1$16 = { class: "ai-slash-input-wrapper" }, _hoisted_2$11 = ["aria-
|
|
|
10175
10410
|
return (n, r) => withDirectives((openBlock(), createElementBlock("div", {
|
|
10176
10411
|
class: "tool-btn",
|
|
10177
10412
|
onClick: a
|
|
10178
|
-
}, [unref(ToolIconsMap)
|
|
10413
|
+
}, [e.id in unref(ToolIconsMap) ? (openBlock(), createBlock(resolveDynamicComponent(unref(ToolIconsMap)[e.id]), { key: 0 })) : (openBlock(), createElementBlock("div", _hoisted_1$12, toDisplayString(e.name), 1))])), [[unref(directive), {
|
|
10179
10414
|
content: e.description,
|
|
10180
10415
|
theme: "ai-chat-box"
|
|
10181
10416
|
}]]);
|
|
10182
10417
|
}
|
|
10183
|
-
}), _hoisted_1$11 = { class: "ai-user-feedback" }, _hoisted_2$9 = { class: "ai-feedback-title" }, _hoisted_3$8 = { class: "ai-feedback-reason-list" }, _hoisted_4$6 =
|
|
10418
|
+
}), _hoisted_1$11 = { class: "ai-user-feedback" }, _hoisted_2$9 = { class: "ai-feedback-title" }, _hoisted_3$8 = { class: "ai-feedback-reason-list" }, _hoisted_4$6 = {
|
|
10419
|
+
key: 0,
|
|
10420
|
+
class: "reason-loading"
|
|
10421
|
+
}, _hoisted_5$4 = ["onClick"], _hoisted_6 = { class: "ai-feedback-other" }, _hoisted_7 = { class: "ai-feedback-footer" }, user_feedback_default = /* @__PURE__ */ ((e, n) => {
|
|
10184
10422
|
let r = e.__vccOpts || e;
|
|
10185
10423
|
for (let [e, i] of n) r[e] = i;
|
|
10186
10424
|
return r;
|
|
10187
10425
|
})(/* @__PURE__ */ defineComponent({
|
|
10188
10426
|
__name: "user-feedback",
|
|
10189
10427
|
props: {
|
|
10428
|
+
loading: { type: Boolean },
|
|
10190
10429
|
reasonList: {},
|
|
10191
10430
|
title: {}
|
|
10192
10431
|
},
|
|
@@ -10201,19 +10440,22 @@ var _hoisted_1$16 = { class: "ai-slash-input-wrapper" }, _hoisted_2$11 = ["aria-
|
|
|
10201
10440
|
};
|
|
10202
10441
|
return (r, i) => (openBlock(), createElementBlock("div", _hoisted_1$11, [
|
|
10203
10442
|
createElementVNode("div", _hoisted_2$9, toDisplayString(n.title), 1),
|
|
10204
|
-
createElementVNode("div", _hoisted_3$8, [(openBlock(
|
|
10443
|
+
createElementVNode("div", _hoisted_3$8, [n.loading ? (openBlock(), createElementBlock("div", _hoisted_4$6, [createVNode(unref(Loading), {
|
|
10444
|
+
size: "small",
|
|
10445
|
+
theme: "primary"
|
|
10446
|
+
})])) : (openBlock(!0), createElementBlock(Fragment, { key: 1 }, renderList(n.reasonList, (e) => (openBlock(), createElementBlock("div", {
|
|
10205
10447
|
key: e,
|
|
10206
10448
|
class: normalizeClass(["reason-item", { "is-active": o.value.includes(e) }]),
|
|
10207
10449
|
onClick: (n) => s(e)
|
|
10208
|
-
}, toDisplayString(e), 11,
|
|
10209
|
-
createElementVNode("div",
|
|
10450
|
+
}, toDisplayString(e), 11, _hoisted_5$4))), 128))]),
|
|
10451
|
+
createElementVNode("div", _hoisted_6, [createVNode(unref(Input), {
|
|
10210
10452
|
modelValue: a.value,
|
|
10211
10453
|
"onUpdate:modelValue": i[0] || (i[0] = (e) => a.value = e),
|
|
10212
10454
|
placeholder: unref(t)("说出您的想法"),
|
|
10213
10455
|
rows: 3,
|
|
10214
10456
|
type: "textarea"
|
|
10215
10457
|
}, null, 8, ["modelValue", "placeholder"])]),
|
|
10216
|
-
createElementVNode("div",
|
|
10458
|
+
createElementVNode("div", _hoisted_7, [createVNode(unref(Button), {
|
|
10217
10459
|
class: "custom-btn",
|
|
10218
10460
|
disabled: !a.value && o.value.length === 0,
|
|
10219
10461
|
size: "small",
|
|
@@ -10233,7 +10475,7 @@ var _hoisted_1$16 = { class: "ai-slash-input-wrapper" }, _hoisted_2$11 = ["aria-
|
|
|
10233
10475
|
})])
|
|
10234
10476
|
]));
|
|
10235
10477
|
}
|
|
10236
|
-
}), [["__scopeId", "data-v-
|
|
10478
|
+
}), [["__scopeId", "data-v-3ef5a124"]]), _hoisted_1$10 = {
|
|
10237
10479
|
ref: "messageToolsRef",
|
|
10238
10480
|
class: "message-tools-container"
|
|
10239
10481
|
}, _hoisted_2$8 = {
|
|
@@ -10258,7 +10500,8 @@ var _hoisted_1$16 = { class: "ai-slash-input-wrapper" }, _hoisted_2$11 = ["aria-
|
|
|
10258
10500
|
interactive: !0,
|
|
10259
10501
|
offset: [0, 6],
|
|
10260
10502
|
theme: "ai-chat-box-light light",
|
|
10261
|
-
trigger: "click"
|
|
10503
|
+
trigger: "click",
|
|
10504
|
+
appendTo: () => document.body
|
|
10262
10505
|
}, i.tippyOptions || {})), _ = function() {
|
|
10263
10506
|
var e = _asyncToGenerator(function* (e) {
|
|
10264
10507
|
var n;
|
|
@@ -10300,11 +10543,13 @@ var _hoisted_1$16 = { class: "ai-slash-input-wrapper" }, _hoisted_2$11 = ["aria-
|
|
|
10300
10543
|
ref: d
|
|
10301
10544
|
}, { ref_for: !0 }, g.value), {
|
|
10302
10545
|
content: withCtx(() => [createVNode(user_feedback_default, {
|
|
10546
|
+
loading: p.value,
|
|
10303
10547
|
"reason-list": m.value,
|
|
10304
10548
|
title: n.id === "like" ? unref(t)("什么原因让你满意?") : unref(t)("什么原因让你不满意?"),
|
|
10305
10549
|
onCancel: v,
|
|
10306
10550
|
onSubmit: (e, r) => y(n, e, r)
|
|
10307
10551
|
}, null, 8, [
|
|
10552
|
+
"loading",
|
|
10308
10553
|
"reason-list",
|
|
10309
10554
|
"title",
|
|
10310
10555
|
"onSubmit"
|
|
@@ -10317,7 +10562,10 @@ var _hoisted_1$16 = { class: "ai-slash-input-wrapper" }, _hoisted_2$11 = ["aria-
|
|
|
10317
10562
|
}, n, { onClick: (e) => _(n) }), null, 16, ["onClick"]))], 64))), 128))])
|
|
10318
10563
|
], 512));
|
|
10319
10564
|
}
|
|
10320
|
-
}), _hoisted_1$9 = { class: "ai-activity-message" }, _hoisted_2$7 = { class: "ai-activity-message-title-icon" }, _hoisted_3$6 = { class: "ai-activity-message-title-text" }, _hoisted_4$4 = { class: "ai-activity-message-content" },
|
|
10565
|
+
}), _hoisted_1$9 = { class: "ai-activity-message" }, _hoisted_2$7 = { class: "ai-activity-message-title-icon" }, _hoisted_3$6 = { class: "ai-activity-message-title-text" }, _hoisted_4$4 = { class: "ai-activity-message-content" }, _hoisted_5$3 = {
|
|
10566
|
+
key: 0,
|
|
10567
|
+
class: "knowledge-rag-content"
|
|
10568
|
+
}, activity_message_default = /* @__PURE__ */ defineComponent({
|
|
10321
10569
|
__name: "activity-message",
|
|
10322
10570
|
props: /* @__PURE__ */ mergeModels({
|
|
10323
10571
|
activityType: {},
|
|
@@ -10334,17 +10582,22 @@ var _hoisted_1$16 = { class: "ai-slash-input-wrapper" }, _hoisted_2$11 = ["aria-
|
|
|
10334
10582
|
}),
|
|
10335
10583
|
emits: ["update:collapsed"],
|
|
10336
10584
|
setup(e) {
|
|
10337
|
-
let n =
|
|
10338
|
-
|
|
10339
|
-
|
|
10585
|
+
let n = e, r = computed(() => n.activityType === "knowledge_rag"), i = computed(() => {
|
|
10586
|
+
var e, i;
|
|
10587
|
+
if (r.value) return n.status === MessageStatus.Pending ? t("检索中...") : t("检索完成");
|
|
10588
|
+
let a = Array.isArray(n.content) ? (e = n.content) == null ? void 0 : e.length : (i = n.content) == null || (i = i.referenceDocument) == null ? void 0 : i.length;
|
|
10589
|
+
return isEn ? `Reference ${a} documents as reference` : `引用 ${a} 篇资料作为参考`;
|
|
10590
|
+
}), o = useModel(e, "collapsed");
|
|
10591
|
+
return (n, a) => {
|
|
10592
|
+
var d, p;
|
|
10340
10593
|
return openBlock(), createElementBlock("div", _hoisted_1$9, [createElementVNode("div", {
|
|
10341
10594
|
class: "ai-activity-message-title",
|
|
10342
|
-
onClick:
|
|
10595
|
+
onClick: a[0] || (a[0] = (e) => o.value = !o.value)
|
|
10343
10596
|
}, [
|
|
10344
|
-
createElementVNode("span", _hoisted_2$7, [
|
|
10345
|
-
createElementVNode("span", _hoisted_3$6, toDisplayString(
|
|
10346
|
-
createElementVNode("span", { class: normalizeClass(["ai-activity-message-title-icon collapsed-icon", { "is-collapsed":
|
|
10347
|
-
]), withDirectives(createElementVNode("div", _hoisted_4$4, [createVNode(reference_content_default, { content: e.content || [] }, null, 8, ["content"])], 512), [[vShow, !
|
|
10597
|
+
createElementVNode("span", _hoisted_2$7, [r.value ? (openBlock(), createBlock(unref(ThinkingIcon), { key: 0 })) : (openBlock(), createBlock(unref(DocumentIcon), { key: 1 }))]),
|
|
10598
|
+
createElementVNode("span", _hoisted_3$6, toDisplayString(i.value), 1),
|
|
10599
|
+
createElementVNode("span", { class: normalizeClass(["ai-activity-message-title-icon collapsed-icon", { "is-collapsed": o.value }]) }, [createVNode(unref(CollapsedIcon))], 2)
|
|
10600
|
+
]), withDirectives(createElementVNode("div", _hoisted_4$4, [r.value ? (openBlock(), createElementBlock("div", _hoisted_5$3, [createVNode(markdown_content_default, { content: Array.isArray(e.content) ? e.content.join("\n") : ((d = e.content) == null ? void 0 : d.content) || "" }, null, 8, ["content"])])) : createCommentVNode("", !0), createVNode(reference_content_default, { content: Array.isArray(e.content) ? e.content : ((p = e.content) == null ? void 0 : p.referenceDocument) || [] }, null, 8, ["content"])], 512), [[vShow, !o.value]])]);
|
|
10348
10601
|
};
|
|
10349
10602
|
}
|
|
10350
10603
|
}), _hoisted_1$8 = { class: "toolcall-desc" }, _hoisted_2$6 = { class: "desc-title" }, _hoisted_3$5 = { class: "desc-panel" }, _hoisted_4$3 = { class: "desc-label" }, _hoisted_5$2 = { class: "desc-value" }, desc_panel_default = /* @__PURE__ */ defineComponent({
|
|
@@ -10541,7 +10794,7 @@ var _hoisted_1$16 = { class: "ai-slash-input-wrapper" }, _hoisted_2$11 = ["aria-
|
|
|
10541
10794
|
], 2), withDirectives(createElementVNode("div", _hoisted_4$1, [n.status === unref(MessageStatus).Error ? (openBlock(), createBlock(common_error_content_default, {
|
|
10542
10795
|
key: 0,
|
|
10543
10796
|
content: ((o = n.content) == null ? void 0 : o.join("\n")) || ""
|
|
10544
|
-
}, null, 8, ["content"])) : (openBlock(!0), createElementBlock(Fragment, { key: 1 }, renderList(n.content, (e) => (openBlock(), createBlock(markdown_content_default, {
|
|
10797
|
+
}, null, 8, ["content"])) : (openBlock(!0), createElementBlock(Fragment, { key: 1 }, renderList(Array.isArray(n.content) ? n.content : [n.content], (e) => (openBlock(), createBlock(markdown_content_default, {
|
|
10545
10798
|
key: e,
|
|
10546
10799
|
content: e
|
|
10547
10800
|
}, null, 8, ["content"]))), 128))], 512), [[vShow, !i.value]])]);
|
|
@@ -10566,7 +10819,10 @@ var _hoisted_1$16 = { class: "ai-slash-input-wrapper" }, _hoisted_2$11 = ["aria-
|
|
|
10566
10819
|
createElementVNode("div", _hoisted_5, toDisplayString(e.value), 1)
|
|
10567
10820
|
]))), 128))])]));
|
|
10568
10821
|
}
|
|
10569
|
-
}), _hoisted_1$1 = { class: "ai-user-message" }, _hoisted_2$1 = {
|
|
10822
|
+
}), _hoisted_1$1 = { class: "ai-user-message" }, _hoisted_2$1 = {
|
|
10823
|
+
key: 1,
|
|
10824
|
+
class: "ai-user-message-content"
|
|
10825
|
+
}, _hoisted_3$1 = { class: "user-edit-footer" }, user_message_default = /* @__PURE__ */ defineComponent({
|
|
10570
10826
|
__name: "user-message",
|
|
10571
10827
|
props: {
|
|
10572
10828
|
content: {},
|
|
@@ -10576,18 +10832,20 @@ var _hoisted_1$16 = { class: "ai-slash-input-wrapper" }, _hoisted_2$11 = ["aria-
|
|
|
10576
10832
|
role: {},
|
|
10577
10833
|
status: {},
|
|
10578
10834
|
property: {},
|
|
10579
|
-
onAction: { type: Function }
|
|
10835
|
+
onAction: { type: Function },
|
|
10836
|
+
onInputConfirm: { type: Function },
|
|
10837
|
+
onShortcutConfirm: { type: Function }
|
|
10580
10838
|
},
|
|
10581
10839
|
setup(n) {
|
|
10582
|
-
let r = n, { copy: i } = useClipboard(), o = shallowRef(!1), p = shallowRef(""), m = computed(() => {
|
|
10840
|
+
let r = n, { copy: i } = useClipboard(), o = shallowRef(!1), p = shallowRef(""), m = useTemplateRef("chatInputRef"), g = computed(() => {
|
|
10583
10841
|
var e;
|
|
10584
10842
|
let n = (e = r.property) == null || (e = e.extra) == null ? void 0 : e.cite;
|
|
10585
10843
|
if (!(!n || typeof n == "string")) return n.title;
|
|
10586
|
-
}),
|
|
10844
|
+
}), _ = computed(() => {
|
|
10587
10845
|
var e;
|
|
10588
10846
|
let n = (e = r.property) == null || (e = e.extra) == null ? void 0 : e.cite;
|
|
10589
10847
|
return !n || typeof n == "string" ? n : n.data;
|
|
10590
|
-
}),
|
|
10848
|
+
}), v = computed(() => {
|
|
10591
10849
|
var e, n;
|
|
10592
10850
|
if (!((e = r.property) != null && e.extra)) return null;
|
|
10593
10851
|
let { extra: i } = r.property, { shortcut: a, cite: o, context: s } = i || {};
|
|
@@ -10612,76 +10870,138 @@ var _hoisted_1$16 = { class: "ai-slash-input-wrapper" }, _hoisted_2$11 = ["aria-
|
|
|
10612
10870
|
};
|
|
10613
10871
|
}
|
|
10614
10872
|
return null;
|
|
10615
|
-
}),
|
|
10873
|
+
}), y = computed(() => {
|
|
10874
|
+
var e;
|
|
10875
|
+
return Array.isArray(r.content) ? (e = r.content) == null ? void 0 : e.filter((e) => e.type === MessageContentType.Binary) : [];
|
|
10876
|
+
}), b = computed(() => {
|
|
10877
|
+
var e;
|
|
10878
|
+
return r.content ? typeof r.content == "string" ? r.content : (e = r.content) == null ? void 0 : e.filter((e) => {
|
|
10879
|
+
var n;
|
|
10880
|
+
return e.type === MessageContentType.Text && !!((n = e.text) != null && n.trim());
|
|
10881
|
+
}) : "";
|
|
10882
|
+
}), x = function() {
|
|
10616
10883
|
var e = _asyncToGenerator(function* (e) {
|
|
10617
10884
|
var n;
|
|
10618
|
-
|
|
10885
|
+
if (e.id === "edit") {
|
|
10886
|
+
if (typeof r.content == "string" && (p.value = r.content, o.value = !0), typeof b.value == "string" && (p.value = b.value, o.value = !0), Array.isArray(b.value)) {
|
|
10887
|
+
let e = b.value.at(0);
|
|
10888
|
+
p.value = typeof e == "string" ? e : (e == null ? void 0 : e.text) || "", o.value = !0;
|
|
10889
|
+
}
|
|
10890
|
+
y.value.length && (o.value = !0);
|
|
10891
|
+
} else e.id === "copy" && i(typeof r.content == "string" ? r.content : JSON.stringify(r.content || ""));
|
|
10892
|
+
yield (n = r.onAction) == null ? void 0 : n.call(r, e);
|
|
10619
10893
|
});
|
|
10620
10894
|
return function(n) {
|
|
10621
10895
|
return e.apply(this, arguments);
|
|
10622
10896
|
};
|
|
10623
|
-
}(),
|
|
10624
|
-
|
|
10625
|
-
|
|
10897
|
+
}(), S = function() {
|
|
10898
|
+
var e = _asyncToGenerator(function* () {
|
|
10899
|
+
var e, n;
|
|
10900
|
+
yield (e = m.value) == null || (n = e.triggerSendMessage) == null ? void 0 : n.call(e), o.value = !1;
|
|
10901
|
+
});
|
|
10902
|
+
return function() {
|
|
10903
|
+
return e.apply(this, arguments);
|
|
10904
|
+
};
|
|
10905
|
+
}(), C = () => {
|
|
10626
10906
|
o.value = !1;
|
|
10627
|
-
},
|
|
10907
|
+
}, T = () => {
|
|
10628
10908
|
o.value = !1;
|
|
10629
|
-
},
|
|
10630
|
-
|
|
10631
|
-
|
|
10632
|
-
|
|
10909
|
+
}, E = function() {
|
|
10910
|
+
var e = _asyncToGenerator(function* (e) {
|
|
10911
|
+
var n;
|
|
10912
|
+
(n = r.onShortcutConfirm) == null || n.call(r, e), o.value = !1;
|
|
10913
|
+
});
|
|
10914
|
+
return function(n) {
|
|
10915
|
+
return e.apply(this, arguments);
|
|
10916
|
+
};
|
|
10917
|
+
}(), D = function() {
|
|
10918
|
+
var e = _asyncToGenerator(function* (e, n) {
|
|
10919
|
+
var i;
|
|
10920
|
+
(i = r.onInputConfirm) == null || i.call(r, e, n), o.value = !1;
|
|
10921
|
+
});
|
|
10922
|
+
return function(n, r) {
|
|
10923
|
+
return e.apply(this, arguments);
|
|
10924
|
+
};
|
|
10925
|
+
}();
|
|
10926
|
+
return (r, i) => (openBlock(), createElementBlock("div", _hoisted_1$1, [_.value && typeof _.value == "string" ? (openBlock(), createBlock(cite_content_default, {
|
|
10633
10927
|
key: 0,
|
|
10634
10928
|
class: "ai-user-message-cite",
|
|
10635
|
-
content:
|
|
10636
|
-
}, null, 8, ["content"])) : createCommentVNode("", !0), o.value ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
10929
|
+
content: _.value
|
|
10930
|
+
}, null, 8, ["content"])) : createCommentVNode("", !0), o.value ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [v.value ? (openBlock(), createBlock(shortcut_render_default, mergeProps({ key: 0 }, v.value, {
|
|
10637
10931
|
class: "user-shortcut-render",
|
|
10638
|
-
onClose:
|
|
10639
|
-
onSubmit:
|
|
10932
|
+
onClose: T,
|
|
10933
|
+
onSubmit: E
|
|
10640
10934
|
}), null, 16)) : (openBlock(), createBlock(chat_input_default, {
|
|
10641
10935
|
key: 1,
|
|
10936
|
+
ref_key: "chatInputRef",
|
|
10937
|
+
ref: m,
|
|
10642
10938
|
modelValue: p.value,
|
|
10643
10939
|
"onUpdate:modelValue": i[0] || (i[0] = (e) => p.value = e),
|
|
10644
|
-
class: "user-edit-input"
|
|
10940
|
+
class: "user-edit-input",
|
|
10941
|
+
"default-upload-files": y.value,
|
|
10942
|
+
"on-send-message": D
|
|
10645
10943
|
}, {
|
|
10646
10944
|
"send-icon": withCtx(() => [createElementVNode("div", _hoisted_3$1, [createVNode(unref(Button), {
|
|
10647
10945
|
size: "small",
|
|
10648
|
-
onClick:
|
|
10946
|
+
onClick: C
|
|
10649
10947
|
}, {
|
|
10650
10948
|
default: withCtx(() => [createTextVNode(toDisplayString(unref(t)("取消")), 1)]),
|
|
10651
10949
|
_: 1
|
|
10652
10950
|
}), createVNode(unref(Button), {
|
|
10653
10951
|
size: "small",
|
|
10654
10952
|
theme: "primary",
|
|
10655
|
-
onClick:
|
|
10953
|
+
onClick: S
|
|
10656
10954
|
}, {
|
|
10657
10955
|
default: withCtx(() => [createTextVNode(toDisplayString(unref(t)("发送")), 1)]),
|
|
10658
10956
|
_: 1
|
|
10659
10957
|
})])]),
|
|
10660
10958
|
_: 1
|
|
10661
|
-
}, 8, ["modelValue"]))], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
10662
|
-
key: 0,
|
|
10663
|
-
|
|
10664
|
-
|
|
10665
|
-
|
|
10666
|
-
|
|
10667
|
-
|
|
10668
|
-
|
|
10669
|
-
|
|
10670
|
-
|
|
10671
|
-
"
|
|
10672
|
-
"
|
|
10673
|
-
|
|
10959
|
+
}, 8, ["modelValue", "default-upload-files"]))], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
10960
|
+
y.value.length ? (openBlock(!0), createElementBlock(Fragment, { key: 0 }, renderList(y.value, (e, n) => {
|
|
10961
|
+
var r;
|
|
10962
|
+
return openBlock(), createElementBlock("div", {
|
|
10963
|
+
key: (r = e.url) == null ? n : r,
|
|
10964
|
+
class: "ai-user-message-binary-files"
|
|
10965
|
+
}, [createVNode(file_content_default, {
|
|
10966
|
+
files: [e],
|
|
10967
|
+
readonly: !0
|
|
10968
|
+
}, null, 8, ["files"])]);
|
|
10969
|
+
}), 128)) : createCommentVNode("", !0),
|
|
10970
|
+
(_.value || b.value).length ? (openBlock(), createElementBlock("div", _hoisted_2$1, [Array.isArray(_.value) ? (openBlock(), createBlock(key_value_content_default, {
|
|
10971
|
+
key: 0,
|
|
10972
|
+
content: _.value,
|
|
10973
|
+
title: g.value
|
|
10974
|
+
}, null, 8, ["content", "title"])) : n.content ? (openBlock(!0), createElementBlock(Fragment, { key: 1 }, renderList(Array.isArray(b.value) ? b.value : [b.value], (n, r) => (openBlock(), createElementBlock(Fragment, { key: r }, [typeof n == "string" ? (openBlock(), createBlock(markdown_content_default, {
|
|
10975
|
+
key: 0,
|
|
10976
|
+
content: n
|
|
10977
|
+
}, null, 8, ["content"])) : n.type === unref(MessageContentType).Text ? (openBlock(), createBlock(markdown_content_default, {
|
|
10978
|
+
key: 1,
|
|
10979
|
+
content: n.text
|
|
10980
|
+
}, null, 8, ["content"])) : createCommentVNode("", !0)], 64))), 128)) : createCommentVNode("", !0)])) : createCommentVNode("", !0),
|
|
10981
|
+
createVNode(message_tools_default, {
|
|
10982
|
+
class: "ai-user-message-tools",
|
|
10983
|
+
"message-tools": unref(CONST_USER_MESSAGE_TOOLS),
|
|
10984
|
+
"on-action": x,
|
|
10985
|
+
"update-tools": []
|
|
10986
|
+
}, null, 8, ["message-tools"])
|
|
10987
|
+
], 64))]));
|
|
10674
10988
|
}
|
|
10675
10989
|
}), message_render_default = /* @__PURE__ */ defineComponent({
|
|
10676
10990
|
__name: "message-render",
|
|
10677
10991
|
props: {
|
|
10992
|
+
onInputConfirm: { type: Function },
|
|
10993
|
+
onShortcutConfirm: { type: Function },
|
|
10678
10994
|
onAction: { type: Function },
|
|
10679
10995
|
message: {}
|
|
10680
10996
|
},
|
|
10681
10997
|
setup(e) {
|
|
10682
10998
|
let n = e, r = useSlots(), i = computed(() => {
|
|
10683
10999
|
switch (n.message.role) {
|
|
10684
|
-
case MessageRole.User: return h(user_message_default, _objectSpread2(_objectSpread2({}, n.message), {}, {
|
|
11000
|
+
case MessageRole.User: return h(user_message_default, _objectSpread2(_objectSpread2({}, n.message), {}, {
|
|
11001
|
+
onAction: n.onAction,
|
|
11002
|
+
onInputConfirm: n.onInputConfirm,
|
|
11003
|
+
onShortcutConfirm: n.onShortcutConfirm
|
|
11004
|
+
}));
|
|
10685
11005
|
case MessageRole.Assistant: return h(assistant_message_default, n.message, { default: (e) => renderSlot(r, "default", e, () => [h(content_render_default, {
|
|
10686
11006
|
content: n.message.content || "",
|
|
10687
11007
|
status: n.message.status
|
|
@@ -10700,19 +11020,22 @@ var _hoisted_1$16 = { class: "ai-slash-input-wrapper" }, _hoisted_2$11 = ["aria-
|
|
|
10700
11020
|
props: /* @__PURE__ */ mergeModels({
|
|
10701
11021
|
enableSelection: {
|
|
10702
11022
|
type: Boolean,
|
|
10703
|
-
default: !
|
|
11023
|
+
default: !0
|
|
10704
11024
|
},
|
|
10705
11025
|
messages: {},
|
|
10706
11026
|
messageStatus: {},
|
|
10707
11027
|
onAgentAction: {},
|
|
10708
|
-
|
|
11028
|
+
onAgentFeedback: {},
|
|
11029
|
+
onUserAction: {},
|
|
11030
|
+
onUserInputConfirm: {},
|
|
11031
|
+
onUserShortcutConfirm: {}
|
|
10709
11032
|
}, {
|
|
10710
11033
|
selectedMessages: { required: !1 },
|
|
10711
11034
|
selectedMessagesModifiers: {}
|
|
10712
11035
|
}),
|
|
10713
11036
|
emits: /* @__PURE__ */ mergeModels(["stopStreaming"], ["update:selectedMessages"]),
|
|
10714
11037
|
setup(n) {
|
|
10715
|
-
let r = n, i = useModel(n, "selectedMessages"), a = useTemplateRef("messageContainerRef"), o = useTemplateRef("messageContainerBottomRef"), d = ref([]), { isScrollBottom: p, toScrollBottom: m, scrollBottomHeight: g } = useContainerScrollProvider(a, o), { copy: _ } = useClipboard();
|
|
11038
|
+
let r = n, i = useModel(n, "selectedMessages"), a = useTemplateRef("messageContainerRef"), o = useTemplateRef("messageContainerBottomRef"), d = ref([]), { isScrollBottom: p, toScrollBottom: m, scrollBottomHeight: g } = useContainerScrollProvider(a, o), { copy: _ } = useClipboard(), v = { appendTo: () => document.querySelector(".draggable-container-content") || document.body };
|
|
10716
11039
|
watchEffect(() => {
|
|
10717
11040
|
let e = [], n = [];
|
|
10718
11041
|
for (let i of r.messages) {
|
|
@@ -10749,28 +11072,39 @@ var _hoisted_1$16 = { class: "ai-slash-input-wrapper" }, _hoisted_2$11 = ["aria-
|
|
|
10749
11072
|
isHover: !1,
|
|
10750
11073
|
checked: !1
|
|
10751
11074
|
}), d.value = n;
|
|
11075
|
+
}), watch(i, (e) => {
|
|
11076
|
+
var n;
|
|
11077
|
+
if (d.value.length) {
|
|
11078
|
+
for (let i of (n = d.value) == null ? [] : n) if (i) {
|
|
11079
|
+
var r;
|
|
11080
|
+
i.checked = (r = e == null ? void 0 : e.some((e) => i.messages.some((n) => e.id === n.id))) == null ? !1 : r;
|
|
11081
|
+
}
|
|
11082
|
+
}
|
|
11083
|
+
}, {
|
|
11084
|
+
immediate: !0,
|
|
11085
|
+
flush: "post"
|
|
10752
11086
|
});
|
|
10753
|
-
let
|
|
11087
|
+
let y = function() {
|
|
10754
11088
|
var e = _asyncToGenerator(function* (e, n) {
|
|
10755
11089
|
var i;
|
|
10756
|
-
e.id === "copy" && (console.log("messages", n), _(n.filter((e) => e.role !== MessageRole.Reasoning).map((e) => typeof e.content == "string" ? e.content : JSON.stringify(e.content || "")).join("\n"))), (i = r.onAgentAction) == null
|
|
11090
|
+
return e.id === "copy" && (console.log("messages", n), _(n.filter((e) => e.role !== MessageRole.Reasoning).map((e) => typeof e.content == "string" ? e.content : JSON.stringify(e.content || "")).join("\n"))), (i = r.onAgentAction) == null ? void 0 : i.call(r, e, n);
|
|
10757
11091
|
});
|
|
10758
11092
|
return function(n, r) {
|
|
10759
11093
|
return e.apply(this, arguments);
|
|
10760
11094
|
};
|
|
10761
|
-
}(),
|
|
10762
|
-
var e = _asyncToGenerator(function* (e) {
|
|
10763
|
-
var
|
|
10764
|
-
(
|
|
11095
|
+
}(), b = function() {
|
|
11096
|
+
var e = _asyncToGenerator(function* (e, n) {
|
|
11097
|
+
var i;
|
|
11098
|
+
(i = r.onUserAction) == null || i.call(r, e, n);
|
|
10765
11099
|
});
|
|
10766
|
-
return function(n) {
|
|
11100
|
+
return function(n, r) {
|
|
10767
11101
|
return e.apply(this, arguments);
|
|
10768
11102
|
};
|
|
10769
|
-
}(),
|
|
11103
|
+
}(), x = (e) => {
|
|
10770
11104
|
e.isHover = !0;
|
|
10771
|
-
},
|
|
11105
|
+
}, S = (e) => {
|
|
10772
11106
|
e.isHover = !1;
|
|
10773
|
-
},
|
|
11107
|
+
}, C = (e, n) => {
|
|
10774
11108
|
var r, a;
|
|
10775
11109
|
let o = e.type === MessageRole.User;
|
|
10776
11110
|
(r = d.value) == null || r.forEach((r, i) => {
|
|
@@ -10780,35 +11114,67 @@ var _hoisted_1$16 = { class: "ai-slash-input-wrapper" }, _hoisted_2$11 = ["aria-
|
|
|
10780
11114
|
e && (e.checked = n);
|
|
10781
11115
|
}
|
|
10782
11116
|
}), i.value = (a = d.value) == null ? void 0 : a.filter((e) => e.checked).map((e) => e.messages).flat();
|
|
10783
|
-
}
|
|
10784
|
-
|
|
11117
|
+
}, T = function() {
|
|
11118
|
+
var e = _asyncToGenerator(function* (e, n, i) {
|
|
11119
|
+
var a;
|
|
11120
|
+
(a = r.onUserInputConfirm) == null || a.call(r, e, n, i);
|
|
11121
|
+
});
|
|
11122
|
+
return function(n, r, i) {
|
|
11123
|
+
return e.apply(this, arguments);
|
|
11124
|
+
};
|
|
11125
|
+
}(), E = function() {
|
|
11126
|
+
var e = _asyncToGenerator(function* (e, n) {
|
|
11127
|
+
var i;
|
|
11128
|
+
(i = r.onUserShortcutConfirm) == null || i.call(r, e, n);
|
|
11129
|
+
});
|
|
11130
|
+
return function(n, r) {
|
|
11131
|
+
return e.apply(this, arguments);
|
|
11132
|
+
};
|
|
11133
|
+
}();
|
|
11134
|
+
return (i, _) => (openBlock(), createElementBlock("div", {
|
|
10785
11135
|
ref_key: "messageContainerRef",
|
|
10786
11136
|
ref: a,
|
|
10787
11137
|
class: "ai-message-container"
|
|
10788
11138
|
}, [
|
|
10789
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(d.value, (
|
|
10790
|
-
key:
|
|
11139
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(d.value, (a, o) => (openBlock(), createElementBlock("div", {
|
|
11140
|
+
key: o,
|
|
10791
11141
|
class: "message-group",
|
|
10792
|
-
style: normalizeStyle({ backgroundColor:
|
|
10793
|
-
onMouseenter: (e) =>
|
|
10794
|
-
onMouseleave: (e) =>
|
|
11142
|
+
style: normalizeStyle({ backgroundColor: a.checked ? "#f5f7fa" : "transparent" }),
|
|
11143
|
+
onMouseenter: (e) => x(a),
|
|
11144
|
+
onMouseleave: (e) => S(a)
|
|
10795
11145
|
}, [n.enableSelection ? (openBlock(), createBlock(unref(Checkbox), {
|
|
10796
|
-
key:
|
|
11146
|
+
key: o,
|
|
10797
11147
|
class: "message-group-checkbox",
|
|
10798
|
-
"model-value":
|
|
10799
|
-
"onUpdate:modelValue": (e) =>
|
|
10800
|
-
}, null, 8, ["model-value", "onUpdate:modelValue"])) : createCommentVNode("", !0), createElementVNode("div", _hoisted_2, [(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
11148
|
+
"model-value": a.checked,
|
|
11149
|
+
"onUpdate:modelValue": (e) => C(a, e)
|
|
11150
|
+
}, null, 8, ["model-value", "onUpdate:modelValue"])) : createCommentVNode("", !0), createElementVNode("div", _hoisted_2, [(openBlock(!0), createElementBlock(Fragment, null, renderList(a.messages, (e, n) => renderSlot(i.$slots, "default", mergeProps({
|
|
10801
11151
|
key: n,
|
|
10802
11152
|
ref_for: !0
|
|
10803
11153
|
}, { message: e }), () => [(openBlock(), createBlock(message_render_default, {
|
|
10804
11154
|
key: n,
|
|
10805
11155
|
message: e,
|
|
10806
|
-
"on-action":
|
|
10807
|
-
|
|
11156
|
+
"on-action": (n) => b(n, e),
|
|
11157
|
+
"on-input-confirm": (n, r) => T(e, n, r),
|
|
11158
|
+
"on-shortcut-confirm": (n) => E(e, n)
|
|
11159
|
+
}, null, 8, [
|
|
11160
|
+
"message",
|
|
11161
|
+
"on-action",
|
|
11162
|
+
"on-input-confirm",
|
|
11163
|
+
"on-shortcut-confirm"
|
|
11164
|
+
]))])), 128)), a.type === unref(MessageRole).Assistant ? (openBlock(), createBlock(message_tools_default, {
|
|
10808
11165
|
key: 0,
|
|
10809
|
-
"on-action": (e) =>
|
|
10810
|
-
style: normalizeStyle({ visibility:
|
|
10811
|
-
|
|
11166
|
+
"on-action": (e) => y(e, a.messages),
|
|
11167
|
+
style: normalizeStyle({ visibility: a.isHover ? "visible" : "hidden" }),
|
|
11168
|
+
"tippy-options": v,
|
|
11169
|
+
onFeedback: (e, n, i) => {
|
|
11170
|
+
var o;
|
|
11171
|
+
return (o = r.onAgentFeedback) == null ? void 0 : o.call(r, e, a.messages, n, i);
|
|
11172
|
+
}
|
|
11173
|
+
}, null, 8, [
|
|
11174
|
+
"on-action",
|
|
11175
|
+
"style",
|
|
11176
|
+
"onFeedback"
|
|
11177
|
+
])) : createCommentVNode("", !0)])], 44, _hoisted_1))), 128)),
|
|
10812
11178
|
createElementVNode("div", {
|
|
10813
11179
|
ref_key: "messageContainerBottomRef",
|
|
10814
11180
|
ref: o,
|
|
@@ -10817,7 +11183,7 @@ var _hoisted_1$16 = { class: "ai-slash-input-wrapper" }, _hoisted_2$11 = ["aria-
|
|
|
10817
11183
|
}, null, 512),
|
|
10818
11184
|
createElementVNode("div", _hoisted_3, [withDirectives(createVNode(scroll_btn_default, {
|
|
10819
11185
|
title: unref(t)("停止生成"),
|
|
10820
|
-
onClick:
|
|
11186
|
+
onClick: _[0] || (_[0] = (e) => i.$emit("stopStreaming"))
|
|
10821
11187
|
}, {
|
|
10822
11188
|
icon: withCtx(() => [createVNode(unref(CloseCircleIcon))]),
|
|
10823
11189
|
_: 1
|
|
@@ -10831,4 +11197,4 @@ var _hoisted_1$16 = { class: "ai-slash-input-wrapper" }, _hoisted_2$11 = ["aria-
|
|
|
10831
11197
|
], 512));
|
|
10832
11198
|
}
|
|
10833
11199
|
});
|
|
10834
|
-
export { AIBluekingIcon, AI_BLUEKING_MESSAGE_SLOT_ID, AgentIcon, ai_selection_default as AiSelection, ArrowDownIcon, ArrowRightIcon, CHAT_Z_INDEX, CONST_MESSAGE_TOOLS, CONST_UPDATE_TOOLS, CONST_USER_MESSAGE_TOOLS, CONTAINER_SCROLL_TOKEN, chat_input_default as ChatInput, CiteIcon, CloseCircleIcon, CloseIcon, CollapsedIcon, ContentLoadingIcon, content_render_default as ContentRender, CopyIcon, DEFAULT_SHORTCUTS, Delete, DeleteIcon, DocumentIcon, EDITOR_MENU_Z_INDEX, EDITOR_Z_INDEX, EditIcon, ErrorIcon, InsertText, LikeIcon, LinkIcon, LoadingMessageIcon, MESSAGE_SLOT_ID, MarkdownLanguageMap, message_container_default as MessageContainer, MessageContentType, message_render_default as MessageRender, MessageRole, MessageState, MessageStatus, message_tools_default as MessageTools, user_feedback_default as MessageUserFeedback, MoreAgentIcon, MoreIcon, OverflowTips, PreviewIcon, RebuildIcon, RemoveIcon, ReplaceAll, SELECTION_Z_INDEX, SHORTCUT_MENU_Z_INDEX, SendMessageIcon, ShareIcon, shortcut_btn_default as ShortcutBtn, shortcut_btns_default as ShortcutBtns, shortcut_render_default as ShortcutRender, TargetIcon, ThinkingIcon, ToolIconsMap, UnLikeIcon, commonSVGProps, completeMarkdownSyntax, createEditor, docToString, formatDuration, getCookieByName, getMessageSlotId, getScrollParent, isEn, lang, markdownAnimationAttrs, markdownItLatex, markdownItMermaid, microtask, min, needsMarkdownCompletion, noop, plainSchema, removeCompletionSuffix, resourceTypeMap, schema, stringToDoc, t, useAnimationText, useClipboard, useCommandSelection, useContainerScrollConsumer, useContainerScrollProvider, useGlobalConfig, useMenuKeydown, useMessageSlotId, useObserverVisibleList, useParentScrolling, voidNode };
|
|
11200
|
+
export { AIBluekingIcon, AI_BLUEKING_MESSAGE_SLOT_ID, AgentIcon, ai_selection_default as AiSelection, ArrowDownIcon, ArrowRightIcon, CHAT_Z_INDEX, CONST_MESSAGE_TOOLS, CONST_UPDATE_TOOLS, CONST_USER_MESSAGE_TOOLS, CONTAINER_SCROLL_TOKEN, chat_input_default as ChatInput, CiteIcon, CloseCircleIcon, CloseIcon, CollapsedIcon, ContentLoadingIcon, content_render_default as ContentRender, CopyIcon, DEFAULT_SHORTCUTS, Delete, DeleteCircleIcon, DeleteIcon, DocLinkIcon, DocumentIcon, EDITOR_MENU_Z_INDEX, EDITOR_Z_INDEX, EditIcon, ErrorIcon, FileUploadIcon, ImageErrorIcon, InsertText, LikeIcon, LinkIcon, LoadingMessageIcon, MAX_UPLOAD_FILES, MAX_UPLOAD_FILE_SIZE, MESSAGE_SLOT_ID, MarkdownLanguageMap, message_container_default as MessageContainer, MessageContentType, message_render_default as MessageRender, MessageRole, MessageState, MessageStatus, message_tools_default as MessageTools, user_feedback_default as MessageUserFeedback, MoreAgentIcon, MoreIcon, OverflowTips, PreviewIcon, RebuildIcon, RemoveIcon, ReplaceAll, SELECTION_Z_INDEX, SHORTCUT_MENU_Z_INDEX, SendMessageIcon, ShareIcon, shortcut_btn_default as ShortcutBtn, shortcut_btns_default as ShortcutBtns, shortcut_render_default as ShortcutRender, TargetIcon, ThinkingIcon, ToolIconsMap, UnLikeIcon, UploadStatus, commonSVGProps, completeMarkdownSyntax, createEditor, docToString, formatDuration, formatFileSize, getCookieByName, getFileExtension, getFilePreviewUrl, getMessageSlotId, getScrollParent, isEn, isImageFile, lang, markdownAnimationAttrs, markdownItLatex, markdownItMermaid, microtask, min, needsMarkdownCompletion, noop, plainSchema, removeCompletionSuffix, resourceTypeMap, schema, stringToDoc, t, useAnimationText, useClipboard, useCommandSelection, useContainerScrollConsumer, useContainerScrollProvider, useGlobalConfig, useMenuKeydown, useMessageSlotId, useObserverVisibleList, useParentScrolling, voidNode };
|