MCPcopy Create free account
hub / github.com/diillson/chatcli / RunCoderCaptured

Method RunCoderCaptured

cli/rpc_support.go:147–158  ·  view source on GitHub ↗

RunCoderCaptured runs the coder loop one-shot on task, capturing output.

(ctx context.Context, task string)

Source from the content-addressed store, hash-verified

145
146// RunCoderCaptured runs the coder loop one-shot on task, capturing output.
147func (cli *ChatCLI) RunCoderCaptured(ctx context.Context, task string) (string, error) {
148 out, err := captureRPCStdout(func() error {
149 return cli.RunCoderOnce(ctx, "/coder "+task)
150 })
151 if err != nil {
152 return out, err
153 }
154 if out == "" {
155 out = "(coder produced no textual output)"
156 }
157 return out, nil
158}
159
160// BuiltinTool describes a built-in tool exposed over MCP.
161type BuiltinTool struct {

Callers 1

CoderMethod · 0.80

Calls 2

RunCoderOnceMethod · 0.95
captureRPCStdoutFunction · 0.85

Tested by

no test coverage detected