Documentation
¶
Index ¶
- Variables
- func AttachScreenshot(ctx context.Context, jpeg []byte) bool
- func Authorize(ctx context.Context, tool, command string) error
- func BinaryPlaceholder(name string, size int) string
- func CommandRule(command string) string
- func Defs(ts []Tool) []ai.Tool
- func Execute(ctx context.Context, ts []Tool, name string, args json.RawMessage) string
- func IsBinary(data []byte) bool
- func IsStale(err error) bool
- func ResolvePath(ctx context.Context, path string) string
- func SuggestTool(name string, candidates []string) []string
- func Truncate(s string) string
- func TruncateTail(s string) string
- func WithGate(ctx context.Context, gate func(GateRequest) (GateDecision, string)) context.Context
- func WithOnUpdate(ctx context.Context, onUpdate func(outputSoFar string)) context.Context
- func WithWorkingDir(ctx context.Context, dir string) context.Context
- func WorkingDir(ctx context.Context) string
- type AskOption
- type AskRequest
- type GateDecision
- type GateRequest
- type InteractiveRunner
- type Result
- type Tool
Constants ¶
This section is empty.
Variables ¶
View Source
var Ask func(ctx context.Context, req AskRequest) (answers []string, ok bool)
View Source
var Browser *browser.Manager
View Source
var ComputerApprover func(app string) bool
View Source
var ComputerPolicy *computer.Policy
View Source
var Gate func(GateRequest) (GateDecision, string)
View Source
var LSP interface { WaitDiagnostics(ctx context.Context, path string) string }
View Source
var Suggester func(name string) []string
Functions ¶
func AttachScreenshot ¶ added in v0.103.0
func BinaryPlaceholder ¶
func CommandRule ¶
func SuggestTool ¶
func TruncateTail ¶
func WithGate ¶ added in v0.103.0
func WithGate(ctx context.Context, gate func(GateRequest) (GateDecision, string)) context.Context
func WithOnUpdate ¶
func WithWorkingDir ¶ added in v0.103.0
func WorkingDir ¶ added in v0.103.0
Types ¶
type AskRequest ¶
type GateDecision ¶
type GateDecision int
const ( GateAllowOnce GateDecision = iota GateAllowAlways GateReject )
type GateRequest ¶
type InteractiveRunner ¶
type InteractiveRunner interface {
Run(ctx context.Context, command string, timeout time.Duration, keys <-chan []byte) string
}
var InteractiveBash InteractiveRunner
type Result ¶ added in v0.103.0
type Result struct {
Text string
Parts []ai.ContentPart
}
func ExecuteResult ¶ added in v0.103.0
Source Files
¶
Click to show internal directories.
Click to hide internal directories.