Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Command ¶
type Command struct {
Type string
Argument string
Content string
StartPos int
EndPos int
Original string
}
Command represents a parsed command from LLM output
type ExecutionResult ¶
type ExecutionResult struct {
Command Command
Success bool
Result string
Error error
ExecutionTime time.Duration
BytesWritten int64
BackupFile string
Action string
ExitCode int
Stdout string
Stderr string
ContainerID string
}
ExecutionResult holds the result of a command execution
type Scanner ¶
type Scanner struct {
// contains filtered or unexported fields
}
Scanner implements a state-machine based input processor
func NewScanner ¶
NewScanner creates a new state-machine scanner
type ScannerState ¶
type ScannerState int
ScannerState represents the current parsing state
const ( StateScanning ScannerState = iota // Default: scanning for commands or plain text StateTagOpen // Saw '<', determining tag type StateOpen // Parsing <open filepath> StateWrite // Parsing <write filepath> StateWriteBody // Accumulating write content until </write> StateExec // Parsing <exec command> StateExecBody // Accumulating exec body StateSearch // Parsing <search query> )
func (ScannerState) String ¶
func (s ScannerState) String() string
String returns the name of the state (for debugging)
Click to show internal directories.
Click to hide internal directories.