From 9d5f58a0f303bde885b72e65d3f64c4d4c15c221 Mon Sep 17 00:00:00 2001 From: Zane <75694352+zanesq@users.noreply.github.com> Date: Sun, 3 Aug 2025 01:21:24 -0700 Subject: [PATCH] fix session resume in new window (#3800) --- ui/desktop/src/hooks/useChat.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ui/desktop/src/hooks/useChat.ts b/ui/desktop/src/hooks/useChat.ts index 7db74e5a..b7d09ea5 100644 --- a/ui/desktop/src/hooks/useChat.ts +++ b/ui/desktop/src/hooks/useChat.ts @@ -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