mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-01-30 17:38:17 -05:00
fix: correct AgentExecutorBlock handle IDs to match link sink_names
- CustomNode: Use inputs_#_<field> format for AGENT block handles to match standard dictionary input pattern and link sink_names - core.py: Wrap UUID lookup in try/except for graceful degradation
This commit is contained in:
@@ -336,7 +336,14 @@ async def get_all_relevant_agents_for_generation(
|
||||
for graph_id in mentioned_uuids:
|
||||
if graph_id == exclude_graph_id:
|
||||
continue
|
||||
agent = await get_library_agent_by_graph_id(user_id, graph_id)
|
||||
try:
|
||||
agent = await get_library_agent_by_graph_id(user_id, graph_id)
|
||||
except Exception as e:
|
||||
logger.warning(
|
||||
f"Failed to fetch explicitly mentioned agent {graph_id}: {e}",
|
||||
exc_info=True,
|
||||
)
|
||||
continue
|
||||
agent_graph_id = agent.get("graph_id") if agent else None
|
||||
if agent and agent_graph_id and agent_graph_id not in seen_graph_ids:
|
||||
agents.append(agent)
|
||||
|
||||
@@ -528,6 +528,10 @@ export const CustomNode = React.memo(
|
||||
const getInputPropKey = (key: string) =>
|
||||
nodeType == BlockUIType.AGENT ? `inputs.${key}` : key;
|
||||
|
||||
// For AGENT blocks, handle IDs need the inputs_#_ prefix to match link sink_names
|
||||
const getHandleKey = (key: string) =>
|
||||
nodeType == BlockUIType.AGENT ? `inputs_#_${key}` : key;
|
||||
|
||||
return keys.map(([propKey, propSchema]) => {
|
||||
const isRequired = data.inputSchema.required?.includes(propKey);
|
||||
const isAdvanced = propSchema.advanced;
|
||||
@@ -544,7 +548,8 @@ export const CustomNode = React.memo(
|
||||
!propKey.endsWith("_credentials") &&
|
||||
// For OUTPUT blocks, only show the 'value' (hides 'name') input connection handle
|
||||
!(nodeType == BlockUIType.OUTPUT && propKey == "name");
|
||||
const isConnected = isInputHandleConnected(propKey);
|
||||
const handleKey = getHandleKey(propKey);
|
||||
const isConnected = isInputHandleConnected(handleKey);
|
||||
|
||||
return (
|
||||
!isHidden &&
|
||||
@@ -562,12 +567,12 @@ export const CustomNode = React.memo(
|
||||
propSchema.discriminator
|
||||
) ? (
|
||||
<NodeHandle
|
||||
keyName={propKey}
|
||||
keyName={handleKey}
|
||||
isConnected={isConnected}
|
||||
isRequired={isRequired}
|
||||
schema={propSchema}
|
||||
side="left"
|
||||
isBroken={isInputHandleBroken(propKey)}
|
||||
isBroken={isInputHandleBroken(handleKey)}
|
||||
/>
|
||||
) : (
|
||||
propKey !== "credentials" &&
|
||||
|
||||
Reference in New Issue
Block a user