repl

package
v2026.605.0 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2026 License: MIT Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

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 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 InputHistoryTest added in v2026.602.4

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

func NewInputHistoryForTest added in v2026.602.4

func NewInputHistoryForTest() *InputHistoryTest

func (*InputHistoryTest) Add added in v2026.602.4

func (h *InputHistoryTest) Add(s string)

func (*InputHistoryTest) Next added in v2026.602.4

func (h *InputHistoryTest) Next() (string, bool)

func (*InputHistoryTest) Prev added in v2026.602.4

func (h *InputHistoryTest) Prev(draft string) (string, bool)

type Loop

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

	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 struct {
	// contains filtered or unexported fields
}

func NewMultilineEditorForTest added in v2026.602.4

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

func (*MultilineEditorTest) Col added in v2026.602.4

func (e *MultilineEditorTest) Col() int

func (*MultilineEditorTest) Complete added in v2026.602.4

func (e *MultilineEditorTest) Complete() bool

func (*MultilineEditorTest) Line added in v2026.602.4

func (e *MultilineEditorTest) Line(i int) string

func (*MultilineEditorTest) Row added in v2026.602.4

func (e *MultilineEditorTest) Row() int

func (*MultilineEditorTest) String added in v2026.602.4

func (e *MultilineEditorTest) String() string

func (*MultilineEditorTest) Up added in v2026.602.4

func (e *MultilineEditorTest) Up()

Jump to

Keyboard shortcuts

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