fix(aggregate): Handle string path in _build_files_section_from_items
This commit is contained in:
+2
-1
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user