TinyChat 1.0.5

dotnet add package TinyChat --version 1.0.5
                    
NuGet\Install-Package TinyChat -Version 1.0.5
                    
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="TinyChat" Version="1.0.5" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="TinyChat" Version="1.0.5" />
                    
Directory.Packages.props
<PackageReference Include="TinyChat" />
                    
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 TinyChat --version 1.0.5
                    
#r "nuget: TinyChat, 1.0.5"
                    
#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 TinyChat@1.0.5
                    
#: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=TinyChat&version=1.0.5
                    
Install as a Cake Addin
#tool nuget:?package=TinyChat&version=1.0.5
                    
Install as a Cake Tool

TinyChat 💬

A minimalistic but extensible chat control library for Windows Forms.

Screenshot

✨ Features

  • Simplistic Chat Interface: Clean, responsive chat UI with message history and input controls
  • Streaming Support: Real-time message streaming for AI assistants and live conversations
  • Extensible Architecture: Interface-driven design allowing custom message types and custom UI components
  • Made for WinForms: Because business applications might need AI chats, too

💖 Motivation

While there are countless web-based chat controls, there's nearly to none for the good old Windows Forms ecosystem and this is not surprising. However, I needed a very basic user interface to interact with AI models within an WinForms application.

DevExpress, the component vendor of my choice, has a very nice chat control. However, it's built upon web technologies and with that it introduces a significant number of dependencies to ship. I didn't want to pack additional 50MB of assemblies for a single control and theirs is so feature-rich that I would have to to disable 90% of it's functionality nevertheless.

That's why I quickly hacked down TinyChat. I hope this might help anyone out there. But please keep in mind that I never inteded to build a full-featured chat client with advanced text rendering support and so on. If you need more features, please consider sending pull-requests or using the DevExpress chat control.

🤷‍♂️ Not implemented

Not planned

These features are not implemented and I don't plan to implement them. However, I'd be happy to review pull-requests.

  • Rich text message support

    🔸 This will be very hard to do in Winforms. Especially because AI assistants can come up with pretty much every flavor of formatting like HTML, Markdown, RTF, etc.

  • File attachment support
  • Image support
  • everything else you know from chatbots

Might come

  • Basic HTML support with DevExpress labels
  • Designer support for properties like UI settings like Fonts, Splitter position, ...
  • Select and copy texts
  • Send button
  • Shortcuts
  • Requesting cancellation
  • Starting new chats

🚀 Quick Start

Basic Usage

The chat control provides a Messages property that can be set to provide message history. When the user is sending messages, the events MessageSending and MessageSent gets fired to prevent or react on user messages.

using TinyChat;

var chatControl = new ChatControl();
chatControl.Dock = DockStyle.Fill;
Controls.Add(chatControl);

// Set up message handling
chatControl.MessageSent += (sender, e) =>
{
    // Handle user messages
    Console.WriteLine($"User sent: {e.Content}");
    
    // Add a response
    chatControl.AddMessage(
        new NamedSender("Assistant"), 
        new StringMessageContent("Hello! How can I help you?")
    );
};

Streaming Messages with IAsyncEnumerable

Use AddStreamingMessage() to pass in a stream of tokens asynchronously. The chat component will take care of updating the user interface from background threads.

IAsyncEnumerable<string> stream = ...;
chatControl.AddStreamingMessage(new NamedSender("AI Assistant"), stream);

🎬 Demos

The repository includes two pretty similar demo applications:

  • A basic Windows Forms application with dependency-free standard controls
  • A DevExpress powered application showcasing the customizability with skinned DevExpress components (requires a DevExpress license)
dotnet run --project WinFormsDemo
dotnet run --project DevExpressDemo

Credits

The package icon was made by Vectors Market and is licensed by the Flaticons license.

Product Compatible and additional computed target framework versions.
.NET net9.0-windows7.0 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.
  • net9.0-windows7.0

    • No dependencies.

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
1.0.5 116 7/31/2025
1.0.4 443 7/24/2025
1.0.3 370 7/21/2025
1.0.2 365 7/21/2025
1.0.1 62 7/18/2025