@@ -264,14 +264,14 @@ pub fn select_command(_os: &Os, context_manager: &ContextManager, tools: &[Strin
264
264
* command */
265
265
}
266
266
} ,
267
- Some ( cmd @ CommandType :: Profile ( _) ) if cmd. needs_profile_selection ( ) => {
267
+ Some ( cmd @ CommandType :: Agent ( _) ) if cmd. needs_agent_selection ( ) => {
268
268
// For profile operations that need a profile name, show profile selector
269
269
// As part of the agent implementation, we are disabling the ability to
270
270
// switch profile after a session has started.
271
271
// TODO: perhaps revive this after we have a decision on profile switching
272
272
Ok ( Some ( selected_command. clone ( ) ) )
273
273
} ,
274
- Some ( CommandType :: Profile ( _) ) => {
274
+ Some ( CommandType :: Agent ( _) ) => {
275
275
// For other profile operations (like create), just return the command
276
276
Ok ( Some ( selected_command. clone ( ) ) )
277
277
} ,
@@ -290,12 +290,12 @@ enum CommandType {
290
290
ContextAdd ( String ) ,
291
291
ContextRemove ( String ) ,
292
292
Tools ( & ' static str ) ,
293
- Profile ( & ' static str ) ,
293
+ Agent ( & ' static str ) ,
294
294
}
295
295
296
296
impl CommandType {
297
- fn needs_profile_selection ( & self ) -> bool {
298
- matches ! ( self , CommandType :: Profile ( "set" | "delete" | "rename" ) )
297
+ fn needs_agent_selection ( & self ) -> bool {
298
+ matches ! ( self , CommandType :: Agent ( "set" | "delete" | "rename" ) )
299
299
}
300
300
301
301
fn from_str ( cmd : & str ) -> Option < CommandType > {
@@ -307,10 +307,10 @@ impl CommandType {
307
307
match cmd {
308
308
"/tools trust" => Some ( CommandType :: Tools ( "trust" ) ) ,
309
309
"/tools untrust" => Some ( CommandType :: Tools ( "untrust" ) ) ,
310
- "/profile set" => Some ( CommandType :: Profile ( "set" ) ) ,
311
- "/profile delete" => Some ( CommandType :: Profile ( "delete" ) ) ,
312
- "/profile rename" => Some ( CommandType :: Profile ( "rename" ) ) ,
313
- "/profile create" => Some ( CommandType :: Profile ( "create" ) ) ,
310
+ "/agent set" => Some ( CommandType :: Agent ( "set" ) ) ,
311
+ "/agent delete" => Some ( CommandType :: Agent ( "delete" ) ) ,
312
+ "/agent rename" => Some ( CommandType :: Agent ( "rename" ) ) ,
313
+ "/agent create" => Some ( CommandType :: Agent ( "create" ) ) ,
314
314
_ => None ,
315
315
}
316
316
}
@@ -333,15 +333,13 @@ mod tests {
333
333
// List of hardcoded commands used in select_command
334
334
let hardcoded_commands = vec ! [
335
335
"/context add" ,
336
- "/context add --global" ,
337
336
"/context rm" ,
338
- "/context rm --global" ,
339
337
"/tools trust" ,
340
338
"/tools untrust" ,
341
- "/profile set" ,
342
- "/profile delete" ,
343
- "/profile rename" ,
344
- "/profile create" ,
339
+ "/agent set" ,
340
+ "/agent delete" ,
341
+ "/agent rename" ,
342
+ "/agent create" ,
345
343
] ;
346
344
347
345
// Check that each hardcoded command is in the COMMANDS array
0 commit comments