mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-07-23 17:01:08 +02:00
get workspace from config
This commit is contained in:
parent
dd6e658950
commit
84555b49fc
10 changed files with 23 additions and 30 deletions
|
|
@ -7,7 +7,6 @@ from typing import Optional
|
|||
from unidiff import PatchSet
|
||||
|
||||
from metagpt.actions.action import Action
|
||||
from metagpt.const import DEFAULT_WORKSPACE_ROOT
|
||||
from metagpt.ext.cr.utils.cleaner import (
|
||||
add_line_num_on_patch,
|
||||
get_code_block_from_patch,
|
||||
|
|
@ -97,7 +96,7 @@ class ModifyCode(Action):
|
|||
output_dir = (
|
||||
Path(output_dir)
|
||||
if output_dir
|
||||
else DEFAULT_WORKSPACE_ROOT / "modify_code" / str(datetime.date.today()) / self.pr
|
||||
else self.config.workspace.path / "modify_code" / str(datetime.date.today()) / self.pr
|
||||
)
|
||||
patch_file = output_dir / f"{patch_target_file_name}.patch"
|
||||
patch_file.parent.mkdir(exist_ok=True, parents=True)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue