An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:art: Support resetting the learning progress of flashcards https://github.com/siyuan-note/siyuan/issues/9564
Daniel342f76484053
diff --git a/kernel/model/flashcard.go b/kernel/model/flashcard.goindex 240727ba0d..1914591333 100644--- a/kernel/model/flashcard.go+++ b/kernel/model/flashcard.go@@ -44,10 +44,20 @@ func ResetFlashcards(typ, id, deckID string, blockIDs []string) {if 0 < len(blockIDs) {if "" == deckID {+ for _, deck := range Decks {+ allBlockIDs := deck.GetBlockIDs()+ for _, blockID := range blockIDs {+ if gulu.Str.Contains(blockID, allBlockIDs) {+ deckID = deck.ID+ break+ }+ }+ resetFlashcards(deckID, blockIDs)+ }deckID = builtinDeckID+ } else {+ resetFlashcards(deckID, blockIDs)}-- resetFlashcards(deckID, blockIDs)return}