We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f982145 commit 25b8bd1Copy full SHA for 25b8bd1
dbgpt/agent/expand/tool_assistant_agent.py
@@ -91,6 +91,8 @@ def _get_tools_by_resource(resource: Optional[Resource]) -> Optional[List[BaseTo
91
tools.append(resource)
92
elif resource.type() == ResourceType.Pack:
93
for sub_res in resource.sub_resources:
94
- tools.extend(_get_tools_by_resource(sub_res))
+ res_list = _get_tools_by_resource(sub_res)
95
+ if res_list is not None and len(res_list) > 0:
96
+ tools.extend(_get_tools_by_resource(sub_res))
97
98
return tools
0 commit comments