MCPcopy Create free account
hub / github.com/ccusage/ccusage / should_use_compact_layout

Function should_use_compact_layout

rust/crates/ccusage/src/output.rs:18–25  ·  view source on GitHub ↗
(
    shared: &SharedArgs,
    is_stdout_tty: bool,
    terminal_width: usize,
    compact_width_threshold: usize,
)

Source from the content-addressed store, hash-verified

16}
17
18pub(crate) fn should_use_compact_layout(
19 shared: &SharedArgs,
20 is_stdout_tty: bool,
21 terminal_width: usize,
22 compact_width_threshold: usize,
23) -> bool {
24 shared.compact || (is_stdout_tty && terminal_width < compact_width_threshold)
25}
26
27pub(crate) fn summary_json(row: &UsageSummary) -> Value {
28 let mut value = json!({

Callers 4

print_usage_tableFunction · 0.85
print_blocks_tableFunction · 0.85
print_tableFunction · 0.85
print_table_for_agentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected