Local Directory
class LocalDirectory(val root: String, val description: String, val notes: String = "", val fileContentTransformers: List<StringTransformer> = listOf(WellKnownFileContentTransformers.removeApacheLicenseHeader)) : FileReadTools, PatternSearch, FileReadLog, LlmReference
Readonly access to a project on the local filesystem.
Constructors
Link copied to clipboard
constructor(root: String, description: String, notes: String = "", fileContentTransformers: List<StringTransformer> = listOf(WellKnownFileContentTransformers.removeApacheLicenseHeader))
Properties
Link copied to clipboard
Link copied to clipboard
Provide sanitizers that run on file content before returning it. They must be sure not to change any content that may need to be replaced as this will break editing if editing is done in the same session.
Link copied to clipboard
Tool callbacks referenced or exposed.
Functions
Link copied to clipboard
Link copied to clipboard
open fun findPatternInProject(pattern: <Error class: unknown class>, globPattern: String, useParallelSearch: Boolean = true): List<PatternSearch.PatternMatch>
Finds files containing the specified pattern using glob patterns
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Checks if a file path matches a glob pattern
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Use for safe reading of files. Returns null if the file doesn't exist or is not readable.
Link copied to clipboard
Return the instance of the tool object. Defaults to this
Link copied to clipboard
Create a tool object for this reference.
Link copied to clipboard
A safe prefix for LLM tools associated with this reference. Defaults to the name lowercased with spaces replaced by underscores. Subclasses can override it