mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-06-23 15:48:11 +02:00
1. Added 4 compressed package of code examples
2. Update test_incremental_dev.py and engineer.py
This commit is contained in:
parent
e3cd1a2cc1
commit
40db41cda5
7 changed files with 104 additions and 12 deletions
|
|
@ -117,9 +117,22 @@ class Engineer(Role):
|
|||
action = WriteCodeReview(context=coding_context, llm=self.llm)
|
||||
self._init_action_system_message(action)
|
||||
coding_context = await action.run()
|
||||
|
||||
# Get dependencies
|
||||
if guideline:
|
||||
dependencies = {
|
||||
coding_context.design_doc.root_relative_path,
|
||||
coding_context.task_doc.root_relative_path,
|
||||
"code_guideline.json",
|
||||
}
|
||||
else:
|
||||
dependencies = {
|
||||
coding_context.design_doc.root_relative_path,
|
||||
coding_context.task_doc.root_relative_path,
|
||||
}
|
||||
await src_file_repo.save(
|
||||
coding_context.filename,
|
||||
dependencies={coding_context.design_doc.root_relative_path, coding_context.task_doc.root_relative_path},
|
||||
dependencies=dependencies,
|
||||
content=coding_context.code_doc.content,
|
||||
)
|
||||
msg = Message(
|
||||
|
|
@ -347,6 +360,10 @@ class Engineer(Role):
|
|||
context = CODE_GUIDELINE_CONTEXT.format(requirement=requirement, tasks=tasks, design=design, code=old_codes)
|
||||
node = await WriteCodeGuideline().run(context=context)
|
||||
guideline = node.instruct_content.model_dump_json()
|
||||
|
||||
await CONFIG.git_repo.new_file_repository(CONFIG.git_repo.workdir).save(
|
||||
filename="code_guideline.json", content=guideline
|
||||
)
|
||||
return guideline
|
||||
|
||||
@staticmethod
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue