Use SQLite instead of JSON storage

This commit is contained in:
2025-06-29 23:41:34 +08:00
parent 6f8775472d
commit 70d88dabba
25 changed files with 807 additions and 636 deletions

View File

@@ -74,19 +74,13 @@ func NewServiceManager() *ServiceManager {
}
// 设置数据路径变更监听,处理配置重置和路径变更
err = configService.SetDataPathChangeCallback(func(oldPath, newPath string) error {
return documentService.OnDataPathChanged(oldPath, newPath)
err = configService.SetDataPathChangeCallback(func() error {
return documentService.OnDataPathChanged()
})
if err != nil {
panic(err)
}
// 初始化文档服务
err = documentService.Initialize()
if err != nil {
panic(err)
}
return &ServiceManager{
configService: configService,
documentService: documentService,