RunCoderCaptured runs the coder loop one-shot on task, capturing output.
(ctx context.Context, task string)
| 145 | |
| 146 | // RunCoderCaptured runs the coder loop one-shot on task, capturing output. |
| 147 | func (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. |
| 161 | type BuiltinTool struct { |
no test coverage detected