trim trailing newline
This commit is contained in:
parent
3916ee6eb9
commit
eabae45a23
1 changed files with 2 additions and 1 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue