Documentation
¶
Overview ¶
Package read implements the read tool: read file or list directory. One stat call branches on type. Binary files are refused with a clear msg.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
New returns a fresh read tool with package-default limits (2000 default, 10000 max). Used by non-tiny profiles.
func NewWithLimits ¶
NewWithLimits returns a read tool with custom default/max line caps. Tiny profile passes 100/500 so one read can't torch a 4-8k local-model context.
Types ¶
type Tool ¶
type Tool struct {
// contains filtered or unexported fields
}
Tool is the read tool. Holds a per-tool (= per-Engine, in practice) cache so repeated reads of unchanged files within one session return a stub instead of replaying the body. defaultLines/maxLines override the package defaults; zero falls back to the package constants.