feat: merge geekan:dev

This commit is contained in:
莘权 马 2024-01-11 17:09:01 +08:00
commit cbad5170ac
25 changed files with 83 additions and 630 deletions

View file

@ -162,6 +162,7 @@ class Engineer(Role):
if not is_pass:
todo.i_context.reason = reason
tasks.append(todo.i_context.dict())
await self.project_repo.docs.code_summary.save(
filename=Path(todo.i_context.design_filename).name,
content=todo.i_context.model_dump_json(),

View file

@ -62,7 +62,9 @@ class QaEngineer(Role):
logger.info(f"Writing {test_doc.filename}..")
context = TestingContext(filename=test_doc.filename, test_doc=test_doc, code_doc=code_doc)
context = await WriteTest(i_context=context, context=self.context, llm=self.llm).run()
await self.project_repo.tests.save_doc(doc=test_doc, dependencies={context.code_doc.root_relative_path})
await self.project_repo.tests.save_doc(
doc=context.test_doc, dependencies={context.code_doc.root_relative_path}
)
# prepare context for run tests in next round
run_code_context = RunCodeContext(