context

package
v0.10.4 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommandRunner added in v0.8.12

type CommandRunner interface {
	RunCommandImmediate(args []string) ([]byte, error)
	RunCommandImmediateWithEnv(args []string, env []string) ([]byte, error)
	RunCommandStreaming(ctx context.Context, args []string) (*StreamingCommand, error)
	RunCommand(args []string, continuations ...tea.Cmd) tea.Cmd
	RunCommandWithInput(args []string, input string, continuations ...tea.Cmd) tea.Cmd
	RunInteractiveCommand(args []string, continuation tea.Cmd) tea.Cmd
}

type MainCommandRunner added in v0.8.12

type MainCommandRunner struct {
	Location string
	Askpass  *askpass.Server
	// contains filtered or unexported fields
}

func (*MainCommandRunner) RunCommand added in v0.8.12

func (a *MainCommandRunner) RunCommand(args []string, continuations ...tea.Cmd) tea.Cmd

func (*MainCommandRunner) RunCommandImmediate added in v0.8.12

func (a *MainCommandRunner) RunCommandImmediate(args []string) ([]byte, error)

func (*MainCommandRunner) RunCommandImmediateWithEnv added in v0.10.3

func (a *MainCommandRunner) RunCommandImmediateWithEnv(args []string, env []string) ([]byte, error)

func (*MainCommandRunner) RunCommandStreaming added in v0.8.12

func (a *MainCommandRunner) RunCommandStreaming(ctx context.Context, args []string) (*StreamingCommand, error)

func (*MainCommandRunner) RunCommandWithInput added in v0.9.11

func (a *MainCommandRunner) RunCommandWithInput(args []string, input string, continuations ...tea.Cmd) tea.Cmd

func (*MainCommandRunner) RunInteractiveCommand added in v0.8.12

func (a *MainCommandRunner) RunInteractiveCommand(args []string, continuation tea.Cmd) tea.Cmd

type MainContext

type MainContext struct {
	CommandRunner
	SelectedItem              SelectedItem   // Single item where cursor is hover.
	CheckedItems              []SelectedItem // Items checked ✓ by the user.
	Location                  string
	JJConfig                  *config.JJConfig
	DefaultRevset             string
	CurrentRevset             string
	TerminalHasDarkBackground bool
	TerminalThemeDetected     bool
	Histories                 *config.Histories
	ScriptVM                  *lua.LState
}

func NewAppContext

func NewAppContext(location string, aps *askpass.Server) *MainContext

func (*MainContext) AddCheckedItem added in v0.9.1

func (ctx *MainContext) AddCheckedItem(item SelectedItem)

func (*MainContext) ClearCheckedItems added in v0.9.1

func (ctx *MainContext) ClearCheckedItems(ofType reflect.Type)

func (*MainContext) CreateReplacements added in v0.9.0

func (ctx *MainContext) CreateReplacements() map[string]string

CreateReplacements creates context-aware replacements for exec input.

func (*MainContext) GetSelectedRevisions added in v0.9.2

func (ctx *MainContext) GetSelectedRevisions() map[string]bool

func (*MainContext) RemoveCheckedItem added in v0.9.1

func (ctx *MainContext) RemoveCheckedItem(item SelectedItem)

func (*MainContext) SetSelectedItem

func (ctx *MainContext) SetSelectedItem(item SelectedItem) tea.Cmd

func (*MainContext) ToggleCheckedItem added in v0.9.2

func (ctx *MainContext) ToggleCheckedItem(item SelectedRevision)

type SelectedCommit added in v0.9.10

type SelectedCommit = common.SelectedCommit

type SelectedFile

type SelectedFile = common.SelectedFile

type SelectedItem

type SelectedItem = common.SelectedItem

SelectedItem type aliases to break circular dependencies

type SelectedOperation added in v0.8.1

type SelectedOperation = common.SelectedOperation

type SelectedRevision

type SelectedRevision = common.SelectedRevision

type StreamingCommand added in v0.8.12

type StreamingCommand struct {
	io.ReadCloser
	ErrPipe io.ReadCloser
	// contains filtered or unexported fields
}

func (*StreamingCommand) Close added in v0.8.12

func (c *StreamingCommand) Close() error

func (*StreamingCommand) Wait added in v0.9.8

func (c *StreamingCommand) Wait() error

Jump to

Keyboard shortcuts

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