Merge pull request #1002 from lc-soft/fix/first-chat-bug

fix(chat): prevent duplicate message keys on first chat welcome message
This commit is contained in:
Jaber Jaber
2026-04-10 19:14:11 +03:00
committed by GitHub

View File

@@ -488,9 +488,8 @@ function chatPage() {
this.connectWs(agent.id);
// Show welcome tips on first use
if (!localStorage.getItem('of-chat-tips-seen')) {
var localMsgId = 0;
this.messages.push({
id: ++localMsgId,
id: ++msgId,
role: 'system',
text: '**Welcome to OpenFang Chat!**\n\n' +
'- Type `/` to see available commands\n' +