@fv-ui/ai-chat 1.9.4 → 1.10.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/README.md +23 -4
- package/dist/index.d.ts +197 -110
- package/dist/style.css +1 -1
- package/es/index.mjs +266 -68
- package/lib/index.js +266 -68
- package/package.json +1 -1
package/es/index.mjs
CHANGED
|
@@ -33234,7 +33234,9 @@ const zhCN = {
|
|
|
33234
33234
|
welcome: {
|
|
33235
33235
|
greetingPrefix: "\u4F60\u597D\uFF0C\u6211\u662F ",
|
|
33236
33236
|
greetingName: "Gizmo",
|
|
33237
|
-
description: "\u6211\u53EF\u4EE5\u5E2E\u4F60\u67E5\u8BE2\u6570\u636E\u3001\u5206\u6790\u95EE\u9898\u3001\u751F\u6210\u62A5\u8868\u3001\u4EE5\u53CA\u6267\u884C\u7CFB\u7EDF\u64CD\u4F5C\uFF0C\u8BA9\u751F\u4EA7\u7BA1\u7406\u66F4\u9AD8\u6548\u3002"
|
|
33237
|
+
description: "\u6211\u53EF\u4EE5\u5E2E\u4F60\u67E5\u8BE2\u6570\u636E\u3001\u5206\u6790\u95EE\u9898\u3001\u751F\u6210\u62A5\u8868\u3001\u4EE5\u53CA\u6267\u884C\u7CFB\u7EDF\u64CD\u4F5C\uFF0C\u8BA9\u751F\u4EA7\u7BA1\u7406\u66F4\u9AD8\u6548\u3002",
|
|
33238
|
+
/** 空态建议区「换一批」按钮默认文案 */
|
|
33239
|
+
refreshSuggestions: "\u6362\u4E00\u6279"
|
|
33238
33240
|
},
|
|
33239
33241
|
sender: {
|
|
33240
33242
|
clear: "\u6E05\u7A7A",
|
|
@@ -33430,7 +33432,9 @@ const en = {
|
|
|
33430
33432
|
welcome: {
|
|
33431
33433
|
greetingPrefix: "Hello, I am ",
|
|
33432
33434
|
greetingName: "Gizmo",
|
|
33433
|
-
description: "I can help you query data, analyze problems, generate reports, and perform system operations to make production management more efficient."
|
|
33435
|
+
description: "I can help you query data, analyze problems, generate reports, and perform system operations to make production management more efficient.",
|
|
33436
|
+
/** 空态建议区「换一批」按钮默认文案 */
|
|
33437
|
+
refreshSuggestions: "Refresh suggestions"
|
|
33434
33438
|
},
|
|
33435
33439
|
sender: {
|
|
33436
33440
|
clear: "Clear",
|
|
@@ -33619,7 +33623,9 @@ const ko = {
|
|
|
33619
33623
|
welcome: {
|
|
33620
33624
|
greetingPrefix: "\uC548\uB155\uD558\uC138\uC694, \uC800\uB294 ",
|
|
33621
33625
|
greetingName: "Gizmo",
|
|
33622
|
-
description: "\uB370\uC774\uD130 \uC870\uD68C, \uBB38\uC81C \uBD84\uC11D, \uBCF4\uACE0\uC11C \uC0DD\uC131, \uC2DC\uC2A4\uD15C \uC791\uC5C5 \uC2E4\uD589\uC744 \uB3C4\uC640\uB4DC\uB824 \uC0DD\uC0B0 \uAD00\uB9AC\uB97C \uB354 \uD6A8\uC728\uC801\uC73C\uB85C \uB9CC\uB4E4\uC5B4\uC694."
|
|
33626
|
+
description: "\uB370\uC774\uD130 \uC870\uD68C, \uBB38\uC81C \uBD84\uC11D, \uBCF4\uACE0\uC11C \uC0DD\uC131, \uC2DC\uC2A4\uD15C \uC791\uC5C5 \uC2E4\uD589\uC744 \uB3C4\uC640\uB4DC\uB824 \uC0DD\uC0B0 \uAD00\uB9AC\uB97C \uB354 \uD6A8\uC728\uC801\uC73C\uB85C \uB9CC\uB4E4\uC5B4\uC694.",
|
|
33627
|
+
/** 空态建议区「换一批」按钮默认文案 */
|
|
33628
|
+
refreshSuggestions: "\uB2E4\uB978 \uCD94\uCC9C \uBCF4\uAE30"
|
|
33623
33629
|
},
|
|
33624
33630
|
sender: {
|
|
33625
33631
|
clear: "\uC9C0\uC6B0\uAE30",
|
|
@@ -33818,7 +33824,9 @@ const vi = {
|
|
|
33818
33824
|
welcome: {
|
|
33819
33825
|
greetingPrefix: "Xin ch\xE0o, t\xF4i l\xE0 ",
|
|
33820
33826
|
greetingName: "Gizmo",
|
|
33821
|
-
description: "T\xF4i c\xF3 th\u1EC3 gi\xFAp b\u1EA1n truy v\u1EA5n d\u1EEF li\u1EC7u, ph\xE2n t\xEDch v\u1EA5n \u0111\u1EC1, t\u1EA1o b\xE1o c\xE1o v\xE0 thao t\xE1c h\u1EC7 th\u1ED1ng, gi\xFAp vi\u1EC7c qu\u1EA3n l\xFD s\u1EA3n xu\u1EA5t hi\u1EC7u qu\u1EA3 h\u01A1n."
|
|
33827
|
+
description: "T\xF4i c\xF3 th\u1EC3 gi\xFAp b\u1EA1n truy v\u1EA5n d\u1EEF li\u1EC7u, ph\xE2n t\xEDch v\u1EA5n \u0111\u1EC1, t\u1EA1o b\xE1o c\xE1o v\xE0 thao t\xE1c h\u1EC7 th\u1ED1ng, gi\xFAp vi\u1EC7c qu\u1EA3n l\xFD s\u1EA3n xu\u1EA5t hi\u1EC7u qu\u1EA3 h\u01A1n.",
|
|
33828
|
+
/** 空态建议区「换一批」按钮默认文案 */
|
|
33829
|
+
refreshSuggestions: "\u0110\u1ED5i g\u1EE3i \xFD kh\xE1c"
|
|
33822
33830
|
},
|
|
33823
33831
|
sender: {
|
|
33824
33832
|
clear: "X\xF3a h\u1EBFt",
|
|
@@ -34017,7 +34025,9 @@ const zhHK = {
|
|
|
34017
34025
|
welcome: {
|
|
34018
34026
|
greetingPrefix: "\u4F60\u597D\uFF0C\u6211\u662F ",
|
|
34019
34027
|
greetingName: "Gizmo",
|
|
34020
|
-
description: "\u6211\u53EF\u4EE5\u5E6B\u4F60\u67E5\u8A62\u8CC7\u6599\u3001\u5206\u6790\u554F\u984C\u3001\u7522\u751F\u5831\u8868\uFF0C\u4EE5\u53CA\u57F7\u884C\u7CFB\u7D71\u64CD\u4F5C\uFF0C\u4EE4\u751F\u7522\u7BA1\u7406\u66F4\u6709\u6548\u7387\u3002"
|
|
34028
|
+
description: "\u6211\u53EF\u4EE5\u5E6B\u4F60\u67E5\u8A62\u8CC7\u6599\u3001\u5206\u6790\u554F\u984C\u3001\u7522\u751F\u5831\u8868\uFF0C\u4EE5\u53CA\u57F7\u884C\u7CFB\u7D71\u64CD\u4F5C\uFF0C\u4EE4\u751F\u7522\u7BA1\u7406\u66F4\u6709\u6548\u7387\u3002",
|
|
34029
|
+
/** 空态建议区「换一批」按钮默认文案 */
|
|
34030
|
+
refreshSuggestions: "\u63DB\u4E00\u6279"
|
|
34021
34031
|
},
|
|
34022
34032
|
sender: {
|
|
34023
34033
|
clear: "\u6E05\u7A7A",
|
|
@@ -34503,7 +34513,7 @@ const _hoisted_3$i = {
|
|
|
34503
34513
|
key: 0,
|
|
34504
34514
|
class: "fv-bubble-header"
|
|
34505
34515
|
};
|
|
34506
|
-
const _hoisted_4$
|
|
34516
|
+
const _hoisted_4$g = {
|
|
34507
34517
|
key: 0,
|
|
34508
34518
|
class: "fv-bubble-loading"
|
|
34509
34519
|
};
|
|
@@ -34604,7 +34614,7 @@ var _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
34604
34614
|
class: normalizeClass(["fv-bubble-content", { "no-padding": __props.noPadding, "no-style": __props.noStyle }])
|
|
34605
34615
|
},
|
|
34606
34616
|
[
|
|
34607
|
-
__props.loading ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
34617
|
+
__props.loading ? (openBlock(), createElementBlock("div", _hoisted_4$g, [
|
|
34608
34618
|
_ctx.$slots.loading ? renderSlot(_ctx.$slots, "loading", {}, void 0, void 0, 0) : (openBlock(), createElementBlock(
|
|
34609
34619
|
Fragment,
|
|
34610
34620
|
{ key: 1 },
|
|
@@ -35028,7 +35038,7 @@ const _hoisted_3$h = {
|
|
|
35028
35038
|
key: 0,
|
|
35029
35039
|
class: "fv-sender-body-top"
|
|
35030
35040
|
};
|
|
35031
|
-
const _hoisted_4$
|
|
35041
|
+
const _hoisted_4$f = { class: "fv-sender-row" };
|
|
35032
35042
|
const _hoisted_5$c = {
|
|
35033
35043
|
key: 0,
|
|
35034
35044
|
class: "fv-sender-prefix"
|
|
@@ -35038,7 +35048,7 @@ const _hoisted_6$b = {
|
|
|
35038
35048
|
"aria-hidden": "true"
|
|
35039
35049
|
};
|
|
35040
35050
|
const _hoisted_7$9 = { class: "fv-sender-recording-duration" };
|
|
35041
|
-
const _hoisted_8$
|
|
35051
|
+
const _hoisted_8$8 = ["value", "placeholder", "disabled", "readonly"];
|
|
35042
35052
|
const _hoisted_9$5 = {
|
|
35043
35053
|
key: 3,
|
|
35044
35054
|
class: "fv-sender-actions"
|
|
@@ -35427,7 +35437,7 @@ var _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
35427
35437
|
_ctx.$slots["body-top"] ? (openBlock(), createElementBlock("div", _hoisted_3$h, [
|
|
35428
35438
|
renderSlot(_ctx.$slots, "body-top")
|
|
35429
35439
|
])) : createCommentVNode("v-if", true),
|
|
35430
|
-
createElementVNode("div", _hoisted_4$
|
|
35440
|
+
createElementVNode("div", _hoisted_4$f, [
|
|
35431
35441
|
_ctx.$slots.prefix ? (openBlock(), createElementBlock("div", _hoisted_5$c, [
|
|
35432
35442
|
renderSlot(_ctx.$slots, "prefix")
|
|
35433
35443
|
])) : createCommentVNode("v-if", true),
|
|
@@ -35532,7 +35542,7 @@ var _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
35532
35542
|
onPaste,
|
|
35533
35543
|
onFocus: _cache[0] || (_cache[0] = ($event) => isFocused.value = true),
|
|
35534
35544
|
onBlur: onTextareaBlur
|
|
35535
|
-
}, null, 40, _hoisted_8$
|
|
35545
|
+
}, null, 40, _hoisted_8$8),
|
|
35536
35546
|
createVNode(unref(ElPopover), {
|
|
35537
35547
|
visible: triggerVisible.value && __props.triggerStrings.length > 0,
|
|
35538
35548
|
placement: __props.triggerPopoverPlacement,
|
|
@@ -35689,7 +35699,7 @@ const _hoisted_3$g = {
|
|
|
35689
35699
|
key: 1,
|
|
35690
35700
|
class: "fv-mention-loading"
|
|
35691
35701
|
};
|
|
35692
|
-
const _hoisted_4$
|
|
35702
|
+
const _hoisted_4$e = ["onMouseenter", "onClick"];
|
|
35693
35703
|
const _hoisted_5$b = { class: "fv-mention-avatar" };
|
|
35694
35704
|
const _hoisted_6$a = ["src", "alt"];
|
|
35695
35705
|
const _hoisted_7$8 = { class: "fv-mention-name" };
|
|
@@ -36095,7 +36105,7 @@ var _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
36095
36105
|
1
|
|
36096
36106
|
/* TEXT */
|
|
36097
36107
|
)
|
|
36098
|
-
], 42, _hoisted_4$
|
|
36108
|
+
], 42, _hoisted_4$e);
|
|
36099
36109
|
}),
|
|
36100
36110
|
128
|
|
36101
36111
|
/* KEYED_FRAGMENT */
|
|
@@ -36122,14 +36132,14 @@ const _hoisted_3$f = {
|
|
|
36122
36132
|
key: 0,
|
|
36123
36133
|
class: "fv-editor-prefix"
|
|
36124
36134
|
};
|
|
36125
|
-
const _hoisted_4$
|
|
36135
|
+
const _hoisted_4$d = { class: "fv-editor-input" };
|
|
36126
36136
|
const _hoisted_5$a = ["contenteditable", "data-placeholder"];
|
|
36127
36137
|
const _hoisted_6$9 = { class: "fv-editor-mention-panel" };
|
|
36128
36138
|
const _hoisted_7$7 = {
|
|
36129
36139
|
key: 0,
|
|
36130
36140
|
class: "fv-editor-mention-title"
|
|
36131
36141
|
};
|
|
36132
|
-
const _hoisted_8$
|
|
36142
|
+
const _hoisted_8$7 = {
|
|
36133
36143
|
key: 1,
|
|
36134
36144
|
class: "fv-editor-mention-loading"
|
|
36135
36145
|
};
|
|
@@ -36899,7 +36909,7 @@ var _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
36899
36909
|
_ctx.$slots.prefix ? (openBlock(), createElementBlock("div", _hoisted_3$f, [
|
|
36900
36910
|
renderSlot(_ctx.$slots, "prefix")
|
|
36901
36911
|
])) : createCommentVNode("v-if", true),
|
|
36902
|
-
createElementVNode("div", _hoisted_4$
|
|
36912
|
+
createElementVNode("div", _hoisted_4$d, [
|
|
36903
36913
|
createElementVNode("div", {
|
|
36904
36914
|
ref_key: "editorRef",
|
|
36905
36915
|
ref: editorRef,
|
|
@@ -36947,7 +36957,7 @@ var _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
36947
36957
|
)) : createCommentVNode("v-if", true),
|
|
36948
36958
|
asyncLoading.value ? (openBlock(), createElementBlock(
|
|
36949
36959
|
"div",
|
|
36950
|
-
_hoisted_8$
|
|
36960
|
+
_hoisted_8$7,
|
|
36951
36961
|
toDisplayString(unref(dict).editorSender.loading),
|
|
36952
36962
|
1
|
|
36953
36963
|
/* TEXT */
|
|
@@ -37180,7 +37190,7 @@ const _hoisted_2$e = {
|
|
|
37180
37190
|
class: "fv-thinking-dot"
|
|
37181
37191
|
};
|
|
37182
37192
|
const _hoisted_3$e = { class: "fv-thinking-label" };
|
|
37183
|
-
const _hoisted_4$
|
|
37193
|
+
const _hoisted_4$c = ["hidden"];
|
|
37184
37194
|
var _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
37185
37195
|
...{ name: "FvThinking" },
|
|
37186
37196
|
__name: "index",
|
|
@@ -37335,7 +37345,7 @@ var _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
37335
37345
|
/* TEXT */
|
|
37336
37346
|
)
|
|
37337
37347
|
], void 0, 1)
|
|
37338
|
-
], 12, _hoisted_4$
|
|
37348
|
+
], 12, _hoisted_4$c)) : createCommentVNode("v-if", true)
|
|
37339
37349
|
],
|
|
37340
37350
|
6
|
|
37341
37351
|
/* CLASS, STYLE */
|
|
@@ -37350,7 +37360,7 @@ const _hoisted_2$d = {
|
|
|
37350
37360
|
class: "fv-chain-dot"
|
|
37351
37361
|
};
|
|
37352
37362
|
const _hoisted_3$d = { class: "fv-chain-main" };
|
|
37353
|
-
const _hoisted_4$
|
|
37363
|
+
const _hoisted_4$b = ["aria-label", "onClick"];
|
|
37354
37364
|
const _hoisted_5$9 = { class: "fv-chain-head-title" };
|
|
37355
37365
|
const _hoisted_6$8 = {
|
|
37356
37366
|
key: 0,
|
|
@@ -37360,7 +37370,7 @@ const _hoisted_7$6 = {
|
|
|
37360
37370
|
key: 0,
|
|
37361
37371
|
class: "fv-chain-body"
|
|
37362
37372
|
};
|
|
37363
|
-
const _hoisted_8$
|
|
37373
|
+
const _hoisted_8$6 = {
|
|
37364
37374
|
key: 0,
|
|
37365
37375
|
class: "scroll-edge-fade-top",
|
|
37366
37376
|
"aria-hidden": "true"
|
|
@@ -37829,9 +37839,9 @@ var _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
37829
37839
|
1024
|
|
37830
37840
|
/* DYNAMIC_SLOTS */
|
|
37831
37841
|
)
|
|
37832
|
-
], 10, _hoisted_4$
|
|
37842
|
+
], 10, _hoisted_4$b),
|
|
37833
37843
|
isTextExpanded(item.key) ? (openBlock(), createElementBlock("div", _hoisted_7$6, [
|
|
37834
|
-
edgeFade(item.key).top ? (openBlock(), createElementBlock("span", _hoisted_8$
|
|
37844
|
+
edgeFade(item.key).top ? (openBlock(), createElementBlock("span", _hoisted_8$6)) : createCommentVNode("v-if", true),
|
|
37835
37845
|
edgeFade(item.key).bottom ? (openBlock(), createElementBlock("span", _hoisted_9$3)) : createCommentVNode("v-if", true),
|
|
37836
37846
|
createVNode(unref(ElScrollbar), {
|
|
37837
37847
|
ref_for: true,
|
|
@@ -37952,11 +37962,11 @@ var welcomeGif = new URL('assets/fvai-welcome-m4yx7X4O.gif', import.meta.url).hr
|
|
|
37952
37962
|
const _hoisted_1$e = { class: "fv-welcome-icon" };
|
|
37953
37963
|
const _hoisted_2$c = ["src"];
|
|
37954
37964
|
const _hoisted_3$c = { class: "fv-welcome-main" };
|
|
37955
|
-
const _hoisted_4$
|
|
37965
|
+
const _hoisted_4$a = { class: "fv-welcome-text" };
|
|
37956
37966
|
const _hoisted_5$8 = { class: "fv-welcome-name" };
|
|
37957
37967
|
const _hoisted_6$7 = { class: "fv-welcome-name-accent" };
|
|
37958
37968
|
const _hoisted_7$5 = { class: "fv-welcome-description" };
|
|
37959
|
-
const _hoisted_8$
|
|
37969
|
+
const _hoisted_8$5 = {
|
|
37960
37970
|
key: 0,
|
|
37961
37971
|
class: "fv-welcome-suggestions"
|
|
37962
37972
|
};
|
|
@@ -38007,7 +38017,7 @@ var _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
38007
38017
|
])
|
|
38008
38018
|
]),
|
|
38009
38019
|
createElementVNode("div", _hoisted_3$c, [
|
|
38010
|
-
createElementVNode("div", _hoisted_4$
|
|
38020
|
+
createElementVNode("div", _hoisted_4$a, [
|
|
38011
38021
|
createElementVNode("h2", _hoisted_5$8, [
|
|
38012
38022
|
renderSlot(_ctx.$slots, "name", {}, () => [
|
|
38013
38023
|
__props.name ? (openBlock(), createElementBlock(
|
|
@@ -38054,7 +38064,7 @@ var _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
38054
38064
|
])
|
|
38055
38065
|
])
|
|
38056
38066
|
]),
|
|
38057
|
-
_ctx.$slots.suggestions ? (openBlock(), createElementBlock("div", _hoisted_8$
|
|
38067
|
+
_ctx.$slots.suggestions ? (openBlock(), createElementBlock("div", _hoisted_8$5, [
|
|
38058
38068
|
renderSlot(_ctx.$slots, "suggestions")
|
|
38059
38069
|
])) : createCommentVNode("v-if", true)
|
|
38060
38070
|
])
|
|
@@ -38072,7 +38082,7 @@ const _hoisted_2$b = {
|
|
|
38072
38082
|
class: "fv-prompts-title"
|
|
38073
38083
|
};
|
|
38074
38084
|
const _hoisted_3$b = ["role", "tabindex", "onClick"];
|
|
38075
|
-
const _hoisted_4$
|
|
38085
|
+
const _hoisted_4$9 = { class: "fv-prompt-item-main" };
|
|
38076
38086
|
const _hoisted_5$7 = { class: "fv-prompt-item-text" };
|
|
38077
38087
|
const _hoisted_6$6 = {
|
|
38078
38088
|
key: 0,
|
|
@@ -38082,6 +38092,10 @@ const _hoisted_7$4 = {
|
|
|
38082
38092
|
key: 1,
|
|
38083
38093
|
class: "fv-prompt-item-description"
|
|
38084
38094
|
};
|
|
38095
|
+
const _hoisted_8$4 = {
|
|
38096
|
+
key: 0,
|
|
38097
|
+
class: "fv-prompts-footer"
|
|
38098
|
+
};
|
|
38085
38099
|
var _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
38086
38100
|
...{ name: "FvPrompts" },
|
|
38087
38101
|
__name: "index",
|
|
@@ -38135,7 +38149,7 @@ var _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
38135
38149
|
item,
|
|
38136
38150
|
index
|
|
38137
38151
|
}, () => [
|
|
38138
|
-
createElementVNode("div", _hoisted_4$
|
|
38152
|
+
createElementVNode("div", _hoisted_4$9, [
|
|
38139
38153
|
resolvedIcons.value[index] ? (openBlock(), createBlock(
|
|
38140
38154
|
unref(ElIcon),
|
|
38141
38155
|
{
|
|
@@ -38174,7 +38188,10 @@ var _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
38174
38188
|
}),
|
|
38175
38189
|
128
|
|
38176
38190
|
/* KEYED_FRAGMENT */
|
|
38177
|
-
))
|
|
38191
|
+
)),
|
|
38192
|
+
_ctx.$slots.footer ? (openBlock(), createElementBlock("div", _hoisted_8$4, [
|
|
38193
|
+
renderSlot(_ctx.$slots, "footer")
|
|
38194
|
+
])) : createCommentVNode("v-if", true)
|
|
38178
38195
|
],
|
|
38179
38196
|
2
|
|
38180
38197
|
/* CLASS */
|
|
@@ -38283,7 +38300,7 @@ var _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
38283
38300
|
const _hoisted_1$b = ["src", "alt"];
|
|
38284
38301
|
const _hoisted_2$a = { class: "fv-files-card-info" };
|
|
38285
38302
|
const _hoisted_3$a = ["title"];
|
|
38286
|
-
const _hoisted_4$
|
|
38303
|
+
const _hoisted_4$8 = ["title"];
|
|
38287
38304
|
const _hoisted_5$6 = {
|
|
38288
38305
|
key: 1,
|
|
38289
38306
|
class: "fv-files-card-size"
|
|
@@ -38435,7 +38452,7 @@ var _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
38435
38452
|
key: 0,
|
|
38436
38453
|
class: "fv-files-card-error",
|
|
38437
38454
|
title: __props.errorText
|
|
38438
|
-
}, toDisplayString(__props.errorText), 9, _hoisted_4$
|
|
38455
|
+
}, toDisplayString(__props.errorText), 9, _hoisted_4$8)) : __props.status === "loading" ? (openBlock(), createElementBlock(
|
|
38439
38456
|
"div",
|
|
38440
38457
|
_hoisted_5$6,
|
|
38441
38458
|
toDisplayString(unref(dict).attachments.uploading),
|
|
@@ -38499,7 +38516,7 @@ var _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
38499
38516
|
const _hoisted_1$a = { class: "fv-attachments" };
|
|
38500
38517
|
const _hoisted_2$9 = ["accept"];
|
|
38501
38518
|
const _hoisted_3$9 = ["disabled", "aria-label"];
|
|
38502
|
-
const _hoisted_4$
|
|
38519
|
+
const _hoisted_4$7 = {
|
|
38503
38520
|
key: 1,
|
|
38504
38521
|
class: "fv-attachments-list"
|
|
38505
38522
|
};
|
|
@@ -38687,7 +38704,7 @@ var _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
38687
38704
|
/* STABLE */
|
|
38688
38705
|
})
|
|
38689
38706
|
], 10, _hoisted_3$9)) : createCommentVNode("v-if", true),
|
|
38690
|
-
list.value.length && __props.layout !== "triggerOnly" ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
38707
|
+
list.value.length && __props.layout !== "triggerOnly" ? (openBlock(), createElementBlock("div", _hoisted_4$7, [
|
|
38691
38708
|
(openBlock(true), createElementBlock(
|
|
38692
38709
|
Fragment,
|
|
38693
38710
|
null,
|
|
@@ -38763,7 +38780,7 @@ const _hoisted_1$9 = {
|
|
|
38763
38780
|
};
|
|
38764
38781
|
const _hoisted_2$8 = ["onClick"];
|
|
38765
38782
|
const _hoisted_3$8 = { class: "fv-conversations-item-content" };
|
|
38766
|
-
const _hoisted_4$
|
|
38783
|
+
const _hoisted_4$6 = ["title"];
|
|
38767
38784
|
const _hoisted_5$4 = ["aria-label"];
|
|
38768
38785
|
var _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
38769
38786
|
...{ name: "FvConversations" },
|
|
@@ -38907,7 +38924,7 @@ var _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
38907
38924
|
createElementVNode("span", {
|
|
38908
38925
|
class: "fv-conversations-item-label",
|
|
38909
38926
|
title: item.label
|
|
38910
|
-
}, toDisplayString(item.label), 9, _hoisted_4$
|
|
38927
|
+
}, toDisplayString(item.label), 9, _hoisted_4$6)
|
|
38911
38928
|
])
|
|
38912
38929
|
]),
|
|
38913
38930
|
!item.disabled ? (openBlock(), createBlock(unref(ElDropdown), {
|
|
@@ -38995,7 +39012,7 @@ var _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
38995
39012
|
const _hoisted_1$8 = { viewBox: "0 0 1200 1200" };
|
|
38996
39013
|
const _hoisted_2$7 = ["id"];
|
|
38997
39014
|
const _hoisted_3$7 = ["stop-color"];
|
|
38998
|
-
const _hoisted_4$
|
|
39015
|
+
const _hoisted_4$5 = ["stop-color", "stop-opacity"];
|
|
38999
39016
|
const _hoisted_5$3 = ["stop-color"];
|
|
39000
39017
|
const _hoisted_6$3 = ["d"];
|
|
39001
39018
|
var _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
@@ -39111,7 +39128,7 @@ var _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
39111
39128
|
offset: "50%",
|
|
39112
39129
|
"stop-color": highlightGradient.value.color,
|
|
39113
39130
|
"stop-opacity": highlightGradient.value.midOpacity
|
|
39114
|
-
}, null, 8, _hoisted_4$
|
|
39131
|
+
}, null, 8, _hoisted_4$5),
|
|
39115
39132
|
createElementVNode("stop", {
|
|
39116
39133
|
offset: "100%",
|
|
39117
39134
|
"stop-color": highlightGradient.value.color,
|
|
@@ -39763,7 +39780,7 @@ var idleAssistantGif = new URL('assets/fvai-idle-BhBsbPV4.gif', import.meta.url)
|
|
|
39763
39780
|
const _hoisted_1$7 = ["data-message-id"];
|
|
39764
39781
|
const _hoisted_2$6 = ["src"];
|
|
39765
39782
|
const _hoisted_3$6 = ["src"];
|
|
39766
|
-
const _hoisted_4$
|
|
39783
|
+
const _hoisted_4$4 = { class: "fv-msg-main" };
|
|
39767
39784
|
const _hoisted_5$2 = {
|
|
39768
39785
|
key: 0,
|
|
39769
39786
|
class: "fv-msg-header"
|
|
@@ -40293,7 +40310,7 @@ var _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
40293
40310
|
4
|
|
40294
40311
|
/* STYLE */
|
|
40295
40312
|
)) : createCommentVNode("v-if", true),
|
|
40296
|
-
createElementVNode("div", _hoisted_4$
|
|
40313
|
+
createElementVNode("div", _hoisted_4$4, [
|
|
40297
40314
|
showHeader.value ? (openBlock(), createElementBlock("div", _hoisted_5$2, [
|
|
40298
40315
|
isUser.value ? renderSlot(_ctx.$slots, "user-name", { message: __props.message }, () => [
|
|
40299
40316
|
createTextVNode(
|
|
@@ -40743,7 +40760,11 @@ const _hoisted_2$5 = {
|
|
|
40743
40760
|
key: 0,
|
|
40744
40761
|
class: "fv-messages-empty"
|
|
40745
40762
|
};
|
|
40746
|
-
const _hoisted_3$5 = {
|
|
40763
|
+
const _hoisted_3$5 = {
|
|
40764
|
+
key: 1,
|
|
40765
|
+
class: "fv-welcome-suggestions-footer"
|
|
40766
|
+
};
|
|
40767
|
+
const _hoisted_4$3 = { class: "fv-messages-inner" };
|
|
40747
40768
|
var _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
40748
40769
|
...{ name: "FvAiMessages" },
|
|
40749
40770
|
__name: "index",
|
|
@@ -40757,6 +40778,8 @@ var _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
40757
40778
|
suggestionsTitle: { type: String, required: false, default: "" },
|
|
40758
40779
|
suggestionsWrap: { type: Boolean, required: false, default: true },
|
|
40759
40780
|
welcomeLayout: { type: String, required: false, default: "horizontal" },
|
|
40781
|
+
showRefreshSuggestions: { type: Boolean, required: false, default: false },
|
|
40782
|
+
refreshSuggestionsText: { type: String, required: false, default: "" },
|
|
40760
40783
|
scrollThreshold: { type: Number, required: false, default: 100 },
|
|
40761
40784
|
showScrollButton: { type: Boolean, required: false, default: true },
|
|
40762
40785
|
scrollButtonThreshold: { type: Number, required: false, default: 100 },
|
|
@@ -40785,7 +40808,7 @@ var _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
40785
40808
|
feedbackHandler: { type: Function, required: false, default: void 0 },
|
|
40786
40809
|
locale: { type: null, required: false }
|
|
40787
40810
|
},
|
|
40788
|
-
emits: ["select", "copy", "regenerate", "branch-change", "scroll", "followup-select", "message-file-click", "feedback-change", "feedback-error"],
|
|
40811
|
+
emits: ["select", "copy", "regenerate", "branch-change", "scroll", "followup-select", "message-file-click", "feedback-change", "feedback-error", "refresh-suggestions"],
|
|
40789
40812
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
40790
40813
|
const props = __props;
|
|
40791
40814
|
const dict = useLocaleDict(() => props.locale);
|
|
@@ -40794,6 +40817,10 @@ var _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
40794
40817
|
followIfPinned();
|
|
40795
40818
|
}
|
|
40796
40819
|
const isEmpty = computed(() => props.messages.length === 0);
|
|
40820
|
+
const slots = useSlots();
|
|
40821
|
+
const hasRefreshFooter = computed(
|
|
40822
|
+
() => props.showRefreshSuggestions || !!slots["refresh-suggestions"] || !!slots["suggestions-footer"]
|
|
40823
|
+
);
|
|
40797
40824
|
const scrollRef = ref(null);
|
|
40798
40825
|
function distanceFromBottom() {
|
|
40799
40826
|
const el = scrollRef.value;
|
|
@@ -40968,7 +40995,69 @@ var _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
40968
40995
|
title: __props.suggestionsTitle,
|
|
40969
40996
|
wrap: __props.suggestionsWrap,
|
|
40970
40997
|
onSelect
|
|
40971
|
-
},
|
|
40998
|
+
}, createSlots({
|
|
40999
|
+
_: 2
|
|
41000
|
+
/* DYNAMIC */
|
|
41001
|
+
}, [
|
|
41002
|
+
hasRefreshFooter.value && __props.welcomeLayout === "horizontal" ? {
|
|
41003
|
+
name: "footer",
|
|
41004
|
+
fn: withCtx(() => [
|
|
41005
|
+
_ctx.$slots["refresh-suggestions"] ? renderSlot(_ctx.$slots, "refresh-suggestions", {}, void 0, void 0, 0) : __props.showRefreshSuggestions ? (openBlock(), createBlock(unref(ElButton), {
|
|
41006
|
+
key: 1,
|
|
41007
|
+
class: "fv-welcome-refresh",
|
|
41008
|
+
text: "",
|
|
41009
|
+
size: "small",
|
|
41010
|
+
onClick: _cache[0] || (_cache[0] = ($event) => emit("refresh-suggestions"))
|
|
41011
|
+
}, {
|
|
41012
|
+
default: withCtx(() => [
|
|
41013
|
+
createVNode(unref(ElIcon), { class: "fv-welcome-refresh-icon" }, {
|
|
41014
|
+
default: withCtx(() => [
|
|
41015
|
+
createVNode(unref(RefreshRight))
|
|
41016
|
+
]),
|
|
41017
|
+
_: 1
|
|
41018
|
+
/* STABLE */
|
|
41019
|
+
}),
|
|
41020
|
+
createTextVNode(
|
|
41021
|
+
" " + toDisplayString(__props.refreshSuggestionsText || unref(dict).welcome.refreshSuggestions),
|
|
41022
|
+
1
|
|
41023
|
+
/* TEXT */
|
|
41024
|
+
)
|
|
41025
|
+
]),
|
|
41026
|
+
_: 1
|
|
41027
|
+
/* STABLE */
|
|
41028
|
+
})) : createCommentVNode("v-if", true),
|
|
41029
|
+
_ctx.$slots["suggestions-footer"] ? renderSlot(_ctx.$slots, "suggestions-footer", {}, void 0, void 0, 2) : createCommentVNode("v-if", true)
|
|
41030
|
+
]),
|
|
41031
|
+
key: "0"
|
|
41032
|
+
} : void 0
|
|
41033
|
+
]), 1032, ["prompts", "title", "wrap"])) : createCommentVNode("v-if", true),
|
|
41034
|
+
hasRefreshFooter.value && __props.welcomeLayout === "vertical" ? (openBlock(), createElementBlock("div", _hoisted_3$5, [
|
|
41035
|
+
_ctx.$slots["refresh-suggestions"] ? renderSlot(_ctx.$slots, "refresh-suggestions", {}, void 0, void 0, 0) : __props.showRefreshSuggestions ? (openBlock(), createBlock(unref(ElButton), {
|
|
41036
|
+
key: 1,
|
|
41037
|
+
class: "fv-welcome-refresh",
|
|
41038
|
+
text: "",
|
|
41039
|
+
size: "small",
|
|
41040
|
+
onClick: _cache[1] || (_cache[1] = ($event) => emit("refresh-suggestions"))
|
|
41041
|
+
}, {
|
|
41042
|
+
default: withCtx(() => [
|
|
41043
|
+
createVNode(unref(ElIcon), { class: "fv-welcome-refresh-icon" }, {
|
|
41044
|
+
default: withCtx(() => [
|
|
41045
|
+
createVNode(unref(RefreshRight))
|
|
41046
|
+
]),
|
|
41047
|
+
_: 1
|
|
41048
|
+
/* STABLE */
|
|
41049
|
+
}),
|
|
41050
|
+
createTextVNode(
|
|
41051
|
+
" " + toDisplayString(__props.refreshSuggestionsText || unref(dict).welcome.refreshSuggestions),
|
|
41052
|
+
1
|
|
41053
|
+
/* TEXT */
|
|
41054
|
+
)
|
|
41055
|
+
]),
|
|
41056
|
+
_: 1
|
|
41057
|
+
/* STABLE */
|
|
41058
|
+
})) : createCommentVNode("v-if", true),
|
|
41059
|
+
_ctx.$slots["suggestions-footer"] ? renderSlot(_ctx.$slots, "suggestions-footer", {}, void 0, void 0, 2) : createCommentVNode("v-if", true)
|
|
41060
|
+
])) : createCommentVNode("v-if", true)
|
|
40972
41061
|
])
|
|
40973
41062
|
]),
|
|
40974
41063
|
_: 2
|
|
@@ -41007,7 +41096,7 @@ var _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
41007
41096
|
onScrollPassive: onScroll
|
|
41008
41097
|
},
|
|
41009
41098
|
[
|
|
41010
|
-
createElementVNode("div",
|
|
41099
|
+
createElementVNode("div", _hoisted_4$3, [
|
|
41011
41100
|
(openBlock(true), createElementBlock(
|
|
41012
41101
|
Fragment,
|
|
41013
41102
|
null,
|
|
@@ -41112,7 +41201,7 @@ var _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
41112
41201
|
class: "fv-messages-back",
|
|
41113
41202
|
circle: "",
|
|
41114
41203
|
"aria-label": unref(dict).scroll.toBottom,
|
|
41115
|
-
onClick: _cache[
|
|
41204
|
+
onClick: _cache[2] || (_cache[2] = ($event) => scrollToBottom())
|
|
41116
41205
|
}, {
|
|
41117
41206
|
default: withCtx(() => [
|
|
41118
41207
|
createVNode(unref(ElIcon), { class: "fv-messages-back-icon" }, {
|
|
@@ -41456,6 +41545,8 @@ var _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
41456
41545
|
suggestions: { type: Array, required: false, default: () => [] },
|
|
41457
41546
|
suggestionsWrap: { type: Boolean, required: false, default: true },
|
|
41458
41547
|
welcomeLayout: { type: String, required: false, default: "horizontal" },
|
|
41548
|
+
showRefreshSuggestions: { type: Boolean, required: false, default: false },
|
|
41549
|
+
refreshSuggestionsText: { type: String, required: false, default: "" },
|
|
41459
41550
|
followupStyle: { type: String, required: false, default: "list" },
|
|
41460
41551
|
features: { type: Object, required: false, default: () => ({}) },
|
|
41461
41552
|
allowAttachments: { type: Boolean, required: false, default: false },
|
|
@@ -41467,7 +41558,7 @@ var _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
41467
41558
|
theme: { type: String, required: false, default: "light" },
|
|
41468
41559
|
locale: { type: null, required: false }
|
|
41469
41560
|
},
|
|
41470
|
-
emits: ["update:messages", "send", "copy", "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"],
|
|
41561
|
+
emits: ["update:messages", "send", "copy", "suggestion-select", "followup-select", "message-complete", "error", "branch-change", "attachment-exceed", "attachment-reject", "attachment-uploaded", "message-file-click", "feedback-change", "feedback-error", "scroll", "refresh-suggestions", "tool-event"],
|
|
41471
41562
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
41472
41563
|
const props = __props;
|
|
41473
41564
|
const dict = useLocaleDict(() => props.locale);
|
|
@@ -41858,6 +41949,8 @@ var _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
41858
41949
|
suggestions: __props.suggestions,
|
|
41859
41950
|
"suggestions-wrap": __props.suggestionsWrap,
|
|
41860
41951
|
"welcome-layout": __props.welcomeLayout,
|
|
41952
|
+
"show-refresh-suggestions": __props.showRefreshSuggestions,
|
|
41953
|
+
"refresh-suggestions-text": __props.refreshSuggestionsText,
|
|
41861
41954
|
"followup-style": __props.followupStyle,
|
|
41862
41955
|
"show-scroll-button": __props.showScrollButton,
|
|
41863
41956
|
"scroll-button-threshold": __props.scrollButtonThreshold,
|
|
@@ -41884,6 +41977,7 @@ var _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
41884
41977
|
"feedback-handler": __props.feedbackHandler,
|
|
41885
41978
|
onSelect: onSelectSuggestion,
|
|
41886
41979
|
onFollowupSelect,
|
|
41980
|
+
onRefreshSuggestions: _cache[1] || (_cache[1] = ($event) => emit("refresh-suggestions")),
|
|
41887
41981
|
onCopy,
|
|
41888
41982
|
onRegenerate,
|
|
41889
41983
|
onBranchChange,
|
|
@@ -41972,21 +42066,35 @@ var _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
41972
42066
|
]),
|
|
41973
42067
|
key: "10"
|
|
41974
42068
|
} : void 0,
|
|
42069
|
+
_ctx.$slots["refresh-suggestions"] ? {
|
|
42070
|
+
name: "refresh-suggestions",
|
|
42071
|
+
fn: withCtx(() => [
|
|
42072
|
+
renderSlot(_ctx.$slots, "refresh-suggestions")
|
|
42073
|
+
]),
|
|
42074
|
+
key: "11"
|
|
42075
|
+
} : void 0,
|
|
42076
|
+
_ctx.$slots["suggestions-footer"] ? {
|
|
42077
|
+
name: "suggestions-footer",
|
|
42078
|
+
fn: withCtx(() => [
|
|
42079
|
+
renderSlot(_ctx.$slots, "suggestions-footer")
|
|
42080
|
+
]),
|
|
42081
|
+
key: "12"
|
|
42082
|
+
} : void 0,
|
|
41975
42083
|
_ctx.$slots["scroll-button"] ? {
|
|
41976
42084
|
name: "scroll-button",
|
|
41977
42085
|
fn: withCtx((scope) => [
|
|
41978
42086
|
renderSlot(_ctx.$slots, "scroll-button", normalizeProps(guardReactiveProps(scope)))
|
|
41979
42087
|
]),
|
|
41980
|
-
key: "
|
|
42088
|
+
key: "13"
|
|
41981
42089
|
} : void 0,
|
|
41982
42090
|
_ctx.$slots["scroll-button-icon"] ? {
|
|
41983
42091
|
name: "scroll-button-icon",
|
|
41984
42092
|
fn: withCtx(() => [
|
|
41985
42093
|
renderSlot(_ctx.$slots, "scroll-button-icon")
|
|
41986
42094
|
]),
|
|
41987
|
-
key: "
|
|
42095
|
+
key: "14"
|
|
41988
42096
|
} : void 0
|
|
41989
|
-
]), 1032, ["messages", "nodes", "name", "suggestions", "suggestions-wrap", "welcome-layout", "followup-style", "show-scroll-button", "scroll-button-threshold", "scroll-threshold", "copy-to-clipboard", "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"]),
|
|
42097
|
+
]), 1032, ["messages", "nodes", "name", "suggestions", "suggestions-wrap", "welcome-layout", "show-refresh-suggestions", "refresh-suggestions-text", "followup-style", "show-scroll-button", "scroll-button-threshold", "scroll-threshold", "copy-to-clipboard", "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"]),
|
|
41990
42098
|
artifactsOn.value && artifacts.value.length ? (openBlock(), createBlock(_sfc_main$5, {
|
|
41991
42099
|
key: 0,
|
|
41992
42100
|
artifacts: artifacts.value,
|
|
@@ -42018,7 +42126,7 @@ var _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
42018
42126
|
fn: withCtx(() => [
|
|
42019
42127
|
createVNode(_sfc_main$a, {
|
|
42020
42128
|
modelValue: pendingFiles.value,
|
|
42021
|
-
"onUpdate:modelValue": _cache[
|
|
42129
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => pendingFiles.value = $event),
|
|
42022
42130
|
layout: "listOnly",
|
|
42023
42131
|
accept: __props.accept,
|
|
42024
42132
|
count: __props.attachmentLimit,
|
|
@@ -42036,7 +42144,7 @@ var _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
42036
42144
|
fn: withCtx(() => [
|
|
42037
42145
|
createVNode(_sfc_main$a, {
|
|
42038
42146
|
modelValue: pendingFiles.value,
|
|
42039
|
-
"onUpdate:modelValue": _cache[
|
|
42147
|
+
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => pendingFiles.value = $event),
|
|
42040
42148
|
layout: "triggerOnly",
|
|
42041
42149
|
accept: __props.accept,
|
|
42042
42150
|
count: __props.attachmentLimit,
|
|
@@ -42891,6 +42999,8 @@ var _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
42891
42999
|
suggestions: { type: Array, required: false, default: () => [] },
|
|
42892
43000
|
suggestionsTitle: { type: String, required: false, default: "" },
|
|
42893
43001
|
suggestionsWrap: { type: Boolean, required: false, default: true },
|
|
43002
|
+
showRefreshSuggestions: { type: Boolean, required: false, default: false },
|
|
43003
|
+
refreshSuggestionsText: { type: String, required: false, default: "" },
|
|
42894
43004
|
typing: { type: [Boolean, Object], required: false, default: true },
|
|
42895
43005
|
collapsible: { type: Boolean, required: false, default: true },
|
|
42896
43006
|
showTime: { type: Boolean, required: false, default: true },
|
|
@@ -42909,7 +43019,7 @@ var _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
42909
43019
|
detailLimit: { type: Number, required: false, default: 100 },
|
|
42910
43020
|
historyLimit: { type: Number, required: false, default: 50 }
|
|
42911
43021
|
},
|
|
42912
|
-
emits: ["session-created", "round-complete", "error", "message-complete", "attachment-exceed", "attachment-uploaded", "message-file-click", "feedback-change", "feedback-error"],
|
|
43022
|
+
emits: ["session-created", "round-complete", "error", "message-complete", "attachment-exceed", "attachment-uploaded", "message-file-click", "feedback-change", "feedback-error", "refresh-suggestions"],
|
|
42913
43023
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
42914
43024
|
const props = __props;
|
|
42915
43025
|
const emit = __emit;
|
|
@@ -43166,6 +43276,8 @@ var _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
43166
43276
|
suggestions: __props.suggestions,
|
|
43167
43277
|
"suggestions-title": __props.suggestionsTitle,
|
|
43168
43278
|
"suggestions-wrap": __props.suggestionsWrap,
|
|
43279
|
+
"show-refresh-suggestions": __props.showRefreshSuggestions,
|
|
43280
|
+
"refresh-suggestions-text": __props.refreshSuggestionsText,
|
|
43169
43281
|
typing: __props.typing,
|
|
43170
43282
|
collapsible: __props.collapsible,
|
|
43171
43283
|
"show-time": __props.showTime,
|
|
@@ -43181,7 +43293,8 @@ var _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
43181
43293
|
onAttachmentUploaded,
|
|
43182
43294
|
onMessageFileClick,
|
|
43183
43295
|
onFeedbackChange,
|
|
43184
|
-
onFeedbackError
|
|
43296
|
+
onFeedbackError,
|
|
43297
|
+
onRefreshSuggestions: _cache[0] || (_cache[0] = ($event) => emit("refresh-suggestions"))
|
|
43185
43298
|
}, createSlots({
|
|
43186
43299
|
_: 2
|
|
43187
43300
|
/* DYNAMIC */
|
|
@@ -43221,56 +43334,70 @@ var _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
43221
43334
|
]),
|
|
43222
43335
|
key: "4"
|
|
43223
43336
|
} : void 0,
|
|
43337
|
+
_ctx.$slots["refresh-suggestions"] ? {
|
|
43338
|
+
name: "refresh-suggestions",
|
|
43339
|
+
fn: withCtx(() => [
|
|
43340
|
+
renderSlot(_ctx.$slots, "refresh-suggestions")
|
|
43341
|
+
]),
|
|
43342
|
+
key: "5"
|
|
43343
|
+
} : void 0,
|
|
43344
|
+
_ctx.$slots["suggestions-footer"] ? {
|
|
43345
|
+
name: "suggestions-footer",
|
|
43346
|
+
fn: withCtx(() => [
|
|
43347
|
+
renderSlot(_ctx.$slots, "suggestions-footer")
|
|
43348
|
+
]),
|
|
43349
|
+
key: "6"
|
|
43350
|
+
} : void 0,
|
|
43224
43351
|
_ctx.$slots["user-avatar"] ? {
|
|
43225
43352
|
name: "user-avatar",
|
|
43226
43353
|
fn: withCtx(() => [
|
|
43227
43354
|
renderSlot(_ctx.$slots, "user-avatar")
|
|
43228
43355
|
]),
|
|
43229
|
-
key: "
|
|
43356
|
+
key: "7"
|
|
43230
43357
|
} : void 0,
|
|
43231
43358
|
_ctx.$slots["assistant-avatar"] ? {
|
|
43232
43359
|
name: "assistant-avatar",
|
|
43233
43360
|
fn: withCtx((scope) => [
|
|
43234
43361
|
renderSlot(_ctx.$slots, "assistant-avatar", normalizeProps(guardReactiveProps(scope)))
|
|
43235
43362
|
]),
|
|
43236
|
-
key: "
|
|
43363
|
+
key: "8"
|
|
43237
43364
|
} : void 0,
|
|
43238
43365
|
_ctx.$slots["user-name"] ? {
|
|
43239
43366
|
name: "user-name",
|
|
43240
43367
|
fn: withCtx((scope) => [
|
|
43241
43368
|
renderSlot(_ctx.$slots, "user-name", normalizeProps(guardReactiveProps(scope)))
|
|
43242
43369
|
]),
|
|
43243
|
-
key: "
|
|
43370
|
+
key: "9"
|
|
43244
43371
|
} : void 0,
|
|
43245
43372
|
_ctx.$slots["assistant-name"] ? {
|
|
43246
43373
|
name: "assistant-name",
|
|
43247
43374
|
fn: withCtx((scope) => [
|
|
43248
43375
|
renderSlot(_ctx.$slots, "assistant-name", normalizeProps(guardReactiveProps(scope)))
|
|
43249
43376
|
]),
|
|
43250
|
-
key: "
|
|
43377
|
+
key: "10"
|
|
43251
43378
|
} : void 0,
|
|
43252
43379
|
_ctx.$slots["message-avatar"] ? {
|
|
43253
43380
|
name: "message-avatar",
|
|
43254
43381
|
fn: withCtx((scope) => [
|
|
43255
43382
|
renderSlot(_ctx.$slots, "message-avatar", normalizeProps(guardReactiveProps(scope)))
|
|
43256
43383
|
]),
|
|
43257
|
-
key: "
|
|
43384
|
+
key: "11"
|
|
43258
43385
|
} : void 0,
|
|
43259
43386
|
_ctx.$slots["message-actions"] ? {
|
|
43260
43387
|
name: "message-actions",
|
|
43261
43388
|
fn: withCtx((scope) => [
|
|
43262
43389
|
renderSlot(_ctx.$slots, "message-actions", normalizeProps(guardReactiveProps(scope)))
|
|
43263
43390
|
]),
|
|
43264
|
-
key: "
|
|
43391
|
+
key: "12"
|
|
43265
43392
|
} : void 0,
|
|
43266
43393
|
_ctx.$slots["sender-prefix"] ? {
|
|
43267
43394
|
name: "prefix",
|
|
43268
43395
|
fn: withCtx(() => [
|
|
43269
43396
|
renderSlot(_ctx.$slots, "sender-prefix")
|
|
43270
43397
|
]),
|
|
43271
|
-
key: "
|
|
43398
|
+
key: "13"
|
|
43272
43399
|
} : void 0
|
|
43273
|
-
]), 1032, ["messages", "placeholder", "theme", "welcome-layout", "center-welcome", "tool-step-label", "locale", "suggestions", "suggestions-title", "suggestions-wrap", "typing", "collapsible", "show-time", "allow-attachments", "accept", "attachment-limit", "resolve-file-url", "feedback-handler"])),
|
|
43400
|
+
]), 1032, ["messages", "placeholder", "theme", "welcome-layout", "center-welcome", "tool-step-label", "locale", "suggestions", "suggestions-title", "suggestions-wrap", "show-refresh-suggestions", "refresh-suggestions-text", "typing", "collapsible", "show-time", "allow-attachments", "accept", "attachment-limit", "resolve-file-url", "feedback-handler"])),
|
|
43274
43401
|
hasEarlier.value && atTop.value ? (openBlock(), createBlock(unref(ElButton), {
|
|
43275
43402
|
key: 0,
|
|
43276
43403
|
class: "fv-ai-chat-panel-load-earlier",
|
|
@@ -43420,6 +43547,7 @@ var _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
43420
43547
|
floatingHeight: { type: String, required: false, default: "" },
|
|
43421
43548
|
showModeToggle: { type: Boolean, required: false, default: false },
|
|
43422
43549
|
storageKey: { type: String, required: false, default: "fv-ai-chat-widget" },
|
|
43550
|
+
rememberPosition: { type: Boolean, required: false, default: true },
|
|
43423
43551
|
keepAlive: { type: Boolean, required: false, default: true },
|
|
43424
43552
|
maximizable: { type: Boolean, required: false, default: true },
|
|
43425
43553
|
title: { type: String, required: false, default: "" },
|
|
@@ -43431,6 +43559,8 @@ var _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
43431
43559
|
suggestions: { type: Array, required: false, default: () => [] },
|
|
43432
43560
|
suggestionsTitle: { type: String, required: false, default: "" },
|
|
43433
43561
|
suggestionsWrap: { type: Boolean, required: false, default: true },
|
|
43562
|
+
showRefreshSuggestions: { type: Boolean, required: false, default: false },
|
|
43563
|
+
refreshSuggestionsText: { type: String, required: false, default: "" },
|
|
43434
43564
|
typing: { type: [Boolean, Object], required: false, default: true },
|
|
43435
43565
|
collapsible: { type: Boolean, required: false, default: true },
|
|
43436
43566
|
showTime: { type: Boolean, required: false, default: true },
|
|
@@ -43446,7 +43576,7 @@ var _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
43446
43576
|
detailLimit: { type: Number, required: false, default: 100 },
|
|
43447
43577
|
historyLimit: { type: Number, required: false, default: 50 }
|
|
43448
43578
|
},
|
|
43449
|
-
emits: ["update:modelValue", "open", "close", "session-change", "session-created", "round-complete", "error", "message-complete", "attachment-exceed", "attachment-uploaded", "message-file-click", "feedback-change", "feedback-error"],
|
|
43579
|
+
emits: ["update:modelValue", "open", "close", "session-change", "session-created", "round-complete", "error", "message-complete", "attachment-exceed", "attachment-uploaded", "message-file-click", "feedback-change", "feedback-error", "refresh-suggestions"],
|
|
43450
43580
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
43451
43581
|
const props = __props;
|
|
43452
43582
|
const emit = __emit;
|
|
@@ -43613,6 +43743,8 @@ var _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
43613
43743
|
suggestions: props.suggestions,
|
|
43614
43744
|
suggestionsTitle: props.suggestionsTitle,
|
|
43615
43745
|
suggestionsWrap: props.suggestionsWrap,
|
|
43746
|
+
showRefreshSuggestions: props.showRefreshSuggestions,
|
|
43747
|
+
refreshSuggestionsText: props.refreshSuggestionsText,
|
|
43616
43748
|
typing: props.typing,
|
|
43617
43749
|
collapsible: props.collapsible,
|
|
43618
43750
|
showTime: props.showTime,
|
|
@@ -43657,6 +43789,9 @@ var _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
43657
43789
|
function onPanelFeedbackError(message) {
|
|
43658
43790
|
emit("feedback-error", message);
|
|
43659
43791
|
}
|
|
43792
|
+
function onPanelRefreshSuggestions() {
|
|
43793
|
+
emit("refresh-suggestions");
|
|
43794
|
+
}
|
|
43660
43795
|
const panelListeners = {
|
|
43661
43796
|
error: onPanelError,
|
|
43662
43797
|
"message-complete": onPanelMessageComplete,
|
|
@@ -43664,7 +43799,8 @@ var _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
43664
43799
|
"attachment-uploaded": onPanelAttachmentUploaded,
|
|
43665
43800
|
"message-file-click": onPanelMessageFileClick,
|
|
43666
43801
|
"feedback-change": onPanelFeedbackChange,
|
|
43667
|
-
"feedback-error": onPanelFeedbackError
|
|
43802
|
+
"feedback-error": onPanelFeedbackError,
|
|
43803
|
+
"refresh-suggestions": onPanelRefreshSuggestions
|
|
43668
43804
|
};
|
|
43669
43805
|
const widgetEl = ref(null);
|
|
43670
43806
|
const floatingPos = ref(null);
|
|
@@ -43674,15 +43810,44 @@ var _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
43674
43810
|
if (!props.storageKey) return null;
|
|
43675
43811
|
return props.storageKey.endsWith("!") ? props.storageKey.slice(0, -1) : `${props.storageKey}-width`;
|
|
43676
43812
|
}
|
|
43813
|
+
function resolvePositionKey() {
|
|
43814
|
+
if (!props.storageKey || !props.rememberPosition) return null;
|
|
43815
|
+
return props.storageKey.endsWith("!") ? props.storageKey.slice(0, -1) : `${props.storageKey}-position`;
|
|
43816
|
+
}
|
|
43817
|
+
function clampPos(pos) {
|
|
43818
|
+
const w = currentWidgetWidth();
|
|
43819
|
+
const h = floatingHeightPx();
|
|
43820
|
+
return {
|
|
43821
|
+
left: Math.min(Math.max(pos.left, 0), Math.max(0, window.innerWidth - w)),
|
|
43822
|
+
top: Math.min(Math.max(pos.top, 0), Math.max(0, window.innerHeight - h))
|
|
43823
|
+
};
|
|
43824
|
+
}
|
|
43677
43825
|
const dragWidth = ref(null);
|
|
43678
43826
|
onMounted(async () => {
|
|
43679
43827
|
const key = resolveWidthKey();
|
|
43680
|
-
if (
|
|
43681
|
-
|
|
43682
|
-
|
|
43683
|
-
|
|
43828
|
+
if (key) {
|
|
43829
|
+
const saved = await storage.get(key);
|
|
43830
|
+
if (typeof saved === "number" && Number.isFinite(saved)) {
|
|
43831
|
+
dragWidth.value = Math.min(Math.max(saved, props.minWidth), props.maxWidth);
|
|
43832
|
+
}
|
|
43833
|
+
}
|
|
43834
|
+
const posKey = resolvePositionKey();
|
|
43835
|
+
if (!posKey) {
|
|
43836
|
+
if (mode.value === "floating") initFloatingPos();
|
|
43837
|
+
return;
|
|
43838
|
+
}
|
|
43839
|
+
const pos = await storage.get(posKey);
|
|
43840
|
+
if (pos && Number.isFinite(pos.left) && Number.isFinite(pos.top) && mode.value === "floating") {
|
|
43841
|
+
floatingPos.value = clampPos(pos);
|
|
43842
|
+
} else if (mode.value === "floating") {
|
|
43843
|
+
initFloatingPos();
|
|
43684
43844
|
}
|
|
43685
43845
|
});
|
|
43846
|
+
async function persistPosition() {
|
|
43847
|
+
const key = resolvePositionKey();
|
|
43848
|
+
if (!key || mode.value !== "floating" || !floatingPos.value) return;
|
|
43849
|
+
await storage.set(key, { ...floatingPos.value });
|
|
43850
|
+
}
|
|
43686
43851
|
async function persistWidth() {
|
|
43687
43852
|
const key = resolveWidthKey();
|
|
43688
43853
|
if (!key || dragWidth.value == null) return;
|
|
@@ -43814,6 +43979,7 @@ var _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
43814
43979
|
document.removeEventListener("mousemove", onResizeMove);
|
|
43815
43980
|
document.removeEventListener("mouseup", onResizeEnd);
|
|
43816
43981
|
void persistWidth();
|
|
43982
|
+
if (mode.value === "floating" && resizeEdge === "left") void persistPosition();
|
|
43817
43983
|
}
|
|
43818
43984
|
let dragStartX = 0;
|
|
43819
43985
|
let dragStartY = 0;
|
|
@@ -43894,6 +44060,8 @@ var _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
43894
44060
|
mode.value = "drawer";
|
|
43895
44061
|
drawerSide.value = snapHint.value;
|
|
43896
44062
|
floatingPos.value = null;
|
|
44063
|
+
} else {
|
|
44064
|
+
void persistPosition();
|
|
43897
44065
|
}
|
|
43898
44066
|
isDragging.value = false;
|
|
43899
44067
|
dragStartPos = null;
|
|
@@ -44298,6 +44466,8 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
44298
44466
|
iconComponent: { type: null, required: false, default: void 0 },
|
|
44299
44467
|
eyeTrack: { type: Boolean, required: false, default: true },
|
|
44300
44468
|
halo: { type: Object, required: false, default: void 0 },
|
|
44469
|
+
storageKey: { type: String, required: false, default: "fv-ai-launcher" },
|
|
44470
|
+
rememberPosition: { type: Boolean, required: false, default: true },
|
|
44301
44471
|
ariaLabel: { type: String, required: false, default: "" },
|
|
44302
44472
|
locale: { type: null, required: false, default: void 0 }
|
|
44303
44473
|
},
|
|
@@ -44332,6 +44502,31 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
44332
44502
|
moved: false
|
|
44333
44503
|
};
|
|
44334
44504
|
const dragPos = ref(null);
|
|
44505
|
+
const storage = createLocalStorageAdapter();
|
|
44506
|
+
function resolvePositionKey() {
|
|
44507
|
+
if (!props.storageKey || !props.rememberPosition) return null;
|
|
44508
|
+
return props.storageKey.endsWith("!") ? props.storageKey.slice(0, -1) : `${props.storageKey}-position`;
|
|
44509
|
+
}
|
|
44510
|
+
function clampPos(pos) {
|
|
44511
|
+
const size = props.size;
|
|
44512
|
+
return {
|
|
44513
|
+
left: Math.min(Math.max(pos.left, 0), Math.max(0, window.innerWidth - size)),
|
|
44514
|
+
top: Math.min(Math.max(pos.top, 0), Math.max(0, window.innerHeight - size))
|
|
44515
|
+
};
|
|
44516
|
+
}
|
|
44517
|
+
onMounted(async () => {
|
|
44518
|
+
const key = resolvePositionKey();
|
|
44519
|
+
if (!key || !dragEnabled.value) return;
|
|
44520
|
+
const pos = await storage.get(key);
|
|
44521
|
+
if (pos && Number.isFinite(pos.left) && Number.isFinite(pos.top)) {
|
|
44522
|
+
dragPos.value = clampPos(pos);
|
|
44523
|
+
}
|
|
44524
|
+
});
|
|
44525
|
+
async function persistPosition() {
|
|
44526
|
+
const key = resolvePositionKey();
|
|
44527
|
+
if (!key || !dragPos.value) return;
|
|
44528
|
+
await storage.set(key, { ...dragPos.value });
|
|
44529
|
+
}
|
|
44335
44530
|
function onPointerDown(ev) {
|
|
44336
44531
|
if (!dragEnabled.value || ev.button !== 0) return;
|
|
44337
44532
|
const el = rootEl.value;
|
|
@@ -44371,7 +44566,10 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
44371
44566
|
el.removeEventListener("pointercancel", onPointerUp);
|
|
44372
44567
|
}
|
|
44373
44568
|
dragState.pointerId = -1;
|
|
44374
|
-
if (dragState.moved && dragPos.value)
|
|
44569
|
+
if (dragState.moved && dragPos.value) {
|
|
44570
|
+
emit("drag-end", { ...dragPos.value });
|
|
44571
|
+
void persistPosition();
|
|
44572
|
+
}
|
|
44375
44573
|
}
|
|
44376
44574
|
onBeforeUnmount(() => {
|
|
44377
44575
|
const el = rootEl.value;
|