Files
llmx/codex-rs/ansi-escape
jcoens-openai 8a89d3aeda Update cargo to 2024 edition (#842)
Some effects of this change:
- New formatting changes across many files. No functionality changes
should occur from that.
- Calls to `set_env` are considered unsafe, since this only happens in
tests we wrap them in `unsafe` blocks
2025-05-07 08:37:48 -07:00
..
2025-05-07 08:37:48 -07:00

oai-codex-ansi-escape

Small helper functions that wrap functionality from https://crates.io/crates/ansi-to-tui:

pub fn ansi_escape_line(s: &str) -> Line<'static>
pub fn ansi_escape<'a>(s: &'a str) -> Text<'a>

Advantages:

  • ansi_to_tui::IntoText is not in scope for the entire TUI crate
  • we panic!() and log if IntoText returns an Err and log it so that the caller does not have to deal with it