Files
MooTool/next-compose/docs/diff/339-vault-export-editor-buffer.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

19 lines
864 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-339:Vault 导出当前打开文件的编辑器内容
## 问题
Electron 导出随手记时使用 `state.content`(当前打开则取编辑器缓冲区)。Compose Vault 右键/工具栏 **导出** 一律 `Files.copy` 磁盘文件;当前片段/笔记有未保存修改时,导出内容落后于编辑器。
JSON 工具栏导出已写 `session.editor.text`;**Vault 树导出**仍读盘。
## 行为
- `vaultExportText` / `vaultExportUsesEditorBuffer`:导出路径等于 `currentFile` 且 `editorText != savedText` 时用缓冲区。
- JSON:`exportJsonVaultEntryToPath` 供 Vault 上下文导出。
- 随手记:`exportQuickNoteVaultEntryToPath`(含 metadata 脏)用于工具栏与 Vault 导出;`quickNoteDirty` 迁至 `QuickNoteVaultExport.kt`。
## 验证
- `VaultExportContentTest`
- `./gradlew :composeApp:desktopTest --offline`