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
- created a new hook, `useSendMessageWithRetries`, that sends a message to the chat API, and perform retries if the API returns a 5xx status code.
- updated `ChatInput` and `MessageSuggestions` component to use the new hook to retry once for failed 5xx responses.
- updated `ChatPanel` to show a retry text next to loading dots ("Error occurred. Retrying")
Will deploy a new minor (0.9.0) once merged
J=CLIP-1189
TEST=manual&auto
see unit tests passed
see that it works as expected in test-site
https://github.com/yext/chat-ui-react/assets/36055303/272ee401-11cc-410e-a048-a3634b063917
| [header?](./chat-ui-react.chatpanelprops.header.md) | | ReactNode | _(Optional)_ A header to render at the top of the panel. |
23
23
| [messageSuggestions?](./chat-ui-react.chatpanelprops.messagesuggestions.md) | | string\[\] | _(Optional)_ A set of pre-written initial messages that the user can click on instead of typing their own. |
24
24
| [onLinkClick?](./chat-ui-react.chatpanelprops.onlinkclick.md) | | (href?: string) => void | _(Optional)_ A callback which is called when user clicks a link. |
25
+
| [retryText?](./chat-ui-react.chatpanelprops.retrytext.md) | | string | _(Optional)_ Text to display when retrying. Defaults to "Error occurred. Retrying". |
Copy file name to clipboardExpand all lines: docs/chat-ui-react.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@
9
9
| Function | Description |
10
10
| --- | --- |
11
11
|[ChatHeader({ title, showRestartButton, restartButtonIcon, showCloseButton, closeButtonIcon, onClose, customCssClasses, })](./chat-ui-react.chatheader.md)| A component that renders the header of a chat bot panel, including the title and a button to reset the conversation. |
12
-
|[ChatInput({ placeholder, stream, inputAutoFocus, handleError, sendButtonIcon, customCssClasses, onSend, })](./chat-ui-react.chatinput.md)| A component that allows user to input message and send to Chat API. |
12
+
|[ChatInput({ placeholder, stream, inputAutoFocus, handleError, sendButtonIcon, customCssClasses, onSend, onRetry, })](./chat-ui-react.chatinput.md)| A component that allows user to input message and send to Chat API. |
13
13
|[ChatPanel(props)](./chat-ui-react.chatpanel.md)| A component that renders a full panel for chat bot interactions. This includes the message bubbles for the conversation, input box with send button, and header (if provided). |
14
14
|[ChatPopUp(props)](./chat-ui-react.chatpopup.md)| A component that renders a popup button that displays and hides a panel for chat bot interactions. |
15
15
|[MessageBubble({ message, showFeedbackButtons, showTimestamp, customCssClasses, formatTimestamp, onLinkClick, })](./chat-ui-react.messagebubble.md)| A component that displays the provided message. |
0 commit comments