MCPcopy Index your code
hub / github.com/MiniCodeMonkey/chief / NewLoop

Function NewLoop

internal/loop/loop.go:65–75  ·  view source on GitHub ↗

NewLoop creates a new Loop instance.

(prdPath, prompt string, maxIter int, provider Provider)

Source from the content-addressed store, hash-verified

63
64// NewLoop creates a new Loop instance.
65func NewLoop(prdPath, prompt string, maxIter int, provider Provider) *Loop {
66 return &Loop{
67 prdPath: prdPath,
68 prompt: prompt,
69 maxIter: maxIter,
70 provider: provider,
71 events: make(chan Event, 100),
72 retryConfig: DefaultRetryConfig(),
73 watchdogTimeout: DefaultWatchdogTimeout,
74 }
75}
76
77// NewLoopWithWorkDir creates a new Loop instance with a configurable working directory.
78// When workDir is empty, defaults to the project root for backward compatibility.

Callers 15

TestNewLoopFunction · 0.85
TestLoop_EventsFunction · 0.85
TestLoop_IterationFunction · 0.85
TestLoop_StopFunction · 0.85
TestLoop_MaxIterationsFunction · 0.85
TestLoop_LogFileFunction · 0.85
TestLoop_ChiefDoneEventFunction · 0.85
TestLoop_SetRetryConfigFunction · 0.85

Calls 1

DefaultRetryConfigFunction · 0.85

Tested by 15

TestNewLoopFunction · 0.68
TestLoop_EventsFunction · 0.68
TestLoop_IterationFunction · 0.68
TestLoop_StopFunction · 0.68
TestLoop_MaxIterationsFunction · 0.68
TestLoop_LogFileFunction · 0.68
TestLoop_ChiefDoneEventFunction · 0.68
TestLoop_SetRetryConfigFunction · 0.68