Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/flatten-delegation-tree-text.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@perstack/tui-components": patch
"perstack": patch
---

Flatten delegation tree node to single Text element with truncate, reorder columns so action is last
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Box, Text } from "ink"
import { Text } from "ink"
import type React from "react"
import { colors } from "../../colors.js"
import { USAGE_INDICATORS } from "../../constants.js"
Expand Down Expand Up @@ -56,35 +56,22 @@ function TreeNodeLine({
const showUsage = node.status !== "completed"

return (
<Box>
<Text>
<Text dimColor>{prefix}</Text>
{indicator}
<Text> </Text>
<Text bold>{node.expertName}</Text>
<Text dimColor>: </Text>
</Text>
<Box flexShrink={1}>
<Text wrap="truncate">
{node.actionLabel}
{node.actionFileArg ? <Text color={colors.muted}> {node.actionFileArg}</Text> : null}
</Text>
</Box>
<Text wrap="truncate">
<Text dimColor>{prefix}</Text>
{indicator}
<Text> </Text>
<Text bold>{node.expertName}</Text>
{node.model ? <Text dimColor> · {node.model}</Text> : null}
{showUsage ? (
<Text>
{node.model ? (
<>
<Text dimColor> · </Text>
<Text dimColor>{node.model}</Text>
</>
) : null}
<Text dimColor> · </Text>
<Text>
{usageIcon} {usagePercent}%
</Text>
{" "}
<Text dimColor>·</Text> {usageIcon} {usagePercent}%
</Text>
) : null}
</Box>
<Text dimColor> · </Text>
{node.actionLabel}
{node.actionFileArg ? <Text color={colors.muted}> {node.actionFileArg}</Text> : null}
</Text>
)
}

Expand Down