perf: 上下文分级裁剪与Agent完成性保障

This commit is contained in:
voocel
2026-03-15 22:52:17 +08:00
parent 568ef0b1d1
commit c913a49ffd
15 changed files with 358 additions and 112 deletions

View File

@@ -65,6 +65,7 @@ func (t *DraftChapterTool) Execute(_ context.Context, args json.RawMessage) (jso
"chapter": a.Chapter,
"mode": "append",
"word_count": utf8.RuneCountInString(full),
"next_step": "自审后调用 commit_chapter 提交",
})
default: // write
if err := t.store.SaveDraft(a.Chapter, a.Content); err != nil {
@@ -75,6 +76,7 @@ func (t *DraftChapterTool) Execute(_ context.Context, args json.RawMessage) (jso
"chapter": a.Chapter,
"mode": "write",
"word_count": utf8.RuneCountInString(a.Content),
"next_step": "自审后调用 commit_chapter 提交",
})
}
}