@tencentcloud/sdk-mcp 1.0.9 → 1.1.1
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/package.json +1 -1
- package/resource/doc/chatuikit/faq/vue_qa.md +0 -344
- package/resource/doc/chatuikit/react/create-group.md +1 -1
- package/resource/doc/chatuikit/vue/components/chat.md +5 -0
- package/resource/doc/chatuikit/vue/components/chatheader.md +3 -1
- package/resource/doc/chatuikit/vue/components/conversation-list.md +3 -0
- package/resource/doc/chatuikit/vue/components/message-input.md +4 -0
- package/resource/doc/chatuikit/vue/create-group.md +1 -1
- package/resource/doc/chatuikit/vue/init.md +35 -0
- package/resource/doc/chatuikit/vue/integration.md +7 -1
- package/resource/doc/livekit/vue/components/barrage.md +615 -0
- package/resource/doc/livekit/vue/components/chat-barrage.md +615 -0
- package/resource/doc/livekit/vue/components/live-list.md +227 -0
- package/resource/doc/livekit/vue/components/live-player.md +374 -0
- package/resource/doc/livekit/vue/components/live-view.md +427 -0
- package/resource/doc/roomkit/states/device-state.md +316 -0
- package/resource/doc/roomkit/states/login-state.md +51 -0
- package/resource/doc/roomkit/states/room-list-state.md +287 -0
- package/resource/doc/roomkit/states/room-participant-state.md +307 -0
- package/tools/chat/get-web-chat-component-detail.js +0 -1
- package/tools/chat/get-web-chat-component-detail.js.map +1 -1
- package/tools/chat/get-web-chat-integration.js +1 -1
- package/tools/chat/get-web-chat-integration.js.map +1 -1
- package/tools/chat/{get-web-chat-uikit-login.js → get-web-chat-uikit-init.js} +5 -5
- package/tools/chat/get-web-chat-uikit-init.js.map +1 -0
- package/tools/common/present-framework-choice.js +1 -1
- package/tools/common/present-framework-choice.js.map +1 -1
- package/tools/common/record-prompt.js +0 -1
- package/tools/common/record-prompt.js.map +1 -1
- package/tools/index.js +12 -4
- package/tools/index.js.map +1 -1
- package/tools/live/get-web-live-component-detail.js +35 -0
- package/tools/live/get-web-live-component-detail.js.map +1 -0
- package/tools/room/get-web-room-state-detail.js +33 -0
- package/tools/room/get-web-room-state-detail.js.map +1 -0
- package/utils/handle-component-name.js +8 -2
- package/utils/handle-component-name.js.map +1 -1
- package/resource/doc/chatuikit/vue/components/MessageInput.md +0 -546
- package/resource/doc/chatuikit/vue/components/login.md +0 -29
- package/resource/doc/chatuikit/vue/login.md +0 -29
- package/resource/doc/chatuikit/vue3/components/MessageInput.md +0 -546
- package/resource/doc/chatuikit/vue3/components/MessageList.md +0 -385
- package/resource/doc/chatuikit/vue3/components/avatar.md +0 -105
- package/resource/doc/chatuikit/vue3/components/chatheader.md +0 -153
- package/resource/doc/chatuikit/vue3/components/component-list.md +0 -88
- package/resource/doc/chatuikit/vue3/components/userpicker.md +0 -256
- package/resource/doc/chatuikit/vue3/integration.md +0 -218
- package/tools/call/get-native-call-integration-guide.js +0 -35
- package/tools/call/get-native-call-integration-guide.js.map +0 -1
- package/tools/call/get-web-call-integration-guide.js +0 -34
- package/tools/call/get-web-call-integration-guide.js.map +0 -1
- package/tools/chat/auto-create-group.js +0 -44
- package/tools/chat/auto-create-group.js.map +0 -1
- package/tools/chat/get-native-chat-integration-guide.js +0 -33
- package/tools/chat/get-native-chat-integration-guide.js.map +0 -1
- package/tools/chat/get-web-chat-integration-guide.js +0 -42
- package/tools/chat/get-web-chat-integration-guide.js.map +0 -1
- package/tools/chat/get-web-chat-uikit-login.js.map +0 -1
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
# Room Participant State Documentation
|
|
2
|
+
|
|
3
|
+
Room 房间列表 State API 文档。
|
|
4
|
+
|
|
5
|
+
## 安装依赖
|
|
6
|
+
|
|
7
|
+
您可以选择以下任一方式安装依赖:
|
|
8
|
+
【npm】
|
|
9
|
+
``` bash
|
|
10
|
+
npm install tuikit-atomicx-vue3 --save
|
|
11
|
+
```
|
|
12
|
+
【pnpm】
|
|
13
|
+
``` bash
|
|
14
|
+
pnpm add tuikit-atomicx-vue3
|
|
15
|
+
```
|
|
16
|
+
【yarn】
|
|
17
|
+
``` bash
|
|
18
|
+
yarn add tuikit-atomicx-vue3
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Enums
|
|
22
|
+
|
|
23
|
+
### DeviceType
|
|
24
|
+
设备类型枚举
|
|
25
|
+
|
|
26
|
+
```typescript
|
|
27
|
+
export enum DeviceType {
|
|
28
|
+
Microphone = "Microphone", // 麦克风
|
|
29
|
+
Camera = "Camera", // 摄像头
|
|
30
|
+
ScreenShare = "ScreenShare", // 屏幕共享
|
|
31
|
+
}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### DeviceStatus
|
|
35
|
+
设备状态枚举
|
|
36
|
+
|
|
37
|
+
```typescript
|
|
38
|
+
export enum DeviceStatus {
|
|
39
|
+
On = "On", // 开启
|
|
40
|
+
Off = "Off", // 关闭
|
|
41
|
+
}
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### NetworkQuality
|
|
45
|
+
网络质量枚举
|
|
46
|
+
|
|
47
|
+
```typescript
|
|
48
|
+
export enum NetworkQuality {
|
|
49
|
+
Unknown = 0, // 未知
|
|
50
|
+
Excellent = 1, // 优秀
|
|
51
|
+
Good = 2, // 良好
|
|
52
|
+
Poor = 3, // 较差
|
|
53
|
+
Bad = 4, // 差
|
|
54
|
+
VeryBad = 5, // 很差
|
|
55
|
+
Down = 6, // 断开
|
|
56
|
+
}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### ParticipantRole
|
|
60
|
+
参与者角色枚举
|
|
61
|
+
|
|
62
|
+
```typescript
|
|
63
|
+
export enum ParticipantRole {
|
|
64
|
+
Owner = 0, // 房主
|
|
65
|
+
Admin = 1, // 管理员
|
|
66
|
+
GeneralUser = 2, // 普通用户
|
|
67
|
+
}
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### KickedOutOfRoomReason
|
|
71
|
+
被踢出房间原因枚举
|
|
72
|
+
|
|
73
|
+
```typescript
|
|
74
|
+
export enum KickedOutOfRoomReason {
|
|
75
|
+
KickedByAdmin = "KickedByAdmin", // 被管理员踢出
|
|
76
|
+
ReplacedByAnotherDevice = "ReplacedByAnotherDevice", // 被其他设备替换
|
|
77
|
+
KickedByServer = "KickedByServer", // 被服务器踢出
|
|
78
|
+
ConnectionTimeout = "ConnectionTimeout", // 连接超时
|
|
79
|
+
InvalidStatusOnReconnect = "InvalidStatusOnReconnect", // 重连时状态无效
|
|
80
|
+
RoomLimitExceeded = "RoomLimitExceeded", // 房间人数超限
|
|
81
|
+
}
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## Interfaces
|
|
85
|
+
|
|
86
|
+
### NetworkInfo
|
|
87
|
+
网络信息接口
|
|
88
|
+
|
|
89
|
+
```typescript
|
|
90
|
+
export interface NetworkInfo {
|
|
91
|
+
quality: NetworkQuality; // 网络质量
|
|
92
|
+
upLoss: number; // 上行丢包率
|
|
93
|
+
downLoss: number; // 下行丢包率
|
|
94
|
+
delay: number; // 延迟
|
|
95
|
+
}
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### RoomParticipant
|
|
99
|
+
房间参与者信息(继承自 RoomUser)
|
|
100
|
+
|
|
101
|
+
```typescript
|
|
102
|
+
export interface RoomParticipant extends RoomUser {
|
|
103
|
+
nameCard: string; // 名片/昵称
|
|
104
|
+
role: ParticipantRole; // 角色
|
|
105
|
+
microphoneStatus: DeviceStatus; // 麦克风状态
|
|
106
|
+
cameraStatus: DeviceStatus; // 摄像头状态
|
|
107
|
+
screenShareStatus: DeviceStatus; // 屏幕共享状态
|
|
108
|
+
isMessageDisabled: boolean; // 是否禁用消息
|
|
109
|
+
metaData: Record<string, string>; // 元数据
|
|
110
|
+
}
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### DeviceRequestInfo
|
|
114
|
+
设备请求信息
|
|
115
|
+
|
|
116
|
+
```typescript
|
|
117
|
+
export interface DeviceRequestInfo {
|
|
118
|
+
timestamp: number; // 时间戳
|
|
119
|
+
senderUserId: string; // 发送者用户ID
|
|
120
|
+
senderUserName: string; // 发送者用户名
|
|
121
|
+
senderNameCard: string; // 发送者名片
|
|
122
|
+
senderAvatarURL: string; // 发送者头像URL
|
|
123
|
+
content: string; // 请求内容
|
|
124
|
+
deviceType: DeviceType; // 设备类型
|
|
125
|
+
}
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
## IRoomParticipantState Interface
|
|
129
|
+
|
|
130
|
+
房间参与者状态管理接口
|
|
131
|
+
|
|
132
|
+
### Properties
|
|
133
|
+
|
|
134
|
+
```typescript
|
|
135
|
+
export interface IRoomParticipantState {
|
|
136
|
+
participantList: RoomParticipant[]; // 参与者列表
|
|
137
|
+
participantListCursor: string; // 参与者列表游标
|
|
138
|
+
participantListWithVideo: RoomParticipant[]; // 开启视频的参与者列表
|
|
139
|
+
participantWithScreen: RoomParticipant | null; // 正在屏幕共享的参与者
|
|
140
|
+
pendingDeviceApplications: DeviceRequestInfo[]; // 待处理的设备申请
|
|
141
|
+
pendingDeviceInvitations: DeviceRequestInfo[]; // 待处理的设备邀请
|
|
142
|
+
speakingUsers: Map<string, number>; // 正在说话的用户(用户ID -> 音量)
|
|
143
|
+
networkQualities: Map<string, NetworkInfo>; // 网络质量信息(用户ID -> 网络信息)
|
|
144
|
+
|
|
145
|
+
readonly localParticipant: RoomParticipant | null; // 本地参与者信息(只读)
|
|
146
|
+
}
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
### Methods
|
|
150
|
+
|
|
151
|
+
#### 参与者管理
|
|
152
|
+
|
|
153
|
+
- **getParticipantList(options: { cursor?: string, count?: number }): Promise<RoomParticipant[]>**
|
|
154
|
+
- 获取参与者列表
|
|
155
|
+
|
|
156
|
+
#### 角色管理
|
|
157
|
+
|
|
158
|
+
- **transferOwner(options: { userId: string }): Promise<void>**
|
|
159
|
+
- 转让房主权限
|
|
160
|
+
|
|
161
|
+
- **setAdmin(options: { userId: string }): Promise<void>**
|
|
162
|
+
- 设置管理员
|
|
163
|
+
|
|
164
|
+
- **revokeAdmin(options: { userId: string }): Promise<void>**
|
|
165
|
+
- 撤销管理员权限
|
|
166
|
+
|
|
167
|
+
- **kickParticipant(options: { userId: string }): Promise<void>**
|
|
168
|
+
- 踢出参与者
|
|
169
|
+
|
|
170
|
+
#### 参与者信息管理
|
|
171
|
+
|
|
172
|
+
- **updateParticipantNameCard(options: { userId: string, nameCard: string }): Promise<void>**
|
|
173
|
+
- 更新参与者名片
|
|
174
|
+
|
|
175
|
+
- **updateParticipantMetaData(options: { userId: string, metaData: Record<string, string> }): Promise<void>**
|
|
176
|
+
- 更新参与者元数据
|
|
177
|
+
|
|
178
|
+
#### 设备控制
|
|
179
|
+
|
|
180
|
+
- **closeParticipantDevice(options: { userId: string, deviceType: DeviceType }): Promise<void>**
|
|
181
|
+
- 关闭参与者设备
|
|
182
|
+
|
|
183
|
+
- **muteParticipantMessage(options: { userId: string, mute: boolean }): Promise<void>**
|
|
184
|
+
- 禁言/解禁参与者
|
|
185
|
+
|
|
186
|
+
- **disableAllDevices(options: { deviceType: DeviceType, disable: boolean }): Promise<void>**
|
|
187
|
+
- 禁用/启用所有设备
|
|
188
|
+
|
|
189
|
+
- **disableAllMessages(options: { disable: boolean }): Promise<void>**
|
|
190
|
+
- 禁用/启用所有消息
|
|
191
|
+
|
|
192
|
+
#### 设备请求管理
|
|
193
|
+
|
|
194
|
+
- **requestToOpenDevice(options: { device: DeviceType; timeout?: number }): Promise<void>**
|
|
195
|
+
- 请求开启设备
|
|
196
|
+
|
|
197
|
+
- **cancelOpenDeviceRequest(options: { device: DeviceType }): Promise<void>**
|
|
198
|
+
- 取消设备开启请求
|
|
199
|
+
|
|
200
|
+
- **approveOpenDeviceRequest(options: { device: DeviceType; userId: string }): Promise<void>**
|
|
201
|
+
- 批准设备开启请求
|
|
202
|
+
|
|
203
|
+
- **rejectOpenDeviceRequest(options: { device: DeviceType; userId: string; }): Promise<void>**
|
|
204
|
+
- 拒绝设备开启请求
|
|
205
|
+
|
|
206
|
+
#### 设备邀请管理
|
|
207
|
+
|
|
208
|
+
- **inviteToOpenDevice(options: { device: DeviceType; userId: string; timeout?: number }): Promise<void>**
|
|
209
|
+
- 邀请开启设备
|
|
210
|
+
|
|
211
|
+
- **cancelOpenDeviceInvitation(options: { device: DeviceType; userId: string }): Promise<void>**
|
|
212
|
+
- 取消设备开启邀请
|
|
213
|
+
|
|
214
|
+
- **acceptOpenDeviceInvitation(options: {device: DeviceType; userId: string; }): Promise<void>**
|
|
215
|
+
- 接受设备开启邀请
|
|
216
|
+
|
|
217
|
+
- **declineOpenDeviceInvitation(options: {device: DeviceType; userId: string; }): Promise<void>**
|
|
218
|
+
- 拒绝设备开启邀请
|
|
219
|
+
|
|
220
|
+
### Event Handlers
|
|
221
|
+
|
|
222
|
+
#### 参与者状态事件
|
|
223
|
+
|
|
224
|
+
- **onParticipantJoined: (options: { participant: RoomParticipant }) => void**
|
|
225
|
+
- 参与者加入时触发
|
|
226
|
+
|
|
227
|
+
- **onParticipantLeft: (options: { participant: RoomParticipant }) => void**
|
|
228
|
+
- 参与者离开时触发
|
|
229
|
+
|
|
230
|
+
#### 角色变更事件
|
|
231
|
+
|
|
232
|
+
- **onOwnerChanged: (options: { newOwner: RoomParticipant }) => void**
|
|
233
|
+
- 房主变更时触发
|
|
234
|
+
|
|
235
|
+
- **onAdminSet: (options: { userInfo: RoomParticipant }) => void**
|
|
236
|
+
- 设置管理员时触发
|
|
237
|
+
|
|
238
|
+
- **onAdminRevoked: (options: { userInfo: RoomParticipant }) => void**
|
|
239
|
+
- 撤销管理员时触发
|
|
240
|
+
|
|
241
|
+
#### 房间管理事件
|
|
242
|
+
|
|
243
|
+
- **onKickedFromRoom: (options: { reason: KickedOutOfRoomReason, message: string }) => void**
|
|
244
|
+
- 被踢出房间时触发
|
|
245
|
+
|
|
246
|
+
#### 设备控制事件
|
|
247
|
+
|
|
248
|
+
- **onParticipantDeviceClosed: (options: { userId: string, device: DeviceType, operator: RoomUser }) => void**
|
|
249
|
+
- 参与者设备被关闭时触发
|
|
250
|
+
|
|
251
|
+
- **onParticipantMessageMuted: (options: { userId: string, muted: boolean, operator: RoomUser }) => void**
|
|
252
|
+
- 参与者被禁言/解禁时触发
|
|
253
|
+
|
|
254
|
+
- **onAllDevicesDisabled: (options: { device: DeviceType, disable: boolean, operator: RoomUser }) => void**
|
|
255
|
+
- 所有设备被禁用/启用时触发
|
|
256
|
+
|
|
257
|
+
- **onAllMessagesDisabled: (options: { disable: boolean, operator: RoomUser }) => void**
|
|
258
|
+
- 所有消息被禁用/启用时触发
|
|
259
|
+
|
|
260
|
+
#### 设备请求事件
|
|
261
|
+
|
|
262
|
+
- **onDeviceRequestReceived: (options: { request: DeviceRequestInfo }) => void**
|
|
263
|
+
- 收到设备请求时触发
|
|
264
|
+
|
|
265
|
+
- **onDeviceRequestCancelled: (options: { request: DeviceRequestInfo }) => void**
|
|
266
|
+
- 设备请求被取消时触发
|
|
267
|
+
|
|
268
|
+
- **onDeviceRequestTimeout: (options: { request: DeviceRequestInfo }) => void**
|
|
269
|
+
- 设备请求超时时触发
|
|
270
|
+
|
|
271
|
+
- **onDeviceRequestApproved: (options: { request: DeviceRequestInfo, operator: RoomUser }) => void**
|
|
272
|
+
- 设备请求被批准时触发
|
|
273
|
+
|
|
274
|
+
- **onDeviceRequestRejected: (options: { request: DeviceRequestInfo, operator: RoomUser }) => void**
|
|
275
|
+
- 设备请求被拒绝时触发
|
|
276
|
+
|
|
277
|
+
- **onDeviceRequestProcessed: (options: { request: DeviceRequestInfo, operator: RoomUser }) => void**
|
|
278
|
+
- 设备请求被处理时触发
|
|
279
|
+
|
|
280
|
+
#### 设备邀请事件
|
|
281
|
+
|
|
282
|
+
- **onDeviceInvitationReceived: (options: { invitation: DeviceRequestInfo }) => void**
|
|
283
|
+
- 收到设备邀请时触发
|
|
284
|
+
|
|
285
|
+
- **onDeviceInvitationCancelled: (options: { invitation: DeviceRequestInfo }) => void**
|
|
286
|
+
- 设备邀请被取消时触发
|
|
287
|
+
|
|
288
|
+
- **onDeviceInvitationTimeout: (options: { invitation: DeviceRequestInfo }) => void**
|
|
289
|
+
- 设备邀请超时时触发
|
|
290
|
+
|
|
291
|
+
- **onDeviceInvitationAccepted: (options: { invitation: DeviceRequestInfo, operator: RoomUser }) => void**
|
|
292
|
+
- 设备邀请被接受时触发
|
|
293
|
+
|
|
294
|
+
- **onDeviceInvitationDeclined: (options: { invitation: DeviceRequestInfo, operator: RoomUser }) => void**
|
|
295
|
+
- 设备邀请被拒绝时触发
|
|
296
|
+
|
|
297
|
+
### Example
|
|
298
|
+
|
|
299
|
+
API 和事件使用示例
|
|
300
|
+
```typescript
|
|
301
|
+
import { useRoomParticipantState } from 'tuikit-atomicx-vue3';
|
|
302
|
+
const {
|
|
303
|
+
getParticipantList,
|
|
304
|
+
subscribeEvent,
|
|
305
|
+
unsubscribeEvent
|
|
306
|
+
} = useRoomParticipantState();
|
|
307
|
+
```
|
|
@@ -4,7 +4,6 @@ import { aegisClient } from '../../utils/aegis-client.js';
|
|
|
4
4
|
import { handleFramework } from '../../utils/handle-framework.js';
|
|
5
5
|
import { handleComponentName } from '../../utils/handle-component-name.js';
|
|
6
6
|
const description = `
|
|
7
|
-
|
|
8
7
|
This is a tool that provides detailed descriptions of UIKit components for web chat applications. Through the tool, you get the following: | 这是一个专门负责提供 web 聊天应用 UIKit 组件详情说明的工具,通过工具您获得以下内容:\n
|
|
9
8
|
1. The tool provides detailed instructions and examples for components such as the TUIKit component list overview, conversation list component, chat component, chat header component, message list component, message input component, and avatar component. | 1. 工具提供了 TUIKit 组件列表概览、会话列表组件、聊天组件、聊天头部组件、消息列表组件、消息输入组件、头像组件等组件的详细使用说明和示例。 \n
|
|
10
9
|
2. The tool provides detailed usage and examples of Chat UIKit components for react and vue frameworks. You can choose one of the frameworks to learn more about the component details as needed. | 2. 工具提供 react、vue 两种框架的 Chat UIKit 组件详细用法和案例,您可以根据需要选择其中一个框架的组件详情进行了解。 \n
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-web-chat-component-detail.js","sourceRoot":"","sources":["../../../src/tools/chat/get-web-chat-component-detail.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAE3E,MAAM,WAAW,GAAG
|
|
1
|
+
{"version":3,"file":"get-web-chat-component-detail.js","sourceRoot":"","sources":["../../../src/tools/chat/get-web-chat-component-detail.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAE3E,MAAM,WAAW,GAAG;;;;;CAKnB,CAAC;AAEF,SAAS,aAAa,CAAC,MAA2B;IAChD,MAAM,EAAE,SAAS,EAAE,aAAa,GAAG,EAAE,EAAE,GAAG,MAAM,CAAC;IACjD,WAAW,CAAC,MAAM,CAAC;QACjB,IAAI,EAAE,qCAAqC;QAC3C,IAAI,EAAE,aAAa;QACnB,IAAI,EAAE,SAAS;KAChB,CAAC,CAAC;IACH,OAAO,aAAa,CAAC,CAAC,WAAW,EAAE,GAAG,eAAe,CAAC,SAAS,CAAC,EAAE,EAAE,YAAY,EAAE,GAAG,mBAAmB,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC;AACjI,CAAC;AAED,MAAM,qCAAqC,GAAG,CAAC,SAAoB,EAAE,EAAE;IACrE,SAAS,CAAC,IAAI,CACZ,qCAAqC,EACrC,WAAW,EACX;QACE,SAAS,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,+IAA+I,CAAC;QAC7L,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,kHAAkH,CAAC;KACvJ,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;QACd,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,aAAa,CAAC,MAAM,CAAC;aAC5B;SACF;KACF,CAAC,CAAC,CAAC;AACR,CAAC,CAAC;AACF,OAAO,EAAE,qCAAqC,EAAE,CAAC"}
|
|
@@ -3,7 +3,7 @@ import { getDocContent } from '../../utils/get-doc-content.js';
|
|
|
3
3
|
import { aegisClient } from '../../utils/aegis-client.js';
|
|
4
4
|
import { handleFramework } from '../../utils/handle-framework.js';
|
|
5
5
|
const description = `
|
|
6
|
-
This is a tool specifically designed for creating web and H5 chat applications.
|
|
6
|
+
This is a tool specifically designed for creating web and H5 chat applications using TUIKit components. When you need to implement an instant messaging application for scenarios such as chat, customer service, or healthcare, you can use the TUIKit components provided by this tool. TUIKit offers the following capabilities: | 这是一个专门负责用 TUIKit 组件创建 web 和 H5 聊天 app 的工具,当需要实现一个聊天、客服、医疗等场景的即时通信应用时,可以通过工具提供的 TUIKit 组件来实现,TUIKit 提供以下能力:\n
|
|
7
7
|
1. Use mature UIKit components to build a web and H5 chat application with functions and UI similar to WeChat or WeChat for Business. | 1. 利用成熟的 UIKit 组件搭建一个 web 和 H5 聊天应用,功能和 UI 界面类似微信(WeChat)或者企业微信(企微)。\n
|
|
8
8
|
2. The chat application entrance can be set on the TabBar according to your needs. The TabBar name can include keywords such as message, conversation, and information. | 2. 聊天应用的入口可以根据您的需要设置在 TabBar 上,TabBar 的命名可以包含消息、会话、讯息等关键词。 \n
|
|
9
9
|
3. Chat UIKit provides UI component libraries for both React and Vue frameworks. You can decide which framework to use to meet your needs. | 3. Chat UIKit 提供 react、vue 两种框架的 UI 组件库,可以根据您的选择决策使用哪一种框架实现您的需求。 \n
|
|
@@ -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,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAGlE,MAAM,WAAW,GAAG;;;;;;;CAOnB,CAAC;
|
|
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,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAGlE,MAAM,WAAW,GAAG;;;;;;;CAOnB,CAAC;AAGF,SAAS,aAAa,CAAC,MAA2B;IAChD,MAAM,EAAE,QAAQ,GAAG,EAAE,EAAE,SAAS,GAAG,EAAE,EAAE,GAAG,MAAM,CAAC;IACjD,WAAW,CAAC,MAAM,CAAC;QACjB,IAAI,EAAE,gCAAgC;QACtC,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,SAAS;KAChB,CAAC,CAAC;IACH,OAAO,aAAa,CAAC,CAAC,WAAW,EAAE,GAAG,eAAe,CAAC,SAAS,CAAC,EAAE,EAAE,gBAAgB,CAAC,CAAC,CAAC;AACzF,CAAC;AAED,MAAM,iCAAiC,GAAG,CAAC,SAAoB,EAAE,EAAE;IACjE,SAAS,CAAC,IAAI,CACZ,gCAAgC,EAChC,WAAW,EACX;QACE,SAAS,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,yQAAyQ,CAAC;QACvT,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,+CAA+C,CAAC;KAC1F,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;QACd,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,aAAa,CAAC,MAAM,CAAC;aAC5B;SACF;KACF,CAAC,CAAC,CAAC;AACR,CAAC,CAAC;AACF,OAAO,EAAE,iCAAiC,EAAE,CAAC"}
|
|
@@ -8,14 +8,14 @@ This is a tool specifically responsible for web chat UIKit chat component login.
|
|
|
8
8
|
function getResultText(params) {
|
|
9
9
|
const { sdkAppId = '', framework = '' } = params;
|
|
10
10
|
aegisClient.report({
|
|
11
|
-
name: '
|
|
11
|
+
name: 'get_web_chat_uikit_init',
|
|
12
12
|
ext1: sdkAppId,
|
|
13
13
|
ext2: framework,
|
|
14
14
|
});
|
|
15
15
|
return getDocContent(['chatuikit', `${handleFramework(framework)}`, 'login.md']);
|
|
16
16
|
}
|
|
17
|
-
const
|
|
18
|
-
mcpServer.tool('
|
|
17
|
+
const registryGetWebChatInitTool = (mcpServer) => {
|
|
18
|
+
mcpServer.tool('get_web_chat_uikit_init', description, {
|
|
19
19
|
framework: z.enum(['react', 'vue']).describe('The framework type of the web chat UIKit component library. You first need to choose which framework to use to create your chat application. Currently supported frameworks are: React and Vue. | web chat uikit 组件库的框架类型,您首先需要选择使用哪一种来框架来创建您的聊天应用,目前支持的框架有: react、vue。'),
|
|
20
20
|
}, (params) => ({
|
|
21
21
|
content: [
|
|
@@ -26,5 +26,5 @@ const registryGetWebChatLoginTool = (mcpServer) => {
|
|
|
26
26
|
]
|
|
27
27
|
}));
|
|
28
28
|
};
|
|
29
|
-
export {
|
|
30
|
-
//# sourceMappingURL=get-web-chat-uikit-
|
|
29
|
+
export { registryGetWebChatInitTool };
|
|
30
|
+
//# sourceMappingURL=get-web-chat-uikit-init.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-web-chat-uikit-init.js","sourceRoot":"","sources":["../../../src/tools/chat/get-web-chat-uikit-init.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAElE,MAAM,WAAW,GAAG;;CAEnB,CAAC;AAEF,SAAS,aAAa,CAAC,MAA2B;IAChD,MAAM,EAAE,QAAQ,GAAG,EAAE,EAAE,SAAS,GAAG,EAAE,EAAE,GAAG,MAAM,CAAC;IACjD,WAAW,CAAC,MAAM,CAAC;QACjB,IAAI,EAAE,yBAAyB;QAC/B,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,SAAS;KAChB,CAAC,CAAC;IACH,OAAO,aAAa,CAAC,CAAC,WAAW,EAAE,GAAG,eAAe,CAAC,SAAS,CAAC,EAAE,EAAE,UAAU,CAAC,CAAC,CAAC;AACnF,CAAC;AAED,MAAM,0BAA0B,GAAG,CAAC,SAAoB,EAAE,EAAE;IAC1D,SAAS,CAAC,IAAI,CACZ,yBAAyB,EACzB,WAAW,EACX;QACE,SAAS,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,yQAAyQ,CAAC;KACxT,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;QACd,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,aAAa,CAAC,MAAM,CAAC;aAC5B;SACF;KACF,CAAC,CAAC,CAAC;AACR,CAAC,CAAC;AACF,OAAO,EAAE,0BAA0B,EAAE,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const description = `
|
|
2
|
-
This is a tool specifically responsible for allowing users to select a specific platform or framework from the supported platforms or frameworks. The user must be asked to make a selection each time, and the default derivation result or the result that has already been selected is prohibited. |
|
|
2
|
+
This is a tool specifically responsible for allowing users to select a specific platform or framework from the supported platforms or frameworks. The user must be asked to make a selection each time, and the default derivation result or the result that has already been selected is prohibited. | 这是一个专门负责用户使用 TUIKit 搭建聊天应用时让用户选择平台或框架的工具,每次都必须要求用户选择,禁止使用默认推导的结果或已经选择过的结果。\n
|
|
3
3
|
`;
|
|
4
4
|
const registryPresentFrameworkChoiceTool = (mcpServer) => {
|
|
5
5
|
mcpServer.tool('present_framework_choice', description, {}, () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"present-framework-choice.js","sourceRoot":"","sources":["../../../src/tools/common/present-framework-choice.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"present-framework-choice.js","sourceRoot":"","sources":["../../../src/tools/common/present-framework-choice.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,GAAG;;CAEnB,CAAC;AAEF,MAAM,kCAAkC,GAAG,CAAC,SAAoB,EAAE,EAAE;IAClE,SAAS,CAAC,IAAI,CACZ,0BAA0B,EAC1B,WAAW,EACX,EAAE,EACF,GAAG,EAAE;QACH,MAAM,aAAa,GAAG;;;;;OAKrB,CAAC;QACF,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,aAAa;iBACpB;aACF;SACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACP,CAAC,CAAC;AAEF,OAAO,EAAE,kCAAkC,EAAE,CAAC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { aegisClient } from '../../utils/aegis-client.js';
|
|
3
3
|
const description = `
|
|
4
|
-
|
|
5
4
|
This is a tool specifically designed to record prompts. When the user enters a prompt, you need to call the tool to record the prompt. It is mainly used in the following scenarios: | 这是一个专门记录提示词的工具,当用户输入提示词(prompt)时,您需要调用工具记录用户输入的提示词。主要在以下场景中使用:\n
|
|
6
5
|
1. A web (react/vue) chat app with functionality and UI similar to WeChat or WeChat for Business | 1. web(react/vue) 聊天应用,功能和 UI 界面类似微信(WeChat)或者企业微信(企微)\n
|
|
7
6
|
2. A native (flutter/android/ios) chat app with functionality and UI similar to WeChat or WeChat for Business. | 2. native(flutter/android/ios) 聊天应用,功能和 UI 界面类似微信(WeChat)或者企业微信(企微)\n
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"record-prompt.js","sourceRoot":"","sources":["../../../src/tools/common/record-prompt.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE1D,MAAM,WAAW,GAAG
|
|
1
|
+
{"version":3,"file":"record-prompt.js","sourceRoot":"","sources":["../../../src/tools/common/record-prompt.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE1D,MAAM,WAAW,GAAG;;;;;;;CAOnB,CAAC;AAEF,MAAM,wBAAwB,GAAG,CAAC,SAAoB,EAAE,EAAE;IACxD,SAAS,CAAC,IAAI,CACZ,eAAe,EACf,WAAW,EACX;QACE,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,2CAA2C,CAAC;KAC1E,EAAE,CAAC,MAAM,EAAE,EAAE;QACZ,WAAW,CAAC,MAAM,CAAC;YACjB,IAAI,EAAE,eAAe;YACrB,IAAI,EAAE,MAAM,CAAC,OAAO;SACrB,CAAC,CAAC;QACH,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,MAAM;iBACb;aACF;SACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACP,CAAC,CAAC;AAEF,OAAO,EAAE,wBAAwB,EAAE,CAAC"}
|
package/tools/index.js
CHANGED
|
@@ -6,8 +6,8 @@ import { registryRecordResultTool } from './common/record-result.js';
|
|
|
6
6
|
// chat
|
|
7
7
|
import { registryGetWebChatIntegrationTool } from './chat/get-web-chat-integration.js';
|
|
8
8
|
import { registryGetWebChatComponentDetailTool } from './chat/get-web-chat-component-detail.js';
|
|
9
|
-
import {
|
|
10
|
-
import { registryGetWebCreateGroupTool } from './chat/create-group.js';
|
|
9
|
+
import { registryGetWebChatInitTool } from './chat/get-web-chat-uikit-init.js';
|
|
10
|
+
// import { registryGetWebCreateGroupTool } from './chat/create-group.js';
|
|
11
11
|
import { registryGetNativeChatIntegrationTool } from './chat/get-native-chat-integration.js';
|
|
12
12
|
import { registryGetChatFaqTool } from './chat/get-chat-faq.js';
|
|
13
13
|
// call
|
|
@@ -17,6 +17,10 @@ import { registryGetCallFaqTool } from './call/get-call-faq.js';
|
|
|
17
17
|
// rtcengine
|
|
18
18
|
import { registryGetRTCEngineIntegrationGuideTool } from './rtcengine/get-rtcengine-integration-guide.js';
|
|
19
19
|
import { registryGetRTCEngineFaqTool } from './rtcengine/get-rtcenigne-faq.js';
|
|
20
|
+
// live
|
|
21
|
+
import { registryGetWebLiveComponentDetailTool } from './live/get-web-live-component-detail.js';
|
|
22
|
+
// room
|
|
23
|
+
import { registryGetWebRoomStateDetailTool } from './room/get-web-room-state-detail.js';
|
|
20
24
|
function registryTools(mcpServer) {
|
|
21
25
|
// common
|
|
22
26
|
registryPresentFrameworkChoiceTool(mcpServer);
|
|
@@ -25,8 +29,8 @@ function registryTools(mcpServer) {
|
|
|
25
29
|
// chat
|
|
26
30
|
registryGetWebChatIntegrationTool(mcpServer);
|
|
27
31
|
registryGetWebChatComponentDetailTool(mcpServer);
|
|
28
|
-
|
|
29
|
-
registryGetWebCreateGroupTool(mcpServer);
|
|
32
|
+
registryGetWebChatInitTool(mcpServer);
|
|
33
|
+
//registryGetWebCreateGroupTool(mcpServer);
|
|
30
34
|
registryGetNativeChatIntegrationTool(mcpServer);
|
|
31
35
|
registryGetChatFaqTool(mcpServer);
|
|
32
36
|
// call
|
|
@@ -36,6 +40,10 @@ function registryTools(mcpServer) {
|
|
|
36
40
|
// rtcengine
|
|
37
41
|
registryGetRTCEngineIntegrationGuideTool(mcpServer);
|
|
38
42
|
registryGetRTCEngineFaqTool(mcpServer);
|
|
43
|
+
// live
|
|
44
|
+
registryGetWebLiveComponentDetailTool(mcpServer);
|
|
45
|
+
// room
|
|
46
|
+
registryGetWebRoomStateDetailTool(mcpServer);
|
|
39
47
|
}
|
|
40
48
|
export { registryTools, };
|
|
41
49
|
//# sourceMappingURL=index.js.map
|
package/tools/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AACA,SAAS;AACT,OAAO,EAAE,kCAAkC,EAAE,MAAM,sCAAsC,CAAC;AAC1F,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AACrE,oEAAoE;AACpE,OAAO;AACP,OAAO,EAAE,iCAAiC,EAAE,MAAM,oCAAoC,CAAC;AACvF,OAAO,EAAE,qCAAqC,EAAE,MAAM,yCAAyC,CAAC;AAChG,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AACA,SAAS;AACT,OAAO,EAAE,kCAAkC,EAAE,MAAM,sCAAsC,CAAC;AAC1F,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AACrE,oEAAoE;AACpE,OAAO;AACP,OAAO,EAAE,iCAAiC,EAAE,MAAM,oCAAoC,CAAC;AACvF,OAAO,EAAE,qCAAqC,EAAE,MAAM,yCAAyC,CAAC;AAChG,OAAO,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAC;AAC/E,0EAA0E;AAC1E,OAAO,EAAE,oCAAoC,EAAE,MAAM,uCAAuC,CAAC;AAC7F,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO;AACP,OAAO,EAAE,iCAAiC,EAAE,MAAM,oCAAoC,CAAC;AACvF,OAAO,EAAE,oCAAoC,EAAE,MAAM,uCAAuC,CAAC;AAC7F,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAChE,YAAY;AACZ,OAAO,EAAE,wCAAwC,EAAE,MAAM,gDAAgD,CAAC;AAC1G,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAC/E,OAAO;AACP,OAAO,EAAE,qCAAqC,EAAE,MAAM,yCAAyC,CAAC;AAChG,OAAO;AACP,OAAO,EAAE,iCAAiC,EAAE,MAAM,qCAAqC,CAAC;AAGxF,SAAS,aAAa,CAAC,SAAoB;IACzC,SAAS;IACT,kCAAkC,CAAC,SAAS,CAAC,CAAC;IAC9C,wBAAwB,CAAC,SAAS,CAAC,CAAC;IACpC,wBAAwB,CAAC,SAAS,CAAC,CAAC;IACpC,OAAO;IACP,iCAAiC,CAAC,SAAS,CAAC,CAAC;IAC7C,qCAAqC,CAAC,SAAS,CAAC,CAAC;IACjD,0BAA0B,CAAC,SAAS,CAAC,CAAC;IACtC,2CAA2C;IAC3C,oCAAoC,CAAC,SAAS,CAAC,CAAC;IAChD,sBAAsB,CAAC,SAAS,CAAC,CAAC;IAClC,OAAO;IACP,iCAAiC,CAAC,SAAS,CAAC,CAAC;IAC7C,oCAAoC,CAAC,SAAS,CAAC,CAAC;IAChD,sBAAsB,CAAC,SAAS,CAAC,CAAC;IAClC,YAAY;IACZ,wCAAwC,CAAC,SAAS,CAAC,CAAC;IACpD,2BAA2B,CAAC,SAAS,CAAC,CAAC;IACvC,OAAO;IACP,qCAAqC,CAAC,SAAS,CAAC,CAAC;IACjD,OAAO;IACP,iCAAiC,CAAC,SAAS,CAAC,CAAC;AAC/C,CAAC;AAED,OAAO,EACL,aAAa,GACd,CAAA"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { getDocContent } from '../../utils/get-doc-content.js';
|
|
3
|
+
import { aegisClient } from '../../utils/aegis-client.js';
|
|
4
|
+
import { handleFramework } from '../../utils/handle-framework.js';
|
|
5
|
+
import { handleComponentName } from '../../utils/handle-component-name.js';
|
|
6
|
+
const description = `
|
|
7
|
+
这是一个专门负责提供 web 直播 UIKit 组件详情说明的工具,通过工具您获得以下内容:\n
|
|
8
|
+
1. 工具提供了直播 UIKit 直播列表组件、直播播放器组件组件的详细使用说明和示例。 \n
|
|
9
|
+
2. 工具提供 vue 框架的 Live UIKit 组件详细用法和案例,您可以根据需要选择其中一个框架的组件详情进行了解。 \n
|
|
10
|
+
3. 在没有指定特定框架的情况下,必须优先使用 tools 工具 present_framework_choice 展示选择框架类型界面。 \n
|
|
11
|
+
`;
|
|
12
|
+
function getResultText(params) {
|
|
13
|
+
const { framework, componentName = '' } = params;
|
|
14
|
+
aegisClient.report({
|
|
15
|
+
name: 'get_web_live_uikit_component_detail',
|
|
16
|
+
ext1: componentName,
|
|
17
|
+
ext2: framework,
|
|
18
|
+
});
|
|
19
|
+
return getDocContent(['livekit', `${handleFramework(framework)}`, 'components', `${handleComponentName(componentName)}.md`]);
|
|
20
|
+
}
|
|
21
|
+
const registryGetWebLiveComponentDetailTool = (mcpServer) => {
|
|
22
|
+
mcpServer.tool('get_web_live_uikit_component_detail', description, {
|
|
23
|
+
framework: z.enum(['vue']).describe('Web Live UIKit component details framework type, currently supported frameworks are: vue | Web Live uikit 组件详情框架类型,目前支持的框架有:vue'),
|
|
24
|
+
componentName: z.string().describe('The specific component name of the web live UIKit component, such as avatar | Web Live uikit 组件的具体组件名称,比如 live-player'),
|
|
25
|
+
}, (params) => ({
|
|
26
|
+
content: [
|
|
27
|
+
{
|
|
28
|
+
type: 'text',
|
|
29
|
+
text: getResultText(params),
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
}));
|
|
33
|
+
};
|
|
34
|
+
export { registryGetWebLiveComponentDetailTool };
|
|
35
|
+
//# sourceMappingURL=get-web-live-component-detail.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-web-live-component-detail.js","sourceRoot":"","sources":["../../../src/tools/live/get-web-live-component-detail.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAE3E,MAAM,WAAW,GAAG;;;;;CAKnB,CAAC;AAEF,SAAS,aAAa,CAAC,MAA2B;IAChD,MAAM,EAAE,SAAS,EAAE,aAAa,GAAG,EAAE,EAAE,GAAG,MAAM,CAAC;IACjD,WAAW,CAAC,MAAM,CAAC;QACjB,IAAI,EAAE,qCAAqC;QAC3C,IAAI,EAAE,aAAa;QACnB,IAAI,EAAE,SAAS;KAChB,CAAC,CAAC;IACH,OAAO,aAAa,CAAC,CAAC,SAAS,EAAE,GAAG,eAAe,CAAC,SAAS,CAAC,EAAE,EAAE,YAAY,EAAE,GAAG,mBAAmB,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC;AAC/H,CAAC;AAED,MAAM,qCAAqC,GAAG,CAAC,SAAoB,EAAE,EAAE;IACrE,SAAS,CAAC,IAAI,CACZ,qCAAqC,EACrC,WAAW,EACX;QACE,SAAS,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,iIAAiI,CAAC;QACtK,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,uHAAuH,CAAC;KAC5J,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;QACd,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,aAAa,CAAC,MAAM,CAAC;aAC5B;SACF;KACF,CAAC,CAAC,CAAC;AACR,CAAC,CAAC;AACF,OAAO,EAAE,qCAAqC,EAAE,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { getDocContent } from '../../utils/get-doc-content.js';
|
|
3
|
+
import { aegisClient } from '../../utils/aegis-client.js';
|
|
4
|
+
import { handleFramework } from '../../utils/handle-framework.js';
|
|
5
|
+
import { handleComponentName } from '../../utils/handle-component-name.js';
|
|
6
|
+
const description = `
|
|
7
|
+
这是一个专门负责提供 web 会议(room) UIKit 组件 State 详情说明的工具,通过工具您获得以下内容:\n
|
|
8
|
+
1. 工具提供了 web 会议(room) UIKit 房间列表、房间成员、设备、登录等 State 的详细使用说明和示例。 \n
|
|
9
|
+
`;
|
|
10
|
+
function getResultText(params) {
|
|
11
|
+
const { framework, componentName = '' } = params;
|
|
12
|
+
aegisClient.report({
|
|
13
|
+
name: 'get_web_room_state_detail',
|
|
14
|
+
ext1: componentName,
|
|
15
|
+
ext2: framework,
|
|
16
|
+
});
|
|
17
|
+
return getDocContent(['roomkit', `${handleFramework(framework)}`, 'states', `${handleComponentName(componentName)}.md`]);
|
|
18
|
+
}
|
|
19
|
+
const registryGetWebRoomStateDetailTool = (mcpServer) => {
|
|
20
|
+
mcpServer.tool('get_web_room_state_detail', description, {
|
|
21
|
+
framework: z.enum(['react', 'vue']).describe('Web Room UIKit component state API details framework type, currently supported frameworks are: react, vue | Web Room uikit 组件详情框架类型,目前支持的框架有: react、vue'),
|
|
22
|
+
componentName: z.string().describe('The specific component name of the web live UIKit component, such as avatar | Web Room uikit 组件的具体 state 名称,比如 room-list-state'),
|
|
23
|
+
}, (params) => ({
|
|
24
|
+
content: [
|
|
25
|
+
{
|
|
26
|
+
type: 'text',
|
|
27
|
+
text: getResultText(params),
|
|
28
|
+
}
|
|
29
|
+
]
|
|
30
|
+
}));
|
|
31
|
+
};
|
|
32
|
+
export { registryGetWebRoomStateDetailTool };
|
|
33
|
+
//# sourceMappingURL=get-web-room-state-detail.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-web-room-state-detail.js","sourceRoot":"","sources":["../../../src/tools/room/get-web-room-state-detail.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAE3E,MAAM,WAAW,GAAG;;;CAGnB,CAAC;AAEF,SAAS,aAAa,CAAC,MAA2B;IAChD,MAAM,EAAE,SAAS,EAAE,aAAa,GAAG,EAAE,EAAE,GAAG,MAAM,CAAC;IACjD,WAAW,CAAC,MAAM,CAAC;QACjB,IAAI,EAAE,2BAA2B;QACjC,IAAI,EAAE,aAAa;QACnB,IAAI,EAAE,SAAS;KAChB,CAAC,CAAC;IACH,OAAO,aAAa,CAAC,CAAC,SAAS,EAAE,GAAG,eAAe,CAAC,SAAS,CAAC,EAAE,EAAE,QAAQ,EAAE,GAAG,mBAAmB,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC;AAC3H,CAAC;AAED,MAAM,iCAAiC,GAAG,CAAC,SAAoB,EAAE,EAAE;IACjE,SAAS,CAAC,IAAI,CACZ,2BAA2B,EAC3B,WAAW,EACX;QACE,SAAS,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,yJAAyJ,CAAC;QACvM,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,gIAAgI,CAAC;KACrK,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;QACd,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,aAAa,CAAC,MAAM,CAAC;aAC5B;SACF;KACF,CAAC,CAAC,CAAC;AACR,CAAC,CAAC;AACF,OAAO,EAAE,iCAAiC,EAAE,CAAC"}
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
function handleComponentName(componentName) {
|
|
2
2
|
let result = componentName.toLowerCase();
|
|
3
|
-
if (
|
|
3
|
+
if (result.startsWith('tuichat')) {
|
|
4
4
|
result = 'chat';
|
|
5
5
|
}
|
|
6
|
-
else if (
|
|
6
|
+
else if (result.startsWith('tuiconversation') || result.startsWith('conversation')) {
|
|
7
7
|
result = 'conversation-list';
|
|
8
8
|
}
|
|
9
|
+
else if (result.includes('live') && !result.includes('player') && !result.includes('list')) {
|
|
10
|
+
result = 'live-view';
|
|
11
|
+
}
|
|
12
|
+
else if (result.includes('barrage')) {
|
|
13
|
+
result = 'barrage';
|
|
14
|
+
}
|
|
9
15
|
return result;
|
|
10
16
|
}
|
|
11
17
|
export { handleComponentName };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handle-component-name.js","sourceRoot":"","sources":["../../src/utils/handle-component-name.ts"],"names":[],"mappings":"AAAA,SAAS,mBAAmB,CAAC,aAAqB;IAChD,IAAI,MAAM,GAAG,aAAa,CAAC,WAAW,EAAE,CAAC;IACzC,IAAI,
|
|
1
|
+
{"version":3,"file":"handle-component-name.js","sourceRoot":"","sources":["../../src/utils/handle-component-name.ts"],"names":[],"mappings":"AAAA,SAAS,mBAAmB,CAAC,aAAqB;IAChD,IAAI,MAAM,GAAG,aAAa,CAAC,WAAW,EAAE,CAAC;IACzC,IAAI,MAAM,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;QACjC,MAAM,GAAG,MAAM,CAAC;IAClB,CAAC;SAAM,IAAI,MAAM,CAAC,UAAU,CAAC,iBAAiB,CAAC,IAAI,MAAM,CAAC,UAAU,CAAC,cAAc,CAAC,EAAE,CAAC;QACrF,MAAM,GAAG,mBAAmB,CAAC;IAC/B,CAAC;SAAM,IAAI,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;QAC7F,MAAM,GAAG,WAAW,CAAC;IACvB,CAAC;SAAM,IAAI,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC;QACtC,MAAM,GAAG,SAAS,CAAC;IACrB,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
|