Skip to content

Commit

Permalink
Merge branch 'main' into lifei/refactor-distinguish-private-public-fu…
Browse files Browse the repository at this point in the history
…nctions

* main:
  adding in ability to provide per repo hints (#32)
  • Loading branch information
lifeizhou-ap committed Sep 4, 2024
2 parents 11e6a34 + 13db515 commit 2e1d9e5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/goose/_internal/toolkit/developer/developer.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,12 @@ class Developer(Toolkit):

def system(self) -> str:
"""Retrieve system configuration details for developer"""
return Message.load("prompts/developer.jinja").text
hints_path = Path('.goosehints')
system_prompt = Message.load("prompts/developer.jinja").text
if hints_path.is_file():
goosehints = hints_path.read_text()
system_prompt = f"{system_prompt}\n\nHints:\n{goosehints}"
return system_prompt

@tool
def update_plan(self, tasks: List[dict]) -> List[dict]:
Expand Down
4 changes: 4 additions & 0 deletions tests/_internal/toolkit/developer/test_developer.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
from pathlib import Path


from tempfile import TemporaryDirectory
from unittest.mock import MagicMock, Mock

Expand Down Expand Up @@ -66,3 +68,5 @@ def test_write_file(temp_dir, developer_toolkit):
content = "Hello World"
developer_toolkit.write_file(test_file.as_posix(), content)
assert test_file.read_text() == content


0 comments on commit 2e1d9e5

Please sign in to comment.