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

@@ -69,12 +69,13 @@ fn show_item(
let item_tags: Vec<String> = item_with_meta.tags.iter().map(|t| t.name.clone()).collect();
let mut table = Table::new();
if std::io::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 !std::io::stdout().is_terminal() {
table.force_no_tty();
}
// Add all the rows