Skip to content

Commit 336952a

Browse files
authored
TUI: Show apply patch diff. Stack: [2/2] (#2050)
Show the diff for apply patch <img width="801" height="345" alt="image" src="https://github.com/user-attachments/assets/a15d6112-e83e-4612-a2bd-43285689a358" /> Stack: -> #2050 #2049
1 parent 39276e8 commit 336952a

8 files changed

+363
-46
lines changed

codex-rs/tui/src/chatwidget.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ use crate::bottom_pane::BottomPane;
4646
use crate::bottom_pane::BottomPaneParams;
4747
use crate::bottom_pane::CancellationEvent;
4848
use crate::bottom_pane::InputResult;
49+
use crate::common::DEFAULT_WRAP_COLS;
4950
use crate::history_cell::CommandOutput;
5051
use crate::history_cell::ExecCell;
5152
use crate::history_cell::HistoryCell;
@@ -223,7 +224,7 @@ impl ChatWidget<'_> {
223224
content_buffer: String::new(),
224225
answer_buffer: String::new(),
225226
running_commands: HashMap::new(),
226-
live_builder: RowBuilder::new(80),
227+
live_builder: RowBuilder::new(DEFAULT_WRAP_COLS.into()),
227228
current_stream: None,
228229
stream_header_emitted: false,
229230
live_max_rows: 3,

codex-rs/tui/src/common.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pub(crate) const DEFAULT_WRAP_COLS: u16 = 80;

0 commit comments

Comments
 (0)