356 Commits

Author SHA1 Message Date
Boxuan Li
aed82704a9
Fix python linter inconsistent behaviour with quotes (#1112)
* This has been a headache for a long time, and we had #1071 and #1100 with the hope to fix the inconsistent behaviour across linters and environments. However, we recently found out that double-quote-string-fixer plugin in pre-commit-hook has inconsistent behaviour on python 3.11 and 3.12. See discussion here. This is sad because while this plugin enforces single quote behaviour with 3.11, it doesn't always enforce so with 3.12. Specifically, with fstr syntax, this plugin allows both single quotes and double quotes with python 3.12.

The problem is, some developers have black linter installed/integrated with their IDE, which is probably the most popular linter in python world (ranked by GitHub stars). This linter insists on always using double quotes. Now we have black and double-quote-string-fixer fight each other (iff the developer uses python 3.12) for some quotes (fstr syntax).

After a lot of research, I couldn't find a way to enforce single quote behaviour without introducing a new dependency, flake8, together with a plugin for it to enforce quotes' behavior. I believe it's better off introducing the more popular black if we have to introduce a new linter. Since black and autopep8 sometimes fight each other, and they mostly overlap, I further remove autopep8.

The unfortunate consequence of this PR is that I had to revert all single quotes back to double quotes. This might cause some inconvenience to existing PRs as they have to resolve conflicts, but I believe the headache will be gone soon. That being said, I am open to abandon this PR if anyone has a better idea to solve the headache.

* Remove black

* Prevent black from changing quotes

* Use flake8 to enforce single quotes

* Fix quotes in config.py

* Add back autopep8

* Add make lint to run linters
2024-04-17 00:12:52 -04:00
sp.wack
edeea95e7d
replace Jest with Vitest as the frontend test runner (#1163) 2024-04-16 21:12:11 -07:00
Robert Brennan
a663302ba2
Refactor actions a bit (#1165)
* refactor to action_manager

* make all actions awaitable

* move task logic into tasks

* Update opendevin/action/tasks.py
2024-04-16 21:29:38 -04:00
Engel Nyst
1338248310
Document LLM prompt and response logging. (#1166) 2024-04-16 17:29:50 -04:00
Robert Brennan
d34a9db04f
Run docker publish on tags (#1162)
* run ghcr on tags

* Update .github/workflows/ghcr.yml

Co-authored-by: RaGe <foragerr@users.noreply.github.com>

---------

Co-authored-by: RaGe <foragerr@users.noreply.github.com>
0.3.1
2024-04-16 13:27:31 -04:00
Alex Bäuerle
7710112ae2
fix: fix delete messages endpoint url (#1140)
Co-authored-by: Robert Brennan <accounts@rbren.io>
2024-04-16 17:08:18 +00:00
Alex Bäuerle
6b007c163b
fix: make typing chat bubble adhere to max width (#1142) 2024-04-16 10:02:04 -07:00
Engel Nyst
1115b60a74
Logging additions and fixes (#1139)
* Refactor print_to_color into a color formatter

misc fixes

catch ValueErrors and others from Router initialization

add default methods

* Tweak console log formatting, clean up after rebasing exceptions out

* Fix prompts/responses

* clean up

* keep regular colors when no msg_type

* fix filename

* handle file log first

* happy mypy

* ok, mypy

---------

Co-authored-by: Robert Brennan <accounts@rbren.io>
2024-04-16 12:55:22 -04:00
sp.wack
5881857d5c
test(frontend): add unit tests (#1076)
* test(frontend): add unit tests for getCachedConfig

* test(frontend): add unit tests for getCachedConfig

* add unit test for the useTypingEffect hook

* add unit test for the useInputComposition hook

* create unit test for auth service

* remove outdated and failing component test

* create unit test for session service

* break down saveSettings into smaller functions for testability and create unit test for new mergeAndUpdateSettings

---------

Co-authored-by: Robert Brennan <accounts@rbren.io>
2024-04-16 12:49:56 -04:00
Alex Bäuerle
4b4bc15fdb
fix: fix multiple frontend warnings (#1143) 0.3.0 2024-04-16 10:06:31 -04:00
RaGe
45c6f639f4
(fix) OpenDevin works on OpenDevin issues (#1149)
* Use SANDBOX_TYPE=exec, use docker image

* Use updated image
2024-04-16 09:24:31 -04:00
Boxuan Li
90ca29414c
Remove custom signal handlers (#1153) 2024-04-16 09:20:13 -04:00
Xia Zhenhua
8e4c4c9946
fix #1028, /select-file api call on deleted file in Code Editor caused Error (#1158)
* fix: /select-file on deleted file exception, detail: https://github.com/OpenDevin/OpenDevin/issues/1028

* fix: lint.

* fix: lint.

---------

Co-authored-by: aaren.xzh <aaren.xzh@antfin.com>
2024-04-16 09:19:10 -04:00
மனோஜ்குமார் பழனிச்சாமி
88e31f91d8
corrected port (#1159) 2024-04-16 09:18:12 -04:00
Akki
7e825b571f
fix(): build out opendevin modal component (#1141) 2024-04-16 08:43:04 -04:00
Robert Brennan
516c9bf1e0
Revamp docker build process (#1121)
* refactor docker building

* change to buildx

* disable branch filter

* disable tags

* matrix for building

* fix branch filter

* rename workflow

* sanitize ref name

* fix sanitization

* fix source command

* fix source command

* add push arg

* enable for all branches

* logs

* empty commit

* try freeing disk space

* try disk clean again

* try alpine

* Update ghcr.yml

* Update ghcr.yml

* move checkout

* ignore .git

* add disk space debug

* add df h to build script

* remove pull

* try another failure bypass

* remove maximize build space step

* remove df -h debug

* add no-root

* multi-stage python build

* add ssh

* update readme

* remove references to config.toml
2024-04-15 19:10:38 -04:00
Alex Bäuerle
71edee17be
build: fix workspace variable name in dev setup (#1138) 2024-04-15 16:33:49 -04:00
RaGe
de672029ef
Add build-frontend to build (#1137) 2024-04-15 13:00:25 -07:00
808vita
f0559892ab
lint-frontend Files.tsx (#1089)
for lint-frontend exhaustive deps

Co-authored-by: Robert Brennan <accounts@rbren.io>
2024-04-15 11:52:30 -07:00
Edwards.Arno
2491a3524e
feat: add question.md template for community Q&A (#1115)
* feat: add `question.md` template for community Q&A

* Update .github/ISSUE_TEMPLATE/question.md

---------

Co-authored-by: Robert Brennan <accounts@rbren.io>
2024-04-15 14:14:37 +00:00
மனோஜ்குமார் பழனிச்சாமி
0616fe3f8d
Added Retry for LLM calls (#1092)
* added retry

* filtered API errors

* fixed decorator

* used litellm retries

* added custom backoff too

* Apply suggestions from code review

Co-authored-by: Engel Nyst <enyst@users.noreply.github.com>

* added custom backoff too

* retried only if certain Exceptions

---------

Co-authored-by: Engel Nyst <enyst@users.noreply.github.com>
Co-authored-by: Robert Brennan <accounts@rbren.io>
2024-04-15 14:47:38 +02:00
Robert Brennan
474aafbc79
Fix frontend build (#1118) 2024-04-15 14:36:18 +02:00
Robert Brennan
342302ceef
Add Docker DOOD setup (#1023)
* simplified get

* resolved merge conflicts

* removed default param for get

* add dood setup

* add readme

* better build process

* multi-stage build

* revert makefile

* rm entrypoint.sh

* adjust ssh box for docker

* update readme

* update readme

* fix hostname

* change workspace setting

* add workspace_mount_base

* fixes for workspace dir

* clean up frontend

* refactor dockerfile

* try download.py

* change docker order a bit

* remove workspace_dir from frontend settings

* fix merge issues

* Update opendevin/config.py

* remove relpath logic from server

* rename workspace_mount_base to workspace_base

* remove workspace dir plumbing for now

* delint

* delint

* move workspace base dir

* remove refs to workspace_dir

* factor out constant

* fix local directory usage

* dont require dir

* fix docs

* fix arg parsing for task

* implement WORKSPACE_MOUNT_PATH

* fix workspace dir

* fix ports

* fix merge issues

* add makefile

* revert settingsService

* fix string

* Add address

* Update Dockerfile

* Update local_box.py

* fix lint

* move to port 3000

---------

Co-authored-by: மனோஜ்குமார் பழனிச்சாமி <smartmanoj42857@gmail.com>
Co-authored-by: enyst <engel.nyst@gmail.com>
2024-04-15 14:19:02 +02:00
Xia Zhenhua
8450b47609
fix: action.run executed twice if action is not awaitable (#1021) 2024-04-15 12:12:07 +00:00
Robert Brennan
34ecfe3c75
Update dogfood.yml (#1107) 2024-04-15 10:02:31 +02:00
மனோஜ்குமார் பழனிச்சாமி
f0cd5a37e8
Update bug_report.md (#1111) 2024-04-15 10:02:01 +02:00
Tunay Engin
98d019b825
Adding: Turkish language (#1102)
* Adding: Turkish language

* Add space

---------

Co-authored-by: Jim Su <jimsu@protonmail.com>
2024-04-15 03:07:59 +00:00
Sujay Kapadnis
d2f7056c06
refactor: Added docstrings to BackgroundCommand(#1083) (#1093)
* refactor: Added docstrings to BackgroundCommand(#1083)

* refactor: Added Docstring with example for BackgroundCommand

* fixed typo

Co-authored-by: Graham Neubig <neubig@gmail.com>

---------

Co-authored-by: Graham Neubig <neubig@gmail.com>
2024-04-14 22:13:33 +00:00
Boxuan Li
652507f430
Fix pre-commit and linter versions to avoid surprise (#1100)
* Fix pre-commit and linter versions to avoid surprise

To avoid surprising results on GitHub Actions, e.g. a new release of pre-commit starts to
reject all PRs, fix it to the latest version, 3.7.0. This PR also fixes ruff and mypy
versions in pyproject.toml since we very likely don't really need latest upgrades from
linters, and upgrades can always bring surprise.

* pre-commit-config: Use v0.3.7 for Ruff as in pyproject.toml
2024-04-14 21:33:58 +02:00
மனோஜ்குமார் பழனிச்சாமி
033352e340
added to sudo group (#1091) 2024-04-14 15:32:36 +02:00
Z
6b9316f722
doc: Add supplementary notes for WSL2 users to Local LLM Guide (#1031)
* Add supplementary notes for WSL2 users

* Add supplementary notes for WSL2 users

---------

Co-authored-by: Robert Brennan <accounts@rbren.io>
2024-04-14 13:22:58 +00:00
Boxuan Li
53f95056de
Revamp Exception handling (#1080)
* Revamp exception handling

* Agent controller: sleep 3 seconds if APIConnection error

* Fix AuthenticationError capture

* Revert unrelated style fixes

* Add type enforcement for action_from_dict call
2024-04-14 06:51:17 +02:00
Boxuan Li
dd32fa6f4a
Unify linter behaviour across CI and pre-commit-hook (#1071)
* CI: Add autopep8 linter

Currently, we have autopep8 as part of pre-commit-hook. To ensure
consistent behaviour, we should have it in CI as well.

Moreover, pre-commit-hook contains a double-quote-string-fixer hook
which changes all double quotes to single quotes, but I do observe
some PRs with massive changes that do the opposite way. I suspect
that these authors 1) disable or circumvent the pre-commit-hook,
and 2) have other linters such as black in their IDE, which
automatically change all single quotes to double quotes. This
has caused a lot of unnecessary diff, made review really hard,
and led to a lot of conflicts.

* Use -diff for autopep8

* autopep8: Freeze version in CI

* Ultimate fix

* Remove pep8 long line disable workaround

* Fix lint.yml

* Fix all files under opendevin and agenthub
2024-04-14 00:19:56 -04:00
Jim Su
d4ce4ea541
Throw error if an illegal sandbox type is used (#1087) 2024-04-13 23:59:31 -04:00
Robert Brennan
066680f8ef
Auto-close stale issues and PRs (#1032)
* stale issues

* Update .github/workflows/stale.yml

Co-authored-by: Boxuan Li <liboxuan@connect.hku.hk>

* Update .github/workflows/stale.yml

Co-authored-by: Boxuan Li <liboxuan@connect.hku.hk>

* Update .github/workflows/stale.yml

Co-authored-by: Boxuan Li <liboxuan@connect.hku.hk>

* Update .github/workflows/stale.yml

Co-authored-by: Boxuan Li <liboxuan@connect.hku.hk>

---------

Co-authored-by: Boxuan Li <liboxuan@connect.hku.hk>
Co-authored-by: Graham Neubig <neubig@gmail.com>
2024-04-14 02:39:46 +00:00
RaGe
d27895d018
Add new sandbox type - local (#1029) 2024-04-13 20:47:11 -04:00
Akki
8b9f13b1ed
fix(editor): ui enhancements and code refactor (#1069) 2024-04-13 08:52:26 -07:00
Leo
2326312d3a
fix: print the wrong ssh port number (#1054) 2024-04-12 22:18:34 -04:00
Boxuan Li
e0c7492609
Traffic Control: Add new config MAX_CHARS (#1015)
* Add new config MAX_CHARS

* Fix mypy linting issues
2024-04-12 19:01:52 +00:00
namtacs
5d5106c510
Response recognition for weak llms (#523)
* Tweak for weak llms

* Update to the latest commits

* Update to the latest commits

* Fix lint errors

* Remove merge artifact

---------

Co-authored-by: Jim Su <jimsu@protonmail.com>
2024-04-12 09:20:47 -04:00
மனோஜ்குமார் பழனிச்சாமி
70534f203e
simplified get (#962)
* simplified get

* resolved merge conflicts

* removed default param for get

* Update opendevin/config.py

---------

Co-authored-by: Robert Brennan <accounts@rbren.io>
2024-04-12 09:18:41 -04:00
Leo
494a1b6872
Feat add agent manager (#904)
* feat: add agent manager to manage all agents;

* extract the host ssh port to prevent conflict.

* clean all containers with prefix is sandbox-

* merge from upstream/main

* merge from upstream/main

* Update frontend/src/state/settingsSlice.ts

* Update opendevin/sandbox/ssh_box.py

* Update opendevin/sandbox/exec_box.py

---------

Co-authored-by: Robert Brennan <accounts@rbren.io>
2024-04-12 07:53:47 -04:00
Engel Nyst
ded0a762aa
Formatting AZURE_LLM_GUIDE (#1046) 2024-04-12 11:28:42 +02:00
Engel Nyst
32ba0e7f7e
Add Azure configuration doc (#1035)
* Add Azure configuration doc

* Add link to Azure doc.
2024-04-12 04:59:51 -04:00
PierrunoYT
7b526b3620
Add Italian, Spanish and Português (#1017)
* Update index.ts

Add Italian, Spanish and Português

* Update translation.json

Add Italian. Spanish and Português

* Remove unnecessary i18n initialization arguments

---------

Co-authored-by: Jim Su <jimsu@protonmail.com>
2024-04-12 04:57:12 -04:00
Alex Bäuerle
224ee7d1f8
fix: fix some of the styling to more closely match figma (#927)
* fix: fix some of the styling to more closely match figma

* overflow
2024-04-12 04:45:03 -04:00
Redrum624
9fd95cc35f
Fix: local files in the browser (at least for Windows) (#839)
* Fix: local files in the browser (at least for Windows)

The Browser works for screenshoting websites, but when the LLM tries to display a local file that he created, it can't access the full directory on Windows.

* Update browse.py

---------

Co-authored-by: Robert Brennan <accounts@rbren.io>
2024-04-11 22:12:23 -04:00
hugehope
9cd4ad3298
chore: fix some typos in comments (#1013)
Signed-off-by: hugehope <cmm7@sina.cn>
2024-04-11 23:21:46 +02:00
808vita
fb54c36c90
lint-frontend settingsSlice.ts (#1022)
* lint-frontend settingsSlice.ts

for  lint-frontend
Unexpected console statement

* Update settingsSlice.ts
2024-04-11 19:25:04 +02:00
PierrunoYT
51b3ae56c7
Add German Translation (#851)
* Update index.ts

* Update translation.json

* Update index.ts

* Remove comment and ident JSON

---------

Co-authored-by: Jim Su <jimsu@protonmail.com>
2024-04-10 22:59:46 -04:00