Skip to content

Commit 9db4f8e

Browse files
committed
fix bugs with small repos
1 parent 26211c0 commit 9db4f8e

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/documentation_generator.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def build_overview_structure(self, module_tree: Dict[str, Any], module_path: Lis
119119

120120
return processed_module_tree
121121

122-
async def generate_module_documentation(self, components: Dict[str, Any]) -> str:
122+
async def generate_module_documentation(self, components: Dict[str, Any], leaf_nodes: List[str]) -> str:
123123
"""Generate documentation for all modules using dynamic programming approach."""
124124
# Prepare output directory
125125
working_dir = os.path.abspath(self.config.docs_dir)
@@ -180,7 +180,7 @@ async def generate_module_documentation(self, components: Dict[str, Any]) -> str
180180
logger.info(f"Processing whole repo because repo can fit in the context window")
181181
repo_name = os.path.basename(os.path.normpath(self.config.repo_path))
182182
final_module_tree = await self.agent_orchestrator.process_module(
183-
repo_name, components, list(components.keys()), [], working_dir
183+
repo_name, components, leaf_nodes, [], working_dir
184184
)
185185

186186
# rename repo_name.md to overview.md
@@ -258,7 +258,7 @@ async def run(self) -> None:
258258

259259
# Generate module documentation using dynamic programming approach
260260
# This processes leaf modules first, then parent modules
261-
working_dir = await self.generate_module_documentation(components)
261+
working_dir = await self.generate_module_documentation(components, leaf_nodes)
262262

263263
# Create documentation metadata
264264
self.create_documentation_metadata(working_dir, components, len(leaf_nodes))

0 commit comments

Comments
 (0)