Skip to content

Commit 5e9d41e

Browse files
authored
fix: datasource & MCP list synchronization update (#521)
* fix: datasource & MCP list update * docs: update notes * docs:update notes
1 parent 8bdb93d commit 5e9d41e

4 files changed

Lines changed: 6 additions & 3 deletions

File tree

docs/content.en/docs/release-notes/_index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ Information about release notes of Coco Server is provided here.
3131
- fix: several issues around search #502
3232
- fix: fixed the newly created session has no title when it is deleted #511
3333
- fix: loading chat history for potential empty attachments
34+
- fix: datasource & MCP list synchronization update #521
3435

3536
### ✈️ Improvements
3637

src/components/Assistant/AssistantList.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,9 @@ export function AssistantList({ assistantIDs = [] }: AssistantListProps) {
8585
if (debounceKeyword || assistantIDs.length > 0) {
8686
body.query = {
8787
bool: {
88-
must: [],
88+
must: [
89+
{term: {"enabled": true}}
90+
],
8991
},
9092
};
9193
if (debounceKeyword) {

src/components/Search/MCPPopover.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ export default function MCPPopover({
8484
setDataList([]);
8585
console.error("datasource_search", err);
8686
}
87-
}, [currentService?.id, debouncedKeyword]);
87+
}, [currentService?.id, debouncedKeyword, getMCPByServer]);
8888

8989
const popoverButtonRef = useRef<HTMLButtonElement>(null);
9090
const mcpSearch = useShortcutsStore((state) => state.mcpSearch);

src/components/Search/SearchPopover.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ export default function SearchPopover({
8787
setDataSourceList([]);
8888
console.error("datasource_search", err);
8989
}
90-
}, [currentService?.id, debouncedKeyword]);
90+
}, [currentService?.id, debouncedKeyword, getDataSourcesByServer]);
9191

9292
const popoverButtonRef = useRef<HTMLButtonElement>(null);
9393
const internetSearch = useShortcutsStore((state) => state.internetSearch);

0 commit comments

Comments
 (0)