Add CLIRuntime implementation for local command execution (#8264)

Co-authored-by: openhands <openhands@all-hands.dev>
Co-authored-by: Engel Nyst <enyst@users.noreply.github.com>
Co-authored-by: Engel Nyst <engel.nyst@gmail.com>
This commit is contained in:
Robert Brennan
2025-05-22 23:03:22 -04:00
committed by GitHub
parent f7cdf4720f
commit 50d4c79094
39 changed files with 1564 additions and 138 deletions

View File

@@ -121,7 +121,9 @@ class ServiceContextPR(ServiceContext):
) -> tuple[str, str, list[str]]:
"""Generate instruction for the agent."""
user_instruction_template = jinja2.Template(user_instructions_prompt_template)
conversation_instructions_template = jinja2.Template(conversation_instructions_prompt_template)
conversation_instructions_template = jinja2.Template(
conversation_instructions_prompt_template
)
images = []
issues_str = None
@@ -159,12 +161,11 @@ class ServiceContextPR(ServiceContext):
review_comments=review_comments_str,
review_threads=review_thread_str,
files=review_thread_file_str,
thread_context=thread_context
thread_context=thread_context,
)
conversation_instructions = conversation_instructions_template.render(
issues=issues_str,
repo_instruction=repo_instruction
issues=issues_str, repo_instruction=repo_instruction
)
return user_instruction, conversation_instructions, images
@@ -354,10 +355,12 @@ class ServiceContextIssue(ServiceContext):
user_instructions_template = jinja2.Template(user_instructions_prompt_template)
user_instructions = user_instructions_template.render(
body=issue.title + '\n\n' + issue.body + thread_context
) # Issue body and comments
body=issue.title + '\n\n' + issue.body + thread_context
) # Issue body and comments
conversation_instructions_template = jinja2.Template(conversation_instructions_prompt_template)
conversation_instructions_template = jinja2.Template(
conversation_instructions_prompt_template
)
conversation_instructions = conversation_instructions_template.render(
repo_instruction=repo_instruction,
)