feat: add Trae CN MCP client configurator - #1392
Conversation
Trae CN (国内版) is a separate install from international Trae but the same VS Code fork, so its MCP config lives at .../Trae CN/User/mcp.json. Adds TraeCnConfigurator; it is auto-discovered, so no registration is needed. Verified on macOS against a running Trae CN (server at User/mcp.json loads via McpClientService.startExtension).
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughAdds Trae CN support through a new configurator. The configurator defines platform-specific ChangesTrae CN MCP integration
Priority: ⬇️ Low Estimated code review effort: 1 (Trivial) | ~5 minutes Merge Risk: ⚪ Minimal · up to This adds Trae CN MCP configuration paths and manual setup guidance across supported platforms. The configuration is ready to merge with no concrete current-head risk identified. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 1 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Description
Adds Trae CN (Trae 国内版) as a configurable MCP client. Trae CN is a separate install from international Trae with its own app, config directory, and user base, but was not offered in the client list.
Type of Change
Changes Made
MCPForUnity/Editor/Clients/Configurators/TraeCnConfigurator.cs(+.meta).macOS:
~/Library/Application Support/Trae CN/User/mcp.jsonWindows:
%AppData%\Trae CN\User\mcp.jsonLinux:
~/.config/Trae CN/User/mcp.jsonCompatibility / Package Source
file:checkout of this branchPackages/packages-lock.json: n/a (not a Git package URL)Testing/Screenshots/Recordings
cd Server && uv run pytest tests/ -v)Verified against a running Trae CN (macOS). Placed a server at
~/Library/Application Support/Trae CN/User/mcp.jsonand launched Trae CN — it loaded via the sameMcpClientService.startExtensionpath as international Trae:This confirms the config location first-party, not by inference. Windows and Linux paths follow the same VS Code profile layout (
%AppData%\Code\User,~/.config/Code/User) and are inferred, not verified on those platforms.Documentation Updates
tools/UPDATE_DOCS_PROMPT.md(recommended)No tools or resources changed. The client-configurators guide lists example clients with "etc.", and new clients auto-appear in the Unity UI, so no doc edits are required.
Related Issues
Partially addresses #1326 — covers the trae-ch (Trae CN) request.
The traework / TRAE SOLO family is intentionally left out of this PR. TRAE SOLO (intl and CN) ships the
solo-liteworkbench and uses a different MCP mechanism (McpConfigService/PluginMcp/icubeAgentExtension.updatePluginMcpConfigs). Happy to follow up in a separate PR.Additional Notes
Why no test. A
Path.Combineassertion against a path literal restates the constant rather than verifying it, and would still pass if Trae CN relocated the file. The write/merge behavior is the base class's, already covered by the existing Trae tests; the class carries an XML-doc comment explaining the/Userlayout instead.Summary by CodeRabbit