Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions codex-rs/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion codex-rs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ os_info = "3.12.0"
owo-colors = "4.2.0"
paste = "1.0.15"
path-absolutize = "3.1.1"
path-clean = "1.0.1"
pathdiff = "0.2"
portable-pty = "0.9.0"
predicates = "3"
Expand Down
1 change: 0 additions & 1 deletion codex-rs/tui/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ image = { workspace = true, features = ["jpeg", "png"] }
itertools = { workspace = true }
lazy_static = { workspace = true }
mcp-types = { workspace = true }
path-clean = { workspace = true }
pathdiff = { workspace = true }
pulldown-cmark = { workspace = true }
rand = { workspace = true }
Expand Down
5 changes: 2 additions & 3 deletions codex-rs/tui/src/chatwidget.rs
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,6 @@ impl ChatWidget {
self.needs_final_message_separator = false;
}
self.stream_controller = Some(StreamController::new(
self.config.clone(),
self.last_rendered_width.get().map(|w| w.saturating_sub(2)),
));
}
Expand Down Expand Up @@ -1475,7 +1474,7 @@ impl ChatWidget {
} else {
// Show explanation when there are no structured findings.
let mut rendered: Vec<ratatui::text::Line<'static>> = vec!["".into()];
append_markdown(&explanation, None, &mut rendered, &self.config);
append_markdown(&explanation, None, &mut rendered);
let body_cell = AgentMessageCell::new(rendered, false);
self.app_event_tx
.send(AppEvent::InsertHistoryCell(Box::new(body_cell)));
Expand All @@ -1484,7 +1483,7 @@ impl ChatWidget {
let message_text =
codex_core::review_format::format_review_findings_block(&output.findings, None);
let mut message_lines: Vec<ratatui::text::Line<'static>> = Vec::new();
append_markdown(&message_text, None, &mut message_lines, &self.config);
append_markdown(&message_text, None, &mut message_lines);
let body_cell = AgentMessageCell::new(message_lines, true);
self.app_event_tx
.send(AppEvent::InsertHistoryCell(Box::new(body_cell)));
Expand Down
22 changes: 0 additions & 22 deletions codex-rs/tui/src/citation_regex.rs

This file was deleted.

32 changes: 6 additions & 26 deletions codex-rs/tui/src/history_cell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ use crate::exec_cell::TOOL_CALL_MAX_LINES;
use crate::exec_cell::output_lines;
use crate::exec_cell::spinner;
use crate::exec_command::relativize_to_home;
use crate::markdown::MarkdownCitationContext;
use crate::markdown::append_markdown;
use crate::render::line_utils::line_to_static;
use crate::render::line_utils::prefix_lines;
Expand Down Expand Up @@ -125,19 +124,13 @@ impl HistoryCell for UserHistoryCell {
pub(crate) struct ReasoningSummaryCell {
_header: String,
content: String,
citation_context: MarkdownCitationContext,
}

impl ReasoningSummaryCell {
pub(crate) fn new(
header: String,
content: String,
citation_context: MarkdownCitationContext,
) -> Self {
pub(crate) fn new(header: String, content: String) -> Self {
Self {
_header: header,
content,
citation_context,
}
}
}
Expand All @@ -149,7 +142,6 @@ impl HistoryCell for ReasoningSummaryCell {
&self.content,
Some((width as usize).saturating_sub(2)),
&mut lines,
self.citation_context.clone(),
);
let summary_style = Style::default().add_modifier(Modifier::DIM | Modifier::ITALIC);
let summary_lines = lines
Expand All @@ -176,12 +168,7 @@ impl HistoryCell for ReasoningSummaryCell {
let mut out: Vec<Line<'static>> = Vec::new();
out.push("thinking".magenta().bold().into());
let mut lines = Vec::new();
append_markdown(
&self.content,
None,
&mut lines,
self.citation_context.clone(),
);
append_markdown(&self.content, None, &mut lines);
out.extend(lines);
out
}
Expand Down Expand Up @@ -1049,13 +1036,10 @@ pub(crate) fn new_view_image_tool_call(path: PathBuf, cwd: &Path) -> PlainHistor
PlainHistoryCell { lines }
}

pub(crate) fn new_reasoning_block(
full_reasoning_buffer: String,
config: &Config,
) -> TranscriptOnlyHistoryCell {
pub(crate) fn new_reasoning_block(full_reasoning_buffer: String) -> TranscriptOnlyHistoryCell {
let mut lines: Vec<Line<'static>> = Vec::new();
lines.push(Line::from("thinking".magenta().italic()));
append_markdown(&full_reasoning_buffer, None, &mut lines, config);
append_markdown(&full_reasoning_buffer, None, &mut lines);
TranscriptOnlyHistoryCell { lines }
}

Expand All @@ -1080,16 +1064,12 @@ pub(crate) fn new_reasoning_summary_block(
if after_close_idx < full_reasoning_buffer.len() {
let header_buffer = full_reasoning_buffer[..after_close_idx].to_string();
let summary_buffer = full_reasoning_buffer[after_close_idx..].to_string();
return Box::new(ReasoningSummaryCell::new(
header_buffer,
summary_buffer,
config.into(),
));
return Box::new(ReasoningSummaryCell::new(header_buffer, summary_buffer));
}
}
}
}
Box::new(new_reasoning_block(full_reasoning_buffer, config))
Box::new(new_reasoning_block(full_reasoning_buffer))
}

#[derive(Debug)]
Expand Down
1 change: 0 additions & 1 deletion codex-rs/tui/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ mod app_event_sender;
mod ascii_animation;
mod bottom_pane;
mod chatwidget;
mod citation_regex;
mod cli;
mod clipboard_paste;
mod color;
Expand Down
Loading
Loading