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

Function NewLoopWithWorkDir

internal/loop/loop.go:79–90  ·  view source on GitHub ↗

NewLoopWithWorkDir creates a new Loop instance with a configurable working directory. When workDir is empty, defaults to the project root for backward compatibility.

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

Source from the content-addressed store, hash-verified

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.
79func NewLoopWithWorkDir(prdPath, workDir string, prompt string, maxIter int, provider Provider) *Loop {
80 return &Loop{
81 prdPath: prdPath,
82 workDir: workDir,
83 prompt: prompt,
84 maxIter: maxIter,
85 provider: provider,
86 events: make(chan Event, 100),
87 retryConfig: DefaultRetryConfig(),
88 watchdogTimeout: DefaultWatchdogTimeout,
89 }
90}
91
92// NewLoopWithEmbeddedPrompt creates a new Loop instance using the embedded agent prompt.
93// The prompt is rebuilt on each iteration to inline the current story context.

Callers 4

TestNewLoopWithWorkDirFunction · 0.85
StartMethod · 0.85

Calls 1

DefaultRetryConfigFunction · 0.85

Tested by 3

TestNewLoopWithWorkDirFunction · 0.68