fix(agent): 云端 Agent - 媒体失败可续跑并补齐快照哈希

生成任务失败不再把整轮判死,漏传画布快照由服务端补当前内容哈希,没有偏好层时不暴露空的 profile 读取。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
ddCatandCursor committed 2026-09-17 23:31:54 +08:00
1 parent 9ce158aaa0
commit 656f64a3ce
13 files changed
+201 -41

No files matched your search

+1 -1
View File
@@ -425,7 +425,7 @@ func (s *Service) CreateCloudAgentRun(userID string, req CloudAgentRequest, pare
return nil, err
}
state := cloudAgentState{Version: 1, Request: req, ParentID: parentID, Fingerprint: fingerprint, CreativeAnchor: creativeAnchor, Plan: inheritedPlan, Skills: skillSnapshots, Profile: profile, Policy: policy}
canonical := cloudAgentCanonical(system, history, req.Prompt, req)
canonical := cloudAgentCanonicalFor(system, history, req.Prompt, req, len(profile.Layers) > 0)
s.attachCloudAgentLessons(&canonical, userID, req.Prompt)
canonical.PromptCacheKey = cloudAgentPromptCacheKey(req.CanvasID, canonical.SystemPrompt)
attachCloudAgentPlan(&canonical, inheritedPlan)