From 6342f98361ea889918c0488f1a248fea3bc00ac5 Mon Sep 17 00:00:00 2001 From: allenli178 Date: Tue, 26 May 2026 11:27:59 +0800 Subject: [PATCH] feat(launch-editor): add support for Trae CN editor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 新增Trae CN编辑器的启动支持,适配Windows、Linux和macOS平台,更新README文档添加对应支持表格项 --- README.md | 2 ++ packages/launch-editor/editor-info/linux.js | 1 + packages/launch-editor/editor-info/macos.js | 1 + packages/launch-editor/editor-info/windows.js | 1 + packages/launch-editor/get-args.js | 3 ++- 5 files changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 61bae53..2f28107 100644 --- a/README.md +++ b/README.md @@ -82,6 +82,8 @@ To launch files, send requests to the server like the following: | `vim` | [Vim](http://www.vim.org/) | ✓ | | | | `visualstudio` | [Visual Studio](https://www.visualstudio.com/vs/) | | | ✓ | | `webstorm` | [WebStorm](https://www.jetbrains.com/webstorm/) | ✓ | ✓ | ✓ | +| `trae` | [Trae](https://www.trae.ai/) | ✓ | ✓ | ✓ | +| `trae-cn` | [Trae CN](https://www.trae.cn/) | ✓ | ✓ | ✓ | | `zed` | [Zed](https://zed.dev/) | ✓ | ✓ | ✓ | ### Custom editor support diff --git a/packages/launch-editor/editor-info/linux.js b/packages/launch-editor/editor-info/linux.js index 226d9bc..19f07f4 100644 --- a/packages/launch-editor/editor-info/linux.js +++ b/packages/launch-editor/editor-info/linux.js @@ -7,6 +7,7 @@ module.exports = { codium: 'codium', cursor: 'cursor', trae: 'trae', + 'trae-cn': 'trae-cn', antigravity: 'antigravity', emacs: 'emacs', gvim: 'gvim', diff --git a/packages/launch-editor/editor-info/macos.js b/packages/launch-editor/editor-info/macos.js index 64ef300..4821cb9 100644 --- a/packages/launch-editor/editor-info/macos.js +++ b/packages/launch-editor/editor-info/macos.js @@ -20,6 +20,7 @@ module.exports = { '/Applications/VSCodium.app/Contents/MacOS/Electron': 'codium', '/Applications/Cursor.app/Contents/MacOS/Cursor': 'cursor', '/Applications/Trae.app/Contents/MacOS/Electron': 'trae', + '/Applications/Trae CN.app/Contents/MacOS/Electron': 'trae-cn', '/Applications/Antigravity.app/Contents/MacOS/Electron': 'antigravity', '/Applications/AppCode.app/Contents/MacOS/appcode': '/Applications/AppCode.app/Contents/MacOS/appcode', diff --git a/packages/launch-editor/editor-info/windows.js b/packages/launch-editor/editor-info/windows.js index 17340c9..2c7c5e0 100644 --- a/packages/launch-editor/editor-info/windows.js +++ b/packages/launch-editor/editor-info/windows.js @@ -24,6 +24,7 @@ module.exports = [ 'rider.exe', 'rider64.exe', 'Trae.exe', + 'Trae CN.exe', 'zed.exe', 'Antigravity.exe' ] diff --git a/packages/launch-editor/get-args.js b/packages/launch-editor/get-args.js index 45836b9..5cf549e 100644 --- a/packages/launch-editor/get-args.js +++ b/packages/launch-editor/get-args.js @@ -1,7 +1,7 @@ const path = require('path') // normalize file/line numbers into command line args for specific editors -module.exports = function getArgumentsForPosition ( +module.exports = function getArgumentsForPosition( editor, fileName, lineNumber, @@ -40,6 +40,7 @@ module.exports = function getArgumentsForPosition ( case 'Code - Insiders': case 'codium': case 'trae': + case 'trae-cn': case 'antigravity': case 'cursor': case 'vscodium':