Add spinner when reviewing code in non-streaming mode#2
Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR enhances the non-streaming code review experience by adding a spinner to indicate progress during AI operations.
- Introduces a spinner utility in pkg/progress/spinner.go.
- Integrates spinner functionality into code review and translation flows in cmd/review.go.
- Updates dependency versions in go.mod and spinner image references in README.md.
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| pkg/progress/spinner.go | Adds spinner wrapper functions to display progress feedback. |
| go.mod | Updates and adds dependencies required for spinner functionality. |
| cmd/review.go | Integrates spinner into AI call flows for code review and translation. |
| README.md | Updates image references to the new spinner-based demo images. |
Comments suppressed due to low confidence (2)
cmd/review.go:134
- Consider logging detailed error information from the client.ChatCompletion call inside the spinner wrapper. This additional context may help diagnose underlying issues when the operation fails.
spinnerErr := progress.WithSpinnerAndCustomMessages(
cmd/review.go:207
- Consider logging detailed error information from the translation client.ChatCompletion call to improve error diagnosis. This extra context can assist in troubleshooting failures during translation.
spinnerErr := progress.WithSpinnerAndCustomMessages(
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.
review命令在非流式输出模式下,进行code review的过程中,新增spinner展示,表示过程正在执行中