Show placeholder for commands with no output (#4509)
## Summary - show a dim “(no output)” placeholder when an executed command produces no stdout or stderr so empty runs are visible - update TUI snapshots to include the new placeholder in history renderings ## Testing - cargo test -p codex-tui ------ https://chatgpt.com/codex/tasks/task_i_68dc056c1d5883218fe8d9929e9b1657
This commit is contained in:
@@ -3,3 +3,4 @@ source: tui/src/chatwidget/tests.rs
|
||||
expression: exec_blob
|
||||
---
|
||||
• Ran sleep 1
|
||||
└ (no output)
|
||||
|
||||
@@ -366,6 +366,14 @@ impl ExecCell {
|
||||
include_prefix: false,
|
||||
},
|
||||
);
|
||||
|
||||
if raw_output_lines.is_empty() {
|
||||
lines.extend(prefix_lines(
|
||||
vec![Line::from("(no output)".dim())],
|
||||
Span::from(layout.output_block.initial_prefix).dim(),
|
||||
Span::from(layout.output_block.subsequent_prefix),
|
||||
));
|
||||
} else {
|
||||
let trimmed_output =
|
||||
Self::truncate_lines_middle(&raw_output_lines, layout.output_max_lines);
|
||||
|
||||
@@ -388,6 +396,7 @@ impl ExecCell {
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
lines
|
||||
}
|
||||
|
||||
@@ -6,3 +6,4 @@ expression: rendered
|
||||
│ ough_to_wrap
|
||||
│ second_token_is_also_lon
|
||||
│ … +1 lines
|
||||
└ (no output)
|
||||
|
||||
@@ -4,3 +4,4 @@ expression: rendered
|
||||
---
|
||||
• Ran echo one
|
||||
│ echo two
|
||||
└ (no output)
|
||||
|
||||
@@ -5,3 +5,4 @@ expression: rendered
|
||||
• Ran set -o pipefail
|
||||
│ cargo test
|
||||
│ --all-features --quiet
|
||||
└ (no output)
|
||||
|
||||
@@ -3,3 +3,4 @@ source: tui/src/history_cell.rs
|
||||
expression: rendered
|
||||
---
|
||||
• Ran echo ok
|
||||
└ (no output)
|
||||
|
||||
@@ -5,3 +5,4 @@ expression: rendered
|
||||
• Ran a_very_long_token_
|
||||
│ without_spaces_to_
|
||||
│ force_wrapping
|
||||
└ (no output)
|
||||
|
||||
Reference in New Issue
Block a user