From eae28a87c1e8adc073eab88eb9b28d1d5fa167a2 Mon Sep 17 00:00:00 2001 From: Jacob Kim Date: Thu, 7 Aug 2025 15:40:34 -0700 Subject: [PATCH] feat: add more to context --- core/nextEdit/NextEditProvider.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/core/nextEdit/NextEditProvider.ts b/core/nextEdit/NextEditProvider.ts index 0b97c4491..825515225 100644 --- a/core/nextEdit/NextEditProvider.ts +++ b/core/nextEdit/NextEditProvider.ts @@ -545,9 +545,17 @@ export class NextEditProvider { }; } else if (modelName.includes("model-1")) { ctx = { - userEdits: historyDiff ?? this.diffContext, + recentlyViewedCodeSnippets: + snippetPayload.recentlyVisitedRangesSnippets.map((snip) => ({ + filepath: snip.filepath, + content: snip.content, + })) ?? [], + currentFileContent: helper.fileContents, + editableRegionStartLine, + editableRegionEndLine, + editDiffHistory: this.diffContext, + currentFilePath: helper.filepath, languageShorthand: helper.lang.name, - userExcerpts: helper.fileContents, }; } else { ctx = {};