read

command
v0.0.0-...-0f1ffb3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 25, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Command read shows an answer as it is written.

It is the deepest of these and the one the library is for. Markdown arrives a few words at a time — from a model, over a network, from anything that produces text before it has finished thinking — and two things have to be true at once: what is certainly finished should stop being redrawn, and what is still being written should look like what it says so far.

So a stream splits it. Every block it hands back is printed into the terminal's own scrollback, where it stays after this program exits, and is never parsed or drawn again however long the answer becomes. What is left is short by construction and is re-rendered on every chunk.

Nothing about that is markdown's alone. The same shape — publish what is finished, redraw only what is not — is what any streaming interface built on this does.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL