Skip to content

verso-v1.0.16

Choose a tag to compare

@github-actions github-actions released this 15 Apr 22:11
· 7 commits to main since this release

Release adding a Display API for inline rich outputs, source file imports, F# variable injection and formatter improvements, and several cross-kernel stability fixes.

New: Display API

  • User code can now call .Display(value) or .Display(value, mimeType) during cell execution to emit inline, MIME-typed outputs
  • Integrated across all language kernels: C#, F#, Python, JavaScript (Jint and Node), and PowerShell
  • DisplayHandler and DisplayFormatterContext resolve formatters and write outputs through the execution pipeline
  • Convenience CellOutput factory methods added: Plain, Html, Svg, Png, Jpeg, Gif, WebP, Bmp, Json, Csv, Mermaid, Error

New: Source File Imports

  • #!import now supports importing source files (.cs, .py, .ts, etc.) by mapping file extensions to registered kernels
  • Magic command lines are extracted and sorted by priority (package directives first, then imports, then other directives) before execution
  • Kernel lookup by file extension via FindKernelByFileExtension and GetSupportedExtensions

New: Extension Template Scaffolds

  • Optional scaffolds for magic commands, cell types, and themes in the extension template
  • Template parameters (includeMagicCommand, includeCellType, includeTheme) control which scaffolds are generated
  • Sample implementations and corresponding unit tests included

Improved: F# Variable Injection

  • Primitive types (string, int, long, double, float, bool, decimal) are now injected as F#-typed let bindings via EvalSilent, so type-dependent features like printf format specifiers work correctly
  • Names that already exist as native FSI bindings are skipped to avoid shadowing
  • Non-primitive types fall back to AddBoundValue

Improved: F# Data Formatter

  • Collection display limit is now configurable via MaxCollectionLimit (default 100) and wired to kernel settings for runtime changes
  • TryFormatAsync is now an instance method so kernel settings are applied during formatting
  • VariableBridge.UpdateOptions pushes option changes (e.g., publishPrivateBindings) to the bridge without requiring a kernel restart

Improved: C# Variable Preamble

  • BuildVariableStorePreamble now only injects variables that are not already present in the Roslyn script state, preventing type conflicts (e.g., CS0266) when users re-declare a variable with a specific type

Improved: Display Handler MIME Hints

  • When a MIME hint is supplied and the value is already a string, the raw string is written directly with the provided MIME type, bypassing the formatter pipeline

Fixed: F# Script Directive Paths on Windows

  • Removed forward-slash normalization that broke #I include-path resolution on Windows
  • Emit #r, #load, and #I directives using F# verbatim strings (@"...") so backslashes in Windows paths are treated as literal path separators instead of escape sequences

Improved: VS Code Editor Provider

  • Host lookup in save/rename/backup flows now uses hostRegistry.getByUri instead of the previous getHostForDocument scanning logic
  • BlazorBridge.getDocumentUri() exposes the editor's document URI