fix(aggregate): Handle string path in _build_files_section_from_items

This commit is contained in:
2026-05-06 21:11:10 -04:00
parent 80afa4894b
commit bd37aa731b
+2 -1
View File
@@ -194,7 +194,8 @@ def _build_files_section_from_items(file_items: list[dict[str, Any]]) -> str:
if path is None:
sections.append(f"### `{entry}`\n\n```text\n{content}\n```")
else:
suffix = path.suffix.lstrip(".") if path.suffix else "text"
path_obj = Path(path) if isinstance(path, str) else path
suffix = path_obj.suffix.lstrip(".") if path_obj.suffix else "text"
original = entry if "*" not in entry else str(path)
sections.append(f"### `{original}`\n\n```{suffix}\n{content}\n```")
return "\n\n---\n\n".join(sections)