From d3c250ff85fd0215756c1fe62a8e4e9a8dbf12f3 Mon Sep 17 00:00:00 2001 From: Jacob Kim Date: Fri, 18 Jul 2025 19:06:34 -0700 Subject: [PATCH] feat: await for other functions --- core/nextEdit/templating/NextEditPromptEngine.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/nextEdit/templating/NextEditPromptEngine.ts b/core/nextEdit/templating/NextEditPromptEngine.ts index 8b02ad401..5efb341ce 100644 --- a/core/nextEdit/templating/NextEditPromptEngine.ts +++ b/core/nextEdit/templating/NextEditPromptEngine.ts @@ -52,13 +52,13 @@ function templateRendererOfModel( }; } -export function renderPrompt( +export async function renderPrompt( helper: HelperVars, userEdits: string, editableRegionStrategy: EditableRegionStrategy, prevOutcome?: NextEditOutcome, toApply?: RangeInFile, -): PromptMetadata { +): Promise { let modelName = helper.modelName as NextEditModelName; if (modelName === "this field is not used") { @@ -119,7 +119,7 @@ export function renderPrompt( // Given a previous response, we need to calculate where the cursor would be. // I think it's a good idea to calculate this in the response. - const editableRegion = getNextEditableRegion(editableRegionStrategy, { + const editableRegion = await getNextEditableRegion(editableRegionStrategy, { fileLines: appliedContent, filepath: helper.filepath, });