@smartspace/chat-ui 1.13.1-pr.389.323eee6 → 1.13.1-pr.393.e0707fc
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/dist/index.js +26 -20
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -20179,25 +20179,28 @@ var MessageItem = ({
|
|
|
20179
20179
|
let groupOpen = false;
|
|
20180
20180
|
let keyCounter = 0;
|
|
20181
20181
|
let lastStatusNode = null;
|
|
20182
|
+
const groupHasAnything = () => groupContent.length > 0 || groupFiles.length > 0 || groupSources.length > 0;
|
|
20182
20183
|
const flush = (nextType) => {
|
|
20183
|
-
|
|
20184
|
-
|
|
20185
|
-
|
|
20186
|
-
|
|
20187
|
-
|
|
20188
|
-
|
|
20189
|
-
|
|
20190
|
-
|
|
20191
|
-
|
|
20192
|
-
|
|
20193
|
-
|
|
20194
|
-
|
|
20195
|
-
|
|
20196
|
-
|
|
20197
|
-
|
|
20198
|
-
|
|
20199
|
-
|
|
20200
|
-
|
|
20184
|
+
if (groupHasAnything()) {
|
|
20185
|
+
bubbles.push(
|
|
20186
|
+
/* @__PURE__ */ jsx(
|
|
20187
|
+
MessageBubble,
|
|
20188
|
+
{
|
|
20189
|
+
createdBy: lastCreatedBy,
|
|
20190
|
+
createdByUserId: lastCreatedByUserId,
|
|
20191
|
+
createdAt: lastCreatedAt,
|
|
20192
|
+
type: groupType,
|
|
20193
|
+
content: groupContent,
|
|
20194
|
+
files: groupFiles,
|
|
20195
|
+
sources: groupSources,
|
|
20196
|
+
chatbotName,
|
|
20197
|
+
userOutput: null,
|
|
20198
|
+
userInput: null
|
|
20199
|
+
},
|
|
20200
|
+
`bubble-${message.id ?? "msg"}-${keyCounter++}`
|
|
20201
|
+
)
|
|
20202
|
+
);
|
|
20203
|
+
}
|
|
20201
20204
|
groupContent = [];
|
|
20202
20205
|
groupFiles = [];
|
|
20203
20206
|
groupSources = [];
|
|
@@ -20229,6 +20232,9 @@ var MessageItem = ({
|
|
|
20229
20232
|
case "prompt":
|
|
20230
20233
|
case "response":
|
|
20231
20234
|
case "content": {
|
|
20235
|
+
if (v.value === "") {
|
|
20236
|
+
continue;
|
|
20237
|
+
}
|
|
20232
20238
|
lastStatusNode = null;
|
|
20233
20239
|
if (groupContent.length > 0) flush(v.type);
|
|
20234
20240
|
if (v.value == null) {
|
|
@@ -20283,7 +20289,7 @@ var MessageItem = ({
|
|
|
20283
20289
|
}
|
|
20284
20290
|
case "sources": {
|
|
20285
20291
|
groupSources = coerceSources(v.value);
|
|
20286
|
-
groupOpen = true;
|
|
20292
|
+
if (groupSources.length > 0) groupOpen = true;
|
|
20287
20293
|
break;
|
|
20288
20294
|
}
|
|
20289
20295
|
default: {
|
|
@@ -20297,7 +20303,7 @@ var MessageItem = ({
|
|
|
20297
20303
|
lastCreatedBy = v.createdBy;
|
|
20298
20304
|
lastCreatedByUserId = v.createdByUserId;
|
|
20299
20305
|
}
|
|
20300
|
-
if (groupOpen) {
|
|
20306
|
+
if (groupOpen && groupHasAnything()) {
|
|
20301
20307
|
bubbles.push(
|
|
20302
20308
|
/* @__PURE__ */ jsx(
|
|
20303
20309
|
MessageBubble,
|