From 3d359476e97f4a29bf317d55a58b2787d14e2375 Mon Sep 17 00:00:00 2001 From: Jacob Kim Date: Mon, 23 Jun 2025 21:07:47 -0700 Subject: [PATCH] return the full result from the model --- core/nextEdit/NextEditProvider.ts | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/core/nextEdit/NextEditProvider.ts b/core/nextEdit/NextEditProvider.ts index 5bf121f53..516b7b3cc 100644 --- a/core/nextEdit/NextEditProvider.ts +++ b/core/nextEdit/NextEditProvider.ts @@ -18,9 +18,7 @@ import { AutocompleteInput, AutocompleteOutcome, } from "../autocomplete/util/types.js"; -import { myersDiff } from "../diff/myers.js"; import { replaceEscapedCharacters } from "../util/text.js"; -import { getRenderableDiff } from "./diff/diff.js"; import { Prompt, renderDefaultSystemPrompt, @@ -301,19 +299,16 @@ export class NextEditProvider { const msg: ChatMessage = await llm.chat(prompts, token); if (typeof msg.content === "string") { const nextCompletion = replaceEscapedCharacters( - msg.content - .split("<|editable_region_start|>\n")[1] - .slice(1) - .slice(0, -2), + msg.content.split("<|editable_region_start|>\n")[1], ); - const diffLines = myersDiff(helper.fileContents, nextCompletion); + // const diffLines = myersDiff(helper.fileContents, nextCompletion); - const diff = getRenderableDiff(diffLines); + // const diff = getRenderableDiff(diffLines); const outcomeNext: AutocompleteOutcome = { time: Date.now() - startTime, - completion: diff, + completion: nextCompletion, prefix: "", suffix: "", prompt: "", @@ -322,7 +317,7 @@ export class NextEditProvider { completionOptions: null, cacheHit: false, filepath: helper.filepath, - numLines: diff.split("\n").length, + numLines: nextCompletion.split("\n").length, completionId: helper.input.completionId, gitRepo: await this.ide.getRepoName(helper.filepath), uniqueId: await this.ide.getUniqueId(),