Simplify code found by simplicity audit of d6be98f
This commit is contained in:
@@ -59,7 +59,7 @@ func (m *Manager) launchCompaction(ctx context.Context, sess api.AgentSession, t
|
||||
m.mu.Lock()
|
||||
m.handoffModel[sess.Id] = modelChoice{model, effort}
|
||||
m.mu.Unlock()
|
||||
return m.launch(ctx, sess, task, "byre", prompt, "", "", nil)
|
||||
return m.launch(ctx, sess, task, "byre", Prompt{Text: prompt})
|
||||
}
|
||||
|
||||
func (m *Manager) continuationModel(sess api.AgentSession) modelChoice {
|
||||
@@ -111,11 +111,11 @@ func (m *Manager) handoff(ctx context.Context, sessionID, handoff string) error
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
_, err = m.createLead(ctx, creator, leadHandoffPreamble+handoff, model.model, model.effort, "byre", "", "", nil)
|
||||
_, err = m.createLead(ctx, creator, "byre", Prompt{Text: leadHandoffPreamble + handoff, Model: model.model, Effort: model.effort})
|
||||
return err
|
||||
}
|
||||
|
||||
if creator.GitName == "" || creator.GitEmail == "" {
|
||||
if !creator.HasGitIdentity() {
|
||||
return ErrNoGitIdentity
|
||||
}
|
||||
task, err := m.store.GetTask(ctx, sess.TaskId)
|
||||
@@ -132,6 +132,6 @@ func (m *Manager) handoff(ctx context.Context, sessionID, handoff string) error
|
||||
return err
|
||||
}
|
||||
m.stopLive(sess.Id)
|
||||
_, err = m.launch(ctx, next, task, "byre", handoffPreamble+handoff, "", "", nil)
|
||||
_, err = m.launch(ctx, next, task, "byre", Prompt{Text: handoffPreamble + handoff})
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user