File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ import { SettingsModal } from './SettingsModal'
28
28
import { getCompletionStream } from './util'
29
29
import { OutlineButtonBlack } from './generics/Buttons'
30
30
import useCurrentUser from '../../hooks/useCurrentUser'
31
+ import { enqueueSnackbar } from 'notistack'
31
32
32
33
export const ChatV2 = ( ) => {
33
34
const { courseId } = useParams ( )
@@ -243,6 +244,7 @@ export const ChatV2 = () => {
243
244
244
245
if ( ! stream ) {
245
246
console . error ( 'Stream is undefined' )
247
+ handleCancel ( )
246
248
return
247
249
}
248
250
@@ -261,6 +263,7 @@ export const ChatV2 = () => {
261
263
}
262
264
} catch ( err : any ) {
263
265
console . error ( err )
266
+ handleCancel ( )
264
267
}
265
268
}
266
269
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ const PostStreamSchemaV2 = z.object({
57
57
saveConsent : z . boolean ( ) . optional ( ) ,
58
58
prevResponseId : z . string ( ) . optional ( ) ,
59
59
courseId : z . string ( ) . optional ( ) ,
60
- ragIndexId : z . number ( ) . optional ( ) ,
60
+ ragIndexId : z . number ( ) . optional ( ) . nullable ( ) ,
61
61
} ) ,
62
62
courseId : z . string ( ) . optional ( ) ,
63
63
} )
You can’t perform that action at this time.
0 commit comments