From f6c10c3eaf05109e18b4ae5bef8a8751f4486124 Mon Sep 17 00:00:00 2001 From: vyneer <41237021+vyneer@users.noreply.github.com> Date: Sun, 26 Nov 2023 03:26:06 +0300 Subject: [PATCH] fix: message history limit not applying (#354) --- assets/chat/js/history.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/chat/js/history.js b/assets/chat/js/history.js index 63c9e797..559fad16 100644 --- a/assets/chat/js/history.js +++ b/assets/chat/js/history.js @@ -71,7 +71,7 @@ class ChatInputHistory { this.history.push(message); // limit entries if (this.history.length > this.maxentries) - this.history.slice(-this.maxentries); + this.history.splice(0, this.history.length - this.maxentries); ChatStore.write('chat.history', this.history); } }