f4a82c9的任务收尾
This commit is contained in:
@@ -118,6 +118,8 @@ class BranchManager:
|
||||
- 清空任务原文件 (task.source),保留文件本身
|
||||
- 备份并删除 flow-status.json
|
||||
- 备份并删除 decisions/*.json
|
||||
- 删除 pending-items.json
|
||||
- 删除流程图目录下的所有文件 (.puml, .plantuml, .png)
|
||||
"""
|
||||
# 确保 logs 目录存在
|
||||
self.logs_dir.mkdir(parents=True, exist_ok=True)
|
||||
@@ -175,6 +177,25 @@ class BranchManager:
|
||||
except OSError:
|
||||
pass
|
||||
|
||||
# 6. 删除 pending-items.json
|
||||
pending_items_path = self.aide_dir / "pending-items.json"
|
||||
if pending_items_path.exists():
|
||||
try:
|
||||
pending_items_path.unlink()
|
||||
except OSError:
|
||||
pass
|
||||
|
||||
# 7. 删除流程图目录下的所有文件
|
||||
diagram_path = self.cfg.get_value("flow.diagram_path") or ".aide/diagrams"
|
||||
diagram_dir = self.root / diagram_path
|
||||
if diagram_dir.exists() and diagram_dir.is_dir():
|
||||
for diagram_file in diagram_dir.iterdir():
|
||||
if diagram_file.is_file() and diagram_file.suffix in (".puml", ".plantuml", ".png"):
|
||||
try:
|
||||
diagram_file.unlink()
|
||||
except OSError:
|
||||
pass
|
||||
|
||||
def load_branches(self) -> BranchesData:
|
||||
"""加载分支概况"""
|
||||
if self._data is not None:
|
||||
|
||||
Reference in New Issue
Block a user