sweepai / sweep

Sweep: open-source AI-powered Software Developer for small features and bug fixes.
https://sweep.dev
Other
7.31k stars 418 forks source link

Add tests for context agent #3491

Open sweep-nightly[bot] opened 3 months ago

sweep-nightly[bot] commented 3 months ago

we use pytest\n\nrepo: sweepai/sweep

Checklist - [X] Create `tests/test_context_pruning.py` ✗ https://github.com/sweepai/sweep/commit/522afedc35d018f206e3df1ae7f525acd46ec389 [Edit](https://github.com/sweepai/sweep/edit/sweep/add_tests_for_context_agent_d5ec1/tests/test_context_pruning.py) - [X] Modify `sweepai/core/context_pruning.py` ✓ https://github.com/sweepai/sweep/commit/522afedc35d018f206e3df1ae7f525acd46ec389 [Edit](https://github.com/sweepai/sweep/edit/sweep/add_tests_for_context_agent_d5ec1/sweepai/core/context_pruning.py)
sweep-nightly[bot] commented 3 months ago

🚀 Here's the PR! #3492

See Sweep's progress at the progress dashboard!
💎 Sweep Pro: I'm using GPT-4. You have unlimited GPT-4 tickets. (tracking ID: 837f29da22)

[!TIP] I can email you next time I complete a pull request if you set up your email here!


Actions (click)


Step 1: 🔎 Searching

I found the following snippets in your repository. I will now analyze these snippets and come up with a plan.

Some code snippets I think are relevant in decreasing order of relevance (click to expand). If some file is missing from here, you can mention the path in the ticket description. https://github.com/sweepai/sweep/blob/87ad43de8bfd5a4fca1b5165f0d799383351393b/tests/test_watch.py#L1-L11 https://github.com/sweepai/sweep/blob/87ad43de8bfd5a4fca1b5165f0d799383351393b/sweepai/utils/multi_query.py#L1-L102 https://github.com/sweepai/sweep/blob/87ad43de8bfd5a4fca1b5165f0d799383351393b/sweepai/core/context_pruning.py#L946-L1060 https://github.com/sweepai/sweep/blob/87ad43de8bfd5a4fca1b5165f0d799383351393b/platform/README.md#L50-L63 https://github.com/sweepai/sweep/blob/87ad43de8bfd5a4fca1b5165f0d799383351393b/sweepai/handlers/create_pr.py#L357-L455 https://github.com/sweepai/sweep/blob/87ad43de8bfd5a4fca1b5165f0d799383351393b/sweepai/core/reflection_utils.py#L1-L174 https://github.com/sweepai/sweep/blob/87ad43de8bfd5a4fca1b5165f0d799383351393b/sweepai/core/prompts.py#L629-L1084 https://github.com/sweepai/sweep/blob/87ad43de8bfd5a4fca1b5165f0d799383351393b/sweepai/agents/assistant_function_modify.py#L1-L308 https://github.com/sweepai/sweep/blob/87ad43de8bfd5a4fca1b5165f0d799383351393b/sweepai/utils/openai_listwise_reranker.py#L381-L484 https://github.com/sweepai/sweep/blob/87ad43de8bfd5a4fca1b5165f0d799383351393b/sweepai/utils/progress.py#L1-L283 https://github.com/sweepai/sweep/blob/87ad43de8bfd5a4fca1b5165f0d799383351393b/docs/pages/blogs/ai-unit-tests.mdx#L1-L50 https://github.com/sweepai/sweep/blob/87ad43de8bfd5a4fca1b5165f0d799383351393b/platform/cypress/support/e2e.ts#L1-L19 https://github.com/sweepai/sweep/blob/87ad43de8bfd5a4fca1b5165f0d799383351393b/sweepai/utils/convert_openai_anthropic.py#L1-L128

Step 2: ⌨️ Coding


Step 3: 🔁 Code Review

I have finished reviewing the code for completeness. I did not find errors for sweep/add_tests_for_context_agent_d5ec1.


🎉 Latest improvements to Sweep:
  • New dashboard launched for real-time tracking of Sweep issues, covering all stages from search to coding.
  • Integration of OpenAI's latest Assistant API for more efficient and reliable code planning and editing, improving speed by 3x.
  • Use the GitHub issues extension for creating Sweep issues directly from your editor.

💡 To recreate the pull request edit the issue title or description. Something wrong? Let us know.

This is an automated message generated by Sweep AI.