Fix newline formatting in terminal suggest details widget#286584
Merged
meganrogge merged 2 commits intomainfrom Jan 8, 2026
Merged
Fix newline formatting in terminal suggest details widget#286584meganrogge merged 2 commits intomainfrom
meganrogge merged 2 commits intomainfrom
Conversation
…valueSelection and index Co-authored-by: meganrogge <29464607+meganrogge@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix formatting issue in terminal suggest details widget
Fix newline formatting in terminal suggest details widget
Jan 8, 2026
Collaborator
meganrogge
approved these changes
Jan 8, 2026
Tyriar
approved these changes
Jan 8, 2026
Comment on lines
142
to
146
| md += `score: ${item.score[0]}\n`; | ||
| md += `prefix: ${item.word ?? '(no prefix)'}\n`; | ||
| const vs = item.completion.replacementRange; | ||
| md += `valueSelection: ${vs ? `[${vs[0]}, ${vs[1]}]` : 'undefined'}\\n`; | ||
| md += `valueSelection: ${vs ? `[${vs[0]}, ${vs[1]}]` : 'undefined'}\n`; | ||
| md += `index: ${item.idx}\n`; |
Contributor
There was a problem hiding this comment.
Even better pattern would be lines: string[] and .join('\n')
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a formatting bug in the terminal suggest details widget's explain mode where the valueSelection field was displaying on the same line as the index field due to an escaped newline literal.
Key Change:
- Fixed line 145 in
simpleSuggestWidgetDetails.tsto use\ninstead of\\nfor proper newline rendering
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.

The terminal suggest details widget's explain mode displayed
valueSelectionandindexfields on the same line due to an escaped newline literal (\\n) instead of an actual newline character (\n).Changes
simpleSuggestWidgetDetails.tsto use\ninstead of\\nwhen building the markdown string for explain mode detailsBefore:
After:
This ensures proper line breaks in the rendered code block, matching the formatting of other fields (
score,prefix,index).Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.