Interface PatternSearch

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      public final class PatternSearch.PatternMatch

      Represents a matching file with context

    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      String findPatternInProject(@ToolParam(description = "regex pattern") String pattern, @ToolParam(description = "glob pattern for files to search in") String globPattern)
      List<PatternSearch.PatternMatch> findPatternInProject(Regex pattern, String globPattern, Boolean useParallelSearch) Finds files containing the specified pattern using glob patterns
      Boolean matchesGlob(String path, String globPattern) Checks if a file path matches a glob pattern
      • Methods inherited from class com.embabel.agent.tools.DirectoryBased

        getRoot
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • findPatternInProject

        @Tool(description = "search for a regex in the project") String findPatternInProject(@ToolParam(description = "regex pattern") String pattern, @ToolParam(description = "glob pattern for files to search in") String globPattern)
      • findPatternInProject

         List<PatternSearch.PatternMatch> findPatternInProject(Regex pattern, String globPattern, Boolean useParallelSearch)

        Finds files containing the specified pattern using glob patterns

        Parameters:
        pattern - The regex pattern to search for
        globPattern - Glob pattern to match files
        useParallelSearch - Whether to use parallel processing for faster searching
        Returns:

        List of matching files with their relevant content snippets

      • matchesGlob

         Boolean matchesGlob(String path, String globPattern)

        Checks if a file path matches a glob pattern

        Parameters:
        path - The file path to check
        globPattern - The glob pattern to match against
        Returns:

        true if the path matches the pattern