tools

package
v0.1.13 Latest Latest
Warning

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

Go to latest
Published: May 10, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAllTools

func GetAllTools() []responses.ToolUnionParam

func GetToolsForChat

func GetToolsForChat() []openai.ChatCompletionToolUnionParam

func GetToolsForPlan

func GetToolsForPlan() []openai.ChatCompletionToolUnionParam

func ParseArgs

func ParseArgs(raw string) (map[string]any, error)

func Register

func Register(name string, def ToolDef, fn ToolFunc)

func ValidatePath

func ValidatePath(ctx ToolContext, path string) (string, error)

Types

type QuestionItem

type QuestionItem struct {
	Question string   `json:"question"`
	Options  []string `json:"options,omitempty"`
}

type ToolContext

type ToolContext struct {
	WorkingDirectory string
	SessionID        string
}

type ToolDef

type ToolDef struct {
	Name        string
	Description string
	Params      map[string]any
}

type ToolFunc

type ToolFunc func(ctx ToolContext, args map[string]any) (ToolResponse, error)

type ToolResponse

type ToolResponse struct {
	Content     string
	CodeChanges []string
}

func Bash

func Bash(ctx ToolContext, args map[string]any) (ToolResponse, error)

func CreateTodo

func CreateTodo(ctx ToolContext, args map[string]any) (ToolResponse, error)

func Edit

func Edit(ctx ToolContext, args map[string]any) (ToolResponse, error)

func Execute

func Execute(name string, ctx ToolContext, args map[string]any) (ToolResponse, error)

func Glob

func Glob(ctx ToolContext, args map[string]any) (ToolResponse, error)

func Grep

func Grep(ctx ToolContext, args map[string]any) (ToolResponse, error)

func ListDir

func ListDir(ctx ToolContext, args map[string]any) (ToolResponse, error)

func Question

func Question(ctx ToolContext, args map[string]any) (ToolResponse, error)

func ReadFile

func ReadFile(ctx ToolContext, args map[string]any) (ToolResponse, error)

func Skill

func Skill(ctx ToolContext, args map[string]any) (ToolResponse, error)

func UpdateTodo

func UpdateTodo(ctx ToolContext, args map[string]any) (ToolResponse, error)

func WebFetch

func WebFetch(ctx ToolContext, args map[string]any) (ToolResponse, error)

func WriteFile

func WriteFile(ctx ToolContext, args map[string]any) (ToolResponse, error)

Jump to

Keyboard shortcuts

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