diff --git a/src/ClaudeDev.ts b/src/ClaudeDev.ts index 1cd51c8..25375d9 100644 --- a/src/ClaudeDev.ts +++ b/src/ClaudeDev.ts @@ -172,7 +172,7 @@ const tools: Tool[] = [ { name: "read_file", description: - "Read the contents of a file at the specified path. Use this when you need to examine the contents of an existing file, for example to analyze code, review text files, or extract information from configuration files. Be aware that this tool may not be suitable for very large files or binary files, as it returns the raw content as a string.", + "Read the contents of a file at the specified path. Use this when you need to examine the contents of an existing file, for example to analyze code, review text files, or extract information from configuration files. Automatically extracts raw text from PDF and DOCX files. May not be suitable for other types of binary files, as it returns the raw content as a string.", input_schema: { type: "object", properties: { diff --git a/src/utils/extract-text.ts b/src/utils/extract-text.ts index 6d434d5..d3a0039 100644 --- a/src/utils/extract-text.ts +++ b/src/utils/extract-text.ts @@ -1,5 +1,6 @@ import * as path from "path" -import pdf from "pdf-parse" +// @ts-ignore-next-line +import pdf from "pdf-parse/lib/pdf-parse" import mammoth from "mammoth" import { isBinaryFile } from "isbinaryfile" import fs from "fs/promises"