Fix rag_fetch_all: cast DOUBLE[] to VARCHAR for DuckDB FromSql compatibility
Details
DuckDB's Rust driver doesn't implement FromSql for Vec<f64>. Cast the
embedding column to VARCHAR in SQL and parse the resulting array string
in Rust via a parse_duckdb_array helper.
Store chunk text in RAG index and remove hardcoded plugin knowledge from chat
Details
Add chunk_text column to rag_vectors table so search results include the
original indexed content, not just titles. This enables the AI chat to
reference actual entity details (descriptions, due dates, notes) when
answering user queries.
Changes:
- Rust: add chunk_text TEXT column to rag_vectors (migration + CREATE TABLE)
- Rust: pass chunk_text through rag_upsert and return it from rag_search
- FFI: add chunk_text field to RagUpsertRequest with serde(default)
- C# RagIndexService: pass chunk.Text through upsert JSON
- C# RagSearchResult: add ChunkText property
- C# RagSearchService: parse chunk_text from FFI response
- C# Chat: replace FormatEntityTypeLabel() hardcoded switch with direct
EntityType usage from RAG results, and format results with truncated
chunk text content (500 chars cloud, 200 chars local)
Removes plugin isolation violation where the shell hardcoded entity type
display names (page->Note, task->Task, etc). Entity types now flow
directly from the plugin-provided ContentChunk.EntityType field.
Wire RAG semantic search into AI chat flow
Details
The RagSearchService existed but was never called during chat. Now
SendChatMessageAsync runs a semantic search against the RAG vector index
before building the system prompt, injecting relevant entity titles and
types as context. Cloud models get up to 10 results; local models get 5.
Results below a 0.3 cosine similarity threshold are filtered out.
This gives the AI awareness of the user's notes, tasks, contacts, events
and other indexed content when answering questions. (v1.57.4)
Fix DI resolution failure and wire RAG indexing for local mutations
Details
Root cause: SeedDataService constructor was changed to internal in a
prior commit, breaking Microsoft DI resolution. This caused
SettingsViewModel construction to throw, leaving all overlay dialogs
(ThemeEditor, ManagePlugins, GitHubDeviceFlow) with null DataContext
and defaulting IsVisible to true on startup.
Fixes:
- SeedDataService constructor back to public
- AiMemoryService, AiConversationStore and their model types to public
(required as public constructor parameter types)
- FallbackValue=False on overlay dialog IsVisible bindings as defense
- Error logging on SettingsVM lazy construction
RAG indexing fix: local entity CRUD was never triggering embeddings
because RagIndexService only listened for EntitySyncedMessage (P2P
sync only). Now SdkHost broadcasts EntitySyncedMessage after every
local mutation so RAG stays current. Also triggers full re-index
after reseed completes.
Version 1.57.2 → 1.57.3.
Split AI memories into personal vs data categories with audit UI
Details
Add category-aware clear methods (ClearPersonalMemories, ClearDataMemories)
to AiMemoryService so personal memories (preference, personal) survive
data wipe/reseed while data memories (work, other, null) are cleared.
Settings UI now shows memory counts per category with individual clear
buttons, a "View All Memories" toggle to audit stored memories, and
inline edit/delete controls for individual memory entries. Users can
correct misunderstood memories or remove specific ones without clearing
everything.
SeedDataService.ClearAiState() now calls ClearDataMemories() instead of
ClearAll(), preserving user-shared personal facts across wipe/reseed.
Version bump 1.57.1 → 1.57.2.
Get notified about new releases