mirror of
https://github.com/OpenHands/OpenHands.git
synced 2026-03-22 13:47:19 +08:00
Feat: Add current working directory to LLM instructions (#9718)
This commit is contained in:
@@ -154,6 +154,7 @@ class AgentSession:
|
||||
repo_directory=repo_directory,
|
||||
conversation_instructions=conversation_instructions,
|
||||
custom_secrets_descriptions=custom_secrets_handler.get_custom_secrets_descriptions(),
|
||||
working_dir=config.workspace_mount_path_in_sandbox,
|
||||
)
|
||||
|
||||
# NOTE: this needs to happen before controller is created
|
||||
@@ -464,6 +465,7 @@ class AgentSession:
|
||||
repo_directory: str | None,
|
||||
conversation_instructions: str | None,
|
||||
custom_secrets_descriptions: dict[str, str],
|
||||
working_dir: str,
|
||||
) -> Memory:
|
||||
memory = Memory(
|
||||
event_stream=self.event_stream,
|
||||
@@ -473,7 +475,9 @@ class AgentSession:
|
||||
|
||||
if self.runtime:
|
||||
# sets available hosts and other runtime info
|
||||
memory.set_runtime_info(self.runtime, custom_secrets_descriptions)
|
||||
memory.set_runtime_info(
|
||||
self.runtime, custom_secrets_descriptions, working_dir
|
||||
)
|
||||
memory.set_conversation_instructions(conversation_instructions)
|
||||
|
||||
# loads microagents from repo/.openhands/microagents
|
||||
|
||||
Reference in New Issue
Block a user