🛠️ fix: Conversation Navigation State (#7210)

* refactor: Enhance initial conversation query condition for better state management and prevent unused network requests

* ifx: Add Prettier plugin to ESLint configuration

* chore: linting and typing in convos.spec.ts

* fix: add back fresh data fetching and improve error handling for  conversation navigation

* fix: set conversation only with  conversation state change intent, to prevent double queries for messages
This commit is contained in:
Danny Avila 2025-05-04 10:44:40 -04:00 committed by GitHub
parent ddb2141eac
commit 6e663b2480
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 52 additions and 23 deletions

View file

@ -43,7 +43,8 @@ export default function ChatRoute() {
refetchOnMount: 'always',
});
const initialConvoQuery = useGetConvoIdQuery(conversationId, {
enabled: isAuthenticated && conversationId !== Constants.NEW_CONVO,
enabled:
isAuthenticated && conversationId !== Constants.NEW_CONVO && !hasSetConversation.current,
});
const endpointsQuery = useGetEndpointsQuery({ enabled: isAuthenticated });
const assistantListMap = useAssistantListMap();