@fv-ui/ai-chat 1.5.0 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/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 AI \u54EA\u91CC\u4E0D\u597D",
33310
+ /** 点踩弹窗标题({name} = AI 名称,渲染时替换为 assistantName,空串回落 defaultAssistantName) */
33311
+ dislikeTitle: "\u62B1\u6B49\uFF0C\u8BF7\u544A\u8BC9 {name} \u54EA\u91CC\u4E0D\u597D",
33310
33312
  /** 点踩附言输入占位(选填 ≤500 字) */
33311
- dislikePlaceholder: "\u8865\u5145\u5177\u4F53\u539F\u56E0,\u5E2E\u52A9 AI \u6539\u8FDB(\u9009\u586B)",
33313
+ dislikePlaceholder: "\u6B22\u8FCE\u8BF4\u8BF4\u4F60\u7684\u60F3\u6CD5",
33312
33314
  /** 附言提交按钮(不带原因直接点踩) */
33313
33315
  submit: "\u63D0\u4EA4",
33314
33316
  /** 附言跳过按钮 */
@@ -33435,12 +33437,13 @@
33435
33437
  queried: "Queried",
33436
33438
  generateFailed: "Generation failed",
33437
33439
  followups: "Follow-up suggestions",
33440
+ followupsTitle: "Follow-ups",
33438
33441
  loadingPhrases: ["Thinking...", "Organizing thoughts...", "Generating your answer..."],
33439
33442
  feedback: {
33440
33443
  like: "Like",
33441
33444
  dislike: "Dislike",
33442
- dislikeTitle: "Tell the AI what went wrong",
33443
- dislikePlaceholder: "Add details to help the AI improve (optional)",
33445
+ dislikeTitle: "Sorry \u2014 tell {name} what went wrong",
33446
+ dislikePlaceholder: "Feel free to share your thoughts",
33444
33447
  submit: "Submit",
33445
33448
  skip: "Skip",
33446
33449
  failed: "Failed to submit feedback",
@@ -37507,6 +37510,45 @@
37507
37510
  }
37508
37511
  });
37509
37512
 
37513
+ const PATHS$1 = {
37514
+ excel: [
37515
+ "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",
37516
+ "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"
37517
+ ],
37518
+ pdf: [
37519
+ "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",
37520
+ "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"
37521
+ ],
37522
+ ppt: [
37523
+ "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",
37524
+ "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"
37525
+ ],
37526
+ word: [
37527
+ "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",
37528
+ "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"
37529
+ ],
37530
+ txt: [
37531
+ "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"
37532
+ ],
37533
+ file: [
37534
+ "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"
37535
+ ]
37536
+ };
37537
+ const FileIcon = vue.defineComponent({
37538
+ name: "FvFileIcon",
37539
+ props: {
37540
+ /** 图标类型:excel/pdf/ppt/word/txt/file */
37541
+ kind: { type: String, default: "file" }
37542
+ },
37543
+ setup(props) {
37544
+ return () => vue.h("svg", {
37545
+ xmlns: "http://www.w3.org/2000/svg",
37546
+ viewBox: "0 0 1024 1024",
37547
+ "aria-hidden": "true"
37548
+ }, PATHS$1[props.kind].map((d) => vue.h("path", { d, fill: "currentColor" })));
37549
+ }
37550
+ });
37551
+
37510
37552
  const _hoisted_1$6 = ["src", "alt"];
37511
37553
  const _hoisted_2$6 = { class: "fv-files-card-info" };
37512
37554
  const _hoisted_3$6 = ["title"];
@@ -37517,7 +37559,7 @@
37517
37559
  };
37518
37560
  const _hoisted_6$2 = {
37519
37561
  key: 2,
37520
- class: "fv-files-card-status"
37562
+ class: "fv-files-card-size"
37521
37563
  };
37522
37564
  const _hoisted_7$1 = ["aria-label"];
37523
37565
  const KB = 1024;
@@ -37538,40 +37580,39 @@
37538
37580
  },
37539
37581
  setup(__props) {
37540
37582
  const EXT_ICON = {
37541
- pdf: ElementPlusIconsVue.Document,
37542
- doc: ElementPlusIconsVue.Document,
37543
- docx: ElementPlusIconsVue.Document,
37544
- txt: ElementPlusIconsVue.Document,
37545
- md: ElementPlusIconsVue.Notebook,
37546
- rtf: ElementPlusIconsVue.Document,
37547
- xls: ElementPlusIconsVue.DataAnalysis,
37548
- xlsx: ElementPlusIconsVue.DataAnalysis,
37549
- csv: ElementPlusIconsVue.DataAnalysis,
37550
- ppt: ElementPlusIconsVue.Monitor,
37551
- pptx: ElementPlusIconsVue.Monitor,
37552
- mp4: ElementPlusIconsVue.Film,
37553
- mov: ElementPlusIconsVue.Film,
37554
- avi: ElementPlusIconsVue.Film,
37555
- mkv: ElementPlusIconsVue.Film,
37556
- webm: ElementPlusIconsVue.Film,
37557
- mp3: ElementPlusIconsVue.Headset,
37558
- wav: ElementPlusIconsVue.Headset,
37559
- flac: ElementPlusIconsVue.Headset,
37560
- aac: ElementPlusIconsVue.Headset,
37561
- m4a: ElementPlusIconsVue.Headset,
37562
- zip: ElementPlusIconsVue.Folder,
37563
- rar: ElementPlusIconsVue.Folder,
37564
- "7z": ElementPlusIconsVue.Folder,
37565
- tar: ElementPlusIconsVue.Folder,
37566
- gz: ElementPlusIconsVue.Folder,
37567
- url: ElementPlusIconsVue.Link,
37568
- html: ElementPlusIconsVue.Link,
37569
- htm: ElementPlusIconsVue.Link,
37570
- apk: ElementPlusIconsVue.Cellphone,
37571
- ipa: ElementPlusIconsVue.Cellphone,
37572
- exe: ElementPlusIconsVue.Cpu,
37573
- msi: ElementPlusIconsVue.Cpu,
37574
- dll: ElementPlusIconsVue.Cpu
37583
+ // excel / 表格
37584
+ xls: "excel",
37585
+ xlsx: "excel",
37586
+ xlsm: "excel",
37587
+ csv: "excel",
37588
+ et: "excel",
37589
+ // pdf
37590
+ pdf: "pdf",
37591
+ // ppt / 幻灯片
37592
+ ppt: "ppt",
37593
+ pptx: "ppt",
37594
+ pptm: "ppt",
37595
+ dps: "ppt",
37596
+ // word / wps 文字
37597
+ doc: "word",
37598
+ docx: "word",
37599
+ docm: "word",
37600
+ rtf: "word",
37601
+ wps: "word",
37602
+ // 文本类(md/txt 及常见纯文本格式)
37603
+ txt: "txt",
37604
+ md: "txt",
37605
+ markdown: "txt",
37606
+ log: "txt",
37607
+ json: "txt",
37608
+ xml: "txt",
37609
+ html: "txt",
37610
+ htm: "txt",
37611
+ yml: "txt",
37612
+ yaml: "txt",
37613
+ ini: "txt",
37614
+ conf: "txt",
37615
+ sql: "txt"
37575
37616
  };
37576
37617
  const props = __props;
37577
37618
  const dict = useLocaleDict(() => props.locale);
@@ -37588,9 +37629,9 @@
37588
37629
  return `${Number.isInteger(mb) ? mb : mb.toFixed(1)}MB`;
37589
37630
  });
37590
37631
  const isImage = vue.computed(() => props.fileType === "image");
37591
- const docIcon = vue.computed(() => {
37632
+ const docIconKind = vue.computed(() => {
37592
37633
  const ext = props.name.includes(".") ? props.name.split(".").pop().toLowerCase() : "";
37593
- return EXT_ICON[ext] ?? ElementPlusIconsVue.Document;
37634
+ return EXT_ICON[ext] ?? "file";
37594
37635
  });
37595
37636
  const thumbStyle = vue.computed(() => {
37596
37637
  const s = props.imageSize || "";
@@ -37640,10 +37681,10 @@
37640
37681
  vue.Fragment,
37641
37682
  { key: 1 },
37642
37683
  [
37643
- vue.createCommentVNode(" \u6587\u6863\u6A21\u5F0F:\u6309\u6269\u5C55\u540D\u6620\u5C04\u7C7B\u578B\u56FE\u6807 + \u540D\u79F0/\u5927\u5C0F "),
37684
+ vue.createCommentVNode(" \u6587\u6863\u6A21\u5F0F:\u6309\u6269\u5C55\u540D\u6620\u5C04\u8BBE\u8BA1\u7A3F\u7C7B\u578B\u56FE\u6807 + \u540D\u79F0/\u5927\u5C0F "),
37644
37685
  vue.createVNode(vue.unref(elementPlus.ElIcon), { class: "fv-files-card-icon" }, {
37645
37686
  default: vue.withCtx(() => [
37646
- (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(docIcon.value)))
37687
+ vue.createVNode(vue.unref(FileIcon), { kind: docIconKind.value }, null, 8, ["kind"])
37647
37688
  ]),
37648
37689
  _: 1
37649
37690
  /* STABLE */
@@ -37657,29 +37698,36 @@
37657
37698
  class: "fv-files-card-name",
37658
37699
  title: __props.name
37659
37700
  }, 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 "),
37701
+ 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
37702
  __props.status === "error" && __props.errorText ? (vue.openBlock(), vue.createElementBlock("div", {
37662
37703
  key: 0,
37663
37704
  class: "fv-files-card-error",
37664
37705
  title: __props.errorText
37665
- }, vue.toDisplayString(__props.errorText), 9, _hoisted_4$4)) : sizeText.value ? (vue.openBlock(), vue.createElementBlock(
37706
+ }, vue.toDisplayString(__props.errorText), 9, _hoisted_4$4)) : __props.status === "loading" ? (vue.openBlock(), vue.createElementBlock(
37666
37707
  "div",
37667
37708
  _hoisted_5$3,
37709
+ vue.toDisplayString(vue.unref(dict).attachments.uploading),
37710
+ 1
37711
+ /* TEXT */
37712
+ )) : sizeText.value ? (vue.openBlock(), vue.createElementBlock(
37713
+ "div",
37714
+ _hoisted_6$2,
37668
37715
  vue.toDisplayString(sizeText.value),
37669
37716
  1
37670
37717
  /* TEXT */
37671
37718
  )) : vue.createCommentVNode("v-if", true)
37672
37719
  ]),
37673
- vue.createCommentVNode(" \u72B6\u6001\u89D2\u6807:loading spinner;error \u65E0\u89D2\u6807(\u7EA2\u8FB9\u6837\u5F0F) "),
37674
- __props.status === "loading" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6$2, [
37675
- vue.createVNode(vue.unref(elementPlus.ElIcon), { class: "fv-files-card-loading" }, {
37676
- default: vue.withCtx(() => [
37677
- vue.createVNode(vue.unref(ElementPlusIconsVue.Loading))
37678
- ]),
37679
- _: 1
37680
- /* STABLE */
37681
- })
37682
- ])) : vue.createCommentVNode("v-if", true),
37720
+ 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) "),
37721
+ __props.status === "loading" ? (vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElIcon), {
37722
+ key: 2,
37723
+ class: "fv-files-card-loading"
37724
+ }, {
37725
+ default: vue.withCtx(() => [
37726
+ vue.createVNode(vue.unref(ElementPlusIconsVue.Loading))
37727
+ ]),
37728
+ _: 1
37729
+ /* STABLE */
37730
+ })) : vue.createCommentVNode("v-if", true),
37683
37731
  vue.createCommentVNode(" \u53F3\u4E0A\u5220\u9664\u6309\u94AE "),
37684
37732
  vue.createElementVNode("button", {
37685
37733
  type: "button",
@@ -38814,12 +38862,19 @@
38814
38862
  }
38815
38863
  });
38816
38864
 
38817
- const THUMB_PATH = "M960 432c0-26.4-21.6-48-48-48H667.2l45.6-208.8c1.6-6.4 1.6-13.6-0.8-20.8-8-25.6-34.4-39.2-60-31.2-12.8 4-24.8 12-34.4 21.6L460 344.8c-10.4 10.4-24 16-38.4 16H160c-35.2 0-64 28.8-64 64v384c0 35.2 28.8 64 64 64h601.6c44.8 0 83.2-31.2 92.8-75.2l66.4-331.2c1.6-6.4 1.6-13.6 1.6-20.8V432z m-704 384c0 8.8-7.2 16-16 16h-48c-8.8 0-16-7.2-16-16V456c0-8.8 7.2-16 16-16h48c8.8 0 16 7.2 16 16v360z";
38865
+ const LIKE_PATH = "M507.94496 118.70208L512 118.784c41.7792 0 88.92416 30.76096 114.36032 80.81408 25.23136 44.2368 25.64096 100.352 12.6976 159.04768h123.78112c95.4368 0 177.43872 82.98496 148.02944 178.33984l-76.96384 249.6512c-19.37408 62.79168-81.75616 102.1952-148.02944 102.1952h-298.1888a116.57216 116.57216 0 0 1-116.5312-116.57216V422.2976c0-35.2256 23.38816-61.27616 47.75936-73.85088a115.9168 115.9168 0 0 0 56.19712-62.464c7.5776-20.0704 10.60864-37.76512 13.80352-56.40192l1.35168-7.61856c3.44064-19.6608 8.35584-45.99808 26.624-67.74784 16.71168-19.94752 35.84-29.73696 55.17312-33.5872 13.27104-2.62144 27.97568-2.21184 35.88096-1.96608z m-21.54496 74.30144c-3.44064 0.69632-7.49568 2.048-13.06624 8.64256-4.01408 4.79232-6.79936 12.288-10.48576 33.1776l-1.2288 6.9632c-3.11296 18.51392-7.33184 43.13088-17.53088 70.20544a189.6448 189.6448 0 0 1-91.38176 102.03136 18.6368 18.6368 0 0 0-6.63552 5.44768c-1.14688 1.6384-1.2288 2.58048-1.2288 2.8672v349.92128c0 23.67488 19.2512 42.84416 42.88512 42.84416h298.14784c39.15776 0 69.2224-23.01952 77.57824-50.21696l76.96384-249.61024c11.18208-36.20864-18.80064-82.90304-77.57824-82.90304h-172.07296a36.864 36.864 0 0 1-35.06176-48.29184c23.3472-71.68 22.44608-120.832 6.3488-148.48a38.0928 38.0928 0 0 1-1.10592-2.048C545.30048 202.30144 520.31488 192.512 512 192.512c-2.90816 0-5.81632-0.08192-8.27392-0.12288h-0.45056a264.6016 264.6016 0 0 0-7.12704-0.12288c-4.34176 0-7.3728 0.24576-9.74848 0.73728zM184.32 385.024a36.864 36.864 0 0 1 36.864 36.864v409.6a36.864 36.864 0 1 1-73.728 0v-409.6a36.864 36.864 0 0 1 36.864-36.864z";
38866
+ const LIKE_FILLED_PATH = "M614.4 183.62368c26.2144 46.94016 22.40512 116.85888-3.39968 199.31136h184.89344c82.86208 0 142.99136 72.45824 121.2416 145.94048l-82.7392 278.9376c-14.90944 50.25792-64.55296 85.11488-121.20064 85.11488H386.90816A79.70816 79.70816 0 0 1 307.2 813.21984V409.10848c0-17.6128 11.79648-32.768 27.4432-40.79616a168.46848 168.46848 0 0 0 81.7152-93.184c21.66784-59.76064 14.21312-105.55392 38.13376-135.24992 23.9616-29.65504 49.88928-24.90368 71.8848-24.90368 27.0336 0 66.02752 22.89664 88.02304 68.64896zM204.8 380.928A61.44 61.44 0 0 1 266.24 442.368v389.12a61.44 61.44 0 1 1-122.88 0v-389.12a61.44 61.44 0 0 1 61.44-61.44z";
38867
+ const DISLIKE_PATH = "M516.096 905.216l4.05504 0.08192c7.90528 0.24576 22.60992 0.65536 35.88096-1.96608 19.33312-3.85024 38.5024-13.63968 55.21408-33.5872 18.2272-21.74976 23.1424-48.08704 26.624-67.74784l1.31072-7.61856c3.19488-18.6368 6.22592-36.29056 13.80352-56.40192a115.9168 115.9168 0 0 1 56.19712-62.464c24.3712-12.57472 47.75936-38.58432 47.75936-73.85088V251.74016A116.57216 116.57216 0 0 0 640.36864 135.168h-298.1888c-66.23232 0-128.6144 39.40352-147.98848 102.1952l-77.0048 249.6512c-29.36832 95.35488 52.67456 178.33984 148.0704 178.33984h123.74016c-12.9024 58.65472-12.4928 114.85184 12.6976 159.08864 25.47712 49.9712 72.66304 80.77312 114.40128 80.77312z m38.66624-82.86208c-5.57056 6.59456-9.6256 7.94624-13.06624 8.64256-2.41664 0.49152-5.40672 0.73728-9.74848 0.73728-2.17088 0-4.42368 0-7.12704-0.12288h-0.45056c-2.4576-0.04096-5.36576-0.12288-8.27392-0.12288-8.31488 0-33.30048-9.74848-48.9472-41.04192a37.6832 37.6832 0 0 0-1.10592-2.048c-16.09728-27.68896-16.9984-76.8 6.3488-148.48a36.864 36.864 0 0 0-35.0208-48.29184H265.25696c-58.7776 0-88.76032-46.6944-77.57824-82.90304l77.0048-249.61024c8.35584-27.19744 38.37952-50.21696 77.53728-50.21696h298.1888c23.63392 0 42.8032 19.16928 42.8032 42.84416v349.92128c0 0.28672-0.04096 1.2288-1.2288 2.8672a18.59584 18.59584 0 0 1-6.5536 5.44768 189.6448 189.6448 0 0 0-91.42272 101.9904c-10.24 27.11552-14.41792 51.73248-17.57184 70.20544l-1.2288 7.04512c-3.6864 20.8896-6.43072 28.34432-10.4448 33.1776zM806.912 602.112a36.864 36.864 0 0 0 73.728 0v-409.6a36.864 36.864 0 1 0-73.728 0v409.6z";
38868
+ const DISLIKE_FILLED_PATH = "M778.24 585.728a61.44 61.44 0 1 0 122.88 0V196.608a61.44 61.44 0 0 0-122.88 0v389.12z m-344.76032 59.392c-25.8048 82.49344-29.65504 152.41216-3.39968 199.35232 21.99552 45.79328 60.98944 68.64896 88.02304 68.64896 2.62144 0 5.3248 0.08192 8.02816 0.16384 20.15232 0.49152 42.76224 1.06496 63.85664-25.06752 13.39392-16.62976 16.95744-38.25664 21.2992-64.59392 3.39968-20.72576 7.29088-44.31872 16.83456-70.656a168.50944 168.50944 0 0 1 81.7152-93.184c15.64672-8.06912 27.4432-23.18336 27.4432-40.79616V214.87616A79.70816 79.70816 0 0 0 657.57184 135.168H331.28448c-56.64768 0-106.2912 34.85696-121.2416 85.15584L127.3856 499.22048c-21.79072 73.48224 38.33856 145.94048 121.20064 145.94048h184.89344z";
38869
+ const PATHS = {
38870
+ like: { outline: LIKE_PATH, filled: LIKE_FILLED_PATH },
38871
+ dislike: { outline: DISLIKE_PATH, filled: DISLIKE_FILLED_PATH }
38872
+ };
38818
38873
  const FeedbackThumbIcon = vue.defineComponent({
38819
38874
  name: "FvFeedbackThumbIcon",
38820
38875
  props: {
38821
- /** 朝向:up 点赞 / down 点踩(翻转) */
38822
- flip: { type: Boolean, default: false },
38876
+ /** 朝向:like 点赞 / dislike 点踩(设计稿独立 path,非翻转) */
38877
+ kind: { type: String, default: "like" },
38823
38878
  /** 实底态(当前评价高亮);缺省线性 */
38824
38879
  filled: { type: Boolean, default: false }
38825
38880
  },
@@ -38827,18 +38882,11 @@
38827
38882
  return () => vue.h("svg", {
38828
38883
  xmlns: "http://www.w3.org/2000/svg",
38829
38884
  viewBox: "0 0 1024 1024",
38830
- "aria-hidden": "true",
38831
- ...props.flip ? { style: "transform: scaleY(-1)" } : {}
38885
+ "aria-hidden": "true"
38832
38886
  }, [
38833
38887
  vue.h("path", {
38834
- d: THUMB_PATH,
38835
- ...props.filled ? { fill: "currentColor" } : {
38836
- fill: "none",
38837
- stroke: "currentColor",
38838
- "stroke-width": 64,
38839
- "stroke-linejoin": "round",
38840
- "stroke-linecap": "round"
38841
- }
38888
+ d: props.filled ? PATHS[props.kind].filled : PATHS[props.kind].outline,
38889
+ fill: "currentColor"
38842
38890
  })
38843
38891
  ]);
38844
38892
  }
@@ -38884,32 +38932,30 @@
38884
38932
  "aria-live": "polite"
38885
38933
  };
38886
38934
  const _hoisted_14 = { class: "fv-msg-pending-text" };
38887
- const _hoisted_15 = {
38888
- key: 5,
38889
- class: "fv-msg-content fv-msg-content-user"
38890
- };
38891
- const _hoisted_16 = ["aria-label"];
38892
- const _hoisted_17 = ["disabled", "onClick"];
38893
- const _hoisted_18 = {
38894
- key: 7,
38935
+ const _hoisted_15 = { class: "fv-msg-content fv-msg-content-user" };
38936
+ const _hoisted_16 = {
38937
+ key: 6,
38895
38938
  class: "fv-msg-actions"
38896
38939
  };
38897
- const _hoisted_19 = {
38940
+ const _hoisted_17 = {
38898
38941
  key: 3,
38899
38942
  class: "fv-msg-feedback"
38900
38943
  };
38901
- const _hoisted_20 = ["aria-label"];
38902
- const _hoisted_21 = { class: "fv-msg-feedback-pop-title" };
38903
- const _hoisted_22 = { class: "fv-msg-feedback-pop-actions" };
38904
- const _hoisted_23 = {
38944
+ const _hoisted_18 = {
38905
38945
  key: 0,
38906
38946
  class: "fv-msg-branch"
38907
38947
  };
38908
- const _hoisted_24 = { class: "fv-msg-branch-label" };
38909
- const _hoisted_25 = {
38948
+ const _hoisted_19 = { class: "fv-msg-branch-label" };
38949
+ const _hoisted_20 = {
38910
38950
  key: 1,
38911
38951
  class: "fv-msg-time"
38912
38952
  };
38953
+ const _hoisted_21 = ["aria-label"];
38954
+ const _hoisted_22 = {
38955
+ key: 0,
38956
+ class: "fv-msg-followups-title"
38957
+ };
38958
+ const _hoisted_23 = ["disabled", "onClick"];
38913
38959
  const LOADING_PHRASE_INTERVAL = 3e3;
38914
38960
  var _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
38915
38961
  ...{ name: "FvAiMessage" },
@@ -38918,6 +38964,7 @@
38918
38964
  message: { type: Object, required: true },
38919
38965
  branch: { type: Object, required: false, default: void 0 },
38920
38966
  isLast: { type: Boolean, required: false, default: false },
38967
+ followupStyle: { type: String, required: false, default: "list" },
38921
38968
  showActions: { type: Boolean, required: false, default: true },
38922
38969
  showBranchSwitch: { type: Boolean, required: false, default: true },
38923
38970
  showUserAvatar: { type: Boolean, required: false, default: false },
@@ -39134,11 +39181,12 @@
39134
39181
  if (phraseTimer !== null) clearInterval(phraseTimer);
39135
39182
  });
39136
39183
  const followups = vue.computed(() => {
39137
- if (!props.isLast || isUser.value) return [];
39184
+ if (isUser.value) return [];
39138
39185
  const s = props.message.suggestions;
39139
39186
  return s && s.length ? s : [];
39140
39187
  });
39141
39188
  const followupsEnabled = vue.computed(() => props.message.status === "done");
39189
+ const followupTitle = vue.computed(() => dict.value.aiMessage.followupsTitle);
39142
39190
  function onFollowup(item) {
39143
39191
  if (!followupsEnabled.value) return;
39144
39192
  emit("followup-select", item, props.message);
@@ -39146,15 +39194,26 @@
39146
39194
  const feedbackVisible = vue.computed(
39147
39195
  () => !isUser.value && props.message.status === "done" && !!props.feedbackHandler
39148
39196
  );
39197
+ const actionsVisible = vue.computed(
39198
+ () => props.showActions && (isUser.value || props.message.status === "done")
39199
+ );
39149
39200
  const feedbackAction = vue.computed(
39150
39201
  () => props.message.feedback?.action ?? null
39151
39202
  );
39203
+ const feedbackDialogTitle = vue.computed(
39204
+ () => dict.value.aiMessage.feedback.dislikeTitle.split("{name}").join(props.assistantName || dict.value.aiMessage.defaultAssistantName)
39205
+ );
39206
+ const feedbackCommentPlaceholder = vue.computed(() => dict.value.aiMessage.feedback.dislikePlaceholder);
39152
39207
  const isToolOnlyRow = vue.computed(
39153
39208
  () => !isUser.value && !props.message.content && hasToolSteps.value
39154
39209
  );
39155
39210
  const dislikePopVisible = vue.ref(false);
39156
39211
  const dislikeComment = vue.ref("");
39212
+ vue.watch(dislikePopVisible, (on) => {
39213
+ if (on) vue.nextTick(() => commentTextareaRef.value?.focus());
39214
+ });
39157
39215
  const feedbackPending = vue.ref(false);
39216
+ const commentTextareaRef = vue.ref(null);
39158
39217
  async function submitFeedback(next, comment) {
39159
39218
  const handler = props.feedbackHandler;
39160
39219
  if (!handler || feedbackPending.value) return;
@@ -39162,7 +39221,8 @@
39162
39221
  feedbackPending.value = true;
39163
39222
  try {
39164
39223
  props.message.feedback = next === "CLEAR" ? { action: null } : { action: next, ...comment ? { comment } : {} };
39165
- await handler(props.message, next, comment);
39224
+ const r = await handler(props.message, next, comment);
39225
+ if (typeof r === "string" && r) throw new Error(r);
39166
39226
  emit("feedback-change", props.message, next);
39167
39227
  } catch (e) {
39168
39228
  props.message.feedback = prev;
@@ -39211,10 +39271,10 @@
39211
39271
  const previewList = vue.computed(() => (props.message.files ?? []).filter((f) => f.type === "image"));
39212
39272
  const previewVisible = vue.ref(false);
39213
39273
  const previewIndex = vue.ref(0);
39214
- function onFileClick(f, index) {
39274
+ function onFileClick(f, _index) {
39215
39275
  emit("file-click", f, props.message);
39216
39276
  if (f.type === "image" && displayUrl(f)) {
39217
- previewIndex.value = Math.max(0, index);
39277
+ previewIndex.value = Math.max(0, previewList.value.findIndex((x) => x.id === f.id));
39218
39278
  previewVisible.value = true;
39219
39279
  }
39220
39280
  }
@@ -39299,7 +39359,7 @@
39299
39359
  /* TEXT */
39300
39360
  )) : vue.createCommentVNode("v-if", true)
39301
39361
  ])) : vue.createCommentVNode("v-if", true),
39302
- 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\u53EF\u70B9(\u5BBF\u4E3B\u4E0B\u8F7D) "),
39362
+ 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) "),
39303
39363
  __props.message.files?.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_7, [
39304
39364
  vue.renderSlot(_ctx.$slots, "message-files", {
39305
39365
  message: __props.message,
@@ -39309,26 +39369,43 @@
39309
39369
  vue.Fragment,
39310
39370
  null,
39311
39371
  vue.renderList(__props.message.files, (f, i) => {
39312
- return vue.openBlock(), vue.createElementBlock("button", {
39313
- key: f.id,
39314
- type: "button",
39315
- class: vue.normalizeClass(["fv-msg-file", `is-${f.type ?? "file"}`]),
39316
- title: f.name,
39317
- onClick: ($event) => onFileClick(f, i)
39318
- }, [
39319
- f.type === "image" && displayUrl(f) ? (vue.openBlock(), vue.createElementBlock("img", {
39320
- key: 0,
39321
- class: "fv-msg-file-img",
39322
- src: displayUrl(f),
39323
- alt: f.name
39324
- }, null, 8, _hoisted_9)) : (vue.openBlock(), vue.createElementBlock(
39325
- "span",
39326
- _hoisted_10,
39327
- vue.toDisplayString(f.name),
39328
- 1
39329
- /* TEXT */
39330
- ))
39331
- ], 10, _hoisted_8);
39372
+ return vue.openBlock(), vue.createElementBlock(
39373
+ vue.Fragment,
39374
+ {
39375
+ key: f.id
39376
+ },
39377
+ [
39378
+ f.type === "image" ? (vue.openBlock(), vue.createElementBlock("button", {
39379
+ key: 0,
39380
+ type: "button",
39381
+ class: "fv-msg-file is-image",
39382
+ title: f.name,
39383
+ onClick: ($event) => onFileClick(f)
39384
+ }, [
39385
+ displayUrl(f) ? (vue.openBlock(), vue.createElementBlock("img", {
39386
+ key: 0,
39387
+ class: "fv-msg-file-img",
39388
+ src: displayUrl(f),
39389
+ alt: f.name
39390
+ }, null, 8, _hoisted_9)) : (vue.openBlock(), vue.createElementBlock(
39391
+ "span",
39392
+ _hoisted_10,
39393
+ vue.toDisplayString(f.name),
39394
+ 1
39395
+ /* TEXT */
39396
+ ))
39397
+ ], 8, _hoisted_8)) : (vue.openBlock(), vue.createBlock(_sfc_main$6, {
39398
+ key: 1,
39399
+ class: "fv-msg-file-card",
39400
+ name: f.name,
39401
+ size: f.size,
39402
+ "file-type": "file",
39403
+ onClick: ($event) => onFileClick(f)
39404
+ }, null, 8, ["name", "size", "onClick"]))
39405
+ ],
39406
+ 64
39407
+ /* STABLE_FRAGMENT */
39408
+ );
39332
39409
  }),
39333
39410
  128
39334
39411
  /* KEYED_FRAGMENT */
@@ -39394,7 +39471,7 @@
39394
39471
  key: "0"
39395
39472
  } : void 0
39396
39473
  ]), 1032, ["modelValue", "status", "hide-header", "class"])) : vue.createCommentVNode("v-if", true),
39397
- vue.createCommentVNode(" \u6B63\u6587:user \u7EAF\u6587\u672C\u6C14\u6CE1;assistant Markdown;pending \u7A7A\u5185\u5BB9\u7ED9\u52A0\u8F7D\u5360\u4F4D "),
39474
+ 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 "),
39398
39475
  !isUser.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_11, [
39399
39476
  __props.message.status === "error" ? (vue.openBlock(), vue.createElementBlock(
39400
39477
  "span",
@@ -39422,7 +39499,7 @@
39422
39499
  [
39423
39500
  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) "),
39424
39501
  vue.createElementVNode("span", _hoisted_13, [
39425
- _cache[10] || (_cache[10] = vue.createElementVNode(
39502
+ _cache[11] || (_cache[11] = vue.createElementVNode(
39426
39503
  "span",
39427
39504
  {
39428
39505
  class: "fv-msg-spinner",
@@ -39444,42 +39521,26 @@
39444
39521
  2112
39445
39522
  /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
39446
39523
  )) : vue.createCommentVNode("v-if", true)
39447
- ])) : (vue.openBlock(), vue.createElementBlock(
39448
- "div",
39449
- _hoisted_15,
39450
- vue.toDisplayString(__props.message.content),
39451
- 1
39452
- /* TEXT */
39453
- )),
39454
- vue.createCommentVNode(" \u8FFD\u95EE\u5EFA\u8BAE chips:\u4EC5\u94FE\u5C3E assistant \u6D88\u606F\u6E32\u67D3(isLast \u7531 AiMessages \u6CE8\u5165);\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 "),
39455
- followups.value.length ? (vue.openBlock(), vue.createElementBlock("div", {
39456
- key: 6,
39457
- class: "fv-msg-followups",
39458
- role: "listbox",
39459
- "aria-label": vue.unref(dict).aiMessage.followups
39460
- }, [
39461
- (vue.openBlock(true), vue.createElementBlock(
39462
- vue.Fragment,
39463
- null,
39464
- vue.renderList(followups.value, (item, i) => {
39465
- return vue.openBlock(), vue.createElementBlock("button", {
39466
- key: `${i}-${item}`,
39467
- type: "button",
39468
- class: vue.normalizeClass(["fv-msg-followup", { "is-disabled": !followupsEnabled.value }]),
39469
- disabled: !followupsEnabled.value,
39470
- role: "option",
39471
- "aria-selected": false,
39472
- onClick: ($event) => onFollowup(item)
39473
- }, vue.toDisplayString(item), 11, _hoisted_17);
39474
- }),
39475
- 128
39476
- /* KEYED_FRAGMENT */
39477
- ))
39478
- ], 8, _hoisted_16)) : vue.createCommentVNode("v-if", true),
39479
- 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 "),
39480
- feedbackVisible.value || __props.showActions || __props.showBranchSwitch && __props.branch && __props.branch.count > 1 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_18, [
39524
+ ])) : __props.message.content ? (vue.openBlock(), vue.createElementBlock(
39525
+ vue.Fragment,
39526
+ { key: 5 },
39527
+ [
39528
+ 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) "),
39529
+ vue.createElementVNode(
39530
+ "div",
39531
+ _hoisted_15,
39532
+ vue.toDisplayString(__props.message.content),
39533
+ 1
39534
+ /* TEXT */
39535
+ )
39536
+ ],
39537
+ 2112
39538
+ /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
39539
+ )) : vue.createCommentVNode("v-if", true),
39540
+ 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 "),
39541
+ 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, [
39481
39542
  vue.renderSlot(_ctx.$slots, "message-actions", { message: __props.message }, () => [
39482
- __props.showActions && isUser.value ? (vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElTooltip), {
39543
+ actionsVisible.value && isUser.value ? (vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElTooltip), {
39483
39544
  key: 0,
39484
39545
  content: vue.unref(dict).aiMessage.copy,
39485
39546
  placement: "top"
@@ -39508,7 +39569,7 @@
39508
39569
  _: 1
39509
39570
  /* STABLE */
39510
39571
  }, 8, ["content"])) : vue.createCommentVNode("v-if", true),
39511
- __props.showActions && !isUser.value ? (vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElTooltip), {
39572
+ actionsVisible.value && !isUser.value ? (vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElTooltip), {
39512
39573
  key: 1,
39513
39574
  content: vue.unref(dict).aiMessage.copy,
39514
39575
  placement: "top"
@@ -39537,7 +39598,7 @@
39537
39598
  _: 1
39538
39599
  /* STABLE */
39539
39600
  }, 8, ["content"])) : vue.createCommentVNode("v-if", true),
39540
- __props.showActions && !isUser.value ? (vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElTooltip), {
39601
+ actionsVisible.value && !isUser.value ? (vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElTooltip), {
39541
39602
  key: 2,
39542
39603
  content: vue.unref(dict).aiMessage.regenerate,
39543
39604
  placement: "top"
@@ -39566,8 +39627,8 @@
39566
39627
  _: 1
39567
39628
  /* STABLE */
39568
39629
  }, 8, ["content"])) : vue.createCommentVNode("v-if", true),
39569
- 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\u5C42(popover \u5185 textarea \u2264500 \u53EF\u8DF3\u8FC7),\u4E50\u89C2\u66F4\u65B0\u5931\u8D25\u56DE\u6EDA "),
39570
- feedbackVisible.value && !isToolOnlyRow.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_19, [
39630
+ 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 "),
39631
+ feedbackVisible.value && !isToolOnlyRow.value ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_17, [
39571
39632
  vue.createVNode(vue.unref(elementPlus.ElTooltip), {
39572
39633
  content: vue.unref(dict).aiMessage.feedback.like,
39573
39634
  placement: "top"
@@ -39586,6 +39647,7 @@
39586
39647
  vue.createVNode(vue.unref(elementPlus.ElIcon), null, {
39587
39648
  default: vue.withCtx(() => [
39588
39649
  vue.createVNode(vue.unref(FeedbackThumbIcon), {
39650
+ kind: "like",
39589
39651
  filled: feedbackAction.value === "LIKE"
39590
39652
  }, null, 8, ["filled"])
39591
39653
  ]),
@@ -39618,7 +39680,7 @@
39618
39680
  vue.createVNode(vue.unref(elementPlus.ElIcon), null, {
39619
39681
  default: vue.withCtx(() => [
39620
39682
  vue.createVNode(vue.unref(FeedbackThumbIcon), {
39621
- flip: "",
39683
+ kind: "dislike",
39622
39684
  filled: feedbackAction.value === "DISLIKE"
39623
39685
  }, null, 8, ["filled"])
39624
39686
  ]),
@@ -39632,75 +39694,18 @@
39632
39694
  ]),
39633
39695
  _: 1
39634
39696
  /* STABLE */
39635
- }, 8, ["content"]),
39636
- 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 textarea \u2264500 \u9009\u586B,\u63D0\u4EA4\u5E26\u539F\u56E0/\u8DF3\u8FC7\u4E0D\u5E26 "),
39637
- dislikePopVisible.value ? (vue.openBlock(), vue.createElementBlock("div", {
39638
- key: 0,
39639
- class: "fv-msg-feedback-pop",
39640
- role: "dialog",
39641
- "aria-label": vue.unref(dict).aiMessage.feedback.dislikeTitle
39642
- }, [
39643
- vue.createElementVNode(
39644
- "div",
39645
- _hoisted_21,
39646
- vue.toDisplayString(vue.unref(dict).aiMessage.feedback.dislikeTitle),
39647
- 1
39648
- /* TEXT */
39649
- ),
39650
- vue.createVNode(vue.unref(elementPlus.ElInput), {
39651
- modelValue: dislikeComment.value,
39652
- "onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => dislikeComment.value = $event),
39653
- type: "textarea",
39654
- rows: 3,
39655
- maxlength: "500",
39656
- "show-word-limit": "",
39657
- placeholder: vue.unref(dict).aiMessage.feedback.dislikePlaceholder
39658
- }, null, 8, ["modelValue", "placeholder"]),
39659
- vue.createElementVNode("div", _hoisted_22, [
39660
- vue.createVNode(vue.unref(elementPlus.ElButton), {
39661
- size: "small",
39662
- text: "",
39663
- onClick: onDislikeSkip
39664
- }, {
39665
- default: vue.withCtx(() => [
39666
- vue.createTextVNode(
39667
- vue.toDisplayString(vue.unref(dict).aiMessage.feedback.skip),
39668
- 1
39669
- /* TEXT */
39670
- )
39671
- ]),
39672
- _: 1
39673
- /* STABLE */
39674
- }),
39675
- vue.createVNode(vue.unref(elementPlus.ElButton), {
39676
- size: "small",
39677
- type: "primary",
39678
- loading: feedbackPending.value,
39679
- onClick: onDislikeSubmit
39680
- }, {
39681
- default: vue.withCtx(() => [
39682
- vue.createTextVNode(
39683
- vue.toDisplayString(vue.unref(dict).aiMessage.feedback.submit),
39684
- 1
39685
- /* TEXT */
39686
- )
39687
- ]),
39688
- _: 1
39689
- /* STABLE */
39690
- }, 8, ["loading"])
39691
- ])
39692
- ], 8, _hoisted_20)) : vue.createCommentVNode("v-if", true)
39697
+ }, 8, ["content"])
39693
39698
  ])) : vue.createCommentVNode("v-if", true)
39694
39699
  ]),
39695
39700
  vue.createCommentVNode(" \u5206\u652F\u5207\u6362:\u5144\u5F1F\u5206\u652F > 1 \u65F6 "),
39696
- __props.showBranchSwitch && __props.branch && __props.branch.count > 1 ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_23, [
39701
+ __props.showBranchSwitch && __props.branch && __props.branch.count > 1 ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_18, [
39697
39702
  vue.createVNode(vue.unref(elementPlus.ElButton), {
39698
39703
  text: "",
39699
39704
  size: "small",
39700
39705
  class: "fv-msg-action",
39701
39706
  disabled: __props.branch.index <= 1,
39702
39707
  "aria-label": vue.unref(dict).aiMessage.prevBranch,
39703
- onClick: _cache[8] || (_cache[8] = ($event) => onBranch("prev"))
39708
+ onClick: _cache[7] || (_cache[7] = ($event) => onBranch("prev"))
39704
39709
  }, {
39705
39710
  default: vue.withCtx(() => [
39706
39711
  vue.createVNode(vue.unref(elementPlus.ElIcon), null, {
@@ -39716,7 +39721,7 @@
39716
39721
  }, 8, ["disabled", "aria-label"]),
39717
39722
  vue.createElementVNode(
39718
39723
  "span",
39719
- _hoisted_24,
39724
+ _hoisted_19,
39720
39725
  vue.toDisplayString(__props.branch.index) + " / " + vue.toDisplayString(__props.branch.count),
39721
39726
  1
39722
39727
  /* TEXT */
@@ -39727,7 +39732,7 @@
39727
39732
  class: "fv-msg-action",
39728
39733
  disabled: __props.branch.index >= __props.branch.count,
39729
39734
  "aria-label": vue.unref(dict).aiMessage.nextBranch,
39730
- onClick: _cache[9] || (_cache[9] = ($event) => onBranch("next"))
39735
+ onClick: _cache[8] || (_cache[8] = ($event) => onBranch("next"))
39731
39736
  }, {
39732
39737
  default: vue.withCtx(() => [
39733
39738
  vue.createVNode(vue.unref(elementPlus.ElIcon), null, {
@@ -39745,13 +39750,102 @@
39745
39750
  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 "),
39746
39751
  messageTimeText.value && timeVisible.value ? (vue.openBlock(), vue.createElementBlock(
39747
39752
  "span",
39748
- _hoisted_25,
39753
+ _hoisted_20,
39749
39754
  vue.toDisplayString(messageTimeText.value),
39750
39755
  1
39751
39756
  /* TEXT */
39752
39757
  )) : vue.createCommentVNode("v-if", true)
39753
- ])) : vue.createCommentVNode("v-if", true)
39754
- ])
39758
+ ])) : vue.createCommentVNode("v-if", true),
39759
+ 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 "),
39760
+ followups.value.length ? (vue.openBlock(), vue.createElementBlock("div", {
39761
+ key: 7,
39762
+ class: vue.normalizeClass(["fv-msg-followups", `is-${__props.followupStyle}`]),
39763
+ role: "listbox",
39764
+ "aria-label": vue.unref(dict).aiMessage.followups
39765
+ }, [
39766
+ __props.followupStyle === "list" ? (vue.openBlock(), vue.createElementBlock(
39767
+ "span",
39768
+ _hoisted_22,
39769
+ vue.toDisplayString(followupTitle.value),
39770
+ 1
39771
+ /* TEXT */
39772
+ )) : vue.createCommentVNode("v-if", true),
39773
+ (vue.openBlock(true), vue.createElementBlock(
39774
+ vue.Fragment,
39775
+ null,
39776
+ vue.renderList(followups.value, (item, i) => {
39777
+ return vue.openBlock(), vue.createElementBlock("button", {
39778
+ key: `${i}-${item}`,
39779
+ type: "button",
39780
+ class: vue.normalizeClass(["fv-msg-followup", { "is-disabled": !followupsEnabled.value }]),
39781
+ disabled: !followupsEnabled.value,
39782
+ role: "option",
39783
+ "aria-selected": false,
39784
+ onClick: ($event) => onFollowup(item)
39785
+ }, vue.toDisplayString(item), 11, _hoisted_23);
39786
+ }),
39787
+ 128
39788
+ /* KEYED_FRAGMENT */
39789
+ ))
39790
+ ], 10, _hoisted_21)) : vue.createCommentVNode("v-if", true)
39791
+ ]),
39792
+ 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 "),
39793
+ feedbackVisible.value && !isToolOnlyRow.value ? (vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElDialog), {
39794
+ key: 1,
39795
+ modelValue: dislikePopVisible.value,
39796
+ "onUpdate:modelValue": _cache[10] || (_cache[10] = ($event) => dislikePopVisible.value = $event),
39797
+ class: "fv-msg-feedback-dialog",
39798
+ title: feedbackDialogTitle.value,
39799
+ width: "480px",
39800
+ "align-center": ""
39801
+ }, {
39802
+ footer: vue.withCtx(() => [
39803
+ vue.createVNode(vue.unref(elementPlus.ElButton), {
39804
+ text: "",
39805
+ onClick: onDislikeSkip
39806
+ }, {
39807
+ default: vue.withCtx(() => [
39808
+ vue.createTextVNode(
39809
+ vue.toDisplayString(vue.unref(dict).aiMessage.feedback.skip),
39810
+ 1
39811
+ /* TEXT */
39812
+ )
39813
+ ]),
39814
+ _: 1
39815
+ /* STABLE */
39816
+ }),
39817
+ vue.createVNode(vue.unref(elementPlus.ElButton), {
39818
+ type: "primary",
39819
+ loading: feedbackPending.value,
39820
+ onClick: onDislikeSubmit
39821
+ }, {
39822
+ default: vue.withCtx(() => [
39823
+ vue.createTextVNode(
39824
+ vue.toDisplayString(vue.unref(dict).aiMessage.feedback.submit),
39825
+ 1
39826
+ /* TEXT */
39827
+ )
39828
+ ]),
39829
+ _: 1
39830
+ /* STABLE */
39831
+ }, 8, ["loading"])
39832
+ ]),
39833
+ default: vue.withCtx(() => [
39834
+ vue.createVNode(vue.unref(elementPlus.ElInput), {
39835
+ ref_key: "commentTextareaRef",
39836
+ ref: commentTextareaRef,
39837
+ modelValue: dislikeComment.value,
39838
+ "onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => dislikeComment.value = $event),
39839
+ type: "textarea",
39840
+ rows: 4,
39841
+ maxlength: "500",
39842
+ "show-word-limit": "",
39843
+ placeholder: feedbackCommentPlaceholder.value
39844
+ }, null, 8, ["modelValue", "placeholder"])
39845
+ ]),
39846
+ _: 1
39847
+ /* STABLE */
39848
+ }, 8, ["modelValue", "title"])) : vue.createCommentVNode("v-if", true)
39755
39849
  ], 10, _hoisted_1$3);
39756
39850
  };
39757
39851
  }
@@ -39797,6 +39891,7 @@
39797
39891
  codeTriggerLangs: { type: Array, required: false },
39798
39892
  showTime: { type: Boolean, required: false, default: true },
39799
39893
  timeFormat: { type: Function, required: false, default: void 0 },
39894
+ followupStyle: { type: String, required: false, default: "list" },
39800
39895
  resolveFileUrl: { type: Function, required: false, default: void 0 },
39801
39896
  feedbackHandler: { type: Function, required: false, default: void 0 },
39802
39897
  locale: { type: null, required: false }
@@ -40059,6 +40154,7 @@
40059
40154
  "show-duration": __props.showDuration,
40060
40155
  "show-time": __props.showTime,
40061
40156
  "time-format": __props.timeFormat,
40157
+ "followup-style": __props.followupStyle,
40062
40158
  "code-trigger-langs": __props.codeTriggerLangs,
40063
40159
  "resolve-file-url": __props.resolveFileUrl,
40064
40160
  "feedback-handler": __props.feedbackHandler,
@@ -40116,7 +40212,7 @@
40116
40212
  ]),
40117
40213
  key: "5"
40118
40214
  } : void 0
40119
- ]), 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"]);
40215
+ ]), 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"]);
40120
40216
  }),
40121
40217
  128
40122
40218
  /* KEYED_FRAGMENT */
@@ -40482,6 +40578,7 @@
40482
40578
  senderShadow: { type: Boolean, required: false, default: true },
40483
40579
  suggestions: { type: Array, required: false, default: () => [] },
40484
40580
  suggestionsWrap: { type: Boolean, required: false, default: true },
40581
+ followupStyle: { type: String, required: false, default: "list" },
40485
40582
  features: { type: Object, required: false, default: () => ({}) },
40486
40583
  allowAttachments: { type: Boolean, required: false, default: false },
40487
40584
  accept: { type: String, required: false, default: "" },
@@ -40850,6 +40947,7 @@
40850
40947
  name: __props.title,
40851
40948
  suggestions: __props.suggestions,
40852
40949
  "suggestions-wrap": __props.suggestionsWrap,
40950
+ "followup-style": __props.followupStyle,
40853
40951
  "show-scroll-button": __props.showScrollButton,
40854
40952
  "scroll-button-threshold": __props.scrollButtonThreshold,
40855
40953
  "scroll-threshold": __props.scrollThreshold,
@@ -40976,7 +41074,7 @@
40976
41074
  ]),
40977
41075
  key: "12"
40978
41076
  } : void 0
40979
- ]), 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"]),
41077
+ ]), 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"]),
40980
41078
  artifactsOn.value && artifacts.value.length ? (vue.openBlock(), vue.createBlock(_sfc_main$1, {
40981
41079
  key: 0,
40982
41080
  artifacts: artifacts.value,