feat: 实现 AI 智能搜索功能
添加语义搜索能力,支持自然语言查询找到相关项目。 - 数据库:新增 embedding 字段用于向量存储 - 前端:新增 AI 搜索栏和结果组件,支持传统/AI 模式切换 - API:新增 /api/search/ai 端点处理语义搜索请求 - 国际化:添加 AI 搜索相关中英文翻译 - 探索任务:允许 FAILED 状态直接转到 IN_PROGRESS 简化重试 Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
+17
-15
@@ -39,23 +39,25 @@ enum TaskStatus {
|
||||
// ================================
|
||||
|
||||
model Project {
|
||||
id String @id @default(cuid())
|
||||
name String
|
||||
nameEn String?
|
||||
slug String @unique
|
||||
description String
|
||||
descriptionEn String?
|
||||
content String? @db.Text
|
||||
contentEn String? @db.Text
|
||||
status ProjectStatus @default(ACTIVE)
|
||||
source String?
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
id String @id @default(cuid())
|
||||
name String
|
||||
nameEn String?
|
||||
slug String @unique
|
||||
description String
|
||||
descriptionEn String?
|
||||
content String? @db.Text
|
||||
contentEn String? @db.Text
|
||||
status ProjectStatus @default(ACTIVE)
|
||||
source String?
|
||||
embedding Unsupported("vector(1536)")?
|
||||
embeddingUpdatedAt DateTime?
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
// Relations
|
||||
tags ProjectTag[]
|
||||
links ExternalLink[]
|
||||
discoveryTasks ProjectDiscoveryTask[]
|
||||
tags ProjectTag[]
|
||||
links ExternalLink[]
|
||||
discoveryTasks ProjectDiscoveryTask[]
|
||||
|
||||
// Indexes
|
||||
@@index([status, createdAt], map: "idx_project_status_createdAt")
|
||||
|
||||
Reference in New Issue
Block a user