FieldCure.AssistStudio.Controls.WinUI 0.13.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package FieldCure.AssistStudio.Controls.WinUI --version 0.13.0
                    
NuGet\Install-Package FieldCure.AssistStudio.Controls.WinUI -Version 0.13.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="FieldCure.AssistStudio.Controls.WinUI" Version="0.13.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="FieldCure.AssistStudio.Controls.WinUI" Version="0.13.0" />
                    
Directory.Packages.props
<PackageReference Include="FieldCure.AssistStudio.Controls.WinUI" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add FieldCure.AssistStudio.Controls.WinUI --version 0.13.0
                    
#r "nuget: FieldCure.AssistStudio.Controls.WinUI, 0.13.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package FieldCure.AssistStudio.Controls.WinUI@0.13.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=FieldCure.AssistStudio.Controls.WinUI&version=0.13.0
                    
Install as a Cake Addin
#tool nuget:?package=FieldCure.AssistStudio.Controls.WinUI&version=0.13.0
                    
Install as a Cake Tool

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.

License: MIT

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 (▌). StreamEvent discriminated 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 Archive controls. {ThemeResource} bindings for automatic light/dark theme support.
  • Tool Approval — Inline ToolApprovalPanel for user confirmation before tool execution, with expandable JSON arguments preview.
  • TemplatedControls — All controls are TemplatedControls with PART_ conventions. Override Generic.xaml to 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.0 and net9.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.AssistStudio.Providers;

// Code-behind — assign a provider
Chat.Provider = new ClaudeProvider(apiKey: "sk-ant-...", modelId: "claude-sonnet-4-20250514");

Controls

ChatPanel

The main control. Provides message list (WebView2), input area, streaming, attachments, thinking blocks, conversation branching, presets, and profiles.

<assist:ChatPanel Provider="{x:Bind ViewModel.Provider, Mode=OneWay}"
                  SystemPrompt="You are a helpful assistant."
                  Theme="Dark"
                  Placeholder="Type a message..."
                  AvailablePresets="{x:Bind ViewModel.Presets}"
                  SelectedPreset="{x:Bind ViewModel.CurrentPreset, Mode=TwoWay}"
                  RegisteredTools="{x:Bind ViewModel.Tools}"
                  WorkspaceContext="{x:Bind ViewModel.Workspace}" />

Dependency Properties:

Property Type Description
Provider IAiProvider Active AI provider for completions and streaming
SystemPrompt string System prompt prepended to every request
Theme ChatTheme Light / Dark / System
Placeholder string Input placeholder text
Title string Title bar text
AvailablePresets IList Provider presets for the selector
SelectedPreset ProviderPreset Currently active preset
AvailableProfiles IList<Profile> Profile list for the selector
SelectedProfile Profile Currently active profile
RegisteredTools IReadOnlyList<IAssistTool> Tools available to the provider
WorkspaceContext IWorkspaceContext Dynamic context injection
ContextProvider IContextProvider RAG context retrieval (optional)
UtilityProvider IAiProvider Provider for auto-titling and summarization
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
IsDebugMode bool Show debug info (raw request/response)
ShowTitleBar bool Show/hide the title bar
AllowAttachments bool Enable/disable file attachments
IsReadOnly bool Read-only conversation view
FontFamily string Chat font family
FontSize double Chat font size
ChatZoomFactor double CSS zoom factor for chat rendering (default 1.05)
EmptyStateContent object Custom empty state UI
AvailableServers IList<ServerInfo> MCP server status for tools flyout

Events: PresetChanged, ProfileChanged, MessageAdded, TitleGenerated, TitleEditRequested, KeyboardShortcutPressed

ComposeBar

Chat input area — text box, attach button, preset/profile selectors. Used internally by ChatPanel, but can be placed standalone.

Dependency Properties: Placeholder, IsInputEnabled, IsSummarizeEnabled, AvailablePresets, SelectedPreset, AvailableProfiles, SelectedProfile

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.ParentId forming a tree structure
  • Navigation is handled through WebView2 WebMessageReceived events
  • The full tree persists in .astd (JSON) 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)

License

MIT — Copyright (c) 2026 FieldCure Co., Ltd.

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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

# Release Notes — FieldCure.AssistStudio.Controls.WinUI

## [0.13.0] - 2026-03-31

### Changed
- Streaming token rendering batched at 50ms intervals to reduce WebView2 `ExecuteScriptAsync` calls — prevents UI thread saturation during large responses
- `await Task.Delay(1)` yield during tool call argument streaming to keep UI responsive

---

## [0.12.0] - 2026-03-30

### Fixed
- `ToolApprovalPanel` prompt text not updating when tool name changes — added `PropertyChanged` callbacks for `ToolName` and `ToolDisplayName` dependency properties
- Built-in server version fallback using `config.Name` (display name) instead of extracting key from `config.Id` — now correctly resolves NuGet package version

---

## [0.11.0] - 2026-03-29

### Added
- `ChatZoomFactor` dependency property for dynamic chat UI scaling (default 1.05)
- Collapsible long user messages with Show more / Show less toggle
- URL and content length display in `fetch_url` tool result blocks
- Collapsible `search_documents` results in WebView2 chat UI
- Indexing cancel button + RAG file count safety limits in folder flyout
- Indexing progress display in folder flyout and title bar
- Dynamic tooltip on folder icon showing indexing file name
- Lock icon on archive folder rows
- Server placeholder entries in tools flyout with localized tool names
- Persistent memory tools (`remember`, `forget`) UI support

### Changed
- `InputContainer` renamed to `ComposeBar`
- Tool display name localization removed — raw function names used instead
- Server toggle removed from tools flyout, replaced with `PrepareToolsForSendAsync` send-time auto-connect
- `Profile.Text` → `Profile.SystemPrompt` in bindings
- ProgressRing replaced with folder icon opacity animation for indexing state
- Folder icon VisualState renamed to `Idle`

### Fixed
- WebView2 blank screen when clicking relative-path links (navigation intercepted)
- OpenAI RAG source links converted to plain text before rendering
- ProgressRing and folder button layout wrapped in StackPanel
- Progress ring placement, percent color, InfoBar messages localized
- PasswordVault empty-value exception prevention

---

## [0.10.0] - 2026-03-24

### Added
- Folder flyout converted from code-behind to XAML `<Button.Flyout>` with `{ThemeResource}` bindings
- `FolderStates` VisualStateGroup (`HasFolders`/`NoFolders`) for folder icon glyph swap (FolderOpen ↔ FolderFill)
- Folder flyout localization via `ResourceLoader` (x:Uid not supported in ControlTemplate)
- Remove button tooltips with Mouse placement in folder flyout
- Static `ResourceLoader` field replacing per-call instantiation

### Changed
- Folder icon: FolderOpen (`E838`) when empty, FolderFill (`E8D5`) when folders exist — replaces accent color indicator
- Folder button tooltip: "Folder Settings" (was "Workspace Folders")
- Server-owned MCP tools (e.g., RAG tools) hidden from individual tool checkboxes — controlled by server checkbox only

### Fixed
- Folder icon invisible in default state (`Foreground = null` → VisualState with `{ThemeResource}`)
- Flyout text not following theme (`Application.Current.Resources` → XAML `{ThemeResource}` bindings)
- Flyout PART_ elements not resolved (`Flyout.Opening` → `Flyout.Opened` for visual tree availability)

### Removed
- `PART_FolderBadge` (unused numeric badge overlay)
- `BuildFolderFlyout()` code-behind method (~270 lines)

---

## [0.9.0] - 2026-03-24

### Added
- `AvailableServers` property on `ChatPanel` for MCP server status display
- `ServerInfo` model for lightweight server descriptor (Id, DisplayName, IsConnected, IsBuiltIn)

### Changed
- Tool flyout redesigned with server-level toggles replacing tool-level selection

---

## [0.8.0] - 2026-03-22

### Changed
- Document parser code extracted from `InputContainer` to `FieldCure.DocumentParsers` package
- `DocumentExtensions` now dynamically derived from `DocumentParserFactory.SupportedExtensions` — new parsers are auto-registered

### Fixed
- HWPX table extraction failing due to nested element structure (`hp:p > hp:run > hp:tbl`)

---

## [0.7.0] - 2026-03-21

### Added
- Extended thinking UI with collapsible left-bar styled thinking blocks
- Streaming tool call display as themed blocks with tool name labels
- Progressive streaming render (tokens displayed as they arrive, markdown finalized on complete)
- Tool toggle UI in `InputContainer` with select all/deselect all and `search_tools` policy support
- Conversation branching with tree-based edit flow and branch navigator
- `Ctrl+F` conversation search with highlight and prev/next navigation
- Shimmer loading placeholder control
- `IsReadOnly`, `ShowTitleBar`, `AllowAttachments`, `EmptyStateContent`, `FontFamily`, `FontSize` dependency properties on `ChatPanel`
- `RegisteredTools`, `WorkspaceContext`, `ContextProvider`, `UtilityProvider` properties on `ChatPanel`
- `KeyboardShortcutPressed` event on `ChatPanel`
- MCP server disconnect notification on app exit

### Changed
- **Breaking:** `IAiProvider.StreamAsync` now returns `IAsyncEnumerable<StreamEvent>` (consumers must update)
- Controls RootNamespace changed from `FieldCure.AssistStudio` to `FieldCure.AssistStudio.Controls`
- `SubtleButtonStyle` aligned with WinAppSDK 1.8 built-in specification
- Chat font size increased for readability; input area sizing improved
- Edit/resend button renamed to "Send" with settings hint
- `GeneratedRegex` source generator used for all regex patterns (SYSLIB1045)
- `CreatePreviewItem` return type narrowed from `UIElement` to `Grid` (CA1859)

### Fixed
- Stream cancellation now finalizes message (removes blinking cursor)
- WebView2 clipboard shortcuts (`Ctrl+C/V/X`) and streaming CSS styles
- Conversation branch restoration losing messages and navigator state
- Tool calling conversation restoration showing blank on reopen
- Post-stream input focus restored automatically

---

## [0.6.0] - 2026-03-17

### Added
- Title edit button tooltip with localized resource strings (`ChatPanel_EditTitleTooltip`)
- `SetBottomRightToolTip` helper for consistent tooltip placement on title bar buttons

### Changed
- Title bar button tooltips use `PlacementMode.Mouse` instead of default top placement

### Fixed
- Missing `SubtleButtonStyle` causing crash in packaged builds

---

## [0.5.0] - 2026-03-17

### Added
- Dedicated NuGet package README with Controls-specific XAML examples and API reference

---

## [0.4.0] - 2026-03-17

### Added
- NuGet package metadata (Company, Copyright, Icon, README, Repository URL, Tags)
- Release notes auto-inclusion in NuGet package
- `publish-nuget.ps1` script for pack → sign → push workflow

---

## [0.3.0] - 2026-03-17

### Added
- `ToolApprovalPanel` templated control for tool execution confirmation UI
- Summarize button wired from `InputContainer` to `ChatPanel`
- External link navigation redirected to default browser from WebView2

### Fixed
- WebView2 stealing focus from TextBox during streaming response

---

## [0.2.0] - 2026-03-16

### Fixed
- Duplicate file attachment on drag-and-drop (event bubbling from InputContainer to ChatPanel)
- Consecutive tool results merged into single user message for Claude compatibility

---

## [0.1.0] - 2026-03-15

### Added
- `ChatPanel` templated control with WebView2-based message rendering
- `InputContainer` templated control with provider/profile selectors and attachment support
- `AttachmentPreviewBar` templated control for file previews
- Markdown rendering via marked.js with code syntax highlighting (highlight.js)
- LaTeX/math rendering via KaTeX
- Code block copy-to-clipboard
- Streaming display with cursor indicator
- Image paste and file picker attachment
- PDF and DOCX text extraction for document attachments
- Localization support (en-US, ko-KR)