🔥 remove token limitation on /edit

This commit is contained in:
Nate Sesti 2024-01-21 21:38:01 -08:00
parent baba9ad45e
commit 8fa1eab4a6

View file

@ -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 =