(n: u64)
| 2945 | } |
| 2946 | |
| 2947 | fn format_tokens(n: u64) -> String { |
| 2948 | if n >= 1_000_000 { |
| 2949 | format!("{:.1}M", n as f64 / 1_000_000.0) |
| 2950 | } else if n >= 1_000 { |
| 2951 | format!("{:.0}K", n as f64 / 1_000.0) |
| 2952 | } else { |
| 2953 | n.to_string() |
| 2954 | } |
| 2955 | } |
| 2956 | |
| 2957 | async fn handle_session_command(action: SessionCommands) -> anyhow::Result<()> { |
| 2958 | let db = Database::new() |
nothing calls this directly
no outgoing calls
no test coverage detected