How to generate a mini-program using Trae: Real-world testing of MCP, Agent, and context functionalities.
According to multiple sources, OpenAI is planning to acquire AI programming tools company Windsurf for approximately $3 billion, which would be OpenAI's largest acquisition to date. Since the beginning of this year, there has been a constant stream of news in the AI IDE field. AI programming is currently...
According to multiple sources, OpenAIPlanning to acquire for approximately $3 billionAIWindsurf, a programming tools company, will become OpenAIThe largest acquisition to date.
Starting this year,AI News in the IDE field is constant.
AIProgramming is at the forefront of the times, but those who don't understand code are caught in endless anxiety.
There's really no need to worry too much.
AIThe upgrades and evolutions are all aimed at enabling more people to use them better.AI.
For example, me, a liberal arts student, can't understand a single line of code, relying solely on...AIA month ago, I also launched my first mini-program, "Shit Diary Demo".
Today, version 2.0 of "Shit Diary Demo" has also arrived.
Compared to before, I've made some page optimizations and even included a mini-game to help pass the time while pooping.
It must be said,AIProgramming is truly amazing!!!
Although there are many health apps on the market, they are either too complicated or full of ads and paid features.
If you're like me, only wanting one that satisfies your own needs...SimpleFor a small, ad-free tool, you should really try making one yourself!
AlthoughAIThere are many programming tools, verypowerfulHowever, in actual use, it was discovered that some required a VPN, while others not only required a membership but also had a high cost.
For a complete beginner like me, the learning curve is too steep.
After all, we just wanted to create a mini-program for our own use. If we have to spend money on it, it would go against our original intention.
After comparing countless products, I finally chose to useTrae.
Official website: Trae
It doesn't require a VPN and is fully functional.free!!
Pure Chinese interfaceIt's very user-friendly for complete beginners like us.
Built-in DeepSeek-R1, DeepSeek-V3, DeepSeek-V3-0324, Doubao-1.5-proLarge Model,freeUnlimited use.
We can also configure cloud-based model resources via API.
PopularofClaude 3.7 Sonnet, recently launchedGPT-4.1 model, allSimpleCall.
We went to the Trae website and followed the prompts to download and install the Trae IDE.
For those who are used to traditional IDEs, you can also directly install the Trae plugin.
Click to open the folder and select the folder where our mini-program code is located.
We only need to state our requirements in the input box to generate and modify the code.
To see our optimization process more intuitively, we opened the WeChat Developer Tools and imported the mini-program code file.
When we submit requirements or update code in Trae, we can preview the effect of the update in real time in this window.
Generally, when the code is updated, the preview window will update accordingly. If the screen doesn't change after the code is updated, you can manually click "compile".
If you are creating a webpage, you can skip this step.Trae's built-in Webview allows for direct previewing of web pages.
Here I chose the DeepSeek-V3-0324 model built into Trae.
Let's ask directly.@BuilderCan you understand this mini-program?
After it analyzes and provides answers, you can ask it to give some optimization suggestions for the mini-program.
The previous version of Trae had two modes: Chat and Builder. Chat mode could understand the context of the current project and make precise modifications little by little. Builder mode was more suitable for development from scratch, as it would call different tools to continuously meet our needs.
Yesterday's update directly merged the two modes; we only need to@Builder State your needs, and the operation will be more efficient.SimpleAlright.
another@Build with MCP It allows for flexible use of the MCP tool, expanding its capabilities.
according to@Builder Based on your suggestion, we propose the following: According to the Bristol Poop Classification, poop should be divided into 7 forms. After each timer completes, select the state of the poop and provide some reminders.
In less than a minute, it willautomaticOnce the code is generated, all we need to do is click "Accept".
When it generates code, I find that it willautomaticReferring to the context file, you can also add any required Doc files or web pages in the lower left corner.
We continued to make our request: to create a theme that can be freely switched.
After compiling synchronously using WeChat Developer Tools, the debugger may report errors.
Don't worry, we just need toCopy and paste the red error message into Trae, and it will help you fix it..
Don't be afraid of errors when you're working on it.AII will help you revise it step by step.
If you submit a request and the generated result does not meet your expectations at all...Well enoughOne-clickGo back to a previous conversation.
It's so beginner-friendly!
Finally, we added a small animation to our page so that the panda's state changes when you click to start the timer.
During the timer, a giant panda will sit with you on the toilet.
useAIDeveloping small tools can truly be done without writing a single line of code. A beginner's dream!
After testing this mini-program, I found that using it purely for timing was a bit too boring.
So, I'm going to add a stress-relieving mini-game to it. It can help pass the time while it's running.
We continued to send out requests: Add a button below the panda image that says "Brickbreaker".
It seemed to misunderstand the meaning of the panda image, and eventually generated a "Diamond Breaker" button at the bottom of the page.
But it's okay, as long as it doesn't affect usage.
We continued to make requests to enable the functionality of a mini-game: to create a game similar to Brick Breaker, where clicking the Brick Breaker button would redirect to that game.
"I want the game screen to be centered."
Add a scoreboard to the mini-game.
"When you are redirected, the restart button will display as 'Start Game.' After clicking it, the game will start running, and then the button will display as 'Restart.'"
We are gradually optimizing the functionality of the mini-program through our interactions.
The final product is what you saw at the beginning.
In WeChat Developer Tools, click "Upload," submit the application for review on the web page, and wait for approval before officially releasing it.
Trae's new customization featureintelligentbodyAlthough I didn't use MCP when upgrading the mini program, I still think I should mention it to everyone, it's really powerful!
We can add customizationintelligentbodyTrae can transform into various experts to help you solve code problems.
For example, if I need a programming expert to pinpoint code problems and help me solve them, I can do so directly through [the platform/method].Prompt wordscreate:
It has four built-in tools, and@Builder It can read, write, and run code, and provides a preview. It can also search for information online.
We can also pair it with MCP, to makeAITrae has the freedom to utilize various external tools. This makes Trae more versatile, resembling an entire ecosystem.
For example, I want to update the mini-program's log.automaticPushing to GitHub allows us to add GitHub to the MCP marketplace, which will enable this functionality.
Click the "+" after GitHub, enter Personal Access Token, and modify the original configuration code according to the highlighted areas below:
GitHub MCP Servers has been successfully configured.
We can find programming expertsintelligentbodySimply check the box to add it.
Back in the chat, this time we @ProgrammingExpert sent:automaticSummarize the changes to this mini-program and compile them into a changelog.automaticI pushed it to GitHub. My GitHub username is "Koi0101-max" and the repository name is "-demo".
If you try out various MCP services on the market and find that none of them are quite suitable for your project, you can also add custom ones.
For a complete beginner like me, Trae is like a programmer partner always on call. He not only understands your needs, but also...fastThe response and output were quite good!
It can truly help us achieve zero-code development.
If you happen to have an idea right now, don't just stay at the idea level, try to turn it into reality with Trae.