An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:sparkles: Support for searching asset content https://github.com/siyuan-note/siyuan/issues/8874
Daniela169b3913a23
diff --git a/kernel/model/asset_content.go b/kernel/model/asset_content.goindex 6a1e5cd55b..8c762f274f 100644--- a/kernel/model/asset_content.go+++ b/kernel/model/asset_content.go@@ -444,9 +444,12 @@ func copyTempAsset(absPath string) (ret string) {return}+ filelock.RWLock.Lock()+ defer filelock.RWLock.Unlock()+ret = filepath.Join(dir, gulu.Rand.String(7)+".docx")- if err := filelock.Copy(absPath, ret); nil != err {- logging.LogErrorf("copy [%s] to [%s] failed: [%s]", absPath, ret, err)+ if err := gulu.File.Copy(absPath, ret); nil != err {+ logging.LogErrorf("copy [src=%s, dest=%s] failed: %s", absPath, ret, err)return}returndiff --git a/kernel/model/assets_watcher.go b/kernel/model/assets_watcher.goindex d56a818497..18771a62d5 100644--- a/kernel/model/assets_watcher.go+++ b/kernel/model/assets_watcher.go@@ -73,6 +73,11 @@ func watchAssets() {lastEvent = eventtimer.Reset(time.Millisecond * 100)++ if lastEvent.Op&fsnotify.Rename == fsnotify.Rename {+ // 索引资源文件内容+ IndexAssetContent(lastEvent.Name)+ }case err, ok := <-assetsWatcher.Errors:if !ok {return