refactor: Improve comfy_table usage and consistency

Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat>
This commit is contained in:
Andrew Phillips
2025-09-08 18:19:10 -03:00
parent fb19499383
commit bf257b5ff3
4 changed files with 56 additions and 49 deletions

View File

@@ -62,12 +62,13 @@ pub fn mode_list(
debug!("Terminal width: {}", term_width);
let mut table = Table::new();
if stdout().is_terminal() {
table
.load_preset(UTF8_FULL)
.apply_modifier(UTF8_ROUND_CORNERS);
} else {
table.set_content_arrangement(ContentArrangement::Dynamic);
table
.load_preset(UTF8_FULL)
.apply_modifier(UTF8_ROUND_CORNERS)
.set_content_arrangement(ContentArrangement::Dynamic);
if !stdout().is_terminal() {
table.force_no_tty();
}
// Create header row