Versions in this module Expand all Collapse all v1 v1.0.0 Sep 28, 2026 Changes in this version + const MaxReadFileSize + func IsAllowedPath(path string, patterns []*regexp.Regexp) bool + func ToolChannel(ctx context.Context) string + func ToolChatID(ctx context.Context) string + func ValidatePathWithAllowPaths(path, workspace string, restrict bool, patterns []*regexp.Regexp) (string, error) + func WithToolContext(ctx context.Context, channel, chatID string) context.Context + type AppendFileTool struct + func NewAppendFileTool(workspace string, restrict bool, allowPaths ...[]*regexp.Regexp) *AppendFileTool + func (t *AppendFileTool) Description() string + func (t *AppendFileTool) Execute(ctx context.Context, args map[string]any) *ToolResult + func (t *AppendFileTool) Name() string + func (t *AppendFileTool) Parameters() map[string]any + type EditFileTool struct + func NewEditFileTool(workspace string, restrict bool, allowPaths ...[]*regexp.Regexp) *EditFileTool + func (t *EditFileTool) Description() string + func (t *EditFileTool) Execute(ctx context.Context, args map[string]any) *ToolResult + func (t *EditFileTool) Name() string + func (t *EditFileTool) Parameters() map[string]any + type ListDirTool struct + func NewListDirTool(workspace string, restrict bool, allowPaths ...[]*regexp.Regexp) *ListDirTool + func (t *ListDirTool) Description() string + func (t *ListDirTool) Execute(ctx context.Context, args map[string]any) *ToolResult + func (t *ListDirTool) Name() string + func (t *ListDirTool) Parameters() map[string]any + type LoadImageTool struct + func NewLoadImageTool(workspace string, restrict bool, maxFileSize int, store media.MediaStore, ...) *LoadImageTool + func (t *LoadImageTool) Description() string + func (t *LoadImageTool) Execute(ctx context.Context, args map[string]any) *ToolResult + func (t *LoadImageTool) Name() string + func (t *LoadImageTool) Parameters() map[string]any + func (t *LoadImageTool) SetContext(channel, chatID string) + func (t *LoadImageTool) SetMediaStore(store media.MediaStore) + type ReadFileLinesTool struct + func NewReadFileLinesTool(workspace string, restrict bool, maxReadFileSize int, ...) *ReadFileLinesTool + func (t *ReadFileLinesTool) Description() string + func (t *ReadFileLinesTool) Execute(ctx context.Context, args map[string]any) *ToolResult + func (t *ReadFileLinesTool) Name() string + func (t *ReadFileLinesTool) Parameters() map[string]any + type ReadFileTool struct + func NewReadFileBytesTool(workspace string, restrict bool, maxReadFileSize int, ...) *ReadFileTool + func NewReadFileTool(workspace string, restrict bool, maxReadFileSize int, ...) *ReadFileTool + func (t *ReadFileTool) Description() string + func (t *ReadFileTool) Execute(ctx context.Context, args map[string]any) *ToolResult + func (t *ReadFileTool) Name() string + func (t *ReadFileTool) Parameters() map[string]any + type SendFileTool struct + func NewSendFileTool(workspace string, restrict bool, maxFileSize int, store media.MediaStore, ...) *SendFileTool + func (t *SendFileTool) Description() string + func (t *SendFileTool) Execute(ctx context.Context, args map[string]any) *ToolResult + func (t *SendFileTool) Name() string + func (t *SendFileTool) Parameters() map[string]any + func (t *SendFileTool) SetContext(channel, chatID string) + func (t *SendFileTool) SetMediaStore(store media.MediaStore) + type ToolResult = toolshared.ToolResult + func DiffResult(path string, before, after []byte) *ToolResult + func ErrorResult(message string) *ToolResult + func MediaResult(forLLM string, mediaRefs []string) *ToolResult + func NewToolResult(forLLM string) *ToolResult + func SilentResult(forLLM string) *ToolResult + type WriteFileTool struct + func NewWriteFileTool(workspace string, restrict bool, allowPaths ...[]*regexp.Regexp) *WriteFileTool + func (t *WriteFileTool) Description() string + func (t *WriteFileTool) Execute(ctx context.Context, args map[string]any) *ToolResult + func (t *WriteFileTool) Name() string + func (t *WriteFileTool) Parameters() map[string]any + func (t *WriteFileTool) SetAlternativeTools(names []string) Other modules containing this package github.com/xibodev/compa/v2