Move lead delivery and the Merge & continue hold onto the coordinator
This commit is contained in:
@@ -33,16 +33,20 @@ func (m *Manager) Compact(ctx context.Context, sessionID, model string) (api.Age
|
||||
if err != nil {
|
||||
return api.AgentSession{}, err
|
||||
}
|
||||
err = m.startRunning(ctx, sess, "byre")
|
||||
if err != nil {
|
||||
return api.AgentSession{}, err
|
||||
}
|
||||
return m.launchCompaction(ctx, sess, task, model)
|
||||
}
|
||||
|
||||
func (m *Manager) launchCompaction(ctx context.Context, sess api.AgentSession, task api.Task, model string) (api.AgentSession, error) {
|
||||
prompt := handoffPrompt
|
||||
if sess.Owner != "" {
|
||||
prompt = leadHandoffPrompt
|
||||
}
|
||||
err = m.startRunning(ctx, sess, task.Id, "byre")
|
||||
if err != nil {
|
||||
return api.AgentSession{}, err
|
||||
}
|
||||
m.mu.Lock()
|
||||
m.handoffModel[sessionID] = model
|
||||
m.handoffModel[sess.Id] = model
|
||||
m.mu.Unlock()
|
||||
return m.launch(ctx, sess, task, "byre", prompt, "", "", nil)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user