MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / FilePathsDescription

Function FilePathsDescription

cli/src/components/tools/read-files.tsx:13–53  ·  view source on GitHub ↗
({ filePaths }: { filePaths: string[] })

Source from the content-addressed store, hash-verified

11import type { ToolRenderConfig } from './types'
12
13function 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.

Callers

nothing calls this directly

Calls 3

useThemeFunction · 0.90
isSensitiveFileFunction · 0.90
isEnvTemplateFileFunction · 0.90

Tested by

no test coverage detected