fix(dispatch): model flag splice broke -o argument ordering
When model variant was specified, the splice inserted --model between -o and its value, making Codex see -o with no file path. Fixed by appending --model and prompt sequentially instead of splicing into the middle of the args slice. Co-Authored-By: Virgil <virgil@lethean.io>
This commit is contained in:
parent
c73ea6ad7a
commit
69f0acce0d
1 changed files with 2 additions and 2 deletions
|
|
@ -78,11 +78,11 @@ func agentCommand(agent, prompt string) (string, []string, error) {
|
|||
"exec",
|
||||
"--full-auto",
|
||||
"-o", "../.meta/agent-codex.log",
|
||||
prompt,
|
||||
}
|
||||
if model != "" {
|
||||
args = append(args[:3], append([]string{"--model", model}, args[3:]...)...)
|
||||
args = append(args, "--model", model)
|
||||
}
|
||||
args = append(args, prompt)
|
||||
return "codex", args, nil
|
||||
case "claude":
|
||||
args := []string{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue