@assistant-ui/react 0.5.50 → 0.5.51
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 +3 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -2869,9 +2869,9 @@ var createActionButton = (displayName, useActionButton, forwardProps = []) => {
|
|
2869
2869
|
_reactprimitive.Primitive.button,
|
2870
2870
|
{
|
2871
2871
|
type: "button",
|
2872
|
-
disabled: !callback,
|
2873
2872
|
...primitiveProps,
|
2874
2873
|
ref: forwardedRef,
|
2874
|
+
disabled: primitiveProps.disabled || !callback,
|
2875
2875
|
onClick: _primitive.composeEventHandlers.call(void 0, primitiveProps.onClick, () => {
|
2876
2876
|
_optionalChain([callback, 'optionalCall', _112 => _112()]);
|
2877
2877
|
})
|
@@ -4049,6 +4049,8 @@ var useMessageContext2 = (messageIndex) => {
|
|
4049
4049
|
throw new Error(
|
4050
4050
|
"Tried to edit a non-user message. Editing is only supported for user messages. This is likely an internal bug in assistant-ui."
|
4051
4051
|
);
|
4052
|
+
const previousText = getThreadMessageText(message);
|
4053
|
+
if (previousText === text) return;
|
4052
4054
|
const nonTextParts = message.content.filter(
|
4053
4055
|
(part) => part.type !== "text" && part.type !== "ui"
|
4054
4056
|
);
|