Summary
SessionManager.Create() currently takes 14 positional string/bool parameters, making it error-prone and requiring every caller to be updated when a new option is added (as seen in #367 / #374).
Proposal
Replace the positional parameters with a CreateOpts struct:
type CreateOpts struct {
Name string
AgentName string
RepoPath string
BaseBranch string
Prompt string
Model string
ParentID string
NoRepo bool
ShareWorktree string
AgentHooks bool
InPlace bool
AllowConcurrent bool
Rows uint16
Cols uint16
}
Benefits:
- Self-documenting at call sites
- New options use zero-value defaults — existing callers don't break
- Harder to swap two adjacent
string or bool params by accident
Summary
SessionManager.Create()currently takes 14 positional string/bool parameters, making it error-prone and requiring every caller to be updated when a new option is added (as seen in #367 / #374).Proposal
Replace the positional parameters with a
CreateOptsstruct:Benefits:
stringorboolparams by accident