(filePath: string)
| 9 | import { DEFAULT_LINE_LIMIT } from "../../core/prompts/tools/native-tools/read_file" |
| 10 | |
| 11 | async function extractTextFromPDF(filePath: string): Promise<string> { |
| 12 | const dataBuffer = await fs.readFile(filePath) |
| 13 | const data = await pdf(dataBuffer) |
| 14 | return addLineNumbers(data.text) |
| 15 | } |
| 16 | |
| 17 | async function extractTextFromDOCX(filePath: string): Promise<string> { |
| 18 | const result = await mammoth.extractRawText({ path: filePath }) |
nothing calls this directly
no test coverage detected