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

Function readFiles

sdk/src/run.ts:588–612  ·  view source on GitHub ↗
({
  filePaths,
  override,
  fileFilter,
  cwd,
  fs,
}: {
  filePaths: string[]
  override?: NonNullable<
    Required<CodebuffClientOptions>['overrideTools']['read_files']
  >
  fileFilter?: FileFilter
  cwd?: string
  fs: CodebuffFileSystem
})

Source from the content-addressed store, hash-verified

586}
587
588async function readFiles({
589 filePaths,
590 override,
591 fileFilter,
592 cwd,
593 fs,
594}: {
595 filePaths: string[]
596 override?: NonNullable<
597 Required<CodebuffClientOptions>['overrideTools']['read_files']
598 >
599 fileFilter?: FileFilter
600 cwd?: string
601 fs: CodebuffFileSystem
602}) {
603 if (override) {
604 return await override({ filePaths })
605 }
606 return getFiles({
607 filePaths,
608 cwd: requireCwd(cwd, 'read_files'),
609 fs,
610 fileFilter,
611 })
612}
613
614async function handleToolCall({
615 action,

Callers 1

runOnceFunction · 0.85

Calls 2

getFilesFunction · 0.90
requireCwdFunction · 0.85

Tested by

no test coverage detected