commands

package
v0.1.50 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CommandsHelp

func CommandsHelp() string

func ExpandUniqueSlashPrefix

func ExpandUniqueSlashPrefix(line, help string, localCommands ...string) string

func IsOpenCommandLine

func IsOpenCommandLine(line string) bool

func LooksLikeSlashCommand

func LooksLikeSlashCommand(line string) bool

func ParseSlashCommands

func ParseSlashCommands(help string) []string

func SlashCommandNames

func SlashCommandNames(localCommands ...string) []string

Types

type SlashCommandOption

type SlashCommandOption struct {
	Token       string
	Description string
	InsertText  string
	AutoRun     bool
}

type SlashCommandSpec

type SlashCommandSpec struct {
	Name         string
	Description  string
	ArgumentHint string
	AutoRun      bool
	Options      []SlashCommandOption
}

func DefaultSlashCommands

func DefaultSlashCommands() []SlashCommandSpec

type SubmitClass

type SubmitClass int
const (
	SubmitText SubmitClass = iota
	SubmitLocalReadOnly
	SubmitLocalUI
	SubmitLocalMode
	SubmitLocalMutating
	SubmitExit
	SubmitTurnStarting
	SubmitUsageError
)

type SubmitClassification

type SubmitClassification struct {
	Line  string
	Class SubmitClass
}

func ClassifySubmit

func ClassifySubmit(line, help string, localCommands ...string) SubmitClassification

func (SubmitClassification) BusyImmediate

func (c SubmitClassification) BusyImmediate() bool

func (SubmitClassification) LocalNoTurn

func (c SubmitClassification) LocalNoTurn() bool

func (SubmitClassification) SubmitBarrier

func (c SubmitClassification) SubmitBarrier() bool

Jump to

Keyboard shortcuts

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