Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: 识别未引用资源时考虑 PDF 标注引用 https://github.com/siyuan-note/siyuan/issues/5392

Liang Ding914712612d61
diff --git a/kernel/model/assets.go b/kernel/model/assets.go
index ffafd85cd6..eb73084f03 100644
--- a/kernel/model/assets.go
+++ b/kernel/model/assets.go
@@ -516,11 +516,11 @@ func UnusedAssets() (ret []string) {
}
}
- // 排除文件注解
+ // 排除文件注解和对应文件
var toRemoves []string
for asset, _ := range assetsPathMap {
if strings.HasSuffix(asset, ".sya") {
- toRemoves = append(toRemoves, asset)
+ toRemoves = append(toRemoves, asset, strings.TrimSuffix(asset, ".sya"))
}
}
for _, toRemove := range toRemoves {