Skip to content

Add spinner when reviewing code in non-streaming mode#2

Merged
loveRyujin merged 2 commits into
masterfrom
feature/progress_bar
Jun 5, 2025
Merged

Add spinner when reviewing code in non-streaming mode#2
loveRyujin merged 2 commits into
masterfrom
feature/progress_bar

Conversation

@loveRyujin

Copy link
Copy Markdown
Owner

review命令在非流式输出模式下,进行code review的过程中,新增spinner展示,表示过程正在执行中

@loveRyujin loveRyujin requested a review from Copilot June 5, 2025 15:40

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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(

@loveRyujin loveRyujin merged commit 139f40c into master Jun 5, 2025
@loveRyujin loveRyujin self-assigned this Jun 5, 2025
@loveRyujin loveRyujin added documentation Improvements or additions to documentation enhancement New feature or request labels Jun 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants