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.
1 parent ea7e94f commit 388b20dCopy full SHA for 388b20d
.changeset/soft-bikes-warn.md
@@ -0,0 +1,5 @@
1
+---
2
+"gitbook": patch
3
4
+
5
+Clear AI chat properly
packages/gitbook/src/components/AI/useAIChat.tsx
@@ -187,6 +187,8 @@ export function useAIChatController(): AIChatController {
187
for await (const data of stream) {
188
if (!data) continue;
189
190
+ if (globalState.getState().state.query !== input.message) break; // Chat was cleared, stop processing the stream
191
192
const event = data.event;
193
194
switch (event.type) {
0 commit comments