docs: make Chinese README the default

This commit is contained in:
wehub-resource-sync
2026-07-13 10:25:59 +00:00
parent 309782a04d
commit 95c2821c60
+46 -40
View File
@@ -1,56 +1,62 @@
<!-- WEHUB_ZH_README -->
> [!NOTE]
> 本文档由 WeHub 基于上游 README 翻译整理,属于社区翻译,非官方中文文档。
> [English](./README.en.md) · [原始项目](https://github.com/Exafunction/windsurf-demo) · [上游 README](https://github.com/Exafunction/windsurf-demo/blob/HEAD/README.md)
> 原作者、版权与许可证归属以原始项目及本仓库 LICENSE 文件为准。
# Windsurf Demo App
A demo application and tasks to demonstrate the power of the [Windsurf Editor](https://windsurf.ai/).
这是一个演示应用及相关任务,用于展示 [Windsurf Editor](https://windsurf.ai/). 的强大功能。
This entire application was written from scratch by Cascade in the Windsurf Editor, and you will be able to add some more!
整个应用由 Cascade Windsurf Editor 中从零编写,你还可以继续添加更多内容!
## Prerequisites
## 前置要求
- Python 3.7 or higher
- Node.js and npm
- Python 3.7 或更高版本
- Node.js npm
## Getting Started
## 快速开始
1. Clone the repository:
1. 克隆仓库:
```bash
git clone <repository-url>
cd windsurf-demo
```
2. Install Python dependencies:
2. 安装 Python 依赖:
```bash
pip3 install -r requirements.txt
```
3. Start the Flask server:
3. 启动 Flask 服务器:
```bash
python3 app.py
```
4. Open your web browser and navigate to:
4. 打开浏览器并访问:
```
http://localhost:5000
```
5. Play the game!
5. 开始游戏!
## Tasks to Understand Cascade
## 了解 Cascade 的任务
1. **Demonstrate Deep Reasoning over Knowledge**
1. **演示对知识的深度推理(Deep Reasoning**
Start a new Cascade, and copy in "Create random variability in how much value food cells add to the player, and make the sizes reflect the value." Cascade should run like the following, after which you can look at the diffs and accept all changes. Click to start video:
新建一个 Cascade,并粘贴输入:"Create random variability in how much value food cells add to the player, and make the sizes reflect the value." Cascade 应会按以下方式运行,之后你可以查看 diff 并一次性接受所有更改。点击开始观看视频:
[![Watch the video](https://img.youtube.com/vi/dsB3hHz-Nfw/maxresdefault.jpg)](https://youtu.be/dsB3hHz-Nfw)
[![观看视频](https://img.youtube.com/vi/dsB3hHz-Nfw/maxresdefault.jpg)](https://youtu.be/dsB3hHz-Nfw)
This demonstrates Cascade's abilities to:
- Use tools to search through existing codebases.
- Create multi-file multi-edit changes in a manner that is self-consistent.
- Allow you to accept multiple changes at once.
这展示了 Cascade 的以下能力:
- 使用工具搜索现有代码库。
- 以自洽的方式创建跨文件、多处的编辑更改。
- 允许你一次性接受多处更改。
2. **Demonstrate Incorporation of Human Actions**
2. **演示融入人类操作(Human Actions**
Right now, there is no decay mechanism to the score, so the big players will always stay big even if they don't move or try to continue to grow. So, let us add a decay mechanism. Start a new Cascade and just say "Hi" to start the Cascade. Now, go to `static/js/config.js` and add the following constants somewhere in the file. Click to start video:
目前分数没有衰减机制,因此大玩家即使不移动或不继续成长也会一直保持体型。我们来添加一个衰减机制。新建一个 Cascade,只需说 "Hi" 即可启动 Cascade。现在,前往 `static/js/config.js`,在文件中某处添加以下常量。点击开始观看视频:
```js
// Score decay mechanics
@@ -58,34 +64,34 @@ export const BASE_DECAY_RATE = 0.02; // Base rate of score decay per second
export const DECAY_SCALE_FACTOR = 0.2; // How much size affects decay rate
```
Now, go to back to the Cascade and just type "Continue." Cascade should run somewhat like the follwing:
现在,回到 Cascade 并输入 "Continue."Cascade 的运行大致如下:
[![Watch the video](https://img.youtube.com/vi/aHrUPrO0Pxk/maxresdefault.jpg)](https://youtu.be/aHrUPrO0Pxk)
[![观看视频](https://img.youtube.com/vi/aHrUPrO0Pxk/maxresdefault.jpg)](https://youtu.be/aHrUPrO0Pxk)
This demonstrates Cascade's abilities to:
- Reason about the actions that you are taking in the text editor and refer to them semantically.
- Be fully operating on the same state of the codebase as you are, without you needing to scope out the problem for a copilot or agent.
这展示了 Cascade 的以下能力:
- 推理你在文本编辑器中所执行的操作,并从语义上引用它们。
- 与你完全基于同一份代码库状态工作,无需你为 copilot agent 单独界定问题范围。
3. **Demonstrate Access to Tools**
3. **演示工具访问能力**
Open up Cascade (Command + L), and type "Run all tests in static/js" You may need to prompt Cascade with more information about the repository, but generally you should see the following happen. Click to start video:
打开 CascadeCommand + L),并输入 "Run all tests in static/js"。你可能需要向 Cascade 提供更多关于仓库的信息,但通常你会看到以下情况。点击开始观看视频:
[![Watch the video](https://img.youtube.com/vi/Cq0HJ6y-nh8/maxresdefault.jpg)](https://youtu.be/Cq0HJ6y-nh8)
[![观看视频](https://img.youtube.com/vi/Cq0HJ6y-nh8/maxresdefault.jpg)](https://youtu.be/Cq0HJ6y-nh8)
This demonstrates Cascade's abilities to:
- Reason iteratively about your existing codebases.
- Suggest terminal commands and execute them within Cascade.
- Debug stacktraces by identifying and reasoning about relevant code.
- Suggest fixes to issues, making edit suggestions directly to your files.
- Allow you to introspect diffs and accept diffs line-by-line.
这展示了 Cascade 的以下能力:
- 对你的现有代码库进行迭代推理。
- 建议终端命令并在 Cascade 内执行它们。
- 通过识别并推理相关代码来调试堆栈跟踪(stacktrace)。
- 针对问题建议修复方案,直接向你的文件提出编辑建议。
- 允许你检视 diff,并逐行接受 diff。
### Takeaways on Cascade
### 关于 Cascade 的要点
These should demonstrate the power of the Windsurf Editor to jointly reason deeply about your codebases, access a broad set of tools, and incorporate your own actions as a developer.
这些任务应能展示 Windsurf Editor 如何对你的代码库进行深度联合推理、访问广泛的工具集,并融入你作为开发者的操作。
Cascade will not always be perfect, and often you may find yourself asking Cascade follow ups to fix unexpected side effects, or just taking over entirely and ignoring the AI for more complex tasks. That is totally okay! Cascade is the most powerful AI assistant that you can still trust and iterate with.
Cascade 并不总是完美,你常常需要追问 Cascade 以修复意外的副作用,或在更复杂的任务中完全接管、暂时忽略 AI。这完全没问题!Cascade 是你仍可信任并与之迭代的最强大的 AI 助手。
## More Windsurf Editor Features
## 更多 Windsurf Editor 功能
Check out our [Docs](https://docs.codeium.com) for even more examples and how to use features like Autocomplete, Supercomplete, Command, and more! There is AI integrated throughout the editor so that you get the optimal AI assistance where you want it, when you want it.
查看我们的 [Docs](https://docs.codeium.com) 获取更多示例,以及如何使用 AutocompleteSupercompleteCommand 等功能!编辑器各处都集成了 AI,让你能在需要时、在需要的地方获得最优的 AI 辅助。