adding in ability to provide per repo hints (#32)
* adding in ability to provide per repo hints * tidy up test
This commit is contained in:
@@ -34,7 +34,12 @@ class Developer(Toolkit):
|
|||||||
|
|
||||||
def system(self) -> str:
|
def system(self) -> str:
|
||||||
"""Retrieve system configuration details for developer"""
|
"""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
|
@tool
|
||||||
def update_plan(self, tasks: List[dict]) -> List[dict]:
|
def update_plan(self, tasks: List[dict]) -> List[dict]:
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
|
|
||||||
from tempfile import TemporaryDirectory
|
from tempfile import TemporaryDirectory
|
||||||
from unittest.mock import MagicMock, Mock
|
from unittest.mock import MagicMock, Mock
|
||||||
|
|
||||||
@@ -66,3 +68,5 @@ def test_write_file(temp_dir, developer_toolkit):
|
|||||||
content = "Hello World"
|
content = "Hello World"
|
||||||
developer_toolkit.write_file(test_file.as_posix(), content)
|
developer_toolkit.write_file(test_file.as_posix(), content)
|
||||||
assert test_file.read_text() == content
|
assert test_file.read_text() == content
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user