trim trailing newline

This commit is contained in:
Jacob Kim 2025-06-24 12:35:51 -07:00
parent 3916ee6eb9
commit eabae45a23

View file

@ -298,9 +298,10 @@ export class NextEditProvider {
// const testToken = testController.signal;
const msg: ChatMessage = await llm.chat(prompts, token);
if (typeof msg.content === "string") {
// TODO: There are cases where msg.conetnt.split("<|start|>")[1] is undefined
const nextCompletion = replaceEscapedCharacters(
msg.content.split("<|editable_region_start|>\n")[1],
);
).replace(/\n$/, "");
// const diffLines = myersDiff(helper.fileContents, nextCompletion);