@tencent-rtc/mcp 1.3.0 โ 1.3.2
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/index.js +4 -0
- package/index.js.map +1 -1
- package/package.json +2 -2
- package/resource/doc/chatuikit/faq/web_sdk/faq.md +125 -0
- package/resource/doc/chatuikit/flutter/faq.md +17 -114
- package/resource/doc/chatuikit/flutter/integrate_tuikit_Flutter.md +86 -722
- package/resource/doc/chatuikit/react/integration.md +430 -49
- package/resource/doc/chatuikit/react/workflow.md +258 -0
- package/resource/doc/chatuikit/vue/integration.md +355 -144
- package/resource/doc/chatuikit/vue/workflow.md +395 -0
- package/resource/doc/roomkit/vue/features/call-user-to-room.md +256 -0
- package/resource/doc/roomkit/vue/features/device-detection.md +388 -0
- package/resource/doc/roomkit/vue/features/device-state.md +480 -0
- package/resource/doc/roomkit/vue/features/free-beauty-panel.md +238 -0
- package/resource/doc/roomkit/vue/features/room-chat.md +427 -0
- package/resource/doc/roomkit/vue/features/room-participant-state.md +407 -0
- package/resource/doc/roomkit/vue/features/room-state.md +291 -0
- package/resource/doc/roomkit/vue/features/room-view.md +338 -0
- package/resource/doc/roomkit/vue/features/schedule-room.md +349 -0
- package/resource/doc/roomkit/vue/features/screen-share.md +333 -0
- package/resource/doc/roomkit/vue/features/virtual-background.md +287 -0
- package/resource/doc/roomkit/vue/features/workflow.md +553 -0
- package/resource/doc/roomkit/vue/integration.md +479 -0
- package/resource/doc/roomkit/vue/workflow.md +487 -0
- package/resource/doc/tuicallkit/react/api.md +21 -0
- package/resource/doc/tuicallkit/vue/api.md +21 -0
- package/tools/chat/get-web-chat-integration.js +31 -14
- package/tools/chat/get-web-chat-integration.js.map +1 -1
- package/tools/definitions/get_web_chat_uikit_integration_def.js +19 -12
- package/tools/definitions/get_web_chat_uikit_integration_def.js.map +1 -1
- package/tools/definitions/get_web_room_feature_detail_def.js +95 -0
- package/tools/definitions/get_web_room_feature_detail_def.js.map +1 -0
- package/tools/definitions/get_web_room_uikit_integration_def.js +44 -0
- package/tools/definitions/get_web_room_uikit_integration_def.js.map +1 -0
- package/tools/index.js +4 -4
- package/tools/index.js.map +1 -1
- package/tools/live/get-web-live-uikit-integration.js +1 -1
- package/tools/room/get-web-room-feature-detail.js +68 -0
- package/tools/room/get-web-room-feature-detail.js.map +1 -0
- package/tools/room/get-web-room-integration.js +43 -0
- package/tools/room/get-web-room-integration.js.map +1 -0
- package/utils/generate-structured-result.js +2 -2
- package/utils/generate-structured-result.js.map +1 -1
- package/utils/report-cls-client.js +1 -1
- package/utils/report-es-client.js +1 -1
- package/resource/doc/chatuikit/flutter/integrate_only_tuichat_Flutter.md +0 -333
- package/resource/doc/chatuikit/flutter/quick_start_Flutter.md +0 -217
- package/resource/doc/chatuikit/react/chat_window_integration.md +0 -94
- package/resource/doc/chatuikit/vue/chat_window_integration.md +0 -156
- package/resource/doc/roomkit/vue/states/device-state.md +0 -369
- package/resource/doc/roomkit/vue/states/login-state.md +0 -59
- package/resource/doc/roomkit/vue/states/room-list-state.md +0 -355
- package/resource/doc/roomkit/vue/states/room-participant-state.md +0 -388
- package/tools/chat/get-web-chat-window-integration.js +0 -28
- package/tools/chat/get-web-chat-window-integration.js.map +0 -1
- package/tools/definitions/get_web_chat_window_integration_def.js +0 -26
- package/tools/definitions/get_web_chat_window_integration_def.js.map +0 -1
- package/tools/room/get-web-room-state-detail.js +0 -31
- package/tools/room/get-web-room-state-detail.js.map +0 -1
|
@@ -0,0 +1,487 @@
|
|
|
1
|
+
# Vue TUIRoomKit (Atomicx Version) Code Generation Workflow Instructions
|
|
2
|
+
|
|
3
|
+
## ๐ Instruction Purpose
|
|
4
|
+
|
|
5
|
+
Provide Agents with a **code generation blueprint for implementing Vue TUIRoomKit (Atomicx version) core features**, and guide Agents to **prioritize using real-time documentation content obtained from tools**, specifically for PC-side Vue3 audio/video meeting application scenarios.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## ๐ Agent Execution Hard Constraints (Guardrails)
|
|
10
|
+
|
|
11
|
+
Agents must strictly follow these instructions when generating code:
|
|
12
|
+
|
|
13
|
+
### 1. Documentation-Driven Integration
|
|
14
|
+
- Must strictly follow the steps in `llm_code_generation_instructions_md` from the tool return results
|
|
15
|
+
- **Must strictly generate code according to example code in integration documentation**, do not modify code structure and implementation methods without authorization
|
|
16
|
+
- Code generation should fully follow best practices and examples provided in integration documentation to ensure code correctness and runnability
|
|
17
|
+
|
|
18
|
+
### 2. Source Code Integration Method
|
|
19
|
+
- TUIRoomKit (Atomicx version) uses **source code integration method**, requires cloning from GitHub and copying core source code files
|
|
20
|
+
- Must follow documentation guidance to copy specified source code folders (assets, components, hooks, i18n, utils, config, views) to user project
|
|
21
|
+
- When copying, must ensure merging with existing folders in user project, avoid direct overwriting
|
|
22
|
+
|
|
23
|
+
### 3. Silent Integration Execution
|
|
24
|
+
- After all code is written, automatically install dependencies and start project in the final step
|
|
25
|
+
- After successful startup, prompt user to access local development server address in browser
|
|
26
|
+
|
|
27
|
+
### 4. Zero External Configuration (Testing Phase)
|
|
28
|
+
- Prohibit automatically creating any `.env` files for production environment configuration
|
|
29
|
+
- Critical credentials such as SDKAppID and SDKSecretKey must be read from MCP environment variables and directly configured in `src/config/basic-info-config.js`
|
|
30
|
+
|
|
31
|
+
### 5. Authentication Credential Configuration
|
|
32
|
+
- Read `SDKAppID` and `SDKSecretKey` from MCP environment variables, prohibit requiring user manual input
|
|
33
|
+
- UserID generation should be kept simple (can use random number generation, such as `user_${Math.ceil(Math.random()*999)}`)
|
|
34
|
+
- **โ ๏ธ Important Security Warning**: Must inform users that client-side UserSig generation is only suitable for local testing, production environment must generate UserSig on server side
|
|
35
|
+
|
|
36
|
+
### 6. Vue 3 Composition API
|
|
37
|
+
- Prioritize using `<script setup lang="ts">` syntax (note enabling TypeScript)
|
|
38
|
+
- Use Vue 3 Composition API (ref, reactive, computed, onMounted, etc.)
|
|
39
|
+
- Correctly import and use TUIRoomKit Atomicx components
|
|
40
|
+
|
|
41
|
+
### 7. Route Configuration
|
|
42
|
+
- Must configure Vue Router, map `home.vue` to homepage (path: `/home`), map `room.vue` to meeting room page (path: `/room`)
|
|
43
|
+
- Default root path redirects to `/home`
|
|
44
|
+
|
|
45
|
+
### 8. Environment Dependency Preparation
|
|
46
|
+
- Ensure user project supports TypeScript and SCSS, if not installed need to automatically install `typescript` and `sass` development dependencies
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## ๐ฆ TUIRoomKit Version & Dependency Automation
|
|
51
|
+
|
|
52
|
+
After Agent generates code, must automatically execute the following dependency chain:
|
|
53
|
+
|
|
54
|
+
### 1. Core Dependency Version Recommendations
|
|
55
|
+
|
|
56
|
+
```json
|
|
57
|
+
{
|
|
58
|
+
"tuikit-atomicx-vue3": "latest", // TUIRoomKit atomized component library (includes all Hooks and UI components, will automatically install tuiroom-engine-js)
|
|
59
|
+
"@tencentcloud/uikit-base-component-vue3": "latest", // Base UI component library (buttons, input boxes and other common components)
|
|
60
|
+
"@tencentcloud/tuiroom-engine-js": "latest", // TRTC audio/video engine SDK (underlying capabilities)
|
|
61
|
+
"vue-router": "^4.0.0" // Vue Router (for page navigation)
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
**Dependency Description**:
|
|
66
|
+
|
|
67
|
+
| Dependency Package | Purpose | Manual Installation Required | Description |
|
|
68
|
+
|-------|------|----------------|------|
|
|
69
|
+
| **tuikit-atomicx-vue3** | TUIRoomKit core package | โ
Required | Contains all atomized Hooks (useLoginState, useRoomState, useDeviceState, etc.) and atomized UI components (RoomLayoutView, ParticipantViewUI, etc.). Will automatically install `@tencentcloud/tuiroom-engine-js` as dependency |
|
|
70
|
+
| **@tencentcloud/uikit-base-component-vue3** | Base UI component library | โ
Required | Provides common buttons, input boxes, dialogs and other base components, used internally by TUIRoomKit atomized components |
|
|
71
|
+
| **@tencentcloud/tuiroom-engine-js** | TRTC audio/video engine SDK | โ ๏ธ Optional | Provides underlying audio/video capabilities (device management, audio/video capture, push/pull stream, etc.). Since `tuikit-atomicx-vue3` will automatically install this dependency, usually no manual installation needed. But if version consistency is required, can manually specify version |
|
|
72
|
+
| **vue-router** | Vue official routing library | โ
Required | Used to implement route navigation between meeting entry page (`/home`) and meeting room page (`/room`) |
|
|
73
|
+
|
|
74
|
+
**Dependency Relationships**:
|
|
75
|
+
```
|
|
76
|
+
User Project
|
|
77
|
+
โโโ tuikit-atomicx-vue3 (manual install)
|
|
78
|
+
โ โโโ @tencentcloud/tuiroom-engine-js (auto install)
|
|
79
|
+
โโโ @tencentcloud/uikit-base-component-vue3 (manual install)
|
|
80
|
+
โโโ vue-router (manual install)
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
**Best Practices**:
|
|
84
|
+
- โ
**Recommended**: Only manually install `tuikit-atomicx-vue3`, `@tencentcloud/uikit-base-component-vue3`, `vue-router`, let `@tencentcloud/tuiroom-engine-js` auto-install
|
|
85
|
+
- โ ๏ธ **Optional**: If precise control of `@tencentcloud/tuiroom-engine-js` version is needed, can manually install and specify version number
|
|
86
|
+
- โ **Not Recommended**: Specifying different versions of `@tencentcloud/tuiroom-engine-js` in both `dependencies` and manual installation may cause version conflicts
|
|
87
|
+
|
|
88
|
+
### 2. Development Environment Dependencies (TypeScript and SCSS)
|
|
89
|
+
|
|
90
|
+
If user project does not yet support TypeScript and SCSS, Agent must automatically install:
|
|
91
|
+
|
|
92
|
+
```json
|
|
93
|
+
{
|
|
94
|
+
"typescript": "latest", // TypeScript compiler (for type checking and compilation)
|
|
95
|
+
"sass": "latest" // SCSS preprocessor (for compiling .scss style files)
|
|
96
|
+
}
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
**Dependency Description**:
|
|
100
|
+
- **typescript**: TUIRoomKit source code is written in TypeScript, requires TypeScript compiler support
|
|
101
|
+
- **sass**: TUIRoomKit style files are written in SCSS, requires sass preprocessor for compilation
|
|
102
|
+
|
|
103
|
+
### 3. Build Environment Patch (Vite/esbuild)
|
|
104
|
+
|
|
105
|
+
If Vite project is detected, Agent must automatically add patch configuration in `package.json` for esbuild-wasm compatibility:
|
|
106
|
+
|
|
107
|
+
```json
|
|
108
|
+
{
|
|
109
|
+
"overrides": {
|
|
110
|
+
"esbuild": "npm:esbuild-wasm@latest" // npm uses this field to override dependency version
|
|
111
|
+
},
|
|
112
|
+
"resolutions": {
|
|
113
|
+
"esbuild": "npm:esbuild-wasm@latest" // yarn/pnpm uses this field to override dependency version
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
**Patch Description**:
|
|
119
|
+
- **Why needed**: In some environments, esbuild native binary may not run properly, using esbuild-wasm (WebAssembly version) can provide better cross-platform compatibility
|
|
120
|
+
- **Applicable scenarios**: Mainly for projects using Vite build tool
|
|
121
|
+
- **Purpose**: Force replace all esbuild versions in project dependencies with esbuild-wasm version
|
|
122
|
+
|
|
123
|
+
**Installation Command Examples**:
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
# npm
|
|
127
|
+
npm install tuikit-atomicx-vue3 @tencentcloud/uikit-base-component-vue3 @tencentcloud/tuiroom-engine-js vue-router
|
|
128
|
+
npm install typescript sass -D
|
|
129
|
+
|
|
130
|
+
# pnpm
|
|
131
|
+
pnpm install tuikit-atomicx-vue3 @tencentcloud/uikit-base-component-vue3 @tencentcloud/tuiroom-engine-js vue-router
|
|
132
|
+
pnpm install typescript sass -D
|
|
133
|
+
|
|
134
|
+
# yarn
|
|
135
|
+
yarn add tuikit-atomicx-vue3 @tencentcloud/uikit-base-component-vue3 @tencentcloud/tuiroom-engine-js vue-router
|
|
136
|
+
yarn add typescript sass -D
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
## ๐๏ธ Source Code File Copy Structure
|
|
142
|
+
|
|
143
|
+
Agent must follow the following structure to copy core source code from sample project to user project:
|
|
144
|
+
|
|
145
|
+
| Source Path (Sample Project) | Target Path (User Project) | Description |
|
|
146
|
+
|------------------|-------------------|------|
|
|
147
|
+
| `src/assets/` | `src/assets/` | Contains background images, icons and other static resources |
|
|
148
|
+
| `src/components/` | `src/components/` | Contains all TUIRoomKit atomic UI components |
|
|
149
|
+
| `src/hooks/` | `src/hooks/` | Contains TUIRoomKit business logic processing |
|
|
150
|
+
| `src/i18n/` | `src/i18n/` | Contains multi-language configuration files |
|
|
151
|
+
| `src/utils/` | `src/utils/` | Contains common utility functions |
|
|
152
|
+
| `src/config/` | `src/config/` | Contains `basic-info-config.js` and other application configuration information (focus on this file for first-time integration) |
|
|
153
|
+
| `src/views/home.vue` | `src/views/home.vue` | This page contains device detection, room creation/join entry features |
|
|
154
|
+
| `src/views/room.vue` | `src/views/room.vue` | This page is the core meeting interface of TUIRoomKit, integrating complete header, video layout, control bar and sidebar panels |
|
|
155
|
+
|
|
156
|
+
> **Important Note**: When copying source code files, please ensure **merging** with existing folders in user project, avoid directly overwriting existing folders with same names.
|
|
157
|
+
|
|
158
|
+
---
|
|
159
|
+
|
|
160
|
+
## ๐ฏ TUIRoomKit (Atomicx Version) Core Component Description
|
|
161
|
+
|
|
162
|
+
When generating code, Agent must understand the core architecture of TUIRoomKit Atomicx:
|
|
163
|
+
|
|
164
|
+
### Atomized Component Design Philosophy
|
|
165
|
+
|
|
166
|
+
TUIRoomKit (Atomicx version) adopts atomized component design, developers can flexibly combine these components to build personalized meeting interfaces.
|
|
167
|
+
|
|
168
|
+
### Core Page Components
|
|
169
|
+
|
|
170
|
+
| Component Name | Description | Usage Scenario |
|
|
171
|
+
|---------|------|---------|
|
|
172
|
+
| `home.vue` | Meeting entry page | Contains device detection, room creation/join features |
|
|
173
|
+
| `room.vue` | Meeting room core page | Integrates complete header, video layout, control bar and sidebar panels |
|
|
174
|
+
|
|
175
|
+
### Core Hooks
|
|
176
|
+
|
|
177
|
+
| Hook Name | Description | Main Purpose |
|
|
178
|
+
|---------|------|---------|
|
|
179
|
+
| `useLoginState` | Login state management | Provides login, setSelfInfo and other methods |
|
|
180
|
+
| `useRoomModal` | Room modal management | Provides handleErrorWithModal error handling method |
|
|
181
|
+
| `useRoomEngine` | Room engine management | Get roomEngine instance |
|
|
182
|
+
|
|
183
|
+
### Core UI Components (from tuikit-atomicx-vue3)
|
|
184
|
+
|
|
185
|
+
- **RoomLayoutView**: Video stream layout component (supports grid, sidebar, top bar three layouts)
|
|
186
|
+
- **ParticipantViewUI**: Video stream widget component (customizable)
|
|
187
|
+
- **UIKitProvider**: Global UI configuration component (theme, language)
|
|
188
|
+
|
|
189
|
+
---
|
|
190
|
+
|
|
191
|
+
## ๐ ๏ธ Detailed Integration Steps
|
|
192
|
+
|
|
193
|
+
Agent must follow these steps to execute integration:
|
|
194
|
+
|
|
195
|
+
### Step 1: Clone GitHub Repository and Copy Source Code
|
|
196
|
+
|
|
197
|
+
```bash
|
|
198
|
+
# Clone TUIRoomKit repository
|
|
199
|
+
git clone https://github.com/Tencent-RTC/TUIRoomKit.git --depth=1
|
|
200
|
+
|
|
201
|
+
# Enter PC-side Vue3 Atomicx sample directory
|
|
202
|
+
cd TUIRoomKit/Web/example/atomicx-vite-vue3-ts
|
|
203
|
+
|
|
204
|
+
# Copy core source code files to user project
|
|
205
|
+
# (Note: Need to merge with existing folders in user project, not directly overwrite)
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
**Agent Execution Notes**:
|
|
209
|
+
- If folders with same names already exist in user project, must perform intelligent merging
|
|
210
|
+
- Must not overwrite user's existing business code
|
|
211
|
+
|
|
212
|
+
---
|
|
213
|
+
|
|
214
|
+
### Step 2: Install Project Dependencies
|
|
215
|
+
|
|
216
|
+
```bash
|
|
217
|
+
# Install core dependencies
|
|
218
|
+
npm install tuikit-atomicx-vue3 @tencentcloud/uikit-base-component-vue3 @tencentcloud/tuiroom-engine-js vue-router
|
|
219
|
+
|
|
220
|
+
# Install development environment dependencies (if user project does not yet support TypeScript and SCSS)
|
|
221
|
+
npm install typescript sass -S -D
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
---
|
|
225
|
+
|
|
226
|
+
### Step 3: Configure Page Routes
|
|
227
|
+
|
|
228
|
+
Configure or update `src/router/index.ts` file in user project.
|
|
229
|
+
|
|
230
|
+
**Key Configuration Points**:
|
|
231
|
+
- Configure `/home` route: Map to `home.vue` page (meeting entry)
|
|
232
|
+
- Configure `/room` route: Map to `room.vue` page (meeting room)
|
|
233
|
+
- Default root path `/` redirects to `/home`
|
|
234
|
+
|
|
235
|
+
**Agent Execution Requirements**:
|
|
236
|
+
- โ ๏ธ Must strictly generate according to route configuration examples in integration documentation
|
|
237
|
+
- If `src/router/index.ts` file already exists in user project, need to **merge** route configuration into existing code
|
|
238
|
+
- If route not yet configured, need to create new `src/router/index.ts` file
|
|
239
|
+
|
|
240
|
+
---
|
|
241
|
+
|
|
242
|
+
### Step 4: Configure App.vue File
|
|
243
|
+
|
|
244
|
+
Merge configuration content provided in integration documentation into `App.vue` file in user project.
|
|
245
|
+
|
|
246
|
+
**Key Configuration Points**:
|
|
247
|
+
- Configure global `UIKitProvider` component (set theme and language)
|
|
248
|
+
- Import page router `<router-view />`
|
|
249
|
+
- Execute user login logic (`login` and `setSelfInfo`) in `onMounted` hook
|
|
250
|
+
- Configure global styles to ensure meeting interface displays fullscreen
|
|
251
|
+
|
|
252
|
+
**Agent Execution Requirements**:
|
|
253
|
+
- โ ๏ธ Must strictly generate according to `App.vue` example code in integration documentation, do not modify without authorization
|
|
254
|
+
- If user project already has `App.vue` file, need intelligent merging rather than direct overwriting
|
|
255
|
+
|
|
256
|
+
---
|
|
257
|
+
|
|
258
|
+
### Step 5: Configure src/main.ts File
|
|
259
|
+
|
|
260
|
+
Merge route and multi-language configuration provided in integration documentation into entry file `src/main.ts` in user project.
|
|
261
|
+
|
|
262
|
+
**Key Configuration Points**:
|
|
263
|
+
- Import and register Vue Router
|
|
264
|
+
- Configure multi-language resources (Chinese and English)
|
|
265
|
+
- Mount Vue application
|
|
266
|
+
|
|
267
|
+
**Agent Execution Requirements**:
|
|
268
|
+
- โ ๏ธ Must strictly generate according to `main.ts` example code in integration documentation, do not modify without authorization
|
|
269
|
+
- If entry file in user project is `main.js`, need to change file extension to `main.ts`
|
|
270
|
+
- If user project already has route configuration, need intelligent merging rather than direct overwriting
|
|
271
|
+
|
|
272
|
+
---
|
|
273
|
+
|
|
274
|
+
### Step 6: Configure Application Information (src/config/basic-info-config.js)
|
|
275
|
+
|
|
276
|
+
Find `src/config/basic-info-config.js` configuration file in user project directory and perform the following configuration:
|
|
277
|
+
|
|
278
|
+
**Configuration Method**:
|
|
279
|
+
- Agent must read `SDKAppID` and `SDKSecretKey` from MCP environment variables
|
|
280
|
+
- These credentials are configured in MCP environment, no need to obtain through `get_usersig` tool
|
|
281
|
+
- Directly write values from environment variables into `basic-info-config.js` file
|
|
282
|
+
|
|
283
|
+
**โ ๏ธ Security Warning**:
|
|
284
|
+
- The Demo example in this document authenticates by configuring `SDKSecretKey` in client-side code, but `SDKSecretKey` can be easily decompiled and reverse engineered. Once key is leaked, attackers can steal your Tencent Cloud traffic
|
|
285
|
+
- **This method is only suitable for local Demo testing and function debugging**
|
|
286
|
+
- **In formal production environment**, recommend generating UserSig on your server side, have your App request dynamic UserSig from business server when UserSig is needed for authentication
|
|
287
|
+
|
|
288
|
+
**Agent Must Inform Users**:
|
|
289
|
+
> "โ ๏ธ The currently generated code is only suitable for local testing. In formal production environment, you must generate UserSig on server side, see Tencent Cloud documentation: https://cloud.tencent.com/document/product/647/17275#formal"
|
|
290
|
+
|
|
291
|
+
---
|
|
292
|
+
|
|
293
|
+
## ๐จ UI Customization Features
|
|
294
|
+
|
|
295
|
+
TUIRoomKit (Atomicx version) supports flexible UI customization, Agent can provide the following customization solutions according to user needs:
|
|
296
|
+
|
|
297
|
+
### 1. Theme and Language Configuration
|
|
298
|
+
|
|
299
|
+
Modify default values for theme and language by configuring `UIKitProvider` parameters in `App.vue`:
|
|
300
|
+
|
|
301
|
+
| UIKitProvider Parameter | Available Values | Default Value |
|
|
302
|
+
|-------------------|--------|--------|
|
|
303
|
+
| theme | "light" \| "dark" | "light" |
|
|
304
|
+
| language | "zh-CN" \| "en-US" | "en-US" |
|
|
305
|
+
|
|
306
|
+
```typescript
|
|
307
|
+
<UIKitProvider theme="dark" language="en-US">
|
|
308
|
+
<router-view />
|
|
309
|
+
</UIKitProvider>
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
---
|
|
313
|
+
|
|
314
|
+
### 2. Room Stream Layout Customization
|
|
315
|
+
|
|
316
|
+
TUIRoomKit currently supports three stream layouts:
|
|
317
|
+
- **Grid Layout** (default): `RoomLayoutTemplate.GridLayout`
|
|
318
|
+
- **Sidebar Layout**: `RoomLayoutTemplate.SidebarLayout`
|
|
319
|
+
- **Top Bar Layout**: `RoomLayoutTemplate.CinemaLayout`
|
|
320
|
+
|
|
321
|
+
Modify default layout in `src/views/room.vue`:
|
|
322
|
+
|
|
323
|
+
```typescript
|
|
324
|
+
// Change default video stream layout to sidebar layout
|
|
325
|
+
const participantViewLayout = ref(RoomLayoutTemplate.SidebarLayout);
|
|
326
|
+
|
|
327
|
+
function handleLayoutUpdate(layout: RoomLayoutTemplate) {
|
|
328
|
+
participantViewLayout.value = layout;
|
|
329
|
+
}
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
---
|
|
333
|
+
|
|
334
|
+
### 3. Custom Video Stream Widget
|
|
335
|
+
|
|
336
|
+
If you need to customize video stream widget (such as username display, audio/video status icons, etc.), can modify the following component:
|
|
337
|
+
|
|
338
|
+
```
|
|
339
|
+
src/components/RoomLayoutView/ParticipantViewUI/ParticipantViewUI.vue
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
---
|
|
343
|
+
|
|
344
|
+
### 4. Configure User Contact List
|
|
345
|
+
|
|
346
|
+
TUIRoomKit scheduled meeting user selection list and in-meeting call user selection list default to display user relationship chain list. To batch import user relationship chain, refer to the following steps:
|
|
347
|
+
|
|
348
|
+
**Step 1**: Use [Account Management > Import Multiple Accounts](https://cloud.tencent.com/document/product/269/4919) REST API interface to batch import user accounts
|
|
349
|
+
|
|
350
|
+
**Step 2**: Use [Friend Management > Import Friends](https://cloud.tencent.com/document/product/269/8301) REST API interface to batch import user relationship chain
|
|
351
|
+
|
|
352
|
+
---
|
|
353
|
+
|
|
354
|
+
## ๐ Complete Automation Process Summary
|
|
355
|
+
|
|
356
|
+
```mermaid
|
|
357
|
+
graph TD
|
|
358
|
+
A[Receive User Requirements] --> B[Clone TUIRoomKit GitHub Repository]
|
|
359
|
+
B --> C[Copy Core Source Code Files to User Project]
|
|
360
|
+
C --> D[Install Core Dependencies: tuikit-atomicx-vue3, etc.]
|
|
361
|
+
D --> E{Detect TypeScript and SCSS Support}
|
|
362
|
+
E -->|Not Installed| F[Install typescript and sass]
|
|
363
|
+
E -->|Already Installed| G[Skip]
|
|
364
|
+
F --> H[Configure Vue Router Routes]
|
|
365
|
+
G --> H
|
|
366
|
+
H --> I[Configure App.vue: UIKitProvider + User Login]
|
|
367
|
+
I --> J[Configure main.ts: Routes + Multi-language]
|
|
368
|
+
J --> K[Read SDKAppID and SDKSecretKey from MCP Environment Variables]
|
|
369
|
+
K --> L[Configure basic-info-config.js: SDKAppID + SDKSecretKey]
|
|
370
|
+
L --> M{User Needs UI Customization?}
|
|
371
|
+
M -->|Yes| N[Provide UI Customization Solutions: Theme/Layout/Widget]
|
|
372
|
+
M -->|No| O[Use Default Configuration]
|
|
373
|
+
N --> P[record_result Record Integration Results]
|
|
374
|
+
O --> P
|
|
375
|
+
P --> Q[Automatically Start Development Server: npm run dev]
|
|
376
|
+
Q --> R[Prompt User to Access Local Development Server Address in Browser]
|
|
377
|
+
```
|
|
378
|
+
|
|
379
|
+
---
|
|
380
|
+
|
|
381
|
+
## โ๏ธ Agent Code Generation Example Instructions (Prompts)
|
|
382
|
+
|
|
383
|
+
When Agent starts writing code, should follow these semantic logic:
|
|
384
|
+
|
|
385
|
+
**Basic Integration**:
|
|
386
|
+
> "Follow TUIRoomKit (Atomicx version) source code integration method to generate a Vue 3 audio/video meeting application for me. Please clone repository from GitHub and copy core source code files, automatically configure routes and multi-language, and read SDKAppID and SDKSecretKey from MCP environment variables to configure in `basic-info-config.js`. After startup, prompt me to access debug address in browser. **Please be sure to inform me: The currently generated code is only suitable for local testing, formal production environment must generate UserSig on server side.**"
|
|
387
|
+
|
|
388
|
+
**Custom Theme and Layout**:
|
|
389
|
+
> "Follow TUIRoomKit (Atomicx version) integration to generate a Vue 3 meeting application. Require dark theme (dark) and English language (en-US), default stream layout is sidebar layout (SidebarLayout)."
|
|
390
|
+
|
|
391
|
+
**Custom Video Stream Widget**:
|
|
392
|
+
> "Follow TUIRoomKit (Atomicx version) integration to generate a Vue 3 meeting application. Need to customize video stream widget to display custom user information and status icons on video stream."
|
|
393
|
+
|
|
394
|
+
---
|
|
395
|
+
|
|
396
|
+
## ๐ Key Points Summary
|
|
397
|
+
|
|
398
|
+
| Category | Requirement |
|
|
399
|
+
|------|------|
|
|
400
|
+
| **Framework Version** | Specifically for PC-side Vue 3 projects (does not support Vue 2.x and H5) |
|
|
401
|
+
| **Integration Method** | Source code integration (clone from GitHub and copy core source code files) |
|
|
402
|
+
| **Documentation Priority** | Strictly follow latest documentation instructions returned by tools |
|
|
403
|
+
| **Silent Integration** | Automatically install dependencies and start development server after code writing completed |
|
|
404
|
+
| **Credential Injection** | Read credentials from MCP environment variables, configure in `basic-info-config.js` |
|
|
405
|
+
| **Security Warning** | โ ๏ธ Must inform users: Client-side UserSig generation only suitable for testing, production environment must generate on server side |
|
|
406
|
+
| **Dependency Management** | Automatically install core dependencies and development environment dependencies (TypeScript, SCSS) |
|
|
407
|
+
| **Route Configuration** | Configure two core routes `/home` and `/room` |
|
|
408
|
+
| **Multi-language** | Support Chinese (zh-CN) and English (en-US) |
|
|
409
|
+
| **UI Customization** | Support theme, layout, video stream widget and other customizations |
|
|
410
|
+
|
|
411
|
+
---
|
|
412
|
+
|
|
413
|
+
## ๐ฏ Agent Execution Checklist
|
|
414
|
+
|
|
415
|
+
After completing code generation, Agent must confirm all the following items:
|
|
416
|
+
|
|
417
|
+
### Project Initialization
|
|
418
|
+
- [ ] Cloned TUIRoomKit GitHub repository (`git clone https://github.com/Tencent-RTC/TUIRoomKit.git --depth=1`)
|
|
419
|
+
- [ ] Copied core source code files to user project (assets, components, hooks, i18n, utils, config, views)
|
|
420
|
+
- [ ] Installed core dependencies: `tuikit-atomicx-vue3`, `@tencentcloud/uikit-base-component-vue3`, `@tencentcloud/tuiroom-engine-js`, `vue-router`
|
|
421
|
+
- [ ] Detected and installed TypeScript and SCSS development dependencies (if user project not installed)
|
|
422
|
+
|
|
423
|
+
### Code Generation
|
|
424
|
+
- [ ] Configured Vue Router: `/home` and `/room` routes
|
|
425
|
+
- [ ] Configured `App.vue`: UIKitProvider + user login logic
|
|
426
|
+
- [ ] Configured `main.ts`: routes + multi-language resources
|
|
427
|
+
- [ ] Components use `<script setup lang="ts">` syntax
|
|
428
|
+
|
|
429
|
+
### Credentials & Login
|
|
430
|
+
- [ ] ๐ด Read SDKAppID and SDKSecretKey from MCP environment variables
|
|
431
|
+
- [ ] Configured SDKAppID and SDKSecretKey in `src/config/basic-info-config.js`
|
|
432
|
+
- [ ] Implemented login() and setSelfInfo() login logic in `App.vue`
|
|
433
|
+
- [ ] โ ๏ธ **Informed user**: Currently generated code only suitable for local testing, formal production environment must generate UserSig on server side
|
|
434
|
+
|
|
435
|
+
### UI Configuration
|
|
436
|
+
- [ ] Configured theme (light/dark) and language (zh-CN/en-US) according to user requirements
|
|
437
|
+
- [ ] Configured stream layout (grid/sidebar/top bar) according to user requirements
|
|
438
|
+
- [ ] If user needs custom video stream widget, provided customization solution
|
|
439
|
+
|
|
440
|
+
### Final Check
|
|
441
|
+
- [ ] Called `record_result` to record integration results
|
|
442
|
+
- [ ] Automatically installed dependencies (npm install)
|
|
443
|
+
- [ ] Automatically started development server (npm run dev)
|
|
444
|
+
- [ ] Prompted user to access local development server address in browser
|
|
445
|
+
- [ ] Project runs normally with no errors
|
|
446
|
+
|
|
447
|
+
---
|
|
448
|
+
|
|
449
|
+
## ๐ Related Tool Reference
|
|
450
|
+
|
|
451
|
+
### Must Use Tools
|
|
452
|
+
|
|
453
|
+
#### MCP Environment Variables - Read Authentication Credentials
|
|
454
|
+
**Purpose**: Read Tencent Cloud application credentials from MCP environment variables:
|
|
455
|
+
- `SDKAppID`: Application identifier
|
|
456
|
+
- `SDKSecretKey`: Application secret key
|
|
457
|
+
|
|
458
|
+
**Usage**:
|
|
459
|
+
- Agent directly reads credentials from MCP environment variables
|
|
460
|
+
- Write credentials to `src/config/basic-info-config.js` file
|
|
461
|
+
- Prohibit letting users manually fill in or obtain from external tools
|
|
462
|
+
|
|
463
|
+
**Usage Constraints**:
|
|
464
|
+
- โ
Must read from MCP environment variables
|
|
465
|
+
- โ Prohibit letting users manually input
|
|
466
|
+
- โ ๏ธ Must inform users: Client-side UserSig generation only suitable for testing, production environment must generate on server side
|
|
467
|
+
|
|
468
|
+
#### `record_result` - Record Integration Results
|
|
469
|
+
**Purpose**: Record integration process and results for statistics and analysis
|
|
470
|
+
|
|
471
|
+
**Invocation Timing**: Call after completing all integration steps and successfully starting project
|
|
472
|
+
|
|
473
|
+
---
|
|
474
|
+
|
|
475
|
+
## ๐ Related Resource Links
|
|
476
|
+
|
|
477
|
+
- **TUIRoomKit GitHub Repository**: https://github.com/Tencent-RTC/TUIRoomKit
|
|
478
|
+
- **Tencent Cloud TRTC Console**: https://console.cloud.tencent.com/trtc
|
|
479
|
+
- **How to Calculate UserSig in Formal Operation Phase**: https://cloud.tencent.com/document/product/647/17275#formal
|
|
480
|
+
- **URL Domain and Protocol Restrictions**: https://cloud.tencent.com/document/product/647/17249
|
|
481
|
+
- **Dealing with Firewall Restrictions (Intranet Proxy)**: https://web.sdk.qcloud.com/trtc/webrtc/doc/zh-cn/tutorial-34-advanced-proxy.html
|
|
482
|
+
|
|
483
|
+
---
|
|
484
|
+
|
|
485
|
+
**Applicable Framework**: Vue 3 (PC)
|
|
486
|
+
**TUIRoomKit Version**: tuikit-atomicx-vue3 (Atomicx Version)
|
|
487
|
+
**Build Tool**: Vite (Recommended)
|
|
@@ -1,3 +1,24 @@
|
|
|
1
|
+
## Important Notice
|
|
2
|
+
|
|
3
|
+
**Documentation Content Description:**
|
|
4
|
+
- The documentation covers two parts: `TUICallEngine` API and `TUICallKit` UI component API.
|
|
5
|
+
- For `TUICallEngine` API documentation, please refer to **Part One**
|
|
6
|
+
- For `TUICallKit` UI component API documentation, please refer to **Part Two**
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Part One: TUICallEngine API Documentation
|
|
11
|
+
|
|
12
|
+
**TUICallEngine API Overview**
|
|
13
|
+
- When users query `TUICallEngine` API, you must first consult the official TUICallEngine API documentation, then provide correct API usage examples. **Do not speculate on API usage.**
|
|
14
|
+
- Below are the documentation links for each platform. Please access the documentation links directly to obtain API usage:
|
|
15
|
+
- [TUICallEngine Web API List Documentation](https://trtc.io/document/51016?product=call&menulabel=uikit&platform=web)
|
|
16
|
+
- [TUICallEngine Web API Usage Examples Documentation](https://web.sdk.qcloud.com/component/trtccalling/doc/TUICallEngine/web/en/TUICallEngine.html)
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Part Two: TUICallKit UI Component API Documentation
|
|
21
|
+
|
|
1
22
|
The TUICallKit API is the **audio and video call component that includes a UI interface**. With the TUICallKit API, you can swiftly develop audio and video call scenarios reminiscent of WeChat through simple interfaces. For further comprehensive steps to access this, please refer to: [Integrating TUICallKit](https://trtc.io/document/50993).
|
|
2
23
|
|
|
3
24
|
## API Overview
|
|
@@ -1,3 +1,24 @@
|
|
|
1
|
+
## Important Notice
|
|
2
|
+
|
|
3
|
+
**Documentation Content Description:**
|
|
4
|
+
- The documentation covers two parts: `TUICallEngine` API and `TUICallKit` UI component API.
|
|
5
|
+
- For `TUICallEngine` API documentation, please refer to **Part One**
|
|
6
|
+
- For `TUICallKit` UI component API documentation, please refer to **Part Two**
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Part One: TUICallEngine API Documentation
|
|
11
|
+
|
|
12
|
+
**TUICallEngine API Overview**
|
|
13
|
+
- When users query `TUICallEngine` API, you must first consult the official TUICallEngine API documentation, then provide correct API usage examples. **Do not speculate on API usage.**
|
|
14
|
+
- Below are the documentation links for each platform. Please access the documentation links directly to obtain API usage:
|
|
15
|
+
- [TUICallEngine Web API List Documentation](https://trtc.io/document/51016?product=call&menulabel=uikit&platform=web)
|
|
16
|
+
- [TUICallEngine Web API Usage Examples Documentation](https://web.sdk.qcloud.com/component/trtccalling/doc/TUICallEngine/web/en/TUICallEngine.html)
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Part Two: TUICallKit UI Component API Documentation
|
|
21
|
+
|
|
1
22
|
The TUICallKit API is the **audio and video call component that includes a UI interface**. With the TUICallKit API, you can swiftly develop audio and video call scenarios reminiscent of WeChat through simple interfaces. For further comprehensive steps to access this, please refer to: [Integrating TUICallKit](https://trtc.io/document/50993).
|
|
2
23
|
|
|
3
24
|
## API Overview
|
|
@@ -2,27 +2,44 @@ import { z } from 'zod';
|
|
|
2
2
|
import { GET_WEB_CHAT_UIKIT_INTEGRATION_DEFINITION } from '../definitions/get_web_chat_uikit_integration_def.js';
|
|
3
3
|
import { getDocContent } from '../../utils/get-doc-content.js';
|
|
4
4
|
import { reportCLSClient } from '../../utils/report-cls-client.js';
|
|
5
|
-
import {
|
|
6
|
-
function getResultText(params) {
|
|
7
|
-
const { framework = '' } = params;
|
|
5
|
+
import { generateStructuredResult } from '../../utils/generate-structured-result.js';
|
|
6
|
+
async function getResultText(params) {
|
|
7
|
+
const { framework = '', goals = [] } = params;
|
|
8
8
|
reportCLSClient({
|
|
9
9
|
method: 'get_web_chat_uikit_integration',
|
|
10
|
-
|
|
10
|
+
info: goals.join(','),
|
|
11
|
+
framework,
|
|
11
12
|
});
|
|
12
|
-
|
|
13
|
+
// ่ทๅๅทฅไฝๆตๆไปค
|
|
14
|
+
const baseInstructions = getDocContent(['chatuikit', framework, 'workflow.md']);
|
|
15
|
+
// ๆน้่ฏปๅ็ฎๆ ๆๆกฃๅนถ็ๆ็ปๆๅ็ปๆ
|
|
16
|
+
const result = await generateStructuredResult({
|
|
17
|
+
baseInstructions,
|
|
18
|
+
goals,
|
|
19
|
+
framework,
|
|
20
|
+
pathMap: {
|
|
21
|
+
[goals[0]]: ['chatuikit', framework, 'integration.md'],
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
return result;
|
|
13
25
|
}
|
|
14
26
|
const registryGetWebChatIntegrationTool = (mcpServer) => {
|
|
15
27
|
const { name, description, parameter_descriptions } = GET_WEB_CHAT_UIKIT_INTEGRATION_DEFINITION;
|
|
16
28
|
mcpServer.tool(name, description, {
|
|
17
|
-
framework: z.enum(['react', 'vue']).describe(parameter_descriptions.framework),
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
29
|
+
framework: z.enum(['react', 'vue', 'uniapp-app']).describe(parameter_descriptions.framework),
|
|
30
|
+
goals: z.array(z.enum(['full-featured', 'chat-only'])).describe(parameter_descriptions.goals)
|
|
31
|
+
}, async (params) => {
|
|
32
|
+
const result = await getResultText(params);
|
|
33
|
+
return {
|
|
34
|
+
content: [
|
|
35
|
+
{
|
|
36
|
+
type: 'text',
|
|
37
|
+
text: result.llm_code_generation_instructions_md,
|
|
38
|
+
}
|
|
39
|
+
],
|
|
40
|
+
result: result,
|
|
41
|
+
};
|
|
42
|
+
});
|
|
26
43
|
};
|
|
27
44
|
export { registryGetWebChatIntegrationTool };
|
|
28
45
|
//# sourceMappingURL=get-web-chat-integration.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-web-chat-integration.js","sourceRoot":"","sources":["../../../src/tools/chat/get-web-chat-integration.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,yCAAyC,EAAE,MAAM,sDAAsD,CAAC;AACjH,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"get-web-chat-integration.js","sourceRoot":"","sources":["../../../src/tools/chat/get-web-chat-integration.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,yCAAyC,EAAE,MAAM,sDAAsD,CAAC;AACjH,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,EAAE,wBAAwB,EAAE,MAAM,2CAA2C,CAAC;AAErF,KAAK,UAAU,aAAa,CAAC,MAA2B;IACtD,MAAM,EAAE,SAAS,GAAG,EAAE,EAAE,KAAK,GAAG,EAAE,EAAE,GAAG,MAAM,CAAC;IAC9C,eAAe,CAAC;QACd,MAAM,EAAE,gCAAgC;QACxC,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC;QACrB,SAAS;KACV,CAAC,CAAC;IACH,UAAU;IACV,MAAM,gBAAgB,GAAG,aAAa,CAAC,CAAC,WAAW,EAAE,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC;IAChF,mBAAmB;IACnB,MAAM,MAAM,GAAG,MAAM,wBAAwB,CAAC;QAC5C,gBAAgB;QAChB,KAAK;QACL,SAAS;QACT,OAAO,EAAE;YACP,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,WAAW,EAAE,SAAS,EAAE,gBAAgB,CAAC;SACvD;KACF,CAAC,CAAA;IACF,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,MAAM,iCAAiC,GAAG,CAAC,SAAoB,EAAE,EAAE;IACjE,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,sBAAsB,EAAE,GAAG,yCAAyC,CAAC;IAChG,SAAS,CAAC,IAAI,CACZ,IAAI,EACJ,WAAW,EACX;QACE,SAAS,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,KAAK,EAAE,YAAY,CAAC,CAAC,CAAC,QAAQ,CAAC,sBAAsB,CAAC,SAAS,CAAC;QAC5F,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,sBAAsB,CAAC,KAAK,CAAC;KAC9F,EACD,KAAK,EAAE,MAAW,EAAE,EAAE;QACpB,MAAM,MAAM,GAAG,MAAM,aAAa,CAAC,MAAM,CAAC,CAAA;QAC1C,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,MAAM,CAAC,mCAAmC;iBACjD;aACF;YACD,MAAM,EAAE,MAAM;SACf,CAAA;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,OAAO,EAAE,iCAAiC,EAAE,CAAC"}
|
|
@@ -1,22 +1,29 @@
|
|
|
1
1
|
const TOOL_DESCRIPTION = `
|
|
2
|
-
|
|
2
|
+
**Core Purpose**: As a professional Web/cross-platform Chat TUIKit integration assistant, this tool provides Agents with workflow action instructions and real-time aggregated latest documentation content to guide LLMs in helping users implement instant messaging (IM) functionality.
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
1.
|
|
6
|
-
2.
|
|
7
|
-
3. The application entry point can be set on a TabBar as needed, with names including keywords like 'message', 'conversation', or 'information'.\n
|
|
4
|
+
**Functional Goals**:
|
|
5
|
+
1. full-featured: Integrate complete functionality. Includes conversation list, chat window, group management, personal center, etc. **Suitable for building WeChat/WeCom-style complete applications, or as a core Tab module in Apps.**
|
|
6
|
+
2. chat-only: Integrate chat window only. **Suitable for lightweight conversation scenarios such as customer service consultations, online medical consultations, order detail page private chats, etc.**
|
|
8
7
|
|
|
9
|
-
|
|
8
|
+
**Keywords**:
|
|
9
|
+
'Chat', 'TUIKit', 'chat', 'instant messaging', 'WeChat', 'WeCom', 'React', 'Vue', 'uniapp', 'integration', 'customer service', 'medical consultation', 'TabBar', 'message entry', 'conversation list', 'dialog box'.
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
**Action Instructions & Workflow Guidance**:
|
|
12
|
+
When handling user requests, the Agent should use the llm_code_generation_instructions_md field returned by this tool. This field contains:
|
|
13
|
+
1. Core workflow instructions: Includes environment preparation, dependency installation, SDK initialization, UserSig authentication, and component version specifications.
|
|
14
|
+
2. Real-time documentation content: Dynamically returns the corresponding official integration guide based on the selected goals.
|
|
14
15
|
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
LLMs MUST prioritize and exclusively use the real-time content returned by this tool to generate code, avoiding accessing external URLs independently.
|
|
17
|
+
|
|
18
|
+
**Mandatory Constraints**:
|
|
19
|
+
1. Framework Selection Constraint: If the user has not explicitly specified a framework or the intent is unclear, the 'present_framework_choice' tool MUST be called first to guide the user in choosing between react, vue, and uniapp-app.
|
|
20
|
+
2. Result Recording Constraint: After TUIKit component integration is complete and the project starts successfully, the 'record_result' tool MUST be called to record the integration results.
|
|
21
|
+
|
|
22
|
+
**Supported Frameworks**: react, vue, uniapp-app.
|
|
17
23
|
`;
|
|
18
24
|
const PARAMETER_DESCRIPTIONS = {
|
|
19
|
-
framework: '
|
|
25
|
+
framework: 'Chat TUIKit framework type. Available options: react (React Web), vue (Vue3 Web), uniapp-app (Uni-app App/H5).',
|
|
26
|
+
goals: "List of functional goals requested by the user. Available options: ['full-featured'] (standard application), ['chat-only'] (customer service/consultation/popup).",
|
|
20
27
|
};
|
|
21
28
|
export const GET_WEB_CHAT_UIKIT_INTEGRATION_DEFINITION = {
|
|
22
29
|
name: 'get_web_chat_uikit_integration',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get_web_chat_uikit_integration_def.js","sourceRoot":"","sources":["../../../src/tools/definitions/get_web_chat_uikit_integration_def.ts"],"names":[],"mappings":"AAAA,MAAM,gBAAgB,GAAG
|
|
1
|
+
{"version":3,"file":"get_web_chat_uikit_integration_def.js","sourceRoot":"","sources":["../../../src/tools/definitions/get_web_chat_uikit_integration_def.ts"],"names":[],"mappings":"AAAA,MAAM,gBAAgB,GAAG;;;;;;;;;;;;;;;;;;;;;;CAsBxB,CAAC;AAEF,MAAM,sBAAsB,GAAG;IAC7B,SAAS,EAAE,gHAAgH;IAC3H,KAAK,EAAE,mKAAmK;CAC3K,CAAC;AAEF,MAAM,CAAC,MAAM,yCAAyC,GAAG;IACvD,IAAI,EAAE,gCAAgC;IACtC,WAAW,EAAE,gBAAgB;IAC7B,sBAAsB,EAAE,sBAAsB;CAC/C,CAAC"}
|