tui

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2026 License: MIT Imports: 32 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultMaxCommandLines is the default number of lines to show when collapsed
	DefaultMaxCommandLines = 20
)
View Source
const (
	// DefaultMaxVisibleLines is the default number of lines to show when collapsed
	DefaultMaxVisibleLines = 20
)

Variables

View Source
var DarkTheme = Theme{
	Muted:     lipgloss.Color("#6B7280"),
	Accent:    lipgloss.Color("#F59E0B"),
	Primary:   lipgloss.Color("#60A5FA"),
	AI:        lipgloss.Color("#A78BFA"),
	Separator: lipgloss.Color("#4B5563"),

	Text:         lipgloss.Color("#D1D5DB"),
	TextDim:      lipgloss.Color("#9CA3AF"),
	TextBright:   lipgloss.Color("#FFFFFF"),
	TextDisabled: lipgloss.Color("#4B5563"),

	Success: lipgloss.Color("#10B981"),
	Error:   lipgloss.Color("#EF4444"),
	Warning: lipgloss.Color("#FBBF24"),

	Border:     lipgloss.Color("#374151"),
	Background: lipgloss.Color("#1F2937"),
}

DarkTheme is the color palette for dark terminals

View Source
var LightTheme = Theme{
	Muted:     lipgloss.Color("#6B7280"),
	Accent:    lipgloss.Color("#D97706"),
	Primary:   lipgloss.Color("#2563EB"),
	AI:        lipgloss.Color("#7C3AED"),
	Separator: lipgloss.Color("#D1D5DB"),

	Text:         lipgloss.Color("#1F2937"),
	TextDim:      lipgloss.Color("#4B5563"),
	TextBright:   lipgloss.Color("#111827"),
	TextDisabled: lipgloss.Color("#9CA3AF"),

	Success: lipgloss.Color("#059669"),
	Error:   lipgloss.Color("#DC2626"),
	Warning: lipgloss.Color("#B45309"),

	Border:     lipgloss.Color("#E5E7EB"),
	Background: lipgloss.Color("#F3F4F6"),
}

LightTheme is the color palette for light terminals

Functions

func ExecuteCommand

func ExecuteCommand(ctx context.Context, m *model, input string) (string, bool)

ExecuteCommand executes a slash command

func IsDarkBackground added in v1.1.0

func IsDarkBackground() bool

IsDarkBackground returns whether the terminal has a dark background

func IsSkillCommand added in v1.1.0

func IsSkillCommand(cmd string) (*skill.Skill, bool)

IsSkillCommand checks if the command is a registered skill. Returns the skill and true if found, nil and false otherwise.

func ParseCommand

func ParseCommand(input string) (cmd string, args string, isCmd bool)

ParseCommand parses input and returns command name and args if it's a slash command

func Run

func Run() error

func RunWithPlanMode added in v1.1.0

func RunWithPlanMode(task string) error

Types

type AuthMethodItem

type AuthMethodItem struct {
	Provider    provider.Provider
	AuthMethod  provider.AuthMethod
	DisplayName string
	Status      provider.ProviderStatus
	EnvVars     []string
}

AuthMethodItem represents an auth method in the second level

type BashPreview

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

BashPreview renders a bash command preview with expand/collapse functionality

func NewBashPreview

func NewBashPreview(meta *permission.BashMetadata) *BashPreview

NewBashPreview creates a new BashPreview instance

func (*BashPreview) IsExpanded

func (b *BashPreview) IsExpanded() bool

IsExpanded returns whether the preview is expanded

func (*BashPreview) NeedsExpand

func (b *BashPreview) NeedsExpand() bool

NeedsExpand returns true if the command has more lines than the default visible count

func (*BashPreview) Render

func (b *BashPreview) Render(width int) string

Render renders the bash command preview with simplified format (3-space indent, no line numbers)

func (*BashPreview) SetMaxVisible

func (b *BashPreview) SetMaxVisible(n int)

SetMaxVisible sets the maximum visible lines when collapsed

func (*BashPreview) ToggleExpand

func (b *BashPreview) ToggleExpand()

ToggleExpand toggles between expanded and collapsed view

type Command

type Command struct {
	Name        string
	Description string
	Handler     CommandHandler
}

Command represents a slash command

func GetMatchingCommands

func GetMatchingCommands(query string) []Command

GetMatchingCommands returns commands matching the query using fuzzy search

func GetSkillCommands added in v1.1.0

func GetSkillCommands() []Command

GetSkillCommands returns skill commands for command suggestions. Skill names use the format namespace:name (e.g., git:commit).

type CommandHandler

type CommandHandler func(ctx context.Context, m *model, args string) (string, error)

CommandHandler is a function that handles a slash command

type DiffPreview

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

DiffPreview renders a diff preview with expand/collapse functionality

func NewDiffPreview

func NewDiffPreview(diffMeta *permission.DiffMetadata) *DiffPreview

NewDiffPreview creates a new DiffPreview instance

func (*DiffPreview) IsExpanded

func (d *DiffPreview) IsExpanded() bool

IsExpanded returns whether the preview is expanded

func (*DiffPreview) Render

func (d *DiffPreview) Render(width int) string

Render renders the diff preview

func (*DiffPreview) SetMaxVisible

func (d *DiffPreview) SetMaxVisible(n int)

SetMaxVisible sets the maximum visible lines when collapsed

func (*DiffPreview) ToggleExpand

func (d *DiffPreview) ToggleExpand()

ToggleExpand toggles between expanded and collapsed view

type EnterPlanPrompt added in v1.1.0

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

EnterPlanPrompt manages the enter plan mode confirmation UI

func NewEnterPlanPrompt added in v1.1.0

func NewEnterPlanPrompt() *EnterPlanPrompt

NewEnterPlanPrompt creates a new EnterPlanPrompt

func (*EnterPlanPrompt) GetRequest added in v1.1.0

func (p *EnterPlanPrompt) GetRequest() *tool.EnterPlanRequest

GetRequest returns the current request

func (*EnterPlanPrompt) HandleKeypress added in v1.1.0

func (p *EnterPlanPrompt) HandleKeypress(msg tea.KeyMsg) tea.Cmd

HandleKeypress handles keyboard input

func (*EnterPlanPrompt) Hide added in v1.1.0

func (p *EnterPlanPrompt) Hide()

Hide hides the prompt

func (*EnterPlanPrompt) IsActive added in v1.1.0

func (p *EnterPlanPrompt) IsActive() bool

IsActive returns whether the prompt is visible

func (*EnterPlanPrompt) Render added in v1.1.0

func (p *EnterPlanPrompt) Render() string

Render renders the prompt

func (*EnterPlanPrompt) SetWidth added in v1.1.0

func (p *EnterPlanPrompt) SetWidth(width int)

SetWidth updates the prompt width

func (*EnterPlanPrompt) Show added in v1.1.0

func (p *EnterPlanPrompt) Show(req *tool.EnterPlanRequest, width int)

Show displays the enter plan prompt

type EnterPlanRequestMsg added in v1.1.0

type EnterPlanRequestMsg struct {
	Request *tool.EnterPlanRequest
}

EnterPlanRequestMsg is sent when EnterPlanMode tool is called

type EnterPlanResponseMsg added in v1.1.0

type EnterPlanResponseMsg struct {
	Request  *tool.EnterPlanRequest
	Response *tool.EnterPlanResponse
	Approved bool
}

EnterPlanResponseMsg is sent when user responds

type ModelItem

type ModelItem struct {
	ID           string
	Name         string
	DisplayName  string
	ProviderName string
	AuthMethod   provider.AuthMethod
	IsCurrent    bool
}

ModelItem represents a model in the model selector

type ModelSelectedMsg

type ModelSelectedMsg struct {
	ModelID      string
	ProviderName string
	AuthMethod   provider.AuthMethod
}

ModelSelectedMsg is sent when a model is selected

type PermissionPrompt

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

PermissionPrompt manages the permission request UI with Claude Code style.

func NewPermissionPrompt

func NewPermissionPrompt() *PermissionPrompt

NewPermissionPrompt creates a new PermissionPrompt instance

func (*PermissionPrompt) GetRequest

GetRequest returns the current permission request

func (*PermissionPrompt) HandleKeypress

func (p *PermissionPrompt) HandleKeypress(msg tea.KeyMsg) tea.Cmd

HandleKeypress handles keyboard input for the permission prompt

func (*PermissionPrompt) Hide

func (p *PermissionPrompt) Hide()

Hide hides the permission prompt

func (*PermissionPrompt) IsActive

func (p *PermissionPrompt) IsActive() bool

IsActive returns whether the prompt is visible

func (*PermissionPrompt) Render

func (p *PermissionPrompt) Render() string

Render renders the permission prompt (calls RenderInline)

func (*PermissionPrompt) RenderInline

func (p *PermissionPrompt) RenderInline() string

RenderInline renders the permission prompt inline with Claude Code style

func (*PermissionPrompt) Show

func (p *PermissionPrompt) Show(req *permission.PermissionRequest, width, height int)

Show displays the permission prompt with the given request

type PermissionRequestMsg

type PermissionRequestMsg struct {
	Request  *permission.PermissionRequest
	ToolCall interface{} // The original tool call
}

PermissionRequestMsg is sent when a tool needs permission

type PermissionResponseMsg

type PermissionResponseMsg struct {
	Approved bool
	AllowAll bool // True if user selected "allow all during session"
	Request  *permission.PermissionRequest
}

PermissionResponseMsg is sent when the user responds to a permission request

type PlanPrompt added in v1.1.0

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

PlanPrompt manages the plan approval UI

func NewPlanPrompt added in v1.1.0

func NewPlanPrompt() *PlanPrompt

NewPlanPrompt creates a new PlanPrompt

func (*PlanPrompt) GetRequest added in v1.1.0

func (p *PlanPrompt) GetRequest() *tool.PlanRequest

GetRequest returns the current plan request

func (*PlanPrompt) HandleKeypress added in v1.1.0

func (p *PlanPrompt) HandleKeypress(msg tea.KeyMsg) tea.Cmd

HandleKeypress handles keyboard input for the plan prompt

func (*PlanPrompt) Hide added in v1.1.0

func (p *PlanPrompt) Hide()

Hide hides the plan prompt

func (*PlanPrompt) IsActive added in v1.1.0

func (p *PlanPrompt) IsActive() bool

IsActive returns whether the prompt is visible

func (*PlanPrompt) IsEditing added in v1.1.0

func (p *PlanPrompt) IsEditing() bool

IsEditing returns whether the prompt is in edit mode

func (*PlanPrompt) Render added in v1.1.0

func (p *PlanPrompt) Render() string

Render renders the plan prompt (legacy - full render)

func (*PlanPrompt) RenderContent added in v1.1.0

func (p *PlanPrompt) RenderContent() string

RenderContent renders the plan content for the chat viewport (above separator) This returns the rendered markdown directly (not wrapped in a viewport), allowing the main chat viewport to handle scrolling.

func (*PlanPrompt) RenderMenu added in v1.1.0

func (p *PlanPrompt) RenderMenu() string

RenderMenu renders the menu options for the input area (below separator)

func (*PlanPrompt) SetSize added in v1.1.0

func (p *PlanPrompt) SetSize(width, height int)

SetSize updates the prompt dimensions

func (*PlanPrompt) Show added in v1.1.0

func (p *PlanPrompt) Show(req *tool.PlanRequest, planPath string, width, height int)

Show displays the plan prompt with the given request

type PlanRequestMsg added in v1.1.0

type PlanRequestMsg struct {
	Request *tool.PlanRequest
}

PlanRequestMsg is sent when ExitPlanMode tool is called

type PlanResponseMsg added in v1.1.0

type PlanResponseMsg struct {
	Request      *tool.PlanRequest
	Response     *tool.PlanResponse
	Approved     bool
	ApproveMode  string // "clear-auto" | "auto" | "manual" | "modify"
	ModifiedPlan string // Modified plan if edited
}

PlanResponseMsg is sent when user responds to plan approval

type ProviderConnectResultMsg

type ProviderConnectResultMsg struct {
	AuthIdx   int
	Success   bool
	Message   string
	NewStatus provider.ProviderStatus
}

ProviderConnectResultMsg is sent when inline connection completes

type ProviderItem

type ProviderItem struct {
	Provider    provider.Provider
	DisplayName string
	AuthMethods []AuthMethodItem
}

ProviderItem represents a provider in the first level

type ProviderSelectedMsg

type ProviderSelectedMsg struct {
	Provider   provider.Provider
	AuthMethod provider.AuthMethod
}

ProviderSelectedMsg is sent when a provider is selected

type QuestionPrompt added in v1.1.0

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

QuestionPrompt manages the question prompt UI for AskUserQuestion tool

func NewQuestionPrompt added in v1.1.0

func NewQuestionPrompt() *QuestionPrompt

NewQuestionPrompt creates a new QuestionPrompt

func (*QuestionPrompt) GetRequest added in v1.1.0

func (p *QuestionPrompt) GetRequest() *tool.QuestionRequest

GetRequest returns the current question request

func (*QuestionPrompt) HandleKeypress added in v1.1.0

func (p *QuestionPrompt) HandleKeypress(msg tea.KeyMsg) tea.Cmd

HandleKeypress handles keyboard input for the question prompt

func (*QuestionPrompt) Hide added in v1.1.0

func (p *QuestionPrompt) Hide()

Hide hides the question prompt

func (*QuestionPrompt) IsActive added in v1.1.0

func (p *QuestionPrompt) IsActive() bool

IsActive returns whether the prompt is visible

func (*QuestionPrompt) Render added in v1.1.0

func (p *QuestionPrompt) Render() string

Render renders the question prompt

func (*QuestionPrompt) Show added in v1.1.0

func (p *QuestionPrompt) Show(req *tool.QuestionRequest, width int)

Show displays the question prompt with the given request

type QuestionRequestMsg added in v1.1.0

type QuestionRequestMsg struct {
	Request  *tool.QuestionRequest
	ToolCall interface{} // Original tool call
}

QuestionRequestMsg is sent when AskUserQuestion tool is called

type QuestionResponseMsg added in v1.1.0

type QuestionResponseMsg struct {
	Request   *tool.QuestionRequest
	Response  *tool.QuestionResponse
	Cancelled bool
}

QuestionResponseMsg is sent when user answers or cancels

type SaveLevel added in v1.1.0

type SaveLevel int

SaveLevel represents where to save the tool settings

const (
	SaveLevelProject SaveLevel = iota // Save to .gen/settings.json
	SaveLevelUser                     // Save to ~/.gen/settings.json
)

func (SaveLevel) String added in v1.1.0

func (l SaveLevel) String() string

String returns the display name for the save level

type SearchProviderItem

type SearchProviderItem struct {
	Name        search.ProviderName
	DisplayName string
	Status      string // "current", "available", "unavailable"
	RequiresKey bool
	EnvVars     []string
}

SearchProviderItem represents a search provider in the selector

type SearchProviderSelectedMsg

type SearchProviderSelectedMsg struct {
	Provider search.ProviderName
}

SearchProviderSelectedMsg is sent when a search provider is selected

type SelectionLevel

type SelectionLevel int

SelectionLevel represents the current selection level

const (
	LevelProvider SelectionLevel = iota
	LevelAuthMethod
)

type SelectorCancelledMsg

type SelectorCancelledMsg struct{}

SelectorCancelledMsg is sent when the selector is cancelled

type SelectorState

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

SelectorState holds the state for the interactive selector

func NewSelectorState

func NewSelectorState() SelectorState

NewSelectorState creates a new SelectorState

func (*SelectorState) Cancel

func (s *SelectorState) Cancel()

Cancel cancels the selector

func (*SelectorState) ConnectProvider

func (s *SelectorState) ConnectProvider(ctx context.Context, p provider.Provider, authMethod provider.AuthMethod) (string, error)

ConnectProvider connects to the selected provider and verifies the connection

func (*SelectorState) EnterModelSelect

func (s *SelectorState) EnterModelSelect(ctx context.Context, width, height int) error

EnterModelSelect enters model selection mode

func (*SelectorState) EnterProviderSelect

func (s *SelectorState) EnterProviderSelect(width, height int) error

EnterProviderSelect enters provider selection mode

func (*SelectorState) GoBack

func (s *SelectorState) GoBack() bool

GoBack goes back to the previous level

func (*SelectorState) HandleConnectResult

func (s *SelectorState) HandleConnectResult(msg ProviderConnectResultMsg)

HandleConnectResult updates the selector state with connection result

func (*SelectorState) HandleKeypress

func (s *SelectorState) HandleKeypress(key tea.KeyMsg) tea.Cmd

HandleKeypress handles a keypress and returns a command if selection is made

func (*SelectorState) IsActive

func (s *SelectorState) IsActive() bool

IsActive returns whether the selector is active

func (*SelectorState) MoveDown

func (s *SelectorState) MoveDown()

MoveDown moves the selection down

func (*SelectorState) MoveUp

func (s *SelectorState) MoveUp()

MoveUp moves the selection up

func (*SelectorState) Render

func (s *SelectorState) Render() string

Render renders the selector

func (*SelectorState) Select

func (s *SelectorState) Select() tea.Cmd

Select handles selection and returns a command

func (*SelectorState) SetModel

func (s *SelectorState) SetModel(modelID string, providerName string, authMethod provider.AuthMethod) (string, error)

SetModel sets the current model

type SelectorTab

type SelectorTab int

SelectorTab represents which tab is active in the provider selector

const (
	TabLLM SelectorTab = iota
	TabSearch
)

type SelectorType

type SelectorType int

SelectorType represents what kind of selection we're doing

const (
	SelectorTypeProvider SelectorType = iota
	SelectorTypeModel
)

type SkillCycleMsg added in v1.1.0

type SkillCycleMsg struct {
	SkillName string
	NewState  skill.SkillState
}

SkillCycleMsg is sent when a skill's state is cycled.

type SkillInvokeMsg added in v1.1.0

type SkillInvokeMsg struct {
	SkillName string
}

SkillInvokeMsg is sent when a skill is invoked from the selector.

type SkillItem added in v1.1.0

type SkillItem struct {
	Name        string // Base name
	Namespace   string // Optional namespace
	Description string
	Hint        string // argument-hint
	State       skill.SkillState
	Scope       skill.SkillScope
}

SkillItem represents a skill in the selector.

func (*SkillItem) FullName added in v1.1.0

func (s *SkillItem) FullName() string

FullName returns the namespaced skill name (namespace:name or just name).

type SkillSaveLevel added in v1.1.0

type SkillSaveLevel int

SkillSaveLevel represents where to save skill settings.

const (
	SkillSaveLevelProject SkillSaveLevel = iota // Save to .gen/skills.json
	SkillSaveLevelUser                          // Save to ~/.gen/skills.json
)

func (SkillSaveLevel) String added in v1.1.0

func (l SkillSaveLevel) String() string

String returns the display name for the save level.

type SkillSelectorCancelledMsg added in v1.1.0

type SkillSelectorCancelledMsg struct{}

SkillSelectorCancelledMsg is sent when the skill selector is cancelled.

type SkillSelectorState added in v1.1.0

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

SkillSelectorState holds state for the skill selector.

func NewSkillSelectorState added in v1.1.0

func NewSkillSelectorState() SkillSelectorState

NewSkillSelectorState creates a new SkillSelectorState.

func (*SkillSelectorState) Cancel added in v1.1.0

func (s *SkillSelectorState) Cancel()

Cancel cancels the selector.

func (*SkillSelectorState) CycleState added in v1.1.0

func (s *SkillSelectorState) CycleState() tea.Cmd

CycleState cycles the state of the currently selected skill.

func (*SkillSelectorState) EnterSkillSelect added in v1.1.0

func (s *SkillSelectorState) EnterSkillSelect(width, height int) error

EnterSkillSelect enters skill selection mode.

func (*SkillSelectorState) HandleKeypress added in v1.1.0

func (s *SkillSelectorState) HandleKeypress(key tea.KeyMsg) tea.Cmd

HandleKeypress handles a keypress and returns a command if needed.

func (*SkillSelectorState) IsActive added in v1.1.0

func (s *SkillSelectorState) IsActive() bool

IsActive returns whether the selector is active.

func (*SkillSelectorState) MoveDown added in v1.1.0

func (s *SkillSelectorState) MoveDown()

MoveDown moves the selection down.

func (*SkillSelectorState) MoveUp added in v1.1.0

func (s *SkillSelectorState) MoveUp()

MoveUp moves the selection up.

func (*SkillSelectorState) Render added in v1.1.0

func (s *SkillSelectorState) Render() string

Render renders the skill selector.

type SuggestionState

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

SuggestionState holds the state for command suggestions

func NewSuggestionState

func NewSuggestionState() SuggestionState

NewSuggestionState creates a new SuggestionState

func (*SuggestionState) GetSelected

func (s *SuggestionState) GetSelected() string

GetSelected returns the currently selected command name, or empty string if none

func (*SuggestionState) Hide

func (s *SuggestionState) Hide()

Hide hides the suggestions

func (*SuggestionState) IsVisible

func (s *SuggestionState) IsVisible() bool

IsVisible returns whether suggestions are visible

func (*SuggestionState) MoveDown

func (s *SuggestionState) MoveDown()

MoveDown moves the selection down

func (*SuggestionState) MoveUp

func (s *SuggestionState) MoveUp()

MoveUp moves the selection up

func (*SuggestionState) Render

func (s *SuggestionState) Render(width int) string

Render renders the suggestions box

func (*SuggestionState) Reset

func (s *SuggestionState) Reset()

Reset resets the suggestion state

func (*SuggestionState) UpdateSuggestions

func (s *SuggestionState) UpdateSuggestions(input string)

UpdateSuggestions updates suggestions based on input

type Theme added in v1.1.0

type Theme struct {
	// Base colors
	Muted     lipgloss.Color // muted text, placeholders
	Accent    lipgloss.Color // spinner, highlights
	Primary   lipgloss.Color // user prompt, links
	AI        lipgloss.Color // AI responses
	Separator lipgloss.Color // separator lines

	// Text colors
	Text         lipgloss.Color // normal text
	TextDim      lipgloss.Color // dimmed text
	TextBright   lipgloss.Color // bright/highlighted text
	TextDisabled lipgloss.Color // disabled/strikethrough text

	// Semantic colors
	Success lipgloss.Color // green - added, completed
	Error   lipgloss.Color // red - removed, errors
	Warning lipgloss.Color // amber/orange - in progress

	// UI element colors
	Border     lipgloss.Color // borders
	Background lipgloss.Color // backgrounds for badges/boxes
}

Theme holds all color definitions for the UI

var CurrentTheme Theme

CurrentTheme holds the active theme based on terminal background

type ToolItem added in v1.1.0

type ToolItem struct {
	Name        string
	Description string
	Enabled     bool
}

ToolItem represents a tool in the selector

type ToolSelectorCancelledMsg added in v1.1.0

type ToolSelectorCancelledMsg struct{}

ToolSelectorCancelledMsg is sent when the tool selector is cancelled

type ToolSelectorState added in v1.1.0

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

ToolSelectorState holds state for the tool selector

func NewToolSelectorState added in v1.1.0

func NewToolSelectorState() ToolSelectorState

NewToolSelectorState creates a new ToolSelectorState

func (*ToolSelectorState) Cancel added in v1.1.0

func (s *ToolSelectorState) Cancel()

Cancel cancels the selector

func (*ToolSelectorState) EnterToolSelect added in v1.1.0

func (s *ToolSelectorState) EnterToolSelect(width, height int, disabledTools map[string]bool) error

EnterToolSelect enters tool selection mode

func (*ToolSelectorState) HandleKeypress added in v1.1.0

func (s *ToolSelectorState) HandleKeypress(key tea.KeyMsg) tea.Cmd

HandleKeypress handles a keypress and returns a command if needed

func (*ToolSelectorState) IsActive added in v1.1.0

func (s *ToolSelectorState) IsActive() bool

IsActive returns whether the selector is active

func (*ToolSelectorState) MoveDown added in v1.1.0

func (s *ToolSelectorState) MoveDown()

MoveDown moves the selection down

func (*ToolSelectorState) MoveUp added in v1.1.0

func (s *ToolSelectorState) MoveUp()

MoveUp moves the selection up

func (*ToolSelectorState) Render added in v1.1.0

func (s *ToolSelectorState) Render() string

Render renders the tool selector

func (*ToolSelectorState) Toggle added in v1.1.0

func (s *ToolSelectorState) Toggle() tea.Cmd

Toggle toggles the enabled state of the currently selected tool

type ToolToggleMsg added in v1.1.0

type ToolToggleMsg struct {
	ToolName string
	Enabled  bool
}

ToolToggleMsg is sent when a tool's enabled state is toggled

Jump to

Keyboard shortcuts

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