Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: skip cr task if there is no error #633

Merged
merged 1 commit into from
Dec 30, 2024
Merged

fix: skip cr task if there is no error #633

merged 1 commit into from
Dec 30, 2024

Conversation

xingwanying
Copy link
Contributor

close #602

Copy link

vercel bot commented Dec 30, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
petercat ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 30, 2024 10:03am

Copy link

codecov bot commented Dec 30, 2024

Codecov Report

Attention: Patch coverage is 0% with 13 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
server/agent/tools/pull_request.py 0.00% 10 Missing ⚠️
server/agent/base.py 0.00% 3 Missing ⚠️
Files with missing lines Coverage Δ
server/agent/prompts/pull_request.py 66.66% <ø> (ø)
server/agent/base.py 24.29% <0.00%> (ø)
server/agent/tools/pull_request.py 15.55% <0.00%> (ø)

@petercat-ai petercat-ai deleted a comment from petercat-assistant bot Dec 30, 2024
@xingwanying xingwanying merged commit c5669c7 into main Dec 30, 2024
4 of 5 checks passed
@xingwanying xingwanying deleted the fix_pr_summary branch December 30, 2024 10:08
@petercat-ai petercat-ai deleted a comment from petercat-assistant bot Dec 31, 2024
@petercat-ai petercat-ai deleted a comment from petercat-assistant bot Dec 31, 2024
@petercat-ai petercat-ai deleted a comment from petercat-assistant bot Dec 31, 2024
Copy link

Walkthrough

This pull request addresses issue #602 by modifying the behavior of the code to skip certain tasks if no errors are encountered. The changes involve restructuring error handling and refining the logic for invoking agent executors.

Changes

File Summary
server/agent/base.py Refactored error handling in run_chat method and improved the logic for invoking agent executors.
server/agent/prompts/pull_request.py Updated instructions for code review tasks, focusing on critical issues only.
server/agent/tools/pull_request.py Refactored the get_file_content and create_review_comment functions for better readability and maintainability.

@petercat-ai petercat-ai deleted a comment from petercat-assistant bot Dec 31, 2024
@petercat-ai petercat-ai deleted a comment from petercat-assistant bot Dec 31, 2024
@petercat-ai petercat-ai deleted a comment from petercat-assistant bot Dec 31, 2024
@petercat-ai petercat-ai deleted a comment from petercat-assistant bot Dec 31, 2024
@petercat-ai petercat-ai deleted a comment from petercat-assistant bot Dec 31, 2024
@petercat-ai petercat-ai deleted a comment from petercat-assistant bot Dec 31, 2024
@petercat-ai petercat-ai deleted a comment from petercat-assistant bot Dec 31, 2024
@petercat-ai petercat-ai deleted a comment from petercat-assistant bot Dec 31, 2024
except Exception as e:
logger.error(e)
return f"error: {str(e)}\n"
logger.error("Error occurred in run_chat: %s", str(e))

Choose a reason for hiding this comment

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

The error logging message has been improved to provide more context. Ensure that sensitive information is not logged inadvertently.

@petercat-ai petercat-ai deleted a comment from petercat-assistant bot Dec 31, 2024
@petercat-ai petercat-ai deleted a comment from petercat-assistant bot Dec 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cr的时候不要回复细枝末节的问题,避免100%回复diff
1 participant