feat: Auto-select newly added knowledge base

This commit is contained in:
ousugo 2025-02-22 23:17:30 +08:00 committed by 亢奋猫
parent f59f6ade69
commit 6b34aac263

View File

@ -22,7 +22,10 @@ const KnowledgePage: FC = () => {
const [isDragging, setIsDragging] = useState(false)
const handleAddKnowledge = async () => {
await AddKnowledgePopup.show({ title: t('knowledge.add.title') })
const newBase = await AddKnowledgePopup.show({ title: t('knowledge.add.title') })
if (newBase) {
setSelectedBase(newBase)
}
}
useEffect(() => {