Documentation
¶
Overview ¶
Package command loads custom slash commands from Markdown files. A command is a prompt template: invoking /name substitutes the arguments into the body and sends the result as a chat turn. Loading is pure and dependency-free — a small "key: value" frontmatter parser keeps OK's single-(TOML)-dependency promise rather than pulling in a YAML library.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Command ¶
type Command struct {
Name string // "review" or "git:commit", derived from the file path
Description string // from frontmatter
ArgHint string // from frontmatter (argument-hint)
Body string // template with $ARGUMENTS / $1..$N / $$
Source string // originating file path, for diagnostics
}
Command is a custom slash command loaded from a .md file.
func Load ¶
Load reads every *.md command file under each dir, in order, so a later dir overrides an earlier one on a name clash (pass the user dir first, project dir last). Missing dirs are skipped. Individual file failures are collected into the returned error but don't prevent the others from loading. The result is sorted by name.