An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:sparkles: AI Agent https://github.com/siyuan-note/siyuan/issues/17797
Daniel06c3b27db87b
diff --git a/kernel/agent/agent.go b/kernel/agent/agent.goindex f933c25d2f..7c1e874d62 100644--- a/kernel/agent/agent.go+++ b/kernel/agent/agent.go@@ -343,6 +343,7 @@ func AgentChat(ctx context.Context, client *openai.Client, model string, sessionvar doomLoop doomLoopTrackervar compactCount intvar snapshotIDs []string+ snapshotCreated := false // 整个 AgentChat 过程最多打一次自动快照,避免多轮工具调用时每轮都打var roundsSinceCheckpoint intif sessionID != "" {@@ -537,7 +538,6 @@ func AgentChat(ctx context.Context, client *openai.Client, model string, sessioncheckpointMsgs = append(checkpointMsgs, checkpointMsg)assistantIdx := len(checkpointMsgs) - 1- snapshotCreated := falsefor i, tc := range aggregatedToolCalls {args := parsedArgs[i]action := ""