opencode icon indicating copy to clipboard operation
opencode copied to clipboard

fix(desktop): enable store auto-save to persist data

Open kay120 opened this issue 4 days ago • 2 comments

Fixes #7637

问题

Desktop app 中使用 Tauri Store 时,数据无法持久化,导致错误: "Item with id 'xxx' not found. Items are not persisted when 'store' is set to false."

修复

在 Tauri Store 插件初始化时添加 auto_save 配置,每 100ms 自动保存一次。

变更

  • 修改 packages/desktop/src-tauri/src/lib.rs 中的 Store 初始化配置
  • 添加 auto_save(Duration::from_millis(100)) 参数

kay120 avatar Jan 10 '26 12:01 kay120