Repository navigation
v0.2.4
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/[0mgarbage. Root cause:OutputView's stream branch already computed the stripped string viarenderStreamText, but the render line(r && r.tail) || o.textdiscarded it wheneverrwas a string (no\r) and fell back to the rawo.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...) andcolorama-style colored prints rendered as[32m...garbage.
- Real-world impact: IPython's colored Pdb (
- ANSI in error titles (
evalue):TracebackViewstripped 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. \rstream 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.4Then 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@latestonce the release is older than the policy window.