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.
- Change ChatMode enum values from numeric (0,1,2) to string literals ("read_only", "edit", "planning")
- Move chat mode state management from ChatWindow to SettingsService with persistence
- Add chat mode awareness to system prompts and tool validation
- Replace Map with WeakMap for settings subscribers to prevent memory leaks
- Add type-safe event handlers to EventService
- Update esbuild and TypeScript targets from ES2018/ES2020 to ES2022
- Add requiresEditModeEnabled() validation to prevent tool hallucination in read-only mode
- Update all test fixtures to include chatMode in mock settings
Add sparkles button to view-actions bar that provides access to beautify
and apply template quick actions. Refactor QuickActionsService to use
WorkSpaceService instead of AbortService for workspace interactions and
clear chat name on conversation reset.
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.
Emit tool call start events immediately when tools begin execution,
allowing UI to display contextual "thinking" messages (e.g., "Generating
note contents..." for WriteVaultFile) before tool completion. Add
Spinner to ThoughtIndicator component for visual feedback during tool
operations.
- Remove isObserver parameter from updateChatAreaLayout
- Extract layout calculation logic into separate applyLayout function
- Add resetAutoScroll export to re-enable auto-scrolling
- Clear layoutUpdateTimeout when debounce is interrupted
- Simplify conditional logic for instant vs debounced updates
- Call resetAutoScroll when submitting new message
Restructure the AI workflow from a single-agent model to a specialized
multi-agent system with distinct roles:
- Add AgentType enum (Main, Orchestration, Planning, Execution) to define
agent specializations
- Replace AIControllerService and AIFunctionService with modular agent
classes in Services/AIServices/:
- MainAgent: Handles user interaction and delegates to orchestration
- OrchestrationAgent: Coordinates plan execution and step-by-step workflow
- PlanningAgent: Creates and revises execution plans
- ExecutionAgent: Executes individual plan steps
- AIController: Base class providing common agent loop functionality
- Create specialized prompts (OrchestrationPrompt, ExecutionPrompt) for
agent-specific behavior
- Add OrchestrationResult type to communicate workflow control decisions
(continue, abort, replan)
- Introduce agent-specific function scoping:
- ExecuteWorkflow for main agent
- CompleteTask for execution agent
- CompleteStep/Replan/CancelPlan for orchestration agent
- SubmitPlan/AskUserQuestionPlanning for planning agent
- Update BaseAIClass to use agentType property instead of isPlanningAgent
boolean for model selection
- Simplify ExecutionPlan and ExecutionStep types by removing execution
state tracking (moved to agent coordination)
- Remove PlanningEnabledAppendix and ExecutionStatus enum (superseded by
agent architecture)
- Add comprehensive integration tests for agent workflows
This architecture provides better separation of concerns, clearer agent
responsibilities, and more robust plan execution with explicit orchestration
control flow.
Add distinct AskUserQuestionPlanning and AskUserQuestionExecution functions to enable user consultation during both planning and execution phases. Update system prompt to clarify when to seek user input vs. replan. Fix plan area rendering timing and improve execution flow handling.
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.
Enhance user question display with markdown rendering for better readability.
Display formatted questions with emphasis, lists, and code snippets. Adjust
input display max-height based on platform (mobile: 15vh, desktop: 30vh).
- Add MAX_AGENT_DEPTH check to prevent infinite planning recursion
- Prompt user to submit plan if not provided instead of silent failure
- Clear planning mode when deactivating edit mode
- Remove inline overflow-y style in favor of CSS declaration
- Update error copy for clarity
- Remove unused deactivateEditMode method
- Add planning mode toggle and AskUserQuestion function for interactive planning
- Fix Gemini cross-provider function call detection using toolId presence
- Update OpenAI naming service to handle new response format
- Improve system prompts by removing complexity gate, streamlining to action-first principle
- Add InputDisplay component and question mode to ChatInput
- Refactor execution plan error messages to show all incomplete steps
- Update tests to reflect cross-provider function call format changes
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.
- Include user's current active file path in chat requests
- Move conversation save after attachments are added
- Extract formattedRequest in suggest handler
- Add WorkSpaceService.getActiveFile() method
- Remove premature chatArea layout update
- Update unit tests
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.
- 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.
- 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
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.
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.
Move API key storage from single key to per-provider keys. Extract
settings logic from plugin to new SettingsService, updating all AI
classes and components to use centralized service. Add visual
indicators for active user instructions in UI.
refactor: rename type interfaces to use I prefix convention
Standardize naming by adding I prefix to all interface types across the codebase (StreamChunk → IStreamChunk, SearchMatch → ISearchMatch, etc.). Also rename conversationStore.ts to ConversationStore.ts for consistency.
Move input field, submit button, and edit mode toggle from ChatWindow into a new ChatInput component to improve separation of concerns and code maintainability.
- Remove autoResize() function and calls
- Set input field height to 100% instead of dynamic resizing
- Adjust input padding from var(--size-2-1) to var(--size-2-2)
- Remove explicit height: 100% from edit-mode and submit buttons
Refactor input field from HTMLTextAreaElement to contenteditable div to enable better text formatting support. Update event handlers, styling, and auto-resize logic accordingly.
Add behavior parameter to scrollChatArea to allow explicit control over
scroll animation (smooth vs instant) based on context. Use instant scroll
when loading conversations, smooth for user-initiated actions, and none
for completion states.
- Extract functionCall/functionResponse objects properly in Gemini
- Reset chat area state when loading conversations
- Add SanitiserService for path validation
- Prevent duplicate conversation names
- Improve chat scrolling and padding logic
- Clear streaming state on submission complete
- Split content and functionCall into separate fields in ConversationContent
- Extract content parsing logic into dedicated methods for Claude and Gemini
- Add API error 429 handling with provider-specific user information
- Improve error messages in naming services to include response text
- Increase max_tokens for main requests and naming services
- Optimize ChatService to reduce unnecessary saves and array recreations
- Remove message key binding in ChatArea to improve performance
- Adjust chat window max-width to fixed pixel value
- Wrap assistantMessageAction in tick() to resolve race condition with streaming indicator removal
- Replace interactive-accent with alt-interactive-accent for edit-mode UI elements
- Add alt-interactive-accent CSS variables as color-mixed variants of interactive-accent
Replace hardcoded color values and custom CSS variables with Obsidian's
built-in theme variables for backgrounds, borders, and interactive elements.
Removes unused isStreaming state and simplifies gradient background. Updates
view display text to "AI Agent".
Implement real-time input/output token tracking in the status bar by
integrating ITokenService with ChatService. Token counts are calculated
from conversation history and updated on conversation load, reset, and
message completion.
- Extract typing-in animation from ChatArea to global styles.css for reuse
- Add conversation title display in TopBar with fade transition
- Update ChatService to notify title changes via onNameChanged callback
- Fix ConversationNamingService to trigger callback after saving new title
- Clean up unused isAborting flag in ChatService
- Adjust grid layout in TopBar to accommodate title display
- Rename DeleteVaultFile to DeleteVaultFiles with array support
- Add MoveVaultFiles function for file relocation and renaming
- Refactor file operations to return structured success/error results
- Move directory creation logic to VaultService
- Register FileManager dependency for file operations
- Fix CSS variable for interactive accent blue hover state
Replace direct `--color-blue` references with new `--interactive-accent-blue` variable that blends interactive accent with blue, enabling consistent theme-aware styling across edit mode UI elements.
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.
Reorganize system prompt with clearer operating principles, vault-first
decision heuristics, semantic directory architecture, and comprehensive
examples. Improve multi-tool workflow guidance and error handling patterns.
Extract edit mode toggle to dedicated function for better code organization.
- Deactivate edit mode when resetting or loading conversations
- Fix cancelled request detection using Selector instead of Copy enum
- Standardize quote style in StreamingMarkdownService to double quotes
- Add allowDestructiveActions parameter throughout AI request chain
- Implement edit mode UI toggle with visual indicators
- Update getQueryActions to conditionally include destructive tools
- Add blue highlight styling when edit mode is active
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.
- 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
- Add AbortSignal parameter to streamRequest interface and implementations
- Implement handleStop function to abort ongoing requests
- Change submit button to stop button when streaming
- Handle AbortError gracefully with user-friendly message
- Add styling for cancellation notification