mirror of
https://github.com/cline/cline.git
synced 2026-09-21 05:10:09 +08:00
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:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"claude-dev": patch
|
||||
---
|
||||
|
||||
Increasing file size that can be read by cline
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user