feat(agent): Agent 生成审批 - 支持改模型参数、忽略位置漂移并取消 8 轮硬限制
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
f394cd7385
commit
fc5548836f
21 files changed
+930
-66
No files matched your search
@@ -373,9 +373,6 @@ func (s *Service) CreateCloudAgentRun(userID string, req CloudAgentRequest, pare
|
||||
history = append(history, providerTextMessage{Role: "user", Content: parent.Prompt}, providerTextMessage{Role: "assistant", Content: text})
|
||||
}
|
||||
// Bound prompt growth without silently injecting a huge canvas or transcript.
|
||||
if len(history) > 16 {
|
||||
return nil, BadAuthRequest("对话已达到 8 轮上下文上限,请新建对话")
|
||||
}
|
||||
encodedHistory, err := json.Marshal(history)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in new issue
Block a user