refactor: Fix compilation by adding imports and adjusting table methods

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:31:35 -03:00
parent 8d56120b88
commit 33a9049a1f
5 changed files with 13 additions and 10 deletions

View File

@@ -8,6 +8,7 @@ use log::debug;
use regex::Regex;
use std::collections::HashMap;
use std::env;
use std::io::IsTerminal;
use std::str::FromStr;
use strum::IntoEnumIterator;
#[derive(Debug, Clone, strum::EnumString, strum::Display, PartialEq)]
@@ -152,7 +153,9 @@ pub fn create_table(use_styling: bool) -> Table {
table.load_preset(comfy_table::presets::NOTHING);
}
table.force_no_tty_if(!std::io::stdout().is_terminal());
if !std::io::stdout().is_terminal() {
table.force_no_tty();
}
table
}