![]() |
VOOZH | about |
dotnet add package FieldCure.AssistStudio.Controls.WinUI --version 0.22.0
NuGet\Install-Package FieldCure.AssistStudio.Controls.WinUI -Version 0.22.0
<PackageReference Include="FieldCure.AssistStudio.Controls.WinUI" Version="0.22.0" />
<PackageVersion Include="FieldCure.AssistStudio.Controls.WinUI" Version="0.22.0" />Directory.Packages.props
<PackageReference Include="FieldCure.AssistStudio.Controls.WinUI" />Project file
paket add FieldCure.AssistStudio.Controls.WinUI --version 0.22.0
#r "nuget: FieldCure.AssistStudio.Controls.WinUI, 0.22.0"
#:package FieldCure.AssistStudio.Controls.WinUI@0.22.0
#addin nuget:?package=FieldCure.AssistStudio.Controls.WinUI&version=0.22.0Install as a Cake Addin
#tool nuget:?package=FieldCure.AssistStudio.Controls.WinUI&version=0.22.0Install as a Cake Tool
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.
StreamEvent discriminated union drives text, thinking, and tool call display.{ThemeResource} bindings for automatic light/dark theme support.FileSavePicker), and copy buttons on hover over inline images.ComposeBar flyout for per-conversation KB selection with kb_id system prompt hint injection.ToolApprovalPanel for user confirmation before tool execution, with expandable JSON arguments preview, user instruction input field, and MCP server name badge.ToolElicitationPanel for MCP server user-input requests with multi-field selection and batch submit.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.ComposeBar during streaming responses.TemplatedControls with PART_ conventions. Override Generic.xaml to fully customize.Theme="System" to follow the app theme.net8.0-windows10.0.19041.0 and net9.0-windows10.0.19041.0.dotnet add package FieldCure.AssistStudio.Controls.WinUI
This package depends on FieldCure.AssistStudio.Core which is installed automatically.
<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");
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
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
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
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
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 βΆ
ChatMessage.ParentId forming a tree structureWebMessageReceived events.astx (ZIP archive) files β no conversation history is lostWhen 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.
Override the default template in your app's resources:
<Style TargetType="assist:ChatPanel" BasedOn="{StaticResource DefaultChatPanelStyle}">
</Style>
| Dependency | Minimum Version |
|---|---|
| .NET | 8.0 |
| Windows App SDK | 1.7 |
| WebView2 Runtime | Evergreen |
| Target Platform | Windows 10 1903+ (10.0.19041.0) |
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.
MIT β Copyright (c) 2026 FieldCure Co., Ltd.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0-windows10.0.19041 net8.0-windows10.0.19041 is compatible. net9.0-windows net9.0-windows was computed. net10.0-windows net10.0-windows was computed. net10.0-windows10.0.19041 net10.0-windows10.0.19041 is compatible. |
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. |
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.22.0 | 100 | 5/25/2026 |
| 0.21.0 | 104 | 5/7/2026 |
| 0.20.0 | 95 | 5/5/2026 |
| 0.19.0 | 97 | 5/4/2026 |
| 0.18.0 | 109 | 4/27/2026 |
| 0.17.1 | 109 | 4/24/2026 |
| 0.17.0 | 103 | 4/21/2026 |
| 0.16.0 | 98 | 4/14/2026 |
| 0.15.0 | 109 | 4/10/2026 |
| 0.14.0 | 110 | 4/7/2026 |
| 0.13.0 | 107 | 3/31/2026 |
| 0.12.0 | 111 | 3/30/2026 |
| 0.11.0 | 109 | 3/29/2026 |
| 0.10.0 | 105 | 3/24/2026 |
| 0.9.0 | 101 | 3/24/2026 |
| 0.8.0 | 104 | 3/22/2026 |
| 0.7.0 | 105 | 3/21/2026 |
| 0.6.0 | 113 | 3/17/2026 |
| 0.5.0 | 112 | 3/17/2026 |
| 0.4.0 | 110 | 3/17/2026 |
v0.22.0: ChatPanel now implements IToolContext (from Ai.Providers 0.8.0) β SDK consumers can pass `IToolContext context = ChatPanel` to their IAssistTool implementations and get user approval / elicitation through the same panels the internal flow uses. RequestToolApprovalAsync is now a public method; the executor's ConfirmationHandler lambda is a thin wrapper that forwards to it. New ChatPanel.AppendToolRoundAsync(handle, IReadOnlyList<ToolInteraction>) records an SDK-driven tool round against the active turn so the chat surface shows the same inline tool blocks the internal flow draws. Breaking: ElicitationFieldInfo (+ Type / Option) renamespaced from FieldCure.AssistStudio.Controls to FieldCure.Ai.Providers.Models β swap the using. Fix: pre-init send queue β messages typed during WebView2 cold-start are now buffered (cap 10) and replayed in order on OnLoaded instead of silently dropped (reproducer was SDK sample first-launch sends evaporating). New Plotly inline chart rendering β MCP tools shipping a `{ type: "plotly" }` spec via CallToolResult.structuredContent render inline at zero token cost; lazy-injected runtime persists through tab recycle. WindowsAppSDK 1.7 β 2.0 (floating patch). Multi-target: net9 dropped (STS EOL 2026-05-12), net10 added β now net8.0-windows + net10.0-windows. Plus user-cancellation chip on the bubble footer, elapsed-time capture on cancel/error finalize, ko-KR "λκΈ΄ μλ΅" β "κΈΈμ΄ μ΄κ³Ό", branch nav lock during streaming. Rebuilt against Core 0.20.0 + Ai.Providers 0.8.0.