control

package
v5.0.16 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AskUserTool      = "ask_user"
	TaskCompleteTool = "task_complete"
)

Variables

This section is empty.

Functions

func IsControlTool

func IsControlTool(name string) bool

func ProjectHistory

func ProjectHistory(history []session.Message) []session.Message

func ProjectMessage

func ProjectMessage(msg session.Message) (session.Message, bool)

func ToolDefinitions

func ToolDefinitions(includeTaskComplete bool) []tools.ToolDefinition

Types

type Signal

type Signal struct {
	Kind    SignalKind
	Prompt  string
	Output  string
	Payload map[string]any
}

func AskUser

func AskUser(calls []provider.ToolCall) (Signal, bool)

func Completion

func Completion(calls []provider.ToolCall) (Signal, bool)

func Project

func Project(call provider.ToolCall) (Signal, bool, error)

type SignalKind

type SignalKind string
const (
	SignalNone         SignalKind = ""
	SignalAskUser      SignalKind = "ask_user"
	SignalTaskComplete SignalKind = "task_complete"
)

Jump to

Keyboard shortcuts

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