@clikvn/agent-widget-embedded 1.0.31-dev → 1.0.32-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.
@@ -0,0 +1,242 @@
1
+ # UI Command Actions Tools Specification
2
+
3
+ ## Overview
4
+
5
+ This document defines the available command action tools that AI agents can use to interact with virtual tour/showroom UI interfaces. These tools enable contextual, interactive responses within virtual environments.
6
+
7
+ ## Product Display Tools
8
+
9
+ ### 1. `show_hotspot_guided_tour`
10
+
11
+ **Description:** Launches an interactive guided tour with hotspot interactions for the currently viewed product.
12
+
13
+ **Parameters:**
14
+ - `product_id` (string, required): The unique identifier of the product being viewed
15
+ - `tour_type` (string, optional): Type of guided tour ("interactive", "auto", "manual"). Default: "interactive"
16
+ - `start_hotspot` (string, optional): Starting hotspot identifier. Default: first available hotspot
17
+
18
+ **Usage Context:** When user is viewing a specific product and wants detailed guided exploration with interactive hotspots.
19
+
20
+ **Expected Behavior:**
21
+ - Initiates guided tour overlay on current product view
22
+ - Highlights interactive hotspots with contextual information
23
+ - Provides step-by-step navigation through product features
24
+
25
+ ---
26
+
27
+ ### 2. `show_product_AR`
28
+
29
+ **Description:** Displays the currently viewed product in Augmented Reality mode, allowing users to visualize the product in their real environment.
30
+
31
+ **Parameters:**
32
+ - `product_id` (string, required): The unique identifier of the product being viewed
33
+ - `ar_mode` (string, optional): AR display mode ("placement", "viewer", "try_on"). Default: "placement"
34
+ - `scale_factor` (number, optional): Initial scale factor for AR display. Range: 0.1-5.0. Default: 1.0
35
+
36
+ **Usage Context:** When user wants to see how a product would look in their actual space using device camera.
37
+
38
+ **Expected Behavior:**
39
+ - Activates device camera for AR visualization
40
+ - Overlays 3D product model in real environment
41
+ - Provides controls for scaling, rotation, and positioning
42
+
43
+ ---
44
+
45
+ ### 3. `show_product_360_image`
46
+
47
+ **Description:** Shows a 360-degree interactive view of the currently viewed product, allowing full rotation and detailed inspection.
48
+
49
+ **Parameters:**
50
+ - `product_id` (string, required): The unique identifier of the product being viewed
51
+ - `initial_angle` (number, optional): Starting rotation angle in degrees. Range: 0-360. Default: 0
52
+ - `auto_rotate` (boolean, optional): Whether to automatically rotate the product. Default: false
53
+ - `rotation_speed` (number, optional): Auto-rotation speed if enabled. Range: 1-10. Default: 3
54
+
55
+ **Usage Context:** When user needs comprehensive visual inspection of product from all angles.
56
+
57
+ **Expected Behavior:**
58
+ - Displays interactive 360° product viewer
59
+ - Enables mouse/touch drag controls for manual rotation
60
+ - Provides zoom capabilities for detailed inspection
61
+
62
+ ---
63
+
64
+ ### 4. `show_product_image_gallery`
65
+
66
+ **Description:** Opens a comprehensive image gallery for the currently viewed product, displaying multiple views, details, and lifestyle images.
67
+
68
+ **Parameters:**
69
+ - `product_id` (string, required): The unique identifier of the product being viewed
70
+ - `gallery_type` (string, optional): Gallery display mode ("grid", "carousel", "lightbox"). Default: "lightbox"
71
+ - `start_image` (number, optional): Index of initial image to display. Default: 0
72
+ - `show_thumbnails` (boolean, optional): Whether to display thumbnail navigation. Default: true
73
+
74
+ **Usage Context:** When user wants to see all available images and details of the product in a dedicated gallery view.
75
+
76
+ **Expected Behavior:**
77
+ - Opens full-screen or modal gallery interface
78
+ - Displays high-resolution product images with navigation
79
+ - Includes zoom functionality and image metadata
80
+
81
+ ---
82
+
83
+ ### 5. `show_product_info`
84
+
85
+ **Description:** Displays detailed product information including specifications, pricing, availability, and related details.
86
+
87
+ **Parameters:**
88
+ - `product_id` (string, required): The unique identifier of the product being viewed
89
+ - `info_sections` (array, optional): Specific information sections to display. Options: ["specs", "pricing", "availability", "reviews", "related"]. Default: all sections
90
+ - `display_mode` (string, optional): Information display format ("panel", "modal", "inline"). Default: "panel"
91
+
92
+ **Usage Context:** When user needs comprehensive product details, specifications, or purchasing information.
93
+
94
+ **Expected Behavior:**
95
+ - Opens detailed product information panel or modal
96
+ - Displays organized sections of product data
97
+ - Includes interactive elements like reviews, related products
98
+
99
+ ## Scene Interaction Tools
100
+
101
+ ### 6. `change_room_style`
102
+
103
+ **Description:** Modifies the visual style/theme of the current scene/room, allowing users to see different aesthetic presentations.
104
+
105
+ **Parameters:**
106
+ - `scene_id` (string, required): The unique identifier of the current scene
107
+ - `style_theme` (string, required): The style theme to apply. Options: ["modern", "classic", "minimalist", "industrial", "scandinavian", "traditional"]
108
+ - `apply_to_products` (boolean, optional): Whether to update product materials to match style. Default: true
109
+ - `transition_effect` (boolean, optional): Whether to use animated transition. Default: true
110
+
111
+ **Usage Context:** When user is in a scene and wants to explore different aesthetic styles or design themes.
112
+
113
+ **Expected Behavior:**
114
+ - Changes room colors, textures, and overall aesthetic
115
+ - Updates lighting to match selected style
116
+ - Optionally updates product finishes to complement new style
117
+
118
+ ---
119
+
120
+ ### 7. `swap_product_material`
121
+
122
+ **Description:** Changes materials, textures, or finishes of products within the current scene.
123
+
124
+ **Parameters:**
125
+ - `scene_id` (string, required): The unique identifier of the current scene
126
+ - `product_id` (string, optional): Specific product to modify. If omitted, applies to all compatible products
127
+ - `material_type` (string, required): Material to apply. Options: ["wood", "metal", "fabric", "leather", "glass", "stone", "ceramic"]
128
+ - `material_variant` (string, optional): Specific variant of the material (e.g., "oak", "mahogany" for wood)
129
+ - `finish` (string, optional): Surface finish. Options: ["matte", "glossy", "satin", "textured"]. Default: "satin"
130
+
131
+ **Usage Context:** When user wants to see how different materials or finishes would look on products in the scene.
132
+
133
+ **Expected Behavior:**
134
+ - Updates product materials/textures in real-time
135
+ - Maintains proper lighting and reflection properties
136
+ - Shows realistic material appearance in current lighting conditions
137
+
138
+ ---
139
+
140
+ ### 8. `open_close_door`
141
+
142
+ **Description:** Toggles door states (open/closed) in the virtual environment to show different spatial configurations.
143
+
144
+ **Parameters:**
145
+ - `scene_id` (string, required): The unique identifier of the current scene
146
+ - `door_id` (string, optional): Specific door to toggle. If omitted, cycles through available doors
147
+ - `action` (string, required): Door action. Options: ["open", "close", "toggle"]
148
+ - `animation_duration` (number, optional): Animation duration in milliseconds. Range: 100-2000. Default: 500
149
+
150
+ **Usage Context:** When user is in a scene with doors/cabinets and wants to see different open/closed configurations.
151
+
152
+ **Expected Behavior:**
153
+ - Animates door opening/closing smoothly
154
+ - Updates interior visibility and spatial perception
155
+ - May reveal additional products or storage spaces
156
+
157
+ ---
158
+
159
+ ### 9. `change_room_lighting`
160
+
161
+ **Description:** Adjusts lighting conditions in the current scene to show different ambiances and times of day.
162
+
163
+ **Parameters:**
164
+ - `scene_id` (string, required): The unique identifier of the current scene
165
+ - `lighting_preset` (string, required): Lighting configuration. Options: ["natural_day", "natural_evening", "warm_ambient", "bright_task", "dim_mood", "spotlight"]
166
+ - `intensity` (number, optional): Light intensity level. Range: 0.1-2.0. Default: 1.0
167
+ - `color_temperature` (number, optional): Color temperature in Kelvin. Range: 2700-6500. Default: 4000
168
+
169
+ **Usage Context:** When user wants to see how the scene and products look under different lighting conditions.
170
+
171
+ **Expected Behavior:**
172
+ - Smoothly transitions between lighting conditions
173
+ - Updates shadows, reflections, and material appearance
174
+ - Shows realistic lighting effects on all scene elements
175
+
176
+ ---
177
+
178
+ ### 10. `open_scene_product_list`
179
+
180
+ **Description:** Displays a comprehensive list of all products present in the current scene with quick access options.
181
+
182
+ **Parameters:**
183
+ - `scene_id` (string, required): The unique identifier of the current scene
184
+ - `list_format` (string, optional): List display format. Options: ["grid", "list", "carousel"]. Default: "grid"
185
+ - `sort_by` (string, optional): Sorting criteria. Options: ["name", "price", "category", "popularity"]. Default: "category"
186
+ - `show_details` (boolean, optional): Whether to show product details in list. Default: true
187
+ - `enable_filtering` (boolean, optional): Whether to enable category/price filtering. Default: true
188
+
189
+ **Usage Context:** When user wants to see and access all products available in the current scene.
190
+
191
+ **Expected Behavior:**
192
+ - Opens organized product list interface
193
+ - Provides search and filtering capabilities
194
+ - Allows quick navigation to specific products in scene
195
+
196
+ ---
197
+
198
+ ### 11. `play_scene_guided_tour`
199
+
200
+ **Description:** Starts an automated guided tour of the current scene, highlighting products and features with contextual information.
201
+
202
+ **Parameters:**
203
+ - `scene_id` (string, required): The unique identifier of the current scene
204
+ - `tour_duration` (number, optional): Approximate tour duration in seconds. Range: 30-300. Default: 120
205
+ - `focus_areas` (array, optional): Specific areas to highlight. Options: ["products", "features", "layout", "materials"]. Default: all areas
206
+ - `narration` (boolean, optional): Whether to include audio narration. Default: false
207
+ - `auto_advance` (boolean, optional): Whether to automatically advance between points. Default: true
208
+ - `interaction_level` (string, optional): Level of interactivity. Options: ["passive", "interactive", "explorative"]. Default: "interactive"
209
+
210
+ **Usage Context:** When user wants a comprehensive overview of the scene with guided exploration of key elements.
211
+
212
+ **Expected Behavior:**
213
+ - Initiates smooth camera movements around the scene
214
+ - Highlights important products and features with overlays
215
+ - Provides contextual information and interaction prompts
216
+
217
+ ## Implementation Notes
218
+
219
+ ### Parameter Validation
220
+ - All required parameters must be validated before command execution
221
+ - Optional parameters should use specified defaults when omitted
222
+ - Invalid parameter values should return descriptive error messages
223
+
224
+ ### State Management
225
+ - Commands should respect current UI state and user context
226
+ - Multiple commands may be chained for complex interactions
227
+ - State changes should be reversible where applicable
228
+
229
+ ### Performance Considerations
230
+ - Commands involving 3D rendering (AR, 360°) should include loading states
231
+ - Image-heavy operations should implement progressive loading
232
+ - Animations should be optimized for smooth performance
233
+
234
+ ### Accessibility
235
+ - All commands should support keyboard navigation alternatives
236
+ - Visual changes should include appropriate ARIA labels
237
+ - Motion-sensitive users should have reduced animation options
238
+
239
+ ### Error Handling
240
+ - Commands should gracefully handle missing resources
241
+ - Network-dependent features should have offline fallbacks
242
+ - User feedback should be provided for long-running operations
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@clikvn/agent-widget-embedded",
3
3
  "description": "This is agent widget",
4
- "version": "1.0.31-dev",
4
+ "version": "1.0.32-dev",
5
5
  "author": "Clik JSC",
6
6
  "license": "ISC",
7
7
  "type": "module",
@@ -1,108 +0,0 @@
1
- <!doctype html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8" />
5
- <title></title>
6
- <script type="module">
7
- import Agent from 'http://localhost:3000/web.js'; // Change to from './web.js' to 'https://localhost:5678/web.js'
8
- Agent.initWidget({
9
- apiHost: 'http://localhost:8085/chatbot',
10
- agentId: '6d02b23f-465f-44ec-8766-27a82890a9b8',
11
- theme: {
12
- input: {
13
- placeholder: 'Tin nhắn...',
14
- },
15
- overview: {
16
- title: 'Van Mieu, Quoc Tu Giam',
17
- description:
18
- 'Your personal AI tutor by Khan Academy! Im Khanmigo Lite - here to help you with math, science, and humanities and questions.',
19
- },
20
- header: {
21
- title: 'tung test',
22
- },
23
- language: {
24
- code: 'global',
25
- options: [
26
- {
27
- name: 'en',
28
- code: 'global',
29
- },
30
- {
31
- name: 'vi',
32
- code: 'vi',
33
- },
34
- {
35
- name: 'us',
36
- code: 'en',
37
- },
38
- {
39
- name: 'jp',
40
- code: 'jp',
41
- },
42
- {
43
- name: 'kr',
44
- code: 'kr',
45
- },
46
- {
47
- name: 'cn',
48
- code: 'cn',
49
- },
50
- {
51
- name: 'th',
52
- code: 'th',
53
- },
54
- {
55
- name: 'tw',
56
- code: 'tw',
57
- },
58
- {
59
- name: 'sg',
60
- code: 'sg',
61
- },
62
- {
63
- name: 'my',
64
- code: 'my',
65
- },
66
- {
67
- name: 'kh',
68
- code: 'kh',
69
- },
70
- {
71
- name: 'au',
72
- code: 'au',
73
- },
74
- ],
75
- },
76
- },
77
- overrideConfig: {
78
- // chatId: '14342fe3-8991-4a67-afea-b1c4266da82b',
79
- chatId: 'f547e5e3-363f-425c-adc1-7f618330d551',
80
- overrideConfig: {
81
- vars: {
82
- POI_CODE: 'MLI_VKLVVAJEFHLH',
83
- LANGUAGE: 'US',
84
- },
85
- },
86
- // suggestedActions: [
87
- // {
88
- // title: 'How are you?',
89
- // label: 'are you?',
90
- // action: 'How are you?'
91
- // }
92
- // ]
93
- },
94
- });
95
- </script>
96
- <style>
97
- .chatbox {
98
- width: 100%;
99
- height: 100vh;
100
- }
101
- </style>
102
- </head>
103
- <body>
104
- <div class="chatbox">
105
- <clik-agent-widget></clik-agent-widget>
106
- </div>
107
- </body>
108
- </html>