mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-06 11:59:51 +08:00
feat(server): allow chat session dangling & pin session support (#12849)
fix AI-181 fix AI-179 fix AI-178 fix PD-2682 fix PD-2683
This commit is contained in:
@@ -434,8 +434,9 @@ model AiSession {
|
||||
id String @id @default(uuid()) @db.VarChar
|
||||
userId String @map("user_id") @db.VarChar
|
||||
workspaceId String @map("workspace_id") @db.VarChar
|
||||
docId String @map("doc_id") @db.VarChar
|
||||
docId String? @map("doc_id") @db.VarChar
|
||||
promptName String @map("prompt_name") @db.VarChar(32)
|
||||
pinned Boolean @default(false)
|
||||
// the session id of the parent session if this session is a forked session
|
||||
parentSessionId String? @map("parent_session_id") @db.VarChar
|
||||
messageCost Int @default(0)
|
||||
@@ -449,7 +450,7 @@ model AiSession {
|
||||
context AiContext[]
|
||||
|
||||
@@index([userId])
|
||||
@@index([userId, workspaceId])
|
||||
@@index([userId, workspaceId, docId])
|
||||
@@map("ai_sessions_metadata")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user