@@ -15,6 +15,7 @@ use aws_smithy_types::{
1515 Document ,
1616 Number as SmithyNumber ,
1717} ;
18+ use crossterm:: style:: Stylize ;
1819use execute_bash:: ExecuteBash ;
1920use eyre:: Result ;
2021use fig_api_client:: model:: {
@@ -171,9 +172,9 @@ impl ToolPermissions {
171172 pub fn display_label ( & self , tool_name : & str ) -> String {
172173 if self . has ( tool_name) {
173174 if self . is_trusted ( tool_name) {
174- "Trusted" . to_string ( )
175+ format ! ( " {}" , "trusted" . dark_green ( ) . bold ( ) )
175176 } else {
176- "Per-request" . to_string ( )
177+ format ! ( " {}" , "not trusted" . dark_grey ( ) )
177178 }
178179 } else {
179180 Self :: default_permission_label ( tool_name)
@@ -207,15 +208,15 @@ impl ToolPermissions {
207208 // This "static" way avoids needing to construct a tool instance.
208209 fn default_permission_label ( tool_name : & str ) -> String {
209210 let label = match tool_name {
210- "fs_read" => "Trusted" ,
211- "fs_write" => "Per-request" ,
212- "execute_bash" => "Write -only commands" ,
213- "use_aws" => "Write -only commands" ,
214- "report_issue" => "Trusted" ,
215- _ => "Per-request" ,
211+ "fs_read" => "trusted" . dark_green ( ) . bold ( ) ,
212+ "fs_write" => "not trusted" . dark_grey ( ) ,
213+ "execute_bash" => "trust read -only commands" . dark_grey ( ) ,
214+ "use_aws" => "trust read -only commands" . dark_grey ( ) ,
215+ "report_issue" => "trusted" . dark_green ( ) . bold ( ) ,
216+ _ => "not trusted" . dark_grey ( ) ,
216217 } ;
217218
218- format ! ( "{label} [Default] " )
219+ format ! ( "{} { label}" , "*" . reset ( ) )
219220 }
220221}
221222
0 commit comments