Module display

Module display 

Source
Expand description

§Display Module

Provides improved CLI output formatting with matrix/dashboard views for better readability and easier parsing by both humans and LLMs.

Structs§

BoxDrawer
Box drawer that pre-calculates optimal dimensions
ColorAdapter
Color adapter that provides appropriate colors based on terminal background

Enums§

ColorScheme
Represents the detected or configured terminal background type
DisplayMode
Display mode for analysis output

Functions§

display_analysis
Main display function that routes to appropriate formatter
display_analysis_to_string
Main display function that returns a string instead of printing
display_analysis_with_return
Combined function that both prints and returns a string
format_list_smart
Format a list of strings smartly: show up to max_show items, add “+N” if more Each item is truncated to max_item_width if needed
format_ports_smart
Format ports list: deduplicate, limit to max_show, add “+N” if more
format_project_category
Format project category name
get_category_emoji
Get emoji for project category
get_color_adapter
Get the global color adapter instance
get_terminal_width
Get terminal width, defaulting to 100 if unavailable
init_color_adapter
Initialize the global color adapter with a specific scheme
smart_truncate
Smart truncate with single-char ellipsis “…” for cleaner look
strip_ansi_codes
Strip ANSI escape codes from a string
truncate_to_width
Truncate string to specified visual width, preserving color codes
visual_width
Calculate visual width of a string, handling ANSI color codes