- Move MimeTypeToFileTypes and FileTypeToMimeType mappings to dedicated FileTypeMimeTypeMapping enum file
- Add empty content validation for file attachments
- Add PDF support for Gemini
- Display attachment references in user messages with file info
- Fix OpenAI unsupported mime type message formatting
- Improve URI list handling in InputService to include text/plain
- Update chat area padding and styling for better attachment display
- Prevent drag selection on chat padding element
- Update test assertions for new unsupported mime type message format
refactor: standardize file type and MIME type handling across AI providers
Introduce centralized MimeType enum and bidirectional mappings between file types and MIME types. Update Claude, Gemini, and OpenAI implementations to use consistent MIME type validation. Add file attachment support via drag-and-drop and paste in chat input. Expand supported file type detection to include programming languages, config files, and documentation formats.
Add a new "File Monitoring Guidelines" section in plugin settings that displays provider-specific information about uploaded file retention and cleanup. The section includes a help button that opens the Plugin Guide modal and updates dynamically based on the selected AI provider (Claude, Gemini, or OpenAI). Also update help modal content with file monitoring information and fix example template link.
- Add pageNumber field to ISearchSnippet and IPageText interfaces
- Update extractSnippets to process content as paginated text
- Switch PDF reading to use readPDF helper for page extraction
- Update search results to include page numbers in snippets
- Add page number assertions to VaultService tests
- Add isObserver parameter to updateChatAreaLayout for instant ResizeObserver updates
- Wrap chat area in container with top and bottom fade gradients
- Improve scroll visual feedback with gradient overlays
- Update dependencies: openai 6.15.0, svelte-check 4.3.5, @testing-library/svelte 5.2.10
Consolidate duplicate file upload and error handling code from Claude, Gemini, and OpenAI into shared `processAttachments` method in BaseAIClass. Remove unnecessary abort service wrapping from BaseAIFileService retry logic.
- Use getOuterHeight helper for accurate element measurements including margins
- Simplify gap calculation for thought and streaming indicators
- Add top fade gradient to chat area for better visual polish
- Queue AI file deletions to prevent blocking conversation deletion
- Only trigger modal close callback when no conversation is active
- Add file ID storage and upload tracking to Attachment class
- Store provider field in BaseAIClass for file service integration
- Update Claude, Gemini, and OpenAI to use file ID references
- Replace fetch with requestUrl for native Obsidian HTTP handling
- Implement graceful upload failure handling with user notifications
- Add retry logic with default values to prevent conversation breaks
- Optimize file cache refresh to run only when attachments present
- Filter empty function responses in conversation content validation
- Change listFiles() to synchronous method returning cached IDs
- Add type predicate to ApiError.isApiError() for better type narrowing
- Remove redundant ApiError union type in retry error handling
Replace boolean flags (isFunctionCall, isFunctionCallResponse,
isProviderSpecificContent) with explicit typed properties (functionCall,
functionResponse, attachments) in ConversationContent. Introduce Attachment
class and BaseAIFileService. Update all AI providers (Claude, Gemini, OpenAI)
to use new attachment-based binary file handling with proper error handling,
retry logic, and AbortService integration.
Implement new Files API service for all providers (not yet integrated).
Excludes image/PDF content blocks from text extraction when
isProviderSpecificContent flag is set, avoiding unnecessary token
usage. Updates ReadVaultFiles documentation to clarify image/PDF
reading capabilities and adds system prompt guidance for handling
binary file references.
Add support for reading images (PNG, JPG, JPEG, WebP) and PDFs in ReadVaultFiles. Implement provider-specific formatting for binary content (Claude, OpenAI, Gemini). Update conversation structure to handle binary files separately from text responses. Add unpdf library for PDF text extraction in search.
- Remove unused Platform import from ChatWindow
- Add grid column for mobile layout in TopBar
- Add await to tick() promise in UserInstruction
- Enhance refocusMainView with explicit focus setting in DiffView
Refactored focusInput to accept onMobile parameter to conditionally focus input based on platform, preventing annoying automatic keyboard popup on mobile devices when diff viewer opens/closes.
Simplify historical tool call/result format from bracketed text to JSON with HTML comments indicating completed status. Update system prompt to clarify this is historical context, not a pattern to reproduce. Improve chat area layout performance with debouncing and reduce minimum padding. Update all tests to match new format.
Remove custom backspace key handler in ChatInput and unused getElementBeforeCursor method in InputService. Clean up unused imports and associated test cases.
- Remove unused StoredFunctionCall/Response imports from AI classes
- Replace settled flag with shouldSettle parameter for better control
- Add ResizeObserver to handle dynamic content size changes
- Bind indicator elements for accurate height calculations
- Update layout calculation to account for indicators when not settled
Consolidate convertFunctionCallToText and convertFunctionResponseToText
methods from Claude and Gemini into BaseAIClass for code reuse. Update
OpenAI to handle missing function call IDs by converting to legacy text
format, preventing undefined call_id bugs during cross-provider switches.
Implement thought signature tracking for Gemini function calls to support Gemini 3 requirements. Migrate OpenAI integration from Chat Completions to Responses API with proper input/output item handling. Add cross-provider compatibility via legacy text format fallback for conversations without thought signatures or tool IDs. Improve chat auto-scroll behavior and conversation validation. Add and update AI class and conversation tests.
- Add mobile-specific controls with Accept/Reject buttons for diff review
- Centralize user rejection/suggestion messages in AIFunctionResponse
- Update VaultService to use centralized message constants
- Style mobile buttons with proper touch targets and theme colors
- Auto-focus main view after accepting/rejecting changes on mobile
Replace console.error/log with Exception.log helper, improve OpenAI error handling with retryable errors, add type-safe model validation, and add new AI models (Claude Opus 4.5, Gemini 3 Pro Preview, GPT-5.1)
Update submit button icon and behavior to correctly reflect state when diff
is open. Button now shows appropriate icon based on input content and
triggers correct action (stop vs suggestion) in diff mode.
This change simplifies the patch mechanism by replacing the unified diff format with a straightforward find-and-replace approach. The PatchVaultFile function now accepts oldContent and newContent parameters instead of a diff patch string, making it more intuitive and reliable for AI agents to use.
Key changes:
- Update PatchVaultFile function signature and documentation
- Replace diff.applyPatch() with String.replace()
- Simplify error handling for content matching
- Update all tests to reflect new API
- Remove unused applyPatch method from DiffService
- Fix diff container height calculation in CSS
- Fix error notification logic in ChatService
- Fix conversation deletion order in TopBar component
Implements unified diff patching as an alternative to WriteVaultFile for making targeted changes without replacing entire files. Includes new PatchVaultFile AI function, DiffService.applyPatch method, and comprehensive test coverage.
Introduce a new AbortService to centralize cancellation logic across all async operations, replacing scattered AbortSignal parameters with a unified singleton service. This improves maintainability and provides consistent cancellation behavior throughout the application.
Key changes:
- Add AbortService for centralized abort signal management with automatic cleanup
- Refactor all AI providers (Claude, Gemini, OpenAI) to use AbortService instead of passing AbortSignal parameters
- Update streaming operations to use centralized abort handling
- Add CancellationIndicator component to show visual feedback during operation cancellation
- Rename ChatAreaThought to ThoughtIndicator for better semantic clarity
- Add Environment enum for consistent environment detection
- Enhance ChatService lifecycle with proper cancellation state management
- Remove scattered abort-related UI selectors and error messages in favor of dedicated indicator
- Add safeContinue() factory method to ConversationContent for internal continuations
- Update all tests to reflect new abort handling architecture
This change simplifies the API surface by removing AbortSignal parameters from method signatures while improving the user experience with clearer cancellation feedback.
Improve component lifecycle management by converting DiffService and StatusBarService to extend Component class, ensuring proper cleanup and event handling. Add automatic service cleanup in DependencyService during deregistration.
Refine error handling in AI function responses to return error messages instead of Error objects for better serialization. Update user rejection messaging to provide clearer guidance to AI about stopping actions.
Implement a comprehensive diff viewing system that allows users to review and approve/reject file changes before they're applied. The system includes event-driven architecture for managing diff lifecycle and integrates diff2html for rich visual diffs.
Key changes:
- Add DiffService for managing diff approval workflow with accept/reject/suggest actions
- Create EventService for type-safe event handling (DiffOpened/DiffClosed)
- Add DiffView component with diff2html integration for visual diff rendering
- Modify VaultService to propose changes and require confirmation before file operations
- Update FileSystemService to support optional confirmation for write operations
- Add Event enum for centralized event type definitions
- Import custom styles and diff2html styles for proper diff rendering
- Update ConversationContent validation to support optional toolId field
- Remove FileManager from dependency injection (now accessed directly from app)
- Update .gitignore to track styles.css instead of main.css
Consolidate duplicate code from Claude, Gemini, and OpenAI implementations into a new BaseAIClass with common methods for parsing, filtering conversation contents, and error handling. Filter orphaned function calls without responses from conversation history to prevent API errors.