Clear AI chat stream properly (#3544)

This commit is contained in:
Zeno Kapitein
2025-08-07 19:07:25 +02:00
committed by GitHub
parent ea7e94fc51
commit 388b20d44f
2 changed files with 7 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
---
"gitbook": patch
---
Clear AI chat properly
@@ -187,6 +187,8 @@ export function useAIChatController(): AIChatController {
for await (const data of stream) {
if (!data) continue;
if (globalState.getState().state.query !== input.message) break; // Chat was cleared, stop processing the stream
const event = data.event;
switch (event.type) {