RunCoderOnce executa o modo coder de forma não-interativa (one-shot), mas mantendo o loop ReAct do AgentMode (com tool_calls/plugins).
(ctx context.Context, input string)
| 1045 | // RunCoderOnce executa o modo coder de forma não-interativa (one-shot), |
| 1046 | // mas mantendo o loop ReAct do AgentMode (com tool_calls/plugins). |
| 1047 | func (cli *ChatCLI) RunCoderOnce(ctx context.Context, input string) error { |
| 1048 | query, ok := strings.CutPrefix(input, "/coder ") |
| 1049 | if !ok { |
| 1050 | return fmt.Errorf("entrada inválida para o modo coder one-shot: %s", input) |
| 1051 | } |
| 1052 | return cli.runCoderQuery(ctx, query, false) |
| 1053 | } |
| 1054 | |
| 1055 | // RunGatewayCoderOnce runs the coder ReAct loop one-shot on a raw task for the |
| 1056 | // messaging gateway: same engine and tools (create/edit files, run commands, |