d-walsh / sweep

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

Sweep: "sweep watch" cli just exits without starting server #1

Closed d-walsh closed 1 week ago

d-walsh commented 1 week ago

Branch

No response

Checklist - [X] Modify `sweepai/cli.py` ✓ https://github.com/d-walsh/sweep/commit/a669104b5d8dcab495eed2d69b92573092f18323 [Edit](https://github.com/d-walsh/sweep/edit/sweep/sweep_watch_cli_just_exits_without_start/sweepai/cli.py) - [X] Modify `sweepai/watch.py` ✓ https://github.com/d-walsh/sweep/commit/a669104b5d8dcab495eed2d69b92573092f18323 [Edit](https://github.com/d-walsh/sweep/edit/sweep/sweep_watch_cli_just_exits_without_start/sweepai/watch.py)
d-walsh commented 1 week ago

🚀 Here's the PR! #2

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

[!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/d-walsh/sweep/blob/34b4c37db109c92fad9da526a26b17be0253b90a/sweepai/cli.py#L1-L244 https://github.com/d-walsh/sweep/blob/34b4c37db109c92fad9da526a26b17be0253b90a/sweepai/cli.py#L245-L371 https://github.com/d-walsh/sweep/blob/34b4c37db109c92fad9da526a26b17be0253b90a/sweepai/watch.py#L1-L115 https://github.com/d-walsh/sweep/blob/34b4c37db109c92fad9da526a26b17be0253b90a/bin/redeploy.sh#L1-L50 https://github.com/d-walsh/sweep/blob/34b4c37db109c92fad9da526a26b17be0253b90a/bin/startup.sh#L1-L40 https://github.com/d-walsh/sweep/blob/34b4c37db109c92fad9da526a26b17be0253b90a/sweepai/core/reflection_utils.py#L1-L117 https://github.com/d-walsh/sweep/blob/34b4c37db109c92fad9da526a26b17be0253b90a/sweepai/handlers/on_ticket.py#L1-L79 https://github.com/d-walsh/sweep/blob/34b4c37db109c92fad9da526a26b17be0253b90a/sweep_chat/sentry.client.config.ts#L1-L29 https://github.com/d-walsh/sweep/blob/34b4c37db109c92fad9da526a26b17be0253b90a/sweep_chat/sentry.server.config.ts#L1-L17 https://github.com/d-walsh/sweep/blob/34b4c37db109c92fad9da526a26b17be0253b90a/sweepai/utils/multi_query.py#L1-L103 https://github.com/d-walsh/sweep/blob/34b4c37db109c92fad9da526a26b17be0253b90a/sweep_chat/next.config.mjs#L1-L55 https://github.com/d-walsh/sweep/blob/34b4c37db109c92fad9da526a26b17be0253b90a/sweepai/agents/search_agent.py#L1-L188 https://github.com/d-walsh/sweep/blob/34b4c37db109c92fad9da526a26b17be0253b90a/bin/deploy.sh#L1-L50 https://github.com/d-walsh/sweep/blob/34b4c37db109c92fad9da526a26b17be0253b90a/sweepai/utils/openai_listwise_reranker.py#L1-L380 https://github.com/d-walsh/sweep/blob/34b4c37db109c92fad9da526a26b17be0253b90a/sweepai/utils/openai_listwise_reranker.py#L485-L787

Step 2: ⌨️ Coding

At the end of the watch function, after the stream_events and handle_event function definitions:
• Call main(repo, repo_name) to start the watching server with the user-specified repository

In the main function:
• Remove the lines that get the GITHUB_PAT from environment variable and create the Github instance
• Remove the line that gets the repo_name from environment variable
• Remove the line that gets the repo using g.get_repo(repo_name)
• Use the passed in repo and repo_name variables instead


Step 3: 🔁 Code Review

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


🎉 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.

d-walsh commented 1 week ago

I think you just have to remove the "if main" check in the watch function for cli.py