repl

package
v2026.602.2 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2026 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewReadline

func NewReadline(defaultPrompt string) (*readline.Instance, func(string) (string, error), error)

func PrintWelcomeBanner

func PrintWelcomeBanner(out io.Writer, cfg *config.Root, model, projHex, projRoot string, replShellFirst bool)

func Prompt

func Prompt(rl *readline.Instance, prompt string) (string, error)

func Run

func Run(loop *Loop) error

func StdinIsTerminal

func StdinIsTerminal() bool

func TryPasteImageAtCursor

func TryPasteImageAtCursor(stderr io.Writer, saveImage func() (tag string, err error), line []rune, pos int, key rune) ([]rune, int, bool)

Types

type Loop

type Loop struct {
	RL  *readline.Instance
	Out io.Writer
	Ctx context.Context

	CompleteEnv            replcomplete.ReplCompleteEnv
	FinishSessionLoad      func()
	RefreshPrompt          func()
	RefreshPromptContinue  func()
	HandleSlash            func(line string) error
	SlashDeps              func() commands.Deps
	OnUserMessage          func(line string) error
	ClipboardPasteForStdin func() (tag string, ok bool)
	SaveClipboardImage     func() (tag string, err error)
}

Jump to

Keyboard shortcuts

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