Repository navigation
Render review summaries that the skill wrapped in a code block - #52
Merged
Merged
Conversation
withastro/astro's astro-code-review skill asks for the report "as raw, unrendered Markdown inside a single fenced code block" (meant for copying into a comment by hand). The reviewer carried that plain ``` fence into the submitted summary, and containModelMarkdown only unwrapped ```md/```markdown fences, so every review on withastro/astro#18176 rendered as one code block. - containModelMarkdown takes unwrapPlainFence, used for whole review and author round summaries only; finding bodies and replies keep plain fenced snippets intact. - The reviewer prompt says the summary is rendered Markdown and must not be wrapped in a code block, even if the skill says so.
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.
Changes
astro-code-reviewskill asks for the report "as raw, unrendered Markdown inside a single fenced code block", which suits copying a report by hand. The reviewer carried that plain```fence into its submitted summary, andcontainModelMarkdownonly unwrapped fences taggedmd/markdown.containModelMarkdownnow takesunwrapPlainFence, which also strips a plain fence around the whole value. Only whole summaries use it (review summaries and author round summaries). Finding bodies and thread replies keep a plain fenced snippet intact, since there it's usually real code.Testing
tests/review-markdown.test.ts: a plain fence around a whole summary is unwrapped when asked (backticks and tildes); a plain fenced snippet is kept by default; a plain fence that doesn't wrap the whole value is kept.tests/review-diff.test.ts:formatReviewBodyrenders a summary shaped like the #18176 reviews as headings below the verdict notice, with no code fence.Docs