You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix send button disabled logic: the send button now remains enabled during loading state (even with empty message body) to allow users to stop the request. The `disabled` and `disableSend` props still take precedence.
7
+
8
+
Add `onClickStopButton` prop to handle stop actions during loading state. When triggered, the previous message body is restored to the input field (similar to error state behavior).
|`badgeText`|`string`| Determines the text inside the rendered Badge ||
66
+
|`darkMode`|`boolean`| Determines if the component will render in dark mode |`false`|
67
+
|`disabled`|`boolean`| Determines whether the user can interact with the InputBar |`false`|
68
+
|`disableSend`|`boolean`| When defined as `true`, disables the send action and button ||
69
+
|`errorMessage`|`ReactNode`| Custom error message to display when `state='error'`||
70
+
|`onClickStopButton`|`() => void`| Callback fired when the stop button is clicked during a loading state. Restores the previous message body. Only applies in compact variant. ||
71
+
|`onMessageSend`|`(messageBody: string, e?: FormEvent) => void`| Callback fired when the user sends a message. ||
72
+
|`shouldRenderGradient`|`boolean`| Toggles the gradient animation around the input |`true`|
73
+
|`shouldRenderHotkeyIndicator`|`boolean`| Toggles the hotkey indicator on the right side of the input |`false`|
74
+
|`textareaProps`|`TextareaAutosizeProps`| Props passed to the TextareaAutosize component. ||
75
+
|`textareaRef`|`RefObject<HTMLTextAreaElement>`| Ref object to access the textarea element directly ||
76
+
|`state`|`'unset' \| 'error' \| 'loading'`| The current state of the InputBar. ||
77
+
|`...`|`HTMLElementProps<'form'>`| Props spread on the root element ||
0 commit comments