Skip to content

Commit 4d5f34f

Browse files
refactor(display): remove unavailable marker and use empty marker in /provider (#2097)
1 parent 57cc975 commit 4d5f34f

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

crates/forge_main/src/display_constants.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,6 @@ pub mod markers {
5656

5757
/// Indicates a built-in (non-user-defined) component
5858
pub const BUILT_IN: &str = "[built-in]";
59-
60-
/// Indicates a resource is unavailable (e.g., provider not configured)
61-
pub const UNAVAILABLE: &str = "[unavailable]";
6259
}
6360

6461
/// Type discriminator for commands, agents, and custom entries.
@@ -131,8 +128,8 @@ mod tests {
131128
fn test_markers_have_square_brackets() {
132129
assert!(markers::BUILT_IN.starts_with('['));
133130
assert!(markers::BUILT_IN.ends_with(']'));
134-
assert!(markers::UNAVAILABLE.starts_with('['));
135-
assert!(markers::UNAVAILABLE.ends_with(']'));
131+
assert!(markers::EMPTY.starts_with('['));
132+
assert!(markers::EMPTY.ends_with(']'));
136133
}
137134

138135
#[test]

crates/forge_main/src/model.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,11 @@ impl Display for CliProvider {
7777
if let Some(domain) = provider.url.domain() {
7878
write!(f, " [{domain}]")?;
7979
} else {
80-
write!(f, " {}", markers::UNAVAILABLE)?;
80+
write!(f, " {}", markers::EMPTY)?;
8181
}
8282
}
8383
AnyProvider::Template(_) => {
84-
write!(f, " {name:<name_width$} {}", markers::UNAVAILABLE)?;
84+
write!(f, " {name:<name_width$} {}", markers::EMPTY)?;
8585
}
8686
}
8787
Ok(())
@@ -1099,7 +1099,7 @@ mod tests {
10991099
});
11001100
let formatted = format!("{}", CliProvider(fixture));
11011101
let actual = strip_ansi_codes(&formatted);
1102-
let expected = format!(" Anthropic {}", markers::UNAVAILABLE);
1102+
let expected = format!(" Anthropic {}", markers::EMPTY);
11031103
assert_eq!(actual, expected);
11041104
}
11051105

@@ -1119,7 +1119,7 @@ mod tests {
11191119
});
11201120
let formatted = format!("{}", CliProvider(fixture));
11211121
let actual = strip_ansi_codes(&formatted);
1122-
let expected = format!("✓ Forge {}", markers::UNAVAILABLE);
1122+
let expected = format!("✓ Forge {}", markers::EMPTY);
11231123
assert_eq!(actual, expected);
11241124
}
11251125

0 commit comments

Comments
 (0)