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 973c74e commit 7e807aaCopy full SHA for 7e807aa
packages/gitbook/src/components/AI/useAIChat.tsx
@@ -137,7 +137,13 @@ export function useAIChatController(): AIChatController {
137
138
switch (event.type) {
139
case 'response_finish': {
140
- setState((state) => ({ ...state, responseId: event.responseId }));
+ setState((state) => ({
141
+ ...state,
142
+ responseId: event.responseId,
143
+ // Mark as not loading when the response is finished
144
+ // Even if the stream might continue as we receive 'response_followup_suggestion'
145
+ loading: false,
146
+ }));
147
break;
148
}
149
case 'response_followup_suggestion': {
0 commit comments