Block a user
CHAT-303 P0 | material 会话检索范围:只检索当前资料
CHAT-304 P0 | knowledge_base 会话检索范围:检索整个知识库
CHAT-203 P1 | ChatSession 自动标题生成规则
完成情况
交付物
Service 层 — 提取 autoTitle + generateTitle 方法:
private async autoTitle(session, content: string) {
if (!session.title
CHAT-203 P1 | ChatSession 自动标题生成规则
完成情况
交付物
Service 层 — 提取 autoTitle + generateTitle 方法 (rag-chat.service.ts):
private async autoTitle(session, content: string) {
//…
CHAT-203 P1 | ChatSession 自动标题生成规则
CHAT-002 P0 | 定义 ChatScope API Contract 前后端接口协议
CHAT-000 P0 | ChatScope 里程碑总设计文档
CHAT-001 P0 | 定义 ChatScope 设计文档 docs/chat-scope-design.md
M7-08 P0 | open-or-create 会话逻辑(同一 scope 继续/新建)
完成情况
交付物
Service 层 — createSession 加入 open-or-create 逻辑:
async createSession(userId: string, params: CreateSessionParams): Promise<CreateSess…
CHAT-204 P0 | ChatSession scope 字段创建后不可修改
完成情况
交付物
Service 层 — updateSession 方法:
async updateSession(sessionId: string, dto: {
title?: string;
isPinned?: boolean;
isArchived?:…
M7-08 P0 | open-or-create 会话逻辑(同一 scope 继续/新建)
CHAT-204 P0 | ChatSession scope 字段创建后不可修改
M7-02 P1 | Prisma ChatSession 新增 createdFrom isArchived isPinned isDeleted
关闭原因
本 issue 是合并 issue,已拆分为两个更细粒度的子 issue:
M7-05 P0 | createSession 接受 ChatScope 参数 scopeType scopeId parentKnowledgeBaseId
完成情况
交付物
Service 层 — createSession 重构:
interface CreateSessionParams {
scopeType: string;
scopeId?: string
M7-07 P0 | listSessions 支持 scopeType + scopeId 过滤
完成情况
交付物
Service 层 — listSessions 重构:
async listSessions(userId: string, opts?: {
scopeType?: string;
scopeId?: string;
parentKnowledgeBase…
M7-06 P0 | loadContext 根据 ChatScope 决定检索范围
完成情况
交付物
Service 层 — loadContextByScope 方法:
private async loadContextByScope(session: ChatSession): Promise<ContextResult>
检索策略
…
M7-09a P0 | ChatSession scope 核心查询索引(open-or-create)
完成情况
交付物
核心查询索引 (prisma/schema.prisma):
@@index([userId, scopeType, scopeId])
覆盖的查询场景
-- open-or-create:…
M7-09b P1 | ChatSession 知识库会话列表索引
完成情况
交付物
知识库会话列表索引 (prisma/schema.prisma):
@@index([userId, parentKnowledgeBaseId])
覆盖的查询场景
-- 知识库下…