app-tutor-ai-consumer 1.54.0 → 1.55.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## [1.55.1](https://github.com/Hotmart-Org/app-tutor-ai-consumer/compare/v1.55.0...v1.55.1) (2026-01-30)
2
+
3
+ # [1.55.0](https://github.com/Hotmart-Org/app-tutor-ai-consumer/compare/v1.54.0...v1.55.0) (2026-01-30)
4
+
5
+ ### Features
6
+
7
+ - add concierge labels ([f845eb5](https://github.com/Hotmart-Org/app-tutor-ai-consumer/commit/f845eb5a3016d582ae9687f569764b14bca00d15))
8
+
1
9
  # [1.54.0](https://github.com/Hotmart-Org/app-tutor-ai-consumer/compare/v1.53.0...v1.54.0) (2026-01-28)
2
10
 
3
11
  ### Bug Fixes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "app-tutor-ai-consumer",
3
- "version": "1.54.0",
3
+ "version": "1.55.1",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "dev": "rspack serve --env=development --config config/rspack/rspack.config.js",
@@ -11,6 +11,7 @@ import type { WidgetTabsProps } from '@/src/modules/widget'
11
11
  import {
12
12
  widgetSettingsAtom,
13
13
  widgetSettingsConfigAgentParentAtom,
14
+ widgetSettingsConfigConciergeParentAtom,
14
15
  widgetTabsAtom
15
16
  } from '@/src/modules/widget'
16
17
  import type { WidgetSettingProps } from '@/src/types'
@@ -50,12 +51,18 @@ const useInitialStore = ({ settings }: UseInitialStoreProps) => {
50
51
  [settings?.config?.metadata?.parent]
51
52
  )
52
53
 
54
+ const isConciergeMode = useMemo(
55
+ () => settings?.config?.metadata?.parent === 'CONCIERGE',
56
+ [settings?.config?.metadata?.parent]
57
+ )
58
+
53
59
  useHydrateAtoms(
54
60
  [
55
61
  [widgetSettingsAtom, getDefaultSettings(settings)],
56
62
  [messagesMaxCountAtom, MSG_MAX_COUNT],
57
63
  [widgetTabsAtom, initialTab],
58
- [widgetSettingsConfigAgentParentAtom, isAgentMode]
64
+ [widgetSettingsConfigAgentParentAtom, isAgentMode],
65
+ [widgetSettingsConfigConciergeParentAtom, isConciergeMode]
59
66
  ],
60
67
  { store }
61
68
  )
@@ -3,7 +3,9 @@ import { useTranslation } from 'react-i18next'
3
3
 
4
4
  import { AiIconCircle } from '@/src/lib/components'
5
5
  import { useMembershipColor } from '../../hooks'
6
- import { useIsAgentParentAtomValue } from '../../store'
6
+ import { useIsAgentParentAtomValue, useIsConciergeParentAtomValue } from '../../store'
7
+
8
+ import { getGreetingsLabels } from './utils'
7
9
 
8
10
  export type GreetingsCardProps = {
9
11
  tutorName: string
@@ -13,8 +15,12 @@ export type GreetingsCardProps = {
13
15
 
14
16
  function GreetingsCard({ author, tutorName, isDarkTheme = false }: GreetingsCardProps) {
15
17
  const { t } = useTranslation()
16
- const isAgentMode = useIsAgentParentAtomValue()
17
18
  const membershipColor = useMembershipColor()
19
+ const isAgentMode = useIsAgentParentAtomValue()
20
+ const isConciergeMode = useIsConciergeParentAtomValue()
21
+
22
+ const chatMode = isConciergeMode ? 'CONCIERGE' : isAgentMode ? 'AGENT' : 'TUTOR'
23
+ const labels = getGreetingsLabels(chatMode)
18
24
 
19
25
  return (
20
26
  <div className='flex flex-col items-center justify-center'>
@@ -28,19 +34,14 @@ function GreetingsCard({ author, tutorName, isDarkTheme = false }: GreetingsCard
28
34
  'text-white': isDarkTheme,
29
35
  'text-gray-900': !isDarkTheme
30
36
  })}>
31
- {t('general.greetings.hello', { name: author })}
37
+ {t(labels.hello, { name: author })}
32
38
  </span>
33
39
  <h3
34
40
  className={clsx('text-xl font-bold', {
35
41
  'text-white': isDarkTheme,
36
42
  'text-gray-900': !isDarkTheme
37
43
  })}>
38
- {t(
39
- isAgentMode
40
- ? 'general.greetings.agentFirstMessage'
41
- : 'general.greetings.firstMessage',
42
- { tutorName }
43
- )}
44
+ {t(labels.firstMessage, { tutorName })}
44
45
  </h3>
45
46
  </div>
46
47
  <p
@@ -48,7 +49,7 @@ function GreetingsCard({ author, tutorName, isDarkTheme = false }: GreetingsCard
48
49
  'text-gray-400': isDarkTheme,
49
50
  'text-neutral-600': !isDarkTheme
50
51
  })}>
51
- {t(isAgentMode ? 'general.greetings.agentDescription' : 'general.greetings.description')}
52
+ {t(labels.description)}
52
53
  </p>
53
54
  </div>
54
55
  </div>
@@ -0,0 +1,7 @@
1
+ export type WidgetMode = 'TUTOR' | 'AGENT' | 'CONCIERGE'
2
+
3
+ export type GreetingsLabels = {
4
+ hello: string
5
+ firstMessage: string
6
+ description: string
7
+ }
@@ -0,0 +1,25 @@
1
+ import type { GreetingsLabels, WidgetMode } from './types'
2
+
3
+ export const getGreetingsLabels = (mode: WidgetMode, isFirstTime = false): GreetingsLabels => {
4
+ const interaction = isFirstTime ? 'first_interaction' : 'other_interactions'
5
+
6
+ const greetingsMap = {
7
+ AGENT: {
8
+ hello: 'general.greetings.hello',
9
+ firstMessage: 'general.greetings.agentFirstMessage',
10
+ description: 'general.greetings.agentDescription'
11
+ },
12
+ CONCIERGE: {
13
+ hello: `concierge.welcome.${interaction}.hello`,
14
+ firstMessage: `concierge.welcome.${interaction}.title`,
15
+ description: 'concierge.welcome.description'
16
+ },
17
+ TUTOR: {
18
+ hello: 'general.greetings.hello',
19
+ firstMessage: 'general.greetings.firstMessage',
20
+ description: 'general.greetings.description'
21
+ }
22
+ }
23
+
24
+ return greetingsMap[mode]
25
+ }
@@ -3,3 +3,8 @@ import { atom, useAtomValue } from 'jotai'
3
3
  export const widgetSettingsConfigAgentParentAtom = atom(false)
4
4
 
5
5
  export const useIsAgentParentAtomValue = () => useAtomValue(widgetSettingsConfigAgentParentAtom)
6
+
7
+ export const widgetSettingsConfigConciergeParentAtom = atom(false)
8
+
9
+ export const useIsConciergeParentAtomValue = () =>
10
+ useAtomValue(widgetSettingsConfigConciergeParentAtom)
package/src/types.ts CHANGED
@@ -65,7 +65,7 @@ export type WidgetSettingProps = {
65
65
  config?: {
66
66
  theme?: Theme
67
67
  metadata?: {
68
- parent?: 'AGENT' | 'TUTOR'
68
+ parent?: 'AGENT' | 'TUTOR' | 'CONCIERGE'
69
69
  agentProductId?: number
70
70
  agentName?: string
71
71
  courseName?: string