mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-20 02:10:15 +01:00
refactor: correct type definitions for ToolInputSchema and error handling in searchFiles function
This commit is contained in:
parent
a06e999dd6
commit
1386c38b14
1 changed files with 3 additions and 3 deletions
|
|
@ -162,8 +162,8 @@ const GetFileInfoArgsSchema = z.object({
|
||||||
path: z.string(),
|
path: z.string(),
|
||||||
});
|
});
|
||||||
|
|
||||||
const ToolInputSchema = ToolSchema.shape.inputSchema;
|
type ToolInputSchema = typeof ToolSchema.shape.inputSchema;
|
||||||
type ToolInput = z.infer<typeof ToolInputSchema>;
|
type ToolInput = z.infer<ToolInputSchema>;
|
||||||
|
|
||||||
interface FileInfo {
|
interface FileInfo {
|
||||||
size: number;
|
size: number;
|
||||||
|
|
@ -237,7 +237,7 @@ async function searchFiles(
|
||||||
if (entry.isDirectory()) {
|
if (entry.isDirectory()) {
|
||||||
await search(fullPath);
|
await search(fullPath);
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch {
|
||||||
// Skip invalid paths during search
|
// Skip invalid paths during search
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue