Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config/.cursor/rules/cloudbase-rules.mdc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

cloudbaseAIVersion:1.8.29
cloudbaseAIVersion:1.8.31
---
description: CloudBase AI 开发规则指南 - 提供场景化的最佳实践,确保开发质量
globs: *
Expand Down
4 changes: 2 additions & 2 deletions mcp/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion mcp/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cloudbase/cloudbase-mcp",
"version": "1.8.29",
"version": "1.8.31",
"description": "腾讯云开发 MCP Server,通过AI提示词和MCP协议+云开发,让开发更智能、更高效,当你在Cursor/ VSCode GitHub Copilot/WinSurf/CodeBuddy/Augment Code/Claude Code等AI编程工具里写代码时,它能自动帮你生成可直接部署的前后端应用+小程序,并一键发布到腾讯云开发 CloudBase。",
"main": "./dist/index.cjs",
"module": "./dist/index.js",
Expand Down
8 changes: 7 additions & 1 deletion mcp/src/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,14 @@ export async function getLoginState() {
debug('TENCENTCLOUD_SECRETID',TENCENTCLOUD_SECRETID)
if (TENCENTCLOUD_SECRETID && TENCENTCLOUD_SECRETKEY) {
debug('loginByApiSecret')
await auth.loginByApiSecret(TENCENTCLOUD_SECRETID, TENCENTCLOUD_SECRETKEY, TENCENTCLOUD_SESSIONTOKEN)
return {
secretId: TENCENTCLOUD_SECRETID,
secretKey: TENCENTCLOUD_SECRETKEY,
token: TENCENTCLOUD_SESSIONTOKEN
}
// await auth.loginByApiSecret(TENCENTCLOUD_SECRETID, TENCENTCLOUD_SECRETKEY, TENCENTCLOUD_SESSIONTOKEN)
}

const loginState = await auth.getLoginState()
if (!loginState) {
debug('loginByApiSecret')
Expand Down
9 changes: 1 addition & 8 deletions mcp/src/interactive-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -957,12 +957,6 @@ export class InteractiveServer {
`).join('') :
`
<div class="empty-state">
<div class="empty-icon">
<svg width="64" height="64" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
<path d="M13 2L3 14h9l-1 8 10-12h-9l1-8z"/>
<path d="M20 6L9 17l-5-5"/>
</svg>
</div>
<h3 class="empty-title">暂无云开发环境</h3>
<p class="empty-message">当前没有可用的云开发 CloudBase 环境,请新建后重新在 AI 对话中重试</p>
<button class="btn btn-primary create-env-btn" onclick="createNewEnv()">
Expand Down Expand Up @@ -1108,8 +1102,7 @@ export class InteractiveServer {
function createNewEnv() {
const integrationIde = '${process.env.INTEGRATION_IDE || "AI Toolkit"}';
const url = \`http://tcb.cloud.tencent.com/dev?from=\${encodeURIComponent(integrationIde)}\`;
console.log('🚀 打开新建环境页面:', url);
window.open(url, '_blank');
location.href = url;
}

function cancel() {
Expand Down