show diff output in the pager (#2568)

this shows `/diff` output in an overlay like the transcript, instead of
dumping it into history.



https://github.com/user-attachments/assets/48e79b65-7f66-45dd-97b3-d5c627ac7349
This commit is contained in:
Jeremy Rose
2025-08-22 08:24:13 -07:00
committed by GitHub
parent e4c275d615
commit 76dc3f6054
4 changed files with 44 additions and 22 deletions

View File

@@ -506,20 +506,6 @@ pub(crate) fn new_completed_mcp_tool_call(
Box::new(PlainHistoryCell { lines })
}
pub(crate) fn new_diff_output(message: String) -> PlainHistoryCell {
let mut lines: Vec<Line<'static>> = Vec::new();
lines.push(Line::from("/diff".magenta()));
if message.trim().is_empty() {
lines.push(Line::from("No changes detected.".italic()));
} else {
lines.extend(message.lines().map(ansi_escape_line));
}
lines.push(Line::from(""));
PlainHistoryCell { lines }
}
pub(crate) fn new_status_output(
config: &Config,
usage: &TokenUsage,