Version: 0.9.39.dev.260423

后端:
1. 记忆系统移除 todo_hint 类型——随口记已由 Task 系统承接,todo_hint 语义重叠且无完成追踪
- 全链路清理:常量、校验、默认重要度、30 天 TTL、读取预算、LLM 抽取提示词枚举
- 总预算从四类收缩为三类(preference / constraint / fact)

2. 记忆抽取触发点从 chat-persist 移至 graph-completion——避免随口记消息被误提取为 constraint/preference
- chat-persist consumer 不再自动入队 memory.extract.requested,仅负责聊天历史落库
- graph 完成后新增条件发布:检测 UsedQuickNote 标记,调用过 quick_note_create 则跳过记忆抽取
- ResetForNextRun 重置 UsedQuickNote,防止跨轮残留导致后续正常消息记忆抽取被误跳过

3. 任务类查询接口返回 items 补充数据库主键 ID(前端拖拽编排依赖此字段)

前端:
4. 排程视图新增手动编排模式——侧边栏任务块拖拽入周课表 + 悬浮删除热区 + 建议块虚线标识
- TaskClassSidebar 拖拽发起 + 预览态嵌入时间格式化(含周次/星期)
- WeekPlanningBoard 外部拖入 / 内部移动 / 悬浮删除区交互
- ScheduleView 手动编排状态机(进入/退出/取消/覆盖确认)+ apply 时同步处理新增与删除
This commit is contained in:
Losita
2026-04-23 23:07:04 +08:00
parent 53e2602df4
commit ba8e8e2a82
23 changed files with 640 additions and 154 deletions

View File

@@ -31,7 +31,6 @@ func LoadConfigFromViper() memorymodel.Config {
ReadConstraintLimit: viper.GetInt("memory.read.constraintLimit"),
ReadPreferenceLimit: viper.GetInt("memory.read.preferenceLimit"),
ReadFactLimit: viper.GetInt("memory.read.factLimit"),
ReadTodoHintLimit: viper.GetInt("memory.read.todoHintLimit"),
// 决策层配置:默认关闭,灰度开启后才会生效。
DecisionEnabled: viper.GetBool("memory.decision.enabled"),
@@ -64,7 +63,6 @@ func LoadConfigFromViper() memorymodel.Config {
cfg.ReadConstraintLimit = cfg.EffectiveReadConstraintLimit()
cfg.ReadPreferenceLimit = cfg.EffectiveReadPreferenceLimit()
cfg.ReadFactLimit = cfg.EffectiveReadFactLimit()
cfg.ReadTodoHintLimit = cfg.EffectiveReadTodoHintLimit()
cfg.ReadMode = cfg.EffectiveReadMode()
cfg.InjectRenderMode = cfg.EffectiveInjectRenderMode()

View File

@@ -224,7 +224,6 @@ func normalizeRetrieveMemoryTypes(raw []string) []string {
return []string{
memorymodel.MemoryTypeConstraint,
memorymodel.MemoryTypePreference,
memorymodel.MemoryTypeTodoHint,
memorymodel.MemoryTypeFact,
}
}
@@ -297,8 +296,6 @@ func scoreRetrievedItem(item model.MemoryItem, now time.Time) float64 {
score += 0.12
case memorymodel.MemoryTypePreference:
score += 0.08
case memorymodel.MemoryTypeTodoHint:
score += 0.05
}
return score
}

View File

@@ -267,7 +267,6 @@ func applyTypeBudget(items []memorymodel.ItemDTO, cfg memorymodel.Config, caller
memorymodel.MemoryTypeConstraint: cfg.EffectiveReadConstraintLimit(),
memorymodel.MemoryTypePreference: cfg.EffectiveReadPreferenceLimit(),
memorymodel.MemoryTypeFact: cfg.EffectiveReadFactLimit(),
memorymodel.MemoryTypeTodoHint: cfg.EffectiveReadTodoHintLimit(),
}
usedByType := make(map[string]int, len(budgetByType))
result := make([]memorymodel.ItemDTO, 0, minInt(len(items), hardCap))
@@ -306,8 +305,6 @@ func renderMemoryTypeLabelForDedup(memoryType string) string {
return "偏好"
case memorymodel.MemoryTypeConstraint:
return "约束"
case memorymodel.MemoryTypeTodoHint:
return "待办线索"
case memorymodel.MemoryTypeFact:
return "事实"
default:

View File

@@ -47,8 +47,6 @@ func scoreRankedItem(item memorymodel.ItemDTO, now time.Time) float64 {
score += 0.15
case memorymodel.MemoryTypePreference:
score += 0.10
case memorymodel.MemoryTypeTodoHint:
score += 0.05
}
return score
}