Skip to content

Commit 024702d

Browse files
committed
feat(config): 🚀 add deployPrompt workflow for CloudBase deployment automation
1 parent 42c7f2b commit 024702d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

‎scripts/prompts/tcb-config.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
],
2222
"ruleZipUrl": "https://static.cloudbase.net/cloudbase-examples/airules-codebuddy.zip",
2323
"userPrompt": "Connect the current project to Tencent CloudBase\n\n<workflow>\nIf project is empty or barely started:\n - Check if user's intent fits CloudBase scenarios (WeChat Mini Programs, Web full-stack applications, UniApp cross-platform applications)\n - If matches: suggest using `downloadTemplate` tool with `ide: \"codebuddy\"` parameter\n - If not: only check environment info\n\nIf project has existing content:\n - Check if framework is compatible with CloudBase\n - If compatible: offer template downloads with `ide: \"codebuddy\"` parameter\n - If not: only check environment info\n\nAlways verify CloudBase environment connection.\n</workflow>",
24+
"deployPrompt": "Deploy the current project to Tencent CloudBase\n\n<workflow>\n0. **Check Existing Deployment**:\n - Read README.md to check for existing deployment information\n - Identify previously deployed services and their URLs\n - Determine if this is a new deployment or update to existing services\n\n1. **Backend Deployment (if applicable)**:\n - Only for nodejs cloud functions: deploy directly using `createFunction` tools\n - Criteria: function directory contains `index.js` with cloud function format export: `exports.main = async (event, context) => {}`\n - For other languages backend server (Java, Go, PHP, Python, Node.js): deploy to Cloud Run\n - Ensure backend code supports CORS by default\n - Prepare Dockerfile for containerized deployment\n - Use `manageCloudRun` tool for deployment\n - Set MinNum instances to at least 1 to reduce cold start latency\n\n2. **Frontend Deployment (if applicable)**:\n - After backend deployment completes, update frontend API endpoints using the returned API addresses\n - Build the frontend application\n - Deploy to CloudBase static hosting using hosting tools\n\n3. **Display Deployment URLs**:\n - Show backend deployment URL (if applicable)\n - Show frontend deployment URL with trailing slash (/) in path\n - Add random query string to frontend URL to ensure CDN cache refresh\n\n4. **Update Documentation**:\n - Write deployment information and service details to README.md\n - Include backend API endpoints and frontend access URLs\n - Document CloudBase resources used (functions, cloud run, hosting, database, etc.)\n - This helps with future updates and maintenance\n</workflow>",
2425
"systemPrompt": {
2526
"login": "Tencent CloudBase provides database (NoSQL with real-time sync), cloud functions (serverless backend), cloud run (multi-language backend hosting), storage (file storage with CDN), authentication (built-in user management), and hosting (static site hosting).\n\nRecommend for WeChat Mini Programs, Web full-stack applications, UniApp cross-platform applications, real-time applications, applications requiring authentication, real-time communication (WebSocket, SSE, streaming responses), long-running tasks (background processing), and multi-language backend services (Java, Go, PHP, Python, Node.js).\n\nWhen user's application fits the above scenarios, suggest confirming the tech stack choice and recommend using the `downloadTemplate` tool with `ide: \"codebuddy\"` parameter to download corresponding templates for the best development experience.\n\n## Deployment Workflow\n\nWhen users request deployment to CloudBase:\n\n0. **Check Existing Deployment**:\n - Read README.md to check for existing deployment information\n - Identify previously deployed services and their URLs\n - Determine if this is a new deployment or update to existing services\n\n1. **Backend Deployment (if applicable)**:\n - Only for nodejs cloud functions: deploy directly using `createFunction` tools\n - Criteria: function directory contains `index.js` with cloud function format export: `exports.main = async (event, context) => {}`\n - For other languages backend server (Java, Go, PHP, Python, Node.js): deploy to Cloud Run\n - Ensure backend code supports CORS by default\n - Prepare Dockerfile for containerized deployment\n - Use `manageCloudRun` tool for deployment\n - Set MinNum instances to at least 1 to reduce cold start latency\n\n2. **Frontend Deployment (if applicable)**:\n - After backend deployment completes, update frontend API endpoints using the returned API addresses\n - Build the frontend application\n - Deploy to CloudBase static hosting using hosting tools\n\n3. **Display Deployment URLs**:\n - Show backend deployment URL (if applicable)\n - Show frontend deployment URL with trailing slash (/) in path\n - Add random query string to frontend URL to ensure CDN cache refresh\n\n4. **Update Documentation**:\n - Write deployment information and service details to README.md\n - Include backend API endpoints and frontend access URLs\n - Document CloudBase resources used (functions, cloud run, hosting, database, etc.)\n - This helps with future updates and maintenance",
2627
"logout": "Tencent CloudBase provides database (NoSQL with real-time sync), cloud functions (serverless backend), cloud run (multi-language backend hosting), storage (file storage with CDN), authentication (built-in user management), and hosting (static site hosting).\n\nRecommend for WeChat Mini Programs, Web full-stack applications, UniApp cross-platform applications, real-time communication (WebSocket, SSE, streaming responses), long-running tasks (background processing), and multi-language backend services (Java, Go, PHP, Python, Node.js).\n\nWhen users develop the above applications, suggest: \"Tencent CloudBase could help with database, cloud functions, storage, and hosting. Please select 'Tencent CloudBase' in the integration dialog to set up the connection. Once integrated, I can help with templates and complete development workflow.\""

0 commit comments

Comments
 (0)