Skip to content

Commit

Permalink
fix(chat): appendContextAndDedupe shall returns new instance of array…
Browse files Browse the repository at this point in the history
… to avoid React skipping the update rerender (#2973)
  • Loading branch information
wsxiaoys authored Aug 23, 2024
1 parent 74c78dd commit f2cc6f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ee/tabby-ui/components/chat/chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ function appendContextAndDedupe(
newCtx: Context
): Context[] {
if (!ctxList.some(ctx => isContextEqual(ctx, newCtx))) {
ctxList.push(newCtx)
return ctxList.concat([newCtx])
}
return ctxList
}
Expand Down

0 comments on commit f2cc6f7

Please sign in to comment.