Help us shape the future of Go! Take the 2026 Go Developer Survey

commands

package
v0.30.41 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommandErrorMsg

type CommandErrorMsg struct {
	Op  string
	Err error
}

CommandErrorMsg is returned when an async slash command operation fails.

type Result

type Result struct {
	Lines                []string
	NavigateToOnboarding bool
	Quit                 bool
	ClearChat            bool
	TriggerCompact       bool    // ask the caller to compress the current session's context
	TriggerReview        bool    // ask the caller to invoke the code-reviewer agent
	ReviewDiff           string  // git diff content to pass to the reviewer
	OpenSessionTree      bool    // ask the caller to open the session tree browser
	Cmd                  tea.Cmd // optional async cmd to batch after command processing
}

Result holds the output of a parsed slash command.

func Parse

func Parse(input string, c *client.Client, sessionID ...string) *Result

Parse checks if input is a slash command and executes it. Returns nil if input is not a command.

Jump to

Keyboard shortcuts

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