fix session resume in new window (#3800)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { useEffect, useState } from 'react';
|
||||
import { ChatType } from '../types/chat';
|
||||
import { fetchSessionDetails, generateSessionId } from '../sessions';
|
||||
import { ensureClientInitialized } from '../utils';
|
||||
import { View, ViewOptions } from '../App';
|
||||
|
||||
type UseChatArgs = {
|
||||
@@ -29,6 +30,7 @@ export const useChat = ({ setIsLoadingSession, setView, setPairChat }: UseChatAr
|
||||
|
||||
setIsLoadingSession(true);
|
||||
try {
|
||||
await ensureClientInitialized();
|
||||
const sessionDetails = await fetchSessionDetails(resumeSessionId);
|
||||
|
||||
// Only set view if we have valid session details
|
||||
|
||||
Reference in New Issue
Block a user