fix: add proper TypeScript types to search_files handler

This commit is contained in:
devin-ai-integration[bot]
2024-12-06 21:44:45 +00:00
parent a1855509d1
commit 00a30ac2bb

View File

@@ -167,9 +167,9 @@ const server = new Server(
search_files: {
description: "Recursively search for files/directories with optional exclude patterns",
inputSchema: zodToJsonSchema(SearchFilesArgsSchema),
handler: async ({ path: searchPath, pattern, excludePatterns }) => {
const validatedPath = await validatePath(searchPath);
return searchFiles(validatedPath, pattern, excludePatterns);
handler: async (args: z.infer<typeof SearchFilesArgsSchema>) => {
const validatedPath = await validatePath(args.path);
return searchFiles(validatedPath, args.pattern, args.excludePatterns);
},
},
},