markdown

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2025 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StreamMarkdown

func StreamMarkdown(
	ctx context.Context,
	next func(context.Context) (Chunk, error),
	w io.Writer,
	opts StreamOptions,
) error

StreamMarkdown renders streaming markdown to the supplied writer. When Raw is false it spins up a Bubble Tea viewport so the output remains scrollable and responsive.

Types

type Chunk

type Chunk struct {
	Text string
}

Chunk represents an incremental markdown fragment emitted by the stream.

type StreamOptions

type StreamOptions struct {
	Raw      bool
	WordWrap int
	Cancel   func()
	UIWriter io.Writer
}

StreamOptions configures how streaming markdown should be rendered.

Jump to

Keyboard shortcuts

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