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

Swekit refactoring (working swe-agent in langgraph and crewai, pr-review-agent in langgraph) #821

Merged
merged 10 commits into from
Nov 6, 2024

Conversation

shreysingla11
Copy link
Collaborator

@shreysingla11 shreysingla11 commented Nov 5, 2024

Important

Refactor SWE Kit to enhance CLI, scaffolding, and templates for multiple agent frameworks, including crewai and langgraph, with updated dependencies and documentation.

  • CLI and Scaffolding:
    • Changed --type to --framework in swekit/cli.py and set default to LANGGRAPH.
    • Updated scaffold() in _scaffold.py to support new agent types and frameworks.
  • Templates:
    • Added templates for pr_review and langgraph agents.
    • Restructured templates for swe agents under swe directory.
  • Dependencies:
    • Updated tokenizers version in tool.py to >=0.20,<0.21.
  • Documentation:
    • Updated README.md to reflect changes in agent creation commands and options.

This description was created by Ellipsis for 193b04d. It will automatically update as commits are pushed.

Copy link

vercel bot commented Nov 5, 2024

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

Name Status Preview Comments Updated (UTC)
composio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 6, 2024 1:56am

Copy link

sweep-ai bot commented Nov 5, 2024

Hey @shreysingla11, here are examples of how you can ask me to improve this pull request:

@Sweep Fix the CI errors.
@Sweep Add unit tests for the `DiffFormatter` class in `python/swe/swekit/scaffold/templates/pr_review/langgraph/tools.py` to verify:
- Correct parsing of diff headers
- Proper line number tracking for additions/deletions/context
- Formatting of output for the agent
- Edge cases like empty diffs or diffs with only metadata changes

📖 For more information on how to use Sweep, please read our documentation.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

❌ Changes requested. Reviewed everything up to fb3b8a7 in 1 minute and 21 seconds

More details
  • Looked at 2134 lines of code in 50 files
  • Skipped 0 files when reviewing.
  • Skipped posting 3 drafted comments based on config settings.
1. python/swe/swekit/scaffold/templates/swe/langgraph/tools.template:43
  • Draft comment:
    Consider adding error handling for the requests.post call to manage potential exceptions gracefully.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The code in the create_pr function in tools.template is missing error handling for the requests.post call. If the request fails, it will raise an exception, but this is not caught or handled, which could lead to ungraceful failures.
2. python/swe/swekit/scaffold/templates/swe/langgraph/main.template:87
  • Draft comment:
    Consider checking the response from create_pr to ensure the pull request was created successfully and handle any errors appropriately.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    In the main.template file, the create_pr function is used to create a pull request, but there is no check for the success of this operation. It would be beneficial to check the response and handle any errors that might occur during the PR creation process.
3. python/swe/swekit/scaffold/templates/swe/langgraph/agent.template:162
  • Draft comment:
    Consider logging the error or providing more context or recovery options when invoke_with_retry fails after 3 attempts.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    In the agent.template file, the invoke_with_retry function retries the agent invocation up to 3 times, but if it fails, it only prints an error message. It might be beneficial to log this error or handle it in a way that provides more context or recovery options.

Workflow ID: wflow_t79oHafRB8jyS90a


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

Copy link

github-actions bot commented Nov 5, 2024

This comment was generated by github-actions[bot]!

JS SDK Coverage Report

📊 Coverage report for JS SDK can be found at the following URL:
https://pub-92e668239ab84bfd80ee07d61e9d2f40.r2.dev/coverage-11695784489/coverage/index.html

📁 Test report folder can be found at the following URL:
https://pub-92e668239ab84bfd80ee07d61e9d2f40.r2.dev/html-report-11695784489/html-report/report.html

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me! Incremental review on 05a4593 in 35 seconds

More details
  • Looked at 24 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 0 drafted comments based on config settings.

Workflow ID: wflow_3Cad80BScPZUpHB5


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me! Incremental review on 72a346a in 19 seconds

More details
  • Looked at 41 lines of code in 3 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. python/swe/swekit/scaffold/templates/swe/autogen/agent.template:13
  • Draft comment:
    Removing the image parameter from WorkspaceType.Docker() might lead to using a default Docker image, which could be unintended. Ensure this change is intentional and the default image is suitable for your needs. This issue is also present in crewai/agent.template and langgraph/agent.template.
  • Reason this comment was not posted:
    Comment did not seem useful.

Workflow ID: wflow_VEnUBefLkrrgKtP8


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me! Incremental review on 193b04d in 14 seconds

More details
  • Looked at 15 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. python/swe/swekit/scaffold/templates/pr_review/langgraph/agent.template:109
  • Draft comment:
    Ensure the default Docker image is appropriate after removing the 'image' parameter.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The removal of the 'image' parameter in the Docker workspace configuration might affect the environment setup. It's important to ensure that the default image is appropriate for the intended use case.

Workflow ID: wflow_GVUVNohT4RkcZ2ne


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@kaavee315 kaavee315 merged commit e526e0c into master Nov 6, 2024
8 of 9 checks passed
@kaavee315 kaavee315 deleted the swekit/refactor branch November 6, 2024 02:14
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.

2 participants