commands

package
v1.18.8 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseSlashCommand

func ParseSlashCommand(input string) tea.Cmd

ParseSlashCommand checks if the input matches a known slash command and returns the tea.Cmd to execute it. Returns nil if not a slash command or not recognized. This function only handles built-in session commands, not agent commands or MCP prompts.

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
}

Item represents a single command in the palette

Jump to

Keyboard shortcuts

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