Normalize data agent records output path

This commit is contained in:
武阳
2026-05-08 10:40:06 +08:00
parent 9e94648ae6
commit d2712fdb67
6 changed files with 93 additions and 21 deletions
+3
View File
@@ -549,6 +549,9 @@ def _dedupe_output_path(root: str, output_path: str, plan_id: str) -> str:
from pathlib import Path
path = Path(output_path)
# 会话 output 下的标准 records 文件名需要保持稳定;导出工具默认允许覆盖。
if path.name in {'records.jsonl', 'records.json'} and 'output' in path.parts:
return output_path
resolved = path if path.is_absolute() else Path(root).resolve() / path
if not resolved.exists():
return output_path