@@ -211,32 +211,33 @@ export function CommandToolView({
211
211
) }
212
212
</ div >
213
213
< div className = "p-4 max-h-96 overflow-auto scrollbar-hide" >
214
- < pre className = "text-xs text-zinc-600 dark:text-zinc-300 font-mono whitespace-pre-wrap break-all overflow-visible" >
215
- { /* Show command only */ }
214
+ { /* Command line */ }
215
+ < div className = "py-0.5 bg-transparent font-mono text-xs" >
216
216
{ command && (
217
- < div className = "py-0.5 bg-transparent" >
217
+ < >
218
218
< span className = "text-green-500 dark:text-green-400 font-semibold" > { displayPrefix } </ span >
219
219
< span className = "text-zinc-700 dark:text-zinc-300" > { command } </ span >
220
- </ div >
221
- ) }
222
-
223
- { /* Show output only if there's actual command output */ }
224
- { hasActualOutput && formattedOutput . length > 0 && (
225
- < >
226
- { formattedOutput . map ( ( line , index ) => (
227
- < div key = { index } className = "py-0.5 bg-transparent" >
228
- < span className = "text-zinc-600 dark:text-zinc-300" > { line } </ span >
229
- </ div >
230
- ) ) }
231
220
</ >
232
221
) }
222
+ </ div >
233
223
234
- { ! showFullOutput && hasMoreLines && (
235
- < div className = "text-zinc-500 mt-2 border-t border-zinc-700/30 pt-2" >
236
- + { formattedOutput . length - 10 } more lines
237
- </ div >
238
- ) }
239
- </ pre >
224
+ { /* Terminal output (render as real terminal text, not JSON) */ }
225
+ { formattedOutput . length > 0 && (
226
+ < pre className = "mt-2 text-xs text-zinc-600 dark:text-zinc-300 font-mono whitespace-pre-wrap break-words" >
227
+ { linesToShow . map ( ( line , idx ) => (
228
+ < span key = { idx } >
229
+ { line }
230
+ { '\n' }
231
+ </ span >
232
+ ) ) }
233
+ </ pre >
234
+ ) }
235
+
236
+ { ! showFullOutput && hasMoreLines && (
237
+ < div className = "text-zinc-500 mt-2 border-t border-zinc-700/30 pt-2 text-xs font-mono" >
238
+ + { formattedOutput . length - 10 } more lines
239
+ </ div >
240
+ ) }
240
241
</ div >
241
242
</ div >
242
243
</ div >
@@ -301,4 +302,4 @@ export function CommandToolView({
301
302
</ div >
302
303
</ Card >
303
304
) ;
304
- }
305
+ }
0 commit comments