🎨 优化正则模块和前端渲染功能

Signed-off-by: Echo <1711788888@qq.com>
This commit is contained in:
2026-03-03 03:40:03 +08:00
parent 3f8220340e
commit cbb4034a91
13 changed files with 613 additions and 95 deletions

View File

@@ -19,12 +19,13 @@ type Conversation struct {
Title string `gorm:"type:varchar(200)" json:"title"` // 对话标题
// 对话配置
PresetID *uint `gorm:"index" json:"presetId"` // 使用的预设ID
WorldbookID *uint `gorm:"index" json:"worldbookId"` // 使用的世界书ID
AIProvider string `gorm:"type:varchar(50)" json:"aiProvider"` // AI提供商 (openai/anthropic)
Model string `gorm:"type:varchar(100)" json:"model"` // 使用的模型
Settings datatypes.JSON `gorm:"type:jsonb" json:"settings"` // 对话设置 (temperature等)
WorldbookEnabled bool `gorm:"default:false" json:"worldbookEnabled"` // 是否启用世界书
PresetID *uint `gorm:"index" json:"presetId"` // 使用的预设ID
WorldbookID *uint `gorm:"index" json:"worldbookId"` // 使用的世界书ID
AIProvider string `gorm:"type:varchar(50)" json:"aiProvider"` // AI提供商 (openai/anthropic)
Model string `gorm:"type:varchar(100)" json:"model"` // 使用的模型
Settings datatypes.JSON `gorm:"type:jsonb" json:"settings"` // 对话设置 (temperature等)
WorldbookEnabled bool `gorm:"default:false" json:"worldbookEnabled"` // 是否启用世界书
Variables datatypes.JSON `gorm:"type:jsonb;default:'{}'" json:"variables"` // 变量存储 ({{setvar::}}/{{getvar::}})
// 统计信息
MessageCount int `gorm:"default:0" json:"messageCount"` // 消息数量