Commit Graph

12 Commits

Author SHA1 Message Date
fegger a573d33d0a Add undo manager and CoW semantics for tool execution
Replace the pending-actions preview flow with immediate execution and
undo support. ToolExecutor now accepts an UndoManager and records
create, modify, rename, and trash operations so users can roll back
batches.

Other fixes included:
- Deep-merge nested config objects on settings load to preserve new
  default fields
- Increase retry backoff from 10ms to 1000ms and widen the "invalid
  response format" check to handle prefixed messages
- Fix semantic cache clear to null out the collection reference
- Tighten memory regex to require "please always/never"
- Increase vault indexing batch size from 1 to 5
- Remove unused modeRequiresPreview helper
2026-05-26 09:50:23 +02:00
fegger 3ab8542cf4 Fix semantic cache distance calculation, tool path validation, and add deferred settings persistence
- Convert Chroma cosine distance to similarity (1 - distance) for correct threshold comparison
- Simplify forbidden directory check to match path segments instead of string prefixes
- Add debounced settings save via onPersist callback in ChatView to prevent data loss
- Fix workflow engine to pass availableTools to LLM when includeToolCalls is enabled
- Add targetFolder support to AutoLinker config and update tests
- Harden vault file indexing to await background indexing before processing create/modify/rename events
2026-05-21 20:41:58 +02:00
fegger b7b3a185a0 Add automatic folder creation for file operations and improve chat session handling
Implement `ensureFolderExists` in `ToolExecutor` to create parent directories when creating, moving, or renaming notes.
Update `ChatView` to properly persist agent mode and derive session titles from the first user message. Fix error
handling in tool execution to return structured failures instead of null, and include failure details in follow-up
messages.
2026-05-21 20:35:05 +02:00
fegger af9f0d165a Add list_vault_tags and get_vault_stats tools to all agent modes
Extend the tool registry to support vault-wide tag listing and statistical
overview tools, adding them to READ, EDIT, ORGANIZE, and RESEARCH agent
modes. Includes implementations for tag aggregation, folder structure
reporting, and metadataCache integration in VaultIndexer.
2026-05-21 10:08:05 +02:00
fegger 5350df92dd Add in-app debug log panel and rich vault search
- Add listener/history API to Logger for live log streaming
- Add toggle button and styled log panel to chat view
- Enhance ToolExecutor to use VaultIndexer for rich search results
- Instruct all agent modes to emit tool calls immediately instead of describing intent
2026-05-21 09:37:46 +02:00
fegger f1afba70ff Add structured memory injection and telemetry tracking
- Introduce buildMessagesWithMemory() to prepend memory context as a system
  message before LLM calls
- Record LLM call telemetry (tokens, duration) for follow-up requests in
  both streaming and non-streaming paths
- Add telemetry coverage for tool execution (success/failure, args,
  duration)
- Update tool-executor tests to verify telemetry integration with
  TelemetryManager
2026-05-20 22:46:42 +02:00
fegger 106abfa718 Integrate Obsidian metadataCache across extraction and tooling
Replaces regex-based parsing of frontmatter and headings with
Obsidian's metadataCache where available, falling back to regex
when the cache is unavailable. Propagates App dependency through
constructors to enable cache access.

Key changes:
- ContentExtractor accepts optional cache for frontmatter/headings
- ToolExecutor uses cache for section replacement and frontmatter
- NoteContextBuilder resolves titles/tags from cache
- VaultVectorStore passes cache through indexing pipeline
- AutoTagger checks cache for existing tags instead of content
- Mock updated with metadataCache stubs for tests
2026-05-20 20:36:47 +02:00
fegger 95a6954b50 Add vault note management tools
Expand the tool executor with create_note, append_to_note, replace_note_section,
update_frontmatter, rename_note, move_note, delete_note, and insert_link tools.
Rename create_file to create_note for consistency and add helper methods for
common file operations. Update tests to cover the new tools and renamed
functionality.
2026-05-20 18:19:09 +02:00
fegger 52b4a6c021 Add tests for conversation state, graph view, tool executor, and vectorization 2026-05-08 18:21:20 +02:00
fegger fd49abcdb9 Refactor error handling, client, and tests for Ollama integration 2026-05-06 16:30:16 +02:00
fegger 59df2f6856 Refactor Ollama client and related components
Update error handling and improve streaming capabilities in the Ollama client and related components. Key changes
include:

- Simplify error types and improve error handling
- Refactor streaming logic to use async generators
- Update tool execution and vault indexing
- Improve utility functions and types
- Update test files to reflect changes
2026-05-05 17:09:16 +02:00
fegger f638b06a86 initial commit 2026-05-04 22:05:10 +02:00