commands

package
v0.411.0 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package commands provides a shared registry of slash commands used across ACP, TUI, and WebUI interfaces.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parse

func Parse(input string) (name string, args string, ok bool)

Parse checks if input is a slash command. Returns the command name, arguments, and whether parsing succeeded.

Types

type SlashCommand

type SlashCommand struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	AcceptsArgs bool   `json:"acceptsArgs"`
}

SlashCommand represents a slash command available to users.

func AllCommands

func AllCommands(dataDir string) []SlashCommand

AllCommands returns built-in commands plus custom commands discovered from the filesystem (user and project command directories).

func BuiltinCommands

func BuiltinCommands() []SlashCommand

BuiltinCommands returns the built-in slash commands shared across all interfaces.

func Match

func Match(query string, cmds []SlashCommand) []SlashCommand

Match filters commands by prefix match on name (case-insensitive).

Jump to

Keyboard shortcuts

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