Give each workflow run a parent task with no agent
This commit is contained in:
@@ -16,7 +16,7 @@ import (
|
||||
)
|
||||
|
||||
func (m *Manager) CreateTask(ctx context.Context, project api.Project, title, createdBy, base, actor string) (api.Task, error) {
|
||||
return m.createTask(ctx, project, api.Task{Title: title, CreatedBy: createdBy}, nil, base, actor)
|
||||
return m.createTask(ctx, project, api.Task{Title: title, CreatedBy: createdBy}, base, actor)
|
||||
}
|
||||
|
||||
func (m *Manager) StartTask(ctx context.Context, project api.Project, creator api.User, title, prompt, model, client string, images []string) (api.Task, error) {
|
||||
@@ -81,7 +81,7 @@ func (m *Manager) StartTodo(ctx context.Context, project api.Project, creator ap
|
||||
return nil, err
|
||||
}
|
||||
} else {
|
||||
task, err := m.createTask(ctx, project, api.Task{Title: item.Title, CreatedBy: creator.Login, TodoItem: &item.Title}, nil, project.DefaultBranch, actor)
|
||||
task, err := m.createTask(ctx, project, api.Task{Title: item.Title, CreatedBy: creator.Login, TodoItem: &item.Title}, project.DefaultBranch, actor)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -108,7 +108,7 @@ func todoPrompt(item api.TodoItem, discuss bool) string {
|
||||
|
||||
const discussPrompt = "The human wants to discuss this item with you before any of it is built, to judge whether it should be built at all and in what shape. Zoom out before going into detail. Read what you need to understand it, then give your view: what problem it solves and whether that is worth solving, whether we should do it, what the alternatives are (another approach, a smaller change, or nothing), and how you would approach it, with the trade-offs and doubts you see. Talk it over in your final messages, where the human replies in the chat, and use ask_human as often as it helps. Each question belongs to that zoomed-out discussion, such as whether to do it, which alternative, or what shape, rather than the narrow details of getting it built, and later questions can build on earlier answers. Keep the conversation going turn by turn, and change nothing until they tell you to build it."
|
||||
|
||||
func (m *Manager) createTask(ctx context.Context, project api.Project, t api.Task, frozen *store.FrozenWorkflow, base, actor string) (api.Task, error) {
|
||||
func (m *Manager) createTask(ctx context.Context, project api.Project, t api.Task, base, actor string) (api.Task, error) {
|
||||
t.Id = ids.New(ids.Task)
|
||||
t.ProjectId = project.Id
|
||||
if t.MergeTitle == "" {
|
||||
@@ -125,7 +125,7 @@ func (m *Manager) createTask(ctx context.Context, project api.Project, t api.Tas
|
||||
return api.Task{}, err
|
||||
}
|
||||
|
||||
err = m.store.CreateTask(ctx, t, frozen, actor)
|
||||
err = m.store.CreateTask(ctx, t, nil, actor)
|
||||
if err != nil {
|
||||
rerr := git.RemoveWorktree(project.RepoPath, t.WorktreePath, t.Branch)
|
||||
if rerr != nil {
|
||||
|
||||
Reference in New Issue
Block a user