Lightweight coding agent that runs in your terminal
Rust
Avoid allocating per character when decorating hyperlinks (#38823)
Benjamin Carlsson49db349ffdd8
diff --git a/codex-rs/tui/src/terminal_hyperlinks.rs b/codex-rs/tui/src/terminal_hyperlinks.rsindex e9580dc68c..b7ea9d75d9 100644--- a/codex-rs/tui/src/terminal_hyperlinks.rs+++ b/codex-rs/tui/src/terminal_hyperlinks.rs@@ -461,7 +461,7 @@ pub(crate) fn decorate_spans(line: &HyperlinkLine) -> Vec<Span<'static>> {}active_link_index = selected_link_index;}- push_styled_content(&mut out, &ch.to_string(), span.style);+ push_styled_content(&mut out, ch.encode_utf8(&mut [0; 4]), span.style);column += width;}}