mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-01-31 18:08:05 -05:00
fix: use graph_id from current_agent for exclusion in edit_agent
The agent_id parameter might be a library agent ID, not a graph_id, which could cause incorrect agent exclusion when fetching library agents. Always use the graph_id from the fetched current_agent.
This commit is contained in:
@@ -130,11 +130,11 @@ class EditAgentTool(BaseTool):
|
||||
library_agents = None
|
||||
if user_id:
|
||||
try:
|
||||
exclude_id = current_agent.get("id") or agent_id
|
||||
graph_id = current_agent.get("id")
|
||||
library_agents = await get_all_relevant_agents_for_generation(
|
||||
user_id=user_id,
|
||||
search_query=changes,
|
||||
exclude_graph_id=exclude_id,
|
||||
exclude_graph_id=graph_id,
|
||||
include_marketplace=True,
|
||||
)
|
||||
logger.debug(
|
||||
|
||||
Reference in New Issue
Block a user