You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description:"Delete a file in the current workspace. IMPORTANT: Always ask the user for confirmation before deleting files. Use this only after explicit user approval.".to_string(),
125
+
input_schema:json!({
126
+
"type":"object",
127
+
"properties":{
128
+
"path":{
129
+
"type":"string",
130
+
"description":"The relative path to the file to delete (e.g., 'src/old_file.rs')"
131
+
}
132
+
},
133
+
"required":["path"]
134
+
}),
135
+
}
136
+
}
137
+
138
+
fndelete_directory_tool() -> Tool{
139
+
Tool{
140
+
name:"delete_directory".to_string(),
141
+
description:"Delete a directory and all its contents in the current workspace. IMPORTANT: Always ask the user for confirmation before deleting directories. Use this only after explicit user approval.".to_string(),
142
+
input_schema:json!({
143
+
"type":"object",
144
+
"properties":{
145
+
"path":{
146
+
"type":"string",
147
+
"description":"The relative path to the directory to delete (e.g., 'src/old_module')"
148
+
}
149
+
},
150
+
"required":["path"]
151
+
}),
152
+
}
153
+
}
154
+
155
+
fnmove_file_tool() -> Tool{
156
+
Tool{
157
+
name:"move_file".to_string(),
158
+
description:"Move or rename a file or directory within the workspace. Creates parent directories if needed.".to_string(),
159
+
input_schema:json!({
160
+
"type":"object",
161
+
"properties":{
162
+
"source":{
163
+
"type":"string",
164
+
"description":"The relative path to the source file/directory (e.g., 'src/old_name.rs')"
165
+
},
166
+
"destination":{
167
+
"type":"string",
168
+
"description":"The relative path to the destination (e.g., 'src/new_name.rs' or 'new_folder/file.rs')"
169
+
}
170
+
},
171
+
"required":["source","destination"]
172
+
}),
173
+
}
174
+
}
175
+
176
+
fncopy_file_tool() -> Tool{
177
+
Tool{
178
+
name:"copy_file".to_string(),
179
+
description:"Copy a file to a new location within the workspace. Creates parent directories if needed.".to_string(),
180
+
input_schema:json!({
181
+
"type":"object",
182
+
"properties":{
183
+
"source":{
184
+
"type":"string",
185
+
"description":"The relative path to the source file (e.g., 'src/template.rs')"
186
+
},
187
+
"destination":{
188
+
"type":"string",
189
+
"description":"The relative path to the destination (e.g., 'src/new_file.rs')"
0 commit comments