Skip to content

Commit

Permalink
Fixes bug so that we're always marking first message as seen rather than
Browse files Browse the repository at this point in the history
only when it matches white space only message. Closes #9
  • Loading branch information
drorm committed Apr 4, 2023
1 parent c5ba35f commit 1f4ca76
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/LLM.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,13 +164,13 @@ export class LLM {
}
if (first && text.match(/^\s*$/)) {
// ignore the first empty line
first = false;
} else {
// convert multiple newlines to a single newline
text = text.replace(/\n+/g, "\n");
process.stdout.write(chalk.green(text));
response += text;
}
first = false;
}
} catch (error) {
console.error(
Expand Down

0 comments on commit 1f4ca76

Please sign in to comment.