slashcmd

package
v0.17.5 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2026 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Catalog

type Catalog struct {
	Commands  []Command `json:"commands"`
	Truncated bool      `json:"truncated"`
}

func CatalogFor

func CatalogFor(agent, cwd, home string) Catalog

func CatalogForProfile

func CatalogForProfile(
	profileID, reportedAgent, cwd, home string,
	skillDirs []string,
	commandFormat, agentVersion string,
) Catalog

type Command

type Command struct {
	Command      string `json:"command"`
	Description  string `json:"description"`
	Source       string `json:"source"`
	ArgumentHint string `json:"argument_hint,omitempty"`
}

type CopyProfile added in v0.13.7

type CopyProfile struct {
	PreSubmission       *regexp.Regexp
	PostSubmission      *regexp.Regexp
	Confirmation        *regexp.Regexp
	Composer            *regexp.Regexp
	ComposerPlaceholder *regexp.Regexp
	ComposerOptional    bool
	IdleLayout          *regexp.Regexp
	SecondaryPath       string
}

func CopyProfileFor added in v0.13.7

func CopyProfileFor(profileID, agent string) (CopyProfile, bool)

func (CopyProfile) CleanSnapshot added in v0.13.7

func (p CopyProfile) CleanSnapshot(content string) string

func (CopyProfile) ComposerReady added in v0.13.7

func (p CopyProfile) ComposerReady(content string) bool

func (CopyProfile) ComposerText added in v0.13.7

func (p CopyProfile) ComposerText(content string) (string, bool)

func (CopyProfile) ConfirmationCounts added in v0.13.7

func (p CopyProfile) ConfirmationCounts(content string) (chars, lines int, ok bool)

func (CopyProfile) MenuOpen added in v0.13.7

func (p CopyProfile) MenuOpen(content string) bool

func (CopyProfile) PickerOpen added in v0.13.7

func (p CopyProfile) PickerOpen(content string) bool

type DiscoverContext

type DiscoverContext struct {
	Cwd           string
	Home          string
	SkillDirs     []string
	CommandFormat string
	AgentVersion  string
}

type Provider

type Provider interface {
	ID() string
	Discover(ctx DiscoverContext) ([]Command, bool)
}

Jump to

Keyboard shortcuts

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