fix: subagent display spacing and extra newline (#494)

Co-authored-by: Letta <noreply@letta.com>
This commit is contained in:
Charles Packer
2026-01-07 23:46:30 -08:00
committed by GitHub
parent c023e4001d
commit 49225d0a80
2 changed files with 10 additions and 26 deletions

View File

@@ -64,7 +64,7 @@ interface AgentRowProps {
const AgentRow = memo(({ agent, isLast, expanded }: AgentRowProps) => {
const { treeChar, continueChar } = getTreeChars(isLast);
const columns = useTerminalWidth();
const gutterWidth = 6; // tree char (1) + " ⎿ " (5)
const gutterWidth = 7; // continueChar (3) + " ⎿ " (4)
const contentWidth = Math.max(0, columns - gutterWidth);
const getDotElement = () => {
@@ -105,17 +105,9 @@ const AgentRow = memo(({ agent, isLast, expanded }: AgentRowProps) => {
{/* Subagent URL */}
{agent.agentURL && (
<Box flexDirection="row">
<Box width={gutterWidth} flexShrink={0}>
<Text>
<Text color={colors.subagent.treeChar}>{continueChar}</Text>
<Text dimColor>{" ⎿ "}</Text>
</Text>
</Box>
<Box flexGrow={1} width={contentWidth}>
<Text wrap="wrap" dimColor>
Subagent: {agent.agentURL}
</Text>
</Box>
<Text color={colors.subagent.treeChar}>{continueChar}</Text>
<Text dimColor>{" ⎿ Subagent: "}</Text>
<Text dimColor>{agent.agentURL}</Text>
</Box>
)}
@@ -198,7 +190,7 @@ const GroupHeader = memo(
return (
<Box flexDirection="row">
{allCompleted ? (
<Text color={dotColor}></Text>
<Text color={dotColor}></Text>
) : (
<BlinkDot color={colors.subagent.header} />
)}

View File

@@ -51,7 +51,7 @@ interface AgentRowProps {
const AgentRow = memo(({ agent, isLast }: AgentRowProps) => {
const { treeChar, continueChar } = getTreeChars(isLast);
const columns = useTerminalWidth();
const gutterWidth = 6; // tree char (1) + " ⎿ " (5)
const gutterWidth = 7; // continueChar (3) + " ⎿ " (4)
const contentWidth = Math.max(0, columns - gutterWidth);
const dotColor =
@@ -76,17 +76,9 @@ const AgentRow = memo(({ agent, isLast }: AgentRowProps) => {
{/* Subagent URL */}
{agent.agentURL && (
<Box flexDirection="row">
<Box width={gutterWidth} flexShrink={0}>
<Text>
<Text color={colors.subagent.treeChar}>{continueChar}</Text>
<Text dimColor>{" ⎿ "}</Text>
</Text>
</Box>
<Box flexGrow={1} width={contentWidth}>
<Text wrap="wrap" dimColor>
Subagent: {agent.agentURL}
</Text>
</Box>
<Text color={colors.subagent.treeChar}>{continueChar}</Text>
<Text dimColor>{" ⎿ Subagent: "}</Text>
<Text dimColor>{agent.agentURL}</Text>
</Box>
)}
@@ -141,7 +133,7 @@ export const SubagentGroupStatic = memo(
<Box flexDirection="column">
{/* Header */}
<Box flexDirection="row">
<Text color={dotColor}></Text>
<Text color={dotColor}></Text>
<Text color={colors.subagent.header}> {statusText}</Text>
</Box>