RAG-based intent discovery for AI chat actions
Details
Replace the full intent catalog injection in the system prompt with a
RAG-based approach. ShellContentProvider now indexes each registered
intent as a separate "intent_action" chunk in the vector index. When
the user sends a chat message, RAG search finds semantically relevant
intents and includes them in context. The ACTION format header is only
injected when intent_action chunks are found, keeping prompts lean for
general questions. This works for both cloud and local models, solving
the issue where local models never received intent instructions.
Thinking animation, UI lockup, and raw response logging
Details
Three fixes:
1. Thinking animation never started: ChatMessageState.Loading is enum value 0,
which was also the default of _state. Setting State = Loading was a no-op
because the generated setter saw old == new and skipped OnStateChanged.
Fixed by initializing _state = ChatMessageState.Ready so the transition to
Loading is always detected.
2. UI lockup while Duncan thinks: The entire SendChatMessageAsync ran on the UI
thread — RAG vector search (synchronous FFI to Rust), embedding generation,
prompt building, and the AI API call all blocked the UI. Restructured to
capture UI-thread state upfront, then run all heavy work inside Task.Run.
UI updates (streaming tokens, state changes) dispatch back via _dispatcher.Post.
3. Added raw response logging to diagnose when the AI model fails to include
[ACTION] blocks despite the system prompt instructions.
Desktop 1.63.3 → 1.63.4.
Selectable text in chat bubbles and history panel overflow
Details
Swapped TextBlock → SelectableTextBlock for user label, assistant content,
and error message in the message bubble template so text can be highlighted
and copied.
Added ClipToBounds="True" to all three tab panels (Chat, Intents, History)
to prevent history conversation items from overflowing outside the panel
bounds when the list exceeds the available height.
Desktop 1.63.2 → 1.63.3.
Strengthen ACTION block instructions to prevent fabricated responses
Details
Duncan was claiming to have created tasks/projects without actually executing
anything — the AI responded with natural language confirmations but no [ACTION]
blocks. Root cause: the system prompt instructions were too passive.
Changes:
- Rewrote intent catalog prompt with CRITICAL header and explicit rules:
"WITHOUT an [ACTION] block, NOTHING happens" and "NEVER say 'I've created'
unless you include the [ACTION] block"
- Added instruction to refuse unavailable actions instead of fabricating
- Added action-oriented keywords (create/add/make/log/draft/save) to Medium
tier classifier so token budget is adequate for JSON output
- Added debug logging for action block parsing results and intent catalog
injection to aid future debugging
Desktop 1.63.1 → 1.63.2.
Get notified about new releases