@fv-ui/ai-chat 1.5.1 → 1.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -18
- package/dist/index.d.ts +46 -12
- package/dist/style.css +1 -1
- package/es/index.mjs +355 -227
- package/lib/index.js +353 -225
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -33300,15 +33300,17 @@
|
|
|
33300
33300
|
generateFailed: "\u751F\u6210\u5931\u8D25",
|
|
33301
33301
|
/** 追问建议 chips 区 aria 标签 */
|
|
33302
33302
|
followups: "\u8FFD\u95EE\u5EFA\u8BAE",
|
|
33303
|
+
/** 追问建议区标题(list 样式:分隔线下方灰色标题) */
|
|
33304
|
+
followupsTitle: "\u8FFD\u95EE",
|
|
33303
33305
|
loadingPhrases: ["\u6B63\u5728\u601D\u8003\u2026", "\u6B63\u5728\u6574\u7406\u601D\u8DEF\u2026", "\u6B63\u5728\u751F\u6210\u56DE\u7B54\u2026"],
|
|
33304
33306
|
/** 消息评价(点赞/点踩) */
|
|
33305
33307
|
feedback: {
|
|
33306
33308
|
like: "\u70B9\u8D5E",
|
|
33307
33309
|
dislike: "\u70B9\u8E29",
|
|
33308
|
-
/**
|
|
33309
|
-
dislikeTitle: "\u544A\u8BC9
|
|
33310
|
+
/** 点踩弹窗标题({name} = AI 名称,渲染时替换为 assistantName,空串回落 defaultAssistantName) */
|
|
33311
|
+
dislikeTitle: "\u62B1\u6B49\uFF0C\u8BF7\u544A\u8BC9 {name} \u54EA\u91CC\u4E0D\u597D",
|
|
33310
33312
|
/** 点踩附言输入占位(选填 ≤500 字) */
|
|
33311
|
-
dislikePlaceholder: "\
|
|
33313
|
+
dislikePlaceholder: "\u6B22\u8FCE\u8BF4\u8BF4\u4F60\u7684\u60F3\u6CD5",
|
|
33312
33314
|
/** 附言提交按钮(不带原因直接点踩) */
|
|
33313
33315
|
submit: "\u63D0\u4EA4",
|
|
33314
33316
|
/** 附言跳过按钮 */
|
|
@@ -33338,7 +33340,9 @@
|
|
|
33338
33340
|
noBody: "\u54CD\u5E94\u65E0 body",
|
|
33339
33341
|
generateFailed: "\u751F\u6210\u5931\u8D25",
|
|
33340
33342
|
recordUnsupported: "\u5F53\u524D\u73AF\u5883\u4E0D\u652F\u6301\u97F3\u9891\u5F55\u5236",
|
|
33341
|
-
speechError: "\u8BED\u97F3\u8BC6\u522B\u9519\u8BEF: {error}"
|
|
33343
|
+
speechError: "\u8BED\u97F3\u8BC6\u522B\u9519\u8BEF: {error}",
|
|
33344
|
+
/** 附件类型拦截提示({name} = 文件名;accept 白名单外文件入列前 toast) */
|
|
33345
|
+
attachmentRejected: "\u4E0D\u652F\u6301\u8BE5\u7C7B\u578B\u6587\u4EF6\uFF0C\u7981\u6B62\u4E0A\u4F20\uFF1A{name}"
|
|
33342
33346
|
}
|
|
33343
33347
|
};
|
|
33344
33348
|
|
|
@@ -33435,12 +33439,13 @@
|
|
|
33435
33439
|
queried: "Queried",
|
|
33436
33440
|
generateFailed: "Generation failed",
|
|
33437
33441
|
followups: "Follow-up suggestions",
|
|
33442
|
+
followupsTitle: "Follow-ups",
|
|
33438
33443
|
loadingPhrases: ["Thinking...", "Organizing thoughts...", "Generating your answer..."],
|
|
33439
33444
|
feedback: {
|
|
33440
33445
|
like: "Like",
|
|
33441
33446
|
dislike: "Dislike",
|
|
33442
|
-
dislikeTitle: "
|
|
33443
|
-
dislikePlaceholder: "
|
|
33447
|
+
dislikeTitle: "Sorry \u2014 tell {name} what went wrong",
|
|
33448
|
+
dislikePlaceholder: "Feel free to share your thoughts",
|
|
33444
33449
|
submit: "Submit",
|
|
33445
33450
|
skip: "Skip",
|
|
33446
33451
|
failed: "Failed to submit feedback",
|
|
@@ -33466,7 +33471,9 @@
|
|
|
33466
33471
|
noBody: "Response has no body",
|
|
33467
33472
|
generateFailed: "Generation failed",
|
|
33468
33473
|
recordUnsupported: "Audio recording is not supported in this environment",
|
|
33469
|
-
speechError: "Speech recognition error: {error}"
|
|
33474
|
+
speechError: "Speech recognition error: {error}",
|
|
33475
|
+
/** 附件类型拦截提示({name} = 文件名;accept 白名单外文件入列前 toast) */
|
|
33476
|
+
attachmentRejected: "This file type is not supported: {name}"
|
|
33470
33477
|
}
|
|
33471
33478
|
};
|
|
33472
33479
|
|
|
@@ -33569,7 +33576,9 @@
|
|
|
33569
33576
|
const url = URL.createObjectURL(blob);
|
|
33570
33577
|
const a = document.createElement("a");
|
|
33571
33578
|
a.href = url;
|
|
33572
|
-
|
|
33579
|
+
const d = /* @__PURE__ */ new Date();
|
|
33580
|
+
const p = (n) => String(n).padStart(2, "0");
|
|
33581
|
+
a.download = `table_${d.getFullYear()}${p(d.getMonth() + 1)}${p(d.getDate())}-${p(d.getHours())}${p(d.getMinutes())}${p(d.getSeconds())}.csv`;
|
|
33573
33582
|
a.click();
|
|
33574
33583
|
URL.revokeObjectURL(url);
|
|
33575
33584
|
}
|
|
@@ -37507,6 +37516,45 @@
|
|
|
37507
37516
|
}
|
|
37508
37517
|
});
|
|
37509
37518
|
|
|
37519
|
+
const PATHS$1 = {
|
|
37520
|
+
excel: [
|
|
37521
|
+
"M895.969 336.015l0 575.953c0 26.497-21.498 47.995-47.998 47.995L176.028 959.963c-26.498 0-47.996-21.498-47.996-47.995L128.032 112.033c0-26.498 21.499-47.996 47.996-47.996L623.99 64.037c26.498 0 63.494 15.499 81.994 33.997l155.986 155.987C880.469 272.52 895.969 309.517 895.969 336.015zM831.973 384.011 623.99 384.011c-26.498 0-47.996-21.499-47.996-47.996L575.994 128.032 192.026 128.032l0 767.936 639.946 0L831.972 384.011zM639.99 320.016l187.984 0c-3-8.5-7.5-16.999-11-20.499L660.488 143.03c-3.5-3.5-12-7.999-20.498-10.999L639.99 320.016z",
|
|
37522
|
+
"M569.09 800l-56.717-88.062L455.656 800 319.833 800l125.375-192.54L319.833 415.667 454.91 415.667l57.463 88.061 56.717-88.061 135.076 0L580.285 607.46 704.166 800 569.09 800z"
|
|
37523
|
+
],
|
|
37524
|
+
pdf: [
|
|
37525
|
+
"M895.969 336.015l0 575.953c0 26.497-21.498 47.995-47.998 47.995L176.028 959.963c-26.498 0-47.996-21.498-47.996-47.995L128.032 112.033c0-26.498 21.499-47.996 47.996-47.996L623.99 64.037c26.498 0 63.494 15.499 81.994 33.997l155.986 155.987C880.469 272.52 895.969 309.517 895.969 336.015zM831.973 384.011 623.99 384.011c-26.498 0-47.996-21.499-47.996-47.996L575.994 128.032 192.026 128.032l0 767.936 639.946 0L831.972 384.011zM639.99 320.016l187.984 0c-3-8.5-7.5-16.999-11-20.499L660.488 143.03c-3.5-3.5-12-7.999-20.498-10.999L639.99 320.016z",
|
|
37526
|
+
"M796.394 580.111c-13.039-15.483-39.777-23.011-81.741-23.011-24.393 0-53.857 2.575-87.626 7.658-92.235-67.438-117.988-141.834-117.988-141.834s15.753-40.104 16.753-105.604c0.632-41.405-5.78-69.335-22.346-85.562-6.439-6.308-17.241-10.383-27.519-10.383-8.021 0-15.532 2.356-21.687 6.86-47.949 35.085 4.401 200.485 5.802 204.892-22.627 55.688-51.132 114.686-80.47 166.526-9.532 16.844-8.603 15.526-16.64 29.223 0 0-81.141 38.112-120.498 84.923-22.238 26.449-25.049 44.306-23.868 57.914l0.03 0.297c1.874 16.023 22.387 30.616 43.039 30.616 0.856 0 1.719-0.026 2.563-0.078 20.989-1.295 43.989-16.209 70.314-45.594 17.376-19.398 39.958-53.526 67.147-101.475 78.009-22.19 146.661-37.995 204.195-47.01 42.19 22.706 104.963 48.419 147.693 48.419 14.334 0 25.864-2.922 34.271-8.685 10.059-6.893 14.33-15.481 16.985-31.383S803.762 588.859 796.394 580.111zM705.261 599.473c37.504 0 57.811 5.453 68.241 10.027 3.218 1.411 5.558 2.771 7.218 3.909-2.939 1.879-8.721 4.25-19.171 4.25-17.327 0-40.069-6.051-67.808-18.022C697.687 599.527 701.528 599.473 705.261 599.473zM482.992 254.571c0.026-0.049 0.055-0.101 0.088-0.154 8.045 4.236 11.799 33.986 11.045 51.236-1.012 23.149-1.252 32.094-5.316 46.316C477.791 322.32 477.01 269.024 482.992 254.571zM485.935 489.25c18.918 30.724 46.975 63.999 74.007 87.758-52.76 11.15-103.416 25.127-134.937 36.006C458.791 555.32 483.716 494.969 485.935 489.25zM268.785 754.176c4.578-7.625 17.084-22.398 48.8-50.966-21.74 32.696-37.708 50.501-53.91 61.605C265.017 761.314 266.705 757.642 268.785 754.176z"
|
|
37527
|
+
],
|
|
37528
|
+
ppt: [
|
|
37529
|
+
"M895.969 336.015l0 575.953c0 26.497-21.498 47.995-47.998 47.995L176.028 959.963c-26.498 0-47.996-21.498-47.996-47.995L128.032 112.033c0-26.498 21.499-47.996 47.996-47.996L623.99 64.037c26.498 0 63.494 15.499 81.994 33.997l155.986 155.987C880.469 272.52 895.969 309.517 895.969 336.015zM831.973 384.011 623.99 384.011c-26.498 0-47.996-21.499-47.996-47.996L575.994 128.032 192.026 128.032l0 767.936 639.946 0L831.972 384.011zM639.99 320.016l187.984 0c-3-8.5-7.5-16.999-11-20.499L660.488 143.03c-3.5-3.5-12-7.999-20.498-10.999L639.99 320.016z",
|
|
37530
|
+
"M458.56 832l-92.027 0L366.533 361.855l116.89 0c29.708 0 53.118 1.615 70.231 4.843 17.114 3.229 30.944 8.396 41.493 15.5 19.374 13.133 34.601 30.464 45.69 51.987 11.085 21.529 16.629 44.561 16.629 69.102 0 44.994-14.854 80.942-44.56 107.849-29.708 26.912-69.747 40.362-120.12 40.362L458.56 651.498 458.56 832zM458.56 572.064l24.217 0c25.616 0 45.257-5.54 58.93-16.63 13.668-11.085 20.505-26.962 20.505-47.628 0-21.312-6.62-37.184-19.859-47.628-13.237-10.439-33.313-15.661-60.221-15.661L458.56 444.517 458.56 572.064z"
|
|
37531
|
+
],
|
|
37532
|
+
word: [
|
|
37533
|
+
"M895.969 336.015l0 575.953c0 26.497-21.498 47.995-47.998 47.995L176.028 959.963c-26.498 0-47.996-21.498-47.996-47.995L128.032 112.033c0-26.498 21.499-47.996 47.996-47.996L623.99 64.037c26.498 0 63.494 15.499 81.994 33.997l155.986 155.987C880.469 272.52 895.969 309.517 895.969 336.015zM831.973 384.011 623.99 384.011c-26.498 0-47.996-21.499-47.996-47.996L575.994 128.032 192.026 128.032l0 767.936 639.946 0L831.972 384.011zM639.99 320.016l187.984 0c-3-8.5-7.5-16.999-11-20.499L660.488 143.03c-3.5-3.5-12-7.999-20.498-10.999L639.99 320.016z",
|
|
37534
|
+
"M783.309 439.426 612.254 800l-102.52 0-18.691-214.441-1.133 0L390.223 800 286.287 800l-45.596-360.574 103.652 0 11.045 227.695 1.133 0 103.936-227.695 104.219 0 16.992 224.977 1.133 0 82.412-224.977L783.309 439.426z"
|
|
37535
|
+
],
|
|
37536
|
+
txt: [
|
|
37537
|
+
"M650.666667 42.666667a32.277333 32.277333 0 0 1 14.592 3.52l1.408 0.768a36.224 36.224 0 0 1 4.202666 2.88l0.533334 0.448 1.472 1.344 214.186666 214.186666 0.661334 0.704 0.170666 0.192-1.28-1.344 1.770667 1.92 0.704 0.853334a33.642667 33.642667 0 0 1 1.877333 2.602666l0.746667 1.258667 0.768 1.386667c2.261333 4.394667 3.52 9.344 3.52 14.613333V938.666667a42.666667 42.666667 0 0 1-42.666667 42.666666H170.666667a42.666667 42.666667 0 0 1-42.666667-42.666666V85.333333a42.666667 42.666667 0 0 1 42.666667-42.666666h480zM576 106.666667H192v810.666666h640V362.666667H618.666667a42.666667 42.666667 0 0 1-42.666667-42.666667V106.666667z m-32 554.666666a32 32 0 0 1 0 64h-170.666667a32 32 0 0 1 0-64h170.666667z m110.229333-192c15.701333 0 28.437333 14.336 28.437334 32s-12.736 32-28.437334 32H369.770667C354.069333 533.333333 341.333333 518.997333 341.333333 501.333333s12.736-32 28.437334-32h284.458666zM640 109.248V298.666667h189.418667L640 109.248z"
|
|
37538
|
+
],
|
|
37539
|
+
file: [
|
|
37540
|
+
"M896.211 336.149l0 576.316c0 26.515-21.512 48.026-48.026 48.026L175.815 960.491c-26.515 0-48.026-21.512-48.026-48.026L127.789 112.026c0-26.515 21.512-48.026 48.026-48.026l448.246 0c26.515 0 63.535 15.509 82.045 34.019l156.086 156.086C880.702 272.614 896.211 309.635 896.211 336.149zM832.176 384.176 624.062 384.176c-26.515 0-48.026-21.512-48.026-48.026L576.036 128.035 191.824 128.035l0 768.422 640.352 0L832.176 384.176zM640.07 320.141l188.104 0c-3.002-8.505-7.505-17.009-11.006-20.511L660.581 143.043c-3.501-3.502-12.006-8.004-20.511-11.006L640.07 320.141z"
|
|
37541
|
+
]
|
|
37542
|
+
};
|
|
37543
|
+
const FileIcon = vue.defineComponent({
|
|
37544
|
+
name: "FvFileIcon",
|
|
37545
|
+
props: {
|
|
37546
|
+
/** 图标类型:excel/pdf/ppt/word/txt/file */
|
|
37547
|
+
kind: { type: String, default: "file" }
|
|
37548
|
+
},
|
|
37549
|
+
setup(props) {
|
|
37550
|
+
return () => vue.h("svg", {
|
|
37551
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
37552
|
+
viewBox: "0 0 1024 1024",
|
|
37553
|
+
"aria-hidden": "true"
|
|
37554
|
+
}, PATHS$1[props.kind].map((d) => vue.h("path", { d, fill: "currentColor" })));
|
|
37555
|
+
}
|
|
37556
|
+
});
|
|
37557
|
+
|
|
37510
37558
|
const _hoisted_1$6 = ["src", "alt"];
|
|
37511
37559
|
const _hoisted_2$6 = { class: "fv-files-card-info" };
|
|
37512
37560
|
const _hoisted_3$6 = ["title"];
|
|
@@ -37517,7 +37565,7 @@
|
|
|
37517
37565
|
};
|
|
37518
37566
|
const _hoisted_6$2 = {
|
|
37519
37567
|
key: 2,
|
|
37520
|
-
class: "fv-files-card-
|
|
37568
|
+
class: "fv-files-card-size"
|
|
37521
37569
|
};
|
|
37522
37570
|
const _hoisted_7$1 = ["aria-label"];
|
|
37523
37571
|
const KB = 1024;
|
|
@@ -37538,40 +37586,39 @@
|
|
|
37538
37586
|
},
|
|
37539
37587
|
setup(__props) {
|
|
37540
37588
|
const EXT_ICON = {
|
|
37541
|
-
|
|
37542
|
-
|
|
37543
|
-
|
|
37544
|
-
|
|
37545
|
-
|
|
37546
|
-
|
|
37547
|
-
|
|
37548
|
-
|
|
37549
|
-
|
|
37550
|
-
ppt:
|
|
37551
|
-
pptx:
|
|
37552
|
-
|
|
37553
|
-
|
|
37554
|
-
|
|
37555
|
-
|
|
37556
|
-
|
|
37557
|
-
|
|
37558
|
-
|
|
37559
|
-
|
|
37560
|
-
|
|
37561
|
-
|
|
37562
|
-
|
|
37563
|
-
|
|
37564
|
-
"
|
|
37565
|
-
|
|
37566
|
-
|
|
37567
|
-
|
|
37568
|
-
|
|
37569
|
-
|
|
37570
|
-
|
|
37571
|
-
|
|
37572
|
-
|
|
37573
|
-
|
|
37574
|
-
dll: ElementPlusIconsVue.Cpu
|
|
37589
|
+
// excel / 表格
|
|
37590
|
+
xls: "excel",
|
|
37591
|
+
xlsx: "excel",
|
|
37592
|
+
xlsm: "excel",
|
|
37593
|
+
csv: "excel",
|
|
37594
|
+
et: "excel",
|
|
37595
|
+
// pdf
|
|
37596
|
+
pdf: "pdf",
|
|
37597
|
+
// ppt / 幻灯片
|
|
37598
|
+
ppt: "ppt",
|
|
37599
|
+
pptx: "ppt",
|
|
37600
|
+
pptm: "ppt",
|
|
37601
|
+
dps: "ppt",
|
|
37602
|
+
// word / wps 文字
|
|
37603
|
+
doc: "word",
|
|
37604
|
+
docx: "word",
|
|
37605
|
+
docm: "word",
|
|
37606
|
+
rtf: "word",
|
|
37607
|
+
wps: "word",
|
|
37608
|
+
// 文本类(md/txt 及常见纯文本格式)
|
|
37609
|
+
txt: "txt",
|
|
37610
|
+
md: "txt",
|
|
37611
|
+
markdown: "txt",
|
|
37612
|
+
log: "txt",
|
|
37613
|
+
json: "txt",
|
|
37614
|
+
xml: "txt",
|
|
37615
|
+
html: "txt",
|
|
37616
|
+
htm: "txt",
|
|
37617
|
+
yml: "txt",
|
|
37618
|
+
yaml: "txt",
|
|
37619
|
+
ini: "txt",
|
|
37620
|
+
conf: "txt",
|
|
37621
|
+
sql: "txt"
|
|
37575
37622
|
};
|
|
37576
37623
|
const props = __props;
|
|
37577
37624
|
const dict = useLocaleDict(() => props.locale);
|
|
@@ -37588,9 +37635,9 @@
|
|
|
37588
37635
|
return `${Number.isInteger(mb) ? mb : mb.toFixed(1)}MB`;
|
|
37589
37636
|
});
|
|
37590
37637
|
const isImage = vue.computed(() => props.fileType === "image");
|
|
37591
|
-
const
|
|
37638
|
+
const docIconKind = vue.computed(() => {
|
|
37592
37639
|
const ext = props.name.includes(".") ? props.name.split(".").pop().toLowerCase() : "";
|
|
37593
|
-
return EXT_ICON[ext] ??
|
|
37640
|
+
return EXT_ICON[ext] ?? "file";
|
|
37594
37641
|
});
|
|
37595
37642
|
const thumbStyle = vue.computed(() => {
|
|
37596
37643
|
const s = props.imageSize || "";
|
|
@@ -37640,10 +37687,10 @@
|
|
|
37640
37687
|
vue.Fragment,
|
|
37641
37688
|
{ key: 1 },
|
|
37642
37689
|
[
|
|
37643
|
-
vue.createCommentVNode(" \u6587\u6863\u6A21\u5F0F:\u6309\u6269\u5C55\u540D\u6620\u5C04\u7C7B\u578B\u56FE\u6807 + \u540D\u79F0/\u5927\u5C0F "),
|
|
37690
|
+
vue.createCommentVNode(" \u6587\u6863\u6A21\u5F0F:\u6309\u6269\u5C55\u540D\u6620\u5C04\u8BBE\u8BA1\u7A3F\u7C7B\u578B\u56FE\u6807 + \u540D\u79F0/\u5927\u5C0F "),
|
|
37644
37691
|
vue.createVNode(vue.unref(elementPlus.ElIcon), { class: "fv-files-card-icon" }, {
|
|
37645
37692
|
default: vue.withCtx(() => [
|
|
37646
|
-
(vue.
|
|
37693
|
+
vue.createVNode(vue.unref(FileIcon), { kind: docIconKind.value }, null, 8, ["kind"])
|
|
37647
37694
|
]),
|
|
37648
37695
|
_: 1
|
|
37649
37696
|
/* STABLE */
|
|
@@ -37657,29 +37704,36 @@
|
|
|
37657
37704
|
class: "fv-files-card-name",
|
|
37658
37705
|
title: __props.name
|
|
37659
37706
|
}, vue.toDisplayString(__props.name), 9, _hoisted_3$6),
|
|
37660
|
-
vue.createCommentVNode(" error \u5E26\u6587\u6848\u65F6\u66FF\u4EE3\u5927\u5C0F\u884C(\u4E0A\u4F20\u5931\u8D25\u539F\u56E0);\u5426\u5219\u56DE\u843D\u5927\u5C0F "),
|
|
37707
|
+
vue.createCommentVNode(" error \u5E26\u6587\u6848\u65F6\u66FF\u4EE3\u5927\u5C0F\u884C(\u4E0A\u4F20\u5931\u8D25\u539F\u56E0);loading \u663E\u793A\u300C\u4E0A\u4F20\u4E2D\u2026\u300D;\u5426\u5219\u56DE\u843D\u5927\u5C0F "),
|
|
37661
37708
|
__props.status === "error" && __props.errorText ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
37662
37709
|
key: 0,
|
|
37663
37710
|
class: "fv-files-card-error",
|
|
37664
37711
|
title: __props.errorText
|
|
37665
|
-
}, vue.toDisplayString(__props.errorText), 9, _hoisted_4$4)) :
|
|
37712
|
+
}, vue.toDisplayString(__props.errorText), 9, _hoisted_4$4)) : __props.status === "loading" ? (vue.openBlock(), vue.createElementBlock(
|
|
37666
37713
|
"div",
|
|
37667
37714
|
_hoisted_5$3,
|
|
37715
|
+
vue.toDisplayString(vue.unref(dict).attachments.uploading),
|
|
37716
|
+
1
|
|
37717
|
+
/* TEXT */
|
|
37718
|
+
)) : sizeText.value ? (vue.openBlock(), vue.createElementBlock(
|
|
37719
|
+
"div",
|
|
37720
|
+
_hoisted_6$2,
|
|
37668
37721
|
vue.toDisplayString(sizeText.value),
|
|
37669
37722
|
1
|
|
37670
37723
|
/* TEXT */
|
|
37671
37724
|
)) : vue.createCommentVNode("v-if", true)
|
|
37672
37725
|
]),
|
|
37673
|
-
vue.createCommentVNode(" \u72B6\u6001
|
|
37674
|
-
__props.status === "loading" ? (vue.openBlock(), vue.
|
|
37675
|
-
|
|
37676
|
-
|
|
37677
|
-
|
|
37678
|
-
|
|
37679
|
-
|
|
37680
|
-
|
|
37681
|
-
|
|
37682
|
-
|
|
37726
|
+
vue.createCommentVNode(" \u72B6\u6001:loading \u65F6\u56FE\u6807\u4F4D\u6362 spinner(\u540D\u79F0\u884C\u65C1\u300C\u4E0A\u4F20\u4E2D\u2026\u300D\u6587\u6848\u8F85\u52A9) "),
|
|
37727
|
+
__props.status === "loading" ? (vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElIcon), {
|
|
37728
|
+
key: 2,
|
|
37729
|
+
class: "fv-files-card-loading"
|
|
37730
|
+
}, {
|
|
37731
|
+
default: vue.withCtx(() => [
|
|
37732
|
+
vue.createVNode(vue.unref(ElementPlusIconsVue.Loading))
|
|
37733
|
+
]),
|
|
37734
|
+
_: 1
|
|
37735
|
+
/* STABLE */
|
|
37736
|
+
})) : vue.createCommentVNode("v-if", true),
|
|
37683
37737
|
vue.createCommentVNode(" \u53F3\u4E0A\u5220\u9664\u6309\u94AE "),
|
|
37684
37738
|
vue.createElementVNode("button", {
|
|
37685
37739
|
type: "button",
|
|
@@ -37742,9 +37796,19 @@
|
|
|
37742
37796
|
function isFull() {
|
|
37743
37797
|
return props.count > 0 && innerList.value.length >= props.count;
|
|
37744
37798
|
}
|
|
37799
|
+
const IMAGE_EXTS = /* @__PURE__ */ new Set(["png", "jpg", "jpeg", "gif", "webp", "bmp", "svg", "ico", "heic", "heif", "avif", "tiff"]);
|
|
37800
|
+
function tokenIsImage(t) {
|
|
37801
|
+
const s = t.trim().toLowerCase();
|
|
37802
|
+
if (s.startsWith("image/")) return true;
|
|
37803
|
+
return s.startsWith(".") && IMAGE_EXTS.has(s.slice(1));
|
|
37804
|
+
}
|
|
37805
|
+
function acceptIsImageOnly(accept) {
|
|
37806
|
+
const tokens = accept.split(",").filter((t) => t.trim());
|
|
37807
|
+
return tokens.length > 0 && tokens.every(tokenIsImage);
|
|
37808
|
+
}
|
|
37745
37809
|
function isImageFile(file) {
|
|
37746
|
-
if (file.type
|
|
37747
|
-
return
|
|
37810
|
+
if (file.type) return file.type.startsWith("image/");
|
|
37811
|
+
return acceptIsImageOnly(props.accept);
|
|
37748
37812
|
}
|
|
37749
37813
|
function createUrl(file) {
|
|
37750
37814
|
try {
|
|
@@ -38884,32 +38948,30 @@
|
|
|
38884
38948
|
"aria-live": "polite"
|
|
38885
38949
|
};
|
|
38886
38950
|
const _hoisted_14 = { class: "fv-msg-pending-text" };
|
|
38887
|
-
const _hoisted_15 = {
|
|
38888
|
-
|
|
38889
|
-
|
|
38890
|
-
};
|
|
38891
|
-
const _hoisted_16 = ["aria-label"];
|
|
38892
|
-
const _hoisted_17 = ["disabled", "onClick"];
|
|
38893
|
-
const _hoisted_18 = {
|
|
38894
|
-
key: 7,
|
|
38951
|
+
const _hoisted_15 = { class: "fv-msg-content fv-msg-content-user" };
|
|
38952
|
+
const _hoisted_16 = {
|
|
38953
|
+
key: 6,
|
|
38895
38954
|
class: "fv-msg-actions"
|
|
38896
38955
|
};
|
|
38897
|
-
const
|
|
38956
|
+
const _hoisted_17 = {
|
|
38898
38957
|
key: 3,
|
|
38899
38958
|
class: "fv-msg-feedback"
|
|
38900
38959
|
};
|
|
38901
|
-
const
|
|
38902
|
-
const _hoisted_21 = { class: "fv-msg-feedback-pop-title" };
|
|
38903
|
-
const _hoisted_22 = { class: "fv-msg-feedback-pop-actions" };
|
|
38904
|
-
const _hoisted_23 = {
|
|
38960
|
+
const _hoisted_18 = {
|
|
38905
38961
|
key: 0,
|
|
38906
38962
|
class: "fv-msg-branch"
|
|
38907
38963
|
};
|
|
38908
|
-
const
|
|
38909
|
-
const
|
|
38964
|
+
const _hoisted_19 = { class: "fv-msg-branch-label" };
|
|
38965
|
+
const _hoisted_20 = {
|
|
38910
38966
|
key: 1,
|
|
38911
38967
|
class: "fv-msg-time"
|
|
38912
38968
|
};
|
|
38969
|
+
const _hoisted_21 = ["aria-label"];
|
|
38970
|
+
const _hoisted_22 = {
|
|
38971
|
+
key: 0,
|
|
38972
|
+
class: "fv-msg-followups-title"
|
|
38973
|
+
};
|
|
38974
|
+
const _hoisted_23 = ["disabled", "onClick"];
|
|
38913
38975
|
const LOADING_PHRASE_INTERVAL = 3e3;
|
|
38914
38976
|
var _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
|
|
38915
38977
|
...{ name: "FvAiMessage" },
|
|
@@ -38918,6 +38980,7 @@
|
|
|
38918
38980
|
message: { type: Object, required: true },
|
|
38919
38981
|
branch: { type: Object, required: false, default: void 0 },
|
|
38920
38982
|
isLast: { type: Boolean, required: false, default: false },
|
|
38983
|
+
followupStyle: { type: String, required: false, default: "list" },
|
|
38921
38984
|
showActions: { type: Boolean, required: false, default: true },
|
|
38922
38985
|
showBranchSwitch: { type: Boolean, required: false, default: true },
|
|
38923
38986
|
showUserAvatar: { type: Boolean, required: false, default: false },
|
|
@@ -39134,11 +39197,12 @@
|
|
|
39134
39197
|
if (phraseTimer !== null) clearInterval(phraseTimer);
|
|
39135
39198
|
});
|
|
39136
39199
|
const followups = vue.computed(() => {
|
|
39137
|
-
if (
|
|
39200
|
+
if (isUser.value) return [];
|
|
39138
39201
|
const s = props.message.suggestions;
|
|
39139
39202
|
return s && s.length ? s : [];
|
|
39140
39203
|
});
|
|
39141
39204
|
const followupsEnabled = vue.computed(() => props.message.status === "done");
|
|
39205
|
+
const followupTitle = vue.computed(() => dict.value.aiMessage.followupsTitle);
|
|
39142
39206
|
function onFollowup(item) {
|
|
39143
39207
|
if (!followupsEnabled.value) return;
|
|
39144
39208
|
emit("followup-select", item, props.message);
|
|
@@ -39146,29 +39210,26 @@
|
|
|
39146
39210
|
const feedbackVisible = vue.computed(
|
|
39147
39211
|
() => !isUser.value && props.message.status === "done" && !!props.feedbackHandler
|
|
39148
39212
|
);
|
|
39213
|
+
const actionsVisible = vue.computed(
|
|
39214
|
+
() => props.showActions && (isUser.value || props.message.status === "done")
|
|
39215
|
+
);
|
|
39149
39216
|
const feedbackAction = vue.computed(
|
|
39150
39217
|
() => props.message.feedback?.action ?? null
|
|
39151
39218
|
);
|
|
39219
|
+
const feedbackDialogTitle = vue.computed(
|
|
39220
|
+
() => dict.value.aiMessage.feedback.dislikeTitle.split("{name}").join(props.assistantName || dict.value.aiMessage.defaultAssistantName)
|
|
39221
|
+
);
|
|
39222
|
+
const feedbackCommentPlaceholder = vue.computed(() => dict.value.aiMessage.feedback.dislikePlaceholder);
|
|
39152
39223
|
const isToolOnlyRow = vue.computed(
|
|
39153
39224
|
() => !isUser.value && !props.message.content && hasToolSteps.value
|
|
39154
39225
|
);
|
|
39155
39226
|
const dislikePopVisible = vue.ref(false);
|
|
39156
39227
|
const dislikeComment = vue.ref("");
|
|
39157
|
-
const feedbackPending = vue.ref(false);
|
|
39158
|
-
const feedbackPopRef = vue.ref(null);
|
|
39159
|
-
function onDocMousedown(e) {
|
|
39160
|
-
if (!dislikePopVisible.value) return;
|
|
39161
|
-
const target = e.target;
|
|
39162
|
-
if (!target) return;
|
|
39163
|
-
if (feedbackPopRef.value?.contains(target)) return;
|
|
39164
|
-
if (target instanceof Element && target.closest(".fv-msg-feedback-btn")) return;
|
|
39165
|
-
dislikePopVisible.value = false;
|
|
39166
|
-
}
|
|
39167
39228
|
vue.watch(dislikePopVisible, (on) => {
|
|
39168
|
-
if (on)
|
|
39169
|
-
else document.removeEventListener("mousedown", onDocMousedown, true);
|
|
39229
|
+
if (on) vue.nextTick(() => commentTextareaRef.value?.focus());
|
|
39170
39230
|
});
|
|
39171
|
-
|
|
39231
|
+
const feedbackPending = vue.ref(false);
|
|
39232
|
+
const commentTextareaRef = vue.ref(null);
|
|
39172
39233
|
async function submitFeedback(next, comment) {
|
|
39173
39234
|
const handler = props.feedbackHandler;
|
|
39174
39235
|
if (!handler || feedbackPending.value) return;
|
|
@@ -39226,7 +39287,7 @@
|
|
|
39226
39287
|
const previewList = vue.computed(() => (props.message.files ?? []).filter((f) => f.type === "image"));
|
|
39227
39288
|
const previewVisible = vue.ref(false);
|
|
39228
39289
|
const previewIndex = vue.ref(0);
|
|
39229
|
-
function onFileClick(f,
|
|
39290
|
+
function onFileClick(f, _index) {
|
|
39230
39291
|
emit("file-click", f, props.message);
|
|
39231
39292
|
if (f.type === "image" && displayUrl(f)) {
|
|
39232
39293
|
previewIndex.value = Math.max(0, previewList.value.findIndex((x) => x.id === f.id));
|
|
@@ -39314,7 +39375,7 @@
|
|
|
39314
39375
|
/* TEXT */
|
|
39315
39376
|
)) : vue.createCommentVNode("v-if", true)
|
|
39316
39377
|
])) : vue.createCommentVNode("v-if", true),
|
|
39317
|
-
vue.createCommentVNode(" \u9644\u4EF6:user \u6D88\u606F files \u5E73\u94FA;\u56FE\u7247\u7F29\u7565\u53EF\u70B9(\u5185\u7F6E\u653E\u5927\u9884\u89C8),\u6587\u6863\u540D\
|
|
39378
|
+
vue.createCommentVNode(" \u9644\u4EF6:user \u6D88\u606F files \u5E73\u94FA;\u56FE\u7247\u7F29\u7565\u53EF\u70B9(\u5185\u7F6E\u653E\u5927\u9884\u89C8),\u6587\u6863\u590D\u7528\r\n sender \u7684 FilesCard \u5361\u7247(\u7C7B\u578B\u56FE\u6807 + \u540D\u79F0/\u5927\u5C0F,\u70B9\u51FB\u5BBF\u4E3B\u4E0B\u8F7D) "),
|
|
39318
39379
|
__props.message.files?.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_7, [
|
|
39319
39380
|
vue.renderSlot(_ctx.$slots, "message-files", {
|
|
39320
39381
|
message: __props.message,
|
|
@@ -39324,26 +39385,43 @@
|
|
|
39324
39385
|
vue.Fragment,
|
|
39325
39386
|
null,
|
|
39326
39387
|
vue.renderList(__props.message.files, (f, i) => {
|
|
39327
|
-
return vue.openBlock(), vue.createElementBlock(
|
|
39328
|
-
|
|
39329
|
-
|
|
39330
|
-
|
|
39331
|
-
|
|
39332
|
-
|
|
39333
|
-
|
|
39334
|
-
|
|
39335
|
-
|
|
39336
|
-
|
|
39337
|
-
|
|
39338
|
-
|
|
39339
|
-
|
|
39340
|
-
|
|
39341
|
-
|
|
39342
|
-
|
|
39343
|
-
|
|
39344
|
-
|
|
39345
|
-
|
|
39346
|
-
|
|
39388
|
+
return vue.openBlock(), vue.createElementBlock(
|
|
39389
|
+
vue.Fragment,
|
|
39390
|
+
{
|
|
39391
|
+
key: f.id
|
|
39392
|
+
},
|
|
39393
|
+
[
|
|
39394
|
+
f.type === "image" ? (vue.openBlock(), vue.createElementBlock("button", {
|
|
39395
|
+
key: 0,
|
|
39396
|
+
type: "button",
|
|
39397
|
+
class: "fv-msg-file is-image",
|
|
39398
|
+
title: f.name,
|
|
39399
|
+
onClick: ($event) => onFileClick(f)
|
|
39400
|
+
}, [
|
|
39401
|
+
displayUrl(f) ? (vue.openBlock(), vue.createElementBlock("img", {
|
|
39402
|
+
key: 0,
|
|
39403
|
+
class: "fv-msg-file-img",
|
|
39404
|
+
src: displayUrl(f),
|
|
39405
|
+
alt: f.name
|
|
39406
|
+
}, null, 8, _hoisted_9)) : (vue.openBlock(), vue.createElementBlock(
|
|
39407
|
+
"span",
|
|
39408
|
+
_hoisted_10,
|
|
39409
|
+
vue.toDisplayString(f.name),
|
|
39410
|
+
1
|
|
39411
|
+
/* TEXT */
|
|
39412
|
+
))
|
|
39413
|
+
], 8, _hoisted_8)) : (vue.openBlock(), vue.createBlock(_sfc_main$6, {
|
|
39414
|
+
key: 1,
|
|
39415
|
+
class: "fv-msg-file-card",
|
|
39416
|
+
name: f.name,
|
|
39417
|
+
size: f.size,
|
|
39418
|
+
"file-type": "file",
|
|
39419
|
+
onClick: ($event) => onFileClick(f)
|
|
39420
|
+
}, null, 8, ["name", "size", "onClick"]))
|
|
39421
|
+
],
|
|
39422
|
+
64
|
|
39423
|
+
/* STABLE_FRAGMENT */
|
|
39424
|
+
);
|
|
39347
39425
|
}),
|
|
39348
39426
|
128
|
|
39349
39427
|
/* KEYED_FRAGMENT */
|
|
@@ -39409,7 +39487,7 @@
|
|
|
39409
39487
|
key: "0"
|
|
39410
39488
|
} : void 0
|
|
39411
39489
|
]), 1032, ["modelValue", "status", "hide-header", "class"])) : vue.createCommentVNode("v-if", true),
|
|
39412
|
-
vue.createCommentVNode(" \u6B63\u6587:user \u7EAF\u6587\u672C\u6C14\u6CE1;assistant Markdown;pending \u7A7A\u5185\u5BB9\u7ED9\u52A0\u8F7D\u5360\u4F4D "),
|
|
39490
|
+
vue.createCommentVNode(" \u6B63\u6587:user \u7EAF\u6587\u672C\u6C14\u6CE1(\u4EC5\u6709\u9644\u4EF6\u65E0\u6587\u5B57\u65F6\u4E0D\u6E32\u67D3\u7A7A\u6C14\u6CE1);assistant Markdown;pending \u7A7A\u5185\u5BB9\u7ED9\u52A0\u8F7D\u5360\u4F4D "),
|
|
39413
39491
|
!isUser.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_11, [
|
|
39414
39492
|
__props.message.status === "error" ? (vue.openBlock(), vue.createElementBlock(
|
|
39415
39493
|
"span",
|
|
@@ -39437,7 +39515,7 @@
|
|
|
39437
39515
|
[
|
|
39438
39516
|
vue.createCommentVNode(" \u751F\u6210\u4E2D\u5360\u4F4D:\u4E3B\u9898\u8272\u5708\u5708 spinner + \u8F6E\u6362\u6587\u6848(loadingPhrases,3s \u8F6E\u6362);\r\n \u6709\u5DE5\u5177\u8F68\u8FF9\u65F6\u4E0D\u91CD\u590D\u5360\u4F4D(Thinking \u5934\u5DF2\u662F\u300C\u601D\u8003\u4E2D...\u300D) "),
|
|
39439
39517
|
vue.createElementVNode("span", _hoisted_13, [
|
|
39440
|
-
_cache[
|
|
39518
|
+
_cache[11] || (_cache[11] = vue.createElementVNode(
|
|
39441
39519
|
"span",
|
|
39442
39520
|
{
|
|
39443
39521
|
class: "fv-msg-spinner",
|
|
@@ -39459,42 +39537,26 @@
|
|
|
39459
39537
|
2112
|
|
39460
39538
|
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
|
39461
39539
|
)) : vue.createCommentVNode("v-if", true)
|
|
39462
|
-
])) : (vue.openBlock(), vue.createElementBlock(
|
|
39463
|
-
|
|
39464
|
-
|
|
39465
|
-
|
|
39466
|
-
|
|
39467
|
-
|
|
39468
|
-
|
|
39469
|
-
|
|
39470
|
-
|
|
39471
|
-
|
|
39472
|
-
|
|
39473
|
-
|
|
39474
|
-
|
|
39475
|
-
|
|
39476
|
-
|
|
39477
|
-
|
|
39478
|
-
|
|
39479
|
-
|
|
39480
|
-
return vue.openBlock(), vue.createElementBlock("button", {
|
|
39481
|
-
key: `${i}-${item}`,
|
|
39482
|
-
type: "button",
|
|
39483
|
-
class: vue.normalizeClass(["fv-msg-followup", { "is-disabled": !followupsEnabled.value }]),
|
|
39484
|
-
disabled: !followupsEnabled.value,
|
|
39485
|
-
role: "option",
|
|
39486
|
-
"aria-selected": false,
|
|
39487
|
-
onClick: ($event) => onFollowup(item)
|
|
39488
|
-
}, vue.toDisplayString(item), 11, _hoisted_17);
|
|
39489
|
-
}),
|
|
39490
|
-
128
|
|
39491
|
-
/* KEYED_FRAGMENT */
|
|
39492
|
-
))
|
|
39493
|
-
], 8, _hoisted_16)) : vue.createCommentVNode("v-if", true),
|
|
39494
|
-
vue.createCommentVNode(" \u64CD\u4F5C\u533A:assistant \u590D\u5236/\u91CD\u751F\u6210 + \u6D88\u606F\u8BC4\u4EF7 + \u5206\u652F\u5207\u6362;user \u4EC5\u590D\u5236(hover \u6D88\u606F\u65F6\u6D6E\u73B0,\u89C1 scss)\u3002\r\n feedbackVisible \u72EC\u7ACB\u4E8E showActions:\u5173\u95ED\u64CD\u4F5C\u6309\u94AE\u4E0D\u541E\u8BC4\u4EF7\u5165\u53E3 "),
|
|
39495
|
-
feedbackVisible.value || __props.showActions || __props.showBranchSwitch && __props.branch && __props.branch.count > 1 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_18, [
|
|
39540
|
+
])) : __props.message.content ? (vue.openBlock(), vue.createElementBlock(
|
|
39541
|
+
vue.Fragment,
|
|
39542
|
+
{ key: 5 },
|
|
39543
|
+
[
|
|
39544
|
+
vue.createCommentVNode(" user \u6B63\u6587:\u53EA\u4F20\u9644\u4EF6\u65E0\u6587\u5B57\u65F6\u4E0D\u6E32\u67D3\u8BE5 div(\u7A7A\u5185\u5BB9\u6C14\u6CE1\u65E0\u4FE1\u606F\u91CF) "),
|
|
39545
|
+
vue.createElementVNode(
|
|
39546
|
+
"div",
|
|
39547
|
+
_hoisted_15,
|
|
39548
|
+
vue.toDisplayString(__props.message.content),
|
|
39549
|
+
1
|
|
39550
|
+
/* TEXT */
|
|
39551
|
+
)
|
|
39552
|
+
],
|
|
39553
|
+
2112
|
|
39554
|
+
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
|
39555
|
+
)) : vue.createCommentVNode("v-if", true),
|
|
39556
|
+
vue.createCommentVNode(" \u64CD\u4F5C\u533A:assistant \u590D\u5236/\u91CD\u751F\u6210 + \u6D88\u606F\u8BC4\u4EF7 + \u5206\u652F\u5207\u6362;user \u4EC5\u590D\u5236(hover \u6D88\u606F\u65F6\u6D6E\u73B0,\u89C1 scss)\u3002\r\n \u590D\u5236/\u91CD\u751F\u6210\u6309\u94AE\u5F85\u56DE\u7B54\u843D\u5B9A(status=done)\u624D\u6E32\u67D3\u2014\u2014\u751F\u6210\u4E2D(pending/streaming)\u4E0D\u51FA\u5DE5\u5177\u6309\u94AE;\r\n error \u65E0\u53EF\u590D\u5236/\u91CD\u751F\u6210\u6B63\u6587\u4E5F\u4E0D\u51FA;\u5206\u652F\u5207\u6362\u5668\u4E0E\u65F6\u95F4\u4E0D\u53D7\u6B64\u95E8\u63A7,\u751F\u6210\u4E2D\u4ECD\u53EF\u5207\u5206\u652F/\u663E\u65F6\u95F4\u3002\r\n feedbackVisible \u72EC\u7ACB\u4E8E showActions:\u5173\u95ED\u64CD\u4F5C\u6309\u94AE\u4E0D\u541E\u8BC4\u4EF7\u5165\u53E3\u3002\r\n \u5BB9\u5668\u663E\u9690 = \u4EFB\u4E00\u5185\u4EF6\u5728\u573A(\u64CD\u4F5C\u6309\u94AE/\u8BC4\u4EF7/\u5206\u652F/\u65F6\u95F4),\u5168\u90E8\u7F3A\u5E2D\u624D\u4E0D\u6E32\u67D3,\u907F\u514D\u7A7A\u64CD\u4F5C\u533A\u5360\u4F4D "),
|
|
39557
|
+
actionsVisible.value || feedbackVisible.value && !isToolOnlyRow.value || __props.showBranchSwitch && __props.branch && __props.branch.count > 1 || messageTimeText.value && timeVisible.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_16, [
|
|
39496
39558
|
vue.renderSlot(_ctx.$slots, "message-actions", { message: __props.message }, () => [
|
|
39497
|
-
|
|
39559
|
+
actionsVisible.value && isUser.value ? (vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElTooltip), {
|
|
39498
39560
|
key: 0,
|
|
39499
39561
|
content: vue.unref(dict).aiMessage.copy,
|
|
39500
39562
|
placement: "top"
|
|
@@ -39523,7 +39585,7 @@
|
|
|
39523
39585
|
_: 1
|
|
39524
39586
|
/* STABLE */
|
|
39525
39587
|
}, 8, ["content"])) : vue.createCommentVNode("v-if", true),
|
|
39526
|
-
|
|
39588
|
+
actionsVisible.value && !isUser.value ? (vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElTooltip), {
|
|
39527
39589
|
key: 1,
|
|
39528
39590
|
content: vue.unref(dict).aiMessage.copy,
|
|
39529
39591
|
placement: "top"
|
|
@@ -39552,7 +39614,7 @@
|
|
|
39552
39614
|
_: 1
|
|
39553
39615
|
/* STABLE */
|
|
39554
39616
|
}, 8, ["content"])) : vue.createCommentVNode("v-if", true),
|
|
39555
|
-
|
|
39617
|
+
actionsVisible.value && !isUser.value ? (vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElTooltip), {
|
|
39556
39618
|
key: 2,
|
|
39557
39619
|
content: vue.unref(dict).aiMessage.regenerate,
|
|
39558
39620
|
placement: "top"
|
|
@@ -39581,8 +39643,8 @@
|
|
|
39581
39643
|
_: 1
|
|
39582
39644
|
/* STABLE */
|
|
39583
39645
|
}, 8, ["content"])) : vue.createCommentVNode("v-if", true),
|
|
39584
|
-
vue.createCommentVNode(" \u6D88\u606F\u8BC4\u4EF7 \u{1F44D}/\u{1F44E}(assistant \u6700\u7EC8\u56DE\u7B54\u884C;\u518D\u6B21\u70B9\u51FB\u5F53\u524D\u6001\u53D6\u6D88):\r\n \u70B9\u8E29\u5E26\u9644\u8A00\u5F39\
|
|
39585
|
-
feedbackVisible.value && !isToolOnlyRow.value ? (vue.openBlock(), vue.createElementBlock("span",
|
|
39646
|
+
vue.createCommentVNode(" \u6D88\u606F\u8BC4\u4EF7 \u{1F44D}/\u{1F44E}(assistant \u6700\u7EC8\u56DE\u7B54\u884C;\u518D\u6B21\u70B9\u51FB\u5F53\u524D\u6001\u53D6\u6D88):\r\n \u70B9\u8E29\u5E26\u9644\u8A00\u5F39\u7A97(\u5C45\u4E2D ElDialog,textarea \u2264500 \u53EF\u8DF3\u8FC7),\u4E50\u89C2\u66F4\u65B0\u5931\u8D25\u56DE\u6EDA "),
|
|
39647
|
+
feedbackVisible.value && !isToolOnlyRow.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_17, [
|
|
39586
39648
|
vue.createVNode(vue.unref(elementPlus.ElTooltip), {
|
|
39587
39649
|
content: vue.unref(dict).aiMessage.feedback.like,
|
|
39588
39650
|
placement: "top"
|
|
@@ -39648,77 +39710,18 @@
|
|
|
39648
39710
|
]),
|
|
39649
39711
|
_: 1
|
|
39650
39712
|
/* STABLE */
|
|
39651
|
-
}, 8, ["content"])
|
|
39652
|
-
vue.createCommentVNode(" \u70B9\u8E29\u9644\u8A00\u5F39\u5C42:\u70B9\u51FB \u{1F44E} \u5C55\u5F00\u5728\u6309\u94AE\u4E0B\u65B9(\u975E teleported,\u968F\u64CD\u4F5C\u533A\u5B9A\u4F4D);\r\n \u70B9\u5916\u6536\u5C42(\u8349\u7A3F\u4FDD\u7559);textarea \u2264500 \u9009\u586B,\u63D0\u4EA4\u5E26\u539F\u56E0/\u8DF3\u8FC7\u4E0D\u5E26 "),
|
|
39653
|
-
dislikePopVisible.value ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
39654
|
-
key: 0,
|
|
39655
|
-
ref_key: "feedbackPopRef",
|
|
39656
|
-
ref: feedbackPopRef,
|
|
39657
|
-
class: "fv-msg-feedback-pop",
|
|
39658
|
-
role: "dialog",
|
|
39659
|
-
"aria-label": vue.unref(dict).aiMessage.feedback.dislikeTitle
|
|
39660
|
-
}, [
|
|
39661
|
-
vue.createElementVNode(
|
|
39662
|
-
"div",
|
|
39663
|
-
_hoisted_21,
|
|
39664
|
-
vue.toDisplayString(vue.unref(dict).aiMessage.feedback.dislikeTitle),
|
|
39665
|
-
1
|
|
39666
|
-
/* TEXT */
|
|
39667
|
-
),
|
|
39668
|
-
vue.createVNode(vue.unref(elementPlus.ElInput), {
|
|
39669
|
-
modelValue: dislikeComment.value,
|
|
39670
|
-
"onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => dislikeComment.value = $event),
|
|
39671
|
-
type: "textarea",
|
|
39672
|
-
rows: 3,
|
|
39673
|
-
maxlength: "500",
|
|
39674
|
-
"show-word-limit": "",
|
|
39675
|
-
placeholder: vue.unref(dict).aiMessage.feedback.dislikePlaceholder
|
|
39676
|
-
}, null, 8, ["modelValue", "placeholder"]),
|
|
39677
|
-
vue.createElementVNode("div", _hoisted_22, [
|
|
39678
|
-
vue.createVNode(vue.unref(elementPlus.ElButton), {
|
|
39679
|
-
size: "small",
|
|
39680
|
-
text: "",
|
|
39681
|
-
onClick: onDislikeSkip
|
|
39682
|
-
}, {
|
|
39683
|
-
default: vue.withCtx(() => [
|
|
39684
|
-
vue.createTextVNode(
|
|
39685
|
-
vue.toDisplayString(vue.unref(dict).aiMessage.feedback.skip),
|
|
39686
|
-
1
|
|
39687
|
-
/* TEXT */
|
|
39688
|
-
)
|
|
39689
|
-
]),
|
|
39690
|
-
_: 1
|
|
39691
|
-
/* STABLE */
|
|
39692
|
-
}),
|
|
39693
|
-
vue.createVNode(vue.unref(elementPlus.ElButton), {
|
|
39694
|
-
size: "small",
|
|
39695
|
-
type: "primary",
|
|
39696
|
-
loading: feedbackPending.value,
|
|
39697
|
-
onClick: onDislikeSubmit
|
|
39698
|
-
}, {
|
|
39699
|
-
default: vue.withCtx(() => [
|
|
39700
|
-
vue.createTextVNode(
|
|
39701
|
-
vue.toDisplayString(vue.unref(dict).aiMessage.feedback.submit),
|
|
39702
|
-
1
|
|
39703
|
-
/* TEXT */
|
|
39704
|
-
)
|
|
39705
|
-
]),
|
|
39706
|
-
_: 1
|
|
39707
|
-
/* STABLE */
|
|
39708
|
-
}, 8, ["loading"])
|
|
39709
|
-
])
|
|
39710
|
-
], 8, _hoisted_20)) : vue.createCommentVNode("v-if", true)
|
|
39713
|
+
}, 8, ["content"])
|
|
39711
39714
|
])) : vue.createCommentVNode("v-if", true)
|
|
39712
39715
|
]),
|
|
39713
39716
|
vue.createCommentVNode(" \u5206\u652F\u5207\u6362:\u5144\u5F1F\u5206\u652F > 1 \u65F6 "),
|
|
39714
|
-
__props.showBranchSwitch && __props.branch && __props.branch.count > 1 ? (vue.openBlock(), vue.createElementBlock("span",
|
|
39717
|
+
__props.showBranchSwitch && __props.branch && __props.branch.count > 1 ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_18, [
|
|
39715
39718
|
vue.createVNode(vue.unref(elementPlus.ElButton), {
|
|
39716
39719
|
text: "",
|
|
39717
39720
|
size: "small",
|
|
39718
39721
|
class: "fv-msg-action",
|
|
39719
39722
|
disabled: __props.branch.index <= 1,
|
|
39720
39723
|
"aria-label": vue.unref(dict).aiMessage.prevBranch,
|
|
39721
|
-
onClick: _cache[
|
|
39724
|
+
onClick: _cache[7] || (_cache[7] = ($event) => onBranch("prev"))
|
|
39722
39725
|
}, {
|
|
39723
39726
|
default: vue.withCtx(() => [
|
|
39724
39727
|
vue.createVNode(vue.unref(elementPlus.ElIcon), null, {
|
|
@@ -39734,7 +39737,7 @@
|
|
|
39734
39737
|
}, 8, ["disabled", "aria-label"]),
|
|
39735
39738
|
vue.createElementVNode(
|
|
39736
39739
|
"span",
|
|
39737
|
-
|
|
39740
|
+
_hoisted_19,
|
|
39738
39741
|
vue.toDisplayString(__props.branch.index) + " / " + vue.toDisplayString(__props.branch.count),
|
|
39739
39742
|
1
|
|
39740
39743
|
/* TEXT */
|
|
@@ -39745,7 +39748,7 @@
|
|
|
39745
39748
|
class: "fv-msg-action",
|
|
39746
39749
|
disabled: __props.branch.index >= __props.branch.count,
|
|
39747
39750
|
"aria-label": vue.unref(dict).aiMessage.nextBranch,
|
|
39748
|
-
onClick: _cache[
|
|
39751
|
+
onClick: _cache[8] || (_cache[8] = ($event) => onBranch("next"))
|
|
39749
39752
|
}, {
|
|
39750
39753
|
default: vue.withCtx(() => [
|
|
39751
39754
|
vue.createVNode(vue.unref(elementPlus.ElIcon), null, {
|
|
@@ -39763,13 +39766,102 @@
|
|
|
39763
39766
|
vue.createCommentVNode(" \u6D88\u606F\u65F6\u95F4:\u8DDF\u5728\u64CD\u4F5C\u6309\u94AE\u4E0E\u5206\u652F\u5207\u6362\u4E4B\u540E;user \u6D88\u606F hover \u9690\u85CF\u6309\u94AE\u4E0D\u5F71\u54CD\u65F6\u95F4\u5E38\u9A7B;\r\n assistant \u751F\u6210\u4E2D\u4E0D\u663E,\u6B63\u6587\u6253\u5B8C\u5B57(\u6216 error)\u540E\u624D\u6D6E\u73B0 "),
|
|
39764
39767
|
messageTimeText.value && timeVisible.value ? (vue.openBlock(), vue.createElementBlock(
|
|
39765
39768
|
"span",
|
|
39766
|
-
|
|
39769
|
+
_hoisted_20,
|
|
39767
39770
|
vue.toDisplayString(messageTimeText.value),
|
|
39768
39771
|
1
|
|
39769
39772
|
/* TEXT */
|
|
39770
39773
|
)) : vue.createCommentVNode("v-if", true)
|
|
39771
|
-
])) : vue.createCommentVNode("v-if", true)
|
|
39772
|
-
|
|
39774
|
+
])) : vue.createCommentVNode("v-if", true),
|
|
39775
|
+
vue.createCommentVNode(" \u8FFD\u95EE\u5EFA\u8BAE:\u64CD\u4F5C\u533A(\u5DE5\u5177\u680F)\u4E0B\u65B9,\u5206\u9694\u7EBF + \u7070\u8272\u300C\u8FFD\u95EE\u300D\u6807\u9898\u5F15\u51FA;\u7EB5\u5411\u5217\u8868\u4E00\u884C\u4E00\u6761\r\n (followupStyle='chips' \u5207\u56DE\u65E7\u6A2A\u5411\u6C14\u6CE1\u5F62\u6001,\u65E0\u6807\u9898)\u3002\u5386\u53F2\u6D88\u606F\u540C\u6837\u6E32\u67D3;\r\n \u6D41\u5F0F(message_end \u524D)\u7981\u7528\u9632\u8BEF\u70B9,\u843D\u5B9A\u540E\u53EF\u70B9\u51FB,\u70B9\u51FB\u7ECF followup-select \u4E0A\u629B "),
|
|
39776
|
+
followups.value.length ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
39777
|
+
key: 7,
|
|
39778
|
+
class: vue.normalizeClass(["fv-msg-followups", `is-${__props.followupStyle}`]),
|
|
39779
|
+
role: "listbox",
|
|
39780
|
+
"aria-label": vue.unref(dict).aiMessage.followups
|
|
39781
|
+
}, [
|
|
39782
|
+
__props.followupStyle === "list" ? (vue.openBlock(), vue.createElementBlock(
|
|
39783
|
+
"span",
|
|
39784
|
+
_hoisted_22,
|
|
39785
|
+
vue.toDisplayString(followupTitle.value),
|
|
39786
|
+
1
|
|
39787
|
+
/* TEXT */
|
|
39788
|
+
)) : vue.createCommentVNode("v-if", true),
|
|
39789
|
+
(vue.openBlock(true), vue.createElementBlock(
|
|
39790
|
+
vue.Fragment,
|
|
39791
|
+
null,
|
|
39792
|
+
vue.renderList(followups.value, (item, i) => {
|
|
39793
|
+
return vue.openBlock(), vue.createElementBlock("button", {
|
|
39794
|
+
key: `${i}-${item}`,
|
|
39795
|
+
type: "button",
|
|
39796
|
+
class: vue.normalizeClass(["fv-msg-followup", { "is-disabled": !followupsEnabled.value }]),
|
|
39797
|
+
disabled: !followupsEnabled.value,
|
|
39798
|
+
role: "option",
|
|
39799
|
+
"aria-selected": false,
|
|
39800
|
+
onClick: ($event) => onFollowup(item)
|
|
39801
|
+
}, vue.toDisplayString(item), 11, _hoisted_23);
|
|
39802
|
+
}),
|
|
39803
|
+
128
|
|
39804
|
+
/* KEYED_FRAGMENT */
|
|
39805
|
+
))
|
|
39806
|
+
], 10, _hoisted_21)) : vue.createCommentVNode("v-if", true)
|
|
39807
|
+
]),
|
|
39808
|
+
vue.createCommentVNode(" \u70B9\u8E29\u9644\u8A00\u5F39\u7A97:\u5C45\u4E2D\u5F39\u7A97(ElDialog,teleported + align-center),\u4E0D\u518D\u968F\u64CD\u4F5C\u533A\u5B9A\u4F4D\u2014\u2014\r\n \u6700\u5E95\u4E00\u6761\u6D88\u606F\u7684\u9644\u8A00\u5C42\u5F80\u4E0B\u5F39\u4F1A\u88AB\u6EDA\u52A8\u533A\u88C1\u526A,\u4E0D\u6613\u6EDA\u5230\u5E95\u770B\u5230;\u5F39\u7A97\u5C45\u4E2D\u4E00\u5C4F\u5185\u53EF\u89C1\u3002\r\n \u70B9\u906E\u7F69/ESC \u5173\u95ED(\u8349\u7A3F\u4FDD\u7559\u5728\u672C\u5730,\u518D\u70B9 \u{1F44E} \u590D\u586B);submit/skip \u8BED\u4E49\u540C\u64CD\u4F5C\u533A\u6309\u94AE "),
|
|
39809
|
+
feedbackVisible.value && !isToolOnlyRow.value ? (vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElDialog), {
|
|
39810
|
+
key: 1,
|
|
39811
|
+
modelValue: dislikePopVisible.value,
|
|
39812
|
+
"onUpdate:modelValue": _cache[10] || (_cache[10] = ($event) => dislikePopVisible.value = $event),
|
|
39813
|
+
class: "fv-msg-feedback-dialog",
|
|
39814
|
+
title: feedbackDialogTitle.value,
|
|
39815
|
+
width: "480px",
|
|
39816
|
+
"align-center": ""
|
|
39817
|
+
}, {
|
|
39818
|
+
footer: vue.withCtx(() => [
|
|
39819
|
+
vue.createVNode(vue.unref(elementPlus.ElButton), {
|
|
39820
|
+
text: "",
|
|
39821
|
+
onClick: onDislikeSkip
|
|
39822
|
+
}, {
|
|
39823
|
+
default: vue.withCtx(() => [
|
|
39824
|
+
vue.createTextVNode(
|
|
39825
|
+
vue.toDisplayString(vue.unref(dict).aiMessage.feedback.skip),
|
|
39826
|
+
1
|
|
39827
|
+
/* TEXT */
|
|
39828
|
+
)
|
|
39829
|
+
]),
|
|
39830
|
+
_: 1
|
|
39831
|
+
/* STABLE */
|
|
39832
|
+
}),
|
|
39833
|
+
vue.createVNode(vue.unref(elementPlus.ElButton), {
|
|
39834
|
+
type: "primary",
|
|
39835
|
+
loading: feedbackPending.value,
|
|
39836
|
+
onClick: onDislikeSubmit
|
|
39837
|
+
}, {
|
|
39838
|
+
default: vue.withCtx(() => [
|
|
39839
|
+
vue.createTextVNode(
|
|
39840
|
+
vue.toDisplayString(vue.unref(dict).aiMessage.feedback.submit),
|
|
39841
|
+
1
|
|
39842
|
+
/* TEXT */
|
|
39843
|
+
)
|
|
39844
|
+
]),
|
|
39845
|
+
_: 1
|
|
39846
|
+
/* STABLE */
|
|
39847
|
+
}, 8, ["loading"])
|
|
39848
|
+
]),
|
|
39849
|
+
default: vue.withCtx(() => [
|
|
39850
|
+
vue.createVNode(vue.unref(elementPlus.ElInput), {
|
|
39851
|
+
ref_key: "commentTextareaRef",
|
|
39852
|
+
ref: commentTextareaRef,
|
|
39853
|
+
modelValue: dislikeComment.value,
|
|
39854
|
+
"onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => dislikeComment.value = $event),
|
|
39855
|
+
type: "textarea",
|
|
39856
|
+
rows: 4,
|
|
39857
|
+
maxlength: "500",
|
|
39858
|
+
"show-word-limit": "",
|
|
39859
|
+
placeholder: feedbackCommentPlaceholder.value
|
|
39860
|
+
}, null, 8, ["modelValue", "placeholder"])
|
|
39861
|
+
]),
|
|
39862
|
+
_: 1
|
|
39863
|
+
/* STABLE */
|
|
39864
|
+
}, 8, ["modelValue", "title"])) : vue.createCommentVNode("v-if", true)
|
|
39773
39865
|
], 10, _hoisted_1$3);
|
|
39774
39866
|
};
|
|
39775
39867
|
}
|
|
@@ -39815,6 +39907,7 @@
|
|
|
39815
39907
|
codeTriggerLangs: { type: Array, required: false },
|
|
39816
39908
|
showTime: { type: Boolean, required: false, default: true },
|
|
39817
39909
|
timeFormat: { type: Function, required: false, default: void 0 },
|
|
39910
|
+
followupStyle: { type: String, required: false, default: "list" },
|
|
39818
39911
|
resolveFileUrl: { type: Function, required: false, default: void 0 },
|
|
39819
39912
|
feedbackHandler: { type: Function, required: false, default: void 0 },
|
|
39820
39913
|
locale: { type: null, required: false }
|
|
@@ -40077,6 +40170,7 @@
|
|
|
40077
40170
|
"show-duration": __props.showDuration,
|
|
40078
40171
|
"show-time": __props.showTime,
|
|
40079
40172
|
"time-format": __props.timeFormat,
|
|
40173
|
+
"followup-style": __props.followupStyle,
|
|
40080
40174
|
"code-trigger-langs": __props.codeTriggerLangs,
|
|
40081
40175
|
"resolve-file-url": __props.resolveFileUrl,
|
|
40082
40176
|
"feedback-handler": __props.feedbackHandler,
|
|
@@ -40134,7 +40228,7 @@
|
|
|
40134
40228
|
]),
|
|
40135
40229
|
key: "5"
|
|
40136
40230
|
} : void 0
|
|
40137
|
-
]), 1032, ["message", "branch", "is-last", "show-actions", "show-branch-switch", "show-user-avatar", "show-user-name", "show-assistant-avatar", "show-assistant-name", "user-avatar", "assistant-avatar", "assistant-avatar-scale", "avatar-circle", "user-name", "assistant-name", "typing", "auto-collapse", "collapsible", "show-duration", "show-time", "time-format", "code-trigger-langs", "resolve-file-url", "feedback-handler"]);
|
|
40231
|
+
]), 1032, ["message", "branch", "is-last", "show-actions", "show-branch-switch", "show-user-avatar", "show-user-name", "show-assistant-avatar", "show-assistant-name", "user-avatar", "assistant-avatar", "assistant-avatar-scale", "avatar-circle", "user-name", "assistant-name", "typing", "auto-collapse", "collapsible", "show-duration", "show-time", "time-format", "followup-style", "code-trigger-langs", "resolve-file-url", "feedback-handler"]);
|
|
40138
40232
|
}),
|
|
40139
40233
|
128
|
|
40140
40234
|
/* KEYED_FRAGMENT */
|
|
@@ -40500,6 +40594,7 @@
|
|
|
40500
40594
|
senderShadow: { type: Boolean, required: false, default: true },
|
|
40501
40595
|
suggestions: { type: Array, required: false, default: () => [] },
|
|
40502
40596
|
suggestionsWrap: { type: Boolean, required: false, default: true },
|
|
40597
|
+
followupStyle: { type: String, required: false, default: "list" },
|
|
40503
40598
|
features: { type: Object, required: false, default: () => ({}) },
|
|
40504
40599
|
allowAttachments: { type: Boolean, required: false, default: false },
|
|
40505
40600
|
accept: { type: String, required: false, default: "" },
|
|
@@ -40510,7 +40605,7 @@
|
|
|
40510
40605
|
theme: { type: String, required: false, default: "light" },
|
|
40511
40606
|
locale: { type: null, required: false }
|
|
40512
40607
|
},
|
|
40513
|
-
emits: ["update:messages", "send", "suggestion-select", "followup-select", "message-complete", "error", "branch-change", "attachment-exceed", "attachment-uploaded", "message-file-click", "feedback-change", "feedback-error", "scroll", "tool-event"],
|
|
40608
|
+
emits: ["update:messages", "send", "suggestion-select", "followup-select", "message-complete", "error", "branch-change", "attachment-exceed", "attachment-reject", "attachment-uploaded", "message-file-click", "feedback-change", "feedback-error", "scroll", "tool-event"],
|
|
40514
40609
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
40515
40610
|
const props = __props;
|
|
40516
40611
|
const dict = useLocaleDict(() => props.locale);
|
|
@@ -40613,6 +40708,36 @@
|
|
|
40613
40708
|
function onAttachmentExceed(file) {
|
|
40614
40709
|
emit("attachment-exceed", file);
|
|
40615
40710
|
}
|
|
40711
|
+
const acceptExts = vue.computed(() => {
|
|
40712
|
+
const exts = /* @__PURE__ */ new Set();
|
|
40713
|
+
for (const token of props.accept.split(",")) {
|
|
40714
|
+
const t = token.trim().toLowerCase();
|
|
40715
|
+
if (t.startsWith(".") && t.length > 1) exts.add(t.slice(1));
|
|
40716
|
+
}
|
|
40717
|
+
return exts;
|
|
40718
|
+
});
|
|
40719
|
+
const acceptMimePrefixes = vue.computed(() => {
|
|
40720
|
+
const prefixes = [];
|
|
40721
|
+
for (const token of props.accept.split(",")) {
|
|
40722
|
+
const t = token.trim().toLowerCase();
|
|
40723
|
+
if (t.endsWith("/*")) prefixes.push(t.slice(0, -1));
|
|
40724
|
+
}
|
|
40725
|
+
return prefixes;
|
|
40726
|
+
});
|
|
40727
|
+
const attachmentBeforeUpload = vue.computed(() => {
|
|
40728
|
+
if (!acceptExts.value.size && !acceptMimePrefixes.value.length) return void 0;
|
|
40729
|
+
const exts = acceptExts.value;
|
|
40730
|
+
const prefixes = acceptMimePrefixes.value;
|
|
40731
|
+
return (file) => {
|
|
40732
|
+
const name = file.name.toLowerCase();
|
|
40733
|
+
const ext = name.includes(".") ? name.split(".").pop() : "";
|
|
40734
|
+
if (ext && exts.has(ext)) return true;
|
|
40735
|
+
if (file.type && prefixes.some((p) => file.type.toLowerCase().startsWith(p))) return true;
|
|
40736
|
+
elementPlus.ElMessage.warning(dict.value.errors.attachmentRejected.replace("{name}", file.name));
|
|
40737
|
+
emit("attachment-reject", file);
|
|
40738
|
+
return false;
|
|
40739
|
+
};
|
|
40740
|
+
});
|
|
40616
40741
|
function onAttachmentUploaded(item, _result) {
|
|
40617
40742
|
const err = item.errMessage;
|
|
40618
40743
|
emit("attachment-uploaded", item, { ok: item.status === "success", message: item.status === "success" ? void 0 : err });
|
|
@@ -40868,6 +40993,7 @@
|
|
|
40868
40993
|
name: __props.title,
|
|
40869
40994
|
suggestions: __props.suggestions,
|
|
40870
40995
|
"suggestions-wrap": __props.suggestionsWrap,
|
|
40996
|
+
"followup-style": __props.followupStyle,
|
|
40871
40997
|
"show-scroll-button": __props.showScrollButton,
|
|
40872
40998
|
"scroll-button-threshold": __props.scrollButtonThreshold,
|
|
40873
40999
|
"scroll-threshold": __props.scrollThreshold,
|
|
@@ -40994,7 +41120,7 @@
|
|
|
40994
41120
|
]),
|
|
40995
41121
|
key: "12"
|
|
40996
41122
|
} : void 0
|
|
40997
|
-
]), 1032, ["messages", "nodes", "name", "suggestions", "suggestions-wrap", "show-scroll-button", "scroll-button-threshold", "scroll-threshold", "show-user-avatar", "show-user-name", "show-assistant-avatar", "show-assistant-name", "user-avatar", "assistant-avatar", "assistant-avatar-scale", "avatar-circle", "user-name", "assistant-name", "typing", "auto-collapse", "collapsible", "show-duration", "show-time", "time-format", "code-trigger-langs", "resolve-file-url", "feedback-handler"]),
|
|
41123
|
+
]), 1032, ["messages", "nodes", "name", "suggestions", "suggestions-wrap", "followup-style", "show-scroll-button", "scroll-button-threshold", "scroll-threshold", "show-user-avatar", "show-user-name", "show-assistant-avatar", "show-assistant-name", "user-avatar", "assistant-avatar", "assistant-avatar-scale", "avatar-circle", "user-name", "assistant-name", "typing", "auto-collapse", "collapsible", "show-duration", "show-time", "time-format", "code-trigger-langs", "resolve-file-url", "feedback-handler"]),
|
|
40998
41124
|
artifactsOn.value && artifacts.value.length ? (vue.openBlock(), vue.createBlock(_sfc_main$1, {
|
|
40999
41125
|
key: 0,
|
|
41000
41126
|
artifacts: artifacts.value,
|
|
@@ -41032,10 +41158,11 @@
|
|
|
41032
41158
|
accept: __props.accept,
|
|
41033
41159
|
count: __props.attachmentLimit,
|
|
41034
41160
|
upload: attachmentsUploadHook.value,
|
|
41161
|
+
"before-upload": attachmentBeforeUpload.value,
|
|
41035
41162
|
disabled: vue.unref(isLoading),
|
|
41036
41163
|
onExceed: onAttachmentExceed,
|
|
41037
41164
|
onUploaded: onAttachmentUploaded
|
|
41038
|
-
}, null, 8, ["modelValue", "accept", "count", "upload", "disabled"])
|
|
41165
|
+
}, null, 8, ["modelValue", "accept", "count", "upload", "before-upload", "disabled"])
|
|
41039
41166
|
]),
|
|
41040
41167
|
key: "0"
|
|
41041
41168
|
} : void 0,
|
|
@@ -41049,10 +41176,11 @@
|
|
|
41049
41176
|
accept: __props.accept,
|
|
41050
41177
|
count: __props.attachmentLimit,
|
|
41051
41178
|
upload: attachmentsUploadHook.value,
|
|
41179
|
+
"before-upload": attachmentBeforeUpload.value,
|
|
41052
41180
|
disabled: vue.unref(isLoading),
|
|
41053
41181
|
onExceed: onAttachmentExceed,
|
|
41054
41182
|
onUploaded: onAttachmentUploaded
|
|
41055
|
-
}, null, 8, ["modelValue", "accept", "count", "upload", "disabled"])
|
|
41183
|
+
}, null, 8, ["modelValue", "accept", "count", "upload", "before-upload", "disabled"])
|
|
41056
41184
|
]),
|
|
41057
41185
|
key: "1"
|
|
41058
41186
|
} : void 0,
|