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

Function NewProgressWatcher

internal/prd/progress.go:100–112  ·  view source on GitHub ↗

NewProgressWatcher creates a new watcher for progress.md in the same directory as the given prd.json path.

(prdPath string)

Source from the content-addressed store, hash-verified

98// NewProgressWatcher creates a new watcher for progress.md in the same
99// directory as the given prd.json path.
100func NewProgressWatcher(prdPath string) (*ProgressWatcher, error) {
101 dir := filepath.Dir(prdPath)
102 fsWatcher, err := fsnotify.NewWatcher()
103 if err != nil {
104 return nil, err
105 }
106 return &ProgressWatcher{
107 dir: dir,
108 watcher: fsWatcher,
109 events: make(chan map[string][]ProgressEntry, 10),
110 done: make(chan struct{}),
111 }, nil
112}
113
114// Start begins watching for progress.md changes.
115func (w *ProgressWatcher) Start() error {

Callers 2

NewAppWithOptionsFunction · 0.92
switchToPRDMethod · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected