mirror of
https://github.com/openai/codex.git
synced 2026-11-21 22:50:37 +00:00
fix(tui): post-rebase fixups for upstream API changes
- Use codex_protocol::protocol instead of codex_core::protocol (made private upstream) - Add missing word_wrap_lines import in history_cell tests - Update column classification test for URL-like token heuristic
This commit is contained in:
committed by
Felipe Coury
parent
bc60690d75
commit
6343a292e8
@@ -2861,6 +2861,7 @@ fn format_mcp_invocation<'a>(invocation: McpInvocation) -> Line<'a> {
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use crate::wrapping::word_wrap_lines;
|
||||
use crate::exec_cell::CommandOutput;
|
||||
use crate::exec_cell::ExecCall;
|
||||
use crate::exec_cell::ExecCell;
|
||||
|
||||
@@ -2160,8 +2160,9 @@ mod tests {
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn column_classification_narrative_by_char_width() {
|
||||
// Col with short word count but ≥28 avg char width → Narrative
|
||||
fn column_classification_structured_by_url_like_token() {
|
||||
// Col with short word count but ≥28 avg char width and long tokens → Structured
|
||||
// (URL-like/token-heavy columns resist collapse)
|
||||
let header = vec![make_cell("URL")];
|
||||
let rows = vec![
|
||||
vec![make_cell("https://example.com/very/long/path")],
|
||||
@@ -2169,7 +2170,7 @@ mod tests {
|
||||
];
|
||||
let metrics = W::collect_table_column_metrics(&header, &rows, 1);
|
||||
assert!(metrics[0].avg_cell_width >= 28.0);
|
||||
assert_eq!(metrics[0].kind, TableColumnKind::Narrative);
|
||||
assert_eq!(metrics[0].kind, TableColumnKind::Structured);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user