6969• You can also use @<prompt name> as a shortcut for /prompts get <prompt name>
7070• Prompts can accept arguments to customize their behavior
7171• Prompts are provided by MCP servers you have installed
72- "# . to_string ( )
72+ "#
73+ . to_string ( )
7374 }
7475
7576 fn llm_description ( & self ) -> String {
@@ -94,10 +95,8 @@ Available subcommands:
9495 fn to_command ( & self , args : Vec < & str > ) -> Result < Command , ChatError > {
9596 if args. is_empty ( ) {
9697 // Default to showing the list when no subcommand is provided
97- return Ok ( Command :: Prompts {
98- subcommand : Some ( PromptsSubcommand :: List {
99- search_word : None
100- } )
98+ return Ok ( Command :: Prompts {
99+ subcommand : Some ( PromptsSubcommand :: List { search_word : None } ) ,
101100 } ) ;
102101 }
103102
@@ -119,24 +118,21 @@ Available subcommands:
119118 if args. len ( ) < 2 {
120119 return Err ( ChatError :: Custom ( "Expected prompt name" . into ( ) ) ) ;
121120 }
122-
121+
123122 let name = args[ 1 ] . to_string ( ) ;
124123 let arguments = if args. len ( ) > 2 {
125124 Some ( args[ 2 ..] . iter ( ) . map ( |s| ( * s) . to_string ( ) ) . collect ( ) )
126125 } else {
127126 None
128127 } ;
129-
130- let params = crate :: cli:: chat:: command:: PromptsGetParam {
131- name,
132- arguments,
133- } ;
134-
128+
129+ let params = crate :: cli:: chat:: command:: PromptsGetParam { name, arguments } ;
130+
135131 let get_command = PromptsGetCommand {
136132 orig_input : Some ( args[ 1 ..] . join ( " " ) ) ,
137133 params,
138134 } ;
139-
135+
140136 Some ( PromptsSubcommand :: Get { get_command } )
141137 } ,
142138 "help" => {
@@ -181,7 +177,9 @@ Available subcommands:
181177 . execute_command ( command, ctx, tool_uses, pending_tool_index)
182178 . await
183179 } ,
184- _ => Err ( ChatError :: Custom ( "PromptsCommand can only execute Prompts commands" . into ( ) ) ) ,
180+ _ => Err ( ChatError :: Custom (
181+ "PromptsCommand can only execute Prompts commands" . into ( ) ,
182+ ) ) ,
185183 }
186184 } )
187185 }
0 commit comments