diff --git a/ui/admin/app/components/knowledge/AgentKnowledgePanel.tsx b/ui/admin/app/components/knowledge/AgentKnowledgePanel.tsx index ea93c431..91ebbb53 100644 --- a/ui/admin/app/components/knowledge/AgentKnowledgePanel.tsx +++ b/ui/admin/app/components/knowledge/AgentKnowledgePanel.tsx @@ -97,7 +97,7 @@ export default function AgentKnowledgePanel({ ), { revalidateOnFocus: false, - refreshInterval: blockPollingLocalFiles ? undefined : 1000, + refreshInterval: blockPollingLocalFiles ? undefined : 5000, } ); const localFiles = useMemo( @@ -110,7 +110,7 @@ export default function AgentKnowledgePanel({ ({ agentId }) => KnowledgeService.getKnowledgeSourcesForAgent(agentId), { revalidateOnFocus: false, - refreshInterval: blockPollingSources ? undefined : 1000, + refreshInterval: blockPollingSources ? undefined : 5000, } ); const knowledgeSources = useMemo( diff --git a/ui/admin/app/components/knowledge/KnowledgeSourceDetail.tsx b/ui/admin/app/components/knowledge/KnowledgeSourceDetail.tsx index 2e29ab91..4f302b27 100644 --- a/ui/admin/app/components/knowledge/KnowledgeSourceDetail.tsx +++ b/ui/admin/app/components/knowledge/KnowledgeSourceDetail.tsx @@ -97,7 +97,7 @@ const KnowledgeSourceDetail: FC = ({ ), { revalidateOnFocus: false, - refreshInterval: blockPollingFiles ? undefined : 1000, + refreshInterval: blockPollingFiles ? undefined : 5000, } ); @@ -156,7 +156,7 @@ const KnowledgeSourceDetail: FC = ({ if (knowledgeSource.state === KnowledgeSourceStatus.Synced) { getFiles.mutate(); } - }, [knowledgeSource, getFiles]); + }, [knowledgeSource]); const onSourceUpdate = async (syncSchedule: string) => { const updatedSource = await KnowledgeService.updateKnowledgeSource( @@ -176,8 +176,9 @@ const KnowledgeSourceDetail: FC = ({ file.id, approved ); - getFiles.mutate((files) => - files?.map((f) => (f.id === file.id ? updatedFile : f)) + getFiles.mutate( + (files) => files?.map((f) => (f.id === file.id ? updatedFile : f)), + false ); }; @@ -203,8 +204,9 @@ const KnowledgeSourceDetail: FC = ({ file.id, knowledgeSource.id ); - getFiles.mutate((files) => - files?.map((f) => (f.id === file.id ? updatedFile : f)) + getFiles.mutate( + (files) => files?.map((f) => (f.id === file.id ? updatedFile : f)), + false ); };