Files
multica/server/pkg/agent/copilot_invocation_other.go
Jan De Dobbeleer 1e1a4f7845 fix(daemon): fix Copilot CLI invocation on Windows and strip shell quotes from custom args (MUL-2876)
Bug 1: detect copilot.cmd/.bat on Windows and invoke the sibling .ps1 directly via powershell -File, bypassing cmd.exe %* re-tokenisation that mangled the multi-line -p prompt. Shared rewriteCmdToPS1() now serves cursor, pi, and copilot.

Bug 2: filterCustomArgs (shared by all agent backends) strips one outer layer of shell quotes via unshellQuoteArg() before processing, so shell-style custom args like --deny-tool='write' no longer reach the CLI with literal quotes.
2026-06-01 23:28:51 +08:00

13 lines
346 B
Go

//go:build !windows
package agent
import "log/slog"
// platformCopilotInvocation is a no-op on non-Windows platforms: Copilot
// CLI's binstub invokes node directly via shebang and Go's os/exec can pass
// argv unchanged.
func platformCopilotInvocation(_ string, _ []string, _ *slog.Logger) (string, []string, bool) {
return "", nil, false
}