-
Notifications
You must be signed in to change notification settings - Fork 405
feat(flow): support D2 markdown blocks #663
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
9200121 to
913d904
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds support for D2 markdown blocks (|md ... |) in flow definitions, allowing more readable multi-line labels in flowcharts. The implementation preprocesses markdown blocks into multi-line quoted strings before parsing, and the parser is updated to preserve newlines within quotes.
Changes:
- Added markdown block normalization in D2 parser with proper escaping and dedenting
- Extended parser to preserve newlines inside quoted strings for multi-line labels
- Converted release skill flow from Mermaid with Chinese labels to D2 with English markdown blocks
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tests/test_agent_flow.py | Added comprehensive test cases for markdown block parsing, escaping, dedenting, and error handling |
| src/kimi_cli/skill/flow/d2.py | Implemented markdown block normalization, helper functions for comment stripping, dedenting, and escaping, plus parser updates for multi-line quoted strings |
| .agents/skills/release/SKILL.md | Converted flowchart from Mermaid format with Chinese labels to D2 format with English markdown blocks |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9200121e2a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary
|mdblock normalization for flow labelsTesting