feat: 历史同步优化与消息已读属性

- 历史同步: 本地缓存优先、断点续传、按月批量同步
- 新增 sync_monthly.py: 支持逐月往前推进同步
- 消息表新增 is_read 字段,默认 false
- Obsidian 文档 frontmatter 自动补充 is_read: false
- 新增 migrate_add_is_read.py / migrate_obsidian_is_read.py 迁移脚本
- 总结 prompt 补充: 不记录腾讯会议号
- 历史同步失败时记录日志到 ~/.larkx/logs/history-failures.jsonl
This commit is contained in:
Benature
2026-11-08 11:31:18 +08:00
parent 99ee792c07
commit c8658ad064
10 changed files with 420 additions and 9 deletions

View File

@ -142,6 +142,8 @@ Dry-run 默认同样先同步并入库,但只导出筛选后的 JSON,**不
每批 position 数量由 `--count` 控制,不是消息总量上限;遇到早于目标自然日的消息即停止。
单会话同步失败时,终端会显示日期、`chat_id`、会话名和异常类型,并追加写入 `~/.larkx/logs/history-failures.jsonl`(权限 `0600`)。日志同时包含 UTC 记录时间,不保存消息正文、上游响应体或异常文本,避免敏感内容回显。
## `config.yaml` 输出配置
当前目录存在 `config.yaml` 时自动读取,也可用 `--config` 指定。该文件被 Git 忽略,可保存本机绝对路径: