fix(chat): prevent duplicate message keys on first chat welcome message

This commit is contained in:
Liu
2026-04-07 15:20:55 +08:00
parent 07963779be
commit 489fc1312c
+1 -2
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' +