mirror of
https://github.com/andy-stack/vaultkeeper-ai.git
synced 2026-07-22 16:30:27 +00:00
Introduce QuickActionsService and QuickAgent for lightweight, single-shot AI operations. Add a dedicated quickActionModel setting alongside a new top-level provider setting, with validation ensuring all models match the selected provider and provider-specific defaults. Refactor FileSystemService to offer both TFile and path-based overloads (readFile/readFilePath, writeToFile/writeToFilePath, patchFile/patchFileAtPath). Replace window/document globals with activeWindow/ activeDocument throughout InputService and VaultkeeperAISettingTab for Obsidian mobile compatibility. Update linting packages to latest.
46 lines
No EOL
1.5 KiB
TypeScript
46 lines
No EOL
1.5 KiB
TypeScript
export enum AITool {
|
|
SearchVaultFiles = "search_vault_files",
|
|
ReadVaultFiles = "read_vault_files",
|
|
WriteVaultFile = "write_vault_file",
|
|
PatchVaultFile = "patch_vault_file",
|
|
DeleteVaultFiles = "delete_vault_files",
|
|
MoveVaultFiles = "move_vault_files",
|
|
CreateVaultFolder = "create_vault_folder",
|
|
DeleteVaultFolder = "delete_vault_folder",
|
|
MoveVaultFolder = "move_vault_folder",
|
|
ListVaultFiles = "list_vault_files",
|
|
ReadMemories = "read_memories",
|
|
UpdateMemories = "update_memories",
|
|
GetWebViewerContent = "get_web_viewer_content",
|
|
|
|
// used by gemini and mistral
|
|
RequestWebSearch = "request_web_search",
|
|
|
|
// multi agent calls
|
|
ExecuteWorkflow = "execute_workflow",
|
|
SubmitPlan = "submit_plan",
|
|
CompleteTask = "complete_task",
|
|
CompleteStep = "complete_step",
|
|
SkipStep = "skip_step",
|
|
ReviseStep = "revise_step",
|
|
RevisePlan = "revise_plan",
|
|
ContinuePlanExecution = "continue_plan_execution",
|
|
CompletePlan = "complete_plan",
|
|
CancelPlan = "cancel_plan",
|
|
AskUserQuestionPlanning = "ask_user_question_planning",
|
|
AskUserQuestionExecution = "ask_user_question_execution",
|
|
|
|
Unknown = "unknown"
|
|
}
|
|
|
|
export function fromString(functionName: string): AITool {
|
|
const enumValue = Object.values(AITool).find((value: string) => value === functionName);
|
|
if (enumValue) {
|
|
return enumValue;
|
|
}
|
|
return AITool.Unknown;
|
|
}
|
|
|
|
export function isAITool(value: unknown, aiTool: AITool): value is AITool {
|
|
return value === aiTool;
|
|
} |