commands

package
v1.73.0 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Category

type Category struct {
	Name     string
	Commands []Item
}

Category represents a category of commands

func BuildCommandCategories

func BuildCommandCategories(ctx context.Context, application *app.App) []Category

BuildCommandCategories builds the list of command categories for the command palette

type ExecuteFunc

type ExecuteFunc func(arg string) tea.Cmd

ExecuteFunc is a function that executes a command with an optional argument.

type Item

type Item struct {
	ID           string
	Label        string
	Description  string
	Category     string
	SlashCommand string
	Execute      ExecuteFunc
	Hidden       bool // Hidden commands work as slash commands but don't appear in the palette
	// Immediate marks commands that should run as soon as they are submitted
	// instead of being treated as ordinary queued chat input.
	Immediate bool
}

Item represents a single command in the palette

type Parser added in v1.44.0

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

func NewParser added in v1.44.0

func NewParser(categories ...Category) *Parser

func (*Parser) Parse added in v1.44.0

func (p *Parser) Parse(input string) tea.Cmd

Jump to

Keyboard shortcuts

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