Skip to content

Commit bb59bd5

Browse files
committed
fix(FR-1772): add throttle to reduce lag in chat rendering (#4793)
resolves #4790 (FR-1772) Adds experimental throttling to the chat component with a 100ms delay between message chunks. This helps control the rate at which messages are processed and displayed, providing a smoother user experience. **Checklist:** - [ ] Documentation - [ ] Minium required manager version - [ ] Specific setting for review (eg., KB link, endpoint or how to setup) - [ ] Minimum requirements to check during review - [ ] Test case(s) to demonstrate the difference of before/after
1 parent c6e4235 commit bb59bd5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

react/src/components/Chat/ChatCard.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,7 @@ const PureChatCard: React.FC<ChatCardProps> = ({
240240
const [input, setInput] = useState('');
241241

242242
const { error, messages, stop, status, sendMessage, setMessages } = useChat({
243+
experimental_throttle: 100,
243244
messages: chat.messages,
244245
onFinish: () => {
245246
setStartTime(null);

0 commit comments

Comments
 (0)