(toolBlock)
| 60 | toolName: 'read_files', |
| 61 | |
| 62 | render(toolBlock): ToolRenderConfig { |
| 63 | const input = toolBlock.input as any |
| 64 | |
| 65 | // Extract file paths from input |
| 66 | const filePaths: string[] = Array.isArray(input?.paths) |
| 67 | ? input.paths |
| 68 | .filter((path: any) => typeof path === 'string') |
| 69 | .map((path: string) => path.trim()) |
| 70 | .filter((path: string) => path.length > 0) |
| 71 | : [] |
| 72 | |
| 73 | if (filePaths.length === 0) { |
| 74 | return { content: null } |
| 75 | } |
| 76 | |
| 77 | // Check if any files need special labels |
| 78 | const hasSpecialFiles = filePaths.some( |
| 79 | (fp) => isSensitiveFile(fp) || isEnvTemplateFile(fp), |
| 80 | ) |
| 81 | |
| 82 | return { |
| 83 | content: ( |
| 84 | <SimpleToolCallItem |
| 85 | name="Read" |
| 86 | description={ |
| 87 | hasSpecialFiles ? ( |
| 88 | <FilePathsDescription filePaths={filePaths} /> |
| 89 | ) : ( |
| 90 | filePaths.join(', ') |
| 91 | ) |
| 92 | } |
| 93 | /> |
| 94 | ), |
| 95 | } |
| 96 | }, |
| 97 | }) |
nothing calls this directly
no test coverage detected