Skip to content

Commit 5639401

Browse files
committed
Expose the SearchFilesArgs
Signed-off-by: David Gageot <david.gageot@docker.com>
1 parent d939d2a commit 5639401

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

pkg/tools/builtin/filesystem.go

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -864,12 +864,14 @@ func (t *FilesystemTool) handleReadMultipleFiles(_ context.Context, toolCall too
864864
return &tools.ToolCallResult{Output: result.String()}, nil
865865
}
866866

867+
type SearchFilesArgs struct {
868+
Path string `json:"path"`
869+
Pattern string `json:"pattern"`
870+
ExcludePatterns []string `json:"excludePatterns"`
871+
}
872+
867873
func (t *FilesystemTool) handleSearchFiles(_ context.Context, toolCall tools.ToolCall) (*tools.ToolCallResult, error) {
868-
var args struct {
869-
Path string `json:"path"`
870-
Pattern string `json:"pattern"`
871-
ExcludePatterns []string `json:"excludePatterns"`
872-
}
874+
var args SearchFilesArgs
873875
if err := json.Unmarshal([]byte(toolCall.Function.Arguments), &args); err != nil {
874876
return nil, fmt.Errorf("failed to parse arguments: %w", err)
875877
}

0 commit comments

Comments
 (0)