Skip to content

Commit 09338b1

Browse files
xperiandriclaude
andcommitted
Bring the interactive window plan's status up to date
Registration, the VSIX entry and the editor commands have landed; only the debugger commands are left. Also drop a stray prefix from the title. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent b7de390 commit 09338b1

1 file changed

Lines changed: 18 additions & 12 deletions

File tree

‎docs/ide/FSI-Modern-Interactive-Window-Plan.md‎

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
под# Modernizing the F# Interactive Window: Plan
1+
# Modernizing the F# Interactive Window: Plan
22

33
Replace the legacy `FSharp.VS.FSI` tool window with the same REPL engine that powers **C# Interactive** and **Python Interactive** in Visual Studio: the `Microsoft.VisualStudio.InteractiveWindow` / `Microsoft.VisualStudio.VsInteractiveWindow` packages (source: [microsoft/vs-interactive-window](https://github.com/microsoft/vs-interactive-window)), with a structured JSON-RPC connection to the F# Interactive process instead of the current raw stdin/stdout text protocol.
44

@@ -33,17 +33,23 @@ and contains:
3333
needed. The session starts in the open solution's folder, so `dotnet fsi` runs the SDK that
3434
folder's `global.json` resolves to.
3535

36-
Still to do before the window can be opened in Visual Studio:
37-
38-
- registering the tool window with the shell. The existing F# Interactive window is registered by
39-
`FSharpPackage` in `FSharp.Editor` rather than by a package of its own, and the same route is the
40-
cheaper one here: a `ProvideInteractiveWindow` attribute and an `IVsToolWindowFactory` hook that
41-
calls the provider, rather than a new package with its own GUID and pkgdef;
42-
- the `Microsoft.VisualStudio.InteractiveWindow` prerequisite entry in the VSIX manifest, and the
43-
project's place in the VSIX itself. It is already in `VisualFSharp.slnx`, so it builds;
44-
- commands: open the window, and retargeting Alt+Enter at the new window;
45-
- the debugger attach/detach commands ported from the existing window. The session reports its own
46-
process id in the handshake, so the attach no longer has to guess which process to target.
36+
- `FSharpVsInteractiveWindowPackage.fs` — the package that registers the tool window with the shell
37+
(`ProvideInteractiveWindow`, docked with the Output window) and recreates it through
38+
`IVsToolWindowFactory` when Visual Studio restores a saved layout;
39+
- `FSharpInteractiveCommandFilter.fs` — "Send to Interactive" (Alt+Enter) and "Send line" from an
40+
F# editor, which submit to this window with the source file and line, so diagnostics land on the
41+
user's own file. The "F# Interactive" command in `FSharpPackage` opens this window too, and the
42+
legacy window is no longer reachable from any command.
43+
44+
The project is in the VSIX, with the `Microsoft.VisualStudio.InteractiveWindow` prerequisite in its
45+
manifest, and the VSIX installs the .NET build of fsi, which the window falls back to when the SDK
46+
`global.json` selects predates the JSON-RPC server.
47+
48+
Still to do:
49+
50+
- the debugger attach/detach commands and "Debug in Interactive", ported from the existing window.
51+
The session reports its own process id in the handshake, so the attach no longer has to guess
52+
which process to target. Until then "Debug in Interactive" stays on the legacy command filter.
4753

4854
Everything from Phase 3 onwards (IntelliSense in the input buffer) is untouched, with one
4955
exception: the input and output buffers have lexical colour from a tokenizer-based classifier

0 commit comments

Comments
 (0)