Convert CLI error outputs to use console formatting #9251
Merged
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.
CLI commands output raw error messages inconsistently—only 3% (44/1,450) use proper console formatting, creating a fragmented user experience where some errors are styled while others appear as plain text dumps.
Changes
Pattern applied across 7 CLI files:
Modified files:
compile_helpers.go- 7 conversions (gitattributes warnings, file removal messages)compile_orchestration.go- 2 conversions (scanning/found messages)compile_watch.go- 3 conversions (watcher status and errors)packages.go- 18 conversions (download, clone, copy operations)mcp_add.go- 2 conversions (secret checking, transport selection)mcp_inspect.go- 20+ conversions (server inspection, cleanup messages)mcp_inspect_mcp.go- 57+ conversions (tool details, schema display)All error output now consistently:
console.Format{Error,Warning,Info,Success}Message()fmt.Fprintln(os.Stderr, ...)Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.