FieldCure.AssistStudio.Controls.WinUI.Anthropic 0.1.0-preview.3

This is a prerelease version of FieldCure.AssistStudio.Controls.WinUI.Anthropic.
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
                    
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.Anthropic" Version="0.1.0-preview.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="FieldCure.AssistStudio.Controls.WinUI.Anthropic" Version="0.1.0-preview.3" />
                    
Directory.Packages.props
<PackageReference Include="FieldCure.AssistStudio.Controls.WinUI.Anthropic" />
                    
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.Anthropic --version 0.1.0-preview.3
                    
#r "nuget: FieldCure.AssistStudio.Controls.WinUI.Anthropic, 0.1.0-preview.3"
                    
#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.Anthropic@0.1.0-preview.3
                    
#: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.Anthropic&version=0.1.0-preview.3&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=FieldCure.AssistStudio.Controls.WinUI.Anthropic&version=0.1.0-preview.3&prerelease
                    
Install as a Cake Tool

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.

License: MIT

Features

  • BeginAnthropicTurn — Creates an assistant message bubble and starts streaming with one call.
  • StreamAnthropicAsync — Pipes RawMessageStreamEvent into ChatPanel rendering (text, thinking blocks, usage tracking).
  • GetConversationAsAnthropicMessages — Converts the current conversation to Anthropic SDK MessageParam format for the next API call.
  • Automatic lifecycleAssistantTurnHandle is IAsyncDisposable. Use await using for 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_task fan-out, parallel pulse placeholders, and truncation-aware recovery are features of ChatPanel's built-in send flow (when Provider is set directly). When you drive Claude through this adapter with DisableInternalSendFlow="True", those behaviors are the caller's responsibility — you handle tool_use blocks and decide whether to retry on stop_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
Package Description
FieldCure.AssistStudio.Anthropic Platform-agnostic mapper + converter (no WinUI dependency)
FieldCure.AssistStudio.Controls.WinUI The ChatPanel control

License

MIT

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

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.