Commit graph

388 commits

Author SHA1 Message Date
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
Andrew Beal
e0a5dc6582 fix(build): neutralize dynamic requires in officeparser browser bundle
Prevent esbuild from resolving dynamic require() calls in officeparser's
bundled code by replacing its require shim with a stub that throws and
stripping eval("require")("stream") calls. This ensures the bundle remains
self-contained and prevents "fs" module errors on Obsidian mobile.
2026-03-22 17:19:15 +00:00
Andrew Beal
dc8bc1583a chore: update dependencies to latest versions
Update multiple packages including AI SDKs, build tools, and dev dependencies to their latest minor/patch versions
2026-03-21 23:24:09 +00:00
Andrew Beal
9a6bfdffa0 refactor: centralize file attachment message using Copy enum
Replace hardcoded "The contents of the file" strings across all AI provider classes (Claude, Gemini, Mistral, OpenAI) with centralized Copy.AttachedFile enum value. Update SystemPrompt to document attached file behavior and clarify files are not in vault. Fix officeparser import to use named export and add esbuild plugin to handle browser bundle's IIFE format for mobile compatibility.
2026-03-21 17:20:31 +00:00
Andrew Beal
fed0287ba0 fix: use officeparser browser bundle for Obsidian mobile compatibility
Alias officeparser to its browser bundle to avoid Node.js "fs" module dependency that crashes on Obsidian mobile. The browser bundle provides identical functionality using web APIs.
2026-03-15 20:47:43 +00:00
Andrew Beal
6ea5981644 Bump plugin version to 1.2.6 2026-03-15 20:11:04 +00:00
Andrew Beal
7c1af608f2 docs: update file format support to include Office/ODF documents
Update documentation across README and Copy.ts to reflect expanded file
format support beyond PDFs to include Office (DOCX, PPTX, XLSX) and ODF
(ODT, ODP, ODS) documents. Update acknowledgments to credit officeparser
and unpdf libraries instead of pdf-parse.
2026-03-15 20:10:44 +00:00
Andrew Beal
54fd754b24 Bump dependency versions. 2026-03-15 20:03:08 +00:00
Andrew Beal
a4c65f16c2 Update file attachment messaging and add document file support
Add support for DOCX, PPTX, XLSX, ODT, ODP, and ODS document formats by converting them to plain text. Standardize attachment introduction messages across all AI providers from "Binary data for X follows" to "The contents of the file 'X' are provided below."
2026-03-15 19:48:28 +00:00
Andrew Beal
562ab8d036 fix: add scrolling to user messages and validate file uploads
- Limit user message height to 15vh with hidden scrollbar
- Show notice for unsupported file types instead of silently failing
- Extract file type check to prevent invalid MIME type lookups
2026-03-15 12:21:41 +00:00
Andrew Beal
47ce3e5c88 Add Obsidian Bases documentation to AI prompts
Extend ExecutionPrompt, OrchestrationPrompt, and PlanningPrompt with comprehensive Bases plugin reference covering file structure, property namespaces, filter/formula syntax, view configuration, and context resolution rules.
2026-03-08 11:35:21 +00:00
Andrew Beal
b0fe1663bb Bump plugin version to 1.2.5 2026-03-08 11:30:10 +00:00
Andrew Beal
0a49abed20 docs: add Obsidian Bases plugin documentation to system prompt
Add comprehensive documentation for the Obsidian Bases core plugin including file structure, property namespaces, filter syntax, formula syntax, view configuration, and usage guidelines.
2026-03-08 11:29:07 +00:00
Andrew Beal
581c7f1686 refactor: standardize background colors to use primary variant
Update Spinner and ThoughtIndicator components to use --background-primary instead of --background-secondary and --background-primary-alt for visual consistency across the UI.
2026-03-05 23:14:43 +00:00
Andrew Beal
199133d59e fix: add missing parameter to vaultService.create call 2026-03-02 22:04:53 +00:00
Andrew Beal
167f67c3a6 refactor: rename userInstructionActive to userInstructionAreaActive
Separate UI state (userInstructionAreaActive) from content state
(userInstructionActive). Add dynamic check for non-empty user instruction
to update button highlight indicator based on actual content.
2026-03-01 12:37:18 +00:00
Andrew Beal
26ea06cbbe docs: add Mistral AI support documentation throughout README 2026-02-28 14:49:46 +00:00
Andrew Beal
3ea42e9437 refactor: simplify Mistral model enum naming conventions
Remove version numbers from Mistral model enum names (MistralLarge_3 → MistralLarge, MistralMedium_3_1 → MistralMedium, MistralSmall_3_2 → MistralSmall) and update display text to indicate "latest" versions. This aligns naming with the underlying "latest" API endpoints and improves maintainability.
2026-02-28 14:43:12 +00:00
Andrew Beal
6864dc04d3 Bump plugin version to 1.2.4 2026-02-28 14:36:53 +00:00
Andrew Beal
8f90177e97 test: use AITool enum for tool name in Mistral test 2026-02-28 14:35:22 +00:00
Andrew Beal
f8eef3798e refactor: ensure invalid provider models always result in a valid model combination. 2026-02-28 14:33:37 +00:00
Andrew Beal
8e9718ba01 Add comprehensive Mistral AI provider integration with cross-provider tests
Implement complete Mistral AI support including message formatting, tool calls with ID validation (9-char alphanumeric), streaming, file attachments, and conversation naming service. Add extensive cross-provider integration tests covering Mistral interactions with Claude, OpenAI, and Gemini, including round-trip conversions, ID validation, and mixed conversation handling. Update all test fixtures to include Mistral API keys.
2026-02-28 14:29:26 +00:00
Andrew Beal
f5c85fecf4 docs: add wiki-link format rules and examples to system prompt
Expand wiki-link documentation with format rules for subdirectories, headings, and aliases. Include a comparison table showing common mistakes and correct usage to prevent folder path errors and improve link readability.
2026-02-28 14:26:16 +00:00
Andrew Beal
04926f84b9 feat: add Mistral AI provider support with file handling and conversation naming 2026-02-28 14:12:30 +00:00
Andrew Beal
3969825be6 chore: bump dependencies across multiple packages 2026-02-28 14:10:34 +00:00
Andrew Beal
de224445be Bump plugin version to 1.2.3 2026-02-20 16:22:10 +00:00
Andrew Beal
0fd231b3b6 test: update mock model to GPT_5_Nano in naming service test 2026-02-20 16:21:40 +00:00
Andrew Beal
256ea568a8 Add invalid model recovery on settings load (can happen if a model has been retired but was in use).
Reinforce faithful plan request in ExecuteWorkflow tool.
2026-02-20 01:27:16 +00:00
Andrew Beal
d3b461efc7 Add new models for Gemini and Claude. Remove older models for OpenAI and Sonnet 3.7. 2026-02-20 00:56:18 +00:00