-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: openhands <[email protected]> Co-authored-by: Engel Nyst <[email protected]>
- Loading branch information
1 parent
ce82545
commit 478b225
Showing
23 changed files
with
661 additions
and
145 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,9 +66,6 @@ class ActionRequest(BaseModel): | |
|
||
|
||
ROOT_GID = 0 | ||
INIT_COMMANDS = [ | ||
'git config --global user.name "openhands" && git config --global user.email "[email protected]" && alias git="git --no-pager"', | ||
] | ||
|
||
SESSION_API_KEY = os.environ.get('SESSION_API_KEY') | ||
api_key_header = APIKeyHeader(name='X-Session-API-Key', auto_error=False) | ||
|
@@ -163,6 +160,11 @@ async def _init_plugin(self, plugin: Plugin): | |
) | ||
|
||
async def _init_bash_commands(self): | ||
INIT_COMMANDS = [ | ||
'git config --file ./.git_config user.name "openhands" && git config --file ./.git_config user.email "[email protected]" && alias git="git --no-pager" && export GIT_CONFIG=$(pwd)/.git_config' | ||
if os.environ.get('LOCAL_RUNTIME_MODE') == '1' | ||
else 'git config --global user.name "openhands" && git config --global user.email "[email protected]" && alias git="git --no-pager"' | ||
] | ||
logger.debug(f'Initializing by running {len(INIT_COMMANDS)} bash commands...') | ||
for command in INIT_COMMANDS: | ||
action = CmdRunAction(command=command) | ||
|
@@ -174,7 +176,6 @@ async def _init_bash_commands(self): | |
f'Init command outputs (exit code: {obs.exit_code}): {obs.content}' | ||
) | ||
assert obs.exit_code == 0 | ||
|
||
logger.debug('Bash init commands completed') | ||
|
||
async def run_action(self, action) -> Observation: | ||
|
Oops, something went wrong.