file

package
v0.7.6 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2026 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxTextFileReadBytes = 32 << 20
	MaxTextOutputBytes   = 4 << 20
)

Variables

This section is empty.

Functions

func AddRuntimeOutputProperties

func AddRuntimeOutputProperties(_ map[string]any)

func AddRuntimeProperties

func AddRuntimeProperties(_ map[string]any)

func EditDescription

func EditDescription(base string) string

func PatchDescription

func PatchDescription(base string) string

func PathDescription

func PathDescription(hostDescription string) string

func ToolDescription

func ToolDescription(base string) string

Types

type CommandEnv

type CommandEnv func(skillName string, extra map[string]any) ([]string, error)

type FileRuntimeSelection

type FileRuntimeSelection = fileRuntimeSelection

func SelectFileRuntime

func SelectFileRuntime(args map[string]any) (FileRuntimeSelection, error)

type Result

type Result = toolcore.Result

type SearchOptions

type SearchOptions struct {
	Query          string
	CaseSensitive  bool
	Regex          bool
	IncludeIgnored bool
	IncludeHidden  bool
	IncludeGlobs   []string
	ExcludeGlobs   []string
	MaxResults     int
	ContextLines   int
}

type Service

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

func New

func New(ws *workspace.Workspace, resolveSkillResource SkillResourceResolver, commandEnv CommandEnv) *Service

func (*Service) ApplyPatch

func (s *Service) ApplyPatch(ctx context.Context, args map[string]any) (Result, error)

func (*Service) Edit

func (svc *Service) Edit(ctx context.Context, args map[string]any) (Result, error)

func (*Service) EditFile

func (s *Service) EditFile(args map[string]any) (Result, error)

func (*Service) ListDir

func (svc *Service) ListDir(ctx context.Context, args map[string]any) (Result, error)

func (*Service) ListFiles

func (svc *Service) ListFiles(ctx context.Context, args map[string]any) (Result, error)

func (*Service) ParseRGJSON

func (s *Service) ParseRGJSON(output []byte, options SearchOptions) ([]map[string]any, bool, bool)

func (*Service) ReadFile

func (svc *Service) ReadFile(ctx context.Context, args map[string]any) (Result, error)

func (*Service) SearchText

func (svc *Service) SearchText(ctx context.Context, args map[string]any) (Result, error)

func (*Service) SearchTextGo

func (s *Service) SearchTextGo(ctx context.Context, path workspace.Path, options SearchOptions) (Result, error)

type SkillResourceResolver

type SkillResourceResolver func(raw string) (absolutePath, displayPath string, err error)

type ToolError

type ToolError = toolcore.ToolError

Jump to

Keyboard shortcuts

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