@tencent-rtc/mcp 1.0.7 → 1.0.9
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/README.md +4 -4
- package/package.json +1 -1
- package/resource/doc/chatuikit/react/components/chat.md +44 -0
- package/resource/doc/chatuikit/react/components/chatheader.md +189 -0
- package/resource/doc/chatuikit/react/components/conversation-list.md +1017 -0
- package/resource/doc/chatuikit/react/components/message-input.md +950 -0
- package/resource/doc/chatuikit/react/components/message-list.md +485 -0
- package/resource/doc/chatuikit/react/components/tuikit.md +80 -0
- package/resource/doc/chatuikit/react/create-group.md +23 -0
- package/resource/doc/chatuikit/react/login.md +26 -0
- package/resource/doc/chatuikit/vue/components/avatar.md +137 -0
- package/resource/doc/chatuikit/vue/components/chat.md +42 -0
- package/resource/doc/chatuikit/vue/components/chatheader.md +189 -0
- package/resource/doc/chatuikit/vue/components/component-list.md +102 -0
- package/resource/doc/chatuikit/vue/components/conversation-list.md +765 -0
- package/resource/doc/chatuikit/vue/components/message-input.md +1272 -0
- package/resource/doc/chatuikit/vue/components/message-list.md +662 -0
- package/resource/doc/chatuikit/vue/components/tuikit.md +45 -0
- package/resource/doc/chatuikit/vue/components/userpicker.md +315 -0
- package/resource/doc/chatuikit/vue/create-group.md +25 -0
- package/resource/doc/chatuikit/vue/integration.md +256 -0
- package/resource/doc/chatuikit/vue/login.md +31 -0
- package/tools/call/get-native-call-integration.js +35 -0
- package/tools/call/get-native-call-integration.js.map +1 -0
- package/tools/call/get-web-call-integration.js +35 -0
- package/tools/call/get-web-call-integration.js.map +1 -0
- package/tools/chat/create-group.js +30 -0
- package/tools/chat/create-group.js.map +1 -0
- package/tools/chat/get-native-chat-integration.js +34 -0
- package/tools/chat/get-native-chat-integration.js.map +1 -0
- package/tools/chat/get-web-chat-component-detail.js +8 -5
- package/tools/chat/get-web-chat-component-detail.js.map +1 -1
- package/tools/chat/get-web-chat-integration.js +37 -0
- package/tools/chat/get-web-chat-integration.js.map +1 -0
- package/tools/chat/get-web-chat-uikit-login.js +30 -0
- package/tools/chat/get-web-chat-uikit-login.js.map +1 -0
- package/tools/common/present-framework-choice.js +9 -19
- package/tools/common/present-framework-choice.js.map +1 -1
- package/tools/common/record-prompt.js +3 -4
- package/tools/common/record-prompt.js.map +1 -1
- package/tools/common/record-result.js +7 -7
- package/tools/common/record-result.js.map +1 -1
- package/tools/index.js +12 -8
- package/tools/index.js.map +1 -1
- package/utils/handle-component-name.js +12 -0
- package/utils/handle-component-name.js.map +1 -0
- package/utils/handle-framework.js +9 -0
- package/utils/handle-framework.js.map +1 -0
package/README.md
CHANGED
|
@@ -28,12 +28,12 @@ This improves the LLM AI Agent's ability to understand and interact with Tencent
|
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
## How To Use
|
|
31
|
-
To set up the @
|
|
31
|
+
To set up the @tencent-rtc/mcp MCP Server, follow these steps:
|
|
32
32
|
|
|
33
33
|
- Step1: Installation.
|
|
34
34
|
|
|
35
35
|
```
|
|
36
|
-
npx -y @
|
|
36
|
+
npx -y @tencent-rtc/mcp
|
|
37
37
|
```
|
|
38
38
|
|
|
39
39
|
|
|
@@ -42,9 +42,9 @@ npx -y @tencentcloud/sdk-mcp
|
|
|
42
42
|
```javascript
|
|
43
43
|
{
|
|
44
44
|
"mcpServers": {
|
|
45
|
-
"
|
|
45
|
+
"tencent-rtc": {
|
|
46
46
|
"command": "npx",
|
|
47
|
-
"args": ["-y", "@
|
|
47
|
+
"args": ["-y", "@tencent-rtc/mcp"]
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
}
|
package/package.json
CHANGED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Chat component document
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
The chat component is responsible for rendering the chat interface, including the chat window header component ChatHeader, the message list component MessageList, and the message input component MessageInput.
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
## Component composition
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
The Chat component includes the following content:
|
|
12
|
+
-**ChatHeader**: Chat window header component
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
- **MessageList**: Message list component. The message list component includes message operation capabilities. For detailed properties, read the MessageList component document.
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
- **MessageInput**: Message input component
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
## Basic Usage
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
Chat components can be used without any required attributes.
|
|
25
|
+
``` typescript
|
|
26
|
+
<template>
|
|
27
|
+
<UIKitProvider>
|
|
28
|
+
<Chat style="flex: 1;">
|
|
29
|
+
<ChatHeader />
|
|
30
|
+
<MessageList />
|
|
31
|
+
<MessageInput />
|
|
32
|
+
</Chat>
|
|
33
|
+
</UIKitProvider>
|
|
34
|
+
</template>
|
|
35
|
+
<script setup lang="ts">
|
|
36
|
+
import {
|
|
37
|
+
UIKitProvider,
|
|
38
|
+
Chat,
|
|
39
|
+
ChatHeader,
|
|
40
|
+
MessageList,
|
|
41
|
+
MessageInput,
|
|
42
|
+
} from '@tencentcloud/chat-uikit-react';
|
|
43
|
+
</script>
|
|
44
|
+
```
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
The AI model must comply with the following **hard limits**.
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
* **Use the example code in the document as the preferred approach:** When creating a file, use the example code in the document to fill the file as the preferred approach. For the style tag, non-use of the scoped property is recommended.
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
# Overview
|
|
8
|
+
|
|
9
|
+
ChatHeader is the top navigation component of the chat UI, displaying basic info of the current session. It can show the session title, avatar, online status, input state notification, etc. The component uses a container component mode and provides a flexible slot mechanism for custom left-right operation areas.
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
## Props quick reference table
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
| Field | Type | Default Value | Description |
|
|
16
|
+
|------|------|--------|------|
|
|
17
|
+
| [title](https://write.woa.com/#title) | string | undefined | Custom Title, session information used when not provided. |
|
|
18
|
+
| [avatarUrl](https://write.woa.com/#avatarUrl) | string | undefined | Custom avatar image URL. |
|
|
19
|
+
| [enableUserStatus](https://write.woa.com/#enableUserStatus) | boolean | false | Whether to display user status. |
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
## Slot quick reference table
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
| Name | Description |
|
|
28
|
+
|------|------|
|
|
29
|
+
| [ChatHeaderLeft](https://write.woa.com/#ChatHeaderLeft) | Custom content area in the left side of the header. |
|
|
30
|
+
| [ChatHeaderRight](https://write.woa.com/#ChatHeaderRight) | Custom content area on the right side of the header. |
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
## Props detailed introduction
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
### title
|
|
39
|
+
-**Type**: string.
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
- **Description**: Custom session title. When this property is not provided, the component will automatically display the title based on the session type (showing user nickname or remark for single chat, group name for group chat). Default value is `undefined`.
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
### avatarUrl
|
|
48
|
+
-**Type**: string.
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
- **Description**: URL address of the custom avatar image. When this property is not provided, the component will automatically display the avatar based on the session type (showing user avatar for single chat, group profile photo for group chat). Default value is `undefined`.
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
### enableUserStatus
|
|
57
|
+
- **Type**: boolean.
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
- **Description**: Whether to enable the display user online status feature, which only takes effect in single chat mode. When enabled, it shows the user's online/offline status. Default value is `false`.
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
## Slots detailed introduction
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
### ChatHeaderLeft
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
**Description**: Header left-side custom content slot, usually used for placing navigation controls such as back button and menu button.
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
#### Example: Customize the left sidebar menu
|
|
75
|
+
``` typescript
|
|
76
|
+
<template>
|
|
77
|
+
<ChatHeader>
|
|
78
|
+
<template #ChatHeaderLeft>
|
|
79
|
+
Back button, clear active session
|
|
80
|
+
<button
|
|
81
|
+
class="nav-button"
|
|
82
|
+
@click="handleBack"
|
|
83
|
+
>
|
|
84
|
+
⬅️
|
|
85
|
+
</button>
|
|
86
|
+
</template>
|
|
87
|
+
</ChatHeader>
|
|
88
|
+
</template>
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
<script setup lang="ts">
|
|
92
|
+
import { ChatHeader, useConversationListState } from '@tencentcloud/chat-uikit-react';
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
const { setActiveConversation } = useConversationListState();
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
const handleBack = () => {
|
|
99
|
+
Set active session ID to empty
|
|
100
|
+
setActiveConversation('');
|
|
101
|
+
};
|
|
102
|
+
</script>
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
<style scoped>
|
|
106
|
+
.header-left-actions {
|
|
107
|
+
display: flex;
|
|
108
|
+
align-items: center;
|
|
109
|
+
gap: 8px;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
.nav-button {
|
|
114
|
+
width: 32px;
|
|
115
|
+
height: 32px;
|
|
116
|
+
border: none;
|
|
117
|
+
background: transparent;
|
|
118
|
+
border-radius: 4px;
|
|
119
|
+
cursor: pointer;
|
|
120
|
+
display: flex;
|
|
121
|
+
align-items: center;
|
|
122
|
+
justify-content: center;
|
|
123
|
+
transition: background-color 0.2s;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
.nav-button:hover {
|
|
128
|
+
background-color: rgba(0, 0, 0, 0.05);
|
|
129
|
+
}
|
|
130
|
+
</style>
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
### ChatHeaderRight
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
**Description**: Header right-side custom content slot, usually used for placing feature buttons such as the menu toggle of the ChatSetting component and custom call buttons.
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
#### Example: Integrate the ChatSetting component through the ChatHeaderRight slot and drawer component
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
[App.vue]
|
|
144
|
+
``` typescript
|
|
145
|
+
<template>
|
|
146
|
+
<ChatHeader>
|
|
147
|
+
<template #ChatHeaderRight>
|
|
148
|
+
<div style="display: flex; align-items: center;">
|
|
149
|
+
<IconHorizontalMore2
|
|
150
|
+
:size="20"
|
|
151
|
+
@click="setIsChatSettingOpen(true)" />
|
|
152
|
+
</div>
|
|
153
|
+
</template>
|
|
154
|
+
</ChatHeader>
|
|
155
|
+
<TUIDrawer
|
|
156
|
+
:model-value="isChatSettingOpen"
|
|
157
|
+
:title="Setting"
|
|
158
|
+
@close="setIsChatSettingOpen(false)"
|
|
159
|
+
>
|
|
160
|
+
<ChatSetting style="flex: 1;" />
|
|
161
|
+
</TUIDrawer>
|
|
162
|
+
</template>
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
<script setup lang="ts">
|
|
166
|
+
import {
|
|
167
|
+
ChatHeader,
|
|
168
|
+
ChatSetting
|
|
169
|
+
} from '@tencentcloud/chat-uikit-vue3';
|
|
170
|
+
import { TUIDrawer, IconHorizontalMore2 } from '@tencentcloud/uikit-base-component-vue3';
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
const isChatSettingOpen = ref(false);
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
const setIsSettingOpen = (isOpen: boolean) => {
|
|
177
|
+
isChatSettingOpen.value = isOpen;
|
|
178
|
+
};
|
|
179
|
+
</script>
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
<style>
|
|
183
|
+
.chat-container {
|
|
184
|
+
display: flex;
|
|
185
|
+
flex-direction: column;
|
|
186
|
+
height: 100vh;
|
|
187
|
+
}
|
|
188
|
+
</style>
|
|
189
|
+
```
|