mirror of
https://github.com/openai/codex.git
synced 2026-11-18 22:20:48 +00:00
fix(tui): prevent link columns from collapsing in markdown tables
Adjust table column classification in `markdown_render.rs` so token-heavy, low-word-density columns are treated as Structured instead of Narrative. This keeps URL-heavy link columns from being first in the shrink order, reducing rare but severe narrow-column wrapping in rendered tables.
This commit is contained in:
committed by
Felipe Coury
parent
70bc4fc226
commit
bc60690d75
@@ -1161,7 +1161,11 @@ where
|
||||
} else {
|
||||
total_cell_width as f64 / total_cells as f64
|
||||
};
|
||||
let kind = if avg_words_per_cell >= 4.0 || avg_cell_width >= 28.0 {
|
||||
let kind = if body_token_width >= 20 && avg_words_per_cell <= 2.0 {
|
||||
// URL-like/token-heavy columns should resist collapse even if their
|
||||
// average cell width is high.
|
||||
TableColumnKind::Structured
|
||||
} else if avg_words_per_cell >= 4.0 || avg_cell_width >= 28.0 {
|
||||
TableColumnKind::Narrative
|
||||
} else {
|
||||
TableColumnKind::Structured
|
||||
|
||||
Reference in New Issue
Block a user