File size: 1,840 Bytes
ffcad5d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
import React from 'react';
import { useAppConfig } from '../contexts/AppConfigContext';
import { useTheme } from '../contexts/ThemeContext';

const ThinkingIndicator = ({ advisorId }) => {
  const { advisors, getAdvisorColors } = useAppConfig();
  const advisor = advisors[advisorId];
  const { isDark } = useTheme();
  const colors = getAdvisorColors(advisorId, isDark);

  if (!advisor) return null;

  const Icon = advisor.icon;

  return (
    <div className="thinking-container">

      <div className="advisor-message-avatar-ring" style={{ width: 44, height: 44 }}>

        {Icon ? (

          <Icon

            className="advisor-message-avatar-icon"

            style={{ color: colors.color, width: 23, height: 23 }}

          />

        ) : null}

      </div>

      <div

        className="thinking-bubble"

        style={{

          backgroundColor: colors.bgColor,

          borderColor: colors.color + '40',

        }}

      >

        <div className="thinking-header">

          <h4 className="advisor-name" style={{ color: colors.color }}>

            {advisor.name}

          </h4>

        </div>

        <div className="thinking-dots">

          <div

            className="thinking-dot"

            style={{ backgroundColor: colors.color, animationDelay: '0ms' }}

          />

          <div

            className="thinking-dot"

            style={{ backgroundColor: colors.color, animationDelay: '150ms' }}

          />

          <div

            className="thinking-dot"

            style={{ backgroundColor: colors.color, animationDelay: '300ms' }}

          />

        </div>

        <p className="thinking-text" style={{ color: colors.color, opacity: 0.8 }}>

          thinking...

        </p>

      </div>

    </div>
  );
};

export default ThinkingIndicator;