Skip to content

Commit 9a19844

Browse files
committed
chore: keep the not-found comment attached to the not-found handling
1 parent bd8b180 commit 9a19844

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/google/adk/cli/utils/agent_loader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,6 @@ def _perform_load(self, agent_name: str) -> Union[BaseAgent, App]:
358358
)
359359
return root_agent
360360

361-
# If no root_agent was found by any pattern
362361
# A root_agent was found but had an unusable type: surface that
363362
# diagnosis instead of the generic not-found guidance (#6606).
364363
if self._root_agent_type_mismatches:
@@ -378,6 +377,7 @@ def _perform_load(self, agent_name: str) -> Union[BaseAgent, App]:
378377
f"{details}\n\nExpose a BaseAgent instance named"
379378
f" 'root_agent'.{app_hint}"
380379
)
380+
# If no root_agent was found by any pattern
381381
# Check if user might be in the wrong directory
382382
hint = ""
383383
agents_path = Path(agents_dir)

0 commit comments

Comments
 (0)