Skip to content

Commit 489fc13

Browse files
committed
fix(chat): prevent duplicate message keys on first chat welcome message
1 parent 0796377 commit 489fc13

File tree

1 file changed

+1
-2
lines changed
  • crates/openfang-api/static/js/pages

1 file changed

+1
-2
lines changed

crates/openfang-api/static/js/pages/chat.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -488,9 +488,8 @@ function chatPage() {
488488
this.connectWs(agent.id);
489489
// Show welcome tips on first use
490490
if (!localStorage.getItem('of-chat-tips-seen')) {
491-
var localMsgId = 0;
492491
this.messages.push({
493-
id: ++localMsgId,
492+
id: ++msgId,
494493
role: 'system',
495494
text: '**Welcome to OpenFang Chat!**\n\n' +
496495
'- Type `/` to see available commands\n' +

0 commit comments

Comments
 (0)