FieldCure.AssistStudio.Controls.WinUI.Anthropic
0.1.0-preview.3
dotnet add package FieldCure.AssistStudio.Controls.WinUI.Anthropic --version 0.1.0-preview.3
NuGet\Install-Package FieldCure.AssistStudio.Controls.WinUI.Anthropic -Version 0.1.0-preview.3
<PackageReference Include="FieldCure.AssistStudio.Controls.WinUI.Anthropic" Version="0.1.0-preview.3" />
<PackageVersion Include="FieldCure.AssistStudio.Controls.WinUI.Anthropic" Version="0.1.0-preview.3" />
<PackageReference Include="FieldCure.AssistStudio.Controls.WinUI.Anthropic" />
paket add FieldCure.AssistStudio.Controls.WinUI.Anthropic --version 0.1.0-preview.3
#r "nuget: FieldCure.AssistStudio.Controls.WinUI.Anthropic, 0.1.0-preview.3"
#:package FieldCure.AssistStudio.Controls.WinUI.Anthropic@0.1.0-preview.3
#addin nuget:?package=FieldCure.AssistStudio.Controls.WinUI.Anthropic&version=0.1.0-preview.3&prerelease
#tool nuget:?package=FieldCure.AssistStudio.Controls.WinUI.Anthropic&version=0.1.0-preview.3&prerelease
FieldCure.AssistStudio.Controls.WinUI.Anthropic
WinUI 3 ChatPanel integration for the Anthropic SDK — Stream Claude responses directly into a production-ready chat UI with minimal code.
Features
BeginAnthropicTurn— Creates an assistant message bubble and starts streaming with one call.StreamAnthropicAsync— PipesRawMessageStreamEventinto ChatPanel rendering (text, thinking blocks, usage tracking).GetConversationAsAnthropicMessages— Converts the current conversation to Anthropic SDKMessageParamformat for the next API call.- Automatic lifecycle —
AssistantTurnHandleisIAsyncDisposable. Useawait usingfor guaranteed finalization (message rendering, input restoration).
Scope note. This package is a thin streaming bridge: raw Anthropic SDK events → ChatPanel rendering. Tool-use dispatch, sub-agent
delegate_taskfan-out, parallel pulse placeholders, and truncation-aware recovery are features of ChatPanel's built-in send flow (whenProvideris set directly). When you drive Claude through this adapter withDisableInternalSendFlow="True", those behaviors are the caller's responsibility — you handletool_useblocks and decide whether to retry onstop_reason=max_tokens.
Install
dotnet add package FieldCure.AssistStudio.Controls.WinUI.Anthropic
This transitively brings in FieldCure.AssistStudio.Anthropic (mapper + converter) and FieldCure.AssistStudio.Controls.WinUI (ChatPanel).
Quick Start
XAML:
<controls:ChatPanel x:Name="ChatPanel" DisableInternalSendFlow="True" />
Code-behind:
using FieldCure.AssistStudio.Controls.Anthropic;
var client = new AnthropicClient { ApiKey = "sk-..." };
ChatPanel.UserMessageSubmitted += async (s, e) =>
{
await using var handle = ChatPanel.BeginAnthropicTurn("Claude", "claude-sonnet-4-6");
var conv = ChatPanel.GetConversationAsAnthropicMessages();
var stream = client.Messages.CreateStreaming(new()
{
Model = "claude-sonnet-4-6",
System = conv.SystemPrompt is not null ? new(conv.SystemPrompt) : null,
Messages = conv.Messages,
MaxTokens = 4096,
});
await handle.StreamAnthropicAsync(stream);
};
Dependencies
| Package | Version |
|---|---|
| FieldCure.AssistStudio.Anthropic | >= 0.1.0 |
| FieldCure.AssistStudio.Controls.WinUI | (transitive) |
| Microsoft.WindowsAppSDK | >= 1.7 |
Related Packages
| Package | Description |
|---|---|
| FieldCure.AssistStudio.Anthropic | Platform-agnostic mapper + converter (no WinUI dependency) |
| FieldCure.AssistStudio.Controls.WinUI | The ChatPanel control |
License
MIT
| 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
- FieldCure.AssistStudio.Anthropic (>= 0.1.0-preview.3)
- FieldCure.AssistStudio.Controls.WinUI (>= 0.19.0)
- Microsoft.Windows.SDK.BuildTools (>= 10.0.26100.7705)
- Microsoft.WindowsAppSDK (>= 1.7.260224002)
-
net9.0-windows10.0.19041
- FieldCure.AssistStudio.Anthropic (>= 0.1.0-preview.3)
- FieldCure.AssistStudio.Controls.WinUI (>= 0.19.0)
- Microsoft.Windows.SDK.BuildTools (>= 10.0.26100.7705)
- Microsoft.WindowsAppSDK (>= 1.7.260224002)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0-preview.3 | 48 | 5/4/2026 |
| 0.1.0-preview.2 | 54 | 4/27/2026 |
| 0.1.0-preview.1 | 54 | 4/21/2026 |
v0.1.0-preview.3: Rebuilt against AssistStudio.Anthropic 0.1.0-preview.3 and Controls.WinUI 0.19.0 (HTML/JSX artifact preview, ModelPicker, split-Continue, document/audio chips, Gemini inline image, accessibility AutomationProperties.Name pass), Ai.Providers 0.7.0, AssistStudio.Core 0.19.0. No public API changes in this package.