app-tutor-ai-consumer 1.48.0 → 1.52.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/.github/workflows/quality.yml +0 -1
- package/CHANGELOG.md +36 -0
- package/package.json +10 -10
- package/src/modules/messages/hooks/use-send-first-message/use-send-first-message.spec.tsx +10 -2
- package/src/modules/messages/hooks/use-send-first-message/use-send-first-message.tsx +6 -2
- package/src/modules/messages/hooks/use-send-text-message/use-send-text-message.spec.tsx +1 -1
- package/src/modules/messages/hooks/use-send-text-message/use-send-text-message.tsx +1 -1
- package/src/modules/widget/store/widget-settings.atom.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,39 @@
|
|
|
1
|
+
# [1.52.0](https://github.com/Hotmart-Org/app-tutor-ai-consumer/compare/v1.51.0...v1.52.0) (2026-01-19)
|
|
2
|
+
|
|
3
|
+
### Features
|
|
4
|
+
|
|
5
|
+
- send sessionId on tutor send message ([aac00a7](https://github.com/Hotmart-Org/app-tutor-ai-consumer/commit/aac00a7eda569b90b90ea3947e3b7a7bbeab37c7))
|
|
6
|
+
|
|
7
|
+
# [1.51.0](https://github.com/Hotmart-Org/app-tutor-ai-consumer/compare/v1.50.0...v1.51.0) (2026-01-13)
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
- update some dependencies ([034b34d](https://github.com/Hotmart-Org/app-tutor-ai-consumer/commit/034b34d3e17ed832ef2653b2aa0a7e8dac654ff6))
|
|
12
|
+
|
|
13
|
+
# [1.50.0](https://github.com/Hotmart-Org/app-tutor-ai-consumer/compare/v1.49.1...v1.50.0) (2026-01-07)
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
- update lock ([dd908e7](https://github.com/Hotmart-Org/app-tutor-ai-consumer/commit/dd908e72794afcaca83ca92452533bb1ba6ac4a0))
|
|
18
|
+
|
|
19
|
+
## [1.49.1](https://github.com/Hotmart-Org/app-tutor-ai-consumer/compare/v1.49.0...v1.49.1) (2026-01-07)
|
|
20
|
+
|
|
21
|
+
### Bug Fixes
|
|
22
|
+
|
|
23
|
+
- eslint ([8c4d8f6](https://github.com/Hotmart-Org/app-tutor-ai-consumer/commit/8c4d8f6572de29bbd43c90a86fd0de6798f054a4))
|
|
24
|
+
|
|
25
|
+
# [1.49.0](https://github.com/Hotmart-Org/app-tutor-ai-consumer/compare/v1.48.1...v1.49.0) (2026-01-07)
|
|
26
|
+
|
|
27
|
+
### Features
|
|
28
|
+
|
|
29
|
+
- update lock ([7fb3166](https://github.com/Hotmart-Org/app-tutor-ai-consumer/commit/7fb31662317f0d5ec06a5fe201ce4482fa77d6ab))
|
|
30
|
+
|
|
31
|
+
## [1.48.1](https://github.com/Hotmart-Org/app-tutor-ai-consumer/compare/v1.48.0...v1.48.1) (2026-01-06)
|
|
32
|
+
|
|
33
|
+
### Bug Fixes
|
|
34
|
+
|
|
35
|
+
- productId ([66d4a7d](https://github.com/Hotmart-Org/app-tutor-ai-consumer/commit/66d4a7d3cd60e7f826e32f64be45b061334f7844))
|
|
36
|
+
|
|
1
37
|
# [1.48.0](https://github.com/Hotmart-Org/app-tutor-ai-consumer/compare/v1.47.0...v1.48.0) (2026-01-05)
|
|
2
38
|
|
|
3
39
|
### Features
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "app-tutor-ai-consumer",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.52.0",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"dev": "rspack serve --env=development --config config/rspack/rspack.config.js",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"@eslint/js": "~9.28.0",
|
|
40
40
|
"@hotmart/api-languages-cli": "~2.0.5",
|
|
41
41
|
"@rsbuild/plugin-svgr": "~1.2.0",
|
|
42
|
-
"@rsdoctor/rspack-plugin": "~1.
|
|
42
|
+
"@rsdoctor/rspack-plugin": "~1.4.0",
|
|
43
43
|
"@rspack/cli": "~1.3.15",
|
|
44
44
|
"@rspack/core": "~1.3.15",
|
|
45
45
|
"@rspack/plugin-react-refresh": "~1.4.3",
|
|
@@ -59,8 +59,8 @@
|
|
|
59
59
|
"@types/chance": "~1.1.6",
|
|
60
60
|
"@types/linkify-it": "~5.0.0",
|
|
61
61
|
"@types/node": "~24.0.0",
|
|
62
|
-
"@types/react": "~19.
|
|
63
|
-
"@types/react-dom": "~19.
|
|
62
|
+
"@types/react": "~19.2.8",
|
|
63
|
+
"@types/react-dom": "~19.2.3",
|
|
64
64
|
"@types/react-router-dom": "~5.3.3",
|
|
65
65
|
"@types/ua-parser-js": "~0.7.39",
|
|
66
66
|
"@types/uuid": "~10.0.0",
|
|
@@ -73,9 +73,9 @@
|
|
|
73
73
|
"compression-webpack-plugin": "~11.1.0",
|
|
74
74
|
"css-loader": "~7.1.2",
|
|
75
75
|
"dotenv": "~16.5.0",
|
|
76
|
-
"eslint": "~9.
|
|
77
|
-
"eslint-config-prettier": "~10.1.
|
|
78
|
-
"eslint-plugin-prettier": "~5.4
|
|
76
|
+
"eslint": "~9.39.2",
|
|
77
|
+
"eslint-config-prettier": "~10.1.8",
|
|
78
|
+
"eslint-plugin-prettier": "~5.5.4",
|
|
79
79
|
"eslint-plugin-react": "~7.37.5",
|
|
80
80
|
"eslint-plugin-react-hooks": "~5.2.0",
|
|
81
81
|
"eslint-plugin-simple-import-sort": "~12.1.1",
|
|
@@ -83,13 +83,13 @@
|
|
|
83
83
|
"globals": "~16.2.0",
|
|
84
84
|
"husky": "~9.1.7",
|
|
85
85
|
"jsdom": "~26.1.0",
|
|
86
|
-
"lint-staged": "~16.
|
|
86
|
+
"lint-staged": "~16.2.7",
|
|
87
87
|
"loader": "~2.1.1",
|
|
88
88
|
"msw": "~2.10.2",
|
|
89
|
-
"postcss": "~8.5.
|
|
89
|
+
"postcss": "~8.5.6",
|
|
90
90
|
"postcss-import": "~16.1.0",
|
|
91
91
|
"postcss-loader": "~8.1.1",
|
|
92
|
-
"prettier": "~3.
|
|
92
|
+
"prettier": "~3.7.4",
|
|
93
93
|
"prettier-plugin-tailwindcss": "~0.6.12",
|
|
94
94
|
"process": "~0.11.10",
|
|
95
95
|
"react-refresh": "~0.17.0",
|
|
@@ -53,7 +53,15 @@ describe('useSendFirstMessage', () => {
|
|
|
53
53
|
it('should send message and update conversation title', async () => {
|
|
54
54
|
vi.mocked(useWidgetSettingsAtomValue).mockReturnValue({
|
|
55
55
|
conversationId: 'conv-123',
|
|
56
|
-
productId: 'prod-456'
|
|
56
|
+
productId: 'prod-456',
|
|
57
|
+
config: {
|
|
58
|
+
metadata: {
|
|
59
|
+
agentProductId: 'agent-prod-42',
|
|
60
|
+
agentName: 'Agent Name',
|
|
61
|
+
courseName: 'Course Name',
|
|
62
|
+
source: 'Source'
|
|
63
|
+
}
|
|
64
|
+
}
|
|
57
65
|
} as never)
|
|
58
66
|
const mockMessage = { id: 'msg-1', content: 'Hello' }
|
|
59
67
|
mockSendMessage.mockResolvedValue(mockMessage)
|
|
@@ -66,7 +74,7 @@ describe('useSendFirstMessage', () => {
|
|
|
66
74
|
expect(mockSendMessage).toHaveBeenCalledWith('Hello world', undefined)
|
|
67
75
|
expect(mockUpdateTitle).toHaveBeenCalledWith({
|
|
68
76
|
conversationId: 'conv-123',
|
|
69
|
-
productId: 'prod-
|
|
77
|
+
productId: 'agent-prod-42',
|
|
70
78
|
subject: 'Hello world'
|
|
71
79
|
})
|
|
72
80
|
})
|
|
@@ -21,10 +21,14 @@ function useSendFirstMessage() {
|
|
|
21
21
|
try {
|
|
22
22
|
const messageResult = await sendMessageMutation.mutateAsync(message, options)
|
|
23
23
|
|
|
24
|
-
if (
|
|
24
|
+
if (
|
|
25
|
+
isFirstMessage &&
|
|
26
|
+
settings?.conversationId &&
|
|
27
|
+
settings?.config?.metadata?.agentProductId
|
|
28
|
+
) {
|
|
25
29
|
await updateTitleMutation.mutateAsync({
|
|
26
30
|
conversationId: settings.conversationId,
|
|
27
|
-
productId: settings
|
|
31
|
+
productId: settings?.config?.metadata?.agentProductId,
|
|
28
32
|
subject: excerptMessage({ message })
|
|
29
33
|
})
|
|
30
34
|
}
|
|
@@ -123,7 +123,7 @@ describe('useSendTextMessage', () => {
|
|
|
123
123
|
},
|
|
124
124
|
externalId: expect.any(String),
|
|
125
125
|
namespace: defaultSettings.namespace,
|
|
126
|
-
sessionId: defaultSettings.
|
|
126
|
+
sessionId: defaultSettings.sessionId,
|
|
127
127
|
userId: String(getProfileMock.data.userId)
|
|
128
128
|
}
|
|
129
129
|
}
|
|
@@ -11,4 +11,4 @@ export const setWidgetSettingsAtom = atom(
|
|
|
11
11
|
|
|
12
12
|
export const useWidgetSettingsAtom = () => useAtom(setWidgetSettingsAtom)
|
|
13
13
|
|
|
14
|
-
export const useWidgetSettingsAtomValue = () => useAtomValue(
|
|
14
|
+
export const useWidgetSettingsAtomValue = () => useAtomValue(widgetSettingsAtom)
|