andy-stack_vaultkeeper-ai/AIClasses/FunctionDefinitions/Functions/WriteVaultFile.ts
Andrew Beal 2de8109a74 refactor: restructure AI prompt and agent architecture for multi-agent planning support
- Move prompts from AIClasses to AIPrompts directory
- Replace centralized IPrompt injection with direct property setters on IAIClass
- Remove allowDestructiveActions parameter from streamRequest methods
- Add toolDefinitions, systemPrompt, and userInstruction properties to IAIClass
- Refactor AIFunctionDefinitions to static methods with agent-specific tool sets
- Add planning agent function definitions (CreatePlan, Replan, CompleteStep, SubmitPlan)
- Create AIControllerService to handle agent orchestration
- Add execution plan related copy strings and replacement utility
- Update all AI providers (Claude, Gemini, OpenAI) to use new architecture
2025-12-30 19:07:00 +00:00

30 lines
No EOL
1.2 KiB
TypeScript

import { AIFunction } from "Enums/AIFunction";
import type { IAIFunctionDefinition } from "../IAIFunctionDefinition";
export const WriteVaultFile: IAIFunctionDefinition = {
name: AIFunction.WriteVaultFile,
description: `Writes content to a file, creating it if it doesn't exist or replacing its contents if it does.
**When to use this tool:**
- Creating new notes, documents, or files from scratch
- Completely rewriting a file's contents (when most/all content needs to change)
- Generating new files from templates or structured data`,
parameters: {
type: "object",
properties: {
file_path: {
type: "string",
description: "The full path to the file within the vault (e.g., 'folder/note.md')"
},
content: {
type: "string",
description: "The complete content to write to the file. This will replace any existing content."
},
user_message: {
type: "string",
description: "A short message to be displayed to the user explaining what you're writing and why (e.g., 'Creating your daily note for today')"
}
},
required: ["file_path", "content", "user_message"]
}
}