An interactive Claude tool window for Visual Studio 2022. CaduleVS drives the
claude CLI directly from inside the IDE: a VS Code–styled chat surface streams
Claude's output, folds your active editor / solution context into every prompt,
gates file mutations behind an Accept/Reject approval step, and exposes model,
reasoning-effort, and workspace slash commands from the composer.
Built by Dusan Zornic on a strict Clean Architecture core so the business logic and terminal orchestration stay decoupled from the Visual Studio SDK and WPF UI.
Features
- Chat tool window — open from View ▸ Claude Chat (CaduleVS). Dark, VS
Code–style surface with a scrollable history and a multi-line composer
(
Ctrl+Enterto send). - Live streaming + ANSI rendering — each turn spawns
claude -pand streamsstream-jsonoutput; a terminal parser strips ANSI/cursor noise and collapses carriage-return redraws (spinners, progress bars) onto a single line. - Workspace context — the active file, selection, solution, attached files and an optional SQL Server schema are folded into each prompt automatically.
- Approval gate — proposed file edits (or a detected
[y/N]prompt) pause the turn behind an Accept (Y) / Reject (N) overlay; the answer is delivered on the next resumed turn. Edit modes: Ask before edits, Edit automatically, Plan. - Model & effort controls — the toolbar dropdown and slider apply the CLI's
--modeland--effortflags per turn (no broken interactive slash commands). - Slash commands — type
/in the composer for an IntelliSense dropdown, or use the command palette (the/button → "Filter actions…"). Available:Command Action /add <file>Resolve a solution file and attach it as context /clearClear the chat and start a fresh conversation /initBootstrap a CLAUDE.mdcoding-standards file/explain-errorsAnalyze the current build errors and propose fixes /explain [focus]Explain the selection/focused file in plain language (read-only) /optimize [hint]Improve the performance of the selection/focused file in place /simplify [hint]Simplify the selection/focused file for readability in place /describe pr [<id>]Draft a PR title + description from an Azure DevOps PR's diff /fixtests [filter]Run the test suite ( dotnet test); on failures, diagnose and fix them/plan <task>Planning workflow — explore, then present a plan /goal <goal>Pursue a multi-step goal autonomously /batch <change>Apply a change across all relevant files in one pass @-mentions — type@to insert a@Folder/File.cs#50-70reference to a solution file (optionally a line range), resolved into the prompt.- Smart Actions (editor right-click) — select code and right-click for a
Smart Actions submenu: Explain, Fix, Generate Documentation, and
Generate Unit Tests. Each runs the matching composer verb (
/explain,/fix,/doc,/test) on the live selection — identical to typing it in the composer. - Exception assist (debugging) — when the debugger breaks on an exception, Debug ▸ Ask Claude about this Exception (also on the editor right-click menu) sends the exception type, message, and current call stack — plus the throwing file — to Claude for a root-cause diagnosis and fix. The command appears only while stopped on an exception. (The Exception Helper popup itself isn't extensible by the SDK, so this lives on the Debug/editor menus.)
- Inline Edit (
Ctrl+I) — select code, press Ctrl+I (or right-click ▸ Inline Edit (Claude)…), and type an instruction (e.g. "add null checks"). Claude rewrites the selection; the change is previewed in a standard VS difference window (Original vs. Claude proposal) and applied to the buffer only after you confirm — and only if the selection is unchanged since generation. (The Ctrl+I binding shadows the editor's incremental-search shortcut; rebind in Tools ▸ Options ▸ Keyboard if you prefer.) - Autonomous Agent view —
/plan,/goal,/batchsurface a live sub-task checklist and a "files modified" strip, with Force Abrupt Abort and Exit. - CLAUDE.md banner — when a solution has no
CLAUDE.md, a non-intrusive bar invites you to run/init; it auto-hides once the file exists. - Commit message generation — View ▸ Generate Commit Message (Claude) reads the pending commit diff (staged changes, or all tracked changes when nothing is staged) and drafts a message. It's dropped straight into the Git Changes commit box when that box can be located, otherwise copied to the clipboard ready to paste.
Requirements
- Visual Studio 2022 (17.0–17.x), Community / Professional / Enterprise, amd64.
- .NET Framework 4.7.2 (the VSIX target; ships with VS 2022).
- The
claudeCLI installed and onPATH(claude --versionshould work).
Architecture
The solution follows Clean Architecture — dependencies point inward only:
CaduleVS.Presentation (VSIX / WPF) ──► CaduleVS.Application (Ports / use cases)
│ ▲
└────────► CaduleVS.Infrastructure ───────┘
(adapters) │
▼
CaduleVS.Domain (core)
| Project | TFM | Responsibility |
|---|---|---|
| CaduleVS.Domain | netstandard2.0 |
Pure POCO models, enums, state (ChatMessage, AnsiSegment, SessionState, AgentTask…). Zero dependencies. |
| CaduleVS.Application | netstandard2.0 |
Ports (interfaces), the ClaudeSessionCoordinator, slash-command parsing + catalog, workspace-context aggregation. |
| CaduleVS.Infrastructure | netstandard2.0 |
Adapters: claude process orchestration, ANSI tokenizer, approval-prompt detection, stream-json parsing. |
| CaduleVS.Presentation | net472 |
The VSIX package, tool window, WPF chat UI, VS context tracking, and the DI composition root. |
Build & run
A claude CLI and VS 2022 must be installed.
Quick dev loop (builds, deploys to the VS Experimental hive, launches it):
dev.bat
dev.bat --no-launch builds and deploys without opening VS. The Experimental
Instance is a sandboxed VS hive, so it never touches your normal VS install.
Build only (MSBuild):
msbuild src\CaduleVS.Presentation\CaduleVS.Presentation.csproj ^
-t:Restore,Build -p:Configuration=Debug
The build produces the installable package at
src\CaduleVS.Presentation\bin\Debug\CaduleVS.Presentation.vsix.
Install into your normal VS: double-click the .vsix, or run install.bat.
Then open View ▸ Claude Chat (CaduleVS).
Usage notes
- Each turn is a fresh, headless
claude -pprocess; the conversation is threaded across turns via--resume <session_id>. There is no long-lived connection, so the idle status reads Ready. - The composer is gated while an approval is pending — answer the Accept/Reject overlay (or press Y/N) rather than sending a new prompt.
Ctrl+Cwhile the Autonomous Agent view is up triggers Force Abrupt Abort (kills the in-flight turn) when focus is not in a text box.
Diagnostics
If the tool window misbehaves, a session log is written to
%TEMP%\CaduleVS.diag.log — it records command registration, each claude spawn
(with its full argument line), and every turn's exit/result, so a failed turn is
diagnosable from the log alone.
CaduleVS · Dusan Zornic· v1.0.7