@@ -25,13 +25,6 @@ use tempfile::NamedTempFile;
2525
2626use super :: context:: ContextManager ;
2727
28- pub fn select_profile_with_skim ( context_manager : & ContextManager ) -> Result < Option < String > > {
29- let profiles = context_manager. list_profiles_blocking ( ) ?;
30-
31- launch_skim_selector ( & profiles, "Select profile: " , false )
32- . map ( |selected| selected. and_then ( |s| s. into_iter ( ) . next ( ) ) )
33- }
34-
3528pub struct SkimCommandSelector {
3629 context_manager : Arc < ContextManager > ,
3730 tool_names : Vec < String > ,
@@ -275,18 +268,9 @@ pub fn select_command(context_manager: &ContextManager, tools: &[String]) -> Res
275268 * command */
276269 }
277270 } ,
278- Some ( cmd @ CommandType :: Profile ( _) ) if cmd. needs_profile_selection ( ) => {
279- // For profile operations that need a profile name, show profile selector
280- match select_profile_with_skim ( context_manager) ? {
281- Some ( profile) => {
282- let full_cmd = format ! ( "{} {}" , selected_command, profile) ;
283- Ok ( Some ( full_cmd) )
284- } ,
285- None => Ok ( Some ( selected_command. clone ( ) ) ) , // User cancelled profile selection
286- }
287- } ,
288271 Some ( CommandType :: Profile ( _) ) => {
289- // For other profile operations (like create), just return the command
272+ // For profile operations, we'd need to prompt for the name
273+ // For now, just return the command and let the user type the name
290274 Ok ( Some ( selected_command. clone ( ) ) )
291275 } ,
292276 None => {
@@ -308,10 +292,6 @@ enum CommandType {
308292}
309293
310294impl CommandType {
311- fn needs_profile_selection ( & self ) -> bool {
312- matches ! ( self , CommandType :: Profile ( "set" | "delete" | "rename" ) )
313- }
314-
315295 fn from_str ( cmd : & str ) -> Option < CommandType > {
316296 if cmd. starts_with ( "/context add" ) {
317297 Some ( CommandType :: ContextAdd ( cmd. to_string ( ) ) )
0 commit comments