Give each workflow run a parent task with no agent
This commit is contained in:
@@ -223,6 +223,9 @@ func (m *Manager) create(ctx context.Context, task api.Task, creator api.User, m
|
||||
}
|
||||
|
||||
func (m *Manager) newSession(ctx context.Context, task api.Task, creator api.User, member, model string) (api.AgentSession, error) {
|
||||
if task.Workflow != nil {
|
||||
return api.AgentSession{}, fmt.Errorf("%w: task %s is a workflow run, which has no agent; its stage tasks have theirs", ErrInvalid, task.Id)
|
||||
}
|
||||
existing, err := m.store.ListSessions(ctx, task.Id)
|
||||
if err != nil {
|
||||
return api.AgentSession{}, err
|
||||
|
||||
Reference in New Issue
Block a user