@@ -29,6 +29,7 @@ use tools::ToolsArgs;
2929
3030use crate :: cli:: chat:: cli:: subscribe:: SubscribeArgs ;
3131use crate :: cli:: chat:: cli:: usage:: UsageArgs ;
32+ use crate :: cli:: chat:: consts:: AGENT_MIGRATION_DOC_URL ;
3233use crate :: cli:: chat:: {
3334 ChatError ,
3435 ChatSession ,
@@ -48,8 +49,10 @@ pub enum SlashCommand {
4849 /// Clear the conversation history
4950 Clear ( ClearArgs ) ,
5051 /// Manage agents
51- #[ command( subcommand, aliases = [ "profile" ] ) ]
52+ #[ command( subcommand) ]
5253 Agent ( AgentSubcommand ) ,
54+ #[ command( hide = true ) ]
55+ Profile ,
5356 /// Manage context files for the chat session
5457 #[ command( subcommand) ]
5558 Context ( ContextSubcommand ) ,
@@ -90,6 +93,29 @@ impl SlashCommand {
9093 Self :: Quit => Ok ( ChatState :: Exit ) ,
9194 Self :: Clear ( args) => args. execute ( session) . await ,
9295 Self :: Agent ( subcommand) => subcommand. execute ( os, session) . await ,
96+ Self :: Profile => {
97+ use crossterm:: {
98+ execute,
99+ style,
100+ } ;
101+ execute ! (
102+ session. stderr,
103+ style:: SetForegroundColor ( style:: Color :: Yellow ) ,
104+ style:: Print ( "This command has been deprecated. Use" ) ,
105+ style:: SetForegroundColor ( style:: Color :: Cyan ) ,
106+ style:: Print ( " /agent " ) ,
107+ style:: SetForegroundColor ( style:: Color :: Yellow ) ,
108+ style:: Print ( "instead.\n See " ) ,
109+ style:: Print ( AGENT_MIGRATION_DOC_URL ) ,
110+ style:: Print ( " for more detail" ) ,
111+ style:: Print ( "\n " ) ,
112+ style:: ResetColor ,
113+ ) ?;
114+
115+ Ok ( ChatState :: PromptUser {
116+ skip_printing_tools : true ,
117+ } )
118+ } ,
93119 Self :: Context ( args) => args. execute ( os, session) . await ,
94120 Self :: Knowledge ( subcommand) => subcommand. execute ( os, session) . await ,
95121 Self :: PromptEditor ( args) => args. execute ( session) . await ,
@@ -128,6 +154,7 @@ impl SlashCommand {
128154 Self :: Quit => "quit" ,
129155 Self :: Clear ( _) => "clear" ,
130156 Self :: Agent ( _) => "agent" ,
157+ Self :: Profile => "profile" ,
131158 Self :: Context ( _) => "context" ,
132159 Self :: Knowledge ( _) => "knowledge" ,
133160 Self :: PromptEditor ( _) => "editor" ,
0 commit comments