Commit graph

11 commits

Author SHA1 Message Date
Andrew Beal
76afac7ffc refactor: enhance file operations to support batch reads and deletion
- Rename ReadVaultFile to ReadVaultFiles with multi-file support
- Add DeleteVaultFile function with confirmation parameter
- Update function references and error handling
- Return detailed error objects from FileSystemService
2025-10-15 21:06:23 +01:00
Andrew Beal
9f8d0b5ee8 feat: rename ReadFile to ReadVaultFile and add WriteVaultFile function
- Rename ReadFile to ReadVaultFile for consistency
- Add WriteVaultFile function for destructive operations
- Fix array concatenation bug in getQueryActions
- Return all vault files when search yields no results
- Update SearchVaultFiles description to clarify fallback behavior
- Improve error handling in writeFile to return error details
- Reorder system prompt sections for better clarity
2025-10-14 22:42:52 +01:00
Andrew Beal
d58e9ef1ff refactor: enhance vault search to return content snippets with context
- Update SearchVaultFiles function to return contextual snippets instead of just file lists
- Implement snippet extraction with configurable context length (300 chars)
- Add snippet merging logic to consolidate overlapping matches
- Limit results to 20 randomly sampled matches when exceeding threshold
- Update return types across service layer to use SearchMatch/SearchSnippet
- Change regex flags to 'ig' for global case-insensitive matching
2025-10-14 19:50:45 +01:00
Andrew Beal
f2a7a41705 refactor: replace ListVaultFiles with content-based SearchVaultFiles
Replace list_vault_files function with search_vault_files that performs regex-based content search instead of listing all files. Add escapeRegex helper for search term sanitization. Remove unused edit mode CSS.
2025-10-14 18:54:16 +01:00
Andrew Beal
c188f5727e Add allowAccessToPluginRoot parameter to prevent AI editing user instructions
This change adds a new `allowAccessToPluginRoot` parameter throughout the filesystem and vault service layers to control access to plugin root directories. The AI assistant is now prevented from modifying the user instruction file while still allowing internal plugin operations to access conversation data and configuration files.
2025-10-12 23:11:36 +01:00
Andrew Beal
e543bf5351 refactor: improve dependency injection type safety and add AI exclusions setting
- Add generic types to all Resolve() calls for type safety
- Introduce VaultService abstraction layer for file operations
- Add AI File Exclusions setting with textarea and glob pattern support
- Refactor FileSystemService to use VaultService instead of direct Vault access
- Improve code organization with comments and renamed variables
- Update styles for exclusions input field
2025-10-12 21:26:01 +01:00
Andrew Beal
d910239a7f Add wiki-link support, API key validation, and refactor AI provider initialization
Implement clickable wiki-links in assistant responses with WorkSpaceService for note navigation. Add API key validation with visual feedback in ChatWindow, automatically opening settings when empty. Extract settings helper to reduce code duplication. Refactor Gemini class to resolve API key from plugin settings rather than constructor parameter. Update system prompt with wiki-link usage guidelines. Remove unused ODB cache implementation and loadExternalCSS helper. Improve UI with enhanced empty state styling and input textarea scrolling behavior.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-08 22:06:25 +01:00
Andrew Beal
74eb20c2a1 Implement conversation history modal with Svelte component, enhance conversation file system service for loading conversations, and update styles for modal presentation. Refactor file handling methods and remove unused modal service. 2025-10-05 13:06:05 +01:00
Andrew Beal
adbe6045cf Implement conversation reset functionality and file deletion in ConversationFileSystemService 2025-10-03 22:14:30 +01:00
Andrew Beal
370c5d54bb Refactor plugin to replace DmsAssistant with AIAgent, updating imports, services, and manifest files accordingly 2025-10-02 11:10:57 +01:00
Andrew Beal
523a95f3d5 Refactor services and helpers: reorganize imports, implement ConversationFileSystemService, and enhance FileSystemService functionality 2025-09-30 21:20:24 +01:00