fix: add draft review comments to debug logs#106
Conversation
Co-authored-by: parkerbxyz <17183625+parkerbxyz@users.noreply.github.com>
parkerbxyz
left a comment
There was a problem hiding this comment.
@copilot For the debug logging, I was thinking we should include more than just the line numbers and instead include the entire draft review comment.
Co-authored-by: parkerbxyz <17183625+parkerbxyz@users.noreply.github.com>
Updated the debug logging to include the entire draft review comment with all properties (path, line, start_line, start_side, body) rather than just the condensed line numbers format. This provides complete visibility into the generated comment structure for debugging. The change is in commit ad52bca. |
… line Co-authored-by: parkerbxyz <17183625+parkerbxyz@users.noreply.github.com>
|
@copilot Please update the example in the pull request body to reflect the latest changes. |
Updated the example in the PR description to reflect the current debug output format where the comment body appears on a separate line. The corrected example now shows: This matches the current implementation where the body content is displayed on its own line after the "body:" label for better readability (commit 5e19a22). |
|
@copilot Is there a way to have the entire suggestion body indented so it lines up with the rest of the details about the review comment? |
…perties Co-authored-by: parkerbxyz <17183625+parkerbxyz@users.noreply.github.com>
Yes! I've updated the debug logging to properly indent the entire suggestion body content so it aligns with the other review comment properties. Each line of the comment body now has 2 spaces of indentation to match the format of the other fields. This change is in commit 49e3453. |
There was a problem hiding this comment.
Pull Request Overview
This PR adds comprehensive debug logging for draft review comments to improve troubleshooting capabilities. Previously, debug output only showed diff input and review creation status but omitted the actual generated suggestions content.
- Adds detailed debug output showing the complete structure of all generated draft review comments
- Includes proper indentation for suggestion body content to maintain readability
- Provides count of generated suggestions and handles zero-suggestion case
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Previously, the debug output only included information about the diff input and review creation status, but did not show the actual content of generated suggestions. This made debugging difficult when trying to understand what suggestions were being generated.
This change adds comprehensive debug output that shows the complete draft review comment structure immediately after they are created by
generateReviewComments(). The debug output includes:path: The file pathline: The target line numberstart_line: The starting line number (for multi-line suggestions)start_side: The side of the diff (when applicable)body: The complete suggestion content with proper indentationExample debug output:
The suggestion body content is properly indented to align with the other review comment properties, making the debug output clean and easy to read. This makes it much easier to debug issues with suggestion generation by allowing developers to see the complete structure of each draft review comment before they go through filtering and review creation.
Fixes #105.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.