@@ -29,6 +29,7 @@ use tools::ToolsArgs;
29
29
30
30
use crate :: cli:: chat:: cli:: subscribe:: SubscribeArgs ;
31
31
use crate :: cli:: chat:: cli:: usage:: UsageArgs ;
32
+ use crate :: cli:: chat:: consts:: AGENT_MIGRATION_DOC_URL ;
32
33
use crate :: cli:: chat:: {
33
34
ChatError ,
34
35
ChatSession ,
@@ -48,8 +49,10 @@ pub enum SlashCommand {
48
49
/// Clear the conversation history
49
50
Clear ( ClearArgs ) ,
50
51
/// Manage agents
51
- #[ command( subcommand, aliases = [ "profile" ] ) ]
52
+ #[ command( subcommand) ]
52
53
Agent ( AgentSubcommand ) ,
54
+ #[ command( hide = true ) ]
55
+ Profile ,
53
56
/// Manage context files for the chat session
54
57
#[ command( subcommand) ]
55
58
Context ( ContextSubcommand ) ,
@@ -90,6 +93,29 @@ impl SlashCommand {
90
93
Self :: Quit => Ok ( ChatState :: Exit ) ,
91
94
Self :: Clear ( args) => args. execute ( session) . await ,
92
95
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
+ } ,
93
119
Self :: Context ( args) => args. execute ( os, session) . await ,
94
120
Self :: Knowledge ( subcommand) => subcommand. execute ( os, session) . await ,
95
121
Self :: PromptEditor ( args) => args. execute ( session) . await ,
@@ -128,6 +154,7 @@ impl SlashCommand {
128
154
Self :: Quit => "quit" ,
129
155
Self :: Clear ( _) => "clear" ,
130
156
Self :: Agent ( _) => "agent" ,
157
+ Self :: Profile => "profile" ,
131
158
Self :: Context ( _) => "context" ,
132
159
Self :: Knowledge ( _) => "knowledge" ,
133
160
Self :: PromptEditor ( _) => "editor" ,
0 commit comments