tools

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LockFiles = []string{
	"go.sum",
	"package-lock.json",
	"yarn.lock",
	"pnpm-lock.yaml",
	"Cargo.lock",
	"poetry.lock",
	"Gemfile.lock",
}

Functions

func FetchGitCommits

func FetchGitCommits(workingDir, base, head string) (string, error)

FetchGitCommits retrieves a list of commit messages between base and head.

func FetchGitDiff

func FetchGitDiff(workingDir, base, head string) (string, []string, error)

func IsLockFile added in v0.1.0

func IsLockFile(path string) bool

IsLockFile reports whether path names a known dependency lockfile — either at the repository root (path == name) or in any subdirectory (path ends in "/name"). Used by callers that operate on pre-computed paths (e.g. PR file lists) rather than via git pathspec excludes.

func RegisterLocalTools

func RegisterLocalTools(r *Registry)

Types

type Registry

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

func NewRegistry

func NewRegistry() *Registry

func (*Registry) HandleCall

func (r *Registry) HandleCall(tc llm.ToolCall) (string, error)

func (*Registry) RegisterTool

func (r *Registry) RegisterTool(def llm.ToolDef, handler ToolHandler)

func (*Registry) ToTools

func (r *Registry) ToTools() []llm.ToolDef

type ToolHandler

type ToolHandler func(tc llm.ToolCall) (string, error)

Jump to

Keyboard shortcuts

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