app-tutor-ai-consumer 1.22.3 → 1.23.0

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,10 @@
1
+ # [1.23.0](https://github.com/Hotmart-Org/app-tutor-ai-consumer/compare/v1.22.3...v1.23.0) (2025-08-11)
2
+
3
+ ### Features
4
+
5
+ - add metadata properties to widget settings and component IDs to customize on agent page ([04c244d](https://github.com/Hotmart-Org/app-tutor-ai-consumer/commit/04c244dcb4170665f6a216ce69c119e358118ef5))
6
+ - adding component id ([82b25ce](https://github.com/Hotmart-Org/app-tutor-ai-consumer/commit/82b25ce4a4974d3739dae09dc21928d5b3b78544))
7
+
1
8
  ## [1.22.3](https://github.com/Hotmart-Org/app-tutor-ai-consumer/compare/v1.22.2...v1.22.3) (2025-08-08)
2
9
 
3
10
  ## [1.22.2](https://github.com/Hotmart-Org/app-tutor-ai-consumer/compare/v1.22.1...v1.22.2) (2025-08-07)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "app-tutor-ai-consumer",
3
- "version": "1.22.3",
3
+ "version": "1.23.0",
4
4
  "main": "index.js",
5
5
  "scripts": {
6
6
  "dev": "rspack serve --env=development --config config/rspack/rspack.config.js",
@@ -42,6 +42,7 @@ function HorizontalDraggableScroll({ children, className }: HorizontalDraggableS
42
42
 
43
43
  return (
44
44
  <div
45
+ id='tutor-ai-consumer-horizontal-draggable-scroll'
45
46
  ref={containerRef}
46
47
  onMouseDown={handleMouseDown}
47
48
  onMouseMove={handleMouseMove}
@@ -36,4 +36,4 @@
36
36
  top: 50%;
37
37
  left: 96%;
38
38
  transform: translateY(-50%) rotateZ(90deg);
39
- }
39
+ }
@@ -71,7 +71,12 @@ function useSendTextMessage() {
71
71
  router: questionParam ? 'summary' : undefined,
72
72
  osVersion: browserInfo.version,
73
73
  platformDetail: browserInfo.name,
74
- ucode: settings.user?.ucode
74
+ ucode: settings.user?.ucode,
75
+ agentProductId: settings.config?.metadata?.agentProductId,
76
+ agentName: settings.config?.metadata?.agentName,
77
+ courseName: settings.config?.metadata?.courseName,
78
+ source: settings.config?.metadata?.source,
79
+ prompt: settings.config?.metadata?.promptId
75
80
  },
76
81
  externalId: v4(),
77
82
  namespace: settings.namespace,
@@ -99,7 +99,9 @@ function WidgetHeader({
99
99
  const hasToShowActions = useMemo(() => Number(actionButtons?.length) > 0, [actionButtons?.length])
100
100
 
101
101
  return (
102
- <div className='mb-4 mt-0.5 flex flex-col gap-2 text-neutral-900'>
102
+ <div
103
+ id='tutor-ai-consumer-widget-header'
104
+ className='mb-4 mt-0.5 flex flex-col gap-2 text-neutral-900'>
103
105
  <div className='flex justify-end'>
104
106
  <div className={styles.closeContainer}>
105
107
  <Button
@@ -23,7 +23,9 @@ function PageLayout({ asideChild, children, className }: PageLayoutProps) {
23
23
  {children}
24
24
  </div>
25
25
  {asideChild && (
26
- <div className='grid-area-[aside] flex-shrink-0 border-t border-t-neutral-300 px-5 py-4'>
26
+ <div
27
+ id='tutor-ai-consumer-page-layout-aside'
28
+ className='grid-area-[aside] flex-shrink-0 border-t border-t-neutral-300 px-5 py-4'>
27
29
  {asideChild}
28
30
  </div>
29
31
  )}
package/src/types.ts CHANGED
@@ -51,6 +51,14 @@ export type WidgetSettingProps = {
51
51
  classType?: ClassTypes
52
52
  config?: {
53
53
  theme?: Theme
54
+ metadata?: {
55
+ parent?: 'AGENT' | 'TUTOR'
56
+ agentProductId?: number
57
+ agentName?: string
58
+ courseName?: string
59
+ source?: string
60
+ promptId?: string
61
+ }
54
62
  }
55
63
  }
56
64