refactor: Enhance table generation and clean up dependencies
Co-authored-by: aider (openai/andrew/openrouter/deepseek/deepseek-chat-v3.1) <aider@aider.chat>
This commit is contained in:
@@ -10,9 +10,7 @@ use std::path::PathBuf;
|
||||
use crate::services::item_service::ItemService;
|
||||
use chrono::prelude::*;
|
||||
use is_terminal::IsTerminal;
|
||||
use comfy_table::{Table, ContentArrangement, Cell, Attribute};
|
||||
use comfy_table::presets::UTF8_FULL;
|
||||
use comfy_table::modifiers::UTF8_ROUND_CORNERS;
|
||||
use comfy_table::{Cell, Attribute};
|
||||
|
||||
pub fn mode_info(
|
||||
cmd: &mut Command,
|
||||
@@ -68,15 +66,7 @@ fn show_item(
|
||||
let item_id = item.id.unwrap();
|
||||
let item_tags: Vec<String> = item_with_meta.tags.iter().map(|t| t.name.clone()).collect();
|
||||
|
||||
let mut table = Table::new();
|
||||
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();
|
||||
}
|
||||
let mut table = crate::modes::common::create_table(true);
|
||||
|
||||
// Add all the rows
|
||||
table.add_row(vec![
|
||||
|
||||
Reference in New Issue
Block a user