balibabu
commited on
Commit
·
ebd2f75
1
Parent(s):
2b25c26
fix: all documents in the knowledge base cannot be selected if they have not been parsed. #214 (#215)
Browse files### What problem does this PR solve?
fix: all documents in the knowledge base cannot be selected if they have
not been parsed.
Issue link: #214
### Type of change
- [x] Bug Fix (non-breaking change which fixes an issue)
web/src/hooks/knowledgeHook.ts
CHANGED
@@ -135,7 +135,7 @@ export const useFetchKnowledgeList = (
|
|
135 |
const { data = [] } = knowledgeModel;
|
136 |
const list = useMemo(() => {
|
137 |
return shouldFilterListWithoutDocument
|
138 |
-
? data.filter((x: IKnowledge) => x.
|
139 |
: data;
|
140 |
}, [data, shouldFilterListWithoutDocument]);
|
141 |
|
|
|
135 |
const { data = [] } = knowledgeModel;
|
136 |
const list = useMemo(() => {
|
137 |
return shouldFilterListWithoutDocument
|
138 |
+
? data.filter((x: IKnowledge) => x.chunk_num > 0)
|
139 |
: data;
|
140 |
}, [data, shouldFilterListWithoutDocument]);
|
141 |
|