Files
MooTool/next-compose/docs/diff/393-settings-data-directory-runtime.md
RememBerBerandCursor c834db2a83 feat(next-compose): 对照 Electron 落地 F00–F25 与 A01–A03 主体能力
将 Vault/Git/MCP/AI、壳层主题密度、25 工具真实闭环与 desktopTest 638 项及 DIFF-065–471 文档/证据一并纳入仓库,便于持续对齐验收;产品窗 IME/冲突与三平台发行仍待验。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-17 06:51:45 +08:00

22 lines
954 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# DIFF-393:设置数据目录与运行时有效 `dataRoot`
## 背景
Electron 设置页可编辑 `settings.data.directory`,变更后重开数据仓库并撤销 AI Vault 授权。Compose 此前仅展示固定 `directories.dataRoot`,`data.directory` 写入设置但不生效。
## 行为
- `DataPathConfig`:空串保留产品默认 `dataRoot`;非空须绝对路径(加载时清除非法值)。
- `AppContainer.dataDirectories()`:Vault、Host/HTTP/图片等文件存储、备份导出/恢复均走有效 `dataRoot`。
- `AppDatabase.rebindDataDirectories`:`data.directory` 变更时切换 SQLite 文件并迁移。
- 设置「数据」分类:`DirectorySettingRow` 编辑 `data.directory`,「打开数据目录」指向有效根。
## 测试
- `DataPathConfigTest`
- 既有 `VaultPathAiAccessTest.changingDataDirectoryRevokesAiDataAccess`
## 验收
- A01 设置/数据;F01/F04 默认 Vault 路径;`desktopTest --offline`。