Files
MooTool/next-compose/docs/diff/407-vault-git-auto-pull-clean-tree.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

858 B
Raw Permalink Blame History

DIFF-407:Vault 自动 pull 对齐 Electron 工作区前置条件

背景

Electron pullJsonVault / pullQuickNoteVault 在编辑器干净之外,还要求 status.changes 为空、无 merge/冲突、已配置 remote 才执行自动 pull。Compose pullVault 此前仅跳过不可用仓库、无 remote 与 merging,可能在本地有未提交变更时仍自动 pull,与 Electron 不一致。

行为

  • 新增 VaultGitAutoPull.mayPullCleanWorkingTree:conflicts > 0、changes 非空、merging、无 remote 等条件下不 pull。
  • AppContainer.pullVault(定时 VaultGitPullScheduler 与 JSON/随手记 Vault 共用)调用上述判断;编辑器脏仍由 scheduler 的 hasUnsavedEditorChanges 拦截。

验收

  • A03 / F01/F04 Vault Git;VaultGitAutoPullTest;./gradlew :composeApp:desktopTest --offline。