mirror of
https://github.com/infinilabs/coco-app.git
synced 2025-12-16 11:37:47 +01:00
fix: datasource and mcp data updates (#614)
This commit is contained in:
@@ -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));
|
||||
|
||||
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user