Skip to content

Commit 330d0df

Browse files
committed
cli: Fix condition hook use
1 parent a2cdc79 commit 330d0df

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

cli/src/components/message-with-agents.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@ const AgentChildrenGrid = memo(
4949
[depth],
5050
)
5151

52+
const subGroups = useMemo(
53+
() => splitByAgentSize(agentChildren, (m) => m.agent?.agentType ?? ''),
54+
[agentChildren],
55+
)
56+
5257
if (agentChildren.length === 0) return null
5358

5459
if (depth >= MAX_AGENT_DEPTH) {
@@ -70,11 +75,6 @@ const AgentChildrenGrid = memo(
7075
<text fg={theme?.error}>Error rendering agent children</text>
7176
)
7277

73-
const subGroups = useMemo(
74-
() => splitByAgentSize(agentChildren, (m) => m.agent?.agentType ?? ''),
75-
[agentChildren],
76-
)
77-
7878
return (
7979
<ErrorBoundary fallback={errorFallback} componentName="AgentChildrenGrid">
8080
<box style={{ flexDirection: 'column', gap: 0, width: '100%' }}>

0 commit comments

Comments
 (0)