Skip to content

Commit 0b6a6a5

Browse files
committed
RM tweaks.
1 parent 5070152 commit 0b6a6a5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,13 +140,15 @@ const formSubmit = async (e: React.FormEvent) => {
140140

141141
// chat-message.tsx, maybe?
142142
import { useStream } from "@convex-dev/persistent-text-streaming/react";
143+
143144
// ...
145+
144146
// In our component:
145147
const { text, status } = useStream(
146148
api.chat.getChatBody, // The query to call for the full stream body
147149
new URL(`${convexSiteUrl}/chat-stream`), // The HTTP endpoint for streaming
148-
driven, // Set to true if this browser session created this chat and so should generate the stream
149-
message.streamId as StreamId // The streamId of the chat to subscribe to!
150+
driven, // True if this browser session created this chat and should generate the stream
151+
chat.streamId as StreamId // The streamId from the chat database record
150152
);
151153
```
152154

0 commit comments

Comments
 (0)