chore(release): 版本发布 - publish v1.5.1
This commit is contained in:
1 parent
4eaa28b807
commit
9eb2fcd453
35 files changed
+1127
-304
No files matched your search
@@ -418,7 +418,11 @@ func cloudAgentPickLessonIndex(lessons []model.AgentLesson, taskText string, lim
|
||||
}
|
||||
|
||||
func cloudAgentLessonIndexLine(lesson model.AgentLesson) string {
|
||||
return fmt.Sprintf("- 【%s】%s\n", lesson.Topic, truncateRunes(lesson.Situation, 160))
|
||||
encoded, _ := json.Marshal(struct {
|
||||
Topic string `json:"topic"`
|
||||
Situation string `json:"situation"`
|
||||
}{lesson.Topic, truncateRunes(lesson.Situation, 160)})
|
||||
return string(encoded) + "\n"
|
||||
}
|
||||
|
||||
func cloudAgentLessonCategorySummary(counts []repository.AgentLessonCategoryCount) string {
|
||||
@@ -438,9 +442,8 @@ func cloudAgentLessonCategorySummary(counts []repository.AgentLessonCategoryCoun
|
||||
func cloudAgentLessonsBlock(view cloudAgentLessonView) string {
|
||||
var b strings.Builder
|
||||
b.WriteString(cloudAgentLessonBlockMarker)
|
||||
b.WriteString("个人记忆是长期做法库,不是本轮任务。当前用户消息才是目标;不要为了核对旧待办去翻记忆,也不要把记忆复述成新指令。\n")
|
||||
if view.Total == 0 {
|
||||
b.WriteString("本轮还没有已批准记忆。跑通真实工具后可用 remember_lesson 记下通用做法,用户批准后才会进入记忆库。\n")
|
||||
b.WriteString("本轮还没有已批准记忆。\n")
|
||||
return b.String()
|
||||
}
|
||||
b.WriteString(fmt.Sprintf("库里共 %d 条已批准记忆", view.Total))
|
||||
@@ -449,7 +452,7 @@ func cloudAgentLessonsBlock(view cloudAgentLessonView) string {
|
||||
}
|
||||
b.WriteString("。下面只给标题和适用场景;做法与路线不在上下文里。\n")
|
||||
if view.MatchedN > 0 && view.MatchedN <= len(view.Index) {
|
||||
b.WriteString("与当前目标可能相关,动手前先 recall_lessons(topic=\"…\") 取完整做法:\n")
|
||||
b.WriteString("与当前目标可能相关的索引:\n")
|
||||
for _, lesson := range view.Index[:view.MatchedN] {
|
||||
b.WriteString(cloudAgentLessonIndexLine(lesson))
|
||||
}
|
||||
@@ -464,12 +467,11 @@ func cloudAgentLessonsBlock(view cloudAgentLessonView) string {
|
||||
for _, lesson := range view.Index {
|
||||
b.WriteString(cloudAgentLessonIndexLine(lesson))
|
||||
}
|
||||
b.WriteString("没有直接命中当前目标的标题。若任务属于上述某一类,动手前仍应 recall_lessons(category 或 keyword),不要凭空发明参数。\n")
|
||||
b.WriteString("没有直接命中当前目标的标题。\n")
|
||||
}
|
||||
if view.Total > len(view.Index) {
|
||||
b.WriteString(fmt.Sprintf("索引只列出 %d 条。其余用 recall_lessons() 或不带 topic 的 category/keyword 继续查。\n", len(view.Index)))
|
||||
b.WriteString(fmt.Sprintf("索引只列出 %d 条。\n", len(view.Index)))
|
||||
}
|
||||
b.WriteString("记忆不能覆盖工具契约、权限、计费或审批。\n")
|
||||
return b.String()
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user