Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

Allows quick entry of entities separated by commas (#3914)

so955fe079168402
diff --git a/web/src/components/edit-tag/index.tsx b/web/src/components/edit-tag/index.tsx
index 1c9f0aee84..aac8143b40 100644
--- a/web/src/components/edit-tag/index.tsx
+++ b/web/src/components/edit-tag/index.tsx
@@ -37,8 +37,12 @@ const EditTag = ({ tags, setTags }: EditTagsProps) => {
};
const handleInputConfirm = () => {
- if (inputValue && tags?.indexOf(inputValue) === -1) {
- setTags?.([...tags, inputValue]);
+ if (inputValue && tags) {
+ const newTags = inputValue
+ .split(';')
+ .map((tag) => tag.trim())
+ .filter((tag) => tag && !tags.includes(tag));
+ setTags?.([...tags, ...newTags]);
}
setInputVisible(false);
setInputValue('');