@assistant-ui/react 0.5.12 → 0.5.14
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.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
@@ -1198,7 +1198,7 @@ var getContentPartState = ({ message }, useContentPart, partIndex) => {
|
|
1198
1198
|
if (message.content.length === 0 && partIndex === 0) {
|
1199
1199
|
part = EMPTY_CONTENT;
|
1200
1200
|
} else {
|
1201
|
-
return;
|
1201
|
+
return null;
|
1202
1202
|
}
|
1203
1203
|
}
|
1204
1204
|
const status = toContentPartStatus(message, partIndex, part);
|
@@ -1834,6 +1834,7 @@ var getIsLast = (messages, message) => {
|
|
1834
1834
|
var getMessageState = (messages, getBranches, useMessage, messageIndex) => {
|
1835
1835
|
const parentId = messages[messageIndex - 1]?.id ?? null;
|
1836
1836
|
const message = messages[messageIndex];
|
1837
|
+
if (!message) return null;
|
1837
1838
|
const isLast = getIsLast(messages, message);
|
1838
1839
|
const branches = getBranches(message.id);
|
1839
1840
|
const currentState = useMessage?.getState();
|