feat: add timestamps to markdown export#13286
Open
nDhnzr6r wants to merge 15 commits intoCherryHQ:mainfrom
Open
feat: add timestamps to markdown export#13286nDhnzr6r wants to merge 15 commits intoCherryHQ:mainfrom
nDhnzr6r wants to merge 15 commits intoCherryHQ:mainfrom
Conversation
GeorgeDong32
requested changes
Mar 7, 2026
Collaborator
GeorgeDong32
left a comment
There was a problem hiding this comment.
代码审查:需要修改 ❌
摘要
此 PR 包含大量语法错误,无法通过 pnpm lint 检查。这些错误是误将中文标点符号(逗号、句号)混入代码导致的。
已验证的问题
运行 pnpm lint 直接报错:
x Invalid Character `,`
,-[src/renderer/src/utils/export.ts:63:13]
x Invalid Character `,`
,-[src/renderer/src/store/settings.ts:425:29]
问题分类
| 类型 | 数量 | 示例 |
|---|---|---|
中文句号 。 代替 . |
10+ 处 | state。webdavSyncInterval |
中文逗号 , 代替 , |
15+ 处 | localBackupAutoSync: false, |
| 中文方法名 | 1 处 | content.替换(...) |
修复建议
- 使用编辑器的搜索功能,查找所有
。和, - 替换为英文
.和, - 特别注意
content.替换应改为content.replace - 提交前务必运行
pnpm lint验证
正面评价
✅ 新功能本身的实现逻辑是正确的:
- Redux 状态管理正确
- UI 设置和国际化完整
- 时间戳格式化逻辑合理
请修复语法错误后重新提交,感谢贡献!
GeorgeDong32
reviewed
Mar 7, 2026
Collaborator
GeorgeDong32
left a comment
There was a problem hiding this comment.
本地验证结果
✅ Build 检查:通过
- TypeScript 类型检查通过
- electron-vite 构建成功
❌ Lint 检查:失败
Error: 主模板文件 zh-cn.json 的键值未按字典序排序。
问题原因:新增的 show_timestamp 键位置不正确,未按字母顺序排列。
💡 修复建议
在提交前请执行以下命令:
# 修复 i18n 键值排序
pnpm i18n:sync
# 然后重新运行 lint 验证
pnpm lint总结
| 检查项 | 状态 |
|---|---|
| TypeScript 类型 | ✅ 通过 |
| Build | ✅ 通过 |
| i18n 排序 | ❌ 需要修复 |
功能实现本身没有问题,只需要运行 pnpm i18n:sync 修复键值排序即可通过 lint 检查。
Author
|
Note This issue/comment/review was translated by Claude. What went wrong again??? Original Content???????????????? |
Author
|
Note This issue/comment/review was translated by Claude. How should this be modified? Original Content这怎么改!。 |
Author
|
Note This issue/comment/review was translated by Claude. I need help!. Original Content我需要帮助!。 |
EurFelux
reviewed
Mar 7, 2026
Collaborator
EurFelux
left a comment
There was a problem hiding this comment.
原则上,在v2版本完成以前,我们不再接受需要添加新的持久化数据的PR。敬请理解
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does
Before this PR:
Exported Markdown conversations do not include timestamps for each message.
After this PR:
Each message in the exported Markdown now includes its timestamp, making it easier to understand the conversation timeline.
Fixes #13272
Why we need it and why it was done in this way
The following tradeoffs were made:
The following alternatives were considered:
Links to places where the discussion took place:
Breaking changes
If this PR introduces breaking changes, please describe the changes and the impact on users.
Special notes for your reviewer
Checklist
This checklist is not enforcing, but it's a reminder of items that could be relevant to every PR.
Approvers are expected to review this list.
/gh-pr-review,gh pr diff, or GitHub UI) before requesting review from othersRelease note