Lead create_project tool

This commit is contained in:
Ian Gulliver
2026-10-17 08:08:05 -07:00
parent 1ba79e99df
commit 62df39c5da
5 changed files with 45 additions and 16 deletions
+3 -1
View File
@@ -38,6 +38,7 @@ type Manager struct {
leadRoot string
codexHome string
status func(context.Context) (api.Status, error)
addProject func(ctx context.Context, name, repoPath, createdBy string) (api.Project, error)
mu sync.Mutex
live map[string]*live
@@ -113,13 +114,14 @@ func (l *live) implementer() bool {
return l.owner == "" && l.reviewID == ""
}
func New(st *store.Store, worktreeRoot, leadRoot, codexHome string, status func(context.Context) (api.Status, error)) *Manager {
func New(st *store.Store, worktreeRoot, leadRoot, codexHome string, status func(context.Context) (api.Status, error), addProject func(ctx context.Context, name, repoPath, createdBy string) (api.Project, error)) *Manager {
m := &Manager{
store: st,
worktreeRoot: worktreeRoot,
leadRoot: leadRoot,
codexHome: codexHome,
status: status,
addProject: addProject,
live: map[string]*live{},
starting: map[string]*start{},
deliverLocks: map[string]*sessionLock{},