Skip to content

feat: add timestamps to markdown export#13286

Open
nDhnzr6r wants to merge 15 commits intoCherryHQ:mainfrom
nDhnzr6r:Add-timestamps-to-Markdown
Open

feat: add timestamps to markdown export#13286
nDhnzr6r wants to merge 15 commits intoCherryHQ:mainfrom
nDhnzr6r:Add-timestamps-to-Markdown

Conversation

@nDhnzr6r
Copy link

@nDhnzr6r nDhnzr6r commented Mar 7, 2026

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.

Release note


@nDhnzr6r nDhnzr6r requested a review from 0xfullex as a code owner March 7, 2026 13:13
Copy link
Collaborator

@GeorgeDong32 GeorgeDong32 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

代码审查:需要修改 ❌

摘要

此 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.替换(...)

修复建议

  1. 使用编辑器的搜索功能,查找所有
  2. 替换为英文 .,
  3. 特别注意 content.替换 应改为 content.replace
  4. 提交前务必运行 pnpm lint 验证

正面评价

✅ 新功能本身的实现逻辑是正确的:

  • Redux 状态管理正确
  • UI 设置和国际化完整
  • 时间戳格式化逻辑合理

请修复语法错误后重新提交,感谢贡献!

@nDhnzr6r nDhnzr6r requested a review from GeorgeDong32 March 7, 2026 14:17
Copy link
Collaborator

@GeorgeDong32 GeorgeDong32 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

本地验证结果

✅ 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 检查。

@nDhnzr6r nDhnzr6r requested a review from GeorgeDong32 March 7, 2026 14:50
@nDhnzr6r
Copy link
Author

nDhnzr6r commented Mar 7, 2026

Note

This issue/comment/review was translated by Claude.

What went wrong again???


Original Content

????????????????
咋又错了

@nDhnzr6r
Copy link
Author

nDhnzr6r commented Mar 7, 2026

Note

This issue/comment/review was translated by Claude.

How should this be modified?


Original Content

这怎么改!。

@nDhnzr6r
Copy link
Author

nDhnzr6r commented Mar 7, 2026

Note

This issue/comment/review was translated by Claude.

I need help!.


Original Content

我需要帮助!。

Copy link
Collaborator

@EurFelux EurFelux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

原则上,在v2版本完成以前,我们不再接受需要添加新的持久化数据的PR。敬请理解

@EurFelux EurFelux added the Blocked: v2 The PR is blocked until v2 released label Mar 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Blocked: v2 The PR is blocked until v2 released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Add timestamps for each message when exporting conversations to Markdown

3 participants