fix: datasource and mcp data updates (#614)

This commit is contained in:
BiggerRain
2025-06-06 11:11:33 +08:00
committed by GitHub
parent d410f20864
commit 1296755bc5
2 changed files with 4 additions and 2 deletions

View File

@@ -44,6 +44,7 @@ export default function MCPPopover({
const MCPIds = useSearchStore((state) => state.MCPIds);
const setMCPIds = useSearchStore((state) => state.setMCPIds);
const currentAssistant = useConnectStore((state) => state.currentAssistant);
const currentService = useConnectStore((state) => state.currentService);
const [keyword, setKeyword] = useState("");
@@ -98,7 +99,7 @@ export default function MCPPopover({
useEffect(() => {
connected && getDataSourceList();
}, [connected, currentService?.id, debouncedKeyword]);
}, [connected, currentService?.id, debouncedKeyword, currentAssistant]);
useEffect(() => {
setTotalPage(Math.max(Math.ceil(dataList.length / 10), 1));

View File

@@ -44,6 +44,7 @@ export default function SearchPopover({
const sourceDataIds = useSearchStore((state) => state.sourceDataIds);
const setSourceDataIds = useSearchStore((state) => state.setSourceDataIds);
const currentAssistant = useConnectStore((state) => state.currentAssistant);
const currentService = useConnectStore((state) => state.currentService);
const [keyword, setKeyword] = useState("");
@@ -101,7 +102,7 @@ export default function SearchPopover({
useEffect(() => {
connected && getDataSourceList();
}, [connected, currentService?.id, debouncedKeyword]);
}, [connected, currentService?.id, debouncedKeyword, currentAssistant]);
useEffect(() => {
setTotalPage(Math.max(Math.ceil(dataSourceList.length / 10), 1));