Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Expand ¶
func Expand(ctx context.Context, tmpl string, args []string, runner ShellRunner, readFile func(string) (string, error)) (string, error)
Expand interpolates a command template with the given arguments. Order: $N → $ARGUMENTS → append args if no placeholders → !`cmd` → @file.
Types ¶
type Command ¶
type Command struct {
Name string // derived from relative path (filled by Load)
Description string // frontmatter "description"
Agent string // frontmatter "agent" (active)
Model string // frontmatter "model" (active)
Subtask bool // frontmatter "subtask" (active)
Template string // body after frontmatter (trimmed)
Path string // absolute path (filled by Load)
}
Command represents a user-defined slash command loaded from a .md file.
func ParseCommand ¶
ParseCommand parses a .md file into a Command. If the content starts with "---\n", the block between the first and second "---" is parsed as frontmatter; otherwise the entire content becomes Template.
Click to show internal directories.
Click to hide internal directories.