Skip to content

Commit cca6b4f

Browse files
authored
Revert "feat: adds git tool (#729)" (#731)
This reverts commit 5556770.
1 parent 5556770 commit cca6b4f

File tree

3 files changed

+0
-242
lines changed

3 files changed

+0
-242
lines changed

crates/q_cli/src/cli/chat/tools/git.rs

Lines changed: 0 additions & 198 deletions
This file was deleted.

crates/q_cli/src/cli/chat/tools/mod.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
pub mod execute_bash;
22
pub mod fs_read;
33
pub mod fs_write;
4-
pub mod git;
54
pub mod use_aws;
65

76
use std::io::Write;
@@ -29,7 +28,6 @@ use fig_api_client::model::{
2928
use fig_os_shim::Context;
3029
use fs_read::FsRead;
3130
use fs_write::FsWrite;
32-
use git::Git;
3331
use serde::Deserialize;
3432
use syntect::easy::HighlightLines;
3533
use syntect::highlighting::ThemeSet;
@@ -58,7 +56,6 @@ pub enum Tool {
5856
FsWrite(FsWrite),
5957
ExecuteBash(ExecuteBash),
6058
UseAws(UseAws),
61-
Git(Git),
6259
}
6360

6461
impl 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,

crates/q_cli/src/cli/chat/tools/tool_index.json

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -102,39 +102,5 @@
102102
},
103103
"required": ["region", "service_name", "operation_name", "label"]
104104
}
105-
},
106-
"git": {
107-
"name": "git",
108-
"description": "Execute a git command with the specified parameters. All arguments must conform to standard git CLI specification.",
109-
"input_schema": {
110-
"type": "object",
111-
"properties": {
112-
"command": {
113-
"type": "string",
114-
"description": "The primary git command to execute (e.g., clone, pull, push, status)."
115-
},
116-
"subcommand": {
117-
"type": "string",
118-
"description": "Optional: The subcommand for git commands that support them (e.g., remote add, branch create)."
119-
},
120-
"repo": {
121-
"type": "string",
122-
"description": "Optional: The repository URL or name to operate on, depending on the command context."
123-
},
124-
"branch": {
125-
"type": "string",
126-
"description": "Optional: The branch name to use for operations that require a branch specification."
127-
},
128-
"parameters": {
129-
"type": "object",
130-
"description": "Optional: Additional parameters for the git command. The parameter keys must match git command-line options."
131-
},
132-
"label": {
133-
"type": "string",
134-
"description": "Human readable description of the git operation being performed."
135-
}
136-
},
137-
"required": ["command", "label"]
138-
}
139105
}
140106
}

0 commit comments

Comments
 (0)