parser

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommandType

type CommandType int

CommandType indicates how the input should be processed.

const (
	CommandTypeEmpty       CommandType = iota // Empty input
	CommandTypeRegular                        // Normal shell command
	CommandTypeAgent                          // ?? prefix - full agent request
	CommandTypeAgentPipe                      // cmd | ?? prompt - pipe to agent
	CommandTypeAgentInline                    // cmd ?? prompt - inline agent completion
)

func (CommandType) String

func (t CommandType) String() string

type ParseResult

type ParseResult struct {
	Type        CommandType
	Command     string // The shell command part (if any)
	AgentPrompt string // The agent prompt part (if any)
}

ParseResult contains the parsed command components.

func Parse

func Parse(line string) ParseResult

Parse analyzes a command line and determines how to process it.

Jump to

Keyboard shortcuts

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