Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CloneThroughJSON ¶
func CloneThroughJSON(oldConfig, newConfig any)
Types ¶
type Command ¶ added in v1.8.2
type Command struct {
// Description is shown in completion dialogs and help text.
// For simple format commands, this is empty and the instruction is used for display.
Description string `json:"description,omitempty"`
// Instruction is the prompt sent to the agent.
// Supports:
// - Bang commands: !`command` (executed and output inserted)
// - Positional arguments: $1, $2, etc.
Instruction string `json:"instruction,omitempty"`
}
Command represents an agent command with optional metadata. It supports two YAML formats:
Simple format (string value):
fix-lint: "Fix the lint issues"
Advanced format (object value):
fix-lint:
description: "Fix linting errors in the codebase"
instruction: |
Fix the lint issues reported by: !`golangci-lint run`
Focus on files: $1
func (Command) DisplayText ¶ added in v1.8.2
DisplayText returns the text to show in completion dialogs. Returns Description if available, otherwise truncates the Instruction.
type Commands ¶ added in v1.6.6
Commands represents a set of named prompts for quick-starting conversations. It supports multiple YAML formats:
Map of simple strings:
commands: df: "check disk space" ls: "list files"
List of singleton maps (simple strings):
commands: - df: "check disk space" - ls: "list files"
Map of advanced objects:
commands:
fix-lint:
description: "Fix linting errors"
instruction: "Fix the lint issues"
Mixed format (simple and advanced):
commands:
simple: "A simple command"
advanced:
description: "An advanced command"
instruction: "Do something complex"
type StringOrList ¶
type StringOrList []string
func (*StringOrList) UnmarshalYAML ¶
func (sm *StringOrList) UnmarshalYAML(unmarshal func(any) error) error
Click to show internal directories.
Click to hide internal directories.