CDS.ScriptChat.Core
1.4.1
dotnet add package CDS.ScriptChat.Core --version 1.4.1
NuGet\Install-Package CDS.ScriptChat.Core -Version 1.4.1
<PackageReference Include="CDS.ScriptChat.Core" Version="1.4.1" />
<PackageVersion Include="CDS.ScriptChat.Core" Version="1.4.1" />
<PackageReference Include="CDS.ScriptChat.Core" />
paket add CDS.ScriptChat.Core --version 1.4.1
#r "nuget: CDS.ScriptChat.Core, 1.4.1"
#:package CDS.ScriptChat.Core@1.4.1
#addin nuget:?package=CDS.ScriptChat.Core&version=1.4.1
#tool nuget:?package=CDS.ScriptChat.Core&version=1.4.1
CDS.ScriptChat.Core
Provider-agnostic conversation engine behind the CDS.ScriptChat script+chat
panel, with Roslyn-backed symbol lookup so the assistant answers from your real
API rather than from recall. Built on Microsoft.Extensions.AI.IChatClient, so
the provider (Claude, OpenAI, Grok) is a configuration choice rather than a
dependency. No WinForms.
What it gives you:
ScriptChatSession— the conversation, including the script the assistant is reasoning about.ScriptEditProposal/ScriptDiff— a full-script rewrite, surfaced as a diff for the host to accept or reject.ScriptEditHunk/ScriptPatchApplier— a targeted find/replace patch: one or more anchored old-text/new-text hunks, for a small, localised change instead of rewriting the whole script. A hunk applies only if its anchor matches the current script exactly once; otherwise it fails closed with a clear reason rather than guessing.- Either way, proposals arrive as structured tool calls and are never applied automatically or parsed out of markdown fences.
ScriptChatSessionOptions.ForHostApi(typeof(MyGlobals))— the batteries-included path. Name one type and you get both halves: an orientation index generated from it by reflection, and a workinglookup_symbolresolved against your own assemblies. Because both come from the same type, what the assistant is told exists and what it can ask about cannot drift apart.HostApiIndex/RoslynSymbolResolver/MetadataCompilation— those two halves on their own, for a host that wants one and not the other.RoslynSymbolLookupProvider— also takes a liveFunc<CancellationToken, Task<Compilation?>>, if your editor already produces a compilation.ISymbolLookupProvider— still the hook by which a host with its own symbol engine answers instead.lookup_symbolis offered to the model only when something can actually answer it.ScriptChatTarget— describes one of a host's scripts (name, read/write delegates, session-options factory) forCDS.ScriptChat.WinForms'sScriptChatHostPanelto drive a conversation per script.
Set
<GenerateDocumentationFile>true</GenerateDocumentationFile>in your app. Roslyn only finds an assembly's documentation when the.xmlis deployed beside the.dll; without it every lookup returns a correct signature with no prose, which looks fine and isn't.
For a ready-made WinForms UI on top of this, see CDS.ScriptChat.WinForms.
Bring your own key. The library never stores, logs or transmits an API key anywhere except the provider SDK call itself.
MIT licensed.
Full docs, a screenshot, and the design record: GitHub repo.
Credits
Package icon: Seo and web icons created by Yogi Aprelliyanto — Flaticon
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Anthropic (>= 12.42.0)
- Microsoft.CodeAnalysis.CSharp (>= 5.9.0)
- Microsoft.Extensions.AI (>= 10.9.0)
- Microsoft.Extensions.AI.OpenAI (>= 10.9.0)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.11)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on CDS.ScriptChat.Core:
| Package | Downloads |
|---|---|
|
CDS.ScriptChat.WinForms
WinForms script+chat panel for the CDS.ScriptChat library. Host-agnostic: the script buffer is reached through caller-supplied delegates, with no dependency on any specific editor control. |
GitHub repositories
This package is not used by any popular GitHub repositories.