Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:memo: Remove stale agent session helper reference https://github.com/siyuan-note/siyuan/issues/20277

Danielbe7ef670d8b8
diff --git a/kernel/api/agent.go b/kernel/api/agent.go
index 4bfd6a0fcc..c1b4693fc8 100644
--- a/kernel/api/agent.go
+++ b/kernel/api/agent.go
@@ -462,8 +462,7 @@ func saveSessionContract(c *gin.Context, req apicontract.AISession) apicontract.
ret.Msg = runtimeErr.Error()
return apicontract.AISaveSession.WithHTTPStatus(contractFailure[apicontract.AISessionSaveData](ret), http.StatusInternalServerError)
}
- // 旧前端没有 commitTurnID。流已真正结束后,从终止检查点补出提交标识;SaveSession 仍会
- // 用 runtime 重建权威内容,因此不会信任旧前端可能不完整的流式快照。
+ // 未携带 commitTurnID 的前端在流结束后从终止检查点补出提交标识。
if commitTurnID == "" && c.GetHeader("X-SiYuan-Agent-Checkpoint") != "2" {
recoverableTurnID, runtimeErr := agent.RecoverableTurnID(meta.ID)
if runtimeErr != nil {