Documentation
¶
Overview ¶
Package slash resolves a submitted TUI input line into an action: send text to the agent, eagerly load a skill, or report an error. It also expands a command's prompt template.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Action ¶
type Action struct {
Kind Kind
Text string // for KindSend: the message to send
Skill string // for KindLoadSkill: the skill name
Err string // for KindError
// Loop actions:
Interval time.Duration // KindLoopStart: 0 = self-paced
Payload string // KindLoopStart: the prompt/slash-command to repeat
LoopID string // KindLoopStop: empty = stop all
// Attachment actions:
Files []string // KindSend: resolved @path attachments
AttachOp AttachOp // KindAttach: which op
AttachPath string // KindAttach+AttachStage: file to stage
Transcribe bool // KindAttach+AttachStage: --transcribe/-t override
}
Action is the resolved result of a submitted input line.
func Resolve ¶
func Resolve(input string, cmds []types.CommandConfig, skills []types.Skill, agents []types.AgentTypeConfig) Action
Resolve maps an input line to an Action. Non-slash input is sent verbatim.
type Kind ¶
type Kind int
Kind enumerates the resolved action types.
const ( KindSend Kind = iota // send Text to the agent KindLoadSkill // eagerly load Skill into the session prompt KindError // report Err to the user, send nothing KindCompact // compact the current conversation KindLoopStart // start a recurring/self-paced loop KindLoopStop // stop one loop (LoopID) or all (empty) KindLoopList // list active loops KindGoalSet // set/replace the session goal (Text) KindGoalShow // show the current goal KindGoalClear // clear the current goal KindAttach // stage/list/clear file attachments )
Click to show internal directories.
Click to hide internal directories.