mirror of
https://github.com/aljazceru/goose.git
synced 2025-12-26 18:44:36 +01:00
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:
|
||||
"""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]:
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
from tempfile import TemporaryDirectory
|
||||
from unittest.mock import MagicMock, Mock
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user