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:
@@ -4,14 +4,14 @@ use crate::services::types::ItemWithMeta;
|
||||
use crate::modes::common::ColumnType;
|
||||
use crate::modes::common::{format_size, OutputFormat};
|
||||
use anyhow::{Result};
|
||||
use log::debug;
|
||||
use comfy_table::{Table, ContentArrangement, Cell, Row, Color, Attribute};
|
||||
use comfy_table::presets::NOTHING;
|
||||
use comfy_table::CellAlignment;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde_json;
|
||||
use serde_yaml;
|
||||
use std::io::{stdout, IsTerminal};
|
||||
use std::io::{stdout};
|
||||
use std::io::IsTerminal;
|
||||
|
||||
#[derive(Serialize, Deserialize)]
|
||||
struct ListItem {
|
||||
@@ -55,8 +55,11 @@ pub fn mode_list(
|
||||
let mut table = Table::new();
|
||||
table
|
||||
.load_preset(NOTHING)
|
||||
.set_content_arrangement(ContentArrangement::Dynamic)
|
||||
.force_no_tty_if(!stdout().is_terminal());
|
||||
.set_content_arrangement(ContentArrangement::Dynamic);
|
||||
|
||||
if !stdout().is_terminal() {
|
||||
table.force_no_tty();
|
||||
}
|
||||
|
||||
// Create header row
|
||||
let mut header_cells = Vec::new();
|
||||
|
||||
Reference in New Issue
Block a user