commands

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2026 License: MIT Imports: 37 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CommitStatusSuccess = "success"
	CommitStatusError   = "error"
	CommitStatusDryRun  = "dry-run"
)

Commit status constants

Variables

This section is empty.

Functions

func ExecuteShellCommandDirectly

func ExecuteShellCommandDirectly(command string) (string, error)

ExecuteShellCommandDirectly executes a shell command directly and returns the result. NOTE: This function includes security checks for git commands. For unprivileged execution, callers should use tools.ExecuteShellCommand directly (but this is generally not recommended for agent-initiated commands).

func ExtractGitSubcommand

func ExtractGitSubcommand(command string) string

ExtractGitSubcommand extracts the first git subcommand from a command string for display purposes.

func IsGitCheckoutSubcommand

func IsGitCheckoutSubcommand(command string) bool

IsGitCheckoutSubcommand checks if a git command is a checkout or switch operation. These operations are blocked from direct execution to require explicit user approval. This function checks ALL git commands in a compound shell command (e.g., "cd x && git checkout").

func IsGitDiscardCommand

func IsGitDiscardCommand(command string) bool

IsGitDiscardCommand checks if a git command could discard changes (restore, reset --hard, checkout -- <file>). These are always blocked from direct execution regardless of orchestrator permissions. This function checks ALL git commands in a compound shell command (e.g., "cd x && git reset").

func IsShellCommand

func IsShellCommand(prompt string) bool

IsShellCommand checks if a prompt starts with common shell tools

func SelectAndExecuteCommand

func SelectAndExecuteCommand(registry *CommandRegistry, chatAgent *agent.Agent) error

SelectAndExecuteCommand shows command selector and executes the selected command

func SetGitDir

func SetGitDir(dir string)

SetGitDir sets the working directory for subsequent gitCommand calls.

func ShowCommandSelector

func ShowCommandSelector(registry *CommandRegistry, chatAgent *agent.Agent) (string, error)

ShowCommandSelector displays a dropdown for slash command selection

func WriteJSONToOutput

func WriteJSONToOutput(value interface{}) error

WriteJSONToOutput writes a JSON representation of value to stdout

func WriteToOutput

func WriteToOutput(output string)

WriteToOutput writes a string to os.Stdout

Types

type AgentPrompter

type AgentPrompter struct {
	// contains filtered or unexported fields
}

AgentPrompter uses the agent's stdin for reading responses.

func NewAgentPrompter

func NewAgentPrompter(a *agent.Agent) *AgentPrompter

NewAgentPrompter creates an AgentPrompter for the given agent.

func (*AgentPrompter) Prompt

func (p *AgentPrompter) Prompt(prompt string) (string, error)

type ChangesCommand

type ChangesCommand struct{}

ChangesCommand shows tracked file changes in the current session

func (*ChangesCommand) Description

func (c *ChangesCommand) Description() string

Description returns the command description

func (*ChangesCommand) Execute

func (c *ChangesCommand) Execute(args []string, chatAgent *agent.Agent) error

Execute shows the tracked changes for this session

func (*ChangesCommand) Name

func (c *ChangesCommand) Name() string

Name returns the command name

type ClearCommand

type ClearCommand struct{}

ClearCommand handles clearing of conversation history

func (*ClearCommand) Description

func (c *ClearCommand) Description() string

func (*ClearCommand) Execute

func (c *ClearCommand) Execute(args []string, chatAgent *agent.Agent) error

func (*ClearCommand) Name

func (c *ClearCommand) Name() string

type Command

type Command interface {
	Name() string
	Description() string
	Execute(args []string, chatAgent *agent.Agent) error
}

Command represents a slash command

type CommandContext

type CommandContext struct {
	OutputFormat OutputFormat
}

CommandContext provides context for command execution

type CommandItem

type CommandItem struct {
	Name        string
	Description string
	Aliases     []string
}

CommandItem adapts a slash command for dropdown display

func (*CommandItem) Display

func (c *CommandItem) Display() string

func (*CommandItem) SearchText

func (c *CommandItem) SearchText() string

func (*CommandItem) Value

func (c *CommandItem) Value() interface{}

type CommandRegistry

type CommandRegistry struct {
	// contains filtered or unexported fields
}

CommandRegistry manages all available slash commands

func NewCommandRegistry

func NewCommandRegistry() *CommandRegistry

NewCommandRegistry creates a new command registry

func (*CommandRegistry) AliasesOf

func (r *CommandRegistry) AliasesOf(canonical string) []string

AliasesOf returns the set of aliases that resolve to the given canonical command name. Used by /help <name> to show alternate spellings.

func (*CommandRegistry) CompletionCandidates

func (r *CommandRegistry) CompletionCandidates() []string

CompletionCandidates returns all valid slash-command names (canonical plus aliases) sorted alphabetically. Used by the tab-completion CompletionProvider in the input reader.

func (*CommandRegistry) Execute

func (r *CommandRegistry) Execute(input string, chatAgent *agent.Agent) error

Execute processes a slash command input Supports both / and ! prefixes (e.g. /exec ls or !exec ls)

func (*CommandRegistry) GetCommand

func (r *CommandRegistry) GetCommand(name string) (Command, bool)

GetCommand returns a command by name. If name matches an alias, the canonical command is returned (SP-048-2d).

func (*CommandRegistry) IsSlashCommand

func (r *CommandRegistry) IsSlashCommand(input string) bool

IsSlashCommand checks if input starts with a slash or bang

func (*CommandRegistry) ListCommands

func (r *CommandRegistry) ListCommands() []Command

ListCommands returns all available commands

func (*CommandRegistry) Register

func (r *CommandRegistry) Register(cmd Command)

Register adds a command to the registry

func (*CommandRegistry) RegisterAlias

func (r *CommandRegistry) RegisterAlias(short, canonical string)

RegisterAlias maps a short name to a canonical command name. Looking up the alias via GetCommand or Execute resolves transparently. Aliases also participate in tab completion and "did you mean" suggestions.

func (*CommandRegistry) SuggestCommands

func (r *CommandRegistry) SuggestCommands(name string, maxSuggestions int) []string

SuggestCommands returns up to maxSuggestions command names that are plausible corrections for a mistyped command. Matches are ranked by Levenshtein distance against the lowercased canonical name; commands whose lowercased name has the input as a prefix are pulled to the front (distance 0). Returns nil for empty input or when no candidate is reasonably close.

type CommitAction

type CommitAction struct {
	ID          string
	DisplayName string
	Description string
	Action      func(*CommitFlow) error
}

CommitAction represents different commit actions

type CommitActionItem

type CommitActionItem struct {
	ID          string
	DisplayName string
	Description string
}

CommitActionItem adapts CommitAction for dropdown display

func (*CommitActionItem) Display

func (c *CommitActionItem) Display() string

func (*CommitActionItem) SearchText

func (c *CommitActionItem) SearchText() string

func (*CommitActionItem) Value

func (c *CommitActionItem) Value() interface{}

type CommitCommand

type CommitCommand struct {
	// contains filtered or unexported fields
}

CommitCommand implements the /commit slash command

func (*CommitCommand) Description

func (c *CommitCommand) Description() string

Description returns the command description

func (*CommitCommand) Execute

func (c *CommitCommand) Execute(args []string, chatAgent *agent.Agent) error

Execute runs the commit command

func (*CommitCommand) ExecuteWithJSONOutput

func (c *CommitCommand) ExecuteWithJSONOutput(args []string, chatAgent *agent.Agent, ctx *CommandContext) error

ExecuteWithJSONOutput runs the commit command with JSON output

func (*CommitCommand) Name

func (c *CommitCommand) Name() string

Name returns the command name

func (*CommitCommand) SetAgentError

func (c *CommitCommand) SetAgentError(err error)

SetAgentError sets the agent creation error for better error reporting

type CommitFlow

type CommitFlow struct {
	// contains filtered or unexported fields
}

CommitFlow manages the interactive commit workflow

func NewCommitFlow

func NewCommitFlow(chatAgent *agent.Agent) *CommitFlow

NewCommitFlow creates a new commit flow

func NewCommitFlowWithFlags

func NewCommitFlowWithFlags(chatAgent *agent.Agent, skipPrompt, dryRun, allowSecrets bool) *CommitFlow

NewCommitFlowWithFlags creates a new commit flow with CLI flags

func (*CommitFlow) CommitStagedWithMessage

func (cf *CommitFlow) CommitStagedWithMessage() error

CommitStagedWithMessage commits staged files with an optional message or auto-generated message This method is designed for non-interactive use by the commit tool

func (*CommitFlow) Execute

func (cf *CommitFlow) Execute() error

Execute runs a simplified commit flow: 1) If there are staged changes, use them and generate a commit message 2) If there are no staged changes, prompt user to select files, then generate the commit message

func (*CommitFlow) SetUserInstructions

func (cf *CommitFlow) SetUserInstructions(instructions string)

SetUserInstructions sets the user instructions for commit message generation

type CommitJSONResult

type CommitJSONResult struct {
	Status  string `json:"status"`            // success, error, dry-run
	Commit  string `json:"commit,omitempty"`  // commit hash if successful
	Message string `json:"message,omitempty"` // commit message
	Branch  string `json:"branch,omitempty"`  // branch name
	Error   string `json:"error,omitempty"`   // error message
	Review  string `json:"review,omitempty"`  // commit review (critical concerns)
}

CommitJSONResult is the JSON output structure for commit command

func (*CommitJSONResult) Validate

func (r *CommitJSONResult) Validate() error

Validate checks that required fields are populated

type CommitMessageHandler

type CommitMessageHandler struct {
	// contains filtered or unexported fields
}

CommitMessageHandler handles commit message generation, editing, and retry logic

func NewCommitMessageHandler

func NewCommitMessageHandler(chatAgent *agent.Agent, reader *bufio.Reader) *CommitMessageHandler

NewCommitMessageHandler creates a new commit message handler

func (*CommitMessageHandler) CreateCommit

func (h *CommitMessageHandler) CreateCommit(commitMessage string) error

CreateCommit creates the git commit with the given message

func (*CommitMessageHandler) EditCommitMessage

func (h *CommitMessageHandler) EditCommitMessage(commitMessage string) (string, error)

EditCommitMessage opens the default editor to edit the commit message

func (*CommitMessageHandler) GenerateCommitMessage

func (h *CommitMessageHandler) GenerateCommitMessage(diffOutput []byte, isSingleFile bool, filename string) (string, error)

GenerateCommitMessage generates a commit message from staged diff

func (*CommitMessageHandler) HandleCommitConfirmation

func (h *CommitMessageHandler) HandleCommitConfirmation(commitMessage string, filename string) (string, bool, error)

HandleCommitConfirmation handles the commit message preview, editing, and confirmation

type CompactCommand

type CompactCommand struct{}

CompactCommand implements the /compact slash command

func (*CompactCommand) Description

func (c *CompactCommand) Description() string

Description returns the command description

func (*CompactCommand) Execute

func (c *CompactCommand) Execute(args []string, chatAgent *agent.Agent) error

Execute runs the compact command

func (*CompactCommand) Name

func (c *CompactCommand) Name() string

Name returns the command name

type EditCommand

type EditCommand struct{}

EditCommand opens $EDITOR to compose or edit a query.

func (*EditCommand) Description

func (c *EditCommand) Description() string

func (*EditCommand) Execute

func (c *EditCommand) Execute(args []string, chatAgent *agent.Agent) error

func (*EditCommand) Name

func (c *EditCommand) Name() string

type ExecCommand

type ExecCommand struct{}

ExecCommand handles the /exec slash command Usage: /exec <shell-command-to-execute> Alias: !<shell-command-to-execute> (matches other tools like Jupyter, R, etc.)

func (*ExecCommand) Description

func (c *ExecCommand) Description() string

func (*ExecCommand) Execute

func (c *ExecCommand) Execute(args []string, chatAgent *agent.Agent) error

func (*ExecCommand) Name

func (c *ExecCommand) Name() string

type ExitCommand

type ExitCommand struct{}

ExitCommand implements the /exit slash command

func (*ExitCommand) Description

func (e *ExitCommand) Description() string

Description returns the command description

func (*ExitCommand) Execute

func (e *ExitCommand) Execute(args []string, chatAgent *agent.Agent) error

Execute runs the exit command

func (*ExitCommand) Name

func (e *ExitCommand) Name() string

Name returns the command name

type ExtendCommand

type ExtendCommand struct {
	// contains filtered or unexported fields
}

ExtendCommand guides the user through creating a custom agent role via a 7-question interactive flow.

func (*ExtendCommand) Description

func (c *ExtendCommand) Description() string

Description returns the command description.

func (*ExtendCommand) Execute

func (c *ExtendCommand) Execute(args []string, chatAgent *agent.Agent) error

Execute runs the 7-question guided flow to create a custom agent role.

func (*ExtendCommand) Name

func (c *ExtendCommand) Name() string

Name returns the command name.

type FileItem

type FileItem struct {
	Filename    string
	Description string
}

FileItem adapts file information for dropdown display

func (*FileItem) Display

func (f *FileItem) Display() string

func (*FileItem) SearchText

func (f *FileItem) SearchText() string

func (*FileItem) Value

func (f *FileItem) Value() interface{}

type HelpCommand

type HelpCommand struct {
	// contains filtered or unexported fields
}

HelpCommand implements the /help slash command

func (*HelpCommand) Description

func (h *HelpCommand) Description() string

Description returns the command description

func (*HelpCommand) Execute

func (h *HelpCommand) Execute(args []string, chatAgent *agent.Agent) error

Execute runs the help command. With no args, prints the global help and command list. With one arg, prints per-command help (SP-048-2c).

func (*HelpCommand) Name

func (h *HelpCommand) Name() string

Name returns the command name

type IndexCommand

type IndexCommand struct{}

IndexCommand implements the /index slash command for toggling workspace indexing.

func (*IndexCommand) Description

func (c *IndexCommand) Description() string

Description returns the command description

func (*IndexCommand) Execute

func (c *IndexCommand) Execute(args []string, chatAgent *agent.Agent) error

Execute runs the index command

func (*IndexCommand) Name

func (c *IndexCommand) Name() string

Name returns the command name

type InitCommand

type InitCommand struct{}

InitCommand implements the /init slash command

func (*InitCommand) Description

func (i *InitCommand) Description() string

Description returns the command description

func (*InitCommand) Execute

func (i *InitCommand) Execute(args []string, chatAgent *agent.Agent) error

Execute runs the init command using the LLM to analyze the codebase

func (*InitCommand) Name

func (i *InitCommand) Name() string

Name returns the command name

type JSONCommand

type JSONCommand interface {
	Command
	ExecuteWithJSONOutput(args []string, chatAgent *agent.Agent, ctx *CommandContext) error
}

JSONCommand extends Command to support JSON output

type LogAction

type LogAction struct {
	ID          string
	DisplayName string
	Description string
	Action      func(*LogFlow) error
}

LogAction represents different log management actions

type LogActionItem

type LogActionItem struct {
	ID          string
	DisplayName string
	Description string
}

LogActionItem adapts LogAction for dropdown display

func (*LogActionItem) Display

func (l *LogActionItem) Display() string

func (*LogActionItem) SearchText

func (l *LogActionItem) SearchText() string

func (*LogActionItem) Value

func (l *LogActionItem) Value() interface{}

type LogCommand

type LogCommand struct{}

LogCommand shows the change history using the history package

func (*LogCommand) Description

func (l *LogCommand) Description() string

Description returns the command description

func (*LogCommand) Execute

func (l *LogCommand) Execute(args []string, chatAgent *agent.Agent) error

Execute shows the change log using enhanced flow

func (*LogCommand) Name

func (l *LogCommand) Name() string

Name returns the command name

type LogFlow

type LogFlow struct {
	// contains filtered or unexported fields
}

LogFlow manages enhanced log and history operations

func NewLogFlow

func NewLogFlow(chatAgent *agent.Agent) *LogFlow

NewLogFlow creates a new log flow

func (*LogFlow) Execute

func (lf *LogFlow) Execute(args []string) error

Execute runs the enhanced log flow

type MCPCommand

type MCPCommand struct{}

MCPCommand implements the /mcp slash command

func (*MCPCommand) Description

func (m *MCPCommand) Description() string

Description returns the command description

func (*MCPCommand) Execute

func (m *MCPCommand) Execute(args []string, chatAgent *agent.Agent) error

Execute runs the MCP command

func (*MCPCommand) Name

func (m *MCPCommand) Name() string

Name returns the command name

type ModelsCommand

type ModelsCommand struct{}

ModelsCommand implements the /model slash command

func (*ModelsCommand) Description

func (m *ModelsCommand) Description() string

Description returns the command description

func (*ModelsCommand) Execute

func (m *ModelsCommand) Execute(args []string, chatAgent *agent.Agent) error

Execute runs the models command

func (*ModelsCommand) Name

func (m *ModelsCommand) Name() string

Name returns the command name

type OutputFormat

type OutputFormat int

OutputFormat defines output format for commands

const (
	OutputText OutputFormat = iota
	OutputJSON
)

type OutputWriter

type OutputWriter struct {
	Buffer bytes.Buffer
}

OutputWriter captures and buffers output

func (*OutputWriter) String

func (ow *OutputWriter) String() string

String returns the captured output

func (*OutputWriter) Write

func (ow *OutputWriter) Write(p []byte) (n int, err error)

Write implements io.Writer

type PersonaCommand

type PersonaCommand struct{}

PersonaCommand implements the /persona slash command.

func (*PersonaCommand) Description

func (p *PersonaCommand) Description() string

Description returns the command description.

func (*PersonaCommand) Execute

func (p *PersonaCommand) Execute(args []string, chatAgent *agent.Agent) error

Execute runs the persona command.

func (*PersonaCommand) Name

func (p *PersonaCommand) Name() string

Name returns the command name.

type Prompter

type Prompter interface {
	Prompt(prompt string) (string, error)
}

Prompter abstracts user input for the extend command flow.

type ProvidersCommand

type ProvidersCommand struct{}

ProvidersCommand implements the /provider slash command

func (*ProvidersCommand) Description

func (p *ProvidersCommand) Description() string

Description returns the command description

func (*ProvidersCommand) Execute

func (p *ProvidersCommand) Execute(args []string, chatAgent *agent.Agent) error

Execute runs the providers command

func (*ProvidersCommand) Name

func (p *ProvidersCommand) Name() string

Name returns the command name

type ReviewCommand

type ReviewCommand struct{}

func (*ReviewCommand) Description

func (c *ReviewCommand) Description() string

Description returns the command description

func (*ReviewCommand) Execute

func (c *ReviewCommand) Execute(args []string, chatAgent *agent.Agent) error

Execute runs the code review command

func (*ReviewCommand) Name

func (c *ReviewCommand) Name() string

Name returns the command name

type ReviewDeepCommand

type ReviewDeepCommand struct{}

ReviewDeepCommand implements the /review-deep slash command This command performs a deeper evidence-focused review on staged Git changes

func (*ReviewDeepCommand) Description

func (c *ReviewDeepCommand) Description() string

Description returns the command description

func (*ReviewDeepCommand) Execute

func (c *ReviewDeepCommand) Execute(args []string, chatAgent *agent.Agent) error

Execute runs the deep code review command

func (*ReviewDeepCommand) Name

func (c *ReviewDeepCommand) Name() string

Name returns the command name

type RevisionItem

type RevisionItem struct {
	RevisionID  string
	Description string
	Timestamp   string
}

RevisionItem adapts revision information for dropdown display

func (*RevisionItem) Display

func (r *RevisionItem) Display() string

func (*RevisionItem) SearchText

func (r *RevisionItem) SearchText() string

func (*RevisionItem) Value

func (r *RevisionItem) Value() interface{}

type RiskProfileCommand

type RiskProfileCommand struct{}

RiskProfileCommand implements /risk-profile for inspecting or switching the SP-058 shell-command gating profile mid-session. The CLI flag --risk-profile sets the same field at startup; this command lets the user adjust without restarting.

func (*RiskProfileCommand) Description

func (c *RiskProfileCommand) Description() string

func (*RiskProfileCommand) Execute

func (c *RiskProfileCommand) Execute(args []string, chatAgent *agent.Agent) error

func (*RiskProfileCommand) Name

func (c *RiskProfileCommand) Name() string

func (*RiskProfileCommand) Usage

func (c *RiskProfileCommand) Usage() string

type RollbackCommand

type RollbackCommand struct{}

RollbackCommand provides rollback functionality

func (*RollbackCommand) Description

func (r *RollbackCommand) Description() string

Description returns the command description

func (*RollbackCommand) Execute

func (r *RollbackCommand) Execute(args []string, chatAgent *agent.Agent) error

Execute performs a rollback

func (*RollbackCommand) Name

func (r *RollbackCommand) Name() string

Name returns the command name

type SelfReviewCommand

type SelfReviewCommand struct{}

SelfReviewCommand implements the /self-review slash command.

func (*SelfReviewCommand) Description

func (c *SelfReviewCommand) Description() string

func (*SelfReviewCommand) Execute

func (c *SelfReviewCommand) Execute(args []string, chatAgent *agent.Agent) error

func (*SelfReviewCommand) Name

func (c *SelfReviewCommand) Name() string

type SelfReviewGateCommand

type SelfReviewGateCommand struct{}

SelfReviewGateCommand implements the /self-review-gate slash command.

func (*SelfReviewGateCommand) Description

func (c *SelfReviewGateCommand) Description() string

func (*SelfReviewGateCommand) Execute

func (c *SelfReviewGateCommand) Execute(args []string, chatAgent *agent.Agent) error

func (*SelfReviewGateCommand) Name

func (c *SelfReviewGateCommand) Name() string

type SessionsCommand

type SessionsCommand struct{}

SessionsCommand handles session management with auto-tracking and session recovery

func (*SessionsCommand) Description

func (c *SessionsCommand) Description() string

func (*SessionsCommand) Execute

func (c *SessionsCommand) Execute(args []string, chatAgent *agent.Agent) error

func (*SessionsCommand) Name

func (c *SessionsCommand) Name() string

type SessionsFlow

type SessionsFlow struct{}

SessionsFlow handles advanced session operations

func (*SessionsFlow) ExecuteSessionDelete

func (f *SessionsFlow) ExecuteSessionDelete(args []string) (string, error)

ExecuteSessionDelete removes a session file

func (*SessionsFlow) ExecuteSessionExport

func (f *SessionsFlow) ExecuteSessionExport(args []string) (string, error)

ExecuteSessionExport exports a session to a JSON file

func (*SessionsFlow) ExecuteSessionImport

func (f *SessionsFlow) ExecuteSessionImport(chatAgent *agent.Agent, args []string) (string, error)

ExecuteSessionImport imports a session from a JSON file

func (*SessionsFlow) ExecuteSessionList

func (f *SessionsFlow) ExecuteSessionList(chatAgent *agent.Agent) (string, error)

ExecuteSessionList lists sessions for the current working directory, newest first.

func (*SessionsFlow) ExecuteSessionLoad

func (f *SessionsFlow) ExecuteSessionLoad(chatAgent *agent.Agent, args []string) (string, error)

ExecuteSessionLoad loads a session with optional summary context restoration

func (*SessionsFlow) ExecuteSessionRename

func (f *SessionsFlow) ExecuteSessionRename(chatAgent *agent.Agent, args []string) (string, error)

ExecuteSessionRename renames a session

type ShellCommand

type ShellCommand struct {
	Provider string
	Model    string
}

func (*ShellCommand) Description

func (c *ShellCommand) Description() string

func (*ShellCommand) Execute

func (c *ShellCommand) Execute(args []string, chatAgent *agent.Agent) error

func (*ShellCommand) Name

func (c *ShellCommand) Name() string

type StatsCommand

type StatsCommand struct{}

StatsCommand implements the /stats slash command

func (*StatsCommand) Description

func (s *StatsCommand) Description() string

Description returns the command description

func (*StatsCommand) Execute

func (s *StatsCommand) Execute(args []string, chatAgent *agent.Agent) error

Execute runs the stats command

func (*StatsCommand) Name

func (s *StatsCommand) Name() string

Name returns the command name

type StatusCommand

type StatusCommand struct{}

StatusCommand shows the current change tracking status

func (*StatusCommand) Description

func (s *StatusCommand) Description() string

Description returns the command description

func (*StatusCommand) Execute

func (s *StatusCommand) Execute(args []string, chatAgent *agent.Agent) error

Execute shows the current status

func (*StatusCommand) Name

func (s *StatusCommand) Name() string

Name returns the command name

type SubagentConfigCommand

type SubagentConfigCommand struct {
	// contains filtered or unexported fields
}

SubagentConfigCommand implements the /subagent-provider and /subagent-model commands

func (*SubagentConfigCommand) Description

func (s *SubagentConfigCommand) Description() string

Description returns the command description

func (*SubagentConfigCommand) Execute

func (s *SubagentConfigCommand) Execute(args []string, chatAgent *agent.Agent) error

Execute runs the subagent config command

func (*SubagentConfigCommand) Name

func (s *SubagentConfigCommand) Name() string

Name returns the command name

type SubagentPersonaCommand

type SubagentPersonaCommand struct{}

SubagentPersonaCommand implements the /subagent-persona command (show/configure a specific persona)

func (*SubagentPersonaCommand) Description

func (s *SubagentPersonaCommand) Description() string

Description returns the command description

func (*SubagentPersonaCommand) Execute

func (s *SubagentPersonaCommand) Execute(args []string, chatAgent *agent.Agent) error

Execute runs the subagent persona command

func (*SubagentPersonaCommand) Name

func (s *SubagentPersonaCommand) Name() string

Name returns the command name

type SubagentPersonasCommand

type SubagentPersonasCommand struct{}

SubagentPersonasCommand implements the /subagent-personas command (list all personas)

func (*SubagentPersonasCommand) Description

func (s *SubagentPersonasCommand) Description() string

Description returns the command description

func (*SubagentPersonasCommand) Execute

func (s *SubagentPersonasCommand) Execute(args []string, chatAgent *agent.Agent) error

Execute runs the subagent personas command

func (*SubagentPersonasCommand) Name

func (s *SubagentPersonasCommand) Name() string

Name returns the command name

type UsageProvider

type UsageProvider interface {
	Usage() string
}

UsageProvider is implemented by commands that want to surface a longer per-command help string via `/help <name>`. Commands that don't implement it fall back to their Description().

Jump to

Keyboard shortcuts

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