File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
internal/tui/components/tool Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -115,8 +115,11 @@ func (mv *toolModel) Render(width int) string {
115
115
// Add tool result content if available (for completed tools with content)
116
116
var resultContent string
117
117
if (msg .ToolStatus == types .ToolStatusCompleted || msg .ToolStatus == types .ToolStatusError ) && msg .Content != "" {
118
+ style := styles .ToolCallResultStyle
119
+
118
120
// Calculate available width for content (accounting for padding)
119
- availableWidth := max (width - 2 , 10 ) // Minimum readable width
121
+ padding := style .Padding ().GetHorizontalPadding ()
122
+ availableWidth := max (width - 2 - padding , 10 ) // Minimum readable width
120
123
121
124
// Wrap long lines to fit the component width
122
125
lines := wrapLines (msg .Content , availableWidth )
@@ -125,13 +128,13 @@ func (mv *toolModel) Render(width int) string {
125
128
if len (lines ) > 10 {
126
129
lines = lines [:10 ]
127
130
// Add indicator that content was truncated
128
- lines = append (lines , "... (output truncated)" )
131
+ lines = append (lines , wrapLines ( "... (output truncated)" , availableWidth ) ... )
129
132
}
130
133
131
134
// Join the lines back and apply muted style
132
135
trimmedContent := strings .Join (lines , "\n " )
133
136
if trimmedContent != "" {
134
- resultContent = "\n " + styles . ToolCallResultStyle .Render (trimmedContent )
137
+ resultContent = "\n " + style .Render (trimmedContent )
135
138
}
136
139
}
137
140
You can’t perform that action at this time.
0 commit comments