add-feature
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineseadd-feature
添加功能
Add Wasp's batteries-included features to your app. Each invocation focuses on one feature at a time.
为你的应用添加Wasp的开箱即用功能。每次调用仅专注于配置一个功能。
Before Starting
开始之前
- Verify user is in the app directory (check for wasp config file: or
main.wasp)main.wasp.ts
- 确认用户位于应用目录中(检查Wasp配置文件:或
main.wasp)main.wasp.ts
Available Wasp Features
可用的Wasp功能
Present these features to the user and let them choose ONE to configure:
| Feature | Description |
|---|---|
| App Branding | Set your app's name, description, and meta tags |
| Authentication | Add login methods (Email, Google, GitHub, etc.) |
| Email Provider | Configure email sending (SendGrid, Mailgun, etc.) |
| Database | Set up your database (PostgreSQL, SQLite, etc.) |
| Styling (CSS, UI) | Add Tailwind CSS or ShadCN UI (on top of Tailwind CSS) |
向用户展示以下功能,让他们选择一个进行配置:
| 功能 | 描述 |
|---|---|
| 应用品牌设置 | 设置应用的名称、描述和元标签 |
| 身份验证 | 添加登录方式(邮箱、Google、GitHub等) |
| 邮件提供商 | 配置邮件发送功能(SendGrid、Mailgun等) |
| 数据库 | 设置数据库(PostgreSQL、SQLite等) |
| 样式(CSS、UI) | 添加Tailwind CSS或ShadCN UI(基于Tailwind CSS) |
Feature Selection
功能选择
Using the tool, ask the user which Wasp feature they'd like to configure:
AskUserQuestion- Use the most relevant options as selectable choices (limited to 2-4 options)
- Remind users they can select "Other" to choose from additional features
使用工具询问用户想要配置哪个Wasp功能:
AskUserQuestion- 选择最相关的2-4个选项作为可选择项
- 提醒用户可以选择“其他”来查看更多功能选项
Execute Selected Feature
执行所选功能
Based on the user's selection, follow the corresponding guides below.
ALWAYS follow the feature guide's corresponding raw text documentation URLs and use it as the basis for assisting the user.
- App Branding → app-branding.md
- Authentication → authentication.md
- Email Provider → email-provider.md
- Database → database.md
- Styling (CSS, UI) → styling.md
根据用户的选择,遵循以下对应的指南。务必参考功能指南对应的原始文本文档URL,并以此为基础协助用户。
- 应用品牌设置 → app-branding.md
- 身份验证 → authentication.md
- 邮件提供商 → email-provider.md
- 数据库 → database.md
- 样式(CSS、UI) → styling.md
Guidelines for Using AskUserQuestion with Lists
使用AskUserQuestion处理列表的指南
When asking the user to choose from fetched lists (e.g., auth methods, email providers):
- Always display the full list to the user before asking them to choose, so they know all available options.
- Use the most popular/common options as the selectable choices in (limited to 2-4 options).
AskUserQuestion - Remind users they can select "Other" to specify any option from the full list that isn't shown in the quick-select options.
- Example format:
Available auth methods: Username & Password, Email, Google, GitHub, Discord, Keycloak, Slack [AskUserQuestion with 3-4 most common options] Note: Select "Other" to choose from additional options like Discord, Keycloak, or Slack.
当要求用户从获取的列表中选择时(例如身份验证方式、邮件提供商):
- 始终先向用户展示完整列表,让他们了解所有可用选项。
- 选择最常用的选项作为中的可选择项(限制为2-4个)。
AskUserQuestion - 提醒用户可以选择“其他”来指定完整列表中未在快速选择选项里显示的任意选项。
- 示例格式:
可用的身份验证方式:用户名密码、邮箱、Google、GitHub、Discord、Keycloak、Slack [使用3-4个最常用选项的AskUserQuestion] 注意:选择“其他”可选择Discord、Keycloak或Slack等其他选项。
After Feature Completion
功能配置完成后
After completing a feature configuration:
- Summarize the changes made
- If applicable, let them know if there are any environment variables they need to set and ask them if they need guidance on how to set them
- if so, fetch the raw github doc file URL for the environment variables and guide the user through the process
- Ask if the user would like to configure another feature
- If yes, return to Feature Selection
完成功能配置后:
- 总结所做的更改
- 如果适用,告知用户是否需要设置环境变量,并询问他们是否需要设置指导
- 如果需要,获取环境变量对应的GitHub原始文档URL并引导用户完成设置
- 询问用户是否想要配置另一个功能
- 如果是,返回功能选择