mirror of
https://github.com/openai/codex.git
synced 2026-11-17 22:10:37 +00:00
## What changed Render unordered bullets as `•` and task markers as `☐` or `☑`, preserving ordered numbering and continuation indentation in streaming and completed Markdown. Add `tui.rendering.lists`, enabled by default; setting it to `false` retains hyphen bullets and textual task markers. ## Testing Add snapshot coverage for nested, ordered, quoted, and wrapped task lists, plus code and escaped markers. Add character-by-character streaming tests that compare incremental and emitted output with full rendering, with list rendering enabled and disabled. GitOrigin-RevId: df9209d8c42f277dd2a2d7073ea19a6feb7dd706
32 lines
913 B
Rust
32 lines
913 B
Rust
//! TUI content rendering preferences, independent of animation effects.
|
|
|
|
use schemars::JsonSchema;
|
|
use serde::Deserialize;
|
|
use serde::Serialize;
|
|
|
|
/// Optional rich renderers. Disabled renderers preserve the original source.
|
|
#[derive(Serialize, Deserialize, Debug, Copy, Clone, PartialEq, Eq, JsonSchema)]
|
|
#[serde(default)]
|
|
#[schemars(deny_unknown_fields)]
|
|
pub struct TuiRendering {
|
|
/// Render Mermaid code blocks as diagrams.
|
|
pub mermaid: bool,
|
|
/// Render math expressions using Unicode notation.
|
|
pub math: bool,
|
|
/// Render pipe tables, including tables inside Markdown fences.
|
|
pub tables: bool,
|
|
/// Render Markdown bullets and task-list markers as Unicode symbols.
|
|
pub lists: bool,
|
|
}
|
|
|
|
impl Default for TuiRendering {
|
|
fn default() -> Self {
|
|
Self {
|
|
mermaid: true,
|
|
math: true,
|
|
tables: true,
|
|
lists: true,
|
|
}
|
|
}
|
|
}
|