Documentation
¶
Index ¶
- Constants
- Variables
- func Abort(ctx context.Context, l *link.Link) (bool, error)
- func Allowed(l *link.Link) bool
- func CheckPrompt(text string) error
- func Clean(s string) string
- func OneLine(s string) string
- func OneLineFull(s string) string
- type Event
- type PromptOptions
- type RenderOptions
- type Renderer
- type Stream
- type Style
- type Tracker
- type WatchOptions
- type WhenBusy
Constants ¶
View Source
const ( EventUser = "user" EventText = "text" EventThinking = "thinking" EventTool = "tool" EventToolResult = "tool-result" EventRun = "run" EventNotice = "notice" EventError = "error" EventEnd = "end" EventDelivered = "delivered" )
View Source
const ( EndStop = "stop" EndAborted = "aborted" EndError = "error" )
View Source
const ( Cap = "agent" Kind = "agent" MaxPrompt = 16 << 20 InlinePrompt = 60 << 10 )
Variables ¶
View Source
var ( ErrNotAllowed = errors.New("this seven doesn't allow remote control from this device") ErrBusy = errors.New("seven is busy") ErrTooLong = fmt.Errorf("the prompt is longer than %d MiB", MaxPrompt>>20) ErrEmpty = errors.New("the prompt is empty") ErrNotUTF8 = errors.New("the prompt is not UTF-8 text") )
Functions ¶
func CheckPrompt ¶
func OneLineFull ¶
Types ¶
type Event ¶
type Event struct {
T string `json:"t"`
ID string `json:"id,omitempty"`
Text string `json:"text,omitempty"`
Delta string `json:"delta,omitempty"`
Delivered string `json:"delivered,omitempty"`
Call string `json:"call,omitempty"`
Name string `json:"name,omitempty"`
Summary string `json:"summary,omitempty"`
OK *bool `json:"ok,omitempty"`
State string `json:"state,omitempty"`
Reason string `json:"reason,omitempty"`
Message string `json:"message,omitempty"`
Detail string `json:"detail,omitempty"`
Line []byte `json:"-"`
}
type PromptOptions ¶
type RenderOptions ¶
type Renderer ¶
type Renderer struct {
// contains filtered or unexported fields
}
func NewRenderer ¶
func NewRenderer(opts RenderOptions) *Renderer
type Stream ¶
type Tracker ¶
type Tracker struct {
// contains filtered or unexported fields
}
func NewTracker ¶
func NewTracker() *Tracker
func (*Tracker) Reconnected ¶
func (t *Tracker) Reconnected()
type WatchOptions ¶
Click to show internal directories.
Click to hide internal directories.