new/page.tsx
基本信息
- 类型: Next.js 页面 (Server Component)
- 路径:
./src/app/prompts/new/page.tsx
功能描述
新建Prompt页面,提供创建新AI提示词的表单界面。功能包括:
- 显示创建提示信息
- 提供完整的Prompt表单(标题、描述、内容、类型、分类、标签等)
- 支持AI生成辅助(如果启用)
- 支持通过URL参数预填充表单数据
- 未登录用户会被重定向到登录页
路由
- 路径:
/prompts/new - 查询参数:
- prompt: 初始Prompt请求文本
- title: 预填充标题
- content: 预填充内容
- type: 预填充类型 (TEXT, IMAGE, VIDEO, AUDIO)
- format: 结构化格式 (JSON, YAML)
组件类型
- Server Component
依赖
next(Metadata, redirect)next-intl/server(getTranslations)lucide-react(Info)@/lib/auth@/lib/db@/lib/ai/generation@/components/prompts/prompt-form@/components/ui/alert
SEO
- 标题: "Create Prompt"
- 描述: "Create a new prompt"
权限
- 需要用户登录,未登录用户会被重定向到
/login