From 489a05117c7d8c1fcd00d523638a222a8f3359e1 Mon Sep 17 00:00:00 2001 From: Ara Date: Thu, 8 May 2025 23:55:40 +0400 Subject: [PATCH] Increasing file sizes for files that can be read by cline (#3396) * Increasing file sizes for files that can be read by cline * Update src/integrations/misc/extract-text.ts Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> * Increasing file sizes for files that can be read by cline --------- Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> --- .changeset/five-eyes-rescue.md | 5 +++++ src/integrations/misc/extract-text.ts | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 .changeset/five-eyes-rescue.md diff --git a/.changeset/five-eyes-rescue.md b/.changeset/five-eyes-rescue.md new file mode 100644 index 0000000000..7f5e3289c5 --- /dev/null +++ b/.changeset/five-eyes-rescue.md @@ -0,0 +1,5 @@ +--- +"claude-dev": patch +--- + +Increasing file size that can be read by cline diff --git a/src/integrations/misc/extract-text.ts b/src/integrations/misc/extract-text.ts index 9148efda3a..af8b6075e4 100644 --- a/src/integrations/misc/extract-text.ts +++ b/src/integrations/misc/extract-text.ts @@ -40,7 +40,8 @@ export async function extractTextFromFile(filePath: string): Promise { return extractTextFromIPYNB(filePath) default: const fileBuffer = await fs.readFile(filePath) - if (fileBuffer.byteLength > 300 * 1024) { + if (fileBuffer.byteLength > 20 * 1000 * 1024) { + // 20MB limit (20 * 1000 * 1024 bytes, decimal MB) throw new Error(`File is too large to read into context.`) } const encoding = await detectEncoding(fileBuffer, fileExtension)