Skip to content

Commit

Permalink
Merge pull request #1068 from Pythagora-io/fixes_2
Browse files Browse the repository at this point in the history
Fixes 2
  • Loading branch information
LeonOstrez authored Jul 29, 2024
2 parents 4b4fa08 + b0e6ea7 commit 969e652
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion core/agents/task_reviewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ async def review_code_changes(self) -> AgentResponse:
)
llm_response: str = await llm(convo, temperature=0.7)

if "done" in llm_response.strip().lower()[-7:]:
if "done" in llm_response.strip().lower()[-20:]:
return AgentResponse.done(self)
else:
return AgentResponse.task_review_feedback(self, llm_response)
12 changes: 7 additions & 5 deletions core/templates/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,24 @@

from core.log import get_logger

from .javascript_react import JavascriptReactProjectTemplate
from .node_express_mongoose import NodeExpressMongooseProjectTemplate
from .react_express import ReactExpressProjectTemplate

# from .react_express import ReactExpressProjectTemplate

log = get_logger(__name__)


class ProjectTemplateEnum(str, Enum):
"""Choices of available project templates."""

# JAVASCRIPT_REACT = JavascriptReactProjectTemplate.name
JAVASCRIPT_REACT = JavascriptReactProjectTemplate.name
NODE_EXPRESS_MONGOOSE = NodeExpressMongooseProjectTemplate.name
REACT_EXPRESS = ReactExpressProjectTemplate.name
# REACT_EXPRESS = ReactExpressProjectTemplate.name


PROJECT_TEMPLATES = {
# JavascriptReactProjectTemplate.name: JavascriptReactProjectTemplate,
JavascriptReactProjectTemplate.name: JavascriptReactProjectTemplate,
NodeExpressMongooseProjectTemplate.name: NodeExpressMongooseProjectTemplate,
ReactExpressProjectTemplate.name: ReactExpressProjectTemplate,
# ReactExpressProjectTemplate.name: ReactExpressProjectTemplate,
}
2 changes: 2 additions & 0 deletions tests/templates/test_templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from core.templates.registry import PROJECT_TEMPLATES


@pytest.mark.skip
@pytest.mark.asyncio
@patch("core.state.state_manager.get_config")
async def test_render_react_express_sql(mock_get_config, testmanager):
Expand All @@ -30,6 +31,7 @@ async def test_render_react_express_sql(mock_get_config, testmanager):
assert "api/models/user.js" not in files


@pytest.mark.skip
@pytest.mark.asyncio
@patch("core.state.state_manager.get_config")
async def test_render_react_express_nosql(mock_get_config, testmanager):
Expand Down

0 comments on commit 969e652

Please sign in to comment.