We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 835bc39 + e055cee commit 178a06aCopy full SHA for 178a06a
src/hooks/useVapiChat.ts
@@ -127,9 +127,9 @@ export const handleStreamChunk = (
127
128
// Since we pre-allocated, we know the index is always valid
129
if (assistantMessageIndexRef.current !== null) {
130
+ const targetIndex = assistantMessageIndexRef.current!;
131
setMessages((prev) => {
132
const newMessages = [...prev];
- const targetIndex = assistantMessageIndexRef.current!;
133
134
if (targetIndex < newMessages.length) {
135
newMessages[targetIndex] = {
0 commit comments