btw

package
v2026.1009.2 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2026 License: MIT Imports: 14 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const CatchUpPause = 20

Variables

This section is empty.

Functions

func CompleteMessages

func CompleteMessages(msgs []chatstore.Message) []chatstore.Message

func Execute

func Execute(ctx context.Context, h Host, out io.Writer, question, assistantPrefix string) error

Types

type Host

type Host interface {
	SessionMessagesSnapshot() ([]chatstore.Message, map[int]string)
	SystemPromptBtw(disableThinking bool) (string, error)
	BtwLinePrefixes() (userPrefix, assistantPrefix string)
	ReadBtwInput(out io.Writer, userPrefix, initial string) (string, error)
	Config() *config.Root
	ModelName() string
	Backend() llm.CompletionBackend
}

type OutputMux

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

func NewOutputMux

func NewOutputMux(live io.Writer) *OutputMux

func (*OutputMux) Buffering

func (m *OutputMux) Buffering() bool

func (*OutputMux) FlushBurst

func (m *OutputMux) FlushBurst()

func (*OutputMux) Live

func (m *OutputMux) Live() io.Writer

func (*OutputMux) SetBufferMain

func (m *OutputMux) SetBufferMain()

func (*OutputMux) TerminalFD added in v2026.716.0

func (m *OutputMux) TerminalFD() (uintptr, bool)

TerminalFD exposes the live writer's terminal descriptor without making callers depend on the concrete writer used by the mux. It lets display code keep terminal-aware formatting while the mux is buffering output.

func (*OutputMux) Write

func (m *OutputMux) Write(p []byte) (int, error)

func (*OutputMux) WriteLive

func (m *OutputMux) WriteLive(p []byte) (int, error)

type Service

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

func NewService

func NewService(host Host, mux *OutputMux, runCtx context.Context, stopRun func(error), stopErr error) *Service

func (*Service) Start

func (s *Service) Start()

func (*Service) Stop

func (s *Service) Stop()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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