@fv-ui/ai-chat 1.9.4 → 1.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -4
- package/dist/index.d.ts +205 -111
- package/dist/style.css +1 -1
- package/es/assets/fvai-avatar-BGJ98eKE.svg +24 -0
- package/es/index.mjs +438 -80
- package/lib/index.js +437 -79
- package/package.json +1 -1
package/es/index.mjs
CHANGED
|
@@ -11,7 +11,7 @@ import 'element-plus/es/components/avatar/style/css';
|
|
|
11
11
|
import 'element-plus/es/components/dropdown/style/css';
|
|
12
12
|
import 'element-plus/es/components/select/style/css';
|
|
13
13
|
import 'element-plus/es/components/image-viewer/style/css';
|
|
14
|
-
import { shallowRef, inject, computed, provide, defineComponent, ref, onBeforeUnmount, openBlock, createElementBlock, Fragment, createElementVNode, createBlock, Teleport, watch, normalizeClass, createTextVNode, toDisplayString, createCommentVNode, normalizeStyle, renderSlot, unref, renderList, isRef, nextTick, onMounted, mergeProps, createSlots, withCtx, createVNode, Transition, getCurrentInstance, useSlots, normalizeProps, guardReactiveProps, reactive, resolveDynamicComponent, markRaw, withModifiers, h, onActivated, useModel, onDeactivated, mergeModels, withDirectives, toHandlers, vShow
|
|
14
|
+
import { shallowRef, inject, computed, provide, defineComponent, ref, onBeforeUnmount, openBlock, createElementBlock, Fragment, createElementVNode, createBlock, Teleport, watch, normalizeClass, createTextVNode, toDisplayString, createCommentVNode, normalizeStyle, renderSlot, unref, renderList, isRef, nextTick, onMounted, mergeProps, createSlots, withCtx, createVNode, Transition, getCurrentInstance, useSlots, normalizeProps, guardReactiveProps, reactive, resolveDynamicComponent, markRaw, withModifiers, h, onActivated, useModel, onDeactivated, mergeModels, watchEffect, withDirectives, toHandlers, vShow } from 'vue';
|
|
15
15
|
import { ElMessage, ElAvatar, ElButton, ElIcon, ElPopover, ElDialog, ElScrollbar, ElDropdown, ElDropdownMenu, ElDropdownItem, ElMessageBox, ElImageViewer, ElTooltip, ElInput, ElSelect, ElOption, ElSegmented } from 'element-plus';
|
|
16
16
|
import * as ElementPlusIconsVue from '@element-plus/icons-vue';
|
|
17
17
|
import { ArrowDown, Close, Check, Delete, Microphone, Promotion, VideoPause, Loading, SuccessFilled, WarningFilled, CircleCloseFilled, ArrowUp, Picture, Download, Paperclip, RefreshRight, MoreFilled, Search, User, CircleCheck, DocumentCopy, Bottom, CopyDocument, FullScreen, Plus, Clock, ArrowLeft } from '@element-plus/icons-vue';
|
|
@@ -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 */
|
|
@@ -38202,7 +38219,7 @@ var __icon_7 = "<?xml version=\"1.0\" standalone=\"no\"?><!DOCTYPE svg PUBLIC \"
|
|
|
38202
38219
|
|
|
38203
38220
|
var __icon_8 = "<?xml version=\"1.0\" standalone=\"no\"?><!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\"><svg t=\"1791801016916\" class=\"icon\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" p-id=\"3529\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"200\" height=\"200\"><path d=\"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\" p-id=\"3530\"></path><path d=\"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\" p-id=\"3531\"></path></svg>";
|
|
38204
38221
|
|
|
38205
|
-
var defaultAvatarSvg = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"240\" height=\"240\" viewBox=\"0 0 240 240\" fill=\"none\" role=\"img\" aria-
|
|
38222
|
+
var defaultAvatarSvg = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"240\" height=\"240\" viewBox=\"0 0 240 240\" fill=\"none\" role=\"img\" aria-label=\"AI Chat\">\r\n <g id=\"silhouette\" fill=\"#0E6BFD\">\r\n <path d=\"M83.084 26.906 C84.997 26.252 87.572 26.808 89.135 28.287 C90.564 29.639 91.147 31.761 91.930 33.611 C92.713 35.460 93.696 37.036 95.048 38.382 C96.401 39.728 98.123 40.843 99.915 41.705 C101.707 42.568 103.569 43.178 105.028 44.504 C106.556 45.892 107.643 48.065 107.147 49.880 C106.695 51.532 104.931 52.887 103.144 53.792 C101.181 54.786 99.190 55.238 97.421 56.044 C94.041 57.586 91.469 60.423 89.433 63.969 C88.463 65.658 87.615 67.509 86.082 68.532 C84.323 69.707 81.663 69.793 79.918 68.814 C78.249 67.877 77.418 65.965 76.666 63.899 C75.913 61.833 75.239 59.613 73.864 59.272 C72.550 58.945 70.597 60.333 69.040 61.717 C67.733 62.879 66.704 64.039 65.929 65.430 C63.822 69.209 63.579 74.693 66.110 78.596 C67.115 80.146 68.558 81.446 70.100 81.830 C71.961 82.294 73.967 81.424 75.983 80.646 C84.097 77.516 92.378 75.892 101.009 74.631 C110.691 73.216 120.813 72.259 130.945 72.434 C140.555 72.601 150.173 73.787 159.161 75.161 C163.629 75.843 167.941 76.572 172.542 78.163 C174.797 78.942 177.120 79.928 178.618 79.040 C179.993 78.225 180.672 75.832 181.801 74.037 C182.828 72.403 184.228 71.266 185.824 70.294 C187.577 69.227 189.567 68.361 191.580 67.917 C195.747 66.997 200.009 67.888 203.908 69.699 C211.016 73.001 216.917 79.357 218.477 87.132 C218.946 89.467 219.023 91.931 217.834 94.090 C216.834 95.907 214.935 97.509 214.435 99.073 C213.959 100.563 214.752 102.019 215.901 103.468 C216.857 104.673 218.059 105.873 219.195 107.087 C224.860 113.139 228.886 119.533 232.006 126.452 C235.445 134.075 237.784 142.336 238.479 151.091 C239.245 160.734 238.016 170.976 234.985 179.606 C233.661 183.373 231.995 186.832 229.850 190.333 C228.014 193.330 225.828 196.357 223.395 199.082 C218.159 204.949 211.783 209.415 205.095 212.791 C197.513 216.618 189.532 219.042 181.044 220.535 C176.436 221.345 171.678 221.881 166.905 222.310 C161.943 222.756 156.964 223.087 151.918 223.284 C141.769 223.681 131.345 223.537 120.980 223.515 C110.476 223.492 100.032 223.592 89.873 222.850 C80.605 222.174 71.574 220.795 63.046 218.354 C55.267 216.126 47.907 213.014 41.100 208.234 C35.240 204.119 29.790 198.769 25.784 192.899 C21.026 185.927 18.304 178.224 16.756 169.882 C15.863 165.071 15.361 160.048 15.531 155.072 C15.683 150.608 16.377 146.182 17.323 141.918 C19.150 133.678 21.918 126.047 26.125 118.868 C28.044 115.593 30.263 112.413 32.777 109.393 C35.025 106.694 37.508 104.122 39.873 101.433 C40.550 100.663 41.217 99.884 41.425 99.007 C41.652 98.049 41.330 96.975 41.037 95.897 C40.403 93.556 39.913 91.199 39.735 88.856 C39.379 84.169 40.273 79.536 41.856 75.173 C44.383 68.206 48.665 61.926 54.925 57.492 C56.576 56.323 58.364 55.282 60.150 54.354 C61.043 53.891 61.935 53.455 62.309 52.900 C62.648 52.397 62.561 51.796 62.409 51.055 C62.040 49.264 61.288 46.654 62.100 44.934 C62.878 43.288 65.087 42.458 67.103 41.648 C71.043 40.066 74.241 38.563 76.560 35.228 C78.591 32.306 79.948 27.979 83.084 26.906 Z\"/>\r\n </g>\r\n <g id=\"shell\" fill=\"#FDFDFE\">\r\n <path d=\"M112.152 80.916 C119.318 80.410 126.733 80.289 133.993 80.467 C140.731 80.633 147.336 81.056 153.835 81.882 C160.092 82.676 166.250 83.844 172.099 85.396 C177.389 86.800 182.426 88.518 187.385 90.909 C196.356 95.235 205.070 101.762 212.008 109.429 C219.109 117.276 224.349 126.317 227.338 136.157 C229.176 142.207 230.162 148.558 230.266 155.016 C230.366 161.248 229.643 167.579 227.969 173.463 C226.435 178.854 224.101 183.869 220.820 188.486 C217.991 192.467 214.458 196.152 210.622 199.219 C201.899 206.191 191.608 209.969 180.877 212.296 C174.813 213.610 168.609 214.461 162.195 214.907 C155.591 215.367 148.764 215.398 142.021 215.625 C138.484 215.744 134.970 215.918 131.485 216.046 C128.000 216.174 124.543 216.258 121.074 216.217 C117.699 216.177 114.312 216.020 110.894 215.881 C107.613 215.747 104.303 215.630 101.010 215.495 C94.151 215.214 87.366 214.857 80.807 213.947 C74.839 213.119 69.058 211.834 63.509 210.013 C58.266 208.294 53.230 206.097 48.458 203.058 C44.343 200.438 40.425 197.191 37.067 193.529 C33.582 189.728 30.701 185.480 28.664 180.935 C26.293 175.643 25.067 169.948 24.540 163.928 C23.936 157.018 24.254 149.678 25.504 142.966 C26.560 137.302 28.280 132.085 30.695 127.090 C32.970 122.385 35.861 117.877 39.245 113.619 C42.313 109.758 45.787 106.101 49.508 102.877 C57.685 95.792 67.059 90.793 76.997 87.426 C82.462 85.573 88.098 84.215 93.861 83.173 C99.805 82.098 105.884 81.359 112.152 80.916 Z\"/>\r\n </g>\r\n <g id=\"face\" fill=\"#0D2B5D\">\r\n <path d=\"M105.132 109.027 C115.851 108.263 127.107 108.140 138.035 108.452 C148.244 108.743 158.167 109.414 167.823 110.868 C176.690 112.204 185.332 114.201 192.901 118.900 C199.263 122.849 204.868 128.708 208.236 135.358 C210.268 139.372 211.485 143.675 212.152 148.224 C212.895 153.293 212.954 158.668 212.221 163.764 C211.596 168.115 210.393 172.262 208.367 176.056 C206.602 179.363 204.211 182.401 201.426 184.849 C195.238 190.289 187.106 192.817 178.845 194.342 C174.028 195.231 169.167 195.778 164.195 196.046 C159.224 196.313 154.141 196.300 149.026 196.330 C127.650 196.455 105.702 197.329 84.908 195.686 C75.484 194.941 66.297 193.679 58.439 189.064 C55.236 187.182 52.254 184.743 49.836 181.889 C47.241 178.823 45.297 175.278 43.984 171.481 C42.387 166.865 41.724 161.875 41.739 156.977 C41.754 152.302 42.388 147.709 43.735 143.243 C45.977 135.810 50.195 128.726 55.953 123.564 C61.985 118.156 69.707 114.858 77.563 112.863 C81.981 111.740 86.441 111.030 90.978 110.442 C95.606 109.843 100.315 109.370 105.132 109.027 Z\"/>\r\n </g>\r\n <g id=\"expression\" fill=\"#1CFBFD\">\r\n <path d=\"M93.209 124.933 C95.233 123.833 98.231 124.251 100.599 124.974 C102.606 125.587 104.160 126.419 105.954 127.425 C107.588 128.341 109.422 129.400 110.415 131.050 C111.339 132.584 111.535 134.629 110.110 135.315 C109.155 135.774 107.473 135.623 106.658 134.859 C106.283 134.508 106.091 134.026 105.786 133.638 C105.533 133.316 105.203 133.058 104.867 132.794 C103.313 131.573 101.636 130.225 99.559 129.844 C97.201 129.411 94.327 130.222 92.760 128.789 C92.100 128.186 91.672 127.185 91.877 126.388 C92.036 125.772 92.575 125.278 93.209 124.933 Z\"/>\r\n <path d=\"M176.980 135.822 C178.159 135.877 179.517 137.016 179.688 138.114 C179.841 139.102 179.033 140.055 178.084 140.707 C176.336 141.906 174.111 142.079 172.100 142.747 C169.967 143.455 168.076 144.719 165.929 145.311 C164.917 145.591 163.848 145.721 162.846 146.096 C162.259 146.315 161.695 146.619 161.128 146.931 C160.727 147.152 160.324 147.377 159.913 147.421 C158.713 147.550 157.437 146.138 157.299 144.929 C157.174 143.841 157.970 142.916 158.914 142.282 C160.654 141.112 162.901 140.926 164.907 140.252 C167.034 139.538 168.892 138.276 171.073 137.694 C172.101 137.420 173.200 137.297 174.176 136.886 C175.152 136.475 176.005 135.776 176.980 135.822 Z\"/>\r\n <!-- 两眼等大缩小:以各自圆心为中心同目标尺寸缩放(左 0.60 / 右 0.68,缩后均约 17 视窗单位宽);\r\n 缩放放外层 g(呈现属性),CSS translate 跟随放内层 path(id 锚点),互不覆盖 -->\r\n <g transform=\"translate(90.95 157.09) scale(0.60) translate(-90.95 -157.09)\">\r\n <path id=\"fvai-eye-left\" d=\"M90.254 138.697 C94.493 137.812 99.056 140.181 101.660 143.848 C104.243 147.484 104.900 152.396 104.595 156.985 C104.302 161.386 103.124 165.489 100.463 169.063 C98.087 172.254 94.529 175.024 90.815 175.486 C86.619 176.007 82.223 173.582 79.732 170.045 C77.210 166.463 76.640 161.743 77.000 157.388 C77.353 153.124 78.596 149.211 81.192 145.570 C83.454 142.397 86.743 139.431 90.254 138.697 Z\"/>\r\n </g>\r\n <g transform=\"translate(168.50 163.18) scale(0.68) translate(-168.50 -163.18)\">\r\n <path id=\"fvai-eye-right\" d=\"M166.255 147.848 C169.868 146.680 174.301 147.738 176.994 150.387 C179.623 152.972 180.593 157.072 180.646 161.005 C180.699 165.035 179.790 168.891 177.715 172.216 C175.889 175.144 173.159 177.660 170.040 178.504 C166.751 179.393 163.029 178.422 160.502 176.061 C157.910 173.639 156.576 169.755 156.297 165.969 C155.998 161.898 156.920 157.941 158.962 154.424 C160.670 151.483 163.162 148.849 166.255 147.848 Z\"/>\r\n </g>\r\n <path d=\"M118.057 165.765 C118.701 165.534 119.503 165.756 120.307 166.099 C120.727 166.279 121.148 166.491 121.564 166.702 C122.776 167.314 123.945 167.905 125.177 168.260 C127.867 169.035 130.853 168.684 133.915 167.993 C135.417 167.653 136.937 167.232 137.998 167.638 C138.890 167.978 139.459 168.902 139.575 169.935 C139.801 171.954 138.300 174.391 136.475 175.959 C134.324 177.806 131.724 178.444 128.992 178.547 C126.393 178.645 123.675 178.259 121.392 177.140 C119.438 176.183 117.802 174.689 116.939 172.554 C116.355 171.108 116.124 169.367 116.518 167.885 C116.778 166.902 117.313 166.032 118.057 165.765 Z\"/>\r\n </g>\r\n</svg>\r\n";
|
|
38206
38223
|
|
|
38207
38224
|
var __icon_10 = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 1024 1024\"><path d=\"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\" fill=\"currentColor\"></path></svg>\r\n";
|
|
38208
38225
|
|
|
@@ -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,
|
|
@@ -42066,7 +42174,7 @@ var _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
42066
42174
|
}
|
|
42067
42175
|
});
|
|
42068
42176
|
|
|
42069
|
-
var defaultAvatar = new URL('assets/fvai-avatar-
|
|
42177
|
+
var defaultAvatar = new URL('assets/fvai-avatar-BGJ98eKE.svg', import.meta.url).href;
|
|
42070
42178
|
|
|
42071
42179
|
const DRAFT_SESSION_ID = "__draft__";
|
|
42072
42180
|
|
|
@@ -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",
|
|
@@ -43404,7 +43531,7 @@ const _hoisted_16 = {
|
|
|
43404
43531
|
const SESSION_HISTORY_LIMIT = 20;
|
|
43405
43532
|
const historyPageSize = 20;
|
|
43406
43533
|
const DRAWER_DRAG_THRESHOLD = 100;
|
|
43407
|
-
const EDGE_SNAP_DELAY =
|
|
43534
|
+
const EDGE_SNAP_DELAY = 300;
|
|
43408
43535
|
var _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
43409
43536
|
...{ name: "FvAiChatWidget" },
|
|
43410
43537
|
__name: "index",
|
|
@@ -43416,10 +43543,11 @@ var _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
43416
43543
|
position: { type: String, required: false, default: "right" },
|
|
43417
43544
|
offsetTop: { type: Number, required: false, default: 0 },
|
|
43418
43545
|
offsetBottom: { type: Number, required: false, default: 0 },
|
|
43419
|
-
mode: { type: String, required: false, default:
|
|
43546
|
+
mode: { type: String, required: false, default: void 0 },
|
|
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,64 @@ 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 || typeof pos !== "object") {
|
|
43841
|
+
if (mode.value === "floating") initFloatingPos();
|
|
43842
|
+
return;
|
|
43843
|
+
}
|
|
43844
|
+
if ("mode" in pos && pos.mode === "drawer") {
|
|
43845
|
+
if (pos.side === "left" || pos.side === "right") {
|
|
43846
|
+
drawerSide.value = pos.side;
|
|
43847
|
+
if (modePropExplicit && mode.value === "floating") {
|
|
43848
|
+
initFloatingPos();
|
|
43849
|
+
return;
|
|
43850
|
+
}
|
|
43851
|
+
}
|
|
43852
|
+
if (!modePropExplicit) mode.value = "drawer";
|
|
43853
|
+
} else if ("left" in pos && Number.isFinite(pos.left) && Number.isFinite(pos.top)) {
|
|
43854
|
+
if (modePropExplicit && mode.value === "drawer") return;
|
|
43855
|
+
mode.value = "floating";
|
|
43856
|
+
floatingPos.value = clampPos({ left: pos.left, top: pos.top });
|
|
43857
|
+
void persistPosition();
|
|
43858
|
+
} else if (mode.value === "floating") {
|
|
43859
|
+
initFloatingPos();
|
|
43684
43860
|
}
|
|
43685
43861
|
});
|
|
43862
|
+
async function persistPosition() {
|
|
43863
|
+
const key = resolvePositionKey();
|
|
43864
|
+
if (!key) return;
|
|
43865
|
+
if (mode.value === "drawer") {
|
|
43866
|
+
await storage.set(key, { mode: "drawer", side: drawerSide.value });
|
|
43867
|
+
} else if (floatingPos.value) {
|
|
43868
|
+
await storage.set(key, { mode: "floating", ...floatingPos.value });
|
|
43869
|
+
}
|
|
43870
|
+
}
|
|
43686
43871
|
async function persistWidth() {
|
|
43687
43872
|
const key = resolveWidthKey();
|
|
43688
43873
|
if (!key || dragWidth.value == null) return;
|
|
@@ -43710,12 +43895,14 @@ var _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
43710
43895
|
window.innerHeight - props.offsetTop - props.offsetBottom - 80
|
|
43711
43896
|
);
|
|
43712
43897
|
}
|
|
43713
|
-
const mode = ref(props.mode);
|
|
43898
|
+
const mode = ref(props.mode ?? "drawer");
|
|
43899
|
+
let modePropExplicit = props.mode !== void 0;
|
|
43714
43900
|
const drawerSide = ref(props.position);
|
|
43715
43901
|
watch(
|
|
43716
43902
|
() => props.position,
|
|
43717
43903
|
(p) => {
|
|
43718
43904
|
drawerSide.value = p;
|
|
43905
|
+
if (mode.value === "drawer") void persistPosition();
|
|
43719
43906
|
}
|
|
43720
43907
|
);
|
|
43721
43908
|
const isMaximized = ref(false);
|
|
@@ -43738,14 +43925,17 @@ var _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
43738
43925
|
mode.value = "drawer";
|
|
43739
43926
|
floatingPos.value = null;
|
|
43740
43927
|
}
|
|
43928
|
+
void persistPosition();
|
|
43741
43929
|
}
|
|
43742
43930
|
watch(
|
|
43743
43931
|
() => props.mode,
|
|
43744
43932
|
(m) => {
|
|
43745
|
-
if (m === mode.value) return;
|
|
43933
|
+
if (m === void 0 || m === mode.value) return;
|
|
43934
|
+
modePropExplicit = true;
|
|
43746
43935
|
mode.value = m;
|
|
43747
43936
|
if (m === "floating") initFloatingPos();
|
|
43748
43937
|
else floatingPos.value = null;
|
|
43938
|
+
void persistPosition();
|
|
43749
43939
|
}
|
|
43750
43940
|
);
|
|
43751
43941
|
const panelStyle = computed(() => {
|
|
@@ -43814,6 +44004,7 @@ var _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
43814
44004
|
document.removeEventListener("mousemove", onResizeMove);
|
|
43815
44005
|
document.removeEventListener("mouseup", onResizeEnd);
|
|
43816
44006
|
void persistWidth();
|
|
44007
|
+
if (mode.value === "floating" && resizeEdge === "left") void persistPosition();
|
|
43817
44008
|
}
|
|
43818
44009
|
let dragStartX = 0;
|
|
43819
44010
|
let dragStartY = 0;
|
|
@@ -43895,6 +44086,7 @@ var _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
43895
44086
|
drawerSide.value = snapHint.value;
|
|
43896
44087
|
floatingPos.value = null;
|
|
43897
44088
|
}
|
|
44089
|
+
void persistPosition();
|
|
43898
44090
|
isDragging.value = false;
|
|
43899
44091
|
dragStartPos = null;
|
|
43900
44092
|
drawerDragActive = false;
|
|
@@ -43903,10 +44095,31 @@ var _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
43903
44095
|
document.removeEventListener("mousemove", onDragMove);
|
|
43904
44096
|
document.removeEventListener("mouseup", onDragEnd);
|
|
43905
44097
|
}
|
|
44098
|
+
let widgetResizeRaf = 0;
|
|
44099
|
+
function onWindowResize() {
|
|
44100
|
+
if (widgetResizeRaf) return;
|
|
44101
|
+
widgetResizeRaf = requestAnimationFrame(() => {
|
|
44102
|
+
widgetResizeRaf = 0;
|
|
44103
|
+
if (mode.value !== "floating" || !floatingPos.value) return;
|
|
44104
|
+
const clamped = clampPos(floatingPos.value);
|
|
44105
|
+
floatingPos.value = clamped;
|
|
44106
|
+
void persistPosition();
|
|
44107
|
+
});
|
|
44108
|
+
}
|
|
44109
|
+
watchEffect((onCleanup) => {
|
|
44110
|
+
if (mode.value !== "floating") return;
|
|
44111
|
+
window.addEventListener("resize", onWindowResize, { passive: true });
|
|
44112
|
+
onCleanup(() => {
|
|
44113
|
+
window.removeEventListener("resize", onWindowResize);
|
|
44114
|
+
if (widgetResizeRaf) cancelAnimationFrame(widgetResizeRaf);
|
|
44115
|
+
widgetResizeRaf = 0;
|
|
44116
|
+
});
|
|
44117
|
+
});
|
|
43906
44118
|
onBeforeUnmount(() => {
|
|
43907
44119
|
onResizeEnd();
|
|
43908
44120
|
onDragEnd();
|
|
43909
44121
|
clearSnap();
|
|
44122
|
+
if (widgetResizeRaf) cancelAnimationFrame(widgetResizeRaf);
|
|
43910
44123
|
});
|
|
43911
44124
|
function open() {
|
|
43912
44125
|
emit("update:modelValue", true);
|
|
@@ -44277,6 +44490,7 @@ const _hoisted_1 = { class: "fv-ai-launcher-icon" };
|
|
|
44277
44490
|
const _hoisted_2 = ["innerHTML"];
|
|
44278
44491
|
const _hoisted_3 = ["src"];
|
|
44279
44492
|
const DRAG_THRESHOLD = 4;
|
|
44493
|
+
const SNAP_RADIUS = 96;
|
|
44280
44494
|
const EYE_MAX_DXY = 6;
|
|
44281
44495
|
const EYE_TRACK_RANGE = 6;
|
|
44282
44496
|
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
@@ -44298,6 +44512,8 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
44298
44512
|
iconComponent: { type: null, required: false, default: void 0 },
|
|
44299
44513
|
eyeTrack: { type: Boolean, required: false, default: true },
|
|
44300
44514
|
halo: { type: Object, required: false, default: void 0 },
|
|
44515
|
+
storageKey: { type: String, required: false, default: "fv-ai-launcher" },
|
|
44516
|
+
rememberPosition: { type: Boolean, required: false, default: true },
|
|
44301
44517
|
ariaLabel: { type: String, required: false, default: "" },
|
|
44302
44518
|
locale: { type: null, required: false, default: void 0 }
|
|
44303
44519
|
},
|
|
@@ -44331,7 +44547,107 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
44331
44547
|
origTop: 0,
|
|
44332
44548
|
moved: false
|
|
44333
44549
|
};
|
|
44334
|
-
const
|
|
44550
|
+
const posMode = ref("corner");
|
|
44551
|
+
const activePlacement = ref(resolvedPlacement.value);
|
|
44552
|
+
const freePos = ref(null);
|
|
44553
|
+
const isSnapping = ref(false);
|
|
44554
|
+
const storage = createLocalStorageAdapter();
|
|
44555
|
+
function resolvePositionKey() {
|
|
44556
|
+
if (!props.storageKey || !props.rememberPosition) return null;
|
|
44557
|
+
return props.storageKey.endsWith("!") ? props.storageKey.slice(0, -1) : `${props.storageKey}-position`;
|
|
44558
|
+
}
|
|
44559
|
+
function clampPos(pos) {
|
|
44560
|
+
const size = props.size;
|
|
44561
|
+
return {
|
|
44562
|
+
left: Math.min(Math.max(pos.left, 0), Math.max(0, window.innerWidth - size)),
|
|
44563
|
+
top: Math.min(Math.max(pos.top, 0), Math.max(0, window.innerHeight - size))
|
|
44564
|
+
};
|
|
44565
|
+
}
|
|
44566
|
+
function cornerAnchor(placement) {
|
|
44567
|
+
const size = props.size;
|
|
44568
|
+
const ox = resolvedOffsetX.value;
|
|
44569
|
+
const oy = resolvedOffsetY.value;
|
|
44570
|
+
const iw = window.innerWidth;
|
|
44571
|
+
const ih = window.innerHeight;
|
|
44572
|
+
switch (placement) {
|
|
44573
|
+
case "top-left":
|
|
44574
|
+
return { left: ox + size / 2, top: oy + size / 2 };
|
|
44575
|
+
case "top-right":
|
|
44576
|
+
return { left: iw - ox - size / 2, top: oy + size / 2 };
|
|
44577
|
+
case "bottom-left":
|
|
44578
|
+
return { left: ox + size / 2, top: ih - oy - size / 2 };
|
|
44579
|
+
case "bottom-right":
|
|
44580
|
+
return { left: iw - ox - size / 2, top: ih - oy - size / 2 };
|
|
44581
|
+
}
|
|
44582
|
+
}
|
|
44583
|
+
function detectCornerSnap(pos) {
|
|
44584
|
+
const center = { left: pos.left + props.size / 2, top: pos.top + props.size / 2 };
|
|
44585
|
+
const corners = ["top-left", "top-right", "bottom-left", "bottom-right"];
|
|
44586
|
+
let best = null;
|
|
44587
|
+
let bestDist = SNAP_RADIUS;
|
|
44588
|
+
for (const c of corners) {
|
|
44589
|
+
const anchor = cornerAnchor(c);
|
|
44590
|
+
const dist = Math.hypot(center.left - anchor.left, center.top - anchor.top);
|
|
44591
|
+
if (dist < bestDist) {
|
|
44592
|
+
bestDist = dist;
|
|
44593
|
+
best = c;
|
|
44594
|
+
}
|
|
44595
|
+
}
|
|
44596
|
+
return best;
|
|
44597
|
+
}
|
|
44598
|
+
function snapToCorner(placement) {
|
|
44599
|
+
if (isSnapping.value) return;
|
|
44600
|
+
isSnapping.value = true;
|
|
44601
|
+
const anchor = cornerAnchor(placement);
|
|
44602
|
+
const size = props.size;
|
|
44603
|
+
freePos.value = {
|
|
44604
|
+
left: anchor.left - size / 2,
|
|
44605
|
+
top: anchor.top - size / 2
|
|
44606
|
+
};
|
|
44607
|
+
activePlacement.value = placement;
|
|
44608
|
+
const el = rootEl.value;
|
|
44609
|
+
if (!el) {
|
|
44610
|
+
isSnapping.value = false;
|
|
44611
|
+
posMode.value = "corner";
|
|
44612
|
+
freePos.value = null;
|
|
44613
|
+
return;
|
|
44614
|
+
}
|
|
44615
|
+
let settled = false;
|
|
44616
|
+
const settle = () => {
|
|
44617
|
+
if (settled) return;
|
|
44618
|
+
settled = true;
|
|
44619
|
+
isSnapping.value = false;
|
|
44620
|
+
posMode.value = "corner";
|
|
44621
|
+
freePos.value = null;
|
|
44622
|
+
void persistPosition();
|
|
44623
|
+
};
|
|
44624
|
+
el.addEventListener("transitionend", settle, { once: true });
|
|
44625
|
+
setTimeout(settle, 350);
|
|
44626
|
+
}
|
|
44627
|
+
async function persistPosition() {
|
|
44628
|
+
const key = resolvePositionKey();
|
|
44629
|
+
if (!key) return;
|
|
44630
|
+
if (posMode.value === "corner") {
|
|
44631
|
+
await storage.set(key, { mode: "corner", placement: activePlacement.value });
|
|
44632
|
+
} else if (freePos.value) {
|
|
44633
|
+
await storage.set(key, { mode: "free", ...freePos.value });
|
|
44634
|
+
}
|
|
44635
|
+
}
|
|
44636
|
+
onMounted(async () => {
|
|
44637
|
+
const key = resolvePositionKey();
|
|
44638
|
+
if (!key || !dragEnabled.value) return;
|
|
44639
|
+
const raw = await storage.get(key);
|
|
44640
|
+
if (!raw) return;
|
|
44641
|
+
if ("mode" in raw && raw.mode === "corner") {
|
|
44642
|
+
if (raw.placement && ["top-left", "top-right", "bottom-left", "bottom-right"].includes(raw.placement)) {
|
|
44643
|
+
activePlacement.value = raw.placement;
|
|
44644
|
+
}
|
|
44645
|
+
} else if ("left" in raw && Number.isFinite(raw.left) && Number.isFinite(raw.top)) {
|
|
44646
|
+
posMode.value = "free";
|
|
44647
|
+
freePos.value = clampPos({ left: raw.left, top: raw.top });
|
|
44648
|
+
void persistPosition();
|
|
44649
|
+
}
|
|
44650
|
+
});
|
|
44335
44651
|
function onPointerDown(ev) {
|
|
44336
44652
|
if (!dragEnabled.value || ev.button !== 0) return;
|
|
44337
44653
|
const el = rootEl.value;
|
|
@@ -44354,12 +44670,16 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
44354
44670
|
const dy = ev.clientY - dragState.startY;
|
|
44355
44671
|
if (!dragState.moved && Math.hypot(dx, dy) < DRAG_THRESHOLD) return;
|
|
44356
44672
|
dragState.moved = true;
|
|
44673
|
+
if (posMode.value === "corner") {
|
|
44674
|
+
posMode.value = "free";
|
|
44675
|
+
freePos.value = { left: dragState.origLeft, top: dragState.origTop };
|
|
44676
|
+
}
|
|
44357
44677
|
const el = rootEl.value;
|
|
44358
44678
|
if (!el) return;
|
|
44359
44679
|
const size = el.offsetWidth || props.size;
|
|
44360
44680
|
const left = Math.min(Math.max(dragState.origLeft + dx, 0), window.innerWidth - size);
|
|
44361
44681
|
const top = Math.min(Math.max(dragState.origTop + dy, 0), window.innerHeight - size);
|
|
44362
|
-
|
|
44682
|
+
freePos.value = { left, top };
|
|
44363
44683
|
}
|
|
44364
44684
|
function onPointerUp(ev) {
|
|
44365
44685
|
if (ev.pointerId !== dragState.pointerId) return;
|
|
@@ -44371,7 +44691,15 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
44371
44691
|
el.removeEventListener("pointercancel", onPointerUp);
|
|
44372
44692
|
}
|
|
44373
44693
|
dragState.pointerId = -1;
|
|
44374
|
-
if (dragState.moved &&
|
|
44694
|
+
if (dragState.moved && freePos.value) {
|
|
44695
|
+
emit("drag-end", { ...freePos.value });
|
|
44696
|
+
const snapped = detectCornerSnap(freePos.value);
|
|
44697
|
+
if (snapped) {
|
|
44698
|
+
snapToCorner(snapped);
|
|
44699
|
+
} else {
|
|
44700
|
+
void persistPosition();
|
|
44701
|
+
}
|
|
44702
|
+
}
|
|
44375
44703
|
}
|
|
44376
44704
|
onBeforeUnmount(() => {
|
|
44377
44705
|
const el = rootEl.value;
|
|
@@ -44381,6 +44709,34 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
44381
44709
|
el.removeEventListener("pointercancel", onPointerUp);
|
|
44382
44710
|
}
|
|
44383
44711
|
});
|
|
44712
|
+
let resizeRaf = 0;
|
|
44713
|
+
function onWindowResize() {
|
|
44714
|
+
if (resizeRaf) return;
|
|
44715
|
+
resizeRaf = requestAnimationFrame(() => {
|
|
44716
|
+
resizeRaf = 0;
|
|
44717
|
+
if (posMode.value !== "free" || !freePos.value) return;
|
|
44718
|
+
const clamped = clampPos(freePos.value);
|
|
44719
|
+
freePos.value = clamped;
|
|
44720
|
+
const snapped = detectCornerSnap(clamped);
|
|
44721
|
+
if (snapped) {
|
|
44722
|
+
snapToCorner(snapped);
|
|
44723
|
+
} else {
|
|
44724
|
+
void persistPosition();
|
|
44725
|
+
}
|
|
44726
|
+
});
|
|
44727
|
+
}
|
|
44728
|
+
watchEffect((onCleanup) => {
|
|
44729
|
+
if (posMode.value !== "free" || !dragEnabled.value) return;
|
|
44730
|
+
window.addEventListener("resize", onWindowResize, { passive: true });
|
|
44731
|
+
onCleanup(() => {
|
|
44732
|
+
window.removeEventListener("resize", onWindowResize);
|
|
44733
|
+
if (resizeRaf) cancelAnimationFrame(resizeRaf);
|
|
44734
|
+
resizeRaf = 0;
|
|
44735
|
+
});
|
|
44736
|
+
});
|
|
44737
|
+
onBeforeUnmount(() => {
|
|
44738
|
+
if (resizeRaf) cancelAnimationFrame(resizeRaf);
|
|
44739
|
+
});
|
|
44384
44740
|
function onClickGuard(ev) {
|
|
44385
44741
|
if (dragState.moved) {
|
|
44386
44742
|
dragState.moved = false;
|
|
@@ -44451,14 +44807,16 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
44451
44807
|
}
|
|
44452
44808
|
});
|
|
44453
44809
|
const rootClass = computed(() => [
|
|
44454
|
-
|
|
44810
|
+
// 四角模式下角定位类读 activePlacement(记忆/吸附可改);自由模式下无意义,由 is-dragged 抑制
|
|
44811
|
+
...(posMode.value === "corner" ? activePlacement.value.split("-") : []).map((axis) => `is-${axis}`),
|
|
44455
44812
|
{
|
|
44456
44813
|
"is-floating": props.floating,
|
|
44457
44814
|
"is-interactive": props.interactive,
|
|
44458
44815
|
// 非交互无激活语义;交互态激活高亮仅视觉
|
|
44459
44816
|
"is-active": props.interactive && props.modelValue,
|
|
44460
44817
|
"is-draggable": dragEnabled.value,
|
|
44461
|
-
"is-dragged":
|
|
44818
|
+
"is-dragged": posMode.value === "free",
|
|
44819
|
+
"is-snapping": isSnapping.value
|
|
44462
44820
|
}
|
|
44463
44821
|
]);
|
|
44464
44822
|
const rootStyle = computed(() => ({
|
|
@@ -44466,7 +44824,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
44466
44824
|
"--fv-launcher-offset-x": `${resolvedOffsetX.value}px`,
|
|
44467
44825
|
"--fv-launcher-offset-y": `${resolvedOffsetY.value}px`,
|
|
44468
44826
|
...props.floating && props.zIndex !== void 0 ? { "--fv-launcher-z-index": `${props.zIndex}` } : null,
|
|
44469
|
-
...
|
|
44827
|
+
...freePos.value ? { left: `${freePos.value.left}px`, top: `${freePos.value.top}px` } : null
|
|
44470
44828
|
}));
|
|
44471
44829
|
return (_ctx, _cache) => {
|
|
44472
44830
|
return openBlock(), createBlock(resolveDynamicComponent(__props.interactive ? "button" : "span"), {
|