Compare commits

..

5 Commits

Author SHA1 Message Date
openhands 7561518e4c Fix lint errors 2025-05-19 16:55:19 +00:00
openhands 2cd503f033 Fix merge conflicts with main branch 2025-05-19 16:53:24 +00:00
openhands 2d434ad49f Rename RuntimeInfo to ContextualInfo 2025-05-17 22:31:31 +00:00
openhands 81c0253d53 Rename memory.set_runtime_info to memory.set_contextual_info 2025-05-17 22:27:48 +00:00
openhands 9cdde313d8 Add context_message parameter to conversation creation endpoint 2025-05-17 22:22:15 +00:00
214 changed files with 4314 additions and 9451 deletions
+2 -4
View File
@@ -47,10 +47,8 @@ jobs:
run: poetry install --without evaluation
- name: Build Environment
run: make build
- name: Run Unit Tests
- name: Run Tests
run: poetry run pytest --forked -n auto -svv ./tests/unit
- name: Run Runtime Tests with CLIRuntime
run: TEST_RUNTIME=cli poetry run pytest -svv tests/runtime/test_bash.py
# Run specific Windows python tests
test-on-windows:
@@ -74,5 +72,5 @@ jobs:
run: poetry install --without evaluation
- name: Run Windows unit tests
run: poetry run pytest -svv tests/unit/test_windows_bash.py
- name: Run Windows runtime tests with LocalRuntime
- name: Run Windows runtime tests
run: $env:TEST_RUNTIME="local"; poetry run pytest -svv tests/runtime/test_bash.py
-15
View File
@@ -66,18 +66,3 @@ These details may or may not be useful for your current task.
- Actions with `thought` property are displayed in the UI based on their action type:
- Regular actions (like "run", "edit") display the thought as a separate message
- Special actions (like "think") are displayed as collapsible elements only
#### Adding User Settings:
- To add a new user setting to OpenHands, follow these steps:
1. Add the setting to the frontend:
- Add the setting to the `Settings` type in `frontend/src/types/settings.ts`
- Add the setting to the `ApiSettings` type in the same file
- Add the setting with an appropriate default value to `DEFAULT_SETTINGS` in `frontend/src/services/settings.ts`
- Update the `useSettings` hook in `frontend/src/hooks/query/use-settings.ts` to map the API response
- Update the `useSaveSettings` hook in `frontend/src/hooks/mutation/use-save-settings.ts` to include the setting in API requests
- Add UI components (like toggle switches) in the appropriate settings screen (e.g., `frontend/src/routes/app-settings.tsx`)
- Add i18n translations for the setting name and any tooltips in `frontend/src/i18n/translation.json`
- Add the translation key to `frontend/src/i18n/declaration.ts`
2. Add the setting to the backend:
- Add the setting to the `Settings` model in `openhands/storage/data_models/settings.py`
- Update any relevant backend code to apply the setting (e.g., in session creation)
+1 -1
View File
@@ -123,7 +123,7 @@ poetry run pytest ./tests/unit/test_*.py
To reduce build time (e.g., if no changes were made to the client-runtime component), you can use an existing Docker
container image by setting the SANDBOX_RUNTIME_CONTAINER_IMAGE environment variable to the desired Docker image.
Example: `export SANDBOX_RUNTIME_CONTAINER_IMAGE=ghcr.io/all-hands-ai/runtime:0.39-nikolaik`
Example: `export SANDBOX_RUNTIME_CONTAINER_IMAGE=ghcr.io/all-hands-ai/runtime:0.38-nikolaik`
## Develop inside Docker container
+3 -4
View File
@@ -51,17 +51,17 @@ system requirements and more information.
```bash
docker pull docker.all-hands.dev/all-hands-ai/runtime:0.39-nikolaik
docker pull docker.all-hands.dev/all-hands-ai/runtime:0.38-nikolaik
docker run -it --rm --pull=always \
-e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:0.39-nikolaik \
-e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:0.38-nikolaik \
-e LOG_ALL_EVENTS=true \
-v /var/run/docker.sock:/var/run/docker.sock \
-v ~/.openhands-state:/.openhands-state \
-p 3000:3000 \
--add-host host.docker.internal:host-gateway \
--name openhands-app \
docker.all-hands.dev/all-hands-ai/openhands:0.39
docker.all-hands.dev/all-hands-ai/openhands:0.38
```
You'll find OpenHands running at [http://localhost:3000](http://localhost:3000)!
@@ -92,7 +92,6 @@ If you want to modify the OpenHands source code, check out [Development.md](http
Having issues? The [Troubleshooting Guide](https://docs.all-hands.dev/modules/usage/troubleshooting) can help.
## 📖 Documentation
<a href="https://deepwiki.com/All-Hands-AI/OpenHands"><img src="https://deepwiki.com/badge.svg" alt="Ask DeepWiki" title="Autogenerated Documentation by DeepWiki"></a>
To learn more about the project, and for tips on using OpenHands,
check out our [documentation](https://docs.all-hands.dev/modules/usage/getting-started).
+1 -1
View File
@@ -11,7 +11,7 @@ services:
- BACKEND_HOST=${BACKEND_HOST:-"0.0.0.0"}
- SANDBOX_API_HOSTNAME=host.docker.internal
#
- SANDBOX_RUNTIME_CONTAINER_IMAGE=${SANDBOX_RUNTIME_CONTAINER_IMAGE:-ghcr.io/all-hands-ai/runtime:0.39-nikolaik}
- SANDBOX_RUNTIME_CONTAINER_IMAGE=${SANDBOX_RUNTIME_CONTAINER_IMAGE:-ghcr.io/all-hands-ai/runtime:0.38-nikolaik}
- SANDBOX_USER_ID=${SANDBOX_USER_ID:-1234}
- WORKSPACE_MOUNT_PATH=${WORKSPACE_BASE:-$PWD/workspace}
ports:
+1 -1
View File
@@ -7,7 +7,7 @@ services:
image: openhands:latest
container_name: openhands-app-${DATE:-}
environment:
- SANDBOX_RUNTIME_CONTAINER_IMAGE=${SANDBOX_RUNTIME_CONTAINER_IMAGE:-docker.all-hands.dev/all-hands-ai/runtime:0.39-nikolaik}
- SANDBOX_RUNTIME_CONTAINER_IMAGE=${SANDBOX_RUNTIME_CONTAINER_IMAGE:-docker.all-hands.dev/all-hands-ai/runtime:0.38-nikolaik}
#- SANDBOX_USER_ID=${SANDBOX_USER_ID:-1234} # enable this only if you want a specific non-root sandbox user but you will have to manually adjust permissions of openhands-state for this user
- WORKSPACE_MOUNT_PATH=${WORKSPACE_BASE:-$PWD/workspace}
ports:
@@ -0,0 +1,33 @@
# Résolveur GitHub Cloud
Le Résolveur GitHub automatise les corrections de code et fournit une assistance intelligente pour vos dépôts.
## Configuration
Le Résolveur GitHub Cloud est disponible automatiquement lorsque vous
[accordez l'accès au dépôt OpenHands Cloud](./openhands-cloud#adding-repository-access).
## Utilisation
Après avoir accordé l'accès au dépôt OpenHands Cloud, vous pouvez utiliser le Résolveur GitHub Cloud sur les problèmes et les pull requests
du dépôt.
### Problèmes (Issues)
Sur votre dépôt, étiquetez un problème avec `openhands`. OpenHands va :
1. Commenter le problème pour vous informer qu'il y travaille.
- Vous pouvez cliquer sur le lien pour suivre la progression sur OpenHands Cloud.
2. Ouvrir une pull request s'il détermine que le problème a été résolu avec succès.
3. Commenter le problème avec un résumé des tâches effectuées et un lien vers la pull request.
### Pull Requests
Pour qu'OpenHands travaille sur des pull requests, utilisez `@openhands` dans les commentaires de premier niveau ou en ligne pour :
- Poser des questions
- Demander des mises à jour
- Obtenir des explications de code
OpenHands va :
1. Commenter la PR pour vous informer qu'il y travaille.
2. Effectuer la tâche.
@@ -1,32 +0,0 @@
# Résolveur de Problèmes Cloud
Le Résolveur de Problèmes Cloud automatise les corrections de code et fournit une assistance intelligente pour vos dépôts sur GitHub et GitLab.
## Configuration
Le Résolveur de Problèmes Cloud est disponible automatiquement lorsque vous accordez l'accès au dépôt OpenHands Cloud :
- [Accès au dépôt GitHub](./github-installation#adding-repository-access)
- [Accès au dépôt GitLab](./gitlab-installation#adding-repository-access)
## Utilisation
Après avoir accordé l'accès au dépôt OpenHands Cloud, vous pouvez utiliser le Résolveur de Problèmes Cloud sur les problèmes et les pull/merge requests dans vos dépôts.
### Travailler avec les Problèmes
Sur votre dépôt, étiquetez un problème avec `openhands`. OpenHands va :
1. Commenter le problème pour vous faire savoir qu'il y travaille
- Vous pouvez cliquer sur le lien pour suivre la progression sur OpenHands Cloud
2. Ouvrir une pull request (GitHub) ou une merge request (GitLab) s'il détermine que le problème a été résolu avec succès
3. Commenter le problème avec un résumé des tâches effectuées et un lien vers la PR/MR
### Travailler avec les Pull/Merge Requests
Pour qu'OpenHands travaille sur les pull requests (GitHub) ou les merge requests (GitLab), mentionnez `@openhands` dans les commentaires pour :
- Poser des questions
- Demander des mises à jour
- Obtenir des explications de code
OpenHands va :
1. Commenter pour vous faire savoir qu'il y travaille
2. Effectuer la tâche demandée
@@ -1,29 +0,0 @@
# Interface Cloud
L'interface Cloud fournit une interface web pour interagir avec OpenHands AI. Cette page explique comment accéder et utiliser l'interface Cloud d'OpenHands.
## Accès à l'Interface
L'interface Cloud d'OpenHands est accessible à [app.all-hands.dev](https://app.all-hands.dev). Vous devrez vous connecter avec votre compte GitHub ou GitLab pour accéder à l'interface.
<!-- Image will be added in a future update -->
<!-- ![Interface Cloud OpenHands](/img/docs/openhands-cloud-ui.png) -->
## Fonctionnalités Clés
Pour des informations détaillées sur les fonctionnalités disponibles dans l'interface Cloud d'OpenHands, veuillez consulter la section [Fonctionnalités Clés](../key-features.md) de la documentation.
## Paramètres
La page des paramètres vous permet de :
1. Configurer les préférences de votre compte
2. Gérer l'accès aux dépôts
3. Générer des clés API pour un accès programmatique
4. Personnaliser votre expérience OpenHands
## Prochaines Étapes
- [Utiliser le Résolveur de Problèmes Cloud](./cloud-issue-resolver.md) pour automatiser les corrections de code et obtenir de l'aide
- [En savoir plus sur l'API Cloud](./cloud-api.md) pour un accès programmatique
- [Retourner à la Mise en Route](./openhands-cloud.md)
@@ -1,55 +0,0 @@
# Installation GitHub
Ce guide vous accompagne dans le processus d'installation et de configuration d'OpenHands Cloud pour vos dépôts GitHub.
## Prérequis
- Un compte GitHub
- Accès à OpenHands Cloud
## Étapes d'Installation
1. Connectez-vous à [OpenHands Cloud](https://app.all-hands.dev)
2. Si vous n'avez pas encore connecté votre compte GitHub :
- Cliquez sur `Se connecter à GitHub`
- Examinez et acceptez les conditions d'utilisation
- Autorisez l'application OpenHands AI
## Ajout d'Accès au Dépôt
Vous pouvez accorder à OpenHands l'accès à des dépôts spécifiques :
1. Cliquez sur le menu déroulant `Sélectionner un projet GitHub`, puis sélectionnez `Ajouter plus de dépôts...`
2. Sélectionnez votre organisation et choisissez les dépôts spécifiques auxquels vous souhaitez accorder l'accès à OpenHands.
- OpenHands demande des jetons à courte durée de vie (expiration de 8 heures) avec ces permissions :
- Actions : Lecture et écriture
- Administration : Lecture seule
- Statuts de commit : Lecture et écriture
- Contenus : Lecture et écriture
- Problèmes : Lecture et écriture
- Métadonnées : Lecture seule
- Pull requests : Lecture et écriture
- Webhooks : Lecture et écriture
- Workflows : Lecture et écriture
- L'accès au dépôt pour un utilisateur est accordé en fonction de :
- Permission accordée pour le dépôt
- Permissions GitHub de l'utilisateur (propriétaire/collaborateur)
3. Cliquez sur `Installer & Autoriser`
## Modification de l'Accès au Dépôt
Vous pouvez modifier l'accès au dépôt à tout moment :
* En utilisant le même workflow `Sélectionner un projet GitHub > Ajouter plus de dépôts`, ou
* En visitant la page Paramètres et en sélectionnant `Configurer les Dépôts GitHub` dans la section `Paramètres GitHub`.
## Utilisation d'OpenHands avec GitHub
Une fois que vous avez accordé l'accès au dépôt, vous pouvez utiliser OpenHands avec vos dépôts GitHub.
Pour plus de détails sur l'utilisation d'OpenHands avec les problèmes et les pull requests GitHub, consultez la documentation du [Résolveur de Problèmes Cloud](./cloud-issue-resolver.md).
## Prochaines Étapes
- [Accéder à l'Interface Cloud](./cloud-ui.md) pour interagir avec l'interface web
- [Utiliser le Résolveur de Problèmes Cloud](./cloud-issue-resolver.md) pour automatiser les corrections de code et obtenir de l'aide
- [Utiliser l'API Cloud](./cloud-api.md) pour interagir programmatiquement avec OpenHands
@@ -1,50 +0,0 @@
# Installation GitLab
Ce guide vous accompagne dans le processus d'installation et de configuration d'OpenHands Cloud pour vos dépôts GitLab.
## Prérequis
- Un compte GitLab
- Accès à OpenHands Cloud
## Étapes d'Installation
1. Connectez-vous à [OpenHands Cloud](https://app.all-hands.dev)
2. Si vous n'avez pas encore connecté votre compte GitLab :
- Cliquez sur `Se connecter à GitLab`
- Examinez et acceptez les conditions d'utilisation
- Autorisez l'application OpenHands AI
## Ajout d'Accès au Dépôt
Vous pouvez accorder à OpenHands l'accès à des dépôts spécifiques :
1. Cliquez sur le menu déroulant `Sélectionner un projet GitLab`, puis sélectionnez `Ajouter plus de dépôts...`
2. Sélectionnez votre organisation et choisissez les dépôts spécifiques auxquels vous souhaitez accorder l'accès à OpenHands.
- OpenHands demande des permissions avec ces portées :
- api : Accès complet à l'API
- read_user : Lecture des informations utilisateur
- read_repository : Lecture des informations du dépôt
- write_repository : Écriture dans le dépôt
- L'accès au dépôt pour un utilisateur est accordé en fonction de :
- Permission accordée pour le dépôt
- Permissions GitLab de l'utilisateur (propriétaire/mainteneur/développeur)
3. Cliquez sur `Installer & Autoriser`
## Modification de l'Accès au Dépôt
Vous pouvez modifier l'accès au dépôt à tout moment :
* En utilisant le même workflow `Sélectionner un projet GitLab > Ajouter plus de dépôts`, ou
* En visitant la page Paramètres et en sélectionnant `Configurer les Dépôts GitLab` dans la section `Paramètres GitLab`.
## Utilisation d'OpenHands avec GitLab
Une fois que vous avez accordé l'accès au dépôt, vous pouvez utiliser OpenHands avec vos dépôts GitLab.
Pour plus de détails sur l'utilisation d'OpenHands avec les problèmes et les merge requests GitLab, consultez la documentation du [Résolveur de Problèmes Cloud](./cloud-issue-resolver.md).
## Prochaines Étapes
- [Accéder à l'Interface Cloud](./cloud-ui.md) pour interagir avec l'interface web
- [Utiliser le Résolveur de Problèmes Cloud](./cloud-issue-resolver.md) pour automatiser les corrections de code et obtenir de l'aide
- [Utiliser l'API Cloud](./cloud-api.md) pour interagir programmatiquement avec OpenHands
@@ -1,24 +0,0 @@
# OpenHands Cloud
OpenHands Cloud est la version hébergée dans le cloud d'OpenHands par All Hands AI.
## Accès à OpenHands Cloud
Pour commencer avec OpenHands Cloud, visitez [app.all-hands.dev](https://app.all-hands.dev).
Vous serez invité à vous connecter avec votre compte GitHub ou GitLab :
1. Après avoir lu et accepté les conditions d'utilisation, cliquez sur `Se connecter à GitHub` ou `Se connecter à GitLab`.
2. Examinez les permissions demandées par OpenHands et autorisez l'application.
- OpenHands nécessitera certaines permissions de votre compte. Pour en savoir plus sur ces permissions,
vous pouvez cliquer sur le lien `En savoir plus` sur la page d'autorisation.
## Prochaines Étapes
Une fois que vous avez connecté votre compte, vous pouvez :
- [Installer l'Intégration GitHub](./github-installation.md) pour utiliser OpenHands avec vos dépôts GitHub
- [Installer l'Intégration GitLab](./gitlab-installation.md) pour utiliser OpenHands avec vos dépôts GitLab
- [Accéder à l'Interface Cloud](./cloud-ui.md) pour interagir avec l'interface web
- [Utiliser l'API Cloud](./cloud-api.md) pour interagir programmatiquement avec OpenHands
- [Configurer le Résolveur de Problèmes Cloud](./cloud-issue-resolver.md) pour automatiser les corrections de code et fournir une assistance intelligente
@@ -0,0 +1,65 @@
# OpenHands Cloud
OpenHands Cloud est la version hébergée dans le cloud d'OpenHands par All Hands AI.
## Accéder à OpenHands Cloud
OpenHands Cloud est accessible à l'adresse https://app.all-hands.dev/.
Vous pouvez également interagir avec OpenHands Cloud par programmation en utilisant l'[API](./cloud-api).
## Premiers pas
Après avoir visité OpenHands Cloud, il vous sera demandé de vous connecter avec votre compte GitHub ou GitLab :
1. Après avoir lu et accepté les conditions d'utilisation, cliquez sur `Log in with GitHub` ou `Log in with GitLab`.
2. Examinez les autorisations demandées par OpenHands, puis cliquez sur `Authorize OpenHands AI`.
- OpenHands nécessitera certaines autorisations de votre compte GitHub ou GitLab. Pour en savoir plus sur ces autorisations :
- GitHub : Vous pouvez cliquer sur le lien `Learn more` sur la page d'autorisation GitHub.
- GitLab : Vous pouvez développer chaque demande d'autorisation sur la page d'autorisation GitLab.
## Accès aux dépôts
### GitHub
#### Ajouter l'accès aux dépôts
Vous pouvez accorder à OpenHands un accès à des dépôts spécifiques :
1. Cliquez sur `Add GitHub repos` sur la page d'accueil.
2. Sélectionnez l'organisation, puis choisissez les dépôts spécifiques auxquels vous souhaitez donner accès à OpenHands.
<details>
<summary>Détails des autorisations pour l'accès aux dépôts</summary>
Openhands demande des jetons à courte durée de vie (expiration de 8 heures) avec ces autorisations :
- Actions : Lecture et écriture
- Administration : Lecture seule
- Statuts de commit : Lecture et écriture
- Contenus : Lecture et écriture
- Issues : Lecture et écriture
- Métadonnées : Lecture seule
- Pull requests : Lecture et écriture
- Webhooks : Lecture et écriture
- Workflows : Lecture et écriture
L'accès au dépôt pour un utilisateur est accordé en fonction de :
- L'autorisation accordée pour le dépôt.
- Les autorisations GitHub de l'utilisateur (propriétaire/collaborateur).
</details>
3. Cliquez sur `Install & Authorize`.
#### Modifier l'accès aux dépôts
Vous pouvez modifier l'accès aux dépôts GitHub à tout moment en :
* Utilisant le même processus `Add GitHub repos`, ou
* Visitant la page Paramètres et en sélectionnant `Configure GitHub Repositories` dans la section `Git Settings`.
### GitLab
Lorsque vous utilisez votre compte GitLab, OpenHands aura automatiquement accès à vos dépôts.
## Persistance des conversations
- Liste des conversations Affiche uniquement les 10 conversations les plus récentes initiées au cours des 10 derniers jours.
- Espaces de travail Les espaces de travail de conversation sont conservés pendant 14 jours.
- Environnements d'exécution Les environnements d'exécution restent actifs ("chauds") pendant 30 minutes. Après cette période, la reprise d'une conversation peut prendre 1 à 2 minutes.
@@ -37,7 +37,7 @@ Pour exécuter OpenHands en mode CLI avec Docker :
```bash
docker run -it \
--pull=always \
-e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:0.39-nikolaik \
-e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:0.38-nikolaik \
-e SANDBOX_USER_ID=$(id -u) \
-e SANDBOX_VOLUMES=$SANDBOX_VOLUMES \
-e LLM_API_KEY=$LLM_API_KEY \
@@ -46,7 +46,7 @@ docker run -it \
-v ~/.openhands-state:/.openhands-state \
--add-host host.docker.internal:host-gateway \
--name openhands-app-$(date +%Y%m%d%H%M%S) \
docker.all-hands.dev/all-hands-ai/openhands:0.39 \
docker.all-hands.dev/all-hands-ai/openhands:0.38 \
python -m openhands.core.cli
```
@@ -34,7 +34,7 @@ Pour exécuter OpenHands en mode Headless avec Docker :
```bash
docker run -it \
--pull=always \
-e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:0.39-nikolaik \
-e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:0.38-nikolaik \
-e SANDBOX_USER_ID=$(id -u) \
-e SANDBOX_VOLUMES=$SANDBOX_VOLUMES \
-e LLM_API_KEY=$LLM_API_KEY \
@@ -44,7 +44,7 @@ docker run -it \
-v ~/.openhands-state:/.openhands-state \
--add-host host.docker.internal:host-gateway \
--name openhands-app-$(date +%Y%m%d%H%M%S) \
docker.all-hands.dev/all-hands-ai/openhands:0.39 \
docker.all-hands.dev/all-hands-ai/openhands:0.38 \
python -m openhands.core.main -t "write a bash script that prints hi"
```
@@ -58,17 +58,17 @@ Un système avec un processeur moderne et un minimum de **4 Go de RAM** est reco
La façon la plus simple d'exécuter OpenHands est dans Docker.
```bash
docker pull docker.all-hands.dev/all-hands-ai/runtime:0.39-nikolaik
docker pull docker.all-hands.dev/all-hands-ai/runtime:0.38-nikolaik
docker run -it --rm --pull=always \
-e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:0.39-nikolaik \
-e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:0.38-nikolaik \
-e LOG_ALL_EVENTS=true \
-v /var/run/docker.sock:/var/run/docker.sock \
-v ~/.openhands-state:/.openhands-state \
-p 3000:3000 \
--add-host host.docker.internal:host-gateway \
--name openhands-app \
docker.all-hands.dev/all-hands-ai/openhands:0.39
docker.all-hands.dev/all-hands-ai/openhands:0.38
```
Vous trouverez OpenHands en cours d'exécution à l'adresse http://localhost:3000 !
@@ -1,8 +1,8 @@
# Aperçu des Fonctionnalités d'OpenHands
# Aperçu des fonctionnalités d'OpenHands
![aperçu](/img/oh-features.png)
### Panneau de Discussion
### Panneau de discussion
- Affiche la conversation entre l'utilisateur et OpenHands.
- OpenHands explique ses actions dans ce panneau.
@@ -10,8 +10,8 @@
- Montre les modifications de fichiers effectuées par OpenHands.
### VS Code
- VS Code intégré pour parcourir et modifier les fichiers.
- Peut également être utilisé pour télécharger et envoyer des fichiers.
- VS Code intégré pour parcourir et modifier des fichiers.
- Peut également être utilisé pour télécharger et importer des fichiers.
### Terminal
- Un espace permettant à OpenHands et aux utilisateurs d'exécuter des commandes terminal.
@@ -25,5 +25,5 @@
- Les utilisateurs peuvent interagir avec l'application en cours d'exécution.
### Navigateur
- Utilisé par OpenHands pour naviguer sur les sites web.
- Utilisé par OpenHands pour naviguer sur des sites web.
- Le navigateur n'est pas interactif.
@@ -0,0 +1,31 @@
# Cloud GitHub Resolver
GitHub Resolverはコードの修正を自動化し、リポジトリに対してインテリジェントな支援を提供します。
## セットアップ
Cloud GitHub Resolverは、[OpenHands Cloudにリポジトリアクセス権を付与する](./openhands-cloud#adding-repository-access)と自動的に利用可能になります。
## 使用方法
OpenHands Cloudにリポジトリアクセス権を付与した後、リポジトリの課題(Issue)とプルリクエストでCloud GitHub Resolverを使用できます。
### 課題(Issues
リポジトリで課題に`openhands`ラベルを付けると、OpenHandsは以下の操作を行います:
1. 課題にコメントして、作業中であることを通知します。
- OpenHands Cloudで進捗状況を追跡するためのリンクをクリックできます。
2. 課題が正常に解決されたと判断した場合、プルリクエストを開きます。
3. 実行されたタスクの概要とプルリクエストへのリンクを含むコメントを課題に投稿します。
### プルリクエスト
プルリクエストでOpenHandsを利用するには、トップレベルまたはインラインコメントで`@openhands`を使用して:
- 質問する
- 更新をリクエストする
- コードの説明を取得する
OpenHandsは以下の操作を行います:
1. PRにコメントして、作業中であることを通知します。
2. タスクを実行します。
@@ -1,32 +0,0 @@
# クラウド課題リゾルバー
クラウド課題リゾルバーは、GitHubとGitLabのリポジトリに対してコード修正を自動化し、インテリジェントな支援を提供します。
## セットアップ
クラウド課題リゾルバーは、OpenHands Cloudリポジトリアクセスを許可すると自動的に利用可能になります:
- [GitHubリポジトリアクセス](./github-installation#adding-repository-access)
- [GitLabリポジトリアクセス](./gitlab-installation#adding-repository-access)
## 使用方法
OpenHands Cloudリポジトリアクセスを許可した後、リポジトリの課題やプルリクエスト/マージリクエストでクラウド課題リゾルバーを使用できます。
### 課題の操作
リポジトリで、課題に`openhands`というラベルを付けます。OpenHandsは以下を行います:
1. 課題にコメントして、作業中であることを知らせます
- リンクをクリックすると、OpenHands Cloudで進捗状況を追跡できます
2. 課題が正常に解決されたと判断した場合、プルリクエスト(GitHub)またはマージリクエスト(GitLab)を開きます
3. 実行されたタスクの概要とPR/MRへのリンクを含むコメントを課題に残します
### プルリクエスト/マージリクエストの操作
プルリクエスト(GitHub)またはマージリクエスト(GitLab)でOpenHandsを動作させるには、コメントで`@openhands`を言及して以下を行います:
- 質問する
- 更新をリクエストする
- コードの説明を取得する
OpenHandsは以下を行います:
1. 作業中であることを知らせるコメントをします
2. リクエストされたタスクを実行します
@@ -1,29 +0,0 @@
# クラウドUI
クラウドUIは、OpenHands AIと対話するためのウェブインターフェースを提供します。このページでは、OpenHands クラウドUIへのアクセス方法と使用方法について説明します。
## UIへのアクセス
OpenHands クラウドUIは[app.all-hands.dev](https://app.all-hands.dev)でアクセスできます。インターフェースにアクセスするには、GitHubまたはGitLabアカウントでサインインする必要があります。
<!-- 画像は将来のアップデートで追加されます -->
<!-- ![OpenHands クラウドUI](/img/docs/openhands-cloud-ui.png) -->
## 主な機能
OpenHands クラウドUIで利用可能な機能の詳細については、ドキュメントの[主な機能](../key-features.md)セクションを参照してください。
## 設定
設定ページでは以下のことができます:
1. アカウント設定の構成
2. リポジトリアクセスの管理
3. プログラムによるアクセスのためのAPIキーの生成
4. OpenHandsエクスペリエンスのカスタマイズ
## 次のステップ
- [クラウド課題リゾルバーを使用する](./cloud-issue-resolver.md)でコード修正を自動化し、支援を受ける
- [クラウドAPIについて学ぶ](./cloud-api.md)でプログラムによるアクセスを行う
- [はじめにに戻る](./openhands-cloud.md)
@@ -1,55 +0,0 @@
# GitHub インストール
このガイドでは、GitHubリポジトリ用にOpenHands Cloudをインストールおよび設定するプロセスについて説明します。
## 前提条件
- GitHubアカウント
- OpenHands Cloudへのアクセス
## インストール手順
1. [OpenHands Cloud](https://app.all-hands.dev)にログインします
2. まだGitHubアカウントを接続していない場合:
- `GitHubに接続する`をクリックします
- 利用規約を確認して同意します
- OpenHands AIアプリケーションを承認します
## リポジトリアクセスの追加
特定のリポジトリへのアクセスをOpenHandsに許可できます:
1. `GitHubプロジェクトを選択`ドロップダウンをクリックし、`リポジトリを追加...`を選択します
2. 組織を選択し、OpenHandsにアクセスを許可する特定のリポジトリを選択します。
- OpenHandsは以下の権限を持つ短期間のトークン(8時間の有効期限)をリクエストします:
- アクション:読み取りと書き込み
- 管理:読み取り専用
- コミットステータス:読み取りと書き込み
- コンテンツ:読み取りと書き込み
- 課題:読み取りと書き込み
- メタデータ:読み取り専用
- プルリクエスト:読み取りと書き込み
- Webhook:読み取りと書き込み
- ワークフロー:読み取りと書き込み
- ユーザーのリポジトリアクセスは以下に基づいて付与されます:
- リポジトリに付与された権限
- ユーザーのGitHub権限(所有者/コラボレーター)
3. `インストール&承認`をクリックします
## リポジトリアクセスの変更
リポジトリアクセスはいつでも変更できます:
* 同じ`GitHubプロジェクトを選択 > リポジトリを追加`ワークフローを使用する、または
* 設定ページにアクセスし、`GitHub設定`セクションで`GitHubリポジトリを設定する`を選択します。
## GitHubでのOpenHandsの使用
リポジトリアクセスを許可すると、GitHubリポジトリでOpenHandsを使用できます。
GitHub課題とプルリクエストでOpenHandsを使用する方法の詳細については、[クラウド課題リゾルバー](./cloud-issue-resolver.md)のドキュメントを参照してください。
## 次のステップ
- [クラウドUIにアクセスする](./cloud-ui.md)でウェブインターフェースと対話する
- [クラウド課題リゾルバーを使用する](./cloud-issue-resolver.md)でコード修正を自動化し、支援を受ける
- [クラウドAPIを使用する](./cloud-api.md)でプログラムによりOpenHandsと対話する
@@ -1,50 +0,0 @@
# GitLab インストール
このガイドでは、GitLabリポジトリ用にOpenHands Cloudをインストールおよび設定するプロセスについて説明します。
## 前提条件
- GitLabアカウント
- OpenHands Cloudへのアクセス
## インストール手順
1. [OpenHands Cloud](https://app.all-hands.dev)にログインします
2. まだGitLabアカウントを接続していない場合:
- `GitLabに接続する`をクリックします
- 利用規約を確認して同意します
- OpenHands AIアプリケーションを承認します
## リポジトリアクセスの追加
特定のリポジトリへのアクセスをOpenHandsに許可できます:
1. `GitLabプロジェクトを選択`ドロップダウンをクリックし、`リポジトリを追加...`を選択します
2. 組織を選択し、OpenHandsにアクセスを許可する特定のリポジトリを選択します。
- OpenHandsは以下のスコープで権限をリクエストします:
- api:完全なAPIアクセス
- read_user:ユーザー情報の読み取り
- read_repository:リポジトリ情報の読み取り
- write_repository:リポジトリへの書き込み
- ユーザーのリポジトリアクセスは以下に基づいて付与されます:
- リポジトリに付与された権限
- ユーザーのGitLab権限(所有者/メンテナー/開発者)
3. `インストール&承認`をクリックします
## リポジトリアクセスの変更
リポジトリアクセスはいつでも変更できます:
* 同じ`GitLabプロジェクトを選択 > リポジトリを追加`ワークフローを使用する、または
* 設定ページにアクセスし、`GitLab設定`セクションで`GitLabリポジトリを設定する`を選択します。
## GitLabでのOpenHandsの使用
リポジトリアクセスを許可すると、GitLabリポジトリでOpenHandsを使用できます。
GitLab課題とマージリクエストでOpenHandsを使用する方法の詳細については、[クラウド課題リゾルバー](./cloud-issue-resolver.md)のドキュメントを参照してください。
## 次のステップ
- [クラウドUIにアクセスする](./cloud-ui.md)でウェブインターフェースと対話する
- [クラウド課題リゾルバーを使用する](./cloud-issue-resolver.md)でコード修正を自動化し、支援を受ける
- [クラウドAPIを使用する](./cloud-api.md)でプログラムによりOpenHandsと対話する
@@ -1,24 +0,0 @@
# OpenHands クラウド
OpenHands クラウドは、All Hands AIのOpenHandsのホスト型クラウドバージョンです。
## OpenHands クラウドへのアクセス
OpenHands クラウドを始めるには、[app.all-hands.dev](https://app.all-hands.dev)にアクセスしてください。
GitHubまたはGitLabアカウントで接続するよう求められます:
1. 利用規約を読んで同意した後、`GitHubに接続する`または`GitLabに接続する`をクリックします。
2. OpenHandsがリクエストする権限を確認し、アプリケーションを承認します。
- OpenHandsはあなたのアカウントから特定の権限を必要とします。これらの権限について詳しく知るには、
承認ページの`詳細を見る`リンクをクリックしてください。
## 次のステップ
アカウントを接続したら、以下のことができます:
- [GitHub統合をインストールする](./github-installation.md)でGitHubリポジトリでOpenHandsを使用する
- [GitLab統合をインストールする](./gitlab-installation.md)でGitLabリポジトリでOpenHandsを使用する
- [クラウドUIにアクセスする](./cloud-ui.md)でウェブインターフェースと対話する
- [クラウドAPIを使用する](./cloud-api.md)でプログラムによりOpenHandsと対話する
- [クラウド課題リゾルバーを設定する](./cloud-issue-resolver.md)でコード修正を自動化し、インテリジェントな支援を提供する
@@ -0,0 +1,65 @@
# OpenHands Cloud
OpenHands CloudはAll Hands AIによるOpenHandsのクラウドホスト版です。
## OpenHands Cloudへのアクセス
OpenHands Cloudは https://app.all-hands.dev/ でアクセスできます。
[API](./cloud-api)を使用してプログラム的にOpenHands Cloudと対話することもできます。
## はじめに
OpenHands Cloudにアクセスすると、GitHubまたはGitLabアカウントとの接続を求められます:
1. 利用規約を読んで同意した後、`Log in with GitHub`または`Log in with GitLab`をクリックします。
2. OpenHandsが要求する権限を確認し、`Authorize OpenHands AI`をクリックします。
- OpenHandsはGitHubまたはGitLabアカウントからいくつかの権限を必要とします。これらの権限について詳しく知るには:
- GitHubGitHub認証ページの`Learn more`リンクをクリックできます。
- GitLab:GitLab認証ページで各権限リクエストを展開できます。
## リポジトリアクセス
### GitHub
#### リポジトリアクセスの追加
OpenHandsに特定のリポジトリへのアクセス権を付与できます:
1. ホームページで`Add GitHub repos`をクリックします。
2. 組織を選択し、OpenHandsにアクセス権を付与する特定のリポジトリを選択します。
<details>
<summary>リポジトリアクセスの権限詳細</summary>
Openhandsは短期間のトークン(8時間で期限切れ)を以下の権限で要求します:
- Actions:読み取りと書き込み
- Administration:読み取り専用
- Commit statuses:読み取りと書き込み
- Contents:読み取りと書き込み
- Issues:読み取りと書き込み
- Metadata:読み取り専用
- Pull requests:読み取りと書き込み
- Webhooks:読み取りと書き込み
- Workflows:読み取りと書き込み
ユーザーのリポジトリアクセスは以下に基づいて付与されます:
- リポジトリに対して付与された権限
- ユーザーのGitHub権限(オーナー/コラボレーター)
</details>
3. `Install & Authorize`をクリックします。
#### リポジトリアクセスの変更
GitHubリポジトリアクセスはいつでも以下の方法で変更できます:
* 同じ`Add GitHub repos`ワークフローを使用する、または
* 設定ページにアクセスし、`Git Settings`セクションの下にある`Configure GitHub Repositories`を選択する。
### GitLab
GitLabアカウントを使用する場合、OpenHandsは自動的にあなたのリポジトリにアクセスできるようになります。
## 会話の保持
- 会話リスト – 過去10日間に開始された最新10件の会話のみが表示されます。
- ワークスペース – 会話ワークスペースは14日間保持されます。
- ランタイム – ランタイムは30分間アクティブ(「ウォーム」)な状態を維持します。この期間後、会話を再開するには1〜2分かかる場合があります。
@@ -36,7 +36,7 @@ DockerでOpenHandsをCLIモードで実行するには:
```bash
docker run -it \
--pull=always \
-e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:0.39-nikolaik \
-e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:0.38-nikolaik \
-e SANDBOX_USER_ID=$(id -u) \
-e SANDBOX_VOLUMES=$SANDBOX_VOLUMES \
-e LLM_API_KEY=$LLM_API_KEY \
@@ -45,7 +45,7 @@ docker run -it \
-v ~/.openhands-state:/.openhands-state \
--add-host host.docker.internal:host-gateway \
--name openhands-app-$(date +%Y%m%d%H%M%S) \
docker.all-hands.dev/all-hands-ai/openhands:0.39 \
docker.all-hands.dev/all-hands-ai/openhands:0.38 \
python -m openhands.core.cli
```
@@ -33,7 +33,7 @@ DockerでヘッドレスモードでOpenHandsを実行するには:
```bash
docker run -it \
--pull=always \
-e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:0.39-nikolaik \
-e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:0.38-nikolaik \
-e SANDBOX_USER_ID=$(id -u) \
-e SANDBOX_VOLUMES=$SANDBOX_VOLUMES \
-e LLM_API_KEY=$LLM_API_KEY \
@@ -43,7 +43,7 @@ docker run -it \
-v ~/.openhands-state:/.openhands-state \
--add-host host.docker.internal:host-gateway \
--name openhands-app-$(date +%Y%m%d%H%M%S) \
docker.all-hands.dev/all-hands-ai/openhands:0.39 \
docker.all-hands.dev/all-hands-ai/openhands:0.38 \
python -m openhands.core.main -t "write a bash script that prints hi"
```
@@ -58,17 +58,17 @@ OpenHandsを実行するには、最新のプロセッサと最低**4GB RAM**を
OpenHandsを実行する最も簡単な方法はDockerを使用することです。
```bash
docker pull docker.all-hands.dev/all-hands-ai/runtime:0.39-nikolaik
docker pull docker.all-hands.dev/all-hands-ai/runtime:0.38-nikolaik
docker run -it --rm --pull=always \
-e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:0.39-nikolaik \
-e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:0.38-nikolaik \
-e LOG_ALL_EVENTS=true \
-v /var/run/docker.sock:/var/run/docker.sock \
-v ~/.openhands-state:/.openhands-state \
-p 3000:3000 \
--add-host host.docker.internal:host-gateway \
--name openhands-app \
docker.all-hands.dev/all-hands-ai/openhands:0.39
docker.all-hands.dev/all-hands-ai/openhands:0.38
```
OpenHandsは http://localhost:3000 で実行されています!
@@ -3,11 +3,11 @@
![概要](/img/oh-features.png)
### チャットパネル
- ユーザーとOpenHandsの会話を表示します。
- ユーザーとOpenHandsの会話を表示します。
- OpenHandsはこのパネルで自身の行動を説明します。
### 変更
- OpenHandsによって実行されたファイル変更を表示します。
### 変更
- OpenHandsによって実行されたファイル変更を表示します。
### VS Code
- ファイルの閲覧や修正のための組み込みVS Code。
@@ -18,7 +18,7 @@
### Jupyter
- OpenHandsによって実行されたすべてのPythonコマンドを表示します。
- データ可視化タスクにOpenHandsを使用する際に特に便利です。
- OpenHandsを使用してデータ可視化タスクを実行する際に特に便利です。
### アプリ
- OpenHandsがアプリケーションを実行する際にウェブサーバーを表示します。
@@ -26,4 +26,4 @@
### ブラウザ
- OpenHandsがウェブサイトを閲覧するために使用します。
- ブラウザは非対話です。
- このブラウザは非対話です。
@@ -0,0 +1,33 @@
# Resolvedor GitHub na Nuvem
O Resolvedor GitHub automatiza correções de código e fornece assistência inteligente para seus repositórios.
## Configuração
O Resolvedor GitHub na Nuvem está disponível automaticamente quando você
[concede acesso de repositório ao OpenHands Cloud](./openhands-cloud#adding-repository-access).
## Uso
Após conceder acesso de repositório ao OpenHands Cloud, você pode usar o Resolvedor GitHub na Nuvem nos problemas e pull requests
do repositório.
### Problemas (Issues)
No seu repositório, rotule um problema com `openhands`. O OpenHands irá:
1. Comentar no problema para informar que está trabalhando nele.
- Você pode clicar no link para acompanhar o progresso no OpenHands Cloud.
2. Abrir um pull request se determinar que o problema foi resolvido com sucesso.
3. Comentar no problema com um resumo das tarefas realizadas e um link para o pull request.
### Pull Requests
Para fazer o OpenHands trabalhar em pull requests, use `@openhands` em comentários de nível superior ou em linha para:
- Fazer perguntas
- Solicitar atualizações
- Obter explicações de código
O OpenHands irá:
1. Comentar no PR para informar que está trabalhando nele.
2. Realizar a tarefa.
@@ -1,32 +0,0 @@
# Resolvedor de Problemas na Nuvem
O Resolvedor de Problemas na Nuvem automatiza correções de código e fornece assistência inteligente para seus repositórios no GitHub e GitLab.
## Configuração
O Resolvedor de Problemas na Nuvem está disponível automaticamente quando você concede acesso ao repositório OpenHands Cloud:
- [Acesso ao repositório GitHub](./github-installation#adding-repository-access)
- [Acesso ao repositório GitLab](./gitlab-installation#adding-repository-access)
## Uso
Após conceder acesso ao repositório OpenHands Cloud, você pode usar o Resolvedor de Problemas na Nuvem em issues e pull/merge requests em seus repositórios.
### Trabalhando com Issues
No seu repositório, rotule uma issue com `openhands`. O OpenHands irá:
1. Comentar na issue para informar que está trabalhando nela
- Você pode clicar no link para acompanhar o progresso no OpenHands Cloud
2. Abrir um pull request (GitHub) ou merge request (GitLab) se determinar que o problema foi resolvido com sucesso
3. Comentar na issue com um resumo das tarefas realizadas e um link para o PR/MR
### Trabalhando com Pull/Merge Requests
Para fazer o OpenHands trabalhar em pull requests (GitHub) ou merge requests (GitLab), mencione `@openhands` nos comentários para:
- Fazer perguntas
- Solicitar atualizações
- Obter explicações de código
O OpenHands irá:
1. Comentar para informar que está trabalhando nisso
2. Realizar a tarefa solicitada
@@ -1,29 +0,0 @@
# Interface da Nuvem
A Interface da Nuvem fornece uma interface web para interagir com o OpenHands AI. Esta página explica como acessar e usar a Interface da Nuvem do OpenHands.
## Acessando a Interface
A Interface da Nuvem do OpenHands pode ser acessada em [app.all-hands.dev](https://app.all-hands.dev). Você precisará fazer login com sua conta do GitHub ou GitLab para acessar a interface.
<!-- A imagem será adicionada em uma atualização futura -->
<!-- ![Interface da Nuvem do OpenHands](/img/docs/openhands-cloud-ui.png) -->
## Recursos Principais
Para informações detalhadas sobre os recursos disponíveis na Interface da Nuvem do OpenHands, consulte a seção [Recursos Principais](../key-features.md) da documentação.
## Configurações
A página de configurações permite que você:
1. Configure as preferências da sua conta
2. Gerencie o acesso ao repositório
3. Gere chaves de API para acesso programático
4. Personalize sua experiência com o OpenHands
## Próximos Passos
- [Use o Resolvedor de Problemas na Nuvem](./cloud-issue-resolver.md) para automatizar correções de código e obter assistência
- [Aprenda sobre a API da Nuvem](./cloud-api.md) para acesso programático
- [Voltar para Introdução](./openhands-cloud.md)
@@ -1,55 +0,0 @@
# Instalação do GitHub
Este guia orienta você pelo processo de instalação e configuração do OpenHands Cloud para seus repositórios GitHub.
## Pré-requisitos
- Uma conta GitHub
- Acesso ao OpenHands Cloud
## Passos de Instalação
1. Faça login no [OpenHands Cloud](https://app.all-hands.dev)
2. Se você ainda não conectou sua conta GitHub:
- Clique em `Conectar ao GitHub`
- Revise e aceite os termos de serviço
- Autorize a aplicação OpenHands AI
## Adicionando Acesso ao Repositório
Você pode conceder ao OpenHands acesso a repositórios específicos:
1. Clique no menu suspenso `Selecionar um projeto GitHub`, depois selecione `Adicionar mais repositórios...`
2. Selecione sua organização e escolha os repositórios específicos para conceder acesso ao OpenHands.
- OpenHands solicita tokens de curta duração (expiração de 8 horas) com estas permissões:
- Ações: Leitura e escrita
- Administração: Somente leitura
- Status de commit: Leitura e escrita
- Conteúdos: Leitura e escrita
- Issues: Leitura e escrita
- Metadados: Somente leitura
- Pull requests: Leitura e escrita
- Webhooks: Leitura e escrita
- Workflows: Leitura e escrita
- O acesso ao repositório para um usuário é concedido com base em:
- Permissão concedida para o repositório
- Permissões do GitHub do usuário (proprietário/colaborador)
3. Clique em `Instalar e Autorizar`
## Modificando o Acesso ao Repositório
Você pode modificar o acesso ao repositório a qualquer momento:
* Usando o mesmo fluxo de trabalho `Selecionar um projeto GitHub > Adicionar mais repositórios`, ou
* Visitando a página de Configurações e selecionando `Configurar Repositórios GitHub` na seção `Configurações do GitHub`.
## Usando OpenHands com GitHub
Depois de conceder acesso ao repositório, você pode usar o OpenHands com seus repositórios GitHub.
Para detalhes sobre como usar o OpenHands com issues e pull requests do GitHub, consulte a documentação do [Resolvedor de Problemas na Nuvem](./cloud-issue-resolver.md).
## Próximos Passos
- [Acesse a Interface da Nuvem](./cloud-ui.md) para interagir com a interface web
- [Use o Resolvedor de Problemas na Nuvem](./cloud-issue-resolver.md) para automatizar correções de código e obter assistência
- [Use a API da Nuvem](./cloud-api.md) para interagir programaticamente com o OpenHands
@@ -1,50 +0,0 @@
# Instalação do GitLab
Este guia orienta você pelo processo de instalação e configuração do OpenHands Cloud para seus repositórios GitLab.
## Pré-requisitos
- Uma conta GitLab
- Acesso ao OpenHands Cloud
## Passos de Instalação
1. Faça login no [OpenHands Cloud](https://app.all-hands.dev)
2. Se você ainda não conectou sua conta GitLab:
- Clique em `Conectar ao GitLab`
- Revise e aceite os termos de serviço
- Autorize a aplicação OpenHands AI
## Adicionando Acesso ao Repositório
Você pode conceder ao OpenHands acesso a repositórios específicos:
1. Clique no menu suspenso `Selecionar um projeto GitLab`, depois selecione `Adicionar mais repositórios...`
2. Selecione sua organização e escolha os repositórios específicos para conceder acesso ao OpenHands.
- OpenHands solicita permissões com estes escopos:
- api: Acesso completo à API
- read_user: Ler informações do usuário
- read_repository: Ler informações do repositório
- write_repository: Escrever no repositório
- O acesso ao repositório para um usuário é concedido com base em:
- Permissão concedida para o repositório
- Permissões do GitLab do usuário (proprietário/mantenedor/desenvolvedor)
3. Clique em `Instalar e Autorizar`
## Modificando o Acesso ao Repositório
Você pode modificar o acesso ao repositório a qualquer momento:
* Usando o mesmo fluxo de trabalho `Selecionar um projeto GitLab > Adicionar mais repositórios`, ou
* Visitando a página de Configurações e selecionando `Configurar Repositórios GitLab` na seção `Configurações do GitLab`.
## Usando OpenHands com GitLab
Depois de conceder acesso ao repositório, você pode usar o OpenHands com seus repositórios GitLab.
Para detalhes sobre como usar o OpenHands com issues e merge requests do GitLab, consulte a documentação do [Resolvedor de Problemas na Nuvem](./cloud-issue-resolver.md).
## Próximos Passos
- [Acesse a Interface da Nuvem](./cloud-ui.md) para interagir com a interface web
- [Use o Resolvedor de Problemas na Nuvem](./cloud-issue-resolver.md) para automatizar correções de código e obter assistência
- [Use a API da Nuvem](./cloud-api.md) para interagir programaticamente com o OpenHands
@@ -1,24 +1,45 @@
# OpenHands Cloud
# Openhands Cloud
OpenHands Cloud é a versão hospedada na nuvem do OpenHands da All Hands AI.
O OpenHands Cloud é a versão hospedada na nuvem do OpenHands da All Hands AI.
## Acessando o OpenHands Cloud
Para começar com o OpenHands Cloud, visite [app.all-hands.dev](https://app.all-hands.dev).
Atualmente, os usuários estão sendo admitidos para acessar o OpenHands Cloud em ondas. Para se inscrever,
[entre na lista de espera](https://www.all-hands.dev/join-waitlist). Assim que for aprovado, você receberá um e-mail com
instruções sobre como acessá-lo.
Você será solicitado a se conectar com sua conta GitHub ou GitLab:
## Primeiros Passos
1. Após ler e aceitar os termos de serviço, clique em `Conectar ao GitHub` ou `Conectar ao GitLab`.
2. Revise as permissões solicitadas pelo OpenHands e autorize a aplicação.
- OpenHands exigirá certas permissões da sua conta. Para ler mais sobre essas permissões,
você pode clicar no link `Saiba mais` na página de autorização.
Após visitar o OpenHands Cloud, você será solicitado a se conectar com sua conta do GitHub:
1. Após ler e aceitar os termos de serviço, clique em `Connect to GitHub`.
2. Revise as permissões solicitadas pelo OpenHands e clique em `Authorize OpenHands AI`.
- O OpenHands exigirá algumas permissões da sua conta do GitHub. Para ler mais sobre essas permissões,
você pode clicar no link `Learn more` na página de autorização do GitHub.
## Próximos Passos
## Acesso ao Repositório
Depois de conectar sua conta, você pode:
### Adicionando Acesso ao Repositório
- [Instalar a Integração com GitHub](./github-installation.md) para usar o OpenHands com seus repositórios GitHub
- [Instalar a Integração com GitLab](./gitlab-installation.md) para usar o OpenHands com seus repositórios GitLab
- [Acessar a Interface da Nuvem](./cloud-ui.md) para interagir com a interface web
- [Usar a API da Nuvem](./cloud-api.md) para interagir programaticamente com o OpenHands
- [Configurar o Resolvedor de Problemas na Nuvem](./cloud-issue-resolver.md) para automatizar correções de código e fornecer assistência inteligente
Você pode conceder ao OpenHands acesso específico ao repositório:
1. Clique no menu suspenso `Select a GitHub project`, selecione `Add more repositories...`.
2. Selecione a organização e escolha os repositórios específicos para conceder acesso ao OpenHands.
- O Openhands solicita tokens de curta duração (expiração de 8 horas) com estas permissões:
- Actions: Read and write
- Administration: Read-only
- Commit statuses: Read and write
- Contents: Read and write
- Issues: Read and write
- Metadata: Read-only
- Pull requests: Read and write
- Webhooks: Read and write
- Workflows: Read and write
- O acesso ao repositório para um usuário é concedido com base em:
- Permissão concedida para o repositório.
- Permissões do GitHub do usuário (proprietário/colaborador).
3. Clique em `Install & Authorize`.
### Modificando o Acesso ao Repositório
Você pode modificar o acesso ao repositório a qualquer momento:
* Usando o mesmo fluxo de trabalho `Select a GitHub project > Add more repositories`, ou
* Visitando a página de Configurações e selecionando `Configure GitHub Repositories` na seção `GitHub Settings`.
@@ -0,0 +1,65 @@
# Openhands Cloud
OpenHands Cloud é a versão hospedada na nuvem do OpenHands pela All Hands AI.
## Acessando o OpenHands Cloud
O OpenHands Cloud pode ser acessado em https://app.all-hands.dev/.
Você também pode interagir com o OpenHands Cloud programaticamente usando a [API](./cloud-api).
## Primeiros Passos
Ao visitar o OpenHands Cloud, você será solicitado a conectar-se com sua conta GitHub ou GitLab:
1. Após ler e aceitar os termos de serviço, clique em `Log in with GitHub` ou `Log in with GitLab`.
2. Revise as permissões solicitadas pelo OpenHands e então clique em `Authorize OpenHands AI`.
- O OpenHands precisará de algumas permissões da sua conta GitHub ou GitLab. Para ler mais sobre essas permissões:
- GitHub: Você pode clicar no link `Learn more` na página de autorização do GitHub.
- GitLab: Você pode expandir cada solicitação de permissão na página de autorização do GitLab.
## Acesso ao Repositório
### GitHub
#### Adicionando Acesso ao Repositório
Você pode conceder ao OpenHands acesso específico ao repositório:
1. Clique em `Add GitHub repos` na página inicial.
2. Selecione a organização e, em seguida, escolha os repositórios específicos para conceder acesso ao OpenHands.
<details>
<summary>Detalhes de Permissão para Acesso ao Repositório</summary>
O Openhands solicita tokens de curta duração (expiração de 8 horas) com estas permissões:
- Actions: Leitura e escrita
- Administration: Somente leitura
- Commit statuses: Leitura e escrita
- Contents: Leitura e escrita
- Issues: Leitura e escrita
- Metadata: Somente leitura
- Pull requests: Leitura e escrita
- Webhooks: Leitura e escrita
- Workflows: Leitura e escrita
O acesso ao repositório para um usuário é concedido com base em:
- Permissão concedida para o repositório.
- Permissões do GitHub do usuário (proprietário/colaborador).
</details>
3. Clique em `Install & Authorize`.
#### Modificando o Acesso ao Repositório
Você pode modificar o acesso ao repositório do GitHub a qualquer momento:
* Usando o mesmo fluxo de trabalho `Add GitHub repos`, ou
* Visitando a página de Configurações e selecionando `Configure GitHub Repositories` na seção `Git Settings`.
### GitLab
Ao usar sua conta GitLab, o OpenHands terá automaticamente acesso aos seus repositórios.
## Persistência de Conversas
- Lista de Conversas Exibe apenas as 10 conversas mais recentes iniciadas nos últimos 10 dias.
- Workspaces Os workspaces de conversas são mantidos por 14 dias.
- Runtimes Os runtimes permanecem ativos ("aquecidos") por 30 minutos. Após esse período, retomar uma conversa pode levar de 1 a 2 minutos.
@@ -37,7 +37,7 @@ Para executar o OpenHands no modo CLI com Docker:
```bash
docker run -it \
--pull=always \
-e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:0.39-nikolaik \
-e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:0.38-nikolaik \
-e SANDBOX_USER_ID=$(id -u) \
-e SANDBOX_VOLUMES=$SANDBOX_VOLUMES \
-e LLM_API_KEY=$LLM_API_KEY \
@@ -46,7 +46,7 @@ docker run -it \
-v ~/.openhands-state:/.openhands-state \
--add-host host.docker.internal:host-gateway \
--name openhands-app-$(date +%Y%m%d%H%M%S) \
docker.all-hands.dev/all-hands-ai/openhands:0.39 \
docker.all-hands.dev/all-hands-ai/openhands:0.38 \
python -m openhands.core.cli
```
@@ -34,7 +34,7 @@ Para executar o OpenHands em modo Headless com Docker:
```bash
docker run -it \
--pull=always \
-e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:0.39-nikolaik \
-e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:0.38-nikolaik \
-e SANDBOX_USER_ID=$(id -u) \
-e SANDBOX_VOLUMES=$SANDBOX_VOLUMES \
-e LLM_API_KEY=$LLM_API_KEY \
@@ -44,7 +44,7 @@ docker run -it \
-v ~/.openhands-state:/.openhands-state \
--add-host host.docker.internal:host-gateway \
--name openhands-app-$(date +%Y%m%d%H%M%S) \
docker.all-hands.dev/all-hands-ai/openhands:0.39 \
docker.all-hands.dev/all-hands-ai/openhands:0.38 \
python -m openhands.core.main -t "write a bash script that prints hi"
```
@@ -58,17 +58,17 @@
A maneira mais fácil de executar o OpenHands é no Docker.
```bash
docker pull docker.all-hands.dev/all-hands-ai/runtime:0.39-nikolaik
docker pull docker.all-hands.dev/all-hands-ai/runtime:0.38-nikolaik
docker run -it --rm --pull=always \
-e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:0.39-nikolaik \
-e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:0.38-nikolaik \
-e LOG_ALL_EVENTS=true \
-v /var/run/docker.sock:/var/run/docker.sock \
-v ~/.openhands-state:/.openhands-state \
-p 3000:3000 \
--add-host host.docker.internal:host-gateway \
--name openhands-app \
docker.all-hands.dev/all-hands-ai/openhands:0.39
docker.all-hands.dev/all-hands-ai/openhands:0.38
```
Você encontrará o OpenHands rodando em http://localhost:3000!
@@ -1,4 +1,4 @@
# Visão Geral das Funcionalidades do OpenHands
# Visão Geral dos Recursos do OpenHands
![visão geral](/img/oh-features.png)
@@ -6,7 +6,7 @@
- Exibe a conversa entre o usuário e o OpenHands.
- O OpenHands explica suas ações neste painel.
### Alterações
### Mudanças
- Mostra as alterações de arquivos realizadas pelo OpenHands.
### VS Code
@@ -14,13 +14,13 @@
- Também pode ser usado para fazer upload e download de arquivos.
### Terminal
- Um espaço para o OpenHands e usuários executarem comandos de terminal.
- Um espaço para o OpenHands e os usuários executarem comandos de terminal.
### Jupyter
- Mostra todos os comandos Python que foram executados pelo OpenHands.
- Particularmente útil ao usar o OpenHands para tarefas de visualização de dados.
- Particularmente útil ao usar o OpenHands para realizar tarefas de visualização de dados.
### Aplicativo
### App
- Exibe o servidor web quando o OpenHands executa uma aplicação.
- Os usuários podem interagir com a aplicação em execução.
@@ -0,0 +1,31 @@
# Cloud GitHub Resolver
GitHub Resolver 自动修复代码并为您的仓库提供智能辅助。
## 设置
当您[授予 OpenHands Cloud 仓库访问权限](./openhands-cloud#adding-repository-access)后,Cloud GitHub Resolver 会自动可用。
## 使用方法
授予 OpenHands Cloud 仓库访问权限后,您可以在仓库的 issues 和 pull requests 中使用 Cloud GitHub Resolver。
### Issues
在您的仓库中,给 issue 添加 `openhands` 标签。OpenHands 将会:
1. 在 issue 上发表评论,让您知道它正在处理该问题。
- 您可以点击链接在 OpenHands Cloud 上跟踪进度。
2. 如果确定问题已成功解决,则会打开一个 pull request。
3. 在 issue 上发表评论,总结已执行的任务并提供 pull request 的链接。
### Pull Requests
要让 OpenHands 处理 pull requests,请在顶级或内联评论中使用 `@openhands` 来:
- 提问
- 请求更新
- 获取代码解释
OpenHands 将会:
1. 在 PR 上发表评论,让您知道它正在处理该请求。
2. 执行任务。
@@ -1,32 +0,0 @@
# 云问题解决器
云问题解决器可以自动修复代码并为您的GitHub和GitLab仓库提供智能辅助。
## 设置
当您授予OpenHands Cloud仓库访问权限时,云问题解决器会自动可用:
- [GitHub仓库访问](./github-installation#adding-repository-access)
- [GitLab仓库访问](./gitlab-installation#adding-repository-access)
## 使用方法
授予OpenHands Cloud仓库访问权限后,您可以在仓库的问题和拉取/合并请求中使用云问题解决器。
### 处理问题
在您的仓库中,给问题添加`openhands`标签。OpenHands将会:
1. 在问题上发表评论,让您知道它正在处理
- 您可以点击链接在OpenHands Cloud上跟踪进度
2. 如果确定问题已成功解决,则打开拉取请求(GitHub)或合并请求(GitLab
3. 在问题上发表评论,总结已执行的任务并提供PR/MR的链接
### 处理拉取/合并请求
要让OpenHands处理拉取请求(GitHub)或合并请求(GitLab),在评论中提及`@openhands`以:
- 提问
- 请求更新
- 获取代码解释
OpenHands将会:
1. 发表评论让您知道它正在处理
2. 执行请求的任务
@@ -1,29 +0,0 @@
# 云界面
云界面为与OpenHands AI交互提供了网页界面。本页面说明如何访问和使用OpenHands云界面。
## 访问界面
OpenHands云界面可以在[app.all-hands.dev](https://app.all-hands.dev)访问。您需要使用GitHub或GitLab账户登录才能访问界面。
<!-- 图片将在未来更新中添加 -->
<!-- ![OpenHands云界面](/img/docs/openhands-cloud-ui.png) -->
## 主要功能
有关OpenHands云界面中可用功能的详细信息,请参阅文档的[主要功能](../key-features.md)部分。
## 设置
设置页面允许您:
1. 配置您的账户偏好
2. 管理仓库访问权限
3. 生成用于程序化访问的API密钥
4. 自定义您的OpenHands体验
## 下一步
- [使用云问题解决器](./cloud-issue-resolver.md)自动修复代码并获取帮助
- [了解云API](./cloud-api.md)进行程序化访问
- [返回入门指南](./openhands-cloud.md)
@@ -1,55 +0,0 @@
# GitHub 安装
本指南将引导您完成为GitHub仓库安装和配置OpenHands Cloud的过程。
## 前提条件
- GitHub账户
- 访问OpenHands Cloud
## 安装步骤
1. 登录[OpenHands Cloud](https://app.all-hands.dev)
2. 如果您尚未连接GitHub账户:
- 点击`连接到GitHub`
- 查看并接受服务条款
- 授权OpenHands AI应用程序
## 添加仓库访问权限
您可以授予OpenHands访问特定仓库的权限:
1. 点击`选择GitHub项目`下拉菜单,然后选择`添加更多仓库...`
2. 选择您的组织并选择要授予OpenHands访问权限的特定仓库。
- OpenHands请求短期令牌(8小时过期)并具有以下权限:
- 操作:读取和写入
- 管理:只读
- 提交状态:读取和写入
- 内容:读取和写入
- 问题:读取和写入
- 元数据:只读
- 拉取请求:读取和写入
- Webhooks:读取和写入
- 工作流程:读取和写入
- 用户的仓库访问权限基于:
- 为仓库授予的权限
- 用户的GitHub权限(所有者/协作者)
3. 点击`安装并授权`
## 修改仓库访问权限
您可以随时修改仓库访问权限:
* 使用相同的`选择GitHub项目 > 添加更多仓库`工作流程,或
* 访问设置页面并在`GitHub设置`部分选择`配置GitHub仓库`
## 使用OpenHands与GitHub
一旦您授予了仓库访问权限,您就可以将OpenHands与您的GitHub仓库一起使用。
有关如何将OpenHands与GitHub问题和拉取请求一起使用的详细信息,请参阅[云问题解决器](./cloud-issue-resolver.md)文档。
## 下一步
- [访问云界面](./cloud-ui.md)与网页界面交互
- [使用云问题解决器](./cloud-issue-resolver.md)自动修复代码并获取帮助
- [使用云API](./cloud-api.md)以编程方式与OpenHands交互
@@ -1,50 +0,0 @@
# GitLab 安装
本指南将引导您完成为GitLab仓库安装和配置OpenHands Cloud的过程。
## 前提条件
- GitLab账户
- 访问OpenHands Cloud
## 安装步骤
1. 登录[OpenHands Cloud](https://app.all-hands.dev)
2. 如果您尚未连接GitLab账户:
- 点击`连接到GitLab`
- 查看并接受服务条款
- 授权OpenHands AI应用程序
## 添加仓库访问权限
您可以授予OpenHands访问特定仓库的权限:
1. 点击`选择GitLab项目`下拉菜单,然后选择`添加更多仓库...`
2. 选择您的组织并选择要授予OpenHands访问权限的特定仓库。
- OpenHands请求具有以下范围的权限:
- api:完全API访问
- read_user:读取用户信息
- read_repository:读取仓库信息
- write_repository:写入仓库
- 用户的仓库访问权限基于:
- 为仓库授予的权限
- 用户的GitLab权限(所有者/维护者/开发者)
3. 点击`安装并授权`
## 修改仓库访问权限
您可以随时修改仓库访问权限:
* 使用相同的`选择GitLab项目 > 添加更多仓库`工作流程,或
* 访问设置页面并在`GitLab设置`部分选择`配置GitLab仓库`
## 使用OpenHands与GitLab
一旦您授予了仓库访问权限,您就可以将OpenHands与您的GitLab仓库一起使用。
有关如何将OpenHands与GitLab问题和合并请求一起使用的详细信息,请参阅[云问题解决器](./cloud-issue-resolver.md)文档。
## 下一步
- [访问云界面](./cloud-ui.md)与网页界面交互
- [使用云问题解决器](./cloud-issue-resolver.md)自动修复代码并获取帮助
- [使用云API](./cloud-api.md)以编程方式与OpenHands交互
@@ -1,24 +0,0 @@
# OpenHands 云
OpenHands 云是All Hands AI的OpenHands的托管云版本。
## 访问OpenHands云
要开始使用OpenHands云,请访问[app.all-hands.dev](https://app.all-hands.dev)。
系统将提示您连接您的GitHub或GitLab账户:
1. 阅读并接受服务条款后,点击`连接到GitHub``连接到GitLab`
2. 查看OpenHands请求的权限并授权应用程序。
- OpenHands将需要您账户的某些权限。要了解更多关于这些权限的信息,
您可以点击授权页面上的`了解更多`链接。
## 下一步
一旦您连接了账户,您可以:
- [安装GitHub集成](./github-installation.md)以将OpenHands与您的GitHub仓库一起使用
- [安装GitLab集成](./gitlab-installation.md)以将OpenHands与您的GitLab仓库一起使用
- [访问云界面](./cloud-ui.md)与网页界面交互
- [使用云API](./cloud-api.md)以编程方式与OpenHands交互
- [设置云问题解决器](./cloud-issue-resolver.md)自动修复代码并提供智能辅助
@@ -0,0 +1,65 @@
# OpenHands Cloud
OpenHands Cloud 是由 All Hands AI 提供的 OpenHands 云托管版本。
## 访问 OpenHands Cloud
OpenHands Cloud 可以通过 https://app.all-hands.dev/ 访问。
您还可以使用 [API](./cloud-api) 以编程方式与 OpenHands Cloud 交互。
## 入门指南
访问 OpenHands Cloud 后,系统会要求您连接您的 GitHub 或 GitLab 账户:
1. 阅读并接受服务条款后,点击 `Log in with GitHub` 或 `Log in with GitLab`。
2. 查看 OpenHands 请求的权限,然后点击 `Authorize OpenHands AI`。
- OpenHands 将需要您的 GitHub 或 GitLab 账户的一些权限。要了解更多关于这些权限的信息:
- GitHub:您可以点击 GitHub 授权页面上的 `Learn more` 链接。
- GitLab:您可以在 GitLab 授权页面上展开每个权限请求。
## 仓库访问
### GitHub
#### 添加仓库访问权限
您可以授予 OpenHands 特定仓库的访问权限:
1. 在首页点击 `Add GitHub repos`。
2. 选择组织,然后选择要授予 OpenHands 访问权限的特定仓库。
<details>
<summary>仓库访问权限详情</summary>
Openhands 请求短期令牌(8小时过期)并具有以下权限:
- Actions:读写权限
- Administration:只读权限
- Commit statuses:读写权限
- Contents:读写权限
- Issues:读写权限
- Metadata:只读权限
- Pull requests:读写权限
- Webhooks:读写权限
- Workflows:读写权限
用户的仓库访问权限基于:
- 为仓库授予的权限。
- 用户的 GitHub 权限(所有者/协作者)。
</details>
3. 点击 `Install & Authorize`。
#### 修改仓库访问权限
您可以随时修改 GitHub 仓库访问权限,方法是:
* 使用相同的 `Add GitHub repos` 流程,或
* 访问设置页面,在 `Git Settings` 部分下选择 `Configure GitHub Repositories`。
### GitLab
使用 GitLab 账户时,OpenHands 将自动获得对您仓库的访问权限。
## 对话持久性
- 对话列表 – 仅显示过去 10 天内发起的 10 个最近对话。
- 工作区 – 对话工作区保留 14 天。
- 运行时 – 运行时保持活跃("热"状态)30 分钟。在此期间后,恢复对话可能需要 1-2 分钟。
@@ -36,7 +36,7 @@ poetry run python -m openhands.core.cli
```bash
docker run -it \
--pull=always \
-e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:0.39-nikolaik \
-e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:0.38-nikolaik \
-e SANDBOX_USER_ID=$(id -u) \
-e SANDBOX_VOLUMES=$SANDBOX_VOLUMES \
-e LLM_API_KEY=$LLM_API_KEY \
@@ -45,7 +45,7 @@ docker run -it \
-v ~/.openhands-state:/.openhands-state \
--add-host host.docker.internal:host-gateway \
--name openhands-app-$(date +%Y%m%d%H%M%S) \
docker.all-hands.dev/all-hands-ai/openhands:0.39 \
docker.all-hands.dev/all-hands-ai/openhands:0.38 \
python -m openhands.core.cli
```
@@ -33,7 +33,7 @@ poetry run python -m openhands.core.main -t "write a bash script that prints hi"
```bash
docker run -it \
--pull=always \
-e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:0.39-nikolaik \
-e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:0.38-nikolaik \
-e SANDBOX_USER_ID=$(id -u) \
-e SANDBOX_VOLUMES=$SANDBOX_VOLUMES \
-e LLM_API_KEY=$LLM_API_KEY \
@@ -43,7 +43,7 @@ docker run -it \
-v ~/.openhands-state:/.openhands-state \
--add-host host.docker.internal:host-gateway \
--name openhands-app-$(date +%Y%m%d%H%M%S) \
docker.all-hands.dev/all-hands-ai/openhands:0.39 \
docker.all-hands.dev/all-hands-ai/openhands:0.38 \
python -m openhands.core.main -t "write a bash script that prints hi"
```
@@ -58,17 +58,17 @@
运行 OpenHands 最简单的方法是使用 Docker。
```bash
docker pull docker.all-hands.dev/all-hands-ai/runtime:0.39-nikolaik
docker pull docker.all-hands.dev/all-hands-ai/runtime:0.38-nikolaik
docker run -it --rm --pull=always \
-e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:0.39-nikolaik \
-e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:0.38-nikolaik \
-e LOG_ALL_EVENTS=true \
-v /var/run/docker.sock:/var/run/docker.sock \
-v ~/.openhands-state:/.openhands-state \
-p 3000:3000 \
--add-host host.docker.internal:host-gateway \
--name openhands-app \
docker.all-hands.dev/all-hands-ai/openhands:0.39
docker.all-hands.dev/all-hands-ai/openhands:0.38
```
OpenHands 将在 http://localhost:3000 运行!
@@ -1,6 +1,6 @@
# OpenHands 功能概览
![概览](/img/oh-features.png)
![overview](/img/oh-features.png)
### 聊天面板
- 显示用户与 OpenHands 之间的对话。
@@ -22,7 +22,7 @@
### 应用
- 当 OpenHands 运行应用程序时显示网络服务器。
- 用户可以与正在运行的应用程序交互。
- 用户可以与运行的应用程序交互。
### 浏览器
- 由 OpenHands 用于浏览网站。
+1 -1
View File
@@ -1,4 +1,4 @@
# Cloud API
# OpenHands Cloud API
OpenHands Cloud provides a REST API that allows you to programmatically interact with the service. This is useful if
you want to kick off your own jobs from your programs in a flexible way.
@@ -0,0 +1,33 @@
# Cloud GitHub Resolver
The GitHub Resolver automates code fixes and provides intelligent assistance for your repositories.
## Setup
The Cloud GitHub Resolver is available automatically when you
[grant OpenHands Cloud repository access](./openhands-cloud#adding-repository-access).
## Usage
After granting OpenHands Cloud repository access, you can use the Cloud GitHub Resolver on the issues and pull requests
on the repository.
### Issues
On your repository, label an issue with `openhands`. OpenHands will:
1. Comment on the issue to let you know it is working on it.
- You can click on the link to track the progress on OpenHands Cloud.
2. Open a pull request if it determines that the issue has been successfully resolved.
3. Comment on the issue with a summary of the performed tasks and a link to the pull request.
### Pull Requests
To get OpenHands to work on pull requests, use `@openhands` in top level or inline comments to:
- Ask questions
- Request updates
- Get code explanations
OpenHands will:
1. Comment on the PR to let you know it is working on it.
2. Perform the task.
@@ -1,32 +0,0 @@
# Cloud Issue Resolver
The Cloud Issue Resolver automates code fixes and provides intelligent assistance for your repositories on GitHub.
## Setup
The Cloud Issue Resolver is available automatically when you grant OpenHands Cloud repository access:
- [GitHub repository access](./github-installation#adding-repository-access)
## Usage
After granting OpenHands Cloud repository access, you can use the Cloud Issue Resolver on issues and pull requests in your repositories.
### Working with Issues
On your repository, label an issue with `openhands` or add a message starting with
`@openhands`. OpenHands will:
1. Comment on the issue to let you know it is working on it
- You can click on the link to track the progress on OpenHands Cloud
2. Open a pull request if it determines that the issue has been successfully resolved
3. Comment on the issue with a summary of the performed tasks and a link to the PR
### Working with Pull Requests
To get OpenHands to work on pull requests, mention `@openhands` in comments to:
- Ask questions
- Request updates
- Get code explanations
OpenHands will:
1. Comment to let you know it is working on it
2. Perform the requested task
-26
View File
@@ -1,26 +0,0 @@
# Cloud UI
The Cloud UI provides a web interface for interacting with OpenHands AI. This page explains how to access and use the OpenHands Cloud UI.
## Accessing the UI
The OpenHands Cloud UI can be accessed at [app.all-hands.dev](https://app.all-hands.dev). You'll need to sign in with your GitHub or GitLab account to access the interface.
## Key Features
For detailed information about the features available in the OpenHands Cloud UI, please refer to the [Key Features](../key-features.md) section of the documentation.
## Settings
The settings page allows you to:
- Configure your account preferences.
- Manage repository access.
- Generate API keys for programmatic access.
- Generate custom secrets for the agent.
## Next Steps
- [Use the Cloud Issue Resolver](./cloud-issue-resolver.md) to automate code fixes and get assistance.
- [Learn about the Cloud API](./cloud-api.md) for programmatic access.
@@ -1,53 +0,0 @@
# GitHub Installation
This guide walks you through the process of installing and configuring OpenHands Cloud for your GitHub repositories.
## Prerequisites
- A GitHub account
- Access to OpenHands Cloud
## Installation Steps
1. Log in to [OpenHands Cloud](https://app.all-hands.dev)
2. If you haven't connected your GitHub account yet:
- Click on `Connect to GitHub`
- Review and accept the terms of service
- Authorize the OpenHands AI application
## Adding Repository Access
You can grant OpenHands access to specific repositories:
1. Click on `Add GitHub repos`
2. Select your organization and choose the specific repositories to grant OpenHands access to.
- OpenHands requests short-lived tokens (8-hour expiration) with these permissions:
- Actions: Read and write
- Administration: Read-only
- Commit statuses: Read and write
- Contents: Read and write
- Issues: Read and write
- Metadata: Read-only
- Pull requests: Read and write
- Webhooks: Read and write
- Workflows: Read and write
- Repository access for a user is granted based on:
- Permission granted for the repository
- User's GitHub permissions (owner/collaborator)
3. Click `Install & Authorize`
## Modifying Repository Access
You can modify repository access at any time by visiting the Settings page and selecting `Configure GitHub Repositories` under the `Git` tab.
## Using OpenHands with GitHub
Once you've granted repository access, you can use OpenHands with your GitHub repositories.
For details on how to use OpenHands with GitHub issues and pull requests, see the [Cloud Issue Resolver](./cloud-issue-resolver.md) documentation.
## Next Steps
- [Access the Cloud UI](./cloud-ui.md) to interact with the web interface
- [Use the Cloud Issue Resolver](./cloud-issue-resolver.md) to automate code fixes and get assistance
- [Use the Cloud API](./cloud-api.md) to programmatically interact with OpenHands
@@ -1,22 +0,0 @@
# GitLab Installation
This guide walks you through the process of installing and configuring OpenHands Cloud for your GitLab repositories.
## Prerequisites
- A GitLab account
- Access to OpenHands Cloud
## Installation Steps
1. Log in to [OpenHands Cloud](https://app.all-hands.dev)
2. If you haven't connected your GitLab account yet:
- Click on `Log in with GitLab`
- Authorize the OpenHands application
## Next Steps
- [Access the Cloud UI](./cloud-ui.md) to interact with the web interface
- [Use the Cloud API](./cloud-api.md) to programmatically interact with OpenHands
@@ -1,24 +0,0 @@
# OpenHands Cloud
OpenHands Cloud is the hosted cloud version of All Hands AI's OpenHands.
## Accessing OpenHands Cloud
To get started with OpenHands Cloud, visit [app.all-hands.dev](https://app.all-hands.dev).
You'll be prompted to connect with your GitHub or GitLab account:
1. Click `Log in with GitHub` or `Log in with GitLab`.
2. Review the permissions requested by OpenHands and authorize the application.
- OpenHands will require certain permissions from your account. To read more about these permissions,
you can click the `Learn more` link on the authorization page.
## Next Steps
Once you've connected your account, you can:
- [Install GitHub Integration](./github-installation.md) to use OpenHands with your GitHub repositories
- [Install GitLab Integration](./gitlab-installation.md) to use OpenHands with your GitLab repositories
- [Access the Cloud UI](./cloud-ui.md) to interact with the web interface
- [Use the Cloud API](./cloud-api.md) to programmatically interact with OpenHands
- [Set up the Cloud Issue Resolver](./cloud-issue-resolver.md) to automate code fixes and provide intelligent assistance
+2 -2
View File
@@ -31,7 +31,7 @@ This command opens an interactive prompt where you can type tasks or commands an
```bash
docker run -it \
--pull=always \
-e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:0.39-nikolaik \
-e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:0.38-nikolaik \
-e SANDBOX_USER_ID=$(id -u) \
-e SANDBOX_VOLUMES=$SANDBOX_VOLUMES \
-e LLM_API_KEY=$LLM_API_KEY \
@@ -40,7 +40,7 @@ docker run -it \
-v ~/.openhands-state:/.openhands-state \
--add-host host.docker.internal:host-gateway \
--name openhands-app-$(date +%Y%m%d%H%M%S) \
docker.all-hands.dev/all-hands-ai/openhands:0.39 \
docker.all-hands.dev/all-hands-ai/openhands:0.38 \
python -m openhands.cli.main
```
+2 -2
View File
@@ -31,7 +31,7 @@ To run OpenHands in Headless mode with Docker:
```bash
docker run -it \
--pull=always \
-e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:0.39-nikolaik \
-e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:0.38-nikolaik \
-e SANDBOX_USER_ID=$(id -u) \
-e SANDBOX_VOLUMES=$SANDBOX_VOLUMES \
-e LLM_API_KEY=$LLM_API_KEY \
@@ -41,7 +41,7 @@ docker run -it \
-v ~/.openhands-state:/.openhands-state \
--add-host host.docker.internal:host-gateway \
--name openhands-app-$(date +%Y%m%d%H%M%S) \
docker.all-hands.dev/all-hands-ai/openhands:0.39 \
docker.all-hands.dev/all-hands-ai/openhands:0.38 \
python -m openhands.core.main -t "write a bash script that prints hi"
```
+3 -3
View File
@@ -58,17 +58,17 @@ A system with a modern processor and a minimum of **4GB RAM** is recommended to
The easiest way to run OpenHands is in Docker.
```bash
docker pull docker.all-hands.dev/all-hands-ai/runtime:0.39-nikolaik
docker pull docker.all-hands.dev/all-hands-ai/runtime:0.38-nikolaik
docker run -it --rm --pull=always \
-e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:0.39-nikolaik \
-e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:0.38-nikolaik \
-e LOG_ALL_EVENTS=true \
-v /var/run/docker.sock:/var/run/docker.sock \
-v ~/.openhands-state:/.openhands-state \
-p 3000:3000 \
--add-host host.docker.internal:host-gateway \
--name openhands-app \
docker.all-hands.dev/all-hands-ai/openhands:0.39
docker.all-hands.dev/all-hands-ai/openhands:0.38
```
You'll find OpenHands running at http://localhost:3000!
+7 -86
View File
@@ -1,4 +1,4 @@
# Local LLMs
# Local LLM with SGLang or vLLM
:::warning
When using a Local LLM, OpenHands may have limited functionality.
@@ -7,91 +7,10 @@ It is highly recommended that you use GPUs to serve local models for optimal exp
## News
- 2025/05/21: We collaborated with Mistral AI and released [Devstral Small](https://mistral.ai/news/devstral) that achieves [46.8% on SWE-Bench Verified](https://github.com/SWE-bench/experiments/pull/228)!
- 2025/03/31: We released an open model OpenHands LM v0.1 32B that achieves 37.1% on SWE-Bench Verified
([blog](https://www.all-hands.dev/blog/introducing-openhands-lm-32b----a-strong-open-coding-agent-model), [model](https://huggingface.co/all-hands/openhands-lm-32b-v0.1)).
## Quickstart: Running OpenHands on Your Macbook
### Serve the model on your Macbook
We recommend using [LMStudio](https://lmstudio.ai/) for serving these models locally.
1. Download [LM Studio](https://lmstudio.ai/) and install it
2. Download the model:
- Option 1: Directly download the LLM from [this link](https://lmstudio.ai/model/devstral-small-2505-mlx) or by searching for the name `Devstral-Small-2505` in LM Studio
- Option 2: Download a LLM in GGUF format. For example, to download [Devstral Small 2505 GGUF](https://huggingface.co/mistralai/Devstral-Small-2505_gguf), using `huggingface-cli download mistralai/Devstral-Small-2505_gguf --local-dir mistralai/Devstral-Small-2505_gguf`. Then in bash terminal, run `lms import {model_name}` in the directory where you've downloaded the model checkpoint (e.g. run `lms import devstralQ4_K_M.gguf` in `mistralai/Devstral-Small-2505_gguf`)
3. Open LM Studio application, you should first switch to `power user` mode, and then open the developer tab:
![image](./screenshots/1_select_power_user.png)
4. Then click `Select a model to load` on top of the application:
![image](./screenshots/2_select_model.png)
5. And choose the model you want to use, holding `option` on mac to enable advanced loading options:
![image](./screenshots/3_select_devstral.png)
6. You should then pick an appropriate context window for OpenHands based on your hardware configuration (larger than 32768 is recommended for using OpenHands, but too large may cause you to run out of memory); Flash attention is also recommended if it works on your machine.
![image](./screenshots/4_set_context_window.png)
7. And you should start the server (if it is not already in `Running` status), un-toggle `Serve on Local Network` and remember the port number of the LMStudio URL (`1234` is the port number for `http://127.0.0.1:1234` in this example):
![image](./screenshots/5_copy_url.png)
8. Finally, you can click the `copy` button near model name to copy the model name (`imported-models/uncategorized/devstralq4_k_m.gguf` in this example):
![image](./screenshots/6_copy_to_get_model_name.png)
### Start OpenHands with locally served model
Check [the installation guide](https://docs.all-hands.dev/modules/usage/installation) to make sure you have all the prerequisites for running OpenHands.
```bash
export LMSTUDIO_MODEL_NAME="imported-models/uncategorized/devstralq4_k_m.gguf" # <- Replace this with the model name you copied from LMStudio
export LMSTUDIO_URL="http://host.docker.internal:1234" # <- Replace this with the port from LMStudio
docker pull docker.all-hands.dev/all-hands-ai/runtime:0.39-nikolaik
mkdir -p ~/.openhands-state && echo '{"language":"en","agent":"CodeActAgent","max_iterations":null,"security_analyzer":null,"confirmation_mode":false,"llm_model":"lm_studio/'$LMSTUDIO_MODEL_NAME'","llm_api_key":"dummy","llm_base_url":"'$LMSTUDIO_URL/v1'","remote_runtime_resource_factor":null,"github_token":null,"enable_default_condenser":true,"user_consents_to_analytics":true}' > ~/.openhands-state/settings.json
docker run -it --rm --pull=always \
-e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:0.39-nikolaik \
-e LOG_ALL_EVENTS=true \
-v /var/run/docker.sock:/var/run/docker.sock \
-v ~/.openhands-state:/.openhands-state \
-p 3000:3000 \
--add-host host.docker.internal:host-gateway \
--name openhands-app \
docker.all-hands.dev/all-hands-ai/openhands:0.39
```
Once your server is running -- you can visit `http://localhost:3000` in your browser to use OpenHands with local Devstral model:
```
Digest: sha256:e72f9baecb458aedb9afc2cd5bc935118d1868719e55d50da73190d3a85c674f
Status: Image is up to date for docker.all-hands.dev/all-hands-ai/openhands:0.39
Starting OpenHands...
Running OpenHands as root
14:22:13 - openhands:INFO: server_config.py:50 - Using config class None
INFO: Started server process [8]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: Uvicorn running on http://0.0.0.0:3000 (Press CTRL+C to quit)
```
## Advanced: Serving LLM on GPUs
### Download model checkpoints
:::note
The model checkpoints downloaded here should NOT be in GGUF format.
:::
## Download the Model from Huggingface
For example, to download [OpenHands LM 32B v0.1](https://huggingface.co/all-hands/openhands-lm-32b-v0.1):
@@ -99,7 +18,9 @@ For example, to download [OpenHands LM 32B v0.1](https://huggingface.co/all-hand
huggingface-cli download all-hands/openhands-lm-32b-v0.1 --local-dir all-hands/openhands-lm-32b-v0.1
```
### Create an OpenAI-Compatible Endpoint With SGLang
## Create an OpenAI-Compatible Endpoint With a Model Serving Framework
### Serving with SGLang
- Install SGLang following [the official documentation](https://docs.sglang.ai/start/install.html).
- Example launch command for OpenHands LM 32B (with at least 2 GPUs):
@@ -114,7 +35,7 @@ SGLANG_ALLOW_OVERWRITE_LONGER_CONTEXT_LEN=1 python3 -m sglang.launch_server \
--api-key mykey --context-length 131072
```
### Create an OpenAI-Compatible Endpoint with vLLM
### Serving with vLLM
- Install vLLM following [the official documentation](https://docs.vllm.ai/en/latest/getting_started/installation.html).
- Example launch command for OpenHands LM 32B (with at least 2 GPUs):
@@ -128,7 +49,7 @@ vllm serve all-hands/openhands-lm-32b-v0.1 \
--enable-prefix-caching
```
## Advanced: Run and Configure OpenHands
## Run and Configure OpenHands
### Run OpenHands
Binary file not shown.

Before

Width:  |  Height:  |  Size: 228 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 420 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 558 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 646 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 93 KiB

+3 -5
View File
@@ -13,16 +13,14 @@ files on your machine. Only use this runtime in controlled environments or when
Before using the Local Runtime, ensure that:
1. You can run OpenHands using the [Development workflow](https://github.com/All-Hands-AI/OpenHands/blob/main/Development.md).
2. For Linux and Mac, tmux is available on your system.
3. For Windows, PowerShell is available on your system.
- Only [CLI mode](../how-to/cli-mode) and [headless mode](../how-to/headless-mode) are supported in Windows with Local Runtime.
2. tmux is available on your system.
## Configuration
To use the Local Runtime, besides required configurations like the LLM provider, model and API key, you'll need to set
the following options via environment variables or the [config.toml file](https://github.com/All-Hands-AI/OpenHands/blob/main/config.template.toml) when starting OpenHands:
Via environment variables (please use PowerShell syntax for Windows PowerShell):
Via environment variables:
```bash
# Required
@@ -67,4 +65,4 @@ The Local Runtime is particularly useful for:
- CI/CD pipelines where Docker is not available.
- Testing and development of OpenHands itself.
- Environments where container usage is restricted (e.g. native Windows).
- Environments where container usage is restricted.
+4 -4
View File
@@ -27,7 +27,7 @@
"@docusaurus/tsconfig": "^3.7.0",
"@docusaurus/types": "^3.5.1",
"swagger-cli": "^4.0.4",
"swagger-ui-dist": "^5.22.0",
"swagger-ui-dist": "^5.21.0",
"typescript": "~5.8.3"
},
"engines": {
@@ -18730,9 +18730,9 @@
}
},
"node_modules/swagger-ui-dist": {
"version": "5.22.0",
"resolved": "https://registry.npmjs.org/swagger-ui-dist/-/swagger-ui-dist-5.22.0.tgz",
"integrity": "sha512-8YlCSxiyb8uPFa7qoB1lRHYr1PBbT1NuV9RvQdFFPFPudRBTPf9coU5jl02KhzvrtmTEw4jXRgb0kg8pJvVuWQ==",
"version": "5.21.0",
"resolved": "https://registry.npmjs.org/swagger-ui-dist/-/swagger-ui-dist-5.21.0.tgz",
"integrity": "sha512-E0K3AB6HvQd8yQNSMR7eE5bk+323AUxjtCz/4ZNKiahOlPhPJxqn3UPIGs00cyY/dhrTDJ61L7C/a8u6zhGrZg==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
+1 -1
View File
@@ -36,7 +36,7 @@
"@docusaurus/tsconfig": "^3.7.0",
"@docusaurus/types": "^3.5.1",
"swagger-cli": "^4.0.4",
"swagger-ui-dist": "^5.22.0",
"swagger-ui-dist": "^5.21.0",
"typescript": "~5.8.3"
},
"browserslist": {
+6 -27
View File
@@ -24,40 +24,19 @@ const sidebars: SidebarsConfig = {
items: [
{
type: 'doc',
label: 'Getting Started',
label: 'Openhands Cloud',
id: 'usage/cloud/openhands-cloud',
},
{
type: 'category',
label: 'Installation',
items: [
{
type: 'doc',
label: 'GitHub Installation',
id: 'usage/cloud/github-installation',
},
{
type: 'doc',
label: 'GitLab Installation',
id: 'usage/cloud/gitlab-installation',
},
],
},
{
type: 'doc',
label: 'Cloud UI',
id: 'usage/cloud/cloud-ui',
},
{
type: 'doc',
label: 'Cloud Issue Resolver',
id: 'usage/cloud/cloud-issue-resolver',
},
{
type: 'doc',
label: 'Cloud API',
id: 'usage/cloud/cloud-api',
},
{
type: 'doc',
label: 'Cloud GitHub Resolver',
id: 'usage/cloud/cloud-github-resolver',
},
],
},
{
-5
View File
@@ -876,11 +876,6 @@
"type": "string",
"nullable": true
},
"conversation_instructions": {
"type": "string",
"nullable": true,
"description": "Optional instructions the agent must follow throughout the conversation while addressing the user's initial task"
},
"image_urls": {
"type": "array",
"items": {
-31
View File
@@ -42,37 +42,6 @@ api_key = "XXX"
temperature = 0.0
```
### Configuring Condensers for Evaluation
For benchmarks that support condenser configuration (like SWE-Bench), you can define multiple condenser configurations in your `config.toml` file. A condenser is responsible for managing conversation history to maintain context while staying within token limits - you can learn more about how it works [here](https://www.all-hands.dev/blog/openhands-context-condensensation-for-more-efficient-ai-agents):
```toml
# LLM-based summarizing condenser for evaluation
[condenser.summarizer_for_eval]
type = "llm"
llm_config = "haiku" # Reference to an LLM config to use for summarization
keep_first = 2 # Number of initial events to always keep
max_size = 100 # Maximum size of history before triggering summarization
# Recent events condenser for evaluation
[condenser.recent_for_eval]
type = "recent"
keep_first = 2 # Number of initial events to always keep
max_events = 50 # Maximum number of events to keep in history
```
You can then specify which condenser configuration to use when running evaluation scripts, for example:
```bash
EVAL_CONDENSER=summarizer_for_eval \
./evaluation/benchmarks/swe_bench/scripts/run_infer.sh llm.eval_gpt4_1106_preview HEAD CodeActAgent 500 100 1 princeton-nlp/SWE-bench_Verified test
```
The name is up to you, but should match a name defined in your `config.toml` file. The last argument in the command specifies the condenser configuration to use. In this case, `summarizer_for_eval` is used, which refers to the LLM-based summarizing condenser as defined above.
If no condenser configuration is specified, the 'noop' condenser will be used by default, which keeps the full conversation history.
```
For other configurations specific to evaluation, such as `save_trajectory_path`, these are typically set in the `get_config` function of the respective `run_infer.py` file for each benchmark.
## Supported Benchmarks
+3 -12
View File
@@ -45,7 +45,7 @@ For example, for instance ID `django_django-11011`, it will try to pull our pre-
This image will be used create an OpenHands runtime image where the agent will operate on.
```bash
./evaluation/benchmarks/swe_bench/scripts/run_infer.sh [model_config] [git-version] [agent] [eval_limit] [max_iter] [num_workers] [dataset] [dataset_split] [n_runs] [mode]
./evaluation/benchmarks/swe_bench/scripts/run_infer.sh [model_config] [git-version] [agent] [eval_limit] [max_iter] [num_workers] [dataset] [dataset_split]
# Example
./evaluation/benchmarks/swe_bench/scripts/run_infer.sh llm.eval_gpt4_1106_preview HEAD CodeActAgent 500 100 1 princeton-nlp/SWE-bench_Verified test
@@ -69,20 +69,13 @@ default, it is set to 1.
- `dataset`, a huggingface dataset name. e.g. `princeton-nlp/SWE-bench`, `princeton-nlp/SWE-bench_Lite`, `princeton-nlp/SWE-bench_Verified`, or `princeton-nlp/SWE-bench_Multimodal`, specifies which dataset to evaluate on.
- `dataset_split`, split for the huggingface dataset. e.g., `test`, `dev`. Default to `test`.
- `n_runs`, e.g. `3`, is the number of times to run the evaluation. Default is 1.
- `mode`, e.g. `swt`, `swt-ci`, or `swe`, specifies the evaluation mode. Default is `swe`.
> [!CAUTION]
> Setting `num_workers` larger than 1 is not officially tested, YMMV.
There are also optional environment variables you can set:
There is also one optional environment variable you can set.
```bash
# Use hint text in the evaluation (default: false)
export USE_HINT_TEXT=true # Ignore this if you are not sure.
# Specify a condenser configuration for memory management (default: NoOpCondenser)
export EVAL_CONDENSER=summarizer_for_eval # Name of the condenser config group in config.toml
export USE_HINT_TEXT=true # if you want to use hint text in the evaluation. Default to false. Ignore this if you are not sure.
```
Let's say you'd like to run 10 instances using `llm.eval_gpt4_1106_preview` and CodeActAgent,
@@ -158,8 +151,6 @@ The script now accepts optional arguments:
- `instance_id`: Specify a single instance to evaluate (optional)
- `dataset_name`: The name of the dataset to use (default: `"princeton-nlp/SWE-bench_Lite"`)
- `split`: The split of the dataset to use (default: `"test"`)
- `environment`: The environment to use for patch evaluation (default: `"local"`). You can set it to
`"modal"` to use [official SWE-Bench support](https://github.com/swe-bench/SWE-bench/blob/main/docs/assets/evaluation.md#%EF%B8%8F-evaluation-with-modal) for running evaluation on Modal.
For example, to evaluate a specific instance with a custom dataset and split:
@@ -44,8 +44,6 @@ from openhands.core.config import (
get_llm_config_arg,
get_parser,
)
from openhands.core.config.utils import get_condenser_config_arg
from openhands.core.config.condenser_config import NoOpCondenserConfig
from openhands.core.logger import openhands_logger as logger
from openhands.core.main import create_runtime, run_controller
from openhands.critic import AgentFinishedCritic
@@ -758,7 +756,6 @@ if __name__ == '__main__':
choices=['swe', 'swt', 'swt-ci'],
help="mode to run the evaluation, either 'swe', 'swt', or 'swt-ci'",
)
args, _ = parser.parse_known_args()
# NOTE: It is preferable to load datasets from huggingface datasets and perform post-processing
@@ -795,19 +792,6 @@ if __name__ == '__main__':
if llm_config is None:
raise ValueError(f'Could not find LLM config: --llm_config {args.llm_config}')
# Get condenser config from environment variable
condenser_name = os.environ.get('EVAL_CONDENSER')
if condenser_name:
condenser_config = get_condenser_config_arg(condenser_name)
if condenser_config is None:
raise ValueError(
f'Could not find Condenser config: EVAL_CONDENSER={condenser_name}'
)
else:
# If no specific condenser config is provided via env var, default to NoOpCondenser
condenser_config = NoOpCondenserConfig()
logger.debug('No Condenser config provided via EVAL_CONDENSER, using NoOpCondenser.')
details = {'mode': args.mode}
_agent_cls = openhands.agenthub.Agent.get_cls(args.agent_cls)
@@ -822,7 +806,6 @@ if __name__ == '__main__':
args.eval_note,
args.eval_output_dir,
details=details,
condenser_config=condenser_config,
)
output_file = os.path.join(metadata.eval_output_dir, 'output.jsonl')
@@ -16,19 +16,11 @@ fi
INSTANCE_ID=$2
DATASET_NAME=${3:-"princeton-nlp/SWE-bench_Lite"}
SPLIT=${4:-"test"}
ENVIRONMENT=${5:-"local"}
echo "INSTANCE_ID: $INSTANCE_ID"
echo "DATASET_NAME: $DATASET_NAME"
echo "SPLIT: $SPLIT"
if [[ "$ENVIRONMENT" != "local" && "$ENVIRONMENT" != "modal" ]]; then
echo "Error: ENVIRONMENT must be either 'local' or 'modal'"
exit 1
fi
echo "ENVIRONMENT: $ENVIRONMENT"
PROCESS_FILEPATH=$(realpath $PROCESS_FILEPATH)
FILE_DIR=$(dirname $PROCESS_FILEPATH)
FILE_NAME=$(basename $PROCESS_FILEPATH)
@@ -86,12 +78,6 @@ echo "=============================================================="
RUN_ID=$(date +"%Y%m%d_%H%M%S")
N_PROCESS=4
MODAL_FLAG=""
if [[ "$ENVIRONMENT" == "modal" ]]; then
MODAL_FLAG="--modal true"
fi
if [ -z "$INSTANCE_ID" ]; then
echo "Running SWE-bench evaluation on the whole input file..."
# Default to SWE-Bench-lite
@@ -104,8 +90,7 @@ if [ -z "$INSTANCE_ID" ]; then
--timeout 3600 \
--cache_level instance \
--max_workers $N_PROCESS \
--run_id $RUN_ID \
$MODAL_FLAG
--run_id $RUN_ID
# get the "model_name_or_path" from the first line of the SWEBENCH_FORMAT_JSONL
MODEL_NAME_OR_PATH=$(jq -r '.model_name_or_path' $SWEBENCH_FORMAT_JSONL | head -n 1)
@@ -152,6 +137,5 @@ else
--instance_ids $INSTANCE_ID \
--cache_level instance \
--max_workers $N_PROCESS \
--run_id $RUN_ID \
$MODAL_FLAG
--run_id $RUN_ID
fi
@@ -14,7 +14,6 @@ SPLIT=$8
N_RUNS=$9
MODE=${10}
if [ -z "$NUM_WORKERS" ]; then
NUM_WORKERS=1
echo "Number of workers not specified, use default $NUM_WORKERS"
@@ -52,12 +51,6 @@ if [ -z "$MODE" ]; then
echo "MODE not specified, use default $MODE"
fi
if [ -n "$EVAL_CONDENSER" ]; then
echo "Using Condenser Config: $EVAL_CONDENSER"
else
echo "No Condenser Config provided via EVAL_CONDENSER, use default (NoOpCondenser)."
fi
export RUN_WITH_BROWSING=$RUN_WITH_BROWSING
echo "RUN_WITH_BROWSING: $RUN_WITH_BROWSING"
@@ -72,7 +65,6 @@ echo "MAX_ITER: $MAX_ITER"
echo "NUM_WORKERS: $NUM_WORKERS"
echo "COMMIT_HASH: $COMMIT_HASH"
echo "MODE: $MODE"
echo "EVAL_CONDENSER: $EVAL_CONDENSER"
# Default to NOT use Hint
if [ -z "$USE_HINT_TEXT" ]; then
@@ -96,10 +88,6 @@ fi
if [ "$MODE" != "swe" ]; then
EVAL_NOTE="${EVAL_NOTE}-${MODE}"
fi
# Add condenser config to eval note if provided
if [ -n "$EVAL_CONDENSER" ]; then
EVAL_NOTE="${EVAL_NOTE}-${EVAL_CONDENSER}"
fi
function run_eval() {
local eval_note="${1}"
@@ -113,8 +101,6 @@ function run_eval() {
--split $SPLIT \
--mode $MODE"
if [ -n "$EVAL_LIMIT" ]; then
echo "EVAL_LIMIT: $EVAL_LIMIT"
COMMAND="$COMMAND --eval-n-limit $EVAL_LIMIT"
@@ -45,8 +45,6 @@ describe("ConversationPanel", () => {
last_updated_at: "2021-10-01T12:00:00Z",
created_at: "2021-10-01T12:00:00Z",
status: "STOPPED" as const,
url: null,
session_api_key: null,
},
{
conversation_id: "2",
@@ -55,8 +53,6 @@ describe("ConversationPanel", () => {
last_updated_at: "2021-10-02T12:00:00Z",
created_at: "2021-10-02T12:00:00Z",
status: "STOPPED" as const,
url: null,
session_api_key: null,
},
{
conversation_id: "3",
@@ -65,8 +61,6 @@ describe("ConversationPanel", () => {
last_updated_at: "2021-10-03T12:00:00Z",
created_at: "2021-10-03T12:00:00Z",
status: "STOPPED" as const,
url: null,
session_api_key: null,
},
];
@@ -149,8 +143,6 @@ describe("ConversationPanel", () => {
last_updated_at: "2021-10-01T12:00:00Z",
created_at: "2021-10-01T12:00:00Z",
status: "STOPPED" as const,
url: null,
session_api_key: null,
},
{
conversation_id: "2",
@@ -159,8 +151,6 @@ describe("ConversationPanel", () => {
last_updated_at: "2021-10-02T12:00:00Z",
created_at: "2021-10-02T12:00:00Z",
status: "STOPPED" as const,
url: null,
session_api_key: null,
},
{
conversation_id: "3",
@@ -169,8 +159,6 @@ describe("ConversationPanel", () => {
last_updated_at: "2021-10-03T12:00:00Z",
created_at: "2021-10-03T12:00:00Z",
status: "STOPPED" as const,
url: null,
session_api_key: null,
},
];
@@ -56,19 +56,6 @@ function TestComponent() {
describe("WsClientProvider", () => {
beforeEach(() => {
vi.clearAllMocks();
vi.mock("#/hooks/query/use-user-conversation", () => ({
useUserConversation: () => {
return { data: {
conversation_id: "1",
title: "Conversation 1",
selected_repository: null,
last_updated_at: "2021-10-01T12:00:00Z",
created_at: "2021-10-01T12:00:00Z",
status: "STOPPED" as const,
url: null,
session_api_key: null,
}}},
}));
});
it("should emit oh_user_action event when send is called", async () => {
+161 -810
View File
File diff suppressed because it is too large Load Diff
+7 -7
View File
@@ -1,6 +1,6 @@
{
"name": "openhands-frontend",
"version": "0.39.1",
"version": "0.38.0",
"private": true,
"type": "module",
"engines": {
@@ -12,7 +12,7 @@
"@monaco-editor/react": "^4.7.0-rc.0",
"@react-router/node": "^7.6.0",
"@react-router/serve": "^7.6.0",
"@react-types/shared": "^3.29.1",
"@react-types/shared": "^3.29.0",
"@reduxjs/toolkit": "^2.8.2",
"@stripe/react-stripe-js": "^3.7.0",
"@stripe/stripe-js": "^7.3.0",
@@ -31,7 +31,7 @@
"jose": "^6.0.11",
"lucide-react": "^0.511.0",
"monaco-editor": "^0.52.2",
"posthog-js": "^1.245.1",
"posthog-js": "^1.242.2",
"react": "^19.1.0",
"react-dom": "^19.1.0",
"react-highlight": "^0.15.0",
@@ -90,15 +90,15 @@
"@testing-library/jest-dom": "^6.6.1",
"@testing-library/react": "^16.3.0",
"@testing-library/user-event": "^14.6.1",
"@types/node": "^22.15.21",
"@types/react": "^19.1.5",
"@types/node": "^22.15.18",
"@types/react": "^19.1.4",
"@types/react-dom": "^19.1.5",
"@types/react-highlight": "^0.12.8",
"@types/react-syntax-highlighter": "^15.5.13",
"@types/ws": "^8.18.1",
"@typescript-eslint/eslint-plugin": "^7.18.0",
"@typescript-eslint/parser": "^7.18.0",
"@vitest/coverage-v8": "^3.1.4",
"@vitest/coverage-v8": "^3.1.3",
"autoprefixer": "^10.4.21",
"cross-env": "^7.0.3",
"eslint": "^8.57.0",
@@ -117,7 +117,7 @@
"msw": "^2.6.6",
"postcss": "^8.5.2",
"prettier": "^3.5.3",
"stripe": "^18.1.1",
"stripe": "^18.1.0",
"tailwindcss": "^3.4.17",
"typescript": "^5.8.3",
"vite-plugin-svgr": "^4.2.0",
@@ -119,18 +119,6 @@ function isExcludedTechnicalString(str) {
return EXCLUDED_TECHNICAL_STRINGS.includes(str);
}
function isLikelyCode(str) {
// A string with no spaces and at least one underscore or colon is likely a code.
// (e.g.: "browser_interactive" or "error:")
if (str.includes(" ")) {
return false
}
if (str.includes(":") || str.includes("_")){
return true
}
return false
}
function isCommonDevelopmentString(str) {
// Technical patterns that are definitely not UI strings
const technicalPatterns = [
@@ -397,11 +385,6 @@ function isLikelyUserFacingText(str) {
return false;
}
// Check if it looks like a code rather than a key
if (isLikelyCode(str)) {
return false
}
// Check if it's a raw translation key that should be wrapped in t()
if (isRawTranslationKey(str)) {
return true;
@@ -1,6 +1,6 @@
import { openHands } from "../open-hands-axios";
import { GetFilesResponse, GetFileResponse } from "./file-service.types";
import { getConversationUrl } from "../conversation.utils";
import { getConversationUrl } from "./file-service.utils";
export class FileService {
/**
@@ -1,9 +1,7 @@
import OpenHands from "#/api/open-hands";
/**
* Returns a URL compatible for the file service
* @param conversationId ID of the conversation
* @returns URL of the conversation
*/
export const getConversationUrl = (conversationId: string) =>
OpenHands.getConversationUrl(conversationId);
`/api/conversations/${conversationId}`;
+19 -77
View File
@@ -1,4 +1,3 @@
import { AxiosHeaders } from "axios";
import {
Feedback,
FeedbackResponse,
@@ -18,38 +17,6 @@ import { GitUser, GitRepository, Branch } from "#/types/git";
import { SuggestedTask } from "#/components/features/home/tasks/task.types";
class OpenHands {
private static currentConversation: Conversation | null = null;
/**
* Get a current conversation
* @return the current conversation
*/
static getCurrentConversation(): Conversation | null {
return this.currentConversation;
}
/**
* Set a current conversation
* @param url Custom URL to use for conversation endpoints
*/
static setCurrentConversation(
currentConversation: Conversation | null,
): void {
this.currentConversation = currentConversation;
}
/**
* Get the url for the conversation. If
*/
static getConversationUrl(conversationId: string): string {
if (this.currentConversation?.conversation_id === conversationId) {
if (this.currentConversation.url) {
return this.currentConversation.url;
}
}
return `/api/conversations/${conversationId}`;
}
/**
* Retrieve the list of models available
* @returns List of models available
@@ -86,15 +53,6 @@ class OpenHands {
return data;
}
static getConversationHeaders(): AxiosHeaders {
const headers = new AxiosHeaders();
const sessionApiKey = this.currentConversation?.session_api_key;
if (sessionApiKey) {
headers.set("X-Session-API-Key", sessionApiKey);
}
return headers;
}
/**
* Send feedback to the server
* @param data Feedback data
@@ -128,26 +86,13 @@ class OpenHands {
* @returns Blob of the workspace zip
*/
static async getWorkspaceZip(conversationId: string): Promise<Blob> {
const url = `${this.getConversationUrl(conversationId)}/zip-directory`;
const url = `/api/conversations/${conversationId}/zip-directory`;
const response = await openHands.get(url, {
responseType: "blob",
headers: this.getConversationHeaders(),
});
return response.data;
}
/**
* Get the web hosts
* @returns Array of web hosts
*/
static async getWebHosts(conversationId: string): Promise<string[]> {
const url = `${this.getConversationUrl(conversationId)}/web-hosts`;
const response = await openHands.get(url, {
headers: this.getConversationHeaders(),
});
return Object.keys(response.data.hosts);
}
/**
* @param code Code provided by GitHub
* @returns GitHub access token
@@ -171,20 +116,18 @@ class OpenHands {
static async getVSCodeUrl(
conversationId: string,
): Promise<GetVSCodeUrlResponse> {
const url = `${this.getConversationUrl(conversationId)}/vscode-url`;
const { data } = await openHands.get<GetVSCodeUrlResponse>(url, {
headers: this.getConversationHeaders(),
});
const { data } = await openHands.get<GetVSCodeUrlResponse>(
`/api/conversations/${conversationId}/vscode-url`,
);
return data;
}
static async getRuntimeId(
conversationId: string,
): Promise<{ runtime_id: string }> {
const url = `${this.getConversationUrl(conversationId)}/config`;
const { data } = await openHands.get<{ runtime_id: string }>(url, {
headers: this.getConversationHeaders(),
});
const { data } = await openHands.get<{ runtime_id: string }>(
`/api/conversations/${conversationId}/config`,
);
return data;
}
@@ -316,10 +259,9 @@ class OpenHands {
static async getTrajectory(
conversationId: string,
): Promise<GetTrajectoryResponse> {
const url = `${this.getConversationUrl(conversationId)}/trajectory`;
const { data } = await openHands.get<GetTrajectoryResponse>(url, {
headers: this.getConversationHeaders(),
});
const { data } = await openHands.get<GetTrajectoryResponse>(
`/api/conversations/${conversationId}/trajectory`,
);
return data;
}
@@ -330,10 +272,9 @@ class OpenHands {
}
static async getGitChanges(conversationId: string): Promise<GitChange[]> {
const url = `${this.getConversationUrl(conversationId)}/git/changes`;
const { data } = await openHands.get<GitChange[]>(url, {
headers: this.getConversationHeaders(),
});
const { data } = await openHands.get<GitChange[]>(
`/api/conversations/${conversationId}/git/changes`,
);
return data;
}
@@ -341,11 +282,12 @@ class OpenHands {
conversationId: string,
path: string,
): Promise<GitChangeDiff> {
const url = `${this.getConversationUrl(conversationId)}/git/diff`;
const { data } = await openHands.get<GitChangeDiff>(url, {
params: { path },
headers: this.getConversationHeaders(),
});
const { data } = await openHands.get<GitChangeDiff>(
`/api/conversations/${conversationId}/git/diff`,
{
params: { path },
},
);
return data;
}
-2
View File
@@ -80,8 +80,6 @@ export interface Conversation {
created_at: string;
status: ProjectStatus;
trigger?: ConversationTrigger;
url: string | null;
session_api_key: string | null;
}
export interface ResultSet<T> {
@@ -136,7 +136,7 @@ export function ChatInterface() {
<div
ref={scrollRef}
onScroll={(e) => onChatBodyScroll(e.currentTarget)}
className="scrollbar scrollbar-thin scrollbar-thumb-gray-400 scrollbar-thumb-rounded-full scrollbar-track-gray-800 hover:scrollbar-thumb-gray-300 flex flex-col grow overflow-y-auto overflow-x-hidden px-4 pt-4 gap-2 fast-smooth-scroll"
className="flex flex-col grow overflow-y-auto overflow-x-hidden px-4 pt-4 gap-2 fast-smooth-scroll"
>
{isLoadingMessages && (
<div className="flex justify-center">
@@ -11,19 +11,18 @@ import {
FinishAction,
} from "#/types/core/actions";
import { getDefaultEventContent, MAX_CONTENT_LENGTH } from "./shared";
import i18n from "#/i18n";
const getRiskText = (risk: ActionSecurityRisk) => {
switch (risk) {
case ActionSecurityRisk.LOW:
return i18n.t("SECURITY$LOW_RISK");
return "Low Risk";
case ActionSecurityRisk.MEDIUM:
return i18n.t("SECURITY$MEDIUM_RISK");
return "Medium Risk";
case ActionSecurityRisk.HIGH:
return i18n.t("SECURITY$HIGH_RISK");
return "High Risk";
case ActionSecurityRisk.UNKNOWN:
default:
return i18n.t("SECURITY$UNKNOWN_RISK");
return "Unknown Risk";
}
};
@@ -82,14 +81,15 @@ const getFinishActionContent = (event: FinishAction): string => {
switch (event.args.task_completed) {
case "success":
content += `\n\n\n${i18n.t("FINISH$TASK_COMPLETED_SUCCESSFULLY")}`;
content +=
"\n\n\nI believe that the task was **completed successfully**.";
break;
case "failure":
content += `\n\n\n${i18n.t("FINISH$TASK_NOT_COMPLETED")}`;
content += "\n\n\nI believe that the task was **not completed**.";
break;
case "partial":
default:
content += `\n\n\n${i18n.t("FINISH$TASK_COMPLETED_PARTIALLY")}`;
content += "\n\n\nI believe that the task was **completed partially**.";
break;
}
@@ -6,7 +6,6 @@ import { MonoComponent } from "../mono-component";
import { PathComponent } from "../path-component";
import { getActionContent } from "./get-action-content";
import { getObservationContent } from "./get-observation-content";
import i18n from "#/i18n";
const hasPathProperty = (
obj: Record<string, unknown>,
@@ -35,7 +34,6 @@ export const getEventContent = (
path: hasPathProperty(event.args) && event.args.path,
command:
hasCommandProperty(event.args) && trimText(event.args.command, 80),
mcp_tool_name: event.action === "call_tool_mcp" && event.args.name,
}}
components={{
path: <PathComponent />,
@@ -55,7 +53,6 @@ export const getEventContent = (
command:
hasCommandProperty(event.extras) &&
trimText(event.extras.command, 80),
mcp_tool_name: event.observation === "mcp" && event.extras.name,
}}
components={{
path: <PathComponent />,
@@ -67,7 +64,7 @@ export const getEventContent = (
}
return {
title: title ?? i18n.t("EVENT$UNKNOWN_EVENT"),
details: details ?? i18n.t("EVENT$UNKNOWN_EVENT"),
title: title ?? "Unknown event",
details: details ?? "Unknown event",
};
};
@@ -9,7 +9,6 @@ import {
} from "#/types/core/observations";
import { getObservationResult } from "./get-observation-result";
import { getDefaultEventContent, MAX_CONTENT_LENGTH } from "./shared";
import i18n from "#/i18n";
const getReadObservationContent = (event: ReadObservation): string =>
`\`\`\`\n${event.content}\n\`\`\``;
@@ -21,7 +20,7 @@ const getCommandObservationContent = (
if (content.length > MAX_CONTENT_LENGTH) {
content = `${content.slice(0, MAX_CONTENT_LENGTH)}...`;
}
return `Output:\n\`\`\`sh\n${content.trim() || i18n.t("OBSERVATION$COMMAND_NO_OUTPUT")}\n\`\`\``;
return `Output:\n\`\`\`sh\n${content.trim() || "[Command finished execution with no output]"}\n\`\`\``;
};
const getEditObservationContent = (
@@ -51,7 +50,7 @@ const getMcpObservationContent = (event: OpenHandsObservation): string => {
if (content.length > MAX_CONTENT_LENGTH) {
content = `${content.slice(0, MAX_CONTENT_LENGTH)}...`;
}
return `**Output:**\n\`\`\`\n${content.trim() || i18n.t("OBSERVATION$MCP_NO_OUTPUT")}\n\`\`\``;
return `**Output:**\n\`\`\`\n${content.trim() || "[MCP Tool finished execution with no output]"}\n\`\`\``;
};
const getRecallObservationContent = (event: RecallObservation): string => {
@@ -1,4 +1,5 @@
import { ConfirmationButtons } from "#/components/shared/buttons/confirmation-buttons";
import { I18nKey } from "#/i18n/declaration";
import { OpenHandsAction } from "#/types/core/actions";
import {
isUserMessage,
@@ -15,6 +16,7 @@ import { ChatMessage } from "./chat-message";
import { ErrorMessage } from "./error-message";
import { getObservationResult } from "./event-content-helpers/get-observation-result";
import { getEventContent } from "./event-content-helpers/get-event-content";
import { ExpandableMessage } from "./expandable-message";
import { GenericEventMessage } from "./generic-event-message";
const hasThoughtProperty = (
@@ -24,6 +26,7 @@ const hasThoughtProperty = (
interface EventMessageProps {
event: OpenHandsAction | OpenHandsObservation;
hasObservationPair: boolean;
isFirstMessageWithResolverTrigger: boolean;
isAwaitingUserConfirmation: boolean;
isLastMessage: boolean;
}
@@ -31,12 +34,32 @@ interface EventMessageProps {
export function EventMessage({
event,
hasObservationPair,
isFirstMessageWithResolverTrigger,
isAwaitingUserConfirmation,
isLastMessage,
}: EventMessageProps) {
const shouldShowConfirmationButtons =
isLastMessage && event.source === "agent" && isAwaitingUserConfirmation;
const isFirstUserMessageWithResolverTrigger =
isFirstMessageWithResolverTrigger && isUserMessage(event);
// Special case: First user message with resolver trigger
if (isFirstUserMessageWithResolverTrigger) {
return (
<div>
<ExpandableMessage
type="action"
message={event.args.content}
id={I18nKey.CHAT$RESOLVER_INSTRUCTIONS}
/>
{event.args.image_urls && event.args.image_urls.length > 0 && (
<ImageCarousel size="small" images={event.args.image_urls} />
)}
</div>
);
}
if (isErrorObservation(event)) {
return (
<ErrorMessage
@@ -1,4 +1,6 @@
import React from "react";
import { useUserConversation } from "#/hooks/query/use-user-conversation";
import { useConversation } from "#/context/conversation-context";
import { OpenHandsAction } from "#/types/core/actions";
import { OpenHandsObservation } from "#/types/core/observations";
import { isOpenHandsAction, isOpenHandsObservation } from "#/types/core/guards";
@@ -36,9 +38,14 @@ interface MessagesProps {
export const Messages: React.FC<MessagesProps> = React.memo(
({ messages, isAwaitingUserConfirmation }) => {
const { getOptimisticUserMessage } = useOptimisticUserMessage();
const { conversationId } = useConversation();
const { data: conversation } = useUserConversation(conversationId || null);
const optimisticUserMessage = getOptimisticUserMessage();
// Check if conversation metadata has trigger=resolver
const isResolverTrigger = conversation?.trigger === "resolver";
const actionHasObservationPair = React.useCallback(
(event: OpenHandsAction | OpenHandsObservation): boolean => {
if (isOpenHandsAction(event)) {
@@ -59,6 +66,7 @@ export const Messages: React.FC<MessagesProps> = React.memo(
key={index}
event={message}
hasObservationPair={actionHasObservationPair(message)}
isFirstMessageWithResolverTrigger={index === 0 && isResolverTrigger}
isAwaitingUserConfirmation={isAwaitingUserConfirmation}
isLastMessage={messages.length - 1 === index}
/>
@@ -16,7 +16,6 @@ import { BaseModal } from "../../shared/modals/base-modal/base-modal";
import { RootState } from "#/store";
import { I18nKey } from "#/i18n/declaration";
import { transformVSCodeUrl } from "#/utils/vscode-url-helper";
import OpenHands from "#/api/open-hands";
import { useWsClient } from "#/context/ws-client-provider";
import { isSystemMessage } from "#/types/core/guards";
@@ -116,7 +115,11 @@ export function ConversationCard({
// Fetch the VS Code URL from the API
if (conversationId) {
try {
const data = await OpenHands.getVSCodeUrl(conversationId);
const response = await fetch(
`/api/conversations/${conversationId}/vscode-url`,
);
const data = await response.json();
if (data.vscode_url) {
const transformedUrl = transformVSCodeUrl(data.vscode_url);
if (transformedUrl) {
@@ -2,12 +2,11 @@ import ColdIcon from "./state-indicators/cold.svg?react";
import RunningIcon from "./state-indicators/running.svg?react";
type SVGIcon = React.FunctionComponent<React.SVGProps<SVGSVGElement>>;
export type ProjectStatus = "RUNNING" | "STOPPED" | "STARTING";
export type ProjectStatus = "RUNNING" | "STOPPED";
const INDICATORS: Record<ProjectStatus, SVGIcon> = {
STOPPED: ColdIcon,
RUNNING: RunningIcon,
STARTING: ColdIcon,
};
interface ConversationStateIndicatorProps {
@@ -40,7 +40,7 @@ export function TaskCard({ task }: TaskCardProps) {
const handleLaunchConversation = () => {
const repo = getRepo(task.repo, task.git_provider);
setOptimisticUserMessage(t("TASK$ADDRESSING_TASK"));
setOptimisticUserMessage("Addressing task...");
return createConversation({
selectedRepository: repo,
@@ -9,7 +9,6 @@ import GitHubLogo from "#/assets/branding/github-logo.svg?react";
import GitLabLogo from "#/assets/branding/gitlab-logo.svg?react";
import { useAuthUrl } from "#/hooks/use-auth-url";
import { GetConfigResponse } from "#/api/open-hands.types";
import { LoginMethod, setLoginMethod } from "#/utils/local-storage";
interface AuthModalProps {
githubAuthUrl: string | null;
@@ -26,11 +25,6 @@ export function AuthModal({ githubAuthUrl, appMode }: AuthModalProps) {
const handleGitHubAuth = () => {
if (githubAuthUrl) {
// Store the login method in local storage (only in SAAS mode)
if (appMode === "saas") {
setLoginMethod(LoginMethod.GITHUB);
// Set the "just logged in" flag to true
}
// Always start the OIDC flow, let the backend handle TOS check
window.location.href = githubAuthUrl;
}
@@ -38,11 +32,6 @@ export function AuthModal({ githubAuthUrl, appMode }: AuthModalProps) {
const handleGitLabAuth = () => {
if (gitlabAuthUrl) {
// Store the login method in local storage (only in SAAS mode)
if (appMode === "saas") {
setLoginMethod(LoginMethod.GITLAB);
// Set the "just logged in" flag to true
}
// Always start the OIDC flow, let the backend handle TOS check
window.location.href = gitlabAuthUrl;
}
@@ -1,23 +0,0 @@
import React from "react";
import { useTranslation } from "react-i18next";
import { ModalBackdrop } from "#/components/shared/modals/modal-backdrop";
import { ModalBody } from "#/components/shared/modals/modal-body";
import { I18nKey } from "#/i18n/declaration";
import AllHandsLogo from "#/assets/branding/all-hands-logo.svg?react";
export function ReauthModal() {
const { t } = useTranslation();
return (
<ModalBackdrop>
<ModalBody className="border border-tertiary">
<AllHandsLogo width={68} height={46} />
<div className="flex flex-col gap-2 w-full items-center text-center">
<h1 className="text-2xl font-bold">
{t(I18nKey.AUTH$LOGGING_BACK_IN)}
</h1>
</div>
</ModalBody>
</ModalBackdrop>
);
}
+3 -18
View File
@@ -16,7 +16,6 @@ import {
} from "#/types/core/actions";
import { Conversation } from "#/api/open-hands.types";
import { useUserProviders } from "#/hooks/use-user-providers";
import { useUserConversation } from "#/hooks/query/use-user-conversation";
import { OpenHandsObservation } from "#/types/core/observations";
import {
isErrorObservation,
@@ -147,7 +146,6 @@ export function WsClientProvider({
const { providers } = useUserProviders();
const messageRateHandler = useRate({ threshold: 250 });
const { data: conversation } = useUserConversation(conversationId);
function send(event: Record<string, unknown>) {
if (!sioRef.current) {
@@ -261,17 +259,9 @@ export function WsClientProvider({
}, [conversationId]);
React.useEffect(() => {
// reset events when conversationId changes
setEvents([]);
setParsedEvents([]);
setStatus(WsClientProviderStatus.DISCONNECTED);
if (!conversationId) {
throw new Error("No conversation ID provided");
}
if (!conversation || conversation.status === "STARTING") {
return () => undefined; // conversation not yet loaded
}
let sio = sioRef.current;
@@ -280,15 +270,10 @@ export function WsClientProvider({
latest_event_id: lastEvent?.id ?? -1,
conversation_id: conversationId,
providers_set: providers,
session_api_key: conversation.session_api_key, // Have to set here because socketio doesn't support custom headers. :(
};
let baseUrl = null;
if (conversation.url && !conversation.url.startsWith("/")) {
baseUrl = new URL(conversation.url).host;
} else {
baseUrl = import.meta.env.VITE_BACKEND_BASE_URL || window?.location.host;
}
const baseUrl =
import.meta.env.VITE_BACKEND_BASE_URL || window?.location.host;
sio = io(baseUrl, {
transports: ["websocket"],
@@ -309,7 +294,7 @@ export function WsClientProvider({
sio.off("connect_failed", handleError);
sio.off("disconnect", handleDisconnect);
};
}, [conversationId, conversation?.url, conversation?.status]);
}, [conversationId]);
React.useEffect(
() => () => {
@@ -3,7 +3,6 @@ import { useNavigate } from "react-router";
import posthog from "posthog-js";
import OpenHands from "#/api/open-hands";
import { useConfig } from "../query/use-config";
import { clearLoginData } from "#/utils/local-storage";
export const useLogout = () => {
const queryClient = useQueryClient();
@@ -18,16 +17,8 @@ export const useLogout = () => {
queryClient.removeQueries({ queryKey: ["user"] });
queryClient.removeQueries({ queryKey: ["secrets"] });
// Clear login method and last page from local storage
if (config?.APP_MODE === "saas") {
clearLoginData();
}
posthog.reset();
await navigate("/");
// Refresh the page after all logout logic is completed
window.location.reload();
},
});
};
+5 -3
View File
@@ -2,7 +2,7 @@ import { useQueries, useQuery } from "@tanstack/react-query";
import axios from "axios";
import React from "react";
import { useSelector } from "react-redux";
import OpenHands from "#/api/open-hands";
import { openHands } from "#/api/open-hands-axios";
import { RUNTIME_INACTIVE_STATES } from "#/types/agent-state";
import { RootState } from "#/store";
import { useConversation } from "#/context/conversation-context";
@@ -16,8 +16,10 @@ export const useActiveHost = () => {
const { data } = useQuery({
queryKey: [conversationId, "hosts"],
queryFn: async () => {
const hosts = await OpenHands.getWebHosts(conversationId);
return { hosts };
const response = await openHands.get<{ hosts: string[] }>(
`/api/conversations/${conversationId}/web-hosts`,
);
return { hosts: Object.keys(response.data.hosts) };
},
enabled: !RUNTIME_INACTIVE_STATES.includes(curAgentState),
initialData: { hosts: [] },

Some files were not shown because too many files have changed in this diff Show More