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

Method LoopCommand

internal/agent/cursor.go:34–45  ·  view source on GitHub ↗

LoopCommand implements loop.Provider. Prompt is supplied via stdin; Cursor CLI reads it when -p has no argument.

(ctx context.Context, prompt, workDir string)

Source from the content-addressed store, hash-verified

32// LoopCommand implements loop.Provider.
33// Prompt is supplied via stdin; Cursor CLI reads it when -p has no argument.
34func (p *CursorProvider) LoopCommand(ctx context.Context, prompt, workDir string) *exec.Cmd {
35 cmd := exec.CommandContext(ctx, p.cliPath,
36 "-p",
37 "--output-format", "stream-json",
38 "--force",
39 "--workspace", workDir,
40 "--trust",
41 )
42 cmd.Dir = workDir
43 cmd.Stdin = strings.NewReader(prompt)
44 return cmd
45}
46
47// InteractiveCommand implements loop.Provider.
48func (p *CursorProvider) InteractiveCommand(workDir, prompt string) *exec.Cmd {

Callers 1

Calls

no outgoing calls

Tested by 1