feat: 增强会话管理和 Agent 服务
- 优化 session_handler 会话处理逻辑 - 增强 agent_service Agent 服务功能 - 新增 chat_repository 仓储方法 - 更新 agent_handler 和 chat_group_handler - 更新数据模型 agent 和 chat_session Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -19,6 +19,7 @@ type Agent struct {
|
||||
Name string `json:"name" gorm:"size:100;not null"`
|
||||
Description string `json:"description" gorm:"type:text"`
|
||||
OwnerID string `json:"owner_id" gorm:"size:50;not null;index"`
|
||||
Avatar string `json:"avatar" gorm:"size:50"` // 头像 (emoji)
|
||||
|
||||
// 技能列表(JSON数组)
|
||||
Skills []string `json:"skills" gorm:"type:text;serializer:json"`
|
||||
|
||||
@@ -52,7 +52,7 @@ type UpdateSessionRequest struct {
|
||||
type CreateMessageRequest struct {
|
||||
SessionID string `json:"session_id" binding:"required"`
|
||||
Role string `json:"role" binding:"required"` // user/assistant
|
||||
Content string `json:"content" binding:"required"`
|
||||
Content string `json:"content"`
|
||||
TokensUsed int `json:"tokens_used"`
|
||||
DurationMs int `json:"duration_ms"`
|
||||
Metadata string `json:"metadata"`
|
||||
|
||||
Reference in New Issue
Block a user