@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/lib/index.js
CHANGED
|
@@ -3359,7 +3359,7 @@
|
|
|
3359
3359
|
key: 1,
|
|
3360
3360
|
class: "fv-editor-footer"
|
|
3361
3361
|
};
|
|
3362
|
-
const _hoisted_17 = { class: "fv-editor-select-dialog" };
|
|
3362
|
+
const _hoisted_17$1 = { class: "fv-editor-select-dialog" };
|
|
3363
3363
|
const _hoisted_18 = { class: "fv-editor-select-title" };
|
|
3364
3364
|
const _hoisted_19 = { class: "fv-editor-select-grid" };
|
|
3365
3365
|
const _hoisted_20 = ["onClick"];
|
|
@@ -4322,7 +4322,7 @@
|
|
|
4322
4322
|
onClose: closeSelectDialog
|
|
4323
4323
|
}, {
|
|
4324
4324
|
default: vue.withCtx(() => [
|
|
4325
|
-
vue.createElementVNode("div", _hoisted_17, [
|
|
4325
|
+
vue.createElementVNode("div", _hoisted_17$1, [
|
|
4326
4326
|
(vue.openBlock(true), vue.createElementBlock(
|
|
4327
4327
|
vue.Fragment,
|
|
4328
4328
|
null,
|
|
@@ -6024,50 +6024,51 @@ ${fileParts.join("\n")}` });
|
|
|
6024
6024
|
key: 0,
|
|
6025
6025
|
class: "fv-msg-avatar"
|
|
6026
6026
|
};
|
|
6027
|
-
const _hoisted_3$3 =
|
|
6028
|
-
const _hoisted_4$2 =
|
|
6027
|
+
const _hoisted_3$3 = ["src"];
|
|
6028
|
+
const _hoisted_4$2 = ["src"];
|
|
6029
|
+
const _hoisted_5 = { class: "fv-msg-main" };
|
|
6030
|
+
const _hoisted_6 = {
|
|
6029
6031
|
key: 0,
|
|
6030
6032
|
class: "fv-msg-header"
|
|
6031
6033
|
};
|
|
6032
|
-
const
|
|
6033
|
-
|
|
6034
|
-
key: 0,
|
|
6034
|
+
const _hoisted_7 = {
|
|
6035
|
+
key: 2,
|
|
6035
6036
|
class: "fv-msg-model"
|
|
6036
6037
|
};
|
|
6037
|
-
const
|
|
6038
|
+
const _hoisted_8 = {
|
|
6038
6039
|
key: 1,
|
|
6039
6040
|
class: "fv-msg-files"
|
|
6040
6041
|
};
|
|
6041
|
-
const
|
|
6042
|
-
const
|
|
6042
|
+
const _hoisted_9 = ["src", "alt"];
|
|
6043
|
+
const _hoisted_10 = {
|
|
6043
6044
|
key: 1,
|
|
6044
6045
|
class: "fv-msg-file-name"
|
|
6045
6046
|
};
|
|
6046
|
-
const
|
|
6047
|
+
const _hoisted_11 = {
|
|
6047
6048
|
key: 3,
|
|
6048
6049
|
class: "fv-msg-content"
|
|
6049
6050
|
};
|
|
6050
|
-
const
|
|
6051
|
+
const _hoisted_12 = {
|
|
6051
6052
|
key: 0,
|
|
6052
6053
|
class: "fv-msg-error"
|
|
6053
6054
|
};
|
|
6054
|
-
const
|
|
6055
|
+
const _hoisted_13 = {
|
|
6055
6056
|
key: 2,
|
|
6056
6057
|
class: "fv-msg-pending"
|
|
6057
6058
|
};
|
|
6058
|
-
const
|
|
6059
|
+
const _hoisted_14 = {
|
|
6059
6060
|
key: 4,
|
|
6060
6061
|
class: "fv-msg-content fv-msg-content-user"
|
|
6061
6062
|
};
|
|
6062
|
-
const
|
|
6063
|
+
const _hoisted_15 = {
|
|
6063
6064
|
key: 5,
|
|
6064
6065
|
class: "fv-msg-actions"
|
|
6065
6066
|
};
|
|
6066
|
-
const
|
|
6067
|
+
const _hoisted_16 = {
|
|
6067
6068
|
key: 0,
|
|
6068
6069
|
class: "fv-msg-branch"
|
|
6069
6070
|
};
|
|
6070
|
-
const
|
|
6071
|
+
const _hoisted_17 = { class: "fv-msg-branch-label" };
|
|
6071
6072
|
var _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
|
|
6072
6073
|
...{ name: "FvAiMessage" },
|
|
6073
6074
|
__name: "index",
|
|
@@ -6078,6 +6079,12 @@ ${fileParts.join("\n")}` });
|
|
|
6078
6079
|
showBranchSwitch: { type: Boolean, required: false, default: true },
|
|
6079
6080
|
showUserAvatar: { type: Boolean, required: false, default: true },
|
|
6080
6081
|
showUserName: { type: Boolean, required: false, default: true },
|
|
6082
|
+
showAssistantAvatar: { type: Boolean, required: false, default: true },
|
|
6083
|
+
showAssistantName: { type: Boolean, required: false, default: true },
|
|
6084
|
+
userAvatar: { type: String, required: false, default: "" },
|
|
6085
|
+
assistantAvatar: { type: String, required: false, default: "" },
|
|
6086
|
+
userName: { type: String, required: false, default: "" },
|
|
6087
|
+
assistantName: { type: String, required: false, default: "" },
|
|
6081
6088
|
autoCollapse: { type: Boolean, required: false, default: true }
|
|
6082
6089
|
},
|
|
6083
6090
|
emits: ["copy", "regenerate", "branch-change"],
|
|
@@ -6108,50 +6115,70 @@ ${fileParts.join("\n")}` });
|
|
|
6108
6115
|
class: vue.normalizeClass(["fv-msg", [`is-${__props.message.role}`, { "is-error": __props.message.status === "error", "is-user": isUser.value }]]),
|
|
6109
6116
|
"data-message-id": __props.message.id
|
|
6110
6117
|
}, [
|
|
6111
|
-
vue.createCommentVNode(" \u5934\u50CF:user \u53F3\u4FA7(\u81EA\u8EAB),assistant \u5DE6\u4FA7
|
|
6112
|
-
|
|
6118
|
+
vue.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 "),
|
|
6119
|
+
(isUser.value ? __props.showUserAvatar : __props.showAssistantAvatar) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$3, [
|
|
6113
6120
|
vue.renderSlot(_ctx.$slots, "message-avatar", { message: __props.message }, () => [
|
|
6114
|
-
isUser.value ?
|
|
6115
|
-
|
|
6116
|
-
|
|
6117
|
-
|
|
6118
|
-
|
|
6119
|
-
|
|
6120
|
-
|
|
6121
|
-
|
|
6122
|
-
|
|
6123
|
-
|
|
6124
|
-
|
|
6125
|
-
|
|
6126
|
-
|
|
6127
|
-
|
|
6128
|
-
|
|
6129
|
-
|
|
6130
|
-
|
|
6131
|
-
|
|
6132
|
-
|
|
6121
|
+
isUser.value ? vue.renderSlot(_ctx.$slots, "user-avatar", {}, () => [
|
|
6122
|
+
__props.userAvatar ? (vue.openBlock(), vue.createElementBlock("img", {
|
|
6123
|
+
key: 0,
|
|
6124
|
+
class: "fv-msg-avatar-img",
|
|
6125
|
+
src: __props.userAvatar,
|
|
6126
|
+
alt: ""
|
|
6127
|
+
}, null, 8, _hoisted_3$3)) : (vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElIcon), {
|
|
6128
|
+
key: 1,
|
|
6129
|
+
class: "fv-msg-avatar-user"
|
|
6130
|
+
}, {
|
|
6131
|
+
default: vue.withCtx(() => [
|
|
6132
|
+
vue.createVNode(vue.unref(ElementPlusIconsVue.User))
|
|
6133
|
+
]),
|
|
6134
|
+
_: 1
|
|
6135
|
+
/* STABLE */
|
|
6136
|
+
}))
|
|
6137
|
+
], void 0, 0) : vue.renderSlot(_ctx.$slots, "assistant-avatar", {}, () => [
|
|
6138
|
+
__props.assistantAvatar ? (vue.openBlock(), vue.createElementBlock("img", {
|
|
6139
|
+
key: 0,
|
|
6140
|
+
class: "fv-msg-avatar-img",
|
|
6141
|
+
src: __props.assistantAvatar,
|
|
6142
|
+
alt: ""
|
|
6143
|
+
}, null, 8, _hoisted_4$2)) : (vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElIcon), {
|
|
6144
|
+
key: 1,
|
|
6145
|
+
class: "fv-msg-avatar-bot"
|
|
6146
|
+
}, {
|
|
6147
|
+
default: vue.withCtx(() => [
|
|
6148
|
+
vue.createVNode(vue.unref(ElementPlusIconsVue.ChatDotRound))
|
|
6149
|
+
]),
|
|
6150
|
+
_: 1
|
|
6151
|
+
/* STABLE */
|
|
6152
|
+
}))
|
|
6153
|
+
], void 0, 1)
|
|
6133
6154
|
])
|
|
6134
6155
|
])) : vue.createCommentVNode("v-if", true),
|
|
6135
|
-
vue.createElementVNode("div",
|
|
6136
|
-
vue.createCommentVNode(" \u5934\u90E8:\u89D2\u8272\u540D + \u6A21\u578B\u6807\u8BB0
|
|
6137
|
-
|
|
6138
|
-
vue.
|
|
6139
|
-
|
|
6140
|
-
|
|
6141
|
-
|
|
6142
|
-
|
|
6143
|
-
|
|
6144
|
-
),
|
|
6156
|
+
vue.createElementVNode("div", _hoisted_5, [
|
|
6157
|
+
vue.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 "),
|
|
6158
|
+
(isUser.value ? __props.showUserName : __props.showAssistantName) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6, [
|
|
6159
|
+
isUser.value ? vue.renderSlot(_ctx.$slots, "user-name", { message: __props.message }, () => [
|
|
6160
|
+
vue.createTextVNode(
|
|
6161
|
+
vue.toDisplayString(__props.userName || "\u4F60"),
|
|
6162
|
+
1
|
|
6163
|
+
/* TEXT */
|
|
6164
|
+
)
|
|
6165
|
+
], void 0, 0) : vue.renderSlot(_ctx.$slots, "assistant-name", { message: __props.message }, () => [
|
|
6166
|
+
vue.createTextVNode(
|
|
6167
|
+
vue.toDisplayString(__props.assistantName || "\u52A9\u624B"),
|
|
6168
|
+
1
|
|
6169
|
+
/* TEXT */
|
|
6170
|
+
)
|
|
6171
|
+
], void 0, 1),
|
|
6145
6172
|
!isUser.value && modelLabel.value ? (vue.openBlock(), vue.createElementBlock(
|
|
6146
6173
|
"span",
|
|
6147
|
-
|
|
6174
|
+
_hoisted_7,
|
|
6148
6175
|
vue.toDisplayString(modelLabel.value),
|
|
6149
6176
|
1
|
|
6150
6177
|
/* TEXT */
|
|
6151
6178
|
)) : vue.createCommentVNode("v-if", true)
|
|
6152
6179
|
])) : vue.createCommentVNode("v-if", true),
|
|
6153
6180
|
vue.createCommentVNode(" \u9644\u4EF6:user \u6D88\u606F files \u4EE5 FilesCard \u5E73\u94FA "),
|
|
6154
|
-
__props.message.files?.length ? (vue.openBlock(), vue.createElementBlock("div",
|
|
6181
|
+
__props.message.files?.length ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_8, [
|
|
6155
6182
|
vue.renderSlot(_ctx.$slots, "message-files", {
|
|
6156
6183
|
message: __props.message,
|
|
6157
6184
|
files: __props.message.files
|
|
@@ -6172,9 +6199,9 @@ ${fileParts.join("\n")}` });
|
|
|
6172
6199
|
class: "fv-msg-file-img",
|
|
6173
6200
|
src: f.url,
|
|
6174
6201
|
alt: f.name
|
|
6175
|
-
}, null, 8,
|
|
6202
|
+
}, null, 8, _hoisted_9)) : (vue.openBlock(), vue.createElementBlock(
|
|
6176
6203
|
"span",
|
|
6177
|
-
|
|
6204
|
+
_hoisted_10,
|
|
6178
6205
|
vue.toDisplayString(f.name),
|
|
6179
6206
|
1
|
|
6180
6207
|
/* TEXT */
|
|
@@ -6205,17 +6232,17 @@ ${fileParts.join("\n")}` });
|
|
|
6205
6232
|
/* STABLE */
|
|
6206
6233
|
}, 8, ["content", "status", "auto-collapse"])) : vue.createCommentVNode("v-if", true),
|
|
6207
6234
|
vue.createCommentVNode(" \u6B63\u6587:user \u7EAF\u6587\u672C\u6C14\u6CE1;assistant Markdown;pending \u7A7A\u5185\u5BB9\u7ED9\u52A0\u8F7D\u5360\u4F4D "),
|
|
6208
|
-
!isUser.value ? (vue.openBlock(), vue.createElementBlock("div",
|
|
6235
|
+
!isUser.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_11, [
|
|
6209
6236
|
__props.message.status === "error" ? (vue.openBlock(), vue.createElementBlock(
|
|
6210
6237
|
"span",
|
|
6211
|
-
|
|
6238
|
+
_hoisted_12,
|
|
6212
6239
|
vue.toDisplayString(__props.message.error || "\u751F\u6210\u5931\u8D25"),
|
|
6213
6240
|
1
|
|
6214
6241
|
/* TEXT */
|
|
6215
6242
|
)) : __props.message.content ? (vue.openBlock(), vue.createBlock(_sfc_main$i, {
|
|
6216
6243
|
key: 1,
|
|
6217
6244
|
content: __props.message.content
|
|
6218
|
-
}, null, 8, ["content"])) : __props.message.status === "pending" || __props.message.status === "streaming" ? (vue.openBlock(), vue.createElementBlock("span",
|
|
6245
|
+
}, null, 8, ["content"])) : __props.message.status === "pending" || __props.message.status === "streaming" ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_13, [
|
|
6219
6246
|
(vue.openBlock(), vue.createElementBlock(
|
|
6220
6247
|
vue.Fragment,
|
|
6221
6248
|
null,
|
|
@@ -6238,15 +6265,15 @@ ${fileParts.join("\n")}` });
|
|
|
6238
6265
|
])) : vue.createCommentVNode("v-if", true)
|
|
6239
6266
|
])) : (vue.openBlock(), vue.createElementBlock(
|
|
6240
6267
|
"div",
|
|
6241
|
-
|
|
6268
|
+
_hoisted_14,
|
|
6242
6269
|
vue.toDisplayString(__props.message.content),
|
|
6243
6270
|
1
|
|
6244
6271
|
/* TEXT */
|
|
6245
6272
|
)),
|
|
6246
|
-
vue.createCommentVNode(" \u64CD\u4F5C\u533A
|
|
6247
|
-
__props.showActions
|
|
6273
|
+
vue.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) "),
|
|
6274
|
+
__props.showActions || __props.showBranchSwitch && __props.branch && __props.branch.count > 1 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_15, [
|
|
6248
6275
|
vue.renderSlot(_ctx.$slots, "message-actions", { message: __props.message }, () => [
|
|
6249
|
-
__props.showActions &&
|
|
6276
|
+
__props.showActions && isUser.value ? (vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElTooltip), {
|
|
6250
6277
|
key: 0,
|
|
6251
6278
|
content: "\u590D\u5236",
|
|
6252
6279
|
placement: "top"
|
|
@@ -6277,6 +6304,35 @@ ${fileParts.join("\n")}` });
|
|
|
6277
6304
|
})) : vue.createCommentVNode("v-if", true),
|
|
6278
6305
|
__props.showActions && !isUser.value ? (vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElTooltip), {
|
|
6279
6306
|
key: 1,
|
|
6307
|
+
content: "\u590D\u5236",
|
|
6308
|
+
placement: "top"
|
|
6309
|
+
}, {
|
|
6310
|
+
default: vue.withCtx(() => [
|
|
6311
|
+
vue.createVNode(vue.unref(elementPlus.ElButton), {
|
|
6312
|
+
text: "",
|
|
6313
|
+
size: "small",
|
|
6314
|
+
class: "fv-msg-action",
|
|
6315
|
+
"aria-label": "\u590D\u5236",
|
|
6316
|
+
onClick: onCopy
|
|
6317
|
+
}, {
|
|
6318
|
+
default: vue.withCtx(() => [
|
|
6319
|
+
vue.createVNode(vue.unref(elementPlus.ElIcon), null, {
|
|
6320
|
+
default: vue.withCtx(() => [
|
|
6321
|
+
vue.createVNode(vue.unref(ElementPlusIconsVue.DocumentCopy))
|
|
6322
|
+
]),
|
|
6323
|
+
_: 1
|
|
6324
|
+
/* STABLE */
|
|
6325
|
+
})
|
|
6326
|
+
]),
|
|
6327
|
+
_: 1
|
|
6328
|
+
/* STABLE */
|
|
6329
|
+
})
|
|
6330
|
+
]),
|
|
6331
|
+
_: 1
|
|
6332
|
+
/* STABLE */
|
|
6333
|
+
})) : vue.createCommentVNode("v-if", true),
|
|
6334
|
+
__props.showActions && !isUser.value ? (vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElTooltip), {
|
|
6335
|
+
key: 2,
|
|
6280
6336
|
content: "\u91CD\u65B0\u751F\u6210",
|
|
6281
6337
|
placement: "top"
|
|
6282
6338
|
}, {
|
|
@@ -6306,7 +6362,7 @@ ${fileParts.join("\n")}` });
|
|
|
6306
6362
|
})) : vue.createCommentVNode("v-if", true)
|
|
6307
6363
|
]),
|
|
6308
6364
|
vue.createCommentVNode(" \u5206\u652F\u5207\u6362:\u5144\u5F1F\u5206\u652F > 1 \u65F6 "),
|
|
6309
|
-
__props.showBranchSwitch && __props.branch && __props.branch.count > 1 ? (vue.openBlock(), vue.createElementBlock("span",
|
|
6365
|
+
__props.showBranchSwitch && __props.branch && __props.branch.count > 1 ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_16, [
|
|
6310
6366
|
vue.createVNode(vue.unref(elementPlus.ElButton), {
|
|
6311
6367
|
text: "",
|
|
6312
6368
|
size: "small",
|
|
@@ -6329,7 +6385,7 @@ ${fileParts.join("\n")}` });
|
|
|
6329
6385
|
}, 8, ["disabled"]),
|
|
6330
6386
|
vue.createElementVNode(
|
|
6331
6387
|
"span",
|
|
6332
|
-
|
|
6388
|
+
_hoisted_17,
|
|
6333
6389
|
vue.toDisplayString(__props.branch.index) + " / " + vue.toDisplayString(__props.branch.count),
|
|
6334
6390
|
1
|
|
6335
6391
|
/* TEXT */
|
|
@@ -6383,7 +6439,13 @@ ${fileParts.join("\n")}` });
|
|
|
6383
6439
|
showActions: { type: Boolean, required: false, default: true },
|
|
6384
6440
|
showBranchSwitch: { type: Boolean, required: false, default: true },
|
|
6385
6441
|
showUserAvatar: { type: Boolean, required: false, default: true },
|
|
6386
|
-
showUserName: { type: Boolean, required: false, default: true }
|
|
6442
|
+
showUserName: { type: Boolean, required: false, default: true },
|
|
6443
|
+
showAssistantAvatar: { type: Boolean, required: false, default: true },
|
|
6444
|
+
showAssistantName: { type: Boolean, required: false, default: true },
|
|
6445
|
+
userAvatar: { type: String, required: false, default: "" },
|
|
6446
|
+
assistantAvatar: { type: String, required: false, default: "" },
|
|
6447
|
+
userName: { type: String, required: false, default: "" },
|
|
6448
|
+
assistantName: { type: String, required: false, default: "" }
|
|
6387
6449
|
},
|
|
6388
6450
|
emits: ["select", "copy", "regenerate", "branch-change"],
|
|
6389
6451
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
@@ -6414,6 +6476,12 @@ ${fileParts.join("\n")}` });
|
|
|
6414
6476
|
vue.watch(() => props.messages.length, (nv, ov) => {
|
|
6415
6477
|
if (nv > (ov ?? 0)) scrollToBottomIfNear();
|
|
6416
6478
|
});
|
|
6479
|
+
vue.watch(
|
|
6480
|
+
() => props.messages.filter((m) => m.role === "user").length,
|
|
6481
|
+
(nv, ov) => {
|
|
6482
|
+
if (nv > (ov ?? 0)) vue.nextTick(() => scrollToBottom());
|
|
6483
|
+
}
|
|
6484
|
+
);
|
|
6417
6485
|
vue.watch(
|
|
6418
6486
|
() => props.messages.reduce((sum, m) => sum + m.content.length + (m.reasoning?.length ?? 0), 0),
|
|
6419
6487
|
() => scrollToBottomIfNear()
|
|
@@ -6496,6 +6564,12 @@ ${fileParts.join("\n")}` });
|
|
|
6496
6564
|
"show-branch-switch": __props.showBranchSwitch,
|
|
6497
6565
|
"show-user-avatar": __props.showUserAvatar,
|
|
6498
6566
|
"show-user-name": __props.showUserName,
|
|
6567
|
+
"show-assistant-avatar": __props.showAssistantAvatar,
|
|
6568
|
+
"show-assistant-name": __props.showAssistantName,
|
|
6569
|
+
"user-avatar": __props.userAvatar,
|
|
6570
|
+
"assistant-avatar": __props.assistantAvatar,
|
|
6571
|
+
"user-name": __props.userName,
|
|
6572
|
+
"assistant-name": __props.assistantName,
|
|
6499
6573
|
onCopy,
|
|
6500
6574
|
onRegenerate,
|
|
6501
6575
|
onBranchChange: onBranch
|
|
@@ -6516,8 +6590,36 @@ ${fileParts.join("\n")}` });
|
|
|
6516
6590
|
vue.renderSlot(_ctx.$slots, "message-actions", vue.mergeProps({ ref_for: true }, scope))
|
|
6517
6591
|
]),
|
|
6518
6592
|
key: "1"
|
|
6593
|
+
} : void 0,
|
|
6594
|
+
_ctx.$slots["user-avatar"] ? {
|
|
6595
|
+
name: "user-avatar",
|
|
6596
|
+
fn: vue.withCtx(() => [
|
|
6597
|
+
vue.renderSlot(_ctx.$slots, "user-avatar")
|
|
6598
|
+
]),
|
|
6599
|
+
key: "2"
|
|
6600
|
+
} : void 0,
|
|
6601
|
+
_ctx.$slots["assistant-avatar"] ? {
|
|
6602
|
+
name: "assistant-avatar",
|
|
6603
|
+
fn: vue.withCtx(() => [
|
|
6604
|
+
vue.renderSlot(_ctx.$slots, "assistant-avatar")
|
|
6605
|
+
]),
|
|
6606
|
+
key: "3"
|
|
6607
|
+
} : void 0,
|
|
6608
|
+
_ctx.$slots["user-name"] ? {
|
|
6609
|
+
name: "user-name",
|
|
6610
|
+
fn: vue.withCtx((scope) => [
|
|
6611
|
+
vue.renderSlot(_ctx.$slots, "user-name", vue.mergeProps({ ref_for: true }, scope))
|
|
6612
|
+
]),
|
|
6613
|
+
key: "4"
|
|
6614
|
+
} : void 0,
|
|
6615
|
+
_ctx.$slots["assistant-name"] ? {
|
|
6616
|
+
name: "assistant-name",
|
|
6617
|
+
fn: vue.withCtx((scope) => [
|
|
6618
|
+
vue.renderSlot(_ctx.$slots, "assistant-name", vue.mergeProps({ ref_for: true }, scope))
|
|
6619
|
+
]),
|
|
6620
|
+
key: "5"
|
|
6519
6621
|
} : void 0
|
|
6520
|
-
]), 1032, ["message", "branch", "show-actions", "show-branch-switch", "show-user-avatar", "show-user-name"]);
|
|
6622
|
+
]), 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"]);
|
|
6521
6623
|
}),
|
|
6522
6624
|
128
|
|
6523
6625
|
/* KEYED_FRAGMENT */
|
|
@@ -6812,6 +6914,12 @@ ${fileParts.join("\n")}` });
|
|
|
6812
6914
|
centerWelcome: { type: Boolean, required: false, default: true },
|
|
6813
6915
|
showUserAvatar: { type: Boolean, required: false, default: true },
|
|
6814
6916
|
showUserName: { type: Boolean, required: false, default: true },
|
|
6917
|
+
showAssistantAvatar: { type: Boolean, required: false, default: true },
|
|
6918
|
+
showAssistantName: { type: Boolean, required: false, default: true },
|
|
6919
|
+
userAvatar: { type: String, required: false, default: "" },
|
|
6920
|
+
assistantAvatar: { type: String, required: false, default: "" },
|
|
6921
|
+
userName: { type: String, required: false, default: "" },
|
|
6922
|
+
assistantName: { type: String, required: false, default: "" },
|
|
6815
6923
|
placeholder: { type: String, required: false, default: "" },
|
|
6816
6924
|
senderShadow: { type: Boolean, required: false, default: true },
|
|
6817
6925
|
suggestions: { type: Array, required: false, default: () => [] },
|
|
@@ -7077,6 +7185,12 @@ ${fileParts.join("\n")}` });
|
|
|
7077
7185
|
suggestions: __props.suggestions,
|
|
7078
7186
|
"show-user-avatar": __props.showUserAvatar,
|
|
7079
7187
|
"show-user-name": __props.showUserName,
|
|
7188
|
+
"show-assistant-avatar": __props.showAssistantAvatar,
|
|
7189
|
+
"show-assistant-name": __props.showAssistantName,
|
|
7190
|
+
"user-avatar": __props.userAvatar,
|
|
7191
|
+
"assistant-avatar": __props.assistantAvatar,
|
|
7192
|
+
"user-name": __props.userName,
|
|
7193
|
+
"assistant-name": __props.assistantName,
|
|
7080
7194
|
onSelect: onSelectSuggestion,
|
|
7081
7195
|
onCopy,
|
|
7082
7196
|
onRegenerate,
|
|
@@ -7099,14 +7213,42 @@ ${fileParts.join("\n")}` });
|
|
|
7099
7213
|
]),
|
|
7100
7214
|
key: "1"
|
|
7101
7215
|
} : void 0,
|
|
7216
|
+
_ctx.$slots["user-avatar"] ? {
|
|
7217
|
+
name: "user-avatar",
|
|
7218
|
+
fn: vue.withCtx(() => [
|
|
7219
|
+
vue.renderSlot(_ctx.$slots, "user-avatar")
|
|
7220
|
+
]),
|
|
7221
|
+
key: "2"
|
|
7222
|
+
} : void 0,
|
|
7223
|
+
_ctx.$slots["assistant-avatar"] ? {
|
|
7224
|
+
name: "assistant-avatar",
|
|
7225
|
+
fn: vue.withCtx(() => [
|
|
7226
|
+
vue.renderSlot(_ctx.$slots, "assistant-avatar")
|
|
7227
|
+
]),
|
|
7228
|
+
key: "3"
|
|
7229
|
+
} : void 0,
|
|
7230
|
+
_ctx.$slots["user-name"] ? {
|
|
7231
|
+
name: "user-name",
|
|
7232
|
+
fn: vue.withCtx((scope) => [
|
|
7233
|
+
vue.renderSlot(_ctx.$slots, "user-name", vue.normalizeProps(vue.guardReactiveProps(scope)))
|
|
7234
|
+
]),
|
|
7235
|
+
key: "4"
|
|
7236
|
+
} : void 0,
|
|
7237
|
+
_ctx.$slots["assistant-name"] ? {
|
|
7238
|
+
name: "assistant-name",
|
|
7239
|
+
fn: vue.withCtx((scope) => [
|
|
7240
|
+
vue.renderSlot(_ctx.$slots, "assistant-name", vue.normalizeProps(vue.guardReactiveProps(scope)))
|
|
7241
|
+
]),
|
|
7242
|
+
key: "5"
|
|
7243
|
+
} : void 0,
|
|
7102
7244
|
_ctx.$slots.empty ? {
|
|
7103
7245
|
name: "empty",
|
|
7104
7246
|
fn: vue.withCtx(() => [
|
|
7105
7247
|
vue.renderSlot(_ctx.$slots, "empty")
|
|
7106
7248
|
]),
|
|
7107
|
-
key: "
|
|
7249
|
+
key: "6"
|
|
7108
7250
|
} : void 0
|
|
7109
|
-
]), 1032, ["messages", "nodes", "name", "suggestions", "show-user-avatar", "show-user-name"]),
|
|
7251
|
+
]), 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"]),
|
|
7110
7252
|
__props.features?.artifacts && artifacts.value.length ? (vue.openBlock(), vue.createBlock(_sfc_main$1, {
|
|
7111
7253
|
key: 0,
|
|
7112
7254
|
artifacts: artifacts.value,
|