11pub mod execute_bash;
22pub mod fs_read;
33pub mod fs_write;
4- pub mod git;
54pub mod use_aws;
65
76use std:: io:: Write ;
@@ -29,7 +28,6 @@ use fig_api_client::model::{
2928use fig_os_shim:: Context ;
3029use fs_read:: FsRead ;
3130use fs_write:: FsWrite ;
32- use git:: Git ;
3331use serde:: Deserialize ;
3432use syntect:: easy:: HighlightLines ;
3533use syntect:: highlighting:: ThemeSet ;
@@ -58,7 +56,6 @@ pub enum Tool {
5856 FsWrite ( FsWrite ) ,
5957 ExecuteBash ( ExecuteBash ) ,
6058 UseAws ( UseAws ) ,
61- Git ( Git ) ,
6259}
6360
6461impl Tool {
@@ -69,7 +66,6 @@ impl Tool {
6966 Tool :: FsWrite ( _) => "Write to filesystem" ,
7067 Tool :: ExecuteBash ( _) => "Execute shell command" ,
7168 Tool :: UseAws ( _) => "Use AWS CLI" ,
72- Tool :: Git ( _) => "Git" ,
7369 }
7470 }
7571
@@ -80,7 +76,6 @@ impl Tool {
8076 Tool :: FsWrite ( _) => "Writing to filesystem" ,
8177 Tool :: ExecuteBash ( execute_bash) => return format ! ( "Executing `{}`" , execute_bash. command) ,
8278 Tool :: UseAws ( _) => "Using AWS CLI" ,
83- Tool :: Git ( _) => "Using Git CLI" ,
8479 }
8580 . to_owned ( )
8681 }
@@ -92,7 +87,6 @@ impl Tool {
9287 Tool :: FsWrite ( _) => true ,
9388 Tool :: ExecuteBash ( execute_bash) => execute_bash. requires_consent ( ) ,
9489 Tool :: UseAws ( use_aws) => use_aws. requires_consent ( ) ,
95- Tool :: Git ( git) => git. requires_consent ( ) ,
9690 }
9791 }
9892
@@ -103,7 +97,6 @@ impl Tool {
10397 Tool :: FsWrite ( fs_write) => fs_write. invoke ( context, updates) . await ,
10498 Tool :: ExecuteBash ( execute_bash) => execute_bash. invoke ( updates) . await ,
10599 Tool :: UseAws ( use_aws) => use_aws. invoke ( context, updates) . await ,
106- Tool :: Git ( git) => git. invoke ( context, updates) . await ,
107100 }
108101 }
109102
@@ -114,7 +107,6 @@ impl Tool {
114107 Tool :: FsWrite ( fs_write) => fs_write. queue_description ( ctx, updates) ,
115108 Tool :: ExecuteBash ( execute_bash) => execute_bash. queue_description ( updates) ,
116109 Tool :: UseAws ( use_aws) => use_aws. queue_description ( updates) ,
117- Tool :: Git ( git) => git. queue_description ( updates) ,
118110 }
119111 }
120112
@@ -125,7 +117,6 @@ impl Tool {
125117 Tool :: FsWrite ( fs_write) => fs_write. validate ( ctx) . await ,
126118 Tool :: ExecuteBash ( execute_bash) => execute_bash. validate ( ctx) . await ,
127119 Tool :: UseAws ( use_aws) => use_aws. validate ( ctx) . await ,
128- Tool :: Git ( git) => git. validate ( ctx) . await ,
129120 }
130121 }
131122}
@@ -147,7 +138,6 @@ impl TryFrom<ToolUse> for Tool {
147138 "fs_write" => Self :: FsWrite ( serde_json:: from_value :: < FsWrite > ( value. args ) . map_err ( map_err) ?) ,
148139 "execute_bash" => Self :: ExecuteBash ( serde_json:: from_value :: < ExecuteBash > ( value. args ) . map_err ( map_err) ?) ,
149140 "use_aws" => Self :: UseAws ( serde_json:: from_value :: < UseAws > ( value. args ) . map_err ( map_err) ?) ,
150- "git" => Self :: Git ( serde_json:: from_value :: < Git > ( value. args ) . map_err ( map_err) ?) ,
151141 unknown => {
152142 return Err ( ToolResult {
153143 tool_use_id : value. id ,
0 commit comments