Skip to content
Merged
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
23 changes: 12 additions & 11 deletions codex-rs/tui/src/history_cell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -573,18 +573,19 @@ impl TooltipHistoryCell {

impl HistoryCell for TooltipHistoryCell {
fn display_lines(&self, width: u16) -> Vec<Line<'static>> {
let indent: Line<'static> = " ".into();
let mut lines = Vec::new();
let tooltip_line: Line<'static> = vec!["Tip: ".cyan(), self.tip.into()].into();
let wrap_opts = RtOptions::new(usize::from(width.max(1)))
.initial_indent(indent.clone())
.subsequent_indent(indent.clone());
lines.extend(
word_wrap_line(&tooltip_line, wrap_opts.clone())
.into_iter()
.map(|line| line_to_static(&line)),
let indent = " ";
let indent_width = UnicodeWidthStr::width(indent);
let wrap_width = usize::from(width.max(1))
.saturating_sub(indent_width)
.max(1);
let mut lines: Vec<Line<'static>> = Vec::new();
append_markdown(
&format!("**Tip:** {}", self.tip),
Some(wrap_width),
&mut lines,
);
lines

prefix_lines(lines, indent.into(), indent.into())
}
}

Expand Down
2 changes: 1 addition & 1 deletion codex-rs/tui/tooltips.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ Type / to open the command popup; Tab autocompletes slash commands and saved pro
Use /prompts:<name> key=value to expand a saved prompt with placeholders before sending.
With the composer empty, press Esc to step back and edit your last message; Enter confirms.
Paste an image with Ctrl+V to attach it to your next message.
You can resume a previous conversation by doing `codex resume`
You can resume a previous conversation by running `codex resume`
Loading