@fv-ui/ai-chat 0.3.0 → 0.5.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 +31 -3
- package/dist/index.d.ts +129 -27
- package/dist/style.css +1 -1
- package/es/index.mjs +207 -65
- package/lib/index.js +207 -65
- package/package.json +1 -1
package/es/index.mjs
CHANGED
|
@@ -3343,7 +3343,7 @@ const _hoisted_16$1 = {
|
|
|
3343
3343
|
key: 1,
|
|
3344
3344
|
class: "fv-editor-footer"
|
|
3345
3345
|
};
|
|
3346
|
-
const _hoisted_17 = { class: "fv-editor-select-dialog" };
|
|
3346
|
+
const _hoisted_17$1 = { class: "fv-editor-select-dialog" };
|
|
3347
3347
|
const _hoisted_18 = { class: "fv-editor-select-title" };
|
|
3348
3348
|
const _hoisted_19 = { class: "fv-editor-select-grid" };
|
|
3349
3349
|
const _hoisted_20 = ["onClick"];
|
|
@@ -4306,7 +4306,7 @@ var _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
4306
4306
|
onClose: closeSelectDialog
|
|
4307
4307
|
}, {
|
|
4308
4308
|
default: withCtx(() => [
|
|
4309
|
-
createElementVNode("div", _hoisted_17, [
|
|
4309
|
+
createElementVNode("div", _hoisted_17$1, [
|
|
4310
4310
|
(openBlock(true), createElementBlock(
|
|
4311
4311
|
Fragment,
|
|
4312
4312
|
null,
|
|
@@ -6008,50 +6008,51 @@ const _hoisted_2$3 = {
|
|
|
6008
6008
|
key: 0,
|
|
6009
6009
|
class: "fv-msg-avatar"
|
|
6010
6010
|
};
|
|
6011
|
-
const _hoisted_3$3 =
|
|
6012
|
-
const _hoisted_4$2 =
|
|
6011
|
+
const _hoisted_3$3 = ["src"];
|
|
6012
|
+
const _hoisted_4$2 = ["src"];
|
|
6013
|
+
const _hoisted_5 = { class: "fv-msg-main" };
|
|
6014
|
+
const _hoisted_6 = {
|
|
6013
6015
|
key: 0,
|
|
6014
6016
|
class: "fv-msg-header"
|
|
6015
6017
|
};
|
|
6016
|
-
const
|
|
6017
|
-
|
|
6018
|
-
key: 0,
|
|
6018
|
+
const _hoisted_7 = {
|
|
6019
|
+
key: 2,
|
|
6019
6020
|
class: "fv-msg-model"
|
|
6020
6021
|
};
|
|
6021
|
-
const
|
|
6022
|
+
const _hoisted_8 = {
|
|
6022
6023
|
key: 1,
|
|
6023
6024
|
class: "fv-msg-files"
|
|
6024
6025
|
};
|
|
6025
|
-
const
|
|
6026
|
-
const
|
|
6026
|
+
const _hoisted_9 = ["src", "alt"];
|
|
6027
|
+
const _hoisted_10 = {
|
|
6027
6028
|
key: 1,
|
|
6028
6029
|
class: "fv-msg-file-name"
|
|
6029
6030
|
};
|
|
6030
|
-
const
|
|
6031
|
+
const _hoisted_11 = {
|
|
6031
6032
|
key: 3,
|
|
6032
6033
|
class: "fv-msg-content"
|
|
6033
6034
|
};
|
|
6034
|
-
const
|
|
6035
|
+
const _hoisted_12 = {
|
|
6035
6036
|
key: 0,
|
|
6036
6037
|
class: "fv-msg-error"
|
|
6037
6038
|
};
|
|
6038
|
-
const
|
|
6039
|
+
const _hoisted_13 = {
|
|
6039
6040
|
key: 2,
|
|
6040
6041
|
class: "fv-msg-pending"
|
|
6041
6042
|
};
|
|
6042
|
-
const
|
|
6043
|
+
const _hoisted_14 = {
|
|
6043
6044
|
key: 4,
|
|
6044
6045
|
class: "fv-msg-content fv-msg-content-user"
|
|
6045
6046
|
};
|
|
6046
|
-
const
|
|
6047
|
+
const _hoisted_15 = {
|
|
6047
6048
|
key: 5,
|
|
6048
6049
|
class: "fv-msg-actions"
|
|
6049
6050
|
};
|
|
6050
|
-
const
|
|
6051
|
+
const _hoisted_16 = {
|
|
6051
6052
|
key: 0,
|
|
6052
6053
|
class: "fv-msg-branch"
|
|
6053
6054
|
};
|
|
6054
|
-
const
|
|
6055
|
+
const _hoisted_17 = { class: "fv-msg-branch-label" };
|
|
6055
6056
|
var _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
6056
6057
|
...{ name: "FvAiMessage" },
|
|
6057
6058
|
__name: "index",
|
|
@@ -6062,6 +6063,12 @@ var _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
6062
6063
|
showBranchSwitch: { type: Boolean, required: false, default: true },
|
|
6063
6064
|
showUserAvatar: { type: Boolean, required: false, default: true },
|
|
6064
6065
|
showUserName: { type: Boolean, required: false, default: true },
|
|
6066
|
+
showAssistantAvatar: { type: Boolean, required: false, default: true },
|
|
6067
|
+
showAssistantName: { type: Boolean, required: false, default: true },
|
|
6068
|
+
userAvatar: { type: String, required: false, default: "" },
|
|
6069
|
+
assistantAvatar: { type: String, required: false, default: "" },
|
|
6070
|
+
userName: { type: String, required: false, default: "" },
|
|
6071
|
+
assistantName: { type: String, required: false, default: "" },
|
|
6065
6072
|
autoCollapse: { type: Boolean, required: false, default: true }
|
|
6066
6073
|
},
|
|
6067
6074
|
emits: ["copy", "regenerate", "branch-change"],
|
|
@@ -6092,50 +6099,70 @@ var _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
6092
6099
|
class: normalizeClass(["fv-msg", [`is-${__props.message.role}`, { "is-error": __props.message.status === "error", "is-user": isUser.value }]]),
|
|
6093
6100
|
"data-message-id": __props.message.id
|
|
6094
6101
|
}, [
|
|
6095
|
-
createCommentVNode(" \u5934\u50CF:user \u53F3\u4FA7(\u81EA\u8EAB),assistant \u5DE6\u4FA7
|
|
6096
|
-
|
|
6102
|
+
createCommentVNode(" \u5934\u50CF:user \u53F3\u4FA7(\u81EA\u8EAB),assistant \u5DE6\u4FA7;\u663E\u9690\u5F00\u5173\u5173\u95ED\u65F6\u4E0D\u6E32\u67D3;\r\n \u4F18\u5148\u7EA7:message-avatar \u6574\u4F53\u63D2\u69FD > user-avatar/assistant-avatar \u7EC6\u5206\u63D2\u69FD > props \u56FE\u7247 > \u5185\u7F6E\u56FE\u6807 "),
|
|
6103
|
+
(isUser.value ? __props.showUserAvatar : __props.showAssistantAvatar) ? (openBlock(), createElementBlock("div", _hoisted_2$3, [
|
|
6097
6104
|
renderSlot(_ctx.$slots, "message-avatar", { message: __props.message }, () => [
|
|
6098
|
-
isUser.value ? (
|
|
6099
|
-
|
|
6100
|
-
|
|
6101
|
-
|
|
6102
|
-
|
|
6103
|
-
|
|
6104
|
-
|
|
6105
|
-
|
|
6106
|
-
|
|
6107
|
-
|
|
6108
|
-
|
|
6109
|
-
|
|
6110
|
-
|
|
6111
|
-
|
|
6112
|
-
|
|
6113
|
-
|
|
6114
|
-
|
|
6115
|
-
|
|
6116
|
-
|
|
6105
|
+
isUser.value ? renderSlot(_ctx.$slots, "user-avatar", {}, () => [
|
|
6106
|
+
__props.userAvatar ? (openBlock(), createElementBlock("img", {
|
|
6107
|
+
key: 0,
|
|
6108
|
+
class: "fv-msg-avatar-img",
|
|
6109
|
+
src: __props.userAvatar,
|
|
6110
|
+
alt: ""
|
|
6111
|
+
}, null, 8, _hoisted_3$3)) : (openBlock(), createBlock(unref(ElIcon), {
|
|
6112
|
+
key: 1,
|
|
6113
|
+
class: "fv-msg-avatar-user"
|
|
6114
|
+
}, {
|
|
6115
|
+
default: withCtx(() => [
|
|
6116
|
+
createVNode(unref(User))
|
|
6117
|
+
]),
|
|
6118
|
+
_: 1
|
|
6119
|
+
/* STABLE */
|
|
6120
|
+
}))
|
|
6121
|
+
], void 0, 0) : renderSlot(_ctx.$slots, "assistant-avatar", {}, () => [
|
|
6122
|
+
__props.assistantAvatar ? (openBlock(), createElementBlock("img", {
|
|
6123
|
+
key: 0,
|
|
6124
|
+
class: "fv-msg-avatar-img",
|
|
6125
|
+
src: __props.assistantAvatar,
|
|
6126
|
+
alt: ""
|
|
6127
|
+
}, null, 8, _hoisted_4$2)) : (openBlock(), createBlock(unref(ElIcon), {
|
|
6128
|
+
key: 1,
|
|
6129
|
+
class: "fv-msg-avatar-bot"
|
|
6130
|
+
}, {
|
|
6131
|
+
default: withCtx(() => [
|
|
6132
|
+
createVNode(unref(ChatDotRound))
|
|
6133
|
+
]),
|
|
6134
|
+
_: 1
|
|
6135
|
+
/* STABLE */
|
|
6136
|
+
}))
|
|
6137
|
+
], void 0, 1)
|
|
6117
6138
|
])
|
|
6118
6139
|
])) : createCommentVNode("v-if", true),
|
|
6119
|
-
createElementVNode("div",
|
|
6120
|
-
createCommentVNode(" \u5934\u90E8:\u89D2\u8272\u540D + \u6A21\u578B\u6807\u8BB0
|
|
6121
|
-
|
|
6122
|
-
|
|
6123
|
-
|
|
6124
|
-
|
|
6125
|
-
|
|
6126
|
-
|
|
6127
|
-
|
|
6128
|
-
),
|
|
6140
|
+
createElementVNode("div", _hoisted_5, [
|
|
6141
|
+
createCommentVNode(" \u5934\u90E8:\u89D2\u8272\u540D + \u6A21\u578B\u6807\u8BB0;\u663E\u9690\u5F00\u5173\u5173\u95ED\u65F6\u4E0D\u6E32\u67D3;\u7EC6\u5206\u63D2\u69FD > props > \u9ED8\u8BA4\u6587\u6848 "),
|
|
6142
|
+
(isUser.value ? __props.showUserName : __props.showAssistantName) ? (openBlock(), createElementBlock("div", _hoisted_6, [
|
|
6143
|
+
isUser.value ? renderSlot(_ctx.$slots, "user-name", { message: __props.message }, () => [
|
|
6144
|
+
createTextVNode(
|
|
6145
|
+
toDisplayString(__props.userName || "\u4F60"),
|
|
6146
|
+
1
|
|
6147
|
+
/* TEXT */
|
|
6148
|
+
)
|
|
6149
|
+
], void 0, 0) : renderSlot(_ctx.$slots, "assistant-name", { message: __props.message }, () => [
|
|
6150
|
+
createTextVNode(
|
|
6151
|
+
toDisplayString(__props.assistantName || "\u52A9\u624B"),
|
|
6152
|
+
1
|
|
6153
|
+
/* TEXT */
|
|
6154
|
+
)
|
|
6155
|
+
], void 0, 1),
|
|
6129
6156
|
!isUser.value && modelLabel.value ? (openBlock(), createElementBlock(
|
|
6130
6157
|
"span",
|
|
6131
|
-
|
|
6158
|
+
_hoisted_7,
|
|
6132
6159
|
toDisplayString(modelLabel.value),
|
|
6133
6160
|
1
|
|
6134
6161
|
/* TEXT */
|
|
6135
6162
|
)) : createCommentVNode("v-if", true)
|
|
6136
6163
|
])) : createCommentVNode("v-if", true),
|
|
6137
6164
|
createCommentVNode(" \u9644\u4EF6:user \u6D88\u606F files \u4EE5 FilesCard \u5E73\u94FA "),
|
|
6138
|
-
__props.message.files?.length ? (openBlock(), createElementBlock("div",
|
|
6165
|
+
__props.message.files?.length ? (openBlock(), createElementBlock("div", _hoisted_8, [
|
|
6139
6166
|
renderSlot(_ctx.$slots, "message-files", {
|
|
6140
6167
|
message: __props.message,
|
|
6141
6168
|
files: __props.message.files
|
|
@@ -6156,9 +6183,9 @@ var _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
6156
6183
|
class: "fv-msg-file-img",
|
|
6157
6184
|
src: f.url,
|
|
6158
6185
|
alt: f.name
|
|
6159
|
-
}, null, 8,
|
|
6186
|
+
}, null, 8, _hoisted_9)) : (openBlock(), createElementBlock(
|
|
6160
6187
|
"span",
|
|
6161
|
-
|
|
6188
|
+
_hoisted_10,
|
|
6162
6189
|
toDisplayString(f.name),
|
|
6163
6190
|
1
|
|
6164
6191
|
/* TEXT */
|
|
@@ -6189,17 +6216,17 @@ var _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
6189
6216
|
/* STABLE */
|
|
6190
6217
|
}, 8, ["content", "status", "auto-collapse"])) : createCommentVNode("v-if", true),
|
|
6191
6218
|
createCommentVNode(" \u6B63\u6587:user \u7EAF\u6587\u672C\u6C14\u6CE1;assistant Markdown;pending \u7A7A\u5185\u5BB9\u7ED9\u52A0\u8F7D\u5360\u4F4D "),
|
|
6192
|
-
!isUser.value ? (openBlock(), createElementBlock("div",
|
|
6219
|
+
!isUser.value ? (openBlock(), createElementBlock("div", _hoisted_11, [
|
|
6193
6220
|
__props.message.status === "error" ? (openBlock(), createElementBlock(
|
|
6194
6221
|
"span",
|
|
6195
|
-
|
|
6222
|
+
_hoisted_12,
|
|
6196
6223
|
toDisplayString(__props.message.error || "\u751F\u6210\u5931\u8D25"),
|
|
6197
6224
|
1
|
|
6198
6225
|
/* TEXT */
|
|
6199
6226
|
)) : __props.message.content ? (openBlock(), createBlock(_sfc_main$i, {
|
|
6200
6227
|
key: 1,
|
|
6201
6228
|
content: __props.message.content
|
|
6202
|
-
}, null, 8, ["content"])) : __props.message.status === "pending" || __props.message.status === "streaming" ? (openBlock(), createElementBlock("span",
|
|
6229
|
+
}, null, 8, ["content"])) : __props.message.status === "pending" || __props.message.status === "streaming" ? (openBlock(), createElementBlock("span", _hoisted_13, [
|
|
6203
6230
|
(openBlock(), createElementBlock(
|
|
6204
6231
|
Fragment,
|
|
6205
6232
|
null,
|
|
@@ -6222,15 +6249,15 @@ var _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
6222
6249
|
])) : createCommentVNode("v-if", true)
|
|
6223
6250
|
])) : (openBlock(), createElementBlock(
|
|
6224
6251
|
"div",
|
|
6225
|
-
|
|
6252
|
+
_hoisted_14,
|
|
6226
6253
|
toDisplayString(__props.message.content),
|
|
6227
6254
|
1
|
|
6228
6255
|
/* TEXT */
|
|
6229
6256
|
)),
|
|
6230
|
-
createCommentVNode(" \u64CD\u4F5C\u533A
|
|
6231
|
-
__props.showActions
|
|
6257
|
+
createCommentVNode(" \u64CD\u4F5C\u533A:assistant \u590D\u5236/\u91CD\u751F\u6210 + \u5206\u652F\u5207\u6362;user \u4EC5\u590D\u5236(hover \u6D88\u606F\u65F6\u6D6E\u73B0,\u89C1 scss) "),
|
|
6258
|
+
__props.showActions || __props.showBranchSwitch && __props.branch && __props.branch.count > 1 ? (openBlock(), createElementBlock("div", _hoisted_15, [
|
|
6232
6259
|
renderSlot(_ctx.$slots, "message-actions", { message: __props.message }, () => [
|
|
6233
|
-
__props.showActions &&
|
|
6260
|
+
__props.showActions && isUser.value ? (openBlock(), createBlock(unref(ElTooltip), {
|
|
6234
6261
|
key: 0,
|
|
6235
6262
|
content: "\u590D\u5236",
|
|
6236
6263
|
placement: "top"
|
|
@@ -6261,6 +6288,35 @@ var _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
6261
6288
|
})) : createCommentVNode("v-if", true),
|
|
6262
6289
|
__props.showActions && !isUser.value ? (openBlock(), createBlock(unref(ElTooltip), {
|
|
6263
6290
|
key: 1,
|
|
6291
|
+
content: "\u590D\u5236",
|
|
6292
|
+
placement: "top"
|
|
6293
|
+
}, {
|
|
6294
|
+
default: withCtx(() => [
|
|
6295
|
+
createVNode(unref(ElButton), {
|
|
6296
|
+
text: "",
|
|
6297
|
+
size: "small",
|
|
6298
|
+
class: "fv-msg-action",
|
|
6299
|
+
"aria-label": "\u590D\u5236",
|
|
6300
|
+
onClick: onCopy
|
|
6301
|
+
}, {
|
|
6302
|
+
default: withCtx(() => [
|
|
6303
|
+
createVNode(unref(ElIcon), null, {
|
|
6304
|
+
default: withCtx(() => [
|
|
6305
|
+
createVNode(unref(DocumentCopy))
|
|
6306
|
+
]),
|
|
6307
|
+
_: 1
|
|
6308
|
+
/* STABLE */
|
|
6309
|
+
})
|
|
6310
|
+
]),
|
|
6311
|
+
_: 1
|
|
6312
|
+
/* STABLE */
|
|
6313
|
+
})
|
|
6314
|
+
]),
|
|
6315
|
+
_: 1
|
|
6316
|
+
/* STABLE */
|
|
6317
|
+
})) : createCommentVNode("v-if", true),
|
|
6318
|
+
__props.showActions && !isUser.value ? (openBlock(), createBlock(unref(ElTooltip), {
|
|
6319
|
+
key: 2,
|
|
6264
6320
|
content: "\u91CD\u65B0\u751F\u6210",
|
|
6265
6321
|
placement: "top"
|
|
6266
6322
|
}, {
|
|
@@ -6290,7 +6346,7 @@ var _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
6290
6346
|
})) : createCommentVNode("v-if", true)
|
|
6291
6347
|
]),
|
|
6292
6348
|
createCommentVNode(" \u5206\u652F\u5207\u6362:\u5144\u5F1F\u5206\u652F > 1 \u65F6 "),
|
|
6293
|
-
__props.showBranchSwitch && __props.branch && __props.branch.count > 1 ? (openBlock(), createElementBlock("span",
|
|
6349
|
+
__props.showBranchSwitch && __props.branch && __props.branch.count > 1 ? (openBlock(), createElementBlock("span", _hoisted_16, [
|
|
6294
6350
|
createVNode(unref(ElButton), {
|
|
6295
6351
|
text: "",
|
|
6296
6352
|
size: "small",
|
|
@@ -6313,7 +6369,7 @@ var _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
6313
6369
|
}, 8, ["disabled"]),
|
|
6314
6370
|
createElementVNode(
|
|
6315
6371
|
"span",
|
|
6316
|
-
|
|
6372
|
+
_hoisted_17,
|
|
6317
6373
|
toDisplayString(__props.branch.index) + " / " + toDisplayString(__props.branch.count),
|
|
6318
6374
|
1
|
|
6319
6375
|
/* TEXT */
|
|
@@ -6367,7 +6423,13 @@ var _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
6367
6423
|
showActions: { type: Boolean, required: false, default: true },
|
|
6368
6424
|
showBranchSwitch: { type: Boolean, required: false, default: true },
|
|
6369
6425
|
showUserAvatar: { type: Boolean, required: false, default: true },
|
|
6370
|
-
showUserName: { type: Boolean, required: false, default: true }
|
|
6426
|
+
showUserName: { type: Boolean, required: false, default: true },
|
|
6427
|
+
showAssistantAvatar: { type: Boolean, required: false, default: true },
|
|
6428
|
+
showAssistantName: { type: Boolean, required: false, default: true },
|
|
6429
|
+
userAvatar: { type: String, required: false, default: "" },
|
|
6430
|
+
assistantAvatar: { type: String, required: false, default: "" },
|
|
6431
|
+
userName: { type: String, required: false, default: "" },
|
|
6432
|
+
assistantName: { type: String, required: false, default: "" }
|
|
6371
6433
|
},
|
|
6372
6434
|
emits: ["select", "copy", "regenerate", "branch-change"],
|
|
6373
6435
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
@@ -6398,6 +6460,12 @@ var _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
6398
6460
|
watch(() => props.messages.length, (nv, ov) => {
|
|
6399
6461
|
if (nv > (ov ?? 0)) scrollToBottomIfNear();
|
|
6400
6462
|
});
|
|
6463
|
+
watch(
|
|
6464
|
+
() => props.messages.filter((m) => m.role === "user").length,
|
|
6465
|
+
(nv, ov) => {
|
|
6466
|
+
if (nv > (ov ?? 0)) nextTick(() => scrollToBottom());
|
|
6467
|
+
}
|
|
6468
|
+
);
|
|
6401
6469
|
watch(
|
|
6402
6470
|
() => props.messages.reduce((sum, m) => sum + m.content.length + (m.reasoning?.length ?? 0), 0),
|
|
6403
6471
|
() => scrollToBottomIfNear()
|
|
@@ -6480,6 +6548,12 @@ var _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
6480
6548
|
"show-branch-switch": __props.showBranchSwitch,
|
|
6481
6549
|
"show-user-avatar": __props.showUserAvatar,
|
|
6482
6550
|
"show-user-name": __props.showUserName,
|
|
6551
|
+
"show-assistant-avatar": __props.showAssistantAvatar,
|
|
6552
|
+
"show-assistant-name": __props.showAssistantName,
|
|
6553
|
+
"user-avatar": __props.userAvatar,
|
|
6554
|
+
"assistant-avatar": __props.assistantAvatar,
|
|
6555
|
+
"user-name": __props.userName,
|
|
6556
|
+
"assistant-name": __props.assistantName,
|
|
6483
6557
|
onCopy,
|
|
6484
6558
|
onRegenerate,
|
|
6485
6559
|
onBranchChange: onBranch
|
|
@@ -6500,8 +6574,36 @@ var _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
6500
6574
|
renderSlot(_ctx.$slots, "message-actions", mergeProps({ ref_for: true }, scope))
|
|
6501
6575
|
]),
|
|
6502
6576
|
key: "1"
|
|
6577
|
+
} : void 0,
|
|
6578
|
+
_ctx.$slots["user-avatar"] ? {
|
|
6579
|
+
name: "user-avatar",
|
|
6580
|
+
fn: withCtx(() => [
|
|
6581
|
+
renderSlot(_ctx.$slots, "user-avatar")
|
|
6582
|
+
]),
|
|
6583
|
+
key: "2"
|
|
6584
|
+
} : void 0,
|
|
6585
|
+
_ctx.$slots["assistant-avatar"] ? {
|
|
6586
|
+
name: "assistant-avatar",
|
|
6587
|
+
fn: withCtx(() => [
|
|
6588
|
+
renderSlot(_ctx.$slots, "assistant-avatar")
|
|
6589
|
+
]),
|
|
6590
|
+
key: "3"
|
|
6591
|
+
} : void 0,
|
|
6592
|
+
_ctx.$slots["user-name"] ? {
|
|
6593
|
+
name: "user-name",
|
|
6594
|
+
fn: withCtx((scope) => [
|
|
6595
|
+
renderSlot(_ctx.$slots, "user-name", mergeProps({ ref_for: true }, scope))
|
|
6596
|
+
]),
|
|
6597
|
+
key: "4"
|
|
6598
|
+
} : void 0,
|
|
6599
|
+
_ctx.$slots["assistant-name"] ? {
|
|
6600
|
+
name: "assistant-name",
|
|
6601
|
+
fn: withCtx((scope) => [
|
|
6602
|
+
renderSlot(_ctx.$slots, "assistant-name", mergeProps({ ref_for: true }, scope))
|
|
6603
|
+
]),
|
|
6604
|
+
key: "5"
|
|
6503
6605
|
} : void 0
|
|
6504
|
-
]), 1032, ["message", "branch", "show-actions", "show-branch-switch", "show-user-avatar", "show-user-name"]);
|
|
6606
|
+
]), 1032, ["message", "branch", "show-actions", "show-branch-switch", "show-user-avatar", "show-user-name", "show-assistant-avatar", "show-assistant-name", "user-avatar", "assistant-avatar", "user-name", "assistant-name"]);
|
|
6505
6607
|
}),
|
|
6506
6608
|
128
|
|
6507
6609
|
/* KEYED_FRAGMENT */
|
|
@@ -6796,6 +6898,12 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
6796
6898
|
centerWelcome: { type: Boolean, required: false, default: true },
|
|
6797
6899
|
showUserAvatar: { type: Boolean, required: false, default: true },
|
|
6798
6900
|
showUserName: { type: Boolean, required: false, default: true },
|
|
6901
|
+
showAssistantAvatar: { type: Boolean, required: false, default: true },
|
|
6902
|
+
showAssistantName: { type: Boolean, required: false, default: true },
|
|
6903
|
+
userAvatar: { type: String, required: false, default: "" },
|
|
6904
|
+
assistantAvatar: { type: String, required: false, default: "" },
|
|
6905
|
+
userName: { type: String, required: false, default: "" },
|
|
6906
|
+
assistantName: { type: String, required: false, default: "" },
|
|
6799
6907
|
placeholder: { type: String, required: false, default: "" },
|
|
6800
6908
|
senderShadow: { type: Boolean, required: false, default: true },
|
|
6801
6909
|
suggestions: { type: Array, required: false, default: () => [] },
|
|
@@ -7061,6 +7169,12 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
7061
7169
|
suggestions: __props.suggestions,
|
|
7062
7170
|
"show-user-avatar": __props.showUserAvatar,
|
|
7063
7171
|
"show-user-name": __props.showUserName,
|
|
7172
|
+
"show-assistant-avatar": __props.showAssistantAvatar,
|
|
7173
|
+
"show-assistant-name": __props.showAssistantName,
|
|
7174
|
+
"user-avatar": __props.userAvatar,
|
|
7175
|
+
"assistant-avatar": __props.assistantAvatar,
|
|
7176
|
+
"user-name": __props.userName,
|
|
7177
|
+
"assistant-name": __props.assistantName,
|
|
7064
7178
|
onSelect: onSelectSuggestion,
|
|
7065
7179
|
onCopy,
|
|
7066
7180
|
onRegenerate,
|
|
@@ -7083,14 +7197,42 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
7083
7197
|
]),
|
|
7084
7198
|
key: "1"
|
|
7085
7199
|
} : void 0,
|
|
7200
|
+
_ctx.$slots["user-avatar"] ? {
|
|
7201
|
+
name: "user-avatar",
|
|
7202
|
+
fn: withCtx(() => [
|
|
7203
|
+
renderSlot(_ctx.$slots, "user-avatar")
|
|
7204
|
+
]),
|
|
7205
|
+
key: "2"
|
|
7206
|
+
} : void 0,
|
|
7207
|
+
_ctx.$slots["assistant-avatar"] ? {
|
|
7208
|
+
name: "assistant-avatar",
|
|
7209
|
+
fn: withCtx(() => [
|
|
7210
|
+
renderSlot(_ctx.$slots, "assistant-avatar")
|
|
7211
|
+
]),
|
|
7212
|
+
key: "3"
|
|
7213
|
+
} : void 0,
|
|
7214
|
+
_ctx.$slots["user-name"] ? {
|
|
7215
|
+
name: "user-name",
|
|
7216
|
+
fn: withCtx((scope) => [
|
|
7217
|
+
renderSlot(_ctx.$slots, "user-name", normalizeProps(guardReactiveProps(scope)))
|
|
7218
|
+
]),
|
|
7219
|
+
key: "4"
|
|
7220
|
+
} : void 0,
|
|
7221
|
+
_ctx.$slots["assistant-name"] ? {
|
|
7222
|
+
name: "assistant-name",
|
|
7223
|
+
fn: withCtx((scope) => [
|
|
7224
|
+
renderSlot(_ctx.$slots, "assistant-name", normalizeProps(guardReactiveProps(scope)))
|
|
7225
|
+
]),
|
|
7226
|
+
key: "5"
|
|
7227
|
+
} : void 0,
|
|
7086
7228
|
_ctx.$slots.empty ? {
|
|
7087
7229
|
name: "empty",
|
|
7088
7230
|
fn: withCtx(() => [
|
|
7089
7231
|
renderSlot(_ctx.$slots, "empty")
|
|
7090
7232
|
]),
|
|
7091
|
-
key: "
|
|
7233
|
+
key: "6"
|
|
7092
7234
|
} : void 0
|
|
7093
|
-
]), 1032, ["messages", "nodes", "name", "suggestions", "show-user-avatar", "show-user-name"]),
|
|
7235
|
+
]), 1032, ["messages", "nodes", "name", "suggestions", "show-user-avatar", "show-user-name", "show-assistant-avatar", "show-assistant-name", "user-avatar", "assistant-avatar", "user-name", "assistant-name"]),
|
|
7094
7236
|
__props.features?.artifacts && artifacts.value.length ? (openBlock(), createBlock(_sfc_main$1, {
|
|
7095
7237
|
key: 0,
|
|
7096
7238
|
artifacts: artifacts.value,
|