Skip to content

Commit 4a8af88

Browse files
authored
Merge pull request #1002 from lc-soft/fix/first-chat-bug
fix(chat): prevent duplicate message keys on first chat welcome message
2 parents 2ef5704 + 489fc13 commit 4a8af88

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)