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 - 提醒用户可以选择“其他”来指定完整列表中未在快速选择选项里显示的任何选项。
- 示例格式:
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.
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,并引导用户完成设置过程
- 询问用户是否想要配置其他功能
- 如果是,返回功能选择