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

Method Init

internal/tui/app.go:369–389  ·  view source on GitHub ↗

Init initializes the App.

()

Source from the content-addressed store, hash-verified

367
368// Init initializes the App.
369func (a App) Init() tea.Cmd {
370 // Start the file watcher
371 if a.watcher != nil {
372 if err := a.watcher.Start(); err != nil {
373 // Log error but don't fail - watcher is not critical
374 a.lastActivity = "Warning: file watcher failed to start"
375 }
376 }
377
378 // Start the progress watcher
379 if a.progressWatcher != nil {
380 _ = a.progressWatcher.Start()
381 }
382
383 return tea.Batch(
384 tea.EnterAltScreen,
385 a.listenForPRDChanges(),
386 a.listenForManagerEvents(),
387 a.listenForProgressChanges(),
388 )
389}
390
391// listenForManagerEvents listens for events from all managed loops.
392func (a *App) listenForManagerEvents() tea.Cmd {

Callers

nothing calls this directly

Calls 4

listenForPRDChangesMethod · 0.95
StartMethod · 0.45

Tested by

no test coverage detected