Commit graph

30 commits

Author SHA1 Message Date
Andrew Beal
10ddb1da28 feat: add artifact tracking system for agent file operations
Implement comprehensive artifact tracking to record all file modifications made by the AI agent during conversations. Add artifact persistence, garbage collection, and UI updates with new "Discuss" button styling.
2026-07-10 21:23:44 +01:00
Andrew Beal
fa92e15b8c feat: add plan approval UI with user review workflow
Add PlanApprovalService and PlanApprovalView to enable user review
and approval of AI-generated execution plans before execution begins.
Users can approve, reject, or suggest changes to plans through a new
input mode and dedicated view.
2026-07-06 16:11:30 +01:00
Andrew Beal
afaa530f8b feat: add mobile suggestion button and force-focus parameter
- Add "Suggest" button to mobile diff controls with three-column layout
- Replace focusInput's onMobile param with force param for explicit control
- Scope diff mobile button styles to prevent conflicts
- Enable focus on chat input when suggestion button clicked
2026-07-05 19:59:07 +01:00
Andrew Beal
13a09cdb89 refactor: improve settings UI with icon grids and standardized helpers
- Add Exclusions heading section in settings
- Replace activeDocument calls with Obsidian helper functions (createEl, createDiv, createSpan, createFragment)
- Standardize file monitoring disclaimers with icon grid layout
- Add template warning for local models with external documentation link
- Consolidate file disclaimer rendering logic with clickable help links
- Remove redundant tooltip enum entry
- Add new CSS classes for icon grid layouts
2026-07-04 13:27:22 +01:00
Andrew Beal
0d21c1e3e0 Implement local model support. 2026-07-04 12:16:08 +01:00
Andrew Beal
4763199f16 refactor: replace !important with doubled class selectors for specificity
Remove !important flags from API key validation and transparent button styles by using doubled class selectors (.class.class) to increase CSS specificity. Add explanatory comments documenting the specificity approach for future maintainability.
2026-05-31 14:57:03 +01:00
Andrew Beal
4887a10764 Refactor diff2html styles to use CSS variable remapping
Replace direct color overrides with systematic CSS variable remapping
that delegates to Obsidian's theme system. Map both light and dark
diff2html variables to corresponding Obsidian variables, allowing
automatic theme adaptation. Remove redundant theme-specific rules and
unnecessary !important declarations for cleaner, more maintainable code.
2026-05-25 16:46:37 +01:00
Andrew Beal
aed4caf347 refactor: replace custom markdown pipeline with Obsidian's native MarkdownRenderer.
Fix reactive issue for web and chat mode display.

Rewrites StreamingMarkdownService to use Obsidian's built-in MarkdownRenderer
instead of the unified/remark/rehype/KaTeX stack, eliminating ~700 lines of
custom markdown processing, CSS, and streaming state management. Internal link
handling now relies on Obsidian's native .internal-link class and data-href
attributes. The streaming split-point algorithm (freeze completed blocks, re-render
the live tail) is preserved.
2026-05-25 16:25:22 +01:00
Andrew Beal
5778b3df65 style: remove unused KaTeX and abbreviation CSS rules
Remove text-indent from .katex class and delete unused abbreviation styling for assistant message bubbles to clean up stylesheet.
2026-05-17 13:34:04 +01:00
Andrew Beal
6ed8bc8357 Address Obsidian review warnings. 2026-05-17 13:13:19 +01:00
Andrew Beal
9ca4f6f4f8 feat: add mobile drawer auto-hide when keyboard is active
Implement optional drawer element hiding on mobile devices when the chat input is focused, providing more screen space for the on-screen keyboard. Elements smoothly animate away on focus and restore on blur. Includes new setting in Advanced Settings section and updates Anthropic SDK to 0.91.1.
2026-04-25 21:13:59 +01:00
Andrew Beal
f693933950 refactor: replace Spinner boolean prop with customizable background color
Replace alternateBackground boolean prop with background string prop to allow direct CSS variable specification. Update QuickActionsService to add apply template action with file selection modal, timeout handling, and loading notices. Add helper method for markdown file retrieval.
2026-04-23 15:57:27 +01:00
Andrew Beal
66ed00dec0 feat: add full-width mobile drawer styling
Add CSS rules to make the right workspace drawer expand to full width on mobile devices, improving mobile usability and screen space utilization.
2026-04-20 00:06:13 +01:00
Andrew Beal
82e58b52e7 refactor: replace edit/planning mode toggles with unified chat mode selector
Replace separate editModeActive and planningModeActive boolean flags with a single ChatMode enum (ReadOnly, Edit, Planning). Add ChatModeSelector component for mode switching. Update all components to use chatMode instead of individual flags. Refactor MainAgent and ChatService to accept ChatMode parameter. Remove edit-mode styling variants throughout UI components. Update system prompt to document user reference system. Consolidate input button styling with shared input-button-highlight class.
2026-04-19 20:39:04 +01:00
Andrew Beal
3bc2b34aa2 feat: add web viewer content retrieval tool for AI agents
Add new get_web_viewer_content tool that allows AI agents to retrieve
text content or screenshots from open web views. Refactor AIToolResponse
to use AIToolResponsePayload class for structured responses with attachment
support. Update tool service to handle binary file attachments consistently
across read_vault_files and new web viewer tool.
2026-04-08 21:00:23 +01:00
Andrew Beal
f1e6619923 feat: add memory system for cross-session context retention
Add memories feature allowing AI to retain vault conventions, user preferences, and established workflows across conversation sessions. Include read-only mode option, validation requiring read-before-write, and settings UI with toggle controls.
Adjusted default search and snippet size values in plugin settings.
2026-04-04 20:04:41 +01:00
Andrew Beal
9276d2d0cd fix: improve mobile layout spacing and modal margins
- Add horizontal margin to conversation divider in TopBar
- Adjust grid row sizing in conversation history modal
- Remove margin from modals on mobile screens (≤600px)
- Reduce bottom margin for diff mobile controls
- Remove redundant background styling from diff button container
- Fix diff view height calculation on mobile to avoid control overlap
2026-01-30 10:00:16 +00:00
Andrew Beal
15fc41b35e Standardize border-radius CSS vars and improve modal spacing (post obsidian mobile UI change)
Replace legacy radius vars (--modal-radius, --button-radius, --input-radius) with standardized tokens (--radius-l, --radius-m). Add margins to modals and top bar divider for better spacing. Fix mobile diff view bottom margin to avoid Obsidian controls overlap.
2026-01-29 14:22:44 +00:00
Andrew Beal
0fb17e7b3a feat: add planning model selection and rate limit countdown UI
Introduce separate planning model setting to allow using different models for planning vs execution. Add visual countdown display when rate limits are hit, with improved retry delay parsing across providers (Claude, OpenAI, Gemini). Refactor settings tab into Views directory and enhance mobile layout for input controls.
2026-01-05 21:49:51 +00:00
Andrew Beal
275f548914 refactor: streamline planning UX and strengthen complexity gate
Restructure system prompt to enforce mandatory complexity evaluation before action. Replace verbose multi-step planning framework with concise gate-based decision model. Add UI for execution plan visibility. Improve planning/execution separation by blocking execution tools during planning phase. Remove cancellation indicator component. Fix conversation deletion bug preventing saves after delete. Strengthen type safety for AIFunction names. Simplify function summary format for planning agent. Update test mocks for new callback signatures.
2026-01-03 11:15:32 +00:00
Andrew Beal
ea9cd211fc refactor: extract MIME type mappings and improve attachment handling
- 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
2025-12-23 12:04:29 +00:00
Andrew Beal
13cdd0a162 feat: add support for file attachments via drag and drop and paste.
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.
2025-12-22 20:02:02 +00:00
Andrew Beal
3c9b5f9b73 feat: add mobile support for diff view with accept/reject buttons
- 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
2025-12-06 16:38:01 +00:00
Andrew Beal
065d475d74 Refactor file patching from unified diff to direct string replace
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
2025-12-05 23:02:55 +00:00
Andrew Beal
28772e7d0e feat: implement centralized abort controller with enhanced cancellation UX
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.
2025-12-04 23:04:20 +00:00
Andrew Beal
d93e61bc9d fix: improve chat service lifecycle and diff handling reliability
- Stop chat service before loading conversations and resetting
- Add proper diff cancellation with resolve callback
- Add runtime type guards for plugin settings API access
- Improve diff view layout with padding adjustments
- Remove overly permissive TypeScript ESLint overrides
2025-11-27 16:47:21 +00:00
Andrew Beal
c69351404b Add ability for users to provide suggestions during diff review through new DiffControls component. Integrate suggestion workflow into chat input, allowing users to approve/reject changes or provide feedback without interrupting the review process.
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.
2025-11-27 12:39:08 +00:00
Andrew Beal
2d5a1b52bf feat: add interactive diff viewer with user approval workflow
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
2025-11-24 21:29:54 +00:00
Andrew Beal
7efdac24cf Remove deprecated CSS files and enhance markdown processing service
- Deleted highlight-default.min.css, katex.min.css, and markdown.css as they are no longer needed.
- Implemented StreamingMarkdownService for improved markdown processing with support for math and syntax highlighting.
- Added StreamingService for handling streaming requests to the Gemini API with error handling and chunk parsing.
- Introduced styles_old.css for enhanced code block styling and better readability.
2025-09-26 20:48:05 +01:00
Andrew Beal
3f37870aaa Add markdown rendering support with KaTeX and highlight.js
- Updated package.json to include dependencies for rehype and remark plugins for markdown processing.
- Added default highlight.js CSS for code highlighting.
- Included KaTeX CSS for rendering mathematical expressions.
- Created markdown.css for styling markdown content in the Obsidian plugin, incorporating styles for headings, paragraphs, lists, tables, and code blocks.
- Customized highlight.js colors to match Obsidian theme.
2025-09-16 17:14:37 +01:00