FieldCure.AssistStudio.Controls.WinUI
0.4.0
See the version list below for details.
dotnet add package FieldCure.AssistStudio.Controls.WinUI --version 0.4.0
NuGet\Install-Package FieldCure.AssistStudio.Controls.WinUI -Version 0.4.0
<PackageReference Include="FieldCure.AssistStudio.Controls.WinUI" Version="0.4.0" />
<PackageVersion Include="FieldCure.AssistStudio.Controls.WinUI" Version="0.4.0" />
<PackageReference Include="FieldCure.AssistStudio.Controls.WinUI" />
paket add FieldCure.AssistStudio.Controls.WinUI --version 0.4.0
#r "nuget: FieldCure.AssistStudio.Controls.WinUI, 0.4.0"
#:package FieldCure.AssistStudio.Controls.WinUI@0.4.0
#addin nuget:?package=FieldCure.AssistStudio.Controls.WinUI&version=0.4.0
#tool nuget:?package=FieldCure.AssistStudio.Controls.WinUI&version=0.4.0
FieldLab AssistStudio
AI Chat Controls for WinUI 3 — Bring Your Own Key, pick any provider.
Features
- BYOK (Bring Your Own Key) — Users supply their own API keys. No proxy, no middleman.
- Multi-Provider — Claude, OpenAI, Gemini, and Ollama out of the box. Implement
IAiProviderto add your own. - Streaming — Real-time token-by-token responses via
IAsyncEnumerable<string>. - Vision & Documents — Attach images (PNG, JPG, WebP, …), PDFs, and DOCX files to any conversation.
- Token Tracking — Input/output token counts exposed after every request.
- Re-templatable WinUI 3 Controls —
ChatPanel,InputContainer,AttachmentPreviewBar, andToolApprovalPanelareTemplatedControls with no app dependency. OverrideGeneric.xamlto fully customize the UI. - Profiles & Presets — Save provider configurations as presets; switch system prompts with profiles.
- Conversation Persistence — Save and load conversations in
.astx(JSON) format. - Localization — Built-in en-US and ko-KR resource strings.
- Tool / Function Calling — Define tools with
IAssistTooland let providers invoke them. Tools that require confirmation show an inlineToolApprovalPanelfor user approval before execution.
Screenshots
| Empty State | Tool Approval |
|---|---|
Architecture
┌─────────────────────────────────────────────────┐
│ AssistStudio (Demo App) │
│ WinUI 3 desktop app — showcases all controls │
├─────────────────────────────────────────────────┤
│ AssistStudio.Controls ← NuGet package │
│ ChatPanel · InputContainer · ToolApprovalPanel │
│ WebView2 rendering · Themes · Localization │
├─────────────────────────────────────────────────┤
│ AssistStudio.Core ← NuGet package │
│ IAiProvider · IAssistTool · Models · Helpers │
│ Claude │ OpenAI │ Gemini │ Ollama providers │
└─────────────────────────────────────────────────┘
| Project | NuGet Package | TFM | Key Types |
|---|---|---|---|
| AssistStudio.Core | FieldCure.AssistStudio.Core |
net8.0 |
IAiProvider, IAssistTool, AiRequest, AiResponse, ChatMessage, TokenUsage, ProviderPreset, Profile, ConversationManager |
| AssistStudio.Controls | FieldCure.AssistStudio.Controls.WinUI |
net8.0-windows10.0.19041.0<br>net9.0-windows10.0.19041.0 |
ChatPanel, InputContainer, AttachmentPreviewBar, ToolApprovalPanel, WebViewChatRenderer, ChatTheme |
| AssistStudio | (demo app, not published) | net9.0-windows10.0.19041.0 |
Reference implementation with settings, dialogs, and PasswordVaultHelper |
Core is platform-agnostic (
net8.0). It has no Windows-specific dependencies — you can reference it from a console app, a server, or any .NET project.
Quick Start
1. Install packages
dotnet add package FieldCure.AssistStudio.Core
dotnet add package FieldCure.AssistStudio.Controls.WinUI
2. Create a provider and wire up the control
using FieldCure.AssistStudio.Providers;
// Pick a provider — API key comes from the user
var provider = new ClaudeProvider(apiKey: "sk-ant-...", modelId: "claude-sonnet-4-20250514");
<Page xmlns:assist="using:FieldCure.AssistStudio.Controls">
<assist:ChatPanel x:Name="Chat"
Placeholder="Ask anything..."
Theme="System" />
</Page>
// Code-behind
Chat.Provider = provider;
That's it — you have a fully functional AI chat with streaming, Markdown rendering, and syntax highlighting.
Providers
Supported providers
| Provider | Streaming | Vision | Documents | Tool Calling | API Key Required |
|---|---|---|---|---|---|
| Claude (Anthropic) | Yes | Yes | Yes | Yes | Yes |
| OpenAI (+ compatible endpoints) | Yes | Yes | Yes | Yes | Yes |
| Gemini (Google) | Yes | Yes | Yes | Yes | Yes |
| Ollama (local) | Yes | Yes | Yes | Yes | No |
OpenAI provider works with any OpenAI-compatible API (Groq, Azure OpenAI, etc.) by setting a custom
baseUrl.
Implementing a custom provider
Implement IAiProvider to integrate any AI service:
using FieldCure.AssistStudio.Models;
using FieldCure.AssistStudio.Providers;
public class MyCustomProvider : IAiProvider
{
public string ProviderName => "MyService";
public string ModelId => "my-model-v1";
public TokenUsage? LastUsage { get; private set; }
public bool IsTruncated { get; private set; }
public string? LastRequestBody { get; private set; }
public string? LastRawResponse { get; private set; }
public async Task<AiResponse> CompleteAsync(AiRequest request, CancellationToken ct = default)
{
// Call your API, return an AiResponse
throw new NotImplementedException();
}
public async IAsyncEnumerable<string> StreamAsync(
AiRequest request,
[System.Runtime.CompilerServices.EnumeratorCancellation] CancellationToken ct = default)
{
// Yield tokens as they arrive
yield return "Hello ";
yield return "from MyService!";
}
public Task<IReadOnlyList<AiModel>> ListModelsAsync(CancellationToken ct = default)
=> Task.FromResult<IReadOnlyList<AiModel>>(
[new AiModel("my-model-v1", "My Model", "myservice")]);
public Task<ConnectionInfo> ValidateConnectionAsync(CancellationToken ct = default)
=> Task.FromResult(new ConnectionInfo(true, null, null, null));
}
Then assign it to a ChatPanel:
Chat.Provider = new MyCustomProvider();
Controls
All controls are TemplatedControls defined in Generic.xaml. They carry no app-level dependency — reference the NuGet package and use them in any WinUI 3 project.
ChatPanel
The main control. Provides a complete chat experience: message list (WebView2), input area, streaming, attachments, 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}" />
Key dependency properties: Provider, SystemPrompt, Theme, Placeholder, AvailablePresets, SelectedPreset, AvailableProfiles, SelectedProfile, MessageFontSize, ShowTitleBar
Events: MessageSent, PresetChanged, FilesDropped, TitleBarRequested
InputContainer
The chat input area — text box, attach button, preset/profile selectors. Used internally by ChatPanel, but can be placed standalone.
AttachmentPreviewBar
Horizontal scrollable bar showing thumbnails of attached files before sending.
ToolApprovalPanel
Inline confirmation panel shown when a tool with RequiresConfirmation = true is invoked. Displays the tool name, an expandable JSON arguments preview, and Allow/Reject buttons. Replaces InputContainer during confirmation and restores it after.
Re-templating
Override the default template in your app's resources:
<Style TargetType="assist:ChatPanel" BasedOn="{StaticResource DefaultChatPanelStyle}">
</Style>
Configuration
Provider presets
var preset = new ProviderPreset
{
Name = "Claude Sonnet",
ProviderType = "Claude",
ApiKey = "sk-ant-...",
ModelId = "claude-sonnet-4-20250514",
Temperature = 0.7,
MaxTokens = 4096,
StreamingEnabled = true
};
Profiles
Profiles pair a system prompt with optional provider/model preferences and tool selections:
var profile = new Profile
{
Name = "Task Planner",
Text = "You are a task planner that breaks down complex requests into steps and executes them using available tools.",
ToolNames = ["search_files", "read_file", "write_file", "run_command"]
};
Requirements
| Dependency | Minimum Version |
|---|---|
| .NET | 8.0 |
| Windows App SDK | 1.7 |
| WebView2 Runtime | Evergreen |
| Target Platform | Windows 10 1903+ (10.0.19041.0) |
Contributing
Contributions are welcome! Please open an issue first to discuss what you'd like to change.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes
- Push to the branch and open a Pull Request
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
- DocumentFormat.OpenXml (>= 3.4.1)
- FieldCure.AssistStudio.Core (>= 0.4.0)
- Microsoft.Web.WebView2 (>= 1.0.3856.49)
- Microsoft.Windows.SDK.BuildTools (>= 10.0.26100.7705)
- Microsoft.WindowsAppSDK (>= 1.7.260224002)
-
net9.0-windows10.0.19041
- DocumentFormat.OpenXml (>= 3.4.1)
- FieldCure.AssistStudio.Core (>= 0.4.0)
- Microsoft.Web.WebView2 (>= 1.0.3856.49)
- 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 | 40 | 5/7/2026 |
| 0.20.0 | 79 | 5/5/2026 |
| 0.19.0 | 91 | 5/4/2026 |
| 0.18.0 | 100 | 4/27/2026 |
| 0.17.1 | 102 | 4/24/2026 |
| 0.17.0 | 96 | 4/21/2026 |
| 0.16.0 | 90 | 4/14/2026 |
| 0.15.0 | 101 | 4/10/2026 |
| 0.14.0 | 102 | 4/7/2026 |
| 0.13.0 | 101 | 3/31/2026 |
| 0.12.0 | 105 | 3/30/2026 |
| 0.11.0 | 102 | 3/29/2026 |
| 0.10.0 | 99 | 3/24/2026 |
| 0.9.0 | 95 | 3/24/2026 |
| 0.8.0 | 98 | 3/22/2026 |
| 0.7.0 | 98 | 3/21/2026 |
| 0.6.0 | 105 | 3/17/2026 |
| 0.5.0 | 105 | 3/17/2026 |
| 0.4.0 | 103 | 3/17/2026 |
# Release Notes — FieldCure.AssistStudio.Controls.WinUI
## [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)