Skip to content

v0.2.4

Choose a tag to compare

@beihzb beihzb released this 26 Aug 01:56
· 20 commits to main since this release

v0.2.4

ANSI escape codes no longer leak into the notebook output area (fixes #2).

Version note: the first attempt at this fix was tagged v0.2.3, but that version could not be published to npm (npm forbids re-publishing an unpublished version number). This release carries the identical fix under v0.2.4.

Fixes

  • ANSI stream output rendered verbatim (issue #2): kernel stream text containing ANSI escape sequences without \r (e.g. \x1b[32m...\x1b[0m) was rendered raw — the user saw literal [32m / [0m garbage. Root cause: OutputView's stream branch already computed the stripped string via renderStreamText, but the render line (r && r.tail) || o.text discarded it whenever r was a string (no \r) and fell back to the raw o.text. The stripped result is now used for string results; \r-style streams (tqdm progress) are unchanged.
    • Real-world impact: IPython's colored Pdb (ipdb> prompt, source lines wrapped in \x1b[32m...) and colorama-style colored prints rendered as [32m... garbage.
  • ANSI in error titles (evalue): TracebackView stripped ANSI from traceback lines but not from the error message itself (ValueError: \x1b[31m...), so colored exception messages leaked the same way. Now stripped too.
  • \r stream with an empty last segment: a stream ending in a bare \r (line cleared) previously fell back to the raw text; it now renders as empty, which is the correct visual state.

Install

dsh plugin --profile web add @beihaizb/dsh-notebook@0.2.4

Then restart dsh web. A Notebook tab appears at the top of the session.

Version pinning: if you install shortly after this release, pnpm's supply-chain policy (minimumReleaseAge) may skip the just-published version and install an older one. Pin the version explicitly (@beihaizb/dsh-notebook@0.2.4), or use @latest once the release is older than the policy window.