refactor: enhance export functions
What this PR does
- [x] 为Obsidian、Joplin添加思维链导出支持
- [x] 修复Obsidian导出弹窗与应用风格、主题不一致的问题
- [ ] 为Notion、语雀添加思维链导出支持(咕了,暂时没想好怎么做)
- [x] 支持导出时包含模型名称
- [ ] 修复Notion导出时超过API Limit的导致导出失败的问题(弃用简单分页)(咕了,下个pr再做)
相关issue
- #5817
- #5757
Why we need it and why it was done in this way
- 所有本质为Markdown的导出选项全部经统一的接口处理,提高复用性和可维护性
Breaking changes
None
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.
- [ ] PR: The PR description is expressive enough and will help future contributors
- [x] Code: Write code that humans can understand and Keep it simple
- [x] Refactor: You have left the code cleaner than you found it (Boy Scout Rule)
- [ ] Upgrade: Impact of this change on upgrade flows was considered and addressed if required
- [x] Documentation: A user-guide update was considered and is present (link) or not required. You want a user-guide update if it's a user facing feature.
Release note
Summary by Sourcery
Introduce a configurable setting to display the model name in exported markdown messages, updating export utilities and settings interface accordingly.
New Features:
- Add option to include model name in exported markdown messages.
Enhancements:
- Update export functions and settings UI to support toggling model name display in markdown exports.
Reviewer's Guide
This PR refactors and enhances the export functions by adding an option to include the model name in exported markdown, updating the settings UI and store to support this feature, and adjusting the markdown export logic accordingly.
File-Level Changes
| Change | Details | Files |
|---|---|---|
| Added support for including model name in exported markdown messages. |
|
src/renderer/src/utils/export.ts |
| Introduced a new setting to control model name display in markdown exports. |
|
src/renderer/src/store/settings.ts |
| Updated settings UI to allow toggling model name display in markdown exports. |
|
src/renderer/src/pages/settings/DataSettings/MarkdownExportSettings.tsx |
Tips and commands
Interacting with Sourcery
-
Trigger a new review: Comment
@sourcery-ai reviewon the pull request. - Continue discussions: Reply directly to Sourcery's review comments.
-
Generate a GitHub issue from a review comment: Ask Sourcery to create an
issue from a review comment by replying to it. You can also reply to a
review comment with
@sourcery-ai issueto create an issue from it. -
Generate a pull request title: Write
@sourcery-aianywhere in the pull request title to generate a title at any time. You can also comment@sourcery-ai titleon the pull request to (re-)generate the title at any time. -
Generate a pull request summary: Write
@sourcery-ai summaryanywhere in the pull request body to generate a PR summary at any time exactly where you want it. You can also comment@sourcery-ai summaryon the pull request to (re-)generate the summary at any time. -
Generate reviewer's guide: Comment
@sourcery-ai guideon the pull request to (re-)generate the reviewer's guide at any time. -
Resolve all Sourcery comments: Comment
@sourcery-ai resolveon the pull request to resolve all Sourcery comments. Useful if you've already addressed all the comments and don't want to see them anymore. -
Dismiss all Sourcery reviews: Comment
@sourcery-ai dismisson the pull request to dismiss all existing Sourcery reviews. Especially useful if you want to start fresh with a new review - don't forget to comment@sourcery-ai reviewto trigger a new review!
Customizing Your Experience
Access your dashboard to:
- Enable or disable review features such as the Sourcery-generated pull request summary, the reviewer's guide, and others.
- Change the review language.
- Add, remove or edit custom review instructions.
- Adjust other review settings.
Getting Help
- Contact our support team for questions or feedback.
- Visit our documentation for detailed guides and information.
- Keep in touch with the Sourcery team by following us on X/Twitter, LinkedIn or GitHub.
@sourcery-ai review
这个pr有计划什么时候合入吗?
这个pr有计划什么时候合入吗?
应该还要过两天,刚发现有点bug之前没测出来
#5757 好像没有实现 在 🤖 Assistant 旁附带一下就可以
#5757 好像没有实现 在 🤖 Assistant 旁附带一下就可以
markdown设置里要开显示模型名称,没有的话可能开关逻辑有问题,我稍后看一下
哦哦 不好意思没看见 好像没问题了 先合并了