VOOZH about

URL: https://www.nuget.org/packages/FieldCure.AssistStudio.Controls.WinUI.Anthropic

⇱ NuGet Gallery | FieldCure.AssistStudio.Controls.WinUI.Anthropic 0.2.0-preview.4




👁 Image
FieldCure.AssistStudio.Controls.WinUI.Anthropic 0.2.0-preview.4

This is a prerelease version of FieldCure.AssistStudio.Controls.WinUI.Anthropic.
dotnet add package FieldCure.AssistStudio.Controls.WinUI.Anthropic --version 0.2.0-preview.4
 
 
NuGet\Install-Package FieldCure.AssistStudio.Controls.WinUI.Anthropic -Version 0.2.0-preview.4
 
 
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.2.0-preview.4" />
 
 
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.2.0-preview.4" />
 
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.2.0-preview.4
 
 
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: FieldCure.AssistStudio.Controls.WinUI.Anthropic, 0.2.0-preview.4"
 
 
#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.2.0-preview.4
 
 
#: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.2.0-preview.4&prerelease
 
Install as a Cake Addin
#tool nuget:?package=FieldCure.AssistStudio.Controls.WinUI.Anthropic&version=0.2.0-preview.4&prerelease
 
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

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

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 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. 
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.2.0-preview.4 53 5/25/2026
0.1.0-preview.3 58 5/4/2026
0.1.0-preview.2 60 4/27/2026
0.1.0-preview.1 61 4/21/2026

v0.2.0-preview.4: BuildAnthropicParams gains an optional tools list (IList<IAssistTool>? tools) — each tool's ParameterSchema is parsed once and forwarded as the SDK's InputSchema.FromRawUnchecked, so consumers can wire IAssistTool implementations into Anthropic turns without writing the SDK Tool param shape themselves. The companion ChatPanel.AppendToolRoundAsync (in Controls.WinUI 0.22.0) records each multi-round result against the active assistant turn so the SDK-driven flow shows the same inline tool blocks as the internal one. WindowsAppSDK 1.7.* → 2.0.* (floating). Multi-target: net9 dropped (STS EOL 2026-05-12), net10 added — now net8.0-windows + net10.0-windows. Rebuilt against AssistStudio.Anthropic 0.2.0-preview.4, Controls.WinUI 0.22.0 (ChatPanel : IToolContext, AppendToolRoundAsync, pre-init send queue, Plotly inline rendering, ElicitationFieldInfo ns move), Ai.Providers 0.8.0, Core 0.20.0. Canonical reference: in-repo samples/AnthropicSdkSample (now demonstrates 3-tool flow: fetch + schedule_reminder + ask_user).