feat(agent): Agent 工作台 - 计划插话记忆、统一模型选择器并修复摘要与视频入库
将计划清单、运行中插话和个人记忆接入云端 Agent;全站模型选择器统一为左右二级菜单。画布摘要按预算截断不再整轮拒绝,首页视频未知宽高可入库。README 补充贡献者 morrow。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
34
backend/internal/model/models_agent_memory_setting.go
Normal file
34
backend/internal/model/models_agent_memory_setting.go
Normal file
@@ -0,0 +1,34 @@
|
||||
package model
|
||||
|
||||
import "time"
|
||||
|
||||
const (
|
||||
AgentMemoryCompactIntervalOff = "off"
|
||||
AgentMemoryCompactIntervalDaily = "daily"
|
||||
AgentMemoryCompactIntervalWeekly = "weekly"
|
||||
AgentMemoryCompactIntervalMonthly = "monthly"
|
||||
|
||||
AgentMemoryCompactStatusIdle = "idle"
|
||||
AgentMemoryCompactStatusQueued = "queued"
|
||||
AgentMemoryCompactStatusRunning = "running"
|
||||
AgentMemoryCompactStatusSucceeded = "succeeded"
|
||||
AgentMemoryCompactStatusFailed = "failed"
|
||||
)
|
||||
|
||||
// AgentMemorySetting 是用户私有的记忆压缩偏好与最近一次压缩状态。
|
||||
type AgentMemorySetting struct {
|
||||
UserID string `json:"userId" gorm:"primaryKey;size:36"`
|
||||
CompactInterval string `json:"compactInterval" gorm:"size:16;index"`
|
||||
LogicalModelID string `json:"logicalModelId" gorm:"size:36"`
|
||||
ChannelID string `json:"channelId" gorm:"size:36"`
|
||||
ChannelModelKey string `json:"channelModelKey" gorm:"size:160"`
|
||||
Model string `json:"model" gorm:"size:240"`
|
||||
LastCompactAt *time.Time `json:"lastCompactAt,omitempty"`
|
||||
CompactStartedAt *time.Time `json:"compactStartedAt,omitempty"`
|
||||
CompactTaskID string `json:"compactTaskId,omitempty" gorm:"size:36;index"`
|
||||
LastStatus string `json:"lastStatus" gorm:"size:16;index"`
|
||||
LastSummaryJSON string `json:"-" gorm:"type:text"`
|
||||
LastError string `json:"lastError,omitempty" gorm:"type:text"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
UpdatedAt time.Time `json:"updatedAt"`
|
||||
}
|
||||
Reference in New Issue
Block a user