generated from nhcarrigan/template
fix: correct order for removing cleared content
This commit is contained in:
parent
b6350fbc74
commit
9eabdc9a29
@ -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().
|
||||
|
Loading…
x
Reference in New Issue
Block a user