Repository navigation
verso-v1.0.20
·
119 commits
to main
since this release
Release adding opt-in .ipynb round-trip save so Jupyter notebooks can be edited and saved in Verso without forcing a conversion to .verso, live host streaming and interactive Read-Host support in the PowerShell kernel, per-cell view-state honored across the verso run CLI and HTML/Markdown exporters, smarter SQL handling for BEGIN/END/CASE blocks and @@global session variables, sibling-cell run buttons disabled while a cell is executing, plus fixes for Write-Warning being emitted twice and host protocol output bleeding into cell output when a kernel captures stdout.
Thanks to @eosfor for contributing PR #48 in this release.
New: Opt-In .ipynb Round-Trip Save
JupyterSerializer.SerializeAsyncnow writes Jupyter nbformat v4 (kernelspec, list-of-strings source, execution counts, stream/error/display_data outputs) instead of throwingNotSupportedException; cell outputs round-trip when the toggle is on- Host
notebook/saveaccepts an optionalformatparameter and resolves the matching serializer viaExtensionHost.GetSerializers(), falling back toversofor clients that do not send the field - VS Code adds a
verso.preserveOriginalFormatsetting (default off); when on and the document ends in.ipynb, the editor saves back as.ipynbinstead of writing a sibling.verso - CLI gains a
--preserve-formatflag onverso replandverso serve(default off);.savewith no path honors the original.ipynbextension, while explicit.save foo.ipynbis always respected ServerNotebookServiceselectsJupyterSerializerwhenPreserveFormatis set and the loaded path is.ipynb- Verso-specific cell types collapse to Jupyter
rawcells with the original type stashed incell.metadata.verso_type; layouts, parameter definitions, and theme preferences have no Jupyter representation and do not round-trip - README,
vscode/README.md,src/Verso.Cli/README.md,docs/architecture/engine.md,docs/architecture/front-ends.md, anddocs/migration/from-jupyter.mdupdated to describe the opt-in and its round-trip semantics
New: PowerShell Host UI Streaming and Interactive Input
- PowerShell kernel now hosts a custom
PSHostUserInterface;Write-Host,Write-Verbose,Write-Debug, andWrite-Warningstream live through the host callback as the pipeline runs rather than appearing only after the cell completes Read-Hostis supported throughIExecutionContext.RequestInputAsync; the Blazor ServerNotebookPagedisplays a modal dialog and switches to a password input when the kernel requests a secure read- Cell run and run-all handlers start execution on a background task so the Blazor Server circuit can process modal submit, cancel, and close events while a
Read-Hostcell is waiting for input - Information stream filters records tagged
PSHOSTthat already reached the host callback, and finalInformationLinesare deduplicated against plain-text outputs streamed during the same execution soWrite-Information -InformationAction Continueno longer renders twice Verso.PowerShellHostadapter has been folded intoVerso.PowerShellas an internalVerso.PowerShell.Kernel.Hostnamespace; architecture docs updated accordinglySupportsVirtualTerminalis disabled while ANSI escape sequences are stripped, avoiding advertising VT support the host cannot honor yetServerNotebookServicesubscribes toScaffold.OnCellOutputUpdatedand forwards updates throughOnOutputUpdatedsoverso serverepaints running cells as host output arrives; cancellation and password-mode flags propagate through the input flow- Regression coverage added for live output forwarding,
Read-Hosthappy path,Read-Hostcancellation, password flag propagation, modal submit/cancel/password rendering, andWrite-Informationoutput
New: Per-Cell View-State in CLI and Exporters
- New
ExportOptions.RespectCellViewStateflag (default on) and aCellViewStateReaderutility expose user-actionable per-cell view-state metadata (verso:ui.*) to non-interactive consumers - HTML and Markdown exporters respect layout visibility from
CellVisibilityResolver, skip or hide cells based on combined layout and view-state, render truncated text previews with a footer when requested, and separate code-source rendering from outputs verso runaccepts a new--ignore-view-stateflag to opt out of honoring per-cell view state for headless runsOutputRendererhonorsoutputVisibilityandinputCollapsedmetadata with preview-line truncation;TerminalRendererskips or partially surfaces outputs accordingly while still showing errors, and treats preview as expanded in the interactive REPLCellViewStateReaderis now public; exported HTML and Markdown no longer duplicate rendered markdown outputs because markdown-cell outputs are skipped in exporters- Tests cover hidden and preview outputs, input-collapsed markdown, custom preview line counts, and the disable-view-state path
Improved: SQL Statement Splitting
SqlStatementSplittertracksBEGIN/ENDandCASE/ENDcontrol-flow blocks so semicolons inside those blocks are no longer treated as statement separators- Whole-word keyword matching via helper methods (
IsWordChar,IsWordBoundaryStart,MatchKeyword,IsTransactionalBegin) - Transactional
BEGINvariants (BEGIN TRAN,TRANSACTION,DISTRIBUTED,DIALOG,CONVERSATION) are recognized and excluded from block tracking - Unit tests cover nested blocks,
TRY/CATCH, transactionalBEGINs,CASEexpressions, string and identifier edge cases, lowercase keywords, and strayENDhandling
Improved: SQL Parameter Detection Skips @@globals
- Parameter regex switches to a negative lookbehind (
(?<!@)@(\w+)) so T-SQL and MySQL session variables like@@SPIDand@@VERSIONare no longer flagged as unresolved parameters - Tests verify that globals produce no warnings, mixed queries warn only for real parameters, and globals at the start of a query are ignored
Improved: Sibling Cell Run Buttons During Execution
Cell,DashboardCell, andDashboardGridaccept a newIsRunDisabledparameter; both WASM and Blazor ServerNotebookPagepropagate it so run buttons on non-executing cells are disabled while a cell is running- Run button title shows a contextual tooltip when disabled; disabled state accounts for either the cell itself executing or a global run-disabled flag
- Unit test verifies sibling run buttons disable during execution and re-enable on completion
Improved: WebView Resource Isolation
blazorEditorProvider.tsdropscontext.extensionUrifrom the webview'slocalResourceRoots, leaving only the WASM root so the webview can no longer load arbitrary files from the extension installation
Fixed: Duplicate Write-Warning Output in PowerShell
Write-Warningwas being emitted twice: once live via the host UI'sWriteWarningLine(formatted asWARNING:) and again after pipeline completion viaps.Streams.Warningaggregation (formatted as[WARNING])- Removed
WarningLinesfromInvokeResultand stopped consumingps.Streams.Warning; the host UI's live emission is now the single source of truth, matching howWrite-VerboseandWrite-Debugalready worked - Regression tests added asserting
Write-Warning,Write-Error,Write-Verbose, andWrite-Debugeach produce exactly one output
Fixed: Host Protocol Output Captured by Kernel Console.SetOut
- Kernels that call
Console.SetOutto capture per-evaluation stdout could cause host protocol notifications to be re-emitted as cell output - Protocol writer now binds to
Console.OpenStandardOutput()(UTF-8 without BOM) instead ofConsole.Out;SendLineaccepts aTextWriterand usesWriteLine/Flush - All call sites including the
HostReadynotification updated to use the new writer so captured stdout cannot leak into cell output