Skip to content

[notes] feat: 云盘文档→笔记一键转换(服务层) - #95

Merged
atoncooper merged 2 commits into
mainfrom
feat/cloud-note-conversion
Aug 30, 2026
Merged

[notes] feat: 云盘文档→笔记一键转换(服务层)#95
atoncooper merged 2 commits into
mainfrom
feat/cloud-note-conversion

Conversation

@atoncooper

@atoncooper atoncooper commented Aug 30, 2026

Copy link
Copy Markdown
Owner

Closes #94

内容(2 commits)

  1. [notes] 云盘文档全文读取服务document_text.py(Mongo 正文读取 + 409/404/422 状态映射)+ legacy_doc.py(.doc OLE2 解析)+ 11 例测试
  2. [notes] 转换编排服务note_conversion.py(校验→读全文→note agent ReAct→save_note 落库,409/502 映射)+ 11 例 mock harness 测试

边界说明

  • 纯服务层,不接 router(router 接线与 note agent 的 cloud target_id 注入属后续工作,工作区已有对应超前测试 test_note_agent_history.py,因实现未落地未包含本 PR
  • test_upload_mime.py 引用的 GENERIC_MIME 同样未实现,未包含
  • 不触碰 chat/RAG/session 链路

验证

pytest app/test/services/test_note_conversion.py → 11 passed
pytest app/test/services/test_legacy_doc_preview.py → 11 passed

- document_text: 从 Mongo cloud_drive_documents 读解析全文,区分
  未解析(409)/无权限(404)/空文本(422),供 note agent 整理与预览共用
- legacy_doc: 旧版 .doc(OLE2/Word 97-2003)文本提取,补齐 doc_parser 对
  遗留 Office 格式的空缺
- 测试 11 例覆盖(读路径/状态码映射/解析边界)
note_conversion 编排 note agent:校验→读取全文→注入 <document> 块→ReAct
整理并经 save_note 落库,失败映射 HTTP 状态码(409 未解析/502 agent 失败),
分层对齐 session_summary.py。router 接线与 note agent 的 target_id 注入
后续 PR 跟进。测试 11 例(mock harness,全通过)。
@atoncooper
atoncooper merged commit 8c6db0d into main Aug 30, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[notes] feat: 云盘文档→笔记一键转换(服务层)

1 participant