├── .assets ├── airbyte_embedding_speed.png ├── airbyte_embedding_time.png ├── gradio-screenshot.png ├── sweep-banner-github.png ├── sweep-square.png ├── sweep_modify_gif_small.gif └── sweeping.gif ├── .gitattributes ├── .github ├── ISSUE_TEMPLATE │ ├── config.yml │ └── sweep_issue.yml ├── PULL_REQUEST_TEMPLATE.md └── workflows │ ├── cypress.yml │ ├── pypi.yml.removed │ ├── python.yml │ ├── review.yml │ └── sweep.yml ├── .gitignore ├── .pre-commit-config.yaml ├── CONTRIBUTING.md ├── Dockerfile ├── LICENSE ├── README.md ├── bin ├── deploy.sh ├── install.sh ├── install_assistant.sh ├── redeploy.sh ├── server │ ├── install_full.sh │ ├── install_light.sh │ └── run.sh └── startup.sh ├── docker-compose.yml ├── docs ├── .github │ └── screenshot.png ├── .gitignore ├── README.md ├── Recipes.md ├── components │ ├── Cards.tsx │ ├── PRPreview.jsx │ ├── RepoPreview.jsx │ ├── ShowMore.jsx │ ├── counters.module.css │ └── counters.tsx ├── extension-post-install.md ├── installation.md ├── next-env.d.ts ├── next.config.js ├── package.json ├── pages │ ├── _app.tsx │ ├── _meta.json │ ├── about │ │ ├── _meta.json │ │ ├── examples.mdx │ │ ├── limitations.mdx │ │ └── roadmap.mdx │ ├── blogs │ │ ├── _meta.json │ │ ├── ai-code-planning.mdx │ │ ├── ai-unit-tests.mdx │ │ ├── automate-tech-debt.mdx │ │ ├── building-code-search.mdx │ │ ├── chunking-2m-files.mdx │ │ ├── chunking-improvements.mdx │ │ ├── file-cache.mdx │ │ ├── generating-50k-embeddings-with-gte.mdx │ │ ├── giving-dev-tools.mdx │ │ ├── gpt-32k-open-source.mdx │ │ ├── gpt-4-modification.mdx │ │ ├── index.mdx │ │ ├── llm-sdk.mdx │ │ ├── openai-proxy.mdx │ │ ├── reading-docs.mdx │ │ ├── refactor-python.mdx │ │ ├── search-infra.mdx │ │ ├── soc2.mdx │ │ ├── super-linter.mdx │ │ ├── sweeps-core-algo.mdx │ │ ├── understanding-codebase-with-ctags.mdx │ │ ├── vector-db-implementation.mdx │ │ └── zero-downtime-deployment.mdx │ ├── cli.mdx │ ├── deployment.mdx │ ├── deployment.mdx.old │ ├── faq.mdx │ ├── getting-started.md │ ├── index.mdx │ ├── privacy.mdx │ ├── usage │ │ ├── _meta.json │ │ ├── advanced.mdx │ │ ├── config.mdx │ │ └── tutorial.mdx │ └── videos │ │ ├── _meta.json │ │ ├── adding_banner.mdx │ │ ├── adding_walrus.mdx │ │ ├── ai_junior_dev_refactors_itself.mdx │ │ ├── ai_junior_developer_adds_an_easter_egg_to_our_logo.mdx │ │ └── introducing_sweep.mdx ├── pnpm-lock.yaml ├── public │ ├── assets │ │ ├── azure_playground.png │ │ ├── multi_llm_step.png │ │ ├── single_llm_step.png │ │ ├── tutorial │ │ │ ├── create_issue.gif │ │ │ ├── github_pat_config.gif │ │ │ ├── issue_comment.gif │ │ │ ├── label_issue.gif │ │ │ ├── merge_conflict.gif │ │ │ └── pr_comment.gif │ │ └── youtube_thumbnail.png │ ├── assistant │ │ └── sweep_modify_gif_small.gif │ ├── banner.png │ ├── covers │ │ ├── ai-code-planning.png │ │ ├── ai-unit-tests.png │ │ ├── automate-tech-debt.png │ │ ├── building-code-search.png │ │ ├── chunking-2m-files.png │ │ ├── chunking-improvements.png │ │ ├── file-cache.png │ │ ├── generating-50k-embeddings-with-gte.png │ │ ├── giving-dev-tools.png │ │ ├── gpt-32k-open-source.png │ │ ├── gpt-4-modification.png │ │ ├── llm-sdk.png │ │ ├── openai-proxy.png │ │ ├── reading-docs.png │ │ ├── refactor-python.png │ │ ├── search-infra.png │ │ ├── self-hosting.png │ │ ├── super-linter.png │ │ ├── sweeps-core-algo.png │ │ ├── understanding-codebase-with-ctags.png │ │ ├── vector-db-implementation.png │ │ └── zero-downtime-deployment.png │ ├── deployment │ │ ├── appid.png │ │ ├── appsettings.png │ │ ├── digitalocean_step1.png │ │ ├── digitalocean_step2.png │ │ ├── digitalocean_step3.png │ │ ├── digitalocean_step4.png │ │ ├── digitalocean_step5.png │ │ ├── digitalocean_step6.png │ │ ├── digitalocean_step7.png │ │ ├── digitalocean_step8.png │ │ ├── digitalocean_step9.png │ │ ├── do.png │ │ ├── events.png │ │ ├── fcr.png │ │ ├── graph.png │ │ ├── graph_pruned.png │ │ ├── pem.png │ │ └── tech_debt.png │ ├── favicon.ico │ ├── file_cache.py │ ├── final-sweep-wizard_128x128.png │ ├── final-sweep-wizard_16x16.png │ ├── final-sweep-wizard_256x256.png │ ├── final-sweep-wizard_32x32.png │ ├── final-sweep-wizard_48x48.png │ ├── final-sweep-wizard_64x64.png │ ├── flowchart │ │ ├── flowchart_1.png │ │ ├── flowchart_2.png │ │ ├── flowchart_3.png │ │ └── flowchart_4.png │ ├── logo.png │ ├── modification │ │ └── drake.jpg │ ├── og_image.png │ ├── og_image.svg │ ├── openai_proxy │ │ ├── azure_us_east_rate_limits.png │ │ ├── multi_region_azure_openai_proxy.png │ │ ├── openai_cost_graph.png │ │ ├── openai_rate_limits.png │ │ └── simple_azure_openai_proxy.png │ ├── redis_vector_db.py │ ├── resume.pdf │ ├── sweep-core-algo │ │ ├── execute.png │ │ ├── flowchart.png │ │ ├── flowchart.svg │ │ ├── inputs.png │ │ ├── plan.png │ │ ├── search.png │ │ ├── sweep_contributions.png │ │ └── validation.png │ ├── trunk │ │ └── executions.png │ └── tutorial │ │ ├── comment.png │ │ ├── congratulations.png │ │ ├── deployment.png │ │ ├── final.png │ │ ├── github_actions.png │ │ ├── initial.png │ │ ├── installation.png │ │ ├── issue.png │ │ └── new.png ├── sdk │ ├── README.md │ ├── pyproject.toml │ └── src │ │ ├── __init__.py │ │ └── agent.py ├── styles │ └── global.css ├── tailwind.config.js ├── theme.config.tsx └── tsconfig.json ├── notebooks ├── chunking.ipynb ├── clustering.ipynb ├── graph.ipynb └── lexical_index.ipynb ├── package-lock.json ├── package.json ├── pyproject.toml ├── pyrightconfig.json ├── redis.conf ├── requirements.txt ├── sweep.yaml ├── sweep_chat ├── .env ├── .eslintrc.json ├── .gitignore ├── .prettierrc.js ├── README.md ├── app │ ├── api │ │ └── auth │ │ │ └── [...nextauth] │ │ │ └── route.ts │ ├── c │ │ └── [messageId] │ │ │ └── page.tsx │ ├── favicon.ico │ ├── global-error.jsx │ ├── globals.css │ ├── layout.tsx │ └── page.tsx ├── components.json ├── components │ ├── App.tsx │ ├── CodeMirrorSuggestionEditor.tsx │ ├── FeedbackBlock.tsx │ ├── MessageDisplay.tsx │ ├── PrValidationStatusesDisplay.tsx │ ├── PullRequestDisplay.tsx │ ├── Survey.tsx │ ├── shared │ │ ├── ContextSideBar.tsx │ │ ├── MarkdownRenderer.tsx │ │ ├── PulsingLoader.tsx │ │ ├── SnippetBadge.tsx │ │ └── SnippetSearch.tsx │ ├── theme-provider.tsx │ └── ui │ │ ├── accordion.tsx │ │ ├── alert.tsx │ │ ├── autocomplete.tsx │ │ ├── autoscroll.tsx │ │ ├── button.tsx │ │ ├── card.tsx │ │ ├── collapsible.tsx │ │ ├── command.tsx │ │ ├── dialog.tsx │ │ ├── drawer.tsx │ │ ├── dropdown-menu.tsx │ │ ├── hover-card.tsx │ │ ├── input.tsx │ │ ├── label.tsx │ │ ├── navigation-menu.tsx │ │ ├── popover.tsx │ │ ├── resizable.tsx │ │ ├── scroll-area.tsx │ │ ├── sheet.tsx │ │ ├── skeleton.tsx │ │ ├── slider.tsx │ │ ├── switch.tsx │ │ ├── textarea.tsx │ │ ├── toast.tsx │ │ ├── toaster.tsx │ │ └── use-toast.ts ├── cypress.config.ts ├── cypress │ ├── e2e │ │ └── spec.cy.ts │ ├── fixtures │ │ └── example.json │ └── support │ │ ├── commands.ts │ │ └── e2e.ts ├── instrumentation.ts ├── lib │ ├── authOptions.ts │ ├── constants.ts │ ├── contextManagers.ts │ ├── parsePullRequest.ts │ ├── posthog.ts │ ├── pullUtils.ts │ ├── str_utils.ts │ ├── streamingUtils.ts │ ├── types.ts │ └── utils.ts ├── next.config.mjs ├── package-lock.json ├── package.json ├── postcss.config.mjs ├── public │ ├── banner.svg │ ├── next.svg │ └── vercel.svg ├── sentry.client.config.ts ├── sentry.edge.config.ts ├── sentry.server.config.ts ├── tailwind.config.ts └── tsconfig.json ├── sweepai ├── __init__.py ├── agents │ ├── agent_utils.py │ ├── analyze_snippets.py │ ├── assistant_functions.py │ ├── assistant_wrapper.py │ ├── assistant_wrapper_test.py │ ├── complete_code.py │ ├── complete_code_test.py │ ├── distill_issue.py │ ├── image_description_bot.py │ ├── issue_cleanup_agent.py │ ├── modify.py │ ├── modify_utils.py │ ├── pr_description_bot.py │ ├── prune_modify_snippets.py │ ├── question_answerer.py │ ├── rg_extractor.py │ ├── search_agent.py │ ├── summarize_directory.py │ └── summarize_file.py ├── api.py ├── chat │ ├── api.py │ └── search_prompts.py ├── cli.py ├── cli_test.py ├── config │ ├── __init__.py │ ├── client.py │ └── server.py ├── core │ ├── __init__.py │ ├── annotate_code_openai.py │ ├── chat.py │ ├── context_pruning.py │ ├── dynamic_context_bot.py │ ├── entities.py │ ├── external_searcher.py │ ├── lexical_search.py │ ├── on_comment_prompts.py │ ├── planning_prompts.py │ ├── post_merge.py │ ├── pr_reader.py │ ├── prompts.py │ ├── pull_request_bot.py │ ├── reflection_utils.py │ ├── repo_parsing_utils.py │ ├── review_annotations.py │ ├── review_prompts.py │ ├── review_utils.py │ ├── snippet_utils.py │ ├── sweep_bot.py │ ├── vector_db.py │ └── viz_utils.py ├── dataclasses │ ├── check_status.py │ ├── code_suggestions.py │ ├── codereview.py │ ├── comments.py │ ├── dockerfile_config.py │ ├── files.py │ ├── gha_fix.py │ ├── searchindex.py │ └── separatedsnippets.py ├── global_threads.py ├── handlers │ ├── __init__.py │ ├── create_pr.py │ ├── on_button_click.py │ ├── on_button_click_test.py │ ├── on_check_suite.py │ ├── on_comment.py │ ├── on_failing_github_actions.py │ ├── on_jira_ticket.py │ ├── on_merge.py │ ├── on_ticket.py │ └── review_pr.py ├── logn │ ├── README.md │ ├── __init__.py │ ├── cache.py │ └── trace_util.py ├── utils │ ├── __init__.py │ ├── anthropic_client.py │ ├── buttons.py │ ├── buttons_test.py │ ├── chat_logger.py │ ├── code_tree.py │ ├── code_tree_test.py │ ├── code_validators.py │ ├── cohere_utils.py │ ├── comment_utils.py │ ├── comment_utils_test.py │ ├── concurrency_utils.py │ ├── convert_openai_anthropic.py │ ├── diff.py │ ├── diff_test.py │ ├── docker_utils.py │ ├── docker_utils_test.py │ ├── event_logger.py │ ├── file_utils.py │ ├── fuzzy_diff.py │ ├── fuzzy_diff_test.py │ ├── github_utils.py │ ├── github_utils_test.py │ ├── hash.py │ ├── html_extractor.py │ ├── image_utils.py │ ├── issue_validator.py │ ├── majority_vote.py │ ├── multi_query.py │ ├── openai_listwise_reranker.py │ ├── openai_proxy.py │ ├── openai_proxy_test.py │ ├── patch_utils.py │ ├── previous_diff_utils.py │ ├── progress.py │ ├── progress_test.py │ ├── prompt_constructor.py │ ├── regex_utils.py │ ├── ripgrep_utils.py │ ├── safe_pqueue.py │ ├── scorer.py │ ├── scorer_test.py │ ├── search_and_replace.py │ ├── search_and_replace_test.py │ ├── slack_utils.py │ ├── str_utils.py │ ├── streamable_functions.py │ ├── ticket_rendering_utils.py │ ├── ticket_utils.py │ ├── tiktoken_utils.py │ ├── timer.py │ ├── tree_utils.py │ ├── user_settings.py │ ├── utils_test.py │ └── validate_license.py ├── watch.py └── web │ ├── event_utils.py │ ├── events.py │ ├── health.py │ ├── health_test.py │ └── index.html └── tests ├── __init__.py ├── e2e ├── test_cli_run.py ├── test_file_tests.py ├── test_pr_comment.py ├── test_pr_review.py ├── test_pr_review_comment.py └── test_sweep_issue.py ├── events ├── create_None_34875225368.pkl ├── create_None_34875316547.pkl ├── create_None_34875548354.pkl ├── create_None_34875679257.pkl ├── issue_closed_11503916179.pkl ├── issue_comment_created_34875231171.pkl ├── issue_comment_created_34875260242.pkl ├── issue_comment_created_34875326442.pkl ├── issue_comment_created_34875330267.pkl ├── issue_comment_created_34875495470.pkl ├── issue_comment_created_34875496046.pkl ├── issue_comment_created_34875575948.pkl ├── issue_comment_created_34875580479.pkl ├── issue_comment_created_34875663842.pkl ├── issue_comment_created_34875664837.pkl ├── issue_comment_created_34875665614.pkl ├── issue_comment_created_34875673952.pkl ├── issue_comment_created_34875674995.pkl ├── issue_comment_created_34875675569.pkl ├── issue_comment_created_34875703608.pkl ├── issue_comment_created_34875703833.pkl ├── issue_comment_created_34875705752.pkl ├── issue_deployed_11503790917.pkl ├── issue_deployed_11503827904.pkl ├── issue_deployed_11503917336.pkl ├── issue_labeled_11503901425.pkl ├── issue_labeled_11503959359.pkl ├── issue_review_requested_11503787821.pkl ├── issue_unlabeled_11503901079.pkl ├── pull_request_closed_34875582679.pkl ├── pull_request_opened_34875229202.pkl ├── pull_request_opened_34875324597.pkl ├── pull_request_opened_34875574148.pkl ├── pull_request_opened_34875703602.pkl ├── push_None_34875568335.pkl └── push_None_34875697750.pkl ├── jsons ├── e2e_branch_change.json ├── e2e_button_to_green.json ├── e2e_pr_comment.json ├── e2e_pr_review_comment.json ├── merge_webhook.json ├── move_file_comment.json ├── opened_pull.json ├── pr_activate_hey_button.json ├── pull_request_closed.json ├── summaries.json ├── sweep_rules_webhook.json └── sweep_yaml.json ├── modify_benchmark.py ├── modify_tests ├── modify_test.py └── test_tabs.py ├── monitor_prod.py ├── notebooks ├── asst.ipynb ├── asst.py ├── graph.ipynb ├── heatmap.ipynb ├── importmagic.ipynb ├── jedi.ipynb ├── logprobs.ipynb ├── rope.ipynb ├── rope_class.ipynb ├── rope_move.ipynb ├── rope_reorder.ipynb └── src │ ├── class_refactor.py │ ├── helpers │ ├── test2.py │ └── utils.py │ ├── jedi_test.py │ ├── mod1.py │ ├── mod2.py │ ├── mod3.py │ ├── test.py │ └── test2.py ├── perf ├── concurrent_fastapi.py └── stress_test.py ├── ping_webhook.py ├── pr_understanding.py ├── redirect_api.py ├── rerun_chat_modify_direct.py ├── rerun_comment_direct.py ├── rerun_fix_github_actions_direct.py ├── rerun_issue.py ├── rerun_issue_direct.py ├── rerun_pr_review_comment_direct.py ├── rerun_review_pr.py ├── search └── test_lexical_search.py ├── test_code_review.py ├── test_context_pruning.py ├── test_get_circleci_logs_from_pr.py ├── test_get_gha_logs_from_pr.py ├── test_gha_extraction.py ├── test_github_request_exception.py ├── test_jira_ticket.py ├── test_modify_utils.py ├── test_multiline_comment.py ├── test_run_gha.py ├── test_setup_tree.py └── test_watch.py /.assets/airbyte_embedding_speed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sweepai/sweep/a8b8b67bda4f89faac9314d34e7c7d5a64f76046/.assets/airbyte_embedding_speed.png -------------------------------------------------------------------------------- /.assets/airbyte_embedding_time.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sweepai/sweep/a8b8b67bda4f89faac9314d34e7c7d5a64f76046/.assets/airbyte_embedding_time.png -------------------------------------------------------------------------------- /.assets/gradio-screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sweepai/sweep/a8b8b67bda4f89faac9314d34e7c7d5a64f76046/.assets/gradio-screenshot.png -------------------------------------------------------------------------------- /.assets/sweep-banner-github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sweepai/sweep/a8b8b67bda4f89faac9314d34e7c7d5a64f76046/.assets/sweep-banner-github.png -------------------------------------------------------------------------------- /.assets/sweep-square.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sweepai/sweep/a8b8b67bda4f89faac9314d34e7c7d5a64f76046/.assets/sweep-square.png -------------------------------------------------------------------------------- /.assets/sweep_modify_gif_small.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sweepai/sweep/a8b8b67bda4f89faac9314d34e7c7d5a64f76046/.assets/sweep_modify_gif_small.gif -------------------------------------------------------------------------------- /.assets/sweeping.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sweepai/sweep/a8b8b67bda4f89faac9314d34e7c7d5a64f76046/.assets/sweeping.gif -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | docs/public/**/*.png filter=lfs diff=lfs merge=lfs -text 2 | docs/public/**/*.gif filter=lfs diff=lfs merge=lfs -text 3 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | contact_links: 2 | - name: Discourse 3 | url: https://community.sweep.dev/ 4 | about: Feel free to report bugs and request features here! 5 | - name: Docs 6 | url: https://docs.sweep.dev 7 | about: Check out how to self-deploy Sweep, usage guides and best practices 8 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/sweep_issue.yml: -------------------------------------------------------------------------------- 1 | name: Sweep Issue 2 | title: 'Sweep: ' 3 | description: For small bugs, features, refactors, and tests to be handled by Sweep, an AI-powered junior developer. 4 | labels: sweep 5 | body: 6 | - type: textarea 7 | id: description 8 | attributes: 9 | label: Details 10 | description: Tell Sweep where and what to edit and provide enough context for a new developer to the codebase 11 | placeholder: | 12 | Bugs: The bug might be in ... file. Here are the logs: ... 13 | Features: the new endpoint should use the ... class from ... file because it contains ... logic. 14 | Refactors: We are migrating this function to ... version because ... 15 | - type: input 16 | id: branch 17 | attributes: 18 | label: Branch 19 | description: The branch to work off of (optional) 20 | placeholder: | 21 | main 22 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | # Purpose 2 | 3 | Please provide a high-level overview of what this pull request aims to achieve. 4 | 5 | # Changes Made 6 | 7 | Please provide a detailed list of the changes made in this pull request. 8 | 9 | 1. 10 | 2. 11 | 3. 12 | 13 | # Additional Notes 14 | 15 | Please provide any additional notes or screenshots here. 16 | When you make a PR, please ping us on Discourse at https://community.sweep.dev/. 17 | -------------------------------------------------------------------------------- /.github/workflows/sweep.yml: -------------------------------------------------------------------------------- 1 | # name: Sweep Run Code 2 | 3 | # concurrency: 4 | # group: ${{ github.workflow }}-${{ github.ref }} 5 | # cancel-in-progress: true 6 | 7 | # on: 8 | # push: 9 | 10 | # jobs: 11 | # code-quality: 12 | # runs-on: ubuntu-latest 13 | # strategy: 14 | # matrix: 15 | # python-version: ["3.10"] 16 | # # python-version: ["3.10", "3.11"] 17 | # os: [ubuntu-latest] 18 | # outputs: 19 | # cache-key: ${{ steps.cache-dependencies.outputs.cache-key }} 20 | # steps: 21 | # - uses: actions/checkout@v3 22 | # - uses: actions-rs/toolchain@v1 23 | # with: 24 | # profile: minimal 25 | # toolchain: 1.67.0 26 | # override: true 27 | # - uses: Swatinem/rust-cache@v1 28 | # - uses: actions/setup-python@v4 29 | # with: 30 | # python-version: ${{ matrix.python-version }} 31 | # - run: echo "VIRTUAL_ENV=${Python_ROOT_DIR}" >> $GITHUB_ENV 32 | # # if: steps.restore-dependencies.outputs.cache-hit != 'true' 33 | # - run: pip install uv 34 | # # if: steps.restore-dependencies.outputs.cache-hit != 'true' 35 | # - run: uv pip install -r requirements.txt 36 | # # if: steps.restore-dependencies.outputs.cache-hit != 'true' 37 | # - run: uv pip install ruff pylint pytest pytest-xdist black 38 | # # if: steps.restore-dependencies.outputs.cache-hit != 'true' 39 | # - name: Run arbitrary code 40 | # run: | 41 | # echo "Placeholder" 42 | -------------------------------------------------------------------------------- /.pre-commit-config.yaml: -------------------------------------------------------------------------------- 1 | # See https://pre-commit.com for more information 2 | # See https://pre-commit.com/hooks.html for more hooks 3 | repos: 4 | - repo: https://github.com/pre-commit/pre-commit-hooks 5 | rev: v4.4.0 6 | hooks: 7 | - id: trailing-whitespace 8 | - id: end-of-file-fixer 9 | - id: check-yaml 10 | # - id: check-added-large-files 11 | 12 | - repo: https://github.com/psf/black 13 | rev: 23.9.1 14 | hooks: 15 | - id: black 16 | language_version: python3.10 17 | 18 | - repo: https://github.com/pre-commit/mirrors-isort 19 | rev: v5.10.1 # Use the ref you want to point at 20 | hooks: 21 | - id: isort 22 | 23 | - repo: https://github.com/myint/autoflake 24 | rev: v1.4 # Use the ref you want to point at 25 | hooks: 26 | - id: autoflake 27 | args: ['--remove-all-unused-imports', '--remove-unused-variables', '--in-place'] 28 | exclude: '__init__.py' 29 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | # Contributing to Sweep AI 4 | 5 | First off, thank you for considering contributing to Sweep AI. It's people like you that make Sweep AI such a great tool. 6 | 7 | ## Creating Issues 8 | 9 | Before you submit an issue, please do a search in [open issues](https://github.com/sweepai/sweep/issues) to see if the issue or feature request has already been filed. 10 | Use the provided issue template when creating a new issue. Fill in the template with as much detail as possible. The more detail you provide, the more likely that someone can help you. 11 | Alternatively, you can use Sweep to create a ticket for the problem first. Simply describe the issue or feature request, and Sweep will create a ticket for it. This can help you understand the problem better and guide you in manually solving it. 12 | You can also use Sweep to create tickets. Simply describe the issue or feature request, and Sweep will create a ticket for it. 13 | 14 | ## Submitting Pull Requests 15 | 16 | If you're working on an existing issue, respond to the issue and express interest in working on it. This helps other people know that the issue is active, and hopefully prevents duplicated efforts. 17 | 18 | To submit a pull request, follow the following steps: 19 | 20 | 1. Clone the repository. 21 | 2. Create a new branch from `main`. 22 | 3. Make your changes. 23 | 4. Push your branch and submit a pull request to the `main` branch. 24 | 5. Await review. Respond to any comments or requests made by reviewers. 25 | 26 | ## Important Notes 27 | 1. Please do not edit the structure of the repo. Sweep is constantly changing, and we want to make sure that we can easily integrate your changes into our codebase. 28 | 29 | ## Coding Standards 30 | 31 | Please ensure your code adheres to the coding standards used throughout the project. This includes proper indentation, accurate comments, and clear, concise code. 32 | 33 | ## Community 34 | 35 | Please be respectful and considerate of others. We're all here to learn and grow, so constructive, respectful communication is encouraged. 36 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.10-slim as base 2 | 3 | ENV PYTHONDONTWRITEBYTECODE 1 4 | ENV PYTHONUNBUFFERED 1 5 | ENV WORKERS=3 6 | ENV PORT=${PORT:-8080} 7 | 8 | WORKDIR /app 9 | 10 | RUN apt-get update \ 11 | && apt-get install -y --no-install-recommends git curl redis-server npm build-essential pkg-config libssl-dev \ 12 | cmake pkg-config libicu-dev zlib1g-dev libcurl4-openssl-dev libssl-dev ruby-dev \ 13 | && apt-get clean \ 14 | && rm -rf /var/lib/apt/lists/* 15 | 16 | RUN gem install github-linguist 17 | 18 | RUN curl -LO https://github.com/BurntSushi/ripgrep/releases/download/13.0.0/ripgrep_13.0.0_amd64.deb && \ 19 | dpkg -i ripgrep_13.0.0_amd64.deb && \ 20 | curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y 21 | ENV PATH="/root/.cargo/bin:${PATH}" 22 | RUN git clone https://github.com/BurntSushi/ripgrep 23 | RUN cd ripgrep && \ 24 | cargo build --release && \ 25 | ./target/release/rg --version 26 | 27 | ENV VIRTUAL_ENV=/usr/local 28 | RUN curl -sSL https://astral.sh/uv/install.sh -o /install.sh && chmod 755 /install.sh && /install.sh && rm /install.sh 29 | 30 | COPY requirements.txt ./ 31 | 32 | RUN pip install --no-cache -r requirements.txt 33 | 34 | RUN npm install -g prettier@2.0.4 @types/react @types/react-dom typescript eslint@8.57.0 35 | RUN npm install react react-dom 36 | RUN npm install @typescript-eslint/parser @typescript-eslint/eslint-plugin eslint-plugin-import eslint-plugin-react --save-dev 37 | 38 | COPY sweepai /app/sweepai 39 | COPY tests /app/tests 40 | ENV PYTHONPATH=. 41 | COPY redis.conf /app/redis.conf 42 | COPY bin /app/bin 43 | RUN chmod a+x /app/bin/startup.sh 44 | 45 | EXPOSE 8080 46 | CMD ["bash", "-c", "chmod a+x /app/bin/startup.sh && /app/bin/startup.sh"] 47 | 48 | LABEL org.opencontainers.image.description="Backend for Sweep, an AI-powered junior developer" 49 | LABEL org.opencontainers.image.source="https://github.com/sweepai/sweep" 50 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Hi everyone! 2 | 3 | Thank you for all of the support on Sweep. 4 | We're now building an AI coding assistant for JetBrains which is available here: 5 | [https://plugins.jetbrains.com/plugin/26275-sweep-ai](https://plugins.jetbrains.com/plugin/26860-sweep-ai) 6 | -------------------------------------------------------------------------------- /bin/deploy.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Remove old docker images only after 2 runs to allow for rollbacks. 4 | # Docker images also need to finish processing their requests before they can be removed. 5 | echo `docker ps` 6 | containers_to_remove=$(docker ps -q | awk 'NR>3') 7 | 8 | if [ ! -z "$containers_to_remove" ]; then 9 | echo "Removing old docker runs" 10 | docker rm -f $containers_to_remove 11 | else 12 | echo "No old docker runs to remove" 13 | fi 14 | 15 | # Find next available port to deploy to 16 | PORT=8081 17 | is_port_free() { 18 | lsof -i :$1 > /dev/null 19 | return $? 20 | } 21 | 22 | while is_port_free $PORT; do 23 | ((PORT++)) 24 | done 25 | 26 | echo "Found open port: $PORT" 27 | 28 | # Start new docker container on the next available port 29 | cd ~/sweep 30 | docker build -t sweepai/sweep:latest -f Dockerfile.hosted . 31 | container_id=$(docker run -v /mnt/caches:/mnt/caches -v --env-file .env -p $PORT:8080 -d sweepai/sweep:latest) 32 | docker exec -it $container_id python tests/rerun_issue_direct.py --no-debug https://github.com/wwzeng1/landing-page/issues/114 33 | echo "Running test on https://github.com/wwzeng1/landing-page/issues/114" 34 | 35 | # Wait until webhook is available before rerouting traffic to it 36 | echo "Waiting for server to start..." 37 | while true; do 38 | curl --output /dev/null --silent --fail http://localhost:$PORT/health 39 | if [ $? -eq 0 ]; then 40 | echo "Received a good response!" 41 | break 42 | else 43 | printf '.' 44 | sleep 1 45 | fi 46 | done 47 | 48 | # Update the ngrok proxy to point to the new port 49 | screen -list | grep -q "\bngrok\b" 50 | SESSION_EXISTS=$? 51 | 52 | if [ $SESSION_EXISTS -ne 0 ]; then 53 | screen -S ngrok -d -m 54 | echo creating new session 55 | sleep 1 56 | fi 57 | 58 | # Kill the ngrok process if it's already running 59 | screen -S ngrok -X stuff $'\003' 60 | sleep 1 61 | screen -S ngrok -X stuff $'ngrok http --domain=sweep-prod.ngrok.dev '$PORT$'\n' 62 | 63 | echo "Command sent to screen session on port: $PORT" 64 | echo "To view the ngrok logs, run: screen -r ngrok" 65 | -------------------------------------------------------------------------------- /bin/install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Check if sandbox directory exists, if not clone the repository 3 | if [ ! -d "./sandbox" ] 4 | then 5 | git clone https://github.com/sweepai/sweep-closed sandbox 6 | else 7 | if [ -d "./sandbox/.git" ] 8 | then 9 | echo "Fetching and pulling latest changes from the repository..." 10 | cd sandbox 11 | { 12 | git fetch 13 | git pull 14 | } || { 15 | echo "An error occurred while fetching and pulling the latest changes." 16 | } 17 | cd .. 18 | fi 19 | fi 20 | rm -f poetry.lock 21 | # Check if poetry is installed 22 | if ! command -v poetry &> /dev/null 23 | then 24 | echo "Poetry could not be found, installing..." 25 | curl -sSL https://install.python-poetry.org | python3 - 26 | fi 27 | # Install packages with poetry 28 | echo "Installing packages with poetry..." 29 | poetry install 30 | source $(poetry env info --path)/bin/activate 31 | poetry shell 32 | # Install deeplake with pip 33 | echo "Installing deeplake with pip..." 34 | pip install deeplake 35 | echo "Installing robotexclusionrulesparser with pip..." 36 | pip install robotexclusionrulesparser 37 | echo "Installing e2b with pip..." 38 | pip install e2b 39 | echo "Installing whoosh with pip..." 40 | pip install whoosh 41 | echo "Initializing pre-commits" 42 | pre-commit autoupdate 43 | pre-commit install 44 | echo "Installation complete!" 45 | -------------------------------------------------------------------------------- /bin/server/install_full.sh: -------------------------------------------------------------------------------- 1 | run_until_success() { 2 | local cmd="$1" 3 | until $cmd; do 4 | echo "Command failed, retrying in 5 seconds..." 5 | sleep 5 6 | done 7 | } 8 | 9 | run_until_success "sudo apt update" 10 | run_until_success "sudo apt install -y gcc g++ curl" 11 | run_until_success "sudo apt-get update" 12 | run_until_success "sudo apt-get install -y redis build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev libffi-dev liblzma-dev python3-openssl git" 13 | run_until_success "sudo systemctl stop redis" 14 | run_until_success "snap install ngrok" 15 | sudo apt install -y apt-transport-https ca-certificates curl software-properties-common -y && curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - && sudo add-apt-repository -y "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" && sudo apt update -y && sudo apt install docker-ce -y && sudo systemctl enable docker && sudo systemctl start docker && sudo usermod -aG docker ${USER} 16 | 17 | curl https://pyenv.run | bash 18 | { 19 | echo 'export PYENV_ROOT="$HOME/.pyenv"' 20 | echo 'command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"' 21 | echo 'eval "$(pyenv init -)"' 22 | echo '. ~/.bashrc' 23 | } > ~/.bash_profile 24 | sed -i '1i\ 25 | export PATH="/root/.local/bin:$PATH"\ 26 | eval "$(pyenv virtualenv-init -)"\ 27 | alias activate='\''source $(poetry env info --path)/bin/activate'\''\ 28 | ' ~/.bashrc 29 | source ~/.bash_profile 30 | source ~/.bashrc 31 | 32 | # Install python 3.11.5 33 | pyenv install 3.11.5 34 | cd ~/sweep 35 | pyenv local 3.11.5 36 | 37 | # Install poetry 38 | curl -sSL https://install.python-poetry.org | python3 - 39 | poetry env use /root/.pyenv/versions/3.11.5/bin/python 40 | poetry shell 41 | 42 | # Install with this command, pressing only enter when prompted: 43 | # git clone https://github.com/sweepai/sweep ~/sweep && . sweep/bin/install_full.sh 44 | 45 | # Afterwards, run: 46 | # - poetry install 47 | # - ngrok config (https://dashboard.ngrok.com/get-started/setup) 48 | # - copy .envs 49 | 50 | # To get into poetry shell, run `activate` from the sweep directory. 51 | -------------------------------------------------------------------------------- /bin/server/install_light.sh: -------------------------------------------------------------------------------- 1 | git clone http://github.com/sweepai/sweep 2 | sudo apt install docker.io -y 3 | sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose 4 | sudo chmod +x /usr/local/bin/docker-compose 5 | cd sweep 6 | echo "Configure ngrok: https://dashboard.ngrok.com/get-started/setup" 7 | echo "Then, run docker build/run commands." 8 | 9 | # curl -sSL https://raw.githubusercontent.com/sweepai/sweep/main/bin/server/install_light.sh | bash 10 | -------------------------------------------------------------------------------- /bin/server/run.sh: -------------------------------------------------------------------------------- 1 | docker run --env-file .env -p 8080:8080 -d sweepai/sweep:latest 2 | -------------------------------------------------------------------------------- /bin/startup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | RED="\033[0;31m" 4 | GREEN="\033[1;32m" 5 | BLUE="\033[1;34m" 6 | PURPLE="\033[1;35m" 7 | YELLOW="\033[1;33m" 8 | BOLD="\033[1m" 9 | NC="\033[0m" # No Color 10 | 11 | echo " 12 | 13 | @@@@@@%%@@@@@@@ 14 | @@ #@ 15 | @@ @@@ @@ 16 | @ * @ :@ 17 | @ =.@ @ 18 | -@* # @- 19 | @@@@@@@@@@@@@ @@@@ 20 | @@@@@@@@@@@@@ @@@@+ ${PURPLE}Sweep AI GitHub App${NC} 21 | @@ @@ @@@ @@@@@@ 22 | @@ @@ @@@@@@@@@@@@@ https://docs.sweep.dev/deployment 23 | @@@@@@@@@@@ @@@@@@@@ 24 | @@@@@@@@@ @@@@@@@@ 25 | @@@@@@@ @@@@@@. 26 | @@ @@@@@% 27 | @@@@@@ @ 28 | @ + @ 29 | -@ @ @ 30 | @@= @- @ 31 | -# 32 | " 33 | 34 | 35 | echo "${BLUE}By using the Sweep GitHub App, you agree to the Sweep AI Terms of Service at https://sweep.dev/tos.pdf${NC}\n" 36 | echo "${YELLOW}You're currently using the free version of self-hosted Sweep AI. For more performance, like fine-tuned search, switch to our enterprise version. Email us at ${BLUE}william@sweep.dev${YELLOW} or schedule a call at ${BLUE}https://calendly.com/sweep-ai/founders-meeting${YELLOW} to get set up.\n" 37 | 38 | 39 | echo "${YELLOW}Launching sweep on https://localhost:${PORT:-8080}${NC}" 40 | redis-server /app/redis.conf --bind 0.0.0.0 --port 6379 > /dev/null 2>&1 & 41 | uvicorn sweepai.api:app --host 0.0.0.0 --port ${PORT:-8080} --workers 8 42 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | services: 2 | hosted: 3 | env_file: 4 | - .env 5 | build: 6 | context: . 7 | dockerfile: Dockerfile 8 | target: base 9 | image: sweepai/sweep 10 | container_name: webhook 11 | # network_mode: "host" 12 | volumes: 13 | - .:/app 14 | - /mnt/caches:/mnt/caches 15 | command: > 16 | sh -c ". bin/startup.sh" 17 | stdin_open: true 18 | tty: true 19 | ports: 20 | - "${PORT:-8080}:8080" 21 | restart: unless-stopped 22 | -------------------------------------------------------------------------------- /docs/.github/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sweepai/sweep/a8b8b67bda4f89faac9314d34e7c7d5a64f76046/docs/.github/screenshot.png -------------------------------------------------------------------------------- /docs/.gitignore: -------------------------------------------------------------------------------- 1 | .next 2 | node_modules 3 | .env.local 4 | -------------------------------------------------------------------------------- /docs/README.md: -------------------------------------------------------------------------------- 1 | # Nextra Docs Template 2 | 3 | This is a template for creating documentation with [Nextra](https://nextra.site). 4 | 5 | [**Live Demo →**](https://nextra-docs-template.vercel.app) 6 | 7 | [![](.github/screenshot.png)](https://nextra-docs-template.vercel.app) 8 | 9 | ## Quick Start 10 | 11 | Click the button to clone this repository and deploy it on Vercel: 12 | 13 | [![](https://vercel.com/button)](https://vercel.com/new/clone?s=https%3A%2F%2Fgithub.com%2Fshuding%2Fnextra-docs-template&showOptionalTeamCreation=false) 14 | 15 | ## Local Development 16 | 17 | First, run `pnpm i` to install the dependencies. 18 | 19 | Then, run `pnpm dev` to start the development server and visit localhost:3000. 20 | 21 | ## License 22 | 23 | This project is licensed under the MIT License. 24 | -------------------------------------------------------------------------------- /docs/Recipes.md: -------------------------------------------------------------------------------- 1 | ### 🍲 Recipes 2 | #### To get the best performance from Sweep, we recommend the following approach to writing github issues/chats. 3 | For harder problems, try to provide the same information a human would need. For simpler problems, providing a single line and a file name should suffice. 4 | 5 | A good issue might include: 6 | 7 | | Where to look
**[file name or function name]**| What to do
**[change the logic to do this]** | Additional Context (optional)
**[there's a bug/we need this feature/there's this dependency]** | 8 | |-----------|------------|----------------------| 9 | |In `sweepai/app/ui.py`|use an os-agnostic temp directory|N/A| 10 | |In `on_comment.py`|we should not fire an event|because it's possible that the comment is on a closed PR| 11 | |In the config loader in `packages/server/src/config.ts`|add a third option called "env" to load the config settings from environment variables| At present, there are two options: 1. ... and 2. ...| 12 | 13 | If you want Sweep to use a file, try to mention the full path. Similarly, to have Sweep use a function, try to mention the class method or what it does. Also see [✨ Tips and tricks for Sweep](https://docs.sweep.dev/usage/advanced). 14 | 15 | #### Limitations: 16 | Sweep is unlikely to complete complex issues on the first try, similar to the average junior developer. Here are Sweep's limitations(for now): 17 | - Try to change less than 300 lines of code 18 | - Try to modify less than 3 files 19 | -------------------------------------------------------------------------------- /docs/components/ShowMore.jsx: -------------------------------------------------------------------------------- 1 | import { useState, useRef } from "react" 2 | 3 | export function ShowMore({ children }) { 4 | const [isExpanded, setIsExpanded] = useState(false); 5 | const [showButton, setShowButton] = useState(true); 6 | const contentRef = useRef(null); 7 | 8 | // sort this out later 9 | 10 | // useEffect(() => { 11 | // console.log("contentRef", contentRef.current.scrollHeight) 12 | // if (contentRef.current.scrollHeight < 200) { 13 | // setShowButton(false); 14 | // } 15 | // }, [contentRef]); 16 | 17 | const contentStyle = { 18 | overflow: 'hidden', 19 | transition: 'max-height 0.4s ease-in-out', 20 | maxHeight: (isExpanded || !showButton) ? '5000px' : '300px' // 1000px should be larger than the content's potential maximum height 21 | }; 22 | 23 | return ( 24 |
25 |
29 | {children} 30 |
31 | {showButton && ( 32 |
33 | 36 |
37 | )} 38 |
39 | ); 40 | } 41 | -------------------------------------------------------------------------------- /docs/components/counters.module.css: -------------------------------------------------------------------------------- 1 | .counter { 2 | border: 1px solid #ccc; 3 | border-radius: 5px; 4 | padding: 2px 6px; 5 | margin: 12px 0 0; 6 | } 7 | -------------------------------------------------------------------------------- /docs/components/counters.tsx: -------------------------------------------------------------------------------- 1 | // Example from https://beta.reactjs.org/learn 2 | 3 | import { useState } from 'react' 4 | import styles from './counters.module.css' 5 | 6 | function MyButton() { 7 | const [count, setCount] = useState(0) 8 | 9 | function handleClick() { 10 | setCount(count + 1) 11 | } 12 | 13 | return ( 14 |
15 | 18 |
19 | ) 20 | } 21 | 22 | export default function MyApp() { 23 | return 24 | } 25 | -------------------------------------------------------------------------------- /docs/extension-post-install.md: -------------------------------------------------------------------------------- 1 | # 🎉 Welcome to Sweep Browser Extension 2 | 3 | Here's how to get started: 4 | 5 | 1. Go to a repo you want to create a Sweep issue on 6 | 2. Click the purple "Make Sweep issue" button (or `ctrl-enter`). 7 | 3. Write the issue title and description and click the submit button (or `ctrl-enter`). 8 | 9 | ![](../extension/sweep_extension_demo_video.gif) 10 | -------------------------------------------------------------------------------- /docs/next-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | 4 | // NOTE: This file should not be edited 5 | // see https://nextjs.org/docs/basic-features/typescript for more information. 6 | -------------------------------------------------------------------------------- /docs/next.config.js: -------------------------------------------------------------------------------- 1 | const withNextra = require('nextra')({ 2 | theme: 'nextra-theme-docs', 3 | themeConfig: './theme.config.tsx', 4 | defaultShowCopyCode: true, 5 | latex: true, 6 | // images: { 7 | // remotePatterns: [ 8 | // { 9 | // protocol: 'https', 10 | // hostname: 'raw.githubusercontent.com', 11 | // port: '80', 12 | // pathname: '**', 13 | // }, 14 | // ], 15 | // } 16 | }) 17 | 18 | module.exports = withNextra() 19 | -------------------------------------------------------------------------------- /docs/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nextra-docs-template", 3 | "version": "0.0.1", 4 | "description": "Nextra docs template", 5 | "scripts": { 6 | "dev": "next dev", 7 | "build": "next build", 8 | "start": "next start" 9 | }, 10 | "repository": { 11 | "type": "git", 12 | "url": "git+https://github.com/shuding/nextra-docs-template.git" 13 | }, 14 | "author": "Shu Ding ", 15 | "license": "MIT", 16 | "bugs": { 17 | "url": "https://github.com/shuding/nextra-docs-template/issues" 18 | }, 19 | "homepage": "https://github.com/shuding/nextra-docs-template#readme", 20 | "dependencies": { 21 | "@vercel/analytics": "^1.1.2", 22 | "clsx": "^2.1.0", 23 | "diff-parser": "^0.0.1", 24 | "msgpackr": "^1.10.1", 25 | "next": "^14.1.1", 26 | "nextra": "latest", 27 | "nextra-theme-docs": "latest", 28 | "parse-diff": "^0.11.1", 29 | "pug": "^3.0.2", 30 | "react": "^18.2.0", 31 | "react-dom": "^18.2.0", 32 | "react-icons": "^4.12.0", 33 | "react-markdown": "^8.0.7", 34 | "react-youtube": "^10.1.0", 35 | "tailwind": "^4.0.0", 36 | "uglify-js": "2.6.0" 37 | }, 38 | "devDependencies": { 39 | "@types/node": "18.11.10", 40 | "typescript": "^4.9.5" 41 | }, 42 | "pnpm": { 43 | "overrides": { 44 | "constantinople@<3.1.1": ">=3.1.1", 45 | "clean-css@<4.1.11": ">=4.1.11", 46 | "uglify-js@<2.6.0": ">=2.6.0", 47 | "uglify-js@<2.4.24": ">=2.4.24", 48 | "lodash@<4.17.11": ">=4.17.11", 49 | "ajv@<6.12.3": ">=6.12.3", 50 | "jsonwebtoken@<=8.5.1": ">=9.0.0", 51 | "ws@>=6.0.0 <6.2.2": ">=6.2.2", 52 | "jsonwebtoken@<9.0.0": ">=9.0.0", 53 | "lodash@<4.17.12": ">=4.17.12", 54 | "lodash@<4.17.21": ">=4.17.21", 55 | "moment@>=2.18.0 <2.29.4": ">=2.29.4", 56 | "moment@<2.29.2": ">=2.29.2", 57 | "lodash@>=3.7.0 <4.17.19": ">=4.17.19", 58 | "qs@>=6.5.0 <6.5.3": ">=6.5.3", 59 | "katex@>=0.11.0 <0.16.10": ">=0.16.10", 60 | "katex@>=0.15.4 <0.16.10": ">=0.16.10", 61 | "katex@>=0.10.0-beta <0.16.10": ">=0.16.10", 62 | "express@<4.19.2": ">=4.19.2" 63 | } 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /docs/pages/_app.tsx: -------------------------------------------------------------------------------- 1 | import type { AppProps } from "next/app"; 2 | import "../styles/global.css"; 3 | 4 | 5 | function MyApp({ Component, pageProps }: AppProps) { 6 | return ( 7 |
8 | 9 |
10 | ); 11 | } 12 | 13 | export default MyApp; 14 | -------------------------------------------------------------------------------- /docs/pages/_meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "index": "What's Sweep?", 3 | "getting-started": "🚀 Getting Started", 4 | "cli": "🔧 Sweep CLI", 5 | "deployment": "🏠 Self-Host", 6 | "usage": "📖 Usage", 7 | "about": "👋 About", 8 | "faq": "❓ FAQ", 9 | "blogs": "📚 Blogs", 10 | "videos": "🎥 Videos", 11 | "privacy": "🔒 Privacy Policy", 12 | "home": { 13 | "title": "Home", 14 | "type": "page", 15 | "href": "https://sweep.dev" 16 | }, 17 | "email": { 18 | "title": "Email", 19 | "type": "page", 20 | "href": "mailto:team@sweep.dev", 21 | "newWindow": true 22 | }, 23 | "community": { 24 | "title": "Community", 25 | "type": "page", 26 | "href": "https://community.sweep.dev", 27 | "newWindow": true 28 | }, 29 | "payment": { 30 | "title": "Sweep Pro", 31 | "type": "page", 32 | "href": "https://buy.stripe.com/00g5npeT71H2gzCfZ8", 33 | "newWindow": true 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /docs/pages/about/_meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "examples": "Examples", 3 | "limitations": "Limitations", 4 | "roadmap": "Roadmap" 5 | } 6 | -------------------------------------------------------------------------------- /docs/pages/about/limitations.mdx: -------------------------------------------------------------------------------- 1 | # ❌ Limitations of Sweep 2 | 3 | - 🔢 Sweep, just like a regular junior developer will likely not get complex issues right first try. Try to keep the tickets to the following sizes. If you break it you’ll likely have to tweak it a lot with PR and code comments. 4 | - 150 lines of code changes 5 | - 3 files modified 6 | - Files with up to 60k characters 7 | - This equates to about 10k tokens, which having in the context and the generation could break the 32k context window 8 | - ⏱️ **Sweep** is powered by GPT-4, so it won't have access to the latest docs and API specs. In the future, it will be able to search for these but for now you can just copy paste the relevant bits into the ticket. 9 | - 📒 Similarly, Sweep’s research capabilities are limited. Bug fixes work only when you have a good idea of the cause of the bug but not before that. Sweep will later have access to terminals and debugging tools but for now it’s only great at tasks where the changes are obvious like adding menu items or moving a function to a different file. 10 | - 🖼️ **Sweep** cannot modify non-code files such as images. 11 | -------------------------------------------------------------------------------- /docs/pages/about/roadmap.mdx: -------------------------------------------------------------------------------- 1 | # 🗺️ Roadmap 2 | 3 | - 🏖️ Sandbox for code execution. Sweep will be able to run any command you want it to, while developing your code. This allows: 4 | - Pre-commit hooks (automatic linting) 5 | - Deployments to staging environments 6 | - 🧩 Repository wide changes. Sweep will break tasks down into smaller tickets, allowing it to do a lot more work. 7 | -------------------------------------------------------------------------------- /docs/pages/blogs/_meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "file-cache": "📂 A better Python cache for slow function calls", 3 | "vector-db-implementation": "🧭 Our simple vector database implementation", 4 | "soc2": "🔒 Sweep's SOC 2 Compliant and Enterprise Offering", 5 | "llm-sdk": "🎉 Releasing our Open Source LLM Framework + Playground!", 6 | "refactor-python": "📝 Large Language Models are Bad at Refactoring Code", 7 | "openai-proxy": "🕸️ A Simple Proxy for Azure and OpenAI raised our GPT4 TPM limit by 24x", 8 | "ai-unit-tests": "🧪 Having GPT-4 Iterate on Unit Tests like a Human", 9 | "zero-downtime-deployment": "🔄 Zero Downtime Deployment with < 50 lines of bash", 10 | "ai-code-planning": "🗺️ How an AI plans code changes across an entire GitHub Repository", 11 | "super-linter": "🛠️ AI Junior Dev meets Super-Linter", 12 | "gpt-4-modification": "🤔 Why getting GPT-4 to modify files is hard", 13 | "automate-tech-debt": "💸 When you should handle tech debt", 14 | "self-hosting": "🏠 Self Hosting an AI Junior Developer", 15 | "chunking-improvements": "📈 Improving LlamaIndex’s Code Chunker by Cleaning Tree-Sitter CSTs", 16 | "reading-docs": "🎓 How our AI junior dev reads all of your documentation", 17 | "sweeps-core-algo": "🧹 Sweep's Core Algorithm", 18 | "generating-50k-embeddings-with-gte": "⚙\uFE0F Generating 50k+ embeddings in 25 seconds using GTE 🧠 and MapReduce 💻", 19 | "chunking-2m-files": "🍪 Chunking 2M+ files a day for Code Search using Syntax Trees", 20 | "giving-dev-tools": "🤖 Letting an AI Junior Dev run GitHub Actions", 21 | "search-infra": "🔍 Code Search Infra for an AI junior developer - that doesn't store code", 22 | "understanding-codebase-with-ctags": "📚 Understanding your codebase with ctags", 23 | "building-code-search": "🏗️ Building a code search engine in one day", 24 | "gpt-32k-open-source": "🌐 GPT 32k, 💻 Open-source, DeepLake 🏞️, GPT Functions Search 🔍 and more!", 25 | "index": "Blogs Gallery" 26 | } 27 | -------------------------------------------------------------------------------- /docs/pages/blogs/gpt-32k-open-source.mdx: -------------------------------------------------------------------------------- 1 | # **GPT 32k, 💻 Open-source, DeepLake 🏞️, GPT Functions Search 🔍 and more!** 2 | 3 | **Kevin Lu** - July 13th, 2023 4 | 5 | --- 6 | 7 | Excited to announce our latest migrations to GPT 32k and ActiveLoop deep lake, open-sourcing of Sweep and improvements on Sweep’s file search mechanism. 8 | 9 | ## GPT 32k Migration 10 | 11 | GPT 32k (June 13th edition) shows significantly more consistent code generation and instruction-following capabilities, at the cost of a higher price tag and slower PR generation times (2 - 3 min → 5 - 10 min). This drastically reduced some issues we were facing: failure to generate requested changes and failure to follow instructions and respond in specified formats. Expect to see less of “An error has occurred” and more well written PRs. Improving the formats also increases our prompt engineering speed. 12 | 13 | ## Open-sourcing Sweep 14 | 15 | A lot of users were concerned about how we store your source code. We decided that open-sourcing Sweep would provide transparency with how we handle data as well, on top of showing some of the algorithms we use for chunking, indexing, querying and prompting. 16 | 17 | ## ActiveLoop Deep Lake 18 | 19 | Migrating to Deep Lake drastically improved our vector DB’s consistency and reliability, with our previous system being another open-source vector DB library. Deep Lake’s developer interface was also much easier to use, with built-in locking features working well with our serverless Modal backend. There’s still additional work to be done to improve the efficiency like caching embeddings. 20 | 21 | ## GPT Functions Search 22 | 23 | GPT Functions (https://openai.com/blog/function-calling-and-other-api-updates) is basically OpenAI’s interface for more easily creating agents (like ReAct) released yesterday. We integrated GPT Functions into our retrieval system to allow Sweep to decide at runtime whether more search queries should be made. This improves the system by only retrieving more relevant information when needed. 24 | -------------------------------------------------------------------------------- /docs/pages/blogs/soc2.mdx: -------------------------------------------------------------------------------- 1 | # Sweep is SOC2 Compliant and Enterprise Offering 2 | 3 | *March 6, 2024* 4 | 5 | We’re excited to announce that Sweep has earned SOC2 Type I compliance! This means we’ve passed a third-party audit of our internal security policies and controls that protect customer data. 6 | 7 | The SOC2 Type I audit is globally recognized as a rigorous evaluation of information security practices. Developed by the American Institute of CPAs (AICPA), it allows third-party auditors to assess a service provider's internal controls regarding information security. 8 | 9 | As a product that processes customer code, it’s critical to us that our customer data is protected. In our new enterprise offering, we'll deploy Sweep on your virtual private cloud like AWS, GCP, Azure, or DigitalOcean. This ensures that your code is protected and never enters our servers. 10 | 11 | We'll also finetune our code retrieval models to your codebase. This improves accuracy by up to 20%, saving even more developer time. We also provide usage insights, Sweep progress dashboards, and custom evaluations to understand how Sweep works for your code. 12 | 13 | For a copy of our report, visit [trust portal](https://trust.sweep.dev/). 14 | -------------------------------------------------------------------------------- /docs/pages/usage/_meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "tutorial": "Tutorial: Solving an Example Ticket with Sweep", 3 | "advanced": "Advanced Sweep Features: becoming a Power User", 4 | "config": "Config: Customize Sweep using sweep.yaml" 5 | } 6 | -------------------------------------------------------------------------------- /docs/pages/videos/_meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "introducing_sweep": "🚀 Introducing Sweep", 3 | "adding_banner": "🖼️ Adding a Banner to our Landing Page using Sweep", 4 | "ai_junior_dev_refactors_itself": "🤖 AI Junior Dev Refactors Itself", 5 | "adding_walrus": "🐋 Adding Walrus Operator to our Code using Sweep", 6 | "ai_junior_developer_adds_an_easter_egg_to_our_logo": "🤖 AI junior developer adds an easter egg to our logo" 7 | } 8 | -------------------------------------------------------------------------------- /docs/pages/videos/adding_banner.mdx: -------------------------------------------------------------------------------- 1 | import YouTube from 'react-youtube'; 2 | 3 | # Adding Banner to our Landing Page with Sweep 4 | 5 |
6 | -------------------------------------------------------------------------------- /docs/pages/videos/adding_walrus.mdx: -------------------------------------------------------------------------------- 1 | import YouTube from 'react-youtube'; 2 | 3 | # Adding Walrus Operator to our Code with Sweep 4 | 5 |
6 | -------------------------------------------------------------------------------- /docs/pages/videos/ai_junior_dev_refactors_itself.mdx: -------------------------------------------------------------------------------- 1 | import YouTube from 'react-youtube'; 2 | 3 | # AI Junior Dev Refactors Itself by Writing Code 4 | 5 |
6 | -------------------------------------------------------------------------------- /docs/pages/videos/ai_junior_developer_adds_an_easter_egg_to_our_logo.mdx: -------------------------------------------------------------------------------- 1 | import YouTube from 'react-youtube'; 2 | 3 | # AI junior developer adds an easter egg to our logo 4 | 5 |
6 | -------------------------------------------------------------------------------- /docs/pages/videos/introducing_sweep.mdx: -------------------------------------------------------------------------------- 1 | import YouTube from 'react-youtube'; 2 | 3 | # Introducing Sweep - AI powered Bug Fixes and Feature Requests 4 | 5 |
6 | -------------------------------------------------------------------------------- /docs/public/assets/azure_playground.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:d571fecee2ad56362902dcb5700ce61042e86abd1d0842f3668fab082149a043 3 | size 595399 4 | -------------------------------------------------------------------------------- /docs/public/assets/multi_llm_step.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:80260e9ecba568166a5174bc24d860b49bc0650e9b3c986198746623f3d4c1a2 3 | size 34674 4 | -------------------------------------------------------------------------------- /docs/public/assets/single_llm_step.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:e1040ee09cf37c10f6135d2e01ad0cb6657ee57bd3cfb46344dfbd39a1764c46 3 | size 18286 4 | -------------------------------------------------------------------------------- /docs/public/assets/tutorial/create_issue.gif: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:6a1827febfb03e0132130f18a51c7d53b2beefd08fd7477ea87dd26376fcf11a 3 | size 18763785 4 | -------------------------------------------------------------------------------- /docs/public/assets/tutorial/github_pat_config.gif: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:66e898adcd3ede9bc042aed0d8d9319040d1b2ba0cff824234c80e4381ec88e8 3 | size 27149651 4 | -------------------------------------------------------------------------------- /docs/public/assets/tutorial/issue_comment.gif: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:f4bd61c8b7421e673e4a383410a874eedc405b319ac5927d829414ec33c7c803 3 | size 11283134 4 | -------------------------------------------------------------------------------- /docs/public/assets/tutorial/label_issue.gif: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:12072a4ca66bbb7fa78885ef543c666f09afb70d5aa3a0f84d467abb62562fc5 3 | size 6310340 4 | -------------------------------------------------------------------------------- /docs/public/assets/tutorial/merge_conflict.gif: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:44a004a62eaa262ad7909df25c81335a42ef5484d30d8de6228d435375933efa 3 | size 23603256 4 | -------------------------------------------------------------------------------- /docs/public/assets/tutorial/pr_comment.gif: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:ad1413b575714dc15364ad9667acd8b751dd0a807364defb9bcf97cb497551cc 3 | size 11207046 4 | -------------------------------------------------------------------------------- /docs/public/assets/youtube_thumbnail.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:5f67078dfd5ed109fecbc88135556ddbedf20a1e4a3f1f15d2fbf05642d9262b 3 | size 1168916 4 | -------------------------------------------------------------------------------- /docs/public/assistant/sweep_modify_gif_small.gif: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:b6308999b8e7a36e5ed54403597565783fc9f3127d913297f4c06490f9582969 3 | size 13196271 4 | -------------------------------------------------------------------------------- /docs/public/banner.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:2ad65a4ff8180cf4ea69b0ef8a4f43b2a017d171348b94122c7f3fcac4b0f8c6 3 | size 36150 4 | -------------------------------------------------------------------------------- /docs/public/covers/ai-code-planning.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:03a930ddedc7f300d60cb357b856a3eb0f278e8f2f9cd1a03f3d33a6f5198225 3 | size 2668516 4 | -------------------------------------------------------------------------------- /docs/public/covers/ai-unit-tests.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:f6b7304e260105b7a39b2de9c75143976632e3c941ab5408f3c050b231febed7 3 | size 2712561 4 | -------------------------------------------------------------------------------- /docs/public/covers/automate-tech-debt.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:478191f639f490b17f5ceaf84f16c2e715810feea3f23f12b8ec190453074334 3 | size 2700277 4 | -------------------------------------------------------------------------------- /docs/public/covers/building-code-search.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:8735c6b1cfceea937ee4a13e0aa5cc5cec724e07f8dce528ab836d549b8a2ac6 3 | size 3979145 4 | -------------------------------------------------------------------------------- /docs/public/covers/chunking-2m-files.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:c415a1bb7bc2d1a45bcac07ee3b5e60ffd940b48df1e6348b40db49e20dd7e51 3 | size 2401398 4 | -------------------------------------------------------------------------------- /docs/public/covers/chunking-improvements.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:9da3620f181ec9194b26259caed9afdac3dcc9e5c0a4aa3ced397de9ddc247b0 3 | size 3208322 4 | -------------------------------------------------------------------------------- /docs/public/covers/file-cache.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:afd84cab5625db59c0bddef7881245946be42c9fe28110122efe518de2c0f4c4 3 | size 180452 4 | -------------------------------------------------------------------------------- /docs/public/covers/generating-50k-embeddings-with-gte.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:ab8cd5522388dd9f739c3ad9f8c574415de91e31d1087047021e2ecc317e7467 3 | size 3286408 4 | -------------------------------------------------------------------------------- /docs/public/covers/giving-dev-tools.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:959c44520fd2a39477c5968cacaa41d05a925ca50af6f0413fc94c0f478d9f3f 3 | size 3507755 4 | -------------------------------------------------------------------------------- /docs/public/covers/gpt-32k-open-source.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:cbb172802508914cbb510f7fbb7452822ff6bbf27b17fb5f3137d337b7a50115 3 | size 3202944 4 | -------------------------------------------------------------------------------- /docs/public/covers/gpt-4-modification.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:93f6533e1e627c6c9ae6cec2d2e7a6a9d36b96e95353510d3dcd8202b0f08177 3 | size 3370751 4 | -------------------------------------------------------------------------------- /docs/public/covers/llm-sdk.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:fedb508cbb04567928e639ea556c6195a49b3ad1876aae7de0fde5d10ec9e49e 3 | size 252484 4 | -------------------------------------------------------------------------------- /docs/public/covers/openai-proxy.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:3f20dd9ac4ae6e2acbbddca76039aaf2c6a77478bce44d5b3ca6098900a81cc5 3 | size 3945641 4 | -------------------------------------------------------------------------------- /docs/public/covers/reading-docs.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:66e72cab5157de895dbd1f2a0300672e0928b5fc9ed5dabdbd202ac10878d3ae 3 | size 3526119 4 | -------------------------------------------------------------------------------- /docs/public/covers/refactor-python.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:f6d3ffb912043e6725006f3936d3ba8c0183177f49efa68dbdb8f220fe33dc9c 3 | size 1606951 4 | -------------------------------------------------------------------------------- /docs/public/covers/search-infra.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:6bfcdbcd90da00dc7a528cfee7e71d446b3db9e818230e5b52b0cfd25ec25e8d 3 | size 3217014 4 | -------------------------------------------------------------------------------- /docs/public/covers/self-hosting.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:245db94e1fff579dac757fb0714370a5048b9b14acb616fb9924d8478dac2b64 3 | size 3169821 4 | -------------------------------------------------------------------------------- /docs/public/covers/super-linter.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:c73518996970293fb9263973feed91031d30e44c4cbf12c61e43e7c0be1a5a6e 3 | size 2534358 4 | -------------------------------------------------------------------------------- /docs/public/covers/sweeps-core-algo.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:fe4b5188c5624cba149bacc042792fea0c0719417d3babeb22b6720fceb341f0 3 | size 4135636 4 | -------------------------------------------------------------------------------- /docs/public/covers/understanding-codebase-with-ctags.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:467d0a10f9d99fc3c261d1b88f06da01ce9a67db97c7b8d93c60763fa893fee0 3 | size 2764879 4 | -------------------------------------------------------------------------------- /docs/public/covers/vector-db-implementation.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:16a2a4eb8fd25422cf9d47d04881cf2f7bd9f9e7cf67186fb2d034a46f349c71 3 | size 176754 4 | -------------------------------------------------------------------------------- /docs/public/covers/zero-downtime-deployment.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:e042f9c54307014eaebfaa41bf71460c4a46f2424cbcc736c354f26bb657593c 3 | size 2164109 4 | -------------------------------------------------------------------------------- /docs/public/deployment/appid.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:0f64bf48b25a37796efac4104644db41ff0215bb3d8a2da0672611b3534f7b90 3 | size 237386 4 | -------------------------------------------------------------------------------- /docs/public/deployment/appsettings.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:a1f2bf0d2f1d1ae0017c445fa4a34e49ce5053e8b17f8b6d09bbf9fedf85861b 3 | size 384413 4 | -------------------------------------------------------------------------------- /docs/public/deployment/digitalocean_step1.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:264746b1ac716b981d986831229d848fc41626b6966fde26cedc442c54af3be6 3 | size 130332 4 | -------------------------------------------------------------------------------- /docs/public/deployment/digitalocean_step2.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:e581cd4d320203e3fa6ec3c9ebf0bf4875facbe138d471f814be8f456be24a6f 3 | size 151564 4 | -------------------------------------------------------------------------------- /docs/public/deployment/digitalocean_step3.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:273d60408711fb2802b86471e30491ea676340b614b7fd34805051dd859a02a5 3 | size 149321 4 | -------------------------------------------------------------------------------- /docs/public/deployment/digitalocean_step4.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:f4404f6543b6c255279f81538aa5b94e54db493c3ee37351ff93aaba1fc948f7 3 | size 149202 4 | -------------------------------------------------------------------------------- /docs/public/deployment/digitalocean_step5.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:e48940b086d0ce4b2de6b148f9db2dc78d5237e12c76795d932c73822c502dca 3 | size 212150 4 | -------------------------------------------------------------------------------- /docs/public/deployment/digitalocean_step6.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:ae603e0e1975d777ff025c3f456fbe99848074217a32ea9289f3f4bcf6c8261c 3 | size 28623 4 | -------------------------------------------------------------------------------- /docs/public/deployment/digitalocean_step7.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:da4164b9d7c93bce59ac96cc90b6958fefa510496fa9268aa7b2894837fc8fd1 3 | size 51026 4 | -------------------------------------------------------------------------------- /docs/public/deployment/digitalocean_step8.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:2895fbbd5690a0e8e53fa02cb6398e029ab0e87e2e6733ab83b46913ad0d96a5 3 | size 66468 4 | -------------------------------------------------------------------------------- /docs/public/deployment/digitalocean_step9.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:73efaf76cfdc0609be7fb1346ed84441c6f7221da88cef7a53024861a294c4d1 3 | size 69271 4 | -------------------------------------------------------------------------------- /docs/public/deployment/do.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:b9f57e6cef8b977bb7331b3159cbea71d699ad71384016fc6b1c12acde1c3b79 3 | size 208427 4 | -------------------------------------------------------------------------------- /docs/public/deployment/events.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:0d4e5d090129cc9e525109afc95267b31bb0611bd4f2685a46118421ce9e9bef 3 | size 208817 4 | -------------------------------------------------------------------------------- /docs/public/deployment/fcr.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:0006d9fd51e4249651df1d6e097ae8c4a0485d5e1db99e15ff02b1b8c77b9994 3 | size 239545 4 | -------------------------------------------------------------------------------- /docs/public/deployment/graph.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:fd81e852d73ea7da4d1b1bfe1f887dab53a0907c99b491f0f0f6933bd9291933 3 | size 1655831 4 | -------------------------------------------------------------------------------- /docs/public/deployment/graph_pruned.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:75517999737810773d850b440ba6167e97cbe190eb17745234934e83b0ea476d 3 | size 2006512 4 | -------------------------------------------------------------------------------- /docs/public/deployment/pem.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:458e58e0262c9700a0d817e266f685af1cb90281b028063b2264224735d5e305 3 | size 274989 4 | -------------------------------------------------------------------------------- /docs/public/deployment/tech_debt.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:4f523d4f6a7146cb50c305c2b3f6485cc852e6060b5b338a1cb41a6390e22e2b 3 | size 118563 4 | -------------------------------------------------------------------------------- /docs/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sweepai/sweep/a8b8b67bda4f89faac9314d34e7c7d5a64f76046/docs/public/favicon.ico -------------------------------------------------------------------------------- /docs/public/final-sweep-wizard_128x128.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:2ae7bd9f64b1ec870127e062fe01f049642a17150b16c37d9855f55efecb6f58 3 | size 7956 4 | -------------------------------------------------------------------------------- /docs/public/final-sweep-wizard_16x16.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:32b3912eab3da04cadefa05980d007a2f9c7c549dece81ab772bfbf5db8f0e57 3 | size 686 4 | -------------------------------------------------------------------------------- /docs/public/final-sweep-wizard_256x256.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:5851286885de6380c0ab61ed1ca6bf1cbb752850379942ef0d1f3eaf0478bf7f 3 | size 17342 4 | -------------------------------------------------------------------------------- /docs/public/final-sweep-wizard_32x32.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:3fa322896c4ecd9cb3e1ed0434f6737403e05cb4aa91653b97e27fdcacb18e65 3 | size 1586 4 | -------------------------------------------------------------------------------- /docs/public/final-sweep-wizard_48x48.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:0aff85e1ec866bfe5ae5f97ea69afc036f9765c5daaaf9910d9e0efbe1546333 3 | size 2568 4 | -------------------------------------------------------------------------------- /docs/public/final-sweep-wizard_64x64.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:cd02c9c77be65303a0dda82bb39356cc0c94e6b9b5be6d1e9442c9d3a43bc4e7 3 | size 3592 4 | -------------------------------------------------------------------------------- /docs/public/flowchart/flowchart_1.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:cf7b062b9980b3148fd3f2959fa11aee20fc5cc4f504298ee43f799201fb3980 3 | size 32390 4 | -------------------------------------------------------------------------------- /docs/public/flowchart/flowchart_2.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:f58156a1291f8f1c1a1fa63e8618d50315c148a34120c740dce6d1cff2e5c800 3 | size 32103 4 | -------------------------------------------------------------------------------- /docs/public/flowchart/flowchart_3.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:b43e3b821fb3f4c623e3fc5a6b1c3f056540b0d4c7c97a2232b866fadac395f6 3 | size 68578 4 | -------------------------------------------------------------------------------- /docs/public/flowchart/flowchart_4.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:cf65c06957ba1d049ef96b0c5487a1697117f88682ac98bb1765e243f9968f6e 3 | size 65697 4 | -------------------------------------------------------------------------------- /docs/public/logo.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:b8c98e446703cd4026750332210232a40c0b352e7918d3c4bf0a77f38c4bd7a5 3 | size 32906 4 | -------------------------------------------------------------------------------- /docs/public/modification/drake.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sweepai/sweep/a8b8b67bda4f89faac9314d34e7c7d5a64f76046/docs/public/modification/drake.jpg -------------------------------------------------------------------------------- /docs/public/og_image.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:c2a1e16b979a4341fcdb766073c76bb0a661c1c6fe047db23146996f2ce58ffe 3 | size 44046 4 | -------------------------------------------------------------------------------- /docs/public/openai_proxy/azure_us_east_rate_limits.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:2e35d59a825ba5d767cb184b32c01c1ec0ca2f93676d5878d9a750db3691887e 3 | size 188320 4 | -------------------------------------------------------------------------------- /docs/public/openai_proxy/multi_region_azure_openai_proxy.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:20731d9fd78b79b10d3f381cad06cae0cafb107d24406c69beceebd910183e56 3 | size 235341 4 | -------------------------------------------------------------------------------- /docs/public/openai_proxy/openai_cost_graph.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:9aba363776fa4b902fdf6840ee552da3e58ebc54b61d8a8aa6414c119d85cb24 3 | size 11129 4 | -------------------------------------------------------------------------------- /docs/public/openai_proxy/openai_rate_limits.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:63510e76218e473129c3f6e064927229625dacce0960da84dfc8be984770f657 3 | size 192877 4 | -------------------------------------------------------------------------------- /docs/public/openai_proxy/simple_azure_openai_proxy.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:fb7ece44673a9decf6eb2ccd4f68578ca507f303297402e21f2dbefbe283593c 3 | size 112863 4 | -------------------------------------------------------------------------------- /docs/public/resume.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sweepai/sweep/a8b8b67bda4f89faac9314d34e7c7d5a64f76046/docs/public/resume.pdf -------------------------------------------------------------------------------- /docs/public/sweep-core-algo/execute.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:a280ac6cffaa9e14c7a008a0cead6650f688c90736f4ca858d92cda4ee6db008 3 | size 58485 4 | -------------------------------------------------------------------------------- /docs/public/sweep-core-algo/flowchart.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:952a04414c643dc6caec885ff45934f430feba8c58d58d28862a74b55436924a 3 | size 514850 4 | -------------------------------------------------------------------------------- /docs/public/sweep-core-algo/inputs.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:216760863294b39d3b2c67ebbb3131256ef34faa11a636efcfb8a305ef10eccf 3 | size 48836 4 | -------------------------------------------------------------------------------- /docs/public/sweep-core-algo/plan.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:09eb1a83d8626e337dd7738dffeab337971dedfbbb63c5abefc2ae61f56d5f30 3 | size 56456 4 | -------------------------------------------------------------------------------- /docs/public/sweep-core-algo/search.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:e483e399bfb4b84c6d7b92ae50080a61c44f60a351823ee8c344133c57f67be2 3 | size 54551 4 | -------------------------------------------------------------------------------- /docs/public/sweep-core-algo/sweep_contributions.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:c35ffe1cfd4b373f685d4992ff115d1d0d2cff12832f8419e47c35359fb2f6c0 3 | size 28279 4 | -------------------------------------------------------------------------------- /docs/public/sweep-core-algo/validation.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:77005d03497ca2f294c9b25ece195f5d5e9e59bdc0b9a2230405f0aabc23010f 3 | size 89474 4 | -------------------------------------------------------------------------------- /docs/public/trunk/executions.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:cf20f50fc428b67c29e1c9218192315f8956cf4f5e1092f3a2efa3399c3a626d 3 | size 96453 4 | -------------------------------------------------------------------------------- /docs/public/tutorial/comment.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:2086fd47fa08c18ca6d85ff18e788b7ec55f3b9604f11366c7de8f4a672025d8 3 | size 35657 4 | -------------------------------------------------------------------------------- /docs/public/tutorial/congratulations.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:7107dfbbbb9fb4248efb7b6c415d093e6388e89655f99017a7bdf4c9cf010635 3 | size 214354 4 | -------------------------------------------------------------------------------- /docs/public/tutorial/deployment.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:c93343e917e788ca194bab993f5c769dece15bbaa4111945d12ee82cdf65bf05 3 | size 112733 4 | -------------------------------------------------------------------------------- /docs/public/tutorial/final.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:0fdb79379ed365839fd37ad37fa7ca74f7a8bbd495bbfaa3763e81b0a59ed05c 3 | size 33730 4 | -------------------------------------------------------------------------------- /docs/public/tutorial/github_actions.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:4f898fee28bdb337d68d8691dee89c66b689a6ff7dcf7e911622905289919150 3 | size 219640 4 | -------------------------------------------------------------------------------- /docs/public/tutorial/initial.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:5d6406a8d79c5b91ec44971808b10ef401c6fd46a7ed5aba09c32108082753dd 3 | size 50345 4 | -------------------------------------------------------------------------------- /docs/public/tutorial/installation.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:bbb23db976a414325cbaf401a6f77e7ad4d3b7db7f9f1fc45b8a034f811c6265 3 | size 114214 4 | -------------------------------------------------------------------------------- /docs/public/tutorial/issue.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:2acb5a3c4383b67ddfff86968914741a303f1296d52459dcd76e8a9a9eb90fdf 3 | size 356043 4 | -------------------------------------------------------------------------------- /docs/public/tutorial/new.png: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:04337000a5a737e21e35b211f73f4c6bfac44fef93034b9f6436fc1cd66da875 3 | size 50198 4 | -------------------------------------------------------------------------------- /docs/sdk/README.md: -------------------------------------------------------------------------------- 1 | # Sweep SDK 2 | 3 | Library for building LLM agents. 4 | -------------------------------------------------------------------------------- /docs/sdk/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "sweep-sdk" 3 | version = "0.0.0" 4 | description = "Python library for building LLM agents" 5 | authors = ["Kevin Lu", "William Zeng"] 6 | packages = [{include = "src" }] 7 | classifiers = ["Programming Language :: Python :: 3.10"] 8 | readme = "README.md" 9 | 10 | [tool.poetry.urls] 11 | Repository = "https://github.com/sweepai/sweep" 12 | "Community" = "https://community.sweep.dev/" 13 | Documentation = "https://docs.sweep.dev" 14 | Homepage = "https://sweep.dev" 15 | "Bug Tracker" = "https://github.com/sweepai/sweep/issues" 16 | 17 | [tool.poetry.dependencies] 18 | python = "^3.10" 19 | backoff = "^2.2.1" 20 | tiktoken = "^0.3.2" 21 | openai = "0.28.1" 22 | loguru = "^0.6.0" 23 | 24 | [tool.black] 25 | string-normalization = false 26 | 27 | [mypy] 28 | check_untyped_defs = true 29 | 30 | [tool.pylint.'MESSAGES CONTROL'] 31 | 32 | disable=[ 33 | 'no-name-in-module' 34 | ] 35 | 36 | [build-system] 37 | requires = ["poetry-core>=1.0.0"] 38 | build-backend = "poetry.core.masonry.api" 39 | -------------------------------------------------------------------------------- /docs/sdk/src/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sweepai/sweep/a8b8b67bda4f89faac9314d34e7c7d5a64f76046/docs/sdk/src/__init__.py -------------------------------------------------------------------------------- /docs/tailwind.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | module.exports = { 3 | content: [ 4 | './pages/**/*.{js,jsx,ts,tsx,md,mdx}', 5 | './components/**/*.{js,jsx,ts,tsx,md,mdx}', 6 | ], 7 | theme: { 8 | extend: {} 9 | }, 10 | plugins: [] 11 | } 12 | -------------------------------------------------------------------------------- /docs/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "lib": [ 5 | "dom", 6 | "dom.iterable", 7 | "esnext" 8 | ], 9 | "allowJs": true, 10 | "skipLibCheck": true, 11 | "strict": false, 12 | "forceConsistentCasingInFileNames": true, 13 | "noEmit": true, 14 | "incremental": true, 15 | "esModuleInterop": true, 16 | "module": "esnext", 17 | "moduleResolution": "node", 18 | "resolveJsonModule": true, 19 | "isolatedModules": true, 20 | "jsx": "preserve" 21 | }, 22 | "include": [ 23 | "next-env.d.ts", 24 | "**/*.m?ts", 25 | "**/*.tsx" 26 | ], 27 | "exclude": [ 28 | "node_modules" 29 | ] 30 | } 31 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "next-auth": "^4.24.7", 4 | "react": "^18.2.0", 5 | "react-dom": "^18.2.0" 6 | }, 7 | "devDependencies": { 8 | "@typescript-eslint/eslint-plugin": "^7.7.1", 9 | "eslint-plugin-import": "^2.29.1", 10 | "eslint-plugin-react": "^7.34.1", 11 | "prettier": "^2.0.4" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /pyrightconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "exclude": ["**/node_modules", "**/__pycache__", "**/.*"] 3 | } 4 | -------------------------------------------------------------------------------- /redis.conf: -------------------------------------------------------------------------------- 1 | port 6379 2 | maxmemory 40gb 3 | maxmemory-policy allkeys-lru 4 | -------------------------------------------------------------------------------- /sweep.yaml: -------------------------------------------------------------------------------- 1 | gha_enabled: True 2 | branch: main 3 | blocked_dirs: ["sweepai/core/prompts.py", "sweep_chat/cypress/e2e/spec.cy.ts"] 4 | draft: False 5 | description: "sweepai/sweep is a python 3.10 project. The main api endpoints are in sweepai/api.py. All imports should be global (like `import sweepai.utils.github_utils`). Write unit tests in the same directory as their corresponding code, i.e. sweepai/api_test.py tests sweepai/api.py. We use pytest for tests. Never use wildcard imports. Use list and tuple for typing instead of typing.List and typing.Tuple." 6 | 7 | rules: 8 | - "We should use loguru for error logging. If the log is inside an exception, use logger.exception to add tracebacks, where logger is imported from loguru. Use f-strings for string formatting in logger calls (e.g. logger.info(f'Hello {name}') instead of logger.info('Hello {name}', name=name))." 9 | - "There should be no debug log or print statements in production code." 10 | - "All functions should have parameters and output annotated with type hints. Use list, tuple and dict instead of typing.List, typing.Tuple and typing.dict." 11 | - "Leftover TODOs in the code should be handled." 12 | - "All new business logic should have corresponding unit tests in the same directory. For example, sweepai/api_test.py tests sweepai/api.py. Use unittest and unittest.mock as required." 13 | - "Any clearly inefficient or repeated code should be optimized or refactored." 14 | - "Remove any comments before code that are obvious. For example `# this prints hello world; print('hello world')`." 15 | -------------------------------------------------------------------------------- /sweep_chat/.env: -------------------------------------------------------------------------------- 1 | BACKEND_URL=http://127.0.0.1:8000 2 | NEXTAUTH_URL=http://localhost:3000 3 | NEXT_PUBLIC_POSTHOG_KEY="abc" 4 | NEXT_PUBLIC_SENTRY_DSN="https://e6e043ea4f5d0218c35d9066b91fb509@o4507289806635008.ingest.us.sentry.io/4507291374977024" 5 | -------------------------------------------------------------------------------- /sweep_chat/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "next/core-web-vitals" 3 | } 4 | -------------------------------------------------------------------------------- /sweep_chat/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | .yarn/install-state.gz 8 | 9 | # testing 10 | /coverage 11 | 12 | # next.js 13 | /.next/ 14 | /out/ 15 | 16 | # production 17 | /build 18 | 19 | # misc 20 | .DS_Store 21 | *.pem 22 | 23 | # debug 24 | npm-debug.log* 25 | yarn-debug.log* 26 | yarn-error.log* 27 | 28 | # local env files 29 | .env*.local 30 | 31 | # vercel 32 | .vercel 33 | 34 | # typescript 35 | *.tsbuildinfo 36 | next-env.d.ts 37 | 38 | !lib 39 | 40 | # Sentry Config File 41 | .env.sentry-build-plugin 42 | -------------------------------------------------------------------------------- /sweep_chat/.prettierrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | semi: false, 3 | singleQuote: false, 4 | tabWidth: 2, 5 | printWidth: 80, 6 | } 7 | -------------------------------------------------------------------------------- /sweep_chat/README.md: -------------------------------------------------------------------------------- 1 | This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). 2 | 3 | ## Getting Started 4 | 5 | First, run the development server: 6 | 7 | ```bash 8 | npm run dev 9 | # or 10 | yarn dev 11 | # or 12 | pnpm dev 13 | # or 14 | bun dev 15 | ``` 16 | 17 | Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. 18 | 19 | You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. 20 | 21 | This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font. 22 | 23 | ## Learn More 24 | 25 | To learn more about Next.js, take a look at the following resources: 26 | 27 | - [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. 28 | - [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. 29 | 30 | You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! 31 | 32 | ## Deploy on Vercel 33 | 34 | The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. 35 | 36 | Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. 37 | -------------------------------------------------------------------------------- /sweep_chat/app/api/auth/[...nextauth]/route.ts: -------------------------------------------------------------------------------- 1 | import authOptions from '@/lib/authOptions' 2 | import NextAuth from 'next-auth' 3 | 4 | const handler = NextAuth(authOptions) 5 | 6 | export { handler as GET, handler as POST } 7 | -------------------------------------------------------------------------------- /sweep_chat/app/c/[messageId]/page.tsx: -------------------------------------------------------------------------------- 1 | import App from '@/components/App' 2 | import authOptions from '@/lib/authOptions' 3 | import { getServerSession } from 'next-auth' 4 | 5 | export default async function Home({ 6 | params, 7 | }: { 8 | params: { messageId: string } 9 | }) { 10 | const session = await getServerSession(authOptions) 11 | return 12 | } 13 | -------------------------------------------------------------------------------- /sweep_chat/app/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sweepai/sweep/a8b8b67bda4f89faac9314d34e7c7d5a64f76046/sweep_chat/app/favicon.ico -------------------------------------------------------------------------------- /sweep_chat/app/global-error.jsx: -------------------------------------------------------------------------------- 1 | 'use client' 2 | 3 | import * as Sentry from '@sentry/nextjs' 4 | import Error from 'next/error' 5 | import { useEffect } from 'react' 6 | 7 | export default function GlobalError({ error }) { 8 | useEffect(() => { 9 | Sentry.captureException(error) 10 | }, [error]) 11 | 12 | return ( 13 | 14 | 15 | 16 | 17 | 18 | ) 19 | } 20 | -------------------------------------------------------------------------------- /sweep_chat/app/layout.tsx: -------------------------------------------------------------------------------- 1 | import type { Metadata } from 'next' 2 | import { Inter } from 'next/font/google' 3 | import './globals.css' 4 | import { ThemeProvider } from '@/components/theme-provider' 5 | 6 | const inter = Inter({ subsets: ['latin'] }) 7 | 8 | export const metadata: Metadata = { 9 | title: 'Create Next App', 10 | description: 'Generated by create next app', 11 | } 12 | 13 | export default async function RootLayout({ 14 | children, 15 | }: Readonly<{ 16 | children: React.ReactNode 17 | }>) { 18 | return ( 19 | 20 | 21 | 27 | {children} 28 | 29 | 30 | 31 | ) 32 | } 33 | -------------------------------------------------------------------------------- /sweep_chat/app/page.tsx: -------------------------------------------------------------------------------- 1 | import App from '@/components/App' 2 | import authOptions from '@/lib/authOptions' 3 | import { getServerSession } from 'next-auth' 4 | 5 | export default async function Home() { 6 | const session = await getServerSession(authOptions) 7 | return 8 | } 9 | -------------------------------------------------------------------------------- /sweep_chat/components.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://ui.shadcn.com/schema.json", 3 | "style": "default", 4 | "rsc": true, 5 | "tsx": true, 6 | "tailwind": { 7 | "config": "tailwind.config.ts", 8 | "css": "app/globals.css", 9 | "baseColor": "zinc", 10 | "cssVariables": true, 11 | "prefix": "" 12 | }, 13 | "aliases": { 14 | "components": "@/components", 15 | "utils": "@/lib/utils" 16 | } 17 | } -------------------------------------------------------------------------------- /sweep_chat/components/shared/PulsingLoader.tsx: -------------------------------------------------------------------------------- 1 | export default function PulsingLoader({ 2 | size = 2, 3 | message, 4 | }: { 5 | size: number 6 | message?: string 7 | }) { 8 | return ( 9 |
13 | {message ? message : ''} 14 |
15 | ) 16 | } 17 | -------------------------------------------------------------------------------- /sweep_chat/components/theme-provider.tsx: -------------------------------------------------------------------------------- 1 | 'use client' 2 | 3 | import * as React from 'react' 4 | import { ThemeProvider as NextThemesProvider } from 'next-themes' 5 | import { type ThemeProviderProps } from 'next-themes/dist/types' 6 | 7 | export function ThemeProvider({ children, ...props }: ThemeProviderProps) { 8 | return {children} 9 | } 10 | -------------------------------------------------------------------------------- /sweep_chat/components/ui/accordion.tsx: -------------------------------------------------------------------------------- 1 | 'use client' 2 | 3 | import * as React from 'react' 4 | import * as AccordionPrimitive from '@radix-ui/react-accordion' 5 | import { ChevronDown } from 'lucide-react' 6 | 7 | import { cn } from '@/lib/utils' 8 | 9 | const Accordion = AccordionPrimitive.Root 10 | 11 | const AccordionItem = React.forwardRef< 12 | React.ElementRef, 13 | React.ComponentPropsWithoutRef 14 | >(({ className, ...props }, ref) => ( 15 | 20 | )) 21 | AccordionItem.displayName = 'AccordionItem' 22 | 23 | const AccordionTrigger = React.forwardRef< 24 | React.ElementRef, 25 | React.ComponentPropsWithoutRef 26 | >(({ className, children, ...props }, ref) => ( 27 | 28 | svg]:rotate-180', 32 | className 33 | )} 34 | {...props} 35 | > 36 | {children} 37 | 38 | 39 | 40 | )) 41 | AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName 42 | 43 | const AccordionContent = React.forwardRef< 44 | React.ElementRef, 45 | React.ComponentPropsWithoutRef 46 | >(({ className, children, ...props }, ref) => ( 47 | 52 |
{children}
53 |
54 | )) 55 | 56 | AccordionContent.displayName = AccordionPrimitive.Content.displayName 57 | 58 | export { Accordion, AccordionItem, AccordionTrigger, AccordionContent } 59 | -------------------------------------------------------------------------------- /sweep_chat/components/ui/alert.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react' 2 | import { cva, type VariantProps } from 'class-variance-authority' 3 | 4 | import { cn } from '@/lib/utils' 5 | 6 | const alertVariants = cva( 7 | 'relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground', 8 | { 9 | variants: { 10 | variant: { 11 | default: 'bg-background text-foreground', 12 | destructive: 13 | 'border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive', 14 | }, 15 | }, 16 | defaultVariants: { 17 | variant: 'default', 18 | }, 19 | } 20 | ) 21 | 22 | const Alert = React.forwardRef< 23 | HTMLDivElement, 24 | React.HTMLAttributes & VariantProps 25 | >(({ className, variant, ...props }, ref) => ( 26 |
32 | )) 33 | Alert.displayName = 'Alert' 34 | 35 | const AlertTitle = React.forwardRef< 36 | HTMLParagraphElement, 37 | React.HTMLAttributes 38 | >(({ className, ...props }, ref) => ( 39 |
44 | )) 45 | AlertTitle.displayName = 'AlertTitle' 46 | 47 | const AlertDescription = React.forwardRef< 48 | HTMLParagraphElement, 49 | React.HTMLAttributes 50 | >(({ className, ...props }, ref) => ( 51 |
56 | )) 57 | AlertDescription.displayName = 'AlertDescription' 58 | 59 | export { Alert, AlertTitle, AlertDescription } 60 | -------------------------------------------------------------------------------- /sweep_chat/components/ui/autoscroll.tsx: -------------------------------------------------------------------------------- 1 | import { useEffect, useRef } from 'react' 2 | 3 | import { ScrollArea } from '@/components/ui/scroll-area' 4 | 5 | export default function AutoScrollArea({ 6 | children, 7 | className = '', 8 | threshold = Infinity, 9 | }: { 10 | children: React.ReactNode 11 | className?: string 12 | threshold?: number 13 | }) { 14 | const scrollAreaRef = useRef(null) 15 | useEffect(() => { 16 | if (scrollAreaRef.current && scrollAreaRef.current.scrollHeight > 0) { 17 | const { scrollTop, scrollHeight, clientHeight } = scrollAreaRef.current 18 | if (scrollHeight - scrollTop - clientHeight < threshold) { 19 | scrollAreaRef.current.scrollTop = scrollAreaRef.current.scrollHeight 20 | } 21 | } 22 | }, [children]) 23 | return ( 24 | 25 | {children} 26 | 27 | ) 28 | } 29 | 30 | -------------------------------------------------------------------------------- /sweep_chat/components/ui/button.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react' 2 | import { Slot } from '@radix-ui/react-slot' 3 | import { cva, type VariantProps } from 'class-variance-authority' 4 | 5 | import { cn } from '@/lib/utils' 6 | 7 | const buttonVariants = cva( 8 | 'inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50', 9 | { 10 | variants: { 11 | variant: { 12 | default: 'bg-primary text-primary-foreground hover:bg-primary/90', 13 | primary: 'bg-blue-900 text-white hover:bg-blue-800', 14 | destructive: 15 | 'bg-destructive text-destructive-foreground hover:bg-destructive/90', 16 | outline: 17 | 'border border-input bg-background hover:bg-accent hover:text-accent-foreground', 18 | secondary: 19 | 'bg-secondary text-secondary-foreground hover:bg-secondary/80', 20 | ghost: 'hover:bg-accent hover:text-accent-foreground', 21 | link: 'text-primary underline-offset-4 hover:underline', 22 | }, 23 | size: { 24 | default: 'h-10 px-4 py-2', 25 | sm: 'h-9 rounded-md px-3', 26 | lg: 'h-11 rounded-md px-8', 27 | icon: 'h-10 w-10', 28 | }, 29 | }, 30 | defaultVariants: { 31 | variant: 'default', 32 | size: 'default', 33 | }, 34 | } 35 | ) 36 | 37 | export interface ButtonProps 38 | extends React.ButtonHTMLAttributes, 39 | VariantProps { 40 | asChild?: boolean 41 | } 42 | 43 | const Button = React.forwardRef( 44 | ({ className, variant, size, asChild = false, ...props }, ref) => { 45 | const Comp = asChild ? Slot : 'button' 46 | return ( 47 | 52 | ) 53 | } 54 | ) 55 | Button.displayName = 'Button' 56 | 57 | export { Button, buttonVariants } 58 | -------------------------------------------------------------------------------- /sweep_chat/components/ui/card.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react' 2 | 3 | import { cn } from '@/lib/utils' 4 | 5 | const Card = React.forwardRef< 6 | HTMLDivElement, 7 | React.HTMLAttributes 8 | >(({ className, ...props }, ref) => ( 9 |
17 | )) 18 | Card.displayName = 'Card' 19 | 20 | const CardHeader = React.forwardRef< 21 | HTMLDivElement, 22 | React.HTMLAttributes 23 | >(({ className, ...props }, ref) => ( 24 |
29 | )) 30 | CardHeader.displayName = 'CardHeader' 31 | 32 | const CardTitle = React.forwardRef< 33 | HTMLParagraphElement, 34 | React.HTMLAttributes 35 | >(({ className, ...props }, ref) => ( 36 |

44 | )) 45 | CardTitle.displayName = 'CardTitle' 46 | 47 | const CardDescription = React.forwardRef< 48 | HTMLParagraphElement, 49 | React.HTMLAttributes 50 | >(({ className, ...props }, ref) => ( 51 |

56 | )) 57 | CardDescription.displayName = 'CardDescription' 58 | 59 | const CardContent = React.forwardRef< 60 | HTMLDivElement, 61 | React.HTMLAttributes 62 | >(({ className, ...props }, ref) => ( 63 |

64 | )) 65 | CardContent.displayName = 'CardContent' 66 | 67 | const CardFooter = React.forwardRef< 68 | HTMLDivElement, 69 | React.HTMLAttributes 70 | >(({ className, ...props }, ref) => ( 71 |
76 | )) 77 | CardFooter.displayName = 'CardFooter' 78 | 79 | export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent } 80 | -------------------------------------------------------------------------------- /sweep_chat/components/ui/collapsible.tsx: -------------------------------------------------------------------------------- 1 | 'use client' 2 | 3 | import * as CollapsiblePrimitive from '@radix-ui/react-collapsible' 4 | 5 | const Collapsible = CollapsiblePrimitive.Root 6 | 7 | const CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger 8 | 9 | const CollapsibleContent = CollapsiblePrimitive.CollapsibleContent 10 | 11 | export { Collapsible, CollapsibleTrigger, CollapsibleContent } 12 | -------------------------------------------------------------------------------- /sweep_chat/components/ui/hover-card.tsx: -------------------------------------------------------------------------------- 1 | 'use client' 2 | 3 | import * as React from 'react' 4 | import * as HoverCardPrimitive from '@radix-ui/react-hover-card' 5 | 6 | import { cn } from '@/lib/utils' 7 | 8 | const HoverCard = HoverCardPrimitive.Root 9 | 10 | const HoverCardTrigger = HoverCardPrimitive.Trigger 11 | 12 | const HoverCardContent = React.forwardRef< 13 | React.ElementRef, 14 | React.ComponentPropsWithoutRef 15 | >(({ className, align = 'center', sideOffset = 4, ...props }, ref) => ( 16 | 26 | )) 27 | HoverCardContent.displayName = HoverCardPrimitive.Content.displayName 28 | 29 | export { HoverCard, HoverCardTrigger, HoverCardContent } 30 | -------------------------------------------------------------------------------- /sweep_chat/components/ui/input.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react' 2 | 3 | import { cn } from '@/lib/utils' 4 | 5 | export interface InputProps 6 | extends React.InputHTMLAttributes {} 7 | 8 | const Input = React.forwardRef( 9 | ({ className, type, ...props }, ref) => { 10 | return ( 11 | 20 | ) 21 | } 22 | ) 23 | Input.displayName = 'Input' 24 | 25 | export { Input } 26 | -------------------------------------------------------------------------------- /sweep_chat/components/ui/label.tsx: -------------------------------------------------------------------------------- 1 | 'use client' 2 | 3 | import * as React from 'react' 4 | import * as LabelPrimitive from '@radix-ui/react-label' 5 | import { cva, type VariantProps } from 'class-variance-authority' 6 | 7 | import { cn } from '@/lib/utils' 8 | 9 | const labelVariants = cva( 10 | 'text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70' 11 | ) 12 | 13 | const Label = React.forwardRef< 14 | React.ElementRef, 15 | React.ComponentPropsWithoutRef & 16 | VariantProps 17 | >(({ className, ...props }, ref) => ( 18 | 23 | )) 24 | Label.displayName = LabelPrimitive.Root.displayName 25 | 26 | export { Label } 27 | -------------------------------------------------------------------------------- /sweep_chat/components/ui/popover.tsx: -------------------------------------------------------------------------------- 1 | 'use client' 2 | 3 | import * as React from 'react' 4 | import * as PopoverPrimitive from '@radix-ui/react-popover' 5 | 6 | import { cn } from '@/lib/utils' 7 | 8 | const Popover = PopoverPrimitive.Root 9 | 10 | const PopoverTrigger = PopoverPrimitive.Trigger 11 | 12 | const PopoverContent = React.forwardRef< 13 | React.ElementRef, 14 | React.ComponentPropsWithoutRef 15 | >(({ className, align = 'center', sideOffset = 4, ...props }, ref) => ( 16 | 17 | 27 | 28 | )) 29 | PopoverContent.displayName = PopoverPrimitive.Content.displayName 30 | 31 | export { Popover, PopoverTrigger, PopoverContent } 32 | -------------------------------------------------------------------------------- /sweep_chat/components/ui/resizable.tsx: -------------------------------------------------------------------------------- 1 | 'use client' 2 | 3 | import { GripVertical } from 'lucide-react' 4 | import * as ResizablePrimitive from 'react-resizable-panels' 5 | 6 | import { cn } from '@/lib/utils' 7 | 8 | const ResizablePanelGroup = ({ 9 | className, 10 | ...props 11 | }: React.ComponentProps) => ( 12 | 19 | ) 20 | 21 | const ResizablePanel = ResizablePrimitive.Panel 22 | 23 | const ResizableHandle = ({ 24 | withHandle, 25 | className, 26 | ...props 27 | }: React.ComponentProps & { 28 | withHandle?: boolean 29 | }) => ( 30 | div]:rotate-90', 33 | className 34 | )} 35 | {...props} 36 | > 37 | {withHandle && ( 38 |
39 | 40 |
41 | )} 42 |
43 | ) 44 | 45 | export { ResizablePanelGroup, ResizablePanel, ResizableHandle } 46 | -------------------------------------------------------------------------------- /sweep_chat/components/ui/scroll-area.tsx: -------------------------------------------------------------------------------- 1 | 'use client' 2 | 3 | import * as React from 'react' 4 | import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area' 5 | 6 | import { cn } from '@/lib/utils' 7 | 8 | const ScrollArea = React.forwardRef< 9 | React.ElementRef, 10 | React.ComponentPropsWithoutRef 11 | >(({ className, children, ...props }, ref) => ( 12 | 17 | 18 | {children} 19 | 20 | 21 | 22 | 23 | )) 24 | ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName 25 | 26 | const ScrollBar = React.forwardRef< 27 | React.ElementRef, 28 | React.ComponentPropsWithoutRef 29 | >(({ className, orientation = 'vertical', ...props }, ref) => ( 30 | 43 | 44 | 45 | )) 46 | ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName 47 | 48 | export { ScrollArea, ScrollBar } 49 | -------------------------------------------------------------------------------- /sweep_chat/components/ui/skeleton.tsx: -------------------------------------------------------------------------------- 1 | import { cn } from '@/lib/utils' 2 | 3 | function Skeleton({ 4 | className, 5 | ...props 6 | }: React.HTMLAttributes) { 7 | return ( 8 |
12 | ) 13 | } 14 | 15 | export { Skeleton } 16 | -------------------------------------------------------------------------------- /sweep_chat/components/ui/slider.tsx: -------------------------------------------------------------------------------- 1 | 'use client' 2 | 3 | import * as React from 'react' 4 | import * as SliderPrimitive from '@radix-ui/react-slider' 5 | 6 | import { cn } from '@/lib/utils' 7 | 8 | const Slider = React.forwardRef< 9 | React.ElementRef, 10 | React.ComponentPropsWithoutRef 11 | >(({ className, ...props }, ref) => ( 12 | 20 | 21 | 22 | 23 | 24 | 25 | )) 26 | Slider.displayName = SliderPrimitive.Root.displayName 27 | 28 | export { Slider } 29 | -------------------------------------------------------------------------------- /sweep_chat/components/ui/switch.tsx: -------------------------------------------------------------------------------- 1 | 'use client' 2 | 3 | import * as React from 'react' 4 | import * as SwitchPrimitives from '@radix-ui/react-switch' 5 | 6 | import { cn } from '@/lib/utils' 7 | 8 | const Switch = React.forwardRef< 9 | React.ElementRef, 10 | React.ComponentPropsWithoutRef 11 | >(({ className, ...props }, ref) => ( 12 | 20 | 25 | 26 | )) 27 | Switch.displayName = SwitchPrimitives.Root.displayName 28 | 29 | export { Switch } 30 | -------------------------------------------------------------------------------- /sweep_chat/components/ui/textarea.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react' 2 | 3 | import { cn } from '@/lib/utils' 4 | 5 | export interface TextareaProps 6 | extends React.TextareaHTMLAttributes {} 7 | 8 | const Textarea = React.forwardRef( 9 | ({ className, ...props }, ref) => { 10 | return ( 11 |