repl

package
v2026.617.0 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2026 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInputInterrupted = editor.ErrInputInterrupted

Functions

func CommonRunePrefixForTest added in v2026.602.4

func CommonRunePrefixForTest(candidates [][]rune) []rune

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, updateNotice *updater.Notice)

func PrintWelcomeBannerSized added in v2026.609.0

func PrintWelcomeBannerSized(out io.Writer, termW int, cfg *config.Root, model, projHex, projRoot string, replShellFirst bool, updateNotice *updater.Notice)

func Prompt

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

func Run

func Run(loop *Loop) error

func ShellPrefixNormalizedForTest added in v2026.606.0

func ShellPrefixNormalizedForTest(buffer string, shellFirst bool) string

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)

func VisualRowsWithGhostForTest added in v2026.606.0

func VisualRowsWithGhostForTest(width int, prompt, line, ghost string) int

Types

type InputHistoryTest added in v2026.602.4

type InputHistoryTest = editor.HistoryTest

func NewInputHistoryForTest added in v2026.602.4

func NewInputHistoryForTest() *InputHistoryTest

type Loop

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

	InputInterrupt         <-chan struct{}
	PrepareStartupNotice   func()
	TakeStartupNotice      func() bool
	CompleteEnv            replcomplete.ReplCompleteEnv
	FinishSessionLoad      func()
	PromptPrimary          func() string
	PromptContinue         func() string
	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)
}

type MultilineEditorTest added in v2026.602.4

type MultilineEditorTest = editor.MultilineEditorTest

func NewMultilineEditorForTest added in v2026.602.4

func NewMultilineEditorForTest(loop *Loop, history *InputHistoryTest, lines []string, row, col, width int) *MultilineEditorTest

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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