From 8fa1eab4a63cb2cbd83ca9d254c968ef344f8ce1 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Sun, 21 Jan 2024 21:38:01 -0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A5=20remove=20token=20limitation=20on?= =?UTF-8?q?=20/edit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/commands/slash/edit.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/core/commands/slash/edit.ts b/core/commands/slash/edit.ts index b6ef08f83..2f305c729 100644 --- a/core/commands/slash/edit.ts +++ b/core/commands/slash/edit.ts @@ -50,11 +50,11 @@ export async function getPromptParts( let maxTokens = Math.floor(model.contextLength / 2); const TOKENS_TO_BE_CONSIDERED_LARGE_RANGE = tokenLimit || 1200; - if (model.countTokens(rif.contents) > TOKENS_TO_BE_CONSIDERED_LARGE_RANGE) { - throw new Error( - "\n\n**It looks like you've selected a large range to edit, which may take a while to complete. If you'd like to cancel, click the 'X' button above. If you highlight a more specific range, Continue will only edit within it.**" - ); - } + // if (model.countTokens(rif.contents) > TOKENS_TO_BE_CONSIDERED_LARGE_RANGE) { + // throw new Error( + // "\n\n**It looks like you've selected a large range to edit, which may take a while to complete. If you'd like to cancel, click the 'X' button above. If you highlight a more specific range, Continue will only edit within it.**" + // ); + // } const BUFFER_FOR_FUNCTIONS = 400; let totalTokens =