grep

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package grep implements the grep tool: recursive regex search.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Tool

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

Tool is the grep tool.

func New

func New(root string) *Tool

New returns a grep tool rooted at root with the default match cap (200).

func NewWithMax

func NewWithMax(root string, n int) *Tool

NewWithMax returns a grep tool with a custom match cap. Tiny profile uses 50 so a single grep can't dump a wall of paths into a 4-8k context.

func (*Tool) Run

func (t *Tool) Run(ctx context.Context, in map[string]any) (tools.Result, error)

Run executes the search.

func (*Tool) Spec

func (t *Tool) Spec() llm.ToolSpec

Spec advertises the tool to the model.

Jump to

Keyboard shortcuts

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