fix(core): filter embedding results to return only user-selected tags and documents (#11770)

Close [AI-73](https://linear.app/affine-design/issue/AI-73)
This commit is contained in:
akumatus
2025-04-18 03:25:29 +00:00
parent d71cbd5fd3
commit 203e931e30
4 changed files with 53 additions and 6 deletions

View File

@@ -77,6 +77,11 @@ export function useAIChatConfig() {
const collections$ = collectionService.collections$;
return createSignalFromObservable(collections$, []);
},
getCollectionPageIds: (collectionId: string) => {
const collection$ = collectionService.collection$(collectionId);
// TODO: lack of documents that meet the collection rules
return collection$?.value?.allowList ?? [];
},
};
const searchMenuConfig = {