commands

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2026 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Overview

Package commands holds the slash commands. A command reports by returning a transcript.Cell, which joins the conversation, or a panel.Panel, which takes the bottom of the screen.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsAsk

func IsAsk(p panel.Panel) bool

func IsCommand

func IsCommand(line string) bool

IsCommand tells a slash command from a message starting with a path such as "/usr/bin".

func Open

func Open(a *app.App, id string) tea.Cmd

Open runs off the TUI goroutine because opening publishes events to it. An empty id opens a new conversation.

func PendingPlugins

func PendingPlugins(a *app.App) string

PendingPlugins counts plugins that need installing or a consent decision.

func TrustPanel

func TrustPanel(a *app.App, all bool) panel.Panel

TrustPanel asks about the undecided items, or the whole surface with all. Dismissing it changes nothing.

Types

type Command

type Command struct {
	Name    string
	Aliases []string
	// Args is a hint such as "<question>"; "" means no arguments.
	Args        string
	Description string
	// Idle commands refuse to run while the agent works.
	Idle  bool
	Skill bool
	Run   func(args string) tea.Cmd
	// contains filtered or unexported fields
}

type Copy

type Copy struct{ Text string }

type OpenAgent

type OpenAgent struct{ Name string }

type Registry

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

Registry holds the built-in commands and one per user-invocable skill.

func New

func New(a *app.App, version string) *Registry

func (*Registry) Commands

func (r *Registry) Commands() []Command

func (*Registry) Lookup

func (r *Registry) Lookup(name string) (Command, bool)

func (*Registry) Run

func (r *Registry) Run(line string) tea.Cmd

Run runs commands off the TUI goroutine because they read sessions, run git and wait on servers.

Jump to

Keyboard shortcuts

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