feat(agent): Agent 工作台 - 计划插话记忆、统一模型选择器并修复摘要与视频入库
将计划清单、运行中插话和个人记忆接入云端 Agent;全站模型选择器统一为左右二级菜单。画布摘要按预算截断不再整轮拒绝,首页视频未知宽高可入库。README 补充贡献者 morrow。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
b6bae4f957
commit
6892732b06
80 files changed
+7361
-179
No files matched your search
@@ -0,0 +1,31 @@
|
||||
package app
|
||||
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"infinite-canvas/backend/internal/model"
|
||||
)
|
||||
|
||||
// cloudAgentParentCanBeSuperseded 判断上一轮能否因执行合同变更直接接新轮。
|
||||
// 只有上一轮没有正在跑的模型任务时才允许,避免两轮并发写同一张画布。
|
||||
func (s *Service) cloudAgentParentCanBeSuperseded(userID, parentID string) bool {
|
||||
execution, err := s.repo.CloudAgent(userID, parentID)
|
||||
if err != nil {
|
||||
return false
|
||||
}
|
||||
state, err := cloudAgentDecode(execution)
|
||||
if err != nil {
|
||||
return false
|
||||
}
|
||||
if validateCloudAgentPolicySnapshot(state.Policy) == nil {
|
||||
return false
|
||||
}
|
||||
if strings.TrimSpace(state.ActiveTaskID) == "" {
|
||||
return true
|
||||
}
|
||||
task, err := s.repo.TaskForUser(userID, state.ActiveTaskID)
|
||||
if err != nil {
|
||||
return true
|
||||
}
|
||||
return task.Status != model.TaskStatusQueued && task.Status != model.TaskStatusRunning
|
||||
}
|
||||
Reference in new issue
Block a user