Skip to content

Commit

Permalink
fix(microagent): remove extra unnecessary check (#6012)
Browse files Browse the repository at this point in the history
  • Loading branch information
xingyaoww authored Jan 3, 2025
1 parent 4de6c78 commit 1ddf398
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions openhands/utils/prompt.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,9 @@ def get_system_message(self) -> str:
), f'Expecting at most one repo microagent, but found {len(self.repo_microagents)}: {self.repo_microagents.keys()}'
for microagent in self.repo_microagents.values():
# We assume these are the repo instructions
if len(microagent.triggers) == 0:
if repo_instructions:
repo_instructions += '\n\n'
repo_instructions += microagent.content
if repo_instructions:
repo_instructions += '\n\n'
repo_instructions += microagent.content
return self.system_template.render(repo_instructions=repo_instructions).strip()

def get_example_user_message(self) -> str:
Expand Down

0 comments on commit 1ddf398

Please sign in to comment.