FieldCure.AssistStudio.Controls.WinUI
0.21.0
dotnet add package FieldCure.AssistStudio.Controls.WinUI --version 0.21.0
NuGet\Install-Package FieldCure.AssistStudio.Controls.WinUI -Version 0.21.0
<PackageReference Include="FieldCure.AssistStudio.Controls.WinUI" Version="0.21.0" />
<PackageVersion Include="FieldCure.AssistStudio.Controls.WinUI" Version="0.21.0" />
<PackageReference Include="FieldCure.AssistStudio.Controls.WinUI" />
paket add FieldCure.AssistStudio.Controls.WinUI --version 0.21.0
#r "nuget: FieldCure.AssistStudio.Controls.WinUI, 0.21.0"
#:package FieldCure.AssistStudio.Controls.WinUI@0.21.0
#addin nuget:?package=FieldCure.AssistStudio.Controls.WinUI&version=0.21.0
#tool nuget:?package=FieldCure.AssistStudio.Controls.WinUI&version=0.21.0
FieldCure.AssistStudio.Controls.WinUI
Drop-in AI Chat UI Controls for WinUI 3 — Markdown rendering, streaming, attachments, thinking blocks, conversation branching, tool approval, and theming out of the box.
Features
- ChatPanel — Complete chat experience: message list, input area, streaming, attachments, preset/profile selectors, workspace context.
- WebView2 Rendering — Markdown (marked.js), syntax highlighting (highlight.js), and LaTeX (KaTeX) in a single WebView2 instance.
- Progressive Streaming — Two-zone DOM rendering with typing cursor (▌).
StreamEventdiscriminated union drives text, thinking, and tool call display. - Extended Thinking — Collapsible thinking/reasoning blocks with visual left-bar styling. Auto-collapses when streaming completes.
- Conversation Branching — Tree-based message editing. Edit any user message to create a new branch. Navigate between branches with the ◀ 1/2 ▶ navigator in message footers.
- Code Copy-to-Clipboard — One-click copy button on every rendered code block.
- Folder Flyout — XAML-based folder management flyout with workspace folders and Knowledge Base controls.
{ThemeResource}bindings for automatic light/dark theme support. - Multimedia Rendering — MCP image, audio, and video content blocks rendered inline with native controls.
- Image Hover Toolbar — Zoom (popover viewer), save (
FileSavePicker), and copy buttons on hover over inline images. - Knowledge Base Selector —
ComposeBarflyout for per-conversation KB selection withkb_idsystem prompt hint injection. - Tool Approval — Inline
ToolApprovalPanelfor user confirmation before tool execution, with expandable JSON arguments preview, user instruction input field, and MCP server name badge. - MCP Elicitation —
ToolElicitationPanelfor MCP server user-input requests with multi-field selection and batch submit. - Tool Block Details — Expandable tool blocks showing arguments, result, and execution duration with interleave rendering.
- Parallel Sub-Agent Rendering — When the model emits multiple sub-agent (
delegate_task) calls in a single turn, each tool block renders immediately with a pulsing placeholder and resolves in place as results arrive. Stop / cancellation cleans up in-flight placeholders with an[interrupted]marker so the pulse never hangs. - Streaming Elapsed Time — Real-time elapsed timer displayed in
ComposeBarduring streaming responses. - TemplatedControls — All controls are
TemplatedControls withPART_conventions. OverrideGeneric.xamlto fully customize. - Theming — Light, Dark, and System themes. Set
Theme="System"to follow the app theme. - Localization — Built-in en-US and ko-KR resource strings.
- Multi-TFM — Targets both
net8.0-windows10.0.19041.0andnet9.0-windows10.0.19041.0.
Install
dotnet add package FieldCure.AssistStudio.Controls.WinUI
This package depends on FieldCure.AssistStudio.Core which is installed automatically.
Quick Start
<Page xmlns:assist="using:FieldCure.AssistStudio.Controls">
<assist:ChatPanel x:Name="Chat"
Placeholder="Ask anything..."
Theme="System" />
</Page>
using FieldCure.Ai.Providers;
// Code-behind — assign a provider
Chat.Provider = new ClaudeProvider(apiKey: "sk-ant-...", modelId: "claude-sonnet-4-6");
Controls
ChatPanel
The main control. Provides message list (WebView2), input area, streaming, attachments, thinking blocks, conversation branching, models, and profiles.
<assist:ChatPanel Provider="{x:Bind ViewModel.Provider, Mode=OneWay}"
SystemPrompt="You are a helpful assistant."
Theme="Dark"
Placeholder="Type a message..."
AvailableModels="{x:Bind ViewModel.Models}"
SelectedModel="{x:Bind ViewModel.CurrentModel, Mode=TwoWay}"
RegisteredTools="{x:Bind ViewModel.Tools}"
WorkspaceContext="{x:Bind ViewModel.Workspace}" />
Dependency Properties — grouped by concern for faster scanning.
Provider & model
| Property | Type | Description |
|---|---|---|
Provider |
IAiProvider |
Active AI provider for completions and streaming |
UtilityProvider |
IAiProvider |
Provider for auto-titling and summarization |
SystemPrompt |
string |
System prompt prepended to every request |
AvailableModels |
IList<ProviderModel> |
Provider models for the selector (renamed from AvailablePresets in 0.19.0) |
SelectedModel |
ProviderModel |
Currently active model (renamed from SelectedPreset in 0.19.0) |
AvailableProfiles |
IList<Profile> |
Profile list for the selector |
SelectedProfile |
Profile |
Currently active profile |
GroupDisplayNameResolver |
Func<string, string?>? |
Optional host-supplied resolver mapping a raw ProviderType (e.g., "Custom_046A…") to a readable group label (e.g., "MiniMax") shown in the model picker headers. Falls back to the raw ProviderType (with a Mock → "demo" alias) when unset. (0.20.0+) |
Workspace & context
| Property | Type | Description |
|---|---|---|
WorkspaceContext |
IWorkspaceContext |
Dynamic context injection |
WorkspaceFolders |
IList<string> |
Workspace folder paths for the current tab |
IsWorkspaceEnabled |
bool |
Enable/disable workspace folder features |
ContextProvider |
IContextProvider |
RAG context retrieval (optional) |
MemoryText |
string |
Persistent memory text injected into system prompt |
Knowledge Base
| Property | Type | Description |
|---|---|---|
KnowledgeArchiveFolder |
string |
Knowledge Base folder path (kb_id) for the current conversation |
IsKnowledgeArchiveEnabled |
bool |
Whether Knowledge Base is enabled in the current profile |
IsArchiveIndexing |
bool |
Whether the Knowledge Base is currently indexing |
ArchiveIndexingProgress |
double |
Indexing progress (0–100) |
ArchiveIndexingText |
string |
Current indexing file name for tooltip display |
IsArchiveLocked |
bool |
Whether the archive folder is locked by another process |
Tools & MCP
| Property | Type | Description |
|---|---|---|
RegisteredTools |
IReadOnlyList<IAssistTool> |
Tools available to the provider |
McpTools |
IReadOnlyList<IAssistTool> |
MCP tools from connected servers |
AvailableServers |
IList<ServerInfo> |
MCP server status for tools flyout |
Behavior
| Property | Type | Description |
|---|---|---|
AutoTitle |
bool |
Auto-generate conversation titles |
AutoSummarize |
bool |
Auto-summarize long conversations |
MaxInputTokens |
int |
Token limit for input |
MaxToolCallRounds |
int |
Max consecutive tool call rounds |
RecentTurnsToKeep |
int |
Turns to keep after summarization |
AllowAttachments |
bool |
Enable/disable file attachments |
IsReadOnly |
bool |
Read-only conversation view |
UI & theming
| Property | Type | Description |
|---|---|---|
Theme |
ChatTheme |
Light / Dark / System |
Placeholder |
string |
Input placeholder text |
Title |
string |
Title bar text |
ShowTitleBar |
bool |
Show/hide the title bar |
ChatZoomFactor |
double |
CSS zoom factor for chat rendering (default 1.05) |
EmptyStateContent |
object |
Custom empty state UI |
IsDebugMode |
bool |
Show debug info (raw request/response) |
Events: PresetChanged, ProfileChanged, MessageAdded, TitleGenerated, TitleEditRequested, KeyboardShortcutPressed
ComposeBar
Chat input area — text box, attach button, model/profile selectors. Used internally by ChatPanel, but can be placed standalone.
Dependency Properties: Placeholder, IsInputEnabled, AvailableModels, SelectedModel, AvailableProfiles, SelectedProfile, GroupDisplayNameResolver
AttachmentPreviewBar
Horizontal scrollable bar showing thumbnails of attached files before sending. Supports images (thumbnails), text files (icon + name), and documents (icon + name).
Dependency Properties: ThumbnailSize (default 80px), MaxTextWidth
ToolApprovalPanel
Inline confirmation panel for tools with RequiresConfirmation = true. Displays tool name, expandable JSON arguments, and Allow/Reject buttons. Replaces ComposeBar during confirmation.
Dependency Properties: ToolName, ToolDisplayName, Arguments, IsExpanded
Events: Approved, Rejected
Conversation Branching
When a user edits a sent message, the original branch is preserved and a new sibling branch is created. The branch navigator appears in the message footer:
◀ 1/2 ▶
- Branches are stored via
ChatMessage.ParentIdforming a tree structure - Navigation is handled through WebView2
WebMessageReceivedevents - The full tree persists in
.astx(ZIP archive) files — no conversation history is lost
Thinking Blocks
When a provider streams ThinkingDelta events, a collapsible thinking block renders above the response with a distinct left-bar style. The block auto-collapses when streaming completes, keeping the UI clean while preserving the reasoning for review.
Re-templating
Override the default template in your app's resources:
<Style TargetType="assist:ChatPanel" BasedOn="{StaticResource DefaultChatPanelStyle}">
</Style>
Requirements
| Dependency | Minimum Version |
|---|---|
| .NET | 8.0 |
| Windows App SDK | 1.7 |
| WebView2 Runtime | Evergreen |
| Target Platform | Windows 10 1903+ (10.0.19041.0) |
Per-Monitor DPI Awareness
Your host application must declare PerMonitorV2 DPI awareness.
ChatPanel renders through an embedded WebView2, and without this setting
the Chromium compositor receives a scaled-down viewport on high-DPI displays
(125 %+), causing blurry text and scroll/hit-test dead zones.
Add the following to your app.manifest:
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2</dpiAwareness>
</windowsSettings>
</application>
WinUI 3 project templates sometimes omit this declaration. At 100 % scaling everything works fine; the issue only appears at higher DPI settings.
License
MIT — Copyright (c) 2026 FieldCure Co., Ltd.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0-windows10.0.19041 is compatible. net9.0-windows was computed. net9.0-windows10.0.19041 is compatible. net10.0-windows was computed. |
-
net8.0-windows10.0.19041
- CommunityToolkit.Mvvm (>= 8.4.2)
- FieldCure.AssistStudio.Core (>= 0.19.2)
- Microsoft.Web.WebView2 (>= 1.0.3912.50)
- Microsoft.Windows.SDK.BuildTools (>= 10.0.26100.7705)
- Microsoft.WindowsAppSDK (>= 1.7.260224002)
-
net9.0-windows10.0.19041
- CommunityToolkit.Mvvm (>= 8.4.2)
- FieldCure.AssistStudio.Core (>= 0.19.2)
- Microsoft.Web.WebView2 (>= 1.0.3912.50)
- Microsoft.Windows.SDK.BuildTools (>= 10.0.26100.7705)
- Microsoft.WindowsAppSDK (>= 1.7.260224002)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on FieldCure.AssistStudio.Controls.WinUI:
| Package | Downloads |
|---|---|
|
FieldCure.AssistStudio.Controls.WinUI.Anthropic
WinUI 3 ChatPanel integration for the Anthropic SDK. Provides extension methods to stream Anthropic responses into ChatPanel. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.21.0 | 33 | 5/7/2026 |
| 0.20.0 | 77 | 5/5/2026 |
| 0.19.0 | 90 | 5/4/2026 |
| 0.18.0 | 99 | 4/27/2026 |
| 0.17.1 | 98 | 4/24/2026 |
| 0.17.0 | 94 | 4/21/2026 |
| 0.16.0 | 90 | 4/14/2026 |
| 0.15.0 | 99 | 4/10/2026 |
| 0.14.0 | 100 | 4/7/2026 |
| 0.13.0 | 100 | 3/31/2026 |
| 0.12.0 | 103 | 3/30/2026 |
| 0.11.0 | 101 | 3/29/2026 |
| 0.10.0 | 98 | 3/24/2026 |
| 0.9.0 | 94 | 3/24/2026 |
| 0.8.0 | 95 | 3/22/2026 |
| 0.7.0 | 96 | 3/21/2026 |
| 0.6.0 | 102 | 3/17/2026 |
| 0.5.0 | 102 | 3/17/2026 |
| 0.4.0 | 100 | 3/17/2026 |
v0.21.0: New public surface — ChatPanel.EnabledToolNames getter plus ChatPanel.EnabledToolsChanged and ComposeBar.EnabledToolsChanged events let hosts react to the compose-bar tool-flyout toggle for per-conversation lifecycle decisions (notably the per-tab Filesystem MCP server in AssistStudio's reconciler). Workspace folder flyout now marks missing-on-disk folders with a Warning glyph (Segoe Fluent E7BA), re-evaluated on each Flyout.Opening so a re-attached external drive clears the icon naturally. Bug fixes: folder removal disappears immediately instead of lingering until the flyout reopens; multiple removals in one open session no longer resurrect each other; pasted-text attachment chips are now openable; attachment previews render inline within the user bubble; branch nav arrows lock during streaming. Rebuilt against same Core 0.19.2 + Ai.Providers 0.7.2.