Skip to content

Commit d85aa68

Browse files
committed
fix(code): truncate text properly in tool call output
1 parent edb64d2 commit d85aa68

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

apps/code/src/renderer/features/sessions/components/session-update/ExecuteToolView.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export function ExecuteToolView({
5555
className={`group py-0.5 ${isExpandable ? "cursor-pointer" : ""}`}
5656
onClick={handleClick}
5757
>
58-
<Flex gap="2">
58+
<Flex gap="2" className="min-w-0">
5959
<Box className="shrink-0 pt-px">
6060
<ExpandableIcon
6161
icon={Terminal}
@@ -64,10 +64,10 @@ export function ExecuteToolView({
6464
isExpanded={isExpanded}
6565
/>
6666
</Box>
67-
<Flex align="center" gap="2" wrap="wrap">
67+
<Flex align="center" gap="2" wrap="wrap" className="min-w-0">
6868
{description && <ToolTitle>{description}</ToolTitle>}
6969
{command && (
70-
<ToolTitle className="truncate">
70+
<ToolTitle className="min-w-0 truncate">
7171
<span className="font-mono text-accent-11" title={command}>
7272
{truncateText(compactHomePath(command), MAX_COMMAND_LENGTH)}
7373
</span>

apps/code/src/renderer/features/sessions/components/session-update/FetchToolView.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export function FetchToolView({
4646
<Flex
4747
align="center"
4848
gap="2"
49-
className={`group py-0.5 ${isExpandable ? "cursor-pointer" : ""}`}
49+
className={`group min-w-0 py-0.5 ${isExpandable ? "cursor-pointer" : ""}`}
5050
onClick={handleClick}
5151
>
5252
<ExpandableIcon

apps/code/src/renderer/features/sessions/components/session-update/ReadToolView.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export function ReadToolView({
4343
<Flex
4444
align="center"
4545
gap="2"
46-
className={`group py-0.5 ${isExpandable ? "cursor-pointer" : ""}`}
46+
className={`group min-w-0 py-0.5 ${isExpandable ? "cursor-pointer" : ""}`}
4747
onClick={handleClick}
4848
>
4949
<ExpandableIcon

apps/code/src/renderer/features/sessions/components/session-update/SearchToolView.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export function SearchToolView({
5454
<Flex
5555
align="center"
5656
gap="2"
57-
className="group cursor-pointer py-0.5"
57+
className="group min-w-0 cursor-pointer py-0.5"
5858
onClick={handleClick}
5959
>
6060
<ExpandableIcon
@@ -63,7 +63,7 @@ export function SearchToolView({
6363
isExpandable
6464
isExpanded={isExpanded}
6565
/>
66-
<ToolTitle className="truncate">
66+
<ToolTitle className="min-w-0 truncate">
6767
<span className="font-mono">{title || "Search"}</span>
6868
</ToolTitle>
6969
<ToolTitle className="shrink-0 whitespace-nowrap">

apps/code/src/renderer/features/sessions/components/session-update/ToolCallView.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ export function ToolCallView({
9898
className={`group py-0.5 ${isExpandable ? "cursor-pointer" : ""}`}
9999
onClick={handleClick}
100100
>
101-
<Flex gap="2">
101+
<Flex gap="2" className="min-w-0">
102102
<Box className="shrink-0 pt-px">
103103
<ExpandableIcon
104104
icon={KindIcon}

apps/code/src/renderer/features/sessions/components/session-update/ToolRow.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export function ToolRow({
1919
children,
2020
}: ToolRowProps) {
2121
return (
22-
<Flex align="center" gap="2" className="py-0.5">
22+
<Flex align="center" gap="2" className="min-w-0 py-0.5">
2323
<LoadingIcon icon={icon} isLoading={isLoading} />
2424
<ToolTitle>{children}</ToolTitle>
2525
<StatusIndicators isFailed={isFailed} wasCancelled={wasCancelled} />

0 commit comments

Comments
 (0)