2025-10-15 20:06:23 +00:00
import { AIFunction } from "Enums/AIFunction" ;
import type { IAIFunctionDefinition } from "../IAIFunctionDefinition" ;
2025-10-16 21:58:30 +00:00
export const DeleteVaultFiles : IAIFunctionDefinition = {
name : AIFunction.DeleteVaultFiles ,
2025-12-30 19:07:00 +00:00
description : ` Permanently removes files and folders from the vault. Use this when the user explicitly
requests to delete file ( s ) or folder ( s ) , when a file or folder is no longer needed , or when removing outdated
content . IMPORTANT : This action is irreversible - always confirm the exact file path ( s )
before deletion . Prefer archiving or moving files to a trash folder over permanent
deletion when uncertain . Only call this after verifying the file ( s ) exist and confirming
the user ' s intent to delete . ` ,
2025-10-15 20:06:23 +00:00
parameters : {
type : "object" ,
properties : {
2025-10-16 21:58:30 +00:00
file_paths : {
type : "array" ,
items : {
type : "string"
} ,
2025-11-03 21:37:47 +00:00
description : "An array of file paths to be deleted (e.g., ['folder/note.md', 'note2.md', 'folder/subfolder']). Must be an exact match to existing files or folders."
2025-10-15 20:06:23 +00:00
} ,
user_message : {
type : "string" ,
2025-10-16 21:58:30 +00:00
description : "A short message to be displayed to the user explaining why these files are being deleted (e.g., 'Deleting completed task list as requested' or 'Removing duplicate note files')."
2025-10-15 20:06:23 +00:00
} ,
confirm_deletion : {
type : "boolean" ,
description : "Safety flag that must be explicitly set to true to confirm the deletion is intentional. This prevents accidental deletions." ,
default : false
}
} ,
2025-10-16 21:58:30 +00:00
required : [ "file_paths" , "user_message" , "confirm_deletion" ]
2025-10-15 20:06:23 +00:00
}
}