termtext

package
v0.52.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package termtext removes terminal control sequences from text that came from a model, a tool or another external source before chat writes it to a terminal.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Clean

func Clean(value string) string

Types

type Cleaner

type Cleaner struct {
	// contains filtered or unexported fields
}

func (*Cleaner) Flush

func (c *Cleaner) Flush() string

func (*Cleaner) Write

func (c *Cleaner) Write(value string) string

Write removes terminal controls incrementally; escape sequences may span deltas.

Jump to

Keyboard shortcuts

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