Skip to content

Commit

Permalink
Merge pull request #2020 from Shoaibdev7/tooltip-blanking-during-answ…
Browse files Browse the repository at this point in the history
…er-generated

Fixed(AI-Chat): Tooltip is Consistently `Blanking Out` During Answer Generation
  • Loading branch information
Rassl authored Aug 12, 2024
2 parents 1567d40 + 1b1f00d commit 1b88dd9
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -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`
Expand Down Expand Up @@ -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 (
<StyledTooltip key={uniqueKey} content={entity.description}>
Expand Down

0 comments on commit 1b88dd9

Please sign in to comment.