@clikvn/agent-widget-embedded 1.0.32-dev → 1.0.34-dev
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/.claude/settings.local.json +12 -0
- package/CLAUDE.md +20 -1
- package/dist/components/Chat/Chat.d.ts.map +1 -1
- package/dist/components/Chat/Message.d.ts.map +1 -1
- package/dist/components/Chat/ProductDetail.d.ts +24 -0
- package/dist/components/Chat/ProductDetail.d.ts.map +1 -1
- package/dist/components/Chat/ProductList.d.ts +2 -0
- package/dist/components/Chat/ProductList.d.ts.map +1 -1
- package/dist/components/Chat/ui/Button.d.ts +1 -1
- package/dist/constants/toolNames.d.ts +75 -0
- package/dist/constants/toolNames.d.ts.map +1 -0
- package/dist/index.html +5 -3
- package/dist/services/vt360.service.d.ts +5 -0
- package/dist/services/vt360.service.d.ts.map +1 -0
- package/dist/utils/messageUtils.d.ts +37 -0
- package/dist/utils/messageUtils.d.ts.map +1 -0
- package/dist/utils/toolUtils.d.ts +111 -0
- package/dist/utils/toolUtils.d.ts.map +1 -0
- package/dist/web.js +1 -1
- package/docs/brand-ui-command-actions-tools.md +29 -2
- package/docs/ui/product_detail_preview.png +0 -0
- package/docs/ui/products_list.png +0 -0
- package/package.json +1 -1
- package/public/index.html +11 -11
- package/tailwind.config.cjs +5 -5
|
@@ -11,13 +11,15 @@ This document defines the available command action tools that AI agents can use
|
|
|
11
11
|
**Description:** Launches an interactive guided tour with hotspot interactions for the currently viewed product.
|
|
12
12
|
|
|
13
13
|
**Parameters:**
|
|
14
|
+
|
|
14
15
|
- `product_id` (string, required): The unique identifier of the product being viewed
|
|
15
16
|
- `tour_type` (string, optional): Type of guided tour ("interactive", "auto", "manual"). Default: "interactive"
|
|
16
17
|
- `start_hotspot` (string, optional): Starting hotspot identifier. Default: first available hotspot
|
|
17
18
|
|
|
18
19
|
**Usage Context:** When user is viewing a specific product and wants detailed guided exploration with interactive hotspots.
|
|
19
20
|
|
|
20
|
-
**Expected Behavior:**
|
|
21
|
+
**Expected Behavior:**
|
|
22
|
+
|
|
21
23
|
- Initiates guided tour overlay on current product view
|
|
22
24
|
- Highlights interactive hotspots with contextual information
|
|
23
25
|
- Provides step-by-step navigation through product features
|
|
@@ -29,6 +31,7 @@ This document defines the available command action tools that AI agents can use
|
|
|
29
31
|
**Description:** Displays the currently viewed product in Augmented Reality mode, allowing users to visualize the product in their real environment.
|
|
30
32
|
|
|
31
33
|
**Parameters:**
|
|
34
|
+
|
|
32
35
|
- `product_id` (string, required): The unique identifier of the product being viewed
|
|
33
36
|
- `ar_mode` (string, optional): AR display mode ("placement", "viewer", "try_on"). Default: "placement"
|
|
34
37
|
- `scale_factor` (number, optional): Initial scale factor for AR display. Range: 0.1-5.0. Default: 1.0
|
|
@@ -36,6 +39,7 @@ This document defines the available command action tools that AI agents can use
|
|
|
36
39
|
**Usage Context:** When user wants to see how a product would look in their actual space using device camera.
|
|
37
40
|
|
|
38
41
|
**Expected Behavior:**
|
|
42
|
+
|
|
39
43
|
- Activates device camera for AR visualization
|
|
40
44
|
- Overlays 3D product model in real environment
|
|
41
45
|
- Provides controls for scaling, rotation, and positioning
|
|
@@ -47,6 +51,7 @@ This document defines the available command action tools that AI agents can use
|
|
|
47
51
|
**Description:** Shows a 360-degree interactive view of the currently viewed product, allowing full rotation and detailed inspection.
|
|
48
52
|
|
|
49
53
|
**Parameters:**
|
|
54
|
+
|
|
50
55
|
- `product_id` (string, required): The unique identifier of the product being viewed
|
|
51
56
|
- `initial_angle` (number, optional): Starting rotation angle in degrees. Range: 0-360. Default: 0
|
|
52
57
|
- `auto_rotate` (boolean, optional): Whether to automatically rotate the product. Default: false
|
|
@@ -55,6 +60,7 @@ This document defines the available command action tools that AI agents can use
|
|
|
55
60
|
**Usage Context:** When user needs comprehensive visual inspection of product from all angles.
|
|
56
61
|
|
|
57
62
|
**Expected Behavior:**
|
|
63
|
+
|
|
58
64
|
- Displays interactive 360° product viewer
|
|
59
65
|
- Enables mouse/touch drag controls for manual rotation
|
|
60
66
|
- Provides zoom capabilities for detailed inspection
|
|
@@ -66,6 +72,7 @@ This document defines the available command action tools that AI agents can use
|
|
|
66
72
|
**Description:** Opens a comprehensive image gallery for the currently viewed product, displaying multiple views, details, and lifestyle images.
|
|
67
73
|
|
|
68
74
|
**Parameters:**
|
|
75
|
+
|
|
69
76
|
- `product_id` (string, required): The unique identifier of the product being viewed
|
|
70
77
|
- `gallery_type` (string, optional): Gallery display mode ("grid", "carousel", "lightbox"). Default: "lightbox"
|
|
71
78
|
- `start_image` (number, optional): Index of initial image to display. Default: 0
|
|
@@ -74,6 +81,7 @@ This document defines the available command action tools that AI agents can use
|
|
|
74
81
|
**Usage Context:** When user wants to see all available images and details of the product in a dedicated gallery view.
|
|
75
82
|
|
|
76
83
|
**Expected Behavior:**
|
|
84
|
+
|
|
77
85
|
- Opens full-screen or modal gallery interface
|
|
78
86
|
- Displays high-resolution product images with navigation
|
|
79
87
|
- Includes zoom functionality and image metadata
|
|
@@ -85,6 +93,7 @@ This document defines the available command action tools that AI agents can use
|
|
|
85
93
|
**Description:** Displays detailed product information including specifications, pricing, availability, and related details.
|
|
86
94
|
|
|
87
95
|
**Parameters:**
|
|
96
|
+
|
|
88
97
|
- `product_id` (string, required): The unique identifier of the product being viewed
|
|
89
98
|
- `info_sections` (array, optional): Specific information sections to display. Options: ["specs", "pricing", "availability", "reviews", "related"]. Default: all sections
|
|
90
99
|
- `display_mode` (string, optional): Information display format ("panel", "modal", "inline"). Default: "panel"
|
|
@@ -92,6 +101,7 @@ This document defines the available command action tools that AI agents can use
|
|
|
92
101
|
**Usage Context:** When user needs comprehensive product details, specifications, or purchasing information.
|
|
93
102
|
|
|
94
103
|
**Expected Behavior:**
|
|
104
|
+
|
|
95
105
|
- Opens detailed product information panel or modal
|
|
96
106
|
- Displays organized sections of product data
|
|
97
107
|
- Includes interactive elements like reviews, related products
|
|
@@ -103,6 +113,7 @@ This document defines the available command action tools that AI agents can use
|
|
|
103
113
|
**Description:** Modifies the visual style/theme of the current scene/room, allowing users to see different aesthetic presentations.
|
|
104
114
|
|
|
105
115
|
**Parameters:**
|
|
116
|
+
|
|
106
117
|
- `scene_id` (string, required): The unique identifier of the current scene
|
|
107
118
|
- `style_theme` (string, required): The style theme to apply. Options: ["modern", "classic", "minimalist", "industrial", "scandinavian", "traditional"]
|
|
108
119
|
- `apply_to_products` (boolean, optional): Whether to update product materials to match style. Default: true
|
|
@@ -111,6 +122,7 @@ This document defines the available command action tools that AI agents can use
|
|
|
111
122
|
**Usage Context:** When user is in a scene and wants to explore different aesthetic styles or design themes.
|
|
112
123
|
|
|
113
124
|
**Expected Behavior:**
|
|
125
|
+
|
|
114
126
|
- Changes room colors, textures, and overall aesthetic
|
|
115
127
|
- Updates lighting to match selected style
|
|
116
128
|
- Optionally updates product finishes to complement new style
|
|
@@ -122,6 +134,7 @@ This document defines the available command action tools that AI agents can use
|
|
|
122
134
|
**Description:** Changes materials, textures, or finishes of products within the current scene.
|
|
123
135
|
|
|
124
136
|
**Parameters:**
|
|
137
|
+
|
|
125
138
|
- `scene_id` (string, required): The unique identifier of the current scene
|
|
126
139
|
- `product_id` (string, optional): Specific product to modify. If omitted, applies to all compatible products
|
|
127
140
|
- `material_type` (string, required): Material to apply. Options: ["wood", "metal", "fabric", "leather", "glass", "stone", "ceramic"]
|
|
@@ -131,6 +144,7 @@ This document defines the available command action tools that AI agents can use
|
|
|
131
144
|
**Usage Context:** When user wants to see how different materials or finishes would look on products in the scene.
|
|
132
145
|
|
|
133
146
|
**Expected Behavior:**
|
|
147
|
+
|
|
134
148
|
- Updates product materials/textures in real-time
|
|
135
149
|
- Maintains proper lighting and reflection properties
|
|
136
150
|
- Shows realistic material appearance in current lighting conditions
|
|
@@ -142,6 +156,7 @@ This document defines the available command action tools that AI agents can use
|
|
|
142
156
|
**Description:** Toggles door states (open/closed) in the virtual environment to show different spatial configurations.
|
|
143
157
|
|
|
144
158
|
**Parameters:**
|
|
159
|
+
|
|
145
160
|
- `scene_id` (string, required): The unique identifier of the current scene
|
|
146
161
|
- `door_id` (string, optional): Specific door to toggle. If omitted, cycles through available doors
|
|
147
162
|
- `action` (string, required): Door action. Options: ["open", "close", "toggle"]
|
|
@@ -150,6 +165,7 @@ This document defines the available command action tools that AI agents can use
|
|
|
150
165
|
**Usage Context:** When user is in a scene with doors/cabinets and wants to see different open/closed configurations.
|
|
151
166
|
|
|
152
167
|
**Expected Behavior:**
|
|
168
|
+
|
|
153
169
|
- Animates door opening/closing smoothly
|
|
154
170
|
- Updates interior visibility and spatial perception
|
|
155
171
|
- May reveal additional products or storage spaces
|
|
@@ -161,6 +177,7 @@ This document defines the available command action tools that AI agents can use
|
|
|
161
177
|
**Description:** Adjusts lighting conditions in the current scene to show different ambiances and times of day.
|
|
162
178
|
|
|
163
179
|
**Parameters:**
|
|
180
|
+
|
|
164
181
|
- `scene_id` (string, required): The unique identifier of the current scene
|
|
165
182
|
- `lighting_preset` (string, required): Lighting configuration. Options: ["natural_day", "natural_evening", "warm_ambient", "bright_task", "dim_mood", "spotlight"]
|
|
166
183
|
- `intensity` (number, optional): Light intensity level. Range: 0.1-2.0. Default: 1.0
|
|
@@ -169,6 +186,7 @@ This document defines the available command action tools that AI agents can use
|
|
|
169
186
|
**Usage Context:** When user wants to see how the scene and products look under different lighting conditions.
|
|
170
187
|
|
|
171
188
|
**Expected Behavior:**
|
|
189
|
+
|
|
172
190
|
- Smoothly transitions between lighting conditions
|
|
173
191
|
- Updates shadows, reflections, and material appearance
|
|
174
192
|
- Shows realistic lighting effects on all scene elements
|
|
@@ -180,6 +198,7 @@ This document defines the available command action tools that AI agents can use
|
|
|
180
198
|
**Description:** Displays a comprehensive list of all products present in the current scene with quick access options.
|
|
181
199
|
|
|
182
200
|
**Parameters:**
|
|
201
|
+
|
|
183
202
|
- `scene_id` (string, required): The unique identifier of the current scene
|
|
184
203
|
- `list_format` (string, optional): List display format. Options: ["grid", "list", "carousel"]. Default: "grid"
|
|
185
204
|
- `sort_by` (string, optional): Sorting criteria. Options: ["name", "price", "category", "popularity"]. Default: "category"
|
|
@@ -189,6 +208,7 @@ This document defines the available command action tools that AI agents can use
|
|
|
189
208
|
**Usage Context:** When user wants to see and access all products available in the current scene.
|
|
190
209
|
|
|
191
210
|
**Expected Behavior:**
|
|
211
|
+
|
|
192
212
|
- Opens organized product list interface
|
|
193
213
|
- Provides search and filtering capabilities
|
|
194
214
|
- Allows quick navigation to specific products in scene
|
|
@@ -200,6 +220,7 @@ This document defines the available command action tools that AI agents can use
|
|
|
200
220
|
**Description:** Starts an automated guided tour of the current scene, highlighting products and features with contextual information.
|
|
201
221
|
|
|
202
222
|
**Parameters:**
|
|
223
|
+
|
|
203
224
|
- `scene_id` (string, required): The unique identifier of the current scene
|
|
204
225
|
- `tour_duration` (number, optional): Approximate tour duration in seconds. Range: 30-300. Default: 120
|
|
205
226
|
- `focus_areas` (array, optional): Specific areas to highlight. Options: ["products", "features", "layout", "materials"]. Default: all areas
|
|
@@ -210,6 +231,7 @@ This document defines the available command action tools that AI agents can use
|
|
|
210
231
|
**Usage Context:** When user wants a comprehensive overview of the scene with guided exploration of key elements.
|
|
211
232
|
|
|
212
233
|
**Expected Behavior:**
|
|
234
|
+
|
|
213
235
|
- Initiates smooth camera movements around the scene
|
|
214
236
|
- Highlights important products and features with overlays
|
|
215
237
|
- Provides contextual information and interaction prompts
|
|
@@ -217,26 +239,31 @@ This document defines the available command action tools that AI agents can use
|
|
|
217
239
|
## Implementation Notes
|
|
218
240
|
|
|
219
241
|
### Parameter Validation
|
|
242
|
+
|
|
220
243
|
- All required parameters must be validated before command execution
|
|
221
244
|
- Optional parameters should use specified defaults when omitted
|
|
222
245
|
- Invalid parameter values should return descriptive error messages
|
|
223
246
|
|
|
224
247
|
### State Management
|
|
248
|
+
|
|
225
249
|
- Commands should respect current UI state and user context
|
|
226
250
|
- Multiple commands may be chained for complex interactions
|
|
227
251
|
- State changes should be reversible where applicable
|
|
228
252
|
|
|
229
253
|
### Performance Considerations
|
|
254
|
+
|
|
230
255
|
- Commands involving 3D rendering (AR, 360°) should include loading states
|
|
231
256
|
- Image-heavy operations should implement progressive loading
|
|
232
257
|
- Animations should be optimized for smooth performance
|
|
233
258
|
|
|
234
259
|
### Accessibility
|
|
260
|
+
|
|
235
261
|
- All commands should support keyboard navigation alternatives
|
|
236
262
|
- Visual changes should include appropriate ARIA labels
|
|
237
263
|
- Motion-sensitive users should have reduced animation options
|
|
238
264
|
|
|
239
265
|
### Error Handling
|
|
266
|
+
|
|
240
267
|
- Commands should gracefully handle missing resources
|
|
241
268
|
- Network-dependent features should have offline fallbacks
|
|
242
|
-
- User feedback should be provided for long-running operations
|
|
269
|
+
- User feedback should be provided for long-running operations
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
package/public/index.html
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<!doctype html>
|
|
2
2
|
<html lang="vi">
|
|
3
|
-
<head>
|
|
3
|
+
<head>
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<title>Clik Agent Widget - Dev</title>
|
|
@@ -30,25 +30,25 @@
|
|
|
30
30
|
TOUR_CODE: 'TOUR_K9EK76KTX7K4',
|
|
31
31
|
LANGUAGE: 'VN',
|
|
32
32
|
CLIK_GRAPHQL_API: 'https://api.clik.vn/graphql',
|
|
33
|
-
CLIK_VIRTUALTOUR_API: 'https://api.clik.vn/vt360'
|
|
34
|
-
}
|
|
35
|
-
}
|
|
33
|
+
CLIK_VIRTUALTOUR_API: 'https://api.clik.vn/vt360',
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
36
|
},
|
|
37
37
|
listeners: {
|
|
38
|
-
ON_LINK_CLICK: console.log
|
|
38
|
+
ON_LINK_CLICK: console.log,
|
|
39
39
|
},
|
|
40
40
|
theme: {
|
|
41
41
|
simplified: true,
|
|
42
42
|
autoCloseAudioPlayer: true,
|
|
43
|
-
hideAudioMetadata: true
|
|
43
|
+
hideAudioMetadata: true,
|
|
44
44
|
},
|
|
45
45
|
onLoaded: (tool) => {
|
|
46
46
|
window.tool = tool;
|
|
47
|
-
}
|
|
47
|
+
},
|
|
48
48
|
});
|
|
49
49
|
</script>
|
|
50
|
-
</head>
|
|
51
|
-
<body>
|
|
52
|
-
<clik-agent-widget></clik-agent-widget>
|
|
53
|
-
</body>
|
|
50
|
+
</head>
|
|
51
|
+
<body>
|
|
52
|
+
<clik-agent-widget></clik-agent-widget>
|
|
53
|
+
</body>
|
|
54
54
|
</html>
|
package/tailwind.config.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
2
2
|
const defaultTheme = require('tailwindcss/defaultTheme');
|
|
3
|
-
const plugin = require('tailwindcss/plugin')
|
|
3
|
+
const plugin = require('tailwindcss/plugin');
|
|
4
4
|
|
|
5
5
|
function rem2px(input, fontSize = 16) {
|
|
6
6
|
if (input == null) {
|
|
@@ -124,10 +124,10 @@ module.exports = {
|
|
|
124
124
|
require('@tailwindcss/typography'),
|
|
125
125
|
plugin(function ({ addVariant }) {
|
|
126
126
|
addVariant('wrapped', ({ container }) => {
|
|
127
|
-
container.walkRules(rule => {
|
|
128
|
-
rule.selector = `.clik-chatbot-wrapper ${rule.selector}
|
|
129
|
-
})
|
|
130
|
-
})
|
|
127
|
+
container.walkRules((rule) => {
|
|
128
|
+
rule.selector = `.clik-chatbot-wrapper ${rule.selector}`;
|
|
129
|
+
});
|
|
130
|
+
});
|
|
131
131
|
}),
|
|
132
132
|
],
|
|
133
133
|
};
|