mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-07-02 16:01:04 +02:00
use context instead of FileRepo... done main process.
This commit is contained in:
parent
3cd881de56
commit
57581bbb36
3 changed files with 6 additions and 4 deletions
|
|
@ -137,11 +137,13 @@ class WriteCode(Action):
|
|||
coding_context.code_doc.content = code
|
||||
return coding_context
|
||||
|
||||
async def get_codes(self, task_doc, exclude, git_repo, src_workspace) -> str:
|
||||
@staticmethod
|
||||
async def get_codes(task_doc, exclude, git_repo, src_workspace) -> str:
|
||||
if not task_doc:
|
||||
return ""
|
||||
if not task_doc.content:
|
||||
task_doc.content = self.file_repo.get_file(filename=task_doc.filename, relative_path=TASK_FILE_REPO)
|
||||
file_repo = git_repo.new_file_repository()
|
||||
task_doc.content = file_repo.get_file(filename=task_doc.filename, relative_path=TASK_FILE_REPO)
|
||||
m = json.loads(task_doc.content)
|
||||
code_filenames = m.get("Task list", [])
|
||||
codes = []
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue