Compare commits

..

1 Commits

Author SHA1 Message Date
Jiang Bohan
8e17afb0c2 fix(views): auto-split whitespace in custom args entries
Users naturally type `--model claude-sonnet-4-20250514` on one line,
but the backend needs them as separate tokens. Now `entriesToArgs`
splits each entry by whitespace before saving, so the API receives
`["--model", "claude-sonnet-4-20250514"]` instead of a single string.

Also updated placeholder and description to show the natural input
format.
2026-04-15 15:13:47 +08:00
6 changed files with 0 additions and 6 deletions

View File

@@ -37,7 +37,6 @@ func (b *claudeBackend) Execute(ctx context.Context, prompt string, opts ExecOpt
args := buildClaudeArgs(opts, b.cfg.Logger)
cmd := exec.CommandContext(runCtx, execPath, args...)
b.cfg.Logger.Debug("agent command", "exec", execPath, "args", args)
cmd.WaitDelay = 10 * time.Second
if opts.Cwd != "" {
cmd.Dir = opts.Cwd

View File

@@ -42,7 +42,6 @@ func (b *codexBackend) Execute(ctx context.Context, prompt string, opts ExecOpti
codexArgs := append([]string{"app-server", "--listen", "stdio://"}, filterCustomArgs(opts.CustomArgs, codexBlockedArgs, b.cfg.Logger)...)
cmd := exec.CommandContext(runCtx, execPath, codexArgs...)
b.cfg.Logger.Debug("agent command", "exec", execPath, "args", codexArgs)
if opts.Cwd != "" {
cmd.Dir = opts.Cwd
}

View File

@@ -35,7 +35,6 @@ func (b *geminiBackend) Execute(ctx context.Context, prompt string, opts ExecOpt
args := buildGeminiArgs(prompt, opts, b.cfg.Logger)
cmd := exec.CommandContext(runCtx, execPath, args...)
b.cfg.Logger.Debug("agent command", "exec", execPath, "args", args)
cmd.WaitDelay = 10 * time.Second
if opts.Cwd != "" {
cmd.Dir = opts.Cwd

View File

@@ -36,7 +36,6 @@ func (b *hermesBackend) Execute(ctx context.Context, prompt string, opts ExecOpt
hermesArgs := append([]string{"acp"}, opts.CustomArgs...)
cmd := exec.CommandContext(runCtx, execPath, hermesArgs...)
b.cfg.Logger.Debug("agent command", "exec", execPath, "args", hermesArgs)
if opts.Cwd != "" {
cmd.Dir = opts.Cwd
}

View File

@@ -60,7 +60,6 @@ func (b *openclawBackend) Execute(ctx context.Context, prompt string, opts ExecO
args = append(args, "--message", prompt)
cmd := exec.CommandContext(runCtx, execPath, args...)
b.cfg.Logger.Debug("agent command", "exec", execPath, "args", args)
cmd.WaitDelay = 10 * time.Second
if opts.Cwd != "" {
cmd.Dir = opts.Cwd

View File

@@ -55,7 +55,6 @@ func (b *opencodeBackend) Execute(ctx context.Context, prompt string, opts ExecO
args = append(args, prompt)
cmd := exec.CommandContext(runCtx, execPath, args...)
b.cfg.Logger.Debug("agent command", "exec", execPath, "args", args)
cmd.WaitDelay = 10 * time.Second
if opts.Cwd != "" {
cmd.Dir = opts.Cwd