diff --git a/src/components/App/SideBar/AiSummary/utils/AiSummaryHighlight/index.tsx b/src/components/App/SideBar/AiSummary/utils/AiSummaryHighlight/index.tsx index b5d0acca5..23a609dda 100644 --- a/src/components/App/SideBar/AiSummary/utils/AiSummaryHighlight/index.tsx +++ b/src/components/App/SideBar/AiSummary/utils/AiSummaryHighlight/index.tsx @@ -1,7 +1,7 @@ -import styled, { keyframes, css } from 'styled-components' -import { colors } from '~/utils' -import { ExtractedEntity } from '~/types' +import styled, { css, keyframes } from 'styled-components' import { Tooltip } from '~/components/common/ToolTip' +import { ExtractedEntity } from '~/types' +import { colors } from '~/utils' // Define a keyframe animation for highlighting from top-left to bottom-right const highlightAnimation = keyframes` @@ -61,7 +61,7 @@ export function highlightAiSummary( const entity = entities.find((e) => e.entity.toLowerCase() === part.toLowerCase()) if (entity) { - const uniqueKey = `${entity.entity}-${part}-${Math.random().toString(36).substr(2, 9)}` + const uniqueKey = `${entity.entity}-${entities.indexOf(entity)}` return (