Commit graph

416 commits

Author SHA1 Message Date
Andrew Beal
3e1b52fe1c Bump plugin version to 1.3.4 2026-05-05 21:21:25 +01:00
Andrew Beal
6c23df562b chore: update dependencies to latest versions 2026-05-05 21:13:32 +01:00
Andrew Beal
8823e3cf23 refactor: convert ChatMode enum to string literals and improve state management
- 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
2026-05-05 20:54:34 +01:00
Andrew Beal
31f0484114 test: add subscribeToSettingsChanged mock and update settings tests
Mock the new subscribeToSettingsChanged method in all AI provider test files to prevent test failures. Update SettingsService tests to use updateSettings method instead of direct settings modification and saveSettings calls, aligning with the new reactive settings API that notifies subscribers of changes.
2026-05-04 16:31:49 +01:00
Andrew Beal
da2d777087 Refactor SettingsService to use immutable settings with update pattern
- Change settings from mutable to readonly with updateSettings method
- Add settings change subscription system for reactive updates
- Remove direct property mutations throughout codebase
- Make API key reactive to provider changes via subscription
- Consolidate all settings updates through single async method
- Remove unused RegisterAiProvider export and AIToolDefinitions.isGated
2026-05-04 16:31:27 +01:00
Andrew Beal
d2edd167dc Bump plugin version to 1.3.3 2026-04-26 16:41:48 +01:00
Andrew Beal
145c4c817f Update unit test after GPT 5.5 update 2026-04-26 16:40:55 +01:00
Andrew Beal
0107878a10 Update GPT-5.4 model references to GPT-5.5 and add hideDrawerElements to test mocks 2026-04-26 00:05:41 +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
b21207adcf refactor: improve capability directive clarity and web search guidance
Update system prompts to use clearer, more direct language for capability directives. Change from "do NOT attempt" to "unavailable" for disabled features. Add explicit guidance to prefer web search when enabled for current information.
2026-04-24 20:18:37 +01:00
Andrew Beal
f46f738ca7 Bump plugin version to 1.3.2 2026-04-24 16:00:41 +01:00
Andrew Beal
955d711ba1 docs: update Quick Actions documentation for mobile and toolbar support 2026-04-24 16:00:11 +01:00
Andrew Beal
bbb3630a8f fix: prevent toolbar button injection when no active markdown view 2026-04-24 15:57:41 +01:00
Andrew Beal
841b3af5a4 feat: add toggleable quick actions with context menu and toolbar options
Add settings to enable/disable quick actions in both the editor context menu and toolbar. Implement dynamic registration system that updates when settings change. Include event-driven architecture for settings changes and improve toolbar injection logic. Update dependencies to latest versions.
2026-04-24 15:52:06 +01:00
Andrew Beal
7be9b3f321 feat: add AI quick actions button to view header
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.
2026-04-24 14:15:56 +01:00
Andrew Beal
5762826b06 Bump plugin version to 1.3.1 2026-04-23 17:12:41 +01:00
Andrew Beal
1402456660 refactor: simplify event handlers and adjust grid layout spacing
Simplify onClick handlers by removing unnecessary arrow functions and add extra auto row to grid template for improved layout flexibility
2026-04-23 17:12:06 +01:00
Andrew Beal
a2b21529a8 Bump plugin version to 1.3.0 2026-04-23 16:28:25 +01:00
Andrew Beal
5325ed41f4 docs: update README to reflect new chat modes and quick actions 2026-04-23 16:28:09 +01:00
Andrew Beal
111b9ad1b4 chore: bump vitest from 4.1.4 to 4.1.5 and update dependencies 2026-04-23 16:11:34 +01:00
Andrew Beal
21e237c80a test: rename FileSystemService methods in mocks to match interface
Update test mocks to use renamed methods: readFile → readFilePath, writeFile → writeToFilePath, patchFile → patchFileAtPath. Add activeWindow and activeDocument globals to test setup for Obsidian compatibility.
2026-04-23 16:10:03 +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
28c8ccb44b feat: add quick actions system with provider-aware model settings
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.
2026-04-20 20:20:22 +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
df5d62d981 refactor: improve message height calculation and update dependencies
- Calculate height for consecutive assistant messages instead of just last message
- Track message role in ChatArea for proper height calculation
- Update MultiAgentIntegration test to use ChatMode enum
- Update officeparser browser bundle path and shim for v6
2026-04-19 23:53:14 +01:00
Andrew Beal
75972dc5ff chore: update dependencies to latest versions
Update AI SDKs (@anthropic-ai/sdk, @google/genai), core libraries (diff, uuid, officeparser, unpdf), TypeScript tooling, and various dev dependencies to their latest releases
2026-04-19 23:16:31 +01:00
Andrew Beal
e542134b9f feat: implement file attachment button functionality
Add handleAttachments function to create file input dialog and process
selected files through inputService. Wire up attachment button click
handler and update aria-label to use Copy.ButtonAttachFiles enum value.
2026-04-19 21:01:24 +01:00
Andrew Beal
f51f171da2 refactor(test): replace boolean params with ChatMode enum in AIControllerService tests 2026-04-19 20:41:28 +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
d3c2a01da9 Bump plugin version to 1.2.9 2026-04-12 12:58:31 +01:00
Andrew Beal
c414915688 Update OpenAI models from GPT-5.2 to GPT-5.4, add Gemini 3.1 Flash Lite, reorder Gemini models, and bump dependencies 2026-04-12 12:58:16 +01:00
Andrew Beal
6671f50078 Bump plugin version to 1.2.8 2026-04-10 22:33:47 +01:00
Andrew Beal
1664a4597e docs: expand feature descriptions for folders, memory, and web access 2026-04-10 22:32:55 +01:00
Andrew Beal
54aaa9f0c6 chore: update dependencies to latest versions
Update AI SDK packages (@anthropic-ai/sdk, @google/genai, openai), development dependencies (@types/node, @typescript-eslint/*, @vitest/*, svelte, vitest), and various supporting packages (katex, content-disposition, qs, postcss, etc.)
2026-04-10 22:25:19 +01:00
Andrew Beal
f3485e040f test: add enableWebSearch and enableWebViewer to mock settings 2026-04-10 22:24:05 +01:00
Andrew Beal
d52b1c3c74 feat: add conditional web viewer access setting and directive system
Introduce a new setting to control AI access to the web viewer tool and refactor prompt building to inject capability directives (memories, web search, web viewer) into all agent contexts. Update tool definitions to conditionally include web viewer and memory tools based on settings. Consolidate memories injection and active directives into a unified prompt builder pattern.
2026-04-10 22:19:34 +01:00
Andrew Beal
ac1dcf7f83 feat: add toggleable web search with UI control and provider-specific implementations
Implement web search toggle functionality across all AI providers (Claude, Gemini, Mistral, OpenAI) with conditional tool inclusion based on settings. Add globe button to chat input for toggling web search on/off. Change formatBinaryFiles visibility from public to protected in BaseAIClass and IAIClass interface. Extract tool configuration into private getTools() methods for each provider. Update tests to verify web search toggle behavior and formatBinaryFiles access level changes.
2026-04-10 10:47:23 +01:00
Andrew Beal
57fb5d3be3 feat: add move_vault_folder tool and standardize schema naming
- Add MoveVaultFolder tool with supporting schema and enum
- Rename schemas from *Schema to *ArgsSchema for consistency
- Fix VaultService.move() to handle folder destinations properly
- Update AIToolResponse to use AIToolResponsePayload wrapper
- Update error message for non-existent move sources
- Add MoveVaultFolder import and tool registration
2026-04-09 22:20:37 +01:00
Andrew Beal
16c9107606 feat: add delete_vault_folder tool with confirmation parameter
Implement DeleteVaultFolder schema, tool definition, and service method with confirmation guard. Update FileSystemService.deleteFolder and VaultService.delete to handle folder deletion with exclusion checks. Fix deleteFile type guard to ensure TFile instance.
2026-04-08 23:08:21 +01:00
Andrew Beal
540b76e0ea test: update tests to use AIToolResponsePayload wrapper class
Refactor all test files to wrap tool response data in AIToolResponsePayload instances instead of passing raw objects directly to AIToolResponse constructor. Update assertions to access response data via payload.response property.
2026-04-08 21:16:59 +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
ae321f382a feat: add create_vault_folder tool for directory creation
Add new AI tool to create vault folders with proper permission checks and error handling. Refactor createDirectories to be public and handle both file and directory paths. Update WriteVaultFile description formatting and fix method naming consistency.
2026-04-06 18:07:59 +01:00
Andrew Beal
a32f153087 Add provider-level tool call handling with Mistral web search support
Implement optional `resolveToolCall` method in IAIClass interface to allow providers to handle specific tools before falling through to AIToolService. Add Mistral web search capability using native agent API, enabling dynamic tool resolution at the provider level.
2026-04-06 11:28:45 +01:00
Andrew Beal
0ffaa95a57 test: add memory settings to mock configurations
Updated all test mock settings objects to include enableMemories and allowUpdatingMemories fields with default values
2026-04-04 20:36:21 +01:00
Andrew Beal
5a3900049b fix: improve memories error message with dynamic length limits
- Update error message to show actual max lines and words per line
- Return error message from updateMemories instead of success boolean
- Add SettingsService mocks to all agent tests to prevent initialization errors
- Update test expectations for new default search limits (30 results, 100 snippet size)
2026-04-04 20:34:32 +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
b752d8e75b chore: remove Conversation.path field and update dependencies
- Remove unused `path` property from Conversation class and its test
- Initialize `items` and `conversations` arrays in ConversationHistoryModal
- Use `Exception.messageFrom()` for safer error serialization in StreamingMarkdownService
- Fix redundant type cast in obsidian mock's Events.on()
- Bump @anthropic-ai/sdk, @google/genai, openai, esbuild, svelte, typescript, vitest, and other minor deps
2026-04-03 11:03:41 +01:00
Andrew Beal
df44c7ad62 Bump plugin version to 1.2.7 2026-03-22 23:16:01 +00:00
Andrew Beal
0d0f23ae7d Update file attachment messages to use centralized copy management
Replace hardcoded "provided below" strings with "included below" and migrate to centralized Copy enum system for consistent messaging across Claude, Gemini, Mistral, and OpenAI implementations.
2026-03-22 23:11:31 +00:00
Andrew Beal
5f63f7c744 feat: add stacked layout for chat input when content wraps
Add dynamic layout switching that moves input buttons below the text
area when content height exceeds initial height. Includes height
tracking, state management via checkStacked(), and CSS grid updates
for stacked mode on desktop only.
2026-03-22 20:07:26 +00:00