autocomplete

package
v0.99.2 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AutocompleteImpl

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

AutocompleteImpl implements inline autocomplete functionality

func NewAutocomplete

func NewAutocomplete(theme ui.Theme, shortcutRegistry ShortcutRegistry) *AutocompleteImpl

NewAutocomplete creates a new autocomplete component

func (*AutocompleteImpl) ClearUsageHint added in v0.90.0

func (a *AutocompleteImpl) ClearUsageHint()

ClearUsageHint clears the current usage hint

func (*AutocompleteImpl) GetSelectedShortcut

func (a *AutocompleteImpl) GetSelectedShortcut() string

GetSelectedShortcut returns the currently selected shortcut

func (*AutocompleteImpl) GetUsageHint added in v0.90.0

func (a *AutocompleteImpl) GetUsageHint() string

GetUsageHint returns the current usage hint for ghost text display

func (*AutocompleteImpl) HandleKey

func (a *AutocompleteImpl) HandleKey(key tea.KeyMsg) (bool, string)

HandleKey processes key input for autocomplete navigation

func (*AutocompleteImpl) Hide

func (a *AutocompleteImpl) Hide()

Hide hides the autocomplete

func (*AutocompleteImpl) IsVisible

func (a *AutocompleteImpl) IsVisible() bool

IsVisible returns whether autocomplete is currently visible

func (*AutocompleteImpl) RefreshToolsList added in v0.79.0

func (a *AutocompleteImpl) RefreshToolsList()

RefreshToolsList forces a reload of the tools list This should be called when MCP servers connect or disconnect

func (*AutocompleteImpl) Render

func (a *AutocompleteImpl) Render() string

Render returns the autocomplete suggestions as a string

func (*AutocompleteImpl) SetHeight added in v0.76.5

func (a *AutocompleteImpl) SetHeight(height int)

SetHeight sets the height for rendering

func (*AutocompleteImpl) SetModelService added in v0.89.0

func (a *AutocompleteImpl) SetModelService(modelService domain.ModelService)

SetModelService sets the model service for model autocomplete

func (*AutocompleteImpl) SetPricingService added in v0.89.0

func (a *AutocompleteImpl) SetPricingService(pricingService domain.PricingService)

SetPricingService sets the pricing service for model pricing display

func (*AutocompleteImpl) SetStateManager added in v0.76.2

func (a *AutocompleteImpl) SetStateManager(stateManager domain.StateManager)

SetStateManager sets the state manager for agent mode filtering

func (*AutocompleteImpl) SetToolService

func (a *AutocompleteImpl) SetToolService(toolService domain.ToolService)

SetToolService sets the tool service for tool autocomplete

func (*AutocompleteImpl) SetWidth

func (a *AutocompleteImpl) SetWidth(width int)

SetWidth sets the width for rendering

func (*AutocompleteImpl) ShouldExecuteImmediately added in v0.89.0

func (a *AutocompleteImpl) ShouldExecuteImmediately() bool

ShouldExecuteImmediately returns whether the last selected shortcut should execute immediately

func (*AutocompleteImpl) Update

func (a *AutocompleteImpl) Update(inputText string, cursorPos int)

Update handles autocomplete logic

type ShortcutOption

type ShortcutOption struct {
	Shortcut    string
	Description string
	Usage       string
}

ShortcutOption represents a shortcut option for autocomplete

type ShortcutRegistry

type ShortcutRegistry interface {
	GetAll() []shortcuts.Shortcut
}

ShortcutRegistry interface for dependency injection

type SubcommandProvider added in v0.90.0

type SubcommandProvider interface {
	GetSubcommands() []shortcuts.Subcommand
}

SubcommandProvider is an interface for shortcuts that provide subcommands

Jump to

Keyboard shortcuts

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