({ filePaths }: { filePaths: string[] })
| 11 | import type { ToolRenderConfig } from './types' |
| 12 | |
| 13 | function FilePathsDescription({ filePaths }: { filePaths: string[] }) { |
| 14 | const theme = useTheme() |
| 15 | |
| 16 | return ( |
| 17 | <> |
| 18 | {filePaths.map((fp, idx) => { |
| 19 | const isLast = idx === filePaths.length - 1 |
| 20 | const separator = isLast ? '' : ', ' |
| 21 | |
| 22 | if (isSensitiveFile(fp)) { |
| 23 | return ( |
| 24 | <span key={fp}> |
| 25 | <span fg={theme.muted} attributes={TextAttributes.STRIKETHROUGH}> |
| 26 | {fp} |
| 27 | </span> |
| 28 | <span fg={theme.muted}> (blocked)</span> |
| 29 | <span fg={theme.foreground}>{separator}</span> |
| 30 | </span> |
| 31 | ) |
| 32 | } |
| 33 | |
| 34 | if (isEnvTemplateFile(fp)) { |
| 35 | return ( |
| 36 | <span key={fp}> |
| 37 | <span fg={theme.foreground}>{fp}</span> |
| 38 | <span fg={theme.muted}> (allowed - example only)</span> |
| 39 | <span fg={theme.foreground}>{separator}</span> |
| 40 | </span> |
| 41 | ) |
| 42 | } |
| 43 | |
| 44 | return ( |
| 45 | <span key={fp} fg={theme.foreground}> |
| 46 | {fp} |
| 47 | {separator} |
| 48 | </span> |
| 49 | ) |
| 50 | })} |
| 51 | </> |
| 52 | ) |
| 53 | } |
| 54 | |
| 55 | /** |
| 56 | * UI component for read_files tool. |
nothing calls this directly
no test coverage detected