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>
This commit is contained in:
Ara
2025-05-08 12:55:40 -07:00
committed by GitHub
co-authored by ellipsis-dev[bot]
parent e572ee44f9
commit 489a05117c
2 changed files with 7 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
---
"claude-dev": patch
---
Increasing file size that can be read by cline
+2 -1
View File
@@ -40,7 +40,8 @@ export async function extractTextFromFile(filePath: string): Promise<string> {
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)