mirror of
https://github.com/andy-stack/vaultkeeper-ai.git
synced 2026-07-22 06:42:03 +00:00
- 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
32 lines
No EOL
1,011 B
TypeScript
32 lines
No EOL
1,011 B
TypeScript
import { Exception } from "Helpers/Exception";
|
|
|
|
export enum AIFunction {
|
|
SearchVaultFiles = "search_vault_files",
|
|
ReadVaultFiles = "read_vault_files",
|
|
WriteVaultFile = "write_vault_file",
|
|
PatchVaultFile = "patch_vault_file",
|
|
DeleteVaultFiles = "delete_vault_files",
|
|
MoveVaultFiles = "move_vault_files",
|
|
ListVaultFiles = "list_vault_files",
|
|
|
|
// only used by gemini
|
|
RequestWebSearch = "request_web_search",
|
|
|
|
// multi agent calls
|
|
CreatePlan = "create_plan",
|
|
Replan = "replan",
|
|
SubmitPlan = "submit_plan",
|
|
CompleteStep = "complete_step"
|
|
}
|
|
|
|
export function fromString(functionName: string): AIFunction {
|
|
const enumValue = Object.values(AIFunction).find((value: string) => value === functionName);
|
|
if (enumValue) {
|
|
return enumValue as AIFunction;
|
|
}
|
|
Exception.throw(`Unknown function name: ${functionName}`);
|
|
}
|
|
|
|
export function isAIFunction(value: unknown, aiFunction: AIFunction): value is AIFunction {
|
|
return value === aiFunction;
|
|
} |