mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-29 20:34:28 +00:00
feat(chat): add AgentSessionType enum and filter chatbot history sessions
This commit is contained in:
@@ -645,6 +645,11 @@ enum AgentType {
|
||||
embedding
|
||||
}
|
||||
|
||||
enum AgentSessionType {
|
||||
comment
|
||||
chat
|
||||
}
|
||||
|
||||
model Agent {
|
||||
id String @id
|
||||
user User @relation(fields: [id], references: [id], onDelete: Cascade)
|
||||
@@ -693,11 +698,13 @@ model AgentSession {
|
||||
assetId String? @map("asset_id")
|
||||
asset Asset? @relation("AssetToAgentSession", fields: [assetId], references: [id], onDelete: Cascade)
|
||||
userCommentId String? @map("user_comment_id")
|
||||
type AgentSessionType @default(comment)
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
updatedAt DateTime @updatedAt @map("updated_at")
|
||||
entries AgentSessionEntry[]
|
||||
comments AssetComment[]
|
||||
|
||||
@@index([type])
|
||||
@@map("agent_sessions")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user