@tencentcloud/sdk-mcp 1.1.7 → 1.1.8

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tencentcloud/sdk-mcp",
3
- "version": "1.1.7",
3
+ "version": "1.1.8",
4
4
  "description": "Tencent Cloud MCP Server for SDK",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -35,6 +35,25 @@ import {
35
35
  useConversationListState,
36
36
  } from "@tencentcloud/chat-uikit-react";
37
37
 
38
+ function ChatApp() {
39
+ const { setActiveConversation } = useConversationListState();
40
+
41
+ useEffect(() => {
42
+ // 打开默认会话
43
+ setActiveConversation('C2Cadministrator');
44
+ }, [setActiveConversation]);
45
+
46
+ return (
47
+ <div style={{ height: '100vh', width: '100vw', display: 'flex', flexDirection: 'row' }}>
48
+ <Chat PlaceholderEmpty=''>
49
+ <ChatHeader />
50
+ <MessageList />
51
+ <MessageInput />
52
+ </Chat>
53
+ </div>
54
+ );
55
+ }
56
+
38
57
  function App() {
39
58
  const userID = ''; // TODO: Replace with your userID
40
59
  const SDKAppID = 0; // TODO: Replace with your SDKAppID (Notice: SDKAppID is of type number)
@@ -49,27 +68,12 @@ function App() {
49
68
  if (status !== LoginStatus.SUCCESS) {
50
69
  return <div>Loading...</div>
51
70
  }
52
-
53
- // 打开默认会话
54
- const { setActiveConversation } = useConversationListState();
55
- setActiveConversation('C2Cadministrator');
56
71
 
57
72
  // Language support zh-CN(default) / en-US / ja-JP / ko-KR / zh-TW
58
73
  // Theme support light(default) / dark
59
74
  return (
60
75
  <UIKitProvider language='zh-CN' theme='light'>
61
- <div style={{
62
- height: '100vh',
63
- width: '100vw',
64
- display: 'flex',
65
- flexDirection: 'row',
66
- }}>
67
- <Chat PlaceholderEmpty=''>
68
- <ChatHeader />
69
- <MessageList />
70
- <MessageInput />
71
- </Chat>
72
- </div>
76
+ <ChatApp />
73
77
  </UIKitProvider>
74
78
  );
75
79
  }
@@ -36,6 +36,26 @@ import {
36
36
  useConversationListState,
37
37
  } from "@tencentcloud/chat-uikit-react";
38
38
 
39
+ function ChatApp() {
40
+ const { setActiveConversation } = useConversationListState();
41
+
42
+ useEffect(() => {
43
+ // 打开默认会话
44
+ setActiveConversation('C2Cadministrator');
45
+ }, [setActiveConversation]);
46
+
47
+ return (
48
+ <div style={{ height: '100vh', width: '100vw', display: 'flex', flexDirection: 'row' }}>
49
+ <ConversationList style={{ minWidth: '300px', maxWidth: '350px' }}/>
50
+ <Chat PlaceholderEmpty=''>
51
+ <ChatHeader />
52
+ <MessageList />
53
+ <MessageInput />
54
+ </Chat>
55
+ </div>
56
+ );
57
+ }
58
+
39
59
  function App() {
40
60
  const userID = ''; // TODO: Replace with your userID
41
61
  const SDKAppID = 0; // TODO: Replace with your SDKAppID (Notice: SDKAppID is of type number)
@@ -50,23 +70,12 @@ function App() {
50
70
  if (status !== LoginStatus.SUCCESS) {
51
71
  return <div>Loading...</div>
52
72
  }
53
-
54
- // 打开默认会话
55
- const { setActiveConversation } = useConversationListState();
56
- setActiveConversation('C2Cadministrator');
57
73
 
58
74
  // Language support zh-CN(default) / en-US / ja-JP / ko-KR / zh-TW
59
75
  // Theme support light(default) / dark
60
76
  return (
61
77
  <UIKitProvider language='zh-CN' theme='light'>
62
- <div style={{ height: '100vh', width: '100vw', display: 'flex', flexDirection: 'row' }}>
63
- <ConversationList style={{ minWidth: '300px', maxWidth: '350px' }}/>
64
- <Chat PlaceholderEmpty=''>
65
- <ChatHeader />
66
- <MessageList />
67
- <MessageInput />
68
- </Chat>
69
- </div>
78
+ < ChatApp />
70
79
  </UIKitProvider>
71
80
  );
72
81
  }
@@ -1,9 +1,9 @@
1
1
  import * as https from 'https';
2
2
  import { aegisClient } from '../../utils/aegis-client.js';
3
3
  const description = `
4
- This tool retrieves the official Tencent Cloud experience account credentials for TUIKit testing. It provides all necessary values: SDKAppID, a test userID, and the corresponding valid userSig, allowing for immediate component integration and login. | 此工具用于获取腾讯云体验官方账号凭证,以进行 TUIKit 测试。它提供所有必要信息:SDKAppID、测试用户 ID 和对应的有效用户签名,从而支持立即进行组件集成和登录。
4
+ It is only invoked when the user has not configured an SDKAppID or explicitly requested an experience account, making it convenient to quickly experience the integration of TUIKit with MCP. | 仅在用户没有配置 SDKAppID 或明确要求获取体验账号时才调用,方便快速体验 MCP 集成 TUIKit。
5
5
  Precautions: | 注意事项:\n
6
- 1. 只允许给用户提供 'SDKAppID'、'userID'、'userSig' 信息。| 1. 只允许给用户提供 'SDKAppID'、'userID'、'userSig' 信息。
6
+ 1. Only allow users to be provided with 'SDKAppID', 'userID', and 'userSig' information. | 1. 只允许给用户提供 'SDKAppID'、'userID'、'userSig' 信息。
7
7
  `;
8
8
  function getOfficialExperienceAccount(url) {
9
9
  return new Promise((resolve, reject) => {
@@ -2,8 +2,8 @@ import { z } from 'zod';
2
2
  import { generateUserSig } from '../../utils/generate-usersig.js';
3
3
  import { aegisClient } from '../../utils/aegis-client.js';
4
4
  const description = `
5
- Generate userSig based on SDKAppID, userID, secretKey, and expireTime. Applicable scenarios: | 根据 SDKAppID、userID、secretKey、expireTime 生成 userSig,适用场景:\n
6
- 1. The user wants to generate userSig | 1. 用户希望生成 userSig\n
5
+ Prioritizes the use of the user-configured SDKAppID and secretKey to generate the userSig for user login. Applicable scenarios: | 优先使用用户配置的 SDKAppID 和 secretKey,生成用户登录的 userSig,适用场景:\n
6
+ 1. Users wish to generate their own configured SDKAppID, userSig. | 1. 用户希望生成自己配置的 SDKAppID 用户 userSig。 \n
7
7
  2. Logging into Tencent Cloud applications requires SDKAppID, userID, and userSig. | 2. 登录腾讯云应用需要 SDKAppID、userID、userSig\n
8
8
  Precautions: | 注意事项:\n
9
9
  1. ExpirationTime is optional, with a default value of 7 days. | 1. expireTime 可选,默认值为 7 天\n
File without changes