MCPcopy Create free account
hub / github.com/MiniCodeMonkey/chief / Configure

Method Configure

internal/tui/worktree_spinner.go:52–76  ·  view source on GitHub ↗

Configure sets up the spinner with the given parameters.

(prdName, branchName, defaultBranch, worktreePath, setupCommand string)

Source from the content-addressed store, hash-verified

50
51// Configure sets up the spinner with the given parameters.
52func (w *WorktreeSpinner) Configure(prdName, branchName, defaultBranch, worktreePath, setupCommand string) {
53 w.prdName = prdName
54 w.branchName = branchName
55 w.defaultBranch = defaultBranch
56 w.worktreePath = worktreePath
57 w.setupCommand = setupCommand
58 w.currentStep = SpinnerStepCreateBranch
59 w.spinnerFrame = 0
60 w.errMsg = ""
61 w.cancelled = false
62
63 // Build steps list
64 w.steps = []stepInfo{
65 {label: fmt.Sprintf("Creating branch '%s' from '%s'", branchName, defaultBranch)},
66 {label: fmt.Sprintf("Creating worktree at %s", worktreePath)},
67 }
68 if setupCommand != "" {
69 w.steps = append(w.steps, stepInfo{label: fmt.Sprintf("Running setup: %s", setupCommand)})
70 }
71
72 // Mark first step as active
73 if len(w.steps) > 0 {
74 w.steps[0].active = true
75 }
76}
77
78// SetSize sets the spinner dimensions.
79func (w *WorktreeSpinner) SetSize(width, height int) {

Calls

no outgoing calls