Block a user
M7-09c P2 | ChatSession 删除过滤索引
完成情况
交付物
删除过滤索引 (prisma/schema.prisma):
@@index([userId, isDeleted])
覆盖的查询场景
-- 全局列表:排除已删除
SEL…
M7-04 P1 | ChatMessage 新增 scopeSnapshot 快照字段
完成情况
交付物
ChatMessage 新增字段 (prisma/schema.prisma):
scopeSnapshot Json?
数据结构
{
"scopeType": "material",
"scopeId":…
M7-03 P1 | Prisma ChatCitation 完善字段支持精确定位
完成情况
交付物
ChatCitation 新增字段 (prisma/schema.prisma):
lineStart Int?
lineEnd Int?
新增索引:
@@index([sourceId])
###…
M7-02b P1 | ChatSession 新增 isArchived + isPinned
完成情况
交付物
ChatSession 新增字段 (prisma/schema.prisma):
isPinned Boolean @default(false)
isArchived Boolean @default(false)
Service 层 —…
M7-02a P0 | ChatSession 新增 createdFrom + isDeleted
完成情况
交付物
ChatSession 新增字段 (prisma/schema.prisma):
createdFrom String @default("legacy_migration") @db.VarChar(32)
isDeleted Boolean @default(fa…
M7-01 P0 | Prisma ChatSession 新增 scopeType scopeId parentKnowledgeBaseId
完成情况
交付物
1. Prisma Schema (prisma/schema.prisma)
ChatSession 模型新增 10 个字段:
scopeType String @default("knowledge_base") @db.VarChar…
M7-09b P1 | ChatSession 知识库会话列表索引
M7-05 P0 | createSession 接受 ChatScope 参数 scopeType scopeId parentKnowledgeBaseId
M7-07 P0 | listSessions 支持 scopeType + scopeId 过滤
M7-06 P0 | loadContext 根据 ChatScope 决定检索范围
M7-01 P0 | Prisma ChatSession 新增 scopeType scopeId parentKnowledgeBaseId
M7-02a P0 | ChatSession 新增 createdFrom + isDeleted
M7-02b P1 | ChatSession 新增 isArchived + isPinned
M7-03 P1 | Prisma ChatCitation 完善字段支持精确定位
M7-04 P1 | ChatMessage 新增 scopeSnapshot 快照字段
M7-09a P0 | ChatSession scope 核心查询索引(open-or-create)