assistant2: Use snake_case for tool names (#27903)

The [Gemini
docs](https://ai.google.dev/gemini-api/docs/function-calling?example=weather#function_declarations)
state that function names should be in `snake_case` or `camelCase`.

Release Notes:

- N/A
This commit is contained in:
Bennet Bo Fenner 2025-04-02 12:17:58 +02:00 committed by GitHub
parent c1d6dfd832
commit 9b7b4a9d2d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 14 additions and 14 deletions

View file

@ -148,7 +148,7 @@ pub struct BatchTool;
impl Tool for BatchTool {
fn name(&self) -> String {
"batch-tool".into()
"batch_tool".into()
}
fn needs_confirmation(&self) -> bool {

View file

@ -79,7 +79,7 @@ pub struct CodeSymbolsTool;
impl Tool for CodeSymbolsTool {
fn name(&self) -> String {
"code-symbols".into()
"code_symbols".into()
}
fn needs_confirmation(&self) -> bool {

View file

@ -40,7 +40,7 @@ pub struct CopyPathTool;
impl Tool for CopyPathTool {
fn name(&self) -> String {
"copy-path".into()
"copy_path".into()
}
fn needs_confirmation(&self) -> bool {

View file

@ -30,7 +30,7 @@ pub struct CreateDirectoryTool;
impl Tool for CreateDirectoryTool {
fn name(&self) -> String {
"create-directory".into()
"create_directory".into()
}
fn needs_confirmation(&self) -> bool {

View file

@ -37,7 +37,7 @@ pub struct CreateFileTool;
impl Tool for CreateFileTool {
fn name(&self) -> String {
"create-file".into()
"create_file".into()
}
fn needs_confirmation(&self) -> bool {

View file

@ -30,7 +30,7 @@ pub struct DeletePathTool;
impl Tool for DeletePathTool {
fn name(&self) -> String {
"delete-path".into()
"delete_path".into()
}
fn needs_confirmation(&self) -> bool {

View file

@ -78,7 +78,7 @@ pub struct EditFilesTool;
impl Tool for EditFilesTool {
fn name(&self) -> String {
"edit-files".into()
"edit_files".into()
}
fn needs_confirmation(&self) -> bool {

View file

@ -126,7 +126,7 @@ pub struct FindReplaceFileTool;
impl Tool for FindReplaceFileTool {
fn name(&self) -> String {
"find-replace-file".into()
"find_replace_file".into()
}
fn needs_confirmation(&self) -> bool {

View file

@ -41,7 +41,7 @@ pub struct ListDirectoryTool;
impl Tool for ListDirectoryTool {
fn name(&self) -> String {
"list-directory".into()
"list_directory".into()
}
fn needs_confirmation(&self) -> bool {

View file

@ -39,7 +39,7 @@ pub struct MovePathTool;
impl Tool for MovePathTool {
fn name(&self) -> String {
"move-path".into()
"move_path".into()
}
fn needs_confirmation(&self) -> bool {

View file

@ -38,7 +38,7 @@ pub struct PathSearchTool;
impl Tool for PathSearchTool {
fn name(&self) -> String {
"path-search".into()
"path_search".into()
}
fn needs_confirmation(&self) -> bool {

View file

@ -44,7 +44,7 @@ pub struct ReadFileTool;
impl Tool for ReadFileTool {
fn name(&self) -> String {
"read-file".into()
"read_file".into()
}
fn needs_confirmation(&self) -> bool {

View file

@ -41,7 +41,7 @@ pub struct RegexSearchTool;
impl Tool for RegexSearchTool {
fn name(&self) -> String {
"regex-search".into()
"regex_search".into()
}
fn needs_confirmation(&self) -> bool {

View file

@ -69,7 +69,7 @@ pub struct SymbolInfoTool;
impl Tool for SymbolInfoTool {
fn name(&self) -> String {
"symbol-info".into()
"symbol_info".into()
}
fn needs_confirmation(&self) -> bool {