diff --git a/.changeset/fix-delegation-tree-truncate.md b/.changeset/fix-delegation-tree-truncate.md new file mode 100644 index 00000000..ee424838 --- /dev/null +++ b/.changeset/fix-delegation-tree-truncate.md @@ -0,0 +1,5 @@ +--- +"@perstack/tui-components": patch +--- + +fix: prevent delegation tree line wrapping by truncating long activity text diff --git a/packages/tui-components/src/execution/components/delegation-tree.tsx b/packages/tui-components/src/execution/components/delegation-tree.tsx index b281f151..00468d9f 100644 --- a/packages/tui-components/src/execution/components/delegation-tree.tsx +++ b/packages/tui-components/src/execution/components/delegation-tree.tsx @@ -1,4 +1,4 @@ -import { Text } from "ink" +import { Box, Text } from "ink" import type React from "react" import { colors } from "../../colors.js" import { USAGE_INDICATORS } from "../../constants.js" @@ -56,16 +56,22 @@ function TreeNodeLine({ const showUsage = node.status !== "completed" return ( - - {prefix} - {indicator} - - {node.expertName} - : - {node.actionLabel} - {node.actionFileArg ? {node.actionFileArg} : null} + + + {prefix} + {indicator} + + {node.expertName} + : + + + + {node.actionLabel} + {node.actionFileArg ? {node.actionFileArg} : null} + + {showUsage ? ( - <> + {node.model ? ( <> ยท @@ -76,9 +82,9 @@ function TreeNodeLine({ {usageIcon} {usagePercent}% - + ) : null} - + ) }