detector

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StripANSI

func StripANSI(content string) string

StripANSI removes ANSI escape codes from content.

Types

type AgentStatus

type AgentStatus string
const (
	StatusActive   AgentStatus = "active"
	StatusApproval AgentStatus = "approval"
	StatusReady    AgentStatus = "ready"
	StatusUnknown  AgentStatus = "unknown"
)

type Detector

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

func New

func New(tool string) *Detector

func (*Detector) Detect

func (d *Detector) Detect(content string) AgentStatus

Detect returns the detected status based on terminal content.

func (*Detector) IsBusy

func (d *Detector) IsBusy(content string) bool

IsBusy returns true if the terminal content indicates the agent is actively working.

func (*Detector) IsReady

func (d *Detector) IsReady(content string) bool

IsReady returns true if the terminal shows an input prompt (agent waiting for input).

func (*Detector) NeedsApproval

func (d *Detector) NeedsApproval(content string) bool

NeedsApproval returns true if the terminal shows a permission/approval dialog.

Jump to

Keyboard shortcuts

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