File tree Expand file tree Collapse file tree 1 file changed +0
-17
lines changed
crates/openshell-providers/src Expand file tree Collapse file tree 1 file changed +0
-17
lines changed Original file line number Diff line number Diff line change @@ -144,18 +144,6 @@ pub fn normalize_provider_type(input: &str) -> Option<&'static str> {
144144
145145#[ must_use]
146146pub fn detect_provider_from_command ( command : & [ String ] ) -> Option < & ' static str > {
147- // Two-token subcommand patterns (e.g., `gh copilot`)
148- if command. len ( ) >= 2 {
149- let first = & command[ 0 ] ;
150- let basename = Path :: new ( first)
151- . file_name ( )
152- . and_then ( |name| name. to_str ( ) )
153- . unwrap_or ( first) ;
154- if basename. eq_ignore_ascii_case ( "gh" ) && command[ 1 ] . eq_ignore_ascii_case ( "copilot" ) {
155- return Some ( "copilot" ) ;
156- }
157- }
158- // Single-token detection
159147 let first = command. first ( ) ?;
160148 let basename = Path :: new ( first)
161149 . file_name ( )
@@ -207,11 +195,6 @@ mod tests {
207195 detect_provider_from_command( & [ "/usr/local/bin/copilot" . to_string( ) ] ) ,
208196 Some ( "copilot" )
209197 ) ;
210- // gh copilot wrapper
211- assert_eq ! (
212- detect_provider_from_command( & [ "gh" . to_string( ) , "copilot" . to_string( ) ] ) ,
213- Some ( "copilot" )
214- ) ;
215198 // gh alone still maps to github
216199 assert_eq ! (
217200 detect_provider_from_command( & [ "gh" . to_string( ) ] ) ,
You can’t perform that action at this time.
0 commit comments