MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / provider_profile_id_width

Function provider_profile_id_width

crates/openshell-cli/src/run.rs:5584–5597  ·  view source on GitHub ↗
(profiles: &[ProviderProfile])

Source from the content-addressed store, hash-verified

5582const PROVIDER_PROFILE_DISPLAY_MAX_WIDTH: usize = 40;
5583
5584fn provider_profile_id_width(profiles: &[ProviderProfile]) -> usize {
5585 profiles
5586 .iter()
5587 .map(|profile| {
5588 profile
5589 .id
5590 .chars()
5591 .count()
5592 .min(PROVIDER_PROFILE_ID_MAX_WIDTH)
5593 })
5594 .max()
5595 .unwrap_or(2)
5596 .max(2)
5597}
5598
5599fn provider_profile_display_width(profiles: &[ProviderProfile]) -> usize {
5600 profiles

Callers 1

provider_list_profilesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected