feat(chat): resume chat stream

This commit is contained in:
lawvs 2025-10-30 05:30:33 +08:00
parent 29e8b2d6fb
commit 54ffd65e10
2 changed files with 3 additions and 1 deletions

View File

@ -36,6 +36,7 @@ export class ChatSliceActions {
private params: Parameters<StateCreator<ChatSlice, [], [], ChatSlice>>,
private chatInstance: ZustandChat,
) {
this.chatInstance.resumeStream()
return autoBindThis(this)
}
@ -280,6 +281,7 @@ export class ChatSliceActions {
chatInstance: newChatInstance,
}))
newChatInstance.resumeStream()
// Update the reference
this.chatInstance = newChatInstance
} catch (error) {

View File

@ -17,7 +17,7 @@ interface EntryContentFallbackProps {
* 3. Error boundary for entry not found cases
*/
export const EntryContentFallback = memo(({ entryId, children }: EntryContentFallbackProps) => {
const { data: realEntry, isLoading: loadingRemoteEntry } = usePrefetchEntryDetail(entryId)
const { data: realEntry, isPending: loadingRemoteEntry } = usePrefetchEntryDetail(entryId)
if (!loadingRemoteEntry && !realEntry) {
// 404