mirror of
https://github.com/alibaba/open-code-review.git
synced 2026-07-09 17:28:58 +00:00
* feat(mcp): add Model Context Protocol server support Add MCP client and provider packages that allow integrating external MCP tool servers into the review loop. Includes config commands for managing MCP servers, stdio subprocess integration tests, and comprehensive test coverage. * refactor(mcp): rename loop variable in contentToText to avoid shadowing Client receiver * fix(mcp): use platform-specific shell for setup command The MCP server setup command was hardcoded to use `sh -c`, which fails on Windows. Extract a `shellCommand` helper behind build tags to use `cmd /c` on Windows and `sh -c` elsewhere. * docs(mcp): add MCP server documentation to all README locales
12 lines
371 B
Go
12 lines
371 B
Go
//go:build windows
|
|
|
|
package main
|
|
|
|
import "os/exec"
|
|
|
|
func configureProcessGroup(cmd *exec.Cmd) {
|
|
// On Windows, exec.CommandContext sends os.Kill which terminates the
|
|
// direct child. Grandchild processes (e.g. from sh -c) may survive.
|
|
// Full process-tree cleanup would need Windows Job Objects, but sh -c
|
|
// is rare on Windows so this is an acceptable limitation.
|
|
}
|