fix: correct order for removing cleared content
Node.js CI / Lint and Test (push) Failing after 47s
Code Analysis / SonarQube (push) Failing after 1m5s

This commit is contained in:
2025-05-22 15:13:43 -07:00
parent b6350fbc74
commit 9eabdc9a29
+1 -1
View File
@@ -44,7 +44,7 @@ export const onMessage = async(message: Message): Promise<void> => {
});
if (clearMessageIndex !== -1) {
// Remove the clear message and everything sent before it, which means everything after in the array because the array is backwards
history.splice(0, clearMessageIndex + 1);
history.splice(clearMessageIndex, history.length - clearMessageIndex);
}
const context: Array<MessageParam> = history.
reverse().