Merge branch 'fixbug/read_dir' into 'mgx_ops'

feat: input dir -> input filename

See merge request pub/MetaGPT!337
This commit is contained in:
张雷 2024-08-20 05:41:32 +00:00
commit b3f32279d2
2 changed files with 2 additions and 0 deletions

View file

@ -245,6 +245,7 @@ class WriteDesign(Action):
) -> str:
prd_content = ""
if prd_filename:
prd_filename = rectify_pathname(path=prd_filename, default_filename="prd.json")
prd_content = await aread(filename=prd_filename)
context = "### User Requirements\n{user_requirement}\n### Extra_info\n{extra_info}\n### PRD\n{prd}\n".format(
user_requirement=to_markdown_code_block(user_requirement),

View file

@ -180,6 +180,7 @@ class WriteTasks(Action):
) -> str:
context = to_markdown_code_block(user_requirement)
if design_filename:
design_filename = rectify_pathname(path=design_filename, default_filename="system_design.json")
content = await aread(filename=design_filename)
context += to_markdown_code_block(content)