From bd37aa731bd556b9e276d5f69a0729d69346413d Mon Sep 17 00:00:00 2001 From: Ed_ Date: Wed, 6 May 2026 21:11:10 -0400 Subject: [PATCH] fix(aggregate): Handle string path in _build_files_section_from_items --- src/aggregate.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/aggregate.py b/src/aggregate.py index 8bb5e08..4107fbb 100644 --- a/src/aggregate.py +++ b/src/aggregate.py @@ -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)