feat: add subagent profiles, memory namespaces, and webui management

This commit is contained in:
lpf
2026-03-05 21:05:29 +08:00
parent 1eacfaba41
commit 29d6480058
22 changed files with 2051 additions and 49 deletions

View File

@@ -280,7 +280,20 @@ func (t *PipelineDispatchTool) Execute(ctx context.Context, args map[string]inte
if task.Role != "" {
label = fmt.Sprintf("%s:%s", task.Role, task.ID)
}
if _, err := t.spawn.Spawn(ctx, payload, label, "tool", "tool", pipelineID, task.ID); err != nil {
agentID := strings.TrimSpace(task.Role)
if agentID == "" {
agentID = strings.TrimSpace(task.ID)
}
if _, err := t.spawn.Spawn(ctx, SubagentSpawnOptions{
Task: payload,
Label: label,
Role: task.Role,
AgentID: agentID,
OriginChannel: "tool",
OriginChatID: "tool",
PipelineID: pipelineID,
PipelineTask: task.ID,
}); err != nil {
lines = append(lines, fmt.Sprintf("- %s failed: %v", task.ID, err))
continue
}