Skip to content

feat: 添加 markdown 导出支持#336

Open
fnknzzz wants to merge 1 commit into
coze-dev:mainfrom
fnknzzz:feat/chat-sdk-add-markdown-export
Open

feat: 添加 markdown 导出支持#336
fnknzzz wants to merge 1 commit into
coze-dev:mainfrom
fnknzzz:feat/chat-sdk-add-markdown-export

Conversation

@fnknzzz
Copy link
Copy Markdown

@fnknzzz fnknzzz commented May 15, 2026

增加小程序专用 markdown 导出,在直接使用 markdown 场景下,优化约 120kb 大小

image

Summary by CodeRabbit

  • New Features
    • Added Markdown export support to the Chat SDK. Users can now export chat conversations and content in Markdown format, providing improved flexibility for saving, sharing, and integrating chat data into other workflows.

Review Change Stack

@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 15, 2026

Warning

Rate limit exceeded

@fnknzzz has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 9 minutes and 5 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 571247af-fb08-4a57-9380-c527d95da3e1

📥 Commits

Reviewing files that changed from the base of the PR and between 926e67b and a863525.

📒 Files selected for processing (2)
  • common/changes/@coze/chat-sdk/feat-chat-sdk-add-markdown-export_2026-05-15-09-02.json
  • packages/chat-sdk/package.json
📝 Walkthrough

Walkthrough

The PR adds markdown export support to the @coze/chat-sdk package by updating the package exports map and recording the change in the changelog. The new ./markdown subpath points to the markdown module entry at dist/lib-source/src/exports/markdown/index.js.

Changes

Markdown Export

Layer / File(s) Summary
Markdown export declaration and setup
common/changes/@coze/chat-sdk/feat-chat-sdk-add-markdown-export_2026-05-15-07-40.json, packages/chat-sdk/package.json
Changelog entry documents markdown export addition, and package.json exports map adds a new ./markdown subpath mapping to expose the markdown module.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5 minutes

Possibly related PRs

  • coze-dev/coze-js#253: Both PRs extend packages/chat-sdk's markdown export surface by adding/pointing to the markdown entrypoints (e.g., packages/chat-sdk/package.json exports and the src/exports/markdown/* modules).

Suggested reviewers

  • jackshen310
  • DingGao-Devin

Poem

🐰 A markdown path now shines so bright,
Exported clean, the SDK's delight!
The changelog sings, the config's true—
One more subpath to share with you! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: 添加 markdown 导出支持' (Add markdown export support) directly aligns with the main changes: adding a new markdown export subpath to package.json and creating associated change records for markdown export functionality.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/chat-sdk/package.json`:
- Line 9: The package.json exports include a public subpath "./markdown"
pointing to "./dist/lib-source/src/exports/markdown/index.js" but there is no
corresponding types mapping, so TypeScript consumers of `@coze/chat-sdk/markdown`
will lack typings; add a types entry for "./markdown" mirroring the pattern used
by "./webJs" and "./markdownJs" (e.g., map "./markdown" to the compiled d.ts
path under exports.types and/or add an entry in typesVersions pointing
"./markdown" to the appropriate source .d.ts), ensuring the symbol "./markdown"
appears in both exports.types (or exports["./markdown"].types) and typesVersions
the same way as "./webJs" and "./markdownJs".
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d7bf4ea3-de34-41f7-8cbc-957fd9c664da

📥 Commits

Reviewing files that changed from the base of the PR and between 0037049 and 926e67b.

📒 Files selected for processing (2)
  • common/changes/@coze/chat-sdk/feat-chat-sdk-add-markdown-export_2026-05-15-07-40.json
  • packages/chat-sdk/package.json

Comment thread packages/chat-sdk/package.json Outdated
@fnknzzz fnknzzz force-pushed the feat/chat-sdk-add-markdown-export branch from 926e67b to a863525 Compare May 15, 2026 09:03
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.

2 participants